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.
- package/CHANGELOG.md +2 -2
- package/package.json +1 -1
- package/built/bin/cli.d.ts +0 -9
- package/built/bin/lib/config.d.ts +0 -13
- package/built/bin/lib/contentful-client/index.d.ts +0 -2
- package/built/bin/lib/contentful-client/proxy.d.ts +0 -19
- package/built/bin/lib/render-migration.d.ts +0 -5
- package/built/bin/lib/steps-errors.d.ts +0 -3
- package/built/bin/lib/write-errors-to-log.d.ts +0 -2
- package/built/bin/usage-params.d.ts +0 -2
- package/built/index.d.ts +0 -1
- package/built/lib/action/action.d.ts +0 -18
- package/built/lib/action/content-type-annotate.d.ts +0 -11
- package/built/lib/action/content-type-create.d.ts +0 -8
- package/built/lib/action/content-type-delete.d.ts +0 -8
- package/built/lib/action/content-type-publish.d.ts +0 -8
- package/built/lib/action/content-type-save.d.ts +0 -8
- package/built/lib/action/content-type-unpublish.d.ts +0 -8
- package/built/lib/action/content-type-update.d.ts +0 -11
- package/built/lib/action/editor-layout/editor-layout-change-field-group-control.d.ts +0 -13
- package/built/lib/action/editor-layout/editor-layout-create-field-group.d.ts +0 -12
- package/built/lib/action/editor-layout/editor-layout-create.d.ts +0 -8
- package/built/lib/action/editor-layout/editor-layout-delete-field-group.d.ts +0 -21
- package/built/lib/action/editor-layout/editor-layout-delete.d.ts +0 -10
- package/built/lib/action/editor-layout/editor-layout-move-field.d.ts +0 -13
- package/built/lib/action/editor-layout/editor-layout-update-field-group.d.ts +0 -22
- package/built/lib/action/editorinterface-copy.d.ts +0 -14
- package/built/lib/action/editorinterface-reset.d.ts +0 -12
- package/built/lib/action/editorinterface-save.d.ts +0 -8
- package/built/lib/action/editorinterface-update.d.ts +0 -16
- package/built/lib/action/entry-derive.d.ts +0 -15
- package/built/lib/action/entry-field-purge.d.ts +0 -9
- package/built/lib/action/entry-field-rename.d.ts +0 -11
- package/built/lib/action/entry-set-tags.d.ts +0 -10
- package/built/lib/action/entry-transform-to-type.d.ts +0 -16
- package/built/lib/action/entry-transform.d.ts +0 -11
- package/built/lib/action/entryeditor-configure.d.ts +0 -17
- package/built/lib/action/entryeditor-reset-to-default.d.ts +0 -10
- package/built/lib/action/entryeditor.d.ts +0 -8
- package/built/lib/action/entryeditors-configure.d.ts +0 -21
- package/built/lib/action/field-action.d.ts +0 -10
- package/built/lib/action/field-annotate.d.ts +0 -12
- package/built/lib/action/field-create.d.ts +0 -7
- package/built/lib/action/field-move.d.ts +0 -9
- package/built/lib/action/field-rename.d.ts +0 -15
- package/built/lib/action/field-update.d.ts +0 -10
- package/built/lib/action/sidebar-reset-to-default.d.ts +0 -10
- package/built/lib/action/sidebarwidget-add.d.ts +0 -16
- package/built/lib/action/sidebarwidget-remove.d.ts +0 -13
- package/built/lib/action/sidebarwidget-update.d.ts +0 -15
- package/built/lib/action/sidebarwidget.d.ts +0 -13
- package/built/lib/action/tag-create.d.ts +0 -12
- package/built/lib/action/tag-delete.d.ts +0 -8
- package/built/lib/action/tag-save.d.ts +0 -10
- package/built/lib/action/tag-update.d.ts +0 -11
- package/built/lib/entities/content-type.d.ts +0 -90
- package/built/lib/entities/entry.d.ts +0 -28
- package/built/lib/entities/link.d.ts +0 -15
- package/built/lib/entities/tag.d.ts +0 -18
- package/built/lib/errors/chunks-validation.d.ts +0 -5
- package/built/lib/errors/editorinterfaces-fetching.d.ts +0 -4
- package/built/lib/errors/index.d.ts +0 -6
- package/built/lib/errors/payload-validation.d.ts +0 -5
- package/built/lib/errors/space-access.d.ts +0 -4
- package/built/lib/errors/steps-validation.d.ts +0 -5
- package/built/lib/fetcher.d.ts +0 -19
- package/built/lib/intent/base-intent.d.ts +0 -64
- package/built/lib/intent/composed-intent.d.ts +0 -62
- package/built/lib/intent/content-type-annotate.d.ts +0 -11
- package/built/lib/intent/content-type-create.d.ts +0 -10
- package/built/lib/intent/content-type-delete.d.ts +0 -13
- package/built/lib/intent/content-type-update.d.ts +0 -10
- package/built/lib/intent/editor-layout/editor-layout-change-field-group-control.d.ts +0 -15
- package/built/lib/intent/editor-layout/editor-layout-change-field-group-id.d.ts +0 -17
- package/built/lib/intent/editor-layout/editor-layout-create-field-group.d.ts +0 -15
- package/built/lib/intent/editor-layout/editor-layout-create.d.ts +0 -15
- package/built/lib/intent/editor-layout/editor-layout-delete-field-group.d.ts +0 -15
- package/built/lib/intent/editor-layout/editor-layout-delete.d.ts +0 -14
- package/built/lib/intent/editor-layout/editor-layout-invalid-method.d.ts +0 -12
- package/built/lib/intent/editor-layout/editor-layout-move-field.d.ts +0 -18
- package/built/lib/intent/editor-layout/editor-layout-update-field-group.d.ts +0 -15
- package/built/lib/intent/editorinterface-copy.d.ts +0 -14
- package/built/lib/intent/editorinterface-reset.d.ts +0 -14
- package/built/lib/intent/editorinterface-update.d.ts +0 -15
- package/built/lib/intent/entry-derive.d.ts +0 -14
- package/built/lib/intent/entry-set-tags.d.ts +0 -13
- package/built/lib/intent/entry-transform-to-type.d.ts +0 -15
- package/built/lib/intent/entry-transform.d.ts +0 -13
- package/built/lib/intent/entryeditor-configure.d.ts +0 -14
- package/built/lib/intent/entryeditor-reset-to-default.d.ts +0 -14
- package/built/lib/intent/entryeditors-configure.d.ts +0 -14
- package/built/lib/intent/field-annotate.d.ts +0 -10
- package/built/lib/intent/field-create.d.ts +0 -10
- package/built/lib/intent/field-delete.d.ts +0 -13
- package/built/lib/intent/field-move.d.ts +0 -13
- package/built/lib/intent/field-rename.d.ts +0 -20
- package/built/lib/intent/field-update.d.ts +0 -10
- package/built/lib/intent/index.d.ts +0 -38
- package/built/lib/intent/sidebar-reset-to-default.d.ts +0 -14
- package/built/lib/intent/sidebarwidget-add.d.ts +0 -15
- package/built/lib/intent/sidebarwidget-remove.d.ts +0 -15
- package/built/lib/intent/sidebarwidget-update.d.ts +0 -15
- package/built/lib/intent/tag-create.d.ts +0 -16
- package/built/lib/intent/tag-delete.d.ts +0 -15
- package/built/lib/intent/tag-update.d.ts +0 -14
- package/built/lib/intent-list/index.d.ts +0 -17
- package/built/lib/intent-validator/content-transform.d.ts +0 -17
- package/built/lib/intent-validator/content-type-update.d.ts +0 -13
- package/built/lib/intent-validator/entry-derive.d.ts +0 -20
- package/built/lib/intent-validator/entry-set-tags.d.ts +0 -15
- package/built/lib/intent-validator/entry-transform-to-type.d.ts +0 -19
- package/built/lib/intent-validator/field-movement.d.ts +0 -21
- package/built/lib/intent-validator/field-update.d.ts +0 -23
- package/built/lib/intent-validator/schema-validator.d.ts +0 -19
- package/built/lib/intent-validator/tag-update.d.ts +0 -11
- package/built/lib/interfaces/annotation.d.ts +0 -41
- package/built/lib/interfaces/api-entry.d.ts +0 -19
- package/built/lib/interfaces/api-fetcher.d.ts +0 -10
- package/built/lib/interfaces/api-tag-link.d.ts +0 -7
- package/built/lib/interfaces/api-tag.d.ts +0 -9
- package/built/lib/interfaces/content-transform.d.ts +0 -6
- package/built/lib/interfaces/content-type.d.ts +0 -95
- package/built/lib/interfaces/entry-derive.d.ts +0 -9
- package/built/lib/interfaces/entry-set-tags.d.ts +0 -6
- package/built/lib/interfaces/entry-transform-to-type.d.ts +0 -10
- package/built/lib/interfaces/errors.d.ts +0 -35
- package/built/lib/interfaces/intent-validator.d.ts +0 -6
- package/built/lib/interfaces/intent.d.ts +0 -60
- package/built/lib/interfaces/plan-message.d.ts +0 -10
- package/built/lib/interfaces/raw-step.d.ts +0 -89
- package/built/lib/interfaces/request.d.ts +0 -12
- package/built/lib/migration-chunks/validation/content-type.d.ts +0 -4
- package/built/lib/migration-chunks/validation/duplicate-props.d.ts +0 -3
- package/built/lib/migration-chunks/validation/editor-layout.d.ts +0 -5
- package/built/lib/migration-chunks/validation/errors.d.ts +0 -23
- package/built/lib/migration-chunks/validation/field.d.ts +0 -8
- package/built/lib/migration-chunks/validation/index.d.ts +0 -19
- package/built/lib/migration-chunks/validation/tag.d.ts +0 -4
- package/built/lib/migration-parser.d.ts +0 -16
- package/built/lib/migration-steps/action-creators.d.ts +0 -53
- package/built/lib/migration-steps/dispatch-proxy.d.ts +0 -6
- package/built/lib/migration-steps/first-external-caller.d.ts +0 -3
- package/built/lib/migration-steps/index.d.ts +0 -3
- package/built/lib/offline-api/index.d.ts +0 -80
- package/built/lib/offline-api/validator/annotations.d.ts +0 -9
- package/built/lib/offline-api/validator/content-type.d.ts +0 -13
- package/built/lib/offline-api/validator/display-field.d.ts +0 -9
- package/built/lib/offline-api/validator/editor-interface.d.ts +0 -11
- package/built/lib/offline-api/validator/entry.d.ts +0 -7
- package/built/lib/offline-api/validator/errors.d.ts +0 -48
- package/built/lib/offline-api/validator/field-deletion.d.ts +0 -7
- package/built/lib/offline-api/validator/field-groups-count.d.ts +0 -8
- package/built/lib/offline-api/validator/schema/content-type-schema.d.ts +0 -5
- package/built/lib/offline-api/validator/schema/editor-layout-schema.d.ts +0 -2
- package/built/lib/offline-api/validator/schema/field-validations-schema.d.ts +0 -3
- package/built/lib/offline-api/validator/schema/fields-schema.d.ts +0 -2
- package/built/lib/offline-api/validator/schema/index.d.ts +0 -10
- package/built/lib/offline-api/validator/schema/schema-validation.d.ts +0 -8
- package/built/lib/offline-api/validator/schema/tag-schema.d.ts +0 -4
- package/built/lib/offline-api/validator/tag.d.ts +0 -12
- package/built/lib/offline-api/validator/tags-on-entry.d.ts +0 -11
- package/built/lib/offline-api/validator/type-change.d.ts +0 -7
- package/built/lib/utils/deprecated.d.ts +0 -1
- package/built/lib/utils/editor-layout.d.ts +0 -26
- package/built/lib/utils/is-defined.d.ts +0 -1
- package/built/lib/utils/should-publish-local-changes.d.ts +0 -9
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import IntentList from '../intent-list/index';
|
|
2
|
-
import { ContentType } from '../entities/content-type';
|
|
3
|
-
export default interface APIFetcher {
|
|
4
|
-
getEntriesInIntents(intentList: IntentList): any;
|
|
5
|
-
getContentTypesInChunks(intentList: IntentList): any;
|
|
6
|
-
getEditorInterfacesInIntents(intentList: IntentList): any;
|
|
7
|
-
getLocalesForSpace(): any;
|
|
8
|
-
checkContentTypesForDeletedCts(intentList: IntentList, contentTypes: ContentType[]): any;
|
|
9
|
-
getTagsForEnvironment(intentList: IntentList): any;
|
|
10
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { AnnotationLink } from './annotation';
|
|
2
|
-
interface Field {
|
|
3
|
-
id: string;
|
|
4
|
-
newId?: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
type?: string;
|
|
7
|
-
linkType?: string;
|
|
8
|
-
items?: {
|
|
9
|
-
type: string;
|
|
10
|
-
linkType?: string;
|
|
11
|
-
validations?: any[];
|
|
12
|
-
};
|
|
13
|
-
omitted?: boolean;
|
|
14
|
-
deleted?: boolean;
|
|
15
|
-
localized?: boolean;
|
|
16
|
-
required?: boolean;
|
|
17
|
-
validations?: any[];
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
defaultValue?: {
|
|
20
|
-
[locale: string]: any;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
declare type ContentTypeMetadata = {
|
|
24
|
-
annotations?: {
|
|
25
|
-
ContentType?: AnnotationLink[];
|
|
26
|
-
ContentTypeField?: Record<string, AnnotationLink[]>;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
interface APIContentType {
|
|
30
|
-
sys: {
|
|
31
|
-
id: string;
|
|
32
|
-
version: number;
|
|
33
|
-
};
|
|
34
|
-
fields: Field[];
|
|
35
|
-
name: string;
|
|
36
|
-
description?: string;
|
|
37
|
-
displayField?: string;
|
|
38
|
-
metadata?: ContentTypeMetadata;
|
|
39
|
-
}
|
|
40
|
-
declare type APIParameterValue = number | boolean | string;
|
|
41
|
-
interface APIEditorInterfaceSettings {
|
|
42
|
-
[setting: string]: APIParameterValue;
|
|
43
|
-
}
|
|
44
|
-
declare type APISidebarWidgetNamespace = 'sidebar-builtin' | 'extension' | 'app';
|
|
45
|
-
declare type APIControlWidgetNamespace = 'builtin' | 'extension' | 'app';
|
|
46
|
-
interface APIEditorInterfaceControl {
|
|
47
|
-
fieldId: string;
|
|
48
|
-
widgetId?: string;
|
|
49
|
-
widgetNamespace?: APIControlWidgetNamespace;
|
|
50
|
-
settings?: APIEditorInterfaceSettings;
|
|
51
|
-
}
|
|
52
|
-
interface APIEditorInterfaceGroupControl {
|
|
53
|
-
groupId: string;
|
|
54
|
-
widgetId?: string;
|
|
55
|
-
widgetNamespace?: string;
|
|
56
|
-
settings?: APIEditorInterfaceSettings;
|
|
57
|
-
}
|
|
58
|
-
interface APISidebarWidgetSettings {
|
|
59
|
-
[key: string]: APIParameterValue;
|
|
60
|
-
}
|
|
61
|
-
interface APIEditorInterfaceSidebar {
|
|
62
|
-
widgetId: string;
|
|
63
|
-
widgetNamespace: APISidebarWidgetNamespace;
|
|
64
|
-
disabled?: boolean;
|
|
65
|
-
settings?: APISidebarWidgetSettings;
|
|
66
|
-
}
|
|
67
|
-
interface APIEditorIntefaceEditor {
|
|
68
|
-
widgetId: string;
|
|
69
|
-
widgetNamespace: APIControlWidgetNamespace;
|
|
70
|
-
settings?: {
|
|
71
|
-
[key: string]: APIParameterValue;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
interface APIEditorLayoutFieldGroupItem {
|
|
75
|
-
groupId: string;
|
|
76
|
-
name?: string;
|
|
77
|
-
items: APIEditorLayoutItem[];
|
|
78
|
-
}
|
|
79
|
-
interface APIEditorLayoutFieldItem {
|
|
80
|
-
fieldId: string;
|
|
81
|
-
}
|
|
82
|
-
declare type APIEditorLayoutItem = APIEditorLayoutFieldItem | APIEditorLayoutFieldGroupItem;
|
|
83
|
-
declare type APIEditorInterfaceEditorLayout = APIEditorLayoutFieldGroupItem[];
|
|
84
|
-
interface APIEditorInterfaces {
|
|
85
|
-
sys: {
|
|
86
|
-
version: number;
|
|
87
|
-
};
|
|
88
|
-
controls: APIEditorInterfaceControl[];
|
|
89
|
-
sidebar?: APIEditorInterfaceSidebar[];
|
|
90
|
-
editor?: APIEditorIntefaceEditor;
|
|
91
|
-
editors?: APIEditorIntefaceEditor[];
|
|
92
|
-
editorLayout?: APIEditorInterfaceEditorLayout;
|
|
93
|
-
groupControls?: APIEditorInterfaceGroupControl[];
|
|
94
|
-
}
|
|
95
|
-
export { APIContentType as default, APIContentType, Field, APIEditorInterfaces, APIEditorInterfaceControl, APIEditorInterfaceGroupControl, APIEditorInterfaceSettings, APIEditorInterfaceSidebar, APIEditorIntefaceEditor, APIEditorInterfaceEditorLayout, APIEditorLayoutFieldGroupItem, APISidebarWidgetSettings, APIControlWidgetNamespace, APISidebarWidgetNamespace, ContentTypeMetadata };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export default interface EntryDerive {
|
|
2
|
-
derivedContentType: string;
|
|
3
|
-
from: string[];
|
|
4
|
-
toReferenceField: string;
|
|
5
|
-
derivedFields: string[];
|
|
6
|
-
identityKey: (fromFields: any) => Promise<string>;
|
|
7
|
-
shouldPublish?: boolean | 'preserve';
|
|
8
|
-
deriveEntryForLocale(inputFields: any, locale: string): Promise<any>;
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default interface TransformEntryToType {
|
|
2
|
-
sourceContentType: string;
|
|
3
|
-
targetContentType: string;
|
|
4
|
-
from?: string[];
|
|
5
|
-
identityKey: (fromFields: any) => Promise<string>;
|
|
6
|
-
shouldPublish?: boolean | 'preserve';
|
|
7
|
-
removeOldEntries?: boolean;
|
|
8
|
-
updateReferences?: boolean;
|
|
9
|
-
transformEntryForLocale(inputFields: any, locale: string): Promise<any>;
|
|
10
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Intent } from './intent';
|
|
2
|
-
interface ValidationError {
|
|
3
|
-
type: string;
|
|
4
|
-
message: string;
|
|
5
|
-
details?: {
|
|
6
|
-
intent: Intent;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
interface PayloadValidationError extends ValidationError {
|
|
10
|
-
type: 'InvalidPayload';
|
|
11
|
-
message: string;
|
|
12
|
-
}
|
|
13
|
-
interface InvalidActionError extends ValidationError {
|
|
14
|
-
type: 'InvalidAction';
|
|
15
|
-
message: string;
|
|
16
|
-
}
|
|
17
|
-
interface InvalidTypeError extends ValidationError {
|
|
18
|
-
type: 'InvalidType';
|
|
19
|
-
message: string;
|
|
20
|
-
details: {
|
|
21
|
-
intent: Intent;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
interface InvalidMovementError extends ValidationError {
|
|
25
|
-
type: 'InvalidMovement';
|
|
26
|
-
message: string;
|
|
27
|
-
details: {
|
|
28
|
-
intent: Intent;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
interface InvalidPropertyError extends ValidationError {
|
|
32
|
-
type: 'InvalidProperty';
|
|
33
|
-
message: string;
|
|
34
|
-
}
|
|
35
|
-
export { ValidationError as default, PayloadValidationError, InvalidActionError, InvalidTypeError, InvalidMovementError, InvalidPropertyError };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { APIAction, EntityAction } from '../action/action';
|
|
2
|
-
import RawStep from './raw-step';
|
|
3
|
-
import { PlanMessage } from './plan-message';
|
|
4
|
-
interface Intent {
|
|
5
|
-
toActions(): (APIAction | EntityAction)[];
|
|
6
|
-
toRaw(): RawStep;
|
|
7
|
-
getContentTypeId(): string;
|
|
8
|
-
getRelatedContentTypeIds(): string[];
|
|
9
|
-
getFieldId(): string;
|
|
10
|
-
getInvalidMethod(): string;
|
|
11
|
-
getFieldGroupId(): string;
|
|
12
|
-
getNewFieldGroupId(): string;
|
|
13
|
-
getFieldGroupProps(): {
|
|
14
|
-
[prop: string]: string;
|
|
15
|
-
};
|
|
16
|
-
getRawType(): string;
|
|
17
|
-
getTagId(): string;
|
|
18
|
-
requiresAllEntries(): boolean;
|
|
19
|
-
requiresAllTags(): boolean;
|
|
20
|
-
requiresContentType(): boolean;
|
|
21
|
-
shouldSave(): boolean;
|
|
22
|
-
shouldPublish(): boolean;
|
|
23
|
-
isContentTypeUpdate(): boolean;
|
|
24
|
-
isContentTypeDelete(): boolean;
|
|
25
|
-
isContentTypeCreate(): boolean;
|
|
26
|
-
isFieldCreate(): boolean;
|
|
27
|
-
isFieldUpdate(): boolean;
|
|
28
|
-
isFieldDelete(): boolean;
|
|
29
|
-
isFieldRename(): boolean;
|
|
30
|
-
isFieldMove(): boolean;
|
|
31
|
-
isAboutContentType(): boolean;
|
|
32
|
-
isAboutField(): boolean;
|
|
33
|
-
isAboutEditorLayout(): boolean;
|
|
34
|
-
isContentTransform(): boolean;
|
|
35
|
-
isEntryDerive(): boolean;
|
|
36
|
-
isEntryTransformToType(): boolean;
|
|
37
|
-
isGroupable(): boolean;
|
|
38
|
-
isEditorInterfaceIntent(): boolean;
|
|
39
|
-
isEditorInterfaceUpdate(): boolean;
|
|
40
|
-
isSidebarUpdate(): boolean;
|
|
41
|
-
isTagIntent(): boolean;
|
|
42
|
-
isTagCreate(): boolean;
|
|
43
|
-
isTagUpdate(): boolean;
|
|
44
|
-
isTagDelete(): boolean;
|
|
45
|
-
isEntrySetTags(): boolean;
|
|
46
|
-
isEditorLayoutCreate(): boolean;
|
|
47
|
-
isEditorLayoutDelete(): boolean;
|
|
48
|
-
isEditorLayoutUpdate(): boolean;
|
|
49
|
-
isEditorLayoutInvalidMethod(): boolean;
|
|
50
|
-
isFieldGroupCreate(): boolean;
|
|
51
|
-
isFieldGroupDelete(): boolean;
|
|
52
|
-
isFieldGroupUpdate(): boolean;
|
|
53
|
-
isFieldGroupIdChange(): boolean;
|
|
54
|
-
isFieldGroupControlChange(): boolean;
|
|
55
|
-
isComposedIntent(): boolean;
|
|
56
|
-
groupsWith(other: Intent): boolean;
|
|
57
|
-
endsGroup(): boolean;
|
|
58
|
-
toPlanMessage(): PlanMessage;
|
|
59
|
-
}
|
|
60
|
-
export { Intent as default, Intent };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { TagVisibility } from './api-tag';
|
|
2
|
-
import ContentTransform from './content-transform';
|
|
3
|
-
import EntryDerive from './entry-derive';
|
|
4
|
-
import EntrySetTags from './entry-set-tags';
|
|
5
|
-
import TransformEntryToType from './entry-transform-to-type';
|
|
6
|
-
import { SidebarWidgetNamespace, SidebarWidgetSettings } from '../action/sidebarwidget';
|
|
7
|
-
import { EntryEditorNamespace, EntryEditorSettings } from '../action/entryeditor-configure';
|
|
8
|
-
import { EntryEditor } from '../action/entryeditors-configure';
|
|
9
|
-
import { APIEditorInterfaceGroupControl, APIEditorLayoutFieldGroupItem } from './content-type';
|
|
10
|
-
import { AnnotationId } from './annotation';
|
|
11
|
-
interface RawStep {
|
|
12
|
-
type: string;
|
|
13
|
-
meta: RawStepMeta;
|
|
14
|
-
payload: RawStepPayload;
|
|
15
|
-
}
|
|
16
|
-
interface RawStepMeta {
|
|
17
|
-
contentTypeInstanceId?: string;
|
|
18
|
-
fieldInstanceId?: string;
|
|
19
|
-
fieldGroupInstanceId?: string;
|
|
20
|
-
tagInstanceId?: string;
|
|
21
|
-
callsite: CallSiteInfo;
|
|
22
|
-
}
|
|
23
|
-
interface CallSiteInfo {
|
|
24
|
-
line: number;
|
|
25
|
-
file: string;
|
|
26
|
-
}
|
|
27
|
-
interface RawStepPayload {
|
|
28
|
-
contentTypeId?: string;
|
|
29
|
-
fieldId?: string;
|
|
30
|
-
props?: RawStepProps;
|
|
31
|
-
transformation?: ContentTransform;
|
|
32
|
-
derivation?: EntryDerive;
|
|
33
|
-
movement?: Movement;
|
|
34
|
-
entryTransformationToType?: TransformEntryToType;
|
|
35
|
-
editorInterfaceCopy?: EditorInterfaceCopy;
|
|
36
|
-
editorInterfaceReset?: EditorInterfaceReset;
|
|
37
|
-
editorInterface?: EditorInterfaceInfo;
|
|
38
|
-
sidebarWidget?: SidebarWidgetInfo;
|
|
39
|
-
entryEditor?: EntryEditorInfo;
|
|
40
|
-
entryEditors?: EntryEditor[];
|
|
41
|
-
invalidMethod?: string;
|
|
42
|
-
fieldGroupId?: string;
|
|
43
|
-
newFieldGroupId?: string;
|
|
44
|
-
parentFieldGroupId?: string;
|
|
45
|
-
fieldGroupProps?: Omit<APIEditorLayoutFieldGroupItem, 'groupId' | 'items'>;
|
|
46
|
-
groupControl?: Omit<APIEditorInterfaceGroupControl, 'groupId'>;
|
|
47
|
-
tagId?: string;
|
|
48
|
-
tagVisibility?: TagVisibility;
|
|
49
|
-
entryTransformationForTags?: EntrySetTags;
|
|
50
|
-
annotations?: AnnotationId[];
|
|
51
|
-
}
|
|
52
|
-
interface EditorInterfaceInfo {
|
|
53
|
-
fieldId: string;
|
|
54
|
-
widgetId: string;
|
|
55
|
-
widgetNamespace: FieldControlNamespace;
|
|
56
|
-
settings?: FieldControlSettings;
|
|
57
|
-
}
|
|
58
|
-
declare type SettingsParameterValue = number | boolean | string;
|
|
59
|
-
interface FieldControlSettings {
|
|
60
|
-
[setting: string]: SettingsParameterValue;
|
|
61
|
-
}
|
|
62
|
-
declare type FieldControlNamespace = 'builtin' | 'extension';
|
|
63
|
-
interface Movement {
|
|
64
|
-
pivot?: string;
|
|
65
|
-
direction?: string;
|
|
66
|
-
}
|
|
67
|
-
interface EditorInterfaceCopy {
|
|
68
|
-
source?: string;
|
|
69
|
-
destination?: string;
|
|
70
|
-
}
|
|
71
|
-
interface EditorInterfaceReset {
|
|
72
|
-
fieldId: string;
|
|
73
|
-
}
|
|
74
|
-
interface RawStepProps {
|
|
75
|
-
[propName: string]: any;
|
|
76
|
-
}
|
|
77
|
-
export interface SidebarWidgetInfo {
|
|
78
|
-
widgetId: string;
|
|
79
|
-
widgetNamespace?: SidebarWidgetNamespace;
|
|
80
|
-
disabled?: boolean;
|
|
81
|
-
settings?: SidebarWidgetSettings;
|
|
82
|
-
insertBeforeWidgetId?: string;
|
|
83
|
-
}
|
|
84
|
-
export interface EntryEditorInfo {
|
|
85
|
-
widgetId: string;
|
|
86
|
-
widgetNamespace?: EntryEditorNamespace;
|
|
87
|
-
settings?: EntryEditorSettings;
|
|
88
|
-
}
|
|
89
|
-
export { RawStep as default, RawStep, RawStepMeta, CallSiteInfo, RawStepPayload, RawStepProps, EditorInterfaceInfo };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface HttpRequest {
|
|
2
|
-
method: 'PUT' | 'POST' | 'DELETE' | 'GET';
|
|
3
|
-
url: string;
|
|
4
|
-
headers?: object;
|
|
5
|
-
data?: {
|
|
6
|
-
name?: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
displayField?: string;
|
|
9
|
-
fields?: object;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export { HttpRequest as default, HttpRequest };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import Intent from '../../interfaces/intent';
|
|
2
|
-
import { ContentType, EditorInterfaces } from '../../entities/content-type';
|
|
3
|
-
import { InvalidActionError } from '../../interfaces/errors';
|
|
4
|
-
import { FieldsContext } from './index';
|
|
5
|
-
export default function (intents: Intent[], editorInterfaces: Map<string, EditorInterfaces>, fieldsContext: FieldsContext, contentTypes: ContentType[]): InvalidActionError[];
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
interface ErrorGroup {
|
|
2
|
-
[identifier: string]: (id?: any, ...args: any[]) => string;
|
|
3
|
-
}
|
|
4
|
-
interface ErrorCreators {
|
|
5
|
-
field: {
|
|
6
|
-
[groupIdentifier: string]: ErrorGroup;
|
|
7
|
-
};
|
|
8
|
-
contentType: {
|
|
9
|
-
[groupIdentifier: string]: ErrorGroup;
|
|
10
|
-
};
|
|
11
|
-
editorLayout: {
|
|
12
|
-
[groupIdentifier: string]: ErrorGroup;
|
|
13
|
-
};
|
|
14
|
-
entry: {
|
|
15
|
-
[groupIdentifier: string]: ErrorGroup;
|
|
16
|
-
};
|
|
17
|
-
tag: {
|
|
18
|
-
[groupIdentifier: string]: ErrorGroup;
|
|
19
|
-
};
|
|
20
|
-
generic: ErrorGroup;
|
|
21
|
-
}
|
|
22
|
-
declare const errorCreators: ErrorCreators;
|
|
23
|
-
export default errorCreators;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import ValidationError from '../../interfaces/errors';
|
|
2
|
-
import { Intent } from '../../interfaces/intent';
|
|
3
|
-
import { ContentType } from '../../entities/content-type';
|
|
4
|
-
import { FieldsContext } from './index';
|
|
5
|
-
export default function (intents: Intent[], contentTypes?: ContentType[]): {
|
|
6
|
-
errors: ValidationError[];
|
|
7
|
-
fieldsContext: FieldsContext;
|
|
8
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import IntentList from '../../intent-list';
|
|
2
|
-
import { ContentType, EditorInterfaces } from '../../entities/content-type';
|
|
3
|
-
import { Tag } from '../../entities/tag';
|
|
4
|
-
import ValidationError, { InvalidActionError } from '../../interfaces/errors';
|
|
5
|
-
export declare type FieldsContext = {
|
|
6
|
-
contentTypeFields: Record<string, Set<string>>;
|
|
7
|
-
recentlyRemoved: Record<string, Set<string>>;
|
|
8
|
-
recentlyMoved: Record<string, Set<string>>;
|
|
9
|
-
changedFieldIds: Record<string, Map<string, string>>;
|
|
10
|
-
};
|
|
11
|
-
export declare const invalidActionError: (message: any, intent: any) => {
|
|
12
|
-
type: string;
|
|
13
|
-
message: any;
|
|
14
|
-
details: {
|
|
15
|
-
intent: any;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
declare function validateIntents(intentList: IntentList, contentTypes: ContentType[], editorInterfaces: Map<string, EditorInterfaces>, tags: Tag[]): ValidationError[] | InvalidActionError[];
|
|
19
|
-
export { validateIntents as default, validateIntents };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { RequestBatch } from './offline-api';
|
|
2
|
-
import ValidationError, { InvalidActionError } from './interfaces/errors';
|
|
3
|
-
import { ClientConfig } from '../bin/lib/config';
|
|
4
|
-
declare class ParseResult {
|
|
5
|
-
batches: RequestBatch[];
|
|
6
|
-
stepsValidationErrors: ValidationError[];
|
|
7
|
-
payloadValidationErrors: InvalidActionError[] | ValidationError[];
|
|
8
|
-
hasValidationErrors(): boolean;
|
|
9
|
-
hasRuntimeErrors(): boolean;
|
|
10
|
-
hasStepsValidationErrors(): boolean;
|
|
11
|
-
hasPayloadValidationErrors(): boolean;
|
|
12
|
-
getRuntimeErrors(): any[];
|
|
13
|
-
getValidationErrors(): any[];
|
|
14
|
-
}
|
|
15
|
-
declare const createMigrationParser: (makeRequest: Function, config: ClientConfig) => (migrationCreator: (migration: any) => any) => Promise<ParseResult>;
|
|
16
|
-
export { createMigrationParser as default, createMigrationParser, ParseResult };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as Intents from '../intent/index';
|
|
2
|
-
import { TagVisibility } from '../interfaces/api-tag';
|
|
3
|
-
import ContentTransform from '../interfaces/content-transform';
|
|
4
|
-
import EntryDerive from '../interfaces/entry-derive';
|
|
5
|
-
import EntrySetTags from '../interfaces/entry-set-tags';
|
|
6
|
-
import TransformEntryToType from '../interfaces/entry-transform-to-type';
|
|
7
|
-
declare const actionCreators: {
|
|
8
|
-
contentType: {
|
|
9
|
-
create: (id: any, instanceId: any, callsite: any) => Intents.ContentTypeCreate;
|
|
10
|
-
update: (id: any, instanceId: any, callsite: any, property: any, value: any) => Intents.ContentTypeUpdate;
|
|
11
|
-
setAnnotations: (id: any, instanceId: any, callsite: any, annotationIds: any) => Intents.ContentTypeAnnotate;
|
|
12
|
-
delete: (id: any, instanceId: any, callsite: any) => Intents.ContentTypeDelete;
|
|
13
|
-
transformEntries: (id: any, instanceId: any, transformation: ContentTransform, callsite: any) => Intents.EntryTransform;
|
|
14
|
-
deriveLinkedEntries: (id: any, instanceId: any, derivation: EntryDerive, callsite: any) => Intents.EntryDerive;
|
|
15
|
-
transformEntriesToType: (instanceId: number, entryTransformationToType: TransformEntryToType, callsite: any) => Intents.EntryTransformToType;
|
|
16
|
-
changeEditorInterface: (id: any, instanceId: any, callsite: any, fieldId: any, widgetId: any, settings?: {}, widgetNamespace?: any) => Intents.EditorInterfaceUpdate;
|
|
17
|
-
copyEditorInterface: (id: any, instanceId: any, callsite: any, sourceFieldId: any, destinationFieldId: any) => Intents.EditorInterfaceCopy;
|
|
18
|
-
resetEditorInterface: (id: any, instanceId: any, callsite: any, fieldId: any) => Intents.EditorInterfaceReset;
|
|
19
|
-
resetEntryEditor: (id: any, instanceId: any, callsite: any) => Intents.EntryEditorResetToDefault;
|
|
20
|
-
configureEntryEditor: (id: any, instanceId: any, callsite: any, widgetNamespace: any, widgetId: any, settings: any) => Intents.EntryEditorConfigure;
|
|
21
|
-
configureEntryEditors: (id: any, instanceId: any, callsite: any, editors: any) => Intents.EntryEditorsConfigure;
|
|
22
|
-
createEditorLayout: (id: any, instanceId: any, callsite: any) => Intents.EditorLayoutCreate;
|
|
23
|
-
deleteEditorLayout: (contentTypeId: string, contentTypeInstanceId: string, callsite: any) => Intents.EditorLayoutDelete;
|
|
24
|
-
addSidebarWidget: (id: any, instanceId: any, callsite: any, widgetId: any, widgetNamespace: any, insertBeforeWidgetId: any, settings?: {}) => Intents.SidebarWidgetAdd;
|
|
25
|
-
updateSidebarWidget: (id: any, instanceId: any, callsite: any, widgetId: any, widgetNamespace: any, settings?: {}) => Intents.SidebarWidgetUpdate;
|
|
26
|
-
removeSidebarWidget: (id: any, instanceId: any, callsite: any, widgetId: any, widgetNamespace: any) => Intents.SidebarWidgetRemove;
|
|
27
|
-
resetSidebarToDefault: (id: any, instanceId: any, callsite: any) => Intents.SidebarResetToDefault;
|
|
28
|
-
setTagsForEntries: (id: any, instanceId: any, entryTransformationForTags: EntrySetTags, callsite: any) => Intents.EntrySetTags;
|
|
29
|
-
};
|
|
30
|
-
editorLayout: {
|
|
31
|
-
changeFieldGroupControl: (contentTypeId: any, contentTypeInstanceId: any, fieldGroupId: any, callsite: any, groupControl: any) => Intents.EditorLayoutChangeFieldGroupControl;
|
|
32
|
-
createFieldGroup: (id: any, instanceId: any, callsite: any, fieldGroupId: any, parentId?: any) => Intents.EditorLayoutCreateFieldGroup;
|
|
33
|
-
deleteEditorLayoutFieldGroup: (id: any, instanceId: any, callsite: any, fieldGroupId: any) => Intents.EditorLayoutDeleteFieldGroup;
|
|
34
|
-
changeFieldGroupId: (contentTypeId: string, contentTypeInstanceId: string, fieldGroupId: string, newFieldGroupId: string, callsite: any) => Intents.EditorLayoutChangeFieldGroupId;
|
|
35
|
-
callInvalidEditorLayoutMethod: (contentTypeId: any, contentTypeInstanceId: any, callsite: any, invalidMethod: any) => Intents.EditorLayoutInvalidMethod;
|
|
36
|
-
updateFieldGroup: (contentTypeId: any, contentTypeInstanceId: any, fieldGroupId: any, callsite: any, property: any, value: any) => Intents.EditorLayoutUpdateFieldGroup;
|
|
37
|
-
moveField: (contentTypeId: any, contentTypeInstanceId: any, fieldId: any, fieldGroupId: any, movement: any, callsite: any) => Intents.EditorLayoutMoveField;
|
|
38
|
-
};
|
|
39
|
-
field: {
|
|
40
|
-
create: (contentTypeId: any, contentTypeInstanceId: any, fieldId: any, fieldInstanceId: any, callsite: any) => Intents.FieldCreate;
|
|
41
|
-
update: (contentTypeId: any, contentTypeInstanceId: any, fieldId: any, fieldInstanceId: any, callsite: any, property: any, value: any) => Intents.FieldUpdate;
|
|
42
|
-
move: (contentTypeId: any, contentTypeInstanceId: any, fieldId: any, fieldInstanceId: any, callsite: any, movement: any) => Intents.FieldMove;
|
|
43
|
-
rename: (contentTypeId: any, contentTypeInstanceId: any, fieldId: any, fieldInstanceId: any, callsite: any, value: any) => Intents.FieldRename;
|
|
44
|
-
delete: (contentTypeId: any, contentTypeInstanceId: any, fieldId: any, fieldInstanceId: any, callsite: any) => Intents.FieldDelete;
|
|
45
|
-
setAnnotations: (contentTypeId: any, contentTypeInstanceId: any, fieldId: any, fieldInstanceId: any, callsite: any, annotationIds: any) => Intents.FieldAnnotate;
|
|
46
|
-
};
|
|
47
|
-
tag: {
|
|
48
|
-
create: (id: any, instanceId: any, callsite: any, visibility?: TagVisibility) => Intents.TagCreate;
|
|
49
|
-
update: (id: any, instanceId: any, callsite: any, property: any, value: any) => Intents.TagUpdate;
|
|
50
|
-
delete: (id: any, instanceId: any, callsite: any) => Intents.TagDelete;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
export default actionCreators;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { ContentType, EditorInterfaces } from '../entities/content-type';
|
|
2
|
-
import Request from '../interfaces/request';
|
|
3
|
-
import { Entry } from '../entities/entry';
|
|
4
|
-
import { Tag } from '../entities/tag';
|
|
5
|
-
import { PayloadValidationError, InvalidActionError } from '../interfaces/errors';
|
|
6
|
-
import { Intent } from '../interfaces/intent';
|
|
7
|
-
import { TagVisibility } from '../interfaces/api-tag';
|
|
8
|
-
import Link from '../entities/link';
|
|
9
|
-
interface RequestBatch {
|
|
10
|
-
intent: Intent;
|
|
11
|
-
requests: Request[];
|
|
12
|
-
validationErrors: (PayloadValidationError | InvalidActionError)[];
|
|
13
|
-
runtimeErrors: Error[];
|
|
14
|
-
}
|
|
15
|
-
interface OfflineApiOptions {
|
|
16
|
-
contentTypes: Map<String, ContentType>;
|
|
17
|
-
entries: Entry[];
|
|
18
|
-
locales: string[];
|
|
19
|
-
editorInterfacesByContentType?: Map<String, EditorInterfaces>;
|
|
20
|
-
tags?: Map<String, Tag>;
|
|
21
|
-
}
|
|
22
|
-
export declare enum ApiHook {
|
|
23
|
-
SaveContentType = "SAVE_CONTENT_TYPE",
|
|
24
|
-
PublishContentType = "PUBLISH_CONTENT_TYPE",
|
|
25
|
-
UnpublishContentType = "UNPUBLISH_CONTENT_TYPE",
|
|
26
|
-
SaveTag = "SAVE_TAG",
|
|
27
|
-
SaveEntry = "SAVE_ENTRY",
|
|
28
|
-
SaveEditorInterface = "SAVE_EDITOR_INTERFACE"
|
|
29
|
-
}
|
|
30
|
-
declare class OfflineAPI {
|
|
31
|
-
private modifiedContentTypes;
|
|
32
|
-
private savedContentTypes;
|
|
33
|
-
private publishedContentTypes;
|
|
34
|
-
private editorInterfaces;
|
|
35
|
-
private entries;
|
|
36
|
-
private isRecordingRequests;
|
|
37
|
-
private currentRequestsRecorded;
|
|
38
|
-
private currentValidationErrorsRecorded;
|
|
39
|
-
private currentRuntimeErrorsRecorded;
|
|
40
|
-
private intent;
|
|
41
|
-
private requestBatches;
|
|
42
|
-
private contentTypeValidators;
|
|
43
|
-
private editorInterfaceValidators;
|
|
44
|
-
private locales;
|
|
45
|
-
private modifiedTags;
|
|
46
|
-
private savedTags;
|
|
47
|
-
private tagValidators;
|
|
48
|
-
private entryValidators;
|
|
49
|
-
constructor(options: OfflineApiOptions);
|
|
50
|
-
getContentType(id: string): Promise<ContentType>;
|
|
51
|
-
getEditorInterfaces(contentTypeId: string): Promise<EditorInterfaces>;
|
|
52
|
-
hasContentType(id: string): Promise<boolean>;
|
|
53
|
-
createContentType(id: string): Promise<ContentType>;
|
|
54
|
-
saveContentType(id: string): Promise<ContentType>;
|
|
55
|
-
publishContentType(id: string): Promise<ContentType>;
|
|
56
|
-
unpublishContentType(id: string): Promise<ContentType>;
|
|
57
|
-
deleteContentType(id: string): Promise<void>;
|
|
58
|
-
saveEditorInterfaces(contentTypeId: string): Promise<EditorInterfaces>;
|
|
59
|
-
createEntry(contentTypeId: string, id: string): Promise<Entry>;
|
|
60
|
-
saveEntry(id: string): Promise<Entry>;
|
|
61
|
-
hasEntry(id: string): Promise<boolean>;
|
|
62
|
-
publishEntry(id: string): Promise<Entry>;
|
|
63
|
-
unpublishEntry(id: string): Promise<Entry>;
|
|
64
|
-
deleteEntry(id: string): Promise<Entry>;
|
|
65
|
-
getEntriesForContentType(ctId: string): Promise<Entry[]>;
|
|
66
|
-
getLinks(childId: string, locales: string[]): Promise<Link[]>;
|
|
67
|
-
getLocalesForSpace(): Promise<string[]>;
|
|
68
|
-
startRecordingRequests(intent: Intent): Promise<void>;
|
|
69
|
-
stopRecordingRequests(): Promise<void>;
|
|
70
|
-
getRequestBatches(): Promise<RequestBatch[]>;
|
|
71
|
-
createTag(id: string, visibility?: TagVisibility): Promise<Tag>;
|
|
72
|
-
saveTag(id: string): Promise<Tag>;
|
|
73
|
-
deleteTag(id: string): Promise<void>;
|
|
74
|
-
hasTag(id: string): Promise<boolean>;
|
|
75
|
-
getTag(id: string): Promise<Tag>;
|
|
76
|
-
getTagsForEnvironment(): Promise<Map<String, Tag>>;
|
|
77
|
-
recordRuntimeError(error: any): Promise<void>;
|
|
78
|
-
private assertRecording;
|
|
79
|
-
}
|
|
80
|
-
export { OfflineAPI as default, OfflineAPI, RequestBatch };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ApiHook } from '..';
|
|
2
|
-
import { ContentTypePayloadValidator, ContentTypePayloadValidatorOptions } from './content-type';
|
|
3
|
-
import { PayloadValidationError } from '../../interfaces/errors';
|
|
4
|
-
import APIContentType from '../../interfaces/content-type';
|
|
5
|
-
export declare function validateAnnotations(contentType: APIContentType): PayloadValidationError[];
|
|
6
|
-
export default class AnnotationsValidator implements ContentTypePayloadValidator {
|
|
7
|
-
hooks: ApiHook[];
|
|
8
|
-
validate({ contentType }: ContentTypePayloadValidatorOptions): PayloadValidationError[];
|
|
9
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ApiHook } from '../';
|
|
2
|
-
import { ContentType } from '../../entities/content-type';
|
|
3
|
-
import { PayloadValidationError, InvalidActionError } from '../../interfaces/errors';
|
|
4
|
-
export declare type ContentTypePayloadValidatorOptions = {
|
|
5
|
-
contentType: ContentType;
|
|
6
|
-
locales: string[];
|
|
7
|
-
savedContentType?: ContentType;
|
|
8
|
-
publishedContentType?: ContentType;
|
|
9
|
-
};
|
|
10
|
-
export interface ContentTypePayloadValidator {
|
|
11
|
-
hooks: ApiHook[];
|
|
12
|
-
validate(options: ContentTypePayloadValidatorOptions): (InvalidActionError | PayloadValidationError)[];
|
|
13
|
-
}
|