@stashfin/grpc 1.2.58 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stashfin/grpc",
3
- "version": "1.2.58",
3
+ "version": "1.2.59",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -0,0 +1,45 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "customers.validatepan";
3
+ export interface validatePanRequest {
4
+ customer_id: number;
5
+ pan: string;
6
+ }
7
+ export interface validatePanResponse {
8
+ firstName: string;
9
+ middleName: string;
10
+ lastName: string;
11
+ pan: string;
12
+ dob: string;
13
+ isDuplicate: boolean;
14
+ isNameMismatch: boolean;
15
+ isDobMismatch: boolean;
16
+ isFatherNameMismatch: boolean;
17
+ aadhaarSeedingStatus: string;
18
+ }
19
+ export declare const validatePanRequest: {
20
+ encode(message: validatePanRequest, writer?: _m0.Writer): _m0.Writer;
21
+ decode(input: _m0.Reader | Uint8Array, length?: number): validatePanRequest;
22
+ fromJSON(object: any): validatePanRequest;
23
+ toJSON(message: validatePanRequest): unknown;
24
+ create<I extends Exact<DeepPartial<validatePanRequest>, I>>(base?: I): validatePanRequest;
25
+ fromPartial<I extends Exact<DeepPartial<validatePanRequest>, I>>(object: I): validatePanRequest;
26
+ };
27
+ export declare const validatePanResponse: {
28
+ encode(message: validatePanResponse, writer?: _m0.Writer): _m0.Writer;
29
+ decode(input: _m0.Reader | Uint8Array, length?: number): validatePanResponse;
30
+ fromJSON(object: any): validatePanResponse;
31
+ toJSON(message: validatePanResponse): unknown;
32
+ create<I extends Exact<DeepPartial<validatePanResponse>, I>>(base?: I): validatePanResponse;
33
+ fromPartial<I extends Exact<DeepPartial<validatePanResponse>, I>>(object: I): validatePanResponse;
34
+ };
35
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
36
+ 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 {} ? {
37
+ [K in keyof T]?: DeepPartial<T[K]>;
38
+ } : Partial<T>;
39
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
40
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
41
+ [K in keyof P]: Exact<P[K], I[K]>;
42
+ } & {
43
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
44
+ };
45
+ export {};
@@ -0,0 +1,274 @@
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/validatepan.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.validatePanResponse = exports.validatePanRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "customers.validatepan";
15
+ function createBasevalidatePanRequest() {
16
+ return { customer_id: 0, pan: "" };
17
+ }
18
+ exports.validatePanRequest = {
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.pan !== "") {
24
+ writer.uint32(18).string(message.pan);
25
+ }
26
+ return writer;
27
+ },
28
+ decode(input, length) {
29
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
30
+ let end = length === undefined ? reader.len : reader.pos + length;
31
+ const message = createBasevalidatePanRequest();
32
+ while (reader.pos < end) {
33
+ const tag = reader.uint32();
34
+ switch (tag >>> 3) {
35
+ case 1:
36
+ if (tag !== 8) {
37
+ break;
38
+ }
39
+ message.customer_id = reader.int32();
40
+ continue;
41
+ case 2:
42
+ if (tag !== 18) {
43
+ break;
44
+ }
45
+ message.pan = reader.string();
46
+ continue;
47
+ }
48
+ if ((tag & 7) === 4 || tag === 0) {
49
+ break;
50
+ }
51
+ reader.skipType(tag & 7);
52
+ }
53
+ return message;
54
+ },
55
+ fromJSON(object) {
56
+ return {
57
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
58
+ pan: isSet(object.pan) ? globalThis.String(object.pan) : "",
59
+ };
60
+ },
61
+ toJSON(message) {
62
+ const obj = {};
63
+ if (message.customer_id !== 0) {
64
+ obj.customer_id = Math.round(message.customer_id);
65
+ }
66
+ if (message.pan !== "") {
67
+ obj.pan = message.pan;
68
+ }
69
+ return obj;
70
+ },
71
+ create(base) {
72
+ return exports.validatePanRequest.fromPartial(base ?? {});
73
+ },
74
+ fromPartial(object) {
75
+ const message = createBasevalidatePanRequest();
76
+ message.customer_id = object.customer_id ?? 0;
77
+ message.pan = object.pan ?? "";
78
+ return message;
79
+ },
80
+ };
81
+ function createBasevalidatePanResponse() {
82
+ return {
83
+ firstName: "",
84
+ middleName: "",
85
+ lastName: "",
86
+ pan: "",
87
+ dob: "",
88
+ isDuplicate: false,
89
+ isNameMismatch: false,
90
+ isDobMismatch: false,
91
+ isFatherNameMismatch: false,
92
+ aadhaarSeedingStatus: "",
93
+ };
94
+ }
95
+ exports.validatePanResponse = {
96
+ encode(message, writer = minimal_1.default.Writer.create()) {
97
+ if (message.firstName !== "") {
98
+ writer.uint32(10).string(message.firstName);
99
+ }
100
+ if (message.middleName !== "") {
101
+ writer.uint32(18).string(message.middleName);
102
+ }
103
+ if (message.lastName !== "") {
104
+ writer.uint32(26).string(message.lastName);
105
+ }
106
+ if (message.pan !== "") {
107
+ writer.uint32(34).string(message.pan);
108
+ }
109
+ if (message.dob !== "") {
110
+ writer.uint32(42).string(message.dob);
111
+ }
112
+ if (message.isDuplicate !== false) {
113
+ writer.uint32(48).bool(message.isDuplicate);
114
+ }
115
+ if (message.isNameMismatch !== false) {
116
+ writer.uint32(56).bool(message.isNameMismatch);
117
+ }
118
+ if (message.isDobMismatch !== false) {
119
+ writer.uint32(64).bool(message.isDobMismatch);
120
+ }
121
+ if (message.isFatherNameMismatch !== false) {
122
+ writer.uint32(72).bool(message.isFatherNameMismatch);
123
+ }
124
+ if (message.aadhaarSeedingStatus !== "") {
125
+ writer.uint32(82).string(message.aadhaarSeedingStatus);
126
+ }
127
+ return writer;
128
+ },
129
+ decode(input, length) {
130
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
131
+ let end = length === undefined ? reader.len : reader.pos + length;
132
+ const message = createBasevalidatePanResponse();
133
+ while (reader.pos < end) {
134
+ const tag = reader.uint32();
135
+ switch (tag >>> 3) {
136
+ case 1:
137
+ if (tag !== 10) {
138
+ break;
139
+ }
140
+ message.firstName = reader.string();
141
+ continue;
142
+ case 2:
143
+ if (tag !== 18) {
144
+ break;
145
+ }
146
+ message.middleName = reader.string();
147
+ continue;
148
+ case 3:
149
+ if (tag !== 26) {
150
+ break;
151
+ }
152
+ message.lastName = reader.string();
153
+ continue;
154
+ case 4:
155
+ if (tag !== 34) {
156
+ break;
157
+ }
158
+ message.pan = reader.string();
159
+ continue;
160
+ case 5:
161
+ if (tag !== 42) {
162
+ break;
163
+ }
164
+ message.dob = reader.string();
165
+ continue;
166
+ case 6:
167
+ if (tag !== 48) {
168
+ break;
169
+ }
170
+ message.isDuplicate = reader.bool();
171
+ continue;
172
+ case 7:
173
+ if (tag !== 56) {
174
+ break;
175
+ }
176
+ message.isNameMismatch = reader.bool();
177
+ continue;
178
+ case 8:
179
+ if (tag !== 64) {
180
+ break;
181
+ }
182
+ message.isDobMismatch = reader.bool();
183
+ continue;
184
+ case 9:
185
+ if (tag !== 72) {
186
+ break;
187
+ }
188
+ message.isFatherNameMismatch = reader.bool();
189
+ continue;
190
+ case 10:
191
+ if (tag !== 82) {
192
+ break;
193
+ }
194
+ message.aadhaarSeedingStatus = reader.string();
195
+ continue;
196
+ }
197
+ if ((tag & 7) === 4 || tag === 0) {
198
+ break;
199
+ }
200
+ reader.skipType(tag & 7);
201
+ }
202
+ return message;
203
+ },
204
+ fromJSON(object) {
205
+ return {
206
+ firstName: isSet(object.firstName) ? globalThis.String(object.firstName) : "",
207
+ middleName: isSet(object.middleName) ? globalThis.String(object.middleName) : "",
208
+ lastName: isSet(object.lastName) ? globalThis.String(object.lastName) : "",
209
+ pan: isSet(object.pan) ? globalThis.String(object.pan) : "",
210
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
211
+ isDuplicate: isSet(object.isDuplicate) ? globalThis.Boolean(object.isDuplicate) : false,
212
+ isNameMismatch: isSet(object.isNameMismatch) ? globalThis.Boolean(object.isNameMismatch) : false,
213
+ isDobMismatch: isSet(object.isDobMismatch) ? globalThis.Boolean(object.isDobMismatch) : false,
214
+ isFatherNameMismatch: isSet(object.isFatherNameMismatch)
215
+ ? globalThis.Boolean(object.isFatherNameMismatch)
216
+ : false,
217
+ aadhaarSeedingStatus: isSet(object.aadhaarSeedingStatus) ? globalThis.String(object.aadhaarSeedingStatus) : "",
218
+ };
219
+ },
220
+ toJSON(message) {
221
+ const obj = {};
222
+ if (message.firstName !== "") {
223
+ obj.firstName = message.firstName;
224
+ }
225
+ if (message.middleName !== "") {
226
+ obj.middleName = message.middleName;
227
+ }
228
+ if (message.lastName !== "") {
229
+ obj.lastName = message.lastName;
230
+ }
231
+ if (message.pan !== "") {
232
+ obj.pan = message.pan;
233
+ }
234
+ if (message.dob !== "") {
235
+ obj.dob = message.dob;
236
+ }
237
+ if (message.isDuplicate !== false) {
238
+ obj.isDuplicate = message.isDuplicate;
239
+ }
240
+ if (message.isNameMismatch !== false) {
241
+ obj.isNameMismatch = message.isNameMismatch;
242
+ }
243
+ if (message.isDobMismatch !== false) {
244
+ obj.isDobMismatch = message.isDobMismatch;
245
+ }
246
+ if (message.isFatherNameMismatch !== false) {
247
+ obj.isFatherNameMismatch = message.isFatherNameMismatch;
248
+ }
249
+ if (message.aadhaarSeedingStatus !== "") {
250
+ obj.aadhaarSeedingStatus = message.aadhaarSeedingStatus;
251
+ }
252
+ return obj;
253
+ },
254
+ create(base) {
255
+ return exports.validatePanResponse.fromPartial(base ?? {});
256
+ },
257
+ fromPartial(object) {
258
+ const message = createBasevalidatePanResponse();
259
+ message.firstName = object.firstName ?? "";
260
+ message.middleName = object.middleName ?? "";
261
+ message.lastName = object.lastName ?? "";
262
+ message.pan = object.pan ?? "";
263
+ message.dob = object.dob ?? "";
264
+ message.isDuplicate = object.isDuplicate ?? false;
265
+ message.isNameMismatch = object.isNameMismatch ?? false;
266
+ message.isDobMismatch = object.isDobMismatch ?? false;
267
+ message.isFatherNameMismatch = object.isFatherNameMismatch ?? false;
268
+ message.aadhaarSeedingStatus = object.aadhaarSeedingStatus ?? "";
269
+ return message;
270
+ },
271
+ };
272
+ function isSet(value) {
273
+ return value !== null && value !== undefined;
274
+ }
package/ts/customers.d.ts CHANGED
@@ -31,6 +31,7 @@ import { stepstaticRequest, stepstaticResponse } from "./customers/stepstatic";
31
31
  import { updateDigiLockerTxnRequest, updateDigiLockerTxnResponse } from "./customers/updatedigilockertxn";
32
32
  import { updateDOBRequest, updateDOBResponse } from "./customers/updatedob";
33
33
  import { updateHypervergeTxnRequest, updateHypervergeTxnResponse } from "./customers/updatehypervergetxn";
34
+ import { validatePanRequest, validatePanResponse } from "./customers/validatepan";
34
35
  import { verifyEmailRequest, verifyEmailResponse } from "./customers/verifyemail";
35
36
  import { verifyMpinRequest, verifyMpinResponse } from "./customers/verifympin";
36
37
  import { verifyOtpReqeust, verifyOtpResponse } from "./customers/verifyotp";
@@ -406,6 +407,15 @@ export declare const customersService: {
406
407
  readonly responseSerialize: (value: updateDOBResponse) => Buffer;
407
408
  readonly responseDeserialize: (value: Buffer) => updateDOBResponse;
408
409
  };
410
+ readonly validatePan: {
411
+ readonly path: "/service.customers/validatePan";
412
+ readonly requestStream: false;
413
+ readonly responseStream: false;
414
+ readonly requestSerialize: (value: validatePanRequest) => Buffer;
415
+ readonly requestDeserialize: (value: Buffer) => validatePanRequest;
416
+ readonly responseSerialize: (value: validatePanResponse) => Buffer;
417
+ readonly responseDeserialize: (value: Buffer) => validatePanResponse;
418
+ };
409
419
  };
410
420
  export interface customersServer extends UntypedServiceImplementation {
411
421
  sendOtp: handleUnaryCall<sendOtpRequest, sendOtpRespone>;
@@ -449,6 +459,7 @@ export interface customersServer extends UntypedServiceImplementation {
449
459
  addAddress: handleUnaryCall<addAddressRequest, addAddressResponse>;
450
460
  getKycWebUrl: handleUnaryCall<getKycWebUrlRequest, getKycWebUrlResponse>;
451
461
  updateDob: handleUnaryCall<updateDOBRequest, updateDOBResponse>;
462
+ validatePan: handleUnaryCall<validatePanRequest, validatePanResponse>;
452
463
  }
453
464
  export interface customersClient extends Client {
454
465
  sendOtp(request: sendOtpRequest, callback: (error: ServiceError | null, response: sendOtpRespone) => void): ClientUnaryCall;
@@ -574,6 +585,9 @@ export interface customersClient extends Client {
574
585
  updateDob(request: updateDOBRequest, callback: (error: ServiceError | null, response: updateDOBResponse) => void): ClientUnaryCall;
575
586
  updateDob(request: updateDOBRequest, metadata: Metadata, callback: (error: ServiceError | null, response: updateDOBResponse) => void): ClientUnaryCall;
576
587
  updateDob(request: updateDOBRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: updateDOBResponse) => void): ClientUnaryCall;
588
+ validatePan(request: validatePanRequest, callback: (error: ServiceError | null, response: validatePanResponse) => void): ClientUnaryCall;
589
+ validatePan(request: validatePanRequest, metadata: Metadata, callback: (error: ServiceError | null, response: validatePanResponse) => void): ClientUnaryCall;
590
+ validatePan(request: validatePanRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: validatePanResponse) => void): ClientUnaryCall;
577
591
  }
578
592
  export declare const customersClient: {
579
593
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): customersClient;
package/ts/customers.js CHANGED
@@ -40,6 +40,7 @@ const stepstatic_1 = require("./customers/stepstatic");
40
40
  const updatedigilockertxn_1 = require("./customers/updatedigilockertxn");
41
41
  const updatedob_1 = require("./customers/updatedob");
42
42
  const updatehypervergetxn_1 = require("./customers/updatehypervergetxn");
43
+ const validatepan_1 = require("./customers/validatepan");
43
44
  const verifyemail_1 = require("./customers/verifyemail");
44
45
  const verifympin_1 = require("./customers/verifympin");
45
46
  const verifyotp_1 = require("./customers/verifyotp");
@@ -414,5 +415,14 @@ exports.customersService = {
414
415
  responseSerialize: (value) => Buffer.from(updatedob_1.updateDOBResponse.encode(value).finish()),
415
416
  responseDeserialize: (value) => updatedob_1.updateDOBResponse.decode(value),
416
417
  },
418
+ validatePan: {
419
+ path: "/service.customers/validatePan",
420
+ requestStream: false,
421
+ responseStream: false,
422
+ requestSerialize: (value) => Buffer.from(validatepan_1.validatePanRequest.encode(value).finish()),
423
+ requestDeserialize: (value) => validatepan_1.validatePanRequest.decode(value),
424
+ responseSerialize: (value) => Buffer.from(validatepan_1.validatePanResponse.encode(value).finish()),
425
+ responseDeserialize: (value) => validatepan_1.validatePanResponse.decode(value),
426
+ },
417
427
  };
418
428
  exports.customersClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.customersService, "service.customers");