@stashfin/grpc 1.2.307 → 1.2.309

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,213 @@
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.2
6
+ // source: growth/getchrpaymentstatus.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.paymentstatusresponse = exports.paymentstatus = exports.paymentstatusrequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "growth.getchrpaymentstatus";
15
+ function createBasepaymentstatusrequest() {
16
+ return { txn_id: "" };
17
+ }
18
+ exports.paymentstatusrequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.txn_id !== "") {
21
+ writer.uint32(10).string(message.txn_id);
22
+ }
23
+ return writer;
24
+ },
25
+ decode(input, length) {
26
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
27
+ let end = length === undefined ? reader.len : reader.pos + length;
28
+ const message = createBasepaymentstatusrequest();
29
+ while (reader.pos < end) {
30
+ const tag = reader.uint32();
31
+ switch (tag >>> 3) {
32
+ case 1:
33
+ if (tag !== 10) {
34
+ break;
35
+ }
36
+ message.txn_id = reader.string();
37
+ continue;
38
+ }
39
+ if ((tag & 7) === 4 || tag === 0) {
40
+ break;
41
+ }
42
+ reader.skipType(tag & 7);
43
+ }
44
+ return message;
45
+ },
46
+ fromJSON(object) {
47
+ return { txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "" };
48
+ },
49
+ toJSON(message) {
50
+ const obj = {};
51
+ if (message.txn_id !== "") {
52
+ obj.txn_id = message.txn_id;
53
+ }
54
+ return obj;
55
+ },
56
+ create(base) {
57
+ return exports.paymentstatusrequest.fromPartial(base ?? {});
58
+ },
59
+ fromPartial(object) {
60
+ const message = createBasepaymentstatusrequest();
61
+ message.txn_id = object.txn_id ?? "";
62
+ return message;
63
+ },
64
+ };
65
+ function createBasepaymentstatus() {
66
+ return { txn_status: false };
67
+ }
68
+ exports.paymentstatus = {
69
+ encode(message, writer = minimal_1.default.Writer.create()) {
70
+ if (message.txn_status !== false) {
71
+ writer.uint32(8).bool(message.txn_status);
72
+ }
73
+ return writer;
74
+ },
75
+ decode(input, length) {
76
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
77
+ let end = length === undefined ? reader.len : reader.pos + length;
78
+ const message = createBasepaymentstatus();
79
+ while (reader.pos < end) {
80
+ const tag = reader.uint32();
81
+ switch (tag >>> 3) {
82
+ case 1:
83
+ if (tag !== 8) {
84
+ break;
85
+ }
86
+ message.txn_status = reader.bool();
87
+ continue;
88
+ }
89
+ if ((tag & 7) === 4 || tag === 0) {
90
+ break;
91
+ }
92
+ reader.skipType(tag & 7);
93
+ }
94
+ return message;
95
+ },
96
+ fromJSON(object) {
97
+ return { txn_status: isSet(object.txn_status) ? globalThis.Boolean(object.txn_status) : false };
98
+ },
99
+ toJSON(message) {
100
+ const obj = {};
101
+ if (message.txn_status !== false) {
102
+ obj.txn_status = message.txn_status;
103
+ }
104
+ return obj;
105
+ },
106
+ create(base) {
107
+ return exports.paymentstatus.fromPartial(base ?? {});
108
+ },
109
+ fromPartial(object) {
110
+ const message = createBasepaymentstatus();
111
+ message.txn_status = object.txn_status ?? false;
112
+ return message;
113
+ },
114
+ };
115
+ function createBasepaymentstatusresponse() {
116
+ return { status: "", statusCode: 0, data: undefined, message: "" };
117
+ }
118
+ exports.paymentstatusresponse = {
119
+ encode(message, writer = minimal_1.default.Writer.create()) {
120
+ if (message.status !== "") {
121
+ writer.uint32(10).string(message.status);
122
+ }
123
+ if (message.statusCode !== 0) {
124
+ writer.uint32(16).int32(message.statusCode);
125
+ }
126
+ if (message.data !== undefined) {
127
+ exports.paymentstatus.encode(message.data, writer.uint32(26).fork()).ldelim();
128
+ }
129
+ if (message.message !== "") {
130
+ writer.uint32(34).string(message.message);
131
+ }
132
+ return writer;
133
+ },
134
+ decode(input, length) {
135
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
136
+ let end = length === undefined ? reader.len : reader.pos + length;
137
+ const message = createBasepaymentstatusresponse();
138
+ while (reader.pos < end) {
139
+ const tag = reader.uint32();
140
+ switch (tag >>> 3) {
141
+ case 1:
142
+ if (tag !== 10) {
143
+ break;
144
+ }
145
+ message.status = reader.string();
146
+ continue;
147
+ case 2:
148
+ if (tag !== 16) {
149
+ break;
150
+ }
151
+ message.statusCode = reader.int32();
152
+ continue;
153
+ case 3:
154
+ if (tag !== 26) {
155
+ break;
156
+ }
157
+ message.data = exports.paymentstatus.decode(reader, reader.uint32());
158
+ continue;
159
+ case 4:
160
+ if (tag !== 34) {
161
+ break;
162
+ }
163
+ message.message = reader.string();
164
+ continue;
165
+ }
166
+ if ((tag & 7) === 4 || tag === 0) {
167
+ break;
168
+ }
169
+ reader.skipType(tag & 7);
170
+ }
171
+ return message;
172
+ },
173
+ fromJSON(object) {
174
+ return {
175
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
176
+ statusCode: isSet(object.statusCode) ? globalThis.Number(object.statusCode) : 0,
177
+ data: isSet(object.data) ? exports.paymentstatus.fromJSON(object.data) : undefined,
178
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
179
+ };
180
+ },
181
+ toJSON(message) {
182
+ const obj = {};
183
+ if (message.status !== "") {
184
+ obj.status = message.status;
185
+ }
186
+ if (message.statusCode !== 0) {
187
+ obj.statusCode = Math.round(message.statusCode);
188
+ }
189
+ if (message.data !== undefined) {
190
+ obj.data = exports.paymentstatus.toJSON(message.data);
191
+ }
192
+ if (message.message !== "") {
193
+ obj.message = message.message;
194
+ }
195
+ return obj;
196
+ },
197
+ create(base) {
198
+ return exports.paymentstatusresponse.fromPartial(base ?? {});
199
+ },
200
+ fromPartial(object) {
201
+ const message = createBasepaymentstatusresponse();
202
+ message.status = object.status ?? "";
203
+ message.statusCode = object.statusCode ?? 0;
204
+ message.data = (object.data !== undefined && object.data !== null)
205
+ ? exports.paymentstatus.fromPartial(object.data)
206
+ : undefined;
207
+ message.message = object.message ?? "";
208
+ return message;
209
+ },
210
+ };
211
+ function isSet(value) {
212
+ return value !== null && value !== undefined;
213
+ }
@@ -7,6 +7,7 @@ export interface initiatepaymentrequest {
7
7
  }
8
8
  export interface redirectdata {
9
9
  redirect_url: string;
10
+ txn_id: string;
10
11
  }
11
12
  export interface initiatepaymentresponse {
12
13
  status: string;
@@ -93,13 +93,16 @@ exports.initiatepaymentrequest = {
93
93
  },
94
94
  };
95
95
  function createBaseredirectdata() {
96
- return { redirect_url: "" };
96
+ return { redirect_url: "", txn_id: "" };
97
97
  }
98
98
  exports.redirectdata = {
99
99
  encode(message, writer = minimal_1.default.Writer.create()) {
100
100
  if (message.redirect_url !== "") {
101
101
  writer.uint32(10).string(message.redirect_url);
102
102
  }
103
+ if (message.txn_id !== "") {
104
+ writer.uint32(18).string(message.txn_id);
105
+ }
103
106
  return writer;
104
107
  },
105
108
  decode(input, length) {
@@ -115,6 +118,12 @@ exports.redirectdata = {
115
118
  }
116
119
  message.redirect_url = reader.string();
117
120
  continue;
121
+ case 2:
122
+ if (tag !== 18) {
123
+ break;
124
+ }
125
+ message.txn_id = reader.string();
126
+ continue;
118
127
  }
119
128
  if ((tag & 7) === 4 || tag === 0) {
120
129
  break;
@@ -124,13 +133,19 @@ exports.redirectdata = {
124
133
  return message;
125
134
  },
126
135
  fromJSON(object) {
127
- return { redirect_url: isSet(object.redirect_url) ? globalThis.String(object.redirect_url) : "" };
136
+ return {
137
+ redirect_url: isSet(object.redirect_url) ? globalThis.String(object.redirect_url) : "",
138
+ txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "",
139
+ };
128
140
  },
129
141
  toJSON(message) {
130
142
  const obj = {};
131
143
  if (message.redirect_url !== "") {
132
144
  obj.redirect_url = message.redirect_url;
133
145
  }
146
+ if (message.txn_id !== "") {
147
+ obj.txn_id = message.txn_id;
148
+ }
134
149
  return obj;
135
150
  },
136
151
  create(base) {
@@ -139,6 +154,7 @@ exports.redirectdata = {
139
154
  fromPartial(object) {
140
155
  const message = createBaseredirectdata();
141
156
  message.redirect_url = object.redirect_url ?? "";
157
+ message.txn_id = object.txn_id ?? "";
142
158
  return message;
143
159
  },
144
160
  };
package/ts/growth.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
2
2
  import { chrplansstatusrequest, chrplanstatusresponse } from "./growth/checkplanstatus";
3
3
  import { chrattachplanrequest, chrattachplanresponse } from "./growth/getattachplandetails";
4
+ import { paymentstatusrequest, paymentstatusresponse } from "./growth/getchrpaymentstatus";
4
5
  import { chrplansrequest, chrplansresponse } from "./growth/getchrplans";
5
6
  import { credithealthreportrequest, credithealthreportresponse } from "./growth/getcredithealthreport";
6
7
  import { initiatepaymentrequest, initiatepaymentresponse } from "./growth/initiatepayment";
@@ -62,6 +63,15 @@ export declare const growthService: {
62
63
  readonly responseSerialize: (value: initiatepaymentresponse) => Buffer;
63
64
  readonly responseDeserialize: (value: Buffer) => initiatepaymentresponse;
64
65
  };
66
+ readonly getchrpaymentstatus: {
67
+ readonly path: "/service.growth/getchrpaymentstatus";
68
+ readonly requestStream: false;
69
+ readonly responseStream: false;
70
+ readonly requestSerialize: (value: paymentstatusrequest) => Buffer;
71
+ readonly requestDeserialize: (value: Buffer) => paymentstatusrequest;
72
+ readonly responseSerialize: (value: paymentstatusresponse) => Buffer;
73
+ readonly responseDeserialize: (value: Buffer) => paymentstatusresponse;
74
+ };
65
75
  };
66
76
  export interface growthServer extends UntypedServiceImplementation {
67
77
  processchrpayment: handleUnaryCall<processchrrequest, processchrresponse>;
@@ -70,6 +80,7 @@ export interface growthServer extends UntypedServiceImplementation {
70
80
  getchrplans: handleUnaryCall<chrplansrequest, chrplansresponse>;
71
81
  getcredithealthreport: handleUnaryCall<credithealthreportrequest, credithealthreportresponse>;
72
82
  initiatepayment: handleUnaryCall<initiatepaymentrequest, initiatepaymentresponse>;
83
+ getchrpaymentstatus: handleUnaryCall<paymentstatusrequest, paymentstatusresponse>;
73
84
  }
74
85
  export interface growthClient extends Client {
75
86
  processchrpayment(request: processchrrequest, callback: (error: ServiceError | null, response: processchrresponse) => void): ClientUnaryCall;
@@ -90,6 +101,9 @@ export interface growthClient extends Client {
90
101
  initiatepayment(request: initiatepaymentrequest, callback: (error: ServiceError | null, response: initiatepaymentresponse) => void): ClientUnaryCall;
91
102
  initiatepayment(request: initiatepaymentrequest, metadata: Metadata, callback: (error: ServiceError | null, response: initiatepaymentresponse) => void): ClientUnaryCall;
92
103
  initiatepayment(request: initiatepaymentrequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: initiatepaymentresponse) => void): ClientUnaryCall;
104
+ getchrpaymentstatus(request: paymentstatusrequest, callback: (error: ServiceError | null, response: paymentstatusresponse) => void): ClientUnaryCall;
105
+ getchrpaymentstatus(request: paymentstatusrequest, metadata: Metadata, callback: (error: ServiceError | null, response: paymentstatusresponse) => void): ClientUnaryCall;
106
+ getchrpaymentstatus(request: paymentstatusrequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: paymentstatusresponse) => void): ClientUnaryCall;
93
107
  }
94
108
  export declare const growthClient: {
95
109
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): growthClient;
package/ts/growth.js CHANGED
@@ -10,6 +10,7 @@ exports.growthClient = exports.growthService = exports.protobufPackage = void 0;
10
10
  const grpc_js_1 = require("@grpc/grpc-js");
11
11
  const checkplanstatus_1 = require("./growth/checkplanstatus");
12
12
  const getattachplandetails_1 = require("./growth/getattachplandetails");
13
+ const getchrpaymentstatus_1 = require("./growth/getchrpaymentstatus");
13
14
  const getchrplans_1 = require("./growth/getchrplans");
14
15
  const getcredithealthreport_1 = require("./growth/getcredithealthreport");
15
16
  const initiatepayment_1 = require("./growth/initiatepayment");
@@ -70,5 +71,14 @@ exports.growthService = {
70
71
  responseSerialize: (value) => Buffer.from(initiatepayment_1.initiatepaymentresponse.encode(value).finish()),
71
72
  responseDeserialize: (value) => initiatepayment_1.initiatepaymentresponse.decode(value),
72
73
  },
74
+ getchrpaymentstatus: {
75
+ path: "/service.growth/getchrpaymentstatus",
76
+ requestStream: false,
77
+ responseStream: false,
78
+ requestSerialize: (value) => Buffer.from(getchrpaymentstatus_1.paymentstatusrequest.encode(value).finish()),
79
+ requestDeserialize: (value) => getchrpaymentstatus_1.paymentstatusrequest.decode(value),
80
+ responseSerialize: (value) => Buffer.from(getchrpaymentstatus_1.paymentstatusresponse.encode(value).finish()),
81
+ responseDeserialize: (value) => getchrpaymentstatus_1.paymentstatusresponse.decode(value),
82
+ },
73
83
  };
74
84
  exports.growthClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.growthService, "service.growth");
@@ -0,0 +1,52 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "loans.getchrdetails";
3
+ export interface getChrDetailsRequest {
4
+ }
5
+ export interface plandata {
6
+ planId: number;
7
+ amount: number;
8
+ type: string;
9
+ duration: number;
10
+ discount: number;
11
+ }
12
+ export interface getChrDetailsResponse {
13
+ status: string;
14
+ statusCode: number;
15
+ data: plandata | undefined;
16
+ message: string;
17
+ }
18
+ export declare const getChrDetailsRequest: {
19
+ encode(_: getChrDetailsRequest, writer?: _m0.Writer): _m0.Writer;
20
+ decode(input: _m0.Reader | Uint8Array, length?: number): getChrDetailsRequest;
21
+ fromJSON(_: any): getChrDetailsRequest;
22
+ toJSON(_: getChrDetailsRequest): unknown;
23
+ create<I extends Exact<DeepPartial<getChrDetailsRequest>, I>>(base?: I): getChrDetailsRequest;
24
+ fromPartial<I extends Exact<DeepPartial<getChrDetailsRequest>, I>>(_: I): getChrDetailsRequest;
25
+ };
26
+ export declare const plandata: {
27
+ encode(message: plandata, writer?: _m0.Writer): _m0.Writer;
28
+ decode(input: _m0.Reader | Uint8Array, length?: number): plandata;
29
+ fromJSON(object: any): plandata;
30
+ toJSON(message: plandata): unknown;
31
+ create<I extends Exact<DeepPartial<plandata>, I>>(base?: I): plandata;
32
+ fromPartial<I extends Exact<DeepPartial<plandata>, I>>(object: I): plandata;
33
+ };
34
+ export declare const getChrDetailsResponse: {
35
+ encode(message: getChrDetailsResponse, writer?: _m0.Writer): _m0.Writer;
36
+ decode(input: _m0.Reader | Uint8Array, length?: number): getChrDetailsResponse;
37
+ fromJSON(object: any): getChrDetailsResponse;
38
+ toJSON(message: getChrDetailsResponse): unknown;
39
+ create<I extends Exact<DeepPartial<getChrDetailsResponse>, I>>(base?: I): getChrDetailsResponse;
40
+ fromPartial<I extends Exact<DeepPartial<getChrDetailsResponse>, I>>(object: I): getChrDetailsResponse;
41
+ };
42
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
43
+ 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 {} ? {
44
+ [K in keyof T]?: DeepPartial<T[K]>;
45
+ } : Partial<T>;
46
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
47
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
48
+ [K in keyof P]: Exact<P[K], I[K]>;
49
+ } & {
50
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
51
+ };
52
+ export {};
@@ -0,0 +1,256 @@
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.2
6
+ // source: loans/getchrdetails.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.getChrDetailsResponse = exports.plandata = exports.getChrDetailsRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "loans.getchrdetails";
15
+ function createBasegetChrDetailsRequest() {
16
+ return {};
17
+ }
18
+ exports.getChrDetailsRequest = {
19
+ encode(_, writer = minimal_1.default.Writer.create()) {
20
+ return writer;
21
+ },
22
+ decode(input, length) {
23
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
24
+ let end = length === undefined ? reader.len : reader.pos + length;
25
+ const message = createBasegetChrDetailsRequest();
26
+ while (reader.pos < end) {
27
+ const tag = reader.uint32();
28
+ switch (tag >>> 3) {
29
+ }
30
+ if ((tag & 7) === 4 || tag === 0) {
31
+ break;
32
+ }
33
+ reader.skipType(tag & 7);
34
+ }
35
+ return message;
36
+ },
37
+ fromJSON(_) {
38
+ return {};
39
+ },
40
+ toJSON(_) {
41
+ const obj = {};
42
+ return obj;
43
+ },
44
+ create(base) {
45
+ return exports.getChrDetailsRequest.fromPartial(base ?? {});
46
+ },
47
+ fromPartial(_) {
48
+ const message = createBasegetChrDetailsRequest();
49
+ return message;
50
+ },
51
+ };
52
+ function createBaseplandata() {
53
+ return { planId: 0, amount: 0, type: "", duration: 0, discount: 0 };
54
+ }
55
+ exports.plandata = {
56
+ encode(message, writer = minimal_1.default.Writer.create()) {
57
+ if (message.planId !== 0) {
58
+ writer.uint32(8).int32(message.planId);
59
+ }
60
+ if (message.amount !== 0) {
61
+ writer.uint32(21).float(message.amount);
62
+ }
63
+ if (message.type !== "") {
64
+ writer.uint32(26).string(message.type);
65
+ }
66
+ if (message.duration !== 0) {
67
+ writer.uint32(32).int32(message.duration);
68
+ }
69
+ if (message.discount !== 0) {
70
+ writer.uint32(45).float(message.discount);
71
+ }
72
+ return writer;
73
+ },
74
+ decode(input, length) {
75
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
76
+ let end = length === undefined ? reader.len : reader.pos + length;
77
+ const message = createBaseplandata();
78
+ while (reader.pos < end) {
79
+ const tag = reader.uint32();
80
+ switch (tag >>> 3) {
81
+ case 1:
82
+ if (tag !== 8) {
83
+ break;
84
+ }
85
+ message.planId = reader.int32();
86
+ continue;
87
+ case 2:
88
+ if (tag !== 21) {
89
+ break;
90
+ }
91
+ message.amount = reader.float();
92
+ continue;
93
+ case 3:
94
+ if (tag !== 26) {
95
+ break;
96
+ }
97
+ message.type = reader.string();
98
+ continue;
99
+ case 4:
100
+ if (tag !== 32) {
101
+ break;
102
+ }
103
+ message.duration = reader.int32();
104
+ continue;
105
+ case 5:
106
+ if (tag !== 45) {
107
+ break;
108
+ }
109
+ message.discount = reader.float();
110
+ continue;
111
+ }
112
+ if ((tag & 7) === 4 || tag === 0) {
113
+ break;
114
+ }
115
+ reader.skipType(tag & 7);
116
+ }
117
+ return message;
118
+ },
119
+ fromJSON(object) {
120
+ return {
121
+ planId: isSet(object.planId) ? globalThis.Number(object.planId) : 0,
122
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
123
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
124
+ duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
125
+ discount: isSet(object.discount) ? globalThis.Number(object.discount) : 0,
126
+ };
127
+ },
128
+ toJSON(message) {
129
+ const obj = {};
130
+ if (message.planId !== 0) {
131
+ obj.planId = Math.round(message.planId);
132
+ }
133
+ if (message.amount !== 0) {
134
+ obj.amount = message.amount;
135
+ }
136
+ if (message.type !== "") {
137
+ obj.type = message.type;
138
+ }
139
+ if (message.duration !== 0) {
140
+ obj.duration = Math.round(message.duration);
141
+ }
142
+ if (message.discount !== 0) {
143
+ obj.discount = message.discount;
144
+ }
145
+ return obj;
146
+ },
147
+ create(base) {
148
+ return exports.plandata.fromPartial(base ?? {});
149
+ },
150
+ fromPartial(object) {
151
+ const message = createBaseplandata();
152
+ message.planId = object.planId ?? 0;
153
+ message.amount = object.amount ?? 0;
154
+ message.type = object.type ?? "";
155
+ message.duration = object.duration ?? 0;
156
+ message.discount = object.discount ?? 0;
157
+ return message;
158
+ },
159
+ };
160
+ function createBasegetChrDetailsResponse() {
161
+ return { status: "", statusCode: 0, data: undefined, message: "" };
162
+ }
163
+ exports.getChrDetailsResponse = {
164
+ encode(message, writer = minimal_1.default.Writer.create()) {
165
+ if (message.status !== "") {
166
+ writer.uint32(10).string(message.status);
167
+ }
168
+ if (message.statusCode !== 0) {
169
+ writer.uint32(16).int32(message.statusCode);
170
+ }
171
+ if (message.data !== undefined) {
172
+ exports.plandata.encode(message.data, writer.uint32(26).fork()).ldelim();
173
+ }
174
+ if (message.message !== "") {
175
+ writer.uint32(34).string(message.message);
176
+ }
177
+ return writer;
178
+ },
179
+ decode(input, length) {
180
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
181
+ let end = length === undefined ? reader.len : reader.pos + length;
182
+ const message = createBasegetChrDetailsResponse();
183
+ while (reader.pos < end) {
184
+ const tag = reader.uint32();
185
+ switch (tag >>> 3) {
186
+ case 1:
187
+ if (tag !== 10) {
188
+ break;
189
+ }
190
+ message.status = reader.string();
191
+ continue;
192
+ case 2:
193
+ if (tag !== 16) {
194
+ break;
195
+ }
196
+ message.statusCode = reader.int32();
197
+ continue;
198
+ case 3:
199
+ if (tag !== 26) {
200
+ break;
201
+ }
202
+ message.data = exports.plandata.decode(reader, reader.uint32());
203
+ continue;
204
+ case 4:
205
+ if (tag !== 34) {
206
+ break;
207
+ }
208
+ message.message = reader.string();
209
+ continue;
210
+ }
211
+ if ((tag & 7) === 4 || tag === 0) {
212
+ break;
213
+ }
214
+ reader.skipType(tag & 7);
215
+ }
216
+ return message;
217
+ },
218
+ fromJSON(object) {
219
+ return {
220
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
221
+ statusCode: isSet(object.statusCode) ? globalThis.Number(object.statusCode) : 0,
222
+ data: isSet(object.data) ? exports.plandata.fromJSON(object.data) : undefined,
223
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
224
+ };
225
+ },
226
+ toJSON(message) {
227
+ const obj = {};
228
+ if (message.status !== "") {
229
+ obj.status = message.status;
230
+ }
231
+ if (message.statusCode !== 0) {
232
+ obj.statusCode = Math.round(message.statusCode);
233
+ }
234
+ if (message.data !== undefined) {
235
+ obj.data = exports.plandata.toJSON(message.data);
236
+ }
237
+ if (message.message !== "") {
238
+ obj.message = message.message;
239
+ }
240
+ return obj;
241
+ },
242
+ create(base) {
243
+ return exports.getChrDetailsResponse.fromPartial(base ?? {});
244
+ },
245
+ fromPartial(object) {
246
+ const message = createBasegetChrDetailsResponse();
247
+ message.status = object.status ?? "";
248
+ message.statusCode = object.statusCode ?? 0;
249
+ message.data = (object.data !== undefined && object.data !== null) ? exports.plandata.fromPartial(object.data) : undefined;
250
+ message.message = object.message ?? "";
251
+ return message;
252
+ },
253
+ };
254
+ function isSet(value) {
255
+ return value !== null && value !== undefined;
256
+ }
@@ -1,10 +1,14 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "loans.loansummary";
3
3
  export interface loanSummaryRequest {
4
- addons: number;
4
+ addons: loanSummaryRequest_Field[];
5
5
  amount: number;
6
6
  tenure: number;
7
7
  }
8
+ export interface loanSummaryRequest_Field {
9
+ name: string;
10
+ amount: number;
11
+ }
8
12
  export interface loanSummaryResponse {
9
13
  gateway_fees: number;
10
14
  striked_gateway_fees: number;
@@ -46,6 +50,14 @@ export declare const loanSummaryRequest: {
46
50
  create<I extends Exact<DeepPartial<loanSummaryRequest>, I>>(base?: I): loanSummaryRequest;
47
51
  fromPartial<I extends Exact<DeepPartial<loanSummaryRequest>, I>>(object: I): loanSummaryRequest;
48
52
  };
53
+ export declare const loanSummaryRequest_Field: {
54
+ encode(message: loanSummaryRequest_Field, writer?: _m0.Writer): _m0.Writer;
55
+ decode(input: _m0.Reader | Uint8Array, length?: number): loanSummaryRequest_Field;
56
+ fromJSON(object: any): loanSummaryRequest_Field;
57
+ toJSON(message: loanSummaryRequest_Field): unknown;
58
+ create<I extends Exact<DeepPartial<loanSummaryRequest_Field>, I>>(base?: I): loanSummaryRequest_Field;
59
+ fromPartial<I extends Exact<DeepPartial<loanSummaryRequest_Field>, I>>(object: I): loanSummaryRequest_Field;
60
+ };
49
61
  export declare const loanSummaryResponse: {
50
62
  encode(message: loanSummaryResponse, writer?: _m0.Writer): _m0.Writer;
51
63
  decode(input: _m0.Reader | Uint8Array, length?: number): loanSummaryResponse;