contentful-management 12.4.0 → 12.6.0-dev.1
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 +3 -3
- package/dist/browser/index.js +1081 -742
- 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 +1073 -734
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/component-type.mjs +43 -3
- package/dist/esm/adapters/REST/endpoints/component-type.mjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/data-assembly.mjs +62 -0
- package/dist/esm/adapters/REST/endpoints/data-assembly.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/experience.mjs +52 -0
- package/dist/esm/adapters/REST/endpoints/experience.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/fragment.mjs +50 -0
- package/dist/esm/adapters/REST/endpoints/fragment.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/index.mjs +8 -0
- package/dist/esm/adapters/REST/endpoints/index.mjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/space.mjs +4 -2
- package/dist/esm/adapters/REST/endpoints/space.mjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/template.mjs +50 -0
- package/dist/esm/adapters/REST/endpoints/template.mjs.map +1 -0
- package/dist/esm/common-types.mjs.map +1 -1
- package/dist/esm/create-contentful-api.mjs +8 -4
- package/dist/esm/create-contentful-api.mjs.map +1 -1
- package/dist/esm/entities/space.mjs.map +1 -1
- package/dist/esm/plain/plain-client.mjs +44 -0
- package/dist/esm/plain/plain-client.mjs.map +1 -1
- package/dist/types/adapters/REST/endpoints/component-type.d.ts +6 -0
- package/dist/types/adapters/REST/endpoints/component-type.js +43 -3
- package/dist/types/adapters/REST/endpoints/component-type.js.map +1 -1
- package/dist/types/adapters/REST/endpoints/data-assembly.d.ts +10 -0
- package/dist/types/adapters/REST/endpoints/data-assembly.js +62 -0
- package/dist/types/adapters/REST/endpoints/data-assembly.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/experience.d.ts +8 -0
- package/dist/types/adapters/REST/endpoints/experience.js +52 -0
- package/dist/types/adapters/REST/endpoints/experience.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/fragment.d.ts +8 -0
- package/dist/types/adapters/REST/endpoints/fragment.js +50 -0
- package/dist/types/adapters/REST/endpoints/fragment.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/index.d.ts +8 -0
- package/dist/types/adapters/REST/endpoints/index.js +8 -0
- package/dist/types/adapters/REST/endpoints/index.js.map +1 -1
- package/dist/types/adapters/REST/endpoints/space.js +4 -2
- package/dist/types/adapters/REST/endpoints/space.js.map +1 -1
- package/dist/types/adapters/REST/endpoints/template.d.ts +8 -0
- package/dist/types/adapters/REST/endpoints/template.js +50 -0
- package/dist/types/adapters/REST/endpoints/template.js.map +1 -0
- package/dist/types/common-types.d.ts +338 -9
- package/dist/types/common-types.js.map +1 -1
- package/dist/types/create-contentful-api.d.ts +4 -4
- package/dist/types/create-contentful-api.js +8 -4
- package/dist/types/create-contentful-api.js.map +1 -1
- package/dist/types/entities/component-type.d.ts +89 -45
- package/dist/types/entities/data-assembly.d.ts +119 -0
- package/dist/types/entities/experience.d.ts +89 -0
- package/dist/types/entities/fragment.d.ts +52 -0
- package/dist/types/entities/space.d.ts +23 -0
- package/dist/types/entities/space.js.map +1 -1
- package/dist/types/entities/template.d.ts +48 -0
- package/dist/types/export-types.d.ts +5 -0
- package/dist/types/plain/entities/component-type.d.ts +119 -7
- package/dist/types/plain/entities/data-assembly.d.ts +178 -0
- package/dist/types/plain/entities/experience.d.ts +165 -0
- package/dist/types/plain/entities/fragment.d.ts +134 -0
- package/dist/types/plain/entities/space.d.ts +10 -4
- package/dist/types/plain/entities/template.d.ts +139 -0
- package/dist/types/plain/plain-client-types.d.ts +8 -0
- package/dist/types/plain/plain-client.js +44 -0
- package/dist/types/plain/plain-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import copy from 'fast-copy';
|
|
2
|
+
import { post, del as del$1, get as get$1, put } from './raw.js';
|
|
3
|
+
|
|
4
|
+
const getBaseUrl = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/templates`;
|
|
5
|
+
const getMany = (http, params, headers) => {
|
|
6
|
+
return get$1(http, getBaseUrl(params), {
|
|
7
|
+
params: params.query,
|
|
8
|
+
headers,
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
const get = (http, params, headers) => {
|
|
12
|
+
return get$1(http, getBaseUrl(params) + `/${params.templateId}`, { headers });
|
|
13
|
+
};
|
|
14
|
+
const create = (http, params, rawData, headers) => {
|
|
15
|
+
const data = copy(rawData);
|
|
16
|
+
return post(http, getBaseUrl(params), data, { headers });
|
|
17
|
+
};
|
|
18
|
+
const upsert = (http, params, rawData, headers) => {
|
|
19
|
+
const { sys, ...body } = copy(rawData);
|
|
20
|
+
return put(http, getBaseUrl(params) + `/${params.templateId}`, body, {
|
|
21
|
+
headers: {
|
|
22
|
+
...(sys.version !== undefined && {
|
|
23
|
+
'X-Contentful-Version': sys.version,
|
|
24
|
+
}),
|
|
25
|
+
...headers,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
const del = (http, params) => {
|
|
30
|
+
return del$1(http, getBaseUrl(params) + `/${params.templateId}`);
|
|
31
|
+
};
|
|
32
|
+
const publish = (http, params, headers) => {
|
|
33
|
+
return put(http, getBaseUrl(params) + `/${params.templateId}/published`, null, {
|
|
34
|
+
headers: {
|
|
35
|
+
'X-Contentful-Version': params.version,
|
|
36
|
+
...headers,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const unpublish = (http, params, headers) => {
|
|
41
|
+
return del$1(http, getBaseUrl(params) + `/${params.templateId}/published`, {
|
|
42
|
+
headers: {
|
|
43
|
+
'X-Contentful-Version': params.version,
|
|
44
|
+
...headers,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { create, del, get, getMany, publish, unpublish, upsert };
|
|
50
|
+
//# sourceMappingURL=template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sources":["../../../../../lib/adapters/REST/endpoints/template.ts"],"sourcesContent":[null],"names":["raw.get","raw.post","raw.put","raw.del"],"mappings":";;;AAcA,MAAM,UAAU,GAAG,CAAC,MAAiC,KACnD,CAAA,QAAA,EAAW,MAAM,CAAC,OAAO,CAAA,cAAA,EAAiB,MAAM,CAAC,aAAa,YAAY;AAErE,MAAM,OAAO,GAAwC,CAC1D,IAAmB,EACnB,MAAmE,EACnE,OAAgC,KAC9B;IACF,OAAOA,KAAO,CAAqB,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE;QAC3D,MAAM,EAAE,MAAM,CAAC,KAAK;QACpB,OAAO;AACR,KAAA,CAAC;AACJ;AAEO,MAAM,GAAG,GAAoC,CAClD,IAAmB,EACnB,MAAyB,EACzB,OAAgC,KAC9B;IACF,OAAOA,KAAO,CAAgB,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,CAAA,CAAA,EAAI,MAAM,CAAC,UAAU,CAAA,CAAE,EAAE,EAAE,OAAO,EAAE,CAAC;AAChG;AAEO,MAAM,MAAM,GAAuC,CACxD,IAAmB,EACnB,MAAiC,EACjC,OAA4B,EAC5B,OAAgC,KAC9B;AACF,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC;AAC1B,IAAA,OAAOC,IAAQ,CAAgB,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC;AAC7E;AAEO,MAAM,MAAM,GAAuC,CACxD,IAAmB,EACnB,MAAyB,EACzB,OAA4B,EAC5B,OAAgC,KAC9B;IACF,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI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Props } from './entities/asset-key';
|
|
|
16
16
|
import type { AvailableLicenseProps } from './entities/available-license';
|
|
17
17
|
import type { BulkActionProps, BulkActionPublishPayload, BulkActionUnpublishPayload, BulkActionV2Payload, BulkActionValidatePayload, PublishBulkActionV2Payload, UnpublishBulkActionV2Payload, ValidateBulkActionV2Payload } from './entities/bulk-action';
|
|
18
18
|
import type { CommentProps, CreateCommentParams, CreateCommentProps, DeleteCommentParams, GetCommentParentEntityParams, GetManyCommentsParams, PlainTextBodyFormat, RichTextBodyFormat, RichTextCommentBodyPayload, RichTextCommentProps, UpdateCommentParams, UpdateCommentProps } from './entities/comment';
|
|
19
|
-
import type { ComponentTypeProps, ComponentTypeQueryOptions } from './entities/component-type';
|
|
19
|
+
import type { ComponentTypeProps, ComponentTypeQueryOptions, CreateComponentTypeProps, UpsertComponentTypeProps } from './entities/component-type';
|
|
20
|
+
import type { CreateFragmentProps, FragmentProps, FragmentQueryOptions, UpdateFragmentProps } from './entities/fragment';
|
|
21
|
+
import type { CreateTemplateProps, TemplateProps, TemplateQueryOptions, UpsertTemplateProps } from './entities/template';
|
|
22
|
+
import type { CreateExperienceProps, UpsertExperienceProps, ExperienceLocalePublishPayload, ExperienceProps, ExperienceQueryOptions } from './entities/experience';
|
|
20
23
|
import type { ContentTypeProps, CreateContentTypeProps } from './entities/content-type';
|
|
21
24
|
import type { EditorInterfaceProps } from './entities/editor-interface';
|
|
22
25
|
import type { EligibleLicenseProps } from './entities/eligible-license';
|
|
@@ -35,7 +38,7 @@ import type { ReleaseAction, ReleaseActionProps, ReleaseActionQueryOptions } fro
|
|
|
35
38
|
import type { CreateRoleProps, RoleProps } from './entities/role';
|
|
36
39
|
import type { ScheduledActionProps } from './entities/scheduled-action';
|
|
37
40
|
import type { SnapshotProps } from './entities/snapshot';
|
|
38
|
-
import type { SpaceProps, UnarchiveProps } from './entities/space';
|
|
41
|
+
import type { SpaceProps, SpaceIncludes, SpaceIncludeParam, UnarchiveProps } from './entities/space';
|
|
39
42
|
import type { SpaceAddOnProps, UpdateSpaceAddOnAllocationProps } from './entities/space-add-on';
|
|
40
43
|
import type { SpaceMemberProps } from './entities/space-member';
|
|
41
44
|
import type { CreateSpaceMembershipProps, SpaceMembershipProps } from './entities/space-membership';
|
|
@@ -52,6 +55,7 @@ import type { AppEventSubscriptionProps, CreateAppEventSubscriptionProps } from
|
|
|
52
55
|
import type { AppKeyProps, CreateAppKeyProps } from './entities/app-key';
|
|
53
56
|
import type { ConceptProps, CreateConceptProps } from './entities/concept';
|
|
54
57
|
import type { ConceptSchemeProps, CreateConceptSchemeProps } from './entities/concept-scheme';
|
|
58
|
+
import type { CreateDataAssemblyProps, DataAssemblyProps, DataAssemblyQueryOptions, UpdateDataAssemblyProps, DataAssemblyCollection } from './entities/data-assembly';
|
|
55
59
|
import type { CreateEnvironmentTemplateProps, EnvironmentTemplateProps } from './entities/environment-template';
|
|
56
60
|
import type { CreateEnvironmentTemplateInstallationProps, EnvironmentTemplateInstallationProps, EnvironmentTemplateValidationProps, ValidateEnvironmentTemplateInstallationProps } from './entities/environment-template-installation';
|
|
57
61
|
import type { FunctionProps } from './entities/function';
|
|
@@ -188,6 +192,70 @@ export interface MetadataProps {
|
|
|
188
192
|
tags: Link<'Tag'>[];
|
|
189
193
|
concepts?: Link<'TaxonomyConcept'>[];
|
|
190
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* Base metadata shape for ExO entities (ComponentType, Template).
|
|
197
|
+
* Mirrors upstream MetadataSchema: tags and concepts only.
|
|
198
|
+
* - tags: optional (upstream MetadataSchema.tags is z.optional as of SPA-3821)
|
|
199
|
+
* - concepts: optional taxonomy concept links
|
|
200
|
+
*/
|
|
201
|
+
export interface ExoMetadataProps {
|
|
202
|
+
tags?: Link<'Tag'>[];
|
|
203
|
+
concepts?: Link<'TaxonomyConcept'>[];
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Extended metadata shape for Experience entities only.
|
|
207
|
+
* Adds name? for variant labeling (SPA-3939), mirroring upstream ExperienceMetadata.
|
|
208
|
+
*/
|
|
209
|
+
export interface ExperienceMetadataProps extends ExoMetadataProps {
|
|
210
|
+
name?: string;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Shared query filter fields for ExO list endpoints (ComponentType, Experience, Fragment, Template).
|
|
214
|
+
* Mirrors the four shared filter schemas in experiences-management-api-contract:
|
|
215
|
+
* SysFiltersSchema + TagFiltersSchema + TaxonomyConceptsFiltersSchema + TextFiltersSchema
|
|
216
|
+
*/
|
|
217
|
+
export interface ExoQueryFilters {
|
|
218
|
+
'sys.id'?: string;
|
|
219
|
+
'sys.id[in]'?: string;
|
|
220
|
+
'sys.id[nin]'?: string;
|
|
221
|
+
'sys.createdBy.sys.id'?: string;
|
|
222
|
+
'sys.createdBy.sys.id[in]'?: string;
|
|
223
|
+
'sys.createdBy.sys.id[nin]'?: string;
|
|
224
|
+
'sys.updatedBy.sys.id'?: string;
|
|
225
|
+
'sys.updatedBy.sys.id[in]'?: string;
|
|
226
|
+
'sys.updatedBy.sys.id[nin]'?: string;
|
|
227
|
+
'sys.publishedBy.sys.id'?: string;
|
|
228
|
+
'sys.publishedBy.sys.id[in]'?: string;
|
|
229
|
+
'sys.publishedBy.sys.id[nin]'?: string;
|
|
230
|
+
'sys.createdAt[gt]'?: string;
|
|
231
|
+
'sys.createdAt[gte]'?: string;
|
|
232
|
+
'sys.createdAt[lt]'?: string;
|
|
233
|
+
'sys.createdAt[lte]'?: string;
|
|
234
|
+
'sys.updatedAt[gt]'?: string;
|
|
235
|
+
'sys.updatedAt[gte]'?: string;
|
|
236
|
+
'sys.updatedAt[lt]'?: string;
|
|
237
|
+
'sys.updatedAt[lte]'?: string;
|
|
238
|
+
'sys.publishedAt[gt]'?: string;
|
|
239
|
+
'sys.publishedAt[gte]'?: string;
|
|
240
|
+
'sys.publishedAt[lt]'?: string;
|
|
241
|
+
'sys.publishedAt[lte]'?: string;
|
|
242
|
+
'sys.firstPublishedAt[gt]'?: string;
|
|
243
|
+
'sys.firstPublishedAt[gte]'?: string;
|
|
244
|
+
'sys.firstPublishedAt[lt]'?: string;
|
|
245
|
+
'sys.firstPublishedAt[lte]'?: string;
|
|
246
|
+
'sys.version'?: number;
|
|
247
|
+
'sys.publishedVersion'?: number;
|
|
248
|
+
'sys.archivedAt[exists]'?: boolean;
|
|
249
|
+
'metadata.tags.sys.id[in]'?: string;
|
|
250
|
+
'metadata.tags.sys.id[all]'?: string;
|
|
251
|
+
'metadata.tags.sys.id[nin]'?: string;
|
|
252
|
+
'metadata.concepts.sys.id[in]'?: string;
|
|
253
|
+
'metadata.concepts.sys.id[all]'?: string;
|
|
254
|
+
'metadata.concepts.sys.id[nin]'?: string;
|
|
255
|
+
'metadata.concepts.descendants[in]'?: string;
|
|
256
|
+
'name[match]'?: string;
|
|
257
|
+
name?: string;
|
|
258
|
+
}
|
|
191
259
|
export interface SysLink {
|
|
192
260
|
sys: MetaLinkProps;
|
|
193
261
|
}
|
|
@@ -206,6 +274,13 @@ export interface CursorPaginatedCollectionProp<TObj> extends Omit<CollectionProp
|
|
|
206
274
|
prev?: string;
|
|
207
275
|
};
|
|
208
276
|
}
|
|
277
|
+
export interface ExoCursorPaginatedCollectionProp<TObj> extends CursorPaginatedCollectionProp<TObj> {
|
|
278
|
+
total?: number;
|
|
279
|
+
pages: {
|
|
280
|
+
next?: string;
|
|
281
|
+
prev?: string;
|
|
282
|
+
};
|
|
283
|
+
}
|
|
209
284
|
export interface Collection<T, TPlain> extends CollectionProp<T>, DefaultElements<CollectionProp<TPlain>> {
|
|
210
285
|
}
|
|
211
286
|
export interface CursorPaginatedCollection<T, TPlain> extends CursorPaginatedCollectionProp<T>, DefaultElements<CursorPaginatedCollectionProp<TPlain>> {
|
|
@@ -240,6 +315,7 @@ interface CursorPaginationNone extends CursorPaginationBase {
|
|
|
240
315
|
pageNext?: never;
|
|
241
316
|
pagePrev?: never;
|
|
242
317
|
}
|
|
318
|
+
export type CursorPaginationParams = CursorPaginationPageNext | CursorPaginationPagePrev | CursorPaginationNone;
|
|
243
319
|
type StartOperator = 'gt' | 'gte';
|
|
244
320
|
type EndOperator = 'lt' | 'lte';
|
|
245
321
|
type ComparisonOperator = StartOperator | EndOperator;
|
|
@@ -367,6 +443,12 @@ type MRInternal<UA extends boolean> = {
|
|
|
367
443
|
(opts: MROpts<'Comment', 'update', UA>): MRReturn<'Comment', 'update'>;
|
|
368
444
|
(opts: MROpts<'Comment', 'delete', UA>): MRReturn<'Comment', 'delete'>;
|
|
369
445
|
(opts: MROpts<'ComponentType', 'getMany', UA>): MRReturn<'ComponentType', 'getMany'>;
|
|
446
|
+
(opts: MROpts<'ComponentType', 'get', UA>): MRReturn<'ComponentType', 'get'>;
|
|
447
|
+
(opts: MROpts<'ComponentType', 'create', UA>): MRReturn<'ComponentType', 'create'>;
|
|
448
|
+
(opts: MROpts<'ComponentType', 'upsert', UA>): MRReturn<'ComponentType', 'upsert'>;
|
|
449
|
+
(opts: MROpts<'ComponentType', 'delete', UA>): MRReturn<'ComponentType', 'delete'>;
|
|
450
|
+
(opts: MROpts<'ComponentType', 'publish', UA>): MRReturn<'ComponentType', 'publish'>;
|
|
451
|
+
(opts: MROpts<'ComponentType', 'unpublish', UA>): MRReturn<'ComponentType', 'unpublish'>;
|
|
370
452
|
(opts: MROpts<'Concept', 'get', UA>): MRReturn<'Concept', 'get'>;
|
|
371
453
|
(opts: MROpts<'Concept', 'getMany', UA>): MRReturn<'Concept', 'getMany'>;
|
|
372
454
|
(opts: MROpts<'Concept', 'getTotal', UA>): MRReturn<'Concept', 'getTotal'>;
|
|
@@ -393,6 +475,15 @@ type MRInternal<UA extends boolean> = {
|
|
|
393
475
|
(opts: MROpts<'ContentType', 'delete', UA>): MRReturn<'ContentType', 'delete'>;
|
|
394
476
|
(opts: MROpts<'ContentType', 'publish', UA>): MRReturn<'ContentType', 'publish'>;
|
|
395
477
|
(opts: MROpts<'ContentType', 'unpublish', UA>): MRReturn<'ContentType', 'unpublish'>;
|
|
478
|
+
(opts: MROpts<'DataAssembly', 'getMany', UA>): MRReturn<'DataAssembly', 'getMany'>;
|
|
479
|
+
(opts: MROpts<'DataAssembly', 'getManyPublished', UA>): MRReturn<'DataAssembly', 'getManyPublished'>;
|
|
480
|
+
(opts: MROpts<'DataAssembly', 'getPublished', UA>): MRReturn<'DataAssembly', 'getPublished'>;
|
|
481
|
+
(opts: MROpts<'DataAssembly', 'get', UA>): MRReturn<'DataAssembly', 'get'>;
|
|
482
|
+
(opts: MROpts<'DataAssembly', 'create', UA>): MRReturn<'DataAssembly', 'create'>;
|
|
483
|
+
(opts: MROpts<'DataAssembly', 'update', UA>): MRReturn<'DataAssembly', 'update'>;
|
|
484
|
+
(opts: MROpts<'DataAssembly', 'delete', UA>): MRReturn<'DataAssembly', 'delete'>;
|
|
485
|
+
(opts: MROpts<'DataAssembly', 'publish', UA>): MRReturn<'DataAssembly', 'publish'>;
|
|
486
|
+
(opts: MROpts<'DataAssembly', 'unpublish', UA>): MRReturn<'DataAssembly', 'unpublish'>;
|
|
396
487
|
(opts: MROpts<'EditorInterface', 'get', UA>): MRReturn<'EditorInterface', 'get'>;
|
|
397
488
|
(opts: MROpts<'EditorInterface', 'getMany', UA>): MRReturn<'EditorInterface', 'getMany'>;
|
|
398
489
|
(opts: MROpts<'EditorInterface', 'update', UA>): MRReturn<'EditorInterface', 'update'>;
|
|
@@ -576,6 +667,20 @@ type MRInternal<UA extends boolean> = {
|
|
|
576
667
|
(opts: MROpts<'TeamSpaceMembership', 'create', UA>): MRReturn<'TeamSpaceMembership', 'create'>;
|
|
577
668
|
(opts: MROpts<'TeamSpaceMembership', 'update', UA>): MRReturn<'TeamSpaceMembership', 'update'>;
|
|
578
669
|
(opts: MROpts<'TeamSpaceMembership', 'delete', UA>): MRReturn<'TeamSpaceMembership', 'delete'>;
|
|
670
|
+
(opts: MROpts<'Fragment', 'getMany', UA>): MRReturn<'Fragment', 'getMany'>;
|
|
671
|
+
(opts: MROpts<'Fragment', 'get', UA>): MRReturn<'Fragment', 'get'>;
|
|
672
|
+
(opts: MROpts<'Fragment', 'create', UA>): MRReturn<'Fragment', 'create'>;
|
|
673
|
+
(opts: MROpts<'Fragment', 'update', UA>): MRReturn<'Fragment', 'update'>;
|
|
674
|
+
(opts: MROpts<'Fragment', 'delete', UA>): MRReturn<'Fragment', 'delete'>;
|
|
675
|
+
(opts: MROpts<'Fragment', 'publish', UA>): MRReturn<'Fragment', 'publish'>;
|
|
676
|
+
(opts: MROpts<'Fragment', 'unpublish', UA>): MRReturn<'Fragment', 'unpublish'>;
|
|
677
|
+
(opts: MROpts<'Template', 'getMany', UA>): MRReturn<'Template', 'getMany'>;
|
|
678
|
+
(opts: MROpts<'Template', 'get', UA>): MRReturn<'Template', 'get'>;
|
|
679
|
+
(opts: MROpts<'Template', 'create', UA>): MRReturn<'Template', 'create'>;
|
|
680
|
+
(opts: MROpts<'Template', 'upsert', UA>): MRReturn<'Template', 'upsert'>;
|
|
681
|
+
(opts: MROpts<'Template', 'delete', UA>): MRReturn<'Template', 'delete'>;
|
|
682
|
+
(opts: MROpts<'Template', 'publish', UA>): MRReturn<'Template', 'publish'>;
|
|
683
|
+
(opts: MROpts<'Template', 'unpublish', UA>): MRReturn<'Template', 'unpublish'>;
|
|
579
684
|
(opts: MROpts<'UIConfig', 'get', UA>): MRReturn<'UIConfig', 'get'>;
|
|
580
685
|
(opts: MROpts<'UIConfig', 'update', UA>): MRReturn<'UIConfig', 'update'>;
|
|
581
686
|
(opts: MROpts<'Upload', 'get', UA>): MRReturn<'Entry', 'get'>;
|
|
@@ -601,6 +706,13 @@ type MRInternal<UA extends boolean> = {
|
|
|
601
706
|
(opts: MROpts<'ContentSemanticsIndex', 'getManyForEnvironment', UA>): MRReturn<'ContentSemanticsIndex', 'getManyForEnvironment'>;
|
|
602
707
|
(opts: MROpts<'ContentSemanticsIndex', 'create', UA>): MRReturn<'ContentSemanticsIndex', 'create'>;
|
|
603
708
|
(opts: MROpts<'ContentSemanticsIndex', 'delete', UA>): MRReturn<'ContentSemanticsIndex', 'delete'>;
|
|
709
|
+
(opts: MROpts<'Experience', 'getMany', UA>): MRReturn<'Experience', 'getMany'>;
|
|
710
|
+
(opts: MROpts<'Experience', 'get', UA>): MRReturn<'Experience', 'get'>;
|
|
711
|
+
(opts: MROpts<'Experience', 'create', UA>): MRReturn<'Experience', 'create'>;
|
|
712
|
+
(opts: MROpts<'Experience', 'upsert', UA>): MRReturn<'Experience', 'upsert'>;
|
|
713
|
+
(opts: MROpts<'Experience', 'delete', UA>): MRReturn<'Experience', 'delete'>;
|
|
714
|
+
(opts: MROpts<'Experience', 'publish', UA>): MRReturn<'Experience', 'publish'>;
|
|
715
|
+
(opts: MROpts<'Experience', 'unpublish', UA>): MRReturn<'Experience', 'unpublish'>;
|
|
604
716
|
(opts: MROpts<'Webhook', 'get', UA>): MRReturn<'Webhook', 'get'>;
|
|
605
717
|
(opts: MROpts<'Webhook', 'getMany', UA>): MRReturn<'Webhook', 'getMany'>;
|
|
606
718
|
(opts: MROpts<'Webhook', 'getCallDetails', UA>): MRReturn<'Webhook', 'getCallDetails'>;
|
|
@@ -1450,7 +1562,37 @@ export type MRActions = {
|
|
|
1450
1562
|
params: GetSpaceEnvironmentParams & {
|
|
1451
1563
|
query: ComponentTypeQueryOptions;
|
|
1452
1564
|
};
|
|
1453
|
-
return:
|
|
1565
|
+
return: ExoCursorPaginatedCollectionProp<ComponentTypeProps>;
|
|
1566
|
+
};
|
|
1567
|
+
get: {
|
|
1568
|
+
params: GetComponentTypeParams;
|
|
1569
|
+
return: ComponentTypeProps;
|
|
1570
|
+
};
|
|
1571
|
+
create: {
|
|
1572
|
+
params: GetSpaceEnvironmentParams;
|
|
1573
|
+
payload: CreateComponentTypeProps;
|
|
1574
|
+
return: ComponentTypeProps;
|
|
1575
|
+
};
|
|
1576
|
+
upsert: {
|
|
1577
|
+
params: GetComponentTypeParams;
|
|
1578
|
+
payload: UpsertComponentTypeProps;
|
|
1579
|
+
return: ComponentTypeProps;
|
|
1580
|
+
};
|
|
1581
|
+
delete: {
|
|
1582
|
+
params: GetComponentTypeParams;
|
|
1583
|
+
return: void;
|
|
1584
|
+
};
|
|
1585
|
+
publish: {
|
|
1586
|
+
params: GetComponentTypeParams & {
|
|
1587
|
+
version: number;
|
|
1588
|
+
};
|
|
1589
|
+
return: ComponentTypeProps;
|
|
1590
|
+
};
|
|
1591
|
+
unpublish: {
|
|
1592
|
+
params: GetComponentTypeParams & {
|
|
1593
|
+
version: number;
|
|
1594
|
+
};
|
|
1595
|
+
return: ComponentTypeProps;
|
|
1454
1596
|
};
|
|
1455
1597
|
};
|
|
1456
1598
|
Concept: {
|
|
@@ -1584,6 +1726,56 @@ export type MRActions = {
|
|
|
1584
1726
|
return: ContentTypeProps;
|
|
1585
1727
|
};
|
|
1586
1728
|
};
|
|
1729
|
+
DataAssembly: {
|
|
1730
|
+
getMany: {
|
|
1731
|
+
params: GetSpaceEnvironmentParams & {
|
|
1732
|
+
query: DataAssemblyQueryOptions;
|
|
1733
|
+
};
|
|
1734
|
+
return: DataAssemblyCollection;
|
|
1735
|
+
};
|
|
1736
|
+
getManyPublished: {
|
|
1737
|
+
params: GetSpaceEnvironmentParams & {
|
|
1738
|
+
query: DataAssemblyQueryOptions;
|
|
1739
|
+
};
|
|
1740
|
+
return: DataAssemblyCollection;
|
|
1741
|
+
};
|
|
1742
|
+
getPublished: {
|
|
1743
|
+
params: GetDataAssemblyParams;
|
|
1744
|
+
return: DataAssemblyProps;
|
|
1745
|
+
};
|
|
1746
|
+
get: {
|
|
1747
|
+
params: GetDataAssemblyParams;
|
|
1748
|
+
return: DataAssemblyProps;
|
|
1749
|
+
};
|
|
1750
|
+
create: {
|
|
1751
|
+
params: GetSpaceEnvironmentParams;
|
|
1752
|
+
payload: CreateDataAssemblyProps;
|
|
1753
|
+
headers?: RawAxiosRequestHeaders;
|
|
1754
|
+
return: DataAssemblyProps;
|
|
1755
|
+
};
|
|
1756
|
+
update: {
|
|
1757
|
+
params: GetDataAssemblyParams;
|
|
1758
|
+
payload: UpdateDataAssemblyProps;
|
|
1759
|
+
headers?: RawAxiosRequestHeaders;
|
|
1760
|
+
return: DataAssemblyProps;
|
|
1761
|
+
};
|
|
1762
|
+
delete: {
|
|
1763
|
+
params: GetDataAssemblyParams;
|
|
1764
|
+
return: void;
|
|
1765
|
+
};
|
|
1766
|
+
publish: {
|
|
1767
|
+
params: GetDataAssemblyParams & {
|
|
1768
|
+
version: number;
|
|
1769
|
+
};
|
|
1770
|
+
return: DataAssemblyProps;
|
|
1771
|
+
};
|
|
1772
|
+
unpublish: {
|
|
1773
|
+
params: GetDataAssemblyParams & {
|
|
1774
|
+
version: number;
|
|
1775
|
+
};
|
|
1776
|
+
return: DataAssemblyProps;
|
|
1777
|
+
};
|
|
1778
|
+
};
|
|
1587
1779
|
EditorInterface: {
|
|
1588
1780
|
get: {
|
|
1589
1781
|
params: GetEditorInterfaceParams;
|
|
@@ -2432,14 +2624,18 @@ export type MRActions = {
|
|
|
2432
2624
|
};
|
|
2433
2625
|
Space: {
|
|
2434
2626
|
get: {
|
|
2435
|
-
params: GetSpaceParams;
|
|
2436
|
-
return: SpaceProps
|
|
2627
|
+
params: GetSpaceParams & SpaceIncludeParam;
|
|
2628
|
+
return: SpaceProps & {
|
|
2629
|
+
includes?: SpaceIncludes;
|
|
2630
|
+
};
|
|
2437
2631
|
};
|
|
2438
2632
|
getMany: {
|
|
2439
2633
|
params: QueryParams & {
|
|
2440
2634
|
organizationId?: string;
|
|
2635
|
+
} & SpaceIncludeParam;
|
|
2636
|
+
return: (CollectionProp<SpaceProps> | CursorPaginatedCollectionProp<SpaceProps>) & {
|
|
2637
|
+
includes?: SpaceIncludes;
|
|
2441
2638
|
};
|
|
2442
|
-
return: CollectionProp<SpaceProps> | CursorPaginatedCollectionProp<SpaceProps>;
|
|
2443
2639
|
};
|
|
2444
2640
|
getManyForOrganization: {
|
|
2445
2641
|
params: GetOrganizationParams & QueryParams;
|
|
@@ -2690,6 +2886,82 @@ export type MRActions = {
|
|
|
2690
2886
|
return: any;
|
|
2691
2887
|
};
|
|
2692
2888
|
};
|
|
2889
|
+
Fragment: {
|
|
2890
|
+
getMany: {
|
|
2891
|
+
params: GetSpaceEnvironmentParams & {
|
|
2892
|
+
query: FragmentQueryOptions;
|
|
2893
|
+
};
|
|
2894
|
+
return: ExoCursorPaginatedCollectionProp<FragmentProps>;
|
|
2895
|
+
};
|
|
2896
|
+
get: {
|
|
2897
|
+
params: GetFragmentParams;
|
|
2898
|
+
return: FragmentProps;
|
|
2899
|
+
};
|
|
2900
|
+
create: {
|
|
2901
|
+
params: GetSpaceEnvironmentParams;
|
|
2902
|
+
payload: CreateFragmentProps;
|
|
2903
|
+
return: FragmentProps;
|
|
2904
|
+
};
|
|
2905
|
+
update: {
|
|
2906
|
+
params: GetFragmentParams;
|
|
2907
|
+
payload: UpdateFragmentProps;
|
|
2908
|
+
return: FragmentProps;
|
|
2909
|
+
};
|
|
2910
|
+
delete: {
|
|
2911
|
+
params: GetFragmentParams;
|
|
2912
|
+
return: void;
|
|
2913
|
+
};
|
|
2914
|
+
publish: {
|
|
2915
|
+
params: GetFragmentParams & {
|
|
2916
|
+
version: number;
|
|
2917
|
+
};
|
|
2918
|
+
return: FragmentProps;
|
|
2919
|
+
};
|
|
2920
|
+
unpublish: {
|
|
2921
|
+
params: GetFragmentParams & {
|
|
2922
|
+
version: number;
|
|
2923
|
+
};
|
|
2924
|
+
return: FragmentProps;
|
|
2925
|
+
};
|
|
2926
|
+
};
|
|
2927
|
+
Template: {
|
|
2928
|
+
getMany: {
|
|
2929
|
+
params: GetSpaceEnvironmentParams & {
|
|
2930
|
+
query: TemplateQueryOptions;
|
|
2931
|
+
};
|
|
2932
|
+
return: ExoCursorPaginatedCollectionProp<TemplateProps>;
|
|
2933
|
+
};
|
|
2934
|
+
get: {
|
|
2935
|
+
params: GetTemplateParams;
|
|
2936
|
+
return: TemplateProps;
|
|
2937
|
+
};
|
|
2938
|
+
create: {
|
|
2939
|
+
params: GetSpaceEnvironmentParams;
|
|
2940
|
+
payload: CreateTemplateProps;
|
|
2941
|
+
return: TemplateProps;
|
|
2942
|
+
};
|
|
2943
|
+
upsert: {
|
|
2944
|
+
params: GetTemplateParams;
|
|
2945
|
+
payload: UpsertTemplateProps;
|
|
2946
|
+
return: TemplateProps;
|
|
2947
|
+
};
|
|
2948
|
+
delete: {
|
|
2949
|
+
params: GetTemplateParams;
|
|
2950
|
+
return: void;
|
|
2951
|
+
};
|
|
2952
|
+
publish: {
|
|
2953
|
+
params: GetTemplateParams & {
|
|
2954
|
+
version: number;
|
|
2955
|
+
};
|
|
2956
|
+
return: TemplateProps;
|
|
2957
|
+
};
|
|
2958
|
+
unpublish: {
|
|
2959
|
+
params: GetTemplateParams & {
|
|
2960
|
+
version: number;
|
|
2961
|
+
};
|
|
2962
|
+
return: TemplateProps;
|
|
2963
|
+
};
|
|
2964
|
+
};
|
|
2693
2965
|
UIConfig: {
|
|
2694
2966
|
get: {
|
|
2695
2967
|
params: GetUIConfigParams;
|
|
@@ -2775,6 +3047,45 @@ export type MRActions = {
|
|
|
2775
3047
|
return: UserUIConfigProps;
|
|
2776
3048
|
};
|
|
2777
3049
|
};
|
|
3050
|
+
Experience: {
|
|
3051
|
+
getMany: {
|
|
3052
|
+
params: GetSpaceEnvironmentParams & {
|
|
3053
|
+
query: ExperienceQueryOptions;
|
|
3054
|
+
};
|
|
3055
|
+
return: ExoCursorPaginatedCollectionProp<ExperienceProps>;
|
|
3056
|
+
};
|
|
3057
|
+
get: {
|
|
3058
|
+
params: GetExperienceParams;
|
|
3059
|
+
return: ExperienceProps;
|
|
3060
|
+
};
|
|
3061
|
+
create: {
|
|
3062
|
+
params: GetSpaceEnvironmentParams;
|
|
3063
|
+
payload: CreateExperienceProps;
|
|
3064
|
+
return: ExperienceProps;
|
|
3065
|
+
};
|
|
3066
|
+
upsert: {
|
|
3067
|
+
params: GetExperienceParams;
|
|
3068
|
+
payload: UpsertExperienceProps;
|
|
3069
|
+
return: ExperienceProps;
|
|
3070
|
+
};
|
|
3071
|
+
delete: {
|
|
3072
|
+
params: GetExperienceParams;
|
|
3073
|
+
return: void;
|
|
3074
|
+
};
|
|
3075
|
+
publish: {
|
|
3076
|
+
params: GetExperienceParams & {
|
|
3077
|
+
version: number;
|
|
3078
|
+
};
|
|
3079
|
+
payload?: ExperienceLocalePublishPayload;
|
|
3080
|
+
return: ExperienceProps;
|
|
3081
|
+
};
|
|
3082
|
+
unpublish: {
|
|
3083
|
+
params: GetExperienceParams & {
|
|
3084
|
+
version: number;
|
|
3085
|
+
};
|
|
3086
|
+
return: ExperienceProps;
|
|
3087
|
+
};
|
|
3088
|
+
};
|
|
2778
3089
|
Webhook: {
|
|
2779
3090
|
get: {
|
|
2780
3091
|
params: GetWebhookParams;
|
|
@@ -3018,6 +3329,26 @@ export type GetCommentParams = (GetEntryParams | GetCommentParentEntityParams) &
|
|
|
3018
3329
|
commentId: string;
|
|
3019
3330
|
};
|
|
3020
3331
|
/** @internal */
|
|
3332
|
+
export type GetComponentTypeParams = GetSpaceEnvironmentParams & {
|
|
3333
|
+
componentTypeId: string;
|
|
3334
|
+
};
|
|
3335
|
+
/** @internal */
|
|
3336
|
+
export type GetExperienceParams = GetSpaceEnvironmentParams & {
|
|
3337
|
+
experienceId: string;
|
|
3338
|
+
};
|
|
3339
|
+
/** @internal */
|
|
3340
|
+
export type GetDataAssemblyParams = GetSpaceEnvironmentParams & {
|
|
3341
|
+
dataAssemblyId: string;
|
|
3342
|
+
};
|
|
3343
|
+
/** @internal */
|
|
3344
|
+
export type GetFragmentParams = GetSpaceEnvironmentParams & {
|
|
3345
|
+
fragmentId: string;
|
|
3346
|
+
};
|
|
3347
|
+
/** @internal */
|
|
3348
|
+
export type GetTemplateParams = GetSpaceEnvironmentParams & {
|
|
3349
|
+
templateId: string;
|
|
3350
|
+
};
|
|
3351
|
+
/** @internal */
|
|
3021
3352
|
export type GetContentTypeParams = GetSpaceEnvironmentParams & {
|
|
3022
3353
|
contentTypeId: string;
|
|
3023
3354
|
};
|
|
@@ -3307,9 +3638,7 @@ export type PaginationQueryParams = {
|
|
|
3307
3638
|
};
|
|
3308
3639
|
/** @internal */
|
|
3309
3640
|
export type CursorPaginationXORParams = {
|
|
3310
|
-
query?:
|
|
3311
|
-
limit?: number;
|
|
3312
|
-
};
|
|
3641
|
+
query?: CursorPaginationParams;
|
|
3313
3642
|
};
|
|
3314
3643
|
/** @internal */
|
|
3315
3644
|
export type CursorBasedParams = CursorPaginationXORParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-types.js","sources":["../../lib/common-types.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common-types.js","sources":["../../lib/common-types.ts"],"sourcesContent":[null],"names":[],"mappings":"AA6wGA;IACY;AAAZ,CAAA,UAAY,+BAA+B,EAAA;AACzC,IAAA,+BAAA,CAAA,4BAAA,CAAA,GAAA,uDAAoF;AACtF,CAAC,EAFW,+BAA+B,KAA/B,+BAA+B,GAAA,EAAA,CAAA,CAAA;;;;"}
|
|
@@ -2,7 +2,7 @@ import type { Collection, MakeRequest, PaginationQueryParams, QueryOptions, Quer
|
|
|
2
2
|
import type { CreateOAuthApplicationProps, OAuthApplication, OAuthApplicationProps } from './entities/oauth-application';
|
|
3
3
|
import type { Organization, OrganizationProps } from './entities/organization';
|
|
4
4
|
import type { CreatePersonalAccessTokenProps } from './entities/personal-access-token';
|
|
5
|
-
import type { Space, SpaceProps } from './entities/space';
|
|
5
|
+
import type { Space, SpaceIncludeParam, SpaceProps } from './entities/space';
|
|
6
6
|
import type { AppDefinition } from './entities/app-definition';
|
|
7
7
|
import type { UsageQuery } from './entities/usage';
|
|
8
8
|
import type { UserProps } from './entities/user';
|
|
@@ -104,10 +104,10 @@ export default function createClientApi(makeRequest: MakeRequest): {
|
|
|
104
104
|
getSpaces: {
|
|
105
105
|
(query?: QueryOptions & {
|
|
106
106
|
cursor?: false;
|
|
107
|
-
}, organizationId?: string): Promise<Collection<Space, SpaceProps>>;
|
|
107
|
+
} & SpaceIncludeParam, organizationId?: string): Promise<Collection<Space, SpaceProps>>;
|
|
108
108
|
(query: BasicCursorPaginationOptions & {
|
|
109
109
|
cursor: true;
|
|
110
|
-
}, organizationId?: string): Promise<CursorPaginatedCollection<Space, SpaceProps>>;
|
|
110
|
+
} & SpaceIncludeParam, organizationId?: string): Promise<CursorPaginatedCollection<Space, SpaceProps>>;
|
|
111
111
|
};
|
|
112
112
|
/**
|
|
113
113
|
* Gets a space
|
|
@@ -125,7 +125,7 @@ export default function createClientApi(makeRequest: MakeRequest): {
|
|
|
125
125
|
* .catch(console.error)
|
|
126
126
|
* ```
|
|
127
127
|
*/
|
|
128
|
-
getSpace: (spaceId: string) => Promise<Space>;
|
|
128
|
+
getSpace: (spaceId: string, { include }?: SpaceIncludeParam) => Promise<Space>;
|
|
129
129
|
/**
|
|
130
130
|
* Creates a space
|
|
131
131
|
* @param spaceData - Object representation of the Space to be created
|
|
@@ -113,14 +113,18 @@ function createClientApi(makeRequest) {
|
|
|
113
113
|
* ```
|
|
114
114
|
*/
|
|
115
115
|
getSpaces: function getSpaces(query = {}, organizationId) {
|
|
116
|
-
const { cursor, ...rest } = query;
|
|
116
|
+
const { cursor, include, ...rest } = query;
|
|
117
117
|
const normalizedQuery = cursor
|
|
118
118
|
? normalizeCursorPaginationParameters(rest)
|
|
119
119
|
: rest;
|
|
120
120
|
return makeRequest({
|
|
121
121
|
entityType: 'Space',
|
|
122
122
|
action: 'getMany',
|
|
123
|
-
params: {
|
|
123
|
+
params: {
|
|
124
|
+
query: createRequestConfig({ query: normalizedQuery }).params,
|
|
125
|
+
organizationId,
|
|
126
|
+
include,
|
|
127
|
+
},
|
|
124
128
|
}).then((data) =>
|
|
125
129
|
// makeRequest returns the union type; cursor determines which branch is present at runtime so the casts are required
|
|
126
130
|
cursor
|
|
@@ -143,11 +147,11 @@ function createClientApi(makeRequest) {
|
|
|
143
147
|
* .catch(console.error)
|
|
144
148
|
* ```
|
|
145
149
|
*/
|
|
146
|
-
getSpace: function getSpace(spaceId) {
|
|
150
|
+
getSpace: function getSpace(spaceId, { include } = {}) {
|
|
147
151
|
return makeRequest({
|
|
148
152
|
entityType: 'Space',
|
|
149
153
|
action: 'get',
|
|
150
|
-
params: { spaceId },
|
|
154
|
+
params: { spaceId, include },
|
|
151
155
|
}).then((data) => wrapSpace(makeRequest, data));
|
|
152
156
|
},
|
|
153
157
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-contentful-api.js","sources":["../../lib/create-contentful-api.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAgEA;;AAEG;AACW,SAAU,eAAe,CAAC,WAAwB,EAAA;IAC9D,OAAO;AACL;;;;;;;;;;;;;;;AAeG;AACH,QAAA,uBAAuB,EAAE,SAAS,uBAAuB,CACvD,cAAsB,EACtB,QAA0F,EAAE,EAAA;AAE5F,YAAA,OAAO,WAAW,CAAC;AACjB,gBAAA,UAAU,EAAE,qBAAqB;AACjC,gBAAA,MAAM,EAAE,SAAS;AACjB,gBAAA,MAAM,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,mBAAmB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;AACzE,aAAA,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,iCAAiC,CAAC,WAAW,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACzF,CAAC;AACD;;;;;;;;;;;;;;;;;;;;;AAqBG;AACH,QAAA,sBAAsB,EAAE,SAAS,sBAAsB,CAAC,EACtD,cAAc,EACd,qBAAqB,EACrB,OAAO,EACP,KAAK,GAAG,EAAE,GAIX,EAAA;AACC,YAAA,OAAO,WAAW,CAAC;AACjB,gBAAA,UAAU,EAAE,qBAAqB;AACjC,gBAAA,MAAM,EAAE,KAAK;AACb,gBAAA,MAAM,EAAE;oBACN,cAAc;oBACd,qBAAqB;oBACr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