@contentchef/contentchef-types 11.0.0 → 11.1.0-alpha.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.
@@ -0,0 +1,574 @@
1
+ import { AuthorResponse } from './Author';
2
+ import { PagedListResponse } from './common';
3
+ import { AttributeViolation, ContentDefinitionId, GetContentDefinitionResponse, SchemaFieldViolationsErrors } from './ContentDefinition';
4
+ import { ContentDefinitionSchemaInput, Field, FragmentDefinition } from './ContentDefinitionSchema';
5
+ /**
6
+ * The component unique id
7
+ */
8
+ export type ComponentId = number;
9
+ /**
10
+ * A component's mnemonicId must match this pattern. It becomes the fragment's name in every definition
11
+ * using the component, so it is unique in the space, case insensitively, and never changes
12
+ */
13
+ export declare const COMPONENT_NAME_PATTERN: RegExp;
14
+ /**
15
+ * This type represent the fragment a component defines: its fields and optionally its labels, nothing
16
+ * else. Its labels, hints, placeholders and list value labels need at least one locale, any locale
17
+ */
18
+ export type ComponentFragment = Omit<FragmentDefinition, 'component'>;
19
+ /**
20
+ * This type represent a field a version renames, declared when it is published so that the values
21
+ * written under the old name follow
22
+ */
23
+ export type ComponentRename = {
24
+ from: string;
25
+ to: string;
26
+ };
27
+ /**
28
+ * This type represent field names, by what happened to them between two versions of a fragment.
29
+ * A field whose type changed is `changed`; a renamed field is in `renamed`, and in neither `added` nor
30
+ * `removed`
31
+ */
32
+ export type FieldChanges = {
33
+ added: string[];
34
+ removed: string[];
35
+ changed: string[];
36
+ renamed: ComponentRename[];
37
+ };
38
+ /**
39
+ * This type represent the author of a component, or of one of its versions
40
+ */
41
+ export type ComponentAuthor = Pick<AuthorResponse, 'authorId' | 'fullName'>;
42
+ /**
43
+ * This type represent a published version of a component, which never changes
44
+ */
45
+ export type ComponentVersion = ComponentFragment & {
46
+ /**
47
+ * The version number, from 1
48
+ */
49
+ version: number;
50
+ /**
51
+ * The changes from the version before. Version 1 lists every field as added
52
+ */
53
+ changes: FieldChanges;
54
+ /**
55
+ * The note given when publishing
56
+ */
57
+ note?: string;
58
+ publishedBy: ComponentAuthor;
59
+ publishedDate: Date;
60
+ };
61
+ /**
62
+ * This type represent a version of a component without its fragment
63
+ */
64
+ export type ComponentVersionSummary = Omit<ComponentVersion, 'labels' | 'fields'>;
65
+ /**
66
+ * This type represent a definition using a component
67
+ */
68
+ export type ComponentUsedBy = {
69
+ definitionId: ContentDefinitionId;
70
+ definitionMnemonicId: string;
71
+ definitionName: string;
72
+ /**
73
+ * The component version the definition copies
74
+ */
75
+ version: number;
76
+ };
77
+ /**
78
+ * This type represent a component as the list components API request answers it
79
+ *
80
+ * A component is a fragment a space defines once, for any of its definitions to use. Publishing its
81
+ * draft makes its next version, and a definition moves to a newer version only when it is upgraded
82
+ */
83
+ export type ComponentSummary = {
84
+ id: ComponentId;
85
+ /**
86
+ * The component mnemonic id, matching [[COMPONENT_NAME_PATTERN]]
87
+ */
88
+ mnemonicId: string;
89
+ name: string;
90
+ /**
91
+ * An archived component keeps working in the definitions using it, and cannot be added to another
92
+ * definition or component
93
+ */
94
+ archived: boolean;
95
+ /**
96
+ * The latest version, null until the first publish
97
+ */
98
+ latestVersion: number | null;
99
+ /**
100
+ * Whether the draft differs from the latest version, true before the first publish
101
+ */
102
+ draftChanged: boolean;
103
+ /**
104
+ * How many definitions use the component, and how many of those are on an older version
105
+ */
106
+ usage: {
107
+ definitions: number;
108
+ behind: number;
109
+ };
110
+ };
111
+ /**
112
+ * This type represent the model of a component, as every component API request but list answers it
113
+ */
114
+ export type ComponentResponse = ComponentSummary & {
115
+ archivedDate: Date | null;
116
+ /**
117
+ * The fragment being edited
118
+ */
119
+ draft: ComponentFragment;
120
+ /**
121
+ * The version asked for, the latest by default, null before the first publish
122
+ */
123
+ version: ComponentVersion | null;
124
+ /**
125
+ * Every version, newest first
126
+ */
127
+ versions: ComponentVersionSummary[];
128
+ usedBy: ComponentUsedBy[];
129
+ createdDate: Date;
130
+ lastModifiedDate: Date;
131
+ author: ComponentAuthor;
132
+ latestContributor: ComponentAuthor;
133
+ };
134
+ /**
135
+ * This type represent all possible filters used to retrieve a list of components
136
+ */
137
+ export type ListComponentsFilters = {
138
+ /**
139
+ * Matches the name or the mnemonic id, case insensitively, anywhere in it. At most 100 characters
140
+ */
141
+ name?: string;
142
+ /**
143
+ * Left out, the list holds both archived and not archived components
144
+ */
145
+ archived?: boolean;
146
+ };
147
+ /**
148
+ * This type represent the data needed to make a list components API request
149
+ */
150
+ export type ListComponentsRequest = {
151
+ /**
152
+ * The number of components to skip, 0 by default
153
+ */
154
+ skip?: number;
155
+ /**
156
+ * The number of components to take, 10 by default and at most 100
157
+ */
158
+ take?: number;
159
+ filters?: ListComponentsFilters;
160
+ };
161
+ /**
162
+ * This type represent the response of a list components API request
163
+ */
164
+ export type ListComponentsResponse = PagedListResponse<ComponentSummary>;
165
+ /**
166
+ * This type represent the data needed to make a get component API request, by id or by mnemonic id
167
+ */
168
+ export type GetComponentRequest = ({
169
+ id: ComponentId;
170
+ } | {
171
+ mnemonicId: string;
172
+ }) & {
173
+ /**
174
+ * The version to answer with, the latest by default
175
+ */
176
+ version?: number;
177
+ };
178
+ /**
179
+ * This type represent the response of a get component API request
180
+ */
181
+ export type GetComponentResponse = ComponentResponse;
182
+ /**
183
+ * This type represent the data needed to make a create component API request
184
+ */
185
+ export type CreateComponentRequest = {
186
+ /**
187
+ * The component mnemonic id, matching [[COMPONENT_NAME_PATTERN]]
188
+ */
189
+ mnemonicId: string;
190
+ name: string;
191
+ draft: ComponentFragment;
192
+ };
193
+ /**
194
+ * This type represent the response of a create component API request, with no version yet
195
+ */
196
+ export type CreateComponentResponse = ComponentResponse;
197
+ /**
198
+ * This type represent the data needed to make an update component API request. The name and the whole
199
+ * draft are replaced, and the last save wins
200
+ */
201
+ export type UpdateComponentRequest = {
202
+ id: ComponentId;
203
+ name: string;
204
+ draft: ComponentFragment;
205
+ };
206
+ /**
207
+ * This type represent the response of an update component API request
208
+ */
209
+ export type UpdateComponentResponse = ComponentResponse;
210
+ /**
211
+ * This type represent the data needed to make a publish component API request
212
+ */
213
+ export type PublishComponentRequest = {
214
+ id: ComponentId;
215
+ /**
216
+ * A note on the version, at most 2000 characters
217
+ */
218
+ note?: string;
219
+ /**
220
+ * The fields the version renames: `from` a field of the latest version the draft no longer has, `to`
221
+ * a field of the draft the latest version does not have, of the same type and changed only as a kept
222
+ * field may. A name is in one rename at most
223
+ */
224
+ renames?: ComponentRename[];
225
+ };
226
+ /**
227
+ * This type represent the response of a publish component API request, its `version` the one just
228
+ * published
229
+ */
230
+ export type PublishComponentResponse = ComponentResponse;
231
+ /**
232
+ * This type represent the data needed to make a toggle archived component API request
233
+ */
234
+ export type ToggleArchivedComponentRequest = {
235
+ id: ComponentId;
236
+ archived: boolean;
237
+ };
238
+ /**
239
+ * This type represent the response of a toggle archived component API request
240
+ */
241
+ export type ToggleArchivedComponentResponse = ComponentResponse;
242
+ /**
243
+ * This type represent the data needed to make an adopt component API request: the definition's own
244
+ * fragment named `mnemonicId` becomes the managed fragment of that component version
245
+ */
246
+ export type AdoptComponentRequest = {
247
+ definitionId: ContentDefinitionId;
248
+ mnemonicId: string;
249
+ version: number;
250
+ };
251
+ /**
252
+ * This type represent the response of an adopt component API request: the definition, as the get
253
+ * content definition API request answers it
254
+ */
255
+ export type AdoptComponentResponse = NonNullable<GetContentDefinitionResponse>;
256
+ /**
257
+ * This type represent the data needed to make a promote component API request: the definition's own
258
+ * fragment becomes version 1 of a new component, whose mnemonic id is the fragment's name
259
+ */
260
+ export type PromoteComponentRequest = {
261
+ definitionId: ContentDefinitionId;
262
+ fragment: string;
263
+ /**
264
+ * The component name, the fragment's name by default
265
+ */
266
+ name?: string;
267
+ };
268
+ /**
269
+ * This type represent the response of a promote component API request
270
+ */
271
+ export type PromoteComponentResponse = {
272
+ component: ComponentResponse;
273
+ /**
274
+ * The definition, as the get content definition API request answers it
275
+ */
276
+ definition: NonNullable<GetContentDefinitionResponse>;
277
+ };
278
+ /**
279
+ * Thin enum represent the error types of the component API requests, and of the content definition
280
+ * ones using components. Each is the `type` of a `RequestError`, whose `details` is a [[ComponentError]]
281
+ */
282
+ export declare enum ComponentErrorTypes {
283
+ componentNotFound = "ComponentNotFound",
284
+ componentVersionNotFound = "ComponentVersionNotFound",
285
+ failedComponentValidation = "FailedComponentValidation",
286
+ componentVersionRefused = "ComponentVersionRefused",
287
+ nothingToPublish = "NothingToPublish",
288
+ mnemonicIdNotUnique = "MnemonicIdNotUnique",
289
+ managedFragmentEdited = "ManagedFragmentEdited",
290
+ componentArchived = "ComponentArchived",
291
+ componentAdoptionRequired = "ComponentAdoptionRequired",
292
+ componentDowngradeRefused = "ComponentDowngradeRefused",
293
+ noFragmentToAdopt = "NoFragmentToAdopt",
294
+ noFragmentToPromote = "NoFragmentToPromote",
295
+ definitionMigrating = "DefinitionMigrating",
296
+ oneMigrationPerSave = "OneMigrationPerSave",
297
+ migrationPreviewNotFound = "MigrationPreviewNotFound"
298
+ }
299
+ /**
300
+ * Thin enum represent the codes of a [[ComponentVersionViolation]]
301
+ */
302
+ export declare enum ComponentVersionViolationCodes {
303
+ /**
304
+ * An added field, or one whose type changed, must be optional
305
+ */
306
+ requiredField = "component.requiredField",
307
+ /**
308
+ * An added field, or one whose type changed, can be neither compact nor a facet
309
+ */
310
+ compactOrFacet = "component.compactOrFacet",
311
+ /**
312
+ * A kept field may only change its texts, or loosen its constraints
313
+ */
314
+ notLooser = "component.notLooser",
315
+ /**
316
+ * A rename must go from a field the draft no longer has to a new one of the same type
317
+ */
318
+ invalidRename = "component.invalidRename"
319
+ }
320
+ /**
321
+ * This type represent a field a new version may not change as the draft does
322
+ */
323
+ export type ComponentVersionViolation = {
324
+ field: string;
325
+ /**
326
+ * One of [[ComponentVersionViolationCodes]]
327
+ */
328
+ code: string;
329
+ message: string;
330
+ };
331
+ type ComponentErrorOf<T extends ComponentErrorTypes, D = {}> = {
332
+ type: T;
333
+ message: string;
334
+ } & D;
335
+ /**
336
+ * This type represent the `details` of a `RequestError` whose `type` is one of [[ComponentErrorTypes]].
337
+ * Where present, `fragment` names the definition's fragment at fault
338
+ */
339
+ export type ComponentError = ComponentErrorOf<ComponentErrorTypes.componentNotFound, {
340
+ fragment?: string;
341
+ }> | ComponentErrorOf<ComponentErrorTypes.componentVersionNotFound, {
342
+ fragment?: string;
343
+ }> | ComponentErrorOf<ComponentErrorTypes.failedComponentValidation, {
344
+ /**
345
+ * The draft's violations, as a definition fragment's. A component a field references while
346
+ * unpublished or archived is reported on its `constraints` as `componentNotPublished` or
347
+ * `componentArchived`, with the components at fault as affected attributes
348
+ */
349
+ validation: (SchemaFieldViolationsErrors | AttributeViolation)[];
350
+ }> | ComponentErrorOf<ComponentErrorTypes.componentVersionRefused, {
351
+ violations: ComponentVersionViolation[];
352
+ /**
353
+ * Set by an adoption, naming the fragment it refuses
354
+ */
355
+ fragment?: string;
356
+ }> | ComponentErrorOf<ComponentErrorTypes.nothingToPublish> | ComponentErrorOf<ComponentErrorTypes.mnemonicIdNotUnique, {
357
+ mnemonicId: string;
358
+ /**
359
+ * Set by a promotion: every component mnemonic id already taken, whatever its case. Adopt
360
+ * those components instead
361
+ */
362
+ mnemonicIds?: string[];
363
+ }> | ComponentErrorOf<ComponentErrorTypes.managedFragmentEdited, {
364
+ fragment: string;
365
+ mnemonicId: string;
366
+ version: number;
367
+ }> | ComponentErrorOf<ComponentErrorTypes.componentArchived, {
368
+ fragment: string;
369
+ }> | ComponentErrorOf<ComponentErrorTypes.componentAdoptionRequired, {
370
+ fragment: string;
371
+ }> | ComponentErrorOf<ComponentErrorTypes.componentDowngradeRefused, {
372
+ fragment: string;
373
+ mnemonicId: string;
374
+ from: number;
375
+ to: number;
376
+ }> | ComponentErrorOf<ComponentErrorTypes.noFragmentToAdopt, {
377
+ fragment: string;
378
+ }> | ComponentErrorOf<ComponentErrorTypes.noFragmentToPromote, {
379
+ fragment: string;
380
+ }>
381
+ /**
382
+ * A save changing the schema while the definition's contents are still being migrated
383
+ */
384
+ | ComponentErrorOf<ComponentErrorTypes.definitionMigrating, DefinitionMigrationState>
385
+ /**
386
+ * A save that would migrate the values of more than one component: save one, then the next once it
387
+ * has finished
388
+ */
389
+ | ComponentErrorOf<ComponentErrorTypes.oneMigrationPerSave, {
390
+ mnemonicIds: string[];
391
+ }> | ComponentErrorOf<ComponentErrorTypes.migrationPreviewNotFound, {
392
+ id: MigrationPreviewId;
393
+ }>;
394
+ /**
395
+ * This type represent where a definition's contents stand, as the get content definition API request
396
+ * answers it
397
+ *
398
+ * An upgrade or adoption that renames, removes or retypes fields bumps the definition's revision and
399
+ * migrates its contents in the background, one migration at a time per definition
400
+ */
401
+ export type DefinitionMigrationState = {
402
+ /**
403
+ * Bumped by each save that migrates values
404
+ */
405
+ revision: number;
406
+ /**
407
+ * The contents, archived ones included, still waiting for the migration to `revision`, 0 when none
408
+ * runs. While above 0, a save changing the schema is refused with `DefinitionMigrating`
409
+ */
410
+ behind: number;
411
+ };
412
+ /**
413
+ * This type represent a translation of a value set aside
414
+ */
415
+ export type SetAsideTranslation = {
416
+ /**
417
+ * Relative to the value's `path`, empty for the value itself
418
+ */
419
+ key: string;
420
+ value: string | null;
421
+ checksum: string | null;
422
+ };
423
+ /**
424
+ * This type represent a value a migration could not carry, waiting beside its content for a person to
425
+ * move into a field or discard
426
+ */
427
+ export type SetAsideValue = {
428
+ /**
429
+ * The definition revision whose migration set it aside
430
+ */
431
+ revision: number;
432
+ /**
433
+ * The component it was a value of
434
+ */
435
+ mnemonicId: string;
436
+ /**
437
+ * Where it was, in the key format translation entries use, with the names the payload has now:
438
+ * `pic.credit`, `gallery.$k1.width`
439
+ */
440
+ path: string;
441
+ /**
442
+ * The field as the version it came from defined it, for the form to show the value
443
+ */
444
+ field: Field;
445
+ reason: 'removed' | 'changed';
446
+ /**
447
+ * Null when the value followed its field and only its translations, which have no place there, wait
448
+ */
449
+ value: unknown;
450
+ /**
451
+ * Its translations by locale
452
+ */
453
+ translations: {
454
+ [locale: string]: SetAsideTranslation[];
455
+ };
456
+ /**
457
+ * Absent while the content still waits for its migration: the value is set aside by the read
458
+ */
459
+ setAsideDate?: Date;
460
+ };
461
+ /**
462
+ * This type represent a value set aside that a content save resolves. The value itself moves in the
463
+ * payload, where the person put it, and is then deleted; values not named stay
464
+ */
465
+ export type SetAsideResolution = {
466
+ revision: number;
467
+ path: string;
468
+ /**
469
+ * The path of the field the value moved to, for its translations to follow there, where that field
470
+ * is translatable. Left out, the value is discarded
471
+ */
472
+ into?: string;
473
+ };
474
+ /**
475
+ * The migration preview unique id
476
+ */
477
+ export type MigrationPreviewId = number;
478
+ /**
479
+ * This type represent the data needed to make a migration preview API request: the definition, and the
480
+ * schema about to be saved with the update content definition API request or the adoption about to be made
481
+ */
482
+ export type MigrationPreviewRequest = {
483
+ id: ContentDefinitionId;
484
+ schema: ContentDefinitionSchemaInput;
485
+ } | {
486
+ id: ContentDefinitionId;
487
+ adopt: {
488
+ mnemonicId: string;
489
+ version: number;
490
+ };
491
+ };
492
+ /**
493
+ * This type represent the response of a migration preview API request: the preview's id, or null when
494
+ * the save would migrate nothing
495
+ */
496
+ export type MigrationPreviewResponse = {
497
+ id: MigrationPreviewId | null;
498
+ };
499
+ /**
500
+ * This type represent the data needed to make a get migration preview API request
501
+ */
502
+ export type GetMigrationPreviewRequest = {
503
+ id: MigrationPreviewId;
504
+ };
505
+ /**
506
+ * This type represent what a migration does to one field of the version the definition is on, whose
507
+ * values move or are checked
508
+ */
509
+ export type MigrationPreviewField = {
510
+ field: string;
511
+ outcome: 'renamed' | 'changed' | 'removed';
512
+ /**
513
+ * The field it becomes, null when removed
514
+ */
515
+ to: string | null;
516
+ /**
517
+ * The contents holding a value of it
518
+ */
519
+ contents: number;
520
+ renamed: number;
521
+ converted: number;
522
+ setAside: number;
523
+ /**
524
+ * The translations moved
525
+ */
526
+ translations: number;
527
+ /**
528
+ * Up to 20 of the contents' ids
529
+ */
530
+ examples: number[];
531
+ };
532
+ /**
533
+ * This type represent the response of a get migration preview API request, to poll until `status` is
534
+ * `done`. Previews are kept a day
535
+ */
536
+ export type GetMigrationPreviewResponse = {
537
+ id: MigrationPreviewId;
538
+ definitionId: ContentDefinitionId;
539
+ mnemonicId: string;
540
+ /**
541
+ * Null for an adoption
542
+ */
543
+ from: number | null;
544
+ to: number;
545
+ status: 'running' | 'done';
546
+ /**
547
+ * The contents walked so far, out of `total`
548
+ */
549
+ scanned: number;
550
+ total: number;
551
+ fields: MigrationPreviewField[];
552
+ /**
553
+ * The contents whose payload or translations would change
554
+ */
555
+ changing: number;
556
+ /**
557
+ * The contents that would hold values set aside
558
+ */
559
+ settingAside: number;
560
+ };
561
+ /**
562
+ * This type represent the data needed to make a resume migration API request
563
+ */
564
+ export type ResumeMigrationRequest = {
565
+ /**
566
+ * The content definition unique id
567
+ */
568
+ id: ContentDefinitionId;
569
+ };
570
+ /**
571
+ * This type represent the response of a resume migration API request
572
+ */
573
+ export type ResumeMigrationResponse = DefinitionMigrationState;
574
+ export {};
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ComponentVersionViolationCodes = exports.ComponentErrorTypes = exports.COMPONENT_NAME_PATTERN = void 0;
4
+ /**
5
+ * A component's mnemonicId must match this pattern. It becomes the fragment's name in every definition
6
+ * using the component, so it is unique in the space, case insensitively, and never changes
7
+ */
8
+ exports.COMPONENT_NAME_PATTERN = /^[a-zA-Z0-9_]+$/;
9
+ /**
10
+ * Thin enum represent the error types of the component API requests, and of the content definition
11
+ * ones using components. Each is the `type` of a `RequestError`, whose `details` is a [[ComponentError]]
12
+ */
13
+ var ComponentErrorTypes;
14
+ (function (ComponentErrorTypes) {
15
+ ComponentErrorTypes["componentNotFound"] = "ComponentNotFound";
16
+ ComponentErrorTypes["componentVersionNotFound"] = "ComponentVersionNotFound";
17
+ ComponentErrorTypes["failedComponentValidation"] = "FailedComponentValidation";
18
+ ComponentErrorTypes["componentVersionRefused"] = "ComponentVersionRefused";
19
+ ComponentErrorTypes["nothingToPublish"] = "NothingToPublish";
20
+ ComponentErrorTypes["mnemonicIdNotUnique"] = "MnemonicIdNotUnique";
21
+ ComponentErrorTypes["managedFragmentEdited"] = "ManagedFragmentEdited";
22
+ ComponentErrorTypes["componentArchived"] = "ComponentArchived";
23
+ ComponentErrorTypes["componentAdoptionRequired"] = "ComponentAdoptionRequired";
24
+ ComponentErrorTypes["componentDowngradeRefused"] = "ComponentDowngradeRefused";
25
+ ComponentErrorTypes["noFragmentToAdopt"] = "NoFragmentToAdopt";
26
+ ComponentErrorTypes["noFragmentToPromote"] = "NoFragmentToPromote";
27
+ ComponentErrorTypes["definitionMigrating"] = "DefinitionMigrating";
28
+ ComponentErrorTypes["oneMigrationPerSave"] = "OneMigrationPerSave";
29
+ ComponentErrorTypes["migrationPreviewNotFound"] = "MigrationPreviewNotFound";
30
+ })(ComponentErrorTypes || (exports.ComponentErrorTypes = ComponentErrorTypes = {}));
31
+ /**
32
+ * Thin enum represent the codes of a [[ComponentVersionViolation]]
33
+ */
34
+ var ComponentVersionViolationCodes;
35
+ (function (ComponentVersionViolationCodes) {
36
+ /**
37
+ * An added field, or one whose type changed, must be optional
38
+ */
39
+ ComponentVersionViolationCodes["requiredField"] = "component.requiredField";
40
+ /**
41
+ * An added field, or one whose type changed, can be neither compact nor a facet
42
+ */
43
+ ComponentVersionViolationCodes["compactOrFacet"] = "component.compactOrFacet";
44
+ /**
45
+ * A kept field may only change its texts, or loosen its constraints
46
+ */
47
+ ComponentVersionViolationCodes["notLooser"] = "component.notLooser";
48
+ /**
49
+ * A rename must go from a field the draft no longer has to a new one of the same type
50
+ */
51
+ ComponentVersionViolationCodes["invalidRename"] = "component.invalidRename";
52
+ })(ComponentVersionViolationCodes || (exports.ComponentVersionViolationCodes = ComponentVersionViolationCodes = {}));
@@ -6,6 +6,7 @@ import { SchemaTypeIds } from "./ContentDefinitionSchema";
6
6
  import { ContentRepositoryId, ContentRepositoryResponse } from "./ContentRepository";
7
7
  import { ContentTranslation, ContentTranslationStatus } from "./ContentTranslation";
8
8
  import { CoverageReport } from "./Audience";
9
+ import { SetAsideResolution, SetAsideValue } from "./Component";
9
10
  /**
10
11
  * This type represent the content unique id type
11
12
  */
@@ -303,6 +304,11 @@ export type UpdateContentRequest = {
303
304
  * set an identifier coming from a third party application
304
305
  */
305
306
  externalIdentifier?: string;
307
+ /**
308
+ * The values a migration set aside that this save resolves, moved into the payload by the person or
309
+ * discarded
310
+ */
311
+ setAside?: SetAsideResolution[];
306
312
  };
307
313
  /**
308
314
  * This type represent the data that can be used to filter a list of contents
@@ -373,6 +379,10 @@ export type ListContentsFilters = {
373
379
  * audience mnemonic ids inserted. Several of them narrow the result like `tags` do
374
380
  */
375
381
  audiences?: string[];
382
+ /**
383
+ * true lists only the contents holding values a migration set aside
384
+ */
385
+ setAside?: boolean;
376
386
  };
377
387
  /**
378
388
  * This type represent the data needed to make a list content API request
@@ -655,9 +665,12 @@ export type LinkingContents = ContentResponse;
655
665
  */
656
666
  export type GetContentResponse = {
657
667
  /**
658
- * The requested content
668
+ * The requested content, migrated when it still waits for its definition's migration, with the values
669
+ * set aside beside it
659
670
  */
660
- content: ContentResponse | undefined;
671
+ content: (ContentResponse & {
672
+ setAside: SetAsideValue[];
673
+ }) | undefined;
661
674
  /**
662
675
  * The contents that use the requested content
663
676
  */