contentful-management 11.59.0-canary.1 → 11.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/contentful-management.browser.js +1 -1
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +1 -1
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/typings/create-contentful-api.d.ts +1 -0
- package/dist/typings/entities/app-action-call.d.ts +16 -9
- package/dist/typings/plain/common-types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -47,7 +47,7 @@ function createClient(params, opts = {}) {
|
|
|
47
47
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
48
48
|
const userAgent = getUserAgentHeader(
|
|
49
49
|
// @ts-expect-error
|
|
50
|
-
`${sdkMain}/${"11.
|
|
50
|
+
`${sdkMain}/${"11.60.0"}`, params.application, params.integration, params.feature);
|
|
51
51
|
const adapter = createAdapter(_objectSpread(_objectSpread({}, params), {}, {
|
|
52
52
|
userAgent
|
|
53
53
|
}));
|
|
@@ -34,6 +34,7 @@ export default function createClientApi(makeRequest: MakeRequest): {
|
|
|
34
34
|
*/
|
|
35
35
|
getEnvironmentTemplates: (organizationId: string, query?: BasicCursorPaginationOptions & {
|
|
36
36
|
select?: string;
|
|
37
|
+
forTemplatedSpaces?: boolean;
|
|
37
38
|
}) => Promise<CursorPaginatedCollection<EnvironmentTemplate, EnvironmentTemplateProps>>;
|
|
38
39
|
/**
|
|
39
40
|
* Gets the lasted version environment template if params.version is not specified
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Except } from 'type-fest';
|
|
1
|
+
import type { Except, JsonValue } from 'type-fest';
|
|
2
2
|
import type { BasicMetaSysProps, AppActionCallRetryOptions, DefaultElements, MakeRequest, SysLink, CreateWithResponseParams, CreateWithResultParams, GetAppActionCallDetailsParams, GetAppActionCallParamsWithId } from '../common-types';
|
|
3
3
|
import type { WebhookCallDetailsProps } from './webhook';
|
|
4
4
|
type AppActionCallSys = Except<BasicMetaSysProps, 'version'> & {
|
|
@@ -7,7 +7,7 @@ type AppActionCallSys = Except<BasicMetaSysProps, 'version'> & {
|
|
|
7
7
|
environment: SysLink;
|
|
8
8
|
action: SysLink;
|
|
9
9
|
appActionCallResponse?: SysLink;
|
|
10
|
-
};
|
|
10
|
+
} & (AppActionCallSucceeded | AppActionCallProcessing | AppActionCallFailed);
|
|
11
11
|
type RetryOptions = AppActionCallRetryOptions;
|
|
12
12
|
export type AppActionCallStatus = 'processing' | 'succeeded' | 'failed';
|
|
13
13
|
export interface AppActionCallErrorProps {
|
|
@@ -19,16 +19,24 @@ export interface AppActionCallErrorProps {
|
|
|
19
19
|
details?: Record<string, unknown>;
|
|
20
20
|
statusCode?: number;
|
|
21
21
|
}
|
|
22
|
+
export type AppActionCallSucceeded = {
|
|
23
|
+
status: 'succeeded';
|
|
24
|
+
result: JsonValue;
|
|
25
|
+
};
|
|
26
|
+
export type AppActionCallProcessing = {
|
|
27
|
+
status: 'processing';
|
|
28
|
+
};
|
|
29
|
+
export type AppActionCallFailed = {
|
|
30
|
+
status: 'failed';
|
|
31
|
+
error: AppActionCallErrorProps;
|
|
32
|
+
};
|
|
22
33
|
export type AppActionCallProps = {
|
|
23
34
|
/**
|
|
24
35
|
* System metadata
|
|
25
36
|
*/
|
|
26
37
|
sys: AppActionCallSys;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/** Structured result when execution succeeded */
|
|
30
|
-
result?: unknown;
|
|
31
|
-
/** Structured error when execution failed */
|
|
38
|
+
status: AppActionCallStatus;
|
|
39
|
+
result?: JsonValue;
|
|
32
40
|
error?: AppActionCallErrorProps;
|
|
33
41
|
};
|
|
34
42
|
export type CreateAppActionCallProps = {
|
|
@@ -64,8 +72,7 @@ export interface AppActionCallRawResponseProps {
|
|
|
64
72
|
}
|
|
65
73
|
export interface AppActionCallResponseData extends AppActionCallResponse, DefaultElements<AppActionCallResponse>, AppActionCallApi {
|
|
66
74
|
}
|
|
67
|
-
export
|
|
68
|
-
}
|
|
75
|
+
export type AppActionCall = AppActionCallProps & DefaultElements<AppActionCallProps>;
|
|
69
76
|
/**
|
|
70
77
|
* @private
|
|
71
78
|
*/
|
|
@@ -104,6 +104,7 @@ export type PlainClientAPI = {
|
|
|
104
104
|
getMany(params: GetOrganizationParams & {
|
|
105
105
|
query?: BasicCursorPaginationOptions & {
|
|
106
106
|
select?: string;
|
|
107
|
+
forTemplatedSpaces?: boolean;
|
|
107
108
|
};
|
|
108
109
|
}, headers?: RawAxiosRequestHeaders): Promise<CursorPaginatedCollectionProp<EnvironmentTemplateProps>>;
|
|
109
110
|
create(params: GetOrganizationParams, rawData: CreateEnvironmentTemplateProps, headers?: RawAxiosRequestHeaders): Promise<EnvironmentTemplateProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentful-management",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.60.0",
|
|
4
4
|
"description": "Client for Contentful's Content Management API",
|
|
5
5
|
"homepage": "https://www.contentful.com/developers/documentation/content-management-api/",
|
|
6
6
|
"main": "./dist/contentful-management.node.js",
|