@stashfin/grpc 1.2.595 → 1.2.597

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.595",
3
+ "version": "1.2.597",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -2,6 +2,7 @@ import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "banking.aa.getaasupport";
3
3
  export interface getAASupportRequest {
4
4
  bank_id: string;
5
+ customer_id: number;
5
6
  }
6
7
  export interface getAASupportResponse {
7
8
  success?: boolean | undefined;
@@ -10,16 +10,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.getAASupportResponse = exports.getAASupportRequest = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
+ const long_1 = __importDefault(require("long"));
13
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
15
  exports.protobufPackage = "banking.aa.getaasupport";
15
16
  function createBasegetAASupportRequest() {
16
- return { bank_id: "" };
17
+ return { bank_id: "", customer_id: 0 };
17
18
  }
18
19
  exports.getAASupportRequest = {
19
20
  encode(message, writer = minimal_1.default.Writer.create()) {
20
21
  if (message.bank_id !== "") {
21
22
  writer.uint32(10).string(message.bank_id);
22
23
  }
24
+ if (message.customer_id !== 0) {
25
+ writer.uint32(16).int64(message.customer_id);
26
+ }
23
27
  return writer;
24
28
  },
25
29
  decode(input, length) {
@@ -35,6 +39,12 @@ exports.getAASupportRequest = {
35
39
  }
36
40
  message.bank_id = reader.string();
37
41
  continue;
42
+ case 2:
43
+ if (tag !== 16) {
44
+ break;
45
+ }
46
+ message.customer_id = longToNumber(reader.int64());
47
+ continue;
38
48
  }
39
49
  if ((tag & 7) === 4 || tag === 0) {
40
50
  break;
@@ -44,13 +54,19 @@ exports.getAASupportRequest = {
44
54
  return message;
45
55
  },
46
56
  fromJSON(object) {
47
- return { bank_id: isSet(object.bank_id) ? globalThis.String(object.bank_id) : "" };
57
+ return {
58
+ bank_id: isSet(object.bank_id) ? globalThis.String(object.bank_id) : "",
59
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
60
+ };
48
61
  },
49
62
  toJSON(message) {
50
63
  const obj = {};
51
64
  if (message.bank_id !== "") {
52
65
  obj.bank_id = message.bank_id;
53
66
  }
67
+ if (message.customer_id !== 0) {
68
+ obj.customer_id = Math.round(message.customer_id);
69
+ }
54
70
  return obj;
55
71
  },
56
72
  create(base) {
@@ -59,6 +75,7 @@ exports.getAASupportRequest = {
59
75
  fromPartial(object) {
60
76
  const message = createBasegetAASupportRequest();
61
77
  message.bank_id = object.bank_id ?? "";
78
+ message.customer_id = object.customer_id ?? 0;
62
79
  return message;
63
80
  },
64
81
  };
@@ -156,6 +173,19 @@ exports.getAASupportResponse = {
156
173
  return message;
157
174
  },
158
175
  };
176
+ function longToNumber(long) {
177
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
178
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
179
+ }
180
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
181
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
182
+ }
183
+ return long.toNumber();
184
+ }
185
+ if (minimal_1.default.util.Long !== long_1.default) {
186
+ minimal_1.default.util.Long = long_1.default;
187
+ minimal_1.default.configure();
188
+ }
159
189
  function isSet(value) {
160
190
  return value !== null && value !== undefined;
161
191
  }
@@ -4,6 +4,7 @@ export interface initiateRequest {
4
4
  loan_id: number;
5
5
  journey_type: string;
6
6
  fip_ids: string[];
7
+ customer_id: number;
7
8
  }
8
9
  export interface initiateResponse {
9
10
  success?: boolean | undefined;
@@ -14,7 +14,7 @@ const long_1 = __importDefault(require("long"));
14
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
15
  exports.protobufPackage = "banking.aa.initiate";
16
16
  function createBaseinitiateRequest() {
17
- return { loan_id: 0, journey_type: "", fip_ids: [] };
17
+ return { loan_id: 0, journey_type: "", fip_ids: [], customer_id: 0 };
18
18
  }
19
19
  exports.initiateRequest = {
20
20
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -27,6 +27,9 @@ exports.initiateRequest = {
27
27
  for (const v of message.fip_ids) {
28
28
  writer.uint32(26).string(v);
29
29
  }
30
+ if (message.customer_id !== 0) {
31
+ writer.uint32(32).int64(message.customer_id);
32
+ }
30
33
  return writer;
31
34
  },
32
35
  decode(input, length) {
@@ -54,6 +57,12 @@ exports.initiateRequest = {
54
57
  }
55
58
  message.fip_ids.push(reader.string());
56
59
  continue;
60
+ case 4:
61
+ if (tag !== 32) {
62
+ break;
63
+ }
64
+ message.customer_id = longToNumber(reader.int64());
65
+ continue;
57
66
  }
58
67
  if ((tag & 7) === 4 || tag === 0) {
59
68
  break;
@@ -67,6 +76,7 @@ exports.initiateRequest = {
67
76
  loan_id: isSet(object.loan_id) ? globalThis.Number(object.loan_id) : 0,
68
77
  journey_type: isSet(object.journey_type) ? globalThis.String(object.journey_type) : "",
69
78
  fip_ids: globalThis.Array.isArray(object?.fip_ids) ? object.fip_ids.map((e) => globalThis.String(e)) : [],
79
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
70
80
  };
71
81
  },
72
82
  toJSON(message) {
@@ -80,6 +90,9 @@ exports.initiateRequest = {
80
90
  if (message.fip_ids?.length) {
81
91
  obj.fip_ids = message.fip_ids;
82
92
  }
93
+ if (message.customer_id !== 0) {
94
+ obj.customer_id = Math.round(message.customer_id);
95
+ }
83
96
  return obj;
84
97
  },
85
98
  create(base) {
@@ -90,6 +103,7 @@ exports.initiateRequest = {
90
103
  message.loan_id = object.loan_id ?? 0;
91
104
  message.journey_type = object.journey_type ?? "";
92
105
  message.fip_ids = object.fip_ids?.map((e) => e) || [];
106
+ message.customer_id = object.customer_id ?? 0;
93
107
  return message;
94
108
  },
95
109
  };
@@ -0,0 +1,98 @@
1
+ import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
2
+ import { request as request3, response as response4 } from "./payments/checkpaymentstatus";
3
+ import { request as request9, response as response10 } from "./payments/fundtransfer";
4
+ import { request, response } from "./payments/getpaymentoptions";
5
+ import { request as request1, response as response2 } from "./payments/initiatepayment";
6
+ import { request as request7, response as response8 } from "./payments/nachpresentation";
7
+ import { request as request5, response as response6 } from "./payments/nachregistration";
8
+ export declare const protobufPackage = "service";
9
+ export type paymentsnodeService = typeof paymentsnodeService;
10
+ export declare const paymentsnodeService: {
11
+ readonly getpaymentoptions: {
12
+ readonly path: "/service.paymentsnode/getpaymentoptions";
13
+ readonly requestStream: false;
14
+ readonly responseStream: false;
15
+ readonly requestSerialize: (value: request) => Buffer;
16
+ readonly requestDeserialize: (value: Buffer) => request;
17
+ readonly responseSerialize: (value: response) => Buffer;
18
+ readonly responseDeserialize: (value: Buffer) => response;
19
+ };
20
+ readonly initiatepayment: {
21
+ readonly path: "/service.paymentsnode/initiatepayment";
22
+ readonly requestStream: false;
23
+ readonly responseStream: false;
24
+ readonly requestSerialize: (value: request1) => Buffer;
25
+ readonly requestDeserialize: (value: Buffer) => request1;
26
+ readonly responseSerialize: (value: response2) => Buffer;
27
+ readonly responseDeserialize: (value: Buffer) => response2;
28
+ };
29
+ readonly checkpaymentstatus: {
30
+ readonly path: "/service.paymentsnode/checkpaymentstatus";
31
+ readonly requestStream: false;
32
+ readonly responseStream: false;
33
+ readonly requestSerialize: (value: request3) => Buffer;
34
+ readonly requestDeserialize: (value: Buffer) => request3;
35
+ readonly responseSerialize: (value: response4) => Buffer;
36
+ readonly responseDeserialize: (value: Buffer) => response4;
37
+ };
38
+ readonly nachregistration: {
39
+ readonly path: "/service.paymentsnode/nachregistration";
40
+ readonly requestStream: false;
41
+ readonly responseStream: false;
42
+ readonly requestSerialize: (value: request5) => Buffer;
43
+ readonly requestDeserialize: (value: Buffer) => request5;
44
+ readonly responseSerialize: (value: response6) => Buffer;
45
+ readonly responseDeserialize: (value: Buffer) => response6;
46
+ };
47
+ readonly nachpresentation: {
48
+ readonly path: "/service.paymentsnode/nachpresentation";
49
+ readonly requestStream: false;
50
+ readonly responseStream: false;
51
+ readonly requestSerialize: (value: request7) => Buffer;
52
+ readonly requestDeserialize: (value: Buffer) => request7;
53
+ readonly responseSerialize: (value: response8) => Buffer;
54
+ readonly responseDeserialize: (value: Buffer) => response8;
55
+ };
56
+ readonly fundtransfer: {
57
+ readonly path: "/service.paymentsnode/fundtransfer";
58
+ readonly requestStream: false;
59
+ readonly responseStream: false;
60
+ readonly requestSerialize: (value: request9) => Buffer;
61
+ readonly requestDeserialize: (value: Buffer) => request9;
62
+ readonly responseSerialize: (value: response10) => Buffer;
63
+ readonly responseDeserialize: (value: Buffer) => response10;
64
+ };
65
+ };
66
+ export interface paymentsnodeServer extends UntypedServiceImplementation {
67
+ getpaymentoptions: handleUnaryCall<request, response>;
68
+ initiatepayment: handleUnaryCall<request1, response2>;
69
+ checkpaymentstatus: handleUnaryCall<request3, response4>;
70
+ nachregistration: handleUnaryCall<request5, response6>;
71
+ nachpresentation: handleUnaryCall<request7, response8>;
72
+ fundtransfer: handleUnaryCall<request9, response10>;
73
+ }
74
+ export interface paymentsnodeClient extends Client {
75
+ getpaymentoptions(request: request, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
76
+ getpaymentoptions(request: request, metadata: Metadata, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
77
+ getpaymentoptions(request: request, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
78
+ initiatepayment(request: request1, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
79
+ initiatepayment(request: request1, metadata: Metadata, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
80
+ initiatepayment(request: request1, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
81
+ checkpaymentstatus(request: request3, callback: (error: ServiceError | null, response: response4) => void): ClientUnaryCall;
82
+ checkpaymentstatus(request: request3, metadata: Metadata, callback: (error: ServiceError | null, response: response4) => void): ClientUnaryCall;
83
+ checkpaymentstatus(request: request3, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response4) => void): ClientUnaryCall;
84
+ nachregistration(request: request5, callback: (error: ServiceError | null, response: response6) => void): ClientUnaryCall;
85
+ nachregistration(request: request5, metadata: Metadata, callback: (error: ServiceError | null, response: response6) => void): ClientUnaryCall;
86
+ nachregistration(request: request5, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response6) => void): ClientUnaryCall;
87
+ nachpresentation(request: request7, callback: (error: ServiceError | null, response: response8) => void): ClientUnaryCall;
88
+ nachpresentation(request: request7, metadata: Metadata, callback: (error: ServiceError | null, response: response8) => void): ClientUnaryCall;
89
+ nachpresentation(request: request7, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response8) => void): ClientUnaryCall;
90
+ fundtransfer(request: request9, callback: (error: ServiceError | null, response: response10) => void): ClientUnaryCall;
91
+ fundtransfer(request: request9, metadata: Metadata, callback: (error: ServiceError | null, response: response10) => void): ClientUnaryCall;
92
+ fundtransfer(request: request9, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response10) => void): ClientUnaryCall;
93
+ }
94
+ export declare const paymentsnodeClient: {
95
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): paymentsnodeClient;
96
+ service: typeof paymentsnodeService;
97
+ serviceName: string;
98
+ };
@@ -0,0 +1,74 @@
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: paymentsnode.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.paymentsnodeClient = exports.paymentsnodeService = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const grpc_js_1 = require("@grpc/grpc-js");
11
+ const checkpaymentstatus_1 = require("./payments/checkpaymentstatus");
12
+ const fundtransfer_1 = require("./payments/fundtransfer");
13
+ const getpaymentoptions_1 = require("./payments/getpaymentoptions");
14
+ const initiatepayment_1 = require("./payments/initiatepayment");
15
+ const nachpresentation_1 = require("./payments/nachpresentation");
16
+ const nachregistration_1 = require("./payments/nachregistration");
17
+ exports.protobufPackage = "service";
18
+ exports.paymentsnodeService = {
19
+ getpaymentoptions: {
20
+ path: "/service.paymentsnode/getpaymentoptions",
21
+ requestStream: false,
22
+ responseStream: false,
23
+ requestSerialize: (value) => Buffer.from(getpaymentoptions_1.request.encode(value).finish()),
24
+ requestDeserialize: (value) => getpaymentoptions_1.request.decode(value),
25
+ responseSerialize: (value) => Buffer.from(getpaymentoptions_1.response.encode(value).finish()),
26
+ responseDeserialize: (value) => getpaymentoptions_1.response.decode(value),
27
+ },
28
+ initiatepayment: {
29
+ path: "/service.paymentsnode/initiatepayment",
30
+ requestStream: false,
31
+ responseStream: false,
32
+ requestSerialize: (value) => Buffer.from(initiatepayment_1.request.encode(value).finish()),
33
+ requestDeserialize: (value) => initiatepayment_1.request.decode(value),
34
+ responseSerialize: (value) => Buffer.from(initiatepayment_1.response.encode(value).finish()),
35
+ responseDeserialize: (value) => initiatepayment_1.response.decode(value),
36
+ },
37
+ checkpaymentstatus: {
38
+ path: "/service.paymentsnode/checkpaymentstatus",
39
+ requestStream: false,
40
+ responseStream: false,
41
+ requestSerialize: (value) => Buffer.from(checkpaymentstatus_1.request.encode(value).finish()),
42
+ requestDeserialize: (value) => checkpaymentstatus_1.request.decode(value),
43
+ responseSerialize: (value) => Buffer.from(checkpaymentstatus_1.response.encode(value).finish()),
44
+ responseDeserialize: (value) => checkpaymentstatus_1.response.decode(value),
45
+ },
46
+ nachregistration: {
47
+ path: "/service.paymentsnode/nachregistration",
48
+ requestStream: false,
49
+ responseStream: false,
50
+ requestSerialize: (value) => Buffer.from(nachregistration_1.request.encode(value).finish()),
51
+ requestDeserialize: (value) => nachregistration_1.request.decode(value),
52
+ responseSerialize: (value) => Buffer.from(nachregistration_1.response.encode(value).finish()),
53
+ responseDeserialize: (value) => nachregistration_1.response.decode(value),
54
+ },
55
+ nachpresentation: {
56
+ path: "/service.paymentsnode/nachpresentation",
57
+ requestStream: false,
58
+ responseStream: false,
59
+ requestSerialize: (value) => Buffer.from(nachpresentation_1.request.encode(value).finish()),
60
+ requestDeserialize: (value) => nachpresentation_1.request.decode(value),
61
+ responseSerialize: (value) => Buffer.from(nachpresentation_1.response.encode(value).finish()),
62
+ responseDeserialize: (value) => nachpresentation_1.response.decode(value),
63
+ },
64
+ fundtransfer: {
65
+ path: "/service.paymentsnode/fundtransfer",
66
+ requestStream: false,
67
+ responseStream: false,
68
+ requestSerialize: (value) => Buffer.from(fundtransfer_1.request.encode(value).finish()),
69
+ requestDeserialize: (value) => fundtransfer_1.request.decode(value),
70
+ responseSerialize: (value) => Buffer.from(fundtransfer_1.response.encode(value).finish()),
71
+ responseDeserialize: (value) => fundtransfer_1.response.decode(value),
72
+ },
73
+ };
74
+ exports.paymentsnodeClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.paymentsnodeService, "service.paymentsnode");