@stashfin/grpc 1.2.346 → 1.2.347
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,13 @@ 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
|
+
}
|
|
16
|
+
export interface getPaymentSummaryResponse_TermsAndConditionsEntry {
|
|
17
|
+
key: string;
|
|
18
|
+
value: string;
|
|
12
19
|
}
|
|
13
20
|
export declare const getPaymentSummaryRequest: {
|
|
14
21
|
encode(_: getPaymentSummaryRequest, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -26,6 +33,14 @@ export declare const getPaymentSummaryResponse: {
|
|
|
26
33
|
create<I extends Exact<DeepPartial<getPaymentSummaryResponse>, I>>(base?: I): getPaymentSummaryResponse;
|
|
27
34
|
fromPartial<I extends Exact<DeepPartial<getPaymentSummaryResponse>, I>>(object: I): getPaymentSummaryResponse;
|
|
28
35
|
};
|
|
36
|
+
export declare const getPaymentSummaryResponse_TermsAndConditionsEntry: {
|
|
37
|
+
encode(message: getPaymentSummaryResponse_TermsAndConditionsEntry, writer?: _m0.Writer): _m0.Writer;
|
|
38
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): getPaymentSummaryResponse_TermsAndConditionsEntry;
|
|
39
|
+
fromJSON(object: any): getPaymentSummaryResponse_TermsAndConditionsEntry;
|
|
40
|
+
toJSON(message: getPaymentSummaryResponse_TermsAndConditionsEntry): unknown;
|
|
41
|
+
create<I extends Exact<DeepPartial<getPaymentSummaryResponse_TermsAndConditionsEntry>, I>>(base?: I): getPaymentSummaryResponse_TermsAndConditionsEntry;
|
|
42
|
+
fromPartial<I extends Exact<DeepPartial<getPaymentSummaryResponse_TermsAndConditionsEntry>, I>>(object: I): getPaymentSummaryResponse_TermsAndConditionsEntry;
|
|
43
|
+
};
|
|
29
44
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
30
45
|
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
46
|
[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,15 @@ 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
|
+
};
|
|
54
62
|
}
|
|
55
63
|
exports.getPaymentSummaryResponse = {
|
|
56
64
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -72,6 +80,10 @@ exports.getPaymentSummaryResponse = {
|
|
|
72
80
|
if (message.total_amount !== 0) {
|
|
73
81
|
writer.uint32(49).double(message.total_amount);
|
|
74
82
|
}
|
|
83
|
+
Object.entries(message.terms_and_conditions).forEach(([key, value]) => {
|
|
84
|
+
exports.getPaymentSummaryResponse_TermsAndConditionsEntry.encode({ key: key, value }, writer.uint32(58).fork())
|
|
85
|
+
.ldelim();
|
|
86
|
+
});
|
|
75
87
|
return writer;
|
|
76
88
|
},
|
|
77
89
|
decode(input, length) {
|
|
@@ -117,6 +129,15 @@ exports.getPaymentSummaryResponse = {
|
|
|
117
129
|
}
|
|
118
130
|
message.total_amount = reader.double();
|
|
119
131
|
continue;
|
|
132
|
+
case 7:
|
|
133
|
+
if (tag !== 58) {
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
const entry7 = exports.getPaymentSummaryResponse_TermsAndConditionsEntry.decode(reader, reader.uint32());
|
|
137
|
+
if (entry7.value !== undefined) {
|
|
138
|
+
message.terms_and_conditions[entry7.key] = entry7.value;
|
|
139
|
+
}
|
|
140
|
+
continue;
|
|
120
141
|
}
|
|
121
142
|
if ((tag & 7) === 4 || tag === 0) {
|
|
122
143
|
break;
|
|
@@ -133,6 +154,12 @@ exports.getPaymentSummaryResponse = {
|
|
|
133
154
|
brand_voucher: isSet(object.brand_voucher) ? globalThis.Number(object.brand_voucher) : 0,
|
|
134
155
|
credit_report: isSet(object.credit_report) ? globalThis.Number(object.credit_report) : 0,
|
|
135
156
|
total_amount: isSet(object.total_amount) ? globalThis.Number(object.total_amount) : 0,
|
|
157
|
+
terms_and_conditions: isObject(object.terms_and_conditions)
|
|
158
|
+
? Object.entries(object.terms_and_conditions).reduce((acc, [key, value]) => {
|
|
159
|
+
acc[key] = String(value);
|
|
160
|
+
return acc;
|
|
161
|
+
}, {})
|
|
162
|
+
: {},
|
|
136
163
|
};
|
|
137
164
|
},
|
|
138
165
|
toJSON(message) {
|
|
@@ -155,6 +182,15 @@ exports.getPaymentSummaryResponse = {
|
|
|
155
182
|
if (message.total_amount !== 0) {
|
|
156
183
|
obj.total_amount = message.total_amount;
|
|
157
184
|
}
|
|
185
|
+
if (message.terms_and_conditions) {
|
|
186
|
+
const entries = Object.entries(message.terms_and_conditions);
|
|
187
|
+
if (entries.length > 0) {
|
|
188
|
+
obj.terms_and_conditions = {};
|
|
189
|
+
entries.forEach(([k, v]) => {
|
|
190
|
+
obj.terms_and_conditions[k] = v;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
158
194
|
return obj;
|
|
159
195
|
},
|
|
160
196
|
create(base) {
|
|
@@ -168,9 +204,84 @@ exports.getPaymentSummaryResponse = {
|
|
|
168
204
|
message.brand_voucher = object.brand_voucher ?? 0;
|
|
169
205
|
message.credit_report = object.credit_report ?? 0;
|
|
170
206
|
message.total_amount = object.total_amount ?? 0;
|
|
207
|
+
message.terms_and_conditions = Object.entries(object.terms_and_conditions ?? {}).reduce((acc, [key, value]) => {
|
|
208
|
+
if (value !== undefined) {
|
|
209
|
+
acc[key] = globalThis.String(value);
|
|
210
|
+
}
|
|
211
|
+
return acc;
|
|
212
|
+
}, {});
|
|
213
|
+
return message;
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
function createBasegetPaymentSummaryResponse_TermsAndConditionsEntry() {
|
|
217
|
+
return { key: "", value: "" };
|
|
218
|
+
}
|
|
219
|
+
exports.getPaymentSummaryResponse_TermsAndConditionsEntry = {
|
|
220
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
221
|
+
if (message.key !== "") {
|
|
222
|
+
writer.uint32(10).string(message.key);
|
|
223
|
+
}
|
|
224
|
+
if (message.value !== "") {
|
|
225
|
+
writer.uint32(18).string(message.value);
|
|
226
|
+
}
|
|
227
|
+
return writer;
|
|
228
|
+
},
|
|
229
|
+
decode(input, length) {
|
|
230
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
231
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
232
|
+
const message = createBasegetPaymentSummaryResponse_TermsAndConditionsEntry();
|
|
233
|
+
while (reader.pos < end) {
|
|
234
|
+
const tag = reader.uint32();
|
|
235
|
+
switch (tag >>> 3) {
|
|
236
|
+
case 1:
|
|
237
|
+
if (tag !== 10) {
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
message.key = reader.string();
|
|
241
|
+
continue;
|
|
242
|
+
case 2:
|
|
243
|
+
if (tag !== 18) {
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
message.value = reader.string();
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
reader.skipType(tag & 7);
|
|
253
|
+
}
|
|
254
|
+
return message;
|
|
255
|
+
},
|
|
256
|
+
fromJSON(object) {
|
|
257
|
+
return {
|
|
258
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
259
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
260
|
+
};
|
|
261
|
+
},
|
|
262
|
+
toJSON(message) {
|
|
263
|
+
const obj = {};
|
|
264
|
+
if (message.key !== "") {
|
|
265
|
+
obj.key = message.key;
|
|
266
|
+
}
|
|
267
|
+
if (message.value !== "") {
|
|
268
|
+
obj.value = message.value;
|
|
269
|
+
}
|
|
270
|
+
return obj;
|
|
271
|
+
},
|
|
272
|
+
create(base) {
|
|
273
|
+
return exports.getPaymentSummaryResponse_TermsAndConditionsEntry.fromPartial(base ?? {});
|
|
274
|
+
},
|
|
275
|
+
fromPartial(object) {
|
|
276
|
+
const message = createBasegetPaymentSummaryResponse_TermsAndConditionsEntry();
|
|
277
|
+
message.key = object.key ?? "";
|
|
278
|
+
message.value = object.value ?? "";
|
|
171
279
|
return message;
|
|
172
280
|
},
|
|
173
281
|
};
|
|
282
|
+
function isObject(value) {
|
|
283
|
+
return typeof value === "object" && value !== null;
|
|
284
|
+
}
|
|
174
285
|
function isSet(value) {
|
|
175
286
|
return value !== null && value !== undefined;
|
|
176
287
|
}
|