@contentchef/contentchef-types 11.0.0-alpha.4 → 11.0.0-alpha.6

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,427 @@
1
+ import { AuthorResponse } from './Author';
2
+ import { PagedListResponse } from './common';
3
+ import { DimensionAssignment } from './Dimension';
4
+ /**
5
+ * The audience unique id
6
+ */
7
+ export type AudienceId = number;
8
+ /**
9
+ * An audience's mnemonicId must match this pattern, and is at least 2 characters long. Lowercase like
10
+ * a dimension's, and immutable once created: contents, CSV files, the publishing snapshot and delivery
11
+ * all reference an audience by it
12
+ */
13
+ export declare const AUDIENCE_NAME_PATTERN: RegExp;
14
+ /**
15
+ * This type represent the condition of an audience rule on a single dimension: the visitor's value for
16
+ * [[dimension]] has to be one of [[in]]
17
+ */
18
+ export type DimensionPredicate = {
19
+ /**
20
+ * The mnemonic id of the dimension this predicate constrains
21
+ */
22
+ dimension: string;
23
+ /**
24
+ * The keys of the dimension that satisfy this predicate, at least one
25
+ */
26
+ in: string[];
27
+ /**
28
+ * Set this value to also satisfy the predicate when the dimension was not provided at all
29
+ *
30
+ * Not-provided is not a key, so no list of keys can express it, and an enumeration would silently
31
+ * narrow the moment a key is added to the dimension. A key that was provided but is not listed does
32
+ * not satisfy this flag: the audience simply does not match
33
+ */
34
+ orUnset?: boolean;
35
+ };
36
+ /**
37
+ * This type represent a condition satisfied when every child condition is satisfied
38
+ */
39
+ export type AllDimensionPredicate = {
40
+ all: AudienceRule[];
41
+ };
42
+ /**
43
+ * This type represent a condition satisfied when at least one child condition is satisfied
44
+ */
45
+ export type AnyDimensionPredicate = {
46
+ any: AudienceRule[];
47
+ };
48
+ /**
49
+ * This type represent the rule of an audience: or within a dimension, and between dimensions
50
+ *
51
+ * The stored form is a tree so that new kinds of condition stay additive, but an editor only needs to
52
+ * build an [[AllDimensionPredicate]] of one [[DimensionPredicate]] per dimension. A dimension the rule
53
+ * does not mention is unconstrained, which is a different thing from one listed with
54
+ * [[DimensionPredicate.orUnset]]. `{ all: [] }` matches everyone
55
+ */
56
+ export type AudienceRule = DimensionPredicate | AllDimensionPredicate | AnyDimensionPredicate;
57
+ /**
58
+ * This type represent one dimension key an audience rule references. `key` is absent for a rule that
59
+ * constrains the dimension without naming a key
60
+ */
61
+ export type DimensionKeyReference = {
62
+ /**
63
+ * The dimension mnemonic id
64
+ */
65
+ dimension: string;
66
+ /**
67
+ * The key, absent when the rule names none
68
+ */
69
+ key?: string;
70
+ };
71
+ /**
72
+ * This type represent the model of an audience, that is a named rule over dimensions -
73
+ * "authenticated users with a silver card" - written once and referenced by mnemonicId from every
74
+ * content that wants it
75
+ *
76
+ * Nothing to evaluate lives in a content: a personalized field lists audiences, and the rules stay
77
+ * here. Audiences are archived and never deleted, and archiving is refused while a content still
78
+ * references one
79
+ */
80
+ export type AudienceResponse = {
81
+ /**
82
+ * The audience unique id
83
+ */
84
+ id: AudienceId;
85
+ /**
86
+ * The audience name
87
+ */
88
+ name: string;
89
+ /**
90
+ * The audience mnemonic id, matching [[AUDIENCE_NAME_PATTERN]]
91
+ */
92
+ mnemonicId: string;
93
+ /**
94
+ * The rule that decides whether a visitor belongs to this audience
95
+ */
96
+ rule: AudienceRule;
97
+ /**
98
+ * The dimension keys the rule references, derived from it on every save. This is what makes a
99
+ * dimension key removable or not
100
+ */
101
+ usedDimensionKeys: DimensionKeyReference[];
102
+ /**
103
+ * The archived status of the audience
104
+ */
105
+ archived: boolean;
106
+ /**
107
+ * The archive date of the audience
108
+ */
109
+ archivedDate: Date | null;
110
+ /**
111
+ * The audience creation date
112
+ */
113
+ createdDate: Date;
114
+ /**
115
+ * The audience last modified date
116
+ */
117
+ lastModifiedDate: Date;
118
+ /**
119
+ * The audience author, resolved by `list` only
120
+ */
121
+ author?: AuthorResponse;
122
+ /**
123
+ * The audience last modified author, resolved by every endpoint but `get`
124
+ */
125
+ latestContributor?: AuthorResponse;
126
+ };
127
+ /**
128
+ * This type represent all possible filters used to retrieve a list of audience
129
+ */
130
+ export type ListAudiencesFilters = {
131
+ /**
132
+ * This filter is used to retrieve archived or not archived audiences. Defaults to not archived
133
+ */
134
+ archived?: boolean;
135
+ };
136
+ /**
137
+ * This type represent the data needed to make a list audiences API request
138
+ */
139
+ export type ListAudiencesRequest = {
140
+ /**
141
+ * The number of audiences to skip (this value is used for pagination)
142
+ */
143
+ skip?: number;
144
+ /**
145
+ * The number of audiences to take (this value is used for pagination), at most 100
146
+ */
147
+ take?: number;
148
+ /**
149
+ * The data used to filter the list of audiences
150
+ */
151
+ filters?: ListAudiencesFilters;
152
+ };
153
+ /**
154
+ * This type represent the item of a list audiences API request: the audience with its rule read back
155
+ * in words, which is what a picker shows. No usage count, that is one query per audience and belongs
156
+ * to [[GetAudienceResponse]]
157
+ */
158
+ export type ListAudiencesItem = AudienceResponse & {
159
+ /**
160
+ * The rule in words, so it reads without decoding a predicate
161
+ */
162
+ description: string;
163
+ /**
164
+ * The mnemonic ids of the dimensions the rule depends on
165
+ */
166
+ dimensions: string[];
167
+ };
168
+ /**
169
+ * This type represent the response of a list audiences API request
170
+ */
171
+ export type ListAudiencesResponse = PagedListResponse<ListAudiencesItem>;
172
+ /**
173
+ * This type represent the data needed to make a get audience API request
174
+ */
175
+ export type GetAudienceRequest = {
176
+ /**
177
+ * The unique audience id to retrieve
178
+ */
179
+ id: AudienceId;
180
+ };
181
+ /**
182
+ * This type represent the response of a get audience API request: the audience, plus what the editor
183
+ * cannot derive on its own - the rule in words, the dimensions it depends on, and how many contents
184
+ * reference it, which is exactly the guard archiving enforces
185
+ */
186
+ export type GetAudienceResponse = ListAudiencesItem & {
187
+ /**
188
+ * How much of the space depends on this audience
189
+ */
190
+ usage: {
191
+ /**
192
+ * How many contents reference this audience. Archiving is refused while this is not zero
193
+ */
194
+ contents: number;
195
+ };
196
+ };
197
+ /**
198
+ * This type represent the data needed to make a create audience API request
199
+ */
200
+ export type CreateAudienceRequest = {
201
+ /**
202
+ * The audience name
203
+ */
204
+ name: string;
205
+ /**
206
+ * The audience mnemonic id, matching [[AUDIENCE_NAME_PATTERN]]. It cannot be changed afterwards
207
+ */
208
+ mnemonicId: string;
209
+ /**
210
+ * The rule over dimensions. Every dimension it names has to exist in the space and not be
211
+ * archived, and every key has to exist on its dimension and not be deprecated
212
+ */
213
+ rule: AudienceRule;
214
+ };
215
+ /**
216
+ * This type represent the response of a create audience API request
217
+ */
218
+ export type CreateAudienceResponse = AudienceResponse;
219
+ /**
220
+ * This type represent the data needed to make an update audience API request
221
+ *
222
+ * The rule may change freely even while contents reference the audience: the change reaching delivery
223
+ * on the next publish of any content that uses it is the point of naming an audience once
224
+ */
225
+ export type UpdateAudienceRequest = {
226
+ /**
227
+ * The audience unique id
228
+ */
229
+ id: AudienceId;
230
+ /**
231
+ * The audience name to update
232
+ */
233
+ name: string;
234
+ /**
235
+ * The audience mnemonic id, which must be the stored one
236
+ */
237
+ mnemonicId: string;
238
+ /**
239
+ * The rule, replacing what is stored
240
+ */
241
+ rule: AudienceRule;
242
+ };
243
+ /**
244
+ * This type represent the response of an update audience API request
245
+ */
246
+ export type UpdateAudienceResponse = AudienceResponse;
247
+ /**
248
+ * This type represent the data needed to make a toggle archived audience API request
249
+ */
250
+ export type ToggleArchivedAudienceRequest = {
251
+ /**
252
+ * The audience unique id
253
+ */
254
+ id: AudienceId;
255
+ /**
256
+ * This value represent the archive status to set in the specified audience. Archiving is refused
257
+ * with an `AudienceInUse` error while any content references the audience
258
+ */
259
+ archived: boolean;
260
+ };
261
+ /**
262
+ * This type represent the response of a toggle archived audience API request
263
+ */
264
+ export type ToggleArchivedAudienceResponse = AudienceResponse;
265
+ /**
266
+ * Thin enum represent all audience rule violations error codes, reported by the create and update
267
+ * audience API requests through the `violations` of an `InvalidAudienceRule` error
268
+ */
269
+ export declare enum AudienceRuleViolationCodes {
270
+ ruleMissing = "audienceRule.ruleMissing",
271
+ unknownShape = "audienceRule.unknownShape",
272
+ groupIsNotAnArray = "audienceRule.groupIsNotAnArray",
273
+ dimensionIsNotAString = "audienceRule.dimensionIsNotAString",
274
+ inIsNotAnArray = "audienceRule.inIsNotAnArray",
275
+ inIsEmpty = "audienceRule.inIsEmpty",
276
+ keyIsNotAString = "audienceRule.keyIsNotAString",
277
+ orUnsetIsNotABoolean = "audienceRule.orUnsetIsNotABoolean",
278
+ dimensionNotFound = "audienceRule.dimensionNotFound",
279
+ dimensionArchived = "audienceRule.dimensionArchived",
280
+ dimensionKeyNotFound = "audienceRule.dimensionKeyNotFound",
281
+ dimensionKeyDeprecated = "audienceRule.dimensionKeyDeprecated"
282
+ }
283
+ /**
284
+ * This type represent one problem found in an audience rule, carrying the path of the offending node
285
+ */
286
+ export type AudienceRuleViolation = {
287
+ /**
288
+ * The error code discriminator, one of [[AudienceRuleViolationCodes]]
289
+ */
290
+ code: string;
291
+ /**
292
+ * The path of the rejected node inside the rule, for instance `rule.all.0.in.1`
293
+ */
294
+ path: string;
295
+ /**
296
+ * The dimension the node names, when the violation is about one
297
+ */
298
+ dimension?: string;
299
+ /**
300
+ * The key the node names, when the violation is about one
301
+ */
302
+ key?: string;
303
+ };
304
+ /**
305
+ * This type represent how much of an analysed audience list one audience actually serves
306
+ */
307
+ export type RuleCoverage = {
308
+ /**
309
+ * The position of the audience in the analysed list
310
+ */
311
+ index: number;
312
+ /**
313
+ * The audience mnemonic id
314
+ */
315
+ id?: string;
316
+ /**
317
+ * The rule in words, so a finding reads without decoding a predicate
318
+ */
319
+ condition: string;
320
+ /**
321
+ * How many of the analysed assignments this audience wins. Zero means it can never serve anyone
322
+ */
323
+ wins: number;
324
+ };
325
+ /**
326
+ * This type represent what an ordered list of audiences covers, worked out from their rules and the
327
+ * dimensions' keys alone - no request traffic is involved
328
+ *
329
+ * The findings are advisory and never validation violations: a gap is usually deliberate, that being
330
+ * what a fallback is for, while an unreachable audience is almost always a mistake
331
+ */
332
+ export type CoverageReport = {
333
+ /**
334
+ * How many assignments were evaluated, after collapsing the keys no rule mentions
335
+ */
336
+ combinations: number;
337
+ /**
338
+ * One entry per analysed audience, in the order they were sent, its `id` being the mnemonic id. An
339
+ * audience the space does not have has no rule to analyse and contributes no entry, so this can be
340
+ * shorter than the request
341
+ */
342
+ rules: RuleCoverage[];
343
+ /**
344
+ * The audiences that win nothing: shadowed by an earlier one, or self-contradictory
345
+ */
346
+ unreachableRules: RuleCoverage[];
347
+ /**
348
+ * The assignments no audience claims, so they reach the fallback. Capped at 25 entries, while
349
+ * [[fallbackCount]] is the real total
350
+ */
351
+ fallbackAssignments: DimensionAssignment[];
352
+ /**
353
+ * How many assignments reach the fallback, of [[combinations]]
354
+ */
355
+ fallbackCount: number;
356
+ /**
357
+ * What [[OTHER_KEY]] stood for, per dimension: the real unmentioned keys, capped at 10, with their
358
+ * total. Only the dimensions that needed the stand-in appear
359
+ */
360
+ otherKeys: {
361
+ [dimension: string]: {
362
+ keys: string[];
363
+ total: number;
364
+ };
365
+ };
366
+ /**
367
+ * Set when the rules and their dimensions were too large to enumerate. Everything else is then
368
+ * unpopulated rather than guessed, because a sampled "no gaps" is not a fact
369
+ */
370
+ notAnalysed?: {
371
+ reason: 'tooManyCombinations';
372
+ combinations: number;
373
+ };
374
+ };
375
+ /**
376
+ * This type represent the data needed to make an analyse rules API request, which is what a
377
+ * personalized field's editor asks about the variants on screen, before anything is saved
378
+ *
379
+ * The rules and the dimensions' keys are read from the space, so a client sends the audiences and
380
+ * nothing else
381
+ */
382
+ export type AnalyseAudienceRulesRequest = {
383
+ /**
384
+ * The audience mnemonic ids in the order the variants list them, at most 20. The order is the
385
+ * whole point: the first listed audience that matches wins, so one being unreachable is a
386
+ * consequence of what precedes it
387
+ */
388
+ audiences: string[];
389
+ };
390
+ /**
391
+ * This type represent the response of an analyse rules API request
392
+ */
393
+ export type AnalyseAudienceRulesResponse = CoverageReport;
394
+ /**
395
+ * This type represent one variant of a personalized field: the audience served, and the value to
396
+ * serve it
397
+ * @template T The type of the served value, which conforms to the field's `variantType`
398
+ */
399
+ export type PersonalizedVariant<T = any> = {
400
+ /**
401
+ * The mnemonic id of the audience this variant serves
402
+ */
403
+ audience: string;
404
+ /**
405
+ * The value served when this variant wins
406
+ */
407
+ value: T;
408
+ };
409
+ /**
410
+ * This type represent the value a personalized field holds in a content payload: an ordered list of
411
+ * variants, the first whose audience matches the visitor wins, and the fallback served when none does
412
+ *
413
+ * The fallback is mandatory exactly when the field is required, which keeps the delivery contract of a
414
+ * personalized field the same as any other field. Zero variants is legal: the field is then just its
415
+ * fallback
416
+ * @template T The type of the served values, which conform to the field's `variantType`
417
+ */
418
+ export type PersonalizedFieldPayload<T = any> = {
419
+ /**
420
+ * The variants, in the order they are evaluated in
421
+ */
422
+ variants?: PersonalizedVariant<T>[];
423
+ /**
424
+ * The value served when no variant's audience matches
425
+ */
426
+ fallback?: T;
427
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AudienceRuleViolationCodes = exports.AUDIENCE_NAME_PATTERN = void 0;
4
+ /**
5
+ * An audience's mnemonicId must match this pattern, and is at least 2 characters long. Lowercase like
6
+ * a dimension's, and immutable once created: contents, CSV files, the publishing snapshot and delivery
7
+ * all reference an audience by it
8
+ */
9
+ exports.AUDIENCE_NAME_PATTERN = /^[a-z0-9_-]+$/;
10
+ /**
11
+ * Thin enum represent all audience rule violations error codes, reported by the create and update
12
+ * audience API requests through the `violations` of an `InvalidAudienceRule` error
13
+ */
14
+ var AudienceRuleViolationCodes;
15
+ (function (AudienceRuleViolationCodes) {
16
+ AudienceRuleViolationCodes["ruleMissing"] = "audienceRule.ruleMissing";
17
+ AudienceRuleViolationCodes["unknownShape"] = "audienceRule.unknownShape";
18
+ AudienceRuleViolationCodes["groupIsNotAnArray"] = "audienceRule.groupIsNotAnArray";
19
+ AudienceRuleViolationCodes["dimensionIsNotAString"] = "audienceRule.dimensionIsNotAString";
20
+ AudienceRuleViolationCodes["inIsNotAnArray"] = "audienceRule.inIsNotAnArray";
21
+ AudienceRuleViolationCodes["inIsEmpty"] = "audienceRule.inIsEmpty";
22
+ AudienceRuleViolationCodes["keyIsNotAString"] = "audienceRule.keyIsNotAString";
23
+ AudienceRuleViolationCodes["orUnsetIsNotABoolean"] = "audienceRule.orUnsetIsNotABoolean";
24
+ AudienceRuleViolationCodes["dimensionNotFound"] = "audienceRule.dimensionNotFound";
25
+ AudienceRuleViolationCodes["dimensionArchived"] = "audienceRule.dimensionArchived";
26
+ AudienceRuleViolationCodes["dimensionKeyNotFound"] = "audienceRule.dimensionKeyNotFound";
27
+ AudienceRuleViolationCodes["dimensionKeyDeprecated"] = "audienceRule.dimensionKeyDeprecated";
28
+ })(AudienceRuleViolationCodes || (exports.AudienceRuleViolationCodes = AudienceRuleViolationCodes = {}));
@@ -5,7 +5,7 @@ import { ContentDefinitionId, ContentDefinitionResponse } from "./ContentDefinit
5
5
  import { SchemaTypeIds } from "./ContentDefinitionSchema";
6
6
  import { ContentRepositoryId, ContentRepositoryResponse } from "./ContentRepository";
7
7
  import { ContentTranslation, ContentTranslationStatus } from "./ContentTranslation";
8
- import { CoverageReport } from "./Segment";
8
+ import { CoverageReport } from "./Audience";
9
9
  /**
10
10
  * This type represent the content unique id type
11
11
  */
@@ -369,11 +369,10 @@ export type ListContentsFilters = {
369
369
  */
370
370
  translationStatus?: ContentTranslationStatus;
371
371
  /**
372
- * This filter is used to search contents whose segmented fields have rules referencing the segments
373
- * inserted, as `segment` or `segment:key` tokens. A bare `segment` matches whichever key a content
374
- * uses it with, and several tokens narrow the result like `tags` do
372
+ * This filter is used to search contents whose personalized fields have a variant serving one of the
373
+ * audience mnemonic ids inserted. Several of them narrow the result like `tags` do
375
374
  */
376
- segments?: string[];
375
+ audiences?: string[];
377
376
  };
378
377
  /**
379
378
  * This type represent the data needed to make a list content API request
@@ -777,17 +776,14 @@ export declare enum ContentFieldViolationCodes {
777
776
  textFieldValueMissingInListOfValue = "textField.valueMissingInListOfValue",
778
777
  textFieldValueIsNotAString = "textField.valueIsNotAString",
779
778
  textFieldBlankValueNotAllowed = "textField.blankValueNotAllowed",
780
- segmentedFieldValueIsNotSegmented = "segmentedField.valueIsNotSegmented",
781
- segmentedFieldRulesIsNotAnArray = "segmentedField.rulesIsNotAnArray",
782
- segmentedFieldRuleIsNotAnObject = "segmentedField.ruleIsNotAnObject",
783
- segmentedFieldRuleConditionMissing = "segmentedField.ruleConditionMissing",
784
- segmentedFieldDuplicateRuleId = "segmentedField.duplicateRuleId",
785
- segmentedFieldSegmentNotDeclared = "segmentedField.segmentNotDeclared",
786
- segmentedFieldFallbackRequired = "segmentedField.fallbackRequired",
787
- segmentedFieldSegmentNotFound = "segmentedField.segmentNotFound",
788
- segmentedFieldSegmentArchived = "segmentedField.segmentArchived",
789
- segmentedFieldSegmentKeyNotFound = "segmentedField.segmentKeyNotFound",
790
- segmentedFieldSegmentKeyDeprecated = "segmentedField.segmentKeyDeprecated"
779
+ personalizedFieldValueIsNotPersonalized = "personalizedField.valueIsNotPersonalized",
780
+ personalizedFieldVariantsIsNotAnArray = "personalizedField.variantsIsNotAnArray",
781
+ personalizedFieldVariantIsNotAnObject = "personalizedField.variantIsNotAnObject",
782
+ personalizedFieldAudienceMissing = "personalizedField.audienceMissing",
783
+ personalizedFieldAudienceNotFound = "personalizedField.audienceNotFound",
784
+ personalizedFieldAudienceArchived = "personalizedField.audienceArchived",
785
+ personalizedFieldDuplicateAudience = "personalizedField.duplicateAudience",
786
+ personalizedFieldFallbackRequired = "personalizedField.fallbackRequired"
791
787
  }
792
788
  /**
793
789
  * Request type for getContentStatus
@@ -826,18 +822,19 @@ export type ToggleContentTranslationsRequest = {
826
822
  };
827
823
  export type ToggleContentTranslationsResponse = ContentResponse;
828
824
  /**
829
- * This type represent the data needed to make an analyse segmented rules API request
825
+ * This type represent the data needed to make an analyse personalized rules API request
830
826
  */
831
- export type AnalyseSegmentedRulesRequest = {
827
+ export type AnalysePersonalizedRulesRequest = {
832
828
  /**
833
- * Id of the content whose segmented fields have to be analysed
829
+ * Id of the content whose personalized fields have to be analysed
834
830
  */
835
831
  contentId: ContentId;
836
832
  };
837
833
  /**
838
- * This type represent the coverage of one segmented field of a content
834
+ * This type represent the coverage of one personalized field of a content, that is what the audiences
835
+ * of its variants cover
839
836
  */
840
- export type SegmentedFieldCoverage = CoverageReport & {
837
+ export type PersonalizedFieldCoverage = CoverageReport & {
841
838
  /**
842
839
  * Where the field sits in the payload
843
840
  */
@@ -849,12 +846,12 @@ export type SegmentedFieldCoverage = CoverageReport & {
849
846
  hasFallback: boolean;
850
847
  };
851
848
  /**
852
- * This type represent the response of an analyse segmented rules API request: one report per
853
- * segmented field of the content, empty when it has none
849
+ * This type represent the response of an analyse personalized rules API request: one report per
850
+ * personalized field of the content, empty when it has none
854
851
  */
855
- export type AnalyseSegmentedRulesResponse = {
852
+ export type AnalysePersonalizedRulesResponse = {
856
853
  /**
857
- * One entry per segmented field found in the content payload
854
+ * One entry per personalized field found in the content payload
858
855
  */
859
- fields: SegmentedFieldCoverage[];
856
+ fields: PersonalizedFieldCoverage[];
860
857
  };
@@ -86,17 +86,14 @@ var ContentFieldViolationCodes;
86
86
  ContentFieldViolationCodes["textFieldValueMissingInListOfValue"] = "textField.valueMissingInListOfValue";
87
87
  ContentFieldViolationCodes["textFieldValueIsNotAString"] = "textField.valueIsNotAString";
88
88
  ContentFieldViolationCodes["textFieldBlankValueNotAllowed"] = "textField.blankValueNotAllowed";
89
- ContentFieldViolationCodes["segmentedFieldValueIsNotSegmented"] = "segmentedField.valueIsNotSegmented";
90
- ContentFieldViolationCodes["segmentedFieldRulesIsNotAnArray"] = "segmentedField.rulesIsNotAnArray";
91
- ContentFieldViolationCodes["segmentedFieldRuleIsNotAnObject"] = "segmentedField.ruleIsNotAnObject";
92
- ContentFieldViolationCodes["segmentedFieldRuleConditionMissing"] = "segmentedField.ruleConditionMissing";
93
- ContentFieldViolationCodes["segmentedFieldDuplicateRuleId"] = "segmentedField.duplicateRuleId";
94
- ContentFieldViolationCodes["segmentedFieldSegmentNotDeclared"] = "segmentedField.segmentNotDeclared";
95
- ContentFieldViolationCodes["segmentedFieldFallbackRequired"] = "segmentedField.fallbackRequired";
96
- ContentFieldViolationCodes["segmentedFieldSegmentNotFound"] = "segmentedField.segmentNotFound";
97
- ContentFieldViolationCodes["segmentedFieldSegmentArchived"] = "segmentedField.segmentArchived";
98
- ContentFieldViolationCodes["segmentedFieldSegmentKeyNotFound"] = "segmentedField.segmentKeyNotFound";
99
- ContentFieldViolationCodes["segmentedFieldSegmentKeyDeprecated"] = "segmentedField.segmentKeyDeprecated";
89
+ ContentFieldViolationCodes["personalizedFieldValueIsNotPersonalized"] = "personalizedField.valueIsNotPersonalized";
90
+ ContentFieldViolationCodes["personalizedFieldVariantsIsNotAnArray"] = "personalizedField.variantsIsNotAnArray";
91
+ ContentFieldViolationCodes["personalizedFieldVariantIsNotAnObject"] = "personalizedField.variantIsNotAnObject";
92
+ ContentFieldViolationCodes["personalizedFieldAudienceMissing"] = "personalizedField.audienceMissing";
93
+ ContentFieldViolationCodes["personalizedFieldAudienceNotFound"] = "personalizedField.audienceNotFound";
94
+ ContentFieldViolationCodes["personalizedFieldAudienceArchived"] = "personalizedField.audienceArchived";
95
+ ContentFieldViolationCodes["personalizedFieldDuplicateAudience"] = "personalizedField.duplicateAudience";
96
+ ContentFieldViolationCodes["personalizedFieldFallbackRequired"] = "personalizedField.fallbackRequired";
100
97
  })(ContentFieldViolationCodes || (exports.ContentFieldViolationCodes = ContentFieldViolationCodes = {}));
101
98
  var LocalizationSettings;
102
99
  (function (LocalizationSettings) {
@@ -175,11 +175,6 @@ export type ContentDefinitionResponse = {
175
175
  * Valued with paths to each array or null if definition is legacy
176
176
  */
177
177
  trackableArrayFields?: ArrayField[] | null;
178
- /**
179
- * The mnemonic ids of the segments this definition's segmented fields vary by
180
- * Derived from the schema on every save, never assigned by the client
181
- */
182
- segments?: string[];
183
178
  };
184
179
  /**
185
180
  * This type represent the response of a create content definition API request
@@ -266,15 +261,6 @@ export type ContentDefinitionSchemaErrors = {
266
261
  * This attribute represents an error if the language of the schema is not a valid string
267
262
  */
268
263
  lang?: string;
269
- /**
270
- * This attribute represents all the error that occurs inside the segments declaration of the
271
- * definition schema object
272
- *
273
- * - The value is a string if the segments value is not in the expected format
274
- * - The value is a list of AttributeViolation, one per declared segment that does not exist in the
275
- * space or is archived
276
- */
277
- segments?: string | AttributeViolation[];
278
264
  };
279
265
  /**
280
266
  * This type represent the model for the schema fragment errors
@@ -403,9 +389,5 @@ export declare enum SchemaFieldViolationCodes {
403
389
  translatableNotAllowed = "translatableNotAllowed",
404
390
  invalidEnumValue = "invalidEnumValue",
405
391
  compactCannotBeNested = "compactCannotBeNested",
406
- segmentTypeNotAllowed = "segmentTypeNotAllowed",
407
- segmentNameNotFound = "segmentNameNotFound",
408
- segmentArchived = "segmentArchived",
409
- segmentNotDeclaredByDefinition = "segmentNotDeclaredByDefinition",
410
- duplicateSegmentName = "duplicateSegmentName"
392
+ variantTypeNotAllowed = "variantTypeNotAllowed"
411
393
  }
@@ -45,9 +45,5 @@ var SchemaFieldViolationCodes;
45
45
  SchemaFieldViolationCodes["translatableNotAllowed"] = "translatableNotAllowed";
46
46
  SchemaFieldViolationCodes["invalidEnumValue"] = "invalidEnumValue";
47
47
  SchemaFieldViolationCodes["compactCannotBeNested"] = "compactCannotBeNested";
48
- SchemaFieldViolationCodes["segmentTypeNotAllowed"] = "segmentTypeNotAllowed";
49
- SchemaFieldViolationCodes["segmentNameNotFound"] = "segmentNameNotFound";
50
- SchemaFieldViolationCodes["segmentArchived"] = "segmentArchived";
51
- SchemaFieldViolationCodes["segmentNotDeclaredByDefinition"] = "segmentNotDeclaredByDefinition";
52
- SchemaFieldViolationCodes["duplicateSegmentName"] = "duplicateSegmentName";
48
+ SchemaFieldViolationCodes["variantTypeNotAllowed"] = "variantTypeNotAllowed";
53
49
  })(SchemaFieldViolationCodes || (exports.SchemaFieldViolationCodes = SchemaFieldViolationCodes = {}));