contentful-management 11.55.0-canary.3 → 11.55.0-canary.4
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/dist/contentful-management.browser.js +6 -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 +6 -1
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/entry.js +4 -0
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/typings/common-types.d.ts +12 -8
- package/dist/typings/plain/common-types.d.ts +4 -9
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
6
6
|
import copy from 'fast-copy';
|
|
7
7
|
import * as raw from './raw';
|
|
8
8
|
import { normalizeSelect } from './utils';
|
|
9
|
+
import * as releaseEntry from './release-entry';
|
|
9
10
|
export const get = (http, params, rawData, headers) => {
|
|
10
11
|
if (params.releaseId) {
|
|
11
12
|
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
@@ -35,6 +36,9 @@ export const getMany = (http, params, rawData, headers) => {
|
|
|
35
36
|
});
|
|
36
37
|
};
|
|
37
38
|
export const patch = (http, params, data, headers) => {
|
|
39
|
+
if (params.releaseId) {
|
|
40
|
+
return releaseEntry.patch(http, params, data, headers !== null && headers !== void 0 ? headers : {});
|
|
41
|
+
}
|
|
38
42
|
return raw.patch(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}`, data, {
|
|
39
43
|
headers: _objectSpread({
|
|
40
44
|
'X-Contentful-Version': params.version,
|
|
@@ -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.55.0-canary.
|
|
50
|
+
`${sdkMain}/${"11.55.0-canary.4"}`, params.application, params.integration, params.feature);
|
|
51
51
|
const adapter = createAdapter(_objectSpread(_objectSpread({}, params), {}, {
|
|
52
52
|
userAgent
|
|
53
53
|
}));
|
|
@@ -1493,20 +1493,15 @@ export type MRActions = {
|
|
|
1493
1493
|
return: CollectionProp<EntryProps<any>>;
|
|
1494
1494
|
};
|
|
1495
1495
|
getMany: {
|
|
1496
|
-
params:
|
|
1497
|
-
releaseId?: string;
|
|
1498
|
-
};
|
|
1496
|
+
params: GetManyEntryParams & QueryParams;
|
|
1499
1497
|
return: CollectionProp<EntryProps<any, any>>;
|
|
1500
1498
|
};
|
|
1501
1499
|
get: {
|
|
1502
|
-
params:
|
|
1500
|
+
params: GetEntryParams & QueryParams;
|
|
1503
1501
|
return: EntryProps<any, any>;
|
|
1504
1502
|
};
|
|
1505
1503
|
patch: {
|
|
1506
|
-
params:
|
|
1507
|
-
entryId: string;
|
|
1508
|
-
version: number;
|
|
1509
|
-
};
|
|
1504
|
+
params: PatchEntryParams & QueryParams;
|
|
1510
1505
|
payload: OpPatch[];
|
|
1511
1506
|
headers?: RawAxiosRequestHeaders;
|
|
1512
1507
|
return: EntryProps<any>;
|
|
@@ -2592,6 +2587,15 @@ export type GetEditorInterfaceParams = GetSpaceEnvironmentParams & {
|
|
|
2592
2587
|
};
|
|
2593
2588
|
export type GetEntryParams = GetSpaceEnvironmentParams & {
|
|
2594
2589
|
entryId: string;
|
|
2590
|
+
releaseId?: string;
|
|
2591
|
+
};
|
|
2592
|
+
export type GetManyEntryParams = GetSpaceEnvironmentParams & {
|
|
2593
|
+
releaseId?: string;
|
|
2594
|
+
};
|
|
2595
|
+
export type PatchEntryParams = GetSpaceEnvironmentParams & {
|
|
2596
|
+
entryId: string;
|
|
2597
|
+
version: number;
|
|
2598
|
+
releaseId?: string;
|
|
2595
2599
|
};
|
|
2596
2600
|
export type GetExtensionParams = GetSpaceEnvironmentParams & {
|
|
2597
2601
|
extensionId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RawAxiosRequestConfig, RawAxiosRequestHeaders } from 'axios';
|
|
2
2
|
import type { OpPatch } from 'json-patch';
|
|
3
|
-
import type { BasicCursorPaginationOptions, CollectionProp, CreateWithIdReleaseEntryParams, CursorPaginatedCollectionProp, EnvironmentTemplateParams, GetBulkActionParams, GetContentTypeParams, GetEnvironmentTemplateParams, GetManyReleaseEntryParams, GetOrganizationMembershipParams, GetOrganizationParams, GetReleaseEntryParams, GetReleaseParams, GetSnapshotForContentTypeParams, GetSnapshotForEntryParams, GetSpaceEnvironmentParams, GetSpaceParams, KeyValueMap, PatchReleaseEntryParams, QueryParams, ReleaseEnvironmentParams, UpdateReleaseEntryParams } from '../common-types';
|
|
3
|
+
import type { BasicCursorPaginationOptions, CollectionProp, CreateWithIdReleaseEntryParams, CursorPaginatedCollectionProp, EnvironmentTemplateParams, GetBulkActionParams, GetContentTypeParams, GetEntryParams, GetEnvironmentTemplateParams, GetManyEntryParams, GetManyReleaseEntryParams, GetOrganizationMembershipParams, GetOrganizationParams, GetReleaseEntryParams, GetReleaseParams, GetSnapshotForContentTypeParams, GetSnapshotForEntryParams, GetSpaceEnvironmentParams, GetSpaceParams, KeyValueMap, PatchEntryParams, PatchReleaseEntryParams, QueryParams, ReleaseEnvironmentParams, UpdateReleaseEntryParams } from '../common-types';
|
|
4
4
|
import type { AccessTokenProps, CreatePersonalAccessTokenProps as CreatePATProps } from '../entities/access-token';
|
|
5
5
|
import type { ApiKeyProps, CreateApiKeyProps } from '../entities/api-key';
|
|
6
6
|
import type { AssetFileProp, AssetProcessingForLocale, AssetProps, CreateAssetProps } from '../entities/asset';
|
|
@@ -162,9 +162,7 @@ export type PlainClientAPI = {
|
|
|
162
162
|
user: UserPlainClientAPI;
|
|
163
163
|
entry: {
|
|
164
164
|
getPublished<T extends KeyValueMap = KeyValueMap>(params: OptionalDefaults<GetSpaceEnvironmentParams & QueryParams>, rawData?: unknown, headers?: RawAxiosRequestHeaders): Promise<CollectionProp<EntryProps<T>>>;
|
|
165
|
-
getMany<T extends KeyValueMap = KeyValueMap>(params: OptionalDefaults<
|
|
166
|
-
releaseId?: string;
|
|
167
|
-
}>, rawData?: unknown, headers?: RawAxiosRequestHeaders): Promise<CollectionProp<EntryProps<T, {
|
|
165
|
+
getMany<T extends KeyValueMap = KeyValueMap>(params: OptionalDefaults<GetManyEntryParams & QueryParams>, rawData?: unknown, headers?: RawAxiosRequestHeaders): Promise<CollectionProp<EntryProps<T, {
|
|
168
166
|
release: {
|
|
169
167
|
sys: {
|
|
170
168
|
type: 'Link';
|
|
@@ -173,7 +171,7 @@ export type PlainClientAPI = {
|
|
|
173
171
|
};
|
|
174
172
|
};
|
|
175
173
|
}>>>;
|
|
176
|
-
get<T extends KeyValueMap = KeyValueMap>(params: OptionalDefaults<
|
|
174
|
+
get<T extends KeyValueMap = KeyValueMap>(params: OptionalDefaults<GetEntryParams & QueryParams>, rawData?: unknown, headers?: RawAxiosRequestHeaders): Promise<EntryProps<T, {
|
|
177
175
|
release: {
|
|
178
176
|
sys: {
|
|
179
177
|
type: 'Link';
|
|
@@ -185,10 +183,7 @@ export type PlainClientAPI = {
|
|
|
185
183
|
update<T extends KeyValueMap = KeyValueMap>(params: OptionalDefaults<GetSpaceEnvironmentParams & {
|
|
186
184
|
entryId: string;
|
|
187
185
|
}>, rawData: EntryProps<T>, headers?: RawAxiosRequestHeaders): Promise<EntryProps<T>>;
|
|
188
|
-
patch<T extends KeyValueMap = KeyValueMap>(params: OptionalDefaults<
|
|
189
|
-
entryId: string;
|
|
190
|
-
version?: number;
|
|
191
|
-
}>, rawData: OpPatch[], headers?: RawAxiosRequestHeaders): Promise<EntryProps<T>>;
|
|
186
|
+
patch<T extends KeyValueMap = KeyValueMap>(params: OptionalDefaults<PatchEntryParams & QueryParams>, rawData: OpPatch[], headers?: RawAxiosRequestHeaders): Promise<EntryProps<T>>;
|
|
192
187
|
delete(params: OptionalDefaults<GetSpaceEnvironmentParams & {
|
|
193
188
|
entryId: string;
|
|
194
189
|
}>): Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentful-management",
|
|
3
|
-
"version": "11.55.0-canary.
|
|
3
|
+
"version": "11.55.0-canary.4",
|
|
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",
|