@clxmedia/types 1.12.1 → 1.13.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.
@@ -2,6 +2,7 @@ import type { XperienceAbility } from "../auth";
2
2
  export type CLXFormSelectOption = {
3
3
  value: string;
4
4
  label: string;
5
+ conditions?: CLXFormRuleSet;
5
6
  };
6
7
  export type CLXFormSelectOptions = CLXFormSelectOption[];
7
8
  export type CLXFormMode = "edit" | "preview" | "live";
@@ -340,61 +341,72 @@ export type CLXFormPortableResponse = {
340
341
  export type CLXFormPortableResponses = {
341
342
  [questionSlug: string]: CLXFormPortableResponse;
342
343
  };
343
- export type CLXRuleComparison = "stringEquals" | "stringExists" | "stringContains" | "stringStartsWith" | "stringEndsWith" | "stringInList" | "stringNotInList" | "stringListContainsAll" | "stringListContainsAny" | "stringListContainsNone" | "stringListEntryEquals" | "stringListEntryContains" | "stringListEntryStartsWith" | "stringListEntryEndsWith" | "dateEquals" | "dateBefore" | "dateAfter" | "booleanEquals" | "fileExists" | "numberEquals" | "numberGreaterThan" | "numberLessThan";
344
+ export type CLXRuleComparison = "isAnswered" | "stringEquals" | "stringExists" | "stringContains" | "stringStartsWith" | "stringEndsWith" | "stringInList" | "stringNotInList" | "stringListContainsAll" | "stringListContainsAny" | "stringListContainsNone" | "stringListEntryEquals" | "stringListEntryContains" | "stringListEntryStartsWith" | "stringListEntryEndsWith" | "dateEquals" | "dateBefore" | "dateAfter" | "booleanEquals" | "fileExists" | "numberEquals" | "numberGreaterThan" | "numberLessThan";
344
345
  export type CLXFormRuleDefinition = {
345
346
  subject: string;
346
347
  target: CLXFormResponseValue;
347
348
  comparison: CLXRuleComparison;
349
+ negate?: boolean;
348
350
  };
349
351
  export type CLXFormRuleInstanceBase = {
350
352
  subject: CLXFormResponseValue;
351
353
  target: CLXFormResponseValue;
352
354
  comparisonType: CLXRuleComparison;
355
+ negate?: boolean;
353
356
  };
354
357
  export type CLXFormRuleStringComparisonInstance = CLXFormRuleInstanceBase & {
355
358
  subject: CLXFormResponseStringValue;
356
359
  target: CLXFormResponseStringValue;
357
- comparisonType: "stringEquals" | "stringContains" | "stringStartsWith" | "stringEndsWith";
360
+ comparisonType: "isAnswered" | "stringEquals" | "stringContains" | "stringStartsWith" | "stringEndsWith";
361
+ negate?: boolean;
358
362
  };
359
363
  export type CLXFormRuleStringExistsComparisonInstance = CLXFormRuleInstanceBase & {
360
364
  subject: CLXFormResponseStringValue;
361
365
  target: CLXFormResponseBooleanValue;
362
- comparisonType: "stringExists";
366
+ comparisonType: "stringExists" | "isAnswered";
367
+ negate?: boolean;
363
368
  };
364
369
  export type CLXFormRuleStringListToStringListInstance = CLXFormRuleInstanceBase & {
365
370
  subject: CLXFormResponseStringArrayValue;
366
371
  target: CLXFormResponseStringArrayValue;
367
- comparisonType: "stringListContainsAll" | "stringListContainsAny" | "stringListContainsNone";
372
+ comparisonType: "isAnswered" | "stringListContainsAll" | "stringListContainsAny" | "stringListContainsNone";
373
+ negate?: boolean;
368
374
  };
369
375
  export type CLXFormRuleStringInListInstance = CLXFormRuleInstanceBase & {
370
376
  subject: CLXFormResponseStringValue;
371
377
  target: CLXFormResponseStringArrayValue;
372
- comparisonType: "stringInList" | "stringNotInList";
378
+ comparisonType: "stringInList" | "stringNotInList" | "isAnswered";
379
+ negate?: boolean;
373
380
  };
374
381
  export type CLXFormRuleFileExistsInstance = CLXFormRuleInstanceBase & {
375
382
  subject: CLXFormResponseFileValue;
376
383
  target: CLXFormResponseBooleanValue;
377
- comparisonType: "fileExists";
384
+ comparisonType: "fileExists" | "isAnswered";
385
+ negate?: boolean;
378
386
  };
379
387
  export type CLXFormRuleDateComparisonInstance = CLXFormRuleInstanceBase & {
380
388
  subject: CLXFormResponseDateValue;
381
389
  target: CLXFormResponseDateValue;
382
- comparisonType: "dateEquals" | "dateBefore" | "dateAfter";
390
+ comparisonType: "dateEquals" | "dateBefore" | "dateAfter" | "isAnswered";
391
+ negate?: boolean;
383
392
  };
384
393
  export type CLXFormRuleStringListComparisonInstance = CLXFormRuleInstanceBase & {
385
394
  subject: CLXFormResponseStringArrayValue;
386
395
  target: CLXFormResponseStringValue;
387
- comparisonType: "stringListEntryEquals" | "stringListEntryContains" | "stringListEntryStartsWith" | "stringListEntryEndsWith";
396
+ comparisonType: "stringListEntryEquals" | "stringListEntryContains" | "stringListEntryStartsWith" | "stringListEntryEndsWith" | "isAnswered";
397
+ negate?: boolean;
388
398
  };
389
399
  export type CLXFormRuleBooleanEqualsInstance = CLXFormRuleInstanceBase & {
390
400
  subject: CLXFormResponseBooleanValue;
391
401
  target: CLXFormResponseBooleanValue;
392
- comparisonType: "booleanEquals";
402
+ comparisonType: "booleanEquals" | "isAnswered";
403
+ negate?: boolean;
393
404
  };
394
405
  export type CLXFormRuleNumberComparisonInstance = CLXFormRuleInstanceBase & {
395
406
  subject: CLXFormResponseNumberValue;
396
407
  target: CLXFormResponseNumberValue;
397
- comparisonType: "numberEquals" | "numberGreaterThan" | "numberLessThan";
408
+ comparisonType: "numberEquals" | "numberGreaterThan" | "numberLessThan" | "isAnswered";
409
+ negate?: boolean;
398
410
  };
399
411
  export type CLXFormRuleInstance = CLXFormRuleStringComparisonInstance | CLXFormRuleStringExistsComparisonInstance | CLXFormRuleStringInListInstance | CLXFormRuleFileExistsInstance | CLXFormRuleDateComparisonInstance | CLXFormRuleStringListToStringListInstance | CLXFormRuleStringListComparisonInstance | CLXFormRuleBooleanEqualsInstance | CLXFormRuleNumberComparisonInstance;
400
412
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/types",
3
- "version": "1.12.1",
3
+ "version": "1.13.0",
4
4
  "description": "Conversion Logix TypeScript type definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",