contentful-migration 4.9.3 → 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.
- package/CHANGELOG.md +6 -1
- package/built/bin/cli.d.ts +9 -0
- package/built/bin/lib/config.d.ts +13 -0
- package/built/bin/lib/contentful-client/index.d.ts +2 -0
- package/built/bin/lib/contentful-client/proxy.d.ts +19 -0
- package/built/bin/lib/render-migration.d.ts +5 -0
- package/built/bin/lib/steps-errors.d.ts +3 -0
- package/built/bin/lib/write-errors-to-log.d.ts +2 -0
- package/built/bin/usage-params.d.ts +2 -0
- package/built/index.d.ts +1 -0
- package/built/lib/action/action.d.ts +18 -0
- package/built/lib/action/content-type-annotate.d.ts +11 -0
- package/built/lib/action/content-type-create.d.ts +8 -0
- package/built/lib/action/content-type-delete.d.ts +8 -0
- package/built/lib/action/content-type-publish.d.ts +8 -0
- package/built/lib/action/content-type-save.d.ts +8 -0
- package/built/lib/action/content-type-unpublish.d.ts +8 -0
- package/built/lib/action/content-type-update.d.ts +11 -0
- package/built/lib/action/editor-layout/editor-layout-change-field-group-control.d.ts +13 -0
- package/built/lib/action/editor-layout/editor-layout-create-field-group.d.ts +12 -0
- package/built/lib/action/editor-layout/editor-layout-create.d.ts +8 -0
- package/built/lib/action/editor-layout/editor-layout-delete-field-group.d.ts +21 -0
- package/built/lib/action/editor-layout/editor-layout-delete.d.ts +10 -0
- package/built/lib/action/editor-layout/editor-layout-move-field.d.ts +13 -0
- package/built/lib/action/editor-layout/editor-layout-update-field-group.d.ts +22 -0
- package/built/lib/action/editorinterface-copy.d.ts +14 -0
- package/built/lib/action/editorinterface-reset.d.ts +12 -0
- package/built/lib/action/editorinterface-save.d.ts +8 -0
- package/built/lib/action/editorinterface-update.d.ts +16 -0
- package/built/lib/action/entry-derive.d.ts +15 -0
- package/built/lib/action/entry-field-purge.d.ts +9 -0
- package/built/lib/action/entry-field-rename.d.ts +11 -0
- package/built/lib/action/entry-set-tags.d.ts +10 -0
- package/built/lib/action/entry-transform-to-type.d.ts +16 -0
- package/built/lib/action/entry-transform.d.ts +11 -0
- package/built/lib/action/entryeditor-configure.d.ts +17 -0
- package/built/lib/action/entryeditor-reset-to-default.d.ts +10 -0
- package/built/lib/action/entryeditor.d.ts +8 -0
- package/built/lib/action/entryeditors-configure.d.ts +21 -0
- package/built/lib/action/field-action.d.ts +10 -0
- package/built/lib/action/field-annotate.d.ts +12 -0
- package/built/lib/action/field-create.d.ts +7 -0
- package/built/lib/action/field-move.d.ts +9 -0
- package/built/lib/action/field-rename.d.ts +15 -0
- package/built/lib/action/field-update.d.ts +10 -0
- package/built/lib/action/sidebar-reset-to-default.d.ts +10 -0
- package/built/lib/action/sidebarwidget-add.d.ts +16 -0
- package/built/lib/action/sidebarwidget-remove.d.ts +13 -0
- package/built/lib/action/sidebarwidget-update.d.ts +15 -0
- package/built/lib/action/sidebarwidget.d.ts +13 -0
- package/built/lib/action/tag-create.d.ts +12 -0
- package/built/lib/action/tag-delete.d.ts +8 -0
- package/built/lib/action/tag-save.d.ts +10 -0
- package/built/lib/action/tag-update.d.ts +11 -0
- package/built/lib/entities/content-type.d.ts +90 -0
- package/built/lib/entities/entry.d.ts +28 -0
- package/built/lib/entities/link.d.ts +15 -0
- package/built/lib/entities/tag.d.ts +18 -0
- package/built/lib/errors/chunks-validation.d.ts +5 -0
- package/built/lib/errors/editorinterfaces-fetching.d.ts +4 -0
- package/built/lib/errors/index.d.ts +6 -0
- package/built/lib/errors/payload-validation.d.ts +5 -0
- package/built/lib/errors/space-access.d.ts +4 -0
- package/built/lib/errors/steps-validation.d.ts +5 -0
- package/built/lib/fetcher.d.ts +19 -0
- package/built/lib/intent/base-intent.d.ts +64 -0
- package/built/lib/intent/base-intent.js +4 -3
- package/built/lib/intent/base-intent.js.map +1 -1
- package/built/lib/intent/composed-intent.d.ts +62 -0
- package/built/lib/intent/content-type-annotate.d.ts +11 -0
- package/built/lib/intent/content-type-annotate.js +4 -0
- package/built/lib/intent/content-type-annotate.js.map +1 -1
- package/built/lib/intent/content-type-create.d.ts +10 -0
- package/built/lib/intent/content-type-delete.d.ts +13 -0
- package/built/lib/intent/content-type-update.d.ts +10 -0
- package/built/lib/intent/content-type-update.js +1 -0
- package/built/lib/intent/content-type-update.js.map +1 -1
- package/built/lib/intent/editor-layout/editor-layout-change-field-group-control.d.ts +15 -0
- package/built/lib/intent/editor-layout/editor-layout-change-field-group-id.d.ts +17 -0
- package/built/lib/intent/editor-layout/editor-layout-create-field-group.d.ts +15 -0
- package/built/lib/intent/editor-layout/editor-layout-create.d.ts +15 -0
- package/built/lib/intent/editor-layout/editor-layout-delete-field-group.d.ts +15 -0
- package/built/lib/intent/editor-layout/editor-layout-delete.d.ts +14 -0
- package/built/lib/intent/editor-layout/editor-layout-invalid-method.d.ts +12 -0
- package/built/lib/intent/editor-layout/editor-layout-move-field.d.ts +18 -0
- package/built/lib/intent/editor-layout/editor-layout-update-field-group.d.ts +15 -0
- package/built/lib/intent/editorinterface-copy.d.ts +14 -0
- package/built/lib/intent/editorinterface-reset.d.ts +14 -0
- package/built/lib/intent/editorinterface-update.d.ts +15 -0
- package/built/lib/intent/entry-derive.d.ts +14 -0
- package/built/lib/intent/entry-set-tags.d.ts +13 -0
- package/built/lib/intent/entry-transform-to-type.d.ts +15 -0
- package/built/lib/intent/entry-transform.d.ts +13 -0
- package/built/lib/intent/entryeditor-configure.d.ts +14 -0
- package/built/lib/intent/entryeditor-reset-to-default.d.ts +14 -0
- package/built/lib/intent/entryeditors-configure.d.ts +14 -0
- package/built/lib/intent/field-annotate.d.ts +10 -0
- package/built/lib/intent/field-create.d.ts +10 -0
- package/built/lib/intent/field-create.js +1 -0
- package/built/lib/intent/field-create.js.map +1 -1
- package/built/lib/intent/field-delete.d.ts +13 -0
- package/built/lib/intent/field-move.d.ts +13 -0
- package/built/lib/intent/field-move.js +1 -0
- package/built/lib/intent/field-move.js.map +1 -1
- package/built/lib/intent/field-rename.d.ts +20 -0
- package/built/lib/intent/field-update.d.ts +10 -0
- package/built/lib/intent/field-update.js +1 -0
- package/built/lib/intent/field-update.js.map +1 -1
- package/built/lib/intent/index.d.ts +38 -0
- package/built/lib/intent/sidebar-reset-to-default.d.ts +14 -0
- package/built/lib/intent/sidebarwidget-add.d.ts +15 -0
- package/built/lib/intent/sidebarwidget-remove.d.ts +15 -0
- package/built/lib/intent/sidebarwidget-update.d.ts +15 -0
- package/built/lib/intent/tag-create.d.ts +16 -0
- package/built/lib/intent/tag-delete.d.ts +15 -0
- package/built/lib/intent/tag-update.d.ts +14 -0
- package/built/lib/intent-list/index.d.ts +17 -0
- package/built/lib/intent-validator/content-transform.d.ts +17 -0
- package/built/lib/intent-validator/content-type-update.d.ts +13 -0
- package/built/lib/intent-validator/entry-derive.d.ts +20 -0
- package/built/lib/intent-validator/entry-set-tags.d.ts +15 -0
- package/built/lib/intent-validator/entry-transform-to-type.d.ts +19 -0
- package/built/lib/intent-validator/field-movement.d.ts +21 -0
- package/built/lib/intent-validator/field-update.d.ts +23 -0
- package/built/lib/intent-validator/schema-validator.d.ts +19 -0
- package/built/lib/intent-validator/tag-update.d.ts +11 -0
- package/built/lib/interfaces/annotation.d.ts +41 -0
- package/built/lib/interfaces/api-entry.d.ts +19 -0
- package/built/lib/interfaces/api-fetcher.d.ts +10 -0
- package/built/lib/interfaces/api-tag-link.d.ts +7 -0
- package/built/lib/interfaces/api-tag.d.ts +9 -0
- package/built/lib/interfaces/content-transform.d.ts +6 -0
- package/built/lib/interfaces/content-type.d.ts +95 -0
- package/built/lib/interfaces/entry-derive.d.ts +9 -0
- package/built/lib/interfaces/entry-set-tags.d.ts +6 -0
- package/built/lib/interfaces/entry-transform-to-type.d.ts +10 -0
- package/built/lib/interfaces/errors.d.ts +35 -0
- package/built/lib/interfaces/intent-validator.d.ts +6 -0
- package/built/lib/interfaces/intent.d.ts +60 -0
- package/built/lib/interfaces/plan-message.d.ts +10 -0
- package/built/lib/interfaces/raw-step.d.ts +89 -0
- package/built/lib/interfaces/request.d.ts +12 -0
- package/built/lib/migration-chunks/validation/content-type.d.ts +4 -0
- package/built/lib/migration-chunks/validation/duplicate-props.d.ts +3 -0
- package/built/lib/migration-chunks/validation/editor-layout.d.ts +5 -0
- package/built/lib/migration-chunks/validation/errors.d.ts +23 -0
- package/built/lib/migration-chunks/validation/field.d.ts +8 -0
- package/built/lib/migration-chunks/validation/index.d.ts +19 -0
- package/built/lib/migration-chunks/validation/tag.d.ts +4 -0
- package/built/lib/migration-parser.d.ts +16 -0
- package/built/lib/migration-steps/action-creators.d.ts +53 -0
- package/built/lib/migration-steps/action-creators.js +72 -72
- package/built/lib/migration-steps/action-creators.js.map +1 -1
- package/built/lib/migration-steps/dispatch-proxy.d.ts +6 -0
- package/built/lib/migration-steps/first-external-caller.d.ts +3 -0
- package/built/lib/migration-steps/index.d.ts +3 -0
- package/built/lib/offline-api/index.d.ts +80 -0
- package/built/lib/offline-api/validator/annotations.d.ts +9 -0
- package/built/lib/offline-api/validator/content-type.d.ts +13 -0
- package/built/lib/offline-api/validator/display-field.d.ts +9 -0
- package/built/lib/offline-api/validator/editor-interface.d.ts +11 -0
- package/built/lib/offline-api/validator/entry.d.ts +7 -0
- package/built/lib/offline-api/validator/errors.d.ts +48 -0
- package/built/lib/offline-api/validator/field-deletion.d.ts +7 -0
- package/built/lib/offline-api/validator/field-groups-count.d.ts +8 -0
- package/built/lib/offline-api/validator/schema/content-type-schema.d.ts +5 -0
- package/built/lib/offline-api/validator/schema/editor-layout-schema.d.ts +2 -0
- package/built/lib/offline-api/validator/schema/field-validations-schema.d.ts +3 -0
- package/built/lib/offline-api/validator/schema/fields-schema.d.ts +2 -0
- package/built/lib/offline-api/validator/schema/index.d.ts +10 -0
- package/built/lib/offline-api/validator/schema/schema-validation.d.ts +8 -0
- package/built/lib/offline-api/validator/schema/tag-schema.d.ts +4 -0
- package/built/lib/offline-api/validator/tag.d.ts +12 -0
- package/built/lib/offline-api/validator/tags-on-entry.d.ts +11 -0
- package/built/lib/offline-api/validator/type-change.d.ts +7 -0
- package/built/lib/utils/deprecated.d.ts +1 -0
- package/built/lib/utils/editor-layout.d.ts +26 -0
- package/built/lib/utils/is-defined.d.ts +1 -0
- package/built/lib/utils/should-publish-local-changes.d.ts +9 -0
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface SidebarWidget {
|
|
2
|
+
widgetId: string;
|
|
3
|
+
widgetNamespace?: SidebarWidgetNamespace;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
settings?: SidebarWidgetSettings;
|
|
6
|
+
}
|
|
7
|
+
declare type SidebarWidgetSettingValue = number | boolean | string;
|
|
8
|
+
export interface SidebarWidgetSettings {
|
|
9
|
+
[key: string]: SidebarWidgetSettingValue;
|
|
10
|
+
}
|
|
11
|
+
export declare type SidebarWidgetNamespace = 'sidebar-builtin' | 'extension';
|
|
12
|
+
export declare const DEFAULT_SIDEBAR_LIST: SidebarWidget[];
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TagVisibility } from '../interfaces/api-tag';
|
|
2
|
+
import { APIAction, EntityType } from './action';
|
|
3
|
+
import OfflineAPI from '../offline-api/index';
|
|
4
|
+
declare class TagCreateAction extends APIAction {
|
|
5
|
+
private tagId;
|
|
6
|
+
private tagVisibility;
|
|
7
|
+
constructor(tagId: string, tagVisibility?: TagVisibility);
|
|
8
|
+
getEntityId(): string;
|
|
9
|
+
getEntityType(): EntityType;
|
|
10
|
+
applyTo(api: OfflineAPI): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export { TagCreateAction };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { APIAction, EntityType } from './action';
|
|
2
|
+
import OfflineAPI from '../offline-api/index';
|
|
3
|
+
declare class TagSaveAction extends APIAction {
|
|
4
|
+
private tagId;
|
|
5
|
+
constructor(tagId: string);
|
|
6
|
+
getEntityId(): string;
|
|
7
|
+
getEntityType(): EntityType;
|
|
8
|
+
applyTo(api: OfflineAPI): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export { TagSaveAction };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EntityAction, EntityType } from './action';
|
|
2
|
+
import Tag from '../entities/tag';
|
|
3
|
+
declare class TagUpdateAction extends EntityAction {
|
|
4
|
+
private props;
|
|
5
|
+
private tagId;
|
|
6
|
+
constructor(tagId: string, props: object);
|
|
7
|
+
getEntityId(): string;
|
|
8
|
+
getEntityType(): EntityType;
|
|
9
|
+
applyTo(tag: Tag): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export { TagUpdateAction };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { APIContentType, Field, APISidebarWidgetSettings, APIEditorInterfaceControl, APIEditorInterfaces, APIEditorInterfaceGroupControl, APIEditorInterfaceSettings, APIEditorInterfaceSidebar, APIEditorIntefaceEditor, APISidebarWidgetNamespace, APIControlWidgetNamespace, APIEditorInterfaceEditorLayout, APIEditorLayoutFieldGroupItem } from '../interfaces/content-type';
|
|
2
|
+
import { SidebarWidgetNamespace } from '../action/sidebarwidget';
|
|
3
|
+
import { AnnotationLink } from '../interfaces/annotation';
|
|
4
|
+
export declare type EditorLayoutFieldMovementDirection = 'afterField' | 'beforeField' | 'afterFieldGroup' | 'beforeFieldGroup' | 'toTheTopOfFieldGroup' | 'toTheBottomOfFieldGroup';
|
|
5
|
+
declare class Fields {
|
|
6
|
+
private _fields;
|
|
7
|
+
private _contentType;
|
|
8
|
+
constructor(contentType: ContentType, fields?: Field[]);
|
|
9
|
+
getField(id: string): Field;
|
|
10
|
+
setField(id: string, field: Field): void;
|
|
11
|
+
deleteField(id: string): void;
|
|
12
|
+
moveField(id: string, direction: string, pivot: string): void;
|
|
13
|
+
filter(predicate: (field: Field) => boolean): Field[];
|
|
14
|
+
map<T>(mapper: (field: Field) => T): T[];
|
|
15
|
+
get fields(): Field[];
|
|
16
|
+
set fields(fields: Field[]);
|
|
17
|
+
clone(): Fields;
|
|
18
|
+
toRaw(): Field[];
|
|
19
|
+
}
|
|
20
|
+
declare class EditorInterfaces {
|
|
21
|
+
private _version;
|
|
22
|
+
private _controls;
|
|
23
|
+
private _sidebar?;
|
|
24
|
+
private _editor?;
|
|
25
|
+
private _editors?;
|
|
26
|
+
private _editorLayout?;
|
|
27
|
+
private _groupControls?;
|
|
28
|
+
constructor(apiEditorInterfaces: APIEditorInterfaces);
|
|
29
|
+
get version(): number;
|
|
30
|
+
set version(version: number);
|
|
31
|
+
getSidebar(): APIEditorInterfaceSidebar[];
|
|
32
|
+
getEditor(): APIEditorIntefaceEditor;
|
|
33
|
+
getEditors(): APIEditorIntefaceEditor[];
|
|
34
|
+
getControls(): APIEditorInterfaceControl[];
|
|
35
|
+
getEditorLayout(): APIEditorInterfaceEditorLayout;
|
|
36
|
+
getGroupControls(): APIEditorInterfaceGroupControl[];
|
|
37
|
+
reset(fieldId: string): void;
|
|
38
|
+
copy(fromFieldId: string, toFieldId: string): void;
|
|
39
|
+
update(fieldId: string, widgetId: string, settings?: APIEditorInterfaceSettings, widgetNamespace?: APIControlWidgetNamespace): void;
|
|
40
|
+
addSidebarWidget(widgetId: string, widgetNamespace: APISidebarWidgetNamespace, settings: APISidebarWidgetSettings, insertBeforeWidgetId: string, disabled: boolean): void;
|
|
41
|
+
updateSidebarWidget(widgetId: string, widgetNamespace: SidebarWidgetNamespace, settings?: APISidebarWidgetSettings, disabled?: boolean): void;
|
|
42
|
+
removeSidebarWidget(widgetId: string, widgetNamespace: APISidebarWidgetNamespace): void;
|
|
43
|
+
resetSidebarToDefault(): void;
|
|
44
|
+
resetEditorToDefault(): void;
|
|
45
|
+
setEditor(editor: APIEditorIntefaceEditor): void;
|
|
46
|
+
setEditors(editors: APIEditorIntefaceEditor[]): void;
|
|
47
|
+
createEditorLayout(fields: Field[]): void;
|
|
48
|
+
deleteEditorLayout(): void;
|
|
49
|
+
createEditorLayoutFieldGroup(fieldGroupId: string, parentFieldGroupId?: string): void;
|
|
50
|
+
deleteEditorLayoutFieldGroup(fieldGroupId: string): void;
|
|
51
|
+
changeFieldGroupId(fieldGroupId: string, newFieldGroupId: string): void;
|
|
52
|
+
updateEditorLayoutFieldGroup(fieldGroupId: string, props: Pick<APIEditorLayoutFieldGroupItem, 'name'>): void;
|
|
53
|
+
createGroupControls(): void;
|
|
54
|
+
createTabGroupControl(fieldGroupId: string): void;
|
|
55
|
+
updateGroupControl(fieldGroupId: string, groupControl: Omit<APIEditorInterfaceGroupControl, 'groupId'>): void;
|
|
56
|
+
deleteGroupControl(fieldGroupId: string): void;
|
|
57
|
+
moveFieldInEditorLayout(fieldId: string, direction: EditorLayoutFieldMovementDirection, pivot?: string): void;
|
|
58
|
+
toAPI(): object;
|
|
59
|
+
}
|
|
60
|
+
declare class ContentType {
|
|
61
|
+
hasEntries: Boolean;
|
|
62
|
+
private _id;
|
|
63
|
+
private _fields;
|
|
64
|
+
private _name;
|
|
65
|
+
private _description;
|
|
66
|
+
private _version;
|
|
67
|
+
private _displayField;
|
|
68
|
+
private _metadata;
|
|
69
|
+
constructor(ct: APIContentType);
|
|
70
|
+
get id(): string;
|
|
71
|
+
get fields(): Fields;
|
|
72
|
+
set fields(fields: Fields);
|
|
73
|
+
get name(): string;
|
|
74
|
+
set name(name: string);
|
|
75
|
+
get description(): string;
|
|
76
|
+
set description(description: string);
|
|
77
|
+
get displayField(): string;
|
|
78
|
+
set displayField(displayField: string);
|
|
79
|
+
setAnnotations(annotations: AnnotationLink[]): void;
|
|
80
|
+
getAnnotations(): AnnotationLink[];
|
|
81
|
+
clearAnnotations(): void;
|
|
82
|
+
setFieldAnnotations(fieldId: string, annotations: AnnotationLink[]): void;
|
|
83
|
+
getFieldAnnotations(fieldId: string): AnnotationLink[];
|
|
84
|
+
clearFieldAnnotations(fieldId: string): void;
|
|
85
|
+
get version(): number;
|
|
86
|
+
set version(version: number);
|
|
87
|
+
toAPI(): APIContentType;
|
|
88
|
+
clone(): ContentType;
|
|
89
|
+
}
|
|
90
|
+
export { ContentType as default, ContentType, Fields, Field, EditorInterfaces, AnnotationLink };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import APIEntry from '../interfaces/api-entry';
|
|
2
|
+
import APITagLink from '../interfaces/api-tag-link';
|
|
3
|
+
declare class Entry {
|
|
4
|
+
private _id;
|
|
5
|
+
private _contentTypeId;
|
|
6
|
+
private _version;
|
|
7
|
+
private _fields;
|
|
8
|
+
private _publishedVersion?;
|
|
9
|
+
private _tags?;
|
|
10
|
+
constructor(entry: APIEntry);
|
|
11
|
+
get id(): string;
|
|
12
|
+
get contentTypeId(): string;
|
|
13
|
+
get fields(): object;
|
|
14
|
+
set fields(fields: object);
|
|
15
|
+
setField(id: string, value: any): void;
|
|
16
|
+
setFieldForLocale(id: string, locale: string, value: any): void;
|
|
17
|
+
replaceArrayLinkForLocale(id: string, locale: string, index: number, linkId: string): void;
|
|
18
|
+
get version(): number;
|
|
19
|
+
set version(version: number);
|
|
20
|
+
get isPublished(): boolean;
|
|
21
|
+
get publishedVersion(): number | null;
|
|
22
|
+
set publishedVersion(version: number | null);
|
|
23
|
+
get tags(): APITagLink[];
|
|
24
|
+
set tags(tags: APITagLink[]);
|
|
25
|
+
toApiEntry(): APIEntry;
|
|
26
|
+
clone(): Entry;
|
|
27
|
+
}
|
|
28
|
+
export { Entry as default, Entry };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Entry from './entry';
|
|
2
|
+
declare class Link {
|
|
3
|
+
private _field;
|
|
4
|
+
private _locale;
|
|
5
|
+
private _index;
|
|
6
|
+
private _element;
|
|
7
|
+
constructor(element: Entry, field: string, locale: string, index?: number);
|
|
8
|
+
get field(): string;
|
|
9
|
+
get locale(): string;
|
|
10
|
+
get index(): number;
|
|
11
|
+
get element(): Entry;
|
|
12
|
+
isValid(): boolean;
|
|
13
|
+
isInArray(): boolean;
|
|
14
|
+
}
|
|
15
|
+
export { Link as default, Link };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import APITag, { TagVisibility } from '../interfaces/api-tag';
|
|
2
|
+
declare class Tag {
|
|
3
|
+
private _id;
|
|
4
|
+
private _name;
|
|
5
|
+
private _version;
|
|
6
|
+
private _visibility;
|
|
7
|
+
constructor(tag: APITag);
|
|
8
|
+
get id(): string;
|
|
9
|
+
get name(): string;
|
|
10
|
+
get version(): number;
|
|
11
|
+
set version(version: number);
|
|
12
|
+
set name(name: string);
|
|
13
|
+
get visibility(): TagVisibility;
|
|
14
|
+
set visibility(visibility: TagVisibility);
|
|
15
|
+
toApiTag(): APITag;
|
|
16
|
+
clone(): Tag;
|
|
17
|
+
}
|
|
18
|
+
export { Tag as default, Tag };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import StepsValidationError from './steps-validation';
|
|
2
|
+
import ChunksValidationError from './chunks-validation';
|
|
3
|
+
import SpaceAccessError from './space-access';
|
|
4
|
+
import PayloadValidationError from './payload-validation';
|
|
5
|
+
import EditorInterfacesFetchingError from './editorinterfaces-fetching';
|
|
6
|
+
export { StepsValidationError, ChunksValidationError, SpaceAccessError, PayloadValidationError, EditorInterfacesFetchingError };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import IntentList from './intent-list';
|
|
2
|
+
import { APIContentType, APIEditorInterfaces } from '../lib/interfaces/content-type';
|
|
3
|
+
import APIEntry from '../lib/interfaces/api-entry';
|
|
4
|
+
import APITag from '../lib/interfaces/api-tag';
|
|
5
|
+
import { ContentType } from '../lib/entities/content-type';
|
|
6
|
+
import APIFetcher from './interfaces/api-fetcher';
|
|
7
|
+
export default class Fetcher implements APIFetcher {
|
|
8
|
+
private makeRequest;
|
|
9
|
+
private requestBatchSize;
|
|
10
|
+
constructor(makeRequest: Function, requestBatchSize?: number);
|
|
11
|
+
getEntriesInIntents(intentList: IntentList): Promise<APIEntry[]>;
|
|
12
|
+
getContentTypesInChunks(intentList: IntentList): Promise<APIContentType[]>;
|
|
13
|
+
getEditorInterfacesInIntents(intentList: IntentList): Promise<Map<string, APIEditorInterfaces>>;
|
|
14
|
+
getLocalesForSpace(): Promise<string[]>;
|
|
15
|
+
checkContentTypesForDeletedCts(intentList: IntentList, contentTypes: ContentType[]): Promise<ContentType[]>;
|
|
16
|
+
getTagsForEnvironment(intentList: IntentList): Promise<APITag[]>;
|
|
17
|
+
private fetchEditorInterface;
|
|
18
|
+
private fetchAllPaginatedItems;
|
|
19
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Intent as IntentInterface } from '../interfaces/intent';
|
|
2
|
+
import { RawStep, RawStepMeta, RawStepPayload } from '../interfaces/raw-step';
|
|
3
|
+
import { APIAction, EntityAction } from '../action/action';
|
|
4
|
+
import { PlanMessage } from '../interfaces/plan-message';
|
|
5
|
+
export default abstract class Intent implements IntentInterface {
|
|
6
|
+
protected type: string;
|
|
7
|
+
protected meta: RawStepMeta;
|
|
8
|
+
protected payload: RawStepPayload;
|
|
9
|
+
constructor(rawStep: RawStep);
|
|
10
|
+
getContentTypeId(): string;
|
|
11
|
+
isSameContentType(other: Intent): boolean;
|
|
12
|
+
getRelatedContentTypeIds(): string[];
|
|
13
|
+
getFieldId(): string;
|
|
14
|
+
getInvalidMethod(): string;
|
|
15
|
+
getFieldGroupId(): string;
|
|
16
|
+
getNewFieldGroupId(): string;
|
|
17
|
+
getFieldGroupProps(): Omit<import("../interfaces/content-type").APIEditorLayoutFieldGroupItem, "groupId" | "items">;
|
|
18
|
+
requiresAllEntries(): boolean;
|
|
19
|
+
requiresAllTags(): boolean;
|
|
20
|
+
requiresContentType(): boolean;
|
|
21
|
+
isContentTypeUpdate(): boolean;
|
|
22
|
+
isContentTypeDelete(): boolean;
|
|
23
|
+
isContentTypeCreate(): boolean;
|
|
24
|
+
isContentTypeAnnotate(): boolean;
|
|
25
|
+
isFieldCreate(): boolean;
|
|
26
|
+
isFieldUpdate(): boolean;
|
|
27
|
+
isFieldDelete(): boolean;
|
|
28
|
+
isFieldRename(): boolean;
|
|
29
|
+
isFieldMove(): boolean;
|
|
30
|
+
isContentTransform(): boolean;
|
|
31
|
+
isEntryDerive(): boolean;
|
|
32
|
+
isEntryTransformToType(): boolean;
|
|
33
|
+
isEditorInterfaceUpdate(): boolean;
|
|
34
|
+
isSidebarUpdate(): boolean;
|
|
35
|
+
isGroupable(): boolean;
|
|
36
|
+
isEditorInterfaceIntent(): boolean;
|
|
37
|
+
isEditorLayoutCreate(): boolean;
|
|
38
|
+
isEditorLayoutDelete(): boolean;
|
|
39
|
+
isEditorLayoutUpdate(): boolean;
|
|
40
|
+
isEditorLayoutInvalidMethod(): boolean;
|
|
41
|
+
isFieldGroupCreate(): boolean;
|
|
42
|
+
isFieldGroupDelete(): boolean;
|
|
43
|
+
isFieldGroupUpdate(): boolean;
|
|
44
|
+
isFieldGroupIdChange(): boolean;
|
|
45
|
+
isFieldGroupControlChange(): boolean;
|
|
46
|
+
isAboutContentType(): boolean;
|
|
47
|
+
isAboutField(): boolean;
|
|
48
|
+
isAboutEditorLayout(): boolean;
|
|
49
|
+
isComposedIntent(): boolean;
|
|
50
|
+
groupsWith(other: Intent): boolean;
|
|
51
|
+
abstract endsGroup(): boolean;
|
|
52
|
+
shouldSave(): boolean;
|
|
53
|
+
shouldPublish(): boolean;
|
|
54
|
+
toRaw(): RawStep;
|
|
55
|
+
getRawType(): string;
|
|
56
|
+
getTagId(): string;
|
|
57
|
+
isTagCreate(): boolean;
|
|
58
|
+
isTagUpdate(): boolean;
|
|
59
|
+
isTagDelete(): boolean;
|
|
60
|
+
isTagIntent(): boolean;
|
|
61
|
+
isEntrySetTags(): boolean;
|
|
62
|
+
abstract toActions(): (APIAction | EntityAction)[];
|
|
63
|
+
abstract toPlanMessage(): PlanMessage;
|
|
64
|
+
}
|
|
@@ -48,6 +48,9 @@ class Intent {
|
|
|
48
48
|
isContentTypeCreate() {
|
|
49
49
|
return false;
|
|
50
50
|
}
|
|
51
|
+
isContentTypeAnnotate() {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
51
54
|
isFieldCreate() {
|
|
52
55
|
return false;
|
|
53
56
|
}
|
|
@@ -122,9 +125,7 @@ class Intent {
|
|
|
122
125
|
this.isFieldDelete());
|
|
123
126
|
}
|
|
124
127
|
isAboutEditorLayout() {
|
|
125
|
-
return
|
|
126
|
-
this.isEditorLayoutDelete() ||
|
|
127
|
-
this.isEditorLayoutUpdate());
|
|
128
|
+
return this.isEditorLayoutCreate() || this.isEditorLayoutDelete() || this.isEditorLayoutUpdate();
|
|
128
129
|
}
|
|
129
130
|
isComposedIntent() {
|
|
130
131
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-intent.js","sourceRoot":"","sources":["../../../src/lib/intent/base-intent.ts"],"names":[],"mappings":";;AAKA,MAA8B,MAAM;IAKlC,YAAY,OAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IAChC,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAA;IACnC,CAAC;IAED,iBAAiB,CAAC,KAAa;QAC7B,OAAO,IAAI,CAAC,gBAAgB,EAAE,KAAK,KAAK,CAAC,gBAAgB,EAAE,CAAA;IAC7D,CAAC;IAED,wBAAwB;QACtB,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAA;IAClC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAA;IAC7B,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAA;IACnC,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAA;IAClC,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAA;IACrC,CAAC;IAED,kBAAkB;QACh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oBAAoB;QAClB,OAAO,KAAK,CAAA;IACd,CAAC;IAED,yBAAyB;QACvB,OAAO,KAAK,CAAA;IACd,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,mBAAmB,EAAE,IAAI,IAAI,CAAC,mBAAmB,EAAE,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAA;IAC/F,CAAC;IAED,YAAY;QACV,OAAO,CACL,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,WAAW,EAAE;YAClB,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,aAAa,EAAE,CACrB,CAAA;IACH,CAAC;IAED,mBAAmB;QACjB,OAAO,
|
|
1
|
+
{"version":3,"file":"base-intent.js","sourceRoot":"","sources":["../../../src/lib/intent/base-intent.ts"],"names":[],"mappings":";;AAKA,MAA8B,MAAM;IAKlC,YAAY,OAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IAChC,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAA;IACnC,CAAC;IAED,iBAAiB,CAAC,KAAa;QAC7B,OAAO,IAAI,CAAC,gBAAgB,EAAE,KAAK,KAAK,CAAC,gBAAgB,EAAE,CAAA;IAC7D,CAAC;IAED,wBAAwB;QACtB,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAA;IAClC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAA;IAC7B,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAA;IACnC,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAA;IAClC,CAAC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AI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAA;IACH,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IAED,QAAQ;QACN,OAAO,EAAE,CAAA;IACX,CAAC;IAED,WAAW;QACT,OAAO,KAAK,CAAA;IACd,CAAC;IAED,WAAW;QACT,OAAO,KAAK,CAAA;IACd,CAAC;IAED,WAAW;QACT,OAAO,KAAK,CAAA;IACd,CAAC;IAED,WAAW;QACT,OAAO,KAAK,CAAA;IACd,CAAC;IAED,cAAc;QACZ,OAAO,KAAK,CAAA;IACd,CAAC;CAIF;AAjPD,yBAiPC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import Intent from '../interfaces/intent';
|
|
2
|
+
import { RawStep } from '../interfaces/raw-step';
|
|
3
|
+
import { PlanMessage } from '../interfaces/plan-message';
|
|
4
|
+
export default class ComposedIntent implements Intent {
|
|
5
|
+
private contentTypeId;
|
|
6
|
+
private tagId;
|
|
7
|
+
private intents;
|
|
8
|
+
constructor(intents: Intent[]);
|
|
9
|
+
getIntents(): Intent[];
|
|
10
|
+
getFieldId(): string;
|
|
11
|
+
getRawType(): string;
|
|
12
|
+
isEditorInterfaceUpdate(): boolean;
|
|
13
|
+
isContentTypeUpdate(): boolean;
|
|
14
|
+
isContentTypeDelete(): boolean;
|
|
15
|
+
isContentTypeCreate(): boolean;
|
|
16
|
+
isFieldCreate(): boolean;
|
|
17
|
+
isFieldUpdate(): boolean;
|
|
18
|
+
isFieldDelete(): boolean;
|
|
19
|
+
isFieldRename(): boolean;
|
|
20
|
+
isFieldMove(): boolean;
|
|
21
|
+
isAboutContentType(): boolean;
|
|
22
|
+
isAboutField(): boolean;
|
|
23
|
+
isAboutEditorLayout(): boolean;
|
|
24
|
+
isContentTransform(): boolean;
|
|
25
|
+
isEntryDerive(): boolean;
|
|
26
|
+
isEntryTransformToType(): boolean;
|
|
27
|
+
isGroupable(): boolean;
|
|
28
|
+
isEditorInterfaceIntent(): boolean;
|
|
29
|
+
isSidebarUpdate(): boolean;
|
|
30
|
+
getContentTypeId(): string;
|
|
31
|
+
getRelatedContentTypeIds(): string[];
|
|
32
|
+
requiresAllEntries(): boolean;
|
|
33
|
+
requiresAllTags(): boolean;
|
|
34
|
+
requiresContentType(): boolean;
|
|
35
|
+
groupsWith(): boolean;
|
|
36
|
+
endsGroup(): boolean;
|
|
37
|
+
toRaw(): RawStep;
|
|
38
|
+
shouldSave(): boolean;
|
|
39
|
+
shouldPublish(): boolean;
|
|
40
|
+
isComposedIntent(): boolean;
|
|
41
|
+
isTagIntent(): boolean;
|
|
42
|
+
getTagId(): string;
|
|
43
|
+
isTagCreate(): boolean;
|
|
44
|
+
isTagUpdate(): boolean;
|
|
45
|
+
isTagDelete(): boolean;
|
|
46
|
+
isEntrySetTags(): boolean;
|
|
47
|
+
getInvalidMethod(): string;
|
|
48
|
+
getFieldGroupId(): string;
|
|
49
|
+
getNewFieldGroupId(): string;
|
|
50
|
+
getFieldGroupProps(): any;
|
|
51
|
+
isEditorLayoutCreate(): boolean;
|
|
52
|
+
isEditorLayoutDelete(): boolean;
|
|
53
|
+
isEditorLayoutUpdate(): boolean;
|
|
54
|
+
isEditorLayoutInvalidMethod(): boolean;
|
|
55
|
+
isFieldGroupCreate(): boolean;
|
|
56
|
+
isFieldGroupDelete(): boolean;
|
|
57
|
+
isFieldGroupUpdate(): boolean;
|
|
58
|
+
isFieldGroupIdChange(): boolean;
|
|
59
|
+
isFieldGroupControlChange(): boolean;
|
|
60
|
+
toActions(): (import("../action/action").APIAction | import("../action/action").EntityAction)[];
|
|
61
|
+
toPlanMessage(): PlanMessage;
|
|
62
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Intent from './base-intent';
|
|
2
|
+
import { PlanMessage } from '../interfaces/plan-message';
|
|
3
|
+
import { ContentTypeAnnotateAction } from '../action/content-type-annotate';
|
|
4
|
+
export default class ContentTypeAnnotateIntent extends Intent {
|
|
5
|
+
isContentTypeAnnotate(): boolean;
|
|
6
|
+
groupsWith(other: Intent): boolean;
|
|
7
|
+
endsGroup(): boolean;
|
|
8
|
+
shouldSave(): boolean;
|
|
9
|
+
toActions(): ContentTypeAnnotateAction[];
|
|
10
|
+
toPlanMessage(): PlanMessage;
|
|
11
|
+
}
|
|
@@ -7,10 +7,14 @@ const base_intent_1 = __importDefault(require("./base-intent"));
|
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const content_type_annotate_1 = require("../action/content-type-annotate");
|
|
9
9
|
class ContentTypeAnnotateIntent extends base_intent_1.default {
|
|
10
|
+
isContentTypeAnnotate() {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
10
13
|
groupsWith(other) {
|
|
11
14
|
const sameContentType = other.getContentTypeId() === this.getContentTypeId();
|
|
12
15
|
return ((other.isContentTypeUpdate() ||
|
|
13
16
|
other.isContentTypeCreate() ||
|
|
17
|
+
other.isContentTypeAnnotate() ||
|
|
14
18
|
other.isFieldCreate() ||
|
|
15
19
|
other.isFieldUpdate() ||
|
|
16
20
|
other.isFieldMove()) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-type-annotate.js","sourceRoot":"","sources":["../../../src/lib/intent/content-type-annotate.ts"],"names":[],"mappings":";;;;;AAAA,gEAAkC;AAElC,kDAAyB;AACzB,2EAA2E;AAG3E,MAAqB,yBAA0B,SAAQ,qBAAM;IAC3D,UAAU,CAAC,KAAa;QACtB,MAAM,eAAe,GAAG,KAAK,CAAC,gBAAgB,EAAE,KAAK,IAAI,CAAC,gBAAgB,EAAE,CAAA;QAC5E,OAAO,CACL,CAAC,KAAK,CAAC,mBAAmB,EAAE;YAC1B,KAAK,CAAC,mBAAmB,EAAE;YAC3B,KAAK,CAAC,aAAa,EAAE;YACrB,KAAK,CAAC,aAAa,EAAE;YACrB,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,eAAe,CAChB,CAAA;IACH,CAAC;IAED,SAAS;QACP,OAAO,KAAK,CAAA;IACd,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAA;IACb,CAAC;IAED,SAAS;;QACP,MAAM,eAAe,GAAqB,MAAA,IAAI,CAAC,OAAO,CAAC,WAAW,0CAAE,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YAC/E,GAAG,EAAE;gBACH,EAAE;gBACF,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,YAAY;aACvB;SACF,CAAC,CAAC,CAAA;QACH,OAAO,CAAC,IAAI,iDAAyB,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,eAAe,CAAC,CAAC,CAAA;IAClF,CAAC;IAED,aAAa;;QACX,MAAM,KAAK,GAAG,CAAA,MAAA,IAAI,CAAC,OAAO,CAAC,WAAW,0CAAE,MAAM,KAAI,CAAC,CAAA;QACnD,MAAM,OAAO,GAAG,KAAK;YACnB,CAAC,CAAC,oBAAoB,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW;iBACjE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,eAAK,EAAA,WAAW,GAAG,GAAG,CAAC;iBACpC,IAAI,CAAC,IAAI,CAAC,EAAE;YACjB,CAAC,CAAC,mBAAmB,CAAA;QACvB,OAAO;YACL,OAAO,EAAE,IAAA,eAAK,EAAA,oCAAoC,IAAI,CAAC,gBAAgB,EAAE,GAAG;YAC5E,QAAQ,EAAE;gBACR;oBACE,OAAO;oBACP,OAAO,EAAE,EAAE;iBACZ;aACF;YACD,OAAO,EAAE,EAAE;SACZ,CAAA;IACH,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"content-type-annotate.js","sourceRoot":"","sources":["../../../src/lib/intent/content-type-annotate.ts"],"names":[],"mappings":";;;;;AAAA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CAAC,IAAA,eAAK,EAAA,WAAW,GAAG,GAAG,CAAC;iBACpC,IAAI,CAAC,IAAI,CAAC,EAAE;YACjB,CAAC,CAAC,mBAAmB,CAAA;QACvB,OAAO;YACL,OAAO,EAAE,IAAA,eAAK,EAAA,oCAAoC,IAAI,CAAC,gBAAgB,EAAE,GAAG;YAC5E,QAAQ,EAAE;gBACR;oBACE,OAAO;oBACP,OAAO,EAAE,EAAE;iBACZ;aACF;YACD,OAAO,EAAE,EAAE;SACZ,CAAA;IACH,CAAC;CACF;AAvDD,4CAuDC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Intent from './base-intent';
|
|
2
|
+
import { ContentTypeCreateAction } from '../action/content-type-create';
|
|
3
|
+
import { PlanMessage } from '../interfaces/plan-message';
|
|
4
|
+
export default class ContentTypeCreateIntent extends Intent {
|
|
5
|
+
isContentTypeCreate(): boolean;
|
|
6
|
+
groupsWith(): boolean;
|
|
7
|
+
endsGroup(): boolean;
|
|
8
|
+
toActions(): ContentTypeCreateAction[];
|
|
9
|
+
toPlanMessage(): PlanMessage;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Intent from './base-intent';
|
|
2
|
+
import { ContentTypeUnpublishAction } from '../action/content-type-unpublish';
|
|
3
|
+
import { ContentTypeDeleteAction } from '../action/content-type-delete';
|
|
4
|
+
import { PlanMessage } from '../interfaces/plan-message';
|
|
5
|
+
export default class ContentTypeDeleteIntent extends Intent {
|
|
6
|
+
isContentTypeDelete(): boolean;
|
|
7
|
+
groupsWith(): boolean;
|
|
8
|
+
endsGroup(): boolean;
|
|
9
|
+
shouldSave(): boolean;
|
|
10
|
+
shouldPublish(): boolean;
|
|
11
|
+
toActions(): (ContentTypeUnpublishAction | ContentTypeDeleteAction)[];
|
|
12
|
+
toPlanMessage(): PlanMessage;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Intent from './base-intent';
|
|
2
|
+
import { ContentTypeUpdateAction } from '../action/content-type-update';
|
|
3
|
+
import { PlanMessage } from '../interfaces/plan-message';
|
|
4
|
+
export default class ContentTypeUpdateIntent extends Intent {
|
|
5
|
+
isContentTypeUpdate(): boolean;
|
|
6
|
+
groupsWith(other: Intent): boolean;
|
|
7
|
+
endsGroup(): boolean;
|
|
8
|
+
toActions(): ContentTypeUpdateAction[];
|
|
9
|
+
toPlanMessage(): PlanMessage;
|
|
10
|
+
}
|
|
@@ -15,6 +15,7 @@ class ContentTypeUpdateIntent extends base_intent_1.default {
|
|
|
15
15
|
const sameContentType = other.getContentTypeId() === this.getContentTypeId();
|
|
16
16
|
return ((other.isContentTypeUpdate() ||
|
|
17
17
|
other.isContentTypeCreate() ||
|
|
18
|
+
other.isContentTypeAnnotate() ||
|
|
18
19
|
other.isFieldCreate() ||
|
|
19
20
|
other.isFieldUpdate() ||
|
|
20
21
|
other.isFieldMove()) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-type-update.js","sourceRoot":"","sources":["../../../src/lib/intent/content-type-update.ts"],"names":[],"mappings":";;;;;AAAA,gEAAkC;AAClC,uEAAuE;AAEvE,kDAAyB;AACzB,mCAAgC;AAEhC,MAAqB,uBAAwB,SAAQ,qBAAM;IACzD,mBAAmB;QACjB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU,CAAC,KAAa;QACtB,MAAM,eAAe,GAAG,KAAK,CAAC,gBAAgB,EAAE,KAAK,IAAI,CAAC,gBAAgB,EAAE,CAAA;QAC5E,OAAO,CACL,CAAC,KAAK,CAAC,mBAAmB,EAAE;YAC1B,KAAK,CAAC,mBAAmB,EAAE;YAC3B,KAAK,CAAC,aAAa,EAAE;YACrB,KAAK,CAAC,aAAa,EAAE;YACrB,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,eAAe,CAChB,CAAA;IACH,CAAC;IAED,SAAS;QACP,OAAO,KAAK,CAAA;IACd,CAAC;IAED,SAAS;QACP,OAAO,CAAC,IAAI,6CAAuB,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;IACnF,CAAC;IAED,aAAa;QACX,MAAM,OAAO,GAAG,IAAA,gBAAO,EAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC/D,OAAO,IAAA,eAAK,EAAA,WAAW,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAA;QACzD,CAAC,CAAC,CAAA;QAEF,OAAO;YACL,OAAO,EAAE,IAAA,eAAK,EAAA,oCAAoC,IAAI,CAAC,gBAAgB,EAAE,GAAG;YAC5E,OAAO;YACP,QAAQ,EAAE,EAAE;SACb,CAAA;IACH,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"content-type-update.js","sourceRoot":"","sources":["../../../src/lib/intent/content-type-update.ts"],"names":[],"mappings":";;;;;AAAA,gEAAkC;AAClC,uEAAuE;AAEvE,kDAAyB;AACzB,mCAAgC;AAEhC,MAAqB,uBAAwB,SAAQ,qBAAM;IACzD,mBAAmB;QACjB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU,CAAC,KAAa;QACtB,MAAM,eAAe,GAAG,KAAK,CAAC,gBAAgB,EAAE,KAAK,IAAI,CAAC,gBAAgB,EAAE,CAAA;QAC5E,OAAO,CACL,CAAC,KAAK,CAAC,mBAAmB,EAAE;YAC1B,KAAK,CAAC,mBAAmB,EAAE;YAC3B,KAAK,CAAC,qBAAqB,EAAE;YAC7B,KAAK,CAAC,aAAa,EAAE;YACrB,KAAK,CAAC,aAAa,EAAE;YACrB,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,eAAe,CAChB,CAAA;IACH,CAAC;IAED,SAAS;QACP,OAAO,KAAK,CAAA;IACd,CAAC;IAED,SAAS;QACP,OAAO,CAAC,IAAI,6CAAuB,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;IACnF,CAAC;IAED,aAAa;QACX,MAAM,OAAO,GAAG,IAAA,gBAAO,EAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC/D,OAAO,IAAA,eAAK,EAAA,WAAW,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAA;QACzD,CAAC,CAAC,CAAA;QAEF,OAAO;YACL,OAAO,EAAE,IAAA,eAAK,EAAA,oCAAoC,IAAI,CAAC,gBAAgB,EAAE,GAAG;YAC5E,OAAO;YACP,QAAQ,EAAE,EAAE;SACb,CAAA;IACH,CAAC;CACF;AArCD,0CAqCC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Intent from '../base-intent';
|
|
2
|
+
import { PlanMessage } from '../../interfaces/plan-message';
|
|
3
|
+
import { EditorLayoutChangeFieldGroupControlAction } from '../../action/editor-layout/editor-layout-change-field-group-control';
|
|
4
|
+
export default class EditorLayoutChangeFieldGroupControlIntent extends Intent {
|
|
5
|
+
isEditorInterfaceIntent(): boolean;
|
|
6
|
+
isEditorLayoutUpdate(): boolean;
|
|
7
|
+
isFieldGroupControlChange(): boolean;
|
|
8
|
+
isGroupable(): boolean;
|
|
9
|
+
groupsWith(other: any): boolean;
|
|
10
|
+
endsGroup(): boolean;
|
|
11
|
+
shouldSave(): boolean;
|
|
12
|
+
shouldPublish(): boolean;
|
|
13
|
+
toActions(): EditorLayoutChangeFieldGroupControlAction[];
|
|
14
|
+
toPlanMessage(): PlanMessage;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Intent from '../base-intent';
|
|
2
|
+
import { PlanMessage } from '../../interfaces/plan-message';
|
|
3
|
+
import { EditorLayoutChangeFieldGroupIdAction } from '../../action/editor-layout/editor-layout-update-field-group';
|
|
4
|
+
export default class EditorLayoutChangeFieldGroupIdIntent extends Intent {
|
|
5
|
+
isEditorInterfaceIntent(): boolean;
|
|
6
|
+
isEditorLayoutUpdate(): boolean;
|
|
7
|
+
isFieldGroupIdChange(): boolean;
|
|
8
|
+
isGroupable(): boolean;
|
|
9
|
+
groupsWith(other: Intent): boolean;
|
|
10
|
+
endsGroup(): boolean;
|
|
11
|
+
shouldSave(): boolean;
|
|
12
|
+
shouldPublish(): boolean;
|
|
13
|
+
getFieldGroupId(): string;
|
|
14
|
+
getNewFieldGroupId(): string;
|
|
15
|
+
toActions(): EditorLayoutChangeFieldGroupIdAction[];
|
|
16
|
+
toPlanMessage(): PlanMessage;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Intent from '../base-intent';
|
|
2
|
+
import { PlanMessage } from '../../interfaces/plan-message';
|
|
3
|
+
import { EditorLayoutCreateFieldGroupAction } from '../../action/editor-layout/editor-layout-create-field-group';
|
|
4
|
+
export default class EditorLayoutCreateFieldGroupIntent extends Intent {
|
|
5
|
+
isEditorInterfaceIntent(): boolean;
|
|
6
|
+
isEditorLayoutUpdate(): boolean;
|
|
7
|
+
isFieldGroupCreate(): boolean;
|
|
8
|
+
isGroupable(): boolean;
|
|
9
|
+
groupsWith(other: Intent): boolean;
|
|
10
|
+
endsGroup(): boolean;
|
|
11
|
+
shouldSave(): boolean;
|
|
12
|
+
shouldPublish(): boolean;
|
|
13
|
+
toActions(): EditorLayoutCreateFieldGroupAction[];
|
|
14
|
+
toPlanMessage(): PlanMessage;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Intent from '../base-intent';
|
|
2
|
+
import { PlanMessage } from '../../interfaces/plan-message';
|
|
3
|
+
import { EditorLayoutCreateAction } from '../../action/editor-layout/editor-layout-create';
|
|
4
|
+
export default class EditorLayoutCreateIntent extends Intent {
|
|
5
|
+
isEditorInterfaceIntent(): boolean;
|
|
6
|
+
requiresContentType(): boolean;
|
|
7
|
+
isEditorLayoutCreate(): boolean;
|
|
8
|
+
isGroupable(): boolean;
|
|
9
|
+
groupsWith(): boolean;
|
|
10
|
+
endsGroup(): boolean;
|
|
11
|
+
shouldSave(): boolean;
|
|
12
|
+
shouldPublish(): boolean;
|
|
13
|
+
toActions(): EditorLayoutCreateAction[];
|
|
14
|
+
toPlanMessage(): PlanMessage;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Intent from '../base-intent';
|
|
2
|
+
import { PlanMessage } from '../../interfaces/plan-message';
|
|
3
|
+
import { EditorLayoutDeleteFieldGroupAction } from '../../action/editor-layout/editor-layout-delete-field-group';
|
|
4
|
+
export default class EditorLayoutDeleteFieldGroupIntent extends Intent {
|
|
5
|
+
isEditorInterfaceIntent(): boolean;
|
|
6
|
+
isEditorLayoutUpdate(): boolean;
|
|
7
|
+
isFieldGroupDelete(): boolean;
|
|
8
|
+
isGroupable(): boolean;
|
|
9
|
+
groupsWith(other: Intent): boolean;
|
|
10
|
+
endsGroup(): boolean;
|
|
11
|
+
shouldSave(): boolean;
|
|
12
|
+
shouldPublish(): boolean;
|
|
13
|
+
toActions(): EditorLayoutDeleteFieldGroupAction[];
|
|
14
|
+
toPlanMessage(): PlanMessage;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Intent from '../base-intent';
|
|
2
|
+
import { PlanMessage } from '../../interfaces/plan-message';
|
|
3
|
+
import { EditorLayoutDeleteAction } from '../../action/editor-layout/editor-layout-delete';
|
|
4
|
+
export default class EditorLayoutDeleteIntent extends Intent {
|
|
5
|
+
isEditorInterfaceIntent(): boolean;
|
|
6
|
+
isEditorLayoutDelete(): boolean;
|
|
7
|
+
isGroupable(): boolean;
|
|
8
|
+
groupsWith(): boolean;
|
|
9
|
+
endsGroup(): boolean;
|
|
10
|
+
shouldSave(): boolean;
|
|
11
|
+
shouldPublish(): boolean;
|
|
12
|
+
toActions(): EditorLayoutDeleteAction[];
|
|
13
|
+
toPlanMessage(): PlanMessage;
|
|
14
|
+
}
|