@stashfin/grpc 1.2.437 → 1.2.438
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,18 +10,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.updateFreedomTxnStatusResponse = exports.updateFreedomTxnStatusRequest = 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.freedom.updatefreedomtxnstatus";
|
|
15
16
|
function createBaseupdateFreedomTxnStatusRequest() {
|
|
16
|
-
return { order_id: "", status: "" };
|
|
17
|
+
return { customer_id: 0, order_id: "", status: "" };
|
|
17
18
|
}
|
|
18
19
|
exports.updateFreedomTxnStatusRequest = {
|
|
19
20
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
21
|
+
if (message.customer_id !== 0) {
|
|
22
|
+
writer.uint32(8).int64(message.customer_id);
|
|
23
|
+
}
|
|
20
24
|
if (message.order_id !== "") {
|
|
21
|
-
writer.uint32(
|
|
25
|
+
writer.uint32(18).string(message.order_id);
|
|
22
26
|
}
|
|
23
27
|
if (message.status !== "") {
|
|
24
|
-
writer.uint32(
|
|
28
|
+
writer.uint32(26).string(message.status);
|
|
25
29
|
}
|
|
26
30
|
return writer;
|
|
27
31
|
},
|
|
@@ -33,15 +37,21 @@ exports.updateFreedomTxnStatusRequest = {
|
|
|
33
37
|
const tag = reader.uint32();
|
|
34
38
|
switch (tag >>> 3) {
|
|
35
39
|
case 1:
|
|
36
|
-
if (tag !==
|
|
40
|
+
if (tag !== 8) {
|
|
37
41
|
break;
|
|
38
42
|
}
|
|
39
|
-
message.
|
|
43
|
+
message.customer_id = longToNumber(reader.int64());
|
|
40
44
|
continue;
|
|
41
45
|
case 2:
|
|
42
46
|
if (tag !== 18) {
|
|
43
47
|
break;
|
|
44
48
|
}
|
|
49
|
+
message.order_id = reader.string();
|
|
50
|
+
continue;
|
|
51
|
+
case 3:
|
|
52
|
+
if (tag !== 26) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
45
55
|
message.status = reader.string();
|
|
46
56
|
continue;
|
|
47
57
|
}
|
|
@@ -54,12 +64,16 @@ exports.updateFreedomTxnStatusRequest = {
|
|
|
54
64
|
},
|
|
55
65
|
fromJSON(object) {
|
|
56
66
|
return {
|
|
67
|
+
customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
|
|
57
68
|
order_id: isSet(object.order_id) ? globalThis.String(object.order_id) : "",
|
|
58
69
|
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
59
70
|
};
|
|
60
71
|
},
|
|
61
72
|
toJSON(message) {
|
|
62
73
|
const obj = {};
|
|
74
|
+
if (message.customer_id !== 0) {
|
|
75
|
+
obj.customer_id = Math.round(message.customer_id);
|
|
76
|
+
}
|
|
63
77
|
if (message.order_id !== "") {
|
|
64
78
|
obj.order_id = message.order_id;
|
|
65
79
|
}
|
|
@@ -73,6 +87,7 @@ exports.updateFreedomTxnStatusRequest = {
|
|
|
73
87
|
},
|
|
74
88
|
fromPartial(object) {
|
|
75
89
|
const message = createBaseupdateFreedomTxnStatusRequest();
|
|
90
|
+
message.customer_id = object.customer_id ?? 0;
|
|
76
91
|
message.order_id = object.order_id ?? "";
|
|
77
92
|
message.status = object.status ?? "";
|
|
78
93
|
return message;
|
|
@@ -128,6 +143,19 @@ exports.updateFreedomTxnStatusResponse = {
|
|
|
128
143
|
return message;
|
|
129
144
|
},
|
|
130
145
|
};
|
|
146
|
+
function longToNumber(long) {
|
|
147
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
148
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
149
|
+
}
|
|
150
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
151
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
152
|
+
}
|
|
153
|
+
return long.toNumber();
|
|
154
|
+
}
|
|
155
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
156
|
+
minimal_1.default.util.Long = long_1.default;
|
|
157
|
+
minimal_1.default.configure();
|
|
158
|
+
}
|
|
131
159
|
function isSet(value) {
|
|
132
160
|
return value !== null && value !== undefined;
|
|
133
161
|
}
|