@stashfin/grpc 1.2.547 → 1.2.549

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.547",
3
+ "version": "1.2.549",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -0,0 +1,43 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "customers.getcustomer";
3
+ export interface getCustomerRequest {
4
+ customer_id: number;
5
+ }
6
+ export interface getCustomerResponse {
7
+ first_name: string;
8
+ middle_name?: string | undefined;
9
+ last_name?: string | undefined;
10
+ pan: string;
11
+ dob: string;
12
+ email?: string | undefined;
13
+ phone: string;
14
+ is_otp_done?: boolean | undefined;
15
+ is_email_verify_done?: boolean | undefined;
16
+ }
17
+ export declare const getCustomerRequest: {
18
+ encode(message: getCustomerRequest, writer?: _m0.Writer): _m0.Writer;
19
+ decode(input: _m0.Reader | Uint8Array, length?: number): getCustomerRequest;
20
+ fromJSON(object: any): getCustomerRequest;
21
+ toJSON(message: getCustomerRequest): unknown;
22
+ create<I extends Exact<DeepPartial<getCustomerRequest>, I>>(base?: I): getCustomerRequest;
23
+ fromPartial<I extends Exact<DeepPartial<getCustomerRequest>, I>>(object: I): getCustomerRequest;
24
+ };
25
+ export declare const getCustomerResponse: {
26
+ encode(message: getCustomerResponse, writer?: _m0.Writer): _m0.Writer;
27
+ decode(input: _m0.Reader | Uint8Array, length?: number): getCustomerResponse;
28
+ fromJSON(object: any): getCustomerResponse;
29
+ toJSON(message: getCustomerResponse): unknown;
30
+ create<I extends Exact<DeepPartial<getCustomerResponse>, I>>(base?: I): getCustomerResponse;
31
+ fromPartial<I extends Exact<DeepPartial<getCustomerResponse>, I>>(object: I): getCustomerResponse;
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,257 @@
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: customers/getcustomer.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.getCustomerResponse = exports.getCustomerRequest = 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.getcustomer";
16
+ function createBasegetCustomerRequest() {
17
+ return { customer_id: 0 };
18
+ }
19
+ exports.getCustomerRequest = {
20
+ encode(message, writer = minimal_1.default.Writer.create()) {
21
+ if (message.customer_id !== 0) {
22
+ writer.uint32(8).int64(message.customer_id);
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 = createBasegetCustomerRequest();
30
+ while (reader.pos < end) {
31
+ const tag = reader.uint32();
32
+ switch (tag >>> 3) {
33
+ case 1:
34
+ if (tag !== 8) {
35
+ break;
36
+ }
37
+ message.customer_id = longToNumber(reader.int64());
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 { customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0 };
49
+ },
50
+ toJSON(message) {
51
+ const obj = {};
52
+ if (message.customer_id !== 0) {
53
+ obj.customer_id = Math.round(message.customer_id);
54
+ }
55
+ return obj;
56
+ },
57
+ create(base) {
58
+ return exports.getCustomerRequest.fromPartial(base ?? {});
59
+ },
60
+ fromPartial(object) {
61
+ const message = createBasegetCustomerRequest();
62
+ message.customer_id = object.customer_id ?? 0;
63
+ return message;
64
+ },
65
+ };
66
+ function createBasegetCustomerResponse() {
67
+ return {
68
+ first_name: "",
69
+ middle_name: undefined,
70
+ last_name: undefined,
71
+ pan: "",
72
+ dob: "",
73
+ email: undefined,
74
+ phone: "",
75
+ is_otp_done: undefined,
76
+ is_email_verify_done: undefined,
77
+ };
78
+ }
79
+ exports.getCustomerResponse = {
80
+ encode(message, writer = minimal_1.default.Writer.create()) {
81
+ if (message.first_name !== "") {
82
+ writer.uint32(10).string(message.first_name);
83
+ }
84
+ if (message.middle_name !== undefined) {
85
+ writer.uint32(18).string(message.middle_name);
86
+ }
87
+ if (message.last_name !== undefined) {
88
+ writer.uint32(26).string(message.last_name);
89
+ }
90
+ if (message.pan !== "") {
91
+ writer.uint32(34).string(message.pan);
92
+ }
93
+ if (message.dob !== "") {
94
+ writer.uint32(42).string(message.dob);
95
+ }
96
+ if (message.email !== undefined) {
97
+ writer.uint32(50).string(message.email);
98
+ }
99
+ if (message.phone !== "") {
100
+ writer.uint32(58).string(message.phone);
101
+ }
102
+ if (message.is_otp_done !== undefined) {
103
+ writer.uint32(64).bool(message.is_otp_done);
104
+ }
105
+ if (message.is_email_verify_done !== undefined) {
106
+ writer.uint32(72).bool(message.is_email_verify_done);
107
+ }
108
+ return writer;
109
+ },
110
+ decode(input, length) {
111
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
112
+ let end = length === undefined ? reader.len : reader.pos + length;
113
+ const message = createBasegetCustomerResponse();
114
+ while (reader.pos < end) {
115
+ const tag = reader.uint32();
116
+ switch (tag >>> 3) {
117
+ case 1:
118
+ if (tag !== 10) {
119
+ break;
120
+ }
121
+ message.first_name = reader.string();
122
+ continue;
123
+ case 2:
124
+ if (tag !== 18) {
125
+ break;
126
+ }
127
+ message.middle_name = reader.string();
128
+ continue;
129
+ case 3:
130
+ if (tag !== 26) {
131
+ break;
132
+ }
133
+ message.last_name = reader.string();
134
+ continue;
135
+ case 4:
136
+ if (tag !== 34) {
137
+ break;
138
+ }
139
+ message.pan = reader.string();
140
+ continue;
141
+ case 5:
142
+ if (tag !== 42) {
143
+ break;
144
+ }
145
+ message.dob = reader.string();
146
+ continue;
147
+ case 6:
148
+ if (tag !== 50) {
149
+ break;
150
+ }
151
+ message.email = reader.string();
152
+ continue;
153
+ case 7:
154
+ if (tag !== 58) {
155
+ break;
156
+ }
157
+ message.phone = reader.string();
158
+ continue;
159
+ case 8:
160
+ if (tag !== 64) {
161
+ break;
162
+ }
163
+ message.is_otp_done = reader.bool();
164
+ continue;
165
+ case 9:
166
+ if (tag !== 72) {
167
+ break;
168
+ }
169
+ message.is_email_verify_done = reader.bool();
170
+ continue;
171
+ }
172
+ if ((tag & 7) === 4 || tag === 0) {
173
+ break;
174
+ }
175
+ reader.skipType(tag & 7);
176
+ }
177
+ return message;
178
+ },
179
+ fromJSON(object) {
180
+ return {
181
+ first_name: isSet(object.first_name) ? globalThis.String(object.first_name) : "",
182
+ middle_name: isSet(object.middle_name) ? globalThis.String(object.middle_name) : undefined,
183
+ last_name: isSet(object.last_name) ? globalThis.String(object.last_name) : undefined,
184
+ pan: isSet(object.pan) ? globalThis.String(object.pan) : "",
185
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
186
+ email: isSet(object.email) ? globalThis.String(object.email) : undefined,
187
+ phone: isSet(object.phone) ? globalThis.String(object.phone) : "",
188
+ is_otp_done: isSet(object.is_otp_done) ? globalThis.Boolean(object.is_otp_done) : undefined,
189
+ is_email_verify_done: isSet(object.is_email_verify_done)
190
+ ? globalThis.Boolean(object.is_email_verify_done)
191
+ : undefined,
192
+ };
193
+ },
194
+ toJSON(message) {
195
+ const obj = {};
196
+ if (message.first_name !== "") {
197
+ obj.first_name = message.first_name;
198
+ }
199
+ if (message.middle_name !== undefined) {
200
+ obj.middle_name = message.middle_name;
201
+ }
202
+ if (message.last_name !== undefined) {
203
+ obj.last_name = message.last_name;
204
+ }
205
+ if (message.pan !== "") {
206
+ obj.pan = message.pan;
207
+ }
208
+ if (message.dob !== "") {
209
+ obj.dob = message.dob;
210
+ }
211
+ if (message.email !== undefined) {
212
+ obj.email = message.email;
213
+ }
214
+ if (message.phone !== "") {
215
+ obj.phone = message.phone;
216
+ }
217
+ if (message.is_otp_done !== undefined) {
218
+ obj.is_otp_done = message.is_otp_done;
219
+ }
220
+ if (message.is_email_verify_done !== undefined) {
221
+ obj.is_email_verify_done = message.is_email_verify_done;
222
+ }
223
+ return obj;
224
+ },
225
+ create(base) {
226
+ return exports.getCustomerResponse.fromPartial(base ?? {});
227
+ },
228
+ fromPartial(object) {
229
+ const message = createBasegetCustomerResponse();
230
+ message.first_name = object.first_name ?? "";
231
+ message.middle_name = object.middle_name ?? undefined;
232
+ message.last_name = object.last_name ?? undefined;
233
+ message.pan = object.pan ?? "";
234
+ message.dob = object.dob ?? "";
235
+ message.email = object.email ?? undefined;
236
+ message.phone = object.phone ?? "";
237
+ message.is_otp_done = object.is_otp_done ?? undefined;
238
+ message.is_email_verify_done = object.is_email_verify_done ?? undefined;
239
+ return message;
240
+ },
241
+ };
242
+ function longToNumber(long) {
243
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
244
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
245
+ }
246
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
247
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
248
+ }
249
+ return long.toNumber();
250
+ }
251
+ if (minimal_1.default.util.Long !== long_1.default) {
252
+ minimal_1.default.util.Long = long_1.default;
253
+ minimal_1.default.configure();
254
+ }
255
+ function isSet(value) {
256
+ return value !== null && value !== undefined;
257
+ }
package/ts/customers.d.ts CHANGED
@@ -53,6 +53,7 @@ import { getBasicInfoRequest, getBasicInfoResponse } from "./customers/getbasici
53
53
  import { getCitiesRequest, getCitiesResponse } from "./customers/getcities";
54
54
  import { getCliStatusRequest, getCliStatusResponse } from "./customers/getclistatus";
55
55
  import { getCompanyAccDetailsRequest, getCompanyAccDetailsResponse } from "./customers/getcompanyaccdetails";
56
+ import { getCustomerRequest as getCustomerRequest1, getCustomerResponse as getCustomerResponse2 } from "./customers/getcustomer";
56
57
  import { getCustomerByIdRequest, getCustomerByIdResponse } from "./customers/getcustomerbyid";
57
58
  import { getCustomerDetailsRequest, getCustomerDetailsResponse } from "./customers/getcustomerdetailsbymobile";
58
59
  import { getDashboardRequest, getDashboardResponse } from "./customers/getdashboard";
@@ -1179,6 +1180,15 @@ export declare const customersService: {
1179
1180
  readonly responseSerialize: (value: getMessengerModeResponse) => Buffer;
1180
1181
  readonly responseDeserialize: (value: Buffer) => getMessengerModeResponse;
1181
1182
  };
1183
+ readonly getCustomer: {
1184
+ readonly path: "/service.customers/getCustomer";
1185
+ readonly requestStream: false;
1186
+ readonly responseStream: false;
1187
+ readonly requestSerialize: (value: getCustomerRequest1) => Buffer;
1188
+ readonly requestDeserialize: (value: Buffer) => getCustomerRequest1;
1189
+ readonly responseSerialize: (value: getCustomerResponse2) => Buffer;
1190
+ readonly responseDeserialize: (value: Buffer) => getCustomerResponse2;
1191
+ };
1182
1192
  };
1183
1193
  export interface customersServer extends UntypedServiceImplementation {
1184
1194
  sendOtp: handleUnaryCall<sendOtpRequest, sendOtpRespone>;
@@ -1299,6 +1309,7 @@ export interface customersServer extends UntypedServiceImplementation {
1299
1309
  applyLamf: handleUnaryCall<applyLamfRequest, applyLamfResponse>;
1300
1310
  updateSanctionAmount: handleUnaryCall<updateSanctionAmountRequest, updateSanctionAmountResponse>;
1301
1311
  getMessengerMode: handleUnaryCall<getMessengerModeRequest, getMessengerModeResponse>;
1312
+ getCustomer: handleUnaryCall<getCustomerRequest1, getCustomerResponse2>;
1302
1313
  }
1303
1314
  export interface customersClient extends Client {
1304
1315
  sendOtp(request: sendOtpRequest, callback: (error: ServiceError | null, response: sendOtpRespone) => void): ClientUnaryCall;
@@ -1655,6 +1666,9 @@ export interface customersClient extends Client {
1655
1666
  getMessengerMode(request: getMessengerModeRequest, callback: (error: ServiceError | null, response: getMessengerModeResponse) => void): ClientUnaryCall;
1656
1667
  getMessengerMode(request: getMessengerModeRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getMessengerModeResponse) => void): ClientUnaryCall;
1657
1668
  getMessengerMode(request: getMessengerModeRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getMessengerModeResponse) => void): ClientUnaryCall;
1669
+ getCustomer(request: getCustomerRequest1, callback: (error: ServiceError | null, response: getCustomerResponse2) => void): ClientUnaryCall;
1670
+ getCustomer(request: getCustomerRequest1, metadata: Metadata, callback: (error: ServiceError | null, response: getCustomerResponse2) => void): ClientUnaryCall;
1671
+ getCustomer(request: getCustomerRequest1, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getCustomerResponse2) => void): ClientUnaryCall;
1658
1672
  }
1659
1673
  export declare const customersClient: {
1660
1674
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): customersClient;
package/ts/customers.js CHANGED
@@ -62,6 +62,7 @@ const getbasicinfo_1 = require("./customers/getbasicinfo");
62
62
  const getcities_1 = require("./customers/getcities");
63
63
  const getclistatus_1 = require("./customers/getclistatus");
64
64
  const getcompanyaccdetails_1 = require("./customers/getcompanyaccdetails");
65
+ const getcustomer_1 = require("./customers/getcustomer");
65
66
  const getcustomerbyid_1 = require("./customers/getcustomerbyid");
66
67
  const getcustomerdetailsbymobile_1 = require("./customers/getcustomerdetailsbymobile");
67
68
  const getdashboard_1 = require("./customers/getdashboard");
@@ -1187,5 +1188,14 @@ exports.customersService = {
1187
1188
  responseSerialize: (value) => Buffer.from(getmessengermode_1.getMessengerModeResponse.encode(value).finish()),
1188
1189
  responseDeserialize: (value) => getmessengermode_1.getMessengerModeResponse.decode(value),
1189
1190
  },
1191
+ getCustomer: {
1192
+ path: "/service.customers/getCustomer",
1193
+ requestStream: false,
1194
+ responseStream: false,
1195
+ requestSerialize: (value) => Buffer.from(getcustomer_1.getCustomerRequest.encode(value).finish()),
1196
+ requestDeserialize: (value) => getcustomer_1.getCustomerRequest.decode(value),
1197
+ responseSerialize: (value) => Buffer.from(getcustomer_1.getCustomerResponse.encode(value).finish()),
1198
+ responseDeserialize: (value) => getcustomer_1.getCustomerResponse.decode(value),
1199
+ },
1190
1200
  };
1191
1201
  exports.customersClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.customersService, "service.customers");
@@ -2,6 +2,7 @@ import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "upi.getAllMandates";
3
3
  export interface getAllMandatesRequest {
4
4
  status?: string | undefined;
5
+ type?: string | undefined;
5
6
  }
6
7
  export interface getAllMandatesResponse {
7
8
  status: string;
@@ -13,13 +13,16 @@ exports.Data = exports.MandateData = exports.getAllMandatesResponse = exports.ge
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "upi.getAllMandates";
15
15
  function createBasegetAllMandatesRequest() {
16
- return { status: undefined };
16
+ return { status: undefined, type: undefined };
17
17
  }
18
18
  exports.getAllMandatesRequest = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
20
20
  if (message.status !== undefined) {
21
21
  writer.uint32(10).string(message.status);
22
22
  }
23
+ if (message.type !== undefined) {
24
+ writer.uint32(18).string(message.type);
25
+ }
23
26
  return writer;
24
27
  },
25
28
  decode(input, length) {
@@ -35,6 +38,12 @@ exports.getAllMandatesRequest = {
35
38
  }
36
39
  message.status = reader.string();
37
40
  continue;
41
+ case 2:
42
+ if (tag !== 18) {
43
+ break;
44
+ }
45
+ message.type = reader.string();
46
+ continue;
38
47
  }
39
48
  if ((tag & 7) === 4 || tag === 0) {
40
49
  break;
@@ -44,13 +53,19 @@ exports.getAllMandatesRequest = {
44
53
  return message;
45
54
  },
46
55
  fromJSON(object) {
47
- return { status: isSet(object.status) ? globalThis.String(object.status) : undefined };
56
+ return {
57
+ status: isSet(object.status) ? globalThis.String(object.status) : undefined,
58
+ type: isSet(object.type) ? globalThis.String(object.type) : undefined,
59
+ };
48
60
  },
49
61
  toJSON(message) {
50
62
  const obj = {};
51
63
  if (message.status !== undefined) {
52
64
  obj.status = message.status;
53
65
  }
66
+ if (message.type !== undefined) {
67
+ obj.type = message.type;
68
+ }
54
69
  return obj;
55
70
  },
56
71
  create(base) {
@@ -59,6 +74,7 @@ exports.getAllMandatesRequest = {
59
74
  fromPartial(object) {
60
75
  const message = createBasegetAllMandatesRequest();
61
76
  message.status = object.status ?? undefined;
77
+ message.type = object.type ?? undefined;
62
78
  return message;
63
79
  },
64
80
  };