@stashfin/grpc 1.2.616 → 1.2.618
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/banking/aa/getcustomerbank.d.ts +14 -0
- package/ts/banking/aa/getcustomerbank.js +99 -5
- package/ts/kyc/fetchaadhaarbypan.d.ts +66 -0
- package/ts/kyc/fetchaadhaarbypan.js +365 -0
- package/ts/kyc.d.ts +14 -0
- package/ts/kyc.js +10 -0
package/package.json
CHANGED
|
@@ -4,9 +4,15 @@ export interface getCustomerBankRequest {
|
|
|
4
4
|
customer_id: number;
|
|
5
5
|
}
|
|
6
6
|
export interface getCustomerBankResponse {
|
|
7
|
+
status: string;
|
|
8
|
+
data: BankData[];
|
|
9
|
+
}
|
|
10
|
+
export interface BankData {
|
|
7
11
|
account_number: string;
|
|
8
12
|
ifsc_code: string;
|
|
9
13
|
customer_name: string;
|
|
14
|
+
is_primary: boolean;
|
|
15
|
+
bank_logo_url: string;
|
|
10
16
|
}
|
|
11
17
|
export declare const getCustomerBankRequest: {
|
|
12
18
|
encode(message: getCustomerBankRequest, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -24,6 +30,14 @@ export declare const getCustomerBankResponse: {
|
|
|
24
30
|
create<I extends Exact<DeepPartial<getCustomerBankResponse>, I>>(base?: I): getCustomerBankResponse;
|
|
25
31
|
fromPartial<I extends Exact<DeepPartial<getCustomerBankResponse>, I>>(object: I): getCustomerBankResponse;
|
|
26
32
|
};
|
|
33
|
+
export declare const BankData: {
|
|
34
|
+
encode(message: BankData, writer?: _m0.Writer): _m0.Writer;
|
|
35
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BankData;
|
|
36
|
+
fromJSON(object: any): BankData;
|
|
37
|
+
toJSON(message: BankData): unknown;
|
|
38
|
+
create<I extends Exact<DeepPartial<BankData>, I>>(base?: I): BankData;
|
|
39
|
+
fromPartial<I extends Exact<DeepPartial<BankData>, I>>(object: I): BankData;
|
|
40
|
+
};
|
|
27
41
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
28
42
|
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 {} ? {
|
|
29
43
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -8,7 +8,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.getCustomerBankResponse = exports.getCustomerBankRequest = exports.protobufPackage = void 0;
|
|
11
|
+
exports.BankData = exports.getCustomerBankResponse = exports.getCustomerBankRequest = exports.protobufPackage = void 0;
|
|
12
12
|
/* eslint-disable */
|
|
13
13
|
const long_1 = __importDefault(require("long"));
|
|
14
14
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
@@ -64,9 +64,75 @@ exports.getCustomerBankRequest = {
|
|
|
64
64
|
},
|
|
65
65
|
};
|
|
66
66
|
function createBasegetCustomerBankResponse() {
|
|
67
|
-
return {
|
|
67
|
+
return { status: "", data: [] };
|
|
68
68
|
}
|
|
69
69
|
exports.getCustomerBankResponse = {
|
|
70
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
71
|
+
if (message.status !== "") {
|
|
72
|
+
writer.uint32(10).string(message.status);
|
|
73
|
+
}
|
|
74
|
+
for (const v of message.data) {
|
|
75
|
+
exports.BankData.encode(v, writer.uint32(18).fork()).ldelim();
|
|
76
|
+
}
|
|
77
|
+
return writer;
|
|
78
|
+
},
|
|
79
|
+
decode(input, length) {
|
|
80
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
81
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
82
|
+
const message = createBasegetCustomerBankResponse();
|
|
83
|
+
while (reader.pos < end) {
|
|
84
|
+
const tag = reader.uint32();
|
|
85
|
+
switch (tag >>> 3) {
|
|
86
|
+
case 1:
|
|
87
|
+
if (tag !== 10) {
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
message.status = reader.string();
|
|
91
|
+
continue;
|
|
92
|
+
case 2:
|
|
93
|
+
if (tag !== 18) {
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
message.data.push(exports.BankData.decode(reader, reader.uint32()));
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
reader.skipType(tag & 7);
|
|
103
|
+
}
|
|
104
|
+
return message;
|
|
105
|
+
},
|
|
106
|
+
fromJSON(object) {
|
|
107
|
+
return {
|
|
108
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
109
|
+
data: globalThis.Array.isArray(object?.data) ? object.data.map((e) => exports.BankData.fromJSON(e)) : [],
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
toJSON(message) {
|
|
113
|
+
const obj = {};
|
|
114
|
+
if (message.status !== "") {
|
|
115
|
+
obj.status = message.status;
|
|
116
|
+
}
|
|
117
|
+
if (message.data?.length) {
|
|
118
|
+
obj.data = message.data.map((e) => exports.BankData.toJSON(e));
|
|
119
|
+
}
|
|
120
|
+
return obj;
|
|
121
|
+
},
|
|
122
|
+
create(base) {
|
|
123
|
+
return exports.getCustomerBankResponse.fromPartial(base ?? {});
|
|
124
|
+
},
|
|
125
|
+
fromPartial(object) {
|
|
126
|
+
const message = createBasegetCustomerBankResponse();
|
|
127
|
+
message.status = object.status ?? "";
|
|
128
|
+
message.data = object.data?.map((e) => exports.BankData.fromPartial(e)) || [];
|
|
129
|
+
return message;
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
function createBaseBankData() {
|
|
133
|
+
return { account_number: "", ifsc_code: "", customer_name: "", is_primary: false, bank_logo_url: "" };
|
|
134
|
+
}
|
|
135
|
+
exports.BankData = {
|
|
70
136
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
71
137
|
if (message.account_number !== "") {
|
|
72
138
|
writer.uint32(10).string(message.account_number);
|
|
@@ -77,12 +143,18 @@ exports.getCustomerBankResponse = {
|
|
|
77
143
|
if (message.customer_name !== "") {
|
|
78
144
|
writer.uint32(26).string(message.customer_name);
|
|
79
145
|
}
|
|
146
|
+
if (message.is_primary !== false) {
|
|
147
|
+
writer.uint32(32).bool(message.is_primary);
|
|
148
|
+
}
|
|
149
|
+
if (message.bank_logo_url !== "") {
|
|
150
|
+
writer.uint32(42).string(message.bank_logo_url);
|
|
151
|
+
}
|
|
80
152
|
return writer;
|
|
81
153
|
},
|
|
82
154
|
decode(input, length) {
|
|
83
155
|
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
84
156
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
85
|
-
const message =
|
|
157
|
+
const message = createBaseBankData();
|
|
86
158
|
while (reader.pos < end) {
|
|
87
159
|
const tag = reader.uint32();
|
|
88
160
|
switch (tag >>> 3) {
|
|
@@ -104,6 +176,18 @@ exports.getCustomerBankResponse = {
|
|
|
104
176
|
}
|
|
105
177
|
message.customer_name = reader.string();
|
|
106
178
|
continue;
|
|
179
|
+
case 4:
|
|
180
|
+
if (tag !== 32) {
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
message.is_primary = reader.bool();
|
|
184
|
+
continue;
|
|
185
|
+
case 5:
|
|
186
|
+
if (tag !== 42) {
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
message.bank_logo_url = reader.string();
|
|
190
|
+
continue;
|
|
107
191
|
}
|
|
108
192
|
if ((tag & 7) === 4 || tag === 0) {
|
|
109
193
|
break;
|
|
@@ -117,6 +201,8 @@ exports.getCustomerBankResponse = {
|
|
|
117
201
|
account_number: isSet(object.account_number) ? globalThis.String(object.account_number) : "",
|
|
118
202
|
ifsc_code: isSet(object.ifsc_code) ? globalThis.String(object.ifsc_code) : "",
|
|
119
203
|
customer_name: isSet(object.customer_name) ? globalThis.String(object.customer_name) : "",
|
|
204
|
+
is_primary: isSet(object.is_primary) ? globalThis.Boolean(object.is_primary) : false,
|
|
205
|
+
bank_logo_url: isSet(object.bank_logo_url) ? globalThis.String(object.bank_logo_url) : "",
|
|
120
206
|
};
|
|
121
207
|
},
|
|
122
208
|
toJSON(message) {
|
|
@@ -130,16 +216,24 @@ exports.getCustomerBankResponse = {
|
|
|
130
216
|
if (message.customer_name !== "") {
|
|
131
217
|
obj.customer_name = message.customer_name;
|
|
132
218
|
}
|
|
219
|
+
if (message.is_primary !== false) {
|
|
220
|
+
obj.is_primary = message.is_primary;
|
|
221
|
+
}
|
|
222
|
+
if (message.bank_logo_url !== "") {
|
|
223
|
+
obj.bank_logo_url = message.bank_logo_url;
|
|
224
|
+
}
|
|
133
225
|
return obj;
|
|
134
226
|
},
|
|
135
227
|
create(base) {
|
|
136
|
-
return exports.
|
|
228
|
+
return exports.BankData.fromPartial(base ?? {});
|
|
137
229
|
},
|
|
138
230
|
fromPartial(object) {
|
|
139
|
-
const message =
|
|
231
|
+
const message = createBaseBankData();
|
|
140
232
|
message.account_number = object.account_number ?? "";
|
|
141
233
|
message.ifsc_code = object.ifsc_code ?? "";
|
|
142
234
|
message.customer_name = object.customer_name ?? "";
|
|
235
|
+
message.is_primary = object.is_primary ?? false;
|
|
236
|
+
message.bank_logo_url = object.bank_logo_url ?? "";
|
|
143
237
|
return message;
|
|
144
238
|
},
|
|
145
239
|
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "kyc.fetchaadhaarbypan";
|
|
3
|
+
export interface fetchAadhaarByPanRequest {
|
|
4
|
+
pan_number: string;
|
|
5
|
+
}
|
|
6
|
+
export interface fetchAadhaarByPanResponse {
|
|
7
|
+
request_id: string;
|
|
8
|
+
transaction_id: string;
|
|
9
|
+
status: number;
|
|
10
|
+
data: Data | undefined;
|
|
11
|
+
timestamp: number;
|
|
12
|
+
path: string;
|
|
13
|
+
}
|
|
14
|
+
export interface Data {
|
|
15
|
+
code: string;
|
|
16
|
+
message: string;
|
|
17
|
+
pan_data?: PanData | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface PanData {
|
|
20
|
+
document_type: string;
|
|
21
|
+
document_id: string;
|
|
22
|
+
masked_aadhaar_number: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const fetchAadhaarByPanRequest: {
|
|
25
|
+
encode(message: fetchAadhaarByPanRequest, writer?: _m0.Writer): _m0.Writer;
|
|
26
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): fetchAadhaarByPanRequest;
|
|
27
|
+
fromJSON(object: any): fetchAadhaarByPanRequest;
|
|
28
|
+
toJSON(message: fetchAadhaarByPanRequest): unknown;
|
|
29
|
+
create<I extends Exact<DeepPartial<fetchAadhaarByPanRequest>, I>>(base?: I): fetchAadhaarByPanRequest;
|
|
30
|
+
fromPartial<I extends Exact<DeepPartial<fetchAadhaarByPanRequest>, I>>(object: I): fetchAadhaarByPanRequest;
|
|
31
|
+
};
|
|
32
|
+
export declare const fetchAadhaarByPanResponse: {
|
|
33
|
+
encode(message: fetchAadhaarByPanResponse, writer?: _m0.Writer): _m0.Writer;
|
|
34
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): fetchAadhaarByPanResponse;
|
|
35
|
+
fromJSON(object: any): fetchAadhaarByPanResponse;
|
|
36
|
+
toJSON(message: fetchAadhaarByPanResponse): unknown;
|
|
37
|
+
create<I extends Exact<DeepPartial<fetchAadhaarByPanResponse>, I>>(base?: I): fetchAadhaarByPanResponse;
|
|
38
|
+
fromPartial<I extends Exact<DeepPartial<fetchAadhaarByPanResponse>, I>>(object: I): fetchAadhaarByPanResponse;
|
|
39
|
+
};
|
|
40
|
+
export declare const Data: {
|
|
41
|
+
encode(message: Data, writer?: _m0.Writer): _m0.Writer;
|
|
42
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Data;
|
|
43
|
+
fromJSON(object: any): Data;
|
|
44
|
+
toJSON(message: Data): unknown;
|
|
45
|
+
create<I extends Exact<DeepPartial<Data>, I>>(base?: I): Data;
|
|
46
|
+
fromPartial<I extends Exact<DeepPartial<Data>, I>>(object: I): Data;
|
|
47
|
+
};
|
|
48
|
+
export declare const PanData: {
|
|
49
|
+
encode(message: PanData, writer?: _m0.Writer): _m0.Writer;
|
|
50
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): PanData;
|
|
51
|
+
fromJSON(object: any): PanData;
|
|
52
|
+
toJSON(message: PanData): unknown;
|
|
53
|
+
create<I extends Exact<DeepPartial<PanData>, I>>(base?: I): PanData;
|
|
54
|
+
fromPartial<I extends Exact<DeepPartial<PanData>, I>>(object: I): PanData;
|
|
55
|
+
};
|
|
56
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
57
|
+
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 {} ? {
|
|
58
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
59
|
+
} : Partial<T>;
|
|
60
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
61
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
62
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
63
|
+
} & {
|
|
64
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
65
|
+
};
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,365 @@
|
|
|
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 v5.29.3
|
|
6
|
+
// source: kyc/fetchaadhaarbypan.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.PanData = exports.Data = exports.fetchAadhaarByPanResponse = exports.fetchAadhaarByPanRequest = 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 = "kyc.fetchaadhaarbypan";
|
|
16
|
+
function createBasefetchAadhaarByPanRequest() {
|
|
17
|
+
return { pan_number: "" };
|
|
18
|
+
}
|
|
19
|
+
exports.fetchAadhaarByPanRequest = {
|
|
20
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
21
|
+
if (message.pan_number !== "") {
|
|
22
|
+
writer.uint32(10).string(message.pan_number);
|
|
23
|
+
}
|
|
24
|
+
return writer;
|
|
25
|
+
},
|
|
26
|
+
decode(input, length) {
|
|
27
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
28
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
29
|
+
const message = createBasefetchAadhaarByPanRequest();
|
|
30
|
+
while (reader.pos < end) {
|
|
31
|
+
const tag = reader.uint32();
|
|
32
|
+
switch (tag >>> 3) {
|
|
33
|
+
case 1:
|
|
34
|
+
if (tag !== 10) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
message.pan_number = reader.string();
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
reader.skipType(tag & 7);
|
|
44
|
+
}
|
|
45
|
+
return message;
|
|
46
|
+
},
|
|
47
|
+
fromJSON(object) {
|
|
48
|
+
return { pan_number: isSet(object.pan_number) ? globalThis.String(object.pan_number) : "" };
|
|
49
|
+
},
|
|
50
|
+
toJSON(message) {
|
|
51
|
+
const obj = {};
|
|
52
|
+
if (message.pan_number !== "") {
|
|
53
|
+
obj.pan_number = message.pan_number;
|
|
54
|
+
}
|
|
55
|
+
return obj;
|
|
56
|
+
},
|
|
57
|
+
create(base) {
|
|
58
|
+
return exports.fetchAadhaarByPanRequest.fromPartial(base ?? {});
|
|
59
|
+
},
|
|
60
|
+
fromPartial(object) {
|
|
61
|
+
const message = createBasefetchAadhaarByPanRequest();
|
|
62
|
+
message.pan_number = object.pan_number ?? "";
|
|
63
|
+
return message;
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
function createBasefetchAadhaarByPanResponse() {
|
|
67
|
+
return { request_id: "", transaction_id: "", status: 0, data: undefined, timestamp: 0, path: "" };
|
|
68
|
+
}
|
|
69
|
+
exports.fetchAadhaarByPanResponse = {
|
|
70
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
71
|
+
if (message.request_id !== "") {
|
|
72
|
+
writer.uint32(10).string(message.request_id);
|
|
73
|
+
}
|
|
74
|
+
if (message.transaction_id !== "") {
|
|
75
|
+
writer.uint32(18).string(message.transaction_id);
|
|
76
|
+
}
|
|
77
|
+
if (message.status !== 0) {
|
|
78
|
+
writer.uint32(24).int32(message.status);
|
|
79
|
+
}
|
|
80
|
+
if (message.data !== undefined) {
|
|
81
|
+
exports.Data.encode(message.data, writer.uint32(34).fork()).ldelim();
|
|
82
|
+
}
|
|
83
|
+
if (message.timestamp !== 0) {
|
|
84
|
+
writer.uint32(40).int64(message.timestamp);
|
|
85
|
+
}
|
|
86
|
+
if (message.path !== "") {
|
|
87
|
+
writer.uint32(50).string(message.path);
|
|
88
|
+
}
|
|
89
|
+
return writer;
|
|
90
|
+
},
|
|
91
|
+
decode(input, length) {
|
|
92
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
93
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
94
|
+
const message = createBasefetchAadhaarByPanResponse();
|
|
95
|
+
while (reader.pos < end) {
|
|
96
|
+
const tag = reader.uint32();
|
|
97
|
+
switch (tag >>> 3) {
|
|
98
|
+
case 1:
|
|
99
|
+
if (tag !== 10) {
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
message.request_id = reader.string();
|
|
103
|
+
continue;
|
|
104
|
+
case 2:
|
|
105
|
+
if (tag !== 18) {
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
message.transaction_id = reader.string();
|
|
109
|
+
continue;
|
|
110
|
+
case 3:
|
|
111
|
+
if (tag !== 24) {
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
message.status = reader.int32();
|
|
115
|
+
continue;
|
|
116
|
+
case 4:
|
|
117
|
+
if (tag !== 34) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
message.data = exports.Data.decode(reader, reader.uint32());
|
|
121
|
+
continue;
|
|
122
|
+
case 5:
|
|
123
|
+
if (tag !== 40) {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
message.timestamp = longToNumber(reader.int64());
|
|
127
|
+
continue;
|
|
128
|
+
case 6:
|
|
129
|
+
if (tag !== 50) {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
message.path = reader.string();
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
reader.skipType(tag & 7);
|
|
139
|
+
}
|
|
140
|
+
return message;
|
|
141
|
+
},
|
|
142
|
+
fromJSON(object) {
|
|
143
|
+
return {
|
|
144
|
+
request_id: isSet(object.request_id) ? globalThis.String(object.request_id) : "",
|
|
145
|
+
transaction_id: isSet(object.transaction_id) ? globalThis.String(object.transaction_id) : "",
|
|
146
|
+
status: isSet(object.status) ? globalThis.Number(object.status) : 0,
|
|
147
|
+
data: isSet(object.data) ? exports.Data.fromJSON(object.data) : undefined,
|
|
148
|
+
timestamp: isSet(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
|
|
149
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
150
|
+
};
|
|
151
|
+
},
|
|
152
|
+
toJSON(message) {
|
|
153
|
+
const obj = {};
|
|
154
|
+
if (message.request_id !== "") {
|
|
155
|
+
obj.request_id = message.request_id;
|
|
156
|
+
}
|
|
157
|
+
if (message.transaction_id !== "") {
|
|
158
|
+
obj.transaction_id = message.transaction_id;
|
|
159
|
+
}
|
|
160
|
+
if (message.status !== 0) {
|
|
161
|
+
obj.status = Math.round(message.status);
|
|
162
|
+
}
|
|
163
|
+
if (message.data !== undefined) {
|
|
164
|
+
obj.data = exports.Data.toJSON(message.data);
|
|
165
|
+
}
|
|
166
|
+
if (message.timestamp !== 0) {
|
|
167
|
+
obj.timestamp = Math.round(message.timestamp);
|
|
168
|
+
}
|
|
169
|
+
if (message.path !== "") {
|
|
170
|
+
obj.path = message.path;
|
|
171
|
+
}
|
|
172
|
+
return obj;
|
|
173
|
+
},
|
|
174
|
+
create(base) {
|
|
175
|
+
return exports.fetchAadhaarByPanResponse.fromPartial(base ?? {});
|
|
176
|
+
},
|
|
177
|
+
fromPartial(object) {
|
|
178
|
+
const message = createBasefetchAadhaarByPanResponse();
|
|
179
|
+
message.request_id = object.request_id ?? "";
|
|
180
|
+
message.transaction_id = object.transaction_id ?? "";
|
|
181
|
+
message.status = object.status ?? 0;
|
|
182
|
+
message.data = (object.data !== undefined && object.data !== null) ? exports.Data.fromPartial(object.data) : undefined;
|
|
183
|
+
message.timestamp = object.timestamp ?? 0;
|
|
184
|
+
message.path = object.path ?? "";
|
|
185
|
+
return message;
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
function createBaseData() {
|
|
189
|
+
return { code: "", message: "", pan_data: undefined };
|
|
190
|
+
}
|
|
191
|
+
exports.Data = {
|
|
192
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
193
|
+
if (message.code !== "") {
|
|
194
|
+
writer.uint32(10).string(message.code);
|
|
195
|
+
}
|
|
196
|
+
if (message.message !== "") {
|
|
197
|
+
writer.uint32(18).string(message.message);
|
|
198
|
+
}
|
|
199
|
+
if (message.pan_data !== undefined) {
|
|
200
|
+
exports.PanData.encode(message.pan_data, writer.uint32(26).fork()).ldelim();
|
|
201
|
+
}
|
|
202
|
+
return writer;
|
|
203
|
+
},
|
|
204
|
+
decode(input, length) {
|
|
205
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
206
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
207
|
+
const message = createBaseData();
|
|
208
|
+
while (reader.pos < end) {
|
|
209
|
+
const tag = reader.uint32();
|
|
210
|
+
switch (tag >>> 3) {
|
|
211
|
+
case 1:
|
|
212
|
+
if (tag !== 10) {
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
message.code = reader.string();
|
|
216
|
+
continue;
|
|
217
|
+
case 2:
|
|
218
|
+
if (tag !== 18) {
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
message.message = reader.string();
|
|
222
|
+
continue;
|
|
223
|
+
case 3:
|
|
224
|
+
if (tag !== 26) {
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
message.pan_data = exports.PanData.decode(reader, reader.uint32());
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
reader.skipType(tag & 7);
|
|
234
|
+
}
|
|
235
|
+
return message;
|
|
236
|
+
},
|
|
237
|
+
fromJSON(object) {
|
|
238
|
+
return {
|
|
239
|
+
code: isSet(object.code) ? globalThis.String(object.code) : "",
|
|
240
|
+
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
241
|
+
pan_data: isSet(object.pan_data) ? exports.PanData.fromJSON(object.pan_data) : undefined,
|
|
242
|
+
};
|
|
243
|
+
},
|
|
244
|
+
toJSON(message) {
|
|
245
|
+
const obj = {};
|
|
246
|
+
if (message.code !== "") {
|
|
247
|
+
obj.code = message.code;
|
|
248
|
+
}
|
|
249
|
+
if (message.message !== "") {
|
|
250
|
+
obj.message = message.message;
|
|
251
|
+
}
|
|
252
|
+
if (message.pan_data !== undefined) {
|
|
253
|
+
obj.pan_data = exports.PanData.toJSON(message.pan_data);
|
|
254
|
+
}
|
|
255
|
+
return obj;
|
|
256
|
+
},
|
|
257
|
+
create(base) {
|
|
258
|
+
return exports.Data.fromPartial(base ?? {});
|
|
259
|
+
},
|
|
260
|
+
fromPartial(object) {
|
|
261
|
+
const message = createBaseData();
|
|
262
|
+
message.code = object.code ?? "";
|
|
263
|
+
message.message = object.message ?? "";
|
|
264
|
+
message.pan_data = (object.pan_data !== undefined && object.pan_data !== null)
|
|
265
|
+
? exports.PanData.fromPartial(object.pan_data)
|
|
266
|
+
: undefined;
|
|
267
|
+
return message;
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
function createBasePanData() {
|
|
271
|
+
return { document_type: "", document_id: "", masked_aadhaar_number: "" };
|
|
272
|
+
}
|
|
273
|
+
exports.PanData = {
|
|
274
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
275
|
+
if (message.document_type !== "") {
|
|
276
|
+
writer.uint32(10).string(message.document_type);
|
|
277
|
+
}
|
|
278
|
+
if (message.document_id !== "") {
|
|
279
|
+
writer.uint32(18).string(message.document_id);
|
|
280
|
+
}
|
|
281
|
+
if (message.masked_aadhaar_number !== "") {
|
|
282
|
+
writer.uint32(26).string(message.masked_aadhaar_number);
|
|
283
|
+
}
|
|
284
|
+
return writer;
|
|
285
|
+
},
|
|
286
|
+
decode(input, length) {
|
|
287
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
288
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
289
|
+
const message = createBasePanData();
|
|
290
|
+
while (reader.pos < end) {
|
|
291
|
+
const tag = reader.uint32();
|
|
292
|
+
switch (tag >>> 3) {
|
|
293
|
+
case 1:
|
|
294
|
+
if (tag !== 10) {
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
message.document_type = reader.string();
|
|
298
|
+
continue;
|
|
299
|
+
case 2:
|
|
300
|
+
if (tag !== 18) {
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
message.document_id = reader.string();
|
|
304
|
+
continue;
|
|
305
|
+
case 3:
|
|
306
|
+
if (tag !== 26) {
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
message.masked_aadhaar_number = reader.string();
|
|
310
|
+
continue;
|
|
311
|
+
}
|
|
312
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
reader.skipType(tag & 7);
|
|
316
|
+
}
|
|
317
|
+
return message;
|
|
318
|
+
},
|
|
319
|
+
fromJSON(object) {
|
|
320
|
+
return {
|
|
321
|
+
document_type: isSet(object.document_type) ? globalThis.String(object.document_type) : "",
|
|
322
|
+
document_id: isSet(object.document_id) ? globalThis.String(object.document_id) : "",
|
|
323
|
+
masked_aadhaar_number: isSet(object.masked_aadhaar_number) ? globalThis.String(object.masked_aadhaar_number) : "",
|
|
324
|
+
};
|
|
325
|
+
},
|
|
326
|
+
toJSON(message) {
|
|
327
|
+
const obj = {};
|
|
328
|
+
if (message.document_type !== "") {
|
|
329
|
+
obj.document_type = message.document_type;
|
|
330
|
+
}
|
|
331
|
+
if (message.document_id !== "") {
|
|
332
|
+
obj.document_id = message.document_id;
|
|
333
|
+
}
|
|
334
|
+
if (message.masked_aadhaar_number !== "") {
|
|
335
|
+
obj.masked_aadhaar_number = message.masked_aadhaar_number;
|
|
336
|
+
}
|
|
337
|
+
return obj;
|
|
338
|
+
},
|
|
339
|
+
create(base) {
|
|
340
|
+
return exports.PanData.fromPartial(base ?? {});
|
|
341
|
+
},
|
|
342
|
+
fromPartial(object) {
|
|
343
|
+
const message = createBasePanData();
|
|
344
|
+
message.document_type = object.document_type ?? "";
|
|
345
|
+
message.document_id = object.document_id ?? "";
|
|
346
|
+
message.masked_aadhaar_number = object.masked_aadhaar_number ?? "";
|
|
347
|
+
return message;
|
|
348
|
+
},
|
|
349
|
+
};
|
|
350
|
+
function longToNumber(long) {
|
|
351
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
352
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
353
|
+
}
|
|
354
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
355
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
356
|
+
}
|
|
357
|
+
return long.toNumber();
|
|
358
|
+
}
|
|
359
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
360
|
+
minimal_1.default.util.Long = long_1.default;
|
|
361
|
+
minimal_1.default.configure();
|
|
362
|
+
}
|
|
363
|
+
function isSet(value) {
|
|
364
|
+
return value !== null && value !== undefined;
|
|
365
|
+
}
|
package/ts/kyc.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 { faceMatchRequest, faceMatchResponse } from "./kyc/facematch";
|
|
3
|
+
import { fetchAadhaarByPanRequest, fetchAadhaarByPanResponse } from "./kyc/fetchaadhaarbypan";
|
|
3
4
|
import { fetchEmploymentHistoryRequest, fetchEmploymentHistoryResponse } from "./kyc/fetchemploymenthistory";
|
|
4
5
|
import { fetchUanListRequest, fetchUanListResponse } from "./kyc/fetchuanlist";
|
|
5
6
|
import { selfieTxnIdRequest, selfieTxnIdResponse } from "./kyc/getselfietxnid";
|
|
@@ -62,6 +63,15 @@ export declare const kycService: {
|
|
|
62
63
|
readonly responseSerialize: (value: GetSelfieRedirectionUrlResponse) => Buffer;
|
|
63
64
|
readonly responseDeserialize: (value: Buffer) => GetSelfieRedirectionUrlResponse;
|
|
64
65
|
};
|
|
66
|
+
readonly fetchAadhaarByPan: {
|
|
67
|
+
readonly path: "/service.kyc/fetchAadhaarByPan";
|
|
68
|
+
readonly requestStream: false;
|
|
69
|
+
readonly responseStream: false;
|
|
70
|
+
readonly requestSerialize: (value: fetchAadhaarByPanRequest) => Buffer;
|
|
71
|
+
readonly requestDeserialize: (value: Buffer) => fetchAadhaarByPanRequest;
|
|
72
|
+
readonly responseSerialize: (value: fetchAadhaarByPanResponse) => Buffer;
|
|
73
|
+
readonly responseDeserialize: (value: Buffer) => fetchAadhaarByPanResponse;
|
|
74
|
+
};
|
|
65
75
|
};
|
|
66
76
|
export interface kycServer extends UntypedServiceImplementation {
|
|
67
77
|
fetchUanList: handleUnaryCall<fetchUanListRequest, fetchUanListResponse>;
|
|
@@ -70,6 +80,7 @@ export interface kycServer extends UntypedServiceImplementation {
|
|
|
70
80
|
faceMatch: handleUnaryCall<faceMatchRequest, faceMatchResponse>;
|
|
71
81
|
panValidation: handleUnaryCall<CustomerPanDetailRequest, CustomerPanDetailResponse>;
|
|
72
82
|
getSelfieRedirectionUrl: handleUnaryCall<GetSelfieRedirectionUrlRequest, GetSelfieRedirectionUrlResponse>;
|
|
83
|
+
fetchAadhaarByPan: handleUnaryCall<fetchAadhaarByPanRequest, fetchAadhaarByPanResponse>;
|
|
73
84
|
}
|
|
74
85
|
export interface kycClient extends Client {
|
|
75
86
|
fetchUanList(request: fetchUanListRequest, callback: (error: ServiceError | null, response: fetchUanListResponse) => void): ClientUnaryCall;
|
|
@@ -90,6 +101,9 @@ export interface kycClient extends Client {
|
|
|
90
101
|
getSelfieRedirectionUrl(request: GetSelfieRedirectionUrlRequest, callback: (error: ServiceError | null, response: GetSelfieRedirectionUrlResponse) => void): ClientUnaryCall;
|
|
91
102
|
getSelfieRedirectionUrl(request: GetSelfieRedirectionUrlRequest, metadata: Metadata, callback: (error: ServiceError | null, response: GetSelfieRedirectionUrlResponse) => void): ClientUnaryCall;
|
|
92
103
|
getSelfieRedirectionUrl(request: GetSelfieRedirectionUrlRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GetSelfieRedirectionUrlResponse) => void): ClientUnaryCall;
|
|
104
|
+
fetchAadhaarByPan(request: fetchAadhaarByPanRequest, callback: (error: ServiceError | null, response: fetchAadhaarByPanResponse) => void): ClientUnaryCall;
|
|
105
|
+
fetchAadhaarByPan(request: fetchAadhaarByPanRequest, metadata: Metadata, callback: (error: ServiceError | null, response: fetchAadhaarByPanResponse) => void): ClientUnaryCall;
|
|
106
|
+
fetchAadhaarByPan(request: fetchAadhaarByPanRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: fetchAadhaarByPanResponse) => void): ClientUnaryCall;
|
|
93
107
|
}
|
|
94
108
|
export declare const kycClient: {
|
|
95
109
|
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): kycClient;
|
package/ts/kyc.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.kycClient = exports.kycService = exports.protobufPackage = void 0;
|
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
11
11
|
const facematch_1 = require("./kyc/facematch");
|
|
12
|
+
const fetchaadhaarbypan_1 = require("./kyc/fetchaadhaarbypan");
|
|
12
13
|
const fetchemploymenthistory_1 = require("./kyc/fetchemploymenthistory");
|
|
13
14
|
const fetchuanlist_1 = require("./kyc/fetchuanlist");
|
|
14
15
|
const getselfietxnid_1 = require("./kyc/getselfietxnid");
|
|
@@ -70,5 +71,14 @@ exports.kycService = {
|
|
|
70
71
|
responseSerialize: (value) => Buffer.from(getselfieurl_1.GetSelfieRedirectionUrlResponse.encode(value).finish()),
|
|
71
72
|
responseDeserialize: (value) => getselfieurl_1.GetSelfieRedirectionUrlResponse.decode(value),
|
|
72
73
|
},
|
|
74
|
+
fetchAadhaarByPan: {
|
|
75
|
+
path: "/service.kyc/fetchAadhaarByPan",
|
|
76
|
+
requestStream: false,
|
|
77
|
+
responseStream: false,
|
|
78
|
+
requestSerialize: (value) => Buffer.from(fetchaadhaarbypan_1.fetchAadhaarByPanRequest.encode(value).finish()),
|
|
79
|
+
requestDeserialize: (value) => fetchaadhaarbypan_1.fetchAadhaarByPanRequest.decode(value),
|
|
80
|
+
responseSerialize: (value) => Buffer.from(fetchaadhaarbypan_1.fetchAadhaarByPanResponse.encode(value).finish()),
|
|
81
|
+
responseDeserialize: (value) => fetchaadhaarbypan_1.fetchAadhaarByPanResponse.decode(value),
|
|
82
|
+
},
|
|
73
83
|
};
|
|
74
84
|
exports.kycClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.kycService, "service.kyc");
|