contentful-migration 4.9.5 → 4.9.6

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 (166) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/package.json +1 -1
  3. package/built/bin/cli.d.ts +0 -9
  4. package/built/bin/lib/config.d.ts +0 -13
  5. package/built/bin/lib/contentful-client/index.d.ts +0 -2
  6. package/built/bin/lib/contentful-client/proxy.d.ts +0 -19
  7. package/built/bin/lib/render-migration.d.ts +0 -5
  8. package/built/bin/lib/steps-errors.d.ts +0 -3
  9. package/built/bin/lib/write-errors-to-log.d.ts +0 -2
  10. package/built/bin/usage-params.d.ts +0 -2
  11. package/built/index.d.ts +0 -1
  12. package/built/lib/action/action.d.ts +0 -18
  13. package/built/lib/action/content-type-annotate.d.ts +0 -11
  14. package/built/lib/action/content-type-create.d.ts +0 -8
  15. package/built/lib/action/content-type-delete.d.ts +0 -8
  16. package/built/lib/action/content-type-publish.d.ts +0 -8
  17. package/built/lib/action/content-type-save.d.ts +0 -8
  18. package/built/lib/action/content-type-unpublish.d.ts +0 -8
  19. package/built/lib/action/content-type-update.d.ts +0 -11
  20. package/built/lib/action/editor-layout/editor-layout-change-field-group-control.d.ts +0 -13
  21. package/built/lib/action/editor-layout/editor-layout-create-field-group.d.ts +0 -12
  22. package/built/lib/action/editor-layout/editor-layout-create.d.ts +0 -8
  23. package/built/lib/action/editor-layout/editor-layout-delete-field-group.d.ts +0 -21
  24. package/built/lib/action/editor-layout/editor-layout-delete.d.ts +0 -10
  25. package/built/lib/action/editor-layout/editor-layout-move-field.d.ts +0 -13
  26. package/built/lib/action/editor-layout/editor-layout-update-field-group.d.ts +0 -22
  27. package/built/lib/action/editorinterface-copy.d.ts +0 -14
  28. package/built/lib/action/editorinterface-reset.d.ts +0 -12
  29. package/built/lib/action/editorinterface-save.d.ts +0 -8
  30. package/built/lib/action/editorinterface-update.d.ts +0 -16
  31. package/built/lib/action/entry-derive.d.ts +0 -15
  32. package/built/lib/action/entry-field-purge.d.ts +0 -9
  33. package/built/lib/action/entry-field-rename.d.ts +0 -11
  34. package/built/lib/action/entry-set-tags.d.ts +0 -10
  35. package/built/lib/action/entry-transform-to-type.d.ts +0 -16
  36. package/built/lib/action/entry-transform.d.ts +0 -11
  37. package/built/lib/action/entryeditor-configure.d.ts +0 -17
  38. package/built/lib/action/entryeditor-reset-to-default.d.ts +0 -10
  39. package/built/lib/action/entryeditor.d.ts +0 -8
  40. package/built/lib/action/entryeditors-configure.d.ts +0 -21
  41. package/built/lib/action/field-action.d.ts +0 -10
  42. package/built/lib/action/field-annotate.d.ts +0 -12
  43. package/built/lib/action/field-create.d.ts +0 -7
  44. package/built/lib/action/field-move.d.ts +0 -9
  45. package/built/lib/action/field-rename.d.ts +0 -15
  46. package/built/lib/action/field-update.d.ts +0 -10
  47. package/built/lib/action/sidebar-reset-to-default.d.ts +0 -10
  48. package/built/lib/action/sidebarwidget-add.d.ts +0 -16
  49. package/built/lib/action/sidebarwidget-remove.d.ts +0 -13
  50. package/built/lib/action/sidebarwidget-update.d.ts +0 -15
  51. package/built/lib/action/sidebarwidget.d.ts +0 -13
  52. package/built/lib/action/tag-create.d.ts +0 -12
  53. package/built/lib/action/tag-delete.d.ts +0 -8
  54. package/built/lib/action/tag-save.d.ts +0 -10
  55. package/built/lib/action/tag-update.d.ts +0 -11
  56. package/built/lib/entities/content-type.d.ts +0 -90
  57. package/built/lib/entities/entry.d.ts +0 -28
  58. package/built/lib/entities/link.d.ts +0 -15
  59. package/built/lib/entities/tag.d.ts +0 -18
  60. package/built/lib/errors/chunks-validation.d.ts +0 -5
  61. package/built/lib/errors/editorinterfaces-fetching.d.ts +0 -4
  62. package/built/lib/errors/index.d.ts +0 -6
  63. package/built/lib/errors/payload-validation.d.ts +0 -5
  64. package/built/lib/errors/space-access.d.ts +0 -4
  65. package/built/lib/errors/steps-validation.d.ts +0 -5
  66. package/built/lib/fetcher.d.ts +0 -19
  67. package/built/lib/intent/base-intent.d.ts +0 -64
  68. package/built/lib/intent/composed-intent.d.ts +0 -62
  69. package/built/lib/intent/content-type-annotate.d.ts +0 -11
  70. package/built/lib/intent/content-type-create.d.ts +0 -10
  71. package/built/lib/intent/content-type-delete.d.ts +0 -13
  72. package/built/lib/intent/content-type-update.d.ts +0 -10
  73. package/built/lib/intent/editor-layout/editor-layout-change-field-group-control.d.ts +0 -15
  74. package/built/lib/intent/editor-layout/editor-layout-change-field-group-id.d.ts +0 -17
  75. package/built/lib/intent/editor-layout/editor-layout-create-field-group.d.ts +0 -15
  76. package/built/lib/intent/editor-layout/editor-layout-create.d.ts +0 -15
  77. package/built/lib/intent/editor-layout/editor-layout-delete-field-group.d.ts +0 -15
  78. package/built/lib/intent/editor-layout/editor-layout-delete.d.ts +0 -14
  79. package/built/lib/intent/editor-layout/editor-layout-invalid-method.d.ts +0 -12
  80. package/built/lib/intent/editor-layout/editor-layout-move-field.d.ts +0 -18
  81. package/built/lib/intent/editor-layout/editor-layout-update-field-group.d.ts +0 -15
  82. package/built/lib/intent/editorinterface-copy.d.ts +0 -14
  83. package/built/lib/intent/editorinterface-reset.d.ts +0 -14
  84. package/built/lib/intent/editorinterface-update.d.ts +0 -15
  85. package/built/lib/intent/entry-derive.d.ts +0 -14
  86. package/built/lib/intent/entry-set-tags.d.ts +0 -13
  87. package/built/lib/intent/entry-transform-to-type.d.ts +0 -15
  88. package/built/lib/intent/entry-transform.d.ts +0 -13
  89. package/built/lib/intent/entryeditor-configure.d.ts +0 -14
  90. package/built/lib/intent/entryeditor-reset-to-default.d.ts +0 -14
  91. package/built/lib/intent/entryeditors-configure.d.ts +0 -14
  92. package/built/lib/intent/field-annotate.d.ts +0 -10
  93. package/built/lib/intent/field-create.d.ts +0 -10
  94. package/built/lib/intent/field-delete.d.ts +0 -13
  95. package/built/lib/intent/field-move.d.ts +0 -13
  96. package/built/lib/intent/field-rename.d.ts +0 -20
  97. package/built/lib/intent/field-update.d.ts +0 -10
  98. package/built/lib/intent/index.d.ts +0 -38
  99. package/built/lib/intent/sidebar-reset-to-default.d.ts +0 -14
  100. package/built/lib/intent/sidebarwidget-add.d.ts +0 -15
  101. package/built/lib/intent/sidebarwidget-remove.d.ts +0 -15
  102. package/built/lib/intent/sidebarwidget-update.d.ts +0 -15
  103. package/built/lib/intent/tag-create.d.ts +0 -16
  104. package/built/lib/intent/tag-delete.d.ts +0 -15
  105. package/built/lib/intent/tag-update.d.ts +0 -14
  106. package/built/lib/intent-list/index.d.ts +0 -17
  107. package/built/lib/intent-validator/content-transform.d.ts +0 -17
  108. package/built/lib/intent-validator/content-type-update.d.ts +0 -13
  109. package/built/lib/intent-validator/entry-derive.d.ts +0 -20
  110. package/built/lib/intent-validator/entry-set-tags.d.ts +0 -15
  111. package/built/lib/intent-validator/entry-transform-to-type.d.ts +0 -19
  112. package/built/lib/intent-validator/field-movement.d.ts +0 -21
  113. package/built/lib/intent-validator/field-update.d.ts +0 -23
  114. package/built/lib/intent-validator/schema-validator.d.ts +0 -19
  115. package/built/lib/intent-validator/tag-update.d.ts +0 -11
  116. package/built/lib/interfaces/annotation.d.ts +0 -41
  117. package/built/lib/interfaces/api-entry.d.ts +0 -19
  118. package/built/lib/interfaces/api-fetcher.d.ts +0 -10
  119. package/built/lib/interfaces/api-tag-link.d.ts +0 -7
  120. package/built/lib/interfaces/api-tag.d.ts +0 -9
  121. package/built/lib/interfaces/content-transform.d.ts +0 -6
  122. package/built/lib/interfaces/content-type.d.ts +0 -95
  123. package/built/lib/interfaces/entry-derive.d.ts +0 -9
  124. package/built/lib/interfaces/entry-set-tags.d.ts +0 -6
  125. package/built/lib/interfaces/entry-transform-to-type.d.ts +0 -10
  126. package/built/lib/interfaces/errors.d.ts +0 -35
  127. package/built/lib/interfaces/intent-validator.d.ts +0 -6
  128. package/built/lib/interfaces/intent.d.ts +0 -60
  129. package/built/lib/interfaces/plan-message.d.ts +0 -10
  130. package/built/lib/interfaces/raw-step.d.ts +0 -89
  131. package/built/lib/interfaces/request.d.ts +0 -12
  132. package/built/lib/migration-chunks/validation/content-type.d.ts +0 -4
  133. package/built/lib/migration-chunks/validation/duplicate-props.d.ts +0 -3
  134. package/built/lib/migration-chunks/validation/editor-layout.d.ts +0 -5
  135. package/built/lib/migration-chunks/validation/errors.d.ts +0 -23
  136. package/built/lib/migration-chunks/validation/field.d.ts +0 -8
  137. package/built/lib/migration-chunks/validation/index.d.ts +0 -19
  138. package/built/lib/migration-chunks/validation/tag.d.ts +0 -4
  139. package/built/lib/migration-parser.d.ts +0 -16
  140. package/built/lib/migration-steps/action-creators.d.ts +0 -53
  141. package/built/lib/migration-steps/dispatch-proxy.d.ts +0 -6
  142. package/built/lib/migration-steps/first-external-caller.d.ts +0 -3
  143. package/built/lib/migration-steps/index.d.ts +0 -3
  144. package/built/lib/offline-api/index.d.ts +0 -80
  145. package/built/lib/offline-api/validator/annotations.d.ts +0 -9
  146. package/built/lib/offline-api/validator/content-type.d.ts +0 -13
  147. package/built/lib/offline-api/validator/display-field.d.ts +0 -9
  148. package/built/lib/offline-api/validator/editor-interface.d.ts +0 -11
  149. package/built/lib/offline-api/validator/entry.d.ts +0 -7
  150. package/built/lib/offline-api/validator/errors.d.ts +0 -48
  151. package/built/lib/offline-api/validator/field-deletion.d.ts +0 -7
  152. package/built/lib/offline-api/validator/field-groups-count.d.ts +0 -8
  153. package/built/lib/offline-api/validator/schema/content-type-schema.d.ts +0 -5
  154. package/built/lib/offline-api/validator/schema/editor-layout-schema.d.ts +0 -2
  155. package/built/lib/offline-api/validator/schema/field-validations-schema.d.ts +0 -3
  156. package/built/lib/offline-api/validator/schema/fields-schema.d.ts +0 -2
  157. package/built/lib/offline-api/validator/schema/index.d.ts +0 -10
  158. package/built/lib/offline-api/validator/schema/schema-validation.d.ts +0 -8
  159. package/built/lib/offline-api/validator/schema/tag-schema.d.ts +0 -4
  160. package/built/lib/offline-api/validator/tag.d.ts +0 -12
  161. package/built/lib/offline-api/validator/tags-on-entry.d.ts +0 -11
  162. package/built/lib/offline-api/validator/type-change.d.ts +0 -7
  163. package/built/lib/utils/deprecated.d.ts +0 -1
  164. package/built/lib/utils/editor-layout.d.ts +0 -26
  165. package/built/lib/utils/is-defined.d.ts +0 -1
  166. package/built/lib/utils/should-publish-local-changes.d.ts +0 -9
@@ -1,9 +0,0 @@
1
- import { ApiHook } from '../';
2
- import { ContentTypePayloadValidator } from './content-type';
3
- import { InvalidActionError } from '../../interfaces/errors';
4
- export default class DisplayFieldValidator implements ContentTypePayloadValidator {
5
- hooks: ApiHook[];
6
- validate({ contentType }: {
7
- contentType: any;
8
- }): InvalidActionError[];
9
- }
@@ -1,11 +0,0 @@
1
- import { ApiHook } from '..';
2
- import { EditorInterfaces } from '../../entities/content-type';
3
- import { PayloadValidationError, InvalidActionError } from '../../interfaces/errors';
4
- export interface EditorInterfacePayloadValidator {
5
- hooks: ApiHook[];
6
- validate(editorInterface: EditorInterfaces): (InvalidActionError | PayloadValidationError)[];
7
- }
8
- export declare class EditorInterfaceSchemaValidator implements EditorInterfacePayloadValidator {
9
- hooks: ApiHook[];
10
- validate(editorInterface: EditorInterfaces): PayloadValidationError[];
11
- }
@@ -1,7 +0,0 @@
1
- import { ApiHook } from '../';
2
- import { Entry } from '../../entities/entry';
3
- import { PayloadValidationError, InvalidActionError } from '../../interfaces/errors';
4
- export interface EntryValidator {
5
- hooks: ApiHook[];
6
- validate(entry: Entry): (InvalidActionError | PayloadValidationError)[];
7
- }
@@ -1,48 +0,0 @@
1
- declare const errors: {
2
- contentType: {
3
- REQUIRED_PROPERTY: (path: any) => string;
4
- TOO_MANY_FIELDS: (id: any, maxFields: any) => string;
5
- NON_EXISTENT_DISPLAY_FIELD: (displayField: any, ctId: any) => string;
6
- DELETE_DISPLAY_FIELD: (displayField: any, ctId: any) => string;
7
- };
8
- field: {
9
- REQUIRED_DEPENDENT_PROPERTY: (prop: any, id: any, dependentProp: any, dependentValue: any) => string;
10
- REQUIRED_PROPERTY: (prop: any, id: any) => string;
11
- FORBIDDEN_DEPENDENT_PROPERTY: (prop: any, id: any, dependentProp: any, dependentValue: any) => string;
12
- FORBIDDEN_PROPERTY: (prop: any, id: any) => string;
13
- PROPERTY_MUST_BE_ONE_OF: (prop: any, id: any, validOptions: any) => string;
14
- NO_DELETE_WITHOUT_OMIT: (fieldId: any, ctId: any) => string;
15
- NO_TYPE_CHANGE: (fieldId: any, ctId: any, parentFieldType: any, fieldType: any) => string;
16
- ID_MUST_MATCH_SCHEMA: (fieldId: any, newId: any) => string;
17
- ID_MUST_BE_DIFFERENT: (fieldId: any) => string;
18
- validations: {
19
- DUPLICATED_VALIDATION: (duplicatedValue: any) => string;
20
- INVALID_VALIDATION_PROPERTY: (propName: any) => string;
21
- INVALID_VALIDATION_PROPERTY_COMBINATION: (keys: any) => string;
22
- INVALID_VALIDATION_PARAMETER: (propName: any, expectedType: any, actualType: any) => string;
23
- };
24
- defaultValue: {
25
- TYPE_MISMATCH: (fieldId: any, valueType: any, locale: any, fieldType: any) => string;
26
- DATE_TYPE_MISMATCH: (fieldId: any, valueType: any, value: any, locale: any, fieldType: any) => string;
27
- INVALID_LOCALE: (fieldId: any, locale: any) => string;
28
- UNSUPPORTED_FIELD_TYPE: (fieldId: any, key: any, fieldType: any) => string;
29
- UNSUPPORTED_ARRAY_ITEMS_TYPE: (fieldId: any, key: any, itemsType: any) => string;
30
- };
31
- };
32
- editorLayout: {
33
- TOO_MANY_TABS: () => string;
34
- TAB_CONTROL_INVALID: (groupId: any) => string;
35
- FIELD_SET_CONTROL_INVALID: (groupId: any) => string;
36
- FIELD_GROUP_LEVEL_TOO_DEEP: () => string;
37
- TOO_FEW_FIELD_GROUPS: () => string;
38
- TOO_MANY_FIELD_SETS: () => string;
39
- };
40
- entry: {
41
- REQUIRED_PROPERTY: (path: any) => string;
42
- TAGS_DO_NOT_EXIST: (entryId: any) => string;
43
- };
44
- tag: {
45
- REQUIRED_PROPERTY: (path: any) => string;
46
- };
47
- };
48
- export default errors;
@@ -1,7 +0,0 @@
1
- import { ApiHook } from '../';
2
- import { ContentTypePayloadValidator, ContentTypePayloadValidatorOptions } from './content-type';
3
- import { PayloadValidationError, InvalidActionError } from '../../interfaces/errors';
4
- export default class FieldDeletionValidator implements ContentTypePayloadValidator {
5
- hooks: ApiHook[];
6
- validate({ contentType, publishedContentType }: ContentTypePayloadValidatorOptions): (PayloadValidationError | InvalidActionError)[];
7
- }
@@ -1,8 +0,0 @@
1
- import { ApiHook } from '..';
2
- import { EditorInterfacePayloadValidator } from './editor-interface';
3
- import { EditorInterfaces } from '../../entities/content-type';
4
- import { PayloadValidationError } from '../../interfaces/errors';
5
- export default class FieldGroupsCountValidator implements EditorInterfacePayloadValidator {
6
- hooks: ApiHook[];
7
- validate(editorInterface: EditorInterfaces): PayloadValidationError[];
8
- }
@@ -1,5 +0,0 @@
1
- import * as Joi from 'joi';
2
- declare const MAX_FIELDS = 50;
3
- declare const contentTypeSchema: Joi.ObjectSchema<any>;
4
- export default contentTypeSchema;
5
- export { MAX_FIELDS, contentTypeSchema };
@@ -1,2 +0,0 @@
1
- import * as Joi from 'joi';
2
- export declare function createEditorLayoutSchema(tabsIds: string[]): Joi.ArraySchema;
@@ -1,3 +0,0 @@
1
- import * as Joi from 'joi';
2
- declare const fieldValidations: Joi.AlternativesSchema;
3
- export default fieldValidations;
@@ -1,2 +0,0 @@
1
- import * as Joi from 'joi';
2
- export declare function createFieldsSchema(locales: string[]): Joi.ArraySchema;
@@ -1,10 +0,0 @@
1
- import { ApiHook } from '../../index';
2
- import { ContentTypePayloadValidator } from '../content-type';
3
- import { PayloadValidationError } from '../../../interfaces/errors';
4
- export default class SchemaValidator implements ContentTypePayloadValidator {
5
- hooks: ApiHook[];
6
- validate({ contentType, locales }: {
7
- contentType: any;
8
- locales: any;
9
- }): PayloadValidationError[];
10
- }
@@ -1,8 +0,0 @@
1
- import { PayloadValidationError } from '../../../interfaces/errors';
2
- import { ContentType, EditorInterfaces } from '../../../entities/content-type';
3
- import { Tag } from '../../../entities/tag';
4
- declare const validateContentType: (contentType: ContentType) => PayloadValidationError[];
5
- declare const validateEditorInterface: (editorInterface: EditorInterfaces) => PayloadValidationError[];
6
- declare const validateTag: (tag: Tag) => PayloadValidationError[];
7
- declare const validateFields: (contentType: ContentType, locales: string[]) => PayloadValidationError[];
8
- export { validateContentType, validateEditorInterface, validateFields, validateTag };
@@ -1,4 +0,0 @@
1
- import * as Joi from 'joi';
2
- declare const tagSchema: Joi.ObjectSchema<any>;
3
- export default tagSchema;
4
- export { tagSchema };
@@ -1,12 +0,0 @@
1
- import { ApiHook } from '../';
2
- import { Tag } from '../../entities/tag';
3
- import { PayloadValidationError, InvalidActionError } from '../../interfaces/errors';
4
- interface TagPayloadValidator {
5
- hooks: ApiHook[];
6
- validate(tag: Tag, savedTag?: Tag): (InvalidActionError | PayloadValidationError)[];
7
- }
8
- export declare class TagSchemaValidator implements TagPayloadValidator {
9
- hooks: ApiHook[];
10
- validate(tag: Tag): PayloadValidationError[];
11
- }
12
- export {};
@@ -1,11 +0,0 @@
1
- import { ApiHook } from '../';
2
- import { EntryValidator } from './entry';
3
- import { InvalidActionError, PayloadValidationError } from '../../interfaces/errors';
4
- import { Entry } from '../../entities/entry';
5
- import { Tag } from '../../entities/tag';
6
- export default class TagsOnEntryValidator implements EntryValidator {
7
- hooks: ApiHook[];
8
- private tags;
9
- constructor(tags: Map<String, Tag>);
10
- validate(entry: Entry): PayloadValidationError[] | InvalidActionError[];
11
- }
@@ -1,7 +0,0 @@
1
- import { ApiHook } from '../';
2
- import { ContentTypePayloadValidator, ContentTypePayloadValidatorOptions } from './content-type';
3
- import { InvalidActionError } from '../../interfaces/errors';
4
- export default class TypeChangeValidator implements ContentTypePayloadValidator {
5
- hooks: ApiHook[];
6
- validate({ contentType, publishedContentType }: ContentTypePayloadValidatorOptions): InvalidActionError[];
7
- }
@@ -1 +0,0 @@
1
- export declare function deprecatedMethod(method: any, alternative: any): void;
@@ -1,26 +0,0 @@
1
- export declare const MIN_GROUPS = 2;
2
- export declare const MAX_TABS = 5;
3
- export declare const MAX_FIELD_SETS = 15;
4
- export interface FieldGroupItem {
5
- groupId: string;
6
- name?: string;
7
- items: EditorLayoutItem[];
8
- }
9
- export interface FieldItem {
10
- fieldId: string;
11
- }
12
- declare type EditorLayoutItem = FieldItem | FieldGroupItem;
13
- export declare type EditorLayout = EditorLayoutItem[];
14
- declare type Path = (string | number)[];
15
- export declare function isFieldGroupItem(item: EditorLayoutItem): item is FieldGroupItem;
16
- export declare function isFieldItem(item: EditorLayoutItem): item is FieldItem;
17
- export declare const findFieldGroup: (editorLayout: FieldGroupItem[], groupId: string) => {
18
- item: FieldGroupItem;
19
- path: Path;
20
- };
21
- export declare const collectFieldGroupIds: (editorLayout: FieldGroupItem[]) => string[];
22
- export declare function find<ItemType = EditorLayoutItem>(editorLayout: FieldGroupItem[], predicate: (item: EditorLayoutItem) => boolean): {
23
- item: ItemType;
24
- path: Path;
25
- } | undefined;
26
- export {};
@@ -1 +0,0 @@
1
- export default function isDefined<T>(value: T | undefined | null): value is T;
@@ -1,9 +0,0 @@
1
- import Entry from '../entities/entry';
2
- /**
3
- * Calculate if an entry should be published.
4
- * @constructor
5
- * @param {boolean | 'preserve'} shouldPublish - expected result.
6
- * @param {Entry} entry - entry to be published.
7
- * @description we expect a diff of > 2 between version and publishedVersion because version has been already bumped in this specific use case.
8
- */
9
- export default function shouldPublishLocalChanges(shouldPublish: boolean | 'preserve', entry: Entry): boolean;