@sprig-technologies/sprig-browser 2.23.6 → 2.24.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.
package/dist/index.d.ts CHANGED
@@ -349,6 +349,16 @@ interface PassthroughData {
349
349
  responseGroupUid: UUID;
350
350
  }
351
351
 
352
+ interface RecordedTaskResponseValueType {
353
+ mediaRecordingUids?: string[] | null;
354
+ taskDurationMillisecond?: number;
355
+ taskStatus: TaskStatus;
356
+ }
357
+ declare enum BooleanOperator {
358
+ And = 1,
359
+ Or = 2
360
+ }
361
+
352
362
  declare const enum CardType {
353
363
  ConsentLegal = "consentlegal",
354
364
  Likert = "likert",
@@ -381,15 +391,30 @@ declare const enum Comparator {
381
391
  GreaterThanOrEqual = "gte",
382
392
  ListAll = "list_all",
383
393
  ListAtLeastOne = "list_alo",
384
- ListExact = "list_exact"
394
+ ListExact = "list_exact",
395
+ DoesNotInclude = "list_dni",
396
+ Contains = "contains",
397
+ DoesNotContain = "notcontains"
385
398
  }
386
399
  declare type DefaultComparator = Comparator.Answered | Comparator.Skipped;
387
- interface RoutingOption<C extends Comparator = DefaultComparator> {
400
+ declare type RoutingOption<C extends Comparator = DefaultComparator> = OldRoutingOption<C> | GroupRoutingOption;
401
+ declare type OldRoutingOption<C extends Comparator = DefaultComparator> = {
388
402
  comparator: C;
389
403
  target: number;
390
404
  /** @example '', 'option_2', ['option_1'] */
391
405
  value: number | string | string[];
392
- }
406
+ };
407
+ declare type GroupRoutingOption = {
408
+ group: (RoutingGroupOption | BooleanOperator)[];
409
+ target: number;
410
+ };
411
+ declare type RoutingGroupOption = {
412
+ comparator: Comparator;
413
+ questionIndex: number;
414
+ value: number | string | string[] | {
415
+ skipped: true;
416
+ } | null | undefined;
417
+ };
393
418
  declare type RoutingOptions<C extends Comparator = DefaultComparator> = RoutingOption<C | DefaultComparator>[] | null;
394
419
  /** @example <p>Body</p> */
395
420
  declare type RichTextBody = string;
@@ -551,7 +576,7 @@ interface OpenTextCard extends BaseCard {
551
576
  richTextBody: RichTextBody;
552
577
  skipButtonText?: string;
553
578
  };
554
- routingOptions: RoutingOptions;
579
+ routingOptions: RoutingOptions<Comparator.Contains | Comparator.DoesNotContain>;
555
580
  };
556
581
  type: CardType.Open;
557
582
  }
@@ -586,10 +611,10 @@ interface MultiChoiceCard<C extends Comparator = DefaultComparator> extends Base
586
611
  routingOptions: RoutingOptions<C>;
587
612
  };
588
613
  }
589
- interface MultipleChoiceSingleSelectCard extends MultiChoiceCard<Comparator.Equal | Comparator.NotEqual> {
614
+ interface MultipleChoiceSingleSelectCard extends MultiChoiceCard<Comparator.Equal | Comparator.NotEqual | Comparator.ListAtLeastOne | Comparator.DoesNotInclude> {
590
615
  type: CardType.MultipleChoice;
591
616
  }
592
- interface MultipleChoiceMultiSelectCard extends MultiChoiceCard<Comparator.ListAll | Comparator.ListAtLeastOne | Comparator.ListExact> {
617
+ interface MultipleChoiceMultiSelectCard extends MultiChoiceCard<Comparator.ListAll | Comparator.ListAtLeastOne | Comparator.ListExact | Comparator.DoesNotInclude> {
593
618
  type: CardType.MultipleSelect;
594
619
  }
595
620
  interface NPSCard extends BaseCard {
@@ -634,12 +659,6 @@ interface VideoVoiceCard extends BaseCard {
634
659
  }
635
660
  declare type Card = TextUrlPromptCard | ConsentLegalCard | RecordedTaskCard | LikertCard | OpenTextCard | MultipleChoiceSingleSelectCard | MultipleChoiceMultiSelectCard | NPSCard | VideoVoiceCard;
636
661
 
637
- interface RecordedTaskResponseValueType {
638
- mediaRecordingUids?: string[] | null;
639
- taskDurationMillisecond?: number;
640
- taskStatus: TaskStatus;
641
- }
642
-
643
662
  interface RecordedTaskResponseType {
644
663
  questionId: number;
645
664
  type: CardType;
@@ -802,6 +821,7 @@ interface Answer {
802
821
  value: unknown;
803
822
  }
804
823
  interface Config {
824
+ allResponses: unknown[];
805
825
  answers?: Answer[];
806
826
  apiURL: string;
807
827
  /** @example "#000000" */