Move ChangeInfo related types into the api/ folder

This part of a broader effort of moving Rest API types into the api/
folder, such that TypeScript based plugins can depend on these types
without reaching into Gerrit's implementation folders.

We are keeping re-exports as to minimize code changes.

Change-Id: Ic9eb620334b8b5ef17fba5e9df18abb22089921b
diff --git a/polygerrit-ui/app/constants/constants.ts b/polygerrit-ui/app/constants/constants.ts
index 689347a..6703c8e 100644
--- a/polygerrit-ui/app/constants/constants.ts
+++ b/polygerrit-ui/app/constants/constants.ts
@@ -21,6 +21,31 @@
 import {DiffViewMode} from '../api/diff';
 import {DiffPreferencesInfo} from '../types/diff';
 import {EditPreferencesInfo, PreferencesInfo} from '../types/common';
+import {
+  AccountTag,
+  ChangeStatus,
+  FileInfoStatus,
+  GpgKeyInfoStatus,
+  HttpMethod,
+  ProblemInfoStatus,
+  RequirementStatus,
+  ReviewerState,
+  RevisionKind,
+  SubmitType,
+} from '../api/rest-api';
+
+export {
+  AccountTag,
+  ChangeStatus,
+  FileInfoStatus,
+  GpgKeyInfoStatus,
+  HttpMethod,
+  ProblemInfoStatus,
+  RequirementStatus,
+  ReviewerState,
+  RevisionKind,
+  SubmitType,
+};
 
 export enum PrimaryTab {
   FILES = 'files',
@@ -76,15 +101,6 @@
 }
 
 /**
- * @desc Specifies status for a change
- */
-export enum ChangeStatus {
-  ABANDONED = 'ABANDONED',
-  MERGED = 'MERGED',
-  NEW = 'NEW',
-}
-
-/**
  * @desc Special file paths
  */
 export enum SpecialFilePath {
@@ -94,65 +110,6 @@
 }
 
 /**
- * @desc The reviewer state
- */
-export enum RequirementStatus {
-  OK = 'OK',
-  NOT_READY = 'NOT_READY',
-  RULE_ERROR = 'RULE_ERROR',
-}
-
-/**
- * @desc The reviewer state
- */
-export enum ReviewerState {
-  REVIEWER = 'REVIEWER',
-  CC = 'CC',
-  REMOVED = 'REMOVED',
-}
-
-/**
- * @desc The patchset kind
- */
-export enum RevisionKind {
-  REWORK = 'REWORK',
-  TRIVIAL_REBASE = 'TRIVIAL_REBASE',
-  MERGE_FIRST_PARENT_UPDATE = 'MERGE_FIRST_PARENT_UPDATE',
-  NO_CODE_CHANGE = 'NO_CODE_CHANGE',
-  NO_CHANGE = 'NO_CHANGE',
-}
-
-/**
- * @desc The status of fixing the problem
- */
-export enum ProblemInfoStatus {
-  FIXED = 'FIXED',
-  FIX_FAILED = 'FIX_FAILED',
-}
-
-/**
- * @desc The status of the file
- */
-export enum FileInfoStatus {
-  ADDED = 'A',
-  DELETED = 'D',
-  RENAMED = 'R',
-  COPIED = 'C',
-  REWRITTEN = 'W',
-  // Modifed = 'M', // but API not set it if the file was modified
-  UNMODIFIED = 'U', // Not returned by BE, but added by UI for certain files
-}
-
-/**
- * @desc The status of the file
- */
-export enum GpgKeyInfoStatus {
-  BAD = 'BAD',
-  OK = 'OK',
-  TRUSTED = 'TRUSTED',
-}
-
-/**
  * @desc Used for server config of accounts
  */
 export enum DefaultDisplayNameConfig {
@@ -188,20 +145,6 @@
 }
 
 /**
- * All supported submit types.
- * https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#submit-type-info
- */
-export enum SubmitType {
-  MERGE_IF_NECESSARY = 'MERGE_IF_NECESSARY',
-  FAST_FORWARD_ONLY = 'FAST_FORWARD_ONLY',
-  REBASE_IF_NECESSARY = 'REBASE_IF_NECESSARY',
-  REBASE_ALWAYS = 'REBASE_ALWAYS',
-  MERGE_ALWAYS = 'MERGE_ALWAYS ',
-  CHERRY_PICK = 'CHERRY_PICK',
-  INHERIT = 'INHERIT',
-}
-
-/**
  * https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#mergeable-info
  */
 export enum MergeStrategy {
@@ -222,10 +165,6 @@
   INHERITED = 'INHERITED',
 }
 
-export enum AccountTag {
-  SERVICE_USER = 'SERVICE_USER',
-}
-
 /**
  * Enum for possible PermissionRuleInfo actions
  * https://gerrit-review.googlesource.com/Documentation/rest-api-access.html#permission-info
@@ -249,17 +188,6 @@
 }
 
 /**
- * Enum for all http methods used in Gerrit.
- */
-export enum HttpMethod {
-  HEAD = 'HEAD',
-  POST = 'POST',
-  GET = 'GET',
-  DELETE = 'DELETE',
-  PUT = 'PUT',
-}
-
-/**
  * The side on which the comment was added
  * https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#comment-info
  */