contentful-management 12.5.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 +1070 -737
- 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 +1062 -729
- 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/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/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/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 +330 -5
- package/dist/types/common-types.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/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/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
|
@@ -16,7 +16,10 @@ import type { AssetKeyProps, CreateAssetKeyProps } 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';
|
|
@@ -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;
|
|
@@ -2694,6 +2886,82 @@ export type MRActions = {
|
|
|
2694
2886
|
return: any;
|
|
2695
2887
|
};
|
|
2696
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
|
+
};
|
|
2697
2965
|
UIConfig: {
|
|
2698
2966
|
get: {
|
|
2699
2967
|
params: GetUIConfigParams;
|
|
@@ -2779,6 +3047,45 @@ export type MRActions = {
|
|
|
2779
3047
|
return: UserUIConfigProps;
|
|
2780
3048
|
};
|
|
2781
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
|
+
};
|
|
2782
3089
|
Webhook: {
|
|
2783
3090
|
get: {
|
|
2784
3091
|
params: GetWebhookParams;
|
|
@@ -3022,6 +3329,26 @@ export type GetCommentParams = (GetEntryParams | GetCommentParentEntityParams) &
|
|
|
3022
3329
|
commentId: string;
|
|
3023
3330
|
};
|
|
3024
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 */
|
|
3025
3352
|
export type GetContentTypeParams = GetSpaceEnvironmentParams & {
|
|
3026
3353
|
contentTypeId: string;
|
|
3027
3354
|
};
|
|
@@ -3311,9 +3638,7 @@ export type PaginationQueryParams = {
|
|
|
3311
3638
|
};
|
|
3312
3639
|
/** @internal */
|
|
3313
3640
|
export type CursorPaginationXORParams = {
|
|
3314
|
-
query?:
|
|
3315
|
-
limit?: number;
|
|
3316
|
-
};
|
|
3641
|
+
query?: CursorPaginationParams;
|
|
3317
3642
|
};
|
|
3318
3643
|
/** @internal */
|
|
3319
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;;;;"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
limit?: number;
|
|
1
|
+
import type { Except } from 'type-fest';
|
|
2
|
+
import type { CursorPaginationParams, ExoCursorPaginatedCollectionProp, ExoMetadataProps, ExoQueryFilters, Link, ResourceLink } from '../common-types';
|
|
3
|
+
export type ComponentTypeQueryOptions = CursorPaginationParams & ExoQueryFilters & {
|
|
4
|
+
order?: string;
|
|
6
5
|
};
|
|
7
6
|
export type ComponentTypeViewport = {
|
|
8
7
|
id: string;
|
|
@@ -10,76 +9,109 @@ export type ComponentTypeViewport = {
|
|
|
10
9
|
displayName: string;
|
|
11
10
|
previewSize: string;
|
|
12
11
|
};
|
|
13
|
-
export type
|
|
12
|
+
export type ComponentTypePrimitiveContentProperty = {
|
|
14
13
|
id: string;
|
|
15
14
|
name: string;
|
|
16
|
-
type:
|
|
15
|
+
type: 'String' | 'Number' | 'Boolean';
|
|
17
16
|
required: boolean;
|
|
18
17
|
defaultValue?: unknown;
|
|
19
18
|
};
|
|
19
|
+
export type ComponentTypeTypeRefContentProperty = {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
type: 'TypeRef';
|
|
23
|
+
ref: ResourceLink<'Contentful:DataAssembly'> | ResourceLink<'Contentful:ComponentType'>;
|
|
24
|
+
required: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type ComponentTypeContentProperty = ComponentTypePrimitiveContentProperty | ComponentTypeTypeRefContentProperty;
|
|
20
27
|
export type ComponentTypeDesignPropertyValidation = {
|
|
28
|
+
type: 'ManualDesignValue';
|
|
21
29
|
value: string | number | boolean;
|
|
22
|
-
name
|
|
23
|
-
|
|
30
|
+
name?: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'DesignToken';
|
|
33
|
+
value: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
};
|
|
36
|
+
export type StringDesignPropertyRegexpValidation = {
|
|
37
|
+
regexp: {
|
|
38
|
+
pattern: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export type DesignTokenAllowedResource = {
|
|
42
|
+
type: 'DesignToken';
|
|
43
|
+
value: string;
|
|
44
|
+
name?: string;
|
|
24
45
|
};
|
|
25
|
-
export type
|
|
46
|
+
export type DTCGDesignPropertyType = 'DTCG.Color' | 'DTCG.Dimension' | 'DTCG.FontFamily' | 'DTCG.FontWeight' | 'DTCG.Duration' | 'DTCG.CubicBezier' | 'DTCG.Number' | 'DTCG.StrokeStyle' | 'DTCG.Border' | 'DTCG.Transition' | 'DTCG.Shadow' | 'DTCG.Gradient' | 'DTCG.Typography';
|
|
47
|
+
type DesignPropertyCommonFields = {
|
|
26
48
|
id: string;
|
|
27
49
|
name: string;
|
|
28
|
-
type: string;
|
|
29
50
|
required: boolean;
|
|
30
51
|
description?: string;
|
|
31
|
-
|
|
52
|
+
};
|
|
53
|
+
export type LegacyDesignProperty = DesignPropertyCommonFields & {
|
|
54
|
+
type: 'Symbol' | 'Number' | 'Boolean';
|
|
55
|
+
defaultValue?: DesignPropertyDefinitionValue;
|
|
32
56
|
validations?: {
|
|
33
|
-
in
|
|
57
|
+
in?: ComponentTypeDesignPropertyValidation[];
|
|
34
58
|
};
|
|
35
|
-
designTokenSet?: string[];
|
|
36
59
|
};
|
|
60
|
+
export type StringDesignProperty = DesignPropertyCommonFields & {
|
|
61
|
+
type: 'String';
|
|
62
|
+
defaultValue?: {
|
|
63
|
+
type: 'ManualDesignValue';
|
|
64
|
+
value: string;
|
|
65
|
+
};
|
|
66
|
+
validations?: StringDesignPropertyRegexpValidation[];
|
|
67
|
+
};
|
|
68
|
+
export type TokenBackedDesignProperty = DesignPropertyCommonFields & {
|
|
69
|
+
type: DTCGDesignPropertyType;
|
|
70
|
+
defaultValue?: DesignTokenValue;
|
|
71
|
+
allowedResources?: DesignTokenAllowedResource[];
|
|
72
|
+
};
|
|
73
|
+
export type ComponentTypeDesignProperty = LegacyDesignProperty | StringDesignProperty | TokenBackedDesignProperty;
|
|
37
74
|
export type ComponentTypeDimensionKeyMap = {
|
|
38
75
|
designProperties: Record<string, Record<string, string>>;
|
|
39
76
|
};
|
|
40
|
-
export type ContentPropertyPointerValue = `$contentProperties/${string}
|
|
77
|
+
export type ContentPropertyPointerValue = `$contentProperties/${string}`;
|
|
41
78
|
export type DesignPropertyPointerValue = `$designProperties/${string}`;
|
|
42
79
|
export type ManualDesignValue = {
|
|
43
80
|
type: 'ManualDesignValue';
|
|
44
|
-
value: string | number | boolean
|
|
81
|
+
value: string | number | boolean;
|
|
45
82
|
};
|
|
46
83
|
export type DesignTokenValue = {
|
|
47
|
-
type: '
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
84
|
+
type: 'DesignToken';
|
|
85
|
+
/** Must be non-empty (min length 1) */
|
|
86
|
+
value: string;
|
|
87
|
+
};
|
|
88
|
+
export type DesignPropertyDefinitionValue = ManualDesignValue | DesignTokenValue;
|
|
89
|
+
export type DesignPropertyValue = ManualDesignValue | DesignTokenValue;
|
|
90
|
+
export type DimensionedDesignPropertyValue = Record<string, DesignPropertyValue>;
|
|
91
|
+
export type ComponentTreeDesignPropertyValue = DesignPropertyValue | DesignPropertyPointerValue | DimensionedDesignPropertyValue;
|
|
51
92
|
export type ComponentNode = {
|
|
52
93
|
id: string;
|
|
94
|
+
name?: string;
|
|
53
95
|
nodeType: 'Component';
|
|
54
96
|
componentTypeId: string;
|
|
55
|
-
contentProperties: Record<string, ContentPropertyPointerValue | unknown
|
|
56
|
-
designProperties: Record<string,
|
|
97
|
+
contentProperties: Record<string, ContentPropertyPointerValue | unknown> | string;
|
|
98
|
+
designProperties: Record<string, ComponentTreeDesignPropertyValue>;
|
|
57
99
|
slots: Record<string, TreeNode[]>;
|
|
58
100
|
contentBindings?: string;
|
|
59
101
|
};
|
|
60
|
-
export type
|
|
102
|
+
export type FragmentNode = {
|
|
61
103
|
id: string;
|
|
62
|
-
|
|
63
|
-
|
|
104
|
+
name?: string;
|
|
105
|
+
nodeType: 'Fragment';
|
|
106
|
+
fragmentId: string;
|
|
64
107
|
};
|
|
65
108
|
export type SlotNode = {
|
|
66
109
|
id: string;
|
|
67
110
|
nodeType: 'Slot';
|
|
68
111
|
slotId: string;
|
|
69
112
|
};
|
|
70
|
-
export type TreeNode = ComponentNode |
|
|
71
|
-
export type ComponentTypeDataTypeField = {
|
|
72
|
-
id: string;
|
|
73
|
-
name: string;
|
|
74
|
-
type: string;
|
|
75
|
-
required: boolean;
|
|
76
|
-
source?: string;
|
|
77
|
-
};
|
|
113
|
+
export type TreeNode = ComponentNode | FragmentNode | SlotNode;
|
|
78
114
|
export type DataAssemblyLink = Link<'DataAssembly'>;
|
|
79
|
-
export type ComponentTypeContentBindings = DataAssemblyLink['sys'] & {
|
|
80
|
-
required: boolean;
|
|
81
|
-
dataType: ComponentTypeDataTypeField[];
|
|
82
|
-
};
|
|
83
115
|
export type ComponentTypeSlotDefinition = {
|
|
84
116
|
id: string;
|
|
85
117
|
name: string;
|
|
@@ -91,8 +123,8 @@ export type ComponentTypeSys = {
|
|
|
91
123
|
id: string;
|
|
92
124
|
type: 'ComponentType';
|
|
93
125
|
version: number;
|
|
94
|
-
space:
|
|
95
|
-
environment:
|
|
126
|
+
space: Link<'Space'>;
|
|
127
|
+
environment: Link<'Environment'>;
|
|
96
128
|
fieldStatus?: Record<string, Record<string, 'draft' | 'published' | 'changed'>>;
|
|
97
129
|
publishedAt?: string;
|
|
98
130
|
publishedVersion?: number;
|
|
@@ -100,10 +132,12 @@ export type ComponentTypeSys = {
|
|
|
100
132
|
firstPublishedAt?: string;
|
|
101
133
|
publishedBy?: Link<'User'> | Link<'AppDefinition'>;
|
|
102
134
|
variant?: string;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
135
|
+
variantType?: string;
|
|
136
|
+
variantDimension?: string;
|
|
137
|
+
createdAt: string;
|
|
138
|
+
createdBy: Link<'User'>;
|
|
139
|
+
updatedAt: string;
|
|
140
|
+
updatedBy: Link<'User'>;
|
|
107
141
|
};
|
|
108
142
|
export type ComponentTypeProps = {
|
|
109
143
|
sys: ComponentTypeSys;
|
|
@@ -114,8 +148,18 @@ export type ComponentTypeProps = {
|
|
|
114
148
|
designProperties: ComponentTypeDesignProperty[];
|
|
115
149
|
dimensionKeyMap: ComponentTypeDimensionKeyMap;
|
|
116
150
|
componentTree?: TreeNode[];
|
|
117
|
-
contentBindings?: ComponentTypeContentBindings;
|
|
118
151
|
slots?: ComponentTypeSlotDefinition[];
|
|
119
|
-
metadata?:
|
|
152
|
+
metadata?: ExoMetadataProps;
|
|
120
153
|
dataAssemblies?: DataAssemblyLink[];
|
|
154
|
+
source?: ResourceLink<'Contentful:DesignSystemSource'>;
|
|
155
|
+
};
|
|
156
|
+
export type CreateComponentTypeProps = Except<ComponentTypeProps, 'sys'>;
|
|
157
|
+
export type UpsertComponentTypeProps = Except<ComponentTypeProps, 'sys'> & {
|
|
158
|
+
sys: {
|
|
159
|
+
id: string;
|
|
160
|
+
type: 'ComponentType';
|
|
161
|
+
version?: number;
|
|
162
|
+
};
|
|
121
163
|
};
|
|
164
|
+
export type ComponentTypeCollection = ExoCursorPaginatedCollectionProp<ComponentTypeProps>;
|
|
165
|
+
export {};
|