@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.
Files changed (169) hide show
  1. package/buf/validate/validate.ts +11301 -0
  2. package/clients.ts +157 -154
  3. package/codegen/dbscanner/dbscanner.ts +91 -0
  4. package/codegen/perms/perms.ts +208 -0
  5. package/codegen/sanitizer/sanitizer.ts +80 -0
  6. package/google/protobuf/any.ts +4 -3
  7. package/google/protobuf/descriptor.ts +393 -239
  8. package/google/protobuf/duration.ts +4 -3
  9. package/google/protobuf/struct.ts +485 -0
  10. package/google/protobuf/timestamp.ts +4 -3
  11. package/package.json +3 -3
  12. package/perms.ts +85 -159
  13. package/resources/accounts/accounts.ts +26 -25
  14. package/resources/accounts/oauth2.ts +30 -29
  15. package/resources/audit/audit.ts +36 -35
  16. package/resources/calendar/access.ts +49 -48
  17. package/resources/calendar/calendar.ts +122 -126
  18. package/resources/centrum/access.ts +345 -0
  19. package/resources/centrum/attributes.ts +8 -11
  20. package/resources/centrum/dispatchers.ts +149 -0
  21. package/resources/centrum/dispatches.ts +252 -115
  22. package/resources/centrum/settings.ts +384 -34
  23. package/resources/centrum/units.ts +112 -92
  24. package/resources/centrum/units_access.ts +54 -55
  25. package/resources/clientconfig/clientconfig.ts +890 -0
  26. package/resources/collab/collab.ts +817 -0
  27. package/resources/common/content/content.ts +113 -30
  28. package/resources/common/cron/cron.ts +43 -31
  29. package/resources/common/database/database.ts +92 -35
  30. package/resources/common/error.ts +17 -16
  31. package/resources/common/grpcws/grpcws.ts +24 -23
  32. package/resources/common/i18n.ts +20 -24
  33. package/resources/common/id_mapping.ts +69 -0
  34. package/resources/common/tests/objects.ts +4 -3
  35. package/resources/common/uuid.ts +4 -3
  36. package/resources/discord/discord.ts +209 -0
  37. package/resources/documents/access.ts +52 -53
  38. package/resources/documents/activity.ts +235 -58
  39. package/resources/documents/category.ts +20 -27
  40. package/resources/documents/comment.ts +26 -25
  41. package/resources/documents/documents.ts +335 -262
  42. package/resources/documents/pins.ts +127 -0
  43. package/resources/documents/requests.ts +31 -30
  44. package/resources/documents/signoff.ts +55 -0
  45. package/resources/documents/state.ts +69 -0
  46. package/resources/documents/templates.ts +119 -136
  47. package/resources/documents/workflow.ts +35 -24
  48. package/resources/file/file.ts +152 -0
  49. package/{services/settings → resources/file}/filestore.ts +179 -165
  50. package/resources/file/meta.ts +148 -0
  51. package/resources/jobs/activity.ts +39 -42
  52. package/resources/jobs/colleagues.ts +67 -60
  53. package/resources/jobs/conduct.ts +29 -30
  54. package/resources/jobs/job_props.ts +46 -48
  55. package/resources/jobs/job_settings.ts +45 -52
  56. package/resources/jobs/jobs.ts +14 -13
  57. package/resources/jobs/labels.ts +21 -22
  58. package/resources/jobs/timeclock.ts +26 -25
  59. package/resources/laws/laws.ts +40 -49
  60. package/resources/livemap/coords.ts +81 -0
  61. package/resources/livemap/heatmap.ts +93 -0
  62. package/resources/livemap/{livemap.ts → marker_marker.ts} +43 -310
  63. package/resources/livemap/user_marker.ts +298 -0
  64. package/resources/mailer/access.ts +75 -74
  65. package/resources/mailer/email.ts +24 -27
  66. package/resources/mailer/events.ts +25 -24
  67. package/resources/mailer/message.ts +45 -50
  68. package/resources/mailer/settings.ts +12 -15
  69. package/resources/mailer/template.ts +25 -28
  70. package/resources/mailer/thread.ts +70 -71
  71. package/resources/notifications/client_view.ts +239 -0
  72. package/resources/notifications/events.ts +50 -101
  73. package/resources/notifications/notifications.ts +52 -57
  74. package/resources/permissions/attributes.ts +63 -206
  75. package/resources/permissions/events.ts +149 -0
  76. package/resources/permissions/permissions.ts +103 -34
  77. package/resources/qualifications/access.ts +27 -26
  78. package/resources/qualifications/exam.ts +188 -126
  79. package/resources/qualifications/qualifications.ts +370 -303
  80. package/resources/settings/banner.ts +14 -21
  81. package/resources/settings/config.ts +163 -79
  82. package/resources/settings/perms.ts +151 -0
  83. package/resources/settings/status.ts +533 -0
  84. package/resources/stats/stats.ts +3 -2
  85. package/resources/sync/activity.ts +24 -23
  86. package/resources/sync/data.ts +94 -26
  87. package/resources/timestamp/timestamp.ts +3 -2
  88. package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
  89. package/resources/userinfo/user_info.ts +464 -0
  90. package/resources/users/activity.ts +80 -85
  91. package/resources/users/labels.ts +18 -21
  92. package/resources/users/licenses.ts +9 -8
  93. package/resources/users/props.ts +61 -51
  94. package/resources/users/users.ts +100 -78
  95. package/resources/vehicles/activity.ts +231 -0
  96. package/resources/vehicles/props.ts +103 -0
  97. package/resources/vehicles/vehicles.ts +28 -15
  98. package/resources/wiki/access.ts +49 -48
  99. package/resources/wiki/activity.ts +133 -51
  100. package/resources/wiki/page.ts +134 -87
  101. package/services/auth/auth.client.ts +24 -27
  102. package/services/auth/auth.ts +222 -195
  103. package/services/calendar/calendar.client.ts +32 -91
  104. package/services/calendar/calendar.ts +110 -109
  105. package/services/centrum/centrum.client.ts +97 -137
  106. package/services/centrum/centrum.ts +701 -298
  107. package/services/citizens/citizens.client.ts +70 -39
  108. package/services/citizens/citizens.ts +183 -93
  109. package/services/completor/completor.client.ts +16 -35
  110. package/services/completor/completor.ts +65 -44
  111. package/services/documents/collab.client.ts +46 -0
  112. package/services/documents/collab.ts +13 -0
  113. package/services/documents/documents.client.ts +88 -217
  114. package/services/documents/documents.ts +490 -508
  115. package/services/filestore/filestore.client.ts +86 -0
  116. package/services/filestore/filestore.ts +262 -0
  117. package/services/jobs/conduct.client.ts +10 -25
  118. package/services/jobs/conduct.ts +36 -35
  119. package/services/jobs/jobs.client.ts +22 -61
  120. package/services/jobs/jobs.ts +108 -91
  121. package/services/jobs/timeclock.client.ts +8 -19
  122. package/services/jobs/timeclock.ts +47 -46
  123. package/services/livemap/livemap.client.ts +8 -19
  124. package/services/livemap/livemap.ts +290 -119
  125. package/services/mailer/mailer.client.ts +44 -127
  126. package/services/mailer/mailer.ts +213 -216
  127. package/services/notifications/notifications.client.ts +65 -0
  128. package/services/{notificator/notificator.ts → notifications/notifications.ts} +117 -74
  129. package/services/qualifications/qualifications.client.ts +46 -91
  130. package/services/qualifications/qualifications.ts +181 -175
  131. package/services/settings/accounts.client.ts +10 -25
  132. package/services/settings/accounts.ts +64 -41
  133. package/services/settings/config.client.ts +6 -13
  134. package/services/settings/config.ts +8 -7
  135. package/services/settings/cron.client.ts +4 -7
  136. package/services/settings/cron.ts +4 -3
  137. package/services/settings/laws.client.ts +10 -25
  138. package/services/settings/laws.ts +29 -28
  139. package/services/settings/settings.client.ts +57 -103
  140. package/services/settings/settings.ts +190 -607
  141. package/services/settings/system.client.ts +90 -0
  142. package/services/settings/system.ts +618 -0
  143. package/services/stats/stats.client.ts +4 -3
  144. package/services/stats/stats.ts +4 -3
  145. package/services/sync/sync.client.ts +16 -15
  146. package/services/sync/sync.ts +82 -52
  147. package/services/vehicles/vehicles.client.ts +17 -7
  148. package/services/vehicles/vehicles.ts +169 -24
  149. package/services/wiki/collab.client.ts +46 -0
  150. package/services/wiki/collab.ts +13 -0
  151. package/services/wiki/wiki.client.ts +28 -37
  152. package/services/wiki/wiki.ts +93 -63
  153. package/svcs.ts +79 -103
  154. package/resources/centrum/disponents.ts +0 -81
  155. package/resources/filestore/file.ts +0 -204
  156. package/resources/internet/access.ts +0 -358
  157. package/resources/internet/ads.ts +0 -257
  158. package/resources/internet/domain.ts +0 -328
  159. package/resources/internet/page.ts +0 -428
  160. package/resources/internet/search.ts +0 -128
  161. package/resources/livemap/tracker.ts +0 -81
  162. package/services/internet/ads.client.ts +0 -41
  163. package/services/internet/ads.ts +0 -145
  164. package/services/internet/domain.client.ts +0 -109
  165. package/services/internet/domain.ts +0 -658
  166. package/services/internet/internet.client.ts +0 -58
  167. package/services/internet/internet.ts +0 -268
  168. package/services/notificator/notificator.client.ts +0 -76
  169. 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
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 "services/auth/auth.proto" (package "services.auth", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  import { ServiceType } from "@protobuf-ts/runtime-rpc";
5
6
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -11,6 +12,8 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
12
  import type { PartialMessage } from "@protobuf-ts/runtime";
12
13
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
14
  import { MessageType } from "@protobuf-ts/runtime";
15
+ import { RoleAttribute } from "../../resources/permissions/attributes";
16
+ import { Permission } from "../../resources/permissions/permissions";
14
17
  import { User } from "../../resources/users/users";
15
18
  import { JobProps } from "../../resources/jobs/job_props";
16
19
  import { Character } from "../../resources/accounts/accounts";
@@ -23,15 +26,15 @@ import { Timestamp } from "../../resources/timestamp/timestamp";
23
26
  */
24
27
  export interface CreateAccountRequest {
25
28
  /**
26
- * @generated from protobuf field: string reg_token = 1;
29
+ * @generated from protobuf field: string reg_token = 1
27
30
  */
28
31
  regToken: string;
29
32
  /**
30
- * @generated from protobuf field: string username = 2;
33
+ * @generated from protobuf field: string username = 2
31
34
  */
32
35
  username: string;
33
36
  /**
34
- * @generated from protobuf field: string password = 3;
37
+ * @generated from protobuf field: string password = 3
35
38
  */
36
39
  password: string;
37
40
  }
@@ -40,7 +43,7 @@ export interface CreateAccountRequest {
40
43
  */
41
44
  export interface CreateAccountResponse {
42
45
  /**
43
- * @generated from protobuf field: uint64 account_id = 1;
46
+ * @generated from protobuf field: int64 account_id = 1
44
47
  */
45
48
  accountId: number;
46
49
  }
@@ -49,11 +52,11 @@ export interface CreateAccountResponse {
49
52
  */
50
53
  export interface LoginRequest {
51
54
  /**
52
- * @generated from protobuf field: string username = 1;
55
+ * @generated from protobuf field: string username = 1
53
56
  */
54
57
  username: string;
55
58
  /**
56
- * @generated from protobuf field: string password = 2;
59
+ * @generated from protobuf field: string password = 2
57
60
  */
58
61
  password: string;
59
62
  }
@@ -62,28 +65,42 @@ export interface LoginRequest {
62
65
  */
63
66
  export interface LoginResponse {
64
67
  /**
65
- * @generated from protobuf field: resources.timestamp.Timestamp expires = 1;
68
+ * @generated from protobuf field: resources.timestamp.Timestamp expires = 1
66
69
  */
67
70
  expires?: Timestamp;
68
71
  /**
69
- * @generated from protobuf field: uint64 account_id = 2;
72
+ * @generated from protobuf field: int64 account_id = 2
70
73
  */
71
74
  accountId: number;
72
75
  /**
73
- * @generated from protobuf field: optional services.auth.ChooseCharacterResponse char = 3;
76
+ * @generated from protobuf field: optional services.auth.ChooseCharacterResponse char = 3
74
77
  */
75
78
  char?: ChooseCharacterResponse;
76
79
  }
80
+ /**
81
+ * @generated from protobuf message services.auth.LogoutRequest
82
+ */
83
+ export interface LogoutRequest {
84
+ }
85
+ /**
86
+ * @generated from protobuf message services.auth.LogoutResponse
87
+ */
88
+ export interface LogoutResponse {
89
+ /**
90
+ * @generated from protobuf field: bool success = 1
91
+ */
92
+ success: boolean;
93
+ }
77
94
  /**
78
95
  * @generated from protobuf message services.auth.ChangePasswordRequest
79
96
  */
80
97
  export interface ChangePasswordRequest {
81
98
  /**
82
- * @generated from protobuf field: string current = 1;
99
+ * @generated from protobuf field: string current = 1
83
100
  */
84
101
  current: string;
85
102
  /**
86
- * @generated from protobuf field: string new = 2;
103
+ * @generated from protobuf field: string new = 2
87
104
  */
88
105
  new: string;
89
106
  }
@@ -92,7 +109,7 @@ export interface ChangePasswordRequest {
92
109
  */
93
110
  export interface ChangePasswordResponse {
94
111
  /**
95
- * @generated from protobuf field: resources.timestamp.Timestamp expires = 1;
112
+ * @generated from protobuf field: resources.timestamp.Timestamp expires = 1
96
113
  */
97
114
  expires?: Timestamp;
98
115
  }
@@ -101,11 +118,11 @@ export interface ChangePasswordResponse {
101
118
  */
102
119
  export interface ChangeUsernameRequest {
103
120
  /**
104
- * @generated from protobuf field: string current = 1;
121
+ * @generated from protobuf field: string current = 1
105
122
  */
106
123
  current: string;
107
124
  /**
108
- * @generated from protobuf field: string new = 2;
125
+ * @generated from protobuf field: string new = 2
109
126
  */
110
127
  new: string;
111
128
  }
@@ -119,11 +136,11 @@ export interface ChangeUsernameResponse {
119
136
  */
120
137
  export interface ForgotPasswordRequest {
121
138
  /**
122
- * @generated from protobuf field: string reg_token = 1;
139
+ * @generated from protobuf field: string reg_token = 1
123
140
  */
124
141
  regToken: string;
125
142
  /**
126
- * @generated from protobuf field: string new = 2;
143
+ * @generated from protobuf field: string new = 2
127
144
  */
128
145
  new: string;
129
146
  }
@@ -142,15 +159,15 @@ export interface GetAccountInfoRequest {
142
159
  */
143
160
  export interface GetAccountInfoResponse {
144
161
  /**
145
- * @generated from protobuf field: resources.accounts.Account account = 1;
162
+ * @generated from protobuf field: resources.accounts.Account account = 1
146
163
  */
147
164
  account?: Account;
148
165
  /**
149
- * @generated from protobuf field: repeated resources.accounts.OAuth2Provider oauth2_providers = 2;
166
+ * @generated from protobuf field: repeated resources.accounts.OAuth2Provider oauth2_providers = 2
150
167
  */
151
168
  oauth2Providers: OAuth2Provider[];
152
169
  /**
153
- * @generated from protobuf field: repeated resources.accounts.OAuth2Account oauth2_connections = 3;
170
+ * @generated from protobuf field: repeated resources.accounts.OAuth2Account oauth2_connections = 3
154
171
  */
155
172
  oauth2Connections: OAuth2Account[];
156
173
  }
@@ -164,7 +181,7 @@ export interface GetCharactersRequest {
164
181
  */
165
182
  export interface GetCharactersResponse {
166
183
  /**
167
- * @generated from protobuf field: repeated resources.accounts.Character chars = 1;
184
+ * @generated from protobuf field: repeated resources.accounts.Character chars = 1
168
185
  */
169
186
  chars: Character[];
170
187
  }
@@ -173,7 +190,7 @@ export interface GetCharactersResponse {
173
190
  */
174
191
  export interface ChooseCharacterRequest {
175
192
  /**
176
- * @generated from protobuf field: int32 char_id = 1;
193
+ * @generated from protobuf field: int32 char_id = 1
177
194
  */
178
195
  charId: number;
179
196
  }
@@ -182,46 +199,36 @@ export interface ChooseCharacterRequest {
182
199
  */
183
200
  export interface ChooseCharacterResponse {
184
201
  /**
185
- * @generated from protobuf field: resources.timestamp.Timestamp expires = 1;
202
+ * @generated from protobuf field: string username = 1
186
203
  */
187
- expires?: Timestamp;
204
+ username: string;
188
205
  /**
189
- * @generated from protobuf field: repeated string permissions = 2;
206
+ * @generated from protobuf field: resources.timestamp.Timestamp expires = 2
190
207
  */
191
- permissions: string[];
208
+ expires?: Timestamp;
192
209
  /**
193
- * @generated from protobuf field: resources.jobs.JobProps job_props = 3;
210
+ * @generated from protobuf field: resources.jobs.JobProps job_props = 3
194
211
  */
195
212
  jobProps?: JobProps;
196
213
  /**
197
- * @generated from protobuf field: resources.users.User char = 4;
214
+ * @generated from protobuf field: resources.users.User char = 4
198
215
  */
199
- char?: User; // @gotags: alias:"user"
216
+ char?: User;
200
217
  /**
201
- * @generated from protobuf field: string username = 5;
218
+ * @generated from protobuf field: repeated resources.permissions.Permission permissions = 5
202
219
  */
203
- username: string;
204
- }
205
- /**
206
- * @generated from protobuf message services.auth.LogoutRequest
207
- */
208
- export interface LogoutRequest {
209
- }
210
- /**
211
- * @generated from protobuf message services.auth.LogoutResponse
212
- */
213
- export interface LogoutResponse {
220
+ permissions: Permission[];
214
221
  /**
215
- * @generated from protobuf field: bool success = 1;
222
+ * @generated from protobuf field: repeated resources.permissions.RoleAttribute attributes = 6
216
223
  */
217
- success: boolean;
224
+ attributes: RoleAttribute[];
218
225
  }
219
226
  /**
220
227
  * @generated from protobuf message services.auth.DeleteOAuth2ConnectionRequest
221
228
  */
222
229
  export interface DeleteOAuth2ConnectionRequest {
223
230
  /**
224
- * @generated from protobuf field: string provider = 1;
231
+ * @generated from protobuf field: string provider = 1
225
232
  */
226
233
  provider: string;
227
234
  }
@@ -230,7 +237,7 @@ export interface DeleteOAuth2ConnectionRequest {
230
237
  */
231
238
  export interface DeleteOAuth2ConnectionResponse {
232
239
  /**
233
- * @generated from protobuf field: bool success = 1;
240
+ * @generated from protobuf field: bool success = 1
234
241
  */
235
242
  success: boolean;
236
243
  }
@@ -239,11 +246,11 @@ export interface DeleteOAuth2ConnectionResponse {
239
246
  */
240
247
  export interface SetSuperuserModeRequest {
241
248
  /**
242
- * @generated from protobuf field: bool superuser = 1;
249
+ * @generated from protobuf field: bool superuser = 1
243
250
  */
244
251
  superuser: boolean;
245
252
  /**
246
- * @generated from protobuf field: optional string job = 2;
253
+ * @generated from protobuf field: optional string job = 2
247
254
  */
248
255
  job?: string;
249
256
  }
@@ -252,29 +259,33 @@ export interface SetSuperuserModeRequest {
252
259
  */
253
260
  export interface SetSuperuserModeResponse {
254
261
  /**
255
- * @generated from protobuf field: resources.timestamp.Timestamp expires = 1;
262
+ * @generated from protobuf field: resources.timestamp.Timestamp expires = 2
256
263
  */
257
264
  expires?: Timestamp;
258
265
  /**
259
- * @generated from protobuf field: repeated string permissions = 2;
266
+ * @generated from protobuf field: optional resources.jobs.JobProps job_props = 3
267
+ */
268
+ jobProps?: JobProps;
269
+ /**
270
+ * @generated from protobuf field: resources.users.User char = 4
260
271
  */
261
- permissions: string[];
272
+ char?: User;
262
273
  /**
263
- * @generated from protobuf field: optional resources.jobs.JobProps job_props = 3;
274
+ * @generated from protobuf field: repeated resources.permissions.Permission permissions = 5
264
275
  */
265
- jobProps?: JobProps;
276
+ permissions: Permission[];
266
277
  /**
267
- * @generated from protobuf field: resources.users.User char = 4;
278
+ * @generated from protobuf field: repeated resources.permissions.RoleAttribute attributes = 6
268
279
  */
269
- char?: User; // @gotags: alias:"user"
280
+ attributes: RoleAttribute[];
270
281
  }
271
282
  // @generated message type with reflection information, may provide speed optimized methods
272
283
  class CreateAccountRequest$Type extends MessageType<CreateAccountRequest> {
273
284
  constructor() {
274
285
  super("services.auth.CreateAccountRequest", [
275
- { no: 1, name: "reg_token", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { len: "6", pattern: "^[0-9]{6}$" } } } },
276
- { no: 2, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "24", pattern: "(?i)^[0-9A-Z\u00C4\u00D6\u00DC\u00DF_-]{3,24}$" } } } },
277
- { no: 3, name: "password", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "6", maxBytes: "70" } } } }
286
+ { no: 1, name: "reg_token", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { len: "6", pattern: "^[0-9]{6}$" } } } },
287
+ { no: 2, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "24", pattern: "(?i)^[0-9A-Z\u00C4\u00D6\u00DC\u00DF_-]{3,24}$" } } } },
288
+ { no: 3, name: "password", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "6", maxBytes: "70" } } } }
278
289
  ]);
279
290
  }
280
291
  create(value?: PartialMessage<CreateAccountRequest>): CreateAccountRequest {
@@ -335,7 +346,7 @@ export const CreateAccountRequest = new CreateAccountRequest$Type();
335
346
  class CreateAccountResponse$Type extends MessageType<CreateAccountResponse> {
336
347
  constructor() {
337
348
  super("services.auth.CreateAccountResponse", [
338
- { no: 1, name: "account_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
349
+ { no: 1, name: "account_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
339
350
  ]);
340
351
  }
341
352
  create(value?: PartialMessage<CreateAccountResponse>): CreateAccountResponse {
@@ -350,8 +361,8 @@ class CreateAccountResponse$Type extends MessageType<CreateAccountResponse> {
350
361
  while (reader.pos < end) {
351
362
  let [fieldNo, wireType] = reader.tag();
352
363
  switch (fieldNo) {
353
- case /* uint64 account_id */ 1:
354
- message.accountId = reader.uint64().toNumber();
364
+ case /* int64 account_id */ 1:
365
+ message.accountId = reader.int64().toNumber();
355
366
  break;
356
367
  default:
357
368
  let u = options.readUnknownField;
@@ -365,9 +376,9 @@ class CreateAccountResponse$Type extends MessageType<CreateAccountResponse> {
365
376
  return message;
366
377
  }
367
378
  internalBinaryWrite(message: CreateAccountResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
368
- /* uint64 account_id = 1; */
379
+ /* int64 account_id = 1; */
369
380
  if (message.accountId !== 0)
370
- writer.tag(1, WireType.Varint).uint64(message.accountId);
381
+ writer.tag(1, WireType.Varint).int64(message.accountId);
371
382
  let u = options.writeUnknownFields;
372
383
  if (u !== false)
373
384
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -382,8 +393,8 @@ export const CreateAccountResponse = new CreateAccountResponse$Type();
382
393
  class LoginRequest$Type extends MessageType<LoginRequest> {
383
394
  constructor() {
384
395
  super("services.auth.LoginRequest", [
385
- { no: 1, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "24", pattern: "(?i)^[0-9A-Z\u00C4\u00D6\u00DC\u00DF_-]{3,24}$" } } } },
386
- { no: 2, name: "password", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "6", maxBytes: "70" } } } }
396
+ { no: 1, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "24", pattern: "(?i)^[0-9A-Z\u00C4\u00D6\u00DC\u00DF_-]{3,24}$" } } } },
397
+ { no: 2, name: "password", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "6", maxBytes: "70" } } } }
387
398
  ]);
388
399
  }
389
400
  create(value?: PartialMessage<LoginRequest>): LoginRequest {
@@ -438,7 +449,7 @@ class LoginResponse$Type extends MessageType<LoginResponse> {
438
449
  constructor() {
439
450
  super("services.auth.LoginResponse", [
440
451
  { no: 1, name: "expires", kind: "message", T: () => Timestamp },
441
- { no: 2, name: "account_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
452
+ { no: 2, name: "account_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
442
453
  { no: 3, name: "char", kind: "message", T: () => ChooseCharacterResponse }
443
454
  ]);
444
455
  }
@@ -457,8 +468,8 @@ class LoginResponse$Type extends MessageType<LoginResponse> {
457
468
  case /* resources.timestamp.Timestamp expires */ 1:
458
469
  message.expires = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expires);
459
470
  break;
460
- case /* uint64 account_id */ 2:
461
- message.accountId = reader.uint64().toNumber();
471
+ case /* int64 account_id */ 2:
472
+ message.accountId = reader.int64().toNumber();
462
473
  break;
463
474
  case /* optional services.auth.ChooseCharacterResponse char */ 3:
464
475
  message.char = ChooseCharacterResponse.internalBinaryRead(reader, reader.uint32(), options, message.char);
@@ -478,9 +489,9 @@ class LoginResponse$Type extends MessageType<LoginResponse> {
478
489
  /* resources.timestamp.Timestamp expires = 1; */
479
490
  if (message.expires)
480
491
  Timestamp.internalBinaryWrite(message.expires, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
481
- /* uint64 account_id = 2; */
492
+ /* int64 account_id = 2; */
482
493
  if (message.accountId !== 0)
483
- writer.tag(2, WireType.Varint).uint64(message.accountId);
494
+ writer.tag(2, WireType.Varint).int64(message.accountId);
484
495
  /* optional services.auth.ChooseCharacterResponse char = 3; */
485
496
  if (message.char)
486
497
  ChooseCharacterResponse.internalBinaryWrite(message.char, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
@@ -495,11 +506,96 @@ class LoginResponse$Type extends MessageType<LoginResponse> {
495
506
  */
496
507
  export const LoginResponse = new LoginResponse$Type();
497
508
  // @generated message type with reflection information, may provide speed optimized methods
509
+ class LogoutRequest$Type extends MessageType<LogoutRequest> {
510
+ constructor() {
511
+ super("services.auth.LogoutRequest", []);
512
+ }
513
+ create(value?: PartialMessage<LogoutRequest>): LogoutRequest {
514
+ const message = globalThis.Object.create((this.messagePrototype!));
515
+ if (value !== undefined)
516
+ reflectionMergePartial<LogoutRequest>(this, message, value);
517
+ return message;
518
+ }
519
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LogoutRequest): LogoutRequest {
520
+ let message = target ?? this.create(), end = reader.pos + length;
521
+ while (reader.pos < end) {
522
+ let [fieldNo, wireType] = reader.tag();
523
+ switch (fieldNo) {
524
+ default:
525
+ let u = options.readUnknownField;
526
+ if (u === "throw")
527
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
528
+ let d = reader.skip(wireType);
529
+ if (u !== false)
530
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
531
+ }
532
+ }
533
+ return message;
534
+ }
535
+ internalBinaryWrite(message: LogoutRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
536
+ let u = options.writeUnknownFields;
537
+ if (u !== false)
538
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
539
+ return writer;
540
+ }
541
+ }
542
+ /**
543
+ * @generated MessageType for protobuf message services.auth.LogoutRequest
544
+ */
545
+ export const LogoutRequest = new LogoutRequest$Type();
546
+ // @generated message type with reflection information, may provide speed optimized methods
547
+ class LogoutResponse$Type extends MessageType<LogoutResponse> {
548
+ constructor() {
549
+ super("services.auth.LogoutResponse", [
550
+ { no: 1, name: "success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
551
+ ]);
552
+ }
553
+ create(value?: PartialMessage<LogoutResponse>): LogoutResponse {
554
+ const message = globalThis.Object.create((this.messagePrototype!));
555
+ message.success = false;
556
+ if (value !== undefined)
557
+ reflectionMergePartial<LogoutResponse>(this, message, value);
558
+ return message;
559
+ }
560
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LogoutResponse): LogoutResponse {
561
+ let message = target ?? this.create(), end = reader.pos + length;
562
+ while (reader.pos < end) {
563
+ let [fieldNo, wireType] = reader.tag();
564
+ switch (fieldNo) {
565
+ case /* bool success */ 1:
566
+ message.success = reader.bool();
567
+ break;
568
+ default:
569
+ let u = options.readUnknownField;
570
+ if (u === "throw")
571
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
572
+ let d = reader.skip(wireType);
573
+ if (u !== false)
574
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
575
+ }
576
+ }
577
+ return message;
578
+ }
579
+ internalBinaryWrite(message: LogoutResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
580
+ /* bool success = 1; */
581
+ if (message.success !== false)
582
+ writer.tag(1, WireType.Varint).bool(message.success);
583
+ let u = options.writeUnknownFields;
584
+ if (u !== false)
585
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
586
+ return writer;
587
+ }
588
+ }
589
+ /**
590
+ * @generated MessageType for protobuf message services.auth.LogoutResponse
591
+ */
592
+ export const LogoutResponse = new LogoutResponse$Type();
593
+ // @generated message type with reflection information, may provide speed optimized methods
498
594
  class ChangePasswordRequest$Type extends MessageType<ChangePasswordRequest> {
499
595
  constructor() {
500
596
  super("services.auth.ChangePasswordRequest", [
501
- { no: 1, name: "current", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "6", maxBytes: "70" } } } },
502
- { no: 2, name: "new", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "6", maxBytes: "70" } } } }
597
+ { no: 1, name: "current", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "6", maxBytes: "70" } } } },
598
+ { no: 2, name: "new", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "6", maxBytes: "70" } } } }
503
599
  ]);
504
600
  }
505
601
  create(value?: PartialMessage<ChangePasswordRequest>): ChangePasswordRequest {
@@ -599,8 +695,8 @@ export const ChangePasswordResponse = new ChangePasswordResponse$Type();
599
695
  class ChangeUsernameRequest$Type extends MessageType<ChangeUsernameRequest> {
600
696
  constructor() {
601
697
  super("services.auth.ChangeUsernameRequest", [
602
- { no: 1, name: "current", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "24", pattern: "(?i)^[0-9A-Z\u00C4\u00D6\u00DC\u00DF_-]{3,24}$" } } } },
603
- { no: 2, name: "new", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "24", pattern: "(?i)^[0-9A-Z\u00C4\u00D6\u00DC\u00DF_-]{3,24}$" } } } }
698
+ { no: 1, name: "current", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "24", pattern: "(?i)^[0-9A-Z\u00C4\u00D6\u00DC\u00DF_-]{3,24}$" } } } },
699
+ { no: 2, name: "new", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "24", pattern: "(?i)^[0-9A-Z\u00C4\u00D6\u00DC\u00DF_-]{3,24}$" } } } }
604
700
  ]);
605
701
  }
606
702
  create(value?: PartialMessage<ChangeUsernameRequest>): ChangeUsernameRequest {
@@ -692,8 +788,8 @@ export const ChangeUsernameResponse = new ChangeUsernameResponse$Type();
692
788
  class ForgotPasswordRequest$Type extends MessageType<ForgotPasswordRequest> {
693
789
  constructor() {
694
790
  super("services.auth.ForgotPasswordRequest", [
695
- { no: 1, name: "reg_token", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { len: "6", pattern: "^[0-9]{6}$" } } } },
696
- { no: 2, name: "new", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "6", maxBytes: "70" } } } }
791
+ { no: 1, name: "reg_token", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { len: "6", pattern: "^[0-9]{6}$" } } } },
792
+ { no: 2, name: "new", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "6", maxBytes: "70" } } } }
697
793
  ]);
698
794
  }
699
795
  create(value?: PartialMessage<ForgotPasswordRequest>): ForgotPasswordRequest {
@@ -970,7 +1066,7 @@ export const GetCharactersResponse = new GetCharactersResponse$Type();
970
1066
  class ChooseCharacterRequest$Type extends MessageType<ChooseCharacterRequest> {
971
1067
  constructor() {
972
1068
  super("services.auth.ChooseCharacterRequest", [
973
- { no: 1, name: "char_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } }
1069
+ { no: 1, name: "char_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } }
974
1070
  ]);
975
1071
  }
976
1072
  create(value?: PartialMessage<ChooseCharacterRequest>): ChooseCharacterRequest {
@@ -1017,17 +1113,19 @@ export const ChooseCharacterRequest = new ChooseCharacterRequest$Type();
1017
1113
  class ChooseCharacterResponse$Type extends MessageType<ChooseCharacterResponse> {
1018
1114
  constructor() {
1019
1115
  super("services.auth.ChooseCharacterResponse", [
1020
- { no: 1, name: "expires", kind: "message", T: () => Timestamp },
1021
- { no: 2, name: "permissions", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
1116
+ { no: 1, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1117
+ { no: 2, name: "expires", kind: "message", T: () => Timestamp },
1022
1118
  { no: 3, name: "job_props", kind: "message", T: () => JobProps },
1023
- { no: 4, name: "char", kind: "message", T: () => User },
1024
- { no: 5, name: "username", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1119
+ { no: 4, name: "char", kind: "message", T: () => User, options: { "tagger.tags": "alias:\"user\"" } },
1120
+ { no: 5, name: "permissions", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Permission },
1121
+ { no: 6, name: "attributes", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RoleAttribute }
1025
1122
  ]);
1026
1123
  }
1027
1124
  create(value?: PartialMessage<ChooseCharacterResponse>): ChooseCharacterResponse {
1028
1125
  const message = globalThis.Object.create((this.messagePrototype!));
1029
- message.permissions = [];
1030
1126
  message.username = "";
1127
+ message.permissions = [];
1128
+ message.attributes = [];
1031
1129
  if (value !== undefined)
1032
1130
  reflectionMergePartial<ChooseCharacterResponse>(this, message, value);
1033
1131
  return message;
@@ -1037,11 +1135,11 @@ class ChooseCharacterResponse$Type extends MessageType<ChooseCharacterResponse>
1037
1135
  while (reader.pos < end) {
1038
1136
  let [fieldNo, wireType] = reader.tag();
1039
1137
  switch (fieldNo) {
1040
- case /* resources.timestamp.Timestamp expires */ 1:
1041
- message.expires = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expires);
1138
+ case /* string username */ 1:
1139
+ message.username = reader.string();
1042
1140
  break;
1043
- case /* repeated string permissions */ 2:
1044
- message.permissions.push(reader.string());
1141
+ case /* resources.timestamp.Timestamp expires */ 2:
1142
+ message.expires = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expires);
1045
1143
  break;
1046
1144
  case /* resources.jobs.JobProps job_props */ 3:
1047
1145
  message.jobProps = JobProps.internalBinaryRead(reader, reader.uint32(), options, message.jobProps);
@@ -1049,8 +1147,11 @@ class ChooseCharacterResponse$Type extends MessageType<ChooseCharacterResponse>
1049
1147
  case /* resources.users.User char */ 4:
1050
1148
  message.char = User.internalBinaryRead(reader, reader.uint32(), options, message.char);
1051
1149
  break;
1052
- case /* string username */ 5:
1053
- message.username = reader.string();
1150
+ case /* repeated resources.permissions.Permission permissions */ 5:
1151
+ message.permissions.push(Permission.internalBinaryRead(reader, reader.uint32(), options));
1152
+ break;
1153
+ case /* repeated resources.permissions.RoleAttribute attributes */ 6:
1154
+ message.attributes.push(RoleAttribute.internalBinaryRead(reader, reader.uint32(), options));
1054
1155
  break;
1055
1156
  default:
1056
1157
  let u = options.readUnknownField;
@@ -1064,21 +1165,24 @@ class ChooseCharacterResponse$Type extends MessageType<ChooseCharacterResponse>
1064
1165
  return message;
1065
1166
  }
1066
1167
  internalBinaryWrite(message: ChooseCharacterResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1067
- /* resources.timestamp.Timestamp expires = 1; */
1168
+ /* string username = 1; */
1169
+ if (message.username !== "")
1170
+ writer.tag(1, WireType.LengthDelimited).string(message.username);
1171
+ /* resources.timestamp.Timestamp expires = 2; */
1068
1172
  if (message.expires)
1069
- Timestamp.internalBinaryWrite(message.expires, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1070
- /* repeated string permissions = 2; */
1071
- for (let i = 0; i < message.permissions.length; i++)
1072
- writer.tag(2, WireType.LengthDelimited).string(message.permissions[i]);
1173
+ Timestamp.internalBinaryWrite(message.expires, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1073
1174
  /* resources.jobs.JobProps job_props = 3; */
1074
1175
  if (message.jobProps)
1075
1176
  JobProps.internalBinaryWrite(message.jobProps, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
1076
1177
  /* resources.users.User char = 4; */
1077
1178
  if (message.char)
1078
1179
  User.internalBinaryWrite(message.char, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
1079
- /* string username = 5; */
1080
- if (message.username !== "")
1081
- writer.tag(5, WireType.LengthDelimited).string(message.username);
1180
+ /* repeated resources.permissions.Permission permissions = 5; */
1181
+ for (let i = 0; i < message.permissions.length; i++)
1182
+ Permission.internalBinaryWrite(message.permissions[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
1183
+ /* repeated resources.permissions.RoleAttribute attributes = 6; */
1184
+ for (let i = 0; i < message.attributes.length; i++)
1185
+ RoleAttribute.internalBinaryWrite(message.attributes[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
1082
1186
  let u = options.writeUnknownFields;
1083
1187
  if (u !== false)
1084
1188
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1090,95 +1194,10 @@ class ChooseCharacterResponse$Type extends MessageType<ChooseCharacterResponse>
1090
1194
  */
1091
1195
  export const ChooseCharacterResponse = new ChooseCharacterResponse$Type();
1092
1196
  // @generated message type with reflection information, may provide speed optimized methods
1093
- class LogoutRequest$Type extends MessageType<LogoutRequest> {
1094
- constructor() {
1095
- super("services.auth.LogoutRequest", []);
1096
- }
1097
- create(value?: PartialMessage<LogoutRequest>): LogoutRequest {
1098
- const message = globalThis.Object.create((this.messagePrototype!));
1099
- if (value !== undefined)
1100
- reflectionMergePartial<LogoutRequest>(this, message, value);
1101
- return message;
1102
- }
1103
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LogoutRequest): LogoutRequest {
1104
- let message = target ?? this.create(), end = reader.pos + length;
1105
- while (reader.pos < end) {
1106
- let [fieldNo, wireType] = reader.tag();
1107
- switch (fieldNo) {
1108
- default:
1109
- let u = options.readUnknownField;
1110
- if (u === "throw")
1111
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1112
- let d = reader.skip(wireType);
1113
- if (u !== false)
1114
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1115
- }
1116
- }
1117
- return message;
1118
- }
1119
- internalBinaryWrite(message: LogoutRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1120
- let u = options.writeUnknownFields;
1121
- if (u !== false)
1122
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1123
- return writer;
1124
- }
1125
- }
1126
- /**
1127
- * @generated MessageType for protobuf message services.auth.LogoutRequest
1128
- */
1129
- export const LogoutRequest = new LogoutRequest$Type();
1130
- // @generated message type with reflection information, may provide speed optimized methods
1131
- class LogoutResponse$Type extends MessageType<LogoutResponse> {
1132
- constructor() {
1133
- super("services.auth.LogoutResponse", [
1134
- { no: 1, name: "success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
1135
- ]);
1136
- }
1137
- create(value?: PartialMessage<LogoutResponse>): LogoutResponse {
1138
- const message = globalThis.Object.create((this.messagePrototype!));
1139
- message.success = false;
1140
- if (value !== undefined)
1141
- reflectionMergePartial<LogoutResponse>(this, message, value);
1142
- return message;
1143
- }
1144
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LogoutResponse): LogoutResponse {
1145
- let message = target ?? this.create(), end = reader.pos + length;
1146
- while (reader.pos < end) {
1147
- let [fieldNo, wireType] = reader.tag();
1148
- switch (fieldNo) {
1149
- case /* bool success */ 1:
1150
- message.success = reader.bool();
1151
- break;
1152
- default:
1153
- let u = options.readUnknownField;
1154
- if (u === "throw")
1155
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1156
- let d = reader.skip(wireType);
1157
- if (u !== false)
1158
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1159
- }
1160
- }
1161
- return message;
1162
- }
1163
- internalBinaryWrite(message: LogoutResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1164
- /* bool success = 1; */
1165
- if (message.success !== false)
1166
- writer.tag(1, WireType.Varint).bool(message.success);
1167
- let u = options.writeUnknownFields;
1168
- if (u !== false)
1169
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1170
- return writer;
1171
- }
1172
- }
1173
- /**
1174
- * @generated MessageType for protobuf message services.auth.LogoutResponse
1175
- */
1176
- export const LogoutResponse = new LogoutResponse$Type();
1177
- // @generated message type with reflection information, may provide speed optimized methods
1178
1197
  class DeleteOAuth2ConnectionRequest$Type extends MessageType<DeleteOAuth2ConnectionRequest> {
1179
1198
  constructor() {
1180
1199
  super("services.auth.DeleteOAuth2ConnectionRequest", [
1181
- { no: 1, name: "provider", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } }
1200
+ { no: 1, name: "provider", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } }
1182
1201
  ]);
1183
1202
  }
1184
1203
  create(value?: PartialMessage<DeleteOAuth2ConnectionRequest>): DeleteOAuth2ConnectionRequest {
@@ -1273,7 +1292,7 @@ class SetSuperuserModeRequest$Type extends MessageType<SetSuperuserModeRequest>
1273
1292
  constructor() {
1274
1293
  super("services.auth.SetSuperuserModeRequest", [
1275
1294
  { no: 1, name: "superuser", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
1276
- { no: 2, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } }
1295
+ { no: 2, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } }
1277
1296
  ]);
1278
1297
  }
1279
1298
  create(value?: PartialMessage<SetSuperuserModeRequest>): SetSuperuserModeRequest {
@@ -1326,15 +1345,17 @@ export const SetSuperuserModeRequest = new SetSuperuserModeRequest$Type();
1326
1345
  class SetSuperuserModeResponse$Type extends MessageType<SetSuperuserModeResponse> {
1327
1346
  constructor() {
1328
1347
  super("services.auth.SetSuperuserModeResponse", [
1329
- { no: 1, name: "expires", kind: "message", T: () => Timestamp },
1330
- { no: 2, name: "permissions", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
1348
+ { no: 2, name: "expires", kind: "message", T: () => Timestamp },
1331
1349
  { no: 3, name: "job_props", kind: "message", T: () => JobProps },
1332
- { no: 4, name: "char", kind: "message", T: () => User }
1350
+ { no: 4, name: "char", kind: "message", T: () => User, options: { "tagger.tags": "alias:\"user\"" } },
1351
+ { no: 5, name: "permissions", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Permission },
1352
+ { no: 6, name: "attributes", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RoleAttribute }
1333
1353
  ]);
1334
1354
  }
1335
1355
  create(value?: PartialMessage<SetSuperuserModeResponse>): SetSuperuserModeResponse {
1336
1356
  const message = globalThis.Object.create((this.messagePrototype!));
1337
1357
  message.permissions = [];
1358
+ message.attributes = [];
1338
1359
  if (value !== undefined)
1339
1360
  reflectionMergePartial<SetSuperuserModeResponse>(this, message, value);
1340
1361
  return message;
@@ -1344,18 +1365,21 @@ class SetSuperuserModeResponse$Type extends MessageType<SetSuperuserModeResponse
1344
1365
  while (reader.pos < end) {
1345
1366
  let [fieldNo, wireType] = reader.tag();
1346
1367
  switch (fieldNo) {
1347
- case /* resources.timestamp.Timestamp expires */ 1:
1368
+ case /* resources.timestamp.Timestamp expires */ 2:
1348
1369
  message.expires = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expires);
1349
1370
  break;
1350
- case /* repeated string permissions */ 2:
1351
- message.permissions.push(reader.string());
1352
- break;
1353
1371
  case /* optional resources.jobs.JobProps job_props */ 3:
1354
1372
  message.jobProps = JobProps.internalBinaryRead(reader, reader.uint32(), options, message.jobProps);
1355
1373
  break;
1356
1374
  case /* resources.users.User char */ 4:
1357
1375
  message.char = User.internalBinaryRead(reader, reader.uint32(), options, message.char);
1358
1376
  break;
1377
+ case /* repeated resources.permissions.Permission permissions */ 5:
1378
+ message.permissions.push(Permission.internalBinaryRead(reader, reader.uint32(), options));
1379
+ break;
1380
+ case /* repeated resources.permissions.RoleAttribute attributes */ 6:
1381
+ message.attributes.push(RoleAttribute.internalBinaryRead(reader, reader.uint32(), options));
1382
+ break;
1359
1383
  default:
1360
1384
  let u = options.readUnknownField;
1361
1385
  if (u === "throw")
@@ -1368,18 +1392,21 @@ class SetSuperuserModeResponse$Type extends MessageType<SetSuperuserModeResponse
1368
1392
  return message;
1369
1393
  }
1370
1394
  internalBinaryWrite(message: SetSuperuserModeResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1371
- /* resources.timestamp.Timestamp expires = 1; */
1395
+ /* resources.timestamp.Timestamp expires = 2; */
1372
1396
  if (message.expires)
1373
- Timestamp.internalBinaryWrite(message.expires, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1374
- /* repeated string permissions = 2; */
1375
- for (let i = 0; i < message.permissions.length; i++)
1376
- writer.tag(2, WireType.LengthDelimited).string(message.permissions[i]);
1397
+ Timestamp.internalBinaryWrite(message.expires, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1377
1398
  /* optional resources.jobs.JobProps job_props = 3; */
1378
1399
  if (message.jobProps)
1379
1400
  JobProps.internalBinaryWrite(message.jobProps, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
1380
1401
  /* resources.users.User char = 4; */
1381
1402
  if (message.char)
1382
1403
  User.internalBinaryWrite(message.char, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
1404
+ /* repeated resources.permissions.Permission permissions = 5; */
1405
+ for (let i = 0; i < message.permissions.length; i++)
1406
+ Permission.internalBinaryWrite(message.permissions[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
1407
+ /* repeated resources.permissions.RoleAttribute attributes = 6; */
1408
+ for (let i = 0; i < message.attributes.length; i++)
1409
+ RoleAttribute.internalBinaryWrite(message.attributes[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
1383
1410
  let u = options.writeUnknownFields;
1384
1411
  if (u !== false)
1385
1412
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1401,7 +1428,7 @@ export const AuthService = new ServiceType("services.auth.AuthService", [
1401
1428
  { name: "ChangePassword", options: {}, I: ChangePasswordRequest, O: ChangePasswordResponse },
1402
1429
  { name: "ForgotPassword", options: {}, I: ForgotPasswordRequest, O: ForgotPasswordResponse },
1403
1430
  { name: "GetCharacters", options: {}, I: GetCharactersRequest, O: GetCharactersResponse },
1404
- { name: "ChooseCharacter", options: {}, I: ChooseCharacterRequest, O: ChooseCharacterResponse },
1431
+ { name: "ChooseCharacter", options: { "codegen.perms.perms": { enabled: true } }, I: ChooseCharacterRequest, O: ChooseCharacterResponse },
1405
1432
  { name: "GetAccountInfo", options: {}, I: GetAccountInfoRequest, O: GetAccountInfoResponse },
1406
1433
  { name: "DeleteOAuth2Connection", options: {}, I: DeleteOAuth2ConnectionRequest, O: DeleteOAuth2ConnectionResponse },
1407
1434
  { name: "SetSuperuserMode", options: {}, I: SetSuperuserModeRequest, O: SetSuperuserModeResponse }