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
|
@@ -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 {};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { CursorPaginationParams, ExoCursorPaginatedCollectionProp, Link, MetadataProps, ResourceLink } from '../common-types';
|
|
2
|
+
export type DataAssemblyPrimitiveDataTypeField = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
required: boolean;
|
|
7
|
+
source?: string;
|
|
8
|
+
};
|
|
9
|
+
export type DataAssemblyTypeRefDataTypeField = {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
type: 'TypeRef';
|
|
13
|
+
ref: ResourceLink<'Contentful:DataAssembly'>;
|
|
14
|
+
required: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type DataAssemblyDataTypeField = DataAssemblyPrimitiveDataTypeField | DataAssemblyTypeRefDataTypeField;
|
|
17
|
+
export type DataAssemblyLinkParameter = {
|
|
18
|
+
name?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
type: 'Link';
|
|
21
|
+
linkType: string;
|
|
22
|
+
allowedContentTypes: string[];
|
|
23
|
+
};
|
|
24
|
+
export type DataAssemblyResourceLinkParameter = {
|
|
25
|
+
name?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
type: 'ResourceLink';
|
|
28
|
+
linkType: string;
|
|
29
|
+
allowedResources: Array<{
|
|
30
|
+
type: string;
|
|
31
|
+
source: string;
|
|
32
|
+
allowedTypes: string[];
|
|
33
|
+
}>;
|
|
34
|
+
};
|
|
35
|
+
export type DataAssemblyParameterConfig = Record<string, DataAssemblyLinkParameter | DataAssemblyResourceLinkParameter>;
|
|
36
|
+
export type DataAssemblyGraphQLResolver = {
|
|
37
|
+
source: 'Contentful:GraphQL';
|
|
38
|
+
query: string;
|
|
39
|
+
parameters?: Record<string, unknown>;
|
|
40
|
+
};
|
|
41
|
+
export type DataAssemblyNestedResolver = {
|
|
42
|
+
source: 'Contentful:DataAssembly';
|
|
43
|
+
dataAssembly: ResourceLink<'Contentful:DataAssembly'>;
|
|
44
|
+
parameters?: Record<string, unknown>;
|
|
45
|
+
};
|
|
46
|
+
export type DataAssemblyResolverDefinition = DataAssemblyGraphQLResolver | DataAssemblyNestedResolver;
|
|
47
|
+
export type DataAssemblyResolverConfig = Record<string, DataAssemblyResolverDefinition>;
|
|
48
|
+
export type DataAssemblyReturnMappingSelectValue = string | {
|
|
49
|
+
$on: {
|
|
50
|
+
type: Record<string, DataAssemblyReturnMappingSelectValue>;
|
|
51
|
+
default?: DataAssemblyReturnMappingSelectValue;
|
|
52
|
+
};
|
|
53
|
+
} | {
|
|
54
|
+
[key: string]: DataAssemblyReturnMappingSelectValue;
|
|
55
|
+
};
|
|
56
|
+
export type DataAssemblyReturnMappingFromObject = {
|
|
57
|
+
$from: {
|
|
58
|
+
source: string;
|
|
59
|
+
select?: DataAssemblyReturnMappingSelectValue;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export type DataAssemblyReturnMappingValue = string | DataAssemblyReturnMappingFromObject | {
|
|
63
|
+
[key: string]: DataAssemblyReturnMappingValue;
|
|
64
|
+
};
|
|
65
|
+
export type DataAssemblyReturnMappingConfig = Record<string, DataAssemblyReturnMappingValue>;
|
|
66
|
+
export type DataAssemblySys = {
|
|
67
|
+
id: string;
|
|
68
|
+
type: 'DataAssembly';
|
|
69
|
+
dataType: DataAssemblyDataTypeField[];
|
|
70
|
+
version: number;
|
|
71
|
+
space: Link<'Space'>;
|
|
72
|
+
environment: Link<'Environment'>;
|
|
73
|
+
createdBy: Link<'User'>;
|
|
74
|
+
createdAt: string | Date;
|
|
75
|
+
updatedAt: string | Date;
|
|
76
|
+
updatedBy?: Link<'User'>;
|
|
77
|
+
publishedAt?: string | Date;
|
|
78
|
+
publishedVersion?: number;
|
|
79
|
+
publishedCounter?: number;
|
|
80
|
+
firstPublishedAt?: string | Date;
|
|
81
|
+
publishedBy?: Link<'User'> | Link<'AppDefinition'>;
|
|
82
|
+
variant?: string;
|
|
83
|
+
};
|
|
84
|
+
type DataAssemblyCommonProps = {
|
|
85
|
+
metadata: Pick<MetadataProps, 'tags'>;
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
parameters: DataAssemblyParameterConfig;
|
|
89
|
+
resolvers: DataAssemblyResolverConfig;
|
|
90
|
+
return: DataAssemblyReturnMappingConfig;
|
|
91
|
+
};
|
|
92
|
+
export type DataAssemblyProps = DataAssemblyCommonProps & {
|
|
93
|
+
sys: DataAssemblySys;
|
|
94
|
+
};
|
|
95
|
+
export type CreateDataAssemblyProps = DataAssemblyCommonProps & {
|
|
96
|
+
sys: {
|
|
97
|
+
type: 'DataAssembly';
|
|
98
|
+
variant?: string;
|
|
99
|
+
dataType: DataAssemblyDataTypeField[];
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export type UpdateDataAssemblyProps = DataAssemblyCommonProps & {
|
|
103
|
+
sys: {
|
|
104
|
+
id: string;
|
|
105
|
+
type: 'DataAssembly';
|
|
106
|
+
variant?: string;
|
|
107
|
+
version: number;
|
|
108
|
+
dataType: DataAssemblyDataTypeField[];
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export type DataAssemblyQueryOptions = CursorPaginationParams & {
|
|
112
|
+
'sys.id[in]'?: string;
|
|
113
|
+
};
|
|
114
|
+
export type DataAssemblyCollection = ExoCursorPaginatedCollectionProp<DataAssemblyProps> & {
|
|
115
|
+
errors?: {
|
|
116
|
+
notFoundIds: string[];
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { CursorPaginationParams, ExoCursorPaginatedCollectionProp, ExperienceMetadataProps, ExoQueryFilters, Link } from '../common-types';
|
|
2
|
+
import type { ComponentTypeViewport, DimensionedDesignPropertyValue, FragmentNode } from './component-type';
|
|
3
|
+
export type ExperienceDimensionKeyMap = {
|
|
4
|
+
designProperties: Record<string, {
|
|
5
|
+
breakpoint: string;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
8
|
+
export type ExperienceContentBindings = {
|
|
9
|
+
sys: {
|
|
10
|
+
type: 'Link';
|
|
11
|
+
id: string;
|
|
12
|
+
linkType: 'DataAssembly';
|
|
13
|
+
};
|
|
14
|
+
parameters: Record<string, Link<string>>;
|
|
15
|
+
};
|
|
16
|
+
export type ExperienceSys = {
|
|
17
|
+
id: string;
|
|
18
|
+
type: 'Experience';
|
|
19
|
+
version: number;
|
|
20
|
+
space: Link<'Space'>;
|
|
21
|
+
environment: Link<'Environment'>;
|
|
22
|
+
template?: Link<'Template'>;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
createdBy: Link<'User'>;
|
|
26
|
+
updatedBy: Link<'User'>;
|
|
27
|
+
archivedAt?: string;
|
|
28
|
+
archivedBy?: Link<'User'>;
|
|
29
|
+
archivedVersion?: number;
|
|
30
|
+
variant?: string;
|
|
31
|
+
variantType?: string;
|
|
32
|
+
variantDimension?: string;
|
|
33
|
+
publishedAt?: string;
|
|
34
|
+
publishedVersion?: number;
|
|
35
|
+
publishedCounter?: number;
|
|
36
|
+
firstPublishedAt?: string;
|
|
37
|
+
publishedBy?: Link<'User'> | Link<'AppDefinition'>;
|
|
38
|
+
localeStatus?: Record<string, 'draft' | 'published' | 'changed'>;
|
|
39
|
+
};
|
|
40
|
+
type ExperienceCommonProps = {
|
|
41
|
+
name: string;
|
|
42
|
+
description: string;
|
|
43
|
+
viewports: ComponentTypeViewport[];
|
|
44
|
+
contentProperties: Record<string, unknown>;
|
|
45
|
+
designProperties: Record<string, DimensionedDesignPropertyValue>;
|
|
46
|
+
dimensionKeyMap: ExperienceDimensionKeyMap;
|
|
47
|
+
contentBindings?: ExperienceContentBindings;
|
|
48
|
+
metadata?: ExperienceMetadataProps;
|
|
49
|
+
slots?: Record<string, Array<FragmentNode | InlineFragmentNode>>;
|
|
50
|
+
};
|
|
51
|
+
export type ExperienceProps = ExperienceCommonProps & {
|
|
52
|
+
sys: ExperienceSys;
|
|
53
|
+
};
|
|
54
|
+
export type ExperienceQueryOptions = CursorPaginationParams & ExoQueryFilters & {
|
|
55
|
+
order?: string;
|
|
56
|
+
};
|
|
57
|
+
export type ExperienceLocalePublishPayload = {
|
|
58
|
+
add: string[];
|
|
59
|
+
} | {
|
|
60
|
+
remove: string[];
|
|
61
|
+
};
|
|
62
|
+
export type CreateExperienceProps = ExperienceCommonProps & {
|
|
63
|
+
template: Link<'Template'>;
|
|
64
|
+
};
|
|
65
|
+
export type UpsertExperienceProps = ExperienceCommonProps & {
|
|
66
|
+
sys: {
|
|
67
|
+
id: string;
|
|
68
|
+
type: 'Experience';
|
|
69
|
+
version?: number;
|
|
70
|
+
};
|
|
71
|
+
template?: Link<'Template'>;
|
|
72
|
+
};
|
|
73
|
+
export type InlineFragmentNode = {
|
|
74
|
+
id: string;
|
|
75
|
+
nodeType: 'InlineFragment';
|
|
76
|
+
componentTypeId: string;
|
|
77
|
+
designProperties: Record<string, DimensionedDesignPropertyValue>;
|
|
78
|
+
contentBindings?: ExperienceContentBindings;
|
|
79
|
+
slots?: Record<string, Array<FragmentNode | InlineFragmentNode>>;
|
|
80
|
+
};
|
|
81
|
+
export type ExperienceCollection = ExoCursorPaginatedCollectionProp<ExperienceProps>;
|
|
82
|
+
export type ReleaseExperienceSys = Omit<ExperienceSys, 'variant' | 'variantType' | 'variantDimension'> & {
|
|
83
|
+
release: Link<'Release'>;
|
|
84
|
+
};
|
|
85
|
+
export type ReleaseExperience = Omit<ExperienceProps, 'sys'> & {
|
|
86
|
+
sys: ReleaseExperienceSys;
|
|
87
|
+
};
|
|
88
|
+
export type ReleaseExperienceCollection = ExoCursorPaginatedCollectionProp<ReleaseExperience>;
|
|
89
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Except } from 'type-fest';
|
|
2
|
+
import type { CursorPaginationParams, ExoCursorPaginatedCollectionProp, ExoQueryFilters, ExperienceMetadataProps, Link } from '../common-types';
|
|
3
|
+
import type { ComponentTypeViewport, DimensionedDesignPropertyValue, FragmentNode } from './component-type';
|
|
4
|
+
import type { ExperienceContentBindings, ExperienceDimensionKeyMap, InlineFragmentNode } from './experience';
|
|
5
|
+
export type FragmentSys = {
|
|
6
|
+
id: string;
|
|
7
|
+
type: 'Fragment';
|
|
8
|
+
version: number;
|
|
9
|
+
space: Link<'Space'>;
|
|
10
|
+
environment: Link<'Environment'>;
|
|
11
|
+
componentType: Link<'ComponentType'>;
|
|
12
|
+
archivedAt?: string;
|
|
13
|
+
archivedBy?: Link<'User'>;
|
|
14
|
+
archivedVersion?: number;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
createdBy: Link<'User'>;
|
|
18
|
+
updatedBy: Link<'User'>;
|
|
19
|
+
variant?: string;
|
|
20
|
+
variantType?: string;
|
|
21
|
+
variantDimension?: string;
|
|
22
|
+
publishedAt?: string;
|
|
23
|
+
publishedVersion?: number;
|
|
24
|
+
publishedCounter?: number;
|
|
25
|
+
firstPublishedAt?: string;
|
|
26
|
+
publishedBy?: Link<'User'> | Link<'AppDefinition'>;
|
|
27
|
+
};
|
|
28
|
+
export type FragmentProps = {
|
|
29
|
+
sys: FragmentSys;
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
viewports: ComponentTypeViewport[];
|
|
33
|
+
designProperties: Record<string, DimensionedDesignPropertyValue>;
|
|
34
|
+
dimensionKeyMap: ExperienceDimensionKeyMap;
|
|
35
|
+
contentBindings?: ExperienceContentBindings;
|
|
36
|
+
metadata?: ExperienceMetadataProps;
|
|
37
|
+
slots?: Record<string, Array<FragmentNode | InlineFragmentNode>>;
|
|
38
|
+
};
|
|
39
|
+
export type CreateFragmentProps = Except<FragmentProps, 'sys'> & {
|
|
40
|
+
componentType: Link<'ComponentType'>;
|
|
41
|
+
};
|
|
42
|
+
export type UpdateFragmentProps = Omit<FragmentProps, 'sys'> & {
|
|
43
|
+
sys: {
|
|
44
|
+
id: string;
|
|
45
|
+
type: 'Fragment';
|
|
46
|
+
version: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type FragmentQueryOptions = CursorPaginationParams & ExoQueryFilters & {
|
|
50
|
+
order?: string;
|
|
51
|
+
};
|
|
52
|
+
export type FragmentCollection = ExoCursorPaginatedCollectionProp<FragmentProps>;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type { BasicMetaSysProps, DefaultElements, MakeRequest } from '../common-types';
|
|
2
2
|
import type { ContentfulSpaceAPI } from '../create-space-api';
|
|
3
|
+
export type SpaceLicenseProps = {
|
|
4
|
+
sys: {
|
|
5
|
+
type: 'SpaceLicense';
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
isTrial: boolean;
|
|
9
|
+
expiresAt: string;
|
|
10
|
+
productId: string;
|
|
11
|
+
productName: string;
|
|
12
|
+
};
|
|
3
13
|
export type SpaceProps = {
|
|
4
14
|
sys: BasicMetaSysProps & {
|
|
5
15
|
organization: {
|
|
@@ -8,9 +18,22 @@ export type SpaceProps = {
|
|
|
8
18
|
};
|
|
9
19
|
};
|
|
10
20
|
archivedAt?: string;
|
|
21
|
+
license?: {
|
|
22
|
+
sys: {
|
|
23
|
+
type: 'Link';
|
|
24
|
+
linkType: 'SpaceLicense';
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
11
28
|
};
|
|
12
29
|
name: string;
|
|
13
30
|
};
|
|
31
|
+
export type SpaceIncludes = {
|
|
32
|
+
SpaceLicense?: SpaceLicenseProps[];
|
|
33
|
+
};
|
|
34
|
+
export type SpaceIncludeParam = {
|
|
35
|
+
include?: 'sys.license';
|
|
36
|
+
};
|
|
14
37
|
export type UnarchiveProps = {
|
|
15
38
|
productId: string;
|
|
16
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.js","sources":["../../../lib/entities/space.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"space.js","sources":["../../../lib/entities/space.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAwCA;;;;;;;;;AASG;AACG,SAAU,SAAS,CAAC,WAAwB,EAAE,IAAgB,EAAA;IAClE,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvC,IAAA,MAAM,QAAQ,GAAG,cAAc,CAAC,WAAW,CAAC;IAC5C,MAAM,aAAa,GAAG,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC;AACzD,IAAA,OAAO,SAAS,CAAC,aAAa,CAAC;AACjC;AAEA;;;;AAIG;MACU,mBAAmB,GAAG,cAAc,CAAC,SAAS;MAC9C,kCAAkC,GAAG,6BAA6B,CAAC,SAAS;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Except } from 'type-fest';
|
|
2
|
+
import type { CursorPaginationParams, ExoCursorPaginatedCollectionProp, ExoMetadataProps, ExoQueryFilters, Link } from '../common-types';
|
|
3
|
+
import type { ComponentTypeContentProperty, ComponentTypeDesignProperty, ComponentTypeDimensionKeyMap, ComponentTypeSlotDefinition, ComponentTypeViewport, DataAssemblyLink, TreeNode } from './component-type';
|
|
4
|
+
export type TemplateSys = {
|
|
5
|
+
id: string;
|
|
6
|
+
type: 'Template';
|
|
7
|
+
version: number;
|
|
8
|
+
space: Link<'Space'>;
|
|
9
|
+
environment: Link<'Environment'>;
|
|
10
|
+
fieldStatus?: Record<string, Record<string, 'draft' | 'published' | 'changed'>>;
|
|
11
|
+
publishedAt?: string;
|
|
12
|
+
publishedVersion?: number;
|
|
13
|
+
publishedCounter?: number;
|
|
14
|
+
firstPublishedAt?: string;
|
|
15
|
+
publishedBy?: Link<'User'> | Link<'AppDefinition'>;
|
|
16
|
+
variant?: string;
|
|
17
|
+
variantType?: string;
|
|
18
|
+
variantDimension?: string;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
createdBy: Link<'User'>;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
updatedBy: Link<'User'>;
|
|
23
|
+
};
|
|
24
|
+
export type TemplateProps = {
|
|
25
|
+
sys: TemplateSys;
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
viewports: ComponentTypeViewport[];
|
|
29
|
+
contentProperties: ComponentTypeContentProperty[];
|
|
30
|
+
designProperties: ComponentTypeDesignProperty[];
|
|
31
|
+
dimensionKeyMap: ComponentTypeDimensionKeyMap;
|
|
32
|
+
componentTree?: TreeNode[];
|
|
33
|
+
slots?: ComponentTypeSlotDefinition[];
|
|
34
|
+
metadata?: ExoMetadataProps;
|
|
35
|
+
dataAssemblies?: DataAssemblyLink[];
|
|
36
|
+
};
|
|
37
|
+
export type CreateTemplateProps = Except<TemplateProps, 'sys'>;
|
|
38
|
+
export type UpsertTemplateProps = Except<TemplateProps, 'sys'> & {
|
|
39
|
+
sys: {
|
|
40
|
+
id: string;
|
|
41
|
+
type: 'Template';
|
|
42
|
+
version?: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export type TemplateQueryOptions = CursorPaginationParams & ExoQueryFilters & {
|
|
46
|
+
order?: string;
|
|
47
|
+
};
|
|
48
|
+
export type TemplateCollection = ExoCursorPaginatedCollectionProp<TemplateProps>;
|
|
@@ -85,3 +85,8 @@ export type { SemanticSearchProps, SemanticSearch } from './entities/semantic-se
|
|
|
85
85
|
export type { DefinedParameters, FreeFormParameters, InstallationParameterType, ParameterDefinition, ParameterOption, ParameterType, } from './entities/widget-parameters';
|
|
86
86
|
export type { CreateWorkflowProps, DeleteWorkflowParams, UpdateWorkflowProps, Workflow, WorkflowProps, WorkflowQueryOptions, } from './entities/workflow';
|
|
87
87
|
export type { WorkflowsChangelogEntry, WorkflowsChangelogEntryProps, WorkflowsChangelogQueryOptions, } from './entities/workflows-changelog-entry';
|
|
88
|
+
export type { ComponentTypeCollection } from './entities/component-type';
|
|
89
|
+
export type { TemplateCollection } from './entities/template';
|
|
90
|
+
export type { ExperienceCollection, ReleaseExperience, ReleaseExperienceCollection, ReleaseExperienceSys, } from './entities/experience';
|
|
91
|
+
export type { FragmentCollection } from './entities/fragment';
|
|
92
|
+
export type { DataAssemblyCollection, DataAssemblyResourceLinkParameter, DataAssemblyReturnMappingFromObject, DataAssemblyReturnMappingSelectValue, } from './entities/data-assembly';
|