@fatehan/tsrp 1.6.20 → 1.6.22
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/workflow.d.ts +219 -0
- package/dist/fatehan/activities/workflow.d.ts.map +1 -0
- package/dist/fatehan/activities/workflow.js +1941 -0
- package/dist/fatehan/activities/workshift.d.ts +140 -0
- package/dist/fatehan/activities/workshift.d.ts.map +1 -0
- package/dist/fatehan/activities/workshift.js +1244 -0
- package/dist/fatehan/apis/client.d.ts +246 -0
- package/dist/fatehan/apis/client.d.ts.map +1 -0
- package/dist/fatehan/apis/client.js +2572 -0
- package/dist/fatehan/areas/area.d.ts +96 -0
- package/dist/fatehan/areas/area.d.ts.map +1 -0
- package/dist/fatehan/areas/area.js +761 -0
- package/dist/fatehan/devices/devices.d.ts +256 -0
- package/dist/fatehan/devices/devices.d.ts.map +1 -0
- package/dist/fatehan/devices/devices.js +2730 -0
- package/dist/fatehan/devices/maintenance.d.ts +64 -0
- package/dist/fatehan/devices/maintenance.d.ts.map +1 -0
- package/dist/fatehan/devices/maintenance.js +484 -0
- package/dist/fatehan/financial/financial.d.ts +162 -0
- package/dist/fatehan/financial/financial.d.ts.map +1 -0
- package/dist/fatehan/financial/financial.js +1701 -0
- package/dist/fatehan/google/protobuf/descriptor.d.ts +1303 -0
- package/dist/fatehan/google/protobuf/descriptor.d.ts.map +1 -0
- package/dist/fatehan/google/protobuf/descriptor.js +3467 -0
- package/dist/fatehan/google/protobuf/duration.d.ts +99 -0
- package/dist/fatehan/google/protobuf/duration.d.ts.map +1 -0
- package/dist/fatehan/google/protobuf/duration.js +63 -0
- package/dist/fatehan/google/protobuf/field_mask.d.ts +228 -0
- package/dist/fatehan/google/protobuf/field_mask.d.ts.map +1 -0
- package/dist/fatehan/google/protobuf/field_mask.js +57 -0
- package/dist/fatehan/google/protobuf/timestamp.d.ts +129 -0
- package/dist/fatehan/google/protobuf/timestamp.d.ts.map +1 -0
- package/dist/fatehan/google/protobuf/timestamp.js +63 -0
- package/dist/fatehan/identities/authentication.d.ts +164 -0
- package/dist/fatehan/identities/authentication.d.ts.map +1 -0
- package/dist/fatehan/identities/authentication.js +1291 -0
- package/dist/fatehan/identities/identities.d.ts +969 -0
- package/dist/fatehan/identities/identities.d.ts.map +1 -0
- package/dist/fatehan/identities/identities.js +2993 -0
- package/dist/fatehan/models/fusion.d.ts +149 -0
- package/dist/fatehan/models/fusion.d.ts.map +1 -0
- package/dist/fatehan/models/fusion.js +1531 -0
- package/dist/fatehan/models/models.d.ts +162 -0
- package/dist/fatehan/models/models.d.ts.map +1 -0
- package/dist/fatehan/models/models.js +1486 -0
- package/dist/fatehan/notifies/direct.d.ts +85 -0
- package/dist/fatehan/notifies/direct.d.ts.map +1 -0
- package/dist/fatehan/notifies/direct.js +669 -0
- package/dist/fatehan/notifies/notify.d.ts +232 -0
- package/dist/fatehan/notifies/notify.d.ts.map +1 -0
- package/dist/fatehan/notifies/notify.js +1958 -0
- package/dist/fatehan/packets/commands.d.ts +150 -0
- package/dist/fatehan/packets/commands.d.ts.map +1 -0
- package/dist/fatehan/packets/commands.js +1364 -0
- package/dist/fatehan/packets/dataModel.d.ts +1611 -0
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -0
- package/dist/fatehan/packets/dataModel.js +14961 -0
- package/dist/fatehan/packets/dataModule.d.ts +61 -0
- package/dist/fatehan/packets/dataModule.d.ts.map +1 -0
- package/dist/fatehan/packets/dataModule.js +386 -0
- package/dist/fatehan/packets/forge.d.ts +142 -0
- package/dist/fatehan/packets/forge.d.ts.map +1 -0
- package/dist/fatehan/packets/forge.js +1339 -0
- package/dist/fatehan/services/api.d.ts +1222 -0
- package/dist/fatehan/services/api.d.ts.map +1 -0
- package/dist/fatehan/services/api.js +12689 -0
- package/dist/fatehan/services/repositories.d.ts +78 -0
- package/dist/fatehan/services/repositories.d.ts.map +1 -0
- package/dist/fatehan/services/repositories.js +620 -0
- package/dist/fatehan/stream/stream.d.ts +224 -0
- package/dist/fatehan/stream/stream.d.ts.map +1 -0
- package/dist/fatehan/stream/stream.js +1416 -0
- package/dist/fatehan/trips/trip.d.ts +325 -0
- package/dist/fatehan/trips/trip.d.ts.map +1 -0
- package/dist/fatehan/trips/trip.js +1635 -0
- package/dist/fatehan/utils/buf/validate/validate.d.ts +3520 -0
- package/dist/fatehan/utils/buf/validate/validate.d.ts.map +1 -0
- package/dist/fatehan/utils/buf/validate/validate.js +4248 -0
- package/dist/services.d.ts +79 -0
- package/dist/services.d.ts.map +1 -0
- package/dist/services.js +245 -0
- package/dist/store/system.io.d.ts +6 -0
- package/dist/store/system.io.d.ts.map +1 -0
- package/dist/store/system.io.js +14 -0
- package/dist/system.io.d.ts +6 -0
- package/dist/system.io.d.ts.map +1 -0
- package/dist/system.io.js +208 -0
- package/package.json +1 -1
|
@@ -0,0 +1,669 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.8
|
|
4
|
+
// protoc v7.34.1
|
|
5
|
+
// source: notifies/direct.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
import Long from "long";
|
|
9
|
+
import { Duration } from "../google/protobuf/duration";
|
|
10
|
+
import { Timestamp } from "../google/protobuf/timestamp";
|
|
11
|
+
export const protobufPackage = "com.fatehan.notifies";
|
|
12
|
+
export var Platform;
|
|
13
|
+
(function (Platform) {
|
|
14
|
+
Platform[Platform["UNSPECIFICED"] = 0] = "UNSPECIFICED";
|
|
15
|
+
Platform[Platform["ANDROID"] = 1] = "ANDROID";
|
|
16
|
+
Platform[Platform["WEB"] = 2] = "WEB";
|
|
17
|
+
Platform[Platform["IOS"] = 3] = "IOS";
|
|
18
|
+
Platform[Platform["DESKTOP"] = 4] = "DESKTOP";
|
|
19
|
+
Platform[Platform["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
|
+
})(Platform || (Platform = {}));
|
|
21
|
+
function createBaseDirectMessageStateRequest() {
|
|
22
|
+
return { uuid: "" };
|
|
23
|
+
}
|
|
24
|
+
export const DirectMessageStateRequest = {
|
|
25
|
+
encode(message, writer = new BinaryWriter()) {
|
|
26
|
+
if (message.uuid !== "") {
|
|
27
|
+
writer.uint32(10).string(message.uuid);
|
|
28
|
+
}
|
|
29
|
+
return writer;
|
|
30
|
+
},
|
|
31
|
+
decode(input, length) {
|
|
32
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
33
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
34
|
+
const message = createBaseDirectMessageStateRequest();
|
|
35
|
+
while (reader.pos < end) {
|
|
36
|
+
const tag = reader.uint32();
|
|
37
|
+
switch (tag >>> 3) {
|
|
38
|
+
case 1: {
|
|
39
|
+
if (tag !== 10) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
message.uuid = reader.string();
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
reader.skip(tag & 7);
|
|
50
|
+
}
|
|
51
|
+
return message;
|
|
52
|
+
},
|
|
53
|
+
create(base) {
|
|
54
|
+
return DirectMessageStateRequest.fromPartial(base ?? {});
|
|
55
|
+
},
|
|
56
|
+
fromPartial(object) {
|
|
57
|
+
const message = createBaseDirectMessageStateRequest();
|
|
58
|
+
message.uuid = object.uuid ?? "";
|
|
59
|
+
return message;
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
function createBaseDirectMessageResult() {
|
|
63
|
+
return { success: false, count: undefined };
|
|
64
|
+
}
|
|
65
|
+
export const DirectMessageResult = {
|
|
66
|
+
encode(message, writer = new BinaryWriter()) {
|
|
67
|
+
if (message.success !== false) {
|
|
68
|
+
writer.uint32(8).bool(message.success);
|
|
69
|
+
}
|
|
70
|
+
if (message.count !== undefined) {
|
|
71
|
+
writer.uint32(16).int32(message.count);
|
|
72
|
+
}
|
|
73
|
+
return writer;
|
|
74
|
+
},
|
|
75
|
+
decode(input, length) {
|
|
76
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
77
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
78
|
+
const message = createBaseDirectMessageResult();
|
|
79
|
+
while (reader.pos < end) {
|
|
80
|
+
const tag = reader.uint32();
|
|
81
|
+
switch (tag >>> 3) {
|
|
82
|
+
case 1: {
|
|
83
|
+
if (tag !== 8) {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
message.success = reader.bool();
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
case 2: {
|
|
90
|
+
if (tag !== 16) {
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
message.count = reader.int32();
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
reader.skip(tag & 7);
|
|
101
|
+
}
|
|
102
|
+
return message;
|
|
103
|
+
},
|
|
104
|
+
create(base) {
|
|
105
|
+
return DirectMessageResult.fromPartial(base ?? {});
|
|
106
|
+
},
|
|
107
|
+
fromPartial(object) {
|
|
108
|
+
const message = createBaseDirectMessageResult();
|
|
109
|
+
message.success = object.success ?? false;
|
|
110
|
+
message.count = object.count ?? undefined;
|
|
111
|
+
return message;
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
function createBaseDirectMessageStateResponse() {
|
|
115
|
+
return { uuid: "", state: "", receivers: 0, sent: 0, failed: 0 };
|
|
116
|
+
}
|
|
117
|
+
export const DirectMessageStateResponse = {
|
|
118
|
+
encode(message, writer = new BinaryWriter()) {
|
|
119
|
+
if (message.uuid !== "") {
|
|
120
|
+
writer.uint32(10).string(message.uuid);
|
|
121
|
+
}
|
|
122
|
+
if (message.state !== "") {
|
|
123
|
+
writer.uint32(18).string(message.state);
|
|
124
|
+
}
|
|
125
|
+
if (message.receivers !== 0) {
|
|
126
|
+
writer.uint32(24).uint32(message.receivers);
|
|
127
|
+
}
|
|
128
|
+
if (message.sent !== 0) {
|
|
129
|
+
writer.uint32(32).uint32(message.sent);
|
|
130
|
+
}
|
|
131
|
+
if (message.failed !== 0) {
|
|
132
|
+
writer.uint32(40).uint32(message.failed);
|
|
133
|
+
}
|
|
134
|
+
return writer;
|
|
135
|
+
},
|
|
136
|
+
decode(input, length) {
|
|
137
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
138
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
139
|
+
const message = createBaseDirectMessageStateResponse();
|
|
140
|
+
while (reader.pos < end) {
|
|
141
|
+
const tag = reader.uint32();
|
|
142
|
+
switch (tag >>> 3) {
|
|
143
|
+
case 1: {
|
|
144
|
+
if (tag !== 10) {
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
message.uuid = reader.string();
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
case 2: {
|
|
151
|
+
if (tag !== 18) {
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
message.state = reader.string();
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
case 3: {
|
|
158
|
+
if (tag !== 24) {
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
message.receivers = reader.uint32();
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
case 4: {
|
|
165
|
+
if (tag !== 32) {
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
message.sent = reader.uint32();
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
case 5: {
|
|
172
|
+
if (tag !== 40) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
message.failed = reader.uint32();
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
reader.skip(tag & 7);
|
|
183
|
+
}
|
|
184
|
+
return message;
|
|
185
|
+
},
|
|
186
|
+
create(base) {
|
|
187
|
+
return DirectMessageStateResponse.fromPartial(base ?? {});
|
|
188
|
+
},
|
|
189
|
+
fromPartial(object) {
|
|
190
|
+
const message = createBaseDirectMessageStateResponse();
|
|
191
|
+
message.uuid = object.uuid ?? "";
|
|
192
|
+
message.state = object.state ?? "";
|
|
193
|
+
message.receivers = object.receivers ?? 0;
|
|
194
|
+
message.sent = object.sent ?? 0;
|
|
195
|
+
message.failed = object.failed ?? 0;
|
|
196
|
+
return message;
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
function createBaseIdList() {
|
|
200
|
+
return { ids: [] };
|
|
201
|
+
}
|
|
202
|
+
export const IdList = {
|
|
203
|
+
encode(message, writer = new BinaryWriter()) {
|
|
204
|
+
writer.uint32(10).fork();
|
|
205
|
+
for (const v of message.ids) {
|
|
206
|
+
writer.uint64(v.toString());
|
|
207
|
+
}
|
|
208
|
+
writer.join();
|
|
209
|
+
return writer;
|
|
210
|
+
},
|
|
211
|
+
decode(input, length) {
|
|
212
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
213
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
214
|
+
const message = createBaseIdList();
|
|
215
|
+
while (reader.pos < end) {
|
|
216
|
+
const tag = reader.uint32();
|
|
217
|
+
switch (tag >>> 3) {
|
|
218
|
+
case 1: {
|
|
219
|
+
if (tag === 8) {
|
|
220
|
+
message.ids.push(Long.fromString(reader.uint64().toString(), true));
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (tag === 10) {
|
|
224
|
+
const end2 = reader.uint32() + reader.pos;
|
|
225
|
+
while (reader.pos < end2) {
|
|
226
|
+
message.ids.push(Long.fromString(reader.uint64().toString(), true));
|
|
227
|
+
}
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
reader.skip(tag & 7);
|
|
237
|
+
}
|
|
238
|
+
return message;
|
|
239
|
+
},
|
|
240
|
+
create(base) {
|
|
241
|
+
return IdList.fromPartial(base ?? {});
|
|
242
|
+
},
|
|
243
|
+
fromPartial(object) {
|
|
244
|
+
const message = createBaseIdList();
|
|
245
|
+
message.ids = object.ids?.map((e) => Long.fromValue(e)) || [];
|
|
246
|
+
return message;
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
function createBaseDirectMessage() {
|
|
250
|
+
return {
|
|
251
|
+
uuid: "",
|
|
252
|
+
title: "",
|
|
253
|
+
body: undefined,
|
|
254
|
+
picture: undefined,
|
|
255
|
+
icon: undefined,
|
|
256
|
+
sound: undefined,
|
|
257
|
+
action: undefined,
|
|
258
|
+
data: {},
|
|
259
|
+
userId: undefined,
|
|
260
|
+
deviceId: undefined,
|
|
261
|
+
organizationId: undefined,
|
|
262
|
+
topic: undefined,
|
|
263
|
+
usersList: undefined,
|
|
264
|
+
devicesList: undefined,
|
|
265
|
+
platforms: [],
|
|
266
|
+
timestamp: undefined,
|
|
267
|
+
ttl: undefined,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
export const DirectMessage = {
|
|
271
|
+
encode(message, writer = new BinaryWriter()) {
|
|
272
|
+
if (message.uuid !== "") {
|
|
273
|
+
writer.uint32(10).string(message.uuid);
|
|
274
|
+
}
|
|
275
|
+
if (message.title !== "") {
|
|
276
|
+
writer.uint32(18).string(message.title);
|
|
277
|
+
}
|
|
278
|
+
if (message.body !== undefined) {
|
|
279
|
+
writer.uint32(26).string(message.body);
|
|
280
|
+
}
|
|
281
|
+
if (message.picture !== undefined) {
|
|
282
|
+
writer.uint32(34).string(message.picture);
|
|
283
|
+
}
|
|
284
|
+
if (message.icon !== undefined) {
|
|
285
|
+
writer.uint32(42).string(message.icon);
|
|
286
|
+
}
|
|
287
|
+
if (message.sound !== undefined) {
|
|
288
|
+
writer.uint32(50).string(message.sound);
|
|
289
|
+
}
|
|
290
|
+
if (message.action !== undefined) {
|
|
291
|
+
writer.uint32(58).string(message.action);
|
|
292
|
+
}
|
|
293
|
+
globalThis.Object.entries(message.data).forEach(([key, value]) => {
|
|
294
|
+
DirectMessage_DataEntry.encode({ key: key, value }, writer.uint32(130).fork()).join();
|
|
295
|
+
});
|
|
296
|
+
if (message.userId !== undefined) {
|
|
297
|
+
writer.uint32(168).uint64(message.userId.toString());
|
|
298
|
+
}
|
|
299
|
+
if (message.deviceId !== undefined) {
|
|
300
|
+
writer.uint32(176).uint64(message.deviceId.toString());
|
|
301
|
+
}
|
|
302
|
+
if (message.organizationId !== undefined) {
|
|
303
|
+
writer.uint32(184).uint64(message.organizationId.toString());
|
|
304
|
+
}
|
|
305
|
+
if (message.topic !== undefined) {
|
|
306
|
+
writer.uint32(194).string(message.topic);
|
|
307
|
+
}
|
|
308
|
+
if (message.usersList !== undefined) {
|
|
309
|
+
IdList.encode(message.usersList, writer.uint32(202).fork()).join();
|
|
310
|
+
}
|
|
311
|
+
if (message.devicesList !== undefined) {
|
|
312
|
+
IdList.encode(message.devicesList, writer.uint32(210).fork()).join();
|
|
313
|
+
}
|
|
314
|
+
writer.uint32(258).fork();
|
|
315
|
+
for (const v of message.platforms) {
|
|
316
|
+
writer.int32(v);
|
|
317
|
+
}
|
|
318
|
+
writer.join();
|
|
319
|
+
if (message.timestamp !== undefined) {
|
|
320
|
+
Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(250).fork()).join();
|
|
321
|
+
}
|
|
322
|
+
if (message.ttl !== undefined) {
|
|
323
|
+
Duration.encode(message.ttl, writer.uint32(266).fork()).join();
|
|
324
|
+
}
|
|
325
|
+
return writer;
|
|
326
|
+
},
|
|
327
|
+
decode(input, length) {
|
|
328
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
329
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
330
|
+
const message = createBaseDirectMessage();
|
|
331
|
+
while (reader.pos < end) {
|
|
332
|
+
const tag = reader.uint32();
|
|
333
|
+
switch (tag >>> 3) {
|
|
334
|
+
case 1: {
|
|
335
|
+
if (tag !== 10) {
|
|
336
|
+
break;
|
|
337
|
+
}
|
|
338
|
+
message.uuid = reader.string();
|
|
339
|
+
continue;
|
|
340
|
+
}
|
|
341
|
+
case 2: {
|
|
342
|
+
if (tag !== 18) {
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
message.title = reader.string();
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
case 3: {
|
|
349
|
+
if (tag !== 26) {
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
message.body = reader.string();
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
case 4: {
|
|
356
|
+
if (tag !== 34) {
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
message.picture = reader.string();
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
case 5: {
|
|
363
|
+
if (tag !== 42) {
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
366
|
+
message.icon = reader.string();
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
case 6: {
|
|
370
|
+
if (tag !== 50) {
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
message.sound = reader.string();
|
|
374
|
+
continue;
|
|
375
|
+
}
|
|
376
|
+
case 7: {
|
|
377
|
+
if (tag !== 58) {
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
message.action = reader.string();
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
383
|
+
case 16: {
|
|
384
|
+
if (tag !== 130) {
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
const entry16 = DirectMessage_DataEntry.decode(reader, reader.uint32());
|
|
388
|
+
if (entry16.value !== undefined) {
|
|
389
|
+
message.data[entry16.key] = entry16.value;
|
|
390
|
+
}
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
case 21: {
|
|
394
|
+
if (tag !== 168) {
|
|
395
|
+
break;
|
|
396
|
+
}
|
|
397
|
+
message.userId = Long.fromString(reader.uint64().toString(), true);
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
case 22: {
|
|
401
|
+
if (tag !== 176) {
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
case 23: {
|
|
408
|
+
if (tag !== 184) {
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
message.organizationId = Long.fromString(reader.uint64().toString(), true);
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
case 24: {
|
|
415
|
+
if (tag !== 194) {
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
message.topic = reader.string();
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
case 25: {
|
|
422
|
+
if (tag !== 202) {
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
message.usersList = IdList.decode(reader, reader.uint32());
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
428
|
+
case 26: {
|
|
429
|
+
if (tag !== 210) {
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
message.devicesList = IdList.decode(reader, reader.uint32());
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
case 32: {
|
|
436
|
+
if (tag === 256) {
|
|
437
|
+
message.platforms.push(reader.int32());
|
|
438
|
+
continue;
|
|
439
|
+
}
|
|
440
|
+
if (tag === 258) {
|
|
441
|
+
const end2 = reader.uint32() + reader.pos;
|
|
442
|
+
while (reader.pos < end2) {
|
|
443
|
+
message.platforms.push(reader.int32());
|
|
444
|
+
}
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
case 31: {
|
|
450
|
+
if (tag !== 250) {
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
case 33: {
|
|
457
|
+
if (tag !== 266) {
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
message.ttl = Duration.decode(reader, reader.uint32());
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
reader.skip(tag & 7);
|
|
468
|
+
}
|
|
469
|
+
return message;
|
|
470
|
+
},
|
|
471
|
+
create(base) {
|
|
472
|
+
return DirectMessage.fromPartial(base ?? {});
|
|
473
|
+
},
|
|
474
|
+
fromPartial(object) {
|
|
475
|
+
const message = createBaseDirectMessage();
|
|
476
|
+
message.uuid = object.uuid ?? "";
|
|
477
|
+
message.title = object.title ?? "";
|
|
478
|
+
message.body = object.body ?? undefined;
|
|
479
|
+
message.picture = object.picture ?? undefined;
|
|
480
|
+
message.icon = object.icon ?? undefined;
|
|
481
|
+
message.sound = object.sound ?? undefined;
|
|
482
|
+
message.action = object.action ?? undefined;
|
|
483
|
+
message.data = globalThis.Object.entries(object.data ?? {}).reduce((acc, [key, value]) => {
|
|
484
|
+
if (value !== undefined) {
|
|
485
|
+
acc[key] = globalThis.String(value);
|
|
486
|
+
}
|
|
487
|
+
return acc;
|
|
488
|
+
}, {});
|
|
489
|
+
message.userId = (object.userId !== undefined && object.userId !== null)
|
|
490
|
+
? Long.fromValue(object.userId)
|
|
491
|
+
: undefined;
|
|
492
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
493
|
+
? Long.fromValue(object.deviceId)
|
|
494
|
+
: undefined;
|
|
495
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
496
|
+
? Long.fromValue(object.organizationId)
|
|
497
|
+
: undefined;
|
|
498
|
+
message.topic = object.topic ?? undefined;
|
|
499
|
+
message.usersList = (object.usersList !== undefined && object.usersList !== null)
|
|
500
|
+
? IdList.fromPartial(object.usersList)
|
|
501
|
+
: undefined;
|
|
502
|
+
message.devicesList = (object.devicesList !== undefined && object.devicesList !== null)
|
|
503
|
+
? IdList.fromPartial(object.devicesList)
|
|
504
|
+
: undefined;
|
|
505
|
+
message.platforms = object.platforms?.map((e) => e) || [];
|
|
506
|
+
message.timestamp = object.timestamp ?? undefined;
|
|
507
|
+
message.ttl = (object.ttl !== undefined && object.ttl !== null) ? Duration.fromPartial(object.ttl) : undefined;
|
|
508
|
+
return message;
|
|
509
|
+
},
|
|
510
|
+
};
|
|
511
|
+
function createBaseDirectMessage_DataEntry() {
|
|
512
|
+
return { key: "", value: "" };
|
|
513
|
+
}
|
|
514
|
+
export const DirectMessage_DataEntry = {
|
|
515
|
+
encode(message, writer = new BinaryWriter()) {
|
|
516
|
+
if (message.key !== "") {
|
|
517
|
+
writer.uint32(10).string(message.key);
|
|
518
|
+
}
|
|
519
|
+
if (message.value !== "") {
|
|
520
|
+
writer.uint32(18).string(message.value);
|
|
521
|
+
}
|
|
522
|
+
return writer;
|
|
523
|
+
},
|
|
524
|
+
decode(input, length) {
|
|
525
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
526
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
527
|
+
const message = createBaseDirectMessage_DataEntry();
|
|
528
|
+
while (reader.pos < end) {
|
|
529
|
+
const tag = reader.uint32();
|
|
530
|
+
switch (tag >>> 3) {
|
|
531
|
+
case 1: {
|
|
532
|
+
if (tag !== 10) {
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
535
|
+
message.key = reader.string();
|
|
536
|
+
continue;
|
|
537
|
+
}
|
|
538
|
+
case 2: {
|
|
539
|
+
if (tag !== 18) {
|
|
540
|
+
break;
|
|
541
|
+
}
|
|
542
|
+
message.value = reader.string();
|
|
543
|
+
continue;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
547
|
+
break;
|
|
548
|
+
}
|
|
549
|
+
reader.skip(tag & 7);
|
|
550
|
+
}
|
|
551
|
+
return message;
|
|
552
|
+
},
|
|
553
|
+
create(base) {
|
|
554
|
+
return DirectMessage_DataEntry.fromPartial(base ?? {});
|
|
555
|
+
},
|
|
556
|
+
fromPartial(object) {
|
|
557
|
+
const message = createBaseDirectMessage_DataEntry();
|
|
558
|
+
message.key = object.key ?? "";
|
|
559
|
+
message.value = object.value ?? "";
|
|
560
|
+
return message;
|
|
561
|
+
},
|
|
562
|
+
};
|
|
563
|
+
function createBaseDirectRawMessage() {
|
|
564
|
+
return { topic: undefined, userIds: [], deviceIds: [], directMessage: undefined };
|
|
565
|
+
}
|
|
566
|
+
export const DirectRawMessage = {
|
|
567
|
+
encode(message, writer = new BinaryWriter()) {
|
|
568
|
+
if (message.topic !== undefined) {
|
|
569
|
+
writer.uint32(10).string(message.topic);
|
|
570
|
+
}
|
|
571
|
+
writer.uint32(18).fork();
|
|
572
|
+
for (const v of message.userIds) {
|
|
573
|
+
writer.uint64(v.toString());
|
|
574
|
+
}
|
|
575
|
+
writer.join();
|
|
576
|
+
writer.uint32(26).fork();
|
|
577
|
+
for (const v of message.deviceIds) {
|
|
578
|
+
writer.uint64(v.toString());
|
|
579
|
+
}
|
|
580
|
+
writer.join();
|
|
581
|
+
if (message.directMessage !== undefined) {
|
|
582
|
+
DirectMessage.encode(message.directMessage, writer.uint32(34).fork()).join();
|
|
583
|
+
}
|
|
584
|
+
return writer;
|
|
585
|
+
},
|
|
586
|
+
decode(input, length) {
|
|
587
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
588
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
589
|
+
const message = createBaseDirectRawMessage();
|
|
590
|
+
while (reader.pos < end) {
|
|
591
|
+
const tag = reader.uint32();
|
|
592
|
+
switch (tag >>> 3) {
|
|
593
|
+
case 1: {
|
|
594
|
+
if (tag !== 10) {
|
|
595
|
+
break;
|
|
596
|
+
}
|
|
597
|
+
message.topic = reader.string();
|
|
598
|
+
continue;
|
|
599
|
+
}
|
|
600
|
+
case 2: {
|
|
601
|
+
if (tag === 16) {
|
|
602
|
+
message.userIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
605
|
+
if (tag === 18) {
|
|
606
|
+
const end2 = reader.uint32() + reader.pos;
|
|
607
|
+
while (reader.pos < end2) {
|
|
608
|
+
message.userIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
609
|
+
}
|
|
610
|
+
continue;
|
|
611
|
+
}
|
|
612
|
+
break;
|
|
613
|
+
}
|
|
614
|
+
case 3: {
|
|
615
|
+
if (tag === 24) {
|
|
616
|
+
message.deviceIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
617
|
+
continue;
|
|
618
|
+
}
|
|
619
|
+
if (tag === 26) {
|
|
620
|
+
const end2 = reader.uint32() + reader.pos;
|
|
621
|
+
while (reader.pos < end2) {
|
|
622
|
+
message.deviceIds.push(Long.fromString(reader.uint64().toString(), true));
|
|
623
|
+
}
|
|
624
|
+
continue;
|
|
625
|
+
}
|
|
626
|
+
break;
|
|
627
|
+
}
|
|
628
|
+
case 4: {
|
|
629
|
+
if (tag !== 34) {
|
|
630
|
+
break;
|
|
631
|
+
}
|
|
632
|
+
message.directMessage = DirectMessage.decode(reader, reader.uint32());
|
|
633
|
+
continue;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
637
|
+
break;
|
|
638
|
+
}
|
|
639
|
+
reader.skip(tag & 7);
|
|
640
|
+
}
|
|
641
|
+
return message;
|
|
642
|
+
},
|
|
643
|
+
create(base) {
|
|
644
|
+
return DirectRawMessage.fromPartial(base ?? {});
|
|
645
|
+
},
|
|
646
|
+
fromPartial(object) {
|
|
647
|
+
const message = createBaseDirectRawMessage();
|
|
648
|
+
message.topic = object.topic ?? undefined;
|
|
649
|
+
message.userIds = object.userIds?.map((e) => Long.fromValue(e)) || [];
|
|
650
|
+
message.deviceIds = object.deviceIds?.map((e) => Long.fromValue(e)) || [];
|
|
651
|
+
message.directMessage = (object.directMessage !== undefined && object.directMessage !== null)
|
|
652
|
+
? DirectMessage.fromPartial(object.directMessage)
|
|
653
|
+
: undefined;
|
|
654
|
+
return message;
|
|
655
|
+
},
|
|
656
|
+
};
|
|
657
|
+
function toTimestamp(date) {
|
|
658
|
+
const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
|
|
659
|
+
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
660
|
+
return { seconds, nanos };
|
|
661
|
+
}
|
|
662
|
+
function fromTimestamp(t) {
|
|
663
|
+
let millis = (t.seconds.toNumber() || 0) * 1_000;
|
|
664
|
+
millis += (t.nanos || 0) / 1_000_000;
|
|
665
|
+
return new globalThis.Date(millis);
|
|
666
|
+
}
|
|
667
|
+
function numberToLong(number) {
|
|
668
|
+
return Long.fromNumber(number);
|
|
669
|
+
}
|