contentful-management
Advanced tools
Comparing version 11.20.1 to 11.21.0
@@ -12,2 +12,3 @@ import * as ApiKey from './api-key'; | ||
import * as AppKey from './app-key'; | ||
import * as AppAccessToken from './app-access-token'; | ||
import * as AppUpload from './app-upload'; | ||
@@ -68,2 +69,3 @@ import * as Asset from './asset'; | ||
AppKey, | ||
AppAccessToken, | ||
AppDetails, | ||
@@ -70,0 +72,0 @@ Asset, |
@@ -48,3 +48,3 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | ||
// @ts-expect-error | ||
`${sdkMain}/${"11.20.1"}`, params.application, params.integration, params.feature); | ||
`${sdkMain}/${"11.21.0"}`, params.application, params.integration, params.feature); | ||
const adapter = createAdapter(_objectSpread(_objectSpread({}, params), {}, { | ||
@@ -51,0 +51,0 @@ userAgent |
@@ -12,2 +12,3 @@ import * as apiKey from './api-key'; | ||
import * as appKey from './app-key'; | ||
import * as appAccessToken from './app-access-token'; | ||
import * as appUpload from './app-upload'; | ||
@@ -67,2 +68,3 @@ import * as asset from './asset'; | ||
appKey, | ||
appAccessToken, | ||
asset, | ||
@@ -69,0 +71,0 @@ assetKey, |
@@ -114,2 +114,5 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | ||
}, | ||
appAccessToken: { | ||
create: wrap(wrapParams, 'AppAccessToken', 'create') | ||
}, | ||
function: { | ||
@@ -116,0 +119,0 @@ getMany: wrap(wrapParams, 'Function', 'getMany') |
@@ -12,2 +12,3 @@ import * as ApiKey from './api-key'; | ||
import * as AppKey from './app-key'; | ||
import * as AppAccessToken from './app-access-token'; | ||
import * as AppUpload from './app-upload'; | ||
@@ -68,2 +69,3 @@ import * as Asset from './asset'; | ||
AppKey: typeof AppKey; | ||
AppAccessToken: typeof AppAccessToken; | ||
AppDetails: typeof AppDetails; | ||
@@ -70,0 +72,0 @@ Asset: typeof Asset; |
@@ -17,2 +17,3 @@ import { Stream } from 'stream'; | ||
import { TagVisibility } from './entities/tag'; | ||
import { CreateAppAccessTokenProps } from './entities/app-access-token'; | ||
/** | ||
@@ -1099,2 +1100,29 @@ * @private | ||
/** | ||
* Creates an app access token | ||
* @param appDefinitionId - AppDefinition ID | ||
* @param data - Json Web Token | ||
* @return Promise for an app access token | ||
* @example ```javascript | ||
* const contentful = require('contentful-management') | ||
* const { sign } = require('jsonwebtoken') | ||
* | ||
* const signOptions = { algorithm: 'RS256', issuer: '<app_definition_id>', expiresIn: '10m' } | ||
* | ||
* const client = contentful.createClient({ | ||
* accessToken: '<content_management_api_key>' | ||
* }) | ||
* | ||
* const data = { | ||
* jwt: sign({}, '<private_key>', signOptions) | ||
* } | ||
* | ||
* client.getSpace('<space_id>') | ||
* .then((space) => space.getEnvironment('<environment-id>')) | ||
* .then((environment) => environment.createAppAccessToken('<app_definition_id>', data) | ||
* .then((appAccessToken) => console.log(appAccessToken)) | ||
* .catch(console.error) | ||
* ``` | ||
*/ | ||
createAppAccessToken(appDefinitionId: string, data: CreateAppAccessTokenProps): Promise<import("./entities/app-access-token").AppAccessToken>; | ||
/** | ||
* Gets all snapshots of an entry | ||
@@ -1101,0 +1129,0 @@ * @func getEntrySnapshots |
@@ -12,2 +12,3 @@ import * as apiKey from './api-key'; | ||
import * as appKey from './app-key'; | ||
import * as appAccessToken from './app-access-token'; | ||
import * as appUpload from './app-upload'; | ||
@@ -67,2 +68,3 @@ import * as asset from './asset'; | ||
appKey: typeof appKey; | ||
appAccessToken: typeof appAccessToken; | ||
asset: typeof asset; | ||
@@ -69,0 +71,0 @@ assetKey: typeof assetKey; |
@@ -14,2 +14,3 @@ export * from './common-types'; | ||
export type { AppKey, AppKeyProps, CreateAppKeyProps } from './entities/app-key'; | ||
export type { AppAccessToken, AppAccessTokenProps, CreateAppAccessTokenProps, } from './entities/app-access-token'; | ||
export type { AppUpload, AppUploadProps } from './entities/app-upload'; | ||
@@ -16,0 +17,0 @@ export type { Asset, AssetFileProp, AssetProps, CreateAssetProps } from './entities/asset'; |
@@ -59,2 +59,3 @@ import { RawAxiosRequestHeaders, RawAxiosRequestConfig } from 'axios'; | ||
import { TeamMembershipPlainClientAPI } from './entities/team-membership'; | ||
import { AppAccessTokenPlainClientAPI } from './entities/app-access-token'; | ||
export type PlainClientAPI = { | ||
@@ -78,2 +79,3 @@ raw: { | ||
appSigningSecret: AppSigningSecretPlainClientAPI; | ||
appAccessToken: AppAccessTokenPlainClientAPI; | ||
function: { | ||
@@ -80,0 +82,0 @@ getMany(params: OptionalDefaults<GetAppDefinitionParams & QueryParams>): Promise<CollectionProp<FunctionProps>>; |
{ | ||
"name": "contentful-management", | ||
"version": "11.20.1", | ||
"version": "11.21.0", | ||
"description": "Client for Contentful's Content Management API", | ||
@@ -117,2 +117,3 @@ "homepage": "https://www.contentful.com/developers/documentation/content-management-api/", | ||
"json": "^11.0.0", | ||
"jsonwebtoken": "^9.0.2", | ||
"karma": "^6.3.4", | ||
@@ -119,0 +120,0 @@ "karma-chrome-launcher": "^3.1.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7533083
386
79518
70