@stashfin/grpc 1.0.31 → 1.1.38

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 (160) hide show
  1. package/README.md +74 -0
  2. package/package.json +1 -1
  3. package/src/proto/customers/getbankaccountdetails.proto +11 -0
  4. package/src/proto/customers/getbasicinfo.proto +14 -0
  5. package/src/proto/customers/getcustomerbyid.proto +30 -0
  6. package/src/proto/customers/getdashboard.proto +46 -0
  7. package/src/proto/customers/getdashboardmaincard.proto +37 -0
  8. package/src/proto/customers/getprofessionalinfo.proto +13 -0
  9. package/src/proto/customers/getprofile.proto +13 -0
  10. package/src/proto/customers/getstep.proto +32 -0
  11. package/src/proto/customers/profilebasic.proto +14 -0
  12. package/src/proto/customers/profileupdatetnc.proto +11 -0
  13. package/src/proto/customers/sendemailtoken.proto +11 -0
  14. package/src/proto/customers/sendotp.proto +14 -0
  15. package/src/proto/customers/setmpin.proto +12 -0
  16. package/src/proto/customers/step1.proto +32 -0
  17. package/src/proto/customers/step10.proto +34 -0
  18. package/src/proto/customers/step2.proto +28 -0
  19. package/src/proto/customers/step7.proto +29 -0
  20. package/src/proto/customers/step8.proto +30 -0
  21. package/src/proto/customers/step9.proto +36 -0
  22. package/src/proto/customers/stepstatic.proto +27 -0
  23. package/src/proto/customers/verifyemail.proto +11 -0
  24. package/src/proto/customers/verifympin.proto +13 -0
  25. package/src/proto/customers/verifyotp.proto +17 -0
  26. package/src/proto/customers.proto +57 -0
  27. package/src/proto/example.proto +20 -0
  28. package/src/proto/loans/approveloan.proto +15 -0
  29. package/src/proto/loans/banklist.proto +15 -0
  30. package/src/proto/loans/calculateemi.proto +15 -0
  31. package/src/proto/loans/creditlimit.proto +10 -0
  32. package/src/proto/loans/updateinstallments.proto +19 -0
  33. package/src/proto/loans/updateloan.proto +15 -0
  34. package/src/proto/loans.proto +19 -0
  35. package/src/proto/stashcash/creditsc.proto +22 -0
  36. package/src/proto/stashcash/debitsc.proto +27 -0
  37. package/src/proto/stashcash/getscbalance.proto +21 -0
  38. package/src/proto/stashcash/getschistory.proto +35 -0
  39. package/src/proto/stashcash/reversesc.proto +20 -0
  40. package/src/proto/stashcash.proto +17 -0
  41. package/src/ts/customers/getbankaccountdetails.ts +169 -0
  42. package/src/ts/customers/getbasicinfo.ts +215 -0
  43. package/src/ts/customers/getcustomerbyid.ts +475 -0
  44. package/src/ts/customers/getdashboard.ts +711 -0
  45. package/src/ts/customers/getdashboardmaincard.ts +608 -0
  46. package/src/ts/customers/getprofessionalinfo.ts +183 -0
  47. package/src/ts/customers/getprofile.ts +199 -0
  48. package/src/ts/customers/getstep.ts +504 -0
  49. package/src/ts/customers/profilebasic.ts +198 -0
  50. package/src/ts/customers/profileupdatetnc.ts +148 -0
  51. package/src/ts/customers/sendemailtoken.ts +148 -0
  52. package/src/ts/customers/sendotp.ts +202 -0
  53. package/src/ts/customers/setmpin.ts +166 -0
  54. package/src/ts/customers/step1.ts +504 -0
  55. package/src/ts/customers/step10.ts +544 -0
  56. package/src/ts/customers/step2.ts +472 -0
  57. package/src/ts/customers/step7.ts +456 -0
  58. package/src/ts/customers/step8.ts +472 -0
  59. package/src/ts/customers/step9.ts +578 -0
  60. package/src/ts/customers/stepstatic.ts +425 -0
  61. package/src/ts/customers/verifyemail.ts +148 -0
  62. package/src/ts/customers/verifympin.ts +184 -0
  63. package/src/ts/customers/verifyotp.ts +232 -0
  64. package/src/ts/customers.ts +745 -0
  65. package/src/ts/example.ts +294 -0
  66. package/src/ts/google/protobuf/timestamp.ts +223 -0
  67. package/src/ts/loans/approveloan.ts +214 -0
  68. package/src/ts/loans/banklist.ts +248 -0
  69. package/src/ts/loans/calculateemi.ts +182 -0
  70. package/src/ts/loans/creditlimit.ts +151 -0
  71. package/src/ts/loans/updateinstallments.ts +271 -0
  72. package/src/ts/loans/updateloan.ts +214 -0
  73. package/src/ts/loans.ts +195 -0
  74. package/src/ts/stashcash/creditsc.ts +361 -0
  75. package/src/ts/stashcash/debitsc.ts +450 -0
  76. package/src/ts/stashcash/getscbalance.ts +351 -0
  77. package/src/ts/stashcash/getschistory.ts +566 -0
  78. package/src/ts/stashcash/reversesc.ts +329 -0
  79. package/src/ts/stashcash.ts +152 -0
  80. package/tsconfig.json +18 -0
  81. package/ts/customer/getprofile.d.ts +0 -38
  82. package/ts/customer/getprofile.js +0 -162
  83. package/ts/customer/getstep.d.ts +0 -78
  84. package/ts/customer/getstep.js +0 -420
  85. package/ts/customer/profileupdatetnc.d.ts +0 -35
  86. package/ts/customer/profileupdatetnc.js +0 -117
  87. package/ts/customer/sendotp.d.ts +0 -36
  88. package/ts/customer/sendotp.js +0 -133
  89. package/ts/customer/setmpin.d.ts +0 -36
  90. package/ts/customer/setmpin.js +0 -133
  91. package/ts/customer/step1.d.ts +0 -69
  92. package/ts/customer/step1.js +0 -395
  93. package/ts/customer/step10.d.ts +0 -73
  94. package/ts/customer/step10.js +0 -459
  95. package/ts/customer/step2.d.ts +0 -68
  96. package/ts/customer/step2.js +0 -381
  97. package/ts/customer/step7.d.ts +0 -68
  98. package/ts/customer/step7.js +0 -381
  99. package/ts/customer/step8.d.ts +0 -69
  100. package/ts/customer/step8.js +0 -395
  101. package/ts/customer/step9.d.ts +0 -75
  102. package/ts/customer/step9.js +0 -489
  103. package/ts/customer/stepstatic.d.ts +0 -66
  104. package/ts/customer/stepstatic.js +0 -352
  105. package/ts/customer/verifympin.d.ts +0 -37
  106. package/ts/customer/verifympin.js +0 -149
  107. package/ts/customer/verifyotp.d.ts +0 -39
  108. package/ts/customer/verifyotp.js +0 -177
  109. package/ts/customer.d.ts +0 -262
  110. package/ts/customer.js +0 -190
  111. package/ts/customers/getprofile.d.ts +0 -38
  112. package/ts/customers/getprofile.js +0 -162
  113. package/ts/customers/getstep.d.ts +0 -78
  114. package/ts/customers/getstep.js +0 -420
  115. package/ts/customers/profilebasic.d.ts +0 -38
  116. package/ts/customers/profilebasic.js +0 -161
  117. package/ts/customers/profileupdatetnc.d.ts +0 -35
  118. package/ts/customers/profileupdatetnc.js +0 -117
  119. package/ts/customers/sendemailtoken.d.ts +0 -35
  120. package/ts/customers/sendemailtoken.js +0 -117
  121. package/ts/customers/sendotp.d.ts +0 -36
  122. package/ts/customers/sendotp.js +0 -133
  123. package/ts/customers/setmpin.d.ts +0 -36
  124. package/ts/customers/setmpin.js +0 -133
  125. package/ts/customers/step1.d.ts +0 -69
  126. package/ts/customers/step1.js +0 -395
  127. package/ts/customers/step10.d.ts +0 -73
  128. package/ts/customers/step10.js +0 -459
  129. package/ts/customers/step2.d.ts +0 -68
  130. package/ts/customers/step2.js +0 -381
  131. package/ts/customers/step7.d.ts +0 -68
  132. package/ts/customers/step7.js +0 -381
  133. package/ts/customers/step8.d.ts +0 -69
  134. package/ts/customers/step8.js +0 -395
  135. package/ts/customers/step9.d.ts +0 -75
  136. package/ts/customers/step9.js +0 -489
  137. package/ts/customers/stepstatic.d.ts +0 -66
  138. package/ts/customers/stepstatic.js +0 -354
  139. package/ts/customers/verifyemail.d.ts +0 -35
  140. package/ts/customers/verifyemail.js +0 -117
  141. package/ts/customers/verifympin.d.ts +0 -37
  142. package/ts/customers/verifympin.js +0 -149
  143. package/ts/customers/verifyotp.d.ts +0 -39
  144. package/ts/customers/verifyotp.js +0 -177
  145. package/ts/customers.d.ts +0 -304
  146. package/ts/customers.js +0 -220
  147. package/ts/example.d.ts +0 -78
  148. package/ts/example.js +0 -199
  149. package/ts/stashcash/creditsc.d.ts +0 -54
  150. package/ts/stashcash/creditsc.js +0 -301
  151. package/ts/stashcash/debitsc.d.ts +0 -56
  152. package/ts/stashcash/debitsc.js +0 -329
  153. package/ts/stashcash/getscbalance.d.ts +0 -52
  154. package/ts/stashcash/getscbalance.js +0 -271
  155. package/ts/stashcash/getschistory.d.ts +0 -73
  156. package/ts/stashcash/getschistory.js +0 -479
  157. package/ts/stashcash/reversesc.d.ts +0 -52
  158. package/ts/stashcash/reversesc.js +0 -273
  159. package/ts/stashcash.d.ts +0 -84
  160. package/ts/stashcash.js +0 -64
@@ -1,301 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v1.180.0
5
- // protoc v3.20.3
6
- // source: stashcash/creditsc.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.response_Data = exports.response = exports.request = exports.protobufPackage = void 0;
12
- /* eslint-disable */
13
- const long_1 = __importDefault(require("long"));
14
- const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
- exports.protobufPackage = "stashcash.creditsc";
16
- function createBaserequest() {
17
- return { customer_id: 0, campaign_id: 0, amount: 0, sc_type: "", expiry: undefined };
18
- }
19
- exports.request = {
20
- encode(message, writer = minimal_1.default.Writer.create()) {
21
- if (message.customer_id !== 0) {
22
- writer.uint32(8).int64(message.customer_id);
23
- }
24
- if (message.campaign_id !== 0) {
25
- writer.uint32(16).int64(message.campaign_id);
26
- }
27
- if (message.amount !== 0) {
28
- writer.uint32(29).float(message.amount);
29
- }
30
- if (message.sc_type !== "") {
31
- writer.uint32(34).string(message.sc_type);
32
- }
33
- if (message.expiry !== undefined) {
34
- writer.uint32(42).string(message.expiry);
35
- }
36
- return writer;
37
- },
38
- decode(input, length) {
39
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
40
- let end = length === undefined ? reader.len : reader.pos + length;
41
- const message = createBaserequest();
42
- while (reader.pos < end) {
43
- const tag = reader.uint32();
44
- switch (tag >>> 3) {
45
- case 1:
46
- if (tag !== 8) {
47
- break;
48
- }
49
- message.customer_id = longToNumber(reader.int64());
50
- continue;
51
- case 2:
52
- if (tag !== 16) {
53
- break;
54
- }
55
- message.campaign_id = longToNumber(reader.int64());
56
- continue;
57
- case 3:
58
- if (tag !== 29) {
59
- break;
60
- }
61
- message.amount = reader.float();
62
- continue;
63
- case 4:
64
- if (tag !== 34) {
65
- break;
66
- }
67
- message.sc_type = reader.string();
68
- continue;
69
- case 5:
70
- if (tag !== 42) {
71
- break;
72
- }
73
- message.expiry = reader.string();
74
- continue;
75
- }
76
- if ((tag & 7) === 4 || tag === 0) {
77
- break;
78
- }
79
- reader.skipType(tag & 7);
80
- }
81
- return message;
82
- },
83
- fromJSON(object) {
84
- return {
85
- customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
86
- campaign_id: isSet(object.campaign_id) ? globalThis.Number(object.campaign_id) : 0,
87
- amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
88
- sc_type: isSet(object.sc_type) ? globalThis.String(object.sc_type) : "",
89
- expiry: isSet(object.expiry) ? globalThis.String(object.expiry) : undefined,
90
- };
91
- },
92
- toJSON(message) {
93
- const obj = {};
94
- if (message.customer_id !== 0) {
95
- obj.customer_id = Math.round(message.customer_id);
96
- }
97
- if (message.campaign_id !== 0) {
98
- obj.campaign_id = Math.round(message.campaign_id);
99
- }
100
- if (message.amount !== 0) {
101
- obj.amount = message.amount;
102
- }
103
- if (message.sc_type !== "") {
104
- obj.sc_type = message.sc_type;
105
- }
106
- if (message.expiry !== undefined) {
107
- obj.expiry = message.expiry;
108
- }
109
- return obj;
110
- },
111
- create(base) {
112
- return exports.request.fromPartial(base ?? {});
113
- },
114
- fromPartial(object) {
115
- const message = createBaserequest();
116
- message.customer_id = object.customer_id ?? 0;
117
- message.campaign_id = object.campaign_id ?? 0;
118
- message.amount = object.amount ?? 0;
119
- message.sc_type = object.sc_type ?? "";
120
- message.expiry = object.expiry ?? undefined;
121
- return message;
122
- },
123
- };
124
- function createBaseresponse() {
125
- return { status: "", data: undefined };
126
- }
127
- exports.response = {
128
- encode(message, writer = minimal_1.default.Writer.create()) {
129
- if (message.status !== "") {
130
- writer.uint32(10).string(message.status);
131
- }
132
- if (message.data !== undefined) {
133
- exports.response_Data.encode(message.data, writer.uint32(18).fork()).ldelim();
134
- }
135
- return writer;
136
- },
137
- decode(input, length) {
138
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
139
- let end = length === undefined ? reader.len : reader.pos + length;
140
- const message = createBaseresponse();
141
- while (reader.pos < end) {
142
- const tag = reader.uint32();
143
- switch (tag >>> 3) {
144
- case 1:
145
- if (tag !== 10) {
146
- break;
147
- }
148
- message.status = reader.string();
149
- continue;
150
- case 2:
151
- if (tag !== 18) {
152
- break;
153
- }
154
- message.data = exports.response_Data.decode(reader, reader.uint32());
155
- continue;
156
- }
157
- if ((tag & 7) === 4 || tag === 0) {
158
- break;
159
- }
160
- reader.skipType(tag & 7);
161
- }
162
- return message;
163
- },
164
- fromJSON(object) {
165
- return {
166
- status: isSet(object.status) ? globalThis.String(object.status) : "",
167
- data: isSet(object.data) ? exports.response_Data.fromJSON(object.data) : undefined,
168
- };
169
- },
170
- toJSON(message) {
171
- const obj = {};
172
- if (message.status !== "") {
173
- obj.status = message.status;
174
- }
175
- if (message.data !== undefined) {
176
- obj.data = exports.response_Data.toJSON(message.data);
177
- }
178
- return obj;
179
- },
180
- create(base) {
181
- return exports.response.fromPartial(base ?? {});
182
- },
183
- fromPartial(object) {
184
- const message = createBaseresponse();
185
- message.status = object.status ?? "";
186
- message.data = (object.data !== undefined && object.data !== null)
187
- ? exports.response_Data.fromPartial(object.data)
188
- : undefined;
189
- return message;
190
- },
191
- };
192
- function createBaseresponse_Data() {
193
- return { locked: 0, unlocked: 0, balance: 0, txn_id: 0 };
194
- }
195
- exports.response_Data = {
196
- encode(message, writer = minimal_1.default.Writer.create()) {
197
- if (message.locked !== 0) {
198
- writer.uint32(13).float(message.locked);
199
- }
200
- if (message.unlocked !== 0) {
201
- writer.uint32(21).float(message.unlocked);
202
- }
203
- if (message.balance !== 0) {
204
- writer.uint32(29).float(message.balance);
205
- }
206
- if (message.txn_id !== 0) {
207
- writer.uint32(32).int64(message.txn_id);
208
- }
209
- return writer;
210
- },
211
- decode(input, length) {
212
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
213
- let end = length === undefined ? reader.len : reader.pos + length;
214
- const message = createBaseresponse_Data();
215
- while (reader.pos < end) {
216
- const tag = reader.uint32();
217
- switch (tag >>> 3) {
218
- case 1:
219
- if (tag !== 13) {
220
- break;
221
- }
222
- message.locked = reader.float();
223
- continue;
224
- case 2:
225
- if (tag !== 21) {
226
- break;
227
- }
228
- message.unlocked = reader.float();
229
- continue;
230
- case 3:
231
- if (tag !== 29) {
232
- break;
233
- }
234
- message.balance = reader.float();
235
- continue;
236
- case 4:
237
- if (tag !== 32) {
238
- break;
239
- }
240
- message.txn_id = longToNumber(reader.int64());
241
- continue;
242
- }
243
- if ((tag & 7) === 4 || tag === 0) {
244
- break;
245
- }
246
- reader.skipType(tag & 7);
247
- }
248
- return message;
249
- },
250
- fromJSON(object) {
251
- return {
252
- locked: isSet(object.locked) ? globalThis.Number(object.locked) : 0,
253
- unlocked: isSet(object.unlocked) ? globalThis.Number(object.unlocked) : 0,
254
- balance: isSet(object.balance) ? globalThis.Number(object.balance) : 0,
255
- txn_id: isSet(object.txn_id) ? globalThis.Number(object.txn_id) : 0,
256
- };
257
- },
258
- toJSON(message) {
259
- const obj = {};
260
- if (message.locked !== 0) {
261
- obj.locked = message.locked;
262
- }
263
- if (message.unlocked !== 0) {
264
- obj.unlocked = message.unlocked;
265
- }
266
- if (message.balance !== 0) {
267
- obj.balance = message.balance;
268
- }
269
- if (message.txn_id !== 0) {
270
- obj.txn_id = Math.round(message.txn_id);
271
- }
272
- return obj;
273
- },
274
- create(base) {
275
- return exports.response_Data.fromPartial(base ?? {});
276
- },
277
- fromPartial(object) {
278
- const message = createBaseresponse_Data();
279
- message.locked = object.locked ?? 0;
280
- message.unlocked = object.unlocked ?? 0;
281
- message.balance = object.balance ?? 0;
282
- message.txn_id = object.txn_id ?? 0;
283
- return message;
284
- },
285
- };
286
- function longToNumber(long) {
287
- if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
288
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
289
- }
290
- if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
291
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
292
- }
293
- return long.toNumber();
294
- }
295
- if (minimal_1.default.util.Long !== long_1.default) {
296
- minimal_1.default.util.Long = long_1.default;
297
- minimal_1.default.configure();
298
- }
299
- function isSet(value) {
300
- return value !== null && value !== undefined;
301
- }
@@ -1,56 +0,0 @@
1
- import _m0 from "protobufjs/minimal";
2
- export declare const protobufPackage = "stashcash.debitsc";
3
- export interface request {
4
- customer_id: number;
5
- flag: number;
6
- campaign_id?: number | undefined;
7
- amount?: number | undefined;
8
- sc_type?: string | undefined;
9
- }
10
- export interface response {
11
- status: string;
12
- data?: response_Data | undefined;
13
- }
14
- export interface response_Data {
15
- locked: number;
16
- unlocked: number;
17
- balance: number;
18
- rupee_balance: number;
19
- txn_id: number;
20
- conversion_factor: number;
21
- }
22
- export declare const request: {
23
- encode(message: request, writer?: _m0.Writer): _m0.Writer;
24
- decode(input: _m0.Reader | Uint8Array, length?: number): request;
25
- fromJSON(object: any): request;
26
- toJSON(message: request): unknown;
27
- create<I extends Exact<DeepPartial<request>, I>>(base?: I): request;
28
- fromPartial<I extends Exact<DeepPartial<request>, I>>(object: I): request;
29
- };
30
- export declare const response: {
31
- encode(message: response, writer?: _m0.Writer): _m0.Writer;
32
- decode(input: _m0.Reader | Uint8Array, length?: number): response;
33
- fromJSON(object: any): response;
34
- toJSON(message: response): unknown;
35
- create<I extends Exact<DeepPartial<response>, I>>(base?: I): response;
36
- fromPartial<I extends Exact<DeepPartial<response>, I>>(object: I): response;
37
- };
38
- export declare const response_Data: {
39
- encode(message: response_Data, writer?: _m0.Writer): _m0.Writer;
40
- decode(input: _m0.Reader | Uint8Array, length?: number): response_Data;
41
- fromJSON(object: any): response_Data;
42
- toJSON(message: response_Data): unknown;
43
- create<I extends Exact<DeepPartial<response_Data>, I>>(base?: I): response_Data;
44
- fromPartial<I extends Exact<DeepPartial<response_Data>, I>>(object: I): response_Data;
45
- };
46
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
47
- 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 {} ? {
48
- [K in keyof T]?: DeepPartial<T[K]>;
49
- } : Partial<T>;
50
- type KeysOfUnion<T> = T extends T ? keyof T : never;
51
- export type Exact<P, I extends P> = P extends Builtin ? P : P & {
52
- [K in keyof P]: Exact<P[K], I[K]>;
53
- } & {
54
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
55
- };
56
- export {};
@@ -1,329 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v1.180.0
5
- // protoc v3.20.3
6
- // source: stashcash/debitsc.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.response_Data = exports.response = exports.request = exports.protobufPackage = void 0;
12
- /* eslint-disable */
13
- const long_1 = __importDefault(require("long"));
14
- const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
- exports.protobufPackage = "stashcash.debitsc";
16
- function createBaserequest() {
17
- return { customer_id: 0, flag: 0, campaign_id: undefined, amount: undefined, sc_type: undefined };
18
- }
19
- exports.request = {
20
- encode(message, writer = minimal_1.default.Writer.create()) {
21
- if (message.customer_id !== 0) {
22
- writer.uint32(8).int64(message.customer_id);
23
- }
24
- if (message.flag !== 0) {
25
- writer.uint32(16).int32(message.flag);
26
- }
27
- if (message.campaign_id !== undefined) {
28
- writer.uint32(24).int64(message.campaign_id);
29
- }
30
- if (message.amount !== undefined) {
31
- writer.uint32(37).float(message.amount);
32
- }
33
- if (message.sc_type !== undefined) {
34
- writer.uint32(42).string(message.sc_type);
35
- }
36
- return writer;
37
- },
38
- decode(input, length) {
39
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
40
- let end = length === undefined ? reader.len : reader.pos + length;
41
- const message = createBaserequest();
42
- while (reader.pos < end) {
43
- const tag = reader.uint32();
44
- switch (tag >>> 3) {
45
- case 1:
46
- if (tag !== 8) {
47
- break;
48
- }
49
- message.customer_id = longToNumber(reader.int64());
50
- continue;
51
- case 2:
52
- if (tag !== 16) {
53
- break;
54
- }
55
- message.flag = reader.int32();
56
- continue;
57
- case 3:
58
- if (tag !== 24) {
59
- break;
60
- }
61
- message.campaign_id = longToNumber(reader.int64());
62
- continue;
63
- case 4:
64
- if (tag !== 37) {
65
- break;
66
- }
67
- message.amount = reader.float();
68
- continue;
69
- case 5:
70
- if (tag !== 42) {
71
- break;
72
- }
73
- message.sc_type = reader.string();
74
- continue;
75
- }
76
- if ((tag & 7) === 4 || tag === 0) {
77
- break;
78
- }
79
- reader.skipType(tag & 7);
80
- }
81
- return message;
82
- },
83
- fromJSON(object) {
84
- return {
85
- customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
86
- flag: isSet(object.flag) ? globalThis.Number(object.flag) : 0,
87
- campaign_id: isSet(object.campaign_id) ? globalThis.Number(object.campaign_id) : undefined,
88
- amount: isSet(object.amount) ? globalThis.Number(object.amount) : undefined,
89
- sc_type: isSet(object.sc_type) ? globalThis.String(object.sc_type) : undefined,
90
- };
91
- },
92
- toJSON(message) {
93
- const obj = {};
94
- if (message.customer_id !== 0) {
95
- obj.customer_id = Math.round(message.customer_id);
96
- }
97
- if (message.flag !== 0) {
98
- obj.flag = Math.round(message.flag);
99
- }
100
- if (message.campaign_id !== undefined) {
101
- obj.campaign_id = Math.round(message.campaign_id);
102
- }
103
- if (message.amount !== undefined) {
104
- obj.amount = message.amount;
105
- }
106
- if (message.sc_type !== undefined) {
107
- obj.sc_type = message.sc_type;
108
- }
109
- return obj;
110
- },
111
- create(base) {
112
- return exports.request.fromPartial(base ?? {});
113
- },
114
- fromPartial(object) {
115
- const message = createBaserequest();
116
- message.customer_id = object.customer_id ?? 0;
117
- message.flag = object.flag ?? 0;
118
- message.campaign_id = object.campaign_id ?? undefined;
119
- message.amount = object.amount ?? undefined;
120
- message.sc_type = object.sc_type ?? undefined;
121
- return message;
122
- },
123
- };
124
- function createBaseresponse() {
125
- return { status: "", data: undefined };
126
- }
127
- exports.response = {
128
- encode(message, writer = minimal_1.default.Writer.create()) {
129
- if (message.status !== "") {
130
- writer.uint32(10).string(message.status);
131
- }
132
- if (message.data !== undefined) {
133
- exports.response_Data.encode(message.data, writer.uint32(18).fork()).ldelim();
134
- }
135
- return writer;
136
- },
137
- decode(input, length) {
138
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
139
- let end = length === undefined ? reader.len : reader.pos + length;
140
- const message = createBaseresponse();
141
- while (reader.pos < end) {
142
- const tag = reader.uint32();
143
- switch (tag >>> 3) {
144
- case 1:
145
- if (tag !== 10) {
146
- break;
147
- }
148
- message.status = reader.string();
149
- continue;
150
- case 2:
151
- if (tag !== 18) {
152
- break;
153
- }
154
- message.data = exports.response_Data.decode(reader, reader.uint32());
155
- continue;
156
- }
157
- if ((tag & 7) === 4 || tag === 0) {
158
- break;
159
- }
160
- reader.skipType(tag & 7);
161
- }
162
- return message;
163
- },
164
- fromJSON(object) {
165
- return {
166
- status: isSet(object.status) ? globalThis.String(object.status) : "",
167
- data: isSet(object.data) ? exports.response_Data.fromJSON(object.data) : undefined,
168
- };
169
- },
170
- toJSON(message) {
171
- const obj = {};
172
- if (message.status !== "") {
173
- obj.status = message.status;
174
- }
175
- if (message.data !== undefined) {
176
- obj.data = exports.response_Data.toJSON(message.data);
177
- }
178
- return obj;
179
- },
180
- create(base) {
181
- return exports.response.fromPartial(base ?? {});
182
- },
183
- fromPartial(object) {
184
- const message = createBaseresponse();
185
- message.status = object.status ?? "";
186
- message.data = (object.data !== undefined && object.data !== null)
187
- ? exports.response_Data.fromPartial(object.data)
188
- : undefined;
189
- return message;
190
- },
191
- };
192
- function createBaseresponse_Data() {
193
- return { locked: 0, unlocked: 0, balance: 0, rupee_balance: 0, txn_id: 0, conversion_factor: 0 };
194
- }
195
- exports.response_Data = {
196
- encode(message, writer = minimal_1.default.Writer.create()) {
197
- if (message.locked !== 0) {
198
- writer.uint32(13).float(message.locked);
199
- }
200
- if (message.unlocked !== 0) {
201
- writer.uint32(21).float(message.unlocked);
202
- }
203
- if (message.balance !== 0) {
204
- writer.uint32(29).float(message.balance);
205
- }
206
- if (message.rupee_balance !== 0) {
207
- writer.uint32(37).float(message.rupee_balance);
208
- }
209
- if (message.txn_id !== 0) {
210
- writer.uint32(40).int64(message.txn_id);
211
- }
212
- if (message.conversion_factor !== 0) {
213
- writer.uint32(48).int32(message.conversion_factor);
214
- }
215
- return writer;
216
- },
217
- decode(input, length) {
218
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
219
- let end = length === undefined ? reader.len : reader.pos + length;
220
- const message = createBaseresponse_Data();
221
- while (reader.pos < end) {
222
- const tag = reader.uint32();
223
- switch (tag >>> 3) {
224
- case 1:
225
- if (tag !== 13) {
226
- break;
227
- }
228
- message.locked = reader.float();
229
- continue;
230
- case 2:
231
- if (tag !== 21) {
232
- break;
233
- }
234
- message.unlocked = reader.float();
235
- continue;
236
- case 3:
237
- if (tag !== 29) {
238
- break;
239
- }
240
- message.balance = reader.float();
241
- continue;
242
- case 4:
243
- if (tag !== 37) {
244
- break;
245
- }
246
- message.rupee_balance = reader.float();
247
- continue;
248
- case 5:
249
- if (tag !== 40) {
250
- break;
251
- }
252
- message.txn_id = longToNumber(reader.int64());
253
- continue;
254
- case 6:
255
- if (tag !== 48) {
256
- break;
257
- }
258
- message.conversion_factor = reader.int32();
259
- continue;
260
- }
261
- if ((tag & 7) === 4 || tag === 0) {
262
- break;
263
- }
264
- reader.skipType(tag & 7);
265
- }
266
- return message;
267
- },
268
- fromJSON(object) {
269
- return {
270
- locked: isSet(object.locked) ? globalThis.Number(object.locked) : 0,
271
- unlocked: isSet(object.unlocked) ? globalThis.Number(object.unlocked) : 0,
272
- balance: isSet(object.balance) ? globalThis.Number(object.balance) : 0,
273
- rupee_balance: isSet(object.rupee_balance) ? globalThis.Number(object.rupee_balance) : 0,
274
- txn_id: isSet(object.txn_id) ? globalThis.Number(object.txn_id) : 0,
275
- conversion_factor: isSet(object.conversion_factor) ? globalThis.Number(object.conversion_factor) : 0,
276
- };
277
- },
278
- toJSON(message) {
279
- const obj = {};
280
- if (message.locked !== 0) {
281
- obj.locked = message.locked;
282
- }
283
- if (message.unlocked !== 0) {
284
- obj.unlocked = message.unlocked;
285
- }
286
- if (message.balance !== 0) {
287
- obj.balance = message.balance;
288
- }
289
- if (message.rupee_balance !== 0) {
290
- obj.rupee_balance = message.rupee_balance;
291
- }
292
- if (message.txn_id !== 0) {
293
- obj.txn_id = Math.round(message.txn_id);
294
- }
295
- if (message.conversion_factor !== 0) {
296
- obj.conversion_factor = Math.round(message.conversion_factor);
297
- }
298
- return obj;
299
- },
300
- create(base) {
301
- return exports.response_Data.fromPartial(base ?? {});
302
- },
303
- fromPartial(object) {
304
- const message = createBaseresponse_Data();
305
- message.locked = object.locked ?? 0;
306
- message.unlocked = object.unlocked ?? 0;
307
- message.balance = object.balance ?? 0;
308
- message.rupee_balance = object.rupee_balance ?? 0;
309
- message.txn_id = object.txn_id ?? 0;
310
- message.conversion_factor = object.conversion_factor ?? 0;
311
- return message;
312
- },
313
- };
314
- function longToNumber(long) {
315
- if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
316
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
317
- }
318
- if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
319
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
320
- }
321
- return long.toNumber();
322
- }
323
- if (minimal_1.default.util.Long !== long_1.default) {
324
- minimal_1.default.util.Long = long_1.default;
325
- minimal_1.default.configure();
326
- }
327
- function isSet(value) {
328
- return value !== null && value !== undefined;
329
- }