@stashfin/grpc 1.2.414 → 1.2.415

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 (34) hide show
  1. package/package.json +1 -1
  2. package/ts/customers/enach/updatetxnstatus.d.ts +4 -1
  3. package/ts/customers/enach/updatetxnstatus.js +64 -8
  4. package/ts/loans/getvirtualaccountnumber.d.ts +35 -0
  5. package/ts/{customers/verifyemail.js → loans/getvirtualaccountnumber.js} +32 -32
  6. package/ts/loans/manualpaymentallocation.d.ts +39 -0
  7. package/ts/loans/manualpaymentallocation.js +186 -0
  8. package/ts/loans/rollbackextrapayment.d.ts +37 -0
  9. package/ts/loans/rollbackextrapayment.js +149 -0
  10. package/ts/loans.d.ts +28 -0
  11. package/ts/loans.js +20 -0
  12. package/ts/customers/getrpdlink.d.ts +0 -40
  13. package/ts/customers/getrpdlink.js +0 -190
  14. package/ts/customers/sendemailtoken.d.ts +0 -35
  15. package/ts/customers/sendemailtoken.js +0 -117
  16. package/ts/customers/skipdlrcscreen.d.ts +0 -35
  17. package/ts/customers/skipdlrcscreen.js +0 -117
  18. package/ts/customers/step1.d.ts +0 -69
  19. package/ts/customers/step1.js +0 -395
  20. package/ts/customers/step10.d.ts +0 -73
  21. package/ts/customers/step10.js +0 -459
  22. package/ts/customers/step2.d.ts +0 -68
  23. package/ts/customers/step2.js +0 -381
  24. package/ts/customers/step7.d.ts +0 -68
  25. package/ts/customers/step7.js +0 -381
  26. package/ts/customers/step8.d.ts +0 -69
  27. package/ts/customers/step8.js +0 -395
  28. package/ts/customers/step9.d.ts +0 -75
  29. package/ts/customers/step9.js +0 -489
  30. package/ts/customers/stepstatic.d.ts +0 -66
  31. package/ts/customers/stepstatic.js +0 -354
  32. package/ts/customers/verifyemail.d.ts +0 -35
  33. package/ts/google/protobuf/timestamp.d.ts +0 -127
  34. package/ts/google/protobuf/timestamp.js +0 -97
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stashfin/grpc",
3
- "version": "1.2.414",
3
+ "version": "1.2.415",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -1,8 +1,11 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "customers.enach.updatetxnstatus";
3
3
  export interface updateTxnStatusRequest {
4
- txn_id: string;
4
+ order_id: string;
5
5
  status: string;
6
+ mode?: string | undefined;
7
+ customer_id?: number | undefined;
8
+ clint_id?: string | undefined;
6
9
  }
7
10
  export interface updateTxnStatusResponse {
8
11
  status: string;
@@ -10,19 +10,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.updateTxnStatusResponse = exports.updateTxnStatusRequest = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
+ const long_1 = __importDefault(require("long"));
13
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
15
  exports.protobufPackage = "customers.enach.updatetxnstatus";
15
16
  function createBaseupdateTxnStatusRequest() {
16
- return { txn_id: "", status: "" };
17
+ return { order_id: "", status: "", mode: undefined, customer_id: undefined, clint_id: undefined };
17
18
  }
18
19
  exports.updateTxnStatusRequest = {
19
20
  encode(message, writer = minimal_1.default.Writer.create()) {
20
- if (message.txn_id !== "") {
21
- writer.uint32(10).string(message.txn_id);
21
+ if (message.order_id !== "") {
22
+ writer.uint32(10).string(message.order_id);
22
23
  }
23
24
  if (message.status !== "") {
24
25
  writer.uint32(18).string(message.status);
25
26
  }
27
+ if (message.mode !== undefined) {
28
+ writer.uint32(26).string(message.mode);
29
+ }
30
+ if (message.customer_id !== undefined) {
31
+ writer.uint32(32).int64(message.customer_id);
32
+ }
33
+ if (message.clint_id !== undefined) {
34
+ writer.uint32(42).string(message.clint_id);
35
+ }
26
36
  return writer;
27
37
  },
28
38
  decode(input, length) {
@@ -36,7 +46,7 @@ exports.updateTxnStatusRequest = {
36
46
  if (tag !== 10) {
37
47
  break;
38
48
  }
39
- message.txn_id = reader.string();
49
+ message.order_id = reader.string();
40
50
  continue;
41
51
  case 2:
42
52
  if (tag !== 18) {
@@ -44,6 +54,24 @@ exports.updateTxnStatusRequest = {
44
54
  }
45
55
  message.status = reader.string();
46
56
  continue;
57
+ case 3:
58
+ if (tag !== 26) {
59
+ break;
60
+ }
61
+ message.mode = reader.string();
62
+ continue;
63
+ case 4:
64
+ if (tag !== 32) {
65
+ break;
66
+ }
67
+ message.customer_id = longToNumber(reader.int64());
68
+ continue;
69
+ case 5:
70
+ if (tag !== 42) {
71
+ break;
72
+ }
73
+ message.clint_id = reader.string();
74
+ continue;
47
75
  }
48
76
  if ((tag & 7) === 4 || tag === 0) {
49
77
  break;
@@ -54,18 +82,30 @@ exports.updateTxnStatusRequest = {
54
82
  },
55
83
  fromJSON(object) {
56
84
  return {
57
- txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "",
85
+ order_id: isSet(object.order_id) ? globalThis.String(object.order_id) : "",
58
86
  status: isSet(object.status) ? globalThis.String(object.status) : "",
87
+ mode: isSet(object.mode) ? globalThis.String(object.mode) : undefined,
88
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : undefined,
89
+ clint_id: isSet(object.clint_id) ? globalThis.String(object.clint_id) : undefined,
59
90
  };
60
91
  },
61
92
  toJSON(message) {
62
93
  const obj = {};
63
- if (message.txn_id !== "") {
64
- obj.txn_id = message.txn_id;
94
+ if (message.order_id !== "") {
95
+ obj.order_id = message.order_id;
65
96
  }
66
97
  if (message.status !== "") {
67
98
  obj.status = message.status;
68
99
  }
100
+ if (message.mode !== undefined) {
101
+ obj.mode = message.mode;
102
+ }
103
+ if (message.customer_id !== undefined) {
104
+ obj.customer_id = Math.round(message.customer_id);
105
+ }
106
+ if (message.clint_id !== undefined) {
107
+ obj.clint_id = message.clint_id;
108
+ }
69
109
  return obj;
70
110
  },
71
111
  create(base) {
@@ -73,8 +113,11 @@ exports.updateTxnStatusRequest = {
73
113
  },
74
114
  fromPartial(object) {
75
115
  const message = createBaseupdateTxnStatusRequest();
76
- message.txn_id = object.txn_id ?? "";
116
+ message.order_id = object.order_id ?? "";
77
117
  message.status = object.status ?? "";
118
+ message.mode = object.mode ?? undefined;
119
+ message.customer_id = object.customer_id ?? undefined;
120
+ message.clint_id = object.clint_id ?? undefined;
78
121
  return message;
79
122
  },
80
123
  };
@@ -128,6 +171,19 @@ exports.updateTxnStatusResponse = {
128
171
  return message;
129
172
  },
130
173
  };
174
+ function longToNumber(long) {
175
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
176
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
177
+ }
178
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
179
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
180
+ }
181
+ return long.toNumber();
182
+ }
183
+ if (minimal_1.default.util.Long !== long_1.default) {
184
+ minimal_1.default.util.Long = long_1.default;
185
+ minimal_1.default.configure();
186
+ }
131
187
  function isSet(value) {
132
188
  return value !== null && value !== undefined;
133
189
  }
@@ -0,0 +1,35 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "loans.getvirtualaccountnumber";
3
+ export interface getVirtualAccountNumberRequest {
4
+ customer_id: number;
5
+ }
6
+ export interface getVirtualAccountNumberResponse {
7
+ account_number: string;
8
+ }
9
+ export declare const getVirtualAccountNumberRequest: {
10
+ encode(message: getVirtualAccountNumberRequest, writer?: _m0.Writer): _m0.Writer;
11
+ decode(input: _m0.Reader | Uint8Array, length?: number): getVirtualAccountNumberRequest;
12
+ fromJSON(object: any): getVirtualAccountNumberRequest;
13
+ toJSON(message: getVirtualAccountNumberRequest): unknown;
14
+ create<I extends Exact<DeepPartial<getVirtualAccountNumberRequest>, I>>(base?: I): getVirtualAccountNumberRequest;
15
+ fromPartial<I extends Exact<DeepPartial<getVirtualAccountNumberRequest>, I>>(object: I): getVirtualAccountNumberRequest;
16
+ };
17
+ export declare const getVirtualAccountNumberResponse: {
18
+ encode(message: getVirtualAccountNumberResponse, writer?: _m0.Writer): _m0.Writer;
19
+ decode(input: _m0.Reader | Uint8Array, length?: number): getVirtualAccountNumberResponse;
20
+ fromJSON(object: any): getVirtualAccountNumberResponse;
21
+ toJSON(message: getVirtualAccountNumberResponse): unknown;
22
+ create<I extends Exact<DeepPartial<getVirtualAccountNumberResponse>, I>>(base?: I): getVirtualAccountNumberResponse;
23
+ fromPartial<I extends Exact<DeepPartial<getVirtualAccountNumberResponse>, I>>(object: I): getVirtualAccountNumberResponse;
24
+ };
25
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
26
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
27
+ [K in keyof T]?: DeepPartial<T[K]>;
28
+ } : Partial<T>;
29
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
30
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
31
+ [K in keyof P]: Exact<P[K], I[K]>;
32
+ } & {
33
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
34
+ };
35
+ export {};
@@ -2,38 +2,38 @@
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v1.181.0
5
- // protoc v3.20.3
6
- // source: customers/verifyemail.proto
5
+ // protoc v5.28.2
6
+ // source: loans/getvirtualaccountnumber.proto
7
7
  var __importDefault = (this && this.__importDefault) || function (mod) {
8
8
  return (mod && mod.__esModule) ? mod : { "default": mod };
9
9
  };
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.verifyEmailResponse = exports.verifyEmailRequest = exports.protobufPackage = void 0;
11
+ exports.getVirtualAccountNumberResponse = exports.getVirtualAccountNumberRequest = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
- exports.protobufPackage = "customers.verifyemail";
15
- function createBaseverifyEmailRequest() {
16
- return { token: "" };
14
+ exports.protobufPackage = "loans.getvirtualaccountnumber";
15
+ function createBasegetVirtualAccountNumberRequest() {
16
+ return { customer_id: 0 };
17
17
  }
18
- exports.verifyEmailRequest = {
18
+ exports.getVirtualAccountNumberRequest = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
20
- if (message.token !== "") {
21
- writer.uint32(10).string(message.token);
20
+ if (message.customer_id !== 0) {
21
+ writer.uint32(8).int32(message.customer_id);
22
22
  }
23
23
  return writer;
24
24
  },
25
25
  decode(input, length) {
26
26
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
27
27
  let end = length === undefined ? reader.len : reader.pos + length;
28
- const message = createBaseverifyEmailRequest();
28
+ const message = createBasegetVirtualAccountNumberRequest();
29
29
  while (reader.pos < end) {
30
30
  const tag = reader.uint32();
31
31
  switch (tag >>> 3) {
32
32
  case 1:
33
- if (tag !== 10) {
33
+ if (tag !== 8) {
34
34
  break;
35
35
  }
36
- message.token = reader.string();
36
+ message.customer_id = reader.int32();
37
37
  continue;
38
38
  }
39
39
  if ((tag & 7) === 4 || tag === 0) {
@@ -44,46 +44,46 @@ exports.verifyEmailRequest = {
44
44
  return message;
45
45
  },
46
46
  fromJSON(object) {
47
- return { token: isSet(object.token) ? globalThis.String(object.token) : "" };
47
+ return { customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0 };
48
48
  },
49
49
  toJSON(message) {
50
50
  const obj = {};
51
- if (message.token !== "") {
52
- obj.token = message.token;
51
+ if (message.customer_id !== 0) {
52
+ obj.customer_id = Math.round(message.customer_id);
53
53
  }
54
54
  return obj;
55
55
  },
56
56
  create(base) {
57
- return exports.verifyEmailRequest.fromPartial(base ?? {});
57
+ return exports.getVirtualAccountNumberRequest.fromPartial(base ?? {});
58
58
  },
59
59
  fromPartial(object) {
60
- const message = createBaseverifyEmailRequest();
61
- message.token = object.token ?? "";
60
+ const message = createBasegetVirtualAccountNumberRequest();
61
+ message.customer_id = object.customer_id ?? 0;
62
62
  return message;
63
63
  },
64
64
  };
65
- function createBaseverifyEmailResponse() {
66
- return { status: false };
65
+ function createBasegetVirtualAccountNumberResponse() {
66
+ return { account_number: "" };
67
67
  }
68
- exports.verifyEmailResponse = {
68
+ exports.getVirtualAccountNumberResponse = {
69
69
  encode(message, writer = minimal_1.default.Writer.create()) {
70
- if (message.status !== false) {
71
- writer.uint32(8).bool(message.status);
70
+ if (message.account_number !== "") {
71
+ writer.uint32(10).string(message.account_number);
72
72
  }
73
73
  return writer;
74
74
  },
75
75
  decode(input, length) {
76
76
  const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
77
77
  let end = length === undefined ? reader.len : reader.pos + length;
78
- const message = createBaseverifyEmailResponse();
78
+ const message = createBasegetVirtualAccountNumberResponse();
79
79
  while (reader.pos < end) {
80
80
  const tag = reader.uint32();
81
81
  switch (tag >>> 3) {
82
82
  case 1:
83
- if (tag !== 8) {
83
+ if (tag !== 10) {
84
84
  break;
85
85
  }
86
- message.status = reader.bool();
86
+ message.account_number = reader.string();
87
87
  continue;
88
88
  }
89
89
  if ((tag & 7) === 4 || tag === 0) {
@@ -94,21 +94,21 @@ exports.verifyEmailResponse = {
94
94
  return message;
95
95
  },
96
96
  fromJSON(object) {
97
- return { status: isSet(object.status) ? globalThis.Boolean(object.status) : false };
97
+ return { account_number: isSet(object.account_number) ? globalThis.String(object.account_number) : "" };
98
98
  },
99
99
  toJSON(message) {
100
100
  const obj = {};
101
- if (message.status !== false) {
102
- obj.status = message.status;
101
+ if (message.account_number !== "") {
102
+ obj.account_number = message.account_number;
103
103
  }
104
104
  return obj;
105
105
  },
106
106
  create(base) {
107
- return exports.verifyEmailResponse.fromPartial(base ?? {});
107
+ return exports.getVirtualAccountNumberResponse.fromPartial(base ?? {});
108
108
  },
109
109
  fromPartial(object) {
110
- const message = createBaseverifyEmailResponse();
111
- message.status = object.status ?? false;
110
+ const message = createBasegetVirtualAccountNumberResponse();
111
+ message.account_number = object.account_number ?? "";
112
112
  return message;
113
113
  },
114
114
  };
@@ -0,0 +1,39 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "loans.manualpaymentallocation";
3
+ export interface manualPaymentAllocationRequest {
4
+ customer_id: number;
5
+ amount: number;
6
+ type: string;
7
+ loan_id: number[];
8
+ }
9
+ export interface manualPaymentAllocationResponse {
10
+ message: string;
11
+ status: number;
12
+ }
13
+ export declare const manualPaymentAllocationRequest: {
14
+ encode(message: manualPaymentAllocationRequest, writer?: _m0.Writer): _m0.Writer;
15
+ decode(input: _m0.Reader | Uint8Array, length?: number): manualPaymentAllocationRequest;
16
+ fromJSON(object: any): manualPaymentAllocationRequest;
17
+ toJSON(message: manualPaymentAllocationRequest): unknown;
18
+ create<I extends Exact<DeepPartial<manualPaymentAllocationRequest>, I>>(base?: I): manualPaymentAllocationRequest;
19
+ fromPartial<I extends Exact<DeepPartial<manualPaymentAllocationRequest>, I>>(object: I): manualPaymentAllocationRequest;
20
+ };
21
+ export declare const manualPaymentAllocationResponse: {
22
+ encode(message: manualPaymentAllocationResponse, writer?: _m0.Writer): _m0.Writer;
23
+ decode(input: _m0.Reader | Uint8Array, length?: number): manualPaymentAllocationResponse;
24
+ fromJSON(object: any): manualPaymentAllocationResponse;
25
+ toJSON(message: manualPaymentAllocationResponse): unknown;
26
+ create<I extends Exact<DeepPartial<manualPaymentAllocationResponse>, I>>(base?: I): manualPaymentAllocationResponse;
27
+ fromPartial<I extends Exact<DeepPartial<manualPaymentAllocationResponse>, I>>(object: I): manualPaymentAllocationResponse;
28
+ };
29
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
30
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
31
+ [K in keyof T]?: DeepPartial<T[K]>;
32
+ } : Partial<T>;
33
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
34
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
35
+ [K in keyof P]: Exact<P[K], I[K]>;
36
+ } & {
37
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
38
+ };
39
+ export {};
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v1.181.0
5
+ // protoc v5.28.3
6
+ // source: loans/manualpaymentallocation.proto
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.manualPaymentAllocationResponse = exports.manualPaymentAllocationRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "loans.manualpaymentallocation";
15
+ function createBasemanualPaymentAllocationRequest() {
16
+ return { customer_id: 0, amount: 0, type: "", loan_id: [] };
17
+ }
18
+ exports.manualPaymentAllocationRequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.customer_id !== 0) {
21
+ writer.uint32(8).int32(message.customer_id);
22
+ }
23
+ if (message.amount !== 0) {
24
+ writer.uint32(16).int32(message.amount);
25
+ }
26
+ if (message.type !== "") {
27
+ writer.uint32(26).string(message.type);
28
+ }
29
+ writer.uint32(34).fork();
30
+ for (const v of message.loan_id) {
31
+ writer.int32(v);
32
+ }
33
+ writer.ldelim();
34
+ return writer;
35
+ },
36
+ decode(input, length) {
37
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
38
+ let end = length === undefined ? reader.len : reader.pos + length;
39
+ const message = createBasemanualPaymentAllocationRequest();
40
+ while (reader.pos < end) {
41
+ const tag = reader.uint32();
42
+ switch (tag >>> 3) {
43
+ case 1:
44
+ if (tag !== 8) {
45
+ break;
46
+ }
47
+ message.customer_id = reader.int32();
48
+ continue;
49
+ case 2:
50
+ if (tag !== 16) {
51
+ break;
52
+ }
53
+ message.amount = reader.int32();
54
+ continue;
55
+ case 3:
56
+ if (tag !== 26) {
57
+ break;
58
+ }
59
+ message.type = reader.string();
60
+ continue;
61
+ case 4:
62
+ if (tag === 32) {
63
+ message.loan_id.push(reader.int32());
64
+ continue;
65
+ }
66
+ if (tag === 34) {
67
+ const end2 = reader.uint32() + reader.pos;
68
+ while (reader.pos < end2) {
69
+ message.loan_id.push(reader.int32());
70
+ }
71
+ continue;
72
+ }
73
+ break;
74
+ }
75
+ if ((tag & 7) === 4 || tag === 0) {
76
+ break;
77
+ }
78
+ reader.skipType(tag & 7);
79
+ }
80
+ return message;
81
+ },
82
+ fromJSON(object) {
83
+ return {
84
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
85
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
86
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
87
+ loan_id: globalThis.Array.isArray(object?.loan_id) ? object.loan_id.map((e) => globalThis.Number(e)) : [],
88
+ };
89
+ },
90
+ toJSON(message) {
91
+ const obj = {};
92
+ if (message.customer_id !== 0) {
93
+ obj.customer_id = Math.round(message.customer_id);
94
+ }
95
+ if (message.amount !== 0) {
96
+ obj.amount = Math.round(message.amount);
97
+ }
98
+ if (message.type !== "") {
99
+ obj.type = message.type;
100
+ }
101
+ if (message.loan_id?.length) {
102
+ obj.loan_id = message.loan_id.map((e) => Math.round(e));
103
+ }
104
+ return obj;
105
+ },
106
+ create(base) {
107
+ return exports.manualPaymentAllocationRequest.fromPartial(base ?? {});
108
+ },
109
+ fromPartial(object) {
110
+ const message = createBasemanualPaymentAllocationRequest();
111
+ message.customer_id = object.customer_id ?? 0;
112
+ message.amount = object.amount ?? 0;
113
+ message.type = object.type ?? "";
114
+ message.loan_id = object.loan_id?.map((e) => e) || [];
115
+ return message;
116
+ },
117
+ };
118
+ function createBasemanualPaymentAllocationResponse() {
119
+ return { message: "", status: 0 };
120
+ }
121
+ exports.manualPaymentAllocationResponse = {
122
+ encode(message, writer = minimal_1.default.Writer.create()) {
123
+ if (message.message !== "") {
124
+ writer.uint32(10).string(message.message);
125
+ }
126
+ if (message.status !== 0) {
127
+ writer.uint32(16).int32(message.status);
128
+ }
129
+ return writer;
130
+ },
131
+ decode(input, length) {
132
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
133
+ let end = length === undefined ? reader.len : reader.pos + length;
134
+ const message = createBasemanualPaymentAllocationResponse();
135
+ while (reader.pos < end) {
136
+ const tag = reader.uint32();
137
+ switch (tag >>> 3) {
138
+ case 1:
139
+ if (tag !== 10) {
140
+ break;
141
+ }
142
+ message.message = reader.string();
143
+ continue;
144
+ case 2:
145
+ if (tag !== 16) {
146
+ break;
147
+ }
148
+ message.status = reader.int32();
149
+ continue;
150
+ }
151
+ if ((tag & 7) === 4 || tag === 0) {
152
+ break;
153
+ }
154
+ reader.skipType(tag & 7);
155
+ }
156
+ return message;
157
+ },
158
+ fromJSON(object) {
159
+ return {
160
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
161
+ status: isSet(object.status) ? globalThis.Number(object.status) : 0,
162
+ };
163
+ },
164
+ toJSON(message) {
165
+ const obj = {};
166
+ if (message.message !== "") {
167
+ obj.message = message.message;
168
+ }
169
+ if (message.status !== 0) {
170
+ obj.status = Math.round(message.status);
171
+ }
172
+ return obj;
173
+ },
174
+ create(base) {
175
+ return exports.manualPaymentAllocationResponse.fromPartial(base ?? {});
176
+ },
177
+ fromPartial(object) {
178
+ const message = createBasemanualPaymentAllocationResponse();
179
+ message.message = object.message ?? "";
180
+ message.status = object.status ?? 0;
181
+ return message;
182
+ },
183
+ };
184
+ function isSet(value) {
185
+ return value !== null && value !== undefined;
186
+ }
@@ -0,0 +1,37 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "loans.rollbackextrapayment";
3
+ export interface rollbackExtraPaymentRequest {
4
+ customer_id: number;
5
+ amount: number;
6
+ }
7
+ export interface rollbackExtraPaymentResponse {
8
+ message: string;
9
+ status: number;
10
+ }
11
+ export declare const rollbackExtraPaymentRequest: {
12
+ encode(message: rollbackExtraPaymentRequest, writer?: _m0.Writer): _m0.Writer;
13
+ decode(input: _m0.Reader | Uint8Array, length?: number): rollbackExtraPaymentRequest;
14
+ fromJSON(object: any): rollbackExtraPaymentRequest;
15
+ toJSON(message: rollbackExtraPaymentRequest): unknown;
16
+ create<I extends Exact<DeepPartial<rollbackExtraPaymentRequest>, I>>(base?: I): rollbackExtraPaymentRequest;
17
+ fromPartial<I extends Exact<DeepPartial<rollbackExtraPaymentRequest>, I>>(object: I): rollbackExtraPaymentRequest;
18
+ };
19
+ export declare const rollbackExtraPaymentResponse: {
20
+ encode(message: rollbackExtraPaymentResponse, writer?: _m0.Writer): _m0.Writer;
21
+ decode(input: _m0.Reader | Uint8Array, length?: number): rollbackExtraPaymentResponse;
22
+ fromJSON(object: any): rollbackExtraPaymentResponse;
23
+ toJSON(message: rollbackExtraPaymentResponse): unknown;
24
+ create<I extends Exact<DeepPartial<rollbackExtraPaymentResponse>, I>>(base?: I): rollbackExtraPaymentResponse;
25
+ fromPartial<I extends Exact<DeepPartial<rollbackExtraPaymentResponse>, I>>(object: I): rollbackExtraPaymentResponse;
26
+ };
27
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
28
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
29
+ [K in keyof T]?: DeepPartial<T[K]>;
30
+ } : Partial<T>;
31
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
32
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
33
+ [K in keyof P]: Exact<P[K], I[K]>;
34
+ } & {
35
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
36
+ };
37
+ export {};