@zoho_apptics/apptics-js-sdk 2.0.0-beta.1 → 2.0.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 (253) hide show
  1. package/CHANGELOG.md +127 -16
  2. package/README.md +357 -215
  3. package/dist/apptics-pn-sw.js +3 -0
  4. package/dist/apptics-pn-sw.js.map +1 -0
  5. package/dist/apptics.esm.min.js +2 -2
  6. package/dist/apptics.esm.min.js.map +1 -1
  7. package/dist/apptics.min.js +2 -2
  8. package/dist/apptics.min.js.map +1 -1
  9. package/dist/chunks/batch-Axq9sTzR.min.js +3 -0
  10. package/dist/chunks/batch-Axq9sTzR.min.js.map +1 -0
  11. package/dist/chunks/lifecycle-Cvg78jN_.min.js +3 -0
  12. package/dist/chunks/lifecycle-Cvg78jN_.min.js.map +1 -0
  13. package/dist/chunks/send-DBpesydB.min.js +3 -0
  14. package/dist/chunks/send-DBpesydB.min.js.map +1 -0
  15. package/dist/chunks/transport-B21X39p4.min.js +3 -0
  16. package/dist/chunks/transport-B21X39p4.min.js.map +1 -0
  17. package/dist/cjs/core/attempts.js +1 -1
  18. package/dist/cjs/core/batch.js +4 -4
  19. package/dist/cjs/core/consent.d.ts +17 -4
  20. package/dist/cjs/core/consent.js +81 -14
  21. package/dist/cjs/core/console-call.d.ts +23 -0
  22. package/dist/cjs/core/console-call.js +63 -0
  23. package/dist/cjs/core/constants.d.ts +66 -17
  24. package/dist/cjs/core/constants.js +76 -19
  25. package/dist/cjs/core/db.js +31 -7
  26. package/dist/cjs/core/debug.d.ts +6 -4
  27. package/dist/cjs/core/debug.js +36 -12
  28. package/dist/cjs/core/env.d.ts +0 -3
  29. package/dist/cjs/core/env.js +1 -9
  30. package/dist/cjs/core/framework-id.d.ts +1 -1
  31. package/dist/cjs/core/framework-id.js +3 -3
  32. package/dist/cjs/core/guard.js +19 -4
  33. package/dist/cjs/core/hooks.d.ts +29 -0
  34. package/dist/cjs/core/hooks.js +12 -1
  35. package/dist/cjs/core/locks.js +1 -1
  36. package/dist/cjs/core/logger.js +1 -1
  37. package/dist/cjs/core/shield.d.ts +31 -0
  38. package/dist/cjs/core/shield.js +129 -0
  39. package/dist/cjs/core/state.d.ts +11 -5
  40. package/dist/cjs/core/state.js +4 -4
  41. package/dist/cjs/core/storage.d.ts +7 -0
  42. package/dist/cjs/core/storage.js +28 -9
  43. package/dist/cjs/core/stylesheet.js +1 -1
  44. package/dist/cjs/core/transport.d.ts +15 -4
  45. package/dist/cjs/core/transport.js +72 -25
  46. package/dist/cjs/core/utils.js +1 -1
  47. package/dist/cjs/core/validate.js +6 -5
  48. package/dist/cjs/device/appversion.d.ts +10 -1
  49. package/dist/cjs/device/appversion.js +26 -3
  50. package/dist/cjs/device/index.d.ts +17 -2
  51. package/dist/cjs/device/index.js +251 -35
  52. package/dist/cjs/engagement/api-rules.js +1 -1
  53. package/dist/cjs/engagement/auto-api.js +4 -3
  54. package/dist/cjs/engagement/auto-screen.js +10 -6
  55. package/dist/cjs/engagement/defined-events.d.ts +2 -3
  56. package/dist/cjs/engagement/defined-events.js +10 -16
  57. package/dist/cjs/engagement/send.js +7 -3
  58. package/dist/cjs/engagement/session.d.ts +17 -0
  59. package/dist/cjs/engagement/session.js +154 -23
  60. package/dist/cjs/engagement/track.d.ts +4 -4
  61. package/dist/cjs/engagement/track.js +23 -17
  62. package/dist/cjs/errors/send.js +2 -2
  63. package/dist/cjs/errors/track.d.ts +2 -1
  64. package/dist/cjs/errors/track.js +8 -5
  65. package/dist/cjs/feedback/controls.d.ts +36 -4
  66. package/dist/cjs/feedback/controls.js +302 -67
  67. package/dist/cjs/feedback/i18n/index.d.ts +31 -0
  68. package/dist/cjs/feedback/i18n/index.js +187 -0
  69. package/dist/cjs/feedback/i18n/strings.d.ts +9 -0
  70. package/dist/cjs/feedback/i18n/strings.js +8 -0
  71. package/dist/cjs/feedback/index.js +1 -1
  72. package/dist/cjs/feedback/logs.d.ts +3 -6
  73. package/dist/cjs/feedback/logs.js +12 -21
  74. package/dist/cjs/feedback/quartz.js +5 -2
  75. package/dist/cjs/feedback/send.d.ts +6 -3
  76. package/dist/cjs/feedback/send.js +59 -41
  77. package/dist/cjs/feedback/styles.js +2 -2
  78. package/dist/cjs/feedback/template.d.ts +4 -2
  79. package/dist/cjs/feedback/template.js +73 -44
  80. package/dist/cjs/feedback/ui.d.ts +47 -4
  81. package/dist/cjs/feedback/ui.js +351 -97
  82. package/dist/cjs/heatmap/send.d.ts +2 -0
  83. package/dist/cjs/heatmap/send.js +3 -5
  84. package/dist/cjs/heatmap/track.js +13 -9
  85. package/dist/cjs/index.d.ts +1 -2
  86. package/dist/cjs/index.js +55 -18
  87. package/dist/cjs/lifecycle.d.ts +13 -2
  88. package/dist/cjs/lifecycle.js +233 -118
  89. package/dist/cjs/pushnotification/display.d.ts +65 -0
  90. package/dist/cjs/pushnotification/display.js +112 -0
  91. package/dist/cjs/pushnotification/index.d.ts +20 -0
  92. package/dist/cjs/pushnotification/index.js +96 -0
  93. package/dist/cjs/pushnotification/kept-opens.d.ts +23 -0
  94. package/dist/cjs/pushnotification/kept-opens.js +64 -0
  95. package/dist/cjs/pushnotification/notify.d.ts +45 -0
  96. package/dist/cjs/pushnotification/notify.js +476 -0
  97. package/dist/cjs/pushnotification/payload.d.ts +65 -0
  98. package/dist/cjs/pushnotification/payload.js +279 -0
  99. package/dist/cjs/pushnotification/session.d.ts +46 -0
  100. package/dist/cjs/pushnotification/session.js +413 -0
  101. package/dist/cjs/pushnotification/stats.d.ts +45 -0
  102. package/dist/cjs/pushnotification/stats.js +244 -0
  103. package/dist/cjs/pushnotification/wms.d.ts +30 -0
  104. package/dist/cjs/pushnotification/wms.js +374 -0
  105. package/dist/cjs/remoteconfig/country.js +1 -1
  106. package/dist/cjs/remoteconfig/custom.js +4 -3
  107. package/dist/cjs/remoteconfig/evaluate.js +1 -1
  108. package/dist/cjs/remoteconfig/fetch.d.ts +17 -10
  109. package/dist/cjs/remoteconfig/fetch.js +146 -32
  110. package/dist/cjs/remoteconfig/index.d.ts +9 -5
  111. package/dist/cjs/remoteconfig/index.js +24 -32
  112. package/dist/cjs/remoteconfig/store.d.ts +15 -7
  113. package/dist/cjs/remoteconfig/store.js +68 -35
  114. package/dist/cjs/remoteconfig/tz-countries.js +1 -1
  115. package/dist/cjs/{core → remotelog}/callsite.d.ts +5 -4
  116. package/dist/cjs/{core → remotelog}/callsite.js +6 -5
  117. package/dist/cjs/remotelog/gate.js +1 -1
  118. package/dist/cjs/remotelog/logger.js +2 -2
  119. package/dist/cjs/remotelog/send.js +6 -5
  120. package/dist/cjs/remotelogger/index.js +1 -1
  121. package/dist/cjs/scheduler.d.ts +3 -1
  122. package/dist/cjs/scheduler.js +34 -25
  123. package/dist/cjs/sw/apptics-pn-sw.d.ts +83 -0
  124. package/dist/cjs/sw/timers.d.ts +44 -0
  125. package/dist/cjs/types.d.ts +90 -29
  126. package/dist/cjs/user/index.d.ts +7 -0
  127. package/dist/cjs/user/index.js +25 -3
  128. package/dist/esm/core/attempts.js +1 -1
  129. package/dist/esm/core/batch.js +4 -4
  130. package/dist/esm/core/consent.d.ts +17 -4
  131. package/dist/esm/core/consent.js +84 -20
  132. package/dist/esm/core/console-call.d.ts +23 -0
  133. package/dist/esm/core/console-call.js +60 -0
  134. package/dist/esm/core/constants.d.ts +66 -17
  135. package/dist/esm/core/constants.js +73 -20
  136. package/dist/esm/core/db.js +31 -7
  137. package/dist/esm/core/debug.d.ts +6 -4
  138. package/dist/esm/core/debug.js +37 -13
  139. package/dist/esm/core/env.d.ts +0 -3
  140. package/dist/esm/core/env.js +2 -9
  141. package/dist/esm/core/framework-id.d.ts +1 -1
  142. package/dist/esm/core/framework-id.js +3 -3
  143. package/dist/esm/core/guard.js +19 -4
  144. package/dist/esm/core/hooks.d.ts +29 -0
  145. package/dist/esm/core/hooks.js +12 -1
  146. package/dist/esm/core/locks.js +1 -1
  147. package/dist/esm/core/logger.js +1 -1
  148. package/dist/esm/core/shield.d.ts +31 -0
  149. package/dist/esm/core/shield.js +119 -0
  150. package/dist/esm/core/state.d.ts +11 -5
  151. package/dist/esm/core/state.js +4 -4
  152. package/dist/esm/core/storage.d.ts +7 -0
  153. package/dist/esm/core/storage.js +28 -11
  154. package/dist/esm/core/stylesheet.js +1 -1
  155. package/dist/esm/core/transport.d.ts +15 -4
  156. package/dist/esm/core/transport.js +73 -28
  157. package/dist/esm/core/utils.js +1 -1
  158. package/dist/esm/core/validate.js +6 -5
  159. package/dist/esm/device/appversion.d.ts +10 -1
  160. package/dist/esm/device/appversion.js +26 -4
  161. package/dist/esm/device/index.d.ts +17 -2
  162. package/dist/esm/device/index.js +255 -42
  163. package/dist/esm/engagement/api-rules.js +1 -1
  164. package/dist/esm/engagement/auto-api.js +4 -3
  165. package/dist/esm/engagement/auto-screen.js +10 -6
  166. package/dist/esm/engagement/defined-events.d.ts +2 -3
  167. package/dist/esm/engagement/defined-events.js +10 -16
  168. package/dist/esm/engagement/send.js +7 -3
  169. package/dist/esm/engagement/session.d.ts +17 -0
  170. package/dist/esm/engagement/session.js +152 -24
  171. package/dist/esm/engagement/track.d.ts +4 -4
  172. package/dist/esm/engagement/track.js +24 -18
  173. package/dist/esm/errors/send.js +2 -2
  174. package/dist/esm/errors/track.d.ts +2 -1
  175. package/dist/esm/errors/track.js +8 -5
  176. package/dist/esm/feedback/controls.d.ts +36 -4
  177. package/dist/esm/feedback/controls.js +298 -68
  178. package/dist/esm/feedback/i18n/index.d.ts +31 -0
  179. package/dist/esm/feedback/i18n/index.js +178 -0
  180. package/dist/esm/feedback/i18n/strings.d.ts +9 -0
  181. package/dist/esm/feedback/i18n/strings.js +4 -0
  182. package/dist/esm/feedback/index.js +1 -1
  183. package/dist/esm/feedback/logs.d.ts +3 -6
  184. package/dist/esm/feedback/logs.js +12 -21
  185. package/dist/esm/feedback/quartz.js +5 -2
  186. package/dist/esm/feedback/send.d.ts +6 -3
  187. package/dist/esm/feedback/send.js +61 -44
  188. package/dist/esm/feedback/styles.js +2 -2
  189. package/dist/esm/feedback/template.d.ts +4 -2
  190. package/dist/esm/feedback/template.js +73 -44
  191. package/dist/esm/feedback/ui.d.ts +47 -4
  192. package/dist/esm/feedback/ui.js +353 -99
  193. package/dist/esm/heatmap/send.d.ts +2 -0
  194. package/dist/esm/heatmap/send.js +3 -5
  195. package/dist/esm/heatmap/track.js +13 -9
  196. package/dist/esm/index.d.ts +1 -2
  197. package/dist/esm/index.js +58 -21
  198. package/dist/esm/lifecycle.d.ts +13 -2
  199. package/dist/esm/lifecycle.js +238 -125
  200. package/dist/esm/pushnotification/display.d.ts +65 -0
  201. package/dist/esm/pushnotification/display.js +95 -0
  202. package/dist/esm/pushnotification/index.d.ts +20 -0
  203. package/dist/esm/pushnotification/index.js +91 -0
  204. package/dist/esm/pushnotification/kept-opens.d.ts +23 -0
  205. package/dist/esm/pushnotification/kept-opens.js +62 -0
  206. package/dist/esm/pushnotification/notify.d.ts +45 -0
  207. package/dist/esm/pushnotification/notify.js +469 -0
  208. package/dist/esm/pushnotification/payload.d.ts +65 -0
  209. package/dist/esm/pushnotification/payload.js +272 -0
  210. package/dist/esm/pushnotification/session.d.ts +46 -0
  211. package/dist/esm/pushnotification/session.js +402 -0
  212. package/dist/esm/pushnotification/stats.d.ts +45 -0
  213. package/dist/esm/pushnotification/stats.js +238 -0
  214. package/dist/esm/pushnotification/wms.d.ts +30 -0
  215. package/dist/esm/pushnotification/wms.js +368 -0
  216. package/dist/esm/remoteconfig/country.js +1 -1
  217. package/dist/esm/remoteconfig/custom.js +4 -3
  218. package/dist/esm/remoteconfig/evaluate.js +1 -1
  219. package/dist/esm/remoteconfig/fetch.d.ts +17 -10
  220. package/dist/esm/remoteconfig/fetch.js +147 -33
  221. package/dist/esm/remoteconfig/index.d.ts +9 -5
  222. package/dist/esm/remoteconfig/index.js +24 -32
  223. package/dist/esm/remoteconfig/store.d.ts +15 -7
  224. package/dist/esm/remoteconfig/store.js +68 -36
  225. package/dist/esm/remoteconfig/tz-countries.js +1 -1
  226. package/dist/esm/{core → remotelog}/callsite.d.ts +5 -4
  227. package/dist/esm/{core → remotelog}/callsite.js +6 -5
  228. package/dist/esm/remotelog/gate.js +1 -1
  229. package/dist/esm/remotelog/logger.js +2 -2
  230. package/dist/esm/remotelog/send.js +6 -5
  231. package/dist/esm/remotelogger/index.js +1 -1
  232. package/dist/esm/scheduler.d.ts +3 -1
  233. package/dist/esm/scheduler.js +35 -27
  234. package/dist/esm/sw/apptics-pn-sw.d.ts +83 -0
  235. package/dist/esm/sw/timers.d.ts +44 -0
  236. package/dist/esm/types.d.ts +90 -29
  237. package/dist/esm/user/index.d.ts +7 -0
  238. package/dist/esm/user/index.js +26 -5
  239. package/dist/feedback.esm.min.js +2 -2
  240. package/dist/feedback.esm.min.js.map +1 -1
  241. package/dist/pushnotification.esm.min.js +3 -0
  242. package/dist/pushnotification.esm.min.js.map +1 -0
  243. package/dist/remoteconfig.esm.min.js +3 -0
  244. package/dist/remoteconfig.esm.min.js.map +1 -0
  245. package/dist/remotelogger.esm.min.js +3 -0
  246. package/dist/remotelogger.esm.min.js.map +1 -0
  247. package/package.json +17 -3
  248. package/dist/chunks/lifecycle-VYr43KcB.min.js +0 -3
  249. package/dist/chunks/lifecycle-VYr43KcB.min.js.map +0 -1
  250. package/dist/cjs/auto-init.d.ts +0 -8
  251. package/dist/cjs/auto-init.js +0 -32
  252. package/dist/esm/auto-init.d.ts +0 -8
  253. package/dist/esm/auto-init.js +0 -29
@@ -1,4 +1,4 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  /**
@@ -1,10 +1,11 @@
1
1
  /**
2
- * Where a log line was raised, for logSDK's `filename` and `linenumber`.
2
+ * Where in the app an AppticsLogger line was written, for logSDK's `filename`, `linenumber` and
3
+ * `function`: the Remote Logger page shows each line with them.
3
4
  *
4
5
  * There is no caller introspection in a browser, so the only way to answer "which line was this"
5
- * is to throw an Error nobody catches and read its stack. That is cheap enough for a channel that
6
- * only carries the SDK's own failures, but it is never on the app's path: everything here is
7
- * wrapped so a stack we cannot parse costs a line its call site and nothing more.
6
+ * is to make an Error and read its stack, skipping the SDK's own frames. That costs a little on
7
+ * every line the app logs, and nothing on any other call. Everything here is wrapped so a stack
8
+ * that cannot be parsed costs a line its call site and nothing more: the line is still logged.
8
9
  */
9
10
  export interface CallSite {
10
11
  /** The script's basename, not its url: logSDK caps filename at 100 characters. */
@@ -1,13 +1,14 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  /**
5
- * Where a log line was raised, for logSDK's `filename` and `linenumber`.
5
+ * Where in the app an AppticsLogger line was written, for logSDK's `filename`, `linenumber` and
6
+ * `function`: the Remote Logger page shows each line with them.
6
7
  *
7
8
  * There is no caller introspection in a browser, so the only way to answer "which line was this"
8
- * is to throw an Error nobody catches and read its stack. That is cheap enough for a channel that
9
- * only carries the SDK's own failures, but it is never on the app's path: everything here is
10
- * wrapped so a stack we cannot parse costs a line its call site and nothing more.
9
+ * is to make an Error and read its stack, skipping the SDK's own frames. That costs a little on
10
+ * every line the app logs, and nothing on any other call. Everything here is wrapped so a stack
11
+ * that cannot be parsed costs a line its call site and nothing more: the line is still logged.
11
12
  */
12
13
  const NO_CALL_SITE = { filename: '', linenumber: 0, fn: '' };
13
14
  /**
@@ -1,4 +1,4 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  var state = require('../core/state.js');
@@ -1,8 +1,8 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  var constants = require('../core/constants.js');
5
- var callsite = require('../core/callsite.js');
5
+ var callsite = require('./callsite.js');
6
6
  var storage = require('../core/storage.js');
7
7
  var guard = require('../core/guard.js');
8
8
  var utils = require('../core/utils.js');
@@ -1,4 +1,4 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  var constants = require('../core/constants.js');
@@ -8,6 +8,7 @@ var utils = require('../core/utils.js');
8
8
  var storage = require('../core/storage.js');
9
9
  var transport = require('../core/transport.js');
10
10
  var gate = require('./gate.js');
11
+ var shield = require('../core/shield.js');
11
12
 
12
13
  /**
13
14
  * Delivery for the remote logger.
@@ -42,7 +43,7 @@ function entryFor(item) {
42
43
  var entry = {
43
44
  sessionstarttime: state._ZAP._current_session.starttime || item.happenedat || utils.nowMs(),
44
45
  logtime: item.happenedat || utils.nowMs(),
45
- // an app's line carries the level it was logged at; the SDK's own failures carry none
46
+ // an app's line carries the level it was logged at; only a line an older SDK stored has none
46
47
  level: Number(item.level) || constants.REMOTE_LOG_LEVEL,
47
48
  logmessage: String(item.exceptionlog).slice(0, constants.CONSOLE_LOG_MAX_BODY),
48
49
  function: String(item.module || 'SDK').slice(0, constants.LOG_FUNCTION_MAX), // no i18n
@@ -67,10 +68,10 @@ function scheduleSend() {
67
68
  return;
68
69
  }
69
70
  sendScheduled = true;
70
- setTimeout(function () {
71
+ setTimeout(shield.shield(LABEL, function () {
71
72
  sendScheduled = false;
72
- sendStoredLogs();
73
- }, SEND_DELAY_MS);
73
+ shield.quietly(LABEL, sendStoredLogs());
74
+ }), SEND_DELAY_MS);
74
75
  }
75
76
  /** Drops the oldest lines once the queue is over MAX_STORED_BYTES, keeping the newest that fit. */
76
77
  function trim(items) {
@@ -1,4 +1,4 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3,6 +3,8 @@
3
3
  * response (page hide), so they survive the page going away.
4
4
  */
5
5
  export declare function flush(forget?: boolean): Promise<void>;
6
- /** Starts the flush and getupdates intervals once; later calls do nothing until stopTimers(). */
6
+ /** Apptics.flush(): flush(), at most once every CALLED_FLUSH_GAP_MS. A call sooner sends nothing. */
7
+ export declare function calledFlush(): Promise<void>;
8
+ /** Starts the flush interval once; later calls do nothing until stopTimers(). */
7
9
  export declare function startTimers(): void;
8
10
  export declare function stopTimers(): void;
@@ -1,9 +1,9 @@
1
- /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0 | (c) Zoho Corporation Private Limited | see LICENSE */
2
2
  'use strict';
3
3
 
4
4
  var state = require('./core/state.js');
5
- var utils = require('./core/utils.js');
6
5
  var logger = require('./core/logger.js');
6
+ var utils = require('./core/utils.js');
7
7
  var consent = require('./core/consent.js');
8
8
  var batch = require('./core/batch.js');
9
9
  var send = require('./engagement/send.js');
@@ -11,6 +11,7 @@ var send$1 = require('./errors/send.js');
11
11
  var hooks = require('./core/hooks.js');
12
12
  var index = require('./device/index.js');
13
13
  var debug = require('./core/debug.js');
14
+ var shield = require('./core/shield.js');
14
15
 
15
16
  /**
16
17
  * Sends everything queued now. With `forget`, the requests are sent without waiting for a
@@ -27,52 +28,60 @@ function flush(forget) {
27
28
  }).then(function () {
28
29
  // the hook heatmap/send.ts sets
29
30
  return hooks.hooks.sendHeatmaps(forget);
31
+ }).then(function () {
32
+ // and the one pushnotification/stats.ts sets
33
+ return hooks.hooks.sendPushStats(forget);
30
34
  });
31
35
  }
36
+ /**
37
+ * How often Apptics.flush() sends when it is called by hand, from the console or the app's own
38
+ * code: once every 15 seconds, however often it is called. The SDK's own sends (the flush
39
+ * interval, page hide and close, back online) call flush() directly and are not held to it.
40
+ */
41
+ const CALLED_FLUSH_GAP_MS = 15 * 1000;
42
+ /** When Apptics.flush() last sent; 0 until it has. */
43
+ var calledFlushAt = 0;
44
+ /** Apptics.flush(): flush(), at most once every CALLED_FLUSH_GAP_MS. A call sooner sends nothing. */
45
+ function calledFlush() {
46
+ var now = utils.nowMs();
47
+ if (calledFlushAt > 0 && now - calledFlushAt < CALLED_FLUSH_GAP_MS) {
48
+ logger.Console.log('Apptics.flush: sent ' + (now - calledFlushAt) + ' ms ago; it sends at most once every ' + CALLED_FLUSH_GAP_MS + ' ms, and the timer sends the rest'); // no i18n
49
+ return Promise.resolve();
50
+ }
51
+ calledFlushAt = now;
52
+ return flush();
53
+ }
32
54
  var sendingInterval = null;
33
- var getUpdatesInterval = null;
34
- /** Starts the flush and getupdates intervals once; later calls do nothing until stopTimers(). */
55
+ /** Starts the flush interval once; later calls do nothing until stopTimers(). */
35
56
  function startTimers() {
36
57
  if (sendingInterval === null) {
37
- sendingInterval = setInterval(function () {
58
+ sendingInterval = setInterval(shield.shield('scheduled send', function () {
38
59
  // the only tick that happens whether or not anything is being tracked, which is
39
60
  // exactly the case debug mode has to expire in
40
61
  debug.expireDebugIfIdle();
41
62
  logger.Console.log('scheduleToSendDataToServer: Scheduling to send engagement data to the server after sometime'); // no i18n
42
63
  // one after the other, as flush() does: run together, the second and third find the
43
64
  // first still sending and are deferred, and the third's retry replaces the second's
44
- send.sendEngagementData().then(function () {
65
+ shield.quietly('scheduled send', send.sendEngagementData().then(function () {
45
66
  return send$1.sendErrorData();
46
67
  }).then(function () {
47
68
  return hooks.hooks.sendHeatmaps();
48
- });
49
- }, state.getConfig('batch_flush_interval')); // no i18n
50
- }
51
- if (getUpdatesInterval === null) {
52
- // the interval is the floor, not the schedule: getsdkconfig answers with next_check_after,
53
- // and asking again before then is a call the server has already told us it will not answer
54
- // differently. The timer still ticks so a server that sends no hint behaves as before.
55
- getUpdatesInterval = setInterval(function () {
56
- if (state._ZAP._nextConfigCheck > 0 && utils.nowMs() < state._ZAP._nextConfigCheck) {
57
- return;
58
- }
59
- logger.Console.log('scheduleToGetUpdatesFromServer: asking the server for its config'); // no i18n
60
- index.getUpdatesFromServer().catch(function (err) {
61
- logger.Console.log(err);
62
- });
63
- }, state.getConfig('getupdates_interval')); // no i18n
69
+ }).then(function () {
70
+ return hooks.hooks.sendPushStats();
71
+ }));
72
+ }), state.getConfig('batch_flush_interval')); // no i18n
64
73
  }
65
74
  }
66
75
  function stopTimers() {
67
76
  if (sendingInterval !== null)
68
77
  clearInterval(sendingInterval);
69
- if (getUpdatesInterval !== null)
70
- clearInterval(getUpdatesInterval);
71
78
  sendingInterval = null;
72
- getUpdatesInterval = null;
73
79
  batch.clearDefer();
80
+ index.stopServerSettingChecks();
81
+ calledFlushAt = 0;
74
82
  }
75
83
 
84
+ exports.calledFlush = calledFlush;
76
85
  exports.flush = flush;
77
86
  exports.startTimers = startTimers;
78
87
  exports.stopTimers = stopTimers;
@@ -0,0 +1,83 @@
1
+ import { CLICK_MESSAGE, CLOSE_MESSAGE, STEP_MESSAGE } from '../pushnotification/display.js';
2
+ /**
3
+ * The Apptics service worker: the part of push notifications that runs without the page. The
4
+ * site hosts a one-line worker of its own,
5
+ *
6
+ * importScripts('https://static.zohocdn.com/apptics-js-sdk/<version>/apptics-pn-sw.js');
7
+ *
8
+ * or adds that line to the worker it already has. It handles the clicks on the notifications the
9
+ * SDK showed: Prev / Next step a carousel in place, a button or the body opens its URL, and the
10
+ * click is posted to the site's open tabs for the app's onNotificationClick. Notifications that
11
+ * aren't the SDK's (data.apptics !== 1) are left to the site's own code.
12
+ *
13
+ * Timed parts (auto-scroll, the countdown, auto-dismiss) run here too, once the tab that showed
14
+ * the notification hands them over (timers.ts): they go on while that tab is in the background or
15
+ * closed. An event keeps the worker alive for a few minutes only, so what is still running after
16
+ * that goes back to an open tab.
17
+ */
18
+ interface ClientLike {
19
+ url: string;
20
+ focus?: () => Promise<unknown>;
21
+ postMessage: (message: unknown) => void;
22
+ }
23
+ /** What the handlers use of the worker's global scope; tests pass their own. */
24
+ export interface WorkerScope {
25
+ /** The site's origin (the worker's own); a tab of it gets the click report. */
26
+ origin?: string;
27
+ registration: {
28
+ showNotification: (title: string, options: NotificationOptions) => Promise<void>;
29
+ getNotifications?: (filter: {
30
+ tag: string;
31
+ }) => Promise<ReadonlyArray<{
32
+ close: () => void;
33
+ }>>;
34
+ };
35
+ clients: {
36
+ matchAll: (options: {
37
+ type: string;
38
+ includeUncontrolled: boolean;
39
+ }) => Promise<ReadonlyArray<ClientLike>>;
40
+ openWindow: (url: string) => Promise<unknown>;
41
+ };
42
+ }
43
+ interface NotificationEventLike {
44
+ action?: string;
45
+ notification: {
46
+ data?: unknown;
47
+ close: () => void;
48
+ };
49
+ waitUntil: (promise: Promise<unknown>) => void;
50
+ }
51
+ export { CLICK_MESSAGE, CLOSE_MESSAGE, STEP_MESSAGE };
52
+ export declare function onNotificationClick(event: NotificationEventLike, scope: WorkerScope): void;
53
+ export declare function onNotificationClose(event: NotificationEventLike, scope: WorkerScope): void;
54
+ interface MessageEventLike {
55
+ data?: unknown;
56
+ ports?: ReadonlyArray<{
57
+ postMessage: (message: unknown) => void;
58
+ }>;
59
+ waitUntil?: (promise: Promise<unknown>) => void;
60
+ }
61
+ /**
62
+ * What a tab of the site posts: run a notification's timers here (answered on the port it came
63
+ * with, so the tab knows not to run them itself), or stop them, one tag or all.
64
+ */
65
+ export declare function onMessage(event: MessageEventLike, scope: WorkerScope): void;
66
+ interface TakeOverScope {
67
+ location?: {
68
+ pathname?: string;
69
+ };
70
+ skipWaiting: () => Promise<void>;
71
+ clients: {
72
+ claim: () => Promise<void>;
73
+ };
74
+ addEventListener: (type: string, fn: (e: {
75
+ waitUntil: (p: Promise<unknown>) => void;
76
+ }) => void) => void;
77
+ }
78
+ /**
79
+ * As the site's own /apptics-pn-sw.js, a new version takes over at once, and the open tabs with
80
+ * it, rather than waiting until every tab of the site is closed. Inside a site's own worker it
81
+ * leaves that worker's updates as the site set them up.
82
+ */
83
+ export declare function takeOverWhenOwn(g: TakeOverScope): void;
@@ -0,0 +1,44 @@
1
+ import type { ShownNotification } from '../pushnotification/display.js';
2
+ /**
3
+ * A notification's timed parts, run by the service worker: auto-scroll steps the carousel, the
4
+ * countdown ticks every second, and auto-dismiss closes it. They run in the worker, so they go on
5
+ * while the tab that received the message is in the background, frozen or closed.
6
+ *
7
+ * A browser stops a worker once the event keeping it alive has run for about 5 minutes. So the
8
+ * worker runs them for at most RUN_BUDGET_MS, and gives what is left to one open tab of the site,
9
+ * which runs the rest as it did before the worker took them over.
10
+ */
11
+ /** How long the worker runs a notification's timers before handing what is left to a tab. */
12
+ export declare const RUN_BUDGET_MS: number;
13
+ interface ClientLike {
14
+ url: string;
15
+ postMessage: (message: unknown) => void;
16
+ }
17
+ /** What the timers use of the worker's global scope; tests pass their own. */
18
+ export interface TimerScope {
19
+ origin?: string;
20
+ registration: {
21
+ showNotification: (title: string, options: NotificationOptions) => Promise<void>;
22
+ getNotifications?: (filter: {
23
+ tag: string;
24
+ }) => Promise<ReadonlyArray<{
25
+ close: () => void;
26
+ }>>;
27
+ };
28
+ clients: {
29
+ matchAll: (options: {
30
+ type: string;
31
+ includeUncontrolled: boolean;
32
+ }) => Promise<ReadonlyArray<ClientLike>>;
33
+ };
34
+ }
35
+ /** Stops the timers of `tag`, or of every notification without one. */
36
+ export declare function stopTimers(tag?: string): void;
37
+ /** Prev / Next: the visitor took over the carousel, so auto-scroll stops; the countdown keeps their slide. */
38
+ export declare function stepTimers(tag: string, index: number): void;
39
+ /**
40
+ * Runs the timers of `shown`, already on screen, replacing any it had. Resolves once they end:
41
+ * dismissed, closed or clicked by the visitor, stopped, all done, or handed to a tab.
42
+ */
43
+ export declare function runTimers(shown: ShownNotification, scope: TimerScope): Promise<void>;
44
+ export {};
@@ -26,6 +26,8 @@ export interface UserInfo {
26
26
  userid?: string;
27
27
  groupid?: string;
28
28
  status?: number;
29
+ /** user/register's answer: false when the user's customer group is not tracked. */
30
+ customergrouptracking?: boolean;
29
31
  [key: string]: any;
30
32
  }
31
33
  export interface ServerResult<T = Dict> {
@@ -37,7 +39,7 @@ export interface ServerResult<T = Dict> {
37
39
  export type TrackingStatus = (typeof AP_TRACKING_STATUS)[keyof typeof AP_TRACKING_STATUS];
38
40
  export type FeedbackType = (typeof AP_FEEDBACK_TYPE)[keyof typeof AP_FEEDBACK_TYPE];
39
41
  export type Properties = Record<string, unknown>;
40
- /** The config init() requires. The console snippet provides the same shape as window.appticssettings._defaultoptions. */
42
+ /** The config init() requires. */
41
43
  export interface AppticsConfig {
42
44
  /** Apptics host every request goes to, e.g. https://apptics.zoho.com (a trailing slash is ignored). Was `serviceUrl`. */
43
45
  base_url: string;
@@ -65,12 +67,6 @@ export interface AppticsConfig {
65
67
  base_domain?: string;
66
68
  /** @deprecated 1.x console-snippet name for auth_key: still read, with a warning */
67
69
  token?: string;
68
- /**
69
- * Debug mode: send engagement, exception and log payloads to their `debug/` twins, which answer
70
- * with a request id and a link to the server's own logs, for following in the Apptics web
71
- * console. Off by default; it does not change what is sent. Same as calling enableDebug().
72
- */
73
- debug?: boolean;
74
70
  /** Log the SDK's own activity to the browser console. Off by default. */
75
71
  console_log?: boolean;
76
72
  ignore_do_not_track?: boolean;
@@ -87,6 +83,18 @@ export interface AppticsConfig {
87
83
  * navigation replaces its automatic view; set this false to track only the app's own calls.
88
84
  */
89
85
  track_screen?: boolean;
86
+ /**
87
+ * Record uncaught errors and unhandled promise rejections automatically. On by default; set this
88
+ * false to record only the errors the app hands to AppticsError.trackError(). Switched later with
89
+ * AppticsError.setErrorTracking().
90
+ */
91
+ track_error?: boolean;
92
+ /**
93
+ * Record clicks on elements tagged `apeventaction` (or `data-apeventaction`) as events, in the
94
+ * group of the nearest `apgroupaction` around them. On by default; switched later with
95
+ * AppticsEvent.setClickTracking().
96
+ */
97
+ track_click?: boolean;
90
98
  /**
91
99
  * How automatic screen tracking names a path, tried in order; the first that matches wins, and a
92
100
  * path none matches keeps its own name. Each entry is one of:
@@ -105,29 +113,41 @@ export interface AppticsConfig {
105
113
  feedback_theme?: 'light' | 'dark' | 'auto';
106
114
  /** How often queued data is sent, in milliseconds. Default 30000, at least 1000. */
107
115
  batch_flush_interval?: number;
108
- /** How often the server's tracking flags are fetched, in milliseconds. Default 120000, at least 10000. */
116
+ /**
117
+ * How long to wait before reading the server's tracking settings again, in milliseconds, when its
118
+ * answer gives no time for the next check (next_check_after). Default 120000, at least 10000.
119
+ */
109
120
  getupdates_interval?: number;
110
121
  /** Most items in one batch. Default 50, between 1 and 500. */
111
122
  batch_size?: number;
112
123
  /** Days an unsent item is kept before it is dropped. Default 7, between 1 and 30. */
113
124
  batch_request_timeout?: number;
114
- /** Idle minutes that end a session. Default 30, between 1 and 1440. */
125
+ /**
126
+ * How long a tab can be inactive (hidden, minimised, in the background) before its session
127
+ * ends, in milliseconds, counted from the moment the tab went inactive; the session then ends at
128
+ * that moment. Default 1800000 (30 minutes), between 5000 (5 seconds) and 1800000. A value
129
+ * outside that is ignored with a warning and the default is kept.
130
+ */
131
+ max_session_duration?: number;
132
+ /**
133
+ * @deprecated Use max_session_duration, in milliseconds. Still read, in minutes, when
134
+ * max_session_duration is not given, with a warning; held to the same 5 seconds to 30 minutes.
135
+ */
115
136
  inactiveduration?: number;
116
137
  /**
117
- * How long a visit must last before its session is recorded, in milliseconds. Default 5000, at
118
- * most 60000. A shorter visit with nothing tracked in it is not reported at all; anything tracked
119
- * inside the window records the session at once, with its real start time. 0 turns the wait off.
138
+ * How long a visit must last before its session is recorded, in milliseconds. Default 5000,
139
+ * between 5000 (5 seconds) and 1800000 (30 minutes); a value outside that, 0 included, is ignored
140
+ * with a warning and 5000 is kept. A shorter visit with nothing tracked in it is not reported at
141
+ * all; anything tracked inside the window records the session at once, with its real start time.
120
142
  */
121
143
  min_session_duration?: number;
122
144
  /**
123
- * Record where people click and how far they scroll. Off by default; AppticsHeatmap.trackHeatmap()
124
- * switches it later.
145
+ * Record where people click and how far they scroll. Off by default;
146
+ * AppticsHeatmap.setHeatmapTracking() switches it later.
125
147
  */
126
148
  track_heatmap?: boolean;
127
149
  /** Most heatmap records one visit may produce. Default 500; capture pauses past it. */
128
150
  heatmap_max_per_session?: number;
129
- /** @deprecated the earlier name for `debug` (debug mode); `debug` wins when both are given */
130
- debug_api?: boolean;
131
151
  /**
132
152
  * What to call this device in the debug stream, e.g. 'QA iPad 3'. Sent on engagement,
133
153
  * exception and log, the three endpoints that declare it. Unset, nothing is sent unless
@@ -175,8 +195,9 @@ export interface QuartzApi {
175
195
  quartzBranding: boolean;
176
196
  }): void;
177
197
  clearFeedback(): void;
178
- endRecording(): void;
179
- setVideoContent(element: Element | null): void;
198
+ /** Resolves once the recording has ended and is stored; Quartz's own build returns a Promise. */
199
+ endRecording(): Promise<unknown> | void;
200
+ setVideoContent(element: Element | null): Promise<unknown> | void;
180
201
  submitRecording(details: {
181
202
  email: string;
182
203
  subject: string;
@@ -256,7 +277,7 @@ export interface SendFeedbackOptions {
256
277
  attachments?: FileList | File[] | null;
257
278
  /** Log files of the app's own to send along. */
258
279
  logFiles?: FileList | File[] | null;
259
- /** The addDiagnosticsInfo() entries and the device's details: unset sends them when there are entries waiting. */
280
+ /** The addDiagnosticsInfo() entries: unset sends them when there are any, false never does. */
260
281
  includeDiagnostics?: boolean;
261
282
  /** The addFeedbackLog() lines: unset sends them when there are any, false never does. */
262
283
  includeLog?: boolean;
@@ -305,31 +326,41 @@ export interface AppticsFeedbackApi {
305
326
  export interface AppticsSdk {
306
327
  /** Android's Apptics: starting the SDK, and what applies to all of it. */
307
328
  Apptics: {
308
- /** Starts the SDK. The config object is required; the console snippet supplies it via auto-init. */
329
+ /** Starts the SDK with the app's config object, which is required. */
309
330
  init(config: AppticsConfig): boolean;
310
331
  /** Resolves true once start-up (storage load, device, session) has finished; false if it can't start. */
311
332
  ready(): Promise<boolean>;
312
- /** Sends stored engagements, errors and heatmap records now; resolves once they have gone out. */
333
+ /**
334
+ * Sends stored engagements, errors and heatmap records now; resolves once they have gone out.
335
+ * At most once every 15 seconds: a call sooner than that sends nothing and resolves at once,
336
+ * and what is queued goes with the next timed send.
337
+ */
313
338
  flush(): Promise<void>;
314
339
  /** Clears stored identity, queued data and remote config values, then starts again. */
315
340
  reset(): void;
316
341
  /**
317
342
  * Turns debug mode on, before or after Apptics.init(). Engagement, exception and log then go to
318
343
  * their `debug/` twins, whose answers carry a request id and a link into the server's own logs. It
319
- * switches itself off after an hour with nothing tracked.
344
+ * switches itself off after an hour with nothing tracked. Works only when typed in the browser
345
+ * console: a call from the page's code is ignored, with a warning, so an app can't ship with it on.
320
346
  */
321
347
  enableDebug(): void;
322
- /** Turns debug mode off, before or after Apptics.init(); wins over `debug` in init(). */
348
+ /** Turns debug mode off, before or after Apptics.init(). Like enableDebug(), only from the browser console. */
323
349
  disableDebug(): void;
324
350
  };
325
351
  /** Android's AppticsEvents. */
326
352
  AppticsEvent: {
327
353
  /** Apptics' defined events, as Android's DefinedEvents, to log with addEvent. */
328
354
  DefinedEvents: typeof DefinedEvents;
329
- /** An event. An invalid name or group is not logged; a group left out is `default`. */
330
- addEvent(eventName: string, groupName?: string, properties?: Properties): void;
355
+ /** An event. The group is required: an event without one, or with an invalid name or group, is not logged, and the console says why. */
356
+ addEvent(eventName: string, groupName: string, properties?: Properties): void;
331
357
  /** A defined event (AppticsEvent.DefinedEvents.AP_USER_LOGIN, …), which brings its own group. */
332
358
  addEvent(definedEvent: DefinedEvent, properties?: Properties): void;
359
+ /**
360
+ * Turns click tracking from markup (`apeventaction`) on or off after Apptics.init(); `enabled`
361
+ * defaults to true. The `track_click` config flag sets it at start-up.
362
+ */
363
+ setClickTracking(enabled?: boolean): void;
333
364
  };
334
365
  /** Android's AppticsScreenTracker. */
335
366
  AppticsScreen: {
@@ -337,6 +368,11 @@ export interface AppticsSdk {
337
368
  inScreen(screenName: string, properties?: Properties): string;
338
369
  /** Ends the screen view inScreen began, before the next screen would. */
339
370
  outScreen(id: string): void;
371
+ /**
372
+ * Turns automatic screen tracking on or off after Apptics.init(); `enabled` defaults to true.
373
+ * The `track_screen` config flag sets it at start-up. inScreen() records either way.
374
+ */
375
+ setScreenTracking(enabled?: boolean): void;
340
376
  };
341
377
  /** Android's AppticsApiTracker. */
342
378
  AppticsApi: {
@@ -349,16 +385,23 @@ export interface AppticsSdk {
349
385
  /** The rules API tracking records by, from ApiTrackingBuilder. Works before Apptics.init(). */
350
386
  configure(config: ApiTrackingConfig | ApiTrackingBuilder): void;
351
387
  /**
352
- * Turns automatic API tracking on or off after Apptics.init(). Equivalent to the `track_api`
353
- * config flag, which is the usual way to set it.
388
+ * Turns automatic API tracking on or off after Apptics.init(); `enabled` defaults to true.
389
+ * The `track_api` config flag sets it at start-up.
354
390
  */
391
+ setApiTracking(enabled?: boolean): void;
392
+ /** @deprecated renamed setApiTracking; this name still works, with a console warning */
355
393
  enableApiTracking(enabled?: boolean): void;
356
394
  };
357
395
  /** Errors the app caught, and the switch for tracking uncaught ones. */
358
396
  AppticsError: {
359
397
  /** Reports an error the app caught, or an `error` / `unhandledrejection` event. */
360
398
  trackError(error: ErrorLike, properties?: Properties): void;
361
- /** Turns the automatic tracking of uncaught errors and unhandled rejections on or off. */
399
+ /**
400
+ * Turns the automatic tracking of uncaught errors and unhandled rejections on or off after
401
+ * Apptics.init(); `enabled` defaults to true. The `track_error` config flag sets it at start-up.
402
+ */
403
+ setErrorTracking(enabled?: boolean): void;
404
+ /** @deprecated renamed setErrorTracking; this name still works, with a console warning */
362
405
  trackGlobalErrorHandler(enabled?: boolean): void;
363
406
  };
364
407
  /** Android's AppticsUser. */
@@ -372,14 +415,32 @@ export interface AppticsSdk {
372
415
  };
373
416
  /** Click and scroll capture for the console's heatmaps. */
374
417
  AppticsHeatmap: {
375
- /** Starts or stops recording clicks and scrolls; `on` defaults to true. */
418
+ /**
419
+ * Starts or stops recording clicks and scrolls; `enabled` defaults to true. The
420
+ * `track_heatmap` config flag sets it at start-up.
421
+ */
422
+ setHeatmapTracking(enabled?: boolean): void;
423
+ /** @deprecated renamed setHeatmapTracking; this name still works, with a console warning */
376
424
  trackHeatmap(on?: boolean): void;
377
425
  };
378
426
  /** Android's AppticsSettings: what the SDK may track for this visitor. */
379
427
  AppticsSettings: {
380
428
  /** The states setTrackingStatus takes. */
381
429
  AP_TRACKING_STATUS: typeof AP_TRACKING_STATUS;
430
+ /** One of AP_TRACKING_STATUS, as AppticsSettings.AP_TRACKING_STATUS.ANONYMOUS. */
382
431
  setTrackingStatus(status: TrackingStatus): void;
432
+ /** @deprecated pass AP_TRACKING_STATUS.<name>; the number (1, 4, 7, -1) still works, with a console warning */
433
+ setTrackingStatus(status: number): void;
434
+ /** One of AP_TRACKING_STATUS, as 'USAGE_TRACKING_WITH_PII'. */
383
435
  getTrackingStatus(): TrackingStatus;
384
436
  };
385
437
  }
438
+ /**
439
+ * getsdkconfig's `wms` block: where wmsliteapi.js loads from, its subresource-integrity hash, and
440
+ * the hashes wmsliteapi.js checks the scripts it loads itself against.
441
+ */
442
+ export interface WmsConfig {
443
+ wms_js_url: string;
444
+ wms_sri: string;
445
+ wms_sri_values: Record<string, unknown> | null;
446
+ }
@@ -1,4 +1,11 @@
1
1
  import type { Dict, Properties, UserInfo, UserValidationResult } from '../types.js';
2
+ /**
3
+ * Whether the active user's customer group is not tracked, as user/register last answered for them
4
+ * (user_info's customergrouptracking). A user registered before it was kept has none, and counts as
5
+ * tracked. Only a user getsdkconfig is asked about can be one: the status decides whether it
6
+ * carries their userid.
7
+ */
8
+ export declare function activeUserGroupUntracked(): boolean;
2
9
  export declare function getUser(): UserInfo;
3
10
  export declare function setUser(userid?: string, groupid?: string, jsonObj?: Properties | UserValidationResult): void;
4
11
  export declare function addOrUpdateUser(user_info: Dict): void;