@stashfin/grpc 1.2.54 → 1.2.59
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 +3 -3
- package/ts/customers/addaddress.d.ts +50 -0
- package/ts/customers/addaddress.js +265 -0
- package/ts/customers/addbankaccountdetails.d.ts +37 -0
- package/ts/customers/addbankaccountdetails.js +147 -0
- package/ts/customers/createcustomerreference.d.ts +43 -0
- package/ts/customers/createcustomerreference.js +226 -0
- package/ts/customers/forgotmpin.d.ts +36 -0
- package/ts/customers/forgotmpin.js +133 -0
- package/ts/customers/forgotmpinotp.d.ts +34 -0
- package/ts/customers/forgotmpinotp.js +104 -0
- package/ts/customers/getbankaccountdetails.d.ts +36 -0
- package/ts/customers/getbankaccountdetails.js +134 -0
- package/ts/customers/getbasicinfo.d.ts +56 -0
- package/ts/customers/getbasicinfo.js +323 -0
- package/ts/customers/getcities.d.ts +47 -0
- package/ts/customers/getcities.js +183 -0
- package/ts/customers/getcustomerbyid.d.ts +55 -0
- package/ts/customers/getcustomerbyid.js +421 -0
- package/ts/customers/getdashboard.d.ts +91 -0
- package/ts/customers/getdashboard.js +618 -0
- package/ts/customers/getdashboardmaincard.d.ts +69 -0
- package/ts/customers/getdashboardmaincard.js +520 -0
- package/ts/customers/getkycweburl.d.ts +34 -0
- package/ts/customers/getkycweburl.js +104 -0
- package/ts/customers/getprofessionalinfo.d.ts +54 -0
- package/ts/customers/getprofessionalinfo.js +286 -0
- package/ts/customers/getprofile.d.ts +53 -0
- package/ts/customers/getprofile.js +282 -0
- package/ts/customers/getstates.d.ts +46 -0
- package/ts/customers/getstates.js +170 -0
- package/ts/customers/getstep.d.ts +69 -0
- package/ts/customers/getstep.js +406 -0
- package/ts/customers/profilebasic.d.ts +38 -0
- package/ts/customers/profilebasic.js +161 -0
- package/ts/customers/profileupdatetnc.d.ts +35 -0
- package/ts/customers/profileupdatetnc.js +117 -0
- package/ts/customers/resetmpin.d.ts +36 -0
- package/ts/customers/resetmpin.js +133 -0
- package/ts/customers/savebasicdetails.d.ts +47 -0
- package/ts/customers/savebasicdetails.js +185 -0
- package/ts/customers/saveunlocklimit.d.ts +34 -0
- package/ts/customers/saveunlocklimit.js +104 -0
- package/ts/customers/sendemailtoken.d.ts +35 -0
- package/ts/customers/sendemailtoken.js +117 -0
- package/ts/customers/sendotp.d.ts +38 -0
- package/ts/customers/sendotp.js +165 -0
- package/ts/customers/setmpin.d.ts +36 -0
- package/ts/customers/setmpin.js +133 -0
- package/ts/customers/step1.d.ts +71 -0
- package/ts/customers/step1.js +423 -0
- package/ts/customers/step10.d.ts +73 -0
- package/ts/customers/step10.js +459 -0
- package/ts/customers/step2.d.ts +67 -0
- package/ts/customers/step2.js +366 -0
- package/ts/customers/step7.d.ts +68 -0
- package/ts/customers/step7.js +381 -0
- package/ts/customers/step8.d.ts +69 -0
- package/ts/customers/step8.js +395 -0
- package/ts/customers/step9.d.ts +75 -0
- package/ts/customers/step9.js +489 -0
- package/ts/customers/stepstatic.d.ts +66 -0
- package/ts/customers/stepstatic.js +354 -0
- package/ts/customers/updatedigilockertxn.d.ts +37 -0
- package/ts/customers/updatedigilockertxn.js +147 -0
- package/ts/customers/updatedob.d.ts +35 -0
- package/ts/customers/updatedob.js +117 -0
- package/ts/customers/updatehypervergetxn.d.ts +36 -0
- package/ts/customers/updatehypervergetxn.js +133 -0
- package/ts/customers/validatepan.d.ts +45 -0
- package/ts/customers/validatepan.js +274 -0
- package/ts/customers/verifyemail.d.ts +35 -0
- package/ts/customers/verifyemail.js +117 -0
- package/ts/customers/verifympin.d.ts +37 -0
- package/ts/customers/verifympin.js +149 -0
- package/ts/customers/verifyotp.d.ts +41 -0
- package/ts/customers/verifyotp.js +205 -0
- package/ts/customers.d.ts +596 -0
- package/ts/customers.js +428 -0
- package/ts/example.d.ts +78 -0
- package/ts/example.js +199 -0
- package/{src/ts/google/protobuf/timestamp.ts → ts/google/protobuf/timestamp.d.ts} +30 -126
- package/ts/google/protobuf/timestamp.js +97 -0
- package/ts/loans/approveloan.d.ts +39 -0
- package/ts/loans/approveloan.js +175 -0
- package/ts/loans/banklist.d.ts +37 -0
- package/ts/loans/banklist.js +148 -0
- package/ts/loans/calculateemi.d.ts +51 -0
- package/ts/loans/calculateemi.js +243 -0
- package/ts/loans/creditlimit.d.ts +43 -0
- package/ts/loans/creditlimit.js +247 -0
- package/ts/loans/restructureloan.d.ts +36 -0
- package/ts/loans/restructureloan.js +133 -0
- package/ts/loans/transactionlist.d.ts +50 -0
- package/ts/loans/transactionlist.js +229 -0
- package/ts/loans/updateinstallments.d.ts +42 -0
- package/ts/loans/updateinstallments.js +226 -0
- package/ts/loans/updateloan.d.ts +39 -0
- package/ts/loans/updateloan.js +175 -0
- package/ts/loans.d.ts +126 -0
- package/ts/loans.js +94 -0
- package/ts/stashcash/creditsc.d.ts +54 -0
- package/ts/stashcash/creditsc.js +301 -0
- package/ts/stashcash/debitsc.d.ts +59 -0
- package/ts/stashcash/debitsc.js +380 -0
- package/ts/stashcash/getscbalance.d.ts +53 -0
- package/ts/stashcash/getscbalance.js +293 -0
- package/ts/stashcash/getschistory.d.ts +73 -0
- package/ts/stashcash/getschistory.js +479 -0
- package/ts/stashcash/reversesc.d.ts +52 -0
- package/ts/stashcash/reversesc.js +273 -0
- package/ts/stashcash.d.ts +84 -0
- package/ts/stashcash.js +64 -0
- package/README.md +0 -74
- package/src/proto/customers/addaddress.proto +0 -25
- package/src/proto/customers/addbankaccountdetails.proto +0 -13
- package/src/proto/customers/createcustomerreference.proto +0 -21
- package/src/proto/customers/forgotmpin.proto +0 -12
- package/src/proto/customers/forgotmpinotp.proto +0 -10
- package/src/proto/customers/getbankaccountdetails.proto +0 -11
- package/src/proto/customers/getbasicinfo.proto +0 -24
- package/src/proto/customers/getcities.proto +0 -16
- package/src/proto/customers/getcustomerbyid.proto +0 -31
- package/src/proto/customers/getdashboard.proto +0 -47
- package/src/proto/customers/getdashboardmaincard.proto +0 -37
- package/src/proto/customers/getkycweburl.proto +0 -10
- package/src/proto/customers/getprofessionalinfo.proto +0 -22
- package/src/proto/customers/getprofile.proto +0 -22
- package/src/proto/customers/getstates.proto +0 -15
- package/src/proto/customers/getstep.proto +0 -30
- package/src/proto/customers/profilebasic.proto +0 -14
- package/src/proto/customers/profileupdatetnc.proto +0 -11
- package/src/proto/customers/resetmpin.proto +0 -13
- package/src/proto/customers/savebasicdetails.proto +0 -16
- package/src/proto/customers/saveunlocklimit.proto +0 -10
- package/src/proto/customers/sendemailtoken.proto +0 -11
- package/src/proto/customers/sendotp.proto +0 -14
- package/src/proto/customers/setmpin.proto +0 -12
- package/src/proto/customers/step10.proto +0 -34
- package/src/proto/customers/step7.proto +0 -29
- package/src/proto/customers/step8.proto +0 -30
- package/src/proto/customers/step9.proto +0 -36
- package/src/proto/customers/stepstatic.proto +0 -27
- package/src/proto/customers/updatedigilockertxn.proto +0 -13
- package/src/proto/customers/updatedob.proto +0 -13
- package/src/proto/customers/updatehypervergetxn.proto +0 -12
- package/src/proto/customers/verifyemail.proto +0 -11
- package/src/proto/customers/verifympin.proto +0 -13
- package/src/proto/customers/verifyotp.proto +0 -17
- package/src/proto/customers.proto +0 -83
- package/src/proto/example.proto +0 -20
- package/src/proto/loans/approveloan.proto +0 -15
- package/src/proto/loans/banklist.proto +0 -12
- package/src/proto/loans/calculateemi.proto +0 -20
- package/src/proto/loans/creditlimit.proto +0 -18
- package/src/proto/loans/restructureloan.proto +0 -12
- package/src/proto/loans/transactionlist.proto +0 -18
- package/src/proto/loans/updateinstallments.proto +0 -19
- package/src/proto/loans/updateloan.proto +0 -15
- package/src/proto/loans.proto +0 -23
- package/src/proto/stashcash/creditsc.proto +0 -22
- package/src/proto/stashcash/debitsc.proto +0 -27
- package/src/proto/stashcash/getscbalance.proto +0 -21
- package/src/proto/stashcash/getschistory.proto +0 -35
- package/src/proto/stashcash/reversesc.proto +0 -20
- package/src/proto/stashcash.proto +0 -17
- package/src/ts/customers/addaddress.ts +0 -310
- package/src/ts/customers/addbankaccountdetails.ts +0 -184
- package/src/ts/customers/createcustomerreference.ts +0 -276
- package/src/ts/customers/getbankaccountdetails.ts +0 -169
- package/src/ts/customers/getbasicinfo.ts +0 -385
- package/src/ts/customers/getcities.ts +0 -227
- package/src/ts/customers/getcustomerbyid.ts +0 -492
- package/src/ts/customers/getdashboard.ts +0 -728
- package/src/ts/customers/getdashboardmaincard.ts +0 -608
- package/src/ts/customers/getkycweburl.ts +0 -133
- package/src/ts/customers/getprofessionalinfo.ts +0 -344
- package/src/ts/customers/getprofile.ts +0 -338
- package/src/ts/customers/getstates.ts +0 -212
- package/src/ts/customers/getstep.ts +0 -483
- package/src/ts/customers/profilebasic.ts +0 -198
- package/src/ts/customers/profileupdatetnc.ts +0 -148
- package/src/ts/customers/resetmpin.ts +0 -166
- package/src/ts/customers/savebasicdetails.ts +0 -229
- package/src/ts/customers/saveunlocklimit.ts +0 -133
- package/src/ts/customers/sendemailtoken.ts +0 -148
- package/src/ts/customers/sendotp.ts +0 -202
- package/src/ts/customers/setmpin.ts +0 -166
- package/src/ts/customers/step10.ts +0 -544
- package/src/ts/customers/step7.ts +0 -456
- package/src/ts/customers/step8.ts +0 -472
- package/src/ts/customers/step9.ts +0 -578
- package/src/ts/customers/stepstatic.ts +0 -425
- package/src/ts/customers/updatedigilockertxn.ts +0 -182
- package/src/ts/customers/updatehypervergetxn.ts +0 -166
- package/src/ts/customers/verifyemail.ts +0 -148
- package/src/ts/customers/verifympin.ts +0 -184
- package/src/ts/customers/verifyotp.ts +0 -232
- package/src/ts/customers.ts +0 -1038
- package/src/ts/example.ts +0 -294
- package/src/ts/loans/approveloan.ts +0 -214
- package/src/ts/loans/banklist.ts +0 -183
- package/src/ts/loans/calculateemi.ts +0 -295
- package/src/ts/loans/creditlimit.ts +0 -294
- package/src/ts/loans/restructureloan.ts +0 -166
- package/src/ts/loans/transactionlist.ts +0 -281
- package/src/ts/loans/updateinstallments.ts +0 -271
- package/src/ts/loans/updateloan.ts +0 -214
- package/src/ts/loans.ts +0 -221
- package/src/ts/stashcash/creditsc.ts +0 -361
- package/src/ts/stashcash/debitsc.ts +0 -450
- package/src/ts/stashcash/getscbalance.ts +0 -351
- package/src/ts/stashcash/getschistory.ts +0 -566
- package/src/ts/stashcash/reversesc.ts +0 -329
- package/src/ts/stashcash.ts +0 -152
- package/tsconfig.json +0 -18
|
@@ -0,0 +1,273 @@
|
|
|
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 v3.20.3
|
|
6
|
+
// source: stashcash/reversesc.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.reversesc";
|
|
16
|
+
function createBaserequest() {
|
|
17
|
+
return { txnid: 0, customer_id: 0, sc_type: "" };
|
|
18
|
+
}
|
|
19
|
+
exports.request = {
|
|
20
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
21
|
+
if (message.txnid !== 0) {
|
|
22
|
+
writer.uint32(8).int64(message.txnid);
|
|
23
|
+
}
|
|
24
|
+
if (message.customer_id !== 0) {
|
|
25
|
+
writer.uint32(16).int64(message.customer_id);
|
|
26
|
+
}
|
|
27
|
+
if (message.sc_type !== "") {
|
|
28
|
+
writer.uint32(26).string(message.sc_type);
|
|
29
|
+
}
|
|
30
|
+
return writer;
|
|
31
|
+
},
|
|
32
|
+
decode(input, length) {
|
|
33
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
34
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
35
|
+
const message = createBaserequest();
|
|
36
|
+
while (reader.pos < end) {
|
|
37
|
+
const tag = reader.uint32();
|
|
38
|
+
switch (tag >>> 3) {
|
|
39
|
+
case 1:
|
|
40
|
+
if (tag !== 8) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
message.txnid = longToNumber(reader.int64());
|
|
44
|
+
continue;
|
|
45
|
+
case 2:
|
|
46
|
+
if (tag !== 16) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
message.customer_id = longToNumber(reader.int64());
|
|
50
|
+
continue;
|
|
51
|
+
case 3:
|
|
52
|
+
if (tag !== 26) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
message.sc_type = reader.string();
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
reader.skipType(tag & 7);
|
|
62
|
+
}
|
|
63
|
+
return message;
|
|
64
|
+
},
|
|
65
|
+
fromJSON(object) {
|
|
66
|
+
return {
|
|
67
|
+
txnid: isSet(object.txnid) ? globalThis.Number(object.txnid) : 0,
|
|
68
|
+
customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
|
|
69
|
+
sc_type: isSet(object.sc_type) ? globalThis.String(object.sc_type) : "",
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
toJSON(message) {
|
|
73
|
+
const obj = {};
|
|
74
|
+
if (message.txnid !== 0) {
|
|
75
|
+
obj.txnid = Math.round(message.txnid);
|
|
76
|
+
}
|
|
77
|
+
if (message.customer_id !== 0) {
|
|
78
|
+
obj.customer_id = Math.round(message.customer_id);
|
|
79
|
+
}
|
|
80
|
+
if (message.sc_type !== "") {
|
|
81
|
+
obj.sc_type = message.sc_type;
|
|
82
|
+
}
|
|
83
|
+
return obj;
|
|
84
|
+
},
|
|
85
|
+
create(base) {
|
|
86
|
+
return exports.request.fromPartial(base ?? {});
|
|
87
|
+
},
|
|
88
|
+
fromPartial(object) {
|
|
89
|
+
const message = createBaserequest();
|
|
90
|
+
message.txnid = object.txnid ?? 0;
|
|
91
|
+
message.customer_id = object.customer_id ?? 0;
|
|
92
|
+
message.sc_type = object.sc_type ?? "";
|
|
93
|
+
return message;
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
function createBaseresponse() {
|
|
97
|
+
return { status: "", data: undefined };
|
|
98
|
+
}
|
|
99
|
+
exports.response = {
|
|
100
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
101
|
+
if (message.status !== "") {
|
|
102
|
+
writer.uint32(10).string(message.status);
|
|
103
|
+
}
|
|
104
|
+
if (message.data !== undefined) {
|
|
105
|
+
exports.response_Data.encode(message.data, writer.uint32(18).fork()).ldelim();
|
|
106
|
+
}
|
|
107
|
+
return writer;
|
|
108
|
+
},
|
|
109
|
+
decode(input, length) {
|
|
110
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
111
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
112
|
+
const message = createBaseresponse();
|
|
113
|
+
while (reader.pos < end) {
|
|
114
|
+
const tag = reader.uint32();
|
|
115
|
+
switch (tag >>> 3) {
|
|
116
|
+
case 1:
|
|
117
|
+
if (tag !== 10) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
message.status = reader.string();
|
|
121
|
+
continue;
|
|
122
|
+
case 2:
|
|
123
|
+
if (tag !== 18) {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
message.data = exports.response_Data.decode(reader, reader.uint32());
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
reader.skipType(tag & 7);
|
|
133
|
+
}
|
|
134
|
+
return message;
|
|
135
|
+
},
|
|
136
|
+
fromJSON(object) {
|
|
137
|
+
return {
|
|
138
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
139
|
+
data: isSet(object.data) ? exports.response_Data.fromJSON(object.data) : undefined,
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
toJSON(message) {
|
|
143
|
+
const obj = {};
|
|
144
|
+
if (message.status !== "") {
|
|
145
|
+
obj.status = message.status;
|
|
146
|
+
}
|
|
147
|
+
if (message.data !== undefined) {
|
|
148
|
+
obj.data = exports.response_Data.toJSON(message.data);
|
|
149
|
+
}
|
|
150
|
+
return obj;
|
|
151
|
+
},
|
|
152
|
+
create(base) {
|
|
153
|
+
return exports.response.fromPartial(base ?? {});
|
|
154
|
+
},
|
|
155
|
+
fromPartial(object) {
|
|
156
|
+
const message = createBaseresponse();
|
|
157
|
+
message.status = object.status ?? "";
|
|
158
|
+
message.data = (object.data !== undefined && object.data !== null)
|
|
159
|
+
? exports.response_Data.fromPartial(object.data)
|
|
160
|
+
: undefined;
|
|
161
|
+
return message;
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
function createBaseresponse_Data() {
|
|
165
|
+
return { locked: 0, unlocked: 0, balance: 0, txn_id: 0 };
|
|
166
|
+
}
|
|
167
|
+
exports.response_Data = {
|
|
168
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
169
|
+
if (message.locked !== 0) {
|
|
170
|
+
writer.uint32(13).float(message.locked);
|
|
171
|
+
}
|
|
172
|
+
if (message.unlocked !== 0) {
|
|
173
|
+
writer.uint32(21).float(message.unlocked);
|
|
174
|
+
}
|
|
175
|
+
if (message.balance !== 0) {
|
|
176
|
+
writer.uint32(29).float(message.balance);
|
|
177
|
+
}
|
|
178
|
+
if (message.txn_id !== 0) {
|
|
179
|
+
writer.uint32(32).int32(message.txn_id);
|
|
180
|
+
}
|
|
181
|
+
return writer;
|
|
182
|
+
},
|
|
183
|
+
decode(input, length) {
|
|
184
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
185
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
186
|
+
const message = createBaseresponse_Data();
|
|
187
|
+
while (reader.pos < end) {
|
|
188
|
+
const tag = reader.uint32();
|
|
189
|
+
switch (tag >>> 3) {
|
|
190
|
+
case 1:
|
|
191
|
+
if (tag !== 13) {
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
message.locked = reader.float();
|
|
195
|
+
continue;
|
|
196
|
+
case 2:
|
|
197
|
+
if (tag !== 21) {
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
message.unlocked = reader.float();
|
|
201
|
+
continue;
|
|
202
|
+
case 3:
|
|
203
|
+
if (tag !== 29) {
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
message.balance = reader.float();
|
|
207
|
+
continue;
|
|
208
|
+
case 4:
|
|
209
|
+
if (tag !== 32) {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
message.txn_id = reader.int32();
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
reader.skipType(tag & 7);
|
|
219
|
+
}
|
|
220
|
+
return message;
|
|
221
|
+
},
|
|
222
|
+
fromJSON(object) {
|
|
223
|
+
return {
|
|
224
|
+
locked: isSet(object.locked) ? globalThis.Number(object.locked) : 0,
|
|
225
|
+
unlocked: isSet(object.unlocked) ? globalThis.Number(object.unlocked) : 0,
|
|
226
|
+
balance: isSet(object.balance) ? globalThis.Number(object.balance) : 0,
|
|
227
|
+
txn_id: isSet(object.txn_id) ? globalThis.Number(object.txn_id) : 0,
|
|
228
|
+
};
|
|
229
|
+
},
|
|
230
|
+
toJSON(message) {
|
|
231
|
+
const obj = {};
|
|
232
|
+
if (message.locked !== 0) {
|
|
233
|
+
obj.locked = message.locked;
|
|
234
|
+
}
|
|
235
|
+
if (message.unlocked !== 0) {
|
|
236
|
+
obj.unlocked = message.unlocked;
|
|
237
|
+
}
|
|
238
|
+
if (message.balance !== 0) {
|
|
239
|
+
obj.balance = message.balance;
|
|
240
|
+
}
|
|
241
|
+
if (message.txn_id !== 0) {
|
|
242
|
+
obj.txn_id = Math.round(message.txn_id);
|
|
243
|
+
}
|
|
244
|
+
return obj;
|
|
245
|
+
},
|
|
246
|
+
create(base) {
|
|
247
|
+
return exports.response_Data.fromPartial(base ?? {});
|
|
248
|
+
},
|
|
249
|
+
fromPartial(object) {
|
|
250
|
+
const message = createBaseresponse_Data();
|
|
251
|
+
message.locked = object.locked ?? 0;
|
|
252
|
+
message.unlocked = object.unlocked ?? 0;
|
|
253
|
+
message.balance = object.balance ?? 0;
|
|
254
|
+
message.txn_id = object.txn_id ?? 0;
|
|
255
|
+
return message;
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
function longToNumber(long) {
|
|
259
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
260
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
261
|
+
}
|
|
262
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
263
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
264
|
+
}
|
|
265
|
+
return long.toNumber();
|
|
266
|
+
}
|
|
267
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
268
|
+
minimal_1.default.util.Long = long_1.default;
|
|
269
|
+
minimal_1.default.configure();
|
|
270
|
+
}
|
|
271
|
+
function isSet(value) {
|
|
272
|
+
return value !== null && value !== undefined;
|
|
273
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
2
|
+
import { request as request1, response as response2 } from "./stashcash/creditsc";
|
|
3
|
+
import { request as request7, response as response8 } from "./stashcash/debitsc";
|
|
4
|
+
import { request, response } from "./stashcash/getscbalance";
|
|
5
|
+
import { request as request5, response as response6 } from "./stashcash/getschistory";
|
|
6
|
+
import { request as request3, response as response4 } from "./stashcash/reversesc";
|
|
7
|
+
export declare const protobufPackage = "service";
|
|
8
|
+
export type stashcashService = typeof stashcashService;
|
|
9
|
+
export declare const stashcashService: {
|
|
10
|
+
readonly getscbalance: {
|
|
11
|
+
readonly path: "/service.stashcash/getscbalance";
|
|
12
|
+
readonly requestStream: false;
|
|
13
|
+
readonly responseStream: false;
|
|
14
|
+
readonly requestSerialize: (value: request) => Buffer;
|
|
15
|
+
readonly requestDeserialize: (value: Buffer) => request;
|
|
16
|
+
readonly responseSerialize: (value: response) => Buffer;
|
|
17
|
+
readonly responseDeserialize: (value: Buffer) => response;
|
|
18
|
+
};
|
|
19
|
+
readonly creditsc: {
|
|
20
|
+
readonly path: "/service.stashcash/creditsc";
|
|
21
|
+
readonly requestStream: false;
|
|
22
|
+
readonly responseStream: false;
|
|
23
|
+
readonly requestSerialize: (value: request1) => Buffer;
|
|
24
|
+
readonly requestDeserialize: (value: Buffer) => request1;
|
|
25
|
+
readonly responseSerialize: (value: response2) => Buffer;
|
|
26
|
+
readonly responseDeserialize: (value: Buffer) => response2;
|
|
27
|
+
};
|
|
28
|
+
readonly reversesc: {
|
|
29
|
+
readonly path: "/service.stashcash/reversesc";
|
|
30
|
+
readonly requestStream: false;
|
|
31
|
+
readonly responseStream: false;
|
|
32
|
+
readonly requestSerialize: (value: request3) => Buffer;
|
|
33
|
+
readonly requestDeserialize: (value: Buffer) => request3;
|
|
34
|
+
readonly responseSerialize: (value: response4) => Buffer;
|
|
35
|
+
readonly responseDeserialize: (value: Buffer) => response4;
|
|
36
|
+
};
|
|
37
|
+
readonly getschistory: {
|
|
38
|
+
readonly path: "/service.stashcash/getschistory";
|
|
39
|
+
readonly requestStream: false;
|
|
40
|
+
readonly responseStream: false;
|
|
41
|
+
readonly requestSerialize: (value: request5) => Buffer;
|
|
42
|
+
readonly requestDeserialize: (value: Buffer) => request5;
|
|
43
|
+
readonly responseSerialize: (value: response6) => Buffer;
|
|
44
|
+
readonly responseDeserialize: (value: Buffer) => response6;
|
|
45
|
+
};
|
|
46
|
+
readonly debitsc: {
|
|
47
|
+
readonly path: "/service.stashcash/debitsc";
|
|
48
|
+
readonly requestStream: false;
|
|
49
|
+
readonly responseStream: false;
|
|
50
|
+
readonly requestSerialize: (value: request7) => Buffer;
|
|
51
|
+
readonly requestDeserialize: (value: Buffer) => request7;
|
|
52
|
+
readonly responseSerialize: (value: response8) => Buffer;
|
|
53
|
+
readonly responseDeserialize: (value: Buffer) => response8;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export interface stashcashServer extends UntypedServiceImplementation {
|
|
57
|
+
getscbalance: handleUnaryCall<request, response>;
|
|
58
|
+
creditsc: handleUnaryCall<request1, response2>;
|
|
59
|
+
reversesc: handleUnaryCall<request3, response4>;
|
|
60
|
+
getschistory: handleUnaryCall<request5, response6>;
|
|
61
|
+
debitsc: handleUnaryCall<request7, response8>;
|
|
62
|
+
}
|
|
63
|
+
export interface stashcashClient extends Client {
|
|
64
|
+
getscbalance(request: request, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
65
|
+
getscbalance(request: request, metadata: Metadata, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
66
|
+
getscbalance(request: request, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
67
|
+
creditsc(request: request1, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
|
|
68
|
+
creditsc(request: request1, metadata: Metadata, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
|
|
69
|
+
creditsc(request: request1, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
|
|
70
|
+
reversesc(request: request3, callback: (error: ServiceError | null, response: response4) => void): ClientUnaryCall;
|
|
71
|
+
reversesc(request: request3, metadata: Metadata, callback: (error: ServiceError | null, response: response4) => void): ClientUnaryCall;
|
|
72
|
+
reversesc(request: request3, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response4) => void): ClientUnaryCall;
|
|
73
|
+
getschistory(request: request5, callback: (error: ServiceError | null, response: response6) => void): ClientUnaryCall;
|
|
74
|
+
getschistory(request: request5, metadata: Metadata, callback: (error: ServiceError | null, response: response6) => void): ClientUnaryCall;
|
|
75
|
+
getschistory(request: request5, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response6) => void): ClientUnaryCall;
|
|
76
|
+
debitsc(request: request7, callback: (error: ServiceError | null, response: response8) => void): ClientUnaryCall;
|
|
77
|
+
debitsc(request: request7, metadata: Metadata, callback: (error: ServiceError | null, response: response8) => void): ClientUnaryCall;
|
|
78
|
+
debitsc(request: request7, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response8) => void): ClientUnaryCall;
|
|
79
|
+
}
|
|
80
|
+
export declare const stashcashClient: {
|
|
81
|
+
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): stashcashClient;
|
|
82
|
+
service: typeof stashcashService;
|
|
83
|
+
serviceName: string;
|
|
84
|
+
};
|
package/ts/stashcash.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
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 v3.20.3
|
|
6
|
+
// source: stashcash.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.stashcashClient = exports.stashcashService = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const grpc_js_1 = require("@grpc/grpc-js");
|
|
11
|
+
const creditsc_1 = require("./stashcash/creditsc");
|
|
12
|
+
const debitsc_1 = require("./stashcash/debitsc");
|
|
13
|
+
const getscbalance_1 = require("./stashcash/getscbalance");
|
|
14
|
+
const getschistory_1 = require("./stashcash/getschistory");
|
|
15
|
+
const reversesc_1 = require("./stashcash/reversesc");
|
|
16
|
+
exports.protobufPackage = "service";
|
|
17
|
+
exports.stashcashService = {
|
|
18
|
+
getscbalance: {
|
|
19
|
+
path: "/service.stashcash/getscbalance",
|
|
20
|
+
requestStream: false,
|
|
21
|
+
responseStream: false,
|
|
22
|
+
requestSerialize: (value) => Buffer.from(getscbalance_1.request.encode(value).finish()),
|
|
23
|
+
requestDeserialize: (value) => getscbalance_1.request.decode(value),
|
|
24
|
+
responseSerialize: (value) => Buffer.from(getscbalance_1.response.encode(value).finish()),
|
|
25
|
+
responseDeserialize: (value) => getscbalance_1.response.decode(value),
|
|
26
|
+
},
|
|
27
|
+
creditsc: {
|
|
28
|
+
path: "/service.stashcash/creditsc",
|
|
29
|
+
requestStream: false,
|
|
30
|
+
responseStream: false,
|
|
31
|
+
requestSerialize: (value) => Buffer.from(creditsc_1.request.encode(value).finish()),
|
|
32
|
+
requestDeserialize: (value) => creditsc_1.request.decode(value),
|
|
33
|
+
responseSerialize: (value) => Buffer.from(creditsc_1.response.encode(value).finish()),
|
|
34
|
+
responseDeserialize: (value) => creditsc_1.response.decode(value),
|
|
35
|
+
},
|
|
36
|
+
reversesc: {
|
|
37
|
+
path: "/service.stashcash/reversesc",
|
|
38
|
+
requestStream: false,
|
|
39
|
+
responseStream: false,
|
|
40
|
+
requestSerialize: (value) => Buffer.from(reversesc_1.request.encode(value).finish()),
|
|
41
|
+
requestDeserialize: (value) => reversesc_1.request.decode(value),
|
|
42
|
+
responseSerialize: (value) => Buffer.from(reversesc_1.response.encode(value).finish()),
|
|
43
|
+
responseDeserialize: (value) => reversesc_1.response.decode(value),
|
|
44
|
+
},
|
|
45
|
+
getschistory: {
|
|
46
|
+
path: "/service.stashcash/getschistory",
|
|
47
|
+
requestStream: false,
|
|
48
|
+
responseStream: false,
|
|
49
|
+
requestSerialize: (value) => Buffer.from(getschistory_1.request.encode(value).finish()),
|
|
50
|
+
requestDeserialize: (value) => getschistory_1.request.decode(value),
|
|
51
|
+
responseSerialize: (value) => Buffer.from(getschistory_1.response.encode(value).finish()),
|
|
52
|
+
responseDeserialize: (value) => getschistory_1.response.decode(value),
|
|
53
|
+
},
|
|
54
|
+
debitsc: {
|
|
55
|
+
path: "/service.stashcash/debitsc",
|
|
56
|
+
requestStream: false,
|
|
57
|
+
responseStream: false,
|
|
58
|
+
requestSerialize: (value) => Buffer.from(debitsc_1.request.encode(value).finish()),
|
|
59
|
+
requestDeserialize: (value) => debitsc_1.request.decode(value),
|
|
60
|
+
responseSerialize: (value) => Buffer.from(debitsc_1.response.encode(value).finish()),
|
|
61
|
+
responseDeserialize: (value) => debitsc_1.response.decode(value),
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
exports.stashcashClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.stashcashService, "service.stashcash");
|
package/README.md
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
## GRPC Package Manger
|
|
2
|
-
|
|
3
|
-
### Installation
|
|
4
|
-
|
|
5
|
-
Install the package with npm:
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
npm install @stashfin/grpc
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
### Creating a GRPC Service
|
|
12
|
-
|
|
13
|
-
To create a new gRPC service, follow these steps:
|
|
14
|
-
|
|
15
|
-
1. **Create a new service file**: In the `src/proto` directory, create a new `.proto` file with your service name. This file will define the service interface.
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
touch src/proto/your_service_name.proto
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
2. **Define your service**: In the newly created .proto file, define your service and its methods. For example:
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
syntax = "proto3";
|
|
25
|
-
|
|
26
|
-
import "your_service_name/your_method"
|
|
27
|
-
|
|
28
|
-
service YourService {
|
|
29
|
-
rpc YourMethod (YourRequest) returns (YourResponse);
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
3. **Create a new directory for your service**: In the src/proto directory, create a new directory with your service name. This directory will contain the request and response message definitions of each channel in separate file.
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
mkdir src/proto/your_service_name
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
4. **Define your request and response messages**: In the newly created directory, create .proto files for your channel/method with request and response messages. For example:
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
touch src/proto/your_service_name/your_method.proto
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
And in these files, define your messages:
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
// your_method.proto
|
|
49
|
-
syntax = "proto3";
|
|
50
|
-
|
|
51
|
-
message YourRequest {
|
|
52
|
-
string request_field = 1;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
message YourResponse {
|
|
56
|
-
string response_field = 1;
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Local Development
|
|
61
|
-
|
|
62
|
-
To publish this package locally for development purposes, run the following command in your terminal:
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
npm run build
|
|
66
|
-
cd dist
|
|
67
|
-
npm link
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
To use this locally published package in another service (like metaservice), navigate to the directory of that service and run the following command:
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
npm link @stashfin/grpc
|
|
74
|
-
```
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package customers.addaddress;
|
|
4
|
-
|
|
5
|
-
enum AddressType {
|
|
6
|
-
CURRENT = 0;
|
|
7
|
-
PERMANENT = 1;
|
|
8
|
-
OFFICE = 2;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
message addAddressRequest {
|
|
12
|
-
AddressType address_type = 1;
|
|
13
|
-
string house_flat_no = 2;
|
|
14
|
-
string address_line_1 = 3;
|
|
15
|
-
string address_line_2 = 4;
|
|
16
|
-
string landmark = 5;
|
|
17
|
-
int32 state_id = 7;
|
|
18
|
-
int32 city_id = 8;
|
|
19
|
-
string pin_code = 9;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
message addAddressResponse {
|
|
23
|
-
bool status = 1;
|
|
24
|
-
}
|
|
25
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package customers.createcustomerreference;
|
|
4
|
-
|
|
5
|
-
message createCustomerReferenceRequest {
|
|
6
|
-
string reference_name = 1;
|
|
7
|
-
string relationship = 2;
|
|
8
|
-
string mobile_number = 3;
|
|
9
|
-
string email = 4; //optional
|
|
10
|
-
string address = 5;
|
|
11
|
-
string pincode = 6;
|
|
12
|
-
int32 state_id = 7;
|
|
13
|
-
int32 city_id = 8;
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
message createCustomerReferenceResponse {
|
|
18
|
-
int32 reference_id = 1 ;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
syntax="proto3";
|
|
2
|
-
|
|
3
|
-
package customers.getbasicinfo;
|
|
4
|
-
|
|
5
|
-
message getBasicInfoRequest {}
|
|
6
|
-
|
|
7
|
-
message getBasicInfoResponse {
|
|
8
|
-
string mobile = 1;
|
|
9
|
-
string pan = 2;
|
|
10
|
-
string aadhaar = 3;
|
|
11
|
-
string personal_email = 4 ;
|
|
12
|
-
Address curr_address = 5 ;
|
|
13
|
-
Address permanent_address = 6 ;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
message Address {
|
|
17
|
-
string house_flat_no = 1;
|
|
18
|
-
string address_line_1 = 2;
|
|
19
|
-
string address_line_2 = 3;
|
|
20
|
-
string landmark = 4;
|
|
21
|
-
string city = 5;
|
|
22
|
-
string state = 6;
|
|
23
|
-
string pin_code = 7;
|
|
24
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
syntax="proto3";
|
|
2
|
-
|
|
3
|
-
package customers.getcustomerbyid;
|
|
4
|
-
|
|
5
|
-
message getCustomerByIdRequest {
|
|
6
|
-
int32 customer_id = 1;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
message getCustomerByIdResponse {
|
|
10
|
-
string mobile = 1;
|
|
11
|
-
string email = 2;
|
|
12
|
-
string first_name = 3;
|
|
13
|
-
string middle_name = 4;
|
|
14
|
-
string last_name = 5;
|
|
15
|
-
string father_name = 6;
|
|
16
|
-
string mother_maiden_name = 7;
|
|
17
|
-
string dob = 8;
|
|
18
|
-
string company_name = 9;
|
|
19
|
-
string pincode = 10;
|
|
20
|
-
string app_version = 11;
|
|
21
|
-
bool biometric_enabled = 12;
|
|
22
|
-
int32 journey_sequence = 13;
|
|
23
|
-
string category = 14;
|
|
24
|
-
float loc_limit = 15;
|
|
25
|
-
string status = 16;
|
|
26
|
-
int32 min_tenure = 17;
|
|
27
|
-
int32 max_tenure = 18;
|
|
28
|
-
float roi = 19;
|
|
29
|
-
float processing_rate = 20;
|
|
30
|
-
string emi_date = 21;
|
|
31
|
-
}
|