@stashfin/grpc 1.2.816 → 1.2.817

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.816",
3
+ "version": "1.2.817",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -1,6 +1,7 @@
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 { authenticatUserRequest, authenticatUserResponse } from "./eqxcustomers/authenticateuser";
3
3
  import { getCreditGuidanceRequest, getCreditGuidanceResponse } from "./eqxcustomers/creditguidance";
4
+ import { getAllTransactionsRequest, getAllTransactionsResponse } from "./eqxcustomers/getalltransactions";
4
5
  import { bankDetailsRequest, bankDetailsResponse } from "./eqxcustomers/getbankaccount";
5
6
  import { getCustomerByIdRequest, getCustomerByIdResponse } from "./eqxcustomers/getcustomerbyid";
6
7
  import { getCustomerByMobileRequest, getCustomerByMobileResponse } from "./eqxcustomers/getcustomerbymobile";
@@ -16,6 +17,7 @@ import { getLoanPlansRequest, getLoanPlansResponse } from "./eqxcustomers/getloa
16
17
  import { getNotificationsRequest, getNotificationsResponse } from "./eqxcustomers/getnotifications";
17
18
  import { getStashScoreProfileByIdRequest, getStashScoreProfileByIdResponse } from "./eqxcustomers/getstashscorecustomerprofile";
18
19
  import { getTnCRequest, getTnCResponse } from "./eqxcustomers/gettnc";
20
+ import { getTNCByCustomerIdRequest, getTNCByCustomerIdResponse } from "./eqxcustomers/gettncbycustomerid";
19
21
  import { getTokensRequest, getTokensResponse } from "./eqxcustomers/gettokens";
20
22
  import { getvpalistRequest, getvpalistResponse } from "./eqxcustomers/getvpalist";
21
23
  import { isCustomerRegisteredRequest, isCustomerRegisteredResponse } from "./eqxcustomers/iscustomerregistered";
@@ -322,6 +324,24 @@ export declare const eqxcustomersService: {
322
324
  readonly responseSerialize: (value: LendingCustomerExistsResponse) => Buffer;
323
325
  readonly responseDeserialize: (value: Buffer) => LendingCustomerExistsResponse;
324
326
  };
327
+ readonly getAllTransactions: {
328
+ readonly path: "/service.eqxcustomers/getAllTransactions";
329
+ readonly requestStream: false;
330
+ readonly responseStream: false;
331
+ readonly requestSerialize: (value: getAllTransactionsRequest) => Buffer;
332
+ readonly requestDeserialize: (value: Buffer) => getAllTransactionsRequest;
333
+ readonly responseSerialize: (value: getAllTransactionsResponse) => Buffer;
334
+ readonly responseDeserialize: (value: Buffer) => getAllTransactionsResponse;
335
+ };
336
+ readonly getTncByCustomerId: {
337
+ readonly path: "/service.eqxcustomers/getTNCByCustomerId";
338
+ readonly requestStream: false;
339
+ readonly responseStream: false;
340
+ readonly requestSerialize: (value: getTNCByCustomerIdRequest) => Buffer;
341
+ readonly requestDeserialize: (value: Buffer) => getTNCByCustomerIdRequest;
342
+ readonly responseSerialize: (value: getTNCByCustomerIdResponse) => Buffer;
343
+ readonly responseDeserialize: (value: Buffer) => getTNCByCustomerIdResponse;
344
+ };
325
345
  };
326
346
  export interface eqxcustomersServer extends UntypedServiceImplementation {
327
347
  sendOtp: handleUnaryCall<sendOtpRequest, sendOtpResponse>;
@@ -356,6 +376,8 @@ export interface eqxcustomersServer extends UntypedServiceImplementation {
356
376
  updateCustomerBasicDetails: handleUnaryCall<updateCustomerBasicDetailsRequest, updateCustomerBasicDetailsResponse>;
357
377
  updateCustomerDeviceDetails: handleUnaryCall<updateCustomerDeviceDetailsRequest, updateCustomerDeviceDetailsResponse>;
358
378
  isLendingCustomerRegistered: handleUnaryCall<LendingCustomerExistsRequest, LendingCustomerExistsResponse>;
379
+ getAllTransactions: handleUnaryCall<getAllTransactionsRequest, getAllTransactionsResponse>;
380
+ getTncByCustomerId: handleUnaryCall<getTNCByCustomerIdRequest, getTNCByCustomerIdResponse>;
359
381
  }
360
382
  export interface eqxcustomersClient extends Client {
361
383
  sendOtp(request: sendOtpRequest, callback: (error: ServiceError | null, response: sendOtpResponse) => void): ClientUnaryCall;
@@ -454,6 +476,12 @@ export interface eqxcustomersClient extends Client {
454
476
  isLendingCustomerRegistered(request: LendingCustomerExistsRequest, callback: (error: ServiceError | null, response: LendingCustomerExistsResponse) => void): ClientUnaryCall;
455
477
  isLendingCustomerRegistered(request: LendingCustomerExistsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: LendingCustomerExistsResponse) => void): ClientUnaryCall;
456
478
  isLendingCustomerRegistered(request: LendingCustomerExistsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: LendingCustomerExistsResponse) => void): ClientUnaryCall;
479
+ getAllTransactions(request: getAllTransactionsRequest, callback: (error: ServiceError | null, response: getAllTransactionsResponse) => void): ClientUnaryCall;
480
+ getAllTransactions(request: getAllTransactionsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getAllTransactionsResponse) => void): ClientUnaryCall;
481
+ getAllTransactions(request: getAllTransactionsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getAllTransactionsResponse) => void): ClientUnaryCall;
482
+ getTncByCustomerId(request: getTNCByCustomerIdRequest, callback: (error: ServiceError | null, response: getTNCByCustomerIdResponse) => void): ClientUnaryCall;
483
+ getTncByCustomerId(request: getTNCByCustomerIdRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getTNCByCustomerIdResponse) => void): ClientUnaryCall;
484
+ getTncByCustomerId(request: getTNCByCustomerIdRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getTNCByCustomerIdResponse) => void): ClientUnaryCall;
457
485
  }
458
486
  export declare const eqxcustomersClient: {
459
487
  new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): eqxcustomersClient;
package/ts/eqxcustomer.js CHANGED
@@ -10,6 +10,7 @@ exports.eqxcustomersClient = exports.eqxcustomersService = exports.protobufPacka
10
10
  const grpc_js_1 = require("@grpc/grpc-js");
11
11
  const authenticateuser_1 = require("./eqxcustomers/authenticateuser");
12
12
  const creditguidance_1 = require("./eqxcustomers/creditguidance");
13
+ const getalltransactions_1 = require("./eqxcustomers/getalltransactions");
13
14
  const getbankaccount_1 = require("./eqxcustomers/getbankaccount");
14
15
  const getcustomerbyid_1 = require("./eqxcustomers/getcustomerbyid");
15
16
  const getcustomerbymobile_1 = require("./eqxcustomers/getcustomerbymobile");
@@ -25,6 +26,7 @@ const getloanplans_1 = require("./eqxcustomers/getloanplans");
25
26
  const getnotifications_1 = require("./eqxcustomers/getnotifications");
26
27
  const getstashscorecustomerprofile_1 = require("./eqxcustomers/getstashscorecustomerprofile");
27
28
  const gettnc_1 = require("./eqxcustomers/gettnc");
29
+ const gettncbycustomerid_1 = require("./eqxcustomers/gettncbycustomerid");
28
30
  const gettokens_1 = require("./eqxcustomers/gettokens");
29
31
  const getvpalist_1 = require("./eqxcustomers/getvpalist");
30
32
  const iscustomerregistered_1 = require("./eqxcustomers/iscustomerregistered");
@@ -330,5 +332,23 @@ exports.eqxcustomersService = {
330
332
  responseSerialize: (value) => Buffer.from(lendingcustomerexists_1.LendingCustomerExistsResponse.encode(value).finish()),
331
333
  responseDeserialize: (value) => lendingcustomerexists_1.LendingCustomerExistsResponse.decode(value),
332
334
  },
335
+ getAllTransactions: {
336
+ path: "/service.eqxcustomers/getAllTransactions",
337
+ requestStream: false,
338
+ responseStream: false,
339
+ requestSerialize: (value) => Buffer.from(getalltransactions_1.getAllTransactionsRequest.encode(value).finish()),
340
+ requestDeserialize: (value) => getalltransactions_1.getAllTransactionsRequest.decode(value),
341
+ responseSerialize: (value) => Buffer.from(getalltransactions_1.getAllTransactionsResponse.encode(value).finish()),
342
+ responseDeserialize: (value) => getalltransactions_1.getAllTransactionsResponse.decode(value),
343
+ },
344
+ getTncByCustomerId: {
345
+ path: "/service.eqxcustomers/getTNCByCustomerId",
346
+ requestStream: false,
347
+ responseStream: false,
348
+ requestSerialize: (value) => Buffer.from(gettncbycustomerid_1.getTNCByCustomerIdRequest.encode(value).finish()),
349
+ requestDeserialize: (value) => gettncbycustomerid_1.getTNCByCustomerIdRequest.decode(value),
350
+ responseSerialize: (value) => Buffer.from(gettncbycustomerid_1.getTNCByCustomerIdResponse.encode(value).finish()),
351
+ responseDeserialize: (value) => gettncbycustomerid_1.getTNCByCustomerIdResponse.decode(value),
352
+ },
333
353
  };
334
354
  exports.eqxcustomersClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.eqxcustomersService, "service.eqxcustomers");
@@ -0,0 +1,51 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "eqxcustomers.getalltransactions";
3
+ export interface getAllTransactionsRequest {
4
+ }
5
+ export interface Customer {
6
+ id: number;
7
+ name: string;
8
+ mobile: string;
9
+ email: string;
10
+ dob: string;
11
+ pin_code: string;
12
+ created_at: string;
13
+ }
14
+ export interface getAllTransactionsResponse {
15
+ customers: Customer[];
16
+ }
17
+ export declare const getAllTransactionsRequest: {
18
+ encode(_: getAllTransactionsRequest, writer?: _m0.Writer): _m0.Writer;
19
+ decode(input: _m0.Reader | Uint8Array, length?: number): getAllTransactionsRequest;
20
+ fromJSON(_: any): getAllTransactionsRequest;
21
+ toJSON(_: getAllTransactionsRequest): unknown;
22
+ create<I extends Exact<DeepPartial<getAllTransactionsRequest>, I>>(base?: I): getAllTransactionsRequest;
23
+ fromPartial<I extends Exact<DeepPartial<getAllTransactionsRequest>, I>>(_: I): getAllTransactionsRequest;
24
+ };
25
+ export declare const Customer: {
26
+ encode(message: Customer, writer?: _m0.Writer): _m0.Writer;
27
+ decode(input: _m0.Reader | Uint8Array, length?: number): Customer;
28
+ fromJSON(object: any): Customer;
29
+ toJSON(message: Customer): unknown;
30
+ create<I extends Exact<DeepPartial<Customer>, I>>(base?: I): Customer;
31
+ fromPartial<I extends Exact<DeepPartial<Customer>, I>>(object: I): Customer;
32
+ };
33
+ export declare const getAllTransactionsResponse: {
34
+ encode(message: getAllTransactionsResponse, writer?: _m0.Writer): _m0.Writer;
35
+ decode(input: _m0.Reader | Uint8Array, length?: number): getAllTransactionsResponse;
36
+ fromJSON(object: any): getAllTransactionsResponse;
37
+ toJSON(message: getAllTransactionsResponse): unknown;
38
+ create<I extends Exact<DeepPartial<getAllTransactionsResponse>, I>>(base?: I): getAllTransactionsResponse;
39
+ fromPartial<I extends Exact<DeepPartial<getAllTransactionsResponse>, I>>(object: I): getAllTransactionsResponse;
40
+ };
41
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
42
+ 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 {} ? {
43
+ [K in keyof T]?: DeepPartial<T[K]>;
44
+ } : Partial<T>;
45
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
46
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
47
+ [K in keyof P]: Exact<P[K], I[K]>;
48
+ } & {
49
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
50
+ };
51
+ export {};
@@ -0,0 +1,258 @@
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 v6.31.1
6
+ // source: eqxcustomers/getalltransactions.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.getAllTransactionsResponse = exports.Customer = exports.getAllTransactionsRequest = 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.getalltransactions";
16
+ function createBasegetAllTransactionsRequest() {
17
+ return {};
18
+ }
19
+ exports.getAllTransactionsRequest = {
20
+ encode(_, writer = minimal_1.default.Writer.create()) {
21
+ return writer;
22
+ },
23
+ decode(input, length) {
24
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
25
+ let end = length === undefined ? reader.len : reader.pos + length;
26
+ const message = createBasegetAllTransactionsRequest();
27
+ while (reader.pos < end) {
28
+ const tag = reader.uint32();
29
+ switch (tag >>> 3) {
30
+ }
31
+ if ((tag & 7) === 4 || tag === 0) {
32
+ break;
33
+ }
34
+ reader.skipType(tag & 7);
35
+ }
36
+ return message;
37
+ },
38
+ fromJSON(_) {
39
+ return {};
40
+ },
41
+ toJSON(_) {
42
+ const obj = {};
43
+ return obj;
44
+ },
45
+ create(base) {
46
+ return exports.getAllTransactionsRequest.fromPartial(base ?? {});
47
+ },
48
+ fromPartial(_) {
49
+ const message = createBasegetAllTransactionsRequest();
50
+ return message;
51
+ },
52
+ };
53
+ function createBaseCustomer() {
54
+ return { id: 0, name: "", mobile: "", email: "", dob: "", pin_code: "", created_at: "" };
55
+ }
56
+ exports.Customer = {
57
+ encode(message, writer = minimal_1.default.Writer.create()) {
58
+ if (message.id !== 0) {
59
+ writer.uint32(8).int64(message.id);
60
+ }
61
+ if (message.name !== "") {
62
+ writer.uint32(18).string(message.name);
63
+ }
64
+ if (message.mobile !== "") {
65
+ writer.uint32(26).string(message.mobile);
66
+ }
67
+ if (message.email !== "") {
68
+ writer.uint32(34).string(message.email);
69
+ }
70
+ if (message.dob !== "") {
71
+ writer.uint32(42).string(message.dob);
72
+ }
73
+ if (message.pin_code !== "") {
74
+ writer.uint32(50).string(message.pin_code);
75
+ }
76
+ if (message.created_at !== "") {
77
+ writer.uint32(58).string(message.created_at);
78
+ }
79
+ return writer;
80
+ },
81
+ decode(input, length) {
82
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
83
+ let end = length === undefined ? reader.len : reader.pos + length;
84
+ const message = createBaseCustomer();
85
+ while (reader.pos < end) {
86
+ const tag = reader.uint32();
87
+ switch (tag >>> 3) {
88
+ case 1:
89
+ if (tag !== 8) {
90
+ break;
91
+ }
92
+ message.id = longToNumber(reader.int64());
93
+ continue;
94
+ case 2:
95
+ if (tag !== 18) {
96
+ break;
97
+ }
98
+ message.name = reader.string();
99
+ continue;
100
+ case 3:
101
+ if (tag !== 26) {
102
+ break;
103
+ }
104
+ message.mobile = reader.string();
105
+ continue;
106
+ case 4:
107
+ if (tag !== 34) {
108
+ break;
109
+ }
110
+ message.email = reader.string();
111
+ continue;
112
+ case 5:
113
+ if (tag !== 42) {
114
+ break;
115
+ }
116
+ message.dob = reader.string();
117
+ continue;
118
+ case 6:
119
+ if (tag !== 50) {
120
+ break;
121
+ }
122
+ message.pin_code = reader.string();
123
+ continue;
124
+ case 7:
125
+ if (tag !== 58) {
126
+ break;
127
+ }
128
+ message.created_at = reader.string();
129
+ continue;
130
+ }
131
+ if ((tag & 7) === 4 || tag === 0) {
132
+ break;
133
+ }
134
+ reader.skipType(tag & 7);
135
+ }
136
+ return message;
137
+ },
138
+ fromJSON(object) {
139
+ return {
140
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
141
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
142
+ mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : "",
143
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
144
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
145
+ pin_code: isSet(object.pin_code) ? globalThis.String(object.pin_code) : "",
146
+ created_at: isSet(object.created_at) ? globalThis.String(object.created_at) : "",
147
+ };
148
+ },
149
+ toJSON(message) {
150
+ const obj = {};
151
+ if (message.id !== 0) {
152
+ obj.id = Math.round(message.id);
153
+ }
154
+ if (message.name !== "") {
155
+ obj.name = message.name;
156
+ }
157
+ if (message.mobile !== "") {
158
+ obj.mobile = message.mobile;
159
+ }
160
+ if (message.email !== "") {
161
+ obj.email = message.email;
162
+ }
163
+ if (message.dob !== "") {
164
+ obj.dob = message.dob;
165
+ }
166
+ if (message.pin_code !== "") {
167
+ obj.pin_code = message.pin_code;
168
+ }
169
+ if (message.created_at !== "") {
170
+ obj.created_at = message.created_at;
171
+ }
172
+ return obj;
173
+ },
174
+ create(base) {
175
+ return exports.Customer.fromPartial(base ?? {});
176
+ },
177
+ fromPartial(object) {
178
+ const message = createBaseCustomer();
179
+ message.id = object.id ?? 0;
180
+ message.name = object.name ?? "";
181
+ message.mobile = object.mobile ?? "";
182
+ message.email = object.email ?? "";
183
+ message.dob = object.dob ?? "";
184
+ message.pin_code = object.pin_code ?? "";
185
+ message.created_at = object.created_at ?? "";
186
+ return message;
187
+ },
188
+ };
189
+ function createBasegetAllTransactionsResponse() {
190
+ return { customers: [] };
191
+ }
192
+ exports.getAllTransactionsResponse = {
193
+ encode(message, writer = minimal_1.default.Writer.create()) {
194
+ for (const v of message.customers) {
195
+ exports.Customer.encode(v, writer.uint32(10).fork()).ldelim();
196
+ }
197
+ return writer;
198
+ },
199
+ decode(input, length) {
200
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
201
+ let end = length === undefined ? reader.len : reader.pos + length;
202
+ const message = createBasegetAllTransactionsResponse();
203
+ while (reader.pos < end) {
204
+ const tag = reader.uint32();
205
+ switch (tag >>> 3) {
206
+ case 1:
207
+ if (tag !== 10) {
208
+ break;
209
+ }
210
+ message.customers.push(exports.Customer.decode(reader, reader.uint32()));
211
+ continue;
212
+ }
213
+ if ((tag & 7) === 4 || tag === 0) {
214
+ break;
215
+ }
216
+ reader.skipType(tag & 7);
217
+ }
218
+ return message;
219
+ },
220
+ fromJSON(object) {
221
+ return {
222
+ customers: globalThis.Array.isArray(object?.customers)
223
+ ? object.customers.map((e) => exports.Customer.fromJSON(e))
224
+ : [],
225
+ };
226
+ },
227
+ toJSON(message) {
228
+ const obj = {};
229
+ if (message.customers?.length) {
230
+ obj.customers = message.customers.map((e) => exports.Customer.toJSON(e));
231
+ }
232
+ return obj;
233
+ },
234
+ create(base) {
235
+ return exports.getAllTransactionsResponse.fromPartial(base ?? {});
236
+ },
237
+ fromPartial(object) {
238
+ const message = createBasegetAllTransactionsResponse();
239
+ message.customers = object.customers?.map((e) => exports.Customer.fromPartial(e)) || [];
240
+ return message;
241
+ },
242
+ };
243
+ function longToNumber(long) {
244
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
245
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
246
+ }
247
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
248
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
249
+ }
250
+ return long.toNumber();
251
+ }
252
+ if (minimal_1.default.util.Long !== long_1.default) {
253
+ minimal_1.default.util.Long = long_1.default;
254
+ minimal_1.default.configure();
255
+ }
256
+ function isSet(value) {
257
+ return value !== null && value !== undefined;
258
+ }
@@ -0,0 +1,51 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "eqxcustomers.gettncbycustomerid";
3
+ export interface getTNCByCustomerIdRequest {
4
+ customer_id: number;
5
+ }
6
+ export interface TNCRecord {
7
+ customer_id: number;
8
+ tnc_accepted: boolean;
9
+ title: string;
10
+ status: string;
11
+ consent_type: string;
12
+ tnc_id: number;
13
+ }
14
+ export interface getTNCByCustomerIdResponse {
15
+ tnc: TNCRecord | undefined;
16
+ }
17
+ export declare const getTNCByCustomerIdRequest: {
18
+ encode(message: getTNCByCustomerIdRequest, writer?: _m0.Writer): _m0.Writer;
19
+ decode(input: _m0.Reader | Uint8Array, length?: number): getTNCByCustomerIdRequest;
20
+ fromJSON(object: any): getTNCByCustomerIdRequest;
21
+ toJSON(message: getTNCByCustomerIdRequest): unknown;
22
+ create<I extends Exact<DeepPartial<getTNCByCustomerIdRequest>, I>>(base?: I): getTNCByCustomerIdRequest;
23
+ fromPartial<I extends Exact<DeepPartial<getTNCByCustomerIdRequest>, I>>(object: I): getTNCByCustomerIdRequest;
24
+ };
25
+ export declare const TNCRecord: {
26
+ encode(message: TNCRecord, writer?: _m0.Writer): _m0.Writer;
27
+ decode(input: _m0.Reader | Uint8Array, length?: number): TNCRecord;
28
+ fromJSON(object: any): TNCRecord;
29
+ toJSON(message: TNCRecord): unknown;
30
+ create<I extends Exact<DeepPartial<TNCRecord>, I>>(base?: I): TNCRecord;
31
+ fromPartial<I extends Exact<DeepPartial<TNCRecord>, I>>(object: I): TNCRecord;
32
+ };
33
+ export declare const getTNCByCustomerIdResponse: {
34
+ encode(message: getTNCByCustomerIdResponse, writer?: _m0.Writer): _m0.Writer;
35
+ decode(input: _m0.Reader | Uint8Array, length?: number): getTNCByCustomerIdResponse;
36
+ fromJSON(object: any): getTNCByCustomerIdResponse;
37
+ toJSON(message: getTNCByCustomerIdResponse): unknown;
38
+ create<I extends Exact<DeepPartial<getTNCByCustomerIdResponse>, I>>(base?: I): getTNCByCustomerIdResponse;
39
+ fromPartial<I extends Exact<DeepPartial<getTNCByCustomerIdResponse>, I>>(object: I): getTNCByCustomerIdResponse;
40
+ };
41
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
42
+ 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 {} ? {
43
+ [K in keyof T]?: DeepPartial<T[K]>;
44
+ } : Partial<T>;
45
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
46
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
47
+ [K in keyof P]: Exact<P[K], I[K]>;
48
+ } & {
49
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
50
+ };
51
+ export {};
@@ -0,0 +1,253 @@
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 v6.31.1
6
+ // source: eqxcustomers/gettncbycustomerid.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.getTNCByCustomerIdResponse = exports.TNCRecord = exports.getTNCByCustomerIdRequest = 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.gettncbycustomerid";
16
+ function createBasegetTNCByCustomerIdRequest() {
17
+ return { customer_id: 0 };
18
+ }
19
+ exports.getTNCByCustomerIdRequest = {
20
+ encode(message, writer = minimal_1.default.Writer.create()) {
21
+ if (message.customer_id !== 0) {
22
+ writer.uint32(8).int64(message.customer_id);
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 = createBasegetTNCByCustomerIdRequest();
30
+ while (reader.pos < end) {
31
+ const tag = reader.uint32();
32
+ switch (tag >>> 3) {
33
+ case 1:
34
+ if (tag !== 8) {
35
+ break;
36
+ }
37
+ message.customer_id = longToNumber(reader.int64());
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 { customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0 };
49
+ },
50
+ toJSON(message) {
51
+ const obj = {};
52
+ if (message.customer_id !== 0) {
53
+ obj.customer_id = Math.round(message.customer_id);
54
+ }
55
+ return obj;
56
+ },
57
+ create(base) {
58
+ return exports.getTNCByCustomerIdRequest.fromPartial(base ?? {});
59
+ },
60
+ fromPartial(object) {
61
+ const message = createBasegetTNCByCustomerIdRequest();
62
+ message.customer_id = object.customer_id ?? 0;
63
+ return message;
64
+ },
65
+ };
66
+ function createBaseTNCRecord() {
67
+ return { customer_id: 0, tnc_accepted: false, title: "", status: "", consent_type: "", tnc_id: 0 };
68
+ }
69
+ exports.TNCRecord = {
70
+ encode(message, writer = minimal_1.default.Writer.create()) {
71
+ if (message.customer_id !== 0) {
72
+ writer.uint32(8).int64(message.customer_id);
73
+ }
74
+ if (message.tnc_accepted !== false) {
75
+ writer.uint32(16).bool(message.tnc_accepted);
76
+ }
77
+ if (message.title !== "") {
78
+ writer.uint32(26).string(message.title);
79
+ }
80
+ if (message.status !== "") {
81
+ writer.uint32(34).string(message.status);
82
+ }
83
+ if (message.consent_type !== "") {
84
+ writer.uint32(42).string(message.consent_type);
85
+ }
86
+ if (message.tnc_id !== 0) {
87
+ writer.uint32(48).int64(message.tnc_id);
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 = createBaseTNCRecord();
95
+ while (reader.pos < end) {
96
+ const tag = reader.uint32();
97
+ switch (tag >>> 3) {
98
+ case 1:
99
+ if (tag !== 8) {
100
+ break;
101
+ }
102
+ message.customer_id = longToNumber(reader.int64());
103
+ continue;
104
+ case 2:
105
+ if (tag !== 16) {
106
+ break;
107
+ }
108
+ message.tnc_accepted = reader.bool();
109
+ continue;
110
+ case 3:
111
+ if (tag !== 26) {
112
+ break;
113
+ }
114
+ message.title = reader.string();
115
+ continue;
116
+ case 4:
117
+ if (tag !== 34) {
118
+ break;
119
+ }
120
+ message.status = reader.string();
121
+ continue;
122
+ case 5:
123
+ if (tag !== 42) {
124
+ break;
125
+ }
126
+ message.consent_type = reader.string();
127
+ continue;
128
+ case 6:
129
+ if (tag !== 48) {
130
+ break;
131
+ }
132
+ message.tnc_id = longToNumber(reader.int64());
133
+ continue;
134
+ }
135
+ if ((tag & 7) === 4 || tag === 0) {
136
+ break;
137
+ }
138
+ reader.skipType(tag & 7);
139
+ }
140
+ return message;
141
+ },
142
+ fromJSON(object) {
143
+ return {
144
+ customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
145
+ tnc_accepted: isSet(object.tnc_accepted) ? globalThis.Boolean(object.tnc_accepted) : false,
146
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
147
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
148
+ consent_type: isSet(object.consent_type) ? globalThis.String(object.consent_type) : "",
149
+ tnc_id: isSet(object.tnc_id) ? globalThis.Number(object.tnc_id) : 0,
150
+ };
151
+ },
152
+ toJSON(message) {
153
+ const obj = {};
154
+ if (message.customer_id !== 0) {
155
+ obj.customer_id = Math.round(message.customer_id);
156
+ }
157
+ if (message.tnc_accepted !== false) {
158
+ obj.tnc_accepted = message.tnc_accepted;
159
+ }
160
+ if (message.title !== "") {
161
+ obj.title = message.title;
162
+ }
163
+ if (message.status !== "") {
164
+ obj.status = message.status;
165
+ }
166
+ if (message.consent_type !== "") {
167
+ obj.consent_type = message.consent_type;
168
+ }
169
+ if (message.tnc_id !== 0) {
170
+ obj.tnc_id = Math.round(message.tnc_id);
171
+ }
172
+ return obj;
173
+ },
174
+ create(base) {
175
+ return exports.TNCRecord.fromPartial(base ?? {});
176
+ },
177
+ fromPartial(object) {
178
+ const message = createBaseTNCRecord();
179
+ message.customer_id = object.customer_id ?? 0;
180
+ message.tnc_accepted = object.tnc_accepted ?? false;
181
+ message.title = object.title ?? "";
182
+ message.status = object.status ?? "";
183
+ message.consent_type = object.consent_type ?? "";
184
+ message.tnc_id = object.tnc_id ?? 0;
185
+ return message;
186
+ },
187
+ };
188
+ function createBasegetTNCByCustomerIdResponse() {
189
+ return { tnc: undefined };
190
+ }
191
+ exports.getTNCByCustomerIdResponse = {
192
+ encode(message, writer = minimal_1.default.Writer.create()) {
193
+ if (message.tnc !== undefined) {
194
+ exports.TNCRecord.encode(message.tnc, writer.uint32(10).fork()).ldelim();
195
+ }
196
+ return writer;
197
+ },
198
+ decode(input, length) {
199
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
200
+ let end = length === undefined ? reader.len : reader.pos + length;
201
+ const message = createBasegetTNCByCustomerIdResponse();
202
+ while (reader.pos < end) {
203
+ const tag = reader.uint32();
204
+ switch (tag >>> 3) {
205
+ case 1:
206
+ if (tag !== 10) {
207
+ break;
208
+ }
209
+ message.tnc = exports.TNCRecord.decode(reader, reader.uint32());
210
+ continue;
211
+ }
212
+ if ((tag & 7) === 4 || tag === 0) {
213
+ break;
214
+ }
215
+ reader.skipType(tag & 7);
216
+ }
217
+ return message;
218
+ },
219
+ fromJSON(object) {
220
+ return { tnc: isSet(object.tnc) ? exports.TNCRecord.fromJSON(object.tnc) : undefined };
221
+ },
222
+ toJSON(message) {
223
+ const obj = {};
224
+ if (message.tnc !== undefined) {
225
+ obj.tnc = exports.TNCRecord.toJSON(message.tnc);
226
+ }
227
+ return obj;
228
+ },
229
+ create(base) {
230
+ return exports.getTNCByCustomerIdResponse.fromPartial(base ?? {});
231
+ },
232
+ fromPartial(object) {
233
+ const message = createBasegetTNCByCustomerIdResponse();
234
+ message.tnc = (object.tnc !== undefined && object.tnc !== null) ? exports.TNCRecord.fromPartial(object.tnc) : undefined;
235
+ return message;
236
+ },
237
+ };
238
+ function longToNumber(long) {
239
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
240
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
241
+ }
242
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
243
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
244
+ }
245
+ return long.toNumber();
246
+ }
247
+ if (minimal_1.default.util.Long !== long_1.default) {
248
+ minimal_1.default.util.Long = long_1.default;
249
+ minimal_1.default.configure();
250
+ }
251
+ function isSet(value) {
252
+ return value !== null && value !== undefined;
253
+ }