@alexochihua/protos 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,992 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.11.6
5
+ // protoc unknown
6
+ // source: kapital/disputes/v1/disputes.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.DisputesServiceClient = exports.DisputesServiceService = exports.GetDashboardResponse = exports.GetDashboardRequest = exports.FindAllResponse = exports.FindAllRequest = exports.UpdateDisputeResponse = exports.UpdateDisputeRequest = exports.CreateDisputeResponse = exports.CreateDisputeRequest = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const grpc_js_1 = require("@grpc/grpc-js");
12
+ const meta_1 = require("../../common/v1/meta");
13
+ const pagination_1 = require("../../common/v1/pagination");
14
+ const disputes_types_1 = require("./disputes_types");
15
+ exports.protobufPackage = "kapital.disputes.v1";
16
+ function createBaseCreateDisputeRequest() {
17
+ return { transaction_id: "", status: "", dispute_uuid: "", request_date: "", extra_data: undefined };
18
+ }
19
+ exports.CreateDisputeRequest = {
20
+ encode(message, writer = new wire_1.BinaryWriter()) {
21
+ if (message.transaction_id !== "") {
22
+ writer.uint32(10).string(message.transaction_id);
23
+ }
24
+ if (message.status !== "") {
25
+ writer.uint32(18).string(message.status);
26
+ }
27
+ if (message.dispute_uuid !== "") {
28
+ writer.uint32(26).string(message.dispute_uuid);
29
+ }
30
+ if (message.request_date !== "") {
31
+ writer.uint32(34).string(message.request_date);
32
+ }
33
+ if (message.extra_data !== undefined) {
34
+ disputes_types_1.CreateExtraData.encode(message.extra_data, writer.uint32(42).fork()).join();
35
+ }
36
+ return writer;
37
+ },
38
+ decode(input, length) {
39
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
40
+ const end = length === undefined ? reader.len : reader.pos + length;
41
+ const message = createBaseCreateDisputeRequest();
42
+ while (reader.pos < end) {
43
+ const tag = reader.uint32();
44
+ switch (tag >>> 3) {
45
+ case 1: {
46
+ if (tag !== 10) {
47
+ break;
48
+ }
49
+ message.transaction_id = reader.string();
50
+ continue;
51
+ }
52
+ case 2: {
53
+ if (tag !== 18) {
54
+ break;
55
+ }
56
+ message.status = reader.string();
57
+ continue;
58
+ }
59
+ case 3: {
60
+ if (tag !== 26) {
61
+ break;
62
+ }
63
+ message.dispute_uuid = reader.string();
64
+ continue;
65
+ }
66
+ case 4: {
67
+ if (tag !== 34) {
68
+ break;
69
+ }
70
+ message.request_date = reader.string();
71
+ continue;
72
+ }
73
+ case 5: {
74
+ if (tag !== 42) {
75
+ break;
76
+ }
77
+ message.extra_data = disputes_types_1.CreateExtraData.decode(reader, reader.uint32());
78
+ continue;
79
+ }
80
+ }
81
+ if ((tag & 7) === 4 || tag === 0) {
82
+ break;
83
+ }
84
+ reader.skip(tag & 7);
85
+ }
86
+ return message;
87
+ },
88
+ create(base) {
89
+ return exports.CreateDisputeRequest.fromPartial(base ?? {});
90
+ },
91
+ fromPartial(object) {
92
+ const message = createBaseCreateDisputeRequest();
93
+ message.transaction_id = object.transaction_id ?? "";
94
+ message.status = object.status ?? "";
95
+ message.dispute_uuid = object.dispute_uuid ?? "";
96
+ message.request_date = object.request_date ?? "";
97
+ message.extra_data = (object.extra_data !== undefined && object.extra_data !== null)
98
+ ? disputes_types_1.CreateExtraData.fromPartial(object.extra_data)
99
+ : undefined;
100
+ return message;
101
+ },
102
+ };
103
+ function createBaseCreateDisputeResponse() {
104
+ return {
105
+ meta: undefined,
106
+ transaction_id: "",
107
+ dispute_id: "",
108
+ custom_id: "",
109
+ amount_formatted: "",
110
+ status: "",
111
+ response_code: "",
112
+ };
113
+ }
114
+ exports.CreateDisputeResponse = {
115
+ encode(message, writer = new wire_1.BinaryWriter()) {
116
+ if (message.meta !== undefined) {
117
+ meta_1.ResponseMeta.encode(message.meta, writer.uint32(10).fork()).join();
118
+ }
119
+ if (message.transaction_id !== "") {
120
+ writer.uint32(18).string(message.transaction_id);
121
+ }
122
+ if (message.dispute_id !== "") {
123
+ writer.uint32(26).string(message.dispute_id);
124
+ }
125
+ if (message.custom_id !== "") {
126
+ writer.uint32(34).string(message.custom_id);
127
+ }
128
+ if (message.amount_formatted !== "") {
129
+ writer.uint32(42).string(message.amount_formatted);
130
+ }
131
+ if (message.status !== "") {
132
+ writer.uint32(50).string(message.status);
133
+ }
134
+ if (message.response_code !== "") {
135
+ writer.uint32(58).string(message.response_code);
136
+ }
137
+ return writer;
138
+ },
139
+ decode(input, length) {
140
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
141
+ const end = length === undefined ? reader.len : reader.pos + length;
142
+ const message = createBaseCreateDisputeResponse();
143
+ while (reader.pos < end) {
144
+ const tag = reader.uint32();
145
+ switch (tag >>> 3) {
146
+ case 1: {
147
+ if (tag !== 10) {
148
+ break;
149
+ }
150
+ message.meta = meta_1.ResponseMeta.decode(reader, reader.uint32());
151
+ continue;
152
+ }
153
+ case 2: {
154
+ if (tag !== 18) {
155
+ break;
156
+ }
157
+ message.transaction_id = reader.string();
158
+ continue;
159
+ }
160
+ case 3: {
161
+ if (tag !== 26) {
162
+ break;
163
+ }
164
+ message.dispute_id = reader.string();
165
+ continue;
166
+ }
167
+ case 4: {
168
+ if (tag !== 34) {
169
+ break;
170
+ }
171
+ message.custom_id = reader.string();
172
+ continue;
173
+ }
174
+ case 5: {
175
+ if (tag !== 42) {
176
+ break;
177
+ }
178
+ message.amount_formatted = reader.string();
179
+ continue;
180
+ }
181
+ case 6: {
182
+ if (tag !== 50) {
183
+ break;
184
+ }
185
+ message.status = reader.string();
186
+ continue;
187
+ }
188
+ case 7: {
189
+ if (tag !== 58) {
190
+ break;
191
+ }
192
+ message.response_code = reader.string();
193
+ continue;
194
+ }
195
+ }
196
+ if ((tag & 7) === 4 || tag === 0) {
197
+ break;
198
+ }
199
+ reader.skip(tag & 7);
200
+ }
201
+ return message;
202
+ },
203
+ create(base) {
204
+ return exports.CreateDisputeResponse.fromPartial(base ?? {});
205
+ },
206
+ fromPartial(object) {
207
+ const message = createBaseCreateDisputeResponse();
208
+ message.meta = (object.meta !== undefined && object.meta !== null)
209
+ ? meta_1.ResponseMeta.fromPartial(object.meta)
210
+ : undefined;
211
+ message.transaction_id = object.transaction_id ?? "";
212
+ message.dispute_id = object.dispute_id ?? "";
213
+ message.custom_id = object.custom_id ?? "";
214
+ message.amount_formatted = object.amount_formatted ?? "";
215
+ message.status = object.status ?? "";
216
+ message.response_code = object.response_code ?? "";
217
+ return message;
218
+ },
219
+ };
220
+ function createBaseUpdateDisputeRequest() {
221
+ return {
222
+ dispute_id: "",
223
+ status: "",
224
+ phase: undefined,
225
+ due_date: undefined,
226
+ comments: undefined,
227
+ files: [],
228
+ extra_data: undefined,
229
+ };
230
+ }
231
+ exports.UpdateDisputeRequest = {
232
+ encode(message, writer = new wire_1.BinaryWriter()) {
233
+ if (message.dispute_id !== "") {
234
+ writer.uint32(10).string(message.dispute_id);
235
+ }
236
+ if (message.status !== "") {
237
+ writer.uint32(18).string(message.status);
238
+ }
239
+ if (message.phase !== undefined) {
240
+ writer.uint32(26).string(message.phase);
241
+ }
242
+ if (message.due_date !== undefined) {
243
+ writer.uint32(34).string(message.due_date);
244
+ }
245
+ if (message.comments !== undefined) {
246
+ writer.uint32(42).string(message.comments);
247
+ }
248
+ for (const v of message.files) {
249
+ disputes_types_1.File.encode(v, writer.uint32(50).fork()).join();
250
+ }
251
+ if (message.extra_data !== undefined) {
252
+ disputes_types_1.UpdateExtraData.encode(message.extra_data, writer.uint32(58).fork()).join();
253
+ }
254
+ return writer;
255
+ },
256
+ decode(input, length) {
257
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
258
+ const end = length === undefined ? reader.len : reader.pos + length;
259
+ const message = createBaseUpdateDisputeRequest();
260
+ while (reader.pos < end) {
261
+ const tag = reader.uint32();
262
+ switch (tag >>> 3) {
263
+ case 1: {
264
+ if (tag !== 10) {
265
+ break;
266
+ }
267
+ message.dispute_id = reader.string();
268
+ continue;
269
+ }
270
+ case 2: {
271
+ if (tag !== 18) {
272
+ break;
273
+ }
274
+ message.status = reader.string();
275
+ continue;
276
+ }
277
+ case 3: {
278
+ if (tag !== 26) {
279
+ break;
280
+ }
281
+ message.phase = reader.string();
282
+ continue;
283
+ }
284
+ case 4: {
285
+ if (tag !== 34) {
286
+ break;
287
+ }
288
+ message.due_date = reader.string();
289
+ continue;
290
+ }
291
+ case 5: {
292
+ if (tag !== 42) {
293
+ break;
294
+ }
295
+ message.comments = reader.string();
296
+ continue;
297
+ }
298
+ case 6: {
299
+ if (tag !== 50) {
300
+ break;
301
+ }
302
+ message.files.push(disputes_types_1.File.decode(reader, reader.uint32()));
303
+ continue;
304
+ }
305
+ case 7: {
306
+ if (tag !== 58) {
307
+ break;
308
+ }
309
+ message.extra_data = disputes_types_1.UpdateExtraData.decode(reader, reader.uint32());
310
+ continue;
311
+ }
312
+ }
313
+ if ((tag & 7) === 4 || tag === 0) {
314
+ break;
315
+ }
316
+ reader.skip(tag & 7);
317
+ }
318
+ return message;
319
+ },
320
+ create(base) {
321
+ return exports.UpdateDisputeRequest.fromPartial(base ?? {});
322
+ },
323
+ fromPartial(object) {
324
+ const message = createBaseUpdateDisputeRequest();
325
+ message.dispute_id = object.dispute_id ?? "";
326
+ message.status = object.status ?? "";
327
+ message.phase = object.phase ?? undefined;
328
+ message.due_date = object.due_date ?? undefined;
329
+ message.comments = object.comments ?? undefined;
330
+ message.files = object.files?.map((e) => disputes_types_1.File.fromPartial(e)) || [];
331
+ message.extra_data = (object.extra_data !== undefined && object.extra_data !== null)
332
+ ? disputes_types_1.UpdateExtraData.fromPartial(object.extra_data)
333
+ : undefined;
334
+ return message;
335
+ },
336
+ };
337
+ function createBaseUpdateDisputeResponse() {
338
+ return {
339
+ meta: undefined,
340
+ dispute_id: "",
341
+ status: undefined,
342
+ phase: undefined,
343
+ updated_date: undefined,
344
+ due_date: undefined,
345
+ custom_id: undefined,
346
+ files: [],
347
+ amount_formatted: undefined,
348
+ response_code: undefined,
349
+ };
350
+ }
351
+ exports.UpdateDisputeResponse = {
352
+ encode(message, writer = new wire_1.BinaryWriter()) {
353
+ if (message.meta !== undefined) {
354
+ meta_1.ResponseMeta.encode(message.meta, writer.uint32(10).fork()).join();
355
+ }
356
+ if (message.dispute_id !== "") {
357
+ writer.uint32(18).string(message.dispute_id);
358
+ }
359
+ if (message.status !== undefined) {
360
+ writer.uint32(26).string(message.status);
361
+ }
362
+ if (message.phase !== undefined) {
363
+ writer.uint32(34).string(message.phase);
364
+ }
365
+ if (message.updated_date !== undefined) {
366
+ writer.uint32(42).string(message.updated_date);
367
+ }
368
+ if (message.due_date !== undefined) {
369
+ writer.uint32(50).string(message.due_date);
370
+ }
371
+ if (message.custom_id !== undefined) {
372
+ writer.uint32(58).string(message.custom_id);
373
+ }
374
+ for (const v of message.files) {
375
+ disputes_types_1.File.encode(v, writer.uint32(66).fork()).join();
376
+ }
377
+ if (message.amount_formatted !== undefined) {
378
+ writer.uint32(74).string(message.amount_formatted);
379
+ }
380
+ if (message.response_code !== undefined) {
381
+ writer.uint32(82).string(message.response_code);
382
+ }
383
+ return writer;
384
+ },
385
+ decode(input, length) {
386
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
387
+ const end = length === undefined ? reader.len : reader.pos + length;
388
+ const message = createBaseUpdateDisputeResponse();
389
+ while (reader.pos < end) {
390
+ const tag = reader.uint32();
391
+ switch (tag >>> 3) {
392
+ case 1: {
393
+ if (tag !== 10) {
394
+ break;
395
+ }
396
+ message.meta = meta_1.ResponseMeta.decode(reader, reader.uint32());
397
+ continue;
398
+ }
399
+ case 2: {
400
+ if (tag !== 18) {
401
+ break;
402
+ }
403
+ message.dispute_id = reader.string();
404
+ continue;
405
+ }
406
+ case 3: {
407
+ if (tag !== 26) {
408
+ break;
409
+ }
410
+ message.status = reader.string();
411
+ continue;
412
+ }
413
+ case 4: {
414
+ if (tag !== 34) {
415
+ break;
416
+ }
417
+ message.phase = reader.string();
418
+ continue;
419
+ }
420
+ case 5: {
421
+ if (tag !== 42) {
422
+ break;
423
+ }
424
+ message.updated_date = reader.string();
425
+ continue;
426
+ }
427
+ case 6: {
428
+ if (tag !== 50) {
429
+ break;
430
+ }
431
+ message.due_date = reader.string();
432
+ continue;
433
+ }
434
+ case 7: {
435
+ if (tag !== 58) {
436
+ break;
437
+ }
438
+ message.custom_id = reader.string();
439
+ continue;
440
+ }
441
+ case 8: {
442
+ if (tag !== 66) {
443
+ break;
444
+ }
445
+ message.files.push(disputes_types_1.File.decode(reader, reader.uint32()));
446
+ continue;
447
+ }
448
+ case 9: {
449
+ if (tag !== 74) {
450
+ break;
451
+ }
452
+ message.amount_formatted = reader.string();
453
+ continue;
454
+ }
455
+ case 10: {
456
+ if (tag !== 82) {
457
+ break;
458
+ }
459
+ message.response_code = reader.string();
460
+ continue;
461
+ }
462
+ }
463
+ if ((tag & 7) === 4 || tag === 0) {
464
+ break;
465
+ }
466
+ reader.skip(tag & 7);
467
+ }
468
+ return message;
469
+ },
470
+ create(base) {
471
+ return exports.UpdateDisputeResponse.fromPartial(base ?? {});
472
+ },
473
+ fromPartial(object) {
474
+ const message = createBaseUpdateDisputeResponse();
475
+ message.meta = (object.meta !== undefined && object.meta !== null)
476
+ ? meta_1.ResponseMeta.fromPartial(object.meta)
477
+ : undefined;
478
+ message.dispute_id = object.dispute_id ?? "";
479
+ message.status = object.status ?? undefined;
480
+ message.phase = object.phase ?? undefined;
481
+ message.updated_date = object.updated_date ?? undefined;
482
+ message.due_date = object.due_date ?? undefined;
483
+ message.custom_id = object.custom_id ?? undefined;
484
+ message.files = object.files?.map((e) => disputes_types_1.File.fromPartial(e)) || [];
485
+ message.amount_formatted = object.amount_formatted ?? undefined;
486
+ message.response_code = object.response_code ?? undefined;
487
+ return message;
488
+ },
489
+ };
490
+ function createBaseFindAllRequest() {
491
+ return {
492
+ page_request: undefined,
493
+ start_date: undefined,
494
+ end_date: undefined,
495
+ pan_hmac: undefined,
496
+ q: undefined,
497
+ view: undefined,
498
+ status: undefined,
499
+ current_phase: undefined,
500
+ id_dispute: undefined,
501
+ custom_id: undefined,
502
+ transaction_status: undefined,
503
+ remaining_days: undefined,
504
+ };
505
+ }
506
+ exports.FindAllRequest = {
507
+ encode(message, writer = new wire_1.BinaryWriter()) {
508
+ if (message.page_request !== undefined) {
509
+ pagination_1.PageRequest.encode(message.page_request, writer.uint32(10).fork()).join();
510
+ }
511
+ if (message.start_date !== undefined) {
512
+ writer.uint32(18).string(message.start_date);
513
+ }
514
+ if (message.end_date !== undefined) {
515
+ writer.uint32(26).string(message.end_date);
516
+ }
517
+ if (message.pan_hmac !== undefined) {
518
+ writer.uint32(34).string(message.pan_hmac);
519
+ }
520
+ if (message.q !== undefined) {
521
+ writer.uint32(42).string(message.q);
522
+ }
523
+ if (message.view !== undefined) {
524
+ writer.uint32(50).string(message.view);
525
+ }
526
+ if (message.status !== undefined) {
527
+ writer.uint32(58).string(message.status);
528
+ }
529
+ if (message.current_phase !== undefined) {
530
+ writer.uint32(66).string(message.current_phase);
531
+ }
532
+ if (message.id_dispute !== undefined) {
533
+ writer.uint32(74).string(message.id_dispute);
534
+ }
535
+ if (message.custom_id !== undefined) {
536
+ writer.uint32(82).string(message.custom_id);
537
+ }
538
+ if (message.transaction_status !== undefined) {
539
+ writer.uint32(90).string(message.transaction_status);
540
+ }
541
+ if (message.remaining_days !== undefined) {
542
+ writer.uint32(98).string(message.remaining_days);
543
+ }
544
+ return writer;
545
+ },
546
+ decode(input, length) {
547
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
548
+ const end = length === undefined ? reader.len : reader.pos + length;
549
+ const message = createBaseFindAllRequest();
550
+ while (reader.pos < end) {
551
+ const tag = reader.uint32();
552
+ switch (tag >>> 3) {
553
+ case 1: {
554
+ if (tag !== 10) {
555
+ break;
556
+ }
557
+ message.page_request = pagination_1.PageRequest.decode(reader, reader.uint32());
558
+ continue;
559
+ }
560
+ case 2: {
561
+ if (tag !== 18) {
562
+ break;
563
+ }
564
+ message.start_date = reader.string();
565
+ continue;
566
+ }
567
+ case 3: {
568
+ if (tag !== 26) {
569
+ break;
570
+ }
571
+ message.end_date = reader.string();
572
+ continue;
573
+ }
574
+ case 4: {
575
+ if (tag !== 34) {
576
+ break;
577
+ }
578
+ message.pan_hmac = reader.string();
579
+ continue;
580
+ }
581
+ case 5: {
582
+ if (tag !== 42) {
583
+ break;
584
+ }
585
+ message.q = reader.string();
586
+ continue;
587
+ }
588
+ case 6: {
589
+ if (tag !== 50) {
590
+ break;
591
+ }
592
+ message.view = reader.string();
593
+ continue;
594
+ }
595
+ case 7: {
596
+ if (tag !== 58) {
597
+ break;
598
+ }
599
+ message.status = reader.string();
600
+ continue;
601
+ }
602
+ case 8: {
603
+ if (tag !== 66) {
604
+ break;
605
+ }
606
+ message.current_phase = reader.string();
607
+ continue;
608
+ }
609
+ case 9: {
610
+ if (tag !== 74) {
611
+ break;
612
+ }
613
+ message.id_dispute = reader.string();
614
+ continue;
615
+ }
616
+ case 10: {
617
+ if (tag !== 82) {
618
+ break;
619
+ }
620
+ message.custom_id = reader.string();
621
+ continue;
622
+ }
623
+ case 11: {
624
+ if (tag !== 90) {
625
+ break;
626
+ }
627
+ message.transaction_status = reader.string();
628
+ continue;
629
+ }
630
+ case 12: {
631
+ if (tag !== 98) {
632
+ break;
633
+ }
634
+ message.remaining_days = reader.string();
635
+ continue;
636
+ }
637
+ }
638
+ if ((tag & 7) === 4 || tag === 0) {
639
+ break;
640
+ }
641
+ reader.skip(tag & 7);
642
+ }
643
+ return message;
644
+ },
645
+ create(base) {
646
+ return exports.FindAllRequest.fromPartial(base ?? {});
647
+ },
648
+ fromPartial(object) {
649
+ const message = createBaseFindAllRequest();
650
+ message.page_request = (object.page_request !== undefined && object.page_request !== null)
651
+ ? pagination_1.PageRequest.fromPartial(object.page_request)
652
+ : undefined;
653
+ message.start_date = object.start_date ?? undefined;
654
+ message.end_date = object.end_date ?? undefined;
655
+ message.pan_hmac = object.pan_hmac ?? undefined;
656
+ message.q = object.q ?? undefined;
657
+ message.view = object.view ?? undefined;
658
+ message.status = object.status ?? undefined;
659
+ message.current_phase = object.current_phase ?? undefined;
660
+ message.id_dispute = object.id_dispute ?? undefined;
661
+ message.custom_id = object.custom_id ?? undefined;
662
+ message.transaction_status = object.transaction_status ?? undefined;
663
+ message.remaining_days = object.remaining_days ?? undefined;
664
+ return message;
665
+ },
666
+ };
667
+ function createBaseFindAllResponse() {
668
+ return { meta: undefined, page_response: undefined, disputes: [] };
669
+ }
670
+ exports.FindAllResponse = {
671
+ encode(message, writer = new wire_1.BinaryWriter()) {
672
+ if (message.meta !== undefined) {
673
+ meta_1.ResponseMeta.encode(message.meta, writer.uint32(10).fork()).join();
674
+ }
675
+ if (message.page_response !== undefined) {
676
+ pagination_1.PageResponse.encode(message.page_response, writer.uint32(18).fork()).join();
677
+ }
678
+ for (const v of message.disputes) {
679
+ disputes_types_1.DisputeItem.encode(v, writer.uint32(26).fork()).join();
680
+ }
681
+ return writer;
682
+ },
683
+ decode(input, length) {
684
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
685
+ const end = length === undefined ? reader.len : reader.pos + length;
686
+ const message = createBaseFindAllResponse();
687
+ while (reader.pos < end) {
688
+ const tag = reader.uint32();
689
+ switch (tag >>> 3) {
690
+ case 1: {
691
+ if (tag !== 10) {
692
+ break;
693
+ }
694
+ message.meta = meta_1.ResponseMeta.decode(reader, reader.uint32());
695
+ continue;
696
+ }
697
+ case 2: {
698
+ if (tag !== 18) {
699
+ break;
700
+ }
701
+ message.page_response = pagination_1.PageResponse.decode(reader, reader.uint32());
702
+ continue;
703
+ }
704
+ case 3: {
705
+ if (tag !== 26) {
706
+ break;
707
+ }
708
+ message.disputes.push(disputes_types_1.DisputeItem.decode(reader, reader.uint32()));
709
+ continue;
710
+ }
711
+ }
712
+ if ((tag & 7) === 4 || tag === 0) {
713
+ break;
714
+ }
715
+ reader.skip(tag & 7);
716
+ }
717
+ return message;
718
+ },
719
+ create(base) {
720
+ return exports.FindAllResponse.fromPartial(base ?? {});
721
+ },
722
+ fromPartial(object) {
723
+ const message = createBaseFindAllResponse();
724
+ message.meta = (object.meta !== undefined && object.meta !== null)
725
+ ? meta_1.ResponseMeta.fromPartial(object.meta)
726
+ : undefined;
727
+ message.page_response = (object.page_response !== undefined && object.page_response !== null)
728
+ ? pagination_1.PageResponse.fromPartial(object.page_response)
729
+ : undefined;
730
+ message.disputes = object.disputes?.map((e) => disputes_types_1.DisputeItem.fromPartial(e)) || [];
731
+ return message;
732
+ },
733
+ };
734
+ function createBaseGetDashboardRequest() {
735
+ return {
736
+ start_date: undefined,
737
+ end_date: undefined,
738
+ pan_hmac: undefined,
739
+ q: undefined,
740
+ view: undefined,
741
+ status: undefined,
742
+ current_phase: undefined,
743
+ id_dispute: undefined,
744
+ custom_id: undefined,
745
+ transaction_status: undefined,
746
+ remaining_days: undefined,
747
+ };
748
+ }
749
+ exports.GetDashboardRequest = {
750
+ encode(message, writer = new wire_1.BinaryWriter()) {
751
+ if (message.start_date !== undefined) {
752
+ writer.uint32(10).string(message.start_date);
753
+ }
754
+ if (message.end_date !== undefined) {
755
+ writer.uint32(18).string(message.end_date);
756
+ }
757
+ if (message.pan_hmac !== undefined) {
758
+ writer.uint32(26).string(message.pan_hmac);
759
+ }
760
+ if (message.q !== undefined) {
761
+ writer.uint32(34).string(message.q);
762
+ }
763
+ if (message.view !== undefined) {
764
+ writer.uint32(42).string(message.view);
765
+ }
766
+ if (message.status !== undefined) {
767
+ writer.uint32(50).string(message.status);
768
+ }
769
+ if (message.current_phase !== undefined) {
770
+ writer.uint32(58).string(message.current_phase);
771
+ }
772
+ if (message.id_dispute !== undefined) {
773
+ writer.uint32(66).string(message.id_dispute);
774
+ }
775
+ if (message.custom_id !== undefined) {
776
+ writer.uint32(74).string(message.custom_id);
777
+ }
778
+ if (message.transaction_status !== undefined) {
779
+ writer.uint32(82).string(message.transaction_status);
780
+ }
781
+ if (message.remaining_days !== undefined) {
782
+ writer.uint32(90).string(message.remaining_days);
783
+ }
784
+ return writer;
785
+ },
786
+ decode(input, length) {
787
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
788
+ const end = length === undefined ? reader.len : reader.pos + length;
789
+ const message = createBaseGetDashboardRequest();
790
+ while (reader.pos < end) {
791
+ const tag = reader.uint32();
792
+ switch (tag >>> 3) {
793
+ case 1: {
794
+ if (tag !== 10) {
795
+ break;
796
+ }
797
+ message.start_date = reader.string();
798
+ continue;
799
+ }
800
+ case 2: {
801
+ if (tag !== 18) {
802
+ break;
803
+ }
804
+ message.end_date = reader.string();
805
+ continue;
806
+ }
807
+ case 3: {
808
+ if (tag !== 26) {
809
+ break;
810
+ }
811
+ message.pan_hmac = reader.string();
812
+ continue;
813
+ }
814
+ case 4: {
815
+ if (tag !== 34) {
816
+ break;
817
+ }
818
+ message.q = reader.string();
819
+ continue;
820
+ }
821
+ case 5: {
822
+ if (tag !== 42) {
823
+ break;
824
+ }
825
+ message.view = reader.string();
826
+ continue;
827
+ }
828
+ case 6: {
829
+ if (tag !== 50) {
830
+ break;
831
+ }
832
+ message.status = reader.string();
833
+ continue;
834
+ }
835
+ case 7: {
836
+ if (tag !== 58) {
837
+ break;
838
+ }
839
+ message.current_phase = reader.string();
840
+ continue;
841
+ }
842
+ case 8: {
843
+ if (tag !== 66) {
844
+ break;
845
+ }
846
+ message.id_dispute = reader.string();
847
+ continue;
848
+ }
849
+ case 9: {
850
+ if (tag !== 74) {
851
+ break;
852
+ }
853
+ message.custom_id = reader.string();
854
+ continue;
855
+ }
856
+ case 10: {
857
+ if (tag !== 82) {
858
+ break;
859
+ }
860
+ message.transaction_status = reader.string();
861
+ continue;
862
+ }
863
+ case 11: {
864
+ if (tag !== 90) {
865
+ break;
866
+ }
867
+ message.remaining_days = reader.string();
868
+ continue;
869
+ }
870
+ }
871
+ if ((tag & 7) === 4 || tag === 0) {
872
+ break;
873
+ }
874
+ reader.skip(tag & 7);
875
+ }
876
+ return message;
877
+ },
878
+ create(base) {
879
+ return exports.GetDashboardRequest.fromPartial(base ?? {});
880
+ },
881
+ fromPartial(object) {
882
+ const message = createBaseGetDashboardRequest();
883
+ message.start_date = object.start_date ?? undefined;
884
+ message.end_date = object.end_date ?? undefined;
885
+ message.pan_hmac = object.pan_hmac ?? undefined;
886
+ message.q = object.q ?? undefined;
887
+ message.view = object.view ?? undefined;
888
+ message.status = object.status ?? undefined;
889
+ message.current_phase = object.current_phase ?? undefined;
890
+ message.id_dispute = object.id_dispute ?? undefined;
891
+ message.custom_id = object.custom_id ?? undefined;
892
+ message.transaction_status = object.transaction_status ?? undefined;
893
+ message.remaining_days = object.remaining_days ?? undefined;
894
+ return message;
895
+ },
896
+ };
897
+ function createBaseGetDashboardResponse() {
898
+ return { meta: undefined, data: undefined };
899
+ }
900
+ exports.GetDashboardResponse = {
901
+ encode(message, writer = new wire_1.BinaryWriter()) {
902
+ if (message.meta !== undefined) {
903
+ meta_1.ResponseMeta.encode(message.meta, writer.uint32(10).fork()).join();
904
+ }
905
+ if (message.data !== undefined) {
906
+ disputes_types_1.DashboardData.encode(message.data, writer.uint32(18).fork()).join();
907
+ }
908
+ return writer;
909
+ },
910
+ decode(input, length) {
911
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
912
+ const end = length === undefined ? reader.len : reader.pos + length;
913
+ const message = createBaseGetDashboardResponse();
914
+ while (reader.pos < end) {
915
+ const tag = reader.uint32();
916
+ switch (tag >>> 3) {
917
+ case 1: {
918
+ if (tag !== 10) {
919
+ break;
920
+ }
921
+ message.meta = meta_1.ResponseMeta.decode(reader, reader.uint32());
922
+ continue;
923
+ }
924
+ case 2: {
925
+ if (tag !== 18) {
926
+ break;
927
+ }
928
+ message.data = disputes_types_1.DashboardData.decode(reader, reader.uint32());
929
+ continue;
930
+ }
931
+ }
932
+ if ((tag & 7) === 4 || tag === 0) {
933
+ break;
934
+ }
935
+ reader.skip(tag & 7);
936
+ }
937
+ return message;
938
+ },
939
+ create(base) {
940
+ return exports.GetDashboardResponse.fromPartial(base ?? {});
941
+ },
942
+ fromPartial(object) {
943
+ const message = createBaseGetDashboardResponse();
944
+ message.meta = (object.meta !== undefined && object.meta !== null)
945
+ ? meta_1.ResponseMeta.fromPartial(object.meta)
946
+ : undefined;
947
+ message.data = (object.data !== undefined && object.data !== null)
948
+ ? disputes_types_1.DashboardData.fromPartial(object.data)
949
+ : undefined;
950
+ return message;
951
+ },
952
+ };
953
+ exports.DisputesServiceService = {
954
+ createDispute: {
955
+ path: "/kapital.disputes.v1.DisputesService/CreateDispute",
956
+ requestStream: false,
957
+ responseStream: false,
958
+ requestSerialize: (value) => Buffer.from(exports.CreateDisputeRequest.encode(value).finish()),
959
+ requestDeserialize: (value) => exports.CreateDisputeRequest.decode(value),
960
+ responseSerialize: (value) => Buffer.from(exports.CreateDisputeResponse.encode(value).finish()),
961
+ responseDeserialize: (value) => exports.CreateDisputeResponse.decode(value),
962
+ },
963
+ updateDispute: {
964
+ path: "/kapital.disputes.v1.DisputesService/UpdateDispute",
965
+ requestStream: false,
966
+ responseStream: false,
967
+ requestSerialize: (value) => Buffer.from(exports.UpdateDisputeRequest.encode(value).finish()),
968
+ requestDeserialize: (value) => exports.UpdateDisputeRequest.decode(value),
969
+ responseSerialize: (value) => Buffer.from(exports.UpdateDisputeResponse.encode(value).finish()),
970
+ responseDeserialize: (value) => exports.UpdateDisputeResponse.decode(value),
971
+ },
972
+ findAll: {
973
+ path: "/kapital.disputes.v1.DisputesService/FindAll",
974
+ requestStream: false,
975
+ responseStream: false,
976
+ requestSerialize: (value) => Buffer.from(exports.FindAllRequest.encode(value).finish()),
977
+ requestDeserialize: (value) => exports.FindAllRequest.decode(value),
978
+ responseSerialize: (value) => Buffer.from(exports.FindAllResponse.encode(value).finish()),
979
+ responseDeserialize: (value) => exports.FindAllResponse.decode(value),
980
+ },
981
+ getDashboard: {
982
+ path: "/kapital.disputes.v1.DisputesService/GetDashboard",
983
+ requestStream: false,
984
+ responseStream: false,
985
+ requestSerialize: (value) => Buffer.from(exports.GetDashboardRequest.encode(value).finish()),
986
+ requestDeserialize: (value) => exports.GetDashboardRequest.decode(value),
987
+ responseSerialize: (value) => Buffer.from(exports.GetDashboardResponse.encode(value).finish()),
988
+ responseDeserialize: (value) => exports.GetDashboardResponse.decode(value),
989
+ },
990
+ };
991
+ exports.DisputesServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.DisputesServiceService, "kapital.disputes.v1.DisputesService");
992
+ //# sourceMappingURL=disputes.js.map