@sprig-technologies/sprig-browser 2.14.8 → 2.15.1

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.
Files changed (48) hide show
  1. package/index.d.ts +30 -7
  2. package/index.js +697 -181
  3. package/package.json +1 -1
  4. package/LICENSE +0 -22
  5. package/controller/controller.d.ts +0 -13
  6. package/controller/controller.d.ts.map +0 -1
  7. package/controller/controller.js +0 -1061
  8. package/controller/encodedViewJs.d.ts +0 -3
  9. package/controller/encodedViewJs.d.ts.map +0 -1
  10. package/controller/encodedViewJs.js +0 -1
  11. package/controller/iframe.d.ts +0 -9
  12. package/controller/iframe.d.ts.map +0 -1
  13. package/controller/iframe.js +0 -184
  14. package/controller/index.js +0 -3
  15. package/controller/queue.d.ts +0 -2
  16. package/controller/queue.d.ts.map +0 -1
  17. package/controller/queue.js +0 -95
  18. package/index.d.ts.map +0 -1
  19. package/shared/conflicting_widgets/index.d.ts +0 -5
  20. package/shared/conflicting_widgets/index.d.ts.map +0 -1
  21. package/shared/conflicting_widgets/index.js +0 -13
  22. package/shared/conflicting_widgets/intercom.d.ts +0 -3
  23. package/shared/conflicting_widgets/intercom.d.ts.map +0 -1
  24. package/shared/conflicting_widgets/intercom.js +0 -28
  25. package/shared/constants.d.ts +0 -49
  26. package/shared/constants.d.ts.map +0 -1
  27. package/shared/constants.js +0 -65
  28. package/shared/deferred.d.ts +0 -10
  29. package/shared/deferred.d.ts.map +0 -1
  30. package/shared/deferred.js +0 -15
  31. package/shared/eventEmitter.d.ts +0 -10
  32. package/shared/eventEmitter.d.ts.map +0 -1
  33. package/shared/eventEmitter.js +0 -52
  34. package/shared/network.d.ts +0 -8
  35. package/shared/network.d.ts.map +0 -1
  36. package/shared/network.js +0 -130
  37. package/shared/networkHelper.d.ts +0 -5
  38. package/shared/networkHelper.d.ts.map +0 -1
  39. package/shared/networkHelper.js +0 -9
  40. package/shared/shouldDirectEmbed.d.ts +0 -7
  41. package/shared/shouldDirectEmbed.d.ts.map +0 -1
  42. package/shared/shouldDirectEmbed.js +0 -8
  43. package/shared/tool.d.ts +0 -3
  44. package/shared/tool.d.ts.map +0 -1
  45. package/shared/tool.js +0 -19
  46. package/shared/ulEvents.d.ts +0 -33
  47. package/shared/ulEvents.d.ts.map +0 -1
  48. package/shared/ulEvents.js +0 -45
package/index.d.ts CHANGED
@@ -1,8 +1,24 @@
1
- declare namespace _default {
2
- function configure(config: any): SprigAPI;
3
- }
4
- export default _default;
5
- declare class SprigAPI {
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
- * @param {Object} payload.metadata event metadata (optional)
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
- //# sourceMappingURL=index.d.ts.map
147
+ declare namespace _default {
148
+ function configure(config: any): SprigAPI;
149
+ }
150
+ export default _default;