@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
package/pos.v1/eod.js ADDED
@@ -0,0 +1,2416 @@
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 posv1;
34
+ (function (posv1) {
35
+ var eod;
36
+ (function (eod) {
37
+ let EODStatus;
38
+ (function (EODStatus) {
39
+ EODStatus[EODStatus["EOD_PENDING"] = 0] = "EOD_PENDING";
40
+ EODStatus[EODStatus["EOD_RUNNING"] = 1] = "EOD_RUNNING";
41
+ EODStatus[EODStatus["EOD_COMPLETED"] = 2] = "EOD_COMPLETED";
42
+ EODStatus[EODStatus["EOD_FAILED"] = 3] = "EOD_FAILED";
43
+ EODStatus[EODStatus["EOD_PARTIALLY_COMPLETED"] = 4] = "EOD_PARTIALLY_COMPLETED";
44
+ })(EODStatus = eod.EODStatus || (eod.EODStatus = {}));
45
+ let ReconciliationStatus;
46
+ (function (ReconciliationStatus) {
47
+ ReconciliationStatus[ReconciliationStatus["RECON_PENDING"] = 0] = "RECON_PENDING";
48
+ ReconciliationStatus[ReconciliationStatus["RECON_IN_PROGRESS"] = 1] = "RECON_IN_PROGRESS";
49
+ ReconciliationStatus[ReconciliationStatus["RECON_MATCHED"] = 2] = "RECON_MATCHED";
50
+ ReconciliationStatus[ReconciliationStatus["RECON_DISCREPANCIES"] = 3] = "RECON_DISCREPANCIES";
51
+ ReconciliationStatus[ReconciliationStatus["RECON_FAILED"] = 4] = "RECON_FAILED";
52
+ })(ReconciliationStatus = eod.ReconciliationStatus || (eod.ReconciliationStatus = {}));
53
+ let SettlementStatus;
54
+ (function (SettlementStatus) {
55
+ SettlementStatus[SettlementStatus["SETTLEMENT_PENDING"] = 0] = "SETTLEMENT_PENDING";
56
+ SettlementStatus[SettlementStatus["SETTLEMENT_PROCESSING"] = 1] = "SETTLEMENT_PROCESSING";
57
+ SettlementStatus[SettlementStatus["SETTLEMENT_COMPLETED"] = 2] = "SETTLEMENT_COMPLETED";
58
+ SettlementStatus[SettlementStatus["SETTLEMENT_FAILED"] = 3] = "SETTLEMENT_FAILED";
59
+ })(SettlementStatus = eod.SettlementStatus || (eod.SettlementStatus = {}));
60
+ class RunEODRequest extends pb_1.Message {
61
+ #one_of_decls = [];
62
+ constructor(data) {
63
+ super();
64
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
65
+ if (!Array.isArray(data) && typeof data == "object") {
66
+ if ("date" in data && data.date != undefined) {
67
+ this.date = data.date;
68
+ }
69
+ if ("merchantId" in data && data.merchantId != undefined) {
70
+ this.merchantId = data.merchantId;
71
+ }
72
+ if ("forceRun" in data && data.forceRun != undefined) {
73
+ this.forceRun = data.forceRun;
74
+ }
75
+ }
76
+ }
77
+ get date() {
78
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
79
+ }
80
+ set date(value) {
81
+ pb_1.Message.setField(this, 1, value);
82
+ }
83
+ get merchantId() {
84
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
85
+ }
86
+ set merchantId(value) {
87
+ pb_1.Message.setField(this, 2, value);
88
+ }
89
+ get forceRun() {
90
+ return pb_1.Message.getFieldWithDefault(this, 3, false);
91
+ }
92
+ set forceRun(value) {
93
+ pb_1.Message.setField(this, 3, value);
94
+ }
95
+ static fromObject(data) {
96
+ const message = new RunEODRequest({});
97
+ if (data.date != null) {
98
+ message.date = data.date;
99
+ }
100
+ if (data.merchantId != null) {
101
+ message.merchantId = data.merchantId;
102
+ }
103
+ if (data.forceRun != null) {
104
+ message.forceRun = data.forceRun;
105
+ }
106
+ return message;
107
+ }
108
+ toObject() {
109
+ const data = {};
110
+ if (this.date != null) {
111
+ data.date = this.date;
112
+ }
113
+ if (this.merchantId != null) {
114
+ data.merchantId = this.merchantId;
115
+ }
116
+ if (this.forceRun != null) {
117
+ data.forceRun = this.forceRun;
118
+ }
119
+ return data;
120
+ }
121
+ serialize(w) {
122
+ const writer = w || new pb_1.BinaryWriter();
123
+ if (this.date.length)
124
+ writer.writeString(1, this.date);
125
+ if (this.merchantId.length)
126
+ writer.writeString(2, this.merchantId);
127
+ if (this.forceRun != false)
128
+ writer.writeBool(3, this.forceRun);
129
+ if (!w)
130
+ return writer.getResultBuffer();
131
+ }
132
+ static deserialize(bytes) {
133
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RunEODRequest();
134
+ while (reader.nextField()) {
135
+ if (reader.isEndGroup())
136
+ break;
137
+ switch (reader.getFieldNumber()) {
138
+ case 1:
139
+ message.date = reader.readString();
140
+ break;
141
+ case 2:
142
+ message.merchantId = reader.readString();
143
+ break;
144
+ case 3:
145
+ message.forceRun = reader.readBool();
146
+ break;
147
+ default: reader.skipField();
148
+ }
149
+ }
150
+ return message;
151
+ }
152
+ serializeBinary() {
153
+ return this.serialize();
154
+ }
155
+ static deserializeBinary(bytes) {
156
+ return RunEODRequest.deserialize(bytes);
157
+ }
158
+ }
159
+ eod.RunEODRequest = RunEODRequest;
160
+ class GetReconciliationStatusRequest extends pb_1.Message {
161
+ #one_of_decls = [];
162
+ constructor(data) {
163
+ super();
164
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
165
+ if (!Array.isArray(data) && typeof data == "object") {
166
+ if ("date" in data && data.date != undefined) {
167
+ this.date = data.date;
168
+ }
169
+ if ("merchantId" in data && data.merchantId != undefined) {
170
+ this.merchantId = data.merchantId;
171
+ }
172
+ }
173
+ }
174
+ get date() {
175
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
176
+ }
177
+ set date(value) {
178
+ pb_1.Message.setField(this, 1, value);
179
+ }
180
+ get merchantId() {
181
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
182
+ }
183
+ set merchantId(value) {
184
+ pb_1.Message.setField(this, 2, value);
185
+ }
186
+ static fromObject(data) {
187
+ const message = new GetReconciliationStatusRequest({});
188
+ if (data.date != null) {
189
+ message.date = data.date;
190
+ }
191
+ if (data.merchantId != null) {
192
+ message.merchantId = data.merchantId;
193
+ }
194
+ return message;
195
+ }
196
+ toObject() {
197
+ const data = {};
198
+ if (this.date != null) {
199
+ data.date = this.date;
200
+ }
201
+ if (this.merchantId != null) {
202
+ data.merchantId = this.merchantId;
203
+ }
204
+ return data;
205
+ }
206
+ serialize(w) {
207
+ const writer = w || new pb_1.BinaryWriter();
208
+ if (this.date.length)
209
+ writer.writeString(1, this.date);
210
+ if (this.merchantId.length)
211
+ writer.writeString(2, this.merchantId);
212
+ if (!w)
213
+ return writer.getResultBuffer();
214
+ }
215
+ static deserialize(bytes) {
216
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetReconciliationStatusRequest();
217
+ while (reader.nextField()) {
218
+ if (reader.isEndGroup())
219
+ break;
220
+ switch (reader.getFieldNumber()) {
221
+ case 1:
222
+ message.date = reader.readString();
223
+ break;
224
+ case 2:
225
+ message.merchantId = reader.readString();
226
+ break;
227
+ default: reader.skipField();
228
+ }
229
+ }
230
+ return message;
231
+ }
232
+ serializeBinary() {
233
+ return this.serialize();
234
+ }
235
+ static deserializeBinary(bytes) {
236
+ return GetReconciliationStatusRequest.deserialize(bytes);
237
+ }
238
+ }
239
+ eod.GetReconciliationStatusRequest = GetReconciliationStatusRequest;
240
+ class GetSettlementBatchRequest extends pb_1.Message {
241
+ #one_of_decls = [];
242
+ constructor(data) {
243
+ super();
244
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
245
+ if (!Array.isArray(data) && typeof data == "object") {
246
+ if ("batchId" in data && data.batchId != undefined) {
247
+ this.batchId = data.batchId;
248
+ }
249
+ if ("merchantId" in data && data.merchantId != undefined) {
250
+ this.merchantId = data.merchantId;
251
+ }
252
+ }
253
+ }
254
+ get batchId() {
255
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
256
+ }
257
+ set batchId(value) {
258
+ pb_1.Message.setField(this, 1, value);
259
+ }
260
+ get merchantId() {
261
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
262
+ }
263
+ set merchantId(value) {
264
+ pb_1.Message.setField(this, 2, value);
265
+ }
266
+ static fromObject(data) {
267
+ const message = new GetSettlementBatchRequest({});
268
+ if (data.batchId != null) {
269
+ message.batchId = data.batchId;
270
+ }
271
+ if (data.merchantId != null) {
272
+ message.merchantId = data.merchantId;
273
+ }
274
+ return message;
275
+ }
276
+ toObject() {
277
+ const data = {};
278
+ if (this.batchId != null) {
279
+ data.batchId = this.batchId;
280
+ }
281
+ if (this.merchantId != null) {
282
+ data.merchantId = this.merchantId;
283
+ }
284
+ return data;
285
+ }
286
+ serialize(w) {
287
+ const writer = w || new pb_1.BinaryWriter();
288
+ if (this.batchId.length)
289
+ writer.writeString(1, this.batchId);
290
+ if (this.merchantId.length)
291
+ writer.writeString(2, this.merchantId);
292
+ if (!w)
293
+ return writer.getResultBuffer();
294
+ }
295
+ static deserialize(bytes) {
296
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetSettlementBatchRequest();
297
+ while (reader.nextField()) {
298
+ if (reader.isEndGroup())
299
+ break;
300
+ switch (reader.getFieldNumber()) {
301
+ case 1:
302
+ message.batchId = reader.readString();
303
+ break;
304
+ case 2:
305
+ message.merchantId = reader.readString();
306
+ break;
307
+ default: reader.skipField();
308
+ }
309
+ }
310
+ return message;
311
+ }
312
+ serializeBinary() {
313
+ return this.serialize();
314
+ }
315
+ static deserializeBinary(bytes) {
316
+ return GetSettlementBatchRequest.deserialize(bytes);
317
+ }
318
+ }
319
+ eod.GetSettlementBatchRequest = GetSettlementBatchRequest;
320
+ class GetEODHistoryRequest extends pb_1.Message {
321
+ #one_of_decls = [];
322
+ constructor(data) {
323
+ super();
324
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
325
+ if (!Array.isArray(data) && typeof data == "object") {
326
+ if ("merchantId" in data && data.merchantId != undefined) {
327
+ this.merchantId = data.merchantId;
328
+ }
329
+ if ("startDate" in data && data.startDate != undefined) {
330
+ this.startDate = data.startDate;
331
+ }
332
+ if ("endDate" in data && data.endDate != undefined) {
333
+ this.endDate = data.endDate;
334
+ }
335
+ if ("page" in data && data.page != undefined) {
336
+ this.page = data.page;
337
+ }
338
+ if ("limit" in data && data.limit != undefined) {
339
+ this.limit = data.limit;
340
+ }
341
+ }
342
+ }
343
+ get merchantId() {
344
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
345
+ }
346
+ set merchantId(value) {
347
+ pb_1.Message.setField(this, 1, value);
348
+ }
349
+ get startDate() {
350
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
351
+ }
352
+ set startDate(value) {
353
+ pb_1.Message.setField(this, 2, value);
354
+ }
355
+ get endDate() {
356
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
357
+ }
358
+ set endDate(value) {
359
+ pb_1.Message.setField(this, 3, value);
360
+ }
361
+ get page() {
362
+ return pb_1.Message.getFieldWithDefault(this, 4, 0);
363
+ }
364
+ set page(value) {
365
+ pb_1.Message.setField(this, 4, value);
366
+ }
367
+ get limit() {
368
+ return pb_1.Message.getFieldWithDefault(this, 5, 0);
369
+ }
370
+ set limit(value) {
371
+ pb_1.Message.setField(this, 5, value);
372
+ }
373
+ static fromObject(data) {
374
+ const message = new GetEODHistoryRequest({});
375
+ if (data.merchantId != null) {
376
+ message.merchantId = data.merchantId;
377
+ }
378
+ if (data.startDate != null) {
379
+ message.startDate = data.startDate;
380
+ }
381
+ if (data.endDate != null) {
382
+ message.endDate = data.endDate;
383
+ }
384
+ if (data.page != null) {
385
+ message.page = data.page;
386
+ }
387
+ if (data.limit != null) {
388
+ message.limit = data.limit;
389
+ }
390
+ return message;
391
+ }
392
+ toObject() {
393
+ const data = {};
394
+ if (this.merchantId != null) {
395
+ data.merchantId = this.merchantId;
396
+ }
397
+ if (this.startDate != null) {
398
+ data.startDate = this.startDate;
399
+ }
400
+ if (this.endDate != null) {
401
+ data.endDate = this.endDate;
402
+ }
403
+ if (this.page != null) {
404
+ data.page = this.page;
405
+ }
406
+ if (this.limit != null) {
407
+ data.limit = this.limit;
408
+ }
409
+ return data;
410
+ }
411
+ serialize(w) {
412
+ const writer = w || new pb_1.BinaryWriter();
413
+ if (this.merchantId.length)
414
+ writer.writeString(1, this.merchantId);
415
+ if (this.startDate.length)
416
+ writer.writeString(2, this.startDate);
417
+ if (this.endDate.length)
418
+ writer.writeString(3, this.endDate);
419
+ if (this.page != 0)
420
+ writer.writeInt32(4, this.page);
421
+ if (this.limit != 0)
422
+ writer.writeInt32(5, this.limit);
423
+ if (!w)
424
+ return writer.getResultBuffer();
425
+ }
426
+ static deserialize(bytes) {
427
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetEODHistoryRequest();
428
+ while (reader.nextField()) {
429
+ if (reader.isEndGroup())
430
+ break;
431
+ switch (reader.getFieldNumber()) {
432
+ case 1:
433
+ message.merchantId = reader.readString();
434
+ break;
435
+ case 2:
436
+ message.startDate = reader.readString();
437
+ break;
438
+ case 3:
439
+ message.endDate = reader.readString();
440
+ break;
441
+ case 4:
442
+ message.page = reader.readInt32();
443
+ break;
444
+ case 5:
445
+ message.limit = reader.readInt32();
446
+ break;
447
+ default: reader.skipField();
448
+ }
449
+ }
450
+ return message;
451
+ }
452
+ serializeBinary() {
453
+ return this.serialize();
454
+ }
455
+ static deserializeBinary(bytes) {
456
+ return GetEODHistoryRequest.deserialize(bytes);
457
+ }
458
+ }
459
+ eod.GetEODHistoryRequest = GetEODHistoryRequest;
460
+ class RunEODResponse extends pb_1.Message {
461
+ #one_of_decls = [];
462
+ constructor(data) {
463
+ super();
464
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
465
+ if (!Array.isArray(data) && typeof data == "object") {
466
+ if ("success" in data && data.success != undefined) {
467
+ this.success = data.success;
468
+ }
469
+ if ("message" in data && data.message != undefined) {
470
+ this.message = data.message;
471
+ }
472
+ if ("data" in data && data.data != undefined) {
473
+ this.data = data.data;
474
+ }
475
+ }
476
+ }
477
+ get success() {
478
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
479
+ }
480
+ set success(value) {
481
+ pb_1.Message.setField(this, 1, value);
482
+ }
483
+ get message() {
484
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
485
+ }
486
+ set message(value) {
487
+ pb_1.Message.setField(this, 2, value);
488
+ }
489
+ get data() {
490
+ return pb_1.Message.getWrapperField(this, EODRunData, 3);
491
+ }
492
+ set data(value) {
493
+ pb_1.Message.setWrapperField(this, 3, value);
494
+ }
495
+ get hasData() {
496
+ return pb_1.Message.getField(this, 3) != null;
497
+ }
498
+ static fromObject(data) {
499
+ const message = new RunEODResponse({});
500
+ if (data.success != null) {
501
+ message.success = data.success;
502
+ }
503
+ if (data.message != null) {
504
+ message.message = data.message;
505
+ }
506
+ if (data.data != null) {
507
+ message.data = EODRunData.fromObject(data.data);
508
+ }
509
+ return message;
510
+ }
511
+ toObject() {
512
+ const data = {};
513
+ if (this.success != null) {
514
+ data.success = this.success;
515
+ }
516
+ if (this.message != null) {
517
+ data.message = this.message;
518
+ }
519
+ if (this.data != null) {
520
+ data.data = this.data.toObject();
521
+ }
522
+ return data;
523
+ }
524
+ serialize(w) {
525
+ const writer = w || new pb_1.BinaryWriter();
526
+ if (this.success != false)
527
+ writer.writeBool(1, this.success);
528
+ if (this.message.length)
529
+ writer.writeString(2, this.message);
530
+ if (this.hasData)
531
+ writer.writeMessage(3, this.data, () => this.data.serialize(writer));
532
+ if (!w)
533
+ return writer.getResultBuffer();
534
+ }
535
+ static deserialize(bytes) {
536
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RunEODResponse();
537
+ while (reader.nextField()) {
538
+ if (reader.isEndGroup())
539
+ break;
540
+ switch (reader.getFieldNumber()) {
541
+ case 1:
542
+ message.success = reader.readBool();
543
+ break;
544
+ case 2:
545
+ message.message = reader.readString();
546
+ break;
547
+ case 3:
548
+ reader.readMessage(message.data, () => message.data = EODRunData.deserialize(reader));
549
+ break;
550
+ default: reader.skipField();
551
+ }
552
+ }
553
+ return message;
554
+ }
555
+ serializeBinary() {
556
+ return this.serialize();
557
+ }
558
+ static deserializeBinary(bytes) {
559
+ return RunEODResponse.deserialize(bytes);
560
+ }
561
+ }
562
+ eod.RunEODResponse = RunEODResponse;
563
+ class GetReconciliationStatusResponse extends pb_1.Message {
564
+ #one_of_decls = [];
565
+ constructor(data) {
566
+ super();
567
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
568
+ if (!Array.isArray(data) && typeof data == "object") {
569
+ if ("success" in data && data.success != undefined) {
570
+ this.success = data.success;
571
+ }
572
+ if ("message" in data && data.message != undefined) {
573
+ this.message = data.message;
574
+ }
575
+ if ("data" in data && data.data != undefined) {
576
+ this.data = data.data;
577
+ }
578
+ }
579
+ }
580
+ get success() {
581
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
582
+ }
583
+ set success(value) {
584
+ pb_1.Message.setField(this, 1, value);
585
+ }
586
+ get message() {
587
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
588
+ }
589
+ set message(value) {
590
+ pb_1.Message.setField(this, 2, value);
591
+ }
592
+ get data() {
593
+ return pb_1.Message.getWrapperField(this, ReconciliationData, 3);
594
+ }
595
+ set data(value) {
596
+ pb_1.Message.setWrapperField(this, 3, value);
597
+ }
598
+ get hasData() {
599
+ return pb_1.Message.getField(this, 3) != null;
600
+ }
601
+ static fromObject(data) {
602
+ const message = new GetReconciliationStatusResponse({});
603
+ if (data.success != null) {
604
+ message.success = data.success;
605
+ }
606
+ if (data.message != null) {
607
+ message.message = data.message;
608
+ }
609
+ if (data.data != null) {
610
+ message.data = ReconciliationData.fromObject(data.data);
611
+ }
612
+ return message;
613
+ }
614
+ toObject() {
615
+ const data = {};
616
+ if (this.success != null) {
617
+ data.success = this.success;
618
+ }
619
+ if (this.message != null) {
620
+ data.message = this.message;
621
+ }
622
+ if (this.data != null) {
623
+ data.data = this.data.toObject();
624
+ }
625
+ return data;
626
+ }
627
+ serialize(w) {
628
+ const writer = w || new pb_1.BinaryWriter();
629
+ if (this.success != false)
630
+ writer.writeBool(1, this.success);
631
+ if (this.message.length)
632
+ writer.writeString(2, this.message);
633
+ if (this.hasData)
634
+ writer.writeMessage(3, this.data, () => this.data.serialize(writer));
635
+ if (!w)
636
+ return writer.getResultBuffer();
637
+ }
638
+ static deserialize(bytes) {
639
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetReconciliationStatusResponse();
640
+ while (reader.nextField()) {
641
+ if (reader.isEndGroup())
642
+ break;
643
+ switch (reader.getFieldNumber()) {
644
+ case 1:
645
+ message.success = reader.readBool();
646
+ break;
647
+ case 2:
648
+ message.message = reader.readString();
649
+ break;
650
+ case 3:
651
+ reader.readMessage(message.data, () => message.data = ReconciliationData.deserialize(reader));
652
+ break;
653
+ default: reader.skipField();
654
+ }
655
+ }
656
+ return message;
657
+ }
658
+ serializeBinary() {
659
+ return this.serialize();
660
+ }
661
+ static deserializeBinary(bytes) {
662
+ return GetReconciliationStatusResponse.deserialize(bytes);
663
+ }
664
+ }
665
+ eod.GetReconciliationStatusResponse = GetReconciliationStatusResponse;
666
+ class GetSettlementBatchResponse extends pb_1.Message {
667
+ #one_of_decls = [];
668
+ constructor(data) {
669
+ super();
670
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
671
+ if (!Array.isArray(data) && typeof data == "object") {
672
+ if ("success" in data && data.success != undefined) {
673
+ this.success = data.success;
674
+ }
675
+ if ("message" in data && data.message != undefined) {
676
+ this.message = data.message;
677
+ }
678
+ if ("data" in data && data.data != undefined) {
679
+ this.data = data.data;
680
+ }
681
+ }
682
+ }
683
+ get success() {
684
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
685
+ }
686
+ set success(value) {
687
+ pb_1.Message.setField(this, 1, value);
688
+ }
689
+ get message() {
690
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
691
+ }
692
+ set message(value) {
693
+ pb_1.Message.setField(this, 2, value);
694
+ }
695
+ get data() {
696
+ return pb_1.Message.getWrapperField(this, SettlementBatchData, 3);
697
+ }
698
+ set data(value) {
699
+ pb_1.Message.setWrapperField(this, 3, value);
700
+ }
701
+ get hasData() {
702
+ return pb_1.Message.getField(this, 3) != null;
703
+ }
704
+ static fromObject(data) {
705
+ const message = new GetSettlementBatchResponse({});
706
+ if (data.success != null) {
707
+ message.success = data.success;
708
+ }
709
+ if (data.message != null) {
710
+ message.message = data.message;
711
+ }
712
+ if (data.data != null) {
713
+ message.data = SettlementBatchData.fromObject(data.data);
714
+ }
715
+ return message;
716
+ }
717
+ toObject() {
718
+ const data = {};
719
+ if (this.success != null) {
720
+ data.success = this.success;
721
+ }
722
+ if (this.message != null) {
723
+ data.message = this.message;
724
+ }
725
+ if (this.data != null) {
726
+ data.data = this.data.toObject();
727
+ }
728
+ return data;
729
+ }
730
+ serialize(w) {
731
+ const writer = w || new pb_1.BinaryWriter();
732
+ if (this.success != false)
733
+ writer.writeBool(1, this.success);
734
+ if (this.message.length)
735
+ writer.writeString(2, this.message);
736
+ if (this.hasData)
737
+ writer.writeMessage(3, this.data, () => this.data.serialize(writer));
738
+ if (!w)
739
+ return writer.getResultBuffer();
740
+ }
741
+ static deserialize(bytes) {
742
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetSettlementBatchResponse();
743
+ while (reader.nextField()) {
744
+ if (reader.isEndGroup())
745
+ break;
746
+ switch (reader.getFieldNumber()) {
747
+ case 1:
748
+ message.success = reader.readBool();
749
+ break;
750
+ case 2:
751
+ message.message = reader.readString();
752
+ break;
753
+ case 3:
754
+ reader.readMessage(message.data, () => message.data = SettlementBatchData.deserialize(reader));
755
+ break;
756
+ default: reader.skipField();
757
+ }
758
+ }
759
+ return message;
760
+ }
761
+ serializeBinary() {
762
+ return this.serialize();
763
+ }
764
+ static deserializeBinary(bytes) {
765
+ return GetSettlementBatchResponse.deserialize(bytes);
766
+ }
767
+ }
768
+ eod.GetSettlementBatchResponse = GetSettlementBatchResponse;
769
+ class GetEODHistoryResponse extends pb_1.Message {
770
+ #one_of_decls = [];
771
+ constructor(data) {
772
+ super();
773
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls);
774
+ if (!Array.isArray(data) && typeof data == "object") {
775
+ if ("success" in data && data.success != undefined) {
776
+ this.success = data.success;
777
+ }
778
+ if ("message" in data && data.message != undefined) {
779
+ this.message = data.message;
780
+ }
781
+ if ("data" in data && data.data != undefined) {
782
+ this.data = data.data;
783
+ }
784
+ if ("pagination" in data && data.pagination != undefined) {
785
+ this.pagination = data.pagination;
786
+ }
787
+ }
788
+ }
789
+ get success() {
790
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
791
+ }
792
+ set success(value) {
793
+ pb_1.Message.setField(this, 1, value);
794
+ }
795
+ get message() {
796
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
797
+ }
798
+ set message(value) {
799
+ pb_1.Message.setField(this, 2, value);
800
+ }
801
+ get data() {
802
+ return pb_1.Message.getRepeatedWrapperField(this, EODRunData, 3);
803
+ }
804
+ set data(value) {
805
+ pb_1.Message.setRepeatedWrapperField(this, 3, value);
806
+ }
807
+ get pagination() {
808
+ return pb_1.Message.getWrapperField(this, PaginationInfo, 4);
809
+ }
810
+ set pagination(value) {
811
+ pb_1.Message.setWrapperField(this, 4, value);
812
+ }
813
+ get hasPagination() {
814
+ return pb_1.Message.getField(this, 4) != null;
815
+ }
816
+ static fromObject(data) {
817
+ const message = new GetEODHistoryResponse({});
818
+ if (data.success != null) {
819
+ message.success = data.success;
820
+ }
821
+ if (data.message != null) {
822
+ message.message = data.message;
823
+ }
824
+ if (data.data != null) {
825
+ message.data = data.data.map(item => EODRunData.fromObject(item));
826
+ }
827
+ if (data.pagination != null) {
828
+ message.pagination = PaginationInfo.fromObject(data.pagination);
829
+ }
830
+ return message;
831
+ }
832
+ toObject() {
833
+ const data = {};
834
+ if (this.success != null) {
835
+ data.success = this.success;
836
+ }
837
+ if (this.message != null) {
838
+ data.message = this.message;
839
+ }
840
+ if (this.data != null) {
841
+ data.data = this.data.map((item) => item.toObject());
842
+ }
843
+ if (this.pagination != null) {
844
+ data.pagination = this.pagination.toObject();
845
+ }
846
+ return data;
847
+ }
848
+ serialize(w) {
849
+ const writer = w || new pb_1.BinaryWriter();
850
+ if (this.success != false)
851
+ writer.writeBool(1, this.success);
852
+ if (this.message.length)
853
+ writer.writeString(2, this.message);
854
+ if (this.data.length)
855
+ writer.writeRepeatedMessage(3, this.data, (item) => item.serialize(writer));
856
+ if (this.hasPagination)
857
+ writer.writeMessage(4, this.pagination, () => this.pagination.serialize(writer));
858
+ if (!w)
859
+ return writer.getResultBuffer();
860
+ }
861
+ static deserialize(bytes) {
862
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetEODHistoryResponse();
863
+ while (reader.nextField()) {
864
+ if (reader.isEndGroup())
865
+ break;
866
+ switch (reader.getFieldNumber()) {
867
+ case 1:
868
+ message.success = reader.readBool();
869
+ break;
870
+ case 2:
871
+ message.message = reader.readString();
872
+ break;
873
+ case 3:
874
+ reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, EODRunData.deserialize(reader), EODRunData));
875
+ break;
876
+ case 4:
877
+ reader.readMessage(message.pagination, () => message.pagination = PaginationInfo.deserialize(reader));
878
+ break;
879
+ default: reader.skipField();
880
+ }
881
+ }
882
+ return message;
883
+ }
884
+ serializeBinary() {
885
+ return this.serialize();
886
+ }
887
+ static deserializeBinary(bytes) {
888
+ return GetEODHistoryResponse.deserialize(bytes);
889
+ }
890
+ }
891
+ eod.GetEODHistoryResponse = GetEODHistoryResponse;
892
+ class EODRunData extends pb_1.Message {
893
+ #one_of_decls = [[13]];
894
+ constructor(data) {
895
+ super();
896
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [9, 10], this.#one_of_decls);
897
+ if (!Array.isArray(data) && typeof data == "object") {
898
+ if ("id" in data && data.id != undefined) {
899
+ this.id = data.id;
900
+ }
901
+ if ("date" in data && data.date != undefined) {
902
+ this.date = data.date;
903
+ }
904
+ if ("status" in data && data.status != undefined) {
905
+ this.status = data.status;
906
+ }
907
+ if ("totalTransactions" in data && data.totalTransactions != undefined) {
908
+ this.totalTransactions = data.totalTransactions;
909
+ }
910
+ if ("totalAmount" in data && data.totalAmount != undefined) {
911
+ this.totalAmount = data.totalAmount;
912
+ }
913
+ if ("successfulTransactions" in data && data.successfulTransactions != undefined) {
914
+ this.successfulTransactions = data.successfulTransactions;
915
+ }
916
+ if ("failedTransactions" in data && data.failedTransactions != undefined) {
917
+ this.failedTransactions = data.failedTransactions;
918
+ }
919
+ if ("reversedTransactions" in data && data.reversedTransactions != undefined) {
920
+ this.reversedTransactions = data.reversedTransactions;
921
+ }
922
+ if ("settlementBatches" in data && data.settlementBatches != undefined) {
923
+ this.settlementBatches = data.settlementBatches;
924
+ }
925
+ if ("reconciliationResults" in data && data.reconciliationResults != undefined) {
926
+ this.reconciliationResults = data.reconciliationResults;
927
+ }
928
+ if ("startedAt" in data && data.startedAt != undefined) {
929
+ this.startedAt = data.startedAt;
930
+ }
931
+ if ("completedAt" in data && data.completedAt != undefined) {
932
+ this.completedAt = data.completedAt;
933
+ }
934
+ if ("errorMessage" in data && data.errorMessage != undefined) {
935
+ this.errorMessage = data.errorMessage;
936
+ }
937
+ }
938
+ }
939
+ get id() {
940
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
941
+ }
942
+ set id(value) {
943
+ pb_1.Message.setField(this, 1, value);
944
+ }
945
+ get date() {
946
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
947
+ }
948
+ set date(value) {
949
+ pb_1.Message.setField(this, 2, value);
950
+ }
951
+ get status() {
952
+ return pb_1.Message.getFieldWithDefault(this, 3, EODStatus.EOD_PENDING);
953
+ }
954
+ set status(value) {
955
+ pb_1.Message.setField(this, 3, value);
956
+ }
957
+ get totalTransactions() {
958
+ return pb_1.Message.getFieldWithDefault(this, 4, 0);
959
+ }
960
+ set totalTransactions(value) {
961
+ pb_1.Message.setField(this, 4, value);
962
+ }
963
+ get totalAmount() {
964
+ return pb_1.Message.getFieldWithDefault(this, 5, 0);
965
+ }
966
+ set totalAmount(value) {
967
+ pb_1.Message.setField(this, 5, value);
968
+ }
969
+ get successfulTransactions() {
970
+ return pb_1.Message.getFieldWithDefault(this, 6, 0);
971
+ }
972
+ set successfulTransactions(value) {
973
+ pb_1.Message.setField(this, 6, value);
974
+ }
975
+ get failedTransactions() {
976
+ return pb_1.Message.getFieldWithDefault(this, 7, 0);
977
+ }
978
+ set failedTransactions(value) {
979
+ pb_1.Message.setField(this, 7, value);
980
+ }
981
+ get reversedTransactions() {
982
+ return pb_1.Message.getFieldWithDefault(this, 8, 0);
983
+ }
984
+ set reversedTransactions(value) {
985
+ pb_1.Message.setField(this, 8, value);
986
+ }
987
+ get settlementBatches() {
988
+ return pb_1.Message.getRepeatedWrapperField(this, SettlementBatchSummary, 9);
989
+ }
990
+ set settlementBatches(value) {
991
+ pb_1.Message.setRepeatedWrapperField(this, 9, value);
992
+ }
993
+ get reconciliationResults() {
994
+ return pb_1.Message.getRepeatedWrapperField(this, ReconciliationSummary, 10);
995
+ }
996
+ set reconciliationResults(value) {
997
+ pb_1.Message.setRepeatedWrapperField(this, 10, value);
998
+ }
999
+ get startedAt() {
1000
+ return pb_1.Message.getFieldWithDefault(this, 11, 0);
1001
+ }
1002
+ set startedAt(value) {
1003
+ pb_1.Message.setField(this, 11, value);
1004
+ }
1005
+ get completedAt() {
1006
+ return pb_1.Message.getFieldWithDefault(this, 12, 0);
1007
+ }
1008
+ set completedAt(value) {
1009
+ pb_1.Message.setField(this, 12, value);
1010
+ }
1011
+ get errorMessage() {
1012
+ return pb_1.Message.getFieldWithDefault(this, 13, "");
1013
+ }
1014
+ set errorMessage(value) {
1015
+ pb_1.Message.setOneofField(this, 13, this.#one_of_decls[0], value);
1016
+ }
1017
+ get hasErrorMessage() {
1018
+ return pb_1.Message.getField(this, 13) != null;
1019
+ }
1020
+ get _error_message() {
1021
+ const cases = {
1022
+ 0: "none",
1023
+ 13: "errorMessage"
1024
+ };
1025
+ return cases[pb_1.Message.computeOneofCase(this, [13])];
1026
+ }
1027
+ static fromObject(data) {
1028
+ const message = new EODRunData({});
1029
+ if (data.id != null) {
1030
+ message.id = data.id;
1031
+ }
1032
+ if (data.date != null) {
1033
+ message.date = data.date;
1034
+ }
1035
+ if (data.status != null) {
1036
+ message.status = data.status;
1037
+ }
1038
+ if (data.totalTransactions != null) {
1039
+ message.totalTransactions = data.totalTransactions;
1040
+ }
1041
+ if (data.totalAmount != null) {
1042
+ message.totalAmount = data.totalAmount;
1043
+ }
1044
+ if (data.successfulTransactions != null) {
1045
+ message.successfulTransactions = data.successfulTransactions;
1046
+ }
1047
+ if (data.failedTransactions != null) {
1048
+ message.failedTransactions = data.failedTransactions;
1049
+ }
1050
+ if (data.reversedTransactions != null) {
1051
+ message.reversedTransactions = data.reversedTransactions;
1052
+ }
1053
+ if (data.settlementBatches != null) {
1054
+ message.settlementBatches = data.settlementBatches.map(item => SettlementBatchSummary.fromObject(item));
1055
+ }
1056
+ if (data.reconciliationResults != null) {
1057
+ message.reconciliationResults = data.reconciliationResults.map(item => ReconciliationSummary.fromObject(item));
1058
+ }
1059
+ if (data.startedAt != null) {
1060
+ message.startedAt = data.startedAt;
1061
+ }
1062
+ if (data.completedAt != null) {
1063
+ message.completedAt = data.completedAt;
1064
+ }
1065
+ if (data.errorMessage != null) {
1066
+ message.errorMessage = data.errorMessage;
1067
+ }
1068
+ return message;
1069
+ }
1070
+ toObject() {
1071
+ const data = {};
1072
+ if (this.id != null) {
1073
+ data.id = this.id;
1074
+ }
1075
+ if (this.date != null) {
1076
+ data.date = this.date;
1077
+ }
1078
+ if (this.status != null) {
1079
+ data.status = this.status;
1080
+ }
1081
+ if (this.totalTransactions != null) {
1082
+ data.totalTransactions = this.totalTransactions;
1083
+ }
1084
+ if (this.totalAmount != null) {
1085
+ data.totalAmount = this.totalAmount;
1086
+ }
1087
+ if (this.successfulTransactions != null) {
1088
+ data.successfulTransactions = this.successfulTransactions;
1089
+ }
1090
+ if (this.failedTransactions != null) {
1091
+ data.failedTransactions = this.failedTransactions;
1092
+ }
1093
+ if (this.reversedTransactions != null) {
1094
+ data.reversedTransactions = this.reversedTransactions;
1095
+ }
1096
+ if (this.settlementBatches != null) {
1097
+ data.settlementBatches = this.settlementBatches.map((item) => item.toObject());
1098
+ }
1099
+ if (this.reconciliationResults != null) {
1100
+ data.reconciliationResults = this.reconciliationResults.map((item) => item.toObject());
1101
+ }
1102
+ if (this.startedAt != null) {
1103
+ data.startedAt = this.startedAt;
1104
+ }
1105
+ if (this.completedAt != null) {
1106
+ data.completedAt = this.completedAt;
1107
+ }
1108
+ if (this.errorMessage != null) {
1109
+ data.errorMessage = this.errorMessage;
1110
+ }
1111
+ return data;
1112
+ }
1113
+ serialize(w) {
1114
+ const writer = w || new pb_1.BinaryWriter();
1115
+ if (this.id.length)
1116
+ writer.writeString(1, this.id);
1117
+ if (this.date.length)
1118
+ writer.writeString(2, this.date);
1119
+ if (this.status != EODStatus.EOD_PENDING)
1120
+ writer.writeEnum(3, this.status);
1121
+ if (this.totalTransactions != 0)
1122
+ writer.writeInt64(4, this.totalTransactions);
1123
+ if (this.totalAmount != 0)
1124
+ writer.writeInt64(5, this.totalAmount);
1125
+ if (this.successfulTransactions != 0)
1126
+ writer.writeInt64(6, this.successfulTransactions);
1127
+ if (this.failedTransactions != 0)
1128
+ writer.writeInt64(7, this.failedTransactions);
1129
+ if (this.reversedTransactions != 0)
1130
+ writer.writeInt64(8, this.reversedTransactions);
1131
+ if (this.settlementBatches.length)
1132
+ writer.writeRepeatedMessage(9, this.settlementBatches, (item) => item.serialize(writer));
1133
+ if (this.reconciliationResults.length)
1134
+ writer.writeRepeatedMessage(10, this.reconciliationResults, (item) => item.serialize(writer));
1135
+ if (this.startedAt != 0)
1136
+ writer.writeInt64(11, this.startedAt);
1137
+ if (this.completedAt != 0)
1138
+ writer.writeInt64(12, this.completedAt);
1139
+ if (this.hasErrorMessage)
1140
+ writer.writeString(13, this.errorMessage);
1141
+ if (!w)
1142
+ return writer.getResultBuffer();
1143
+ }
1144
+ static deserialize(bytes) {
1145
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new EODRunData();
1146
+ while (reader.nextField()) {
1147
+ if (reader.isEndGroup())
1148
+ break;
1149
+ switch (reader.getFieldNumber()) {
1150
+ case 1:
1151
+ message.id = reader.readString();
1152
+ break;
1153
+ case 2:
1154
+ message.date = reader.readString();
1155
+ break;
1156
+ case 3:
1157
+ message.status = reader.readEnum();
1158
+ break;
1159
+ case 4:
1160
+ message.totalTransactions = reader.readInt64();
1161
+ break;
1162
+ case 5:
1163
+ message.totalAmount = reader.readInt64();
1164
+ break;
1165
+ case 6:
1166
+ message.successfulTransactions = reader.readInt64();
1167
+ break;
1168
+ case 7:
1169
+ message.failedTransactions = reader.readInt64();
1170
+ break;
1171
+ case 8:
1172
+ message.reversedTransactions = reader.readInt64();
1173
+ break;
1174
+ case 9:
1175
+ reader.readMessage(message.settlementBatches, () => pb_1.Message.addToRepeatedWrapperField(message, 9, SettlementBatchSummary.deserialize(reader), SettlementBatchSummary));
1176
+ break;
1177
+ case 10:
1178
+ reader.readMessage(message.reconciliationResults, () => pb_1.Message.addToRepeatedWrapperField(message, 10, ReconciliationSummary.deserialize(reader), ReconciliationSummary));
1179
+ break;
1180
+ case 11:
1181
+ message.startedAt = reader.readInt64();
1182
+ break;
1183
+ case 12:
1184
+ message.completedAt = reader.readInt64();
1185
+ break;
1186
+ case 13:
1187
+ message.errorMessage = reader.readString();
1188
+ break;
1189
+ default: reader.skipField();
1190
+ }
1191
+ }
1192
+ return message;
1193
+ }
1194
+ serializeBinary() {
1195
+ return this.serialize();
1196
+ }
1197
+ static deserializeBinary(bytes) {
1198
+ return EODRunData.deserialize(bytes);
1199
+ }
1200
+ }
1201
+ eod.EODRunData = EODRunData;
1202
+ class ReconciliationData extends pb_1.Message {
1203
+ #one_of_decls = [];
1204
+ constructor(data) {
1205
+ super();
1206
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [8], this.#one_of_decls);
1207
+ if (!Array.isArray(data) && typeof data == "object") {
1208
+ if ("merchantId" in data && data.merchantId != undefined) {
1209
+ this.merchantId = data.merchantId;
1210
+ }
1211
+ if ("date" in data && data.date != undefined) {
1212
+ this.date = data.date;
1213
+ }
1214
+ if ("status" in data && data.status != undefined) {
1215
+ this.status = data.status;
1216
+ }
1217
+ if ("localTransactionCount" in data && data.localTransactionCount != undefined) {
1218
+ this.localTransactionCount = data.localTransactionCount;
1219
+ }
1220
+ if ("localTotalAmount" in data && data.localTotalAmount != undefined) {
1221
+ this.localTotalAmount = data.localTotalAmount;
1222
+ }
1223
+ if ("processorTransactionCount" in data && data.processorTransactionCount != undefined) {
1224
+ this.processorTransactionCount = data.processorTransactionCount;
1225
+ }
1226
+ if ("processorTotalAmount" in data && data.processorTotalAmount != undefined) {
1227
+ this.processorTotalAmount = data.processorTotalAmount;
1228
+ }
1229
+ if ("discrepancies" in data && data.discrepancies != undefined) {
1230
+ this.discrepancies = data.discrepancies;
1231
+ }
1232
+ if ("reconciledAt" in data && data.reconciledAt != undefined) {
1233
+ this.reconciledAt = data.reconciledAt;
1234
+ }
1235
+ }
1236
+ }
1237
+ get merchantId() {
1238
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
1239
+ }
1240
+ set merchantId(value) {
1241
+ pb_1.Message.setField(this, 1, value);
1242
+ }
1243
+ get date() {
1244
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
1245
+ }
1246
+ set date(value) {
1247
+ pb_1.Message.setField(this, 2, value);
1248
+ }
1249
+ get status() {
1250
+ return pb_1.Message.getFieldWithDefault(this, 3, ReconciliationStatus.RECON_PENDING);
1251
+ }
1252
+ set status(value) {
1253
+ pb_1.Message.setField(this, 3, value);
1254
+ }
1255
+ get localTransactionCount() {
1256
+ return pb_1.Message.getFieldWithDefault(this, 4, 0);
1257
+ }
1258
+ set localTransactionCount(value) {
1259
+ pb_1.Message.setField(this, 4, value);
1260
+ }
1261
+ get localTotalAmount() {
1262
+ return pb_1.Message.getFieldWithDefault(this, 5, 0);
1263
+ }
1264
+ set localTotalAmount(value) {
1265
+ pb_1.Message.setField(this, 5, value);
1266
+ }
1267
+ get processorTransactionCount() {
1268
+ return pb_1.Message.getFieldWithDefault(this, 6, 0);
1269
+ }
1270
+ set processorTransactionCount(value) {
1271
+ pb_1.Message.setField(this, 6, value);
1272
+ }
1273
+ get processorTotalAmount() {
1274
+ return pb_1.Message.getFieldWithDefault(this, 7, 0);
1275
+ }
1276
+ set processorTotalAmount(value) {
1277
+ pb_1.Message.setField(this, 7, value);
1278
+ }
1279
+ get discrepancies() {
1280
+ return pb_1.Message.getRepeatedWrapperField(this, ReconciliationDiscrepancy, 8);
1281
+ }
1282
+ set discrepancies(value) {
1283
+ pb_1.Message.setRepeatedWrapperField(this, 8, value);
1284
+ }
1285
+ get reconciledAt() {
1286
+ return pb_1.Message.getFieldWithDefault(this, 9, 0);
1287
+ }
1288
+ set reconciledAt(value) {
1289
+ pb_1.Message.setField(this, 9, value);
1290
+ }
1291
+ static fromObject(data) {
1292
+ const message = new ReconciliationData({});
1293
+ if (data.merchantId != null) {
1294
+ message.merchantId = data.merchantId;
1295
+ }
1296
+ if (data.date != null) {
1297
+ message.date = data.date;
1298
+ }
1299
+ if (data.status != null) {
1300
+ message.status = data.status;
1301
+ }
1302
+ if (data.localTransactionCount != null) {
1303
+ message.localTransactionCount = data.localTransactionCount;
1304
+ }
1305
+ if (data.localTotalAmount != null) {
1306
+ message.localTotalAmount = data.localTotalAmount;
1307
+ }
1308
+ if (data.processorTransactionCount != null) {
1309
+ message.processorTransactionCount = data.processorTransactionCount;
1310
+ }
1311
+ if (data.processorTotalAmount != null) {
1312
+ message.processorTotalAmount = data.processorTotalAmount;
1313
+ }
1314
+ if (data.discrepancies != null) {
1315
+ message.discrepancies = data.discrepancies.map(item => ReconciliationDiscrepancy.fromObject(item));
1316
+ }
1317
+ if (data.reconciledAt != null) {
1318
+ message.reconciledAt = data.reconciledAt;
1319
+ }
1320
+ return message;
1321
+ }
1322
+ toObject() {
1323
+ const data = {};
1324
+ if (this.merchantId != null) {
1325
+ data.merchantId = this.merchantId;
1326
+ }
1327
+ if (this.date != null) {
1328
+ data.date = this.date;
1329
+ }
1330
+ if (this.status != null) {
1331
+ data.status = this.status;
1332
+ }
1333
+ if (this.localTransactionCount != null) {
1334
+ data.localTransactionCount = this.localTransactionCount;
1335
+ }
1336
+ if (this.localTotalAmount != null) {
1337
+ data.localTotalAmount = this.localTotalAmount;
1338
+ }
1339
+ if (this.processorTransactionCount != null) {
1340
+ data.processorTransactionCount = this.processorTransactionCount;
1341
+ }
1342
+ if (this.processorTotalAmount != null) {
1343
+ data.processorTotalAmount = this.processorTotalAmount;
1344
+ }
1345
+ if (this.discrepancies != null) {
1346
+ data.discrepancies = this.discrepancies.map((item) => item.toObject());
1347
+ }
1348
+ if (this.reconciledAt != null) {
1349
+ data.reconciledAt = this.reconciledAt;
1350
+ }
1351
+ return data;
1352
+ }
1353
+ serialize(w) {
1354
+ const writer = w || new pb_1.BinaryWriter();
1355
+ if (this.merchantId.length)
1356
+ writer.writeString(1, this.merchantId);
1357
+ if (this.date.length)
1358
+ writer.writeString(2, this.date);
1359
+ if (this.status != ReconciliationStatus.RECON_PENDING)
1360
+ writer.writeEnum(3, this.status);
1361
+ if (this.localTransactionCount != 0)
1362
+ writer.writeInt64(4, this.localTransactionCount);
1363
+ if (this.localTotalAmount != 0)
1364
+ writer.writeInt64(5, this.localTotalAmount);
1365
+ if (this.processorTransactionCount != 0)
1366
+ writer.writeInt64(6, this.processorTransactionCount);
1367
+ if (this.processorTotalAmount != 0)
1368
+ writer.writeInt64(7, this.processorTotalAmount);
1369
+ if (this.discrepancies.length)
1370
+ writer.writeRepeatedMessage(8, this.discrepancies, (item) => item.serialize(writer));
1371
+ if (this.reconciledAt != 0)
1372
+ writer.writeInt64(9, this.reconciledAt);
1373
+ if (!w)
1374
+ return writer.getResultBuffer();
1375
+ }
1376
+ static deserialize(bytes) {
1377
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ReconciliationData();
1378
+ while (reader.nextField()) {
1379
+ if (reader.isEndGroup())
1380
+ break;
1381
+ switch (reader.getFieldNumber()) {
1382
+ case 1:
1383
+ message.merchantId = reader.readString();
1384
+ break;
1385
+ case 2:
1386
+ message.date = reader.readString();
1387
+ break;
1388
+ case 3:
1389
+ message.status = reader.readEnum();
1390
+ break;
1391
+ case 4:
1392
+ message.localTransactionCount = reader.readInt64();
1393
+ break;
1394
+ case 5:
1395
+ message.localTotalAmount = reader.readInt64();
1396
+ break;
1397
+ case 6:
1398
+ message.processorTransactionCount = reader.readInt64();
1399
+ break;
1400
+ case 7:
1401
+ message.processorTotalAmount = reader.readInt64();
1402
+ break;
1403
+ case 8:
1404
+ reader.readMessage(message.discrepancies, () => pb_1.Message.addToRepeatedWrapperField(message, 8, ReconciliationDiscrepancy.deserialize(reader), ReconciliationDiscrepancy));
1405
+ break;
1406
+ case 9:
1407
+ message.reconciledAt = reader.readInt64();
1408
+ break;
1409
+ default: reader.skipField();
1410
+ }
1411
+ }
1412
+ return message;
1413
+ }
1414
+ serializeBinary() {
1415
+ return this.serialize();
1416
+ }
1417
+ static deserializeBinary(bytes) {
1418
+ return ReconciliationData.deserialize(bytes);
1419
+ }
1420
+ }
1421
+ eod.ReconciliationData = ReconciliationData;
1422
+ class SettlementBatchData extends pb_1.Message {
1423
+ #one_of_decls = [];
1424
+ constructor(data) {
1425
+ super();
1426
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls);
1427
+ if (!Array.isArray(data) && typeof data == "object") {
1428
+ if ("id" in data && data.id != undefined) {
1429
+ this.id = data.id;
1430
+ }
1431
+ if ("merchantId" in data && data.merchantId != undefined) {
1432
+ this.merchantId = data.merchantId;
1433
+ }
1434
+ if ("date" in data && data.date != undefined) {
1435
+ this.date = data.date;
1436
+ }
1437
+ if ("transactionCount" in data && data.transactionCount != undefined) {
1438
+ this.transactionCount = data.transactionCount;
1439
+ }
1440
+ if ("totalAmount" in data && data.totalAmount != undefined) {
1441
+ this.totalAmount = data.totalAmount;
1442
+ }
1443
+ if ("status" in data && data.status != undefined) {
1444
+ this.status = data.status;
1445
+ }
1446
+ if ("transactions" in data && data.transactions != undefined) {
1447
+ this.transactions = data.transactions;
1448
+ }
1449
+ if ("createdAt" in data && data.createdAt != undefined) {
1450
+ this.createdAt = data.createdAt;
1451
+ }
1452
+ if ("processedAt" in data && data.processedAt != undefined) {
1453
+ this.processedAt = data.processedAt;
1454
+ }
1455
+ }
1456
+ }
1457
+ get id() {
1458
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
1459
+ }
1460
+ set id(value) {
1461
+ pb_1.Message.setField(this, 1, value);
1462
+ }
1463
+ get merchantId() {
1464
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
1465
+ }
1466
+ set merchantId(value) {
1467
+ pb_1.Message.setField(this, 2, value);
1468
+ }
1469
+ get date() {
1470
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
1471
+ }
1472
+ set date(value) {
1473
+ pb_1.Message.setField(this, 3, value);
1474
+ }
1475
+ get transactionCount() {
1476
+ return pb_1.Message.getFieldWithDefault(this, 4, 0);
1477
+ }
1478
+ set transactionCount(value) {
1479
+ pb_1.Message.setField(this, 4, value);
1480
+ }
1481
+ get totalAmount() {
1482
+ return pb_1.Message.getFieldWithDefault(this, 5, 0);
1483
+ }
1484
+ set totalAmount(value) {
1485
+ pb_1.Message.setField(this, 5, value);
1486
+ }
1487
+ get status() {
1488
+ return pb_1.Message.getFieldWithDefault(this, 6, SettlementStatus.SETTLEMENT_PENDING);
1489
+ }
1490
+ set status(value) {
1491
+ pb_1.Message.setField(this, 6, value);
1492
+ }
1493
+ get transactions() {
1494
+ return pb_1.Message.getRepeatedWrapperField(this, SettlementTransaction, 7);
1495
+ }
1496
+ set transactions(value) {
1497
+ pb_1.Message.setRepeatedWrapperField(this, 7, value);
1498
+ }
1499
+ get createdAt() {
1500
+ return pb_1.Message.getFieldWithDefault(this, 8, 0);
1501
+ }
1502
+ set createdAt(value) {
1503
+ pb_1.Message.setField(this, 8, value);
1504
+ }
1505
+ get processedAt() {
1506
+ return pb_1.Message.getFieldWithDefault(this, 9, 0);
1507
+ }
1508
+ set processedAt(value) {
1509
+ pb_1.Message.setField(this, 9, value);
1510
+ }
1511
+ static fromObject(data) {
1512
+ const message = new SettlementBatchData({});
1513
+ if (data.id != null) {
1514
+ message.id = data.id;
1515
+ }
1516
+ if (data.merchantId != null) {
1517
+ message.merchantId = data.merchantId;
1518
+ }
1519
+ if (data.date != null) {
1520
+ message.date = data.date;
1521
+ }
1522
+ if (data.transactionCount != null) {
1523
+ message.transactionCount = data.transactionCount;
1524
+ }
1525
+ if (data.totalAmount != null) {
1526
+ message.totalAmount = data.totalAmount;
1527
+ }
1528
+ if (data.status != null) {
1529
+ message.status = data.status;
1530
+ }
1531
+ if (data.transactions != null) {
1532
+ message.transactions = data.transactions.map(item => SettlementTransaction.fromObject(item));
1533
+ }
1534
+ if (data.createdAt != null) {
1535
+ message.createdAt = data.createdAt;
1536
+ }
1537
+ if (data.processedAt != null) {
1538
+ message.processedAt = data.processedAt;
1539
+ }
1540
+ return message;
1541
+ }
1542
+ toObject() {
1543
+ const data = {};
1544
+ if (this.id != null) {
1545
+ data.id = this.id;
1546
+ }
1547
+ if (this.merchantId != null) {
1548
+ data.merchantId = this.merchantId;
1549
+ }
1550
+ if (this.date != null) {
1551
+ data.date = this.date;
1552
+ }
1553
+ if (this.transactionCount != null) {
1554
+ data.transactionCount = this.transactionCount;
1555
+ }
1556
+ if (this.totalAmount != null) {
1557
+ data.totalAmount = this.totalAmount;
1558
+ }
1559
+ if (this.status != null) {
1560
+ data.status = this.status;
1561
+ }
1562
+ if (this.transactions != null) {
1563
+ data.transactions = this.transactions.map((item) => item.toObject());
1564
+ }
1565
+ if (this.createdAt != null) {
1566
+ data.createdAt = this.createdAt;
1567
+ }
1568
+ if (this.processedAt != null) {
1569
+ data.processedAt = this.processedAt;
1570
+ }
1571
+ return data;
1572
+ }
1573
+ serialize(w) {
1574
+ const writer = w || new pb_1.BinaryWriter();
1575
+ if (this.id.length)
1576
+ writer.writeString(1, this.id);
1577
+ if (this.merchantId.length)
1578
+ writer.writeString(2, this.merchantId);
1579
+ if (this.date.length)
1580
+ writer.writeString(3, this.date);
1581
+ if (this.transactionCount != 0)
1582
+ writer.writeInt64(4, this.transactionCount);
1583
+ if (this.totalAmount != 0)
1584
+ writer.writeInt64(5, this.totalAmount);
1585
+ if (this.status != SettlementStatus.SETTLEMENT_PENDING)
1586
+ writer.writeEnum(6, this.status);
1587
+ if (this.transactions.length)
1588
+ writer.writeRepeatedMessage(7, this.transactions, (item) => item.serialize(writer));
1589
+ if (this.createdAt != 0)
1590
+ writer.writeInt64(8, this.createdAt);
1591
+ if (this.processedAt != 0)
1592
+ writer.writeInt64(9, this.processedAt);
1593
+ if (!w)
1594
+ return writer.getResultBuffer();
1595
+ }
1596
+ static deserialize(bytes) {
1597
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SettlementBatchData();
1598
+ while (reader.nextField()) {
1599
+ if (reader.isEndGroup())
1600
+ break;
1601
+ switch (reader.getFieldNumber()) {
1602
+ case 1:
1603
+ message.id = reader.readString();
1604
+ break;
1605
+ case 2:
1606
+ message.merchantId = reader.readString();
1607
+ break;
1608
+ case 3:
1609
+ message.date = reader.readString();
1610
+ break;
1611
+ case 4:
1612
+ message.transactionCount = reader.readInt64();
1613
+ break;
1614
+ case 5:
1615
+ message.totalAmount = reader.readInt64();
1616
+ break;
1617
+ case 6:
1618
+ message.status = reader.readEnum();
1619
+ break;
1620
+ case 7:
1621
+ reader.readMessage(message.transactions, () => pb_1.Message.addToRepeatedWrapperField(message, 7, SettlementTransaction.deserialize(reader), SettlementTransaction));
1622
+ break;
1623
+ case 8:
1624
+ message.createdAt = reader.readInt64();
1625
+ break;
1626
+ case 9:
1627
+ message.processedAt = reader.readInt64();
1628
+ break;
1629
+ default: reader.skipField();
1630
+ }
1631
+ }
1632
+ return message;
1633
+ }
1634
+ serializeBinary() {
1635
+ return this.serialize();
1636
+ }
1637
+ static deserializeBinary(bytes) {
1638
+ return SettlementBatchData.deserialize(bytes);
1639
+ }
1640
+ }
1641
+ eod.SettlementBatchData = SettlementBatchData;
1642
+ class SettlementBatchSummary extends pb_1.Message {
1643
+ #one_of_decls = [];
1644
+ constructor(data) {
1645
+ super();
1646
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
1647
+ if (!Array.isArray(data) && typeof data == "object") {
1648
+ if ("batchId" in data && data.batchId != undefined) {
1649
+ this.batchId = data.batchId;
1650
+ }
1651
+ if ("merchantId" in data && data.merchantId != undefined) {
1652
+ this.merchantId = data.merchantId;
1653
+ }
1654
+ if ("transactionCount" in data && data.transactionCount != undefined) {
1655
+ this.transactionCount = data.transactionCount;
1656
+ }
1657
+ if ("totalAmount" in data && data.totalAmount != undefined) {
1658
+ this.totalAmount = data.totalAmount;
1659
+ }
1660
+ if ("status" in data && data.status != undefined) {
1661
+ this.status = data.status;
1662
+ }
1663
+ }
1664
+ }
1665
+ get batchId() {
1666
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
1667
+ }
1668
+ set batchId(value) {
1669
+ pb_1.Message.setField(this, 1, value);
1670
+ }
1671
+ get merchantId() {
1672
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
1673
+ }
1674
+ set merchantId(value) {
1675
+ pb_1.Message.setField(this, 2, value);
1676
+ }
1677
+ get transactionCount() {
1678
+ return pb_1.Message.getFieldWithDefault(this, 3, 0);
1679
+ }
1680
+ set transactionCount(value) {
1681
+ pb_1.Message.setField(this, 3, value);
1682
+ }
1683
+ get totalAmount() {
1684
+ return pb_1.Message.getFieldWithDefault(this, 4, 0);
1685
+ }
1686
+ set totalAmount(value) {
1687
+ pb_1.Message.setField(this, 4, value);
1688
+ }
1689
+ get status() {
1690
+ return pb_1.Message.getFieldWithDefault(this, 5, SettlementStatus.SETTLEMENT_PENDING);
1691
+ }
1692
+ set status(value) {
1693
+ pb_1.Message.setField(this, 5, value);
1694
+ }
1695
+ static fromObject(data) {
1696
+ const message = new SettlementBatchSummary({});
1697
+ if (data.batchId != null) {
1698
+ message.batchId = data.batchId;
1699
+ }
1700
+ if (data.merchantId != null) {
1701
+ message.merchantId = data.merchantId;
1702
+ }
1703
+ if (data.transactionCount != null) {
1704
+ message.transactionCount = data.transactionCount;
1705
+ }
1706
+ if (data.totalAmount != null) {
1707
+ message.totalAmount = data.totalAmount;
1708
+ }
1709
+ if (data.status != null) {
1710
+ message.status = data.status;
1711
+ }
1712
+ return message;
1713
+ }
1714
+ toObject() {
1715
+ const data = {};
1716
+ if (this.batchId != null) {
1717
+ data.batchId = this.batchId;
1718
+ }
1719
+ if (this.merchantId != null) {
1720
+ data.merchantId = this.merchantId;
1721
+ }
1722
+ if (this.transactionCount != null) {
1723
+ data.transactionCount = this.transactionCount;
1724
+ }
1725
+ if (this.totalAmount != null) {
1726
+ data.totalAmount = this.totalAmount;
1727
+ }
1728
+ if (this.status != null) {
1729
+ data.status = this.status;
1730
+ }
1731
+ return data;
1732
+ }
1733
+ serialize(w) {
1734
+ const writer = w || new pb_1.BinaryWriter();
1735
+ if (this.batchId.length)
1736
+ writer.writeString(1, this.batchId);
1737
+ if (this.merchantId.length)
1738
+ writer.writeString(2, this.merchantId);
1739
+ if (this.transactionCount != 0)
1740
+ writer.writeInt64(3, this.transactionCount);
1741
+ if (this.totalAmount != 0)
1742
+ writer.writeInt64(4, this.totalAmount);
1743
+ if (this.status != SettlementStatus.SETTLEMENT_PENDING)
1744
+ writer.writeEnum(5, this.status);
1745
+ if (!w)
1746
+ return writer.getResultBuffer();
1747
+ }
1748
+ static deserialize(bytes) {
1749
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SettlementBatchSummary();
1750
+ while (reader.nextField()) {
1751
+ if (reader.isEndGroup())
1752
+ break;
1753
+ switch (reader.getFieldNumber()) {
1754
+ case 1:
1755
+ message.batchId = reader.readString();
1756
+ break;
1757
+ case 2:
1758
+ message.merchantId = reader.readString();
1759
+ break;
1760
+ case 3:
1761
+ message.transactionCount = reader.readInt64();
1762
+ break;
1763
+ case 4:
1764
+ message.totalAmount = reader.readInt64();
1765
+ break;
1766
+ case 5:
1767
+ message.status = reader.readEnum();
1768
+ break;
1769
+ default: reader.skipField();
1770
+ }
1771
+ }
1772
+ return message;
1773
+ }
1774
+ serializeBinary() {
1775
+ return this.serialize();
1776
+ }
1777
+ static deserializeBinary(bytes) {
1778
+ return SettlementBatchSummary.deserialize(bytes);
1779
+ }
1780
+ }
1781
+ eod.SettlementBatchSummary = SettlementBatchSummary;
1782
+ class ReconciliationSummary extends pb_1.Message {
1783
+ #one_of_decls = [];
1784
+ constructor(data) {
1785
+ super();
1786
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
1787
+ if (!Array.isArray(data) && typeof data == "object") {
1788
+ if ("merchantId" in data && data.merchantId != undefined) {
1789
+ this.merchantId = data.merchantId;
1790
+ }
1791
+ if ("status" in data && data.status != undefined) {
1792
+ this.status = data.status;
1793
+ }
1794
+ if ("discrepancyCount" in data && data.discrepancyCount != undefined) {
1795
+ this.discrepancyCount = data.discrepancyCount;
1796
+ }
1797
+ if ("amountVariance" in data && data.amountVariance != undefined) {
1798
+ this.amountVariance = data.amountVariance;
1799
+ }
1800
+ }
1801
+ }
1802
+ get merchantId() {
1803
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
1804
+ }
1805
+ set merchantId(value) {
1806
+ pb_1.Message.setField(this, 1, value);
1807
+ }
1808
+ get status() {
1809
+ return pb_1.Message.getFieldWithDefault(this, 2, ReconciliationStatus.RECON_PENDING);
1810
+ }
1811
+ set status(value) {
1812
+ pb_1.Message.setField(this, 2, value);
1813
+ }
1814
+ get discrepancyCount() {
1815
+ return pb_1.Message.getFieldWithDefault(this, 3, 0);
1816
+ }
1817
+ set discrepancyCount(value) {
1818
+ pb_1.Message.setField(this, 3, value);
1819
+ }
1820
+ get amountVariance() {
1821
+ return pb_1.Message.getFieldWithDefault(this, 4, 0);
1822
+ }
1823
+ set amountVariance(value) {
1824
+ pb_1.Message.setField(this, 4, value);
1825
+ }
1826
+ static fromObject(data) {
1827
+ const message = new ReconciliationSummary({});
1828
+ if (data.merchantId != null) {
1829
+ message.merchantId = data.merchantId;
1830
+ }
1831
+ if (data.status != null) {
1832
+ message.status = data.status;
1833
+ }
1834
+ if (data.discrepancyCount != null) {
1835
+ message.discrepancyCount = data.discrepancyCount;
1836
+ }
1837
+ if (data.amountVariance != null) {
1838
+ message.amountVariance = data.amountVariance;
1839
+ }
1840
+ return message;
1841
+ }
1842
+ toObject() {
1843
+ const data = {};
1844
+ if (this.merchantId != null) {
1845
+ data.merchantId = this.merchantId;
1846
+ }
1847
+ if (this.status != null) {
1848
+ data.status = this.status;
1849
+ }
1850
+ if (this.discrepancyCount != null) {
1851
+ data.discrepancyCount = this.discrepancyCount;
1852
+ }
1853
+ if (this.amountVariance != null) {
1854
+ data.amountVariance = this.amountVariance;
1855
+ }
1856
+ return data;
1857
+ }
1858
+ serialize(w) {
1859
+ const writer = w || new pb_1.BinaryWriter();
1860
+ if (this.merchantId.length)
1861
+ writer.writeString(1, this.merchantId);
1862
+ if (this.status != ReconciliationStatus.RECON_PENDING)
1863
+ writer.writeEnum(2, this.status);
1864
+ if (this.discrepancyCount != 0)
1865
+ writer.writeInt64(3, this.discrepancyCount);
1866
+ if (this.amountVariance != 0)
1867
+ writer.writeInt64(4, this.amountVariance);
1868
+ if (!w)
1869
+ return writer.getResultBuffer();
1870
+ }
1871
+ static deserialize(bytes) {
1872
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ReconciliationSummary();
1873
+ while (reader.nextField()) {
1874
+ if (reader.isEndGroup())
1875
+ break;
1876
+ switch (reader.getFieldNumber()) {
1877
+ case 1:
1878
+ message.merchantId = reader.readString();
1879
+ break;
1880
+ case 2:
1881
+ message.status = reader.readEnum();
1882
+ break;
1883
+ case 3:
1884
+ message.discrepancyCount = reader.readInt64();
1885
+ break;
1886
+ case 4:
1887
+ message.amountVariance = reader.readInt64();
1888
+ break;
1889
+ default: reader.skipField();
1890
+ }
1891
+ }
1892
+ return message;
1893
+ }
1894
+ serializeBinary() {
1895
+ return this.serialize();
1896
+ }
1897
+ static deserializeBinary(bytes) {
1898
+ return ReconciliationSummary.deserialize(bytes);
1899
+ }
1900
+ }
1901
+ eod.ReconciliationSummary = ReconciliationSummary;
1902
+ class ReconciliationDiscrepancy extends pb_1.Message {
1903
+ #one_of_decls = [];
1904
+ constructor(data) {
1905
+ super();
1906
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
1907
+ if (!Array.isArray(data) && typeof data == "object") {
1908
+ if ("transactionId" in data && data.transactionId != undefined) {
1909
+ this.transactionId = data.transactionId;
1910
+ }
1911
+ if ("type" in data && data.type != undefined) {
1912
+ this.type = data.type;
1913
+ }
1914
+ if ("description" in data && data.description != undefined) {
1915
+ this.description = data.description;
1916
+ }
1917
+ if ("localAmount" in data && data.localAmount != undefined) {
1918
+ this.localAmount = data.localAmount;
1919
+ }
1920
+ if ("processorAmount" in data && data.processorAmount != undefined) {
1921
+ this.processorAmount = data.processorAmount;
1922
+ }
1923
+ }
1924
+ }
1925
+ get transactionId() {
1926
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
1927
+ }
1928
+ set transactionId(value) {
1929
+ pb_1.Message.setField(this, 1, value);
1930
+ }
1931
+ get type() {
1932
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
1933
+ }
1934
+ set type(value) {
1935
+ pb_1.Message.setField(this, 2, value);
1936
+ }
1937
+ get description() {
1938
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
1939
+ }
1940
+ set description(value) {
1941
+ pb_1.Message.setField(this, 3, value);
1942
+ }
1943
+ get localAmount() {
1944
+ return pb_1.Message.getFieldWithDefault(this, 4, 0);
1945
+ }
1946
+ set localAmount(value) {
1947
+ pb_1.Message.setField(this, 4, value);
1948
+ }
1949
+ get processorAmount() {
1950
+ return pb_1.Message.getFieldWithDefault(this, 5, 0);
1951
+ }
1952
+ set processorAmount(value) {
1953
+ pb_1.Message.setField(this, 5, value);
1954
+ }
1955
+ static fromObject(data) {
1956
+ const message = new ReconciliationDiscrepancy({});
1957
+ if (data.transactionId != null) {
1958
+ message.transactionId = data.transactionId;
1959
+ }
1960
+ if (data.type != null) {
1961
+ message.type = data.type;
1962
+ }
1963
+ if (data.description != null) {
1964
+ message.description = data.description;
1965
+ }
1966
+ if (data.localAmount != null) {
1967
+ message.localAmount = data.localAmount;
1968
+ }
1969
+ if (data.processorAmount != null) {
1970
+ message.processorAmount = data.processorAmount;
1971
+ }
1972
+ return message;
1973
+ }
1974
+ toObject() {
1975
+ const data = {};
1976
+ if (this.transactionId != null) {
1977
+ data.transactionId = this.transactionId;
1978
+ }
1979
+ if (this.type != null) {
1980
+ data.type = this.type;
1981
+ }
1982
+ if (this.description != null) {
1983
+ data.description = this.description;
1984
+ }
1985
+ if (this.localAmount != null) {
1986
+ data.localAmount = this.localAmount;
1987
+ }
1988
+ if (this.processorAmount != null) {
1989
+ data.processorAmount = this.processorAmount;
1990
+ }
1991
+ return data;
1992
+ }
1993
+ serialize(w) {
1994
+ const writer = w || new pb_1.BinaryWriter();
1995
+ if (this.transactionId.length)
1996
+ writer.writeString(1, this.transactionId);
1997
+ if (this.type.length)
1998
+ writer.writeString(2, this.type);
1999
+ if (this.description.length)
2000
+ writer.writeString(3, this.description);
2001
+ if (this.localAmount != 0)
2002
+ writer.writeInt64(4, this.localAmount);
2003
+ if (this.processorAmount != 0)
2004
+ writer.writeInt64(5, this.processorAmount);
2005
+ if (!w)
2006
+ return writer.getResultBuffer();
2007
+ }
2008
+ static deserialize(bytes) {
2009
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ReconciliationDiscrepancy();
2010
+ while (reader.nextField()) {
2011
+ if (reader.isEndGroup())
2012
+ break;
2013
+ switch (reader.getFieldNumber()) {
2014
+ case 1:
2015
+ message.transactionId = reader.readString();
2016
+ break;
2017
+ case 2:
2018
+ message.type = reader.readString();
2019
+ break;
2020
+ case 3:
2021
+ message.description = reader.readString();
2022
+ break;
2023
+ case 4:
2024
+ message.localAmount = reader.readInt64();
2025
+ break;
2026
+ case 5:
2027
+ message.processorAmount = reader.readInt64();
2028
+ break;
2029
+ default: reader.skipField();
2030
+ }
2031
+ }
2032
+ return message;
2033
+ }
2034
+ serializeBinary() {
2035
+ return this.serialize();
2036
+ }
2037
+ static deserializeBinary(bytes) {
2038
+ return ReconciliationDiscrepancy.deserialize(bytes);
2039
+ }
2040
+ }
2041
+ eod.ReconciliationDiscrepancy = ReconciliationDiscrepancy;
2042
+ class SettlementTransaction extends pb_1.Message {
2043
+ #one_of_decls = [];
2044
+ constructor(data) {
2045
+ super();
2046
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
2047
+ if (!Array.isArray(data) && typeof data == "object") {
2048
+ if ("transactionId" in data && data.transactionId != undefined) {
2049
+ this.transactionId = data.transactionId;
2050
+ }
2051
+ if ("reference" in data && data.reference != undefined) {
2052
+ this.reference = data.reference;
2053
+ }
2054
+ if ("amount" in data && data.amount != undefined) {
2055
+ this.amount = data.amount;
2056
+ }
2057
+ if ("status" in data && data.status != undefined) {
2058
+ this.status = data.status;
2059
+ }
2060
+ if ("timestamp" in data && data.timestamp != undefined) {
2061
+ this.timestamp = data.timestamp;
2062
+ }
2063
+ }
2064
+ }
2065
+ get transactionId() {
2066
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
2067
+ }
2068
+ set transactionId(value) {
2069
+ pb_1.Message.setField(this, 1, value);
2070
+ }
2071
+ get reference() {
2072
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
2073
+ }
2074
+ set reference(value) {
2075
+ pb_1.Message.setField(this, 2, value);
2076
+ }
2077
+ get amount() {
2078
+ return pb_1.Message.getFieldWithDefault(this, 3, 0);
2079
+ }
2080
+ set amount(value) {
2081
+ pb_1.Message.setField(this, 3, value);
2082
+ }
2083
+ get status() {
2084
+ return pb_1.Message.getFieldWithDefault(this, 4, "");
2085
+ }
2086
+ set status(value) {
2087
+ pb_1.Message.setField(this, 4, value);
2088
+ }
2089
+ get timestamp() {
2090
+ return pb_1.Message.getFieldWithDefault(this, 5, 0);
2091
+ }
2092
+ set timestamp(value) {
2093
+ pb_1.Message.setField(this, 5, value);
2094
+ }
2095
+ static fromObject(data) {
2096
+ const message = new SettlementTransaction({});
2097
+ if (data.transactionId != null) {
2098
+ message.transactionId = data.transactionId;
2099
+ }
2100
+ if (data.reference != null) {
2101
+ message.reference = data.reference;
2102
+ }
2103
+ if (data.amount != null) {
2104
+ message.amount = data.amount;
2105
+ }
2106
+ if (data.status != null) {
2107
+ message.status = data.status;
2108
+ }
2109
+ if (data.timestamp != null) {
2110
+ message.timestamp = data.timestamp;
2111
+ }
2112
+ return message;
2113
+ }
2114
+ toObject() {
2115
+ const data = {};
2116
+ if (this.transactionId != null) {
2117
+ data.transactionId = this.transactionId;
2118
+ }
2119
+ if (this.reference != null) {
2120
+ data.reference = this.reference;
2121
+ }
2122
+ if (this.amount != null) {
2123
+ data.amount = this.amount;
2124
+ }
2125
+ if (this.status != null) {
2126
+ data.status = this.status;
2127
+ }
2128
+ if (this.timestamp != null) {
2129
+ data.timestamp = this.timestamp;
2130
+ }
2131
+ return data;
2132
+ }
2133
+ serialize(w) {
2134
+ const writer = w || new pb_1.BinaryWriter();
2135
+ if (this.transactionId.length)
2136
+ writer.writeString(1, this.transactionId);
2137
+ if (this.reference.length)
2138
+ writer.writeString(2, this.reference);
2139
+ if (this.amount != 0)
2140
+ writer.writeInt64(3, this.amount);
2141
+ if (this.status.length)
2142
+ writer.writeString(4, this.status);
2143
+ if (this.timestamp != 0)
2144
+ writer.writeInt64(5, this.timestamp);
2145
+ if (!w)
2146
+ return writer.getResultBuffer();
2147
+ }
2148
+ static deserialize(bytes) {
2149
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SettlementTransaction();
2150
+ while (reader.nextField()) {
2151
+ if (reader.isEndGroup())
2152
+ break;
2153
+ switch (reader.getFieldNumber()) {
2154
+ case 1:
2155
+ message.transactionId = reader.readString();
2156
+ break;
2157
+ case 2:
2158
+ message.reference = reader.readString();
2159
+ break;
2160
+ case 3:
2161
+ message.amount = reader.readInt64();
2162
+ break;
2163
+ case 4:
2164
+ message.status = reader.readString();
2165
+ break;
2166
+ case 5:
2167
+ message.timestamp = reader.readInt64();
2168
+ break;
2169
+ default: reader.skipField();
2170
+ }
2171
+ }
2172
+ return message;
2173
+ }
2174
+ serializeBinary() {
2175
+ return this.serialize();
2176
+ }
2177
+ static deserializeBinary(bytes) {
2178
+ return SettlementTransaction.deserialize(bytes);
2179
+ }
2180
+ }
2181
+ eod.SettlementTransaction = SettlementTransaction;
2182
+ class PaginationInfo extends pb_1.Message {
2183
+ #one_of_decls = [];
2184
+ constructor(data) {
2185
+ super();
2186
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
2187
+ if (!Array.isArray(data) && typeof data == "object") {
2188
+ if ("page" in data && data.page != undefined) {
2189
+ this.page = data.page;
2190
+ }
2191
+ if ("limit" in data && data.limit != undefined) {
2192
+ this.limit = data.limit;
2193
+ }
2194
+ if ("total" in data && data.total != undefined) {
2195
+ this.total = data.total;
2196
+ }
2197
+ if ("totalPages" in data && data.totalPages != undefined) {
2198
+ this.totalPages = data.totalPages;
2199
+ }
2200
+ }
2201
+ }
2202
+ get page() {
2203
+ return pb_1.Message.getFieldWithDefault(this, 1, 0);
2204
+ }
2205
+ set page(value) {
2206
+ pb_1.Message.setField(this, 1, value);
2207
+ }
2208
+ get limit() {
2209
+ return pb_1.Message.getFieldWithDefault(this, 2, 0);
2210
+ }
2211
+ set limit(value) {
2212
+ pb_1.Message.setField(this, 2, value);
2213
+ }
2214
+ get total() {
2215
+ return pb_1.Message.getFieldWithDefault(this, 3, 0);
2216
+ }
2217
+ set total(value) {
2218
+ pb_1.Message.setField(this, 3, value);
2219
+ }
2220
+ get totalPages() {
2221
+ return pb_1.Message.getFieldWithDefault(this, 4, 0);
2222
+ }
2223
+ set totalPages(value) {
2224
+ pb_1.Message.setField(this, 4, value);
2225
+ }
2226
+ static fromObject(data) {
2227
+ const message = new PaginationInfo({});
2228
+ if (data.page != null) {
2229
+ message.page = data.page;
2230
+ }
2231
+ if (data.limit != null) {
2232
+ message.limit = data.limit;
2233
+ }
2234
+ if (data.total != null) {
2235
+ message.total = data.total;
2236
+ }
2237
+ if (data.totalPages != null) {
2238
+ message.totalPages = data.totalPages;
2239
+ }
2240
+ return message;
2241
+ }
2242
+ toObject() {
2243
+ const data = {};
2244
+ if (this.page != null) {
2245
+ data.page = this.page;
2246
+ }
2247
+ if (this.limit != null) {
2248
+ data.limit = this.limit;
2249
+ }
2250
+ if (this.total != null) {
2251
+ data.total = this.total;
2252
+ }
2253
+ if (this.totalPages != null) {
2254
+ data.totalPages = this.totalPages;
2255
+ }
2256
+ return data;
2257
+ }
2258
+ serialize(w) {
2259
+ const writer = w || new pb_1.BinaryWriter();
2260
+ if (this.page != 0)
2261
+ writer.writeInt32(1, this.page);
2262
+ if (this.limit != 0)
2263
+ writer.writeInt32(2, this.limit);
2264
+ if (this.total != 0)
2265
+ writer.writeInt64(3, this.total);
2266
+ if (this.totalPages != 0)
2267
+ writer.writeInt32(4, this.totalPages);
2268
+ if (!w)
2269
+ return writer.getResultBuffer();
2270
+ }
2271
+ static deserialize(bytes) {
2272
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PaginationInfo();
2273
+ while (reader.nextField()) {
2274
+ if (reader.isEndGroup())
2275
+ break;
2276
+ switch (reader.getFieldNumber()) {
2277
+ case 1:
2278
+ message.page = reader.readInt32();
2279
+ break;
2280
+ case 2:
2281
+ message.limit = reader.readInt32();
2282
+ break;
2283
+ case 3:
2284
+ message.total = reader.readInt64();
2285
+ break;
2286
+ case 4:
2287
+ message.totalPages = reader.readInt32();
2288
+ break;
2289
+ default: reader.skipField();
2290
+ }
2291
+ }
2292
+ return message;
2293
+ }
2294
+ serializeBinary() {
2295
+ return this.serialize();
2296
+ }
2297
+ static deserializeBinary(bytes) {
2298
+ return PaginationInfo.deserialize(bytes);
2299
+ }
2300
+ }
2301
+ eod.PaginationInfo = PaginationInfo;
2302
+ class UnimplementedEODServiceService {
2303
+ static definition = {
2304
+ RunEOD: {
2305
+ path: "/com.pkg.posv1.eod.EODService/RunEOD",
2306
+ requestStream: false,
2307
+ responseStream: false,
2308
+ requestSerialize: (message) => Buffer.from(message.serialize()),
2309
+ requestDeserialize: (bytes) => RunEODRequest.deserialize(new Uint8Array(bytes)),
2310
+ responseSerialize: (message) => Buffer.from(message.serialize()),
2311
+ responseDeserialize: (bytes) => RunEODResponse.deserialize(new Uint8Array(bytes))
2312
+ },
2313
+ GetReconciliationStatus: {
2314
+ path: "/com.pkg.posv1.eod.EODService/GetReconciliationStatus",
2315
+ requestStream: false,
2316
+ responseStream: false,
2317
+ requestSerialize: (message) => Buffer.from(message.serialize()),
2318
+ requestDeserialize: (bytes) => GetReconciliationStatusRequest.deserialize(new Uint8Array(bytes)),
2319
+ responseSerialize: (message) => Buffer.from(message.serialize()),
2320
+ responseDeserialize: (bytes) => GetReconciliationStatusResponse.deserialize(new Uint8Array(bytes))
2321
+ },
2322
+ GetSettlementBatch: {
2323
+ path: "/com.pkg.posv1.eod.EODService/GetSettlementBatch",
2324
+ requestStream: false,
2325
+ responseStream: false,
2326
+ requestSerialize: (message) => Buffer.from(message.serialize()),
2327
+ requestDeserialize: (bytes) => GetSettlementBatchRequest.deserialize(new Uint8Array(bytes)),
2328
+ responseSerialize: (message) => Buffer.from(message.serialize()),
2329
+ responseDeserialize: (bytes) => GetSettlementBatchResponse.deserialize(new Uint8Array(bytes))
2330
+ },
2331
+ GetEODHistory: {
2332
+ path: "/com.pkg.posv1.eod.EODService/GetEODHistory",
2333
+ requestStream: false,
2334
+ responseStream: false,
2335
+ requestSerialize: (message) => Buffer.from(message.serialize()),
2336
+ requestDeserialize: (bytes) => GetEODHistoryRequest.deserialize(new Uint8Array(bytes)),
2337
+ responseSerialize: (message) => Buffer.from(message.serialize()),
2338
+ responseDeserialize: (bytes) => GetEODHistoryResponse.deserialize(new Uint8Array(bytes))
2339
+ }
2340
+ };
2341
+ }
2342
+ eod.UnimplementedEODServiceService = UnimplementedEODServiceService;
2343
+ class EODServiceClient extends grpc_1.makeGenericClientConstructor(UnimplementedEODServiceService.definition, "EODService", {}) {
2344
+ constructor(address, credentials, options) {
2345
+ super(address, credentials, options);
2346
+ }
2347
+ RunEOD = (message, metadata, options) => {
2348
+ if (!metadata) {
2349
+ metadata = new grpc_1.Metadata;
2350
+ }
2351
+ if (!options) {
2352
+ options = {};
2353
+ }
2354
+ return new Promise((resolve, reject) => super.RunEOD(message, metadata, options, (error, response) => {
2355
+ if (error) {
2356
+ reject(error);
2357
+ }
2358
+ else {
2359
+ resolve(response);
2360
+ }
2361
+ }));
2362
+ };
2363
+ GetReconciliationStatus = (message, metadata, options) => {
2364
+ if (!metadata) {
2365
+ metadata = new grpc_1.Metadata;
2366
+ }
2367
+ if (!options) {
2368
+ options = {};
2369
+ }
2370
+ return new Promise((resolve, reject) => super.GetReconciliationStatus(message, metadata, options, (error, response) => {
2371
+ if (error) {
2372
+ reject(error);
2373
+ }
2374
+ else {
2375
+ resolve(response);
2376
+ }
2377
+ }));
2378
+ };
2379
+ GetSettlementBatch = (message, metadata, options) => {
2380
+ if (!metadata) {
2381
+ metadata = new grpc_1.Metadata;
2382
+ }
2383
+ if (!options) {
2384
+ options = {};
2385
+ }
2386
+ return new Promise((resolve, reject) => super.GetSettlementBatch(message, metadata, options, (error, response) => {
2387
+ if (error) {
2388
+ reject(error);
2389
+ }
2390
+ else {
2391
+ resolve(response);
2392
+ }
2393
+ }));
2394
+ };
2395
+ GetEODHistory = (message, metadata, options) => {
2396
+ if (!metadata) {
2397
+ metadata = new grpc_1.Metadata;
2398
+ }
2399
+ if (!options) {
2400
+ options = {};
2401
+ }
2402
+ return new Promise((resolve, reject) => super.GetEODHistory(message, metadata, options, (error, response) => {
2403
+ if (error) {
2404
+ reject(error);
2405
+ }
2406
+ else {
2407
+ resolve(response);
2408
+ }
2409
+ }));
2410
+ };
2411
+ }
2412
+ eod.EODServiceClient = EODServiceClient;
2413
+ })(eod = posv1.eod || (posv1.eod = {}));
2414
+ })(posv1 = pkg.posv1 || (pkg.posv1 = {}));
2415
+ })(pkg = com.pkg || (com.pkg = {}));
2416
+ })(com || (exports.com = com = {}));