contentful-management 11.61.1 → 11.62.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/dist/contentful-management.browser.js +9 -6
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +11 -8
- 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/environment-template-installation.js +2 -2
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-environment-template-api.js +6 -3
- package/dist/typings/common-types.d.ts +1 -0
- package/dist/typings/create-environment-template-api.d.ts +3 -1
- package/dist/typings/plain/common-types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -16,9 +16,9 @@ export const getMany = (http, _ref, headers) => {
|
|
|
16
16
|
spaceId,
|
|
17
17
|
environmentId
|
|
18
18
|
} = _ref,
|
|
19
|
-
|
|
19
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
20
20
|
return raw.get(http, apiPath(organizationId, environmentTemplateId, 'template_installations'), {
|
|
21
|
-
params: _objectSpread(_objectSpread(_objectSpread({},
|
|
21
|
+
params: _objectSpread(_objectSpread(_objectSpread({}, otherProps), environmentId && {
|
|
22
22
|
'environment.sys.id': environmentId
|
|
23
23
|
}), spaceId && {
|
|
24
24
|
'space.sys.id': spaceId
|
|
@@ -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.62.0"}`, params.application, params.integration, params.feature);
|
|
51
51
|
const adapter = createAdapter(_objectSpread(_objectSpread({}, params), {}, {
|
|
52
52
|
userAgent
|
|
53
53
|
}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["spaceId", "environmentId"];
|
|
1
|
+
const _excluded = ["spaceId", "environmentId", "latestOnly"];
|
|
2
2
|
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; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -149,6 +149,7 @@ export function createEnvironmentTemplateApi(makeRequest, organizationId) {
|
|
|
149
149
|
* Gets a collection of all installations for the environment template
|
|
150
150
|
* @param [installationParams.spaceId] - Space ID to filter installations by space and environment
|
|
151
151
|
* @param [installationParams.environmentId] - Environment ID to filter installations by space and environment
|
|
152
|
+
* @param [installationParams.latestOnly] - Boolean flag to only return the latest installation per environment
|
|
152
153
|
* @return Promise for a collection of EnvironmentTemplateInstallations
|
|
153
154
|
* ```javascript
|
|
154
155
|
* const contentful = require('contentful-management')
|
|
@@ -168,7 +169,8 @@ export function createEnvironmentTemplateApi(makeRequest, organizationId) {
|
|
|
168
169
|
getInstallations: function getEnvironmentTemplateInstallations(_ref = {}) {
|
|
169
170
|
let {
|
|
170
171
|
spaceId,
|
|
171
|
-
environmentId
|
|
172
|
+
environmentId,
|
|
173
|
+
latestOnly
|
|
172
174
|
} = _ref,
|
|
173
175
|
query = _objectWithoutProperties(_ref, _excluded);
|
|
174
176
|
const raw = this.toPlainObject();
|
|
@@ -182,7 +184,8 @@ export function createEnvironmentTemplateApi(makeRequest, organizationId) {
|
|
|
182
184
|
query
|
|
183
185
|
}).params),
|
|
184
186
|
spaceId,
|
|
185
|
-
environmentId
|
|
187
|
+
environmentId,
|
|
188
|
+
latestOnly
|
|
186
189
|
}
|
|
187
190
|
}).then(data => wrapEnvironmentTemplateInstallationCollection(makeRequest, data));
|
|
188
191
|
},
|
|
@@ -89,6 +89,7 @@ export declare function createEnvironmentTemplateApi(makeRequest: MakeRequest, o
|
|
|
89
89
|
* Gets a collection of all installations for the environment template
|
|
90
90
|
* @param [installationParams.spaceId] - Space ID to filter installations by space and environment
|
|
91
91
|
* @param [installationParams.environmentId] - Environment ID to filter installations by space and environment
|
|
92
|
+
* @param [installationParams.latestOnly] - Boolean flag to only return the latest installation per environment
|
|
92
93
|
* @return Promise for a collection of EnvironmentTemplateInstallations
|
|
93
94
|
* ```javascript
|
|
94
95
|
* const contentful = require('contentful-management')
|
|
@@ -105,9 +106,10 @@ export declare function createEnvironmentTemplateApi(makeRequest: MakeRequest, o
|
|
|
105
106
|
* .catch(console.error)
|
|
106
107
|
* ```
|
|
107
108
|
*/
|
|
108
|
-
getInstallations: ({ spaceId, environmentId, ...query }?: {
|
|
109
|
+
getInstallations: ({ spaceId, environmentId, latestOnly, ...query }?: {
|
|
109
110
|
spaceId?: string;
|
|
110
111
|
environmentId?: string;
|
|
112
|
+
latestOnly?: boolean;
|
|
111
113
|
} & BasicCursorPaginationOptions) => Promise<import("./common-types").CursorPaginatedCollection<import("./entities/environment-template-installation").EnvironmentTemplateInstallation, import("./entities/environment-template-installation").EnvironmentTemplateInstallationProps>>;
|
|
112
114
|
/**
|
|
113
115
|
* Validates an environment template against a given space and environment
|
|
@@ -134,6 +134,7 @@ export type PlainClientAPI = {
|
|
|
134
134
|
environmentTemplateId: string;
|
|
135
135
|
organizationId: string;
|
|
136
136
|
spaceId?: string;
|
|
137
|
+
latestOnly?: boolean;
|
|
137
138
|
}, headers?: RawAxiosRequestHeaders): Promise<CursorPaginatedCollectionProp<EnvironmentTemplateInstallationProps>>;
|
|
138
139
|
getForEnvironment(params: BasicCursorPaginationOptions & EnvironmentTemplateParams & {
|
|
139
140
|
installationId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentful-management",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.62.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",
|