@fivenet-app/gen 0.9.3-1
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/README.md +1 -0
- package/google/protobuf/any.ts +322 -0
- package/google/protobuf/descriptor.ts +3475 -0
- package/google/protobuf/duration.ts +231 -0
- package/google/protobuf/timestamp.ts +290 -0
- package/package.json +15 -0
- package/perms.ts +178 -0
- package/resources/accounts/accounts.ts +195 -0
- package/resources/accounts/oauth2.ts +230 -0
- package/resources/calendar/access.ts +362 -0
- package/resources/calendar/calendar.ts +955 -0
- package/resources/centrum/access.ts +380 -0
- package/resources/centrum/dispatches.ts +854 -0
- package/resources/centrum/general.ts +231 -0
- package/resources/centrum/settings.ts +303 -0
- package/resources/centrum/units.ts +620 -0
- package/resources/common/access/dummy.ts +309 -0
- package/resources/common/content/content.ts +252 -0
- package/resources/common/cron/cron.ts +536 -0
- package/resources/common/database/database.ts +306 -0
- package/resources/common/error.ts +79 -0
- package/resources/common/grpcws/grpcws.ts +615 -0
- package/resources/common/i18n.ts +102 -0
- package/resources/common/uuid.ts +68 -0
- package/resources/documents/access.ts +388 -0
- package/resources/documents/activity.ts +803 -0
- package/resources/documents/category.ts +132 -0
- package/resources/documents/comment.ts +161 -0
- package/resources/documents/documents.ts +1124 -0
- package/resources/documents/requests.ts +196 -0
- package/resources/documents/templates.ts +949 -0
- package/resources/documents/workflow.ts +349 -0
- package/resources/filestore/file.ts +204 -0
- package/resources/internet/ads.ts +257 -0
- package/resources/internet/domain.ts +136 -0
- package/resources/internet/internet.ts +344 -0
- package/resources/internet/page.ts +236 -0
- package/resources/internet/search.ts +104 -0
- package/resources/jobs/activity.ts +600 -0
- package/resources/jobs/colleagues.ts +346 -0
- package/resources/jobs/conduct.ts +220 -0
- package/resources/jobs/labels.ts +240 -0
- package/resources/jobs/timeclock.ts +372 -0
- package/resources/laws/laws.ts +293 -0
- package/resources/livemap/livemap.ts +728 -0
- package/resources/livemap/tracker.ts +81 -0
- package/resources/mailer/access.ts +485 -0
- package/resources/mailer/email.ts +222 -0
- package/resources/mailer/events.ts +196 -0
- package/resources/mailer/message.ts +285 -0
- package/resources/mailer/settings.ts +95 -0
- package/resources/mailer/template.ts +164 -0
- package/resources/mailer/thread.ts +422 -0
- package/resources/mailer/user.ts +93 -0
- package/resources/notifications/events.ts +287 -0
- package/resources/notifications/notifications.ts +444 -0
- package/resources/permissions/permissions.ts +829 -0
- package/resources/qualifications/access.ts +275 -0
- package/resources/qualifications/exam.ts +1421 -0
- package/resources/qualifications/qualifications.ts +1289 -0
- package/resources/rector/audit.ts +226 -0
- package/resources/rector/config.ts +922 -0
- package/resources/stats/stats.ts +67 -0
- package/resources/sync/activity.ts +356 -0
- package/resources/sync/data.ts +455 -0
- package/resources/timestamp/timestamp.ts +78 -0
- package/resources/users/activity.ts +211 -0
- package/resources/users/job_props.ts +992 -0
- package/resources/users/jobs.ts +171 -0
- package/resources/users/labels.ts +161 -0
- package/resources/users/props.ts +207 -0
- package/resources/users/users.ts +570 -0
- package/resources/vehicles/vehicles.ts +114 -0
- package/resources/wiki/access.ts +362 -0
- package/resources/wiki/activity.ts +591 -0
- package/resources/wiki/page.ts +548 -0
- package/services/auth/auth.client.ts +171 -0
- package/services/auth/auth.ts +1331 -0
- package/services/calendar/calendar.client.ts +262 -0
- package/services/calendar/calendar.ts +1733 -0
- package/services/centrum/centrum.client.ts +365 -0
- package/services/centrum/centrum.ts +2619 -0
- package/services/citizenstore/citizenstore.client.ts +126 -0
- package/services/citizenstore/citizenstore.ts +847 -0
- package/services/completor/completor.client.ts +109 -0
- package/services/completor/completor.ts +616 -0
- package/services/dmv/vehicles.client.ts +41 -0
- package/services/dmv/vehicles.ts +191 -0
- package/services/docstore/docstore.client.ts +653 -0
- package/services/docstore/docstore.ts +4571 -0
- package/services/internet/ads.client.ts +41 -0
- package/services/internet/ads.ts +145 -0
- package/services/internet/internet.client.ts +58 -0
- package/services/internet/internet.ts +257 -0
- package/services/jobs/conduct.client.ts +92 -0
- package/services/jobs/conduct.ts +541 -0
- package/services/jobs/jobs.client.ts +194 -0
- package/services/jobs/jobs.ts +1301 -0
- package/services/jobs/timeclock.client.ts +75 -0
- package/services/jobs/timeclock.ts +808 -0
- package/services/livemapper/livemap.client.ts +76 -0
- package/services/livemapper/livemap.ts +552 -0
- package/services/mailer/mailer.client.ts +381 -0
- package/services/mailer/mailer.ts +2590 -0
- package/services/notificator/notificator.client.ts +76 -0
- package/services/notificator/notificator.ts +510 -0
- package/services/qualifications/qualifications.client.ts +279 -0
- package/services/qualifications/qualifications.ts +2142 -0
- package/services/rector/config.client.ts +58 -0
- package/services/rector/config.ts +216 -0
- package/services/rector/filestore.client.ts +75 -0
- package/services/rector/filestore.ts +378 -0
- package/services/rector/laws.client.ts +92 -0
- package/services/rector/laws.ts +416 -0
- package/services/rector/rector.client.ts +211 -0
- package/services/rector/rector.ts +1540 -0
- package/services/stats/stats.client.ts +37 -0
- package/services/stats/stats.ts +128 -0
- package/services/sync/sync.client.ts +110 -0
- package/services/sync/sync.ts +831 -0
- package/services/wiki/wiki.client.ts +126 -0
- package/services/wiki/wiki.ts +749 -0
- package/svcs.ts +307 -0
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
|
|
2
|
+
// @generated from protobuf file "resources/centrum/units.proto" (package "resources.centrum", syntax proto3)
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
5
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
6
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
7
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
9
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
10
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
11
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
13
|
+
import { Colleague } from "../jobs/colleagues";
|
|
14
|
+
import { UnitAccess } from "./access";
|
|
15
|
+
import { Attributes } from "./general";
|
|
16
|
+
import { Timestamp } from "../timestamp/timestamp";
|
|
17
|
+
/**
|
|
18
|
+
* @generated from protobuf message resources.centrum.Unit
|
|
19
|
+
*/
|
|
20
|
+
export interface Unit {
|
|
21
|
+
/**
|
|
22
|
+
* @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
|
|
23
|
+
*/
|
|
24
|
+
id: string; // @gotags: sql:"primary_key" alias:"id"
|
|
25
|
+
/**
|
|
26
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
|
|
27
|
+
*/
|
|
28
|
+
createdAt?: Timestamp;
|
|
29
|
+
/**
|
|
30
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
|
|
31
|
+
*/
|
|
32
|
+
updatedAt?: Timestamp;
|
|
33
|
+
/**
|
|
34
|
+
* @generated from protobuf field: string job = 4;
|
|
35
|
+
*/
|
|
36
|
+
job: string;
|
|
37
|
+
/**
|
|
38
|
+
* @sanitize
|
|
39
|
+
*
|
|
40
|
+
* @generated from protobuf field: string name = 5;
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
* @sanitize
|
|
45
|
+
*
|
|
46
|
+
* @generated from protobuf field: string initials = 6;
|
|
47
|
+
*/
|
|
48
|
+
initials: string;
|
|
49
|
+
/**
|
|
50
|
+
* @sanitize: method=StripTags
|
|
51
|
+
*
|
|
52
|
+
* @generated from protobuf field: string color = 7;
|
|
53
|
+
*/
|
|
54
|
+
color: string;
|
|
55
|
+
/**
|
|
56
|
+
* @sanitize
|
|
57
|
+
*
|
|
58
|
+
* @generated from protobuf field: optional string description = 8;
|
|
59
|
+
*/
|
|
60
|
+
description?: string;
|
|
61
|
+
/**
|
|
62
|
+
* @generated from protobuf field: optional resources.centrum.UnitStatus status = 9;
|
|
63
|
+
*/
|
|
64
|
+
status?: UnitStatus;
|
|
65
|
+
/**
|
|
66
|
+
* @generated from protobuf field: repeated resources.centrum.UnitAssignment users = 11;
|
|
67
|
+
*/
|
|
68
|
+
users: UnitAssignment[];
|
|
69
|
+
/**
|
|
70
|
+
* @generated from protobuf field: optional resources.centrum.Attributes attributes = 12;
|
|
71
|
+
*/
|
|
72
|
+
attributes?: Attributes;
|
|
73
|
+
/**
|
|
74
|
+
* @generated from protobuf field: optional string home_postal = 13;
|
|
75
|
+
*/
|
|
76
|
+
homePostal?: string;
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf field: resources.centrum.UnitAccess access = 14;
|
|
79
|
+
*/
|
|
80
|
+
access?: UnitAccess;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @generated from protobuf message resources.centrum.UnitAssignments
|
|
84
|
+
*/
|
|
85
|
+
export interface UnitAssignments {
|
|
86
|
+
/**
|
|
87
|
+
* @generated from protobuf field: uint64 unit_id = 1 [jstype = JS_STRING];
|
|
88
|
+
*/
|
|
89
|
+
unitId: string;
|
|
90
|
+
/**
|
|
91
|
+
* @generated from protobuf field: string job = 2;
|
|
92
|
+
*/
|
|
93
|
+
job: string;
|
|
94
|
+
/**
|
|
95
|
+
* @generated from protobuf field: repeated resources.centrum.UnitAssignment users = 3;
|
|
96
|
+
*/
|
|
97
|
+
users: UnitAssignment[];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @generated from protobuf message resources.centrum.UnitAssignment
|
|
101
|
+
*/
|
|
102
|
+
export interface UnitAssignment {
|
|
103
|
+
/**
|
|
104
|
+
* @generated from protobuf field: uint64 unit_id = 1 [jstype = JS_STRING];
|
|
105
|
+
*/
|
|
106
|
+
unitId: string; // @gotags: sql:"primary_key" alias:"unit_id"
|
|
107
|
+
/**
|
|
108
|
+
* @generated from protobuf field: int32 user_id = 2;
|
|
109
|
+
*/
|
|
110
|
+
userId: number; // @gotags: sql:"primary_key" alias:"user_id"
|
|
111
|
+
/**
|
|
112
|
+
* @generated from protobuf field: optional resources.jobs.Colleague user = 3;
|
|
113
|
+
*/
|
|
114
|
+
user?: Colleague;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @generated from protobuf message resources.centrum.UnitStatus
|
|
118
|
+
*/
|
|
119
|
+
export interface UnitStatus {
|
|
120
|
+
/**
|
|
121
|
+
* @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
|
|
122
|
+
*/
|
|
123
|
+
id: string; // @gotags: sql:"primary_key" alias:"id"
|
|
124
|
+
/**
|
|
125
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
|
|
126
|
+
*/
|
|
127
|
+
createdAt?: Timestamp;
|
|
128
|
+
/**
|
|
129
|
+
* @generated from protobuf field: uint64 unit_id = 3 [jstype = JS_STRING];
|
|
130
|
+
*/
|
|
131
|
+
unitId: string;
|
|
132
|
+
/**
|
|
133
|
+
* @generated from protobuf field: optional resources.centrum.Unit unit = 4;
|
|
134
|
+
*/
|
|
135
|
+
unit?: Unit;
|
|
136
|
+
/**
|
|
137
|
+
* @generated from protobuf field: resources.centrum.StatusUnit status = 5;
|
|
138
|
+
*/
|
|
139
|
+
status: StatusUnit;
|
|
140
|
+
/**
|
|
141
|
+
* @sanitize
|
|
142
|
+
*
|
|
143
|
+
* @generated from protobuf field: optional string reason = 6;
|
|
144
|
+
*/
|
|
145
|
+
reason?: string;
|
|
146
|
+
/**
|
|
147
|
+
* @sanitize
|
|
148
|
+
*
|
|
149
|
+
* @generated from protobuf field: optional string code = 7;
|
|
150
|
+
*/
|
|
151
|
+
code?: string;
|
|
152
|
+
/**
|
|
153
|
+
* @generated from protobuf field: optional int32 user_id = 8;
|
|
154
|
+
*/
|
|
155
|
+
userId?: number;
|
|
156
|
+
/**
|
|
157
|
+
* @generated from protobuf field: optional resources.jobs.Colleague user = 9;
|
|
158
|
+
*/
|
|
159
|
+
user?: Colleague;
|
|
160
|
+
/**
|
|
161
|
+
* @generated from protobuf field: optional double x = 10;
|
|
162
|
+
*/
|
|
163
|
+
x?: number;
|
|
164
|
+
/**
|
|
165
|
+
* @generated from protobuf field: optional double y = 11;
|
|
166
|
+
*/
|
|
167
|
+
y?: number;
|
|
168
|
+
/**
|
|
169
|
+
* @sanitize
|
|
170
|
+
*
|
|
171
|
+
* @generated from protobuf field: optional string postal = 12;
|
|
172
|
+
*/
|
|
173
|
+
postal?: string;
|
|
174
|
+
/**
|
|
175
|
+
* @generated from protobuf field: optional int32 creator_id = 13;
|
|
176
|
+
*/
|
|
177
|
+
creatorId?: number;
|
|
178
|
+
/**
|
|
179
|
+
* @generated from protobuf field: optional resources.jobs.Colleague creator = 14;
|
|
180
|
+
*/
|
|
181
|
+
creator?: Colleague;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* @generated from protobuf enum resources.centrum.StatusUnit
|
|
185
|
+
*/
|
|
186
|
+
export enum StatusUnit {
|
|
187
|
+
/**
|
|
188
|
+
* @generated from protobuf enum value: STATUS_UNIT_UNSPECIFIED = 0;
|
|
189
|
+
*/
|
|
190
|
+
UNSPECIFIED = 0,
|
|
191
|
+
/**
|
|
192
|
+
* @generated from protobuf enum value: STATUS_UNIT_UNKNOWN = 1;
|
|
193
|
+
*/
|
|
194
|
+
UNKNOWN = 1,
|
|
195
|
+
/**
|
|
196
|
+
* @generated from protobuf enum value: STATUS_UNIT_USER_ADDED = 2;
|
|
197
|
+
*/
|
|
198
|
+
USER_ADDED = 2,
|
|
199
|
+
/**
|
|
200
|
+
* @generated from protobuf enum value: STATUS_UNIT_USER_REMOVED = 3;
|
|
201
|
+
*/
|
|
202
|
+
USER_REMOVED = 3,
|
|
203
|
+
/**
|
|
204
|
+
* @generated from protobuf enum value: STATUS_UNIT_UNAVAILABLE = 4;
|
|
205
|
+
*/
|
|
206
|
+
UNAVAILABLE = 4,
|
|
207
|
+
/**
|
|
208
|
+
* @generated from protobuf enum value: STATUS_UNIT_AVAILABLE = 5;
|
|
209
|
+
*/
|
|
210
|
+
AVAILABLE = 5,
|
|
211
|
+
/**
|
|
212
|
+
* @generated from protobuf enum value: STATUS_UNIT_ON_BREAK = 6;
|
|
213
|
+
*/
|
|
214
|
+
ON_BREAK = 6,
|
|
215
|
+
/**
|
|
216
|
+
* @generated from protobuf enum value: STATUS_UNIT_BUSY = 7;
|
|
217
|
+
*/
|
|
218
|
+
BUSY = 7
|
|
219
|
+
}
|
|
220
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
221
|
+
class Unit$Type extends MessageType<Unit> {
|
|
222
|
+
constructor() {
|
|
223
|
+
super("resources.centrum.Unit", [
|
|
224
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
225
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
226
|
+
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
227
|
+
{ no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
|
|
228
|
+
{ no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "24" } } } },
|
|
229
|
+
{ no: 6, name: "initials", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "2", maxLen: "4" } } } },
|
|
230
|
+
{ no: 7, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { len: "7", pattern: "^#[A-Fa-f0-9]{6}$" } } } },
|
|
231
|
+
{ no: 8, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
|
|
232
|
+
{ no: 9, name: "status", kind: "message", T: () => UnitStatus },
|
|
233
|
+
{ no: 11, name: "users", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => UnitAssignment },
|
|
234
|
+
{ no: 12, name: "attributes", kind: "message", T: () => Attributes },
|
|
235
|
+
{ no: 13, name: "home_postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "48" } } } },
|
|
236
|
+
{ no: 14, name: "access", kind: "message", T: () => UnitAccess }
|
|
237
|
+
]);
|
|
238
|
+
}
|
|
239
|
+
create(value?: PartialMessage<Unit>): Unit {
|
|
240
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
241
|
+
message.id = "0";
|
|
242
|
+
message.job = "";
|
|
243
|
+
message.name = "";
|
|
244
|
+
message.initials = "";
|
|
245
|
+
message.color = "";
|
|
246
|
+
message.users = [];
|
|
247
|
+
if (value !== undefined)
|
|
248
|
+
reflectionMergePartial<Unit>(this, message, value);
|
|
249
|
+
return message;
|
|
250
|
+
}
|
|
251
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Unit): Unit {
|
|
252
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
253
|
+
while (reader.pos < end) {
|
|
254
|
+
let [fieldNo, wireType] = reader.tag();
|
|
255
|
+
switch (fieldNo) {
|
|
256
|
+
case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
|
|
257
|
+
message.id = reader.uint64().toString();
|
|
258
|
+
break;
|
|
259
|
+
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
260
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
261
|
+
break;
|
|
262
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 3:
|
|
263
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
264
|
+
break;
|
|
265
|
+
case /* string job */ 4:
|
|
266
|
+
message.job = reader.string();
|
|
267
|
+
break;
|
|
268
|
+
case /* string name */ 5:
|
|
269
|
+
message.name = reader.string();
|
|
270
|
+
break;
|
|
271
|
+
case /* string initials */ 6:
|
|
272
|
+
message.initials = reader.string();
|
|
273
|
+
break;
|
|
274
|
+
case /* string color */ 7:
|
|
275
|
+
message.color = reader.string();
|
|
276
|
+
break;
|
|
277
|
+
case /* optional string description */ 8:
|
|
278
|
+
message.description = reader.string();
|
|
279
|
+
break;
|
|
280
|
+
case /* optional resources.centrum.UnitStatus status */ 9:
|
|
281
|
+
message.status = UnitStatus.internalBinaryRead(reader, reader.uint32(), options, message.status);
|
|
282
|
+
break;
|
|
283
|
+
case /* repeated resources.centrum.UnitAssignment users */ 11:
|
|
284
|
+
message.users.push(UnitAssignment.internalBinaryRead(reader, reader.uint32(), options));
|
|
285
|
+
break;
|
|
286
|
+
case /* optional resources.centrum.Attributes attributes */ 12:
|
|
287
|
+
message.attributes = Attributes.internalBinaryRead(reader, reader.uint32(), options, message.attributes);
|
|
288
|
+
break;
|
|
289
|
+
case /* optional string home_postal */ 13:
|
|
290
|
+
message.homePostal = reader.string();
|
|
291
|
+
break;
|
|
292
|
+
case /* resources.centrum.UnitAccess access */ 14:
|
|
293
|
+
message.access = UnitAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
|
|
294
|
+
break;
|
|
295
|
+
default:
|
|
296
|
+
let u = options.readUnknownField;
|
|
297
|
+
if (u === "throw")
|
|
298
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
299
|
+
let d = reader.skip(wireType);
|
|
300
|
+
if (u !== false)
|
|
301
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return message;
|
|
305
|
+
}
|
|
306
|
+
internalBinaryWrite(message: Unit, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
307
|
+
/* uint64 id = 1 [jstype = JS_STRING]; */
|
|
308
|
+
if (message.id !== "0")
|
|
309
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
310
|
+
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
311
|
+
if (message.createdAt)
|
|
312
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
313
|
+
/* optional resources.timestamp.Timestamp updated_at = 3; */
|
|
314
|
+
if (message.updatedAt)
|
|
315
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
316
|
+
/* string job = 4; */
|
|
317
|
+
if (message.job !== "")
|
|
318
|
+
writer.tag(4, WireType.LengthDelimited).string(message.job);
|
|
319
|
+
/* string name = 5; */
|
|
320
|
+
if (message.name !== "")
|
|
321
|
+
writer.tag(5, WireType.LengthDelimited).string(message.name);
|
|
322
|
+
/* string initials = 6; */
|
|
323
|
+
if (message.initials !== "")
|
|
324
|
+
writer.tag(6, WireType.LengthDelimited).string(message.initials);
|
|
325
|
+
/* string color = 7; */
|
|
326
|
+
if (message.color !== "")
|
|
327
|
+
writer.tag(7, WireType.LengthDelimited).string(message.color);
|
|
328
|
+
/* optional string description = 8; */
|
|
329
|
+
if (message.description !== undefined)
|
|
330
|
+
writer.tag(8, WireType.LengthDelimited).string(message.description);
|
|
331
|
+
/* optional resources.centrum.UnitStatus status = 9; */
|
|
332
|
+
if (message.status)
|
|
333
|
+
UnitStatus.internalBinaryWrite(message.status, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
334
|
+
/* repeated resources.centrum.UnitAssignment users = 11; */
|
|
335
|
+
for (let i = 0; i < message.users.length; i++)
|
|
336
|
+
UnitAssignment.internalBinaryWrite(message.users[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
337
|
+
/* optional resources.centrum.Attributes attributes = 12; */
|
|
338
|
+
if (message.attributes)
|
|
339
|
+
Attributes.internalBinaryWrite(message.attributes, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
340
|
+
/* optional string home_postal = 13; */
|
|
341
|
+
if (message.homePostal !== undefined)
|
|
342
|
+
writer.tag(13, WireType.LengthDelimited).string(message.homePostal);
|
|
343
|
+
/* resources.centrum.UnitAccess access = 14; */
|
|
344
|
+
if (message.access)
|
|
345
|
+
UnitAccess.internalBinaryWrite(message.access, writer.tag(14, 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 resources.centrum.Unit
|
|
354
|
+
*/
|
|
355
|
+
export const Unit = new Unit$Type();
|
|
356
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
357
|
+
class UnitAssignments$Type extends MessageType<UnitAssignments> {
|
|
358
|
+
constructor() {
|
|
359
|
+
super("resources.centrum.UnitAssignments", [
|
|
360
|
+
{ no: 1, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
361
|
+
{ no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
|
|
362
|
+
{ no: 3, name: "users", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => UnitAssignment }
|
|
363
|
+
]);
|
|
364
|
+
}
|
|
365
|
+
create(value?: PartialMessage<UnitAssignments>): UnitAssignments {
|
|
366
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
367
|
+
message.unitId = "0";
|
|
368
|
+
message.job = "";
|
|
369
|
+
message.users = [];
|
|
370
|
+
if (value !== undefined)
|
|
371
|
+
reflectionMergePartial<UnitAssignments>(this, message, value);
|
|
372
|
+
return message;
|
|
373
|
+
}
|
|
374
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnitAssignments): UnitAssignments {
|
|
375
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
376
|
+
while (reader.pos < end) {
|
|
377
|
+
let [fieldNo, wireType] = reader.tag();
|
|
378
|
+
switch (fieldNo) {
|
|
379
|
+
case /* uint64 unit_id = 1 [jstype = JS_STRING];*/ 1:
|
|
380
|
+
message.unitId = reader.uint64().toString();
|
|
381
|
+
break;
|
|
382
|
+
case /* string job */ 2:
|
|
383
|
+
message.job = reader.string();
|
|
384
|
+
break;
|
|
385
|
+
case /* repeated resources.centrum.UnitAssignment users */ 3:
|
|
386
|
+
message.users.push(UnitAssignment.internalBinaryRead(reader, reader.uint32(), options));
|
|
387
|
+
break;
|
|
388
|
+
default:
|
|
389
|
+
let u = options.readUnknownField;
|
|
390
|
+
if (u === "throw")
|
|
391
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
392
|
+
let d = reader.skip(wireType);
|
|
393
|
+
if (u !== false)
|
|
394
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
return message;
|
|
398
|
+
}
|
|
399
|
+
internalBinaryWrite(message: UnitAssignments, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
400
|
+
/* uint64 unit_id = 1 [jstype = JS_STRING]; */
|
|
401
|
+
if (message.unitId !== "0")
|
|
402
|
+
writer.tag(1, WireType.Varint).uint64(message.unitId);
|
|
403
|
+
/* string job = 2; */
|
|
404
|
+
if (message.job !== "")
|
|
405
|
+
writer.tag(2, WireType.LengthDelimited).string(message.job);
|
|
406
|
+
/* repeated resources.centrum.UnitAssignment users = 3; */
|
|
407
|
+
for (let i = 0; i < message.users.length; i++)
|
|
408
|
+
UnitAssignment.internalBinaryWrite(message.users[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
409
|
+
let u = options.writeUnknownFields;
|
|
410
|
+
if (u !== false)
|
|
411
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
412
|
+
return writer;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* @generated MessageType for protobuf message resources.centrum.UnitAssignments
|
|
417
|
+
*/
|
|
418
|
+
export const UnitAssignments = new UnitAssignments$Type();
|
|
419
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
420
|
+
class UnitAssignment$Type extends MessageType<UnitAssignment> {
|
|
421
|
+
constructor() {
|
|
422
|
+
super("resources.centrum.UnitAssignment", [
|
|
423
|
+
{ no: 1, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
424
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
|
|
425
|
+
{ no: 3, name: "user", kind: "message", T: () => Colleague }
|
|
426
|
+
]);
|
|
427
|
+
}
|
|
428
|
+
create(value?: PartialMessage<UnitAssignment>): UnitAssignment {
|
|
429
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
430
|
+
message.unitId = "0";
|
|
431
|
+
message.userId = 0;
|
|
432
|
+
if (value !== undefined)
|
|
433
|
+
reflectionMergePartial<UnitAssignment>(this, message, value);
|
|
434
|
+
return message;
|
|
435
|
+
}
|
|
436
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnitAssignment): UnitAssignment {
|
|
437
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
438
|
+
while (reader.pos < end) {
|
|
439
|
+
let [fieldNo, wireType] = reader.tag();
|
|
440
|
+
switch (fieldNo) {
|
|
441
|
+
case /* uint64 unit_id = 1 [jstype = JS_STRING];*/ 1:
|
|
442
|
+
message.unitId = reader.uint64().toString();
|
|
443
|
+
break;
|
|
444
|
+
case /* int32 user_id */ 2:
|
|
445
|
+
message.userId = reader.int32();
|
|
446
|
+
break;
|
|
447
|
+
case /* optional resources.jobs.Colleague user */ 3:
|
|
448
|
+
message.user = Colleague.internalBinaryRead(reader, reader.uint32(), options, message.user);
|
|
449
|
+
break;
|
|
450
|
+
default:
|
|
451
|
+
let u = options.readUnknownField;
|
|
452
|
+
if (u === "throw")
|
|
453
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
454
|
+
let d = reader.skip(wireType);
|
|
455
|
+
if (u !== false)
|
|
456
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return message;
|
|
460
|
+
}
|
|
461
|
+
internalBinaryWrite(message: UnitAssignment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
462
|
+
/* uint64 unit_id = 1 [jstype = JS_STRING]; */
|
|
463
|
+
if (message.unitId !== "0")
|
|
464
|
+
writer.tag(1, WireType.Varint).uint64(message.unitId);
|
|
465
|
+
/* int32 user_id = 2; */
|
|
466
|
+
if (message.userId !== 0)
|
|
467
|
+
writer.tag(2, WireType.Varint).int32(message.userId);
|
|
468
|
+
/* optional resources.jobs.Colleague user = 3; */
|
|
469
|
+
if (message.user)
|
|
470
|
+
Colleague.internalBinaryWrite(message.user, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
471
|
+
let u = options.writeUnknownFields;
|
|
472
|
+
if (u !== false)
|
|
473
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
474
|
+
return writer;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* @generated MessageType for protobuf message resources.centrum.UnitAssignment
|
|
479
|
+
*/
|
|
480
|
+
export const UnitAssignment = new UnitAssignment$Type();
|
|
481
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
482
|
+
class UnitStatus$Type extends MessageType<UnitStatus> {
|
|
483
|
+
constructor() {
|
|
484
|
+
super("resources.centrum.UnitStatus", [
|
|
485
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
486
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
487
|
+
{ no: 3, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
488
|
+
{ no: 4, name: "unit", kind: "message", T: () => Unit },
|
|
489
|
+
{ no: 5, name: "status", kind: "enum", T: () => ["resources.centrum.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
|
|
490
|
+
{ no: 6, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
|
|
491
|
+
{ no: 7, name: "code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
|
|
492
|
+
{ no: 8, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
|
|
493
|
+
{ no: 9, name: "user", kind: "message", T: () => Colleague },
|
|
494
|
+
{ no: 10, name: "x", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ },
|
|
495
|
+
{ no: 11, name: "y", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ },
|
|
496
|
+
{ no: 12, name: "postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "48" } } } },
|
|
497
|
+
{ no: 13, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
|
|
498
|
+
{ no: 14, name: "creator", kind: "message", T: () => Colleague }
|
|
499
|
+
]);
|
|
500
|
+
}
|
|
501
|
+
create(value?: PartialMessage<UnitStatus>): UnitStatus {
|
|
502
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
503
|
+
message.id = "0";
|
|
504
|
+
message.unitId = "0";
|
|
505
|
+
message.status = 0;
|
|
506
|
+
if (value !== undefined)
|
|
507
|
+
reflectionMergePartial<UnitStatus>(this, message, value);
|
|
508
|
+
return message;
|
|
509
|
+
}
|
|
510
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnitStatus): UnitStatus {
|
|
511
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
512
|
+
while (reader.pos < end) {
|
|
513
|
+
let [fieldNo, wireType] = reader.tag();
|
|
514
|
+
switch (fieldNo) {
|
|
515
|
+
case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
|
|
516
|
+
message.id = reader.uint64().toString();
|
|
517
|
+
break;
|
|
518
|
+
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
519
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
520
|
+
break;
|
|
521
|
+
case /* uint64 unit_id = 3 [jstype = JS_STRING];*/ 3:
|
|
522
|
+
message.unitId = reader.uint64().toString();
|
|
523
|
+
break;
|
|
524
|
+
case /* optional resources.centrum.Unit unit */ 4:
|
|
525
|
+
message.unit = Unit.internalBinaryRead(reader, reader.uint32(), options, message.unit);
|
|
526
|
+
break;
|
|
527
|
+
case /* resources.centrum.StatusUnit status */ 5:
|
|
528
|
+
message.status = reader.int32();
|
|
529
|
+
break;
|
|
530
|
+
case /* optional string reason */ 6:
|
|
531
|
+
message.reason = reader.string();
|
|
532
|
+
break;
|
|
533
|
+
case /* optional string code */ 7:
|
|
534
|
+
message.code = reader.string();
|
|
535
|
+
break;
|
|
536
|
+
case /* optional int32 user_id */ 8:
|
|
537
|
+
message.userId = reader.int32();
|
|
538
|
+
break;
|
|
539
|
+
case /* optional resources.jobs.Colleague user */ 9:
|
|
540
|
+
message.user = Colleague.internalBinaryRead(reader, reader.uint32(), options, message.user);
|
|
541
|
+
break;
|
|
542
|
+
case /* optional double x */ 10:
|
|
543
|
+
message.x = reader.double();
|
|
544
|
+
break;
|
|
545
|
+
case /* optional double y */ 11:
|
|
546
|
+
message.y = reader.double();
|
|
547
|
+
break;
|
|
548
|
+
case /* optional string postal */ 12:
|
|
549
|
+
message.postal = reader.string();
|
|
550
|
+
break;
|
|
551
|
+
case /* optional int32 creator_id */ 13:
|
|
552
|
+
message.creatorId = reader.int32();
|
|
553
|
+
break;
|
|
554
|
+
case /* optional resources.jobs.Colleague creator */ 14:
|
|
555
|
+
message.creator = Colleague.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
556
|
+
break;
|
|
557
|
+
default:
|
|
558
|
+
let u = options.readUnknownField;
|
|
559
|
+
if (u === "throw")
|
|
560
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
561
|
+
let d = reader.skip(wireType);
|
|
562
|
+
if (u !== false)
|
|
563
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
return message;
|
|
567
|
+
}
|
|
568
|
+
internalBinaryWrite(message: UnitStatus, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
569
|
+
/* uint64 id = 1 [jstype = JS_STRING]; */
|
|
570
|
+
if (message.id !== "0")
|
|
571
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
572
|
+
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
573
|
+
if (message.createdAt)
|
|
574
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
575
|
+
/* uint64 unit_id = 3 [jstype = JS_STRING]; */
|
|
576
|
+
if (message.unitId !== "0")
|
|
577
|
+
writer.tag(3, WireType.Varint).uint64(message.unitId);
|
|
578
|
+
/* optional resources.centrum.Unit unit = 4; */
|
|
579
|
+
if (message.unit)
|
|
580
|
+
Unit.internalBinaryWrite(message.unit, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
581
|
+
/* resources.centrum.StatusUnit status = 5; */
|
|
582
|
+
if (message.status !== 0)
|
|
583
|
+
writer.tag(5, WireType.Varint).int32(message.status);
|
|
584
|
+
/* optional string reason = 6; */
|
|
585
|
+
if (message.reason !== undefined)
|
|
586
|
+
writer.tag(6, WireType.LengthDelimited).string(message.reason);
|
|
587
|
+
/* optional string code = 7; */
|
|
588
|
+
if (message.code !== undefined)
|
|
589
|
+
writer.tag(7, WireType.LengthDelimited).string(message.code);
|
|
590
|
+
/* optional int32 user_id = 8; */
|
|
591
|
+
if (message.userId !== undefined)
|
|
592
|
+
writer.tag(8, WireType.Varint).int32(message.userId);
|
|
593
|
+
/* optional resources.jobs.Colleague user = 9; */
|
|
594
|
+
if (message.user)
|
|
595
|
+
Colleague.internalBinaryWrite(message.user, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
596
|
+
/* optional double x = 10; */
|
|
597
|
+
if (message.x !== undefined)
|
|
598
|
+
writer.tag(10, WireType.Bit64).double(message.x);
|
|
599
|
+
/* optional double y = 11; */
|
|
600
|
+
if (message.y !== undefined)
|
|
601
|
+
writer.tag(11, WireType.Bit64).double(message.y);
|
|
602
|
+
/* optional string postal = 12; */
|
|
603
|
+
if (message.postal !== undefined)
|
|
604
|
+
writer.tag(12, WireType.LengthDelimited).string(message.postal);
|
|
605
|
+
/* optional int32 creator_id = 13; */
|
|
606
|
+
if (message.creatorId !== undefined)
|
|
607
|
+
writer.tag(13, WireType.Varint).int32(message.creatorId);
|
|
608
|
+
/* optional resources.jobs.Colleague creator = 14; */
|
|
609
|
+
if (message.creator)
|
|
610
|
+
Colleague.internalBinaryWrite(message.creator, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
|
611
|
+
let u = options.writeUnknownFields;
|
|
612
|
+
if (u !== false)
|
|
613
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
614
|
+
return writer;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* @generated MessageType for protobuf message resources.centrum.UnitStatus
|
|
619
|
+
*/
|
|
620
|
+
export const UnitStatus = new UnitStatus$Type();
|