@fivenet-app/gen 2025.5.2 → 2025.9.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/buf/validate/validate.ts +11301 -0
- package/clients.ts +157 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +208 -0
- package/codegen/sanitizer/sanitizer.ts +80 -0
- package/google/protobuf/any.ts +4 -3
- package/google/protobuf/descriptor.ts +393 -239
- package/google/protobuf/duration.ts +4 -3
- package/google/protobuf/struct.ts +485 -0
- package/google/protobuf/timestamp.ts +4 -3
- package/package.json +3 -3
- package/perms.ts +85 -159
- package/resources/accounts/accounts.ts +26 -25
- package/resources/accounts/oauth2.ts +30 -29
- package/resources/audit/audit.ts +36 -35
- package/resources/calendar/access.ts +49 -48
- package/resources/calendar/calendar.ts +122 -126
- package/resources/centrum/access.ts +345 -0
- package/resources/centrum/attributes.ts +8 -11
- package/resources/centrum/dispatchers.ts +149 -0
- package/resources/centrum/dispatches.ts +252 -115
- package/resources/centrum/settings.ts +384 -34
- package/resources/centrum/units.ts +112 -92
- package/resources/centrum/units_access.ts +54 -55
- package/resources/clientconfig/clientconfig.ts +890 -0
- package/resources/collab/collab.ts +817 -0
- package/resources/common/content/content.ts +113 -30
- package/resources/common/cron/cron.ts +43 -31
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- package/resources/common/grpcws/grpcws.ts +24 -23
- package/resources/common/i18n.ts +20 -24
- package/resources/common/id_mapping.ts +69 -0
- package/resources/common/tests/objects.ts +4 -3
- package/resources/common/uuid.ts +4 -3
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/access.ts +52 -53
- package/resources/documents/activity.ts +235 -58
- package/resources/documents/category.ts +20 -27
- package/resources/documents/comment.ts +26 -25
- package/resources/documents/documents.ts +335 -262
- package/resources/documents/pins.ts +127 -0
- package/resources/documents/requests.ts +31 -30
- package/resources/documents/signoff.ts +55 -0
- package/resources/documents/state.ts +69 -0
- package/resources/documents/templates.ts +119 -136
- package/resources/documents/workflow.ts +35 -24
- package/resources/file/file.ts +152 -0
- package/{services/settings → resources/file}/filestore.ts +179 -165
- package/resources/file/meta.ts +148 -0
- package/resources/jobs/activity.ts +39 -42
- package/resources/jobs/colleagues.ts +67 -60
- package/resources/jobs/conduct.ts +29 -30
- package/resources/jobs/job_props.ts +46 -48
- package/resources/jobs/job_settings.ts +45 -52
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/labels.ts +21 -22
- package/resources/jobs/timeclock.ts +26 -25
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → marker_marker.ts} +43 -310
- package/resources/livemap/user_marker.ts +298 -0
- package/resources/mailer/access.ts +75 -74
- package/resources/mailer/email.ts +24 -27
- package/resources/mailer/events.ts +25 -24
- package/resources/mailer/message.ts +45 -50
- package/resources/mailer/settings.ts +12 -15
- package/resources/mailer/template.ts +25 -28
- package/resources/mailer/thread.ts +70 -71
- package/resources/notifications/client_view.ts +239 -0
- package/resources/notifications/events.ts +50 -101
- package/resources/notifications/notifications.ts +52 -57
- package/resources/permissions/attributes.ts +63 -206
- package/resources/permissions/events.ts +149 -0
- package/resources/permissions/permissions.ts +103 -34
- package/resources/qualifications/access.ts +27 -26
- package/resources/qualifications/exam.ts +188 -126
- package/resources/qualifications/qualifications.ts +370 -303
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +163 -79
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +3 -2
- package/resources/sync/activity.ts +24 -23
- package/resources/sync/data.ts +94 -26
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/user_info.ts +464 -0
- package/resources/users/activity.ts +80 -85
- package/resources/users/labels.ts +18 -21
- package/resources/users/licenses.ts +9 -8
- package/resources/users/props.ts +61 -51
- package/resources/users/users.ts +100 -78
- package/resources/vehicles/activity.ts +231 -0
- package/resources/vehicles/props.ts +103 -0
- package/resources/vehicles/vehicles.ts +28 -15
- package/resources/wiki/access.ts +49 -48
- package/resources/wiki/activity.ts +133 -51
- package/resources/wiki/page.ts +134 -87
- package/services/auth/auth.client.ts +24 -27
- package/services/auth/auth.ts +222 -195
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +110 -109
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +701 -298
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +183 -93
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +65 -44
- package/services/documents/collab.client.ts +46 -0
- package/services/documents/collab.ts +13 -0
- package/services/documents/documents.client.ts +88 -217
- package/services/documents/documents.ts +490 -508
- package/services/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +10 -25
- package/services/jobs/conduct.ts +36 -35
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +108 -91
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +47 -46
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +290 -119
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +213 -216
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +117 -74
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +181 -175
- package/services/settings/accounts.client.ts +10 -25
- package/services/settings/accounts.ts +64 -41
- package/services/settings/config.client.ts +6 -13
- package/services/settings/config.ts +8 -7
- package/services/settings/cron.client.ts +4 -7
- package/services/settings/cron.ts +4 -3
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +29 -28
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +190 -607
- package/services/settings/system.client.ts +90 -0
- package/services/settings/system.ts +618 -0
- package/services/stats/stats.client.ts +4 -3
- package/services/stats/stats.ts +4 -3
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +82 -52
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +169 -24
- package/services/wiki/collab.client.ts +46 -0
- package/services/wiki/collab.ts +13 -0
- package/services/wiki/wiki.client.ts +28 -37
- package/services/wiki/wiki.ts +93 -63
- package/svcs.ts +79 -103
- package/resources/centrum/disponents.ts +0 -81
- package/resources/filestore/file.ts +0 -204
- package/resources/internet/access.ts +0 -358
- package/resources/internet/ads.ts +0 -257
- package/resources/internet/domain.ts +0 -328
- package/resources/internet/page.ts +0 -428
- package/resources/internet/search.ts +0 -128
- package/resources/livemap/tracker.ts +0 -81
- package/services/internet/ads.client.ts +0 -41
- package/services/internet/ads.ts +0 -145
- package/services/internet/domain.client.ts +0 -109
- package/services/internet/domain.ts +0 -658
- package/services/internet/internet.client.ts +0 -58
- package/services/internet/internet.ts +0 -268
- package/services/notificator/notificator.client.ts +0 -76
- package/services/settings/filestore.client.ts +0 -75
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
2
|
// @generated from protobuf file "resources/permissions/permissions.proto" (package "resources.permissions", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
3
4
|
// @ts-nocheck
|
|
4
5
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
5
6
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
@@ -17,31 +18,31 @@ import { Timestamp } from "../timestamp/timestamp";
|
|
|
17
18
|
*/
|
|
18
19
|
export interface Permission {
|
|
19
20
|
/**
|
|
20
|
-
* @generated from protobuf field:
|
|
21
|
+
* @generated from protobuf field: int64 id = 1
|
|
21
22
|
*/
|
|
22
23
|
id: number;
|
|
23
24
|
/**
|
|
24
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
25
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
25
26
|
*/
|
|
26
27
|
createdAt?: Timestamp;
|
|
27
28
|
/**
|
|
28
|
-
* @generated from protobuf field: string category = 3
|
|
29
|
+
* @generated from protobuf field: string category = 3
|
|
29
30
|
*/
|
|
30
31
|
category: string;
|
|
31
32
|
/**
|
|
32
|
-
* @generated from protobuf field: string name = 4
|
|
33
|
+
* @generated from protobuf field: string name = 4
|
|
33
34
|
*/
|
|
34
35
|
name: string;
|
|
35
36
|
/**
|
|
36
|
-
* @generated from protobuf field: string guard_name = 5
|
|
37
|
+
* @generated from protobuf field: string guard_name = 5
|
|
37
38
|
*/
|
|
38
39
|
guardName: string;
|
|
39
40
|
/**
|
|
40
|
-
* @generated from protobuf field: bool val = 6
|
|
41
|
+
* @generated from protobuf field: bool val = 6
|
|
41
42
|
*/
|
|
42
43
|
val: boolean;
|
|
43
44
|
/**
|
|
44
|
-
* @generated from protobuf field: optional int32 order = 7
|
|
45
|
+
* @generated from protobuf field: optional int32 order = 7
|
|
45
46
|
*/
|
|
46
47
|
order?: number;
|
|
47
48
|
}
|
|
@@ -50,49 +51,62 @@ export interface Permission {
|
|
|
50
51
|
*/
|
|
51
52
|
export interface Role {
|
|
52
53
|
/**
|
|
53
|
-
* @generated from protobuf field:
|
|
54
|
+
* @generated from protobuf field: int64 id = 1
|
|
54
55
|
*/
|
|
55
56
|
id: number;
|
|
56
57
|
/**
|
|
57
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
58
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
58
59
|
*/
|
|
59
60
|
createdAt?: Timestamp;
|
|
60
61
|
/**
|
|
61
|
-
* @generated from protobuf field: string job = 3
|
|
62
|
+
* @generated from protobuf field: string job = 3
|
|
62
63
|
*/
|
|
63
64
|
job: string;
|
|
64
65
|
/**
|
|
65
|
-
* @generated from protobuf field: optional string job_label = 4
|
|
66
|
+
* @generated from protobuf field: optional string job_label = 4
|
|
66
67
|
*/
|
|
67
68
|
jobLabel?: string;
|
|
68
69
|
/**
|
|
69
|
-
* @generated from protobuf field: int32 grade = 5
|
|
70
|
+
* @generated from protobuf field: int32 grade = 5
|
|
70
71
|
*/
|
|
71
72
|
grade: number;
|
|
72
73
|
/**
|
|
73
|
-
* @generated from protobuf field: optional string job_grade_label = 6
|
|
74
|
+
* @generated from protobuf field: optional string job_grade_label = 6
|
|
74
75
|
*/
|
|
75
76
|
jobGradeLabel?: string;
|
|
76
77
|
/**
|
|
77
|
-
* @generated from protobuf field: repeated resources.permissions.Permission permissions = 7
|
|
78
|
+
* @generated from protobuf field: repeated resources.permissions.Permission permissions = 7
|
|
78
79
|
*/
|
|
79
80
|
permissions: Permission[];
|
|
80
81
|
/**
|
|
81
|
-
* @generated from protobuf field: repeated resources.permissions.RoleAttribute attributes = 8
|
|
82
|
+
* @generated from protobuf field: repeated resources.permissions.RoleAttribute attributes = 8
|
|
82
83
|
*/
|
|
83
84
|
attributes: RoleAttribute[];
|
|
84
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* @generated from protobuf message resources.permissions.PermItem
|
|
88
|
+
*/
|
|
89
|
+
export interface PermItem {
|
|
90
|
+
/**
|
|
91
|
+
* @generated from protobuf field: int64 id = 1
|
|
92
|
+
*/
|
|
93
|
+
id: number;
|
|
94
|
+
/**
|
|
95
|
+
* @generated from protobuf field: bool val = 2
|
|
96
|
+
*/
|
|
97
|
+
val: boolean;
|
|
98
|
+
}
|
|
85
99
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
86
100
|
class Permission$Type extends MessageType<Permission> {
|
|
87
101
|
constructor() {
|
|
88
102
|
super("resources.permissions.Permission", [
|
|
89
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
103
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
90
104
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
91
|
-
{ no: 3, name: "category", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
92
|
-
{ no: 4, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
93
|
-
{ no: 5, name: "guard_name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
105
|
+
{ no: 3, name: "category", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } },
|
|
106
|
+
{ no: 4, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
|
|
107
|
+
{ no: 5, name: "guard_name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
|
|
94
108
|
{ no: 6, name: "val", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
95
|
-
{ no: 7, name: "order", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
109
|
+
{ no: 7, name: "order", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } }
|
|
96
110
|
]);
|
|
97
111
|
}
|
|
98
112
|
create(value?: PartialMessage<Permission>): Permission {
|
|
@@ -111,8 +125,8 @@ class Permission$Type extends MessageType<Permission> {
|
|
|
111
125
|
while (reader.pos < end) {
|
|
112
126
|
let [fieldNo, wireType] = reader.tag();
|
|
113
127
|
switch (fieldNo) {
|
|
114
|
-
case /*
|
|
115
|
-
message.id = reader.
|
|
128
|
+
case /* int64 id */ 1:
|
|
129
|
+
message.id = reader.int64().toNumber();
|
|
116
130
|
break;
|
|
117
131
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
118
132
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -144,9 +158,9 @@ class Permission$Type extends MessageType<Permission> {
|
|
|
144
158
|
return message;
|
|
145
159
|
}
|
|
146
160
|
internalBinaryWrite(message: Permission, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
147
|
-
/*
|
|
161
|
+
/* int64 id = 1; */
|
|
148
162
|
if (message.id !== 0)
|
|
149
|
-
writer.tag(1, WireType.Varint).
|
|
163
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
150
164
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
151
165
|
if (message.createdAt)
|
|
152
166
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -179,12 +193,12 @@ export const Permission = new Permission$Type();
|
|
|
179
193
|
class Role$Type extends MessageType<Role> {
|
|
180
194
|
constructor() {
|
|
181
195
|
super("resources.permissions.Role", [
|
|
182
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
196
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
183
197
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
184
|
-
{ no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
185
|
-
{ no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
186
|
-
{ no: 5, name: "grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
187
|
-
{ no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
198
|
+
{ no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
|
|
199
|
+
{ no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
200
|
+
{ no: 5, name: "grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
201
|
+
{ no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
188
202
|
{ no: 7, name: "permissions", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Permission },
|
|
189
203
|
{ no: 8, name: "attributes", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RoleAttribute }
|
|
190
204
|
]);
|
|
@@ -205,8 +219,8 @@ class Role$Type extends MessageType<Role> {
|
|
|
205
219
|
while (reader.pos < end) {
|
|
206
220
|
let [fieldNo, wireType] = reader.tag();
|
|
207
221
|
switch (fieldNo) {
|
|
208
|
-
case /*
|
|
209
|
-
message.id = reader.
|
|
222
|
+
case /* int64 id */ 1:
|
|
223
|
+
message.id = reader.int64().toNumber();
|
|
210
224
|
break;
|
|
211
225
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
212
226
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -241,9 +255,9 @@ class Role$Type extends MessageType<Role> {
|
|
|
241
255
|
return message;
|
|
242
256
|
}
|
|
243
257
|
internalBinaryWrite(message: Role, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
244
|
-
/*
|
|
258
|
+
/* int64 id = 1; */
|
|
245
259
|
if (message.id !== 0)
|
|
246
|
-
writer.tag(1, WireType.Varint).
|
|
260
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
247
261
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
248
262
|
if (message.createdAt)
|
|
249
263
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -275,3 +289,58 @@ class Role$Type extends MessageType<Role> {
|
|
|
275
289
|
* @generated MessageType for protobuf message resources.permissions.Role
|
|
276
290
|
*/
|
|
277
291
|
export const Role = new Role$Type();
|
|
292
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
293
|
+
class PermItem$Type extends MessageType<PermItem> {
|
|
294
|
+
constructor() {
|
|
295
|
+
super("resources.permissions.PermItem", [
|
|
296
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
297
|
+
{ no: 2, name: "val", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
298
|
+
]);
|
|
299
|
+
}
|
|
300
|
+
create(value?: PartialMessage<PermItem>): PermItem {
|
|
301
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
302
|
+
message.id = 0;
|
|
303
|
+
message.val = false;
|
|
304
|
+
if (value !== undefined)
|
|
305
|
+
reflectionMergePartial<PermItem>(this, message, value);
|
|
306
|
+
return message;
|
|
307
|
+
}
|
|
308
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PermItem): PermItem {
|
|
309
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
310
|
+
while (reader.pos < end) {
|
|
311
|
+
let [fieldNo, wireType] = reader.tag();
|
|
312
|
+
switch (fieldNo) {
|
|
313
|
+
case /* int64 id */ 1:
|
|
314
|
+
message.id = reader.int64().toNumber();
|
|
315
|
+
break;
|
|
316
|
+
case /* bool val */ 2:
|
|
317
|
+
message.val = reader.bool();
|
|
318
|
+
break;
|
|
319
|
+
default:
|
|
320
|
+
let u = options.readUnknownField;
|
|
321
|
+
if (u === "throw")
|
|
322
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
323
|
+
let d = reader.skip(wireType);
|
|
324
|
+
if (u !== false)
|
|
325
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return message;
|
|
329
|
+
}
|
|
330
|
+
internalBinaryWrite(message: PermItem, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
331
|
+
/* int64 id = 1; */
|
|
332
|
+
if (message.id !== 0)
|
|
333
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
334
|
+
/* bool val = 2; */
|
|
335
|
+
if (message.val !== false)
|
|
336
|
+
writer.tag(2, WireType.Varint).bool(message.val);
|
|
337
|
+
let u = options.writeUnknownFields;
|
|
338
|
+
if (u !== false)
|
|
339
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
340
|
+
return writer;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* @generated MessageType for protobuf message resources.permissions.PermItem
|
|
345
|
+
*/
|
|
346
|
+
export const PermItem = new PermItem$Type();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
2
|
// @generated from protobuf file "resources/qualifications/access.proto" (package "resources.qualifications", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
3
4
|
// @ts-nocheck
|
|
4
5
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
5
6
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
@@ -16,7 +17,7 @@ import { Timestamp } from "../timestamp/timestamp";
|
|
|
16
17
|
*/
|
|
17
18
|
export interface QualificationAccess {
|
|
18
19
|
/**
|
|
19
|
-
* @generated from protobuf field: repeated resources.qualifications.QualificationJobAccess jobs = 1
|
|
20
|
+
* @generated from protobuf field: repeated resources.qualifications.QualificationJobAccess jobs = 1
|
|
20
21
|
*/
|
|
21
22
|
jobs: QualificationJobAccess[];
|
|
22
23
|
}
|
|
@@ -25,35 +26,35 @@ export interface QualificationAccess {
|
|
|
25
26
|
*/
|
|
26
27
|
export interface QualificationJobAccess {
|
|
27
28
|
/**
|
|
28
|
-
* @generated from protobuf field:
|
|
29
|
+
* @generated from protobuf field: int64 id = 1
|
|
29
30
|
*/
|
|
30
|
-
id: number;
|
|
31
|
+
id: number;
|
|
31
32
|
/**
|
|
32
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
33
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
33
34
|
*/
|
|
34
35
|
createdAt?: Timestamp;
|
|
35
36
|
/**
|
|
36
|
-
* @generated from protobuf field:
|
|
37
|
+
* @generated from protobuf field: int64 target_id = 4
|
|
37
38
|
*/
|
|
38
39
|
targetId: number;
|
|
39
40
|
/**
|
|
40
|
-
* @generated from protobuf field: string job = 5
|
|
41
|
+
* @generated from protobuf field: string job = 5
|
|
41
42
|
*/
|
|
42
43
|
job: string;
|
|
43
44
|
/**
|
|
44
|
-
* @generated from protobuf field: optional string job_label = 6
|
|
45
|
+
* @generated from protobuf field: optional string job_label = 6
|
|
45
46
|
*/
|
|
46
47
|
jobLabel?: string;
|
|
47
48
|
/**
|
|
48
|
-
* @generated from protobuf field: int32 minimum_grade = 7
|
|
49
|
+
* @generated from protobuf field: int32 minimum_grade = 7
|
|
49
50
|
*/
|
|
50
51
|
minimumGrade: number;
|
|
51
52
|
/**
|
|
52
|
-
* @generated from protobuf field: optional string job_grade_label = 8
|
|
53
|
+
* @generated from protobuf field: optional string job_grade_label = 8
|
|
53
54
|
*/
|
|
54
55
|
jobGradeLabel?: string;
|
|
55
56
|
/**
|
|
56
|
-
* @generated from protobuf field: resources.qualifications.AccessLevel access = 9
|
|
57
|
+
* @generated from protobuf field: resources.qualifications.AccessLevel access = 9
|
|
57
58
|
*/
|
|
58
59
|
access: AccessLevel;
|
|
59
60
|
}
|
|
@@ -148,14 +149,14 @@ export const QualificationAccess = new QualificationAccess$Type();
|
|
|
148
149
|
class QualificationJobAccess$Type extends MessageType<QualificationJobAccess> {
|
|
149
150
|
constructor() {
|
|
150
151
|
super("resources.qualifications.QualificationJobAccess", [
|
|
151
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
152
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
|
|
152
153
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
153
|
-
{ no: 4, name: "target_id", kind: "scalar", T:
|
|
154
|
-
{ no: 5, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
155
|
-
{ no: 6, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
156
|
-
{ no: 7, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
157
|
-
{ no: 8, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
158
|
-
{ no: 9, name: "access", kind: "enum", T: () => ["resources.qualifications.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "validate.
|
|
154
|
+
{ no: 4, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
155
|
+
{ no: 5, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
156
|
+
{ no: 6, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
157
|
+
{ no: 7, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
158
|
+
{ no: 8, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
159
|
+
{ no: 9, name: "access", kind: "enum", T: () => ["resources.qualifications.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
|
|
159
160
|
]);
|
|
160
161
|
}
|
|
161
162
|
create(value?: PartialMessage<QualificationJobAccess>): QualificationJobAccess {
|
|
@@ -174,14 +175,14 @@ class QualificationJobAccess$Type extends MessageType<QualificationJobAccess> {
|
|
|
174
175
|
while (reader.pos < end) {
|
|
175
176
|
let [fieldNo, wireType] = reader.tag();
|
|
176
177
|
switch (fieldNo) {
|
|
177
|
-
case /*
|
|
178
|
-
message.id = reader.
|
|
178
|
+
case /* int64 id */ 1:
|
|
179
|
+
message.id = reader.int64().toNumber();
|
|
179
180
|
break;
|
|
180
181
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
181
182
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
182
183
|
break;
|
|
183
|
-
case /*
|
|
184
|
-
message.targetId = reader.
|
|
184
|
+
case /* int64 target_id */ 4:
|
|
185
|
+
message.targetId = reader.int64().toNumber();
|
|
185
186
|
break;
|
|
186
187
|
case /* string job */ 5:
|
|
187
188
|
message.job = reader.string();
|
|
@@ -210,15 +211,15 @@ class QualificationJobAccess$Type extends MessageType<QualificationJobAccess> {
|
|
|
210
211
|
return message;
|
|
211
212
|
}
|
|
212
213
|
internalBinaryWrite(message: QualificationJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
213
|
-
/*
|
|
214
|
+
/* int64 id = 1; */
|
|
214
215
|
if (message.id !== 0)
|
|
215
|
-
writer.tag(1, WireType.Varint).
|
|
216
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
216
217
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
217
218
|
if (message.createdAt)
|
|
218
219
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
219
|
-
/*
|
|
220
|
+
/* int64 target_id = 4; */
|
|
220
221
|
if (message.targetId !== 0)
|
|
221
|
-
writer.tag(4, WireType.Varint).
|
|
222
|
+
writer.tag(4, WireType.Varint).int64(message.targetId);
|
|
222
223
|
/* string job = 5; */
|
|
223
224
|
if (message.job !== "")
|
|
224
225
|
writer.tag(5, WireType.LengthDelimited).string(message.job);
|