@stashfin/grpc 1.2.198 → 1.2.199

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.198",
3
+ "version": "1.2.199",
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 = "loans.fcppayment";
3
+ export interface fcpPaymentRequest {
4
+ bill_amount: number;
5
+ customerid: number;
6
+ loan_id: number;
7
+ }
8
+ export interface fcpPaymentResponse {
9
+ message: string;
10
+ }
11
+ export declare const fcpPaymentRequest: {
12
+ encode(message: fcpPaymentRequest, writer?: _m0.Writer): _m0.Writer;
13
+ decode(input: _m0.Reader | Uint8Array, length?: number): fcpPaymentRequest;
14
+ fromJSON(object: any): fcpPaymentRequest;
15
+ toJSON(message: fcpPaymentRequest): unknown;
16
+ create<I extends Exact<DeepPartial<fcpPaymentRequest>, I>>(base?: I): fcpPaymentRequest;
17
+ fromPartial<I extends Exact<DeepPartial<fcpPaymentRequest>, I>>(object: I): fcpPaymentRequest;
18
+ };
19
+ export declare const fcpPaymentResponse: {
20
+ encode(message: fcpPaymentResponse, writer?: _m0.Writer): _m0.Writer;
21
+ decode(input: _m0.Reader | Uint8Array, length?: number): fcpPaymentResponse;
22
+ fromJSON(object: any): fcpPaymentResponse;
23
+ toJSON(message: fcpPaymentResponse): unknown;
24
+ create<I extends Exact<DeepPartial<fcpPaymentResponse>, I>>(base?: I): fcpPaymentResponse;
25
+ fromPartial<I extends Exact<DeepPartial<fcpPaymentResponse>, I>>(object: I): fcpPaymentResponse;
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,147 @@
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.0
6
+ // source: loans/fcppayment.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.fcpPaymentResponse = exports.fcpPaymentRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "loans.fcppayment";
15
+ function createBasefcpPaymentRequest() {
16
+ return { bill_amount: 0, customerid: 0, loan_id: 0 };
17
+ }
18
+ exports.fcpPaymentRequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.bill_amount !== 0) {
21
+ writer.uint32(8).int32(message.bill_amount);
22
+ }
23
+ if (message.customerid !== 0) {
24
+ writer.uint32(16).int32(message.customerid);
25
+ }
26
+ if (message.loan_id !== 0) {
27
+ writer.uint32(24).int32(message.loan_id);
28
+ }
29
+ return writer;
30
+ },
31
+ decode(input, length) {
32
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
33
+ let end = length === undefined ? reader.len : reader.pos + length;
34
+ const message = createBasefcpPaymentRequest();
35
+ while (reader.pos < end) {
36
+ const tag = reader.uint32();
37
+ switch (tag >>> 3) {
38
+ case 1:
39
+ if (tag !== 8) {
40
+ break;
41
+ }
42
+ message.bill_amount = reader.int32();
43
+ continue;
44
+ case 2:
45
+ if (tag !== 16) {
46
+ break;
47
+ }
48
+ message.customerid = reader.int32();
49
+ continue;
50
+ case 3:
51
+ if (tag !== 24) {
52
+ break;
53
+ }
54
+ message.loan_id = reader.int32();
55
+ continue;
56
+ }
57
+ if ((tag & 7) === 4 || tag === 0) {
58
+ break;
59
+ }
60
+ reader.skipType(tag & 7);
61
+ }
62
+ return message;
63
+ },
64
+ fromJSON(object) {
65
+ return {
66
+ bill_amount: isSet(object.bill_amount) ? globalThis.Number(object.bill_amount) : 0,
67
+ customerid: isSet(object.customerid) ? globalThis.Number(object.customerid) : 0,
68
+ loan_id: isSet(object.loan_id) ? globalThis.Number(object.loan_id) : 0,
69
+ };
70
+ },
71
+ toJSON(message) {
72
+ const obj = {};
73
+ if (message.bill_amount !== 0) {
74
+ obj.bill_amount = Math.round(message.bill_amount);
75
+ }
76
+ if (message.customerid !== 0) {
77
+ obj.customerid = Math.round(message.customerid);
78
+ }
79
+ if (message.loan_id !== 0) {
80
+ obj.loan_id = Math.round(message.loan_id);
81
+ }
82
+ return obj;
83
+ },
84
+ create(base) {
85
+ return exports.fcpPaymentRequest.fromPartial(base ?? {});
86
+ },
87
+ fromPartial(object) {
88
+ const message = createBasefcpPaymentRequest();
89
+ message.bill_amount = object.bill_amount ?? 0;
90
+ message.customerid = object.customerid ?? 0;
91
+ message.loan_id = object.loan_id ?? 0;
92
+ return message;
93
+ },
94
+ };
95
+ function createBasefcpPaymentResponse() {
96
+ return { message: "" };
97
+ }
98
+ exports.fcpPaymentResponse = {
99
+ encode(message, writer = minimal_1.default.Writer.create()) {
100
+ if (message.message !== "") {
101
+ writer.uint32(10).string(message.message);
102
+ }
103
+ return writer;
104
+ },
105
+ decode(input, length) {
106
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
107
+ let end = length === undefined ? reader.len : reader.pos + length;
108
+ const message = createBasefcpPaymentResponse();
109
+ while (reader.pos < end) {
110
+ const tag = reader.uint32();
111
+ switch (tag >>> 3) {
112
+ case 1:
113
+ if (tag !== 10) {
114
+ break;
115
+ }
116
+ message.message = reader.string();
117
+ continue;
118
+ }
119
+ if ((tag & 7) === 4 || tag === 0) {
120
+ break;
121
+ }
122
+ reader.skipType(tag & 7);
123
+ }
124
+ return message;
125
+ },
126
+ fromJSON(object) {
127
+ return { message: isSet(object.message) ? globalThis.String(object.message) : "" };
128
+ },
129
+ toJSON(message) {
130
+ const obj = {};
131
+ if (message.message !== "") {
132
+ obj.message = message.message;
133
+ }
134
+ return obj;
135
+ },
136
+ create(base) {
137
+ return exports.fcpPaymentResponse.fromPartial(base ?? {});
138
+ },
139
+ fromPartial(object) {
140
+ const message = createBasefcpPaymentResponse();
141
+ message.message = object.message ?? "";
142
+ return message;
143
+ },
144
+ };
145
+ function isSet(value) {
146
+ return value !== null && value !== undefined;
147
+ }
package/ts/loans.d.ts CHANGED
@@ -4,6 +4,7 @@ import { approveLoanRequest, approveLoanResponse } from "./loans/approveloan";
4
4
  import { bankListRequest, bankListResponse } from "./loans/banklist";
5
5
  import { calculateEmiRequest, calculateEmiResponse } from "./loans/calculateemi";
6
6
  import { creditLimitRequest, creditLimitResponse } from "./loans/creditlimit";
7
+ import { fcpPaymentRequest, fcpPaymentResponse } from "./loans/fcppayment";
7
8
  import { futurePaymentMoreDetailsRequest, futurePaymentMoreDetailsResponse } from "./loans/futurepaymentmoredetails";
8
9
  import { getBillDetailsRequest, getBillDetailsResponse } from "./loans/getbilldetails";
9
10
  import { getCustomerLoanStatusRequest, getCustomerLoanStatusResponse } from "./loans/getcustomerloanstatus";
@@ -222,6 +223,15 @@ export declare const loansService: {
222
223
  readonly responseSerialize: (value: amortizationResponse) => Buffer;
223
224
  readonly responseDeserialize: (value: Buffer) => amortizationResponse;
224
225
  };
226
+ readonly fcpPayment: {
227
+ readonly path: "/service.loans/fcpPayment";
228
+ readonly requestStream: false;
229
+ readonly responseStream: false;
230
+ readonly requestSerialize: (value: fcpPaymentRequest) => Buffer;
231
+ readonly requestDeserialize: (value: Buffer) => fcpPaymentRequest;
232
+ readonly responseSerialize: (value: fcpPaymentResponse) => Buffer;
233
+ readonly responseDeserialize: (value: Buffer) => fcpPaymentResponse;
234
+ };
225
235
  };
226
236
  export interface loansServer extends UntypedServiceImplementation {
227
237
  creditlimit: handleUnaryCall<creditLimitRequest, creditLimitResponse>;
@@ -246,6 +256,7 @@ export interface loansServer extends UntypedServiceImplementation {
246
256
  getNextDueAmount: handleUnaryCall<getNextdueAmountRequest, getNextdueAmountResponse>;
247
257
  payNow: handleUnaryCall<payNowRequest, payNowResponse>;
248
258
  amortization: handleUnaryCall<amortizationRequest, amortizationResponse>;
259
+ fcpPayment: handleUnaryCall<fcpPaymentRequest, fcpPaymentResponse>;
249
260
  }
250
261
  export interface loansClient extends Client {
251
262
  creditlimit(request: creditLimitRequest, callback: (error: ServiceError | null, response: creditLimitResponse) => void): ClientUnaryCall;
@@ -314,6 +325,9 @@ export interface loansClient extends Client {
314
325
  amortization(request: amortizationRequest, callback: (error: ServiceError | null, response: amortizationResponse) => void): ClientUnaryCall;
315
326
  amortization(request: amortizationRequest, metadata: Metadata, callback: (error: ServiceError | null, response: amortizationResponse) => void): ClientUnaryCall;
316
327
  amortization(request: amortizationRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: amortizationResponse) => void): ClientUnaryCall;
328
+ fcpPayment(request: fcpPaymentRequest, callback: (error: ServiceError | null, response: fcpPaymentResponse) => void): ClientUnaryCall;
329
+ fcpPayment(request: fcpPaymentRequest, metadata: Metadata, callback: (error: ServiceError | null, response: fcpPaymentResponse) => void): ClientUnaryCall;
330
+ fcpPayment(request: fcpPaymentRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: fcpPaymentResponse) => void): ClientUnaryCall;
317
331
  }
318
332
  export declare const loansClient: {
319
333
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): loansClient;
package/ts/loans.js CHANGED
@@ -13,6 +13,7 @@ const approveloan_1 = require("./loans/approveloan");
13
13
  const banklist_1 = require("./loans/banklist");
14
14
  const calculateemi_1 = require("./loans/calculateemi");
15
15
  const creditlimit_1 = require("./loans/creditlimit");
16
+ const fcppayment_1 = require("./loans/fcppayment");
16
17
  const futurepaymentmoredetails_1 = require("./loans/futurepaymentmoredetails");
17
18
  const getbilldetails_1 = require("./loans/getbilldetails");
18
19
  const getcustomerloanstatus_1 = require("./loans/getcustomerloanstatus");
@@ -230,5 +231,14 @@ exports.loansService = {
230
231
  responseSerialize: (value) => Buffer.from(amortization_1.amortizationResponse.encode(value).finish()),
231
232
  responseDeserialize: (value) => amortization_1.amortizationResponse.decode(value),
232
233
  },
234
+ fcpPayment: {
235
+ path: "/service.loans/fcpPayment",
236
+ requestStream: false,
237
+ responseStream: false,
238
+ requestSerialize: (value) => Buffer.from(fcppayment_1.fcpPaymentRequest.encode(value).finish()),
239
+ requestDeserialize: (value) => fcppayment_1.fcpPaymentRequest.decode(value),
240
+ responseSerialize: (value) => Buffer.from(fcppayment_1.fcpPaymentResponse.encode(value).finish()),
241
+ responseDeserialize: (value) => fcppayment_1.fcpPaymentResponse.decode(value),
242
+ },
233
243
  };
234
244
  exports.loansClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.loansService, "service.loans");