@stashfin/grpc 1.2.332 → 1.2.335

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.332",
3
+ "version": "1.2.335",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -0,0 +1,42 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "customers.getcustomerdetailsbymobile";
3
+ export interface getCustomerDetailsRequest {
4
+ mobile: string;
5
+ dob: string;
6
+ }
7
+ export interface getCustomerDetailsResponse {
8
+ customerId: number;
9
+ first_name: string;
10
+ middle_name: string;
11
+ last_name: string;
12
+ mobile: string;
13
+ /** Date of birth in the format YYYY-MM-DD */
14
+ dob: string;
15
+ }
16
+ export declare const getCustomerDetailsRequest: {
17
+ encode(message: getCustomerDetailsRequest, writer?: _m0.Writer): _m0.Writer;
18
+ decode(input: _m0.Reader | Uint8Array, length?: number): getCustomerDetailsRequest;
19
+ fromJSON(object: any): getCustomerDetailsRequest;
20
+ toJSON(message: getCustomerDetailsRequest): unknown;
21
+ create<I extends Exact<DeepPartial<getCustomerDetailsRequest>, I>>(base?: I): getCustomerDetailsRequest;
22
+ fromPartial<I extends Exact<DeepPartial<getCustomerDetailsRequest>, I>>(object: I): getCustomerDetailsRequest;
23
+ };
24
+ export declare const getCustomerDetailsResponse: {
25
+ encode(message: getCustomerDetailsResponse, writer?: _m0.Writer): _m0.Writer;
26
+ decode(input: _m0.Reader | Uint8Array, length?: number): getCustomerDetailsResponse;
27
+ fromJSON(object: any): getCustomerDetailsResponse;
28
+ toJSON(message: getCustomerDetailsResponse): unknown;
29
+ create<I extends Exact<DeepPartial<getCustomerDetailsResponse>, I>>(base?: I): getCustomerDetailsResponse;
30
+ fromPartial<I extends Exact<DeepPartial<getCustomerDetailsResponse>, I>>(object: I): getCustomerDetailsResponse;
31
+ };
32
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
33
+ 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 {} ? {
34
+ [K in keyof T]?: DeepPartial<T[K]>;
35
+ } : Partial<T>;
36
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
37
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
38
+ [K in keyof P]: Exact<P[K], I[K]>;
39
+ } & {
40
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
41
+ };
42
+ export {};
@@ -0,0 +1,219 @@
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.28.2
6
+ // source: customers/getcustomerdetailsbymobile.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.getCustomerDetailsResponse = exports.getCustomerDetailsRequest = 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.getcustomerdetailsbymobile";
16
+ function createBasegetCustomerDetailsRequest() {
17
+ return { mobile: "", dob: "" };
18
+ }
19
+ exports.getCustomerDetailsRequest = {
20
+ encode(message, writer = minimal_1.default.Writer.create()) {
21
+ if (message.mobile !== "") {
22
+ writer.uint32(10).string(message.mobile);
23
+ }
24
+ if (message.dob !== "") {
25
+ writer.uint32(18).string(message.dob);
26
+ }
27
+ return writer;
28
+ },
29
+ decode(input, length) {
30
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
31
+ let end = length === undefined ? reader.len : reader.pos + length;
32
+ const message = createBasegetCustomerDetailsRequest();
33
+ while (reader.pos < end) {
34
+ const tag = reader.uint32();
35
+ switch (tag >>> 3) {
36
+ case 1:
37
+ if (tag !== 10) {
38
+ break;
39
+ }
40
+ message.mobile = reader.string();
41
+ continue;
42
+ case 2:
43
+ if (tag !== 18) {
44
+ break;
45
+ }
46
+ message.dob = reader.string();
47
+ continue;
48
+ }
49
+ if ((tag & 7) === 4 || tag === 0) {
50
+ break;
51
+ }
52
+ reader.skipType(tag & 7);
53
+ }
54
+ return message;
55
+ },
56
+ fromJSON(object) {
57
+ return {
58
+ mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : "",
59
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
60
+ };
61
+ },
62
+ toJSON(message) {
63
+ const obj = {};
64
+ if (message.mobile !== "") {
65
+ obj.mobile = message.mobile;
66
+ }
67
+ if (message.dob !== "") {
68
+ obj.dob = message.dob;
69
+ }
70
+ return obj;
71
+ },
72
+ create(base) {
73
+ return exports.getCustomerDetailsRequest.fromPartial(base ?? {});
74
+ },
75
+ fromPartial(object) {
76
+ const message = createBasegetCustomerDetailsRequest();
77
+ message.mobile = object.mobile ?? "";
78
+ message.dob = object.dob ?? "";
79
+ return message;
80
+ },
81
+ };
82
+ function createBasegetCustomerDetailsResponse() {
83
+ return { customerId: 0, first_name: "", middle_name: "", last_name: "", mobile: "", dob: "" };
84
+ }
85
+ exports.getCustomerDetailsResponse = {
86
+ encode(message, writer = minimal_1.default.Writer.create()) {
87
+ if (message.customerId !== 0) {
88
+ writer.uint32(8).int64(message.customerId);
89
+ }
90
+ if (message.first_name !== "") {
91
+ writer.uint32(18).string(message.first_name);
92
+ }
93
+ if (message.middle_name !== "") {
94
+ writer.uint32(26).string(message.middle_name);
95
+ }
96
+ if (message.last_name !== "") {
97
+ writer.uint32(34).string(message.last_name);
98
+ }
99
+ if (message.mobile !== "") {
100
+ writer.uint32(42).string(message.mobile);
101
+ }
102
+ if (message.dob !== "") {
103
+ writer.uint32(50).string(message.dob);
104
+ }
105
+ return writer;
106
+ },
107
+ decode(input, length) {
108
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
109
+ let end = length === undefined ? reader.len : reader.pos + length;
110
+ const message = createBasegetCustomerDetailsResponse();
111
+ while (reader.pos < end) {
112
+ const tag = reader.uint32();
113
+ switch (tag >>> 3) {
114
+ case 1:
115
+ if (tag !== 8) {
116
+ break;
117
+ }
118
+ message.customerId = longToNumber(reader.int64());
119
+ continue;
120
+ case 2:
121
+ if (tag !== 18) {
122
+ break;
123
+ }
124
+ message.first_name = reader.string();
125
+ continue;
126
+ case 3:
127
+ if (tag !== 26) {
128
+ break;
129
+ }
130
+ message.middle_name = reader.string();
131
+ continue;
132
+ case 4:
133
+ if (tag !== 34) {
134
+ break;
135
+ }
136
+ message.last_name = reader.string();
137
+ continue;
138
+ case 5:
139
+ if (tag !== 42) {
140
+ break;
141
+ }
142
+ message.mobile = reader.string();
143
+ continue;
144
+ case 6:
145
+ if (tag !== 50) {
146
+ break;
147
+ }
148
+ message.dob = reader.string();
149
+ continue;
150
+ }
151
+ if ((tag & 7) === 4 || tag === 0) {
152
+ break;
153
+ }
154
+ reader.skipType(tag & 7);
155
+ }
156
+ return message;
157
+ },
158
+ fromJSON(object) {
159
+ return {
160
+ customerId: isSet(object.customerId) ? globalThis.Number(object.customerId) : 0,
161
+ first_name: isSet(object.first_name) ? globalThis.String(object.first_name) : "",
162
+ middle_name: isSet(object.middle_name) ? globalThis.String(object.middle_name) : "",
163
+ last_name: isSet(object.last_name) ? globalThis.String(object.last_name) : "",
164
+ mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : "",
165
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
166
+ };
167
+ },
168
+ toJSON(message) {
169
+ const obj = {};
170
+ if (message.customerId !== 0) {
171
+ obj.customerId = Math.round(message.customerId);
172
+ }
173
+ if (message.first_name !== "") {
174
+ obj.first_name = message.first_name;
175
+ }
176
+ if (message.middle_name !== "") {
177
+ obj.middle_name = message.middle_name;
178
+ }
179
+ if (message.last_name !== "") {
180
+ obj.last_name = message.last_name;
181
+ }
182
+ if (message.mobile !== "") {
183
+ obj.mobile = message.mobile;
184
+ }
185
+ if (message.dob !== "") {
186
+ obj.dob = message.dob;
187
+ }
188
+ return obj;
189
+ },
190
+ create(base) {
191
+ return exports.getCustomerDetailsResponse.fromPartial(base ?? {});
192
+ },
193
+ fromPartial(object) {
194
+ const message = createBasegetCustomerDetailsResponse();
195
+ message.customerId = object.customerId ?? 0;
196
+ message.first_name = object.first_name ?? "";
197
+ message.middle_name = object.middle_name ?? "";
198
+ message.last_name = object.last_name ?? "";
199
+ message.mobile = object.mobile ?? "";
200
+ message.dob = object.dob ?? "";
201
+ return message;
202
+ },
203
+ };
204
+ function longToNumber(long) {
205
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
206
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
207
+ }
208
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
209
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
210
+ }
211
+ return long.toNumber();
212
+ }
213
+ if (minimal_1.default.util.Long !== long_1.default) {
214
+ minimal_1.default.util.Long = long_1.default;
215
+ minimal_1.default.configure();
216
+ }
217
+ function isSet(value) {
218
+ return value !== null && value !== undefined;
219
+ }
package/ts/customers.d.ts CHANGED
@@ -46,6 +46,7 @@ import { getBasicInfoRequest, getBasicInfoResponse } from "./customers/getbasici
46
46
  import { getCitiesRequest, getCitiesResponse } from "./customers/getcities";
47
47
  import { getCompanyAccDetailsRequest, getCompanyAccDetailsResponse } from "./customers/getcompanyaccdetails";
48
48
  import { getCustomerByIdRequest, getCustomerByIdResponse } from "./customers/getcustomerbyid";
49
+ import { getCustomerDetailsRequest, getCustomerDetailsResponse } from "./customers/getcustomerdetailsbymobile";
49
50
  import { getDashboardRequest, getDashboardResponse } from "./customers/getdashboard";
50
51
  import { getDashboardMainCardRequest, getDashboardMainCardResponse } from "./customers/getdashboardmaincard";
51
52
  import { getDocumentsRequest, getDocumentsResponse } from "./customers/getdocuments";
@@ -970,6 +971,15 @@ export declare const customersService: {
970
971
  readonly responseSerialize: (value: updateCbStandAloneJourneyResponse) => Buffer;
971
972
  readonly responseDeserialize: (value: Buffer) => updateCbStandAloneJourneyResponse;
972
973
  };
974
+ readonly getCustomerDetailsbyMobile: {
975
+ readonly path: "/service.customers/getCustomerDetailsbyMobile";
976
+ readonly requestStream: false;
977
+ readonly responseStream: false;
978
+ readonly requestSerialize: (value: getCustomerDetailsRequest) => Buffer;
979
+ readonly requestDeserialize: (value: Buffer) => getCustomerDetailsRequest;
980
+ readonly responseSerialize: (value: getCustomerDetailsResponse) => Buffer;
981
+ readonly responseDeserialize: (value: Buffer) => getCustomerDetailsResponse;
982
+ };
973
983
  };
974
984
  export interface customersServer extends UntypedServiceImplementation {
975
985
  sendOtp: handleUnaryCall<sendOtpRequest, sendOtpRespone>;
@@ -1069,6 +1079,7 @@ export interface customersServer extends UntypedServiceImplementation {
1069
1079
  deleteDocument: handleUnaryCall<deleteDocumentRequest, deleteDocumentResponse>;
1070
1080
  syncDecisionEngine: handleUnaryCall<syncDecisionEngineRequest, syncDecisionEngineResponse>;
1071
1081
  updateCbStandAloneJourney: handleUnaryCall<updateCbStandAloneJourneyRequest, updateCbStandAloneJourneyResponse>;
1082
+ getCustomerDetailsbyMobile: handleUnaryCall<getCustomerDetailsRequest, getCustomerDetailsResponse>;
1072
1083
  }
1073
1084
  export interface customersClient extends Client {
1074
1085
  sendOtp(request: sendOtpRequest, callback: (error: ServiceError | null, response: sendOtpRespone) => void): ClientUnaryCall;
@@ -1362,6 +1373,9 @@ export interface customersClient extends Client {
1362
1373
  updateCbStandAloneJourney(request: updateCbStandAloneJourneyRequest, callback: (error: ServiceError | null, response: updateCbStandAloneJourneyResponse) => void): ClientUnaryCall;
1363
1374
  updateCbStandAloneJourney(request: updateCbStandAloneJourneyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: updateCbStandAloneJourneyResponse) => void): ClientUnaryCall;
1364
1375
  updateCbStandAloneJourney(request: updateCbStandAloneJourneyRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: updateCbStandAloneJourneyResponse) => void): ClientUnaryCall;
1376
+ getCustomerDetailsbyMobile(request: getCustomerDetailsRequest, callback: (error: ServiceError | null, response: getCustomerDetailsResponse) => void): ClientUnaryCall;
1377
+ getCustomerDetailsbyMobile(request: getCustomerDetailsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getCustomerDetailsResponse) => void): ClientUnaryCall;
1378
+ getCustomerDetailsbyMobile(request: getCustomerDetailsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getCustomerDetailsResponse) => void): ClientUnaryCall;
1365
1379
  }
1366
1380
  export declare const customersClient: {
1367
1381
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): customersClient;
package/ts/customers.js CHANGED
@@ -55,6 +55,7 @@ const getbasicinfo_1 = require("./customers/getbasicinfo");
55
55
  const getcities_1 = require("./customers/getcities");
56
56
  const getcompanyaccdetails_1 = require("./customers/getcompanyaccdetails");
57
57
  const getcustomerbyid_1 = require("./customers/getcustomerbyid");
58
+ const getcustomerdetailsbymobile_1 = require("./customers/getcustomerdetailsbymobile");
58
59
  const getdashboard_1 = require("./customers/getdashboard");
59
60
  const getdashboardmaincard_1 = require("./customers/getdashboardmaincard");
60
61
  const getdocuments_1 = require("./customers/getdocuments");
@@ -978,5 +979,14 @@ exports.customersService = {
978
979
  responseSerialize: (value) => Buffer.from(updatecbstandalonejourney_1.updateCbStandAloneJourneyResponse.encode(value).finish()),
979
980
  responseDeserialize: (value) => updatecbstandalonejourney_1.updateCbStandAloneJourneyResponse.decode(value),
980
981
  },
982
+ getCustomerDetailsbyMobile: {
983
+ path: "/service.customers/getCustomerDetailsbyMobile",
984
+ requestStream: false,
985
+ responseStream: false,
986
+ requestSerialize: (value) => Buffer.from(getcustomerdetailsbymobile_1.getCustomerDetailsRequest.encode(value).finish()),
987
+ requestDeserialize: (value) => getcustomerdetailsbymobile_1.getCustomerDetailsRequest.decode(value),
988
+ responseSerialize: (value) => Buffer.from(getcustomerdetailsbymobile_1.getCustomerDetailsResponse.encode(value).finish()),
989
+ responseDeserialize: (value) => getcustomerdetailsbymobile_1.getCustomerDetailsResponse.decode(value),
990
+ },
981
991
  };
982
992
  exports.customersClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.customersService, "service.customers");
@@ -5,8 +5,9 @@ export interface request {
5
5
  client_id: string;
6
6
  external_order_id: string;
7
7
  amount: number;
8
- source: request_bank_details[];
9
- destination: request_bank_details[];
8
+ transfer_source: string;
9
+ transfer_account_id: string;
10
+ customer_bank_details: request_bank_details[];
10
11
  loan_id?: string | undefined;
11
12
  mode: string;
12
13
  }
@@ -18,8 +18,9 @@ function createBaserequest() {
18
18
  client_id: "",
19
19
  external_order_id: "",
20
20
  amount: 0,
21
- source: [],
22
- destination: [],
21
+ transfer_source: "",
22
+ transfer_account_id: "",
23
+ customer_bank_details: [],
23
24
  loan_id: undefined,
24
25
  mode: "",
25
26
  };
@@ -38,17 +39,20 @@ exports.request = {
38
39
  if (message.amount !== 0) {
39
40
  writer.uint32(33).double(message.amount);
40
41
  }
41
- for (const v of message.source) {
42
- exports.request_bank_details.encode(v, writer.uint32(42).fork()).ldelim();
42
+ if (message.transfer_source !== "") {
43
+ writer.uint32(42).string(message.transfer_source);
43
44
  }
44
- for (const v of message.destination) {
45
- exports.request_bank_details.encode(v, writer.uint32(50).fork()).ldelim();
45
+ if (message.transfer_account_id !== "") {
46
+ writer.uint32(50).string(message.transfer_account_id);
47
+ }
48
+ for (const v of message.customer_bank_details) {
49
+ exports.request_bank_details.encode(v, writer.uint32(58).fork()).ldelim();
46
50
  }
47
51
  if (message.loan_id !== undefined) {
48
- writer.uint32(58).string(message.loan_id);
52
+ writer.uint32(66).string(message.loan_id);
49
53
  }
50
54
  if (message.mode !== "") {
51
- writer.uint32(66).string(message.mode);
55
+ writer.uint32(74).string(message.mode);
52
56
  }
53
57
  return writer;
54
58
  },
@@ -87,24 +91,30 @@ exports.request = {
87
91
  if (tag !== 42) {
88
92
  break;
89
93
  }
90
- message.source.push(exports.request_bank_details.decode(reader, reader.uint32()));
94
+ message.transfer_source = reader.string();
91
95
  continue;
92
96
  case 6:
93
97
  if (tag !== 50) {
94
98
  break;
95
99
  }
96
- message.destination.push(exports.request_bank_details.decode(reader, reader.uint32()));
100
+ message.transfer_account_id = reader.string();
97
101
  continue;
98
102
  case 7:
99
103
  if (tag !== 58) {
100
104
  break;
101
105
  }
102
- message.loan_id = reader.string();
106
+ message.customer_bank_details.push(exports.request_bank_details.decode(reader, reader.uint32()));
103
107
  continue;
104
108
  case 8:
105
109
  if (tag !== 66) {
106
110
  break;
107
111
  }
112
+ message.loan_id = reader.string();
113
+ continue;
114
+ case 9:
115
+ if (tag !== 74) {
116
+ break;
117
+ }
108
118
  message.mode = reader.string();
109
119
  continue;
110
120
  }
@@ -121,11 +131,10 @@ exports.request = {
121
131
  client_id: isSet(object.client_id) ? globalThis.String(object.client_id) : "",
122
132
  external_order_id: isSet(object.external_order_id) ? globalThis.String(object.external_order_id) : "",
123
133
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
124
- source: globalThis.Array.isArray(object?.source)
125
- ? object.source.map((e) => exports.request_bank_details.fromJSON(e))
126
- : [],
127
- destination: globalThis.Array.isArray(object?.destination)
128
- ? object.destination.map((e) => exports.request_bank_details.fromJSON(e))
134
+ transfer_source: isSet(object.transfer_source) ? globalThis.String(object.transfer_source) : "",
135
+ transfer_account_id: isSet(object.transfer_account_id) ? globalThis.String(object.transfer_account_id) : "",
136
+ customer_bank_details: globalThis.Array.isArray(object?.customer_bank_details)
137
+ ? object.customer_bank_details.map((e) => exports.request_bank_details.fromJSON(e))
129
138
  : [],
130
139
  loan_id: isSet(object.loan_id) ? globalThis.String(object.loan_id) : undefined,
131
140
  mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
@@ -145,11 +154,14 @@ exports.request = {
145
154
  if (message.amount !== 0) {
146
155
  obj.amount = message.amount;
147
156
  }
148
- if (message.source?.length) {
149
- obj.source = message.source.map((e) => exports.request_bank_details.toJSON(e));
157
+ if (message.transfer_source !== "") {
158
+ obj.transfer_source = message.transfer_source;
159
+ }
160
+ if (message.transfer_account_id !== "") {
161
+ obj.transfer_account_id = message.transfer_account_id;
150
162
  }
151
- if (message.destination?.length) {
152
- obj.destination = message.destination.map((e) => exports.request_bank_details.toJSON(e));
163
+ if (message.customer_bank_details?.length) {
164
+ obj.customer_bank_details = message.customer_bank_details.map((e) => exports.request_bank_details.toJSON(e));
153
165
  }
154
166
  if (message.loan_id !== undefined) {
155
167
  obj.loan_id = message.loan_id;
@@ -168,8 +180,9 @@ exports.request = {
168
180
  message.client_id = object.client_id ?? "";
169
181
  message.external_order_id = object.external_order_id ?? "";
170
182
  message.amount = object.amount ?? 0;
171
- message.source = object.source?.map((e) => exports.request_bank_details.fromPartial(e)) || [];
172
- message.destination = object.destination?.map((e) => exports.request_bank_details.fromPartial(e)) || [];
183
+ message.transfer_source = object.transfer_source ?? "";
184
+ message.transfer_account_id = object.transfer_account_id ?? "";
185
+ message.customer_bank_details = object.customer_bank_details?.map((e) => exports.request_bank_details.fromPartial(e)) || [];
173
186
  message.loan_id = object.loan_id ?? undefined;
174
187
  message.mode = object.mode ?? "";
175
188
  return message;