@stashfin/grpc 1.2.689 → 1.2.690
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,7 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
2
|
export declare const protobufPackage = "eqxcustomers.getcustomerbyid";
|
|
3
3
|
export interface getCustomerByIdRequest {
|
|
4
|
+
customer_id?: number | undefined;
|
|
4
5
|
}
|
|
5
6
|
export interface getCustomerByIdResponse {
|
|
6
7
|
id: number;
|
|
@@ -18,12 +19,12 @@ export interface getCustomerByIdResponse {
|
|
|
18
19
|
dob?: string | undefined;
|
|
19
20
|
}
|
|
20
21
|
export declare const getCustomerByIdRequest: {
|
|
21
|
-
encode(
|
|
22
|
+
encode(message: getCustomerByIdRequest, writer?: _m0.Writer): _m0.Writer;
|
|
22
23
|
decode(input: _m0.Reader | Uint8Array, length?: number): getCustomerByIdRequest;
|
|
23
|
-
fromJSON(
|
|
24
|
-
toJSON(
|
|
24
|
+
fromJSON(object: any): getCustomerByIdRequest;
|
|
25
|
+
toJSON(message: getCustomerByIdRequest): unknown;
|
|
25
26
|
create<I extends Exact<DeepPartial<getCustomerByIdRequest>, I>>(base?: I): getCustomerByIdRequest;
|
|
26
|
-
fromPartial<I extends Exact<DeepPartial<getCustomerByIdRequest>, I>>(
|
|
27
|
+
fromPartial<I extends Exact<DeepPartial<getCustomerByIdRequest>, I>>(object: I): getCustomerByIdRequest;
|
|
27
28
|
};
|
|
28
29
|
export declare const getCustomerByIdResponse: {
|
|
29
30
|
encode(message: getCustomerByIdResponse, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -10,13 +10,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.getCustomerByIdResponse = exports.getCustomerByIdRequest = exports.protobufPackage = void 0;
|
|
12
12
|
/* eslint-disable */
|
|
13
|
+
const long_1 = __importDefault(require("long"));
|
|
13
14
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
15
|
exports.protobufPackage = "eqxcustomers.getcustomerbyid";
|
|
15
16
|
function createBasegetCustomerByIdRequest() {
|
|
16
|
-
return {};
|
|
17
|
+
return { customer_id: undefined };
|
|
17
18
|
}
|
|
18
19
|
exports.getCustomerByIdRequest = {
|
|
19
|
-
encode(
|
|
20
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
21
|
+
if (message.customer_id !== undefined) {
|
|
22
|
+
writer.uint32(8).int64(message.customer_id);
|
|
23
|
+
}
|
|
20
24
|
return writer;
|
|
21
25
|
},
|
|
22
26
|
decode(input, length) {
|
|
@@ -26,6 +30,12 @@ exports.getCustomerByIdRequest = {
|
|
|
26
30
|
while (reader.pos < end) {
|
|
27
31
|
const tag = reader.uint32();
|
|
28
32
|
switch (tag >>> 3) {
|
|
33
|
+
case 1:
|
|
34
|
+
if (tag !== 8) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
message.customer_id = longToNumber(reader.int64());
|
|
38
|
+
continue;
|
|
29
39
|
}
|
|
30
40
|
if ((tag & 7) === 4 || tag === 0) {
|
|
31
41
|
break;
|
|
@@ -34,18 +44,22 @@ exports.getCustomerByIdRequest = {
|
|
|
34
44
|
}
|
|
35
45
|
return message;
|
|
36
46
|
},
|
|
37
|
-
fromJSON(
|
|
38
|
-
return {};
|
|
47
|
+
fromJSON(object) {
|
|
48
|
+
return { customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : undefined };
|
|
39
49
|
},
|
|
40
|
-
toJSON(
|
|
50
|
+
toJSON(message) {
|
|
41
51
|
const obj = {};
|
|
52
|
+
if (message.customer_id !== undefined) {
|
|
53
|
+
obj.customer_id = Math.round(message.customer_id);
|
|
54
|
+
}
|
|
42
55
|
return obj;
|
|
43
56
|
},
|
|
44
57
|
create(base) {
|
|
45
58
|
return exports.getCustomerByIdRequest.fromPartial(base ?? {});
|
|
46
59
|
},
|
|
47
|
-
fromPartial(
|
|
60
|
+
fromPartial(object) {
|
|
48
61
|
const message = createBasegetCustomerByIdRequest();
|
|
62
|
+
message.customer_id = object.customer_id ?? undefined;
|
|
49
63
|
return message;
|
|
50
64
|
},
|
|
51
65
|
};
|
|
@@ -283,6 +297,19 @@ exports.getCustomerByIdResponse = {
|
|
|
283
297
|
return message;
|
|
284
298
|
},
|
|
285
299
|
};
|
|
300
|
+
function longToNumber(long) {
|
|
301
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
302
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
303
|
+
}
|
|
304
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
305
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
306
|
+
}
|
|
307
|
+
return long.toNumber();
|
|
308
|
+
}
|
|
309
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
310
|
+
minimal_1.default.util.Long = long_1.default;
|
|
311
|
+
minimal_1.default.configure();
|
|
312
|
+
}
|
|
286
313
|
function isSet(value) {
|
|
287
314
|
return value !== null && value !== undefined;
|
|
288
315
|
}
|