@fivenet-app/gen 2026.4.0 → 2026.5.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/clients.ts +60 -0
- package/codegen/perms/perms.ts +11 -0
- package/package.json +1 -1
- package/perms.ts +10 -0
- package/resources/citizens/labels/access.ts +216 -0
- package/resources/citizens/labels/labels.ts +8 -214
- package/services/calendar/calendar.client.ts +2 -106
- package/services/calendar/calendar.ts +0 -1018
- package/services/calendar/entries.client.ts +129 -0
- package/services/calendar/entries.ts +1040 -0
- package/services/centrum/centrum.client.ts +23 -244
- package/services/centrum/centrum.ts +246 -2383
- package/services/centrum/dispatches.client.ts +155 -0
- package/services/centrum/dispatches.ts +1305 -0
- package/services/centrum/units.client.ts +116 -0
- package/services/centrum/units.ts +876 -0
- package/services/documents/categories.client.ts +64 -0
- package/services/documents/categories.ts +331 -0
- package/services/documents/comments.client.ts +77 -0
- package/services/documents/comments.ts +479 -0
- package/services/documents/documents.client.ts +26 -182
- package/services/documents/documents.ts +335 -1682
- package/services/documents/templates.client.ts +90 -0
- package/services/documents/templates.ts +591 -0
- package/services/jobs/colleagues.client.ts +129 -0
- package/services/jobs/colleagues.ts +1129 -0
- package/services/jobs/jobs.client.ts +3 -107
- package/services/jobs/jobs.ts +1 -1113
- package/services/mailer/mailer.client.ts +0 -208
- package/services/mailer/mailer.ts +1 -2010
- package/services/mailer/settings.client.ts +103 -0
- package/services/mailer/settings.ts +708 -0
- package/services/mailer/thread.client.ts +155 -0
- package/services/mailer/thread.ts +1343 -0
- package/services/qualifications/exam.client.ts +77 -0
- package/services/qualifications/exam.ts +609 -0
- package/services/qualifications/qualifications.client.ts +1 -53
- package/services/qualifications/qualifications.ts +0 -591
- package/services/sync/sync.client.ts +4 -4
- package/services/sync/sync.ts +23 -0
- package/svcs.ts +153 -67
|
@@ -0,0 +1,876 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
|
+
// @generated from protobuf file "services/centrum/units.proto" (package "services.centrum", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
6
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
7
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
8
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
10
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
11
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
12
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
13
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
14
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
15
|
+
import { UnitStatus } from "../../resources/centrum/units/units";
|
|
16
|
+
import { PaginationResponse } from "../../resources/common/database/database";
|
|
17
|
+
import { PaginationRequest } from "../../resources/common/database/database";
|
|
18
|
+
import { StatusUnit } from "../../resources/centrum/units/units";
|
|
19
|
+
import { Unit } from "../../resources/centrum/units/units";
|
|
20
|
+
/**
|
|
21
|
+
* @generated from protobuf message services.centrum.JoinUnitRequest
|
|
22
|
+
*/
|
|
23
|
+
export interface JoinUnitRequest {
|
|
24
|
+
/**
|
|
25
|
+
* @generated from protobuf field: optional int64 unit_id = 1
|
|
26
|
+
*/
|
|
27
|
+
unitId?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @generated from protobuf message services.centrum.JoinUnitResponse
|
|
31
|
+
*/
|
|
32
|
+
export interface JoinUnitResponse {
|
|
33
|
+
/**
|
|
34
|
+
* @generated from protobuf field: resources.centrum.units.Unit unit = 1
|
|
35
|
+
*/
|
|
36
|
+
unit?: Unit;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @generated from protobuf message services.centrum.ListUnitsRequest
|
|
40
|
+
*/
|
|
41
|
+
export interface ListUnitsRequest {
|
|
42
|
+
/**
|
|
43
|
+
* @generated from protobuf field: repeated resources.centrum.units.StatusUnit status = 1
|
|
44
|
+
*/
|
|
45
|
+
status: StatusUnit[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @generated from protobuf message services.centrum.ListUnitsResponse
|
|
49
|
+
*/
|
|
50
|
+
export interface ListUnitsResponse {
|
|
51
|
+
/**
|
|
52
|
+
* @generated from protobuf field: repeated resources.centrum.units.Unit units = 1
|
|
53
|
+
*/
|
|
54
|
+
units: Unit[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @generated from protobuf message services.centrum.CreateOrUpdateUnitRequest
|
|
58
|
+
*/
|
|
59
|
+
export interface CreateOrUpdateUnitRequest {
|
|
60
|
+
/**
|
|
61
|
+
* @generated from protobuf field: resources.centrum.units.Unit unit = 1
|
|
62
|
+
*/
|
|
63
|
+
unit?: Unit;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @generated from protobuf message services.centrum.CreateOrUpdateUnitResponse
|
|
67
|
+
*/
|
|
68
|
+
export interface CreateOrUpdateUnitResponse {
|
|
69
|
+
/**
|
|
70
|
+
* @generated from protobuf field: resources.centrum.units.Unit unit = 1
|
|
71
|
+
*/
|
|
72
|
+
unit?: Unit;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @generated from protobuf message services.centrum.DeleteUnitRequest
|
|
76
|
+
*/
|
|
77
|
+
export interface DeleteUnitRequest {
|
|
78
|
+
/**
|
|
79
|
+
* @generated from protobuf field: int64 unit_id = 1
|
|
80
|
+
*/
|
|
81
|
+
unitId: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* @generated from protobuf message services.centrum.DeleteUnitResponse
|
|
85
|
+
*/
|
|
86
|
+
export interface DeleteUnitResponse {
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @generated from protobuf message services.centrum.UpdateUnitStatusRequest
|
|
90
|
+
*/
|
|
91
|
+
export interface UpdateUnitStatusRequest {
|
|
92
|
+
/**
|
|
93
|
+
* @generated from protobuf field: int64 unit_id = 1
|
|
94
|
+
*/
|
|
95
|
+
unitId: number;
|
|
96
|
+
/**
|
|
97
|
+
* @generated from protobuf field: resources.centrum.units.StatusUnit status = 2
|
|
98
|
+
*/
|
|
99
|
+
status: StatusUnit;
|
|
100
|
+
/**
|
|
101
|
+
* @generated from protobuf field: optional string reason = 3
|
|
102
|
+
*/
|
|
103
|
+
reason?: string;
|
|
104
|
+
/**
|
|
105
|
+
* @generated from protobuf field: optional string code = 4
|
|
106
|
+
*/
|
|
107
|
+
code?: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @generated from protobuf message services.centrum.UpdateUnitStatusResponse
|
|
111
|
+
*/
|
|
112
|
+
export interface UpdateUnitStatusResponse {
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf message services.centrum.AssignUnitRequest
|
|
116
|
+
*/
|
|
117
|
+
export interface AssignUnitRequest {
|
|
118
|
+
/**
|
|
119
|
+
* @generated from protobuf field: int64 unit_id = 1
|
|
120
|
+
*/
|
|
121
|
+
unitId: number;
|
|
122
|
+
/**
|
|
123
|
+
* @generated from protobuf field: repeated int32 to_add = 2
|
|
124
|
+
*/
|
|
125
|
+
toAdd: number[];
|
|
126
|
+
/**
|
|
127
|
+
* @generated from protobuf field: repeated int32 to_remove = 3
|
|
128
|
+
*/
|
|
129
|
+
toRemove: number[];
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* @generated from protobuf message services.centrum.AssignUnitResponse
|
|
133
|
+
*/
|
|
134
|
+
export interface AssignUnitResponse {
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @generated from protobuf message services.centrum.ListUnitActivityRequest
|
|
138
|
+
*/
|
|
139
|
+
export interface ListUnitActivityRequest {
|
|
140
|
+
/**
|
|
141
|
+
* @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1
|
|
142
|
+
*/
|
|
143
|
+
pagination?: PaginationRequest;
|
|
144
|
+
/**
|
|
145
|
+
* @generated from protobuf field: int64 id = 2
|
|
146
|
+
*/
|
|
147
|
+
id: number;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @generated from protobuf message services.centrum.ListUnitActivityResponse
|
|
151
|
+
*/
|
|
152
|
+
export interface ListUnitActivityResponse {
|
|
153
|
+
/**
|
|
154
|
+
* @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1
|
|
155
|
+
*/
|
|
156
|
+
pagination?: PaginationResponse;
|
|
157
|
+
/**
|
|
158
|
+
* @generated from protobuf field: repeated resources.centrum.units.UnitStatus activity = 2
|
|
159
|
+
*/
|
|
160
|
+
activity: UnitStatus[];
|
|
161
|
+
}
|
|
162
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
163
|
+
class JoinUnitRequest$Type extends MessageType<JoinUnitRequest> {
|
|
164
|
+
constructor() {
|
|
165
|
+
super("services.centrum.JoinUnitRequest", [
|
|
166
|
+
{ no: 1, name: "unit_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
167
|
+
]);
|
|
168
|
+
}
|
|
169
|
+
create(value?: PartialMessage<JoinUnitRequest>): JoinUnitRequest {
|
|
170
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
171
|
+
if (value !== undefined)
|
|
172
|
+
reflectionMergePartial<JoinUnitRequest>(this, message, value);
|
|
173
|
+
return message;
|
|
174
|
+
}
|
|
175
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JoinUnitRequest): JoinUnitRequest {
|
|
176
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
177
|
+
while (reader.pos < end) {
|
|
178
|
+
let [fieldNo, wireType] = reader.tag();
|
|
179
|
+
switch (fieldNo) {
|
|
180
|
+
case /* optional int64 unit_id */ 1:
|
|
181
|
+
message.unitId = reader.int64().toNumber();
|
|
182
|
+
break;
|
|
183
|
+
default:
|
|
184
|
+
let u = options.readUnknownField;
|
|
185
|
+
if (u === "throw")
|
|
186
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
187
|
+
let d = reader.skip(wireType);
|
|
188
|
+
if (u !== false)
|
|
189
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return message;
|
|
193
|
+
}
|
|
194
|
+
internalBinaryWrite(message: JoinUnitRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
195
|
+
/* optional int64 unit_id = 1; */
|
|
196
|
+
if (message.unitId !== undefined)
|
|
197
|
+
writer.tag(1, WireType.Varint).int64(message.unitId);
|
|
198
|
+
let u = options.writeUnknownFields;
|
|
199
|
+
if (u !== false)
|
|
200
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
201
|
+
return writer;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* @generated MessageType for protobuf message services.centrum.JoinUnitRequest
|
|
206
|
+
*/
|
|
207
|
+
export const JoinUnitRequest = new JoinUnitRequest$Type();
|
|
208
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
209
|
+
class JoinUnitResponse$Type extends MessageType<JoinUnitResponse> {
|
|
210
|
+
constructor() {
|
|
211
|
+
super("services.centrum.JoinUnitResponse", [
|
|
212
|
+
{ no: 1, name: "unit", kind: "message", T: () => Unit }
|
|
213
|
+
]);
|
|
214
|
+
}
|
|
215
|
+
create(value?: PartialMessage<JoinUnitResponse>): JoinUnitResponse {
|
|
216
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
217
|
+
if (value !== undefined)
|
|
218
|
+
reflectionMergePartial<JoinUnitResponse>(this, message, value);
|
|
219
|
+
return message;
|
|
220
|
+
}
|
|
221
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JoinUnitResponse): JoinUnitResponse {
|
|
222
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
223
|
+
while (reader.pos < end) {
|
|
224
|
+
let [fieldNo, wireType] = reader.tag();
|
|
225
|
+
switch (fieldNo) {
|
|
226
|
+
case /* resources.centrum.units.Unit unit */ 1:
|
|
227
|
+
message.unit = Unit.internalBinaryRead(reader, reader.uint32(), options, message.unit);
|
|
228
|
+
break;
|
|
229
|
+
default:
|
|
230
|
+
let u = options.readUnknownField;
|
|
231
|
+
if (u === "throw")
|
|
232
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
233
|
+
let d = reader.skip(wireType);
|
|
234
|
+
if (u !== false)
|
|
235
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return message;
|
|
239
|
+
}
|
|
240
|
+
internalBinaryWrite(message: JoinUnitResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
241
|
+
/* resources.centrum.units.Unit unit = 1; */
|
|
242
|
+
if (message.unit)
|
|
243
|
+
Unit.internalBinaryWrite(message.unit, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
244
|
+
let u = options.writeUnknownFields;
|
|
245
|
+
if (u !== false)
|
|
246
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
247
|
+
return writer;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* @generated MessageType for protobuf message services.centrum.JoinUnitResponse
|
|
252
|
+
*/
|
|
253
|
+
export const JoinUnitResponse = new JoinUnitResponse$Type();
|
|
254
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
255
|
+
class ListUnitsRequest$Type extends MessageType<ListUnitsRequest> {
|
|
256
|
+
constructor() {
|
|
257
|
+
super("services.centrum.ListUnitsRequest", [
|
|
258
|
+
{ no: 1, name: "status", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.centrum.units.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "buf.validate.field": { repeated: { items: { enum: { definedOnly: true } } } } } }
|
|
259
|
+
]);
|
|
260
|
+
}
|
|
261
|
+
create(value?: PartialMessage<ListUnitsRequest>): ListUnitsRequest {
|
|
262
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
263
|
+
message.status = [];
|
|
264
|
+
if (value !== undefined)
|
|
265
|
+
reflectionMergePartial<ListUnitsRequest>(this, message, value);
|
|
266
|
+
return message;
|
|
267
|
+
}
|
|
268
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitsRequest): ListUnitsRequest {
|
|
269
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
270
|
+
while (reader.pos < end) {
|
|
271
|
+
let [fieldNo, wireType] = reader.tag();
|
|
272
|
+
switch (fieldNo) {
|
|
273
|
+
case /* repeated resources.centrum.units.StatusUnit status */ 1:
|
|
274
|
+
if (wireType === WireType.LengthDelimited)
|
|
275
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
276
|
+
message.status.push(reader.int32());
|
|
277
|
+
else
|
|
278
|
+
message.status.push(reader.int32());
|
|
279
|
+
break;
|
|
280
|
+
default:
|
|
281
|
+
let u = options.readUnknownField;
|
|
282
|
+
if (u === "throw")
|
|
283
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
284
|
+
let d = reader.skip(wireType);
|
|
285
|
+
if (u !== false)
|
|
286
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return message;
|
|
290
|
+
}
|
|
291
|
+
internalBinaryWrite(message: ListUnitsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
292
|
+
/* repeated resources.centrum.units.StatusUnit status = 1; */
|
|
293
|
+
if (message.status.length) {
|
|
294
|
+
writer.tag(1, WireType.LengthDelimited).fork();
|
|
295
|
+
for (let i = 0; i < message.status.length; i++)
|
|
296
|
+
writer.int32(message.status[i]);
|
|
297
|
+
writer.join();
|
|
298
|
+
}
|
|
299
|
+
let u = options.writeUnknownFields;
|
|
300
|
+
if (u !== false)
|
|
301
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
302
|
+
return writer;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* @generated MessageType for protobuf message services.centrum.ListUnitsRequest
|
|
307
|
+
*/
|
|
308
|
+
export const ListUnitsRequest = new ListUnitsRequest$Type();
|
|
309
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
310
|
+
class ListUnitsResponse$Type extends MessageType<ListUnitsResponse> {
|
|
311
|
+
constructor() {
|
|
312
|
+
super("services.centrum.ListUnitsResponse", [
|
|
313
|
+
{ no: 1, name: "units", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Unit, options: { "codegen.itemslen.enabled": true } }
|
|
314
|
+
]);
|
|
315
|
+
}
|
|
316
|
+
create(value?: PartialMessage<ListUnitsResponse>): ListUnitsResponse {
|
|
317
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
318
|
+
message.units = [];
|
|
319
|
+
if (value !== undefined)
|
|
320
|
+
reflectionMergePartial<ListUnitsResponse>(this, message, value);
|
|
321
|
+
return message;
|
|
322
|
+
}
|
|
323
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitsResponse): ListUnitsResponse {
|
|
324
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
325
|
+
while (reader.pos < end) {
|
|
326
|
+
let [fieldNo, wireType] = reader.tag();
|
|
327
|
+
switch (fieldNo) {
|
|
328
|
+
case /* repeated resources.centrum.units.Unit units */ 1:
|
|
329
|
+
message.units.push(Unit.internalBinaryRead(reader, reader.uint32(), options));
|
|
330
|
+
break;
|
|
331
|
+
default:
|
|
332
|
+
let u = options.readUnknownField;
|
|
333
|
+
if (u === "throw")
|
|
334
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
335
|
+
let d = reader.skip(wireType);
|
|
336
|
+
if (u !== false)
|
|
337
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return message;
|
|
341
|
+
}
|
|
342
|
+
internalBinaryWrite(message: ListUnitsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
343
|
+
/* repeated resources.centrum.units.Unit units = 1; */
|
|
344
|
+
for (let i = 0; i < message.units.length; i++)
|
|
345
|
+
Unit.internalBinaryWrite(message.units[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
346
|
+
let u = options.writeUnknownFields;
|
|
347
|
+
if (u !== false)
|
|
348
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
349
|
+
return writer;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* @generated MessageType for protobuf message services.centrum.ListUnitsResponse
|
|
354
|
+
*/
|
|
355
|
+
export const ListUnitsResponse = new ListUnitsResponse$Type();
|
|
356
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
357
|
+
class CreateOrUpdateUnitRequest$Type extends MessageType<CreateOrUpdateUnitRequest> {
|
|
358
|
+
constructor() {
|
|
359
|
+
super("services.centrum.CreateOrUpdateUnitRequest", [
|
|
360
|
+
{ no: 1, name: "unit", kind: "message", T: () => Unit, options: { "buf.validate.field": { required: true } } }
|
|
361
|
+
]);
|
|
362
|
+
}
|
|
363
|
+
create(value?: PartialMessage<CreateOrUpdateUnitRequest>): CreateOrUpdateUnitRequest {
|
|
364
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
365
|
+
if (value !== undefined)
|
|
366
|
+
reflectionMergePartial<CreateOrUpdateUnitRequest>(this, message, value);
|
|
367
|
+
return message;
|
|
368
|
+
}
|
|
369
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateOrUpdateUnitRequest): CreateOrUpdateUnitRequest {
|
|
370
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
371
|
+
while (reader.pos < end) {
|
|
372
|
+
let [fieldNo, wireType] = reader.tag();
|
|
373
|
+
switch (fieldNo) {
|
|
374
|
+
case /* resources.centrum.units.Unit unit */ 1:
|
|
375
|
+
message.unit = Unit.internalBinaryRead(reader, reader.uint32(), options, message.unit);
|
|
376
|
+
break;
|
|
377
|
+
default:
|
|
378
|
+
let u = options.readUnknownField;
|
|
379
|
+
if (u === "throw")
|
|
380
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
381
|
+
let d = reader.skip(wireType);
|
|
382
|
+
if (u !== false)
|
|
383
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return message;
|
|
387
|
+
}
|
|
388
|
+
internalBinaryWrite(message: CreateOrUpdateUnitRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
389
|
+
/* resources.centrum.units.Unit unit = 1; */
|
|
390
|
+
if (message.unit)
|
|
391
|
+
Unit.internalBinaryWrite(message.unit, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
392
|
+
let u = options.writeUnknownFields;
|
|
393
|
+
if (u !== false)
|
|
394
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
395
|
+
return writer;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* @generated MessageType for protobuf message services.centrum.CreateOrUpdateUnitRequest
|
|
400
|
+
*/
|
|
401
|
+
export const CreateOrUpdateUnitRequest = new CreateOrUpdateUnitRequest$Type();
|
|
402
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
403
|
+
class CreateOrUpdateUnitResponse$Type extends MessageType<CreateOrUpdateUnitResponse> {
|
|
404
|
+
constructor() {
|
|
405
|
+
super("services.centrum.CreateOrUpdateUnitResponse", [
|
|
406
|
+
{ no: 1, name: "unit", kind: "message", T: () => Unit }
|
|
407
|
+
]);
|
|
408
|
+
}
|
|
409
|
+
create(value?: PartialMessage<CreateOrUpdateUnitResponse>): CreateOrUpdateUnitResponse {
|
|
410
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
411
|
+
if (value !== undefined)
|
|
412
|
+
reflectionMergePartial<CreateOrUpdateUnitResponse>(this, message, value);
|
|
413
|
+
return message;
|
|
414
|
+
}
|
|
415
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateOrUpdateUnitResponse): CreateOrUpdateUnitResponse {
|
|
416
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
417
|
+
while (reader.pos < end) {
|
|
418
|
+
let [fieldNo, wireType] = reader.tag();
|
|
419
|
+
switch (fieldNo) {
|
|
420
|
+
case /* resources.centrum.units.Unit unit */ 1:
|
|
421
|
+
message.unit = Unit.internalBinaryRead(reader, reader.uint32(), options, message.unit);
|
|
422
|
+
break;
|
|
423
|
+
default:
|
|
424
|
+
let u = options.readUnknownField;
|
|
425
|
+
if (u === "throw")
|
|
426
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
427
|
+
let d = reader.skip(wireType);
|
|
428
|
+
if (u !== false)
|
|
429
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
return message;
|
|
433
|
+
}
|
|
434
|
+
internalBinaryWrite(message: CreateOrUpdateUnitResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
435
|
+
/* resources.centrum.units.Unit unit = 1; */
|
|
436
|
+
if (message.unit)
|
|
437
|
+
Unit.internalBinaryWrite(message.unit, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
438
|
+
let u = options.writeUnknownFields;
|
|
439
|
+
if (u !== false)
|
|
440
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
441
|
+
return writer;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* @generated MessageType for protobuf message services.centrum.CreateOrUpdateUnitResponse
|
|
446
|
+
*/
|
|
447
|
+
export const CreateOrUpdateUnitResponse = new CreateOrUpdateUnitResponse$Type();
|
|
448
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
449
|
+
class DeleteUnitRequest$Type extends MessageType<DeleteUnitRequest> {
|
|
450
|
+
constructor() {
|
|
451
|
+
super("services.centrum.DeleteUnitRequest", [
|
|
452
|
+
{ no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
453
|
+
]);
|
|
454
|
+
}
|
|
455
|
+
create(value?: PartialMessage<DeleteUnitRequest>): DeleteUnitRequest {
|
|
456
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
457
|
+
message.unitId = 0;
|
|
458
|
+
if (value !== undefined)
|
|
459
|
+
reflectionMergePartial<DeleteUnitRequest>(this, message, value);
|
|
460
|
+
return message;
|
|
461
|
+
}
|
|
462
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUnitRequest): DeleteUnitRequest {
|
|
463
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
464
|
+
while (reader.pos < end) {
|
|
465
|
+
let [fieldNo, wireType] = reader.tag();
|
|
466
|
+
switch (fieldNo) {
|
|
467
|
+
case /* int64 unit_id */ 1:
|
|
468
|
+
message.unitId = reader.int64().toNumber();
|
|
469
|
+
break;
|
|
470
|
+
default:
|
|
471
|
+
let u = options.readUnknownField;
|
|
472
|
+
if (u === "throw")
|
|
473
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
474
|
+
let d = reader.skip(wireType);
|
|
475
|
+
if (u !== false)
|
|
476
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
return message;
|
|
480
|
+
}
|
|
481
|
+
internalBinaryWrite(message: DeleteUnitRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
482
|
+
/* int64 unit_id = 1; */
|
|
483
|
+
if (message.unitId !== 0)
|
|
484
|
+
writer.tag(1, WireType.Varint).int64(message.unitId);
|
|
485
|
+
let u = options.writeUnknownFields;
|
|
486
|
+
if (u !== false)
|
|
487
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
488
|
+
return writer;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* @generated MessageType for protobuf message services.centrum.DeleteUnitRequest
|
|
493
|
+
*/
|
|
494
|
+
export const DeleteUnitRequest = new DeleteUnitRequest$Type();
|
|
495
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
496
|
+
class DeleteUnitResponse$Type extends MessageType<DeleteUnitResponse> {
|
|
497
|
+
constructor() {
|
|
498
|
+
super("services.centrum.DeleteUnitResponse", []);
|
|
499
|
+
}
|
|
500
|
+
create(value?: PartialMessage<DeleteUnitResponse>): DeleteUnitResponse {
|
|
501
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
502
|
+
if (value !== undefined)
|
|
503
|
+
reflectionMergePartial<DeleteUnitResponse>(this, message, value);
|
|
504
|
+
return message;
|
|
505
|
+
}
|
|
506
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUnitResponse): DeleteUnitResponse {
|
|
507
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
508
|
+
while (reader.pos < end) {
|
|
509
|
+
let [fieldNo, wireType] = reader.tag();
|
|
510
|
+
switch (fieldNo) {
|
|
511
|
+
default:
|
|
512
|
+
let u = options.readUnknownField;
|
|
513
|
+
if (u === "throw")
|
|
514
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
515
|
+
let d = reader.skip(wireType);
|
|
516
|
+
if (u !== false)
|
|
517
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
return message;
|
|
521
|
+
}
|
|
522
|
+
internalBinaryWrite(message: DeleteUnitResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
523
|
+
let u = options.writeUnknownFields;
|
|
524
|
+
if (u !== false)
|
|
525
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
526
|
+
return writer;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* @generated MessageType for protobuf message services.centrum.DeleteUnitResponse
|
|
531
|
+
*/
|
|
532
|
+
export const DeleteUnitResponse = new DeleteUnitResponse$Type();
|
|
533
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
534
|
+
class UpdateUnitStatusRequest$Type extends MessageType<UpdateUnitStatusRequest> {
|
|
535
|
+
constructor() {
|
|
536
|
+
super("services.centrum.UpdateUnitStatusRequest", [
|
|
537
|
+
{ no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
538
|
+
{ no: 2, name: "status", kind: "enum", T: () => ["resources.centrum.units.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
539
|
+
{ no: 3, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
540
|
+
{ no: 4, name: "code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "codegen.sanitizer.sanitizer": { enabled: true } } }
|
|
541
|
+
]);
|
|
542
|
+
}
|
|
543
|
+
create(value?: PartialMessage<UpdateUnitStatusRequest>): UpdateUnitStatusRequest {
|
|
544
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
545
|
+
message.unitId = 0;
|
|
546
|
+
message.status = 0;
|
|
547
|
+
if (value !== undefined)
|
|
548
|
+
reflectionMergePartial<UpdateUnitStatusRequest>(this, message, value);
|
|
549
|
+
return message;
|
|
550
|
+
}
|
|
551
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUnitStatusRequest): UpdateUnitStatusRequest {
|
|
552
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
553
|
+
while (reader.pos < end) {
|
|
554
|
+
let [fieldNo, wireType] = reader.tag();
|
|
555
|
+
switch (fieldNo) {
|
|
556
|
+
case /* int64 unit_id */ 1:
|
|
557
|
+
message.unitId = reader.int64().toNumber();
|
|
558
|
+
break;
|
|
559
|
+
case /* resources.centrum.units.StatusUnit status */ 2:
|
|
560
|
+
message.status = reader.int32();
|
|
561
|
+
break;
|
|
562
|
+
case /* optional string reason */ 3:
|
|
563
|
+
message.reason = reader.string();
|
|
564
|
+
break;
|
|
565
|
+
case /* optional string code */ 4:
|
|
566
|
+
message.code = reader.string();
|
|
567
|
+
break;
|
|
568
|
+
default:
|
|
569
|
+
let u = options.readUnknownField;
|
|
570
|
+
if (u === "throw")
|
|
571
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
572
|
+
let d = reader.skip(wireType);
|
|
573
|
+
if (u !== false)
|
|
574
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
return message;
|
|
578
|
+
}
|
|
579
|
+
internalBinaryWrite(message: UpdateUnitStatusRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
580
|
+
/* int64 unit_id = 1; */
|
|
581
|
+
if (message.unitId !== 0)
|
|
582
|
+
writer.tag(1, WireType.Varint).int64(message.unitId);
|
|
583
|
+
/* resources.centrum.units.StatusUnit status = 2; */
|
|
584
|
+
if (message.status !== 0)
|
|
585
|
+
writer.tag(2, WireType.Varint).int32(message.status);
|
|
586
|
+
/* optional string reason = 3; */
|
|
587
|
+
if (message.reason !== undefined)
|
|
588
|
+
writer.tag(3, WireType.LengthDelimited).string(message.reason);
|
|
589
|
+
/* optional string code = 4; */
|
|
590
|
+
if (message.code !== undefined)
|
|
591
|
+
writer.tag(4, WireType.LengthDelimited).string(message.code);
|
|
592
|
+
let u = options.writeUnknownFields;
|
|
593
|
+
if (u !== false)
|
|
594
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
595
|
+
return writer;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* @generated MessageType for protobuf message services.centrum.UpdateUnitStatusRequest
|
|
600
|
+
*/
|
|
601
|
+
export const UpdateUnitStatusRequest = new UpdateUnitStatusRequest$Type();
|
|
602
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
603
|
+
class UpdateUnitStatusResponse$Type extends MessageType<UpdateUnitStatusResponse> {
|
|
604
|
+
constructor() {
|
|
605
|
+
super("services.centrum.UpdateUnitStatusResponse", []);
|
|
606
|
+
}
|
|
607
|
+
create(value?: PartialMessage<UpdateUnitStatusResponse>): UpdateUnitStatusResponse {
|
|
608
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
609
|
+
if (value !== undefined)
|
|
610
|
+
reflectionMergePartial<UpdateUnitStatusResponse>(this, message, value);
|
|
611
|
+
return message;
|
|
612
|
+
}
|
|
613
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUnitStatusResponse): UpdateUnitStatusResponse {
|
|
614
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
615
|
+
while (reader.pos < end) {
|
|
616
|
+
let [fieldNo, wireType] = reader.tag();
|
|
617
|
+
switch (fieldNo) {
|
|
618
|
+
default:
|
|
619
|
+
let u = options.readUnknownField;
|
|
620
|
+
if (u === "throw")
|
|
621
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
622
|
+
let d = reader.skip(wireType);
|
|
623
|
+
if (u !== false)
|
|
624
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
return message;
|
|
628
|
+
}
|
|
629
|
+
internalBinaryWrite(message: UpdateUnitStatusResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
630
|
+
let u = options.writeUnknownFields;
|
|
631
|
+
if (u !== false)
|
|
632
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
633
|
+
return writer;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* @generated MessageType for protobuf message services.centrum.UpdateUnitStatusResponse
|
|
638
|
+
*/
|
|
639
|
+
export const UpdateUnitStatusResponse = new UpdateUnitStatusResponse$Type();
|
|
640
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
641
|
+
class AssignUnitRequest$Type extends MessageType<AssignUnitRequest> {
|
|
642
|
+
constructor() {
|
|
643
|
+
super("services.centrum.AssignUnitRequest", [
|
|
644
|
+
{ no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
645
|
+
{ no: 2, name: "to_add", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ },
|
|
646
|
+
{ no: 3, name: "to_remove", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }
|
|
647
|
+
]);
|
|
648
|
+
}
|
|
649
|
+
create(value?: PartialMessage<AssignUnitRequest>): AssignUnitRequest {
|
|
650
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
651
|
+
message.unitId = 0;
|
|
652
|
+
message.toAdd = [];
|
|
653
|
+
message.toRemove = [];
|
|
654
|
+
if (value !== undefined)
|
|
655
|
+
reflectionMergePartial<AssignUnitRequest>(this, message, value);
|
|
656
|
+
return message;
|
|
657
|
+
}
|
|
658
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssignUnitRequest): AssignUnitRequest {
|
|
659
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
660
|
+
while (reader.pos < end) {
|
|
661
|
+
let [fieldNo, wireType] = reader.tag();
|
|
662
|
+
switch (fieldNo) {
|
|
663
|
+
case /* int64 unit_id */ 1:
|
|
664
|
+
message.unitId = reader.int64().toNumber();
|
|
665
|
+
break;
|
|
666
|
+
case /* repeated int32 to_add */ 2:
|
|
667
|
+
if (wireType === WireType.LengthDelimited)
|
|
668
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
669
|
+
message.toAdd.push(reader.int32());
|
|
670
|
+
else
|
|
671
|
+
message.toAdd.push(reader.int32());
|
|
672
|
+
break;
|
|
673
|
+
case /* repeated int32 to_remove */ 3:
|
|
674
|
+
if (wireType === WireType.LengthDelimited)
|
|
675
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
676
|
+
message.toRemove.push(reader.int32());
|
|
677
|
+
else
|
|
678
|
+
message.toRemove.push(reader.int32());
|
|
679
|
+
break;
|
|
680
|
+
default:
|
|
681
|
+
let u = options.readUnknownField;
|
|
682
|
+
if (u === "throw")
|
|
683
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
684
|
+
let d = reader.skip(wireType);
|
|
685
|
+
if (u !== false)
|
|
686
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
return message;
|
|
690
|
+
}
|
|
691
|
+
internalBinaryWrite(message: AssignUnitRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
692
|
+
/* int64 unit_id = 1; */
|
|
693
|
+
if (message.unitId !== 0)
|
|
694
|
+
writer.tag(1, WireType.Varint).int64(message.unitId);
|
|
695
|
+
/* repeated int32 to_add = 2; */
|
|
696
|
+
if (message.toAdd.length) {
|
|
697
|
+
writer.tag(2, WireType.LengthDelimited).fork();
|
|
698
|
+
for (let i = 0; i < message.toAdd.length; i++)
|
|
699
|
+
writer.int32(message.toAdd[i]);
|
|
700
|
+
writer.join();
|
|
701
|
+
}
|
|
702
|
+
/* repeated int32 to_remove = 3; */
|
|
703
|
+
if (message.toRemove.length) {
|
|
704
|
+
writer.tag(3, WireType.LengthDelimited).fork();
|
|
705
|
+
for (let i = 0; i < message.toRemove.length; i++)
|
|
706
|
+
writer.int32(message.toRemove[i]);
|
|
707
|
+
writer.join();
|
|
708
|
+
}
|
|
709
|
+
let u = options.writeUnknownFields;
|
|
710
|
+
if (u !== false)
|
|
711
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
712
|
+
return writer;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* @generated MessageType for protobuf message services.centrum.AssignUnitRequest
|
|
717
|
+
*/
|
|
718
|
+
export const AssignUnitRequest = new AssignUnitRequest$Type();
|
|
719
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
720
|
+
class AssignUnitResponse$Type extends MessageType<AssignUnitResponse> {
|
|
721
|
+
constructor() {
|
|
722
|
+
super("services.centrum.AssignUnitResponse", []);
|
|
723
|
+
}
|
|
724
|
+
create(value?: PartialMessage<AssignUnitResponse>): AssignUnitResponse {
|
|
725
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
726
|
+
if (value !== undefined)
|
|
727
|
+
reflectionMergePartial<AssignUnitResponse>(this, message, value);
|
|
728
|
+
return message;
|
|
729
|
+
}
|
|
730
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssignUnitResponse): AssignUnitResponse {
|
|
731
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
732
|
+
while (reader.pos < end) {
|
|
733
|
+
let [fieldNo, wireType] = reader.tag();
|
|
734
|
+
switch (fieldNo) {
|
|
735
|
+
default:
|
|
736
|
+
let u = options.readUnknownField;
|
|
737
|
+
if (u === "throw")
|
|
738
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
739
|
+
let d = reader.skip(wireType);
|
|
740
|
+
if (u !== false)
|
|
741
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
return message;
|
|
745
|
+
}
|
|
746
|
+
internalBinaryWrite(message: AssignUnitResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
747
|
+
let u = options.writeUnknownFields;
|
|
748
|
+
if (u !== false)
|
|
749
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
750
|
+
return writer;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* @generated MessageType for protobuf message services.centrum.AssignUnitResponse
|
|
755
|
+
*/
|
|
756
|
+
export const AssignUnitResponse = new AssignUnitResponse$Type();
|
|
757
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
758
|
+
class ListUnitActivityRequest$Type extends MessageType<ListUnitActivityRequest> {
|
|
759
|
+
constructor() {
|
|
760
|
+
super("services.centrum.ListUnitActivityRequest", [
|
|
761
|
+
{ no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
|
|
762
|
+
{ no: 2, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
763
|
+
]);
|
|
764
|
+
}
|
|
765
|
+
create(value?: PartialMessage<ListUnitActivityRequest>): ListUnitActivityRequest {
|
|
766
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
767
|
+
message.id = 0;
|
|
768
|
+
if (value !== undefined)
|
|
769
|
+
reflectionMergePartial<ListUnitActivityRequest>(this, message, value);
|
|
770
|
+
return message;
|
|
771
|
+
}
|
|
772
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitActivityRequest): ListUnitActivityRequest {
|
|
773
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
774
|
+
while (reader.pos < end) {
|
|
775
|
+
let [fieldNo, wireType] = reader.tag();
|
|
776
|
+
switch (fieldNo) {
|
|
777
|
+
case /* resources.common.database.PaginationRequest pagination */ 1:
|
|
778
|
+
message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
|
|
779
|
+
break;
|
|
780
|
+
case /* int64 id */ 2:
|
|
781
|
+
message.id = reader.int64().toNumber();
|
|
782
|
+
break;
|
|
783
|
+
default:
|
|
784
|
+
let u = options.readUnknownField;
|
|
785
|
+
if (u === "throw")
|
|
786
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
787
|
+
let d = reader.skip(wireType);
|
|
788
|
+
if (u !== false)
|
|
789
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
return message;
|
|
793
|
+
}
|
|
794
|
+
internalBinaryWrite(message: ListUnitActivityRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
795
|
+
/* resources.common.database.PaginationRequest pagination = 1; */
|
|
796
|
+
if (message.pagination)
|
|
797
|
+
PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
798
|
+
/* int64 id = 2; */
|
|
799
|
+
if (message.id !== 0)
|
|
800
|
+
writer.tag(2, WireType.Varint).int64(message.id);
|
|
801
|
+
let u = options.writeUnknownFields;
|
|
802
|
+
if (u !== false)
|
|
803
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
804
|
+
return writer;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* @generated MessageType for protobuf message services.centrum.ListUnitActivityRequest
|
|
809
|
+
*/
|
|
810
|
+
export const ListUnitActivityRequest = new ListUnitActivityRequest$Type();
|
|
811
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
812
|
+
class ListUnitActivityResponse$Type extends MessageType<ListUnitActivityResponse> {
|
|
813
|
+
constructor() {
|
|
814
|
+
super("services.centrum.ListUnitActivityResponse", [
|
|
815
|
+
{ no: 1, name: "pagination", kind: "message", T: () => PaginationResponse, options: { "buf.validate.field": { required: true } } },
|
|
816
|
+
{ no: 2, name: "activity", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitStatus, options: { "codegen.itemslen.enabled": true } }
|
|
817
|
+
]);
|
|
818
|
+
}
|
|
819
|
+
create(value?: PartialMessage<ListUnitActivityResponse>): ListUnitActivityResponse {
|
|
820
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
821
|
+
message.activity = [];
|
|
822
|
+
if (value !== undefined)
|
|
823
|
+
reflectionMergePartial<ListUnitActivityResponse>(this, message, value);
|
|
824
|
+
return message;
|
|
825
|
+
}
|
|
826
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitActivityResponse): ListUnitActivityResponse {
|
|
827
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
828
|
+
while (reader.pos < end) {
|
|
829
|
+
let [fieldNo, wireType] = reader.tag();
|
|
830
|
+
switch (fieldNo) {
|
|
831
|
+
case /* resources.common.database.PaginationResponse pagination */ 1:
|
|
832
|
+
message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
|
|
833
|
+
break;
|
|
834
|
+
case /* repeated resources.centrum.units.UnitStatus activity */ 2:
|
|
835
|
+
message.activity.push(UnitStatus.internalBinaryRead(reader, reader.uint32(), options));
|
|
836
|
+
break;
|
|
837
|
+
default:
|
|
838
|
+
let u = options.readUnknownField;
|
|
839
|
+
if (u === "throw")
|
|
840
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
841
|
+
let d = reader.skip(wireType);
|
|
842
|
+
if (u !== false)
|
|
843
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
return message;
|
|
847
|
+
}
|
|
848
|
+
internalBinaryWrite(message: ListUnitActivityResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
849
|
+
/* resources.common.database.PaginationResponse pagination = 1; */
|
|
850
|
+
if (message.pagination)
|
|
851
|
+
PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
852
|
+
/* repeated resources.centrum.units.UnitStatus activity = 2; */
|
|
853
|
+
for (let i = 0; i < message.activity.length; i++)
|
|
854
|
+
UnitStatus.internalBinaryWrite(message.activity[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
855
|
+
let u = options.writeUnknownFields;
|
|
856
|
+
if (u !== false)
|
|
857
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
858
|
+
return writer;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* @generated MessageType for protobuf message services.centrum.ListUnitActivityResponse
|
|
863
|
+
*/
|
|
864
|
+
export const ListUnitActivityResponse = new ListUnitActivityResponse$Type();
|
|
865
|
+
/**
|
|
866
|
+
* @generated ServiceType for protobuf service services.centrum.UnitsService
|
|
867
|
+
*/
|
|
868
|
+
export const UnitsService = new ServiceType("services.centrum.UnitsService", [
|
|
869
|
+
{ name: "JoinUnit", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: JoinUnitRequest, O: JoinUnitResponse },
|
|
870
|
+
{ name: "ListUnits", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: ListUnitsRequest, O: ListUnitsResponse },
|
|
871
|
+
{ name: "ListUnitActivity", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: ListUnitActivityRequest, O: ListUnitActivityResponse },
|
|
872
|
+
{ name: "CreateOrUpdateUnit", options: { "codegen.perms.perms": { enabled: true } }, I: CreateOrUpdateUnitRequest, O: CreateOrUpdateUnitResponse },
|
|
873
|
+
{ name: "DeleteUnit", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteUnitRequest, O: DeleteUnitResponse },
|
|
874
|
+
{ name: "AssignUnit", options: { "codegen.perms.perms": { enabled: true, name: "TakeControl" } }, I: AssignUnitRequest, O: AssignUnitResponse },
|
|
875
|
+
{ name: "UpdateUnitStatus", options: { "codegen.perms.perms": { enabled: true, name: "TakeDispatch" } }, I: UpdateUnitStatusRequest, O: UpdateUnitStatusResponse }
|
|
876
|
+
], { "codegen.perms.perms_svc": { name: "centrum.CentrumService" } });
|