@technova-tech/olive-proto-lib 1.2.0

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.
Files changed (49) hide show
  1. package/accounts/accounts.js +11726 -0
  2. package/admin/admin.js +6902 -0
  3. package/audit/audit.js +984 -0
  4. package/bills/bills.js +2363 -0
  5. package/business/business.js +16432 -0
  6. package/google/protobuf/any.js +113 -0
  7. package/google/protobuf/struct.js +357 -0
  8. package/image/recognition.js +456 -0
  9. package/index.js +46 -0
  10. package/package.json +31 -0
  11. package/pos/transactions.js +2084 -0
  12. package/pos.v1/auth.js +1179 -0
  13. package/pos.v1/card-transactions.js +2473 -0
  14. package/pos.v1/eod.js +2416 -0
  15. package/pos.v1/merchants.js +1552 -0
  16. package/pos.v1/terminal-transactions.js +3792 -0
  17. package/pos.v1/terminal-types.js +3888 -0
  18. package/pos.v1/terminals.js +32605 -0
  19. package/pos.v1/transactions.js +2918 -0
  20. package/shared/response.js +233 -0
  21. package/storage/storage.js +476 -0
  22. package/terminal/terminal.js +12583 -0
  23. package/transfer/transfer.js +3609 -0
  24. package/types/accounts/accounts.d.ts +3943 -0
  25. package/types/admin/admin.d.ts +2348 -0
  26. package/types/audit/audit.d.ts +323 -0
  27. package/types/bills/bills.d.ts +731 -0
  28. package/types/business/business.d.ts +7630 -0
  29. package/types/google/protobuf/any.d.ts +27 -0
  30. package/types/google/protobuf/struct.d.ts +175 -0
  31. package/types/image/recognition.d.ts +147 -0
  32. package/types/index.d.ts +43 -0
  33. package/types/pos/transactions.d.ts +667 -0
  34. package/types/pos.v1/auth.d.ts +374 -0
  35. package/types/pos.v1/card-transactions.d.ts +808 -0
  36. package/types/pos.v1/eod.d.ts +819 -0
  37. package/types/pos.v1/merchants.d.ts +566 -0
  38. package/types/pos.v1/terminal-transactions.d.ts +1342 -0
  39. package/types/pos.v1/terminal-types.d.ts +1215 -0
  40. package/types/pos.v1/terminals.d.ts +11142 -0
  41. package/types/pos.v1/transactions.d.ts +1057 -0
  42. package/types/shared/response.d.ts +65 -0
  43. package/types/storage/storage.d.ts +153 -0
  44. package/types/terminal/terminal.d.ts +5482 -0
  45. package/types/transfer/transfer.d.ts +1148 -0
  46. package/types/users/users.d.ts +4336 -0
  47. package/types/verifications/verifications.d.ts +2952 -0
  48. package/users/users.js +12683 -0
  49. package/verifications/verifications.js +8194 -0
@@ -0,0 +1,2084 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.com = void 0;
27
+ const pb_1 = __importStar(require("google-protobuf"));
28
+ const grpc_1 = __importStar(require("@grpc/grpc-js"));
29
+ var com;
30
+ (function (com) {
31
+ var pkg;
32
+ (function (pkg) {
33
+ var pos;
34
+ (function (pos) {
35
+ class InitializePOSTransactionRequest extends pb_1.Message {
36
+ #one_of_decls = [];
37
+ constructor(data) {
38
+ super();
39
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
40
+ if (!Array.isArray(data) && typeof data == "object") {
41
+ if ("accountId" in data && data.accountId != undefined) {
42
+ this.accountId = data.accountId;
43
+ }
44
+ if ("businessId" in data && data.businessId != undefined) {
45
+ this.businessId = data.businessId;
46
+ }
47
+ if ("terminalId" in data && data.terminalId != undefined) {
48
+ this.terminalId = data.terminalId;
49
+ }
50
+ if ("amount" in data && data.amount != undefined) {
51
+ this.amount = data.amount;
52
+ }
53
+ if ("meta" in data && data.meta != undefined) {
54
+ this.meta = data.meta;
55
+ }
56
+ if ("type" in data && data.type != undefined) {
57
+ this.type = data.type;
58
+ }
59
+ }
60
+ }
61
+ get accountId() {
62
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
63
+ }
64
+ set accountId(value) {
65
+ pb_1.Message.setField(this, 1, value);
66
+ }
67
+ get businessId() {
68
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
69
+ }
70
+ set businessId(value) {
71
+ pb_1.Message.setField(this, 2, value);
72
+ }
73
+ get terminalId() {
74
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
75
+ }
76
+ set terminalId(value) {
77
+ pb_1.Message.setField(this, 3, value);
78
+ }
79
+ get amount() {
80
+ return pb_1.Message.getFieldWithDefault(this, 4, 0);
81
+ }
82
+ set amount(value) {
83
+ pb_1.Message.setField(this, 4, value);
84
+ }
85
+ get meta() {
86
+ return pb_1.Message.getFieldWithDefault(this, 5, "");
87
+ }
88
+ set meta(value) {
89
+ pb_1.Message.setField(this, 5, value);
90
+ }
91
+ get type() {
92
+ return pb_1.Message.getFieldWithDefault(this, 6, "");
93
+ }
94
+ set type(value) {
95
+ pb_1.Message.setField(this, 6, value);
96
+ }
97
+ static fromObject(data) {
98
+ const message = new InitializePOSTransactionRequest({});
99
+ if (data.accountId != null) {
100
+ message.accountId = data.accountId;
101
+ }
102
+ if (data.businessId != null) {
103
+ message.businessId = data.businessId;
104
+ }
105
+ if (data.terminalId != null) {
106
+ message.terminalId = data.terminalId;
107
+ }
108
+ if (data.amount != null) {
109
+ message.amount = data.amount;
110
+ }
111
+ if (data.meta != null) {
112
+ message.meta = data.meta;
113
+ }
114
+ if (data.type != null) {
115
+ message.type = data.type;
116
+ }
117
+ return message;
118
+ }
119
+ toObject() {
120
+ const data = {};
121
+ if (this.accountId != null) {
122
+ data.accountId = this.accountId;
123
+ }
124
+ if (this.businessId != null) {
125
+ data.businessId = this.businessId;
126
+ }
127
+ if (this.terminalId != null) {
128
+ data.terminalId = this.terminalId;
129
+ }
130
+ if (this.amount != null) {
131
+ data.amount = this.amount;
132
+ }
133
+ if (this.meta != null) {
134
+ data.meta = this.meta;
135
+ }
136
+ if (this.type != null) {
137
+ data.type = this.type;
138
+ }
139
+ return data;
140
+ }
141
+ serialize(w) {
142
+ const writer = w || new pb_1.BinaryWriter();
143
+ if (this.accountId.length)
144
+ writer.writeString(1, this.accountId);
145
+ if (this.businessId.length)
146
+ writer.writeString(2, this.businessId);
147
+ if (this.terminalId.length)
148
+ writer.writeString(3, this.terminalId);
149
+ if (this.amount != 0)
150
+ writer.writeDouble(4, this.amount);
151
+ if (this.meta.length)
152
+ writer.writeString(5, this.meta);
153
+ if (this.type.length)
154
+ writer.writeString(6, this.type);
155
+ if (!w)
156
+ return writer.getResultBuffer();
157
+ }
158
+ static deserialize(bytes) {
159
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InitializePOSTransactionRequest();
160
+ while (reader.nextField()) {
161
+ if (reader.isEndGroup())
162
+ break;
163
+ switch (reader.getFieldNumber()) {
164
+ case 1:
165
+ message.accountId = reader.readString();
166
+ break;
167
+ case 2:
168
+ message.businessId = reader.readString();
169
+ break;
170
+ case 3:
171
+ message.terminalId = reader.readString();
172
+ break;
173
+ case 4:
174
+ message.amount = reader.readDouble();
175
+ break;
176
+ case 5:
177
+ message.meta = reader.readString();
178
+ break;
179
+ case 6:
180
+ message.type = reader.readString();
181
+ break;
182
+ default: reader.skipField();
183
+ }
184
+ }
185
+ return message;
186
+ }
187
+ serializeBinary() {
188
+ return this.serialize();
189
+ }
190
+ static deserializeBinary(bytes) {
191
+ return InitializePOSTransactionRequest.deserialize(bytes);
192
+ }
193
+ }
194
+ pos.InitializePOSTransactionRequest = InitializePOSTransactionRequest;
195
+ class ConfirmPOSTransactionRequest extends pb_1.Message {
196
+ #one_of_decls = [];
197
+ constructor(data) {
198
+ super();
199
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
200
+ if (!Array.isArray(data) && typeof data == "object") {
201
+ if ("reference" in data && data.reference != undefined) {
202
+ this.reference = data.reference;
203
+ }
204
+ if ("status" in data && data.status != undefined) {
205
+ this.status = data.status;
206
+ }
207
+ if ("meta" in data && data.meta != undefined) {
208
+ this.meta = data.meta;
209
+ }
210
+ if ("type" in data && data.type != undefined) {
211
+ this.type = data.type;
212
+ }
213
+ }
214
+ }
215
+ get reference() {
216
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
217
+ }
218
+ set reference(value) {
219
+ pb_1.Message.setField(this, 1, value);
220
+ }
221
+ get status() {
222
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
223
+ }
224
+ set status(value) {
225
+ pb_1.Message.setField(this, 2, value);
226
+ }
227
+ get meta() {
228
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
229
+ }
230
+ set meta(value) {
231
+ pb_1.Message.setField(this, 3, value);
232
+ }
233
+ get type() {
234
+ return pb_1.Message.getFieldWithDefault(this, 4, "");
235
+ }
236
+ set type(value) {
237
+ pb_1.Message.setField(this, 4, value);
238
+ }
239
+ static fromObject(data) {
240
+ const message = new ConfirmPOSTransactionRequest({});
241
+ if (data.reference != null) {
242
+ message.reference = data.reference;
243
+ }
244
+ if (data.status != null) {
245
+ message.status = data.status;
246
+ }
247
+ if (data.meta != null) {
248
+ message.meta = data.meta;
249
+ }
250
+ if (data.type != null) {
251
+ message.type = data.type;
252
+ }
253
+ return message;
254
+ }
255
+ toObject() {
256
+ const data = {};
257
+ if (this.reference != null) {
258
+ data.reference = this.reference;
259
+ }
260
+ if (this.status != null) {
261
+ data.status = this.status;
262
+ }
263
+ if (this.meta != null) {
264
+ data.meta = this.meta;
265
+ }
266
+ if (this.type != null) {
267
+ data.type = this.type;
268
+ }
269
+ return data;
270
+ }
271
+ serialize(w) {
272
+ const writer = w || new pb_1.BinaryWriter();
273
+ if (this.reference.length)
274
+ writer.writeString(1, this.reference);
275
+ if (this.status.length)
276
+ writer.writeString(2, this.status);
277
+ if (this.meta.length)
278
+ writer.writeString(3, this.meta);
279
+ if (this.type.length)
280
+ writer.writeString(4, this.type);
281
+ if (!w)
282
+ return writer.getResultBuffer();
283
+ }
284
+ static deserialize(bytes) {
285
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ConfirmPOSTransactionRequest();
286
+ while (reader.nextField()) {
287
+ if (reader.isEndGroup())
288
+ break;
289
+ switch (reader.getFieldNumber()) {
290
+ case 1:
291
+ message.reference = reader.readString();
292
+ break;
293
+ case 2:
294
+ message.status = reader.readString();
295
+ break;
296
+ case 3:
297
+ message.meta = reader.readString();
298
+ break;
299
+ case 4:
300
+ message.type = reader.readString();
301
+ break;
302
+ default: reader.skipField();
303
+ }
304
+ }
305
+ return message;
306
+ }
307
+ serializeBinary() {
308
+ return this.serialize();
309
+ }
310
+ static deserializeBinary(bytes) {
311
+ return ConfirmPOSTransactionRequest.deserialize(bytes);
312
+ }
313
+ }
314
+ pos.ConfirmPOSTransactionRequest = ConfirmPOSTransactionRequest;
315
+ class ValidationErrors extends pb_1.Message {
316
+ #one_of_decls = [];
317
+ constructor(data) {
318
+ super();
319
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
320
+ if (!Array.isArray(data) && typeof data == "object") {
321
+ if ("field" in data && data.field != undefined) {
322
+ this.field = data.field;
323
+ }
324
+ if ("message" in data && data.message != undefined) {
325
+ this.message = data.message;
326
+ }
327
+ }
328
+ }
329
+ get field() {
330
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
331
+ }
332
+ set field(value) {
333
+ pb_1.Message.setField(this, 1, value);
334
+ }
335
+ get message() {
336
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
337
+ }
338
+ set message(value) {
339
+ pb_1.Message.setField(this, 2, value);
340
+ }
341
+ static fromObject(data) {
342
+ const message = new ValidationErrors({});
343
+ if (data.field != null) {
344
+ message.field = data.field;
345
+ }
346
+ if (data.message != null) {
347
+ message.message = data.message;
348
+ }
349
+ return message;
350
+ }
351
+ toObject() {
352
+ const data = {};
353
+ if (this.field != null) {
354
+ data.field = this.field;
355
+ }
356
+ if (this.message != null) {
357
+ data.message = this.message;
358
+ }
359
+ return data;
360
+ }
361
+ serialize(w) {
362
+ const writer = w || new pb_1.BinaryWriter();
363
+ if (this.field.length)
364
+ writer.writeString(1, this.field);
365
+ if (this.message.length)
366
+ writer.writeString(2, this.message);
367
+ if (!w)
368
+ return writer.getResultBuffer();
369
+ }
370
+ static deserialize(bytes) {
371
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ValidationErrors();
372
+ while (reader.nextField()) {
373
+ if (reader.isEndGroup())
374
+ break;
375
+ switch (reader.getFieldNumber()) {
376
+ case 1:
377
+ message.field = reader.readString();
378
+ break;
379
+ case 2:
380
+ message.message = reader.readString();
381
+ break;
382
+ default: reader.skipField();
383
+ }
384
+ }
385
+ return message;
386
+ }
387
+ serializeBinary() {
388
+ return this.serialize();
389
+ }
390
+ static deserializeBinary(bytes) {
391
+ return ValidationErrors.deserialize(bytes);
392
+ }
393
+ }
394
+ pos.ValidationErrors = ValidationErrors;
395
+ class PosTransaction extends pb_1.Message {
396
+ #one_of_decls = [];
397
+ constructor(data) {
398
+ super();
399
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
400
+ if (!Array.isArray(data) && typeof data == "object") {
401
+ if ("account" in data && data.account != undefined) {
402
+ this.account = data.account;
403
+ }
404
+ if ("provider" in data && data.provider != undefined) {
405
+ this.provider = data.provider;
406
+ }
407
+ if ("reference" in data && data.reference != undefined) {
408
+ this.reference = data.reference;
409
+ }
410
+ if ("amount" in data && data.amount != undefined) {
411
+ this.amount = data.amount;
412
+ }
413
+ if ("meta" in data && data.meta != undefined) {
414
+ this.meta = data.meta;
415
+ }
416
+ if ("status" in data && data.status != undefined) {
417
+ this.status = data.status;
418
+ }
419
+ if ("rrn" in data && data.rrn != undefined) {
420
+ this.rrn = data.rrn;
421
+ }
422
+ if ("stan" in data && data.stan != undefined) {
423
+ this.stan = data.stan;
424
+ }
425
+ if ("type" in data && data.type != undefined) {
426
+ this.type = data.type;
427
+ }
428
+ if ("createdAt" in data && data.createdAt != undefined) {
429
+ this.createdAt = data.createdAt;
430
+ }
431
+ if ("updatedAt" in data && data.updatedAt != undefined) {
432
+ this.updatedAt = data.updatedAt;
433
+ }
434
+ }
435
+ }
436
+ get account() {
437
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
438
+ }
439
+ set account(value) {
440
+ pb_1.Message.setField(this, 1, value);
441
+ }
442
+ get provider() {
443
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
444
+ }
445
+ set provider(value) {
446
+ pb_1.Message.setField(this, 2, value);
447
+ }
448
+ get reference() {
449
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
450
+ }
451
+ set reference(value) {
452
+ pb_1.Message.setField(this, 3, value);
453
+ }
454
+ get amount() {
455
+ return pb_1.Message.getFieldWithDefault(this, 4, "");
456
+ }
457
+ set amount(value) {
458
+ pb_1.Message.setField(this, 4, value);
459
+ }
460
+ get meta() {
461
+ return pb_1.Message.getFieldWithDefault(this, 5, "");
462
+ }
463
+ set meta(value) {
464
+ pb_1.Message.setField(this, 5, value);
465
+ }
466
+ get status() {
467
+ return pb_1.Message.getFieldWithDefault(this, 6, "");
468
+ }
469
+ set status(value) {
470
+ pb_1.Message.setField(this, 6, value);
471
+ }
472
+ get rrn() {
473
+ return pb_1.Message.getFieldWithDefault(this, 7, "");
474
+ }
475
+ set rrn(value) {
476
+ pb_1.Message.setField(this, 7, value);
477
+ }
478
+ get stan() {
479
+ return pb_1.Message.getFieldWithDefault(this, 8, "");
480
+ }
481
+ set stan(value) {
482
+ pb_1.Message.setField(this, 8, value);
483
+ }
484
+ get type() {
485
+ return pb_1.Message.getFieldWithDefault(this, 9, "");
486
+ }
487
+ set type(value) {
488
+ pb_1.Message.setField(this, 9, value);
489
+ }
490
+ get createdAt() {
491
+ return pb_1.Message.getFieldWithDefault(this, 10, "");
492
+ }
493
+ set createdAt(value) {
494
+ pb_1.Message.setField(this, 10, value);
495
+ }
496
+ get updatedAt() {
497
+ return pb_1.Message.getFieldWithDefault(this, 11, "");
498
+ }
499
+ set updatedAt(value) {
500
+ pb_1.Message.setField(this, 11, value);
501
+ }
502
+ static fromObject(data) {
503
+ const message = new PosTransaction({});
504
+ if (data.account != null) {
505
+ message.account = data.account;
506
+ }
507
+ if (data.provider != null) {
508
+ message.provider = data.provider;
509
+ }
510
+ if (data.reference != null) {
511
+ message.reference = data.reference;
512
+ }
513
+ if (data.amount != null) {
514
+ message.amount = data.amount;
515
+ }
516
+ if (data.meta != null) {
517
+ message.meta = data.meta;
518
+ }
519
+ if (data.status != null) {
520
+ message.status = data.status;
521
+ }
522
+ if (data.rrn != null) {
523
+ message.rrn = data.rrn;
524
+ }
525
+ if (data.stan != null) {
526
+ message.stan = data.stan;
527
+ }
528
+ if (data.type != null) {
529
+ message.type = data.type;
530
+ }
531
+ if (data.createdAt != null) {
532
+ message.createdAt = data.createdAt;
533
+ }
534
+ if (data.updatedAt != null) {
535
+ message.updatedAt = data.updatedAt;
536
+ }
537
+ return message;
538
+ }
539
+ toObject() {
540
+ const data = {};
541
+ if (this.account != null) {
542
+ data.account = this.account;
543
+ }
544
+ if (this.provider != null) {
545
+ data.provider = this.provider;
546
+ }
547
+ if (this.reference != null) {
548
+ data.reference = this.reference;
549
+ }
550
+ if (this.amount != null) {
551
+ data.amount = this.amount;
552
+ }
553
+ if (this.meta != null) {
554
+ data.meta = this.meta;
555
+ }
556
+ if (this.status != null) {
557
+ data.status = this.status;
558
+ }
559
+ if (this.rrn != null) {
560
+ data.rrn = this.rrn;
561
+ }
562
+ if (this.stan != null) {
563
+ data.stan = this.stan;
564
+ }
565
+ if (this.type != null) {
566
+ data.type = this.type;
567
+ }
568
+ if (this.createdAt != null) {
569
+ data.createdAt = this.createdAt;
570
+ }
571
+ if (this.updatedAt != null) {
572
+ data.updatedAt = this.updatedAt;
573
+ }
574
+ return data;
575
+ }
576
+ serialize(w) {
577
+ const writer = w || new pb_1.BinaryWriter();
578
+ if (this.account.length)
579
+ writer.writeString(1, this.account);
580
+ if (this.provider.length)
581
+ writer.writeString(2, this.provider);
582
+ if (this.reference.length)
583
+ writer.writeString(3, this.reference);
584
+ if (this.amount.length)
585
+ writer.writeString(4, this.amount);
586
+ if (this.meta.length)
587
+ writer.writeString(5, this.meta);
588
+ if (this.status.length)
589
+ writer.writeString(6, this.status);
590
+ if (this.rrn.length)
591
+ writer.writeString(7, this.rrn);
592
+ if (this.stan.length)
593
+ writer.writeString(8, this.stan);
594
+ if (this.type.length)
595
+ writer.writeString(9, this.type);
596
+ if (this.createdAt.length)
597
+ writer.writeString(10, this.createdAt);
598
+ if (this.updatedAt.length)
599
+ writer.writeString(11, this.updatedAt);
600
+ if (!w)
601
+ return writer.getResultBuffer();
602
+ }
603
+ static deserialize(bytes) {
604
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PosTransaction();
605
+ while (reader.nextField()) {
606
+ if (reader.isEndGroup())
607
+ break;
608
+ switch (reader.getFieldNumber()) {
609
+ case 1:
610
+ message.account = reader.readString();
611
+ break;
612
+ case 2:
613
+ message.provider = reader.readString();
614
+ break;
615
+ case 3:
616
+ message.reference = reader.readString();
617
+ break;
618
+ case 4:
619
+ message.amount = reader.readString();
620
+ break;
621
+ case 5:
622
+ message.meta = reader.readString();
623
+ break;
624
+ case 6:
625
+ message.status = reader.readString();
626
+ break;
627
+ case 7:
628
+ message.rrn = reader.readString();
629
+ break;
630
+ case 8:
631
+ message.stan = reader.readString();
632
+ break;
633
+ case 9:
634
+ message.type = reader.readString();
635
+ break;
636
+ case 10:
637
+ message.createdAt = reader.readString();
638
+ break;
639
+ case 11:
640
+ message.updatedAt = reader.readString();
641
+ break;
642
+ default: reader.skipField();
643
+ }
644
+ }
645
+ return message;
646
+ }
647
+ serializeBinary() {
648
+ return this.serialize();
649
+ }
650
+ static deserializeBinary(bytes) {
651
+ return PosTransaction.deserialize(bytes);
652
+ }
653
+ }
654
+ pos.PosTransaction = PosTransaction;
655
+ class InitiatePOSTransactionResponseData extends pb_1.Message {
656
+ #one_of_decls = [];
657
+ constructor(data) {
658
+ super();
659
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
660
+ if (!Array.isArray(data) && typeof data == "object") {
661
+ if ("rrn" in data && data.rrn != undefined) {
662
+ this.rrn = data.rrn;
663
+ }
664
+ if ("stan" in data && data.stan != undefined) {
665
+ this.stan = data.stan;
666
+ }
667
+ if ("route" in data && data.route != undefined) {
668
+ this.route = data.route;
669
+ }
670
+ }
671
+ }
672
+ get rrn() {
673
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
674
+ }
675
+ set rrn(value) {
676
+ pb_1.Message.setField(this, 1, value);
677
+ }
678
+ get stan() {
679
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
680
+ }
681
+ set stan(value) {
682
+ pb_1.Message.setField(this, 2, value);
683
+ }
684
+ get route() {
685
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
686
+ }
687
+ set route(value) {
688
+ pb_1.Message.setField(this, 3, value);
689
+ }
690
+ static fromObject(data) {
691
+ const message = new InitiatePOSTransactionResponseData({});
692
+ if (data.rrn != null) {
693
+ message.rrn = data.rrn;
694
+ }
695
+ if (data.stan != null) {
696
+ message.stan = data.stan;
697
+ }
698
+ if (data.route != null) {
699
+ message.route = data.route;
700
+ }
701
+ return message;
702
+ }
703
+ toObject() {
704
+ const data = {};
705
+ if (this.rrn != null) {
706
+ data.rrn = this.rrn;
707
+ }
708
+ if (this.stan != null) {
709
+ data.stan = this.stan;
710
+ }
711
+ if (this.route != null) {
712
+ data.route = this.route;
713
+ }
714
+ return data;
715
+ }
716
+ serialize(w) {
717
+ const writer = w || new pb_1.BinaryWriter();
718
+ if (this.rrn.length)
719
+ writer.writeString(1, this.rrn);
720
+ if (this.stan.length)
721
+ writer.writeString(2, this.stan);
722
+ if (this.route.length)
723
+ writer.writeString(3, this.route);
724
+ if (!w)
725
+ return writer.getResultBuffer();
726
+ }
727
+ static deserialize(bytes) {
728
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InitiatePOSTransactionResponseData();
729
+ while (reader.nextField()) {
730
+ if (reader.isEndGroup())
731
+ break;
732
+ switch (reader.getFieldNumber()) {
733
+ case 1:
734
+ message.rrn = reader.readString();
735
+ break;
736
+ case 2:
737
+ message.stan = reader.readString();
738
+ break;
739
+ case 3:
740
+ message.route = reader.readString();
741
+ break;
742
+ default: reader.skipField();
743
+ }
744
+ }
745
+ return message;
746
+ }
747
+ serializeBinary() {
748
+ return this.serialize();
749
+ }
750
+ static deserializeBinary(bytes) {
751
+ return InitiatePOSTransactionResponseData.deserialize(bytes);
752
+ }
753
+ }
754
+ pos.InitiatePOSTransactionResponseData = InitiatePOSTransactionResponseData;
755
+ class InitiatePOSTransactionResponse extends pb_1.Message {
756
+ #one_of_decls = [];
757
+ constructor(data) {
758
+ super();
759
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
760
+ if (!Array.isArray(data) && typeof data == "object") {
761
+ if ("success" in data && data.success != undefined) {
762
+ this.success = data.success;
763
+ }
764
+ if ("status" in data && data.status != undefined) {
765
+ this.status = data.status;
766
+ }
767
+ if ("message" in data && data.message != undefined) {
768
+ this.message = data.message;
769
+ }
770
+ if ("data" in data && data.data != undefined) {
771
+ this.data = data.data;
772
+ }
773
+ if ("errors" in data && data.errors != undefined) {
774
+ this.errors = data.errors;
775
+ }
776
+ }
777
+ }
778
+ get success() {
779
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
780
+ }
781
+ set success(value) {
782
+ pb_1.Message.setField(this, 1, value);
783
+ }
784
+ get status() {
785
+ return pb_1.Message.getFieldWithDefault(this, 2, 0);
786
+ }
787
+ set status(value) {
788
+ pb_1.Message.setField(this, 2, value);
789
+ }
790
+ get message() {
791
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
792
+ }
793
+ set message(value) {
794
+ pb_1.Message.setField(this, 3, value);
795
+ }
796
+ get data() {
797
+ return pb_1.Message.getWrapperField(this, InitiatePOSTransactionResponseData, 4);
798
+ }
799
+ set data(value) {
800
+ pb_1.Message.setWrapperField(this, 4, value);
801
+ }
802
+ get hasData() {
803
+ return pb_1.Message.getField(this, 4) != null;
804
+ }
805
+ get errors() {
806
+ return pb_1.Message.getWrapperField(this, ValidationErrors, 5);
807
+ }
808
+ set errors(value) {
809
+ pb_1.Message.setWrapperField(this, 5, value);
810
+ }
811
+ get hasErrors() {
812
+ return pb_1.Message.getField(this, 5) != null;
813
+ }
814
+ static fromObject(data) {
815
+ const message = new InitiatePOSTransactionResponse({});
816
+ if (data.success != null) {
817
+ message.success = data.success;
818
+ }
819
+ if (data.status != null) {
820
+ message.status = data.status;
821
+ }
822
+ if (data.message != null) {
823
+ message.message = data.message;
824
+ }
825
+ if (data.data != null) {
826
+ message.data = InitiatePOSTransactionResponseData.fromObject(data.data);
827
+ }
828
+ if (data.errors != null) {
829
+ message.errors = ValidationErrors.fromObject(data.errors);
830
+ }
831
+ return message;
832
+ }
833
+ toObject() {
834
+ const data = {};
835
+ if (this.success != null) {
836
+ data.success = this.success;
837
+ }
838
+ if (this.status != null) {
839
+ data.status = this.status;
840
+ }
841
+ if (this.message != null) {
842
+ data.message = this.message;
843
+ }
844
+ if (this.data != null) {
845
+ data.data = this.data.toObject();
846
+ }
847
+ if (this.errors != null) {
848
+ data.errors = this.errors.toObject();
849
+ }
850
+ return data;
851
+ }
852
+ serialize(w) {
853
+ const writer = w || new pb_1.BinaryWriter();
854
+ if (this.success != false)
855
+ writer.writeBool(1, this.success);
856
+ if (this.status != 0)
857
+ writer.writeUint32(2, this.status);
858
+ if (this.message.length)
859
+ writer.writeString(3, this.message);
860
+ if (this.hasData)
861
+ writer.writeMessage(4, this.data, () => this.data.serialize(writer));
862
+ if (this.hasErrors)
863
+ writer.writeMessage(5, this.errors, () => this.errors.serialize(writer));
864
+ if (!w)
865
+ return writer.getResultBuffer();
866
+ }
867
+ static deserialize(bytes) {
868
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new InitiatePOSTransactionResponse();
869
+ while (reader.nextField()) {
870
+ if (reader.isEndGroup())
871
+ break;
872
+ switch (reader.getFieldNumber()) {
873
+ case 1:
874
+ message.success = reader.readBool();
875
+ break;
876
+ case 2:
877
+ message.status = reader.readUint32();
878
+ break;
879
+ case 3:
880
+ message.message = reader.readString();
881
+ break;
882
+ case 4:
883
+ reader.readMessage(message.data, () => message.data = InitiatePOSTransactionResponseData.deserialize(reader));
884
+ break;
885
+ case 5:
886
+ reader.readMessage(message.errors, () => message.errors = ValidationErrors.deserialize(reader));
887
+ break;
888
+ default: reader.skipField();
889
+ }
890
+ }
891
+ return message;
892
+ }
893
+ serializeBinary() {
894
+ return this.serialize();
895
+ }
896
+ static deserializeBinary(bytes) {
897
+ return InitiatePOSTransactionResponse.deserialize(bytes);
898
+ }
899
+ }
900
+ pos.InitiatePOSTransactionResponse = InitiatePOSTransactionResponse;
901
+ class DefaultResponse extends pb_1.Message {
902
+ #one_of_decls = [];
903
+ constructor(data) {
904
+ super();
905
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
906
+ if (!Array.isArray(data) && typeof data == "object") {
907
+ if ("success" in data && data.success != undefined) {
908
+ this.success = data.success;
909
+ }
910
+ if ("status" in data && data.status != undefined) {
911
+ this.status = data.status;
912
+ }
913
+ if ("message" in data && data.message != undefined) {
914
+ this.message = data.message;
915
+ }
916
+ if ("data" in data && data.data != undefined) {
917
+ this.data = data.data;
918
+ }
919
+ if ("errors" in data && data.errors != undefined) {
920
+ this.errors = data.errors;
921
+ }
922
+ }
923
+ }
924
+ get success() {
925
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
926
+ }
927
+ set success(value) {
928
+ pb_1.Message.setField(this, 1, value);
929
+ }
930
+ get status() {
931
+ return pb_1.Message.getFieldWithDefault(this, 2, 0);
932
+ }
933
+ set status(value) {
934
+ pb_1.Message.setField(this, 2, value);
935
+ }
936
+ get message() {
937
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
938
+ }
939
+ set message(value) {
940
+ pb_1.Message.setField(this, 3, value);
941
+ }
942
+ get data() {
943
+ return pb_1.Message.getWrapperField(this, PosTransaction, 4);
944
+ }
945
+ set data(value) {
946
+ pb_1.Message.setWrapperField(this, 4, value);
947
+ }
948
+ get hasData() {
949
+ return pb_1.Message.getField(this, 4) != null;
950
+ }
951
+ get errors() {
952
+ return pb_1.Message.getWrapperField(this, ValidationErrors, 5);
953
+ }
954
+ set errors(value) {
955
+ pb_1.Message.setWrapperField(this, 5, value);
956
+ }
957
+ get hasErrors() {
958
+ return pb_1.Message.getField(this, 5) != null;
959
+ }
960
+ static fromObject(data) {
961
+ const message = new DefaultResponse({});
962
+ if (data.success != null) {
963
+ message.success = data.success;
964
+ }
965
+ if (data.status != null) {
966
+ message.status = data.status;
967
+ }
968
+ if (data.message != null) {
969
+ message.message = data.message;
970
+ }
971
+ if (data.data != null) {
972
+ message.data = PosTransaction.fromObject(data.data);
973
+ }
974
+ if (data.errors != null) {
975
+ message.errors = ValidationErrors.fromObject(data.errors);
976
+ }
977
+ return message;
978
+ }
979
+ toObject() {
980
+ const data = {};
981
+ if (this.success != null) {
982
+ data.success = this.success;
983
+ }
984
+ if (this.status != null) {
985
+ data.status = this.status;
986
+ }
987
+ if (this.message != null) {
988
+ data.message = this.message;
989
+ }
990
+ if (this.data != null) {
991
+ data.data = this.data.toObject();
992
+ }
993
+ if (this.errors != null) {
994
+ data.errors = this.errors.toObject();
995
+ }
996
+ return data;
997
+ }
998
+ serialize(w) {
999
+ const writer = w || new pb_1.BinaryWriter();
1000
+ if (this.success != false)
1001
+ writer.writeBool(1, this.success);
1002
+ if (this.status != 0)
1003
+ writer.writeUint32(2, this.status);
1004
+ if (this.message.length)
1005
+ writer.writeString(3, this.message);
1006
+ if (this.hasData)
1007
+ writer.writeMessage(4, this.data, () => this.data.serialize(writer));
1008
+ if (this.hasErrors)
1009
+ writer.writeMessage(5, this.errors, () => this.errors.serialize(writer));
1010
+ if (!w)
1011
+ return writer.getResultBuffer();
1012
+ }
1013
+ static deserialize(bytes) {
1014
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DefaultResponse();
1015
+ while (reader.nextField()) {
1016
+ if (reader.isEndGroup())
1017
+ break;
1018
+ switch (reader.getFieldNumber()) {
1019
+ case 1:
1020
+ message.success = reader.readBool();
1021
+ break;
1022
+ case 2:
1023
+ message.status = reader.readUint32();
1024
+ break;
1025
+ case 3:
1026
+ message.message = reader.readString();
1027
+ break;
1028
+ case 4:
1029
+ reader.readMessage(message.data, () => message.data = PosTransaction.deserialize(reader));
1030
+ break;
1031
+ case 5:
1032
+ reader.readMessage(message.errors, () => message.errors = ValidationErrors.deserialize(reader));
1033
+ break;
1034
+ default: reader.skipField();
1035
+ }
1036
+ }
1037
+ return message;
1038
+ }
1039
+ serializeBinary() {
1040
+ return this.serialize();
1041
+ }
1042
+ static deserializeBinary(bytes) {
1043
+ return DefaultResponse.deserialize(bytes);
1044
+ }
1045
+ }
1046
+ pos.DefaultResponse = DefaultResponse;
1047
+ class QueryTransactionsRequest extends pb_1.Message {
1048
+ #one_of_decls = [];
1049
+ constructor(data) {
1050
+ super();
1051
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
1052
+ if (!Array.isArray(data) && typeof data == "object") {
1053
+ if ("accountId" in data && data.accountId != undefined) {
1054
+ this.accountId = data.accountId;
1055
+ }
1056
+ if ("startDate" in data && data.startDate != undefined) {
1057
+ this.startDate = data.startDate;
1058
+ }
1059
+ if ("endDate" in data && data.endDate != undefined) {
1060
+ this.endDate = data.endDate;
1061
+ }
1062
+ if ("rrn" in data && data.rrn != undefined) {
1063
+ this.rrn = data.rrn;
1064
+ }
1065
+ if ("amount" in data && data.amount != undefined) {
1066
+ this.amount = data.amount;
1067
+ }
1068
+ if ("type" in data && data.type != undefined) {
1069
+ this.type = data.type;
1070
+ }
1071
+ }
1072
+ }
1073
+ get accountId() {
1074
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
1075
+ }
1076
+ set accountId(value) {
1077
+ pb_1.Message.setField(this, 1, value);
1078
+ }
1079
+ get startDate() {
1080
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
1081
+ }
1082
+ set startDate(value) {
1083
+ pb_1.Message.setField(this, 2, value);
1084
+ }
1085
+ get endDate() {
1086
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
1087
+ }
1088
+ set endDate(value) {
1089
+ pb_1.Message.setField(this, 3, value);
1090
+ }
1091
+ get rrn() {
1092
+ return pb_1.Message.getFieldWithDefault(this, 4, "");
1093
+ }
1094
+ set rrn(value) {
1095
+ pb_1.Message.setField(this, 4, value);
1096
+ }
1097
+ get amount() {
1098
+ return pb_1.Message.getFieldWithDefault(this, 5, "");
1099
+ }
1100
+ set amount(value) {
1101
+ pb_1.Message.setField(this, 5, value);
1102
+ }
1103
+ get type() {
1104
+ return pb_1.Message.getFieldWithDefault(this, 6, "");
1105
+ }
1106
+ set type(value) {
1107
+ pb_1.Message.setField(this, 6, value);
1108
+ }
1109
+ static fromObject(data) {
1110
+ const message = new QueryTransactionsRequest({});
1111
+ if (data.accountId != null) {
1112
+ message.accountId = data.accountId;
1113
+ }
1114
+ if (data.startDate != null) {
1115
+ message.startDate = data.startDate;
1116
+ }
1117
+ if (data.endDate != null) {
1118
+ message.endDate = data.endDate;
1119
+ }
1120
+ if (data.rrn != null) {
1121
+ message.rrn = data.rrn;
1122
+ }
1123
+ if (data.amount != null) {
1124
+ message.amount = data.amount;
1125
+ }
1126
+ if (data.type != null) {
1127
+ message.type = data.type;
1128
+ }
1129
+ return message;
1130
+ }
1131
+ toObject() {
1132
+ const data = {};
1133
+ if (this.accountId != null) {
1134
+ data.accountId = this.accountId;
1135
+ }
1136
+ if (this.startDate != null) {
1137
+ data.startDate = this.startDate;
1138
+ }
1139
+ if (this.endDate != null) {
1140
+ data.endDate = this.endDate;
1141
+ }
1142
+ if (this.rrn != null) {
1143
+ data.rrn = this.rrn;
1144
+ }
1145
+ if (this.amount != null) {
1146
+ data.amount = this.amount;
1147
+ }
1148
+ if (this.type != null) {
1149
+ data.type = this.type;
1150
+ }
1151
+ return data;
1152
+ }
1153
+ serialize(w) {
1154
+ const writer = w || new pb_1.BinaryWriter();
1155
+ if (this.accountId.length)
1156
+ writer.writeString(1, this.accountId);
1157
+ if (this.startDate.length)
1158
+ writer.writeString(2, this.startDate);
1159
+ if (this.endDate.length)
1160
+ writer.writeString(3, this.endDate);
1161
+ if (this.rrn.length)
1162
+ writer.writeString(4, this.rrn);
1163
+ if (this.amount.length)
1164
+ writer.writeString(5, this.amount);
1165
+ if (this.type.length)
1166
+ writer.writeString(6, this.type);
1167
+ if (!w)
1168
+ return writer.getResultBuffer();
1169
+ }
1170
+ static deserialize(bytes) {
1171
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryTransactionsRequest();
1172
+ while (reader.nextField()) {
1173
+ if (reader.isEndGroup())
1174
+ break;
1175
+ switch (reader.getFieldNumber()) {
1176
+ case 1:
1177
+ message.accountId = reader.readString();
1178
+ break;
1179
+ case 2:
1180
+ message.startDate = reader.readString();
1181
+ break;
1182
+ case 3:
1183
+ message.endDate = reader.readString();
1184
+ break;
1185
+ case 4:
1186
+ message.rrn = reader.readString();
1187
+ break;
1188
+ case 5:
1189
+ message.amount = reader.readString();
1190
+ break;
1191
+ case 6:
1192
+ message.type = reader.readString();
1193
+ break;
1194
+ default: reader.skipField();
1195
+ }
1196
+ }
1197
+ return message;
1198
+ }
1199
+ serializeBinary() {
1200
+ return this.serialize();
1201
+ }
1202
+ static deserializeBinary(bytes) {
1203
+ return QueryTransactionsRequest.deserialize(bytes);
1204
+ }
1205
+ }
1206
+ pos.QueryTransactionsRequest = QueryTransactionsRequest;
1207
+ class GetTransactionRequest extends pb_1.Message {
1208
+ #one_of_decls = [];
1209
+ constructor(data) {
1210
+ super();
1211
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
1212
+ if (!Array.isArray(data) && typeof data == "object") {
1213
+ if ("accountId" in data && data.accountId != undefined) {
1214
+ this.accountId = data.accountId;
1215
+ }
1216
+ if ("rrn" in data && data.rrn != undefined) {
1217
+ this.rrn = data.rrn;
1218
+ }
1219
+ if ("type" in data && data.type != undefined) {
1220
+ this.type = data.type;
1221
+ }
1222
+ }
1223
+ }
1224
+ get accountId() {
1225
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
1226
+ }
1227
+ set accountId(value) {
1228
+ pb_1.Message.setField(this, 1, value);
1229
+ }
1230
+ get rrn() {
1231
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
1232
+ }
1233
+ set rrn(value) {
1234
+ pb_1.Message.setField(this, 2, value);
1235
+ }
1236
+ get type() {
1237
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
1238
+ }
1239
+ set type(value) {
1240
+ pb_1.Message.setField(this, 3, value);
1241
+ }
1242
+ static fromObject(data) {
1243
+ const message = new GetTransactionRequest({});
1244
+ if (data.accountId != null) {
1245
+ message.accountId = data.accountId;
1246
+ }
1247
+ if (data.rrn != null) {
1248
+ message.rrn = data.rrn;
1249
+ }
1250
+ if (data.type != null) {
1251
+ message.type = data.type;
1252
+ }
1253
+ return message;
1254
+ }
1255
+ toObject() {
1256
+ const data = {};
1257
+ if (this.accountId != null) {
1258
+ data.accountId = this.accountId;
1259
+ }
1260
+ if (this.rrn != null) {
1261
+ data.rrn = this.rrn;
1262
+ }
1263
+ if (this.type != null) {
1264
+ data.type = this.type;
1265
+ }
1266
+ return data;
1267
+ }
1268
+ serialize(w) {
1269
+ const writer = w || new pb_1.BinaryWriter();
1270
+ if (this.accountId.length)
1271
+ writer.writeString(1, this.accountId);
1272
+ if (this.rrn.length)
1273
+ writer.writeString(2, this.rrn);
1274
+ if (this.type.length)
1275
+ writer.writeString(3, this.type);
1276
+ if (!w)
1277
+ return writer.getResultBuffer();
1278
+ }
1279
+ static deserialize(bytes) {
1280
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTransactionRequest();
1281
+ while (reader.nextField()) {
1282
+ if (reader.isEndGroup())
1283
+ break;
1284
+ switch (reader.getFieldNumber()) {
1285
+ case 1:
1286
+ message.accountId = reader.readString();
1287
+ break;
1288
+ case 2:
1289
+ message.rrn = reader.readString();
1290
+ break;
1291
+ case 3:
1292
+ message.type = reader.readString();
1293
+ break;
1294
+ default: reader.skipField();
1295
+ }
1296
+ }
1297
+ return message;
1298
+ }
1299
+ serializeBinary() {
1300
+ return this.serialize();
1301
+ }
1302
+ static deserializeBinary(bytes) {
1303
+ return GetTransactionRequest.deserialize(bytes);
1304
+ }
1305
+ }
1306
+ pos.GetTransactionRequest = GetTransactionRequest;
1307
+ class TransactionResponse extends pb_1.Message {
1308
+ #one_of_decls = [];
1309
+ constructor(data) {
1310
+ super();
1311
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
1312
+ if (!Array.isArray(data) && typeof data == "object") {
1313
+ if ("success" in data && data.success != undefined) {
1314
+ this.success = data.success;
1315
+ }
1316
+ if ("status" in data && data.status != undefined) {
1317
+ this.status = data.status;
1318
+ }
1319
+ if ("message" in data && data.message != undefined) {
1320
+ this.message = data.message;
1321
+ }
1322
+ if ("data" in data && data.data != undefined) {
1323
+ this.data = data.data;
1324
+ }
1325
+ if ("errors" in data && data.errors != undefined) {
1326
+ this.errors = data.errors;
1327
+ }
1328
+ }
1329
+ }
1330
+ get success() {
1331
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
1332
+ }
1333
+ set success(value) {
1334
+ pb_1.Message.setField(this, 1, value);
1335
+ }
1336
+ get status() {
1337
+ return pb_1.Message.getFieldWithDefault(this, 2, 0);
1338
+ }
1339
+ set status(value) {
1340
+ pb_1.Message.setField(this, 2, value);
1341
+ }
1342
+ get message() {
1343
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
1344
+ }
1345
+ set message(value) {
1346
+ pb_1.Message.setField(this, 3, value);
1347
+ }
1348
+ get data() {
1349
+ return pb_1.Message.getWrapperField(this, PosTransaction, 4);
1350
+ }
1351
+ set data(value) {
1352
+ pb_1.Message.setWrapperField(this, 4, value);
1353
+ }
1354
+ get hasData() {
1355
+ return pb_1.Message.getField(this, 4) != null;
1356
+ }
1357
+ get errors() {
1358
+ return pb_1.Message.getWrapperField(this, ValidationErrors, 5);
1359
+ }
1360
+ set errors(value) {
1361
+ pb_1.Message.setWrapperField(this, 5, value);
1362
+ }
1363
+ get hasErrors() {
1364
+ return pb_1.Message.getField(this, 5) != null;
1365
+ }
1366
+ static fromObject(data) {
1367
+ const message = new TransactionResponse({});
1368
+ if (data.success != null) {
1369
+ message.success = data.success;
1370
+ }
1371
+ if (data.status != null) {
1372
+ message.status = data.status;
1373
+ }
1374
+ if (data.message != null) {
1375
+ message.message = data.message;
1376
+ }
1377
+ if (data.data != null) {
1378
+ message.data = PosTransaction.fromObject(data.data);
1379
+ }
1380
+ if (data.errors != null) {
1381
+ message.errors = ValidationErrors.fromObject(data.errors);
1382
+ }
1383
+ return message;
1384
+ }
1385
+ toObject() {
1386
+ const data = {};
1387
+ if (this.success != null) {
1388
+ data.success = this.success;
1389
+ }
1390
+ if (this.status != null) {
1391
+ data.status = this.status;
1392
+ }
1393
+ if (this.message != null) {
1394
+ data.message = this.message;
1395
+ }
1396
+ if (this.data != null) {
1397
+ data.data = this.data.toObject();
1398
+ }
1399
+ if (this.errors != null) {
1400
+ data.errors = this.errors.toObject();
1401
+ }
1402
+ return data;
1403
+ }
1404
+ serialize(w) {
1405
+ const writer = w || new pb_1.BinaryWriter();
1406
+ if (this.success != false)
1407
+ writer.writeBool(1, this.success);
1408
+ if (this.status != 0)
1409
+ writer.writeUint32(2, this.status);
1410
+ if (this.message.length)
1411
+ writer.writeString(3, this.message);
1412
+ if (this.hasData)
1413
+ writer.writeMessage(4, this.data, () => this.data.serialize(writer));
1414
+ if (this.hasErrors)
1415
+ writer.writeMessage(5, this.errors, () => this.errors.serialize(writer));
1416
+ if (!w)
1417
+ return writer.getResultBuffer();
1418
+ }
1419
+ static deserialize(bytes) {
1420
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionResponse();
1421
+ while (reader.nextField()) {
1422
+ if (reader.isEndGroup())
1423
+ break;
1424
+ switch (reader.getFieldNumber()) {
1425
+ case 1:
1426
+ message.success = reader.readBool();
1427
+ break;
1428
+ case 2:
1429
+ message.status = reader.readUint32();
1430
+ break;
1431
+ case 3:
1432
+ message.message = reader.readString();
1433
+ break;
1434
+ case 4:
1435
+ reader.readMessage(message.data, () => message.data = PosTransaction.deserialize(reader));
1436
+ break;
1437
+ case 5:
1438
+ reader.readMessage(message.errors, () => message.errors = ValidationErrors.deserialize(reader));
1439
+ break;
1440
+ default: reader.skipField();
1441
+ }
1442
+ }
1443
+ return message;
1444
+ }
1445
+ serializeBinary() {
1446
+ return this.serialize();
1447
+ }
1448
+ static deserializeBinary(bytes) {
1449
+ return TransactionResponse.deserialize(bytes);
1450
+ }
1451
+ }
1452
+ pos.TransactionResponse = TransactionResponse;
1453
+ class TransactionsResponse extends pb_1.Message {
1454
+ #one_of_decls = [];
1455
+ constructor(data) {
1456
+ super();
1457
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls);
1458
+ if (!Array.isArray(data) && typeof data == "object") {
1459
+ if ("success" in data && data.success != undefined) {
1460
+ this.success = data.success;
1461
+ }
1462
+ if ("status" in data && data.status != undefined) {
1463
+ this.status = data.status;
1464
+ }
1465
+ if ("message" in data && data.message != undefined) {
1466
+ this.message = data.message;
1467
+ }
1468
+ if ("data" in data && data.data != undefined) {
1469
+ this.data = data.data;
1470
+ }
1471
+ if ("errors" in data && data.errors != undefined) {
1472
+ this.errors = data.errors;
1473
+ }
1474
+ }
1475
+ }
1476
+ get success() {
1477
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
1478
+ }
1479
+ set success(value) {
1480
+ pb_1.Message.setField(this, 1, value);
1481
+ }
1482
+ get status() {
1483
+ return pb_1.Message.getFieldWithDefault(this, 2, 0);
1484
+ }
1485
+ set status(value) {
1486
+ pb_1.Message.setField(this, 2, value);
1487
+ }
1488
+ get message() {
1489
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
1490
+ }
1491
+ set message(value) {
1492
+ pb_1.Message.setField(this, 3, value);
1493
+ }
1494
+ get data() {
1495
+ return pb_1.Message.getRepeatedWrapperField(this, PosTransaction, 4);
1496
+ }
1497
+ set data(value) {
1498
+ pb_1.Message.setRepeatedWrapperField(this, 4, value);
1499
+ }
1500
+ get errors() {
1501
+ return pb_1.Message.getWrapperField(this, ValidationErrors, 5);
1502
+ }
1503
+ set errors(value) {
1504
+ pb_1.Message.setWrapperField(this, 5, value);
1505
+ }
1506
+ get hasErrors() {
1507
+ return pb_1.Message.getField(this, 5) != null;
1508
+ }
1509
+ static fromObject(data) {
1510
+ const message = new TransactionsResponse({});
1511
+ if (data.success != null) {
1512
+ message.success = data.success;
1513
+ }
1514
+ if (data.status != null) {
1515
+ message.status = data.status;
1516
+ }
1517
+ if (data.message != null) {
1518
+ message.message = data.message;
1519
+ }
1520
+ if (data.data != null) {
1521
+ message.data = data.data.map(item => PosTransaction.fromObject(item));
1522
+ }
1523
+ if (data.errors != null) {
1524
+ message.errors = ValidationErrors.fromObject(data.errors);
1525
+ }
1526
+ return message;
1527
+ }
1528
+ toObject() {
1529
+ const data = {};
1530
+ if (this.success != null) {
1531
+ data.success = this.success;
1532
+ }
1533
+ if (this.status != null) {
1534
+ data.status = this.status;
1535
+ }
1536
+ if (this.message != null) {
1537
+ data.message = this.message;
1538
+ }
1539
+ if (this.data != null) {
1540
+ data.data = this.data.map((item) => item.toObject());
1541
+ }
1542
+ if (this.errors != null) {
1543
+ data.errors = this.errors.toObject();
1544
+ }
1545
+ return data;
1546
+ }
1547
+ serialize(w) {
1548
+ const writer = w || new pb_1.BinaryWriter();
1549
+ if (this.success != false)
1550
+ writer.writeBool(1, this.success);
1551
+ if (this.status != 0)
1552
+ writer.writeUint32(2, this.status);
1553
+ if (this.message.length)
1554
+ writer.writeString(3, this.message);
1555
+ if (this.data.length)
1556
+ writer.writeRepeatedMessage(4, this.data, (item) => item.serialize(writer));
1557
+ if (this.hasErrors)
1558
+ writer.writeMessage(5, this.errors, () => this.errors.serialize(writer));
1559
+ if (!w)
1560
+ return writer.getResultBuffer();
1561
+ }
1562
+ static deserialize(bytes) {
1563
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionsResponse();
1564
+ while (reader.nextField()) {
1565
+ if (reader.isEndGroup())
1566
+ break;
1567
+ switch (reader.getFieldNumber()) {
1568
+ case 1:
1569
+ message.success = reader.readBool();
1570
+ break;
1571
+ case 2:
1572
+ message.status = reader.readUint32();
1573
+ break;
1574
+ case 3:
1575
+ message.message = reader.readString();
1576
+ break;
1577
+ case 4:
1578
+ reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 4, PosTransaction.deserialize(reader), PosTransaction));
1579
+ break;
1580
+ case 5:
1581
+ reader.readMessage(message.errors, () => message.errors = ValidationErrors.deserialize(reader));
1582
+ break;
1583
+ default: reader.skipField();
1584
+ }
1585
+ }
1586
+ return message;
1587
+ }
1588
+ serializeBinary() {
1589
+ return this.serialize();
1590
+ }
1591
+ static deserializeBinary(bytes) {
1592
+ return TransactionsResponse.deserialize(bytes);
1593
+ }
1594
+ }
1595
+ pos.TransactionsResponse = TransactionsResponse;
1596
+ class SaveReversalTransactionRequest extends pb_1.Message {
1597
+ #one_of_decls = [];
1598
+ constructor(data) {
1599
+ super();
1600
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
1601
+ if (!Array.isArray(data) && typeof data == "object") {
1602
+ if ("accountId" in data && data.accountId != undefined) {
1603
+ this.accountId = data.accountId;
1604
+ }
1605
+ if ("businessId" in data && data.businessId != undefined) {
1606
+ this.businessId = data.businessId;
1607
+ }
1608
+ if ("terminalId" in data && data.terminalId != undefined) {
1609
+ this.terminalId = data.terminalId;
1610
+ }
1611
+ if ("amount" in data && data.amount != undefined) {
1612
+ this.amount = data.amount;
1613
+ }
1614
+ if ("meta" in data && data.meta != undefined) {
1615
+ this.meta = data.meta;
1616
+ }
1617
+ if ("rrn" in data && data.rrn != undefined) {
1618
+ this.rrn = data.rrn;
1619
+ }
1620
+ if ("stan" in data && data.stan != undefined) {
1621
+ this.stan = data.stan;
1622
+ }
1623
+ if ("type" in data && data.type != undefined) {
1624
+ this.type = data.type;
1625
+ }
1626
+ }
1627
+ }
1628
+ get accountId() {
1629
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
1630
+ }
1631
+ set accountId(value) {
1632
+ pb_1.Message.setField(this, 1, value);
1633
+ }
1634
+ get businessId() {
1635
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
1636
+ }
1637
+ set businessId(value) {
1638
+ pb_1.Message.setField(this, 2, value);
1639
+ }
1640
+ get terminalId() {
1641
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
1642
+ }
1643
+ set terminalId(value) {
1644
+ pb_1.Message.setField(this, 3, value);
1645
+ }
1646
+ get amount() {
1647
+ return pb_1.Message.getFieldWithDefault(this, 4, 0);
1648
+ }
1649
+ set amount(value) {
1650
+ pb_1.Message.setField(this, 4, value);
1651
+ }
1652
+ get meta() {
1653
+ return pb_1.Message.getFieldWithDefault(this, 5, "");
1654
+ }
1655
+ set meta(value) {
1656
+ pb_1.Message.setField(this, 5, value);
1657
+ }
1658
+ get rrn() {
1659
+ return pb_1.Message.getFieldWithDefault(this, 6, "");
1660
+ }
1661
+ set rrn(value) {
1662
+ pb_1.Message.setField(this, 6, value);
1663
+ }
1664
+ get stan() {
1665
+ return pb_1.Message.getFieldWithDefault(this, 7, "");
1666
+ }
1667
+ set stan(value) {
1668
+ pb_1.Message.setField(this, 7, value);
1669
+ }
1670
+ get type() {
1671
+ return pb_1.Message.getFieldWithDefault(this, 8, "");
1672
+ }
1673
+ set type(value) {
1674
+ pb_1.Message.setField(this, 8, value);
1675
+ }
1676
+ static fromObject(data) {
1677
+ const message = new SaveReversalTransactionRequest({});
1678
+ if (data.accountId != null) {
1679
+ message.accountId = data.accountId;
1680
+ }
1681
+ if (data.businessId != null) {
1682
+ message.businessId = data.businessId;
1683
+ }
1684
+ if (data.terminalId != null) {
1685
+ message.terminalId = data.terminalId;
1686
+ }
1687
+ if (data.amount != null) {
1688
+ message.amount = data.amount;
1689
+ }
1690
+ if (data.meta != null) {
1691
+ message.meta = data.meta;
1692
+ }
1693
+ if (data.rrn != null) {
1694
+ message.rrn = data.rrn;
1695
+ }
1696
+ if (data.stan != null) {
1697
+ message.stan = data.stan;
1698
+ }
1699
+ if (data.type != null) {
1700
+ message.type = data.type;
1701
+ }
1702
+ return message;
1703
+ }
1704
+ toObject() {
1705
+ const data = {};
1706
+ if (this.accountId != null) {
1707
+ data.accountId = this.accountId;
1708
+ }
1709
+ if (this.businessId != null) {
1710
+ data.businessId = this.businessId;
1711
+ }
1712
+ if (this.terminalId != null) {
1713
+ data.terminalId = this.terminalId;
1714
+ }
1715
+ if (this.amount != null) {
1716
+ data.amount = this.amount;
1717
+ }
1718
+ if (this.meta != null) {
1719
+ data.meta = this.meta;
1720
+ }
1721
+ if (this.rrn != null) {
1722
+ data.rrn = this.rrn;
1723
+ }
1724
+ if (this.stan != null) {
1725
+ data.stan = this.stan;
1726
+ }
1727
+ if (this.type != null) {
1728
+ data.type = this.type;
1729
+ }
1730
+ return data;
1731
+ }
1732
+ serialize(w) {
1733
+ const writer = w || new pb_1.BinaryWriter();
1734
+ if (this.accountId.length)
1735
+ writer.writeString(1, this.accountId);
1736
+ if (this.businessId.length)
1737
+ writer.writeString(2, this.businessId);
1738
+ if (this.terminalId.length)
1739
+ writer.writeString(3, this.terminalId);
1740
+ if (this.amount != 0)
1741
+ writer.writeDouble(4, this.amount);
1742
+ if (this.meta.length)
1743
+ writer.writeString(5, this.meta);
1744
+ if (this.rrn.length)
1745
+ writer.writeString(6, this.rrn);
1746
+ if (this.stan.length)
1747
+ writer.writeString(7, this.stan);
1748
+ if (this.type.length)
1749
+ writer.writeString(8, this.type);
1750
+ if (!w)
1751
+ return writer.getResultBuffer();
1752
+ }
1753
+ static deserialize(bytes) {
1754
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SaveReversalTransactionRequest();
1755
+ while (reader.nextField()) {
1756
+ if (reader.isEndGroup())
1757
+ break;
1758
+ switch (reader.getFieldNumber()) {
1759
+ case 1:
1760
+ message.accountId = reader.readString();
1761
+ break;
1762
+ case 2:
1763
+ message.businessId = reader.readString();
1764
+ break;
1765
+ case 3:
1766
+ message.terminalId = reader.readString();
1767
+ break;
1768
+ case 4:
1769
+ message.amount = reader.readDouble();
1770
+ break;
1771
+ case 5:
1772
+ message.meta = reader.readString();
1773
+ break;
1774
+ case 6:
1775
+ message.rrn = reader.readString();
1776
+ break;
1777
+ case 7:
1778
+ message.stan = reader.readString();
1779
+ break;
1780
+ case 8:
1781
+ message.type = reader.readString();
1782
+ break;
1783
+ default: reader.skipField();
1784
+ }
1785
+ }
1786
+ return message;
1787
+ }
1788
+ serializeBinary() {
1789
+ return this.serialize();
1790
+ }
1791
+ static deserializeBinary(bytes) {
1792
+ return SaveReversalTransactionRequest.deserialize(bytes);
1793
+ }
1794
+ }
1795
+ pos.SaveReversalTransactionRequest = SaveReversalTransactionRequest;
1796
+ class DeleteReversalTransactionRequest extends pb_1.Message {
1797
+ #one_of_decls = [];
1798
+ constructor(data) {
1799
+ super();
1800
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
1801
+ if (!Array.isArray(data) && typeof data == "object") {
1802
+ if ("accountId" in data && data.accountId != undefined) {
1803
+ this.accountId = data.accountId;
1804
+ }
1805
+ if ("rrn" in data && data.rrn != undefined) {
1806
+ this.rrn = data.rrn;
1807
+ }
1808
+ if ("type" in data && data.type != undefined) {
1809
+ this.type = data.type;
1810
+ }
1811
+ }
1812
+ }
1813
+ get accountId() {
1814
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
1815
+ }
1816
+ set accountId(value) {
1817
+ pb_1.Message.setField(this, 1, value);
1818
+ }
1819
+ get rrn() {
1820
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
1821
+ }
1822
+ set rrn(value) {
1823
+ pb_1.Message.setField(this, 2, value);
1824
+ }
1825
+ get type() {
1826
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
1827
+ }
1828
+ set type(value) {
1829
+ pb_1.Message.setField(this, 3, value);
1830
+ }
1831
+ static fromObject(data) {
1832
+ const message = new DeleteReversalTransactionRequest({});
1833
+ if (data.accountId != null) {
1834
+ message.accountId = data.accountId;
1835
+ }
1836
+ if (data.rrn != null) {
1837
+ message.rrn = data.rrn;
1838
+ }
1839
+ if (data.type != null) {
1840
+ message.type = data.type;
1841
+ }
1842
+ return message;
1843
+ }
1844
+ toObject() {
1845
+ const data = {};
1846
+ if (this.accountId != null) {
1847
+ data.accountId = this.accountId;
1848
+ }
1849
+ if (this.rrn != null) {
1850
+ data.rrn = this.rrn;
1851
+ }
1852
+ if (this.type != null) {
1853
+ data.type = this.type;
1854
+ }
1855
+ return data;
1856
+ }
1857
+ serialize(w) {
1858
+ const writer = w || new pb_1.BinaryWriter();
1859
+ if (this.accountId.length)
1860
+ writer.writeString(1, this.accountId);
1861
+ if (this.rrn.length)
1862
+ writer.writeString(2, this.rrn);
1863
+ if (this.type.length)
1864
+ writer.writeString(3, this.type);
1865
+ if (!w)
1866
+ return writer.getResultBuffer();
1867
+ }
1868
+ static deserialize(bytes) {
1869
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteReversalTransactionRequest();
1870
+ while (reader.nextField()) {
1871
+ if (reader.isEndGroup())
1872
+ break;
1873
+ switch (reader.getFieldNumber()) {
1874
+ case 1:
1875
+ message.accountId = reader.readString();
1876
+ break;
1877
+ case 2:
1878
+ message.rrn = reader.readString();
1879
+ break;
1880
+ case 3:
1881
+ message.type = reader.readString();
1882
+ break;
1883
+ default: reader.skipField();
1884
+ }
1885
+ }
1886
+ return message;
1887
+ }
1888
+ serializeBinary() {
1889
+ return this.serialize();
1890
+ }
1891
+ static deserializeBinary(bytes) {
1892
+ return DeleteReversalTransactionRequest.deserialize(bytes);
1893
+ }
1894
+ }
1895
+ pos.DeleteReversalTransactionRequest = DeleteReversalTransactionRequest;
1896
+ class UnimplementedPOSTransactionServiceService {
1897
+ static definition = {
1898
+ InitializeTransaction: {
1899
+ path: "/com.pkg.pos.POSTransactionService/InitializeTransaction",
1900
+ requestStream: false,
1901
+ responseStream: false,
1902
+ requestSerialize: (message) => Buffer.from(message.serialize()),
1903
+ requestDeserialize: (bytes) => InitializePOSTransactionRequest.deserialize(new Uint8Array(bytes)),
1904
+ responseSerialize: (message) => Buffer.from(message.serialize()),
1905
+ responseDeserialize: (bytes) => InitiatePOSTransactionResponse.deserialize(new Uint8Array(bytes))
1906
+ },
1907
+ ConfirmTransaction: {
1908
+ path: "/com.pkg.pos.POSTransactionService/ConfirmTransaction",
1909
+ requestStream: false,
1910
+ responseStream: false,
1911
+ requestSerialize: (message) => Buffer.from(message.serialize()),
1912
+ requestDeserialize: (bytes) => ConfirmPOSTransactionRequest.deserialize(new Uint8Array(bytes)),
1913
+ responseSerialize: (message) => Buffer.from(message.serialize()),
1914
+ responseDeserialize: (bytes) => DefaultResponse.deserialize(new Uint8Array(bytes))
1915
+ },
1916
+ GetTransaction: {
1917
+ path: "/com.pkg.pos.POSTransactionService/GetTransaction",
1918
+ requestStream: false,
1919
+ responseStream: false,
1920
+ requestSerialize: (message) => Buffer.from(message.serialize()),
1921
+ requestDeserialize: (bytes) => GetTransactionRequest.deserialize(new Uint8Array(bytes)),
1922
+ responseSerialize: (message) => Buffer.from(message.serialize()),
1923
+ responseDeserialize: (bytes) => TransactionResponse.deserialize(new Uint8Array(bytes))
1924
+ },
1925
+ GetTransactions: {
1926
+ path: "/com.pkg.pos.POSTransactionService/GetTransactions",
1927
+ requestStream: false,
1928
+ responseStream: false,
1929
+ requestSerialize: (message) => Buffer.from(message.serialize()),
1930
+ requestDeserialize: (bytes) => QueryTransactionsRequest.deserialize(new Uint8Array(bytes)),
1931
+ responseSerialize: (message) => Buffer.from(message.serialize()),
1932
+ responseDeserialize: (bytes) => TransactionsResponse.deserialize(new Uint8Array(bytes))
1933
+ },
1934
+ GetReversalTransactions: {
1935
+ path: "/com.pkg.pos.POSTransactionService/GetReversalTransactions",
1936
+ requestStream: false,
1937
+ responseStream: false,
1938
+ requestSerialize: (message) => Buffer.from(message.serialize()),
1939
+ requestDeserialize: (bytes) => GetTransactionRequest.deserialize(new Uint8Array(bytes)),
1940
+ responseSerialize: (message) => Buffer.from(message.serialize()),
1941
+ responseDeserialize: (bytes) => TransactionsResponse.deserialize(new Uint8Array(bytes))
1942
+ },
1943
+ SaveReversalTransaction: {
1944
+ path: "/com.pkg.pos.POSTransactionService/SaveReversalTransaction",
1945
+ requestStream: false,
1946
+ responseStream: false,
1947
+ requestSerialize: (message) => Buffer.from(message.serialize()),
1948
+ requestDeserialize: (bytes) => SaveReversalTransactionRequest.deserialize(new Uint8Array(bytes)),
1949
+ responseSerialize: (message) => Buffer.from(message.serialize()),
1950
+ responseDeserialize: (bytes) => DefaultResponse.deserialize(new Uint8Array(bytes))
1951
+ },
1952
+ DeleteReversalTransaction: {
1953
+ path: "/com.pkg.pos.POSTransactionService/DeleteReversalTransaction",
1954
+ requestStream: false,
1955
+ responseStream: false,
1956
+ requestSerialize: (message) => Buffer.from(message.serialize()),
1957
+ requestDeserialize: (bytes) => DeleteReversalTransactionRequest.deserialize(new Uint8Array(bytes)),
1958
+ responseSerialize: (message) => Buffer.from(message.serialize()),
1959
+ responseDeserialize: (bytes) => DefaultResponse.deserialize(new Uint8Array(bytes))
1960
+ }
1961
+ };
1962
+ }
1963
+ pos.UnimplementedPOSTransactionServiceService = UnimplementedPOSTransactionServiceService;
1964
+ class POSTransactionServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedPOSTransactionServiceService.definition, "POSTransactionService", {}) {
1965
+ constructor(address, credentials, options) {
1966
+ super(address, credentials, options);
1967
+ }
1968
+ InitializeTransaction = (message, metadata, options) => {
1969
+ if (!metadata) {
1970
+ metadata = new grpc_1.Metadata;
1971
+ }
1972
+ if (!options) {
1973
+ options = {};
1974
+ }
1975
+ return new Promise((resolve, reject) => super.InitializeTransaction(message, metadata, options, (error, response) => {
1976
+ if (error) {
1977
+ reject(error);
1978
+ }
1979
+ else {
1980
+ resolve(response);
1981
+ }
1982
+ }));
1983
+ };
1984
+ ConfirmTransaction = (message, metadata, options) => {
1985
+ if (!metadata) {
1986
+ metadata = new grpc_1.Metadata;
1987
+ }
1988
+ if (!options) {
1989
+ options = {};
1990
+ }
1991
+ return new Promise((resolve, reject) => super.ConfirmTransaction(message, metadata, options, (error, response) => {
1992
+ if (error) {
1993
+ reject(error);
1994
+ }
1995
+ else {
1996
+ resolve(response);
1997
+ }
1998
+ }));
1999
+ };
2000
+ GetTransaction = (message, metadata, options) => {
2001
+ if (!metadata) {
2002
+ metadata = new grpc_1.Metadata;
2003
+ }
2004
+ if (!options) {
2005
+ options = {};
2006
+ }
2007
+ return new Promise((resolve, reject) => super.GetTransaction(message, metadata, options, (error, response) => {
2008
+ if (error) {
2009
+ reject(error);
2010
+ }
2011
+ else {
2012
+ resolve(response);
2013
+ }
2014
+ }));
2015
+ };
2016
+ GetTransactions = (message, metadata, options) => {
2017
+ if (!metadata) {
2018
+ metadata = new grpc_1.Metadata;
2019
+ }
2020
+ if (!options) {
2021
+ options = {};
2022
+ }
2023
+ return new Promise((resolve, reject) => super.GetTransactions(message, metadata, options, (error, response) => {
2024
+ if (error) {
2025
+ reject(error);
2026
+ }
2027
+ else {
2028
+ resolve(response);
2029
+ }
2030
+ }));
2031
+ };
2032
+ GetReversalTransactions = (message, metadata, options) => {
2033
+ if (!metadata) {
2034
+ metadata = new grpc_1.Metadata;
2035
+ }
2036
+ if (!options) {
2037
+ options = {};
2038
+ }
2039
+ return new Promise((resolve, reject) => super.GetReversalTransactions(message, metadata, options, (error, response) => {
2040
+ if (error) {
2041
+ reject(error);
2042
+ }
2043
+ else {
2044
+ resolve(response);
2045
+ }
2046
+ }));
2047
+ };
2048
+ SaveReversalTransaction = (message, metadata, options) => {
2049
+ if (!metadata) {
2050
+ metadata = new grpc_1.Metadata;
2051
+ }
2052
+ if (!options) {
2053
+ options = {};
2054
+ }
2055
+ return new Promise((resolve, reject) => super.SaveReversalTransaction(message, metadata, options, (error, response) => {
2056
+ if (error) {
2057
+ reject(error);
2058
+ }
2059
+ else {
2060
+ resolve(response);
2061
+ }
2062
+ }));
2063
+ };
2064
+ DeleteReversalTransaction = (message, metadata, options) => {
2065
+ if (!metadata) {
2066
+ metadata = new grpc_1.Metadata;
2067
+ }
2068
+ if (!options) {
2069
+ options = {};
2070
+ }
2071
+ return new Promise((resolve, reject) => super.DeleteReversalTransaction(message, metadata, options, (error, response) => {
2072
+ if (error) {
2073
+ reject(error);
2074
+ }
2075
+ else {
2076
+ resolve(response);
2077
+ }
2078
+ }));
2079
+ };
2080
+ }
2081
+ pos.POSTransactionServiceClient = POSTransactionServiceClient;
2082
+ })(pos = pkg.pos || (pkg.pos = {}));
2083
+ })(pkg = com.pkg || (com.pkg = {}));
2084
+ })(com || (exports.com = com = {}));