@stashfin/grpc 1.2.643 → 1.2.645

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.643",
3
+ "version": "1.2.645",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -1,5 +1,6 @@
1
1
  import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
2
2
  import { getCustomerByIdRequest, getCustomerByIdResponse } from "./eqxcustomers/getcustomerbyid";
3
+ import { getCustomerByMobileRequest, getCustomerByMobileResponse } from "./eqxcustomers/getcustomerbymobile";
3
4
  import { getDashboardRequest, getDashboardResponse } from "./eqxcustomers/getdashboard";
4
5
  import { getDashboardMainCardRequest, getDashboardMainCardResponse } from "./eqxcustomers/getdashboardmaincard";
5
6
  import { getNotificationsRequest, getNotificationsResponse } from "./eqxcustomers/getnotifications";
@@ -102,6 +103,15 @@ export declare const eqxcustomersService: {
102
103
  readonly responseSerialize: (value: getTokensResponse) => Buffer;
103
104
  readonly responseDeserialize: (value: Buffer) => getTokensResponse;
104
105
  };
106
+ readonly getCustomerByMobile: {
107
+ readonly path: "/service.eqxcustomers/getCustomerByMobile";
108
+ readonly requestStream: false;
109
+ readonly responseStream: false;
110
+ readonly requestSerialize: (value: getCustomerByMobileRequest) => Buffer;
111
+ readonly requestDeserialize: (value: Buffer) => getCustomerByMobileRequest;
112
+ readonly responseSerialize: (value: getCustomerByMobileResponse) => Buffer;
113
+ readonly responseDeserialize: (value: Buffer) => getCustomerByMobileResponse;
114
+ };
105
115
  };
106
116
  export interface eqxcustomersServer extends UntypedServiceImplementation {
107
117
  sendOtp: handleUnaryCall<sendOtpRequest, sendOtpResponse>;
@@ -114,6 +124,7 @@ export interface eqxcustomersServer extends UntypedServiceImplementation {
114
124
  updateNotifications: handleUnaryCall<updateNotificationRequest, updateNotificationResponse>;
115
125
  verifyToken: handleUnaryCall<VerifyTokenRequest, VerifyTokenResponse>;
116
126
  getTokens: handleUnaryCall<getTokensRequest, getTokensResponse>;
127
+ getCustomerByMobile: handleUnaryCall<getCustomerByMobileRequest, getCustomerByMobileResponse>;
117
128
  }
118
129
  export interface eqxcustomersClient extends Client {
119
130
  sendOtp(request: sendOtpRequest, callback: (error: ServiceError | null, response: sendOtpResponse) => void): ClientUnaryCall;
@@ -146,6 +157,9 @@ export interface eqxcustomersClient extends Client {
146
157
  getTokens(request: getTokensRequest, callback: (error: ServiceError | null, response: getTokensResponse) => void): ClientUnaryCall;
147
158
  getTokens(request: getTokensRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getTokensResponse) => void): ClientUnaryCall;
148
159
  getTokens(request: getTokensRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getTokensResponse) => void): ClientUnaryCall;
160
+ getCustomerByMobile(request: getCustomerByMobileRequest, callback: (error: ServiceError | null, response: getCustomerByMobileResponse) => void): ClientUnaryCall;
161
+ getCustomerByMobile(request: getCustomerByMobileRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getCustomerByMobileResponse) => void): ClientUnaryCall;
162
+ getCustomerByMobile(request: getCustomerByMobileRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getCustomerByMobileResponse) => void): ClientUnaryCall;
149
163
  }
150
164
  export declare const eqxcustomersClient: {
151
165
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): eqxcustomersClient;
package/ts/eqxcustomer.js CHANGED
@@ -9,6 +9,7 @@ exports.eqxcustomersClient = exports.eqxcustomersService = exports.protobufPacka
9
9
  /* eslint-disable */
10
10
  const grpc_js_1 = require("@grpc/grpc-js");
11
11
  const getcustomerbyid_1 = require("./eqxcustomers/getcustomerbyid");
12
+ const getcustomerbymobile_1 = require("./eqxcustomers/getcustomerbymobile");
12
13
  const getdashboard_1 = require("./eqxcustomers/getdashboard");
13
14
  const getdashboardmaincard_1 = require("./eqxcustomers/getdashboardmaincard");
14
15
  const getnotifications_1 = require("./eqxcustomers/getnotifications");
@@ -110,5 +111,14 @@ exports.eqxcustomersService = {
110
111
  responseSerialize: (value) => Buffer.from(gettokens_1.getTokensResponse.encode(value).finish()),
111
112
  responseDeserialize: (value) => gettokens_1.getTokensResponse.decode(value),
112
113
  },
114
+ getCustomerByMobile: {
115
+ path: "/service.eqxcustomers/getCustomerByMobile",
116
+ requestStream: false,
117
+ responseStream: false,
118
+ requestSerialize: (value) => Buffer.from(getcustomerbymobile_1.getCustomerByMobileRequest.encode(value).finish()),
119
+ requestDeserialize: (value) => getcustomerbymobile_1.getCustomerByMobileRequest.decode(value),
120
+ responseSerialize: (value) => Buffer.from(getcustomerbymobile_1.getCustomerByMobileResponse.encode(value).finish()),
121
+ responseDeserialize: (value) => getcustomerbymobile_1.getCustomerByMobileResponse.decode(value),
122
+ },
113
123
  };
114
124
  exports.eqxcustomersClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.eqxcustomersService, "service.eqxcustomers");
@@ -0,0 +1,39 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "eqxcustomers.getcustomerbymobile";
3
+ export interface getCustomerByMobileRequest {
4
+ }
5
+ export interface getCustomerByMobileResponse {
6
+ id: number;
7
+ mobile: string;
8
+ status: string;
9
+ first_name?: string | undefined;
10
+ last_name?: string | undefined;
11
+ email?: string | undefined;
12
+ }
13
+ export declare const getCustomerByMobileRequest: {
14
+ encode(_: getCustomerByMobileRequest, writer?: _m0.Writer): _m0.Writer;
15
+ decode(input: _m0.Reader | Uint8Array, length?: number): getCustomerByMobileRequest;
16
+ fromJSON(_: any): getCustomerByMobileRequest;
17
+ toJSON(_: getCustomerByMobileRequest): unknown;
18
+ create<I extends Exact<DeepPartial<getCustomerByMobileRequest>, I>>(base?: I): getCustomerByMobileRequest;
19
+ fromPartial<I extends Exact<DeepPartial<getCustomerByMobileRequest>, I>>(_: I): getCustomerByMobileRequest;
20
+ };
21
+ export declare const getCustomerByMobileResponse: {
22
+ encode(message: getCustomerByMobileResponse, writer?: _m0.Writer): _m0.Writer;
23
+ decode(input: _m0.Reader | Uint8Array, length?: number): getCustomerByMobileResponse;
24
+ fromJSON(object: any): getCustomerByMobileResponse;
25
+ toJSON(message: getCustomerByMobileResponse): unknown;
26
+ create<I extends Exact<DeepPartial<getCustomerByMobileResponse>, I>>(base?: I): getCustomerByMobileResponse;
27
+ fromPartial<I extends Exact<DeepPartial<getCustomerByMobileResponse>, I>>(object: I): getCustomerByMobileResponse;
28
+ };
29
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
30
+ 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 {} ? {
31
+ [K in keyof T]?: DeepPartial<T[K]>;
32
+ } : Partial<T>;
33
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
34
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
35
+ [K in keyof P]: Exact<P[K], I[K]>;
36
+ } & {
37
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
38
+ };
39
+ export {};
@@ -0,0 +1,176 @@
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/getcustomerbymobile.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.getCustomerByMobileResponse = exports.getCustomerByMobileRequest = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
+ exports.protobufPackage = "eqxcustomers.getcustomerbymobile";
15
+ function createBasegetCustomerByMobileRequest() {
16
+ return {};
17
+ }
18
+ exports.getCustomerByMobileRequest = {
19
+ encode(_, writer = minimal_1.default.Writer.create()) {
20
+ return writer;
21
+ },
22
+ decode(input, length) {
23
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
24
+ let end = length === undefined ? reader.len : reader.pos + length;
25
+ const message = createBasegetCustomerByMobileRequest();
26
+ while (reader.pos < end) {
27
+ const tag = reader.uint32();
28
+ switch (tag >>> 3) {
29
+ }
30
+ if ((tag & 7) === 4 || tag === 0) {
31
+ break;
32
+ }
33
+ reader.skipType(tag & 7);
34
+ }
35
+ return message;
36
+ },
37
+ fromJSON(_) {
38
+ return {};
39
+ },
40
+ toJSON(_) {
41
+ const obj = {};
42
+ return obj;
43
+ },
44
+ create(base) {
45
+ return exports.getCustomerByMobileRequest.fromPartial(base ?? {});
46
+ },
47
+ fromPartial(_) {
48
+ const message = createBasegetCustomerByMobileRequest();
49
+ return message;
50
+ },
51
+ };
52
+ function createBasegetCustomerByMobileResponse() {
53
+ return { id: 0, mobile: "", status: "", first_name: undefined, last_name: undefined, email: undefined };
54
+ }
55
+ exports.getCustomerByMobileResponse = {
56
+ encode(message, writer = minimal_1.default.Writer.create()) {
57
+ if (message.id !== 0) {
58
+ writer.uint32(8).int32(message.id);
59
+ }
60
+ if (message.mobile !== "") {
61
+ writer.uint32(18).string(message.mobile);
62
+ }
63
+ if (message.status !== "") {
64
+ writer.uint32(26).string(message.status);
65
+ }
66
+ if (message.first_name !== undefined) {
67
+ writer.uint32(34).string(message.first_name);
68
+ }
69
+ if (message.last_name !== undefined) {
70
+ writer.uint32(42).string(message.last_name);
71
+ }
72
+ if (message.email !== undefined) {
73
+ writer.uint32(50).string(message.email);
74
+ }
75
+ return writer;
76
+ },
77
+ decode(input, length) {
78
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
79
+ let end = length === undefined ? reader.len : reader.pos + length;
80
+ const message = createBasegetCustomerByMobileResponse();
81
+ while (reader.pos < end) {
82
+ const tag = reader.uint32();
83
+ switch (tag >>> 3) {
84
+ case 1:
85
+ if (tag !== 8) {
86
+ break;
87
+ }
88
+ message.id = reader.int32();
89
+ continue;
90
+ case 2:
91
+ if (tag !== 18) {
92
+ break;
93
+ }
94
+ message.mobile = reader.string();
95
+ continue;
96
+ case 3:
97
+ if (tag !== 26) {
98
+ break;
99
+ }
100
+ message.status = reader.string();
101
+ continue;
102
+ case 4:
103
+ if (tag !== 34) {
104
+ break;
105
+ }
106
+ message.first_name = reader.string();
107
+ continue;
108
+ case 5:
109
+ if (tag !== 42) {
110
+ break;
111
+ }
112
+ message.last_name = reader.string();
113
+ continue;
114
+ case 6:
115
+ if (tag !== 50) {
116
+ break;
117
+ }
118
+ message.email = reader.string();
119
+ continue;
120
+ }
121
+ if ((tag & 7) === 4 || tag === 0) {
122
+ break;
123
+ }
124
+ reader.skipType(tag & 7);
125
+ }
126
+ return message;
127
+ },
128
+ fromJSON(object) {
129
+ return {
130
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
131
+ mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : "",
132
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
133
+ first_name: isSet(object.first_name) ? globalThis.String(object.first_name) : undefined,
134
+ last_name: isSet(object.last_name) ? globalThis.String(object.last_name) : undefined,
135
+ email: isSet(object.email) ? globalThis.String(object.email) : undefined,
136
+ };
137
+ },
138
+ toJSON(message) {
139
+ const obj = {};
140
+ if (message.id !== 0) {
141
+ obj.id = Math.round(message.id);
142
+ }
143
+ if (message.mobile !== "") {
144
+ obj.mobile = message.mobile;
145
+ }
146
+ if (message.status !== "") {
147
+ obj.status = message.status;
148
+ }
149
+ if (message.first_name !== undefined) {
150
+ obj.first_name = message.first_name;
151
+ }
152
+ if (message.last_name !== undefined) {
153
+ obj.last_name = message.last_name;
154
+ }
155
+ if (message.email !== undefined) {
156
+ obj.email = message.email;
157
+ }
158
+ return obj;
159
+ },
160
+ create(base) {
161
+ return exports.getCustomerByMobileResponse.fromPartial(base ?? {});
162
+ },
163
+ fromPartial(object) {
164
+ const message = createBasegetCustomerByMobileResponse();
165
+ message.id = object.id ?? 0;
166
+ message.mobile = object.mobile ?? "";
167
+ message.status = object.status ?? "";
168
+ message.first_name = object.first_name ?? undefined;
169
+ message.last_name = object.last_name ?? undefined;
170
+ message.email = object.email ?? undefined;
171
+ return message;
172
+ },
173
+ };
174
+ function isSet(value) {
175
+ return value !== null && value !== undefined;
176
+ }