@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
|
@@ -18,41 +18,6 @@ export var WorkflowStat;
|
|
|
18
18
|
WorkflowStat[WorkflowStat["EXPIRED"] = 3] = "EXPIRED";
|
|
19
19
|
WorkflowStat[WorkflowStat["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
20
|
})(WorkflowStat || (WorkflowStat = {}));
|
|
21
|
-
export function workflowStatFromJSON(object) {
|
|
22
|
-
switch (object) {
|
|
23
|
-
case 0:
|
|
24
|
-
case "PENDING":
|
|
25
|
-
return WorkflowStat.PENDING;
|
|
26
|
-
case 1:
|
|
27
|
-
case "RUNNING":
|
|
28
|
-
return WorkflowStat.RUNNING;
|
|
29
|
-
case 2:
|
|
30
|
-
case "FINISHED":
|
|
31
|
-
return WorkflowStat.FINISHED;
|
|
32
|
-
case 3:
|
|
33
|
-
case "EXPIRED":
|
|
34
|
-
return WorkflowStat.EXPIRED;
|
|
35
|
-
case -1:
|
|
36
|
-
case "UNRECOGNIZED":
|
|
37
|
-
default:
|
|
38
|
-
return WorkflowStat.UNRECOGNIZED;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
export function workflowStatToJSON(object) {
|
|
42
|
-
switch (object) {
|
|
43
|
-
case WorkflowStat.PENDING:
|
|
44
|
-
return "PENDING";
|
|
45
|
-
case WorkflowStat.RUNNING:
|
|
46
|
-
return "RUNNING";
|
|
47
|
-
case WorkflowStat.FINISHED:
|
|
48
|
-
return "FINISHED";
|
|
49
|
-
case WorkflowStat.EXPIRED:
|
|
50
|
-
return "EXPIRED";
|
|
51
|
-
case WorkflowStat.UNRECOGNIZED:
|
|
52
|
-
default:
|
|
53
|
-
return "UNRECOGNIZED";
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
21
|
export var AreaEvent;
|
|
57
22
|
(function (AreaEvent) {
|
|
58
23
|
AreaEvent[AreaEvent["NONE"] = 0] = "NONE";
|
|
@@ -60,67 +25,12 @@ export var AreaEvent;
|
|
|
60
25
|
AreaEvent[AreaEvent["EXIT"] = 2] = "EXIT";
|
|
61
26
|
AreaEvent[AreaEvent["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
62
27
|
})(AreaEvent || (AreaEvent = {}));
|
|
63
|
-
export function areaEventFromJSON(object) {
|
|
64
|
-
switch (object) {
|
|
65
|
-
case 0:
|
|
66
|
-
case "NONE":
|
|
67
|
-
return AreaEvent.NONE;
|
|
68
|
-
case 1:
|
|
69
|
-
case "ENTER":
|
|
70
|
-
return AreaEvent.ENTER;
|
|
71
|
-
case 2:
|
|
72
|
-
case "EXIT":
|
|
73
|
-
return AreaEvent.EXIT;
|
|
74
|
-
case -1:
|
|
75
|
-
case "UNRECOGNIZED":
|
|
76
|
-
default:
|
|
77
|
-
return AreaEvent.UNRECOGNIZED;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
export function areaEventToJSON(object) {
|
|
81
|
-
switch (object) {
|
|
82
|
-
case AreaEvent.NONE:
|
|
83
|
-
return "NONE";
|
|
84
|
-
case AreaEvent.ENTER:
|
|
85
|
-
return "ENTER";
|
|
86
|
-
case AreaEvent.EXIT:
|
|
87
|
-
return "EXIT";
|
|
88
|
-
case AreaEvent.UNRECOGNIZED:
|
|
89
|
-
default:
|
|
90
|
-
return "UNRECOGNIZED";
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
28
|
export var FlowEvent_TriggerEvent;
|
|
94
29
|
(function (FlowEvent_TriggerEvent) {
|
|
95
30
|
FlowEvent_TriggerEvent[FlowEvent_TriggerEvent["ON_FINISH"] = 0] = "ON_FINISH";
|
|
96
31
|
FlowEvent_TriggerEvent[FlowEvent_TriggerEvent["ON_START"] = 1] = "ON_START";
|
|
97
32
|
FlowEvent_TriggerEvent[FlowEvent_TriggerEvent["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
98
33
|
})(FlowEvent_TriggerEvent || (FlowEvent_TriggerEvent = {}));
|
|
99
|
-
export function flowEvent_TriggerEventFromJSON(object) {
|
|
100
|
-
switch (object) {
|
|
101
|
-
case 0:
|
|
102
|
-
case "ON_FINISH":
|
|
103
|
-
return FlowEvent_TriggerEvent.ON_FINISH;
|
|
104
|
-
case 1:
|
|
105
|
-
case "ON_START":
|
|
106
|
-
return FlowEvent_TriggerEvent.ON_START;
|
|
107
|
-
case -1:
|
|
108
|
-
case "UNRECOGNIZED":
|
|
109
|
-
default:
|
|
110
|
-
return FlowEvent_TriggerEvent.UNRECOGNIZED;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
export function flowEvent_TriggerEventToJSON(object) {
|
|
114
|
-
switch (object) {
|
|
115
|
-
case FlowEvent_TriggerEvent.ON_FINISH:
|
|
116
|
-
return "ON_FINISH";
|
|
117
|
-
case FlowEvent_TriggerEvent.ON_START:
|
|
118
|
-
return "ON_START";
|
|
119
|
-
case FlowEvent_TriggerEvent.UNRECOGNIZED:
|
|
120
|
-
default:
|
|
121
|
-
return "UNRECOGNIZED";
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
34
|
export var NotificationTrigger_Via;
|
|
125
35
|
(function (NotificationTrigger_Via) {
|
|
126
36
|
NotificationTrigger_Via[NotificationTrigger_Via["FCM"] = 0] = "FCM";
|
|
@@ -129,41 +39,6 @@ export var NotificationTrigger_Via;
|
|
|
129
39
|
NotificationTrigger_Via[NotificationTrigger_Via["DATABASE"] = 3] = "DATABASE";
|
|
130
40
|
NotificationTrigger_Via[NotificationTrigger_Via["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
131
41
|
})(NotificationTrigger_Via || (NotificationTrigger_Via = {}));
|
|
132
|
-
export function notificationTrigger_ViaFromJSON(object) {
|
|
133
|
-
switch (object) {
|
|
134
|
-
case 0:
|
|
135
|
-
case "FCM":
|
|
136
|
-
return NotificationTrigger_Via.FCM;
|
|
137
|
-
case 1:
|
|
138
|
-
case "SMS":
|
|
139
|
-
return NotificationTrigger_Via.SMS;
|
|
140
|
-
case 2:
|
|
141
|
-
case "EMAIL":
|
|
142
|
-
return NotificationTrigger_Via.EMAIL;
|
|
143
|
-
case 3:
|
|
144
|
-
case "DATABASE":
|
|
145
|
-
return NotificationTrigger_Via.DATABASE;
|
|
146
|
-
case -1:
|
|
147
|
-
case "UNRECOGNIZED":
|
|
148
|
-
default:
|
|
149
|
-
return NotificationTrigger_Via.UNRECOGNIZED;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
export function notificationTrigger_ViaToJSON(object) {
|
|
153
|
-
switch (object) {
|
|
154
|
-
case NotificationTrigger_Via.FCM:
|
|
155
|
-
return "FCM";
|
|
156
|
-
case NotificationTrigger_Via.SMS:
|
|
157
|
-
return "SMS";
|
|
158
|
-
case NotificationTrigger_Via.EMAIL:
|
|
159
|
-
return "EMAIL";
|
|
160
|
-
case NotificationTrigger_Via.DATABASE:
|
|
161
|
-
return "DATABASE";
|
|
162
|
-
case NotificationTrigger_Via.UNRECOGNIZED:
|
|
163
|
-
default:
|
|
164
|
-
return "UNRECOGNIZED";
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
42
|
function createBaseWorkflow() {
|
|
168
43
|
return {
|
|
169
44
|
id: Long.UZERO,
|
|
@@ -275,46 +150,6 @@ export const Workflow = {
|
|
|
275
150
|
}
|
|
276
151
|
return message;
|
|
277
152
|
},
|
|
278
|
-
fromJSON(object) {
|
|
279
|
-
return {
|
|
280
|
-
id: isSet(object.id) ? Long.fromValue(object.id) : Long.UZERO,
|
|
281
|
-
organizationId: isSet(object.organization_id) ? Long.fromValue(object.organization_id) : Long.UZERO,
|
|
282
|
-
createdBy: isSet(object.created_by) ? Long.fromValue(object.created_by) : Long.UZERO,
|
|
283
|
-
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
284
|
-
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
285
|
-
flow: isSet(object.flow) ? Flow.fromJSON(object.flow) : undefined,
|
|
286
|
-
createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
|
|
287
|
-
updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
|
|
288
|
-
};
|
|
289
|
-
},
|
|
290
|
-
toJSON(message) {
|
|
291
|
-
const obj = {};
|
|
292
|
-
if (!message.id.equals(Long.UZERO)) {
|
|
293
|
-
obj.id = (message.id || Long.UZERO).toString();
|
|
294
|
-
}
|
|
295
|
-
if (!message.organizationId.equals(Long.UZERO)) {
|
|
296
|
-
obj.organization_id = (message.organizationId || Long.UZERO).toString();
|
|
297
|
-
}
|
|
298
|
-
if (!message.createdBy.equals(Long.UZERO)) {
|
|
299
|
-
obj.created_by = (message.createdBy || Long.UZERO).toString();
|
|
300
|
-
}
|
|
301
|
-
if (message.name !== "") {
|
|
302
|
-
obj.name = message.name;
|
|
303
|
-
}
|
|
304
|
-
if (message.description !== undefined) {
|
|
305
|
-
obj.description = message.description;
|
|
306
|
-
}
|
|
307
|
-
if (message.flow !== undefined) {
|
|
308
|
-
obj.flow = Flow.toJSON(message.flow);
|
|
309
|
-
}
|
|
310
|
-
if (message.createdAt !== undefined) {
|
|
311
|
-
obj.created_at = message.createdAt.toISOString();
|
|
312
|
-
}
|
|
313
|
-
if (message.updatedAt !== undefined) {
|
|
314
|
-
obj.updated_at = message.updatedAt.toISOString();
|
|
315
|
-
}
|
|
316
|
-
return obj;
|
|
317
|
-
},
|
|
318
153
|
create(base) {
|
|
319
154
|
return Workflow.fromPartial(base ?? {});
|
|
320
155
|
},
|
|
@@ -523,74 +358,6 @@ export const WorkflowTask = {
|
|
|
523
358
|
}
|
|
524
359
|
return message;
|
|
525
360
|
},
|
|
526
|
-
fromJSON(object) {
|
|
527
|
-
return {
|
|
528
|
-
id: isSet(object.id) ? Long.fromValue(object.id) : Long.UZERO,
|
|
529
|
-
organizationId: isSet(object.organization_id) ? Long.fromValue(object.organization_id) : Long.UZERO,
|
|
530
|
-
workflowId: isSet(object.workflow_id) ? Long.fromValue(object.workflow_id) : Long.UZERO,
|
|
531
|
-
workflowDetailId: isSet(object.workflow_detail_id) ? Long.fromValue(object.workflow_detail_id) : Long.UZERO,
|
|
532
|
-
deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
|
|
533
|
-
flow: isSet(object.flow) ? Flow.fromJSON(object.flow) : undefined,
|
|
534
|
-
pointer: isSet(object.pointer) ? globalThis.Number(object.pointer) : 0,
|
|
535
|
-
status: isSet(object.status) ? workflowStatFromJSON(object.status) : 0,
|
|
536
|
-
startsAt: isSet(object.starts_at) ? fromJsonTimestamp(object.starts_at) : undefined,
|
|
537
|
-
expiresAt: isSet(object.expires_at) ? fromJsonTimestamp(object.expires_at) : undefined,
|
|
538
|
-
createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
|
|
539
|
-
updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
|
|
540
|
-
createdBy: isSet(object.created_by) ? Long.fromValue(object.created_by) : undefined,
|
|
541
|
-
confirmedAt: isSet(object.confirmed_at) ? fromJsonTimestamp(object.confirmed_at) : undefined,
|
|
542
|
-
rejectedAt: isSet(object.rejected_at) ? fromJsonTimestamp(object.rejected_at) : undefined,
|
|
543
|
-
};
|
|
544
|
-
},
|
|
545
|
-
toJSON(message) {
|
|
546
|
-
const obj = {};
|
|
547
|
-
if (!message.id.equals(Long.UZERO)) {
|
|
548
|
-
obj.id = (message.id || Long.UZERO).toString();
|
|
549
|
-
}
|
|
550
|
-
if (!message.organizationId.equals(Long.UZERO)) {
|
|
551
|
-
obj.organization_id = (message.organizationId || Long.UZERO).toString();
|
|
552
|
-
}
|
|
553
|
-
if (!message.workflowId.equals(Long.UZERO)) {
|
|
554
|
-
obj.workflow_id = (message.workflowId || Long.UZERO).toString();
|
|
555
|
-
}
|
|
556
|
-
if (!message.workflowDetailId.equals(Long.UZERO)) {
|
|
557
|
-
obj.workflow_detail_id = (message.workflowDetailId || Long.UZERO).toString();
|
|
558
|
-
}
|
|
559
|
-
if (!message.deviceId.equals(Long.UZERO)) {
|
|
560
|
-
obj.device_id = (message.deviceId || Long.UZERO).toString();
|
|
561
|
-
}
|
|
562
|
-
if (message.flow !== undefined) {
|
|
563
|
-
obj.flow = Flow.toJSON(message.flow);
|
|
564
|
-
}
|
|
565
|
-
if (message.pointer !== 0) {
|
|
566
|
-
obj.pointer = Math.round(message.pointer);
|
|
567
|
-
}
|
|
568
|
-
if (message.status !== 0) {
|
|
569
|
-
obj.status = workflowStatToJSON(message.status);
|
|
570
|
-
}
|
|
571
|
-
if (message.startsAt !== undefined) {
|
|
572
|
-
obj.starts_at = message.startsAt.toISOString();
|
|
573
|
-
}
|
|
574
|
-
if (message.expiresAt !== undefined) {
|
|
575
|
-
obj.expires_at = message.expiresAt.toISOString();
|
|
576
|
-
}
|
|
577
|
-
if (message.createdAt !== undefined) {
|
|
578
|
-
obj.created_at = message.createdAt.toISOString();
|
|
579
|
-
}
|
|
580
|
-
if (message.updatedAt !== undefined) {
|
|
581
|
-
obj.updated_at = message.updatedAt.toISOString();
|
|
582
|
-
}
|
|
583
|
-
if (message.createdBy !== undefined) {
|
|
584
|
-
obj.created_by = (message.createdBy || Long.UZERO).toString();
|
|
585
|
-
}
|
|
586
|
-
if (message.confirmedAt !== undefined) {
|
|
587
|
-
obj.confirmed_at = message.confirmedAt.toISOString();
|
|
588
|
-
}
|
|
589
|
-
if (message.rejectedAt !== undefined) {
|
|
590
|
-
obj.rejected_at = message.rejectedAt.toISOString();
|
|
591
|
-
}
|
|
592
|
-
return obj;
|
|
593
|
-
},
|
|
594
361
|
create(base) {
|
|
595
362
|
return WorkflowTask.fromPartial(base ?? {});
|
|
596
363
|
},
|
|
@@ -779,68 +546,6 @@ export const Flow = {
|
|
|
779
546
|
}
|
|
780
547
|
return message;
|
|
781
548
|
},
|
|
782
|
-
fromJSON(object) {
|
|
783
|
-
return {
|
|
784
|
-
continuous: isSet(object.continuous) ? globalThis.Boolean(object.continuous) : false,
|
|
785
|
-
lastGpsTime: isSet(object.last_gps_time) ? Long.fromValue(object.last_gps_time) : Long.ZERO,
|
|
786
|
-
events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => FlowEvent.fromJSON(e)) : [],
|
|
787
|
-
modules: globalThis.Array.isArray(object?.modules) ? object.modules.map((e) => FlowModule.fromJSON(e)) : [],
|
|
788
|
-
defaultReport: isSet(object.default_report) ? DefaultReport.fromJSON(object.default_report) : undefined,
|
|
789
|
-
payambarReport: isSet(object.payambar_report) ? PayambarReport.fromJSON(object.payambar_report) : undefined,
|
|
790
|
-
taneshReport: isSet(object.tanesh_report) ? TaneshReport.fromJSON(object.tanesh_report) : undefined,
|
|
791
|
-
defaultBackground: isSet(object.default_background)
|
|
792
|
-
? DefaultBackground.fromJSON(object.default_background)
|
|
793
|
-
: undefined,
|
|
794
|
-
payambarBackground: isSet(object.payambar_background)
|
|
795
|
-
? PayambarBackground.fromJSON(object.payambar_background)
|
|
796
|
-
: undefined,
|
|
797
|
-
taneshBackground: isSet(object.tanesh_background)
|
|
798
|
-
? TaneshBackground.fromJSON(object.tanesh_background)
|
|
799
|
-
: undefined,
|
|
800
|
-
defaultStatus: isSet(object.default_status) ? DefaultStatus.fromJSON(object.default_status) : undefined,
|
|
801
|
-
taneshStatus: isSet(object.tanesh_status) ? TaneshStatus.fromJSON(object.tanesh_status) : undefined,
|
|
802
|
-
};
|
|
803
|
-
},
|
|
804
|
-
toJSON(message) {
|
|
805
|
-
const obj = {};
|
|
806
|
-
if (message.continuous !== false) {
|
|
807
|
-
obj.continuous = message.continuous;
|
|
808
|
-
}
|
|
809
|
-
if (!message.lastGpsTime.equals(Long.ZERO)) {
|
|
810
|
-
obj.last_gps_time = (message.lastGpsTime || Long.ZERO).toString();
|
|
811
|
-
}
|
|
812
|
-
if (message.events?.length) {
|
|
813
|
-
obj.events = message.events.map((e) => FlowEvent.toJSON(e));
|
|
814
|
-
}
|
|
815
|
-
if (message.modules?.length) {
|
|
816
|
-
obj.modules = message.modules.map((e) => FlowModule.toJSON(e));
|
|
817
|
-
}
|
|
818
|
-
if (message.defaultReport !== undefined) {
|
|
819
|
-
obj.default_report = DefaultReport.toJSON(message.defaultReport);
|
|
820
|
-
}
|
|
821
|
-
if (message.payambarReport !== undefined) {
|
|
822
|
-
obj.payambar_report = PayambarReport.toJSON(message.payambarReport);
|
|
823
|
-
}
|
|
824
|
-
if (message.taneshReport !== undefined) {
|
|
825
|
-
obj.tanesh_report = TaneshReport.toJSON(message.taneshReport);
|
|
826
|
-
}
|
|
827
|
-
if (message.defaultBackground !== undefined) {
|
|
828
|
-
obj.default_background = DefaultBackground.toJSON(message.defaultBackground);
|
|
829
|
-
}
|
|
830
|
-
if (message.payambarBackground !== undefined) {
|
|
831
|
-
obj.payambar_background = PayambarBackground.toJSON(message.payambarBackground);
|
|
832
|
-
}
|
|
833
|
-
if (message.taneshBackground !== undefined) {
|
|
834
|
-
obj.tanesh_background = TaneshBackground.toJSON(message.taneshBackground);
|
|
835
|
-
}
|
|
836
|
-
if (message.defaultStatus !== undefined) {
|
|
837
|
-
obj.default_status = DefaultStatus.toJSON(message.defaultStatus);
|
|
838
|
-
}
|
|
839
|
-
if (message.taneshStatus !== undefined) {
|
|
840
|
-
obj.tanesh_status = TaneshStatus.toJSON(message.taneshStatus);
|
|
841
|
-
}
|
|
842
|
-
return obj;
|
|
843
|
-
},
|
|
844
549
|
create(base) {
|
|
845
550
|
return Flow.fromPartial(base ?? {});
|
|
846
551
|
},
|
|
@@ -901,13 +606,6 @@ export const TaneshStatus = {
|
|
|
901
606
|
}
|
|
902
607
|
return message;
|
|
903
608
|
},
|
|
904
|
-
fromJSON(_) {
|
|
905
|
-
return {};
|
|
906
|
-
},
|
|
907
|
-
toJSON(_) {
|
|
908
|
-
const obj = {};
|
|
909
|
-
return obj;
|
|
910
|
-
},
|
|
911
609
|
create(base) {
|
|
912
610
|
return TaneshStatus.fromPartial(base ?? {});
|
|
913
611
|
},
|
|
@@ -938,13 +636,6 @@ export const DefaultStatus = {
|
|
|
938
636
|
}
|
|
939
637
|
return message;
|
|
940
638
|
},
|
|
941
|
-
fromJSON(_) {
|
|
942
|
-
return {};
|
|
943
|
-
},
|
|
944
|
-
toJSON(_) {
|
|
945
|
-
const obj = {};
|
|
946
|
-
return obj;
|
|
947
|
-
},
|
|
948
639
|
create(base) {
|
|
949
640
|
return DefaultStatus.fromPartial(base ?? {});
|
|
950
641
|
},
|
|
@@ -995,22 +686,6 @@ export const FlowEvent = {
|
|
|
995
686
|
}
|
|
996
687
|
return message;
|
|
997
688
|
},
|
|
998
|
-
fromJSON(object) {
|
|
999
|
-
return {
|
|
1000
|
-
event: isSet(object.event) ? flowEvent_TriggerEventFromJSON(object.event) : 0,
|
|
1001
|
-
eventTrigger: isSet(object.event_trigger) ? NotificationTrigger.fromJSON(object.event_trigger) : undefined,
|
|
1002
|
-
};
|
|
1003
|
-
},
|
|
1004
|
-
toJSON(message) {
|
|
1005
|
-
const obj = {};
|
|
1006
|
-
if (message.event !== 0) {
|
|
1007
|
-
obj.event = flowEvent_TriggerEventToJSON(message.event);
|
|
1008
|
-
}
|
|
1009
|
-
if (message.eventTrigger !== undefined) {
|
|
1010
|
-
obj.event_trigger = NotificationTrigger.toJSON(message.eventTrigger);
|
|
1011
|
-
}
|
|
1012
|
-
return obj;
|
|
1013
|
-
},
|
|
1014
689
|
create(base) {
|
|
1015
690
|
return FlowEvent.fromPartial(base ?? {});
|
|
1016
691
|
},
|
|
@@ -1075,26 +750,6 @@ export const FlowModule = {
|
|
|
1075
750
|
}
|
|
1076
751
|
return message;
|
|
1077
752
|
},
|
|
1078
|
-
fromJSON(object) {
|
|
1079
|
-
return {
|
|
1080
|
-
events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => FlowEvent.fromJSON(e)) : [],
|
|
1081
|
-
areaModule: isSet(object.area_module) ? AreaModule.fromJSON(object.area_module) : undefined,
|
|
1082
|
-
deviceModule: isSet(object.device_module) ? DeviceModule.fromJSON(object.device_module) : undefined,
|
|
1083
|
-
};
|
|
1084
|
-
},
|
|
1085
|
-
toJSON(message) {
|
|
1086
|
-
const obj = {};
|
|
1087
|
-
if (message.events?.length) {
|
|
1088
|
-
obj.events = message.events.map((e) => FlowEvent.toJSON(e));
|
|
1089
|
-
}
|
|
1090
|
-
if (message.areaModule !== undefined) {
|
|
1091
|
-
obj.area_module = AreaModule.toJSON(message.areaModule);
|
|
1092
|
-
}
|
|
1093
|
-
if (message.deviceModule !== undefined) {
|
|
1094
|
-
obj.device_module = DeviceModule.toJSON(message.deviceModule);
|
|
1095
|
-
}
|
|
1096
|
-
return obj;
|
|
1097
|
-
},
|
|
1098
753
|
create(base) {
|
|
1099
754
|
return FlowModule.fromPartial(base ?? {});
|
|
1100
755
|
},
|
|
@@ -1132,13 +787,6 @@ export const DefaultBackground = {
|
|
|
1132
787
|
}
|
|
1133
788
|
return message;
|
|
1134
789
|
},
|
|
1135
|
-
fromJSON(_) {
|
|
1136
|
-
return {};
|
|
1137
|
-
},
|
|
1138
|
-
toJSON(_) {
|
|
1139
|
-
const obj = {};
|
|
1140
|
-
return obj;
|
|
1141
|
-
},
|
|
1142
790
|
create(base) {
|
|
1143
791
|
return DefaultBackground.fromPartial(base ?? {});
|
|
1144
792
|
},
|
|
@@ -1209,30 +857,6 @@ export const PayambarBackground = {
|
|
|
1209
857
|
}
|
|
1210
858
|
return message;
|
|
1211
859
|
},
|
|
1212
|
-
fromJSON(object) {
|
|
1213
|
-
return {
|
|
1214
|
-
movingDuration: isSet(object.moving_duration) ? globalThis.Number(object.moving_duration) : 0,
|
|
1215
|
-
idlingDuration: isSet(object.idling_duration) ? globalThis.Number(object.idling_duration) : 0,
|
|
1216
|
-
parkingDuration: isSet(object.parking_duration) ? globalThis.Number(object.parking_duration) : 0,
|
|
1217
|
-
towingDuration: isSet(object.towing_duration) ? globalThis.Number(object.towing_duration) : 0,
|
|
1218
|
-
};
|
|
1219
|
-
},
|
|
1220
|
-
toJSON(message) {
|
|
1221
|
-
const obj = {};
|
|
1222
|
-
if (message.movingDuration !== 0) {
|
|
1223
|
-
obj.moving_duration = Math.round(message.movingDuration);
|
|
1224
|
-
}
|
|
1225
|
-
if (message.idlingDuration !== 0) {
|
|
1226
|
-
obj.idling_duration = Math.round(message.idlingDuration);
|
|
1227
|
-
}
|
|
1228
|
-
if (message.parkingDuration !== 0) {
|
|
1229
|
-
obj.parking_duration = Math.round(message.parkingDuration);
|
|
1230
|
-
}
|
|
1231
|
-
if (message.towingDuration !== 0) {
|
|
1232
|
-
obj.towing_duration = Math.round(message.towingDuration);
|
|
1233
|
-
}
|
|
1234
|
-
return obj;
|
|
1235
|
-
},
|
|
1236
860
|
create(base) {
|
|
1237
861
|
return PayambarBackground.fromPartial(base ?? {});
|
|
1238
862
|
},
|
|
@@ -1297,26 +921,6 @@ export const TaneshBackground = {
|
|
|
1297
921
|
}
|
|
1298
922
|
return message;
|
|
1299
923
|
},
|
|
1300
|
-
fromJSON(object) {
|
|
1301
|
-
return {
|
|
1302
|
-
mainAreaId: isSet(object.main_area_id) ? Long.fromValue(object.main_area_id) : Long.UZERO,
|
|
1303
|
-
inside: isSet(object.inside) ? TaneshBackground_Item.fromJSON(object.inside) : undefined,
|
|
1304
|
-
outside: isSet(object.outside) ? TaneshBackground_Item.fromJSON(object.outside) : undefined,
|
|
1305
|
-
};
|
|
1306
|
-
},
|
|
1307
|
-
toJSON(message) {
|
|
1308
|
-
const obj = {};
|
|
1309
|
-
if (!message.mainAreaId.equals(Long.UZERO)) {
|
|
1310
|
-
obj.main_area_id = (message.mainAreaId || Long.UZERO).toString();
|
|
1311
|
-
}
|
|
1312
|
-
if (message.inside !== undefined) {
|
|
1313
|
-
obj.inside = TaneshBackground_Item.toJSON(message.inside);
|
|
1314
|
-
}
|
|
1315
|
-
if (message.outside !== undefined) {
|
|
1316
|
-
obj.outside = TaneshBackground_Item.toJSON(message.outside);
|
|
1317
|
-
}
|
|
1318
|
-
return obj;
|
|
1319
|
-
},
|
|
1320
924
|
create(base) {
|
|
1321
925
|
return TaneshBackground.fromPartial(base ?? {});
|
|
1322
926
|
},
|
|
@@ -1434,46 +1038,6 @@ export const TaneshBackground_Item = {
|
|
|
1434
1038
|
}
|
|
1435
1039
|
return message;
|
|
1436
1040
|
},
|
|
1437
|
-
fromJSON(object) {
|
|
1438
|
-
return {
|
|
1439
|
-
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
1440
|
-
movingDuration: isSet(object.moving_duration) ? globalThis.Number(object.moving_duration) : 0,
|
|
1441
|
-
idlingDuration: isSet(object.idling_duration) ? globalThis.Number(object.idling_duration) : 0,
|
|
1442
|
-
parkingDuration: isSet(object.parking_duration) ? globalThis.Number(object.parking_duration) : 0,
|
|
1443
|
-
towingDuration: isSet(object.towing_duration) ? globalThis.Number(object.towing_duration) : 0,
|
|
1444
|
-
totalMileageAtStart: isSet(object.total_mileage_at_start)
|
|
1445
|
-
? Long.fromValue(object.total_mileage_at_start)
|
|
1446
|
-
: undefined,
|
|
1447
|
-
totalMileageAtFinish: isSet(object.total_mileage_at_finish)
|
|
1448
|
-
? Long.fromValue(object.total_mileage_at_finish)
|
|
1449
|
-
: undefined,
|
|
1450
|
-
};
|
|
1451
|
-
},
|
|
1452
|
-
toJSON(message) {
|
|
1453
|
-
const obj = {};
|
|
1454
|
-
if (message.duration !== 0) {
|
|
1455
|
-
obj.duration = Math.round(message.duration);
|
|
1456
|
-
}
|
|
1457
|
-
if (message.movingDuration !== 0) {
|
|
1458
|
-
obj.moving_duration = Math.round(message.movingDuration);
|
|
1459
|
-
}
|
|
1460
|
-
if (message.idlingDuration !== 0) {
|
|
1461
|
-
obj.idling_duration = Math.round(message.idlingDuration);
|
|
1462
|
-
}
|
|
1463
|
-
if (message.parkingDuration !== 0) {
|
|
1464
|
-
obj.parking_duration = Math.round(message.parkingDuration);
|
|
1465
|
-
}
|
|
1466
|
-
if (message.towingDuration !== 0) {
|
|
1467
|
-
obj.towing_duration = Math.round(message.towingDuration);
|
|
1468
|
-
}
|
|
1469
|
-
if (message.totalMileageAtStart !== undefined) {
|
|
1470
|
-
obj.total_mileage_at_start = (message.totalMileageAtStart || Long.UZERO).toString();
|
|
1471
|
-
}
|
|
1472
|
-
if (message.totalMileageAtFinish !== undefined) {
|
|
1473
|
-
obj.total_mileage_at_finish = (message.totalMileageAtFinish || Long.UZERO).toString();
|
|
1474
|
-
}
|
|
1475
|
-
return obj;
|
|
1476
|
-
},
|
|
1477
1041
|
create(base) {
|
|
1478
1042
|
return TaneshBackground_Item.fromPartial(base ?? {});
|
|
1479
1043
|
},
|
|
@@ -1736,104 +1300,6 @@ export const AreaModule = {
|
|
|
1736
1300
|
}
|
|
1737
1301
|
return message;
|
|
1738
1302
|
},
|
|
1739
|
-
fromJSON(object) {
|
|
1740
|
-
return {
|
|
1741
|
-
starts: isSet(object.starts) ? areaEventFromJSON(object.starts) : 0,
|
|
1742
|
-
finishes: isSet(object.finishes) ? areaEventFromJSON(object.finishes) : 0,
|
|
1743
|
-
areaId: isSet(object.area_id) ? Long.fromValue(object.area_id) : Long.UZERO,
|
|
1744
|
-
running: isSet(object.running) ? globalThis.Boolean(object.running) : false,
|
|
1745
|
-
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
1746
|
-
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
1747
|
-
totalMileageAtStart: isSet(object.total_mileage_at_start)
|
|
1748
|
-
? Long.fromValue(object.total_mileage_at_start)
|
|
1749
|
-
: undefined,
|
|
1750
|
-
totalMileageAtFinish: isSet(object.total_mileage_at_finish)
|
|
1751
|
-
? Long.fromValue(object.total_mileage_at_finish)
|
|
1752
|
-
: undefined,
|
|
1753
|
-
fuelConsumedAtStart: isSet(object.fuel_consumed_at_start)
|
|
1754
|
-
? globalThis.Number(object.fuel_consumed_at_start)
|
|
1755
|
-
: undefined,
|
|
1756
|
-
fuelConsumedAtFinish: isSet(object.fuel_consumed_at_finish)
|
|
1757
|
-
? globalThis.Number(object.fuel_consumed_at_finish)
|
|
1758
|
-
: undefined,
|
|
1759
|
-
maxSpeed: isSet(object.max_speed) ? globalThis.Number(object.max_speed) : 0,
|
|
1760
|
-
totalSpeed: isSet(object.total_speed) ? globalThis.Number(object.total_speed) : 0,
|
|
1761
|
-
countSpeed: isSet(object.count_speed) ? globalThis.Number(object.count_speed) : 0,
|
|
1762
|
-
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
1763
|
-
movingDuration: isSet(object.moving_duration) ? globalThis.Number(object.moving_duration) : 0,
|
|
1764
|
-
idlingDuration: isSet(object.idling_duration) ? globalThis.Number(object.idling_duration) : 0,
|
|
1765
|
-
parkingDuration: isSet(object.parking_duration) ? globalThis.Number(object.parking_duration) : 0,
|
|
1766
|
-
towingDuration: isSet(object.towing_duration) ? globalThis.Number(object.towing_duration) : 0,
|
|
1767
|
-
minimumAcceptedDuration: isSet(object.minimum_accepted_duration)
|
|
1768
|
-
? globalThis.Number(object.minimum_accepted_duration)
|
|
1769
|
-
: undefined,
|
|
1770
|
-
area: isSet(object.area) ? Area.fromJSON(object.area) : undefined,
|
|
1771
|
-
};
|
|
1772
|
-
},
|
|
1773
|
-
toJSON(message) {
|
|
1774
|
-
const obj = {};
|
|
1775
|
-
if (message.starts !== 0) {
|
|
1776
|
-
obj.starts = areaEventToJSON(message.starts);
|
|
1777
|
-
}
|
|
1778
|
-
if (message.finishes !== 0) {
|
|
1779
|
-
obj.finishes = areaEventToJSON(message.finishes);
|
|
1780
|
-
}
|
|
1781
|
-
if (!message.areaId.equals(Long.UZERO)) {
|
|
1782
|
-
obj.area_id = (message.areaId || Long.UZERO).toString();
|
|
1783
|
-
}
|
|
1784
|
-
if (message.running !== false) {
|
|
1785
|
-
obj.running = message.running;
|
|
1786
|
-
}
|
|
1787
|
-
if (message.startedAt !== undefined) {
|
|
1788
|
-
obj.started_at = message.startedAt.toISOString();
|
|
1789
|
-
}
|
|
1790
|
-
if (message.finishedAt !== undefined) {
|
|
1791
|
-
obj.finished_at = message.finishedAt.toISOString();
|
|
1792
|
-
}
|
|
1793
|
-
if (message.totalMileageAtStart !== undefined) {
|
|
1794
|
-
obj.total_mileage_at_start = (message.totalMileageAtStart || Long.UZERO).toString();
|
|
1795
|
-
}
|
|
1796
|
-
if (message.totalMileageAtFinish !== undefined) {
|
|
1797
|
-
obj.total_mileage_at_finish = (message.totalMileageAtFinish || Long.UZERO).toString();
|
|
1798
|
-
}
|
|
1799
|
-
if (message.fuelConsumedAtStart !== undefined) {
|
|
1800
|
-
obj.fuel_consumed_at_start = Math.round(message.fuelConsumedAtStart);
|
|
1801
|
-
}
|
|
1802
|
-
if (message.fuelConsumedAtFinish !== undefined) {
|
|
1803
|
-
obj.fuel_consumed_at_finish = Math.round(message.fuelConsumedAtFinish);
|
|
1804
|
-
}
|
|
1805
|
-
if (message.maxSpeed !== 0) {
|
|
1806
|
-
obj.max_speed = Math.round(message.maxSpeed);
|
|
1807
|
-
}
|
|
1808
|
-
if (message.totalSpeed !== 0) {
|
|
1809
|
-
obj.total_speed = Math.round(message.totalSpeed);
|
|
1810
|
-
}
|
|
1811
|
-
if (message.countSpeed !== 0) {
|
|
1812
|
-
obj.count_speed = Math.round(message.countSpeed);
|
|
1813
|
-
}
|
|
1814
|
-
if (message.duration !== 0) {
|
|
1815
|
-
obj.duration = Math.round(message.duration);
|
|
1816
|
-
}
|
|
1817
|
-
if (message.movingDuration !== 0) {
|
|
1818
|
-
obj.moving_duration = Math.round(message.movingDuration);
|
|
1819
|
-
}
|
|
1820
|
-
if (message.idlingDuration !== 0) {
|
|
1821
|
-
obj.idling_duration = Math.round(message.idlingDuration);
|
|
1822
|
-
}
|
|
1823
|
-
if (message.parkingDuration !== 0) {
|
|
1824
|
-
obj.parking_duration = Math.round(message.parkingDuration);
|
|
1825
|
-
}
|
|
1826
|
-
if (message.towingDuration !== 0) {
|
|
1827
|
-
obj.towing_duration = Math.round(message.towingDuration);
|
|
1828
|
-
}
|
|
1829
|
-
if (message.minimumAcceptedDuration !== undefined) {
|
|
1830
|
-
obj.minimum_accepted_duration = Math.round(message.minimumAcceptedDuration);
|
|
1831
|
-
}
|
|
1832
|
-
if (message.area !== undefined) {
|
|
1833
|
-
obj.area = Area.toJSON(message.area);
|
|
1834
|
-
}
|
|
1835
|
-
return obj;
|
|
1836
|
-
},
|
|
1837
1303
|
create(base) {
|
|
1838
1304
|
return AreaModule.fromPartial(base ?? {});
|
|
1839
1305
|
},
|
|
@@ -2056,80 +1522,6 @@ export const DeviceModule = {
|
|
|
2056
1522
|
}
|
|
2057
1523
|
return message;
|
|
2058
1524
|
},
|
|
2059
|
-
fromJSON(object) {
|
|
2060
|
-
return {
|
|
2061
|
-
starts: isSet(object.starts) ? areaEventFromJSON(object.starts) : 0,
|
|
2062
|
-
finishes: isSet(object.finishes) ? areaEventFromJSON(object.finishes) : 0,
|
|
2063
|
-
deviceId: isSet(object.device_id) ? Long.fromValue(object.device_id) : Long.UZERO,
|
|
2064
|
-
radius: isSet(object.radius) ? globalThis.Number(object.radius) : 0,
|
|
2065
|
-
running: isSet(object.running) ? globalThis.Boolean(object.running) : false,
|
|
2066
|
-
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
2067
|
-
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
2068
|
-
totalMileageAtStart: isSet(object.total_mileage_at_start)
|
|
2069
|
-
? Long.fromValue(object.total_mileage_at_start)
|
|
2070
|
-
: undefined,
|
|
2071
|
-
totalMileageAtFinish: isSet(object.total_mileage_at_finish)
|
|
2072
|
-
? Long.fromValue(object.total_mileage_at_finish)
|
|
2073
|
-
: undefined,
|
|
2074
|
-
maxSpeed: isSet(object.max_speed) ? globalThis.Number(object.max_speed) : 0,
|
|
2075
|
-
totalSpeed: isSet(object.total_speed) ? globalThis.Number(object.total_speed) : 0,
|
|
2076
|
-
countSpeed: isSet(object.count_speed) ? globalThis.Number(object.count_speed) : 0,
|
|
2077
|
-
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
2078
|
-
minimumAcceptedDuration: isSet(object.minimum_accepted_duration)
|
|
2079
|
-
? globalThis.Number(object.minimum_accepted_duration)
|
|
2080
|
-
: undefined,
|
|
2081
|
-
device: isSet(object.device) ? Device.fromJSON(object.device) : undefined,
|
|
2082
|
-
};
|
|
2083
|
-
},
|
|
2084
|
-
toJSON(message) {
|
|
2085
|
-
const obj = {};
|
|
2086
|
-
if (message.starts !== 0) {
|
|
2087
|
-
obj.starts = areaEventToJSON(message.starts);
|
|
2088
|
-
}
|
|
2089
|
-
if (message.finishes !== 0) {
|
|
2090
|
-
obj.finishes = areaEventToJSON(message.finishes);
|
|
2091
|
-
}
|
|
2092
|
-
if (!message.deviceId.equals(Long.UZERO)) {
|
|
2093
|
-
obj.device_id = (message.deviceId || Long.UZERO).toString();
|
|
2094
|
-
}
|
|
2095
|
-
if (message.radius !== 0) {
|
|
2096
|
-
obj.radius = Math.round(message.radius);
|
|
2097
|
-
}
|
|
2098
|
-
if (message.running !== false) {
|
|
2099
|
-
obj.running = message.running;
|
|
2100
|
-
}
|
|
2101
|
-
if (message.startedAt !== undefined) {
|
|
2102
|
-
obj.started_at = message.startedAt.toISOString();
|
|
2103
|
-
}
|
|
2104
|
-
if (message.finishedAt !== undefined) {
|
|
2105
|
-
obj.finished_at = message.finishedAt.toISOString();
|
|
2106
|
-
}
|
|
2107
|
-
if (message.totalMileageAtStart !== undefined) {
|
|
2108
|
-
obj.total_mileage_at_start = (message.totalMileageAtStart || Long.UZERO).toString();
|
|
2109
|
-
}
|
|
2110
|
-
if (message.totalMileageAtFinish !== undefined) {
|
|
2111
|
-
obj.total_mileage_at_finish = (message.totalMileageAtFinish || Long.UZERO).toString();
|
|
2112
|
-
}
|
|
2113
|
-
if (message.maxSpeed !== 0) {
|
|
2114
|
-
obj.max_speed = Math.round(message.maxSpeed);
|
|
2115
|
-
}
|
|
2116
|
-
if (message.totalSpeed !== 0) {
|
|
2117
|
-
obj.total_speed = Math.round(message.totalSpeed);
|
|
2118
|
-
}
|
|
2119
|
-
if (message.countSpeed !== 0) {
|
|
2120
|
-
obj.count_speed = Math.round(message.countSpeed);
|
|
2121
|
-
}
|
|
2122
|
-
if (message.duration !== 0) {
|
|
2123
|
-
obj.duration = Math.round(message.duration);
|
|
2124
|
-
}
|
|
2125
|
-
if (message.minimumAcceptedDuration !== undefined) {
|
|
2126
|
-
obj.minimum_accepted_duration = Math.round(message.minimumAcceptedDuration);
|
|
2127
|
-
}
|
|
2128
|
-
if (message.device !== undefined) {
|
|
2129
|
-
obj.device = Device.toJSON(message.device);
|
|
2130
|
-
}
|
|
2131
|
-
return obj;
|
|
2132
|
-
},
|
|
2133
1525
|
create(base) {
|
|
2134
1526
|
return DeviceModule.fromPartial(base ?? {});
|
|
2135
1527
|
},
|
|
@@ -2223,30 +1615,6 @@ export const DefaultReport = {
|
|
|
2223
1615
|
}
|
|
2224
1616
|
return message;
|
|
2225
1617
|
},
|
|
2226
|
-
fromJSON(object) {
|
|
2227
|
-
return {
|
|
2228
|
-
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
2229
|
-
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
2230
|
-
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
2231
|
-
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
2232
|
-
};
|
|
2233
|
-
},
|
|
2234
|
-
toJSON(message) {
|
|
2235
|
-
const obj = {};
|
|
2236
|
-
if (message.duration !== 0) {
|
|
2237
|
-
obj.duration = Math.round(message.duration);
|
|
2238
|
-
}
|
|
2239
|
-
if (message.mileage !== 0) {
|
|
2240
|
-
obj.mileage = Math.round(message.mileage);
|
|
2241
|
-
}
|
|
2242
|
-
if (message.startedAt !== undefined) {
|
|
2243
|
-
obj.started_at = message.startedAt.toISOString();
|
|
2244
|
-
}
|
|
2245
|
-
if (message.finishedAt !== undefined) {
|
|
2246
|
-
obj.finished_at = message.finishedAt.toISOString();
|
|
2247
|
-
}
|
|
2248
|
-
return obj;
|
|
2249
|
-
},
|
|
2250
1618
|
create(base) {
|
|
2251
1619
|
return DefaultReport.fromPartial(base ?? {});
|
|
2252
1620
|
},
|
|
@@ -2331,34 +1699,6 @@ export const PayambarReport = {
|
|
|
2331
1699
|
}
|
|
2332
1700
|
return message;
|
|
2333
1701
|
},
|
|
2334
|
-
fromJSON(object) {
|
|
2335
|
-
return {
|
|
2336
|
-
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
2337
|
-
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
2338
|
-
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
2339
|
-
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
2340
|
-
fuelUsage: isSet(object.fuel_usage) ? globalThis.Number(object.fuel_usage) : 0,
|
|
2341
|
-
};
|
|
2342
|
-
},
|
|
2343
|
-
toJSON(message) {
|
|
2344
|
-
const obj = {};
|
|
2345
|
-
if (message.startedAt !== undefined) {
|
|
2346
|
-
obj.started_at = message.startedAt.toISOString();
|
|
2347
|
-
}
|
|
2348
|
-
if (message.finishedAt !== undefined) {
|
|
2349
|
-
obj.finished_at = message.finishedAt.toISOString();
|
|
2350
|
-
}
|
|
2351
|
-
if (message.mileage !== 0) {
|
|
2352
|
-
obj.mileage = Math.round(message.mileage);
|
|
2353
|
-
}
|
|
2354
|
-
if (message.duration !== 0) {
|
|
2355
|
-
obj.duration = Math.round(message.duration);
|
|
2356
|
-
}
|
|
2357
|
-
if (message.fuelUsage !== 0) {
|
|
2358
|
-
obj.fuel_usage = Math.round(message.fuelUsage);
|
|
2359
|
-
}
|
|
2360
|
-
return obj;
|
|
2361
|
-
},
|
|
2362
1702
|
create(base) {
|
|
2363
1703
|
return PayambarReport.fromPartial(base ?? {});
|
|
2364
1704
|
},
|
|
@@ -2434,30 +1774,6 @@ export const TaneshReport = {
|
|
|
2434
1774
|
}
|
|
2435
1775
|
return message;
|
|
2436
1776
|
},
|
|
2437
|
-
fromJSON(object) {
|
|
2438
|
-
return {
|
|
2439
|
-
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
2440
|
-
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
2441
|
-
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
2442
|
-
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
2443
|
-
};
|
|
2444
|
-
},
|
|
2445
|
-
toJSON(message) {
|
|
2446
|
-
const obj = {};
|
|
2447
|
-
if (message.startedAt !== undefined) {
|
|
2448
|
-
obj.started_at = message.startedAt.toISOString();
|
|
2449
|
-
}
|
|
2450
|
-
if (message.finishedAt !== undefined) {
|
|
2451
|
-
obj.finished_at = message.finishedAt.toISOString();
|
|
2452
|
-
}
|
|
2453
|
-
if (message.mileage !== 0) {
|
|
2454
|
-
obj.mileage = Math.round(message.mileage);
|
|
2455
|
-
}
|
|
2456
|
-
if (message.duration !== 0) {
|
|
2457
|
-
obj.duration = Math.round(message.duration);
|
|
2458
|
-
}
|
|
2459
|
-
return obj;
|
|
2460
|
-
},
|
|
2461
1777
|
create(base) {
|
|
2462
1778
|
return TaneshReport.fromPartial(base ?? {});
|
|
2463
1779
|
},
|
|
@@ -2522,26 +1838,6 @@ export const NotificationTrigger = {
|
|
|
2522
1838
|
}
|
|
2523
1839
|
return message;
|
|
2524
1840
|
},
|
|
2525
|
-
fromJSON(object) {
|
|
2526
|
-
return {
|
|
2527
|
-
userId: isSet(object.user_id) ? Long.fromValue(object.user_id) : Long.UZERO,
|
|
2528
|
-
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
2529
|
-
body: isSet(object.body) ? globalThis.String(object.body) : undefined,
|
|
2530
|
-
};
|
|
2531
|
-
},
|
|
2532
|
-
toJSON(message) {
|
|
2533
|
-
const obj = {};
|
|
2534
|
-
if (!message.userId.equals(Long.UZERO)) {
|
|
2535
|
-
obj.user_id = (message.userId || Long.UZERO).toString();
|
|
2536
|
-
}
|
|
2537
|
-
if (message.title !== "") {
|
|
2538
|
-
obj.title = message.title;
|
|
2539
|
-
}
|
|
2540
|
-
if (message.body !== undefined) {
|
|
2541
|
-
obj.body = message.body;
|
|
2542
|
-
}
|
|
2543
|
-
return obj;
|
|
2544
|
-
},
|
|
2545
1841
|
create(base) {
|
|
2546
1842
|
return NotificationTrigger.fromPartial(base ?? {});
|
|
2547
1843
|
},
|
|
@@ -2565,20 +1861,6 @@ function fromTimestamp(t) {
|
|
|
2565
1861
|
millis += (t.nanos || 0) / 1_000_000;
|
|
2566
1862
|
return new globalThis.Date(millis);
|
|
2567
1863
|
}
|
|
2568
|
-
function fromJsonTimestamp(o) {
|
|
2569
|
-
if (o instanceof globalThis.Date) {
|
|
2570
|
-
return o;
|
|
2571
|
-
}
|
|
2572
|
-
else if (typeof o === "string") {
|
|
2573
|
-
return new globalThis.Date(o);
|
|
2574
|
-
}
|
|
2575
|
-
else {
|
|
2576
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
2577
|
-
}
|
|
2578
|
-
}
|
|
2579
1864
|
function numberToLong(number) {
|
|
2580
1865
|
return Long.fromNumber(number);
|
|
2581
1866
|
}
|
|
2582
|
-
function isSet(value) {
|
|
2583
|
-
return value !== null && value !== undefined;
|
|
2584
|
-
}
|