contentful-management 11.52.1 → 12.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -48
- package/dist/contentful-management.browser.js +23913 -28421
- package/dist/contentful-management.browser.min.js +1 -2
- package/dist/contentful-management.cjs +37008 -0
- package/dist/{es-modules → esm}/adapters/REST/endpoints/access-token.js +20 -22
- package/dist/esm/adapters/REST/endpoints/ai-action-invocation.js +7 -0
- package/dist/esm/adapters/REST/endpoints/ai-action.js +44 -0
- package/dist/esm/adapters/REST/endpoints/api-key.js +41 -0
- package/dist/esm/adapters/REST/endpoints/app-access-token.js +7 -0
- package/dist/esm/adapters/REST/endpoints/app-action-call.js +61 -0
- package/dist/esm/adapters/REST/endpoints/app-action.js +35 -0
- package/dist/esm/adapters/REST/endpoints/app-bundle.js +34 -0
- package/dist/esm/adapters/REST/endpoints/app-definition.js +39 -0
- package/dist/esm/adapters/REST/endpoints/app-details.js +13 -0
- package/dist/esm/adapters/REST/endpoints/app-event-subscription.js +13 -0
- package/dist/esm/adapters/REST/endpoints/app-installation.js +35 -0
- package/dist/esm/adapters/REST/endpoints/app-key.js +16 -0
- package/dist/esm/adapters/REST/endpoints/app-signed-request.js +7 -0
- package/dist/esm/adapters/REST/endpoints/app-signing-secret.js +13 -0
- package/dist/esm/adapters/REST/endpoints/app-upload.js +24 -0
- package/dist/esm/adapters/REST/endpoints/asset-key.js +31 -0
- package/dist/esm/adapters/REST/endpoints/asset.js +170 -0
- package/dist/esm/adapters/REST/endpoints/bulk-action.js +16 -0
- package/dist/esm/adapters/REST/endpoints/comment.js +85 -0
- package/dist/esm/adapters/REST/endpoints/concept-scheme.js +35 -0
- package/dist/esm/adapters/REST/endpoints/concept.js +54 -0
- package/dist/esm/adapters/REST/endpoints/content-type.js +47 -0
- package/dist/esm/adapters/REST/endpoints/editor-interface.js +20 -0
- package/dist/esm/adapters/REST/endpoints/entry.js +90 -0
- package/dist/esm/adapters/REST/endpoints/environment-alias.js +38 -0
- package/dist/esm/adapters/REST/endpoints/environment-template-installation.js +20 -0
- package/dist/esm/adapters/REST/endpoints/environment-template.js +38 -0
- package/dist/esm/adapters/REST/endpoints/environment.js +40 -0
- package/dist/esm/adapters/REST/endpoints/extension.js +36 -0
- package/dist/esm/adapters/REST/endpoints/function-log.js +20 -0
- package/dist/esm/adapters/REST/endpoints/function.js +21 -0
- package/dist/esm/adapters/REST/endpoints/http.js +22 -0
- package/dist/esm/adapters/REST/endpoints/index.js +137 -0
- package/dist/esm/adapters/REST/endpoints/locale.js +31 -0
- package/dist/{es-modules → esm}/adapters/REST/endpoints/oauth-application.js +21 -22
- package/dist/esm/adapters/REST/endpoints/organization-invitation.js +20 -0
- package/dist/esm/adapters/REST/endpoints/organization-membership.js +27 -0
- package/dist/esm/adapters/REST/endpoints/organization.js +25 -0
- package/dist/esm/adapters/REST/endpoints/personal-access-token.js +32 -0
- package/dist/esm/adapters/REST/endpoints/preview-api-key.js +12 -0
- package/dist/esm/adapters/REST/endpoints/raw.js +37 -0
- package/dist/esm/adapters/REST/endpoints/release-action.js +17 -0
- package/dist/esm/adapters/REST/endpoints/release.js +50 -0
- package/dist/esm/adapters/REST/endpoints/resource-provider.js +14 -0
- package/dist/esm/adapters/REST/endpoints/resource-type.js +24 -0
- package/dist/esm/adapters/REST/endpoints/resource.js +8 -0
- package/dist/esm/adapters/REST/endpoints/role.js +40 -0
- package/dist/esm/adapters/REST/endpoints/scheduled-action.js +38 -0
- package/dist/esm/adapters/REST/endpoints/snapshot.js +25 -0
- package/dist/esm/adapters/REST/endpoints/space-member.js +8 -0
- package/dist/esm/adapters/REST/endpoints/space-membership.js +51 -0
- package/dist/esm/adapters/REST/endpoints/space.js +27 -0
- package/dist/esm/adapters/REST/endpoints/tag.js +31 -0
- package/dist/esm/adapters/REST/endpoints/task.js +33 -0
- package/dist/esm/adapters/REST/endpoints/team-membership.js +28 -0
- package/dist/esm/adapters/REST/endpoints/team-space-membership.js +38 -0
- package/dist/esm/adapters/REST/endpoints/team.js +29 -0
- package/dist/esm/adapters/REST/endpoints/ui-config.js +19 -0
- package/dist/esm/adapters/REST/endpoints/upload-credentials.js +14 -0
- package/dist/esm/adapters/REST/endpoints/upload.js +38 -0
- package/dist/esm/adapters/REST/endpoints/usage.js +14 -0
- package/dist/esm/adapters/REST/endpoints/user-ui-config.js +19 -0
- package/dist/esm/adapters/REST/endpoints/user.js +21 -0
- package/dist/esm/adapters/REST/endpoints/utils.js +17 -0
- package/dist/esm/adapters/REST/endpoints/webhook.js +82 -0
- package/dist/esm/adapters/REST/endpoints/workflow-definition.js +35 -0
- package/dist/esm/adapters/REST/endpoints/workflow.js +42 -0
- package/dist/esm/adapters/REST/endpoints/workflows-changelog.js +9 -0
- package/dist/esm/adapters/REST/make-request.js +17 -0
- package/dist/esm/adapters/REST/rest-adapter.js +30 -0
- package/dist/esm/common-types.js +6 -0
- package/dist/esm/common-utils.js +32 -0
- package/dist/esm/constants/editor-interface-defaults/controls-defaults.js +153 -0
- package/dist/esm/constants/editor-interface-defaults/editors-defaults.js +37 -0
- package/dist/esm/constants/editor-interface-defaults/index.js +12 -0
- package/dist/esm/constants/editor-interface-defaults/sidebar-defaults.js +68 -0
- package/dist/esm/constants/editor-interface-defaults/types.js +15 -0
- package/dist/esm/create-adapter.js +19 -0
- package/dist/esm/create-app-definition-api.js +252 -0
- package/dist/esm/create-contentful-api.js +590 -0
- package/dist/esm/create-entry-api.js +479 -0
- package/dist/esm/create-environment-api.js +2401 -0
- package/dist/esm/create-environment-template-api.js +268 -0
- package/dist/esm/create-organization-api.js +1134 -0
- package/dist/esm/create-space-api.js +1589 -0
- package/dist/esm/create-ui-config-api.js +53 -0
- package/dist/esm/create-user-ui-config-api.js +53 -0
- package/dist/{es-modules → esm}/enhance-with-methods.js +13 -11
- package/dist/esm/entities/access-token.js +33 -0
- package/dist/esm/entities/ai-action-invocation.js +42 -0
- package/dist/esm/entities/ai-action.js +91 -0
- package/dist/esm/entities/api-key.js +56 -0
- package/dist/esm/entities/app-access-token.js +15 -0
- package/dist/esm/entities/app-action-call.js +61 -0
- package/dist/esm/entities/app-action.js +45 -0
- package/dist/esm/entities/app-bundle.js +45 -0
- package/dist/esm/entities/app-definition.js +26 -0
- package/dist/esm/entities/app-details.js +37 -0
- package/dist/esm/entities/app-event-subscription.js +32 -0
- package/dist/esm/entities/app-installation.js +52 -0
- package/dist/esm/entities/app-key.js +41 -0
- package/dist/{es-modules → esm}/entities/app-signed-request.js +7 -4
- package/dist/esm/entities/app-signing-secret.js +32 -0
- package/dist/esm/entities/app-upload.js +44 -0
- package/dist/{es-modules → esm}/entities/asset-key.js +7 -4
- package/dist/esm/entities/asset.js +121 -0
- package/dist/esm/entities/bulk-action.js +58 -0
- package/dist/esm/entities/comment.js +57 -0
- package/dist/esm/entities/concept-scheme.js +1 -0
- package/dist/esm/entities/concept.js +1 -0
- package/dist/esm/entities/content-type.js +117 -0
- package/dist/esm/entities/editor-interface.js +47 -0
- package/dist/esm/entities/entry.js +24 -0
- package/dist/esm/entities/environment-alias.js +55 -0
- package/dist/esm/entities/environment-template-installation.js +20 -0
- package/dist/esm/entities/environment-template.js +15 -0
- package/dist/esm/entities/environment.js +31 -0
- package/dist/esm/entities/extension.js +51 -0
- package/dist/{es-modules → esm}/entities/function-log.js +9 -7
- package/dist/esm/entities/function.js +63 -0
- package/dist/esm/entities/index.js +129 -0
- package/dist/esm/entities/locale.js +54 -0
- package/dist/esm/entities/oauth-application.js +63 -0
- package/dist/esm/entities/organization-invitation.js +15 -0
- package/dist/esm/entities/organization-membership.js +50 -0
- package/dist/esm/entities/organization.js +29 -0
- package/dist/esm/entities/personal-access-token.js +33 -0
- package/dist/esm/entities/preview-api-key.js +28 -0
- package/dist/esm/entities/release-action.js +52 -0
- package/dist/esm/entities/release.js +107 -0
- package/dist/esm/entities/resource-provider.js +137 -0
- package/dist/esm/entities/resource-type.js +94 -0
- package/dist/esm/entities/resource.js +10 -0
- package/dist/esm/entities/role.js +50 -0
- package/dist/esm/entities/scheduled-action.js +148 -0
- package/dist/esm/entities/snapshot.js +33 -0
- package/dist/esm/entities/space-member.js +20 -0
- package/dist/esm/entities/space-membership.js +50 -0
- package/dist/esm/entities/space.js +30 -0
- package/dist/esm/entities/tag.js +50 -0
- package/dist/esm/entities/task.js +51 -0
- package/dist/esm/entities/team-membership.js +51 -0
- package/dist/esm/entities/team-space-membership.js +50 -0
- package/dist/esm/entities/team.js +50 -0
- package/dist/esm/entities/ui-config.js +18 -0
- package/dist/esm/entities/upload.js +36 -0
- package/dist/esm/entities/usage.js +22 -0
- package/dist/esm/entities/user-ui-config.js +18 -0
- package/dist/esm/entities/user.js +25 -0
- package/dist/esm/entities/webhook.js +74 -0
- package/dist/esm/entities/workflow-definition.js +73 -0
- package/dist/esm/index.js +36 -0
- package/dist/esm/methods/action.js +49 -0
- package/dist/esm/methods/content-type.js +49 -0
- package/dist/esm/methods/utils.js +9 -0
- package/dist/esm/plain/as-iterator.js +30 -0
- package/dist/esm/plain/checks.js +10 -0
- package/dist/esm/plain/pagination-helper.js +54 -0
- package/dist/esm/plain/plain-client.js +514 -0
- package/dist/esm/plain/wrappers/wrap.js +24 -0
- package/dist/esm/upload-http-client.js +15 -0
- package/dist/stats-browser-min.html +4842 -0
- package/dist/{typings → types}/adapters/REST/endpoints/concept-scheme.d.ts +0 -1
- package/dist/{typings → types}/adapters/REST/endpoints/concept.d.ts +0 -1
- package/dist/{typings → types}/common-types.d.ts +22 -39
- package/dist/{typings → types}/create-contentful-api.d.ts +3 -2
- package/dist/{typings → types}/create-environment-api.d.ts +3 -3
- package/dist/{typings → types}/create-organization-api.d.ts +90 -90
- package/dist/{typings → types}/create-ui-config-api.d.ts +1 -1
- package/dist/{typings → types}/create-user-ui-config-api.d.ts +1 -1
- package/dist/{typings → types}/entities/access-token.d.ts +3 -3
- package/dist/{typings → types}/entities/ai-action-invocation.d.ts +4 -4
- package/dist/{typings → types}/entities/ai-action.d.ts +4 -21
- package/dist/{typings → types}/entities/api-key.d.ts +4 -8
- package/dist/{typings → types}/entities/app-access-token.d.ts +5 -5
- package/dist/{typings → types}/entities/app-action-call.d.ts +6 -6
- package/dist/{typings → types}/entities/app-action.d.ts +4 -4
- package/dist/{typings → types}/entities/app-bundle.d.ts +4 -4
- package/dist/{typings → types}/entities/app-definition.d.ts +3 -3
- package/dist/{typings → types}/entities/app-details.d.ts +4 -4
- package/dist/{typings → types}/entities/app-event-subscription.d.ts +4 -4
- package/dist/{typings → types}/entities/app-installation.d.ts +6 -6
- package/dist/{typings → types}/entities/app-key.d.ts +4 -4
- package/dist/{typings → types}/entities/app-signed-request.d.ts +5 -5
- package/dist/{typings → types}/entities/app-signing-secret.d.ts +4 -4
- package/dist/{typings → types}/entities/app-upload.d.ts +3 -3
- package/dist/{typings → types}/entities/asset.d.ts +1 -2
- package/dist/{typings → types}/entities/comment.d.ts +4 -4
- package/dist/{typings → types}/entities/content-type.d.ts +4 -4
- package/dist/{typings → types}/entities/editor-interface.d.ts +5 -11
- package/dist/{typings → types}/entities/entry.d.ts +5 -1
- package/dist/{typings → types}/entities/environment-alias.d.ts +4 -6
- package/dist/{typings → types}/entities/environment-template-installation.d.ts +1 -1
- package/dist/{typings → types}/entities/environment-template.d.ts +1 -1
- package/dist/{typings → types}/entities/environment.d.ts +6 -6
- package/dist/{typings → types}/entities/extension.d.ts +4 -4
- package/dist/{typings → types}/entities/locale.d.ts +4 -4
- package/dist/{typings → types}/entities/oauth-application.d.ts +1 -1
- package/dist/{typings → types}/entities/organization-invitation.d.ts +3 -5
- package/dist/{typings → types}/entities/organization-membership.d.ts +3 -5
- package/dist/{typings → types}/entities/organization.d.ts +1 -1
- package/dist/{typings → types}/entities/personal-access-token.d.ts +1 -1
- package/dist/{typings → types}/entities/preview-api-key.d.ts +1 -1
- package/dist/{typings → types}/entities/resource-provider.d.ts +5 -5
- package/dist/{typings → types}/entities/resource-type.d.ts +5 -5
- package/dist/{typings → types}/entities/resource.d.ts +4 -4
- package/dist/{typings → types}/entities/role.d.ts +3 -3
- package/dist/{typings → types}/entities/scheduled-action.d.ts +3 -5
- package/dist/{typings → types}/entities/snapshot.d.ts +1 -1
- package/dist/{typings → types}/entities/space-member.d.ts +3 -5
- package/dist/{typings → types}/entities/space-membership.d.ts +6 -6
- package/dist/{typings → types}/entities/space.d.ts +1 -1
- package/dist/{typings → types}/entities/tag.d.ts +4 -4
- package/dist/{typings → types}/entities/task.d.ts +4 -4
- package/dist/{typings → types}/entities/team-membership.d.ts +5 -11
- package/dist/{typings → types}/entities/team-space-membership.d.ts +5 -11
- package/dist/{typings → types}/entities/team.d.ts +3 -5
- package/dist/{typings → types}/entities/ui-config.d.ts +5 -5
- package/dist/{typings → types}/entities/upload-credential.d.ts +4 -4
- package/dist/{typings → types}/entities/upload.d.ts +4 -4
- package/dist/{typings → types}/entities/usage.d.ts +7 -7
- package/dist/{typings → types}/entities/user-ui-config.d.ts +5 -5
- package/dist/{typings → types}/entities/user.d.ts +1 -1
- package/dist/{typings → types}/entities/webhook.d.ts +10 -16
- package/dist/{typings → types}/entities/workflow-definition.d.ts +4 -4
- package/dist/{typings → types}/entities/workflow.d.ts +6 -6
- package/dist/{typings → types}/entities/workflows-changelog-entry.d.ts +2 -2
- package/dist/{typings → types}/export-types.d.ts +1 -1
- package/dist/{typings/contentful-management.d.ts → types/index.d.ts} +1 -1
- package/dist/types/plain/checks.d.ts +13 -0
- package/dist/{typings → types}/plain/common-types.d.ts +3 -2
- package/dist/{typings → types}/plain/entities/concept-scheme.d.ts +3 -20
- package/dist/{typings → types}/plain/entities/concept.d.ts +4 -21
- package/dist/{typings → types}/plain/entities/upload-credential.d.ts +1 -1
- package/package.json +49 -45
- package/dist/contentful-management.browser.js.map +0 -1
- package/dist/contentful-management.node.js +0 -32624
- package/dist/contentful-management.node.js.map +0 -1
- package/dist/contentful-management.node.min.js +0 -2
- package/dist/es-modules/adapters/REST/endpoints/ai-action-invocation.js +0 -6
- package/dist/es-modules/adapters/REST/endpoints/ai-action.js +0 -61
- package/dist/es-modules/adapters/REST/endpoints/api-key.js +0 -47
- package/dist/es-modules/adapters/REST/endpoints/app-access-token.js +0 -8
- package/dist/es-modules/adapters/REST/endpoints/app-action-call.js +0 -69
- package/dist/es-modules/adapters/REST/endpoints/app-action.js +0 -32
- package/dist/es-modules/adapters/REST/endpoints/app-bundle.js +0 -36
- package/dist/es-modules/adapters/REST/endpoints/app-definition.js +0 -45
- package/dist/es-modules/adapters/REST/endpoints/app-details.js +0 -10
- package/dist/es-modules/adapters/REST/endpoints/app-event-subscription.js +0 -10
- package/dist/es-modules/adapters/REST/endpoints/app-installation.js +0 -39
- package/dist/es-modules/adapters/REST/endpoints/app-key.js +0 -13
- package/dist/es-modules/adapters/REST/endpoints/app-signed-request.js +0 -4
- package/dist/es-modules/adapters/REST/endpoints/app-signing-secret.js +0 -10
- package/dist/es-modules/adapters/REST/endpoints/app-upload.js +0 -23
- package/dist/es-modules/adapters/REST/endpoints/asset-key.js +0 -33
- package/dist/es-modules/adapters/REST/endpoints/asset.js +0 -220
- package/dist/es-modules/adapters/REST/endpoints/bulk-action.js +0 -13
- package/dist/es-modules/adapters/REST/endpoints/comment.js +0 -101
- package/dist/es-modules/adapters/REST/endpoints/concept-scheme.js +0 -52
- package/dist/es-modules/adapters/REST/endpoints/concept.js +0 -85
- package/dist/es-modules/adapters/REST/endpoints/content-type.js +0 -61
- package/dist/es-modules/adapters/REST/endpoints/editor-interface.js +0 -24
- package/dist/es-modules/adapters/REST/endpoints/entry.js +0 -113
- package/dist/es-modules/adapters/REST/endpoints/environment-alias.js +0 -46
- package/dist/es-modules/adapters/REST/endpoints/environment-template-installation.js +0 -43
- package/dist/es-modules/adapters/REST/endpoints/environment-template.js +0 -88
- package/dist/es-modules/adapters/REST/endpoints/environment.js +0 -42
- package/dist/es-modules/adapters/REST/endpoints/extension.js +0 -44
- package/dist/es-modules/adapters/REST/endpoints/function-log.js +0 -22
- package/dist/es-modules/adapters/REST/endpoints/function.js +0 -20
- package/dist/es-modules/adapters/REST/endpoints/http.js +0 -39
- package/dist/es-modules/adapters/REST/endpoints/index.js +0 -134
- package/dist/es-modules/adapters/REST/endpoints/locale.js +0 -35
- package/dist/es-modules/adapters/REST/endpoints/organization-invitation.js +0 -22
- package/dist/es-modules/adapters/REST/endpoints/organization-membership.js +0 -35
- package/dist/es-modules/adapters/REST/endpoints/organization.js +0 -26
- package/dist/es-modules/adapters/REST/endpoints/personal-access-token.js +0 -33
- package/dist/es-modules/adapters/REST/endpoints/preview-api-key.js +0 -9
- package/dist/es-modules/adapters/REST/endpoints/raw.js +0 -42
- package/dist/es-modules/adapters/REST/endpoints/release-action.js +0 -21
- package/dist/es-modules/adapters/REST/endpoints/release.js +0 -58
- package/dist/es-modules/adapters/REST/endpoints/resource-provider.js +0 -13
- package/dist/es-modules/adapters/REST/endpoints/resource-type.js +0 -23
- package/dist/es-modules/adapters/REST/endpoints/resource.js +0 -5
- package/dist/es-modules/adapters/REST/endpoints/role.js +0 -44
- package/dist/es-modules/adapters/REST/endpoints/scheduled-action.js +0 -35
- package/dist/es-modules/adapters/REST/endpoints/snapshot.js +0 -22
- package/dist/es-modules/adapters/REST/endpoints/space-member.js +0 -5
- package/dist/es-modules/adapters/REST/endpoints/space-membership.js +0 -55
- package/dist/es-modules/adapters/REST/endpoints/space.js +0 -32
- package/dist/es-modules/adapters/REST/endpoints/tag.js +0 -46
- package/dist/es-modules/adapters/REST/endpoints/task.js +0 -47
- package/dist/es-modules/adapters/REST/endpoints/team-membership.js +0 -34
- package/dist/es-modules/adapters/REST/endpoints/team-space-membership.js +0 -45
- package/dist/es-modules/adapters/REST/endpoints/team.js +0 -35
- package/dist/es-modules/adapters/REST/endpoints/ui-config.js +0 -16
- package/dist/es-modules/adapters/REST/endpoints/upload-credentials.js +0 -11
- package/dist/es-modules/adapters/REST/endpoints/upload.js +0 -37
- package/dist/es-modules/adapters/REST/endpoints/usage.js +0 -11
- package/dist/es-modules/adapters/REST/endpoints/user-ui-config.js +0 -16
- package/dist/es-modules/adapters/REST/endpoints/user.js +0 -20
- package/dist/es-modules/adapters/REST/endpoints/utils.js +0 -28
- package/dist/es-modules/adapters/REST/endpoints/webhook.js +0 -93
- package/dist/es-modules/adapters/REST/endpoints/workflow-definition.js +0 -46
- package/dist/es-modules/adapters/REST/endpoints/workflow.js +0 -59
- package/dist/es-modules/adapters/REST/endpoints/workflows-changelog.js +0 -6
- package/dist/es-modules/adapters/REST/make-request.js +0 -28
- package/dist/es-modules/adapters/REST/rest-adapter.js +0 -42
- package/dist/es-modules/adapters/REST/types.js +0 -1
- package/dist/es-modules/common-types.js +0 -61
- package/dist/es-modules/common-utils.js +0 -30
- package/dist/es-modules/constants/editor-interface-defaults/controls-defaults.js +0 -255
- package/dist/es-modules/constants/editor-interface-defaults/editors-defaults.js +0 -34
- package/dist/es-modules/constants/editor-interface-defaults/index.js +0 -9
- package/dist/es-modules/constants/editor-interface-defaults/sidebar-defaults.js +0 -57
- package/dist/es-modules/constants/editor-interface-defaults/types.js +0 -14
- package/dist/es-modules/contentful-management.js +0 -66
- package/dist/es-modules/create-adapter.js +0 -16
- package/dist/es-modules/create-app-definition-api.js +0 -263
- package/dist/es-modules/create-contentful-api.js +0 -663
- package/dist/es-modules/create-entry-api.js +0 -548
- package/dist/es-modules/create-environment-api.js +0 -2525
- package/dist/es-modules/create-environment-template-api.js +0 -316
- package/dist/es-modules/create-organization-api.js +0 -1306
- package/dist/es-modules/create-space-api.js +0 -1750
- package/dist/es-modules/create-ui-config-api.js +0 -60
- package/dist/es-modules/create-user-ui-config-api.js +0 -60
- package/dist/es-modules/entities/access-token.js +0 -38
- package/dist/es-modules/entities/ai-action-invocation.js +0 -46
- package/dist/es-modules/entities/ai-action.js +0 -88
- package/dist/es-modules/entities/api-key.js +0 -55
- package/dist/es-modules/entities/app-access-token.js +0 -12
- package/dist/es-modules/entities/app-action-call.js +0 -70
- package/dist/es-modules/entities/app-action.js +0 -53
- package/dist/es-modules/entities/app-bundle.js +0 -44
- package/dist/es-modules/entities/app-definition.js +0 -24
- package/dist/es-modules/entities/app-details.js +0 -35
- package/dist/es-modules/entities/app-event-subscription.js +0 -30
- package/dist/es-modules/entities/app-installation.js +0 -51
- package/dist/es-modules/entities/app-key.js +0 -40
- package/dist/es-modules/entities/app-signing-secret.js +0 -30
- package/dist/es-modules/entities/app-upload.js +0 -43
- package/dist/es-modules/entities/asset.js +0 -131
- package/dist/es-modules/entities/bulk-action.js +0 -61
- package/dist/es-modules/entities/comment.js +0 -77
- package/dist/es-modules/entities/concept-scheme.js +0 -1
- package/dist/es-modules/entities/concept.js +0 -1
- package/dist/es-modules/entities/content-type-fields.js +0 -1
- package/dist/es-modules/entities/content-type.js +0 -146
- package/dist/es-modules/entities/editor-interface.js +0 -46
- package/dist/es-modules/entities/entry.js +0 -22
- package/dist/es-modules/entities/environment-alias.js +0 -54
- package/dist/es-modules/entities/environment-template-installation.js +0 -17
- package/dist/es-modules/entities/environment-template.js +0 -12
- package/dist/es-modules/entities/environment.js +0 -29
- package/dist/es-modules/entities/extension.js +0 -50
- package/dist/es-modules/entities/field-type.js +0 -1
- package/dist/es-modules/entities/function.js +0 -61
- package/dist/es-modules/entities/index.js +0 -126
- package/dist/es-modules/entities/locale.js +0 -53
- package/dist/es-modules/entities/oauth-application.js +0 -62
- package/dist/es-modules/entities/organization-invitation.js +0 -12
- package/dist/es-modules/entities/organization-membership.js +0 -49
- package/dist/es-modules/entities/organization.js +0 -32
- package/dist/es-modules/entities/personal-access-token.js +0 -38
- package/dist/es-modules/entities/preview-api-key.js +0 -27
- package/dist/es-modules/entities/release-action.js +0 -53
- package/dist/es-modules/entities/release.js +0 -105
- package/dist/es-modules/entities/resource-provider.js +0 -139
- package/dist/es-modules/entities/resource-type.js +0 -93
- package/dist/es-modules/entities/resource.js +0 -7
- package/dist/es-modules/entities/role.js +0 -49
- package/dist/es-modules/entities/scheduled-action.js +0 -155
- package/dist/es-modules/entities/snapshot.js +0 -31
- package/dist/es-modules/entities/space-member.js +0 -18
- package/dist/es-modules/entities/space-membership.js +0 -49
- package/dist/es-modules/entities/space.js +0 -28
- package/dist/es-modules/entities/tag.js +0 -56
- package/dist/es-modules/entities/task.js +0 -57
- package/dist/es-modules/entities/team-membership.js +0 -50
- package/dist/es-modules/entities/team-space-membership.js +0 -49
- package/dist/es-modules/entities/team.js +0 -49
- package/dist/es-modules/entities/ui-config.js +0 -15
- package/dist/es-modules/entities/upload-credential.js +0 -33
- package/dist/es-modules/entities/upload.js +0 -34
- package/dist/es-modules/entities/usage.js +0 -20
- package/dist/es-modules/entities/user-ui-config.js +0 -15
- package/dist/es-modules/entities/user.js +0 -23
- package/dist/es-modules/entities/utils.js +0 -1
- package/dist/es-modules/entities/webhook.js +0 -80
- package/dist/es-modules/entities/widget-parameters.js +0 -1
- package/dist/es-modules/entities/workflow-definition.js +0 -87
- package/dist/es-modules/entities/workflow.js +0 -76
- package/dist/es-modules/entities/workflows-changelog-entry.js +0 -24
- package/dist/es-modules/export-types.js +0 -3
- package/dist/es-modules/methods/action.js +0 -54
- package/dist/es-modules/methods/bulk-action.js +0 -15
- package/dist/es-modules/methods/content-type.js +0 -47
- package/dist/es-modules/methods/release-action.js +0 -17
- package/dist/es-modules/methods/utils.js +0 -7
- package/dist/es-modules/plain/as-iterator.js +0 -47
- package/dist/es-modules/plain/checks.js +0 -8
- package/dist/es-modules/plain/common-types.js +0 -1
- package/dist/es-modules/plain/entities/ai-action-invocation.js +0 -1
- package/dist/es-modules/plain/entities/ai-action.js +0 -1
- package/dist/es-modules/plain/entities/app-access-token.js +0 -1
- package/dist/es-modules/plain/entities/app-action-call.js +0 -1
- package/dist/es-modules/plain/entities/app-action.js +0 -1
- package/dist/es-modules/plain/entities/app-bundle.js +0 -1
- package/dist/es-modules/plain/entities/app-definition.js +0 -1
- package/dist/es-modules/plain/entities/app-details.js +0 -1
- package/dist/es-modules/plain/entities/app-event-subscription.js +0 -1
- package/dist/es-modules/plain/entities/app-installation.js +0 -1
- package/dist/es-modules/plain/entities/app-key.js +0 -1
- package/dist/es-modules/plain/entities/app-signed-request.js +0 -1
- package/dist/es-modules/plain/entities/app-signing-secret.js +0 -1
- package/dist/es-modules/plain/entities/app-upload.js +0 -1
- package/dist/es-modules/plain/entities/comment.js +0 -1
- package/dist/es-modules/plain/entities/concept-scheme.js +0 -1
- package/dist/es-modules/plain/entities/concept.js +0 -1
- package/dist/es-modules/plain/entities/editor-interface.js +0 -1
- package/dist/es-modules/plain/entities/environment-alias.js +0 -1
- package/dist/es-modules/plain/entities/environment.js +0 -1
- package/dist/es-modules/plain/entities/extension.js +0 -1
- package/dist/es-modules/plain/entities/function-log.js +0 -1
- package/dist/es-modules/plain/entities/function.js +0 -1
- package/dist/es-modules/plain/entities/locale.js +0 -1
- package/dist/es-modules/plain/entities/oauth-application.js +0 -1
- package/dist/es-modules/plain/entities/organization.js +0 -1
- package/dist/es-modules/plain/entities/resource-provider.js +0 -1
- package/dist/es-modules/plain/entities/resource-type.js +0 -1
- package/dist/es-modules/plain/entities/resource.js +0 -1
- package/dist/es-modules/plain/entities/role.js +0 -1
- package/dist/es-modules/plain/entities/space-member.js +0 -1
- package/dist/es-modules/plain/entities/space-membership.js +0 -1
- package/dist/es-modules/plain/entities/space.js +0 -1
- package/dist/es-modules/plain/entities/tag.js +0 -1
- package/dist/es-modules/plain/entities/task.js +0 -1
- package/dist/es-modules/plain/entities/team-membership.js +0 -1
- package/dist/es-modules/plain/entities/team-space-membership.js +0 -1
- package/dist/es-modules/plain/entities/team.js +0 -1
- package/dist/es-modules/plain/entities/ui-config.js +0 -1
- package/dist/es-modules/plain/entities/upload-credential.js +0 -1
- package/dist/es-modules/plain/entities/upload.js +0 -1
- package/dist/es-modules/plain/entities/usage.js +0 -1
- package/dist/es-modules/plain/entities/user-ui-config.js +0 -1
- package/dist/es-modules/plain/entities/user.js +0 -1
- package/dist/es-modules/plain/entities/webhook.js +0 -1
- package/dist/es-modules/plain/entities/workflow-definition.js +0 -1
- package/dist/es-modules/plain/entities/workflow.js +0 -1
- package/dist/es-modules/plain/entities/workflows-changelog.js +0 -1
- package/dist/es-modules/plain/pagination-helper.js +0 -76
- package/dist/es-modules/plain/plain-client.js +0 -544
- package/dist/es-modules/plain/wrappers/wrap.js +0 -46
- package/dist/es-modules/plain/wrappers/wrap.test-d.js +0 -15
- package/dist/es-modules/upload-http-client.js +0 -17
- package/dist/typings/plain/checks.d.ts +0 -13
- /package/dist/{typings → types}/adapters/REST/endpoints/access-token.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/ai-action-invocation.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/ai-action.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/api-key.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-access-token.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-action-call.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-action.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-bundle.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-definition.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-details.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-event-subscription.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-installation.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-key.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-signed-request.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-signing-secret.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/app-upload.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/asset-key.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/asset.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/bulk-action.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/comment.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/content-type.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/editor-interface.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/entry.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/environment-alias.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/environment-template-installation.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/environment-template.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/environment.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/extension.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/function-log.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/function.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/http.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/index.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/locale.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/oauth-application.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/organization-invitation.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/organization-membership.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/organization.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/personal-access-token.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/preview-api-key.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/raw.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/release-action.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/release.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/resource-provider.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/resource-type.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/resource.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/role.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/scheduled-action.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/snapshot.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/space-member.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/space-membership.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/space.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/tag.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/task.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/team-membership.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/team-space-membership.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/team.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/ui-config.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/upload-credentials.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/upload.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/usage.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/user-ui-config.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/user.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/utils.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/webhook.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/workflow-definition.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/workflow.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/endpoints/workflows-changelog.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/make-request.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/rest-adapter.d.ts +0 -0
- /package/dist/{typings → types}/adapters/REST/types.d.ts +0 -0
- /package/dist/{typings → types}/common-utils.d.ts +0 -0
- /package/dist/{typings → types}/constants/editor-interface-defaults/controls-defaults.d.ts +0 -0
- /package/dist/{typings → types}/constants/editor-interface-defaults/editors-defaults.d.ts +0 -0
- /package/dist/{typings → types}/constants/editor-interface-defaults/index.d.ts +0 -0
- /package/dist/{typings → types}/constants/editor-interface-defaults/sidebar-defaults.d.ts +0 -0
- /package/dist/{typings → types}/constants/editor-interface-defaults/types.d.ts +0 -0
- /package/dist/{typings → types}/create-adapter.d.ts +0 -0
- /package/dist/{typings → types}/create-app-definition-api.d.ts +0 -0
- /package/dist/{typings → types}/create-entry-api.d.ts +0 -0
- /package/dist/{typings → types}/create-environment-template-api.d.ts +0 -0
- /package/dist/{typings → types}/create-space-api.d.ts +0 -0
- /package/dist/{typings → types}/enhance-with-methods.d.ts +0 -0
- /package/dist/{typings → types}/entities/asset-key.d.ts +0 -0
- /package/dist/{typings → types}/entities/bulk-action.d.ts +0 -0
- /package/dist/{typings → types}/entities/concept-scheme.d.ts +0 -0
- /package/dist/{typings → types}/entities/concept.d.ts +0 -0
- /package/dist/{typings → types}/entities/content-type-fields.d.ts +0 -0
- /package/dist/{typings → types}/entities/field-type.d.ts +0 -0
- /package/dist/{typings → types}/entities/function-log.d.ts +0 -0
- /package/dist/{typings → types}/entities/function.d.ts +0 -0
- /package/dist/{typings → types}/entities/index.d.ts +0 -0
- /package/dist/{typings → types}/entities/release-action.d.ts +0 -0
- /package/dist/{typings → types}/entities/release.d.ts +0 -0
- /package/dist/{typings → types}/entities/utils.d.ts +0 -0
- /package/dist/{typings → types}/entities/widget-parameters.d.ts +0 -0
- /package/dist/{typings → types}/methods/action.d.ts +0 -0
- /package/dist/{typings → types}/methods/bulk-action.d.ts +0 -0
- /package/dist/{typings → types}/methods/content-type.d.ts +0 -0
- /package/dist/{typings → types}/methods/release-action.d.ts +0 -0
- /package/dist/{typings → types}/methods/utils.d.ts +0 -0
- /package/dist/{typings → types}/plain/as-iterator.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/ai-action-invocation.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/ai-action.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-access-token.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-action-call.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-action.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-bundle.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-definition.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-details.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-event-subscription.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-installation.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-key.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-signed-request.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-signing-secret.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/app-upload.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/comment.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/editor-interface.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/environment-alias.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/environment.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/extension.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/function-log.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/function.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/locale.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/oauth-application.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/organization.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/resource-provider.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/resource-type.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/resource.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/role.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/space-member.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/space-membership.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/space.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/tag.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/task.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/team-membership.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/team-space-membership.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/team.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/ui-config.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/upload.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/usage.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/user-ui-config.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/user.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/webhook.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/workflow-definition.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/workflow.d.ts +0 -0
- /package/dist/{typings → types}/plain/entities/workflows-changelog.d.ts +0 -0
- /package/dist/{typings → types}/plain/pagination-helper.d.ts +0 -0
- /package/dist/{typings → types}/plain/plain-client.d.ts +0 -0
- /package/dist/{typings → types}/plain/wrappers/wrap.d.ts +0 -0
- /package/dist/{typings → types}/plain/wrappers/wrap.test-d.d.ts +0 -0
- /package/dist/{typings → types}/upload-http-client.d.ts +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import copy from 'fast-copy';
|
|
2
|
+
import { get as get$1, post, put, del as del$1 } from './raw.js';
|
|
3
|
+
import { normalizeSelect } from './utils.js';
|
|
4
|
+
|
|
5
|
+
const getBaseUrl = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/extensions`;
|
|
6
|
+
const getExtensionUrl = (params) => getBaseUrl(params) + `/${params.extensionId}`;
|
|
7
|
+
const get = (http, params) => {
|
|
8
|
+
return get$1(http, getExtensionUrl(params), {
|
|
9
|
+
params: normalizeSelect(params.query),
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
const getMany = (http, params) => {
|
|
13
|
+
return get$1(http, getBaseUrl(params), {
|
|
14
|
+
params: normalizeSelect(params.query),
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
const create = (http, params, rawData, headers) => {
|
|
18
|
+
return post(http, getBaseUrl(params), rawData, { headers });
|
|
19
|
+
};
|
|
20
|
+
const createWithId = (http, params, rawData, headers) => {
|
|
21
|
+
const data = copy(rawData);
|
|
22
|
+
return put(http, getExtensionUrl(params), data, { headers });
|
|
23
|
+
};
|
|
24
|
+
const update = async (http, params, rawData, headers) => {
|
|
25
|
+
var _a;
|
|
26
|
+
const data = copy(rawData);
|
|
27
|
+
delete data.sys;
|
|
28
|
+
return put(http, getExtensionUrl(params), data, {
|
|
29
|
+
headers: Object.assign({ 'X-Contentful-Version': (_a = rawData.sys.version) !== null && _a !== void 0 ? _a : 0 }, headers),
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const del = (http, params) => {
|
|
33
|
+
return del$1(http, getExtensionUrl(params));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { create, createWithId, del, get, getExtensionUrl, getMany, update };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { get as get$1 } from './raw.js';
|
|
2
|
+
|
|
3
|
+
const FunctionLogAlphaHeaders = {
|
|
4
|
+
'x-contentful-enable-alpha-feature': 'function-logs',
|
|
5
|
+
};
|
|
6
|
+
const baseURL = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/app_installations/${params.appInstallationId}/functions/${params.functionId}/logs`;
|
|
7
|
+
const getURL = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/app_installations/${params.appInstallationId}/functions/${params.functionId}/logs/${params.logId}`;
|
|
8
|
+
const get = (http, params) => {
|
|
9
|
+
return get$1(http, getURL(params), {
|
|
10
|
+
headers: Object.assign({}, FunctionLogAlphaHeaders),
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
const getMany = (http, params) => {
|
|
14
|
+
return get$1(http, baseURL(params), {
|
|
15
|
+
params: params.query,
|
|
16
|
+
headers: Object.assign({}, FunctionLogAlphaHeaders),
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { get, getMany };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { get as get$1 } from './raw.js';
|
|
2
|
+
|
|
3
|
+
// Base URL
|
|
4
|
+
const getManyUrl = (params) => `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/functions`;
|
|
5
|
+
const getFunctionUrl = (params) => `${getManyUrl(params)}/${params.functionId}`;
|
|
6
|
+
const getFunctionsEnvURL = (params) => {
|
|
7
|
+
return `/spaces/${params.spaceId}/environments/${params.environmentId}/app_installations/${params.appInstallationId}/functions`;
|
|
8
|
+
};
|
|
9
|
+
const get = (http, params) => {
|
|
10
|
+
return get$1(http, getFunctionUrl(params));
|
|
11
|
+
};
|
|
12
|
+
const getMany = (http, params) => {
|
|
13
|
+
return get$1(http, getManyUrl(params), { params: params.query });
|
|
14
|
+
};
|
|
15
|
+
const getManyForEnvironment = (http, params) => {
|
|
16
|
+
return get$1(http, getFunctionsEnvURL(params), {
|
|
17
|
+
params: params.query,
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { get, getMany, getManyForEnvironment };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { get as get$1, post as post$1, put as put$1, patch as patch$1, del as del$1, http } from './raw.js';
|
|
2
|
+
|
|
3
|
+
const get = (http, { url, config }) => {
|
|
4
|
+
return get$1(http, url, config);
|
|
5
|
+
};
|
|
6
|
+
const post = (http, { url, config }, payload) => {
|
|
7
|
+
return post$1(http, url, payload, config);
|
|
8
|
+
};
|
|
9
|
+
const put = (http, { url, config }, payload) => {
|
|
10
|
+
return put$1(http, url, payload, config);
|
|
11
|
+
};
|
|
12
|
+
const patch = (http, { url, config }, payload) => {
|
|
13
|
+
return patch$1(http, url, payload, config);
|
|
14
|
+
};
|
|
15
|
+
const del = (http, { url, config }) => {
|
|
16
|
+
return del$1(http, url, config);
|
|
17
|
+
};
|
|
18
|
+
const request = (http$1, { url, config }) => {
|
|
19
|
+
return http(http$1, url, config);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { del, get, patch, post, put, request };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as aiAction from './ai-action.js';
|
|
2
|
+
import * as aiActionInvocation from './ai-action-invocation.js';
|
|
3
|
+
import * as accessToken from './access-token.js';
|
|
4
|
+
import * as apiKey from './api-key.js';
|
|
5
|
+
import * as appAccessToken from './app-access-token.js';
|
|
6
|
+
import * as appAction from './app-action.js';
|
|
7
|
+
import * as appActionCall from './app-action-call.js';
|
|
8
|
+
import * as appBundle from './app-bundle.js';
|
|
9
|
+
import * as appDefinition from './app-definition.js';
|
|
10
|
+
import * as appDetails from './app-details.js';
|
|
11
|
+
import * as appEventSubscription from './app-event-subscription.js';
|
|
12
|
+
import * as appInstallation from './app-installation.js';
|
|
13
|
+
import * as appKey from './app-key.js';
|
|
14
|
+
import * as appSignedRequest from './app-signed-request.js';
|
|
15
|
+
import * as appSigningSecret from './app-signing-secret.js';
|
|
16
|
+
import * as appUpload from './app-upload.js';
|
|
17
|
+
import * as asset from './asset.js';
|
|
18
|
+
import * as assetKey from './asset-key.js';
|
|
19
|
+
import * as bulkAction from './bulk-action.js';
|
|
20
|
+
import * as comment from './comment.js';
|
|
21
|
+
import * as concept from './concept.js';
|
|
22
|
+
import * as conceptScheme from './concept-scheme.js';
|
|
23
|
+
import * as contentType from './content-type.js';
|
|
24
|
+
import * as editorInterface from './editor-interface.js';
|
|
25
|
+
import * as entry from './entry.js';
|
|
26
|
+
import * as environment from './environment.js';
|
|
27
|
+
import * as environmentAlias from './environment-alias.js';
|
|
28
|
+
import * as environmentTemplate from './environment-template.js';
|
|
29
|
+
import * as environmentTemplateInstallation from './environment-template-installation.js';
|
|
30
|
+
import * as extension from './extension.js';
|
|
31
|
+
import * as _function from './function.js';
|
|
32
|
+
import * as functionLog from './function-log.js';
|
|
33
|
+
import * as http from './http.js';
|
|
34
|
+
import * as locale from './locale.js';
|
|
35
|
+
import * as organization from './organization.js';
|
|
36
|
+
import * as organizationInvitation from './organization-invitation.js';
|
|
37
|
+
import * as organizationMembership from './organization-membership.js';
|
|
38
|
+
import * as oauthApplication from './oauth-application.js';
|
|
39
|
+
import * as personalAccessToken from './personal-access-token.js';
|
|
40
|
+
import * as previewApiKey from './preview-api-key.js';
|
|
41
|
+
import * as release from './release.js';
|
|
42
|
+
import * as releaseAction from './release-action.js';
|
|
43
|
+
import * as resource from './resource.js';
|
|
44
|
+
import * as resourceProvider from './resource-provider.js';
|
|
45
|
+
import * as resourceType from './resource-type.js';
|
|
46
|
+
import * as role from './role.js';
|
|
47
|
+
import * as scheduledAction from './scheduled-action.js';
|
|
48
|
+
import * as snapshot from './snapshot.js';
|
|
49
|
+
import * as space from './space.js';
|
|
50
|
+
import * as spaceMember from './space-member.js';
|
|
51
|
+
import * as spaceMembership from './space-membership.js';
|
|
52
|
+
import * as tag from './tag.js';
|
|
53
|
+
import * as task from './task.js';
|
|
54
|
+
import * as team from './team.js';
|
|
55
|
+
import * as teamMembership from './team-membership.js';
|
|
56
|
+
import * as teamSpaceMembership from './team-space-membership.js';
|
|
57
|
+
import * as uiConfig from './ui-config.js';
|
|
58
|
+
import * as upload from './upload.js';
|
|
59
|
+
import * as uploadCredentials from './upload-credentials.js';
|
|
60
|
+
import * as usage from './usage.js';
|
|
61
|
+
import * as user from './user.js';
|
|
62
|
+
import * as userUiConfig from './user-ui-config.js';
|
|
63
|
+
import * as webhook from './webhook.js';
|
|
64
|
+
import * as workflow from './workflow.js';
|
|
65
|
+
import * as workflowDefinition from './workflow-definition.js';
|
|
66
|
+
import * as workflowsChangelog from './workflows-changelog.js';
|
|
67
|
+
|
|
68
|
+
var endpoints = {
|
|
69
|
+
AiAction: aiAction,
|
|
70
|
+
AiActionInvocation: aiActionInvocation,
|
|
71
|
+
ApiKey: apiKey,
|
|
72
|
+
AppAction: appAction,
|
|
73
|
+
AppActionCall: appActionCall,
|
|
74
|
+
AppBundle: appBundle,
|
|
75
|
+
AppDefinition: appDefinition,
|
|
76
|
+
AppInstallation: appInstallation,
|
|
77
|
+
AppUpload: appUpload,
|
|
78
|
+
AppSignedRequest: appSignedRequest,
|
|
79
|
+
AppSigningSecret: appSigningSecret,
|
|
80
|
+
AppEventSubscription: appEventSubscription,
|
|
81
|
+
AppKey: appKey,
|
|
82
|
+
AppAccessToken: appAccessToken,
|
|
83
|
+
AppDetails: appDetails,
|
|
84
|
+
Asset: asset,
|
|
85
|
+
AssetKey: assetKey,
|
|
86
|
+
BulkAction: bulkAction,
|
|
87
|
+
Comment: comment,
|
|
88
|
+
Concept: concept,
|
|
89
|
+
ConceptScheme: conceptScheme,
|
|
90
|
+
ContentType: contentType,
|
|
91
|
+
EditorInterface: editorInterface,
|
|
92
|
+
Entry: entry,
|
|
93
|
+
Environment: environment,
|
|
94
|
+
EnvironmentAlias: environmentAlias,
|
|
95
|
+
EnvironmentTemplate: environmentTemplate,
|
|
96
|
+
EnvironmentTemplateInstallation: environmentTemplateInstallation,
|
|
97
|
+
Extension: extension,
|
|
98
|
+
Function: _function,
|
|
99
|
+
FunctionLog: functionLog,
|
|
100
|
+
Http: http,
|
|
101
|
+
Locale: locale,
|
|
102
|
+
Organization: organization,
|
|
103
|
+
OrganizationInvitation: organizationInvitation,
|
|
104
|
+
OrganizationMembership: organizationMembership,
|
|
105
|
+
OAuthApplication: oauthApplication,
|
|
106
|
+
PersonalAccessToken: personalAccessToken,
|
|
107
|
+
AccessToken: accessToken,
|
|
108
|
+
PreviewApiKey: previewApiKey,
|
|
109
|
+
Release: release,
|
|
110
|
+
ReleaseAction: releaseAction,
|
|
111
|
+
Resource: resource,
|
|
112
|
+
ResourceProvider: resourceProvider,
|
|
113
|
+
ResourceType: resourceType,
|
|
114
|
+
Role: role,
|
|
115
|
+
ScheduledAction: scheduledAction,
|
|
116
|
+
Snapshot: snapshot,
|
|
117
|
+
Space: space,
|
|
118
|
+
SpaceMember: spaceMember,
|
|
119
|
+
SpaceMembership: spaceMembership,
|
|
120
|
+
Tag: tag,
|
|
121
|
+
Task: task,
|
|
122
|
+
Team: team,
|
|
123
|
+
TeamMembership: teamMembership,
|
|
124
|
+
TeamSpaceMembership: teamSpaceMembership,
|
|
125
|
+
UIConfig: uiConfig,
|
|
126
|
+
Upload: upload,
|
|
127
|
+
UploadCredential: uploadCredentials,
|
|
128
|
+
Usage: usage,
|
|
129
|
+
User: user,
|
|
130
|
+
UserUIConfig: userUiConfig,
|
|
131
|
+
Webhook: webhook,
|
|
132
|
+
WorkflowDefinition: workflowDefinition,
|
|
133
|
+
Workflow: workflow,
|
|
134
|
+
WorkflowsChangelog: workflowsChangelog,
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export { endpoints as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import copy from 'fast-copy';
|
|
2
|
+
import { get as get$1, post, put, del as del$1 } from './raw.js';
|
|
3
|
+
import { normalizeSelect } from './utils.js';
|
|
4
|
+
|
|
5
|
+
const get = (http, params) => {
|
|
6
|
+
return get$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/locales/${params.localeId}`);
|
|
7
|
+
};
|
|
8
|
+
const getMany = (http, params) => {
|
|
9
|
+
return get$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/locales`, {
|
|
10
|
+
params: normalizeSelect(params.query),
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
const create = (http, params, data, headers) => {
|
|
14
|
+
return post(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/locales`, data, {
|
|
15
|
+
headers,
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const update = (http, params, rawData, headers) => {
|
|
19
|
+
var _a;
|
|
20
|
+
const data = copy(rawData);
|
|
21
|
+
delete data.sys;
|
|
22
|
+
delete data.default; // we should not send this back
|
|
23
|
+
return put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/locales/${params.localeId}`, data, {
|
|
24
|
+
headers: Object.assign(Object.assign({}, headers), { 'X-Contentful-Version': (_a = rawData.sys.version) !== null && _a !== void 0 ? _a : 0 }),
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const del = (http, params) => {
|
|
28
|
+
return del$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/locales/${params.localeId}`);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { create, del, get, getMany, update };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { get as get$1, post, put, del as del$1 } from './raw.js';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Retrieves details of a specific OAuth application. by its unique user ID and oauth application ID.
|
|
4
5
|
*
|
|
@@ -21,10 +22,9 @@ import * as raw from './raw';
|
|
|
21
22
|
* .catch(console.error)
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
const get = (http, params) => {
|
|
26
|
+
return get$1(http, `/users/${params.userId}/oauth_applications/${params.oauthApplicationId}`);
|
|
26
27
|
};
|
|
27
|
-
|
|
28
28
|
/**
|
|
29
29
|
* Retrieves a list of OAuth applications associated with the current user.
|
|
30
30
|
*
|
|
@@ -47,12 +47,11 @@ export const get = (http, params) => {
|
|
|
47
47
|
* .catch(console.error)
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
const getManyForUser = (http, params) => {
|
|
51
|
+
return get$1(http, `/users/${params.userId}/oauth_applications`, {
|
|
52
|
+
params: params.query,
|
|
53
|
+
});
|
|
54
54
|
};
|
|
55
|
-
|
|
56
55
|
/**
|
|
57
56
|
* Creates a new OAuth application for current authenticated user.
|
|
58
57
|
*
|
|
@@ -78,12 +77,11 @@ export const getManyForUser = (http, params) => {
|
|
|
78
77
|
* .catch(console.error)
|
|
79
78
|
* ```
|
|
80
79
|
*/
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
const create = (http, params, rawData, headers) => {
|
|
81
|
+
return post(http, `/users/${params.userId}/oauth_applications`, rawData, {
|
|
82
|
+
headers,
|
|
83
|
+
});
|
|
85
84
|
};
|
|
86
|
-
|
|
87
85
|
/**
|
|
88
86
|
* Updates details of a specific OAuth application.
|
|
89
87
|
*
|
|
@@ -109,12 +107,11 @@ export const create = (http, params, rawData, headers) => {
|
|
|
109
107
|
* .catch(console.error)
|
|
110
108
|
* ```
|
|
111
109
|
*/
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
const update = (http, params, rawData, headers) => {
|
|
111
|
+
return put(http, `/users/${params.userId}/oauth_applications/${params.oauthApplicationId}`, rawData, {
|
|
112
|
+
headers,
|
|
113
|
+
});
|
|
116
114
|
};
|
|
117
|
-
|
|
118
115
|
/**
|
|
119
116
|
* Deletes a specific OAuth application.
|
|
120
117
|
*
|
|
@@ -137,6 +134,8 @@ export const update = (http, params, rawData, headers) => {
|
|
|
137
134
|
* .catch(console.error)
|
|
138
135
|
* ```
|
|
139
136
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
};
|
|
137
|
+
const del = (http, params) => {
|
|
138
|
+
return del$1(http, `/users/${params.userId}/oauth_applications/${params.oauthApplicationId}`);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export { create, del, get, getManyForUser, update };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { post, get as get$1 } from './raw.js';
|
|
2
|
+
|
|
3
|
+
const OrganizationUserManagementAlphaHeaders = {
|
|
4
|
+
'x-contentful-enable-alpha-feature': 'organization-user-management-api',
|
|
5
|
+
};
|
|
6
|
+
const InvitationAlphaHeaders = {
|
|
7
|
+
'x-contentful-enable-alpha-feature': 'pending-org-membership',
|
|
8
|
+
};
|
|
9
|
+
const create = (http, params, data, headers) => {
|
|
10
|
+
return post(http, `/organizations/${params.organizationId}/invitations`, data, {
|
|
11
|
+
headers: Object.assign(Object.assign({}, InvitationAlphaHeaders), headers),
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
const get = (http, params, headers) => {
|
|
15
|
+
return get$1(http, `/organizations/${params.organizationId}/invitations/${params.invitationId}`, {
|
|
16
|
+
headers: Object.assign(Object.assign({}, OrganizationUserManagementAlphaHeaders), headers),
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { create, get };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import copy from 'fast-copy';
|
|
2
|
+
import { get as get$1, put, del as del$1 } from './raw.js';
|
|
3
|
+
|
|
4
|
+
const getBaseUrl = (params) => `/organizations/${params.organizationId}/organization_memberships`;
|
|
5
|
+
const getEntityUrl = (params) => `${getBaseUrl(params)}/${params.organizationMembershipId}`;
|
|
6
|
+
const get = (http, params) => {
|
|
7
|
+
return get$1(http, getEntityUrl(params));
|
|
8
|
+
};
|
|
9
|
+
const getMany = (http, params) => {
|
|
10
|
+
return get$1(http, getBaseUrl(params), {
|
|
11
|
+
params: params.query,
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
const update = (http, params, rawData, headers) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const data = copy(rawData);
|
|
17
|
+
delete data.sys;
|
|
18
|
+
const { role } = data;
|
|
19
|
+
return put(http, getEntityUrl(params), { role }, {
|
|
20
|
+
headers: Object.assign(Object.assign({}, headers), { 'X-Contentful-Version': (_a = rawData.sys.version) !== null && _a !== void 0 ? _a : 0 }),
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const del = (http, params) => {
|
|
24
|
+
return del$1(http, getEntityUrl(params));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { del, get, getMany, update };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { get as get$1 } from './raw.js';
|
|
2
|
+
|
|
3
|
+
const getMany = (http, params) => {
|
|
4
|
+
return get$1(http, `/organizations`, {
|
|
5
|
+
params: params === null || params === void 0 ? void 0 : params.query,
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
const get = (http, params) => {
|
|
9
|
+
return getMany(http, { query: { limit: 100 } }).then((data) => {
|
|
10
|
+
const org = data.items.find((org) => org.sys.id === params.organizationId);
|
|
11
|
+
if (!org) {
|
|
12
|
+
const error = new Error(`No organization was found with the ID ${params.organizationId} instead got ${JSON.stringify(data)}`);
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
error.status = 404;
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
error.statusText = 'Not Found';
|
|
19
|
+
return Promise.reject(error);
|
|
20
|
+
}
|
|
21
|
+
return org;
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { get, getMany };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { get as get$1, post, put } from './raw.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated use `access-token.get` instead `personal-access-token.get`
|
|
5
|
+
*/
|
|
6
|
+
const get = (http, params) => {
|
|
7
|
+
return get$1(http, `/users/me/access_tokens/${params.tokenId}`);
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated use `access-token.getMany` instead `personal-access-token.getMany`
|
|
11
|
+
*/
|
|
12
|
+
const getMany = (http, params) => {
|
|
13
|
+
return get$1(http, '/users/me/access_tokens', {
|
|
14
|
+
params: params.query,
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated use `access-token.createPersonalAccessToken` instead. `personal-access-token.create`
|
|
19
|
+
*/
|
|
20
|
+
const create = (http, _params, rawData, headers) => {
|
|
21
|
+
return post(http, '/users/me/access_tokens', rawData, {
|
|
22
|
+
headers,
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated use `access-token.rovoke` instead. `personal-access-token.revoke`
|
|
27
|
+
*/
|
|
28
|
+
const revoke = (http, params) => {
|
|
29
|
+
return put(http, `/users/me/access_tokens/${params.tokenId}/revoked`, null);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { create, get, getMany, revoke };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { get as get$1 } from './raw.js';
|
|
2
|
+
|
|
3
|
+
const get = (http, params) => {
|
|
4
|
+
return get$1(http, `/spaces/${params.spaceId}/preview_api_keys/${params.previewApiKeyId}`);
|
|
5
|
+
};
|
|
6
|
+
const getMany = (http, params) => {
|
|
7
|
+
return get$1(http, `/spaces/${params.spaceId}/preview_api_keys`, {
|
|
8
|
+
params: params.query,
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { get, getMany };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { errorHandler } from 'contentful-sdk-core';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4
|
+
function getBaseUrl(http) {
|
|
5
|
+
var _a;
|
|
6
|
+
return (_a = http.defaults.baseURL) === null || _a === void 0 ? void 0 : _a.split('/spaces')[0];
|
|
7
|
+
}
|
|
8
|
+
function get(http, url, config) {
|
|
9
|
+
return http
|
|
10
|
+
.get(url, Object.assign({ baseURL: getBaseUrl(http) }, config))
|
|
11
|
+
.then((response) => response.data, errorHandler);
|
|
12
|
+
}
|
|
13
|
+
function patch(http, url, payload, config) {
|
|
14
|
+
return http
|
|
15
|
+
.patch(url, payload, Object.assign({ baseURL: getBaseUrl(http) }, config))
|
|
16
|
+
.then((response) => response.data, errorHandler);
|
|
17
|
+
}
|
|
18
|
+
function post(http, url, payload, config) {
|
|
19
|
+
return http
|
|
20
|
+
.post(url, payload, Object.assign({ baseURL: getBaseUrl(http) }, config))
|
|
21
|
+
.then((response) => response.data, errorHandler);
|
|
22
|
+
}
|
|
23
|
+
function put(http, url, payload, config) {
|
|
24
|
+
return http
|
|
25
|
+
.put(url, payload, Object.assign({ baseURL: getBaseUrl(http) }, config))
|
|
26
|
+
.then((response) => response.data, errorHandler);
|
|
27
|
+
}
|
|
28
|
+
function del(http, url, config) {
|
|
29
|
+
return http
|
|
30
|
+
.delete(url, Object.assign({ baseURL: getBaseUrl(http) }, config))
|
|
31
|
+
.then((response) => response.data, errorHandler);
|
|
32
|
+
}
|
|
33
|
+
function http(http, url, config) {
|
|
34
|
+
return http(url, Object.assign({ baseURL: getBaseUrl(http) }, config)).then((response) => response.data, errorHandler);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { del, get, http, patch, post, put };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { get as get$1 } from './raw.js';
|
|
2
|
+
|
|
3
|
+
const get = (http, params) => {
|
|
4
|
+
return get$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/actions/${params.actionId}`);
|
|
5
|
+
};
|
|
6
|
+
const getMany = (http, params) => {
|
|
7
|
+
return get$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/release_actions`, {
|
|
8
|
+
params: params.query,
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
const queryForRelease = (http, params) => {
|
|
12
|
+
return get$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/release_actions`, {
|
|
13
|
+
params: Object.assign({ 'sys.release.sys.id[in]': params.releaseId }, params.query),
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { get, getMany, queryForRelease };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { get as get$1, post, put, del as del$1 } from './raw.js';
|
|
2
|
+
|
|
3
|
+
const get = (http, params) => {
|
|
4
|
+
return get$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}`);
|
|
5
|
+
};
|
|
6
|
+
const query = (http, params) => {
|
|
7
|
+
return get$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases`, {
|
|
8
|
+
params: params.query,
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
const create = (http, params, payload) => {
|
|
12
|
+
return post(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases`, payload);
|
|
13
|
+
};
|
|
14
|
+
const update = (http, params, payload, headers) => {
|
|
15
|
+
return put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}`, payload, {
|
|
16
|
+
headers: Object.assign({ 'X-Contentful-Version': params.version }, headers),
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const del = (http, params) => {
|
|
20
|
+
return del$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}`);
|
|
21
|
+
};
|
|
22
|
+
const publish = (http, params, headers) => {
|
|
23
|
+
return put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/published`, null, {
|
|
24
|
+
headers: Object.assign({ 'X-Contentful-Version': params.version }, headers),
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const unpublish = (http, params, headers) => {
|
|
28
|
+
return del$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/published`, {
|
|
29
|
+
headers: Object.assign({ 'X-Contentful-Version': params.version }, headers),
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const validate = (http, params, payload) => {
|
|
33
|
+
return post(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/validate`, payload);
|
|
34
|
+
};
|
|
35
|
+
const archive = (http, params) => {
|
|
36
|
+
return put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/archived`, null, {
|
|
37
|
+
headers: {
|
|
38
|
+
'X-Contentful-Version': params.version,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const unarchive = (http, params) => {
|
|
43
|
+
return del$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/archived`, {
|
|
44
|
+
headers: {
|
|
45
|
+
'X-Contentful-Version': params.version,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { archive, create, del, get, publish, query, unarchive, unpublish, update, validate };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { get as get$1, put, del as del$1 } from './raw.js';
|
|
2
|
+
|
|
3
|
+
const getBaseUrl = (params) => `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/resource_provider`;
|
|
4
|
+
const get = (http, params) => {
|
|
5
|
+
return get$1(http, getBaseUrl(params));
|
|
6
|
+
};
|
|
7
|
+
const upsert = (http, params, rawData, headers) => {
|
|
8
|
+
return put(http, getBaseUrl(params), rawData, { headers });
|
|
9
|
+
};
|
|
10
|
+
const del = (http, params) => {
|
|
11
|
+
return del$1(http, getBaseUrl(params));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { del, get, upsert };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { get as get$1, put, del as del$1 } from './raw.js';
|
|
2
|
+
import copy from 'fast-copy';
|
|
3
|
+
|
|
4
|
+
const getBaseUrl = (params) => `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/resource_provider/resource_types`;
|
|
5
|
+
const getEntityUrl = (params) => `${getBaseUrl(params)}/${params.resourceTypeId}`;
|
|
6
|
+
const getSpaceEnvUrl = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/resource_types`;
|
|
7
|
+
const get = (http, params) => {
|
|
8
|
+
return get$1(http, getEntityUrl(params));
|
|
9
|
+
};
|
|
10
|
+
const upsert = (http, params, rawData, headers) => {
|
|
11
|
+
const data = copy(rawData);
|
|
12
|
+
return put(http, getEntityUrl(params), data, { headers });
|
|
13
|
+
};
|
|
14
|
+
const del = (http, params) => {
|
|
15
|
+
return del$1(http, getEntityUrl(params));
|
|
16
|
+
};
|
|
17
|
+
const getMany = (http, params) => {
|
|
18
|
+
return get$1(http, getBaseUrl(params));
|
|
19
|
+
};
|
|
20
|
+
const getForEnvironment = (http, params) => {
|
|
21
|
+
return get$1(http, getSpaceEnvUrl(params));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { del, get, getForEnvironment, getMany, upsert };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { get } from './raw.js';
|
|
2
|
+
|
|
3
|
+
const getBaseUrl = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/resource_types/${params.resourceTypeId}/resources`;
|
|
4
|
+
const getMany = (http, params) => get(http, getBaseUrl(params), {
|
|
5
|
+
params: params.query,
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export { getMany };
|