@stashfin/grpc 1.2.538 → 1.2.540

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.538",
3
+ "version": "1.2.540",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -0,0 +1,37 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "upi.declineMandate";
3
+ export interface declineMandateRequest {
4
+ txn_id: string;
5
+ umn: string;
6
+ }
7
+ export interface declineMandateResponse {
8
+ status: string;
9
+ message: string;
10
+ }
11
+ export declare const declineMandateRequest: {
12
+ encode(message: declineMandateRequest, writer?: _m0.Writer): _m0.Writer;
13
+ decode(input: _m0.Reader | Uint8Array, length?: number): declineMandateRequest;
14
+ fromJSON(object: any): declineMandateRequest;
15
+ toJSON(message: declineMandateRequest): unknown;
16
+ create<I extends Exact<DeepPartial<declineMandateRequest>, I>>(base?: I): declineMandateRequest;
17
+ fromPartial<I extends Exact<DeepPartial<declineMandateRequest>, I>>(object: I): declineMandateRequest;
18
+ };
19
+ export declare const declineMandateResponse: {
20
+ encode(message: declineMandateResponse, writer?: _m0.Writer): _m0.Writer;
21
+ decode(input: _m0.Reader | Uint8Array, length?: number): declineMandateResponse;
22
+ fromJSON(object: any): declineMandateResponse;
23
+ toJSON(message: declineMandateResponse): unknown;
24
+ create<I extends Exact<DeepPartial<declineMandateResponse>, I>>(base?: I): declineMandateResponse;
25
+ fromPartial<I extends Exact<DeepPartial<declineMandateResponse>, I>>(object: I): declineMandateResponse;
26
+ };
27
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
28
+ 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
+ [K in keyof T]?: DeepPartial<T[K]>;
30
+ } : Partial<T>;
31
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
32
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
33
+ [K in keyof P]: Exact<P[K], I[K]>;
34
+ } & {
35
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
36
+ };
37
+ export {};
@@ -0,0 +1,149 @@
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.2
6
+ // source: upi/declinemandate.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.declineMandateResponse = exports.declineMandateRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "upi.declineMandate";
15
+ function createBasedeclineMandateRequest() {
16
+ return { txn_id: "", umn: "" };
17
+ }
18
+ exports.declineMandateRequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.txn_id !== "") {
21
+ writer.uint32(10).string(message.txn_id);
22
+ }
23
+ if (message.umn !== "") {
24
+ writer.uint32(18).string(message.umn);
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 = createBasedeclineMandateRequest();
32
+ while (reader.pos < end) {
33
+ const tag = reader.uint32();
34
+ switch (tag >>> 3) {
35
+ case 1:
36
+ if (tag !== 10) {
37
+ break;
38
+ }
39
+ message.txn_id = reader.string();
40
+ continue;
41
+ case 2:
42
+ if (tag !== 18) {
43
+ break;
44
+ }
45
+ message.umn = 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
+ txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "",
58
+ umn: isSet(object.umn) ? globalThis.String(object.umn) : "",
59
+ };
60
+ },
61
+ toJSON(message) {
62
+ const obj = {};
63
+ if (message.txn_id !== "") {
64
+ obj.txn_id = message.txn_id;
65
+ }
66
+ if (message.umn !== "") {
67
+ obj.umn = message.umn;
68
+ }
69
+ return obj;
70
+ },
71
+ create(base) {
72
+ return exports.declineMandateRequest.fromPartial(base ?? {});
73
+ },
74
+ fromPartial(object) {
75
+ const message = createBasedeclineMandateRequest();
76
+ message.txn_id = object.txn_id ?? "";
77
+ message.umn = object.umn ?? "";
78
+ return message;
79
+ },
80
+ };
81
+ function createBasedeclineMandateResponse() {
82
+ return { status: "", message: "" };
83
+ }
84
+ exports.declineMandateResponse = {
85
+ encode(message, writer = minimal_1.default.Writer.create()) {
86
+ if (message.status !== "") {
87
+ writer.uint32(10).string(message.status);
88
+ }
89
+ if (message.message !== "") {
90
+ writer.uint32(18).string(message.message);
91
+ }
92
+ return writer;
93
+ },
94
+ decode(input, length) {
95
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
96
+ let end = length === undefined ? reader.len : reader.pos + length;
97
+ const message = createBasedeclineMandateResponse();
98
+ while (reader.pos < end) {
99
+ const tag = reader.uint32();
100
+ switch (tag >>> 3) {
101
+ case 1:
102
+ if (tag !== 10) {
103
+ break;
104
+ }
105
+ message.status = reader.string();
106
+ continue;
107
+ case 2:
108
+ if (tag !== 18) {
109
+ break;
110
+ }
111
+ message.message = reader.string();
112
+ continue;
113
+ }
114
+ if ((tag & 7) === 4 || tag === 0) {
115
+ break;
116
+ }
117
+ reader.skipType(tag & 7);
118
+ }
119
+ return message;
120
+ },
121
+ fromJSON(object) {
122
+ return {
123
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
124
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
125
+ };
126
+ },
127
+ toJSON(message) {
128
+ const obj = {};
129
+ if (message.status !== "") {
130
+ obj.status = message.status;
131
+ }
132
+ if (message.message !== "") {
133
+ obj.message = message.message;
134
+ }
135
+ return obj;
136
+ },
137
+ create(base) {
138
+ return exports.declineMandateResponse.fromPartial(base ?? {});
139
+ },
140
+ fromPartial(object) {
141
+ const message = createBasedeclineMandateResponse();
142
+ message.status = object.status ?? "";
143
+ message.message = object.message ?? "";
144
+ return message;
145
+ },
146
+ };
147
+ function isSet(value) {
148
+ return value !== null && value !== undefined;
149
+ }
@@ -25,6 +25,9 @@ export interface Data {
25
25
  customer_id?: number | undefined;
26
26
  /** Virtual Payment Address */
27
27
  vpa?: string | undefined;
28
+ total_debit?: number | undefined;
29
+ successful_debit?: number | undefined;
30
+ unsuccessful_debit?: number | undefined;
28
31
  }
29
32
  export interface PayeeDetails {
30
33
  Name?: string | undefined;
@@ -174,6 +174,9 @@ function createBaseData() {
174
174
  expiry: undefined,
175
175
  customer_id: undefined,
176
176
  vpa: undefined,
177
+ total_debit: undefined,
178
+ successful_debit: undefined,
179
+ unsuccessful_debit: undefined,
177
180
  };
178
181
  }
179
182
  exports.Data = {
@@ -220,6 +223,15 @@ exports.Data = {
220
223
  if (message.vpa !== undefined) {
221
224
  writer.uint32(114).string(message.vpa);
222
225
  }
226
+ if (message.total_debit !== undefined) {
227
+ writer.uint32(120).int32(message.total_debit);
228
+ }
229
+ if (message.successful_debit !== undefined) {
230
+ writer.uint32(128).int32(message.successful_debit);
231
+ }
232
+ if (message.unsuccessful_debit !== undefined) {
233
+ writer.uint32(136).int32(message.unsuccessful_debit);
234
+ }
223
235
  return writer;
224
236
  },
225
237
  decode(input, length) {
@@ -313,6 +325,24 @@ exports.Data = {
313
325
  }
314
326
  message.vpa = reader.string();
315
327
  continue;
328
+ case 15:
329
+ if (tag !== 120) {
330
+ break;
331
+ }
332
+ message.total_debit = reader.int32();
333
+ continue;
334
+ case 16:
335
+ if (tag !== 128) {
336
+ break;
337
+ }
338
+ message.successful_debit = reader.int32();
339
+ continue;
340
+ case 17:
341
+ if (tag !== 136) {
342
+ break;
343
+ }
344
+ message.unsuccessful_debit = reader.int32();
345
+ continue;
316
346
  }
317
347
  if ((tag & 7) === 4 || tag === 0) {
318
348
  break;
@@ -337,6 +367,9 @@ exports.Data = {
337
367
  expiry: isSet(object.expiry) ? globalThis.String(object.expiry) : undefined,
338
368
  customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : undefined,
339
369
  vpa: isSet(object.vpa) ? globalThis.String(object.vpa) : undefined,
370
+ total_debit: isSet(object.total_debit) ? globalThis.Number(object.total_debit) : undefined,
371
+ successful_debit: isSet(object.successful_debit) ? globalThis.Number(object.successful_debit) : undefined,
372
+ unsuccessful_debit: isSet(object.unsuccessful_debit) ? globalThis.Number(object.unsuccessful_debit) : undefined,
340
373
  };
341
374
  },
342
375
  toJSON(message) {
@@ -383,6 +416,15 @@ exports.Data = {
383
416
  if (message.vpa !== undefined) {
384
417
  obj.vpa = message.vpa;
385
418
  }
419
+ if (message.total_debit !== undefined) {
420
+ obj.total_debit = Math.round(message.total_debit);
421
+ }
422
+ if (message.successful_debit !== undefined) {
423
+ obj.successful_debit = Math.round(message.successful_debit);
424
+ }
425
+ if (message.unsuccessful_debit !== undefined) {
426
+ obj.unsuccessful_debit = Math.round(message.unsuccessful_debit);
427
+ }
386
428
  return obj;
387
429
  },
388
430
  create(base) {
@@ -410,6 +452,9 @@ exports.Data = {
410
452
  message.expiry = object.expiry ?? undefined;
411
453
  message.customer_id = object.customer_id ?? undefined;
412
454
  message.vpa = object.vpa ?? undefined;
455
+ message.total_debit = object.total_debit ?? undefined;
456
+ message.successful_debit = object.successful_debit ?? undefined;
457
+ message.unsuccessful_debit = object.unsuccessful_debit ?? undefined;
413
458
  return message;
414
459
  },
415
460
  };
@@ -4,6 +4,7 @@ export interface getRecentContactsRequest {
4
4
  limit?: number | undefined;
5
5
  off_set?: number | undefined;
6
6
  txn_type?: string | undefined;
7
+ search_by?: string | undefined;
7
8
  }
8
9
  /** Payment timestamp in ISO format */
9
10
  export interface RecentContacts {
@@ -13,7 +13,7 @@ exports.getRecentContactsResponse = exports.Data = exports.RecentContacts = expo
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "upi.getRecentContacts";
15
15
  function createBasegetRecentContactsRequest() {
16
- return { limit: undefined, off_set: undefined, txn_type: undefined };
16
+ return { limit: undefined, off_set: undefined, txn_type: undefined, search_by: undefined };
17
17
  }
18
18
  exports.getRecentContactsRequest = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -26,6 +26,9 @@ exports.getRecentContactsRequest = {
26
26
  if (message.txn_type !== undefined) {
27
27
  writer.uint32(26).string(message.txn_type);
28
28
  }
29
+ if (message.search_by !== undefined) {
30
+ writer.uint32(34).string(message.search_by);
31
+ }
29
32
  return writer;
30
33
  },
31
34
  decode(input, length) {
@@ -53,6 +56,12 @@ exports.getRecentContactsRequest = {
53
56
  }
54
57
  message.txn_type = reader.string();
55
58
  continue;
59
+ case 4:
60
+ if (tag !== 34) {
61
+ break;
62
+ }
63
+ message.search_by = reader.string();
64
+ continue;
56
65
  }
57
66
  if ((tag & 7) === 4 || tag === 0) {
58
67
  break;
@@ -66,6 +75,7 @@ exports.getRecentContactsRequest = {
66
75
  limit: isSet(object.limit) ? globalThis.Number(object.limit) : undefined,
67
76
  off_set: isSet(object.off_set) ? globalThis.Number(object.off_set) : undefined,
68
77
  txn_type: isSet(object.txn_type) ? globalThis.String(object.txn_type) : undefined,
78
+ search_by: isSet(object.search_by) ? globalThis.String(object.search_by) : undefined,
69
79
  };
70
80
  },
71
81
  toJSON(message) {
@@ -79,6 +89,9 @@ exports.getRecentContactsRequest = {
79
89
  if (message.txn_type !== undefined) {
80
90
  obj.txn_type = message.txn_type;
81
91
  }
92
+ if (message.search_by !== undefined) {
93
+ obj.search_by = message.search_by;
94
+ }
82
95
  return obj;
83
96
  },
84
97
  create(base) {
@@ -89,6 +102,7 @@ exports.getRecentContactsRequest = {
89
102
  message.limit = object.limit ?? undefined;
90
103
  message.off_set = object.off_set ?? undefined;
91
104
  message.txn_type = object.txn_type ?? undefined;
105
+ message.search_by = object.search_by ?? undefined;
92
106
  return message;
93
107
  },
94
108
  };
@@ -37,6 +37,8 @@ export interface Transactions {
37
37
  payee_ifsc?: string | undefined;
38
38
  /** Name of the payee's account provider */
39
39
  payee_acc_provider?: string | undefined;
40
+ umn?: string | undefined;
41
+ mandate_txn_seq_no?: number | undefined;
40
42
  }
41
43
  export interface Data {
42
44
  transactions: Transactions[];
@@ -159,6 +159,8 @@ function createBaseTransactions() {
159
159
  payee_acc_number: undefined,
160
160
  payee_ifsc: undefined,
161
161
  payee_acc_provider: undefined,
162
+ umn: undefined,
163
+ mandate_txn_seq_no: undefined,
162
164
  };
163
165
  }
164
166
  exports.Transactions = {
@@ -205,6 +207,12 @@ exports.Transactions = {
205
207
  if (message.payee_acc_provider !== undefined) {
206
208
  writer.uint32(114).string(message.payee_acc_provider);
207
209
  }
210
+ if (message.umn !== undefined) {
211
+ writer.uint32(122).string(message.umn);
212
+ }
213
+ if (message.mandate_txn_seq_no !== undefined) {
214
+ writer.uint32(136).int32(message.mandate_txn_seq_no);
215
+ }
208
216
  return writer;
209
217
  },
210
218
  decode(input, length) {
@@ -298,6 +306,18 @@ exports.Transactions = {
298
306
  }
299
307
  message.payee_acc_provider = reader.string();
300
308
  continue;
309
+ case 15:
310
+ if (tag !== 122) {
311
+ break;
312
+ }
313
+ message.umn = reader.string();
314
+ continue;
315
+ case 17:
316
+ if (tag !== 136) {
317
+ break;
318
+ }
319
+ message.mandate_txn_seq_no = reader.int32();
320
+ continue;
301
321
  }
302
322
  if ((tag & 7) === 4 || tag === 0) {
303
323
  break;
@@ -322,6 +342,8 @@ exports.Transactions = {
322
342
  payee_acc_number: isSet(object.payee_acc_number) ? globalThis.String(object.payee_acc_number) : undefined,
323
343
  payee_ifsc: isSet(object.payee_ifsc) ? globalThis.String(object.payee_ifsc) : undefined,
324
344
  payee_acc_provider: isSet(object.payee_acc_provider) ? globalThis.String(object.payee_acc_provider) : undefined,
345
+ umn: isSet(object.umn) ? globalThis.String(object.umn) : undefined,
346
+ mandate_txn_seq_no: isSet(object.mandate_txn_seq_no) ? globalThis.Number(object.mandate_txn_seq_no) : undefined,
325
347
  };
326
348
  },
327
349
  toJSON(message) {
@@ -368,6 +390,12 @@ exports.Transactions = {
368
390
  if (message.payee_acc_provider !== undefined) {
369
391
  obj.payee_acc_provider = message.payee_acc_provider;
370
392
  }
393
+ if (message.umn !== undefined) {
394
+ obj.umn = message.umn;
395
+ }
396
+ if (message.mandate_txn_seq_no !== undefined) {
397
+ obj.mandate_txn_seq_no = Math.round(message.mandate_txn_seq_no);
398
+ }
371
399
  return obj;
372
400
  },
373
401
  create(base) {
@@ -389,6 +417,8 @@ exports.Transactions = {
389
417
  message.payee_acc_number = object.payee_acc_number ?? undefined;
390
418
  message.payee_ifsc = object.payee_ifsc ?? undefined;
391
419
  message.payee_acc_provider = object.payee_acc_provider ?? undefined;
420
+ message.umn = object.umn ?? undefined;
421
+ message.mandate_txn_seq_no = object.mandate_txn_seq_no ?? undefined;
392
422
  return message;
393
423
  },
394
424
  };
package/ts/upi.d.ts CHANGED
@@ -2,6 +2,7 @@ import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type
2
2
  import { addAccountRequest, addAccountResponse } from "./upi/addaccount";
3
3
  import { blockVPARequest, blockVPAResponse } from "./upi/blockvpa";
4
4
  import { checkTransactionStatusRequest, checkTransactionStatusResponse } from "./upi/checktransactionstatus";
5
+ import { declineMandateRequest, declineMandateResponse } from "./upi/declinemandate";
5
6
  import { deregisterProfileReqeust, deregisterProfileResponse } from "./upi/deregisterprofile";
6
7
  import { getAccountsByProviderRequest, getAccountsByProviderResponse } from "./upi/getaccountsbyprovider";
7
8
  import { getAllMandatesRequest, getAllMandatesResponse } from "./upi/getallmandates";
@@ -231,6 +232,15 @@ export declare const upiService: {
231
232
  readonly responseSerialize: (value: checkTransactionStatusResponse) => Buffer;
232
233
  readonly responseDeserialize: (value: Buffer) => checkTransactionStatusResponse;
233
234
  };
235
+ readonly declineMandate: {
236
+ readonly path: "/service.upi/declineMandate";
237
+ readonly requestStream: false;
238
+ readonly responseStream: false;
239
+ readonly requestSerialize: (value: declineMandateRequest) => Buffer;
240
+ readonly requestDeserialize: (value: Buffer) => declineMandateRequest;
241
+ readonly responseSerialize: (value: declineMandateResponse) => Buffer;
242
+ readonly responseDeserialize: (value: Buffer) => declineMandateResponse;
243
+ };
234
244
  };
235
245
  export interface upiServer extends UntypedServiceImplementation {
236
246
  getListedAccountProviders: handleUnaryCall<getListedAccountProvidersRequest, getListedAccountProvidersResponse>;
@@ -256,6 +266,7 @@ export interface upiServer extends UntypedServiceImplementation {
256
266
  getUpiNumbers: handleUnaryCall<getUpiNumbersRequest, getUpiNumbersResponse>;
257
267
  initiateMandateAction: handleUnaryCall<initiateMandateActionRequest, initiateMandateActionResponse>;
258
268
  checkMandateStatus: handleUnaryCall<checkTransactionStatusRequest, checkTransactionStatusResponse>;
269
+ declineMandate: handleUnaryCall<declineMandateRequest, declineMandateResponse>;
259
270
  }
260
271
  export interface upiClient extends Client {
261
272
  getListedAccountProviders(request: getListedAccountProvidersRequest, callback: (error: ServiceError | null, response: getListedAccountProvidersResponse) => void): ClientUnaryCall;
@@ -327,6 +338,9 @@ export interface upiClient extends Client {
327
338
  checkMandateStatus(request: checkTransactionStatusRequest, callback: (error: ServiceError | null, response: checkTransactionStatusResponse) => void): ClientUnaryCall;
328
339
  checkMandateStatus(request: checkTransactionStatusRequest, metadata: Metadata, callback: (error: ServiceError | null, response: checkTransactionStatusResponse) => void): ClientUnaryCall;
329
340
  checkMandateStatus(request: checkTransactionStatusRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: checkTransactionStatusResponse) => void): ClientUnaryCall;
341
+ declineMandate(request: declineMandateRequest, callback: (error: ServiceError | null, response: declineMandateResponse) => void): ClientUnaryCall;
342
+ declineMandate(request: declineMandateRequest, metadata: Metadata, callback: (error: ServiceError | null, response: declineMandateResponse) => void): ClientUnaryCall;
343
+ declineMandate(request: declineMandateRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: declineMandateResponse) => void): ClientUnaryCall;
330
344
  }
331
345
  export declare const upiClient: {
332
346
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): upiClient;
package/ts/upi.js CHANGED
@@ -11,6 +11,7 @@ const grpc_js_1 = require("@grpc/grpc-js");
11
11
  const addaccount_1 = require("./upi/addaccount");
12
12
  const blockvpa_1 = require("./upi/blockvpa");
13
13
  const checktransactionstatus_1 = require("./upi/checktransactionstatus");
14
+ const declinemandate_1 = require("./upi/declinemandate");
14
15
  const deregisterprofile_1 = require("./upi/deregisterprofile");
15
16
  const getaccountsbyprovider_1 = require("./upi/getaccountsbyprovider");
16
17
  const getallmandates_1 = require("./upi/getallmandates");
@@ -239,5 +240,14 @@ exports.upiService = {
239
240
  responseSerialize: (value) => Buffer.from(checktransactionstatus_1.checkTransactionStatusResponse.encode(value).finish()),
240
241
  responseDeserialize: (value) => checktransactionstatus_1.checkTransactionStatusResponse.decode(value),
241
242
  },
243
+ declineMandate: {
244
+ path: "/service.upi/declineMandate",
245
+ requestStream: false,
246
+ responseStream: false,
247
+ requestSerialize: (value) => Buffer.from(declinemandate_1.declineMandateRequest.encode(value).finish()),
248
+ requestDeserialize: (value) => declinemandate_1.declineMandateRequest.decode(value),
249
+ responseSerialize: (value) => Buffer.from(declinemandate_1.declineMandateResponse.encode(value).finish()),
250
+ responseDeserialize: (value) => declinemandate_1.declineMandateResponse.decode(value),
251
+ },
242
252
  };
243
253
  exports.upiClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.upiService, "service.upi");