@contentchef/contentchef-types 3.0.0-alpha.1 → 10.0.0-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.
@@ -1,10 +1,19 @@
1
- import { AuthorResponse } from './Author';
2
- import { PublishingChannelId, PublishingChannelResponse } from './Channel';
3
- import { PagedListResponse } from './common';
4
- import { ContentDefinitionId, ContentDefinitionResponse } from './ContentDefinition';
5
- import { SchemaTypeIds } from './ContentDefinitionSchema';
6
- import { ContentRepositoryId, ContentRepositoryResponse } from './ContentRepository';
7
- import { ContentTranslation, ContentTranslationStatus } from './ContentTranslation';
1
+ import { AuthorResponse } from "./Author";
2
+ import { PublishingChannelId, PublishingChannelResponse } from "./Channel";
3
+ import { PagedListResponse } from "./common";
4
+ import {
5
+ ContentDefinitionId,
6
+ ContentDefinitionResponse,
7
+ } from "./ContentDefinition";
8
+ import { SchemaTypeIds } from "./ContentDefinitionSchema";
9
+ import {
10
+ ContentRepositoryId,
11
+ ContentRepositoryResponse,
12
+ } from "./ContentRepository";
13
+ import {
14
+ ContentTranslation,
15
+ ContentTranslationStatus,
16
+ } from "./ContentTranslation";
8
17
 
9
18
  /**
10
19
  * This type represent the content unique id type
@@ -15,57 +24,57 @@ export type ContentId = number;
15
24
  * This enum represent the possible content status
16
25
  */
17
26
  export enum ContentsStatus {
18
- archived = 'archived',
19
- unarchived = 'unarchived',
20
- all = 'all'
27
+ archived = "archived",
28
+ unarchived = "unarchived",
29
+ all = "all",
21
30
  }
22
31
 
23
32
  /**
24
33
  * This type represent the model of facet
25
34
  */
26
35
  export type Facet = {
27
- /**
28
- * The key of the facet
29
- */
30
- key: string;
31
- /**
32
- * The value of the facet
33
- */
34
- value: any;
35
- /**
36
- * The type of the facet
37
- */
38
- type: SchemaTypeIds;
36
+ /**
37
+ * The key of the facet
38
+ */
39
+ key: string;
40
+ /**
41
+ * The value of the facet
42
+ */
43
+ value: any;
44
+ /**
45
+ * The type of the facet
46
+ */
47
+ type: SchemaTypeIds;
39
48
  };
40
49
 
41
50
  /**
42
51
  * This type represent the model of an indexed content value
43
52
  */
44
53
  export type IndexedContent = {
45
- /**
46
- * THe list of facet field in a content
47
- */
48
- facets: Facet[];
54
+ /**
55
+ * THe list of facet field in a content
56
+ */
57
+ facets: Facet[];
49
58
  };
50
59
 
51
60
  /**
52
61
  * This interface represent the model of a linked content path item
53
62
  */
54
63
  export interface PathItem {
55
- /**
56
- * The name of the field in the content definition
57
- */
58
- name: string;
64
+ /**
65
+ * The name of the field in the content definition
66
+ */
67
+ name: string;
59
68
  }
60
69
 
61
70
  /**
62
71
  * This interface represent the model of a linked content array path item
63
72
  */
64
73
  export interface ArrayPathItem {
65
- /**
66
- * The index of the field if it is in an array of linked contents
67
- */
68
- index: number;
74
+ /**
75
+ * The index of the field if it is in an array of linked contents
76
+ */
77
+ index: number;
69
78
  }
70
79
 
71
80
  /**
@@ -77,390 +86,399 @@ export type FieldPath = (ArrayPathItem | PathItem)[];
77
86
  * This type represent the model of a linked content info inside a content
78
87
  */
79
88
  export type LinkedContentInfo = {
80
- /**
81
- * The path to reach the linked content inside the content as an array of items
82
- */
83
- path: FieldPath;
84
- /**
85
- * The full path to reach the linked content inside the content as a string
86
- */
87
- pathString: string;
88
- /**
89
- * The linked content public id
90
- */
91
- publicId: string;
89
+ /**
90
+ * The path to reach the linked content inside the content as an array of items
91
+ */
92
+ path: FieldPath;
93
+ /**
94
+ * The full path to reach the linked content inside the content as a string
95
+ */
96
+ pathString: string;
97
+ /**
98
+ * The linked content public id
99
+ */
100
+ publicId: string;
92
101
  };
93
102
 
94
103
  /**
95
104
  * This type represent the model of a linked contents inside the content retrieved
96
105
  */
97
106
  export type LinkedContentsInfo = {
98
- /**
99
- * The list of linked contents inside in the content retrieved
100
- */
101
- items: LinkedContentInfo[];
107
+ /**
108
+ * The list of linked contents inside in the content retrieved
109
+ */
110
+ items: LinkedContentInfo[];
102
111
  };
103
112
 
104
113
  /**
105
114
  * This type represent the model of a content publishing status
106
115
  */
107
116
  export type ContentStatus = {
108
- /**
109
- * The unique content id
110
- */
111
- contentId: ContentId;
112
- /**
113
- * The content space id
114
- */
115
- spaceId: string;
116
- /**
117
- * The published content version to stage
118
- */
119
- stageVersion?: number;
120
- /**
121
- * The published content version to live
122
- */
123
- liveVersion?: number;
124
- /**
125
- * The published content unique id to stage
126
- */
127
- stagePublishingId?: number;
128
- /**
129
- * The published content unique id to live
130
- */
131
- livePublishingId?: number;
132
- /**
133
- * The publishing date to stage
134
- */
135
- stagePublishingDate?: string;
136
- /**
137
- * The publishing date to live
138
- */
139
- livePublishingDate?: string;
140
- /**
141
- * The publishing channels where the content is published in stage
142
- */
143
- stageChannels?: string[];
144
- /**
145
- * The publishing channels where the content is published in live
146
- */
147
- liveChannels?: string[];
148
- /**
149
- * The content modified iso date
150
- */
151
- modifiedDate?: number;
152
-
153
- /**
154
- * Locale of the content or translation
155
- */
156
- contentLocale?: string;
157
- /**
158
- * version of the content in stage (not translation)
159
- */
160
- stageContentVersion?: number;
161
- /**
162
- * version of the content in live
163
- */
164
- liveContentVersion?: number;
165
- /**
166
- * Whether or not this status belongs to a translation
167
- */
168
- isTranslation?: boolean;
117
+ /**
118
+ * The unique content id
119
+ */
120
+ contentId: ContentId;
121
+ /**
122
+ * The content space id
123
+ */
124
+ spaceId: string;
125
+ /**
126
+ * The published content version to stage
127
+ */
128
+ stageVersion?: number;
129
+ /**
130
+ * The published content version to live
131
+ */
132
+ liveVersion?: number;
133
+ /**
134
+ * The published content unique id to stage
135
+ */
136
+ stagePublishingId?: number;
137
+ /**
138
+ * The published content unique id to live
139
+ */
140
+ livePublishingId?: number;
141
+ /**
142
+ * The publishing date to stage
143
+ */
144
+ stagePublishingDate?: string;
145
+ /**
146
+ * The publishing date to live
147
+ */
148
+ livePublishingDate?: string;
149
+ /**
150
+ * The publishing channels where the content is published in stage
151
+ */
152
+ stageChannels?: string[];
153
+ /**
154
+ * The publishing channels where the content is published in live
155
+ */
156
+ liveChannels?: string[];
157
+ /**
158
+ * The content modified iso date
159
+ */
160
+ modifiedDate?: number;
161
+
162
+ /**
163
+ * Locale of the content or translation
164
+ */
165
+ contentLocale?: string;
166
+ /**
167
+ * version of the content in stage (not translation)
168
+ */
169
+ stageContentVersion?: number;
170
+ /**
171
+ * version of the content in live
172
+ */
173
+ liveContentVersion?: number;
174
+ /**
175
+ * Whether or not this status belongs to a translation
176
+ */
177
+ isTranslation?: boolean;
169
178
  };
170
179
 
171
180
  /**
172
181
  * This type represent the data needed to make a create content API request
173
182
  */
174
183
  export type CreateContentRequest = {
175
- /**
176
- * The content name
177
- */
178
- name: string;
179
- /**
180
- * The content public id
181
- */
182
- publicId?: string;
183
- /**
184
- * The content payload (this contains all content fields and its values)
185
- */
186
- payload: object;
187
- /**
188
- * The unique id that identify the repository where the content is created
189
- */
190
- repositoryId: ContentRepositoryId;
191
- /**
192
- * The unique id that identify the content definition that is used to create the content
193
- */
194
- definitionId: ContentDefinitionId;
195
- /**
196
- * The list of publishing channels where the content will be published
197
- */
198
- channelIds: PublishingChannelId[];
199
- /**
200
- * The list of tags related to the content
201
- */
202
- tags: string[];
203
- /**
204
- * The date where the content will start to be available when published
205
- */
206
- onlineDate?: Date;
207
- /**
208
- * The date where the content will no more be available when published
209
- */
210
- offlineDate?: Date;
211
-
212
- /**
213
- * Locale of the content
214
- */
215
- locale?: string;
216
-
217
- /**
218
- * Controls if translations should be ignored when publishing
219
- */
220
- contentLocalizationSettings?: LocalizationSettings;
221
-
222
- /**
223
- * will bypass content definition mnemonicId validation for every linked-content field
224
- */
225
- bypassLinkedContentValidation?: boolean;
226
-
227
- /**
228
- * set an identifier coming from a third party application
229
- */
230
- externalIdentifier?: string;
184
+ /**
185
+ * The content name
186
+ */
187
+ name: string;
188
+ /**
189
+ * The content public id
190
+ */
191
+ publicId?: string;
192
+ /**
193
+ * The content payload (this contains all content fields and its values)
194
+ */
195
+ payload: object;
196
+ /**
197
+ * The unique id that identify the repository where the content is created
198
+ */
199
+ repositoryId: ContentRepositoryId;
200
+ /**
201
+ * The unique id that identify the content definition that is used to create the content
202
+ */
203
+ definitionId: ContentDefinitionId;
204
+ /**
205
+ * The list of publishing channels where the content will be published
206
+ */
207
+ channelIds: PublishingChannelId[];
208
+ /**
209
+ * The list of tags related to the content
210
+ */
211
+ tags: string[];
212
+ /**
213
+ * The date where the content will start to be available when published
214
+ */
215
+ onlineDate?: Date;
216
+ /**
217
+ * The date where the content will no more be available when published
218
+ */
219
+ offlineDate?: Date;
220
+
221
+ /**
222
+ * Locale of the content
223
+ */
224
+ locale?: string;
225
+
226
+ /**
227
+ * Controls if translations should be ignored when publishing
228
+ */
229
+ contentLocalizationSettings?: LocalizationSettings;
230
+
231
+ /**
232
+ * will bypass content definition mnemonicId validation for every linked-content field
233
+ */
234
+ bypassLinkedContentValidation?: boolean;
235
+
236
+ /**
237
+ * set an identifier coming from a third party application
238
+ */
239
+ externalIdentifier?: string;
231
240
  };
232
241
 
233
242
  /**
234
243
  * This type represent the data needed to make a update content API request
235
244
  */
236
245
  export type UpdateContentRequest = {
237
- /**
238
- * The unique content id
239
- */
240
- id: ContentId;
241
- /**
242
- * The content public id
243
- */
244
- publicId: string;
245
- /**
246
- * The content name
247
- */
248
- name: string;
249
- /**
250
- * The content payload (this contains all content fields and its values)
251
- */
252
- payload: object;
253
- /**
254
- * The unique id that identify the repository where the content is created
255
- */
256
- repositoryId: ContentRepositoryId;
257
- /**
258
- * The list of publishing channels where the content will be published
259
- */
260
- definitionId: ContentDefinitionId;
261
- /**
262
- * The list of publishing channels where the content will be published
263
- */
264
- channelIds: PublishingChannelId[];
265
- /**
266
- * The list of tags related to the content
267
- */
268
- tags: string[];
269
- /**
270
- * The date where the content will start to be available when published
271
- */
272
- onlineDate?: Date;
273
- /**
274
- * The date where the content will no more be available when published
275
- */
276
- offlineDate?: Date;
277
-
278
- /**
279
- * Controls if translations should be ignored when publishing
280
- */
281
- contentLocalizationSettings?: LocalizationSettings;
282
-
283
- /**
284
- * will bypass content definition mnemonicId validation for every linked-content field
285
- */
286
- bypassLinkedContentValidation?: boolean;
287
-
288
- /**
289
- * set an identifier coming from a third party application
290
- */
291
- externalIdentifier?: string;
246
+ /**
247
+ * The unique content id
248
+ */
249
+ id: ContentId;
250
+ /**
251
+ * The content public id
252
+ */
253
+ publicId: string;
254
+ /**
255
+ * The content name
256
+ */
257
+ name: string;
258
+ /**
259
+ * The content payload (this contains all content fields and its values)
260
+ */
261
+ payload: object;
262
+ /**
263
+ * The unique id that identify the repository where the content is created
264
+ */
265
+ repositoryId: ContentRepositoryId;
266
+ /**
267
+ * The list of publishing channels where the content will be published
268
+ */
269
+ definitionId: ContentDefinitionId;
270
+ /**
271
+ * The list of publishing channels where the content will be published
272
+ */
273
+ channelIds: PublishingChannelId[];
274
+ /**
275
+ * The list of tags related to the content
276
+ */
277
+ tags: string[];
278
+ /**
279
+ * The date where the content will start to be available when published
280
+ */
281
+ onlineDate?: Date;
282
+ /**
283
+ * The date where the content will no more be available when published
284
+ */
285
+ offlineDate?: Date;
286
+
287
+ /**
288
+ * Controls if translations should be ignored when publishing
289
+ */
290
+ contentLocalizationSettings?: LocalizationSettings;
291
+
292
+ /**
293
+ * will bypass content definition mnemonicId validation for every linked-content field
294
+ */
295
+ bypassLinkedContentValidation?: boolean;
296
+
297
+ /**
298
+ * set an identifier coming from a third party application
299
+ */
300
+ externalIdentifier?: string;
292
301
  };
293
302
 
294
303
  /**
295
304
  * This type represent the data that can be used to filter a list of contents
296
305
  */
297
306
  export type ListContentsFilters = {
298
- /**
299
- * This filter is used to search contents that contain the value inserted
300
- */
301
- name?: string;
302
- /**
303
- * This filter is used to search contents that used the content definition ids inserted
304
- */
305
- contentDefinitionIds?: number[];
306
- /**
307
- * This filter is used to search contents that used the content definition mnemonic ids inserted
308
- */
309
- definitionMnemonicIds?: string[];
310
- /**
311
- * This filter is used to search contents that are saved in the repository ids inserted
312
- */
313
- repositoryIds?: number[];
314
- /**
315
- * This filter is used to search contents that contains the public ids inserted
316
- */
317
- publicIds?: string[];
318
- /**
319
- * This filter is used to search contents that has the tags inserted
320
- */
321
- tags?: string[];
322
- /**
323
- * This filter is used to search contents in the content status inserted
324
- */
325
- contentsStatus: ContentsStatus;
326
-
327
- /**
328
- * Filter list by ContentTranslation status
329
- */
330
- translationStatus?: ContentTranslationStatus;
307
+ /**
308
+ * This filter is used to search contents that contain the value inserted
309
+ */
310
+ name?: string;
311
+ /**
312
+ * This filter is used to search contents that used the content definition ids inserted
313
+ */
314
+ contentDefinitionIds?: number[];
315
+ /**
316
+ * This filter is used to search contents that used the content definition mnemonic ids inserted
317
+ */
318
+ definitionMnemonicIds?: string[];
319
+ /**
320
+ * This filter is used to search contents that are saved in the repository ids inserted
321
+ */
322
+ repositoryIds?: number[];
323
+ /**
324
+ * This filter is used to search contents that contains the public ids inserted
325
+ */
326
+ publicIds?: string[];
327
+ /**
328
+ * This filter is used to search contents that has the tags inserted
329
+ */
330
+ tags?: string[];
331
+ /**
332
+ * This filter is used to search contents in the content status inserted
333
+ */
334
+ contentsStatus: ContentsStatus;
335
+
336
+ /**
337
+ * Filter list by ContentTranslation status
338
+ */
339
+ translationStatus?: ContentTranslationStatus;
331
340
  };
332
341
 
333
342
  /**
334
343
  * This type represent the data needed to make a list content API request
335
344
  */
336
345
  export type ListContentsRequest = {
337
- /**
338
- * The contents to skip (used to paginate the result)
339
- */
340
- skip: number;
341
- /**
342
- * The contents to take (used to paginate the result)
343
- */
344
- take: number;
345
- /**
346
- * The data used to filter the list of content
347
- */
348
- filters: ListContentsFilters;
346
+ /**
347
+ * The contents to skip (used to paginate the result)
348
+ */
349
+ skip: number;
350
+ /**
351
+ * The contents to take (used to paginate the result)
352
+ */
353
+ take: number;
354
+ /**
355
+ * The data used to filter the list of content
356
+ */
357
+ filters: ListContentsFilters;
349
358
  };
350
359
 
351
360
  /**
352
361
  * This type represent the model of the single content returned from the list of content API request
353
362
  */
354
363
  export type ListContentsItem = {
355
- /**
356
- * The unique content id
357
- */
358
- id: ContentId;
359
- /**
360
- * The content public id
361
- */
362
- publicId: string;
363
- /**
364
- * The content name
364
+ /**
365
+ * The unique content id
366
+ */
367
+ id: ContentId;
368
+ /**
369
+ * The content public id
370
+ */
371
+ publicId: string;
372
+ /**
373
+ * The content name
374
+ */
375
+ name: string;
376
+ /**
377
+ * The content creation date
378
+ */
379
+ createdDate: Date;
380
+ /**
381
+ * The content updated date
382
+ */
383
+ lastModifiedDate: Date;
384
+ /**
385
+ * The date where the content will start to be available when published
386
+ */
387
+ onlineDate?: Date;
388
+ /**
389
+ * The date where the content will no more be available when published
390
+ */
391
+ offlineDate?: Date;
392
+ /**
393
+ * The creator of the content
394
+ */
395
+ author: AuthorResponse;
396
+ /**
397
+ * The data of the definition related to the content
398
+ */
399
+ definition: {
400
+ /**
401
+ * The content definition unique id
402
+ */
403
+ id: ContentDefinitionId;
404
+ /**
405
+ * The content definition mnemonic id
406
+ */
407
+ mnemonicId: string;
408
+ /**
409
+ * The content definition name
365
410
  */
366
411
  name: string;
412
+ };
413
+ /**
414
+ * The data of the repository related to the content
415
+ */
416
+ repository: {
367
417
  /**
368
- * The content creation date
369
- */
370
- createdDate: Date;
371
- /**
372
- * The content updated date
373
- */
374
- lastModifiedDate: Date;
375
- /**
376
- * The date where the content will start to be available when published
377
- */
378
- onlineDate?: Date;
379
- /**
380
- * The date where the content will no more be available when published
381
- */
382
- offlineDate?: Date;
383
- /**
384
- * The creator of the content
385
- */
386
- author: AuthorResponse;
387
- /**
388
- * The data of the definition related to the content
389
- */
390
- definition: {
391
- /**
392
- * The content definition unique id
393
- */
394
- id: ContentDefinitionId;
395
- /**
396
- * The content definition mnemonic id
397
- */
398
- mnemonicId: string,
399
- /**
400
- * The content definition name
401
- */
402
- name: string;
403
- };
404
- /**
405
- * The data of the repository related to the content
406
- */
407
- repository: {
408
- /**
409
- * The repository unique id
410
- */
411
- id: ContentRepositoryId;
412
- /**
413
- * The repository mnemonic id
414
- */
415
- mnemonicId: string;
416
- /**
417
- * The repository name
418
- */
419
- name: string;
420
- /**
421
- * The repository color
422
- */
423
- color: string;
424
- };
425
- /**
426
- * The latest author that modified the content
427
- */
428
- latestContributor: AuthorResponse;
429
- /**
430
- * The tags saved with the content
431
- */
432
- tags: string[];
433
- /**
434
- * The archive status of the content
418
+ * The repository unique id
435
419
  */
436
- archived: boolean;
420
+ id: ContentRepositoryId;
437
421
  /**
438
- * The archive date of the content
422
+ * The repository mnemonic id
439
423
  */
440
- archivedDate?: Date;
424
+ mnemonicId: string;
441
425
  /**
442
- * The publishing status of the content
426
+ * The repository name
443
427
  */
444
- status?: ContentStatus[];
445
- /**
446
- * The version of the content
447
- */
448
- version: number;
449
-
450
- /**
451
- * Channels where the content is published
452
- */
453
- channels: PublishingChannelResponse[];
454
-
455
- /**
456
- * Locale of the content
457
- */
458
- locale: string;
459
-
428
+ name: string;
460
429
  /**
461
- * Translations of the content
462
- */
463
- translations: ContentTranslation[];
430
+ * The repository color
431
+ */
432
+ color: string;
433
+ };
434
+ /**
435
+ * The latest author that modified the content
436
+ */
437
+ latestContributor: AuthorResponse;
438
+ /**
439
+ * The tags saved with the content
440
+ */
441
+ tags: string[];
442
+ /**
443
+ * The archive status of the content
444
+ */
445
+ archived: boolean;
446
+ /**
447
+ * The archive date of the content
448
+ */
449
+ archivedDate?: Date;
450
+ /**
451
+ * The publishing status of the content
452
+ */
453
+ status?: ContentStatus[];
454
+ /**
455
+ * The version of the content
456
+ */
457
+ version: number;
458
+
459
+ /**
460
+ * Channels where the content is published
461
+ */
462
+ channels: PublishingChannelResponse[];
463
+
464
+ /**
465
+ * Locale of the content
466
+ */
467
+ locale: string;
468
+
469
+ /**
470
+ * Translations of the content
471
+ */
472
+ translations: Pick<
473
+ ContentTranslation,
474
+ | "id"
475
+ | "spaceId"
476
+ | "locale"
477
+ | "createdDate"
478
+ | "lastModifiedDate"
479
+ | "status"
480
+ | "version"
481
+ >[];
464
482
  };
465
483
 
466
484
  /**
@@ -472,145 +490,145 @@ export type ListContentsResponse = PagedListResponse<ListContentsItem>;
472
490
  * This type represent the data needed to make a duplicate content API request
473
491
  */
474
492
  export type DuplicateContentRequest = {
475
- /**
476
- * The unique content id to duplicate
477
- */
478
- id: ContentId;
493
+ /**
494
+ * The unique content id to duplicate
495
+ */
496
+ id: ContentId;
479
497
  };
480
498
 
481
499
  /**
482
500
  * This type represent the response of the duplicate content API request
483
501
  */
484
502
  export type DuplicateContentResponse = {
485
- /**
486
- * The duplicated content unique id
487
- */
488
- duplicatedId: ContentId;
503
+ /**
504
+ * The duplicated content unique id
505
+ */
506
+ duplicatedId: ContentId;
489
507
  };
490
508
 
491
509
  /**
492
510
  * This type represent the data needed to make a get content API request
493
511
  */
494
512
  export type GetContentRequest = {
495
- /**
496
- * The unique content id to retrieve
497
- */
498
- id: ContentId;
499
- /**
500
- * This value will encode in the response all the content that use this content as linked content
501
- */
502
- retrieveLinkingContents?: boolean;
513
+ /**
514
+ * The unique content id to retrieve
515
+ */
516
+ id: ContentId;
517
+ /**
518
+ * This value will encode in the response all the content that use this content as linked content
519
+ */
520
+ retrieveLinkingContents?: boolean;
503
521
  };
504
522
 
505
523
  /**
506
524
  * This type represent the model of a content
507
525
  */
508
526
  export type ContentResponse = {
509
- /**
510
- * The unique content id
511
- */
512
- id: ContentId;
513
- /**
514
- * The content public id
515
- */
516
- publicId: string;
517
- /**
518
- * The content version
519
- */
520
- version: number;
521
- /**
522
- * The content name
523
- */
524
- name: string;
525
- /**
526
- * The content payload (this contains all content fields and its values)
527
- */
528
- payload: object;
529
- /**
530
- * The creation date of the content
531
- */
532
- createdDate: Date;
533
- /**
534
- * The last modified date of the content
535
- */
536
- lastModifiedDate: Date;
537
- /**
538
- * The author of the content
539
- */
540
- author: AuthorResponse;
541
- /**
542
- * The definition related to the content
543
- */
544
- definition: ContentDefinitionResponse;
545
- /**
546
- * The repository related to the content
547
- */
548
- repository: ContentRepositoryResponse;
549
- /**
550
- * The publishing channel where the content will be published
551
- */
552
- channels: PublishingChannelResponse[];
553
- /**
554
- * The date where the content will start to be available when published
555
- */
556
- onlineDate?: Date;
557
- /**
558
- * The date where the content will no more be available when published
559
- */
560
- offlineDate?: Date;
561
- /**
562
- * The tags saved with the content
563
- */
564
- tags: string[];
565
- /**
566
- * The list indexed fields of the content
567
- */
568
- indexDetails: IndexedContent;
569
- /**
570
- * The latest author that modified the content
571
- */
572
- latestContributor: AuthorResponse;
573
- /**
574
- * The linked contents used in this content
575
- */
576
- linkedContents: LinkedContentsInfo;
577
- /**
578
- * The archived status of the content
579
- */
580
- archived: boolean;
581
- /**
582
- * The archive date of the content
583
- */
584
- archivedDate?: Date;
585
- /**
586
- * The publishing status of the content
587
- */
588
- status?: ContentStatus;
589
-
590
- /**
591
- * Controls if translations should be ignored when publishing
592
- */
593
- contentLocalizationSettings?: LocalizationSettings;
594
-
595
- /**
596
- * Content's checksum (it's different whenever at least one localized field changes)
597
- */
598
- checksum: string;
599
-
600
- /**
601
- * Content's localized values
602
- */
603
- translations: ContentTranslation[];
604
-
605
- /**
606
- * Content's locale
607
- */
608
- locale: string;
609
-
610
- /**
611
- * Content's external identifier
612
- */
613
- externalIdentifier?: string;
527
+ /**
528
+ * The unique content id
529
+ */
530
+ id: ContentId;
531
+ /**
532
+ * The content public id
533
+ */
534
+ publicId: string;
535
+ /**
536
+ * The content version
537
+ */
538
+ version: number;
539
+ /**
540
+ * The content name
541
+ */
542
+ name: string;
543
+ /**
544
+ * The content payload (this contains all content fields and its values)
545
+ */
546
+ payload: object;
547
+ /**
548
+ * The creation date of the content
549
+ */
550
+ createdDate: Date;
551
+ /**
552
+ * The last modified date of the content
553
+ */
554
+ lastModifiedDate: Date;
555
+ /**
556
+ * The author of the content
557
+ */
558
+ author: AuthorResponse;
559
+ /**
560
+ * The definition related to the content
561
+ */
562
+ definition: ContentDefinitionResponse;
563
+ /**
564
+ * The repository related to the content
565
+ */
566
+ repository: ContentRepositoryResponse;
567
+ /**
568
+ * The publishing channel where the content will be published
569
+ */
570
+ channels: PublishingChannelResponse[];
571
+ /**
572
+ * The date where the content will start to be available when published
573
+ */
574
+ onlineDate?: Date;
575
+ /**
576
+ * The date where the content will no more be available when published
577
+ */
578
+ offlineDate?: Date;
579
+ /**
580
+ * The tags saved with the content
581
+ */
582
+ tags: string[];
583
+ /**
584
+ * The list indexed fields of the content
585
+ */
586
+ indexDetails: IndexedContent;
587
+ /**
588
+ * The latest author that modified the content
589
+ */
590
+ latestContributor: AuthorResponse;
591
+ /**
592
+ * The linked contents used in this content
593
+ */
594
+ linkedContents: LinkedContentsInfo;
595
+ /**
596
+ * The archived status of the content
597
+ */
598
+ archived: boolean;
599
+ /**
600
+ * The archive date of the content
601
+ */
602
+ archivedDate?: Date;
603
+ /**
604
+ * The publishing status of the content
605
+ */
606
+ status?: ContentStatus;
607
+
608
+ /**
609
+ * Controls if translations should be ignored when publishing
610
+ */
611
+ contentLocalizationSettings?: LocalizationSettings;
612
+
613
+ /**
614
+ * Content's checksum (it's different whenever at least one localized field changes)
615
+ */
616
+ checksum: string;
617
+
618
+ /**
619
+ * Content's localized values
620
+ */
621
+ translations: ContentTranslation[];
622
+
623
+ /**
624
+ * Content's locale
625
+ */
626
+ locale: string;
627
+
628
+ /**
629
+ * Content's external identifier
630
+ */
631
+ externalIdentifier?: string;
614
632
  };
615
633
 
616
634
  /**
@@ -622,14 +640,14 @@ export type LinkingContents = ContentResponse;
622
640
  * This type represent the response of a get content API request
623
641
  */
624
642
  export type GetContentResponse = {
625
- /**
626
- * The requested content
627
- */
628
- content: ContentResponse | undefined;
629
- /**
630
- * The contents that use the requested content
631
- */
632
- linkingContents?: LinkingContents[];
643
+ /**
644
+ * The requested content
645
+ */
646
+ content: ContentResponse | undefined;
647
+ /**
648
+ * The contents that use the requested content
649
+ */
650
+ linkingContents?: LinkingContents[];
633
651
  };
634
652
 
635
653
  /**
@@ -645,19 +663,19 @@ export type UpdateContentResponse = ContentResponse;
645
663
  * This type represent the data needed to make a list public id API request
646
664
  */
647
665
  export type ListPublicIdsRequest = {
666
+ /**
667
+ * The admitted filters in the request
668
+ */
669
+ filters: {
648
670
  /**
649
- * The admitted filters in the request
671
+ * This filter is used to search public ids that contain the value inserted
650
672
  */
651
- filters: {
652
- /**
653
- * This filter is used to search public ids that contain the value inserted
654
- */
655
- publicId?: string;
656
- /**
657
- * This filter is used to filter public ids in contents of a specific content definition id
658
- */
659
- definitionId?: ContentDefinitionId;
660
- };
673
+ publicId?: string;
674
+ /**
675
+ * This filter is used to filter public ids in contents of a specific content definition id
676
+ */
677
+ definitionId?: ContentDefinitionId;
678
+ };
661
679
  };
662
680
 
663
681
  /**
@@ -669,10 +687,10 @@ export type ListPublicIdsResponse = string[];
669
687
  * This type represent the data needed to make a delete content API request
670
688
  */
671
689
  export type DeleteContentRequest = {
672
- /**
673
- * The unique content id to delete
674
- */
675
- id: ContentId;
690
+ /**
691
+ * The unique content id to delete
692
+ */
693
+ id: ContentId;
676
694
  };
677
695
 
678
696
  /**
@@ -684,14 +702,14 @@ export type DeleteContentResponse = ContentResponse;
684
702
  * This type represent the data needed to make a toggle archive content API request
685
703
  */
686
704
  export type ToggleArchivedContentRequest = {
687
- /**
688
- * The unique content id where to make the toggle archive request
689
- */
690
- id: ContentId;
691
- /**
692
- * This value represent the archive status to set in the specified content
693
- */
694
- archived: boolean;
705
+ /**
706
+ * The unique content id where to make the toggle archive request
707
+ */
708
+ id: ContentId;
709
+ /**
710
+ * This value represent the archive status to set in the specified content
711
+ */
712
+ archived: boolean;
695
713
  };
696
714
 
697
715
  /**
@@ -703,65 +721,65 @@ export type ToggleArchivedContentResponse = ContentResponse;
703
721
  * Thin enum represent all content fields violations error codes
704
722
  */
705
723
  export enum ContentFieldViolationCodes {
706
- genericContentDefinition = 'generic.ContentDefinitionNotFound',
707
- payloadMissingRequiredField = 'payload.MissingRequiredField',
708
- payloadUnknownField = 'payload.unknownField',
709
- arrayFieldMaxLengthExceeded = 'arrayField.maxLengthExceeded',
710
- arrayFieldMinLengthNotReached = 'arrayField.minLengthNotReached',
711
- arrayFieldValueIsNotAnArray = 'arrayField.valueIsNotAnArray',
712
- booleanFieldValueIsNotABoolean = 'booleanField.valueIsNotABoolean',
713
- cloudinaryImageFieldInvalidPublicIdValue = 'cloudinaryImageField.valueHaveAnInvalidPublicId',
714
- cloudinaryImageFieldInvalidTransformationJson = 'cloudinaryImageField.valueHaveInvalidTransformationsJson',
715
- cloudinaryPublicIdInvalidPublicIdValue = 'cloudinaryPublicIdField.valueIsAnInvalidPublicId',
716
- cloudinaryRawFieldInvalidPublicIdValue = 'cloudinaryRawField.valueIsAnInvalidPublicId',
717
- cloudinaryVideoFieldInvalidPublicIdValue = 'cloudinaryVideoField.valueHaveAnInvalidPublicId',
718
- cloudinaryVideoFieldInvalidTransformationJson = 'cloudinaryVideoField.valueHaveInvalidTransformationsJson',
719
- dateFieldUnspecifiedTimeZone = 'dateField.valueHasUnspecifiedTimeZone',
720
- dateFieldValueIsAfterLimit = 'dateField.valueIsAfterLimit',
721
- dateFieldValueIsBeforeLimit = 'dateField.valueIsBeforeLimit',
722
- dateFieldValueIsInvalidDate = 'dateField.valueIsInvalidDate',
723
- fragmentFieldValueIsNotAFragment = 'fragmentField.valueIsNotAFragment',
724
- linkContentFieldInvalidDefinitionType = 'linkContentField.invalidDefinitionType',
725
- linkContentFieldNotFound = 'linkContentField.notFound',
726
- linkContentFieldValueIsNotALinkedContent = 'linkContentField.valueIsNotALinkedContent',
727
- longTextFieldMaxLengthExceeded = 'longTextField.maxLengthExceeded',
728
- longTextFieldMinLengthNotReached = 'longTextField.minLengthNotReached',
729
- longTextFieldValueIsNotAString = 'longTextField.valueIsNotAString',
730
- longTextFieldValueIsNotAValidJSON = 'longTextField.valueIsNotAValidJSON',
731
- longTextFieldValueIsNotAValidMarkdown = 'longTextField.valueIsNotAValidMarkdown',
732
- longTextFieldValueIsNotAValidHTML = 'longTextField.valueIsNotAValidHtml',
733
- longTextFieldBlankValueNotAllowed = 'longTextField.blankValueNotAllowed',
734
- longTextFieldUnknownSubType = 'longTextField.valueHasAnUnknownSubType',
735
- numberFieldValueBelowMin = 'numberField.valueIsBelowMin',
736
- numberFieldValueIsNotANumber = 'numberField.valueIsNotANumber',
737
- numberFieldValueOverMax = 'numberField.valueIsOverMax',
738
- numberFieldValueOverMaxInfinite = 'numberField.valueTreatedAsAMaxInfinite',
739
- numberFieldValueBelowMaxMin = 'numberField.valueTreatedAsAMinInfinite',
740
- numberFieldValueMissingInListOfValue = 'numberField.valueMissingInListOfValue',
741
- oneFragmentOfFieldNameNotAString = 'oneFragmentOfField.fieldNameIsNotAString',
742
- oneFragmentOfValueNotAFragment = 'oneFragmentOfField.fieldValueIsNotAFragment',
743
- oneFragmentOfFragmentNotAllowed = 'oneFragmentOfField.fragmentNotAllowed',
744
- oneFragmentOfFragmentNotFound = 'oneFragmentOfField.fragmentNotFound',
745
- oneFragmentOfValueIsNotAOneFragmentOf = 'oneFragmentOfField.valueIsNotAOneFragmentOf',
746
- oneLinkedContentOfValueIsNotAOneLinkedContentOf = 'oneLinkedContentOfField.valueIsNotAOneLinkedContentOf',
747
- oneLinkedContentOfContentNotFound = 'oneLinkedContentOfField.contentNotFound',
748
- oneLinkedContentOfDefinitionNotAllowed = 'oneLinkedContentOfField.contentDefinitionNotAllowed',
749
- textFieldMaxLengthExceeded = 'textField.maxLengthExceeded',
750
- textFieldMinLengthNotReached = 'textField.minLengthNotReached',
751
- textFieldPatternNotMatched = 'textField.patternNotMatched',
752
- textFieldValueMissingInListOfValue = 'textField.valueMissingInListOfValue',
753
- textFieldValueIsNotAString = 'textField.valueIsNotAString',
754
- textFieldBlankValueNotAllowed = 'textField.blankValueNotAllowed',
724
+ genericContentDefinition = "generic.ContentDefinitionNotFound",
725
+ payloadMissingRequiredField = "payload.MissingRequiredField",
726
+ payloadUnknownField = "payload.unknownField",
727
+ arrayFieldMaxLengthExceeded = "arrayField.maxLengthExceeded",
728
+ arrayFieldMinLengthNotReached = "arrayField.minLengthNotReached",
729
+ arrayFieldValueIsNotAnArray = "arrayField.valueIsNotAnArray",
730
+ booleanFieldValueIsNotABoolean = "booleanField.valueIsNotABoolean",
731
+ cloudinaryImageFieldInvalidPublicIdValue = "cloudinaryImageField.valueHaveAnInvalidPublicId",
732
+ cloudinaryImageFieldInvalidTransformationJson = "cloudinaryImageField.valueHaveInvalidTransformationsJson",
733
+ cloudinaryPublicIdInvalidPublicIdValue = "cloudinaryPublicIdField.valueIsAnInvalidPublicId",
734
+ cloudinaryRawFieldInvalidPublicIdValue = "cloudinaryRawField.valueIsAnInvalidPublicId",
735
+ cloudinaryVideoFieldInvalidPublicIdValue = "cloudinaryVideoField.valueHaveAnInvalidPublicId",
736
+ cloudinaryVideoFieldInvalidTransformationJson = "cloudinaryVideoField.valueHaveInvalidTransformationsJson",
737
+ dateFieldUnspecifiedTimeZone = "dateField.valueHasUnspecifiedTimeZone",
738
+ dateFieldValueIsAfterLimit = "dateField.valueIsAfterLimit",
739
+ dateFieldValueIsBeforeLimit = "dateField.valueIsBeforeLimit",
740
+ dateFieldValueIsInvalidDate = "dateField.valueIsInvalidDate",
741
+ fragmentFieldValueIsNotAFragment = "fragmentField.valueIsNotAFragment",
742
+ linkContentFieldInvalidDefinitionType = "linkContentField.invalidDefinitionType",
743
+ linkContentFieldNotFound = "linkContentField.notFound",
744
+ linkContentFieldValueIsNotALinkedContent = "linkContentField.valueIsNotALinkedContent",
745
+ longTextFieldMaxLengthExceeded = "longTextField.maxLengthExceeded",
746
+ longTextFieldMinLengthNotReached = "longTextField.minLengthNotReached",
747
+ longTextFieldValueIsNotAString = "longTextField.valueIsNotAString",
748
+ longTextFieldValueIsNotAValidJSON = "longTextField.valueIsNotAValidJSON",
749
+ longTextFieldValueIsNotAValidMarkdown = "longTextField.valueIsNotAValidMarkdown",
750
+ longTextFieldValueIsNotAValidHTML = "longTextField.valueIsNotAValidHtml",
751
+ longTextFieldBlankValueNotAllowed = "longTextField.blankValueNotAllowed",
752
+ longTextFieldUnknownSubType = "longTextField.valueHasAnUnknownSubType",
753
+ numberFieldValueBelowMin = "numberField.valueIsBelowMin",
754
+ numberFieldValueIsNotANumber = "numberField.valueIsNotANumber",
755
+ numberFieldValueOverMax = "numberField.valueIsOverMax",
756
+ numberFieldValueOverMaxInfinite = "numberField.valueTreatedAsAMaxInfinite",
757
+ numberFieldValueBelowMaxMin = "numberField.valueTreatedAsAMinInfinite",
758
+ numberFieldValueMissingInListOfValue = "numberField.valueMissingInListOfValue",
759
+ oneFragmentOfFieldNameNotAString = "oneFragmentOfField.fieldNameIsNotAString",
760
+ oneFragmentOfValueNotAFragment = "oneFragmentOfField.fieldValueIsNotAFragment",
761
+ oneFragmentOfFragmentNotAllowed = "oneFragmentOfField.fragmentNotAllowed",
762
+ oneFragmentOfFragmentNotFound = "oneFragmentOfField.fragmentNotFound",
763
+ oneFragmentOfValueIsNotAOneFragmentOf = "oneFragmentOfField.valueIsNotAOneFragmentOf",
764
+ oneLinkedContentOfValueIsNotAOneLinkedContentOf = "oneLinkedContentOfField.valueIsNotAOneLinkedContentOf",
765
+ oneLinkedContentOfContentNotFound = "oneLinkedContentOfField.contentNotFound",
766
+ oneLinkedContentOfDefinitionNotAllowed = "oneLinkedContentOfField.contentDefinitionNotAllowed",
767
+ textFieldMaxLengthExceeded = "textField.maxLengthExceeded",
768
+ textFieldMinLengthNotReached = "textField.minLengthNotReached",
769
+ textFieldPatternNotMatched = "textField.patternNotMatched",
770
+ textFieldValueMissingInListOfValue = "textField.valueMissingInListOfValue",
771
+ textFieldValueIsNotAString = "textField.valueIsNotAString",
772
+ textFieldBlankValueNotAllowed = "textField.blankValueNotAllowed",
755
773
  }
756
774
 
757
775
  /**
758
776
  * Request type for getContentStatus
759
777
  */
760
778
  export type GetContentStatusRequest = {
761
- /**
762
- * Id of the content required to get its status
763
- */
764
- id: ContentId;
779
+ /**
780
+ * Id of the content required to get its status
781
+ */
782
+ id: ContentId;
765
783
  };
766
784
 
767
785
  /**
@@ -773,26 +791,26 @@ export type GetContentStatusResponse = ContentStatus[];
773
791
  * Request type for changeLocale
774
792
  */
775
793
  export type ChangeLocaleRequest = {
776
- /**
777
- * Id of the content whose locale you'd like to change
778
- */
779
- contentId: ContentId;
780
- /**
781
- * New locale to assign to the content
782
- */
783
- locale: string;
794
+ /**
795
+ * Id of the content whose locale you'd like to change
796
+ */
797
+ contentId: ContentId;
798
+ /**
799
+ * New locale to assign to the content
800
+ */
801
+ locale: string;
784
802
  };
785
803
 
786
804
  export type ChangeLocaleResponse = ContentResponse;
787
805
 
788
806
  export enum LocalizationSettings {
789
- DEFAULT = 'default',
790
- MAIN = 'main'
807
+ DEFAULT = "default",
808
+ MAIN = "main",
791
809
  }
792
810
 
793
811
  export type ToggleContentTranslationsRequest = {
794
- contentId: ContentId;
795
- localizationSettings: LocalizationSettings;
812
+ contentId: ContentId;
813
+ localizationSettings: LocalizationSettings;
796
814
  };
797
815
 
798
816
  export type ToggleContentTranslationsResponse = ContentResponse;