@stashfin/grpc 1.2.811 → 1.2.813
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 +1 -1
- package/ts/admin/getcustomer.d.ts +51 -0
- package/ts/admin/getcustomer.js +242 -0
- package/ts/admin/getcustomerbyid.d.ts +40 -0
- package/ts/admin/getcustomerbyid.js +189 -0
- package/ts/admin.d.ts +42 -0
- package/ts/admin.js +34 -0
- package/ts/eqxcustomer.d.ts +14 -0
- package/ts/eqxcustomer.js +10 -0
- package/ts/eqxcustomers/updatecustomercategory.d.ts +37 -0
- package/ts/eqxcustomers/updatecustomercategory.js +163 -0
package/package.json
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "admin.getcustomer";
|
|
3
|
+
export interface request {
|
|
4
|
+
}
|
|
5
|
+
export interface data {
|
|
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 response {
|
|
15
|
+
customers: data[];
|
|
16
|
+
}
|
|
17
|
+
export declare const request: {
|
|
18
|
+
encode(_: request, writer?: _m0.Writer): _m0.Writer;
|
|
19
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): request;
|
|
20
|
+
fromJSON(_: any): request;
|
|
21
|
+
toJSON(_: request): unknown;
|
|
22
|
+
create<I extends Exact<DeepPartial<request>, I>>(base?: I): request;
|
|
23
|
+
fromPartial<I extends Exact<DeepPartial<request>, I>>(_: I): request;
|
|
24
|
+
};
|
|
25
|
+
export declare const data: {
|
|
26
|
+
encode(message: data, writer?: _m0.Writer): _m0.Writer;
|
|
27
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): data;
|
|
28
|
+
fromJSON(object: any): data;
|
|
29
|
+
toJSON(message: data): unknown;
|
|
30
|
+
create<I extends Exact<DeepPartial<data>, I>>(base?: I): data;
|
|
31
|
+
fromPartial<I extends Exact<DeepPartial<data>, I>>(object: I): data;
|
|
32
|
+
};
|
|
33
|
+
export declare const response: {
|
|
34
|
+
encode(message: response, writer?: _m0.Writer): _m0.Writer;
|
|
35
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): response;
|
|
36
|
+
fromJSON(object: any): response;
|
|
37
|
+
toJSON(message: response): unknown;
|
|
38
|
+
create<I extends Exact<DeepPartial<response>, I>>(base?: I): response;
|
|
39
|
+
fromPartial<I extends Exact<DeepPartial<response>, I>>(object: I): response;
|
|
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,242 @@
|
|
|
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: admin/getcustomer.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.response = exports.data = exports.request = exports.protobufPackage = void 0;
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
|
+
exports.protobufPackage = "admin.getcustomer";
|
|
15
|
+
function createBaserequest() {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
exports.request = {
|
|
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 = createBaserequest();
|
|
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.request.fromPartial(base ?? {});
|
|
46
|
+
},
|
|
47
|
+
fromPartial(_) {
|
|
48
|
+
const message = createBaserequest();
|
|
49
|
+
return message;
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
function createBasedata() {
|
|
53
|
+
return { id: 0, name: "", mobile: "", email: "", dob: "", pin_code: "", created_at: "" };
|
|
54
|
+
}
|
|
55
|
+
exports.data = {
|
|
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.name !== "") {
|
|
61
|
+
writer.uint32(18).string(message.name);
|
|
62
|
+
}
|
|
63
|
+
if (message.mobile !== "") {
|
|
64
|
+
writer.uint32(26).string(message.mobile);
|
|
65
|
+
}
|
|
66
|
+
if (message.email !== "") {
|
|
67
|
+
writer.uint32(34).string(message.email);
|
|
68
|
+
}
|
|
69
|
+
if (message.dob !== "") {
|
|
70
|
+
writer.uint32(42).string(message.dob);
|
|
71
|
+
}
|
|
72
|
+
if (message.pin_code !== "") {
|
|
73
|
+
writer.uint32(50).string(message.pin_code);
|
|
74
|
+
}
|
|
75
|
+
if (message.created_at !== "") {
|
|
76
|
+
writer.uint32(58).string(message.created_at);
|
|
77
|
+
}
|
|
78
|
+
return writer;
|
|
79
|
+
},
|
|
80
|
+
decode(input, length) {
|
|
81
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
82
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
83
|
+
const message = createBasedata();
|
|
84
|
+
while (reader.pos < end) {
|
|
85
|
+
const tag = reader.uint32();
|
|
86
|
+
switch (tag >>> 3) {
|
|
87
|
+
case 1:
|
|
88
|
+
if (tag !== 8) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
message.id = reader.int32();
|
|
92
|
+
continue;
|
|
93
|
+
case 2:
|
|
94
|
+
if (tag !== 18) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
message.name = reader.string();
|
|
98
|
+
continue;
|
|
99
|
+
case 3:
|
|
100
|
+
if (tag !== 26) {
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
message.mobile = reader.string();
|
|
104
|
+
continue;
|
|
105
|
+
case 4:
|
|
106
|
+
if (tag !== 34) {
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
message.email = reader.string();
|
|
110
|
+
continue;
|
|
111
|
+
case 5:
|
|
112
|
+
if (tag !== 42) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
message.dob = reader.string();
|
|
116
|
+
continue;
|
|
117
|
+
case 6:
|
|
118
|
+
if (tag !== 50) {
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
message.pin_code = reader.string();
|
|
122
|
+
continue;
|
|
123
|
+
case 7:
|
|
124
|
+
if (tag !== 58) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
message.created_at = reader.string();
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
reader.skipType(tag & 7);
|
|
134
|
+
}
|
|
135
|
+
return message;
|
|
136
|
+
},
|
|
137
|
+
fromJSON(object) {
|
|
138
|
+
return {
|
|
139
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
140
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
141
|
+
mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : "",
|
|
142
|
+
email: isSet(object.email) ? globalThis.String(object.email) : "",
|
|
143
|
+
dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
|
|
144
|
+
pin_code: isSet(object.pin_code) ? globalThis.String(object.pin_code) : "",
|
|
145
|
+
created_at: isSet(object.created_at) ? globalThis.String(object.created_at) : "",
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
toJSON(message) {
|
|
149
|
+
const obj = {};
|
|
150
|
+
if (message.id !== 0) {
|
|
151
|
+
obj.id = Math.round(message.id);
|
|
152
|
+
}
|
|
153
|
+
if (message.name !== "") {
|
|
154
|
+
obj.name = message.name;
|
|
155
|
+
}
|
|
156
|
+
if (message.mobile !== "") {
|
|
157
|
+
obj.mobile = message.mobile;
|
|
158
|
+
}
|
|
159
|
+
if (message.email !== "") {
|
|
160
|
+
obj.email = message.email;
|
|
161
|
+
}
|
|
162
|
+
if (message.dob !== "") {
|
|
163
|
+
obj.dob = message.dob;
|
|
164
|
+
}
|
|
165
|
+
if (message.pin_code !== "") {
|
|
166
|
+
obj.pin_code = message.pin_code;
|
|
167
|
+
}
|
|
168
|
+
if (message.created_at !== "") {
|
|
169
|
+
obj.created_at = message.created_at;
|
|
170
|
+
}
|
|
171
|
+
return obj;
|
|
172
|
+
},
|
|
173
|
+
create(base) {
|
|
174
|
+
return exports.data.fromPartial(base ?? {});
|
|
175
|
+
},
|
|
176
|
+
fromPartial(object) {
|
|
177
|
+
const message = createBasedata();
|
|
178
|
+
message.id = object.id ?? 0;
|
|
179
|
+
message.name = object.name ?? "";
|
|
180
|
+
message.mobile = object.mobile ?? "";
|
|
181
|
+
message.email = object.email ?? "";
|
|
182
|
+
message.dob = object.dob ?? "";
|
|
183
|
+
message.pin_code = object.pin_code ?? "";
|
|
184
|
+
message.created_at = object.created_at ?? "";
|
|
185
|
+
return message;
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
function createBaseresponse() {
|
|
189
|
+
return { customers: [] };
|
|
190
|
+
}
|
|
191
|
+
exports.response = {
|
|
192
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
193
|
+
for (const v of message.customers) {
|
|
194
|
+
exports.data.encode(v, 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 = createBaseresponse();
|
|
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.customers.push(exports.data.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 {
|
|
221
|
+
customers: globalThis.Array.isArray(object?.customers) ? object.customers.map((e) => exports.data.fromJSON(e)) : [],
|
|
222
|
+
};
|
|
223
|
+
},
|
|
224
|
+
toJSON(message) {
|
|
225
|
+
const obj = {};
|
|
226
|
+
if (message.customers?.length) {
|
|
227
|
+
obj.customers = message.customers.map((e) => exports.data.toJSON(e));
|
|
228
|
+
}
|
|
229
|
+
return obj;
|
|
230
|
+
},
|
|
231
|
+
create(base) {
|
|
232
|
+
return exports.response.fromPartial(base ?? {});
|
|
233
|
+
},
|
|
234
|
+
fromPartial(object) {
|
|
235
|
+
const message = createBaseresponse();
|
|
236
|
+
message.customers = object.customers?.map((e) => exports.data.fromPartial(e)) || [];
|
|
237
|
+
return message;
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
function isSet(value) {
|
|
241
|
+
return value !== null && value !== undefined;
|
|
242
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "admin.getcustomerbyid";
|
|
3
|
+
export interface request {
|
|
4
|
+
customer_id: number;
|
|
5
|
+
}
|
|
6
|
+
export interface response {
|
|
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 declare const request: {
|
|
15
|
+
encode(message: request, writer?: _m0.Writer): _m0.Writer;
|
|
16
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): request;
|
|
17
|
+
fromJSON(object: any): request;
|
|
18
|
+
toJSON(message: request): unknown;
|
|
19
|
+
create<I extends Exact<DeepPartial<request>, I>>(base?: I): request;
|
|
20
|
+
fromPartial<I extends Exact<DeepPartial<request>, I>>(object: I): request;
|
|
21
|
+
};
|
|
22
|
+
export declare const response: {
|
|
23
|
+
encode(message: response, writer?: _m0.Writer): _m0.Writer;
|
|
24
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): response;
|
|
25
|
+
fromJSON(object: any): response;
|
|
26
|
+
toJSON(message: response): unknown;
|
|
27
|
+
create<I extends Exact<DeepPartial<response>, I>>(base?: I): response;
|
|
28
|
+
fromPartial<I extends Exact<DeepPartial<response>, I>>(object: I): response;
|
|
29
|
+
};
|
|
30
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
31
|
+
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 {} ? {
|
|
32
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
33
|
+
} : Partial<T>;
|
|
34
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
35
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
36
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
37
|
+
} & {
|
|
38
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,189 @@
|
|
|
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: admin/getcustomerbyid.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.response = exports.request = exports.protobufPackage = void 0;
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
|
+
exports.protobufPackage = "admin.getcustomerbyid";
|
|
15
|
+
function createBaserequest() {
|
|
16
|
+
return { customer_id: 0 };
|
|
17
|
+
}
|
|
18
|
+
exports.request = {
|
|
19
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
+
if (message.customer_id !== 0) {
|
|
21
|
+
writer.uint32(8).int32(message.customer_id);
|
|
22
|
+
}
|
|
23
|
+
return writer;
|
|
24
|
+
},
|
|
25
|
+
decode(input, length) {
|
|
26
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
27
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
28
|
+
const message = createBaserequest();
|
|
29
|
+
while (reader.pos < end) {
|
|
30
|
+
const tag = reader.uint32();
|
|
31
|
+
switch (tag >>> 3) {
|
|
32
|
+
case 1:
|
|
33
|
+
if (tag !== 8) {
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
message.customer_id = reader.int32();
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
reader.skipType(tag & 7);
|
|
43
|
+
}
|
|
44
|
+
return message;
|
|
45
|
+
},
|
|
46
|
+
fromJSON(object) {
|
|
47
|
+
return { customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0 };
|
|
48
|
+
},
|
|
49
|
+
toJSON(message) {
|
|
50
|
+
const obj = {};
|
|
51
|
+
if (message.customer_id !== 0) {
|
|
52
|
+
obj.customer_id = Math.round(message.customer_id);
|
|
53
|
+
}
|
|
54
|
+
return obj;
|
|
55
|
+
},
|
|
56
|
+
create(base) {
|
|
57
|
+
return exports.request.fromPartial(base ?? {});
|
|
58
|
+
},
|
|
59
|
+
fromPartial(object) {
|
|
60
|
+
const message = createBaserequest();
|
|
61
|
+
message.customer_id = object.customer_id ?? 0;
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
function createBaseresponse() {
|
|
66
|
+
return { customer_id: 0, tnc_accepted: false, title: "", status: "", consent_type: "", tnc_id: 0 };
|
|
67
|
+
}
|
|
68
|
+
exports.response = {
|
|
69
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
70
|
+
if (message.customer_id !== 0) {
|
|
71
|
+
writer.uint32(8).int32(message.customer_id);
|
|
72
|
+
}
|
|
73
|
+
if (message.tnc_accepted !== false) {
|
|
74
|
+
writer.uint32(16).bool(message.tnc_accepted);
|
|
75
|
+
}
|
|
76
|
+
if (message.title !== "") {
|
|
77
|
+
writer.uint32(26).string(message.title);
|
|
78
|
+
}
|
|
79
|
+
if (message.status !== "") {
|
|
80
|
+
writer.uint32(34).string(message.status);
|
|
81
|
+
}
|
|
82
|
+
if (message.consent_type !== "") {
|
|
83
|
+
writer.uint32(42).string(message.consent_type);
|
|
84
|
+
}
|
|
85
|
+
if (message.tnc_id !== 0) {
|
|
86
|
+
writer.uint32(48).int32(message.tnc_id);
|
|
87
|
+
}
|
|
88
|
+
return writer;
|
|
89
|
+
},
|
|
90
|
+
decode(input, length) {
|
|
91
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
92
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
93
|
+
const message = createBaseresponse();
|
|
94
|
+
while (reader.pos < end) {
|
|
95
|
+
const tag = reader.uint32();
|
|
96
|
+
switch (tag >>> 3) {
|
|
97
|
+
case 1:
|
|
98
|
+
if (tag !== 8) {
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
message.customer_id = reader.int32();
|
|
102
|
+
continue;
|
|
103
|
+
case 2:
|
|
104
|
+
if (tag !== 16) {
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
message.tnc_accepted = reader.bool();
|
|
108
|
+
continue;
|
|
109
|
+
case 3:
|
|
110
|
+
if (tag !== 26) {
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
message.title = reader.string();
|
|
114
|
+
continue;
|
|
115
|
+
case 4:
|
|
116
|
+
if (tag !== 34) {
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
message.status = reader.string();
|
|
120
|
+
continue;
|
|
121
|
+
case 5:
|
|
122
|
+
if (tag !== 42) {
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
message.consent_type = reader.string();
|
|
126
|
+
continue;
|
|
127
|
+
case 6:
|
|
128
|
+
if (tag !== 48) {
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
message.tnc_id = reader.int32();
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
reader.skipType(tag & 7);
|
|
138
|
+
}
|
|
139
|
+
return message;
|
|
140
|
+
},
|
|
141
|
+
fromJSON(object) {
|
|
142
|
+
return {
|
|
143
|
+
customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
|
|
144
|
+
tnc_accepted: isSet(object.tnc_accepted) ? globalThis.Boolean(object.tnc_accepted) : false,
|
|
145
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
146
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
147
|
+
consent_type: isSet(object.consent_type) ? globalThis.String(object.consent_type) : "",
|
|
148
|
+
tnc_id: isSet(object.tnc_id) ? globalThis.Number(object.tnc_id) : 0,
|
|
149
|
+
};
|
|
150
|
+
},
|
|
151
|
+
toJSON(message) {
|
|
152
|
+
const obj = {};
|
|
153
|
+
if (message.customer_id !== 0) {
|
|
154
|
+
obj.customer_id = Math.round(message.customer_id);
|
|
155
|
+
}
|
|
156
|
+
if (message.tnc_accepted !== false) {
|
|
157
|
+
obj.tnc_accepted = message.tnc_accepted;
|
|
158
|
+
}
|
|
159
|
+
if (message.title !== "") {
|
|
160
|
+
obj.title = message.title;
|
|
161
|
+
}
|
|
162
|
+
if (message.status !== "") {
|
|
163
|
+
obj.status = message.status;
|
|
164
|
+
}
|
|
165
|
+
if (message.consent_type !== "") {
|
|
166
|
+
obj.consent_type = message.consent_type;
|
|
167
|
+
}
|
|
168
|
+
if (message.tnc_id !== 0) {
|
|
169
|
+
obj.tnc_id = Math.round(message.tnc_id);
|
|
170
|
+
}
|
|
171
|
+
return obj;
|
|
172
|
+
},
|
|
173
|
+
create(base) {
|
|
174
|
+
return exports.response.fromPartial(base ?? {});
|
|
175
|
+
},
|
|
176
|
+
fromPartial(object) {
|
|
177
|
+
const message = createBaseresponse();
|
|
178
|
+
message.customer_id = object.customer_id ?? 0;
|
|
179
|
+
message.tnc_accepted = object.tnc_accepted ?? false;
|
|
180
|
+
message.title = object.title ?? "";
|
|
181
|
+
message.status = object.status ?? "";
|
|
182
|
+
message.consent_type = object.consent_type ?? "";
|
|
183
|
+
message.tnc_id = object.tnc_id ?? 0;
|
|
184
|
+
return message;
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
function isSet(value) {
|
|
188
|
+
return value !== null && value !== undefined;
|
|
189
|
+
}
|
package/ts/admin.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
2
|
+
import { request, response } from "./admin/getcustomer";
|
|
3
|
+
import { request as request1, response as response2 } from "./admin/getcustomerbyid";
|
|
4
|
+
export declare const protobufPackage = "service";
|
|
5
|
+
export type adminService = typeof adminService;
|
|
6
|
+
export declare const adminService: {
|
|
7
|
+
readonly getCustomerDetails: {
|
|
8
|
+
readonly path: "/service.admin/getCustomerDetails";
|
|
9
|
+
readonly requestStream: false;
|
|
10
|
+
readonly responseStream: false;
|
|
11
|
+
readonly requestSerialize: (value: request) => Buffer;
|
|
12
|
+
readonly requestDeserialize: (value: Buffer) => request;
|
|
13
|
+
readonly responseSerialize: (value: response) => Buffer;
|
|
14
|
+
readonly responseDeserialize: (value: Buffer) => response;
|
|
15
|
+
};
|
|
16
|
+
readonly getCustomerById: {
|
|
17
|
+
readonly path: "/service.admin/getCustomerById";
|
|
18
|
+
readonly requestStream: false;
|
|
19
|
+
readonly responseStream: false;
|
|
20
|
+
readonly requestSerialize: (value: request1) => Buffer;
|
|
21
|
+
readonly requestDeserialize: (value: Buffer) => request1;
|
|
22
|
+
readonly responseSerialize: (value: response2) => Buffer;
|
|
23
|
+
readonly responseDeserialize: (value: Buffer) => response2;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export interface adminServer extends UntypedServiceImplementation {
|
|
27
|
+
getCustomerDetails: handleUnaryCall<request, response>;
|
|
28
|
+
getCustomerById: handleUnaryCall<request1, response2>;
|
|
29
|
+
}
|
|
30
|
+
export interface adminClient extends Client {
|
|
31
|
+
getCustomerDetails(request: request, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
32
|
+
getCustomerDetails(request: request, metadata: Metadata, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
33
|
+
getCustomerDetails(request: request, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
34
|
+
getCustomerById(request: request1, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
|
|
35
|
+
getCustomerById(request: request1, metadata: Metadata, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
|
|
36
|
+
getCustomerById(request: request1, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
|
|
37
|
+
}
|
|
38
|
+
export declare const adminClient: {
|
|
39
|
+
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): adminClient;
|
|
40
|
+
service: typeof adminService;
|
|
41
|
+
serviceName: string;
|
|
42
|
+
};
|
package/ts/admin.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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: admin.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.adminClient = exports.adminService = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const grpc_js_1 = require("@grpc/grpc-js");
|
|
11
|
+
const getcustomer_1 = require("./admin/getcustomer");
|
|
12
|
+
const getcustomerbyid_1 = require("./admin/getcustomerbyid");
|
|
13
|
+
exports.protobufPackage = "service";
|
|
14
|
+
exports.adminService = {
|
|
15
|
+
getCustomerDetails: {
|
|
16
|
+
path: "/service.admin/getCustomerDetails",
|
|
17
|
+
requestStream: false,
|
|
18
|
+
responseStream: false,
|
|
19
|
+
requestSerialize: (value) => Buffer.from(getcustomer_1.request.encode(value).finish()),
|
|
20
|
+
requestDeserialize: (value) => getcustomer_1.request.decode(value),
|
|
21
|
+
responseSerialize: (value) => Buffer.from(getcustomer_1.response.encode(value).finish()),
|
|
22
|
+
responseDeserialize: (value) => getcustomer_1.response.decode(value),
|
|
23
|
+
},
|
|
24
|
+
getCustomerById: {
|
|
25
|
+
path: "/service.admin/getCustomerById",
|
|
26
|
+
requestStream: false,
|
|
27
|
+
responseStream: false,
|
|
28
|
+
requestSerialize: (value) => Buffer.from(getcustomerbyid_1.request.encode(value).finish()),
|
|
29
|
+
requestDeserialize: (value) => getcustomerbyid_1.request.decode(value),
|
|
30
|
+
responseSerialize: (value) => Buffer.from(getcustomerbyid_1.response.encode(value).finish()),
|
|
31
|
+
responseDeserialize: (value) => getcustomerbyid_1.response.decode(value),
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
exports.adminClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.adminService, "service.admin");
|
package/ts/eqxcustomer.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ import { sendOtpRequest, sendOtpResponse } from "./eqxcustomers/sendotp";
|
|
|
24
24
|
import { truecallerLoginRequest, truecallerLoginResponse } from "./eqxcustomers/truecallerlogin";
|
|
25
25
|
import { updateCustomerRequest, updateCustomerResponse } from "./eqxcustomers/updatecustomer";
|
|
26
26
|
import { updateCustomerBasicDetailsRequest, updateCustomerBasicDetailsResponse } from "./eqxcustomers/updatecustomerbasicdetails";
|
|
27
|
+
import { updateCustomerCategoryRequest, updateCustomerCategoryResponse } from "./eqxcustomers/updatecustomercategory";
|
|
27
28
|
import { updateCustomerDeviceDetailsRequest, updateCustomerDeviceDetailsResponse } from "./eqxcustomers/updatedevicedetails";
|
|
28
29
|
import { updateNotificationRequest, updateNotificationResponse } from "./eqxcustomers/updatenotification";
|
|
29
30
|
import { updatePushIdRequest, updatePushIdResponse } from "./eqxcustomers/updatepushid";
|
|
@@ -249,6 +250,15 @@ export declare const eqxcustomersService: {
|
|
|
249
250
|
readonly responseSerialize: (value: CustomerDeviceInfoResponse) => Buffer;
|
|
250
251
|
readonly responseDeserialize: (value: Buffer) => CustomerDeviceInfoResponse;
|
|
251
252
|
};
|
|
253
|
+
readonly updateCustomerCategory: {
|
|
254
|
+
readonly path: "/service.eqxcustomers/updateCustomerCategory";
|
|
255
|
+
readonly requestStream: false;
|
|
256
|
+
readonly responseStream: false;
|
|
257
|
+
readonly requestSerialize: (value: updateCustomerCategoryRequest) => Buffer;
|
|
258
|
+
readonly requestDeserialize: (value: Buffer) => updateCustomerCategoryRequest;
|
|
259
|
+
readonly responseSerialize: (value: updateCustomerCategoryResponse) => Buffer;
|
|
260
|
+
readonly responseDeserialize: (value: Buffer) => updateCustomerCategoryResponse;
|
|
261
|
+
};
|
|
252
262
|
readonly getLendingSyncedInfo: {
|
|
253
263
|
readonly path: "/service.eqxcustomers/getLendingSyncedInfo";
|
|
254
264
|
readonly requestStream: false;
|
|
@@ -338,6 +348,7 @@ export interface eqxcustomersServer extends UntypedServiceImplementation {
|
|
|
338
348
|
getlendingHomePage: handleUnaryCall<getlendingHomePageRequest, getlendingHomePageResponse>;
|
|
339
349
|
getLendingCustomerAppsInfo: handleUnaryCall<CustomerAppsInfoRequest, CustomerAppsInfoResponse>;
|
|
340
350
|
getLendingCustomerDeviceInfo: handleUnaryCall<CustomerDeviceInfoRequest, CustomerDeviceInfoResponse>;
|
|
351
|
+
updateCustomerCategory: handleUnaryCall<updateCustomerCategoryRequest, updateCustomerCategoryResponse>;
|
|
341
352
|
getLendingSyncedInfo: handleUnaryCall<getLendingSyncedInfoRequest, getLendingSyncedInfoResponse>;
|
|
342
353
|
getLendingRefreshToken: handleUnaryCall<getLendingRefreshTokenRequest, getLendingRefreshTokenResponse>;
|
|
343
354
|
getCustomerByVpa: handleUnaryCall<getCustomerByVpaRequest, getCustomerByVpaResponse>;
|
|
@@ -419,6 +430,9 @@ export interface eqxcustomersClient extends Client {
|
|
|
419
430
|
getLendingCustomerDeviceInfo(request: CustomerDeviceInfoRequest, callback: (error: ServiceError | null, response: CustomerDeviceInfoResponse) => void): ClientUnaryCall;
|
|
420
431
|
getLendingCustomerDeviceInfo(request: CustomerDeviceInfoRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CustomerDeviceInfoResponse) => void): ClientUnaryCall;
|
|
421
432
|
getLendingCustomerDeviceInfo(request: CustomerDeviceInfoRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CustomerDeviceInfoResponse) => void): ClientUnaryCall;
|
|
433
|
+
updateCustomerCategory(request: updateCustomerCategoryRequest, callback: (error: ServiceError | null, response: updateCustomerCategoryResponse) => void): ClientUnaryCall;
|
|
434
|
+
updateCustomerCategory(request: updateCustomerCategoryRequest, metadata: Metadata, callback: (error: ServiceError | null, response: updateCustomerCategoryResponse) => void): ClientUnaryCall;
|
|
435
|
+
updateCustomerCategory(request: updateCustomerCategoryRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: updateCustomerCategoryResponse) => void): ClientUnaryCall;
|
|
422
436
|
getLendingSyncedInfo(request: getLendingSyncedInfoRequest, callback: (error: ServiceError | null, response: getLendingSyncedInfoResponse) => void): ClientUnaryCall;
|
|
423
437
|
getLendingSyncedInfo(request: getLendingSyncedInfoRequest, metadata: Metadata, callback: (error: ServiceError | null, response: getLendingSyncedInfoResponse) => void): ClientUnaryCall;
|
|
424
438
|
getLendingSyncedInfo(request: getLendingSyncedInfoRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: getLendingSyncedInfoResponse) => void): ClientUnaryCall;
|
package/ts/eqxcustomer.js
CHANGED
|
@@ -33,6 +33,7 @@ const sendotp_1 = require("./eqxcustomers/sendotp");
|
|
|
33
33
|
const truecallerlogin_1 = require("./eqxcustomers/truecallerlogin");
|
|
34
34
|
const updatecustomer_1 = require("./eqxcustomers/updatecustomer");
|
|
35
35
|
const updatecustomerbasicdetails_1 = require("./eqxcustomers/updatecustomerbasicdetails");
|
|
36
|
+
const updatecustomercategory_1 = require("./eqxcustomers/updatecustomercategory");
|
|
36
37
|
const updatedevicedetails_1 = require("./eqxcustomers/updatedevicedetails");
|
|
37
38
|
const updatenotification_1 = require("./eqxcustomers/updatenotification");
|
|
38
39
|
const updatepushid_1 = require("./eqxcustomers/updatepushid");
|
|
@@ -257,6 +258,15 @@ exports.eqxcustomersService = {
|
|
|
257
258
|
responseSerialize: (value) => Buffer.from(getlendingcustomerdeviceInfo_1.CustomerDeviceInfoResponse.encode(value).finish()),
|
|
258
259
|
responseDeserialize: (value) => getlendingcustomerdeviceInfo_1.CustomerDeviceInfoResponse.decode(value),
|
|
259
260
|
},
|
|
261
|
+
updateCustomerCategory: {
|
|
262
|
+
path: "/service.eqxcustomers/updateCustomerCategory",
|
|
263
|
+
requestStream: false,
|
|
264
|
+
responseStream: false,
|
|
265
|
+
requestSerialize: (value) => Buffer.from(updatecustomercategory_1.updateCustomerCategoryRequest.encode(value).finish()),
|
|
266
|
+
requestDeserialize: (value) => updatecustomercategory_1.updateCustomerCategoryRequest.decode(value),
|
|
267
|
+
responseSerialize: (value) => Buffer.from(updatecustomercategory_1.updateCustomerCategoryResponse.encode(value).finish()),
|
|
268
|
+
responseDeserialize: (value) => updatecustomercategory_1.updateCustomerCategoryResponse.decode(value),
|
|
269
|
+
},
|
|
260
270
|
getLendingSyncedInfo: {
|
|
261
271
|
path: "/service.eqxcustomers/getLendingSyncedInfo",
|
|
262
272
|
requestStream: false,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "eqxcustomers.updatecustomercategory";
|
|
3
|
+
export interface updateCustomerCategoryRequest {
|
|
4
|
+
category: string;
|
|
5
|
+
customer_id: number;
|
|
6
|
+
}
|
|
7
|
+
export interface updateCustomerCategoryResponse {
|
|
8
|
+
status: boolean;
|
|
9
|
+
message?: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const updateCustomerCategoryRequest: {
|
|
12
|
+
encode(message: updateCustomerCategoryRequest, writer?: _m0.Writer): _m0.Writer;
|
|
13
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): updateCustomerCategoryRequest;
|
|
14
|
+
fromJSON(object: any): updateCustomerCategoryRequest;
|
|
15
|
+
toJSON(message: updateCustomerCategoryRequest): unknown;
|
|
16
|
+
create<I extends Exact<DeepPartial<updateCustomerCategoryRequest>, I>>(base?: I): updateCustomerCategoryRequest;
|
|
17
|
+
fromPartial<I extends Exact<DeepPartial<updateCustomerCategoryRequest>, I>>(object: I): updateCustomerCategoryRequest;
|
|
18
|
+
};
|
|
19
|
+
export declare const updateCustomerCategoryResponse: {
|
|
20
|
+
encode(message: updateCustomerCategoryResponse, writer?: _m0.Writer): _m0.Writer;
|
|
21
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): updateCustomerCategoryResponse;
|
|
22
|
+
fromJSON(object: any): updateCustomerCategoryResponse;
|
|
23
|
+
toJSON(message: updateCustomerCategoryResponse): unknown;
|
|
24
|
+
create<I extends Exact<DeepPartial<updateCustomerCategoryResponse>, I>>(base?: I): updateCustomerCategoryResponse;
|
|
25
|
+
fromPartial<I extends Exact<DeepPartial<updateCustomerCategoryResponse>, I>>(object: I): updateCustomerCategoryResponse;
|
|
26
|
+
};
|
|
27
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
28
|
+
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 {} ? {
|
|
29
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
30
|
+
} : Partial<T>;
|
|
31
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
32
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
33
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
34
|
+
} & {
|
|
35
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
36
|
+
};
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,163 @@
|
|
|
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/updatecustomercategory.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.updateCustomerCategoryResponse = exports.updateCustomerCategoryRequest = 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.updatecustomercategory";
|
|
16
|
+
function createBaseupdateCustomerCategoryRequest() {
|
|
17
|
+
return { category: "", customer_id: 0 };
|
|
18
|
+
}
|
|
19
|
+
exports.updateCustomerCategoryRequest = {
|
|
20
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
21
|
+
if (message.category !== "") {
|
|
22
|
+
writer.uint32(10).string(message.category);
|
|
23
|
+
}
|
|
24
|
+
if (message.customer_id !== 0) {
|
|
25
|
+
writer.uint32(16).int64(message.customer_id);
|
|
26
|
+
}
|
|
27
|
+
return writer;
|
|
28
|
+
},
|
|
29
|
+
decode(input, length) {
|
|
30
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
31
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
32
|
+
const message = createBaseupdateCustomerCategoryRequest();
|
|
33
|
+
while (reader.pos < end) {
|
|
34
|
+
const tag = reader.uint32();
|
|
35
|
+
switch (tag >>> 3) {
|
|
36
|
+
case 1:
|
|
37
|
+
if (tag !== 10) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
message.category = reader.string();
|
|
41
|
+
continue;
|
|
42
|
+
case 2:
|
|
43
|
+
if (tag !== 16) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
message.customer_id = longToNumber(reader.int64());
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
reader.skipType(tag & 7);
|
|
53
|
+
}
|
|
54
|
+
return message;
|
|
55
|
+
},
|
|
56
|
+
fromJSON(object) {
|
|
57
|
+
return {
|
|
58
|
+
category: isSet(object.category) ? globalThis.String(object.category) : "",
|
|
59
|
+
customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
toJSON(message) {
|
|
63
|
+
const obj = {};
|
|
64
|
+
if (message.category !== "") {
|
|
65
|
+
obj.category = message.category;
|
|
66
|
+
}
|
|
67
|
+
if (message.customer_id !== 0) {
|
|
68
|
+
obj.customer_id = Math.round(message.customer_id);
|
|
69
|
+
}
|
|
70
|
+
return obj;
|
|
71
|
+
},
|
|
72
|
+
create(base) {
|
|
73
|
+
return exports.updateCustomerCategoryRequest.fromPartial(base ?? {});
|
|
74
|
+
},
|
|
75
|
+
fromPartial(object) {
|
|
76
|
+
const message = createBaseupdateCustomerCategoryRequest();
|
|
77
|
+
message.category = object.category ?? "";
|
|
78
|
+
message.customer_id = object.customer_id ?? 0;
|
|
79
|
+
return message;
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
function createBaseupdateCustomerCategoryResponse() {
|
|
83
|
+
return { status: false, message: undefined };
|
|
84
|
+
}
|
|
85
|
+
exports.updateCustomerCategoryResponse = {
|
|
86
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
87
|
+
if (message.status !== false) {
|
|
88
|
+
writer.uint32(8).bool(message.status);
|
|
89
|
+
}
|
|
90
|
+
if (message.message !== undefined) {
|
|
91
|
+
writer.uint32(18).string(message.message);
|
|
92
|
+
}
|
|
93
|
+
return writer;
|
|
94
|
+
},
|
|
95
|
+
decode(input, length) {
|
|
96
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
97
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
98
|
+
const message = createBaseupdateCustomerCategoryResponse();
|
|
99
|
+
while (reader.pos < end) {
|
|
100
|
+
const tag = reader.uint32();
|
|
101
|
+
switch (tag >>> 3) {
|
|
102
|
+
case 1:
|
|
103
|
+
if (tag !== 8) {
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
message.status = reader.bool();
|
|
107
|
+
continue;
|
|
108
|
+
case 2:
|
|
109
|
+
if (tag !== 18) {
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
message.message = reader.string();
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
reader.skipType(tag & 7);
|
|
119
|
+
}
|
|
120
|
+
return message;
|
|
121
|
+
},
|
|
122
|
+
fromJSON(object) {
|
|
123
|
+
return {
|
|
124
|
+
status: isSet(object.status) ? globalThis.Boolean(object.status) : false,
|
|
125
|
+
message: isSet(object.message) ? globalThis.String(object.message) : undefined,
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
toJSON(message) {
|
|
129
|
+
const obj = {};
|
|
130
|
+
if (message.status !== false) {
|
|
131
|
+
obj.status = message.status;
|
|
132
|
+
}
|
|
133
|
+
if (message.message !== undefined) {
|
|
134
|
+
obj.message = message.message;
|
|
135
|
+
}
|
|
136
|
+
return obj;
|
|
137
|
+
},
|
|
138
|
+
create(base) {
|
|
139
|
+
return exports.updateCustomerCategoryResponse.fromPartial(base ?? {});
|
|
140
|
+
},
|
|
141
|
+
fromPartial(object) {
|
|
142
|
+
const message = createBaseupdateCustomerCategoryResponse();
|
|
143
|
+
message.status = object.status ?? false;
|
|
144
|
+
message.message = object.message ?? undefined;
|
|
145
|
+
return message;
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
function longToNumber(long) {
|
|
149
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
150
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
151
|
+
}
|
|
152
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
153
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
154
|
+
}
|
|
155
|
+
return long.toNumber();
|
|
156
|
+
}
|
|
157
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
158
|
+
minimal_1.default.util.Long = long_1.default;
|
|
159
|
+
minimal_1.default.configure();
|
|
160
|
+
}
|
|
161
|
+
function isSet(value) {
|
|
162
|
+
return value !== null && value !== undefined;
|
|
163
|
+
}
|