@fivenet-app/gen 2026.5.0 → 2026.7.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.
Files changed (87) hide show
  1. package/clients.ts +6 -0
  2. package/codegen/perms/perms.ts +74 -40
  3. package/codegen/sanitizer/sanitizer.ts +6 -0
  4. package/google/protobuf/descriptor.ts +11 -3
  5. package/google/protobuf/timestamp.ts +7 -6
  6. package/package.json +1 -1
  7. package/perms.ts +387 -41
  8. package/resources/access/access.ts +481 -0
  9. package/resources/accounts/accounts.ts +41 -30
  10. package/resources/audit/audit.ts +5 -1
  11. package/resources/calendar/access/access.ts +0 -330
  12. package/resources/calendar/calendar.ts +307 -25
  13. package/resources/calendar/entries/entries.ts +204 -11
  14. package/resources/centrum/units/access/access.ts +0 -373
  15. package/resources/centrum/units/units.ts +20 -8
  16. package/resources/citizens/labels/access.ts +0 -191
  17. package/resources/citizens/labels/labels.ts +20 -8
  18. package/resources/common/content/diff_activity.ts +1 -1
  19. package/resources/cron/cron.ts +1 -1
  20. package/resources/documents/access/access.ts +0 -329
  21. package/resources/documents/activity/activity.ts +49 -45
  22. package/resources/documents/documents.ts +1 -1
  23. package/resources/documents/requests/requests.ts +1 -1
  24. package/resources/documents/stamps/stamp.ts +40 -210
  25. package/resources/documents/templates/templates.ts +158 -318
  26. package/resources/jobs/colleagues/activity/activity.ts +2 -2
  27. package/resources/jobs/conduct/conduct.ts +2 -2
  28. package/resources/jobs/jobs.ts +22 -0
  29. package/resources/jobs/labels/labels.ts +9 -9
  30. package/resources/laws/laws.ts +96 -50
  31. package/resources/livemap/markers/marker_marker.ts +311 -4
  32. package/resources/mailer/access/access.ts +0 -457
  33. package/resources/mailer/emails/email.ts +4 -4
  34. package/resources/notifications/events/events.ts +18 -1
  35. package/resources/permissions/attributes/attributes.ts +51 -39
  36. package/resources/permissions/permissions/permissions.ts +46 -34
  37. package/resources/qualifications/access/access.ts +0 -248
  38. package/resources/qualifications/qualifications.ts +9 -9
  39. package/resources/settings/config.ts +53 -5
  40. package/resources/settings/data.ts +1 -1
  41. package/resources/stats/stats.ts +32 -20
  42. package/resources/sync/data/data.ts +22 -10
  43. package/resources/userinfo/userinfo.ts +202 -51
  44. package/resources/users/activity/activity.ts +70 -77
  45. package/resources/wiki/access/access.ts +0 -330
  46. package/resources/wiki/activity/activity.ts +45 -45
  47. package/resources/wiki/page.ts +9 -9
  48. package/services/auth/auth.ts +1 -1
  49. package/services/calendar/calendar.ts +1 -1
  50. package/services/calendar/entries.ts +13 -2
  51. package/services/centrum/dispatches.ts +32 -12
  52. package/services/centrum/units.client.ts +15 -2
  53. package/services/centrum/units.ts +237 -129
  54. package/services/citizens/citizens.ts +1 -1
  55. package/services/citizens/labels.client.ts +13 -0
  56. package/services/citizens/labels.ts +135 -4
  57. package/services/completor/completor.client.ts +0 -13
  58. package/services/completor/completor.ts +2 -116
  59. package/services/documents/approval.ts +20 -9
  60. package/services/documents/categories.ts +1 -1
  61. package/services/documents/collab.ts +1 -1
  62. package/services/documents/comments.ts +4 -4
  63. package/services/documents/documents.ts +38 -38
  64. package/services/documents/stats.ts +14 -2
  65. package/services/documents/templates.ts +1 -1
  66. package/services/filestore/filestore.ts +4 -4
  67. package/services/jobs/colleagues.ts +4 -4
  68. package/services/jobs/conduct.ts +2 -2
  69. package/services/jobs/groups.client.ts +22 -0
  70. package/services/jobs/groups.ts +9 -0
  71. package/services/jobs/timeclock.ts +2 -2
  72. package/services/mailer/settings.ts +1 -1
  73. package/services/mailer/thread.ts +3 -3
  74. package/services/qualifications/exam.ts +5 -5
  75. package/services/qualifications/qualifications.ts +52 -34
  76. package/services/settings/accounts.ts +19 -6
  77. package/services/settings/config.ts +2 -2
  78. package/services/settings/cron.ts +2 -2
  79. package/services/settings/laws.client.ts +44 -5
  80. package/services/settings/laws.ts +357 -4
  81. package/services/settings/system.ts +6 -6
  82. package/services/sync/sync.client.ts +42 -14
  83. package/services/sync/sync.ts +162 -13
  84. package/services/wiki/collab.ts +1 -1
  85. package/services/wiki/wiki.client.ts +15 -2
  86. package/services/wiki/wiki.ts +122 -0
  87. package/svcs.ts +19 -1
@@ -33,31 +33,35 @@ export interface RoleAttribute {
33
33
  */
34
34
  permissionId: number;
35
35
  /**
36
- * @generated from protobuf field: string category = 5
36
+ * @generated from protobuf field: string namespace = 5
37
37
  */
38
- category: string;
38
+ namespace: string;
39
39
  /**
40
- * @generated from protobuf field: string name = 6
40
+ * @generated from protobuf field: string service = 6
41
+ */
42
+ service: string;
43
+ /**
44
+ * @generated from protobuf field: string name = 7
41
45
  */
42
46
  name: string;
43
47
  /**
44
- * @generated from protobuf field: string key = 7
48
+ * @generated from protobuf field: string key = 8
45
49
  */
46
50
  key: string;
47
51
  /**
48
- * @generated from protobuf field: string type = 8
52
+ * @generated from protobuf field: string type = 9
49
53
  */
50
54
  type: string;
51
55
  /**
52
- * @generated from protobuf field: resources.permissions.attributes.AttributeValues valid_values = 9
56
+ * @generated from protobuf field: resources.permissions.attributes.AttributeValues valid_values = 10
53
57
  */
54
58
  validValues?: AttributeValues;
55
59
  /**
56
- * @generated from protobuf field: resources.permissions.attributes.AttributeValues value = 10
60
+ * @generated from protobuf field: resources.permissions.attributes.AttributeValues value = 11
57
61
  */
58
62
  value?: AttributeValues;
59
63
  /**
60
- * @generated from protobuf field: optional resources.permissions.attributes.AttributeValues max_values = 11
64
+ * @generated from protobuf field: optional resources.permissions.attributes.AttributeValues max_values = 12
61
65
  */
62
66
  maxValues?: AttributeValues;
63
67
  }
@@ -158,13 +162,14 @@ class RoleAttribute$Type extends MessageType<RoleAttribute> {
158
162
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
159
163
  { no: 3, name: "attr_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
160
164
  { no: 4, name: "permission_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
161
- { no: 5, name: "category", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } },
162
- { no: 6, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
163
- { no: 7, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
164
- { no: 8, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
165
- { no: 9, name: "valid_values", kind: "message", T: () => AttributeValues },
166
- { no: 10, name: "value", kind: "message", T: () => AttributeValues },
167
- { no: 11, name: "max_values", kind: "message", T: () => AttributeValues }
165
+ { no: 5, name: "namespace", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } } } },
166
+ { no: 6, name: "service", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
167
+ { no: 7, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
168
+ { no: 8, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
169
+ { no: 9, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
170
+ { no: 10, name: "valid_values", kind: "message", T: () => AttributeValues },
171
+ { no: 11, name: "value", kind: "message", T: () => AttributeValues },
172
+ { no: 12, name: "max_values", kind: "message", T: () => AttributeValues }
168
173
  ]);
169
174
  }
170
175
  create(value?: PartialMessage<RoleAttribute>): RoleAttribute {
@@ -172,7 +177,8 @@ class RoleAttribute$Type extends MessageType<RoleAttribute> {
172
177
  message.roleId = 0;
173
178
  message.attrId = 0;
174
179
  message.permissionId = 0;
175
- message.category = "";
180
+ message.namespace = "";
181
+ message.service = "";
176
182
  message.name = "";
177
183
  message.key = "";
178
184
  message.type = "";
@@ -197,25 +203,28 @@ class RoleAttribute$Type extends MessageType<RoleAttribute> {
197
203
  case /* int64 permission_id */ 4:
198
204
  message.permissionId = reader.int64().toNumber();
199
205
  break;
200
- case /* string category */ 5:
201
- message.category = reader.string();
206
+ case /* string namespace */ 5:
207
+ message.namespace = reader.string();
208
+ break;
209
+ case /* string service */ 6:
210
+ message.service = reader.string();
202
211
  break;
203
- case /* string name */ 6:
212
+ case /* string name */ 7:
204
213
  message.name = reader.string();
205
214
  break;
206
- case /* string key */ 7:
215
+ case /* string key */ 8:
207
216
  message.key = reader.string();
208
217
  break;
209
- case /* string type */ 8:
218
+ case /* string type */ 9:
210
219
  message.type = reader.string();
211
220
  break;
212
- case /* resources.permissions.attributes.AttributeValues valid_values */ 9:
221
+ case /* resources.permissions.attributes.AttributeValues valid_values */ 10:
213
222
  message.validValues = AttributeValues.internalBinaryRead(reader, reader.uint32(), options, message.validValues);
214
223
  break;
215
- case /* resources.permissions.attributes.AttributeValues value */ 10:
224
+ case /* resources.permissions.attributes.AttributeValues value */ 11:
216
225
  message.value = AttributeValues.internalBinaryRead(reader, reader.uint32(), options, message.value);
217
226
  break;
218
- case /* optional resources.permissions.attributes.AttributeValues max_values */ 11:
227
+ case /* optional resources.permissions.attributes.AttributeValues max_values */ 12:
219
228
  message.maxValues = AttributeValues.internalBinaryRead(reader, reader.uint32(), options, message.maxValues);
220
229
  break;
221
230
  default:
@@ -242,27 +251,30 @@ class RoleAttribute$Type extends MessageType<RoleAttribute> {
242
251
  /* int64 permission_id = 4; */
243
252
  if (message.permissionId !== 0)
244
253
  writer.tag(4, WireType.Varint).int64(message.permissionId);
245
- /* string category = 5; */
246
- if (message.category !== "")
247
- writer.tag(5, WireType.LengthDelimited).string(message.category);
248
- /* string name = 6; */
254
+ /* string namespace = 5; */
255
+ if (message.namespace !== "")
256
+ writer.tag(5, WireType.LengthDelimited).string(message.namespace);
257
+ /* string service = 6; */
258
+ if (message.service !== "")
259
+ writer.tag(6, WireType.LengthDelimited).string(message.service);
260
+ /* string name = 7; */
249
261
  if (message.name !== "")
250
- writer.tag(6, WireType.LengthDelimited).string(message.name);
251
- /* string key = 7; */
262
+ writer.tag(7, WireType.LengthDelimited).string(message.name);
263
+ /* string key = 8; */
252
264
  if (message.key !== "")
253
- writer.tag(7, WireType.LengthDelimited).string(message.key);
254
- /* string type = 8; */
265
+ writer.tag(8, WireType.LengthDelimited).string(message.key);
266
+ /* string type = 9; */
255
267
  if (message.type !== "")
256
- writer.tag(8, WireType.LengthDelimited).string(message.type);
257
- /* resources.permissions.attributes.AttributeValues valid_values = 9; */
268
+ writer.tag(9, WireType.LengthDelimited).string(message.type);
269
+ /* resources.permissions.attributes.AttributeValues valid_values = 10; */
258
270
  if (message.validValues)
259
- AttributeValues.internalBinaryWrite(message.validValues, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
260
- /* resources.permissions.attributes.AttributeValues value = 10; */
271
+ AttributeValues.internalBinaryWrite(message.validValues, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
272
+ /* resources.permissions.attributes.AttributeValues value = 11; */
261
273
  if (message.value)
262
- AttributeValues.internalBinaryWrite(message.value, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
263
- /* optional resources.permissions.attributes.AttributeValues max_values = 11; */
274
+ AttributeValues.internalBinaryWrite(message.value, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
275
+ /* optional resources.permissions.attributes.AttributeValues max_values = 12; */
264
276
  if (message.maxValues)
265
- AttributeValues.internalBinaryWrite(message.maxValues, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
277
+ AttributeValues.internalBinaryWrite(message.maxValues, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
266
278
  let u = options.writeUnknownFields;
267
279
  if (u !== false)
268
280
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -26,27 +26,31 @@ export interface Permission {
26
26
  */
27
27
  createdAt?: Timestamp;
28
28
  /**
29
- * @generated from protobuf field: string category = 3
29
+ * @generated from protobuf field: string namespace = 3
30
30
  */
31
- category: string;
31
+ namespace: string;
32
32
  /**
33
- * @generated from protobuf field: string name = 4
33
+ * @generated from protobuf field: string service = 4
34
+ */
35
+ service: string;
36
+ /**
37
+ * @generated from protobuf field: string name = 5
34
38
  */
35
39
  name: string;
36
40
  /**
37
- * @generated from protobuf field: string guard_name = 5
41
+ * @generated from protobuf field: string guard_name = 6
38
42
  */
39
43
  guardName: string;
40
44
  /**
41
- * @generated from protobuf field: bool val = 6
45
+ * @generated from protobuf field: bool val = 7
42
46
  */
43
47
  val: boolean;
44
48
  /**
45
- * @generated from protobuf field: optional int32 order = 7
49
+ * @generated from protobuf field: optional int32 order = 8
46
50
  */
47
51
  order?: number;
48
52
  /**
49
- * @generated from protobuf field: optional string icon = 8
53
+ * @generated from protobuf field: optional string icon = 9
50
54
  */
51
55
  icon?: string;
52
56
  }
@@ -106,18 +110,20 @@ class Permission$Type extends MessageType<Permission> {
106
110
  super("resources.permissions.permissions.Permission", [
107
111
  { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
108
112
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
109
- { no: 3, name: "category", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } },
110
- { no: 4, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
111
- { no: 5, name: "guard_name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
112
- { no: 6, name: "val", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
113
- { no: 7, name: "order", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
114
- { no: 8, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } }
113
+ { no: 3, name: "namespace", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } } } },
114
+ { no: 4, name: "service", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
115
+ { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
116
+ { no: 6, name: "guard_name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
117
+ { no: 7, name: "val", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
118
+ { no: 8, name: "order", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
119
+ { no: 9, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } }
115
120
  ]);
116
121
  }
117
122
  create(value?: PartialMessage<Permission>): Permission {
118
123
  const message = globalThis.Object.create((this.messagePrototype!));
119
124
  message.id = 0;
120
- message.category = "";
125
+ message.namespace = "";
126
+ message.service = "";
121
127
  message.name = "";
122
128
  message.guardName = "";
123
129
  message.val = false;
@@ -136,22 +142,25 @@ class Permission$Type extends MessageType<Permission> {
136
142
  case /* optional resources.timestamp.Timestamp created_at */ 2:
137
143
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
138
144
  break;
139
- case /* string category */ 3:
140
- message.category = reader.string();
145
+ case /* string namespace */ 3:
146
+ message.namespace = reader.string();
147
+ break;
148
+ case /* string service */ 4:
149
+ message.service = reader.string();
141
150
  break;
142
- case /* string name */ 4:
151
+ case /* string name */ 5:
143
152
  message.name = reader.string();
144
153
  break;
145
- case /* string guard_name */ 5:
154
+ case /* string guard_name */ 6:
146
155
  message.guardName = reader.string();
147
156
  break;
148
- case /* bool val */ 6:
157
+ case /* bool val */ 7:
149
158
  message.val = reader.bool();
150
159
  break;
151
- case /* optional int32 order */ 7:
160
+ case /* optional int32 order */ 8:
152
161
  message.order = reader.int32();
153
162
  break;
154
- case /* optional string icon */ 8:
163
+ case /* optional string icon */ 9:
155
164
  message.icon = reader.string();
156
165
  break;
157
166
  default:
@@ -172,24 +181,27 @@ class Permission$Type extends MessageType<Permission> {
172
181
  /* optional resources.timestamp.Timestamp created_at = 2; */
173
182
  if (message.createdAt)
174
183
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
175
- /* string category = 3; */
176
- if (message.category !== "")
177
- writer.tag(3, WireType.LengthDelimited).string(message.category);
178
- /* string name = 4; */
184
+ /* string namespace = 3; */
185
+ if (message.namespace !== "")
186
+ writer.tag(3, WireType.LengthDelimited).string(message.namespace);
187
+ /* string service = 4; */
188
+ if (message.service !== "")
189
+ writer.tag(4, WireType.LengthDelimited).string(message.service);
190
+ /* string name = 5; */
179
191
  if (message.name !== "")
180
- writer.tag(4, WireType.LengthDelimited).string(message.name);
181
- /* string guard_name = 5; */
192
+ writer.tag(5, WireType.LengthDelimited).string(message.name);
193
+ /* string guard_name = 6; */
182
194
  if (message.guardName !== "")
183
- writer.tag(5, WireType.LengthDelimited).string(message.guardName);
184
- /* bool val = 6; */
195
+ writer.tag(6, WireType.LengthDelimited).string(message.guardName);
196
+ /* bool val = 7; */
185
197
  if (message.val !== false)
186
- writer.tag(6, WireType.Varint).bool(message.val);
187
- /* optional int32 order = 7; */
198
+ writer.tag(7, WireType.Varint).bool(message.val);
199
+ /* optional int32 order = 8; */
188
200
  if (message.order !== undefined)
189
- writer.tag(7, WireType.Varint).int32(message.order);
190
- /* optional string icon = 8; */
201
+ writer.tag(8, WireType.Varint).int32(message.order);
202
+ /* optional string icon = 9; */
191
203
  if (message.icon !== undefined)
192
- writer.tag(8, WireType.LengthDelimited).string(message.icon);
204
+ writer.tag(9, WireType.LengthDelimited).string(message.icon);
193
205
  let u = options.writeUnknownFields;
194
206
  if (u !== false)
195
207
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2,69 +2,6 @@
2
2
  // @generated from protobuf file "resources/qualifications/access/access.proto" (package "resources.qualifications.access", syntax proto3)
3
3
  // tslint:disable
4
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 { Timestamp } from "../../timestamp/timestamp";
15
- /**
16
- * @generated from protobuf message resources.qualifications.access.QualificationAccess
17
- */
18
- export interface QualificationAccess {
19
- /**
20
- * @generated from protobuf field: repeated resources.qualifications.access.QualificationJobAccess jobs = 1
21
- */
22
- jobs: QualificationJobAccess[];
23
- }
24
- /**
25
- * @generated from protobuf message resources.qualifications.access.QualificationJobAccess
26
- */
27
- export interface QualificationJobAccess {
28
- /**
29
- * @generated from protobuf field: int64 id = 1
30
- */
31
- id: number;
32
- /**
33
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
34
- */
35
- createdAt?: Timestamp;
36
- /**
37
- * @generated from protobuf field: int64 target_id = 4
38
- */
39
- targetId: number;
40
- /**
41
- * @generated from protobuf field: string job = 5
42
- */
43
- job: string;
44
- /**
45
- * @generated from protobuf field: optional string job_label = 6
46
- */
47
- jobLabel?: string;
48
- /**
49
- * @generated from protobuf field: int32 minimum_grade = 7
50
- */
51
- minimumGrade: number;
52
- /**
53
- * @generated from protobuf field: optional string job_grade_label = 8
54
- */
55
- jobGradeLabel?: string;
56
- /**
57
- * @generated from protobuf field: resources.qualifications.access.AccessLevel access = 9
58
- */
59
- access: AccessLevel;
60
- }
61
- /**
62
- * Dummy - DO NOT USE!
63
- *
64
- * @generated from protobuf message resources.qualifications.access.QualificationUserAccess
65
- */
66
- export interface QualificationUserAccess {
67
- }
68
5
  /**
69
6
  * @generated from protobuf enum resources.qualifications.access.AccessLevel
70
7
  */
@@ -98,188 +35,3 @@ export enum AccessLevel {
98
35
  */
99
36
  EDIT = 6
100
37
  }
101
- // @generated message type with reflection information, may provide speed optimized methods
102
- class QualificationAccess$Type extends MessageType<QualificationAccess> {
103
- constructor() {
104
- super("resources.qualifications.access.QualificationAccess", [
105
- { no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QualificationJobAccess }
106
- ]);
107
- }
108
- create(value?: PartialMessage<QualificationAccess>): QualificationAccess {
109
- const message = globalThis.Object.create((this.messagePrototype!));
110
- message.jobs = [];
111
- if (value !== undefined)
112
- reflectionMergePartial<QualificationAccess>(this, message, value);
113
- return message;
114
- }
115
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: QualificationAccess): QualificationAccess {
116
- let message = target ?? this.create(), end = reader.pos + length;
117
- while (reader.pos < end) {
118
- let [fieldNo, wireType] = reader.tag();
119
- switch (fieldNo) {
120
- case /* repeated resources.qualifications.access.QualificationJobAccess jobs */ 1:
121
- message.jobs.push(QualificationJobAccess.internalBinaryRead(reader, reader.uint32(), options));
122
- break;
123
- default:
124
- let u = options.readUnknownField;
125
- if (u === "throw")
126
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
127
- let d = reader.skip(wireType);
128
- if (u !== false)
129
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
130
- }
131
- }
132
- return message;
133
- }
134
- internalBinaryWrite(message: QualificationAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
135
- /* repeated resources.qualifications.access.QualificationJobAccess jobs = 1; */
136
- for (let i = 0; i < message.jobs.length; i++)
137
- QualificationJobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
138
- let u = options.writeUnknownFields;
139
- if (u !== false)
140
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
141
- return writer;
142
- }
143
- }
144
- /**
145
- * @generated MessageType for protobuf message resources.qualifications.access.QualificationAccess
146
- */
147
- export const QualificationAccess = new QualificationAccess$Type();
148
- // @generated message type with reflection information, may provide speed optimized methods
149
- class QualificationJobAccess$Type extends MessageType<QualificationJobAccess> {
150
- constructor() {
151
- super("resources.qualifications.access.QualificationJobAccess", [
152
- { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
153
- { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
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.access.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
160
- ]);
161
- }
162
- create(value?: PartialMessage<QualificationJobAccess>): QualificationJobAccess {
163
- const message = globalThis.Object.create((this.messagePrototype!));
164
- message.id = 0;
165
- message.targetId = 0;
166
- message.job = "";
167
- message.minimumGrade = 0;
168
- message.access = 0;
169
- if (value !== undefined)
170
- reflectionMergePartial<QualificationJobAccess>(this, message, value);
171
- return message;
172
- }
173
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: QualificationJobAccess): QualificationJobAccess {
174
- let message = target ?? this.create(), end = reader.pos + length;
175
- while (reader.pos < end) {
176
- let [fieldNo, wireType] = reader.tag();
177
- switch (fieldNo) {
178
- case /* int64 id */ 1:
179
- message.id = reader.int64().toNumber();
180
- break;
181
- case /* optional resources.timestamp.Timestamp created_at */ 2:
182
- message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
183
- break;
184
- case /* int64 target_id */ 4:
185
- message.targetId = reader.int64().toNumber();
186
- break;
187
- case /* string job */ 5:
188
- message.job = reader.string();
189
- break;
190
- case /* optional string job_label */ 6:
191
- message.jobLabel = reader.string();
192
- break;
193
- case /* int32 minimum_grade */ 7:
194
- message.minimumGrade = reader.int32();
195
- break;
196
- case /* optional string job_grade_label */ 8:
197
- message.jobGradeLabel = reader.string();
198
- break;
199
- case /* resources.qualifications.access.AccessLevel access */ 9:
200
- message.access = reader.int32();
201
- break;
202
- default:
203
- let u = options.readUnknownField;
204
- if (u === "throw")
205
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
206
- let d = reader.skip(wireType);
207
- if (u !== false)
208
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
209
- }
210
- }
211
- return message;
212
- }
213
- internalBinaryWrite(message: QualificationJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
214
- /* int64 id = 1; */
215
- if (message.id !== 0)
216
- writer.tag(1, WireType.Varint).int64(message.id);
217
- /* optional resources.timestamp.Timestamp created_at = 2; */
218
- if (message.createdAt)
219
- Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
220
- /* int64 target_id = 4; */
221
- if (message.targetId !== 0)
222
- writer.tag(4, WireType.Varint).int64(message.targetId);
223
- /* string job = 5; */
224
- if (message.job !== "")
225
- writer.tag(5, WireType.LengthDelimited).string(message.job);
226
- /* optional string job_label = 6; */
227
- if (message.jobLabel !== undefined)
228
- writer.tag(6, WireType.LengthDelimited).string(message.jobLabel);
229
- /* int32 minimum_grade = 7; */
230
- if (message.minimumGrade !== 0)
231
- writer.tag(7, WireType.Varint).int32(message.minimumGrade);
232
- /* optional string job_grade_label = 8; */
233
- if (message.jobGradeLabel !== undefined)
234
- writer.tag(8, WireType.LengthDelimited).string(message.jobGradeLabel);
235
- /* resources.qualifications.access.AccessLevel access = 9; */
236
- if (message.access !== 0)
237
- writer.tag(9, WireType.Varint).int32(message.access);
238
- let u = options.writeUnknownFields;
239
- if (u !== false)
240
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
241
- return writer;
242
- }
243
- }
244
- /**
245
- * @generated MessageType for protobuf message resources.qualifications.access.QualificationJobAccess
246
- */
247
- export const QualificationJobAccess = new QualificationJobAccess$Type();
248
- // @generated message type with reflection information, may provide speed optimized methods
249
- class QualificationUserAccess$Type extends MessageType<QualificationUserAccess> {
250
- constructor() {
251
- super("resources.qualifications.access.QualificationUserAccess", []);
252
- }
253
- create(value?: PartialMessage<QualificationUserAccess>): QualificationUserAccess {
254
- const message = globalThis.Object.create((this.messagePrototype!));
255
- if (value !== undefined)
256
- reflectionMergePartial<QualificationUserAccess>(this, message, value);
257
- return message;
258
- }
259
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: QualificationUserAccess): QualificationUserAccess {
260
- let message = target ?? this.create(), end = reader.pos + length;
261
- while (reader.pos < end) {
262
- let [fieldNo, wireType] = reader.tag();
263
- switch (fieldNo) {
264
- default:
265
- let u = options.readUnknownField;
266
- if (u === "throw")
267
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
268
- let d = reader.skip(wireType);
269
- if (u !== false)
270
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
271
- }
272
- }
273
- return message;
274
- }
275
- internalBinaryWrite(message: QualificationUserAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
276
- let u = options.writeUnknownFields;
277
- if (u !== false)
278
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
279
- return writer;
280
- }
281
- }
282
- /**
283
- * @generated MessageType for protobuf message resources.qualifications.access.QualificationUserAccess
284
- */
285
- export const QualificationUserAccess = new QualificationUserAccess$Type();
@@ -15,7 +15,7 @@ import { File } from "../file/file";
15
15
  import { ExamQuestions } from "./exam/exam";
16
16
  import { QualificationExamSettings } from "./exam/exam";
17
17
  import { QualificationExamMode } from "./exam/exam";
18
- import { QualificationAccess } from "./access/access";
18
+ import { Access } from "../access/access";
19
19
  import { UserShort } from "../users/short/user";
20
20
  import { Content } from "../common/content/content";
21
21
  import { Timestamp } from "../timestamp/timestamp";
@@ -88,9 +88,9 @@ export interface Qualification {
88
88
  */
89
89
  creatorJob: string;
90
90
  /**
91
- * @generated from protobuf field: resources.qualifications.access.QualificationAccess access = 17
91
+ * @generated from protobuf field: resources.access.Access access = 17
92
92
  */
93
- access?: QualificationAccess;
93
+ access?: Access;
94
94
  /**
95
95
  * @generated from protobuf field: repeated resources.qualifications.QualificationRequirement requirements = 18
96
96
  */
@@ -443,7 +443,7 @@ class Qualification$Type extends MessageType<Qualification> {
443
443
  { no: 14, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
444
444
  { no: 15, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
445
445
  { no: 16, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
446
- { no: 17, name: "access", kind: "message", T: () => QualificationAccess },
446
+ { no: 17, name: "access", kind: "message", T: () => Access },
447
447
  { no: 18, name: "requirements", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QualificationRequirement },
448
448
  { no: 19, name: "discord_sync_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
449
449
  { no: 20, name: "discord_settings", kind: "message", T: () => QualificationDiscordSettings },
@@ -454,7 +454,7 @@ class Qualification$Type extends MessageType<Qualification> {
454
454
  { no: 25, name: "request", kind: "message", T: () => QualificationRequest },
455
455
  { no: 26, name: "label_sync_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
456
456
  { no: 27, name: "label_sync_format", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
457
- { no: 28, name: "files", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => File, options: { "tagger.tags": "alias:\"files\"" } }
457
+ { no: 28, name: "files", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => File, options: { "buf.validate.field": { repeated: { maxItems: "5" } }, "tagger.tags": "alias:\"files\"" } }
458
458
  ]);
459
459
  }
460
460
  create(value?: PartialMessage<Qualification>): Qualification {
@@ -530,8 +530,8 @@ class Qualification$Type extends MessageType<Qualification> {
530
530
  case /* string creator_job */ 16:
531
531
  message.creatorJob = reader.string();
532
532
  break;
533
- case /* resources.qualifications.access.QualificationAccess access */ 17:
534
- message.access = QualificationAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
533
+ case /* resources.access.Access access */ 17:
534
+ message.access = Access.internalBinaryRead(reader, reader.uint32(), options, message.access);
535
535
  break;
536
536
  case /* repeated resources.qualifications.QualificationRequirement requirements */ 18:
537
537
  message.requirements.push(QualificationRequirement.internalBinaryRead(reader, reader.uint32(), options));
@@ -626,9 +626,9 @@ class Qualification$Type extends MessageType<Qualification> {
626
626
  /* string creator_job = 16; */
627
627
  if (message.creatorJob !== "")
628
628
  writer.tag(16, WireType.LengthDelimited).string(message.creatorJob);
629
- /* resources.qualifications.access.QualificationAccess access = 17; */
629
+ /* resources.access.Access access = 17; */
630
630
  if (message.access)
631
- QualificationAccess.internalBinaryWrite(message.access, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
631
+ Access.internalBinaryWrite(message.access, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
632
632
  /* repeated resources.qualifications.QualificationRequirement requirements = 18; */
633
633
  for (let i = 0; i < message.requirements.length; i++)
634
634
  QualificationRequirement.internalBinaryWrite(message.requirements[i], writer.tag(18, WireType.LengthDelimited).fork(), options).join();