@fatehan/tsrp 1.1.14 → 1.2.1
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/api.d.ts +9 -8
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +66 -78
- package/dist/api.old.d.ts +19 -0
- package/dist/api.old.d.ts.map +1 -0
- package/dist/api.old.js +52 -0
- package/dist/api.test.js +38 -21
- package/dist/fatehan/identities/authentication.d.ts +67 -0
- package/dist/fatehan/identities/authentication.d.ts.map +1 -0
- package/dist/fatehan/identities/authentication.js +616 -0
- package/dist/fatehan/identities/identities.d.ts +2 -0
- package/dist/fatehan/identities/identities.d.ts.map +1 -1
- package/dist/fatehan/identities/identities.js +18 -1
- package/dist/fatehan/packets/dataModel.d.ts +2 -0
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModel.js +23 -1
- package/dist/report.d.ts +19 -18
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +120 -202
- package/dist/report.old.d.ts +39 -0
- package/dist/report.old.d.ts.map +1 -0
- package/dist/report.old.js +148 -0
- package/dist/report.test.js +103 -362
- package/package.json +2 -2
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.5
|
|
5
|
+
// protoc v6.31.1
|
|
6
|
+
// source: identities/authentication.proto
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.TelegramAuth = exports.GoogleAuth = exports.OtpAuth = exports.QrCodeAuth = exports.PasswordAuth = exports.AuthRequest = exports.AuthResponse = exports.OtpCodeResponse = exports.OtpCodeRequest = exports.protobufPackage = void 0;
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
14
|
+
const long_1 = __importDefault(require("long"));
|
|
15
|
+
const identities_1 = require("./identities");
|
|
16
|
+
exports.protobufPackage = "com.fatehan.identities";
|
|
17
|
+
function createBaseOtpCodeRequest() {
|
|
18
|
+
return { phone: long_1.default.UZERO };
|
|
19
|
+
}
|
|
20
|
+
exports.OtpCodeRequest = {
|
|
21
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
22
|
+
if (!message.phone.equals(long_1.default.UZERO)) {
|
|
23
|
+
writer.uint32(8).uint64(message.phone.toString());
|
|
24
|
+
}
|
|
25
|
+
return writer;
|
|
26
|
+
},
|
|
27
|
+
decode(input, length) {
|
|
28
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
29
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
30
|
+
const message = createBaseOtpCodeRequest();
|
|
31
|
+
while (reader.pos < end) {
|
|
32
|
+
const tag = reader.uint32();
|
|
33
|
+
switch (tag >>> 3) {
|
|
34
|
+
case 1: {
|
|
35
|
+
if (tag !== 8) {
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
message.phone = long_1.default.fromString(reader.uint64().toString(), true);
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
reader.skip(tag & 7);
|
|
46
|
+
}
|
|
47
|
+
return message;
|
|
48
|
+
},
|
|
49
|
+
fromJSON(object) {
|
|
50
|
+
return { phone: isSet(object.phone) ? long_1.default.fromValue(object.phone) : long_1.default.UZERO };
|
|
51
|
+
},
|
|
52
|
+
toJSON(message) {
|
|
53
|
+
const obj = {};
|
|
54
|
+
if (!message.phone.equals(long_1.default.UZERO)) {
|
|
55
|
+
obj.phone = (message.phone || long_1.default.UZERO).toString();
|
|
56
|
+
}
|
|
57
|
+
return obj;
|
|
58
|
+
},
|
|
59
|
+
create(base) {
|
|
60
|
+
return exports.OtpCodeRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
61
|
+
},
|
|
62
|
+
fromPartial(object) {
|
|
63
|
+
const message = createBaseOtpCodeRequest();
|
|
64
|
+
message.phone = (object.phone !== undefined && object.phone !== null) ? long_1.default.fromValue(object.phone) : long_1.default.UZERO;
|
|
65
|
+
return message;
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
function createBaseOtpCodeResponse() {
|
|
69
|
+
return { message: "", passwordRequired: false };
|
|
70
|
+
}
|
|
71
|
+
exports.OtpCodeResponse = {
|
|
72
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
73
|
+
if (message.message !== "") {
|
|
74
|
+
writer.uint32(10).string(message.message);
|
|
75
|
+
}
|
|
76
|
+
if (message.passwordRequired !== false) {
|
|
77
|
+
writer.uint32(16).bool(message.passwordRequired);
|
|
78
|
+
}
|
|
79
|
+
return writer;
|
|
80
|
+
},
|
|
81
|
+
decode(input, length) {
|
|
82
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
83
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
84
|
+
const message = createBaseOtpCodeResponse();
|
|
85
|
+
while (reader.pos < end) {
|
|
86
|
+
const tag = reader.uint32();
|
|
87
|
+
switch (tag >>> 3) {
|
|
88
|
+
case 1: {
|
|
89
|
+
if (tag !== 10) {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
message.message = reader.string();
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
case 2: {
|
|
96
|
+
if (tag !== 16) {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
message.passwordRequired = reader.bool();
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
reader.skip(tag & 7);
|
|
107
|
+
}
|
|
108
|
+
return message;
|
|
109
|
+
},
|
|
110
|
+
fromJSON(object) {
|
|
111
|
+
return {
|
|
112
|
+
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
113
|
+
passwordRequired: isSet(object.password_required) ? globalThis.Boolean(object.password_required) : false,
|
|
114
|
+
};
|
|
115
|
+
},
|
|
116
|
+
toJSON(message) {
|
|
117
|
+
const obj = {};
|
|
118
|
+
if (message.message !== "") {
|
|
119
|
+
obj.message = message.message;
|
|
120
|
+
}
|
|
121
|
+
if (message.passwordRequired !== false) {
|
|
122
|
+
obj.password_required = message.passwordRequired;
|
|
123
|
+
}
|
|
124
|
+
return obj;
|
|
125
|
+
},
|
|
126
|
+
create(base) {
|
|
127
|
+
return exports.OtpCodeResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
128
|
+
},
|
|
129
|
+
fromPartial(object) {
|
|
130
|
+
var _a, _b;
|
|
131
|
+
const message = createBaseOtpCodeResponse();
|
|
132
|
+
message.message = (_a = object.message) !== null && _a !== void 0 ? _a : "";
|
|
133
|
+
message.passwordRequired = (_b = object.passwordRequired) !== null && _b !== void 0 ? _b : false;
|
|
134
|
+
return message;
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
function createBaseAuthResponse() {
|
|
138
|
+
return { user: undefined, token: "" };
|
|
139
|
+
}
|
|
140
|
+
exports.AuthResponse = {
|
|
141
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
142
|
+
if (message.user !== undefined) {
|
|
143
|
+
identities_1.User.encode(message.user, writer.uint32(10).fork()).join();
|
|
144
|
+
}
|
|
145
|
+
if (message.token !== "") {
|
|
146
|
+
writer.uint32(18).string(message.token);
|
|
147
|
+
}
|
|
148
|
+
return writer;
|
|
149
|
+
},
|
|
150
|
+
decode(input, length) {
|
|
151
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
152
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
153
|
+
const message = createBaseAuthResponse();
|
|
154
|
+
while (reader.pos < end) {
|
|
155
|
+
const tag = reader.uint32();
|
|
156
|
+
switch (tag >>> 3) {
|
|
157
|
+
case 1: {
|
|
158
|
+
if (tag !== 10) {
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
message.user = identities_1.User.decode(reader, reader.uint32());
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
case 2: {
|
|
165
|
+
if (tag !== 18) {
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
message.token = reader.string();
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
reader.skip(tag & 7);
|
|
176
|
+
}
|
|
177
|
+
return message;
|
|
178
|
+
},
|
|
179
|
+
fromJSON(object) {
|
|
180
|
+
return {
|
|
181
|
+
user: isSet(object.user) ? identities_1.User.fromJSON(object.user) : undefined,
|
|
182
|
+
token: isSet(object.token) ? globalThis.String(object.token) : "",
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
toJSON(message) {
|
|
186
|
+
const obj = {};
|
|
187
|
+
if (message.user !== undefined) {
|
|
188
|
+
obj.user = identities_1.User.toJSON(message.user);
|
|
189
|
+
}
|
|
190
|
+
if (message.token !== "") {
|
|
191
|
+
obj.token = message.token;
|
|
192
|
+
}
|
|
193
|
+
return obj;
|
|
194
|
+
},
|
|
195
|
+
create(base) {
|
|
196
|
+
return exports.AuthResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
197
|
+
},
|
|
198
|
+
fromPartial(object) {
|
|
199
|
+
var _a;
|
|
200
|
+
const message = createBaseAuthResponse();
|
|
201
|
+
message.user = (object.user !== undefined && object.user !== null) ? identities_1.User.fromPartial(object.user) : undefined;
|
|
202
|
+
message.token = (_a = object.token) !== null && _a !== void 0 ? _a : "";
|
|
203
|
+
return message;
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
function createBaseAuthRequest() {
|
|
207
|
+
return {
|
|
208
|
+
passwordAuth: undefined,
|
|
209
|
+
googleAuth: undefined,
|
|
210
|
+
qrCodeAuth: undefined,
|
|
211
|
+
telegramAuth: undefined,
|
|
212
|
+
otpAuth: undefined,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
exports.AuthRequest = {
|
|
216
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
217
|
+
if (message.passwordAuth !== undefined) {
|
|
218
|
+
exports.PasswordAuth.encode(message.passwordAuth, writer.uint32(90).fork()).join();
|
|
219
|
+
}
|
|
220
|
+
if (message.googleAuth !== undefined) {
|
|
221
|
+
exports.GoogleAuth.encode(message.googleAuth, writer.uint32(98).fork()).join();
|
|
222
|
+
}
|
|
223
|
+
if (message.qrCodeAuth !== undefined) {
|
|
224
|
+
exports.QrCodeAuth.encode(message.qrCodeAuth, writer.uint32(106).fork()).join();
|
|
225
|
+
}
|
|
226
|
+
if (message.telegramAuth !== undefined) {
|
|
227
|
+
exports.TelegramAuth.encode(message.telegramAuth, writer.uint32(114).fork()).join();
|
|
228
|
+
}
|
|
229
|
+
if (message.otpAuth !== undefined) {
|
|
230
|
+
exports.OtpAuth.encode(message.otpAuth, writer.uint32(122).fork()).join();
|
|
231
|
+
}
|
|
232
|
+
return writer;
|
|
233
|
+
},
|
|
234
|
+
decode(input, length) {
|
|
235
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
236
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
237
|
+
const message = createBaseAuthRequest();
|
|
238
|
+
while (reader.pos < end) {
|
|
239
|
+
const tag = reader.uint32();
|
|
240
|
+
switch (tag >>> 3) {
|
|
241
|
+
case 11: {
|
|
242
|
+
if (tag !== 90) {
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
message.passwordAuth = exports.PasswordAuth.decode(reader, reader.uint32());
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
case 12: {
|
|
249
|
+
if (tag !== 98) {
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
message.googleAuth = exports.GoogleAuth.decode(reader, reader.uint32());
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
case 13: {
|
|
256
|
+
if (tag !== 106) {
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
message.qrCodeAuth = exports.QrCodeAuth.decode(reader, reader.uint32());
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
case 14: {
|
|
263
|
+
if (tag !== 114) {
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
message.telegramAuth = exports.TelegramAuth.decode(reader, reader.uint32());
|
|
267
|
+
continue;
|
|
268
|
+
}
|
|
269
|
+
case 15: {
|
|
270
|
+
if (tag !== 122) {
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
message.otpAuth = exports.OtpAuth.decode(reader, reader.uint32());
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
reader.skip(tag & 7);
|
|
281
|
+
}
|
|
282
|
+
return message;
|
|
283
|
+
},
|
|
284
|
+
fromJSON(object) {
|
|
285
|
+
return {
|
|
286
|
+
passwordAuth: isSet(object.password_auth) ? exports.PasswordAuth.fromJSON(object.password_auth) : undefined,
|
|
287
|
+
googleAuth: isSet(object.google_auth) ? exports.GoogleAuth.fromJSON(object.google_auth) : undefined,
|
|
288
|
+
qrCodeAuth: isSet(object.qr_code_auth) ? exports.QrCodeAuth.fromJSON(object.qr_code_auth) : undefined,
|
|
289
|
+
telegramAuth: isSet(object.telegram_auth) ? exports.TelegramAuth.fromJSON(object.telegram_auth) : undefined,
|
|
290
|
+
otpAuth: isSet(object.otp_auth) ? exports.OtpAuth.fromJSON(object.otp_auth) : undefined,
|
|
291
|
+
};
|
|
292
|
+
},
|
|
293
|
+
toJSON(message) {
|
|
294
|
+
const obj = {};
|
|
295
|
+
if (message.passwordAuth !== undefined) {
|
|
296
|
+
obj.password_auth = exports.PasswordAuth.toJSON(message.passwordAuth);
|
|
297
|
+
}
|
|
298
|
+
if (message.googleAuth !== undefined) {
|
|
299
|
+
obj.google_auth = exports.GoogleAuth.toJSON(message.googleAuth);
|
|
300
|
+
}
|
|
301
|
+
if (message.qrCodeAuth !== undefined) {
|
|
302
|
+
obj.qr_code_auth = exports.QrCodeAuth.toJSON(message.qrCodeAuth);
|
|
303
|
+
}
|
|
304
|
+
if (message.telegramAuth !== undefined) {
|
|
305
|
+
obj.telegram_auth = exports.TelegramAuth.toJSON(message.telegramAuth);
|
|
306
|
+
}
|
|
307
|
+
if (message.otpAuth !== undefined) {
|
|
308
|
+
obj.otp_auth = exports.OtpAuth.toJSON(message.otpAuth);
|
|
309
|
+
}
|
|
310
|
+
return obj;
|
|
311
|
+
},
|
|
312
|
+
create(base) {
|
|
313
|
+
return exports.AuthRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
314
|
+
},
|
|
315
|
+
fromPartial(object) {
|
|
316
|
+
const message = createBaseAuthRequest();
|
|
317
|
+
message.passwordAuth = (object.passwordAuth !== undefined && object.passwordAuth !== null)
|
|
318
|
+
? exports.PasswordAuth.fromPartial(object.passwordAuth)
|
|
319
|
+
: undefined;
|
|
320
|
+
message.googleAuth = (object.googleAuth !== undefined && object.googleAuth !== null)
|
|
321
|
+
? exports.GoogleAuth.fromPartial(object.googleAuth)
|
|
322
|
+
: undefined;
|
|
323
|
+
message.qrCodeAuth = (object.qrCodeAuth !== undefined && object.qrCodeAuth !== null)
|
|
324
|
+
? exports.QrCodeAuth.fromPartial(object.qrCodeAuth)
|
|
325
|
+
: undefined;
|
|
326
|
+
message.telegramAuth = (object.telegramAuth !== undefined && object.telegramAuth !== null)
|
|
327
|
+
? exports.TelegramAuth.fromPartial(object.telegramAuth)
|
|
328
|
+
: undefined;
|
|
329
|
+
message.otpAuth = (object.otpAuth !== undefined && object.otpAuth !== null)
|
|
330
|
+
? exports.OtpAuth.fromPartial(object.otpAuth)
|
|
331
|
+
: undefined;
|
|
332
|
+
return message;
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
function createBasePasswordAuth() {
|
|
336
|
+
return { phone: long_1.default.UZERO, password: "" };
|
|
337
|
+
}
|
|
338
|
+
exports.PasswordAuth = {
|
|
339
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
340
|
+
if (!message.phone.equals(long_1.default.UZERO)) {
|
|
341
|
+
writer.uint32(8).uint64(message.phone.toString());
|
|
342
|
+
}
|
|
343
|
+
if (message.password !== "") {
|
|
344
|
+
writer.uint32(18).string(message.password);
|
|
345
|
+
}
|
|
346
|
+
return writer;
|
|
347
|
+
},
|
|
348
|
+
decode(input, length) {
|
|
349
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
350
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
351
|
+
const message = createBasePasswordAuth();
|
|
352
|
+
while (reader.pos < end) {
|
|
353
|
+
const tag = reader.uint32();
|
|
354
|
+
switch (tag >>> 3) {
|
|
355
|
+
case 1: {
|
|
356
|
+
if (tag !== 8) {
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
message.phone = long_1.default.fromString(reader.uint64().toString(), true);
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
case 2: {
|
|
363
|
+
if (tag !== 18) {
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
366
|
+
message.password = reader.string();
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
reader.skip(tag & 7);
|
|
374
|
+
}
|
|
375
|
+
return message;
|
|
376
|
+
},
|
|
377
|
+
fromJSON(object) {
|
|
378
|
+
return {
|
|
379
|
+
phone: isSet(object.phone) ? long_1.default.fromValue(object.phone) : long_1.default.UZERO,
|
|
380
|
+
password: isSet(object.password) ? globalThis.String(object.password) : "",
|
|
381
|
+
};
|
|
382
|
+
},
|
|
383
|
+
toJSON(message) {
|
|
384
|
+
const obj = {};
|
|
385
|
+
if (!message.phone.equals(long_1.default.UZERO)) {
|
|
386
|
+
obj.phone = (message.phone || long_1.default.UZERO).toString();
|
|
387
|
+
}
|
|
388
|
+
if (message.password !== "") {
|
|
389
|
+
obj.password = message.password;
|
|
390
|
+
}
|
|
391
|
+
return obj;
|
|
392
|
+
},
|
|
393
|
+
create(base) {
|
|
394
|
+
return exports.PasswordAuth.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
395
|
+
},
|
|
396
|
+
fromPartial(object) {
|
|
397
|
+
var _a;
|
|
398
|
+
const message = createBasePasswordAuth();
|
|
399
|
+
message.phone = (object.phone !== undefined && object.phone !== null) ? long_1.default.fromValue(object.phone) : long_1.default.UZERO;
|
|
400
|
+
message.password = (_a = object.password) !== null && _a !== void 0 ? _a : "";
|
|
401
|
+
return message;
|
|
402
|
+
},
|
|
403
|
+
};
|
|
404
|
+
function createBaseQrCodeAuth() {
|
|
405
|
+
return { token: "" };
|
|
406
|
+
}
|
|
407
|
+
exports.QrCodeAuth = {
|
|
408
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
409
|
+
if (message.token !== "") {
|
|
410
|
+
writer.uint32(10).string(message.token);
|
|
411
|
+
}
|
|
412
|
+
return writer;
|
|
413
|
+
},
|
|
414
|
+
decode(input, length) {
|
|
415
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
416
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
417
|
+
const message = createBaseQrCodeAuth();
|
|
418
|
+
while (reader.pos < end) {
|
|
419
|
+
const tag = reader.uint32();
|
|
420
|
+
switch (tag >>> 3) {
|
|
421
|
+
case 1: {
|
|
422
|
+
if (tag !== 10) {
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
message.token = reader.string();
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
reader.skip(tag & 7);
|
|
433
|
+
}
|
|
434
|
+
return message;
|
|
435
|
+
},
|
|
436
|
+
fromJSON(object) {
|
|
437
|
+
return { token: isSet(object.token) ? globalThis.String(object.token) : "" };
|
|
438
|
+
},
|
|
439
|
+
toJSON(message) {
|
|
440
|
+
const obj = {};
|
|
441
|
+
if (message.token !== "") {
|
|
442
|
+
obj.token = message.token;
|
|
443
|
+
}
|
|
444
|
+
return obj;
|
|
445
|
+
},
|
|
446
|
+
create(base) {
|
|
447
|
+
return exports.QrCodeAuth.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
448
|
+
},
|
|
449
|
+
fromPartial(object) {
|
|
450
|
+
var _a;
|
|
451
|
+
const message = createBaseQrCodeAuth();
|
|
452
|
+
message.token = (_a = object.token) !== null && _a !== void 0 ? _a : "";
|
|
453
|
+
return message;
|
|
454
|
+
},
|
|
455
|
+
};
|
|
456
|
+
function createBaseOtpAuth() {
|
|
457
|
+
return { phone: long_1.default.UZERO, code: 0, password: undefined };
|
|
458
|
+
}
|
|
459
|
+
exports.OtpAuth = {
|
|
460
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
461
|
+
if (!message.phone.equals(long_1.default.UZERO)) {
|
|
462
|
+
writer.uint32(8).uint64(message.phone.toString());
|
|
463
|
+
}
|
|
464
|
+
if (message.code !== 0) {
|
|
465
|
+
writer.uint32(16).uint32(message.code);
|
|
466
|
+
}
|
|
467
|
+
if (message.password !== undefined) {
|
|
468
|
+
writer.uint32(26).string(message.password);
|
|
469
|
+
}
|
|
470
|
+
return writer;
|
|
471
|
+
},
|
|
472
|
+
decode(input, length) {
|
|
473
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
474
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
475
|
+
const message = createBaseOtpAuth();
|
|
476
|
+
while (reader.pos < end) {
|
|
477
|
+
const tag = reader.uint32();
|
|
478
|
+
switch (tag >>> 3) {
|
|
479
|
+
case 1: {
|
|
480
|
+
if (tag !== 8) {
|
|
481
|
+
break;
|
|
482
|
+
}
|
|
483
|
+
message.phone = long_1.default.fromString(reader.uint64().toString(), true);
|
|
484
|
+
continue;
|
|
485
|
+
}
|
|
486
|
+
case 2: {
|
|
487
|
+
if (tag !== 16) {
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
490
|
+
message.code = reader.uint32();
|
|
491
|
+
continue;
|
|
492
|
+
}
|
|
493
|
+
case 3: {
|
|
494
|
+
if (tag !== 26) {
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
message.password = reader.string();
|
|
498
|
+
continue;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
reader.skip(tag & 7);
|
|
505
|
+
}
|
|
506
|
+
return message;
|
|
507
|
+
},
|
|
508
|
+
fromJSON(object) {
|
|
509
|
+
return {
|
|
510
|
+
phone: isSet(object.phone) ? long_1.default.fromValue(object.phone) : long_1.default.UZERO,
|
|
511
|
+
code: isSet(object.code) ? globalThis.Number(object.code) : 0,
|
|
512
|
+
password: isSet(object.password) ? globalThis.String(object.password) : undefined,
|
|
513
|
+
};
|
|
514
|
+
},
|
|
515
|
+
toJSON(message) {
|
|
516
|
+
const obj = {};
|
|
517
|
+
if (!message.phone.equals(long_1.default.UZERO)) {
|
|
518
|
+
obj.phone = (message.phone || long_1.default.UZERO).toString();
|
|
519
|
+
}
|
|
520
|
+
if (message.code !== 0) {
|
|
521
|
+
obj.code = Math.round(message.code);
|
|
522
|
+
}
|
|
523
|
+
if (message.password !== undefined) {
|
|
524
|
+
obj.password = message.password;
|
|
525
|
+
}
|
|
526
|
+
return obj;
|
|
527
|
+
},
|
|
528
|
+
create(base) {
|
|
529
|
+
return exports.OtpAuth.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
530
|
+
},
|
|
531
|
+
fromPartial(object) {
|
|
532
|
+
var _a, _b;
|
|
533
|
+
const message = createBaseOtpAuth();
|
|
534
|
+
message.phone = (object.phone !== undefined && object.phone !== null) ? long_1.default.fromValue(object.phone) : long_1.default.UZERO;
|
|
535
|
+
message.code = (_a = object.code) !== null && _a !== void 0 ? _a : 0;
|
|
536
|
+
message.password = (_b = object.password) !== null && _b !== void 0 ? _b : undefined;
|
|
537
|
+
return message;
|
|
538
|
+
},
|
|
539
|
+
};
|
|
540
|
+
function createBaseGoogleAuth() {
|
|
541
|
+
return {};
|
|
542
|
+
}
|
|
543
|
+
exports.GoogleAuth = {
|
|
544
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
545
|
+
return writer;
|
|
546
|
+
},
|
|
547
|
+
decode(input, length) {
|
|
548
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
549
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
550
|
+
const message = createBaseGoogleAuth();
|
|
551
|
+
while (reader.pos < end) {
|
|
552
|
+
const tag = reader.uint32();
|
|
553
|
+
switch (tag >>> 3) {
|
|
554
|
+
}
|
|
555
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
556
|
+
break;
|
|
557
|
+
}
|
|
558
|
+
reader.skip(tag & 7);
|
|
559
|
+
}
|
|
560
|
+
return message;
|
|
561
|
+
},
|
|
562
|
+
fromJSON(_) {
|
|
563
|
+
return {};
|
|
564
|
+
},
|
|
565
|
+
toJSON(_) {
|
|
566
|
+
const obj = {};
|
|
567
|
+
return obj;
|
|
568
|
+
},
|
|
569
|
+
create(base) {
|
|
570
|
+
return exports.GoogleAuth.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
571
|
+
},
|
|
572
|
+
fromPartial(_) {
|
|
573
|
+
const message = createBaseGoogleAuth();
|
|
574
|
+
return message;
|
|
575
|
+
},
|
|
576
|
+
};
|
|
577
|
+
function createBaseTelegramAuth() {
|
|
578
|
+
return {};
|
|
579
|
+
}
|
|
580
|
+
exports.TelegramAuth = {
|
|
581
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
582
|
+
return writer;
|
|
583
|
+
},
|
|
584
|
+
decode(input, length) {
|
|
585
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
586
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
587
|
+
const message = createBaseTelegramAuth();
|
|
588
|
+
while (reader.pos < end) {
|
|
589
|
+
const tag = reader.uint32();
|
|
590
|
+
switch (tag >>> 3) {
|
|
591
|
+
}
|
|
592
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
reader.skip(tag & 7);
|
|
596
|
+
}
|
|
597
|
+
return message;
|
|
598
|
+
},
|
|
599
|
+
fromJSON(_) {
|
|
600
|
+
return {};
|
|
601
|
+
},
|
|
602
|
+
toJSON(_) {
|
|
603
|
+
const obj = {};
|
|
604
|
+
return obj;
|
|
605
|
+
},
|
|
606
|
+
create(base) {
|
|
607
|
+
return exports.TelegramAuth.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
608
|
+
},
|
|
609
|
+
fromPartial(_) {
|
|
610
|
+
const message = createBaseTelegramAuth();
|
|
611
|
+
return message;
|
|
612
|
+
},
|
|
613
|
+
};
|
|
614
|
+
function isSet(value) {
|
|
615
|
+
return value !== null && value !== undefined;
|
|
616
|
+
}
|
|
@@ -700,6 +700,8 @@ export interface User {
|
|
|
700
700
|
isComplete: boolean;
|
|
701
701
|
/** Deprecated: DO NOT USE RANDOM PARAMETER INSIDE A MODEL */
|
|
702
702
|
token?: string | undefined;
|
|
703
|
+
/** Deprecated: Use UserRepo instead, currently using only in flutter auth sign */
|
|
704
|
+
persons: Person[];
|
|
703
705
|
}
|
|
704
706
|
export interface Person {
|
|
705
707
|
id: Long;
|