@sprig-technologies/sprig-browser 2.14.9 → 2.15.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/index.d.ts +30 -7
- package/index.js +697 -181
- package/package.json +1 -1
- package/controller/controller.d.ts +0 -13
- package/controller/controller.d.ts.map +0 -1
- package/controller/controller.js +0 -1061
- package/controller/encodedViewJs.d.ts +0 -3
- package/controller/encodedViewJs.d.ts.map +0 -1
- package/controller/encodedViewJs.js +0 -1
- package/controller/iframe.d.ts +0 -9
- package/controller/iframe.d.ts.map +0 -1
- package/controller/iframe.js +0 -184
- package/controller/index.js +0 -3
- package/controller/queue.d.ts +0 -2
- package/controller/queue.d.ts.map +0 -1
- package/controller/queue.js +0 -95
- package/index.d.ts.map +0 -1
- package/shared/conflicting_widgets/index.d.ts +0 -5
- package/shared/conflicting_widgets/index.d.ts.map +0 -1
- package/shared/conflicting_widgets/index.js +0 -13
- package/shared/conflicting_widgets/intercom.d.ts +0 -3
- package/shared/conflicting_widgets/intercom.d.ts.map +0 -1
- package/shared/conflicting_widgets/intercom.js +0 -28
- package/shared/constants.d.ts +0 -47
- package/shared/constants.d.ts.map +0 -1
- package/shared/constants.js +0 -65
- package/shared/deferred.d.ts +0 -10
- package/shared/deferred.d.ts.map +0 -1
- package/shared/deferred.js +0 -15
- package/shared/eventEmitter.d.ts +0 -10
- package/shared/eventEmitter.d.ts.map +0 -1
- package/shared/eventEmitter.js +0 -52
- package/shared/network.d.ts +0 -8
- package/shared/network.d.ts.map +0 -1
- package/shared/network.js +0 -130
- package/shared/networkHelper.d.ts +0 -5
- package/shared/networkHelper.d.ts.map +0 -1
- package/shared/networkHelper.js +0 -9
- package/shared/shouldDirectEmbed.d.ts +0 -7
- package/shared/shouldDirectEmbed.d.ts.map +0 -1
- package/shared/shouldDirectEmbed.js +0 -8
- package/shared/tool.d.ts +0 -3
- package/shared/tool.d.ts.map +0 -1
- package/shared/tool.js +0 -19
- package/shared/ulEvents.d.ts +0 -33
- package/shared/ulEvents.d.ts.map +0 -1
- package/shared/ulEvents.js +0 -45
package/index.d.ts
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export class SprigAPI {
|
|
2
|
+
/**
|
|
3
|
+
* include external events emitted from Sprig
|
|
4
|
+
*/
|
|
5
|
+
UPDATES: {
|
|
6
|
+
SURVEY_LIFE_CYCLE: string;
|
|
7
|
+
SURVEY_DIMENSIONS: string;
|
|
8
|
+
SURVEY_HEIGHT: string;
|
|
9
|
+
SURVEY_WILL_PRESENT: string;
|
|
10
|
+
SURVEY_PRESENTED: string;
|
|
11
|
+
SURVEY_APPEARED: string;
|
|
12
|
+
SURVEY_FADING_OUT: string;
|
|
13
|
+
SURVEY_WILL_CLOSE: string;
|
|
14
|
+
SURVEY_CLOSED: string;
|
|
15
|
+
SDK_READY: string;
|
|
16
|
+
CLOSE_SURVEY_ON_OVERLAY_CLICK: string; /**
|
|
17
|
+
* Triggers displaying specified survey. Does not submit answers
|
|
18
|
+
* @param {Number} surveyId
|
|
19
|
+
*/
|
|
20
|
+
VISITOR_ID_UPDATED: string;
|
|
21
|
+
};
|
|
6
22
|
/**
|
|
7
23
|
* Triggers displaying specified survey. Does submit answers!
|
|
8
24
|
* @param {Number} surveyId
|
|
@@ -98,7 +114,7 @@ declare class SprigAPI {
|
|
|
98
114
|
* optionally set userId and/or anonymousId, track an event to show survey if eligible
|
|
99
115
|
* @param {Object} payload
|
|
100
116
|
* @param {String} payload.eventName name of event to track
|
|
101
|
-
|
|
117
|
+
* @param {Object} payload.metadata event metadata (optional)
|
|
102
118
|
* @param {String} payload.userId userId (optional)
|
|
103
119
|
* @param {String} payload.anonymousId anonymousId (optional)
|
|
104
120
|
* @returns
|
|
@@ -119,9 +135,16 @@ declare class SprigAPI {
|
|
|
119
135
|
* @param {Number} height
|
|
120
136
|
*/
|
|
121
137
|
setWindowDimensions(width: number, height: number): void;
|
|
138
|
+
/**
|
|
139
|
+
* logs out current visitor and associated ids
|
|
140
|
+
*/
|
|
141
|
+
logoutUser(): void;
|
|
122
142
|
/**
|
|
123
143
|
* clears Sprig from window
|
|
124
144
|
*/
|
|
125
145
|
teardown(): void;
|
|
126
146
|
}
|
|
127
|
-
|
|
147
|
+
declare namespace _default {
|
|
148
|
+
function configure(config: any): SprigAPI;
|
|
149
|
+
}
|
|
150
|
+
export default _default;
|