@sprig-technologies/sprig-bundled 1.0.0-beta.2 → 1.0.2
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/LICENSE.md +10 -173
- package/dist/index.cjs +19 -19
- package/dist/index.d.ts +35 -4
- package/dist/index.js +3253 -3189
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1884,6 +1884,7 @@ declare enum DismissReason {
|
|
|
1884
1884
|
Override = "override"
|
|
1885
1885
|
}
|
|
1886
1886
|
declare enum SprigEvent {
|
|
1887
|
+
ReplayCapture = "replay.capture",
|
|
1887
1888
|
SDKReady = "sdk.ready",
|
|
1888
1889
|
SurveyAppeared = "survey.appeared",
|
|
1889
1890
|
SurveyClosed = "survey.closed",
|
|
@@ -1913,6 +1914,7 @@ declare const EVENTS: {
|
|
|
1913
1914
|
SURVEY_WILL_CLOSE: SprigEvent;
|
|
1914
1915
|
SURVEY_WILL_PRESENT: SprigEvent;
|
|
1915
1916
|
QUESTION_ANSWERED: SprigEvent;
|
|
1917
|
+
REPLAY_CAPTURE: SprigEvent;
|
|
1916
1918
|
CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent;
|
|
1917
1919
|
VISITOR_ID_UPDATED: SprigEvent;
|
|
1918
1920
|
DATA: {
|
|
@@ -2327,6 +2329,14 @@ interface RecordedTaskResponseType {
|
|
|
2327
2329
|
value: RecordedTaskResponseValueType;
|
|
2328
2330
|
}
|
|
2329
2331
|
|
|
2332
|
+
interface MobileReplayConfig {
|
|
2333
|
+
maxMobileReplayDurationSeconds?: number;
|
|
2334
|
+
mobileReplaySettings?: {
|
|
2335
|
+
hideAllFormContents: boolean;
|
|
2336
|
+
hidePasswordsOnly: boolean;
|
|
2337
|
+
hideAllImages: boolean;
|
|
2338
|
+
};
|
|
2339
|
+
}
|
|
2330
2340
|
type SprigEventMap = {
|
|
2331
2341
|
[InternalEventName.CurrentQuestion]: [
|
|
2332
2342
|
{
|
|
@@ -2343,7 +2353,7 @@ type SprigEventMap = {
|
|
|
2343
2353
|
}
|
|
2344
2354
|
];
|
|
2345
2355
|
[SprigEvent.CloseSurveyOnOverlayClick]: [];
|
|
2346
|
-
[SprigEvent.SDKReady]: [];
|
|
2356
|
+
[SprigEvent.SDKReady]: [MobileReplayConfig];
|
|
2347
2357
|
[SprigEvent.SurveyAppeared]: [];
|
|
2348
2358
|
[SprigEvent.SurveyDimensions]: [
|
|
2349
2359
|
{
|
|
@@ -2395,6 +2405,17 @@ type SprigEventMap = {
|
|
|
2395
2405
|
value: unknown;
|
|
2396
2406
|
}
|
|
2397
2407
|
];
|
|
2408
|
+
[SprigEvent.ReplayCapture]: [
|
|
2409
|
+
{
|
|
2410
|
+
responseGroupUid: string;
|
|
2411
|
+
hasQuestions: boolean;
|
|
2412
|
+
uploadId: string;
|
|
2413
|
+
seconds: number;
|
|
2414
|
+
replayType: ReplayDurationType;
|
|
2415
|
+
generateVideoUploadUrlPayload: object;
|
|
2416
|
+
surveyId: number;
|
|
2417
|
+
}
|
|
2418
|
+
];
|
|
2398
2419
|
[SprigRecordingEvent.AvPermission]: [
|
|
2399
2420
|
{
|
|
2400
2421
|
[SprigRecordingEventData.StreamReadyCallback]: (avStream: MediaStream | null, captureStream?: MediaStream | null) => void;
|
|
@@ -2490,7 +2511,7 @@ interface Answer {
|
|
|
2490
2511
|
questionId: number;
|
|
2491
2512
|
value: unknown;
|
|
2492
2513
|
}
|
|
2493
|
-
interface Config {
|
|
2514
|
+
interface Config extends MobileReplayConfig {
|
|
2494
2515
|
allResponses: unknown[];
|
|
2495
2516
|
answers?: Answer[];
|
|
2496
2517
|
apiURL: string;
|
|
@@ -2541,6 +2562,8 @@ interface Config {
|
|
|
2541
2562
|
[HttpHeader.PreviewMode]?: string;
|
|
2542
2563
|
/** @example "2.18.0" */
|
|
2543
2564
|
"x-ul-sdk-version": string;
|
|
2565
|
+
/** For web-bundled sdk */
|
|
2566
|
+
"x-ul-bundled-sdk-version"?: string;
|
|
2544
2567
|
[HttpHeader.UserID]?: string;
|
|
2545
2568
|
[HttpHeader.VisitorID]?: UUID;
|
|
2546
2569
|
};
|
|
@@ -2593,6 +2616,11 @@ interface Config {
|
|
|
2593
2616
|
};
|
|
2594
2617
|
}
|
|
2595
2618
|
|
|
2619
|
+
declare enum ReplayDurationType {
|
|
2620
|
+
After = "after",
|
|
2621
|
+
Before = "before",
|
|
2622
|
+
BeforeAndAfter = "beforeAndAfter"
|
|
2623
|
+
}
|
|
2596
2624
|
declare enum ReplayEventType {
|
|
2597
2625
|
Click = "Sprig_Click",
|
|
2598
2626
|
Event = "Sprig_TrackEvent",
|
|
@@ -2697,6 +2725,7 @@ declare namespace sprigConfig {
|
|
|
2697
2725
|
surveyId?: number;
|
|
2698
2726
|
updatedAt?: string;
|
|
2699
2727
|
visitorId?: string | null;
|
|
2728
|
+
isReplay?: boolean;
|
|
2700
2729
|
}) => Promise<string | null>;
|
|
2701
2730
|
_previewSurvey: (surveyTemplateId: UUID) => void;
|
|
2702
2731
|
_reviewSurvey: (surveyId: number) => void;
|
|
@@ -2788,7 +2817,6 @@ declare namespace sprigConfig {
|
|
|
2788
2817
|
frameId: string;
|
|
2789
2818
|
loaded: boolean;
|
|
2790
2819
|
locale?: string;
|
|
2791
|
-
localStorageAvailable: boolean;
|
|
2792
2820
|
maxHeight?: number | string;
|
|
2793
2821
|
maxInflightReplayRequests?: number;
|
|
2794
2822
|
mobileHeadersJSON?: string;
|
|
@@ -2872,7 +2900,10 @@ declare class SprigAPI {
|
|
|
2872
2900
|
SURVEY_WILL_CLOSE: SprigEvent;
|
|
2873
2901
|
SURVEY_WILL_PRESENT: SprigEvent;
|
|
2874
2902
|
QUESTION_ANSWERED: SprigEvent;
|
|
2875
|
-
|
|
2903
|
+
REPLAY_CAPTURE: SprigEvent;
|
|
2904
|
+
CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent; /**
|
|
2905
|
+
* Attach a user id to the visitor
|
|
2906
|
+
*/
|
|
2876
2907
|
VISITOR_ID_UPDATED: SprigEvent;
|
|
2877
2908
|
DATA: {
|
|
2878
2909
|
DISMISS_REASONS: {
|