@zoho_apptics/apptics-js-sdk 2.0.0-beta → 2.0.0-beta.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 (220) hide show
  1. package/CHANGELOG.md +111 -5
  2. package/README.md +399 -300
  3. package/dist/apptics.esm.min.js +2 -2
  4. package/dist/apptics.esm.min.js.map +1 -1
  5. package/dist/apptics.min.js +2 -2
  6. package/dist/apptics.min.js.map +1 -1
  7. package/dist/chunks/lifecycle-VYr43KcB.min.js +3 -0
  8. package/dist/chunks/lifecycle-VYr43KcB.min.js.map +1 -0
  9. package/dist/cjs/auto-init.d.ts +3 -3
  10. package/dist/cjs/auto-init.js +1 -1
  11. package/dist/cjs/core/attempts.js +1 -1
  12. package/dist/cjs/core/batch.js +2 -1
  13. package/dist/cjs/core/callsite.d.ts +6 -0
  14. package/dist/cjs/core/callsite.js +25 -3
  15. package/dist/cjs/core/consent.d.ts +5 -1
  16. package/dist/cjs/core/consent.js +8 -6
  17. package/dist/cjs/core/constants.d.ts +35 -10
  18. package/dist/cjs/core/constants.js +31 -15
  19. package/dist/cjs/core/db.d.ts +12 -4
  20. package/dist/cjs/core/db.js +167 -34
  21. package/dist/cjs/core/debug.js +1 -1
  22. package/dist/cjs/core/env.js +1 -1
  23. package/dist/cjs/core/framework-id.d.ts +1 -1
  24. package/dist/cjs/core/framework-id.js +3 -3
  25. package/dist/cjs/core/guard.d.ts +9 -0
  26. package/dist/cjs/core/guard.js +27 -13
  27. package/dist/cjs/core/hooks.d.ts +2 -4
  28. package/dist/cjs/core/hooks.js +2 -3
  29. package/dist/cjs/core/locks.d.ts +9 -0
  30. package/dist/cjs/core/locks.js +22 -0
  31. package/dist/cjs/core/logger.d.ts +3 -4
  32. package/dist/cjs/core/logger.js +4 -40
  33. package/dist/cjs/core/state.d.ts +3 -2
  34. package/dist/cjs/core/state.js +2 -2
  35. package/dist/cjs/core/storage.d.ts +20 -5
  36. package/dist/cjs/core/storage.js +115 -17
  37. package/dist/cjs/core/stylesheet.d.ts +8 -0
  38. package/dist/cjs/core/stylesheet.js +29 -0
  39. package/dist/cjs/core/transport.d.ts +2 -0
  40. package/dist/cjs/core/transport.js +19 -4
  41. package/dist/cjs/core/utils.js +1 -1
  42. package/dist/cjs/core/validate.js +2 -2
  43. package/dist/cjs/device/appversion.d.ts +1 -6
  44. package/dist/cjs/device/appversion.js +13 -1
  45. package/dist/cjs/device/index.d.ts +11 -0
  46. package/dist/cjs/device/index.js +120 -20
  47. package/dist/cjs/engagement/api-rules.d.ts +32 -67
  48. package/dist/cjs/engagement/api-rules.js +144 -157
  49. package/dist/cjs/engagement/auto-api.js +2 -2
  50. package/dist/cjs/engagement/auto-screen.d.ts +2 -0
  51. package/dist/cjs/engagement/auto-screen.js +67 -3
  52. package/dist/cjs/engagement/defined-events.js +1 -1
  53. package/dist/cjs/engagement/send.js +6 -1
  54. package/dist/cjs/engagement/session.d.ts +12 -3
  55. package/dist/cjs/engagement/session.js +161 -25
  56. package/dist/cjs/engagement/track.js +45 -20
  57. package/dist/cjs/errors/send.js +1 -1
  58. package/dist/cjs/errors/track.d.ts +1 -1
  59. package/dist/cjs/errors/track.js +46 -6
  60. package/dist/cjs/feedback/controls.d.ts +6 -0
  61. package/dist/cjs/feedback/controls.js +31 -1
  62. package/dist/cjs/feedback/index.d.ts +8 -7
  63. package/dist/cjs/feedback/index.js +32 -13
  64. package/dist/cjs/feedback/logs.d.ts +10 -5
  65. package/dist/cjs/feedback/logs.js +52 -13
  66. package/dist/cjs/feedback/quartz.d.ts +18 -0
  67. package/dist/cjs/feedback/quartz.js +105 -0
  68. package/dist/cjs/feedback/send.d.ts +3 -0
  69. package/dist/cjs/feedback/send.js +28 -3
  70. package/dist/cjs/feedback/styles.d.ts +10 -0
  71. package/dist/cjs/feedback/styles.js +8 -0
  72. package/dist/cjs/feedback/template.d.ts +1 -1
  73. package/dist/cjs/feedback/template.js +12 -12
  74. package/dist/cjs/feedback/ui.d.ts +14 -6
  75. package/dist/cjs/feedback/ui.js +126 -48
  76. package/dist/cjs/heatmap/send.js +1 -1
  77. package/dist/cjs/heatmap/track.d.ts +1 -1
  78. package/dist/cjs/heatmap/track.js +87 -16
  79. package/dist/cjs/index.d.ts +17 -63
  80. package/dist/cjs/index.js +104 -92
  81. package/dist/cjs/lifecycle.d.ts +8 -1
  82. package/dist/cjs/lifecycle.js +258 -62
  83. package/dist/cjs/remoteconfig/country.d.ts +4 -0
  84. package/dist/cjs/remoteconfig/country.js +73 -0
  85. package/dist/cjs/remoteconfig/custom.d.ts +7 -7
  86. package/dist/cjs/remoteconfig/custom.js +31 -51
  87. package/dist/cjs/remoteconfig/evaluate.d.ts +3 -3
  88. package/dist/cjs/remoteconfig/evaluate.js +56 -43
  89. package/dist/cjs/remoteconfig/fetch.d.ts +3 -3
  90. package/dist/cjs/remoteconfig/fetch.js +9 -23
  91. package/dist/cjs/remoteconfig/index.d.ts +10 -8
  92. package/dist/cjs/remoteconfig/index.js +65 -39
  93. package/dist/cjs/remoteconfig/store.js +1 -1
  94. package/dist/cjs/remoteconfig/tz-countries.d.ts +8 -0
  95. package/dist/cjs/remoteconfig/tz-countries.js +13 -0
  96. package/dist/cjs/remotelog/gate.d.ts +2 -11
  97. package/dist/cjs/remotelog/gate.js +9 -35
  98. package/dist/cjs/remotelog/index.d.ts +4 -21
  99. package/dist/cjs/remotelog/logger.d.ts +11 -17
  100. package/dist/cjs/remotelog/logger.js +30 -58
  101. package/dist/cjs/remotelog/send.js +10 -10
  102. package/dist/cjs/remotelogger/index.d.ts +12 -0
  103. package/dist/cjs/remotelogger/index.js +18 -0
  104. package/dist/cjs/scheduler.js +2 -2
  105. package/dist/cjs/types.d.ts +155 -82
  106. package/dist/cjs/user/index.js +11 -6
  107. package/dist/esm/auto-init.d.ts +3 -3
  108. package/dist/esm/auto-init.js +1 -1
  109. package/dist/esm/core/attempts.js +1 -1
  110. package/dist/esm/core/batch.js +2 -1
  111. package/dist/esm/core/callsite.d.ts +6 -0
  112. package/dist/esm/core/callsite.js +25 -4
  113. package/dist/esm/core/consent.d.ts +5 -1
  114. package/dist/esm/core/consent.js +9 -7
  115. package/dist/esm/core/constants.d.ts +35 -10
  116. package/dist/esm/core/constants.js +30 -15
  117. package/dist/esm/core/db.d.ts +12 -4
  118. package/dist/esm/core/db.js +164 -35
  119. package/dist/esm/core/debug.js +1 -1
  120. package/dist/esm/core/env.js +1 -1
  121. package/dist/esm/core/framework-id.d.ts +1 -1
  122. package/dist/esm/core/framework-id.js +3 -3
  123. package/dist/esm/core/guard.d.ts +9 -0
  124. package/dist/esm/core/guard.js +27 -14
  125. package/dist/esm/core/hooks.d.ts +2 -4
  126. package/dist/esm/core/hooks.js +2 -3
  127. package/dist/esm/core/locks.d.ts +9 -0
  128. package/dist/esm/core/locks.js +20 -0
  129. package/dist/esm/core/logger.d.ts +3 -4
  130. package/dist/esm/core/logger.js +4 -40
  131. package/dist/esm/core/state.d.ts +3 -2
  132. package/dist/esm/core/state.js +2 -2
  133. package/dist/esm/core/storage.d.ts +20 -5
  134. package/dist/esm/core/storage.js +113 -18
  135. package/dist/esm/core/stylesheet.d.ts +8 -0
  136. package/dist/esm/core/stylesheet.js +27 -0
  137. package/dist/esm/core/transport.d.ts +2 -0
  138. package/dist/esm/core/transport.js +19 -5
  139. package/dist/esm/core/utils.js +1 -1
  140. package/dist/esm/core/validate.js +2 -2
  141. package/dist/esm/device/appversion.d.ts +1 -6
  142. package/dist/esm/device/appversion.js +13 -2
  143. package/dist/esm/device/index.d.ts +11 -0
  144. package/dist/esm/device/index.js +123 -24
  145. package/dist/esm/engagement/api-rules.d.ts +32 -67
  146. package/dist/esm/engagement/api-rules.js +143 -155
  147. package/dist/esm/engagement/auto-api.js +3 -3
  148. package/dist/esm/engagement/auto-screen.d.ts +2 -0
  149. package/dist/esm/engagement/auto-screen.js +67 -4
  150. package/dist/esm/engagement/defined-events.js +1 -1
  151. package/dist/esm/engagement/send.js +6 -1
  152. package/dist/esm/engagement/session.d.ts +12 -3
  153. package/dist/esm/engagement/session.js +162 -29
  154. package/dist/esm/engagement/track.js +52 -27
  155. package/dist/esm/errors/send.js +1 -1
  156. package/dist/esm/errors/track.d.ts +1 -1
  157. package/dist/esm/errors/track.js +46 -6
  158. package/dist/esm/feedback/controls.d.ts +6 -0
  159. package/dist/esm/feedback/controls.js +31 -2
  160. package/dist/esm/feedback/index.d.ts +8 -7
  161. package/dist/esm/feedback/index.js +34 -13
  162. package/dist/esm/feedback/logs.d.ts +10 -5
  163. package/dist/esm/feedback/logs.js +54 -15
  164. package/dist/esm/feedback/quartz.d.ts +18 -0
  165. package/dist/esm/feedback/quartz.js +99 -0
  166. package/dist/esm/feedback/send.d.ts +3 -0
  167. package/dist/esm/feedback/send.js +28 -5
  168. package/dist/esm/feedback/styles.d.ts +10 -0
  169. package/dist/esm/feedback/styles.js +4 -0
  170. package/dist/esm/feedback/template.d.ts +1 -1
  171. package/dist/esm/feedback/template.js +12 -12
  172. package/dist/esm/feedback/ui.d.ts +14 -6
  173. package/dist/esm/feedback/ui.js +126 -49
  174. package/dist/esm/heatmap/send.js +1 -1
  175. package/dist/esm/heatmap/track.d.ts +1 -1
  176. package/dist/esm/heatmap/track.js +87 -16
  177. package/dist/esm/index.d.ts +17 -63
  178. package/dist/esm/index.js +108 -80
  179. package/dist/esm/lifecycle.d.ts +8 -1
  180. package/dist/esm/lifecycle.js +266 -71
  181. package/dist/esm/remoteconfig/country.d.ts +4 -0
  182. package/dist/esm/remoteconfig/country.js +70 -0
  183. package/dist/esm/remoteconfig/custom.d.ts +7 -7
  184. package/dist/esm/remoteconfig/custom.js +32 -52
  185. package/dist/esm/remoteconfig/evaluate.d.ts +3 -3
  186. package/dist/esm/remoteconfig/evaluate.js +57 -44
  187. package/dist/esm/remoteconfig/fetch.d.ts +3 -3
  188. package/dist/esm/remoteconfig/fetch.js +9 -23
  189. package/dist/esm/remoteconfig/index.d.ts +10 -8
  190. package/dist/esm/remoteconfig/index.js +66 -40
  191. package/dist/esm/remoteconfig/store.js +1 -1
  192. package/dist/esm/remoteconfig/tz-countries.d.ts +8 -0
  193. package/dist/esm/remoteconfig/tz-countries.js +11 -0
  194. package/dist/esm/remotelog/gate.d.ts +2 -11
  195. package/dist/esm/remotelog/gate.js +10 -32
  196. package/dist/esm/remotelog/index.d.ts +4 -21
  197. package/dist/esm/remotelog/logger.d.ts +11 -17
  198. package/dist/esm/remotelog/logger.js +32 -60
  199. package/dist/esm/remotelog/send.js +12 -12
  200. package/dist/esm/remotelogger/index.d.ts +12 -0
  201. package/dist/esm/remotelogger/index.js +13 -0
  202. package/dist/esm/scheduler.js +2 -2
  203. package/dist/esm/types.d.ts +155 -82
  204. package/dist/esm/user/index.js +12 -6
  205. package/dist/feedback.esm.min.js +2 -2
  206. package/dist/feedback.esm.min.js.map +1 -1
  207. package/package.json +14 -16
  208. package/dist/chunks/batch-BU_mTpm1.min.js +0 -3
  209. package/dist/chunks/batch-BU_mTpm1.min.js.map +0 -1
  210. package/dist/chunks/logs-Bea5zUW_.min.js +0 -3
  211. package/dist/chunks/logs-Bea5zUW_.min.js.map +0 -1
  212. package/dist/cjs/heatmap/index.d.ts +0 -16
  213. package/dist/cjs/heatmap/index.js +0 -22
  214. package/dist/cjs/remotelog/index.js +0 -55
  215. package/dist/esm/heatmap/index.d.ts +0 -16
  216. package/dist/esm/heatmap/index.js +0 -17
  217. package/dist/esm/remotelog/index.js +0 -51
  218. package/dist/heatmap.esm.min.js +0 -3
  219. package/dist/heatmap.esm.min.js.map +0 -1
  220. package/dist/style.css +0 -1
@@ -1,4 +1,4 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  /**
@@ -10,6 +10,22 @@
10
10
  * wrapped so a stack we cannot parse costs a line its call site and nothing more.
11
11
  */
12
12
  const NO_CALL_SITE = { filename: '', linenumber: 0, fn: '' };
13
+ /**
14
+ * A call typed in the browser's developer console: there is no file, line or function to report,
15
+ * only the console's own placeholder for its input, so the line says plainly that it came from
16
+ * nowhere in the app. file_name and the function field both accept `-`.
17
+ */
18
+ const CONSOLE_CALL_SITE = { filename: '-', linenumber: 0, fn: '-' };
19
+ /**
20
+ * The frame of code run from the developer console, in each browser:
21
+ * V8 (Chrome, Edge): ` at <anonymous>:1:15` (the file is <anonymous>)
22
+ * Firefox: `@debugger eval code:1:15`
23
+ * Safari: `global code` or `eval code`, with no location at all
24
+ * V8 names a string run through eval or new Function <anonymous> too; it is no file either.
25
+ */
26
+ const CONSOLE_FILE_V8 = '<anonymous>'; // no i18n
27
+ const CONSOLE_FIREFOX = /debugger eval code/; // no i18n
28
+ const CONSOLE_SAFARI = /^(global|eval) code(@|$)/; // no i18n
13
29
  /** logSDK declares max-len="100" on filename. */
14
30
  const FILENAME_MAX = 100;
15
31
  /**
@@ -63,14 +79,19 @@ function callSiteFromStack(stack, skip) {
63
79
  var lines = stack.split('\n');
64
80
  var seen = 0;
65
81
  for (var i = 0; i < lines.length; i++) {
66
- var frame = parseFrame(lines[i] || '');
82
+ var raw = (lines[i] || '').trim(); // no i18n
83
+ var frame = parseFrame(raw);
67
84
  if (frame === null) {
85
+ // Safari's console frame has no location, so it is never a frame parseFrame reads
86
+ if (seen === skip && CONSOLE_SAFARI.test(raw)) {
87
+ return CONSOLE_CALL_SITE;
88
+ }
68
89
  continue;
69
90
  }
70
91
  if (seen++ < skip) {
71
92
  continue;
72
93
  }
73
- return frame;
94
+ return frame.filename === CONSOLE_FILE_V8 || CONSOLE_FIREFOX.test(raw) ? CONSOLE_CALL_SITE : frame;
74
95
  }
75
96
  return NO_CALL_SITE;
76
97
  }
@@ -88,6 +109,7 @@ function callSite(skip) {
88
109
  }
89
110
  }
90
111
 
112
+ exports.CONSOLE_CALL_SITE = CONSOLE_CALL_SITE;
91
113
  exports.NO_CALL_SITE = NO_CALL_SITE;
92
114
  exports.callSite = callSite;
93
115
  exports.callSiteFromStack = callSiteFromStack;
@@ -1,5 +1,9 @@
1
1
  import type { TrackingStatus } from '../types.js';
2
- /** DNT counts only when not ignored; when it counts, tracking switches to NO_TRACKING. */
2
+ /**
3
+ * DNT counts only when not ignored; while it counts, tracking is NO_TRACKING (opt_in_status).
4
+ * Decided on every visit and never stored: storing it made one visit with DNT on look like the
5
+ * visitor's own choice, so tracking stayed off after DNT was turned off or ignore_do_not_track set.
6
+ */
3
7
  export declare function hasDoNotTrackEnabled(): boolean;
4
8
  export declare function opt_in_status(): TrackingStatus;
5
9
  export declare function shouldTrackOrSendData(): boolean;
@@ -1,4 +1,4 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  var constants = require('./constants.js');
@@ -9,15 +9,17 @@ var storage = require('./storage.js');
9
9
  var env = require('./env.js');
10
10
  var hooks = require('./hooks.js');
11
11
 
12
- /** DNT counts only when not ignored; when it counts, tracking switches to NO_TRACKING. */
12
+ /**
13
+ * DNT counts only when not ignored; while it counts, tracking is NO_TRACKING (opt_in_status).
14
+ * Decided on every visit and never stored: storing it made one visit with DNT on look like the
15
+ * visitor's own choice, so tracking stayed off after DNT was turned off or ignore_do_not_track set.
16
+ */
13
17
  function hasDoNotTrackEnabled() {
14
18
  if (state._ZAP._ignoreDnt) {
15
19
  return false;
16
20
  }
17
21
  if (env.isDntOn()) {
18
- logger.Console.warn('hasDoNotTrackEnabled: DoNotTrack is enabled'); // no i18n
19
- setTrackingStatus(constants.AP_TRACKING_STATUS.NO_TRACKING);
20
- logger.Console.log('hasDoNotTrackEnabled: Setting tracking status to NO_TRACKING'); // no i18n
22
+ logger.Console.warn('hasDoNotTrackEnabled: DoNotTrack is enabled, so nothing is tracked'); // no i18n
21
23
  return true;
22
24
  }
23
25
  return false;
@@ -43,7 +45,7 @@ function shouldTrackOrSendData() {
43
45
  */
44
46
  function canTrack(caller) {
45
47
  if (!state._ZAP._token) {
46
- logger.Console.warn('apptics.' + caller + ': You must call apptics.init() first'); // no i18n
48
+ logger.Console.warn('apptics.' + caller + ': You must call Apptics.init() first'); // no i18n
47
49
  return false;
48
50
  }
49
51
  if (env.is_apptics_disabled()) {
@@ -1,3 +1,19 @@
1
+ /**
2
+ * A screen_routes entry as init() keeps it, ready to match: a route pattern, or an exact path or a
3
+ * regular expression with the name it records.
4
+ */
5
+ export type ScreenRouteRule = {
6
+ kind: 'pattern';
7
+ pattern: string;
8
+ } | {
9
+ kind: 'equals';
10
+ path: string;
11
+ name: string;
12
+ } | {
13
+ kind: 'regex';
14
+ regex: RegExp;
15
+ name: string;
16
+ };
1
17
  export declare const AP_TRACKING_STATUS: Readonly<{
2
18
  readonly USAGE_TRACKING_WITH_PII: 1;
3
19
  readonly USAGE_TRACKING_WITHOUT_PII: 4;
@@ -117,7 +133,6 @@ export declare const AP_CONFIG: Readonly<{
117
133
  debug: boolean;
118
134
  track_by_default: true;
119
135
  ignore_do_not_track: boolean;
120
- remote_log: boolean;
121
136
  /**
122
137
  * Wrap XHR and fetch to record the app's API calls without it calling startTrackApi(). Off by
123
138
  * default: the hostnames and paths of every request an app makes is a wider grant than events
@@ -130,15 +145,16 @@ export declare const AP_CONFIG: Readonly<{
130
145
  */
131
146
  track_screen: boolean;
132
147
  /**
133
- * Print each app logger line to the browser console as well, as Android's showLogs prints to
134
- * Logcat. Off by default; console_log is the SDK's own activity, this is the app's lines.
148
+ * How automatic screen tracking names a path, as init() keeps the config's screen_routes: route
149
+ * patterns (`/users/{id}/orders`, each id recorded as a star), exact paths and regular
150
+ * expressions with a name. Tried in order; a path none matches keeps its own name.
135
151
  */
136
- show_logs: boolean;
152
+ screen_routes: ScreenRouteRule[];
137
153
  /**
138
- * Record sessions automatically. On by default; false is Android's
139
- * automaticSessionsTrackingStatus = false: no sessions, while events and screens still are.
154
+ * The feedback form's theme: 'light', 'dark', or 'auto' to follow the visitor's system setting.
155
+ * 'auto' by default.
140
156
  */
141
- track_session: boolean;
157
+ feedback_theme: "light" | "dark" | "auto";
142
158
  /**
143
159
  * How long a visit must last before its session is stored, in milliseconds. A shorter visit with
144
160
  * nothing tracked in it is dropped: a bounce or a crawler is not a session. Anything tracked
@@ -187,7 +203,13 @@ export type ApConfig = {
187
203
  * What init() must be given. Everything else the SDK needs — aaid, the portal and project ids that
188
204
  * go in every url — comes back from app/addversion, which these four are enough to call.
189
205
  */
190
- export declare const REQUIRED_CONFIG: readonly ["serviceUrl", "zak", "identifier", "appversion"];
206
+ export declare const REQUIRED_CONFIG: readonly ["base_url", "auth_key", "app_domain", "appversion"];
207
+ /**
208
+ * The init() keys and the names the SDK keeps them under inside (and in app_version_info, which
209
+ * already-visited browsers have stored): base_url is the host, auth_key the `zak` header, and
210
+ * app_domain the app's identifier.
211
+ */
212
+ export declare const CONFIG_KEYS: Readonly<Record<string, string>>;
191
213
  /**
192
214
  * Paths with a `debug/` twin. The debug endpoints take the same body and answer with a request id
193
215
  * and a link to the server-side logs for that request, which is how a payload is traced end to
@@ -207,6 +229,9 @@ export declare const RETRY_CAPABLE_PATHS: Readonly<Record<string, boolean>>;
207
229
  * called before those ids are known, so it cannot carry them.
208
230
  */
209
231
  export declare const PATHS_WITHOUT_ORG: Readonly<Record<string, boolean>>;
210
- /** Console-snippet names accepted for the canonical keys above. */
211
- export declare const CONFIG_ALIASES: Readonly<Record<string, string>>;
232
+ /**
233
+ * Earlier names of the init() keys: 2.0.0-beta's serviceUrl, zak and identifier, and the 1.x
234
+ * console snippet's base_domain and token. Still read, with a warning naming the key to use.
235
+ */
236
+ export declare const RETIRED_CONFIG_NAMES: Readonly<Record<string, string>>;
212
237
  export declare const BLOCKED_WS: readonly string[];
@@ -1,4 +1,4 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  const AP_TRACKING_STATUS = Object.freeze({
@@ -140,8 +140,6 @@ const AP_CONFIG = Object.freeze({
140
140
  debug: false,
141
141
  track_by_default: true,
142
142
  ignore_do_not_track: false,
143
- // the SDK's own failure reports to the Remote Logger page: off unless the app passes remote_log: true
144
- remote_log: false,
145
143
  /**
146
144
  * Wrap XHR and fetch to record the app's API calls without it calling startTrackApi(). Off by
147
145
  * default: the hostnames and paths of every request an app makes is a wider grant than events
@@ -154,15 +152,16 @@ const AP_CONFIG = Object.freeze({
154
152
  */
155
153
  track_screen: true,
156
154
  /**
157
- * Print each app logger line to the browser console as well, as Android's showLogs prints to
158
- * Logcat. Off by default; console_log is the SDK's own activity, this is the app's lines.
155
+ * How automatic screen tracking names a path, as init() keeps the config's screen_routes: route
156
+ * patterns (`/users/{id}/orders`, each id recorded as a star), exact paths and regular
157
+ * expressions with a name. Tried in order; a path none matches keeps its own name.
159
158
  */
160
- show_logs: false,
159
+ screen_routes: [],
161
160
  /**
162
- * Record sessions automatically. On by default; false is Android's
163
- * automaticSessionsTrackingStatus = false: no sessions, while events and screens still are.
161
+ * The feedback form's theme: 'light', 'dark', or 'auto' to follow the visitor's system setting.
162
+ * 'auto' by default.
164
163
  */
165
- track_session: true,
164
+ feedback_theme: 'auto',
166
165
  /**
167
166
  * How long a visit must last before its session is stored, in milliseconds. A shorter visit with
168
167
  * nothing tracked in it is dropped: a bounce or a crawler is not a session. Anything tracked
@@ -208,7 +207,17 @@ const AP_CONFIG = Object.freeze({
208
207
  * What init() must be given. Everything else the SDK needs — aaid, the portal and project ids that
209
208
  * go in every url — comes back from app/addversion, which these four are enough to call.
210
209
  */
211
- const REQUIRED_CONFIG = Object.freeze(['serviceUrl', 'zak', 'identifier', 'appversion']); // no i18n
210
+ const REQUIRED_CONFIG = Object.freeze(['base_url', 'auth_key', 'app_domain', 'appversion']); // no i18n
211
+ /**
212
+ * The init() keys and the names the SDK keeps them under inside (and in app_version_info, which
213
+ * already-visited browsers have stored): base_url is the host, auth_key the `zak` header, and
214
+ * app_domain the app's identifier.
215
+ */
216
+ const CONFIG_KEYS = Object.freeze({
217
+ base_url: 'serviceUrl', // no i18n
218
+ auth_key: 'zak', // no i18n
219
+ app_domain: 'identifier', // no i18n
220
+ });
212
221
  /**
213
222
  * Paths with a `debug/` twin. The debug endpoints take the same body and answer with a request id
214
223
  * and a link to the server-side logs for that request, which is how a payload is traced end to
@@ -243,10 +252,16 @@ const RETRY_CAPABLE_PATHS = Object.freeze({
243
252
  const PATHS_WITHOUT_ORG = Object.freeze({
244
253
  addversion: true, // no i18n
245
254
  });
246
- /** Console-snippet names accepted for the canonical keys above. */
247
- const CONFIG_ALIASES = Object.freeze({
248
- serviceUrl: 'base_domain', // no i18n
249
- zak: 'token', // no i18n
255
+ /**
256
+ * Earlier names of the init() keys: 2.0.0-beta's serviceUrl, zak and identifier, and the 1.x
257
+ * console snippet's base_domain and token. Still read, with a warning naming the key to use.
258
+ */
259
+ const RETIRED_CONFIG_NAMES = Object.freeze({
260
+ serviceUrl: 'base_url', // no i18n
261
+ base_domain: 'base_url', // no i18n
262
+ zak: 'auth_key', // no i18n
263
+ token: 'auth_key', // no i18n
264
+ identifier: 'app_domain', // no i18n
250
265
  });
251
266
  // crawlers reference
252
267
  // https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers
@@ -283,7 +298,7 @@ exports.AP_FEEDBACK_TYPE = AP_FEEDBACK_TYPE;
283
298
  exports.AP_LOG_MODULE = AP_LOG_MODULE;
284
299
  exports.AP_TRACKING_STATUS = AP_TRACKING_STATUS;
285
300
  exports.BLOCKED_WS = BLOCKED_WS;
286
- exports.CONFIG_ALIASES = CONFIG_ALIASES;
301
+ exports.CONFIG_KEYS = CONFIG_KEYS;
287
302
  exports.CONSOLE_LOG_MAX_BODY = CONSOLE_LOG_MAX_BODY;
288
303
  exports.DEBUG_CAPABLE_PATHS = DEBUG_CAPABLE_PATHS;
289
304
  exports.DEBUG_IDLE_MS = DEBUG_IDLE_MS;
@@ -295,5 +310,6 @@ exports.LOG_FUNCTION_MAX = LOG_FUNCTION_MAX;
295
310
  exports.PATHS_WITHOUT_ORG = PATHS_WITHOUT_ORG;
296
311
  exports.REMOTE_LOG_LEVEL = REMOTE_LOG_LEVEL;
297
312
  exports.REQUIRED_CONFIG = REQUIRED_CONFIG;
313
+ exports.RETIRED_CONFIG_NAMES = RETIRED_CONFIG_NAMES;
298
314
  exports.RETRY_CAPABLE_PATHS = RETRY_CAPABLE_PATHS;
299
315
  exports.SDK_MODULE = SDK_MODULE;
@@ -1,10 +1,12 @@
1
1
  import type { Dict, QueueItem } from '../types.js';
2
- export type QueueName = 'engagements' | 'errors' | 'logs' | 'consolelogs' | 'heatmaps';
2
+ export type QueueName = 'engagements' | 'errors' | 'feedbacklogs' | 'remotelogs' | 'heatmaps';
3
3
  /** One storage implementation. storage.ts talks only to this interface. */
4
4
  export interface Backend {
5
5
  readonly kind: 'indexeddb' | 'localstorage';
6
6
  loadSettings(): Promise<Dict>;
7
7
  putSetting(key: string, value: unknown): Promise<void>;
8
+ /** Removes the key itself, so it is no longer in storage at all. */
9
+ deleteSetting(key: string): Promise<void>;
8
10
  clearSettings(): Promise<void>;
9
11
  /** Items in insertion order. */
10
12
  queueAll(store: QueueName): Promise<QueueItem[]>;
@@ -16,16 +18,22 @@ export interface Backend {
16
18
  importAll?(settings: Dict, queues: Record<QueueName, QueueItem[]>): Promise<void>;
17
19
  }
18
20
  export declare const DB_NAME = "apptics";
19
- export declare const DB_VERSION = 3;
20
- /** 1.x localStorage keys; also the layout of the localStorage backend. */
21
+ export declare const DB_VERSION = 4;
22
+ /** The types a feedback entry is stored under: an addFeedbackLog() line, an addDiagnosticsInfo() entry. */
23
+ export declare const FEEDBACK_LOG = "feedbacklog";
24
+ export declare const FEEDBACK_DIAGNOSTICS = "feedbackdiagnostics";
25
+ /** A feedback entry from 1.x or 2.0.0-beta, with the type it is stored under now. */
26
+ export declare function renameFeedbackType(item: QueueItem): QueueItem;
27
+ /** 1.x localStorage keys, read once to bring 1.x data into IndexedDB (see migrateLegacy). */
21
28
  export declare const LEGACY_KEYS: Readonly<{
22
29
  readonly settings: "apptics-device-info";
23
30
  readonly engagements: "apptics-engagements-transactions";
24
31
  readonly errors: "apptics-errors-transactions";
25
32
  readonly logs: "apptics-log-transactions";
26
33
  readonly consolelogs: "apptics-consolelog-transactions";
27
- readonly heatmaps: "apptics-heatmap-transactions";
28
34
  }>;
35
+ /** The localStorage backend's layout, for a browser where IndexedDB will not open. */
36
+ export declare const LOCAL_KEYS: Readonly<Record<'settings' | QueueName, string>>;
29
37
  /** Shape guards shared by both backends and the 1.x migration. */
30
38
  export declare function asList(value: unknown): QueueItem[];
31
39
  export declare function asDict(value: unknown): Dict;
@@ -1,26 +1,73 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  var logger = require('./logger.js');
5
5
  var utils = require('./utils.js');
6
6
 
7
7
  const DB_NAME = 'apptics'; // no i18n
8
- // 3 added the heatmaps store. The upgrade only creates stores that are missing, so an existing
9
- // database keeps everything already queued in it.
10
- const DB_VERSION = 3;
8
+ // 3 added the heatmaps store. 4 renamed: each record's order key `seq` to `queue`, the logs store
9
+ // to feedbacklogs and consolelogs to remotelogs. Every upgrade keeps what is already queued.
10
+ const DB_VERSION = 4;
11
11
  const OPEN_TIMEOUT_MS = 3000;
12
- const QUEUES = ['engagements', 'errors', 'logs', 'consolelogs', 'heatmaps']; // no i18n
13
- /** 1.x localStorage keys; also the layout of the localStorage backend. */
12
+ const QUEUES = ['engagements', 'errors', 'feedbacklogs', 'remotelogs', 'heatmaps']; // no i18n
13
+ /** The field, and the index on it, that keeps a queue's records in the order they were added. */
14
+ const QUEUE_KEY = 'queue'; // no i18n
15
+ /** Version 3's names, which the version 4 upgrade moves to the ones above. */
16
+ const OLD_QUEUE_KEY = 'seq'; // no i18n
17
+ const RENAMED_STORES = [['logs', 'feedbacklogs'], ['consolelogs', 'remotelogs']]; // no i18n
18
+ /** The types a feedback entry is stored under: an addFeedbackLog() line, an addDiagnosticsInfo() entry. */
19
+ const FEEDBACK_LOG = 'feedbacklog'; // no i18n
20
+ const FEEDBACK_DIAGNOSTICS = 'feedbackdiagnostics'; // no i18n
21
+ const OLD_FEEDBACK_TYPES = Object.freeze({
22
+ log: FEEDBACK_LOG, // no i18n
23
+ diagnostics: FEEDBACK_DIAGNOSTICS, // no i18n
24
+ });
25
+ /** A feedback entry from 1.x or 2.0.0-beta, with the type it is stored under now. */
26
+ function renameFeedbackType(item) {
27
+ var renamed = item && typeof item.type === 'string' ? OLD_FEEDBACK_TYPES[item.type] : undefined; // no i18n
28
+ return renamed ? { ...item, type: renamed } : item;
29
+ }
30
+ /** 1.x localStorage keys, read once to bring 1.x data into IndexedDB (see migrateLegacy). */
14
31
  const LEGACY_KEYS = Object.freeze({
15
32
  settings: 'apptics-device-info', // no i18n
16
33
  engagements: 'apptics-engagements-transactions', // no i18n
17
34
  errors: 'apptics-errors-transactions', // no i18n
18
35
  logs: 'apptics-log-transactions', // no i18n
19
36
  consolelogs: 'apptics-consolelog-transactions', // no i18n
20
- // not a 1.x key: heatmaps did not exist then. It is here because this map is also the
21
- // localStorage backend's layout, so the store needs a name there too
37
+ });
38
+ /** The localStorage backend's layout, for a browser where IndexedDB will not open. */
39
+ const LOCAL_KEYS = Object.freeze({
40
+ settings: LEGACY_KEYS.settings,
41
+ engagements: LEGACY_KEYS.engagements,
42
+ errors: LEGACY_KEYS.errors,
43
+ feedbacklogs: 'apptics-feedbacklog-transactions', // no i18n
44
+ remotelogs: 'apptics-remotelog-transactions', // no i18n
22
45
  heatmaps: 'apptics-heatmap-transactions', // no i18n
23
46
  });
47
+ /**
48
+ * The localStorage backend once kept these two under the 1.x keys. Moved to the new ones on first
49
+ * use, feedback types renamed on the way, unless something is already there.
50
+ */
51
+ function moveRenamedLocalKeys() {
52
+ [[LEGACY_KEYS.logs, LOCAL_KEYS.feedbacklogs], [LEGACY_KEYS.consolelogs, LOCAL_KEYS.remotelogs]].forEach(function (pair) {
53
+ try {
54
+ var from = pair[0];
55
+ var to = pair[1];
56
+ var old = localStorage.getItem(from);
57
+ if (old === null) {
58
+ return;
59
+ }
60
+ if (localStorage.getItem(to) === null) {
61
+ var items = asList(JSON.parse(old));
62
+ localStorage.setItem(to, JSON.stringify(to === LOCAL_KEYS.feedbacklogs ? items.map(renameFeedbackType) : items));
63
+ }
64
+ localStorage.removeItem(from);
65
+ }
66
+ catch (err) {
67
+ // left where it is; the next load tries again
68
+ }
69
+ });
70
+ }
24
71
  /** Shape guards shared by both backends and the 1.x migration. */
25
72
  function asList(value) {
26
73
  return Array.isArray(value) ? value : [];
@@ -48,26 +95,33 @@ function writeJSON(key, value) {
48
95
  }
49
96
  }
50
97
  function createLocalStorageBackend() {
98
+ moveRenamedLocalKeys();
51
99
  return {
52
100
  kind: 'localstorage', // no i18n
53
101
  loadSettings() {
54
- return Promise.resolve(asDict(readJSON(LEGACY_KEYS.settings)));
102
+ return Promise.resolve(asDict(readJSON(LOCAL_KEYS.settings)));
55
103
  },
56
104
  putSetting(key, value) {
57
- const all = asDict(readJSON(LEGACY_KEYS.settings));
105
+ const all = asDict(readJSON(LOCAL_KEYS.settings));
58
106
  all[key] = value;
59
- writeJSON(LEGACY_KEYS.settings, all);
107
+ writeJSON(LOCAL_KEYS.settings, all);
108
+ return Promise.resolve();
109
+ },
110
+ deleteSetting(key) {
111
+ const all = asDict(readJSON(LOCAL_KEYS.settings));
112
+ delete all[key];
113
+ writeJSON(LOCAL_KEYS.settings, all);
60
114
  return Promise.resolve();
61
115
  },
62
116
  clearSettings() {
63
- writeJSON(LEGACY_KEYS.settings, {});
117
+ writeJSON(LOCAL_KEYS.settings, {});
64
118
  return Promise.resolve();
65
119
  },
66
120
  queueAll(store) {
67
- return Promise.resolve(asList(readJSON(LEGACY_KEYS[store])));
121
+ return Promise.resolve(asList(readJSON(LOCAL_KEYS[store])));
68
122
  },
69
123
  queuePut(store, items) {
70
- const list = asList(readJSON(LEGACY_KEYS[store]));
124
+ const list = asList(readJSON(LOCAL_KEYS[store]));
71
125
  items.forEach(function (item) {
72
126
  const index = list.findIndex(function (existing) { return existing.id === item.id; });
73
127
  if (index === -1) {
@@ -77,32 +131,32 @@ function createLocalStorageBackend() {
77
131
  list[index] = item;
78
132
  }
79
133
  });
80
- writeJSON(LEGACY_KEYS[store], list);
134
+ writeJSON(LOCAL_KEYS[store], list);
81
135
  return Promise.resolve();
82
136
  },
83
137
  queueDelete(store, ids) {
84
- const remaining = asList(readJSON(LEGACY_KEYS[store])).filter(function (item) {
138
+ const remaining = asList(readJSON(LOCAL_KEYS[store])).filter(function (item) {
85
139
  return ids.indexOf(item.id) === -1;
86
140
  });
87
- writeJSON(LEGACY_KEYS[store], remaining);
141
+ writeJSON(LOCAL_KEYS[store], remaining);
88
142
  return Promise.resolve();
89
143
  },
90
144
  queueClear(store) {
91
- writeJSON(LEGACY_KEYS[store], []);
145
+ writeJSON(LOCAL_KEYS[store], []);
92
146
  return Promise.resolve();
93
147
  },
94
148
  };
95
149
  }
96
- let lastSeq = 0;
150
+ let lastQueue = 0;
97
151
  /**
98
152
  * Strictly increasing, and time-based so tabs interleave in roughly the right order.
99
153
  * Counting up from the last value rather than a counter that wraps keeps insertion order
100
154
  * even when a chatty caller adds more than a thousand items inside one millisecond.
101
155
  */
102
- function nextSeq() {
156
+ function nextQueue() {
103
157
  const base = utils.nowMs() * 1000;
104
- lastSeq = base > lastSeq ? base : lastSeq + 1;
105
- return lastSeq;
158
+ lastQueue = base > lastQueue ? base : lastQueue + 1;
159
+ return lastQueue;
106
160
  }
107
161
  function request(req) {
108
162
  return new Promise(function (resolve, reject) {
@@ -117,7 +171,21 @@ function completed(tx) {
117
171
  tx.onabort = function () { reject(tx.error); };
118
172
  });
119
173
  }
120
- /** Puts `item` unless it exists (keepExisting) or replaces it keeping its seq. Runs inside `store`'s transaction. */
174
+ /**
175
+ * The record's `type` for an item with none of its own: heatmap records carry no type, since
176
+ * their payload is the item itself and the server takes no extra field. Never undefined.
177
+ */
178
+ const STORE_TYPES = Object.freeze({
179
+ engagements: 'engagement', // no i18n
180
+ errors: 'error', // no i18n
181
+ feedbacklogs: FEEDBACK_LOG,
182
+ remotelogs: 'remotelog', // no i18n
183
+ heatmaps: 'heatmap', // no i18n
184
+ });
185
+ function recordType(storeName, item) {
186
+ return item && typeof item.type === 'string' && item.type !== '' ? item.type : (STORE_TYPES[storeName] || storeName); // no i18n
187
+ }
188
+ /** Puts `item` unless it exists (keepExisting) or replaces it keeping its place. Runs inside `store`'s transaction. */
121
189
  function putRecord(store, item, keepExisting) {
122
190
  const id = String(item.id);
123
191
  const lookup = store.get(id);
@@ -126,7 +194,7 @@ function putRecord(store, item, keepExisting) {
126
194
  if (existing && keepExisting) {
127
195
  return;
128
196
  }
129
- store.put({ id: id, seq: existing ? existing.seq : nextSeq(), type: item.type, item: item });
197
+ store.put({ id: id, queue: existing ? existing.queue : nextQueue(), type: recordType(store.name, item), item: item });
130
198
  };
131
199
  }
132
200
  /** Our stores, as created by onupgradeneeded. */
@@ -187,15 +255,7 @@ function openOnce(factory, timeoutMs) {
187
255
  return;
188
256
  }
189
257
  req.onupgradeneeded = function () {
190
- const db = req.result;
191
- if (!db.objectStoreNames.contains('settings')) { // no i18n
192
- db.createObjectStore('settings'); // no i18n
193
- }
194
- QUEUES.forEach(function (name) {
195
- if (!db.objectStoreNames.contains(name)) {
196
- db.createObjectStore(name, { keyPath: 'id' }).createIndex('seq', 'seq'); // no i18n
197
- }
198
- });
258
+ upgrade(req.result, req.transaction);
199
259
  };
200
260
  req.onsuccess = function () {
201
261
  if (settled) {
@@ -226,6 +286,70 @@ function openOnce(factory, timeoutMs) {
226
286
  };
227
287
  });
228
288
  }
289
+ /**
290
+ * Creates what is missing and moves version 3's data to version 4's names, inside the upgrade's
291
+ * own transaction: either the whole upgrade lands, or the database stays at the old version with
292
+ * everything still in it.
293
+ */
294
+ function upgrade(db, tx) {
295
+ if (!db.objectStoreNames.contains('settings')) { // no i18n
296
+ db.createObjectStore('settings'); // no i18n
297
+ }
298
+ QUEUES.forEach(function (name) {
299
+ if (!db.objectStoreNames.contains(name)) {
300
+ db.createObjectStore(name, { keyPath: 'id' }).createIndex(QUEUE_KEY, QUEUE_KEY); // no i18n
301
+ }
302
+ });
303
+ // kept stores: the order key is renamed on every record, and the index with it
304
+ QUEUES.forEach(function (name) {
305
+ const store = tx.objectStore(name);
306
+ if (!store.indexNames.contains(OLD_QUEUE_KEY)) {
307
+ return;
308
+ }
309
+ store.deleteIndex(OLD_QUEUE_KEY);
310
+ if (!store.indexNames.contains(QUEUE_KEY)) {
311
+ store.createIndex(QUEUE_KEY, QUEUE_KEY);
312
+ }
313
+ eachRecord(store, function (record, cursor) {
314
+ cursor.update(renamedRecord(record, false, name));
315
+ });
316
+ });
317
+ // renamed stores: every record moves to its new store, then the old store goes
318
+ RENAMED_STORES.forEach(function (pair) {
319
+ const from = pair[0];
320
+ const to = pair[1];
321
+ if (!db.objectStoreNames.contains(from)) {
322
+ return;
323
+ }
324
+ const source = tx.objectStore(from);
325
+ const target = tx.objectStore(to);
326
+ eachRecord(source, function (record) {
327
+ target.put(renamedRecord(record, to === 'feedbacklogs', to)); // no i18n
328
+ }, function () {
329
+ db.deleteObjectStore(from);
330
+ });
331
+ });
332
+ }
333
+ /** Calls `each` for every record of `store`, then `done`, inside the transaction `store` is in. */
334
+ function eachRecord(store, each, done) {
335
+ const req = store.openCursor();
336
+ req.onsuccess = function () {
337
+ const cursor = req.result;
338
+ if (!cursor) {
339
+ if (done)
340
+ done();
341
+ return;
342
+ }
343
+ each(cursor.value, cursor);
344
+ cursor.continue();
345
+ };
346
+ }
347
+ /** A version 3 record under version 4's names: `queue` for `seq`, and the feedback types renamed. */
348
+ function renamedRecord(record, feedback, storeName) {
349
+ const queue = typeof record[QUEUE_KEY] === 'number' ? record[QUEUE_KEY] : (typeof record[OLD_QUEUE_KEY] === 'number' ? record[OLD_QUEUE_KEY] : nextQueue()); // no i18n
350
+ const item = (feedback ? renameFeedbackType(record.item) : record.item);
351
+ return { id: String(record.id), queue: queue, type: recordType(storeName, item), item: item };
352
+ }
229
353
  function createIndexedDBBackend(db) {
230
354
  return {
231
355
  kind: 'indexeddb', // no i18n
@@ -244,13 +368,18 @@ function createIndexedDBBackend(db) {
244
368
  tx.objectStore('settings').put(value, key); // no i18n
245
369
  return completed(tx);
246
370
  },
371
+ deleteSetting(key) {
372
+ const tx = db.transaction('settings', 'readwrite'); // no i18n
373
+ tx.objectStore('settings').delete(key); // no i18n
374
+ return completed(tx);
375
+ },
247
376
  clearSettings() {
248
377
  const tx = db.transaction('settings', 'readwrite'); // no i18n
249
378
  tx.objectStore('settings').clear(); // no i18n
250
379
  return completed(tx);
251
380
  },
252
381
  queueAll(store) {
253
- const index = db.transaction(store, 'readonly').objectStore(store).index('seq'); // no i18n
382
+ const index = db.transaction(store, 'readonly').objectStore(store).index(QUEUE_KEY);
254
383
  return request(index.getAll()).then(function (records) {
255
384
  return records.map(function (record) { return record.item; });
256
385
  });
@@ -325,10 +454,14 @@ function openBackend() {
325
454
 
326
455
  exports.DB_NAME = DB_NAME;
327
456
  exports.DB_VERSION = DB_VERSION;
457
+ exports.FEEDBACK_DIAGNOSTICS = FEEDBACK_DIAGNOSTICS;
458
+ exports.FEEDBACK_LOG = FEEDBACK_LOG;
328
459
  exports.LEGACY_KEYS = LEGACY_KEYS;
460
+ exports.LOCAL_KEYS = LOCAL_KEYS;
329
461
  exports.asDict = asDict;
330
462
  exports.asList = asList;
331
463
  exports.createIndexedDBBackend = createIndexedDBBackend;
332
464
  exports.createLocalStorageBackend = createLocalStorageBackend;
333
465
  exports.openBackend = openBackend;
334
466
  exports.openIndexedDB = openIndexedDB;
467
+ exports.renameFeedbackType = renameFeedbackType;
@@ -1,4 +1,4 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  var constants = require('./constants.js');
@@ -1,4 +1,4 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  var constants = require('./constants.js');
@@ -1 +1 @@
1
- export declare const FRAMEWORK_ID = 5996;
1
+ export declare const FRAMEWORK_ID = 6002;