@stashfin/grpc 1.2.583 → 1.2.585

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.
@@ -0,0 +1,301 @@
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/nsdlpanvalidate.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.CustomerPanDetailResponse = exports.PanDetails = exports.CustomerPanDetailRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "kyc.nsdlpanvalidate";
15
+ function createBaseCustomerPanDetailRequest() {
16
+ return { customer_id: 0, full_name: "", pan_number: "", dob: "" };
17
+ }
18
+ exports.CustomerPanDetailRequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.customer_id !== 0) {
21
+ writer.uint32(8).int32(message.customer_id);
22
+ }
23
+ if (message.full_name !== "") {
24
+ writer.uint32(18).string(message.full_name);
25
+ }
26
+ if (message.pan_number !== "") {
27
+ writer.uint32(26).string(message.pan_number);
28
+ }
29
+ if (message.dob !== "") {
30
+ writer.uint32(34).string(message.dob);
31
+ }
32
+ return writer;
33
+ },
34
+ decode(input, length) {
35
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
36
+ let end = length === undefined ? reader.len : reader.pos + length;
37
+ const message = createBaseCustomerPanDetailRequest();
38
+ while (reader.pos < end) {
39
+ const tag = reader.uint32();
40
+ switch (tag >>> 3) {
41
+ case 1:
42
+ if (tag !== 8) {
43
+ break;
44
+ }
45
+ message.customer_id = reader.int32();
46
+ continue;
47
+ case 2:
48
+ if (tag !== 18) {
49
+ break;
50
+ }
51
+ message.full_name = reader.string();
52
+ continue;
53
+ case 3:
54
+ if (tag !== 26) {
55
+ break;
56
+ }
57
+ message.pan_number = reader.string();
58
+ continue;
59
+ case 4:
60
+ if (tag !== 34) {
61
+ break;
62
+ }
63
+ message.dob = reader.string();
64
+ continue;
65
+ }
66
+ if ((tag & 7) === 4 || tag === 0) {
67
+ break;
68
+ }
69
+ reader.skipType(tag & 7);
70
+ }
71
+ return message;
72
+ },
73
+ fromJSON(object) {
74
+ return {
75
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
76
+ full_name: isSet(object.full_name) ? globalThis.String(object.full_name) : "",
77
+ pan_number: isSet(object.pan_number) ? globalThis.String(object.pan_number) : "",
78
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
79
+ };
80
+ },
81
+ toJSON(message) {
82
+ const obj = {};
83
+ if (message.customer_id !== 0) {
84
+ obj.customer_id = Math.round(message.customer_id);
85
+ }
86
+ if (message.full_name !== "") {
87
+ obj.full_name = message.full_name;
88
+ }
89
+ if (message.pan_number !== "") {
90
+ obj.pan_number = message.pan_number;
91
+ }
92
+ if (message.dob !== "") {
93
+ obj.dob = message.dob;
94
+ }
95
+ return obj;
96
+ },
97
+ create(base) {
98
+ return exports.CustomerPanDetailRequest.fromPartial(base ?? {});
99
+ },
100
+ fromPartial(object) {
101
+ const message = createBaseCustomerPanDetailRequest();
102
+ message.customer_id = object.customer_id ?? 0;
103
+ message.full_name = object.full_name ?? "";
104
+ message.pan_number = object.pan_number ?? "";
105
+ message.dob = object.dob ?? "";
106
+ return message;
107
+ },
108
+ };
109
+ function createBasePanDetails() {
110
+ return { pan: "", pan_status: "", name: "", fathername: "", dob: "", seeding_status: "" };
111
+ }
112
+ exports.PanDetails = {
113
+ encode(message, writer = minimal_1.default.Writer.create()) {
114
+ if (message.pan !== "") {
115
+ writer.uint32(10).string(message.pan);
116
+ }
117
+ if (message.pan_status !== "") {
118
+ writer.uint32(18).string(message.pan_status);
119
+ }
120
+ if (message.name !== "") {
121
+ writer.uint32(26).string(message.name);
122
+ }
123
+ if (message.fathername !== "") {
124
+ writer.uint32(34).string(message.fathername);
125
+ }
126
+ if (message.dob !== "") {
127
+ writer.uint32(42).string(message.dob);
128
+ }
129
+ if (message.seeding_status !== "") {
130
+ writer.uint32(50).string(message.seeding_status);
131
+ }
132
+ return writer;
133
+ },
134
+ decode(input, length) {
135
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
136
+ let end = length === undefined ? reader.len : reader.pos + length;
137
+ const message = createBasePanDetails();
138
+ while (reader.pos < end) {
139
+ const tag = reader.uint32();
140
+ switch (tag >>> 3) {
141
+ case 1:
142
+ if (tag !== 10) {
143
+ break;
144
+ }
145
+ message.pan = reader.string();
146
+ continue;
147
+ case 2:
148
+ if (tag !== 18) {
149
+ break;
150
+ }
151
+ message.pan_status = reader.string();
152
+ continue;
153
+ case 3:
154
+ if (tag !== 26) {
155
+ break;
156
+ }
157
+ message.name = reader.string();
158
+ continue;
159
+ case 4:
160
+ if (tag !== 34) {
161
+ break;
162
+ }
163
+ message.fathername = reader.string();
164
+ continue;
165
+ case 5:
166
+ if (tag !== 42) {
167
+ break;
168
+ }
169
+ message.dob = reader.string();
170
+ continue;
171
+ case 6:
172
+ if (tag !== 50) {
173
+ break;
174
+ }
175
+ message.seeding_status = reader.string();
176
+ continue;
177
+ }
178
+ if ((tag & 7) === 4 || tag === 0) {
179
+ break;
180
+ }
181
+ reader.skipType(tag & 7);
182
+ }
183
+ return message;
184
+ },
185
+ fromJSON(object) {
186
+ return {
187
+ pan: isSet(object.pan) ? globalThis.String(object.pan) : "",
188
+ pan_status: isSet(object.pan_status) ? globalThis.String(object.pan_status) : "",
189
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
190
+ fathername: isSet(object.fathername) ? globalThis.String(object.fathername) : "",
191
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
192
+ seeding_status: isSet(object.seeding_status) ? globalThis.String(object.seeding_status) : "",
193
+ };
194
+ },
195
+ toJSON(message) {
196
+ const obj = {};
197
+ if (message.pan !== "") {
198
+ obj.pan = message.pan;
199
+ }
200
+ if (message.pan_status !== "") {
201
+ obj.pan_status = message.pan_status;
202
+ }
203
+ if (message.name !== "") {
204
+ obj.name = message.name;
205
+ }
206
+ if (message.fathername !== "") {
207
+ obj.fathername = message.fathername;
208
+ }
209
+ if (message.dob !== "") {
210
+ obj.dob = message.dob;
211
+ }
212
+ if (message.seeding_status !== "") {
213
+ obj.seeding_status = message.seeding_status;
214
+ }
215
+ return obj;
216
+ },
217
+ create(base) {
218
+ return exports.PanDetails.fromPartial(base ?? {});
219
+ },
220
+ fromPartial(object) {
221
+ const message = createBasePanDetails();
222
+ message.pan = object.pan ?? "";
223
+ message.pan_status = object.pan_status ?? "";
224
+ message.name = object.name ?? "";
225
+ message.fathername = object.fathername ?? "";
226
+ message.dob = object.dob ?? "";
227
+ message.seeding_status = object.seeding_status ?? "";
228
+ return message;
229
+ },
230
+ };
231
+ function createBaseCustomerPanDetailResponse() {
232
+ return { response_code: "", output_data: [] };
233
+ }
234
+ exports.CustomerPanDetailResponse = {
235
+ encode(message, writer = minimal_1.default.Writer.create()) {
236
+ if (message.response_code !== "") {
237
+ writer.uint32(10).string(message.response_code);
238
+ }
239
+ for (const v of message.output_data) {
240
+ exports.PanDetails.encode(v, writer.uint32(18).fork()).ldelim();
241
+ }
242
+ return writer;
243
+ },
244
+ decode(input, length) {
245
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
246
+ let end = length === undefined ? reader.len : reader.pos + length;
247
+ const message = createBaseCustomerPanDetailResponse();
248
+ while (reader.pos < end) {
249
+ const tag = reader.uint32();
250
+ switch (tag >>> 3) {
251
+ case 1:
252
+ if (tag !== 10) {
253
+ break;
254
+ }
255
+ message.response_code = reader.string();
256
+ continue;
257
+ case 2:
258
+ if (tag !== 18) {
259
+ break;
260
+ }
261
+ message.output_data.push(exports.PanDetails.decode(reader, reader.uint32()));
262
+ continue;
263
+ }
264
+ if ((tag & 7) === 4 || tag === 0) {
265
+ break;
266
+ }
267
+ reader.skipType(tag & 7);
268
+ }
269
+ return message;
270
+ },
271
+ fromJSON(object) {
272
+ return {
273
+ response_code: isSet(object.response_code) ? globalThis.String(object.response_code) : "",
274
+ output_data: globalThis.Array.isArray(object?.output_data)
275
+ ? object.output_data.map((e) => exports.PanDetails.fromJSON(e))
276
+ : [],
277
+ };
278
+ },
279
+ toJSON(message) {
280
+ const obj = {};
281
+ if (message.response_code !== "") {
282
+ obj.response_code = message.response_code;
283
+ }
284
+ if (message.output_data?.length) {
285
+ obj.output_data = message.output_data.map((e) => exports.PanDetails.toJSON(e));
286
+ }
287
+ return obj;
288
+ },
289
+ create(base) {
290
+ return exports.CustomerPanDetailResponse.fromPartial(base ?? {});
291
+ },
292
+ fromPartial(object) {
293
+ const message = createBaseCustomerPanDetailResponse();
294
+ message.response_code = object.response_code ?? "";
295
+ message.output_data = object.output_data?.map((e) => exports.PanDetails.fromPartial(e)) || [];
296
+ return message;
297
+ },
298
+ };
299
+ function isSet(value) {
300
+ return value !== null && value !== undefined;
301
+ }
package/ts/kyc.d.ts CHANGED
@@ -3,6 +3,7 @@ import { faceMatchRequest, faceMatchResponse } from "./kyc/facematch";
3
3
  import { fetchEmploymentHistoryRequest, fetchEmploymentHistoryResponse } from "./kyc/fetchemploymenthistory";
4
4
  import { fetchUanListRequest, fetchUanListResponse } from "./kyc/fetchuanlist";
5
5
  import { selfieTxnIdRequest, selfieTxnIdResponse } from "./kyc/getselfietxnid";
6
+ import { CustomerPanDetailRequest, CustomerPanDetailResponse } from "./kyc/nsdlpanvalidate";
6
7
  export declare const protobufPackage = "service";
7
8
  export type kycService = typeof kycService;
8
9
  export declare const kycService: {
@@ -42,12 +43,22 @@ export declare const kycService: {
42
43
  readonly responseSerialize: (value: faceMatchResponse) => Buffer;
43
44
  readonly responseDeserialize: (value: Buffer) => faceMatchResponse;
44
45
  };
46
+ readonly panValidation: {
47
+ readonly path: "/service.kyc/panValidation";
48
+ readonly requestStream: false;
49
+ readonly responseStream: false;
50
+ readonly requestSerialize: (value: CustomerPanDetailRequest) => Buffer;
51
+ readonly requestDeserialize: (value: Buffer) => CustomerPanDetailRequest;
52
+ readonly responseSerialize: (value: CustomerPanDetailResponse) => Buffer;
53
+ readonly responseDeserialize: (value: Buffer) => CustomerPanDetailResponse;
54
+ };
45
55
  };
46
56
  export interface kycServer extends UntypedServiceImplementation {
47
57
  fetchUanList: handleUnaryCall<fetchUanListRequest, fetchUanListResponse>;
48
58
  fetchEmploymentDetail: handleUnaryCall<fetchEmploymentHistoryRequest, fetchEmploymentHistoryResponse>;
49
59
  getSelfieTxnId: handleUnaryCall<selfieTxnIdRequest, selfieTxnIdResponse>;
50
60
  faceMatch: handleUnaryCall<faceMatchRequest, faceMatchResponse>;
61
+ panValidation: handleUnaryCall<CustomerPanDetailRequest, CustomerPanDetailResponse>;
51
62
  }
52
63
  export interface kycClient extends Client {
53
64
  fetchUanList(request: fetchUanListRequest, callback: (error: ServiceError | null, response: fetchUanListResponse) => void): ClientUnaryCall;
@@ -62,6 +73,9 @@ export interface kycClient extends Client {
62
73
  faceMatch(request: faceMatchRequest, callback: (error: ServiceError | null, response: faceMatchResponse) => void): ClientUnaryCall;
63
74
  faceMatch(request: faceMatchRequest, metadata: Metadata, callback: (error: ServiceError | null, response: faceMatchResponse) => void): ClientUnaryCall;
64
75
  faceMatch(request: faceMatchRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: faceMatchResponse) => void): ClientUnaryCall;
76
+ panValidation(request: CustomerPanDetailRequest, callback: (error: ServiceError | null, response: CustomerPanDetailResponse) => void): ClientUnaryCall;
77
+ panValidation(request: CustomerPanDetailRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CustomerPanDetailResponse) => void): ClientUnaryCall;
78
+ panValidation(request: CustomerPanDetailRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CustomerPanDetailResponse) => void): ClientUnaryCall;
65
79
  }
66
80
  export declare const kycClient: {
67
81
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): kycClient;
package/ts/kyc.js CHANGED
@@ -12,6 +12,7 @@ const facematch_1 = require("./kyc/facematch");
12
12
  const fetchemploymenthistory_1 = require("./kyc/fetchemploymenthistory");
13
13
  const fetchuanlist_1 = require("./kyc/fetchuanlist");
14
14
  const getselfietxnid_1 = require("./kyc/getselfietxnid");
15
+ const nsdlpanvalidate_1 = require("./kyc/nsdlpanvalidate");
15
16
  exports.protobufPackage = "service";
16
17
  exports.kycService = {
17
18
  fetchUanList: {
@@ -50,5 +51,14 @@ exports.kycService = {
50
51
  responseSerialize: (value) => Buffer.from(facematch_1.faceMatchResponse.encode(value).finish()),
51
52
  responseDeserialize: (value) => facematch_1.faceMatchResponse.decode(value),
52
53
  },
54
+ panValidation: {
55
+ path: "/service.kyc/panValidation",
56
+ requestStream: false,
57
+ responseStream: false,
58
+ requestSerialize: (value) => Buffer.from(nsdlpanvalidate_1.CustomerPanDetailRequest.encode(value).finish()),
59
+ requestDeserialize: (value) => nsdlpanvalidate_1.CustomerPanDetailRequest.decode(value),
60
+ responseSerialize: (value) => Buffer.from(nsdlpanvalidate_1.CustomerPanDetailResponse.encode(value).finish()),
61
+ responseDeserialize: (value) => nsdlpanvalidate_1.CustomerPanDetailResponse.decode(value),
62
+ },
53
63
  };
54
64
  exports.kycClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.kycService, "service.kyc");