@sprig-technologies/sprig-browser 2.24.2 → 2.24.3
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.cjs +17 -17
- package/dist/index.d.ts +15 -2
- package/dist/index.js +2984 -2914
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -263,7 +263,8 @@ declare enum SprigEvent {
|
|
|
263
263
|
SurveyWillClose = "survey.willClose",
|
|
264
264
|
SurveyWillPresent = "survey.will.present",
|
|
265
265
|
CloseSurveyOnOverlayClick = "close.survey.overlayClick",
|
|
266
|
-
VisitorIDUpdated = "visitor.id.updated"
|
|
266
|
+
VisitorIDUpdated = "visitor.id.updated",
|
|
267
|
+
QuestionAnswered = "question.answered"
|
|
267
268
|
}
|
|
268
269
|
declare enum SprigEventData {
|
|
269
270
|
SurveyId = "survey.id"
|
|
@@ -279,6 +280,7 @@ declare const EVENTS: {
|
|
|
279
280
|
SURVEY_LIFE_CYCLE: SprigEvent;
|
|
280
281
|
SURVEY_WILL_CLOSE: SprigEvent;
|
|
281
282
|
SURVEY_WILL_PRESENT: SprigEvent;
|
|
283
|
+
QUESTION_ANSWERED: SprigEvent;
|
|
282
284
|
CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent;
|
|
283
285
|
VISITOR_ID_UPDATED: SprigEvent;
|
|
284
286
|
DATA: {
|
|
@@ -726,6 +728,13 @@ declare type SprigEventMap = {
|
|
|
726
728
|
[SprigEvent.VisitorIDUpdated]: [{
|
|
727
729
|
visitorId: string | null;
|
|
728
730
|
}];
|
|
731
|
+
[SprigEvent.QuestionAnswered]: [
|
|
732
|
+
{
|
|
733
|
+
answeredAt?: number;
|
|
734
|
+
questionIndex?: number;
|
|
735
|
+
value: unknown;
|
|
736
|
+
}
|
|
737
|
+
];
|
|
729
738
|
[SprigRecordingEvent.AvPermission]: [
|
|
730
739
|
{
|
|
731
740
|
[SprigRecordingEventData.StreamReadyCallback]: (avStream: MediaStream | null, captureStream?: MediaStream | null) => void;
|
|
@@ -1086,6 +1095,7 @@ declare namespace sprigConfig {
|
|
|
1086
1095
|
height: number | string
|
|
1087
1096
|
) => void;
|
|
1088
1097
|
setEmail: (email: string) => IdentifyResult;
|
|
1098
|
+
setPreviewKey: (previewKey: string) => void;
|
|
1089
1099
|
setUserId: (userId: string) => IdentifyResult;
|
|
1090
1100
|
setVisitorEmail: (email: string) => IdentifyResult;
|
|
1091
1101
|
setVisitorToken: () => void;
|
|
@@ -1189,7 +1199,10 @@ declare class SprigAPI {
|
|
|
1189
1199
|
SURVEY_LIFE_CYCLE: SprigEvent;
|
|
1190
1200
|
SURVEY_WILL_CLOSE: SprigEvent;
|
|
1191
1201
|
SURVEY_WILL_PRESENT: SprigEvent;
|
|
1192
|
-
|
|
1202
|
+
QUESTION_ANSWERED: SprigEvent;
|
|
1203
|
+
CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent; /**
|
|
1204
|
+
* Attach an email address to visitor
|
|
1205
|
+
*/
|
|
1193
1206
|
VISITOR_ID_UPDATED: SprigEvent;
|
|
1194
1207
|
DATA: {
|
|
1195
1208
|
DISMISS_REASONS: {
|