@fivenet-app/gen 2025.5.3 → 2026.3.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 (195) hide show
  1. package/README.md +1 -1
  2. package/buf/validate/validate.ts +11301 -0
  3. package/clients.ts +193 -154
  4. package/codegen/dbscanner/dbscanner.ts +91 -0
  5. package/codegen/perms/perms.ts +287 -0
  6. package/codegen/sanitizer/sanitizer.ts +113 -0
  7. package/google/protobuf/any.ts +4 -3
  8. package/google/protobuf/descriptor.ts +393 -239
  9. package/google/protobuf/duration.ts +4 -3
  10. package/google/protobuf/struct.ts +485 -0
  11. package/google/protobuf/timestamp.ts +4 -3
  12. package/package.json +3 -3
  13. package/perms.ts +217 -160
  14. package/resources/accounts/accounts.ts +115 -47
  15. package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +33 -32
  16. package/resources/audit/audit.ts +172 -53
  17. package/resources/calendar/{access.ts → access/access.ts} +72 -71
  18. package/resources/calendar/calendar.ts +79 -543
  19. package/resources/calendar/entries/entries.ts +474 -0
  20. package/resources/centrum/access/access.ts +345 -0
  21. package/resources/centrum/dispatchers/dispatchers.ts +149 -0
  22. package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +267 -164
  23. package/resources/centrum/joblist.ts +136 -0
  24. package/resources/centrum/settings/settings.ts +657 -0
  25. package/resources/centrum/{units_access.ts → units/access/access.ts} +78 -79
  26. package/resources/centrum/{units.ts → units/units.ts} +230 -130
  27. package/resources/clientconfig/clientconfig.ts +1015 -0
  28. package/resources/collab/collab.ts +805 -0
  29. package/resources/common/content/content.ts +169 -63
  30. package/resources/common/content/diff_activity.ts +267 -0
  31. package/resources/common/database/database.ts +92 -35
  32. package/resources/common/error.ts +17 -16
  33. package/resources/common/i18n.ts +20 -24
  34. package/resources/common/id_mapping.ts +69 -0
  35. package/resources/common/tests/objects.ts +4 -3
  36. package/resources/{common/cron → cron}/cron.ts +77 -65
  37. package/resources/discord/discord.ts +209 -0
  38. package/resources/documents/{access.ts → access/access.ts} +75 -76
  39. package/resources/documents/{activity.ts → activity/activity.ts} +349 -124
  40. package/resources/documents/approval/approval.ts +945 -0
  41. package/resources/documents/{category.ts → category/category.ts} +25 -32
  42. package/resources/documents/{comment.ts → comment/comment.ts} +35 -34
  43. package/resources/documents/data/data.ts +303 -0
  44. package/resources/documents/documents.ts +374 -686
  45. package/resources/{common/uuid.ts → documents/forms/forms.ts} +22 -21
  46. package/resources/documents/pins/pins.ts +127 -0
  47. package/resources/documents/references/references.ts +187 -0
  48. package/resources/documents/relations/relations.ts +184 -0
  49. package/resources/documents/{requests.ts → requests/requests.ts} +45 -44
  50. package/resources/documents/stamps/stamp.ts +355 -0
  51. package/resources/documents/{templates.ts → templates/templates.ts} +524 -199
  52. package/resources/documents/workflow/workflow.ts +600 -0
  53. package/resources/file/file.ts +152 -0
  54. package/{services/settings → resources/file}/filestore.ts +179 -165
  55. package/resources/file/meta.ts +148 -0
  56. package/resources/{common/grpcws → grpcws}/grpcws.ts +66 -65
  57. package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +83 -86
  58. package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +76 -80
  59. package/resources/jobs/{conduct.ts → conduct/conduct.ts} +86 -62
  60. package/resources/jobs/jobs.ts +14 -13
  61. package/resources/jobs/{labels.ts → labels/labels.ts} +36 -37
  62. package/resources/jobs/{job_props.ts → props/props.ts} +63 -65
  63. package/resources/jobs/{job_settings.ts → settings/settings.ts} +89 -96
  64. package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +42 -41
  65. package/resources/laws/laws.ts +40 -49
  66. package/resources/livemap/coords.ts +81 -0
  67. package/resources/livemap/heatmap/heatmap.ts +93 -0
  68. package/resources/livemap/{livemap.ts → markers/marker_marker.ts} +68 -335
  69. package/resources/livemap/markers/user_marker.ts +377 -0
  70. package/resources/mailer/{access.ts → access/access.ts} +119 -118
  71. package/resources/mailer/{email.ts → emails/email.ts} +38 -41
  72. package/resources/mailer/{events.ts → events/events.ts} +44 -43
  73. package/resources/mailer/{message.ts → messages/message.ts} +69 -74
  74. package/resources/mailer/{settings.ts → settings/settings.ts} +23 -25
  75. package/resources/mailer/{template.ts → templates/template.ts} +37 -40
  76. package/resources/mailer/{thread.ts → threads/thread.ts} +93 -94
  77. package/resources/notifications/clientview/clientview.ts +239 -0
  78. package/resources/notifications/{events.ts → events/events.ts} +67 -130
  79. package/resources/notifications/notifications.ts +55 -60
  80. package/resources/permissions/{attributes.ts → attributes/attributes.ts} +94 -237
  81. package/resources/permissions/events/events.ts +149 -0
  82. package/resources/permissions/{permissions.ts → permissions/permissions.ts} +127 -47
  83. package/resources/qualifications/{access.ts → access/access.ts} +43 -42
  84. package/resources/qualifications/{exam.ts → exam/exam.ts} +419 -229
  85. package/resources/qualifications/qualifications.ts +327 -388
  86. package/resources/settings/banner.ts +14 -21
  87. package/resources/settings/config.ts +663 -79
  88. package/resources/settings/data.ts +90 -0
  89. package/resources/settings/perms.ts +151 -0
  90. package/resources/settings/status.ts +533 -0
  91. package/resources/stats/stats.ts +382 -2
  92. package/resources/sync/{activity.ts → activity/activity.ts} +126 -46
  93. package/resources/sync/data/data.ts +1001 -0
  94. package/resources/sync/data/v2/data.ts +220 -0
  95. package/resources/timestamp/timestamp.ts +3 -2
  96. package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
  97. package/resources/userinfo/userinfo.ts +442 -0
  98. package/resources/users/{activity.ts → activity/activity.ts} +182 -166
  99. package/resources/users/{labels.ts → labels/labels.ts} +27 -30
  100. package/resources/users/{licenses.ts → licenses/licenses.ts} +18 -17
  101. package/resources/users/{props.ts → props/props.ts} +109 -77
  102. package/resources/users/short/user.ts +184 -0
  103. package/resources/users/user.ts +528 -0
  104. package/resources/vehicles/activity/activity.ts +231 -0
  105. package/resources/vehicles/props/props.ts +125 -0
  106. package/resources/vehicles/vehicles.ts +43 -18
  107. package/resources/wiki/{access.ts → access/access.ts} +72 -71
  108. package/resources/wiki/{activity.ts → activity/activity.ts} +218 -102
  109. package/resources/wiki/page.ts +164 -93
  110. package/services/auth/auth.client.ts +45 -35
  111. package/services/auth/auth.ts +498 -288
  112. package/services/calendar/calendar.client.ts +32 -91
  113. package/services/calendar/calendar.ts +157 -134
  114. package/services/centrum/centrum.client.ts +97 -137
  115. package/services/centrum/centrum.ts +755 -352
  116. package/services/citizens/citizens.client.ts +70 -39
  117. package/services/citizens/citizens.ts +226 -112
  118. package/services/completor/completor.client.ts +16 -35
  119. package/services/completor/completor.ts +95 -54
  120. package/services/documents/approval.client.ts +188 -0
  121. package/services/documents/approval.ts +1776 -0
  122. package/services/documents/collab.client.ts +46 -0
  123. package/services/documents/collab.ts +13 -0
  124. package/services/documents/documents.client.ts +88 -217
  125. package/services/documents/documents.ts +579 -619
  126. package/services/documents/forms.client.ts +51 -0
  127. package/services/documents/forms.ts +232 -0
  128. package/services/documents/stamps.client.ts +77 -0
  129. package/services/documents/stamps.ts +481 -0
  130. package/services/documents/stats.client.ts +38 -0
  131. package/services/documents/stats.ts +245 -0
  132. package/services/filestore/filestore.client.ts +86 -0
  133. package/services/filestore/filestore.ts +262 -0
  134. package/services/jobs/conduct.client.ts +40 -28
  135. package/services/jobs/conduct.ts +183 -56
  136. package/services/jobs/jobs.client.ts +22 -61
  137. package/services/jobs/jobs.ts +138 -121
  138. package/services/jobs/stats.client.ts +38 -0
  139. package/services/jobs/stats.ts +207 -0
  140. package/services/jobs/timeclock.client.ts +8 -19
  141. package/services/jobs/timeclock.ts +76 -75
  142. package/services/livemap/livemap.client.ts +8 -19
  143. package/services/livemap/livemap.ts +297 -126
  144. package/services/mailer/mailer.client.ts +44 -127
  145. package/services/mailer/mailer.ts +266 -269
  146. package/services/notifications/notifications.client.ts +65 -0
  147. package/services/{notificator/notificator.ts → notifications/notifications.ts} +126 -83
  148. package/services/qualifications/qualifications.client.ts +46 -91
  149. package/services/qualifications/qualifications.ts +250 -209
  150. package/services/settings/accounts.client.ts +31 -33
  151. package/services/settings/accounts.ts +251 -67
  152. package/services/settings/config.client.ts +6 -13
  153. package/services/settings/config.ts +8 -7
  154. package/services/settings/cron.client.ts +4 -7
  155. package/services/settings/cron.ts +7 -6
  156. package/services/settings/laws.client.ts +10 -25
  157. package/services/settings/laws.ts +30 -29
  158. package/services/settings/settings.client.ts +57 -103
  159. package/services/settings/settings.ts +237 -633
  160. package/services/settings/system.client.ts +103 -0
  161. package/services/settings/system.ts +718 -0
  162. package/services/stats/stats.client.ts +9 -8
  163. package/services/stats/stats.ts +27 -26
  164. package/services/sync/sync.client.ts +16 -15
  165. package/services/sync/sync.ts +174 -97
  166. package/services/sync/v2/sync.client.ts +331 -0
  167. package/services/sync/v2/sync.ts +1766 -0
  168. package/services/vehicles/vehicles.client.ts +17 -7
  169. package/services/vehicles/vehicles.ts +170 -25
  170. package/services/wiki/collab.client.ts +46 -0
  171. package/services/wiki/collab.ts +13 -0
  172. package/services/wiki/wiki.client.ts +28 -37
  173. package/services/wiki/wiki.ts +97 -67
  174. package/svcs.ts +174 -106
  175. package/resources/centrum/attributes.ts +0 -186
  176. package/resources/centrum/disponents.ts +0 -81
  177. package/resources/centrum/settings.ts +0 -307
  178. package/resources/documents/workflow.ts +0 -351
  179. package/resources/filestore/file.ts +0 -204
  180. package/resources/internet/access.ts +0 -358
  181. package/resources/internet/ads.ts +0 -257
  182. package/resources/internet/domain.ts +0 -328
  183. package/resources/internet/page.ts +0 -428
  184. package/resources/internet/search.ts +0 -128
  185. package/resources/livemap/tracker.ts +0 -81
  186. package/resources/sync/data.ts +0 -587
  187. package/resources/users/users.ts +0 -435
  188. package/services/internet/ads.client.ts +0 -41
  189. package/services/internet/ads.ts +0 -145
  190. package/services/internet/domain.client.ts +0 -109
  191. package/services/internet/domain.ts +0 -658
  192. package/services/internet/internet.client.ts +0 -58
  193. package/services/internet/internet.ts +0 -268
  194. package/services/notificator/notificator.client.ts +0 -76
  195. package/services/settings/filestore.client.ts +0 -75
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
2
- // @generated from protobuf file "resources/permissions/attributes.proto" (package "resources.permissions", syntax proto3)
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
+ // @generated from protobuf file "resources/permissions/attributes/attributes.proto" (package "resources.permissions.attributes", 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";
@@ -10,105 +11,58 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
11
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
13
  import { MessageType } from "@protobuf-ts/runtime";
13
- import { Timestamp } from "../timestamp/timestamp";
14
+ import { Timestamp } from "../../timestamp/timestamp";
14
15
  /**
15
- * @generated from protobuf message resources.permissions.RawRoleAttribute
16
- */
17
- export interface RawRoleAttribute {
18
- /**
19
- * @generated from protobuf field: uint64 role_id = 1;
20
- */
21
- roleId: number;
22
- /**
23
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
24
- */
25
- createdAt?: Timestamp;
26
- /**
27
- * @generated from protobuf field: uint64 attr_id = 3;
28
- */
29
- attrId: number;
30
- /**
31
- * @generated from protobuf field: uint64 permission_id = 4;
32
- */
33
- permissionId: number;
34
- /**
35
- * @generated from protobuf field: string category = 5;
36
- */
37
- category: string;
38
- /**
39
- * @generated from protobuf field: string name = 6;
40
- */
41
- name: string;
42
- /**
43
- * @generated from protobuf field: string key = 7;
44
- */
45
- key: string;
46
- /**
47
- * @generated from protobuf field: string type = 8;
48
- */
49
- type: string;
50
- /**
51
- * @generated from protobuf field: resources.permissions.AttributeValues valid_values = 9;
52
- */
53
- validValues?: AttributeValues;
54
- /**
55
- * @generated from protobuf field: resources.permissions.AttributeValues value = 10;
56
- */
57
- value?: AttributeValues;
58
- }
59
- /**
60
- * @generated from protobuf message resources.permissions.RoleAttribute
16
+ * @generated from protobuf message resources.permissions.attributes.RoleAttribute
61
17
  */
62
18
  export interface RoleAttribute {
63
19
  /**
64
- * @generated from protobuf field: uint64 role_id = 1;
20
+ * @generated from protobuf field: int64 role_id = 1
65
21
  */
66
22
  roleId: number;
67
23
  /**
68
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
24
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
69
25
  */
70
26
  createdAt?: Timestamp;
71
27
  /**
72
- * @generated from protobuf field: uint64 attr_id = 3;
28
+ * @generated from protobuf field: int64 attr_id = 3
73
29
  */
74
30
  attrId: number;
75
31
  /**
76
- * @generated from protobuf field: uint64 permission_id = 4;
32
+ * @generated from protobuf field: int64 permission_id = 4
77
33
  */
78
34
  permissionId: number;
79
35
  /**
80
- * @generated from protobuf field: string category = 5;
36
+ * @generated from protobuf field: string category = 5
81
37
  */
82
38
  category: string;
83
39
  /**
84
- * @generated from protobuf field: string name = 6;
40
+ * @generated from protobuf field: string name = 6
85
41
  */
86
42
  name: string;
87
43
  /**
88
- * @generated from protobuf field: string key = 7;
44
+ * @generated from protobuf field: string key = 7
89
45
  */
90
46
  key: string;
91
47
  /**
92
- * @generated from protobuf field: string type = 8;
48
+ * @generated from protobuf field: string type = 8
93
49
  */
94
50
  type: string;
95
51
  /**
96
- * @generated from protobuf field: resources.permissions.AttributeValues valid_values = 9;
52
+ * @generated from protobuf field: resources.permissions.attributes.AttributeValues valid_values = 9
97
53
  */
98
54
  validValues?: AttributeValues;
99
55
  /**
100
- * @generated from protobuf field: resources.permissions.AttributeValues value = 10;
56
+ * @generated from protobuf field: resources.permissions.attributes.AttributeValues value = 10
101
57
  */
102
58
  value?: AttributeValues;
103
59
  /**
104
- * @generated from protobuf field: optional resources.permissions.AttributeValues max_values = 11;
60
+ * @generated from protobuf field: optional resources.permissions.attributes.AttributeValues max_values = 11
105
61
  */
106
62
  maxValues?: AttributeValues;
107
63
  }
108
64
  /**
109
- * @dbscanner: json
110
- *
111
- * @generated from protobuf message resources.permissions.AttributeValues
65
+ * @generated from protobuf message resources.permissions.attributes.AttributeValues
112
66
  */
113
67
  export interface AttributeValues {
114
68
  /**
@@ -117,19 +71,19 @@ export interface AttributeValues {
117
71
  validValues: {
118
72
  oneofKind: "stringList";
119
73
  /**
120
- * @generated from protobuf field: resources.permissions.StringList string_list = 1;
74
+ * @generated from protobuf field: resources.permissions.attributes.StringList string_list = 1
121
75
  */
122
76
  stringList: StringList;
123
77
  } | {
124
78
  oneofKind: "jobList";
125
79
  /**
126
- * @generated from protobuf field: resources.permissions.StringList job_list = 2;
80
+ * @generated from protobuf field: resources.permissions.attributes.StringList job_list = 2
127
81
  */
128
82
  jobList: StringList;
129
83
  } | {
130
84
  oneofKind: "jobGradeList";
131
85
  /**
132
- * @generated from protobuf field: resources.permissions.JobGradeList job_grade_list = 3;
86
+ * @generated from protobuf field: resources.permissions.attributes.JobGradeList job_grade_list = 3
133
87
  */
134
88
  jobGradeList: JobGradeList;
135
89
  } | {
@@ -137,174 +91,77 @@ export interface AttributeValues {
137
91
  };
138
92
  }
139
93
  /**
140
- * @generated from protobuf message resources.permissions.StringList
94
+ * @generated from protobuf message resources.permissions.attributes.StringList
141
95
  */
142
96
  export interface StringList {
143
97
  /**
144
- * @sanitize: method=StripTags
145
- *
146
- * @generated from protobuf field: repeated string strings = 1;
98
+ * @generated from protobuf field: repeated string strings = 1
147
99
  */
148
100
  strings: string[];
149
101
  }
150
102
  /**
151
- * @generated from protobuf message resources.permissions.JobGradeList
103
+ * @generated from protobuf message resources.permissions.attributes.JobGradeList
152
104
  */
153
105
  export interface JobGradeList {
154
106
  /**
155
- * @generated from protobuf field: bool fine_grained = 2;
107
+ * @generated from protobuf field: bool fine_grained = 2
156
108
  */
157
109
  fineGrained: boolean;
158
110
  /**
159
- * @generated from protobuf field: map<string, int32> jobs = 1;
111
+ * @generated from protobuf field: map<string, int32> jobs = 1
160
112
  */
161
113
  jobs: {
162
114
  [key: string]: number;
163
115
  };
164
116
  /**
165
- * @generated from protobuf field: map<string, resources.permissions.JobGrades> grades = 3;
117
+ * @generated from protobuf field: map<string, resources.permissions.attributes.JobGrades> grades = 3
166
118
  */
167
119
  grades: {
168
120
  [key: string]: JobGrades;
169
121
  };
170
122
  }
171
123
  /**
172
- * @generated from protobuf message resources.permissions.JobGrades
124
+ * @generated from protobuf message resources.permissions.attributes.JobGrades
173
125
  */
174
126
  export interface JobGrades {
175
127
  /**
176
- * @generated from protobuf field: repeated int32 grades = 1;
128
+ * @generated from protobuf field: repeated int32 grades = 1
177
129
  */
178
130
  grades: number[];
179
131
  }
180
- // @generated message type with reflection information, may provide speed optimized methods
181
- class RawRoleAttribute$Type extends MessageType<RawRoleAttribute> {
182
- constructor() {
183
- super("resources.permissions.RawRoleAttribute", [
184
- { no: 1, name: "role_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
185
- { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
186
- { no: 3, name: "attr_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
187
- { no: 4, name: "permission_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
188
- { no: 5, name: "category", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } },
189
- { no: 6, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
190
- { no: 7, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
191
- { no: 8, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
192
- { no: 9, name: "valid_values", kind: "message", T: () => AttributeValues },
193
- { no: 10, name: "value", kind: "message", T: () => AttributeValues }
194
- ]);
195
- }
196
- create(value?: PartialMessage<RawRoleAttribute>): RawRoleAttribute {
197
- const message = globalThis.Object.create((this.messagePrototype!));
198
- message.roleId = 0;
199
- message.attrId = 0;
200
- message.permissionId = 0;
201
- message.category = "";
202
- message.name = "";
203
- message.key = "";
204
- message.type = "";
205
- if (value !== undefined)
206
- reflectionMergePartial<RawRoleAttribute>(this, message, value);
207
- return message;
208
- }
209
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RawRoleAttribute): RawRoleAttribute {
210
- let message = target ?? this.create(), end = reader.pos + length;
211
- while (reader.pos < end) {
212
- let [fieldNo, wireType] = reader.tag();
213
- switch (fieldNo) {
214
- case /* uint64 role_id */ 1:
215
- message.roleId = reader.uint64().toNumber();
216
- break;
217
- case /* optional resources.timestamp.Timestamp created_at */ 2:
218
- message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
219
- break;
220
- case /* uint64 attr_id */ 3:
221
- message.attrId = reader.uint64().toNumber();
222
- break;
223
- case /* uint64 permission_id */ 4:
224
- message.permissionId = reader.uint64().toNumber();
225
- break;
226
- case /* string category */ 5:
227
- message.category = reader.string();
228
- break;
229
- case /* string name */ 6:
230
- message.name = reader.string();
231
- break;
232
- case /* string key */ 7:
233
- message.key = reader.string();
234
- break;
235
- case /* string type */ 8:
236
- message.type = reader.string();
237
- break;
238
- case /* resources.permissions.AttributeValues valid_values */ 9:
239
- message.validValues = AttributeValues.internalBinaryRead(reader, reader.uint32(), options, message.validValues);
240
- break;
241
- case /* resources.permissions.AttributeValues value */ 10:
242
- message.value = AttributeValues.internalBinaryRead(reader, reader.uint32(), options, message.value);
243
- break;
244
- default:
245
- let u = options.readUnknownField;
246
- if (u === "throw")
247
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
248
- let d = reader.skip(wireType);
249
- if (u !== false)
250
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
251
- }
252
- }
253
- return message;
254
- }
255
- internalBinaryWrite(message: RawRoleAttribute, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
256
- /* uint64 role_id = 1; */
257
- if (message.roleId !== 0)
258
- writer.tag(1, WireType.Varint).uint64(message.roleId);
259
- /* optional resources.timestamp.Timestamp created_at = 2; */
260
- if (message.createdAt)
261
- Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
262
- /* uint64 attr_id = 3; */
263
- if (message.attrId !== 0)
264
- writer.tag(3, WireType.Varint).uint64(message.attrId);
265
- /* uint64 permission_id = 4; */
266
- if (message.permissionId !== 0)
267
- writer.tag(4, WireType.Varint).uint64(message.permissionId);
268
- /* string category = 5; */
269
- if (message.category !== "")
270
- writer.tag(5, WireType.LengthDelimited).string(message.category);
271
- /* string name = 6; */
272
- if (message.name !== "")
273
- writer.tag(6, WireType.LengthDelimited).string(message.name);
274
- /* string key = 7; */
275
- if (message.key !== "")
276
- writer.tag(7, WireType.LengthDelimited).string(message.key);
277
- /* string type = 8; */
278
- if (message.type !== "")
279
- writer.tag(8, WireType.LengthDelimited).string(message.type);
280
- /* resources.permissions.AttributeValues valid_values = 9; */
281
- if (message.validValues)
282
- AttributeValues.internalBinaryWrite(message.validValues, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
283
- /* resources.permissions.AttributeValues value = 10; */
284
- if (message.value)
285
- AttributeValues.internalBinaryWrite(message.value, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
286
- let u = options.writeUnknownFields;
287
- if (u !== false)
288
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
289
- return writer;
290
- }
291
- }
292
132
  /**
293
- * @generated MessageType for protobuf message resources.permissions.RawRoleAttribute
133
+ * @generated from protobuf enum resources.permissions.attributes.AttributeType
294
134
  */
295
- export const RawRoleAttribute = new RawRoleAttribute$Type();
135
+ export enum AttributeType {
136
+ /**
137
+ * @generated from protobuf enum value: ATTRIBUTE_TYPE_UNSPECIFIED = 0;
138
+ */
139
+ UNSPECIFIED = 0,
140
+ /**
141
+ * @generated from protobuf enum value: ATTRIBUTE_TYPE_STRING_LIST = 1;
142
+ */
143
+ STRING_LIST = 1,
144
+ /**
145
+ * @generated from protobuf enum value: ATTRIBUTE_TYPE_JOB_LIST = 2;
146
+ */
147
+ JOB_LIST = 2,
148
+ /**
149
+ * @generated from protobuf enum value: ATTRIBUTE_TYPE_JOB_GRADE_LIST = 3;
150
+ */
151
+ JOB_GRADE_LIST = 3
152
+ }
296
153
  // @generated message type with reflection information, may provide speed optimized methods
297
154
  class RoleAttribute$Type extends MessageType<RoleAttribute> {
298
155
  constructor() {
299
- super("resources.permissions.RoleAttribute", [
300
- { no: 1, name: "role_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
156
+ super("resources.permissions.attributes.RoleAttribute", [
157
+ { no: 1, name: "role_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
301
158
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
302
- { no: 3, name: "attr_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
303
- { no: 4, name: "permission_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
304
- { no: 5, name: "category", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } },
305
- { no: 6, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
306
- { no: 7, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
307
- { no: 8, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
159
+ { no: 3, name: "attr_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
160
+ { 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" } } } },
308
165
  { no: 9, name: "valid_values", kind: "message", T: () => AttributeValues },
309
166
  { no: 10, name: "value", kind: "message", T: () => AttributeValues },
310
167
  { no: 11, name: "max_values", kind: "message", T: () => AttributeValues }
@@ -328,17 +185,17 @@ class RoleAttribute$Type extends MessageType<RoleAttribute> {
328
185
  while (reader.pos < end) {
329
186
  let [fieldNo, wireType] = reader.tag();
330
187
  switch (fieldNo) {
331
- case /* uint64 role_id */ 1:
332
- message.roleId = reader.uint64().toNumber();
188
+ case /* int64 role_id */ 1:
189
+ message.roleId = reader.int64().toNumber();
333
190
  break;
334
191
  case /* optional resources.timestamp.Timestamp created_at */ 2:
335
192
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
336
193
  break;
337
- case /* uint64 attr_id */ 3:
338
- message.attrId = reader.uint64().toNumber();
194
+ case /* int64 attr_id */ 3:
195
+ message.attrId = reader.int64().toNumber();
339
196
  break;
340
- case /* uint64 permission_id */ 4:
341
- message.permissionId = reader.uint64().toNumber();
197
+ case /* int64 permission_id */ 4:
198
+ message.permissionId = reader.int64().toNumber();
342
199
  break;
343
200
  case /* string category */ 5:
344
201
  message.category = reader.string();
@@ -352,13 +209,13 @@ class RoleAttribute$Type extends MessageType<RoleAttribute> {
352
209
  case /* string type */ 8:
353
210
  message.type = reader.string();
354
211
  break;
355
- case /* resources.permissions.AttributeValues valid_values */ 9:
212
+ case /* resources.permissions.attributes.AttributeValues valid_values */ 9:
356
213
  message.validValues = AttributeValues.internalBinaryRead(reader, reader.uint32(), options, message.validValues);
357
214
  break;
358
- case /* resources.permissions.AttributeValues value */ 10:
215
+ case /* resources.permissions.attributes.AttributeValues value */ 10:
359
216
  message.value = AttributeValues.internalBinaryRead(reader, reader.uint32(), options, message.value);
360
217
  break;
361
- case /* optional resources.permissions.AttributeValues max_values */ 11:
218
+ case /* optional resources.permissions.attributes.AttributeValues max_values */ 11:
362
219
  message.maxValues = AttributeValues.internalBinaryRead(reader, reader.uint32(), options, message.maxValues);
363
220
  break;
364
221
  default:
@@ -373,18 +230,18 @@ class RoleAttribute$Type extends MessageType<RoleAttribute> {
373
230
  return message;
374
231
  }
375
232
  internalBinaryWrite(message: RoleAttribute, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
376
- /* uint64 role_id = 1; */
233
+ /* int64 role_id = 1; */
377
234
  if (message.roleId !== 0)
378
- writer.tag(1, WireType.Varint).uint64(message.roleId);
235
+ writer.tag(1, WireType.Varint).int64(message.roleId);
379
236
  /* optional resources.timestamp.Timestamp created_at = 2; */
380
237
  if (message.createdAt)
381
238
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
382
- /* uint64 attr_id = 3; */
239
+ /* int64 attr_id = 3; */
383
240
  if (message.attrId !== 0)
384
- writer.tag(3, WireType.Varint).uint64(message.attrId);
385
- /* uint64 permission_id = 4; */
241
+ writer.tag(3, WireType.Varint).int64(message.attrId);
242
+ /* int64 permission_id = 4; */
386
243
  if (message.permissionId !== 0)
387
- writer.tag(4, WireType.Varint).uint64(message.permissionId);
244
+ writer.tag(4, WireType.Varint).int64(message.permissionId);
388
245
  /* string category = 5; */
389
246
  if (message.category !== "")
390
247
  writer.tag(5, WireType.LengthDelimited).string(message.category);
@@ -397,13 +254,13 @@ class RoleAttribute$Type extends MessageType<RoleAttribute> {
397
254
  /* string type = 8; */
398
255
  if (message.type !== "")
399
256
  writer.tag(8, WireType.LengthDelimited).string(message.type);
400
- /* resources.permissions.AttributeValues valid_values = 9; */
257
+ /* resources.permissions.attributes.AttributeValues valid_values = 9; */
401
258
  if (message.validValues)
402
259
  AttributeValues.internalBinaryWrite(message.validValues, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
403
- /* resources.permissions.AttributeValues value = 10; */
260
+ /* resources.permissions.attributes.AttributeValues value = 10; */
404
261
  if (message.value)
405
262
  AttributeValues.internalBinaryWrite(message.value, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
406
- /* optional resources.permissions.AttributeValues max_values = 11; */
263
+ /* optional resources.permissions.attributes.AttributeValues max_values = 11; */
407
264
  if (message.maxValues)
408
265
  AttributeValues.internalBinaryWrite(message.maxValues, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
409
266
  let u = options.writeUnknownFields;
@@ -413,17 +270,17 @@ class RoleAttribute$Type extends MessageType<RoleAttribute> {
413
270
  }
414
271
  }
415
272
  /**
416
- * @generated MessageType for protobuf message resources.permissions.RoleAttribute
273
+ * @generated MessageType for protobuf message resources.permissions.attributes.RoleAttribute
417
274
  */
418
275
  export const RoleAttribute = new RoleAttribute$Type();
419
276
  // @generated message type with reflection information, may provide speed optimized methods
420
277
  class AttributeValues$Type extends MessageType<AttributeValues> {
421
278
  constructor() {
422
- super("resources.permissions.AttributeValues", [
279
+ super("resources.permissions.attributes.AttributeValues", [
423
280
  { no: 1, name: "string_list", kind: "message", oneof: "validValues", T: () => StringList },
424
281
  { no: 2, name: "job_list", kind: "message", oneof: "validValues", T: () => StringList },
425
282
  { no: 3, name: "job_grade_list", kind: "message", oneof: "validValues", T: () => JobGradeList }
426
- ]);
283
+ ], { "codegen.dbscanner.dbscanner": { enabled: true } });
427
284
  }
428
285
  create(value?: PartialMessage<AttributeValues>): AttributeValues {
429
286
  const message = globalThis.Object.create((this.messagePrototype!));
@@ -437,19 +294,19 @@ class AttributeValues$Type extends MessageType<AttributeValues> {
437
294
  while (reader.pos < end) {
438
295
  let [fieldNo, wireType] = reader.tag();
439
296
  switch (fieldNo) {
440
- case /* resources.permissions.StringList string_list */ 1:
297
+ case /* resources.permissions.attributes.StringList string_list */ 1:
441
298
  message.validValues = {
442
299
  oneofKind: "stringList",
443
300
  stringList: StringList.internalBinaryRead(reader, reader.uint32(), options, (message.validValues as any).stringList)
444
301
  };
445
302
  break;
446
- case /* resources.permissions.StringList job_list */ 2:
303
+ case /* resources.permissions.attributes.StringList job_list */ 2:
447
304
  message.validValues = {
448
305
  oneofKind: "jobList",
449
306
  jobList: StringList.internalBinaryRead(reader, reader.uint32(), options, (message.validValues as any).jobList)
450
307
  };
451
308
  break;
452
- case /* resources.permissions.JobGradeList job_grade_list */ 3:
309
+ case /* resources.permissions.attributes.JobGradeList job_grade_list */ 3:
453
310
  message.validValues = {
454
311
  oneofKind: "jobGradeList",
455
312
  jobGradeList: JobGradeList.internalBinaryRead(reader, reader.uint32(), options, (message.validValues as any).jobGradeList)
@@ -467,13 +324,13 @@ class AttributeValues$Type extends MessageType<AttributeValues> {
467
324
  return message;
468
325
  }
469
326
  internalBinaryWrite(message: AttributeValues, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
470
- /* resources.permissions.StringList string_list = 1; */
327
+ /* resources.permissions.attributes.StringList string_list = 1; */
471
328
  if (message.validValues.oneofKind === "stringList")
472
329
  StringList.internalBinaryWrite(message.validValues.stringList, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
473
- /* resources.permissions.StringList job_list = 2; */
330
+ /* resources.permissions.attributes.StringList job_list = 2; */
474
331
  if (message.validValues.oneofKind === "jobList")
475
332
  StringList.internalBinaryWrite(message.validValues.jobList, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
476
- /* resources.permissions.JobGradeList job_grade_list = 3; */
333
+ /* resources.permissions.attributes.JobGradeList job_grade_list = 3; */
477
334
  if (message.validValues.oneofKind === "jobGradeList")
478
335
  JobGradeList.internalBinaryWrite(message.validValues.jobGradeList, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
479
336
  let u = options.writeUnknownFields;
@@ -483,14 +340,14 @@ class AttributeValues$Type extends MessageType<AttributeValues> {
483
340
  }
484
341
  }
485
342
  /**
486
- * @generated MessageType for protobuf message resources.permissions.AttributeValues
343
+ * @generated MessageType for protobuf message resources.permissions.attributes.AttributeValues
487
344
  */
488
345
  export const AttributeValues = new AttributeValues$Type();
489
346
  // @generated message type with reflection information, may provide speed optimized methods
490
347
  class StringList$Type extends MessageType<StringList> {
491
348
  constructor() {
492
- super("resources.permissions.StringList", [
493
- { no: 1, name: "strings", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
349
+ super("resources.permissions.attributes.StringList", [
350
+ { no: 1, name: "strings", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } }
494
351
  ]);
495
352
  }
496
353
  create(value?: PartialMessage<StringList>): StringList {
@@ -530,13 +387,13 @@ class StringList$Type extends MessageType<StringList> {
530
387
  }
531
388
  }
532
389
  /**
533
- * @generated MessageType for protobuf message resources.permissions.StringList
390
+ * @generated MessageType for protobuf message resources.permissions.attributes.StringList
534
391
  */
535
392
  export const StringList = new StringList$Type();
536
393
  // @generated message type with reflection information, may provide speed optimized methods
537
394
  class JobGradeList$Type extends MessageType<JobGradeList> {
538
395
  constructor() {
539
- super("resources.permissions.JobGradeList", [
396
+ super("resources.permissions.attributes.JobGradeList", [
540
397
  { no: 2, name: "fine_grained", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
541
398
  { no: 1, name: "jobs", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 5 /*ScalarType.INT32*/ } },
542
399
  { no: 3, name: "grades", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => JobGrades } }
@@ -562,7 +419,7 @@ class JobGradeList$Type extends MessageType<JobGradeList> {
562
419
  case /* map<string, int32> jobs */ 1:
563
420
  this.binaryReadMap1(message.jobs, reader, options);
564
421
  break;
565
- case /* map<string, resources.permissions.JobGrades> grades */ 3:
422
+ case /* map<string, resources.permissions.attributes.JobGrades> grades */ 3:
566
423
  this.binaryReadMap3(message.grades, reader, options);
567
424
  break;
568
425
  default:
@@ -587,7 +444,7 @@ class JobGradeList$Type extends MessageType<JobGradeList> {
587
444
  case 2:
588
445
  val = reader.int32();
589
446
  break;
590
- default: throw new globalThis.Error("unknown map entry field for field resources.permissions.JobGradeList.jobs");
447
+ default: throw new globalThis.Error("unknown map entry field for resources.permissions.attributes.JobGradeList.jobs");
591
448
  }
592
449
  }
593
450
  map[key ?? ""] = val ?? 0;
@@ -603,7 +460,7 @@ class JobGradeList$Type extends MessageType<JobGradeList> {
603
460
  case 2:
604
461
  val = JobGrades.internalBinaryRead(reader, reader.uint32(), options);
605
462
  break;
606
- default: throw new globalThis.Error("unknown map entry field for field resources.permissions.JobGradeList.grades");
463
+ default: throw new globalThis.Error("unknown map entry field for resources.permissions.attributes.JobGradeList.grades");
607
464
  }
608
465
  }
609
466
  map[key ?? ""] = val ?? JobGrades.create();
@@ -615,7 +472,7 @@ class JobGradeList$Type extends MessageType<JobGradeList> {
615
472
  /* bool fine_grained = 2; */
616
473
  if (message.fineGrained !== false)
617
474
  writer.tag(2, WireType.Varint).bool(message.fineGrained);
618
- /* map<string, resources.permissions.JobGrades> grades = 3; */
475
+ /* map<string, resources.permissions.attributes.JobGrades> grades = 3; */
619
476
  for (let k of globalThis.Object.keys(message.grades)) {
620
477
  writer.tag(3, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
621
478
  writer.tag(2, WireType.LengthDelimited).fork();
@@ -629,13 +486,13 @@ class JobGradeList$Type extends MessageType<JobGradeList> {
629
486
  }
630
487
  }
631
488
  /**
632
- * @generated MessageType for protobuf message resources.permissions.JobGradeList
489
+ * @generated MessageType for protobuf message resources.permissions.attributes.JobGradeList
633
490
  */
634
491
  export const JobGradeList = new JobGradeList$Type();
635
492
  // @generated message type with reflection information, may provide speed optimized methods
636
493
  class JobGrades$Type extends MessageType<JobGrades> {
637
494
  constructor() {
638
- super("resources.permissions.JobGrades", [
495
+ super("resources.permissions.attributes.JobGrades", [
639
496
  { no: 1, name: "grades", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }
640
497
  ]);
641
498
  }
@@ -684,6 +541,6 @@ class JobGrades$Type extends MessageType<JobGrades> {
684
541
  }
685
542
  }
686
543
  /**
687
- * @generated MessageType for protobuf message resources.permissions.JobGrades
544
+ * @generated MessageType for protobuf message resources.permissions.attributes.JobGrades
688
545
  */
689
546
  export const JobGrades = new JobGrades$Type();