contentful-management 12.0.0-beta.9 → 12.0.0-new-beta.2
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/README.md +101 -107
- package/dist/browser/index.js +23417 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/index.min.js +2 -0
- package/dist/browser/index.min.js.map +1 -0
- package/dist/cjs/index.cjs +14161 -41
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/access-token.mjs +131 -0
- package/dist/esm/adapters/REST/endpoints/access-token.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/ai-action-invocation.mjs +8 -0
- package/dist/esm/adapters/REST/endpoints/ai-action-invocation.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/ai-action.mjs +49 -0
- package/dist/esm/adapters/REST/endpoints/ai-action.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/api-key.mjs +44 -0
- package/dist/esm/adapters/REST/endpoints/api-key.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-access-token.mjs +8 -0
- package/dist/esm/adapters/REST/endpoints/app-access-token.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-action-call.mjs +112 -0
- package/dist/esm/adapters/REST/endpoints/app-action-call.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-action.mjs +36 -0
- package/dist/esm/adapters/REST/endpoints/app-action.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-bundle.mjs +35 -0
- package/dist/esm/adapters/REST/endpoints/app-bundle.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-definition.mjs +45 -0
- package/dist/esm/adapters/REST/endpoints/app-definition.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-details.mjs +14 -0
- package/dist/esm/adapters/REST/endpoints/app-details.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-event-subscription.mjs +14 -0
- package/dist/esm/adapters/REST/endpoints/app-event-subscription.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-installation.mjs +42 -0
- package/dist/esm/adapters/REST/endpoints/app-installation.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-key.mjs +17 -0
- package/dist/esm/adapters/REST/endpoints/app-key.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-signed-request.mjs +8 -0
- package/dist/esm/adapters/REST/endpoints/app-signed-request.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-signing-secret.mjs +14 -0
- package/dist/esm/adapters/REST/endpoints/app-signing-secret.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/app-upload.mjs +25 -0
- package/dist/esm/adapters/REST/endpoints/app-upload.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/asset-key.mjs +32 -0
- package/dist/esm/adapters/REST/endpoints/asset-key.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/asset.mjs +208 -0
- package/dist/esm/adapters/REST/endpoints/asset.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/bulk-action.mjs +29 -0
- package/dist/esm/adapters/REST/endpoints/bulk-action.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/comment.mjs +91 -0
- package/dist/esm/adapters/REST/endpoints/comment.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/concept-scheme.mjs +54 -0
- package/dist/esm/adapters/REST/endpoints/concept-scheme.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/concept.mjs +70 -0
- package/dist/esm/adapters/REST/endpoints/concept.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/content-type.mjs +53 -0
- package/dist/esm/adapters/REST/endpoints/content-type.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/editor-interface.mjs +23 -0
- package/dist/esm/adapters/REST/endpoints/editor-interface.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/entry.mjs +114 -0
- package/dist/esm/adapters/REST/endpoints/entry.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/environment-alias.mjs +41 -0
- package/dist/esm/adapters/REST/endpoints/environment-alias.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/environment-template-installation.mjs +21 -0
- package/dist/esm/adapters/REST/endpoints/environment-template-installation.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/environment-template.mjs +41 -0
- package/dist/esm/adapters/REST/endpoints/environment-template.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/environment.mjs +46 -0
- package/dist/esm/adapters/REST/endpoints/environment.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/extension.mjs +39 -0
- package/dist/esm/adapters/REST/endpoints/extension.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/function-log.mjs +25 -0
- package/dist/esm/adapters/REST/endpoints/function-log.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/function.mjs +22 -0
- package/dist/esm/adapters/REST/endpoints/function.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/http.mjs +23 -0
- package/dist/esm/adapters/REST/endpoints/http.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/index.mjs +142 -0
- package/dist/esm/adapters/REST/endpoints/index.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/locale.mjs +34 -0
- package/dist/esm/adapters/REST/endpoints/locale.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/oauth-application.mjs +142 -0
- package/dist/esm/adapters/REST/endpoints/oauth-application.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/organization-invitation.mjs +27 -0
- package/dist/esm/adapters/REST/endpoints/organization-invitation.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/organization-membership.mjs +30 -0
- package/dist/esm/adapters/REST/endpoints/organization-membership.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/organization.mjs +26 -0
- package/dist/esm/adapters/REST/endpoints/organization.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/personal-access-token.mjs +33 -0
- package/dist/esm/adapters/REST/endpoints/personal-access-token.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/preview-api-key.mjs +13 -0
- package/dist/esm/adapters/REST/endpoints/preview-api-key.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/raw.mjs +55 -0
- package/dist/esm/adapters/REST/endpoints/raw.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/release-action.mjs +21 -0
- package/dist/esm/adapters/REST/endpoints/release-action.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/release-asset.mjs +143 -0
- package/dist/esm/adapters/REST/endpoints/release-asset.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/release-entry.mjs +56 -0
- package/dist/esm/adapters/REST/endpoints/release-entry.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/release.mjs +73 -0
- package/dist/esm/adapters/REST/endpoints/release.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/resource-provider.mjs +15 -0
- package/dist/esm/adapters/REST/endpoints/resource-provider.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/resource-type.mjs +25 -0
- package/dist/esm/adapters/REST/endpoints/resource-type.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/resource.mjs +9 -0
- package/dist/esm/adapters/REST/endpoints/resource.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/role.mjs +43 -0
- package/dist/esm/adapters/REST/endpoints/role.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/scheduled-action.mjs +38 -0
- package/dist/esm/adapters/REST/endpoints/scheduled-action.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/snapshot.mjs +26 -0
- package/dist/esm/adapters/REST/endpoints/snapshot.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/space-member.mjs +9 -0
- package/dist/esm/adapters/REST/endpoints/space-member.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/space-membership.mjs +54 -0
- package/dist/esm/adapters/REST/endpoints/space-membership.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/space.mjs +31 -0
- package/dist/esm/adapters/REST/endpoints/space.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/tag.mjs +31 -0
- package/dist/esm/adapters/REST/endpoints/tag.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/task.mjs +34 -0
- package/dist/esm/adapters/REST/endpoints/task.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/team-membership.mjs +32 -0
- package/dist/esm/adapters/REST/endpoints/team-membership.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/team-space-membership.mjs +46 -0
- package/dist/esm/adapters/REST/endpoints/team-space-membership.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/team.mjs +32 -0
- package/dist/esm/adapters/REST/endpoints/team.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/ui-config.mjs +19 -0
- package/dist/esm/adapters/REST/endpoints/ui-config.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/upload-credentials.mjs +14 -0
- package/dist/esm/adapters/REST/endpoints/upload-credentials.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/upload.mjs +39 -0
- package/dist/esm/adapters/REST/endpoints/upload.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/usage.mjs +15 -0
- package/dist/esm/adapters/REST/endpoints/usage.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/user-ui-config.mjs +19 -0
- package/dist/esm/adapters/REST/endpoints/user-ui-config.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/user.mjs +22 -0
- package/dist/esm/adapters/REST/endpoints/user.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/utils.mjs +22 -0
- package/dist/esm/adapters/REST/endpoints/utils.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/webhook.mjs +85 -0
- package/dist/esm/adapters/REST/endpoints/webhook.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/workflow-definition.mjs +36 -0
- package/dist/esm/adapters/REST/endpoints/workflow-definition.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/workflow.mjs +42 -0
- package/dist/esm/adapters/REST/endpoints/workflow.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/workflows-changelog.mjs +10 -0
- package/dist/esm/adapters/REST/endpoints/workflows-changelog.mjs.map +1 -0
- package/dist/esm/adapters/REST/make-request.mjs +21 -0
- package/dist/esm/adapters/REST/make-request.mjs.map +1 -0
- package/dist/esm/adapters/REST/rest-adapter.mjs +42 -0
- package/dist/esm/adapters/REST/rest-adapter.mjs.map +1 -0
- package/dist/esm/common-types.mjs +7 -0
- package/dist/esm/common-types.mjs.map +1 -0
- package/dist/esm/common-utils.mjs +33 -0
- package/dist/esm/common-utils.mjs.map +1 -0
- package/dist/esm/constants/editor-interface-defaults/controls-defaults.mjs +162 -0
- package/dist/esm/constants/editor-interface-defaults/controls-defaults.mjs.map +1 -0
- package/dist/esm/constants/editor-interface-defaults/editors-defaults.mjs +32 -0
- package/dist/esm/constants/editor-interface-defaults/editors-defaults.mjs.map +1 -0
- package/dist/esm/constants/editor-interface-defaults/index.mjs +13 -0
- package/dist/esm/constants/editor-interface-defaults/index.mjs.map +1 -0
- package/dist/esm/constants/editor-interface-defaults/sidebar-defaults.mjs +65 -0
- package/dist/esm/constants/editor-interface-defaults/sidebar-defaults.mjs.map +1 -0
- package/dist/esm/constants/editor-interface-defaults/types.mjs +16 -0
- package/dist/esm/constants/editor-interface-defaults/types.mjs.map +1 -0
- package/dist/esm/create-adapter.mjs +20 -0
- package/dist/esm/create-adapter.mjs.map +1 -0
- package/dist/esm/create-app-definition-api.mjs +253 -0
- package/dist/esm/create-app-definition-api.mjs.map +1 -0
- package/dist/esm/create-contentful-api.mjs +588 -0
- package/dist/esm/create-contentful-api.mjs.map +1 -0
- package/dist/esm/create-entry-api.mjs +489 -0
- package/dist/esm/create-entry-api.mjs.map +1 -0
- package/dist/esm/create-environment-api.mjs +2441 -0
- package/dist/esm/create-environment-api.mjs.map +1 -0
- package/dist/esm/create-environment-template-api.mjs +272 -0
- package/dist/esm/create-environment-template-api.mjs.map +1 -0
- package/dist/esm/create-organization-api.mjs +1138 -0
- package/dist/esm/create-organization-api.mjs.map +1 -0
- package/dist/esm/create-space-api.mjs +1589 -0
- package/dist/esm/create-space-api.mjs.map +1 -0
- package/dist/esm/create-ui-config-api.mjs +54 -0
- package/dist/esm/create-ui-config-api.mjs.map +1 -0
- package/dist/esm/create-user-ui-config-api.mjs +54 -0
- package/dist/esm/create-user-ui-config-api.mjs.map +1 -0
- package/dist/esm/enhance-with-methods.mjs +25 -0
- package/dist/esm/enhance-with-methods.mjs.map +1 -0
- package/dist/esm/entities/access-token.mjs +34 -0
- package/dist/esm/entities/access-token.mjs.map +1 -0
- package/dist/esm/entities/ai-action-invocation.mjs +17 -0
- package/dist/esm/entities/ai-action-invocation.mjs.map +1 -0
- package/dist/esm/entities/ai-action.mjs +73 -0
- package/dist/esm/entities/ai-action.mjs.map +1 -0
- package/dist/esm/entities/api-key.mjs +54 -0
- package/dist/esm/entities/api-key.mjs.map +1 -0
- package/dist/esm/entities/app-access-token.mjs +16 -0
- package/dist/esm/entities/app-access-token.mjs.map +1 -0
- package/dist/esm/entities/app-action-call.mjs +66 -0
- package/dist/esm/entities/app-action-call.mjs.map +1 -0
- package/dist/esm/entities/app-action.mjs +46 -0
- package/dist/esm/entities/app-action.mjs.map +1 -0
- package/dist/esm/entities/app-bundle.mjs +46 -0
- package/dist/esm/entities/app-bundle.mjs.map +1 -0
- package/dist/esm/entities/app-definition.mjs +27 -0
- package/dist/esm/entities/app-definition.mjs.map +1 -0
- package/dist/esm/entities/app-details.mjs +38 -0
- package/dist/esm/entities/app-details.mjs.map +1 -0
- package/dist/esm/entities/app-event-subscription.mjs +33 -0
- package/dist/esm/entities/app-event-subscription.mjs.map +1 -0
- package/dist/esm/entities/app-installation.mjs +53 -0
- package/dist/esm/entities/app-installation.mjs.map +1 -0
- package/dist/esm/entities/app-key.mjs +42 -0
- package/dist/esm/entities/app-key.mjs.map +1 -0
- package/dist/esm/entities/app-signed-request.mjs +16 -0
- package/dist/esm/entities/app-signed-request.mjs.map +1 -0
- package/dist/esm/entities/app-signing-secret.mjs +33 -0
- package/dist/esm/entities/app-signing-secret.mjs.map +1 -0
- package/dist/esm/entities/app-upload.mjs +45 -0
- package/dist/esm/entities/app-upload.mjs.map +1 -0
- package/dist/esm/entities/asset-key.mjs +16 -0
- package/dist/esm/entities/asset-key.mjs.map +1 -0
- package/dist/esm/entities/asset.mjs +130 -0
- package/dist/esm/entities/asset.mjs.map +1 -0
- package/dist/esm/entities/bulk-action.mjs +59 -0
- package/dist/esm/entities/bulk-action.mjs.map +1 -0
- package/dist/esm/entities/comment.mjs +61 -0
- package/dist/esm/entities/comment.mjs.map +1 -0
- package/dist/esm/entities/content-type.mjs +118 -0
- package/dist/esm/entities/content-type.mjs.map +1 -0
- package/dist/esm/entities/editor-interface.mjs +48 -0
- package/dist/esm/entities/editor-interface.mjs.map +1 -0
- package/dist/esm/entities/entry.mjs +25 -0
- package/dist/esm/entities/entry.mjs.map +1 -0
- package/dist/esm/entities/environment-alias.mjs +56 -0
- package/dist/esm/entities/environment-alias.mjs.map +1 -0
- package/dist/esm/entities/environment-template-installation.mjs +21 -0
- package/dist/esm/entities/environment-template-installation.mjs.map +1 -0
- package/dist/esm/entities/environment-template.mjs +16 -0
- package/dist/esm/entities/environment-template.mjs.map +1 -0
- package/dist/esm/entities/environment.mjs +32 -0
- package/dist/esm/entities/environment.mjs.map +1 -0
- package/dist/esm/entities/extension.mjs +52 -0
- package/dist/esm/entities/extension.mjs.map +1 -0
- package/dist/esm/entities/function-log.mjs +24 -0
- package/dist/esm/entities/function-log.mjs.map +1 -0
- package/dist/esm/entities/function.mjs +64 -0
- package/dist/esm/entities/function.mjs.map +1 -0
- package/dist/esm/entities/index.mjs +117 -0
- package/dist/esm/entities/index.mjs.map +1 -0
- package/dist/esm/entities/locale.mjs +55 -0
- package/dist/esm/entities/locale.mjs.map +1 -0
- package/dist/esm/entities/oauth-application.mjs +64 -0
- package/dist/esm/entities/oauth-application.mjs.map +1 -0
- package/dist/esm/entities/organization-invitation.mjs +16 -0
- package/dist/esm/entities/organization-invitation.mjs.map +1 -0
- package/dist/esm/entities/organization-membership.mjs +51 -0
- package/dist/esm/entities/organization-membership.mjs.map +1 -0
- package/dist/esm/entities/organization.mjs +30 -0
- package/dist/esm/entities/organization.mjs.map +1 -0
- package/dist/esm/entities/personal-access-token.mjs +34 -0
- package/dist/esm/entities/personal-access-token.mjs.map +1 -0
- package/dist/esm/entities/preview-api-key.mjs +29 -0
- package/dist/esm/entities/preview-api-key.mjs.map +1 -0
- package/dist/esm/entities/release-action.mjs +53 -0
- package/dist/esm/entities/release-action.mjs.map +1 -0
- package/dist/esm/entities/release.mjs +107 -0
- package/dist/esm/entities/release.mjs.map +1 -0
- package/dist/esm/entities/resource-provider.mjs +138 -0
- package/dist/esm/entities/resource-provider.mjs.map +1 -0
- package/dist/esm/entities/resource-type.mjs +95 -0
- package/dist/esm/entities/resource-type.mjs.map +1 -0
- package/dist/esm/entities/resource.mjs +11 -0
- package/dist/esm/entities/resource.mjs.map +1 -0
- package/dist/esm/entities/role.mjs +51 -0
- package/dist/esm/entities/role.mjs.map +1 -0
- package/dist/esm/entities/scheduled-action.mjs +147 -0
- package/dist/esm/entities/scheduled-action.mjs.map +1 -0
- package/dist/esm/entities/snapshot.mjs +34 -0
- package/dist/esm/entities/snapshot.mjs.map +1 -0
- package/dist/esm/entities/space-member.mjs +21 -0
- package/dist/esm/entities/space-member.mjs.map +1 -0
- package/dist/esm/entities/space-membership.mjs +51 -0
- package/dist/esm/entities/space-membership.mjs.map +1 -0
- package/dist/esm/entities/space.mjs +31 -0
- package/dist/esm/entities/space.mjs.map +1 -0
- package/dist/esm/entities/tag.mjs +54 -0
- package/dist/esm/entities/tag.mjs.map +1 -0
- package/dist/esm/entities/task.mjs +55 -0
- package/dist/esm/entities/task.mjs.map +1 -0
- package/dist/esm/entities/team-membership.mjs +52 -0
- package/dist/esm/entities/team-membership.mjs.map +1 -0
- package/dist/esm/entities/team-space-membership.mjs +51 -0
- package/dist/esm/entities/team-space-membership.mjs.map +1 -0
- package/dist/esm/entities/team.mjs +51 -0
- package/dist/esm/entities/team.mjs.map +1 -0
- package/dist/esm/entities/ui-config.mjs +19 -0
- package/dist/esm/entities/ui-config.mjs.map +1 -0
- package/dist/esm/entities/upload.mjs +37 -0
- package/dist/esm/entities/upload.mjs.map +1 -0
- package/dist/esm/entities/usage.mjs +23 -0
- package/dist/esm/entities/usage.mjs.map +1 -0
- package/dist/esm/entities/user-ui-config.mjs +19 -0
- package/dist/esm/entities/user-ui-config.mjs.map +1 -0
- package/dist/esm/entities/user.mjs +26 -0
- package/dist/esm/entities/user.mjs.map +1 -0
- package/dist/esm/entities/webhook.mjs +75 -0
- package/dist/esm/entities/webhook.mjs.map +1 -0
- package/dist/esm/entities/workflow-definition.mjs +29 -0
- package/dist/esm/entities/workflow-definition.mjs.map +1 -0
- package/dist/esm/index.mjs +40 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/methods/action.mjs +49 -0
- package/dist/esm/methods/action.mjs.map +1 -0
- package/dist/esm/methods/content-type.mjs +47 -0
- package/dist/esm/methods/content-type.mjs.map +1 -0
- package/dist/esm/methods/utils.mjs +10 -0
- package/dist/esm/methods/utils.mjs.map +1 -0
- package/dist/esm/plain/as-iterator.mjs +37 -0
- package/dist/esm/plain/as-iterator.mjs.map +1 -0
- package/dist/esm/plain/checks.mjs +11 -0
- package/dist/esm/plain/checks.mjs.map +1 -0
- package/dist/esm/plain/pagination-helper.mjs +68 -0
- package/dist/esm/plain/pagination-helper.mjs.map +1 -0
- package/dist/esm/plain/plain-client.mjs +564 -0
- package/dist/esm/plain/plain-client.mjs.map +1 -0
- package/dist/esm/plain/wrappers/wrap.mjs +25 -0
- package/dist/esm/plain/wrappers/wrap.mjs.map +1 -0
- package/dist/esm/upload-http-client.mjs +15 -0
- package/dist/esm/upload-http-client.mjs.map +1 -0
- package/dist/types/adapters/REST/endpoints/access-token.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/access-token.js +1 -0
- package/dist/types/adapters/REST/endpoints/access-token.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/ai-action-invocation.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/ai-action-invocation.js +1 -0
- package/dist/types/adapters/REST/endpoints/ai-action-invocation.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/ai-action.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/ai-action.js +1 -0
- package/dist/types/adapters/REST/endpoints/ai-action.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/api-key.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/api-key.js +1 -0
- package/dist/types/adapters/REST/endpoints/api-key.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-access-token.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/app-access-token.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-access-token.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-action-call.d.ts +4 -1
- package/dist/types/adapters/REST/endpoints/app-action-call.js +55 -3
- package/dist/types/adapters/REST/endpoints/app-action-call.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-action.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/app-action.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-action.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-bundle.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/app-bundle.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-bundle.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-definition.d.ts +2 -2
- package/dist/types/adapters/REST/endpoints/app-definition.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-definition.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-details.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/app-details.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-details.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-event-subscription.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/app-event-subscription.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-event-subscription.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-installation.d.ts +2 -2
- package/dist/types/adapters/REST/endpoints/app-installation.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-installation.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-key.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/app-key.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-key.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-signed-request.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/app-signed-request.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-signed-request.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-signing-secret.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/app-signing-secret.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-signing-secret.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/app-upload.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/app-upload.js +1 -0
- package/dist/types/adapters/REST/endpoints/app-upload.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/asset-key.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/asset-key.js +1 -0
- package/dist/types/adapters/REST/endpoints/asset-key.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/asset.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/asset.js +41 -6
- package/dist/types/adapters/REST/endpoints/asset.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/bulk-action.d.ts +5 -1
- package/dist/types/adapters/REST/endpoints/bulk-action.js +14 -1
- package/dist/types/adapters/REST/endpoints/bulk-action.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/comment.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/comment.js +1 -0
- package/dist/types/adapters/REST/endpoints/comment.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/concept-scheme.d.ts +2 -1
- package/dist/types/adapters/REST/endpoints/concept-scheme.js +12 -2
- package/dist/types/adapters/REST/endpoints/concept-scheme.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/concept.d.ts +2 -1
- package/dist/types/adapters/REST/endpoints/concept.js +14 -4
- package/dist/types/adapters/REST/endpoints/concept.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/content-type.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/content-type.js +1 -0
- package/dist/types/adapters/REST/endpoints/content-type.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/editor-interface.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/editor-interface.js +1 -0
- package/dist/types/adapters/REST/endpoints/editor-interface.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/entry.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/entry.js +26 -6
- package/dist/types/adapters/REST/endpoints/entry.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/environment-alias.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/environment-alias.js +1 -0
- package/dist/types/adapters/REST/endpoints/environment-alias.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/environment-template-installation.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/environment-template-installation.js +3 -2
- package/dist/types/adapters/REST/endpoints/environment-template-installation.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/environment-template.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/environment-template.js +2 -1
- package/dist/types/adapters/REST/endpoints/environment-template.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/environment.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/environment.js +1 -0
- package/dist/types/adapters/REST/endpoints/environment.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/extension.d.ts +2 -2
- package/dist/types/adapters/REST/endpoints/extension.js +1 -0
- package/dist/types/adapters/REST/endpoints/extension.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/function-log.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/function-log.js +1 -0
- package/dist/types/adapters/REST/endpoints/function-log.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/function.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/function.js +1 -0
- package/dist/types/adapters/REST/endpoints/function.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/http.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/http.js +1 -0
- package/dist/types/adapters/REST/endpoints/http.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/index.d.ts +70 -66
- package/dist/types/adapters/REST/endpoints/index.js +5 -0
- package/dist/types/adapters/REST/endpoints/index.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/locale.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/locale.js +1 -0
- package/dist/types/adapters/REST/endpoints/locale.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/oauth-application.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/oauth-application.js +1 -0
- package/dist/types/adapters/REST/endpoints/oauth-application.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/organization-invitation.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/organization-invitation.js +1 -0
- package/dist/types/adapters/REST/endpoints/organization-invitation.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/organization-membership.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/organization-membership.js +1 -0
- package/dist/types/adapters/REST/endpoints/organization-membership.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/organization.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/organization.js +1 -0
- package/dist/types/adapters/REST/endpoints/organization.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/personal-access-token.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/personal-access-token.js +1 -0
- package/dist/types/adapters/REST/endpoints/personal-access-token.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/preview-api-key.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/preview-api-key.js +1 -0
- package/dist/types/adapters/REST/endpoints/preview-api-key.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/raw.js +1 -0
- package/dist/types/adapters/REST/endpoints/raw.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/release-action.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/release-action.js +1 -0
- package/dist/types/adapters/REST/endpoints/release-action.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/release-asset.d.ts +9 -0
- package/dist/types/adapters/REST/endpoints/release-asset.js +143 -0
- package/dist/types/adapters/REST/endpoints/release-asset.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/release-entry.d.ts +7 -0
- package/dist/types/adapters/REST/endpoints/release-entry.js +56 -0
- package/dist/types/adapters/REST/endpoints/release-entry.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/release.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/release.js +14 -0
- package/dist/types/adapters/REST/endpoints/release.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/resource-provider.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/resource-provider.js +1 -0
- package/dist/types/adapters/REST/endpoints/resource-provider.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/resource-type.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/resource-type.js +1 -0
- package/dist/types/adapters/REST/endpoints/resource-type.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/resource.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/resource.js +1 -0
- package/dist/types/adapters/REST/endpoints/resource.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/role.d.ts +2 -2
- package/dist/types/adapters/REST/endpoints/role.js +1 -0
- package/dist/types/adapters/REST/endpoints/role.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/scheduled-action.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/scheduled-action.js +1 -0
- package/dist/types/adapters/REST/endpoints/scheduled-action.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/snapshot.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/snapshot.js +1 -0
- package/dist/types/adapters/REST/endpoints/snapshot.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/space-member.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/space-member.js +1 -0
- package/dist/types/adapters/REST/endpoints/space-member.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/space-membership.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/space-membership.js +1 -0
- package/dist/types/adapters/REST/endpoints/space-membership.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/space.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/space.js +2 -1
- package/dist/types/adapters/REST/endpoints/space.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/tag.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/tag.js +1 -0
- package/dist/types/adapters/REST/endpoints/tag.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/task.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/task.js +1 -0
- package/dist/types/adapters/REST/endpoints/task.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/team-membership.d.ts +3 -3
- package/dist/types/adapters/REST/endpoints/team-membership.js +2 -1
- package/dist/types/adapters/REST/endpoints/team-membership.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/team-space-membership.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/team-space-membership.js +1 -0
- package/dist/types/adapters/REST/endpoints/team-space-membership.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/team.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/team.js +2 -1
- package/dist/types/adapters/REST/endpoints/team.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/ui-config.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/ui-config.js +1 -0
- package/dist/types/adapters/REST/endpoints/ui-config.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/upload-credentials.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/upload-credentials.js +1 -0
- package/dist/types/adapters/REST/endpoints/upload-credentials.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/upload.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/upload.js +1 -0
- package/dist/types/adapters/REST/endpoints/upload.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/usage.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/usage.js +1 -0
- package/dist/types/adapters/REST/endpoints/usage.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/user-ui-config.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/user-ui-config.js +1 -0
- package/dist/types/adapters/REST/endpoints/user-ui-config.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/user.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/user.js +1 -0
- package/dist/types/adapters/REST/endpoints/user.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/utils.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/utils.js +1 -0
- package/dist/types/adapters/REST/endpoints/utils.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/webhook.d.ts +3 -3
- package/dist/types/adapters/REST/endpoints/webhook.js +1 -0
- package/dist/types/adapters/REST/endpoints/webhook.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/workflow-definition.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/workflow-definition.js +1 -0
- package/dist/types/adapters/REST/endpoints/workflow-definition.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/workflow.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/workflow.js +1 -0
- package/dist/types/adapters/REST/endpoints/workflow.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/workflows-changelog.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/workflows-changelog.js +1 -0
- package/dist/types/adapters/REST/endpoints/workflows-changelog.js.map +1 -0
- package/dist/types/adapters/REST/make-request.d.ts +1 -1
- package/dist/types/adapters/REST/make-request.js +1 -0
- package/dist/types/adapters/REST/make-request.js.map +1 -0
- package/dist/types/adapters/REST/rest-adapter.d.ts +1 -1
- package/dist/types/adapters/REST/rest-adapter.js +1 -0
- package/dist/types/adapters/REST/rest-adapter.js.map +1 -0
- package/dist/types/adapters/REST/types.d.ts +1 -1
- package/dist/types/common-types.d.ts +367 -99
- package/dist/types/common-types.js +1 -0
- package/dist/types/common-types.js.map +1 -0
- package/dist/types/common-utils.d.ts +1 -1
- package/dist/types/common-utils.js +1 -0
- package/dist/types/common-utils.js.map +1 -0
- package/dist/types/constants/editor-interface-defaults/controls-defaults.d.ts +2 -2
- package/dist/types/constants/editor-interface-defaults/controls-defaults.js +1 -0
- package/dist/types/constants/editor-interface-defaults/controls-defaults.js.map +1 -0
- package/dist/types/constants/editor-interface-defaults/editors-defaults.d.ts +1 -1
- package/dist/types/constants/editor-interface-defaults/editors-defaults.js +4 -9
- package/dist/types/constants/editor-interface-defaults/editors-defaults.js.map +1 -0
- package/dist/types/constants/editor-interface-defaults/index.d.ts +4 -4
- package/dist/types/constants/editor-interface-defaults/index.js +2 -1
- package/dist/types/constants/editor-interface-defaults/index.js.map +1 -0
- package/dist/types/constants/editor-interface-defaults/sidebar-defaults.d.ts +1 -1
- package/dist/types/constants/editor-interface-defaults/sidebar-defaults.js +2 -5
- package/dist/types/constants/editor-interface-defaults/sidebar-defaults.js.map +1 -0
- package/dist/types/constants/editor-interface-defaults/types.js +1 -0
- package/dist/types/constants/editor-interface-defaults/types.js.map +1 -0
- package/dist/types/create-adapter.d.ts +2 -2
- package/dist/types/create-adapter.js +1 -0
- package/dist/types/create-adapter.js.map +1 -0
- package/dist/types/create-app-definition-api.d.ts +10 -10
- package/dist/types/create-app-definition-api.js +4 -2
- package/dist/types/create-app-definition-api.js.map +1 -0
- package/dist/types/create-contentful-api.d.ts +18 -18
- package/dist/types/create-contentful-api.js +11 -10
- package/dist/types/create-contentful-api.js.map +1 -0
- package/dist/types/create-entry-api.d.ts +13 -13
- package/dist/types/create-entry-api.js +7 -5
- package/dist/types/create-entry-api.js.map +1 -0
- package/dist/types/create-environment-api.d.ts +112 -91
- package/dist/types/create-environment-api.js +57 -20
- package/dist/types/create-environment-api.js.map +1 -0
- package/dist/types/create-environment-template-api.d.ts +12 -10
- package/dist/types/create-environment-template-api.js +7 -3
- package/dist/types/create-environment-template-api.js.map +1 -0
- package/dist/types/create-organization-api.d.ts +207 -172
- package/dist/types/create-organization-api.js +19 -17
- package/dist/types/create-organization-api.js.map +1 -0
- package/dist/types/create-space-api.d.ts +65 -65
- package/dist/types/create-space-api.js +16 -14
- package/dist/types/create-space-api.js.map +1 -0
- package/dist/types/create-ui-config-api.d.ts +3 -3
- package/dist/types/create-ui-config-api.js +3 -1
- package/dist/types/create-ui-config-api.js.map +1 -0
- package/dist/types/create-user-ui-config-api.d.ts +3 -3
- package/dist/types/create-user-ui-config-api.js +3 -1
- package/dist/types/create-user-ui-config-api.js.map +1 -0
- package/dist/types/enhance-with-methods.js +1 -0
- package/dist/types/enhance-with-methods.js.map +1 -0
- package/dist/types/entities/access-token.d.ts +4 -4
- package/dist/types/entities/access-token.js +1 -0
- package/dist/types/entities/access-token.js.map +1 -0
- package/dist/types/entities/ai-action-invocation.d.ts +7 -15
- package/dist/types/entities/ai-action-invocation.js +2 -13
- package/dist/types/entities/ai-action-invocation.js.map +1 -0
- package/dist/types/entities/ai-action.d.ts +18 -23
- package/dist/types/entities/ai-action.js +2 -20
- package/dist/types/entities/ai-action.js.map +1 -0
- package/dist/types/entities/api-key.d.ts +9 -5
- package/dist/types/entities/api-key.js +1 -0
- package/dist/types/entities/api-key.js.map +1 -0
- package/dist/types/entities/app-access-token.d.ts +5 -5
- package/dist/types/entities/app-access-token.js +1 -0
- package/dist/types/entities/app-access-token.js.map +1 -0
- package/dist/types/entities/app-action-call.d.ts +56 -14
- package/dist/types/entities/app-action-call.js +20 -21
- package/dist/types/entities/app-action-call.js.map +1 -0
- package/dist/types/entities/app-action.d.ts +22 -6
- package/dist/types/entities/app-action.js +1 -0
- package/dist/types/entities/app-action.js.map +1 -0
- package/dist/types/entities/app-bundle.d.ts +5 -5
- package/dist/types/entities/app-bundle.js +1 -0
- package/dist/types/entities/app-bundle.js.map +1 -0
- package/dist/types/entities/app-definition.d.ts +16 -10
- package/dist/types/entities/app-definition.js +1 -0
- package/dist/types/entities/app-definition.js.map +1 -0
- package/dist/types/entities/app-details.d.ts +4 -4
- package/dist/types/entities/app-details.js +1 -0
- package/dist/types/entities/app-details.js.map +1 -0
- package/dist/types/entities/app-event-subscription.d.ts +4 -4
- package/dist/types/entities/app-event-subscription.js +1 -0
- package/dist/types/entities/app-event-subscription.js.map +1 -0
- package/dist/types/entities/app-installation.d.ts +8 -8
- package/dist/types/entities/app-installation.js +1 -0
- package/dist/types/entities/app-installation.js.map +1 -0
- package/dist/types/entities/app-key.d.ts +5 -5
- package/dist/types/entities/app-key.js +1 -0
- package/dist/types/entities/app-key.js.map +1 -0
- package/dist/types/entities/app-signed-request.d.ts +5 -5
- package/dist/types/entities/app-signed-request.js +1 -0
- package/dist/types/entities/app-signed-request.js.map +1 -0
- package/dist/types/entities/app-signing-secret.d.ts +4 -4
- package/dist/types/entities/app-signing-secret.js +1 -0
- package/dist/types/entities/app-signing-secret.js.map +1 -0
- package/dist/types/entities/app-upload.d.ts +4 -4
- package/dist/types/entities/app-upload.js +10 -1
- package/dist/types/entities/app-upload.js.map +1 -0
- package/dist/types/entities/asset-key.d.ts +1 -1
- package/dist/types/entities/asset-key.js +1 -0
- package/dist/types/entities/asset-key.js.map +1 -0
- package/dist/types/entities/asset.d.ts +6 -6
- package/dist/types/entities/asset.js +2 -1
- package/dist/types/entities/asset.js.map +1 -0
- package/dist/types/entities/bulk-action.d.ts +33 -5
- package/dist/types/entities/bulk-action.js +1 -0
- package/dist/types/entities/bulk-action.js.map +1 -0
- package/dist/types/entities/comment.d.ts +5 -5
- package/dist/types/entities/comment.js +1 -0
- package/dist/types/entities/comment.js.map +1 -0
- package/dist/types/entities/concept-scheme.d.ts +3 -3
- package/dist/types/entities/concept.d.ts +2 -2
- package/dist/types/entities/content-type-fields.d.ts +1 -1
- package/dist/types/entities/content-type.d.ts +8 -8
- package/dist/types/entities/content-type.js +3 -2
- package/dist/types/entities/content-type.js.map +1 -0
- package/dist/types/entities/editor-interface.d.ts +13 -7
- package/dist/types/entities/editor-interface.js +1 -0
- package/dist/types/entities/editor-interface.js.map +1 -0
- package/dist/types/entities/entry.d.ts +6 -10
- package/dist/types/entities/entry.js +1 -0
- package/dist/types/entities/entry.js.map +1 -0
- package/dist/types/entities/environment-alias.d.ts +7 -5
- package/dist/types/entities/environment-alias.js +1 -0
- package/dist/types/entities/environment-alias.js.map +1 -0
- package/dist/types/entities/environment-template-installation.d.ts +4 -3
- package/dist/types/entities/environment-template-installation.js +1 -0
- package/dist/types/entities/environment-template-installation.js.map +1 -0
- package/dist/types/entities/environment-template.d.ts +6 -6
- package/dist/types/entities/environment-template.js +1 -0
- package/dist/types/entities/environment-template.js.map +1 -0
- package/dist/types/entities/environment.d.ts +8 -8
- package/dist/types/entities/environment.js +1 -0
- package/dist/types/entities/environment.js.map +1 -0
- package/dist/types/entities/extension.d.ts +7 -7
- package/dist/types/entities/extension.js +1 -0
- package/dist/types/entities/extension.js.map +1 -0
- package/dist/types/entities/function-log.d.ts +3 -3
- package/dist/types/entities/function-log.js +1 -0
- package/dist/types/entities/function-log.js.map +1 -0
- package/dist/types/entities/function.d.ts +3 -3
- package/dist/types/entities/function.js +1 -0
- package/dist/types/entities/function.js.map +1 -0
- package/dist/types/entities/index.d.ts +127 -0
- package/dist/types/entities/index.js +117 -0
- package/dist/types/entities/index.js.map +1 -0
- package/dist/types/entities/locale.d.ts +5 -5
- package/dist/types/entities/locale.js +1 -0
- package/dist/types/entities/locale.js.map +1 -0
- package/dist/types/entities/oauth-application.d.ts +3 -3
- package/dist/types/entities/oauth-application.js +1 -0
- package/dist/types/entities/oauth-application.js.map +1 -0
- package/dist/types/entities/organization-invitation.d.ts +5 -3
- package/dist/types/entities/organization-invitation.js +1 -0
- package/dist/types/entities/organization-invitation.js.map +1 -0
- package/dist/types/entities/organization-membership.d.ts +6 -4
- package/dist/types/entities/organization-membership.js +1 -0
- package/dist/types/entities/organization-membership.js.map +1 -0
- package/dist/types/entities/organization.d.ts +4 -4
- package/dist/types/entities/organization.js +1 -0
- package/dist/types/entities/organization.js.map +1 -0
- package/dist/types/entities/personal-access-token.d.ts +3 -3
- package/dist/types/entities/personal-access-token.js +1 -0
- package/dist/types/entities/personal-access-token.js.map +1 -0
- package/dist/types/entities/preview-api-key.d.ts +3 -3
- package/dist/types/entities/preview-api-key.js +1 -0
- package/dist/types/entities/preview-api-key.js.map +1 -0
- package/dist/types/entities/release-action.d.ts +3 -3
- package/dist/types/entities/release-action.js +1 -0
- package/dist/types/entities/release-action.js.map +1 -0
- package/dist/types/entities/release.d.ts +22 -5
- package/dist/types/entities/release.js +1 -0
- package/dist/types/entities/release.js.map +1 -0
- package/dist/types/entities/resource-provider.d.ts +6 -6
- package/dist/types/entities/resource-provider.js +3 -1
- package/dist/types/entities/resource-provider.js.map +1 -0
- package/dist/types/entities/resource-type.d.ts +5 -5
- package/dist/types/entities/resource-type.js +1 -0
- package/dist/types/entities/resource-type.js.map +1 -0
- package/dist/types/entities/resource.d.ts +4 -4
- package/dist/types/entities/resource.js +1 -0
- package/dist/types/entities/resource.js.map +1 -0
- package/dist/types/entities/role.d.ts +4 -4
- package/dist/types/entities/role.js +1 -0
- package/dist/types/entities/role.js.map +1 -0
- package/dist/types/entities/scheduled-action.d.ts +6 -4
- package/dist/types/entities/scheduled-action.js +1 -0
- package/dist/types/entities/scheduled-action.js.map +1 -0
- package/dist/types/entities/snapshot.d.ts +3 -3
- package/dist/types/entities/snapshot.js +1 -0
- package/dist/types/entities/snapshot.js.map +1 -0
- package/dist/types/entities/space-member.d.ts +6 -4
- package/dist/types/entities/space-member.js +1 -0
- package/dist/types/entities/space-member.js.map +1 -0
- package/dist/types/entities/space-membership.d.ts +7 -7
- package/dist/types/entities/space-membership.js +1 -0
- package/dist/types/entities/space-membership.js.map +1 -0
- package/dist/types/entities/space.d.ts +4 -4
- package/dist/types/entities/space.js +1 -0
- package/dist/types/entities/space.js.map +1 -0
- package/dist/types/entities/tag.d.ts +5 -5
- package/dist/types/entities/tag.js +1 -0
- package/dist/types/entities/tag.js.map +1 -0
- package/dist/types/entities/task.d.ts +5 -5
- package/dist/types/entities/task.js +1 -0
- package/dist/types/entities/task.js.map +1 -0
- package/dist/types/entities/team-membership.d.ts +12 -6
- package/dist/types/entities/team-membership.js +1 -0
- package/dist/types/entities/team-membership.js.map +1 -0
- package/dist/types/entities/team-space-membership.d.ts +12 -6
- package/dist/types/entities/team-space-membership.js +1 -0
- package/dist/types/entities/team-space-membership.js.map +1 -0
- package/dist/types/entities/team.d.ts +6 -4
- package/dist/types/entities/team.js +1 -0
- package/dist/types/entities/team.js.map +1 -0
- package/dist/types/entities/ui-config.d.ts +6 -6
- package/dist/types/entities/ui-config.js +1 -0
- package/dist/types/entities/ui-config.js.map +1 -0
- package/dist/types/entities/upload-credential.d.ts +4 -4
- package/dist/types/entities/upload.d.ts +4 -4
- package/dist/types/entities/upload.js +1 -0
- package/dist/types/entities/upload.js.map +1 -0
- package/dist/types/entities/usage.d.ts +7 -7
- package/dist/types/entities/usage.js +1 -0
- package/dist/types/entities/usage.js.map +1 -0
- package/dist/types/entities/user-ui-config.d.ts +5 -5
- package/dist/types/entities/user-ui-config.js +1 -0
- package/dist/types/entities/user-ui-config.js.map +1 -0
- package/dist/types/entities/user.d.ts +3 -3
- package/dist/types/entities/user.js +1 -0
- package/dist/types/entities/user.js.map +1 -0
- package/dist/types/entities/webhook.d.ts +17 -11
- package/dist/types/entities/webhook.js +1 -0
- package/dist/types/entities/webhook.js.map +1 -0
- package/dist/types/entities/workflow-definition.d.ts +5 -5
- package/dist/types/entities/workflow-definition.js +1 -0
- package/dist/types/entities/workflow-definition.js.map +1 -0
- package/dist/types/entities/workflow.d.ts +7 -7
- package/dist/types/entities/workflows-changelog-entry.d.ts +3 -3
- package/dist/types/export-types.d.ts +78 -70
- package/dist/types/index.d.ts +19 -16
- package/dist/types/index.js +5 -1
- package/dist/types/index.js.map +1 -0
- package/dist/types/methods/action.js +1 -0
- package/dist/types/methods/action.js.map +1 -0
- package/dist/types/methods/content-type.d.ts +2 -2
- package/dist/types/methods/content-type.js +1 -0
- package/dist/types/methods/content-type.js.map +1 -0
- package/dist/types/methods/release-action.d.ts +3 -3
- package/dist/types/methods/utils.js +1 -0
- package/dist/types/methods/utils.js.map +1 -0
- package/dist/types/plain/as-iterator.d.ts +1 -1
- package/dist/types/plain/as-iterator.js +1 -0
- package/dist/types/plain/as-iterator.js.map +1 -0
- package/dist/types/plain/checks.d.ts +9 -9
- package/dist/types/plain/checks.js +1 -0
- package/dist/types/plain/checks.js.map +1 -0
- package/dist/types/plain/common-types.d.ts +154 -78
- package/dist/types/plain/entities/ai-action-invocation.d.ts +3 -3
- package/dist/types/plain/entities/ai-action.d.ts +4 -4
- package/dist/types/plain/entities/app-access-token.d.ts +3 -3
- package/dist/types/plain/entities/app-action-call.d.ts +86 -4
- package/dist/types/plain/entities/app-action.d.ts +3 -3
- package/dist/types/plain/entities/app-bundle.d.ts +3 -3
- package/dist/types/plain/entities/app-definition.d.ts +3 -3
- package/dist/types/plain/entities/app-details.d.ts +3 -3
- package/dist/types/plain/entities/app-event-subscription.d.ts +3 -3
- package/dist/types/plain/entities/app-installation.d.ts +4 -4
- package/dist/types/plain/entities/app-key.d.ts +3 -3
- package/dist/types/plain/entities/app-signed-request.d.ts +3 -3
- package/dist/types/plain/entities/app-signing-secret.d.ts +3 -3
- package/dist/types/plain/entities/app-upload.d.ts +4 -5
- package/dist/types/plain/entities/comment.d.ts +3 -3
- package/dist/types/plain/entities/concept-scheme.d.ts +22 -5
- package/dist/types/plain/entities/concept.d.ts +23 -6
- package/dist/types/plain/entities/editor-interface.d.ts +3 -3
- package/dist/types/plain/entities/environment-alias.d.ts +3 -3
- package/dist/types/plain/entities/environment.d.ts +3 -3
- package/dist/types/plain/entities/extension.d.ts +3 -3
- package/dist/types/plain/entities/function-log.d.ts +3 -3
- package/dist/types/plain/entities/function.d.ts +3 -3
- package/dist/types/plain/entities/locale.d.ts +3 -3
- package/dist/types/plain/entities/oauth-application.d.ts +3 -3
- package/dist/types/plain/entities/organization.d.ts +3 -3
- package/dist/types/plain/entities/resource-provider.d.ts +3 -3
- package/dist/types/plain/entities/resource-type.d.ts +4 -4
- package/dist/types/plain/entities/resource.d.ts +3 -3
- package/dist/types/plain/entities/role.d.ts +3 -3
- package/dist/types/plain/entities/space-member.d.ts +3 -3
- package/dist/types/plain/entities/space-membership.d.ts +3 -3
- package/dist/types/plain/entities/space.d.ts +3 -3
- package/dist/types/plain/entities/tag.d.ts +4 -4
- package/dist/types/plain/entities/task.d.ts +3 -3
- package/dist/types/plain/entities/team-membership.d.ts +3 -3
- package/dist/types/plain/entities/team-space-membership.d.ts +3 -3
- package/dist/types/plain/entities/team.d.ts +3 -3
- package/dist/types/plain/entities/ui-config.d.ts +3 -3
- package/dist/types/plain/entities/upload-credential.d.ts +3 -3
- package/dist/types/plain/entities/upload.d.ts +3 -4
- package/dist/types/plain/entities/usage.d.ts +3 -3
- package/dist/types/plain/entities/user-ui-config.d.ts +3 -3
- package/dist/types/plain/entities/user.d.ts +3 -3
- package/dist/types/plain/entities/webhook.d.ts +3 -3
- package/dist/types/plain/entities/workflow-definition.d.ts +3 -3
- package/dist/types/plain/entities/workflow.d.ts +3 -3
- package/dist/types/plain/entities/workflows-changelog.d.ts +3 -3
- package/dist/types/plain/pagination-helper.d.ts +1 -1
- package/dist/types/plain/pagination-helper.js +1 -0
- package/dist/types/plain/pagination-helper.js.map +1 -0
- package/dist/types/plain/plain-client.d.ts +4 -4
- package/dist/types/plain/plain-client.js +45 -1
- package/dist/types/plain/plain-client.js.map +1 -0
- package/dist/types/plain/wrappers/wrap.d.ts +4 -2
- package/dist/types/plain/wrappers/wrap.js +1 -0
- package/dist/types/plain/wrappers/wrap.js.map +1 -0
- package/dist/types/upload-http-client.js +1 -0
- package/dist/types/upload-http-client.js.map +1 -0
- package/package.json +67 -77
- package/dist/cjs/adapters/REST/endpoints/access-token.cjs +0 -137
- package/dist/cjs/adapters/REST/endpoints/access-token.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/ai-action-invocation.cjs +0 -10
- package/dist/cjs/adapters/REST/endpoints/ai-action-invocation.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/ai-action.cjs +0 -58
- package/dist/cjs/adapters/REST/endpoints/ai-action.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/api-key.cjs +0 -51
- package/dist/cjs/adapters/REST/endpoints/api-key.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-access-token.cjs +0 -10
- package/dist/cjs/adapters/REST/endpoints/app-access-token.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-action-call.cjs +0 -65
- package/dist/cjs/adapters/REST/endpoints/app-action-call.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-action.cjs +0 -43
- package/dist/cjs/adapters/REST/endpoints/app-action.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-bundle.cjs +0 -40
- package/dist/cjs/adapters/REST/endpoints/app-bundle.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-definition.cjs +0 -53
- package/dist/cjs/adapters/REST/endpoints/app-definition.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-details.cjs +0 -18
- package/dist/cjs/adapters/REST/endpoints/app-details.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-event-subscription.cjs +0 -18
- package/dist/cjs/adapters/REST/endpoints/app-event-subscription.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-installation.cjs +0 -49
- package/dist/cjs/adapters/REST/endpoints/app-installation.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-key.cjs +0 -22
- package/dist/cjs/adapters/REST/endpoints/app-key.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-signed-request.cjs +0 -10
- package/dist/cjs/adapters/REST/endpoints/app-signed-request.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-signing-secret.cjs +0 -18
- package/dist/cjs/adapters/REST/endpoints/app-signing-secret.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/app-upload.cjs +0 -29
- package/dist/cjs/adapters/REST/endpoints/app-upload.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/asset-key.cjs +0 -35
- package/dist/cjs/adapters/REST/endpoints/asset-key.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/asset.cjs +0 -189
- package/dist/cjs/adapters/REST/endpoints/asset.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/bulk-action.cjs +0 -22
- package/dist/cjs/adapters/REST/endpoints/bulk-action.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/comment.cjs +0 -98
- package/dist/cjs/adapters/REST/endpoints/comment.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/concept-scheme.cjs +0 -54
- package/dist/cjs/adapters/REST/endpoints/concept-scheme.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/concept.cjs +0 -72
- package/dist/cjs/adapters/REST/endpoints/concept.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/content-type.cjs +0 -62
- package/dist/cjs/adapters/REST/endpoints/content-type.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/editor-interface.cjs +0 -27
- package/dist/cjs/adapters/REST/endpoints/editor-interface.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/entry.cjs +0 -109
- package/dist/cjs/adapters/REST/endpoints/entry.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/environment-alias.cjs +0 -47
- package/dist/cjs/adapters/REST/endpoints/environment-alias.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/environment-template-installation.cjs +0 -24
- package/dist/cjs/adapters/REST/endpoints/environment-template-installation.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/environment-template.cjs +0 -52
- package/dist/cjs/adapters/REST/endpoints/environment-template.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/environment.cjs +0 -53
- package/dist/cjs/adapters/REST/endpoints/environment.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/extension.cjs +0 -47
- package/dist/cjs/adapters/REST/endpoints/extension.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/function-log.cjs +0 -28
- package/dist/cjs/adapters/REST/endpoints/function-log.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/function.cjs +0 -26
- package/dist/cjs/adapters/REST/endpoints/function.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/http.cjs +0 -30
- package/dist/cjs/adapters/REST/endpoints/http.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/index.cjs +0 -140
- package/dist/cjs/adapters/REST/endpoints/index.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/locale.cjs +0 -40
- package/dist/cjs/adapters/REST/endpoints/locale.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/oauth-application.cjs +0 -148
- package/dist/cjs/adapters/REST/endpoints/oauth-application.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/organization-invitation.cjs +0 -30
- package/dist/cjs/adapters/REST/endpoints/organization-invitation.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/organization-membership.cjs +0 -35
- package/dist/cjs/adapters/REST/endpoints/organization-membership.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/organization.cjs +0 -29
- package/dist/cjs/adapters/REST/endpoints/organization.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/personal-access-token.cjs +0 -38
- package/dist/cjs/adapters/REST/endpoints/personal-access-token.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/preview-api-key.cjs +0 -16
- package/dist/cjs/adapters/REST/endpoints/preview-api-key.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/raw.cjs +0 -62
- package/dist/cjs/adapters/REST/endpoints/raw.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/release-action.cjs +0 -25
- package/dist/cjs/adapters/REST/endpoints/release-action.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/release.cjs +0 -71
- package/dist/cjs/adapters/REST/endpoints/release.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/resource-provider.cjs +0 -19
- package/dist/cjs/adapters/REST/endpoints/resource-provider.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/resource-type.cjs +0 -31
- package/dist/cjs/adapters/REST/endpoints/resource-type.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/resource.cjs +0 -11
- package/dist/cjs/adapters/REST/endpoints/resource.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/role.cjs +0 -51
- package/dist/cjs/adapters/REST/endpoints/role.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/scheduled-action.cjs +0 -44
- package/dist/cjs/adapters/REST/endpoints/scheduled-action.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/snapshot.cjs +0 -31
- package/dist/cjs/adapters/REST/endpoints/snapshot.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/space-member.cjs +0 -12
- package/dist/cjs/adapters/REST/endpoints/space-member.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/space-membership.cjs +0 -63
- package/dist/cjs/adapters/REST/endpoints/space-membership.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/space.cjs +0 -38
- package/dist/cjs/adapters/REST/endpoints/space.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/tag.cjs +0 -37
- package/dist/cjs/adapters/REST/endpoints/tag.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/task.cjs +0 -41
- package/dist/cjs/adapters/REST/endpoints/task.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/team-membership.cjs +0 -39
- package/dist/cjs/adapters/REST/endpoints/team-membership.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/team-space-membership.cjs +0 -54
- package/dist/cjs/adapters/REST/endpoints/team-space-membership.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/team.cjs +0 -39
- package/dist/cjs/adapters/REST/endpoints/team.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/ui-config.cjs +0 -22
- package/dist/cjs/adapters/REST/endpoints/ui-config.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/upload-credentials.cjs +0 -16
- package/dist/cjs/adapters/REST/endpoints/upload-credentials.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/upload.cjs +0 -43
- package/dist/cjs/adapters/REST/endpoints/upload.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/usage.cjs +0 -18
- package/dist/cjs/adapters/REST/endpoints/usage.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/user-ui-config.cjs +0 -22
- package/dist/cjs/adapters/REST/endpoints/user-ui-config.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/user.cjs +0 -28
- package/dist/cjs/adapters/REST/endpoints/user.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/utils.cjs +0 -25
- package/dist/cjs/adapters/REST/endpoints/utils.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/webhook.cjs +0 -101
- package/dist/cjs/adapters/REST/endpoints/webhook.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/workflow-definition.cjs +0 -42
- package/dist/cjs/adapters/REST/endpoints/workflow-definition.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/workflow.cjs +0 -49
- package/dist/cjs/adapters/REST/endpoints/workflow.cjs.map +0 -1
- package/dist/cjs/adapters/REST/endpoints/workflows-changelog.cjs +0 -12
- package/dist/cjs/adapters/REST/endpoints/workflows-changelog.cjs.map +0 -1
- package/dist/cjs/adapters/REST/make-request.cjs +0 -23
- package/dist/cjs/adapters/REST/make-request.cjs.map +0 -1
- package/dist/cjs/adapters/REST/rest-adapter.cjs +0 -44
- package/dist/cjs/adapters/REST/rest-adapter.cjs.map +0 -1
- package/dist/cjs/common-types.cjs +0 -7
- package/dist/cjs/common-types.cjs.map +0 -1
- package/dist/cjs/common-utils.cjs +0 -39
- package/dist/cjs/common-utils.cjs.map +0 -1
- package/dist/cjs/constants/editor-interface-defaults/controls-defaults.cjs +0 -170
- package/dist/cjs/constants/editor-interface-defaults/controls-defaults.cjs.map +0 -1
- package/dist/cjs/constants/editor-interface-defaults/editors-defaults.cjs +0 -41
- package/dist/cjs/constants/editor-interface-defaults/editors-defaults.cjs.map +0 -1
- package/dist/cjs/constants/editor-interface-defaults/index.cjs +0 -15
- package/dist/cjs/constants/editor-interface-defaults/index.cjs.map +0 -1
- package/dist/cjs/constants/editor-interface-defaults/sidebar-defaults.cjs +0 -72
- package/dist/cjs/constants/editor-interface-defaults/sidebar-defaults.cjs.map +0 -1
- package/dist/cjs/constants/editor-interface-defaults/types.cjs +0 -19
- package/dist/cjs/constants/editor-interface-defaults/types.cjs.map +0 -1
- package/dist/cjs/create-adapter.cjs +0 -22
- package/dist/cjs/create-adapter.cjs.map +0 -1
- package/dist/cjs/create-app-definition-api.cjs +0 -254
- package/dist/cjs/create-app-definition-api.cjs.map +0 -1
- package/dist/cjs/create-contentful-api.cjs +0 -590
- package/dist/cjs/create-contentful-api.cjs.map +0 -1
- package/dist/cjs/create-entry-api.cjs +0 -490
- package/dist/cjs/create-entry-api.cjs.map +0 -1
- package/dist/cjs/create-environment-api.cjs +0 -2407
- package/dist/cjs/create-environment-api.cjs.map +0 -1
- package/dist/cjs/create-environment-template-api.cjs +0 -271
- package/dist/cjs/create-environment-template-api.cjs.map +0 -1
- package/dist/cjs/create-organization-api.cjs +0 -1139
- package/dist/cjs/create-organization-api.cjs.map +0 -1
- package/dist/cjs/create-space-api.cjs +0 -1590
- package/dist/cjs/create-space-api.cjs.map +0 -1
- package/dist/cjs/create-ui-config-api.cjs +0 -55
- package/dist/cjs/create-ui-config-api.cjs.map +0 -1
- package/dist/cjs/create-user-ui-config-api.cjs +0 -55
- package/dist/cjs/create-user-ui-config-api.cjs.map +0 -1
- package/dist/cjs/enhance-with-methods.cjs +0 -27
- package/dist/cjs/enhance-with-methods.cjs.map +0 -1
- package/dist/cjs/entities/access-token.cjs +0 -37
- package/dist/cjs/entities/access-token.cjs.map +0 -1
- package/dist/cjs/entities/ai-action-invocation.cjs +0 -31
- package/dist/cjs/entities/ai-action-invocation.cjs.map +0 -1
- package/dist/cjs/entities/ai-action.cjs +0 -95
- package/dist/cjs/entities/ai-action.cjs.map +0 -1
- package/dist/cjs/entities/api-key.cjs +0 -57
- package/dist/cjs/entities/api-key.cjs.map +0 -1
- package/dist/cjs/entities/app-access-token.cjs +0 -18
- package/dist/cjs/entities/app-access-token.cjs.map +0 -1
- package/dist/cjs/entities/app-action-call.cjs +0 -74
- package/dist/cjs/entities/app-action-call.cjs.map +0 -1
- package/dist/cjs/entities/app-action.cjs +0 -49
- package/dist/cjs/entities/app-action.cjs.map +0 -1
- package/dist/cjs/entities/app-bundle.cjs +0 -49
- package/dist/cjs/entities/app-bundle.cjs.map +0 -1
- package/dist/cjs/entities/app-definition.cjs +0 -30
- package/dist/cjs/entities/app-definition.cjs.map +0 -1
- package/dist/cjs/entities/app-details.cjs +0 -40
- package/dist/cjs/entities/app-details.cjs.map +0 -1
- package/dist/cjs/entities/app-event-subscription.cjs +0 -35
- package/dist/cjs/entities/app-event-subscription.cjs.map +0 -1
- package/dist/cjs/entities/app-installation.cjs +0 -56
- package/dist/cjs/entities/app-installation.cjs.map +0 -1
- package/dist/cjs/entities/app-key.cjs +0 -45
- package/dist/cjs/entities/app-key.cjs.map +0 -1
- package/dist/cjs/entities/app-signed-request.cjs +0 -18
- package/dist/cjs/entities/app-signed-request.cjs.map +0 -1
- package/dist/cjs/entities/app-signing-secret.cjs +0 -35
- package/dist/cjs/entities/app-signing-secret.cjs.map +0 -1
- package/dist/cjs/entities/app-upload.cjs +0 -39
- package/dist/cjs/entities/app-upload.cjs.map +0 -1
- package/dist/cjs/entities/asset-key.cjs +0 -18
- package/dist/cjs/entities/asset-key.cjs.map +0 -1
- package/dist/cjs/entities/asset.cjs +0 -133
- package/dist/cjs/entities/asset.cjs.map +0 -1
- package/dist/cjs/entities/bulk-action.cjs +0 -61
- package/dist/cjs/entities/bulk-action.cjs.map +0 -1
- package/dist/cjs/entities/comment.cjs +0 -67
- package/dist/cjs/entities/comment.cjs.map +0 -1
- package/dist/cjs/entities/content-type.cjs +0 -121
- package/dist/cjs/entities/content-type.cjs.map +0 -1
- package/dist/cjs/entities/editor-interface.cjs +0 -51
- package/dist/cjs/entities/editor-interface.cjs.map +0 -1
- package/dist/cjs/entities/entry.cjs +0 -28
- package/dist/cjs/entities/entry.cjs.map +0 -1
- package/dist/cjs/entities/environment-alias.cjs +0 -59
- package/dist/cjs/entities/environment-alias.cjs.map +0 -1
- package/dist/cjs/entities/environment-template-installation.cjs +0 -24
- package/dist/cjs/entities/environment-template-installation.cjs.map +0 -1
- package/dist/cjs/entities/environment-template.cjs +0 -19
- package/dist/cjs/entities/environment-template.cjs.map +0 -1
- package/dist/cjs/entities/environment.cjs +0 -35
- package/dist/cjs/entities/environment.cjs.map +0 -1
- package/dist/cjs/entities/extension.cjs +0 -55
- package/dist/cjs/entities/extension.cjs.map +0 -1
- package/dist/cjs/entities/function-log.cjs +0 -27
- package/dist/cjs/entities/function-log.cjs.map +0 -1
- package/dist/cjs/entities/function.cjs +0 -67
- package/dist/cjs/entities/function.cjs.map +0 -1
- package/dist/cjs/entities/locale.cjs +0 -58
- package/dist/cjs/entities/locale.cjs.map +0 -1
- package/dist/cjs/entities/oauth-application.cjs +0 -67
- package/dist/cjs/entities/oauth-application.cjs.map +0 -1
- package/dist/cjs/entities/organization-invitation.cjs +0 -18
- package/dist/cjs/entities/organization-invitation.cjs.map +0 -1
- package/dist/cjs/entities/organization-membership.cjs +0 -54
- package/dist/cjs/entities/organization-membership.cjs.map +0 -1
- package/dist/cjs/entities/organization.cjs +0 -33
- package/dist/cjs/entities/organization.cjs.map +0 -1
- package/dist/cjs/entities/personal-access-token.cjs +0 -37
- package/dist/cjs/entities/personal-access-token.cjs.map +0 -1
- package/dist/cjs/entities/preview-api-key.cjs +0 -32
- package/dist/cjs/entities/preview-api-key.cjs.map +0 -1
- package/dist/cjs/entities/release-action.cjs +0 -56
- package/dist/cjs/entities/release-action.cjs.map +0 -1
- package/dist/cjs/entities/release.cjs +0 -110
- package/dist/cjs/entities/release.cjs.map +0 -1
- package/dist/cjs/entities/resource-provider.cjs +0 -139
- package/dist/cjs/entities/resource-provider.cjs.map +0 -1
- package/dist/cjs/entities/resource-type.cjs +0 -99
- package/dist/cjs/entities/resource-type.cjs.map +0 -1
- package/dist/cjs/entities/resource.cjs +0 -14
- package/dist/cjs/entities/resource.cjs.map +0 -1
- package/dist/cjs/entities/role.cjs +0 -54
- package/dist/cjs/entities/role.cjs.map +0 -1
- package/dist/cjs/entities/scheduled-action.cjs +0 -153
- package/dist/cjs/entities/scheduled-action.cjs.map +0 -1
- package/dist/cjs/entities/snapshot.cjs +0 -37
- package/dist/cjs/entities/snapshot.cjs.map +0 -1
- package/dist/cjs/entities/space-member.cjs +0 -24
- package/dist/cjs/entities/space-member.cjs.map +0 -1
- package/dist/cjs/entities/space-membership.cjs +0 -54
- package/dist/cjs/entities/space-membership.cjs.map +0 -1
- package/dist/cjs/entities/space.cjs +0 -34
- package/dist/cjs/entities/space.cjs.map +0 -1
- package/dist/cjs/entities/tag.cjs +0 -60
- package/dist/cjs/entities/tag.cjs.map +0 -1
- package/dist/cjs/entities/task.cjs +0 -61
- package/dist/cjs/entities/task.cjs.map +0 -1
- package/dist/cjs/entities/team-membership.cjs +0 -55
- package/dist/cjs/entities/team-membership.cjs.map +0 -1
- package/dist/cjs/entities/team-space-membership.cjs +0 -54
- package/dist/cjs/entities/team-space-membership.cjs.map +0 -1
- package/dist/cjs/entities/team.cjs +0 -54
- package/dist/cjs/entities/team.cjs.map +0 -1
- package/dist/cjs/entities/ui-config.cjs +0 -21
- package/dist/cjs/entities/ui-config.cjs.map +0 -1
- package/dist/cjs/entities/upload.cjs +0 -39
- package/dist/cjs/entities/upload.cjs.map +0 -1
- package/dist/cjs/entities/usage.cjs +0 -26
- package/dist/cjs/entities/usage.cjs.map +0 -1
- package/dist/cjs/entities/user-ui-config.cjs +0 -21
- package/dist/cjs/entities/user-ui-config.cjs.map +0 -1
- package/dist/cjs/entities/user.cjs +0 -29
- package/dist/cjs/entities/user.cjs.map +0 -1
- package/dist/cjs/entities/webhook.cjs +0 -78
- package/dist/cjs/entities/webhook.cjs.map +0 -1
- package/dist/cjs/entities/workflow-definition.cjs +0 -29
- package/dist/cjs/entities/workflow-definition.cjs.map +0 -1
- package/dist/cjs/methods/action.cjs +0 -53
- package/dist/cjs/methods/action.cjs.map +0 -1
- package/dist/cjs/methods/content-type.cjs +0 -49
- package/dist/cjs/methods/content-type.cjs.map +0 -1
- package/dist/cjs/methods/utils.cjs +0 -12
- package/dist/cjs/methods/utils.cjs.map +0 -1
- package/dist/cjs/plain/as-iterator.cjs +0 -39
- package/dist/cjs/plain/as-iterator.cjs.map +0 -1
- package/dist/cjs/plain/checks.cjs +0 -16
- package/dist/cjs/plain/checks.cjs.map +0 -1
- package/dist/cjs/plain/pagination-helper.cjs +0 -70
- package/dist/cjs/plain/pagination-helper.cjs.map +0 -1
- package/dist/cjs/plain/plain-client.cjs +0 -523
- package/dist/cjs/plain/plain-client.cjs.map +0 -1
- package/dist/cjs/plain/wrappers/wrap.cjs +0 -27
- package/dist/cjs/plain/wrappers/wrap.cjs.map +0 -1
- package/dist/cjs/upload-http-client.cjs +0 -17
- package/dist/cjs/upload-http-client.cjs.map +0 -1
- package/dist/contentful-management.browser.js +0 -21852
- package/dist/contentful-management.browser.js.map +0 -1
- package/dist/contentful-management.browser.min.js +0 -2
- package/dist/contentful-management.browser.min.js.map +0 -1
- package/dist/contentful-management.node.cjs +0 -35438
- package/dist/contentful-management.node.cjs.map +0 -1
- package/dist/contentful-management.react-native.js +0 -21847
- package/dist/contentful-management.react-native.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/access-token.js +0 -131
- package/dist/esm/adapters/REST/endpoints/access-token.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/ai-action-invocation.js +0 -8
- package/dist/esm/adapters/REST/endpoints/ai-action-invocation.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/ai-action.js +0 -49
- package/dist/esm/adapters/REST/endpoints/ai-action.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/api-key.js +0 -44
- package/dist/esm/adapters/REST/endpoints/api-key.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-access-token.js +0 -8
- package/dist/esm/adapters/REST/endpoints/app-access-token.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-action-call.js +0 -61
- package/dist/esm/adapters/REST/endpoints/app-action-call.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-action.js +0 -36
- package/dist/esm/adapters/REST/endpoints/app-action.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-bundle.js +0 -35
- package/dist/esm/adapters/REST/endpoints/app-bundle.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-definition.js +0 -45
- package/dist/esm/adapters/REST/endpoints/app-definition.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-details.js +0 -14
- package/dist/esm/adapters/REST/endpoints/app-details.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-event-subscription.js +0 -14
- package/dist/esm/adapters/REST/endpoints/app-event-subscription.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-installation.js +0 -42
- package/dist/esm/adapters/REST/endpoints/app-installation.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-key.js +0 -17
- package/dist/esm/adapters/REST/endpoints/app-key.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-signed-request.js +0 -8
- package/dist/esm/adapters/REST/endpoints/app-signed-request.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-signing-secret.js +0 -14
- package/dist/esm/adapters/REST/endpoints/app-signing-secret.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/app-upload.js +0 -25
- package/dist/esm/adapters/REST/endpoints/app-upload.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/asset-key.js +0 -32
- package/dist/esm/adapters/REST/endpoints/asset-key.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/asset.js +0 -174
- package/dist/esm/adapters/REST/endpoints/asset.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/bulk-action.js +0 -17
- package/dist/esm/adapters/REST/endpoints/bulk-action.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/comment.js +0 -91
- package/dist/esm/adapters/REST/endpoints/comment.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/concept-scheme.js +0 -45
- package/dist/esm/adapters/REST/endpoints/concept-scheme.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/concept.js +0 -61
- package/dist/esm/adapters/REST/endpoints/concept.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/content-type.js +0 -53
- package/dist/esm/adapters/REST/endpoints/content-type.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/editor-interface.js +0 -23
- package/dist/esm/adapters/REST/endpoints/editor-interface.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/entry.js +0 -95
- package/dist/esm/adapters/REST/endpoints/entry.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/environment-alias.js +0 -41
- package/dist/esm/adapters/REST/endpoints/environment-alias.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/environment-template-installation.js +0 -21
- package/dist/esm/adapters/REST/endpoints/environment-template-installation.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/environment-template.js +0 -41
- package/dist/esm/adapters/REST/endpoints/environment-template.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/environment.js +0 -46
- package/dist/esm/adapters/REST/endpoints/environment.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/extension.js +0 -39
- package/dist/esm/adapters/REST/endpoints/extension.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/function-log.js +0 -25
- package/dist/esm/adapters/REST/endpoints/function-log.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/function.js +0 -22
- package/dist/esm/adapters/REST/endpoints/function.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/http.js +0 -23
- package/dist/esm/adapters/REST/endpoints/http.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/index.js +0 -138
- package/dist/esm/adapters/REST/endpoints/index.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/locale.js +0 -34
- package/dist/esm/adapters/REST/endpoints/locale.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/oauth-application.js +0 -142
- package/dist/esm/adapters/REST/endpoints/oauth-application.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/organization-invitation.js +0 -27
- package/dist/esm/adapters/REST/endpoints/organization-invitation.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/organization-membership.js +0 -30
- package/dist/esm/adapters/REST/endpoints/organization-membership.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/organization.js +0 -26
- package/dist/esm/adapters/REST/endpoints/organization.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/personal-access-token.js +0 -33
- package/dist/esm/adapters/REST/endpoints/personal-access-token.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/preview-api-key.js +0 -13
- package/dist/esm/adapters/REST/endpoints/preview-api-key.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/raw.js +0 -55
- package/dist/esm/adapters/REST/endpoints/raw.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/release-action.js +0 -21
- package/dist/esm/adapters/REST/endpoints/release-action.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/release.js +0 -60
- package/dist/esm/adapters/REST/endpoints/release.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/resource-provider.js +0 -15
- package/dist/esm/adapters/REST/endpoints/resource-provider.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/resource-type.js +0 -25
- package/dist/esm/adapters/REST/endpoints/resource-type.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/resource.js +0 -9
- package/dist/esm/adapters/REST/endpoints/resource.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/role.js +0 -43
- package/dist/esm/adapters/REST/endpoints/role.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/scheduled-action.js +0 -38
- package/dist/esm/adapters/REST/endpoints/scheduled-action.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/snapshot.js +0 -26
- package/dist/esm/adapters/REST/endpoints/snapshot.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/space-member.js +0 -9
- package/dist/esm/adapters/REST/endpoints/space-member.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/space-membership.js +0 -54
- package/dist/esm/adapters/REST/endpoints/space-membership.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/space.js +0 -31
- package/dist/esm/adapters/REST/endpoints/space.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/tag.js +0 -31
- package/dist/esm/adapters/REST/endpoints/tag.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/task.js +0 -34
- package/dist/esm/adapters/REST/endpoints/task.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/team-membership.js +0 -32
- package/dist/esm/adapters/REST/endpoints/team-membership.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/team-space-membership.js +0 -46
- package/dist/esm/adapters/REST/endpoints/team-space-membership.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/team.js +0 -32
- package/dist/esm/adapters/REST/endpoints/team.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/ui-config.js +0 -19
- package/dist/esm/adapters/REST/endpoints/ui-config.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/upload-credentials.js +0 -14
- package/dist/esm/adapters/REST/endpoints/upload-credentials.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/upload.js +0 -39
- package/dist/esm/adapters/REST/endpoints/upload.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/usage.js +0 -15
- package/dist/esm/adapters/REST/endpoints/usage.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/user-ui-config.js +0 -19
- package/dist/esm/adapters/REST/endpoints/user-ui-config.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/user.js +0 -22
- package/dist/esm/adapters/REST/endpoints/user.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/utils.js +0 -22
- package/dist/esm/adapters/REST/endpoints/utils.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/webhook.js +0 -85
- package/dist/esm/adapters/REST/endpoints/webhook.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/workflow-definition.js +0 -36
- package/dist/esm/adapters/REST/endpoints/workflow-definition.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/workflow.js +0 -42
- package/dist/esm/adapters/REST/endpoints/workflow.js.map +0 -1
- package/dist/esm/adapters/REST/endpoints/workflows-changelog.js +0 -10
- package/dist/esm/adapters/REST/endpoints/workflows-changelog.js.map +0 -1
- package/dist/esm/adapters/REST/make-request.js +0 -21
- package/dist/esm/adapters/REST/make-request.js.map +0 -1
- package/dist/esm/adapters/REST/rest-adapter.js +0 -42
- package/dist/esm/adapters/REST/rest-adapter.js.map +0 -1
- package/dist/esm/common-types.js +0 -7
- package/dist/esm/common-types.js.map +0 -1
- package/dist/esm/common-utils.js +0 -33
- package/dist/esm/common-utils.js.map +0 -1
- package/dist/esm/constants/editor-interface-defaults/controls-defaults.js +0 -162
- package/dist/esm/constants/editor-interface-defaults/controls-defaults.js.map +0 -1
- package/dist/esm/constants/editor-interface-defaults/editors-defaults.js +0 -38
- package/dist/esm/constants/editor-interface-defaults/editors-defaults.js.map +0 -1
- package/dist/esm/constants/editor-interface-defaults/index.js +0 -13
- package/dist/esm/constants/editor-interface-defaults/index.js.map +0 -1
- package/dist/esm/constants/editor-interface-defaults/sidebar-defaults.js +0 -69
- package/dist/esm/constants/editor-interface-defaults/sidebar-defaults.js.map +0 -1
- package/dist/esm/constants/editor-interface-defaults/types.js +0 -16
- package/dist/esm/constants/editor-interface-defaults/types.js.map +0 -1
- package/dist/esm/create-adapter.js +0 -20
- package/dist/esm/create-adapter.js.map +0 -1
- package/dist/esm/create-app-definition-api.js +0 -252
- package/dist/esm/create-app-definition-api.js.map +0 -1
- package/dist/esm/create-contentful-api.js +0 -588
- package/dist/esm/create-contentful-api.js.map +0 -1
- package/dist/esm/create-entry-api.js +0 -488
- package/dist/esm/create-entry-api.js.map +0 -1
- package/dist/esm/create-environment-api.js +0 -2405
- package/dist/esm/create-environment-api.js.map +0 -1
- package/dist/esm/create-environment-template-api.js +0 -269
- package/dist/esm/create-environment-template-api.js.map +0 -1
- package/dist/esm/create-organization-api.js +0 -1137
- package/dist/esm/create-organization-api.js.map +0 -1
- package/dist/esm/create-space-api.js +0 -1588
- package/dist/esm/create-space-api.js.map +0 -1
- package/dist/esm/create-ui-config-api.js +0 -53
- package/dist/esm/create-ui-config-api.js.map +0 -1
- package/dist/esm/create-user-ui-config-api.js +0 -53
- package/dist/esm/create-user-ui-config-api.js.map +0 -1
- package/dist/esm/enhance-with-methods.js +0 -25
- package/dist/esm/enhance-with-methods.js.map +0 -1
- package/dist/esm/entities/access-token.js +0 -34
- package/dist/esm/entities/access-token.js.map +0 -1
- package/dist/esm/entities/ai-action-invocation.js +0 -29
- package/dist/esm/entities/ai-action-invocation.js.map +0 -1
- package/dist/esm/entities/ai-action.js +0 -92
- package/dist/esm/entities/ai-action.js.map +0 -1
- package/dist/esm/entities/api-key.js +0 -54
- package/dist/esm/entities/api-key.js.map +0 -1
- package/dist/esm/entities/app-access-token.js +0 -16
- package/dist/esm/entities/app-access-token.js.map +0 -1
- package/dist/esm/entities/app-action-call.js +0 -68
- package/dist/esm/entities/app-action-call.js.map +0 -1
- package/dist/esm/entities/app-action.js +0 -46
- package/dist/esm/entities/app-action.js.map +0 -1
- package/dist/esm/entities/app-bundle.js +0 -46
- package/dist/esm/entities/app-bundle.js.map +0 -1
- package/dist/esm/entities/app-definition.js +0 -27
- package/dist/esm/entities/app-definition.js.map +0 -1
- package/dist/esm/entities/app-details.js +0 -38
- package/dist/esm/entities/app-details.js.map +0 -1
- package/dist/esm/entities/app-event-subscription.js +0 -33
- package/dist/esm/entities/app-event-subscription.js.map +0 -1
- package/dist/esm/entities/app-installation.js +0 -53
- package/dist/esm/entities/app-installation.js.map +0 -1
- package/dist/esm/entities/app-key.js +0 -42
- package/dist/esm/entities/app-key.js.map +0 -1
- package/dist/esm/entities/app-signed-request.js +0 -16
- package/dist/esm/entities/app-signed-request.js.map +0 -1
- package/dist/esm/entities/app-signing-secret.js +0 -33
- package/dist/esm/entities/app-signing-secret.js.map +0 -1
- package/dist/esm/entities/app-upload.js +0 -37
- package/dist/esm/entities/app-upload.js.map +0 -1
- package/dist/esm/entities/asset-key.js +0 -16
- package/dist/esm/entities/asset-key.js.map +0 -1
- package/dist/esm/entities/asset.js +0 -130
- package/dist/esm/entities/asset.js.map +0 -1
- package/dist/esm/entities/bulk-action.js +0 -59
- package/dist/esm/entities/bulk-action.js.map +0 -1
- package/dist/esm/entities/comment.js +0 -61
- package/dist/esm/entities/comment.js.map +0 -1
- package/dist/esm/entities/content-type.js +0 -118
- package/dist/esm/entities/content-type.js.map +0 -1
- package/dist/esm/entities/editor-interface.js +0 -48
- package/dist/esm/entities/editor-interface.js.map +0 -1
- package/dist/esm/entities/entry.js +0 -25
- package/dist/esm/entities/entry.js.map +0 -1
- package/dist/esm/entities/environment-alias.js +0 -56
- package/dist/esm/entities/environment-alias.js.map +0 -1
- package/dist/esm/entities/environment-template-installation.js +0 -21
- package/dist/esm/entities/environment-template-installation.js.map +0 -1
- package/dist/esm/entities/environment-template.js +0 -16
- package/dist/esm/entities/environment-template.js.map +0 -1
- package/dist/esm/entities/environment.js +0 -32
- package/dist/esm/entities/environment.js.map +0 -1
- package/dist/esm/entities/extension.js +0 -52
- package/dist/esm/entities/extension.js.map +0 -1
- package/dist/esm/entities/function-log.js +0 -24
- package/dist/esm/entities/function-log.js.map +0 -1
- package/dist/esm/entities/function.js +0 -64
- package/dist/esm/entities/function.js.map +0 -1
- package/dist/esm/entities/locale.js +0 -55
- package/dist/esm/entities/locale.js.map +0 -1
- package/dist/esm/entities/oauth-application.js +0 -64
- package/dist/esm/entities/oauth-application.js.map +0 -1
- package/dist/esm/entities/organization-invitation.js +0 -16
- package/dist/esm/entities/organization-invitation.js.map +0 -1
- package/dist/esm/entities/organization-membership.js +0 -51
- package/dist/esm/entities/organization-membership.js.map +0 -1
- package/dist/esm/entities/organization.js +0 -30
- package/dist/esm/entities/organization.js.map +0 -1
- package/dist/esm/entities/personal-access-token.js +0 -34
- package/dist/esm/entities/personal-access-token.js.map +0 -1
- package/dist/esm/entities/preview-api-key.js +0 -29
- package/dist/esm/entities/preview-api-key.js.map +0 -1
- package/dist/esm/entities/release-action.js +0 -53
- package/dist/esm/entities/release-action.js.map +0 -1
- package/dist/esm/entities/release.js +0 -107
- package/dist/esm/entities/release.js.map +0 -1
- package/dist/esm/entities/resource-provider.js +0 -137
- package/dist/esm/entities/resource-provider.js.map +0 -1
- package/dist/esm/entities/resource-type.js +0 -95
- package/dist/esm/entities/resource-type.js.map +0 -1
- package/dist/esm/entities/resource.js +0 -11
- package/dist/esm/entities/resource.js.map +0 -1
- package/dist/esm/entities/role.js +0 -51
- package/dist/esm/entities/role.js.map +0 -1
- package/dist/esm/entities/scheduled-action.js +0 -147
- package/dist/esm/entities/scheduled-action.js.map +0 -1
- package/dist/esm/entities/snapshot.js +0 -34
- package/dist/esm/entities/snapshot.js.map +0 -1
- package/dist/esm/entities/space-member.js +0 -21
- package/dist/esm/entities/space-member.js.map +0 -1
- package/dist/esm/entities/space-membership.js +0 -51
- package/dist/esm/entities/space-membership.js.map +0 -1
- package/dist/esm/entities/space.js +0 -31
- package/dist/esm/entities/space.js.map +0 -1
- package/dist/esm/entities/tag.js +0 -54
- package/dist/esm/entities/tag.js.map +0 -1
- package/dist/esm/entities/task.js +0 -55
- package/dist/esm/entities/task.js.map +0 -1
- package/dist/esm/entities/team-membership.js +0 -52
- package/dist/esm/entities/team-membership.js.map +0 -1
- package/dist/esm/entities/team-space-membership.js +0 -51
- package/dist/esm/entities/team-space-membership.js.map +0 -1
- package/dist/esm/entities/team.js +0 -51
- package/dist/esm/entities/team.js.map +0 -1
- package/dist/esm/entities/ui-config.js +0 -19
- package/dist/esm/entities/ui-config.js.map +0 -1
- package/dist/esm/entities/upload.js +0 -37
- package/dist/esm/entities/upload.js.map +0 -1
- package/dist/esm/entities/usage.js +0 -23
- package/dist/esm/entities/usage.js.map +0 -1
- package/dist/esm/entities/user-ui-config.js +0 -19
- package/dist/esm/entities/user-ui-config.js.map +0 -1
- package/dist/esm/entities/user.js +0 -26
- package/dist/esm/entities/user.js.map +0 -1
- package/dist/esm/entities/webhook.js +0 -75
- package/dist/esm/entities/webhook.js.map +0 -1
- package/dist/esm/entities/workflow-definition.js +0 -29
- package/dist/esm/entities/workflow-definition.js.map +0 -1
- package/dist/esm/index.js +0 -37
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/methods/action.js +0 -49
- package/dist/esm/methods/action.js.map +0 -1
- package/dist/esm/methods/content-type.js +0 -47
- package/dist/esm/methods/content-type.js.map +0 -1
- package/dist/esm/methods/utils.js +0 -10
- package/dist/esm/methods/utils.js.map +0 -1
- package/dist/esm/plain/as-iterator.js +0 -37
- package/dist/esm/plain/as-iterator.js.map +0 -1
- package/dist/esm/plain/checks.js +0 -11
- package/dist/esm/plain/checks.js.map +0 -1
- package/dist/esm/plain/pagination-helper.js +0 -68
- package/dist/esm/plain/pagination-helper.js.map +0 -1
- package/dist/esm/plain/plain-client.js +0 -521
- package/dist/esm/plain/plain-client.js.map +0 -1
- package/dist/esm/plain/wrappers/wrap.js +0 -25
- package/dist/esm/plain/wrappers/wrap.js.map +0 -1
- package/dist/esm/upload-http-client.js +0 -15
- package/dist/esm/upload-http-client.js.map +0 -1
- package/dist/stats-browser-min.html +0 -4842
- package/dist/types/methods/bulk-action.d.ts +0 -14
|
@@ -1,2407 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var contentfulSdkCore = require('contentful-sdk-core');
|
|
4
|
-
var appInstallation = require('./entities/app-installation.cjs');
|
|
5
|
-
var appSignedRequest = require('./entities/app-signed-request.cjs');
|
|
6
|
-
var appActionCall = require('./entities/app-action-call.cjs');
|
|
7
|
-
var asset = require('./entities/asset.cjs');
|
|
8
|
-
var assetKey = require('./entities/asset-key.cjs');
|
|
9
|
-
var bulkAction = require('./entities/bulk-action.cjs');
|
|
10
|
-
var releaseAction = require('./entities/release-action.cjs');
|
|
11
|
-
var release = require('./entities/release.cjs');
|
|
12
|
-
var contentType = require('./entities/content-type.cjs');
|
|
13
|
-
var entry = require('./entities/entry.cjs');
|
|
14
|
-
var environment = require('./entities/environment.cjs');
|
|
15
|
-
var extension = require('./entities/extension.cjs');
|
|
16
|
-
var locale = require('./entities/locale.cjs');
|
|
17
|
-
var tag = require('./entities/tag.cjs');
|
|
18
|
-
var uiConfig = require('./entities/ui-config.cjs');
|
|
19
|
-
var userUiConfig = require('./entities/user-ui-config.cjs');
|
|
20
|
-
var environmentTemplateInstallation = require('./entities/environment-template-installation.cjs');
|
|
21
|
-
var _function = require('./entities/function.cjs');
|
|
22
|
-
var functionLog = require('./entities/function-log.cjs');
|
|
23
|
-
var appAccessToken = require('./entities/app-access-token.cjs');
|
|
24
|
-
var resource = require('./entities/resource.cjs');
|
|
25
|
-
var aiActionInvocation = require('./entities/ai-action-invocation.cjs');
|
|
26
|
-
var editorInterface = require('./entities/editor-interface.cjs');
|
|
27
|
-
var resourceType = require('./entities/resource-type.cjs');
|
|
28
|
-
var snapshot = require('./entities/snapshot.cjs');
|
|
29
|
-
var upload = require('./entities/upload.cjs');
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Creates API object with methods to access the Environment API
|
|
33
|
-
* @param {ContentfulEnvironmentAPI} makeRequest - function to make requests via an adapter
|
|
34
|
-
* @return {ContentfulSpaceAPI}
|
|
35
|
-
* @private
|
|
36
|
-
*/
|
|
37
|
-
function createEnvironmentApi(makeRequest) {
|
|
38
|
-
return {
|
|
39
|
-
/**
|
|
40
|
-
* Deletes the environment
|
|
41
|
-
* @return Promise for the deletion. It contains no data, but the Promise error case should be handled.
|
|
42
|
-
* @example ```javascript
|
|
43
|
-
* const contentful = require('contentful-management')
|
|
44
|
-
*
|
|
45
|
-
* const client = contentful.createClient({
|
|
46
|
-
* accessToken: '<content_management_api_key>'
|
|
47
|
-
* })
|
|
48
|
-
*
|
|
49
|
-
* client.getSpace('<space_id>')
|
|
50
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
51
|
-
* .then((environment) => environment.delete())
|
|
52
|
-
* .then(() => console.log('Environment deleted.'))
|
|
53
|
-
* .catch(console.error)
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
delete: function deleteEnvironment() {
|
|
57
|
-
const raw = this.toPlainObject();
|
|
58
|
-
return makeRequest({
|
|
59
|
-
entityType: 'Environment',
|
|
60
|
-
action: 'delete',
|
|
61
|
-
params: { spaceId: raw.sys.space.sys.id, environmentId: raw.sys.id },
|
|
62
|
-
}).then(() => {
|
|
63
|
-
// noop
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
/**
|
|
67
|
-
* Updates the environment
|
|
68
|
-
* @return Promise for the updated environment.
|
|
69
|
-
* @example ```javascript
|
|
70
|
-
* const contentful = require('contentful-management')
|
|
71
|
-
*
|
|
72
|
-
* const client = contentful.createClient({
|
|
73
|
-
* accessToken: '<content_management_api_key>'
|
|
74
|
-
* })
|
|
75
|
-
*
|
|
76
|
-
* client.getSpace('<space_id>')
|
|
77
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
78
|
-
* .then((environment) => {
|
|
79
|
-
* environment.name = 'New name'
|
|
80
|
-
* return environment.update()
|
|
81
|
-
* })
|
|
82
|
-
* .then((environment) => console.log(`Environment ${environment.sys.id} renamed.`)
|
|
83
|
-
* .catch(console.error)
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
update: function updateEnvironment() {
|
|
87
|
-
const raw = this.toPlainObject();
|
|
88
|
-
return makeRequest({
|
|
89
|
-
entityType: 'Environment',
|
|
90
|
-
action: 'update',
|
|
91
|
-
params: { spaceId: raw.sys.space.sys.id, environmentId: raw.sys.id },
|
|
92
|
-
payload: raw,
|
|
93
|
-
}).then((data) => environment.wrapEnvironment(makeRequest, data));
|
|
94
|
-
},
|
|
95
|
-
/**
|
|
96
|
-
* Creates SDK Entry object (locally) from entry data
|
|
97
|
-
* @param entryData - Entry Data
|
|
98
|
-
* @return Entry
|
|
99
|
-
* @example ```javascript
|
|
100
|
-
* environment.getEntry('entryId').then(entry => {
|
|
101
|
-
*
|
|
102
|
-
* // Build a plainObject in order to make it usable for React (saving in state or redux)
|
|
103
|
-
* const plainObject = entry.toPlainObject();
|
|
104
|
-
*
|
|
105
|
-
* // The entry is being updated in some way as plainObject:
|
|
106
|
-
* const updatedPlainObject = {
|
|
107
|
-
* ...plainObject,
|
|
108
|
-
* fields: {
|
|
109
|
-
* ...plainObject.fields,
|
|
110
|
-
* title: {
|
|
111
|
-
* 'en-US': 'updatedTitle'
|
|
112
|
-
* }
|
|
113
|
-
* }
|
|
114
|
-
* };
|
|
115
|
-
*
|
|
116
|
-
* // Rebuild an sdk object out of the updated plainObject:
|
|
117
|
-
* const entryWithMethodsAgain = environment.getEntryFromData(updatedPlainObject);
|
|
118
|
-
*
|
|
119
|
-
* // Update with help of the sdk method:
|
|
120
|
-
* entryWithMethodsAgain.update();
|
|
121
|
-
*
|
|
122
|
-
* });
|
|
123
|
-
* ```
|
|
124
|
-
**/
|
|
125
|
-
getEntryFromData(entryData) {
|
|
126
|
-
return entry.wrapEntry(makeRequest, entryData);
|
|
127
|
-
},
|
|
128
|
-
/**
|
|
129
|
-
* Creates SDK Asset object (locally) from entry data
|
|
130
|
-
* @param assetData - Asset ID
|
|
131
|
-
* @return Asset
|
|
132
|
-
* @example ```javascript
|
|
133
|
-
* environment.getAsset('asset_id').then(asset => {
|
|
134
|
-
*
|
|
135
|
-
* // Build a plainObject in order to make it usable for React (saving in state or redux)
|
|
136
|
-
* const plainObject = asset.toPlainObject();
|
|
137
|
-
*
|
|
138
|
-
* // The asset is being updated in some way as plainObject:
|
|
139
|
-
* const updatedPlainObject = {
|
|
140
|
-
* ...plainObject,
|
|
141
|
-
* fields: {
|
|
142
|
-
* ...plainObject.fields,
|
|
143
|
-
* title: {
|
|
144
|
-
* 'en-US': 'updatedTitle'
|
|
145
|
-
* }
|
|
146
|
-
* }
|
|
147
|
-
* };
|
|
148
|
-
*
|
|
149
|
-
* // Rebuild an sdk object out of the updated plainObject:
|
|
150
|
-
* const assetWithMethodsAgain = environment.getAssetFromData(updatedPlainObject);
|
|
151
|
-
*
|
|
152
|
-
* // Update with help of the sdk method:
|
|
153
|
-
* assetWithMethodsAgain.update();
|
|
154
|
-
*
|
|
155
|
-
* });
|
|
156
|
-
* ```
|
|
157
|
-
*/
|
|
158
|
-
getAssetFromData(assetData) {
|
|
159
|
-
return asset.wrapAsset(makeRequest, assetData);
|
|
160
|
-
},
|
|
161
|
-
/**
|
|
162
|
-
*
|
|
163
|
-
* @description Get a BulkAction by ID.
|
|
164
|
-
* See: https://www.contentful.com/developers/docs/references/content-management-api/#/reference/bulk-actions/bulk-action
|
|
165
|
-
* @param bulkActionId - ID of the BulkAction to fetch
|
|
166
|
-
* @returns - Promise with the BulkAction
|
|
167
|
-
*
|
|
168
|
-
* @example ```javascript
|
|
169
|
-
* const contentful = require('contentful-management')
|
|
170
|
-
*
|
|
171
|
-
* const client = contentful.createClient({
|
|
172
|
-
* accessToken: '<content_management_api_key>'
|
|
173
|
-
* })
|
|
174
|
-
*
|
|
175
|
-
* client.getSpace('<space_id>')
|
|
176
|
-
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
177
|
-
* .then((environment) => environment.getBulkAction('<bulk_action_id>'))
|
|
178
|
-
* .then((bulkAction) => console.log(bulkAction))
|
|
179
|
-
* ```
|
|
180
|
-
*/
|
|
181
|
-
getBulkAction(bulkActionId) {
|
|
182
|
-
const raw = this.toPlainObject();
|
|
183
|
-
return makeRequest({
|
|
184
|
-
entityType: 'BulkAction',
|
|
185
|
-
action: 'get',
|
|
186
|
-
params: {
|
|
187
|
-
spaceId: raw.sys.space.sys.id,
|
|
188
|
-
environmentId: raw.sys.id,
|
|
189
|
-
bulkActionId,
|
|
190
|
-
},
|
|
191
|
-
}).then((data) => bulkAction.wrapBulkAction(makeRequest, data));
|
|
192
|
-
},
|
|
193
|
-
/**
|
|
194
|
-
* @description Creates a BulkAction that will attempt to publish all items contained in the payload.
|
|
195
|
-
* See: https://www.contentful.com/developers/docs/references/content-management-api/#/reference/bulk-actions/publish-bulk-action
|
|
196
|
-
* @param {BulkActionPayload} payload - Object containing the items to be processed in the bulkAction
|
|
197
|
-
* @returns - Promise with the BulkAction
|
|
198
|
-
*
|
|
199
|
-
* @example
|
|
200
|
-
*
|
|
201
|
-
* ```javascript
|
|
202
|
-
* const contentful = require('contentful-management')
|
|
203
|
-
*
|
|
204
|
-
* const client = contentful.createClient({
|
|
205
|
-
* accessToken: '<content_management_api_key>'
|
|
206
|
-
* })
|
|
207
|
-
*
|
|
208
|
-
* const payload = {
|
|
209
|
-
* entities: {
|
|
210
|
-
* sys: { type: 'Array' }
|
|
211
|
-
* items: [
|
|
212
|
-
* { sys: { type: 'Link', id: '<entry-id>', linkType: 'Entry', version: 2 } }
|
|
213
|
-
* ]
|
|
214
|
-
* }
|
|
215
|
-
* }
|
|
216
|
-
*
|
|
217
|
-
* // Using Thenables
|
|
218
|
-
* client.getSpace('<space_id>')
|
|
219
|
-
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
220
|
-
* .then((environment) => environment.createPublishBulkAction(payload))
|
|
221
|
-
* .then((bulkAction) => console.log(bulkAction.waitProcessing()))
|
|
222
|
-
* .catch(console.error)
|
|
223
|
-
*
|
|
224
|
-
* // Using async/await
|
|
225
|
-
* try {
|
|
226
|
-
* const space = await client.getSpace('<space_id>')
|
|
227
|
-
* const environment = await space.getEnvironment('<environment_id>')
|
|
228
|
-
* const bulkActionInProgress = await environment.createPublishBulkAction(payload)
|
|
229
|
-
*
|
|
230
|
-
* // You can wait for a recently created BulkAction to be processed by using `bulkAction.waitProcessing()`
|
|
231
|
-
* const bulkActionCompleted = await bulkActionInProgress.waitProcessing()
|
|
232
|
-
* console.log(bulkActionCompleted)
|
|
233
|
-
* } catch (error) {
|
|
234
|
-
* console.log(error)
|
|
235
|
-
* }
|
|
236
|
-
* ```
|
|
237
|
-
*/
|
|
238
|
-
createPublishBulkAction(payload) {
|
|
239
|
-
const raw = this.toPlainObject();
|
|
240
|
-
return makeRequest({
|
|
241
|
-
entityType: 'BulkAction',
|
|
242
|
-
action: 'publish',
|
|
243
|
-
params: {
|
|
244
|
-
spaceId: raw.sys.space.sys.id,
|
|
245
|
-
environmentId: raw.sys.id,
|
|
246
|
-
},
|
|
247
|
-
payload,
|
|
248
|
-
}).then((data) => bulkAction.wrapBulkAction(makeRequest, data));
|
|
249
|
-
},
|
|
250
|
-
/**
|
|
251
|
-
* @description Creates a BulkAction that will attempt to validate all items contained in the payload.
|
|
252
|
-
* See: https://www.contentful.com/developers/docs/references/content-management-api/#/reference/bulk-actions/validate-bulk-action
|
|
253
|
-
* @param {BulkActionPayload} payload - Object containing the items to be processed in the bulkAction
|
|
254
|
-
* @returns - Promise with the BulkAction
|
|
255
|
-
*
|
|
256
|
-
* @example
|
|
257
|
-
*
|
|
258
|
-
* ```javascript
|
|
259
|
-
* const contentful = require('contentful-management')
|
|
260
|
-
*
|
|
261
|
-
* const client = contentful.createClient({
|
|
262
|
-
* accessToken: '<content_management_api_key>'
|
|
263
|
-
* })
|
|
264
|
-
*
|
|
265
|
-
* const payload = {
|
|
266
|
-
* action: 'publish',
|
|
267
|
-
* entities: {
|
|
268
|
-
* sys: { type: 'Array' }
|
|
269
|
-
* items: [
|
|
270
|
-
* { sys: { type: 'Link', id: '<entry-id>', linkType: 'Entry' } }
|
|
271
|
-
* ]
|
|
272
|
-
* }
|
|
273
|
-
* }
|
|
274
|
-
*
|
|
275
|
-
* // Using Thenables
|
|
276
|
-
* client.getSpace('<space_id>')
|
|
277
|
-
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
278
|
-
* .then((environment) => environment.createValidateBulkAction(payload))
|
|
279
|
-
* .then((bulkAction) => console.log(bulkAction.waitProcessing()))
|
|
280
|
-
* .catch(console.error)
|
|
281
|
-
*
|
|
282
|
-
* // Using async/await
|
|
283
|
-
* try {
|
|
284
|
-
* const space = await client.getSpace('<space_id>')
|
|
285
|
-
* const environment = await space.getEnvironment('<environment_id>')
|
|
286
|
-
* const bulkActionInProgress = await environment.createValidateBulkAction(payload)
|
|
287
|
-
*
|
|
288
|
-
* // You can wait for a recently created BulkAction to be processed by using `bulkAction.waitProcessing()`
|
|
289
|
-
* const bulkActionCompleted = await bulkActionInProgress.waitProcessing()
|
|
290
|
-
* console.log(bulkActionCompleted)
|
|
291
|
-
* } catch (error) {
|
|
292
|
-
* console.log(error)
|
|
293
|
-
* }
|
|
294
|
-
* ```
|
|
295
|
-
*/
|
|
296
|
-
createValidateBulkAction(payload) {
|
|
297
|
-
const raw = this.toPlainObject();
|
|
298
|
-
return makeRequest({
|
|
299
|
-
entityType: 'BulkAction',
|
|
300
|
-
action: 'validate',
|
|
301
|
-
params: {
|
|
302
|
-
spaceId: raw.sys.space.sys.id,
|
|
303
|
-
environmentId: raw.sys.id,
|
|
304
|
-
},
|
|
305
|
-
payload,
|
|
306
|
-
}).then((data) => bulkAction.wrapBulkAction(makeRequest, data));
|
|
307
|
-
},
|
|
308
|
-
/**
|
|
309
|
-
* @description Creates a BulkAction that will attempt to unpublish all items contained in the payload.
|
|
310
|
-
* See: https://www.contentful.com/developers/docs/references/content-management-api/#/reference/bulk-actions/unpublish-bulk-action
|
|
311
|
-
* @param {BulkActionPayload} payload - Object containing the items to be processed in the bulkAction
|
|
312
|
-
* @returns - Promise with the BulkAction
|
|
313
|
-
*
|
|
314
|
-
* @example
|
|
315
|
-
*
|
|
316
|
-
* ```javascript
|
|
317
|
-
* const contentful = require('contentful-management')
|
|
318
|
-
*
|
|
319
|
-
* const client = contentful.createClient({
|
|
320
|
-
* accessToken: '<content_management_api_key>'
|
|
321
|
-
* })
|
|
322
|
-
*
|
|
323
|
-
* const payload = {
|
|
324
|
-
* entities: {
|
|
325
|
-
* sys: { type: 'Array' }
|
|
326
|
-
* items: [
|
|
327
|
-
* { sys: { type: 'Link', id: 'entry-id', linkType: 'Entry' } }
|
|
328
|
-
* ]
|
|
329
|
-
* }
|
|
330
|
-
* }
|
|
331
|
-
*
|
|
332
|
-
* // Using Thenables
|
|
333
|
-
* client.getSpace('<space_id>')
|
|
334
|
-
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
335
|
-
* .then((environment) => environment.createUnpublishBulkAction(payload))
|
|
336
|
-
* .then((bulkAction) => console.log(bulkAction.waitProcessing()))
|
|
337
|
-
* .catch(console.error)
|
|
338
|
-
*
|
|
339
|
-
* // Using async/await
|
|
340
|
-
* try {
|
|
341
|
-
* const space = await clientgetSpace('<space_id>')
|
|
342
|
-
* const environment = await space.getEnvironment('<environment_id>')
|
|
343
|
-
* const bulkActionInProgress = await environment.createUnpublishBulkAction(payload)
|
|
344
|
-
*
|
|
345
|
-
* // You can wait for a recently created BulkAction to be processed by using `bulkAction.waitProcessing()`
|
|
346
|
-
* const bulkActionCompleted = await bulkActionInProgress.waitProcessing()
|
|
347
|
-
* console.log(bulkActionCompleted)
|
|
348
|
-
* } catch (error) {
|
|
349
|
-
* console.log(error)
|
|
350
|
-
* }
|
|
351
|
-
* ```
|
|
352
|
-
*/
|
|
353
|
-
createUnpublishBulkAction(payload) {
|
|
354
|
-
const raw = this.toPlainObject();
|
|
355
|
-
return makeRequest({
|
|
356
|
-
entityType: 'BulkAction',
|
|
357
|
-
action: 'unpublish',
|
|
358
|
-
params: {
|
|
359
|
-
spaceId: raw.sys.space.sys.id,
|
|
360
|
-
environmentId: raw.sys.id,
|
|
361
|
-
},
|
|
362
|
-
payload,
|
|
363
|
-
}).then((data) => bulkAction.wrapBulkAction(makeRequest, data));
|
|
364
|
-
},
|
|
365
|
-
/**
|
|
366
|
-
* Gets a Content Type
|
|
367
|
-
* @param contentTypeId - Content Type ID
|
|
368
|
-
* @return Promise for a Content Type
|
|
369
|
-
* @example ```javascript
|
|
370
|
-
* const contentful = require('contentful-management')
|
|
371
|
-
*
|
|
372
|
-
* const client = contentful.createClient({
|
|
373
|
-
* accessToken: '<content_management_api_key>'
|
|
374
|
-
* })
|
|
375
|
-
*
|
|
376
|
-
* client.getSpace('<space_id>')
|
|
377
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
378
|
-
* .then((environment) => environment.getContentType('<content_type_id>'))
|
|
379
|
-
* .then((contentType) => console.log(contentType))
|
|
380
|
-
* .catch(console.error)
|
|
381
|
-
* ```
|
|
382
|
-
*/
|
|
383
|
-
getContentType(contentTypeId) {
|
|
384
|
-
const raw = this.toPlainObject();
|
|
385
|
-
return makeRequest({
|
|
386
|
-
entityType: 'ContentType',
|
|
387
|
-
action: 'get',
|
|
388
|
-
params: {
|
|
389
|
-
spaceId: raw.sys.space.sys.id,
|
|
390
|
-
environmentId: raw.sys.id,
|
|
391
|
-
contentTypeId,
|
|
392
|
-
},
|
|
393
|
-
}).then((data) => contentType.wrapContentType(makeRequest, data));
|
|
394
|
-
},
|
|
395
|
-
/**
|
|
396
|
-
* Gets a collection of Content Types
|
|
397
|
-
* @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
|
|
398
|
-
* @return Promise for a collection of Content Types
|
|
399
|
-
* @example ```javascript
|
|
400
|
-
* const contentful = require('contentful-management')
|
|
401
|
-
*
|
|
402
|
-
* const client = contentful.createClient({
|
|
403
|
-
* accessToken: '<content_management_api_key>'
|
|
404
|
-
* })
|
|
405
|
-
*
|
|
406
|
-
* client.getSpace('<space_id>')
|
|
407
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
408
|
-
* .then((environment) => environment.getContentTypes())
|
|
409
|
-
* .then((response) => console.log(response.items))
|
|
410
|
-
* .catch(console.error)
|
|
411
|
-
* ```
|
|
412
|
-
*/
|
|
413
|
-
getContentTypes(query = {}) {
|
|
414
|
-
const raw = this.toPlainObject();
|
|
415
|
-
return makeRequest({
|
|
416
|
-
entityType: 'ContentType',
|
|
417
|
-
action: 'getMany',
|
|
418
|
-
params: {
|
|
419
|
-
spaceId: raw.sys.space.sys.id,
|
|
420
|
-
environmentId: raw.sys.id,
|
|
421
|
-
query: contentfulSdkCore.createRequestConfig({ query }).params,
|
|
422
|
-
},
|
|
423
|
-
}).then((data) => contentType.wrapContentTypeCollection(makeRequest, data));
|
|
424
|
-
},
|
|
425
|
-
/**
|
|
426
|
-
* Creates a Content Type
|
|
427
|
-
* @param data - Object representation of the Content Type to be created
|
|
428
|
-
* @return Promise for the newly created Content Type
|
|
429
|
-
* @example ```javascript
|
|
430
|
-
* const contentful = require('contentful-management')
|
|
431
|
-
*
|
|
432
|
-
* const client = contentful.createClient({
|
|
433
|
-
* accessToken: '<content_management_api_key>'
|
|
434
|
-
* })
|
|
435
|
-
*
|
|
436
|
-
* client.getSpace('<space_id>')
|
|
437
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
438
|
-
* .then((environment) => environment.createContentType({
|
|
439
|
-
* name: 'Blog Post',
|
|
440
|
-
* fields: [
|
|
441
|
-
* {
|
|
442
|
-
* id: 'title',
|
|
443
|
-
* name: 'Title',
|
|
444
|
-
* required: true,
|
|
445
|
-
* localized: false,
|
|
446
|
-
* type: 'Text'
|
|
447
|
-
* }
|
|
448
|
-
* ]
|
|
449
|
-
* }))
|
|
450
|
-
* .then((contentType) => console.log(contentType))
|
|
451
|
-
* .catch(console.error)
|
|
452
|
-
* ```
|
|
453
|
-
*/
|
|
454
|
-
createContentType(data) {
|
|
455
|
-
const raw = this.toPlainObject();
|
|
456
|
-
return makeRequest({
|
|
457
|
-
entityType: 'ContentType',
|
|
458
|
-
action: 'create',
|
|
459
|
-
params: {
|
|
460
|
-
spaceId: raw.sys.space.sys.id,
|
|
461
|
-
environmentId: raw.sys.id,
|
|
462
|
-
},
|
|
463
|
-
payload: data,
|
|
464
|
-
}).then((response) => contentType.wrapContentType(makeRequest, response));
|
|
465
|
-
},
|
|
466
|
-
/**
|
|
467
|
-
* Creates a Content Type with a custom ID
|
|
468
|
-
* @param contentTypeId - Content Type ID
|
|
469
|
-
* @param data - Object representation of the Content Type to be created
|
|
470
|
-
* @return Promise for the newly created Content Type
|
|
471
|
-
* @example ```javascript
|
|
472
|
-
* const contentful = require('contentful-management')
|
|
473
|
-
*
|
|
474
|
-
* const client = contentful.createClient({
|
|
475
|
-
* accessToken: '<content_management_api_key>'
|
|
476
|
-
* })
|
|
477
|
-
*
|
|
478
|
-
* client.getSpace('<space_id>')
|
|
479
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
480
|
-
* .then((environment) => environment.createContentTypeWithId('<content-type-id>', {
|
|
481
|
-
* name: 'Blog Post',
|
|
482
|
-
* fields: [
|
|
483
|
-
* {
|
|
484
|
-
* id: 'title',
|
|
485
|
-
* name: 'Title',
|
|
486
|
-
* required: true,
|
|
487
|
-
* localized: false,
|
|
488
|
-
* type: 'Text'
|
|
489
|
-
* }
|
|
490
|
-
* ]
|
|
491
|
-
* }))
|
|
492
|
-
* .then((contentType) => console.log(contentType))
|
|
493
|
-
* .catch(console.error)
|
|
494
|
-
* ```
|
|
495
|
-
*/
|
|
496
|
-
createContentTypeWithId(contentTypeId, data) {
|
|
497
|
-
const raw = this.toPlainObject();
|
|
498
|
-
return makeRequest({
|
|
499
|
-
entityType: 'ContentType',
|
|
500
|
-
action: 'createWithId',
|
|
501
|
-
params: {
|
|
502
|
-
spaceId: raw.sys.space.sys.id,
|
|
503
|
-
environmentId: raw.sys.id,
|
|
504
|
-
contentTypeId,
|
|
505
|
-
},
|
|
506
|
-
payload: data,
|
|
507
|
-
}).then((response) => contentType.wrapContentType(makeRequest, response));
|
|
508
|
-
},
|
|
509
|
-
/**
|
|
510
|
-
* Gets an EditorInterface for a ContentType
|
|
511
|
-
* @param contentTypeId - Content Type ID
|
|
512
|
-
* @return Promise for an EditorInterface
|
|
513
|
-
* @example ```javascript
|
|
514
|
-
* const contentful = require('contentful-management')
|
|
515
|
-
*
|
|
516
|
-
* const client = contentful.createClient({
|
|
517
|
-
* accessToken: '<content_management_api_key>'
|
|
518
|
-
* })
|
|
519
|
-
*
|
|
520
|
-
* client.getSpace('<space_id>')
|
|
521
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
522
|
-
* .then((environment) => environment.getEditorInterfaceForContentType('<content_type_id>'))
|
|
523
|
-
* .then((EditorInterface) => console.log(EditorInterface))
|
|
524
|
-
* .catch(console.error)
|
|
525
|
-
* ```
|
|
526
|
-
*/
|
|
527
|
-
getEditorInterfaceForContentType(contentTypeId) {
|
|
528
|
-
const raw = this.toPlainObject();
|
|
529
|
-
return makeRequest({
|
|
530
|
-
entityType: 'EditorInterface',
|
|
531
|
-
action: 'get',
|
|
532
|
-
params: {
|
|
533
|
-
spaceId: raw.sys.space.sys.id,
|
|
534
|
-
environmentId: raw.sys.id,
|
|
535
|
-
contentTypeId,
|
|
536
|
-
},
|
|
537
|
-
}).then((response) => editorInterface.wrapEditorInterface(makeRequest, response));
|
|
538
|
-
},
|
|
539
|
-
/**
|
|
540
|
-
* Gets all EditorInterfaces
|
|
541
|
-
* @return Promise for a collection of EditorInterface
|
|
542
|
-
* @example ```javascript
|
|
543
|
-
* const contentful = require('contentful-management')
|
|
544
|
-
*
|
|
545
|
-
* const client = contentful.createClient({
|
|
546
|
-
* accessToken: '<content_management_api_key>'
|
|
547
|
-
* })
|
|
548
|
-
*
|
|
549
|
-
* client.getSpace('<space_id>')
|
|
550
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
551
|
-
* .then((environment) => environment.getEditorInterfaces())
|
|
552
|
-
* .then((response) => console.log(response.items))
|
|
553
|
-
* .catch(console.error)
|
|
554
|
-
* ```
|
|
555
|
-
*/
|
|
556
|
-
getEditorInterfaces() {
|
|
557
|
-
const raw = this.toPlainObject();
|
|
558
|
-
return makeRequest({
|
|
559
|
-
entityType: 'EditorInterface',
|
|
560
|
-
action: 'getMany',
|
|
561
|
-
params: {
|
|
562
|
-
spaceId: raw.sys.space.sys.id,
|
|
563
|
-
environmentId: raw.sys.id,
|
|
564
|
-
},
|
|
565
|
-
}).then((response) => editorInterface.wrapEditorInterfaceCollection(makeRequest, response));
|
|
566
|
-
},
|
|
567
|
-
/**
|
|
568
|
-
* Gets an Entry
|
|
569
|
-
* Warning: if you are using the select operator, when saving, any field that was not selected will be removed
|
|
570
|
-
* from your entry in the backend
|
|
571
|
-
* @param id - Entry ID
|
|
572
|
-
* @param query - Object with search parameters. In this method it's only useful for `locale`.
|
|
573
|
-
* @return Promise for an Entry
|
|
574
|
-
* @example ```javascript
|
|
575
|
-
* const contentful = require('contentful-management')
|
|
576
|
-
*
|
|
577
|
-
* const client = contentful.createClient({
|
|
578
|
-
* accessToken: '<content_management_api_key>'
|
|
579
|
-
* })
|
|
580
|
-
*
|
|
581
|
-
* client.getSpace('<space_id>')
|
|
582
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
583
|
-
* .then((environment) => environment.getEntry('<entry-id>'))
|
|
584
|
-
* .then((entry) => console.log(entry))
|
|
585
|
-
* .catch(console.error)
|
|
586
|
-
* ```
|
|
587
|
-
*/
|
|
588
|
-
getEntry(id, query = {}) {
|
|
589
|
-
const raw = this.toPlainObject();
|
|
590
|
-
return makeRequest({
|
|
591
|
-
entityType: 'Entry',
|
|
592
|
-
action: 'get',
|
|
593
|
-
params: {
|
|
594
|
-
spaceId: raw.sys.space.sys.id,
|
|
595
|
-
environmentId: raw.sys.id,
|
|
596
|
-
entryId: id,
|
|
597
|
-
query: contentfulSdkCore.createRequestConfig({ query: query }).params,
|
|
598
|
-
},
|
|
599
|
-
}).then((data) => entry.wrapEntry(makeRequest, data));
|
|
600
|
-
},
|
|
601
|
-
/**
|
|
602
|
-
* Deletes an Entry of this environment
|
|
603
|
-
* @param id - Entry ID
|
|
604
|
-
* @return Promise for the deletion. It contains no data, but the Promise error case should be handled.
|
|
605
|
-
* @example ```javascript
|
|
606
|
-
* const contentful = require('contentful-management')
|
|
607
|
-
*
|
|
608
|
-
* const client = contentful.createClient({
|
|
609
|
-
* accessToken: '<content_management_api_key>'
|
|
610
|
-
* })
|
|
611
|
-
*
|
|
612
|
-
* client.getSpace('<space_id>')
|
|
613
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
614
|
-
* .then((environment) => environment.deleteEntry("4bmLXiuviAZH3jkj5DLRWE"))
|
|
615
|
-
* .then(() => console.log('Entry deleted.'))
|
|
616
|
-
* .catch(console.error)
|
|
617
|
-
* ```
|
|
618
|
-
*/
|
|
619
|
-
deleteEntry(id) {
|
|
620
|
-
const raw = this.toPlainObject();
|
|
621
|
-
return makeRequest({
|
|
622
|
-
entityType: 'Entry',
|
|
623
|
-
action: 'delete',
|
|
624
|
-
params: {
|
|
625
|
-
spaceId: raw.sys.space.sys.id,
|
|
626
|
-
environmentId: raw.sys.id,
|
|
627
|
-
entryId: id,
|
|
628
|
-
},
|
|
629
|
-
}).then(() => {
|
|
630
|
-
// noop
|
|
631
|
-
});
|
|
632
|
-
},
|
|
633
|
-
/**
|
|
634
|
-
* Gets a collection of Entries
|
|
635
|
-
* Warning: if you are using the select operator, when saving, any field that was not selected will be removed
|
|
636
|
-
* from your entry in the backend
|
|
637
|
-
* @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
|
|
638
|
-
* @return Promise for a collection of Entries
|
|
639
|
-
* @example ```javascript
|
|
640
|
-
* const contentful = require('contentful-management')
|
|
641
|
-
*
|
|
642
|
-
* const client = contentful.createClient({
|
|
643
|
-
* accessToken: '<content_management_api_key>'
|
|
644
|
-
* })
|
|
645
|
-
*
|
|
646
|
-
* client.getSpace('<space_id>')
|
|
647
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
648
|
-
* .then((environment) => environment.getEntries({'content_type': 'foo'})) // you can add more queries as 'key': 'value'
|
|
649
|
-
* .then((response) => console.log(response.items))
|
|
650
|
-
* .catch(console.error)
|
|
651
|
-
* ```
|
|
652
|
-
*/
|
|
653
|
-
getEntries(query = {}) {
|
|
654
|
-
const raw = this.toPlainObject();
|
|
655
|
-
return makeRequest({
|
|
656
|
-
entityType: 'Entry',
|
|
657
|
-
action: 'getMany',
|
|
658
|
-
params: {
|
|
659
|
-
spaceId: raw.sys.space.sys.id,
|
|
660
|
-
environmentId: raw.sys.id,
|
|
661
|
-
query: contentfulSdkCore.createRequestConfig({ query: query }).params,
|
|
662
|
-
},
|
|
663
|
-
}).then((data) => entry.wrapEntryCollection(makeRequest, data));
|
|
664
|
-
},
|
|
665
|
-
/**
|
|
666
|
-
* Gets a collection of published Entries
|
|
667
|
-
* @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
|
|
668
|
-
* @return Promise for a collection of published Entries
|
|
669
|
-
* @example ```javascript
|
|
670
|
-
* const contentful = require('contentful-management')
|
|
671
|
-
*
|
|
672
|
-
* const client = contentful.createClient({
|
|
673
|
-
* accessToken: '<content_management_api_key>'
|
|
674
|
-
* })
|
|
675
|
-
*
|
|
676
|
-
* client.getSpace('<space_id>')
|
|
677
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
678
|
-
* .then((environment) => environment.getPublishedEntries({'content_type': 'foo'})) // you can add more queries as 'key': 'value'
|
|
679
|
-
* .then((response) => console.log(response.items))
|
|
680
|
-
* .catch(console.error)
|
|
681
|
-
* ```
|
|
682
|
-
*/
|
|
683
|
-
getPublishedEntries(query = {}) {
|
|
684
|
-
const raw = this.toPlainObject();
|
|
685
|
-
return makeRequest({
|
|
686
|
-
entityType: 'Entry',
|
|
687
|
-
action: 'getPublished',
|
|
688
|
-
params: {
|
|
689
|
-
spaceId: raw.sys.space.sys.id,
|
|
690
|
-
environmentId: raw.sys.id,
|
|
691
|
-
query: contentfulSdkCore.createRequestConfig({ query: query }).params,
|
|
692
|
-
},
|
|
693
|
-
}).then((data) => entry.wrapEntryCollection(makeRequest, data));
|
|
694
|
-
},
|
|
695
|
-
/**
|
|
696
|
-
* Creates a Entry
|
|
697
|
-
* @param contentTypeId - The Content Type ID of the newly created Entry
|
|
698
|
-
* @param data - Object representation of the Entry to be created
|
|
699
|
-
* @return Promise for the newly created Entry
|
|
700
|
-
* @example ```javascript
|
|
701
|
-
* const contentful = require('contentful-management')
|
|
702
|
-
*
|
|
703
|
-
* const client = contentful.createClient({
|
|
704
|
-
* accessToken: '<content_management_api_key>'
|
|
705
|
-
* })
|
|
706
|
-
*
|
|
707
|
-
* client.getSpace('<space_id>')
|
|
708
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
709
|
-
* .then((environment) => environment.createEntry('<content_type_id>', {
|
|
710
|
-
* fields: {
|
|
711
|
-
* title: {
|
|
712
|
-
* 'en-US': 'Entry title'
|
|
713
|
-
* }
|
|
714
|
-
* }
|
|
715
|
-
* }))
|
|
716
|
-
* .then((entry) => console.log(entry))
|
|
717
|
-
* .catch(console.error)
|
|
718
|
-
* ```
|
|
719
|
-
*/
|
|
720
|
-
createEntry(contentTypeId, data) {
|
|
721
|
-
const raw = this.toPlainObject();
|
|
722
|
-
return makeRequest({
|
|
723
|
-
entityType: 'Entry',
|
|
724
|
-
action: 'create',
|
|
725
|
-
params: {
|
|
726
|
-
spaceId: raw.sys.space.sys.id,
|
|
727
|
-
environmentId: raw.sys.id,
|
|
728
|
-
contentTypeId: contentTypeId,
|
|
729
|
-
},
|
|
730
|
-
payload: data,
|
|
731
|
-
}).then((response) => entry.wrapEntry(makeRequest, response));
|
|
732
|
-
},
|
|
733
|
-
/**
|
|
734
|
-
* Creates a Entry with a custom ID
|
|
735
|
-
* @param contentTypeId - The Content Type of the newly created Entry
|
|
736
|
-
* @param id - Entry ID
|
|
737
|
-
* @param data - Object representation of the Entry to be created
|
|
738
|
-
* @return Promise for the newly created Entry
|
|
739
|
-
* @example ```javascript
|
|
740
|
-
* const contentful = require('contentful-management')
|
|
741
|
-
*
|
|
742
|
-
* const client = contentful.createClient({
|
|
743
|
-
* accessToken: '<content_management_api_key>'
|
|
744
|
-
* })
|
|
745
|
-
*
|
|
746
|
-
* // Create entry
|
|
747
|
-
* client.getSpace('<space_id>')
|
|
748
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
749
|
-
* .then((environment) => environment.createEntryWithId('<content_type_id>', '<entry_id>', {
|
|
750
|
-
* fields: {
|
|
751
|
-
* title: {
|
|
752
|
-
* 'en-US': 'Entry title'
|
|
753
|
-
* }
|
|
754
|
-
* }
|
|
755
|
-
* }))
|
|
756
|
-
* .then((entry) => console.log(entry))
|
|
757
|
-
* .catch(console.error)
|
|
758
|
-
* ```
|
|
759
|
-
*/
|
|
760
|
-
createEntryWithId(contentTypeId, id, data) {
|
|
761
|
-
const raw = this.toPlainObject();
|
|
762
|
-
return makeRequest({
|
|
763
|
-
entityType: 'Entry',
|
|
764
|
-
action: 'createWithId',
|
|
765
|
-
params: {
|
|
766
|
-
spaceId: raw.sys.space.sys.id,
|
|
767
|
-
environmentId: raw.sys.id,
|
|
768
|
-
entryId: id,
|
|
769
|
-
contentTypeId: contentTypeId,
|
|
770
|
-
},
|
|
771
|
-
payload: data,
|
|
772
|
-
}).then((response) => entry.wrapEntry(makeRequest, response));
|
|
773
|
-
},
|
|
774
|
-
/**
|
|
775
|
-
* Get entry references
|
|
776
|
-
* @param entryId - Entry ID
|
|
777
|
-
* @param {Object} options.include - Level of the entry descendants from 1 up to 10 maximum
|
|
778
|
-
* @returns Promise of Entry references
|
|
779
|
-
* @example ```javascript
|
|
780
|
-
* const contentful = require('contentful-management');
|
|
781
|
-
*
|
|
782
|
-
* const client = contentful.createClient({
|
|
783
|
-
* accessToken: '<contentful_management_api_key>
|
|
784
|
-
* })
|
|
785
|
-
*
|
|
786
|
-
* // Get entry references
|
|
787
|
-
* client.getSpace('<space_id>')
|
|
788
|
-
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
789
|
-
* .then((environment) => environment.getEntryReferences('<entry_id>', {include: number}))
|
|
790
|
-
* .then((entry) => console.log(entry.includes))
|
|
791
|
-
* // or
|
|
792
|
-
* .then((environment) => environment.getEntry('<entry_id>')).then((entry) => entry.references({include: number}))
|
|
793
|
-
* .catch(console.error)
|
|
794
|
-
* ```
|
|
795
|
-
*/
|
|
796
|
-
getEntryReferences(entryId, options) {
|
|
797
|
-
const raw = this.toPlainObject();
|
|
798
|
-
return makeRequest({
|
|
799
|
-
entityType: 'Entry',
|
|
800
|
-
action: 'references',
|
|
801
|
-
params: {
|
|
802
|
-
spaceId: raw.sys.space.sys.id,
|
|
803
|
-
environmentId: raw.sys.id,
|
|
804
|
-
entryId: entryId,
|
|
805
|
-
include: options?.include,
|
|
806
|
-
},
|
|
807
|
-
}).then((response) => entry.wrapEntryCollection(makeRequest, response));
|
|
808
|
-
},
|
|
809
|
-
/**
|
|
810
|
-
* Gets an Asset
|
|
811
|
-
* Warning: if you are using the select operator, when saving, any field that was not selected will be removed
|
|
812
|
-
* from your entry in the backend
|
|
813
|
-
* @param id - Asset ID
|
|
814
|
-
* @param query - Object with search parameters. In this method it's only useful for `locale`.
|
|
815
|
-
* @return Promise for an Asset
|
|
816
|
-
* @example ```javascript
|
|
817
|
-
* const contentful = require('contentful-management')
|
|
818
|
-
*
|
|
819
|
-
* const client = contentful.createClient({
|
|
820
|
-
* accessToken: '<content_management_api_key>'
|
|
821
|
-
* })
|
|
822
|
-
*
|
|
823
|
-
* client.getSpace('<space_id>')
|
|
824
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
825
|
-
* .then((environment) => environment.getAsset('<asset_id>'))
|
|
826
|
-
* .then((asset) => console.log(asset))
|
|
827
|
-
* .catch(console.error)
|
|
828
|
-
* ```
|
|
829
|
-
*/
|
|
830
|
-
getAsset(id, query = {}) {
|
|
831
|
-
const raw = this.toPlainObject();
|
|
832
|
-
return makeRequest({
|
|
833
|
-
entityType: 'Asset',
|
|
834
|
-
action: 'get',
|
|
835
|
-
params: {
|
|
836
|
-
spaceId: raw.sys.space.sys.id,
|
|
837
|
-
environmentId: raw.sys.id,
|
|
838
|
-
assetId: id,
|
|
839
|
-
query: contentfulSdkCore.createRequestConfig({ query: query }).params,
|
|
840
|
-
},
|
|
841
|
-
}).then((data) => asset.wrapAsset(makeRequest, data));
|
|
842
|
-
},
|
|
843
|
-
/**
|
|
844
|
-
* Gets a collection of Assets
|
|
845
|
-
* Warning: if you are using the select operator, when saving, any field that was not selected will be removed
|
|
846
|
-
* from your entry in the backend
|
|
847
|
-
* @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
|
|
848
|
-
* @return Promise for a collection of Assets
|
|
849
|
-
* @example ```javascript
|
|
850
|
-
* const contentful = require('contentful-management')
|
|
851
|
-
*
|
|
852
|
-
* const client = contentful.createClient({
|
|
853
|
-
* accessToken: '<content_management_api_key>'
|
|
854
|
-
* })
|
|
855
|
-
*
|
|
856
|
-
* client.getSpace('<space_id>')
|
|
857
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
858
|
-
* .then((environment) => environment.getAssets())
|
|
859
|
-
* .then((response) => console.log(response.items))
|
|
860
|
-
* .catch(console.error)
|
|
861
|
-
* ```
|
|
862
|
-
*/
|
|
863
|
-
getAssets(query = {}) {
|
|
864
|
-
const raw = this.toPlainObject();
|
|
865
|
-
return makeRequest({
|
|
866
|
-
entityType: 'Asset',
|
|
867
|
-
action: 'getMany',
|
|
868
|
-
params: {
|
|
869
|
-
spaceId: raw.sys.space.sys.id,
|
|
870
|
-
environmentId: raw.sys.id,
|
|
871
|
-
query: contentfulSdkCore.createRequestConfig({ query: query }).params,
|
|
872
|
-
},
|
|
873
|
-
}).then((data) => asset.wrapAssetCollection(makeRequest, data));
|
|
874
|
-
},
|
|
875
|
-
/**
|
|
876
|
-
* Gets a collection of published Assets
|
|
877
|
-
* @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
|
|
878
|
-
* @return Promise for a collection of published Assets
|
|
879
|
-
* @example ```javascript
|
|
880
|
-
* const contentful = require('contentful-management')
|
|
881
|
-
*
|
|
882
|
-
* const client = contentful.createClient({
|
|
883
|
-
* accessToken: '<content_management_api_key>'
|
|
884
|
-
* })
|
|
885
|
-
*
|
|
886
|
-
* client.getSpace('<space_id>')
|
|
887
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
888
|
-
* .then((environment) => environment.getPublishedAssets())
|
|
889
|
-
* .then((response) => console.log(response.items))
|
|
890
|
-
* .catch(console.error)
|
|
891
|
-
* ```
|
|
892
|
-
*/
|
|
893
|
-
getPublishedAssets(query = {}) {
|
|
894
|
-
const raw = this.toPlainObject();
|
|
895
|
-
return makeRequest({
|
|
896
|
-
entityType: 'Asset',
|
|
897
|
-
action: 'getPublished',
|
|
898
|
-
params: {
|
|
899
|
-
spaceId: raw.sys.space.sys.id,
|
|
900
|
-
environmentId: raw.sys.id,
|
|
901
|
-
query: contentfulSdkCore.createRequestConfig({ query: query }).params,
|
|
902
|
-
},
|
|
903
|
-
}).then((data) => asset.wrapAssetCollection(makeRequest, data));
|
|
904
|
-
},
|
|
905
|
-
/**
|
|
906
|
-
* Creates a Asset. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
|
|
907
|
-
* @param data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.
|
|
908
|
-
* @return Promise for the newly created Asset
|
|
909
|
-
* @example ```javascript
|
|
910
|
-
* const client = contentful.createClient({
|
|
911
|
-
* accessToken: '<content_management_api_key>'
|
|
912
|
-
* })
|
|
913
|
-
*
|
|
914
|
-
* // Create asset
|
|
915
|
-
* client.getSpace('<space_id>')
|
|
916
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
917
|
-
* .then((environment) => environment.createAsset({
|
|
918
|
-
* fields: {
|
|
919
|
-
* title: {
|
|
920
|
-
* 'en-US': 'Playsam Streamliner'
|
|
921
|
-
* },
|
|
922
|
-
* file: {
|
|
923
|
-
* 'en-US': {
|
|
924
|
-
* contentType: 'image/jpeg',
|
|
925
|
-
* fileName: 'example.jpeg',
|
|
926
|
-
* upload: 'https://example.com/example.jpg'
|
|
927
|
-
* }
|
|
928
|
-
* }
|
|
929
|
-
* }
|
|
930
|
-
* }))
|
|
931
|
-
* .then((asset) => asset.processForLocale("en-US")) // OR asset.processForAllLocales()
|
|
932
|
-
* .then((asset) => console.log(asset))
|
|
933
|
-
* .catch(console.error)
|
|
934
|
-
* ```
|
|
935
|
-
*/
|
|
936
|
-
createAsset(data) {
|
|
937
|
-
const raw = this.toPlainObject();
|
|
938
|
-
return makeRequest({
|
|
939
|
-
entityType: 'Asset',
|
|
940
|
-
action: 'create',
|
|
941
|
-
params: {
|
|
942
|
-
spaceId: raw.sys.space.sys.id,
|
|
943
|
-
environmentId: raw.sys.id,
|
|
944
|
-
},
|
|
945
|
-
payload: data,
|
|
946
|
-
}).then((response) => asset.wrapAsset(makeRequest, response));
|
|
947
|
-
},
|
|
948
|
-
/**
|
|
949
|
-
* Creates a Asset with a custom ID. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
|
|
950
|
-
* @param id - Asset ID
|
|
951
|
-
* @param data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.
|
|
952
|
-
* @return Promise for the newly created Asset
|
|
953
|
-
* @example ```javascript
|
|
954
|
-
* const client = contentful.createClient({
|
|
955
|
-
* accessToken: '<content_management_api_key>'
|
|
956
|
-
* })
|
|
957
|
-
*
|
|
958
|
-
* // Create asset
|
|
959
|
-
* client.getSpace('<space_id>')
|
|
960
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
961
|
-
* .then((environment) => environment.createAssetWithId('<asset_id>', {
|
|
962
|
-
* title: {
|
|
963
|
-
* 'en-US': 'Playsam Streamliner'
|
|
964
|
-
* },
|
|
965
|
-
* file: {
|
|
966
|
-
* 'en-US': {
|
|
967
|
-
* contentType: 'image/jpeg',
|
|
968
|
-
* fileName: 'example.jpeg',
|
|
969
|
-
* upload: 'https://example.com/example.jpg'
|
|
970
|
-
* }
|
|
971
|
-
* }
|
|
972
|
-
* }))
|
|
973
|
-
* .then((asset) => asset.process())
|
|
974
|
-
* .then((asset) => console.log(asset))
|
|
975
|
-
* .catch(console.error)
|
|
976
|
-
* ```
|
|
977
|
-
*/
|
|
978
|
-
createAssetWithId(id, data) {
|
|
979
|
-
const raw = this.toPlainObject();
|
|
980
|
-
return makeRequest({
|
|
981
|
-
entityType: 'Asset',
|
|
982
|
-
action: 'createWithId',
|
|
983
|
-
params: {
|
|
984
|
-
spaceId: raw.sys.space.sys.id,
|
|
985
|
-
environmentId: raw.sys.id,
|
|
986
|
-
assetId: id,
|
|
987
|
-
},
|
|
988
|
-
payload: data,
|
|
989
|
-
}).then((response) => asset.wrapAsset(makeRequest, response));
|
|
990
|
-
},
|
|
991
|
-
/**
|
|
992
|
-
* Creates a Asset based on files. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
|
|
993
|
-
* @param data - Object representation of the Asset to be created. Note that the field object should have an uploadFrom property on asset creation, which will be removed and replaced with an url property when processing is finished.
|
|
994
|
-
* @param data.fields.file.[LOCALE].file - Can be a string, an ArrayBuffer or a Stream.
|
|
995
|
-
* @return Promise for the newly created Asset
|
|
996
|
-
* @example ```javascript
|
|
997
|
-
* const client = contentful.createClient({
|
|
998
|
-
* accessToken: '<content_management_api_key>'
|
|
999
|
-
* })
|
|
1000
|
-
*
|
|
1001
|
-
* client.getSpace('<space_id>')
|
|
1002
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1003
|
-
* .then((environment) => environment.createAssetFromFiles({
|
|
1004
|
-
* fields: {
|
|
1005
|
-
* file: {
|
|
1006
|
-
* 'en-US': {
|
|
1007
|
-
* contentType: 'image/jpeg',
|
|
1008
|
-
* fileName: 'filename_english.jpg',
|
|
1009
|
-
* file: createReadStream('path/to/filename_english.jpg')
|
|
1010
|
-
* },
|
|
1011
|
-
* 'de-DE': {
|
|
1012
|
-
* contentType: 'image/svg+xml',
|
|
1013
|
-
* fileName: 'filename_german.svg',
|
|
1014
|
-
* file: '<svg><path fill="red" d="M50 50h150v50H50z"/></svg>'
|
|
1015
|
-
* }
|
|
1016
|
-
* }
|
|
1017
|
-
* }
|
|
1018
|
-
* }))
|
|
1019
|
-
* .then((asset) => console.log(asset))
|
|
1020
|
-
* .catch(console.error)
|
|
1021
|
-
* ```
|
|
1022
|
-
*/
|
|
1023
|
-
createAssetFromFiles(data, options) {
|
|
1024
|
-
const raw = this.toPlainObject();
|
|
1025
|
-
return makeRequest({
|
|
1026
|
-
entityType: 'Asset',
|
|
1027
|
-
action: 'createFromFiles',
|
|
1028
|
-
params: {
|
|
1029
|
-
spaceId: raw.sys.space.sys.id,
|
|
1030
|
-
environmentId: raw.sys.id,
|
|
1031
|
-
uploadTimeout: options?.uploadTimeout,
|
|
1032
|
-
},
|
|
1033
|
-
payload: data,
|
|
1034
|
-
}).then((response) => asset.wrapAsset(makeRequest, response));
|
|
1035
|
-
},
|
|
1036
|
-
/**
|
|
1037
|
-
* Creates an asset key for signing asset URLs (Embargoed Assets)
|
|
1038
|
-
* @param data Object with request payload
|
|
1039
|
-
* @param data.expiresAt number a UNIX timestamp in the future (but not more than 48 hours from time of calling)
|
|
1040
|
-
* @return Promise for the newly created AssetKey
|
|
1041
|
-
* @example ```javascript
|
|
1042
|
-
* const client = contentful.createClient({
|
|
1043
|
-
* accessToken: '<content_management_api_key>'
|
|
1044
|
-
* })
|
|
1045
|
-
*
|
|
1046
|
-
* // Create assetKey
|
|
1047
|
-
* now = () => Math.floor(Date.now() / 1000)
|
|
1048
|
-
* const withExpiryIn1Hour = () => now() + 1 * 60 * 60
|
|
1049
|
-
* client.getSpace('<space_id>')
|
|
1050
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1051
|
-
* .then((environment) => environment.createAssetKey({ expiresAt: withExpiryIn1Hour() }))
|
|
1052
|
-
* .then((policy, secret) => console.log({ policy, secret }))
|
|
1053
|
-
* .catch(console.error)
|
|
1054
|
-
* ```
|
|
1055
|
-
*/
|
|
1056
|
-
createAssetKey(payload) {
|
|
1057
|
-
const raw = this.toPlainObject();
|
|
1058
|
-
return makeRequest({
|
|
1059
|
-
entityType: 'AssetKey',
|
|
1060
|
-
action: 'create',
|
|
1061
|
-
params: {
|
|
1062
|
-
spaceId: raw.sys.space.sys.id,
|
|
1063
|
-
environmentId: raw.sys.id,
|
|
1064
|
-
},
|
|
1065
|
-
payload,
|
|
1066
|
-
}).then((data) => assetKey.wrapAssetKey(makeRequest, data));
|
|
1067
|
-
},
|
|
1068
|
-
/**
|
|
1069
|
-
* Gets an Upload
|
|
1070
|
-
* @param id - Upload ID
|
|
1071
|
-
* @return Promise for an Upload
|
|
1072
|
-
* @example ```javascript
|
|
1073
|
-
* const client = contentful.createClient({
|
|
1074
|
-
* accessToken: '<content_management_api_key>'
|
|
1075
|
-
* })
|
|
1076
|
-
* const uploadStream = createReadStream('path/to/filename_english.jpg')
|
|
1077
|
-
*
|
|
1078
|
-
* client.getSpace('<space_id>')
|
|
1079
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1080
|
-
* .then((environment) => environment.getUpload('<upload-id>')
|
|
1081
|
-
* .then((upload) => console.log(upload))
|
|
1082
|
-
* .catch(console.error)
|
|
1083
|
-
*/
|
|
1084
|
-
getUpload(id) {
|
|
1085
|
-
const raw = this.toPlainObject();
|
|
1086
|
-
return makeRequest({
|
|
1087
|
-
entityType: 'Upload',
|
|
1088
|
-
action: 'get',
|
|
1089
|
-
params: {
|
|
1090
|
-
spaceId: raw.sys.space.sys.id,
|
|
1091
|
-
environmentId: raw.sys.id,
|
|
1092
|
-
uploadId: id,
|
|
1093
|
-
},
|
|
1094
|
-
}).then((data) => upload.wrapUpload(makeRequest, data));
|
|
1095
|
-
},
|
|
1096
|
-
/**
|
|
1097
|
-
* Creates a Upload.
|
|
1098
|
-
* @param data - Object with file information.
|
|
1099
|
-
* @param data.file - Actual file content. Can be a string, an ArrayBuffer or a Stream.
|
|
1100
|
-
* @return Upload object containing information about the uploaded file.
|
|
1101
|
-
* @example ```javascript
|
|
1102
|
-
* const client = contentful.createClient({
|
|
1103
|
-
* accessToken: '<content_management_api_key>'
|
|
1104
|
-
* })
|
|
1105
|
-
* const uploadStream = createReadStream('path/to/filename_english.jpg')
|
|
1106
|
-
*
|
|
1107
|
-
* client.getSpace('<space_id>')
|
|
1108
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1109
|
-
* .then((environment) => environment.createUpload({file: uploadStream})
|
|
1110
|
-
* .then((upload) => console.log(upload))
|
|
1111
|
-
* .catch(console.error)
|
|
1112
|
-
* ```
|
|
1113
|
-
*/
|
|
1114
|
-
createUpload: function createUpload(data) {
|
|
1115
|
-
const raw = this.toPlainObject();
|
|
1116
|
-
return makeRequest({
|
|
1117
|
-
entityType: 'Upload',
|
|
1118
|
-
action: 'create',
|
|
1119
|
-
params: {
|
|
1120
|
-
spaceId: raw.sys.space.sys.id,
|
|
1121
|
-
environmentId: raw.sys.id,
|
|
1122
|
-
},
|
|
1123
|
-
payload: data,
|
|
1124
|
-
}).then((data) => upload.wrapUpload(makeRequest, data));
|
|
1125
|
-
},
|
|
1126
|
-
/**
|
|
1127
|
-
* Gets a Locale
|
|
1128
|
-
* @param localeId - Locale ID
|
|
1129
|
-
* @return Promise for an Locale
|
|
1130
|
-
* @example ```javascript
|
|
1131
|
-
* const contentful = require('contentful-management')
|
|
1132
|
-
*
|
|
1133
|
-
* const client = contentful.createClient({
|
|
1134
|
-
* accessToken: '<content_management_api_key>'
|
|
1135
|
-
* })
|
|
1136
|
-
*
|
|
1137
|
-
* client.getSpace('<space_id>')
|
|
1138
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1139
|
-
* .then((environment) => environment.getLocale('<locale_id>'))
|
|
1140
|
-
* .then((locale) => console.log(locale))
|
|
1141
|
-
* .catch(console.error)
|
|
1142
|
-
* ```
|
|
1143
|
-
*/
|
|
1144
|
-
getLocale(localeId) {
|
|
1145
|
-
const raw = this.toPlainObject();
|
|
1146
|
-
return makeRequest({
|
|
1147
|
-
entityType: 'Locale',
|
|
1148
|
-
action: 'get',
|
|
1149
|
-
params: {
|
|
1150
|
-
spaceId: raw.sys.space.sys.id,
|
|
1151
|
-
environmentId: raw.sys.id,
|
|
1152
|
-
localeId,
|
|
1153
|
-
},
|
|
1154
|
-
}).then((data) => locale.wrapLocale(makeRequest, data));
|
|
1155
|
-
},
|
|
1156
|
-
/**
|
|
1157
|
-
* Gets a collection of Locales
|
|
1158
|
-
* @return Promise for a collection of Locales
|
|
1159
|
-
* @example ```javascript
|
|
1160
|
-
* const contentful = require('contentful-management')
|
|
1161
|
-
*
|
|
1162
|
-
* const client = contentful.createClient({
|
|
1163
|
-
* accessToken: '<content_management_api_key>'
|
|
1164
|
-
* })
|
|
1165
|
-
*
|
|
1166
|
-
* client.getSpace('<space_id>')
|
|
1167
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1168
|
-
* .then((environment) => environment.getLocales())
|
|
1169
|
-
* .then((response) => console.log(response.items))
|
|
1170
|
-
* .catch(console.error)
|
|
1171
|
-
* ```
|
|
1172
|
-
*/
|
|
1173
|
-
getLocales(query = {}) {
|
|
1174
|
-
const raw = this.toPlainObject();
|
|
1175
|
-
return makeRequest({
|
|
1176
|
-
entityType: 'Locale',
|
|
1177
|
-
action: 'getMany',
|
|
1178
|
-
params: {
|
|
1179
|
-
spaceId: raw.sys.space.sys.id,
|
|
1180
|
-
environmentId: raw.sys.id,
|
|
1181
|
-
query: contentfulSdkCore.createRequestConfig({ query }).params,
|
|
1182
|
-
},
|
|
1183
|
-
}).then((data) => locale.wrapLocaleCollection(makeRequest, data));
|
|
1184
|
-
},
|
|
1185
|
-
/**
|
|
1186
|
-
* Creates a Locale
|
|
1187
|
-
* @param data - Object representation of the Locale to be created
|
|
1188
|
-
* @return Promise for the newly created Locale
|
|
1189
|
-
* @example ```javascript
|
|
1190
|
-
* const contentful = require('contentful-management')
|
|
1191
|
-
*
|
|
1192
|
-
* const client = contentful.createClient({
|
|
1193
|
-
* accessToken: '<content_management_api_key>'
|
|
1194
|
-
* })
|
|
1195
|
-
*
|
|
1196
|
-
* // Create locale
|
|
1197
|
-
* client.getSpace('<space_id>')
|
|
1198
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1199
|
-
* .then((environment) => environment.createLocale({
|
|
1200
|
-
* name: 'German (Austria)',
|
|
1201
|
-
* code: 'de-AT',
|
|
1202
|
-
* fallbackCode: 'de-DE',
|
|
1203
|
-
* optional: true
|
|
1204
|
-
* }))
|
|
1205
|
-
* .then((locale) => console.log(locale))
|
|
1206
|
-
* .catch(console.error)
|
|
1207
|
-
* ```
|
|
1208
|
-
*/
|
|
1209
|
-
createLocale(data) {
|
|
1210
|
-
const raw = this.toPlainObject();
|
|
1211
|
-
return makeRequest({
|
|
1212
|
-
entityType: 'Locale',
|
|
1213
|
-
action: 'create',
|
|
1214
|
-
params: {
|
|
1215
|
-
spaceId: raw.sys.space.sys.id,
|
|
1216
|
-
environmentId: raw.sys.id,
|
|
1217
|
-
},
|
|
1218
|
-
payload: data,
|
|
1219
|
-
}).then((response) => locale.wrapLocale(makeRequest, response));
|
|
1220
|
-
},
|
|
1221
|
-
/**
|
|
1222
|
-
* Gets an UI Extension
|
|
1223
|
-
* @param id - Extension ID
|
|
1224
|
-
* @return Promise for an UI Extension
|
|
1225
|
-
* @example ```javascript
|
|
1226
|
-
* const contentful = require('contentful-management')
|
|
1227
|
-
*
|
|
1228
|
-
* const client = contentful.createClient({
|
|
1229
|
-
* accessToken: '<content_management_api_key>'
|
|
1230
|
-
* })
|
|
1231
|
-
*
|
|
1232
|
-
* client.getSpace('<space_id>')
|
|
1233
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1234
|
-
* .then((environment) => environment.getUiExtension('<extension-id>'))
|
|
1235
|
-
* .then((extension) => console.log(extension))
|
|
1236
|
-
* .catch(console.error)
|
|
1237
|
-
* ```
|
|
1238
|
-
*/
|
|
1239
|
-
getUiExtension(id) {
|
|
1240
|
-
const raw = this.toPlainObject();
|
|
1241
|
-
return makeRequest({
|
|
1242
|
-
entityType: 'Extension',
|
|
1243
|
-
action: 'get',
|
|
1244
|
-
params: {
|
|
1245
|
-
spaceId: raw.sys.space.sys.id,
|
|
1246
|
-
environmentId: raw.sys.id,
|
|
1247
|
-
extensionId: id,
|
|
1248
|
-
},
|
|
1249
|
-
}).then((data) => extension.wrapExtension(makeRequest, data));
|
|
1250
|
-
},
|
|
1251
|
-
/**
|
|
1252
|
-
* Gets a collection of UI Extension
|
|
1253
|
-
* @return Promise for a collection of UI Extensions
|
|
1254
|
-
* @example ```javascript
|
|
1255
|
-
* const contentful = require('contentful-management')
|
|
1256
|
-
*
|
|
1257
|
-
* const client = contentful.createClient({
|
|
1258
|
-
* accessToken: '<content_management_api_key>'
|
|
1259
|
-
* })
|
|
1260
|
-
*
|
|
1261
|
-
* client.getSpace('<space_id>')
|
|
1262
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1263
|
-
* .then((environment) => environment.getUiExtensions()
|
|
1264
|
-
* .then((response) => console.log(response.items))
|
|
1265
|
-
* .catch(console.error)
|
|
1266
|
-
* ```
|
|
1267
|
-
*/
|
|
1268
|
-
getUiExtensions() {
|
|
1269
|
-
const raw = this.toPlainObject();
|
|
1270
|
-
return makeRequest({
|
|
1271
|
-
entityType: 'Extension',
|
|
1272
|
-
action: 'getMany',
|
|
1273
|
-
params: {
|
|
1274
|
-
spaceId: raw.sys.space.sys.id,
|
|
1275
|
-
environmentId: raw.sys.id,
|
|
1276
|
-
},
|
|
1277
|
-
}).then((response) => extension.wrapExtensionCollection(makeRequest, response));
|
|
1278
|
-
},
|
|
1279
|
-
/**
|
|
1280
|
-
* Creates a UI Extension
|
|
1281
|
-
* @param data - Object representation of the UI Extension to be created
|
|
1282
|
-
* @return Promise for the newly created UI Extension
|
|
1283
|
-
* @example ```javascript
|
|
1284
|
-
* const contentful = require('contentful-management')
|
|
1285
|
-
*
|
|
1286
|
-
* const client = contentful.createClient({
|
|
1287
|
-
* accessToken: '<content_management_api_key>'
|
|
1288
|
-
* })
|
|
1289
|
-
*
|
|
1290
|
-
* client.getSpace('<space_id>')
|
|
1291
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1292
|
-
* .then((environment) => environment.createUiExtension({
|
|
1293
|
-
* extension: {
|
|
1294
|
-
* name: 'My awesome extension',
|
|
1295
|
-
* src: 'https://example.com/my',
|
|
1296
|
-
* fieldTypes: [
|
|
1297
|
-
* {
|
|
1298
|
-
* type: 'Symbol'
|
|
1299
|
-
* },
|
|
1300
|
-
* {
|
|
1301
|
-
* type: 'Text'
|
|
1302
|
-
* }
|
|
1303
|
-
* ],
|
|
1304
|
-
* sidebar: false
|
|
1305
|
-
* }
|
|
1306
|
-
* }))
|
|
1307
|
-
* .then((extension) => console.log(extension))
|
|
1308
|
-
* .catch(console.error)
|
|
1309
|
-
* ```
|
|
1310
|
-
*/
|
|
1311
|
-
createUiExtension(data) {
|
|
1312
|
-
const raw = this.toPlainObject();
|
|
1313
|
-
return makeRequest({
|
|
1314
|
-
entityType: 'Extension',
|
|
1315
|
-
action: 'create',
|
|
1316
|
-
params: {
|
|
1317
|
-
spaceId: raw.sys.space.sys.id,
|
|
1318
|
-
environmentId: raw.sys.id,
|
|
1319
|
-
},
|
|
1320
|
-
payload: data,
|
|
1321
|
-
}).then((response) => extension.wrapExtension(makeRequest, response));
|
|
1322
|
-
},
|
|
1323
|
-
/**
|
|
1324
|
-
* Creates a UI Extension with a custom ID
|
|
1325
|
-
* @param id - Extension ID
|
|
1326
|
-
* @param data - Object representation of the UI Extension to be created
|
|
1327
|
-
* @return Promise for the newly created UI Extension
|
|
1328
|
-
* @example ```javascript
|
|
1329
|
-
* const contentful = require('contentful-management')
|
|
1330
|
-
*
|
|
1331
|
-
* const client = contentful.createClient({
|
|
1332
|
-
* accessToken: '<content_management_api_key>'
|
|
1333
|
-
* })
|
|
1334
|
-
*
|
|
1335
|
-
* client.getSpace('<space_id>')
|
|
1336
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1337
|
-
* .then((environment) => environment.createUiExtensionWithId('<extension_id>', {
|
|
1338
|
-
* extension: {
|
|
1339
|
-
* name: 'My awesome extension',
|
|
1340
|
-
* src: 'https://example.com/my',
|
|
1341
|
-
* fieldTypes: [
|
|
1342
|
-
* {
|
|
1343
|
-
* type: 'Symbol'
|
|
1344
|
-
* },
|
|
1345
|
-
* {
|
|
1346
|
-
* type: 'Text'
|
|
1347
|
-
* }
|
|
1348
|
-
* ],
|
|
1349
|
-
* sidebar: false
|
|
1350
|
-
* }
|
|
1351
|
-
* }))
|
|
1352
|
-
* .then((extension) => console.log(extension))
|
|
1353
|
-
* .catch(console.error)
|
|
1354
|
-
* ```
|
|
1355
|
-
*/
|
|
1356
|
-
createUiExtensionWithId(id, data) {
|
|
1357
|
-
const raw = this.toPlainObject();
|
|
1358
|
-
return makeRequest({
|
|
1359
|
-
entityType: 'Extension',
|
|
1360
|
-
action: 'createWithId',
|
|
1361
|
-
params: {
|
|
1362
|
-
spaceId: raw.sys.space.sys.id,
|
|
1363
|
-
environmentId: raw.sys.id,
|
|
1364
|
-
extensionId: id,
|
|
1365
|
-
},
|
|
1366
|
-
payload: data,
|
|
1367
|
-
}).then((response) => extension.wrapExtension(makeRequest, response));
|
|
1368
|
-
},
|
|
1369
|
-
/**
|
|
1370
|
-
* Creates an App Installation
|
|
1371
|
-
* @param appDefinitionId - AppDefinition ID
|
|
1372
|
-
* @param data - AppInstallation data
|
|
1373
|
-
* @param options.acceptAllTerms - Flag for accepting Apps' Marketplace EULA, Terms, and Privacy policy (need to pass `{acceptAllTerms: true}` to install a marketplace app)
|
|
1374
|
-
* @return Promise for an App Installation
|
|
1375
|
-
* @example ```javascript
|
|
1376
|
-
* const contentful = require('contentful-management')
|
|
1377
|
-
*
|
|
1378
|
-
* const client = contentful.createClient({
|
|
1379
|
-
* accessToken: '<content_management_api_key>'
|
|
1380
|
-
* })
|
|
1381
|
-
*
|
|
1382
|
-
* client.getSpace('<space_id>')
|
|
1383
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1384
|
-
* .then((environment) => environment.createAppInstallation('<app_definition_id>', {
|
|
1385
|
-
* parameters: {
|
|
1386
|
-
* someParameter: someValue
|
|
1387
|
-
* }
|
|
1388
|
-
* })
|
|
1389
|
-
* .then((appInstallation) => console.log(appInstallation))
|
|
1390
|
-
* .catch(console.error)
|
|
1391
|
-
* ```
|
|
1392
|
-
*/
|
|
1393
|
-
createAppInstallation(appDefinitionId, data, { acceptAllTerms } = {}) {
|
|
1394
|
-
const raw = this.toPlainObject();
|
|
1395
|
-
return makeRequest({
|
|
1396
|
-
entityType: 'AppInstallation',
|
|
1397
|
-
action: 'upsert',
|
|
1398
|
-
params: {
|
|
1399
|
-
spaceId: raw.sys.space.sys.id,
|
|
1400
|
-
environmentId: raw.sys.id,
|
|
1401
|
-
appDefinitionId,
|
|
1402
|
-
acceptAllTerms,
|
|
1403
|
-
},
|
|
1404
|
-
payload: data,
|
|
1405
|
-
}).then((payload) => appInstallation.wrapAppInstallation(makeRequest, payload));
|
|
1406
|
-
},
|
|
1407
|
-
/**
|
|
1408
|
-
* Gets an App Installation
|
|
1409
|
-
* @param id - AppDefintion ID
|
|
1410
|
-
* @return Promise for an App Installation
|
|
1411
|
-
* @example ```javascript
|
|
1412
|
-
* const contentful = require('contentful-management')
|
|
1413
|
-
*
|
|
1414
|
-
* const client = contentful.createClient({
|
|
1415
|
-
* accessToken: '<content_management_api_key>'
|
|
1416
|
-
* })
|
|
1417
|
-
*
|
|
1418
|
-
* client.getSpace('<space_id>')
|
|
1419
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1420
|
-
* .then((environment) => environment.getAppInstallation('<app-definition-id>'))
|
|
1421
|
-
* .then((appInstallation) => console.log(appInstallation))
|
|
1422
|
-
* .catch(console.error)
|
|
1423
|
-
* ```
|
|
1424
|
-
*/
|
|
1425
|
-
getAppInstallation(id) {
|
|
1426
|
-
const raw = this.toPlainObject();
|
|
1427
|
-
return makeRequest({
|
|
1428
|
-
entityType: 'AppInstallation',
|
|
1429
|
-
action: 'get',
|
|
1430
|
-
params: {
|
|
1431
|
-
spaceId: raw.sys.space.sys.id,
|
|
1432
|
-
environmentId: raw.sys.id,
|
|
1433
|
-
appDefinitionId: id,
|
|
1434
|
-
},
|
|
1435
|
-
}).then((data) => appInstallation.wrapAppInstallation(makeRequest, data));
|
|
1436
|
-
},
|
|
1437
|
-
/**
|
|
1438
|
-
* Gets a collection of App Installation
|
|
1439
|
-
* @return Promise for a collection of App Installations
|
|
1440
|
-
* @example ```javascript
|
|
1441
|
-
* const contentful = require('contentful-management')
|
|
1442
|
-
*
|
|
1443
|
-
* const client = contentful.createClient({
|
|
1444
|
-
* accessToken: '<content_management_api_key>'
|
|
1445
|
-
* })
|
|
1446
|
-
*
|
|
1447
|
-
* client.getSpace('<space_id>')
|
|
1448
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1449
|
-
* .then((environment) => environment.getAppInstallations()
|
|
1450
|
-
* .then((response) => console.log(response.items))
|
|
1451
|
-
* .catch(console.error)
|
|
1452
|
-
* ```
|
|
1453
|
-
*/
|
|
1454
|
-
getAppInstallations() {
|
|
1455
|
-
const raw = this.toPlainObject();
|
|
1456
|
-
return makeRequest({
|
|
1457
|
-
entityType: 'AppInstallation',
|
|
1458
|
-
action: 'getMany',
|
|
1459
|
-
params: {
|
|
1460
|
-
spaceId: raw.sys.space.sys.id,
|
|
1461
|
-
environmentId: raw.sys.id,
|
|
1462
|
-
},
|
|
1463
|
-
}).then((data) => appInstallation.wrapAppInstallationCollection(makeRequest, data));
|
|
1464
|
-
},
|
|
1465
|
-
/**
|
|
1466
|
-
* Creates an app action call
|
|
1467
|
-
* @param appDefinitionId - AppDefinition ID
|
|
1468
|
-
* @param appActionId - action ID
|
|
1469
|
-
* @param data - App Action Call data
|
|
1470
|
-
* @return Promise for an App Action Call
|
|
1471
|
-
* @example ```javascript
|
|
1472
|
-
* const contentful = require('contentful-management')
|
|
1473
|
-
*
|
|
1474
|
-
* const client = contentful.createClient({
|
|
1475
|
-
* accessToken: '<content_management_api_key>'
|
|
1476
|
-
* })
|
|
1477
|
-
*
|
|
1478
|
-
* const data = {
|
|
1479
|
-
* headers: {
|
|
1480
|
-
* 'x-my-header': 'some-value'
|
|
1481
|
-
* },
|
|
1482
|
-
* body: {
|
|
1483
|
-
* 'some-body-value': true
|
|
1484
|
-
* }
|
|
1485
|
-
* }
|
|
1486
|
-
*
|
|
1487
|
-
* client.getSpace('<space_id>')
|
|
1488
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1489
|
-
* .then((environment) => environment.createAppActionCall('<app_definition_id>', '<action_id>', data)
|
|
1490
|
-
* .then((appActionCall) => console.log(appActionCall))
|
|
1491
|
-
* .catch(console.error)
|
|
1492
|
-
* ```
|
|
1493
|
-
*/
|
|
1494
|
-
createAppActionCall(appDefinitionId, appActionId, data) {
|
|
1495
|
-
const raw = this.toPlainObject();
|
|
1496
|
-
return makeRequest({
|
|
1497
|
-
entityType: 'AppActionCall',
|
|
1498
|
-
action: 'create',
|
|
1499
|
-
params: {
|
|
1500
|
-
spaceId: raw.sys.space.sys.id,
|
|
1501
|
-
environmentId: raw.sys.id,
|
|
1502
|
-
appDefinitionId,
|
|
1503
|
-
appActionId,
|
|
1504
|
-
},
|
|
1505
|
-
payload: data,
|
|
1506
|
-
}).then((payload) => appActionCall.wrapAppActionCall(makeRequest, payload));
|
|
1507
|
-
},
|
|
1508
|
-
/**
|
|
1509
|
-
* Creates an app signed request
|
|
1510
|
-
* @param appDefinitionId - AppDefinition ID
|
|
1511
|
-
* @param data - SignedRequest data
|
|
1512
|
-
* @return Promise for a Signed Request
|
|
1513
|
-
* @example ```javascript
|
|
1514
|
-
* const contentful = require('contentful-management')
|
|
1515
|
-
*
|
|
1516
|
-
* const client = contentful.createClient({
|
|
1517
|
-
* accessToken: '<content_management_api_key>'
|
|
1518
|
-
* })
|
|
1519
|
-
*
|
|
1520
|
-
* const data = {
|
|
1521
|
-
* method: 'POST',
|
|
1522
|
-
* path: '/request_path',
|
|
1523
|
-
* body: '{ "key": "data" }',
|
|
1524
|
-
* headers: {
|
|
1525
|
-
* 'x-my-header': 'some-value'
|
|
1526
|
-
* },
|
|
1527
|
-
* }
|
|
1528
|
-
*
|
|
1529
|
-
* client.getSpace('<space_id>')
|
|
1530
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1531
|
-
* .then((environment) => environment.createAppSignedRequest('<app_definition_id>', data)
|
|
1532
|
-
* .then((signedRequest) => console.log(signedRequest))
|
|
1533
|
-
* .catch(console.error)
|
|
1534
|
-
* ```
|
|
1535
|
-
*/
|
|
1536
|
-
createAppSignedRequest(appDefinitionId, data) {
|
|
1537
|
-
const raw = this.toPlainObject();
|
|
1538
|
-
return makeRequest({
|
|
1539
|
-
entityType: 'AppSignedRequest',
|
|
1540
|
-
action: 'create',
|
|
1541
|
-
params: {
|
|
1542
|
-
spaceId: raw.sys.space.sys.id,
|
|
1543
|
-
environmentId: raw.sys.id,
|
|
1544
|
-
appDefinitionId,
|
|
1545
|
-
},
|
|
1546
|
-
payload: data,
|
|
1547
|
-
}).then((payload) => appSignedRequest.wrapAppSignedRequest(makeRequest, payload));
|
|
1548
|
-
},
|
|
1549
|
-
/**
|
|
1550
|
-
* Creates an app access token
|
|
1551
|
-
* @param appDefinitionId - AppDefinition ID
|
|
1552
|
-
* @param data - Json Web Token
|
|
1553
|
-
* @return Promise for an app access token
|
|
1554
|
-
* @example ```javascript
|
|
1555
|
-
* const contentful = require('contentful-management')
|
|
1556
|
-
* const { sign } = require('jsonwebtoken')
|
|
1557
|
-
*
|
|
1558
|
-
* const signOptions = { algorithm: 'RS256', issuer: '<app_definition_id>', expiresIn: '10m' }
|
|
1559
|
-
*
|
|
1560
|
-
* const client = contentful.createClient({
|
|
1561
|
-
* accessToken: '<content_management_api_key>'
|
|
1562
|
-
* })
|
|
1563
|
-
*
|
|
1564
|
-
* const data = {
|
|
1565
|
-
* jwt: sign({}, '<private_key>', signOptions)
|
|
1566
|
-
* }
|
|
1567
|
-
*
|
|
1568
|
-
* client.getSpace('<space_id>')
|
|
1569
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1570
|
-
* .then((environment) => environment.createAppAccessToken('<app_definition_id>', data)
|
|
1571
|
-
* .then((appAccessToken) => console.log(appAccessToken))
|
|
1572
|
-
* .catch(console.error)
|
|
1573
|
-
* ```
|
|
1574
|
-
*/
|
|
1575
|
-
createAppAccessToken(appDefinitionId, data) {
|
|
1576
|
-
const raw = this.toPlainObject();
|
|
1577
|
-
return makeRequest({
|
|
1578
|
-
entityType: 'AppAccessToken',
|
|
1579
|
-
action: 'create',
|
|
1580
|
-
params: {
|
|
1581
|
-
spaceId: raw.sys.space.sys.id,
|
|
1582
|
-
environmentId: raw.sys.id,
|
|
1583
|
-
appDefinitionId,
|
|
1584
|
-
},
|
|
1585
|
-
payload: data,
|
|
1586
|
-
}).then((payload) => appAccessToken.wrapAppAccessToken(makeRequest, payload));
|
|
1587
|
-
},
|
|
1588
|
-
/**
|
|
1589
|
-
* Gets a collection of Functions for a given environment
|
|
1590
|
-
* @param appInstallationId
|
|
1591
|
-
* @param {import('../common-types').AcceptsQueryOptions} query - optional query parameter for filtering functions by action
|
|
1592
|
-
* @return Promise containing wrapped collection of Functions in an environment
|
|
1593
|
-
* @example ```javascript
|
|
1594
|
-
* const contentful = require('contentful-management')
|
|
1595
|
-
*
|
|
1596
|
-
* const client = contentful.createClient({
|
|
1597
|
-
* accessToken: '<content_management_api_key>'
|
|
1598
|
-
* })
|
|
1599
|
-
*
|
|
1600
|
-
* client
|
|
1601
|
-
* .getSpace('<space-id>')
|
|
1602
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1603
|
-
* .then((environment) => environment.getFunctionsForEnvironment('<app-installation-id>', { 'accepts[all]': '<action>' }))
|
|
1604
|
-
* .then((functions) => console.log(functions.items))
|
|
1605
|
-
* .catch(console.error)
|
|
1606
|
-
* ```
|
|
1607
|
-
*/
|
|
1608
|
-
getFunctionsForEnvironment(appInstallationId, query) {
|
|
1609
|
-
const raw = this.toPlainObject();
|
|
1610
|
-
return makeRequest({
|
|
1611
|
-
entityType: 'Function',
|
|
1612
|
-
action: 'getManyForEnvironment',
|
|
1613
|
-
params: {
|
|
1614
|
-
spaceId: raw.sys.space.sys.id,
|
|
1615
|
-
environmentId: raw.sys.id,
|
|
1616
|
-
appInstallationId,
|
|
1617
|
-
query,
|
|
1618
|
-
},
|
|
1619
|
-
}).then((data) => _function.wrapFunctionCollection(makeRequest, data));
|
|
1620
|
-
},
|
|
1621
|
-
/**
|
|
1622
|
-
* Gets a collection of FunctionLogs for a given app installation id and FunctionId
|
|
1623
|
-
* @param appInstallationId
|
|
1624
|
-
* @param functionId
|
|
1625
|
-
* @param {import('../common-types').CursorBasedParams} query - optional query parameter for pagination (limit, nextPage, prevPage)
|
|
1626
|
-
* @return Promise containing wrapped collection of FunctionLogs
|
|
1627
|
-
* * @example ```javascript
|
|
1628
|
-
* const contentful = require('contentful-management')
|
|
1629
|
-
*
|
|
1630
|
-
* const client = contentful.createClient({
|
|
1631
|
-
* accessToken: '<content_management_api_key>'
|
|
1632
|
-
* })
|
|
1633
|
-
*
|
|
1634
|
-
* client
|
|
1635
|
-
* .getSpace('<space-id>')
|
|
1636
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1637
|
-
* .then((environment) =>
|
|
1638
|
-
* environment.getFunctionLogs(
|
|
1639
|
-
* '<app-installation-id>',
|
|
1640
|
-
* '<function-id>',
|
|
1641
|
-
* {
|
|
1642
|
-
* query: {
|
|
1643
|
-
* // optional limit
|
|
1644
|
-
* limit: 10,
|
|
1645
|
-
* // optional interval query
|
|
1646
|
-
* 'sys.createdAt[gte]': start,
|
|
1647
|
-
* 'sys.createdAt[lt]': end,
|
|
1648
|
-
* // optional cursor based pagination parameters
|
|
1649
|
-
* pagePrev: '<page_prev>',
|
|
1650
|
-
* },
|
|
1651
|
-
* },
|
|
1652
|
-
* )
|
|
1653
|
-
* )
|
|
1654
|
-
* .then((functionLogs) => console.log(functionLog.items))
|
|
1655
|
-
* .catch(console.error)
|
|
1656
|
-
* ```
|
|
1657
|
-
*/
|
|
1658
|
-
getFunctionLogs(appInstallationId, functionId, query) {
|
|
1659
|
-
const raw = this.toPlainObject();
|
|
1660
|
-
return makeRequest({
|
|
1661
|
-
entityType: 'FunctionLog',
|
|
1662
|
-
action: 'getMany',
|
|
1663
|
-
params: {
|
|
1664
|
-
spaceId: raw.sys.space.sys.id,
|
|
1665
|
-
environmentId: raw.sys.id,
|
|
1666
|
-
appInstallationId,
|
|
1667
|
-
functionId,
|
|
1668
|
-
query: query ? contentfulSdkCore.createRequestConfig({ query }).params : undefined,
|
|
1669
|
-
},
|
|
1670
|
-
}).then((data) => functionLog.wrapFunctionLogCollection(makeRequest, data));
|
|
1671
|
-
},
|
|
1672
|
-
/**
|
|
1673
|
-
* Gets a FunctionLog by appInstallationId, functionId and logId
|
|
1674
|
-
* @param appInstallationId
|
|
1675
|
-
* @param functionId
|
|
1676
|
-
* @param logId
|
|
1677
|
-
* @return Promise containing a wrapped FunctionLog
|
|
1678
|
-
* @example ```javascript
|
|
1679
|
-
* const contentful = require('contentful-management')
|
|
1680
|
-
*
|
|
1681
|
-
* const client = contentful.createClient({
|
|
1682
|
-
* accessToken: '<content_management_api_key>'
|
|
1683
|
-
* })
|
|
1684
|
-
*
|
|
1685
|
-
* client
|
|
1686
|
-
* .getSpace(<space-id>)
|
|
1687
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1688
|
-
* .then((environment) =>
|
|
1689
|
-
* environment.getFunctionLog(
|
|
1690
|
-
* '<app-installation-id>',
|
|
1691
|
-
* '<function-id>',
|
|
1692
|
-
* '<log-id>'
|
|
1693
|
-
* )
|
|
1694
|
-
* )
|
|
1695
|
-
* .then((functionLog) => console.log(functionLog))
|
|
1696
|
-
* .catch(console.error)
|
|
1697
|
-
* ```
|
|
1698
|
-
*/
|
|
1699
|
-
getFunctionLog(appInstallationId, functionId, logId) {
|
|
1700
|
-
const raw = this.toPlainObject();
|
|
1701
|
-
return makeRequest({
|
|
1702
|
-
entityType: 'FunctionLog',
|
|
1703
|
-
action: 'get',
|
|
1704
|
-
params: {
|
|
1705
|
-
spaceId: raw.sys.space.sys.id,
|
|
1706
|
-
environmentId: raw.sys.id,
|
|
1707
|
-
appInstallationId,
|
|
1708
|
-
functionId,
|
|
1709
|
-
logId,
|
|
1710
|
-
},
|
|
1711
|
-
}).then((data) => functionLog.wrapFunctionLog(makeRequest, data));
|
|
1712
|
-
},
|
|
1713
|
-
/**
|
|
1714
|
-
* Gets all snapshots of an entry
|
|
1715
|
-
* @func getEntrySnapshots
|
|
1716
|
-
* @param entryId - Entry ID
|
|
1717
|
-
* @param query - query additional query paramaters
|
|
1718
|
-
* @return Promise for a collection of Entry Snapshots
|
|
1719
|
-
* @example ```javascript
|
|
1720
|
-
* const contentful = require('contentful-management')
|
|
1721
|
-
*
|
|
1722
|
-
* const client = contentful.createClient({
|
|
1723
|
-
* accessToken: '<content_management_api_key>'
|
|
1724
|
-
* })
|
|
1725
|
-
*
|
|
1726
|
-
* client.getSpace('<space_id>')
|
|
1727
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1728
|
-
* .then((environment) => environment.getEntrySnapshots('<entry_id>'))
|
|
1729
|
-
* .then((snapshots) => console.log(snapshots.items))
|
|
1730
|
-
* .catch(console.error)
|
|
1731
|
-
* ```
|
|
1732
|
-
*/
|
|
1733
|
-
getEntrySnapshots(entryId, query = {}) {
|
|
1734
|
-
const raw = this.toPlainObject();
|
|
1735
|
-
return makeRequest({
|
|
1736
|
-
entityType: 'Snapshot',
|
|
1737
|
-
action: 'getManyForEntry',
|
|
1738
|
-
params: {
|
|
1739
|
-
spaceId: raw.sys.space.sys.id,
|
|
1740
|
-
environmentId: raw.sys.id,
|
|
1741
|
-
entryId,
|
|
1742
|
-
query,
|
|
1743
|
-
},
|
|
1744
|
-
}).then((data) => snapshot.wrapSnapshotCollection(makeRequest, data));
|
|
1745
|
-
},
|
|
1746
|
-
/**
|
|
1747
|
-
* Gets all snapshots of a contentType
|
|
1748
|
-
* @func getContentTypeSnapshots
|
|
1749
|
-
* @param contentTypeId - Content Type ID
|
|
1750
|
-
* @param query - query additional query paramaters
|
|
1751
|
-
* @return Promise for a collection of Content Type Snapshots
|
|
1752
|
-
* @example ```javascript
|
|
1753
|
-
* const contentful = require('contentful-management')
|
|
1754
|
-
*
|
|
1755
|
-
* const client = contentful.createClient({
|
|
1756
|
-
* accessToken: '<content_management_api_key>'
|
|
1757
|
-
* })
|
|
1758
|
-
*
|
|
1759
|
-
* client.getSpace('<space_id>')
|
|
1760
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1761
|
-
* .then((environment) => environment.getContentTypeSnapshots('<contentTypeId>'))
|
|
1762
|
-
* .then((snapshots) => console.log(snapshots.items))
|
|
1763
|
-
* .catch(console.error)
|
|
1764
|
-
* ```
|
|
1765
|
-
*/
|
|
1766
|
-
getContentTypeSnapshots(contentTypeId, query = {}) {
|
|
1767
|
-
const raw = this.toPlainObject();
|
|
1768
|
-
return makeRequest({
|
|
1769
|
-
entityType: 'Snapshot',
|
|
1770
|
-
action: 'getManyForContentType',
|
|
1771
|
-
params: {
|
|
1772
|
-
spaceId: raw.sys.space.sys.id,
|
|
1773
|
-
environmentId: raw.sys.id,
|
|
1774
|
-
contentTypeId,
|
|
1775
|
-
query,
|
|
1776
|
-
},
|
|
1777
|
-
}).then((data) => snapshot.wrapSnapshotCollection(makeRequest, data));
|
|
1778
|
-
},
|
|
1779
|
-
createTag(id, name, visibility) {
|
|
1780
|
-
const raw = this.toPlainObject();
|
|
1781
|
-
return makeRequest({
|
|
1782
|
-
entityType: 'Tag',
|
|
1783
|
-
action: 'createWithId',
|
|
1784
|
-
params: {
|
|
1785
|
-
spaceId: raw.sys.space.sys.id,
|
|
1786
|
-
environmentId: raw.sys.id,
|
|
1787
|
-
tagId: id,
|
|
1788
|
-
},
|
|
1789
|
-
payload: {
|
|
1790
|
-
name,
|
|
1791
|
-
sys: { visibility: visibility ?? 'private' },
|
|
1792
|
-
},
|
|
1793
|
-
}).then((data) => tag.wrapTag(makeRequest, data));
|
|
1794
|
-
},
|
|
1795
|
-
getTags(query = {}) {
|
|
1796
|
-
const raw = this.toPlainObject();
|
|
1797
|
-
return makeRequest({
|
|
1798
|
-
entityType: 'Tag',
|
|
1799
|
-
action: 'getMany',
|
|
1800
|
-
params: {
|
|
1801
|
-
spaceId: raw.sys.space.sys.id,
|
|
1802
|
-
environmentId: raw.sys.id,
|
|
1803
|
-
query: contentfulSdkCore.createRequestConfig({ query }).params,
|
|
1804
|
-
},
|
|
1805
|
-
}).then((data) => tag.wrapTagCollection(makeRequest, data));
|
|
1806
|
-
},
|
|
1807
|
-
getTag(id) {
|
|
1808
|
-
const raw = this.toPlainObject();
|
|
1809
|
-
return makeRequest({
|
|
1810
|
-
entityType: 'Tag',
|
|
1811
|
-
action: 'get',
|
|
1812
|
-
params: {
|
|
1813
|
-
spaceId: raw.sys.space.sys.id,
|
|
1814
|
-
environmentId: raw.sys.id,
|
|
1815
|
-
tagId: id,
|
|
1816
|
-
},
|
|
1817
|
-
}).then((data) => tag.wrapTag(makeRequest, data));
|
|
1818
|
-
},
|
|
1819
|
-
/**
|
|
1820
|
-
* Retrieves a Release by ID
|
|
1821
|
-
* @param releaseId
|
|
1822
|
-
* @returns Promise containing a wrapped Release
|
|
1823
|
-
* @example ```javascript
|
|
1824
|
-
* const contentful = require('contentful-management')
|
|
1825
|
-
*
|
|
1826
|
-
* const client = contentful.createClient({
|
|
1827
|
-
* accessToken: '<content_management_api_key>'
|
|
1828
|
-
* })
|
|
1829
|
-
*
|
|
1830
|
-
* client.getSpace('<space_id>')
|
|
1831
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1832
|
-
* .then((environment) => environment.getRelease('<release_id>'))
|
|
1833
|
-
* .then((release) => console.log(release))
|
|
1834
|
-
* .catch(console.error)
|
|
1835
|
-
* ```
|
|
1836
|
-
*/
|
|
1837
|
-
getRelease(releaseId) {
|
|
1838
|
-
const raw = this.toPlainObject();
|
|
1839
|
-
return makeRequest({
|
|
1840
|
-
entityType: 'Release',
|
|
1841
|
-
action: 'get',
|
|
1842
|
-
params: {
|
|
1843
|
-
spaceId: raw.sys.space.sys.id,
|
|
1844
|
-
environmentId: raw.sys.id,
|
|
1845
|
-
releaseId,
|
|
1846
|
-
},
|
|
1847
|
-
}).then((data) => release.wrapRelease(makeRequest, data));
|
|
1848
|
-
},
|
|
1849
|
-
/**
|
|
1850
|
-
* Gets a Collection of Releases,
|
|
1851
|
-
* @param {ReleaseQueryOptions} query filtering options for the collection result
|
|
1852
|
-
* @returns Promise containing a wrapped Release Collection
|
|
1853
|
-
* @example ```javascript
|
|
1854
|
-
* const contentful = require('contentful-management')
|
|
1855
|
-
*
|
|
1856
|
-
* const client = contentful.createClient({
|
|
1857
|
-
* accessToken: '<content_management_api_key>'
|
|
1858
|
-
* })
|
|
1859
|
-
*
|
|
1860
|
-
* client.getSpace('<space_id>')
|
|
1861
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1862
|
-
* .then((environment) => environment.getReleases({ 'entities.sys.id[in]': '<asset_id>,<entry_id>' }))
|
|
1863
|
-
* .then((releases) => console.log(releases))
|
|
1864
|
-
* .catch(console.error)
|
|
1865
|
-
* ```
|
|
1866
|
-
*/
|
|
1867
|
-
getReleases(query) {
|
|
1868
|
-
const raw = this.toPlainObject();
|
|
1869
|
-
return makeRequest({
|
|
1870
|
-
entityType: 'Release',
|
|
1871
|
-
action: 'query',
|
|
1872
|
-
params: {
|
|
1873
|
-
spaceId: raw.sys.space.sys.id,
|
|
1874
|
-
environmentId: raw.sys.id,
|
|
1875
|
-
query,
|
|
1876
|
-
},
|
|
1877
|
-
}).then((data) => release.wrapReleaseCollection(makeRequest, data));
|
|
1878
|
-
},
|
|
1879
|
-
/**
|
|
1880
|
-
* Creates a new Release with the entities and title in the payload
|
|
1881
|
-
* @param payload Object containing the payload in order to create a Release
|
|
1882
|
-
* @returns Promise containing a wrapped Release, that has other helper methods within.
|
|
1883
|
-
* @example ```javascript
|
|
1884
|
-
* const contentful = require('contentful-management')
|
|
1885
|
-
*
|
|
1886
|
-
* const client = contentful.createClient({
|
|
1887
|
-
* accessToken: '<content_management_api_key>'
|
|
1888
|
-
* })
|
|
1889
|
-
*
|
|
1890
|
-
* const payload = {
|
|
1891
|
-
* title: 'My Release',
|
|
1892
|
-
* entities: {
|
|
1893
|
-
* sys: { type: 'Array' },
|
|
1894
|
-
* items: [
|
|
1895
|
-
* { sys: { linkType: 'Entry', type: 'Link', id: '<entry_id>' } }
|
|
1896
|
-
* ]
|
|
1897
|
-
* }
|
|
1898
|
-
* }
|
|
1899
|
-
*
|
|
1900
|
-
* client.getSpace('<space_id>')
|
|
1901
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1902
|
-
* .then((environment) => environment.createRelease(payload))
|
|
1903
|
-
* .then((release) => console.log(release))
|
|
1904
|
-
* .catch(console.error)
|
|
1905
|
-
* ```
|
|
1906
|
-
*/
|
|
1907
|
-
createRelease(payload) {
|
|
1908
|
-
const raw = this.toPlainObject();
|
|
1909
|
-
return makeRequest({
|
|
1910
|
-
entityType: 'Release',
|
|
1911
|
-
action: 'create',
|
|
1912
|
-
params: {
|
|
1913
|
-
spaceId: raw.sys.space.sys.id,
|
|
1914
|
-
environmentId: raw.sys.id,
|
|
1915
|
-
},
|
|
1916
|
-
payload,
|
|
1917
|
-
}).then((data) => release.wrapRelease(makeRequest, data));
|
|
1918
|
-
},
|
|
1919
|
-
/**
|
|
1920
|
-
* Updates a Release and replaces all the properties.
|
|
1921
|
-
* @param {object} options,
|
|
1922
|
-
* @param options.releaseId the ID of the release
|
|
1923
|
-
* @param options.payload the payload to be updated in the Release
|
|
1924
|
-
* @param options.version Release sys.version that to be updated
|
|
1925
|
-
* @returns Promise containing a wrapped Release, that has helper methods within.
|
|
1926
|
-
*
|
|
1927
|
-
* @example ```javascript
|
|
1928
|
-
* const contentful = require('contentful-management')
|
|
1929
|
-
*
|
|
1930
|
-
* const client = contentful.createClient({
|
|
1931
|
-
* accessToken: '<content_management_api_key>'
|
|
1932
|
-
* })
|
|
1933
|
-
*
|
|
1934
|
-
*
|
|
1935
|
-
* const payload = {
|
|
1936
|
-
* title: "Updated Release title",
|
|
1937
|
-
* entities: {
|
|
1938
|
-
* sys: { type: 'Array' },
|
|
1939
|
-
* items: [
|
|
1940
|
-
* { sys: { linkType: 'Entry', type: 'Link', id: '<entry_id>' } }
|
|
1941
|
-
* ]
|
|
1942
|
-
* }
|
|
1943
|
-
* }
|
|
1944
|
-
*
|
|
1945
|
-
* client.getSpace('<space_id>')
|
|
1946
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1947
|
-
* .then((environment) => environment.updateRelease({ releaseId: '<release_id>', version: 1, payload } ))
|
|
1948
|
-
* .then((release) => console.log(release))
|
|
1949
|
-
* .catch(console.error)
|
|
1950
|
-
* ```
|
|
1951
|
-
*/
|
|
1952
|
-
updateRelease({ releaseId, payload, version, }) {
|
|
1953
|
-
const raw = this.toPlainObject();
|
|
1954
|
-
return makeRequest({
|
|
1955
|
-
entityType: 'Release',
|
|
1956
|
-
action: 'update',
|
|
1957
|
-
params: {
|
|
1958
|
-
spaceId: raw.sys.space.sys.id,
|
|
1959
|
-
environmentId: raw.sys.id,
|
|
1960
|
-
releaseId,
|
|
1961
|
-
version,
|
|
1962
|
-
},
|
|
1963
|
-
payload,
|
|
1964
|
-
}).then((data) => release.wrapRelease(makeRequest, data));
|
|
1965
|
-
},
|
|
1966
|
-
/**
|
|
1967
|
-
* Deletes a Release by ID - does not delete any entities.
|
|
1968
|
-
* @param releaseId the ID of the release
|
|
1969
|
-
*
|
|
1970
|
-
* @returns Promise containing a wrapped Release, that has helper methods within.
|
|
1971
|
-
* @example ```javascript
|
|
1972
|
-
* const contentful = require('contentful-management')
|
|
1973
|
-
*
|
|
1974
|
-
* const client = contentful.createClient({
|
|
1975
|
-
* accessToken: '<content_management_api_key>'
|
|
1976
|
-
* })
|
|
1977
|
-
*
|
|
1978
|
-
* client.getSpace('<space_id>')
|
|
1979
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
1980
|
-
* .then((environment) => environment.deleteRelease('<release_id>')
|
|
1981
|
-
* .catch(console.error)
|
|
1982
|
-
* ```
|
|
1983
|
-
*/
|
|
1984
|
-
deleteRelease(releaseId) {
|
|
1985
|
-
const raw = this.toPlainObject();
|
|
1986
|
-
return makeRequest({
|
|
1987
|
-
entityType: 'Release',
|
|
1988
|
-
action: 'delete',
|
|
1989
|
-
params: {
|
|
1990
|
-
spaceId: raw.sys.space.sys.id,
|
|
1991
|
-
environmentId: raw.sys.id,
|
|
1992
|
-
releaseId,
|
|
1993
|
-
},
|
|
1994
|
-
});
|
|
1995
|
-
},
|
|
1996
|
-
/**
|
|
1997
|
-
* Publishes all Entities contained in a Release.
|
|
1998
|
-
* @param options.releaseId the ID of the release
|
|
1999
|
-
* @param options.version the version of the release that is to be published
|
|
2000
|
-
* @returns Promise containing a wrapped Release, that has helper methods within.
|
|
2001
|
-
*
|
|
2002
|
-
* @example ```javascript
|
|
2003
|
-
* const contentful = require('contentful-management')
|
|
2004
|
-
*
|
|
2005
|
-
* const client = contentful.createClient({
|
|
2006
|
-
* accessToken: '<content_management_api_key>'
|
|
2007
|
-
* })
|
|
2008
|
-
*
|
|
2009
|
-
* client.getSpace('<space_id>')
|
|
2010
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
2011
|
-
* .then((environment) => environment.publishRelease({ releaseId: '<release_id>', version: 1 }))
|
|
2012
|
-
* .catch(console.error)
|
|
2013
|
-
* ```
|
|
2014
|
-
*/
|
|
2015
|
-
publishRelease({ releaseId, version }) {
|
|
2016
|
-
const raw = this.toPlainObject();
|
|
2017
|
-
return makeRequest({
|
|
2018
|
-
entityType: 'Release',
|
|
2019
|
-
action: 'publish',
|
|
2020
|
-
params: {
|
|
2021
|
-
spaceId: raw.sys.space.sys.id,
|
|
2022
|
-
environmentId: raw.sys.id,
|
|
2023
|
-
releaseId,
|
|
2024
|
-
version,
|
|
2025
|
-
},
|
|
2026
|
-
}).then((data) => releaseAction.wrapReleaseAction(makeRequest, data));
|
|
2027
|
-
},
|
|
2028
|
-
/**
|
|
2029
|
-
* Unpublishes all Entities contained in a Release.
|
|
2030
|
-
* @param options.releaseId the ID of the release
|
|
2031
|
-
* @param options.version the version of the release that is to be published
|
|
2032
|
-
* @returns Promise containing a wrapped Release, that has helper methods within.
|
|
2033
|
-
*
|
|
2034
|
-
* @example ```javascript
|
|
2035
|
-
* const contentful = require('contentful-management')
|
|
2036
|
-
*
|
|
2037
|
-
* const client = contentful.createClient({
|
|
2038
|
-
* accessToken: '<content_management_api_key>'
|
|
2039
|
-
* })
|
|
2040
|
-
*
|
|
2041
|
-
* client.getSpace('<space_id>')
|
|
2042
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
2043
|
-
* .then((environment) => environment.unpublishRelease({ releaseId: '<release_id>', version: 1 }))
|
|
2044
|
-
* .catch(console.error)
|
|
2045
|
-
* ```
|
|
2046
|
-
*/
|
|
2047
|
-
unpublishRelease({ releaseId, version }) {
|
|
2048
|
-
const raw = this.toPlainObject();
|
|
2049
|
-
return makeRequest({
|
|
2050
|
-
entityType: 'Release',
|
|
2051
|
-
action: 'unpublish',
|
|
2052
|
-
params: {
|
|
2053
|
-
spaceId: raw.sys.space.sys.id,
|
|
2054
|
-
environmentId: raw.sys.id,
|
|
2055
|
-
releaseId,
|
|
2056
|
-
version,
|
|
2057
|
-
},
|
|
2058
|
-
}).then((data) => releaseAction.wrapReleaseAction(makeRequest, data));
|
|
2059
|
-
},
|
|
2060
|
-
/**
|
|
2061
|
-
* Validates all Entities contained in a Release against an action (publish or unpublish)
|
|
2062
|
-
* @param options.releaseId the ID of the release
|
|
2063
|
-
* @param options.payload (optional) the type of action to be validated against
|
|
2064
|
-
*
|
|
2065
|
-
* @returns Promise containing a wrapped Release, that has helper methods within.
|
|
2066
|
-
*
|
|
2067
|
-
* @example ```javascript
|
|
2068
|
-
* const contentful = require('contentful-management')
|
|
2069
|
-
*
|
|
2070
|
-
* const client = contentful.createClient({
|
|
2071
|
-
* accessToken: '<content_management_api_key>'
|
|
2072
|
-
* })
|
|
2073
|
-
*
|
|
2074
|
-
* client.getSpace('<space_id>')
|
|
2075
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
2076
|
-
* .then((environment) => environment.validateRelease({ releaseId: '<release_id>', payload: { action: 'unpublish' } }))
|
|
2077
|
-
* .catch(console.error)
|
|
2078
|
-
* ```
|
|
2079
|
-
*/
|
|
2080
|
-
validateRelease({ releaseId, payload, }) {
|
|
2081
|
-
const raw = this.toPlainObject();
|
|
2082
|
-
return makeRequest({
|
|
2083
|
-
entityType: 'Release',
|
|
2084
|
-
action: 'validate',
|
|
2085
|
-
params: {
|
|
2086
|
-
spaceId: raw.sys.space.sys.id,
|
|
2087
|
-
environmentId: raw.sys.id,
|
|
2088
|
-
releaseId,
|
|
2089
|
-
},
|
|
2090
|
-
payload,
|
|
2091
|
-
}).then((data) => releaseAction.wrapReleaseAction(makeRequest, data));
|
|
2092
|
-
},
|
|
2093
|
-
/**
|
|
2094
|
-
* Archives a Release and prevents new operations (publishing, unpublishing adding new entities etc).
|
|
2095
|
-
* @param options.releaseId the ID of the release
|
|
2096
|
-
* @param options.version the version of the release that is to be archived
|
|
2097
|
-
* @returns Promise containing a wrapped Release, that has helper methods within.
|
|
2098
|
-
*
|
|
2099
|
-
* @example ```javascript
|
|
2100
|
-
* const contentful = require('contentful-management')
|
|
2101
|
-
*
|
|
2102
|
-
* const client = contentful.createClient({
|
|
2103
|
-
* accessToken: '<content_management_api_key>'
|
|
2104
|
-
* })
|
|
2105
|
-
*
|
|
2106
|
-
* client.getSpace('<space_id>')
|
|
2107
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
2108
|
-
* .then((environment) => environment.archiveRelease({ releaseId: '<release_id>', version: 1 }))
|
|
2109
|
-
* .catch(console.error)
|
|
2110
|
-
* ```
|
|
2111
|
-
*/
|
|
2112
|
-
archiveRelease({ releaseId, version }) {
|
|
2113
|
-
const raw = this.toPlainObject();
|
|
2114
|
-
return makeRequest({
|
|
2115
|
-
entityType: 'Release',
|
|
2116
|
-
action: 'archive',
|
|
2117
|
-
params: {
|
|
2118
|
-
spaceId: raw.sys.space.sys.id,
|
|
2119
|
-
environmentId: raw.sys.id,
|
|
2120
|
-
releaseId,
|
|
2121
|
-
version,
|
|
2122
|
-
},
|
|
2123
|
-
}).then((data) => release.wrapRelease(makeRequest, data));
|
|
2124
|
-
},
|
|
2125
|
-
/**
|
|
2126
|
-
* Unarchives a previously archived Release - this enables the release to be published, unpublished etc.
|
|
2127
|
-
* @param options.releaseId the ID of the release
|
|
2128
|
-
* @param options.version the version of the release that is to be unarchived
|
|
2129
|
-
* @returns Promise containing a wrapped Release, that has helper methods within.
|
|
2130
|
-
*
|
|
2131
|
-
* @example ```javascript
|
|
2132
|
-
* const contentful = require('contentful-management')
|
|
2133
|
-
*
|
|
2134
|
-
* const client = contentful.createClient({
|
|
2135
|
-
* accessToken: '<content_management_api_key>'
|
|
2136
|
-
* })
|
|
2137
|
-
*
|
|
2138
|
-
* client.getSpace('<space_id>')
|
|
2139
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
2140
|
-
* .then((environment) => environment.unarchiveRelease({ releaseId: '<release_id>', version: 1 }))
|
|
2141
|
-
* .catch(console.error)
|
|
2142
|
-
* ```
|
|
2143
|
-
*/
|
|
2144
|
-
unarchiveRelease({ releaseId, version }) {
|
|
2145
|
-
const raw = this.toPlainObject();
|
|
2146
|
-
return makeRequest({
|
|
2147
|
-
entityType: 'Release',
|
|
2148
|
-
action: 'unarchive',
|
|
2149
|
-
params: {
|
|
2150
|
-
spaceId: raw.sys.space.sys.id,
|
|
2151
|
-
environmentId: raw.sys.id,
|
|
2152
|
-
releaseId,
|
|
2153
|
-
version,
|
|
2154
|
-
},
|
|
2155
|
-
}).then((data) => release.wrapRelease(makeRequest, data));
|
|
2156
|
-
},
|
|
2157
|
-
/**
|
|
2158
|
-
* Retrieves a ReleaseAction by ID
|
|
2159
|
-
* @param params.releaseId The ID of a Release
|
|
2160
|
-
* @param params.actionId The ID of a Release Action
|
|
2161
|
-
* @returns Promise containing a wrapped ReleaseAction
|
|
2162
|
-
* @example ```javascript
|
|
2163
|
-
* const contentful = require('contentful-management')
|
|
2164
|
-
*
|
|
2165
|
-
* const client = contentful.createClient({
|
|
2166
|
-
* accessToken: '<content_management_api_key>'
|
|
2167
|
-
* })
|
|
2168
|
-
*
|
|
2169
|
-
* client.getSpace('<space_id>')
|
|
2170
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
2171
|
-
* .then((environment) => environment.getReleaseAction({ releaseId: '<release_id>', actionId: '<action_id>' }))
|
|
2172
|
-
* .then((releaseAction) => console.log(releaseAction))
|
|
2173
|
-
* .catch(console.error)
|
|
2174
|
-
* ```
|
|
2175
|
-
*/
|
|
2176
|
-
getReleaseAction({ actionId, releaseId }) {
|
|
2177
|
-
const raw = this.toPlainObject();
|
|
2178
|
-
return makeRequest({
|
|
2179
|
-
entityType: 'ReleaseAction',
|
|
2180
|
-
action: 'get',
|
|
2181
|
-
params: {
|
|
2182
|
-
actionId,
|
|
2183
|
-
spaceId: raw.sys.space.sys.id,
|
|
2184
|
-
environmentId: raw.sys.id,
|
|
2185
|
-
releaseId,
|
|
2186
|
-
},
|
|
2187
|
-
}).then((data) => releaseAction.wrapReleaseAction(makeRequest, data));
|
|
2188
|
-
},
|
|
2189
|
-
/**
|
|
2190
|
-
* Gets a Collection of ReleaseActions
|
|
2191
|
-
* @param {string} params.releaseId ID of the Release to fetch the actions from
|
|
2192
|
-
* @param {ReleaseQueryOptions} params.query filtering options for the collection result
|
|
2193
|
-
* @returns Promise containing a wrapped ReleaseAction Collection
|
|
2194
|
-
*
|
|
2195
|
-
* @example ```javascript
|
|
2196
|
-
* const contentful = require('contentful-management')
|
|
2197
|
-
*
|
|
2198
|
-
* const client = contentful.createClient({
|
|
2199
|
-
* accessToken: '<content_management_api_key>'
|
|
2200
|
-
* })
|
|
2201
|
-
*
|
|
2202
|
-
* client.getSpace('<space_id>')
|
|
2203
|
-
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
2204
|
-
* .then((environment) => environment.getReleaseActions({ query: { 'sys.id[in]': '<id_1>,<id_2>', 'sys.release.sys.id[in]': '<id1>,<id2>' } }))
|
|
2205
|
-
* .then((releaseActions) => console.log(releaseActions))
|
|
2206
|
-
* .catch(console.error)
|
|
2207
|
-
* ```
|
|
2208
|
-
*/
|
|
2209
|
-
getReleaseActions({ query }) {
|
|
2210
|
-
const raw = this.toPlainObject();
|
|
2211
|
-
return makeRequest({
|
|
2212
|
-
entityType: 'ReleaseAction',
|
|
2213
|
-
action: 'getMany',
|
|
2214
|
-
params: {
|
|
2215
|
-
spaceId: raw.sys.space.sys.id,
|
|
2216
|
-
environmentId: raw.sys.id,
|
|
2217
|
-
query,
|
|
2218
|
-
},
|
|
2219
|
-
}).then((data) => releaseAction.wrapReleaseActionCollection(makeRequest, data));
|
|
2220
|
-
},
|
|
2221
|
-
async getUIConfig() {
|
|
2222
|
-
const raw = this.toPlainObject();
|
|
2223
|
-
const data = await makeRequest({
|
|
2224
|
-
entityType: 'UIConfig',
|
|
2225
|
-
action: 'get',
|
|
2226
|
-
params: {
|
|
2227
|
-
spaceId: raw.sys.space.sys.id,
|
|
2228
|
-
environmentId: raw.sys.id,
|
|
2229
|
-
},
|
|
2230
|
-
});
|
|
2231
|
-
return uiConfig.wrapUIConfig(makeRequest, data);
|
|
2232
|
-
},
|
|
2233
|
-
async getUserUIConfig() {
|
|
2234
|
-
const raw = this.toPlainObject();
|
|
2235
|
-
const data = await makeRequest({
|
|
2236
|
-
entityType: 'UserUIConfig',
|
|
2237
|
-
action: 'get',
|
|
2238
|
-
params: {
|
|
2239
|
-
spaceId: raw.sys.space.sys.id,
|
|
2240
|
-
environmentId: raw.sys.id,
|
|
2241
|
-
},
|
|
2242
|
-
});
|
|
2243
|
-
return userUiConfig.wrapUserUIConfig(makeRequest, data);
|
|
2244
|
-
},
|
|
2245
|
-
/**
|
|
2246
|
-
* Gets a collection of all environment template installations in the environment for a given template
|
|
2247
|
-
* @param environmentTemplateId - Environment template ID to return installations for
|
|
2248
|
-
* @param [options.installationId] - Installation ID to filter for a specific installation
|
|
2249
|
-
* @return Promise for a collection of EnvironmentTemplateInstallations
|
|
2250
|
-
* ```javascript
|
|
2251
|
-
* const contentful = require('contentful-management')
|
|
2252
|
-
*
|
|
2253
|
-
* const client = contentful.createClient({
|
|
2254
|
-
* accessToken: '<content_management_api_key>'
|
|
2255
|
-
* })
|
|
2256
|
-
*
|
|
2257
|
-
* client.getSpace('<space_id>')
|
|
2258
|
-
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
2259
|
-
* .then((environment) => environment.getEnvironmentTemplateInstallations('<environment_template_id>'))
|
|
2260
|
-
* .then((installations) => console.log(installations.items))
|
|
2261
|
-
* .catch(console.error)
|
|
2262
|
-
* ```
|
|
2263
|
-
*/
|
|
2264
|
-
async getEnvironmentTemplateInstallations(environmentTemplateId, { installationId, ...query } = {}) {
|
|
2265
|
-
const raw = this.toPlainObject();
|
|
2266
|
-
return makeRequest({
|
|
2267
|
-
entityType: 'EnvironmentTemplateInstallation',
|
|
2268
|
-
action: 'getForEnvironment',
|
|
2269
|
-
params: {
|
|
2270
|
-
environmentTemplateId,
|
|
2271
|
-
...(installationId && { installationId }),
|
|
2272
|
-
query: { ...contentfulSdkCore.createRequestConfig({ query }).params },
|
|
2273
|
-
spaceId: raw.sys.space.sys.id,
|
|
2274
|
-
environmentId: raw.sys.id,
|
|
2275
|
-
},
|
|
2276
|
-
}).then((data) => environmentTemplateInstallation.wrapEnvironmentTemplateInstallationCollection(makeRequest, data));
|
|
2277
|
-
},
|
|
2278
|
-
/**
|
|
2279
|
-
* Gets a collection of all resource types based on native external references app installations in the environment
|
|
2280
|
-
* @param query - BasicCursorPaginationOptions
|
|
2281
|
-
* @return Promise for a collection of ResourceTypes
|
|
2282
|
-
* ```javascript
|
|
2283
|
-
* const contentful = require('contentful-management')
|
|
2284
|
-
*
|
|
2285
|
-
* const client = contentful.createClient({
|
|
2286
|
-
* accessToken: '<content_management_api_key>'
|
|
2287
|
-
* })
|
|
2288
|
-
*
|
|
2289
|
-
* client.getSpace('<space_id>')
|
|
2290
|
-
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
2291
|
-
* .then((environment) => environment.getResourceTypes({limit: 10}))
|
|
2292
|
-
* .then((installations) => console.log(installations.items))
|
|
2293
|
-
* .catch(console.error)
|
|
2294
|
-
* ```
|
|
2295
|
-
*/
|
|
2296
|
-
async getResourceTypes(query) {
|
|
2297
|
-
const raw = this.toPlainObject();
|
|
2298
|
-
return makeRequest({
|
|
2299
|
-
entityType: 'ResourceType',
|
|
2300
|
-
action: 'getForEnvironment',
|
|
2301
|
-
params: {
|
|
2302
|
-
query,
|
|
2303
|
-
spaceId: raw.sys.space.sys.id,
|
|
2304
|
-
environmentId: raw.sys.id,
|
|
2305
|
-
},
|
|
2306
|
-
}).then((data) => resourceType.wrapResourceTypesForEnvironmentCollection(makeRequest, data));
|
|
2307
|
-
},
|
|
2308
|
-
/**
|
|
2309
|
-
* Gets a collection of all resources for a given resource type based on native external references app installations in the environment
|
|
2310
|
-
* @param resourceTypeId - Id of the resourceType to get its resources
|
|
2311
|
-
* @param query - Either LookupQuery options with 'sys.urn[in]' param or a Search query with 'query' param, in both cases you can add pagination options
|
|
2312
|
-
* @return Promise for a collection of Resources for a given resourceTypeId
|
|
2313
|
-
* ```javascript
|
|
2314
|
-
* const contentful = require('contentful-management')
|
|
2315
|
-
*
|
|
2316
|
-
* const client = contentful.createClient({
|
|
2317
|
-
* accessToken: '<content_management_api_key>'
|
|
2318
|
-
* })
|
|
2319
|
-
*
|
|
2320
|
-
* // Search Query
|
|
2321
|
-
* client.getSpace('<space_id>')
|
|
2322
|
-
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
2323
|
-
* // <search_query> is a string you want to search for in the external resources
|
|
2324
|
-
* .then((environment) => environment.getResourcesForResourceType('<resource_type_id>', {query: '<search_query>', limit: 10}))
|
|
2325
|
-
* .then((installations) => console.log(installations.items))
|
|
2326
|
-
* .catch(console.error)
|
|
2327
|
-
*
|
|
2328
|
-
* // Lookup query
|
|
2329
|
-
*
|
|
2330
|
-
* client.getSpace('<space_id>')
|
|
2331
|
-
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
2332
|
-
* .then((environment) => environment.getResourcesForResourceType('<resource_type_id>', {'sys.urn[in]': '<resource_urn1>,<resource_urn2>', limit: 10}))
|
|
2333
|
-
* .then((installations) => console.log(installations.items))
|
|
2334
|
-
* .catch(console.error)
|
|
2335
|
-
* ```
|
|
2336
|
-
*/
|
|
2337
|
-
async getResourcesForResourceType(resourceTypeId, query) {
|
|
2338
|
-
const raw = this.toPlainObject();
|
|
2339
|
-
return makeRequest({
|
|
2340
|
-
entityType: 'Resource',
|
|
2341
|
-
action: 'getMany',
|
|
2342
|
-
params: {
|
|
2343
|
-
query,
|
|
2344
|
-
spaceId: raw.sys.space.sys.id,
|
|
2345
|
-
environmentId: raw.sys.id,
|
|
2346
|
-
resourceTypeId,
|
|
2347
|
-
},
|
|
2348
|
-
}).then((data) => resource.wrapResourceCollection(makeRequest, data));
|
|
2349
|
-
},
|
|
2350
|
-
/**
|
|
2351
|
-
* Invokes an AI Action.
|
|
2352
|
-
* @param aiActionId - The ID of the AI Action to invoke.
|
|
2353
|
-
* @param payload - The invocation payload.
|
|
2354
|
-
* @returns Promise for an AI Action Invocation.
|
|
2355
|
-
* @example ```javascript
|
|
2356
|
-
* client.getSpace('<space_id>')
|
|
2357
|
-
* .then(space => space.getEnvironment('<environment_id>'))
|
|
2358
|
-
* .then(environment => environment.invokeAiAction('<ai_action_id>', {
|
|
2359
|
-
* variables: [ ... ],
|
|
2360
|
-
* outputFormat: 'RichText'
|
|
2361
|
-
* }))
|
|
2362
|
-
* .then(invocation => console.log(invocation))
|
|
2363
|
-
* .catch(console.error)
|
|
2364
|
-
* ```
|
|
2365
|
-
*/
|
|
2366
|
-
invokeAiAction(aiActionId, payload) {
|
|
2367
|
-
const raw = this.toPlainObject();
|
|
2368
|
-
return makeRequest({
|
|
2369
|
-
entityType: 'AiAction',
|
|
2370
|
-
action: 'invoke',
|
|
2371
|
-
params: { spaceId: raw.sys.space.sys.id, environmentId: raw.sys.id, aiActionId },
|
|
2372
|
-
payload,
|
|
2373
|
-
}).then((data) => aiActionInvocation.wrapAiActionInvocation(makeRequest, data));
|
|
2374
|
-
},
|
|
2375
|
-
/**
|
|
2376
|
-
* Retrieves an AI Action Invocation.
|
|
2377
|
-
* @param params - Object containing the AI Action ID and the Invocation ID.
|
|
2378
|
-
* @returns Promise for an AI Action Invocation.
|
|
2379
|
-
* @example ```javascript
|
|
2380
|
-
* client.getSpace('<space_id>')
|
|
2381
|
-
* .then(space => space.getEnvironment('<environment_id>'))
|
|
2382
|
-
* .then(environment => environment.getAiActionInvocation({
|
|
2383
|
-
* aiActionId: '<ai_action_id>',
|
|
2384
|
-
* invocationId: '<invocation_id>'
|
|
2385
|
-
* }))
|
|
2386
|
-
* .then(invocation => console.log(invocation))
|
|
2387
|
-
* .catch(console.error)
|
|
2388
|
-
* ```
|
|
2389
|
-
*/
|
|
2390
|
-
getAiActionInvocation({ aiActionId, invocationId, }) {
|
|
2391
|
-
const raw = this.toPlainObject();
|
|
2392
|
-
return makeRequest({
|
|
2393
|
-
entityType: 'AiActionInvocation',
|
|
2394
|
-
action: 'get',
|
|
2395
|
-
params: {
|
|
2396
|
-
spaceId: raw.sys.space.sys.id,
|
|
2397
|
-
environmentId: raw.sys.id,
|
|
2398
|
-
aiActionId,
|
|
2399
|
-
invocationId,
|
|
2400
|
-
},
|
|
2401
|
-
}).then((data) => aiActionInvocation.wrapAiActionInvocation(makeRequest, data));
|
|
2402
|
-
},
|
|
2403
|
-
};
|
|
2404
|
-
}
|
|
2405
|
-
|
|
2406
|
-
module.exports = createEnvironmentApi;
|
|
2407
|
-
//# sourceMappingURL=create-environment-api.cjs.map
|