@contentchef/contentchef-types 2.6.0-alpha.0 → 2.6.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/AccessToken.d.ts +7 -7
- package/dist/api/AuditLog.d.ts +12 -12
- package/dist/api/AuditLog.js +3 -3
- package/dist/api/Author.d.ts +1 -1
- package/dist/api/Channel.d.ts +12 -12
- package/dist/api/Content.d.ts +53 -33
- package/dist/api/Content.js +3 -3
- package/dist/api/ContentDefinition.d.ts +31 -23
- package/dist/api/ContentDefinition.js +1 -1
- package/dist/api/ContentDefinitionSchema.d.ts +48 -48
- package/dist/api/ContentDefinitionSchema.js +3 -3
- package/dist/api/ContentRepository.d.ts +16 -16
- package/dist/api/ContentTag.d.ts +2 -2
- package/dist/api/ContentTranslation.d.ts +15 -15
- package/dist/api/ContentTranslation.js +1 -1
- package/dist/api/Extension.d.ts +8 -8
- package/dist/api/Invites.d.ts +2 -2
- package/dist/api/MediaGallery.d.ts +34 -34
- package/dist/api/PublishedContent.d.ts +42 -20
- package/dist/api/PublishingRequest.d.ts +7 -7
- package/dist/api/PublishingRequest.js +1 -1
- package/dist/api/Space.d.ts +21 -21
- package/dist/api/Subscription.d.ts +27 -27
- package/dist/api/Subscription.js +4 -4
- package/dist/api/User.d.ts +11 -11
- package/dist/api/UserConsents.d.ts +7 -7
- package/dist/api/UserConsents.js +1 -1
- package/dist/api/UserPermission.d.ts +3 -3
- package/dist/api/UserPermission.js +2 -2
- package/dist/api/Webhooks.d.ts +14 -13
- package/dist/api/Webhooks.js +3 -2
- package/dist/api/common.d.ts +1 -1
- package/dist/api/common.js +1 -1
- package/dist/api/index.js +5 -1
- package/dist/extension/index.d.ts +10 -10
- package/dist/extension/index.js +1 -1
- package/dist/index.js +5 -1
- package/lib/api/Content.ts +25 -0
- package/lib/api/ContentDefinition.ts +10 -0
- package/lib/api/ContentDefinitionSchema.ts +2 -2
- package/lib/api/PublishedContent.ts +184 -160
- package/lib/api/Webhooks.ts +2 -1
- package/package.json +3 -4
- package/dist/.DS_Store +0 -0
|
@@ -5,23 +5,23 @@ import { Extension } from './Extension';
|
|
|
5
5
|
/**
|
|
6
6
|
* This type represent the unique content definition id type
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type ContentDefinitionId = number;
|
|
9
9
|
/**
|
|
10
10
|
* This type represent the data needed to make a get content definition API request
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type GetContentDefinitionRequest = {
|
|
13
13
|
/**
|
|
14
14
|
* The unique content definition id
|
|
15
15
|
*/
|
|
16
16
|
id: ContentDefinitionId;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type ArrayField = {
|
|
19
19
|
path: string;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* This type represent the data needed to make a list content definition API request
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export type ListContentDefinitionsRequest = {
|
|
25
25
|
/**
|
|
26
26
|
* The content definitions to skip (value used to paginate the response)
|
|
27
27
|
*/
|
|
@@ -47,7 +47,7 @@ export declare type ListContentDefinitionsRequest = {
|
|
|
47
47
|
/**
|
|
48
48
|
* This type represent the single item returned from a list content definition API request
|
|
49
49
|
*/
|
|
50
|
-
export
|
|
50
|
+
export type ListContentDefinitionsItem = {
|
|
51
51
|
/**
|
|
52
52
|
* The unique content definition if
|
|
53
53
|
*/
|
|
@@ -84,11 +84,11 @@ export declare type ListContentDefinitionsItem = {
|
|
|
84
84
|
/**
|
|
85
85
|
* This type represent the response of a list content definition API request
|
|
86
86
|
*/
|
|
87
|
-
export
|
|
87
|
+
export type ListContentDefinitionsResponse = PagedListResponse<ListContentDefinitionsItem>;
|
|
88
88
|
/**
|
|
89
89
|
* This type represent the data needed to make create content definition API request
|
|
90
90
|
*/
|
|
91
|
-
export
|
|
91
|
+
export type CreateContentDefinitionRequest = {
|
|
92
92
|
/**
|
|
93
93
|
* The name of the content definition
|
|
94
94
|
*/
|
|
@@ -101,11 +101,15 @@ export declare type CreateContentDefinitionRequest = {
|
|
|
101
101
|
* The content definition fields schema
|
|
102
102
|
*/
|
|
103
103
|
schema: ContentDefinitionSchema;
|
|
104
|
+
/**
|
|
105
|
+
* will bypass content definition mnemonicId validation for every linked-content field
|
|
106
|
+
*/
|
|
107
|
+
bypassLinkedContentValidation?: boolean;
|
|
104
108
|
};
|
|
105
109
|
/**
|
|
106
110
|
* This type represent the data needed to make an update content definition API request
|
|
107
111
|
*/
|
|
108
|
-
export
|
|
112
|
+
export type UpdateContentDefinitionRequest = {
|
|
109
113
|
/**
|
|
110
114
|
* The content definition unique id to update
|
|
111
115
|
*/
|
|
@@ -122,11 +126,15 @@ export declare type UpdateContentDefinitionRequest = {
|
|
|
122
126
|
* The content definition fields schema
|
|
123
127
|
*/
|
|
124
128
|
schema: ContentDefinitionSchema;
|
|
129
|
+
/**
|
|
130
|
+
* will bypass content definition mnemonicId validation for every linked-content field
|
|
131
|
+
*/
|
|
132
|
+
bypassLinkedContentValidation?: boolean;
|
|
125
133
|
};
|
|
126
134
|
/**
|
|
127
135
|
* This type represent the model of a content definition
|
|
128
136
|
*/
|
|
129
|
-
export
|
|
137
|
+
export type ContentDefinitionResponse = {
|
|
130
138
|
/**
|
|
131
139
|
* The content definition unique id
|
|
132
140
|
*/
|
|
@@ -171,19 +179,19 @@ export declare type ContentDefinitionResponse = {
|
|
|
171
179
|
/**
|
|
172
180
|
* This type represent the response of a create content definition API request
|
|
173
181
|
*/
|
|
174
|
-
export
|
|
182
|
+
export type CreateContentDefinitionResponse = ContentDefinitionResponse;
|
|
175
183
|
/**
|
|
176
184
|
* This type represent the response of an update content definition API request
|
|
177
185
|
*/
|
|
178
|
-
export
|
|
186
|
+
export type UpdateContentDefinitionResponse = ContentDefinitionResponse;
|
|
179
187
|
/**
|
|
180
188
|
* This type represent the response of a get content definition API request
|
|
181
189
|
*/
|
|
182
|
-
export
|
|
190
|
+
export type GetContentDefinitionResponse = ContentDefinitionResponse | undefined;
|
|
183
191
|
/**
|
|
184
192
|
* This type represent the data needed to make a validate definition field API request
|
|
185
193
|
*/
|
|
186
|
-
export
|
|
194
|
+
export type ValidateDefinitionFieldRequest = {
|
|
187
195
|
/**
|
|
188
196
|
* The field to validate
|
|
189
197
|
*/
|
|
@@ -200,11 +208,11 @@ export declare type ValidateDefinitionFieldRequest = {
|
|
|
200
208
|
/**
|
|
201
209
|
* This type represent the response of a validate definition field API request
|
|
202
210
|
*/
|
|
203
|
-
export
|
|
211
|
+
export type ValidateDefinitionFieldResponse = boolean;
|
|
204
212
|
/**
|
|
205
213
|
* This type represent the data needed to make a validate definition fragment API request
|
|
206
214
|
*/
|
|
207
|
-
export
|
|
215
|
+
export type ValidateDefinitionFragmentRequest = {
|
|
208
216
|
/**
|
|
209
217
|
* The fragment name to validate
|
|
210
218
|
*/
|
|
@@ -229,11 +237,11 @@ export declare type ValidateDefinitionFragmentRequest = {
|
|
|
229
237
|
/**
|
|
230
238
|
* This type represent the response of a validate definition fragment API request
|
|
231
239
|
*/
|
|
232
|
-
export
|
|
240
|
+
export type ValidateDefinitionFragmentResponse = boolean;
|
|
233
241
|
/**
|
|
234
242
|
* This type represent the response of a create/update content definition API request when there a invalid fields or invalid fragments
|
|
235
243
|
*/
|
|
236
|
-
export
|
|
244
|
+
export type ContentDefinitionSchemaErrors = {
|
|
237
245
|
/**
|
|
238
246
|
* This attribute represents all the error that occurs inside the fields attribute of the definition schema object
|
|
239
247
|
*
|
|
@@ -257,7 +265,7 @@ export declare type ContentDefinitionSchemaErrors = {
|
|
|
257
265
|
/**
|
|
258
266
|
* This type represent the model for the schema fragment errors
|
|
259
267
|
*/
|
|
260
|
-
export
|
|
268
|
+
export type SchemaFragmentErrors = {
|
|
261
269
|
/**
|
|
262
270
|
* The key is the name of the fragment that had the error
|
|
263
271
|
* The value is a list of possible errors
|
|
@@ -270,7 +278,7 @@ export declare type SchemaFragmentErrors = {
|
|
|
270
278
|
/**
|
|
271
279
|
* This type represent the model for the schema field errors
|
|
272
280
|
*/
|
|
273
|
-
export
|
|
281
|
+
export type SchemaFieldViolationsErrors = {
|
|
274
282
|
/**
|
|
275
283
|
* The index of the field that had the error
|
|
276
284
|
*/
|
|
@@ -287,7 +295,7 @@ export declare type SchemaFieldViolationsErrors = {
|
|
|
287
295
|
/**
|
|
288
296
|
* This type represent an error that occurred in an attribute of a field or a fragment
|
|
289
297
|
*/
|
|
290
|
-
export
|
|
298
|
+
export type AttributeViolation = {
|
|
291
299
|
/**
|
|
292
300
|
* The attribute key that is invalid
|
|
293
301
|
*/
|
|
@@ -300,7 +308,7 @@ export declare type AttributeViolation = {
|
|
|
300
308
|
/**
|
|
301
309
|
* This type represent a single detailed error that occurred inside a field or fragment attribute
|
|
302
310
|
*/
|
|
303
|
-
export
|
|
311
|
+
export type AttributeViolationDetail = {
|
|
304
312
|
/**
|
|
305
313
|
* The error code
|
|
306
314
|
* For all error code refer to [[SchemaFieldViolationCodes]]
|
|
@@ -315,7 +323,7 @@ export declare type AttributeViolationDetail = {
|
|
|
315
323
|
/**
|
|
316
324
|
* This type represent an error that occurred in an attribute that is a list of values
|
|
317
325
|
*/
|
|
318
|
-
export
|
|
326
|
+
export type ArrayAttributeViolation = {
|
|
319
327
|
/**
|
|
320
328
|
* The attribute that have the error
|
|
321
329
|
*/
|
|
@@ -328,7 +336,7 @@ export declare type ArrayAttributeViolation = {
|
|
|
328
336
|
/**
|
|
329
337
|
* This type represent the detailed error that occurred in an a list of values
|
|
330
338
|
*/
|
|
331
|
-
export
|
|
339
|
+
export type ArrayAttributeViolationDetail = {
|
|
332
340
|
/**
|
|
333
341
|
* The index of the value that have the error
|
|
334
342
|
*/
|
|
@@ -44,4 +44,4 @@ var SchemaFieldViolationCodes;
|
|
|
44
44
|
SchemaFieldViolationCodes["translatableNotAllowed"] = "translatableNotAllowed";
|
|
45
45
|
SchemaFieldViolationCodes["invalidEnumValue"] = "invalidEnumValue";
|
|
46
46
|
SchemaFieldViolationCodes["compactCannotBeNested"] = "compactCannotBeNested";
|
|
47
|
-
})(SchemaFieldViolationCodes
|
|
47
|
+
})(SchemaFieldViolationCodes || (exports.SchemaFieldViolationCodes = SchemaFieldViolationCodes = {}));
|
|
@@ -32,7 +32,7 @@ export declare enum LongTextSubTypes {
|
|
|
32
32
|
/**
|
|
33
33
|
* This type represent the model of a content definition schema
|
|
34
34
|
*/
|
|
35
|
-
export
|
|
35
|
+
export type ContentDefinitionSchema = {
|
|
36
36
|
/**
|
|
37
37
|
* The default language of the schema
|
|
38
38
|
* This value is used to internationalize all friendly labels
|
|
@@ -51,7 +51,7 @@ export declare type ContentDefinitionSchema = {
|
|
|
51
51
|
/**
|
|
52
52
|
* This type represent the model of the attribute fragments in a content definition schema
|
|
53
53
|
*/
|
|
54
|
-
export
|
|
54
|
+
export type FragmentsTable = {
|
|
55
55
|
/**
|
|
56
56
|
* This value represent how a fragment is defined.
|
|
57
57
|
* The name is the unique id of the fragment and its value is the model representing the fragment
|
|
@@ -61,7 +61,7 @@ export declare type FragmentsTable = {
|
|
|
61
61
|
/**
|
|
62
62
|
* This type represent the model to define a fragment
|
|
63
63
|
*/
|
|
64
|
-
export
|
|
64
|
+
export type FragmentDefinition = {
|
|
65
65
|
/**
|
|
66
66
|
* The list of fields defined by the fragment
|
|
67
67
|
*/
|
|
@@ -75,7 +75,7 @@ export declare type FragmentDefinition = {
|
|
|
75
75
|
* This type represent the base model of a schema field
|
|
76
76
|
* @template T The type of field to define
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
type BaseSchemaField<T extends SchemaTypes> = T & {
|
|
79
79
|
/**
|
|
80
80
|
* The name of the field
|
|
81
81
|
*/
|
|
@@ -117,11 +117,11 @@ declare type BaseSchemaField<T extends SchemaTypes> = T & {
|
|
|
117
117
|
* then -> the schema field will contain the properties of the type BaseSchemaField<T> and IndexableSchemaTypes type
|
|
118
118
|
* else -> the schema field will contain only the properties of the type BaseSchemaField<T>
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
type SchemaField<T extends SchemaTypes> = BaseSchemaField<T>;
|
|
121
121
|
/**
|
|
122
122
|
* This type represent the model of a I18N dictionary
|
|
123
123
|
*/
|
|
124
|
-
export
|
|
124
|
+
export type I18NDictionary = {
|
|
125
125
|
/**
|
|
126
126
|
* The name represent the locale language code
|
|
127
127
|
* The value is the label to display
|
|
@@ -132,12 +132,12 @@ export declare type I18NDictionary = {
|
|
|
132
132
|
* This type represent the model of a list of values constraint
|
|
133
133
|
* @template T the value of a list of values constraint can be a string or a number
|
|
134
134
|
*/
|
|
135
|
-
export
|
|
135
|
+
export type ValueList<T extends string | number> = ListItem<T>[];
|
|
136
136
|
/**
|
|
137
137
|
* This type represent the model of a list of values constraint item
|
|
138
138
|
* @template T the value of a list of values constraint can be a string or a number
|
|
139
139
|
*/
|
|
140
|
-
export
|
|
140
|
+
export type ListItem<T extends string | number> = {
|
|
141
141
|
/**
|
|
142
142
|
* The code unique code of the item
|
|
143
143
|
*/
|
|
@@ -150,13 +150,13 @@ export declare type ListItem<T extends string | number> = {
|
|
|
150
150
|
/**
|
|
151
151
|
* This type represent the model for a required field constraint
|
|
152
152
|
*/
|
|
153
|
-
export
|
|
153
|
+
export type RequiredFieldConstraints = {
|
|
154
154
|
required: boolean;
|
|
155
155
|
};
|
|
156
156
|
/**
|
|
157
157
|
* This type represent the model of a text field constraints
|
|
158
158
|
*/
|
|
159
|
-
export
|
|
159
|
+
export type TextFieldConstraints = {
|
|
160
160
|
/**
|
|
161
161
|
* Set this value to true if a blank value is admitted
|
|
162
162
|
*/
|
|
@@ -181,7 +181,7 @@ export declare type TextFieldConstraints = {
|
|
|
181
181
|
/**
|
|
182
182
|
* This type represent the model of a long text field constraints
|
|
183
183
|
*/
|
|
184
|
-
export
|
|
184
|
+
export type LongTextFieldConstraints = {
|
|
185
185
|
/**
|
|
186
186
|
* Set this value to true if a blank value is admitted
|
|
187
187
|
*/
|
|
@@ -202,7 +202,7 @@ export declare type LongTextFieldConstraints = {
|
|
|
202
202
|
/**
|
|
203
203
|
* This type represent the model of a date field constraint
|
|
204
204
|
*/
|
|
205
|
-
export
|
|
205
|
+
export type DateFieldConstraints = {
|
|
206
206
|
/**
|
|
207
207
|
* Set this value to define the higher limit of the date value
|
|
208
208
|
*/
|
|
@@ -215,7 +215,7 @@ export declare type DateFieldConstraints = {
|
|
|
215
215
|
/**
|
|
216
216
|
* This type represent the model of a number field constraint
|
|
217
217
|
*/
|
|
218
|
-
export
|
|
218
|
+
export type NumberFieldConstraints = {
|
|
219
219
|
/**
|
|
220
220
|
* Set this value to define the min value
|
|
221
221
|
*/
|
|
@@ -238,7 +238,7 @@ export declare enum LinkType {
|
|
|
238
238
|
* This type represent the model of a linked content field constraints
|
|
239
239
|
* @Deprecated
|
|
240
240
|
*/
|
|
241
|
-
export
|
|
241
|
+
export type LinkedContentFieldConstraints = {
|
|
242
242
|
/**
|
|
243
243
|
* Set this value to define which type of content is possible to link by definition id
|
|
244
244
|
* In the case where contentDefinitionId an definitionMnemonicId are both defined, definitionMnemonicId has a higher priority
|
|
@@ -258,7 +258,7 @@ export declare type LinkedContentFieldConstraints = {
|
|
|
258
258
|
/**
|
|
259
259
|
* This type represent the model of a fragment field constraints
|
|
260
260
|
*/
|
|
261
|
-
export
|
|
261
|
+
export type FragmentFieldConstraints = {
|
|
262
262
|
/**
|
|
263
263
|
* Set this value to define which fragment the field can use
|
|
264
264
|
*/
|
|
@@ -267,7 +267,7 @@ export declare type FragmentFieldConstraints = {
|
|
|
267
267
|
/**
|
|
268
268
|
* This type represent the model of a one fragment field constraints
|
|
269
269
|
*/
|
|
270
|
-
export
|
|
270
|
+
export type OneFragmentOfConstraints = {
|
|
271
271
|
/**
|
|
272
272
|
* Set this value to define which fragments the field can use
|
|
273
273
|
*/
|
|
@@ -276,7 +276,7 @@ export declare type OneFragmentOfConstraints = {
|
|
|
276
276
|
/**
|
|
277
277
|
* This type represent the model of a one linked content of field constraints
|
|
278
278
|
*/
|
|
279
|
-
export
|
|
279
|
+
export type OneLinkedContentOfConstraints = {
|
|
280
280
|
/**
|
|
281
281
|
* Set this value to define which type of content is possible to link by definition id
|
|
282
282
|
* In the case where contentDefinitionIds and definitionMnemonicIds are both defined, definitionMnemonicIds has a higher priority
|
|
@@ -297,7 +297,7 @@ export declare type OneLinkedContentOfConstraints = {
|
|
|
297
297
|
* This type represent the model of an array field constraints
|
|
298
298
|
* @template T The type of the item used ad children of the array
|
|
299
299
|
*/
|
|
300
|
-
export
|
|
300
|
+
export type ArrayFieldConstraints<T extends AllSchemaTypes> = {
|
|
301
301
|
/**
|
|
302
302
|
* Set this property to define the minimum number of element in the array
|
|
303
303
|
*/
|
|
@@ -314,7 +314,7 @@ export declare type ArrayFieldConstraints<T extends AllSchemaTypes> = {
|
|
|
314
314
|
/**
|
|
315
315
|
* This type represent the model of a cloudinary public id constraints
|
|
316
316
|
*/
|
|
317
|
-
export
|
|
317
|
+
export type CloudinaryPublicIdConstraints = {
|
|
318
318
|
/**
|
|
319
319
|
* Set this property to define the type of media
|
|
320
320
|
*/
|
|
@@ -324,7 +324,7 @@ export declare type CloudinaryPublicIdConstraints = {
|
|
|
324
324
|
* Slug field type has `suffix` and `prefix` constraints in addition to `required`
|
|
325
325
|
* Every slug is indexable and translatable and has a pattern that allows only alphanumeric characters (lowercased letters and numbers), hypens and no space
|
|
326
326
|
*/
|
|
327
|
-
export
|
|
327
|
+
export type SlugConstraints = {
|
|
328
328
|
suffix?: string;
|
|
329
329
|
prefix?: string;
|
|
330
330
|
allowSlash?: boolean;
|
|
@@ -332,7 +332,7 @@ export declare type SlugConstraints = {
|
|
|
332
332
|
/**
|
|
333
333
|
* Constraints of a `media` field
|
|
334
334
|
*/
|
|
335
|
-
export
|
|
335
|
+
export type MediaConstraints = {
|
|
336
336
|
/**
|
|
337
337
|
* Determines type of media (raw, video, image)
|
|
338
338
|
*/
|
|
@@ -343,7 +343,7 @@ export declare type MediaConstraints = {
|
|
|
343
343
|
* @template T The type of the field
|
|
344
344
|
* @template C The type of the constraints
|
|
345
345
|
*/
|
|
346
|
-
export
|
|
346
|
+
export type SchemaType<T, C> = {
|
|
347
347
|
/**
|
|
348
348
|
* This attribute represent the type of the field
|
|
349
349
|
*/
|
|
@@ -356,7 +356,7 @@ export declare type SchemaType<T, C> = {
|
|
|
356
356
|
/**
|
|
357
357
|
* This type represent the model of an indexing config
|
|
358
358
|
*/
|
|
359
|
-
export
|
|
359
|
+
export type IndexingConf = {
|
|
360
360
|
/**
|
|
361
361
|
* Set this attribute to enable faceting in the field
|
|
362
362
|
*/
|
|
@@ -365,7 +365,7 @@ export declare type IndexingConf = {
|
|
|
365
365
|
/**
|
|
366
366
|
* A field will have this type when it's subject to localization
|
|
367
367
|
*/
|
|
368
|
-
export
|
|
368
|
+
export type TranslatableConf = {
|
|
369
369
|
/**
|
|
370
370
|
* Determines whether a field is subject to localization or not
|
|
371
371
|
*/
|
|
@@ -376,106 +376,106 @@ export declare type TranslatableConf = {
|
|
|
376
376
|
* @template T The type of the field
|
|
377
377
|
* @template C The type of the constraints
|
|
378
378
|
*/
|
|
379
|
-
export
|
|
379
|
+
export type IndexableSchemaType<T, C> = SchemaType<T, C> & IndexingConf;
|
|
380
380
|
/**
|
|
381
381
|
* When a field is of this type it is subject to localization
|
|
382
382
|
* @template T Type of the field
|
|
383
383
|
*/
|
|
384
|
-
export
|
|
384
|
+
export type TranslatableSchemaType<T extends SchemaType<any, any>> = T & TranslatableConf;
|
|
385
385
|
/**
|
|
386
386
|
* This type represent a text field schema type
|
|
387
387
|
* A text field can be indexed, searched when requesting the content and localized
|
|
388
388
|
*/
|
|
389
|
-
export
|
|
389
|
+
export type TextSchemaType = TranslatableSchemaType<IndexableSchemaType<SchemaTypeIds.TEXT, TextFieldConstraints>>;
|
|
390
390
|
/**
|
|
391
391
|
* This type represent a long text field schema type
|
|
392
392
|
* A long text field can be indexed, searched when requesting the content and localized
|
|
393
393
|
*/
|
|
394
|
-
export
|
|
394
|
+
export type LongTextSchemaType = TranslatableSchemaType<IndexableSchemaType<SchemaTypeIds.LONG_TEXT, LongTextFieldConstraints>>;
|
|
395
395
|
/**
|
|
396
396
|
* This type represent a linked content field schema type
|
|
397
397
|
* A linked content field can be indexed and searched when requesting the content
|
|
398
398
|
*/
|
|
399
|
-
export
|
|
399
|
+
export type LinkedContentSchemaType = IndexableSchemaType<SchemaTypeIds.LINKED_CONTENT, LinkedContentFieldConstraints>;
|
|
400
400
|
/**
|
|
401
401
|
* This type represent a cloudinary public id field schema type
|
|
402
402
|
*/
|
|
403
|
-
export
|
|
403
|
+
export type CloudinaryPublicIdSchemaType = TranslatableSchemaType<SchemaType<SchemaTypeIds.CLOUDINARY_PUBLICID, CloudinaryPublicIdConstraints>>;
|
|
404
404
|
/**
|
|
405
405
|
* This type represent a cloudinary image field schema type
|
|
406
406
|
*/
|
|
407
|
-
export
|
|
407
|
+
export type CloudinaryImageSchemaType = TranslatableSchemaType<SchemaType<SchemaTypeIds.CLOUDINARY_IMAGE, {}>>;
|
|
408
408
|
/**
|
|
409
409
|
* This type represent a cloudinary video field schema type
|
|
410
410
|
*/
|
|
411
|
-
export
|
|
411
|
+
export type CloudinaryVideoSchemaType = TranslatableSchemaType<SchemaType<SchemaTypeIds.CLOUDINARY_VIDEO, {}>>;
|
|
412
412
|
/**
|
|
413
413
|
* This type represent a cloudinary raw field schema type
|
|
414
414
|
*/
|
|
415
|
-
export
|
|
415
|
+
export type CloudinaryRawSchemaType = TranslatableSchemaType<SchemaType<SchemaTypeIds.CLOUDINARY_RAW, {}>>;
|
|
416
416
|
/**
|
|
417
417
|
* Media field schema type
|
|
418
418
|
*/
|
|
419
|
-
export
|
|
419
|
+
export type MediaSchemaType = TranslatableSchemaType<SchemaType<SchemaTypeIds.MEDIA, MediaConstraints>>;
|
|
420
420
|
/**
|
|
421
421
|
* This type represent a number field schema type
|
|
422
422
|
* A number field can be indexed and searched when requesting the content
|
|
423
423
|
*/
|
|
424
|
-
export
|
|
424
|
+
export type NumberSchemaType = TranslatableSchemaType<IndexableSchemaType<SchemaTypeIds.NUMBER, NumberFieldConstraints>>;
|
|
425
425
|
/**
|
|
426
426
|
* This type represent a boolean field schema type
|
|
427
427
|
* A boolean field can be indexed and searched when requesting the content
|
|
428
428
|
*/
|
|
429
|
-
export
|
|
429
|
+
export type BooleanSchemaType = IndexableSchemaType<SchemaTypeIds.BOOLEAN, {}>;
|
|
430
430
|
/**
|
|
431
431
|
* This type represent a date field schema type
|
|
432
432
|
*/
|
|
433
|
-
export
|
|
433
|
+
export type DateSchemaType = SchemaType<SchemaTypeIds.DATE, DateFieldConstraints>;
|
|
434
434
|
/**
|
|
435
435
|
* This type represent a fragment field schema type
|
|
436
436
|
*/
|
|
437
|
-
export
|
|
437
|
+
export type FragmentSchemaType = SchemaType<SchemaTypeIds.FRAGMENT, FragmentFieldConstraints>;
|
|
438
438
|
/**
|
|
439
439
|
* This type represent a one fragment of field schema type
|
|
440
440
|
*/
|
|
441
|
-
export
|
|
441
|
+
export type OneFragmentOfSchemaType = SchemaType<SchemaTypeIds.ONE_FRAGMENT_OF, OneFragmentOfConstraints>;
|
|
442
442
|
/**
|
|
443
443
|
* This type represent a one linked content of field schema type
|
|
444
444
|
* A one linked content of field can be indexed and searched when requesting the content
|
|
445
445
|
*/
|
|
446
|
-
export
|
|
446
|
+
export type OneLinkedContentOfSchemaType = IndexableSchemaType<SchemaTypeIds.ONE_LINKED_CONTENT_OF, OneLinkedContentOfConstraints>;
|
|
447
447
|
/**
|
|
448
448
|
* Slug schema type
|
|
449
449
|
* This type is indexable and translatable by default
|
|
450
450
|
*/
|
|
451
|
-
export
|
|
451
|
+
export type SlugSchemaType = SchemaType<SchemaTypeIds.SLUG, SlugConstraints>;
|
|
452
452
|
/**
|
|
453
453
|
* This type represent an array field schema type
|
|
454
454
|
* @template SUBTYPE The field to be used inside the array
|
|
455
455
|
*/
|
|
456
|
-
export
|
|
456
|
+
export type ArraySchemaType<SUBTYPE extends AllSchemaTypes = AllSchemaTypes> = SchemaType<SchemaTypeIds.ARRAY, ArrayFieldConstraints<SUBTYPE>>;
|
|
457
457
|
/**
|
|
458
458
|
* This type group all the admitted schema types of a content definition excluded for the array schema type
|
|
459
459
|
*/
|
|
460
|
-
export
|
|
460
|
+
export type AllSchemaTypes = PlainSchemaTypes | IndexableSchemaTypes | TranslatableSchemaTypes;
|
|
461
461
|
/**
|
|
462
462
|
* This type group all the indexable schema types of a content definition
|
|
463
463
|
*/
|
|
464
|
-
export
|
|
464
|
+
export type IndexableSchemaTypes = TextSchemaType | LongTextSchemaType | LinkedContentSchemaType | OneLinkedContentOfSchemaType | BooleanSchemaType | NumberSchemaType;
|
|
465
465
|
/**
|
|
466
466
|
* This are all the fields that can be localized
|
|
467
467
|
*/
|
|
468
|
-
export
|
|
468
|
+
export type TranslatableSchemaTypes = NumberSchemaType | TextSchemaType | LongTextSchemaType | CloudinaryPublicIdSchemaType | CloudinaryImageSchemaType | CloudinaryVideoSchemaType | CloudinaryRawSchemaType | MediaSchemaType;
|
|
469
469
|
/**
|
|
470
470
|
* This type group all the schema types of a content definition that are not indexable
|
|
471
471
|
*/
|
|
472
|
-
export
|
|
472
|
+
export type PlainSchemaTypes = DateSchemaType | FragmentSchemaType | OneFragmentOfSchemaType | SlugSchemaType;
|
|
473
473
|
/**
|
|
474
474
|
* This type group all schema types of a content definition
|
|
475
475
|
*/
|
|
476
|
-
export
|
|
476
|
+
export type SchemaTypes<T extends AllSchemaTypes = AllSchemaTypes> = AllSchemaTypes | ArraySchemaType<T>;
|
|
477
477
|
/**
|
|
478
478
|
* This type define the model of a field
|
|
479
479
|
*/
|
|
480
|
-
export
|
|
480
|
+
export type Field<T = SchemaTypes> = T extends SchemaTypes ? SchemaField<T> : never;
|
|
481
481
|
export {};
|
|
@@ -23,7 +23,7 @@ var SchemaTypeIds;
|
|
|
23
23
|
SchemaTypeIds["ARRAY"] = "array";
|
|
24
24
|
SchemaTypeIds["SLUG"] = "slug";
|
|
25
25
|
SchemaTypeIds["MEDIA"] = "media";
|
|
26
|
-
})(SchemaTypeIds
|
|
26
|
+
})(SchemaTypeIds || (exports.SchemaTypeIds = SchemaTypeIds = {}));
|
|
27
27
|
/**
|
|
28
28
|
* This enum represent al possible long text sub types
|
|
29
29
|
*/
|
|
@@ -32,10 +32,10 @@ var LongTextSubTypes;
|
|
|
32
32
|
LongTextSubTypes["JSON"] = "json";
|
|
33
33
|
LongTextSubTypes["MARKDOWN"] = "markdown";
|
|
34
34
|
LongTextSubTypes["HTML"] = "html";
|
|
35
|
-
})(LongTextSubTypes
|
|
35
|
+
})(LongTextSubTypes || (exports.LongTextSubTypes = LongTextSubTypes = {}));
|
|
36
36
|
var LinkType;
|
|
37
37
|
(function (LinkType) {
|
|
38
38
|
LinkType[LinkType["FULL"] = 0] = "FULL";
|
|
39
39
|
LinkType[LinkType["LAZY"] = 1] = "LAZY";
|
|
40
40
|
LinkType[LinkType["COMPACT"] = 2] = "COMPACT";
|
|
41
|
-
})(LinkType
|
|
41
|
+
})(LinkType || (exports.LinkType = LinkType = {}));
|
|
@@ -3,11 +3,11 @@ import { PagedListResponse } from './common';
|
|
|
3
3
|
/**
|
|
4
4
|
* This type represent the unique content repository id type
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type ContentRepositoryId = number;
|
|
7
7
|
/**
|
|
8
8
|
* This type represent the model of a content repository
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type ContentRepositoryResponse = {
|
|
11
11
|
/**
|
|
12
12
|
* The unique content repository id
|
|
13
13
|
*/
|
|
@@ -52,7 +52,7 @@ export declare type ContentRepositoryResponse = {
|
|
|
52
52
|
/**
|
|
53
53
|
* This type represent all possible filters used to retrieve a list of content repository
|
|
54
54
|
*/
|
|
55
|
-
export
|
|
55
|
+
export type ListContentRepositoryFilters = {
|
|
56
56
|
/**
|
|
57
57
|
* This filter is used to search a media gallery that contain the value inserted
|
|
58
58
|
*/
|
|
@@ -65,7 +65,7 @@ export declare type ListContentRepositoryFilters = {
|
|
|
65
65
|
/**
|
|
66
66
|
* This type represent the data needed to make a list content repository API request
|
|
67
67
|
*/
|
|
68
|
-
export
|
|
68
|
+
export type ListContentRepositoriesRequest = {
|
|
69
69
|
/**
|
|
70
70
|
* The number of content repository to skip (this value is used for pagination)
|
|
71
71
|
*/
|
|
@@ -82,15 +82,15 @@ export declare type ListContentRepositoriesRequest = {
|
|
|
82
82
|
/**
|
|
83
83
|
* This type represent the item of a list content repository API request
|
|
84
84
|
*/
|
|
85
|
-
export
|
|
85
|
+
export type ListContentRepositoriesItem = CreateContentRepositoryResponse;
|
|
86
86
|
/**
|
|
87
87
|
* This type represent the response of a list content repository API request
|
|
88
88
|
*/
|
|
89
|
-
export
|
|
89
|
+
export type ListContentRepositoriesResponse = PagedListResponse<ListContentRepositoriesItem>;
|
|
90
90
|
/**
|
|
91
91
|
* This type represent the data needed to make a create content repository API request
|
|
92
92
|
*/
|
|
93
|
-
export
|
|
93
|
+
export type CreateContentRepositoryRequest = {
|
|
94
94
|
/**
|
|
95
95
|
* The content repository name
|
|
96
96
|
*/
|
|
@@ -111,7 +111,7 @@ export declare type CreateContentRepositoryRequest = {
|
|
|
111
111
|
/**
|
|
112
112
|
* This type represent the response of a create content repository API request
|
|
113
113
|
*/
|
|
114
|
-
export
|
|
114
|
+
export type CreateContentRepositoryResponse = {
|
|
115
115
|
/**
|
|
116
116
|
* The content repository unique id
|
|
117
117
|
*/
|
|
@@ -152,7 +152,7 @@ export declare type CreateContentRepositoryResponse = {
|
|
|
152
152
|
/**
|
|
153
153
|
* This type represent the data needed to make a content repository summary API request
|
|
154
154
|
*/
|
|
155
|
-
export
|
|
155
|
+
export type ContentRepositorySummaryRequest = {
|
|
156
156
|
/**
|
|
157
157
|
* The content repository unique id to retrieve the summary data
|
|
158
158
|
*/
|
|
@@ -161,7 +161,7 @@ export declare type ContentRepositorySummaryRequest = {
|
|
|
161
161
|
/**
|
|
162
162
|
* This type represent the response of a content repository summary API request
|
|
163
163
|
*/
|
|
164
|
-
export
|
|
164
|
+
export type ContentRepositorySummaryResponse = {
|
|
165
165
|
/**
|
|
166
166
|
* The content repository unique id of the summary
|
|
167
167
|
*/
|
|
@@ -190,7 +190,7 @@ export declare type ContentRepositorySummaryResponse = {
|
|
|
190
190
|
/**
|
|
191
191
|
* This type represent the data needed to make a get content repository API request
|
|
192
192
|
*/
|
|
193
|
-
export
|
|
193
|
+
export type GetContentRepositoryRequest = {
|
|
194
194
|
/**
|
|
195
195
|
* The unique content repository id to retrieve
|
|
196
196
|
*/
|
|
@@ -199,11 +199,11 @@ export declare type GetContentRepositoryRequest = {
|
|
|
199
199
|
/**
|
|
200
200
|
* This type represent the response of a get content repository API request
|
|
201
201
|
*/
|
|
202
|
-
export
|
|
202
|
+
export type GetContentRepositoryResponse = ContentRepositoryResponse;
|
|
203
203
|
/**
|
|
204
204
|
* This type represent the data needed to make an update content repository API request
|
|
205
205
|
*/
|
|
206
|
-
export
|
|
206
|
+
export type UpdateContentRepositoryRequest = {
|
|
207
207
|
/**
|
|
208
208
|
* The content repository unique id
|
|
209
209
|
*/
|
|
@@ -228,11 +228,11 @@ export declare type UpdateContentRepositoryRequest = {
|
|
|
228
228
|
/**
|
|
229
229
|
* This type represent the response of an update content repository API request
|
|
230
230
|
*/
|
|
231
|
-
export
|
|
231
|
+
export type UpdateContentRepositoryResponse = ContentRepositoryResponse;
|
|
232
232
|
/**
|
|
233
233
|
* This type represent the data needed to make a toggle archived content repository API request
|
|
234
234
|
*/
|
|
235
|
-
export
|
|
235
|
+
export type ToggleArchivedContentRepositoryRequest = {
|
|
236
236
|
/**
|
|
237
237
|
* The content repository unique id
|
|
238
238
|
*/
|
|
@@ -245,4 +245,4 @@ export declare type ToggleArchivedContentRepositoryRequest = {
|
|
|
245
245
|
/**
|
|
246
246
|
* This type represent the response of a toggle archived content repository API request
|
|
247
247
|
*/
|
|
248
|
-
export
|
|
248
|
+
export type ToggleArchivedContentRepositoryResponse = ContentRepositoryResponse;
|