@sprig-technologies/sprig-browser 2.14.9 → 2.15.0

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 (47) hide show
  1. package/index.d.ts +26 -7
  2. package/index.js +697 -181
  3. package/package.json +1 -1
  4. package/controller/controller.d.ts +0 -13
  5. package/controller/controller.d.ts.map +0 -1
  6. package/controller/controller.js +0 -1061
  7. package/controller/encodedViewJs.d.ts +0 -3
  8. package/controller/encodedViewJs.d.ts.map +0 -1
  9. package/controller/encodedViewJs.js +0 -1
  10. package/controller/iframe.d.ts +0 -9
  11. package/controller/iframe.d.ts.map +0 -1
  12. package/controller/iframe.js +0 -184
  13. package/controller/index.js +0 -3
  14. package/controller/queue.d.ts +0 -2
  15. package/controller/queue.d.ts.map +0 -1
  16. package/controller/queue.js +0 -95
  17. package/index.d.ts.map +0 -1
  18. package/shared/conflicting_widgets/index.d.ts +0 -5
  19. package/shared/conflicting_widgets/index.d.ts.map +0 -1
  20. package/shared/conflicting_widgets/index.js +0 -13
  21. package/shared/conflicting_widgets/intercom.d.ts +0 -3
  22. package/shared/conflicting_widgets/intercom.d.ts.map +0 -1
  23. package/shared/conflicting_widgets/intercom.js +0 -28
  24. package/shared/constants.d.ts +0 -47
  25. package/shared/constants.d.ts.map +0 -1
  26. package/shared/constants.js +0 -65
  27. package/shared/deferred.d.ts +0 -10
  28. package/shared/deferred.d.ts.map +0 -1
  29. package/shared/deferred.js +0 -15
  30. package/shared/eventEmitter.d.ts +0 -10
  31. package/shared/eventEmitter.d.ts.map +0 -1
  32. package/shared/eventEmitter.js +0 -52
  33. package/shared/network.d.ts +0 -8
  34. package/shared/network.d.ts.map +0 -1
  35. package/shared/network.js +0 -130
  36. package/shared/networkHelper.d.ts +0 -5
  37. package/shared/networkHelper.d.ts.map +0 -1
  38. package/shared/networkHelper.js +0 -9
  39. package/shared/shouldDirectEmbed.d.ts +0 -7
  40. package/shared/shouldDirectEmbed.d.ts.map +0 -1
  41. package/shared/shouldDirectEmbed.js +0 -8
  42. package/shared/tool.d.ts +0 -3
  43. package/shared/tool.d.ts.map +0 -1
  44. package/shared/tool.js +0 -19
  45. package/shared/ulEvents.d.ts +0 -33
  46. package/shared/ulEvents.d.ts.map +0 -1
  47. 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
@@ -124,4 +140,7 @@ declare class SprigAPI {
124
140
  */
125
141
  teardown(): void;
126
142
  }
127
- //# sourceMappingURL=index.d.ts.map
143
+ declare namespace _default {
144
+ function configure(config: any): SprigAPI;
145
+ }
146
+ export default _default;