@m4l/gclick-realtime 1.10.0 → 1.11.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 (197) hide show
  1. package/consumer/RealTimeConsumerContext.d.ts +10 -0
  2. package/consumer/RealTimeConsumerContext.d.ts.map +1 -0
  3. package/consumer/RealTimeConsumerContext.js +128 -0
  4. package/consumer/index.d.ts +4 -0
  5. package/consumer/index.d.ts.map +1 -0
  6. package/consumer/index.js +7 -0
  7. package/consumer/types.d.ts +47 -0
  8. package/consumer/types.d.ts.map +1 -0
  9. package/consumer/useRealTimeConsumer.d.ts.map +1 -0
  10. package/{web/consumer → consumer}/useRealTimeConsumer.js +2 -2
  11. package/contracts/deviceData.d.ts +19 -22
  12. package/contracts/deviceData.d.ts.map +1 -1
  13. package/contracts/deviceDetail.d.ts +0 -2
  14. package/contracts/deviceDetail.d.ts.map +1 -1
  15. package/contracts/index.d.ts +1 -1
  16. package/contracts/index.d.ts.map +1 -1
  17. package/dummy/catalogs/baseDeviceTemplate.d.ts.map +1 -1
  18. package/dummy/catalogs/baseDeviceTemplate.js +4 -35
  19. package/dummy/catalogs/blueprints.d.ts +9 -54
  20. package/dummy/catalogs/blueprints.d.ts.map +1 -1
  21. package/dummy/catalogs/blueprints.js +25 -42
  22. package/dummy/catalogs/departments.d.ts +10 -0
  23. package/dummy/catalogs/departments.d.ts.map +1 -0
  24. package/dummy/catalogs/departments.js +43 -0
  25. package/dummy/index.d.ts +3 -3
  26. package/dummy/index.d.ts.map +1 -1
  27. package/dummy/index.js +28 -28
  28. package/dummy/shared/types.d.ts +2 -4
  29. package/dummy/shared/types.d.ts.map +1 -1
  30. package/dummy/{runtime → simulation}/simulation.d.ts +1 -1
  31. package/dummy/simulation/simulation.d.ts.map +1 -0
  32. package/dummy/{runtime → simulation}/simulation.js +333 -423
  33. package/dummy/{runtime/dummy.d.ts → source-data/SourceDataDummy.d.ts} +8 -3
  34. package/dummy/source-data/SourceDataDummy.d.ts.map +1 -0
  35. package/dummy/{runtime/dummy.js → source-data/SourceDataDummy.js} +117 -128
  36. package/mobile/index.d.ts +4 -0
  37. package/mobile/index.d.ts.map +1 -0
  38. package/mobile/index.js +23 -0
  39. package/mobile/resourceTypes.d.ts +48 -0
  40. package/mobile/resourceTypes.d.ts.map +1 -0
  41. package/mobile/resourceTypes.js +54 -0
  42. package/mobile/runtime/atmosphere.d.ts +10 -0
  43. package/mobile/runtime/atmosphere.d.ts.map +1 -0
  44. package/mobile/runtime/atmosphere.js +16 -0
  45. package/mobile/runtime/dummy.d.ts +11 -0
  46. package/mobile/runtime/dummy.d.ts.map +1 -0
  47. package/mobile/runtime/dummy.js +16 -0
  48. package/mobile/runtime/index.d.ts +11 -0
  49. package/mobile/runtime/index.d.ts.map +1 -0
  50. package/mobile/runtime/runtimeRegistry.d.ts +17 -0
  51. package/mobile/runtime/runtimeRegistry.d.ts.map +1 -0
  52. package/mobile/runtime/runtimeRegistry.js +24 -0
  53. package/mobile/runtime/sourceDataFactory.d.ts +6 -0
  54. package/mobile/runtime/sourceDataFactory.d.ts.map +1 -0
  55. package/mobile/runtime/sourceDataFactory.js +29 -0
  56. package/mobile/runtime/types.d.ts +8 -0
  57. package/mobile/runtime/types.d.ts.map +1 -0
  58. package/package.json +37 -1
  59. package/payload/mergeDevicePayloadWithUpdatedAtGuard.d.ts +1 -1
  60. package/payload/mergeDevicePayloadWithUpdatedAtGuard.d.ts.map +1 -1
  61. package/rt_alarms/constants.d.ts +6 -0
  62. package/rt_alarms/constants.d.ts.map +1 -0
  63. package/rt_alarms/constants.js +7 -0
  64. package/rt_alarms/index.d.ts +15 -0
  65. package/rt_alarms/index.d.ts.map +1 -0
  66. package/rt_alarms/index.js +18 -0
  67. package/rt_devices/constants.d.ts +4 -0
  68. package/rt_devices/constants.d.ts.map +1 -0
  69. package/rt_devices/constants.js +5 -0
  70. package/rt_devices/index.d.ts +22 -0
  71. package/rt_devices/index.d.ts.map +1 -0
  72. package/rt_devices/index.js +150 -0
  73. package/rt_devices/resourceTypeMergeStrategies.d.ts +12 -0
  74. package/rt_devices/resourceTypeMergeStrategies.d.ts.map +1 -0
  75. package/rt_devices/resourceTypeMergeStrategies.js +19 -0
  76. package/shared/atmosphereHost.d.ts +5 -0
  77. package/shared/atmosphereHost.d.ts.map +1 -0
  78. package/shared/atmosphereHost.js +7 -0
  79. package/shared/index.d.ts +5 -0
  80. package/shared/index.d.ts.map +1 -0
  81. package/shared/index.js +11 -0
  82. package/shared/performanceMetrics.d.ts +64 -0
  83. package/shared/performanceMetrics.d.ts.map +1 -0
  84. package/shared/performanceMetrics.js +73 -0
  85. package/shared/runtimeRegistry.d.ts +17 -0
  86. package/shared/runtimeRegistry.d.ts.map +1 -0
  87. package/shared/runtimeRegistry.js +27 -0
  88. package/shared/runtimeResourceTypesKey.d.ts +14 -0
  89. package/shared/runtimeResourceTypesKey.d.ts.map +1 -0
  90. package/shared/runtimeResourceTypesKey.js +18 -0
  91. package/shared/startupSnapshots.d.ts +28 -0
  92. package/shared/startupSnapshots.d.ts.map +1 -0
  93. package/shared/startupSnapshots.js +29 -0
  94. package/web/diagnostics/performanceMetrics.d.ts +34 -0
  95. package/web/diagnostics/performanceMetrics.d.ts.map +1 -0
  96. package/web/diagnostics/performanceMetrics.js +61 -0
  97. package/web/host/devicesResourceType.d.ts +3 -11
  98. package/web/host/devicesResourceType.d.ts.map +1 -1
  99. package/web/host/devicesResourceType.js +58 -171
  100. package/web/host/hostRuntime.d.ts +6 -8
  101. package/web/host/hostRuntime.d.ts.map +1 -1
  102. package/web/host/hostRuntime.js +29 -38
  103. package/web/host/index.d.ts +2 -2
  104. package/web/host/index.d.ts.map +1 -1
  105. package/web/host/launchContract.d.ts +19 -13
  106. package/web/host/launchContract.d.ts.map +1 -1
  107. package/web/host/launchContract.js +82 -76
  108. package/web/index.d.ts +2 -7
  109. package/web/index.d.ts.map +1 -1
  110. package/web/index.js +34 -62
  111. package/web/runtime/atmosphere.d.ts +12 -0
  112. package/web/runtime/atmosphere.d.ts.map +1 -0
  113. package/web/runtime/atmosphere.js +22 -0
  114. package/web/runtime/dummy.d.ts +11 -0
  115. package/web/runtime/dummy.d.ts.map +1 -0
  116. package/web/runtime/dummy.js +22 -0
  117. package/web/runtime/index.d.ts +8 -9
  118. package/web/runtime/index.d.ts.map +1 -1
  119. package/web/runtime/performanceMetricReporter.d.ts +8 -0
  120. package/web/runtime/performanceMetricReporter.d.ts.map +1 -0
  121. package/web/runtime/performanceMetricReporter.js +10 -0
  122. package/web/runtime/runtimeRegistry.d.ts +21 -5
  123. package/web/runtime/runtimeRegistry.d.ts.map +1 -1
  124. package/web/runtime/runtimeRegistry.js +22 -7
  125. package/web/runtime/sourceDataFactory.d.ts +7 -0
  126. package/web/runtime/sourceDataFactory.d.ts.map +1 -0
  127. package/web/runtime/sourceDataFactory.js +26 -0
  128. package/web/{producer → runtime}/types.d.ts +2 -7
  129. package/web/runtime/types.d.ts.map +1 -0
  130. package/dummy/catalogs/group.d.ts +0 -10
  131. package/dummy/catalogs/group.d.ts.map +0 -1
  132. package/dummy/catalogs/group.js +0 -46
  133. package/dummy/runtime/dummy.d.ts.map +0 -1
  134. package/dummy/runtime/simulation.d.ts.map +0 -1
  135. package/libs/observability/mf/src/browserRuntimeHandles.js +0 -350
  136. package/libs/observability/mf/src/diagnosticPolicies/catalog.js +0 -12
  137. package/libs/observability/mf/src/diagnosticPolicies/contracts.js +0 -8
  138. package/libs/observability/mf/src/diagnosticPolicies/host.js +0 -127
  139. package/libs/observability/mf/src/diagnosticPolicies/operativeMyGpsDevices.js +0 -79
  140. package/web/consumer/RealTimeConsumerContext.d.ts +0 -10
  141. package/web/consumer/RealTimeConsumerContext.d.ts.map +0 -1
  142. package/web/consumer/RealTimeConsumerContext.js +0 -156
  143. package/web/consumer/index.d.ts +0 -6
  144. package/web/consumer/index.d.ts.map +0 -1
  145. package/web/consumer/store.d.ts +0 -10
  146. package/web/consumer/store.d.ts.map +0 -1
  147. package/web/consumer/store.helpers.d.ts +0 -62
  148. package/web/consumer/store.helpers.d.ts.map +0 -1
  149. package/web/consumer/store.helpers.js +0 -141
  150. package/web/consumer/store.js +0 -227
  151. package/web/consumer/types.d.ts +0 -161
  152. package/web/consumer/types.d.ts.map +0 -1
  153. package/web/consumer/useRealTimeConsumer.d.ts.map +0 -1
  154. package/web/host/startupSnapshots.d.ts +0 -45
  155. package/web/host/startupSnapshots.d.ts.map +0 -1
  156. package/web/host/startupSnapshots.js +0 -103
  157. package/web/producer/RealTimeProducerContext.d.ts +0 -9
  158. package/web/producer/RealTimeProducerContext.d.ts.map +0 -1
  159. package/web/producer/RealTimeProducerContext.js +0 -16
  160. package/web/producer/index.d.ts +0 -7
  161. package/web/producer/index.d.ts.map +0 -1
  162. package/web/producer/sourceDataFactory.d.ts +0 -13
  163. package/web/producer/sourceDataFactory.d.ts.map +0 -1
  164. package/web/producer/sourceDataFactory.js +0 -32
  165. package/web/producer/store.d.ts +0 -7
  166. package/web/producer/store.d.ts.map +0 -1
  167. package/web/producer/store.js +0 -5
  168. package/web/producer/types.d.ts.map +0 -1
  169. package/web/producer/useRealTimeProducer.d.ts +0 -7
  170. package/web/producer/useRealTimeProducer.d.ts.map +0 -1
  171. package/web/producer/useRealTimeProducer.js +0 -15
  172. package/web/runtime/resourceTypeMergeStrategies.d.ts +0 -10
  173. package/web/runtime/resourceTypeMergeStrategies.d.ts.map +0 -1
  174. package/web/runtime/resourceTypeMergeStrategies.js +0 -19
  175. package/web/runtime/runtime.d.ts +0 -16
  176. package/web/runtime/runtime.d.ts.map +0 -1
  177. package/web/runtime/runtime.js +0 -28
  178. package/web/runtime/runtimeAtmosphereOnly.d.ts +0 -11
  179. package/web/runtime/runtimeAtmosphereOnly.d.ts.map +0 -1
  180. package/web/runtime/runtimeAtmosphereOnly.js +0 -28
  181. package/web/runtime/runtimeRegistry.shared.d.ts +0 -23
  182. package/web/runtime/runtimeRegistry.shared.d.ts.map +0 -1
  183. package/web/runtime/runtimeRegistry.shared.js +0 -47
  184. package/web/runtime/runtimeRegistryAtmosphereOnly.d.ts +0 -9
  185. package/web/runtime/runtimeRegistryAtmosphereOnly.d.ts.map +0 -1
  186. package/web/runtime/runtimeRegistryAtmosphereOnly.js +0 -13
  187. package/web/shared/constants.d.ts +0 -11
  188. package/web/shared/constants.d.ts.map +0 -1
  189. package/web/shared/constants.js +0 -11
  190. package/web/shared/index.d.ts +0 -3
  191. package/web/shared/index.d.ts.map +0 -1
  192. package/web/shared/performanceMetrics.d.ts +0 -48
  193. package/web/shared/performanceMetrics.d.ts.map +0 -1
  194. package/web/shared/performanceMetrics.js +0 -70
  195. package/web/shared/runtimeTypes.d.ts +0 -4
  196. package/web/shared/runtimeTypes.d.ts.map +0 -1
  197. /package/{web/consumer → consumer}/useRealTimeConsumer.d.ts +0 -0
@@ -1,5 +1,10 @@
1
- import { gclickRealtimeDummyPlaybackDriverHandle } from '../../../../../libs/observability/mf/src/index.ts';
2
- import { RealTimeResourceSerialId, SourceDataBase } from '@m4l/realtime-runtime';
1
+ import { RealTimeResourceSerialId, SourceDataBase } from '@m4l/realtime-runtime/shared';
2
+ declare const gclickRealtimeDummyPlaybackDriverHandle: Readonly<{
3
+ readonly id: "gclick-realtime.dummy-playback-driver";
4
+ readonly key: "globalThis.__M4L_TEST_DUMMY_PLAYBACK_DRIVER__";
5
+ readonly property: "__M4L_TEST_DUMMY_PLAYBACK_DRIVER__";
6
+ readonly purpose: "Expose the dummy realtime playback driver for deterministic probes and tests.";
7
+ }>;
3
8
  type DummyPlaybackDriverState = 'paused' | 'running' | 'stopped';
4
9
  type DummyPlaybackResumeOptions = {
5
10
  flushImmediately?: boolean;
@@ -65,4 +70,4 @@ export declare class SourceDataDummy extends SourceDataBase {
65
70
  stop(): void;
66
71
  }
67
72
  export default SourceDataDummy;
68
- //# sourceMappingURL=dummy.d.ts.map
73
+ //# sourceMappingURL=SourceDataDummy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SourceDataDummy.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/source-data/SourceDataDummy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AA+B9D,QAAA,MAAM,uCAAuC;;;;;EAKyC,CAAC;AAsBvF,KAAK,wBAAwB,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AASjE,KAAK,0BAA0B,GAAG;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,wBAAwB,CAAC;CAC5C,CAAC;AASF,KAAK,uBAAuB,GAAG;IAC7B,eAAe,EAAE,CACf,gBAAgB,EAAE,wBAAwB,KACvC,yBAAyB,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,MAAM,wBAAwB,CAAC;IACzC,KAAK,EAAE,MAAM,wBAAwB,CAAC;IACtC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,0BAA0B,KAAK,wBAAwB,CAAC;CAC5E,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB,CAAC,uCAAuC,CAAC,QAAQ,CAAC,CAAC,EACjD,uBAAuB,CAAC;KAC3B;CACF;AAicD;;GAEG;AACH,qBAAa,eAAgB,SAAQ,cAAc;IACjD,OAAO,CAAC,kBAAkB,CAAuD;IAEjF,OAAO,CAAC,gBAAgB,CAAS;IAEjC,OAAO,CAAC,eAAe,CAAqC;IAE5D;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAQ7B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAU9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAwB/B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IA+BjC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkC7B;;OAEG;IACH,OAAO,CAAC,aAAa;IASrB;;OAEG;IACH,OAAO,CAAC,cAAc;IAsBtB;;OAEG;IACH,KAAK,IAAI,IAAI;IAoDb;;OAEG;IACH,IAAI,IAAI,IAAI;CASb;AAED,eAAe,eAAe,CAAC"}
@@ -1,14 +1,12 @@
1
- import { gclickRealtimeDummyPlaybackDriverHandle as c } from "../../libs/observability/mf/src/browserRuntimeHandles.js";
2
- import "../../libs/observability/mf/src/diagnosticPolicies/catalog.js";
3
- import { SourceDataBase as E } from "@m4l/realtime-runtime";
4
- import { buildRealTimeDummyRuntimeModel as I } from "./simulation.js";
5
- import S from "../../node_modules/lodash-es/cloneDeep.js";
6
- const h = [
1
+ import { SourceDataBase as S } from "@m4l/realtime-runtime/shared";
2
+ import { buildRealTimeDummyRuntimeModel as R } from "../simulation/simulation.js";
3
+ import I from "../../node_modules/lodash-es/cloneDeep.js";
4
+ const k = [
7
5
  "gnssCourse",
8
6
  "gnssLatitude",
9
7
  "gnssLongitude",
10
8
  "gnssSpeed"
11
- ], k = [
9
+ ], b = [
12
10
  "adcPowerBackupLevel",
13
11
  "adcPowerBackupStatus",
14
12
  "adcPowerBackupVolt",
@@ -16,30 +14,35 @@ const h = [
16
14
  "adcPowerMainStatus",
17
15
  "adcPowerMainVolt",
18
16
  "adcPowerSrcMainBatteryType"
19
- ], d = globalThis;
20
- let v = null;
21
- function R() {
22
- return d[c.property] ? d[c.property] : (d[c.property] = {
17
+ ], p = Object.freeze({
18
+ id: "gclick-realtime.dummy-playback-driver",
19
+ key: "globalThis.__M4L_TEST_DUMMY_PLAYBACK_DRIVER__",
20
+ property: "__M4L_TEST_DUMMY_PLAYBACK_DRIVER__",
21
+ purpose: "Expose the dummy realtime playback driver for deterministic probes and tests."
22
+ }), d = globalThis;
23
+ let y = null;
24
+ function T() {
25
+ return d[p.property] || (d[p.property] = {
23
26
  getDeviceCursor(e) {
24
- return v?.getDeviceCursor(e) ?? null;
27
+ return y?.getDeviceCursor(e) ?? null;
25
28
  },
26
29
  getState() {
27
- return v?.getState() ?? "stopped";
30
+ return y?.getState() ?? "stopped";
28
31
  },
29
32
  /** Pauses the active dummy playback controller and returns its current state. */
30
33
  pause() {
31
- return v?.pause(), d[c.property]?.getState() ?? "stopped";
34
+ return y?.pause(), d[p.property]?.getState() ?? "stopped";
32
35
  },
33
36
  /** Resumes the active dummy playback controller with the given options and returns its current state. */
34
37
  resume(e) {
35
- return v?.resume(e), d[c.property]?.getState() ?? "stopped";
38
+ return y?.resume(e), d[p.property]?.getState() ?? "stopped";
36
39
  }
37
- }, d[c.property]);
40
+ }), d[p.property];
38
41
  }
39
42
  function g(e) {
40
- v = e, R();
43
+ y = e, T();
41
44
  }
42
- function o(e, t) {
45
+ function u(e, t) {
43
46
  return {
44
47
  updatedAtMs: t,
45
48
  value: e
@@ -48,122 +51,108 @@ function o(e, t) {
48
51
  function D(e) {
49
52
  return new Date(e).toISOString();
50
53
  }
51
- function y(e) {
54
+ function m(e) {
52
55
  return typeof e == "object" && e !== null && "value" in e;
53
56
  }
54
- function w(e, t) {
57
+ function M(e, t) {
55
58
  return {
56
59
  adcPowerByKey: Object.fromEntries(
57
- k.flatMap((s) => {
60
+ b.flatMap((s) => {
58
61
  const a = e.current.vpts?.vptAdcPower?.[s];
59
- return y(a) ? [[
62
+ return m(a) ? [[
60
63
  s,
61
- o(a.value, t)
64
+ u(a.value, t)
62
65
  ]] : [];
63
66
  })
64
67
  ),
65
68
  diXByKey: Object.fromEntries(
66
69
  Object.entries(e.current.vpts?.vptDiX ?? {}).map(([s, a]) => [
67
70
  s,
68
- o(a.diXValue?.value, t)
71
+ u(a.diXValue?.value, t)
69
72
  ])
70
73
  ),
71
74
  doXByKey: Object.fromEntries(
72
75
  Object.entries(e.current.vpts?.vptDoX ?? {}).map(([s, a]) => [
73
76
  s,
74
- o(a.diXValue?.value, t)
77
+ u(a.diXValue?.value, t)
75
78
  ])
76
79
  ),
77
80
  gnssByKey: Object.fromEntries(
78
- h.flatMap((s) => {
81
+ k.flatMap((s) => {
79
82
  const a = e.current.vpts?.vptGnss?.[s];
80
- return y(a) ? [[
83
+ return m(a) ? [[
81
84
  s,
82
- o(a.value, t)
85
+ u(a.value, t)
83
86
  ]] : [];
84
87
  })
85
88
  ),
86
- ignition: o(
89
+ ignition: u(
87
90
  e.current.vpts?.vptIgnition?.ignitionValue?.value,
88
91
  t
89
92
  ),
90
- motionStatus: o(
93
+ motionStatus: u(
91
94
  e.current.vpts?.vptGnss?.gnssMotionStatus?.value,
92
95
  t
93
96
  ),
94
- signal: o(
97
+ signal: u(
95
98
  e.current.vpts?.vptGnss?.gnssSignal?.value,
96
99
  t
97
100
  )
98
101
  };
99
102
  }
100
- function l(e, t, s) {
103
+ function c(e, t, s) {
101
104
  return e.value !== t && (e.value = t, e.updatedAtMs = s), D(e.updatedAtMs);
102
105
  }
103
- function P(e, t, s) {
106
+ function h(e, t, s) {
104
107
  const a = D(s);
105
- return e.reportProfiles?.generalEvents?.reportProfileLastEventDate && (e.reportProfiles.generalEvents.reportProfileLastEventDate = {
106
- ...e.reportProfiles.generalEvents.reportProfileLastEventDate,
107
- updatedAt: a,
108
- value: a
109
- }), e.reportProfiles?.generalEvents?.reportProfileLastEventId && (e.reportProfiles.generalEvents.reportProfileLastEventId = {
110
- ...e.reportProfiles.generalEvents.reportProfileLastEventId,
111
- updatedAt: a
112
- }), e.reportProfiles?.systemEvents?.reportProfileLastEventDate && (e.reportProfiles.systemEvents.reportProfileLastEventDate = {
113
- ...e.reportProfiles.systemEvents.reportProfileLastEventDate,
114
- updatedAt: a,
115
- value: a
116
- }), e.reportProfiles?.systemEvents?.reportProfileLastEventId && (e.reportProfiles.systemEvents.reportProfileLastEventId = {
117
- ...e.reportProfiles.systemEvents.reportProfileLastEventId,
118
- updatedAt: a
119
- }), Object.entries(e.vpts?.vptDiX ?? {}).forEach(([r, n]) => {
120
- const i = t.diXByKey[r] ?? o(n.diXValue?.value, s);
121
- t.diXByKey[r] = i, n.diXStatus && (n.diXStatus.updatedAt = l(
122
- i,
123
- n.diXValue?.value,
108
+ return Object.entries(e.vpts?.vptDiX ?? {}).forEach(([r, i]) => {
109
+ const n = t.diXByKey[r] ?? u(i.diXValue?.value, s);
110
+ t.diXByKey[r] = n, i.diXStatus && (i.diXStatus.updatedAt = c(
111
+ n,
112
+ i.diXValue?.value,
124
113
  s
125
- )), n.diXValue && (n.diXValue.updatedAt = l(
126
- i,
127
- n.diXValue.value,
114
+ )), i.diXValue && (i.diXValue.updatedAt = c(
115
+ n,
116
+ i.diXValue.value,
128
117
  s
129
118
  ));
130
- }), Object.entries(e.vpts?.vptDoX ?? {}).forEach(([r, n]) => {
131
- const i = t.doXByKey[r] ?? o(n.diXValue?.value, s);
132
- t.doXByKey[r] = i, n.diXValue && (n.diXValue.updatedAt = l(
133
- i,
134
- n.diXValue.value,
119
+ }), Object.entries(e.vpts?.vptDoX ?? {}).forEach(([r, i]) => {
120
+ const n = t.doXByKey[r] ?? u(i.diXValue?.value, s);
121
+ t.doXByKey[r] = n, i.diXValue && (i.diXValue.updatedAt = c(
122
+ n,
123
+ i.diXValue.value,
135
124
  s
136
125
  ));
137
- }), e.vpts?.vptGnss?.gnssMotionStatus && (e.vpts.vptGnss.gnssMotionStatus.updatedAt = l(
126
+ }), e.vpts?.vptGnss?.gnssMotionStatus && (e.vpts.vptGnss.gnssMotionStatus.updatedAt = c(
138
127
  t.motionStatus,
139
128
  e.vpts.vptGnss.gnssMotionStatus.value,
140
129
  s
141
- )), e.vpts?.vptGnss?.gnssSignal && (e.vpts.vptGnss.gnssSignal.updatedAt = l(
130
+ )), e.vpts?.vptGnss?.gnssSignal && (e.vpts.vptGnss.gnssSignal.updatedAt = c(
142
131
  t.signal,
143
132
  e.vpts.vptGnss.gnssSignal.value,
144
133
  s
145
- )), e.vpts?.vptIgnition?.ignitionValue && (e.vpts.vptIgnition.ignitionValue.updatedAt = l(
134
+ )), e.vpts?.vptIgnition?.ignitionValue && (e.vpts.vptIgnition.ignitionValue.updatedAt = c(
146
135
  t.ignition,
147
136
  e.vpts.vptIgnition.ignitionValue.value,
148
137
  s
149
- )), k.forEach((r) => {
150
- const n = e.vpts?.vptAdcPower?.[r];
151
- if (!y(n))
138
+ )), b.forEach((r) => {
139
+ const i = e.vpts?.vptAdcPower?.[r];
140
+ if (!m(i))
152
141
  return;
153
- const i = t.adcPowerByKey[r] ?? o(n.value, s);
154
- t.adcPowerByKey[r] = i, n.updatedAt = l(
155
- i,
156
- n.value,
142
+ const n = t.adcPowerByKey[r] ?? u(i.value, s);
143
+ t.adcPowerByKey[r] = n, i.updatedAt = c(
144
+ n,
145
+ i.value,
157
146
  s
158
147
  );
159
- }), h.forEach((r) => {
160
- const n = e.vpts?.vptGnss?.[r];
161
- if (!y(n))
148
+ }), k.forEach((r) => {
149
+ const i = e.vpts?.vptGnss?.[r];
150
+ if (!m(i))
162
151
  return;
163
- const i = t.gnssByKey[r] ?? o(n.value, s);
164
- t.gnssByKey[r] = i, n.updatedAt = l(
165
- i,
166
- n.value,
152
+ const n = t.gnssByKey[r] ?? u(i.value, s);
153
+ t.gnssByKey[r] = n, i.updatedAt = c(
154
+ n,
155
+ i.value,
167
156
  s
168
157
  );
169
158
  }), e.vpts?.vptNetwork && (e.vpts.vptNetwork.networkLastConnectionDate && (e.vpts.vptNetwork.networkLastConnectionDate = {
@@ -176,65 +165,65 @@ function P(e, t, s) {
176
165
  value: a
177
166
  })), e;
178
167
  }
179
- function T(e, t, s) {
168
+ function w(e, t, s) {
180
169
  if (e.type === "delete")
181
170
  return e;
182
171
  if (e.type === "new") {
183
172
  const a = e.payload;
184
- return P(a.current, t, s), e;
173
+ return h(a.current, t, s), e;
185
174
  }
186
- return P(
175
+ return h(
187
176
  e.payload.current,
188
177
  t,
189
178
  s
190
179
  ), e;
191
180
  }
192
- function f(e, t) {
181
+ function v(e, t) {
193
182
  return e.initialHashResources?.[t.resourceSerialId] ? t.initialMessageIndex : 0;
194
183
  }
195
- function x(e, t) {
184
+ function E(e, t) {
196
185
  return e.emissionOffsetMs <= 0 ? t : e.emissionOffsetMs;
197
186
  }
198
- function M(e, t, s, a, r) {
199
- const n = [];
200
- let i = s.get(t.resourceSerialId) ?? f(e, t);
201
- for (let u = 0; u < a; u += 1) {
202
- if (i >= t.messages.length) {
187
+ function _(e, t, s, a, r) {
188
+ const i = [];
189
+ let n = s.get(t.resourceSerialId) ?? v(e, t);
190
+ for (let o = 0; o < a; o += 1) {
191
+ if (n >= t.messages.length) {
203
192
  if (!r)
204
193
  break;
205
- i = 0;
194
+ n = 0;
206
195
  }
207
- const p = t.messages[i];
208
- if (!p)
196
+ const l = t.messages[n];
197
+ if (!l)
209
198
  break;
210
- n.push(S(p)), i += 1;
199
+ i.push(I(l)), n += 1;
211
200
  }
212
- return s.set(t.resourceSerialId, i), n;
201
+ return s.set(t.resourceSerialId, n), i;
213
202
  }
214
- function X(e, t) {
203
+ function x(e, t) {
215
204
  return e.every((s) => (t.get(s.resourceSerialId) ?? 0) >= s.messages.length);
216
205
  }
217
- function L(e, t, s, a, r, n, i) {
218
- const u = Date.now(), p = M(
206
+ function X(e, t, s, a, r, i, n) {
207
+ const o = Date.now(), l = _(
219
208
  e,
220
209
  t,
221
210
  s,
222
211
  r,
223
- n
212
+ i
224
213
  );
225
- if (p.length) {
226
- const m = a.get(t.resourceSerialId);
227
- i(
214
+ if (l.length) {
215
+ const f = a.get(t.resourceSerialId);
216
+ n(
228
217
  e.resourceTypeId,
229
- m ? p.map((b) => T(
230
- b,
231
- m,
232
- u
233
- )) : p
218
+ f ? l.map((P) => w(
219
+ P,
220
+ f,
221
+ o
222
+ )) : l
234
223
  );
235
224
  }
236
225
  }
237
- class G extends E {
226
+ class C extends S {
238
227
  deviceSchedulerIds = /* @__PURE__ */ new Map();
239
228
  isPlaybackPaused = !1;
240
229
  playbackRuntime = null;
@@ -261,7 +250,7 @@ class G extends E {
261
250
  const s = this.playbackRuntime.runtime.devices.find((a) => a.resourceSerialId === t);
262
251
  return s ? {
263
252
  messageCount: s.messages.length,
264
- nextMessageIndex: this.playbackRuntime.nextMessageIndexes.get(t) ?? f(this.playbackRuntime.config, s),
253
+ nextMessageIndex: this.playbackRuntime.nextMessageIndexes.get(t) ?? v(this.playbackRuntime.config, s),
265
254
  resourceSerialId: t
266
255
  } : null;
267
256
  }
@@ -272,13 +261,13 @@ class G extends E {
272
261
  const a = this.playbackRuntime;
273
262
  if (!a)
274
263
  return;
275
- const r = a.nextMessageIndexes.get(t.resourceSerialId) ?? f(a.config, t);
264
+ const r = a.nextMessageIndexes.get(t.resourceSerialId) ?? v(a.config, t);
276
265
  if (!a.runtime.playback.loop && r >= t.messages.length)
277
266
  return;
278
- const n = setTimeout(() => {
267
+ const i = setTimeout(() => {
279
268
  this.deviceSchedulerIds.delete(t.resourceSerialId), !(this.isPlaybackPaused || !this.playbackRuntime) && this.emitRuntimeDeviceTick(t);
280
269
  }, s);
281
- this.deviceSchedulerIds.set(t.resourceSerialId, n);
270
+ this.deviceSchedulerIds.set(t.resourceSerialId, i);
282
271
  }
283
272
  /**
284
273
  * Emit one runtime-device batch immediately and schedule the next cadence tick when needed.
@@ -286,7 +275,7 @@ class G extends E {
286
275
  emitRuntimeDeviceTick(t) {
287
276
  const s = this.playbackRuntime;
288
277
  if (s) {
289
- if (L(
278
+ if (X(
290
279
  s.config,
291
280
  t,
292
281
  s.nextMessageIndexes,
@@ -294,7 +283,7 @@ class G extends E {
294
283
  s.runtime.playback.framesPerTick,
295
284
  s.runtime.playback.loop,
296
285
  this.onMessages
297
- ), !s.runtime.playback.loop && X(
286
+ ), !s.runtime.playback.loop && x(
298
287
  s.runtime.devices,
299
288
  s.nextMessageIndexes
300
289
  )) {
@@ -336,17 +325,17 @@ class G extends E {
336
325
  */
337
326
  start() {
338
327
  this.stop();
339
- const t = this.config, s = t.wallClockStartAtMs ?? Date.now(), a = I(t.simulation, {
328
+ const t = this.config, s = t.wallClockStartAtMs ?? Date.now(), a = R(t.simulation, {
340
329
  resourceTypeId: t.resourceTypeId,
341
330
  wallClockStartAtMs: s
342
331
  }), r = new Map(
343
- a.devices.map((i) => [i.resourceSerialId, f(t, i)])
344
- ), n = new Map(
345
- a.devices.map((i) => {
346
- const u = t.initialHashResources?.[i.resourceSerialId] ?? i.initialResource;
332
+ a.devices.map((n) => [n.resourceSerialId, v(t, n)])
333
+ ), i = new Map(
334
+ a.devices.map((n) => {
335
+ const o = t.initialHashResources?.[n.resourceSerialId] ?? n.initialResource;
347
336
  return [
348
- i.resourceSerialId,
349
- w(u, s)
337
+ n.resourceSerialId,
338
+ M(o, s)
350
339
  ];
351
340
  })
352
341
  );
@@ -354,29 +343,29 @@ class G extends E {
354
343
  config: t,
355
344
  nextMessageIndexes: r,
356
345
  runtime: a,
357
- timestampStates: n
346
+ timestampStates: i
358
347
  }, g({
359
- getDeviceCursor: (i) => this.getPlaybackDeviceCursor(i),
348
+ getDeviceCursor: (n) => this.getPlaybackDeviceCursor(n),
360
349
  getState: () => this.getPlaybackDriverState(),
361
350
  pause: () => {
362
351
  this.pausePlayback();
363
352
  },
364
- resume: (i) => {
365
- this.resumePlayback(i);
353
+ resume: (n) => {
354
+ this.resumePlayback(n);
366
355
  }
367
- }), a.devices.forEach((i) => {
368
- const u = x(i, a.playback.intervalMs);
369
- this.scheduleRuntimeDeviceTick(i, u);
356
+ }), a.devices.forEach((n) => {
357
+ const o = E(n, a.playback.intervalMs);
358
+ this.scheduleRuntimeDeviceTick(n, o);
370
359
  });
371
360
  }
372
361
  /**
373
362
  * Stop the deterministic dummy playback loop.
374
363
  */
375
364
  stop() {
376
- this.clearDeviceSchedulers(), this.isPlaybackPaused = !1, this.playbackRuntime = null, v?.getState() !== "stopped" && g(null);
365
+ this.clearDeviceSchedulers(), this.isPlaybackPaused = !1, this.playbackRuntime = null, y?.getState() !== "stopped" && g(null);
377
366
  }
378
367
  }
379
368
  export {
380
- G as SourceDataDummy,
381
- G as default
369
+ C as SourceDataDummy,
370
+ C as default
382
371
  };
@@ -0,0 +1,4 @@
1
+ export * from './runtime/index';
2
+ export { createGClickRealtimeMobileResourceTypesConfig, createGClickRealtimeMobileResourceTypesKeySegment, createGClickRtAlarmsAtmosphereMobileResourceTypeConfig, createGClickRtDevicesAtmosphereMobileResourceTypeConfig, resolveGClickRealtimeAtmosphereHost, } from './resourceTypes';
3
+ export type { CreateGClickRtAlarmsAtmosphereMobileResourceTypeConfigProps, CreateGClickRtDevicesAtmosphereMobileResourceTypeConfigProps, GClickRealtimeAtmosphereMobileResourceTypeConfig, GClickRealtimeMobileAtmosphereConnectionConfig, GClickRtAlarmsAtmosphereMobileResourceTypeConfig, GClickRtDevicesAtmosphereMobileResourceTypeConfig, } from './resourceTypes';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/mobile/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,6CAA6C,EAC7C,iDAAiD,EACjD,sDAAsD,EACtD,uDAAuD,EACvD,mCAAmC,GACpC,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,2DAA2D,EAC3D,4DAA4D,EAC5D,gDAAgD,EAChD,8CAA8C,EAC9C,gDAAgD,EAChD,iDAAiD,GAClD,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { createGClickRealtimeMobileResourceTypesConfig as i, createGClickRealtimeMobileResourceTypesKeySegment as o, createGClickRtAlarmsAtmosphereMobileResourceTypeConfig as r, createGClickRtDevicesAtmosphereMobileResourceTypeConfig as l } from "./resourceTypes.js";
2
+ import { resolveGClickRealtimeAtmosphereHost as a } from "../shared/atmosphereHost.js";
3
+ import { createGClickAtmosphereRealtimeMobileRuntime as p } from "./runtime/atmosphere.js";
4
+ import { createGClickDummyRealtimeMobileRuntime as R } from "./runtime/dummy.js";
5
+ import { createGClickRealtimeMobileSourceDataFactory as n } from "./runtime/sourceDataFactory.js";
6
+ import { disposeGClickRealtimeMobileRuntime as k, getOrCreateGClickAtmosphereRealtimeMobileRuntime as G, getOrCreateGClickDummyRealtimeMobileRuntime as b } from "./runtime/runtimeRegistry.js";
7
+ import { disposeGClickRealtimeStartupSnapshots as y, replayGClickRealtimeStartupSnapshotsOnReconnect as M, replayGClickRealtimeStartupSnapshotsOnce as h } from "../shared/startupSnapshots.js";
8
+ export {
9
+ p as createGClickAtmosphereRealtimeMobileRuntime,
10
+ R as createGClickDummyRealtimeMobileRuntime,
11
+ i as createGClickRealtimeMobileResourceTypesConfig,
12
+ o as createGClickRealtimeMobileResourceTypesKeySegment,
13
+ n as createGClickRealtimeMobileSourceDataFactory,
14
+ r as createGClickRtAlarmsAtmosphereMobileResourceTypeConfig,
15
+ l as createGClickRtDevicesAtmosphereMobileResourceTypeConfig,
16
+ k as disposeGClickRealtimeMobileRuntime,
17
+ y as disposeGClickRealtimeStartupSnapshots,
18
+ G as getOrCreateGClickAtmosphereRealtimeMobileRuntime,
19
+ b as getOrCreateGClickDummyRealtimeMobileRuntime,
20
+ M as replayGClickRealtimeStartupSnapshotsOnReconnect,
21
+ h as replayGClickRealtimeStartupSnapshotsOnce,
22
+ a as resolveGClickRealtimeAtmosphereHost
23
+ };
@@ -0,0 +1,48 @@
1
+ import { RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfigAtmosphere } from '@m4l/realtime-runtime/mobile';
2
+ import { GCLICK_RT_ALARMS_ATMOSPHERE_CONSUMER_TYPE, GCLICK_RT_ALARMS_RESOURCE_TYPE_ID } from '../rt_alarms/index';
3
+ import { GCLICK_RT_DEVICES_RESOURCE_TYPE_ID } from '../rt_devices/index';
4
+ import { resolveGClickRealtimeAtmosphereHost } from '../shared/atmosphereHost';
5
+ export interface GClickRealtimeMobileAtmosphereConnectionConfig {
6
+ accountId: string;
7
+ database: string;
8
+ fallbackTransport?: RealTimeResourceSourceMechanismConfigAtmosphere['fallbackTransport'];
9
+ host: string;
10
+ path: string;
11
+ port?: string;
12
+ sessionId: string;
13
+ topic: string;
14
+ version?: RealTimeResourceSourceMechanismConfigAtmosphere['version'];
15
+ }
16
+ export interface CreateGClickRtDevicesAtmosphereMobileResourceTypeConfigProps extends GClickRealtimeMobileAtmosphereConnectionConfig {
17
+ resourcesId?: Array<RealTimeResourceSerialId | 'all'>;
18
+ }
19
+ export interface CreateGClickRtAlarmsAtmosphereMobileResourceTypeConfigProps extends GClickRealtimeMobileAtmosphereConnectionConfig {
20
+ resourcesId?: Array<RealTimeResourceSerialId | 'all'>;
21
+ }
22
+ export type GClickRtDevicesAtmosphereMobileResourceTypeConfig = RealTimeResourceSourceMechanismConfigAtmosphere & {
23
+ resourceTypeId: typeof GCLICK_RT_DEVICES_RESOURCE_TYPE_ID;
24
+ };
25
+ export type GClickRtAlarmsAtmosphereMobileResourceTypeConfig = RealTimeResourceSourceMechanismConfigAtmosphere & {
26
+ consumerType: typeof GCLICK_RT_ALARMS_ATMOSPHERE_CONSUMER_TYPE;
27
+ rateLimit: 1;
28
+ resourceTypeId: typeof GCLICK_RT_ALARMS_RESOURCE_TYPE_ID;
29
+ };
30
+ export type GClickRealtimeAtmosphereMobileResourceTypeConfig = GClickRtDevicesAtmosphereMobileResourceTypeConfig | GClickRtAlarmsAtmosphereMobileResourceTypeConfig;
31
+ /**
32
+ * Create the GClick mobile Atmosphere resource config for stateful device data.
33
+ */
34
+ export declare function createGClickRtDevicesAtmosphereMobileResourceTypeConfig(props: CreateGClickRtDevicesAtmosphereMobileResourceTypeConfigProps): GClickRtDevicesAtmosphereMobileResourceTypeConfig;
35
+ /**
36
+ * Create the GClick mobile Atmosphere resource config for alarm invalidation signals.
37
+ */
38
+ export declare function createGClickRtAlarmsAtmosphereMobileResourceTypeConfig(props: CreateGClickRtAlarmsAtmosphereMobileResourceTypeConfigProps): GClickRtAlarmsAtmosphereMobileResourceTypeConfig;
39
+ /**
40
+ * Create the default grouped GClick mobile Atmosphere resources used by Guardian.
41
+ */
42
+ export declare function createGClickRealtimeMobileResourceTypesConfig(props: GClickRealtimeMobileAtmosphereConnectionConfig): GClickRealtimeAtmosphereMobileResourceTypeConfig[];
43
+ /**
44
+ * Build the mobile resource-types signature used to partition cached GClick runtimes.
45
+ */
46
+ export declare function createGClickRealtimeMobileResourceTypesKeySegment(resourceTypes: GClickRealtimeAtmosphereMobileResourceTypeConfig[]): string;
47
+ export { resolveGClickRealtimeAtmosphereHost };
48
+ //# sourceMappingURL=resourceTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceTypes.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/mobile/resourceTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EACxB,+CAA+C,EAChD,MAAM,8BAA8B,CAAC;AAItC,OAAO,EACL,yCAAyC,EACzC,iCAAiC,EAClC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kCAAkC,EAEnC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mCAAmC,EAAE,MAAM,0BAA0B,CAAC;AAG/E,MAAM,WAAW,8CAA8C;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,+CAA+C,CAAC,mBAAmB,CAAC,CAAC;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,+CAA+C,CAAC,SAAS,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,4DACf,SAAQ,8CAA8C;IACtD,WAAW,CAAC,EAAE,KAAK,CAAC,wBAAwB,GAAG,KAAK,CAAC,CAAC;CACvD;AAED,MAAM,WAAW,2DACf,SAAQ,8CAA8C;IACtD,WAAW,CAAC,EAAE,KAAK,CAAC,wBAAwB,GAAG,KAAK,CAAC,CAAC;CACvD;AAED,MAAM,MAAM,iDAAiD,GAC3D,+CAA+C,GAAG;IAChD,cAAc,EAAE,OAAO,kCAAkC,CAAC;CAC3D,CAAC;AAEJ,MAAM,MAAM,gDAAgD,GAC1D,+CAA+C,GAAG;IAChD,YAAY,EAAE,OAAO,yCAAyC,CAAC;IAC/D,SAAS,EAAE,CAAC,CAAC;IACb,cAAc,EAAE,OAAO,iCAAiC,CAAC;CAC1D,CAAC;AAEJ,MAAM,MAAM,gDAAgD,GACxD,iDAAiD,GACjD,gDAAgD,CAAC;AA6CrD;;GAEG;AACH,wBAAgB,uDAAuD,CACrE,KAAK,EAAE,4DAA4D,GAClE,iDAAiD,CAQnD;AAED;;GAEG;AACH,wBAAgB,sDAAsD,CACpE,KAAK,EAAE,2DAA2D,GACjE,gDAAgD,CAQlD;AAED;;GAEG;AACH,wBAAgB,6CAA6C,CAC3D,KAAK,EAAE,8CAA8C,GACpD,gDAAgD,EAAE,CAKpD;AAED;;GAEG;AACH,wBAAgB,iDAAiD,CAC/D,aAAa,EAAE,gDAAgD,EAAE,UAGlE;AAED,OAAO,EAAE,mCAAmC,EAAE,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { mergeDevicePayloadWithUpdatedAtGuard as o } from "../payload/mergeDevicePayloadWithUpdatedAtGuard.js";
2
+ import { GCLICK_RT_ALARMS_RESOURCE_TYPE_ID as i, GCLICK_RT_ALARMS_ATMOSPHERE_CONSUMER_TYPE as a } from "../rt_alarms/constants.js";
3
+ import { normalizeGClickRtDevicesRealtimeMessage as c } from "../rt_devices/index.js";
4
+ import { resolveGClickRealtimeAtmosphereHost as g } from "../shared/atmosphereHost.js";
5
+ import { createGClickRealtimeResourceTypesKeySegment as s } from "../shared/runtimeResourceTypesKey.js";
6
+ import { GCLICK_RT_DEVICES_RESOURCE_TYPE_ID as n } from "../rt_devices/constants.js";
7
+ function r(e) {
8
+ const t = {
9
+ accountId: e.accountId,
10
+ database: e.database,
11
+ host: e.host,
12
+ initialHashResources: {},
13
+ path: e.path,
14
+ port: e.port ?? "wss",
15
+ sessionId: e.sessionId,
16
+ sourceDataMechanism: "atmosphere",
17
+ topic: e.topic
18
+ };
19
+ return e.fallbackTransport && (t.fallbackTransport = e.fallbackTransport), e.version !== void 0 && (t.version = e.version), t;
20
+ }
21
+ function l(e) {
22
+ return {
23
+ ...r(e),
24
+ mergePayloadStrategy: o,
25
+ normalizeMessageStrategy: c,
26
+ resourceTypeId: n,
27
+ resourcesId: e.resourcesId ?? ["all"]
28
+ };
29
+ }
30
+ function m(e) {
31
+ return {
32
+ ...r(e),
33
+ consumerType: a,
34
+ rateLimit: 1,
35
+ resourceTypeId: i,
36
+ resourcesId: e.resourcesId ?? ["all"]
37
+ };
38
+ }
39
+ function T(e) {
40
+ return [
41
+ l(e),
42
+ m(e)
43
+ ];
44
+ }
45
+ function I(e) {
46
+ return s(e);
47
+ }
48
+ export {
49
+ T as createGClickRealtimeMobileResourceTypesConfig,
50
+ I as createGClickRealtimeMobileResourceTypesKeySegment,
51
+ m as createGClickRtAlarmsAtmosphereMobileResourceTypeConfig,
52
+ l as createGClickRtDevicesAtmosphereMobileResourceTypeConfig,
53
+ g as resolveGClickRealtimeAtmosphereHost
54
+ };
@@ -0,0 +1,10 @@
1
+ import { CreateRealtimeMobileRuntimeProps, RealTimeResourceSourceMechanismConfigAtmosphere, RealtimeMobileRuntime } from '@m4l/realtime-runtime/mobile';
2
+ export type GClickRealtimeMobileRuntime = RealtimeMobileRuntime;
3
+ export type CreateGClickAtmosphereRealtimeMobileRuntimeProps = Omit<CreateRealtimeMobileRuntimeProps<RealTimeResourceSourceMechanismConfigAtmosphere>, 'createSourceData' | 'resourceTypesConfig'> & {
4
+ resourceTypesConfig: RealTimeResourceSourceMechanismConfigAtmosphere[];
5
+ };
6
+ /**
7
+ * Create the GClick mobile runtime backed only by Atmosphere source configs.
8
+ */
9
+ export declare function createGClickAtmosphereRealtimeMobileRuntime(props: CreateGClickAtmosphereRealtimeMobileRuntimeProps): GClickRealtimeMobileRuntime;
10
+ //# sourceMappingURL=atmosphere.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atmosphere.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/mobile/runtime/atmosphere.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,+CAA+C,EAC/C,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AAStC,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AAEhE,MAAM,MAAM,gDAAgD,GAAG,IAAI,CACjE,gCAAgC,CAAC,+CAA+C,CAAC,EACjF,kBAAkB,GAAG,qBAAqB,CAC3C,GAAG;IACF,mBAAmB,EAAE,+CAA+C,EAAE,CAAC;CACxE,CAAC;AAEF;;GAEG;AACH,wBAAgB,2CAA2C,CACzD,KAAK,EAAE,gDAAgD,GACtD,2BAA2B,CAU7B"}
@@ -0,0 +1,16 @@
1
+ import { createRealtimeMobileRuntime as t } from "@m4l/realtime-runtime/mobile";
2
+ import { withGClickResourceTypeMergeStrategies as o } from "../../rt_devices/resourceTypeMergeStrategies.js";
3
+ import { createGClickRealtimeMobileSourceDataFactory as i } from "./sourceDataFactory.js";
4
+ function l(e) {
5
+ const r = o(
6
+ e.resourceTypesConfig
7
+ );
8
+ return t({
9
+ ...e,
10
+ createSourceData: i(),
11
+ resourceTypesConfig: r
12
+ });
13
+ }
14
+ export {
15
+ l as createGClickAtmosphereRealtimeMobileRuntime
16
+ };
@@ -0,0 +1,11 @@
1
+ import { CreateRealtimeMobileRuntimeProps } from '@m4l/realtime-runtime/mobile';
2
+ import { RealTimeResourceSourceMechanismConfigDummy } from '../../dummy/index';
3
+ import { GClickRealtimeMobileRuntime } from './atmosphere';
4
+ export type CreateGClickDummyRealtimeMobileRuntimeProps = Omit<CreateRealtimeMobileRuntimeProps<RealTimeResourceSourceMechanismConfigDummy>, 'createSourceData' | 'resourceTypesConfig'> & {
5
+ resourceTypesConfig: RealTimeResourceSourceMechanismConfigDummy[];
6
+ };
7
+ /**
8
+ * Create one auxiliary GClick mobile runtime backed only by dummy source configs.
9
+ */
10
+ export declare function createGClickDummyRealtimeMobileRuntime(props: CreateGClickDummyRealtimeMobileRuntimeProps): GClickRealtimeMobileRuntime;
11
+ //# sourceMappingURL=dummy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dummy.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/mobile/runtime/dummy.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,0CAA0C,EAC3C,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAGhE,MAAM,MAAM,2CAA2C,GAAG,IAAI,CAC5D,gCAAgC,CAAC,0CAA0C,CAAC,EAC5E,kBAAkB,GAAG,qBAAqB,CAC3C,GAAG;IACF,mBAAmB,EAAE,0CAA0C,EAAE,CAAC;CACnE,CAAC;AAEF;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,KAAK,EAAE,2CAA2C,GACjD,2BAA2B,CAU7B"}