@stashfin/grpc 1.2.254 → 1.2.255
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
|
@@ -10,15 +10,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.updateCategoryResponse = exports.updateCategoryRequest = 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 = "customers.updatecategory";
|
|
15
16
|
function createBaseupdateCategoryRequest() {
|
|
16
|
-
return { customer_id:
|
|
17
|
+
return { customer_id: 0, category: "" };
|
|
17
18
|
}
|
|
18
19
|
exports.updateCategoryRequest = {
|
|
19
20
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
-
if (message.customer_id !==
|
|
21
|
-
writer.uint32(
|
|
21
|
+
if (message.customer_id !== 0) {
|
|
22
|
+
writer.uint32(8).int64(message.customer_id);
|
|
22
23
|
}
|
|
23
24
|
if (message.category !== "") {
|
|
24
25
|
writer.uint32(18).string(message.category);
|
|
@@ -33,10 +34,10 @@ exports.updateCategoryRequest = {
|
|
|
33
34
|
const tag = reader.uint32();
|
|
34
35
|
switch (tag >>> 3) {
|
|
35
36
|
case 1:
|
|
36
|
-
if (tag !==
|
|
37
|
+
if (tag !== 8) {
|
|
37
38
|
break;
|
|
38
39
|
}
|
|
39
|
-
message.customer_id = reader.
|
|
40
|
+
message.customer_id = longToNumber(reader.int64());
|
|
40
41
|
continue;
|
|
41
42
|
case 2:
|
|
42
43
|
if (tag !== 18) {
|
|
@@ -54,14 +55,14 @@ exports.updateCategoryRequest = {
|
|
|
54
55
|
},
|
|
55
56
|
fromJSON(object) {
|
|
56
57
|
return {
|
|
57
|
-
customer_id: isSet(object.customer_id) ? globalThis.
|
|
58
|
+
customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
|
|
58
59
|
category: isSet(object.category) ? globalThis.String(object.category) : "",
|
|
59
60
|
};
|
|
60
61
|
},
|
|
61
62
|
toJSON(message) {
|
|
62
63
|
const obj = {};
|
|
63
|
-
if (message.customer_id !==
|
|
64
|
-
obj.customer_id = message.customer_id;
|
|
64
|
+
if (message.customer_id !== 0) {
|
|
65
|
+
obj.customer_id = Math.round(message.customer_id);
|
|
65
66
|
}
|
|
66
67
|
if (message.category !== "") {
|
|
67
68
|
obj.category = message.category;
|
|
@@ -73,7 +74,7 @@ exports.updateCategoryRequest = {
|
|
|
73
74
|
},
|
|
74
75
|
fromPartial(object) {
|
|
75
76
|
const message = createBaseupdateCategoryRequest();
|
|
76
|
-
message.customer_id = object.customer_id ??
|
|
77
|
+
message.customer_id = object.customer_id ?? 0;
|
|
77
78
|
message.category = object.category ?? "";
|
|
78
79
|
return message;
|
|
79
80
|
},
|
|
@@ -128,6 +129,19 @@ exports.updateCategoryResponse = {
|
|
|
128
129
|
return message;
|
|
129
130
|
},
|
|
130
131
|
};
|
|
132
|
+
function longToNumber(long) {
|
|
133
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
134
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
135
|
+
}
|
|
136
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
137
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
138
|
+
}
|
|
139
|
+
return long.toNumber();
|
|
140
|
+
}
|
|
141
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
142
|
+
minimal_1.default.util.Long = long_1.default;
|
|
143
|
+
minimal_1.default.configure();
|
|
144
|
+
}
|
|
131
145
|
function isSet(value) {
|
|
132
146
|
return value !== null && value !== undefined;
|
|
133
147
|
}
|