@fraym/proto 0.7.0 → 0.9.0
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/freym/streams/clientchannel/is_stream_empty.d.ts +36 -0
- package/freym/streams/clientchannel/is_stream_empty.js +129 -0
- package/freym/streams/clientchannel/service.d.ts +14 -0
- package/freym/streams/clientchannel/service.js +10 -0
- package/freym/streams/clientchannel.d.ts +1 -0
- package/freym/streams/clientchannel.js +4 -1
- package/freym/sync/management/locking.d.ts +150 -0
- package/freym/sync/management/locking.js +774 -0
- package/freym/sync/management/service.d.ts +15 -1
- package/freym/sync/management/service.js +10 -0
- package/freym/sync/management.d.ts +1 -0
- package/freym/sync/management.js +12 -1
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "freym.streams.clientchannel";
|
|
3
|
+
export interface IsStreamEmptyRequest {
|
|
4
|
+
tenantId: string;
|
|
5
|
+
stream: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IsStreamEmptyResponse {
|
|
8
|
+
isEmpty: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const IsStreamEmptyRequest: {
|
|
11
|
+
encode(message: IsStreamEmptyRequest, writer?: _m0.Writer): _m0.Writer;
|
|
12
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): IsStreamEmptyRequest;
|
|
13
|
+
fromJSON(object: any): IsStreamEmptyRequest;
|
|
14
|
+
toJSON(message: IsStreamEmptyRequest): unknown;
|
|
15
|
+
create(base?: DeepPartial<IsStreamEmptyRequest>): IsStreamEmptyRequest;
|
|
16
|
+
fromPartial(object: DeepPartial<IsStreamEmptyRequest>): IsStreamEmptyRequest;
|
|
17
|
+
};
|
|
18
|
+
export declare const IsStreamEmptyResponse: {
|
|
19
|
+
encode(message: IsStreamEmptyResponse, writer?: _m0.Writer): _m0.Writer;
|
|
20
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): IsStreamEmptyResponse;
|
|
21
|
+
fromJSON(object: any): IsStreamEmptyResponse;
|
|
22
|
+
toJSON(message: IsStreamEmptyResponse): unknown;
|
|
23
|
+
create(base?: DeepPartial<IsStreamEmptyResponse>): IsStreamEmptyResponse;
|
|
24
|
+
fromPartial(object: DeepPartial<IsStreamEmptyResponse>): IsStreamEmptyResponse;
|
|
25
|
+
};
|
|
26
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
27
|
+
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 {
|
|
28
|
+
$case: string;
|
|
29
|
+
} ? {
|
|
30
|
+
[K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
|
|
31
|
+
} & {
|
|
32
|
+
$case: T["$case"];
|
|
33
|
+
} : T extends {} ? {
|
|
34
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
35
|
+
} : Partial<T>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IsStreamEmptyResponse = exports.IsStreamEmptyRequest = exports.protobufPackage = void 0;
|
|
7
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
8
|
+
exports.protobufPackage = "freym.streams.clientchannel";
|
|
9
|
+
function createBaseIsStreamEmptyRequest() {
|
|
10
|
+
return { tenantId: "", stream: "" };
|
|
11
|
+
}
|
|
12
|
+
exports.IsStreamEmptyRequest = {
|
|
13
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
14
|
+
if (message.tenantId !== "") {
|
|
15
|
+
writer.uint32(10).string(message.tenantId);
|
|
16
|
+
}
|
|
17
|
+
if (message.stream !== "") {
|
|
18
|
+
writer.uint32(18).string(message.stream);
|
|
19
|
+
}
|
|
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 = createBaseIsStreamEmptyRequest();
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
const tag = reader.uint32();
|
|
28
|
+
switch (tag >>> 3) {
|
|
29
|
+
case 1:
|
|
30
|
+
if (tag !== 10) {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
message.tenantId = reader.string();
|
|
34
|
+
continue;
|
|
35
|
+
case 2:
|
|
36
|
+
if (tag !== 18) {
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
message.stream = reader.string();
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
reader.skipType(tag & 7);
|
|
46
|
+
}
|
|
47
|
+
return message;
|
|
48
|
+
},
|
|
49
|
+
fromJSON(object) {
|
|
50
|
+
return {
|
|
51
|
+
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
52
|
+
stream: isSet(object.stream) ? globalThis.String(object.stream) : "",
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
toJSON(message) {
|
|
56
|
+
const obj = {};
|
|
57
|
+
if (message.tenantId !== "") {
|
|
58
|
+
obj.tenantId = message.tenantId;
|
|
59
|
+
}
|
|
60
|
+
if (message.stream !== "") {
|
|
61
|
+
obj.stream = message.stream;
|
|
62
|
+
}
|
|
63
|
+
return obj;
|
|
64
|
+
},
|
|
65
|
+
create(base) {
|
|
66
|
+
return exports.IsStreamEmptyRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
67
|
+
},
|
|
68
|
+
fromPartial(object) {
|
|
69
|
+
var _a, _b;
|
|
70
|
+
const message = createBaseIsStreamEmptyRequest();
|
|
71
|
+
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
72
|
+
message.stream = (_b = object.stream) !== null && _b !== void 0 ? _b : "";
|
|
73
|
+
return message;
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
function createBaseIsStreamEmptyResponse() {
|
|
77
|
+
return { isEmpty: false };
|
|
78
|
+
}
|
|
79
|
+
exports.IsStreamEmptyResponse = {
|
|
80
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
81
|
+
if (message.isEmpty === true) {
|
|
82
|
+
writer.uint32(8).bool(message.isEmpty);
|
|
83
|
+
}
|
|
84
|
+
return writer;
|
|
85
|
+
},
|
|
86
|
+
decode(input, length) {
|
|
87
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
88
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
89
|
+
const message = createBaseIsStreamEmptyResponse();
|
|
90
|
+
while (reader.pos < end) {
|
|
91
|
+
const tag = reader.uint32();
|
|
92
|
+
switch (tag >>> 3) {
|
|
93
|
+
case 1:
|
|
94
|
+
if (tag !== 8) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
message.isEmpty = reader.bool();
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
reader.skipType(tag & 7);
|
|
104
|
+
}
|
|
105
|
+
return message;
|
|
106
|
+
},
|
|
107
|
+
fromJSON(object) {
|
|
108
|
+
return { isEmpty: isSet(object.isEmpty) ? globalThis.Boolean(object.isEmpty) : false };
|
|
109
|
+
},
|
|
110
|
+
toJSON(message) {
|
|
111
|
+
const obj = {};
|
|
112
|
+
if (message.isEmpty === true) {
|
|
113
|
+
obj.isEmpty = message.isEmpty;
|
|
114
|
+
}
|
|
115
|
+
return obj;
|
|
116
|
+
},
|
|
117
|
+
create(base) {
|
|
118
|
+
return exports.IsStreamEmptyResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
119
|
+
},
|
|
120
|
+
fromPartial(object) {
|
|
121
|
+
var _a;
|
|
122
|
+
const message = createBaseIsStreamEmptyResponse();
|
|
123
|
+
message.isEmpty = (_a = object.isEmpty) !== null && _a !== void 0 ? _a : false;
|
|
124
|
+
return message;
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
function isSet(value) {
|
|
128
|
+
return value !== null && value !== undefined;
|
|
129
|
+
}
|
|
@@ -6,6 +6,7 @@ import { GetEventRequest } from "./get_event";
|
|
|
6
6
|
import { IntroduceGdprOnEventFieldRequest, IntroduceGdprOnEventFieldResponse } from "./introduce_gdpr_on_event_field";
|
|
7
7
|
import { IntroduceGdprOnFieldRequest, IntroduceGdprOnFieldResponse } from "./introduce_gdpr_on_field";
|
|
8
8
|
import { InvalidateGdprRequest, InvalidateGdprResponse } from "./invalidate_gdpr";
|
|
9
|
+
import { IsStreamEmptyRequest, IsStreamEmptyResponse } from "./is_stream_empty";
|
|
9
10
|
import { PaginateEventsRequest, PaginateEventsResponse } from "./paginate_events";
|
|
10
11
|
import { PaginateStreamRequest, PaginateStreamResponse } from "./paginate_stream";
|
|
11
12
|
import { PublishRequest, PublishResponse } from "./publish";
|
|
@@ -41,6 +42,15 @@ export declare const ServiceService: {
|
|
|
41
42
|
readonly responseSerialize: (value: PaginateStreamResponse) => Buffer;
|
|
42
43
|
readonly responseDeserialize: (value: Buffer) => PaginateStreamResponse;
|
|
43
44
|
};
|
|
45
|
+
readonly isStreamEmpty: {
|
|
46
|
+
readonly path: "/freym.streams.clientchannel.Service/IsStreamEmpty";
|
|
47
|
+
readonly requestStream: false;
|
|
48
|
+
readonly responseStream: false;
|
|
49
|
+
readonly requestSerialize: (value: IsStreamEmptyRequest) => Buffer;
|
|
50
|
+
readonly requestDeserialize: (value: Buffer) => IsStreamEmptyRequest;
|
|
51
|
+
readonly responseSerialize: (value: IsStreamEmptyResponse) => Buffer;
|
|
52
|
+
readonly responseDeserialize: (value: Buffer) => IsStreamEmptyResponse;
|
|
53
|
+
};
|
|
44
54
|
readonly getEvent: {
|
|
45
55
|
readonly path: "/freym.streams.clientchannel.Service/GetEvent";
|
|
46
56
|
readonly requestStream: false;
|
|
@@ -100,6 +110,7 @@ export interface ServiceServer extends UntypedServiceImplementation {
|
|
|
100
110
|
subscribe: handleBidiStreamingCall<SubscribeRequest, SubscribeResponse>;
|
|
101
111
|
publish: handleUnaryCall<PublishRequest, PublishResponse>;
|
|
102
112
|
paginateStream: handleUnaryCall<PaginateStreamRequest, PaginateStreamResponse>;
|
|
113
|
+
isStreamEmpty: handleUnaryCall<IsStreamEmptyRequest, IsStreamEmptyResponse>;
|
|
103
114
|
getEvent: handleUnaryCall<GetEventRequest, PublishEventEnvelope>;
|
|
104
115
|
paginateEvents: handleUnaryCall<PaginateEventsRequest, PaginateEventsResponse>;
|
|
105
116
|
introduceGdprOnField: handleUnaryCall<IntroduceGdprOnFieldRequest, IntroduceGdprOnFieldResponse>;
|
|
@@ -117,6 +128,9 @@ export interface ServiceClient extends Client {
|
|
|
117
128
|
paginateStream(request: PaginateStreamRequest, callback: (error: ServiceError | null, response: PaginateStreamResponse) => void): ClientUnaryCall;
|
|
118
129
|
paginateStream(request: PaginateStreamRequest, metadata: Metadata, callback: (error: ServiceError | null, response: PaginateStreamResponse) => void): ClientUnaryCall;
|
|
119
130
|
paginateStream(request: PaginateStreamRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: PaginateStreamResponse) => void): ClientUnaryCall;
|
|
131
|
+
isStreamEmpty(request: IsStreamEmptyRequest, callback: (error: ServiceError | null, response: IsStreamEmptyResponse) => void): ClientUnaryCall;
|
|
132
|
+
isStreamEmpty(request: IsStreamEmptyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: IsStreamEmptyResponse) => void): ClientUnaryCall;
|
|
133
|
+
isStreamEmpty(request: IsStreamEmptyRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: IsStreamEmptyResponse) => void): ClientUnaryCall;
|
|
120
134
|
getEvent(request: GetEventRequest, callback: (error: ServiceError | null, response: PublishEventEnvelope) => void): ClientUnaryCall;
|
|
121
135
|
getEvent(request: GetEventRequest, metadata: Metadata, callback: (error: ServiceError | null, response: PublishEventEnvelope) => void): ClientUnaryCall;
|
|
122
136
|
getEvent(request: GetEventRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: PublishEventEnvelope) => void): ClientUnaryCall;
|
|
@@ -7,6 +7,7 @@ const get_event_1 = require("./get_event");
|
|
|
7
7
|
const introduce_gdpr_on_event_field_1 = require("./introduce_gdpr_on_event_field");
|
|
8
8
|
const introduce_gdpr_on_field_1 = require("./introduce_gdpr_on_field");
|
|
9
9
|
const invalidate_gdpr_1 = require("./invalidate_gdpr");
|
|
10
|
+
const is_stream_empty_1 = require("./is_stream_empty");
|
|
10
11
|
const paginate_events_1 = require("./paginate_events");
|
|
11
12
|
const paginate_stream_1 = require("./paginate_stream");
|
|
12
13
|
const publish_1 = require("./publish");
|
|
@@ -41,6 +42,15 @@ exports.ServiceService = {
|
|
|
41
42
|
responseSerialize: (value) => Buffer.from(paginate_stream_1.PaginateStreamResponse.encode(value).finish()),
|
|
42
43
|
responseDeserialize: (value) => paginate_stream_1.PaginateStreamResponse.decode(value),
|
|
43
44
|
},
|
|
45
|
+
isStreamEmpty: {
|
|
46
|
+
path: "/freym.streams.clientchannel.Service/IsStreamEmpty",
|
|
47
|
+
requestStream: false,
|
|
48
|
+
responseStream: false,
|
|
49
|
+
requestSerialize: (value) => Buffer.from(is_stream_empty_1.IsStreamEmptyRequest.encode(value).finish()),
|
|
50
|
+
requestDeserialize: (value) => is_stream_empty_1.IsStreamEmptyRequest.decode(value),
|
|
51
|
+
responseSerialize: (value) => Buffer.from(is_stream_empty_1.IsStreamEmptyResponse.encode(value).finish()),
|
|
52
|
+
responseDeserialize: (value) => is_stream_empty_1.IsStreamEmptyResponse.decode(value),
|
|
53
|
+
},
|
|
44
54
|
getEvent: {
|
|
45
55
|
path: "/freym.streams.clientchannel.Service/GetEvent",
|
|
46
56
|
requestStream: false,
|
|
@@ -3,6 +3,7 @@ export { Data, Data_GdprMetadata, Event, EventEnvelope, Event_PayloadEntry, Publ
|
|
|
3
3
|
export { GetEventRequest } from "./clientchannel/get_event";
|
|
4
4
|
export { PaginateEventsRequest, PaginateEventsResponse } from "./clientchannel/paginate_events";
|
|
5
5
|
export { PaginateStreamRequest, PaginateStreamResponse } from "./clientchannel/paginate_stream";
|
|
6
|
+
export { IsStreamEmptyRequest, IsStreamEmptyResponse } from "./clientchannel/is_stream_empty";
|
|
6
7
|
export { IntroduceGdprOnEventFieldRequest, IntroduceGdprOnEventFieldResponse, } from "./clientchannel/introduce_gdpr_on_event_field";
|
|
7
8
|
export { IntroduceGdprOnFieldRequest, IntroduceGdprOnFieldResponse, } from "./clientchannel/introduce_gdpr_on_field";
|
|
8
9
|
export { InvalidateGdprRequest, InvalidateGdprResponse } from "./clientchannel/invalidate_gdpr";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscribeResponse_SubscribeNotAck = exports.SubscribeResponse_SubscribeAck = exports.SubscribeResponse_InitNotAck = exports.SubscribeResponse_InitAck = exports.SubscribeResponse = exports.SubscribeRequest_SubscribeAction = exports.SubscribeRequest_InitAction = exports.SubscribeRequest_EventReceived = exports.SubscribeRequest_EventNotReceived = exports.SubscribeRequest_EventNotHandled = exports.SubscribeRequest_EventHandled = exports.SubscribeRequest = exports.SnapshotResponse = exports.SnapshotRequest = exports.PublishResponse = exports.PublishRequest = exports.InvalidateGdprResponse = exports.InvalidateGdprRequest = exports.IntroduceGdprOnFieldResponse = exports.IntroduceGdprOnFieldRequest = exports.IntroduceGdprOnEventFieldResponse = exports.IntroduceGdprOnEventFieldRequest = exports.PaginateStreamResponse = exports.PaginateStreamRequest = exports.PaginateEventsResponse = exports.PaginateEventsRequest = exports.GetEventRequest = exports.PublishEventEnvelope = exports.Event_PayloadEntry = exports.EventEnvelope = exports.Event = exports.Data_GdprMetadata = exports.Data = exports.ServiceService = exports.ServiceClient = void 0;
|
|
3
|
+
exports.SubscribeResponse_SubscribeNotAck = exports.SubscribeResponse_SubscribeAck = exports.SubscribeResponse_InitNotAck = exports.SubscribeResponse_InitAck = exports.SubscribeResponse = exports.SubscribeRequest_SubscribeAction = exports.SubscribeRequest_InitAction = exports.SubscribeRequest_EventReceived = exports.SubscribeRequest_EventNotReceived = exports.SubscribeRequest_EventNotHandled = exports.SubscribeRequest_EventHandled = exports.SubscribeRequest = exports.SnapshotResponse = exports.SnapshotRequest = exports.PublishResponse = exports.PublishRequest = exports.InvalidateGdprResponse = exports.InvalidateGdprRequest = exports.IntroduceGdprOnFieldResponse = exports.IntroduceGdprOnFieldRequest = exports.IntroduceGdprOnEventFieldResponse = exports.IntroduceGdprOnEventFieldRequest = exports.IsStreamEmptyResponse = exports.IsStreamEmptyRequest = exports.PaginateStreamResponse = exports.PaginateStreamRequest = exports.PaginateEventsResponse = exports.PaginateEventsRequest = exports.GetEventRequest = exports.PublishEventEnvelope = exports.Event_PayloadEntry = exports.EventEnvelope = exports.Event = exports.Data_GdprMetadata = exports.Data = exports.ServiceService = exports.ServiceClient = void 0;
|
|
4
4
|
var service_1 = require("./clientchannel/service");
|
|
5
5
|
Object.defineProperty(exports, "ServiceClient", { enumerable: true, get: function () { return service_1.ServiceClient; } });
|
|
6
6
|
Object.defineProperty(exports, "ServiceService", { enumerable: true, get: function () { return service_1.ServiceService; } });
|
|
@@ -19,6 +19,9 @@ Object.defineProperty(exports, "PaginateEventsResponse", { enumerable: true, get
|
|
|
19
19
|
var paginate_stream_1 = require("./clientchannel/paginate_stream");
|
|
20
20
|
Object.defineProperty(exports, "PaginateStreamRequest", { enumerable: true, get: function () { return paginate_stream_1.PaginateStreamRequest; } });
|
|
21
21
|
Object.defineProperty(exports, "PaginateStreamResponse", { enumerable: true, get: function () { return paginate_stream_1.PaginateStreamResponse; } });
|
|
22
|
+
var is_stream_empty_1 = require("./clientchannel/is_stream_empty");
|
|
23
|
+
Object.defineProperty(exports, "IsStreamEmptyRequest", { enumerable: true, get: function () { return is_stream_empty_1.IsStreamEmptyRequest; } });
|
|
24
|
+
Object.defineProperty(exports, "IsStreamEmptyResponse", { enumerable: true, get: function () { return is_stream_empty_1.IsStreamEmptyResponse; } });
|
|
22
25
|
var introduce_gdpr_on_event_field_1 = require("./clientchannel/introduce_gdpr_on_event_field");
|
|
23
26
|
Object.defineProperty(exports, "IntroduceGdprOnEventFieldRequest", { enumerable: true, get: function () { return introduce_gdpr_on_event_field_1.IntroduceGdprOnEventFieldRequest; } });
|
|
24
27
|
Object.defineProperty(exports, "IntroduceGdprOnEventFieldResponse", { enumerable: true, get: function () { return introduce_gdpr_on_event_field_1.IntroduceGdprOnEventFieldResponse; } });
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "freym.sync.management";
|
|
3
|
+
export interface LockingRequest {
|
|
4
|
+
payload?: {
|
|
5
|
+
$case: "init";
|
|
6
|
+
init: LockingRequest_Init;
|
|
7
|
+
} | {
|
|
8
|
+
$case: "lockGlobal";
|
|
9
|
+
lockGlobal: LockingRequest_LockGlobal;
|
|
10
|
+
} | {
|
|
11
|
+
$case: "lockLocal";
|
|
12
|
+
lockLocal: LockingRequest_LockLocal;
|
|
13
|
+
} | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface LockingRequest_Init {
|
|
16
|
+
ip: string;
|
|
17
|
+
app: string;
|
|
18
|
+
}
|
|
19
|
+
export interface LockingRequest_LockGlobal {
|
|
20
|
+
lockId: string;
|
|
21
|
+
tenantId: string;
|
|
22
|
+
globalConcern: string;
|
|
23
|
+
}
|
|
24
|
+
export interface LockingRequest_LockLocal {
|
|
25
|
+
lockId: string;
|
|
26
|
+
tenantId: string;
|
|
27
|
+
globalConcern: string;
|
|
28
|
+
localConcern: string;
|
|
29
|
+
}
|
|
30
|
+
export interface LockingRequest_UnlockGlobal {
|
|
31
|
+
tenantId: string;
|
|
32
|
+
globalConcern: string;
|
|
33
|
+
}
|
|
34
|
+
export interface LockingRequest_UnlockLocal {
|
|
35
|
+
tenantId: string;
|
|
36
|
+
globalConcern: string;
|
|
37
|
+
localConcern: string;
|
|
38
|
+
}
|
|
39
|
+
export interface LockingResponse {
|
|
40
|
+
data?: {
|
|
41
|
+
$case: "initAck";
|
|
42
|
+
initAck: LockingResponse_InitAck;
|
|
43
|
+
} | {
|
|
44
|
+
$case: "lockGlobalAck";
|
|
45
|
+
lockGlobalAck: LockingResponse_LockGlobalAck;
|
|
46
|
+
} | {
|
|
47
|
+
$case: "lockLocalAck";
|
|
48
|
+
lockLocalAck: LockingResponse_LockLocalAck;
|
|
49
|
+
} | undefined;
|
|
50
|
+
}
|
|
51
|
+
export interface LockingResponse_InitAck {
|
|
52
|
+
error: string;
|
|
53
|
+
}
|
|
54
|
+
export interface LockingResponse_LockGlobalAck {
|
|
55
|
+
error: string;
|
|
56
|
+
}
|
|
57
|
+
export interface LockingResponse_LockLocalAck {
|
|
58
|
+
error: string;
|
|
59
|
+
}
|
|
60
|
+
export declare const LockingRequest: {
|
|
61
|
+
encode(message: LockingRequest, writer?: _m0.Writer): _m0.Writer;
|
|
62
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LockingRequest;
|
|
63
|
+
fromJSON(object: any): LockingRequest;
|
|
64
|
+
toJSON(message: LockingRequest): unknown;
|
|
65
|
+
create(base?: DeepPartial<LockingRequest>): LockingRequest;
|
|
66
|
+
fromPartial(object: DeepPartial<LockingRequest>): LockingRequest;
|
|
67
|
+
};
|
|
68
|
+
export declare const LockingRequest_Init: {
|
|
69
|
+
encode(message: LockingRequest_Init, writer?: _m0.Writer): _m0.Writer;
|
|
70
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LockingRequest_Init;
|
|
71
|
+
fromJSON(object: any): LockingRequest_Init;
|
|
72
|
+
toJSON(message: LockingRequest_Init): unknown;
|
|
73
|
+
create(base?: DeepPartial<LockingRequest_Init>): LockingRequest_Init;
|
|
74
|
+
fromPartial(object: DeepPartial<LockingRequest_Init>): LockingRequest_Init;
|
|
75
|
+
};
|
|
76
|
+
export declare const LockingRequest_LockGlobal: {
|
|
77
|
+
encode(message: LockingRequest_LockGlobal, writer?: _m0.Writer): _m0.Writer;
|
|
78
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LockingRequest_LockGlobal;
|
|
79
|
+
fromJSON(object: any): LockingRequest_LockGlobal;
|
|
80
|
+
toJSON(message: LockingRequest_LockGlobal): unknown;
|
|
81
|
+
create(base?: DeepPartial<LockingRequest_LockGlobal>): LockingRequest_LockGlobal;
|
|
82
|
+
fromPartial(object: DeepPartial<LockingRequest_LockGlobal>): LockingRequest_LockGlobal;
|
|
83
|
+
};
|
|
84
|
+
export declare const LockingRequest_LockLocal: {
|
|
85
|
+
encode(message: LockingRequest_LockLocal, writer?: _m0.Writer): _m0.Writer;
|
|
86
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LockingRequest_LockLocal;
|
|
87
|
+
fromJSON(object: any): LockingRequest_LockLocal;
|
|
88
|
+
toJSON(message: LockingRequest_LockLocal): unknown;
|
|
89
|
+
create(base?: DeepPartial<LockingRequest_LockLocal>): LockingRequest_LockLocal;
|
|
90
|
+
fromPartial(object: DeepPartial<LockingRequest_LockLocal>): LockingRequest_LockLocal;
|
|
91
|
+
};
|
|
92
|
+
export declare const LockingRequest_UnlockGlobal: {
|
|
93
|
+
encode(message: LockingRequest_UnlockGlobal, writer?: _m0.Writer): _m0.Writer;
|
|
94
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LockingRequest_UnlockGlobal;
|
|
95
|
+
fromJSON(object: any): LockingRequest_UnlockGlobal;
|
|
96
|
+
toJSON(message: LockingRequest_UnlockGlobal): unknown;
|
|
97
|
+
create(base?: DeepPartial<LockingRequest_UnlockGlobal>): LockingRequest_UnlockGlobal;
|
|
98
|
+
fromPartial(object: DeepPartial<LockingRequest_UnlockGlobal>): LockingRequest_UnlockGlobal;
|
|
99
|
+
};
|
|
100
|
+
export declare const LockingRequest_UnlockLocal: {
|
|
101
|
+
encode(message: LockingRequest_UnlockLocal, writer?: _m0.Writer): _m0.Writer;
|
|
102
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LockingRequest_UnlockLocal;
|
|
103
|
+
fromJSON(object: any): LockingRequest_UnlockLocal;
|
|
104
|
+
toJSON(message: LockingRequest_UnlockLocal): unknown;
|
|
105
|
+
create(base?: DeepPartial<LockingRequest_UnlockLocal>): LockingRequest_UnlockLocal;
|
|
106
|
+
fromPartial(object: DeepPartial<LockingRequest_UnlockLocal>): LockingRequest_UnlockLocal;
|
|
107
|
+
};
|
|
108
|
+
export declare const LockingResponse: {
|
|
109
|
+
encode(message: LockingResponse, writer?: _m0.Writer): _m0.Writer;
|
|
110
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LockingResponse;
|
|
111
|
+
fromJSON(object: any): LockingResponse;
|
|
112
|
+
toJSON(message: LockingResponse): unknown;
|
|
113
|
+
create(base?: DeepPartial<LockingResponse>): LockingResponse;
|
|
114
|
+
fromPartial(object: DeepPartial<LockingResponse>): LockingResponse;
|
|
115
|
+
};
|
|
116
|
+
export declare const LockingResponse_InitAck: {
|
|
117
|
+
encode(message: LockingResponse_InitAck, writer?: _m0.Writer): _m0.Writer;
|
|
118
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LockingResponse_InitAck;
|
|
119
|
+
fromJSON(object: any): LockingResponse_InitAck;
|
|
120
|
+
toJSON(message: LockingResponse_InitAck): unknown;
|
|
121
|
+
create(base?: DeepPartial<LockingResponse_InitAck>): LockingResponse_InitAck;
|
|
122
|
+
fromPartial(object: DeepPartial<LockingResponse_InitAck>): LockingResponse_InitAck;
|
|
123
|
+
};
|
|
124
|
+
export declare const LockingResponse_LockGlobalAck: {
|
|
125
|
+
encode(message: LockingResponse_LockGlobalAck, writer?: _m0.Writer): _m0.Writer;
|
|
126
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LockingResponse_LockGlobalAck;
|
|
127
|
+
fromJSON(object: any): LockingResponse_LockGlobalAck;
|
|
128
|
+
toJSON(message: LockingResponse_LockGlobalAck): unknown;
|
|
129
|
+
create(base?: DeepPartial<LockingResponse_LockGlobalAck>): LockingResponse_LockGlobalAck;
|
|
130
|
+
fromPartial(object: DeepPartial<LockingResponse_LockGlobalAck>): LockingResponse_LockGlobalAck;
|
|
131
|
+
};
|
|
132
|
+
export declare const LockingResponse_LockLocalAck: {
|
|
133
|
+
encode(message: LockingResponse_LockLocalAck, writer?: _m0.Writer): _m0.Writer;
|
|
134
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LockingResponse_LockLocalAck;
|
|
135
|
+
fromJSON(object: any): LockingResponse_LockLocalAck;
|
|
136
|
+
toJSON(message: LockingResponse_LockLocalAck): unknown;
|
|
137
|
+
create(base?: DeepPartial<LockingResponse_LockLocalAck>): LockingResponse_LockLocalAck;
|
|
138
|
+
fromPartial(object: DeepPartial<LockingResponse_LockLocalAck>): LockingResponse_LockLocalAck;
|
|
139
|
+
};
|
|
140
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
141
|
+
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 {
|
|
142
|
+
$case: string;
|
|
143
|
+
} ? {
|
|
144
|
+
[K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
|
|
145
|
+
} & {
|
|
146
|
+
$case: T["$case"];
|
|
147
|
+
} : T extends {} ? {
|
|
148
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
149
|
+
} : Partial<T>;
|
|
150
|
+
export {};
|
|
@@ -0,0 +1,774 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LockingResponse_LockLocalAck = exports.LockingResponse_LockGlobalAck = exports.LockingResponse_InitAck = exports.LockingResponse = exports.LockingRequest_UnlockLocal = exports.LockingRequest_UnlockGlobal = exports.LockingRequest_LockLocal = exports.LockingRequest_LockGlobal = exports.LockingRequest_Init = exports.LockingRequest = exports.protobufPackage = void 0;
|
|
7
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
8
|
+
exports.protobufPackage = "freym.sync.management";
|
|
9
|
+
function createBaseLockingRequest() {
|
|
10
|
+
return { payload: undefined };
|
|
11
|
+
}
|
|
12
|
+
exports.LockingRequest = {
|
|
13
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
14
|
+
var _a;
|
|
15
|
+
switch ((_a = message.payload) === null || _a === void 0 ? void 0 : _a.$case) {
|
|
16
|
+
case "init":
|
|
17
|
+
exports.LockingRequest_Init.encode(message.payload.init, writer.uint32(10).fork()).ldelim();
|
|
18
|
+
break;
|
|
19
|
+
case "lockGlobal":
|
|
20
|
+
exports.LockingRequest_LockGlobal.encode(message.payload.lockGlobal, writer.uint32(18).fork()).ldelim();
|
|
21
|
+
break;
|
|
22
|
+
case "lockLocal":
|
|
23
|
+
exports.LockingRequest_LockLocal.encode(message.payload.lockLocal, writer.uint32(26).fork()).ldelim();
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
return writer;
|
|
27
|
+
},
|
|
28
|
+
decode(input, length) {
|
|
29
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
30
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
31
|
+
const message = createBaseLockingRequest();
|
|
32
|
+
while (reader.pos < end) {
|
|
33
|
+
const tag = reader.uint32();
|
|
34
|
+
switch (tag >>> 3) {
|
|
35
|
+
case 1:
|
|
36
|
+
if (tag !== 10) {
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
message.payload = { $case: "init", init: exports.LockingRequest_Init.decode(reader, reader.uint32()) };
|
|
40
|
+
continue;
|
|
41
|
+
case 2:
|
|
42
|
+
if (tag !== 18) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
message.payload = {
|
|
46
|
+
$case: "lockGlobal",
|
|
47
|
+
lockGlobal: exports.LockingRequest_LockGlobal.decode(reader, reader.uint32()),
|
|
48
|
+
};
|
|
49
|
+
continue;
|
|
50
|
+
case 3:
|
|
51
|
+
if (tag !== 26) {
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
message.payload = { $case: "lockLocal", lockLocal: exports.LockingRequest_LockLocal.decode(reader, reader.uint32()) };
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
reader.skipType(tag & 7);
|
|
61
|
+
}
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
fromJSON(object) {
|
|
65
|
+
return {
|
|
66
|
+
payload: isSet(object.init)
|
|
67
|
+
? { $case: "init", init: exports.LockingRequest_Init.fromJSON(object.init) }
|
|
68
|
+
: isSet(object.lockGlobal)
|
|
69
|
+
? { $case: "lockGlobal", lockGlobal: exports.LockingRequest_LockGlobal.fromJSON(object.lockGlobal) }
|
|
70
|
+
: isSet(object.lockLocal)
|
|
71
|
+
? { $case: "lockLocal", lockLocal: exports.LockingRequest_LockLocal.fromJSON(object.lockLocal) }
|
|
72
|
+
: undefined,
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
toJSON(message) {
|
|
76
|
+
var _a, _b, _c;
|
|
77
|
+
const obj = {};
|
|
78
|
+
if (((_a = message.payload) === null || _a === void 0 ? void 0 : _a.$case) === "init") {
|
|
79
|
+
obj.init = exports.LockingRequest_Init.toJSON(message.payload.init);
|
|
80
|
+
}
|
|
81
|
+
if (((_b = message.payload) === null || _b === void 0 ? void 0 : _b.$case) === "lockGlobal") {
|
|
82
|
+
obj.lockGlobal = exports.LockingRequest_LockGlobal.toJSON(message.payload.lockGlobal);
|
|
83
|
+
}
|
|
84
|
+
if (((_c = message.payload) === null || _c === void 0 ? void 0 : _c.$case) === "lockLocal") {
|
|
85
|
+
obj.lockLocal = exports.LockingRequest_LockLocal.toJSON(message.payload.lockLocal);
|
|
86
|
+
}
|
|
87
|
+
return obj;
|
|
88
|
+
},
|
|
89
|
+
create(base) {
|
|
90
|
+
return exports.LockingRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
91
|
+
},
|
|
92
|
+
fromPartial(object) {
|
|
93
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
94
|
+
const message = createBaseLockingRequest();
|
|
95
|
+
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
|
+
message.payload = { $case: "init", init: exports.LockingRequest_Init.fromPartial(object.payload.init) };
|
|
97
|
+
}
|
|
98
|
+
if (((_d = object.payload) === null || _d === void 0 ? void 0 : _d.$case) === "lockGlobal" &&
|
|
99
|
+
((_e = object.payload) === null || _e === void 0 ? void 0 : _e.lockGlobal) !== undefined &&
|
|
100
|
+
((_f = object.payload) === null || _f === void 0 ? void 0 : _f.lockGlobal) !== null) {
|
|
101
|
+
message.payload = {
|
|
102
|
+
$case: "lockGlobal",
|
|
103
|
+
lockGlobal: exports.LockingRequest_LockGlobal.fromPartial(object.payload.lockGlobal),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (((_g = object.payload) === null || _g === void 0 ? void 0 : _g.$case) === "lockLocal" &&
|
|
107
|
+
((_h = object.payload) === null || _h === void 0 ? void 0 : _h.lockLocal) !== undefined &&
|
|
108
|
+
((_j = object.payload) === null || _j === void 0 ? void 0 : _j.lockLocal) !== null) {
|
|
109
|
+
message.payload = {
|
|
110
|
+
$case: "lockLocal",
|
|
111
|
+
lockLocal: exports.LockingRequest_LockLocal.fromPartial(object.payload.lockLocal),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return message;
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
function createBaseLockingRequest_Init() {
|
|
118
|
+
return { ip: "", app: "" };
|
|
119
|
+
}
|
|
120
|
+
exports.LockingRequest_Init = {
|
|
121
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
122
|
+
if (message.ip !== "") {
|
|
123
|
+
writer.uint32(10).string(message.ip);
|
|
124
|
+
}
|
|
125
|
+
if (message.app !== "") {
|
|
126
|
+
writer.uint32(18).string(message.app);
|
|
127
|
+
}
|
|
128
|
+
return writer;
|
|
129
|
+
},
|
|
130
|
+
decode(input, length) {
|
|
131
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
132
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
133
|
+
const message = createBaseLockingRequest_Init();
|
|
134
|
+
while (reader.pos < end) {
|
|
135
|
+
const tag = reader.uint32();
|
|
136
|
+
switch (tag >>> 3) {
|
|
137
|
+
case 1:
|
|
138
|
+
if (tag !== 10) {
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
message.ip = reader.string();
|
|
142
|
+
continue;
|
|
143
|
+
case 2:
|
|
144
|
+
if (tag !== 18) {
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
message.app = reader.string();
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
reader.skipType(tag & 7);
|
|
154
|
+
}
|
|
155
|
+
return message;
|
|
156
|
+
},
|
|
157
|
+
fromJSON(object) {
|
|
158
|
+
return {
|
|
159
|
+
ip: isSet(object.ip) ? globalThis.String(object.ip) : "",
|
|
160
|
+
app: isSet(object.app) ? globalThis.String(object.app) : "",
|
|
161
|
+
};
|
|
162
|
+
},
|
|
163
|
+
toJSON(message) {
|
|
164
|
+
const obj = {};
|
|
165
|
+
if (message.ip !== "") {
|
|
166
|
+
obj.ip = message.ip;
|
|
167
|
+
}
|
|
168
|
+
if (message.app !== "") {
|
|
169
|
+
obj.app = message.app;
|
|
170
|
+
}
|
|
171
|
+
return obj;
|
|
172
|
+
},
|
|
173
|
+
create(base) {
|
|
174
|
+
return exports.LockingRequest_Init.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
175
|
+
},
|
|
176
|
+
fromPartial(object) {
|
|
177
|
+
var _a, _b;
|
|
178
|
+
const message = createBaseLockingRequest_Init();
|
|
179
|
+
message.ip = (_a = object.ip) !== null && _a !== void 0 ? _a : "";
|
|
180
|
+
message.app = (_b = object.app) !== null && _b !== void 0 ? _b : "";
|
|
181
|
+
return message;
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
function createBaseLockingRequest_LockGlobal() {
|
|
185
|
+
return { lockId: "", tenantId: "", globalConcern: "" };
|
|
186
|
+
}
|
|
187
|
+
exports.LockingRequest_LockGlobal = {
|
|
188
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
189
|
+
if (message.lockId !== "") {
|
|
190
|
+
writer.uint32(10).string(message.lockId);
|
|
191
|
+
}
|
|
192
|
+
if (message.tenantId !== "") {
|
|
193
|
+
writer.uint32(18).string(message.tenantId);
|
|
194
|
+
}
|
|
195
|
+
if (message.globalConcern !== "") {
|
|
196
|
+
writer.uint32(26).string(message.globalConcern);
|
|
197
|
+
}
|
|
198
|
+
return writer;
|
|
199
|
+
},
|
|
200
|
+
decode(input, length) {
|
|
201
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
202
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
203
|
+
const message = createBaseLockingRequest_LockGlobal();
|
|
204
|
+
while (reader.pos < end) {
|
|
205
|
+
const tag = reader.uint32();
|
|
206
|
+
switch (tag >>> 3) {
|
|
207
|
+
case 1:
|
|
208
|
+
if (tag !== 10) {
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
message.lockId = reader.string();
|
|
212
|
+
continue;
|
|
213
|
+
case 2:
|
|
214
|
+
if (tag !== 18) {
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
message.tenantId = reader.string();
|
|
218
|
+
continue;
|
|
219
|
+
case 3:
|
|
220
|
+
if (tag !== 26) {
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
message.globalConcern = reader.string();
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
reader.skipType(tag & 7);
|
|
230
|
+
}
|
|
231
|
+
return message;
|
|
232
|
+
},
|
|
233
|
+
fromJSON(object) {
|
|
234
|
+
return {
|
|
235
|
+
lockId: isSet(object.lockId) ? globalThis.String(object.lockId) : "",
|
|
236
|
+
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
237
|
+
globalConcern: isSet(object.globalConcern) ? globalThis.String(object.globalConcern) : "",
|
|
238
|
+
};
|
|
239
|
+
},
|
|
240
|
+
toJSON(message) {
|
|
241
|
+
const obj = {};
|
|
242
|
+
if (message.lockId !== "") {
|
|
243
|
+
obj.lockId = message.lockId;
|
|
244
|
+
}
|
|
245
|
+
if (message.tenantId !== "") {
|
|
246
|
+
obj.tenantId = message.tenantId;
|
|
247
|
+
}
|
|
248
|
+
if (message.globalConcern !== "") {
|
|
249
|
+
obj.globalConcern = message.globalConcern;
|
|
250
|
+
}
|
|
251
|
+
return obj;
|
|
252
|
+
},
|
|
253
|
+
create(base) {
|
|
254
|
+
return exports.LockingRequest_LockGlobal.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
255
|
+
},
|
|
256
|
+
fromPartial(object) {
|
|
257
|
+
var _a, _b, _c;
|
|
258
|
+
const message = createBaseLockingRequest_LockGlobal();
|
|
259
|
+
message.lockId = (_a = object.lockId) !== null && _a !== void 0 ? _a : "";
|
|
260
|
+
message.tenantId = (_b = object.tenantId) !== null && _b !== void 0 ? _b : "";
|
|
261
|
+
message.globalConcern = (_c = object.globalConcern) !== null && _c !== void 0 ? _c : "";
|
|
262
|
+
return message;
|
|
263
|
+
},
|
|
264
|
+
};
|
|
265
|
+
function createBaseLockingRequest_LockLocal() {
|
|
266
|
+
return { lockId: "", tenantId: "", globalConcern: "", localConcern: "" };
|
|
267
|
+
}
|
|
268
|
+
exports.LockingRequest_LockLocal = {
|
|
269
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
270
|
+
if (message.lockId !== "") {
|
|
271
|
+
writer.uint32(10).string(message.lockId);
|
|
272
|
+
}
|
|
273
|
+
if (message.tenantId !== "") {
|
|
274
|
+
writer.uint32(18).string(message.tenantId);
|
|
275
|
+
}
|
|
276
|
+
if (message.globalConcern !== "") {
|
|
277
|
+
writer.uint32(26).string(message.globalConcern);
|
|
278
|
+
}
|
|
279
|
+
if (message.localConcern !== "") {
|
|
280
|
+
writer.uint32(34).string(message.localConcern);
|
|
281
|
+
}
|
|
282
|
+
return writer;
|
|
283
|
+
},
|
|
284
|
+
decode(input, length) {
|
|
285
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
286
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
287
|
+
const message = createBaseLockingRequest_LockLocal();
|
|
288
|
+
while (reader.pos < end) {
|
|
289
|
+
const tag = reader.uint32();
|
|
290
|
+
switch (tag >>> 3) {
|
|
291
|
+
case 1:
|
|
292
|
+
if (tag !== 10) {
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
message.lockId = reader.string();
|
|
296
|
+
continue;
|
|
297
|
+
case 2:
|
|
298
|
+
if (tag !== 18) {
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
message.tenantId = reader.string();
|
|
302
|
+
continue;
|
|
303
|
+
case 3:
|
|
304
|
+
if (tag !== 26) {
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
message.globalConcern = reader.string();
|
|
308
|
+
continue;
|
|
309
|
+
case 4:
|
|
310
|
+
if (tag !== 34) {
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
message.localConcern = reader.string();
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
reader.skipType(tag & 7);
|
|
320
|
+
}
|
|
321
|
+
return message;
|
|
322
|
+
},
|
|
323
|
+
fromJSON(object) {
|
|
324
|
+
return {
|
|
325
|
+
lockId: isSet(object.lockId) ? globalThis.String(object.lockId) : "",
|
|
326
|
+
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
327
|
+
globalConcern: isSet(object.globalConcern) ? globalThis.String(object.globalConcern) : "",
|
|
328
|
+
localConcern: isSet(object.localConcern) ? globalThis.String(object.localConcern) : "",
|
|
329
|
+
};
|
|
330
|
+
},
|
|
331
|
+
toJSON(message) {
|
|
332
|
+
const obj = {};
|
|
333
|
+
if (message.lockId !== "") {
|
|
334
|
+
obj.lockId = message.lockId;
|
|
335
|
+
}
|
|
336
|
+
if (message.tenantId !== "") {
|
|
337
|
+
obj.tenantId = message.tenantId;
|
|
338
|
+
}
|
|
339
|
+
if (message.globalConcern !== "") {
|
|
340
|
+
obj.globalConcern = message.globalConcern;
|
|
341
|
+
}
|
|
342
|
+
if (message.localConcern !== "") {
|
|
343
|
+
obj.localConcern = message.localConcern;
|
|
344
|
+
}
|
|
345
|
+
return obj;
|
|
346
|
+
},
|
|
347
|
+
create(base) {
|
|
348
|
+
return exports.LockingRequest_LockLocal.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
349
|
+
},
|
|
350
|
+
fromPartial(object) {
|
|
351
|
+
var _a, _b, _c, _d;
|
|
352
|
+
const message = createBaseLockingRequest_LockLocal();
|
|
353
|
+
message.lockId = (_a = object.lockId) !== null && _a !== void 0 ? _a : "";
|
|
354
|
+
message.tenantId = (_b = object.tenantId) !== null && _b !== void 0 ? _b : "";
|
|
355
|
+
message.globalConcern = (_c = object.globalConcern) !== null && _c !== void 0 ? _c : "";
|
|
356
|
+
message.localConcern = (_d = object.localConcern) !== null && _d !== void 0 ? _d : "";
|
|
357
|
+
return message;
|
|
358
|
+
},
|
|
359
|
+
};
|
|
360
|
+
function createBaseLockingRequest_UnlockGlobal() {
|
|
361
|
+
return { tenantId: "", globalConcern: "" };
|
|
362
|
+
}
|
|
363
|
+
exports.LockingRequest_UnlockGlobal = {
|
|
364
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
365
|
+
if (message.tenantId !== "") {
|
|
366
|
+
writer.uint32(10).string(message.tenantId);
|
|
367
|
+
}
|
|
368
|
+
if (message.globalConcern !== "") {
|
|
369
|
+
writer.uint32(18).string(message.globalConcern);
|
|
370
|
+
}
|
|
371
|
+
return writer;
|
|
372
|
+
},
|
|
373
|
+
decode(input, length) {
|
|
374
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
375
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
376
|
+
const message = createBaseLockingRequest_UnlockGlobal();
|
|
377
|
+
while (reader.pos < end) {
|
|
378
|
+
const tag = reader.uint32();
|
|
379
|
+
switch (tag >>> 3) {
|
|
380
|
+
case 1:
|
|
381
|
+
if (tag !== 10) {
|
|
382
|
+
break;
|
|
383
|
+
}
|
|
384
|
+
message.tenantId = reader.string();
|
|
385
|
+
continue;
|
|
386
|
+
case 2:
|
|
387
|
+
if (tag !== 18) {
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
message.globalConcern = reader.string();
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
396
|
+
reader.skipType(tag & 7);
|
|
397
|
+
}
|
|
398
|
+
return message;
|
|
399
|
+
},
|
|
400
|
+
fromJSON(object) {
|
|
401
|
+
return {
|
|
402
|
+
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
403
|
+
globalConcern: isSet(object.globalConcern) ? globalThis.String(object.globalConcern) : "",
|
|
404
|
+
};
|
|
405
|
+
},
|
|
406
|
+
toJSON(message) {
|
|
407
|
+
const obj = {};
|
|
408
|
+
if (message.tenantId !== "") {
|
|
409
|
+
obj.tenantId = message.tenantId;
|
|
410
|
+
}
|
|
411
|
+
if (message.globalConcern !== "") {
|
|
412
|
+
obj.globalConcern = message.globalConcern;
|
|
413
|
+
}
|
|
414
|
+
return obj;
|
|
415
|
+
},
|
|
416
|
+
create(base) {
|
|
417
|
+
return exports.LockingRequest_UnlockGlobal.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
418
|
+
},
|
|
419
|
+
fromPartial(object) {
|
|
420
|
+
var _a, _b;
|
|
421
|
+
const message = createBaseLockingRequest_UnlockGlobal();
|
|
422
|
+
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
423
|
+
message.globalConcern = (_b = object.globalConcern) !== null && _b !== void 0 ? _b : "";
|
|
424
|
+
return message;
|
|
425
|
+
},
|
|
426
|
+
};
|
|
427
|
+
function createBaseLockingRequest_UnlockLocal() {
|
|
428
|
+
return { tenantId: "", globalConcern: "", localConcern: "" };
|
|
429
|
+
}
|
|
430
|
+
exports.LockingRequest_UnlockLocal = {
|
|
431
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
432
|
+
if (message.tenantId !== "") {
|
|
433
|
+
writer.uint32(10).string(message.tenantId);
|
|
434
|
+
}
|
|
435
|
+
if (message.globalConcern !== "") {
|
|
436
|
+
writer.uint32(18).string(message.globalConcern);
|
|
437
|
+
}
|
|
438
|
+
if (message.localConcern !== "") {
|
|
439
|
+
writer.uint32(26).string(message.localConcern);
|
|
440
|
+
}
|
|
441
|
+
return writer;
|
|
442
|
+
},
|
|
443
|
+
decode(input, length) {
|
|
444
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
445
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
446
|
+
const message = createBaseLockingRequest_UnlockLocal();
|
|
447
|
+
while (reader.pos < end) {
|
|
448
|
+
const tag = reader.uint32();
|
|
449
|
+
switch (tag >>> 3) {
|
|
450
|
+
case 1:
|
|
451
|
+
if (tag !== 10) {
|
|
452
|
+
break;
|
|
453
|
+
}
|
|
454
|
+
message.tenantId = reader.string();
|
|
455
|
+
continue;
|
|
456
|
+
case 2:
|
|
457
|
+
if (tag !== 18) {
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
message.globalConcern = reader.string();
|
|
461
|
+
continue;
|
|
462
|
+
case 3:
|
|
463
|
+
if (tag !== 26) {
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
message.localConcern = reader.string();
|
|
467
|
+
continue;
|
|
468
|
+
}
|
|
469
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
reader.skipType(tag & 7);
|
|
473
|
+
}
|
|
474
|
+
return message;
|
|
475
|
+
},
|
|
476
|
+
fromJSON(object) {
|
|
477
|
+
return {
|
|
478
|
+
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
479
|
+
globalConcern: isSet(object.globalConcern) ? globalThis.String(object.globalConcern) : "",
|
|
480
|
+
localConcern: isSet(object.localConcern) ? globalThis.String(object.localConcern) : "",
|
|
481
|
+
};
|
|
482
|
+
},
|
|
483
|
+
toJSON(message) {
|
|
484
|
+
const obj = {};
|
|
485
|
+
if (message.tenantId !== "") {
|
|
486
|
+
obj.tenantId = message.tenantId;
|
|
487
|
+
}
|
|
488
|
+
if (message.globalConcern !== "") {
|
|
489
|
+
obj.globalConcern = message.globalConcern;
|
|
490
|
+
}
|
|
491
|
+
if (message.localConcern !== "") {
|
|
492
|
+
obj.localConcern = message.localConcern;
|
|
493
|
+
}
|
|
494
|
+
return obj;
|
|
495
|
+
},
|
|
496
|
+
create(base) {
|
|
497
|
+
return exports.LockingRequest_UnlockLocal.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
498
|
+
},
|
|
499
|
+
fromPartial(object) {
|
|
500
|
+
var _a, _b, _c;
|
|
501
|
+
const message = createBaseLockingRequest_UnlockLocal();
|
|
502
|
+
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
503
|
+
message.globalConcern = (_b = object.globalConcern) !== null && _b !== void 0 ? _b : "";
|
|
504
|
+
message.localConcern = (_c = object.localConcern) !== null && _c !== void 0 ? _c : "";
|
|
505
|
+
return message;
|
|
506
|
+
},
|
|
507
|
+
};
|
|
508
|
+
function createBaseLockingResponse() {
|
|
509
|
+
return { data: undefined };
|
|
510
|
+
}
|
|
511
|
+
exports.LockingResponse = {
|
|
512
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
513
|
+
var _a;
|
|
514
|
+
switch ((_a = message.data) === null || _a === void 0 ? void 0 : _a.$case) {
|
|
515
|
+
case "initAck":
|
|
516
|
+
exports.LockingResponse_InitAck.encode(message.data.initAck, writer.uint32(10).fork()).ldelim();
|
|
517
|
+
break;
|
|
518
|
+
case "lockGlobalAck":
|
|
519
|
+
exports.LockingResponse_LockGlobalAck.encode(message.data.lockGlobalAck, writer.uint32(18).fork()).ldelim();
|
|
520
|
+
break;
|
|
521
|
+
case "lockLocalAck":
|
|
522
|
+
exports.LockingResponse_LockLocalAck.encode(message.data.lockLocalAck, writer.uint32(26).fork()).ldelim();
|
|
523
|
+
break;
|
|
524
|
+
}
|
|
525
|
+
return writer;
|
|
526
|
+
},
|
|
527
|
+
decode(input, length) {
|
|
528
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
529
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
530
|
+
const message = createBaseLockingResponse();
|
|
531
|
+
while (reader.pos < end) {
|
|
532
|
+
const tag = reader.uint32();
|
|
533
|
+
switch (tag >>> 3) {
|
|
534
|
+
case 1:
|
|
535
|
+
if (tag !== 10) {
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
message.data = { $case: "initAck", initAck: exports.LockingResponse_InitAck.decode(reader, reader.uint32()) };
|
|
539
|
+
continue;
|
|
540
|
+
case 2:
|
|
541
|
+
if (tag !== 18) {
|
|
542
|
+
break;
|
|
543
|
+
}
|
|
544
|
+
message.data = {
|
|
545
|
+
$case: "lockGlobalAck",
|
|
546
|
+
lockGlobalAck: exports.LockingResponse_LockGlobalAck.decode(reader, reader.uint32()),
|
|
547
|
+
};
|
|
548
|
+
continue;
|
|
549
|
+
case 3:
|
|
550
|
+
if (tag !== 26) {
|
|
551
|
+
break;
|
|
552
|
+
}
|
|
553
|
+
message.data = {
|
|
554
|
+
$case: "lockLocalAck",
|
|
555
|
+
lockLocalAck: exports.LockingResponse_LockLocalAck.decode(reader, reader.uint32()),
|
|
556
|
+
};
|
|
557
|
+
continue;
|
|
558
|
+
}
|
|
559
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
560
|
+
break;
|
|
561
|
+
}
|
|
562
|
+
reader.skipType(tag & 7);
|
|
563
|
+
}
|
|
564
|
+
return message;
|
|
565
|
+
},
|
|
566
|
+
fromJSON(object) {
|
|
567
|
+
return {
|
|
568
|
+
data: isSet(object.initAck)
|
|
569
|
+
? { $case: "initAck", initAck: exports.LockingResponse_InitAck.fromJSON(object.initAck) }
|
|
570
|
+
: isSet(object.lockGlobalAck)
|
|
571
|
+
? { $case: "lockGlobalAck", lockGlobalAck: exports.LockingResponse_LockGlobalAck.fromJSON(object.lockGlobalAck) }
|
|
572
|
+
: isSet(object.lockLocalAck)
|
|
573
|
+
? { $case: "lockLocalAck", lockLocalAck: exports.LockingResponse_LockLocalAck.fromJSON(object.lockLocalAck) }
|
|
574
|
+
: undefined,
|
|
575
|
+
};
|
|
576
|
+
},
|
|
577
|
+
toJSON(message) {
|
|
578
|
+
var _a, _b, _c;
|
|
579
|
+
const obj = {};
|
|
580
|
+
if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.$case) === "initAck") {
|
|
581
|
+
obj.initAck = exports.LockingResponse_InitAck.toJSON(message.data.initAck);
|
|
582
|
+
}
|
|
583
|
+
if (((_b = message.data) === null || _b === void 0 ? void 0 : _b.$case) === "lockGlobalAck") {
|
|
584
|
+
obj.lockGlobalAck = exports.LockingResponse_LockGlobalAck.toJSON(message.data.lockGlobalAck);
|
|
585
|
+
}
|
|
586
|
+
if (((_c = message.data) === null || _c === void 0 ? void 0 : _c.$case) === "lockLocalAck") {
|
|
587
|
+
obj.lockLocalAck = exports.LockingResponse_LockLocalAck.toJSON(message.data.lockLocalAck);
|
|
588
|
+
}
|
|
589
|
+
return obj;
|
|
590
|
+
},
|
|
591
|
+
create(base) {
|
|
592
|
+
return exports.LockingResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
593
|
+
},
|
|
594
|
+
fromPartial(object) {
|
|
595
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
596
|
+
const message = createBaseLockingResponse();
|
|
597
|
+
if (((_a = object.data) === null || _a === void 0 ? void 0 : _a.$case) === "initAck" && ((_b = object.data) === null || _b === void 0 ? void 0 : _b.initAck) !== undefined && ((_c = object.data) === null || _c === void 0 ? void 0 : _c.initAck) !== null) {
|
|
598
|
+
message.data = { $case: "initAck", initAck: exports.LockingResponse_InitAck.fromPartial(object.data.initAck) };
|
|
599
|
+
}
|
|
600
|
+
if (((_d = object.data) === null || _d === void 0 ? void 0 : _d.$case) === "lockGlobalAck" &&
|
|
601
|
+
((_e = object.data) === null || _e === void 0 ? void 0 : _e.lockGlobalAck) !== undefined &&
|
|
602
|
+
((_f = object.data) === null || _f === void 0 ? void 0 : _f.lockGlobalAck) !== null) {
|
|
603
|
+
message.data = {
|
|
604
|
+
$case: "lockGlobalAck",
|
|
605
|
+
lockGlobalAck: exports.LockingResponse_LockGlobalAck.fromPartial(object.data.lockGlobalAck),
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
if (((_g = object.data) === null || _g === void 0 ? void 0 : _g.$case) === "lockLocalAck" &&
|
|
609
|
+
((_h = object.data) === null || _h === void 0 ? void 0 : _h.lockLocalAck) !== undefined &&
|
|
610
|
+
((_j = object.data) === null || _j === void 0 ? void 0 : _j.lockLocalAck) !== null) {
|
|
611
|
+
message.data = {
|
|
612
|
+
$case: "lockLocalAck",
|
|
613
|
+
lockLocalAck: exports.LockingResponse_LockLocalAck.fromPartial(object.data.lockLocalAck),
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
return message;
|
|
617
|
+
},
|
|
618
|
+
};
|
|
619
|
+
function createBaseLockingResponse_InitAck() {
|
|
620
|
+
return { error: "" };
|
|
621
|
+
}
|
|
622
|
+
exports.LockingResponse_InitAck = {
|
|
623
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
624
|
+
if (message.error !== "") {
|
|
625
|
+
writer.uint32(10).string(message.error);
|
|
626
|
+
}
|
|
627
|
+
return writer;
|
|
628
|
+
},
|
|
629
|
+
decode(input, length) {
|
|
630
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
631
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
632
|
+
const message = createBaseLockingResponse_InitAck();
|
|
633
|
+
while (reader.pos < end) {
|
|
634
|
+
const tag = reader.uint32();
|
|
635
|
+
switch (tag >>> 3) {
|
|
636
|
+
case 1:
|
|
637
|
+
if (tag !== 10) {
|
|
638
|
+
break;
|
|
639
|
+
}
|
|
640
|
+
message.error = reader.string();
|
|
641
|
+
continue;
|
|
642
|
+
}
|
|
643
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
644
|
+
break;
|
|
645
|
+
}
|
|
646
|
+
reader.skipType(tag & 7);
|
|
647
|
+
}
|
|
648
|
+
return message;
|
|
649
|
+
},
|
|
650
|
+
fromJSON(object) {
|
|
651
|
+
return { error: isSet(object.error) ? globalThis.String(object.error) : "" };
|
|
652
|
+
},
|
|
653
|
+
toJSON(message) {
|
|
654
|
+
const obj = {};
|
|
655
|
+
if (message.error !== "") {
|
|
656
|
+
obj.error = message.error;
|
|
657
|
+
}
|
|
658
|
+
return obj;
|
|
659
|
+
},
|
|
660
|
+
create(base) {
|
|
661
|
+
return exports.LockingResponse_InitAck.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
662
|
+
},
|
|
663
|
+
fromPartial(object) {
|
|
664
|
+
var _a;
|
|
665
|
+
const message = createBaseLockingResponse_InitAck();
|
|
666
|
+
message.error = (_a = object.error) !== null && _a !== void 0 ? _a : "";
|
|
667
|
+
return message;
|
|
668
|
+
},
|
|
669
|
+
};
|
|
670
|
+
function createBaseLockingResponse_LockGlobalAck() {
|
|
671
|
+
return { error: "" };
|
|
672
|
+
}
|
|
673
|
+
exports.LockingResponse_LockGlobalAck = {
|
|
674
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
675
|
+
if (message.error !== "") {
|
|
676
|
+
writer.uint32(10).string(message.error);
|
|
677
|
+
}
|
|
678
|
+
return writer;
|
|
679
|
+
},
|
|
680
|
+
decode(input, length) {
|
|
681
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
682
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
683
|
+
const message = createBaseLockingResponse_LockGlobalAck();
|
|
684
|
+
while (reader.pos < end) {
|
|
685
|
+
const tag = reader.uint32();
|
|
686
|
+
switch (tag >>> 3) {
|
|
687
|
+
case 1:
|
|
688
|
+
if (tag !== 10) {
|
|
689
|
+
break;
|
|
690
|
+
}
|
|
691
|
+
message.error = reader.string();
|
|
692
|
+
continue;
|
|
693
|
+
}
|
|
694
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
695
|
+
break;
|
|
696
|
+
}
|
|
697
|
+
reader.skipType(tag & 7);
|
|
698
|
+
}
|
|
699
|
+
return message;
|
|
700
|
+
},
|
|
701
|
+
fromJSON(object) {
|
|
702
|
+
return { error: isSet(object.error) ? globalThis.String(object.error) : "" };
|
|
703
|
+
},
|
|
704
|
+
toJSON(message) {
|
|
705
|
+
const obj = {};
|
|
706
|
+
if (message.error !== "") {
|
|
707
|
+
obj.error = message.error;
|
|
708
|
+
}
|
|
709
|
+
return obj;
|
|
710
|
+
},
|
|
711
|
+
create(base) {
|
|
712
|
+
return exports.LockingResponse_LockGlobalAck.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
713
|
+
},
|
|
714
|
+
fromPartial(object) {
|
|
715
|
+
var _a;
|
|
716
|
+
const message = createBaseLockingResponse_LockGlobalAck();
|
|
717
|
+
message.error = (_a = object.error) !== null && _a !== void 0 ? _a : "";
|
|
718
|
+
return message;
|
|
719
|
+
},
|
|
720
|
+
};
|
|
721
|
+
function createBaseLockingResponse_LockLocalAck() {
|
|
722
|
+
return { error: "" };
|
|
723
|
+
}
|
|
724
|
+
exports.LockingResponse_LockLocalAck = {
|
|
725
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
726
|
+
if (message.error !== "") {
|
|
727
|
+
writer.uint32(10).string(message.error);
|
|
728
|
+
}
|
|
729
|
+
return writer;
|
|
730
|
+
},
|
|
731
|
+
decode(input, length) {
|
|
732
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
733
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
734
|
+
const message = createBaseLockingResponse_LockLocalAck();
|
|
735
|
+
while (reader.pos < end) {
|
|
736
|
+
const tag = reader.uint32();
|
|
737
|
+
switch (tag >>> 3) {
|
|
738
|
+
case 1:
|
|
739
|
+
if (tag !== 10) {
|
|
740
|
+
break;
|
|
741
|
+
}
|
|
742
|
+
message.error = reader.string();
|
|
743
|
+
continue;
|
|
744
|
+
}
|
|
745
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
746
|
+
break;
|
|
747
|
+
}
|
|
748
|
+
reader.skipType(tag & 7);
|
|
749
|
+
}
|
|
750
|
+
return message;
|
|
751
|
+
},
|
|
752
|
+
fromJSON(object) {
|
|
753
|
+
return { error: isSet(object.error) ? globalThis.String(object.error) : "" };
|
|
754
|
+
},
|
|
755
|
+
toJSON(message) {
|
|
756
|
+
const obj = {};
|
|
757
|
+
if (message.error !== "") {
|
|
758
|
+
obj.error = message.error;
|
|
759
|
+
}
|
|
760
|
+
return obj;
|
|
761
|
+
},
|
|
762
|
+
create(base) {
|
|
763
|
+
return exports.LockingResponse_LockLocalAck.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
764
|
+
},
|
|
765
|
+
fromPartial(object) {
|
|
766
|
+
var _a;
|
|
767
|
+
const message = createBaseLockingResponse_LockLocalAck();
|
|
768
|
+
message.error = (_a = object.error) !== null && _a !== void 0 ? _a : "";
|
|
769
|
+
return message;
|
|
770
|
+
},
|
|
771
|
+
};
|
|
772
|
+
function isSet(value) {
|
|
773
|
+
return value !== null && value !== undefined;
|
|
774
|
+
}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { ChannelCredentials, Client, ClientReadableStream, handleServerStreamingCall, Metadata } from "@grpc/grpc-js";
|
|
2
|
+
import { ChannelCredentials, Client, ClientDuplexStream, ClientReadableStream, handleBidiStreamingCall, handleServerStreamingCall, Metadata } from "@grpc/grpc-js";
|
|
3
3
|
import type { CallOptions, ClientOptions, ClientUnaryCall, handleUnaryCall, ServiceError, UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
4
4
|
import { CreateLeaseRequest, CreateLeaseResponse, DropLeaseRequest, DropLeaseResponse, KeepLeaseRequest, KeepLeaseResponse } from "./lease";
|
|
5
5
|
import { GlobalLockRequest, GlobalLockResponse, GlobalUnlockRequest, GlobalUnlockResponse, LocalLockRequest, LocalLockResponse, LocalUnlockRequest, LocalUnlockResponse } from "./lock";
|
|
6
|
+
import { LockingRequest, LockingResponse } from "./locking";
|
|
6
7
|
import { GetPeerNodesRequest, GetPeerNodesResponse } from "./peer_nodes";
|
|
7
8
|
export declare const protobufPackage = "freym.sync.management";
|
|
8
9
|
export type ServiceService = typeof ServiceService;
|
|
9
10
|
export declare const ServiceService: {
|
|
11
|
+
readonly locking: {
|
|
12
|
+
readonly path: "/freym.sync.management.Service/Locking";
|
|
13
|
+
readonly requestStream: true;
|
|
14
|
+
readonly responseStream: true;
|
|
15
|
+
readonly requestSerialize: (value: LockingRequest) => Buffer;
|
|
16
|
+
readonly requestDeserialize: (value: Buffer) => LockingRequest;
|
|
17
|
+
readonly responseSerialize: (value: LockingResponse) => Buffer;
|
|
18
|
+
readonly responseDeserialize: (value: Buffer) => LockingResponse;
|
|
19
|
+
};
|
|
10
20
|
readonly createLease: {
|
|
11
21
|
readonly path: "/freym.sync.management.Service/CreateLease";
|
|
12
22
|
readonly requestStream: false;
|
|
@@ -81,6 +91,7 @@ export declare const ServiceService: {
|
|
|
81
91
|
};
|
|
82
92
|
};
|
|
83
93
|
export interface ServiceServer extends UntypedServiceImplementation {
|
|
94
|
+
locking: handleBidiStreamingCall<LockingRequest, LockingResponse>;
|
|
84
95
|
createLease: handleUnaryCall<CreateLeaseRequest, CreateLeaseResponse>;
|
|
85
96
|
keepLease: handleUnaryCall<KeepLeaseRequest, KeepLeaseResponse>;
|
|
86
97
|
dropLease: handleUnaryCall<DropLeaseRequest, DropLeaseResponse>;
|
|
@@ -91,6 +102,9 @@ export interface ServiceServer extends UntypedServiceImplementation {
|
|
|
91
102
|
globalUnlock: handleUnaryCall<GlobalUnlockRequest, GlobalUnlockResponse>;
|
|
92
103
|
}
|
|
93
104
|
export interface ServiceClient extends Client {
|
|
105
|
+
locking(): ClientDuplexStream<LockingRequest, LockingResponse>;
|
|
106
|
+
locking(options: Partial<CallOptions>): ClientDuplexStream<LockingRequest, LockingResponse>;
|
|
107
|
+
locking(metadata: Metadata, options?: Partial<CallOptions>): ClientDuplexStream<LockingRequest, LockingResponse>;
|
|
94
108
|
createLease(request: CreateLeaseRequest, callback: (error: ServiceError | null, response: CreateLeaseResponse) => void): ClientUnaryCall;
|
|
95
109
|
createLease(request: CreateLeaseRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CreateLeaseResponse) => void): ClientUnaryCall;
|
|
96
110
|
createLease(request: CreateLeaseRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CreateLeaseResponse) => void): ClientUnaryCall;
|
|
@@ -4,9 +4,19 @@ exports.ServiceClient = exports.ServiceService = exports.protobufPackage = void
|
|
|
4
4
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
5
5
|
const lease_1 = require("./lease");
|
|
6
6
|
const lock_1 = require("./lock");
|
|
7
|
+
const locking_1 = require("./locking");
|
|
7
8
|
const peer_nodes_1 = require("./peer_nodes");
|
|
8
9
|
exports.protobufPackage = "freym.sync.management";
|
|
9
10
|
exports.ServiceService = {
|
|
11
|
+
locking: {
|
|
12
|
+
path: "/freym.sync.management.Service/Locking",
|
|
13
|
+
requestStream: true,
|
|
14
|
+
responseStream: true,
|
|
15
|
+
requestSerialize: (value) => Buffer.from(locking_1.LockingRequest.encode(value).finish()),
|
|
16
|
+
requestDeserialize: (value) => locking_1.LockingRequest.decode(value),
|
|
17
|
+
responseSerialize: (value) => Buffer.from(locking_1.LockingResponse.encode(value).finish()),
|
|
18
|
+
responseDeserialize: (value) => locking_1.LockingResponse.decode(value),
|
|
19
|
+
},
|
|
10
20
|
createLease: {
|
|
11
21
|
path: "/freym.sync.management.Service/CreateLease",
|
|
12
22
|
requestStream: false,
|
|
@@ -2,3 +2,4 @@ export { ServiceClient, ServiceServer, ServiceService } from "./management/servi
|
|
|
2
2
|
export { CreateLeaseRequest, CreateLeaseResponse, DropLeaseRequest, DropLeaseResponse, KeepLeaseRequest, KeepLeaseResponse, } from "./management/lease";
|
|
3
3
|
export { GlobalLockRequest, GlobalLockResponse, GlobalUnlockRequest, GlobalUnlockResponse, LocalLockRequest, LocalLockResponse, LocalUnlockRequest, LocalUnlockResponse, } from "./management/lock";
|
|
4
4
|
export { GetPeerNodesRequest, GetPeerNodesResponse } from "./management/peer_nodes";
|
|
5
|
+
export { LockingRequest, LockingRequest_Init, LockingRequest_LockGlobal, LockingRequest_LockLocal, LockingRequest_UnlockGlobal, LockingRequest_UnlockLocal, LockingResponse, LockingResponse_InitAck, LockingResponse_LockGlobalAck, LockingResponse_LockLocalAck, } from "./management/locking";
|
package/freym/sync/management.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetPeerNodesResponse = exports.GetPeerNodesRequest = exports.LocalUnlockResponse = exports.LocalUnlockRequest = exports.LocalLockResponse = exports.LocalLockRequest = exports.GlobalUnlockResponse = exports.GlobalUnlockRequest = exports.GlobalLockResponse = exports.GlobalLockRequest = exports.KeepLeaseResponse = exports.KeepLeaseRequest = exports.DropLeaseResponse = exports.DropLeaseRequest = exports.CreateLeaseResponse = exports.CreateLeaseRequest = exports.ServiceService = exports.ServiceClient = void 0;
|
|
3
|
+
exports.LockingResponse_LockLocalAck = exports.LockingResponse_LockGlobalAck = exports.LockingResponse_InitAck = exports.LockingResponse = exports.LockingRequest_UnlockLocal = exports.LockingRequest_UnlockGlobal = exports.LockingRequest_LockLocal = exports.LockingRequest_LockGlobal = exports.LockingRequest_Init = exports.LockingRequest = exports.GetPeerNodesResponse = exports.GetPeerNodesRequest = exports.LocalUnlockResponse = exports.LocalUnlockRequest = exports.LocalLockResponse = exports.LocalLockRequest = exports.GlobalUnlockResponse = exports.GlobalUnlockRequest = exports.GlobalLockResponse = exports.GlobalLockRequest = exports.KeepLeaseResponse = exports.KeepLeaseRequest = exports.DropLeaseResponse = exports.DropLeaseRequest = exports.CreateLeaseResponse = exports.CreateLeaseRequest = exports.ServiceService = exports.ServiceClient = void 0;
|
|
4
4
|
var service_1 = require("./management/service");
|
|
5
5
|
Object.defineProperty(exports, "ServiceClient", { enumerable: true, get: function () { return service_1.ServiceClient; } });
|
|
6
6
|
Object.defineProperty(exports, "ServiceService", { enumerable: true, get: function () { return service_1.ServiceService; } });
|
|
@@ -23,3 +23,14 @@ Object.defineProperty(exports, "LocalUnlockResponse", { enumerable: true, get: f
|
|
|
23
23
|
var peer_nodes_1 = require("./management/peer_nodes");
|
|
24
24
|
Object.defineProperty(exports, "GetPeerNodesRequest", { enumerable: true, get: function () { return peer_nodes_1.GetPeerNodesRequest; } });
|
|
25
25
|
Object.defineProperty(exports, "GetPeerNodesResponse", { enumerable: true, get: function () { return peer_nodes_1.GetPeerNodesResponse; } });
|
|
26
|
+
var locking_1 = require("./management/locking");
|
|
27
|
+
Object.defineProperty(exports, "LockingRequest", { enumerable: true, get: function () { return locking_1.LockingRequest; } });
|
|
28
|
+
Object.defineProperty(exports, "LockingRequest_Init", { enumerable: true, get: function () { return locking_1.LockingRequest_Init; } });
|
|
29
|
+
Object.defineProperty(exports, "LockingRequest_LockGlobal", { enumerable: true, get: function () { return locking_1.LockingRequest_LockGlobal; } });
|
|
30
|
+
Object.defineProperty(exports, "LockingRequest_LockLocal", { enumerable: true, get: function () { return locking_1.LockingRequest_LockLocal; } });
|
|
31
|
+
Object.defineProperty(exports, "LockingRequest_UnlockGlobal", { enumerable: true, get: function () { return locking_1.LockingRequest_UnlockGlobal; } });
|
|
32
|
+
Object.defineProperty(exports, "LockingRequest_UnlockLocal", { enumerable: true, get: function () { return locking_1.LockingRequest_UnlockLocal; } });
|
|
33
|
+
Object.defineProperty(exports, "LockingResponse", { enumerable: true, get: function () { return locking_1.LockingResponse; } });
|
|
34
|
+
Object.defineProperty(exports, "LockingResponse_InitAck", { enumerable: true, get: function () { return locking_1.LockingResponse_InitAck; } });
|
|
35
|
+
Object.defineProperty(exports, "LockingResponse_LockGlobalAck", { enumerable: true, get: function () { return locking_1.LockingResponse_LockGlobalAck; } });
|
|
36
|
+
Object.defineProperty(exports, "LockingResponse_LockLocalAck", { enumerable: true, get: function () { return locking_1.LockingResponse_LockLocalAck; } });
|