@aceplus/smartace-api 2.3.1 → 2.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.
@@ -0,0 +1,112 @@
1
+ // package: Auth
2
+ // file: auth.account_two_factor.proto
3
+
4
+ import * as jspb from "google-protobuf";
5
+ import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb";
6
+ import * as google_api_annotations_pb from "./google/api/annotations_pb";
7
+ import * as auth_authn_pb from "./auth.authn_pb";
8
+
9
+ export class TwoFactorProto extends jspb.Message {
10
+ getId(): number;
11
+ setId(value: number): void;
12
+
13
+ getAccountId(): number;
14
+ setAccountId(value: number): void;
15
+
16
+ serializeBinary(): Uint8Array;
17
+ toObject(includeInstance?: boolean): TwoFactorProto.AsObject;
18
+ static toObject(includeInstance: boolean, msg: TwoFactorProto): TwoFactorProto.AsObject;
19
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
20
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
21
+ static serializeBinaryToWriter(message: TwoFactorProto, writer: jspb.BinaryWriter): void;
22
+ static deserializeBinary(bytes: Uint8Array): TwoFactorProto;
23
+ static deserializeBinaryFromReader(message: TwoFactorProto, reader: jspb.BinaryReader): TwoFactorProto;
24
+ }
25
+
26
+ export namespace TwoFactorProto {
27
+ export type AsObject = {
28
+ id: number,
29
+ accountId: number,
30
+ }
31
+
32
+ export class CreateRequest extends jspb.Message {
33
+ getAccountId(): number;
34
+ setAccountId(value: number): void;
35
+
36
+ serializeBinary(): Uint8Array;
37
+ toObject(includeInstance?: boolean): CreateRequest.AsObject;
38
+ static toObject(includeInstance: boolean, msg: CreateRequest): CreateRequest.AsObject;
39
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
40
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
41
+ static serializeBinaryToWriter(message: CreateRequest, writer: jspb.BinaryWriter): void;
42
+ static deserializeBinary(bytes: Uint8Array): CreateRequest;
43
+ static deserializeBinaryFromReader(message: CreateRequest, reader: jspb.BinaryReader): CreateRequest;
44
+ }
45
+
46
+ export namespace CreateRequest {
47
+ export type AsObject = {
48
+ accountId: number,
49
+ }
50
+ }
51
+
52
+ export class CreateReply extends jspb.Message {
53
+ getQrData(): string;
54
+ setQrData(value: string): void;
55
+
56
+ serializeBinary(): Uint8Array;
57
+ toObject(includeInstance?: boolean): CreateReply.AsObject;
58
+ static toObject(includeInstance: boolean, msg: CreateReply): CreateReply.AsObject;
59
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
60
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
61
+ static serializeBinaryToWriter(message: CreateReply, writer: jspb.BinaryWriter): void;
62
+ static deserializeBinary(bytes: Uint8Array): CreateReply;
63
+ static deserializeBinaryFromReader(message: CreateReply, reader: jspb.BinaryReader): CreateReply;
64
+ }
65
+
66
+ export namespace CreateReply {
67
+ export type AsObject = {
68
+ qrData: string,
69
+ }
70
+ }
71
+
72
+ export class RemoveRequest extends jspb.Message {
73
+ getId(): number;
74
+ setId(value: number): void;
75
+
76
+ serializeBinary(): Uint8Array;
77
+ toObject(includeInstance?: boolean): RemoveRequest.AsObject;
78
+ static toObject(includeInstance: boolean, msg: RemoveRequest): RemoveRequest.AsObject;
79
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
80
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
81
+ static serializeBinaryToWriter(message: RemoveRequest, writer: jspb.BinaryWriter): void;
82
+ static deserializeBinary(bytes: Uint8Array): RemoveRequest;
83
+ static deserializeBinaryFromReader(message: RemoveRequest, reader: jspb.BinaryReader): RemoveRequest;
84
+ }
85
+
86
+ export namespace RemoveRequest {
87
+ export type AsObject = {
88
+ id: number,
89
+ }
90
+ }
91
+
92
+ export class ValidateRequest extends jspb.Message {
93
+ getValidationkey(): string;
94
+ setValidationkey(value: string): void;
95
+
96
+ serializeBinary(): Uint8Array;
97
+ toObject(includeInstance?: boolean): ValidateRequest.AsObject;
98
+ static toObject(includeInstance: boolean, msg: ValidateRequest): ValidateRequest.AsObject;
99
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
100
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
101
+ static serializeBinaryToWriter(message: ValidateRequest, writer: jspb.BinaryWriter): void;
102
+ static deserializeBinary(bytes: Uint8Array): ValidateRequest;
103
+ static deserializeBinaryFromReader(message: ValidateRequest, reader: jspb.BinaryReader): ValidateRequest;
104
+ }
105
+
106
+ export namespace ValidateRequest {
107
+ export type AsObject = {
108
+ validationkey: string,
109
+ }
110
+ }
111
+ }
112
+
@@ -0,0 +1,820 @@
1
+ // source: auth.account_two_factor.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
23
+
24
+ var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
25
+ goog.object.extend(proto, google_protobuf_duration_pb);
26
+ var google_api_annotations_pb = require('./google/api/annotations_pb.js');
27
+ goog.object.extend(proto, google_api_annotations_pb);
28
+ var auth_authn_pb = require('./auth.authn_pb.js');
29
+ goog.object.extend(proto, auth_authn_pb);
30
+ goog.exportSymbol('proto.Auth.TwoFactorProto', null, global);
31
+ goog.exportSymbol('proto.Auth.TwoFactorProto.CreateReply', null, global);
32
+ goog.exportSymbol('proto.Auth.TwoFactorProto.CreateRequest', null, global);
33
+ goog.exportSymbol('proto.Auth.TwoFactorProto.RemoveRequest', null, global);
34
+ goog.exportSymbol('proto.Auth.TwoFactorProto.ValidateRequest', null, global);
35
+ /**
36
+ * Generated by JsPbCodeGenerator.
37
+ * @param {Array=} opt_data Optional initial data array, typically from a
38
+ * server response, or constructed directly in Javascript. The array is used
39
+ * in place and becomes part of the constructed object. It is not cloned.
40
+ * If no data is provided, the constructed object will be empty, but still
41
+ * valid.
42
+ * @extends {jspb.Message}
43
+ * @constructor
44
+ */
45
+ proto.Auth.TwoFactorProto = function(opt_data) {
46
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
47
+ };
48
+ goog.inherits(proto.Auth.TwoFactorProto, jspb.Message);
49
+ if (goog.DEBUG && !COMPILED) {
50
+ /**
51
+ * @public
52
+ * @override
53
+ */
54
+ proto.Auth.TwoFactorProto.displayName = 'proto.Auth.TwoFactorProto';
55
+ }
56
+ /**
57
+ * Generated by JsPbCodeGenerator.
58
+ * @param {Array=} opt_data Optional initial data array, typically from a
59
+ * server response, or constructed directly in Javascript. The array is used
60
+ * in place and becomes part of the constructed object. It is not cloned.
61
+ * If no data is provided, the constructed object will be empty, but still
62
+ * valid.
63
+ * @extends {jspb.Message}
64
+ * @constructor
65
+ */
66
+ proto.Auth.TwoFactorProto.CreateRequest = function(opt_data) {
67
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
68
+ };
69
+ goog.inherits(proto.Auth.TwoFactorProto.CreateRequest, jspb.Message);
70
+ if (goog.DEBUG && !COMPILED) {
71
+ /**
72
+ * @public
73
+ * @override
74
+ */
75
+ proto.Auth.TwoFactorProto.CreateRequest.displayName = 'proto.Auth.TwoFactorProto.CreateRequest';
76
+ }
77
+ /**
78
+ * Generated by JsPbCodeGenerator.
79
+ * @param {Array=} opt_data Optional initial data array, typically from a
80
+ * server response, or constructed directly in Javascript. The array is used
81
+ * in place and becomes part of the constructed object. It is not cloned.
82
+ * If no data is provided, the constructed object will be empty, but still
83
+ * valid.
84
+ * @extends {jspb.Message}
85
+ * @constructor
86
+ */
87
+ proto.Auth.TwoFactorProto.CreateReply = function(opt_data) {
88
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
89
+ };
90
+ goog.inherits(proto.Auth.TwoFactorProto.CreateReply, jspb.Message);
91
+ if (goog.DEBUG && !COMPILED) {
92
+ /**
93
+ * @public
94
+ * @override
95
+ */
96
+ proto.Auth.TwoFactorProto.CreateReply.displayName = 'proto.Auth.TwoFactorProto.CreateReply';
97
+ }
98
+ /**
99
+ * Generated by JsPbCodeGenerator.
100
+ * @param {Array=} opt_data Optional initial data array, typically from a
101
+ * server response, or constructed directly in Javascript. The array is used
102
+ * in place and becomes part of the constructed object. It is not cloned.
103
+ * If no data is provided, the constructed object will be empty, but still
104
+ * valid.
105
+ * @extends {jspb.Message}
106
+ * @constructor
107
+ */
108
+ proto.Auth.TwoFactorProto.RemoveRequest = function(opt_data) {
109
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
110
+ };
111
+ goog.inherits(proto.Auth.TwoFactorProto.RemoveRequest, jspb.Message);
112
+ if (goog.DEBUG && !COMPILED) {
113
+ /**
114
+ * @public
115
+ * @override
116
+ */
117
+ proto.Auth.TwoFactorProto.RemoveRequest.displayName = 'proto.Auth.TwoFactorProto.RemoveRequest';
118
+ }
119
+ /**
120
+ * Generated by JsPbCodeGenerator.
121
+ * @param {Array=} opt_data Optional initial data array, typically from a
122
+ * server response, or constructed directly in Javascript. The array is used
123
+ * in place and becomes part of the constructed object. It is not cloned.
124
+ * If no data is provided, the constructed object will be empty, but still
125
+ * valid.
126
+ * @extends {jspb.Message}
127
+ * @constructor
128
+ */
129
+ proto.Auth.TwoFactorProto.ValidateRequest = function(opt_data) {
130
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
131
+ };
132
+ goog.inherits(proto.Auth.TwoFactorProto.ValidateRequest, jspb.Message);
133
+ if (goog.DEBUG && !COMPILED) {
134
+ /**
135
+ * @public
136
+ * @override
137
+ */
138
+ proto.Auth.TwoFactorProto.ValidateRequest.displayName = 'proto.Auth.TwoFactorProto.ValidateRequest';
139
+ }
140
+
141
+
142
+
143
+ if (jspb.Message.GENERATE_TO_OBJECT) {
144
+ /**
145
+ * Creates an object representation of this proto.
146
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
147
+ * Optional fields that are not set will be set to undefined.
148
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
149
+ * For the list of reserved names please see:
150
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
151
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
152
+ * JSPB instance for transitional soy proto support:
153
+ * http://goto/soy-param-migration
154
+ * @return {!Object}
155
+ */
156
+ proto.Auth.TwoFactorProto.prototype.toObject = function(opt_includeInstance) {
157
+ return proto.Auth.TwoFactorProto.toObject(opt_includeInstance, this);
158
+ };
159
+
160
+
161
+ /**
162
+ * Static version of the {@see toObject} method.
163
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
164
+ * the JSPB instance for transitional soy proto support:
165
+ * http://goto/soy-param-migration
166
+ * @param {!proto.Auth.TwoFactorProto} msg The msg instance to transform.
167
+ * @return {!Object}
168
+ * @suppress {unusedLocalVariables} f is only used for nested messages
169
+ */
170
+ proto.Auth.TwoFactorProto.toObject = function(includeInstance, msg) {
171
+ var f, obj = {
172
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
173
+ accountId: jspb.Message.getFieldWithDefault(msg, 2, 0)
174
+ };
175
+
176
+ if (includeInstance) {
177
+ obj.$jspbMessageInstance = msg;
178
+ }
179
+ return obj;
180
+ };
181
+ }
182
+
183
+
184
+ /**
185
+ * Deserializes binary data (in protobuf wire format).
186
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
187
+ * @return {!proto.Auth.TwoFactorProto}
188
+ */
189
+ proto.Auth.TwoFactorProto.deserializeBinary = function(bytes) {
190
+ var reader = new jspb.BinaryReader(bytes);
191
+ var msg = new proto.Auth.TwoFactorProto;
192
+ return proto.Auth.TwoFactorProto.deserializeBinaryFromReader(msg, reader);
193
+ };
194
+
195
+
196
+ /**
197
+ * Deserializes binary data (in protobuf wire format) from the
198
+ * given reader into the given message object.
199
+ * @param {!proto.Auth.TwoFactorProto} msg The message object to deserialize into.
200
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
201
+ * @return {!proto.Auth.TwoFactorProto}
202
+ */
203
+ proto.Auth.TwoFactorProto.deserializeBinaryFromReader = function(msg, reader) {
204
+ while (reader.nextField()) {
205
+ if (reader.isEndGroup()) {
206
+ break;
207
+ }
208
+ var field = reader.getFieldNumber();
209
+ switch (field) {
210
+ case 1:
211
+ var value = /** @type {number} */ (reader.readInt64());
212
+ msg.setId(value);
213
+ break;
214
+ case 2:
215
+ var value = /** @type {number} */ (reader.readInt64());
216
+ msg.setAccountId(value);
217
+ break;
218
+ default:
219
+ reader.skipField();
220
+ break;
221
+ }
222
+ }
223
+ return msg;
224
+ };
225
+
226
+
227
+ /**
228
+ * Serializes the message to binary data (in protobuf wire format).
229
+ * @return {!Uint8Array}
230
+ */
231
+ proto.Auth.TwoFactorProto.prototype.serializeBinary = function() {
232
+ var writer = new jspb.BinaryWriter();
233
+ proto.Auth.TwoFactorProto.serializeBinaryToWriter(this, writer);
234
+ return writer.getResultBuffer();
235
+ };
236
+
237
+
238
+ /**
239
+ * Serializes the given message to binary data (in protobuf wire
240
+ * format), writing to the given BinaryWriter.
241
+ * @param {!proto.Auth.TwoFactorProto} message
242
+ * @param {!jspb.BinaryWriter} writer
243
+ * @suppress {unusedLocalVariables} f is only used for nested messages
244
+ */
245
+ proto.Auth.TwoFactorProto.serializeBinaryToWriter = function(message, writer) {
246
+ var f = undefined;
247
+ f = message.getId();
248
+ if (f !== 0) {
249
+ writer.writeInt64(
250
+ 1,
251
+ f
252
+ );
253
+ }
254
+ f = message.getAccountId();
255
+ if (f !== 0) {
256
+ writer.writeInt64(
257
+ 2,
258
+ f
259
+ );
260
+ }
261
+ };
262
+
263
+
264
+
265
+
266
+
267
+ if (jspb.Message.GENERATE_TO_OBJECT) {
268
+ /**
269
+ * Creates an object representation of this proto.
270
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
271
+ * Optional fields that are not set will be set to undefined.
272
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
273
+ * For the list of reserved names please see:
274
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
275
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
276
+ * JSPB instance for transitional soy proto support:
277
+ * http://goto/soy-param-migration
278
+ * @return {!Object}
279
+ */
280
+ proto.Auth.TwoFactorProto.CreateRequest.prototype.toObject = function(opt_includeInstance) {
281
+ return proto.Auth.TwoFactorProto.CreateRequest.toObject(opt_includeInstance, this);
282
+ };
283
+
284
+
285
+ /**
286
+ * Static version of the {@see toObject} method.
287
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
288
+ * the JSPB instance for transitional soy proto support:
289
+ * http://goto/soy-param-migration
290
+ * @param {!proto.Auth.TwoFactorProto.CreateRequest} msg The msg instance to transform.
291
+ * @return {!Object}
292
+ * @suppress {unusedLocalVariables} f is only used for nested messages
293
+ */
294
+ proto.Auth.TwoFactorProto.CreateRequest.toObject = function(includeInstance, msg) {
295
+ var f, obj = {
296
+ accountId: jspb.Message.getFieldWithDefault(msg, 1, 0)
297
+ };
298
+
299
+ if (includeInstance) {
300
+ obj.$jspbMessageInstance = msg;
301
+ }
302
+ return obj;
303
+ };
304
+ }
305
+
306
+
307
+ /**
308
+ * Deserializes binary data (in protobuf wire format).
309
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
310
+ * @return {!proto.Auth.TwoFactorProto.CreateRequest}
311
+ */
312
+ proto.Auth.TwoFactorProto.CreateRequest.deserializeBinary = function(bytes) {
313
+ var reader = new jspb.BinaryReader(bytes);
314
+ var msg = new proto.Auth.TwoFactorProto.CreateRequest;
315
+ return proto.Auth.TwoFactorProto.CreateRequest.deserializeBinaryFromReader(msg, reader);
316
+ };
317
+
318
+
319
+ /**
320
+ * Deserializes binary data (in protobuf wire format) from the
321
+ * given reader into the given message object.
322
+ * @param {!proto.Auth.TwoFactorProto.CreateRequest} msg The message object to deserialize into.
323
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
324
+ * @return {!proto.Auth.TwoFactorProto.CreateRequest}
325
+ */
326
+ proto.Auth.TwoFactorProto.CreateRequest.deserializeBinaryFromReader = function(msg, reader) {
327
+ while (reader.nextField()) {
328
+ if (reader.isEndGroup()) {
329
+ break;
330
+ }
331
+ var field = reader.getFieldNumber();
332
+ switch (field) {
333
+ case 1:
334
+ var value = /** @type {number} */ (reader.readInt64());
335
+ msg.setAccountId(value);
336
+ break;
337
+ default:
338
+ reader.skipField();
339
+ break;
340
+ }
341
+ }
342
+ return msg;
343
+ };
344
+
345
+
346
+ /**
347
+ * Serializes the message to binary data (in protobuf wire format).
348
+ * @return {!Uint8Array}
349
+ */
350
+ proto.Auth.TwoFactorProto.CreateRequest.prototype.serializeBinary = function() {
351
+ var writer = new jspb.BinaryWriter();
352
+ proto.Auth.TwoFactorProto.CreateRequest.serializeBinaryToWriter(this, writer);
353
+ return writer.getResultBuffer();
354
+ };
355
+
356
+
357
+ /**
358
+ * Serializes the given message to binary data (in protobuf wire
359
+ * format), writing to the given BinaryWriter.
360
+ * @param {!proto.Auth.TwoFactorProto.CreateRequest} message
361
+ * @param {!jspb.BinaryWriter} writer
362
+ * @suppress {unusedLocalVariables} f is only used for nested messages
363
+ */
364
+ proto.Auth.TwoFactorProto.CreateRequest.serializeBinaryToWriter = function(message, writer) {
365
+ var f = undefined;
366
+ f = message.getAccountId();
367
+ if (f !== 0) {
368
+ writer.writeInt64(
369
+ 1,
370
+ f
371
+ );
372
+ }
373
+ };
374
+
375
+
376
+ /**
377
+ * optional int64 account_id = 1;
378
+ * @return {number}
379
+ */
380
+ proto.Auth.TwoFactorProto.CreateRequest.prototype.getAccountId = function() {
381
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
382
+ };
383
+
384
+
385
+ /**
386
+ * @param {number} value
387
+ * @return {!proto.Auth.TwoFactorProto.CreateRequest} returns this
388
+ */
389
+ proto.Auth.TwoFactorProto.CreateRequest.prototype.setAccountId = function(value) {
390
+ return jspb.Message.setProto3IntField(this, 1, value);
391
+ };
392
+
393
+
394
+
395
+
396
+
397
+ if (jspb.Message.GENERATE_TO_OBJECT) {
398
+ /**
399
+ * Creates an object representation of this proto.
400
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
401
+ * Optional fields that are not set will be set to undefined.
402
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
403
+ * For the list of reserved names please see:
404
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
405
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
406
+ * JSPB instance for transitional soy proto support:
407
+ * http://goto/soy-param-migration
408
+ * @return {!Object}
409
+ */
410
+ proto.Auth.TwoFactorProto.CreateReply.prototype.toObject = function(opt_includeInstance) {
411
+ return proto.Auth.TwoFactorProto.CreateReply.toObject(opt_includeInstance, this);
412
+ };
413
+
414
+
415
+ /**
416
+ * Static version of the {@see toObject} method.
417
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
418
+ * the JSPB instance for transitional soy proto support:
419
+ * http://goto/soy-param-migration
420
+ * @param {!proto.Auth.TwoFactorProto.CreateReply} msg The msg instance to transform.
421
+ * @return {!Object}
422
+ * @suppress {unusedLocalVariables} f is only used for nested messages
423
+ */
424
+ proto.Auth.TwoFactorProto.CreateReply.toObject = function(includeInstance, msg) {
425
+ var f, obj = {
426
+ qrData: jspb.Message.getFieldWithDefault(msg, 1, "")
427
+ };
428
+
429
+ if (includeInstance) {
430
+ obj.$jspbMessageInstance = msg;
431
+ }
432
+ return obj;
433
+ };
434
+ }
435
+
436
+
437
+ /**
438
+ * Deserializes binary data (in protobuf wire format).
439
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
440
+ * @return {!proto.Auth.TwoFactorProto.CreateReply}
441
+ */
442
+ proto.Auth.TwoFactorProto.CreateReply.deserializeBinary = function(bytes) {
443
+ var reader = new jspb.BinaryReader(bytes);
444
+ var msg = new proto.Auth.TwoFactorProto.CreateReply;
445
+ return proto.Auth.TwoFactorProto.CreateReply.deserializeBinaryFromReader(msg, reader);
446
+ };
447
+
448
+
449
+ /**
450
+ * Deserializes binary data (in protobuf wire format) from the
451
+ * given reader into the given message object.
452
+ * @param {!proto.Auth.TwoFactorProto.CreateReply} msg The message object to deserialize into.
453
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
454
+ * @return {!proto.Auth.TwoFactorProto.CreateReply}
455
+ */
456
+ proto.Auth.TwoFactorProto.CreateReply.deserializeBinaryFromReader = function(msg, reader) {
457
+ while (reader.nextField()) {
458
+ if (reader.isEndGroup()) {
459
+ break;
460
+ }
461
+ var field = reader.getFieldNumber();
462
+ switch (field) {
463
+ case 1:
464
+ var value = /** @type {string} */ (reader.readString());
465
+ msg.setQrData(value);
466
+ break;
467
+ default:
468
+ reader.skipField();
469
+ break;
470
+ }
471
+ }
472
+ return msg;
473
+ };
474
+
475
+
476
+ /**
477
+ * Serializes the message to binary data (in protobuf wire format).
478
+ * @return {!Uint8Array}
479
+ */
480
+ proto.Auth.TwoFactorProto.CreateReply.prototype.serializeBinary = function() {
481
+ var writer = new jspb.BinaryWriter();
482
+ proto.Auth.TwoFactorProto.CreateReply.serializeBinaryToWriter(this, writer);
483
+ return writer.getResultBuffer();
484
+ };
485
+
486
+
487
+ /**
488
+ * Serializes the given message to binary data (in protobuf wire
489
+ * format), writing to the given BinaryWriter.
490
+ * @param {!proto.Auth.TwoFactorProto.CreateReply} message
491
+ * @param {!jspb.BinaryWriter} writer
492
+ * @suppress {unusedLocalVariables} f is only used for nested messages
493
+ */
494
+ proto.Auth.TwoFactorProto.CreateReply.serializeBinaryToWriter = function(message, writer) {
495
+ var f = undefined;
496
+ f = message.getQrData();
497
+ if (f.length > 0) {
498
+ writer.writeString(
499
+ 1,
500
+ f
501
+ );
502
+ }
503
+ };
504
+
505
+
506
+ /**
507
+ * optional string qr_data = 1;
508
+ * @return {string}
509
+ */
510
+ proto.Auth.TwoFactorProto.CreateReply.prototype.getQrData = function() {
511
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
512
+ };
513
+
514
+
515
+ /**
516
+ * @param {string} value
517
+ * @return {!proto.Auth.TwoFactorProto.CreateReply} returns this
518
+ */
519
+ proto.Auth.TwoFactorProto.CreateReply.prototype.setQrData = function(value) {
520
+ return jspb.Message.setProto3StringField(this, 1, value);
521
+ };
522
+
523
+
524
+
525
+
526
+
527
+ if (jspb.Message.GENERATE_TO_OBJECT) {
528
+ /**
529
+ * Creates an object representation of this proto.
530
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
531
+ * Optional fields that are not set will be set to undefined.
532
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
533
+ * For the list of reserved names please see:
534
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
535
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
536
+ * JSPB instance for transitional soy proto support:
537
+ * http://goto/soy-param-migration
538
+ * @return {!Object}
539
+ */
540
+ proto.Auth.TwoFactorProto.RemoveRequest.prototype.toObject = function(opt_includeInstance) {
541
+ return proto.Auth.TwoFactorProto.RemoveRequest.toObject(opt_includeInstance, this);
542
+ };
543
+
544
+
545
+ /**
546
+ * Static version of the {@see toObject} method.
547
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
548
+ * the JSPB instance for transitional soy proto support:
549
+ * http://goto/soy-param-migration
550
+ * @param {!proto.Auth.TwoFactorProto.RemoveRequest} msg The msg instance to transform.
551
+ * @return {!Object}
552
+ * @suppress {unusedLocalVariables} f is only used for nested messages
553
+ */
554
+ proto.Auth.TwoFactorProto.RemoveRequest.toObject = function(includeInstance, msg) {
555
+ var f, obj = {
556
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
557
+ };
558
+
559
+ if (includeInstance) {
560
+ obj.$jspbMessageInstance = msg;
561
+ }
562
+ return obj;
563
+ };
564
+ }
565
+
566
+
567
+ /**
568
+ * Deserializes binary data (in protobuf wire format).
569
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
570
+ * @return {!proto.Auth.TwoFactorProto.RemoveRequest}
571
+ */
572
+ proto.Auth.TwoFactorProto.RemoveRequest.deserializeBinary = function(bytes) {
573
+ var reader = new jspb.BinaryReader(bytes);
574
+ var msg = new proto.Auth.TwoFactorProto.RemoveRequest;
575
+ return proto.Auth.TwoFactorProto.RemoveRequest.deserializeBinaryFromReader(msg, reader);
576
+ };
577
+
578
+
579
+ /**
580
+ * Deserializes binary data (in protobuf wire format) from the
581
+ * given reader into the given message object.
582
+ * @param {!proto.Auth.TwoFactorProto.RemoveRequest} msg The message object to deserialize into.
583
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
584
+ * @return {!proto.Auth.TwoFactorProto.RemoveRequest}
585
+ */
586
+ proto.Auth.TwoFactorProto.RemoveRequest.deserializeBinaryFromReader = function(msg, reader) {
587
+ while (reader.nextField()) {
588
+ if (reader.isEndGroup()) {
589
+ break;
590
+ }
591
+ var field = reader.getFieldNumber();
592
+ switch (field) {
593
+ case 1:
594
+ var value = /** @type {number} */ (reader.readInt64());
595
+ msg.setId(value);
596
+ break;
597
+ default:
598
+ reader.skipField();
599
+ break;
600
+ }
601
+ }
602
+ return msg;
603
+ };
604
+
605
+
606
+ /**
607
+ * Serializes the message to binary data (in protobuf wire format).
608
+ * @return {!Uint8Array}
609
+ */
610
+ proto.Auth.TwoFactorProto.RemoveRequest.prototype.serializeBinary = function() {
611
+ var writer = new jspb.BinaryWriter();
612
+ proto.Auth.TwoFactorProto.RemoveRequest.serializeBinaryToWriter(this, writer);
613
+ return writer.getResultBuffer();
614
+ };
615
+
616
+
617
+ /**
618
+ * Serializes the given message to binary data (in protobuf wire
619
+ * format), writing to the given BinaryWriter.
620
+ * @param {!proto.Auth.TwoFactorProto.RemoveRequest} message
621
+ * @param {!jspb.BinaryWriter} writer
622
+ * @suppress {unusedLocalVariables} f is only used for nested messages
623
+ */
624
+ proto.Auth.TwoFactorProto.RemoveRequest.serializeBinaryToWriter = function(message, writer) {
625
+ var f = undefined;
626
+ f = message.getId();
627
+ if (f !== 0) {
628
+ writer.writeInt64(
629
+ 1,
630
+ f
631
+ );
632
+ }
633
+ };
634
+
635
+
636
+ /**
637
+ * optional int64 id = 1;
638
+ * @return {number}
639
+ */
640
+ proto.Auth.TwoFactorProto.RemoveRequest.prototype.getId = function() {
641
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
642
+ };
643
+
644
+
645
+ /**
646
+ * @param {number} value
647
+ * @return {!proto.Auth.TwoFactorProto.RemoveRequest} returns this
648
+ */
649
+ proto.Auth.TwoFactorProto.RemoveRequest.prototype.setId = function(value) {
650
+ return jspb.Message.setProto3IntField(this, 1, value);
651
+ };
652
+
653
+
654
+
655
+
656
+
657
+ if (jspb.Message.GENERATE_TO_OBJECT) {
658
+ /**
659
+ * Creates an object representation of this proto.
660
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
661
+ * Optional fields that are not set will be set to undefined.
662
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
663
+ * For the list of reserved names please see:
664
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
665
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
666
+ * JSPB instance for transitional soy proto support:
667
+ * http://goto/soy-param-migration
668
+ * @return {!Object}
669
+ */
670
+ proto.Auth.TwoFactorProto.ValidateRequest.prototype.toObject = function(opt_includeInstance) {
671
+ return proto.Auth.TwoFactorProto.ValidateRequest.toObject(opt_includeInstance, this);
672
+ };
673
+
674
+
675
+ /**
676
+ * Static version of the {@see toObject} method.
677
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
678
+ * the JSPB instance for transitional soy proto support:
679
+ * http://goto/soy-param-migration
680
+ * @param {!proto.Auth.TwoFactorProto.ValidateRequest} msg The msg instance to transform.
681
+ * @return {!Object}
682
+ * @suppress {unusedLocalVariables} f is only used for nested messages
683
+ */
684
+ proto.Auth.TwoFactorProto.ValidateRequest.toObject = function(includeInstance, msg) {
685
+ var f, obj = {
686
+ validationkey: jspb.Message.getFieldWithDefault(msg, 1, "")
687
+ };
688
+
689
+ if (includeInstance) {
690
+ obj.$jspbMessageInstance = msg;
691
+ }
692
+ return obj;
693
+ };
694
+ }
695
+
696
+
697
+ /**
698
+ * Deserializes binary data (in protobuf wire format).
699
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
700
+ * @return {!proto.Auth.TwoFactorProto.ValidateRequest}
701
+ */
702
+ proto.Auth.TwoFactorProto.ValidateRequest.deserializeBinary = function(bytes) {
703
+ var reader = new jspb.BinaryReader(bytes);
704
+ var msg = new proto.Auth.TwoFactorProto.ValidateRequest;
705
+ return proto.Auth.TwoFactorProto.ValidateRequest.deserializeBinaryFromReader(msg, reader);
706
+ };
707
+
708
+
709
+ /**
710
+ * Deserializes binary data (in protobuf wire format) from the
711
+ * given reader into the given message object.
712
+ * @param {!proto.Auth.TwoFactorProto.ValidateRequest} msg The message object to deserialize into.
713
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
714
+ * @return {!proto.Auth.TwoFactorProto.ValidateRequest}
715
+ */
716
+ proto.Auth.TwoFactorProto.ValidateRequest.deserializeBinaryFromReader = function(msg, reader) {
717
+ while (reader.nextField()) {
718
+ if (reader.isEndGroup()) {
719
+ break;
720
+ }
721
+ var field = reader.getFieldNumber();
722
+ switch (field) {
723
+ case 1:
724
+ var value = /** @type {string} */ (reader.readString());
725
+ msg.setValidationkey(value);
726
+ break;
727
+ default:
728
+ reader.skipField();
729
+ break;
730
+ }
731
+ }
732
+ return msg;
733
+ };
734
+
735
+
736
+ /**
737
+ * Serializes the message to binary data (in protobuf wire format).
738
+ * @return {!Uint8Array}
739
+ */
740
+ proto.Auth.TwoFactorProto.ValidateRequest.prototype.serializeBinary = function() {
741
+ var writer = new jspb.BinaryWriter();
742
+ proto.Auth.TwoFactorProto.ValidateRequest.serializeBinaryToWriter(this, writer);
743
+ return writer.getResultBuffer();
744
+ };
745
+
746
+
747
+ /**
748
+ * Serializes the given message to binary data (in protobuf wire
749
+ * format), writing to the given BinaryWriter.
750
+ * @param {!proto.Auth.TwoFactorProto.ValidateRequest} message
751
+ * @param {!jspb.BinaryWriter} writer
752
+ * @suppress {unusedLocalVariables} f is only used for nested messages
753
+ */
754
+ proto.Auth.TwoFactorProto.ValidateRequest.serializeBinaryToWriter = function(message, writer) {
755
+ var f = undefined;
756
+ f = message.getValidationkey();
757
+ if (f.length > 0) {
758
+ writer.writeString(
759
+ 1,
760
+ f
761
+ );
762
+ }
763
+ };
764
+
765
+
766
+ /**
767
+ * optional string validationKey = 1;
768
+ * @return {string}
769
+ */
770
+ proto.Auth.TwoFactorProto.ValidateRequest.prototype.getValidationkey = function() {
771
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
772
+ };
773
+
774
+
775
+ /**
776
+ * @param {string} value
777
+ * @return {!proto.Auth.TwoFactorProto.ValidateRequest} returns this
778
+ */
779
+ proto.Auth.TwoFactorProto.ValidateRequest.prototype.setValidationkey = function(value) {
780
+ return jspb.Message.setProto3StringField(this, 1, value);
781
+ };
782
+
783
+
784
+ /**
785
+ * optional int64 id = 1;
786
+ * @return {number}
787
+ */
788
+ proto.Auth.TwoFactorProto.prototype.getId = function() {
789
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
790
+ };
791
+
792
+
793
+ /**
794
+ * @param {number} value
795
+ * @return {!proto.Auth.TwoFactorProto} returns this
796
+ */
797
+ proto.Auth.TwoFactorProto.prototype.setId = function(value) {
798
+ return jspb.Message.setProto3IntField(this, 1, value);
799
+ };
800
+
801
+
802
+ /**
803
+ * optional int64 account_id = 2;
804
+ * @return {number}
805
+ */
806
+ proto.Auth.TwoFactorProto.prototype.getAccountId = function() {
807
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
808
+ };
809
+
810
+
811
+ /**
812
+ * @param {number} value
813
+ * @return {!proto.Auth.TwoFactorProto} returns this
814
+ */
815
+ proto.Auth.TwoFactorProto.prototype.setAccountId = function(value) {
816
+ return jspb.Message.setProto3IntField(this, 2, value);
817
+ };
818
+
819
+
820
+ goog.object.extend(exports, proto.Auth);
@@ -0,0 +1,102 @@
1
+ // package: Auth
2
+ // file: auth.account_two_factor.proto
3
+
4
+ import * as auth_account_two_factor_pb from "./auth.account_two_factor_pb";
5
+ import * as auth_authn_pb from "./auth.authn_pb";
6
+ import {grpc} from "@improbable-eng/grpc-web";
7
+
8
+ type AccountTwoFactorGRPCCreate = {
9
+ readonly methodName: string;
10
+ readonly service: typeof AccountTwoFactorGRPC;
11
+ readonly requestStream: false;
12
+ readonly responseStream: false;
13
+ readonly requestType: typeof auth_account_two_factor_pb.TwoFactorProto.CreateRequest;
14
+ readonly responseType: typeof auth_account_two_factor_pb.TwoFactorProto;
15
+ };
16
+
17
+ type AccountTwoFactorGRPCRemove = {
18
+ readonly methodName: string;
19
+ readonly service: typeof AccountTwoFactorGRPC;
20
+ readonly requestStream: false;
21
+ readonly responseStream: false;
22
+ readonly requestType: typeof auth_account_two_factor_pb.TwoFactorProto.RemoveRequest;
23
+ readonly responseType: typeof auth_account_two_factor_pb.TwoFactorProto;
24
+ };
25
+
26
+ type AccountTwoFactorGRPCValidate = {
27
+ readonly methodName: string;
28
+ readonly service: typeof AccountTwoFactorGRPC;
29
+ readonly requestStream: false;
30
+ readonly responseStream: false;
31
+ readonly requestType: typeof auth_account_two_factor_pb.TwoFactorProto.ValidateRequest;
32
+ readonly responseType: typeof auth_authn_pb.AuthnProto;
33
+ };
34
+
35
+ export class AccountTwoFactorGRPC {
36
+ static readonly serviceName: string;
37
+ static readonly Create: AccountTwoFactorGRPCCreate;
38
+ static readonly Remove: AccountTwoFactorGRPCRemove;
39
+ static readonly Validate: AccountTwoFactorGRPCValidate;
40
+ }
41
+
42
+ export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
43
+ export type Status = { details: string, code: number; metadata: grpc.Metadata }
44
+
45
+ interface UnaryResponse {
46
+ cancel(): void;
47
+ }
48
+ interface ResponseStream<T> {
49
+ cancel(): void;
50
+ on(type: 'data', handler: (message: T) => void): ResponseStream<T>;
51
+ on(type: 'end', handler: (status?: Status) => void): ResponseStream<T>;
52
+ on(type: 'status', handler: (status: Status) => void): ResponseStream<T>;
53
+ }
54
+ interface RequestStream<T> {
55
+ write(message: T): RequestStream<T>;
56
+ end(): void;
57
+ cancel(): void;
58
+ on(type: 'end', handler: (status?: Status) => void): RequestStream<T>;
59
+ on(type: 'status', handler: (status: Status) => void): RequestStream<T>;
60
+ }
61
+ interface BidirectionalStream<ReqT, ResT> {
62
+ write(message: ReqT): BidirectionalStream<ReqT, ResT>;
63
+ end(): void;
64
+ cancel(): void;
65
+ on(type: 'data', handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>;
66
+ on(type: 'end', handler: (status?: Status) => void): BidirectionalStream<ReqT, ResT>;
67
+ on(type: 'status', handler: (status: Status) => void): BidirectionalStream<ReqT, ResT>;
68
+ }
69
+
70
+ export class AccountTwoFactorGRPCClient {
71
+ readonly serviceHost: string;
72
+
73
+ constructor(serviceHost: string, options?: grpc.RpcOptions);
74
+ create(
75
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.CreateRequest,
76
+ metadata: grpc.Metadata,
77
+ callback: (error: ServiceError|null, responseMessage: auth_account_two_factor_pb.TwoFactorProto|null) => void
78
+ ): UnaryResponse;
79
+ create(
80
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.CreateRequest,
81
+ callback: (error: ServiceError|null, responseMessage: auth_account_two_factor_pb.TwoFactorProto|null) => void
82
+ ): UnaryResponse;
83
+ remove(
84
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.RemoveRequest,
85
+ metadata: grpc.Metadata,
86
+ callback: (error: ServiceError|null, responseMessage: auth_account_two_factor_pb.TwoFactorProto|null) => void
87
+ ): UnaryResponse;
88
+ remove(
89
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.RemoveRequest,
90
+ callback: (error: ServiceError|null, responseMessage: auth_account_two_factor_pb.TwoFactorProto|null) => void
91
+ ): UnaryResponse;
92
+ validate(
93
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.ValidateRequest,
94
+ metadata: grpc.Metadata,
95
+ callback: (error: ServiceError|null, responseMessage: auth_authn_pb.AuthnProto|null) => void
96
+ ): UnaryResponse;
97
+ validate(
98
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.ValidateRequest,
99
+ callback: (error: ServiceError|null, responseMessage: auth_authn_pb.AuthnProto|null) => void
100
+ ): UnaryResponse;
101
+ }
102
+
@@ -0,0 +1,142 @@
1
+ // package: Auth
2
+ // file: auth.account_two_factor.proto
3
+
4
+ var auth_account_two_factor_pb = require("./auth.account_two_factor_pb");
5
+ var auth_authn_pb = require("./auth.authn_pb");
6
+ var grpc = require("@improbable-eng/grpc-web").grpc;
7
+
8
+ var AccountTwoFactorGRPC = (function () {
9
+ function AccountTwoFactorGRPC() {}
10
+ AccountTwoFactorGRPC.serviceName = "Auth.AccountTwoFactorGRPC";
11
+ return AccountTwoFactorGRPC;
12
+ }());
13
+
14
+ AccountTwoFactorGRPC.Create = {
15
+ methodName: "Create",
16
+ service: AccountTwoFactorGRPC,
17
+ requestStream: false,
18
+ responseStream: false,
19
+ requestType: auth_account_two_factor_pb.TwoFactorProto.CreateRequest,
20
+ responseType: auth_account_two_factor_pb.TwoFactorProto
21
+ };
22
+
23
+ AccountTwoFactorGRPC.Remove = {
24
+ methodName: "Remove",
25
+ service: AccountTwoFactorGRPC,
26
+ requestStream: false,
27
+ responseStream: false,
28
+ requestType: auth_account_two_factor_pb.TwoFactorProto.RemoveRequest,
29
+ responseType: auth_account_two_factor_pb.TwoFactorProto
30
+ };
31
+
32
+ AccountTwoFactorGRPC.Validate = {
33
+ methodName: "Validate",
34
+ service: AccountTwoFactorGRPC,
35
+ requestStream: false,
36
+ responseStream: false,
37
+ requestType: auth_account_two_factor_pb.TwoFactorProto.ValidateRequest,
38
+ responseType: auth_authn_pb.AuthnProto
39
+ };
40
+
41
+ exports.AccountTwoFactorGRPC = AccountTwoFactorGRPC;
42
+
43
+ function AccountTwoFactorGRPCClient(serviceHost, options) {
44
+ this.serviceHost = serviceHost;
45
+ this.options = options || {};
46
+ }
47
+
48
+ AccountTwoFactorGRPCClient.prototype.create = function create(requestMessage, metadata, callback) {
49
+ if (arguments.length === 2) {
50
+ callback = arguments[1];
51
+ }
52
+ var client = grpc.unary(AccountTwoFactorGRPC.Create, {
53
+ request: requestMessage,
54
+ host: this.serviceHost,
55
+ metadata: metadata,
56
+ transport: this.options.transport,
57
+ debug: this.options.debug,
58
+ onEnd: function (response) {
59
+ if (callback) {
60
+ if (response.status !== grpc.Code.OK) {
61
+ var err = new Error(response.statusMessage);
62
+ err.code = response.status;
63
+ err.metadata = response.trailers;
64
+ callback(err, null);
65
+ } else {
66
+ callback(null, response.message);
67
+ }
68
+ }
69
+ }
70
+ });
71
+ return {
72
+ cancel: function () {
73
+ callback = null;
74
+ client.close();
75
+ }
76
+ };
77
+ };
78
+
79
+ AccountTwoFactorGRPCClient.prototype.remove = function remove(requestMessage, metadata, callback) {
80
+ if (arguments.length === 2) {
81
+ callback = arguments[1];
82
+ }
83
+ var client = grpc.unary(AccountTwoFactorGRPC.Remove, {
84
+ request: requestMessage,
85
+ host: this.serviceHost,
86
+ metadata: metadata,
87
+ transport: this.options.transport,
88
+ debug: this.options.debug,
89
+ onEnd: function (response) {
90
+ if (callback) {
91
+ if (response.status !== grpc.Code.OK) {
92
+ var err = new Error(response.statusMessage);
93
+ err.code = response.status;
94
+ err.metadata = response.trailers;
95
+ callback(err, null);
96
+ } else {
97
+ callback(null, response.message);
98
+ }
99
+ }
100
+ }
101
+ });
102
+ return {
103
+ cancel: function () {
104
+ callback = null;
105
+ client.close();
106
+ }
107
+ };
108
+ };
109
+
110
+ AccountTwoFactorGRPCClient.prototype.validate = function validate(requestMessage, metadata, callback) {
111
+ if (arguments.length === 2) {
112
+ callback = arguments[1];
113
+ }
114
+ var client = grpc.unary(AccountTwoFactorGRPC.Validate, {
115
+ request: requestMessage,
116
+ host: this.serviceHost,
117
+ metadata: metadata,
118
+ transport: this.options.transport,
119
+ debug: this.options.debug,
120
+ onEnd: function (response) {
121
+ if (callback) {
122
+ if (response.status !== grpc.Code.OK) {
123
+ var err = new Error(response.statusMessage);
124
+ err.code = response.status;
125
+ err.metadata = response.trailers;
126
+ callback(err, null);
127
+ } else {
128
+ callback(null, response.message);
129
+ }
130
+ }
131
+ }
132
+ });
133
+ return {
134
+ cancel: function () {
135
+ callback = null;
136
+ client.close();
137
+ }
138
+ };
139
+ };
140
+
141
+ exports.AccountTwoFactorGRPCClient = AccountTwoFactorGRPCClient;
142
+
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "grpc-web": "^1.4.2",
6
6
  "ts-protoc-gen": "^0.15.0"
7
7
  },
8
- "version": "2.3.1",
8
+ "version": "2.3.2",
9
9
  "description": "Generated proto files.",
10
10
  "author": "TKF",
11
11
  "files": [