@stashfin/grpc 1.2.253 → 1.2.254

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.253",
3
+ "version": "1.2.254",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -0,0 +1,36 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "customers.updatecategory";
3
+ export interface updateCategoryRequest {
4
+ customer_id: string;
5
+ category: string;
6
+ }
7
+ export interface updateCategoryResponse {
8
+ status: string;
9
+ }
10
+ export declare const updateCategoryRequest: {
11
+ encode(message: updateCategoryRequest, writer?: _m0.Writer): _m0.Writer;
12
+ decode(input: _m0.Reader | Uint8Array, length?: number): updateCategoryRequest;
13
+ fromJSON(object: any): updateCategoryRequest;
14
+ toJSON(message: updateCategoryRequest): unknown;
15
+ create<I extends Exact<DeepPartial<updateCategoryRequest>, I>>(base?: I): updateCategoryRequest;
16
+ fromPartial<I extends Exact<DeepPartial<updateCategoryRequest>, I>>(object: I): updateCategoryRequest;
17
+ };
18
+ export declare const updateCategoryResponse: {
19
+ encode(message: updateCategoryResponse, writer?: _m0.Writer): _m0.Writer;
20
+ decode(input: _m0.Reader | Uint8Array, length?: number): updateCategoryResponse;
21
+ fromJSON(object: any): updateCategoryResponse;
22
+ toJSON(message: updateCategoryResponse): unknown;
23
+ create<I extends Exact<DeepPartial<updateCategoryResponse>, I>>(base?: I): updateCategoryResponse;
24
+ fromPartial<I extends Exact<DeepPartial<updateCategoryResponse>, I>>(object: I): updateCategoryResponse;
25
+ };
26
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
27
+ 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 {} ? {
28
+ [K in keyof T]?: DeepPartial<T[K]>;
29
+ } : Partial<T>;
30
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
31
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
32
+ [K in keyof P]: Exact<P[K], I[K]>;
33
+ } & {
34
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
35
+ };
36
+ export {};
@@ -0,0 +1,133 @@
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.1
6
+ // source: customers/updatecategory.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.updateCategoryResponse = exports.updateCategoryRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "customers.updatecategory";
15
+ function createBaseupdateCategoryRequest() {
16
+ return { customer_id: "", category: "" };
17
+ }
18
+ exports.updateCategoryRequest = {
19
+ encode(message, writer = minimal_1.default.Writer.create()) {
20
+ if (message.customer_id !== "") {
21
+ writer.uint32(10).string(message.customer_id);
22
+ }
23
+ if (message.category !== "") {
24
+ writer.uint32(18).string(message.category);
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 = createBaseupdateCategoryRequest();
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.customer_id = reader.string();
40
+ continue;
41
+ case 2:
42
+ if (tag !== 18) {
43
+ break;
44
+ }
45
+ message.category = 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
+ customer_id: isSet(object.customer_id) ? globalThis.String(object.customer_id) : "",
58
+ category: isSet(object.category) ? globalThis.String(object.category) : "",
59
+ };
60
+ },
61
+ toJSON(message) {
62
+ const obj = {};
63
+ if (message.customer_id !== "") {
64
+ obj.customer_id = message.customer_id;
65
+ }
66
+ if (message.category !== "") {
67
+ obj.category = message.category;
68
+ }
69
+ return obj;
70
+ },
71
+ create(base) {
72
+ return exports.updateCategoryRequest.fromPartial(base ?? {});
73
+ },
74
+ fromPartial(object) {
75
+ const message = createBaseupdateCategoryRequest();
76
+ message.customer_id = object.customer_id ?? "";
77
+ message.category = object.category ?? "";
78
+ return message;
79
+ },
80
+ };
81
+ function createBaseupdateCategoryResponse() {
82
+ return { status: "" };
83
+ }
84
+ exports.updateCategoryResponse = {
85
+ encode(message, writer = minimal_1.default.Writer.create()) {
86
+ if (message.status !== "") {
87
+ writer.uint32(10).string(message.status);
88
+ }
89
+ return writer;
90
+ },
91
+ decode(input, length) {
92
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
93
+ let end = length === undefined ? reader.len : reader.pos + length;
94
+ const message = createBaseupdateCategoryResponse();
95
+ while (reader.pos < end) {
96
+ const tag = reader.uint32();
97
+ switch (tag >>> 3) {
98
+ case 1:
99
+ if (tag !== 10) {
100
+ break;
101
+ }
102
+ message.status = reader.string();
103
+ continue;
104
+ }
105
+ if ((tag & 7) === 4 || tag === 0) {
106
+ break;
107
+ }
108
+ reader.skipType(tag & 7);
109
+ }
110
+ return message;
111
+ },
112
+ fromJSON(object) {
113
+ return { status: isSet(object.status) ? globalThis.String(object.status) : "" };
114
+ },
115
+ toJSON(message) {
116
+ const obj = {};
117
+ if (message.status !== "") {
118
+ obj.status = message.status;
119
+ }
120
+ return obj;
121
+ },
122
+ create(base) {
123
+ return exports.updateCategoryResponse.fromPartial(base ?? {});
124
+ },
125
+ fromPartial(object) {
126
+ const message = createBaseupdateCategoryResponse();
127
+ message.status = object.status ?? "";
128
+ return message;
129
+ },
130
+ };
131
+ function isSet(value) {
132
+ return value !== null && value !== undefined;
133
+ }
package/ts/customers.d.ts CHANGED
@@ -62,6 +62,7 @@ import { sendOtpRequest, sendOtpRespone } from "./customers/sendotp";
62
62
  import { sendEmailOtpRequest, sendEmailOtpResponse } from "./customers/sendotptoemail";
63
63
  import { setMpinRequest, setMpinResponse } from "./customers/setmpin";
64
64
  import { skipScreenRequest, skipScreenResponse } from "./customers/skipscreen";
65
+ import { updateCategoryRequest, updateCategoryResponse } from "./customers/updatecategory";
65
66
  import { updateCustomerByIdRequest, updateCustomerByIdResponse } from "./customers/updatecustomerbyid";
66
67
  import { updateDlNumberRequest, updateDlNumberResponse } from "./customers/updatedlnumber";
67
68
  import { updateDOBRequest, updateDOBResponse } from "./customers/updatedob";
@@ -790,6 +791,15 @@ export declare const customersService: {
790
791
  readonly responseSerialize: (value: updateFreedomTxnStatusResponse) => Buffer;
791
792
  readonly responseDeserialize: (value: Buffer) => updateFreedomTxnStatusResponse;
792
793
  };
794
+ readonly updateCategory: {
795
+ readonly path: "/service.customers/updateCategory";
796
+ readonly requestStream: false;
797
+ readonly responseStream: false;
798
+ readonly requestSerialize: (value: updateCategoryRequest) => Buffer;
799
+ readonly requestDeserialize: (value: Buffer) => updateCategoryRequest;
800
+ readonly responseSerialize: (value: updateCategoryResponse) => Buffer;
801
+ readonly responseDeserialize: (value: Buffer) => updateCategoryResponse;
802
+ };
793
803
  };
794
804
  export interface customersServer extends UntypedServiceImplementation {
795
805
  sendOtp: handleUnaryCall<sendOtpRequest, sendOtpRespone>;
@@ -871,6 +881,7 @@ export interface customersServer extends UntypedServiceImplementation {
871
881
  freedomPayNow: handleUnaryCall<freedomPayNowRequest, freedomPayNowResponse>;
872
882
  getFreedomTxnStatus: handleUnaryCall<getFreedomTxnStatusRequest, getFreedomTxnStatusResponse>;
873
883
  updateFreedomTxnStatus: handleUnaryCall<updateFreedomTxnStatusRequest, updateFreedomTxnStatusResponse>;
884
+ updateCategory: handleUnaryCall<updateCategoryRequest, updateCategoryResponse>;
874
885
  }
875
886
  export interface customersClient extends Client {
876
887
  sendOtp(request: sendOtpRequest, callback: (error: ServiceError | null, response: sendOtpRespone) => void): ClientUnaryCall;
@@ -1110,6 +1121,9 @@ export interface customersClient extends Client {
1110
1121
  updateFreedomTxnStatus(request: updateFreedomTxnStatusRequest, callback: (error: ServiceError | null, response: updateFreedomTxnStatusResponse) => void): ClientUnaryCall;
1111
1122
  updateFreedomTxnStatus(request: updateFreedomTxnStatusRequest, metadata: Metadata, callback: (error: ServiceError | null, response: updateFreedomTxnStatusResponse) => void): ClientUnaryCall;
1112
1123
  updateFreedomTxnStatus(request: updateFreedomTxnStatusRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: updateFreedomTxnStatusResponse) => void): ClientUnaryCall;
1124
+ updateCategory(request: updateCategoryRequest, callback: (error: ServiceError | null, response: updateCategoryResponse) => void): ClientUnaryCall;
1125
+ updateCategory(request: updateCategoryRequest, metadata: Metadata, callback: (error: ServiceError | null, response: updateCategoryResponse) => void): ClientUnaryCall;
1126
+ updateCategory(request: updateCategoryRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: updateCategoryResponse) => void): ClientUnaryCall;
1113
1127
  }
1114
1128
  export declare const customersClient: {
1115
1129
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): customersClient;
package/ts/customers.js CHANGED
@@ -71,6 +71,7 @@ const sendotp_1 = require("./customers/sendotp");
71
71
  const sendotptoemail_1 = require("./customers/sendotptoemail");
72
72
  const setmpin_1 = require("./customers/setmpin");
73
73
  const skipscreen_1 = require("./customers/skipscreen");
74
+ const updatecategory_1 = require("./customers/updatecategory");
74
75
  const updatecustomerbyid_1 = require("./customers/updatecustomerbyid");
75
76
  const updatedlnumber_1 = require("./customers/updatedlnumber");
76
77
  const updatedob_1 = require("./customers/updatedob");
@@ -798,5 +799,14 @@ exports.customersService = {
798
799
  responseSerialize: (value) => Buffer.from(updatefreedomtxnstatus_1.updateFreedomTxnStatusResponse.encode(value).finish()),
799
800
  responseDeserialize: (value) => updatefreedomtxnstatus_1.updateFreedomTxnStatusResponse.decode(value),
800
801
  },
802
+ updateCategory: {
803
+ path: "/service.customers/updateCategory",
804
+ requestStream: false,
805
+ responseStream: false,
806
+ requestSerialize: (value) => Buffer.from(updatecategory_1.updateCategoryRequest.encode(value).finish()),
807
+ requestDeserialize: (value) => updatecategory_1.updateCategoryRequest.decode(value),
808
+ responseSerialize: (value) => Buffer.from(updatecategory_1.updateCategoryResponse.encode(value).finish()),
809
+ responseDeserialize: (value) => updatecategory_1.updateCategoryResponse.decode(value),
810
+ },
801
811
  };
802
812
  exports.customersClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.customersService, "service.customers");
@@ -3,6 +3,9 @@ export declare const protobufPackage = "loans.updatetransactionstatus";
3
3
  export interface updateTransactionStatusRequest {
4
4
  order_id: string;
5
5
  status: string;
6
+ customer_id: number;
7
+ mode: string;
8
+ payment_id: number;
6
9
  }
7
10
  export interface updateTransactionStatusResponse {
8
11
  message: string;
@@ -13,7 +13,7 @@ exports.updateTransactionStatusResponse = exports.updateTransactionStatusRequest
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "loans.updatetransactionstatus";
15
15
  function createBaseupdateTransactionStatusRequest() {
16
- return { order_id: "", status: "" };
16
+ return { order_id: "", status: "", customer_id: 0, mode: "", payment_id: 0 };
17
17
  }
18
18
  exports.updateTransactionStatusRequest = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -23,6 +23,15 @@ exports.updateTransactionStatusRequest = {
23
23
  if (message.status !== "") {
24
24
  writer.uint32(18).string(message.status);
25
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.payment_id !== 0) {
33
+ writer.uint32(40).int32(message.payment_id);
34
+ }
26
35
  return writer;
27
36
  },
28
37
  decode(input, length) {
@@ -44,6 +53,24 @@ exports.updateTransactionStatusRequest = {
44
53
  }
45
54
  message.status = reader.string();
46
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 !== 40) {
70
+ break;
71
+ }
72
+ message.payment_id = reader.int32();
73
+ continue;
47
74
  }
48
75
  if ((tag & 7) === 4 || tag === 0) {
49
76
  break;
@@ -56,6 +83,9 @@ exports.updateTransactionStatusRequest = {
56
83
  return {
57
84
  order_id: isSet(object.order_id) ? globalThis.String(object.order_id) : "",
58
85
  status: isSet(object.status) ? globalThis.String(object.status) : "",
86
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
87
+ mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
88
+ payment_id: isSet(object.payment_id) ? globalThis.Number(object.payment_id) : 0,
59
89
  };
60
90
  },
61
91
  toJSON(message) {
@@ -66,6 +96,15 @@ exports.updateTransactionStatusRequest = {
66
96
  if (message.status !== "") {
67
97
  obj.status = message.status;
68
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.payment_id !== 0) {
106
+ obj.payment_id = Math.round(message.payment_id);
107
+ }
69
108
  return obj;
70
109
  },
71
110
  create(base) {
@@ -75,6 +114,9 @@ exports.updateTransactionStatusRequest = {
75
114
  const message = createBaseupdateTransactionStatusRequest();
76
115
  message.order_id = object.order_id ?? "";
77
116
  message.status = object.status ?? "";
117
+ message.customer_id = object.customer_id ?? 0;
118
+ message.mode = object.mode ?? "";
119
+ message.payment_id = object.payment_id ?? 0;
78
120
  return message;
79
121
  },
80
122
  };