From cbee1c765c728862a884645f8f1036acfa534479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Fri, 28 Feb 2025 15:11:59 +0100 Subject: [PATCH 01/11] fix: upgrade typedoc, include missing types and plenty of tsdoc fixes --- README.md | 55 +- lib/adapters/REST/endpoints/access-token.ts | 15 +- .../REST/endpoints/oauth-application.ts | 15 +- lib/create-app-definition-api.ts | 24 +- lib/create-contentful-api.ts | 57 +- lib/create-entry-api.ts | 33 +- lib/create-environment-api.ts | 171 ++++-- lib/create-environment-template-api.ts | 3 +- lib/create-organization-api.ts | 129 +++-- lib/create-space-api.ts | 138 +++-- lib/create-ui-config-api.ts | 3 +- lib/create-user-ui-config-api.ts | 3 +- lib/entities/access-token.ts | 3 +- lib/entities/api-key.ts | 6 +- lib/entities/app-action.ts | 3 +- lib/entities/app-bundle.ts | 3 +- lib/entities/app-details.ts | 3 +- lib/entities/app-event-subscription.ts | 3 +- lib/entities/app-installation.ts | 6 +- lib/entities/app-key.ts | 3 +- lib/entities/app-signing-secret.ts | 3 +- lib/entities/app-upload.ts | 3 +- lib/entities/asset.ts | 26 +- lib/entities/content-type.ts | 21 +- lib/entities/environment-alias.ts | 4 - lib/entities/extension.ts | 6 +- lib/entities/locale.ts | 6 +- lib/entities/organization-membership.ts | 3 +- lib/entities/personal-access-token.ts | 3 +- lib/entities/release-action.ts | 2 +- lib/entities/release.ts | 8 +- lib/entities/resource-provider.ts | 6 +- lib/entities/resource-type.ts | 6 +- lib/entities/role.ts | 8 +- lib/entities/scheduled-action.ts | 6 +- lib/entities/space-membership.ts | 6 +- lib/entities/team-membership.ts | 6 +- lib/entities/team-space-membership.ts | 6 +- lib/entities/team.ts | 6 +- lib/entities/workflow.ts | 2 +- lib/methods/action.ts | 6 +- lib/plain/entities/comment.ts | 8 +- lib/plain/entities/function-log.ts | 4 - lib/plain/entities/function.ts | 7 - lib/plain/entities/space-member.ts | 6 +- lib/plain/entities/space-membership.ts | 24 +- lib/plain/entities/space.ts | 18 +- lib/plain/entities/workflow-definition.ts | 2 +- package-lock.json | 511 ++---------------- package.json | 11 +- typedoc.json | 29 + 51 files changed, 663 insertions(+), 776 deletions(-) create mode 100644 typedoc.json diff --git a/README.md b/README.md index 08fb34c31f..88098c544d 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@

Readme · Setup · - Migration · Changelog · Contributing

@@ -42,29 +41,47 @@ -- [Features](#features) -- [Supported Environments](#supported-environments) -- [Getting Started](#getting-started) +- [Getting started](#getting-started) - [Installation](#installation) - - [Node](#node) - - [Browser](#browser-bundle-in-script-tag) - - [Typings](#typings) + - [Node:](#node) + - [Browser bundle in script tag:](#browser-bundle-in-script-tag) + - [Typings](#typings) - [Authentication](#authentication) - [Using ES6 import](#using-es6-import) - - [Your first Request](#your-first-request) + - [Using CommonJS require imports](#using-commonjs-require-imports) + - [Your first request](#your-first-request) - [Legacy Client Interface](#legacy-client-interface) -- [App Framework](#app-framework) -- [Troubleshooting](#troubleshooting) -- [Documentation/References](#documentationreferences) + - [App Framework](#app-framework) + - [Troubleshooting](#troubleshooting) + - [Documentation/References](#documentationreferences) - [Configuration](#configuration) - - [Reference Documentation](#reference-documentation) - - [Contentful Javascript resources](#contentful-javascript-resources) - - [REST API reference](#rest-api-reference) -- [Versioning](#versioning) -- [Reach out to us](#reach-out-to-us) -- [Get involved](#get-involved) -- [License](#license) -- [Code of Conduct](#code-of-conduct) + - [accessToken (required, when `apiAdapter` is not set)](#accesstoken-required-when-apiadapter-is-not-set) + - [host (default: `'api.contentful.com'`)](#host-default-apicontentfulcom) + - [hostUpload (default: `'upload.contentful.com'`)](#hostupload-default-uploadcontentfulcom) + - [basePath (default: \`\`)](#basepath-default-) + - [httpAgent (default: `undefined`)](#httpagent-default-undefined) + - [httpsAgent (default: `undefined`)](#httpsagent-default-undefined) + - [headers (default: `{}`)](#headers-default-) + - [proxy (default: `undefined`)](#proxy-default-undefined) + - [retryOnError (default: `true`)](#retryonerror-default-true) + - [logHandler (default: `function (level, data) {}`)](#loghandler-default-function-level-data-) + - [requestLogger (default: `function (config) {}`)](#requestlogger-default-function-config-) + - [responseLogger (default: `function (response) {}`)](#responselogger-default-function-response-) + - [apiAdapter (default: `new RestAdapter(configuration)`)](#apiadapter-default-new-restadapterconfiguration) + - [throttle (default: `0`)](#throttle-default-0) + - [Reference documentation](#reference-documentation) + - [Contentful JavaScript resources](#contentful-javascript-resources) + - [REST API reference](#rest-api-reference) + - [Versioning](#versioning) + - [Experimental features](#experimental-features) + - [Current experimental features](#current-experimental-features) + - [Reach out to us](#reach-out-to-us) + - [You have questions about how to use this library?](#you-have-questions-about-how-to-use-this-library) + - [You found a bug or want to propose a feature?](#you-found-a-bug-or-want-to-propose-a-feature) + - [You need to share confidential information or have other questions?](#you-need-to-share-confidential-information-or-have-other-questions) + - [Get involved](#get-involved) + - [License](#license) + - [Code of Conduct](#code-of-conduct) diff --git a/lib/adapters/REST/endpoints/access-token.ts b/lib/adapters/REST/endpoints/access-token.ts index 57b1abc66f..3f7e478f77 100644 --- a/lib/adapters/REST/endpoints/access-token.ts +++ b/lib/adapters/REST/endpoints/access-token.ts @@ -15,7 +15,8 @@ import * as raw from './raw' * @param {Object} params - Parameters for the request. * @param {string} params.tokenId - The unique token ID of the access token to retrieve. * @returns {Promise} A Promise that resolves with the retrieved access token information. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( @@ -42,7 +43,8 @@ export const get: RestEndpoint<'AccessToken', 'get'> = ( * @param {AxiosInstance} http - An Axios HTTP client instance. * @param {QueryParams} params - Query parameters to filter and customize the request. * @returns {Promise>} A Promise that resolves with a collection of access token properties. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( @@ -73,7 +75,8 @@ export const getMany: RestEndpoint<'AccessToken', 'getMany'> = ( * @param {CreatePersonalAccessTokenProps} rawData - Data for creating the personal access token. * @param {RawAxiosRequestHeaders} [headers] - Optional HTTP headers for the request. * @returns {Promise} A Promise that resolves with the created personal access token. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( @@ -105,7 +108,8 @@ export const createPersonalAccessToken: RestEndpoint<'AccessToken', 'createPerso * @param {Object} params - The parameters for revoking the access token. * @param {string} params.tokenId - The unique identifier of the access token to revoke. * @returns {Promise} A Promise that resolves with the updated access token information after revocation. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( @@ -133,7 +137,8 @@ export const revoke: RestEndpoint<'AccessToken', 'revoke'> = ( * @param {GetOrganizationParams & QueryParams} params - Parameters for the request, including organization ID and query parameters. * @param {string} params.organizationId - The unique identifier of the organization. * @returns {Promise>} A promise that resolves to a collection of access tokens. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( diff --git a/lib/adapters/REST/endpoints/oauth-application.ts b/lib/adapters/REST/endpoints/oauth-application.ts index 7b65b1c177..473a5b7bc0 100644 --- a/lib/adapters/REST/endpoints/oauth-application.ts +++ b/lib/adapters/REST/endpoints/oauth-application.ts @@ -22,7 +22,8 @@ import type { * @param {string} params.userId - The unique user ID of the user. * @param {string} params.oauthApplicationId - The unique application ID of the OAuth application. * @returns {Promise} A Promise that resolves with the retrieved OAuth Application. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( @@ -54,7 +55,8 @@ export const get: RestEndpoint<'OAuthApplication', 'get'> = ( * @param {string} params.userId - The unique user ID of the user. * @param {QueryParams} params - Query parameters to filter and customize the request. * @returns {Promise>} A Promise that resolves with a collection of oauth application properties. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( @@ -89,7 +91,8 @@ export const getManyForUser: RestEndpoint<'OAuthApplication', 'getManyForUser'> * @param {string} params.userId - The unique user ID of the user. * @param {RawAxiosRequestHeaders} [headers] - Optional HTTP headers for the request. * @returns {Promise} A Promise that resolves with the created oauth application. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( @@ -130,7 +133,8 @@ export const create: RestEndpoint<'OAuthApplication', 'create'> = ( * @param {string} params.userId - The unique user ID of the user. * @param {string} params.oauthApplicationId - The unique application ID of the OAuth application. * @returns {Promise} A Promise that resolves with the updated oauth application. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( @@ -171,7 +175,8 @@ export const update: RestEndpoint<'OAuthApplication', 'update'> = ( * @param {string} params.userId - The unique user ID of the user. * @param {string} params.oauthApplicationId - The unique application ID of the OAuth application. * @returns {Promise} - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const plainClient = contentful.createClient( diff --git a/lib/create-app-definition-api.ts b/lib/create-app-definition-api.ts index 892041ef8a..b8acaa8f5b 100644 --- a/lib/create-app-definition-api.ts +++ b/lib/create-app-definition-api.ts @@ -24,7 +24,8 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -55,7 +56,8 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -82,7 +84,8 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { * Gets an app bundle * @param id - AppBundle ID * @return Promise for an AppBundle - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -111,7 +114,8 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { /** * Gets a collection of AppBundles * @return Promise for a collection of AppBundles - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -137,7 +141,8 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { * Creates an app bundle * @param Object representation of the App Bundle to be created * @return Promise for the newly created AppBundle - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -166,7 +171,8 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { * Gets a list of App Installations across an org for given organization and App Definition * If a spaceId is provided in the query object, it will return the App Installations for that specific space. * @return Promise for the newly created AppBundle - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -195,7 +201,8 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { * Creates or updates a resource provider * @param data representation of the ResourceProvider * @return Promise for the newly created or updated ResourceProvider - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -236,7 +243,8 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { /** * Gets a Resource Provider * @return Promise for a Resource Provider - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' diff --git a/lib/create-contentful-api.ts b/lib/create-contentful-api.ts index bd71bc6304..d7c83cdd50 100644 --- a/lib/create-contentful-api.ts +++ b/lib/create-contentful-api.ts @@ -82,6 +82,7 @@ export default function createClientApi(makeRequest: MakeRequest) { }, /** * Gets the lasted version environment template if params.version is not specified + * @param params * @param params.organizationId - Organization ID * @param params.environmentTemplateId - Environment template ID * @param [params.version] - Template version number to return a specific version of the environment template @@ -96,7 +97,7 @@ export default function createClientApi(makeRequest: MakeRequest) { * client.getEnvironmentTemplate({ * organizationId: '', * environmentTemplateId: '', - * version: version> + * version: * }) * .then((space) => console.log(space)) * .catch(console.error) @@ -127,7 +128,8 @@ export default function createClientApi(makeRequest: MakeRequest) { * @param organizationId - Organization ID * @param environmentTemplateData - Object representation of the environment template to be created * @return Promise for the newly created EnvironmentTemplate - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -204,7 +206,8 @@ export default function createClientApi(makeRequest: MakeRequest) { * @param spaceData - Object representation of the Space to be created * @param organizationId - Organization ID, if the associated token can manage more than one organization. * @return Promise for the newly created Space - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -234,7 +237,8 @@ export default function createClientApi(makeRequest: MakeRequest) { * Gets an organization * @param id - Organization ID * @return Promise for a Organization - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -257,7 +261,8 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets a collection of Organizations * @return Promise for a collection of Organizations - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -282,7 +287,8 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets the authenticated user * @return Promise for a User - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -306,7 +312,8 @@ export default function createClientApi(makeRequest: MakeRequest) { * * @param params * @returns Promise of a OAuthApplication - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -334,7 +341,8 @@ export default function createClientApi(makeRequest: MakeRequest) { * * @param params * @returns Promise of list of user's OAuthApplications - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -360,7 +368,8 @@ export default function createClientApi(makeRequest: MakeRequest) { * * @param params * @returns Promise of a new OAuth application. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -391,9 +400,8 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets App Definition * @return Promise for App Definition - * @param organizationId - Id of the organization where the app is installed - * @param appDefinitionId - Id of the app that will be returned - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -420,7 +428,8 @@ export default function createClientApi(makeRequest: MakeRequest) { * Creates a personal access token * @param data - personal access token config * @return Promise for a Token - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -458,9 +467,10 @@ export default function createClientApi(makeRequest: MakeRequest) { * @deprecated - use getAccessToken instead * * Gets a personal access token - * @param data - personal access token config + * @param tokenId - personal access token config * @return Promise for a Token - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -485,7 +495,8 @@ export default function createClientApi(makeRequest: MakeRequest) { * * Gets all personal access tokens * @return Promise for a Token - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -507,9 +518,10 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets a users access token - * @param data - users access token config + * @param tokenId - users access token config * @return Promise for a Token - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -532,7 +544,8 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets all user access tokens * @return Promise for a Token - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -556,7 +569,8 @@ export default function createClientApi(makeRequest: MakeRequest) { * Retrieves a list of redacted versions of access tokens for an organization, accessible to owners or administrators of an organization. * * @return Promise for a Token - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -585,7 +599,8 @@ export default function createClientApi(makeRequest: MakeRequest) { * @param organizationId - Id of an organization * @param query - Query parameters * @return Promise of a collection of usages - * @example ```javascript + * @example + * ```javascript * * const contentful = require('contentful-management') * diff --git a/lib/create-entry-api.ts b/lib/create-entry-api.ts index f11dbf9f35..3ec68a8707 100644 --- a/lib/create-entry-api.ts +++ b/lib/create-entry-api.ts @@ -36,7 +36,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -68,7 +69,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Sends an JSON patch to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -106,7 +108,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -130,7 +133,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Publishes the object * @return Object returned from the server with updated metadata. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -159,7 +163,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Unpublishes the object * @return Object returned from the server with updated metadata. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -188,7 +193,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Archives the object * @return Object returned from the server with updated metadata. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -216,7 +222,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Unarchives the object * @return Object returned from the server with updated metadata. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -243,7 +250,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Gets all snapshots of an entry - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -271,7 +279,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Gets a snapshot of an entry * @param snapshotId - Id of the snapshot - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -300,7 +309,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { * Creates a new comment for an entry * @param data Object representation of the Comment to be created * @returns Promise for the newly created Comment - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -391,7 +401,8 @@ export default function createEntryApi(makeRequest: MakeRequest) { * Creates a new task for an entry * @param data Object representation of the Task to be created * @returns Promise for the newly created Task - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/create-environment-api.ts b/lib/create-environment-api.ts index 4739b8b988..210a873d1f 100644 --- a/lib/create-environment-api.ts +++ b/lib/create-environment-api.ts @@ -93,7 +93,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Deletes the environment * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -120,7 +121,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Updates the environment * @return Promise for the updated environment. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -152,7 +154,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates SDK Entry object (locally) from entry data * @param entryData - Entry Data * @return Entry - * @example ```javascript + * @example + * ```javascript * environment.getEntry('entryId').then(entry => { * * // Build a plainObject in order to make it usable for React (saving in state or redux) @@ -185,7 +188,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates SDK Asset object (locally) from entry data * @param assetData - Asset ID * @return Asset - * @example ```javascript + * @example + * ```javascript * environment.getAsset('asset_id').then(asset => { * * // Build a plainObject in order to make it usable for React (saving in state or redux) @@ -222,7 +226,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param bulkActionId - ID of the BulkAction to fetch * @returns - Promise with the BulkAction * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -431,7 +436,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets a Content Type * @param contentTypeId - Content Type ID * @return Promise for a Content Type - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -463,7 +469,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets a collection of Content Types * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise for a collection of Content Types - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -493,7 +500,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a Content Type * @param data - Object representation of the Content Type to be created * @return Promise for the newly created Content Type - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -536,7 +544,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param contentTypeId - Content Type ID * @param data - Object representation of the Content Type to be created * @return Promise for the newly created Content Type - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -580,7 +589,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets an EditorInterface for a ContentType * @param contentTypeId - Content Type ID * @return Promise for an EditorInterface - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -610,7 +620,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets all EditorInterfaces * @return Promise for a collection of EditorInterface - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -643,7 +654,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param id - Entry ID * @param query - Object with search parameters. In this method it's only useful for `locale`. * @return Promise for an Entry - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -675,7 +687,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Deletes an Entry of this environment * @param id - Entry ID * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -710,7 +723,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * from your entry in the backend * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise for a collection of Entries - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -741,7 +755,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets a collection of published Entries * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise for a collection of published Entries - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -773,7 +788,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param contentTypeId - The Content Type ID of the newly created Entry * @param data - Object representation of the Entry to be created * @return Promise for the newly created Entry - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -813,7 +829,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param id - Entry ID * @param data - Object representation of the Entry to be created * @return Promise for the newly created Entry - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -854,7 +871,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param entryId - Entry ID * @param {Object} options.include - Level of the entry descendants from 1 up to 10 maximum * @returns Promise of Entry references - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management'); * * const client = contentful.createClient({ @@ -892,7 +910,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param id - Asset ID * @param query - Object with search parameters. In this method it's only useful for `locale`. * @return Promise for an Asset - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -926,7 +945,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * from your entry in the backend * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise for a collection of Assets - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -956,7 +976,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets a collection of published Assets * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise for a collection of published Assets - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -986,7 +1007,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a Asset. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing. * @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. * @return Promise for the newly created Asset - * @example ```javascript + * @example + * ```javascript * const client = contentful.createClient({ * accessToken: '' * }) @@ -1030,7 +1052,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param id - Asset ID * @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. * @return Promise for the newly created Asset - * @example ```javascript + * @example + * ```javascript * const client = contentful.createClient({ * accessToken: '' * }) @@ -1073,7 +1096,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @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. * @param data.fields.file.[LOCALE].file - Can be a string, an ArrayBuffer or a Stream. * @return Promise for the newly created Asset - * @example ```javascript + * @example + * ```javascript * const client = contentful.createClient({ * accessToken: '' * }) @@ -1118,7 +1142,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param data Object with request payload * @param data.expiresAt number a UNIX timestamp in the future (but not more than 48 hours from time of calling) * @return Promise for the newly created AssetKey - * @example ```javascript + * @example + * ```javascript * const client = contentful.createClient({ * accessToken: '' * }) @@ -1150,7 +1175,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets an Upload * @param id - Upload ID * @return Promise for an Upload - * @example ```javascript + * @example + * ```javascript * const client = contentful.createClient({ * accessToken: '' * }) @@ -1180,7 +1206,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param data - Object with file information. * @param data.file - Actual file content. Can be a string, an ArrayBuffer or a Stream. * @return Upload object containing information about the uploaded file. - * @example ```javascript + * @example + * ```javascript * const client = contentful.createClient({ * accessToken: '' * }) @@ -1209,7 +1236,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets a Locale * @param localeId - Locale ID * @return Promise for an Locale - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1239,7 +1267,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets a collection of Locales * @return Promise for a collection of Locales - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1269,7 +1298,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a Locale * @param data - Object representation of the Locale to be created * @return Promise for the newly created Locale - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1305,7 +1335,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets an UI Extension * @param id - Extension ID * @return Promise for an UI Extension - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1334,7 +1365,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets a collection of UI Extension * @return Promise for a collection of UI Extensions - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1363,7 +1395,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a UI Extension * @param data - Object representation of the UI Extension to be created * @return Promise for the newly created UI Extension - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1408,7 +1441,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param id - Extension ID * @param data - Object representation of the UI Extension to be created * @return Promise for the newly created UI Extension - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1456,7 +1490,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param data - AppInstallation data * @param options.acceptAllTerms - Flag for accepting Apps' Marketplace EULA, Terms, and Privacy policy (need to pass `{acceptAllTerms: true}` to install a marketplace app) * @return Promise for an App Installation - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1496,7 +1531,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets an App Installation * @param id - AppDefintion ID * @return Promise for an App Installation - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1525,7 +1561,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets a collection of App Installation * @return Promise for a collection of App Installations - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1556,7 +1593,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param appActionId - action ID * @param data - App Action Call data * @return Promise for an App Action Call - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1642,7 +1680,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param appDefinitionId - AppDefinition ID * @param data - SignedRequest data * @return Promise for a Signed Request - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1683,7 +1722,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param appDefinitionId - AppDefinition ID * @param data - Json Web Token * @return Promise for an app access token - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const { sign } = require('jsonwebtoken') * @@ -1722,7 +1762,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param appInstallationId * @param {import('../common-types').AcceptsQueryOptions} query - optional query parameter for filtering functions by action * @return Promise containing wrapped collection of Functions in an environment - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1756,7 +1797,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param functionId * @param {import('../common-types').CursorBasedParams} query - optional query parameter for pagination (limit, nextPage, prevPage) * @return Promise containing wrapped collection of FunctionLogs - * * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1812,7 +1854,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param functionId * @param logId * @return Promise containing a wrapped FunctionLog - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1854,7 +1897,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param entryId - Entry ID * @param query - query additional query paramaters * @return Promise for a collection of Entry Snapshots - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1887,7 +1931,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param contentTypeId - Content Type ID * @param query - query additional query paramaters * @return Promise for a collection of Content Type Snapshots - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1964,7 +2009,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Retrieves a Release by ID * @param releaseId * @returns Promise containing a wrapped Release - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1996,7 +2042,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets a Collection of Releases, * @param {ReleaseQueryOptions} query filtering options for the collection result * @returns Promise containing a wrapped Release Collection - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -2028,7 +2075,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a new Release with the entities and title in the payload * @param payload Object containing the payload in order to create a Release * @returns Promise containing a wrapped Release, that has other helper methods within. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -2074,7 +2122,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param options.version Release sys.version that to be updated * @returns Promise containing a wrapped Release, that has helper methods within. * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -2128,7 +2177,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param releaseId the ID of the release * * @returns Promise containing a wrapped Release, that has helper methods within. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -2161,7 +2211,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param options.version the version of the release that is to be published * @returns Promise containing a wrapped Release, that has helper methods within. * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -2195,7 +2246,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param options.version the version of the release that is to be published * @returns Promise containing a wrapped Release, that has helper methods within. * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -2230,7 +2282,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * * @returns Promise containing a wrapped Release, that has helper methods within. * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -2270,7 +2323,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param options.version the version of the release that is to be archived * @returns Promise containing a wrapped Release, that has helper methods within. * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -2304,7 +2358,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param options.version the version of the release that is to be unarchived * @returns Promise containing a wrapped Release, that has helper methods within. * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -2337,7 +2392,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param params.releaseId The ID of a Release * @param params.actionId The ID of a Release Action * @returns Promise containing a wrapped ReleaseAction - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -2372,7 +2428,8 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param {ReleaseQueryOptions} params.query filtering options for the collection result * @returns Promise containing a wrapped ReleaseAction Collection * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/create-environment-template-api.ts b/lib/create-environment-template-api.ts index cfa97f4d0f..2aaded7c2e 100644 --- a/lib/create-environment-template-api.ts +++ b/lib/create-environment-template-api.ts @@ -87,7 +87,8 @@ export function createEnvironmentTemplateApi(makeRequest: MakeRequest, organizat /** * Deletes the environment template * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/create-organization-api.ts b/lib/create-organization-api.ts index 2b51b924ac..a81aa1be48 100644 --- a/lib/create-organization-api.ts +++ b/lib/create-organization-api.ts @@ -58,7 +58,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * Gets a collection of spaces in the organization * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise a collection of Spaces in the organization - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -85,7 +86,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets a User * @return Promise for a User - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -109,7 +111,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * Gets a collection of Users in organization * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise a collection of Users in organization - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -136,7 +139,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * Gets an Organization Membership * @param id - Organization Membership ID * @return Promise for an Organization Membership - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -164,7 +168,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * Gets a collection of Organization Memberships * @param params - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise for a collection of Organization Memberships - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -191,7 +196,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Creates a Team * @param data representation of the Team to be created - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -218,7 +224,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets an Team - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -241,7 +248,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets all Teams in an organization - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -270,7 +278,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * @param teamId - Id of the team the membership will be created in * @param data - Object representation of the Team Membership to be created * @return Promise for the newly created TeamMembership - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -298,7 +307,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an Team Membership from the team with given teamId * @return Promise for an Team Membership - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -322,7 +332,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Get all Team Memberships. If teamID is provided in the optional config object, it will return all Team Memberships in that team. By default, returns all team memberships for the organization. * @return Promise for a Team Membership Collection - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -363,7 +374,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Get all Team Space Memberships. If teamID is provided in the optional config object, it will return all Team Space Memberships in that team. By default, returns all team space memberships across all teams in the organization. * @return Promise for a Team Space Membership Collection - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -391,7 +403,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Get a Team Space Membership with given teamSpaceMembershipId * @return Promise for a Team Space Membership - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -419,7 +432,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * Gets an Space Membership in Organization * @param id - Organiztion Space Membership ID * @return Promise for a Space Membership in an organization - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -446,7 +460,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * Gets a collection Space Memberships in organization * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise for a Space Membership collection across all spaces in the organization - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -472,7 +487,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an Invitation in Organization * @return Promise for a OrganizationInvitation in an organization - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -498,7 +514,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Create an Invitation in Organization * @return Promise for a OrganizationInvitation in an organization - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -528,7 +545,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets a collection of Roles * @return Promise for a collection of Roles - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -553,7 +571,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * Creates an app definition * @param Object representation of the App Definition to be created * @return Promise for the newly created AppDefinition - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -581,7 +600,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets all app definitions * @return Promise for a collection of App Definitions - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -605,7 +625,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an app definition * @return Promise for an App Definition - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -629,7 +650,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an app upload * @return Promise for an App Upload - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -654,7 +676,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Creates an app upload * @return Promise for an App Upload - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -679,7 +702,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Creates or updates an app signing secret * @return Promise for an App SigningSecret - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -704,7 +728,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an app signing secret * @return Promise for an App SigningSecret - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -728,7 +753,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Deletes an app signing secret * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -754,7 +780,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Creates or updates an app event subscription * @return Promise for an App Event Subscription - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -779,7 +806,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an app event subscription * @return Promise for an App Event Subscription - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -803,7 +831,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Deletes the current App Event Subscription for the given App * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -829,7 +858,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Creates or updates an app event subscription * @return Promise for an App Event Subscription - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -861,7 +891,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an app key by fingerprint * @return Promise for an App Key - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -885,7 +916,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets all keys for the given app * @return Promise for an array of App Keys - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -920,7 +952,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Deletes an app key by fingerprint. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -946,7 +979,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Creates or updates an app details entity * @return Promise for an App Details - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -973,7 +1007,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an app details entity * @return Promise for an App Details - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -997,7 +1032,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Deletes an app details entity. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -1023,7 +1059,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Creates an app action entity. * @return Promise that resolves an App Action entity - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -1052,7 +1089,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Updates an existing app action entity. * @return Promise that resolves an App Action entity - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -1081,7 +1119,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Deletes an app action entity. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -1107,7 +1146,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an existing app action entity. * @return Promise that resolves an App Action entity - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -1131,7 +1171,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets existing app actions for an App Definition. * @return Promise that resolves an App Action entity - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -1157,7 +1198,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * @param appDefinitionId * @param functionId * @returns Promise for a Function - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' @@ -1180,7 +1222,8 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * @param appDefinitionId * @param {import('../common-types').AcceptsQueryOptions} query - optional query parameter for filtering functions by action * @returns Promise for a Function - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const client = contentful.createClient({ * accessToken: '' diff --git a/lib/create-space-api.ts b/lib/create-space-api.ts index 5040d0a53b..a32f656879 100644 --- a/lib/create-space-api.ts +++ b/lib/create-space-api.ts @@ -54,7 +54,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Deletes the space * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -78,7 +79,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Updates the space * @return Promise for the updated space. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -108,7 +110,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets an environment * @param id - Environment ID * @return Promise for an Environment - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -134,7 +137,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of Environments * @return Promise for a collection of Environment - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -160,7 +164,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates an environment * @param data - Object representation of the Environment to be created * @return Promise for the newly created Environment - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -191,7 +196,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param data - Object representation of the Environment to be created * @param sourceEnvironmentId - ID of the source environment that will be copied to create the new environment. Default is "master" * @return Promise for the newly created Environment - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -226,7 +232,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a Webhook * @param id - Webhook ID * @return Promise for a Webhook - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -251,7 +258,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of Webhooks * @return Promise for a collection of Webhooks - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -276,7 +284,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Fetch a webhook signing secret * @returns Promise for the redacted webhook signing secret in this space - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -301,7 +310,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Fetch a webhook retry policy * @returns Promise for the redacted webhook retry policy in this space - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -327,7 +337,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates a Webhook * @param data - Object representation of the Webhook to be created * @return Promise for the newly created Webhook - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -360,7 +371,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param id - Webhook ID * @param data - Object representation of the Webhook to be created * @return Promise for the newly created Webhook - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -392,7 +404,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Create or update the webhook signing secret for this space * @param data 64 character string that will be used to sign the webhook calls * @returns Promise for the redacted webhook signing secret that was created or updated - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * const crypto = require('crypto') * @@ -421,7 +434,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Create or update the webhook retry policy for this space * @param data the maxRetries with integer value >= 2 and <= 99 value to set in the Retry Policy * @returns Promise for the redacted webhook retry policy that was created or updated - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -449,7 +463,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Delete the webhook signing secret for this space * @returns Promise - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -473,7 +488,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Delete the webhook retry policy for this space * @returns Promise - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -499,7 +515,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a Role * @param id - Role ID * @return Promise for a Role - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -529,7 +546,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of Roles * @return Promise for a collection of Roles - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -555,7 +573,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates a Role * @param data - Object representation of the Role to be created * @return Promise for the newly created Role - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -611,7 +630,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param id - Role ID * @param data - Object representation of the Role to be created * @return Promise for the newly created Role - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -666,7 +686,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a User * @param userId - User ID * @return Promise for a User - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -690,7 +711,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a collection of Users in a space * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise a collection of Users in a space - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -715,7 +737,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a collection of teams for a space * @param query * @return Promise for a collection of teams for a space - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -739,7 +762,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a Space Member * @param id Get Space Member by user_id * @return Promise for a Space Member - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -760,7 +784,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a collection of Space Members * @param query * @return Promise for a collection of Space Members - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -785,7 +810,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user). * @param id - Space Membership ID * @return Promise for a Space Membership - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -807,7 +833,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user). * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise for a collection of Space Memberships - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -833,7 +860,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user). * @param data - Object representation of the Space Membership to be created * @return Promise for the newly created Space Membership - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -873,7 +901,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param id - Space Membership ID * @param data - Object representation of the Space Membership to be created * @return Promise for the newly created Space Membership - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -913,7 +942,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a Team Space Membership * @param id - Team Space Membership ID * @return Promise for a Team Space Membership - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -938,7 +968,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a collection of Team Space Memberships * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. * @return Promise for a collection of Team Space Memberships - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * client.getSpace('') @@ -963,7 +994,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param id - Team ID * @param data - Object representation of the Team Space Membership to be created * @return Promise for the newly created Team Space Membership - * @example ```javascript + * @example +* ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1003,7 +1035,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a Api Key * @param id - API Key ID * @return Promise for a Api Key - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1030,7 +1063,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of Api Keys * @return Promise for a collection of Api Keys - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1056,7 +1090,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of preview Api Keys * @return Promise for a collection of Preview Api Keys - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1083,7 +1118,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a preview Api Key * @param id - Preview API Key ID * @return Promise for a Preview Api Key - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1111,7 +1147,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates a Api Key * @param payload - Object representation of the Api Key to be created * @return Promise for the newly created Api Key - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1150,7 +1187,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param id - Api Key ID * @param payload - Object representation of the Api Key to be created * @return Promise for the newly created Api Key - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1190,7 +1228,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param environmentAliasId - EnvironmentAlias ID * @param data - Object representation of the EnvironmentAlias to be created * @return Promise for the newly created EnvironmentAlias - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1221,7 +1260,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets an Environment Alias * @param Environment Alias ID * @return Promise for an Environment Alias - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1245,7 +1285,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of Environment Aliases * @return Promise for a collection of Environment Aliases - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -1273,7 +1314,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param query - Object with search parameters. The enviroment id field is mandatory. Check the REST API reference for more details. * @return Promise for the scheduled actions query * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management'); * * const client = contentful.createClient({ @@ -1302,7 +1344,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * * @throws if the Scheduled Action cannot be found or the user doesn't have permission to read schedules from the entity of the scheduled action itself. * @returns Promise with the Scheduled Action - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management'); * * const client = contentful.createClient({ @@ -1342,7 +1385,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates a scheduled action * @param data - Object representation of the scheduled action to be created * @return Promise for the newly created scheduled actions - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management'); * * const client = contentful.createClient({ @@ -1391,7 +1435,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param options.version the sys.version of the scheduled action to be updated * @param payload the scheduled actions object with updates, omitting sys object * @returns Promise containing a wrapped scheduled action with helper methods - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management'); * * const client = contentful.createClient({ @@ -1465,7 +1510,8 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param options.environmentId the environment ID of the scheduled action to be canceled * @throws if the Scheduled Action cannot be found or the user doesn't have permissions in the entity in the action. * @returns Promise containing a wrapped Scheduled Action with helper methods - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management'); * * const client = contentful.createClient({ diff --git a/lib/create-ui-config-api.ts b/lib/create-ui-config-api.ts index b66008e007..e5dc62958b 100644 --- a/lib/create-ui-config-api.ts +++ b/lib/create-ui-config-api.ts @@ -28,7 +28,8 @@ export default function createUIConfigApi(makeRequest: MakeRequest) { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/create-user-ui-config-api.ts b/lib/create-user-ui-config-api.ts index ea7a07001d..35caf3ffeb 100644 --- a/lib/create-user-ui-config-api.ts +++ b/lib/create-user-ui-config-api.ts @@ -28,7 +28,8 @@ export default function createUserUIConfigApi(makeRequest: MakeRequest) { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/access-token.ts b/lib/entities/access-token.ts index baee1e0760..95b55db26f 100644 --- a/lib/entities/access-token.ts +++ b/lib/entities/access-token.ts @@ -38,7 +38,8 @@ export interface AccessToken extends AccessTokenProps, DefaultElements { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -39,7 +40,8 @@ export interface ApiKey extends ApiKeyProps, DefaultElements { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/app-action.ts b/lib/entities/app-action.ts index 73ef9449a9..9455c5648a 100644 --- a/lib/entities/app-action.ts +++ b/lib/entities/app-action.ts @@ -156,7 +156,8 @@ export type AppAction = AppActionProps & /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/app-bundle.ts b/lib/entities/app-bundle.ts index 9903483d34..643d523233 100644 --- a/lib/entities/app-bundle.ts +++ b/lib/entities/app-bundle.ts @@ -64,7 +64,8 @@ export interface AppBundle extends AppBundleProps, DefaultElements { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/app-signing-secret.ts b/lib/entities/app-signing-secret.ts index 102b7a6b96..ede545b947 100644 --- a/lib/entities/app-signing-secret.ts +++ b/lib/entities/app-signing-secret.ts @@ -29,7 +29,8 @@ export interface AppSigningSecret /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/app-upload.ts b/lib/entities/app-upload.ts index 8b36b14f7b..3652db3f34 100644 --- a/lib/entities/app-upload.ts +++ b/lib/entities/app-upload.ts @@ -18,7 +18,8 @@ export interface AppUpload extends AppUploadProps, DefaultElements + processForLocale(locale: string, options?: AssetProcessingForLocale): Promise /** * Publishes the object * @return Object returned from the server with updated metadata. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -156,7 +159,8 @@ type AssetApi = { /** * Archives the object * @return Object returned from the server with updated metadata. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -175,7 +179,8 @@ type AssetApi = { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -194,7 +199,8 @@ type AssetApi = { /** * Unarchives the object * @return Object returned from the server with updated metadata. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -213,7 +219,8 @@ type AssetApi = { /** * Unpublishes the object * @return Object returned from the server with updated metadata. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -232,7 +239,8 @@ type AssetApi = { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/content-type.ts b/lib/entities/content-type.ts index cb8d3e40bc..afd86a560a 100644 --- a/lib/entities/content-type.ts +++ b/lib/entities/content-type.ts @@ -68,7 +68,8 @@ type ContentTypeApi = { * API reference for more reasoning. Alternatively, * you may use the convenience method omitAndDeleteField to do both steps at once. * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -91,7 +92,8 @@ type ContentTypeApi = { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -110,7 +112,8 @@ type ContentTypeApi = { /** * Publishes the object * @return Object returned from the server with updated metadata. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -129,7 +132,8 @@ type ContentTypeApi = { /** * Unpublishes the object * @return Object returned from the server with updated metadata. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -150,7 +154,8 @@ type ContentTypeApi = { * Important note: The editor interface only represent a published contentType.
* To get the most recent representation of the contentType make sure to publish it first * @return Object returned from the server with the current editor interface. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -189,7 +194,8 @@ type ContentTypeApi = { /** * Gets a snapshot of a contentType * @param snapshotId - Id of the snapshot - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -207,7 +213,8 @@ type ContentTypeApi = { getSnapshot(snapshotId: string): Promise> /** * Gets all snapshots of a contentType - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/environment-alias.ts b/lib/entities/environment-alias.ts index 15f53153b4..8508531118 100644 --- a/lib/entities/environment-alias.ts +++ b/lib/entities/environment-alias.ts @@ -25,8 +25,6 @@ export interface EnvironmentAlias DefaultElements { /** * Sends an update to the server with any changes made to the object's properties. Currently, you can only change the id of the alias's underlying environment. See the example below. - * @memberof EnvironmentAlias - * @func update * @return {Promise} Object returned from the server with updated changes. * ```javascript * const contentful = require('contentful-management') @@ -49,8 +47,6 @@ export interface EnvironmentAlias /** * Deletes this object on the server. - * @memberof EnvironmentAlias - * @func delete * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled. * ```javascript * const contentful = require('contentful-management') diff --git a/lib/entities/extension.ts b/lib/entities/extension.ts index e76a5f535b..9cbbe73ae9 100644 --- a/lib/entities/extension.ts +++ b/lib/entities/extension.ts @@ -65,7 +65,8 @@ export interface Extension extends ExtensionProps, DefaultElements { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -72,7 +73,8 @@ export interface Locale extends LocaleProps, DefaultElements { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/organization-membership.ts b/lib/entities/organization-membership.ts index b93110208b..e7d15835f1 100644 --- a/lib/entities/organization-membership.ts +++ b/lib/entities/organization-membership.ts @@ -27,7 +27,8 @@ export interface OrganizationMembership /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/personal-access-token.ts b/lib/entities/personal-access-token.ts index 77aba58444..ccf8bdd51a 100644 --- a/lib/entities/personal-access-token.ts +++ b/lib/entities/personal-access-token.ts @@ -27,7 +27,8 @@ export interface PersonalAccessToken /** * Revokes a personal access token * @return Object the revoked personal access token - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/release-action.ts b/lib/entities/release-action.ts index 45f8936f04..b290cb7a72 100644 --- a/lib/entities/release-action.ts +++ b/lib/entities/release-action.ts @@ -44,7 +44,7 @@ export interface ReleaseActionQueryOptions { /** * Limit of how many records are returned in the query result * @default 100 - * */ + **/ limit?: number } diff --git a/lib/entities/release.ts b/lib/entities/release.ts index 161812dbd3..05f3d5723c 100644 --- a/lib/entities/release.ts +++ b/lib/entities/release.ts @@ -57,7 +57,7 @@ export interface ReleaseQueryOptions { /** * Limit how many records are returned in the result * @default 100 - * */ + **/ limit?: number /** * Order releases @@ -66,7 +66,7 @@ export interface ReleaseQueryOptions { * - `sys.updatedAt`, `-sys.updatedAt` * - `sys.createdAt`, `-sys.createdAt` * @default -sys.updatedAt - * */ + **/ order?: string } @@ -136,13 +136,13 @@ export interface ReleaseApiMethods { * Archives a release and locks any actions such as adding new entities or publishing/unpublishing. * This operation increases the sys.version property * @throws {BadRequest} if the release is already archived - * */ + **/ archive(): Promise /** * Unarchives an `archived` release and unlocks operations on the Release. This operation increases the sys.version property * @throws {BadRequest} if the release is not archived - * */ + **/ unarchive(): Promise /** Updates a Release and returns the updated Release object */ update(payload: ReleasePayload): Promise diff --git a/lib/entities/resource-provider.ts b/lib/entities/resource-provider.ts index d232eb9d9e..a8481cce21 100644 --- a/lib/entities/resource-provider.ts +++ b/lib/entities/resource-provider.ts @@ -52,7 +52,8 @@ function createResourceProviderApi(makeRequest: MakeRequest) { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -82,7 +83,8 @@ function createResourceProviderApi(makeRequest: MakeRequest) { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/resource-type.ts b/lib/entities/resource-type.ts index 7855a012ef..8280fdb764 100644 --- a/lib/entities/resource-type.ts +++ b/lib/entities/resource-type.ts @@ -76,7 +76,8 @@ function createResourceTypeApi(makeRequest: MakeRequest) { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -107,7 +108,8 @@ function createResourceTypeApi(makeRequest: MakeRequest) { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/role.ts b/lib/entities/role.ts index 87181fd0d6..f1f5b775b3 100644 --- a/lib/entities/role.ts +++ b/lib/entities/role.ts @@ -46,10 +46,9 @@ export type CreateRoleProps = Omit export interface Role extends RoleProps, DefaultElements { /** * Deletes this object on the server. - * @memberof Role - * @func delete * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -67,7 +66,8 @@ export interface Role extends RoleProps, DefaultElements { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/scheduled-action.ts b/lib/entities/scheduled-action.ts index 8f910a8685..0e0ec2326d 100644 --- a/lib/entities/scheduled-action.ts +++ b/lib/entities/scheduled-action.ts @@ -143,7 +143,8 @@ export default function getInstanceMethods(makeRequest: MakeRequest): ScheduledA /** * Cancels the current Scheduled Action schedule. * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management'); * * const client = contentful.createClient({ @@ -190,7 +191,8 @@ export default function getInstanceMethods(makeRequest: MakeRequest): ScheduledA /** * Update the current scheduled action. Currently, only changes made to the `scheduledFor` property will be saved. * - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management'); * * const client = contentful.createClient({ diff --git a/lib/entities/space-membership.ts b/lib/entities/space-membership.ts index a8bf6d4a7a..89396641f9 100644 --- a/lib/entities/space-membership.ts +++ b/lib/entities/space-membership.ts @@ -21,7 +21,8 @@ export interface SpaceMembership /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -39,7 +40,8 @@ export interface SpaceMembership /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/team-membership.ts b/lib/entities/team-membership.ts index 8f152318f5..51b3d02da4 100644 --- a/lib/entities/team-membership.ts +++ b/lib/entities/team-membership.ts @@ -31,7 +31,8 @@ export interface TeamMembership extends TeamMembershipProps, DefaultElements { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ @@ -47,7 +48,8 @@ export interface Team extends TeamProps, DefaultElements { /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. - * @example ```javascript + * @example + * ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ diff --git a/lib/entities/workflow.ts b/lib/entities/workflow.ts index cbbb013301..186b8fe066 100644 --- a/lib/entities/workflow.ts +++ b/lib/entities/workflow.ts @@ -67,7 +67,7 @@ export type WorkflowQueryOptions = Omit & { /** * Order workflows by * @default -sys.createdAt - * */ + **/ order?: OrderQueryParam } diff --git a/lib/methods/action.ts b/lib/methods/action.ts index 5fd31bf478..e042946e99 100644 --- a/lib/methods/action.ts +++ b/lib/methods/action.ts @@ -28,17 +28,17 @@ export class AsyncActionFailedError extends AsyncActionProcessingError {} export type AsyncActionProcessingOptions = { /** The amount of times to retry. * @default 30 - * */ + **/ retryCount?: number /** The interval between retries, in milliseconds (ms). * @default 2000 (2s) - * */ + **/ retryIntervalMs?: number /** * Initial delay in milliseconds when performing the first check. * This is used to prevent short running bulkActions of waiting too long for a result. * @default 1000 (1s) - * */ + **/ initialDelayMs?: number /** * Throws an error if the Action does not complete with a successful (succeeded) status. diff --git a/lib/plain/entities/comment.ts b/lib/plain/entities/comment.ts index 493bcc144b..505a41538b 100644 --- a/lib/plain/entities/comment.ts +++ b/lib/plain/entities/comment.ts @@ -31,7 +31,7 @@ export type CommentPlainClientAPI = { * bodyFormat: 'plain-text', * }); * ``` - * */ + **/ get(params: OptionalDefaults & PlainTextBodyFormat): Promise /** Fetches a rich text comment * @@ -48,7 +48,7 @@ export type CommentPlainClientAPI = { * bodyFormat: 'rich-text', * }); * ``` - * */ + **/ get( params: OptionalDefaults & RichTextBodyFormat, ): Promise @@ -69,7 +69,7 @@ export type CommentPlainClientAPI = { * } * }); * ``` - * */ + **/ getMany( params: OptionalDefaults, ): Promise> @@ -90,7 +90,7 @@ export type CommentPlainClientAPI = { * } * }); * ``` - * */ + **/ getMany( params: OptionalDefaults, ): Promise> diff --git a/lib/plain/entities/function-log.ts b/lib/plain/entities/function-log.ts index 7cc571617b..1d7cff63e2 100644 --- a/lib/plain/entities/function-log.ts +++ b/lib/plain/entities/function-log.ts @@ -9,8 +9,6 @@ import type { OptionalDefaults } from '../wrappers/wrap' export type FunctionLogPlainClientAPI = { /** * Fetches the specified FunctionLog - * @params spaceId, environmentId, appInstallationId, functionId, logId - * @returns the FunctionLog * @throws if the request fails, or the FunctionLog is not found * @example * ```javascript @@ -27,8 +25,6 @@ export type FunctionLogPlainClientAPI = { /** * Fetches all FunctionLogs for the given function - * @params spaceId, environmentId, appInstallationId, functionId, query - * @returns an object containing an array of FunctionLogs * @throws if the request fails, or the FunctionLogs are not found * @example * ```javascript diff --git a/lib/plain/entities/function.ts b/lib/plain/entities/function.ts index f428e4d824..8b78f19048 100644 --- a/lib/plain/entities/function.ts +++ b/lib/plain/entities/function.ts @@ -3,7 +3,6 @@ import type { GetFunctionParams, GetFunctionForEnvParams, GetManyFunctionParams, - AcceptsQueryParams, } from '../../common-types' import type { FunctionProps } from '../../entities/function' import type { OptionalDefaults } from '../wrappers/wrap' @@ -11,8 +10,6 @@ import type { OptionalDefaults } from '../wrappers/wrap' export type FunctionPlainClientAPI = { /** * Fetches the specified Function - * @params organizationId, appDefinitionId, functionId - * @returns the Function * @throws if the request fails, or the Function is not found * @example * ```javascript @@ -27,8 +24,6 @@ export type FunctionPlainClientAPI = { /** * Fetches all Functions for the given app - * @params organizationId, appDefinitionId, query - * @returns an object containing an array of Functions * @throws if the request fails, or the App is not found * @example * ```javascript @@ -43,8 +38,6 @@ export type FunctionPlainClientAPI = { /** * Fetches all Functions for the given environment - * @params spaceId, environmentId, appInstallationId, query - * @returns an object containing an array of Functions * @throws if the request fails, or the Environment is not found * @example * ```javascript diff --git a/lib/plain/entities/space-member.ts b/lib/plain/entities/space-member.ts index 412be3cd7e..d30b959c13 100644 --- a/lib/plain/entities/space-member.ts +++ b/lib/plain/entities/space-member.ts @@ -8,7 +8,8 @@ export type SpaceMemberPlainClientAPI = { * @param params the space and member IDs * @returns the space member * @throws if the request fails, or the space member is not found - * @example ```javascript + * @example + * ```javascript * const spaceMember = await client.spaceMember.get({ * spaceId: '', * spaceMemberId: '', @@ -23,7 +24,8 @@ export type SpaceMemberPlainClientAPI = { * @param params a space ID and query parameters * @returns a collection of space members * @throws if the request fails, the space is not found, or the query parameters are malformed - * @example ```javascript + * @example + * ```javascript * const spaceMember = await client.spaceMember.getMany({ * spaceId: '', * }); diff --git a/lib/plain/entities/space-membership.ts b/lib/plain/entities/space-membership.ts index 7cba685e25..fea1896d0e 100644 --- a/lib/plain/entities/space-membership.ts +++ b/lib/plain/entities/space-membership.ts @@ -18,7 +18,8 @@ export type SpaceMembershipPlainClientAPI = { * @param params the space and membership IDs * @returns the space membership * @throws if the request fails, or the space membership is not found - * @example ```javascript + * @example + * ```javascript * const spaceMembership = await client.spaceMembership.get({ * spaceId: '', * spaceMembershipId: '', @@ -31,7 +32,8 @@ export type SpaceMembershipPlainClientAPI = { * @param params a space ID * @returns a collection of space memberships * @throws if the request fails, the space is not found, or the query parameters are malformed - * @example ```javascript + * @example + * ```javascript * const spaceMemberships = await client.spaceMembership.getMany({ * spaceId: '', * spaceMembershipId: '', @@ -46,7 +48,8 @@ export type SpaceMembershipPlainClientAPI = { * @param params the organization and membership IDs * @returns the space membership * @throws if the request fails, or the organization or the space membership is not found - * @example ```javascript + * @example + * ```javascript * const spaceMembership = await client.spaceMembership.getForOrganization({ * spaceId: '', * spaceMembershipId: '', @@ -61,7 +64,8 @@ export type SpaceMembershipPlainClientAPI = { * @param params the organization and query parameterss * @returns a collection of space memberships * @throws if the request fails, the organization is not found, or the query parameters are malformed - * @example ```javascript + * @example + * ```javascript * const spaceMemberships = await client.spaceMembership.getManyForOrganization({ * organizationId: '', * spaceMembershipId: '', @@ -77,7 +81,8 @@ export type SpaceMembershipPlainClientAPI = { * @param data the space membership data * @returns the created space membership * @throws if the request fails, the space cannot be found, or the data is malformed - * @example ```javascript + * @example + * ```javascript * const spaceMembership = await client.spaceMembership.create( * { * spaceId: '', @@ -109,7 +114,8 @@ export type SpaceMembershipPlainClientAPI = { * @param data the space membership data * @returns the created space membership * @throws if the request fails, the space cannot be found, or the data is malformed - * @example ```javascript + * @example + * ```javascript * const spaceMembership = await client.spaceMembership.createWithId( * { * spaceId: '', @@ -142,7 +148,8 @@ export type SpaceMembershipPlainClientAPI = { * @param rawData the space membership update * @returns the updated space membership * @throws if the request fails, the space membership is not found, or the payload is malformed - * @example ```javascript + * @example + * ```javascript * let spaceMembership = await client.spaceMembership.get({ * spaceId: '', * spaceMembershipId: '', @@ -170,7 +177,8 @@ export type SpaceMembershipPlainClientAPI = { * @param params the space and membership IDs * @returns void * @throws if the request fails, or the space membership is not found - * @example ```javascript + * @example + * ```javascript * await client.spaceMembership.delete({ * spaceId: '', * spaceMembershipId: '', diff --git a/lib/plain/entities/space.ts b/lib/plain/entities/space.ts index 7768808807..eef748d787 100644 --- a/lib/plain/entities/space.ts +++ b/lib/plain/entities/space.ts @@ -14,7 +14,8 @@ export type SpacePlainClientAPI = { * @param params the space ID * @returns the space * @throws if the request fails, or the space is not found - * @example ```javascript + * @example + * ```javascript * const space = await client.space.get({ * spaceId: '', * }); @@ -26,7 +27,8 @@ export type SpacePlainClientAPI = { * @param params (optional) filter and pagination query parameters * @returns a collection of spaces * @throws if the request fails, or the query parameters are malformed - * @example ```javascript + * @example + * ```javascript * const space = await client.space.getMany({ * query: { * limit: 10, @@ -40,7 +42,8 @@ export type SpacePlainClientAPI = { * @param params the organization ID and query parameters * @returns a collection of spaces * @throws if the request fails, the organization is not found, or the query parameters are malformed - * @example ```javascript + * @example + * ```javascript * const space = await client.space.getManyForOrganization({ * organizationId: '', * query: { @@ -58,7 +61,8 @@ export type SpacePlainClientAPI = { * @param payload the space to create * @returns the created space * @throws if the request fails, or the payload is malformed - * @example ```javascript + * @example + * ```javascript * const space = await client.space.create( * { * organizationId: '', @@ -80,7 +84,8 @@ export type SpacePlainClientAPI = { * @param payload the space update * @returns the updated space * @throws if the request fails, the space is not found, or the payload is malformed - * @example ```javascript + * @example + * ```javascript * let space = await client.space.get({ * spaceId: '', * }); @@ -106,7 +111,8 @@ export type SpacePlainClientAPI = { * @param params the space ID * @returns void * @throws if the request fails, or the space is not found - * @example ```javascript + * @example + * ```javascript * await client.space.delete({ * spaceId: '', * }); diff --git a/lib/plain/entities/workflow-definition.ts b/lib/plain/entities/workflow-definition.ts index a869d36343..de3a51e7f5 100644 --- a/lib/plain/entities/workflow-definition.ts +++ b/lib/plain/entities/workflow-definition.ts @@ -49,7 +49,7 @@ export type WorkflowDefinitionPlainClientAPI = { * } * }); * ``` - * */ + **/ getMany( params: OptionalDefaults< GetSpaceEnvironmentParams & { query?: WorkflowDefinitionQueryOptions } diff --git a/package-lock.json b/package-lock.json index 946998ce13..9a25631fdb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,10 @@ "axios": "^1.12.2", "contentful-sdk-core": "^9.2.1", "fast-copy": "^3.0.0", - "globals": "^15.15.0" + "globals": "^15.15.0", + "typedoc-github-theme": "^0.2.1", + "typedoc-plugin-markdown": "^4.4.2", + "typedoc-plugin-missing-exports": "^3.1.0" }, "devDependencies": { "@contentful/integration-test-utils": "^2.0.1", @@ -52,7 +55,7 @@ "semantic-release": "^25.0.2", "size-limit": "^11.1.6", "type-fest": "^4.18.3", - "typedoc": "^0.26.2", + "typedoc": "^0.27.9", "typescript": "^5.6.3", "typescript-eslint": "^8.16.0", "vitest": "^2.1.5" @@ -2711,41 +2714,19 @@ } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.29.1.tgz", - "integrity": "sha512-gSt2WhLNgEeLstcweQOSp+C+MhOpTsgdNXRqr3zP6M+BUBZ8Md9OU2BYwUYsALBxHza7hwaIWtFHjQ/aOOychw==", - "dev": true, + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.29.2.tgz", + "integrity": "sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==", "license": "MIT", "dependencies": { - "@shikijs/types": "1.29.1", + "@shikijs/types": "1.29.2", "@shikijs/vscode-textmate": "^10.0.1" } }, - "node_modules/@shikijs/langs": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-1.29.1.tgz", - "integrity": "sha512-iERn4HlyuT044/FgrvLOaZgKVKf3PozjKjyV/RZ5GnlyYEAZFcgwHGkYboeBv2IybQG1KVS/e7VGgiAU4JY2Gw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@shikijs/types": "1.29.1" - } - }, - "node_modules/@shikijs/themes": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-1.29.1.tgz", - "integrity": "sha512-lb11zf72Vc9uxkl+aec2oW1HVTHJ2LtgZgumb4Rr6By3y/96VmlU44bkxEb8WBWH3RUtbqAJEN0jljD9cF7H7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@shikijs/types": "1.29.1" - } - }, "node_modules/@shikijs/types": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.29.1.tgz", - "integrity": "sha512-aBqAuhYRp5vSir3Pc9+QPu9WESBOjUo03ao0IHLC4TyTioSsp/SkbAZSrIH4ghYYC1T1KTEpRSBa83bas4RnPA==", - "dev": true, + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.29.2.tgz", + "integrity": "sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==", "license": "MIT", "dependencies": { "@shikijs/vscode-textmate": "^10.0.1", @@ -2753,10 +2734,9 @@ } }, "node_modules/@shikijs/vscode-textmate": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.1.tgz", - "integrity": "sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==", - "dev": true, + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", "license": "MIT" }, "node_modules/@sindresorhus/is": { @@ -2868,7 +2848,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", - "dev": true, "license": "MIT", "dependencies": { "@types/unist": "*" @@ -2894,16 +2873,6 @@ "integrity": "sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==", "dev": true }, - "node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, "node_modules/@types/node": { "version": "20.19.23", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.23.tgz", @@ -2946,7 +2915,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", - "dev": true, "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { @@ -3220,13 +3188,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", - "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", - "dev": true, - "license": "ISC" - }, "node_modules/@vitest/browser": { "version": "2.1.9", "resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-2.1.9.tgz", @@ -3568,7 +3529,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, "license": "Python-2.0" }, "node_modules/argv-formatter": { @@ -3643,7 +3603,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, "license": "MIT" }, "node_modules/base64-js": { @@ -3961,28 +3920,6 @@ "node": ">=10" } }, - "node_modules/character-entities-html4": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", - "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/character-entities-legacy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", - "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", @@ -4285,17 +4222,6 @@ "node": ">= 0.8" } }, - "node_modules/comma-separated-tokens": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", - "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -4936,20 +4862,6 @@ "node": ">=8" } }, - "node_modules/devlop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", - "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", - "dev": true, - "license": "MIT", - "dependencies": { - "dequal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -5071,13 +4983,6 @@ "dev": true, "license": "MIT" }, - "node_modules/emoji-regex-xs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz", - "integrity": "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==", - "dev": true, - "license": "MIT" - }, "node_modules/emojilib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/emojilib/-/emojilib-2.4.0.tgz", @@ -5099,7 +5004,6 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.12" @@ -6409,44 +6313,6 @@ "node": ">= 0.4" } }, - "node_modules/hast-util-to-html": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.4.tgz", - "integrity": "sha512-wxQzXtdbhiwGAUKrnQJXlOPmHnEehzphwkK7aluUPQ+lEc1xefC8pblMgpp2w5ldBTEfveRIrADcrhGIWrlTDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/unist": "^3.0.0", - "ccount": "^2.0.0", - "comma-separated-tokens": "^2.0.0", - "hast-util-whitespace": "^3.0.0", - "html-void-elements": "^3.0.0", - "mdast-util-to-hast": "^13.0.0", - "property-information": "^6.0.0", - "space-separated-tokens": "^2.0.0", - "stringify-entities": "^4.0.0", - "zwitch": "^2.0.4" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-whitespace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", - "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/headers-polyfill": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.3.tgz", @@ -6520,17 +6386,6 @@ "dev": true, "license": "MIT" }, - "node_modules/html-void-elements": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", - "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -7350,7 +7205,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", - "dev": true, "license": "MIT", "dependencies": { "uc.micro": "^2.0.0" @@ -7930,7 +7784,6 @@ "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true, "license": "MIT" }, "node_modules/lz-string": { @@ -7987,7 +7840,6 @@ "version": "14.1.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", - "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1", @@ -8087,33 +7939,10 @@ "node": ">= 0.4" } }, - "node_modules/mdast-util-to-hast": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", - "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "@ungap/structured-clone": "^1.0.0", - "devlop": "^1.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "trim-lines": "^3.0.0", - "unist-util-position": "^5.0.0", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", - "dev": true, "license": "MIT" }, "node_modules/media-typer": { @@ -8183,100 +8012,6 @@ "node": ">= 0.6" } }, - "node_modules/micromark-util-character": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", - "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-encode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", - "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-sanitize-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", - "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-symbol": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", - "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-types": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.1.tgz", - "integrity": "sha512-534m2WhVTddrcKVepwmVEVnUAmtrx9bfIjNoQHRqfnvdaHQiFytEhJoTgpWJvDEXCO5gLTQh3wYC1PgOJA4NSQ==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -12068,17 +11803,6 @@ "dev": true, "license": "MIT" }, - "node_modules/property-information": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", - "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -12140,7 +11864,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -13481,23 +13204,6 @@ "node": ">=8" } }, - "node_modules/shiki": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.29.1.tgz", - "integrity": "sha512-TghWKV9pJTd/N+IgAIVJtr0qZkB7FfFCUrrEJc0aRmZupo3D1OCVRknQWVRVA7AX/M0Ld7QfoAruPzr3CnUJuw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@shikijs/core": "1.29.1", - "@shikijs/engine-javascript": "1.29.1", - "@shikijs/engine-oniguruma": "1.29.1", - "@shikijs/langs": "1.29.1", - "@shikijs/themes": "1.29.1", - "@shikijs/types": "1.29.1", - "@shikijs/vscode-textmate": "^10.0.1", - "@types/hast": "^3.0.4" - } - }, "node_modules/side-channel": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", @@ -13870,17 +13576,6 @@ "source-map": "^0.6.0" } }, - "node_modules/space-separated-tokens": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", - "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/spawn-error-forwarder": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz", @@ -14622,17 +14317,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/trim-lines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", - "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/ts-api-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", @@ -14704,17 +14388,16 @@ } }, "node_modules/typedoc": { - "version": "0.26.11", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.11.tgz", - "integrity": "sha512-sFEgRRtrcDl2FxVP58Ze++ZK2UQAEvtvvH8rRlig1Ja3o7dDaMHmaBfvJmdGnNEFaLTpQsN8dpvZaTqJSu/Ugw==", - "dev": true, + "version": "0.27.9", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.27.9.tgz", + "integrity": "sha512-/z585740YHURLl9DN2jCWe6OW7zKYm6VoQ93H0sxZ1cwHQEQrUn5BJrEnkWhfzUdyO+BLGjnKUZ9iz9hKloFDw==", "license": "Apache-2.0", "dependencies": { + "@gerrit0/mini-shiki": "^1.24.0", "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.5", - "shiki": "^1.16.2", - "yaml": "^2.5.1" + "yaml": "^2.6.1" }, "bin": { "typedoc": "bin/typedoc" @@ -14723,14 +14406,46 @@ "node": ">= 18" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x" + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x" + } + }, + "node_modules/typedoc-github-theme": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/typedoc-github-theme/-/typedoc-github-theme-0.2.1.tgz", + "integrity": "sha512-pOgsS9CVAOO3JxQ1V0ocDkrPCULpoWg1OzRmn/mOlyG+vEYwUAp5DAoKrGECdNIomycxcisc8ovcMX0nHDgWTA==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "typedoc": "^0.27.6" + } + }, + "node_modules/typedoc-plugin-markdown": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.4.2.tgz", + "integrity": "sha512-kJVkU2Wd+AXQpyL6DlYXXRrfNrHrEIUgiABWH8Z+2Lz5Sq6an4dQ/hfvP75bbokjNDUskOdFlEEm/0fSVyC7eg==", + "license": "MIT", + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "typedoc": "0.27.x" + } + }, + "node_modules/typedoc-plugin-missing-exports": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-3.1.0.tgz", + "integrity": "sha512-Sogbaj+qDa21NjB3SlIw4JXSwmcl/WOjwiPNaVEcPhpNG/MiRTtpwV81cT7h1cbu9StpONFPbddYWR0KV/fTWA==", + "license": "MIT", + "peerDependencies": { + "typedoc": "0.26.x || 0.27.x" } }, "node_modules/typedoc/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -14740,7 +14455,6 @@ "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -14756,7 +14470,6 @@ "version": "5.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", - "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -14794,7 +14507,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", - "dev": true, "license": "MIT" }, "node_modules/uglify-js": { @@ -14873,79 +14585,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/unist-util-is": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", - "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-position": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", - "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", - "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0", - "unist-util-visit-parents": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit-parents": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", - "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/universal-user-agent": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", @@ -15042,36 +14681,6 @@ "node": ">= 0.8" } }, - "node_modules/vfile": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", - "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/vfile-message": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", - "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/vite": { "version": "5.4.21", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", @@ -15378,7 +14987,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", - "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" @@ -15454,17 +15062,6 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - }, - "node_modules/zwitch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", - "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } } } } diff --git a/package.json b/package.json index c21a59e291..9f3e51e408 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,8 @@ "clean": "rimraf dist", "build": "npm run clean && NODE_ENV=production rollup -c", "build:types": "rimraf dist/typings && tsc --declaration --noEmit false --emitDeclarationOnly true --allowJs false", - "build:docs": "typedoc", - "docs:dev": "npm run build:docs", + "build:docs": "typedoc --options typedoc.json", + "docs:dev": "npm run build && npm run build:docs", "docs:watch": "nodemon --exec npm run docs:dev -w lib typings", "docs:publish": "npm run build:docs && ./node_modules/contentful-sdk-jsdoc/bin/publish-docs.sh contentful-management.js contentful-management", "lint": "eslint lib test", @@ -75,7 +75,10 @@ "axios": "^1.12.2", "contentful-sdk-core": "^9.2.1", "fast-copy": "^3.0.0", - "globals": "^15.15.0" + "globals": "^15.15.0", + "typedoc-github-theme": "^0.2.1", + "typedoc-plugin-markdown": "^4.4.2", + "typedoc-plugin-missing-exports": "^3.1.0" }, "devDependencies": { "@contentful/integration-test-utils": "^2.0.1", @@ -114,7 +117,7 @@ "semantic-release": "^25.0.2", "size-limit": "^11.1.6", "type-fest": "^4.18.3", - "typedoc": "^0.26.2", + "typedoc": "^0.27.9", "typescript": "^5.6.3", "typescript-eslint": "^8.16.0", "vitest": "^2.1.5" diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000000..1eddfb06f1 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,29 @@ +{ + "name": "contentful-management.js", + "entryPoints": [ + "lib/contentful-management.ts", + "lib/plain/plain-client.ts", + "lib/plain/wrappers/wrap.ts", + "lib/contentful-management.ts", + "lib/create-adapter.ts", + "lib/create-contentful-api.ts", + "lib/entities/app-action.ts", + "lib/entities/environment-template-installation.ts" + ], + "out": "out", + "includeVersion": true, + "categorizeByGroup": true, + "categoryOrder": ["Core", "Clients", "Entities", "Utilities", "*"], + "readme": "README.md", + "excludePrivate": false, + "excludeInternal": false, + "excludeProtected": false, + "treatWarningsAsErrors": true, + "sort": ["source-order"], + "plugin": [ + "typedoc-plugin-missing-exports", + "typedoc-github-theme" + //"typedoc-plugin-markdown" + ], + "theme": "typedoc-github-theme" +} From a97d6791360a8c52e7ffa0d3e6cecd70007bf1a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Thu, 20 Mar 2025 13:31:10 +0100 Subject: [PATCH 02/11] dx: simplify doc scripts to essentials --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9f3e51e408..2a04ef4087 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,8 @@ "clean": "rimraf dist", "build": "npm run clean && NODE_ENV=production rollup -c", "build:types": "rimraf dist/typings && tsc --declaration --noEmit false --emitDeclarationOnly true --allowJs false", - "build:docs": "typedoc --options typedoc.json", - "docs:dev": "npm run build && npm run build:docs", - "docs:watch": "nodemon --exec npm run docs:dev -w lib typings", + "docs:build": "typedoc --options typedoc.json", + "docs:dev": "npm run docs:build -- --watch", "docs:publish": "npm run build:docs && ./node_modules/contentful-sdk-jsdoc/bin/publish-docs.sh contentful-management.js contentful-management", "lint": "eslint lib test", "pretest": "rimraf coverage && npm run lint", From 08022d49573a5c75902ecfbeb3d2357551dc6c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Thu, 20 Mar 2025 14:56:14 +0100 Subject: [PATCH 03/11] refactor: further improving and cleaning up typedocs config --- package.json | 11 +++++------ typedoc.json | 53 +++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 45 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 2a04ef4087..986d5ad057 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "clean": "rimraf dist", "build": "npm run clean && NODE_ENV=production rollup -c", "build:types": "rimraf dist/typings && tsc --declaration --noEmit false --emitDeclarationOnly true --allowJs false", - "docs:build": "typedoc --options typedoc.json", + "docs:build": "typedoc", "docs:dev": "npm run docs:build -- --watch", "docs:publish": "npm run build:docs && ./node_modules/contentful-sdk-jsdoc/bin/publish-docs.sh contentful-management.js contentful-management", "lint": "eslint lib test", @@ -74,10 +74,7 @@ "axios": "^1.12.2", "contentful-sdk-core": "^9.2.1", "fast-copy": "^3.0.0", - "globals": "^15.15.0", - "typedoc-github-theme": "^0.2.1", - "typedoc-plugin-markdown": "^4.4.2", - "typedoc-plugin-missing-exports": "^3.1.0" + "globals": "^15.15.0" }, "devDependencies": { "@contentful/integration-test-utils": "^2.0.1", @@ -116,7 +113,9 @@ "semantic-release": "^25.0.2", "size-limit": "^11.1.6", "type-fest": "^4.18.3", - "typedoc": "^0.27.9", + "typedoc": "^0.28.1", + "typedoc-github-theme": "^0.2.1", + "typedoc-plugin-missing-exports": "^3.1.0", "typescript": "^5.6.3", "typescript-eslint": "^8.16.0", "vitest": "^2.1.5" diff --git a/typedoc.json b/typedoc.json index 1eddfb06f1..200dd2105e 100644 --- a/typedoc.json +++ b/typedoc.json @@ -2,28 +2,55 @@ "name": "contentful-management.js", "entryPoints": [ "lib/contentful-management.ts", - "lib/plain/plain-client.ts", - "lib/plain/wrappers/wrap.ts", - "lib/contentful-management.ts", - "lib/create-adapter.ts", - "lib/create-contentful-api.ts", - "lib/entities/app-action.ts", - "lib/entities/environment-template-installation.ts" + // "lib/plain/plain-client.ts", + // "lib/plain/wrappers/wrap.ts", + // "lib/contentful-management.ts", + // "lib/create-adapter.ts", + // "lib/create-contentful-api.ts", + // "lib/entities/app-action.ts", + // "lib/entities/environment-template-installation.ts" ], "out": "out", "includeVersion": true, - "categorizeByGroup": true, - "categoryOrder": ["Core", "Clients", "Entities", "Utilities", "*"], + // "categorizeByGroup": true, + // "categoryOrder": ["Core", "Clients", "Entities", "Utilities", "*"], + "categoryOrder": ["createClient", "ClientParams", "ContentType", "Entry", "*"], + // "groupOrder": ["Variables", "Functions", "*"], + "kindSortOrder": [ + "Reference", + "Project", + "Module", + "Namespace", + "Constructor", + "Property", + "Function", + "Enum", + "EnumMember", + "Class", + "Interface", + "TypeAlias", + "Variable", + "Accessor", + "Method", + "Parameter", + "TypeParameter", + "TypeLiteral", + "CallSignature", + "ConstructorSignature", + "IndexSignature", + "GetSignature", + "SetSignature" + ], + "sortEntryPoints": false, "readme": "README.md", "excludePrivate": false, "excludeInternal": false, "excludeProtected": false, - "treatWarningsAsErrors": true, + "treatWarningsAsErrors": false, "sort": ["source-order"], "plugin": [ "typedoc-plugin-missing-exports", "typedoc-github-theme" - //"typedoc-plugin-markdown" ], - "theme": "typedoc-github-theme" -} + "hideGenerator": true, +} \ No newline at end of file From 19e20c1ec55ba6ff5731f45fb143cd469e3842ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Thu, 20 Mar 2025 14:57:22 +0100 Subject: [PATCH 04/11] refactor: use @returns instead of @return to match typedocs standard --- lib/create-app-definition-api.ts | 16 ++--- lib/create-contentful-api.ts | 38 +++++----- lib/create-entry-api.ts | 14 ++-- lib/create-environment-api.ts | 94 ++++++++++++------------- lib/create-environment-template-api.ts | 14 ++-- lib/create-organization-api.ts | 78 ++++++++++---------- lib/create-space-api.ts | 76 ++++++++++---------- lib/create-ui-config-api.ts | 2 +- lib/create-user-ui-config-api.ts | 2 +- lib/entities/access-token.ts | 6 +- lib/entities/api-key.ts | 6 +- lib/entities/app-access-token.ts | 2 +- lib/entities/app-action-call.ts | 4 +- lib/entities/app-action.ts | 6 +- lib/entities/app-bundle.ts | 6 +- lib/entities/app-definition.ts | 4 +- lib/entities/app-details.ts | 6 +- lib/entities/app-event-subscription.ts | 4 +- lib/entities/app-installation.ts | 6 +- lib/entities/app-key.ts | 6 +- lib/entities/app-signed-request.ts | 2 +- lib/entities/app-signing-secret.ts | 4 +- lib/entities/app-upload.ts | 6 +- lib/entities/asset-key.ts | 2 +- lib/entities/asset.ts | 18 ++--- lib/entities/bulk-action.ts | 2 +- lib/entities/content-type.ts | 14 ++-- lib/entities/editor-interface.ts | 4 +- lib/entities/entry.ts | 2 +- lib/entities/environment-alias.ts | 8 +-- lib/entities/extension.ts | 6 +- lib/entities/function-log.ts | 4 +- lib/entities/function.ts | 2 +- lib/entities/locale.ts | 6 +- lib/entities/oauth-application.ts | 10 +-- lib/entities/organization-invitation.ts | 2 +- lib/entities/organization-membership.ts | 4 +- lib/entities/organization.ts | 2 +- lib/entities/personal-access-token.ts | 6 +- lib/entities/preview-api-key.ts | 2 +- lib/entities/release-action.ts | 2 +- lib/entities/release.ts | 2 +- lib/entities/resource-provider.ts | 10 +-- lib/entities/resource-type.ts | 6 +- lib/entities/role.ts | 6 +- lib/entities/snapshot.ts | 4 +- lib/entities/space-member.ts | 2 +- lib/entities/space-membership.ts | 6 +- lib/entities/space.ts | 2 +- lib/entities/team-membership.ts | 6 +- lib/entities/team-space-membership.ts | 6 +- lib/entities/team.ts | 6 +- lib/entities/ui-config.ts | 2 +- lib/entities/upload-credential.ts | 4 +- lib/entities/upload.ts | 4 +- lib/entities/usage.ts | 2 +- lib/entities/user-ui-config.ts | 2 +- lib/entities/user.ts | 4 +- lib/entities/webhook.ts | 12 ++-- 59 files changed, 292 insertions(+), 292 deletions(-) diff --git a/lib/create-app-definition-api.ts b/lib/create-app-definition-api.ts index b8acaa8f5b..59459e5ed6 100644 --- a/lib/create-app-definition-api.ts +++ b/lib/create-app-definition-api.ts @@ -23,7 +23,7 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { return { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -55,7 +55,7 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -83,7 +83,7 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { /** * Gets an app bundle * @param id - AppBundle ID - * @return Promise for an AppBundle + * @returns Promise for an AppBundle * @example * ```javascript * const contentful = require('contentful-management') @@ -113,7 +113,7 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { /** * Gets a collection of AppBundles - * @return Promise for a collection of AppBundles + * @returns Promise for a collection of AppBundles * @example * ```javascript * const contentful = require('contentful-management') @@ -140,7 +140,7 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { /** * Creates an app bundle * @param Object representation of the App Bundle to be created - * @return Promise for the newly created AppBundle + * @returns Promise for the newly created AppBundle * @example * ```javascript * const contentful = require('contentful-management') @@ -170,7 +170,7 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { /** * Gets a list of App Installations across an org for given organization and App Definition * If a spaceId is provided in the query object, it will return the App Installations for that specific space. - * @return Promise for the newly created AppBundle + * @returns Promise for the newly created AppBundle * @example * ```javascript * const contentful = require('contentful-management') @@ -200,7 +200,7 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { /** * Creates or updates a resource provider * @param data representation of the ResourceProvider - * @return Promise for the newly created or updated ResourceProvider + * @returns Promise for the newly created or updated ResourceProvider * @example * ```javascript * const contentful = require('contentful-management') @@ -242,7 +242,7 @@ export default function createAppDefinitionApi(makeRequest: MakeRequest) { }, /** * Gets a Resource Provider - * @return Promise for a Resource Provider + * @returns Promise for a Resource Provider * @example * ```javascript * const contentful = require('contentful-management') diff --git a/lib/create-contentful-api.ts b/lib/create-contentful-api.ts index d7c83cdd50..1875cd8708 100644 --- a/lib/create-contentful-api.ts +++ b/lib/create-contentful-api.ts @@ -57,7 +57,7 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets all environment templates for a given organization with the lasted version * @param organizationId - Organization ID - * @return Promise for a collection of EnvironmentTemplates + * @returns Promise for a collection of EnvironmentTemplates * ```javascript * const contentful = require('contentful-management') * @@ -86,7 +86,7 @@ export default function createClientApi(makeRequest: MakeRequest) { * @param params.organizationId - Organization ID * @param params.environmentTemplateId - Environment template ID * @param [params.version] - Template version number to return a specific version of the environment template - * @return Promise for a EnvironmentTemplate + * @returns Promise for a EnvironmentTemplate * ```javascript * const contentful = require('contentful-management') * @@ -127,7 +127,7 @@ export default function createClientApi(makeRequest: MakeRequest) { * Creates an environment template * @param organizationId - Organization ID * @param environmentTemplateData - Object representation of the environment template to be created - * @return Promise for the newly created EnvironmentTemplate + * @returns Promise for the newly created EnvironmentTemplate * @example * ```javascript * const contentful = require('contentful-management') @@ -154,7 +154,7 @@ export default function createClientApi(makeRequest: MakeRequest) { }, /** * Gets all spaces - * @return Promise for a collection of Spaces + * @returns Promise for a collection of Spaces * ```javascript * const contentful = require('contentful-management') * @@ -180,7 +180,7 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets a space * @param spaceId - Space ID - * @return Promise for a Space + * @returns Promise for a Space * ```javascript * const contentful = require('contentful-management') * @@ -205,7 +205,7 @@ export default function createClientApi(makeRequest: MakeRequest) { * Creates a space * @param spaceData - Object representation of the Space to be created * @param organizationId - Organization ID, if the associated token can manage more than one organization. - * @return Promise for the newly created Space + * @returns Promise for the newly created Space * @example * ```javascript * const contentful = require('contentful-management') @@ -236,7 +236,7 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets an organization * @param id - Organization ID - * @return Promise for a Organization + * @returns Promise for a Organization * @example * ```javascript * const contentful = require('contentful-management') @@ -260,7 +260,7 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets a collection of Organizations - * @return Promise for a collection of Organizations + * @returns Promise for a collection of Organizations * @example * ```javascript * const contentful = require('contentful-management') @@ -286,7 +286,7 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets the authenticated user - * @return Promise for a User + * @returns Promise for a User * @example * ```javascript * const contentful = require('contentful-management') @@ -399,7 +399,7 @@ export default function createClientApi(makeRequest: MakeRequest) { }, /** * Gets App Definition - * @return Promise for App Definition + * @returns Promise for App Definition * @example * ```javascript * const contentful = require('contentful-management') @@ -427,7 +427,7 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Creates a personal access token * @param data - personal access token config - * @return Promise for a Token + * @returns Promise for a Token * @example * ```javascript * const contentful = require('contentful-management') @@ -468,7 +468,7 @@ export default function createClientApi(makeRequest: MakeRequest) { * * Gets a personal access token * @param tokenId - personal access token config - * @return Promise for a Token + * @returns Promise for a Token * @example * ```javascript * const contentful = require('contentful-management') @@ -494,7 +494,7 @@ export default function createClientApi(makeRequest: MakeRequest) { * @deprecated - use getAccessTokens instead * * Gets all personal access tokens - * @return Promise for a Token + * @returns Promise for a Token * @example * ```javascript * const contentful = require('contentful-management') @@ -519,7 +519,7 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets a users access token * @param tokenId - users access token config - * @return Promise for a Token + * @returns Promise for a Token * @example * ```javascript * const contentful = require('contentful-management') @@ -543,7 +543,7 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Gets all user access tokens - * @return Promise for a Token + * @returns Promise for a Token * @example * ```javascript * const contentful = require('contentful-management') @@ -568,7 +568,7 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Retrieves a list of redacted versions of access tokens for an organization, accessible to owners or administrators of an organization. * - * @return Promise for a Token + * @returns Promise for a Token * @example * ```javascript * const contentful = require('contentful-management') @@ -598,7 +598,7 @@ export default function createClientApi(makeRequest: MakeRequest) { * * @param organizationId - Id of an organization * @param query - Query parameters - * @return Promise of a collection of usages + * @returns Promise of a collection of usages * @example * ```javascript * @@ -634,7 +634,7 @@ export default function createClientApi(makeRequest: MakeRequest) { * * @param organizationId - Id of an organization * @param query - Query parameters - * @return Promise of a collection of usages + * @returns Promise of a collection of usages * ```javascript * const contentful = require('contentful-management') * @@ -668,7 +668,7 @@ export default function createClientApi(makeRequest: MakeRequest) { /** * Make a custom request to the Contentful management API's /spaces endpoint * @param opts - axios request options (https://github.com/mzabriskie/axios) - * @return Promise for the response data + * @returns Promise for the response data * ```javascript * const contentful = require('contentful-management') * diff --git a/lib/create-entry-api.ts b/lib/create-entry-api.ts index 3ec68a8707..8bbc0c7bc6 100644 --- a/lib/create-entry-api.ts +++ b/lib/create-entry-api.ts @@ -35,7 +35,7 @@ export default function createEntryApi(makeRequest: MakeRequest) { return { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -68,7 +68,7 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Sends an JSON patch to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -107,7 +107,7 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -132,7 +132,7 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Publishes the object - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @example * ```javascript * const contentful = require('contentful-management') @@ -162,7 +162,7 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Unpublishes the object - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @example * ```javascript * const contentful = require('contentful-management') @@ -192,7 +192,7 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Archives the object - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @example * ```javascript * const contentful = require('contentful-management') @@ -221,7 +221,7 @@ export default function createEntryApi(makeRequest: MakeRequest) { /** * Unarchives the object - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @example * ```javascript * const contentful = require('contentful-management') diff --git a/lib/create-environment-api.ts b/lib/create-environment-api.ts index 210a873d1f..7baa7557e3 100644 --- a/lib/create-environment-api.ts +++ b/lib/create-environment-api.ts @@ -85,14 +85,14 @@ export type ContentfulEnvironmentAPI = ReturnType /** * Creates API object with methods to access the Environment API * @param {ContentfulEnvironmentAPI} makeRequest - function to make requests via an adapter - * @return {ContentfulSpaceAPI} + * @returns {ContentfulSpaceAPI} * @private */ export default function createEnvironmentApi(makeRequest: MakeRequest) { return { /** * Deletes the environment - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -120,7 +120,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { }, /** * Updates the environment - * @return Promise for the updated environment. + * @returns Promise for the updated environment. * @example * ```javascript * const contentful = require('contentful-management') @@ -153,7 +153,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Creates SDK Entry object (locally) from entry data * @param entryData - Entry Data - * @return Entry + * @returns Entry * @example * ```javascript * environment.getEntry('entryId').then(entry => { @@ -187,7 +187,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Creates SDK Asset object (locally) from entry data * @param assetData - Asset ID - * @return Asset + * @returns Asset * @example * ```javascript * environment.getAsset('asset_id').then(asset => { @@ -435,7 +435,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets a Content Type * @param contentTypeId - Content Type ID - * @return Promise for a Content Type + * @returns Promise for a Content Type * @example * ```javascript * const contentful = require('contentful-management') @@ -468,7 +468,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets a collection of Content Types * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise for a collection of Content Types + * @returns Promise for a collection of Content Types * @example * ```javascript * const contentful = require('contentful-management') @@ -499,7 +499,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Creates a Content Type * @param data - Object representation of the Content Type to be created - * @return Promise for the newly created Content Type + * @returns Promise for the newly created Content Type * @example * ```javascript * const contentful = require('contentful-management') @@ -543,7 +543,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a Content Type with a custom ID * @param contentTypeId - Content Type ID * @param data - Object representation of the Content Type to be created - * @return Promise for the newly created Content Type + * @returns Promise for the newly created Content Type * @example * ```javascript * const contentful = require('contentful-management') @@ -588,7 +588,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets an EditorInterface for a ContentType * @param contentTypeId - Content Type ID - * @return Promise for an EditorInterface + * @returns Promise for an EditorInterface * @example * ```javascript * const contentful = require('contentful-management') @@ -619,7 +619,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets all EditorInterfaces - * @return Promise for a collection of EditorInterface + * @returns Promise for a collection of EditorInterface * @example * ```javascript * const contentful = require('contentful-management') @@ -653,7 +653,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * from your entry in the backend * @param id - Entry ID * @param query - Object with search parameters. In this method it's only useful for `locale`. - * @return Promise for an Entry + * @returns Promise for an Entry * @example * ```javascript * const contentful = require('contentful-management') @@ -686,7 +686,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Deletes an Entry of this environment * @param id - Entry ID - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -722,7 +722,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Warning: if you are using the select operator, when saving, any field that was not selected will be removed * from your entry in the backend * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise for a collection of Entries + * @returns Promise for a collection of Entries * @example * ```javascript * const contentful = require('contentful-management') @@ -754,7 +754,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets a collection of published Entries * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise for a collection of published Entries + * @returns Promise for a collection of published Entries * @example * ```javascript * const contentful = require('contentful-management') @@ -787,7 +787,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a Entry * @param contentTypeId - The Content Type ID of the newly created Entry * @param data - Object representation of the Entry to be created - * @return Promise for the newly created Entry + * @returns Promise for the newly created Entry * @example * ```javascript * const contentful = require('contentful-management') @@ -828,7 +828,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param contentTypeId - The Content Type of the newly created Entry * @param id - Entry ID * @param data - Object representation of the Entry to be created - * @return Promise for the newly created Entry + * @returns Promise for the newly created Entry * @example * ```javascript * const contentful = require('contentful-management') @@ -909,7 +909,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * from your entry in the backend * @param id - Asset ID * @param query - Object with search parameters. In this method it's only useful for `locale`. - * @return Promise for an Asset + * @returns Promise for an Asset * @example * ```javascript * const contentful = require('contentful-management') @@ -944,7 +944,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Warning: if you are using the select operator, when saving, any field that was not selected will be removed * from your entry in the backend * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise for a collection of Assets + * @returns Promise for a collection of Assets * @example * ```javascript * const contentful = require('contentful-management') @@ -975,7 +975,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets a collection of published Assets * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise for a collection of published Assets + * @returns Promise for a collection of published Assets * @example * ```javascript * const contentful = require('contentful-management') @@ -1006,7 +1006,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Creates a Asset. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing. * @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. - * @return Promise for the newly created Asset + * @returns Promise for the newly created Asset * @example * ```javascript * const client = contentful.createClient({ @@ -1051,7 +1051,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a Asset with a custom ID. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing. * @param id - Asset ID * @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. - * @return Promise for the newly created Asset + * @returns Promise for the newly created Asset * @example * ```javascript * const client = contentful.createClient({ @@ -1095,7 +1095,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a Asset based on files. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing. * @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. * @param data.fields.file.[LOCALE].file - Can be a string, an ArrayBuffer or a Stream. - * @return Promise for the newly created Asset + * @returns Promise for the newly created Asset * @example * ```javascript * const client = contentful.createClient({ @@ -1141,7 +1141,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates an asset key for signing asset URLs (Embargoed Assets) * @param data Object with request payload * @param data.expiresAt number a UNIX timestamp in the future (but not more than 48 hours from time of calling) - * @return Promise for the newly created AssetKey + * @returns Promise for the newly created AssetKey * @example * ```javascript * const client = contentful.createClient({ @@ -1174,7 +1174,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets an Upload * @param id - Upload ID - * @return Promise for an Upload + * @returns Promise for an Upload * @example * ```javascript * const client = contentful.createClient({ @@ -1205,7 +1205,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a Upload. * @param data - Object with file information. * @param data.file - Actual file content. Can be a string, an ArrayBuffer or a Stream. - * @return Upload object containing information about the uploaded file. + * @returns Upload object containing information about the uploaded file. * @example * ```javascript * const client = contentful.createClient({ @@ -1235,7 +1235,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets a Locale * @param localeId - Locale ID - * @return Promise for an Locale + * @returns Promise for an Locale * @example * ```javascript * const contentful = require('contentful-management') @@ -1266,7 +1266,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets a collection of Locales - * @return Promise for a collection of Locales + * @returns Promise for a collection of Locales * @example * ```javascript * const contentful = require('contentful-management') @@ -1297,7 +1297,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Creates a Locale * @param data - Object representation of the Locale to be created - * @return Promise for the newly created Locale + * @returns Promise for the newly created Locale * @example * ```javascript * const contentful = require('contentful-management') @@ -1334,7 +1334,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets an UI Extension * @param id - Extension ID - * @return Promise for an UI Extension + * @returns Promise for an UI Extension * @example * ```javascript * const contentful = require('contentful-management') @@ -1364,7 +1364,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { }, /** * Gets a collection of UI Extension - * @return Promise for a collection of UI Extensions + * @returns Promise for a collection of UI Extensions * @example * ```javascript * const contentful = require('contentful-management') @@ -1394,7 +1394,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Creates a UI Extension * @param data - Object representation of the UI Extension to be created - * @return Promise for the newly created UI Extension + * @returns Promise for the newly created UI Extension * @example * ```javascript * const contentful = require('contentful-management') @@ -1440,7 +1440,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates a UI Extension with a custom ID * @param id - Extension ID * @param data - Object representation of the UI Extension to be created - * @return Promise for the newly created UI Extension + * @returns Promise for the newly created UI Extension * @example * ```javascript * const contentful = require('contentful-management') @@ -1489,7 +1489,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param appDefinitionId - AppDefinition ID * @param data - AppInstallation data * @param options.acceptAllTerms - Flag for accepting Apps' Marketplace EULA, Terms, and Privacy policy (need to pass `{acceptAllTerms: true}` to install a marketplace app) - * @return Promise for an App Installation + * @returns Promise for an App Installation * @example * ```javascript * const contentful = require('contentful-management') @@ -1530,7 +1530,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets an App Installation * @param id - AppDefintion ID - * @return Promise for an App Installation + * @returns Promise for an App Installation * @example * ```javascript * const contentful = require('contentful-management') @@ -1560,7 +1560,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { }, /** * Gets a collection of App Installation - * @return Promise for a collection of App Installations + * @returns Promise for a collection of App Installations * @example * ```javascript * const contentful = require('contentful-management') @@ -1592,7 +1592,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param appDefinitionId - AppDefinition ID * @param appActionId - action ID * @param data - App Action Call data - * @return Promise for an App Action Call + * @returns Promise for an App Action Call * @example * ```javascript * const contentful = require('contentful-management') @@ -1679,7 +1679,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates an app signed request * @param appDefinitionId - AppDefinition ID * @param data - SignedRequest data - * @return Promise for a Signed Request + * @returns Promise for a Signed Request * @example * ```javascript * const contentful = require('contentful-management') @@ -1721,7 +1721,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Creates an app access token * @param appDefinitionId - AppDefinition ID * @param data - Json Web Token - * @return Promise for an app access token + * @returns Promise for an app access token * @example * ```javascript * const contentful = require('contentful-management') @@ -1761,7 +1761,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets a collection of Functions for a given environment * @param appInstallationId * @param {import('../common-types').AcceptsQueryOptions} query - optional query parameter for filtering functions by action - * @return Promise containing wrapped collection of Functions in an environment + * @returns Promise containing wrapped collection of Functions in an environment * @example * ```javascript * const contentful = require('contentful-management') @@ -1796,7 +1796,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param appInstallationId * @param functionId * @param {import('../common-types').CursorBasedParams} query - optional query parameter for pagination (limit, nextPage, prevPage) - * @return Promise containing wrapped collection of FunctionLogs + * @returns Promise containing wrapped collection of FunctionLogs * @example * ```javascript * const contentful = require('contentful-management') @@ -1853,7 +1853,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @param appInstallationId * @param functionId * @param logId - * @return Promise containing a wrapped FunctionLog + * @returns Promise containing a wrapped FunctionLog * @example * ```javascript * const contentful = require('contentful-management') @@ -1896,7 +1896,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @func getEntrySnapshots * @param entryId - Entry ID * @param query - query additional query paramaters - * @return Promise for a collection of Entry Snapshots + * @returns Promise for a collection of Entry Snapshots * @example * ```javascript * const contentful = require('contentful-management') @@ -1930,7 +1930,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * @func getContentTypeSnapshots * @param contentTypeId - Content Type ID * @param query - query additional query paramaters - * @return Promise for a collection of Content Type Snapshots + * @returns Promise for a collection of Content Type Snapshots * @example * ```javascript * const contentful = require('contentful-management') @@ -2489,7 +2489,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets a collection of all environment template installations in the environment for a given template * @param environmentTemplateId - Environment template ID to return installations for * @param [options.installationId] - Installation ID to filter for a specific installation - * @return Promise for a collection of EnvironmentTemplateInstallations + * @returns Promise for a collection of EnvironmentTemplateInstallations * ```javascript * const contentful = require('contentful-management') * @@ -2526,7 +2526,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { /** * Gets a collection of all resource types based on native external references app installations in the environment * @param query - BasicCursorPaginationOptions - * @return Promise for a collection of ResourceTypes + * @returns Promise for a collection of ResourceTypes * ```javascript * const contentful = require('contentful-management') * @@ -2559,7 +2559,7 @@ export default function createEnvironmentApi(makeRequest: MakeRequest) { * Gets a collection of all resources for a given resource type based on native external references app installations in the environment * @param resourceTypeId - Id of the resourceType to get its resources * @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 - * @return Promise for a collection of Resources for a given resourceTypeId + * @returns Promise for a collection of Resources for a given resourceTypeId * ```javascript * const contentful = require('contentful-management') * diff --git a/lib/create-environment-template-api.ts b/lib/create-environment-template-api.ts index 2aaded7c2e..2b8ab55eea 100644 --- a/lib/create-environment-template-api.ts +++ b/lib/create-environment-template-api.ts @@ -18,7 +18,7 @@ export function createEnvironmentTemplateApi(makeRequest: MakeRequest, organizat return { /** * Updates a environment template - * @return Promise for new version of the template + * @returns Promise for new version of the template * ```javascript * const contentful = require('contentful-management') * @@ -49,7 +49,7 @@ export function createEnvironmentTemplateApi(makeRequest: MakeRequest, organizat * Updates environment template version data * @param version.versionName - Name of the environment template version * @param version.versionDescription - Description of the environment template version - * @return Promise for an updated EnvironmentTemplate + * @returns Promise for an updated EnvironmentTemplate * ```javascript * const contentful = require('contentful-management') * @@ -86,7 +86,7 @@ export function createEnvironmentTemplateApi(makeRequest: MakeRequest, organizat }, /** * Deletes the environment template - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -111,7 +111,7 @@ export function createEnvironmentTemplateApi(makeRequest: MakeRequest, organizat }, /** * Gets a collection of all versions for the environment template - * @return Promise for a EnvironmentTemplate + * @returns Promise for a EnvironmentTemplate * ```javascript * const contentful = require('contentful-management') * @@ -187,7 +187,7 @@ export function createEnvironmentTemplateApi(makeRequest: MakeRequest, organizat * @param [params.version] - Version of the template * @param [params.installation.takeover] - Already existing Content types to takeover in the target environment * @param [params.changeSet] - Change set which should be applied - * @return Promise for a EnvironmentTemplateValidation + * @returns Promise for a EnvironmentTemplateValidation * ```javascript * const contentful = require('contentful-management') * @@ -239,7 +239,7 @@ export function createEnvironmentTemplateApi(makeRequest: MakeRequest, organizat * @param params.installation.version- Template version which should be installed * @param [params.installation.takeover] - Already existing Content types tp takeover in the target environment * @param [params.changeSet] - Change set which should be applied - * @return Promise for a EnvironmentTemplateInstallation + * @returns Promise for a EnvironmentTemplateInstallation * ```javascript * const contentful = require('contentful-management') * @@ -284,7 +284,7 @@ export function createEnvironmentTemplateApi(makeRequest: MakeRequest, organizat * Disconnects the template from a given environment * @param params.spaceId - Space ID where the template should be installed into * @param params.environmentId - Environment ID where the template should be installed into - * @return Promise for the disconnection with no data + * @returns Promise for the disconnection with no data * ```javascript * const contentful = require('contentful-management') * diff --git a/lib/create-organization-api.ts b/lib/create-organization-api.ts index a81aa1be48..9b331e808c 100644 --- a/lib/create-organization-api.ts +++ b/lib/create-organization-api.ts @@ -49,7 +49,7 @@ export type ContentfulOrganizationAPI = ReturnType /** * Creates API object with methods to access the Organization API * @param {MakeRequest} makeRequest - function to make requests via an adapter - * @return {ContentfulOrganizationAPI} + * @returns {ContentfulOrganizationAPI} * @private */ export default function createOrganizationApi(makeRequest: MakeRequest) { @@ -57,7 +57,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets a collection of spaces in the organization * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise a collection of Spaces in the organization + * @returns Promise a collection of Spaces in the organization * @example * ```javascript * const contentful = require('contentful-management') @@ -85,7 +85,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets a User - * @return Promise for a User + * @returns Promise for a User * @example * ```javascript * const contentful = require('contentful-management') @@ -110,7 +110,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets a collection of Users in organization * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise a collection of Users in organization + * @returns Promise a collection of Users in organization * @example * ```javascript * const contentful = require('contentful-management') @@ -138,7 +138,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an Organization Membership * @param id - Organization Membership ID - * @return Promise for an Organization Membership + * @returns Promise for an Organization Membership * @example * ```javascript * const contentful = require('contentful-management') @@ -167,7 +167,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets a collection of Organization Memberships * @param params - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise for a collection of Organization Memberships + * @returns Promise for a collection of Organization Memberships * @example * ```javascript * const contentful = require('contentful-management') @@ -277,7 +277,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { * Creates a Team membership * @param teamId - Id of the team the membership will be created in * @param data - Object representation of the Team Membership to be created - * @return Promise for the newly created TeamMembership + * @returns Promise for the newly created TeamMembership * @example * ```javascript * const contentful = require('contentful-management') @@ -306,7 +306,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets an Team Membership from the team with given teamId - * @return Promise for an Team Membership + * @returns Promise for an Team Membership * @example * ```javascript * const contentful = require('contentful-management') @@ -331,7 +331,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Get all Team Memberships. If teamID is provided in the optional config object, it will return all Team Memberships in that team. By default, returns all team memberships for the organization. - * @return Promise for a Team Membership Collection + * @returns Promise for a Team Membership Collection * @example * ```javascript * const contentful = require('contentful-management') @@ -373,7 +373,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Get all Team Space Memberships. If teamID is provided in the optional config object, it will return all Team Space Memberships in that team. By default, returns all team space memberships across all teams in the organization. - * @return Promise for a Team Space Membership Collection + * @returns Promise for a Team Space Membership Collection * @example * ```javascript * const contentful = require('contentful-management') @@ -402,7 +402,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Get a Team Space Membership with given teamSpaceMembershipId - * @return Promise for a Team Space Membership + * @returns Promise for a Team Space Membership * @example * ```javascript * const contentful = require('contentful-management') @@ -431,7 +431,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an Space Membership in Organization * @param id - Organiztion Space Membership ID - * @return Promise for a Space Membership in an organization + * @returns Promise for a Space Membership in an organization * @example * ```javascript * const contentful = require('contentful-management') @@ -459,7 +459,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets a collection Space Memberships in organization * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise for a Space Membership collection across all spaces in the organization + * @returns Promise for a Space Membership collection across all spaces in the organization * @example * ```javascript * const contentful = require('contentful-management') @@ -486,7 +486,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets an Invitation in Organization - * @return Promise for a OrganizationInvitation in an organization + * @returns Promise for a OrganizationInvitation in an organization * @example * ```javascript * const contentful = require('contentful-management') @@ -513,7 +513,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Create an Invitation in Organization - * @return Promise for a OrganizationInvitation in an organization + * @returns Promise for a OrganizationInvitation in an organization * @example * ```javascript * const contentful = require('contentful-management') @@ -544,7 +544,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets a collection of Roles - * @return Promise for a collection of Roles + * @returns Promise for a collection of Roles * @example * ```javascript * const contentful = require('contentful-management') @@ -570,7 +570,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Creates an app definition * @param Object representation of the App Definition to be created - * @return Promise for the newly created AppDefinition + * @returns Promise for the newly created AppDefinition * @example * ```javascript * const contentful = require('contentful-management') @@ -599,7 +599,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets all app definitions - * @return Promise for a collection of App Definitions + * @returns Promise for a collection of App Definitions * @example * ```javascript * const contentful = require('contentful-management') @@ -624,7 +624,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an app definition - * @return Promise for an App Definition + * @returns Promise for an App Definition * @example * ```javascript * const contentful = require('contentful-management') @@ -649,7 +649,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Gets an app upload - * @return Promise for an App Upload + * @returns Promise for an App Upload * @example * ```javascript * const contentful = require('contentful-management') @@ -675,7 +675,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { /** * Creates an app upload - * @return Promise for an App Upload + * @returns Promise for an App Upload * @example * ```javascript * const contentful = require('contentful-management') @@ -701,7 +701,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Creates or updates an app signing secret - * @return Promise for an App SigningSecret + * @returns Promise for an App SigningSecret * @example * ```javascript * const contentful = require('contentful-management') @@ -727,7 +727,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets an app signing secret - * @return Promise for an App SigningSecret + * @returns Promise for an App SigningSecret * @example * ```javascript * const contentful = require('contentful-management') @@ -752,7 +752,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Deletes an app signing secret - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -779,7 +779,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Creates or updates an app event subscription - * @return Promise for an App Event Subscription + * @returns Promise for an App Event Subscription * @example * ```javascript * const contentful = require('contentful-management') @@ -805,7 +805,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets an app event subscription - * @return Promise for an App Event Subscription + * @returns Promise for an App Event Subscription * @example * ```javascript * const contentful = require('contentful-management') @@ -830,7 +830,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Deletes the current App Event Subscription for the given App - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -857,7 +857,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Creates or updates an app event subscription - * @return Promise for an App Event Subscription + * @returns Promise for an App Event Subscription * @example * ```javascript * const contentful = require('contentful-management') @@ -890,7 +890,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets an app key by fingerprint - * @return Promise for an App Key + * @returns Promise for an App Key * @example * ```javascript * const contentful = require('contentful-management') @@ -915,7 +915,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets all keys for the given app - * @return Promise for an array of App Keys + * @returns Promise for an array of App Keys * @example * ```javascript * const contentful = require('contentful-management') @@ -951,7 +951,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Deletes an app key by fingerprint. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -978,7 +978,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Creates or updates an app details entity - * @return Promise for an App Details + * @returns Promise for an App Details * @example * ```javascript * const contentful = require('contentful-management') @@ -1006,7 +1006,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets an app details entity - * @return Promise for an App Details + * @returns Promise for an App Details * @example * ```javascript * const contentful = require('contentful-management') @@ -1031,7 +1031,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Deletes an app details entity. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -1058,7 +1058,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Creates an app action entity. - * @return Promise that resolves an App Action entity + * @returns Promise that resolves an App Action entity * @example * ```javascript * const contentful = require('contentful-management') @@ -1088,7 +1088,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Updates an existing app action entity. - * @return Promise that resolves an App Action entity + * @returns Promise that resolves an App Action entity * @example * ```javascript * const contentful = require('contentful-management') @@ -1118,7 +1118,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Deletes an app action entity. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -1145,7 +1145,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets an existing app action entity. - * @return Promise that resolves an App Action entity + * @returns Promise that resolves an App Action entity * @example * ```javascript * const contentful = require('contentful-management') @@ -1170,7 +1170,7 @@ export default function createOrganizationApi(makeRequest: MakeRequest) { }, /** * Gets existing app actions for an App Definition. - * @return Promise that resolves an App Action entity + * @returns Promise that resolves an App Action entity * @example * ```javascript * const contentful = require('contentful-management') diff --git a/lib/create-space-api.ts b/lib/create-space-api.ts index a32f656879..593b2dd499 100644 --- a/lib/create-space-api.ts +++ b/lib/create-space-api.ts @@ -46,14 +46,14 @@ export type ContentfulSpaceAPI = ReturnType /** * Creates API object with methods to access the Space API * @param {MakeRequest} makeRequest - function to make requests via an adapter - * @return {ContentfulSpaceAPI} + * @returns {ContentfulSpaceAPI} * @private */ export default function createSpaceApi(makeRequest: MakeRequest) { return { /** * Deletes the space - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -78,7 +78,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { }, /** * Updates the space - * @return Promise for the updated space. + * @returns Promise for the updated space. * @example * ```javascript * const contentful = require('contentful-management') @@ -109,7 +109,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets an environment * @param id - Environment ID - * @return Promise for an Environment + * @returns Promise for an Environment * @example * ```javascript * const contentful = require('contentful-management') @@ -136,7 +136,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of Environments - * @return Promise for a collection of Environment + * @returns Promise for a collection of Environment * @example * ```javascript * const contentful = require('contentful-management') @@ -163,7 +163,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Creates an environment * @param data - Object representation of the Environment to be created - * @return Promise for the newly created Environment + * @returns Promise for the newly created Environment * @example * ```javascript * const contentful = require('contentful-management') @@ -195,7 +195,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * @param id - Environment ID * @param data - Object representation of the Environment to be created * @param sourceEnvironmentId - ID of the source environment that will be copied to create the new environment. Default is "master" - * @return Promise for the newly created Environment + * @returns Promise for the newly created Environment * @example * ```javascript * const contentful = require('contentful-management') @@ -231,7 +231,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a Webhook * @param id - Webhook ID - * @return Promise for a Webhook + * @returns Promise for a Webhook * @example * ```javascript * const contentful = require('contentful-management') @@ -257,7 +257,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of Webhooks - * @return Promise for a collection of Webhooks + * @returns Promise for a collection of Webhooks * @example * ```javascript * const contentful = require('contentful-management') @@ -336,7 +336,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Creates a Webhook * @param data - Object representation of the Webhook to be created - * @return Promise for the newly created Webhook + * @returns Promise for the newly created Webhook * @example * ```javascript * const contentful = require('contentful-management') @@ -370,7 +370,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates a Webhook with a custom ID * @param id - Webhook ID * @param data - Object representation of the Webhook to be created - * @return Promise for the newly created Webhook + * @returns Promise for the newly created Webhook * @example * ```javascript * const contentful = require('contentful-management') @@ -514,7 +514,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a Role * @param id - Role ID - * @return Promise for a Role + * @returns Promise for a Role * @example * ```javascript * const contentful = require('contentful-management') @@ -545,7 +545,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { }, /** * Gets a collection of Roles - * @return Promise for a collection of Roles + * @returns Promise for a collection of Roles * @example * ```javascript * const contentful = require('contentful-management') @@ -572,7 +572,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Creates a Role * @param data - Object representation of the Role to be created - * @return Promise for the newly created Role + * @returns Promise for the newly created Role * @example * ```javascript * const contentful = require('contentful-management') @@ -629,7 +629,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates a Role with a custom ID * @param id - Role ID * @param data - Object representation of the Role to be created - * @return Promise for the newly created Role + * @returns Promise for the newly created Role * @example * ```javascript * const contentful = require('contentful-management') @@ -685,7 +685,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a User * @param userId - User ID - * @return Promise for a User + * @returns Promise for a User * @example * ```javascript * const contentful = require('contentful-management') @@ -710,7 +710,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of Users in a space * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise a collection of Users in a space + * @returns Promise a collection of Users in a space * @example * ```javascript * const contentful = require('contentful-management') @@ -736,7 +736,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of teams for a space * @param query - * @return Promise for a collection of teams for a space + * @returns Promise for a collection of teams for a space * @example * ```javascript * const contentful = require('contentful-management') @@ -761,7 +761,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a Space Member * @param id Get Space Member by user_id - * @return Promise for a Space Member + * @returns Promise for a Space Member * @example * ```javascript * const contentful = require('contentful-management') @@ -783,7 +783,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of Space Members * @param query - * @return Promise for a collection of Space Members + * @returns Promise for a collection of Space Members * @example * ```javascript * const contentful = require('contentful-management') @@ -809,7 +809,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a Space Membership * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user). * @param id - Space Membership ID - * @return Promise for a Space Membership + * @returns Promise for a Space Membership * @example * ```javascript * const contentful = require('contentful-management') @@ -832,7 +832,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Gets a collection of Space Memberships * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user). * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise for a collection of Space Memberships + * @returns Promise for a collection of Space Memberships * @example * ```javascript * const contentful = require('contentful-management') @@ -859,7 +859,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates a Space Membership * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user). * @param data - Object representation of the Space Membership to be created - * @return Promise for the newly created Space Membership + * @returns Promise for the newly created Space Membership * @example * ```javascript * const contentful = require('contentful-management') @@ -900,7 +900,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user). * @param id - Space Membership ID * @param data - Object representation of the Space Membership to be created - * @return Promise for the newly created Space Membership + * @returns Promise for the newly created Space Membership * @example * ```javascript * const contentful = require('contentful-management') @@ -941,7 +941,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a Team Space Membership * @param id - Team Space Membership ID - * @return Promise for a Team Space Membership + * @returns Promise for a Team Space Membership * @example * ```javascript * const contentful = require('contentful-management') @@ -967,7 +967,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a collection of Team Space Memberships * @param query - Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details. - * @return Promise for a collection of Team Space Memberships + * @returns Promise for a collection of Team Space Memberships * @example * ```javascript * const contentful = require('contentful-management') @@ -993,7 +993,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates a Team Space Membership * @param id - Team ID * @param data - Object representation of the Team Space Membership to be created - * @return Promise for the newly created Team Space Membership + * @returns Promise for the newly created Team Space Membership * @example * ```javascript * const contentful = require('contentful-management') @@ -1034,7 +1034,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a Api Key * @param id - API Key ID - * @return Promise for a Api Key + * @returns Promise for a Api Key * @example * ```javascript * const contentful = require('contentful-management') @@ -1062,7 +1062,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { }, /** * Gets a collection of Api Keys - * @return Promise for a collection of Api Keys + * @returns Promise for a collection of Api Keys * @example * ```javascript * const contentful = require('contentful-management') @@ -1089,7 +1089,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { }, /** * Gets a collection of preview Api Keys - * @return Promise for a collection of Preview Api Keys + * @returns Promise for a collection of Preview Api Keys * @example * ```javascript * const contentful = require('contentful-management') @@ -1117,7 +1117,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets a preview Api Key * @param id - Preview API Key ID - * @return Promise for a Preview Api Key + * @returns Promise for a Preview Api Key * @example * ```javascript * const contentful = require('contentful-management') @@ -1146,7 +1146,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Creates a Api Key * @param payload - Object representation of the Api Key to be created - * @return Promise for the newly created Api Key + * @returns Promise for the newly created Api Key * @example * ```javascript * const contentful = require('contentful-management') @@ -1186,7 +1186,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates a Api Key with a custom ID * @param id - Api Key ID * @param payload - Object representation of the Api Key to be created - * @return Promise for the newly created Api Key + * @returns Promise for the newly created Api Key * @example * ```javascript * const contentful = require('contentful-management') @@ -1227,7 +1227,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { * Creates an EnvironmentAlias with a custom ID * @param environmentAliasId - EnvironmentAlias ID * @param data - Object representation of the EnvironmentAlias to be created - * @return Promise for the newly created EnvironmentAlias + * @returns Promise for the newly created EnvironmentAlias * @example * ```javascript * const contentful = require('contentful-management') @@ -1259,7 +1259,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Gets an Environment Alias * @param Environment Alias ID - * @return Promise for an Environment Alias + * @returns Promise for an Environment Alias * @example * ```javascript * const contentful = require('contentful-management') @@ -1284,7 +1284,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { }, /** * Gets a collection of Environment Aliases - * @return Promise for a collection of Environment Aliases + * @returns Promise for a collection of Environment Aliases * @example * ```javascript * const contentful = require('contentful-management') @@ -1312,7 +1312,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Query for scheduled actions in space. * @param query - Object with search parameters. The enviroment id field is mandatory. Check the REST API reference for more details. - * @return Promise for the scheduled actions query + * @returns Promise for the scheduled actions query * * @example * ```javascript @@ -1384,7 +1384,7 @@ export default function createSpaceApi(makeRequest: MakeRequest) { /** * Creates a scheduled action * @param data - Object representation of the scheduled action to be created - * @return Promise for the newly created scheduled actions + * @returns Promise for the newly created scheduled actions * @example * ```javascript * const contentful = require('contentful-management'); diff --git a/lib/create-ui-config-api.ts b/lib/create-ui-config-api.ts index e5dc62958b..b762317fb5 100644 --- a/lib/create-ui-config-api.ts +++ b/lib/create-ui-config-api.ts @@ -27,7 +27,7 @@ export default function createUIConfigApi(makeRequest: MakeRequest) { return { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') diff --git a/lib/create-user-ui-config-api.ts b/lib/create-user-ui-config-api.ts index 35caf3ffeb..e6ee626549 100644 --- a/lib/create-user-ui-config-api.ts +++ b/lib/create-user-ui-config-api.ts @@ -27,7 +27,7 @@ export default function createUserUIConfigApi(makeRequest: MakeRequest) { return { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') diff --git a/lib/entities/access-token.ts b/lib/entities/access-token.ts index 95b55db26f..15714b2c66 100644 --- a/lib/entities/access-token.ts +++ b/lib/entities/access-token.ts @@ -37,7 +37,7 @@ export type CreatePersonalAccessTokenProps = Pick { /** * Revokes access token - * @return Object the revoked access token + * @returns Object the revoked access token * @example * ```javascript * const contentful = require('contentful-management') @@ -60,7 +60,7 @@ export interface AccessToken extends AccessTokenProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -39,7 +39,7 @@ export interface ApiKey extends ApiKeyProps, DefaultElements { delete(): Promise /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -107,6 +107,6 @@ export function wrapApiKey(makeRequest: MakeRequest, data: ApiKeyProps): ApiKey * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw api key collection data - * @return Wrapped api key collection data + * @returns Wrapped api key collection data */ export const wrapApiKeyCollection = wrapCollection(wrapApiKey) diff --git a/lib/entities/app-access-token.ts b/lib/entities/app-access-token.ts index 631c7c6cde..3d1d51b5ca 100644 --- a/lib/entities/app-access-token.ts +++ b/lib/entities/app-access-token.ts @@ -34,7 +34,7 @@ export interface AppAccessToken extends AppAccessTokenProps, DefaultElements & { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -200,7 +200,7 @@ function createAppActionApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Bundle data - * @return Wrapped App Bundle data + * @returns Wrapped App Bundle data */ export function wrapAppAction(makeRequest: MakeRequest, data: AppActionProps): AppAction { const appAction = toPlainObject(copy(data)) @@ -214,6 +214,6 @@ export function wrapAppAction(makeRequest: MakeRequest, data: AppActionProps): A * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Bundle collection data - * @return Wrapped App Bundle collection data + * @returns Wrapped App Bundle collection data */ export const wrapAppActionCollection = wrapCollection(wrapAppAction) diff --git a/lib/entities/app-bundle.ts b/lib/entities/app-bundle.ts index 643d523233..62e76a2a62 100644 --- a/lib/entities/app-bundle.ts +++ b/lib/entities/app-bundle.ts @@ -63,7 +63,7 @@ export type AppBundleProps = { export interface AppBundle extends AppBundleProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -108,7 +108,7 @@ function createAppBundleApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Bundle data - * @return Wrapped App Bundle data + * @returns Wrapped App Bundle data */ export function wrapAppBundle(makeRequest: MakeRequest, data: AppBundleProps): AppBundle { const appBundle = toPlainObject(copy(data)) @@ -122,6 +122,6 @@ export function wrapAppBundle(makeRequest: MakeRequest, data: AppBundleProps): A * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Bundle collection data - * @return Wrapped App Bundle collection data + * @returns Wrapped App Bundle collection data */ export const wrapAppBundleCollection = wrapCollection(wrapAppBundle) diff --git a/lib/entities/app-definition.ts b/lib/entities/app-definition.ts index 7e536e1642..b98c238d2f 100644 --- a/lib/entities/app-definition.ts +++ b/lib/entities/app-definition.ts @@ -110,7 +110,7 @@ export type AppInstallationsForOrganizationProps = { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Definition data - * @return Wrapped App Definition data + * @returns Wrapped App Definition data */ export function wrapAppDefinition( makeRequest: MakeRequest, @@ -128,6 +128,6 @@ export function wrapAppDefinition( * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Definition collection data - * @return Wrapped App Definition collection data + * @returns Wrapped App Definition collection data */ export const wrapAppDefinitionCollection = wrapCollection(wrapAppDefinition) diff --git a/lib/entities/app-details.ts b/lib/entities/app-details.ts index 9bf2a1500d..5819b1ceed 100644 --- a/lib/entities/app-details.ts +++ b/lib/entities/app-details.ts @@ -36,7 +36,7 @@ export type CreateAppDetailsProps = { export interface AppDetails extends AppDetailsProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -57,7 +57,7 @@ export interface AppDetails extends AppDetailsProps, DefaultElements ({ @@ -81,7 +81,7 @@ function createAppDetailsApi(makeRequest: MakeRequest) { * @private * @param http - HTTP client instance * @param data - Raw AppDetails data - * @return Wrapped AppDetails data + * @returns Wrapped AppDetails data */ export function wrapAppDetails(makeRequest: MakeRequest, data: AppDetailsProps): AppDetails { const appDetails = toPlainObject(copy(data)) diff --git a/lib/entities/app-event-subscription.ts b/lib/entities/app-event-subscription.ts index 0bceff8c48..44c0a0f9d4 100644 --- a/lib/entities/app-event-subscription.ts +++ b/lib/entities/app-event-subscription.ts @@ -39,7 +39,7 @@ export interface AppEventSubscription DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -79,7 +79,7 @@ function createEventSubscriptionApi(makeRequest: MakeRequest) { * @private * @param http - HTTP client instance * @param data - Raw AppEventSubscription data - * @return Wrapped AppEventSubscription data + * @returns Wrapped AppEventSubscription data */ export function wrapAppEventSubscription( makeRequest: MakeRequest, diff --git a/lib/entities/app-installation.ts b/lib/entities/app-installation.ts index 8c53a7c27e..e635dc78bf 100644 --- a/lib/entities/app-installation.ts +++ b/lib/entities/app-installation.ts @@ -26,7 +26,7 @@ export interface AppInstallation DefaultElements { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -49,7 +49,7 @@ export interface AppInstallation update(): Promise /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -106,7 +106,7 @@ function createAppInstallationApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Installation data - * @return Wrapped App installation data + * @returns Wrapped App installation data */ export function wrapAppInstallation( makeRequest: MakeRequest, diff --git a/lib/entities/app-key.ts b/lib/entities/app-key.ts index b7b79db772..773248c90c 100644 --- a/lib/entities/app-key.ts +++ b/lib/entities/app-key.ts @@ -53,7 +53,7 @@ export type CreateAppKeyProps = { export interface AppKey extends AppKeyProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -94,7 +94,7 @@ function createKeyApi(makeRequest: MakeRequest) { * @private * @param http - HTTP client instance * @param data - Raw AppKey data - * @return Wrapped AppKey data + * @returns Wrapped AppKey data */ export function wrapAppKey(makeRequest: MakeRequest, data: AppKeyProps): AppKey { const key = toPlainObject(copy(data)) @@ -105,6 +105,6 @@ export function wrapAppKey(makeRequest: MakeRequest, data: AppKeyProps): AppKey * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Key collection data - * @return Wrapped App Key collection data + * @returns Wrapped App Key collection data */ export const wrapAppKeyCollection = wrapCollection(wrapAppKey) diff --git a/lib/entities/app-signed-request.ts b/lib/entities/app-signed-request.ts index 873ffdce3a..7e79e429a6 100644 --- a/lib/entities/app-signed-request.ts +++ b/lib/entities/app-signed-request.ts @@ -44,7 +44,7 @@ export interface AppSignedRequest * @private * @param http - HTTP client instance * @param data - Raw AppSignedRequest data - * @return Wrapped AppSignedRequest data + * @returns Wrapped AppSignedRequest data */ export function wrapAppSignedRequest( _makeRequest: MakeRequest, diff --git a/lib/entities/app-signing-secret.ts b/lib/entities/app-signing-secret.ts index ede545b947..5a50d8ae63 100644 --- a/lib/entities/app-signing-secret.ts +++ b/lib/entities/app-signing-secret.ts @@ -28,7 +28,7 @@ export interface AppSigningSecret DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -68,7 +68,7 @@ function createSigningSecretApi(makeRequest: MakeRequest) { * @private * @param http - HTTP client instance * @param data - Raw AppSigningSecret data - * @return Wrapped AppSigningSecret data + * @returns Wrapped AppSigningSecret data */ export function wrapAppSigningSecret( makeRequest: MakeRequest, diff --git a/lib/entities/app-upload.ts b/lib/entities/app-upload.ts index 3652db3f34..9245ee376c 100644 --- a/lib/entities/app-upload.ts +++ b/lib/entities/app-upload.ts @@ -17,7 +17,7 @@ export type AppUploadProps = { export interface AppUpload extends AppUploadProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -61,7 +61,7 @@ function createAppUploadApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Upload data - * @return Wrapped App Upload data + * @returns Wrapped App Upload data */ export function wrapAppUpload(makeRequest: MakeRequest, data: AppUploadProps): AppUpload { const appUpload = toPlainObject(copy(data)) @@ -74,6 +74,6 @@ export function wrapAppUpload(makeRequest: MakeRequest, data: AppUploadProps): A * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Upload collection data - * @return Wrapped App Upload collection data + * @returns Wrapped App Upload collection data */ export const wrapAppUploadCollection = wrapCollection(wrapAppUpload) diff --git a/lib/entities/asset-key.ts b/lib/entities/asset-key.ts index b3e1df6e55..6713e5d000 100644 --- a/lib/entities/asset-key.ts +++ b/lib/entities/asset-key.ts @@ -20,7 +20,7 @@ export interface AssetKey extends AssetKeyProps, DefaultElements * @private * @param http - HTTP client instance * @param data - Raw asset key data - * @return Wrapped asset key data + * @returns Wrapped asset key data */ export function wrapAssetKey(_makeRequest: MakeRequest, data: AssetKeyProps): AssetKey { const assetKey = toPlainObject(copy(data)) diff --git a/lib/entities/asset.ts b/lib/entities/asset.ts index 69e60c8513..275d159f0e 100644 --- a/lib/entities/asset.ts +++ b/lib/entities/asset.ts @@ -66,7 +66,7 @@ type AssetApi = { * @param options - Additional options for processing * @prop options.processingCheckWait - Time in milliseconds to wait before checking again if the asset has been processed (default: 500ms) * @prop options.processingCheckRetries - Maximum amount of times to check if the asset has been processed (default: 5) - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @throws {AssetProcessingTimeout} If the asset takes too long to process. If this happens, retrieve the asset again, and if the url property is available, then processing has succeeded. If not, your file might be damaged. * @example * ```javascript @@ -107,7 +107,7 @@ type AssetApi = { * @param options - Additional options for processing * @prop options.processingCheckWait - Time in milliseconds to wait before checking again if the asset has been processed (default: 500ms) * @prop options.processingCheckRetries - Maximum amount of times to check if the asset has been processed (default: 5) - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @throws {AssetProcessingTimeout} If the asset takes too long to process. If this happens, retrieve the asset again, and if the url property is available, then processing has succeeded. If not, your file might be damaged. * @example * ```javascript @@ -138,7 +138,7 @@ type AssetApi = { processForLocale(locale: string, options?: AssetProcessingForLocale): Promise /** * Publishes the object - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @example * ```javascript * const contentful = require('contentful-management') @@ -158,7 +158,7 @@ type AssetApi = { publish(): Promise /** * Archives the object - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @example * ```javascript * const contentful = require('contentful-management') @@ -178,7 +178,7 @@ type AssetApi = { archive(): Promise /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -198,7 +198,7 @@ type AssetApi = { delete(): Promise /** * Unarchives the object - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @example * ```javascript * const contentful = require('contentful-management') @@ -218,7 +218,7 @@ type AssetApi = { unarchive(): Promise /** * Unpublishes the object - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @example * ```javascript * const contentful = require('contentful-management') @@ -238,7 +238,7 @@ type AssetApi = { unpublish(): Promise /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -405,7 +405,7 @@ function createAssetApi(makeRequest: MakeRequest): AssetApi { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw asset data - * @return Wrapped asset data + * @returns Wrapped asset data */ export function wrapAsset(makeRequest: MakeRequest, data: AssetProps): Asset { const asset = toPlainObject(copy(data)) diff --git a/lib/entities/bulk-action.ts b/lib/entities/bulk-action.ts index 1fe8f0b69e..d65da71c63 100644 --- a/lib/entities/bulk-action.ts +++ b/lib/entities/bulk-action.ts @@ -180,7 +180,7 @@ export interface BulkAction( makeRequest: MakeRequest, diff --git a/lib/entities/content-type.ts b/lib/entities/content-type.ts index afd86a560a..72521b9250 100644 --- a/lib/entities/content-type.ts +++ b/lib/entities/content-type.ts @@ -67,7 +67,7 @@ type ContentTypeApi = { * delete it by setting the attribute "deleted" to true. See the "Deleting fields" section in the * API reference for more reasoning. Alternatively, * you may use the convenience method omitAndDeleteField to do both steps at once. - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -91,7 +91,7 @@ type ContentTypeApi = { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -111,7 +111,7 @@ type ContentTypeApi = { delete(): Promise /** * Publishes the object - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @example * ```javascript * const contentful = require('contentful-management') @@ -131,7 +131,7 @@ type ContentTypeApi = { publish(): Promise /** * Unpublishes the object - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. * @example * ```javascript * const contentful = require('contentful-management') @@ -153,7 +153,7 @@ type ContentTypeApi = { * Gets the editor interface for the object
* Important note: The editor interface only represent a published contentType.
* To get the most recent representation of the contentType make sure to publish it first - * @return Object returned from the server with the current editor interface. + * @returns Object returned from the server with the current editor interface. * @example * ```javascript * const contentful = require('contentful-management') @@ -187,7 +187,7 @@ type ContentTypeApi = { /** * Omits and deletes a field if it exists on the contentType. This is a convenience method which does both operations at once and potentially less * safe than the standard way. See note about deleting fields on the Update method. - * @return Object returned from the server with updated metadata. + * @returns Object returned from the server with updated metadata. */ omitAndDeleteField(id: string): Promise @@ -354,7 +354,7 @@ function createContentTypeApi(makeRequest: MakeRequest): ContentTypeApi { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw content type data - * @return Wrapped content type data + * @returns Wrapped content type data */ export function wrapContentType(makeRequest: MakeRequest, data: ContentTypeProps): ContentType { const contentType = toPlainObject(copy(data)) diff --git a/lib/entities/editor-interface.ts b/lib/entities/editor-interface.ts index 5072db9c01..78ae5b10d4 100644 --- a/lib/entities/editor-interface.ts +++ b/lib/entities/editor-interface.ts @@ -121,7 +121,7 @@ export interface EditorInterface DefaultElements { /** * Gets a control for a specific field - * @return control object for specific field + * @returns control object for specific field * ```javascript * const contentful = require('contentful-management') * @@ -143,7 +143,7 @@ export interface EditorInterface getControlForField(id: string): null | Control /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * ```javascript * const contentful = require('contentful-management') * diff --git a/lib/entities/entry.ts b/lib/entities/entry.ts index afc0bb4736..0f82aa3b2a 100644 --- a/lib/entities/entry.ts +++ b/lib/entities/entry.ts @@ -58,7 +58,7 @@ export type WithResourceName = T extends { sys: infe * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw entry data - * @return Wrapped entry data + * @returns Wrapped entry data */ export function wrapEntry(makeRequest: MakeRequest, data: EntryProps): Entry { const entry = toPlainObject(copy(data)) diff --git a/lib/entities/environment-alias.ts b/lib/entities/environment-alias.ts index 8508531118..00dc08b30a 100644 --- a/lib/entities/environment-alias.ts +++ b/lib/entities/environment-alias.ts @@ -25,7 +25,7 @@ export interface EnvironmentAlias DefaultElements { /** * Sends an update to the server with any changes made to the object's properties. Currently, you can only change the id of the alias's underlying environment. See the example below. - * @return {Promise} Object returned from the server with updated changes. + * @returns {Promise} Object returned from the server with updated changes. * ```javascript * const contentful = require('contentful-management') * @@ -47,7 +47,7 @@ export interface EnvironmentAlias /** * Deletes this object on the server. - * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled. * ```javascript * const contentful = require('contentful-management') * @@ -104,7 +104,7 @@ function createEnvironmentAliasApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw environment alias data - * @return Wrapped environment alias data + * @returns Wrapped environment alias data */ export function wrapEnvironmentAlias( makeRequest: MakeRequest, @@ -119,6 +119,6 @@ export function wrapEnvironmentAlias( * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw environment alias collection data - * @return Wrapped environment alias collection data + * @returns Wrapped environment alias collection data */ export const wrapEnvironmentAliasCollection = wrapCollection(wrapEnvironmentAlias) diff --git a/lib/entities/extension.ts b/lib/entities/extension.ts index 9cbbe73ae9..7a92a5c0c9 100644 --- a/lib/entities/extension.ts +++ b/lib/entities/extension.ts @@ -64,7 +64,7 @@ export type CreateExtensionProps = { export interface Extension extends ExtensionProps, DefaultElements { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -87,7 +87,7 @@ export interface Extension extends ExtensionProps, DefaultElements /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -142,7 +142,7 @@ function createExtensionApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw UI Extension data - * @return Wrapped UI Extension data + * @returns Wrapped UI Extension data */ export function wrapExtension(makeRequest: MakeRequest, data: ExtensionProps): Extension { const extension = toPlainObject(copy(data)) diff --git a/lib/entities/function-log.ts b/lib/entities/function-log.ts index f1fd32dd75..3a2e4fe319 100644 --- a/lib/entities/function-log.ts +++ b/lib/entities/function-log.ts @@ -40,7 +40,7 @@ export interface FunctionLog extends FunctionLogProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -72,7 +72,7 @@ export interface Locale extends LocaleProps, DefaultElements { delete(): Promise /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -133,7 +133,7 @@ function createLocaleApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw locale data - * @return Wrapped locale data + * @returns Wrapped locale data */ export function wrapLocale(makeRequest: MakeRequest, data: LocaleProps): Locale { delete (data as SetOptional).internal_code diff --git a/lib/entities/oauth-application.ts b/lib/entities/oauth-application.ts index 9f75d5fcb9..f7f6f79aa1 100644 --- a/lib/entities/oauth-application.ts +++ b/lib/entities/oauth-application.ts @@ -45,12 +45,12 @@ export interface OAuthApplication DefaultElements { /** * Deletes an OAuth application - * @return Promise for the deleted OAuth application + * @returns Promise for the deleted OAuth application */ delete(): Promise /** * Updates an OAuth application - * @return Promise for the updated OAuth application + * @returns Promise for the updated OAuth application */ update(): Promise } @@ -67,7 +67,7 @@ function createOAuthApplicationApi(makeRequest: MakeRequest, userId: string) { return { /** * Updates an OAuth application - * @return Promise for the updated OAuth application + * @returns Promise for the updated OAuth application */ async update(): Promise { const raw = this.toPlainObject() as OAuthApplicationProps @@ -81,7 +81,7 @@ function createOAuthApplicationApi(makeRequest: MakeRequest, userId: string) { /** * Deletes an OAuth application - * @return Promise for the deleted OAuth application + * @returns Promise for the deleted OAuth application */ async delete(): Promise { const raw = this.toPlainObject() as OAuthApplicationProps @@ -98,7 +98,7 @@ function createOAuthApplicationApi(makeRequest: MakeRequest, userId: string) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw OAuth application data - * @return Wrapped OAuth application data + * @returns Wrapped OAuth application data */ export function wrapOAuthApplication( makeRequest: MakeRequest, diff --git a/lib/entities/organization-invitation.ts b/lib/entities/organization-invitation.ts index eab1ee80fc..14e25ca181 100644 --- a/lib/entities/organization-invitation.ts +++ b/lib/entities/organization-invitation.ts @@ -25,7 +25,7 @@ export interface OrganizationInvitation * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw invitation data - * @return {OrganizationInvitation} Wrapped Inviation data + * @returns {OrganizationInvitation} Wrapped Inviation data */ export function wrapOrganizationInvitation( _makeRequest: MakeRequest, diff --git a/lib/entities/organization-membership.ts b/lib/entities/organization-membership.ts index e7d15835f1..9b23eaaf86 100644 --- a/lib/entities/organization-membership.ts +++ b/lib/entities/organization-membership.ts @@ -26,7 +26,7 @@ export interface OrganizationMembership DefaultElements { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -100,7 +100,7 @@ function createOrganizationMembershipApi(makeRequest: MakeRequest, organizationI * @private * @param {function} makeRequest - function to make requests via an adapter * @param {Object} data - Raw organization membership data - * @return {OrganizationMembership} Wrapped organization membership data + * @returns {OrganizationMembership} Wrapped organization membership data */ export function wrapOrganizationMembership( makeRequest: MakeRequest, diff --git a/lib/entities/organization.ts b/lib/entities/organization.ts index 4610d7d715..2d0558740b 100644 --- a/lib/entities/organization.ts +++ b/lib/entities/organization.ts @@ -34,7 +34,7 @@ export type OrganizationProp = OrganizationProps * @private * @param makeRequest - function to make requests via an adapter * @param data - API response for an Organization - * @return {Organization} + * @returns {Organization} */ export function wrapOrganization(makeRequest: MakeRequest, data: OrganizationProps): Organization { const org = toPlainObject(copy(data)) diff --git a/lib/entities/personal-access-token.ts b/lib/entities/personal-access-token.ts index ccf8bdd51a..68d6bae9e4 100644 --- a/lib/entities/personal-access-token.ts +++ b/lib/entities/personal-access-token.ts @@ -26,7 +26,7 @@ export interface PersonalAccessToken DefaultElements { /** * Revokes a personal access token - * @return Object the revoked personal access token + * @returns Object the revoked personal access token * @example * ```javascript * const contentful = require('contentful-management') @@ -49,7 +49,7 @@ export interface PersonalAccessToken * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw personal access token data - * @return Wrapped personal access token + * @returns Wrapped personal access token */ export function wrapPersonalAccessToken( makeRequest: MakeRequest, @@ -72,6 +72,6 @@ export function wrapPersonalAccessToken( * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw personal access collection data - * @return Wrapped personal access token collection data + * @returns Wrapped personal access token collection data */ export const wrapPersonalAccessTokenCollection = wrapCollection(wrapPersonalAccessToken) diff --git a/lib/entities/preview-api-key.ts b/lib/entities/preview-api-key.ts index a419d82624..28ae63fc3b 100644 --- a/lib/entities/preview-api-key.ts +++ b/lib/entities/preview-api-key.ts @@ -24,7 +24,7 @@ function createPreviewApiKeyApi() { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw api key data - * @return Wrapped preview api key data + * @returns Wrapped preview api key data */ export function wrapPreviewApiKey( _makeRequest: MakeRequest, diff --git a/lib/entities/release-action.ts b/lib/entities/release-action.ts index b290cb7a72..6c566c153b 100644 --- a/lib/entities/release-action.ts +++ b/lib/entities/release-action.ts @@ -96,7 +96,7 @@ export interface ReleaseAction * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw Release data - * @return Wrapped Release data + * @returns Wrapped Release data */ export function wrapReleaseAction( makeRequest: MakeRequest, diff --git a/lib/entities/release.ts b/lib/entities/release.ts index 05f3d5723c..6a80d5e880 100644 --- a/lib/entities/release.ts +++ b/lib/entities/release.ts @@ -262,7 +262,7 @@ export interface Release extends ReleaseProps, ReleaseApiMethods, DefaultElement * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw Release data - * @return Wrapped Release data + * @returns Wrapped Release data */ export function wrapRelease(makeRequest: MakeRequest, data: ReleaseProps): Release { const release = toPlainObject(copy(data)) diff --git a/lib/entities/resource-provider.ts b/lib/entities/resource-provider.ts index a8481cce21..ce8afe2eef 100644 --- a/lib/entities/resource-provider.ts +++ b/lib/entities/resource-provider.ts @@ -51,7 +51,7 @@ function createResourceProviderApi(makeRequest: MakeRequest) { return { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -82,7 +82,7 @@ function createResourceProviderApi(makeRequest: MakeRequest) { }, /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -149,7 +149,7 @@ function createResourceProviderApi(makeRequest: MakeRequest) { /** * @private * @param data - raw ResourceProvider Object - * @return Object containing the http params for the ResourceProvider request: organizationId and appDefinitionId + * @returns Object containing the http params for the ResourceProvider request: organizationId and appDefinitionId */ const getParams = (data: ResourceProviderProps) => ({ organizationId: data.sys.organization.sys.id, @@ -158,7 +158,7 @@ const getParams = (data: ResourceProviderProps) => ({ /** * @private * @param data - raw ResourceProvider Object - * @return UpsertResourceProviderProps + * @returns UpsertResourceProviderProps */ const getUpsertParams = (data: ResourceProviderProps): UpsertResourceProviderProps => ({ sys: { id: data.sys.id }, @@ -170,7 +170,7 @@ const getUpsertParams = (data: ResourceProviderProps): UpsertResourceProviderPro * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw Resource Provider data - * @return Wrapped Resource Provider data + * @returns Wrapped Resource Provider data */ export function wrapResourceProvider( makeRequest: MakeRequest, diff --git a/lib/entities/resource-type.ts b/lib/entities/resource-type.ts index 8280fdb764..051dc7f242 100644 --- a/lib/entities/resource-type.ts +++ b/lib/entities/resource-type.ts @@ -75,7 +75,7 @@ function createResourceTypeApi(makeRequest: MakeRequest) { return { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -107,7 +107,7 @@ function createResourceTypeApi(makeRequest: MakeRequest) { }, /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -150,7 +150,7 @@ const getUpsertParams = (data: ResourceTypeProps): UpsertResourceTypeProps => ({ * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw Resource Type data - * @return Wrapped Resource Type data + * @returns Wrapped Resource Type data */ export function wrapResourceType(makeRequest: MakeRequest, data: ResourceTypeProps): ResourceType { const resourceType = toPlainObject(copy(data)) diff --git a/lib/entities/role.ts b/lib/entities/role.ts index f1f5b775b3..fa5dbc897f 100644 --- a/lib/entities/role.ts +++ b/lib/entities/role.ts @@ -46,7 +46,7 @@ export type CreateRoleProps = Omit export interface Role extends RoleProps, DefaultElements { /** * Deletes this object on the server. - * @return {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns {Promise} Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -65,7 +65,7 @@ export interface Role extends RoleProps, DefaultElements { delete(): Promise /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -121,7 +121,7 @@ function createRoleApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw role data - * @return Wrapped role data + * @returns Wrapped role data */ export function wrapRole(makeRequest: MakeRequest, data: RoleProps): Role { const role = toPlainObject(copy(data)) diff --git a/lib/entities/snapshot.ts b/lib/entities/snapshot.ts index 8dc13b1f91..119f4bbc70 100644 --- a/lib/entities/snapshot.ts +++ b/lib/entities/snapshot.ts @@ -26,7 +26,7 @@ function createSnapshotApi() { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw snapshot data - * @return Wrapped snapshot data + * @returns Wrapped snapshot data */ export function wrapSnapshot(_makeRequest: MakeRequest, data: SnapshotProps): Snapshot { const snapshot = toPlainObject(copy(data)) @@ -38,6 +38,6 @@ export function wrapSnapshot(_makeRequest: MakeRequest, data: SnapshotProps { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -39,7 +39,7 @@ export interface SpaceMembership delete(): Promise /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -94,7 +94,7 @@ function createSpaceMembershipApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw space membership data - * @return Wrapped space membership data + * @returns Wrapped space membership data */ export function wrapSpaceMembership( makeRequest: MakeRequest, diff --git a/lib/entities/space.ts b/lib/entities/space.ts index f92d38f573..b926ecf9ee 100644 --- a/lib/entities/space.ts +++ b/lib/entities/space.ts @@ -21,7 +21,7 @@ export type Space = SpaceProps & DefaultElements & ContentfulSpaceAP * @private * @param makeRequest - function to make requests via an adapter * @param data - API response for a Space - * @return {Space} + * @returns {Space} */ export function wrapSpace(makeRequest: MakeRequest, data: SpaceProps): Space { const space = toPlainObject(copy(data)) diff --git a/lib/entities/team-membership.ts b/lib/entities/team-membership.ts index 51b3d02da4..058c6de163 100644 --- a/lib/entities/team-membership.ts +++ b/lib/entities/team-membership.ts @@ -30,7 +30,7 @@ export type CreateTeamMembershipProps = Omit export interface TeamMembership extends TeamMembershipProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -51,7 +51,7 @@ export interface TeamMembership extends TeamMembershipProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -59,7 +59,7 @@ export interface TeamSpaceMembership /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -123,7 +123,7 @@ function createTeamSpaceMembershipApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw space membership data - * @return Wrapped team space membership data + * @returns Wrapped team space membership data */ export function wrapTeamSpaceMembership( makeRequest: MakeRequest, diff --git a/lib/entities/team.ts b/lib/entities/team.ts index 7d4a23332e..8fc87e8051 100644 --- a/lib/entities/team.ts +++ b/lib/entities/team.ts @@ -26,7 +26,7 @@ export type CreateTeamProps = Omit export interface Team extends TeamProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * ```javascript * const contentful = require('contentful-management') @@ -47,7 +47,7 @@ export interface Team extends TeamProps, DefaultElements { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * @example * ```javascript * const contentful = require('contentful-management') @@ -103,7 +103,7 @@ function createTeamApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw team data - * @return Wrapped team data + * @returns Wrapped team data */ export function wrapTeam(makeRequest: MakeRequest, data: TeamProps): Team { const team = toPlainObject(copy(data)) diff --git a/lib/entities/ui-config.ts b/lib/entities/ui-config.ts index 8807ba80cf..e3b9b0c808 100644 --- a/lib/entities/ui-config.ts +++ b/lib/entities/ui-config.ts @@ -54,7 +54,7 @@ export interface UIConfig extends UIConfigProps, DefaultElements * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw data - * @return Wrapped UIConfig + * @returns Wrapped UIConfig */ export function wrapUIConfig(makeRequest: MakeRequest, data: UIConfigProps) { const user = toPlainObject(copy(data)) diff --git a/lib/entities/upload-credential.ts b/lib/entities/upload-credential.ts index 3e2512fa92..b32ff48dd0 100644 --- a/lib/entities/upload-credential.ts +++ b/lib/entities/upload-credential.ts @@ -15,7 +15,7 @@ export interface UploadCredential DefaultElements { /** * creates the upload credentials. - * @return upload credentials for file uploads + * @returns upload credentials for file uploads * @example * const contentful = require('contentful-management') * @@ -62,7 +62,7 @@ function createUploadCredentialsApi(makeRequest: MakeRequest) { * @private * @param {function} makeRequest - function to make requests via an adapter * @param {object} data - Raw upload credential data - * @return {UploadCredential} Wrapped upload credential data + * @returns {UploadCredential} Wrapped upload credential data */ export function wrapUploadCredential( makeRequest: MakeRequest, diff --git a/lib/entities/upload.ts b/lib/entities/upload.ts index 36ea3cb0a0..33015d8284 100644 --- a/lib/entities/upload.ts +++ b/lib/entities/upload.ts @@ -13,7 +13,7 @@ export type UploadProps = { export interface Upload extends UploadProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * const contentful = require('contentful-management') * @@ -55,7 +55,7 @@ function createUploadApi(makeRequest: MakeRequest) { * @private * @param {function} makeRequest - function to make requests via an adapter * @param {object} data - Raw upload data - * @return {Upload} Wrapped upload data + * @returns {Upload} Wrapped upload data */ export function wrapUpload(makeRequest: MakeRequest, data: UploadProps) { const upload = toPlainObject(copy(data)) diff --git a/lib/entities/usage.ts b/lib/entities/usage.ts index 43ba3beece..fd0f7088e0 100644 --- a/lib/entities/usage.ts +++ b/lib/entities/usage.ts @@ -63,7 +63,7 @@ export interface Usage extends UsageProps, DefaultElements {} * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw data - * @return Normalized usage + * @returns Normalized usage */ export function wrapUsage(_makeRequest: MakeRequest, data: UsageProps): Usage { const usage = toPlainObject(copy(data)) diff --git a/lib/entities/user-ui-config.ts b/lib/entities/user-ui-config.ts index 9945d89621..1d2f72f132 100644 --- a/lib/entities/user-ui-config.ts +++ b/lib/entities/user-ui-config.ts @@ -44,7 +44,7 @@ export interface UserUIConfig extends UserUIConfigProps, DefaultElements {} * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw data - * @return Normalized user + * @returns Normalized user */ export function wrapUser(_makeRequest: MakeRequest, data: T) { const user = toPlainObject(copy(data)) @@ -67,6 +67,6 @@ export function wrapUser(_makeRequest: MakeRequest, data: T) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw data collection - * @return Normalized user collection + * @returns Normalized user collection */ export const wrapUserCollection = wrapCollection(wrapUser) diff --git a/lib/entities/webhook.ts b/lib/entities/webhook.ts index be750cc4a1..3a9433d085 100644 --- a/lib/entities/webhook.ts +++ b/lib/entities/webhook.ts @@ -214,7 +214,7 @@ export type WebhookProps = { export interface WebHooks extends WebhookProps, DefaultElements { /** * Sends an update to the server with any changes made to the object's properties - * @return Object returned from the server with updated changes. + * @returns Object returned from the server with updated changes. * ```javascript * const contentful = require('contentful-management') * @@ -236,7 +236,7 @@ export interface WebHooks extends WebhookProps, DefaultElements { /** * Deletes this object on the server. - * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. + * @returns Promise for the deletion. It contains no data, but the Promise error case should be handled. * ```javascript * const contentful = require('contentful-management') * @@ -255,7 +255,7 @@ export interface WebHooks extends WebhookProps, DefaultElements { /** * List of the most recent webhook calls. See https://www.contentful.com/developers/docs/references/content-management-api/#/reference/webhook-calls/webhook-call-overviews for more details. - * @return Promise for list of calls + * @returns Promise for list of calls * ```javascript * const contentful = require('contentful-management') * @@ -274,7 +274,7 @@ export interface WebHooks extends WebhookProps, DefaultElements { /** * Webhook call with specific id. See https://www.contentful.com/developers/docs/references/content-management-api/#/reference/webhook-calls/webhook-call-overviews for more details - * @return Promise for call details + * @returns Promise for call details * ```javascript * const contentful = require('contentful-management') * @@ -293,7 +293,7 @@ export interface WebHooks extends WebhookProps, DefaultElements { /** * Overview of the health of webhook calls. See https://www.contentful.com/developers/docs/references/content-management-api/#/reference/webhook-calls/webhook-call-overviews for more details. - * @return Promise for health info + * @returns Promise for health info * ```javascript * const contentful = require('contentful-management') * @@ -369,7 +369,7 @@ function createWebhookApi(makeRequest: MakeRequest) { * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw webhook data - * @return Wrapped webhook data + * @returns Wrapped webhook data */ export function wrapWebhook(makeRequest: MakeRequest, data: WebhookProps): WebHooks { const webhook = toPlainObject(copy(data)) From 6c3adb125200eec5fd8bc9da6c5503e4198f0cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Fri, 28 Nov 2025 14:37:16 +0100 Subject: [PATCH 05/11] build: update package-lock.json --- package-lock.json | 216 ++++++++++++++++++++-------------------------- 1 file changed, 94 insertions(+), 122 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a25631fdb..ab37336a64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,10 +13,7 @@ "axios": "^1.12.2", "contentful-sdk-core": "^9.2.1", "fast-copy": "^3.0.0", - "globals": "^15.15.0", - "typedoc-github-theme": "^0.2.1", - "typedoc-plugin-markdown": "^4.4.2", - "typedoc-plugin-missing-exports": "^3.1.0" + "globals": "^15.15.0" }, "devDependencies": { "@contentful/integration-test-utils": "^2.0.1", @@ -55,7 +52,9 @@ "semantic-release": "^25.0.2", "size-limit": "^11.1.6", "type-fest": "^4.18.3", - "typedoc": "^0.27.9", + "typedoc": "^0.28.1", + "typedoc-github-theme": "^0.2.1", + "typedoc-plugin-missing-exports": "^3.1.0", "typescript": "^5.6.3", "typescript-eslint": "^8.16.0", "vitest": "^2.1.5" @@ -985,6 +984,42 @@ "node": ">=14" } }, + "node_modules/@gerrit0/mini-shiki": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.17.0.tgz", + "integrity": "sha512-Bpf6WuFar20ZXL6qU6VpVl4bVQfyyYiX+6O4xrns4nkU3Mr8paeupDbS1HENpcLOYj7pN4Rkd/yCaPA0vQwKww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/engine-oniguruma": "^3.17.0", + "@shikijs/langs": "^3.17.0", + "@shikijs/themes": "^3.17.0", + "@shikijs/types": "^3.17.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, + "node_modules/@gerrit0/mini-shiki/node_modules/@shikijs/engine-oniguruma": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.17.0.tgz", + "integrity": "sha512-flSbHZAiOZDNTrEbULY8DLWavu/TyVu/E7RChpLB4WvKX4iHMfj80C6Hi3TjIWaQtHOW0KC6kzMcuB5TO1hZ8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.17.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, + "node_modules/@gerrit0/mini-shiki/node_modules/@shikijs/types": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.17.0.tgz", + "integrity": "sha512-wjLVfutYWVUnxAjsWEob98xgyaGv0dTEnMZDruU5mRjVN7szcGOfgO+997W2yR6odp+1PtSBNeSITRRTfUzK/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" + } + }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", @@ -2686,50 +2721,45 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@shikijs/core": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.29.1.tgz", - "integrity": "sha512-Mo1gGGkuOYjDu5H8YwzmOuly9vNr8KDVkqj9xiKhhhFS8jisAtDSEWB9hzqRHLVQgFdA310e8XRJcW4tYhRB2A==", + "node_modules/@shikijs/langs": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.17.0.tgz", + "integrity": "sha512-icmur2n5Ojb+HAiQu6NEcIIJ8oWDFGGEpiqSCe43539Sabpx7Y829WR3QuUW2zjTM4l6V8Sazgb3rrHO2orEAw==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/engine-javascript": "1.29.1", - "@shikijs/engine-oniguruma": "1.29.1", - "@shikijs/types": "1.29.1", - "@shikijs/vscode-textmate": "^10.0.1", - "@types/hast": "^3.0.4", - "hast-util-to-html": "^9.0.4" + "@shikijs/types": "3.17.0" } }, - "node_modules/@shikijs/engine-javascript": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.29.1.tgz", - "integrity": "sha512-Hpi8k9x77rCQ7F/7zxIOUruNkNidMyBnP5qAGbLFqg4kRrg1HZhkB8btib5EXbQWTtLb5gBHOdBwshk20njD7Q==", + "node_modules/@shikijs/langs/node_modules/@shikijs/types": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.17.0.tgz", + "integrity": "sha512-wjLVfutYWVUnxAjsWEob98xgyaGv0dTEnMZDruU5mRjVN7szcGOfgO+997W2yR6odp+1PtSBNeSITRRTfUzK/g==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "1.29.1", - "@shikijs/vscode-textmate": "^10.0.1", - "oniguruma-to-es": "^2.2.0" + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" } }, - "node_modules/@shikijs/engine-oniguruma": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.29.2.tgz", - "integrity": "sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA==", + "node_modules/@shikijs/themes": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.17.0.tgz", + "integrity": "sha512-/xEizMHLBmMHwtx4JuOkRf3zwhWD2bmG5BRr0IPjpcWpaq4C3mYEuTk/USAEglN0qPrTwEHwKVpSu/y2jhferA==", + "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "1.29.2", - "@shikijs/vscode-textmate": "^10.0.1" + "@shikijs/types": "3.17.0" } }, - "node_modules/@shikijs/types": { - "version": "1.29.2", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.29.2.tgz", - "integrity": "sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw==", + "node_modules/@shikijs/themes/node_modules/@shikijs/types": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.17.0.tgz", + "integrity": "sha512-wjLVfutYWVUnxAjsWEob98xgyaGv0dTEnMZDruU5mRjVN7szcGOfgO+997W2yR6odp+1PtSBNeSITRRTfUzK/g==", + "dev": true, "license": "MIT", "dependencies": { - "@shikijs/vscode-textmate": "^10.0.1", + "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, @@ -2737,6 +2767,7 @@ "version": "10.0.2", "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", + "dev": true, "license": "MIT" }, "node_modules/@sindresorhus/is": { @@ -2848,6 +2879,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dev": true, "license": "MIT", "dependencies": { "@types/unist": "*" @@ -2915,6 +2947,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { @@ -3529,6 +3562,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, "license": "Python-2.0" }, "node_modules/argv-formatter": { @@ -3603,6 +3637,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, "license": "MIT" }, "node_modules/base64-js": { @@ -3865,17 +3900,6 @@ "node": ">=6" } }, - "node_modules/ccount": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", - "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/chai": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", @@ -5004,6 +5028,7 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.12" @@ -7205,6 +7230,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dev": true, "license": "MIT", "dependencies": { "uc.micro": "^2.0.0" @@ -7784,6 +7810,7 @@ "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true, "license": "MIT" }, "node_modules/lz-string": { @@ -7840,6 +7867,7 @@ "version": "14.1.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "dev": true, "license": "MIT", "dependencies": { "argparse": "^2.0.1", @@ -7943,6 +7971,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true, "license": "MIT" }, "node_modules/media-typer": { @@ -11121,18 +11150,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/oniguruma-to-es": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-2.3.0.tgz", - "integrity": "sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex-xs": "^1.0.0", - "regex": "^5.1.1", - "regex-recursion": "^5.1.1" - } - }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -11864,6 +11881,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -12187,34 +12205,6 @@ "dev": true, "license": "MIT" }, - "node_modules/regex": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/regex/-/regex-5.1.1.tgz", - "integrity": "sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "regex-utilities": "^2.3.0" - } - }, - "node_modules/regex-recursion": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-5.1.1.tgz", - "integrity": "sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==", - "dev": true, - "license": "MIT", - "dependencies": { - "regex": "^5.1.1", - "regex-utilities": "^2.3.0" - } - }, - "node_modules/regex-utilities": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz", - "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", - "dev": true, - "license": "MIT" - }, "node_modules/registry-auth-token": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.1.0.tgz", @@ -13765,21 +13755,6 @@ "node": ">=8" } }, - "node_modules/stringify-entities": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", - "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", - "dev": true, - "license": "MIT", - "dependencies": { - "character-entities-html4": "^2.0.0", - "character-entities-legacy": "^3.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -14388,31 +14363,34 @@ } }, "node_modules/typedoc": { - "version": "0.27.9", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.27.9.tgz", - "integrity": "sha512-/z585740YHURLl9DN2jCWe6OW7zKYm6VoQ93H0sxZ1cwHQEQrUn5BJrEnkWhfzUdyO+BLGjnKUZ9iz9hKloFDw==", + "version": "0.28.14", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.14.tgz", + "integrity": "sha512-ftJYPvpVfQvFzpkoSfHLkJybdA/geDJ8BGQt/ZnkkhnBYoYW6lBgPQXu6vqLxO4X75dA55hX8Af847H5KXlEFA==", + "dev": true, "license": "Apache-2.0", "dependencies": { - "@gerrit0/mini-shiki": "^1.24.0", + "@gerrit0/mini-shiki": "^3.12.0", "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.5", - "yaml": "^2.6.1" + "yaml": "^2.8.1" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { - "node": ">= 18" + "node": ">= 18", + "pnpm": ">= 10" }, "peerDependencies": { - "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x" + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x" } }, "node_modules/typedoc-github-theme": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/typedoc-github-theme/-/typedoc-github-theme-0.2.1.tgz", "integrity": "sha512-pOgsS9CVAOO3JxQ1V0ocDkrPCULpoWg1OzRmn/mOlyG+vEYwUAp5DAoKrGECdNIomycxcisc8ovcMX0nHDgWTA==", + "dev": true, "license": "MIT", "engines": { "node": ">=18.0.0" @@ -14421,22 +14399,11 @@ "typedoc": "^0.27.6" } }, - "node_modules/typedoc-plugin-markdown": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.4.2.tgz", - "integrity": "sha512-kJVkU2Wd+AXQpyL6DlYXXRrfNrHrEIUgiABWH8Z+2Lz5Sq6an4dQ/hfvP75bbokjNDUskOdFlEEm/0fSVyC7eg==", - "license": "MIT", - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "typedoc": "0.27.x" - } - }, "node_modules/typedoc-plugin-missing-exports": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-3.1.0.tgz", "integrity": "sha512-Sogbaj+qDa21NjB3SlIw4JXSwmcl/WOjwiPNaVEcPhpNG/MiRTtpwV81cT7h1cbu9StpONFPbddYWR0KV/fTWA==", + "dev": true, "license": "MIT", "peerDependencies": { "typedoc": "0.26.x || 0.27.x" @@ -14446,6 +14413,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -14455,6 +14423,7 @@ "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -14470,6 +14439,7 @@ "version": "5.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -14507,6 +14477,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true, "license": "MIT" }, "node_modules/uglify-js": { @@ -14984,15 +14955,16 @@ } }, "node_modules/yaml": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", - "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz", + "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", + "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" } }, "node_modules/yargs": { From 4e78d6787f1416846713ec37a5ed0127ee40d86f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Fri, 28 Nov 2025 14:42:51 +0100 Subject: [PATCH 06/11] fix: make docs build again --- package-lock.json | 22 +++++++++++----------- package.json | 10 +++++----- typedoc.json | 3 ++- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index ab37336a64..42a5946121 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,9 +52,9 @@ "semantic-release": "^25.0.2", "size-limit": "^11.1.6", "type-fest": "^4.18.3", - "typedoc": "^0.28.1", - "typedoc-github-theme": "^0.2.1", - "typedoc-plugin-missing-exports": "^3.1.0", + "typedoc": "^0.28.14", + "typedoc-github-theme": "^0.3.1", + "typedoc-plugin-missing-exports": "^4.1.2", "typescript": "^5.6.3", "typescript-eslint": "^8.16.0", "vitest": "^2.1.5" @@ -14387,26 +14387,26 @@ } }, "node_modules/typedoc-github-theme": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/typedoc-github-theme/-/typedoc-github-theme-0.2.1.tgz", - "integrity": "sha512-pOgsS9CVAOO3JxQ1V0ocDkrPCULpoWg1OzRmn/mOlyG+vEYwUAp5DAoKrGECdNIomycxcisc8ovcMX0nHDgWTA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/typedoc-github-theme/-/typedoc-github-theme-0.3.1.tgz", + "integrity": "sha512-j6PmkAGmf/MGCzYjQcUH6jS9djPsNl/IoTXooxC+MoeMkBhbmPyKJlpR6Lw12BLoe2OYpYA2J1KMktUJXp/8Sw==", "dev": true, "license": "MIT", "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "typedoc": "^0.27.6" + "typedoc": "~0.28.0" } }, "node_modules/typedoc-plugin-missing-exports": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-3.1.0.tgz", - "integrity": "sha512-Sogbaj+qDa21NjB3SlIw4JXSwmcl/WOjwiPNaVEcPhpNG/MiRTtpwV81cT7h1cbu9StpONFPbddYWR0KV/fTWA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-4.1.2.tgz", + "integrity": "sha512-WNoeWX9+8X3E3riuYPduilUTFefl1K+Z+5bmYqNeH5qcWjtnTRMbRzGdEQ4XXn1WEO4WCIlU0vf46Ca2y/mspg==", "dev": true, "license": "MIT", "peerDependencies": { - "typedoc": "0.26.x || 0.27.x" + "typedoc": "^0.28.1" } }, "node_modules/typedoc/node_modules/brace-expansion": { diff --git a/package.json b/package.json index 986d5ad057..2421c061a2 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "browserslist": [ ">0.3%", "Chrome >= 85", - "Edge >= 85", + "Edge >= 85", "Firefox >= 79", "Safari >= 14" ], @@ -113,9 +113,9 @@ "semantic-release": "^25.0.2", "size-limit": "^11.1.6", "type-fest": "^4.18.3", - "typedoc": "^0.28.1", - "typedoc-github-theme": "^0.2.1", - "typedoc-plugin-missing-exports": "^3.1.0", + "typedoc": "^0.28.14", + "typedoc-github-theme": "^0.3.1", + "typedoc-plugin-missing-exports": "^4.1.2", "typescript": "^5.6.3", "typescript-eslint": "^8.16.0", "vitest": "^2.1.5" @@ -182,4 +182,4 @@ "limit": "177 kB" } ] -} \ No newline at end of file +} diff --git a/typedoc.json b/typedoc.json index 200dd2105e..58da24a0fb 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,7 +1,8 @@ { "name": "contentful-management.js", "entryPoints": [ - "lib/contentful-management.ts", + "lib/index.ts", + // "lib/contentful-management.ts", // "lib/plain/plain-client.ts", // "lib/plain/wrappers/wrap.ts", // "lib/contentful-management.ts", From 2a659e46c1d5b7f5c766d849ae68d45a2e68aaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Tue, 25 Mar 2025 14:56:46 +0100 Subject: [PATCH 07/11] refactor: clean up createClient overloads, add examples for each way to use it and make compatible with typedoc --- lib/index.ts | 50 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index 44c528efba..0158be1545 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -48,10 +48,27 @@ export type ClientOptions = UserAgentParams & XOR[0]): ReturnType => adapter.makeRequest({ ...options, userAgent }) - if (opts.type === 'plain') { + if (opts && opts.type === 'plain') { return createPlainClient(makeRequest, opts.defaults) } else { return createClientApi(makeRequest) as ClientAPI From 58ed118fa8b98bec6ab347cb150f661a19794734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Fri, 28 Nov 2025 15:40:46 +0100 Subject: [PATCH 08/11] docs: categorise code files for typedoc --- lib/create-contentful-api.ts | 4 ++++ lib/entities/access-token.ts | 4 ++++ lib/entities/api-key.ts | 4 ++++ lib/entities/app-access-token.ts | 4 ++++ lib/entities/app-action-call.ts | 4 ++++ lib/entities/app-action.ts | 4 ++++ lib/entities/app-bundle.ts | 4 ++++ lib/entities/app-definition.ts | 4 ++++ lib/entities/app-details.ts | 4 ++++ lib/entities/app-event-subscription.ts | 4 ++++ lib/entities/app-installation.ts | 4 ++++ lib/entities/app-key.ts | 4 ++++ lib/entities/app-signed-request.ts | 4 ++++ lib/entities/app-signing-secret.ts | 4 ++++ lib/entities/app-upload.ts | 4 ++++ lib/entities/asset-key.ts | 4 ++++ lib/entities/asset.ts | 4 ++++ lib/entities/bulk-action.ts | 4 ++++ lib/entities/comment.ts | 4 ++++ lib/entities/concept-scheme.ts | 4 ++++ lib/entities/concept.ts | 4 ++++ lib/entities/content-type-fields.ts | 4 ++++ lib/entities/content-type.ts | 4 ++++ lib/entities/editor-interface.ts | 4 ++++ lib/entities/entry.ts | 4 ++++ lib/entities/environment-alias.ts | 4 ++++ .../environment-template-installation.ts | 4 ++++ lib/entities/environment-template.ts | 4 ++++ lib/entities/environment.ts | 4 ++++ lib/entities/extension.ts | 4 ++++ lib/entities/field-type.ts | 4 ++++ lib/entities/function-log.ts | 4 ++++ lib/entities/function.ts | 4 ++++ lib/entities/locale.ts | 4 ++++ lib/entities/oauth-application.ts | 4 ++++ lib/entities/organization-invitation.ts | 4 ++++ lib/entities/organization-membership.ts | 4 ++++ lib/entities/organization.ts | 4 ++++ lib/entities/personal-access-token.ts | 4 ++++ lib/entities/preview-api-key.ts | 4 ++++ lib/entities/release-action.ts | 4 ++++ lib/entities/release.ts | 4 ++++ lib/entities/resource-provider.ts | 4 ++++ lib/entities/resource-type.ts | 4 ++++ lib/entities/resource.ts | 4 ++++ lib/entities/role.ts | 4 ++++ lib/entities/scheduled-action.ts | 4 ++++ lib/entities/snapshot.ts | 4 ++++ lib/entities/space-member.ts | 4 ++++ lib/entities/space-membership.ts | 4 ++++ lib/entities/space.ts | 4 ++++ lib/entities/tag.ts | 4 ++++ lib/entities/task.ts | 4 ++++ lib/entities/team-membership.ts | 4 ++++ lib/entities/team-space-membership.ts | 4 ++++ lib/entities/team.ts | 4 ++++ lib/entities/ui-config.ts | 4 ++++ lib/entities/upload-credential.ts | 4 ++++ lib/entities/upload.ts | 4 ++++ lib/entities/usage.ts | 4 ++++ lib/entities/user-ui-config.ts | 4 ++++ lib/entities/user.ts | 4 ++++ lib/entities/utils.ts | 4 ++++ lib/entities/webhook.ts | 4 ++++ lib/entities/widget-parameters.ts | 4 ++++ lib/entities/workflow-definition.ts | 4 ++++ lib/entities/workflow.ts | 4 ++++ lib/entities/workflows-changelog-entry.ts | 4 ++++ lib/plain/as-iterator.ts | 4 ++++ lib/plain/checks.ts | 16 ++++++++++++++++ lib/plain/plain-client-types.ts | 5 +++++ lib/plain/plain-client.ts | 5 +++++ 72 files changed, 302 insertions(+) diff --git a/lib/create-contentful-api.ts b/lib/create-contentful-api.ts index 1875cd8708..081c8ecc88 100644 --- a/lib/create-contentful-api.ts +++ b/lib/create-contentful-api.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Legacy Client + */ import { createRequestConfig } from 'contentful-sdk-core' import type { Collection, diff --git a/lib/entities/access-token.ts b/lib/entities/access-token.ts index 15714b2c66..b9f55d7976 100644 --- a/lib/entities/access-token.ts +++ b/lib/entities/access-token.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/api-key.ts b/lib/entities/api-key.ts index 7c7745808e..9c3904c0e8 100644 --- a/lib/entities/api-key.ts +++ b/lib/entities/api-key.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { DefaultElements, MakeRequest, MetaLinkProps, MetaSysProps } from '../common-types' diff --git a/lib/entities/app-access-token.ts b/lib/entities/app-access-token.ts index 3d1d51b5ca..e9c85dce55 100644 --- a/lib/entities/app-access-token.ts +++ b/lib/entities/app-access-token.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import type { Except } from 'type-fest' diff --git a/lib/entities/app-action-call.ts b/lib/entities/app-action-call.ts index 6300264e64..fa48a14070 100644 --- a/lib/entities/app-action-call.ts +++ b/lib/entities/app-action-call.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { toPlainObject } from 'contentful-sdk-core' import type { Except, JsonValue } from 'type-fest' diff --git a/lib/entities/app-action.ts b/lib/entities/app-action.ts index 878928a6a0..c670bd5f51 100644 --- a/lib/entities/app-action.ts +++ b/lib/entities/app-action.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { Except } from 'type-fest' diff --git a/lib/entities/app-bundle.ts b/lib/entities/app-bundle.ts index 62e76a2a62..80046c4ea2 100644 --- a/lib/entities/app-bundle.ts +++ b/lib/entities/app-bundle.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { Except } from 'type-fest' diff --git a/lib/entities/app-definition.ts b/lib/entities/app-definition.ts index b98c238d2f..c1afa32205 100644 --- a/lib/entities/app-definition.ts +++ b/lib/entities/app-definition.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import type { diff --git a/lib/entities/app-details.ts b/lib/entities/app-details.ts index 5819b1ceed..17cc2eafc2 100644 --- a/lib/entities/app-details.ts +++ b/lib/entities/app-details.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { toPlainObject } from 'contentful-sdk-core' import type { Except } from 'type-fest' diff --git a/lib/entities/app-event-subscription.ts b/lib/entities/app-event-subscription.ts index 44c0a0f9d4..15e0ad3a3a 100644 --- a/lib/entities/app-event-subscription.ts +++ b/lib/entities/app-event-subscription.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { toPlainObject } from 'contentful-sdk-core' import type { Except } from 'type-fest' diff --git a/lib/entities/app-installation.ts b/lib/entities/app-installation.ts index e635dc78bf..964c97bb75 100644 --- a/lib/entities/app-installation.ts +++ b/lib/entities/app-installation.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { toPlainObject, freezeSys } from 'contentful-sdk-core' import copy from 'fast-copy' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/app-key.ts b/lib/entities/app-key.ts index 773248c90c..771d7c32c2 100644 --- a/lib/entities/app-key.ts +++ b/lib/entities/app-key.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { toPlainObject } from 'contentful-sdk-core' import type { Except } from 'type-fest' diff --git a/lib/entities/app-signed-request.ts b/lib/entities/app-signed-request.ts index 7e79e429a6..ce1d274cee 100644 --- a/lib/entities/app-signed-request.ts +++ b/lib/entities/app-signed-request.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { toPlainObject } from 'contentful-sdk-core' import type { Except } from 'type-fest' diff --git a/lib/entities/app-signing-secret.ts b/lib/entities/app-signing-secret.ts index 5a50d8ae63..f9a3cb0942 100644 --- a/lib/entities/app-signing-secret.ts +++ b/lib/entities/app-signing-secret.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { toPlainObject } from 'contentful-sdk-core' import type { Except } from 'type-fest' diff --git a/lib/entities/app-upload.ts b/lib/entities/app-upload.ts index 9245ee376c..ca2d36f97d 100644 --- a/lib/entities/app-upload.ts +++ b/lib/entities/app-upload.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { Except } from 'type-fest' diff --git a/lib/entities/asset-key.ts b/lib/entities/asset-key.ts index 6713e5d000..bf15bcecbc 100644 --- a/lib/entities/asset-key.ts +++ b/lib/entities/asset-key.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { toPlainObject } from 'contentful-sdk-core' import type { DefaultElements, MakeRequest } from '../common-types' diff --git a/lib/entities/asset.ts b/lib/entities/asset.ts index 275d159f0e..43381cbde5 100644 --- a/lib/entities/asset.ts +++ b/lib/entities/asset.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/bulk-action.ts b/lib/entities/bulk-action.ts index d65da71c63..99480df36e 100644 --- a/lib/entities/bulk-action.ts +++ b/lib/entities/bulk-action.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ /* eslint-disable @typescript-eslint/no-explicit-any */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' diff --git a/lib/entities/comment.ts b/lib/entities/comment.ts index 1fc40a5424..fd593dc666 100644 --- a/lib/entities/comment.ts +++ b/lib/entities/comment.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import type { Node, Text } from '@contentful/rich-text-types' import copy from 'fast-copy' diff --git a/lib/entities/concept-scheme.ts b/lib/entities/concept-scheme.ts index c2a8cdea5d..3a12771f19 100644 --- a/lib/entities/concept-scheme.ts +++ b/lib/entities/concept-scheme.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import type { Link } from '../common-types' import type { TaxonomyConceptLink } from './concept' import type { LocalizedEntity } from './utils' diff --git a/lib/entities/concept.ts b/lib/entities/concept.ts index 093e41da1b..e540a5aa5e 100644 --- a/lib/entities/concept.ts +++ b/lib/entities/concept.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import type { Link } from '../common-types' import type { LocalizedEntity } from './utils' diff --git a/lib/entities/content-type-fields.ts b/lib/entities/content-type-fields.ts index c4c05fae79..6e511cb3dd 100644 --- a/lib/entities/content-type-fields.ts +++ b/lib/entities/content-type-fields.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import type { KeyValueMap } from '../common-types' import type { INLINES, BLOCKS } from '@contentful/rich-text-types' diff --git a/lib/entities/content-type.ts b/lib/entities/content-type.ts index 72521b9250..b79ead8449 100644 --- a/lib/entities/content-type.ts +++ b/lib/entities/content-type.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { Except, RequireAtLeastOne, SetOptional } from 'type-fest' diff --git a/lib/entities/editor-interface.ts b/lib/entities/editor-interface.ts index 78ae5b10d4..d808244866 100644 --- a/lib/entities/editor-interface.ts +++ b/lib/entities/editor-interface.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/entry.ts b/lib/entities/entry.ts index 0f82aa3b2a..7ee1fc9c83 100644 --- a/lib/entities/entry.ts +++ b/lib/entities/entry.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { diff --git a/lib/entities/environment-alias.ts b/lib/entities/environment-alias.ts index 00dc08b30a..21879ce0ef 100644 --- a/lib/entities/environment-alias.ts +++ b/lib/entities/environment-alias.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/environment-template-installation.ts b/lib/entities/environment-template-installation.ts index b7ad4e0acc..485405f9cd 100644 --- a/lib/entities/environment-template-installation.ts +++ b/lib/entities/environment-template-installation.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { diff --git a/lib/entities/environment-template.ts b/lib/entities/environment-template.ts index abd87d5bcb..f059b7263f 100644 --- a/lib/entities/environment-template.ts +++ b/lib/entities/environment-template.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { BasicMetaSysProps, Link, MakeRequest, DefaultElements } from '../common-types' diff --git a/lib/entities/environment.ts b/lib/entities/environment.ts index 96d89aec6f..c3af2d84ed 100644 --- a/lib/entities/environment.ts +++ b/lib/entities/environment.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/extension.ts b/lib/entities/extension.ts index 7a92a5c0c9..82c34c6dab 100644 --- a/lib/entities/extension.ts +++ b/lib/entities/extension.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/field-type.ts b/lib/entities/field-type.ts index 341bfa3d48..f06f605050 100644 --- a/lib/entities/field-type.ts +++ b/lib/entities/field-type.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ export type FieldType = | { type: 'Symbol' } | { type: 'Text' } diff --git a/lib/entities/function-log.ts b/lib/entities/function-log.ts index 3a2e4fe319..24e52ea306 100644 --- a/lib/entities/function-log.ts +++ b/lib/entities/function-log.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import type { Link, DefaultElements } from '../common-types' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' diff --git a/lib/entities/function.ts b/lib/entities/function.ts index 7f98d7d05f..7ab80e79f1 100644 --- a/lib/entities/function.ts +++ b/lib/entities/function.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import type { Link, DefaultElements } from '../common-types' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' diff --git a/lib/entities/locale.ts b/lib/entities/locale.ts index 5aa4b630b7..15f6bab77b 100644 --- a/lib/entities/locale.ts +++ b/lib/entities/locale.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import type { Except, SetOptional } from 'type-fest' diff --git a/lib/entities/oauth-application.ts b/lib/entities/oauth-application.ts index f7f6f79aa1..af451dc712 100644 --- a/lib/entities/oauth-application.ts +++ b/lib/entities/oauth-application.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import type { BasicMetaSysProps, DefaultElements, MakeRequest } from '../common-types' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/organization-invitation.ts b/lib/entities/organization-invitation.ts index 14e25ca181..fc010214aa 100644 --- a/lib/entities/organization-invitation.ts +++ b/lib/entities/organization-invitation.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { DefaultElements, MakeRequest, MetaLinkProps, MetaSysProps } from '../common-types' diff --git a/lib/entities/organization-membership.ts b/lib/entities/organization-membership.ts index 9b23eaaf86..6dc198d2de 100644 --- a/lib/entities/organization-membership.ts +++ b/lib/entities/organization-membership.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/organization.ts b/lib/entities/organization.ts index 2d0558740b..8d595ba4b6 100644 --- a/lib/entities/organization.ts +++ b/lib/entities/organization.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/personal-access-token.ts b/lib/entities/personal-access-token.ts index 68d6bae9e4..43f6dd02e3 100644 --- a/lib/entities/personal-access-token.ts +++ b/lib/entities/personal-access-token.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/preview-api-key.ts b/lib/entities/preview-api-key.ts index 28ae63fc3b..039add2e43 100644 --- a/lib/entities/preview-api-key.ts +++ b/lib/entities/preview-api-key.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { DefaultElements, MakeRequest, MetaSysProps } from '../common-types' diff --git a/lib/entities/release-action.ts b/lib/entities/release-action.ts index 6c566c153b..7979a8c57b 100644 --- a/lib/entities/release-action.ts +++ b/lib/entities/release-action.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ /* eslint-disable @typescript-eslint/no-explicit-any */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' diff --git a/lib/entities/release.ts b/lib/entities/release.ts index 6a80d5e880..c568de923a 100644 --- a/lib/entities/release.ts +++ b/lib/entities/release.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ /* eslint-disable @typescript-eslint/no-explicit-any */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' diff --git a/lib/entities/resource-provider.ts b/lib/entities/resource-provider.ts index ce8afe2eef..4c35f344e8 100644 --- a/lib/entities/resource-provider.ts +++ b/lib/entities/resource-provider.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import type { BasicMetaSysProps, CollectionProp, diff --git a/lib/entities/resource-type.ts b/lib/entities/resource-type.ts index 051dc7f242..2c6afe7388 100644 --- a/lib/entities/resource-type.ts +++ b/lib/entities/resource-type.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import type { BasicMetaSysProps, CursorPaginatedCollectionProp, diff --git a/lib/entities/resource.ts b/lib/entities/resource.ts index b57e610d80..976f31efdb 100644 --- a/lib/entities/resource.ts +++ b/lib/entities/resource.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import type { BasicCursorPaginationOptions, CursorPaginatedCollectionProp, diff --git a/lib/entities/role.ts b/lib/entities/role.ts index fa5dbc897f..6e5f5b282d 100644 --- a/lib/entities/role.ts +++ b/lib/entities/role.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/scheduled-action.ts b/lib/entities/scheduled-action.ts index 0e0ec2326d..01bb9d3624 100644 --- a/lib/entities/scheduled-action.ts +++ b/lib/entities/scheduled-action.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { diff --git a/lib/entities/snapshot.ts b/lib/entities/snapshot.ts index 119f4bbc70..071d997c4e 100644 --- a/lib/entities/snapshot.ts +++ b/lib/entities/snapshot.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/space-member.ts b/lib/entities/space-member.ts index 24ac0ccc13..df541abfa5 100644 --- a/lib/entities/space-member.ts +++ b/lib/entities/space-member.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { DefaultElements, MakeRequest, MetaLinkProps, MetaSysProps } from '../common-types' diff --git a/lib/entities/space-membership.ts b/lib/entities/space-membership.ts index e60afdebe2..27766803a6 100644 --- a/lib/entities/space-membership.ts +++ b/lib/entities/space-membership.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/space.ts b/lib/entities/space.ts index b926ecf9ee..ef4bf37c18 100644 --- a/lib/entities/space.ts +++ b/lib/entities/space.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { BasicMetaSysProps, DefaultElements, MakeRequest } from '../common-types' diff --git a/lib/entities/tag.ts b/lib/entities/tag.ts index 98bc4c88db..819cd049f1 100644 --- a/lib/entities/tag.ts +++ b/lib/entities/tag.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { diff --git a/lib/entities/task.ts b/lib/entities/task.ts index 30ab37f354..ad37cd7eed 100644 --- a/lib/entities/task.ts +++ b/lib/entities/task.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { diff --git a/lib/entities/team-membership.ts b/lib/entities/team-membership.ts index 058c6de163..d02f22524b 100644 --- a/lib/entities/team-membership.ts +++ b/lib/entities/team-membership.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/team-space-membership.ts b/lib/entities/team-space-membership.ts index 33e87641e9..4ffccfc80b 100644 --- a/lib/entities/team-space-membership.ts +++ b/lib/entities/team-space-membership.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/team.ts b/lib/entities/team.ts index 8fc87e8051..57383003d6 100644 --- a/lib/entities/team.ts +++ b/lib/entities/team.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/ui-config.ts b/lib/entities/ui-config.ts index e3b9b0c808..25c15d2b66 100644 --- a/lib/entities/ui-config.ts +++ b/lib/entities/ui-config.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { BasicMetaSysProps, DefaultElements, MakeRequest, SysLink } from '../common-types' diff --git a/lib/entities/upload-credential.ts b/lib/entities/upload-credential.ts index b32ff48dd0..82318e4520 100644 --- a/lib/entities/upload-credential.ts +++ b/lib/entities/upload-credential.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { DefaultElements, MakeRequest, MetaSysProps, SysLink } from '../common-types' diff --git a/lib/entities/upload.ts b/lib/entities/upload.ts index 33015d8284..e0ca33977e 100644 --- a/lib/entities/upload.ts +++ b/lib/entities/upload.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import copy from 'fast-copy' import { freezeSys, toPlainObject } from 'contentful-sdk-core' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/usage.ts b/lib/entities/usage.ts index fd0f7088e0..ff6436f095 100644 --- a/lib/entities/usage.ts +++ b/lib/entities/usage.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { diff --git a/lib/entities/user-ui-config.ts b/lib/entities/user-ui-config.ts index 1d2f72f132..324d7fc399 100644 --- a/lib/entities/user-ui-config.ts +++ b/lib/entities/user-ui-config.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { BasicMetaSysProps, DefaultElements, MakeRequest, SysLink } from '../common-types' diff --git a/lib/entities/user.ts b/lib/entities/user.ts index de88211e95..ce710cb5cb 100644 --- a/lib/entities/user.ts +++ b/lib/entities/user.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import enhanceWithMethods from '../enhance-with-methods' diff --git a/lib/entities/utils.ts b/lib/entities/utils.ts index 1a5e5d92f6..eceae56daf 100644 --- a/lib/entities/utils.ts +++ b/lib/entities/utils.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ export type LocalizedEntity< Entity, LocalizedFields extends keyof Entity, diff --git a/lib/entities/webhook.ts b/lib/entities/webhook.ts index 3a9433d085..014869f325 100644 --- a/lib/entities/webhook.ts +++ b/lib/entities/webhook.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { Except, JsonValue, SetOptional } from 'type-fest' diff --git a/lib/entities/widget-parameters.ts b/lib/entities/widget-parameters.ts index 1913b57d33..ac92626807 100644 --- a/lib/entities/widget-parameters.ts +++ b/lib/entities/widget-parameters.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ export type ParameterType = 'Boolean' | 'Symbol' | 'Number' | 'Enum' export type InstallationParameterType = ParameterType | 'Secret' export type ParameterOption = string | { [key: string]: string } diff --git a/lib/entities/workflow-definition.ts b/lib/entities/workflow-definition.ts index e3b3f93ce1..dcd7b2e8be 100644 --- a/lib/entities/workflow-definition.ts +++ b/lib/entities/workflow-definition.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { diff --git a/lib/entities/workflow.ts b/lib/entities/workflow.ts index 186b8fe066..901a25280a 100644 --- a/lib/entities/workflow.ts +++ b/lib/entities/workflow.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { diff --git a/lib/entities/workflows-changelog-entry.ts b/lib/entities/workflows-changelog-entry.ts index 0a6ba5f59c..509cb626ed 100644 --- a/lib/entities/workflows-changelog-entry.ts +++ b/lib/entities/workflows-changelog-entry.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Entities + */ import { freezeSys, toPlainObject } from 'contentful-sdk-core' import copy from 'fast-copy' import type { diff --git a/lib/plain/as-iterator.ts b/lib/plain/as-iterator.ts index 7d37b86781..9239b9d37c 100644 --- a/lib/plain/as-iterator.ts +++ b/lib/plain/as-iterator.ts @@ -1,3 +1,7 @@ +/** + * @module + * @category Plain Client + */ import copy from 'fast-copy' import type { CollectionProp, QueryParams } from '../common-types' diff --git a/lib/plain/checks.ts b/lib/plain/checks.ts index 1611578618..7245f1af8c 100644 --- a/lib/plain/checks.ts +++ b/lib/plain/checks.ts @@ -1,13 +1,29 @@ +/** + * @module + * @category Plain Client + */ import type { MetaSysProps } from '../common-types' +/** + * Returns true when an entity is published + */ export const isPublished = (data: { sys: MetaSysProps }) => !!data.sys.publishedVersion +/** + * Returns true when an entity has unpublished changes + */ export const isUpdated = (data: { sys: MetaSysProps }) => { // The act of publishing an entity increases its version by 1, so any entry which has // 2 versions higher or more than the publishedVersion has unpublished changes. return !!(data.sys.publishedVersion && data.sys.version > data.sys.publishedVersion + 1) } +/** + * Returns true when an entity has no published version + */ export const isDraft = (data: { sys: MetaSysProps }) => !data.sys.publishedVersion +/** + * Returns true when an entity is archived (and unpublished) + */ export const isArchived = (data: { sys: MetaSysProps }) => !!data.sys.archivedVersion diff --git a/lib/plain/plain-client-types.ts b/lib/plain/plain-client-types.ts index 4ddf1a9883..d115cffae8 100644 --- a/lib/plain/plain-client-types.ts +++ b/lib/plain/plain-client-types.ts @@ -1,3 +1,8 @@ +/** + * @module + * @category Plain Client + */ + import type { RawAxiosRequestConfig, RawAxiosRequestHeaders } from 'axios' import type { OpPatch } from 'json-patch' import type { diff --git a/lib/plain/plain-client.ts b/lib/plain/plain-client.ts index 4fca36d9e2..a8db39f40d 100644 --- a/lib/plain/plain-client.ts +++ b/lib/plain/plain-client.ts @@ -1,3 +1,8 @@ +/** + * @module + * @category Plain Client + */ + import type { GetContentTypeParams, GetSpaceEnvironmentParams, MakeRequest } from '../common-types' import { omitAndDeleteField } from '../methods/content-type' import type { PlainClientAPI } from './plain-client-types' From 011489b9fafb1a682e5d308767e9d315bf1a01ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Fri, 28 Nov 2025 15:44:30 +0100 Subject: [PATCH 09/11] docs: fix typo --- lib/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.ts b/lib/index.ts index 0158be1545..b1133f0376 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -95,7 +95,7 @@ export function createClient(clientOptions: ClientOptions): ClientAPI /** * Create a legacy or plain client instance * - * Please check the responding section below: + * Please check the corresponding section below: * * * [Plain Client](#createclient) * * [Legacy Chainable Client](#createclient-1) From 4b79214e67268132d07579d9cbdb942bc2ce2a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Fri, 28 Nov 2025 15:44:59 +0100 Subject: [PATCH 10/11] docs: improve typedocs config to finally make some sense --- typedoc.json | 99 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 84 insertions(+), 15 deletions(-) diff --git a/typedoc.json b/typedoc.json index 58da24a0fb..6e2457be1d 100644 --- a/typedoc.json +++ b/typedoc.json @@ -2,23 +2,87 @@ "name": "contentful-management.js", "entryPoints": [ "lib/index.ts", - // "lib/contentful-management.ts", - // "lib/plain/plain-client.ts", + "lib/create-contentful-api.ts", + "lib/plain/plain-client.ts", + "lib/plain/checks.ts", // "lib/plain/wrappers/wrap.ts", - // "lib/contentful-management.ts", // "lib/create-adapter.ts", - // "lib/create-contentful-api.ts", // "lib/entities/app-action.ts", - // "lib/entities/environment-template-installation.ts" + // "lib/entities/environment-template-installation.ts", + "lib/entities/access-token.ts", + "lib/entities/api-key.ts", + "lib/entities/app-access-token.ts", + "lib/entities/app-action-call.ts", + "lib/entities/app-action.ts", + "lib/entities/app-bundle.ts", + "lib/entities/app-definition.ts", + "lib/entities/app-details.ts", + "lib/entities/app-event-subscription.ts", + "lib/entities/app-installation.ts", + "lib/entities/app-key.ts", + "lib/entities/app-signed-request.ts", + "lib/entities/app-signing-secret.ts", + "lib/entities/app-upload.ts", + "lib/entities/asset-key.ts", + "lib/entities/asset.ts", + "lib/entities/bulk-action.ts", + "lib/entities/comment.ts", + "lib/entities/concept-scheme.ts", + "lib/entities/concept.ts", + "lib/entities/content-type-fields.ts", + "lib/entities/content-type.ts", + "lib/entities/editor-interface.ts", + "lib/entities/entry.ts", + "lib/entities/environment-alias.ts", + "lib/entities/environment-template-installation.ts", + "lib/entities/environment-template.ts", + "lib/entities/environment.ts", + "lib/entities/extension.ts", + "lib/entities/field-type.ts", + "lib/entities/function-log.ts", + "lib/entities/function.ts", + "lib/entities/locale.ts", + "lib/entities/oauth-application.ts", + "lib/entities/organization-invitation.ts", + "lib/entities/organization-membership.ts", + "lib/entities/organization.ts", + "lib/entities/personal-access-token.ts", + "lib/entities/preview-api-key.ts", + "lib/entities/release-action.ts", + "lib/entities/release.ts", + "lib/entities/resource-provider.ts", + "lib/entities/resource-type.ts", + "lib/entities/resource.ts", + "lib/entities/role.ts", + "lib/entities/scheduled-action.ts", + "lib/entities/snapshot.ts", + "lib/entities/space-member.ts", + "lib/entities/space-membership.ts", + "lib/entities/space.ts", + "lib/entities/tag.ts", + "lib/entities/task.ts", + "lib/entities/team-membership.ts", + "lib/entities/team-space-membership.ts", + "lib/entities/team.ts", + "lib/entities/ui-config.ts", + "lib/entities/upload-credential.ts", + "lib/entities/upload.ts", + "lib/entities/usage.ts", + "lib/entities/user-ui-config.ts", + "lib/entities/user.ts", + "lib/entities/utils.ts", + "lib/entities/webhook.ts", + "lib/entities/widget-parameters.ts", + "lib/entities/workflow-definition.ts", + "lib/entities/workflow.ts", + "lib/entities/workflows-changelog-entry.ts" ], "out": "out", "includeVersion": true, - // "categorizeByGroup": true, - // "categoryOrder": ["Core", "Clients", "Entities", "Utilities", "*"], - "categoryOrder": ["createClient", "ClientParams", "ContentType", "Entry", "*"], - // "groupOrder": ["Variables", "Functions", "*"], + "categorizeByGroup": false, + "categoryOrder": ["Core", "Plain Client", "Legacy Client", "Entities", "*"], + "defaultCategory": "Other", "kindSortOrder": [ - "Reference", "Project", "Module", "Namespace", @@ -31,6 +95,7 @@ "Interface", "TypeAlias", "Variable", + "Reference", "Accessor", "Method", "Parameter", @@ -42,6 +107,7 @@ "GetSignature", "SetSignature" ], + "groupOrder": ["Functions", "Interfaces", "Modules", "*"], "sortEntryPoints": false, "readme": "README.md", "excludePrivate": false, @@ -49,9 +115,12 @@ "excludeProtected": false, "treatWarningsAsErrors": false, "sort": ["source-order"], - "plugin": [ - "typedoc-plugin-missing-exports", - "typedoc-github-theme" - ], + "plugin": ["typedoc-plugin-missing-exports", "typedoc-github-theme"], "hideGenerator": true, -} \ No newline at end of file + "includeHierarchySummary": true, + "navigation": { + "includeGroups": false, + "includeCategories": true, + "includeFolders": false + } +} From e3a608c3ec129fb56cbe6253ea450dedf670ca12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Fri, 28 Nov 2025 15:56:40 +0100 Subject: [PATCH 11/11] chore: restore original readme.md structure --- README.md | 71 +++++++++++++++++++++---------------------------------- 1 file changed, 27 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 88098c544d..bf509471f6 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@

Readme · Setup · + Migration · Changelog · Contributing

@@ -41,47 +42,29 @@ -- [Getting started](#getting-started) +- [Features](#features) +- [Supported Environments](#supported-environments) +- [Getting Started](#getting-started) - [Installation](#installation) - - [Node:](#node) - - [Browser bundle in script tag:](#browser-bundle-in-script-tag) - - [Typings](#typings) + - [Node](#node) + - [Browser](#browser-bundle-in-script-tag) + - [Typings](#typings) - [Authentication](#authentication) - [Using ES6 import](#using-es6-import) - - [Using CommonJS require imports](#using-commonjs-require-imports) - - [Your first request](#your-first-request) + - [Your first Request](#your-first-request) - [Legacy Client Interface](#legacy-client-interface) - - [App Framework](#app-framework) - - [Troubleshooting](#troubleshooting) - - [Documentation/References](#documentationreferences) +- [App Framework](#app-framework) +- [Troubleshooting](#troubleshooting) +- [Documentation/References](#documentationreferences) - [Configuration](#configuration) - - [accessToken (required, when `apiAdapter` is not set)](#accesstoken-required-when-apiadapter-is-not-set) - - [host (default: `'api.contentful.com'`)](#host-default-apicontentfulcom) - - [hostUpload (default: `'upload.contentful.com'`)](#hostupload-default-uploadcontentfulcom) - - [basePath (default: \`\`)](#basepath-default-) - - [httpAgent (default: `undefined`)](#httpagent-default-undefined) - - [httpsAgent (default: `undefined`)](#httpsagent-default-undefined) - - [headers (default: `{}`)](#headers-default-) - - [proxy (default: `undefined`)](#proxy-default-undefined) - - [retryOnError (default: `true`)](#retryonerror-default-true) - - [logHandler (default: `function (level, data) {}`)](#loghandler-default-function-level-data-) - - [requestLogger (default: `function (config) {}`)](#requestlogger-default-function-config-) - - [responseLogger (default: `function (response) {}`)](#responselogger-default-function-response-) - - [apiAdapter (default: `new RestAdapter(configuration)`)](#apiadapter-default-new-restadapterconfiguration) - - [throttle (default: `0`)](#throttle-default-0) - - [Reference documentation](#reference-documentation) - - [Contentful JavaScript resources](#contentful-javascript-resources) - - [REST API reference](#rest-api-reference) - - [Versioning](#versioning) - - [Experimental features](#experimental-features) - - [Current experimental features](#current-experimental-features) - - [Reach out to us](#reach-out-to-us) - - [You have questions about how to use this library?](#you-have-questions-about-how-to-use-this-library) - - [You found a bug or want to propose a feature?](#you-found-a-bug-or-want-to-propose-a-feature) - - [You need to share confidential information or have other questions?](#you-need-to-share-confidential-information-or-have-other-questions) - - [Get involved](#get-involved) - - [License](#license) - - [Code of Conduct](#code-of-conduct) + - [Reference Documentation](#reference-documentation) + - [Contentful Javascript resources](#contentful-javascript-resources) + - [REST API reference](#rest-api-reference) +- [Versioning](#versioning) +- [Reach out to us](#reach-out-to-us) +- [Get involved](#get-involved) +- [License](#license) +- [Code of Conduct](#code-of-conduct) @@ -179,7 +162,7 @@ const client = createClient( // This is the access token for this space. Normally you get the token in the Contentful web app accessToken: 'YOUR_ACCESS_TOKEN', }, - { type: 'plain' } + { type: 'plain' }, ) //.... ``` @@ -190,13 +173,13 @@ You can use the commonjs require with the library as follows ```js // import createClient directly -const contentful = require('contentful-management'); +const contentful = require('contentful-management') const client = contentful.createClient( { // This is the access token for this space. Normally you get the token in the Contentful web app accessToken: 'YOUR_ACCESS_TOKEN', }, - { type: 'plain' } + { type: 'plain' }, ) //.... ``` @@ -211,7 +194,7 @@ const plainClient = createClient( { accessToken: 'YOUR_ACCESS_TOKEN', }, - { type: 'plain' } + { type: 'plain' }, ) const environment = await plainClient.environment.get({ @@ -239,7 +222,7 @@ const scopedPlainClient = createClient( spaceId: '', environmentId: '', }, - } + }, ) // entries from '' & '' @@ -250,8 +233,8 @@ const entries = await scopedPlainClient.entry.getMany({ }, }) ``` - -You can try and change the above example on [Runkit](https://npm.runkit.com/contentful-management). + +You can try and change the above example on [Runkit](https://npm.runkit.com/contentful-management). The benefits of using the "plain" version of the client, over the legacy version, are: @@ -313,7 +296,7 @@ contentfulApp.init((sdk) => { environmentId: sdk.ids.environmentAlias ?? sdk.ids.environment, spaceId: sdk.ids.space, }, - } + }, ) // ...rest of initialization code