@stashfin/grpc 1.2.818 → 1.2.820

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.818",
3
+ "version": "1.2.820",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -1,5 +1,5 @@
1
1
  import _m0 from "protobufjs/minimal";
2
- export declare const protobufPackage = "digigold.buygold";
2
+ export declare const protobufPackage = "gold.buygold";
3
3
  export interface request {
4
4
  ext_transaction_id: string;
5
5
  amount: string;
@@ -12,7 +12,7 @@ exports.response = exports.Data = exports.request = exports.protobufPackage = vo
12
12
  /* eslint-disable */
13
13
  const long_1 = __importDefault(require("long"));
14
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
- exports.protobufPackage = "digigold.buygold";
15
+ exports.protobufPackage = "gold.buygold";
16
16
  function createBaserequest() {
17
17
  return { ext_transaction_id: "", amount: "", customer_id: 0, quote_id: 0 };
18
18
  }
@@ -1,5 +1,5 @@
1
1
  import _m0 from "protobufjs/minimal";
2
- export declare const protobufPackage = "digigold.getbuygoldstatus";
2
+ export declare const protobufPackage = "gold.getbuygoldstatus";
3
3
  export interface request {
4
4
  ext_transaction_id: string;
5
5
  }
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.response = exports.Data = exports.request = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
- exports.protobufPackage = "digigold.getbuygoldstatus";
14
+ exports.protobufPackage = "gold.getbuygoldstatus";
15
15
  function createBaserequest() {
16
16
  return { ext_transaction_id: "" };
17
17
  }
@@ -1,5 +1,5 @@
1
1
  import _m0 from "protobufjs/minimal";
2
- export declare const protobufPackage = "digigold.getquote";
2
+ export declare const protobufPackage = "gold.getquote";
3
3
  export interface request {
4
4
  quote_id: number;
5
5
  }
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.response = exports.request = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
- exports.protobufPackage = "digigold.getquote";
14
+ exports.protobufPackage = "gold.getquote";
15
15
  function createBaserequest() {
16
16
  return { quote_id: 0 };
17
17
  }
package/ts/digigold.d.ts CHANGED
@@ -3,10 +3,10 @@ import { request as request1, response as response2 } from "./digigold/buygold";
3
3
  import { request as request3, response as response4 } from "./digigold/getbuygoldstatus";
4
4
  import { request, response } from "./digigold/getquote";
5
5
  export declare const protobufPackage = "service";
6
- export type digigoldService = typeof digigoldService;
7
- export declare const digigoldService: {
6
+ export type goldService = typeof goldService;
7
+ export declare const goldService: {
8
8
  readonly getQuote: {
9
- readonly path: "/service.digigold/getQuote";
9
+ readonly path: "/service.gold/getQuote";
10
10
  readonly requestStream: false;
11
11
  readonly responseStream: false;
12
12
  readonly requestSerialize: (value: request) => Buffer;
@@ -15,7 +15,7 @@ export declare const digigoldService: {
15
15
  readonly responseDeserialize: (value: Buffer) => response;
16
16
  };
17
17
  readonly buyGold: {
18
- readonly path: "/service.digigold/buyGold";
18
+ readonly path: "/service.gold/buyGold";
19
19
  readonly requestStream: false;
20
20
  readonly responseStream: false;
21
21
  readonly requestSerialize: (value: request1) => Buffer;
@@ -24,7 +24,7 @@ export declare const digigoldService: {
24
24
  readonly responseDeserialize: (value: Buffer) => response2;
25
25
  };
26
26
  readonly getGoldBuyStatus: {
27
- readonly path: "/service.digigold/getGoldBuyStatus";
27
+ readonly path: "/service.gold/getGoldBuyStatus";
28
28
  readonly requestStream: false;
29
29
  readonly responseStream: false;
30
30
  readonly requestSerialize: (value: request3) => Buffer;
@@ -33,12 +33,12 @@ export declare const digigoldService: {
33
33
  readonly responseDeserialize: (value: Buffer) => response4;
34
34
  };
35
35
  };
36
- export interface digigoldServer extends UntypedServiceImplementation {
36
+ export interface goldServer extends UntypedServiceImplementation {
37
37
  getQuote: handleUnaryCall<request, response>;
38
38
  buyGold: handleUnaryCall<request1, response2>;
39
39
  getGoldBuyStatus: handleUnaryCall<request3, response4>;
40
40
  }
41
- export interface digigoldClient extends Client {
41
+ export interface goldClient extends Client {
42
42
  getQuote(request: request, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
43
43
  getQuote(request: request, metadata: Metadata, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
44
44
  getQuote(request: request, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
@@ -49,8 +49,8 @@ export interface digigoldClient extends Client {
49
49
  getGoldBuyStatus(request: request3, metadata: Metadata, callback: (error: ServiceError | null, response: response4) => void): ClientUnaryCall;
50
50
  getGoldBuyStatus(request: request3, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response4) => void): ClientUnaryCall;
51
51
  }
52
- export declare const digigoldClient: {
53
- new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): digigoldClient;
54
- service: typeof digigoldService;
52
+ export declare const goldClient: {
53
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): goldClient;
54
+ service: typeof goldService;
55
55
  serviceName: string;
56
56
  };
package/ts/digigold.js CHANGED
@@ -5,16 +5,16 @@
5
5
  // protoc v6.31.1
6
6
  // source: digigold.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.digigoldClient = exports.digigoldService = exports.protobufPackage = void 0;
8
+ exports.goldClient = exports.goldService = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const grpc_js_1 = require("@grpc/grpc-js");
11
11
  const buygold_1 = require("./digigold/buygold");
12
12
  const getbuygoldstatus_1 = require("./digigold/getbuygoldstatus");
13
13
  const getquote_1 = require("./digigold/getquote");
14
14
  exports.protobufPackage = "service";
15
- exports.digigoldService = {
15
+ exports.goldService = {
16
16
  getQuote: {
17
- path: "/service.digigold/getQuote",
17
+ path: "/service.gold/getQuote",
18
18
  requestStream: false,
19
19
  responseStream: false,
20
20
  requestSerialize: (value) => Buffer.from(getquote_1.request.encode(value).finish()),
@@ -23,7 +23,7 @@ exports.digigoldService = {
23
23
  responseDeserialize: (value) => getquote_1.response.decode(value),
24
24
  },
25
25
  buyGold: {
26
- path: "/service.digigold/buyGold",
26
+ path: "/service.gold/buyGold",
27
27
  requestStream: false,
28
28
  responseStream: false,
29
29
  requestSerialize: (value) => Buffer.from(buygold_1.request.encode(value).finish()),
@@ -32,7 +32,7 @@ exports.digigoldService = {
32
32
  responseDeserialize: (value) => buygold_1.response.decode(value),
33
33
  },
34
34
  getGoldBuyStatus: {
35
- path: "/service.digigold/getGoldBuyStatus",
35
+ path: "/service.gold/getGoldBuyStatus",
36
36
  requestStream: false,
37
37
  responseStream: false,
38
38
  requestSerialize: (value) => Buffer.from(getbuygoldstatus_1.request.encode(value).finish()),
@@ -41,4 +41,4 @@ exports.digigoldService = {
41
41
  responseDeserialize: (value) => getbuygoldstatus_1.response.decode(value),
42
42
  },
43
43
  };
44
- exports.digigoldClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.digigoldService, "service.digigold");
44
+ exports.goldClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.goldService, "service.gold");
@@ -1,7 +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
+ import { getAllCustomersRequest, getAllCustomersResponse } from "./eqxcustomers/getallcustomers";
5
5
  import { bankDetailsRequest, bankDetailsResponse } from "./eqxcustomers/getbankaccount";
6
6
  import { getCustomerByIdRequest, getCustomerByIdResponse } from "./eqxcustomers/getcustomerbyid";
7
7
  import { getCustomerByMobileRequest, getCustomerByMobileResponse } from "./eqxcustomers/getcustomerbymobile";
@@ -324,14 +324,14 @@ export declare const eqxcustomersService: {
324
324
  readonly responseSerialize: (value: LendingCustomerExistsResponse) => Buffer;
325
325
  readonly responseDeserialize: (value: Buffer) => LendingCustomerExistsResponse;
326
326
  };
327
- readonly getAllTransactions: {
328
- readonly path: "/service.eqxcustomers/getAllTransactions";
327
+ readonly getAllCustomers: {
328
+ readonly path: "/service.eqxcustomers/getAllCustomers";
329
329
  readonly requestStream: false;
330
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;
331
+ readonly requestSerialize: (value: getAllCustomersRequest) => Buffer;
332
+ readonly requestDeserialize: (value: Buffer) => getAllCustomersRequest;
333
+ readonly responseSerialize: (value: getAllCustomersResponse) => Buffer;
334
+ readonly responseDeserialize: (value: Buffer) => getAllCustomersResponse;
335
335
  };
336
336
  readonly getTncByCustomerId: {
337
337
  readonly path: "/service.eqxcustomers/getTNCByCustomerId";
@@ -376,7 +376,7 @@ export interface eqxcustomersServer extends UntypedServiceImplementation {
376
376
  updateCustomerBasicDetails: handleUnaryCall<updateCustomerBasicDetailsRequest, updateCustomerBasicDetailsResponse>;
377
377
  updateCustomerDeviceDetails: handleUnaryCall<updateCustomerDeviceDetailsRequest, updateCustomerDeviceDetailsResponse>;
378
378
  isLendingCustomerRegistered: handleUnaryCall<LendingCustomerExistsRequest, LendingCustomerExistsResponse>;
379
- getAllTransactions: handleUnaryCall<getAllTransactionsRequest, getAllTransactionsResponse>;
379
+ getAllCustomers: handleUnaryCall<getAllCustomersRequest, getAllCustomersResponse>;
380
380
  getTncByCustomerId: handleUnaryCall<getTNCByCustomerIdRequest, getTNCByCustomerIdResponse>;
381
381
  }
382
382
  export interface eqxcustomersClient extends Client {
@@ -476,9 +476,9 @@ export interface eqxcustomersClient extends Client {
476
476
  isLendingCustomerRegistered(request: LendingCustomerExistsRequest, callback: (error: ServiceError | null, response: LendingCustomerExistsResponse) => void): ClientUnaryCall;
477
477
  isLendingCustomerRegistered(request: LendingCustomerExistsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: LendingCustomerExistsResponse) => void): ClientUnaryCall;
478
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;
479
+ getAllCustomers(request: getAllCustomersRequest, callback: (error: ServiceError | null, response: getAllCustomersResponse) => void): ClientUnaryCall;
480
+ getAllCustomers(request: getAllCustomersRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getAllCustomersResponse) => void): ClientUnaryCall;
481
+ getAllCustomers(request: getAllCustomersRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getAllCustomersResponse) => void): ClientUnaryCall;
482
482
  getTncByCustomerId(request: getTNCByCustomerIdRequest, callback: (error: ServiceError | null, response: getTNCByCustomerIdResponse) => void): ClientUnaryCall;
483
483
  getTncByCustomerId(request: getTNCByCustomerIdRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getTNCByCustomerIdResponse) => void): ClientUnaryCall;
484
484
  getTncByCustomerId(request: getTNCByCustomerIdRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getTNCByCustomerIdResponse) => void): ClientUnaryCall;
package/ts/eqxcustomer.js CHANGED
@@ -10,7 +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
+ const getallcustomers_1 = require("./eqxcustomers/getallcustomers");
14
14
  const getbankaccount_1 = require("./eqxcustomers/getbankaccount");
15
15
  const getcustomerbyid_1 = require("./eqxcustomers/getcustomerbyid");
16
16
  const getcustomerbymobile_1 = require("./eqxcustomers/getcustomerbymobile");
@@ -332,14 +332,14 @@ exports.eqxcustomersService = {
332
332
  responseSerialize: (value) => Buffer.from(lendingcustomerexists_1.LendingCustomerExistsResponse.encode(value).finish()),
333
333
  responseDeserialize: (value) => lendingcustomerexists_1.LendingCustomerExistsResponse.decode(value),
334
334
  },
335
- getAllTransactions: {
336
- path: "/service.eqxcustomers/getAllTransactions",
335
+ getAllCustomers: {
336
+ path: "/service.eqxcustomers/getAllCustomers",
337
337
  requestStream: false,
338
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),
339
+ requestSerialize: (value) => Buffer.from(getallcustomers_1.getAllCustomersRequest.encode(value).finish()),
340
+ requestDeserialize: (value) => getallcustomers_1.getAllCustomersRequest.decode(value),
341
+ responseSerialize: (value) => Buffer.from(getallcustomers_1.getAllCustomersResponse.encode(value).finish()),
342
+ responseDeserialize: (value) => getallcustomers_1.getAllCustomersResponse.decode(value),
343
343
  },
344
344
  getTncByCustomerId: {
345
345
  path: "/service.eqxcustomers/getTNCByCustomerId",
@@ -0,0 +1,62 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "eqxcustomers.getallcustomers";
3
+ export interface getAllCustomersRequest {
4
+ page: number;
5
+ limit: number;
6
+ id?: string | undefined;
7
+ mobile?: string | undefined;
8
+ email?: string | undefined;
9
+ }
10
+ export interface Customer {
11
+ id?: number | undefined;
12
+ name?: string | undefined;
13
+ mobile?: string | undefined;
14
+ email?: string | undefined;
15
+ dob?: string | undefined;
16
+ pin_code?: string | undefined;
17
+ vpa?: string | undefined;
18
+ upi_linked?: string | undefined;
19
+ utm_source?: string | undefined;
20
+ category?: string | undefined;
21
+ created_at?: string | undefined;
22
+ }
23
+ export interface getAllCustomersResponse {
24
+ status: string;
25
+ message: string;
26
+ customers: Customer[];
27
+ }
28
+ export declare const getAllCustomersRequest: {
29
+ encode(message: getAllCustomersRequest, writer?: _m0.Writer): _m0.Writer;
30
+ decode(input: _m0.Reader | Uint8Array, length?: number): getAllCustomersRequest;
31
+ fromJSON(object: any): getAllCustomersRequest;
32
+ toJSON(message: getAllCustomersRequest): unknown;
33
+ create<I extends Exact<DeepPartial<getAllCustomersRequest>, I>>(base?: I): getAllCustomersRequest;
34
+ fromPartial<I extends Exact<DeepPartial<getAllCustomersRequest>, I>>(object: I): getAllCustomersRequest;
35
+ };
36
+ export declare const Customer: {
37
+ encode(message: Customer, writer?: _m0.Writer): _m0.Writer;
38
+ decode(input: _m0.Reader | Uint8Array, length?: number): Customer;
39
+ fromJSON(object: any): Customer;
40
+ toJSON(message: Customer): unknown;
41
+ create<I extends Exact<DeepPartial<Customer>, I>>(base?: I): Customer;
42
+ fromPartial<I extends Exact<DeepPartial<Customer>, I>>(object: I): Customer;
43
+ };
44
+ export declare const getAllCustomersResponse: {
45
+ encode(message: getAllCustomersResponse, writer?: _m0.Writer): _m0.Writer;
46
+ decode(input: _m0.Reader | Uint8Array, length?: number): getAllCustomersResponse;
47
+ fromJSON(object: any): getAllCustomersResponse;
48
+ toJSON(message: getAllCustomersResponse): unknown;
49
+ create<I extends Exact<DeepPartial<getAllCustomersResponse>, I>>(base?: I): getAllCustomersResponse;
50
+ fromPartial<I extends Exact<DeepPartial<getAllCustomersResponse>, I>>(object: I): getAllCustomersResponse;
51
+ };
52
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
53
+ 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 {} ? {
54
+ [K in keyof T]?: DeepPartial<T[K]>;
55
+ } : Partial<T>;
56
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
57
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
58
+ [K in keyof P]: Exact<P[K], I[K]>;
59
+ } & {
60
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
61
+ };
62
+ export {};
@@ -0,0 +1,425 @@
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/getallcustomers.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.getAllCustomersResponse = exports.Customer = exports.getAllCustomersRequest = 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.getallcustomers";
16
+ function createBasegetAllCustomersRequest() {
17
+ return { page: 0, limit: 0, id: undefined, mobile: undefined, email: undefined };
18
+ }
19
+ exports.getAllCustomersRequest = {
20
+ encode(message, writer = minimal_1.default.Writer.create()) {
21
+ if (message.page !== 0) {
22
+ writer.uint32(8).int32(message.page);
23
+ }
24
+ if (message.limit !== 0) {
25
+ writer.uint32(16).int32(message.limit);
26
+ }
27
+ if (message.id !== undefined) {
28
+ writer.uint32(26).string(message.id);
29
+ }
30
+ if (message.mobile !== undefined) {
31
+ writer.uint32(34).string(message.mobile);
32
+ }
33
+ if (message.email !== undefined) {
34
+ writer.uint32(42).string(message.email);
35
+ }
36
+ return writer;
37
+ },
38
+ decode(input, length) {
39
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
40
+ let end = length === undefined ? reader.len : reader.pos + length;
41
+ const message = createBasegetAllCustomersRequest();
42
+ while (reader.pos < end) {
43
+ const tag = reader.uint32();
44
+ switch (tag >>> 3) {
45
+ case 1:
46
+ if (tag !== 8) {
47
+ break;
48
+ }
49
+ message.page = reader.int32();
50
+ continue;
51
+ case 2:
52
+ if (tag !== 16) {
53
+ break;
54
+ }
55
+ message.limit = reader.int32();
56
+ continue;
57
+ case 3:
58
+ if (tag !== 26) {
59
+ break;
60
+ }
61
+ message.id = reader.string();
62
+ continue;
63
+ case 4:
64
+ if (tag !== 34) {
65
+ break;
66
+ }
67
+ message.mobile = reader.string();
68
+ continue;
69
+ case 5:
70
+ if (tag !== 42) {
71
+ break;
72
+ }
73
+ message.email = reader.string();
74
+ continue;
75
+ }
76
+ if ((tag & 7) === 4 || tag === 0) {
77
+ break;
78
+ }
79
+ reader.skipType(tag & 7);
80
+ }
81
+ return message;
82
+ },
83
+ fromJSON(object) {
84
+ return {
85
+ page: isSet(object.page) ? globalThis.Number(object.page) : 0,
86
+ limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
87
+ id: isSet(object.id) ? globalThis.String(object.id) : undefined,
88
+ mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : undefined,
89
+ email: isSet(object.email) ? globalThis.String(object.email) : undefined,
90
+ };
91
+ },
92
+ toJSON(message) {
93
+ const obj = {};
94
+ if (message.page !== 0) {
95
+ obj.page = Math.round(message.page);
96
+ }
97
+ if (message.limit !== 0) {
98
+ obj.limit = Math.round(message.limit);
99
+ }
100
+ if (message.id !== undefined) {
101
+ obj.id = message.id;
102
+ }
103
+ if (message.mobile !== undefined) {
104
+ obj.mobile = message.mobile;
105
+ }
106
+ if (message.email !== undefined) {
107
+ obj.email = message.email;
108
+ }
109
+ return obj;
110
+ },
111
+ create(base) {
112
+ return exports.getAllCustomersRequest.fromPartial(base ?? {});
113
+ },
114
+ fromPartial(object) {
115
+ const message = createBasegetAllCustomersRequest();
116
+ message.page = object.page ?? 0;
117
+ message.limit = object.limit ?? 0;
118
+ message.id = object.id ?? undefined;
119
+ message.mobile = object.mobile ?? undefined;
120
+ message.email = object.email ?? undefined;
121
+ return message;
122
+ },
123
+ };
124
+ function createBaseCustomer() {
125
+ return {
126
+ id: undefined,
127
+ name: undefined,
128
+ mobile: undefined,
129
+ email: undefined,
130
+ dob: undefined,
131
+ pin_code: undefined,
132
+ vpa: undefined,
133
+ upi_linked: undefined,
134
+ utm_source: undefined,
135
+ category: undefined,
136
+ created_at: undefined,
137
+ };
138
+ }
139
+ exports.Customer = {
140
+ encode(message, writer = minimal_1.default.Writer.create()) {
141
+ if (message.id !== undefined) {
142
+ writer.uint32(8).int64(message.id);
143
+ }
144
+ if (message.name !== undefined) {
145
+ writer.uint32(18).string(message.name);
146
+ }
147
+ if (message.mobile !== undefined) {
148
+ writer.uint32(26).string(message.mobile);
149
+ }
150
+ if (message.email !== undefined) {
151
+ writer.uint32(34).string(message.email);
152
+ }
153
+ if (message.dob !== undefined) {
154
+ writer.uint32(42).string(message.dob);
155
+ }
156
+ if (message.pin_code !== undefined) {
157
+ writer.uint32(50).string(message.pin_code);
158
+ }
159
+ if (message.vpa !== undefined) {
160
+ writer.uint32(58).string(message.vpa);
161
+ }
162
+ if (message.upi_linked !== undefined) {
163
+ writer.uint32(66).string(message.upi_linked);
164
+ }
165
+ if (message.utm_source !== undefined) {
166
+ writer.uint32(74).string(message.utm_source);
167
+ }
168
+ if (message.category !== undefined) {
169
+ writer.uint32(82).string(message.category);
170
+ }
171
+ if (message.created_at !== undefined) {
172
+ writer.uint32(90).string(message.created_at);
173
+ }
174
+ return writer;
175
+ },
176
+ decode(input, length) {
177
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
178
+ let end = length === undefined ? reader.len : reader.pos + length;
179
+ const message = createBaseCustomer();
180
+ while (reader.pos < end) {
181
+ const tag = reader.uint32();
182
+ switch (tag >>> 3) {
183
+ case 1:
184
+ if (tag !== 8) {
185
+ break;
186
+ }
187
+ message.id = longToNumber(reader.int64());
188
+ continue;
189
+ case 2:
190
+ if (tag !== 18) {
191
+ break;
192
+ }
193
+ message.name = reader.string();
194
+ continue;
195
+ case 3:
196
+ if (tag !== 26) {
197
+ break;
198
+ }
199
+ message.mobile = reader.string();
200
+ continue;
201
+ case 4:
202
+ if (tag !== 34) {
203
+ break;
204
+ }
205
+ message.email = reader.string();
206
+ continue;
207
+ case 5:
208
+ if (tag !== 42) {
209
+ break;
210
+ }
211
+ message.dob = reader.string();
212
+ continue;
213
+ case 6:
214
+ if (tag !== 50) {
215
+ break;
216
+ }
217
+ message.pin_code = reader.string();
218
+ continue;
219
+ case 7:
220
+ if (tag !== 58) {
221
+ break;
222
+ }
223
+ message.vpa = reader.string();
224
+ continue;
225
+ case 8:
226
+ if (tag !== 66) {
227
+ break;
228
+ }
229
+ message.upi_linked = reader.string();
230
+ continue;
231
+ case 9:
232
+ if (tag !== 74) {
233
+ break;
234
+ }
235
+ message.utm_source = reader.string();
236
+ continue;
237
+ case 10:
238
+ if (tag !== 82) {
239
+ break;
240
+ }
241
+ message.category = reader.string();
242
+ continue;
243
+ case 11:
244
+ if (tag !== 90) {
245
+ break;
246
+ }
247
+ message.created_at = reader.string();
248
+ continue;
249
+ }
250
+ if ((tag & 7) === 4 || tag === 0) {
251
+ break;
252
+ }
253
+ reader.skipType(tag & 7);
254
+ }
255
+ return message;
256
+ },
257
+ fromJSON(object) {
258
+ return {
259
+ id: isSet(object.id) ? globalThis.Number(object.id) : undefined,
260
+ name: isSet(object.name) ? globalThis.String(object.name) : undefined,
261
+ mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : undefined,
262
+ email: isSet(object.email) ? globalThis.String(object.email) : undefined,
263
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : undefined,
264
+ pin_code: isSet(object.pin_code) ? globalThis.String(object.pin_code) : undefined,
265
+ vpa: isSet(object.vpa) ? globalThis.String(object.vpa) : undefined,
266
+ upi_linked: isSet(object.upi_linked) ? globalThis.String(object.upi_linked) : undefined,
267
+ utm_source: isSet(object.utm_source) ? globalThis.String(object.utm_source) : undefined,
268
+ category: isSet(object.category) ? globalThis.String(object.category) : undefined,
269
+ created_at: isSet(object.created_at) ? globalThis.String(object.created_at) : undefined,
270
+ };
271
+ },
272
+ toJSON(message) {
273
+ const obj = {};
274
+ if (message.id !== undefined) {
275
+ obj.id = Math.round(message.id);
276
+ }
277
+ if (message.name !== undefined) {
278
+ obj.name = message.name;
279
+ }
280
+ if (message.mobile !== undefined) {
281
+ obj.mobile = message.mobile;
282
+ }
283
+ if (message.email !== undefined) {
284
+ obj.email = message.email;
285
+ }
286
+ if (message.dob !== undefined) {
287
+ obj.dob = message.dob;
288
+ }
289
+ if (message.pin_code !== undefined) {
290
+ obj.pin_code = message.pin_code;
291
+ }
292
+ if (message.vpa !== undefined) {
293
+ obj.vpa = message.vpa;
294
+ }
295
+ if (message.upi_linked !== undefined) {
296
+ obj.upi_linked = message.upi_linked;
297
+ }
298
+ if (message.utm_source !== undefined) {
299
+ obj.utm_source = message.utm_source;
300
+ }
301
+ if (message.category !== undefined) {
302
+ obj.category = message.category;
303
+ }
304
+ if (message.created_at !== undefined) {
305
+ obj.created_at = message.created_at;
306
+ }
307
+ return obj;
308
+ },
309
+ create(base) {
310
+ return exports.Customer.fromPartial(base ?? {});
311
+ },
312
+ fromPartial(object) {
313
+ const message = createBaseCustomer();
314
+ message.id = object.id ?? undefined;
315
+ message.name = object.name ?? undefined;
316
+ message.mobile = object.mobile ?? undefined;
317
+ message.email = object.email ?? undefined;
318
+ message.dob = object.dob ?? undefined;
319
+ message.pin_code = object.pin_code ?? undefined;
320
+ message.vpa = object.vpa ?? undefined;
321
+ message.upi_linked = object.upi_linked ?? undefined;
322
+ message.utm_source = object.utm_source ?? undefined;
323
+ message.category = object.category ?? undefined;
324
+ message.created_at = object.created_at ?? undefined;
325
+ return message;
326
+ },
327
+ };
328
+ function createBasegetAllCustomersResponse() {
329
+ return { status: "", message: "", customers: [] };
330
+ }
331
+ exports.getAllCustomersResponse = {
332
+ encode(message, writer = minimal_1.default.Writer.create()) {
333
+ if (message.status !== "") {
334
+ writer.uint32(10).string(message.status);
335
+ }
336
+ if (message.message !== "") {
337
+ writer.uint32(18).string(message.message);
338
+ }
339
+ for (const v of message.customers) {
340
+ exports.Customer.encode(v, writer.uint32(26).fork()).ldelim();
341
+ }
342
+ return writer;
343
+ },
344
+ decode(input, length) {
345
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
346
+ let end = length === undefined ? reader.len : reader.pos + length;
347
+ const message = createBasegetAllCustomersResponse();
348
+ while (reader.pos < end) {
349
+ const tag = reader.uint32();
350
+ switch (tag >>> 3) {
351
+ case 1:
352
+ if (tag !== 10) {
353
+ break;
354
+ }
355
+ message.status = reader.string();
356
+ continue;
357
+ case 2:
358
+ if (tag !== 18) {
359
+ break;
360
+ }
361
+ message.message = reader.string();
362
+ continue;
363
+ case 3:
364
+ if (tag !== 26) {
365
+ break;
366
+ }
367
+ message.customers.push(exports.Customer.decode(reader, reader.uint32()));
368
+ continue;
369
+ }
370
+ if ((tag & 7) === 4 || tag === 0) {
371
+ break;
372
+ }
373
+ reader.skipType(tag & 7);
374
+ }
375
+ return message;
376
+ },
377
+ fromJSON(object) {
378
+ return {
379
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
380
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
381
+ customers: globalThis.Array.isArray(object?.customers)
382
+ ? object.customers.map((e) => exports.Customer.fromJSON(e))
383
+ : [],
384
+ };
385
+ },
386
+ toJSON(message) {
387
+ const obj = {};
388
+ if (message.status !== "") {
389
+ obj.status = message.status;
390
+ }
391
+ if (message.message !== "") {
392
+ obj.message = message.message;
393
+ }
394
+ if (message.customers?.length) {
395
+ obj.customers = message.customers.map((e) => exports.Customer.toJSON(e));
396
+ }
397
+ return obj;
398
+ },
399
+ create(base) {
400
+ return exports.getAllCustomersResponse.fromPartial(base ?? {});
401
+ },
402
+ fromPartial(object) {
403
+ const message = createBasegetAllCustomersResponse();
404
+ message.status = object.status ?? "";
405
+ message.message = object.message ?? "";
406
+ message.customers = object.customers?.map((e) => exports.Customer.fromPartial(e)) || [];
407
+ return message;
408
+ },
409
+ };
410
+ function longToNumber(long) {
411
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
412
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
413
+ }
414
+ if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
415
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
416
+ }
417
+ return long.toNumber();
418
+ }
419
+ if (minimal_1.default.util.Long !== long_1.default) {
420
+ minimal_1.default.util.Long = long_1.default;
421
+ minimal_1.default.configure();
422
+ }
423
+ function isSet(value) {
424
+ return value !== null && value !== undefined;
425
+ }
@@ -4,15 +4,19 @@ export interface getTNCByCustomerIdRequest {
4
4
  customer_id: number;
5
5
  }
6
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;
7
+ tnc_accepted?: string | undefined;
8
+ title?: string | undefined;
9
+ status?: string | undefined;
10
+ consent_type?: string | undefined;
11
+ tnc_id?: string | undefined;
12
+ tnc_accepted_date?: string | undefined;
13
+ ip_address?: string | undefined;
13
14
  }
14
15
  export interface getTNCByCustomerIdResponse {
15
- tnc: TNCRecord | undefined;
16
+ status: string;
17
+ message: string;
18
+ customer_id: string;
19
+ tnc: TNCRecord[];
16
20
  }
17
21
  export declare const getTNCByCustomerIdRequest: {
18
22
  encode(message: getTNCByCustomerIdRequest, writer?: _m0.Writer): _m0.Writer;
@@ -64,27 +64,38 @@ exports.getTNCByCustomerIdRequest = {
64
64
  },
65
65
  };
66
66
  function createBaseTNCRecord() {
67
- return { customer_id: 0, tnc_accepted: false, title: "", status: "", consent_type: "", tnc_id: 0 };
67
+ return {
68
+ tnc_accepted: undefined,
69
+ title: undefined,
70
+ status: undefined,
71
+ consent_type: undefined,
72
+ tnc_id: undefined,
73
+ tnc_accepted_date: undefined,
74
+ ip_address: undefined,
75
+ };
68
76
  }
69
77
  exports.TNCRecord = {
70
78
  encode(message, writer = minimal_1.default.Writer.create()) {
71
- if (message.customer_id !== 0) {
72
- writer.uint32(8).int64(message.customer_id);
79
+ if (message.tnc_accepted !== undefined) {
80
+ writer.uint32(10).string(message.tnc_accepted);
73
81
  }
74
- if (message.tnc_accepted !== false) {
75
- writer.uint32(16).bool(message.tnc_accepted);
82
+ if (message.title !== undefined) {
83
+ writer.uint32(18).string(message.title);
76
84
  }
77
- if (message.title !== "") {
78
- writer.uint32(26).string(message.title);
85
+ if (message.status !== undefined) {
86
+ writer.uint32(26).string(message.status);
79
87
  }
80
- if (message.status !== "") {
81
- writer.uint32(34).string(message.status);
88
+ if (message.consent_type !== undefined) {
89
+ writer.uint32(34).string(message.consent_type);
90
+ }
91
+ if (message.tnc_id !== undefined) {
92
+ writer.uint32(42).string(message.tnc_id);
82
93
  }
83
- if (message.consent_type !== "") {
84
- writer.uint32(42).string(message.consent_type);
94
+ if (message.tnc_accepted_date !== undefined) {
95
+ writer.uint32(50).string(message.tnc_accepted_date);
85
96
  }
86
- if (message.tnc_id !== 0) {
87
- writer.uint32(48).int64(message.tnc_id);
97
+ if (message.ip_address !== undefined) {
98
+ writer.uint32(58).string(message.ip_address);
88
99
  }
89
100
  return writer;
90
101
  },
@@ -96,40 +107,46 @@ exports.TNCRecord = {
96
107
  const tag = reader.uint32();
97
108
  switch (tag >>> 3) {
98
109
  case 1:
99
- if (tag !== 8) {
110
+ if (tag !== 10) {
100
111
  break;
101
112
  }
102
- message.customer_id = longToNumber(reader.int64());
113
+ message.tnc_accepted = reader.string();
103
114
  continue;
104
115
  case 2:
105
- if (tag !== 16) {
116
+ if (tag !== 18) {
106
117
  break;
107
118
  }
108
- message.tnc_accepted = reader.bool();
119
+ message.title = reader.string();
109
120
  continue;
110
121
  case 3:
111
122
  if (tag !== 26) {
112
123
  break;
113
124
  }
114
- message.title = reader.string();
125
+ message.status = reader.string();
115
126
  continue;
116
127
  case 4:
117
128
  if (tag !== 34) {
118
129
  break;
119
130
  }
120
- message.status = reader.string();
131
+ message.consent_type = reader.string();
121
132
  continue;
122
133
  case 5:
123
134
  if (tag !== 42) {
124
135
  break;
125
136
  }
126
- message.consent_type = reader.string();
137
+ message.tnc_id = reader.string();
127
138
  continue;
128
139
  case 6:
129
- if (tag !== 48) {
140
+ if (tag !== 50) {
130
141
  break;
131
142
  }
132
- message.tnc_id = longToNumber(reader.int64());
143
+ message.tnc_accepted_date = reader.string();
144
+ continue;
145
+ case 7:
146
+ if (tag !== 58) {
147
+ break;
148
+ }
149
+ message.ip_address = reader.string();
133
150
  continue;
134
151
  }
135
152
  if ((tag & 7) === 4 || tag === 0) {
@@ -141,33 +158,37 @@ exports.TNCRecord = {
141
158
  },
142
159
  fromJSON(object) {
143
160
  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,
161
+ tnc_accepted: isSet(object.tnc_accepted) ? globalThis.String(object.tnc_accepted) : undefined,
162
+ title: isSet(object.title) ? globalThis.String(object.title) : undefined,
163
+ status: isSet(object.status) ? globalThis.String(object.status) : undefined,
164
+ consent_type: isSet(object.consent_type) ? globalThis.String(object.consent_type) : undefined,
165
+ tnc_id: isSet(object.tnc_id) ? globalThis.String(object.tnc_id) : undefined,
166
+ tnc_accepted_date: isSet(object.tnc_accepted_date) ? globalThis.String(object.tnc_accepted_date) : undefined,
167
+ ip_address: isSet(object.ip_address) ? globalThis.String(object.ip_address) : undefined,
150
168
  };
151
169
  },
152
170
  toJSON(message) {
153
171
  const obj = {};
154
- if (message.customer_id !== 0) {
155
- obj.customer_id = Math.round(message.customer_id);
156
- }
157
- if (message.tnc_accepted !== false) {
172
+ if (message.tnc_accepted !== undefined) {
158
173
  obj.tnc_accepted = message.tnc_accepted;
159
174
  }
160
- if (message.title !== "") {
175
+ if (message.title !== undefined) {
161
176
  obj.title = message.title;
162
177
  }
163
- if (message.status !== "") {
178
+ if (message.status !== undefined) {
164
179
  obj.status = message.status;
165
180
  }
166
- if (message.consent_type !== "") {
181
+ if (message.consent_type !== undefined) {
167
182
  obj.consent_type = message.consent_type;
168
183
  }
169
- if (message.tnc_id !== 0) {
170
- obj.tnc_id = Math.round(message.tnc_id);
184
+ if (message.tnc_id !== undefined) {
185
+ obj.tnc_id = message.tnc_id;
186
+ }
187
+ if (message.tnc_accepted_date !== undefined) {
188
+ obj.tnc_accepted_date = message.tnc_accepted_date;
189
+ }
190
+ if (message.ip_address !== undefined) {
191
+ obj.ip_address = message.ip_address;
171
192
  }
172
193
  return obj;
173
194
  },
@@ -176,22 +197,32 @@ exports.TNCRecord = {
176
197
  },
177
198
  fromPartial(object) {
178
199
  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;
200
+ message.tnc_accepted = object.tnc_accepted ?? undefined;
201
+ message.title = object.title ?? undefined;
202
+ message.status = object.status ?? undefined;
203
+ message.consent_type = object.consent_type ?? undefined;
204
+ message.tnc_id = object.tnc_id ?? undefined;
205
+ message.tnc_accepted_date = object.tnc_accepted_date ?? undefined;
206
+ message.ip_address = object.ip_address ?? undefined;
185
207
  return message;
186
208
  },
187
209
  };
188
210
  function createBasegetTNCByCustomerIdResponse() {
189
- return { tnc: undefined };
211
+ return { status: "", message: "", customer_id: "", tnc: [] };
190
212
  }
191
213
  exports.getTNCByCustomerIdResponse = {
192
214
  encode(message, writer = minimal_1.default.Writer.create()) {
193
- if (message.tnc !== undefined) {
194
- exports.TNCRecord.encode(message.tnc, writer.uint32(10).fork()).ldelim();
215
+ if (message.status !== "") {
216
+ writer.uint32(10).string(message.status);
217
+ }
218
+ if (message.message !== "") {
219
+ writer.uint32(18).string(message.message);
220
+ }
221
+ if (message.customer_id !== "") {
222
+ writer.uint32(26).string(message.customer_id);
223
+ }
224
+ for (const v of message.tnc) {
225
+ exports.TNCRecord.encode(v, writer.uint32(34).fork()).ldelim();
195
226
  }
196
227
  return writer;
197
228
  },
@@ -206,7 +237,25 @@ exports.getTNCByCustomerIdResponse = {
206
237
  if (tag !== 10) {
207
238
  break;
208
239
  }
209
- message.tnc = exports.TNCRecord.decode(reader, reader.uint32());
240
+ message.status = reader.string();
241
+ continue;
242
+ case 2:
243
+ if (tag !== 18) {
244
+ break;
245
+ }
246
+ message.message = reader.string();
247
+ continue;
248
+ case 3:
249
+ if (tag !== 26) {
250
+ break;
251
+ }
252
+ message.customer_id = reader.string();
253
+ continue;
254
+ case 4:
255
+ if (tag !== 34) {
256
+ break;
257
+ }
258
+ message.tnc.push(exports.TNCRecord.decode(reader, reader.uint32()));
210
259
  continue;
211
260
  }
212
261
  if ((tag & 7) === 4 || tag === 0) {
@@ -217,12 +266,26 @@ exports.getTNCByCustomerIdResponse = {
217
266
  return message;
218
267
  },
219
268
  fromJSON(object) {
220
- return { tnc: isSet(object.tnc) ? exports.TNCRecord.fromJSON(object.tnc) : undefined };
269
+ return {
270
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
271
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
272
+ customer_id: isSet(object.customer_id) ? globalThis.String(object.customer_id) : "",
273
+ tnc: globalThis.Array.isArray(object?.tnc) ? object.tnc.map((e) => exports.TNCRecord.fromJSON(e)) : [],
274
+ };
221
275
  },
222
276
  toJSON(message) {
223
277
  const obj = {};
224
- if (message.tnc !== undefined) {
225
- obj.tnc = exports.TNCRecord.toJSON(message.tnc);
278
+ if (message.status !== "") {
279
+ obj.status = message.status;
280
+ }
281
+ if (message.message !== "") {
282
+ obj.message = message.message;
283
+ }
284
+ if (message.customer_id !== "") {
285
+ obj.customer_id = message.customer_id;
286
+ }
287
+ if (message.tnc?.length) {
288
+ obj.tnc = message.tnc.map((e) => exports.TNCRecord.toJSON(e));
226
289
  }
227
290
  return obj;
228
291
  },
@@ -231,7 +294,10 @@ exports.getTNCByCustomerIdResponse = {
231
294
  },
232
295
  fromPartial(object) {
233
296
  const message = createBasegetTNCByCustomerIdResponse();
234
- message.tnc = (object.tnc !== undefined && object.tnc !== null) ? exports.TNCRecord.fromPartial(object.tnc) : undefined;
297
+ message.status = object.status ?? "";
298
+ message.message = object.message ?? "";
299
+ message.customer_id = object.customer_id ?? "";
300
+ message.tnc = object.tnc?.map((e) => exports.TNCRecord.fromPartial(e)) || [];
235
301
  return message;
236
302
  },
237
303
  };