@stashfin/grpc 1.2.72 → 1.2.77
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/customers/aa/initiate.d.ts +43 -0
- package/ts/customers/aa/initiate.js +253 -0
- package/ts/customers.d.ts +14 -0
- package/ts/customers.js +10 -0
package/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "customers.aa.initiate";
|
|
3
|
+
export interface initiateRequest {
|
|
4
|
+
loan_id: number;
|
|
5
|
+
phone_number: string;
|
|
6
|
+
template_type: string;
|
|
7
|
+
tracking_id: string;
|
|
8
|
+
fipIds: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface initiateResponse {
|
|
11
|
+
journey_type: string;
|
|
12
|
+
mon_reference_id: string;
|
|
13
|
+
und_reference_id: string;
|
|
14
|
+
mon_redirection_url: string;
|
|
15
|
+
und_redirection_url: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const initiateRequest: {
|
|
18
|
+
encode(message: initiateRequest, writer?: _m0.Writer): _m0.Writer;
|
|
19
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): initiateRequest;
|
|
20
|
+
fromJSON(object: any): initiateRequest;
|
|
21
|
+
toJSON(message: initiateRequest): unknown;
|
|
22
|
+
create<I extends Exact<DeepPartial<initiateRequest>, I>>(base?: I): initiateRequest;
|
|
23
|
+
fromPartial<I extends Exact<DeepPartial<initiateRequest>, I>>(object: I): initiateRequest;
|
|
24
|
+
};
|
|
25
|
+
export declare const initiateResponse: {
|
|
26
|
+
encode(message: initiateResponse, writer?: _m0.Writer): _m0.Writer;
|
|
27
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): initiateResponse;
|
|
28
|
+
fromJSON(object: any): initiateResponse;
|
|
29
|
+
toJSON(message: initiateResponse): unknown;
|
|
30
|
+
create<I extends Exact<DeepPartial<initiateResponse>, I>>(base?: I): initiateResponse;
|
|
31
|
+
fromPartial<I extends Exact<DeepPartial<initiateResponse>, I>>(object: I): initiateResponse;
|
|
32
|
+
};
|
|
33
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
34
|
+
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 {} ? {
|
|
35
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
36
|
+
} : Partial<T>;
|
|
37
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
38
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
39
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
40
|
+
} & {
|
|
41
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,253 @@
|
|
|
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: customers/aa/initiate.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.initiateResponse = exports.initiateRequest = 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 = "customers.aa.initiate";
|
|
16
|
+
function createBaseinitiateRequest() {
|
|
17
|
+
return { loan_id: 0, phone_number: "", template_type: "", tracking_id: "", fipIds: [] };
|
|
18
|
+
}
|
|
19
|
+
exports.initiateRequest = {
|
|
20
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
21
|
+
if (message.loan_id !== 0) {
|
|
22
|
+
writer.uint32(8).int64(message.loan_id);
|
|
23
|
+
}
|
|
24
|
+
if (message.phone_number !== "") {
|
|
25
|
+
writer.uint32(18).string(message.phone_number);
|
|
26
|
+
}
|
|
27
|
+
if (message.template_type !== "") {
|
|
28
|
+
writer.uint32(26).string(message.template_type);
|
|
29
|
+
}
|
|
30
|
+
if (message.tracking_id !== "") {
|
|
31
|
+
writer.uint32(34).string(message.tracking_id);
|
|
32
|
+
}
|
|
33
|
+
for (const v of message.fipIds) {
|
|
34
|
+
writer.uint32(42).string(v);
|
|
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 = createBaseinitiateRequest();
|
|
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.loan_id = longToNumber(reader.int64());
|
|
50
|
+
continue;
|
|
51
|
+
case 2:
|
|
52
|
+
if (tag !== 18) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
message.phone_number = reader.string();
|
|
56
|
+
continue;
|
|
57
|
+
case 3:
|
|
58
|
+
if (tag !== 26) {
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
message.template_type = reader.string();
|
|
62
|
+
continue;
|
|
63
|
+
case 4:
|
|
64
|
+
if (tag !== 34) {
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
message.tracking_id = reader.string();
|
|
68
|
+
continue;
|
|
69
|
+
case 5:
|
|
70
|
+
if (tag !== 42) {
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
message.fipIds.push(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
|
+
loan_id: isSet(object.loan_id) ? globalThis.Number(object.loan_id) : 0,
|
|
86
|
+
phone_number: isSet(object.phone_number) ? globalThis.String(object.phone_number) : "",
|
|
87
|
+
template_type: isSet(object.template_type) ? globalThis.String(object.template_type) : "",
|
|
88
|
+
tracking_id: isSet(object.tracking_id) ? globalThis.String(object.tracking_id) : "",
|
|
89
|
+
fipIds: globalThis.Array.isArray(object?.fipIds) ? object.fipIds.map((e) => globalThis.String(e)) : [],
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
toJSON(message) {
|
|
93
|
+
const obj = {};
|
|
94
|
+
if (message.loan_id !== 0) {
|
|
95
|
+
obj.loan_id = Math.round(message.loan_id);
|
|
96
|
+
}
|
|
97
|
+
if (message.phone_number !== "") {
|
|
98
|
+
obj.phone_number = message.phone_number;
|
|
99
|
+
}
|
|
100
|
+
if (message.template_type !== "") {
|
|
101
|
+
obj.template_type = message.template_type;
|
|
102
|
+
}
|
|
103
|
+
if (message.tracking_id !== "") {
|
|
104
|
+
obj.tracking_id = message.tracking_id;
|
|
105
|
+
}
|
|
106
|
+
if (message.fipIds?.length) {
|
|
107
|
+
obj.fipIds = message.fipIds;
|
|
108
|
+
}
|
|
109
|
+
return obj;
|
|
110
|
+
},
|
|
111
|
+
create(base) {
|
|
112
|
+
return exports.initiateRequest.fromPartial(base ?? {});
|
|
113
|
+
},
|
|
114
|
+
fromPartial(object) {
|
|
115
|
+
const message = createBaseinitiateRequest();
|
|
116
|
+
message.loan_id = object.loan_id ?? 0;
|
|
117
|
+
message.phone_number = object.phone_number ?? "";
|
|
118
|
+
message.template_type = object.template_type ?? "";
|
|
119
|
+
message.tracking_id = object.tracking_id ?? "";
|
|
120
|
+
message.fipIds = object.fipIds?.map((e) => e) || [];
|
|
121
|
+
return message;
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
function createBaseinitiateResponse() {
|
|
125
|
+
return {
|
|
126
|
+
journey_type: "",
|
|
127
|
+
mon_reference_id: "",
|
|
128
|
+
und_reference_id: "",
|
|
129
|
+
mon_redirection_url: "",
|
|
130
|
+
und_redirection_url: "",
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
exports.initiateResponse = {
|
|
134
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
135
|
+
if (message.journey_type !== "") {
|
|
136
|
+
writer.uint32(10).string(message.journey_type);
|
|
137
|
+
}
|
|
138
|
+
if (message.mon_reference_id !== "") {
|
|
139
|
+
writer.uint32(18).string(message.mon_reference_id);
|
|
140
|
+
}
|
|
141
|
+
if (message.und_reference_id !== "") {
|
|
142
|
+
writer.uint32(26).string(message.und_reference_id);
|
|
143
|
+
}
|
|
144
|
+
if (message.mon_redirection_url !== "") {
|
|
145
|
+
writer.uint32(34).string(message.mon_redirection_url);
|
|
146
|
+
}
|
|
147
|
+
if (message.und_redirection_url !== "") {
|
|
148
|
+
writer.uint32(42).string(message.und_redirection_url);
|
|
149
|
+
}
|
|
150
|
+
return writer;
|
|
151
|
+
},
|
|
152
|
+
decode(input, length) {
|
|
153
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
154
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
155
|
+
const message = createBaseinitiateResponse();
|
|
156
|
+
while (reader.pos < end) {
|
|
157
|
+
const tag = reader.uint32();
|
|
158
|
+
switch (tag >>> 3) {
|
|
159
|
+
case 1:
|
|
160
|
+
if (tag !== 10) {
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
message.journey_type = reader.string();
|
|
164
|
+
continue;
|
|
165
|
+
case 2:
|
|
166
|
+
if (tag !== 18) {
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
message.mon_reference_id = reader.string();
|
|
170
|
+
continue;
|
|
171
|
+
case 3:
|
|
172
|
+
if (tag !== 26) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
message.und_reference_id = reader.string();
|
|
176
|
+
continue;
|
|
177
|
+
case 4:
|
|
178
|
+
if (tag !== 34) {
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
message.mon_redirection_url = reader.string();
|
|
182
|
+
continue;
|
|
183
|
+
case 5:
|
|
184
|
+
if (tag !== 42) {
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
message.und_redirection_url = reader.string();
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
reader.skipType(tag & 7);
|
|
194
|
+
}
|
|
195
|
+
return message;
|
|
196
|
+
},
|
|
197
|
+
fromJSON(object) {
|
|
198
|
+
return {
|
|
199
|
+
journey_type: isSet(object.journey_type) ? globalThis.String(object.journey_type) : "",
|
|
200
|
+
mon_reference_id: isSet(object.mon_reference_id) ? globalThis.String(object.mon_reference_id) : "",
|
|
201
|
+
und_reference_id: isSet(object.und_reference_id) ? globalThis.String(object.und_reference_id) : "",
|
|
202
|
+
mon_redirection_url: isSet(object.mon_redirection_url) ? globalThis.String(object.mon_redirection_url) : "",
|
|
203
|
+
und_redirection_url: isSet(object.und_redirection_url) ? globalThis.String(object.und_redirection_url) : "",
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
toJSON(message) {
|
|
207
|
+
const obj = {};
|
|
208
|
+
if (message.journey_type !== "") {
|
|
209
|
+
obj.journey_type = message.journey_type;
|
|
210
|
+
}
|
|
211
|
+
if (message.mon_reference_id !== "") {
|
|
212
|
+
obj.mon_reference_id = message.mon_reference_id;
|
|
213
|
+
}
|
|
214
|
+
if (message.und_reference_id !== "") {
|
|
215
|
+
obj.und_reference_id = message.und_reference_id;
|
|
216
|
+
}
|
|
217
|
+
if (message.mon_redirection_url !== "") {
|
|
218
|
+
obj.mon_redirection_url = message.mon_redirection_url;
|
|
219
|
+
}
|
|
220
|
+
if (message.und_redirection_url !== "") {
|
|
221
|
+
obj.und_redirection_url = message.und_redirection_url;
|
|
222
|
+
}
|
|
223
|
+
return obj;
|
|
224
|
+
},
|
|
225
|
+
create(base) {
|
|
226
|
+
return exports.initiateResponse.fromPartial(base ?? {});
|
|
227
|
+
},
|
|
228
|
+
fromPartial(object) {
|
|
229
|
+
const message = createBaseinitiateResponse();
|
|
230
|
+
message.journey_type = object.journey_type ?? "";
|
|
231
|
+
message.mon_reference_id = object.mon_reference_id ?? "";
|
|
232
|
+
message.und_reference_id = object.und_reference_id ?? "";
|
|
233
|
+
message.mon_redirection_url = object.mon_redirection_url ?? "";
|
|
234
|
+
message.und_redirection_url = object.und_redirection_url ?? "";
|
|
235
|
+
return message;
|
|
236
|
+
},
|
|
237
|
+
};
|
|
238
|
+
function longToNumber(long) {
|
|
239
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
240
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
241
|
+
}
|
|
242
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
243
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
244
|
+
}
|
|
245
|
+
return long.toNumber();
|
|
246
|
+
}
|
|
247
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
248
|
+
minimal_1.default.util.Long = long_1.default;
|
|
249
|
+
minimal_1.default.configure();
|
|
250
|
+
}
|
|
251
|
+
function isSet(value) {
|
|
252
|
+
return value !== null && value !== undefined;
|
|
253
|
+
}
|
package/ts/customers.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
2
2
|
import { getBankListRequest, getBankListResponse } from "./customers/aa/getbanklist";
|
|
3
|
+
import { initiateRequest, initiateResponse } from "./customers/aa/initiate";
|
|
3
4
|
import { addAddressRequest, addAddressResponse } from "./customers/addaddress";
|
|
4
5
|
import { addBankAccountDetailsRequest, addBankAccountDetailsResponse } from "./customers/addbankaccountdetails";
|
|
5
6
|
import { addSuspendedCustomerRequest, addSuspendedCustomerResponse } from "./customers/addsuspendedcustomer";
|
|
@@ -456,6 +457,15 @@ export declare const customersService: {
|
|
|
456
457
|
readonly responseSerialize: (value: locDisabledResponse) => Buffer;
|
|
457
458
|
readonly responseDeserialize: (value: Buffer) => locDisabledResponse;
|
|
458
459
|
};
|
|
460
|
+
readonly initiateRequest: {
|
|
461
|
+
readonly path: "/service.customers/initiateRequest";
|
|
462
|
+
readonly requestStream: false;
|
|
463
|
+
readonly responseStream: false;
|
|
464
|
+
readonly requestSerialize: (value: initiateRequest) => Buffer;
|
|
465
|
+
readonly requestDeserialize: (value: Buffer) => initiateRequest;
|
|
466
|
+
readonly responseSerialize: (value: initiateResponse) => Buffer;
|
|
467
|
+
readonly responseDeserialize: (value: Buffer) => initiateResponse;
|
|
468
|
+
};
|
|
459
469
|
};
|
|
460
470
|
export interface customersServer extends UntypedServiceImplementation {
|
|
461
471
|
sendOtp: handleUnaryCall<sendOtpRequest, sendOtpRespone>;
|
|
@@ -504,6 +514,7 @@ export interface customersServer extends UntypedServiceImplementation {
|
|
|
504
514
|
getBankList: handleUnaryCall<getBankListRequest, getBankListResponse>;
|
|
505
515
|
addSuspendedCustomer: handleUnaryCall<addSuspendedCustomerRequest, addSuspendedCustomerResponse>;
|
|
506
516
|
updatelocdisabled: handleUnaryCall<locDisabledRequest, locDisabledResponse>;
|
|
517
|
+
initiateRequest: handleUnaryCall<initiateRequest, initiateResponse>;
|
|
507
518
|
}
|
|
508
519
|
export interface customersClient extends Client {
|
|
509
520
|
sendOtp(request: sendOtpRequest, callback: (error: ServiceError | null, response: sendOtpRespone) => void): ClientUnaryCall;
|
|
@@ -644,6 +655,9 @@ export interface customersClient extends Client {
|
|
|
644
655
|
updatelocdisabled(request: locDisabledRequest, callback: (error: ServiceError | null, response: locDisabledResponse) => void): ClientUnaryCall;
|
|
645
656
|
updatelocdisabled(request: locDisabledRequest, metadata: Metadata, callback: (error: ServiceError | null, response: locDisabledResponse) => void): ClientUnaryCall;
|
|
646
657
|
updatelocdisabled(request: locDisabledRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: locDisabledResponse) => void): ClientUnaryCall;
|
|
658
|
+
initiateRequest(request: initiateRequest, callback: (error: ServiceError | null, response: initiateResponse) => void): ClientUnaryCall;
|
|
659
|
+
initiateRequest(request: initiateRequest, metadata: Metadata, callback: (error: ServiceError | null, response: initiateResponse) => void): ClientUnaryCall;
|
|
660
|
+
initiateRequest(request: initiateRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: initiateResponse) => void): ClientUnaryCall;
|
|
647
661
|
}
|
|
648
662
|
export declare const customersClient: {
|
|
649
663
|
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): customersClient;
|
package/ts/customers.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.customersClient = exports.customersService = exports.protobufPackage = v
|
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
11
11
|
const getbanklist_1 = require("./customers/aa/getbanklist");
|
|
12
|
+
const initiate_1 = require("./customers/aa/initiate");
|
|
12
13
|
const addaddress_1 = require("./customers/addaddress");
|
|
13
14
|
const addbankaccountdetails_1 = require("./customers/addbankaccountdetails");
|
|
14
15
|
const addsuspendedcustomer_1 = require("./customers/addsuspendedcustomer");
|
|
@@ -464,5 +465,14 @@ exports.customersService = {
|
|
|
464
465
|
responseSerialize: (value) => Buffer.from(updatelocdisabled_1.locDisabledResponse.encode(value).finish()),
|
|
465
466
|
responseDeserialize: (value) => updatelocdisabled_1.locDisabledResponse.decode(value),
|
|
466
467
|
},
|
|
468
|
+
initiateRequest: {
|
|
469
|
+
path: "/service.customers/initiateRequest",
|
|
470
|
+
requestStream: false,
|
|
471
|
+
responseStream: false,
|
|
472
|
+
requestSerialize: (value) => Buffer.from(initiate_1.initiateRequest.encode(value).finish()),
|
|
473
|
+
requestDeserialize: (value) => initiate_1.initiateRequest.decode(value),
|
|
474
|
+
responseSerialize: (value) => Buffer.from(initiate_1.initiateResponse.encode(value).finish()),
|
|
475
|
+
responseDeserialize: (value) => initiate_1.initiateResponse.decode(value),
|
|
476
|
+
},
|
|
467
477
|
};
|
|
468
478
|
exports.customersClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.customersService, "service.customers");
|