@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.
- package/consumer/RealTimeConsumerContext.d.ts +10 -0
- package/consumer/RealTimeConsumerContext.d.ts.map +1 -0
- package/consumer/RealTimeConsumerContext.js +128 -0
- package/consumer/index.d.ts +4 -0
- package/consumer/index.d.ts.map +1 -0
- package/consumer/index.js +7 -0
- package/consumer/types.d.ts +47 -0
- package/consumer/types.d.ts.map +1 -0
- package/consumer/useRealTimeConsumer.d.ts.map +1 -0
- package/{web/consumer → consumer}/useRealTimeConsumer.js +2 -2
- package/contracts/deviceData.d.ts +19 -22
- package/contracts/deviceData.d.ts.map +1 -1
- package/contracts/deviceDetail.d.ts +0 -2
- package/contracts/deviceDetail.d.ts.map +1 -1
- package/contracts/index.d.ts +1 -1
- package/contracts/index.d.ts.map +1 -1
- package/dummy/catalogs/baseDeviceTemplate.d.ts.map +1 -1
- package/dummy/catalogs/baseDeviceTemplate.js +4 -35
- package/dummy/catalogs/blueprints.d.ts +9 -54
- package/dummy/catalogs/blueprints.d.ts.map +1 -1
- package/dummy/catalogs/blueprints.js +25 -42
- package/dummy/catalogs/departments.d.ts +10 -0
- package/dummy/catalogs/departments.d.ts.map +1 -0
- package/dummy/catalogs/departments.js +43 -0
- package/dummy/index.d.ts +3 -3
- package/dummy/index.d.ts.map +1 -1
- package/dummy/index.js +28 -28
- package/dummy/shared/types.d.ts +2 -4
- package/dummy/shared/types.d.ts.map +1 -1
- package/dummy/{runtime → simulation}/simulation.d.ts +1 -1
- package/dummy/simulation/simulation.d.ts.map +1 -0
- package/dummy/{runtime → simulation}/simulation.js +333 -423
- package/dummy/{runtime/dummy.d.ts → source-data/SourceDataDummy.d.ts} +8 -3
- package/dummy/source-data/SourceDataDummy.d.ts.map +1 -0
- package/dummy/{runtime/dummy.js → source-data/SourceDataDummy.js} +117 -128
- package/mobile/index.d.ts +4 -0
- package/mobile/index.d.ts.map +1 -0
- package/mobile/index.js +23 -0
- package/mobile/resourceTypes.d.ts +48 -0
- package/mobile/resourceTypes.d.ts.map +1 -0
- package/mobile/resourceTypes.js +54 -0
- package/mobile/runtime/atmosphere.d.ts +10 -0
- package/mobile/runtime/atmosphere.d.ts.map +1 -0
- package/mobile/runtime/atmosphere.js +16 -0
- package/mobile/runtime/dummy.d.ts +11 -0
- package/mobile/runtime/dummy.d.ts.map +1 -0
- package/mobile/runtime/dummy.js +16 -0
- package/mobile/runtime/index.d.ts +11 -0
- package/mobile/runtime/index.d.ts.map +1 -0
- package/mobile/runtime/runtimeRegistry.d.ts +17 -0
- package/mobile/runtime/runtimeRegistry.d.ts.map +1 -0
- package/mobile/runtime/runtimeRegistry.js +24 -0
- package/mobile/runtime/sourceDataFactory.d.ts +6 -0
- package/mobile/runtime/sourceDataFactory.d.ts.map +1 -0
- package/mobile/runtime/sourceDataFactory.js +29 -0
- package/mobile/runtime/types.d.ts +8 -0
- package/mobile/runtime/types.d.ts.map +1 -0
- package/package.json +37 -1
- package/payload/mergeDevicePayloadWithUpdatedAtGuard.d.ts +1 -1
- package/payload/mergeDevicePayloadWithUpdatedAtGuard.d.ts.map +1 -1
- package/rt_alarms/constants.d.ts +6 -0
- package/rt_alarms/constants.d.ts.map +1 -0
- package/rt_alarms/constants.js +7 -0
- package/rt_alarms/index.d.ts +15 -0
- package/rt_alarms/index.d.ts.map +1 -0
- package/rt_alarms/index.js +18 -0
- package/rt_devices/constants.d.ts +4 -0
- package/rt_devices/constants.d.ts.map +1 -0
- package/rt_devices/constants.js +5 -0
- package/rt_devices/index.d.ts +22 -0
- package/rt_devices/index.d.ts.map +1 -0
- package/rt_devices/index.js +150 -0
- package/rt_devices/resourceTypeMergeStrategies.d.ts +12 -0
- package/rt_devices/resourceTypeMergeStrategies.d.ts.map +1 -0
- package/rt_devices/resourceTypeMergeStrategies.js +19 -0
- package/shared/atmosphereHost.d.ts +5 -0
- package/shared/atmosphereHost.d.ts.map +1 -0
- package/shared/atmosphereHost.js +7 -0
- package/shared/index.d.ts +5 -0
- package/shared/index.d.ts.map +1 -0
- package/shared/index.js +11 -0
- package/shared/performanceMetrics.d.ts +64 -0
- package/shared/performanceMetrics.d.ts.map +1 -0
- package/shared/performanceMetrics.js +73 -0
- package/shared/runtimeRegistry.d.ts +17 -0
- package/shared/runtimeRegistry.d.ts.map +1 -0
- package/shared/runtimeRegistry.js +27 -0
- package/shared/runtimeResourceTypesKey.d.ts +14 -0
- package/shared/runtimeResourceTypesKey.d.ts.map +1 -0
- package/shared/runtimeResourceTypesKey.js +18 -0
- package/shared/startupSnapshots.d.ts +28 -0
- package/shared/startupSnapshots.d.ts.map +1 -0
- package/shared/startupSnapshots.js +29 -0
- package/web/diagnostics/performanceMetrics.d.ts +34 -0
- package/web/diagnostics/performanceMetrics.d.ts.map +1 -0
- package/web/diagnostics/performanceMetrics.js +61 -0
- package/web/host/devicesResourceType.d.ts +3 -11
- package/web/host/devicesResourceType.d.ts.map +1 -1
- package/web/host/devicesResourceType.js +58 -171
- package/web/host/hostRuntime.d.ts +6 -8
- package/web/host/hostRuntime.d.ts.map +1 -1
- package/web/host/hostRuntime.js +29 -38
- package/web/host/index.d.ts +2 -2
- package/web/host/index.d.ts.map +1 -1
- package/web/host/launchContract.d.ts +19 -13
- package/web/host/launchContract.d.ts.map +1 -1
- package/web/host/launchContract.js +82 -76
- package/web/index.d.ts +2 -7
- package/web/index.d.ts.map +1 -1
- package/web/index.js +34 -62
- package/web/runtime/atmosphere.d.ts +12 -0
- package/web/runtime/atmosphere.d.ts.map +1 -0
- package/web/runtime/atmosphere.js +22 -0
- package/web/runtime/dummy.d.ts +11 -0
- package/web/runtime/dummy.d.ts.map +1 -0
- package/web/runtime/dummy.js +22 -0
- package/web/runtime/index.d.ts +8 -9
- package/web/runtime/index.d.ts.map +1 -1
- package/web/runtime/performanceMetricReporter.d.ts +8 -0
- package/web/runtime/performanceMetricReporter.d.ts.map +1 -0
- package/web/runtime/performanceMetricReporter.js +10 -0
- package/web/runtime/runtimeRegistry.d.ts +21 -5
- package/web/runtime/runtimeRegistry.d.ts.map +1 -1
- package/web/runtime/runtimeRegistry.js +22 -7
- package/web/runtime/sourceDataFactory.d.ts +7 -0
- package/web/runtime/sourceDataFactory.d.ts.map +1 -0
- package/web/runtime/sourceDataFactory.js +26 -0
- package/web/{producer → runtime}/types.d.ts +2 -7
- package/web/runtime/types.d.ts.map +1 -0
- package/dummy/catalogs/group.d.ts +0 -10
- package/dummy/catalogs/group.d.ts.map +0 -1
- package/dummy/catalogs/group.js +0 -46
- package/dummy/runtime/dummy.d.ts.map +0 -1
- package/dummy/runtime/simulation.d.ts.map +0 -1
- package/libs/observability/mf/src/browserRuntimeHandles.js +0 -350
- package/libs/observability/mf/src/diagnosticPolicies/catalog.js +0 -12
- package/libs/observability/mf/src/diagnosticPolicies/contracts.js +0 -8
- package/libs/observability/mf/src/diagnosticPolicies/host.js +0 -127
- package/libs/observability/mf/src/diagnosticPolicies/operativeMyGpsDevices.js +0 -79
- package/web/consumer/RealTimeConsumerContext.d.ts +0 -10
- package/web/consumer/RealTimeConsumerContext.d.ts.map +0 -1
- package/web/consumer/RealTimeConsumerContext.js +0 -156
- package/web/consumer/index.d.ts +0 -6
- package/web/consumer/index.d.ts.map +0 -1
- package/web/consumer/store.d.ts +0 -10
- package/web/consumer/store.d.ts.map +0 -1
- package/web/consumer/store.helpers.d.ts +0 -62
- package/web/consumer/store.helpers.d.ts.map +0 -1
- package/web/consumer/store.helpers.js +0 -141
- package/web/consumer/store.js +0 -227
- package/web/consumer/types.d.ts +0 -161
- package/web/consumer/types.d.ts.map +0 -1
- package/web/consumer/useRealTimeConsumer.d.ts.map +0 -1
- package/web/host/startupSnapshots.d.ts +0 -45
- package/web/host/startupSnapshots.d.ts.map +0 -1
- package/web/host/startupSnapshots.js +0 -103
- package/web/producer/RealTimeProducerContext.d.ts +0 -9
- package/web/producer/RealTimeProducerContext.d.ts.map +0 -1
- package/web/producer/RealTimeProducerContext.js +0 -16
- package/web/producer/index.d.ts +0 -7
- package/web/producer/index.d.ts.map +0 -1
- package/web/producer/sourceDataFactory.d.ts +0 -13
- package/web/producer/sourceDataFactory.d.ts.map +0 -1
- package/web/producer/sourceDataFactory.js +0 -32
- package/web/producer/store.d.ts +0 -7
- package/web/producer/store.d.ts.map +0 -1
- package/web/producer/store.js +0 -5
- package/web/producer/types.d.ts.map +0 -1
- package/web/producer/useRealTimeProducer.d.ts +0 -7
- package/web/producer/useRealTimeProducer.d.ts.map +0 -1
- package/web/producer/useRealTimeProducer.js +0 -15
- package/web/runtime/resourceTypeMergeStrategies.d.ts +0 -10
- package/web/runtime/resourceTypeMergeStrategies.d.ts.map +0 -1
- package/web/runtime/resourceTypeMergeStrategies.js +0 -19
- package/web/runtime/runtime.d.ts +0 -16
- package/web/runtime/runtime.d.ts.map +0 -1
- package/web/runtime/runtime.js +0 -28
- package/web/runtime/runtimeAtmosphereOnly.d.ts +0 -11
- package/web/runtime/runtimeAtmosphereOnly.d.ts.map +0 -1
- package/web/runtime/runtimeAtmosphereOnly.js +0 -28
- package/web/runtime/runtimeRegistry.shared.d.ts +0 -23
- package/web/runtime/runtimeRegistry.shared.d.ts.map +0 -1
- package/web/runtime/runtimeRegistry.shared.js +0 -47
- package/web/runtime/runtimeRegistryAtmosphereOnly.d.ts +0 -9
- package/web/runtime/runtimeRegistryAtmosphereOnly.d.ts.map +0 -1
- package/web/runtime/runtimeRegistryAtmosphereOnly.js +0 -13
- package/web/shared/constants.d.ts +0 -11
- package/web/shared/constants.d.ts.map +0 -1
- package/web/shared/constants.js +0 -11
- package/web/shared/index.d.ts +0 -3
- package/web/shared/index.d.ts.map +0 -1
- package/web/shared/performanceMetrics.d.ts +0 -48
- package/web/shared/performanceMetrics.d.ts.map +0 -1
- package/web/shared/performanceMetrics.js +0 -70
- package/web/shared/runtimeTypes.d.ts +0 -4
- package/web/shared/runtimeTypes.d.ts.map +0 -1
- /package/{web/consumer → consumer}/useRealTimeConsumer.d.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RealTimeConsumerProviderProps } from './types';
|
|
2
|
+
declare const RealTimeConsumerContext: import('react').Context<(Omit<import('zustand').StoreApi<import('@m4l/realtime-runtime/consumer').RealTimeConsumerStoreStateWithActions>, "setState"> & {
|
|
3
|
+
setState(nextStateOrUpdater: import('@m4l/realtime-runtime/consumer').RealTimeConsumerStoreStateWithActions | Partial<import('@m4l/realtime-runtime/consumer').RealTimeConsumerStoreStateWithActions> | ((state: import('immer/dist/internal.js').WritableDraft<import('@m4l/realtime-runtime/consumer').RealTimeConsumerStoreStateWithActions>) => void), shouldReplace?: boolean | undefined): void;
|
|
4
|
+
}) | null>;
|
|
5
|
+
/**
|
|
6
|
+
* Bind one cross-platform GClick realtime consumer store to explicit producer tools.
|
|
7
|
+
*/
|
|
8
|
+
declare function RealTimeConsumerProvider(props: RealTimeConsumerProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { RealTimeConsumerProvider, RealTimeConsumerContext };
|
|
10
|
+
//# sourceMappingURL=RealTimeConsumerContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RealTimeConsumerContext.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/consumer/RealTimeConsumerContext.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D,QAAA,MAAM,uBAAuB;;UAE5B,CAAC;AAkFF;;GAEG;AACH,iBAAS,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,2CA0HrE;AAED,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { j as S } from "../_virtual/jsx-runtime.js";
|
|
2
|
+
import { r as n } from "../_virtual/index.js";
|
|
3
|
+
import { createRealTimeConsumerStore as g, bindRealTimeConsumerResourceSubscriptions as E } from "@m4l/realtime-runtime/consumer";
|
|
4
|
+
const x = n.createContext(
|
|
5
|
+
null
|
|
6
|
+
);
|
|
7
|
+
function P(o) {
|
|
8
|
+
return o.reduce(
|
|
9
|
+
(e, r) => (r.hasResourcesDecorators?.length && (e[r.resourceTypeId] = r.hasResourcesDecorators), e),
|
|
10
|
+
{}
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
function D(o) {
|
|
14
|
+
return o.reduce(
|
|
15
|
+
(e, r) => {
|
|
16
|
+
const { messageProjector: d, resourceTypeId: a, snapshotProjector: c, storeMode: i } = r;
|
|
17
|
+
return !i && !d && !c || (e[a] = {
|
|
18
|
+
mode: i,
|
|
19
|
+
messageProjector: d,
|
|
20
|
+
snapshotProjector: c
|
|
21
|
+
}), e;
|
|
22
|
+
},
|
|
23
|
+
{}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
function j(o) {
|
|
27
|
+
const e = o.trim();
|
|
28
|
+
if (!e)
|
|
29
|
+
throw new Error(
|
|
30
|
+
"RealTimeConsumerProvider requires a non-empty consumerId."
|
|
31
|
+
);
|
|
32
|
+
return e;
|
|
33
|
+
}
|
|
34
|
+
function H(o, e) {
|
|
35
|
+
e.forEach((r) => {
|
|
36
|
+
r.storeMode !== "callbacks-only" && o.getState().realTimeConsumerActions.loadResourceType(
|
|
37
|
+
r.resourceTypeId,
|
|
38
|
+
{}
|
|
39
|
+
);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function z(o) {
|
|
43
|
+
const {
|
|
44
|
+
children: e,
|
|
45
|
+
clearResourcesOnProducerUnavailable: r = !0,
|
|
46
|
+
consumerId: d,
|
|
47
|
+
onConsumerStoreCountChange: a,
|
|
48
|
+
onPerformanceMetric: c,
|
|
49
|
+
onSubscriptionCountChange: i,
|
|
50
|
+
onTransportReconnectCallbacks: l = [],
|
|
51
|
+
producerTools: s,
|
|
52
|
+
resourceSubscriptions: t,
|
|
53
|
+
storeDevtoolsEnabled: C = !1,
|
|
54
|
+
...T
|
|
55
|
+
} = o, p = j(d), u = n.useRef(null), I = n.useRef(p), h = n.useRef(
|
|
56
|
+
`${p}:transport-reconnect`
|
|
57
|
+
), m = I.current, f = h.current, y = n.useMemo(
|
|
58
|
+
() => P(t),
|
|
59
|
+
[t]
|
|
60
|
+
), b = n.useMemo(
|
|
61
|
+
() => D(t),
|
|
62
|
+
[t]
|
|
63
|
+
);
|
|
64
|
+
return u.current || (u.current = g(
|
|
65
|
+
{
|
|
66
|
+
...T,
|
|
67
|
+
storeId: m,
|
|
68
|
+
hasResourcesTypesDecorators: y,
|
|
69
|
+
hasResourcesTypesStoreConfig: b
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
onPerformanceMetric: c,
|
|
73
|
+
storeDevtoolsEnabled: C
|
|
74
|
+
}
|
|
75
|
+
)), n.useEffect(() => (a?.(1), () => {
|
|
76
|
+
a?.(-1);
|
|
77
|
+
}), [a]), n.useEffect(() => {
|
|
78
|
+
if (!u.current)
|
|
79
|
+
return;
|
|
80
|
+
if (!s) {
|
|
81
|
+
r && H(
|
|
82
|
+
u.current,
|
|
83
|
+
t
|
|
84
|
+
);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const R = E({
|
|
88
|
+
consumerId: m,
|
|
89
|
+
consumerStore: u.current,
|
|
90
|
+
onPerformanceMetric: c,
|
|
91
|
+
onSubscriptionCountChange: i,
|
|
92
|
+
producerTools: s,
|
|
93
|
+
resourceSubscriptions: t
|
|
94
|
+
});
|
|
95
|
+
return () => {
|
|
96
|
+
R.dispose();
|
|
97
|
+
};
|
|
98
|
+
}, [
|
|
99
|
+
r,
|
|
100
|
+
c,
|
|
101
|
+
i,
|
|
102
|
+
s,
|
|
103
|
+
t,
|
|
104
|
+
m
|
|
105
|
+
]), n.useEffect(() => {
|
|
106
|
+
if (!(!s || l.length === 0))
|
|
107
|
+
return s.subscribeTransportReconnect({
|
|
108
|
+
clientId: f,
|
|
109
|
+
onReconnectCallback: (R) => {
|
|
110
|
+
l.forEach((v) => {
|
|
111
|
+
v(R);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}), () => {
|
|
115
|
+
s.unsubscribeTransportReconnect(
|
|
116
|
+
f
|
|
117
|
+
);
|
|
118
|
+
};
|
|
119
|
+
}, [
|
|
120
|
+
l,
|
|
121
|
+
s,
|
|
122
|
+
f
|
|
123
|
+
]), /* @__PURE__ */ S.jsx(x.Provider, { value: u.current, children: e });
|
|
124
|
+
}
|
|
125
|
+
export {
|
|
126
|
+
x as RealTimeConsumerContext,
|
|
127
|
+
z as RealTimeConsumerProvider
|
|
128
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { RealTimeConsumerContext, RealTimeConsumerProvider, } from './RealTimeConsumerContext';
|
|
2
|
+
export { useRealTimeConsumer } from './useRealTimeConsumer';
|
|
3
|
+
export type { BindRealTimeConsumerResourceSubscriptionsOptions, BindRealTimeConsumerResourceSubscriptionsProps, CreateRealTimeConsumerStoreOptions, InitialRealTimeConsumerStoreProps, OnRealTimeConsumerMetricCallback, OnRealTimeConsumerSubscriptionCountChangeCallback, RealTimeConsumer, RealTimeConsumerMutableResourceHash, RealTimeConsumerMessageProjector, RealTimeConsumerMessageProjectorContext, RealTimeConsumerMessageQueueManager, RealTimeConsumerMetricName, RealTimeConsumerProviderProps, RealTimeConsumerResourceStoreConfig, RealTimeConsumerResourceSubscriptionsBinding, RealTimeConsumerResourceSubscription, RealTimeConsumerStoreApi, RealTimeConsumerSnapshotProjector, RealTimeConsumerStoreMode, RealTimeConsumerStoreState, RealTimeConsumerStoreStateWithActions, RealTimeMessageDecorator, } from './types';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/consumer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EACV,gDAAgD,EAChD,8CAA8C,EAC9C,kCAAkC,EAClC,iCAAiC,EACjC,gCAAgC,EAChC,iDAAiD,EACjD,gBAAgB,EAChB,mCAAmC,EACnC,gCAAgC,EAChC,uCAAuC,EACvC,mCAAmC,EACnC,0BAA0B,EAC1B,6BAA6B,EAC7B,mCAAmC,EACnC,4CAA4C,EAC5C,oCAAoC,EACpC,wBAAwB,EACxB,iCAAiC,EACjC,yBAAyB,EACzB,0BAA0B,EAC1B,qCAAqC,EACrC,wBAAwB,GACzB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RealTimeConsumerContext as r, RealTimeConsumerProvider as m } from "./RealTimeConsumerContext.js";
|
|
2
|
+
import { useRealTimeConsumer as n } from "./useRealTimeConsumer.js";
|
|
3
|
+
export {
|
|
4
|
+
r as RealTimeConsumerContext,
|
|
5
|
+
m as RealTimeConsumerProvider,
|
|
6
|
+
n as useRealTimeConsumer
|
|
7
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { InitialRealTimeConsumerStoreProps, OnRealTimeConsumerMetricCallback, OnRealTimeConsumerSubscriptionCountChangeCallback, RealTimeConsumerResourceSubscription } from '@m4l/realtime-runtime/consumer';
|
|
3
|
+
import { OnRealTimeTransportReconnectCallback, RealTimeProducerTools } from '@m4l/realtime-runtime/shared';
|
|
4
|
+
export type { BindRealTimeConsumerResourceSubscriptionsOptions, BindRealTimeConsumerResourceSubscriptionsProps, CreateRealTimeConsumerStoreOptions, InitialRealTimeConsumerStoreProps, OnRealTimeConsumerMetricCallback, OnRealTimeConsumerSubscriptionCountChangeCallback, RealTimeConsumer, RealTimeConsumerMutableResourceHash, RealTimeConsumerMessageProjector, RealTimeConsumerMessageProjectorContext, RealTimeConsumerMessageQueueManager, RealTimeConsumerMetricName, RealTimeConsumerResourceStoreConfig, RealTimeConsumerResourceSubscriptionsBinding, RealTimeConsumerResourceSubscription, RealTimeConsumerStoreApi, RealTimeConsumerSnapshotProjector, RealTimeConsumerStoreMode, RealTimeConsumerStoreState, RealTimeConsumerStoreStateWithActions, RealTimeMessageDecorator, } from '@m4l/realtime-runtime/consumer';
|
|
5
|
+
/**
|
|
6
|
+
* Cross-platform React provider props for one mounted GClick realtime consumer.
|
|
7
|
+
*/
|
|
8
|
+
export interface RealTimeConsumerProviderProps extends Omit<InitialRealTimeConsumerStoreProps, 'storeId' | 'hasResourcesTypesDecorators' | 'hasResourcesTypesStoreConfig'> {
|
|
9
|
+
/**
|
|
10
|
+
* Consumer identifier used to scope the local store and producer subscription.
|
|
11
|
+
*/
|
|
12
|
+
consumerId: string;
|
|
13
|
+
/**
|
|
14
|
+
* Runtime-owned producer tools used to subscribe and unsubscribe without reading a platform-specific context.
|
|
15
|
+
*/
|
|
16
|
+
producerTools: RealTimeProducerTools | null;
|
|
17
|
+
/**
|
|
18
|
+
* Declarative resource subscriptions owned by this consumer.
|
|
19
|
+
*/
|
|
20
|
+
resourceSubscriptions: RealTimeConsumerResourceSubscription[];
|
|
21
|
+
/**
|
|
22
|
+
* Enable the local Zustand devtools integration for this consumer store.
|
|
23
|
+
*/
|
|
24
|
+
storeDevtoolsEnabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Clear hydrated resource buckets while producer tools are unavailable.
|
|
27
|
+
*/
|
|
28
|
+
clearResourcesOnProducerUnavailable?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Optional low-cardinality metric sink owned by the platform adapter.
|
|
31
|
+
*/
|
|
32
|
+
onPerformanceMetric?: OnRealTimeConsumerMetricCallback;
|
|
33
|
+
/**
|
|
34
|
+
* Optional callback emitted when this provider mounts or unmounts its consumer store.
|
|
35
|
+
*/
|
|
36
|
+
onConsumerStoreCountChange?: OnRealTimeConsumerSubscriptionCountChangeCallback;
|
|
37
|
+
/**
|
|
38
|
+
* Optional callback emitted when a resource subscription is added or removed.
|
|
39
|
+
*/
|
|
40
|
+
onSubscriptionCountChange?: OnRealTimeConsumerSubscriptionCountChangeCallback;
|
|
41
|
+
/**
|
|
42
|
+
* Optional side effects fired when the shared transport recovers after a reconnect.
|
|
43
|
+
*/
|
|
44
|
+
onTransportReconnectCallbacks?: OnRealTimeTransportReconnectCallback[];
|
|
45
|
+
children: ReactNode;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/consumer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,iCAAiC,EACjC,gCAAgC,EAChC,iDAAiD,EACjD,oCAAoC,EACrC,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,oCAAoC,EACpC,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EACV,gDAAgD,EAChD,8CAA8C,EAC9C,kCAAkC,EAClC,iCAAiC,EACjC,gCAAgC,EAChC,iDAAiD,EACjD,gBAAgB,EAChB,mCAAmC,EACnC,gCAAgC,EAChC,uCAAuC,EACvC,mCAAmC,EACnC,0BAA0B,EAC1B,mCAAmC,EACnC,4CAA4C,EAC5C,oCAAoC,EACpC,wBAAwB,EACxB,iCAAiC,EACjC,yBAAyB,EACzB,0BAA0B,EAC1B,qCAAqC,EACrC,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,6BACf,SAAQ,IAAI,CACV,iCAAiC,EACjC,SAAS,GAAG,6BAA6B,GAAG,8BAA8B,CAC3E;IACD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC5C;;OAEG;IACH,qBAAqB,EAAE,oCAAoC,EAAE,CAAC;IAC9D;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,mCAAmC,CAAC,EAAE,OAAO,CAAC;IAC9C;;OAEG;IACH,mBAAmB,CAAC,EAAE,gCAAgC,CAAC;IACvD;;OAEG;IACH,0BAA0B,CAAC,EAAE,iDAAiD,CAAC;IAC/E;;OAEG;IACH,yBAAyB,CAAC,EAAE,iDAAiD,CAAC;IAC9E;;OAEG;IACH,6BAA6B,CAAC,EAAE,oCAAoC,EAAE,CAAC;IACvE,QAAQ,EAAE,SAAS,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRealTimeConsumer.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/consumer/useRealTimeConsumer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,SAAS,CAAC;AAErE;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,qCAAqC,KAAK,CAAC,EAC7D,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,OAAO,GAC1C,CAAC,CAUH;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as t } from "
|
|
2
|
-
import { useStore as m } from "
|
|
1
|
+
import { r as t } from "../_virtual/index.js";
|
|
2
|
+
import { useStore as m } from "../node_modules/zustand/esm/index.js";
|
|
3
3
|
import { RealTimeConsumerContext as s } from "./RealTimeConsumerContext.js";
|
|
4
4
|
function a(o, r) {
|
|
5
5
|
const e = t.useContext(s);
|
|
@@ -42,31 +42,14 @@ export type DeviceCurrentVpts = {
|
|
|
42
42
|
vptNetwork?: VPTCurrentNetwork;
|
|
43
43
|
vptAdcPower?: VPTCurrentADCPower;
|
|
44
44
|
};
|
|
45
|
-
export type DeviceCurrentReportProfileEvents = {
|
|
46
|
-
reportProfileLastEventDate?: PropertyValueWithTrack<string>;
|
|
47
|
-
reportProfileLastEventId?: PropertyValueWithTrack<number>;
|
|
48
|
-
};
|
|
49
|
-
export type DeviceCurrentReportProfiles = {
|
|
50
|
-
generalEvents?: DeviceCurrentReportProfileEvents;
|
|
51
|
-
systemEvents?: DeviceCurrentReportProfileEvents;
|
|
52
|
-
};
|
|
53
45
|
/**
|
|
54
46
|
* Live telemetry payload received from one device.
|
|
55
47
|
*/
|
|
56
48
|
export type DeviceCurrent = {
|
|
57
|
-
reportProfiles?: DeviceCurrentReportProfiles;
|
|
58
49
|
vpts?: DeviceCurrentVpts;
|
|
59
50
|
};
|
|
60
51
|
/**
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
export type SettingsGroup = {
|
|
64
|
-
id: number;
|
|
65
|
-
name: string;
|
|
66
|
-
bgColor: HexColor;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Root-level department payload that replaces the legacy settings-level group contract.
|
|
52
|
+
* Root-level department payload used by device identity and marker-color policies.
|
|
70
53
|
*/
|
|
71
54
|
export type DeviceDepartment = {
|
|
72
55
|
id: number;
|
|
@@ -104,10 +87,6 @@ export type DeviceSettings = {
|
|
|
104
87
|
active: boolean;
|
|
105
88
|
blocked?: boolean;
|
|
106
89
|
operationalRoles?: OperationalRoles;
|
|
107
|
-
/**
|
|
108
|
-
* Legacy compatibility field kept while consumers migrate to root `department`.
|
|
109
|
-
*/
|
|
110
|
-
group?: Maybe<SettingsGroup>;
|
|
111
90
|
iconBgColor?: HexColor;
|
|
112
91
|
properties?: Properties;
|
|
113
92
|
vpts?: DeviceSettingsVpts;
|
|
@@ -121,11 +100,23 @@ export type DeviceIcon = {
|
|
|
121
100
|
*/
|
|
122
101
|
iconId: string;
|
|
123
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* Runtime resource key used by the realtime hash.
|
|
105
|
+
*/
|
|
106
|
+
export type DeviceRuntimeResourceSerialId = string;
|
|
124
107
|
/**
|
|
125
108
|
* Live device payload shared across GClick realtime consumers.
|
|
126
109
|
*/
|
|
127
110
|
export type DeviceDataType = {
|
|
128
111
|
id: number;
|
|
112
|
+
/**
|
|
113
|
+
* Optional runtime hash key injected by realtime stores after transport ingress.
|
|
114
|
+
*
|
|
115
|
+
* Backend startup/live payloads can omit this field because the message hash
|
|
116
|
+
* key already carries it; consumer/runtime projections may include it inside
|
|
117
|
+
* the stored resource for ergonomic access.
|
|
118
|
+
*/
|
|
119
|
+
resourceSerialId?: DeviceRuntimeResourceSerialId;
|
|
129
120
|
name: string;
|
|
130
121
|
alias?: string;
|
|
131
122
|
/**
|
|
@@ -157,4 +148,10 @@ export type DeviceDataType = {
|
|
|
157
148
|
*/
|
|
158
149
|
producerDecorators?: Record<string, PropertyValue<string>>;
|
|
159
150
|
};
|
|
151
|
+
/**
|
|
152
|
+
* Device payload as stored in realtime resource collections and UI entity stores.
|
|
153
|
+
*/
|
|
154
|
+
export type DeviceRuntimeDataType = DeviceDataType & {
|
|
155
|
+
resourceSerialId: DeviceRuntimeResourceSerialId;
|
|
156
|
+
};
|
|
160
157
|
//# sourceMappingURL=deviceData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceData.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/contracts/deviceData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,QAAQ,EACR,KAAK,EACL,gBAAgB,EAChB,aAAa,EACb,sBAAsB,EACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,EACf,kBAAkB,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,MAAM,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,UAAU,CAAC,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"deviceData.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/contracts/deviceData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EACL,QAAQ,EACR,KAAK,EACL,gBAAgB,EAChB,aAAa,EACb,sBAAsB,EACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,QAAQ,CAAC;AAEhB;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACnC,QAAQ,CAA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MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,6BAA6B,CAAC;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACrC,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC;IACzB;;OAEG;IACH,kBAAkB,CAAC,EAAE;QACnB,iBAAiB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KAC3C,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;CAC5D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAAG;IACnD,gBAAgB,EAAE,6BAA6B,CAAC;CACjD,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DeviceCurrent, DeviceCurrentVpts, DeviceDataType, DeviceDepartment, DeviceIcon, DeviceSettingsVpts } from './deviceData';
|
|
2
2
|
import { Maybe } from './general';
|
|
3
3
|
import { VPTMultiple, VPTSettingsDiX, VPTSettingsDoX, VPTSettingsModem } from './vpts';
|
|
4
|
-
type DeviceCurrentReportProfiles = NonNullable<DeviceCurrent['reportProfiles']>;
|
|
5
4
|
type DeviceCurrentVptsPayload = NonNullable<DeviceCurrentVpts>;
|
|
6
5
|
type DeviceCurrentModemPayload = NonNullable<DeviceCurrentVptsPayload['vptModem']>;
|
|
7
6
|
/**
|
|
@@ -15,7 +14,6 @@ export type DeviceDetailStatus = {
|
|
|
15
14
|
* Camelized `current` subset returned by `GET devices/:id`.
|
|
16
15
|
*/
|
|
17
16
|
export type DeviceDetailCurrent = Partial<DeviceCurrent> & {
|
|
18
|
-
reportProfiles?: Maybe<Record<string, unknown> & DeviceCurrentReportProfiles>;
|
|
19
17
|
vpts?: Maybe<Record<string, unknown> & Partial<DeviceCurrentVptsPayload> & {
|
|
20
18
|
vptModem?: Maybe<Record<string, unknown> & Partial<DeviceCurrentModemPayload> & {
|
|
21
19
|
modemRssi?: Maybe<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceDetail.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/contracts/deviceDetail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EACnB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,cAAc,EACd,gBAAgB,EACjB,MAAM,QAAQ,CAAC;AAEhB,KAAK,
|
|
1
|
+
{"version":3,"file":"deviceDetail.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/contracts/deviceDetail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EACnB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,cAAc,EACd,gBAAgB,EACjB,MAAM,QAAQ,CAAC;AAEhB,KAAK,wBAA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BAAmB,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC/B,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IACA,IAAI,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;CACxC,GACC,wBAAwB,CAAC"}
|
package/contracts/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { DeviceCurrent,
|
|
1
|
+
export type { DeviceCurrent, DeviceCurrentVpts, DeviceCurrentVPTGnss, DeviceDataType, DeviceDepartment, DeviceRuntimeDataType, DeviceRuntimeResourceSerialId, DeviceSettings, DeviceSettingsVpts, Property, Properties, } from './deviceData';
|
|
2
2
|
export type { DeviceDetailCurrent, DeviceDetailResponse, DeviceDetailResponseData, DeviceDetailSettings, DeviceDetailStatus, } from './deviceDetail';
|
|
3
3
|
export { ADCPowerEnum, AdminStatusEnum, BASE_SVG_COLOR, GNSSEnumMotionStatus, GNSSEnumSignal, } from './constants';
|
|
4
4
|
export type { GNSSSatus, HexColor, Maybe, OperationalRole, OperationalRoles, PropertyValue, PropertyValueWithTrack, } from './general';
|
package/contracts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,6BAA6B,EAC7B,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,cAAc,GACf,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,SAAS,EACT,QAAQ,EACR,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,sBAAsB,GACvB,MAAM,WAAW,CAAC;AAEnB,YAAY,EACV,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseDeviceTemplate.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/catalogs/baseDeviceTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAU5D;;GAEG;AACH,eAAO,MAAM,+BAA+B,sCAAkB,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,oCAAoC,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"baseDeviceTemplate.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/catalogs/baseDeviceTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAU5D;;GAEG;AACH,eAAO,MAAM,+BAA+B,sCAAkB,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,oCAAoC,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAqJ3E,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ADCPowerEnum as a, GNSSEnumSignal as d, GNSSEnumMotionStatus as n } from "../../contracts/constants.js";
|
|
2
|
-
const e = "2026-04-21T12:00:00.000Z", t = "i_common_devices_type_light_truck",
|
|
2
|
+
const e = "2026-04-21T12:00:00.000Z", t = "i_common_devices_type_light_truck", i = t, s = {
|
|
3
3
|
alias: "Simulation device",
|
|
4
4
|
deviceIcon: {
|
|
5
|
-
iconId:
|
|
5
|
+
iconId: i
|
|
6
6
|
},
|
|
7
7
|
department: {
|
|
8
8
|
color: "#27C8F5",
|
|
@@ -10,32 +10,6 @@ const e = "2026-04-21T12:00:00.000Z", t = "i_common_devices_type_light_truck", o
|
|
|
10
10
|
name: "Main department"
|
|
11
11
|
},
|
|
12
12
|
current: {
|
|
13
|
-
reportProfiles: {
|
|
14
|
-
generalEvents: {
|
|
15
|
-
reportProfileLastEventDate: {
|
|
16
|
-
state: "current",
|
|
17
|
-
updatedAt: e,
|
|
18
|
-
value: e
|
|
19
|
-
},
|
|
20
|
-
reportProfileLastEventId: {
|
|
21
|
-
state: "current",
|
|
22
|
-
updatedAt: e,
|
|
23
|
-
value: 20
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
systemEvents: {
|
|
27
|
-
reportProfileLastEventDate: {
|
|
28
|
-
state: "current",
|
|
29
|
-
updatedAt: e,
|
|
30
|
-
value: e
|
|
31
|
-
},
|
|
32
|
-
reportProfileLastEventId: {
|
|
33
|
-
state: "current",
|
|
34
|
-
updatedAt: e,
|
|
35
|
-
value: 1304
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
13
|
vpts: {
|
|
40
14
|
vptDiX: {
|
|
41
15
|
0: {
|
|
@@ -124,11 +98,6 @@ const e = "2026-04-21T12:00:00.000Z", t = "i_common_devices_type_light_truck", o
|
|
|
124
98
|
settings: {
|
|
125
99
|
active: !0,
|
|
126
100
|
adminStatus: "",
|
|
127
|
-
group: {
|
|
128
|
-
bgColor: "#27C8F5",
|
|
129
|
-
id: -1,
|
|
130
|
-
name: "Main department"
|
|
131
|
-
},
|
|
132
101
|
inTechinalOrder: !1,
|
|
133
102
|
properties: {
|
|
134
103
|
internal_name: {
|
|
@@ -181,6 +150,6 @@ const e = "2026-04-21T12:00:00.000Z", t = "i_common_devices_type_light_truck", o
|
|
|
181
150
|
}
|
|
182
151
|
};
|
|
183
152
|
export {
|
|
184
|
-
|
|
185
|
-
|
|
153
|
+
s as REAL_TIME_DUMMY_BASE_DEVICE_TEMPLATE,
|
|
154
|
+
i as REAL_TIME_DUMMY_DEFAULT_ICON_ID
|
|
186
155
|
};
|
|
@@ -7,12 +7,7 @@ export declare const REAL_TIME_DUMMY_DEVICE_BLUEPRINTS: {
|
|
|
7
7
|
active: false;
|
|
8
8
|
alias: string;
|
|
9
9
|
blueprintId: string;
|
|
10
|
-
department:
|
|
11
|
-
color: `#${string}`;
|
|
12
|
-
id: number;
|
|
13
|
-
name: string;
|
|
14
|
-
};
|
|
15
|
-
group: import('../..').SettingsGroup;
|
|
10
|
+
department: import('../..').DeviceDepartment;
|
|
16
11
|
iconBgColor: `#${string}`;
|
|
17
12
|
iconId: "i_common_devices_type_heavy_truck";
|
|
18
13
|
name: string;
|
|
@@ -28,12 +23,7 @@ export declare const REAL_TIME_DUMMY_DEVICE_BLUEPRINTS: {
|
|
|
28
23
|
orchid_van: {
|
|
29
24
|
alias: string;
|
|
30
25
|
blueprintId: string;
|
|
31
|
-
department:
|
|
32
|
-
color: `#${string}`;
|
|
33
|
-
id: number;
|
|
34
|
-
name: string;
|
|
35
|
-
};
|
|
36
|
-
group: import('../..').SettingsGroup;
|
|
26
|
+
department: import('../..').DeviceDepartment;
|
|
37
27
|
iconBgColor: `#${string}`;
|
|
38
28
|
iconId: "i_common_devices_type_van";
|
|
39
29
|
name: string;
|
|
@@ -41,12 +31,7 @@ export declare const REAL_TIME_DUMMY_DEVICE_BLUEPRINTS: {
|
|
|
41
31
|
teal_pickup: {
|
|
42
32
|
alias: string;
|
|
43
33
|
blueprintId: string;
|
|
44
|
-
department:
|
|
45
|
-
color: `#${string}`;
|
|
46
|
-
id: number;
|
|
47
|
-
name: string;
|
|
48
|
-
};
|
|
49
|
-
group: import('../..').SettingsGroup;
|
|
34
|
+
department: import('../..').DeviceDepartment;
|
|
50
35
|
iconBgColor: `#${string}`;
|
|
51
36
|
iconId: "i_common_devices_type_light_truck";
|
|
52
37
|
name: string;
|
|
@@ -54,12 +39,7 @@ export declare const REAL_TIME_DUMMY_DEVICE_BLUEPRINTS: {
|
|
|
54
39
|
charcoal_sedan: {
|
|
55
40
|
alias: string;
|
|
56
41
|
blueprintId: string;
|
|
57
|
-
department:
|
|
58
|
-
color: `#${string}`;
|
|
59
|
-
id: number;
|
|
60
|
-
name: string;
|
|
61
|
-
};
|
|
62
|
-
group: import('../..').SettingsGroup;
|
|
42
|
+
department: import('../..').DeviceDepartment;
|
|
63
43
|
iconBgColor: `#${string}`;
|
|
64
44
|
iconId: "i_common_devices_type_sedan";
|
|
65
45
|
name: string;
|
|
@@ -67,12 +47,7 @@ export declare const REAL_TIME_DUMMY_DEVICE_BLUEPRINTS: {
|
|
|
67
47
|
sand_box_truck: {
|
|
68
48
|
alias: string;
|
|
69
49
|
blueprintId: string;
|
|
70
|
-
department:
|
|
71
|
-
color: `#${string}`;
|
|
72
|
-
id: number;
|
|
73
|
-
name: string;
|
|
74
|
-
};
|
|
75
|
-
group: import('../..').SettingsGroup;
|
|
50
|
+
department: import('../..').DeviceDepartment;
|
|
76
51
|
iconBgColor: `#${string}`;
|
|
77
52
|
iconId: "i_common_devices_type_heavy_truck";
|
|
78
53
|
name: string;
|
|
@@ -80,12 +55,7 @@ export declare const REAL_TIME_DUMMY_DEVICE_BLUEPRINTS: {
|
|
|
80
55
|
yellow_service: {
|
|
81
56
|
alias: string;
|
|
82
57
|
blueprintId: string;
|
|
83
|
-
department:
|
|
84
|
-
color: `#${string}`;
|
|
85
|
-
id: number;
|
|
86
|
-
name: string;
|
|
87
|
-
};
|
|
88
|
-
group: import('../..').SettingsGroup;
|
|
58
|
+
department: import('../..').DeviceDepartment;
|
|
89
59
|
iconBgColor: `#${string}`;
|
|
90
60
|
iconId: "i_common_devices_type_motorcycle";
|
|
91
61
|
name: string;
|
|
@@ -93,12 +63,7 @@ export declare const REAL_TIME_DUMMY_DEVICE_BLUEPRINTS: {
|
|
|
93
63
|
red_tractor: {
|
|
94
64
|
alias: string;
|
|
95
65
|
blueprintId: string;
|
|
96
|
-
department:
|
|
97
|
-
color: `#${string}`;
|
|
98
|
-
id: number;
|
|
99
|
-
name: string;
|
|
100
|
-
};
|
|
101
|
-
group: import('../..').SettingsGroup;
|
|
66
|
+
department: import('../..').DeviceDepartment;
|
|
102
67
|
iconBgColor: `#${string}`;
|
|
103
68
|
iconId: "i_common_devices_type_truck_tractor";
|
|
104
69
|
name: string;
|
|
@@ -106,12 +71,7 @@ export declare const REAL_TIME_DUMMY_DEVICE_BLUEPRINTS: {
|
|
|
106
71
|
blue_city_car: {
|
|
107
72
|
alias: string;
|
|
108
73
|
blueprintId: string;
|
|
109
|
-
department:
|
|
110
|
-
color: `#${string}`;
|
|
111
|
-
id: number;
|
|
112
|
-
name: string;
|
|
113
|
-
};
|
|
114
|
-
group: import('../..').SettingsGroup;
|
|
74
|
+
department: import('../..').DeviceDepartment;
|
|
115
75
|
iconBgColor: `#${string}`;
|
|
116
76
|
iconId: "i_common_devices_type_sedan";
|
|
117
77
|
name: string;
|
|
@@ -119,12 +79,7 @@ export declare const REAL_TIME_DUMMY_DEVICE_BLUEPRINTS: {
|
|
|
119
79
|
bootstrap_pending_icon: {
|
|
120
80
|
alias: string;
|
|
121
81
|
blueprintId: string;
|
|
122
|
-
department:
|
|
123
|
-
color: `#${string}`;
|
|
124
|
-
id: number;
|
|
125
|
-
name: string;
|
|
126
|
-
};
|
|
127
|
-
group: import('../..').SettingsGroup;
|
|
82
|
+
department: import('../..').DeviceDepartment;
|
|
128
83
|
iconBgColor: `#${string}`;
|
|
129
84
|
name: string;
|
|
130
85
|
omitDeviceIcon: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueprints.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/catalogs/blueprints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blueprints.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/catalogs/blueprints.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,0BAA0B,mEAS7B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFU,CAAC;AAEzD,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,iCAAiC,CAAC"}
|