@stashfin/grpc 1.2.603 → 1.2.604

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.603",
3
+ "version": "1.2.604",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -1,7 +1,6 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "banking.aa.initiate";
3
3
  export interface initiateRequest {
4
- loan_id: number;
5
4
  journey_type: string;
6
5
  bank_ids: string[];
7
6
  customer_id: number;
@@ -14,21 +14,18 @@ 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: "", bank_ids: [], customer_id: 0 };
17
+ return { journey_type: "", bank_ids: [], customer_id: 0 };
18
18
  }
19
19
  exports.initiateRequest = {
20
20
  encode(message, writer = minimal_1.default.Writer.create()) {
21
- if (message.loan_id !== 0) {
22
- writer.uint32(8).int64(message.loan_id);
23
- }
24
21
  if (message.journey_type !== "") {
25
- writer.uint32(18).string(message.journey_type);
22
+ writer.uint32(10).string(message.journey_type);
26
23
  }
27
24
  for (const v of message.bank_ids) {
28
- writer.uint32(26).string(v);
25
+ writer.uint32(18).string(v);
29
26
  }
30
27
  if (message.customer_id !== 0) {
31
- writer.uint32(32).int64(message.customer_id);
28
+ writer.uint32(24).int64(message.customer_id);
32
29
  }
33
30
  return writer;
34
31
  },
@@ -40,25 +37,19 @@ exports.initiateRequest = {
40
37
  const tag = reader.uint32();
41
38
  switch (tag >>> 3) {
42
39
  case 1:
43
- if (tag !== 8) {
40
+ if (tag !== 10) {
44
41
  break;
45
42
  }
46
- message.loan_id = longToNumber(reader.int64());
43
+ message.journey_type = reader.string();
47
44
  continue;
48
45
  case 2:
49
46
  if (tag !== 18) {
50
47
  break;
51
48
  }
52
- message.journey_type = reader.string();
53
- continue;
54
- case 3:
55
- if (tag !== 26) {
56
- break;
57
- }
58
49
  message.bank_ids.push(reader.string());
59
50
  continue;
60
- case 4:
61
- if (tag !== 32) {
51
+ case 3:
52
+ if (tag !== 24) {
62
53
  break;
63
54
  }
64
55
  message.customer_id = longToNumber(reader.int64());
@@ -73,7 +64,6 @@ exports.initiateRequest = {
73
64
  },
74
65
  fromJSON(object) {
75
66
  return {
76
- loan_id: isSet(object.loan_id) ? globalThis.Number(object.loan_id) : 0,
77
67
  journey_type: isSet(object.journey_type) ? globalThis.String(object.journey_type) : "",
78
68
  bank_ids: globalThis.Array.isArray(object?.bank_ids) ? object.bank_ids.map((e) => globalThis.String(e)) : [],
79
69
  customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
@@ -81,9 +71,6 @@ exports.initiateRequest = {
81
71
  },
82
72
  toJSON(message) {
83
73
  const obj = {};
84
- if (message.loan_id !== 0) {
85
- obj.loan_id = Math.round(message.loan_id);
86
- }
87
74
  if (message.journey_type !== "") {
88
75
  obj.journey_type = message.journey_type;
89
76
  }
@@ -100,7 +87,6 @@ exports.initiateRequest = {
100
87
  },
101
88
  fromPartial(object) {
102
89
  const message = createBaseinitiateRequest();
103
- message.loan_id = object.loan_id ?? 0;
104
90
  message.journey_type = object.journey_type ?? "";
105
91
  message.bank_ids = object.bank_ids?.map((e) => e) || [];
106
92
  message.customer_id = object.customer_id ?? 0;
@@ -7,6 +7,7 @@ import { sendOtpRequest, sendOtpResponse } from "./eqxcustomers/sendotp";
7
7
  import { updateNotificationRequest, updateNotificationResponse } from "./eqxcustomers/updatenotification";
8
8
  import { updatePushIdRequest, updatePushIdResponse } from "./eqxcustomers/updatepushid";
9
9
  import { verifyOtpReqeust, verifyOtpResponse } from "./eqxcustomers/verifyotp";
10
+ import { VerifyTokenRequest, VerifyTokenResponse } from "./eqxcustomers/verifytoken";
10
11
  export declare const protobufPackage = "service";
11
12
  export type eqxcustomersService = typeof eqxcustomersService;
12
13
  export declare const eqxcustomersService: {
@@ -82,6 +83,15 @@ export declare const eqxcustomersService: {
82
83
  readonly responseSerialize: (value: updateNotificationResponse) => Buffer;
83
84
  readonly responseDeserialize: (value: Buffer) => updateNotificationResponse;
84
85
  };
86
+ readonly verifyToken: {
87
+ readonly path: "/service.eqxcustomers/VerifyToken";
88
+ readonly requestStream: false;
89
+ readonly responseStream: false;
90
+ readonly requestSerialize: (value: VerifyTokenRequest) => Buffer;
91
+ readonly requestDeserialize: (value: Buffer) => VerifyTokenRequest;
92
+ readonly responseSerialize: (value: VerifyTokenResponse) => Buffer;
93
+ readonly responseDeserialize: (value: Buffer) => VerifyTokenResponse;
94
+ };
85
95
  };
86
96
  export interface eqxcustomersServer extends UntypedServiceImplementation {
87
97
  sendOtp: handleUnaryCall<sendOtpRequest, sendOtpResponse>;
@@ -92,6 +102,7 @@ export interface eqxcustomersServer extends UntypedServiceImplementation {
92
102
  updatePushId: handleUnaryCall<updatePushIdRequest, updatePushIdResponse>;
93
103
  getnotifications: handleUnaryCall<getNotificationsRequest, getNotificationsResponse>;
94
104
  updateNotifications: handleUnaryCall<updateNotificationRequest, updateNotificationResponse>;
105
+ verifyToken: handleUnaryCall<VerifyTokenRequest, VerifyTokenResponse>;
95
106
  }
96
107
  export interface eqxcustomersClient extends Client {
97
108
  sendOtp(request: sendOtpRequest, callback: (error: ServiceError | null, response: sendOtpResponse) => void): ClientUnaryCall;
@@ -118,6 +129,9 @@ export interface eqxcustomersClient extends Client {
118
129
  updateNotifications(request: updateNotificationRequest, callback: (error: ServiceError | null, response: updateNotificationResponse) => void): ClientUnaryCall;
119
130
  updateNotifications(request: updateNotificationRequest, metadata: Metadata, callback: (error: ServiceError | null, response: updateNotificationResponse) => void): ClientUnaryCall;
120
131
  updateNotifications(request: updateNotificationRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: updateNotificationResponse) => void): ClientUnaryCall;
132
+ verifyToken(request: VerifyTokenRequest, callback: (error: ServiceError | null, response: VerifyTokenResponse) => void): ClientUnaryCall;
133
+ verifyToken(request: VerifyTokenRequest, metadata: Metadata, callback: (error: ServiceError | null, response: VerifyTokenResponse) => void): ClientUnaryCall;
134
+ verifyToken(request: VerifyTokenRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: VerifyTokenResponse) => void): ClientUnaryCall;
121
135
  }
122
136
  export declare const eqxcustomersClient: {
123
137
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): eqxcustomersClient;
package/ts/eqxcustomer.js CHANGED
@@ -16,6 +16,7 @@ const sendotp_1 = require("./eqxcustomers/sendotp");
16
16
  const updatenotification_1 = require("./eqxcustomers/updatenotification");
17
17
  const updatepushid_1 = require("./eqxcustomers/updatepushid");
18
18
  const verifyotp_1 = require("./eqxcustomers/verifyotp");
19
+ const verifytoken_1 = require("./eqxcustomers/verifytoken");
19
20
  exports.protobufPackage = "service";
20
21
  exports.eqxcustomersService = {
21
22
  sendOtp: {
@@ -90,5 +91,14 @@ exports.eqxcustomersService = {
90
91
  responseSerialize: (value) => Buffer.from(updatenotification_1.updateNotificationResponse.encode(value).finish()),
91
92
  responseDeserialize: (value) => updatenotification_1.updateNotificationResponse.decode(value),
92
93
  },
94
+ verifyToken: {
95
+ path: "/service.eqxcustomers/VerifyToken",
96
+ requestStream: false,
97
+ responseStream: false,
98
+ requestSerialize: (value) => Buffer.from(verifytoken_1.VerifyTokenRequest.encode(value).finish()),
99
+ requestDeserialize: (value) => verifytoken_1.VerifyTokenRequest.decode(value),
100
+ responseSerialize: (value) => Buffer.from(verifytoken_1.VerifyTokenResponse.encode(value).finish()),
101
+ responseDeserialize: (value) => verifytoken_1.VerifyTokenResponse.decode(value),
102
+ },
93
103
  };
94
104
  exports.eqxcustomersClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.eqxcustomersService, "service.eqxcustomers");
@@ -0,0 +1,36 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "eqxcustomers.verifytoken";
3
+ export interface VerifyTokenRequest {
4
+ token: string;
5
+ }
6
+ export interface VerifyTokenResponse {
7
+ is_valid: boolean;
8
+ customer_id: number;
9
+ }
10
+ export declare const VerifyTokenRequest: {
11
+ encode(message: VerifyTokenRequest, writer?: _m0.Writer): _m0.Writer;
12
+ decode(input: _m0.Reader | Uint8Array, length?: number): VerifyTokenRequest;
13
+ fromJSON(object: any): VerifyTokenRequest;
14
+ toJSON(message: VerifyTokenRequest): unknown;
15
+ create<I extends Exact<DeepPartial<VerifyTokenRequest>, I>>(base?: I): VerifyTokenRequest;
16
+ fromPartial<I extends Exact<DeepPartial<VerifyTokenRequest>, I>>(object: I): VerifyTokenRequest;
17
+ };
18
+ export declare const VerifyTokenResponse: {
19
+ encode(message: VerifyTokenResponse, writer?: _m0.Writer): _m0.Writer;
20
+ decode(input: _m0.Reader | Uint8Array, length?: number): VerifyTokenResponse;
21
+ fromJSON(object: any): VerifyTokenResponse;
22
+ toJSON(message: VerifyTokenResponse): unknown;
23
+ create<I extends Exact<DeepPartial<VerifyTokenResponse>, I>>(base?: I): VerifyTokenResponse;
24
+ fromPartial<I extends Exact<DeepPartial<VerifyTokenResponse>, I>>(object: I): VerifyTokenResponse;
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,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.29.3
6
+ // source: eqxcustomers/verifytoken.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.VerifyTokenResponse = exports.VerifyTokenRequest = 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 = "eqxcustomers.verifytoken";
16
+ function createBaseVerifyTokenRequest() {
17
+ return { token: "" };
18
+ }
19
+ exports.VerifyTokenRequest = {
20
+ encode(message, writer = minimal_1.default.Writer.create()) {
21
+ if (message.token !== "") {
22
+ writer.uint32(10).string(message.token);
23
+ }
24
+ return writer;
25
+ },
26
+ decode(input, length) {
27
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
28
+ let end = length === undefined ? reader.len : reader.pos + length;
29
+ const message = createBaseVerifyTokenRequest();
30
+ while (reader.pos < end) {
31
+ const tag = reader.uint32();
32
+ switch (tag >>> 3) {
33
+ case 1:
34
+ if (tag !== 10) {
35
+ break;
36
+ }
37
+ message.token = reader.string();
38
+ continue;
39
+ }
40
+ if ((tag & 7) === 4 || tag === 0) {
41
+ break;
42
+ }
43
+ reader.skipType(tag & 7);
44
+ }
45
+ return message;
46
+ },
47
+ fromJSON(object) {
48
+ return { token: isSet(object.token) ? globalThis.String(object.token) : "" };
49
+ },
50
+ toJSON(message) {
51
+ const obj = {};
52
+ if (message.token !== "") {
53
+ obj.token = message.token;
54
+ }
55
+ return obj;
56
+ },
57
+ create(base) {
58
+ return exports.VerifyTokenRequest.fromPartial(base ?? {});
59
+ },
60
+ fromPartial(object) {
61
+ const message = createBaseVerifyTokenRequest();
62
+ message.token = object.token ?? "";
63
+ return message;
64
+ },
65
+ };
66
+ function createBaseVerifyTokenResponse() {
67
+ return { is_valid: false, customer_id: 0 };
68
+ }
69
+ exports.VerifyTokenResponse = {
70
+ encode(message, writer = minimal_1.default.Writer.create()) {
71
+ if (message.is_valid !== false) {
72
+ writer.uint32(8).bool(message.is_valid);
73
+ }
74
+ if (message.customer_id !== 0) {
75
+ writer.uint32(16).int64(message.customer_id);
76
+ }
77
+ return writer;
78
+ },
79
+ decode(input, length) {
80
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
81
+ let end = length === undefined ? reader.len : reader.pos + length;
82
+ const message = createBaseVerifyTokenResponse();
83
+ while (reader.pos < end) {
84
+ const tag = reader.uint32();
85
+ switch (tag >>> 3) {
86
+ case 1:
87
+ if (tag !== 8) {
88
+ break;
89
+ }
90
+ message.is_valid = reader.bool();
91
+ continue;
92
+ case 2:
93
+ if (tag !== 16) {
94
+ break;
95
+ }
96
+ message.customer_id = longToNumber(reader.int64());
97
+ continue;
98
+ }
99
+ if ((tag & 7) === 4 || tag === 0) {
100
+ break;
101
+ }
102
+ reader.skipType(tag & 7);
103
+ }
104
+ return message;
105
+ },
106
+ fromJSON(object) {
107
+ return {
108
+ is_valid: isSet(object.is_valid) ? globalThis.Boolean(object.is_valid) : false,
109
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
110
+ };
111
+ },
112
+ toJSON(message) {
113
+ const obj = {};
114
+ if (message.is_valid !== false) {
115
+ obj.is_valid = message.is_valid;
116
+ }
117
+ if (message.customer_id !== 0) {
118
+ obj.customer_id = Math.round(message.customer_id);
119
+ }
120
+ return obj;
121
+ },
122
+ create(base) {
123
+ return exports.VerifyTokenResponse.fromPartial(base ?? {});
124
+ },
125
+ fromPartial(object) {
126
+ const message = createBaseVerifyTokenResponse();
127
+ message.is_valid = object.is_valid ?? false;
128
+ message.customer_id = object.customer_id ?? 0;
129
+ return message;
130
+ },
131
+ };
132
+ function longToNumber(long) {
133
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
134
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
135
+ }
136
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
137
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
138
+ }
139
+ return long.toNumber();
140
+ }
141
+ if (minimal_1.default.util.Long !== long_1.default) {
142
+ minimal_1.default.util.Long = long_1.default;
143
+ minimal_1.default.configure();
144
+ }
145
+ function isSet(value) {
146
+ return value !== null && value !== undefined;
147
+ }