@pushwoosh/rpc-gateway-ai-assistant 0.1.611 → 0.1.612

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/data.js CHANGED
@@ -784,6 +784,258 @@ export const data = {
784
784
  }
785
785
  }
786
786
  },
787
+ "pushwoosh.aibuilder.v1.RatingScale": {
788
+ "type": "E",
789
+ "values": [
790
+ "RATING_SCALE_UNSPECIFIED",
791
+ "RATING_SCALE_NPS",
792
+ "RATING_SCALE_STARS",
793
+ "RATING_SCALE_THUMBS"
794
+ ]
795
+ },
796
+ "pushwoosh.aibuilder.v1.AnswerSubmit": {
797
+ "type": "I",
798
+ "fields": {
799
+ "onSelect": {
800
+ "type": "boolean"
801
+ },
802
+ "label": {
803
+ "type": "string"
804
+ },
805
+ "labelTranslations": {
806
+ "type": "string",
807
+ "mapKeyType": "string"
808
+ },
809
+ "styles": {
810
+ "type": "pushwoosh.aibuilder.v1.ButtonStyles",
811
+ "optional": true
812
+ }
813
+ }
814
+ },
815
+ "pushwoosh.aibuilder.v1.Rating": {
816
+ "type": "I",
817
+ "fields": {
818
+ "question": {
819
+ "type": "string"
820
+ },
821
+ "scale": {
822
+ "type": "pushwoosh.aibuilder.v1.RatingScale"
823
+ },
824
+ "lowLabel": {
825
+ "type": "string"
826
+ },
827
+ "lowLabelTranslations": {
828
+ "type": "string",
829
+ "mapKeyType": "string"
830
+ },
831
+ "highLabel": {
832
+ "type": "string"
833
+ },
834
+ "highLabelTranslations": {
835
+ "type": "string",
836
+ "mapKeyType": "string"
837
+ },
838
+ "submit": {
839
+ "type": "pushwoosh.aibuilder.v1.AnswerSubmit"
840
+ },
841
+ "tag": {
842
+ "type": "string"
843
+ },
844
+ "accentColor": {
845
+ "type": "string"
846
+ }
847
+ }
848
+ },
849
+ "pushwoosh.aibuilder.v1.ChoiceView": {
850
+ "type": "E",
851
+ "values": [
852
+ "CHOICE_VIEW_UNSPECIFIED",
853
+ "CHOICE_VIEW_LIST",
854
+ "CHOICE_VIEW_CHIPS"
855
+ ]
856
+ },
857
+ "pushwoosh.aibuilder.v1.ChoiceOption": {
858
+ "type": "I",
859
+ "fields": {
860
+ "label": {
861
+ "type": "string"
862
+ },
863
+ "labelTranslations": {
864
+ "type": "string",
865
+ "mapKeyType": "string"
866
+ },
867
+ "value": {
868
+ "type": "string"
869
+ }
870
+ }
871
+ },
872
+ "pushwoosh.aibuilder.v1.ChoiceOther": {
873
+ "type": "I",
874
+ "fields": {
875
+ "label": {
876
+ "type": "string"
877
+ },
878
+ "labelTranslations": {
879
+ "type": "string",
880
+ "mapKeyType": "string"
881
+ },
882
+ "placeholder": {
883
+ "type": "string"
884
+ },
885
+ "placeholderTranslations": {
886
+ "type": "string",
887
+ "mapKeyType": "string"
888
+ },
889
+ "value": {
890
+ "type": "string"
891
+ }
892
+ }
893
+ },
894
+ "pushwoosh.aibuilder.v1.AnswerSkip": {
895
+ "type": "I",
896
+ "fields": {
897
+ "label": {
898
+ "type": "string"
899
+ },
900
+ "labelTranslations": {
901
+ "type": "string",
902
+ "mapKeyType": "string"
903
+ }
904
+ }
905
+ },
906
+ "pushwoosh.aibuilder.v1.Choice": {
907
+ "type": "I",
908
+ "fields": {
909
+ "question": {
910
+ "type": "string"
911
+ },
912
+ "title": {
913
+ "type": "string"
914
+ },
915
+ "titleTranslations": {
916
+ "type": "string",
917
+ "mapKeyType": "string"
918
+ },
919
+ "required": {
920
+ "type": "boolean"
921
+ },
922
+ "view": {
923
+ "type": "pushwoosh.aibuilder.v1.ChoiceView"
924
+ },
925
+ "multiple": {
926
+ "type": "boolean"
927
+ },
928
+ "options": {
929
+ "type": "pushwoosh.aibuilder.v1.ChoiceOption",
930
+ "array": true
931
+ },
932
+ "other": {
933
+ "type": "pushwoosh.aibuilder.v1.ChoiceOther",
934
+ "optional": true
935
+ },
936
+ "minAnswers": {
937
+ "type": "number"
938
+ },
939
+ "maxAnswers": {
940
+ "type": "number"
941
+ },
942
+ "submit": {
943
+ "type": "pushwoosh.aibuilder.v1.AnswerSubmit"
944
+ },
945
+ "skip": {
946
+ "type": "pushwoosh.aibuilder.v1.AnswerSkip",
947
+ "optional": true
948
+ },
949
+ "tag": {
950
+ "type": "string"
951
+ },
952
+ "accentColor": {
953
+ "type": "string"
954
+ },
955
+ "prefillFromTag": {
956
+ "type": "boolean"
957
+ }
958
+ }
959
+ },
960
+ "pushwoosh.aibuilder.v1.InAppFormFieldType": {
961
+ "type": "E",
962
+ "values": [
963
+ "IN_APP_FORM_FIELD_TYPE_UNSPECIFIED",
964
+ "IN_APP_FORM_FIELD_TYPE_EMAIL",
965
+ "IN_APP_FORM_FIELD_TYPE_PHONE",
966
+ "IN_APP_FORM_FIELD_TYPE_NAME",
967
+ "IN_APP_FORM_FIELD_TYPE_TEXT"
968
+ ]
969
+ },
970
+ "pushwoosh.aibuilder.v1.InAppFormConsent": {
971
+ "type": "I",
972
+ "fields": {
973
+ "text": {
974
+ "type": "string"
975
+ },
976
+ "textTranslations": {
977
+ "type": "string",
978
+ "mapKeyType": "string"
979
+ },
980
+ "linkText": {
981
+ "type": "string"
982
+ },
983
+ "linkTextTranslations": {
984
+ "type": "string",
985
+ "mapKeyType": "string"
986
+ },
987
+ "linkUrl": {
988
+ "type": "string"
989
+ }
990
+ }
991
+ },
992
+ "pushwoosh.aibuilder.v1.InAppFormField": {
993
+ "type": "I",
994
+ "fields": {
995
+ "type": {
996
+ "type": "pushwoosh.aibuilder.v1.InAppFormFieldType"
997
+ },
998
+ "label": {
999
+ "type": "string"
1000
+ },
1001
+ "labelTranslations": {
1002
+ "type": "string",
1003
+ "mapKeyType": "string"
1004
+ },
1005
+ "placeholder": {
1006
+ "type": "string"
1007
+ },
1008
+ "placeholderTranslations": {
1009
+ "type": "string",
1010
+ "mapKeyType": "string"
1011
+ },
1012
+ "required": {
1013
+ "type": "boolean"
1014
+ },
1015
+ "tag": {
1016
+ "type": "string"
1017
+ },
1018
+ "consent": {
1019
+ "type": "pushwoosh.aibuilder.v1.InAppFormConsent",
1020
+ "optional": true
1021
+ }
1022
+ }
1023
+ },
1024
+ "pushwoosh.aibuilder.v1.InAppForm": {
1025
+ "type": "I",
1026
+ "fields": {
1027
+ "question": {
1028
+ "type": "string"
1029
+ },
1030
+ "fields": {
1031
+ "type": "pushwoosh.aibuilder.v1.InAppFormField",
1032
+ "array": true
1033
+ },
1034
+ "submit": {
1035
+ "type": "pushwoosh.aibuilder.v1.AnswerSubmit"
1036
+ }
1037
+ }
1038
+ },
787
1039
  "pushwoosh.aibuilder.v1.Timer": {
788
1040
  "type": "I",
789
1041
  "fields": {
@@ -1055,6 +1307,15 @@ export const data = {
1055
1307
  "survey": {
1056
1308
  "type": "pushwoosh.aibuilder.v1.UnsubscribeSurvey"
1057
1309
  },
1310
+ "rating": {
1311
+ "type": "pushwoosh.aibuilder.v1.Rating"
1312
+ },
1313
+ "choice": {
1314
+ "type": "pushwoosh.aibuilder.v1.Choice"
1315
+ },
1316
+ "inAppForm": {
1317
+ "type": "pushwoosh.aibuilder.v1.InAppForm"
1318
+ },
1058
1319
  "padding": {
1059
1320
  "type": "pushwoosh.aibuilder.v1.EdgeInsets",
1060
1321
  "optional": true
@@ -1091,7 +1352,10 @@ export const data = {
1091
1352
  "video",
1092
1353
  "barcode",
1093
1354
  "emailCategories",
1094
- "survey"
1355
+ "survey",
1356
+ "rating",
1357
+ "choice",
1358
+ "inAppForm"
1095
1359
  ]
1096
1360
  }
1097
1361
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.611",
3
+ "version": "0.1.612",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -693,6 +693,131 @@ export type UnsubscribeSurvey = {
693
693
  rowGap: number;
694
694
  fontSize: number;
695
695
  };
696
+ export type RatingScale =
697
+ /** treated as NPS */
698
+ 'RATING_SCALE_UNSPECIFIED'
699
+ /** 0-10 */
700
+ | 'RATING_SCALE_NPS'
701
+ /** 1-5 */
702
+ | 'RATING_SCALE_STARS'
703
+ /** up = 1, down = 0 */
704
+ | 'RATING_SCALE_THUMBS';
705
+ /** How an in-app answer item sends; shared by every answer item. */
706
+ export type AnswerSubmit = {
707
+ /** Sends on the first pick, for a single-answer item; false = a submit button. */
708
+ onSelect: boolean;
709
+ label: string;
710
+ labelTranslations: Record<string, string>;
711
+ styles?: ButtonStyles;
712
+ };
713
+ /**
714
+ * Rating question (in-app only). The answer is posted as PW_InAppAnswer
715
+ * {question, score, inapp_code} and, when `tag` is set, written to that numeric tag.
716
+ */
717
+ export type Rating = {
718
+ /** Question key, the `question` attribute of PW_InAppAnswer; required. */
719
+ question: string;
720
+ scale: RatingScale;
721
+ /** Captions under the scale's ends; unused by THUMBS. */
722
+ lowLabel: string;
723
+ lowLabelTranslations: Record<string, string>;
724
+ highLabel: string;
725
+ highLabelTranslations: Record<string, string>;
726
+ submit: AnswerSubmit;
727
+ tag: string;
728
+ /** Selected-mark colour (#RGB / #RRGGBB); empty = the scheme's accent, gold for stars. */
729
+ accentColor: string;
730
+ };
731
+ export type ChoiceView =
732
+ /** treated as radio buttons / checkboxes by `multiple` */
733
+ 'CHOICE_VIEW_UNSPECIFIED'
734
+ /** radio buttons, or checkboxes when `multiple` */
735
+ | 'CHOICE_VIEW_LIST' | 'CHOICE_VIEW_CHIPS';
736
+ export type ChoiceOption = {
737
+ label: string;
738
+ labelTranslations: Record<string, string>;
739
+ /** Written to the tag and the event; empty = `label` in the default language. Never translated. */
740
+ value: string;
741
+ };
742
+ /** The free-text option; its text goes to the event's `other`, never to the tag. */
743
+ export type ChoiceOther = {
744
+ label: string;
745
+ labelTranslations: Record<string, string>;
746
+ placeholder: string;
747
+ placeholderTranslations: Record<string, string>;
748
+ /** What picking it writes to the tag and to `answers`; empty = "other". */
749
+ value: string;
750
+ };
751
+ export type AnswerSkip = {
752
+ label: string;
753
+ labelTranslations: Record<string, string>;
754
+ };
755
+ /**
756
+ * Question with options (in-app only), topics included. Posts PW_InAppAnswer
757
+ * {question, answers, other, inapp_code}; `answers` is a list even for one pick.
758
+ */
759
+ export type Choice = {
760
+ /** Question key, the `question` attribute of PW_InAppAnswer; required. */
761
+ question: string;
762
+ /** Question text above the options. */
763
+ title: string;
764
+ titleTranslations: Record<string, string>;
765
+ required: boolean;
766
+ view: ChoiceView;
767
+ multiple: boolean;
768
+ options: ChoiceOption[];
769
+ /** Unset = no free-text option. */
770
+ other?: ChoiceOther;
771
+ /** Bounds on the picks when `multiple`; 0 = unbounded. */
772
+ minAnswers: number;
773
+ maxAnswers: number;
774
+ submit: AnswerSubmit;
775
+ /** Unset = no skip button. */
776
+ skip?: AnswerSkip;
777
+ /** Tag the picked values are written to (one = string, several = list); empty = none. */
778
+ tag: string;
779
+ /** Selected-mark colour (#RGB / #RRGGBB); empty = the scheme's accent. */
780
+ accentColor: string;
781
+ /** Opens with the values already in `tag` picked (the topics case): the user edits the choice, not starts over. */
782
+ prefillFromTag: boolean;
783
+ };
784
+ export type InAppFormFieldType =
785
+ /** treated as TEXT */
786
+ 'IN_APP_FORM_FIELD_TYPE_UNSPECIFIED'
787
+ /** registered as the user's email channel */
788
+ | 'IN_APP_FORM_FIELD_TYPE_EMAIL'
789
+ /** registered as the user's SMS channel */
790
+ | 'IN_APP_FORM_FIELD_TYPE_PHONE' | 'IN_APP_FORM_FIELD_TYPE_NAME' | 'IN_APP_FORM_FIELD_TYPE_TEXT';
791
+ /** Marketing consent next to an email or phone field; the form will not send unticked. */
792
+ export type InAppFormConsent = {
793
+ text: string;
794
+ textTranslations: Record<string, string>;
795
+ linkText: string;
796
+ linkTextTranslations: Record<string, string>;
797
+ linkUrl: string;
798
+ };
799
+ export type InAppFormField = {
800
+ type: InAppFormFieldType;
801
+ label: string;
802
+ labelTranslations: Record<string, string>;
803
+ placeholder: string;
804
+ placeholderTranslations: Record<string, string>;
805
+ required: boolean;
806
+ /** NAME / TEXT only: tag the value is written to; empty = none. */
807
+ tag: string;
808
+ /** EMAIL / PHONE only; unset = no consent checkbox. */
809
+ consent?: InAppFormConsent;
810
+ };
811
+ /**
812
+ * Field form (in-app only): email / phone become the user's channels, name / text go to tags.
813
+ * Posts PW_InAppAnswer {question, inapp_code}; field values never go to the event.
814
+ */
815
+ export type InAppForm = {
816
+ /** Question key, the `question` attribute of PW_InAppAnswer; required. */
817
+ question: string;
818
+ fields: InAppFormField[];
819
+ submit: AnswerSubmit;
820
+ };
696
821
  /**
697
822
  * Countdown timer. Renders in email HTML as an animated GIF served by this
698
823
  * service's public /timer/v1/countdown.gif endpoint (regenerated per open).
@@ -914,7 +1039,19 @@ export type ContentItem_item_survey = {
914
1039
  type: 'survey';
915
1040
  data: UnsubscribeSurvey;
916
1041
  };
917
- export type ContentItem_item = ContentItem_item_text | ContentItem_item_buttonGroup | ContentItem_item_list | ContentItem_item_image | ContentItem_item_form | ContentItem_item_timer | ContentItem_item_rawHtml | ContentItem_item_menu | ContentItem_item_social | ContentItem_item_video | ContentItem_item_barcode | ContentItem_item_emailCategories | ContentItem_item_survey;
1042
+ export type ContentItem_item_rating = {
1043
+ type: 'rating';
1044
+ data: Rating;
1045
+ };
1046
+ export type ContentItem_item_choice = {
1047
+ type: 'choice';
1048
+ data: Choice;
1049
+ };
1050
+ export type ContentItem_item_inAppForm = {
1051
+ type: 'inAppForm';
1052
+ data: InAppForm;
1053
+ };
1054
+ export type ContentItem_item = ContentItem_item_text | ContentItem_item_buttonGroup | ContentItem_item_list | ContentItem_item_image | ContentItem_item_form | ContentItem_item_timer | ContentItem_item_rawHtml | ContentItem_item_menu | ContentItem_item_social | ContentItem_item_video | ContentItem_item_barcode | ContentItem_item_emailCategories | ContentItem_item_survey | ContentItem_item_rating | ContentItem_item_choice | ContentItem_item_inAppForm;
918
1055
  export type ContentItem = {
919
1056
  /**
920
1057
  * Container padding of the item. Unset = client's default inter-item gap;