@control_yourself/contracts 0.3.0 → 0.3.2
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/generated/messenger_pb.d.ts +78 -1
- package/dist/generated/messenger_pb.js +20 -2
- package/dist/generated/messenger_pb.js.map +1 -1
- package/dist/generated-grpc/messenger.d.ts +113 -0
- package/dist/generated-grpc/messenger.js +1000 -11
- package/dist/generated-grpc/messenger.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/generated/messenger_pb.ts +283 -3
- package/generated-grpc/auth.ts +1 -1
- package/generated-grpc/google/protobuf/empty.ts +1 -1
- package/generated-grpc/messenger.ts +1248 -31
- package/package.json +1 -1
- package/protos/messenger.proto +62 -1
|
@@ -1,9 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessengerServiceClient = exports.MessengerServiceService = exports.GenerateTelegramLinkResponse = exports.GenerateTelegramLinkRequest = exports.protobufPackage = void 0;
|
|
3
|
+
exports.MessengerServiceClient = exports.MessengerServiceService = exports.RemoveIntegrationRequest = exports.GetIntegrationsResponse = exports.Integration_MetaEntry = exports.Integration = exports.GetIntegrationsRequest = exports.LinkTelegramAccountResponse = exports.LinkTelegramAccountRequest = exports.TelegramMeta_HeadersEntry = exports.TelegramMeta = exports.LinkTelegramAccountResponsePayload = exports.LinkTelegramAccountRequestPayload = exports.GenerateTelegramLinkResponse = exports.GenerateTelegramLinkRequest = exports.LinkTelegramAccountStatus = exports.protobufPackage = void 0;
|
|
4
|
+
exports.linkTelegramAccountStatusFromJSON = linkTelegramAccountStatusFromJSON;
|
|
5
|
+
exports.linkTelegramAccountStatusToJSON = linkTelegramAccountStatusToJSON;
|
|
4
6
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
5
7
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
8
|
+
const empty_1 = require("./google/protobuf/empty");
|
|
6
9
|
exports.protobufPackage = "messenger.v1";
|
|
10
|
+
var LinkTelegramAccountStatus;
|
|
11
|
+
(function (LinkTelegramAccountStatus) {
|
|
12
|
+
LinkTelegramAccountStatus[LinkTelegramAccountStatus["STATUS_UNSPECIFIED"] = 0] = "STATUS_UNSPECIFIED";
|
|
13
|
+
LinkTelegramAccountStatus[LinkTelegramAccountStatus["STATUS_COMPLETED"] = 1] = "STATUS_COMPLETED";
|
|
14
|
+
LinkTelegramAccountStatus[LinkTelegramAccountStatus["STATUS_PROCESSING"] = 2] = "STATUS_PROCESSING";
|
|
15
|
+
LinkTelegramAccountStatus[LinkTelegramAccountStatus["STATUS_FAILED"] = 3] = "STATUS_FAILED";
|
|
16
|
+
LinkTelegramAccountStatus[LinkTelegramAccountStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
17
|
+
})(LinkTelegramAccountStatus || (exports.LinkTelegramAccountStatus = LinkTelegramAccountStatus = {}));
|
|
18
|
+
function linkTelegramAccountStatusFromJSON(object) {
|
|
19
|
+
switch (object) {
|
|
20
|
+
case 0:
|
|
21
|
+
case "STATUS_UNSPECIFIED":
|
|
22
|
+
return LinkTelegramAccountStatus.STATUS_UNSPECIFIED;
|
|
23
|
+
case 1:
|
|
24
|
+
case "STATUS_COMPLETED":
|
|
25
|
+
return LinkTelegramAccountStatus.STATUS_COMPLETED;
|
|
26
|
+
case 2:
|
|
27
|
+
case "STATUS_PROCESSING":
|
|
28
|
+
return LinkTelegramAccountStatus.STATUS_PROCESSING;
|
|
29
|
+
case 3:
|
|
30
|
+
case "STATUS_FAILED":
|
|
31
|
+
return LinkTelegramAccountStatus.STATUS_FAILED;
|
|
32
|
+
case -1:
|
|
33
|
+
case "UNRECOGNIZED":
|
|
34
|
+
default:
|
|
35
|
+
return LinkTelegramAccountStatus.UNRECOGNIZED;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function linkTelegramAccountStatusToJSON(object) {
|
|
39
|
+
switch (object) {
|
|
40
|
+
case LinkTelegramAccountStatus.STATUS_UNSPECIFIED:
|
|
41
|
+
return "STATUS_UNSPECIFIED";
|
|
42
|
+
case LinkTelegramAccountStatus.STATUS_COMPLETED:
|
|
43
|
+
return "STATUS_COMPLETED";
|
|
44
|
+
case LinkTelegramAccountStatus.STATUS_PROCESSING:
|
|
45
|
+
return "STATUS_PROCESSING";
|
|
46
|
+
case LinkTelegramAccountStatus.STATUS_FAILED:
|
|
47
|
+
return "STATUS_FAILED";
|
|
48
|
+
case LinkTelegramAccountStatus.UNRECOGNIZED:
|
|
49
|
+
default:
|
|
50
|
+
return "UNRECOGNIZED";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
7
53
|
function createBaseGenerateTelegramLinkRequest() {
|
|
8
54
|
return { userId: 0 };
|
|
9
55
|
}
|
|
@@ -112,18 +158,961 @@ exports.GenerateTelegramLinkResponse = {
|
|
|
112
158
|
return message;
|
|
113
159
|
},
|
|
114
160
|
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
161
|
+
function createBaseLinkTelegramAccountRequestPayload() {
|
|
162
|
+
return { token: "" };
|
|
163
|
+
}
|
|
164
|
+
exports.LinkTelegramAccountRequestPayload = {
|
|
165
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
166
|
+
if (message.token !== "") {
|
|
167
|
+
writer.uint32(10).string(message.token);
|
|
168
|
+
}
|
|
169
|
+
return writer;
|
|
170
|
+
},
|
|
171
|
+
decode(input, length) {
|
|
172
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
173
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
174
|
+
const message = createBaseLinkTelegramAccountRequestPayload();
|
|
175
|
+
while (reader.pos < end) {
|
|
176
|
+
const tag = reader.uint32();
|
|
177
|
+
switch (tag >>> 3) {
|
|
178
|
+
case 1: {
|
|
179
|
+
if (tag !== 10) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
message.token = reader.string();
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
reader.skip(tag & 7);
|
|
190
|
+
}
|
|
191
|
+
return message;
|
|
192
|
+
},
|
|
193
|
+
fromJSON(object) {
|
|
194
|
+
return { token: isSet(object.token) ? globalThis.String(object.token) : "" };
|
|
195
|
+
},
|
|
196
|
+
toJSON(message) {
|
|
197
|
+
const obj = {};
|
|
198
|
+
if (message.token !== "") {
|
|
199
|
+
obj.token = message.token;
|
|
200
|
+
}
|
|
201
|
+
return obj;
|
|
202
|
+
},
|
|
203
|
+
create(base) {
|
|
204
|
+
return exports.LinkTelegramAccountRequestPayload.fromPartial(base ?? {});
|
|
205
|
+
},
|
|
206
|
+
fromPartial(object) {
|
|
207
|
+
const message = createBaseLinkTelegramAccountRequestPayload();
|
|
208
|
+
message.token = object.token ?? "";
|
|
209
|
+
return message;
|
|
124
210
|
},
|
|
125
211
|
};
|
|
126
|
-
|
|
212
|
+
function createBaseLinkTelegramAccountResponsePayload() {
|
|
213
|
+
return { status: 0, message: "" };
|
|
214
|
+
}
|
|
215
|
+
exports.LinkTelegramAccountResponsePayload = {
|
|
216
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
217
|
+
if (message.status !== 0) {
|
|
218
|
+
writer.uint32(8).int32(message.status);
|
|
219
|
+
}
|
|
220
|
+
if (message.message !== "") {
|
|
221
|
+
writer.uint32(18).string(message.message);
|
|
222
|
+
}
|
|
223
|
+
return writer;
|
|
224
|
+
},
|
|
225
|
+
decode(input, length) {
|
|
226
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
227
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
228
|
+
const message = createBaseLinkTelegramAccountResponsePayload();
|
|
229
|
+
while (reader.pos < end) {
|
|
230
|
+
const tag = reader.uint32();
|
|
231
|
+
switch (tag >>> 3) {
|
|
232
|
+
case 1: {
|
|
233
|
+
if (tag !== 8) {
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
message.status = reader.int32();
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
case 2: {
|
|
240
|
+
if (tag !== 18) {
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
message.message = reader.string();
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
reader.skip(tag & 7);
|
|
251
|
+
}
|
|
252
|
+
return message;
|
|
253
|
+
},
|
|
254
|
+
fromJSON(object) {
|
|
255
|
+
return {
|
|
256
|
+
status: isSet(object.status) ? linkTelegramAccountStatusFromJSON(object.status) : 0,
|
|
257
|
+
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
258
|
+
};
|
|
259
|
+
},
|
|
260
|
+
toJSON(message) {
|
|
261
|
+
const obj = {};
|
|
262
|
+
if (message.status !== 0) {
|
|
263
|
+
obj.status = linkTelegramAccountStatusToJSON(message.status);
|
|
264
|
+
}
|
|
265
|
+
if (message.message !== "") {
|
|
266
|
+
obj.message = message.message;
|
|
267
|
+
}
|
|
268
|
+
return obj;
|
|
269
|
+
},
|
|
270
|
+
create(base) {
|
|
271
|
+
return exports.LinkTelegramAccountResponsePayload.fromPartial(base ?? {});
|
|
272
|
+
},
|
|
273
|
+
fromPartial(object) {
|
|
274
|
+
const message = createBaseLinkTelegramAccountResponsePayload();
|
|
275
|
+
message.status = object.status ?? 0;
|
|
276
|
+
message.message = object.message ?? "";
|
|
277
|
+
return message;
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
function createBaseTelegramMeta() {
|
|
281
|
+
return { timestamp: 0, correlationId: "", telegramUserId: 0, chatId: 0, headers: {} };
|
|
282
|
+
}
|
|
283
|
+
exports.TelegramMeta = {
|
|
284
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
285
|
+
if (message.timestamp !== 0) {
|
|
286
|
+
writer.uint32(8).int64(message.timestamp);
|
|
287
|
+
}
|
|
288
|
+
if (message.correlationId !== "") {
|
|
289
|
+
writer.uint32(18).string(message.correlationId);
|
|
290
|
+
}
|
|
291
|
+
if (message.telegramUserId !== 0) {
|
|
292
|
+
writer.uint32(24).int64(message.telegramUserId);
|
|
293
|
+
}
|
|
294
|
+
if (message.chatId !== 0) {
|
|
295
|
+
writer.uint32(32).int64(message.chatId);
|
|
296
|
+
}
|
|
297
|
+
globalThis.Object.entries(message.headers).forEach(([key, value]) => {
|
|
298
|
+
exports.TelegramMeta_HeadersEntry.encode({ key: key, value }, writer.uint32(42).fork()).join();
|
|
299
|
+
});
|
|
300
|
+
return writer;
|
|
301
|
+
},
|
|
302
|
+
decode(input, length) {
|
|
303
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
304
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
305
|
+
const message = createBaseTelegramMeta();
|
|
306
|
+
while (reader.pos < end) {
|
|
307
|
+
const tag = reader.uint32();
|
|
308
|
+
switch (tag >>> 3) {
|
|
309
|
+
case 1: {
|
|
310
|
+
if (tag !== 8) {
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
message.timestamp = longToNumber(reader.int64());
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
case 2: {
|
|
317
|
+
if (tag !== 18) {
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
message.correlationId = reader.string();
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
case 3: {
|
|
324
|
+
if (tag !== 24) {
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
message.telegramUserId = longToNumber(reader.int64());
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
case 4: {
|
|
331
|
+
if (tag !== 32) {
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
message.chatId = longToNumber(reader.int64());
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
case 5: {
|
|
338
|
+
if (tag !== 42) {
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
const entry5 = exports.TelegramMeta_HeadersEntry.decode(reader, reader.uint32());
|
|
342
|
+
if (entry5.value !== undefined) {
|
|
343
|
+
message.headers[entry5.key] = entry5.value;
|
|
344
|
+
}
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
reader.skip(tag & 7);
|
|
352
|
+
}
|
|
353
|
+
return message;
|
|
354
|
+
},
|
|
355
|
+
fromJSON(object) {
|
|
356
|
+
return {
|
|
357
|
+
timestamp: isSet(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
|
|
358
|
+
correlationId: isSet(object.correlationId)
|
|
359
|
+
? globalThis.String(object.correlationId)
|
|
360
|
+
: isSet(object.correlation_id)
|
|
361
|
+
? globalThis.String(object.correlation_id)
|
|
362
|
+
: "",
|
|
363
|
+
telegramUserId: isSet(object.telegramUserId)
|
|
364
|
+
? globalThis.Number(object.telegramUserId)
|
|
365
|
+
: isSet(object.telegram_user_id)
|
|
366
|
+
? globalThis.Number(object.telegram_user_id)
|
|
367
|
+
: 0,
|
|
368
|
+
chatId: isSet(object.chatId)
|
|
369
|
+
? globalThis.Number(object.chatId)
|
|
370
|
+
: isSet(object.chat_id)
|
|
371
|
+
? globalThis.Number(object.chat_id)
|
|
372
|
+
: 0,
|
|
373
|
+
headers: isObject(object.headers)
|
|
374
|
+
? globalThis.Object.entries(object.headers).reduce((acc, [key, value]) => {
|
|
375
|
+
acc[key] = globalThis.String(value);
|
|
376
|
+
return acc;
|
|
377
|
+
}, {})
|
|
378
|
+
: {},
|
|
379
|
+
};
|
|
380
|
+
},
|
|
381
|
+
toJSON(message) {
|
|
382
|
+
const obj = {};
|
|
383
|
+
if (message.timestamp !== 0) {
|
|
384
|
+
obj.timestamp = Math.round(message.timestamp);
|
|
385
|
+
}
|
|
386
|
+
if (message.correlationId !== "") {
|
|
387
|
+
obj.correlationId = message.correlationId;
|
|
388
|
+
}
|
|
389
|
+
if (message.telegramUserId !== 0) {
|
|
390
|
+
obj.telegramUserId = Math.round(message.telegramUserId);
|
|
391
|
+
}
|
|
392
|
+
if (message.chatId !== 0) {
|
|
393
|
+
obj.chatId = Math.round(message.chatId);
|
|
394
|
+
}
|
|
395
|
+
if (message.headers) {
|
|
396
|
+
const entries = globalThis.Object.entries(message.headers);
|
|
397
|
+
if (entries.length > 0) {
|
|
398
|
+
obj.headers = {};
|
|
399
|
+
entries.forEach(([k, v]) => {
|
|
400
|
+
obj.headers[k] = v;
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
return obj;
|
|
405
|
+
},
|
|
406
|
+
create(base) {
|
|
407
|
+
return exports.TelegramMeta.fromPartial(base ?? {});
|
|
408
|
+
},
|
|
409
|
+
fromPartial(object) {
|
|
410
|
+
const message = createBaseTelegramMeta();
|
|
411
|
+
message.timestamp = object.timestamp ?? 0;
|
|
412
|
+
message.correlationId = object.correlationId ?? "";
|
|
413
|
+
message.telegramUserId = object.telegramUserId ?? 0;
|
|
414
|
+
message.chatId = object.chatId ?? 0;
|
|
415
|
+
message.headers = globalThis.Object.entries(object.headers ?? {}).reduce((acc, [key, value]) => {
|
|
416
|
+
if (value !== undefined) {
|
|
417
|
+
acc[key] = globalThis.String(value);
|
|
418
|
+
}
|
|
419
|
+
return acc;
|
|
420
|
+
}, {});
|
|
421
|
+
return message;
|
|
422
|
+
},
|
|
423
|
+
};
|
|
424
|
+
function createBaseTelegramMeta_HeadersEntry() {
|
|
425
|
+
return { key: "", value: "" };
|
|
426
|
+
}
|
|
427
|
+
exports.TelegramMeta_HeadersEntry = {
|
|
428
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
429
|
+
if (message.key !== "") {
|
|
430
|
+
writer.uint32(10).string(message.key);
|
|
431
|
+
}
|
|
432
|
+
if (message.value !== "") {
|
|
433
|
+
writer.uint32(18).string(message.value);
|
|
434
|
+
}
|
|
435
|
+
return writer;
|
|
436
|
+
},
|
|
437
|
+
decode(input, length) {
|
|
438
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
439
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
440
|
+
const message = createBaseTelegramMeta_HeadersEntry();
|
|
441
|
+
while (reader.pos < end) {
|
|
442
|
+
const tag = reader.uint32();
|
|
443
|
+
switch (tag >>> 3) {
|
|
444
|
+
case 1: {
|
|
445
|
+
if (tag !== 10) {
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
message.key = reader.string();
|
|
449
|
+
continue;
|
|
450
|
+
}
|
|
451
|
+
case 2: {
|
|
452
|
+
if (tag !== 18) {
|
|
453
|
+
break;
|
|
454
|
+
}
|
|
455
|
+
message.value = reader.string();
|
|
456
|
+
continue;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
460
|
+
break;
|
|
461
|
+
}
|
|
462
|
+
reader.skip(tag & 7);
|
|
463
|
+
}
|
|
464
|
+
return message;
|
|
465
|
+
},
|
|
466
|
+
fromJSON(object) {
|
|
467
|
+
return {
|
|
468
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
469
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
470
|
+
};
|
|
471
|
+
},
|
|
472
|
+
toJSON(message) {
|
|
473
|
+
const obj = {};
|
|
474
|
+
if (message.key !== "") {
|
|
475
|
+
obj.key = message.key;
|
|
476
|
+
}
|
|
477
|
+
if (message.value !== "") {
|
|
478
|
+
obj.value = message.value;
|
|
479
|
+
}
|
|
480
|
+
return obj;
|
|
481
|
+
},
|
|
482
|
+
create(base) {
|
|
483
|
+
return exports.TelegramMeta_HeadersEntry.fromPartial(base ?? {});
|
|
484
|
+
},
|
|
485
|
+
fromPartial(object) {
|
|
486
|
+
const message = createBaseTelegramMeta_HeadersEntry();
|
|
487
|
+
message.key = object.key ?? "";
|
|
488
|
+
message.value = object.value ?? "";
|
|
489
|
+
return message;
|
|
490
|
+
},
|
|
491
|
+
};
|
|
492
|
+
function createBaseLinkTelegramAccountRequest() {
|
|
493
|
+
return { meta: undefined, payload: undefined };
|
|
494
|
+
}
|
|
495
|
+
exports.LinkTelegramAccountRequest = {
|
|
496
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
497
|
+
if (message.meta !== undefined) {
|
|
498
|
+
exports.TelegramMeta.encode(message.meta, writer.uint32(10).fork()).join();
|
|
499
|
+
}
|
|
500
|
+
if (message.payload !== undefined) {
|
|
501
|
+
exports.LinkTelegramAccountRequestPayload.encode(message.payload, writer.uint32(18).fork()).join();
|
|
502
|
+
}
|
|
503
|
+
return writer;
|
|
504
|
+
},
|
|
505
|
+
decode(input, length) {
|
|
506
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
507
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
508
|
+
const message = createBaseLinkTelegramAccountRequest();
|
|
509
|
+
while (reader.pos < end) {
|
|
510
|
+
const tag = reader.uint32();
|
|
511
|
+
switch (tag >>> 3) {
|
|
512
|
+
case 1: {
|
|
513
|
+
if (tag !== 10) {
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
message.meta = exports.TelegramMeta.decode(reader, reader.uint32());
|
|
517
|
+
continue;
|
|
518
|
+
}
|
|
519
|
+
case 2: {
|
|
520
|
+
if (tag !== 18) {
|
|
521
|
+
break;
|
|
522
|
+
}
|
|
523
|
+
message.payload = exports.LinkTelegramAccountRequestPayload.decode(reader, reader.uint32());
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
reader.skip(tag & 7);
|
|
531
|
+
}
|
|
532
|
+
return message;
|
|
533
|
+
},
|
|
534
|
+
fromJSON(object) {
|
|
535
|
+
return {
|
|
536
|
+
meta: isSet(object.meta) ? exports.TelegramMeta.fromJSON(object.meta) : undefined,
|
|
537
|
+
payload: isSet(object.payload) ? exports.LinkTelegramAccountRequestPayload.fromJSON(object.payload) : undefined,
|
|
538
|
+
};
|
|
539
|
+
},
|
|
540
|
+
toJSON(message) {
|
|
541
|
+
const obj = {};
|
|
542
|
+
if (message.meta !== undefined) {
|
|
543
|
+
obj.meta = exports.TelegramMeta.toJSON(message.meta);
|
|
544
|
+
}
|
|
545
|
+
if (message.payload !== undefined) {
|
|
546
|
+
obj.payload = exports.LinkTelegramAccountRequestPayload.toJSON(message.payload);
|
|
547
|
+
}
|
|
548
|
+
return obj;
|
|
549
|
+
},
|
|
550
|
+
create(base) {
|
|
551
|
+
return exports.LinkTelegramAccountRequest.fromPartial(base ?? {});
|
|
552
|
+
},
|
|
553
|
+
fromPartial(object) {
|
|
554
|
+
const message = createBaseLinkTelegramAccountRequest();
|
|
555
|
+
message.meta = (object.meta !== undefined && object.meta !== null)
|
|
556
|
+
? exports.TelegramMeta.fromPartial(object.meta)
|
|
557
|
+
: undefined;
|
|
558
|
+
message.payload = (object.payload !== undefined && object.payload !== null)
|
|
559
|
+
? exports.LinkTelegramAccountRequestPayload.fromPartial(object.payload)
|
|
560
|
+
: undefined;
|
|
561
|
+
return message;
|
|
562
|
+
},
|
|
563
|
+
};
|
|
564
|
+
function createBaseLinkTelegramAccountResponse() {
|
|
565
|
+
return { meta: undefined, payload: undefined };
|
|
566
|
+
}
|
|
567
|
+
exports.LinkTelegramAccountResponse = {
|
|
568
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
569
|
+
if (message.meta !== undefined) {
|
|
570
|
+
exports.TelegramMeta.encode(message.meta, writer.uint32(10).fork()).join();
|
|
571
|
+
}
|
|
572
|
+
if (message.payload !== undefined) {
|
|
573
|
+
exports.LinkTelegramAccountResponsePayload.encode(message.payload, writer.uint32(18).fork()).join();
|
|
574
|
+
}
|
|
575
|
+
return writer;
|
|
576
|
+
},
|
|
577
|
+
decode(input, length) {
|
|
578
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
579
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
580
|
+
const message = createBaseLinkTelegramAccountResponse();
|
|
581
|
+
while (reader.pos < end) {
|
|
582
|
+
const tag = reader.uint32();
|
|
583
|
+
switch (tag >>> 3) {
|
|
584
|
+
case 1: {
|
|
585
|
+
if (tag !== 10) {
|
|
586
|
+
break;
|
|
587
|
+
}
|
|
588
|
+
message.meta = exports.TelegramMeta.decode(reader, reader.uint32());
|
|
589
|
+
continue;
|
|
590
|
+
}
|
|
591
|
+
case 2: {
|
|
592
|
+
if (tag !== 18) {
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
message.payload = exports.LinkTelegramAccountResponsePayload.decode(reader, reader.uint32());
|
|
596
|
+
continue;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
600
|
+
break;
|
|
601
|
+
}
|
|
602
|
+
reader.skip(tag & 7);
|
|
603
|
+
}
|
|
604
|
+
return message;
|
|
605
|
+
},
|
|
606
|
+
fromJSON(object) {
|
|
607
|
+
return {
|
|
608
|
+
meta: isSet(object.meta) ? exports.TelegramMeta.fromJSON(object.meta) : undefined,
|
|
609
|
+
payload: isSet(object.payload) ? exports.LinkTelegramAccountResponsePayload.fromJSON(object.payload) : undefined,
|
|
610
|
+
};
|
|
611
|
+
},
|
|
612
|
+
toJSON(message) {
|
|
613
|
+
const obj = {};
|
|
614
|
+
if (message.meta !== undefined) {
|
|
615
|
+
obj.meta = exports.TelegramMeta.toJSON(message.meta);
|
|
616
|
+
}
|
|
617
|
+
if (message.payload !== undefined) {
|
|
618
|
+
obj.payload = exports.LinkTelegramAccountResponsePayload.toJSON(message.payload);
|
|
619
|
+
}
|
|
620
|
+
return obj;
|
|
621
|
+
},
|
|
622
|
+
create(base) {
|
|
623
|
+
return exports.LinkTelegramAccountResponse.fromPartial(base ?? {});
|
|
624
|
+
},
|
|
625
|
+
fromPartial(object) {
|
|
626
|
+
const message = createBaseLinkTelegramAccountResponse();
|
|
627
|
+
message.meta = (object.meta !== undefined && object.meta !== null)
|
|
628
|
+
? exports.TelegramMeta.fromPartial(object.meta)
|
|
629
|
+
: undefined;
|
|
630
|
+
message.payload = (object.payload !== undefined && object.payload !== null)
|
|
631
|
+
? exports.LinkTelegramAccountResponsePayload.fromPartial(object.payload)
|
|
632
|
+
: undefined;
|
|
633
|
+
return message;
|
|
634
|
+
},
|
|
635
|
+
};
|
|
636
|
+
function createBaseGetIntegrationsRequest() {
|
|
637
|
+
return { userId: 0 };
|
|
638
|
+
}
|
|
639
|
+
exports.GetIntegrationsRequest = {
|
|
640
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
641
|
+
if (message.userId !== 0) {
|
|
642
|
+
writer.uint32(8).int32(message.userId);
|
|
643
|
+
}
|
|
644
|
+
return writer;
|
|
645
|
+
},
|
|
646
|
+
decode(input, length) {
|
|
647
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
648
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
649
|
+
const message = createBaseGetIntegrationsRequest();
|
|
650
|
+
while (reader.pos < end) {
|
|
651
|
+
const tag = reader.uint32();
|
|
652
|
+
switch (tag >>> 3) {
|
|
653
|
+
case 1: {
|
|
654
|
+
if (tag !== 8) {
|
|
655
|
+
break;
|
|
656
|
+
}
|
|
657
|
+
message.userId = reader.int32();
|
|
658
|
+
continue;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
662
|
+
break;
|
|
663
|
+
}
|
|
664
|
+
reader.skip(tag & 7);
|
|
665
|
+
}
|
|
666
|
+
return message;
|
|
667
|
+
},
|
|
668
|
+
fromJSON(object) {
|
|
669
|
+
return {
|
|
670
|
+
userId: isSet(object.userId)
|
|
671
|
+
? globalThis.Number(object.userId)
|
|
672
|
+
: isSet(object.user_id)
|
|
673
|
+
? globalThis.Number(object.user_id)
|
|
674
|
+
: 0,
|
|
675
|
+
};
|
|
676
|
+
},
|
|
677
|
+
toJSON(message) {
|
|
678
|
+
const obj = {};
|
|
679
|
+
if (message.userId !== 0) {
|
|
680
|
+
obj.userId = Math.round(message.userId);
|
|
681
|
+
}
|
|
682
|
+
return obj;
|
|
683
|
+
},
|
|
684
|
+
create(base) {
|
|
685
|
+
return exports.GetIntegrationsRequest.fromPartial(base ?? {});
|
|
686
|
+
},
|
|
687
|
+
fromPartial(object) {
|
|
688
|
+
const message = createBaseGetIntegrationsRequest();
|
|
689
|
+
message.userId = object.userId ?? 0;
|
|
690
|
+
return message;
|
|
691
|
+
},
|
|
692
|
+
};
|
|
693
|
+
function createBaseIntegration() {
|
|
694
|
+
return { id: 0, meta: {}, messenger: "", messengerId: "", userId: 0, createdAt: 0, updatedAt: 0, deletedAt: 0 };
|
|
695
|
+
}
|
|
696
|
+
exports.Integration = {
|
|
697
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
698
|
+
if (message.id !== 0) {
|
|
699
|
+
writer.uint32(8).int32(message.id);
|
|
700
|
+
}
|
|
701
|
+
globalThis.Object.entries(message.meta).forEach(([key, value]) => {
|
|
702
|
+
exports.Integration_MetaEntry.encode({ key: key, value }, writer.uint32(18).fork()).join();
|
|
703
|
+
});
|
|
704
|
+
if (message.messenger !== "") {
|
|
705
|
+
writer.uint32(26).string(message.messenger);
|
|
706
|
+
}
|
|
707
|
+
if (message.messengerId !== "") {
|
|
708
|
+
writer.uint32(34).string(message.messengerId);
|
|
709
|
+
}
|
|
710
|
+
if (message.userId !== 0) {
|
|
711
|
+
writer.uint32(40).int32(message.userId);
|
|
712
|
+
}
|
|
713
|
+
if (message.createdAt !== 0) {
|
|
714
|
+
writer.uint32(48).int32(message.createdAt);
|
|
715
|
+
}
|
|
716
|
+
if (message.updatedAt !== 0) {
|
|
717
|
+
writer.uint32(56).int32(message.updatedAt);
|
|
718
|
+
}
|
|
719
|
+
if (message.deletedAt !== 0) {
|
|
720
|
+
writer.uint32(64).int32(message.deletedAt);
|
|
721
|
+
}
|
|
722
|
+
return writer;
|
|
723
|
+
},
|
|
724
|
+
decode(input, length) {
|
|
725
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
726
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
727
|
+
const message = createBaseIntegration();
|
|
728
|
+
while (reader.pos < end) {
|
|
729
|
+
const tag = reader.uint32();
|
|
730
|
+
switch (tag >>> 3) {
|
|
731
|
+
case 1: {
|
|
732
|
+
if (tag !== 8) {
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
message.id = reader.int32();
|
|
736
|
+
continue;
|
|
737
|
+
}
|
|
738
|
+
case 2: {
|
|
739
|
+
if (tag !== 18) {
|
|
740
|
+
break;
|
|
741
|
+
}
|
|
742
|
+
const entry2 = exports.Integration_MetaEntry.decode(reader, reader.uint32());
|
|
743
|
+
if (entry2.value !== undefined) {
|
|
744
|
+
message.meta[entry2.key] = entry2.value;
|
|
745
|
+
}
|
|
746
|
+
continue;
|
|
747
|
+
}
|
|
748
|
+
case 3: {
|
|
749
|
+
if (tag !== 26) {
|
|
750
|
+
break;
|
|
751
|
+
}
|
|
752
|
+
message.messenger = reader.string();
|
|
753
|
+
continue;
|
|
754
|
+
}
|
|
755
|
+
case 4: {
|
|
756
|
+
if (tag !== 34) {
|
|
757
|
+
break;
|
|
758
|
+
}
|
|
759
|
+
message.messengerId = reader.string();
|
|
760
|
+
continue;
|
|
761
|
+
}
|
|
762
|
+
case 5: {
|
|
763
|
+
if (tag !== 40) {
|
|
764
|
+
break;
|
|
765
|
+
}
|
|
766
|
+
message.userId = reader.int32();
|
|
767
|
+
continue;
|
|
768
|
+
}
|
|
769
|
+
case 6: {
|
|
770
|
+
if (tag !== 48) {
|
|
771
|
+
break;
|
|
772
|
+
}
|
|
773
|
+
message.createdAt = reader.int32();
|
|
774
|
+
continue;
|
|
775
|
+
}
|
|
776
|
+
case 7: {
|
|
777
|
+
if (tag !== 56) {
|
|
778
|
+
break;
|
|
779
|
+
}
|
|
780
|
+
message.updatedAt = reader.int32();
|
|
781
|
+
continue;
|
|
782
|
+
}
|
|
783
|
+
case 8: {
|
|
784
|
+
if (tag !== 64) {
|
|
785
|
+
break;
|
|
786
|
+
}
|
|
787
|
+
message.deletedAt = reader.int32();
|
|
788
|
+
continue;
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
792
|
+
break;
|
|
793
|
+
}
|
|
794
|
+
reader.skip(tag & 7);
|
|
795
|
+
}
|
|
796
|
+
return message;
|
|
797
|
+
},
|
|
798
|
+
fromJSON(object) {
|
|
799
|
+
return {
|
|
800
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
801
|
+
meta: isObject(object.meta)
|
|
802
|
+
? globalThis.Object.entries(object.meta).reduce((acc, [key, value]) => {
|
|
803
|
+
acc[key] = globalThis.String(value);
|
|
804
|
+
return acc;
|
|
805
|
+
}, {})
|
|
806
|
+
: {},
|
|
807
|
+
messenger: isSet(object.messenger) ? globalThis.String(object.messenger) : "",
|
|
808
|
+
messengerId: isSet(object.messengerId)
|
|
809
|
+
? globalThis.String(object.messengerId)
|
|
810
|
+
: isSet(object.messenger_id)
|
|
811
|
+
? globalThis.String(object.messenger_id)
|
|
812
|
+
: "",
|
|
813
|
+
userId: isSet(object.userId)
|
|
814
|
+
? globalThis.Number(object.userId)
|
|
815
|
+
: isSet(object.user_id)
|
|
816
|
+
? globalThis.Number(object.user_id)
|
|
817
|
+
: 0,
|
|
818
|
+
createdAt: isSet(object.createdAt)
|
|
819
|
+
? globalThis.Number(object.createdAt)
|
|
820
|
+
: isSet(object.created_at)
|
|
821
|
+
? globalThis.Number(object.created_at)
|
|
822
|
+
: 0,
|
|
823
|
+
updatedAt: isSet(object.updatedAt)
|
|
824
|
+
? globalThis.Number(object.updatedAt)
|
|
825
|
+
: isSet(object.updated_at)
|
|
826
|
+
? globalThis.Number(object.updated_at)
|
|
827
|
+
: 0,
|
|
828
|
+
deletedAt: isSet(object.deletedAt)
|
|
829
|
+
? globalThis.Number(object.deletedAt)
|
|
830
|
+
: isSet(object.deleted_at)
|
|
831
|
+
? globalThis.Number(object.deleted_at)
|
|
832
|
+
: 0,
|
|
833
|
+
};
|
|
834
|
+
},
|
|
835
|
+
toJSON(message) {
|
|
836
|
+
const obj = {};
|
|
837
|
+
if (message.id !== 0) {
|
|
838
|
+
obj.id = Math.round(message.id);
|
|
839
|
+
}
|
|
840
|
+
if (message.meta) {
|
|
841
|
+
const entries = globalThis.Object.entries(message.meta);
|
|
842
|
+
if (entries.length > 0) {
|
|
843
|
+
obj.meta = {};
|
|
844
|
+
entries.forEach(([k, v]) => {
|
|
845
|
+
obj.meta[k] = v;
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
if (message.messenger !== "") {
|
|
850
|
+
obj.messenger = message.messenger;
|
|
851
|
+
}
|
|
852
|
+
if (message.messengerId !== "") {
|
|
853
|
+
obj.messengerId = message.messengerId;
|
|
854
|
+
}
|
|
855
|
+
if (message.userId !== 0) {
|
|
856
|
+
obj.userId = Math.round(message.userId);
|
|
857
|
+
}
|
|
858
|
+
if (message.createdAt !== 0) {
|
|
859
|
+
obj.createdAt = Math.round(message.createdAt);
|
|
860
|
+
}
|
|
861
|
+
if (message.updatedAt !== 0) {
|
|
862
|
+
obj.updatedAt = Math.round(message.updatedAt);
|
|
863
|
+
}
|
|
864
|
+
if (message.deletedAt !== 0) {
|
|
865
|
+
obj.deletedAt = Math.round(message.deletedAt);
|
|
866
|
+
}
|
|
867
|
+
return obj;
|
|
868
|
+
},
|
|
869
|
+
create(base) {
|
|
870
|
+
return exports.Integration.fromPartial(base ?? {});
|
|
871
|
+
},
|
|
872
|
+
fromPartial(object) {
|
|
873
|
+
const message = createBaseIntegration();
|
|
874
|
+
message.id = object.id ?? 0;
|
|
875
|
+
message.meta = globalThis.Object.entries(object.meta ?? {}).reduce((acc, [key, value]) => {
|
|
876
|
+
if (value !== undefined) {
|
|
877
|
+
acc[key] = globalThis.String(value);
|
|
878
|
+
}
|
|
879
|
+
return acc;
|
|
880
|
+
}, {});
|
|
881
|
+
message.messenger = object.messenger ?? "";
|
|
882
|
+
message.messengerId = object.messengerId ?? "";
|
|
883
|
+
message.userId = object.userId ?? 0;
|
|
884
|
+
message.createdAt = object.createdAt ?? 0;
|
|
885
|
+
message.updatedAt = object.updatedAt ?? 0;
|
|
886
|
+
message.deletedAt = object.deletedAt ?? 0;
|
|
887
|
+
return message;
|
|
888
|
+
},
|
|
889
|
+
};
|
|
890
|
+
function createBaseIntegration_MetaEntry() {
|
|
891
|
+
return { key: "", value: "" };
|
|
892
|
+
}
|
|
893
|
+
exports.Integration_MetaEntry = {
|
|
894
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
895
|
+
if (message.key !== "") {
|
|
896
|
+
writer.uint32(10).string(message.key);
|
|
897
|
+
}
|
|
898
|
+
if (message.value !== "") {
|
|
899
|
+
writer.uint32(18).string(message.value);
|
|
900
|
+
}
|
|
901
|
+
return writer;
|
|
902
|
+
},
|
|
903
|
+
decode(input, length) {
|
|
904
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
905
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
906
|
+
const message = createBaseIntegration_MetaEntry();
|
|
907
|
+
while (reader.pos < end) {
|
|
908
|
+
const tag = reader.uint32();
|
|
909
|
+
switch (tag >>> 3) {
|
|
910
|
+
case 1: {
|
|
911
|
+
if (tag !== 10) {
|
|
912
|
+
break;
|
|
913
|
+
}
|
|
914
|
+
message.key = reader.string();
|
|
915
|
+
continue;
|
|
916
|
+
}
|
|
917
|
+
case 2: {
|
|
918
|
+
if (tag !== 18) {
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
message.value = reader.string();
|
|
922
|
+
continue;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
926
|
+
break;
|
|
927
|
+
}
|
|
928
|
+
reader.skip(tag & 7);
|
|
929
|
+
}
|
|
930
|
+
return message;
|
|
931
|
+
},
|
|
932
|
+
fromJSON(object) {
|
|
933
|
+
return {
|
|
934
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
935
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
936
|
+
};
|
|
937
|
+
},
|
|
938
|
+
toJSON(message) {
|
|
939
|
+
const obj = {};
|
|
940
|
+
if (message.key !== "") {
|
|
941
|
+
obj.key = message.key;
|
|
942
|
+
}
|
|
943
|
+
if (message.value !== "") {
|
|
944
|
+
obj.value = message.value;
|
|
945
|
+
}
|
|
946
|
+
return obj;
|
|
947
|
+
},
|
|
948
|
+
create(base) {
|
|
949
|
+
return exports.Integration_MetaEntry.fromPartial(base ?? {});
|
|
950
|
+
},
|
|
951
|
+
fromPartial(object) {
|
|
952
|
+
const message = createBaseIntegration_MetaEntry();
|
|
953
|
+
message.key = object.key ?? "";
|
|
954
|
+
message.value = object.value ?? "";
|
|
955
|
+
return message;
|
|
956
|
+
},
|
|
957
|
+
};
|
|
958
|
+
function createBaseGetIntegrationsResponse() {
|
|
959
|
+
return { integrations: [] };
|
|
960
|
+
}
|
|
961
|
+
exports.GetIntegrationsResponse = {
|
|
962
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
963
|
+
for (const v of message.integrations) {
|
|
964
|
+
exports.Integration.encode(v, writer.uint32(10).fork()).join();
|
|
965
|
+
}
|
|
966
|
+
return writer;
|
|
967
|
+
},
|
|
968
|
+
decode(input, length) {
|
|
969
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
970
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
971
|
+
const message = createBaseGetIntegrationsResponse();
|
|
972
|
+
while (reader.pos < end) {
|
|
973
|
+
const tag = reader.uint32();
|
|
974
|
+
switch (tag >>> 3) {
|
|
975
|
+
case 1: {
|
|
976
|
+
if (tag !== 10) {
|
|
977
|
+
break;
|
|
978
|
+
}
|
|
979
|
+
message.integrations.push(exports.Integration.decode(reader, reader.uint32()));
|
|
980
|
+
continue;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
984
|
+
break;
|
|
985
|
+
}
|
|
986
|
+
reader.skip(tag & 7);
|
|
987
|
+
}
|
|
988
|
+
return message;
|
|
989
|
+
},
|
|
990
|
+
fromJSON(object) {
|
|
991
|
+
return {
|
|
992
|
+
integrations: globalThis.Array.isArray(object?.integrations)
|
|
993
|
+
? object.integrations.map((e) => exports.Integration.fromJSON(e))
|
|
994
|
+
: [],
|
|
995
|
+
};
|
|
996
|
+
},
|
|
997
|
+
toJSON(message) {
|
|
998
|
+
const obj = {};
|
|
999
|
+
if (message.integrations?.length) {
|
|
1000
|
+
obj.integrations = message.integrations.map((e) => exports.Integration.toJSON(e));
|
|
1001
|
+
}
|
|
1002
|
+
return obj;
|
|
1003
|
+
},
|
|
1004
|
+
create(base) {
|
|
1005
|
+
return exports.GetIntegrationsResponse.fromPartial(base ?? {});
|
|
1006
|
+
},
|
|
1007
|
+
fromPartial(object) {
|
|
1008
|
+
const message = createBaseGetIntegrationsResponse();
|
|
1009
|
+
message.integrations = object.integrations?.map((e) => exports.Integration.fromPartial(e)) || [];
|
|
1010
|
+
return message;
|
|
1011
|
+
},
|
|
1012
|
+
};
|
|
1013
|
+
function createBaseRemoveIntegrationRequest() {
|
|
1014
|
+
return { id: 0 };
|
|
1015
|
+
}
|
|
1016
|
+
exports.RemoveIntegrationRequest = {
|
|
1017
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1018
|
+
if (message.id !== 0) {
|
|
1019
|
+
writer.uint32(8).int32(message.id);
|
|
1020
|
+
}
|
|
1021
|
+
return writer;
|
|
1022
|
+
},
|
|
1023
|
+
decode(input, length) {
|
|
1024
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1025
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1026
|
+
const message = createBaseRemoveIntegrationRequest();
|
|
1027
|
+
while (reader.pos < end) {
|
|
1028
|
+
const tag = reader.uint32();
|
|
1029
|
+
switch (tag >>> 3) {
|
|
1030
|
+
case 1: {
|
|
1031
|
+
if (tag !== 8) {
|
|
1032
|
+
break;
|
|
1033
|
+
}
|
|
1034
|
+
message.id = reader.int32();
|
|
1035
|
+
continue;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1039
|
+
break;
|
|
1040
|
+
}
|
|
1041
|
+
reader.skip(tag & 7);
|
|
1042
|
+
}
|
|
1043
|
+
return message;
|
|
1044
|
+
},
|
|
1045
|
+
fromJSON(object) {
|
|
1046
|
+
return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
|
|
1047
|
+
},
|
|
1048
|
+
toJSON(message) {
|
|
1049
|
+
const obj = {};
|
|
1050
|
+
if (message.id !== 0) {
|
|
1051
|
+
obj.id = Math.round(message.id);
|
|
1052
|
+
}
|
|
1053
|
+
return obj;
|
|
1054
|
+
},
|
|
1055
|
+
create(base) {
|
|
1056
|
+
return exports.RemoveIntegrationRequest.fromPartial(base ?? {});
|
|
1057
|
+
},
|
|
1058
|
+
fromPartial(object) {
|
|
1059
|
+
const message = createBaseRemoveIntegrationRequest();
|
|
1060
|
+
message.id = object.id ?? 0;
|
|
1061
|
+
return message;
|
|
1062
|
+
},
|
|
1063
|
+
};
|
|
1064
|
+
exports.MessengerServiceService = {
|
|
1065
|
+
generateTelegramLink: {
|
|
1066
|
+
path: "/messenger.v1.MessengerService/GenerateTelegramLink",
|
|
1067
|
+
requestStream: false,
|
|
1068
|
+
responseStream: false,
|
|
1069
|
+
requestSerialize: (value) => Buffer.from(exports.GenerateTelegramLinkRequest.encode(value).finish()),
|
|
1070
|
+
requestDeserialize: (value) => exports.GenerateTelegramLinkRequest.decode(value),
|
|
1071
|
+
responseSerialize: (value) => Buffer.from(exports.GenerateTelegramLinkResponse.encode(value).finish()),
|
|
1072
|
+
responseDeserialize: (value) => exports.GenerateTelegramLinkResponse.decode(value),
|
|
1073
|
+
},
|
|
1074
|
+
linkTelegramAccount: {
|
|
1075
|
+
path: "/messenger.v1.MessengerService/LinkTelegramAccount",
|
|
1076
|
+
requestStream: false,
|
|
1077
|
+
responseStream: false,
|
|
1078
|
+
requestSerialize: (value) => Buffer.from(exports.LinkTelegramAccountRequest.encode(value).finish()),
|
|
1079
|
+
requestDeserialize: (value) => exports.LinkTelegramAccountRequest.decode(value),
|
|
1080
|
+
responseSerialize: (value) => Buffer.from(exports.LinkTelegramAccountResponse.encode(value).finish()),
|
|
1081
|
+
responseDeserialize: (value) => exports.LinkTelegramAccountResponse.decode(value),
|
|
1082
|
+
},
|
|
1083
|
+
getIntegrations: {
|
|
1084
|
+
path: "/messenger.v1.MessengerService/GetIntegrations",
|
|
1085
|
+
requestStream: false,
|
|
1086
|
+
responseStream: false,
|
|
1087
|
+
requestSerialize: (value) => Buffer.from(exports.GetIntegrationsRequest.encode(value).finish()),
|
|
1088
|
+
requestDeserialize: (value) => exports.GetIntegrationsRequest.decode(value),
|
|
1089
|
+
responseSerialize: (value) => Buffer.from(exports.GetIntegrationsResponse.encode(value).finish()),
|
|
1090
|
+
responseDeserialize: (value) => exports.GetIntegrationsResponse.decode(value),
|
|
1091
|
+
},
|
|
1092
|
+
removeIntegration: {
|
|
1093
|
+
path: "/messenger.v1.MessengerService/RemoveIntegration",
|
|
1094
|
+
requestStream: false,
|
|
1095
|
+
responseStream: false,
|
|
1096
|
+
requestSerialize: (value) => Buffer.from(exports.RemoveIntegrationRequest.encode(value).finish()),
|
|
1097
|
+
requestDeserialize: (value) => exports.RemoveIntegrationRequest.decode(value),
|
|
1098
|
+
responseSerialize: (value) => Buffer.from(empty_1.Empty.encode(value).finish()),
|
|
1099
|
+
responseDeserialize: (value) => empty_1.Empty.decode(value),
|
|
1100
|
+
},
|
|
1101
|
+
};
|
|
1102
|
+
exports.MessengerServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.MessengerServiceService, "messenger.v1.MessengerService");
|
|
1103
|
+
function longToNumber(int64) {
|
|
1104
|
+
const num = globalThis.Number(int64.toString());
|
|
1105
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1106
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1107
|
+
}
|
|
1108
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1109
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1110
|
+
}
|
|
1111
|
+
return num;
|
|
1112
|
+
}
|
|
1113
|
+
function isObject(value) {
|
|
1114
|
+
return typeof value === "object" && value !== null;
|
|
1115
|
+
}
|
|
127
1116
|
function isSet(value) {
|
|
128
1117
|
return value !== null && value !== undefined;
|
|
129
1118
|
}
|