@stashfin/grpc 1.2.311 → 1.2.312

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.311",
3
+ "version": "1.2.312",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -0,0 +1,41 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "growth.notifychrpayment";
3
+ export interface notifychrrequest {
4
+ status: string;
5
+ order_id: string;
6
+ customer_id: number;
7
+ mode: string;
8
+ meta_data: string;
9
+ }
10
+ export interface notifychrresponse {
11
+ status: string;
12
+ statusCode: number;
13
+ message: string;
14
+ }
15
+ export declare const notifychrrequest: {
16
+ encode(message: notifychrrequest, writer?: _m0.Writer): _m0.Writer;
17
+ decode(input: _m0.Reader | Uint8Array, length?: number): notifychrrequest;
18
+ fromJSON(object: any): notifychrrequest;
19
+ toJSON(message: notifychrrequest): unknown;
20
+ create<I extends Exact<DeepPartial<notifychrrequest>, I>>(base?: I): notifychrrequest;
21
+ fromPartial<I extends Exact<DeepPartial<notifychrrequest>, I>>(object: I): notifychrrequest;
22
+ };
23
+ export declare const notifychrresponse: {
24
+ encode(message: notifychrresponse, writer?: _m0.Writer): _m0.Writer;
25
+ decode(input: _m0.Reader | Uint8Array, length?: number): notifychrresponse;
26
+ fromJSON(object: any): notifychrresponse;
27
+ toJSON(message: notifychrresponse): unknown;
28
+ create<I extends Exact<DeepPartial<notifychrresponse>, I>>(base?: I): notifychrresponse;
29
+ fromPartial<I extends Exact<DeepPartial<notifychrresponse>, I>>(object: I): notifychrresponse;
30
+ };
31
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
32
+ 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 {} ? {
33
+ [K in keyof T]?: DeepPartial<T[K]>;
34
+ } : Partial<T>;
35
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
36
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
37
+ [K in keyof P]: Exact<P[K], I[K]>;
38
+ } & {
39
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
40
+ };
41
+ export {};
@@ -0,0 +1,205 @@
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: growth/notifychrpayment.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.notifychrresponse = exports.notifychrrequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "growth.notifychrpayment";
15
+ function createBasenotifychrrequest() {
16
+ return { status: "", order_id: "", customer_id: 0, mode: "", meta_data: "" };
17
+ }
18
+ exports.notifychrrequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.status !== "") {
21
+ writer.uint32(10).string(message.status);
22
+ }
23
+ if (message.order_id !== "") {
24
+ writer.uint32(18).string(message.order_id);
25
+ }
26
+ if (message.customer_id !== 0) {
27
+ writer.uint32(24).int32(message.customer_id);
28
+ }
29
+ if (message.mode !== "") {
30
+ writer.uint32(34).string(message.mode);
31
+ }
32
+ if (message.meta_data !== "") {
33
+ writer.uint32(42).string(message.meta_data);
34
+ }
35
+ return writer;
36
+ },
37
+ decode(input, length) {
38
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
39
+ let end = length === undefined ? reader.len : reader.pos + length;
40
+ const message = createBasenotifychrrequest();
41
+ while (reader.pos < end) {
42
+ const tag = reader.uint32();
43
+ switch (tag >>> 3) {
44
+ case 1:
45
+ if (tag !== 10) {
46
+ break;
47
+ }
48
+ message.status = reader.string();
49
+ continue;
50
+ case 2:
51
+ if (tag !== 18) {
52
+ break;
53
+ }
54
+ message.order_id = reader.string();
55
+ continue;
56
+ case 3:
57
+ if (tag !== 24) {
58
+ break;
59
+ }
60
+ message.customer_id = reader.int32();
61
+ continue;
62
+ case 4:
63
+ if (tag !== 34) {
64
+ break;
65
+ }
66
+ message.mode = reader.string();
67
+ continue;
68
+ case 5:
69
+ if (tag !== 42) {
70
+ break;
71
+ }
72
+ message.meta_data = reader.string();
73
+ continue;
74
+ }
75
+ if ((tag & 7) === 4 || tag === 0) {
76
+ break;
77
+ }
78
+ reader.skipType(tag & 7);
79
+ }
80
+ return message;
81
+ },
82
+ fromJSON(object) {
83
+ return {
84
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
85
+ order_id: isSet(object.order_id) ? globalThis.String(object.order_id) : "",
86
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
87
+ mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
88
+ meta_data: isSet(object.meta_data) ? globalThis.String(object.meta_data) : "",
89
+ };
90
+ },
91
+ toJSON(message) {
92
+ const obj = {};
93
+ if (message.status !== "") {
94
+ obj.status = message.status;
95
+ }
96
+ if (message.order_id !== "") {
97
+ obj.order_id = message.order_id;
98
+ }
99
+ if (message.customer_id !== 0) {
100
+ obj.customer_id = Math.round(message.customer_id);
101
+ }
102
+ if (message.mode !== "") {
103
+ obj.mode = message.mode;
104
+ }
105
+ if (message.meta_data !== "") {
106
+ obj.meta_data = message.meta_data;
107
+ }
108
+ return obj;
109
+ },
110
+ create(base) {
111
+ return exports.notifychrrequest.fromPartial(base ?? {});
112
+ },
113
+ fromPartial(object) {
114
+ const message = createBasenotifychrrequest();
115
+ message.status = object.status ?? "";
116
+ message.order_id = object.order_id ?? "";
117
+ message.customer_id = object.customer_id ?? 0;
118
+ message.mode = object.mode ?? "";
119
+ message.meta_data = object.meta_data ?? "";
120
+ return message;
121
+ },
122
+ };
123
+ function createBasenotifychrresponse() {
124
+ return { status: "", statusCode: 0, message: "" };
125
+ }
126
+ exports.notifychrresponse = {
127
+ encode(message, writer = minimal_1.default.Writer.create()) {
128
+ if (message.status !== "") {
129
+ writer.uint32(10).string(message.status);
130
+ }
131
+ if (message.statusCode !== 0) {
132
+ writer.uint32(16).int32(message.statusCode);
133
+ }
134
+ if (message.message !== "") {
135
+ writer.uint32(26).string(message.message);
136
+ }
137
+ return writer;
138
+ },
139
+ decode(input, length) {
140
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
141
+ let end = length === undefined ? reader.len : reader.pos + length;
142
+ const message = createBasenotifychrresponse();
143
+ while (reader.pos < end) {
144
+ const tag = reader.uint32();
145
+ switch (tag >>> 3) {
146
+ case 1:
147
+ if (tag !== 10) {
148
+ break;
149
+ }
150
+ message.status = reader.string();
151
+ continue;
152
+ case 2:
153
+ if (tag !== 16) {
154
+ break;
155
+ }
156
+ message.statusCode = reader.int32();
157
+ continue;
158
+ case 3:
159
+ if (tag !== 26) {
160
+ break;
161
+ }
162
+ message.message = reader.string();
163
+ continue;
164
+ }
165
+ if ((tag & 7) === 4 || tag === 0) {
166
+ break;
167
+ }
168
+ reader.skipType(tag & 7);
169
+ }
170
+ return message;
171
+ },
172
+ fromJSON(object) {
173
+ return {
174
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
175
+ statusCode: isSet(object.statusCode) ? globalThis.Number(object.statusCode) : 0,
176
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
177
+ };
178
+ },
179
+ toJSON(message) {
180
+ const obj = {};
181
+ if (message.status !== "") {
182
+ obj.status = message.status;
183
+ }
184
+ if (message.statusCode !== 0) {
185
+ obj.statusCode = Math.round(message.statusCode);
186
+ }
187
+ if (message.message !== "") {
188
+ obj.message = message.message;
189
+ }
190
+ return obj;
191
+ },
192
+ create(base) {
193
+ return exports.notifychrresponse.fromPartial(base ?? {});
194
+ },
195
+ fromPartial(object) {
196
+ const message = createBasenotifychrresponse();
197
+ message.status = object.status ?? "";
198
+ message.statusCode = object.statusCode ?? 0;
199
+ message.message = object.message ?? "";
200
+ return message;
201
+ },
202
+ };
203
+ function isSet(value) {
204
+ return value !== null && value !== undefined;
205
+ }
package/ts/growth.d.ts CHANGED
@@ -5,7 +5,7 @@ import { paymentstatusrequest, paymentstatusresponse } from "./growth/getchrpaym
5
5
  import { chrplansrequest, chrplansresponse } from "./growth/getchrplans";
6
6
  import { credithealthreportrequest, credithealthreportresponse } from "./growth/getcredithealthreport";
7
7
  import { initiatepaymentrequest, initiatepaymentresponse } from "./growth/initiatepayment";
8
- import { processchrrequest, processchrresponse } from "./growth/processchrpayment";
8
+ import { notifychrrequest, notifychrresponse } from "./growth/notifychrpayment";
9
9
  export declare const protobufPackage = "service";
10
10
  export type growthService = typeof growthService;
11
11
  export declare const growthService: {
@@ -13,10 +13,10 @@ export declare const growthService: {
13
13
  readonly path: "/service.growth/processchrpayment";
14
14
  readonly requestStream: false;
15
15
  readonly responseStream: false;
16
- readonly requestSerialize: (value: processchrrequest) => Buffer;
17
- readonly requestDeserialize: (value: Buffer) => processchrrequest;
18
- readonly responseSerialize: (value: processchrresponse) => Buffer;
19
- readonly responseDeserialize: (value: Buffer) => processchrresponse;
16
+ readonly requestSerialize: (value: notifychrrequest) => Buffer;
17
+ readonly requestDeserialize: (value: Buffer) => notifychrrequest;
18
+ readonly responseSerialize: (value: notifychrresponse) => Buffer;
19
+ readonly responseDeserialize: (value: Buffer) => notifychrresponse;
20
20
  };
21
21
  readonly checkplanstatus: {
22
22
  readonly path: "/service.growth/checkplanstatus";
@@ -74,7 +74,7 @@ export declare const growthService: {
74
74
  };
75
75
  };
76
76
  export interface growthServer extends UntypedServiceImplementation {
77
- processchrpayment: handleUnaryCall<processchrrequest, processchrresponse>;
77
+ processchrpayment: handleUnaryCall<notifychrrequest, notifychrresponse>;
78
78
  checkplanstatus: handleUnaryCall<chrplansstatusrequest, chrplanstatusresponse>;
79
79
  getattachplandetails: handleUnaryCall<chrattachplanrequest, chrattachplanresponse>;
80
80
  getchrplans: handleUnaryCall<chrplansrequest, chrplansresponse>;
@@ -83,9 +83,9 @@ export interface growthServer extends UntypedServiceImplementation {
83
83
  getchrpaymentstatus: handleUnaryCall<paymentstatusrequest, paymentstatusresponse>;
84
84
  }
85
85
  export interface growthClient extends Client {
86
- processchrpayment(request: processchrrequest, callback: (error: ServiceError | null, response: processchrresponse) => void): ClientUnaryCall;
87
- processchrpayment(request: processchrrequest, metadata: Metadata, callback: (error: ServiceError | null, response: processchrresponse) => void): ClientUnaryCall;
88
- processchrpayment(request: processchrrequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: processchrresponse) => void): ClientUnaryCall;
86
+ processchrpayment(request: notifychrrequest, callback: (error: ServiceError | null, response: notifychrresponse) => void): ClientUnaryCall;
87
+ processchrpayment(request: notifychrrequest, metadata: Metadata, callback: (error: ServiceError | null, response: notifychrresponse) => void): ClientUnaryCall;
88
+ processchrpayment(request: notifychrrequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: notifychrresponse) => void): ClientUnaryCall;
89
89
  checkplanstatus(request: chrplansstatusrequest, callback: (error: ServiceError | null, response: chrplanstatusresponse) => void): ClientUnaryCall;
90
90
  checkplanstatus(request: chrplansstatusrequest, metadata: Metadata, callback: (error: ServiceError | null, response: chrplanstatusresponse) => void): ClientUnaryCall;
91
91
  checkplanstatus(request: chrplansstatusrequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: chrplanstatusresponse) => void): ClientUnaryCall;
package/ts/growth.js CHANGED
@@ -14,17 +14,17 @@ const getchrpaymentstatus_1 = require("./growth/getchrpaymentstatus");
14
14
  const getchrplans_1 = require("./growth/getchrplans");
15
15
  const getcredithealthreport_1 = require("./growth/getcredithealthreport");
16
16
  const initiatepayment_1 = require("./growth/initiatepayment");
17
- const processchrpayment_1 = require("./growth/processchrpayment");
17
+ const notifychrpayment_1 = require("./growth/notifychrpayment");
18
18
  exports.protobufPackage = "service";
19
19
  exports.growthService = {
20
20
  processchrpayment: {
21
21
  path: "/service.growth/processchrpayment",
22
22
  requestStream: false,
23
23
  responseStream: false,
24
- requestSerialize: (value) => Buffer.from(processchrpayment_1.processchrrequest.encode(value).finish()),
25
- requestDeserialize: (value) => processchrpayment_1.processchrrequest.decode(value),
26
- responseSerialize: (value) => Buffer.from(processchrpayment_1.processchrresponse.encode(value).finish()),
27
- responseDeserialize: (value) => processchrpayment_1.processchrresponse.decode(value),
24
+ requestSerialize: (value) => Buffer.from(notifychrpayment_1.notifychrrequest.encode(value).finish()),
25
+ requestDeserialize: (value) => notifychrpayment_1.notifychrrequest.decode(value),
26
+ responseSerialize: (value) => Buffer.from(notifychrpayment_1.notifychrresponse.encode(value).finish()),
27
+ responseDeserialize: (value) => notifychrpayment_1.notifychrresponse.decode(value),
28
28
  },
29
29
  checkplanstatus: {
30
30
  path: "/service.growth/checkplanstatus",