@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/centrum/units.proto" (package "resources.centrum", 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";
|
|
@@ -19,63 +20,63 @@ import { Timestamp } from "../timestamp/timestamp";
|
|
|
19
20
|
*/
|
|
20
21
|
export interface Unit {
|
|
21
22
|
/**
|
|
22
|
-
* @generated from protobuf field:
|
|
23
|
+
* @generated from protobuf field: int64 id = 1
|
|
23
24
|
*/
|
|
24
|
-
id: number;
|
|
25
|
+
id: number;
|
|
25
26
|
/**
|
|
26
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
27
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
27
28
|
*/
|
|
28
29
|
createdAt?: Timestamp;
|
|
29
30
|
/**
|
|
30
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
31
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
31
32
|
*/
|
|
32
33
|
updatedAt?: Timestamp;
|
|
33
34
|
/**
|
|
34
|
-
* @generated from protobuf field: string job = 4
|
|
35
|
+
* @generated from protobuf field: string job = 4
|
|
35
36
|
*/
|
|
36
37
|
job: string;
|
|
37
38
|
/**
|
|
38
|
-
* @
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
* @generated from protobuf field: optional string job_label = 15
|
|
40
|
+
*/
|
|
41
|
+
jobLabel?: string;
|
|
42
|
+
/**
|
|
43
|
+
* @generated from protobuf field: string name = 5
|
|
41
44
|
*/
|
|
42
45
|
name: string;
|
|
43
46
|
/**
|
|
44
|
-
* @
|
|
45
|
-
*
|
|
46
|
-
* @generated from protobuf field: string initials = 6;
|
|
47
|
+
* @generated from protobuf field: string initials = 6
|
|
47
48
|
*/
|
|
48
49
|
initials: string;
|
|
49
50
|
/**
|
|
50
|
-
* @
|
|
51
|
-
*
|
|
52
|
-
* @generated from protobuf field: string color = 7;
|
|
51
|
+
* @generated from protobuf field: string color = 7
|
|
53
52
|
*/
|
|
54
53
|
color: string;
|
|
55
54
|
/**
|
|
56
|
-
* @
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
* @generated from protobuf field: optional string icon = 16
|
|
56
|
+
*/
|
|
57
|
+
icon?: string;
|
|
58
|
+
/**
|
|
59
|
+
* @generated from protobuf field: optional string description = 8
|
|
59
60
|
*/
|
|
60
61
|
description?: string;
|
|
61
62
|
/**
|
|
62
|
-
* @generated from protobuf field: optional resources.centrum.UnitStatus status = 9
|
|
63
|
+
* @generated from protobuf field: optional resources.centrum.UnitStatus status = 9
|
|
63
64
|
*/
|
|
64
65
|
status?: UnitStatus;
|
|
65
66
|
/**
|
|
66
|
-
* @generated from protobuf field: repeated resources.centrum.UnitAssignment users = 11
|
|
67
|
+
* @generated from protobuf field: repeated resources.centrum.UnitAssignment users = 11
|
|
67
68
|
*/
|
|
68
69
|
users: UnitAssignment[];
|
|
69
70
|
/**
|
|
70
|
-
* @generated from protobuf field: optional resources.centrum.UnitAttributes attributes = 12
|
|
71
|
+
* @generated from protobuf field: optional resources.centrum.UnitAttributes attributes = 12
|
|
71
72
|
*/
|
|
72
73
|
attributes?: UnitAttributes;
|
|
73
74
|
/**
|
|
74
|
-
* @generated from protobuf field: optional string home_postal = 13
|
|
75
|
+
* @generated from protobuf field: optional string home_postal = 13
|
|
75
76
|
*/
|
|
76
77
|
homePostal?: string;
|
|
77
78
|
/**
|
|
78
|
-
* @generated from protobuf field: resources.centrum.UnitAccess access = 14
|
|
79
|
+
* @generated from protobuf field: resources.centrum.UnitAccess access = 14
|
|
79
80
|
*/
|
|
80
81
|
access?: UnitAccess;
|
|
81
82
|
}
|
|
@@ -84,15 +85,15 @@ export interface Unit {
|
|
|
84
85
|
*/
|
|
85
86
|
export interface UnitAssignments {
|
|
86
87
|
/**
|
|
87
|
-
* @generated from protobuf field:
|
|
88
|
+
* @generated from protobuf field: int64 unit_id = 1
|
|
88
89
|
*/
|
|
89
90
|
unitId: number;
|
|
90
91
|
/**
|
|
91
|
-
* @generated from protobuf field: string job = 2
|
|
92
|
+
* @generated from protobuf field: string job = 2
|
|
92
93
|
*/
|
|
93
94
|
job: string;
|
|
94
95
|
/**
|
|
95
|
-
* @generated from protobuf field: repeated resources.centrum.UnitAssignment users = 3
|
|
96
|
+
* @generated from protobuf field: repeated resources.centrum.UnitAssignment users = 3
|
|
96
97
|
*/
|
|
97
98
|
users: UnitAssignment[];
|
|
98
99
|
}
|
|
@@ -101,15 +102,15 @@ export interface UnitAssignments {
|
|
|
101
102
|
*/
|
|
102
103
|
export interface UnitAssignment {
|
|
103
104
|
/**
|
|
104
|
-
* @generated from protobuf field:
|
|
105
|
+
* @generated from protobuf field: int64 unit_id = 1
|
|
105
106
|
*/
|
|
106
|
-
unitId: number;
|
|
107
|
+
unitId: number;
|
|
107
108
|
/**
|
|
108
|
-
* @generated from protobuf field: int32 user_id = 2
|
|
109
|
+
* @generated from protobuf field: int32 user_id = 2
|
|
109
110
|
*/
|
|
110
|
-
userId: number;
|
|
111
|
+
userId: number;
|
|
111
112
|
/**
|
|
112
|
-
* @generated from protobuf field: optional resources.jobs.Colleague user = 3
|
|
113
|
+
* @generated from protobuf field: optional resources.jobs.Colleague user = 3
|
|
113
114
|
*/
|
|
114
115
|
user?: Colleague;
|
|
115
116
|
}
|
|
@@ -118,67 +119,65 @@ export interface UnitAssignment {
|
|
|
118
119
|
*/
|
|
119
120
|
export interface UnitStatus {
|
|
120
121
|
/**
|
|
121
|
-
* @generated from protobuf field:
|
|
122
|
+
* @generated from protobuf field: int64 id = 1
|
|
122
123
|
*/
|
|
123
|
-
id: number;
|
|
124
|
+
id: number;
|
|
124
125
|
/**
|
|
125
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
126
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
126
127
|
*/
|
|
127
128
|
createdAt?: Timestamp;
|
|
128
129
|
/**
|
|
129
|
-
* @generated from protobuf field:
|
|
130
|
+
* @generated from protobuf field: int64 unit_id = 3
|
|
130
131
|
*/
|
|
131
132
|
unitId: number;
|
|
132
133
|
/**
|
|
133
|
-
* @generated from protobuf field: optional resources.centrum.Unit unit = 4
|
|
134
|
+
* @generated from protobuf field: optional resources.centrum.Unit unit = 4
|
|
134
135
|
*/
|
|
135
136
|
unit?: Unit;
|
|
136
137
|
/**
|
|
137
|
-
* @generated from protobuf field: resources.centrum.StatusUnit status = 5
|
|
138
|
+
* @generated from protobuf field: resources.centrum.StatusUnit status = 5
|
|
138
139
|
*/
|
|
139
140
|
status: StatusUnit;
|
|
140
141
|
/**
|
|
141
|
-
* @
|
|
142
|
-
*
|
|
143
|
-
* @generated from protobuf field: optional string reason = 6;
|
|
142
|
+
* @generated from protobuf field: optional string reason = 6
|
|
144
143
|
*/
|
|
145
144
|
reason?: string;
|
|
146
145
|
/**
|
|
147
|
-
* @
|
|
148
|
-
*
|
|
149
|
-
* @generated from protobuf field: optional string code = 7;
|
|
146
|
+
* @generated from protobuf field: optional string code = 7
|
|
150
147
|
*/
|
|
151
148
|
code?: string;
|
|
152
149
|
/**
|
|
153
|
-
* @generated from protobuf field: optional int32 user_id = 8
|
|
150
|
+
* @generated from protobuf field: optional int32 user_id = 8
|
|
154
151
|
*/
|
|
155
152
|
userId?: number;
|
|
156
153
|
/**
|
|
157
|
-
* @generated from protobuf field: optional resources.jobs.Colleague user = 9
|
|
154
|
+
* @generated from protobuf field: optional resources.jobs.Colleague user = 9
|
|
158
155
|
*/
|
|
159
156
|
user?: Colleague;
|
|
160
157
|
/**
|
|
161
|
-
* @generated from protobuf field: optional double x = 10
|
|
158
|
+
* @generated from protobuf field: optional double x = 10
|
|
162
159
|
*/
|
|
163
160
|
x?: number;
|
|
164
161
|
/**
|
|
165
|
-
* @generated from protobuf field: optional double y = 11
|
|
162
|
+
* @generated from protobuf field: optional double y = 11
|
|
166
163
|
*/
|
|
167
164
|
y?: number;
|
|
168
165
|
/**
|
|
169
|
-
* @
|
|
170
|
-
*
|
|
171
|
-
* @generated from protobuf field: optional string postal = 12;
|
|
166
|
+
* @generated from protobuf field: optional string postal = 12
|
|
172
167
|
*/
|
|
173
168
|
postal?: string;
|
|
174
169
|
/**
|
|
175
|
-
* @generated from protobuf field: optional int32 creator_id = 13
|
|
170
|
+
* @generated from protobuf field: optional int32 creator_id = 13
|
|
176
171
|
*/
|
|
177
172
|
creatorId?: number;
|
|
178
173
|
/**
|
|
179
|
-
* @generated from protobuf field: optional resources.jobs.Colleague creator = 14
|
|
174
|
+
* @generated from protobuf field: optional resources.jobs.Colleague creator = 14
|
|
180
175
|
*/
|
|
181
176
|
creator?: Colleague;
|
|
177
|
+
/**
|
|
178
|
+
* @generated from protobuf field: optional string creator_job = 15
|
|
179
|
+
*/
|
|
180
|
+
creatorJob?: string;
|
|
182
181
|
}
|
|
183
182
|
/**
|
|
184
183
|
* @generated from protobuf enum resources.centrum.StatusUnit
|
|
@@ -221,18 +220,20 @@ export enum StatusUnit {
|
|
|
221
220
|
class Unit$Type extends MessageType<Unit> {
|
|
222
221
|
constructor() {
|
|
223
222
|
super("resources.centrum.Unit", [
|
|
224
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
223
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
|
|
225
224
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
226
225
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
227
|
-
{ no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
228
|
-
{ no:
|
|
229
|
-
{ no:
|
|
230
|
-
{ no:
|
|
231
|
-
{ no:
|
|
226
|
+
{ no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
227
|
+
{ no: 15, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
228
|
+
{ no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "24" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
229
|
+
{ no: 6, name: "initials", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "2", maxLen: "4" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
230
|
+
{ 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, method: "StripTags" } } },
|
|
231
|
+
{ no: 16, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128", suffix: "Icon" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
232
|
+
{ no: 8, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
232
233
|
{ no: 9, name: "status", kind: "message", T: () => UnitStatus },
|
|
233
234
|
{ no: 11, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment },
|
|
234
235
|
{ no: 12, name: "attributes", kind: "message", T: () => UnitAttributes },
|
|
235
|
-
{ no: 13, name: "home_postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
236
|
+
{ no: 13, name: "home_postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } } } },
|
|
236
237
|
{ no: 14, name: "access", kind: "message", T: () => UnitAccess }
|
|
237
238
|
]);
|
|
238
239
|
}
|
|
@@ -253,8 +254,8 @@ class Unit$Type extends MessageType<Unit> {
|
|
|
253
254
|
while (reader.pos < end) {
|
|
254
255
|
let [fieldNo, wireType] = reader.tag();
|
|
255
256
|
switch (fieldNo) {
|
|
256
|
-
case /*
|
|
257
|
-
message.id = reader.
|
|
257
|
+
case /* int64 id */ 1:
|
|
258
|
+
message.id = reader.int64().toNumber();
|
|
258
259
|
break;
|
|
259
260
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
260
261
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -265,6 +266,9 @@ class Unit$Type extends MessageType<Unit> {
|
|
|
265
266
|
case /* string job */ 4:
|
|
266
267
|
message.job = reader.string();
|
|
267
268
|
break;
|
|
269
|
+
case /* optional string job_label */ 15:
|
|
270
|
+
message.jobLabel = reader.string();
|
|
271
|
+
break;
|
|
268
272
|
case /* string name */ 5:
|
|
269
273
|
message.name = reader.string();
|
|
270
274
|
break;
|
|
@@ -274,6 +278,9 @@ class Unit$Type extends MessageType<Unit> {
|
|
|
274
278
|
case /* string color */ 7:
|
|
275
279
|
message.color = reader.string();
|
|
276
280
|
break;
|
|
281
|
+
case /* optional string icon */ 16:
|
|
282
|
+
message.icon = reader.string();
|
|
283
|
+
break;
|
|
277
284
|
case /* optional string description */ 8:
|
|
278
285
|
message.description = reader.string();
|
|
279
286
|
break;
|
|
@@ -304,9 +311,9 @@ class Unit$Type extends MessageType<Unit> {
|
|
|
304
311
|
return message;
|
|
305
312
|
}
|
|
306
313
|
internalBinaryWrite(message: Unit, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
307
|
-
/*
|
|
314
|
+
/* int64 id = 1; */
|
|
308
315
|
if (message.id !== 0)
|
|
309
|
-
writer.tag(1, WireType.Varint).
|
|
316
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
310
317
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
311
318
|
if (message.createdAt)
|
|
312
319
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -343,6 +350,12 @@ class Unit$Type extends MessageType<Unit> {
|
|
|
343
350
|
/* resources.centrum.UnitAccess access = 14; */
|
|
344
351
|
if (message.access)
|
|
345
352
|
UnitAccess.internalBinaryWrite(message.access, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
|
353
|
+
/* optional string job_label = 15; */
|
|
354
|
+
if (message.jobLabel !== undefined)
|
|
355
|
+
writer.tag(15, WireType.LengthDelimited).string(message.jobLabel);
|
|
356
|
+
/* optional string icon = 16; */
|
|
357
|
+
if (message.icon !== undefined)
|
|
358
|
+
writer.tag(16, WireType.LengthDelimited).string(message.icon);
|
|
346
359
|
let u = options.writeUnknownFields;
|
|
347
360
|
if (u !== false)
|
|
348
361
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -357,8 +370,8 @@ export const Unit = new Unit$Type();
|
|
|
357
370
|
class UnitAssignments$Type extends MessageType<UnitAssignments> {
|
|
358
371
|
constructor() {
|
|
359
372
|
super("resources.centrum.UnitAssignments", [
|
|
360
|
-
{ no: 1, name: "unit_id", kind: "scalar", T:
|
|
361
|
-
{ no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
373
|
+
{ no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
374
|
+
{ no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
362
375
|
{ no: 3, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment }
|
|
363
376
|
]);
|
|
364
377
|
}
|
|
@@ -376,8 +389,8 @@ class UnitAssignments$Type extends MessageType<UnitAssignments> {
|
|
|
376
389
|
while (reader.pos < end) {
|
|
377
390
|
let [fieldNo, wireType] = reader.tag();
|
|
378
391
|
switch (fieldNo) {
|
|
379
|
-
case /*
|
|
380
|
-
message.unitId = reader.
|
|
392
|
+
case /* int64 unit_id */ 1:
|
|
393
|
+
message.unitId = reader.int64().toNumber();
|
|
381
394
|
break;
|
|
382
395
|
case /* string job */ 2:
|
|
383
396
|
message.job = reader.string();
|
|
@@ -397,9 +410,9 @@ class UnitAssignments$Type extends MessageType<UnitAssignments> {
|
|
|
397
410
|
return message;
|
|
398
411
|
}
|
|
399
412
|
internalBinaryWrite(message: UnitAssignments, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
400
|
-
/*
|
|
413
|
+
/* int64 unit_id = 1; */
|
|
401
414
|
if (message.unitId !== 0)
|
|
402
|
-
writer.tag(1, WireType.Varint).
|
|
415
|
+
writer.tag(1, WireType.Varint).int64(message.unitId);
|
|
403
416
|
/* string job = 2; */
|
|
404
417
|
if (message.job !== "")
|
|
405
418
|
writer.tag(2, WireType.LengthDelimited).string(message.job);
|
|
@@ -420,8 +433,8 @@ export const UnitAssignments = new UnitAssignments$Type();
|
|
|
420
433
|
class UnitAssignment$Type extends MessageType<UnitAssignment> {
|
|
421
434
|
constructor() {
|
|
422
435
|
super("resources.centrum.UnitAssignment", [
|
|
423
|
-
{ no: 1, name: "unit_id", kind: "scalar", T:
|
|
424
|
-
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
436
|
+
{ no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"unit_id\"" } },
|
|
437
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } }, "tagger.tags": "sql:\"primary_key\" alias:\"user_id\"" } },
|
|
425
438
|
{ no: 3, name: "user", kind: "message", T: () => Colleague }
|
|
426
439
|
]);
|
|
427
440
|
}
|
|
@@ -438,8 +451,8 @@ class UnitAssignment$Type extends MessageType<UnitAssignment> {
|
|
|
438
451
|
while (reader.pos < end) {
|
|
439
452
|
let [fieldNo, wireType] = reader.tag();
|
|
440
453
|
switch (fieldNo) {
|
|
441
|
-
case /*
|
|
442
|
-
message.unitId = reader.
|
|
454
|
+
case /* int64 unit_id */ 1:
|
|
455
|
+
message.unitId = reader.int64().toNumber();
|
|
443
456
|
break;
|
|
444
457
|
case /* int32 user_id */ 2:
|
|
445
458
|
message.userId = reader.int32();
|
|
@@ -459,9 +472,9 @@ class UnitAssignment$Type extends MessageType<UnitAssignment> {
|
|
|
459
472
|
return message;
|
|
460
473
|
}
|
|
461
474
|
internalBinaryWrite(message: UnitAssignment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
462
|
-
/*
|
|
475
|
+
/* int64 unit_id = 1; */
|
|
463
476
|
if (message.unitId !== 0)
|
|
464
|
-
writer.tag(1, WireType.Varint).
|
|
477
|
+
writer.tag(1, WireType.Varint).int64(message.unitId);
|
|
465
478
|
/* int32 user_id = 2; */
|
|
466
479
|
if (message.userId !== 0)
|
|
467
480
|
writer.tag(2, WireType.Varint).int32(message.userId);
|
|
@@ -482,20 +495,21 @@ export const UnitAssignment = new UnitAssignment$Type();
|
|
|
482
495
|
class UnitStatus$Type extends MessageType<UnitStatus> {
|
|
483
496
|
constructor() {
|
|
484
497
|
super("resources.centrum.UnitStatus", [
|
|
485
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
498
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
|
|
486
499
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
487
|
-
{ no: 3, name: "unit_id", kind: "scalar", T:
|
|
500
|
+
{ no: 3, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
488
501
|
{ no: 4, name: "unit", kind: "message", T: () => Unit },
|
|
489
|
-
{ no: 5, name: "status", kind: "enum", T: () => ["resources.centrum.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "validate.
|
|
490
|
-
{ no: 6, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
491
|
-
{ no: 7, name: "code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
492
|
-
{ no: 8, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
502
|
+
{ no: 5, name: "status", kind: "enum", T: () => ["resources.centrum.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
503
|
+
{ no: 6, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
504
|
+
{ no: 7, name: "code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
505
|
+
{ no: 8, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
493
506
|
{ no: 9, name: "user", kind: "message", T: () => Colleague },
|
|
494
507
|
{ no: 10, name: "x", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ },
|
|
495
508
|
{ 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.
|
|
497
|
-
{ no: 13, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
498
|
-
{ no: 14, name: "creator", kind: "message", T: () => Colleague }
|
|
509
|
+
{ no: 12, name: "postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
510
|
+
{ no: 13, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
511
|
+
{ no: 14, name: "creator", kind: "message", T: () => Colleague },
|
|
512
|
+
{ no: 15, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } }
|
|
499
513
|
]);
|
|
500
514
|
}
|
|
501
515
|
create(value?: PartialMessage<UnitStatus>): UnitStatus {
|
|
@@ -512,14 +526,14 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
|
|
|
512
526
|
while (reader.pos < end) {
|
|
513
527
|
let [fieldNo, wireType] = reader.tag();
|
|
514
528
|
switch (fieldNo) {
|
|
515
|
-
case /*
|
|
516
|
-
message.id = reader.
|
|
529
|
+
case /* int64 id */ 1:
|
|
530
|
+
message.id = reader.int64().toNumber();
|
|
517
531
|
break;
|
|
518
532
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
519
533
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
520
534
|
break;
|
|
521
|
-
case /*
|
|
522
|
-
message.unitId = reader.
|
|
535
|
+
case /* int64 unit_id */ 3:
|
|
536
|
+
message.unitId = reader.int64().toNumber();
|
|
523
537
|
break;
|
|
524
538
|
case /* optional resources.centrum.Unit unit */ 4:
|
|
525
539
|
message.unit = Unit.internalBinaryRead(reader, reader.uint32(), options, message.unit);
|
|
@@ -554,6 +568,9 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
|
|
|
554
568
|
case /* optional resources.jobs.Colleague creator */ 14:
|
|
555
569
|
message.creator = Colleague.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
556
570
|
break;
|
|
571
|
+
case /* optional string creator_job */ 15:
|
|
572
|
+
message.creatorJob = reader.string();
|
|
573
|
+
break;
|
|
557
574
|
default:
|
|
558
575
|
let u = options.readUnknownField;
|
|
559
576
|
if (u === "throw")
|
|
@@ -566,15 +583,15 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
|
|
|
566
583
|
return message;
|
|
567
584
|
}
|
|
568
585
|
internalBinaryWrite(message: UnitStatus, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
569
|
-
/*
|
|
586
|
+
/* int64 id = 1; */
|
|
570
587
|
if (message.id !== 0)
|
|
571
|
-
writer.tag(1, WireType.Varint).
|
|
588
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
572
589
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
573
590
|
if (message.createdAt)
|
|
574
591
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
575
|
-
/*
|
|
592
|
+
/* int64 unit_id = 3; */
|
|
576
593
|
if (message.unitId !== 0)
|
|
577
|
-
writer.tag(3, WireType.Varint).
|
|
594
|
+
writer.tag(3, WireType.Varint).int64(message.unitId);
|
|
578
595
|
/* optional resources.centrum.Unit unit = 4; */
|
|
579
596
|
if (message.unit)
|
|
580
597
|
Unit.internalBinaryWrite(message.unit, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -608,6 +625,9 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
|
|
|
608
625
|
/* optional resources.jobs.Colleague creator = 14; */
|
|
609
626
|
if (message.creator)
|
|
610
627
|
Colleague.internalBinaryWrite(message.creator, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
|
628
|
+
/* optional string creator_job = 15; */
|
|
629
|
+
if (message.creatorJob !== undefined)
|
|
630
|
+
writer.tag(15, WireType.LengthDelimited).string(message.creatorJob);
|
|
611
631
|
let u = options.writeUnknownFields;
|
|
612
632
|
if (u !== false)
|
|
613
633
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|