@stashfin/grpc 1.0.25 → 1.0.27
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 +1 -1
- package/ts/stashcash/creditsc.d.ts +0 -2
- package/ts/stashcash/creditsc.js +9 -37
- package/ts/stashcash/getscbalance.d.ts +1 -0
- package/ts/stashcash/getscbalance.js +15 -1
- package/ts/stashcash/getschistory.d.ts +0 -1
- package/ts/stashcash/getschistory.js +0 -15
- package/ts/stashcash.d.ts +12 -12
- package/ts/stashcash.js +8 -8
package/package.json
CHANGED
package/ts/stashcash/creditsc.js
CHANGED
|
@@ -14,7 +14,7 @@ const long_1 = __importDefault(require("long"));
|
|
|
14
14
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
15
15
|
exports.protobufPackage = "stashcash.creditsc";
|
|
16
16
|
function createBaserequest() {
|
|
17
|
-
return { customer_id: 0, campaign_id: 0,
|
|
17
|
+
return { customer_id: 0, campaign_id: 0, amount: 0, sc_type: "", expiry: "" };
|
|
18
18
|
}
|
|
19
19
|
exports.request = {
|
|
20
20
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -24,20 +24,14 @@ exports.request = {
|
|
|
24
24
|
if (message.campaign_id !== 0) {
|
|
25
25
|
writer.uint32(16).int64(message.campaign_id);
|
|
26
26
|
}
|
|
27
|
-
if (message.txn_id !== 0) {
|
|
28
|
-
writer.uint32(24).int64(message.txn_id);
|
|
29
|
-
}
|
|
30
27
|
if (message.amount !== 0) {
|
|
31
|
-
writer.uint32(
|
|
32
|
-
}
|
|
33
|
-
if (message.txn_type !== "") {
|
|
34
|
-
writer.uint32(50).string(message.txn_type);
|
|
28
|
+
writer.uint32(29).float(message.amount);
|
|
35
29
|
}
|
|
36
30
|
if (message.sc_type !== "") {
|
|
37
|
-
writer.uint32(
|
|
31
|
+
writer.uint32(34).string(message.sc_type);
|
|
38
32
|
}
|
|
39
33
|
if (message.expiry !== "") {
|
|
40
|
-
writer.uint32(
|
|
34
|
+
writer.uint32(42).string(message.expiry);
|
|
41
35
|
}
|
|
42
36
|
return writer;
|
|
43
37
|
},
|
|
@@ -61,31 +55,19 @@ exports.request = {
|
|
|
61
55
|
message.campaign_id = longToNumber(reader.int64());
|
|
62
56
|
continue;
|
|
63
57
|
case 3:
|
|
64
|
-
if (tag !==
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
message.txn_id = longToNumber(reader.int64());
|
|
68
|
-
continue;
|
|
69
|
-
case 5:
|
|
70
|
-
if (tag !== 45) {
|
|
58
|
+
if (tag !== 29) {
|
|
71
59
|
break;
|
|
72
60
|
}
|
|
73
61
|
message.amount = reader.float();
|
|
74
62
|
continue;
|
|
75
|
-
case
|
|
76
|
-
if (tag !==
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
message.txn_type = reader.string();
|
|
80
|
-
continue;
|
|
81
|
-
case 7:
|
|
82
|
-
if (tag !== 58) {
|
|
63
|
+
case 4:
|
|
64
|
+
if (tag !== 34) {
|
|
83
65
|
break;
|
|
84
66
|
}
|
|
85
67
|
message.sc_type = reader.string();
|
|
86
68
|
continue;
|
|
87
|
-
case
|
|
88
|
-
if (tag !==
|
|
69
|
+
case 5:
|
|
70
|
+
if (tag !== 42) {
|
|
89
71
|
break;
|
|
90
72
|
}
|
|
91
73
|
message.expiry = reader.string();
|
|
@@ -102,9 +84,7 @@ exports.request = {
|
|
|
102
84
|
return {
|
|
103
85
|
customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
|
|
104
86
|
campaign_id: isSet(object.campaign_id) ? globalThis.Number(object.campaign_id) : 0,
|
|
105
|
-
txn_id: isSet(object.txn_id) ? globalThis.Number(object.txn_id) : 0,
|
|
106
87
|
amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
|
|
107
|
-
txn_type: isSet(object.txn_type) ? globalThis.String(object.txn_type) : "",
|
|
108
88
|
sc_type: isSet(object.sc_type) ? globalThis.String(object.sc_type) : "",
|
|
109
89
|
expiry: isSet(object.expiry) ? globalThis.String(object.expiry) : "",
|
|
110
90
|
};
|
|
@@ -117,15 +97,9 @@ exports.request = {
|
|
|
117
97
|
if (message.campaign_id !== 0) {
|
|
118
98
|
obj.campaign_id = Math.round(message.campaign_id);
|
|
119
99
|
}
|
|
120
|
-
if (message.txn_id !== 0) {
|
|
121
|
-
obj.txn_id = Math.round(message.txn_id);
|
|
122
|
-
}
|
|
123
100
|
if (message.amount !== 0) {
|
|
124
101
|
obj.amount = message.amount;
|
|
125
102
|
}
|
|
126
|
-
if (message.txn_type !== "") {
|
|
127
|
-
obj.txn_type = message.txn_type;
|
|
128
|
-
}
|
|
129
103
|
if (message.sc_type !== "") {
|
|
130
104
|
obj.sc_type = message.sc_type;
|
|
131
105
|
}
|
|
@@ -141,9 +115,7 @@ exports.request = {
|
|
|
141
115
|
const message = createBaserequest();
|
|
142
116
|
message.customer_id = object.customer_id ?? 0;
|
|
143
117
|
message.campaign_id = object.campaign_id ?? 0;
|
|
144
|
-
message.txn_id = object.txn_id ?? 0;
|
|
145
118
|
message.amount = object.amount ?? 0;
|
|
146
|
-
message.txn_type = object.txn_type ?? "";
|
|
147
119
|
message.sc_type = object.sc_type ?? "";
|
|
148
120
|
message.expiry = object.expiry ?? "";
|
|
149
121
|
return message;
|
|
@@ -132,7 +132,7 @@ exports.response = {
|
|
|
132
132
|
},
|
|
133
133
|
};
|
|
134
134
|
function createBaseresponse_Data() {
|
|
135
|
-
return { locked: 0, unlocked: 0, balance: 0, rupee_balance: 0 };
|
|
135
|
+
return { locked: 0, unlocked: 0, balance: 0, rupee_balance: 0, user_guide: false };
|
|
136
136
|
}
|
|
137
137
|
exports.response_Data = {
|
|
138
138
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -148,6 +148,9 @@ exports.response_Data = {
|
|
|
148
148
|
if (message.rupee_balance !== 0) {
|
|
149
149
|
writer.uint32(37).float(message.rupee_balance);
|
|
150
150
|
}
|
|
151
|
+
if (message.user_guide !== false) {
|
|
152
|
+
writer.uint32(40).bool(message.user_guide);
|
|
153
|
+
}
|
|
151
154
|
return writer;
|
|
152
155
|
},
|
|
153
156
|
decode(input, length) {
|
|
@@ -181,6 +184,12 @@ exports.response_Data = {
|
|
|
181
184
|
}
|
|
182
185
|
message.rupee_balance = reader.float();
|
|
183
186
|
continue;
|
|
187
|
+
case 5:
|
|
188
|
+
if (tag !== 40) {
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
message.user_guide = reader.bool();
|
|
192
|
+
continue;
|
|
184
193
|
}
|
|
185
194
|
if ((tag & 7) === 4 || tag === 0) {
|
|
186
195
|
break;
|
|
@@ -195,6 +204,7 @@ exports.response_Data = {
|
|
|
195
204
|
unlocked: isSet(object.unlocked) ? globalThis.Number(object.unlocked) : 0,
|
|
196
205
|
balance: isSet(object.balance) ? globalThis.Number(object.balance) : 0,
|
|
197
206
|
rupee_balance: isSet(object.rupee_balance) ? globalThis.Number(object.rupee_balance) : 0,
|
|
207
|
+
user_guide: isSet(object.user_guide) ? globalThis.Boolean(object.user_guide) : false,
|
|
198
208
|
};
|
|
199
209
|
},
|
|
200
210
|
toJSON(message) {
|
|
@@ -211,6 +221,9 @@ exports.response_Data = {
|
|
|
211
221
|
if (message.rupee_balance !== 0) {
|
|
212
222
|
obj.rupee_balance = message.rupee_balance;
|
|
213
223
|
}
|
|
224
|
+
if (message.user_guide !== false) {
|
|
225
|
+
obj.user_guide = message.user_guide;
|
|
226
|
+
}
|
|
214
227
|
return obj;
|
|
215
228
|
},
|
|
216
229
|
create(base) {
|
|
@@ -222,6 +235,7 @@ exports.response_Data = {
|
|
|
222
235
|
message.unlocked = object.unlocked ?? 0;
|
|
223
236
|
message.balance = object.balance ?? 0;
|
|
224
237
|
message.rupee_balance = object.rupee_balance ?? 0;
|
|
238
|
+
message.user_guide = object.user_guide ?? false;
|
|
225
239
|
return message;
|
|
226
240
|
},
|
|
227
241
|
};
|
|
@@ -196,7 +196,6 @@ function createBaseSCtransaction() {
|
|
|
196
196
|
status: "",
|
|
197
197
|
expiry: "",
|
|
198
198
|
created_at: "",
|
|
199
|
-
updated_at: "",
|
|
200
199
|
is_active: "",
|
|
201
200
|
is_deleted: "",
|
|
202
201
|
};
|
|
@@ -236,9 +235,6 @@ exports.SCtransaction = {
|
|
|
236
235
|
if (message.created_at !== "") {
|
|
237
236
|
writer.uint32(90).string(message.created_at);
|
|
238
237
|
}
|
|
239
|
-
if (message.updated_at !== "") {
|
|
240
|
-
writer.uint32(98).string(message.updated_at);
|
|
241
|
-
}
|
|
242
238
|
if (message.is_active !== "") {
|
|
243
239
|
writer.uint32(106).string(message.is_active);
|
|
244
240
|
}
|
|
@@ -320,12 +316,6 @@ exports.SCtransaction = {
|
|
|
320
316
|
}
|
|
321
317
|
message.created_at = reader.string();
|
|
322
318
|
continue;
|
|
323
|
-
case 12:
|
|
324
|
-
if (tag !== 98) {
|
|
325
|
-
break;
|
|
326
|
-
}
|
|
327
|
-
message.updated_at = reader.string();
|
|
328
|
-
continue;
|
|
329
319
|
case 13:
|
|
330
320
|
if (tag !== 106) {
|
|
331
321
|
break;
|
|
@@ -359,7 +349,6 @@ exports.SCtransaction = {
|
|
|
359
349
|
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
360
350
|
expiry: isSet(object.expiry) ? globalThis.String(object.expiry) : "",
|
|
361
351
|
created_at: isSet(object.created_at) ? globalThis.String(object.created_at) : "",
|
|
362
|
-
updated_at: isSet(object.updated_at) ? globalThis.String(object.updated_at) : "",
|
|
363
352
|
is_active: isSet(object.is_active) ? globalThis.String(object.is_active) : "",
|
|
364
353
|
is_deleted: isSet(object.is_deleted) ? globalThis.String(object.is_deleted) : "",
|
|
365
354
|
};
|
|
@@ -399,9 +388,6 @@ exports.SCtransaction = {
|
|
|
399
388
|
if (message.created_at !== "") {
|
|
400
389
|
obj.created_at = message.created_at;
|
|
401
390
|
}
|
|
402
|
-
if (message.updated_at !== "") {
|
|
403
|
-
obj.updated_at = message.updated_at;
|
|
404
|
-
}
|
|
405
391
|
if (message.is_active !== "") {
|
|
406
392
|
obj.is_active = message.is_active;
|
|
407
393
|
}
|
|
@@ -426,7 +412,6 @@ exports.SCtransaction = {
|
|
|
426
412
|
message.status = object.status ?? "";
|
|
427
413
|
message.expiry = object.expiry ?? "";
|
|
428
414
|
message.created_at = object.created_at ?? "";
|
|
429
|
-
message.updated_at = object.updated_at ?? "";
|
|
430
415
|
message.is_active = object.is_active ?? "";
|
|
431
416
|
message.is_deleted = object.is_deleted ?? "";
|
|
432
417
|
return message;
|
package/ts/stashcash.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { request as request1, response as response2 } from "./stashcash/creditsc
|
|
|
3
3
|
import { request, response } from "./stashcash/getscbalance";
|
|
4
4
|
import { request as request5, response as response6 } from "./stashcash/getschistory";
|
|
5
5
|
import { request as request3, response as response4 } from "./stashcash/reversesc";
|
|
6
|
-
export declare const protobufPackage = "
|
|
7
|
-
export type
|
|
8
|
-
export declare const
|
|
6
|
+
export declare const protobufPackage = "service";
|
|
7
|
+
export type stashcashService = typeof stashcashService;
|
|
8
|
+
export declare const stashcashService: {
|
|
9
9
|
readonly getscbalance: {
|
|
10
|
-
readonly path: "/stashcash
|
|
10
|
+
readonly path: "/service.stashcash/getscbalance";
|
|
11
11
|
readonly requestStream: false;
|
|
12
12
|
readonly responseStream: false;
|
|
13
13
|
readonly requestSerialize: (value: request) => Buffer;
|
|
@@ -16,7 +16,7 @@ export declare const StashCashService: {
|
|
|
16
16
|
readonly responseDeserialize: (value: Buffer) => response;
|
|
17
17
|
};
|
|
18
18
|
readonly creditsc: {
|
|
19
|
-
readonly path: "/stashcash
|
|
19
|
+
readonly path: "/service.stashcash/creditsc";
|
|
20
20
|
readonly requestStream: false;
|
|
21
21
|
readonly responseStream: false;
|
|
22
22
|
readonly requestSerialize: (value: request1) => Buffer;
|
|
@@ -25,7 +25,7 @@ export declare const StashCashService: {
|
|
|
25
25
|
readonly responseDeserialize: (value: Buffer) => response2;
|
|
26
26
|
};
|
|
27
27
|
readonly reversesc: {
|
|
28
|
-
readonly path: "/stashcash
|
|
28
|
+
readonly path: "/service.stashcash/reversesc";
|
|
29
29
|
readonly requestStream: false;
|
|
30
30
|
readonly responseStream: false;
|
|
31
31
|
readonly requestSerialize: (value: request3) => Buffer;
|
|
@@ -34,7 +34,7 @@ export declare const StashCashService: {
|
|
|
34
34
|
readonly responseDeserialize: (value: Buffer) => response4;
|
|
35
35
|
};
|
|
36
36
|
readonly getschistory: {
|
|
37
|
-
readonly path: "/stashcash
|
|
37
|
+
readonly path: "/service.stashcash/getschistory";
|
|
38
38
|
readonly requestStream: false;
|
|
39
39
|
readonly responseStream: false;
|
|
40
40
|
readonly requestSerialize: (value: request5) => Buffer;
|
|
@@ -43,13 +43,13 @@ export declare const StashCashService: {
|
|
|
43
43
|
readonly responseDeserialize: (value: Buffer) => response6;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
export interface
|
|
46
|
+
export interface stashcashServer extends UntypedServiceImplementation {
|
|
47
47
|
getscbalance: handleUnaryCall<request, response>;
|
|
48
48
|
creditsc: handleUnaryCall<request1, response2>;
|
|
49
49
|
reversesc: handleUnaryCall<request3, response4>;
|
|
50
50
|
getschistory: handleUnaryCall<request5, response6>;
|
|
51
51
|
}
|
|
52
|
-
export interface
|
|
52
|
+
export interface stashcashClient extends Client {
|
|
53
53
|
getscbalance(request: request, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
54
54
|
getscbalance(request: request, metadata: Metadata, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
55
55
|
getscbalance(request: request, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
@@ -63,8 +63,8 @@ export interface StashCashClient extends Client {
|
|
|
63
63
|
getschistory(request: request5, metadata: Metadata, callback: (error: ServiceError | null, response: response6) => void): ClientUnaryCall;
|
|
64
64
|
getschistory(request: request5, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response6) => void): ClientUnaryCall;
|
|
65
65
|
}
|
|
66
|
-
export declare const
|
|
67
|
-
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>):
|
|
68
|
-
service: typeof
|
|
66
|
+
export declare const stashcashClient: {
|
|
67
|
+
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): stashcashClient;
|
|
68
|
+
service: typeof stashcashService;
|
|
69
69
|
serviceName: string;
|
|
70
70
|
};
|
package/ts/stashcash.js
CHANGED
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
// protoc v3.20.3
|
|
6
6
|
// source: stashcash.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
8
|
+
exports.stashcashClient = exports.stashcashService = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
11
11
|
const creditsc_1 = require("./stashcash/creditsc");
|
|
12
12
|
const getscbalance_1 = require("./stashcash/getscbalance");
|
|
13
13
|
const getschistory_1 = require("./stashcash/getschistory");
|
|
14
14
|
const reversesc_1 = require("./stashcash/reversesc");
|
|
15
|
-
exports.protobufPackage = "
|
|
16
|
-
exports.
|
|
15
|
+
exports.protobufPackage = "service";
|
|
16
|
+
exports.stashcashService = {
|
|
17
17
|
getscbalance: {
|
|
18
|
-
path: "/stashcash
|
|
18
|
+
path: "/service.stashcash/getscbalance",
|
|
19
19
|
requestStream: false,
|
|
20
20
|
responseStream: false,
|
|
21
21
|
requestSerialize: (value) => Buffer.from(getscbalance_1.request.encode(value).finish()),
|
|
@@ -24,7 +24,7 @@ exports.StashCashService = {
|
|
|
24
24
|
responseDeserialize: (value) => getscbalance_1.response.decode(value),
|
|
25
25
|
},
|
|
26
26
|
creditsc: {
|
|
27
|
-
path: "/stashcash
|
|
27
|
+
path: "/service.stashcash/creditsc",
|
|
28
28
|
requestStream: false,
|
|
29
29
|
responseStream: false,
|
|
30
30
|
requestSerialize: (value) => Buffer.from(creditsc_1.request.encode(value).finish()),
|
|
@@ -33,7 +33,7 @@ exports.StashCashService = {
|
|
|
33
33
|
responseDeserialize: (value) => creditsc_1.response.decode(value),
|
|
34
34
|
},
|
|
35
35
|
reversesc: {
|
|
36
|
-
path: "/stashcash
|
|
36
|
+
path: "/service.stashcash/reversesc",
|
|
37
37
|
requestStream: false,
|
|
38
38
|
responseStream: false,
|
|
39
39
|
requestSerialize: (value) => Buffer.from(reversesc_1.request.encode(value).finish()),
|
|
@@ -42,7 +42,7 @@ exports.StashCashService = {
|
|
|
42
42
|
responseDeserialize: (value) => reversesc_1.response.decode(value),
|
|
43
43
|
},
|
|
44
44
|
getschistory: {
|
|
45
|
-
path: "/stashcash
|
|
45
|
+
path: "/service.stashcash/getschistory",
|
|
46
46
|
requestStream: false,
|
|
47
47
|
responseStream: false,
|
|
48
48
|
requestSerialize: (value) => Buffer.from(getschistory_1.request.encode(value).finish()),
|
|
@@ -51,4 +51,4 @@ exports.StashCashService = {
|
|
|
51
51
|
responseDeserialize: (value) => getschistory_1.response.decode(value),
|
|
52
52
|
},
|
|
53
53
|
};
|
|
54
|
-
exports.
|
|
54
|
+
exports.stashcashClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.stashcashService, "service.stashcash");
|