contentful-migration 4.7.0 → 4.8.1
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 +3 -3
- package/README.md +1 -0
- package/built/bin/cli.js +32 -31
- package/built/bin/cli.js.map +1 -1
- package/built/bin/lib/config.js +12 -11
- package/built/bin/lib/config.js.map +1 -1
- package/built/bin/lib/contentful-client/index.js +3 -3
- package/built/bin/lib/contentful-client/index.js.map +1 -1
- package/built/bin/lib/contentful-client/proxy.js +1 -1
- package/built/bin/lib/contentful-client/proxy.js.map +1 -1
- package/built/bin/lib/render-migration.js +12 -12
- package/built/bin/lib/render-migration.js.map +1 -1
- package/built/bin/lib/steps-errors.js +15 -13
- package/built/bin/lib/steps-errors.js.map +1 -1
- package/built/bin/lib/write-errors-to-log.js +1 -1
- package/built/bin/usage-params.js +4 -4
- package/built/bin/usage-params.js.map +1 -1
- package/built/lib/action/action.js.map +1 -1
- package/built/lib/action/content-type-create.js.map +1 -1
- package/built/lib/action/content-type-delete.js.map +1 -1
- package/built/lib/action/content-type-publish.js.map +1 -1
- package/built/lib/action/content-type-save.js.map +1 -1
- package/built/lib/action/content-type-unpublish.js.map +1 -1
- package/built/lib/action/content-type-update.js.map +1 -1
- package/built/lib/action/editorinterface-copy.js.map +1 -1
- package/built/lib/action/editorinterface-reset.js.map +1 -1
- package/built/lib/action/editorinterface-save.js.map +1 -1
- package/built/lib/action/editorinterface-update.js.map +1 -1
- package/built/lib/action/entry-derive.js +7 -5
- package/built/lib/action/entry-derive.js.map +1 -1
- package/built/lib/action/entry-field-purge.js.map +1 -1
- package/built/lib/action/entry-field-rename.js.map +1 -1
- package/built/lib/action/entry-set-tags.js +1 -1
- package/built/lib/action/entry-set-tags.js.map +1 -1
- package/built/lib/action/entry-transform-to-type.js +6 -4
- package/built/lib/action/entry-transform-to-type.js.map +1 -1
- package/built/lib/action/entry-transform.js +2 -2
- package/built/lib/action/entry-transform.js.map +1 -1
- package/built/lib/action/entryeditor-configure.js.map +1 -1
- package/built/lib/action/entryeditor-reset-to-default.js.map +1 -1
- package/built/lib/action/entryeditors-configure.js.map +1 -1
- package/built/lib/action/field-action.js.map +1 -1
- package/built/lib/action/field-create.js.map +1 -1
- package/built/lib/action/field-move.js.map +1 -1
- package/built/lib/action/field-rename.js.map +1 -1
- package/built/lib/action/field-update.js.map +1 -1
- package/built/lib/action/sidebar-reset-to-default.js.map +1 -1
- package/built/lib/action/sidebarwidget-add.js.map +1 -1
- package/built/lib/action/sidebarwidget-remove.js.map +1 -1
- package/built/lib/action/sidebarwidget-update.js.map +1 -1
- package/built/lib/action/sidebarwidget.js.map +1 -1
- package/built/lib/action/tag-create.js.map +1 -1
- package/built/lib/action/tag-delete.js.map +1 -1
- package/built/lib/action/tag-save.js.map +1 -1
- package/built/lib/action/tag-update.js.map +1 -1
- package/built/lib/entities/content-type.js +20 -18
- package/built/lib/entities/content-type.js.map +1 -1
- package/built/lib/entities/entry.js +4 -4
- package/built/lib/entities/entry.js.map +1 -1
- package/built/lib/entities/link.js.map +1 -1
- package/built/lib/entities/tag.js.map +1 -1
- package/built/lib/errors/chunks-validation.js.map +1 -1
- package/built/lib/errors/payload-validation.js.map +1 -1
- package/built/lib/errors/steps-validation.js.map +1 -1
- package/built/lib/fetcher.js +14 -13
- package/built/lib/fetcher.js.map +1 -1
- package/built/lib/intent/base-intent.js +1 -3
- package/built/lib/intent/base-intent.js.map +1 -1
- package/built/lib/intent/composed-intent.js +17 -17
- package/built/lib/intent/composed-intent.js.map +1 -1
- package/built/lib/intent/content-type-create.js +2 -4
- package/built/lib/intent/content-type-create.js.map +1 -1
- package/built/lib/intent/content-type-delete.js +1 -1
- package/built/lib/intent/content-type-delete.js.map +1 -1
- package/built/lib/intent/content-type-update.js +7 -8
- package/built/lib/intent/content-type-update.js.map +1 -1
- package/built/lib/intent/editorinterface-copy.js +2 -4
- package/built/lib/intent/editorinterface-copy.js.map +1 -1
- package/built/lib/intent/editorinterface-reset.js +2 -4
- package/built/lib/intent/editorinterface-reset.js.map +1 -1
- package/built/lib/intent/editorinterface-update.js +6 -10
- package/built/lib/intent/editorinterface-update.js.map +1 -1
- package/built/lib/intent/entry-derive.js +3 -8
- package/built/lib/intent/entry-derive.js.map +1 -1
- package/built/lib/intent/entry-set-tags.js +2 -4
- package/built/lib/intent/entry-set-tags.js.map +1 -1
- package/built/lib/intent/entry-transform-to-type.js +3 -7
- package/built/lib/intent/entry-transform-to-type.js.map +1 -1
- package/built/lib/intent/entry-transform.js +1 -1
- package/built/lib/intent/entry-transform.js.map +1 -1
- package/built/lib/intent/entryeditor-configure.js +1 -1
- package/built/lib/intent/entryeditor-configure.js.map +1 -1
- package/built/lib/intent/entryeditor-reset-to-default.js +1 -1
- package/built/lib/intent/entryeditor-reset-to-default.js.map +1 -1
- package/built/lib/intent/entryeditors-configure.js +1 -1
- package/built/lib/intent/entryeditors-configure.js.map +1 -1
- package/built/lib/intent/field-create.js +10 -9
- package/built/lib/intent/field-create.js.map +1 -1
- package/built/lib/intent/field-delete.js +6 -4
- package/built/lib/intent/field-delete.js.map +1 -1
- package/built/lib/intent/field-move.js +14 -9
- package/built/lib/intent/field-move.js.map +1 -1
- package/built/lib/intent/field-rename.js +6 -4
- package/built/lib/intent/field-rename.js.map +1 -1
- package/built/lib/intent/field-update.js +11 -8
- package/built/lib/intent/field-update.js.map +1 -1
- package/built/lib/intent/sidebar-reset-to-default.js +1 -1
- package/built/lib/intent/sidebar-reset-to-default.js.map +1 -1
- package/built/lib/intent/sidebarwidget-add.js +9 -12
- package/built/lib/intent/sidebarwidget-add.js.map +1 -1
- package/built/lib/intent/sidebarwidget-remove.js +8 -10
- package/built/lib/intent/sidebarwidget-remove.js.map +1 -1
- package/built/lib/intent/sidebarwidget-update.js +9 -12
- package/built/lib/intent/sidebarwidget-update.js.map +1 -1
- package/built/lib/intent/tag-create.js +2 -4
- package/built/lib/intent/tag-create.js.map +1 -1
- package/built/lib/intent/tag-delete.js +2 -4
- package/built/lib/intent/tag-delete.js.map +1 -1
- package/built/lib/intent/tag-update.js +4 -6
- package/built/lib/intent/tag-update.js.map +1 -1
- package/built/lib/intent-list/index.js +3 -1
- package/built/lib/intent-list/index.js.map +1 -1
- package/built/lib/intent-validator/content-transform.js +1 -1
- package/built/lib/intent-validator/content-transform.js.map +1 -1
- package/built/lib/intent-validator/content-type-update.js +1 -1
- package/built/lib/intent-validator/content-type-update.js.map +1 -1
- package/built/lib/intent-validator/entry-derive.js +1 -1
- package/built/lib/intent-validator/entry-derive.js.map +1 -1
- package/built/lib/intent-validator/entry-set-tags.js +1 -1
- package/built/lib/intent-validator/entry-set-tags.js.map +1 -1
- package/built/lib/intent-validator/entry-transform-to-type.js +1 -1
- package/built/lib/intent-validator/entry-transform-to-type.js.map +1 -1
- package/built/lib/intent-validator/field-movement.js +3 -3
- package/built/lib/intent-validator/field-movement.js.map +1 -1
- package/built/lib/intent-validator/field-update.js +1 -1
- package/built/lib/intent-validator/field-update.js.map +1 -1
- package/built/lib/intent-validator/schema-validator.js +4 -4
- package/built/lib/intent-validator/schema-validator.js.map +1 -1
- package/built/lib/intent-validator/tag-update.js +1 -1
- package/built/lib/intent-validator/tag-update.js.map +1 -1
- package/built/lib/migration-chunks/validation/content-type.js +9 -4
- package/built/lib/migration-chunks/validation/content-type.js.map +1 -1
- package/built/lib/migration-chunks/validation/duplicate-props.js +2 -2
- package/built/lib/migration-chunks/validation/duplicate-props.js.map +1 -1
- package/built/lib/migration-chunks/validation/errors.js.map +1 -1
- package/built/lib/migration-chunks/validation/field.js +3 -1
- package/built/lib/migration-chunks/validation/field.js.map +1 -1
- package/built/lib/migration-chunks/validation/index.js +4 -4
- package/built/lib/migration-chunks/validation/index.js.map +1 -1
- package/built/lib/migration-chunks/validation/tag.js +4 -2
- package/built/lib/migration-chunks/validation/tag.js.map +1 -1
- package/built/lib/migration-parser.js +12 -6
- package/built/lib/migration-parser.js.map +1 -1
- package/built/lib/migration-steps/action-creators.js +2 -2
- package/built/lib/migration-steps/action-creators.js.map +1 -1
- package/built/lib/migration-steps/dispatch-proxy.js +1 -1
- package/built/lib/migration-steps/dispatch-proxy.js.map +1 -1
- package/built/lib/migration-steps/first-external-caller.js.map +1 -1
- package/built/lib/migration-steps/index.js +29 -29
- package/built/lib/migration-steps/index.js.map +1 -1
- package/built/lib/offline-api/index.js +6 -6
- package/built/lib/offline-api/index.js.map +1 -1
- package/built/lib/offline-api/validator/display-field.js.map +1 -1
- package/built/lib/offline-api/validator/errors.js.map +1 -1
- package/built/lib/offline-api/validator/field-deletion.js +4 -2
- package/built/lib/offline-api/validator/field-deletion.js.map +1 -1
- package/built/lib/offline-api/validator/schema/content-type-schema.js +1 -1
- package/built/lib/offline-api/validator/schema/content-type-schema.js.map +1 -1
- package/built/lib/offline-api/validator/schema/field-validations-schema.js +2 -2
- package/built/lib/offline-api/validator/schema/field-validations-schema.js.map +1 -1
- package/built/lib/offline-api/validator/schema/fields-schema.js +14 -6
- package/built/lib/offline-api/validator/schema/fields-schema.js.map +1 -1
- package/built/lib/offline-api/validator/schema/index.js +2 -2
- package/built/lib/offline-api/validator/schema/index.js.map +1 -1
- package/built/lib/offline-api/validator/schema/schema-validation.js +6 -6
- package/built/lib/offline-api/validator/schema/schema-validation.js.map +1 -1
- package/built/lib/offline-api/validator/schema/tag-schema.js +1 -1
- package/built/lib/offline-api/validator/schema/tag-schema.js.map +1 -1
- package/built/lib/offline-api/validator/tag.js +1 -1
- package/built/lib/offline-api/validator/tag.js.map +1 -1
- package/built/lib/offline-api/validator/tags-on-entry.js.map +1 -1
- package/built/lib/offline-api/validator/type-change.js +2 -2
- package/built/lib/offline-api/validator/type-change.js.map +1 -1
- package/built/lib/utils/deprecated.js.map +1 -1
- package/built/lib/utils/is-defined.js.map +1 -1
- package/built/lib/utils/should-publish-local-changes.js.map +1 -1
- package/index.d.ts +130 -83
- package/package.json +24 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-validation.js","sourceRoot":"","sources":["../../../../../src/lib/offline-api/validator/schema/schema-validation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAA2B;AAC3B,+BAA4B;AAC5B,sDAA4B;AAC5B,uDAAqC;AAIrC,+DAAqE;AACrE,6CAAwC;AACxC,mDAAoD;AAqBpD,MAAM,mBAAmB,GAAG,UAAU,WAAwB;IAC5D,MAAM,aAAa,GAAG,WAAW,CAAC,EAAE,CAAA;IACpC,MAAM,EAAE,KAAK,EAAE,GAAG,uCAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE;QACjF,UAAU,EAAE,KAAK;KAClB,CAAC,CAAA;IAEF,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,EAAE,CAAA;KACV;IAED,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAA0B,EAAE;QAClE,IAAI,IAAI,KAAK,cAAc,EAAE;YAC3B,OAAO;gBACL,IAAI,EAAE,gBAAgB;gBACtB,OAAO,EAAE,gBAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC;aAC3D,CAAA;SACF;QACD,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACrE,OAAO;gBACL,IAAI,EAAE,gBAAgB;gBACtB,OAAO,EAAE,gBAAa,CAAC,WAAW,CAAC,eAAe,CAAC,aAAa,EAAE,gCAAU,CAAC;aAC9E,CAAA;SACF;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"schema-validation.js","sourceRoot":"","sources":["../../../../../src/lib/offline-api/validator/schema/schema-validation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAA2B;A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AAO;oBACL,IAAI,EAAE,gBAAgB;oBACtB,OAAO,EAAE,gBAAa,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,CAAC,OAAO,CAAC,GAAG,CAAC;iBAClF,CAAA;aACF;YAED,IAAI,IAAI,KAAK,2BAA2B,EAAE;gBACxC,OAAO;oBACL,IAAI,EAAE,gBAAgB;oBACtB,OAAO,EAAE,gBAAa,CAAC,KAAK,CAAC,WAAW,CAAC,uCAAuC,CAC9E,OAAO,CAAC,IAAI,CACb;iBACF,CAAA;aACF;YAED,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;gBAC1B,MAAM,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;gBAC1C,MAAM,UAAU,GAAG,IAAA,iBAAM,EAAC,IAAA,YAAK,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAA;gBAE7C,OAAO;oBACL,IAAI,EAAE,gBAAgB;oBACtB,OAAO,EAAE,gBAAa,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,CACnE,OAAO,CAAC,GAAG,EACX,YAAY,EACZ,UAAU,CACX;iBACF,CAAA;aACF;SACF;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAE6B,wCAAc"}
|
|
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
14
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
15
|
if (mod && mod.__esModule) return mod;
|
|
16
16
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
18
|
__setModuleDefault(result, mod);
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-schema.js","sourceRoot":"","sources":["../../../../../src/lib/offline-api/validator/schema/tag-schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA0B;AAE1B,MAAM,eAAe,GAAG,GAAG,CAAA;AAC3B,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC;IAClC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"tag-schema.js","sourceRoot":"","sources":["../../../../../src/lib/offline-api/validator/schema/tag-schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA0B;AAE1B,MAAM,eAAe,GAAG,GAAG,CAAA;AAC3B,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC;IAClC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAA;AAGO,8BAAS;AADlB,kBAAe,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../../../../src/lib/offline-api/validator/tag.ts"],"names":[],"mappings":";;;AAAA,2BAA6B;AAG7B,kEAAwD;AAOxD,MAAa,kBAAkB;IAA/B;QACS,UAAK,GAAG,CAAC,WAAO,CAAC,OAAO,CAAC,CAAA;IAMlC,CAAC;IAJQ,QAAQ,
|
|
1
|
+
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../../../../src/lib/offline-api/validator/tag.ts"],"names":[],"mappings":";;;AAAA,2BAA6B;AAG7B,kEAAwD;AAOxD,MAAa,kBAAkB;IAA/B;QACS,UAAK,GAAG,CAAC,WAAO,CAAC,OAAO,CAAC,CAAA;IAMlC,CAAC;IAJQ,QAAQ,CAAC,GAAQ;QACtB,MAAM,SAAS,GAAG,IAAA,+BAAW,EAAC,GAAG,CAAC,CAAA;QAClC,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AAPD,gDAOC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags-on-entry.js","sourceRoot":"","sources":["../../../../src/lib/offline-api/validator/tags-on-entry.ts"],"names":[],"mappings":";;;;;AAAA,2BAA6B;AAK7B,sDAAoC;AAEpC,MAAqB,oBAAoB;IAIvC,
|
|
1
|
+
{"version":3,"file":"tags-on-entry.js","sourceRoot":"","sources":["../../../../src/lib/offline-api/validator/tags-on-entry.ts"],"names":[],"mappings":";;;;;AAAA,2BAA6B;AAK7B,sDAAoC;AAEpC,MAAqB,oBAAoB;IAIvC,YAAY,IAAsB;QAH3B,UAAK,GAAG,CAAC,WAAO,CAAC,SAAS,CAAC,CAAA;QAIhC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAEM,QAAQ,CAAC,KAAY;QAC1B,MAAM,MAAM,GAAyB,EAAE,CAAA;QACvC,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAA;QAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAA;QAEzB,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO,MAAM,CAAA;SACd;QAED,+DAA+D;QAC/D,cAAc;QACd,MAAM,mBAAmB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACpD,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAA;YACxB,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAC3B,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,mBAAmB,EAAE;YACxB,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,gBAAa,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;aACzD,CAAC,CAAA;SACH;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAjCD,uCAiCC"}
|
|
@@ -15,8 +15,8 @@ class TypeChangeValidator {
|
|
|
15
15
|
if (!publishedContentType) {
|
|
16
16
|
return errors;
|
|
17
17
|
}
|
|
18
|
-
const fieldsById = lodash_1.keyBy(contentType.fields.toRaw(), 'id');
|
|
19
|
-
const parentFieldsById = lodash_1.keyBy(publishedContentType.fields.toRaw(), 'id');
|
|
18
|
+
const fieldsById = (0, lodash_1.keyBy)(contentType.fields.toRaw(), 'id');
|
|
19
|
+
const parentFieldsById = (0, lodash_1.keyBy)(publishedContentType.fields.toRaw(), 'id');
|
|
20
20
|
for (const fieldId of Object.keys(fieldsById)) {
|
|
21
21
|
const parentField = parentFieldsById[fieldId];
|
|
22
22
|
// we don't care about a type change if the previous change was a deletion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-change.js","sourceRoot":"","sources":["../../../../src/lib/offline-api/validator/type-change.ts"],"names":[],"mappings":";;;;;AACA,2BAA6B;AAG7B,sDAAoC;AACpC,mCAA8B;AAE9B,MAAqB,mBAAmB;IAAxC;QACS,UAAK,GAAG,CAAC,WAAO,CAAC,eAAe,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"type-change.js","sourceRoot":"","sources":["../../../../src/lib/offline-api/validator/type-change.ts"],"names":[],"mappings":";;;;;AACA,2BAA6B;AAG7B,sDAAoC;AACpC,mCAA8B;AAE9B,MAAqB,mBAAmB;IAAxC;QACS,UAAK,GAAG,CAAC,WAAO,CAAC,eAAe,CAAC,CAAA;IAsC1C,CAAC;IApCQ,QAAQ,CAAC,EACd,WAAW,EACX,oBAAoB,EACe;QACnC,MAAM,MAAM,GAAyB,EAAE,CAAA;QAEvC,IAAI,CAAC,oBAAoB,EAAE;YACzB,OAAO,MAAM,CAAA;SACd;QAED,MAAM,UAAU,GAAG,IAAA,cAAK,EAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAA;QAC1D,MAAM,gBAAgB,GAAG,IAAA,cAAK,EAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAA;QAEzE,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YAC7C,MAAM,WAAW,GAAU,gBAAgB,CAAC,OAAO,CAAC,CAAA;YAEpD,0EAA0E;YAC1E,IAAI,WAAW,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;gBACvC,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,CAAA;gBAC1C,MAAM,eAAe,GAAG,WAAW,CAAC,IAAI,CAAA;gBAExC,IAAI,SAAS,KAAK,eAAe,EAAE;oBACjC,MAAM,CAAC,IAAI,CAAC;wBACV,IAAI,EAAE,eAAe;wBACrB,OAAO,EAAE,gBAAa,CAAC,KAAK,CAAC,cAAc,CACzC,OAAO,EACP,WAAW,CAAC,EAAE,EACd,eAAe,EACf,SAAS,CACV;qBACF,CAAC,CAAA;iBACH;aACF;SACF;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAvCD,sCAuCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../../src/lib/utils/deprecated.ts"],"names":[],"mappings":";;;AAAA,SAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../../src/lib/utils/deprecated.ts"],"names":[],"mappings":";;;AAAA,SAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW;IAClD,OAAO,CAAC,IAAI,CACV,uBAAuB,MAAM,2CAA2C,WAAW,UAAU,CAC9F,CAAA;AACH,CAAC;AAJD,4CAIC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-defined.js","sourceRoot":"","sources":["../../../src/lib/utils/is-defined.ts"],"names":[],"mappings":";;AAAA,SAAwB,SAAS,
|
|
1
|
+
{"version":3,"file":"is-defined.js","sourceRoot":"","sources":["../../../src/lib/utils/is-defined.ts"],"names":[],"mappings":";;AAAA,SAAwB,SAAS,CAAI,KAA2B;IAC9D,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAA;AAC9C,CAAC;AAFD,4BAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"should-publish-local-changes.js","sourceRoot":"","sources":["../../../src/lib/utils/should-publish-local-changes.ts"],"names":[],"mappings":";;AAEA;;;;;;GAMG;AAEH,SAAwB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"should-publish-local-changes.js","sourceRoot":"","sources":["../../../src/lib/utils/should-publish-local-changes.ts"],"names":[],"mappings":";;AAEA;;;;;;GAMG;AAEH,SAAwB,yBAAyB,CAC/C,aAAmC,EACnC,KAAY;IAEZ,IAAI,aAAa,KAAK,IAAI,EAAE;QAC1B,OAAO,IAAI,CAAA;KACZ;SAAM,IAAI,aAAa,KAAK,KAAK,EAAE;QAClC,OAAO,KAAK,CAAA;KACb;SAAM,IAAI,aAAa,KAAK,UAAU,EAAE;QACvC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACtB,OAAO,KAAK,CAAA;SACb;QACD,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;YAC1C,OAAO,KAAK,CAAA;SACb;QACD,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,gBAAgB,GAAG,CAAC,CAAA;QACxE,OAAO,CAAC,qBAAqB,CAAA;KAC9B;SAAM;QACL,OAAO,KAAK,CAAA;KACb;AACH,CAAC;AApBD,4CAoBC"}
|
package/index.d.ts
CHANGED
|
@@ -7,9 +7,10 @@ export type RunMigrationConfig = {
|
|
|
7
7
|
proxy?: string
|
|
8
8
|
rawProxy?: boolean
|
|
9
9
|
yes?: boolean
|
|
10
|
+
retryLimit?: number
|
|
10
11
|
} & ({ filePath: string } | { migrationFunction: MigrationFunction })
|
|
11
12
|
|
|
12
|
-
export function runMigration
|
|
13
|
+
export function runMigration(config: RunMigrationConfig): Promise<any>
|
|
13
14
|
|
|
14
15
|
export interface Movement {
|
|
15
16
|
toTheTop(): void
|
|
@@ -18,7 +19,18 @@ export interface Movement {
|
|
|
18
19
|
afterField(field: string): void
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
type FieldType =
|
|
22
|
+
type FieldType =
|
|
23
|
+
| 'Symbol'
|
|
24
|
+
| 'Text'
|
|
25
|
+
| 'Integer'
|
|
26
|
+
| 'Number'
|
|
27
|
+
| 'Date'
|
|
28
|
+
| 'Boolean'
|
|
29
|
+
| 'Object'
|
|
30
|
+
| 'Location'
|
|
31
|
+
| 'RichText'
|
|
32
|
+
| 'Array'
|
|
33
|
+
| 'Link'
|
|
22
34
|
|
|
23
35
|
export interface IFieldOptions {
|
|
24
36
|
newId?: string
|
|
@@ -81,30 +93,44 @@ export interface Field {
|
|
|
81
93
|
defaultValue(defaultValue: { [locale: string]: any }): Field
|
|
82
94
|
}
|
|
83
95
|
|
|
84
|
-
type LinkMimetype =
|
|
85
|
-
|
|
96
|
+
type LinkMimetype =
|
|
97
|
+
| 'attachment'
|
|
98
|
+
| 'plaintext'
|
|
99
|
+
| 'image'
|
|
100
|
+
| 'audio'
|
|
101
|
+
| 'video'
|
|
102
|
+
| 'richtext'
|
|
103
|
+
| 'presentation'
|
|
104
|
+
| 'spreadsheet'
|
|
105
|
+
| 'pdfdocument'
|
|
106
|
+
| 'archive'
|
|
107
|
+
| 'code'
|
|
108
|
+
| 'markup'
|
|
86
109
|
|
|
87
110
|
export interface IValidation {
|
|
88
111
|
/** Takes an array of content type ids and validates that the link points to an entry of that content type. */
|
|
89
|
-
linkContentType?: string[]
|
|
112
|
+
linkContentType?: string[]
|
|
90
113
|
/** Takes an array of values and validates that the field value is in this array. */
|
|
91
|
-
in?: string[] | number[]
|
|
114
|
+
in?: string[] | number[]
|
|
92
115
|
/** Takes a MIME type group name and validates that the link points to an asset of this group. */
|
|
93
|
-
linkMimetypeGroup?: LinkMimetype[]
|
|
116
|
+
linkMimetypeGroup?: LinkMimetype[]
|
|
94
117
|
/** Takes min and/or max parameters and validates the size of the array (number of objects in it). */
|
|
95
|
-
size?: { max?: number
|
|
118
|
+
size?: { max?: number; min?: number }
|
|
96
119
|
/** Takes min and/or max parameters and validates the range of a value. */
|
|
97
|
-
range?: { max?: number
|
|
120
|
+
range?: { max?: number; min?: number }
|
|
98
121
|
/** Takes a string that reflects a JS regex and flags, validates against a string. See JS reference for the parameters. */
|
|
99
|
-
regexp?: { pattern: string
|
|
122
|
+
regexp?: { pattern: string; flags?: string }
|
|
100
123
|
/** Validates that there are no other entries that have the same field value at the time of publication. */
|
|
101
|
-
unique?: true
|
|
124
|
+
unique?: true
|
|
102
125
|
/** Validates that a value falls within a certain range of dates. */
|
|
103
|
-
dateRange?: { min?: string
|
|
126
|
+
dateRange?: { min?: string; max?: string }
|
|
104
127
|
/** Validates that an image asset is of a certain image dimension. */
|
|
105
|
-
assetImageDimensions?: {
|
|
128
|
+
assetImageDimensions?: {
|
|
129
|
+
width: { min?: number; max?: number }
|
|
130
|
+
height: { min?: number; max?: number }
|
|
131
|
+
}
|
|
106
132
|
/** Validates that an asset is of a certain file size. */
|
|
107
|
-
assetFileSize?: { max?: number
|
|
133
|
+
assetFileSize?: { max?: number; min?: number }
|
|
108
134
|
|
|
109
135
|
message?: string
|
|
110
136
|
|
|
@@ -115,7 +141,6 @@ export interface IValidation {
|
|
|
115
141
|
export type WidgetSettingsValue = number | boolean | string | undefined
|
|
116
142
|
|
|
117
143
|
export interface IEditorInterfaceOptions {
|
|
118
|
-
|
|
119
144
|
/** This help text will show up below the field. */
|
|
120
145
|
helpText?: string
|
|
121
146
|
/** (only for fields of type boolean) Shows this text next to the radio button that sets this value to true. Defaults to “Yes”. */
|
|
@@ -154,18 +179,18 @@ export interface ContentType {
|
|
|
154
179
|
displayField(displayField: string): ContentType
|
|
155
180
|
|
|
156
181
|
/** Creates a field with provided id. */
|
|
157
|
-
createField
|
|
182
|
+
createField(id: string, init?: IFieldOptions): Field
|
|
158
183
|
|
|
159
184
|
/** Edits the field of provided id. */
|
|
160
|
-
editField
|
|
185
|
+
editField(id: string, init?: IFieldOptions): Field
|
|
161
186
|
|
|
162
|
-
moveField
|
|
187
|
+
moveField(id: string): Movement
|
|
163
188
|
|
|
164
189
|
/** Shorthand method to omit a field, publish its content type, and then delete the field. This implies that associated content for the field will be lost. */
|
|
165
|
-
deleteField
|
|
190
|
+
deleteField(id: string): void
|
|
166
191
|
|
|
167
192
|
/** Changes the field's ID. */
|
|
168
|
-
changeFieldId
|
|
193
|
+
changeFieldId(oldId: string, newId: string): void
|
|
169
194
|
|
|
170
195
|
/**
|
|
171
196
|
*
|
|
@@ -173,7 +198,11 @@ export interface ContentType {
|
|
|
173
198
|
* @param widgetId The new widget ID for the field.
|
|
174
199
|
* @param settings Widget settings
|
|
175
200
|
*/
|
|
176
|
-
configureEntryEditor(
|
|
201
|
+
configureEntryEditor(
|
|
202
|
+
widgetNamespace: 'builtin' | 'extension' | 'app',
|
|
203
|
+
widgetId: string,
|
|
204
|
+
settings?: IEditorInterfaceOptions
|
|
205
|
+
): void
|
|
177
206
|
|
|
178
207
|
/**
|
|
179
208
|
* Changes the control of given field's ID.
|
|
@@ -183,26 +212,36 @@ export interface ContentType {
|
|
|
183
212
|
* @param widgetId The new widget ID for the field.
|
|
184
213
|
* @param settings Widget settings
|
|
185
214
|
*/
|
|
186
|
-
changeFieldControl
|
|
215
|
+
changeFieldControl(
|
|
216
|
+
fieldId: string,
|
|
217
|
+
widgetNamespace: 'builtin' | 'extension' | 'app',
|
|
218
|
+
widgetId: string,
|
|
219
|
+
settings?: IEditorInterfaceOptions
|
|
220
|
+
): void
|
|
187
221
|
|
|
188
222
|
/**
|
|
189
223
|
* @deprecated
|
|
190
224
|
* Use change field control instead
|
|
191
225
|
*/
|
|
192
|
-
changeEditorInterface
|
|
226
|
+
changeEditorInterface(
|
|
227
|
+
fieldId: string,
|
|
228
|
+
widgetId: string,
|
|
229
|
+
settings?: IEditorInterfaceOptions,
|
|
230
|
+
widgetNamespace?: 'builtin' | 'extension'
|
|
231
|
+
): void
|
|
193
232
|
|
|
194
233
|
/**
|
|
195
234
|
* Resets the field control of given field's ID.
|
|
196
235
|
*
|
|
197
236
|
* @param fieldId The ID of the field.
|
|
198
237
|
*/
|
|
199
|
-
resetFieldControl
|
|
238
|
+
resetFieldControl(fieldId: string): void
|
|
200
239
|
|
|
201
240
|
/**
|
|
202
241
|
* @deprecated
|
|
203
242
|
* Use resetFieldControl instead
|
|
204
243
|
*/
|
|
205
|
-
resetEditorInterface
|
|
244
|
+
resetEditorInterface(fieldId: string): void
|
|
206
245
|
|
|
207
246
|
/**
|
|
208
247
|
* copies the control settings from a field to another field in the same content type.
|
|
@@ -210,13 +249,13 @@ export interface ContentType {
|
|
|
210
249
|
* @param sourceFieldId The ID of the field to copy the control setting from.
|
|
211
250
|
* @param destinationFieldId The ID of the field to apply the copied control setting to.
|
|
212
251
|
*/
|
|
213
|
-
copyFieldControl
|
|
252
|
+
copyFieldControl(sourceFieldId: string, destinationFieldId: string): void
|
|
214
253
|
|
|
215
254
|
/**
|
|
216
255
|
* @deprecated
|
|
217
256
|
* Use copyFieldControl instead
|
|
218
257
|
*/
|
|
219
|
-
copyEditorInterface
|
|
258
|
+
copyEditorInterface(sourceFieldId: string, destinationFieldId: string): void
|
|
220
259
|
|
|
221
260
|
/**
|
|
222
261
|
* Adds a builtin or custom widget to the sidebar of the content type.
|
|
@@ -226,10 +265,12 @@ export interface ContentType {
|
|
|
226
265
|
* @param settings Instance settings for the widget
|
|
227
266
|
* @param insertBeforeWidgetId Insert widget above this widget in the sidebar. If null, the widget will be added to the end.
|
|
228
267
|
*/
|
|
229
|
-
addSidebarWidget
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
268
|
+
addSidebarWidget(
|
|
269
|
+
widgetNamespace: 'sidebar-builtin' | 'extension' | 'app',
|
|
270
|
+
widgetId: string,
|
|
271
|
+
settings?: ISidebarWidgetSettings,
|
|
272
|
+
insertBeforeWidgetId?: string | null
|
|
273
|
+
): void
|
|
233
274
|
|
|
234
275
|
/**
|
|
235
276
|
* Updates the configuration of a widget in the sidebar of the content type.
|
|
@@ -238,9 +279,11 @@ export interface ContentType {
|
|
|
238
279
|
* @param widgetId The ID of the widget to update.
|
|
239
280
|
* @param settings Instance settings for the widget
|
|
240
281
|
*/
|
|
241
|
-
updateSidebarWidget
|
|
242
|
-
|
|
243
|
-
|
|
282
|
+
updateSidebarWidget(
|
|
283
|
+
widgetNamespace: 'sidebar-builtin' | 'extension' | 'app',
|
|
284
|
+
widgetId: string,
|
|
285
|
+
settings: ISidebarWidgetSettings
|
|
286
|
+
): void
|
|
244
287
|
|
|
245
288
|
/**
|
|
246
289
|
* Removes a widget from the sidebar of the content type.
|
|
@@ -248,20 +291,22 @@ export interface ContentType {
|
|
|
248
291
|
* @param widgetNamespace The namespace of the widget. Use 'sidebar-builtin' for standard widgets or 'extension' for UI extensions.
|
|
249
292
|
* @param widgetId The ID of the widget to remove.
|
|
250
293
|
*/
|
|
251
|
-
removeSidebarWidget
|
|
252
|
-
|
|
294
|
+
removeSidebarWidget(
|
|
295
|
+
widgetNamespace: 'sidebar-builtin' | 'extension' | 'app',
|
|
296
|
+
widgetId: string
|
|
297
|
+
): void
|
|
253
298
|
|
|
254
299
|
/**
|
|
255
300
|
* Resets the sidebar of the content type to default
|
|
256
301
|
*/
|
|
257
|
-
resetSidebarToDefault
|
|
302
|
+
resetSidebarToDefault(): void
|
|
258
303
|
}
|
|
259
304
|
|
|
260
305
|
export interface IContentTypeOptions {
|
|
261
306
|
/** Name of the content type. */
|
|
262
|
-
name: string
|
|
307
|
+
name: string
|
|
263
308
|
/** Description of the content type. */
|
|
264
|
-
description?: string
|
|
309
|
+
description?: string
|
|
265
310
|
/** ID of the field to use as the display field for the content type. */
|
|
266
311
|
displayField?: string
|
|
267
312
|
}
|
|
@@ -270,11 +315,11 @@ type ContentFields = { [field: string]: { [locale: string]: any } }
|
|
|
270
315
|
|
|
271
316
|
export interface ITransformEntriesConfig {
|
|
272
317
|
/** (required) – Content type ID */
|
|
273
|
-
contentType: string
|
|
318
|
+
contentType: string
|
|
274
319
|
/** (required) – Array of the source field IDs */
|
|
275
|
-
from: string[]
|
|
320
|
+
from: string[]
|
|
276
321
|
/** (required) – Array of the target field IDs */
|
|
277
|
-
to: string[]
|
|
322
|
+
to: string[]
|
|
278
323
|
/**
|
|
279
324
|
* (required) – Transformation function to be applied.
|
|
280
325
|
*
|
|
@@ -282,27 +327,27 @@ export interface ITransformEntriesConfig {
|
|
|
282
327
|
* locale one of the locales in the space being transformed
|
|
283
328
|
*
|
|
284
329
|
* The return value must be an object with the same keys as specified in to. Their values will be written to the respective entry fields for the current locale (i.e. {nameField: 'myNewValue'}). If it returns undefined, this the values for this locale on the entry will be left untouched.
|
|
285
|
-
|
|
286
|
-
transformEntryForLocale: (fromFields: ContentFields, currentLocale: string) => any
|
|
330
|
+
*/
|
|
331
|
+
transformEntryForLocale: (fromFields: ContentFields, currentLocale: string) => any
|
|
287
332
|
/** (optional) – If true, the transformed entries will be published. If false, they will remain in draft state. When the value is set to "preserve" items will be published only if the original entry was published as well (default true) */
|
|
288
|
-
shouldPublish?: boolean|
|
|
333
|
+
shouldPublish?: boolean | 'preserve'
|
|
289
334
|
}
|
|
290
335
|
|
|
291
336
|
export interface ITransformEntriesToTypeConfig {
|
|
292
337
|
/** (required) – Content type ID of source entries */
|
|
293
|
-
sourceContentType: string
|
|
338
|
+
sourceContentType: string
|
|
294
339
|
/** (required) – Targeted Content type ID */
|
|
295
|
-
targetContentType: string
|
|
340
|
+
targetContentType: string
|
|
296
341
|
/** (optional) – Array of the source field IDs, returns complete list of fields if not configured */
|
|
297
|
-
from?: string[]
|
|
342
|
+
from?: string[]
|
|
298
343
|
/** (required) - Function to create a new entry ID for the target entry */
|
|
299
|
-
identityKey: (fromFields: ContentFields) => string
|
|
344
|
+
identityKey: (fromFields: ContentFields) => string
|
|
300
345
|
/** (optional) – Flag that specifies publishing of target entries, preserve will keep current states of the source entries (default false) */
|
|
301
|
-
shouldPublish?: boolean|
|
|
346
|
+
shouldPublish?: boolean | 'preserve'
|
|
302
347
|
/** (optional) – Flag that specifies if linking entries should be updated with target entries (default false) */
|
|
303
|
-
updateReferences?: boolean
|
|
348
|
+
updateReferences?: boolean
|
|
304
349
|
/** (optional) – Flag that specifies if source entries should be deleted (default false). Note that this flag does not support Rich Text Fields references. */
|
|
305
|
-
removeOldEntries?: boolean
|
|
350
|
+
removeOldEntries?: boolean
|
|
306
351
|
/**
|
|
307
352
|
* (required) – Transformation function to be applied.
|
|
308
353
|
*
|
|
@@ -310,8 +355,8 @@ export interface ITransformEntriesToTypeConfig {
|
|
|
310
355
|
* locale one of the locales in the space being transformed
|
|
311
356
|
*
|
|
312
357
|
* The return value must be an object with the same keys as specified in to. Their values will be written to the respective entry fields for the current locale (i.e. {nameField: 'myNewValue'}). If it returns undefined, this the values for this locale on the entry will be left untouched.
|
|
313
|
-
|
|
314
|
-
transformEntryForLocale: (fromFields: ContentFields, currentLocale: string) => any
|
|
358
|
+
*/
|
|
359
|
+
transformEntryForLocale: (fromFields: ContentFields, currentLocale: string) => any
|
|
315
360
|
}
|
|
316
361
|
|
|
317
362
|
export interface IDeriveLinkedEntriesConfig {
|
|
@@ -319,44 +364,44 @@ export interface IDeriveLinkedEntriesConfig {
|
|
|
319
364
|
* (required) – Source content type ID
|
|
320
365
|
*
|
|
321
366
|
* This is the content type which has the 'from' fields
|
|
322
|
-
|
|
323
|
-
contentType: string
|
|
367
|
+
*/
|
|
368
|
+
contentType: string
|
|
324
369
|
/**
|
|
325
370
|
* (required) – Target content type ID
|
|
326
371
|
*
|
|
327
372
|
* This is the content type that the link points to
|
|
328
373
|
*/
|
|
329
|
-
derivedContentType: string
|
|
374
|
+
derivedContentType: string
|
|
330
375
|
/**
|
|
331
376
|
* (required) – Array of the source field IDs
|
|
332
377
|
*
|
|
333
378
|
* The values in these fields on the source content type
|
|
334
379
|
* will be given to "deriveEntryForLocale"
|
|
335
380
|
*/
|
|
336
|
-
from: string[]
|
|
381
|
+
from: string[]
|
|
337
382
|
/** (required) – ID of the field on the source content type in which to insert the reference */
|
|
338
|
-
toReferenceField: string
|
|
383
|
+
toReferenceField: string
|
|
339
384
|
/**
|
|
340
385
|
* (required) – Array of the field IDs on the target content type
|
|
341
386
|
*
|
|
342
387
|
* The fields returned from "deriveEntryForLocale" will be written to these fields
|
|
343
388
|
* on the new instance of the derived content type.
|
|
344
389
|
*/
|
|
345
|
-
derivedFields: string[]
|
|
390
|
+
derivedFields: string[]
|
|
346
391
|
/**
|
|
347
392
|
* (required) - Called once per source entry. Returns the ID used for the derived entry, which is also used for de-duplication so that multiple source entries can link to the same derived entry.
|
|
348
393
|
* fields is an object containing each of the from fields. Each field will contain their current localized values (i.e. fields == {myField: {'en-US': 'my field value'}})
|
|
349
394
|
*/
|
|
350
|
-
identityKey: (fromFields: ContentFields) => string
|
|
395
|
+
identityKey: (fromFields: ContentFields) => string
|
|
351
396
|
/** (optional) – If true, both the source and the derived entries will be published. If false, both will remain in draft state. If preserve, will keep current states of the source entries (default true) */
|
|
352
|
-
shouldPublish?: boolean | 'preserve'
|
|
397
|
+
shouldPublish?: boolean | 'preserve'
|
|
353
398
|
/**
|
|
354
399
|
* (required) – Function that generates the field values for the derived entry.
|
|
355
400
|
* fields is an object containing each of the from fields. Each field will contain their current localized values (i.e. fields == {myField: {'en-US': 'my field value'}})
|
|
356
401
|
* locale one of the locales in the space being transformed
|
|
357
402
|
*
|
|
358
403
|
* The return value must be an object with the same keys as specified in derivedFields. Their values will be written to the respective new entry fields for the current locale (i.e. {nameField: 'myNewValue'})
|
|
359
|
-
|
|
404
|
+
*/
|
|
360
405
|
deriveEntryForLocale: (inputFields: ContentFields, locale: string) => { [field: string]: any }
|
|
361
406
|
}
|
|
362
407
|
|
|
@@ -371,12 +416,12 @@ export interface ITag {
|
|
|
371
416
|
|
|
372
417
|
export interface ITagOptions {
|
|
373
418
|
/** Name of the tag. */
|
|
374
|
-
name: string
|
|
419
|
+
name: string
|
|
375
420
|
}
|
|
376
421
|
|
|
377
422
|
export interface ITagLink {
|
|
378
423
|
sys: {
|
|
379
|
-
id: string
|
|
424
|
+
id: string
|
|
380
425
|
type: 'Link'
|
|
381
426
|
linkType: 'Tag'
|
|
382
427
|
}
|
|
@@ -384,9 +429,9 @@ export interface ITagLink {
|
|
|
384
429
|
|
|
385
430
|
export interface ISetTagsForEntriesConfig {
|
|
386
431
|
/** (required) – Content type ID */
|
|
387
|
-
contentType: string
|
|
432
|
+
contentType: string
|
|
388
433
|
/** (required) – Array of the source field IDs */
|
|
389
|
-
from: string[]
|
|
434
|
+
from: string[]
|
|
390
435
|
/**
|
|
391
436
|
* (required) – Transformation function to be applied.
|
|
392
437
|
*
|
|
@@ -396,11 +441,14 @@ export interface ISetTagsForEntriesConfig {
|
|
|
396
441
|
*
|
|
397
442
|
* The return value must be an array with TagLinks. The corresponding tags will be attached to the entry. If the transformation function returns undefined, the entry will be left untouched.
|
|
398
443
|
*
|
|
399
|
-
|
|
400
|
-
setTagsForEntry: (
|
|
444
|
+
*/
|
|
445
|
+
setTagsForEntry: (
|
|
446
|
+
entryFields: ContentFields,
|
|
447
|
+
entryTags: ITagLink[],
|
|
448
|
+
apiTags: ITagLink[]
|
|
449
|
+
) => ITagLink[] | undefined
|
|
401
450
|
}
|
|
402
451
|
|
|
403
|
-
|
|
404
452
|
/**
|
|
405
453
|
* The main interface for creating and editing content types.
|
|
406
454
|
*/
|
|
@@ -419,38 +467,38 @@ export default interface Migration {
|
|
|
419
467
|
* @param id string – The ID of the content type.
|
|
420
468
|
* @param init Object – Content type definition
|
|
421
469
|
*/
|
|
422
|
-
createContentType
|
|
470
|
+
createContentType(id: string, init?: IContentTypeOptions): ContentType
|
|
423
471
|
|
|
424
472
|
/**
|
|
425
473
|
* Edits an existing content type of provided id and returns a reference to the content type. Uses the same options as createContentType.
|
|
426
474
|
* @param id string – The ID of the content type.
|
|
427
475
|
* @param changes Object – Content type definition
|
|
428
476
|
*/
|
|
429
|
-
editContentType
|
|
477
|
+
editContentType(id: string, changes?: IContentTypeOptions): ContentType
|
|
430
478
|
|
|
431
479
|
/**
|
|
432
480
|
* Deletes the content type with the provided id and returns undefined. Note that the content type must not have any entries.
|
|
433
481
|
* @param id string – The ID of the content type.
|
|
434
482
|
*/
|
|
435
|
-
deleteContentType
|
|
483
|
+
deleteContentType(id: string): void
|
|
436
484
|
|
|
437
485
|
/**
|
|
438
486
|
* For the given content type, transforms all its entries according to the user-provided transformEntryForLocale function. For each entry, the CLI will call this function once per locale in the space, passing in the from fields and the locale as arguments. The transform function is expected to return an object with the desired target fields. If it returns undefined, this entry locale will be left untouched.
|
|
439
487
|
* @param transformation
|
|
440
488
|
*/
|
|
441
|
-
transformEntries
|
|
489
|
+
transformEntries(transformation: ITransformEntriesConfig): void
|
|
442
490
|
|
|
443
491
|
/**
|
|
444
492
|
* For the given content type, transforms all its entries according to the user-provided transformEntryForLocale function into a new content type. For each entry, the CLI will call this function once per locale in the space, passing in the from fields and the locale as arguments. The transform function is expected to return an object with the desired target fields. If it returns undefined, this entry locale will be left untouched
|
|
445
493
|
* @param transformation
|
|
446
494
|
*/
|
|
447
|
-
transformEntriesToType
|
|
495
|
+
transformEntriesToType(transformation: ITransformEntriesToTypeConfig): void
|
|
448
496
|
|
|
449
497
|
/**
|
|
450
498
|
* For each entry of the given content type (source entry), derives a new entry and sets up a reference to it on the source entry. The content of the new entry is generated by the user-provided deriveEntryForLocale function. For each source entry, this function will be called as many times as there are locales in the space. Each time, it will be called with the from fields and one of the locales as arguments. The derive function is expected to return an object with the desired target fields. If it returns undefined, the new entry will have no values for the current locale.
|
|
451
499
|
* @param transformation
|
|
452
500
|
*/
|
|
453
|
-
deriveLinkedEntries
|
|
501
|
+
deriveLinkedEntries(transformation: IDeriveLinkedEntriesConfig): void
|
|
454
502
|
|
|
455
503
|
/**
|
|
456
504
|
* Creates a tag with provided id and returns a reference to the newly created tag.
|
|
@@ -465,34 +513,33 @@ export default interface Migration {
|
|
|
465
513
|
* @param init Object – Tag definition
|
|
466
514
|
* @param tagVisibility string - Whether the tag should be public or private
|
|
467
515
|
*/
|
|
468
|
-
createTag
|
|
516
|
+
createTag(id: string, init?: ITagOptions, tagVisibility?: TagVisibility): ITag
|
|
469
517
|
|
|
470
518
|
/**
|
|
471
519
|
* Edits an existing tag of provided id and returns a reference to the tag. Uses the same options as createTag.
|
|
472
520
|
* @param id string – The ID of the tag.
|
|
473
521
|
* @param changes Object – Tag definition
|
|
474
522
|
*/
|
|
475
|
-
editTag
|
|
523
|
+
editTag(id: string, changes?: ITagOptions): ITag
|
|
476
524
|
|
|
477
525
|
/**
|
|
478
526
|
* Deletes the tag with the provided id and returns undefined.
|
|
479
527
|
* @param id string – The ID of the tag.
|
|
480
528
|
*/
|
|
481
|
-
deleteTag
|
|
529
|
+
deleteTag(id: string): void
|
|
482
530
|
|
|
483
531
|
/**
|
|
484
532
|
* For the given content type, transforms all its entries according to the user-provided transformEntryForLocale function. For each entry, the CLI will call this function once per locale in the space, passing in the from fields and the locale as arguments. The transform function is expected to return an object with the desired target fields. If it returns undefined, this entry locale will be left untouched.
|
|
485
533
|
* @param transformation
|
|
486
534
|
*/
|
|
487
|
-
setTagsForEntries
|
|
488
|
-
|
|
535
|
+
setTagsForEntries(transformation: ISetTagsForEntriesConfig): void
|
|
489
536
|
}
|
|
490
537
|
|
|
491
538
|
export interface ClientConfig {
|
|
492
539
|
accessToken?: string
|
|
493
540
|
spaceId?: string
|
|
494
|
-
environmentId?: string
|
|
495
|
-
proxy?: string
|
|
541
|
+
environmentId?: string
|
|
542
|
+
proxy?: string
|
|
496
543
|
rawProxy?: boolean
|
|
497
544
|
}
|
|
498
545
|
|