contentful-migration 4.9.4 → 4.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/built/bin/cli.d.ts +9 -0
  3. package/built/bin/lib/config.d.ts +13 -0
  4. package/built/bin/lib/contentful-client/index.d.ts +2 -0
  5. package/built/bin/lib/contentful-client/proxy.d.ts +19 -0
  6. package/built/bin/lib/render-migration.d.ts +5 -0
  7. package/built/bin/lib/steps-errors.d.ts +3 -0
  8. package/built/bin/lib/write-errors-to-log.d.ts +2 -0
  9. package/built/bin/usage-params.d.ts +2 -0
  10. package/built/index.d.ts +1 -0
  11. package/built/lib/action/action.d.ts +18 -0
  12. package/built/lib/action/content-type-annotate.d.ts +11 -0
  13. package/built/lib/action/content-type-create.d.ts +8 -0
  14. package/built/lib/action/content-type-delete.d.ts +8 -0
  15. package/built/lib/action/content-type-publish.d.ts +8 -0
  16. package/built/lib/action/content-type-save.d.ts +8 -0
  17. package/built/lib/action/content-type-unpublish.d.ts +8 -0
  18. package/built/lib/action/content-type-update.d.ts +11 -0
  19. package/built/lib/action/editor-layout/editor-layout-change-field-group-control.d.ts +13 -0
  20. package/built/lib/action/editor-layout/editor-layout-create-field-group.d.ts +12 -0
  21. package/built/lib/action/editor-layout/editor-layout-create.d.ts +8 -0
  22. package/built/lib/action/editor-layout/editor-layout-delete-field-group.d.ts +21 -0
  23. package/built/lib/action/editor-layout/editor-layout-delete.d.ts +10 -0
  24. package/built/lib/action/editor-layout/editor-layout-move-field.d.ts +13 -0
  25. package/built/lib/action/editor-layout/editor-layout-update-field-group.d.ts +22 -0
  26. package/built/lib/action/editorinterface-copy.d.ts +14 -0
  27. package/built/lib/action/editorinterface-reset.d.ts +12 -0
  28. package/built/lib/action/editorinterface-save.d.ts +8 -0
  29. package/built/lib/action/editorinterface-update.d.ts +16 -0
  30. package/built/lib/action/entry-derive.d.ts +15 -0
  31. package/built/lib/action/entry-field-purge.d.ts +9 -0
  32. package/built/lib/action/entry-field-rename.d.ts +11 -0
  33. package/built/lib/action/entry-set-tags.d.ts +10 -0
  34. package/built/lib/action/entry-transform-to-type.d.ts +16 -0
  35. package/built/lib/action/entry-transform.d.ts +11 -0
  36. package/built/lib/action/entryeditor-configure.d.ts +17 -0
  37. package/built/lib/action/entryeditor-reset-to-default.d.ts +10 -0
  38. package/built/lib/action/entryeditor.d.ts +8 -0
  39. package/built/lib/action/entryeditors-configure.d.ts +21 -0
  40. package/built/lib/action/field-action.d.ts +10 -0
  41. package/built/lib/action/field-annotate.d.ts +12 -0
  42. package/built/lib/action/field-create.d.ts +7 -0
  43. package/built/lib/action/field-move.d.ts +9 -0
  44. package/built/lib/action/field-rename.d.ts +15 -0
  45. package/built/lib/action/field-update.d.ts +10 -0
  46. package/built/lib/action/sidebar-reset-to-default.d.ts +10 -0
  47. package/built/lib/action/sidebarwidget-add.d.ts +16 -0
  48. package/built/lib/action/sidebarwidget-remove.d.ts +13 -0
  49. package/built/lib/action/sidebarwidget-update.d.ts +15 -0
  50. package/built/lib/action/sidebarwidget.d.ts +13 -0
  51. package/built/lib/action/tag-create.d.ts +12 -0
  52. package/built/lib/action/tag-delete.d.ts +8 -0
  53. package/built/lib/action/tag-save.d.ts +10 -0
  54. package/built/lib/action/tag-update.d.ts +11 -0
  55. package/built/lib/entities/content-type.d.ts +90 -0
  56. package/built/lib/entities/entry.d.ts +28 -0
  57. package/built/lib/entities/link.d.ts +15 -0
  58. package/built/lib/entities/tag.d.ts +18 -0
  59. package/built/lib/errors/chunks-validation.d.ts +5 -0
  60. package/built/lib/errors/editorinterfaces-fetching.d.ts +4 -0
  61. package/built/lib/errors/index.d.ts +6 -0
  62. package/built/lib/errors/payload-validation.d.ts +5 -0
  63. package/built/lib/errors/space-access.d.ts +4 -0
  64. package/built/lib/errors/steps-validation.d.ts +5 -0
  65. package/built/lib/fetcher.d.ts +19 -0
  66. package/built/lib/intent/base-intent.d.ts +64 -0
  67. package/built/lib/intent/base-intent.js +4 -3
  68. package/built/lib/intent/base-intent.js.map +1 -1
  69. package/built/lib/intent/composed-intent.d.ts +62 -0
  70. package/built/lib/intent/content-type-annotate.d.ts +11 -0
  71. package/built/lib/intent/content-type-annotate.js +4 -0
  72. package/built/lib/intent/content-type-annotate.js.map +1 -1
  73. package/built/lib/intent/content-type-create.d.ts +10 -0
  74. package/built/lib/intent/content-type-delete.d.ts +13 -0
  75. package/built/lib/intent/content-type-update.d.ts +10 -0
  76. package/built/lib/intent/content-type-update.js +1 -0
  77. package/built/lib/intent/content-type-update.js.map +1 -1
  78. package/built/lib/intent/editor-layout/editor-layout-change-field-group-control.d.ts +15 -0
  79. package/built/lib/intent/editor-layout/editor-layout-change-field-group-id.d.ts +17 -0
  80. package/built/lib/intent/editor-layout/editor-layout-create-field-group.d.ts +15 -0
  81. package/built/lib/intent/editor-layout/editor-layout-create.d.ts +15 -0
  82. package/built/lib/intent/editor-layout/editor-layout-delete-field-group.d.ts +15 -0
  83. package/built/lib/intent/editor-layout/editor-layout-delete.d.ts +14 -0
  84. package/built/lib/intent/editor-layout/editor-layout-invalid-method.d.ts +12 -0
  85. package/built/lib/intent/editor-layout/editor-layout-move-field.d.ts +18 -0
  86. package/built/lib/intent/editor-layout/editor-layout-update-field-group.d.ts +15 -0
  87. package/built/lib/intent/editorinterface-copy.d.ts +14 -0
  88. package/built/lib/intent/editorinterface-reset.d.ts +14 -0
  89. package/built/lib/intent/editorinterface-update.d.ts +15 -0
  90. package/built/lib/intent/entry-derive.d.ts +14 -0
  91. package/built/lib/intent/entry-set-tags.d.ts +13 -0
  92. package/built/lib/intent/entry-transform-to-type.d.ts +15 -0
  93. package/built/lib/intent/entry-transform.d.ts +13 -0
  94. package/built/lib/intent/entryeditor-configure.d.ts +14 -0
  95. package/built/lib/intent/entryeditor-reset-to-default.d.ts +14 -0
  96. package/built/lib/intent/entryeditors-configure.d.ts +14 -0
  97. package/built/lib/intent/field-annotate.d.ts +10 -0
  98. package/built/lib/intent/field-create.d.ts +10 -0
  99. package/built/lib/intent/field-create.js +1 -0
  100. package/built/lib/intent/field-create.js.map +1 -1
  101. package/built/lib/intent/field-delete.d.ts +13 -0
  102. package/built/lib/intent/field-move.d.ts +13 -0
  103. package/built/lib/intent/field-move.js +1 -0
  104. package/built/lib/intent/field-move.js.map +1 -1
  105. package/built/lib/intent/field-rename.d.ts +20 -0
  106. package/built/lib/intent/field-update.d.ts +10 -0
  107. package/built/lib/intent/field-update.js +1 -0
  108. package/built/lib/intent/field-update.js.map +1 -1
  109. package/built/lib/intent/index.d.ts +38 -0
  110. package/built/lib/intent/sidebar-reset-to-default.d.ts +14 -0
  111. package/built/lib/intent/sidebarwidget-add.d.ts +15 -0
  112. package/built/lib/intent/sidebarwidget-remove.d.ts +15 -0
  113. package/built/lib/intent/sidebarwidget-update.d.ts +15 -0
  114. package/built/lib/intent/tag-create.d.ts +16 -0
  115. package/built/lib/intent/tag-delete.d.ts +15 -0
  116. package/built/lib/intent/tag-update.d.ts +14 -0
  117. package/built/lib/intent-list/index.d.ts +17 -0
  118. package/built/lib/intent-validator/content-transform.d.ts +17 -0
  119. package/built/lib/intent-validator/content-type-update.d.ts +13 -0
  120. package/built/lib/intent-validator/entry-derive.d.ts +20 -0
  121. package/built/lib/intent-validator/entry-set-tags.d.ts +15 -0
  122. package/built/lib/intent-validator/entry-transform-to-type.d.ts +19 -0
  123. package/built/lib/intent-validator/field-movement.d.ts +21 -0
  124. package/built/lib/intent-validator/field-update.d.ts +23 -0
  125. package/built/lib/intent-validator/schema-validator.d.ts +19 -0
  126. package/built/lib/intent-validator/tag-update.d.ts +11 -0
  127. package/built/lib/interfaces/annotation.d.ts +41 -0
  128. package/built/lib/interfaces/api-entry.d.ts +19 -0
  129. package/built/lib/interfaces/api-fetcher.d.ts +10 -0
  130. package/built/lib/interfaces/api-tag-link.d.ts +7 -0
  131. package/built/lib/interfaces/api-tag.d.ts +9 -0
  132. package/built/lib/interfaces/content-transform.d.ts +6 -0
  133. package/built/lib/interfaces/content-type.d.ts +95 -0
  134. package/built/lib/interfaces/entry-derive.d.ts +9 -0
  135. package/built/lib/interfaces/entry-set-tags.d.ts +6 -0
  136. package/built/lib/interfaces/entry-transform-to-type.d.ts +10 -0
  137. package/built/lib/interfaces/errors.d.ts +35 -0
  138. package/built/lib/interfaces/intent-validator.d.ts +6 -0
  139. package/built/lib/interfaces/intent.d.ts +60 -0
  140. package/built/lib/interfaces/plan-message.d.ts +10 -0
  141. package/built/lib/interfaces/raw-step.d.ts +89 -0
  142. package/built/lib/interfaces/request.d.ts +12 -0
  143. package/built/lib/migration-chunks/validation/content-type.d.ts +4 -0
  144. package/built/lib/migration-chunks/validation/duplicate-props.d.ts +3 -0
  145. package/built/lib/migration-chunks/validation/editor-layout.d.ts +5 -0
  146. package/built/lib/migration-chunks/validation/errors.d.ts +23 -0
  147. package/built/lib/migration-chunks/validation/field.d.ts +8 -0
  148. package/built/lib/migration-chunks/validation/index.d.ts +19 -0
  149. package/built/lib/migration-chunks/validation/tag.d.ts +4 -0
  150. package/built/lib/migration-parser.d.ts +16 -0
  151. package/built/lib/migration-steps/action-creators.d.ts +53 -0
  152. package/built/lib/migration-steps/action-creators.js +72 -72
  153. package/built/lib/migration-steps/action-creators.js.map +1 -1
  154. package/built/lib/migration-steps/dispatch-proxy.d.ts +6 -0
  155. package/built/lib/migration-steps/first-external-caller.d.ts +3 -0
  156. package/built/lib/migration-steps/index.d.ts +3 -0
  157. package/built/lib/offline-api/index.d.ts +80 -0
  158. package/built/lib/offline-api/validator/annotations.d.ts +9 -0
  159. package/built/lib/offline-api/validator/content-type.d.ts +13 -0
  160. package/built/lib/offline-api/validator/display-field.d.ts +9 -0
  161. package/built/lib/offline-api/validator/editor-interface.d.ts +11 -0
  162. package/built/lib/offline-api/validator/entry.d.ts +7 -0
  163. package/built/lib/offline-api/validator/errors.d.ts +48 -0
  164. package/built/lib/offline-api/validator/field-deletion.d.ts +7 -0
  165. package/built/lib/offline-api/validator/field-groups-count.d.ts +8 -0
  166. package/built/lib/offline-api/validator/schema/content-type-schema.d.ts +5 -0
  167. package/built/lib/offline-api/validator/schema/editor-layout-schema.d.ts +2 -0
  168. package/built/lib/offline-api/validator/schema/field-validations-schema.d.ts +3 -0
  169. package/built/lib/offline-api/validator/schema/fields-schema.d.ts +2 -0
  170. package/built/lib/offline-api/validator/schema/index.d.ts +10 -0
  171. package/built/lib/offline-api/validator/schema/schema-validation.d.ts +8 -0
  172. package/built/lib/offline-api/validator/schema/tag-schema.d.ts +4 -0
  173. package/built/lib/offline-api/validator/tag.d.ts +12 -0
  174. package/built/lib/offline-api/validator/tags-on-entry.d.ts +11 -0
  175. package/built/lib/offline-api/validator/type-change.d.ts +7 -0
  176. package/built/lib/utils/deprecated.d.ts +1 -0
  177. package/built/lib/utils/editor-layout.d.ts +26 -0
  178. package/built/lib/utils/is-defined.d.ts +1 -0
  179. package/built/lib/utils/should-publish-local-changes.d.ts +9 -0
  180. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- ## [4.9.4](https://github.com/contentful/contentful-migration/compare/v4.9.3...v4.9.4) (2022-07-27)
1
+ ## [4.9.5](https://github.com/contentful/contentful-migration/compare/v4.9.4...v4.9.5) (2022-09-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **annotations:** group annotate intents with ct and field updates ([#1114](https://github.com/contentful/contentful-migration/issues/1114)) ([672cd41](https://github.com/contentful/contentful-migration/commit/672cd410ab3c1c99ee851770998d5a10e0ad6bb8))
2
7
 
3
8
  # Change Log
4
9
 
@@ -0,0 +1,9 @@
1
+ import type { AxiosRequestConfig } from 'axios';
2
+ import { PlainClientAPI } from 'contentful-management';
3
+ export declare const createMakeRequest: (client: PlainClientAPI, { spaceId, environmentId }: {
4
+ spaceId: any;
5
+ environmentId: any;
6
+ }) => (requestConfig: AxiosRequestConfig) => Promise<unknown>;
7
+ export declare const runMigration: (argv: any) => Promise<any>;
8
+ declare const _default: (argv: any) => Promise<any>;
9
+ export default _default;
@@ -0,0 +1,13 @@
1
+ interface ClientConfig {
2
+ accessToken?: string;
3
+ spaceId?: string;
4
+ environmentId?: string;
5
+ proxy?: string;
6
+ rawProxy?: boolean;
7
+ requestBatchSize?: number;
8
+ headers?: Record<string, unknown>;
9
+ retryLimit?: number;
10
+ }
11
+ declare function getConfig(argv: any): ClientConfig;
12
+ export default getConfig;
13
+ export { getConfig, ClientConfig };
@@ -0,0 +1,2 @@
1
+ declare function createManagementClient(params: any): import("contentful-management").PlainClientAPI;
2
+ export { createManagementClient };
@@ -0,0 +1,19 @@
1
+ /// <reference types="node" />
2
+ import { HttpsProxyAgent } from 'https-proxy-agent';
3
+ import { RequestOptions } from 'http';
4
+ declare type ProxyAuthConfig = {
5
+ username?: string;
6
+ password?: string;
7
+ };
8
+ declare type ProxyConfig = RequestOptions | {
9
+ isHttps: boolean;
10
+ auth?: ProxyAuthConfig;
11
+ };
12
+ declare function proxyStringToObject(proxyString: string): ProxyConfig;
13
+ declare function loadProxyFromEnv(env: {
14
+ [key: string]: any;
15
+ }): ProxyConfig;
16
+ declare function agentFromProxy(proxy: any): {
17
+ httpsAgent?: HttpsProxyAgent;
18
+ };
19
+ export { loadProxyFromEnv, agentFromProxy, proxyStringToObject };
@@ -0,0 +1,5 @@
1
+ import { RequestBatch } from '../../lib/offline-api/index';
2
+ declare const renderPlan: (batches: RequestBatch[], environment: string, isQuiet?: boolean) => void;
3
+ declare const renderValidationErrors: (batches: RequestBatch[], environment: string) => void;
4
+ declare const renderRuntimeErrors: (batches: RequestBatch[], filename: string) => void;
5
+ export { renderPlan, renderValidationErrors, renderRuntimeErrors };
@@ -0,0 +1,3 @@
1
+ import ValidationError from '../../lib/interfaces/errors';
2
+ declare const renderStepsErrors: (errors: ValidationError[]) => void;
3
+ export default renderStepsErrors;
@@ -0,0 +1,2 @@
1
+ declare const writeErrorsToLog: (errors: Error | Error[], filename: string) => Promise<void>;
2
+ export default writeErrorsToLog;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ContentType, EditorInterfaces } from '../entities/content-type';
2
+ import Entry from '../entities/entry';
3
+ import Tag from '../entities/tag';
4
+ import OfflineApi from '../offline-api/index';
5
+ declare abstract class APIAction {
6
+ abstract applyTo(api: OfflineApi): Promise<void>;
7
+ }
8
+ declare abstract class EntityAction {
9
+ abstract getEntityType(): EntityType;
10
+ abstract getEntityId(): string;
11
+ abstract applyTo(entity: ContentType | Entry | EditorInterfaces | Tag): Promise<void>;
12
+ }
13
+ declare enum EntityType {
14
+ ContentType = "CONTENT_TYPE",
15
+ EditorInterface = "EDITOR_INTERFACE",
16
+ Tag = "TAG"
17
+ }
18
+ export { APIAction, EntityAction, EntityType };
@@ -0,0 +1,11 @@
1
+ import { EntityAction, EntityType } from './action';
2
+ import { AnnotationLink, ContentType } from '../entities/content-type';
3
+ declare class ContentTypeAnnotateAction extends EntityAction {
4
+ private contentTypeId;
5
+ private annotations;
6
+ constructor(contentTypeId: string, annotations?: AnnotationLink[]);
7
+ getEntityId(): string;
8
+ getEntityType(): EntityType;
9
+ applyTo(ct: ContentType): Promise<void>;
10
+ }
11
+ export { ContentTypeAnnotateAction };
@@ -0,0 +1,8 @@
1
+ import { APIAction } from './action';
2
+ import OfflineAPI from '../offline-api/index';
3
+ declare class ContentTypeCreateAction extends APIAction {
4
+ private contentTypeId;
5
+ constructor(contentTypeId: string);
6
+ applyTo(api: OfflineAPI): Promise<void>;
7
+ }
8
+ export { ContentTypeCreateAction };
@@ -0,0 +1,8 @@
1
+ import { APIAction } from './action';
2
+ import OfflineAPI from '../offline-api/index';
3
+ declare class ContentTypeDeleteAction extends APIAction {
4
+ private contentTypeId;
5
+ constructor(contentTypeId: string);
6
+ applyTo(api: OfflineAPI): Promise<void>;
7
+ }
8
+ export { ContentTypeDeleteAction };
@@ -0,0 +1,8 @@
1
+ import { APIAction } from './action';
2
+ import OfflineAPI from '../offline-api/index';
3
+ declare class ContentTypePublishAction extends APIAction {
4
+ private contentTypeId;
5
+ constructor(contentTypeId: string);
6
+ applyTo(api: OfflineAPI): Promise<void>;
7
+ }
8
+ export { ContentTypePublishAction };
@@ -0,0 +1,8 @@
1
+ import { APIAction } from './action';
2
+ import OfflineAPI from '../offline-api/index';
3
+ declare class ContentTypeSaveAction extends APIAction {
4
+ private contentTypeId;
5
+ constructor(contentTypeId: string);
6
+ applyTo(api: OfflineAPI): Promise<void>;
7
+ }
8
+ export { ContentTypeSaveAction };
@@ -0,0 +1,8 @@
1
+ import { APIAction } from './action';
2
+ import OfflineAPI from '../offline-api/index';
3
+ declare class ContentTypeUnpublishAction extends APIAction {
4
+ private contentTypeId;
5
+ constructor(contentTypeId: string);
6
+ applyTo(api: OfflineAPI): Promise<void>;
7
+ }
8
+ export { ContentTypeUnpublishAction };
@@ -0,0 +1,11 @@
1
+ import { EntityAction, EntityType } from './action';
2
+ import ContentType from '../entities/content-type';
3
+ declare class ContentTypeUpdateAction extends EntityAction {
4
+ private props;
5
+ private contentTypeId;
6
+ constructor(contentTypeId: string, props: object);
7
+ getEntityId(): string;
8
+ getEntityType(): EntityType;
9
+ applyTo(ct: ContentType): Promise<void>;
10
+ }
11
+ export { ContentTypeUpdateAction };
@@ -0,0 +1,13 @@
1
+ import { EditorInterfaces } from '../../entities/content-type';
2
+ import { EntityAction, EntityType } from '../action';
3
+ import { APIEditorInterfaceGroupControl } from '../../interfaces/content-type';
4
+ declare class EditorLayoutChangeFieldGroupControlAction extends EntityAction {
5
+ private readonly contentTypeId;
6
+ private readonly fieldGroupId;
7
+ private readonly groupControl;
8
+ constructor(contentTypeId: string, fieldGroupId: string, groupControl: Omit<APIEditorInterfaceGroupControl, 'groupId'>);
9
+ getEntityType(): EntityType;
10
+ getEntityId(): string;
11
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
12
+ }
13
+ export { EditorLayoutChangeFieldGroupControlAction };
@@ -0,0 +1,12 @@
1
+ import { EditorInterfaces } from '../../entities/content-type';
2
+ import { EntityAction, EntityType } from '../action';
3
+ declare class EditorLayoutCreateFieldGroupAction extends EntityAction {
4
+ private readonly contentTypeId;
5
+ private readonly fieldGroupId;
6
+ private readonly parentFieldGroupId;
7
+ constructor(contentTypeId: string, fieldGroupId: string, parentFieldGroupId?: string);
8
+ getEntityType(): EntityType;
9
+ getEntityId(): string;
10
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
11
+ }
12
+ export { EditorLayoutCreateFieldGroupAction };
@@ -0,0 +1,8 @@
1
+ import OfflineAPI from '../../offline-api';
2
+ import { APIAction } from '../action';
3
+ declare class EditorLayoutCreateAction extends APIAction {
4
+ private readonly contentTypeId;
5
+ constructor(contentTypeId: string);
6
+ applyTo(api: OfflineAPI): Promise<void>;
7
+ }
8
+ export { EditorLayoutCreateAction };
@@ -0,0 +1,21 @@
1
+ import { EditorInterfaces } from '../../entities/content-type';
2
+ import { EntityAction, EntityType } from '../action';
3
+ interface FieldGroupItem {
4
+ groupId: string;
5
+ name: string;
6
+ items: EditorLayoutItem[];
7
+ }
8
+ interface FieldItem {
9
+ fieldId: string;
10
+ }
11
+ declare type EditorLayoutItem = FieldItem | FieldGroupItem;
12
+ export declare type EditorLayout = EditorLayoutItem[];
13
+ declare class EditorLayoutDeleteFieldGroupAction extends EntityAction {
14
+ private readonly contentTypeId;
15
+ private readonly fieldGroupId;
16
+ constructor(contentTypeId: string, fieldGroupId: string);
17
+ getEntityType(): EntityType;
18
+ getEntityId(): string;
19
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
20
+ }
21
+ export { EditorLayoutDeleteFieldGroupAction };
@@ -0,0 +1,10 @@
1
+ import { EditorInterfaces } from '../../entities/content-type';
2
+ import { EntityAction, EntityType } from '../action';
3
+ declare class EditorLayoutDeleteAction extends EntityAction {
4
+ private readonly contentTypeId;
5
+ constructor(contentTypeId: string);
6
+ getEntityType(): EntityType;
7
+ getEntityId(): string;
8
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
9
+ }
10
+ export { EditorLayoutDeleteAction };
@@ -0,0 +1,13 @@
1
+ import { EditorInterfaces, EditorLayoutFieldMovementDirection } from '../../entities/content-type';
2
+ import { EntityAction, EntityType } from '../action';
3
+ declare class EditorLayoutMoveFieldGroupAction extends EntityAction {
4
+ private readonly contentTypeId;
5
+ private readonly fieldId;
6
+ private readonly direction;
7
+ private readonly pivot;
8
+ constructor(contentTypeId: string, fieldId: string, direction: EditorLayoutFieldMovementDirection, pivot?: string);
9
+ getEntityType(): EntityType;
10
+ getEntityId(): string;
11
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
12
+ }
13
+ export { EditorLayoutMoveFieldGroupAction };
@@ -0,0 +1,22 @@
1
+ import { EditorInterfaces } from '../../entities/content-type';
2
+ import { EntityAction, EntityType } from '../action';
3
+ import { APIEditorLayoutFieldGroupItem } from '../../interfaces/content-type';
4
+ declare class EditorLayoutUpdateFieldGroupAction extends EntityAction {
5
+ private readonly contentTypeId;
6
+ private readonly fieldGroupId;
7
+ protected props: Pick<APIEditorLayoutFieldGroupItem, 'name'>;
8
+ constructor(contentTypeId: string, fieldGroupId: string, props: Pick<APIEditorLayoutFieldGroupItem, 'name'>);
9
+ getEntityType(): EntityType;
10
+ getEntityId(): string;
11
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
12
+ }
13
+ declare class EditorLayoutChangeFieldGroupIdAction extends EntityAction {
14
+ private readonly contentTypeId;
15
+ private readonly fieldGroupId;
16
+ private readonly newFieldGroupId;
17
+ constructor(contentTypeId: string, fieldGroupId: string, newFieldGroupId: string);
18
+ getEntityType(): EntityType;
19
+ getEntityId(): string;
20
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
21
+ }
22
+ export { EditorLayoutUpdateFieldGroupAction, EditorLayoutChangeFieldGroupIdAction };
@@ -0,0 +1,14 @@
1
+ import { EditorInterfaces } from '../entities/content-type';
2
+ import { EntityAction, EntityType } from './action';
3
+ declare class CopyEditorInterfaceAction extends EntityAction {
4
+ protected contentTypeId: string;
5
+ protected sourceFieldId: string;
6
+ protected destinationFieldId: string;
7
+ constructor(contentTypeId: string, sourceFieldId: string, destinationFieldId: string);
8
+ getEntityType(): EntityType;
9
+ getEntityId(): string;
10
+ getSourceFieldId(): string;
11
+ getDestinationFieldId(): string;
12
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
13
+ }
14
+ export { CopyEditorInterfaceAction };
@@ -0,0 +1,12 @@
1
+ import { EditorInterfaces } from '../entities/content-type';
2
+ import { EntityAction, EntityType } from './action';
3
+ declare class ResetEditorInterfaceAction extends EntityAction {
4
+ protected contentTypeId: string;
5
+ protected fieldId: string;
6
+ constructor(contentTypeId: string, fieldId: string);
7
+ getEntityType(): EntityType;
8
+ getEntityId(): string;
9
+ getFieldId(): string;
10
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
11
+ }
12
+ export { ResetEditorInterfaceAction };
@@ -0,0 +1,8 @@
1
+ import { APIAction } from './action';
2
+ import { OfflineAPI } from '../offline-api/index';
3
+ declare class SaveEditorInterfaceAction extends APIAction {
4
+ protected contentTypeId: string;
5
+ constructor(contentTypeId: string);
6
+ applyTo(api: OfflineAPI): Promise<void>;
7
+ }
8
+ export { SaveEditorInterfaceAction };
@@ -0,0 +1,16 @@
1
+ import { EditorInterfaces } from '../entities/content-type';
2
+ import { APIControlWidgetNamespace, APIEditorInterfaceSettings } from '../interfaces/content-type';
3
+ import { EntityAction, EntityType } from './action';
4
+ declare class UpdateEditorInterfaceAction extends EntityAction {
5
+ protected contentTypeId: string;
6
+ protected fieldId: string;
7
+ private _widgetId;
8
+ private _settings?;
9
+ private _widgetNamespace;
10
+ constructor(contentTypeId: string, fieldId: string, widgetId: string, settings?: APIEditorInterfaceSettings, widgetNamespace?: APIControlWidgetNamespace);
11
+ getEntityType(): EntityType;
12
+ getEntityId(): string;
13
+ getFieldId(): string;
14
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
15
+ }
16
+ export { UpdateEditorInterfaceAction };
@@ -0,0 +1,15 @@
1
+ import EntryDerive from '../interfaces/entry-derive';
2
+ import { APIAction } from './action';
3
+ import { OfflineAPI } from '../offline-api';
4
+ declare class EntryDeriveAction extends APIAction {
5
+ private contentTypeId;
6
+ private fromFields;
7
+ private referenceField;
8
+ private derivedContentType;
9
+ private deriveEntryForLocale;
10
+ private identityKey;
11
+ private shouldPublish;
12
+ constructor(contentTypeId: string, entryDerivation: EntryDerive);
13
+ applyTo(api: OfflineAPI): Promise<void>;
14
+ }
15
+ export { EntryDeriveAction };
@@ -0,0 +1,9 @@
1
+ import { APIAction } from './action';
2
+ import OfflineAPI from '../offline-api/index';
3
+ declare class EntryFieldPurgeAction extends APIAction {
4
+ private contentTypeId;
5
+ private fieldId;
6
+ constructor(contentTypeId: string, fieldId: string);
7
+ applyTo(api: OfflineAPI): Promise<void>;
8
+ }
9
+ export { EntryFieldPurgeAction };
@@ -0,0 +1,11 @@
1
+ import { APIAction } from './action';
2
+ import OfflineAPI from '../offline-api/index';
3
+ import { FieldRenameProps } from './field-rename';
4
+ declare class EntryFieldRenameAction extends APIAction {
5
+ private contentTypeId;
6
+ private fieldId;
7
+ private props;
8
+ constructor(contentTypeId: string, fieldId: string, props: FieldRenameProps);
9
+ applyTo(api: OfflineAPI): Promise<void>;
10
+ }
11
+ export { EntryFieldRenameAction };
@@ -0,0 +1,10 @@
1
+ import { APIAction } from './action';
2
+ import { OfflineAPI } from '../offline-api';
3
+ declare class EntrySetTagsAction extends APIAction {
4
+ private contentTypeId;
5
+ private fields;
6
+ private setTagsForEntry;
7
+ constructor(contentTypeId: string, fields: string[], entryTransformationForTags: Function);
8
+ applyTo(api: OfflineAPI): Promise<void>;
9
+ }
10
+ export { EntrySetTagsAction };
@@ -0,0 +1,16 @@
1
+ import EntryTransformToType from '../interfaces/entry-transform-to-type';
2
+ import { APIAction } from './action';
3
+ import { OfflineAPI } from '../offline-api';
4
+ declare class EntryTransformToTypeAction extends APIAction {
5
+ private fromFields?;
6
+ private sourceContentTypeId;
7
+ private targetContentTypeId;
8
+ private transformEntryForLocale;
9
+ private identityKey;
10
+ private shouldPublish;
11
+ private removeOldEntries;
12
+ private updateReferences;
13
+ constructor(entryTransformation: EntryTransformToType);
14
+ applyTo(api: OfflineAPI): Promise<void>;
15
+ }
16
+ export { EntryTransformToTypeAction };
@@ -0,0 +1,11 @@
1
+ import { APIAction } from './action';
2
+ import { OfflineAPI } from '../offline-api';
3
+ declare class EntryTransformAction extends APIAction {
4
+ private contentTypeId;
5
+ private fromFields;
6
+ private transformEntryForLocale;
7
+ private shouldPublish;
8
+ constructor(contentTypeId: string, fromFields: string[], transformation: Function, shouldPublish?: boolean | 'preserve');
9
+ applyTo(api: OfflineAPI): Promise<void>;
10
+ }
11
+ export { EntryTransformAction };
@@ -0,0 +1,17 @@
1
+ import { EditorInterfaces } from '../entities/content-type';
2
+ import { EntityAction, EntityType } from './action';
3
+ export declare type EntryEditorNamespace = 'extension' | 'app';
4
+ export interface EntryEditorSettings {
5
+ [key: string]: any;
6
+ }
7
+ declare class EntryEditorConfigureAction extends EntityAction {
8
+ protected contentTypeId: string;
9
+ protected widgetId: string;
10
+ protected widgetNamespace?: EntryEditorNamespace;
11
+ protected settings?: EntryEditorSettings;
12
+ constructor(contentTypeId: string, widgetNamespace: EntryEditorNamespace, widgetId: string, settings: EntryEditorSettings);
13
+ getEntityType(): EntityType;
14
+ getEntityId(): string;
15
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
16
+ }
17
+ export { EntryEditorConfigureAction };
@@ -0,0 +1,10 @@
1
+ import { EditorInterfaces } from '../entities/content-type';
2
+ import { EntityAction, EntityType } from './action';
3
+ declare class EntryEditorResetToDefaultAction extends EntityAction {
4
+ protected contentTypeId: string;
5
+ constructor(contentTypeId: string);
6
+ getEntityType(): EntityType;
7
+ getEntityId(): string;
8
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
9
+ }
10
+ export { EntryEditorResetToDefaultAction };
@@ -0,0 +1,8 @@
1
+ export interface EntryEditor {
2
+ Id: string;
3
+ Namespace?: EntryEditorNamespace;
4
+ }
5
+ export interface EntryEditorSettings {
6
+ [key: string]: any;
7
+ }
8
+ export declare type EntryEditorNamespace = 'extension' | 'app';
@@ -0,0 +1,21 @@
1
+ import { EditorInterfaces } from '../entities/content-type';
2
+ import { EntityAction, EntityType } from './action';
3
+ export declare type EntryEditorNamespace = 'extension' | 'app';
4
+ export interface EntryEditorSettings {
5
+ [key: string]: any;
6
+ }
7
+ export interface EntryEditor {
8
+ widgetNamespace: EntryEditorNamespace;
9
+ widgetId: string;
10
+ settings?: EntryEditorSettings;
11
+ disabled?: boolean;
12
+ }
13
+ declare class EntryEditorsConfigureAction extends EntityAction {
14
+ protected contentTypeId: string;
15
+ protected editors: EntryEditor[];
16
+ constructor(contentTypeId: string, editors: EntryEditor[]);
17
+ getEntityType(): EntityType;
18
+ getEntityId(): string;
19
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
20
+ }
21
+ export { EntryEditorsConfigureAction };
@@ -0,0 +1,10 @@
1
+ import { EntityAction, EntityType } from './action';
2
+ declare abstract class FieldAction extends EntityAction {
3
+ protected contentTypeId: string;
4
+ protected fieldId: string;
5
+ constructor(contentTypeId: string, fieldId: string);
6
+ getEntityType(): EntityType;
7
+ getEntityId(): string;
8
+ getFieldId(): string;
9
+ }
10
+ export { FieldAction as default, FieldAction };
@@ -0,0 +1,12 @@
1
+ import { EntityAction, EntityType } from './action';
2
+ import { AnnotationLink, ContentType } from '../entities/content-type';
3
+ declare class FieldAnnotateAction extends EntityAction {
4
+ private contentTypeId;
5
+ private fieldId;
6
+ private annotations;
7
+ constructor(contentTypeId: string, fieldId: string, annotations?: AnnotationLink[]);
8
+ getEntityId(): string;
9
+ getEntityType(): EntityType;
10
+ applyTo(ct: ContentType): Promise<void>;
11
+ }
12
+ export { FieldAnnotateAction };
@@ -0,0 +1,7 @@
1
+ import { FieldAction } from '../action/field-action';
2
+ import { ContentType } from '../entities/content-type';
3
+ declare class FieldCreateAction extends FieldAction {
4
+ constructor(contentTypeId: string, fieldId: string);
5
+ applyTo(ct: ContentType): Promise<void>;
6
+ }
7
+ export { FieldCreateAction };
@@ -0,0 +1,9 @@
1
+ import { FieldAction } from '../action/field-action';
2
+ import ContentType from '../entities/content-type';
3
+ declare class FieldMoveAction extends FieldAction {
4
+ private direction;
5
+ private pivot;
6
+ constructor(contentTypeId: string, fieldId: string, direction: string, pivot: string);
7
+ applyTo(ct: ContentType): Promise<void>;
8
+ }
9
+ export { FieldMoveAction };
@@ -0,0 +1,15 @@
1
+ import { EntityAction, EntityType } from './action';
2
+ import ContentType from '../entities/content-type';
3
+ interface FieldRenameProps {
4
+ newId: string;
5
+ }
6
+ declare class FieldRenameAction extends EntityAction {
7
+ private props;
8
+ private contentTypeId;
9
+ private fieldId;
10
+ constructor(contentTypeId: string, fieldId: string, props: FieldRenameProps);
11
+ getEntityId(): string;
12
+ getEntityType(): EntityType;
13
+ applyTo(ct: ContentType): Promise<void>;
14
+ }
15
+ export { FieldRenameAction, FieldRenameProps };
@@ -0,0 +1,10 @@
1
+ import { FieldAction } from '../action/field-action';
2
+ import ContentType from '../entities/content-type';
3
+ declare class FieldUpdateAction extends FieldAction {
4
+ protected props: {
5
+ newId?: string;
6
+ };
7
+ constructor(contentTypeId: string, fieldId: string, props: object);
8
+ applyTo(ct: ContentType): Promise<void>;
9
+ }
10
+ export { FieldUpdateAction };
@@ -0,0 +1,10 @@
1
+ import { EditorInterfaces } from '../entities/content-type';
2
+ import { EntityAction, EntityType } from './action';
3
+ declare class SidebarResetToDefaultAction extends EntityAction {
4
+ protected contentTypeId: string;
5
+ constructor(contentTypeId: string);
6
+ getEntityType(): EntityType;
7
+ getEntityId(): string;
8
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
9
+ }
10
+ export { SidebarResetToDefaultAction };
@@ -0,0 +1,16 @@
1
+ import { EditorInterfaces } from '../entities/content-type';
2
+ import { EntityAction, EntityType } from './action';
3
+ import { SidebarWidgetNamespace, SidebarWidgetSettings } from './sidebarwidget';
4
+ declare class SidebarWidgetAddAction extends EntityAction {
5
+ protected contentTypeId: string;
6
+ protected widgetId: string;
7
+ protected widgetNamespace: SidebarWidgetNamespace;
8
+ protected settings: SidebarWidgetSettings;
9
+ protected disabled: boolean;
10
+ protected insertBeforeWidgetId: string;
11
+ constructor(contentTypeId: string, widgetId: string, widgetNamespace: SidebarWidgetNamespace, insertBeforeWidgetId?: string, settings?: SidebarWidgetSettings, disabled?: boolean);
12
+ getEntityType(): EntityType;
13
+ getEntityId(): string;
14
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
15
+ }
16
+ export { SidebarWidgetAddAction };
@@ -0,0 +1,13 @@
1
+ import { EditorInterfaces } from '../entities/content-type';
2
+ import { EntityAction, EntityType } from './action';
3
+ import { SidebarWidgetNamespace } from './sidebarwidget';
4
+ declare class SidebarWidgetRemoveAction extends EntityAction {
5
+ protected contentTypeId: string;
6
+ protected widgetId: string;
7
+ protected widgetNamespace: SidebarWidgetNamespace;
8
+ constructor(contentTypeId: string, widgetId: string, widgetNamespace: SidebarWidgetNamespace);
9
+ getEntityType(): EntityType;
10
+ getEntityId(): string;
11
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
12
+ }
13
+ export { SidebarWidgetRemoveAction };
@@ -0,0 +1,15 @@
1
+ import { EditorInterfaces } from '../entities/content-type';
2
+ import { EntityAction, EntityType } from './action';
3
+ import { SidebarWidgetNamespace, SidebarWidgetSettings } from './sidebarwidget';
4
+ declare class SidebarWidgetUpdateAction extends EntityAction {
5
+ protected contentTypeId: string;
6
+ protected widgetId: string;
7
+ protected widgetNamespace: SidebarWidgetNamespace;
8
+ protected settings: SidebarWidgetSettings;
9
+ protected disabled: boolean;
10
+ constructor(contentTypeId: string, widgetId: string, widgetNamespace: SidebarWidgetNamespace, settings?: SidebarWidgetSettings, disabled?: boolean);
11
+ getEntityType(): EntityType;
12
+ getEntityId(): string;
13
+ applyTo(editorInterfaces: EditorInterfaces): Promise<void>;
14
+ }
15
+ export { SidebarWidgetUpdateAction };