contentful-management 12.6.0-dev.2 → 12.6.0-dev.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/browser/index.js +2257 -1316
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.min.js +1 -1
- package/dist/browser/index.min.js.map +1 -1
- package/dist/cjs/index.cjs +145 -72
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/asset.mjs +12 -1
- package/dist/esm/adapters/REST/endpoints/asset.mjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/comment.mjs +10 -2
- package/dist/esm/adapters/REST/endpoints/comment.mjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/content-type.mjs +9 -1
- package/dist/esm/adapters/REST/endpoints/content-type.mjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/entry.mjs +12 -1
- package/dist/esm/adapters/REST/endpoints/entry.mjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/fragment.mjs +2 -2
- package/dist/esm/adapters/REST/endpoints/task.mjs +28 -1
- package/dist/esm/adapters/REST/endpoints/task.mjs.map +1 -1
- package/dist/esm/common-types.mjs.map +1 -1
- package/dist/esm/entities/ai-action-invocation.mjs.map +1 -1
- package/dist/esm/entities/ai-action.mjs.map +1 -1
- package/dist/esm/entities/comment.mjs +10 -6
- package/dist/esm/entities/comment.mjs.map +1 -1
- package/dist/esm/entities/task.mjs +10 -6
- package/dist/esm/entities/task.mjs.map +1 -1
- package/dist/esm/plain/plain-client.mjs +1 -1
- package/dist/types/adapters/REST/endpoints/asset.d.ts +1 -0
- package/dist/types/adapters/REST/endpoints/asset.js +12 -1
- package/dist/types/adapters/REST/endpoints/asset.js.map +1 -1
- package/dist/types/adapters/REST/endpoints/comment.js +10 -2
- package/dist/types/adapters/REST/endpoints/comment.js.map +1 -1
- package/dist/types/adapters/REST/endpoints/content-type.d.ts +1 -0
- package/dist/types/adapters/REST/endpoints/content-type.js +9 -1
- package/dist/types/adapters/REST/endpoints/content-type.js.map +1 -1
- package/dist/types/adapters/REST/endpoints/entry.d.ts +1 -0
- package/dist/types/adapters/REST/endpoints/entry.js +12 -1
- package/dist/types/adapters/REST/endpoints/entry.js.map +1 -1
- package/dist/types/adapters/REST/endpoints/fragment.d.ts +1 -1
- package/dist/types/adapters/REST/endpoints/fragment.js +2 -2
- package/dist/types/adapters/REST/endpoints/task.js +28 -1
- package/dist/types/adapters/REST/endpoints/task.js.map +1 -1
- package/dist/types/common-types.d.ts +25 -8
- package/dist/types/common-types.js.map +1 -1
- package/dist/types/constants/editor-interface-defaults/controls-defaults.d.ts +1 -1
- package/dist/types/entities/ai-action-invocation.d.ts +37 -18
- package/dist/types/entities/ai-action-invocation.js.map +1 -1
- package/dist/types/entities/ai-action.d.ts +4 -1
- package/dist/types/entities/ai-action.js.map +1 -1
- package/dist/types/entities/comment.d.ts +4 -6
- package/dist/types/entities/comment.js +10 -6
- package/dist/types/entities/comment.js.map +1 -1
- package/dist/types/entities/component-type.d.ts +2 -5
- package/dist/types/entities/data-assembly.d.ts +15 -13
- package/dist/types/entities/experience.d.ts +0 -6
- package/dist/types/entities/fragment.d.ts +3 -4
- package/dist/types/entities/task.d.ts +5 -3
- package/dist/types/entities/task.js +10 -6
- package/dist/types/entities/task.js.map +1 -1
- package/dist/types/entities/template.d.ts +1 -2
- package/dist/types/export-types.d.ts +7 -7
- package/dist/types/plain/entities/component-type.d.ts +0 -1
- package/dist/types/plain/entities/experience.d.ts +0 -1
- package/dist/types/plain/entities/fragment.d.ts +6 -7
- package/dist/types/plain/entities/task.d.ts +77 -8
- package/dist/types/plain/entities/template.d.ts +0 -1
- package/dist/types/plain/plain-client.js +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -74,7 +74,7 @@ const getMany$V = (http, params, headers) => {
|
|
|
74
74
|
const create$K = (http, params, data, headers) => {
|
|
75
75
|
return post$1(http, `/spaces/${params.spaceId}/ai/actions`, data, { headers });
|
|
76
76
|
};
|
|
77
|
-
const update$
|
|
77
|
+
const update$A = (http, params, rawData, headers) => {
|
|
78
78
|
const data = copy__default.default(rawData);
|
|
79
79
|
const { sys, ...payload } = data;
|
|
80
80
|
return put$1(http, `/spaces/${params.spaceId}/ai/actions/${params.aiActionId}`, payload, {
|
|
@@ -113,7 +113,7 @@ var AiAction = /*#__PURE__*/Object.freeze({
|
|
|
113
113
|
invoke: invoke,
|
|
114
114
|
publish: publish$a,
|
|
115
115
|
unpublish: unpublish$a,
|
|
116
|
-
update: update$
|
|
116
|
+
update: update$A
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
const get$17 = (http, params, headers) => {
|
|
@@ -347,7 +347,7 @@ const create$J = (http, params, rawData, headers) => {
|
|
|
347
347
|
headers,
|
|
348
348
|
});
|
|
349
349
|
};
|
|
350
|
-
const update$
|
|
350
|
+
const update$z = (http, params, rawData, headers) => {
|
|
351
351
|
const data = copy__default.default(rawData);
|
|
352
352
|
delete data.sys;
|
|
353
353
|
return put$1(http, getAutomationDefinitionUrl(params), data, {
|
|
@@ -369,7 +369,7 @@ var AutomationDefinition = /*#__PURE__*/Object.freeze({
|
|
|
369
369
|
del: del$K,
|
|
370
370
|
get: get$13,
|
|
371
371
|
getMany: getMany$R,
|
|
372
|
-
update: update$
|
|
372
|
+
update: update$z
|
|
373
373
|
});
|
|
374
374
|
|
|
375
375
|
const getBaseUrl$v = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/automation_executions`;
|
|
@@ -410,7 +410,7 @@ const createWithId$e = (http, params, data, headers) => {
|
|
|
410
410
|
headers,
|
|
411
411
|
});
|
|
412
412
|
};
|
|
413
|
-
const update$
|
|
413
|
+
const update$y = (http, params, rawData, headers) => {
|
|
414
414
|
const data = copy__default.default(rawData);
|
|
415
415
|
if ('accessToken' in data) {
|
|
416
416
|
delete data.accessToken;
|
|
@@ -440,7 +440,7 @@ var ApiKey = /*#__PURE__*/Object.freeze({
|
|
|
440
440
|
del: del$J,
|
|
441
441
|
get: get$11,
|
|
442
442
|
getMany: getMany$P,
|
|
443
|
-
update: update$
|
|
443
|
+
update: update$y
|
|
444
444
|
});
|
|
445
445
|
|
|
446
446
|
const create$H = (http, params, data) => {
|
|
@@ -499,7 +499,7 @@ const del$I = (http, params) => {
|
|
|
499
499
|
const create$G = (http, params, data) => {
|
|
500
500
|
return post$1(http, getBaseUrl$u(params), data);
|
|
501
501
|
};
|
|
502
|
-
const update$
|
|
502
|
+
const update$x = (http, params, data) => {
|
|
503
503
|
return put$1(http, getAppActionUrl(params), data);
|
|
504
504
|
};
|
|
505
505
|
|
|
@@ -510,7 +510,7 @@ var AppAction = /*#__PURE__*/Object.freeze({
|
|
|
510
510
|
get: get$10,
|
|
511
511
|
getMany: getMany$O,
|
|
512
512
|
getManyForEnvironment: getManyForEnvironment$2,
|
|
513
|
-
update: update$
|
|
513
|
+
update: update$x
|
|
514
514
|
});
|
|
515
515
|
|
|
516
516
|
/**
|
|
@@ -748,7 +748,7 @@ const create$D = (http, params, rawData) => {
|
|
|
748
748
|
const data = copy__default.default(rawData);
|
|
749
749
|
return post$1(http, getBaseUrl$s(params), data);
|
|
750
750
|
};
|
|
751
|
-
const update$
|
|
751
|
+
const update$w = (http, params, rawData, headers) => {
|
|
752
752
|
const data = copy__default.default(rawData);
|
|
753
753
|
delete data.sys;
|
|
754
754
|
return put$1(http, getAppDefinitionUrl(params), data, {
|
|
@@ -778,13 +778,13 @@ var AppDefinition = /*#__PURE__*/Object.freeze({
|
|
|
778
778
|
getAppDefinitionUrl: getAppDefinitionUrl,
|
|
779
779
|
getInstallationsForOrg: getInstallationsForOrg,
|
|
780
780
|
getMany: getMany$M,
|
|
781
|
-
update: update$
|
|
781
|
+
update: update$w
|
|
782
782
|
});
|
|
783
783
|
|
|
784
784
|
const get$Y = (http, params) => {
|
|
785
785
|
return get$19(http, `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/details`);
|
|
786
786
|
};
|
|
787
|
-
const upsert$
|
|
787
|
+
const upsert$9 = (http, params, data) => {
|
|
788
788
|
return put$1(http, `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/details`, data);
|
|
789
789
|
};
|
|
790
790
|
const del$F = (http, params) => {
|
|
@@ -795,13 +795,13 @@ var AppDetails = /*#__PURE__*/Object.freeze({
|
|
|
795
795
|
__proto__: null,
|
|
796
796
|
del: del$F,
|
|
797
797
|
get: get$Y,
|
|
798
|
-
upsert: upsert$
|
|
798
|
+
upsert: upsert$9
|
|
799
799
|
});
|
|
800
800
|
|
|
801
801
|
const get$X = (http, params) => {
|
|
802
802
|
return get$19(http, `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/event_subscription`);
|
|
803
803
|
};
|
|
804
|
-
const upsert$
|
|
804
|
+
const upsert$8 = (http, params, data) => {
|
|
805
805
|
return put$1(http, `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/event_subscription`, data);
|
|
806
806
|
};
|
|
807
807
|
const del$E = (http, params) => {
|
|
@@ -812,7 +812,7 @@ var AppEventSubscription = /*#__PURE__*/Object.freeze({
|
|
|
812
812
|
__proto__: null,
|
|
813
813
|
del: del$E,
|
|
814
814
|
get: get$X,
|
|
815
|
-
upsert: upsert$
|
|
815
|
+
upsert: upsert$8
|
|
816
816
|
});
|
|
817
817
|
|
|
818
818
|
const getBaseUrl$r = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/app_installations`;
|
|
@@ -828,7 +828,7 @@ const getMany$L = (http, params) => {
|
|
|
828
828
|
params: normalizeSelect(params.query),
|
|
829
829
|
});
|
|
830
830
|
};
|
|
831
|
-
const upsert$
|
|
831
|
+
const upsert$7 = (http, params, rawData, headers) => {
|
|
832
832
|
const data = copy__default.default(rawData);
|
|
833
833
|
return put$1(http, getAppInstallationUrl(params), data, {
|
|
834
834
|
headers: {
|
|
@@ -858,7 +858,7 @@ var AppInstallation = /*#__PURE__*/Object.freeze({
|
|
|
858
858
|
getAppInstallationUrl: getAppInstallationUrl,
|
|
859
859
|
getForOrganization: getForOrganization$3,
|
|
860
860
|
getMany: getMany$L,
|
|
861
|
-
upsert: upsert$
|
|
861
|
+
upsert: upsert$7
|
|
862
862
|
});
|
|
863
863
|
|
|
864
864
|
const get$V = (http, params) => {
|
|
@@ -894,7 +894,7 @@ var AppSignedRequest = /*#__PURE__*/Object.freeze({
|
|
|
894
894
|
const get$U = (http, params) => {
|
|
895
895
|
return get$19(http, `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/signing_secret`);
|
|
896
896
|
};
|
|
897
|
-
const upsert$
|
|
897
|
+
const upsert$6 = (http, params, data) => {
|
|
898
898
|
return put$1(http, `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/signing_secret`, data);
|
|
899
899
|
};
|
|
900
900
|
const del$B = (http, params) => {
|
|
@@ -905,7 +905,7 @@ var AppSigningSecret = /*#__PURE__*/Object.freeze({
|
|
|
905
905
|
__proto__: null,
|
|
906
906
|
del: del$B,
|
|
907
907
|
get: get$U,
|
|
908
|
-
upsert: upsert$
|
|
908
|
+
upsert: upsert$6
|
|
909
909
|
});
|
|
910
910
|
|
|
911
911
|
/**
|
|
@@ -1001,7 +1001,7 @@ const getMany$J = (http, params, rawData, headers) => {
|
|
|
1001
1001
|
headers: headers ? { ...headers } : undefined,
|
|
1002
1002
|
});
|
|
1003
1003
|
};
|
|
1004
|
-
const update$
|
|
1004
|
+
const update$v = (http, params, rawData, headers) => {
|
|
1005
1005
|
const data = copy__default.default(rawData);
|
|
1006
1006
|
delete data.sys;
|
|
1007
1007
|
return put$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/assets/${params.assetId}`, data, {
|
|
@@ -1132,7 +1132,7 @@ var ReleaseAsset = /*#__PURE__*/Object.freeze({
|
|
|
1132
1132
|
getMany: getMany$J,
|
|
1133
1133
|
processForAllLocales: processForAllLocales$1,
|
|
1134
1134
|
processForLocale: processForLocale$1,
|
|
1135
|
-
update: update$
|
|
1135
|
+
update: update$v
|
|
1136
1136
|
});
|
|
1137
1137
|
|
|
1138
1138
|
const get$Q = (http, params, rawData, headers) => {
|
|
@@ -1159,9 +1159,19 @@ const getMany$I = (http, params, rawData, headers) => {
|
|
|
1159
1159
|
headers: headers ? { ...headers } : undefined,
|
|
1160
1160
|
});
|
|
1161
1161
|
};
|
|
1162
|
-
const
|
|
1162
|
+
const getManyWithCursor$2 = (http, params, rawData, headers) => {
|
|
1163
|
+
if (params.releaseId) {
|
|
1164
|
+
throw new Error('getManyWithCursor is not supported for release-scoped assets');
|
|
1165
|
+
}
|
|
1166
|
+
return get$19(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/assets`, {
|
|
1167
|
+
params: { cursor: true, ...(params.query ?? {}) },
|
|
1168
|
+
headers: headers ? { ...headers } : undefined,
|
|
1169
|
+
})
|
|
1170
|
+
.then(normalizeCursorPaginationResponse);
|
|
1171
|
+
};
|
|
1172
|
+
const update$u = (http, params, rawData, headers) => {
|
|
1163
1173
|
if (params.releaseId) {
|
|
1164
|
-
return update$
|
|
1174
|
+
return update$v(http, params, rawData, headers ?? {});
|
|
1165
1175
|
}
|
|
1166
1176
|
const data = copy__default.default(rawData);
|
|
1167
1177
|
delete data.sys;
|
|
@@ -1342,13 +1352,14 @@ var Asset = /*#__PURE__*/Object.freeze({
|
|
|
1342
1352
|
del: del$y,
|
|
1343
1353
|
get: get$Q,
|
|
1344
1354
|
getMany: getMany$I,
|
|
1355
|
+
getManyWithCursor: getManyWithCursor$2,
|
|
1345
1356
|
getPublished: getPublished$2,
|
|
1346
1357
|
processForAllLocales: processForAllLocales,
|
|
1347
1358
|
processForLocale: processForLocale,
|
|
1348
1359
|
publish: publish$9,
|
|
1349
1360
|
unarchive: unarchive$3,
|
|
1350
1361
|
unpublish: unpublish$9,
|
|
1351
|
-
update: update$
|
|
1362
|
+
update: update$u
|
|
1352
1363
|
});
|
|
1353
1364
|
|
|
1354
1365
|
const ASSET_KEY_MAX_LIFETIME = 48 * 60 * 60;
|
|
@@ -1438,9 +1449,9 @@ const VERSION_HEADER = 'X-Contentful-Version';
|
|
|
1438
1449
|
const BODY_FORMAT_HEADER = 'x-contentful-comment-body-format';
|
|
1439
1450
|
const PARENT_ENTITY_REFERENCE_HEADER = 'x-contentful-parent-entity-reference';
|
|
1440
1451
|
const PARENT_COMMENT_ID_HEADER = 'x-contentful-parent-id';
|
|
1441
|
-
const getSpaceEnvBaseUrl = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}`;
|
|
1452
|
+
const getSpaceEnvBaseUrl$1 = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}`;
|
|
1442
1453
|
const getEntityCommentUrl = (params) => `${getEntityBaseUrl(params)}/${params.commentId}`;
|
|
1443
|
-
function getParentPlural(parentEntityType) {
|
|
1454
|
+
function getParentPlural$1(parentEntityType) {
|
|
1444
1455
|
switch (parentEntityType) {
|
|
1445
1456
|
case 'ContentType':
|
|
1446
1457
|
return 'content_types';
|
|
@@ -1448,11 +1459,19 @@ function getParentPlural(parentEntityType) {
|
|
|
1448
1459
|
return 'entries';
|
|
1449
1460
|
case 'Workflow':
|
|
1450
1461
|
return 'workflows';
|
|
1462
|
+
case 'Experience':
|
|
1463
|
+
return 'experiences';
|
|
1464
|
+
case 'Fragment':
|
|
1465
|
+
return 'fragments';
|
|
1466
|
+
case 'ComponentType':
|
|
1467
|
+
return 'component_types';
|
|
1468
|
+
case 'Template':
|
|
1469
|
+
return 'templates';
|
|
1451
1470
|
}
|
|
1452
1471
|
}
|
|
1453
1472
|
/**
|
|
1454
|
-
* Comments can be added to a content type, an entry,
|
|
1455
|
-
* to be set as part of the URL path. Workflow comments only support `create` (with
|
|
1473
|
+
* Comments can be added to a content type, an entry, a workflow, or ExO entities. Workflow comments requires a version
|
|
1474
|
+
* to be set as part of the URL path for versioned operations. Workflow comments only support `create` (with
|
|
1456
1475
|
* versionized URL) and `getMany` (without version). The API might support more methods
|
|
1457
1476
|
* in the future with new use cases being discovered.
|
|
1458
1477
|
*/
|
|
@@ -1466,9 +1485,9 @@ const getEntityBaseUrl = (paramsOrg) => {
|
|
|
1466
1485
|
}
|
|
1467
1486
|
: paramsOrg;
|
|
1468
1487
|
const { parentEntityId, parentEntityType } = params;
|
|
1469
|
-
const parentPlural = getParentPlural(parentEntityType);
|
|
1488
|
+
const parentPlural = getParentPlural$1(parentEntityType);
|
|
1470
1489
|
const versionPath = 'parentEntityVersion' in params ? `/versions/${params.parentEntityVersion}` : '';
|
|
1471
|
-
return `${getSpaceEnvBaseUrl(params)}/${parentPlural}/${parentEntityId}${versionPath}/comments`;
|
|
1490
|
+
return `${getSpaceEnvBaseUrl$1(params)}/${parentPlural}/${parentEntityId}${versionPath}/comments`;
|
|
1472
1491
|
};
|
|
1473
1492
|
const get$O = (http, params) => get$19(http, getEntityCommentUrl(params), {
|
|
1474
1493
|
headers: params.bodyFormat === 'rich-text'
|
|
@@ -1497,7 +1516,7 @@ const create$v = (http, params, rawData) => {
|
|
|
1497
1516
|
},
|
|
1498
1517
|
});
|
|
1499
1518
|
};
|
|
1500
|
-
const update$
|
|
1519
|
+
const update$t = (http, params, rawData, headers) => {
|
|
1501
1520
|
const data = copy__default.default(rawData);
|
|
1502
1521
|
delete data.sys;
|
|
1503
1522
|
return put$1(http, getEntityCommentUrl(params), data, {
|
|
@@ -1526,7 +1545,7 @@ var Comment = /*#__PURE__*/Object.freeze({
|
|
|
1526
1545
|
get: get$O,
|
|
1527
1546
|
getAll: getAll$1,
|
|
1528
1547
|
getMany: getMany$G,
|
|
1529
|
-
update: update$
|
|
1548
|
+
update: update$t
|
|
1530
1549
|
});
|
|
1531
1550
|
|
|
1532
1551
|
const getBaseUrl$o = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/component_types`;
|
|
@@ -1545,7 +1564,7 @@ const create$u = (http, params, rawData, headers) => {
|
|
|
1545
1564
|
const data = copy__default.default(rawData);
|
|
1546
1565
|
return post$1(http, getBaseUrl$o(params), data, { headers });
|
|
1547
1566
|
};
|
|
1548
|
-
const upsert$
|
|
1567
|
+
const upsert$5 = (http, params, rawData, headers) => {
|
|
1549
1568
|
const { sys, ...body } = copy__default.default(rawData);
|
|
1550
1569
|
return put$1(http, getBaseUrl$o(params) + `/${params.componentTypeId}`, body, {
|
|
1551
1570
|
headers: {
|
|
@@ -1584,7 +1603,7 @@ var ComponentType = /*#__PURE__*/Object.freeze({
|
|
|
1584
1603
|
getMany: getMany$F,
|
|
1585
1604
|
publish: publish$7,
|
|
1586
1605
|
unpublish: unpublish$7,
|
|
1587
|
-
upsert: upsert$
|
|
1606
|
+
upsert: upsert$5
|
|
1588
1607
|
});
|
|
1589
1608
|
|
|
1590
1609
|
function basePath$1(organizationId) {
|
|
@@ -1605,7 +1624,7 @@ const patch$4 = (http, params, data, headers) => {
|
|
|
1605
1624
|
},
|
|
1606
1625
|
});
|
|
1607
1626
|
};
|
|
1608
|
-
const update$
|
|
1627
|
+
const update$s = (http, params, data, headers) => {
|
|
1609
1628
|
return put$1(http, `${basePath$1(params.organizationId)}/${params.conceptId}`, data, {
|
|
1610
1629
|
headers: {
|
|
1611
1630
|
'X-Contentful-Version': params.version,
|
|
@@ -1655,7 +1674,7 @@ var Concept = /*#__PURE__*/Object.freeze({
|
|
|
1655
1674
|
getMany: getMany$E,
|
|
1656
1675
|
getTotal: getTotal$1,
|
|
1657
1676
|
patch: patch$4,
|
|
1658
|
-
update: update$
|
|
1677
|
+
update: update$s
|
|
1659
1678
|
});
|
|
1660
1679
|
|
|
1661
1680
|
function basePath(orgId) {
|
|
@@ -1690,7 +1709,7 @@ const patch$3 = (http, params, data, headers) => {
|
|
|
1690
1709
|
},
|
|
1691
1710
|
});
|
|
1692
1711
|
};
|
|
1693
|
-
const update$
|
|
1712
|
+
const update$r = (http, params, data, headers) => {
|
|
1694
1713
|
return put$1(http, `${basePath(params.organizationId)}/${params.conceptSchemeId}`, data, {
|
|
1695
1714
|
headers: {
|
|
1696
1715
|
'X-Contentful-Version': params.version,
|
|
@@ -1708,7 +1727,7 @@ var ConceptScheme = /*#__PURE__*/Object.freeze({
|
|
|
1708
1727
|
getMany: getMany$D,
|
|
1709
1728
|
getTotal: getTotal,
|
|
1710
1729
|
patch: patch$3,
|
|
1711
|
-
update: update$
|
|
1730
|
+
update: update$r
|
|
1712
1731
|
});
|
|
1713
1732
|
|
|
1714
1733
|
const getBaseUrl$n = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/content_types`;
|
|
@@ -1725,6 +1744,13 @@ const getMany$C = (http, params, headers) => {
|
|
|
1725
1744
|
headers,
|
|
1726
1745
|
});
|
|
1727
1746
|
};
|
|
1747
|
+
const getManyWithCursor$1 = (http, params, headers) => {
|
|
1748
|
+
return get$19(http, getBaseUrl$n(params), {
|
|
1749
|
+
params: { cursor: true, ...(params.query ?? {}) },
|
|
1750
|
+
headers,
|
|
1751
|
+
})
|
|
1752
|
+
.then(normalizeCursorPaginationResponse);
|
|
1753
|
+
};
|
|
1728
1754
|
const create$r = (http, params, rawData, headers) => {
|
|
1729
1755
|
const data = copy__default.default(rawData);
|
|
1730
1756
|
return post$1(http, getBaseUrl$n(params), data, { headers });
|
|
@@ -1733,7 +1759,7 @@ const createWithId$9 = (http, params, rawData, headers) => {
|
|
|
1733
1759
|
const data = copy__default.default(rawData);
|
|
1734
1760
|
return put$1(http, getContentTypeUrl$1(params), data, { headers });
|
|
1735
1761
|
};
|
|
1736
|
-
const update$
|
|
1762
|
+
const update$q = (http, params, rawData, headers) => {
|
|
1737
1763
|
const data = copy__default.default(rawData);
|
|
1738
1764
|
delete data.sys;
|
|
1739
1765
|
return put$1(http, getContentTypeUrl$1(params), data, {
|
|
@@ -1765,9 +1791,10 @@ var ContentType = /*#__PURE__*/Object.freeze({
|
|
|
1765
1791
|
del: del$t,
|
|
1766
1792
|
get: get$K,
|
|
1767
1793
|
getMany: getMany$C,
|
|
1794
|
+
getManyWithCursor: getManyWithCursor$1,
|
|
1768
1795
|
publish: publish$6,
|
|
1769
1796
|
unpublish: unpublish$6,
|
|
1770
|
-
update: update$
|
|
1797
|
+
update: update$q
|
|
1771
1798
|
});
|
|
1772
1799
|
|
|
1773
1800
|
const getBaseUrl$m = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/data_assemblies`;
|
|
@@ -1787,7 +1814,7 @@ const create$q = (http, params, rawData, headers) => {
|
|
|
1787
1814
|
const data = copy__default.default(rawData);
|
|
1788
1815
|
return post$1(http, getBaseUrl$m(params), data, { headers });
|
|
1789
1816
|
};
|
|
1790
|
-
const update$
|
|
1817
|
+
const update$p = (http, params, rawData, headers) => {
|
|
1791
1818
|
const data = copy__default.default(rawData);
|
|
1792
1819
|
return put$1(http, getBaseUrl$m(params) + `/${params.dataAssemblyId}`, data, {
|
|
1793
1820
|
headers: {
|
|
@@ -1837,7 +1864,7 @@ var DataAssembly = /*#__PURE__*/Object.freeze({
|
|
|
1837
1864
|
getPublished: getPublished$1,
|
|
1838
1865
|
publish: publish$5,
|
|
1839
1866
|
unpublish: unpublish$5,
|
|
1840
|
-
update: update$
|
|
1867
|
+
update: update$p
|
|
1841
1868
|
});
|
|
1842
1869
|
|
|
1843
1870
|
const getBaseUrl$l = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/content_types/${params.contentTypeId}/editor_interface`;
|
|
@@ -1847,7 +1874,7 @@ const get$I = (http, params) => {
|
|
|
1847
1874
|
const getMany$A = (http, params) => {
|
|
1848
1875
|
return get$19(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/editor_interfaces`);
|
|
1849
1876
|
};
|
|
1850
|
-
const update$
|
|
1877
|
+
const update$o = (http, params, rawData, headers) => {
|
|
1851
1878
|
const data = copy__default.default(rawData);
|
|
1852
1879
|
delete data.sys;
|
|
1853
1880
|
return put$1(http, getBaseUrl$l(params), data, {
|
|
@@ -1862,7 +1889,7 @@ var EditorInterface = /*#__PURE__*/Object.freeze({
|
|
|
1862
1889
|
__proto__: null,
|
|
1863
1890
|
get: get$I,
|
|
1864
1891
|
getMany: getMany$A,
|
|
1865
|
-
update: update$
|
|
1892
|
+
update: update$o
|
|
1866
1893
|
});
|
|
1867
1894
|
|
|
1868
1895
|
const getBaseUrl$k = (params) => `/spaces/${params.spaceId}/eligible_licenses`;
|
|
@@ -1889,7 +1916,7 @@ const getMany$y = (http, params, rawData, headers) => {
|
|
|
1889
1916
|
headers: { ...headers },
|
|
1890
1917
|
});
|
|
1891
1918
|
};
|
|
1892
|
-
const update$
|
|
1919
|
+
const update$n = (http, params, rawData, headers) => {
|
|
1893
1920
|
const data = copy__default.default(rawData);
|
|
1894
1921
|
delete data.sys;
|
|
1895
1922
|
return put$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/entries/${params.entryId}`, data, {
|
|
@@ -1934,7 +1961,7 @@ var ReleaseEntry = /*#__PURE__*/Object.freeze({
|
|
|
1934
1961
|
get: get$H,
|
|
1935
1962
|
getMany: getMany$y,
|
|
1936
1963
|
patch: patch$2,
|
|
1937
|
-
update: update$
|
|
1964
|
+
update: update$n
|
|
1938
1965
|
});
|
|
1939
1966
|
|
|
1940
1967
|
const get$G = (http, params, rawData, headers) => {
|
|
@@ -1961,6 +1988,16 @@ const getMany$x = (http, params, rawData, headers) => {
|
|
|
1961
1988
|
headers: { ...headers },
|
|
1962
1989
|
});
|
|
1963
1990
|
};
|
|
1991
|
+
const getManyWithCursor = (http, params, rawData, headers) => {
|
|
1992
|
+
if (params.releaseId) {
|
|
1993
|
+
throw new Error('getManyWithCursor is not supported for release-scoped entries');
|
|
1994
|
+
}
|
|
1995
|
+
return get$19(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries`, {
|
|
1996
|
+
params: { cursor: true, ...(params.query ?? {}) },
|
|
1997
|
+
headers: { ...headers },
|
|
1998
|
+
})
|
|
1999
|
+
.then(normalizeCursorPaginationResponse);
|
|
2000
|
+
};
|
|
1964
2001
|
const patch$1 = (http, params, data, headers) => {
|
|
1965
2002
|
if (params.releaseId) {
|
|
1966
2003
|
return patch$2(http, params, data, headers ?? {});
|
|
@@ -1973,9 +2010,9 @@ const patch$1 = (http, params, data, headers) => {
|
|
|
1973
2010
|
},
|
|
1974
2011
|
});
|
|
1975
2012
|
};
|
|
1976
|
-
const update$
|
|
2013
|
+
const update$m = (http, params, rawData, headers) => {
|
|
1977
2014
|
if (params.releaseId) {
|
|
1978
|
-
return update$
|
|
2015
|
+
return update$n(http, params, rawData, headers ?? {});
|
|
1979
2016
|
}
|
|
1980
2017
|
const data = copy__default.default(rawData);
|
|
1981
2018
|
delete data.sys;
|
|
@@ -2052,13 +2089,14 @@ var Entry = /*#__PURE__*/Object.freeze({
|
|
|
2052
2089
|
del: del$r,
|
|
2053
2090
|
get: get$G,
|
|
2054
2091
|
getMany: getMany$x,
|
|
2092
|
+
getManyWithCursor: getManyWithCursor,
|
|
2055
2093
|
getPublished: getPublished,
|
|
2056
2094
|
patch: patch$1,
|
|
2057
2095
|
publish: publish$4,
|
|
2058
2096
|
references: references,
|
|
2059
2097
|
unarchive: unarchive$2,
|
|
2060
2098
|
unpublish: unpublish$4,
|
|
2061
|
-
update: update$
|
|
2099
|
+
update: update$m
|
|
2062
2100
|
});
|
|
2063
2101
|
|
|
2064
2102
|
const get$F = (http, params) => {
|
|
@@ -2069,7 +2107,7 @@ const getMany$w = (http, params) => {
|
|
|
2069
2107
|
params: params.query,
|
|
2070
2108
|
});
|
|
2071
2109
|
};
|
|
2072
|
-
const update$
|
|
2110
|
+
const update$l = (http, params, rawData, headers) => {
|
|
2073
2111
|
const data = copy__default.default(rawData);
|
|
2074
2112
|
delete data.sys;
|
|
2075
2113
|
return put$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}`, data, {
|
|
@@ -2109,7 +2147,7 @@ var Environment = /*#__PURE__*/Object.freeze({
|
|
|
2109
2147
|
del: del$q,
|
|
2110
2148
|
get: get$F,
|
|
2111
2149
|
getMany: getMany$w,
|
|
2112
|
-
update: update$
|
|
2150
|
+
update: update$l
|
|
2113
2151
|
});
|
|
2114
2152
|
|
|
2115
2153
|
/**
|
|
@@ -2134,7 +2172,7 @@ const createWithId$5 = (http, params, rawData, headers) => {
|
|
|
2134
2172
|
headers: headers,
|
|
2135
2173
|
});
|
|
2136
2174
|
};
|
|
2137
|
-
const update$
|
|
2175
|
+
const update$k = (http, params, rawData, headers) => {
|
|
2138
2176
|
const data = copy__default.default(rawData);
|
|
2139
2177
|
delete data.sys;
|
|
2140
2178
|
return put$1(http, getEnvironmentAliasUrl(params), data, {
|
|
@@ -2154,7 +2192,7 @@ var EnvironmentAlias = /*#__PURE__*/Object.freeze({
|
|
|
2154
2192
|
del: del$p,
|
|
2155
2193
|
get: get$E,
|
|
2156
2194
|
getMany: getMany$v,
|
|
2157
|
-
update: update$
|
|
2195
|
+
update: update$k
|
|
2158
2196
|
});
|
|
2159
2197
|
|
|
2160
2198
|
const apiPath$1 = (organizationId, ...pathSegments) => `/organizations/${organizationId}/environment_templates/` + pathSegments.join('/');
|
|
@@ -2169,7 +2207,7 @@ const get$D = (http, { organizationId, environmentTemplateId, version, query = {
|
|
|
2169
2207
|
});
|
|
2170
2208
|
const getMany$u = (http, { organizationId, query = {} }, headers) => get$19(http, apiPath$1(organizationId), { params: query, headers });
|
|
2171
2209
|
const create$m = (http, { organizationId }, payload, headers) => post$1(http, apiPath$1(organizationId), payload, { headers });
|
|
2172
|
-
const update$
|
|
2210
|
+
const update$j = (http, { organizationId, environmentTemplateId }, payload, headers) => {
|
|
2173
2211
|
const data = copy__default.default(payload);
|
|
2174
2212
|
delete data.sys;
|
|
2175
2213
|
return put$1(http, apiPath$1(organizationId, environmentTemplateId), data, {
|
|
@@ -2201,7 +2239,7 @@ var EnvironmentTemplate = /*#__PURE__*/Object.freeze({
|
|
|
2201
2239
|
get: get$D,
|
|
2202
2240
|
getMany: getMany$u,
|
|
2203
2241
|
install: install,
|
|
2204
|
-
update: update$
|
|
2242
|
+
update: update$j,
|
|
2205
2243
|
validate: validate$1,
|
|
2206
2244
|
versionUpdate: versionUpdate,
|
|
2207
2245
|
versions: versions
|
|
@@ -2249,7 +2287,7 @@ const createWithId$4 = (http, params, rawData, headers) => {
|
|
|
2249
2287
|
const data = copy__default.default(rawData);
|
|
2250
2288
|
return put$1(http, getExtensionUrl(params), data, { headers });
|
|
2251
2289
|
};
|
|
2252
|
-
const update$
|
|
2290
|
+
const update$i = async (http, params, rawData, headers) => {
|
|
2253
2291
|
const data = copy__default.default(rawData);
|
|
2254
2292
|
delete data.sys;
|
|
2255
2293
|
return put$1(http, getExtensionUrl(params), data, {
|
|
@@ -2271,7 +2309,7 @@ var Extension = /*#__PURE__*/Object.freeze({
|
|
|
2271
2309
|
get: get$C,
|
|
2272
2310
|
getExtensionUrl: getExtensionUrl,
|
|
2273
2311
|
getMany: getMany$s,
|
|
2274
|
-
update: update$
|
|
2312
|
+
update: update$i
|
|
2275
2313
|
});
|
|
2276
2314
|
|
|
2277
2315
|
const getBaseUrl$h = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/fragments`;
|
|
@@ -2288,7 +2326,7 @@ const create$k = (http, params, rawData, headers) => {
|
|
|
2288
2326
|
const data = copy__default.default(rawData);
|
|
2289
2327
|
return post$1(http, getBaseUrl$h(params), data, { headers });
|
|
2290
2328
|
};
|
|
2291
|
-
const
|
|
2329
|
+
const upsert$4 = (http, params, rawData, headers) => {
|
|
2292
2330
|
const { sys, ...body } = copy__default.default(rawData);
|
|
2293
2331
|
return put$1(http, getBaseUrl$h(params) + `/${params.fragmentId}`, body, {
|
|
2294
2332
|
headers: {
|
|
@@ -2327,7 +2365,7 @@ var Fragment = /*#__PURE__*/Object.freeze({
|
|
|
2327
2365
|
getMany: getMany$r,
|
|
2328
2366
|
publish: publish$3,
|
|
2329
2367
|
unpublish: unpublish$3,
|
|
2330
|
-
|
|
2368
|
+
upsert: upsert$4
|
|
2331
2369
|
});
|
|
2332
2370
|
|
|
2333
2371
|
// Base URL
|
|
@@ -3261,7 +3299,34 @@ var Tag = /*#__PURE__*/Object.freeze({
|
|
|
3261
3299
|
update: update$9
|
|
3262
3300
|
});
|
|
3263
3301
|
|
|
3264
|
-
const
|
|
3302
|
+
const getSpaceEnvBaseUrl = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}`;
|
|
3303
|
+
function getParentPlural(parentEntityType) {
|
|
3304
|
+
switch (parentEntityType) {
|
|
3305
|
+
case 'Entry':
|
|
3306
|
+
return 'entries';
|
|
3307
|
+
case 'Experience':
|
|
3308
|
+
return 'experiences';
|
|
3309
|
+
case 'Fragment':
|
|
3310
|
+
return 'fragments';
|
|
3311
|
+
case 'Template':
|
|
3312
|
+
return 'templates';
|
|
3313
|
+
case 'ComponentType':
|
|
3314
|
+
return 'component_types';
|
|
3315
|
+
}
|
|
3316
|
+
}
|
|
3317
|
+
const normalizeTaskParentParams = (paramsOrg) => 'entryId' in paramsOrg
|
|
3318
|
+
? {
|
|
3319
|
+
spaceId: paramsOrg.spaceId,
|
|
3320
|
+
environmentId: paramsOrg.environmentId,
|
|
3321
|
+
parentEntityType: 'Entry',
|
|
3322
|
+
parentEntityId: paramsOrg.entryId,
|
|
3323
|
+
}
|
|
3324
|
+
: paramsOrg;
|
|
3325
|
+
const getBaseUrl$a = (paramsOrg) => {
|
|
3326
|
+
const params = normalizeTaskParentParams(paramsOrg);
|
|
3327
|
+
const parentPlural = getParentPlural(params.parentEntityType);
|
|
3328
|
+
return `${getSpaceEnvBaseUrl(params)}/${parentPlural}/${params.parentEntityId}/tasks`;
|
|
3329
|
+
};
|
|
3265
3330
|
const getTaskUrl = (params) => `${getBaseUrl$a(params)}/${params.taskId}`;
|
|
3266
3331
|
const get$a = (http, params) => get$19(http, getTaskUrl(params));
|
|
3267
3332
|
const getMany$8 = (http, params) => get$19(http, getBaseUrl$a(params), {
|
|
@@ -4724,12 +4789,16 @@ const wrapContentTypeCursorPaginatedCollection = wrapCursorPaginatedCollection(w
|
|
|
4724
4789
|
* @internal
|
|
4725
4790
|
*/
|
|
4726
4791
|
function createTaskApi(makeRequest) {
|
|
4727
|
-
const getParams = (task) =>
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4792
|
+
const getParams = (task) => {
|
|
4793
|
+
const parentEntity = task.sys.parentEntity;
|
|
4794
|
+
return {
|
|
4795
|
+
spaceId: task.sys.space.sys.id,
|
|
4796
|
+
environmentId: task.sys.environment.sys.id,
|
|
4797
|
+
parentEntityType: parentEntity.sys.linkType,
|
|
4798
|
+
parentEntityId: parentEntity.sys.id,
|
|
4799
|
+
taskId: task.sys.id,
|
|
4800
|
+
};
|
|
4801
|
+
};
|
|
4733
4802
|
return {
|
|
4734
4803
|
update: function () {
|
|
4735
4804
|
const raw = this.toPlainObject();
|
|
@@ -4779,12 +4848,16 @@ var CommentNode;
|
|
|
4779
4848
|
* @internal
|
|
4780
4849
|
*/
|
|
4781
4850
|
function createCommentApi(makeRequest) {
|
|
4782
|
-
const getParams = (comment) =>
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4851
|
+
const getParams = (comment) => {
|
|
4852
|
+
const parentEntity = comment.sys.parentEntity;
|
|
4853
|
+
return {
|
|
4854
|
+
spaceId: comment.sys.space.sys.id,
|
|
4855
|
+
environmentId: comment.sys.environment.sys.id,
|
|
4856
|
+
commentId: comment.sys.id,
|
|
4857
|
+
parentEntityType: parentEntity.sys.linkType,
|
|
4858
|
+
parentEntityId: parentEntity.sys.id,
|
|
4859
|
+
};
|
|
4860
|
+
};
|
|
4788
4861
|
return {
|
|
4789
4862
|
update: async function () {
|
|
4790
4863
|
const raw = this.toPlainObject();
|
|
@@ -14757,7 +14830,7 @@ const createPlainClient = (makeRequest, defaults) => {
|
|
|
14757
14830
|
getMany: wrap(wrapParams, 'Fragment', 'getMany'),
|
|
14758
14831
|
get: wrap(wrapParams, 'Fragment', 'get'),
|
|
14759
14832
|
create: wrap(wrapParams, 'Fragment', 'create'),
|
|
14760
|
-
|
|
14833
|
+
upsert: wrap(wrapParams, 'Fragment', 'upsert'),
|
|
14761
14834
|
delete: wrap(wrapParams, 'Fragment', 'delete'),
|
|
14762
14835
|
publish: wrap(wrapParams, 'Fragment', 'publish'),
|
|
14763
14836
|
unpublish: wrap(wrapParams, 'Fragment', 'unpublish'),
|