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

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.
@@ -86,17 +86,17 @@ 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["personalizedFieldRulesIsNotAnArray"] = "personalizedField.rulesIsNotAnArray";
91
+ ContentFieldViolationCodes["personalizedFieldRuleIsNotAnObject"] = "personalizedField.ruleIsNotAnObject";
92
+ ContentFieldViolationCodes["personalizedFieldRuleConditionMissing"] = "personalizedField.ruleConditionMissing";
93
+ ContentFieldViolationCodes["personalizedFieldDuplicateRuleId"] = "personalizedField.duplicateRuleId";
94
+ ContentFieldViolationCodes["personalizedFieldAudienceNotDeclared"] = "personalizedField.audienceNotDeclared";
95
+ ContentFieldViolationCodes["personalizedFieldFallbackRequired"] = "personalizedField.fallbackRequired";
96
+ ContentFieldViolationCodes["personalizedFieldAudienceNotFound"] = "personalizedField.audienceNotFound";
97
+ ContentFieldViolationCodes["personalizedFieldAudienceArchived"] = "personalizedField.audienceArchived";
98
+ ContentFieldViolationCodes["personalizedFieldAudienceKeyNotFound"] = "personalizedField.audienceKeyNotFound";
99
+ ContentFieldViolationCodes["personalizedFieldAudienceKeyDeprecated"] = "personalizedField.audienceKeyDeprecated";
100
100
  })(ContentFieldViolationCodes || (exports.ContentFieldViolationCodes = ContentFieldViolationCodes = {}));
101
101
  var LocalizationSettings;
102
102
  (function (LocalizationSettings) {
@@ -176,10 +176,10 @@ export type ContentDefinitionResponse = {
176
176
  */
177
177
  trackableArrayFields?: ArrayField[] | null;
178
178
  /**
179
- * The mnemonic ids of the segments this definition's segmented fields vary by
179
+ * The mnemonic ids of the audiences this definition's personalized fields vary by
180
180
  * Derived from the schema on every save, never assigned by the client
181
181
  */
182
- segments?: string[];
182
+ audiences?: string[];
183
183
  };
184
184
  /**
185
185
  * This type represent the response of a create content definition API request
@@ -267,14 +267,14 @@ export type ContentDefinitionSchemaErrors = {
267
267
  */
268
268
  lang?: string;
269
269
  /**
270
- * This attribute represents all the error that occurs inside the segments declaration of the
270
+ * This attribute represents all the error that occurs inside the audiences declaration of the
271
271
  * definition schema object
272
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
273
+ * - The value is a string if the audiences value is not in the expected format
274
+ * - The value is a list of AttributeViolation, one per declared audience that does not exist in the
275
275
  * space or is archived
276
276
  */
277
- segments?: string | AttributeViolation[];
277
+ audiences?: string | AttributeViolation[];
278
278
  };
279
279
  /**
280
280
  * This type represent the model for the schema fragment errors
@@ -403,9 +403,9 @@ export declare enum SchemaFieldViolationCodes {
403
403
  translatableNotAllowed = "translatableNotAllowed",
404
404
  invalidEnumValue = "invalidEnumValue",
405
405
  compactCannotBeNested = "compactCannotBeNested",
406
- segmentTypeNotAllowed = "segmentTypeNotAllowed",
407
- segmentNameNotFound = "segmentNameNotFound",
408
- segmentArchived = "segmentArchived",
409
- segmentNotDeclaredByDefinition = "segmentNotDeclaredByDefinition",
410
- duplicateSegmentName = "duplicateSegmentName"
406
+ audienceTypeNotAllowed = "audienceTypeNotAllowed",
407
+ audienceNameNotFound = "audienceNameNotFound",
408
+ audienceArchived = "audienceArchived",
409
+ audienceNotDeclaredByDefinition = "audienceNotDeclaredByDefinition",
410
+ duplicateAudienceName = "duplicateAudienceName"
411
411
  }
@@ -45,9 +45,9 @@ 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["audienceTypeNotAllowed"] = "audienceTypeNotAllowed";
49
+ SchemaFieldViolationCodes["audienceNameNotFound"] = "audienceNameNotFound";
50
+ SchemaFieldViolationCodes["audienceArchived"] = "audienceArchived";
51
+ SchemaFieldViolationCodes["audienceNotDeclaredByDefinition"] = "audienceNotDeclaredByDefinition";
52
+ SchemaFieldViolationCodes["duplicateAudienceName"] = "duplicateAudienceName";
53
53
  })(SchemaFieldViolationCodes || (exports.SchemaFieldViolationCodes = SchemaFieldViolationCodes = {}));
@@ -20,7 +20,7 @@ export declare enum SchemaTypeIds {
20
20
  ARRAY = "array",
21
21
  SLUG = "slug",
22
22
  MEDIA = "media",
23
- SEGMENTED = "segmented"
23
+ PERSONALIZED = "personalized"
24
24
  }
25
25
  /**
26
26
  * This enum represent al possible long text sub types
@@ -49,13 +49,13 @@ export type ContentDefinitionSchema = {
49
49
  */
50
50
  fragments: FragmentsTable;
51
51
  /**
52
- * The segments this definition depends on, chosen by the author. Every one has to exist in the
53
- * space and not be archived, and a segmented field may only vary by segments named here, so this
52
+ * The audiences this definition depends on, chosen by the author. Every one has to exist in the
53
+ * space and not be archived, and a personalized field may only vary by audiences named here, so this
54
54
  * is what scopes a definition and gives the field editor a short list to offer
55
55
  *
56
- * Optional: a definition that declares none simply cannot hold a segmented field
56
+ * Optional: a definition that declares none simply cannot hold a personalized field
57
57
  */
58
- segments?: string[];
58
+ audiences?: string[];
59
59
  };
60
60
  /**
61
61
  * This type represent the model of the attribute fragments in a content definition schema
@@ -303,13 +303,13 @@ export type OneLinkedContentOfConstraints = {
303
303
  linkType?: LinkType;
304
304
  };
305
305
  /**
306
- * This type represent what every value of a segmented field holds: one descriptor for the whole field,
306
+ * This type represent what every value of a personalized field holds: one descriptor for the whole field,
307
307
  * so the rules and the fallback cannot differ in type
308
308
  *
309
309
  * Only the two `one...Of` forms are admitted: `fragment` and `linked-content` are each the
310
310
  * single-target special case of one of them, carrying an identical payload value
311
311
  */
312
- export type SegmentVariantType = {
312
+ export type PersonalizedVariantType = {
313
313
  type: SchemaTypeIds.ONE_FRAGMENT_OF;
314
314
  constraints: OneFragmentOfConstraints;
315
315
  } | {
@@ -317,28 +317,28 @@ export type SegmentVariantType = {
317
317
  constraints: OneLinkedContentOfConstraints;
318
318
  };
319
319
  /**
320
- * This type represent the model of a segmented field constraints
320
+ * This type represent the model of a personalized field constraints
321
321
  *
322
- * A segmented field declares only *what varies* and *what shape the values have*. Which conditions
322
+ * A personalized field declares only *what varies* and *what shape the values have*. Which conditions
323
323
  * exist and what each of them serves is authored per content, as an ordered list of rules plus a
324
- * fallback - see [[SegmentedFieldPayload]] - so no combination has to be pre-declared here and two
324
+ * fallback - see [[PersonalizedFieldPayload]] - so no combination has to be pre-declared here and two
325
325
  * contents of the same definition may carry entirely different rule sets
326
326
  */
327
- export type SegmentedFieldConstraints = {
327
+ export type PersonalizedFieldConstraints = {
328
328
  /**
329
- * The mnemonic ids of the segments this field varies by, which must be among the ones the
330
- * definition declares in [[ContentDefinitionSchema.segments]]. Only the declaration is checked
331
- * against the space, so a segment that does not exist is one error on the definition rather than
329
+ * The mnemonic ids of the audiences this field varies by, which must be among the ones the
330
+ * definition declares in [[ContentDefinitionSchema.audiences]]. Only the declaration is checked
331
+ * against the space, so an audience that does not exist is one error on the definition rather than
332
332
  * one on every field that reached for it
333
333
  *
334
334
  * Declaration order carries no meaning: a rule wins by being first in the content, not by which
335
- * segment it constrains
335
+ * audience it constrains
336
336
  */
337
- segments: string[];
337
+ audiences: string[];
338
338
  /**
339
339
  * The shape every rule value and the fallback conform to
340
340
  */
341
- variantType: SegmentVariantType;
341
+ variantType: PersonalizedVariantType;
342
342
  };
343
343
  /**
344
344
  * This type represent the model of an array field constraints
@@ -492,9 +492,9 @@ export type OneFragmentOfSchemaType = SchemaType<SchemaTypeIds.ONE_FRAGMENT_OF,
492
492
  */
493
493
  export type OneLinkedContentOfSchemaType = IndexableSchemaType<SchemaTypeIds.ONE_LINKED_CONTENT_OF, OneLinkedContentOfConstraints>;
494
494
  /**
495
- * This type represent a segmented field schema type
495
+ * This type represent a personalized field schema type
496
496
  */
497
- export type SegmentedSchemaType = SchemaType<SchemaTypeIds.SEGMENTED, SegmentedFieldConstraints>;
497
+ export type PersonalizedSchemaType = SchemaType<SchemaTypeIds.PERSONALIZED, PersonalizedFieldConstraints>;
498
498
  /**
499
499
  * Slug schema type
500
500
  * This type is indexable and translatable by default
@@ -520,7 +520,7 @@ export type TranslatableSchemaTypes = NumberSchemaType | TextSchemaType | LongTe
520
520
  /**
521
521
  * This type group all the schema types of a content definition that are not indexable
522
522
  */
523
- export type PlainSchemaTypes = DateSchemaType | FragmentSchemaType | OneFragmentOfSchemaType | SlugSchemaType | SegmentedSchemaType;
523
+ export type PlainSchemaTypes = DateSchemaType | FragmentSchemaType | OneFragmentOfSchemaType | SlugSchemaType | PersonalizedSchemaType;
524
524
  /**
525
525
  * This type group all schema types of a content definition
526
526
  */
@@ -23,7 +23,7 @@ var SchemaTypeIds;
23
23
  SchemaTypeIds["ARRAY"] = "array";
24
24
  SchemaTypeIds["SLUG"] = "slug";
25
25
  SchemaTypeIds["MEDIA"] = "media";
26
- SchemaTypeIds["SEGMENTED"] = "segmented";
26
+ SchemaTypeIds["PERSONALIZED"] = "personalized";
27
27
  })(SchemaTypeIds || (exports.SchemaTypeIds = SchemaTypeIds = {}));
28
28
  /**
29
29
  * This enum represent al possible long text sub types
@@ -12,7 +12,7 @@ export * from './Invites';
12
12
  export * from './MediaGallery';
13
13
  export * from './PublishedContent';
14
14
  export * from './PublishingRequest';
15
- export * from './Segment';
15
+ export * from './Audience';
16
16
  export * from './Space';
17
17
  export * from './Subscription';
18
18
  export * from './UnpublishRequest';
package/dist/api/index.js CHANGED
@@ -28,7 +28,7 @@ __exportStar(require("./Invites"), exports);
28
28
  __exportStar(require("./MediaGallery"), exports);
29
29
  __exportStar(require("./PublishedContent"), exports);
30
30
  __exportStar(require("./PublishingRequest"), exports);
31
- __exportStar(require("./Segment"), exports);
31
+ __exportStar(require("./Audience"), exports);
32
32
  __exportStar(require("./Space"), exports);
33
33
  __exportStar(require("./Subscription"), exports);
34
34
  __exportStar(require("./UnpublishRequest"), exports);