@fatehan/tsrp 1.4.44 → 1.4.46
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/dist/fatehan/activities/camera.d.ts +0 -2
- package/dist/fatehan/activities/camera.d.ts.map +1 -1
- package/dist/fatehan/activities/camera.js +0 -257
- package/dist/fatehan/activities/workflow.d.ts +20 -30
- package/dist/fatehan/activities/workflow.d.ts.map +1 -1
- package/dist/fatehan/activities/workflow.js +0 -718
- package/dist/fatehan/apis/client.d.ts +10 -12
- package/dist/fatehan/apis/client.d.ts.map +1 -1
- package/dist/fatehan/apis/client.js +23 -1015
- package/dist/fatehan/areas/area.d.ts +11 -15
- package/dist/fatehan/areas/area.d.ts.map +1 -1
- package/dist/fatehan/areas/area.js +0 -271
- package/dist/fatehan/devices/devices.d.ts +3 -7
- package/dist/fatehan/devices/devices.d.ts.map +1 -1
- package/dist/fatehan/devices/devices.js +0 -911
- package/dist/fatehan/devices/maintenance.d.ts +3 -7
- package/dist/fatehan/devices/maintenance.d.ts.map +1 -1
- package/dist/fatehan/devices/maintenance.js +0 -189
- package/dist/fatehan/financial/financial.d.ts +14 -16
- package/dist/fatehan/financial/financial.d.ts.map +1 -1
- package/dist/fatehan/financial/financial.js +0 -538
- package/dist/fatehan/google/protobuf/descriptor.d.ts +0 -42
- package/dist/fatehan/google/protobuf/descriptor.d.ts.map +1 -1
- package/dist/fatehan/google/protobuf/descriptor.js +0 -1864
- package/dist/fatehan/google/protobuf/duration.d.ts +0 -2
- package/dist/fatehan/google/protobuf/duration.d.ts.map +1 -1
- package/dist/fatehan/google/protobuf/duration.js +0 -19
- package/dist/fatehan/google/protobuf/field_mask.d.ts +0 -2
- package/dist/fatehan/google/protobuf/field_mask.d.ts.map +1 -1
- package/dist/fatehan/google/protobuf/field_mask.js +0 -12
- package/dist/fatehan/google/protobuf/timestamp.d.ts +0 -2
- package/dist/fatehan/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/fatehan/google/protobuf/timestamp.js +0 -19
- package/dist/fatehan/identities/authentication.d.ts +13 -15
- package/dist/fatehan/identities/authentication.d.ts.map +1 -1
- package/dist/fatehan/identities/authentication.js +0 -339
- package/dist/fatehan/identities/identities.d.ts +6 -12
- package/dist/fatehan/identities/identities.d.ts.map +1 -1
- package/dist/fatehan/identities/identities.js +0 -4069
- package/dist/fatehan/models/fusion.d.ts +5 -7
- package/dist/fatehan/models/fusion.d.ts.map +1 -1
- package/dist/fatehan/models/fusion.js +0 -494
- package/dist/fatehan/models/models.d.ts +6 -10
- package/dist/fatehan/models/models.d.ts.map +1 -1
- package/dist/fatehan/models/models.js +1 -554
- package/dist/fatehan/notifies/notify.d.ts +10 -24
- package/dist/fatehan/notifies/notify.d.ts.map +1 -1
- package/dist/fatehan/notifies/notify.js +0 -1096
- package/dist/fatehan/packets/dataModel.d.ts +18 -48
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModel.js +34 -7015
- package/dist/fatehan/packets/dataModule.d.ts +2 -6
- package/dist/fatehan/packets/dataModule.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModule.js +0 -167
- package/dist/fatehan/packets/messages.d.ts +5 -9
- package/dist/fatehan/packets/messages.d.ts.map +1 -1
- package/dist/fatehan/packets/messages.js +0 -280
- package/dist/fatehan/reports/report.d.ts +87 -115
- package/dist/fatehan/reports/report.d.ts.map +1 -1
- package/dist/fatehan/reports/report.js +3 -3112
- package/dist/fatehan/services/api.d.ts +14 -14
- package/dist/fatehan/services/api.d.ts.map +1 -1
- package/dist/fatehan/services/api.js +29 -1254
- package/dist/fatehan/services/repositories.d.ts +6 -8
- package/dist/fatehan/services/repositories.d.ts.map +1 -1
- package/dist/fatehan/services/repositories.js +0 -191
- package/dist/fatehan/trips/trip.d.ts +18 -30
- package/dist/fatehan/trips/trip.d.ts.map +1 -1
- package/dist/fatehan/trips/trip.js +0 -1662
- package/dist/fatehan/utils/buf/validate/validate.d.ts +0 -6
- package/dist/fatehan/utils/buf/validate/validate.d.ts.map +1 -1
- package/dist/fatehan/utils/buf/validate/validate.js +0 -1318
- package/package.json +1 -1
|
@@ -8,7 +8,6 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
8
8
|
import Long from "long";
|
|
9
9
|
import { Timestamp } from "../google/protobuf/timestamp";
|
|
10
10
|
import { Receiver } from "../identities/identities";
|
|
11
|
-
import { alertFromJSON, alertToJSON } from "../packets/dataModel";
|
|
12
11
|
export const protobufPackage = "com.fatehan.notifies";
|
|
13
12
|
export var Via;
|
|
14
13
|
(function (Via) {
|
|
@@ -21,56 +20,6 @@ export var Via;
|
|
|
21
20
|
Via[Via["WEBHOOK"] = 6] = "WEBHOOK";
|
|
22
21
|
Via[Via["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
23
22
|
})(Via || (Via = {}));
|
|
24
|
-
export function viaFromJSON(object) {
|
|
25
|
-
switch (object) {
|
|
26
|
-
case 0:
|
|
27
|
-
case "NONE":
|
|
28
|
-
return Via.NONE;
|
|
29
|
-
case 1:
|
|
30
|
-
case "SMS":
|
|
31
|
-
return Via.SMS;
|
|
32
|
-
case 2:
|
|
33
|
-
case "FCM":
|
|
34
|
-
return Via.FCM;
|
|
35
|
-
case 3:
|
|
36
|
-
case "EMAIL":
|
|
37
|
-
return Via.EMAIL;
|
|
38
|
-
case 4:
|
|
39
|
-
case "DATABASE":
|
|
40
|
-
return Via.DATABASE;
|
|
41
|
-
case 5:
|
|
42
|
-
case "CALL":
|
|
43
|
-
return Via.CALL;
|
|
44
|
-
case 6:
|
|
45
|
-
case "WEBHOOK":
|
|
46
|
-
return Via.WEBHOOK;
|
|
47
|
-
case -1:
|
|
48
|
-
case "UNRECOGNIZED":
|
|
49
|
-
default:
|
|
50
|
-
return Via.UNRECOGNIZED;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
export function viaToJSON(object) {
|
|
54
|
-
switch (object) {
|
|
55
|
-
case Via.NONE:
|
|
56
|
-
return "NONE";
|
|
57
|
-
case Via.SMS:
|
|
58
|
-
return "SMS";
|
|
59
|
-
case Via.FCM:
|
|
60
|
-
return "FCM";
|
|
61
|
-
case Via.EMAIL:
|
|
62
|
-
return "EMAIL";
|
|
63
|
-
case Via.DATABASE:
|
|
64
|
-
return "DATABASE";
|
|
65
|
-
case Via.CALL:
|
|
66
|
-
return "CALL";
|
|
67
|
-
case Via.WEBHOOK:
|
|
68
|
-
return "WEBHOOK";
|
|
69
|
-
case Via.UNRECOGNIZED:
|
|
70
|
-
default:
|
|
71
|
-
return "UNRECOGNIZED";
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
23
|
export var ObjectType;
|
|
75
24
|
(function (ObjectType) {
|
|
76
25
|
ObjectType[ObjectType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
@@ -80,77 +29,12 @@ export var ObjectType;
|
|
|
80
29
|
ObjectType[ObjectType["WORKFLOW_TASK"] = 4] = "WORKFLOW_TASK";
|
|
81
30
|
ObjectType[ObjectType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
82
31
|
})(ObjectType || (ObjectType = {}));
|
|
83
|
-
export function objectTypeFromJSON(object) {
|
|
84
|
-
switch (object) {
|
|
85
|
-
case 0:
|
|
86
|
-
case "UNKNOWN":
|
|
87
|
-
return ObjectType.UNKNOWN;
|
|
88
|
-
case 1:
|
|
89
|
-
case "DEVICE":
|
|
90
|
-
return ObjectType.DEVICE;
|
|
91
|
-
case 2:
|
|
92
|
-
case "USER":
|
|
93
|
-
return ObjectType.USER;
|
|
94
|
-
case 3:
|
|
95
|
-
case "OPERATION":
|
|
96
|
-
return ObjectType.OPERATION;
|
|
97
|
-
case 4:
|
|
98
|
-
case "WORKFLOW_TASK":
|
|
99
|
-
return ObjectType.WORKFLOW_TASK;
|
|
100
|
-
case -1:
|
|
101
|
-
case "UNRECOGNIZED":
|
|
102
|
-
default:
|
|
103
|
-
return ObjectType.UNRECOGNIZED;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
export function objectTypeToJSON(object) {
|
|
107
|
-
switch (object) {
|
|
108
|
-
case ObjectType.UNKNOWN:
|
|
109
|
-
return "UNKNOWN";
|
|
110
|
-
case ObjectType.DEVICE:
|
|
111
|
-
return "DEVICE";
|
|
112
|
-
case ObjectType.USER:
|
|
113
|
-
return "USER";
|
|
114
|
-
case ObjectType.OPERATION:
|
|
115
|
-
return "OPERATION";
|
|
116
|
-
case ObjectType.WORKFLOW_TASK:
|
|
117
|
-
return "WORKFLOW_TASK";
|
|
118
|
-
case ObjectType.UNRECOGNIZED:
|
|
119
|
-
default:
|
|
120
|
-
return "UNRECOGNIZED";
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
32
|
export var AreaEventType;
|
|
124
33
|
(function (AreaEventType) {
|
|
125
34
|
AreaEventType[AreaEventType["AREA_EXIT"] = 0] = "AREA_EXIT";
|
|
126
35
|
AreaEventType[AreaEventType["AREA_ENTER"] = 1] = "AREA_ENTER";
|
|
127
36
|
AreaEventType[AreaEventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
128
37
|
})(AreaEventType || (AreaEventType = {}));
|
|
129
|
-
export function areaEventTypeFromJSON(object) {
|
|
130
|
-
switch (object) {
|
|
131
|
-
case 0:
|
|
132
|
-
case "AREA_EXIT":
|
|
133
|
-
return AreaEventType.AREA_EXIT;
|
|
134
|
-
case 1:
|
|
135
|
-
case "AREA_ENTER":
|
|
136
|
-
return AreaEventType.AREA_ENTER;
|
|
137
|
-
case -1:
|
|
138
|
-
case "UNRECOGNIZED":
|
|
139
|
-
default:
|
|
140
|
-
return AreaEventType.UNRECOGNIZED;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
export function areaEventTypeToJSON(object) {
|
|
144
|
-
switch (object) {
|
|
145
|
-
case AreaEventType.AREA_EXIT:
|
|
146
|
-
return "AREA_EXIT";
|
|
147
|
-
case AreaEventType.AREA_ENTER:
|
|
148
|
-
return "AREA_ENTER";
|
|
149
|
-
case AreaEventType.UNRECOGNIZED:
|
|
150
|
-
default:
|
|
151
|
-
return "UNRECOGNIZED";
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
38
|
export var AnalogEventType;
|
|
155
39
|
(function (AnalogEventType) {
|
|
156
40
|
AnalogEventType[AnalogEventType["ANALOG_EQUAL"] = 0] = "ANALOG_EQUAL";
|
|
@@ -158,67 +42,12 @@ export var AnalogEventType;
|
|
|
158
42
|
AnalogEventType[AnalogEventType["ANALOG_FALL_BELOW"] = 2] = "ANALOG_FALL_BELOW";
|
|
159
43
|
AnalogEventType[AnalogEventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
160
44
|
})(AnalogEventType || (AnalogEventType = {}));
|
|
161
|
-
export function analogEventTypeFromJSON(object) {
|
|
162
|
-
switch (object) {
|
|
163
|
-
case 0:
|
|
164
|
-
case "ANALOG_EQUAL":
|
|
165
|
-
return AnalogEventType.ANALOG_EQUAL;
|
|
166
|
-
case 1:
|
|
167
|
-
case "ANALOG_RISE_ABOVE":
|
|
168
|
-
return AnalogEventType.ANALOG_RISE_ABOVE;
|
|
169
|
-
case 2:
|
|
170
|
-
case "ANALOG_FALL_BELOW":
|
|
171
|
-
return AnalogEventType.ANALOG_FALL_BELOW;
|
|
172
|
-
case -1:
|
|
173
|
-
case "UNRECOGNIZED":
|
|
174
|
-
default:
|
|
175
|
-
return AnalogEventType.UNRECOGNIZED;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
export function analogEventTypeToJSON(object) {
|
|
179
|
-
switch (object) {
|
|
180
|
-
case AnalogEventType.ANALOG_EQUAL:
|
|
181
|
-
return "ANALOG_EQUAL";
|
|
182
|
-
case AnalogEventType.ANALOG_RISE_ABOVE:
|
|
183
|
-
return "ANALOG_RISE_ABOVE";
|
|
184
|
-
case AnalogEventType.ANALOG_FALL_BELOW:
|
|
185
|
-
return "ANALOG_FALL_BELOW";
|
|
186
|
-
case AnalogEventType.UNRECOGNIZED:
|
|
187
|
-
default:
|
|
188
|
-
return "UNRECOGNIZED";
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
45
|
export var TriggerGate;
|
|
192
46
|
(function (TriggerGate) {
|
|
193
47
|
TriggerGate[TriggerGate["TRIGGER_GATE_AND"] = 0] = "TRIGGER_GATE_AND";
|
|
194
48
|
TriggerGate[TriggerGate["TRIGGER_GATE_OR"] = 1] = "TRIGGER_GATE_OR";
|
|
195
49
|
TriggerGate[TriggerGate["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
196
50
|
})(TriggerGate || (TriggerGate = {}));
|
|
197
|
-
export function triggerGateFromJSON(object) {
|
|
198
|
-
switch (object) {
|
|
199
|
-
case 0:
|
|
200
|
-
case "TRIGGER_GATE_AND":
|
|
201
|
-
return TriggerGate.TRIGGER_GATE_AND;
|
|
202
|
-
case 1:
|
|
203
|
-
case "TRIGGER_GATE_OR":
|
|
204
|
-
return TriggerGate.TRIGGER_GATE_OR;
|
|
205
|
-
case -1:
|
|
206
|
-
case "UNRECOGNIZED":
|
|
207
|
-
default:
|
|
208
|
-
return TriggerGate.UNRECOGNIZED;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
export function triggerGateToJSON(object) {
|
|
212
|
-
switch (object) {
|
|
213
|
-
case TriggerGate.TRIGGER_GATE_AND:
|
|
214
|
-
return "TRIGGER_GATE_AND";
|
|
215
|
-
case TriggerGate.TRIGGER_GATE_OR:
|
|
216
|
-
return "TRIGGER_GATE_OR";
|
|
217
|
-
case TriggerGate.UNRECOGNIZED:
|
|
218
|
-
default:
|
|
219
|
-
return "UNRECOGNIZED";
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
51
|
export var NotifyJob_Priority;
|
|
223
52
|
(function (NotifyJob_Priority) {
|
|
224
53
|
NotifyJob_Priority[NotifyJob_Priority["LOW"] = 0] = "LOW";
|
|
@@ -226,36 +55,6 @@ export var NotifyJob_Priority;
|
|
|
226
55
|
NotifyJob_Priority[NotifyJob_Priority["HIGH"] = 2] = "HIGH";
|
|
227
56
|
NotifyJob_Priority[NotifyJob_Priority["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
228
57
|
})(NotifyJob_Priority || (NotifyJob_Priority = {}));
|
|
229
|
-
export function notifyJob_PriorityFromJSON(object) {
|
|
230
|
-
switch (object) {
|
|
231
|
-
case 0:
|
|
232
|
-
case "LOW":
|
|
233
|
-
return NotifyJob_Priority.LOW;
|
|
234
|
-
case 1:
|
|
235
|
-
case "MEDIUM":
|
|
236
|
-
return NotifyJob_Priority.MEDIUM;
|
|
237
|
-
case 2:
|
|
238
|
-
case "HIGH":
|
|
239
|
-
return NotifyJob_Priority.HIGH;
|
|
240
|
-
case -1:
|
|
241
|
-
case "UNRECOGNIZED":
|
|
242
|
-
default:
|
|
243
|
-
return NotifyJob_Priority.UNRECOGNIZED;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
export function notifyJob_PriorityToJSON(object) {
|
|
247
|
-
switch (object) {
|
|
248
|
-
case NotifyJob_Priority.LOW:
|
|
249
|
-
return "LOW";
|
|
250
|
-
case NotifyJob_Priority.MEDIUM:
|
|
251
|
-
return "MEDIUM";
|
|
252
|
-
case NotifyJob_Priority.HIGH:
|
|
253
|
-
return "HIGH";
|
|
254
|
-
case NotifyJob_Priority.UNRECOGNIZED:
|
|
255
|
-
default:
|
|
256
|
-
return "UNRECOGNIZED";
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
58
|
function createBaseTestMessage() {
|
|
260
59
|
return { name: "" };
|
|
261
60
|
}
|
|
@@ -288,16 +87,6 @@ export const TestMessage = {
|
|
|
288
87
|
}
|
|
289
88
|
return message;
|
|
290
89
|
},
|
|
291
|
-
fromJSON(object) {
|
|
292
|
-
return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
|
|
293
|
-
},
|
|
294
|
-
toJSON(message) {
|
|
295
|
-
const obj = {};
|
|
296
|
-
if (message.name !== "") {
|
|
297
|
-
obj.name = message.name;
|
|
298
|
-
}
|
|
299
|
-
return obj;
|
|
300
|
-
},
|
|
301
90
|
create(base) {
|
|
302
91
|
return TestMessage.fromPartial(base ?? {});
|
|
303
92
|
},
|
|
@@ -398,38 +187,6 @@ export const NotifyJob = {
|
|
|
398
187
|
}
|
|
399
188
|
return message;
|
|
400
189
|
},
|
|
401
|
-
fromJSON(object) {
|
|
402
|
-
return {
|
|
403
|
-
id: isSet(object.id) ? Long.fromValue(object.id) : Long.UZERO,
|
|
404
|
-
userId: isSet(object.user_id) ? Long.fromValue(object.user_id) : Long.UZERO,
|
|
405
|
-
retries: isSet(object.retries) ? globalThis.Number(object.retries) : 0,
|
|
406
|
-
priority: isSet(object.priority) ? notifyJob_PriorityFromJSON(object.priority) : 0,
|
|
407
|
-
notify: isSet(object.notify) ? Notify.fromJSON(object.notify) : undefined,
|
|
408
|
-
via: globalThis.Array.isArray(object?.via) ? object.via.map((e) => viaFromJSON(e)) : [],
|
|
409
|
-
};
|
|
410
|
-
},
|
|
411
|
-
toJSON(message) {
|
|
412
|
-
const obj = {};
|
|
413
|
-
if (!message.id.equals(Long.UZERO)) {
|
|
414
|
-
obj.id = (message.id || Long.UZERO).toString();
|
|
415
|
-
}
|
|
416
|
-
if (!message.userId.equals(Long.UZERO)) {
|
|
417
|
-
obj.user_id = (message.userId || Long.UZERO).toString();
|
|
418
|
-
}
|
|
419
|
-
if (message.retries !== 0) {
|
|
420
|
-
obj.retries = Math.round(message.retries);
|
|
421
|
-
}
|
|
422
|
-
if (message.priority !== 0) {
|
|
423
|
-
obj.priority = notifyJob_PriorityToJSON(message.priority);
|
|
424
|
-
}
|
|
425
|
-
if (message.notify !== undefined) {
|
|
426
|
-
obj.notify = Notify.toJSON(message.notify);
|
|
427
|
-
}
|
|
428
|
-
if (message.via?.length) {
|
|
429
|
-
obj.via = message.via.map((e) => viaToJSON(e));
|
|
430
|
-
}
|
|
431
|
-
return obj;
|
|
432
|
-
},
|
|
433
190
|
create(base) {
|
|
434
191
|
return NotifyJob.fromPartial(base ?? {});
|
|
435
192
|
},
|
|
@@ -620,88 +377,6 @@ export const UserDeviceAlert = {
|
|
|
620
377
|
}
|
|
621
378
|
return message;
|
|
622
379
|
},
|
|
623
|
-
fromJSON(object) {
|
|
624
|
-
return {
|
|
625
|
-
id: isSet(object.id) ? Long.fromValue(object.id) : Long.UZERO,
|
|
626
|
-
userId: isSet(object.user_id) ? Long.fromValue(object.user_id) : Long.UZERO,
|
|
627
|
-
deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
|
|
628
|
-
organizationId: isSet(object.organization_id) ? Long.fromValue(object.organization_id) : Long.UZERO,
|
|
629
|
-
alertId: isSet(object.alert_id) ? Long.fromValue(object.alert_id) : Long.UZERO,
|
|
630
|
-
condition: isObject(object.condition)
|
|
631
|
-
? Object.entries(object.condition).reduce((acc, [key, value]) => {
|
|
632
|
-
acc[globalThis.Number(key)] = UserDeviceAlert_ConditionList.fromJSON(value);
|
|
633
|
-
return acc;
|
|
634
|
-
}, {})
|
|
635
|
-
: {},
|
|
636
|
-
timing: isObject(object.timing)
|
|
637
|
-
? Object.entries(object.timing).reduce((acc, [key, value]) => {
|
|
638
|
-
acc[globalThis.Number(key)] = UserDeviceAlert_ConditionList.fromJSON(value);
|
|
639
|
-
return acc;
|
|
640
|
-
}, {})
|
|
641
|
-
: {},
|
|
642
|
-
status: isSet(object.status) ? globalThis.Boolean(object.status) : false,
|
|
643
|
-
format: isSet(object.format) ? globalThis.String(object.format) : "",
|
|
644
|
-
alert: isSet(object.alert) ? alertFromJSON(object.alert) : 0,
|
|
645
|
-
unit: isSet(object.unit) ? globalThis.String(object.unit) : undefined,
|
|
646
|
-
objectType: isSet(object.object_type) ? globalThis.String(object.object_type) : undefined,
|
|
647
|
-
objectId: isSet(object.object_id) ? Long.fromValue(object.object_id) : undefined,
|
|
648
|
-
};
|
|
649
|
-
},
|
|
650
|
-
toJSON(message) {
|
|
651
|
-
const obj = {};
|
|
652
|
-
if (!message.id.equals(Long.UZERO)) {
|
|
653
|
-
obj.id = (message.id || Long.UZERO).toString();
|
|
654
|
-
}
|
|
655
|
-
if (!message.userId.equals(Long.UZERO)) {
|
|
656
|
-
obj.user_id = (message.userId || Long.UZERO).toString();
|
|
657
|
-
}
|
|
658
|
-
if (!message.deviceId.equals(Long.UZERO)) {
|
|
659
|
-
obj.device_id = (message.deviceId || Long.UZERO).toString();
|
|
660
|
-
}
|
|
661
|
-
if (!message.organizationId.equals(Long.UZERO)) {
|
|
662
|
-
obj.organization_id = (message.organizationId || Long.UZERO).toString();
|
|
663
|
-
}
|
|
664
|
-
if (!message.alertId.equals(Long.UZERO)) {
|
|
665
|
-
obj.alert_id = (message.alertId || Long.UZERO).toString();
|
|
666
|
-
}
|
|
667
|
-
if (message.condition) {
|
|
668
|
-
const entries = Object.entries(message.condition);
|
|
669
|
-
if (entries.length > 0) {
|
|
670
|
-
obj.condition = {};
|
|
671
|
-
entries.forEach(([k, v]) => {
|
|
672
|
-
obj.condition[k] = UserDeviceAlert_ConditionList.toJSON(v);
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
if (message.timing) {
|
|
677
|
-
const entries = Object.entries(message.timing);
|
|
678
|
-
if (entries.length > 0) {
|
|
679
|
-
obj.timing = {};
|
|
680
|
-
entries.forEach(([k, v]) => {
|
|
681
|
-
obj.timing[k] = UserDeviceAlert_ConditionList.toJSON(v);
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
if (message.status !== false) {
|
|
686
|
-
obj.status = message.status;
|
|
687
|
-
}
|
|
688
|
-
if (message.format !== "") {
|
|
689
|
-
obj.format = message.format;
|
|
690
|
-
}
|
|
691
|
-
if (message.alert !== 0) {
|
|
692
|
-
obj.alert = alertToJSON(message.alert);
|
|
693
|
-
}
|
|
694
|
-
if (message.unit !== undefined) {
|
|
695
|
-
obj.unit = message.unit;
|
|
696
|
-
}
|
|
697
|
-
if (message.objectType !== undefined) {
|
|
698
|
-
obj.object_type = message.objectType;
|
|
699
|
-
}
|
|
700
|
-
if (message.objectId !== undefined) {
|
|
701
|
-
obj.object_id = (message.objectId || Long.UZERO).toString();
|
|
702
|
-
}
|
|
703
|
-
return obj;
|
|
704
|
-
},
|
|
705
380
|
create(base) {
|
|
706
381
|
return UserDeviceAlert.fromPartial(base ?? {});
|
|
707
382
|
},
|
|
@@ -834,38 +509,6 @@ export const UserDeviceAlert_Condition = {
|
|
|
834
509
|
}
|
|
835
510
|
return message;
|
|
836
511
|
},
|
|
837
|
-
fromJSON(object) {
|
|
838
|
-
return {
|
|
839
|
-
fromTime: isSet(object.from_time) ? globalThis.String(object.from_time) : undefined,
|
|
840
|
-
toTime: isSet(object.to_time) ? globalThis.String(object.to_time) : undefined,
|
|
841
|
-
soundId: isSet(object.sound_id) ? Long.fromValue(object.sound_id) : undefined,
|
|
842
|
-
text: isSet(object.text) ? globalThis.String(object.text) : undefined,
|
|
843
|
-
value: isSet(object.value) ? Long.fromValue(object.value) : undefined,
|
|
844
|
-
type: globalThis.Array.isArray(object?.type) ? object.type.map((e) => viaFromJSON(e)) : [],
|
|
845
|
-
};
|
|
846
|
-
},
|
|
847
|
-
toJSON(message) {
|
|
848
|
-
const obj = {};
|
|
849
|
-
if (message.fromTime !== undefined) {
|
|
850
|
-
obj.from_time = message.fromTime;
|
|
851
|
-
}
|
|
852
|
-
if (message.toTime !== undefined) {
|
|
853
|
-
obj.to_time = message.toTime;
|
|
854
|
-
}
|
|
855
|
-
if (message.soundId !== undefined) {
|
|
856
|
-
obj.sound_id = (message.soundId || Long.UZERO).toString();
|
|
857
|
-
}
|
|
858
|
-
if (message.text !== undefined) {
|
|
859
|
-
obj.text = message.text;
|
|
860
|
-
}
|
|
861
|
-
if (message.value !== undefined) {
|
|
862
|
-
obj.value = (message.value || Long.ZERO).toString();
|
|
863
|
-
}
|
|
864
|
-
if (message.type?.length) {
|
|
865
|
-
obj.type = message.type.map((e) => viaToJSON(e));
|
|
866
|
-
}
|
|
867
|
-
return obj;
|
|
868
|
-
},
|
|
869
512
|
create(base) {
|
|
870
513
|
return UserDeviceAlert_Condition.fromPartial(base ?? {});
|
|
871
514
|
},
|
|
@@ -914,20 +557,6 @@ export const UserDeviceAlert_ConditionList = {
|
|
|
914
557
|
}
|
|
915
558
|
return message;
|
|
916
559
|
},
|
|
917
|
-
fromJSON(object) {
|
|
918
|
-
return {
|
|
919
|
-
condition: globalThis.Array.isArray(object?.condition_list)
|
|
920
|
-
? object.condition_list.map((e) => UserDeviceAlert_Condition.fromJSON(e))
|
|
921
|
-
: [],
|
|
922
|
-
};
|
|
923
|
-
},
|
|
924
|
-
toJSON(message) {
|
|
925
|
-
const obj = {};
|
|
926
|
-
if (message.condition?.length) {
|
|
927
|
-
obj.condition_list = message.condition.map((e) => UserDeviceAlert_Condition.toJSON(e));
|
|
928
|
-
}
|
|
929
|
-
return obj;
|
|
930
|
-
},
|
|
931
560
|
create(base) {
|
|
932
561
|
return UserDeviceAlert_ConditionList.fromPartial(base ?? {});
|
|
933
562
|
},
|
|
@@ -979,22 +608,6 @@ export const UserDeviceAlert_ConditionEntry = {
|
|
|
979
608
|
}
|
|
980
609
|
return message;
|
|
981
610
|
},
|
|
982
|
-
fromJSON(object) {
|
|
983
|
-
return {
|
|
984
|
-
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
985
|
-
value: isSet(object.value) ? UserDeviceAlert_ConditionList.fromJSON(object.value) : undefined,
|
|
986
|
-
};
|
|
987
|
-
},
|
|
988
|
-
toJSON(message) {
|
|
989
|
-
const obj = {};
|
|
990
|
-
if (message.key !== 0) {
|
|
991
|
-
obj.key = Math.round(message.key);
|
|
992
|
-
}
|
|
993
|
-
if (message.value !== undefined) {
|
|
994
|
-
obj.value = UserDeviceAlert_ConditionList.toJSON(message.value);
|
|
995
|
-
}
|
|
996
|
-
return obj;
|
|
997
|
-
},
|
|
998
611
|
create(base) {
|
|
999
612
|
return UserDeviceAlert_ConditionEntry.fromPartial(base ?? {});
|
|
1000
613
|
},
|
|
@@ -1049,22 +662,6 @@ export const UserDeviceAlert_TimingEntry = {
|
|
|
1049
662
|
}
|
|
1050
663
|
return message;
|
|
1051
664
|
},
|
|
1052
|
-
fromJSON(object) {
|
|
1053
|
-
return {
|
|
1054
|
-
key: isSet(object.key) ? globalThis.Number(object.key) : 0,
|
|
1055
|
-
value: isSet(object.value) ? UserDeviceAlert_ConditionList.fromJSON(object.value) : undefined,
|
|
1056
|
-
};
|
|
1057
|
-
},
|
|
1058
|
-
toJSON(message) {
|
|
1059
|
-
const obj = {};
|
|
1060
|
-
if (message.key !== 0) {
|
|
1061
|
-
obj.key = Math.round(message.key);
|
|
1062
|
-
}
|
|
1063
|
-
if (message.value !== undefined) {
|
|
1064
|
-
obj.value = UserDeviceAlert_ConditionList.toJSON(message.value);
|
|
1065
|
-
}
|
|
1066
|
-
return obj;
|
|
1067
|
-
},
|
|
1068
665
|
create(base) {
|
|
1069
666
|
return UserDeviceAlert_TimingEntry.fromPartial(base ?? {});
|
|
1070
667
|
},
|
|
@@ -1109,18 +706,6 @@ export const UserDeviceAlertList = {
|
|
|
1109
706
|
}
|
|
1110
707
|
return message;
|
|
1111
708
|
},
|
|
1112
|
-
fromJSON(object) {
|
|
1113
|
-
return {
|
|
1114
|
-
list: globalThis.Array.isArray(object?.list) ? object.list.map((e) => UserDeviceAlert.fromJSON(e)) : [],
|
|
1115
|
-
};
|
|
1116
|
-
},
|
|
1117
|
-
toJSON(message) {
|
|
1118
|
-
const obj = {};
|
|
1119
|
-
if (message.list?.length) {
|
|
1120
|
-
obj.list = message.list.map((e) => UserDeviceAlert.toJSON(e));
|
|
1121
|
-
}
|
|
1122
|
-
return obj;
|
|
1123
|
-
},
|
|
1124
709
|
create(base) {
|
|
1125
710
|
return UserDeviceAlertList.fromPartial(base ?? {});
|
|
1126
711
|
},
|
|
@@ -1266,65 +851,6 @@ export const Notify = {
|
|
|
1266
851
|
}
|
|
1267
852
|
return message;
|
|
1268
853
|
},
|
|
1269
|
-
fromJSON(object) {
|
|
1270
|
-
return {
|
|
1271
|
-
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1272
|
-
body: isSet(object.body) ? globalThis.String(object.body) : undefined,
|
|
1273
|
-
sound: isSet(object.sound) ? Long.fromValue(object.sound) : undefined,
|
|
1274
|
-
image: isSet(object.image) ? globalThis.String(object.image) : undefined,
|
|
1275
|
-
icon: isSet(object.icon) ? globalThis.String(object.icon) : undefined,
|
|
1276
|
-
receiver: isSet(object.receiver) ? Receiver.fromJSON(object.receiver) : undefined,
|
|
1277
|
-
objectId: isSet(object.object_id) ? Long.fromValue(object.object_id) : undefined,
|
|
1278
|
-
objectType: isSet(object.object_type) ? objectTypeFromJSON(object.object_type) : 0,
|
|
1279
|
-
timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
|
|
1280
|
-
data: isObject(object.data)
|
|
1281
|
-
? Object.entries(object.data).reduce((acc, [key, value]) => {
|
|
1282
|
-
acc[key] = String(value);
|
|
1283
|
-
return acc;
|
|
1284
|
-
}, {})
|
|
1285
|
-
: {},
|
|
1286
|
-
};
|
|
1287
|
-
},
|
|
1288
|
-
toJSON(message) {
|
|
1289
|
-
const obj = {};
|
|
1290
|
-
if (message.title !== "") {
|
|
1291
|
-
obj.title = message.title;
|
|
1292
|
-
}
|
|
1293
|
-
if (message.body !== undefined) {
|
|
1294
|
-
obj.body = message.body;
|
|
1295
|
-
}
|
|
1296
|
-
if (message.sound !== undefined) {
|
|
1297
|
-
obj.sound = (message.sound || Long.UZERO).toString();
|
|
1298
|
-
}
|
|
1299
|
-
if (message.image !== undefined) {
|
|
1300
|
-
obj.image = message.image;
|
|
1301
|
-
}
|
|
1302
|
-
if (message.icon !== undefined) {
|
|
1303
|
-
obj.icon = message.icon;
|
|
1304
|
-
}
|
|
1305
|
-
if (message.receiver !== undefined) {
|
|
1306
|
-
obj.receiver = Receiver.toJSON(message.receiver);
|
|
1307
|
-
}
|
|
1308
|
-
if (message.objectId !== undefined) {
|
|
1309
|
-
obj.object_id = (message.objectId || Long.UZERO).toString();
|
|
1310
|
-
}
|
|
1311
|
-
if (message.objectType !== 0) {
|
|
1312
|
-
obj.object_type = objectTypeToJSON(message.objectType);
|
|
1313
|
-
}
|
|
1314
|
-
if (message.timestamp !== undefined) {
|
|
1315
|
-
obj.timestamp = message.timestamp.toISOString();
|
|
1316
|
-
}
|
|
1317
|
-
if (message.data) {
|
|
1318
|
-
const entries = Object.entries(message.data);
|
|
1319
|
-
if (entries.length > 0) {
|
|
1320
|
-
obj.data = {};
|
|
1321
|
-
entries.forEach(([k, v]) => {
|
|
1322
|
-
obj.data[k] = v;
|
|
1323
|
-
});
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
return obj;
|
|
1327
|
-
},
|
|
1328
854
|
create(base) {
|
|
1329
855
|
return Notify.fromPartial(base ?? {});
|
|
1330
856
|
},
|
|
@@ -1394,22 +920,6 @@ export const Notify_DataEntry = {
|
|
|
1394
920
|
}
|
|
1395
921
|
return message;
|
|
1396
922
|
},
|
|
1397
|
-
fromJSON(object) {
|
|
1398
|
-
return {
|
|
1399
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1400
|
-
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
1401
|
-
};
|
|
1402
|
-
},
|
|
1403
|
-
toJSON(message) {
|
|
1404
|
-
const obj = {};
|
|
1405
|
-
if (message.key !== "") {
|
|
1406
|
-
obj.key = message.key;
|
|
1407
|
-
}
|
|
1408
|
-
if (message.value !== "") {
|
|
1409
|
-
obj.value = message.value;
|
|
1410
|
-
}
|
|
1411
|
-
return obj;
|
|
1412
|
-
},
|
|
1413
923
|
create(base) {
|
|
1414
924
|
return Notify_DataEntry.fromPartial(base ?? {});
|
|
1415
925
|
},
|
|
@@ -1620,85 +1130,6 @@ export const Notification = {
|
|
|
1620
1130
|
}
|
|
1621
1131
|
return message;
|
|
1622
1132
|
},
|
|
1623
|
-
fromJSON(object) {
|
|
1624
|
-
return {
|
|
1625
|
-
uuid: isSet(object.uuid) ? globalThis.String(object.uuid) : "",
|
|
1626
|
-
userId: isSet(object.user_id) ? Long.fromValue(object.user_id) : Long.UZERO,
|
|
1627
|
-
objectId: isSet(object.object_id) ? Long.fromValue(object.object_id) : undefined,
|
|
1628
|
-
objectType: isSet(object.object_type) ? objectTypeFromJSON(object.object_type) : undefined,
|
|
1629
|
-
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1630
|
-
body: isSet(object.body) ? globalThis.String(object.body) : undefined,
|
|
1631
|
-
alertId: isSet(object.alert_id) ? Long.fromValue(object.alert_id) : undefined,
|
|
1632
|
-
alert: isSet(object.alert) ? alertFromJSON(object.alert) : 0,
|
|
1633
|
-
via: globalThis.Array.isArray(object?.via) ? object.via.map((e) => viaFromJSON(e)) : [],
|
|
1634
|
-
data: isObject(object.data)
|
|
1635
|
-
? Object.entries(object.data).reduce((acc, [key, value]) => {
|
|
1636
|
-
acc[key] = String(value);
|
|
1637
|
-
return acc;
|
|
1638
|
-
}, {})
|
|
1639
|
-
: {},
|
|
1640
|
-
image: isSet(object.image) ? globalThis.String(object.image) : undefined,
|
|
1641
|
-
sound: isSet(object.sound) ? Long.fromValue(object.sound) : undefined,
|
|
1642
|
-
createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
|
|
1643
|
-
readAt: isSet(object.read_at) ? fromJsonTimestamp(object.read_at) : undefined,
|
|
1644
|
-
userAlertId: isSet(object.user_alert_id) ? Long.fromValue(object.user_alert_id) : undefined,
|
|
1645
|
-
};
|
|
1646
|
-
},
|
|
1647
|
-
toJSON(message) {
|
|
1648
|
-
const obj = {};
|
|
1649
|
-
if (message.uuid !== "") {
|
|
1650
|
-
obj.uuid = message.uuid;
|
|
1651
|
-
}
|
|
1652
|
-
if (!message.userId.equals(Long.UZERO)) {
|
|
1653
|
-
obj.user_id = (message.userId || Long.UZERO).toString();
|
|
1654
|
-
}
|
|
1655
|
-
if (message.objectId !== undefined) {
|
|
1656
|
-
obj.object_id = (message.objectId || Long.UZERO).toString();
|
|
1657
|
-
}
|
|
1658
|
-
if (message.objectType !== undefined) {
|
|
1659
|
-
obj.object_type = objectTypeToJSON(message.objectType);
|
|
1660
|
-
}
|
|
1661
|
-
if (message.title !== "") {
|
|
1662
|
-
obj.title = message.title;
|
|
1663
|
-
}
|
|
1664
|
-
if (message.body !== undefined) {
|
|
1665
|
-
obj.body = message.body;
|
|
1666
|
-
}
|
|
1667
|
-
if (message.alertId !== undefined) {
|
|
1668
|
-
obj.alert_id = (message.alertId || Long.UZERO).toString();
|
|
1669
|
-
}
|
|
1670
|
-
if (message.alert !== 0) {
|
|
1671
|
-
obj.alert = alertToJSON(message.alert);
|
|
1672
|
-
}
|
|
1673
|
-
if (message.via?.length) {
|
|
1674
|
-
obj.via = message.via.map((e) => viaToJSON(e));
|
|
1675
|
-
}
|
|
1676
|
-
if (message.data) {
|
|
1677
|
-
const entries = Object.entries(message.data);
|
|
1678
|
-
if (entries.length > 0) {
|
|
1679
|
-
obj.data = {};
|
|
1680
|
-
entries.forEach(([k, v]) => {
|
|
1681
|
-
obj.data[k] = v;
|
|
1682
|
-
});
|
|
1683
|
-
}
|
|
1684
|
-
}
|
|
1685
|
-
if (message.image !== undefined) {
|
|
1686
|
-
obj.image = message.image;
|
|
1687
|
-
}
|
|
1688
|
-
if (message.sound !== undefined) {
|
|
1689
|
-
obj.sound = (message.sound || Long.UZERO).toString();
|
|
1690
|
-
}
|
|
1691
|
-
if (message.createdAt !== undefined) {
|
|
1692
|
-
obj.created_at = message.createdAt.toISOString();
|
|
1693
|
-
}
|
|
1694
|
-
if (message.readAt !== undefined) {
|
|
1695
|
-
obj.read_at = message.readAt.toISOString();
|
|
1696
|
-
}
|
|
1697
|
-
if (message.userAlertId !== undefined) {
|
|
1698
|
-
obj.user_alert_id = (message.userAlertId || Long.UZERO).toString();
|
|
1699
|
-
}
|
|
1700
|
-
return obj;
|
|
1701
|
-
},
|
|
1702
1133
|
create(base) {
|
|
1703
1134
|
return Notification.fromPartial(base ?? {});
|
|
1704
1135
|
},
|
|
@@ -1777,22 +1208,6 @@ export const Notification_DataEntry = {
|
|
|
1777
1208
|
}
|
|
1778
1209
|
return message;
|
|
1779
1210
|
},
|
|
1780
|
-
fromJSON(object) {
|
|
1781
|
-
return {
|
|
1782
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1783
|
-
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
1784
|
-
};
|
|
1785
|
-
},
|
|
1786
|
-
toJSON(message) {
|
|
1787
|
-
const obj = {};
|
|
1788
|
-
if (message.key !== "") {
|
|
1789
|
-
obj.key = message.key;
|
|
1790
|
-
}
|
|
1791
|
-
if (message.value !== "") {
|
|
1792
|
-
obj.value = message.value;
|
|
1793
|
-
}
|
|
1794
|
-
return obj;
|
|
1795
|
-
},
|
|
1796
1211
|
create(base) {
|
|
1797
1212
|
return Notification_DataEntry.fromPartial(base ?? {});
|
|
1798
1213
|
},
|
|
@@ -2002,78 +1417,6 @@ export const AlertModel = {
|
|
|
2002
1417
|
}
|
|
2003
1418
|
return message;
|
|
2004
1419
|
},
|
|
2005
|
-
fromJSON(object) {
|
|
2006
|
-
return {
|
|
2007
|
-
id: isSet(object.id) ? Long.fromValue(object.id) : Long.UZERO,
|
|
2008
|
-
organizationId: isSet(object.organizationId) ? Long.fromValue(object.organizationId) : Long.UZERO,
|
|
2009
|
-
alertId: isSet(object.alertId) ? Long.fromValue(object.alertId) : Long.UZERO,
|
|
2010
|
-
alertType: isSet(object.alertType) ? Long.fromValue(object.alertType) : Long.UZERO,
|
|
2011
|
-
unit: isSet(object.unit) ? globalThis.String(object.unit) : undefined,
|
|
2012
|
-
value: isSet(object.value) ? Long.fromValue(object.value) : undefined,
|
|
2013
|
-
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
2014
|
-
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
2015
|
-
minValue: isSet(object.minValue) ? globalThis.String(object.minValue) : undefined,
|
|
2016
|
-
maxValue: isSet(object.maxValue) ? globalThis.String(object.maxValue) : undefined,
|
|
2017
|
-
picture: isSet(object.picture) ? globalThis.String(object.picture) : undefined,
|
|
2018
|
-
createdBy: isSet(object.createdBy) ? Long.fromValue(object.createdBy) : undefined,
|
|
2019
|
-
updatedBy: isSet(object.updatedBy) ? Long.fromValue(object.updatedBy) : undefined,
|
|
2020
|
-
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
2021
|
-
updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
|
|
2022
|
-
objectType: isSet(object.objectType) ? globalThis.String(object.objectType) : undefined,
|
|
2023
|
-
};
|
|
2024
|
-
},
|
|
2025
|
-
toJSON(message) {
|
|
2026
|
-
const obj = {};
|
|
2027
|
-
if (!message.id.equals(Long.UZERO)) {
|
|
2028
|
-
obj.id = (message.id || Long.UZERO).toString();
|
|
2029
|
-
}
|
|
2030
|
-
if (!message.organizationId.equals(Long.UZERO)) {
|
|
2031
|
-
obj.organizationId = (message.organizationId || Long.UZERO).toString();
|
|
2032
|
-
}
|
|
2033
|
-
if (!message.alertId.equals(Long.UZERO)) {
|
|
2034
|
-
obj.alertId = (message.alertId || Long.UZERO).toString();
|
|
2035
|
-
}
|
|
2036
|
-
if (!message.alertType.equals(Long.UZERO)) {
|
|
2037
|
-
obj.alertType = (message.alertType || Long.UZERO).toString();
|
|
2038
|
-
}
|
|
2039
|
-
if (message.unit !== undefined) {
|
|
2040
|
-
obj.unit = message.unit;
|
|
2041
|
-
}
|
|
2042
|
-
if (message.value !== undefined) {
|
|
2043
|
-
obj.value = (message.value || Long.UZERO).toString();
|
|
2044
|
-
}
|
|
2045
|
-
if (message.message !== "") {
|
|
2046
|
-
obj.message = message.message;
|
|
2047
|
-
}
|
|
2048
|
-
if (message.name !== "") {
|
|
2049
|
-
obj.name = message.name;
|
|
2050
|
-
}
|
|
2051
|
-
if (message.minValue !== undefined) {
|
|
2052
|
-
obj.minValue = message.minValue;
|
|
2053
|
-
}
|
|
2054
|
-
if (message.maxValue !== undefined) {
|
|
2055
|
-
obj.maxValue = message.maxValue;
|
|
2056
|
-
}
|
|
2057
|
-
if (message.picture !== undefined) {
|
|
2058
|
-
obj.picture = message.picture;
|
|
2059
|
-
}
|
|
2060
|
-
if (message.createdBy !== undefined) {
|
|
2061
|
-
obj.createdBy = (message.createdBy || Long.UZERO).toString();
|
|
2062
|
-
}
|
|
2063
|
-
if (message.updatedBy !== undefined) {
|
|
2064
|
-
obj.updatedBy = (message.updatedBy || Long.UZERO).toString();
|
|
2065
|
-
}
|
|
2066
|
-
if (message.createdAt !== undefined) {
|
|
2067
|
-
obj.createdAt = message.createdAt.toISOString();
|
|
2068
|
-
}
|
|
2069
|
-
if (message.updatedAt !== undefined) {
|
|
2070
|
-
obj.updatedAt = message.updatedAt.toISOString();
|
|
2071
|
-
}
|
|
2072
|
-
if (message.objectType !== undefined) {
|
|
2073
|
-
obj.objectType = message.objectType;
|
|
2074
|
-
}
|
|
2075
|
-
return obj;
|
|
2076
|
-
},
|
|
2077
1420
|
create(base) {
|
|
2078
1421
|
return AlertModel.fromPartial(base ?? {});
|
|
2079
1422
|
},
|
|
@@ -2241,54 +1584,6 @@ export const Event = {
|
|
|
2241
1584
|
}
|
|
2242
1585
|
return message;
|
|
2243
1586
|
},
|
|
2244
|
-
fromJSON(object) {
|
|
2245
|
-
return {
|
|
2246
|
-
id: isSet(object.id) ? Long.fromValue(object.id) : Long.UZERO,
|
|
2247
|
-
userId: isSet(object.user_id) ? Long.fromValue(object.user_id) : Long.UZERO,
|
|
2248
|
-
deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
|
|
2249
|
-
organizationId: isSet(object.organization_id) ? Long.fromValue(object.organization_id) : Long.UZERO,
|
|
2250
|
-
createdBy: isSet(object.created_by) ? Long.fromValue(object.created_by) : undefined,
|
|
2251
|
-
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
2252
|
-
eventData: isSet(object.event_data) ? EventData.fromJSON(object.event_data) : undefined,
|
|
2253
|
-
status: isSet(object.status) ? globalThis.Boolean(object.status) : false,
|
|
2254
|
-
createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
|
|
2255
|
-
updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
|
|
2256
|
-
};
|
|
2257
|
-
},
|
|
2258
|
-
toJSON(message) {
|
|
2259
|
-
const obj = {};
|
|
2260
|
-
if (!message.id.equals(Long.UZERO)) {
|
|
2261
|
-
obj.id = (message.id || Long.UZERO).toString();
|
|
2262
|
-
}
|
|
2263
|
-
if (!message.userId.equals(Long.UZERO)) {
|
|
2264
|
-
obj.user_id = (message.userId || Long.UZERO).toString();
|
|
2265
|
-
}
|
|
2266
|
-
if (!message.deviceId.equals(Long.UZERO)) {
|
|
2267
|
-
obj.device_id = (message.deviceId || Long.UZERO).toString();
|
|
2268
|
-
}
|
|
2269
|
-
if (!message.organizationId.equals(Long.UZERO)) {
|
|
2270
|
-
obj.organization_id = (message.organizationId || Long.UZERO).toString();
|
|
2271
|
-
}
|
|
2272
|
-
if (message.createdBy !== undefined) {
|
|
2273
|
-
obj.created_by = (message.createdBy || Long.UZERO).toString();
|
|
2274
|
-
}
|
|
2275
|
-
if (message.name !== "") {
|
|
2276
|
-
obj.name = message.name;
|
|
2277
|
-
}
|
|
2278
|
-
if (message.eventData !== undefined) {
|
|
2279
|
-
obj.event_data = EventData.toJSON(message.eventData);
|
|
2280
|
-
}
|
|
2281
|
-
if (message.status !== false) {
|
|
2282
|
-
obj.status = message.status;
|
|
2283
|
-
}
|
|
2284
|
-
if (message.createdAt !== undefined) {
|
|
2285
|
-
obj.created_at = message.createdAt.toISOString();
|
|
2286
|
-
}
|
|
2287
|
-
if (message.updatedAt !== undefined) {
|
|
2288
|
-
obj.updated_at = message.updatedAt.toISOString();
|
|
2289
|
-
}
|
|
2290
|
-
return obj;
|
|
2291
|
-
},
|
|
2292
1587
|
create(base) {
|
|
2293
1588
|
return Event.fromPartial(base ?? {});
|
|
2294
1589
|
},
|
|
@@ -2389,34 +1684,6 @@ export const EventList = {
|
|
|
2389
1684
|
}
|
|
2390
1685
|
return message;
|
|
2391
1686
|
},
|
|
2392
|
-
fromJSON(object) {
|
|
2393
|
-
return {
|
|
2394
|
-
total: isSet(object.total) ? globalThis.Number(object.total) : 0,
|
|
2395
|
-
currentPage: isSet(object.current_page) ? globalThis.Number(object.current_page) : 0,
|
|
2396
|
-
lastPage: isSet(object.last_page) ? globalThis.Number(object.last_page) : 0,
|
|
2397
|
-
perPage: isSet(object.per_page) ? globalThis.Number(object.per_page) : 0,
|
|
2398
|
-
events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => Event.fromJSON(e)) : [],
|
|
2399
|
-
};
|
|
2400
|
-
},
|
|
2401
|
-
toJSON(message) {
|
|
2402
|
-
const obj = {};
|
|
2403
|
-
if (message.total !== 0) {
|
|
2404
|
-
obj.total = Math.round(message.total);
|
|
2405
|
-
}
|
|
2406
|
-
if (message.currentPage !== 0) {
|
|
2407
|
-
obj.current_page = Math.round(message.currentPage);
|
|
2408
|
-
}
|
|
2409
|
-
if (message.lastPage !== 0) {
|
|
2410
|
-
obj.last_page = Math.round(message.lastPage);
|
|
2411
|
-
}
|
|
2412
|
-
if (message.perPage !== 0) {
|
|
2413
|
-
obj.per_page = Math.round(message.perPage);
|
|
2414
|
-
}
|
|
2415
|
-
if (message.events?.length) {
|
|
2416
|
-
obj.events = message.events.map((e) => Event.toJSON(e));
|
|
2417
|
-
}
|
|
2418
|
-
return obj;
|
|
2419
|
-
},
|
|
2420
1687
|
create(base) {
|
|
2421
1688
|
return EventList.fromPartial(base ?? {});
|
|
2422
1689
|
},
|
|
@@ -2530,42 +1797,6 @@ export const EventTemplate = {
|
|
|
2530
1797
|
}
|
|
2531
1798
|
return message;
|
|
2532
1799
|
},
|
|
2533
|
-
fromJSON(object) {
|
|
2534
|
-
return {
|
|
2535
|
-
id: isSet(object.id) ? Long.fromValue(object.id) : Long.UZERO,
|
|
2536
|
-
organizationId: isSet(object.organization_id) ? Long.fromValue(object.organization_id) : undefined,
|
|
2537
|
-
createdBy: isSet(object.created_by) ? Long.fromValue(object.created_by) : undefined,
|
|
2538
|
-
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
2539
|
-
eventData: isSet(object.event_data) ? EventData.fromJSON(object.event_data) : undefined,
|
|
2540
|
-
createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
|
|
2541
|
-
updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
|
|
2542
|
-
};
|
|
2543
|
-
},
|
|
2544
|
-
toJSON(message) {
|
|
2545
|
-
const obj = {};
|
|
2546
|
-
if (!message.id.equals(Long.UZERO)) {
|
|
2547
|
-
obj.id = (message.id || Long.UZERO).toString();
|
|
2548
|
-
}
|
|
2549
|
-
if (message.organizationId !== undefined) {
|
|
2550
|
-
obj.organization_id = (message.organizationId || Long.UZERO).toString();
|
|
2551
|
-
}
|
|
2552
|
-
if (message.createdBy !== undefined) {
|
|
2553
|
-
obj.created_by = (message.createdBy || Long.UZERO).toString();
|
|
2554
|
-
}
|
|
2555
|
-
if (message.name !== "") {
|
|
2556
|
-
obj.name = message.name;
|
|
2557
|
-
}
|
|
2558
|
-
if (message.eventData !== undefined) {
|
|
2559
|
-
obj.event_data = EventData.toJSON(message.eventData);
|
|
2560
|
-
}
|
|
2561
|
-
if (message.createdAt !== undefined) {
|
|
2562
|
-
obj.created_at = message.createdAt.toISOString();
|
|
2563
|
-
}
|
|
2564
|
-
if (message.updatedAt !== undefined) {
|
|
2565
|
-
obj.updated_at = message.updatedAt.toISOString();
|
|
2566
|
-
}
|
|
2567
|
-
return obj;
|
|
2568
|
-
},
|
|
2569
1800
|
create(base) {
|
|
2570
1801
|
return EventTemplate.fromPartial(base ?? {});
|
|
2571
1802
|
},
|
|
@@ -2707,50 +1938,6 @@ export const EventData = {
|
|
|
2707
1938
|
}
|
|
2708
1939
|
return message;
|
|
2709
1940
|
},
|
|
2710
|
-
fromJSON(object) {
|
|
2711
|
-
return {
|
|
2712
|
-
continuous: isSet(object.continuous) ? globalThis.Boolean(object.continuous) : false,
|
|
2713
|
-
blindFilter: isSet(object.blind_filter) ? globalThis.Boolean(object.blind_filter) : false,
|
|
2714
|
-
notify: isSet(object.notify) ? AlertNotify.fromJSON(object.notify) : undefined,
|
|
2715
|
-
triggerGate: isSet(object.trigger_gate) ? triggerGateFromJSON(object.trigger_gate) : 0,
|
|
2716
|
-
muteMask: globalThis.Array.isArray(object?.mute_mask)
|
|
2717
|
-
? object.mute_mask.map((e) => MuteMask.fromJSON(e))
|
|
2718
|
-
: [],
|
|
2719
|
-
eventModules: globalThis.Array.isArray(object?.event_modules)
|
|
2720
|
-
? object.event_modules.map((e) => EventModule.fromJSON(e))
|
|
2721
|
-
: [],
|
|
2722
|
-
via: globalThis.Array.isArray(object?.via) ? object.via.map((e) => viaFromJSON(e)) : [],
|
|
2723
|
-
templateId: isSet(object.template_id) ? Long.fromValue(object.template_id) : undefined,
|
|
2724
|
-
};
|
|
2725
|
-
},
|
|
2726
|
-
toJSON(message) {
|
|
2727
|
-
const obj = {};
|
|
2728
|
-
if (message.continuous !== false) {
|
|
2729
|
-
obj.continuous = message.continuous;
|
|
2730
|
-
}
|
|
2731
|
-
if (message.blindFilter !== false) {
|
|
2732
|
-
obj.blind_filter = message.blindFilter;
|
|
2733
|
-
}
|
|
2734
|
-
if (message.notify !== undefined) {
|
|
2735
|
-
obj.notify = AlertNotify.toJSON(message.notify);
|
|
2736
|
-
}
|
|
2737
|
-
if (message.triggerGate !== 0) {
|
|
2738
|
-
obj.trigger_gate = triggerGateToJSON(message.triggerGate);
|
|
2739
|
-
}
|
|
2740
|
-
if (message.muteMask?.length) {
|
|
2741
|
-
obj.mute_mask = message.muteMask.map((e) => MuteMask.toJSON(e));
|
|
2742
|
-
}
|
|
2743
|
-
if (message.eventModules?.length) {
|
|
2744
|
-
obj.event_modules = message.eventModules.map((e) => EventModule.toJSON(e));
|
|
2745
|
-
}
|
|
2746
|
-
if (message.via?.length) {
|
|
2747
|
-
obj.via = message.via.map((e) => viaToJSON(e));
|
|
2748
|
-
}
|
|
2749
|
-
if (message.templateId !== undefined) {
|
|
2750
|
-
obj.template_id = (message.templateId || Long.UZERO).toString();
|
|
2751
|
-
}
|
|
2752
|
-
return obj;
|
|
2753
|
-
},
|
|
2754
1941
|
create(base) {
|
|
2755
1942
|
return EventData.fromPartial(base ?? {});
|
|
2756
1943
|
},
|
|
@@ -2833,30 +2020,6 @@ export const MuteMask = {
|
|
|
2833
2020
|
}
|
|
2834
2021
|
return message;
|
|
2835
2022
|
},
|
|
2836
|
-
fromJSON(object) {
|
|
2837
|
-
return {
|
|
2838
|
-
dayOfMonth: isSet(object.day_of_month) ? globalThis.Number(object.day_of_month) : undefined,
|
|
2839
|
-
dayOfWeek: isSet(object.day_of_week) ? globalThis.Number(object.day_of_week) : undefined,
|
|
2840
|
-
fromSeconds: isSet(object.from_minute) ? globalThis.Number(object.from_minute) : undefined,
|
|
2841
|
-
toSeconds: isSet(object.to_minute) ? globalThis.Number(object.to_minute) : undefined,
|
|
2842
|
-
};
|
|
2843
|
-
},
|
|
2844
|
-
toJSON(message) {
|
|
2845
|
-
const obj = {};
|
|
2846
|
-
if (message.dayOfMonth !== undefined) {
|
|
2847
|
-
obj.day_of_month = Math.round(message.dayOfMonth);
|
|
2848
|
-
}
|
|
2849
|
-
if (message.dayOfWeek !== undefined) {
|
|
2850
|
-
obj.day_of_week = Math.round(message.dayOfWeek);
|
|
2851
|
-
}
|
|
2852
|
-
if (message.fromSeconds !== undefined) {
|
|
2853
|
-
obj.from_minute = Math.round(message.fromSeconds);
|
|
2854
|
-
}
|
|
2855
|
-
if (message.toSeconds !== undefined) {
|
|
2856
|
-
obj.to_minute = Math.round(message.toSeconds);
|
|
2857
|
-
}
|
|
2858
|
-
return obj;
|
|
2859
|
-
},
|
|
2860
2023
|
create(base) {
|
|
2861
2024
|
return MuteMask.fromPartial(base ?? {});
|
|
2862
2025
|
},
|
|
@@ -2941,34 +2104,6 @@ export const AlertNotify = {
|
|
|
2941
2104
|
}
|
|
2942
2105
|
return message;
|
|
2943
2106
|
},
|
|
2944
|
-
fromJSON(object) {
|
|
2945
|
-
return {
|
|
2946
|
-
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
2947
|
-
body: isSet(object.body) ? globalThis.String(object.body) : undefined,
|
|
2948
|
-
sound: isSet(object.sound) ? Long.fromValue(object.sound) : undefined,
|
|
2949
|
-
image: isSet(object.image) ? globalThis.String(object.image) : undefined,
|
|
2950
|
-
icon: isSet(object.icon) ? globalThis.String(object.icon) : undefined,
|
|
2951
|
-
};
|
|
2952
|
-
},
|
|
2953
|
-
toJSON(message) {
|
|
2954
|
-
const obj = {};
|
|
2955
|
-
if (message.title !== "") {
|
|
2956
|
-
obj.title = message.title;
|
|
2957
|
-
}
|
|
2958
|
-
if (message.body !== undefined) {
|
|
2959
|
-
obj.body = message.body;
|
|
2960
|
-
}
|
|
2961
|
-
if (message.sound !== undefined) {
|
|
2962
|
-
obj.sound = (message.sound || Long.UZERO).toString();
|
|
2963
|
-
}
|
|
2964
|
-
if (message.image !== undefined) {
|
|
2965
|
-
obj.image = message.image;
|
|
2966
|
-
}
|
|
2967
|
-
if (message.icon !== undefined) {
|
|
2968
|
-
obj.icon = message.icon;
|
|
2969
|
-
}
|
|
2970
|
-
return obj;
|
|
2971
|
-
},
|
|
2972
2107
|
create(base) {
|
|
2973
2108
|
return AlertNotify.fromPartial(base ?? {});
|
|
2974
2109
|
},
|
|
@@ -3024,22 +2159,6 @@ export const AreaEvent = {
|
|
|
3024
2159
|
}
|
|
3025
2160
|
return message;
|
|
3026
2161
|
},
|
|
3027
|
-
fromJSON(object) {
|
|
3028
|
-
return {
|
|
3029
|
-
areaId: isSet(object.area_id) ? Long.fromValue(object.area_id) : Long.UZERO,
|
|
3030
|
-
eventType: isSet(object.event_type) ? areaEventTypeFromJSON(object.event_type) : 0,
|
|
3031
|
-
};
|
|
3032
|
-
},
|
|
3033
|
-
toJSON(message) {
|
|
3034
|
-
const obj = {};
|
|
3035
|
-
if (!message.areaId.equals(Long.UZERO)) {
|
|
3036
|
-
obj.area_id = (message.areaId || Long.UZERO).toString();
|
|
3037
|
-
}
|
|
3038
|
-
if (message.eventType !== 0) {
|
|
3039
|
-
obj.event_type = areaEventTypeToJSON(message.eventType);
|
|
3040
|
-
}
|
|
3041
|
-
return obj;
|
|
3042
|
-
},
|
|
3043
2162
|
create(base) {
|
|
3044
2163
|
return AreaEvent.fromPartial(base ?? {});
|
|
3045
2164
|
},
|
|
@@ -3094,22 +2213,6 @@ export const DigitalEvent = {
|
|
|
3094
2213
|
}
|
|
3095
2214
|
return message;
|
|
3096
2215
|
},
|
|
3097
|
-
fromJSON(object) {
|
|
3098
|
-
return {
|
|
3099
|
-
trigger: isSet(object.trigger) ? globalThis.Boolean(object.trigger) : false,
|
|
3100
|
-
io: isSet(object.io) ? globalThis.String(object.io) : "",
|
|
3101
|
-
};
|
|
3102
|
-
},
|
|
3103
|
-
toJSON(message) {
|
|
3104
|
-
const obj = {};
|
|
3105
|
-
if (message.trigger !== false) {
|
|
3106
|
-
obj.trigger = message.trigger;
|
|
3107
|
-
}
|
|
3108
|
-
if (message.io !== "") {
|
|
3109
|
-
obj.io = message.io;
|
|
3110
|
-
}
|
|
3111
|
-
return obj;
|
|
3112
|
-
},
|
|
3113
2216
|
create(base) {
|
|
3114
2217
|
return DigitalEvent.fromPartial(base ?? {});
|
|
3115
2218
|
},
|
|
@@ -3182,30 +2285,6 @@ export const AnalogEvent = {
|
|
|
3182
2285
|
}
|
|
3183
2286
|
return message;
|
|
3184
2287
|
},
|
|
3185
|
-
fromJSON(object) {
|
|
3186
|
-
return {
|
|
3187
|
-
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
3188
|
-
io: isSet(object.io) ? globalThis.String(object.io) : "",
|
|
3189
|
-
type: isSet(object.type) ? analogEventTypeFromJSON(object.type) : 0,
|
|
3190
|
-
tolerancePercent: isSet(object.tolerance_percent) ? globalThis.Number(object.tolerance_percent) : undefined,
|
|
3191
|
-
};
|
|
3192
|
-
},
|
|
3193
|
-
toJSON(message) {
|
|
3194
|
-
const obj = {};
|
|
3195
|
-
if (message.value !== 0) {
|
|
3196
|
-
obj.value = message.value;
|
|
3197
|
-
}
|
|
3198
|
-
if (message.io !== "") {
|
|
3199
|
-
obj.io = message.io;
|
|
3200
|
-
}
|
|
3201
|
-
if (message.type !== 0) {
|
|
3202
|
-
obj.type = analogEventTypeToJSON(message.type);
|
|
3203
|
-
}
|
|
3204
|
-
if (message.tolerancePercent !== undefined) {
|
|
3205
|
-
obj.tolerance_percent = Math.round(message.tolerancePercent);
|
|
3206
|
-
}
|
|
3207
|
-
return obj;
|
|
3208
|
-
},
|
|
3209
2288
|
create(base) {
|
|
3210
2289
|
return AnalogEvent.fromPartial(base ?? {});
|
|
3211
2290
|
},
|
|
@@ -3250,16 +2329,6 @@ export const FormulaEvent = {
|
|
|
3250
2329
|
}
|
|
3251
2330
|
return message;
|
|
3252
2331
|
},
|
|
3253
|
-
fromJSON(object) {
|
|
3254
|
-
return { formula: isSet(object.formula) ? globalThis.String(object.formula) : "" };
|
|
3255
|
-
},
|
|
3256
|
-
toJSON(message) {
|
|
3257
|
-
const obj = {};
|
|
3258
|
-
if (message.formula !== "") {
|
|
3259
|
-
obj.formula = message.formula;
|
|
3260
|
-
}
|
|
3261
|
-
return obj;
|
|
3262
|
-
},
|
|
3263
2332
|
create(base) {
|
|
3264
2333
|
return FormulaEvent.fromPartial(base ?? {});
|
|
3265
2334
|
},
|
|
@@ -3301,16 +2370,6 @@ export const ProtocolEvent = {
|
|
|
3301
2370
|
}
|
|
3302
2371
|
return message;
|
|
3303
2372
|
},
|
|
3304
|
-
fromJSON(object) {
|
|
3305
|
-
return { alert: isSet(object.alert) ? alertFromJSON(object.alert) : 0 };
|
|
3306
|
-
},
|
|
3307
|
-
toJSON(message) {
|
|
3308
|
-
const obj = {};
|
|
3309
|
-
if (message.alert !== 0) {
|
|
3310
|
-
obj.alert = alertToJSON(message.alert);
|
|
3311
|
-
}
|
|
3312
|
-
return obj;
|
|
3313
|
-
},
|
|
3314
2373
|
create(base) {
|
|
3315
2374
|
return ProtocolEvent.fromPartial(base ?? {});
|
|
3316
2375
|
},
|
|
@@ -3352,16 +2411,6 @@ export const SpeedEvent = {
|
|
|
3352
2411
|
}
|
|
3353
2412
|
return message;
|
|
3354
2413
|
},
|
|
3355
|
-
fromJSON(object) {
|
|
3356
|
-
return { speedLimit: isSet(object.speed_limit) ? globalThis.Number(object.speed_limit) : 0 };
|
|
3357
|
-
},
|
|
3358
|
-
toJSON(message) {
|
|
3359
|
-
const obj = {};
|
|
3360
|
-
if (message.speedLimit !== 0) {
|
|
3361
|
-
obj.speed_limit = Math.round(message.speedLimit);
|
|
3362
|
-
}
|
|
3363
|
-
return obj;
|
|
3364
|
-
},
|
|
3365
2414
|
create(base) {
|
|
3366
2415
|
return SpeedEvent.fromPartial(base ?? {});
|
|
3367
2416
|
},
|
|
@@ -3413,22 +2462,6 @@ export const IgnitionEvent = {
|
|
|
3413
2462
|
}
|
|
3414
2463
|
return message;
|
|
3415
2464
|
},
|
|
3416
|
-
fromJSON(object) {
|
|
3417
|
-
return {
|
|
3418
|
-
ignitionOn: isSet(object.ignitionOn) ? globalThis.Boolean(object.ignitionOn) : false,
|
|
3419
|
-
ignitionOff: isSet(object.ignitionOff) ? globalThis.Boolean(object.ignitionOff) : false,
|
|
3420
|
-
};
|
|
3421
|
-
},
|
|
3422
|
-
toJSON(message) {
|
|
3423
|
-
const obj = {};
|
|
3424
|
-
if (message.ignitionOn !== false) {
|
|
3425
|
-
obj.ignitionOn = message.ignitionOn;
|
|
3426
|
-
}
|
|
3427
|
-
if (message.ignitionOff !== false) {
|
|
3428
|
-
obj.ignitionOff = message.ignitionOff;
|
|
3429
|
-
}
|
|
3430
|
-
return obj;
|
|
3431
|
-
},
|
|
3432
2465
|
create(base) {
|
|
3433
2466
|
return IgnitionEvent.fromPartial(base ?? {});
|
|
3434
2467
|
},
|
|
@@ -3471,16 +2504,6 @@ export const BatteryEvent = {
|
|
|
3471
2504
|
}
|
|
3472
2505
|
return message;
|
|
3473
2506
|
},
|
|
3474
|
-
fromJSON(object) {
|
|
3475
|
-
return { percentBelow: isSet(object.percentBelow) ? globalThis.Number(object.percentBelow) : 0 };
|
|
3476
|
-
},
|
|
3477
|
-
toJSON(message) {
|
|
3478
|
-
const obj = {};
|
|
3479
|
-
if (message.percentBelow !== 0) {
|
|
3480
|
-
obj.percentBelow = Math.round(message.percentBelow);
|
|
3481
|
-
}
|
|
3482
|
-
return obj;
|
|
3483
|
-
},
|
|
3484
2507
|
create(base) {
|
|
3485
2508
|
return BatteryEvent.fromPartial(base ?? {});
|
|
3486
2509
|
},
|
|
@@ -3522,16 +2545,6 @@ export const OfflineEvent = {
|
|
|
3522
2545
|
}
|
|
3523
2546
|
return message;
|
|
3524
2547
|
},
|
|
3525
|
-
fromJSON(object) {
|
|
3526
|
-
return { seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO };
|
|
3527
|
-
},
|
|
3528
|
-
toJSON(message) {
|
|
3529
|
-
const obj = {};
|
|
3530
|
-
if (!message.seconds.equals(Long.ZERO)) {
|
|
3531
|
-
obj.seconds = (message.seconds || Long.ZERO).toString();
|
|
3532
|
-
}
|
|
3533
|
-
return obj;
|
|
3534
|
-
},
|
|
3535
2548
|
create(base) {
|
|
3536
2549
|
return OfflineEvent.fromPartial(base ?? {});
|
|
3537
2550
|
},
|
|
@@ -3575,16 +2588,6 @@ export const GpsEvent = {
|
|
|
3575
2588
|
}
|
|
3576
2589
|
return message;
|
|
3577
2590
|
},
|
|
3578
|
-
fromJSON(object) {
|
|
3579
|
-
return { satellitesBelow: isSet(object.satellitesBelow) ? globalThis.Number(object.satellitesBelow) : 0 };
|
|
3580
|
-
},
|
|
3581
|
-
toJSON(message) {
|
|
3582
|
-
const obj = {};
|
|
3583
|
-
if (message.satellitesBelow !== 0) {
|
|
3584
|
-
obj.satellitesBelow = Math.round(message.satellitesBelow);
|
|
3585
|
-
}
|
|
3586
|
-
return obj;
|
|
3587
|
-
},
|
|
3588
2591
|
create(base) {
|
|
3589
2592
|
return GpsEvent.fromPartial(base ?? {});
|
|
3590
2593
|
},
|
|
@@ -3626,16 +2629,6 @@ export const GsmEvent = {
|
|
|
3626
2629
|
}
|
|
3627
2630
|
return message;
|
|
3628
2631
|
},
|
|
3629
|
-
fromJSON(object) {
|
|
3630
|
-
return { signalBelow: isSet(object.signalBelow) ? globalThis.Number(object.signalBelow) : 0 };
|
|
3631
|
-
},
|
|
3632
|
-
toJSON(message) {
|
|
3633
|
-
const obj = {};
|
|
3634
|
-
if (message.signalBelow !== 0) {
|
|
3635
|
-
obj.signalBelow = Math.round(message.signalBelow);
|
|
3636
|
-
}
|
|
3637
|
-
return obj;
|
|
3638
|
-
},
|
|
3639
2632
|
create(base) {
|
|
3640
2633
|
return GsmEvent.fromPartial(base ?? {});
|
|
3641
2634
|
},
|
|
@@ -3800,62 +2793,6 @@ export const EventModule = {
|
|
|
3800
2793
|
}
|
|
3801
2794
|
return message;
|
|
3802
2795
|
},
|
|
3803
|
-
fromJSON(object) {
|
|
3804
|
-
return {
|
|
3805
|
-
forceToFill: isSet(object.forceToFill) ? globalThis.Boolean(object.forceToFill) : false,
|
|
3806
|
-
areaEvent: isSet(object.areaEvent) ? AreaEvent.fromJSON(object.areaEvent) : undefined,
|
|
3807
|
-
digitalEvent: isSet(object.digitalEvent) ? DigitalEvent.fromJSON(object.digitalEvent) : undefined,
|
|
3808
|
-
analogEvent: isSet(object.analogEvent) ? AnalogEvent.fromJSON(object.analogEvent) : undefined,
|
|
3809
|
-
formulaEvent: isSet(object.formulaEvent) ? FormulaEvent.fromJSON(object.formulaEvent) : undefined,
|
|
3810
|
-
protocolEvent: isSet(object.protocolEvent) ? ProtocolEvent.fromJSON(object.protocolEvent) : undefined,
|
|
3811
|
-
speedEvent: isSet(object.speedEvent) ? SpeedEvent.fromJSON(object.speedEvent) : undefined,
|
|
3812
|
-
ignitionEvent: isSet(object.ignitionEvent) ? IgnitionEvent.fromJSON(object.ignitionEvent) : undefined,
|
|
3813
|
-
batteryEvent: isSet(object.batteryEvent) ? BatteryEvent.fromJSON(object.batteryEvent) : undefined,
|
|
3814
|
-
offlineEvent: isSet(object.offlineEvent) ? OfflineEvent.fromJSON(object.offlineEvent) : undefined,
|
|
3815
|
-
gpsEvent: isSet(object.gpsEvent) ? GpsEvent.fromJSON(object.gpsEvent) : undefined,
|
|
3816
|
-
gsmEvent: isSet(object.gsmEvent) ? GsmEvent.fromJSON(object.gsmEvent) : undefined,
|
|
3817
|
-
};
|
|
3818
|
-
},
|
|
3819
|
-
toJSON(message) {
|
|
3820
|
-
const obj = {};
|
|
3821
|
-
if (message.forceToFill !== false) {
|
|
3822
|
-
obj.forceToFill = message.forceToFill;
|
|
3823
|
-
}
|
|
3824
|
-
if (message.areaEvent !== undefined) {
|
|
3825
|
-
obj.areaEvent = AreaEvent.toJSON(message.areaEvent);
|
|
3826
|
-
}
|
|
3827
|
-
if (message.digitalEvent !== undefined) {
|
|
3828
|
-
obj.digitalEvent = DigitalEvent.toJSON(message.digitalEvent);
|
|
3829
|
-
}
|
|
3830
|
-
if (message.analogEvent !== undefined) {
|
|
3831
|
-
obj.analogEvent = AnalogEvent.toJSON(message.analogEvent);
|
|
3832
|
-
}
|
|
3833
|
-
if (message.formulaEvent !== undefined) {
|
|
3834
|
-
obj.formulaEvent = FormulaEvent.toJSON(message.formulaEvent);
|
|
3835
|
-
}
|
|
3836
|
-
if (message.protocolEvent !== undefined) {
|
|
3837
|
-
obj.protocolEvent = ProtocolEvent.toJSON(message.protocolEvent);
|
|
3838
|
-
}
|
|
3839
|
-
if (message.speedEvent !== undefined) {
|
|
3840
|
-
obj.speedEvent = SpeedEvent.toJSON(message.speedEvent);
|
|
3841
|
-
}
|
|
3842
|
-
if (message.ignitionEvent !== undefined) {
|
|
3843
|
-
obj.ignitionEvent = IgnitionEvent.toJSON(message.ignitionEvent);
|
|
3844
|
-
}
|
|
3845
|
-
if (message.batteryEvent !== undefined) {
|
|
3846
|
-
obj.batteryEvent = BatteryEvent.toJSON(message.batteryEvent);
|
|
3847
|
-
}
|
|
3848
|
-
if (message.offlineEvent !== undefined) {
|
|
3849
|
-
obj.offlineEvent = OfflineEvent.toJSON(message.offlineEvent);
|
|
3850
|
-
}
|
|
3851
|
-
if (message.gpsEvent !== undefined) {
|
|
3852
|
-
obj.gpsEvent = GpsEvent.toJSON(message.gpsEvent);
|
|
3853
|
-
}
|
|
3854
|
-
if (message.gsmEvent !== undefined) {
|
|
3855
|
-
obj.gsmEvent = GsmEvent.toJSON(message.gsmEvent);
|
|
3856
|
-
}
|
|
3857
|
-
return obj;
|
|
3858
|
-
},
|
|
3859
2796
|
create(base) {
|
|
3860
2797
|
return EventModule.fromPartial(base ?? {});
|
|
3861
2798
|
},
|
|
@@ -3940,22 +2877,6 @@ export const IsRunningCache = {
|
|
|
3940
2877
|
}
|
|
3941
2878
|
return message;
|
|
3942
2879
|
},
|
|
3943
|
-
fromJSON(object) {
|
|
3944
|
-
return {
|
|
3945
|
-
isRunning: isSet(object.is_running) ? globalThis.Boolean(object.is_running) : false,
|
|
3946
|
-
notifiedAt: isSet(object.notified_at) ? Long.fromValue(object.notified_at) : Long.ZERO,
|
|
3947
|
-
};
|
|
3948
|
-
},
|
|
3949
|
-
toJSON(message) {
|
|
3950
|
-
const obj = {};
|
|
3951
|
-
if (message.isRunning !== false) {
|
|
3952
|
-
obj.is_running = message.isRunning;
|
|
3953
|
-
}
|
|
3954
|
-
if (!message.notifiedAt.equals(Long.ZERO)) {
|
|
3955
|
-
obj.notified_at = (message.notifiedAt || Long.ZERO).toString();
|
|
3956
|
-
}
|
|
3957
|
-
return obj;
|
|
3958
|
-
},
|
|
3959
2880
|
create(base) {
|
|
3960
2881
|
return IsRunningCache.fromPartial(base ?? {});
|
|
3961
2882
|
},
|
|
@@ -3978,23 +2899,6 @@ function fromTimestamp(t) {
|
|
|
3978
2899
|
millis += (t.nanos || 0) / 1_000_000;
|
|
3979
2900
|
return new globalThis.Date(millis);
|
|
3980
2901
|
}
|
|
3981
|
-
function fromJsonTimestamp(o) {
|
|
3982
|
-
if (o instanceof globalThis.Date) {
|
|
3983
|
-
return o;
|
|
3984
|
-
}
|
|
3985
|
-
else if (typeof o === "string") {
|
|
3986
|
-
return new globalThis.Date(o);
|
|
3987
|
-
}
|
|
3988
|
-
else {
|
|
3989
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
3990
|
-
}
|
|
3991
|
-
}
|
|
3992
2902
|
function numberToLong(number) {
|
|
3993
2903
|
return Long.fromNumber(number);
|
|
3994
2904
|
}
|
|
3995
|
-
function isObject(value) {
|
|
3996
|
-
return typeof value === "object" && value !== null;
|
|
3997
|
-
}
|
|
3998
|
-
function isSet(value) {
|
|
3999
|
-
return value !== null && value !== undefined;
|
|
4000
|
-
}
|