@stashfin/grpc 1.2.346 → 1.2.348
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.
package/package.json
CHANGED
|
@@ -9,6 +9,14 @@ export interface getPaymentSummaryResponse {
|
|
|
9
9
|
brand_voucher: number;
|
|
10
10
|
credit_report: number;
|
|
11
11
|
total_amount: number;
|
|
12
|
+
terms_and_conditions: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
order_id: string;
|
|
16
|
+
}
|
|
17
|
+
export interface getPaymentSummaryResponse_TermsAndConditionsEntry {
|
|
18
|
+
key: string;
|
|
19
|
+
value: string;
|
|
12
20
|
}
|
|
13
21
|
export declare const getPaymentSummaryRequest: {
|
|
14
22
|
encode(_: getPaymentSummaryRequest, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -26,6 +34,14 @@ export declare const getPaymentSummaryResponse: {
|
|
|
26
34
|
create<I extends Exact<DeepPartial<getPaymentSummaryResponse>, I>>(base?: I): getPaymentSummaryResponse;
|
|
27
35
|
fromPartial<I extends Exact<DeepPartial<getPaymentSummaryResponse>, I>>(object: I): getPaymentSummaryResponse;
|
|
28
36
|
};
|
|
37
|
+
export declare const getPaymentSummaryResponse_TermsAndConditionsEntry: {
|
|
38
|
+
encode(message: getPaymentSummaryResponse_TermsAndConditionsEntry, writer?: _m0.Writer): _m0.Writer;
|
|
39
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): getPaymentSummaryResponse_TermsAndConditionsEntry;
|
|
40
|
+
fromJSON(object: any): getPaymentSummaryResponse_TermsAndConditionsEntry;
|
|
41
|
+
toJSON(message: getPaymentSummaryResponse_TermsAndConditionsEntry): unknown;
|
|
42
|
+
create<I extends Exact<DeepPartial<getPaymentSummaryResponse_TermsAndConditionsEntry>, I>>(base?: I): getPaymentSummaryResponse_TermsAndConditionsEntry;
|
|
43
|
+
fromPartial<I extends Exact<DeepPartial<getPaymentSummaryResponse_TermsAndConditionsEntry>, I>>(object: I): getPaymentSummaryResponse_TermsAndConditionsEntry;
|
|
44
|
+
};
|
|
29
45
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
30
46
|
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
47
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -8,7 +8,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.getPaymentSummaryResponse = exports.getPaymentSummaryRequest = exports.protobufPackage = void 0;
|
|
11
|
+
exports.getPaymentSummaryResponse_TermsAndConditionsEntry = exports.getPaymentSummaryResponse = exports.getPaymentSummaryRequest = exports.protobufPackage = void 0;
|
|
12
12
|
/* eslint-disable */
|
|
13
13
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
14
|
exports.protobufPackage = "customers.cb.getpaymentsummary";
|
|
@@ -50,7 +50,16 @@ exports.getPaymentSummaryRequest = {
|
|
|
50
50
|
},
|
|
51
51
|
};
|
|
52
52
|
function createBasegetPaymentSummaryResponse() {
|
|
53
|
-
return {
|
|
53
|
+
return {
|
|
54
|
+
builder_fee: 0,
|
|
55
|
+
gst: 0,
|
|
56
|
+
first_emi: 0,
|
|
57
|
+
brand_voucher: 0,
|
|
58
|
+
credit_report: 0,
|
|
59
|
+
total_amount: 0,
|
|
60
|
+
terms_and_conditions: {},
|
|
61
|
+
order_id: "",
|
|
62
|
+
};
|
|
54
63
|
}
|
|
55
64
|
exports.getPaymentSummaryResponse = {
|
|
56
65
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -72,6 +81,13 @@ exports.getPaymentSummaryResponse = {
|
|
|
72
81
|
if (message.total_amount !== 0) {
|
|
73
82
|
writer.uint32(49).double(message.total_amount);
|
|
74
83
|
}
|
|
84
|
+
Object.entries(message.terms_and_conditions).forEach(([key, value]) => {
|
|
85
|
+
exports.getPaymentSummaryResponse_TermsAndConditionsEntry.encode({ key: key, value }, writer.uint32(58).fork())
|
|
86
|
+
.ldelim();
|
|
87
|
+
});
|
|
88
|
+
if (message.order_id !== "") {
|
|
89
|
+
writer.uint32(66).string(message.order_id);
|
|
90
|
+
}
|
|
75
91
|
return writer;
|
|
76
92
|
},
|
|
77
93
|
decode(input, length) {
|
|
@@ -117,6 +133,21 @@ exports.getPaymentSummaryResponse = {
|
|
|
117
133
|
}
|
|
118
134
|
message.total_amount = reader.double();
|
|
119
135
|
continue;
|
|
136
|
+
case 7:
|
|
137
|
+
if (tag !== 58) {
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
const entry7 = exports.getPaymentSummaryResponse_TermsAndConditionsEntry.decode(reader, reader.uint32());
|
|
141
|
+
if (entry7.value !== undefined) {
|
|
142
|
+
message.terms_and_conditions[entry7.key] = entry7.value;
|
|
143
|
+
}
|
|
144
|
+
continue;
|
|
145
|
+
case 8:
|
|
146
|
+
if (tag !== 66) {
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
message.order_id = reader.string();
|
|
150
|
+
continue;
|
|
120
151
|
}
|
|
121
152
|
if ((tag & 7) === 4 || tag === 0) {
|
|
122
153
|
break;
|
|
@@ -133,6 +164,13 @@ exports.getPaymentSummaryResponse = {
|
|
|
133
164
|
brand_voucher: isSet(object.brand_voucher) ? globalThis.Number(object.brand_voucher) : 0,
|
|
134
165
|
credit_report: isSet(object.credit_report) ? globalThis.Number(object.credit_report) : 0,
|
|
135
166
|
total_amount: isSet(object.total_amount) ? globalThis.Number(object.total_amount) : 0,
|
|
167
|
+
terms_and_conditions: isObject(object.terms_and_conditions)
|
|
168
|
+
? Object.entries(object.terms_and_conditions).reduce((acc, [key, value]) => {
|
|
169
|
+
acc[key] = String(value);
|
|
170
|
+
return acc;
|
|
171
|
+
}, {})
|
|
172
|
+
: {},
|
|
173
|
+
order_id: isSet(object.order_id) ? globalThis.String(object.order_id) : "",
|
|
136
174
|
};
|
|
137
175
|
},
|
|
138
176
|
toJSON(message) {
|
|
@@ -155,6 +193,18 @@ exports.getPaymentSummaryResponse = {
|
|
|
155
193
|
if (message.total_amount !== 0) {
|
|
156
194
|
obj.total_amount = message.total_amount;
|
|
157
195
|
}
|
|
196
|
+
if (message.terms_and_conditions) {
|
|
197
|
+
const entries = Object.entries(message.terms_and_conditions);
|
|
198
|
+
if (entries.length > 0) {
|
|
199
|
+
obj.terms_and_conditions = {};
|
|
200
|
+
entries.forEach(([k, v]) => {
|
|
201
|
+
obj.terms_and_conditions[k] = v;
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (message.order_id !== "") {
|
|
206
|
+
obj.order_id = message.order_id;
|
|
207
|
+
}
|
|
158
208
|
return obj;
|
|
159
209
|
},
|
|
160
210
|
create(base) {
|
|
@@ -168,9 +218,85 @@ exports.getPaymentSummaryResponse = {
|
|
|
168
218
|
message.brand_voucher = object.brand_voucher ?? 0;
|
|
169
219
|
message.credit_report = object.credit_report ?? 0;
|
|
170
220
|
message.total_amount = object.total_amount ?? 0;
|
|
221
|
+
message.terms_and_conditions = Object.entries(object.terms_and_conditions ?? {}).reduce((acc, [key, value]) => {
|
|
222
|
+
if (value !== undefined) {
|
|
223
|
+
acc[key] = globalThis.String(value);
|
|
224
|
+
}
|
|
225
|
+
return acc;
|
|
226
|
+
}, {});
|
|
227
|
+
message.order_id = object.order_id ?? "";
|
|
171
228
|
return message;
|
|
172
229
|
},
|
|
173
230
|
};
|
|
231
|
+
function createBasegetPaymentSummaryResponse_TermsAndConditionsEntry() {
|
|
232
|
+
return { key: "", value: "" };
|
|
233
|
+
}
|
|
234
|
+
exports.getPaymentSummaryResponse_TermsAndConditionsEntry = {
|
|
235
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
236
|
+
if (message.key !== "") {
|
|
237
|
+
writer.uint32(10).string(message.key);
|
|
238
|
+
}
|
|
239
|
+
if (message.value !== "") {
|
|
240
|
+
writer.uint32(18).string(message.value);
|
|
241
|
+
}
|
|
242
|
+
return writer;
|
|
243
|
+
},
|
|
244
|
+
decode(input, length) {
|
|
245
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
246
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
247
|
+
const message = createBasegetPaymentSummaryResponse_TermsAndConditionsEntry();
|
|
248
|
+
while (reader.pos < end) {
|
|
249
|
+
const tag = reader.uint32();
|
|
250
|
+
switch (tag >>> 3) {
|
|
251
|
+
case 1:
|
|
252
|
+
if (tag !== 10) {
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
message.key = reader.string();
|
|
256
|
+
continue;
|
|
257
|
+
case 2:
|
|
258
|
+
if (tag !== 18) {
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
message.value = reader.string();
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
reader.skipType(tag & 7);
|
|
268
|
+
}
|
|
269
|
+
return message;
|
|
270
|
+
},
|
|
271
|
+
fromJSON(object) {
|
|
272
|
+
return {
|
|
273
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
274
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
275
|
+
};
|
|
276
|
+
},
|
|
277
|
+
toJSON(message) {
|
|
278
|
+
const obj = {};
|
|
279
|
+
if (message.key !== "") {
|
|
280
|
+
obj.key = message.key;
|
|
281
|
+
}
|
|
282
|
+
if (message.value !== "") {
|
|
283
|
+
obj.value = message.value;
|
|
284
|
+
}
|
|
285
|
+
return obj;
|
|
286
|
+
},
|
|
287
|
+
create(base) {
|
|
288
|
+
return exports.getPaymentSummaryResponse_TermsAndConditionsEntry.fromPartial(base ?? {});
|
|
289
|
+
},
|
|
290
|
+
fromPartial(object) {
|
|
291
|
+
const message = createBasegetPaymentSummaryResponse_TermsAndConditionsEntry();
|
|
292
|
+
message.key = object.key ?? "";
|
|
293
|
+
message.value = object.value ?? "";
|
|
294
|
+
return message;
|
|
295
|
+
},
|
|
296
|
+
};
|
|
297
|
+
function isObject(value) {
|
|
298
|
+
return typeof value === "object" && value !== null;
|
|
299
|
+
}
|
|
174
300
|
function isSet(value) {
|
|
175
301
|
return value !== null && value !== undefined;
|
|
176
302
|
}
|
|
@@ -63,15 +63,12 @@ exports.saveCreditBuilderRequest = {
|
|
|
63
63
|
},
|
|
64
64
|
};
|
|
65
65
|
function createBasesaveCreditBuilderResponse() {
|
|
66
|
-
return {
|
|
66
|
+
return { success: "" };
|
|
67
67
|
}
|
|
68
68
|
exports.saveCreditBuilderResponse = {
|
|
69
69
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
70
|
-
if (message.order_id !== "") {
|
|
71
|
-
writer.uint32(10).string(message.order_id);
|
|
72
|
-
}
|
|
73
70
|
if (message.success !== "") {
|
|
74
|
-
writer.uint32(
|
|
71
|
+
writer.uint32(10).string(message.success);
|
|
75
72
|
}
|
|
76
73
|
return writer;
|
|
77
74
|
},
|
|
@@ -86,12 +83,6 @@ exports.saveCreditBuilderResponse = {
|
|
|
86
83
|
if (tag !== 10) {
|
|
87
84
|
break;
|
|
88
85
|
}
|
|
89
|
-
message.order_id = reader.string();
|
|
90
|
-
continue;
|
|
91
|
-
case 2:
|
|
92
|
-
if (tag !== 18) {
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
86
|
message.success = reader.string();
|
|
96
87
|
continue;
|
|
97
88
|
}
|
|
@@ -103,16 +94,10 @@ exports.saveCreditBuilderResponse = {
|
|
|
103
94
|
return message;
|
|
104
95
|
},
|
|
105
96
|
fromJSON(object) {
|
|
106
|
-
return {
|
|
107
|
-
order_id: isSet(object.order_id) ? globalThis.String(object.order_id) : "",
|
|
108
|
-
success: isSet(object.success) ? globalThis.String(object.success) : "",
|
|
109
|
-
};
|
|
97
|
+
return { success: isSet(object.success) ? globalThis.String(object.success) : "" };
|
|
110
98
|
},
|
|
111
99
|
toJSON(message) {
|
|
112
100
|
const obj = {};
|
|
113
|
-
if (message.order_id !== "") {
|
|
114
|
-
obj.order_id = message.order_id;
|
|
115
|
-
}
|
|
116
101
|
if (message.success !== "") {
|
|
117
102
|
obj.success = message.success;
|
|
118
103
|
}
|
|
@@ -123,7 +108,6 @@ exports.saveCreditBuilderResponse = {
|
|
|
123
108
|
},
|
|
124
109
|
fromPartial(object) {
|
|
125
110
|
const message = createBasesaveCreditBuilderResponse();
|
|
126
|
-
message.order_id = object.order_id ?? "";
|
|
127
111
|
message.success = object.success ?? "";
|
|
128
112
|
return message;
|
|
129
113
|
},
|