@fivenet-app/gen 2026.3.0 → 2026.4.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 +6 -6
- package/codegen/perms/perms.ts +93 -1
- package/package.json +1 -1
- package/perms.ts +6 -5
- package/resources/centrum/settings/settings.ts +1 -1
- package/resources/centrum/units/units.ts +1 -1
- package/resources/citizens/labels/labels.ts +526 -0
- package/resources/{users → citizens}/licenses/licenses.ts +17 -17
- package/resources/clientconfig/clientconfig.ts +32 -289
- package/resources/cron/cron.ts +2 -2
- package/resources/documents/access/access.ts +0 -23
- package/resources/documents/category/category.ts +1 -1
- package/resources/documents/templates/templates.ts +2 -2
- package/resources/jobs/labels/labels.ts +16 -5
- package/resources/livemap/markers/marker_marker.ts +1 -1
- package/resources/settings/banner.ts +1 -1
- package/resources/settings/config.ts +16 -14
- package/resources/sync/data/data.ts +9 -9
- package/resources/users/activity/activity.ts +132 -12
- package/resources/users/props/props.ts +4 -4
- package/resources/users/user.ts +4 -4
- package/services/citizens/citizens.client.ts +0 -13
- package/services/citizens/citizens.ts +1 -115
- package/services/citizens/labels.client.ts +77 -0
- package/services/citizens/labels.ts +455 -0
- package/services/completor/completor.ts +5 -5
- package/services/documents/documents.ts +1 -1
- package/services/qualifications/qualifications.ts +1 -1
- package/services/settings/cron.client.ts +13 -0
- package/services/settings/cron.ts +114 -1
- package/services/sync/sync.client.ts +271 -37
- package/services/sync/sync.ts +1438 -381
- package/svcs.ts +29 -27
- package/resources/sync/data/v2/data.ts +0 -220
- package/resources/users/labels/labels.ts +0 -160
- package/services/sync/v2/sync.client.ts +0 -331
- package/services/sync/v2/sync.ts +0 -1766
|
@@ -0,0 +1,526 @@
|
|
|
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 "resources/citizens/labels/labels.proto" (package "resources.citizens.labels", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
+
import { Duration } from "../../../google/protobuf/duration";
|
|
15
|
+
import { Timestamp } from "../../timestamp/timestamp";
|
|
16
|
+
/**
|
|
17
|
+
* @generated from protobuf message resources.citizens.labels.Labels
|
|
18
|
+
*/
|
|
19
|
+
export interface Labels {
|
|
20
|
+
/**
|
|
21
|
+
* @generated from protobuf field: repeated resources.citizens.labels.Label list = 1
|
|
22
|
+
*/
|
|
23
|
+
list: Label[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @generated from protobuf message resources.citizens.labels.Label
|
|
27
|
+
*/
|
|
28
|
+
export interface Label {
|
|
29
|
+
/**
|
|
30
|
+
* @generated from protobuf field: int64 id = 1
|
|
31
|
+
*/
|
|
32
|
+
id: number;
|
|
33
|
+
/**
|
|
34
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
35
|
+
*/
|
|
36
|
+
createdAt?: Timestamp;
|
|
37
|
+
/**
|
|
38
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
39
|
+
*/
|
|
40
|
+
updatedAt?: Timestamp;
|
|
41
|
+
/**
|
|
42
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
43
|
+
*/
|
|
44
|
+
deletedAt?: Timestamp;
|
|
45
|
+
/**
|
|
46
|
+
* @generated from protobuf field: optional string job = 5
|
|
47
|
+
*/
|
|
48
|
+
job?: string;
|
|
49
|
+
/**
|
|
50
|
+
* @generated from protobuf field: string name = 6
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
/**
|
|
54
|
+
* @generated from protobuf field: string color = 7
|
|
55
|
+
*/
|
|
56
|
+
color: string;
|
|
57
|
+
/**
|
|
58
|
+
* @generated from protobuf field: optional string icon = 8
|
|
59
|
+
*/
|
|
60
|
+
icon?: string;
|
|
61
|
+
/**
|
|
62
|
+
* @generated from protobuf field: optional resources.citizens.labels.Settings settings = 9
|
|
63
|
+
*/
|
|
64
|
+
settings?: Settings;
|
|
65
|
+
/**
|
|
66
|
+
* @generated from protobuf field: optional resources.citizens.labels.Access access = 10
|
|
67
|
+
*/
|
|
68
|
+
access?: Access;
|
|
69
|
+
/**
|
|
70
|
+
* Citizen label assignment data
|
|
71
|
+
*
|
|
72
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp expires_at = 11
|
|
73
|
+
*/
|
|
74
|
+
expiresAt?: Timestamp;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @generated from protobuf message resources.citizens.labels.Settings
|
|
78
|
+
*/
|
|
79
|
+
export interface Settings {
|
|
80
|
+
/**
|
|
81
|
+
* @generated from protobuf field: bool requires_expiration = 1
|
|
82
|
+
*/
|
|
83
|
+
requiresExpiration: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* @generated from protobuf field: optional google.protobuf.Duration min_duration = 2
|
|
86
|
+
*/
|
|
87
|
+
minDuration?: Duration;
|
|
88
|
+
/**
|
|
89
|
+
* @generated from protobuf field: optional google.protobuf.Duration max_duration = 3
|
|
90
|
+
*/
|
|
91
|
+
maxDuration?: Duration;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* @generated from protobuf message resources.citizens.labels.Access
|
|
95
|
+
*/
|
|
96
|
+
export interface Access {
|
|
97
|
+
/**
|
|
98
|
+
* @generated from protobuf field: repeated resources.citizens.labels.JobAccess jobs = 1
|
|
99
|
+
*/
|
|
100
|
+
jobs: JobAccess[];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* @generated from protobuf message resources.citizens.labels.JobAccess
|
|
104
|
+
*/
|
|
105
|
+
export interface JobAccess {
|
|
106
|
+
/**
|
|
107
|
+
* @generated from protobuf field: int64 id = 1
|
|
108
|
+
*/
|
|
109
|
+
id: number;
|
|
110
|
+
/**
|
|
111
|
+
* @generated from protobuf field: int64 target_id = 2
|
|
112
|
+
*/
|
|
113
|
+
targetId: number;
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf field: string job = 3
|
|
116
|
+
*/
|
|
117
|
+
job: string;
|
|
118
|
+
/**
|
|
119
|
+
* @generated from protobuf field: optional string job_label = 4
|
|
120
|
+
*/
|
|
121
|
+
jobLabel?: string;
|
|
122
|
+
/**
|
|
123
|
+
* @generated from protobuf field: int32 minimum_grade = 5
|
|
124
|
+
*/
|
|
125
|
+
minimumGrade: number;
|
|
126
|
+
/**
|
|
127
|
+
* @generated from protobuf field: optional string job_grade_label = 6
|
|
128
|
+
*/
|
|
129
|
+
jobGradeLabel?: string;
|
|
130
|
+
/**
|
|
131
|
+
* @generated from protobuf field: resources.citizens.labels.AccessLevel access = 7
|
|
132
|
+
*/
|
|
133
|
+
access: AccessLevel;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @generated from protobuf enum resources.citizens.labels.AccessLevel
|
|
137
|
+
*/
|
|
138
|
+
export enum AccessLevel {
|
|
139
|
+
/**
|
|
140
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_UNSPECIFIED = 0;
|
|
141
|
+
*/
|
|
142
|
+
UNSPECIFIED = 0,
|
|
143
|
+
/**
|
|
144
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_VIEW = 1;
|
|
145
|
+
*/
|
|
146
|
+
VIEW = 1,
|
|
147
|
+
/**
|
|
148
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_ADD = 2;
|
|
149
|
+
*/
|
|
150
|
+
ADD = 2,
|
|
151
|
+
/**
|
|
152
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_REMOVE = 3;
|
|
153
|
+
*/
|
|
154
|
+
REMOVE = 3,
|
|
155
|
+
/**
|
|
156
|
+
* @generated from protobuf enum value: ACCESS_LEVEL_EDIT = 4;
|
|
157
|
+
*/
|
|
158
|
+
EDIT = 4
|
|
159
|
+
}
|
|
160
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
161
|
+
class Labels$Type extends MessageType<Labels> {
|
|
162
|
+
constructor() {
|
|
163
|
+
super("resources.citizens.labels.Labels", [
|
|
164
|
+
{ no: 1, name: "list", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Label, options: { "buf.validate.field": { repeated: { maxItems: "10" } } } }
|
|
165
|
+
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
166
|
+
}
|
|
167
|
+
create(value?: PartialMessage<Labels>): Labels {
|
|
168
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
169
|
+
message.list = [];
|
|
170
|
+
if (value !== undefined)
|
|
171
|
+
reflectionMergePartial<Labels>(this, message, value);
|
|
172
|
+
return message;
|
|
173
|
+
}
|
|
174
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Labels): Labels {
|
|
175
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
176
|
+
while (reader.pos < end) {
|
|
177
|
+
let [fieldNo, wireType] = reader.tag();
|
|
178
|
+
switch (fieldNo) {
|
|
179
|
+
case /* repeated resources.citizens.labels.Label list */ 1:
|
|
180
|
+
message.list.push(Label.internalBinaryRead(reader, reader.uint32(), options));
|
|
181
|
+
break;
|
|
182
|
+
default:
|
|
183
|
+
let u = options.readUnknownField;
|
|
184
|
+
if (u === "throw")
|
|
185
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
186
|
+
let d = reader.skip(wireType);
|
|
187
|
+
if (u !== false)
|
|
188
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return message;
|
|
192
|
+
}
|
|
193
|
+
internalBinaryWrite(message: Labels, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
194
|
+
/* repeated resources.citizens.labels.Label list = 1; */
|
|
195
|
+
for (let i = 0; i < message.list.length; i++)
|
|
196
|
+
Label.internalBinaryWrite(message.list[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
197
|
+
let u = options.writeUnknownFields;
|
|
198
|
+
if (u !== false)
|
|
199
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
200
|
+
return writer;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* @generated MessageType for protobuf message resources.citizens.labels.Labels
|
|
205
|
+
*/
|
|
206
|
+
export const Labels = new Labels$Type();
|
|
207
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
208
|
+
class Label$Type extends MessageType<Label> {
|
|
209
|
+
constructor() {
|
|
210
|
+
super("resources.citizens.labels.Label", [
|
|
211
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
|
|
212
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
213
|
+
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
214
|
+
{ no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
215
|
+
{ no: 5, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
216
|
+
{ no: 6, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
217
|
+
{ no: 7, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { len: "7", pattern: "^#[A-Fa-f0-9]{6}$" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
218
|
+
{ no: 8, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
219
|
+
{ no: 9, name: "settings", kind: "message", T: () => Settings },
|
|
220
|
+
{ no: 10, name: "access", kind: "message", T: () => Access, options: { "buf.validate.field": { required: true } } },
|
|
221
|
+
{ no: 11, name: "expires_at", kind: "message", T: () => Timestamp }
|
|
222
|
+
]);
|
|
223
|
+
}
|
|
224
|
+
create(value?: PartialMessage<Label>): Label {
|
|
225
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
226
|
+
message.id = 0;
|
|
227
|
+
message.name = "";
|
|
228
|
+
message.color = "";
|
|
229
|
+
if (value !== undefined)
|
|
230
|
+
reflectionMergePartial<Label>(this, message, value);
|
|
231
|
+
return message;
|
|
232
|
+
}
|
|
233
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Label): Label {
|
|
234
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
235
|
+
while (reader.pos < end) {
|
|
236
|
+
let [fieldNo, wireType] = reader.tag();
|
|
237
|
+
switch (fieldNo) {
|
|
238
|
+
case /* int64 id */ 1:
|
|
239
|
+
message.id = reader.int64().toNumber();
|
|
240
|
+
break;
|
|
241
|
+
case /* resources.timestamp.Timestamp created_at */ 2:
|
|
242
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
243
|
+
break;
|
|
244
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 3:
|
|
245
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
246
|
+
break;
|
|
247
|
+
case /* optional resources.timestamp.Timestamp deleted_at */ 4:
|
|
248
|
+
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
249
|
+
break;
|
|
250
|
+
case /* optional string job */ 5:
|
|
251
|
+
message.job = reader.string();
|
|
252
|
+
break;
|
|
253
|
+
case /* string name */ 6:
|
|
254
|
+
message.name = reader.string();
|
|
255
|
+
break;
|
|
256
|
+
case /* string color */ 7:
|
|
257
|
+
message.color = reader.string();
|
|
258
|
+
break;
|
|
259
|
+
case /* optional string icon */ 8:
|
|
260
|
+
message.icon = reader.string();
|
|
261
|
+
break;
|
|
262
|
+
case /* optional resources.citizens.labels.Settings settings */ 9:
|
|
263
|
+
message.settings = Settings.internalBinaryRead(reader, reader.uint32(), options, message.settings);
|
|
264
|
+
break;
|
|
265
|
+
case /* optional resources.citizens.labels.Access access */ 10:
|
|
266
|
+
message.access = Access.internalBinaryRead(reader, reader.uint32(), options, message.access);
|
|
267
|
+
break;
|
|
268
|
+
case /* optional resources.timestamp.Timestamp expires_at */ 11:
|
|
269
|
+
message.expiresAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt);
|
|
270
|
+
break;
|
|
271
|
+
default:
|
|
272
|
+
let u = options.readUnknownField;
|
|
273
|
+
if (u === "throw")
|
|
274
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
275
|
+
let d = reader.skip(wireType);
|
|
276
|
+
if (u !== false)
|
|
277
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return message;
|
|
281
|
+
}
|
|
282
|
+
internalBinaryWrite(message: Label, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
283
|
+
/* int64 id = 1; */
|
|
284
|
+
if (message.id !== 0)
|
|
285
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
286
|
+
/* resources.timestamp.Timestamp created_at = 2; */
|
|
287
|
+
if (message.createdAt)
|
|
288
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
289
|
+
/* optional resources.timestamp.Timestamp updated_at = 3; */
|
|
290
|
+
if (message.updatedAt)
|
|
291
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
292
|
+
/* optional resources.timestamp.Timestamp deleted_at = 4; */
|
|
293
|
+
if (message.deletedAt)
|
|
294
|
+
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
295
|
+
/* optional string job = 5; */
|
|
296
|
+
if (message.job !== undefined)
|
|
297
|
+
writer.tag(5, WireType.LengthDelimited).string(message.job);
|
|
298
|
+
/* string name = 6; */
|
|
299
|
+
if (message.name !== "")
|
|
300
|
+
writer.tag(6, WireType.LengthDelimited).string(message.name);
|
|
301
|
+
/* string color = 7; */
|
|
302
|
+
if (message.color !== "")
|
|
303
|
+
writer.tag(7, WireType.LengthDelimited).string(message.color);
|
|
304
|
+
/* optional string icon = 8; */
|
|
305
|
+
if (message.icon !== undefined)
|
|
306
|
+
writer.tag(8, WireType.LengthDelimited).string(message.icon);
|
|
307
|
+
/* optional resources.citizens.labels.Settings settings = 9; */
|
|
308
|
+
if (message.settings)
|
|
309
|
+
Settings.internalBinaryWrite(message.settings, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
310
|
+
/* optional resources.citizens.labels.Access access = 10; */
|
|
311
|
+
if (message.access)
|
|
312
|
+
Access.internalBinaryWrite(message.access, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
313
|
+
/* optional resources.timestamp.Timestamp expires_at = 11; */
|
|
314
|
+
if (message.expiresAt)
|
|
315
|
+
Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
316
|
+
let u = options.writeUnknownFields;
|
|
317
|
+
if (u !== false)
|
|
318
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
319
|
+
return writer;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* @generated MessageType for protobuf message resources.citizens.labels.Label
|
|
324
|
+
*/
|
|
325
|
+
export const Label = new Label$Type();
|
|
326
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
327
|
+
class Settings$Type extends MessageType<Settings> {
|
|
328
|
+
constructor() {
|
|
329
|
+
super("resources.citizens.labels.Settings", [
|
|
330
|
+
{ no: 1, name: "requires_expiration", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
331
|
+
{ no: 2, name: "min_duration", kind: "message", T: () => Duration, options: { "buf.validate.field": { duration: { lte: { seconds: "157680000" }, gte: { seconds: "900" } } } } },
|
|
332
|
+
{ no: 3, name: "max_duration", kind: "message", T: () => Duration, options: { "buf.validate.field": { duration: { lte: { seconds: "157680000" }, gte: { seconds: "900" } } } } }
|
|
333
|
+
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
334
|
+
}
|
|
335
|
+
create(value?: PartialMessage<Settings>): Settings {
|
|
336
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
337
|
+
message.requiresExpiration = false;
|
|
338
|
+
if (value !== undefined)
|
|
339
|
+
reflectionMergePartial<Settings>(this, message, value);
|
|
340
|
+
return message;
|
|
341
|
+
}
|
|
342
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Settings): Settings {
|
|
343
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
344
|
+
while (reader.pos < end) {
|
|
345
|
+
let [fieldNo, wireType] = reader.tag();
|
|
346
|
+
switch (fieldNo) {
|
|
347
|
+
case /* bool requires_expiration */ 1:
|
|
348
|
+
message.requiresExpiration = reader.bool();
|
|
349
|
+
break;
|
|
350
|
+
case /* optional google.protobuf.Duration min_duration */ 2:
|
|
351
|
+
message.minDuration = Duration.internalBinaryRead(reader, reader.uint32(), options, message.minDuration);
|
|
352
|
+
break;
|
|
353
|
+
case /* optional google.protobuf.Duration max_duration */ 3:
|
|
354
|
+
message.maxDuration = Duration.internalBinaryRead(reader, reader.uint32(), options, message.maxDuration);
|
|
355
|
+
break;
|
|
356
|
+
default:
|
|
357
|
+
let u = options.readUnknownField;
|
|
358
|
+
if (u === "throw")
|
|
359
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
360
|
+
let d = reader.skip(wireType);
|
|
361
|
+
if (u !== false)
|
|
362
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return message;
|
|
366
|
+
}
|
|
367
|
+
internalBinaryWrite(message: Settings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
368
|
+
/* bool requires_expiration = 1; */
|
|
369
|
+
if (message.requiresExpiration !== false)
|
|
370
|
+
writer.tag(1, WireType.Varint).bool(message.requiresExpiration);
|
|
371
|
+
/* optional google.protobuf.Duration min_duration = 2; */
|
|
372
|
+
if (message.minDuration)
|
|
373
|
+
Duration.internalBinaryWrite(message.minDuration, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
374
|
+
/* optional google.protobuf.Duration max_duration = 3; */
|
|
375
|
+
if (message.maxDuration)
|
|
376
|
+
Duration.internalBinaryWrite(message.maxDuration, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
377
|
+
let u = options.writeUnknownFields;
|
|
378
|
+
if (u !== false)
|
|
379
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
380
|
+
return writer;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* @generated MessageType for protobuf message resources.citizens.labels.Settings
|
|
385
|
+
*/
|
|
386
|
+
export const Settings = new Settings$Type();
|
|
387
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
388
|
+
class Access$Type extends MessageType<Access> {
|
|
389
|
+
constructor() {
|
|
390
|
+
super("resources.citizens.labels.Access", [
|
|
391
|
+
{ no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => JobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"job_access\"" } }
|
|
392
|
+
]);
|
|
393
|
+
}
|
|
394
|
+
create(value?: PartialMessage<Access>): Access {
|
|
395
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
396
|
+
message.jobs = [];
|
|
397
|
+
if (value !== undefined)
|
|
398
|
+
reflectionMergePartial<Access>(this, message, value);
|
|
399
|
+
return message;
|
|
400
|
+
}
|
|
401
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Access): Access {
|
|
402
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
403
|
+
while (reader.pos < end) {
|
|
404
|
+
let [fieldNo, wireType] = reader.tag();
|
|
405
|
+
switch (fieldNo) {
|
|
406
|
+
case /* repeated resources.citizens.labels.JobAccess jobs */ 1:
|
|
407
|
+
message.jobs.push(JobAccess.internalBinaryRead(reader, reader.uint32(), options));
|
|
408
|
+
break;
|
|
409
|
+
default:
|
|
410
|
+
let u = options.readUnknownField;
|
|
411
|
+
if (u === "throw")
|
|
412
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
413
|
+
let d = reader.skip(wireType);
|
|
414
|
+
if (u !== false)
|
|
415
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
return message;
|
|
419
|
+
}
|
|
420
|
+
internalBinaryWrite(message: Access, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
421
|
+
/* repeated resources.citizens.labels.JobAccess jobs = 1; */
|
|
422
|
+
for (let i = 0; i < message.jobs.length; i++)
|
|
423
|
+
JobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
424
|
+
let u = options.writeUnknownFields;
|
|
425
|
+
if (u !== false)
|
|
426
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
427
|
+
return writer;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* @generated MessageType for protobuf message resources.citizens.labels.Access
|
|
432
|
+
*/
|
|
433
|
+
export const Access = new Access$Type();
|
|
434
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
435
|
+
class JobAccess$Type extends MessageType<JobAccess> {
|
|
436
|
+
constructor() {
|
|
437
|
+
super("resources.citizens.labels.JobAccess", [
|
|
438
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\"" } },
|
|
439
|
+
{ no: 2, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
440
|
+
{ no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
441
|
+
{ no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
442
|
+
{ no: 5, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
443
|
+
{ no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
444
|
+
{ no: 7, name: "access", kind: "enum", T: () => ["resources.citizens.labels.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
|
|
445
|
+
]);
|
|
446
|
+
}
|
|
447
|
+
create(value?: PartialMessage<JobAccess>): JobAccess {
|
|
448
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
449
|
+
message.id = 0;
|
|
450
|
+
message.targetId = 0;
|
|
451
|
+
message.job = "";
|
|
452
|
+
message.minimumGrade = 0;
|
|
453
|
+
message.access = 0;
|
|
454
|
+
if (value !== undefined)
|
|
455
|
+
reflectionMergePartial<JobAccess>(this, message, value);
|
|
456
|
+
return message;
|
|
457
|
+
}
|
|
458
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JobAccess): JobAccess {
|
|
459
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
460
|
+
while (reader.pos < end) {
|
|
461
|
+
let [fieldNo, wireType] = reader.tag();
|
|
462
|
+
switch (fieldNo) {
|
|
463
|
+
case /* int64 id */ 1:
|
|
464
|
+
message.id = reader.int64().toNumber();
|
|
465
|
+
break;
|
|
466
|
+
case /* int64 target_id */ 2:
|
|
467
|
+
message.targetId = reader.int64().toNumber();
|
|
468
|
+
break;
|
|
469
|
+
case /* string job */ 3:
|
|
470
|
+
message.job = reader.string();
|
|
471
|
+
break;
|
|
472
|
+
case /* optional string job_label */ 4:
|
|
473
|
+
message.jobLabel = reader.string();
|
|
474
|
+
break;
|
|
475
|
+
case /* int32 minimum_grade */ 5:
|
|
476
|
+
message.minimumGrade = reader.int32();
|
|
477
|
+
break;
|
|
478
|
+
case /* optional string job_grade_label */ 6:
|
|
479
|
+
message.jobGradeLabel = reader.string();
|
|
480
|
+
break;
|
|
481
|
+
case /* resources.citizens.labels.AccessLevel access */ 7:
|
|
482
|
+
message.access = reader.int32();
|
|
483
|
+
break;
|
|
484
|
+
default:
|
|
485
|
+
let u = options.readUnknownField;
|
|
486
|
+
if (u === "throw")
|
|
487
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
488
|
+
let d = reader.skip(wireType);
|
|
489
|
+
if (u !== false)
|
|
490
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
return message;
|
|
494
|
+
}
|
|
495
|
+
internalBinaryWrite(message: JobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
496
|
+
/* int64 id = 1; */
|
|
497
|
+
if (message.id !== 0)
|
|
498
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
499
|
+
/* int64 target_id = 2; */
|
|
500
|
+
if (message.targetId !== 0)
|
|
501
|
+
writer.tag(2, WireType.Varint).int64(message.targetId);
|
|
502
|
+
/* string job = 3; */
|
|
503
|
+
if (message.job !== "")
|
|
504
|
+
writer.tag(3, WireType.LengthDelimited).string(message.job);
|
|
505
|
+
/* optional string job_label = 4; */
|
|
506
|
+
if (message.jobLabel !== undefined)
|
|
507
|
+
writer.tag(4, WireType.LengthDelimited).string(message.jobLabel);
|
|
508
|
+
/* int32 minimum_grade = 5; */
|
|
509
|
+
if (message.minimumGrade !== 0)
|
|
510
|
+
writer.tag(5, WireType.Varint).int32(message.minimumGrade);
|
|
511
|
+
/* optional string job_grade_label = 6; */
|
|
512
|
+
if (message.jobGradeLabel !== undefined)
|
|
513
|
+
writer.tag(6, WireType.LengthDelimited).string(message.jobGradeLabel);
|
|
514
|
+
/* resources.citizens.labels.AccessLevel access = 7; */
|
|
515
|
+
if (message.access !== 0)
|
|
516
|
+
writer.tag(7, WireType.Varint).int32(message.access);
|
|
517
|
+
let u = options.writeUnknownFields;
|
|
518
|
+
if (u !== false)
|
|
519
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
520
|
+
return writer;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* @generated MessageType for protobuf message resources.citizens.labels.JobAccess
|
|
525
|
+
*/
|
|
526
|
+
export const JobAccess = new JobAccess$Type();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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 "resources/
|
|
2
|
+
// @generated from protobuf file "resources/citizens/licenses/licenses.proto" (package "resources.citizens.licenses", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
@@ -12,7 +12,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
|
12
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
14
|
/**
|
|
15
|
-
* @generated from protobuf message resources.
|
|
15
|
+
* @generated from protobuf message resources.citizens.licenses.License
|
|
16
16
|
*/
|
|
17
17
|
export interface License {
|
|
18
18
|
/**
|
|
@@ -25,22 +25,22 @@ export interface License {
|
|
|
25
25
|
label: string;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* @generated from protobuf message resources.
|
|
28
|
+
* @generated from protobuf message resources.citizens.licenses.Licenses
|
|
29
29
|
*/
|
|
30
|
-
export interface
|
|
30
|
+
export interface Licenses {
|
|
31
31
|
/**
|
|
32
32
|
* @generated from protobuf field: int32 user_id = 1
|
|
33
33
|
*/
|
|
34
34
|
userId: number;
|
|
35
35
|
/**
|
|
36
|
-
* @generated from protobuf field: repeated resources.
|
|
36
|
+
* @generated from protobuf field: repeated resources.citizens.licenses.License licenses = 2
|
|
37
37
|
*/
|
|
38
38
|
licenses: License[];
|
|
39
39
|
}
|
|
40
40
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
41
41
|
class License$Type extends MessageType<License> {
|
|
42
42
|
constructor() {
|
|
43
|
-
super("resources.
|
|
43
|
+
super("resources.citizens.licenses.License", [
|
|
44
44
|
{ no: 1, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "60" } } } },
|
|
45
45
|
{ no: 2, name: "label", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "60" } } } }
|
|
46
46
|
]);
|
|
@@ -89,26 +89,26 @@ class License$Type extends MessageType<License> {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
|
-
* @generated MessageType for protobuf message resources.
|
|
92
|
+
* @generated MessageType for protobuf message resources.citizens.licenses.License
|
|
93
93
|
*/
|
|
94
94
|
export const License = new License$Type();
|
|
95
95
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
96
|
-
class
|
|
96
|
+
class Licenses$Type extends MessageType<Licenses> {
|
|
97
97
|
constructor() {
|
|
98
|
-
super("resources.
|
|
98
|
+
super("resources.citizens.licenses.Licenses", [
|
|
99
99
|
{ no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
100
100
|
{ no: 2, name: "licenses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => License }
|
|
101
101
|
]);
|
|
102
102
|
}
|
|
103
|
-
create(value?: PartialMessage<
|
|
103
|
+
create(value?: PartialMessage<Licenses>): Licenses {
|
|
104
104
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
105
105
|
message.userId = 0;
|
|
106
106
|
message.licenses = [];
|
|
107
107
|
if (value !== undefined)
|
|
108
|
-
reflectionMergePartial<
|
|
108
|
+
reflectionMergePartial<Licenses>(this, message, value);
|
|
109
109
|
return message;
|
|
110
110
|
}
|
|
111
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?:
|
|
111
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Licenses): Licenses {
|
|
112
112
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
113
113
|
while (reader.pos < end) {
|
|
114
114
|
let [fieldNo, wireType] = reader.tag();
|
|
@@ -116,7 +116,7 @@ class CitizensLicenses$Type extends MessageType<CitizensLicenses> {
|
|
|
116
116
|
case /* int32 user_id */ 1:
|
|
117
117
|
message.userId = reader.int32();
|
|
118
118
|
break;
|
|
119
|
-
case /* repeated resources.
|
|
119
|
+
case /* repeated resources.citizens.licenses.License licenses */ 2:
|
|
120
120
|
message.licenses.push(License.internalBinaryRead(reader, reader.uint32(), options));
|
|
121
121
|
break;
|
|
122
122
|
default:
|
|
@@ -130,11 +130,11 @@ class CitizensLicenses$Type extends MessageType<CitizensLicenses> {
|
|
|
130
130
|
}
|
|
131
131
|
return message;
|
|
132
132
|
}
|
|
133
|
-
internalBinaryWrite(message:
|
|
133
|
+
internalBinaryWrite(message: Licenses, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
134
134
|
/* int32 user_id = 1; */
|
|
135
135
|
if (message.userId !== 0)
|
|
136
136
|
writer.tag(1, WireType.Varint).int32(message.userId);
|
|
137
|
-
/* repeated resources.
|
|
137
|
+
/* repeated resources.citizens.licenses.License licenses = 2; */
|
|
138
138
|
for (let i = 0; i < message.licenses.length; i++)
|
|
139
139
|
License.internalBinaryWrite(message.licenses[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
140
140
|
let u = options.writeUnknownFields;
|
|
@@ -144,6 +144,6 @@ class CitizensLicenses$Type extends MessageType<CitizensLicenses> {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
147
|
-
* @generated MessageType for protobuf message resources.
|
|
147
|
+
* @generated MessageType for protobuf message resources.citizens.licenses.Licenses
|
|
148
148
|
*/
|
|
149
|
-
export const
|
|
149
|
+
export const Licenses = new Licenses$Type();
|