@fraym/proto 0.9.0 → 0.9.2
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.
|
@@ -10,6 +10,12 @@ export interface LockingRequest {
|
|
|
10
10
|
} | {
|
|
11
11
|
$case: "lockLocal";
|
|
12
12
|
lockLocal: LockingRequest_LockLocal;
|
|
13
|
+
} | {
|
|
14
|
+
$case: "unlockGlobal";
|
|
15
|
+
unlockGlobal: LockingRequest_UnlockGlobal;
|
|
16
|
+
} | {
|
|
17
|
+
$case: "unlockLocal";
|
|
18
|
+
unlockLocal: LockingRequest_UnlockLocal;
|
|
13
19
|
} | undefined;
|
|
14
20
|
}
|
|
15
21
|
export interface LockingRequest_Init {
|
|
@@ -52,9 +58,11 @@ export interface LockingResponse_InitAck {
|
|
|
52
58
|
error: string;
|
|
53
59
|
}
|
|
54
60
|
export interface LockingResponse_LockGlobalAck {
|
|
61
|
+
lockId: string;
|
|
55
62
|
error: string;
|
|
56
63
|
}
|
|
57
64
|
export interface LockingResponse_LockLocalAck {
|
|
65
|
+
lockId: string;
|
|
58
66
|
error: string;
|
|
59
67
|
}
|
|
60
68
|
export declare const LockingRequest: {
|
|
@@ -22,6 +22,12 @@ exports.LockingRequest = {
|
|
|
22
22
|
case "lockLocal":
|
|
23
23
|
exports.LockingRequest_LockLocal.encode(message.payload.lockLocal, writer.uint32(26).fork()).ldelim();
|
|
24
24
|
break;
|
|
25
|
+
case "unlockGlobal":
|
|
26
|
+
exports.LockingRequest_UnlockGlobal.encode(message.payload.unlockGlobal, writer.uint32(34).fork()).ldelim();
|
|
27
|
+
break;
|
|
28
|
+
case "unlockLocal":
|
|
29
|
+
exports.LockingRequest_UnlockLocal.encode(message.payload.unlockLocal, writer.uint32(42).fork()).ldelim();
|
|
30
|
+
break;
|
|
25
31
|
}
|
|
26
32
|
return writer;
|
|
27
33
|
},
|
|
@@ -53,6 +59,24 @@ exports.LockingRequest = {
|
|
|
53
59
|
}
|
|
54
60
|
message.payload = { $case: "lockLocal", lockLocal: exports.LockingRequest_LockLocal.decode(reader, reader.uint32()) };
|
|
55
61
|
continue;
|
|
62
|
+
case 4:
|
|
63
|
+
if (tag !== 34) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
message.payload = {
|
|
67
|
+
$case: "unlockGlobal",
|
|
68
|
+
unlockGlobal: exports.LockingRequest_UnlockGlobal.decode(reader, reader.uint32()),
|
|
69
|
+
};
|
|
70
|
+
continue;
|
|
71
|
+
case 5:
|
|
72
|
+
if (tag !== 42) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
message.payload = {
|
|
76
|
+
$case: "unlockLocal",
|
|
77
|
+
unlockLocal: exports.LockingRequest_UnlockLocal.decode(reader, reader.uint32()),
|
|
78
|
+
};
|
|
79
|
+
continue;
|
|
56
80
|
}
|
|
57
81
|
if ((tag & 7) === 4 || tag === 0) {
|
|
58
82
|
break;
|
|
@@ -69,11 +93,15 @@ exports.LockingRequest = {
|
|
|
69
93
|
? { $case: "lockGlobal", lockGlobal: exports.LockingRequest_LockGlobal.fromJSON(object.lockGlobal) }
|
|
70
94
|
: isSet(object.lockLocal)
|
|
71
95
|
? { $case: "lockLocal", lockLocal: exports.LockingRequest_LockLocal.fromJSON(object.lockLocal) }
|
|
72
|
-
:
|
|
96
|
+
: isSet(object.unlockGlobal)
|
|
97
|
+
? { $case: "unlockGlobal", unlockGlobal: exports.LockingRequest_UnlockGlobal.fromJSON(object.unlockGlobal) }
|
|
98
|
+
: isSet(object.unlockLocal)
|
|
99
|
+
? { $case: "unlockLocal", unlockLocal: exports.LockingRequest_UnlockLocal.fromJSON(object.unlockLocal) }
|
|
100
|
+
: undefined,
|
|
73
101
|
};
|
|
74
102
|
},
|
|
75
103
|
toJSON(message) {
|
|
76
|
-
var _a, _b, _c;
|
|
104
|
+
var _a, _b, _c, _d, _e;
|
|
77
105
|
const obj = {};
|
|
78
106
|
if (((_a = message.payload) === null || _a === void 0 ? void 0 : _a.$case) === "init") {
|
|
79
107
|
obj.init = exports.LockingRequest_Init.toJSON(message.payload.init);
|
|
@@ -84,13 +112,19 @@ exports.LockingRequest = {
|
|
|
84
112
|
if (((_c = message.payload) === null || _c === void 0 ? void 0 : _c.$case) === "lockLocal") {
|
|
85
113
|
obj.lockLocal = exports.LockingRequest_LockLocal.toJSON(message.payload.lockLocal);
|
|
86
114
|
}
|
|
115
|
+
if (((_d = message.payload) === null || _d === void 0 ? void 0 : _d.$case) === "unlockGlobal") {
|
|
116
|
+
obj.unlockGlobal = exports.LockingRequest_UnlockGlobal.toJSON(message.payload.unlockGlobal);
|
|
117
|
+
}
|
|
118
|
+
if (((_e = message.payload) === null || _e === void 0 ? void 0 : _e.$case) === "unlockLocal") {
|
|
119
|
+
obj.unlockLocal = exports.LockingRequest_UnlockLocal.toJSON(message.payload.unlockLocal);
|
|
120
|
+
}
|
|
87
121
|
return obj;
|
|
88
122
|
},
|
|
89
123
|
create(base) {
|
|
90
124
|
return exports.LockingRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
91
125
|
},
|
|
92
126
|
fromPartial(object) {
|
|
93
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
127
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
94
128
|
const message = createBaseLockingRequest();
|
|
95
129
|
if (((_a = object.payload) === null || _a === void 0 ? void 0 : _a.$case) === "init" && ((_b = object.payload) === null || _b === void 0 ? void 0 : _b.init) !== undefined && ((_c = object.payload) === null || _c === void 0 ? void 0 : _c.init) !== null) {
|
|
96
130
|
message.payload = { $case: "init", init: exports.LockingRequest_Init.fromPartial(object.payload.init) };
|
|
@@ -111,6 +145,22 @@ exports.LockingRequest = {
|
|
|
111
145
|
lockLocal: exports.LockingRequest_LockLocal.fromPartial(object.payload.lockLocal),
|
|
112
146
|
};
|
|
113
147
|
}
|
|
148
|
+
if (((_k = object.payload) === null || _k === void 0 ? void 0 : _k.$case) === "unlockGlobal" &&
|
|
149
|
+
((_l = object.payload) === null || _l === void 0 ? void 0 : _l.unlockGlobal) !== undefined &&
|
|
150
|
+
((_m = object.payload) === null || _m === void 0 ? void 0 : _m.unlockGlobal) !== null) {
|
|
151
|
+
message.payload = {
|
|
152
|
+
$case: "unlockGlobal",
|
|
153
|
+
unlockGlobal: exports.LockingRequest_UnlockGlobal.fromPartial(object.payload.unlockGlobal),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (((_o = object.payload) === null || _o === void 0 ? void 0 : _o.$case) === "unlockLocal" &&
|
|
157
|
+
((_p = object.payload) === null || _p === void 0 ? void 0 : _p.unlockLocal) !== undefined &&
|
|
158
|
+
((_q = object.payload) === null || _q === void 0 ? void 0 : _q.unlockLocal) !== null) {
|
|
159
|
+
message.payload = {
|
|
160
|
+
$case: "unlockLocal",
|
|
161
|
+
unlockLocal: exports.LockingRequest_UnlockLocal.fromPartial(object.payload.unlockLocal),
|
|
162
|
+
};
|
|
163
|
+
}
|
|
114
164
|
return message;
|
|
115
165
|
},
|
|
116
166
|
};
|
|
@@ -668,12 +718,15 @@ exports.LockingResponse_InitAck = {
|
|
|
668
718
|
},
|
|
669
719
|
};
|
|
670
720
|
function createBaseLockingResponse_LockGlobalAck() {
|
|
671
|
-
return { error: "" };
|
|
721
|
+
return { lockId: "", error: "" };
|
|
672
722
|
}
|
|
673
723
|
exports.LockingResponse_LockGlobalAck = {
|
|
674
724
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
725
|
+
if (message.lockId !== "") {
|
|
726
|
+
writer.uint32(10).string(message.lockId);
|
|
727
|
+
}
|
|
675
728
|
if (message.error !== "") {
|
|
676
|
-
writer.uint32(
|
|
729
|
+
writer.uint32(18).string(message.error);
|
|
677
730
|
}
|
|
678
731
|
return writer;
|
|
679
732
|
},
|
|
@@ -688,6 +741,12 @@ exports.LockingResponse_LockGlobalAck = {
|
|
|
688
741
|
if (tag !== 10) {
|
|
689
742
|
break;
|
|
690
743
|
}
|
|
744
|
+
message.lockId = reader.string();
|
|
745
|
+
continue;
|
|
746
|
+
case 2:
|
|
747
|
+
if (tag !== 18) {
|
|
748
|
+
break;
|
|
749
|
+
}
|
|
691
750
|
message.error = reader.string();
|
|
692
751
|
continue;
|
|
693
752
|
}
|
|
@@ -699,10 +758,16 @@ exports.LockingResponse_LockGlobalAck = {
|
|
|
699
758
|
return message;
|
|
700
759
|
},
|
|
701
760
|
fromJSON(object) {
|
|
702
|
-
return {
|
|
761
|
+
return {
|
|
762
|
+
lockId: isSet(object.lockId) ? globalThis.String(object.lockId) : "",
|
|
763
|
+
error: isSet(object.error) ? globalThis.String(object.error) : "",
|
|
764
|
+
};
|
|
703
765
|
},
|
|
704
766
|
toJSON(message) {
|
|
705
767
|
const obj = {};
|
|
768
|
+
if (message.lockId !== "") {
|
|
769
|
+
obj.lockId = message.lockId;
|
|
770
|
+
}
|
|
706
771
|
if (message.error !== "") {
|
|
707
772
|
obj.error = message.error;
|
|
708
773
|
}
|
|
@@ -712,19 +777,23 @@ exports.LockingResponse_LockGlobalAck = {
|
|
|
712
777
|
return exports.LockingResponse_LockGlobalAck.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
713
778
|
},
|
|
714
779
|
fromPartial(object) {
|
|
715
|
-
var _a;
|
|
780
|
+
var _a, _b;
|
|
716
781
|
const message = createBaseLockingResponse_LockGlobalAck();
|
|
717
|
-
message.
|
|
782
|
+
message.lockId = (_a = object.lockId) !== null && _a !== void 0 ? _a : "";
|
|
783
|
+
message.error = (_b = object.error) !== null && _b !== void 0 ? _b : "";
|
|
718
784
|
return message;
|
|
719
785
|
},
|
|
720
786
|
};
|
|
721
787
|
function createBaseLockingResponse_LockLocalAck() {
|
|
722
|
-
return { error: "" };
|
|
788
|
+
return { lockId: "", error: "" };
|
|
723
789
|
}
|
|
724
790
|
exports.LockingResponse_LockLocalAck = {
|
|
725
791
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
792
|
+
if (message.lockId !== "") {
|
|
793
|
+
writer.uint32(10).string(message.lockId);
|
|
794
|
+
}
|
|
726
795
|
if (message.error !== "") {
|
|
727
|
-
writer.uint32(
|
|
796
|
+
writer.uint32(18).string(message.error);
|
|
728
797
|
}
|
|
729
798
|
return writer;
|
|
730
799
|
},
|
|
@@ -739,6 +808,12 @@ exports.LockingResponse_LockLocalAck = {
|
|
|
739
808
|
if (tag !== 10) {
|
|
740
809
|
break;
|
|
741
810
|
}
|
|
811
|
+
message.lockId = reader.string();
|
|
812
|
+
continue;
|
|
813
|
+
case 2:
|
|
814
|
+
if (tag !== 18) {
|
|
815
|
+
break;
|
|
816
|
+
}
|
|
742
817
|
message.error = reader.string();
|
|
743
818
|
continue;
|
|
744
819
|
}
|
|
@@ -750,10 +825,16 @@ exports.LockingResponse_LockLocalAck = {
|
|
|
750
825
|
return message;
|
|
751
826
|
},
|
|
752
827
|
fromJSON(object) {
|
|
753
|
-
return {
|
|
828
|
+
return {
|
|
829
|
+
lockId: isSet(object.lockId) ? globalThis.String(object.lockId) : "",
|
|
830
|
+
error: isSet(object.error) ? globalThis.String(object.error) : "",
|
|
831
|
+
};
|
|
754
832
|
},
|
|
755
833
|
toJSON(message) {
|
|
756
834
|
const obj = {};
|
|
835
|
+
if (message.lockId !== "") {
|
|
836
|
+
obj.lockId = message.lockId;
|
|
837
|
+
}
|
|
757
838
|
if (message.error !== "") {
|
|
758
839
|
obj.error = message.error;
|
|
759
840
|
}
|
|
@@ -763,9 +844,10 @@ exports.LockingResponse_LockLocalAck = {
|
|
|
763
844
|
return exports.LockingResponse_LockLocalAck.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
764
845
|
},
|
|
765
846
|
fromPartial(object) {
|
|
766
|
-
var _a;
|
|
847
|
+
var _a, _b;
|
|
767
848
|
const message = createBaseLockingResponse_LockLocalAck();
|
|
768
|
-
message.
|
|
849
|
+
message.lockId = (_a = object.lockId) !== null && _a !== void 0 ? _a : "";
|
|
850
|
+
message.error = (_b = object.error) !== null && _b !== void 0 ? _b : "";
|
|
769
851
|
return message;
|
|
770
852
|
},
|
|
771
853
|
};
|