@stashfin/grpc 1.2.589 → 1.2.591

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.589",
3
+ "version": "1.2.591",
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 = "banking.aa.initiatepennydrop";
3
+ export interface pennyDropRequest {
4
+ customer_id: number;
5
+ account_number: string;
6
+ ifsc_code: string;
7
+ }
8
+ export interface pennyDropResponse {
9
+ success: boolean;
10
+ }
11
+ export declare const pennyDropRequest: {
12
+ encode(message: pennyDropRequest, writer?: _m0.Writer): _m0.Writer;
13
+ decode(input: _m0.Reader | Uint8Array, length?: number): pennyDropRequest;
14
+ fromJSON(object: any): pennyDropRequest;
15
+ toJSON(message: pennyDropRequest): unknown;
16
+ create<I extends Exact<DeepPartial<pennyDropRequest>, I>>(base?: I): pennyDropRequest;
17
+ fromPartial<I extends Exact<DeepPartial<pennyDropRequest>, I>>(object: I): pennyDropRequest;
18
+ };
19
+ export declare const pennyDropResponse: {
20
+ encode(message: pennyDropResponse, writer?: _m0.Writer): _m0.Writer;
21
+ decode(input: _m0.Reader | Uint8Array, length?: number): pennyDropResponse;
22
+ fromJSON(object: any): pennyDropResponse;
23
+ toJSON(message: pennyDropResponse): unknown;
24
+ create<I extends Exact<DeepPartial<pennyDropResponse>, I>>(base?: I): pennyDropResponse;
25
+ fromPartial<I extends Exact<DeepPartial<pennyDropResponse>, I>>(object: I): pennyDropResponse;
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,161 @@
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: banking/aa/initiatepennydrop.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.pennyDropResponse = exports.pennyDropRequest = 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 = "banking.aa.initiatepennydrop";
16
+ function createBasepennyDropRequest() {
17
+ return { customer_id: 0, account_number: "", ifsc_code: "" };
18
+ }
19
+ exports.pennyDropRequest = {
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
+ if (message.account_number !== "") {
25
+ writer.uint32(18).string(message.account_number);
26
+ }
27
+ if (message.ifsc_code !== "") {
28
+ writer.uint32(26).string(message.ifsc_code);
29
+ }
30
+ return writer;
31
+ },
32
+ decode(input, length) {
33
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
34
+ let end = length === undefined ? reader.len : reader.pos + length;
35
+ const message = createBasepennyDropRequest();
36
+ while (reader.pos < end) {
37
+ const tag = reader.uint32();
38
+ switch (tag >>> 3) {
39
+ case 1:
40
+ if (tag !== 8) {
41
+ break;
42
+ }
43
+ message.customer_id = longToNumber(reader.int64());
44
+ continue;
45
+ case 2:
46
+ if (tag !== 18) {
47
+ break;
48
+ }
49
+ message.account_number = reader.string();
50
+ continue;
51
+ case 3:
52
+ if (tag !== 26) {
53
+ break;
54
+ }
55
+ message.ifsc_code = reader.string();
56
+ continue;
57
+ }
58
+ if ((tag & 7) === 4 || tag === 0) {
59
+ break;
60
+ }
61
+ reader.skipType(tag & 7);
62
+ }
63
+ return message;
64
+ },
65
+ fromJSON(object) {
66
+ return {
67
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
68
+ account_number: isSet(object.account_number) ? globalThis.String(object.account_number) : "",
69
+ ifsc_code: isSet(object.ifsc_code) ? globalThis.String(object.ifsc_code) : "",
70
+ };
71
+ },
72
+ toJSON(message) {
73
+ const obj = {};
74
+ if (message.customer_id !== 0) {
75
+ obj.customer_id = Math.round(message.customer_id);
76
+ }
77
+ if (message.account_number !== "") {
78
+ obj.account_number = message.account_number;
79
+ }
80
+ if (message.ifsc_code !== "") {
81
+ obj.ifsc_code = message.ifsc_code;
82
+ }
83
+ return obj;
84
+ },
85
+ create(base) {
86
+ return exports.pennyDropRequest.fromPartial(base ?? {});
87
+ },
88
+ fromPartial(object) {
89
+ const message = createBasepennyDropRequest();
90
+ message.customer_id = object.customer_id ?? 0;
91
+ message.account_number = object.account_number ?? "";
92
+ message.ifsc_code = object.ifsc_code ?? "";
93
+ return message;
94
+ },
95
+ };
96
+ function createBasepennyDropResponse() {
97
+ return { success: false };
98
+ }
99
+ exports.pennyDropResponse = {
100
+ encode(message, writer = minimal_1.default.Writer.create()) {
101
+ if (message.success !== false) {
102
+ writer.uint32(8).bool(message.success);
103
+ }
104
+ return writer;
105
+ },
106
+ decode(input, length) {
107
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
108
+ let end = length === undefined ? reader.len : reader.pos + length;
109
+ const message = createBasepennyDropResponse();
110
+ while (reader.pos < end) {
111
+ const tag = reader.uint32();
112
+ switch (tag >>> 3) {
113
+ case 1:
114
+ if (tag !== 8) {
115
+ break;
116
+ }
117
+ message.success = reader.bool();
118
+ continue;
119
+ }
120
+ if ((tag & 7) === 4 || tag === 0) {
121
+ break;
122
+ }
123
+ reader.skipType(tag & 7);
124
+ }
125
+ return message;
126
+ },
127
+ fromJSON(object) {
128
+ return { success: isSet(object.success) ? globalThis.Boolean(object.success) : false };
129
+ },
130
+ toJSON(message) {
131
+ const obj = {};
132
+ if (message.success !== false) {
133
+ obj.success = message.success;
134
+ }
135
+ return obj;
136
+ },
137
+ create(base) {
138
+ return exports.pennyDropResponse.fromPartial(base ?? {});
139
+ },
140
+ fromPartial(object) {
141
+ const message = createBasepennyDropResponse();
142
+ message.success = object.success ?? false;
143
+ return message;
144
+ },
145
+ };
146
+ function longToNumber(long) {
147
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
148
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
149
+ }
150
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
151
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
152
+ }
153
+ return long.toNumber();
154
+ }
155
+ if (minimal_1.default.util.Long !== long_1.default) {
156
+ minimal_1.default.util.Long = long_1.default;
157
+ minimal_1.default.configure();
158
+ }
159
+ function isSet(value) {
160
+ return value !== null && value !== undefined;
161
+ }
package/ts/banking.d.ts CHANGED
@@ -3,6 +3,7 @@ import { getAASupportRequest, getAASupportResponse } from "./banking/aa/getaasup
3
3
  import { getBankListRequest, getBankListResponse } from "./banking/aa/getbanklist";
4
4
  import { createRpdLinkRequest, createRpdLinkResponse } from "./banking/aa/getrpdlink";
5
5
  import { initiateRequest, initiateResponse } from "./banking/aa/initiate";
6
+ import { pennyDropRequest, pennyDropResponse } from "./banking/aa/initiatepennydrop";
6
7
  export declare const protobufPackage = "service";
7
8
  export type bankingService = typeof bankingService;
8
9
  export declare const bankingService: {
@@ -42,12 +43,22 @@ export declare const bankingService: {
42
43
  readonly responseSerialize: (value: getAASupportResponse) => Buffer;
43
44
  readonly responseDeserialize: (value: Buffer) => getAASupportResponse;
44
45
  };
46
+ readonly initiatePennyDrop: {
47
+ readonly path: "/service.banking/initiatePennyDrop";
48
+ readonly requestStream: false;
49
+ readonly responseStream: false;
50
+ readonly requestSerialize: (value: pennyDropRequest) => Buffer;
51
+ readonly requestDeserialize: (value: Buffer) => pennyDropRequest;
52
+ readonly responseSerialize: (value: pennyDropResponse) => Buffer;
53
+ readonly responseDeserialize: (value: Buffer) => pennyDropResponse;
54
+ };
45
55
  };
46
56
  export interface bankingServer extends UntypedServiceImplementation {
47
57
  getBankList: handleUnaryCall<getBankListRequest, getBankListResponse>;
48
58
  initiateRequest: handleUnaryCall<initiateRequest, initiateResponse>;
49
59
  getRpdLink: handleUnaryCall<createRpdLinkRequest, createRpdLinkResponse>;
50
60
  getAaSupport: handleUnaryCall<getAASupportRequest, getAASupportResponse>;
61
+ initiatePennyDrop: handleUnaryCall<pennyDropRequest, pennyDropResponse>;
51
62
  }
52
63
  export interface bankingClient extends Client {
53
64
  getBankList(request: getBankListRequest, callback: (error: ServiceError | null, response: getBankListResponse) => void): ClientUnaryCall;
@@ -62,6 +73,9 @@ export interface bankingClient extends Client {
62
73
  getAaSupport(request: getAASupportRequest, callback: (error: ServiceError | null, response: getAASupportResponse) => void): ClientUnaryCall;
63
74
  getAaSupport(request: getAASupportRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getAASupportResponse) => void): ClientUnaryCall;
64
75
  getAaSupport(request: getAASupportRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getAASupportResponse) => void): ClientUnaryCall;
76
+ initiatePennyDrop(request: pennyDropRequest, callback: (error: ServiceError | null, response: pennyDropResponse) => void): ClientUnaryCall;
77
+ initiatePennyDrop(request: pennyDropRequest, metadata: Metadata, callback: (error: ServiceError | null, response: pennyDropResponse) => void): ClientUnaryCall;
78
+ initiatePennyDrop(request: pennyDropRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: pennyDropResponse) => void): ClientUnaryCall;
65
79
  }
66
80
  export declare const bankingClient: {
67
81
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): bankingClient;
package/ts/banking.js CHANGED
@@ -12,6 +12,7 @@ const getaasupport_1 = require("./banking/aa/getaasupport");
12
12
  const getbanklist_1 = require("./banking/aa/getbanklist");
13
13
  const getrpdlink_1 = require("./banking/aa/getrpdlink");
14
14
  const initiate_1 = require("./banking/aa/initiate");
15
+ const initiatepennydrop_1 = require("./banking/aa/initiatepennydrop");
15
16
  exports.protobufPackage = "service";
16
17
  exports.bankingService = {
17
18
  getBankList: {
@@ -50,5 +51,14 @@ exports.bankingService = {
50
51
  responseSerialize: (value) => Buffer.from(getaasupport_1.getAASupportResponse.encode(value).finish()),
51
52
  responseDeserialize: (value) => getaasupport_1.getAASupportResponse.decode(value),
52
53
  },
54
+ initiatePennyDrop: {
55
+ path: "/service.banking/initiatePennyDrop",
56
+ requestStream: false,
57
+ responseStream: false,
58
+ requestSerialize: (value) => Buffer.from(initiatepennydrop_1.pennyDropRequest.encode(value).finish()),
59
+ requestDeserialize: (value) => initiatepennydrop_1.pennyDropRequest.decode(value),
60
+ responseSerialize: (value) => Buffer.from(initiatepennydrop_1.pennyDropResponse.encode(value).finish()),
61
+ responseDeserialize: (value) => initiatepennydrop_1.pennyDropResponse.decode(value),
62
+ },
53
63
  };
54
64
  exports.bankingClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.bankingService, "service.banking");
@@ -5,9 +5,9 @@ export interface customerReferencesRequest {
5
5
  references: Reference[];
6
6
  }
7
7
  export interface Reference {
8
- name: string;
9
- mobile: string;
10
- relation: string;
8
+ name?: string | undefined;
9
+ mobile?: string | undefined;
10
+ relation?: string | undefined;
11
11
  }
12
12
  export interface customerReferencesResponse {
13
13
  success: boolean;
@@ -82,17 +82,17 @@ exports.customerReferencesRequest = {
82
82
  },
83
83
  };
84
84
  function createBaseReference() {
85
- return { name: "", mobile: "", relation: "" };
85
+ return { name: undefined, mobile: undefined, relation: undefined };
86
86
  }
87
87
  exports.Reference = {
88
88
  encode(message, writer = minimal_1.default.Writer.create()) {
89
- if (message.name !== "") {
89
+ if (message.name !== undefined) {
90
90
  writer.uint32(10).string(message.name);
91
91
  }
92
- if (message.mobile !== "") {
92
+ if (message.mobile !== undefined) {
93
93
  writer.uint32(18).string(message.mobile);
94
94
  }
95
- if (message.relation !== "") {
95
+ if (message.relation !== undefined) {
96
96
  writer.uint32(26).string(message.relation);
97
97
  }
98
98
  return writer;
@@ -132,20 +132,20 @@ exports.Reference = {
132
132
  },
133
133
  fromJSON(object) {
134
134
  return {
135
- name: isSet(object.name) ? globalThis.String(object.name) : "",
136
- mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : "",
137
- relation: isSet(object.relation) ? globalThis.String(object.relation) : "",
135
+ name: isSet(object.name) ? globalThis.String(object.name) : undefined,
136
+ mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : undefined,
137
+ relation: isSet(object.relation) ? globalThis.String(object.relation) : undefined,
138
138
  };
139
139
  },
140
140
  toJSON(message) {
141
141
  const obj = {};
142
- if (message.name !== "") {
142
+ if (message.name !== undefined) {
143
143
  obj.name = message.name;
144
144
  }
145
- if (message.mobile !== "") {
145
+ if (message.mobile !== undefined) {
146
146
  obj.mobile = message.mobile;
147
147
  }
148
- if (message.relation !== "") {
148
+ if (message.relation !== undefined) {
149
149
  obj.relation = message.relation;
150
150
  }
151
151
  return obj;
@@ -155,9 +155,9 @@ exports.Reference = {
155
155
  },
156
156
  fromPartial(object) {
157
157
  const message = createBaseReference();
158
- message.name = object.name ?? "";
159
- message.mobile = object.mobile ?? "";
160
- message.relation = object.relation ?? "";
158
+ message.name = object.name ?? undefined;
159
+ message.mobile = object.mobile ?? undefined;
160
+ message.relation = object.relation ?? undefined;
161
161
  return message;
162
162
  },
163
163
  };