@fivenet-app/gen 2026.8.5 → 2026.10.2

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 (63) hide show
  1. package/LICENSE +201 -0
  2. package/clients.ts +12 -0
  3. package/codegen/perms/perms.ts +331 -2
  4. package/google/protobuf/any.ts +47 -103
  5. package/google/protobuf/descriptor.ts +39 -32
  6. package/google/protobuf/struct.ts +33 -22
  7. package/google/protobuf/timestamp.ts +9 -8
  8. package/package.json +2 -2
  9. package/perms.ts +41 -13
  10. package/resources/centrum/dispatches/dispatches.ts +206 -13
  11. package/resources/centrum/units/units.ts +207 -0
  12. package/resources/cron/cron.ts +44 -3
  13. package/resources/documents/templates/templates.ts +3 -3
  14. package/resources/file/file.ts +3 -3
  15. package/resources/file/filestore.ts +26 -10
  16. package/resources/jobs/colleagues/activity/activity.ts +50 -8
  17. package/resources/jobs/colleagues/colleagues.ts +14 -1
  18. package/resources/jobs/groups/short/group_member_short.ts +129 -0
  19. package/resources/jobs/job_asset.ts +116 -0
  20. package/resources/jobs/user_selector.ts +1 -15
  21. package/resources/notifications/clientview/clientview.ts +5 -1
  22. package/resources/notifications/events/events.ts +35 -1
  23. package/resources/notifications/notifications.ts +322 -2
  24. package/resources/permissions/attributes/attributes.ts +164 -2
  25. package/resources/permissions/authorization/authorization.ts +86 -0
  26. package/resources/permissions/permissions/permissions.ts +16 -1
  27. package/resources/properties/properties.ts +1648 -0
  28. package/resources/qualifications/activity/activity.ts +328 -0
  29. package/resources/qualifications/exam/exam.ts +108 -4
  30. package/resources/qualifications/qualifications.ts +36 -2
  31. package/resources/settings/config.ts +3 -3
  32. package/resources/sync/activity/activity.ts +4 -4
  33. package/resources/sync/data/data.ts +16 -4
  34. package/resources/users/activity/activity.ts +220 -3
  35. package/resources/users/props/props.ts +13 -1
  36. package/resources/users/user.ts +13 -1
  37. package/resources/vehicles/activity/activity.ts +222 -3
  38. package/resources/vehicles/props/props.ts +13 -1
  39. package/resources/vehicles/vehicles.ts +13 -1
  40. package/services/auth/auth.ts +61 -67
  41. package/services/centrum/centrum.ts +103 -1
  42. package/services/centrum/dispatches.ts +25 -1
  43. package/services/centrum/units.ts +25 -1
  44. package/services/citizens/citizens.client.ts +49 -0
  45. package/services/citizens/citizens.ts +384 -7
  46. package/services/documents/documents.ts +1 -0
  47. package/services/documents/templates.ts +12 -1
  48. package/services/jobs/colleagues.ts +26 -1
  49. package/services/jobs/conduct.ts +1 -0
  50. package/services/jobs/groups.ts +62 -4
  51. package/services/notifications/notifications.client.ts +40 -1
  52. package/services/notifications/notifications.ts +483 -3
  53. package/services/qualifications/qualifications.client.ts +20 -7
  54. package/services/qualifications/qualifications.ts +265 -4
  55. package/services/settings/job_assets.client.ts +105 -0
  56. package/services/settings/job_assets.ts +373 -0
  57. package/services/settings/properties.client.ts +194 -0
  58. package/services/settings/properties.ts +1555 -0
  59. package/services/settings/system.ts +29 -9
  60. package/services/sync/sync.ts +115 -12
  61. package/services/vehicles/vehicles.client.ts +52 -0
  62. package/services/vehicles/vehicles.ts +385 -7
  63. package/svcs.ts +58 -0
@@ -12,8 +12,7 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
12
12
  import type { PartialMessage } from "@protobuf-ts/runtime";
13
13
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
14
14
  import { MessageType } from "@protobuf-ts/runtime";
15
- import { RoleAttribute } from "../../resources/permissions/attributes/attributes";
16
- import { Permission } from "../../resources/permissions/permissions/permissions";
15
+ import { AuthorizationState } from "../../resources/permissions/authorization/authorization";
17
16
  import { User } from "../../resources/users/user";
18
17
  import { JobProps } from "../../resources/jobs/props/props";
19
18
  import { Character } from "../../resources/accounts/accounts";
@@ -50,6 +49,10 @@ export interface LoginResponse {
50
49
  * @generated from protobuf field: optional services.auth.ChooseCharacterResponse char = 3
51
50
  */
52
51
  char?: ChooseCharacterResponse;
52
+ /**
53
+ * @generated from protobuf field: bool can_be_config_admin = 4
54
+ */
55
+ canBeConfigAdmin: boolean;
53
56
  }
54
57
  /**
55
58
  * @generated from protobuf message services.auth.LogoutRequest
@@ -215,6 +218,14 @@ export interface ChooseCharacterRequest {
215
218
  * @generated from protobuf field: int32 char_id = 1
216
219
  */
217
220
  charId: number;
221
+ /**
222
+ * @generated from protobuf field: optional bool restore_superuser = 2
223
+ */
224
+ restoreSuperuser?: boolean;
225
+ /**
226
+ * @generated from protobuf field: optional string superuser_job = 3
227
+ */
228
+ superuserJob?: string;
218
229
  }
219
230
  /**
220
231
  * @generated from protobuf message services.auth.ChooseCharacterResponse
@@ -241,13 +252,9 @@ export interface ChooseCharacterResponse {
241
252
  */
242
253
  char?: User;
243
254
  /**
244
- * @generated from protobuf field: repeated resources.permissions.permissions.Permission permissions = 6
245
- */
246
- permissions: Permission[];
247
- /**
248
- * @generated from protobuf field: repeated resources.permissions.attributes.RoleAttribute attributes = 7
255
+ * @generated from protobuf field: resources.permissions.authorization.AuthorizationState authorization = 8
249
256
  */
250
- attributes: RoleAttribute[];
257
+ authorization?: AuthorizationState;
251
258
  }
252
259
  /**
253
260
  * @generated from protobuf message services.auth.ImpersonateJobRequest
@@ -275,13 +282,9 @@ export interface ImpersonateJobResponse {
275
282
  */
276
283
  char?: User;
277
284
  /**
278
- * @generated from protobuf field: repeated resources.permissions.permissions.Permission permissions = 4
285
+ * @generated from protobuf field: resources.permissions.authorization.AuthorizationState authorization = 7
279
286
  */
280
- permissions: Permission[];
281
- /**
282
- * @generated from protobuf field: repeated resources.permissions.attributes.RoleAttribute attributes = 5
283
- */
284
- attributes: RoleAttribute[];
287
+ authorization?: AuthorizationState;
285
288
  /**
286
289
  * @generated from protobuf field: bool state = 6
287
290
  */
@@ -339,13 +342,9 @@ export interface SetSuperuserModeResponse {
339
342
  */
340
343
  char?: User;
341
344
  /**
342
- * @generated from protobuf field: repeated resources.permissions.permissions.Permission permissions = 5
343
- */
344
- permissions: Permission[];
345
- /**
346
- * @generated from protobuf field: repeated resources.permissions.attributes.RoleAttribute attributes = 6
345
+ * @generated from protobuf field: resources.permissions.authorization.AuthorizationState authorization = 7
347
346
  */
348
- attributes: RoleAttribute[];
347
+ authorization?: AuthorizationState;
349
348
  }
350
349
  // @generated message type with reflection information, may provide speed optimized methods
351
350
  class LoginRequest$Type extends MessageType<LoginRequest> {
@@ -408,12 +407,14 @@ class LoginResponse$Type extends MessageType<LoginResponse> {
408
407
  super("services.auth.LoginResponse", [
409
408
  { no: 1, name: "expires", kind: "message", T: () => Timestamp },
410
409
  { no: 2, name: "account_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
411
- { no: 3, name: "char", kind: "message", T: () => ChooseCharacterResponse }
410
+ { no: 3, name: "char", kind: "message", T: () => ChooseCharacterResponse },
411
+ { no: 4, name: "can_be_config_admin", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
412
412
  ]);
413
413
  }
414
414
  create(value?: PartialMessage<LoginResponse>): LoginResponse {
415
415
  const message = globalThis.Object.create((this.messagePrototype!));
416
416
  message.accountId = 0;
417
+ message.canBeConfigAdmin = false;
417
418
  if (value !== undefined)
418
419
  reflectionMergePartial<LoginResponse>(this, message, value);
419
420
  return message;
@@ -432,6 +433,9 @@ class LoginResponse$Type extends MessageType<LoginResponse> {
432
433
  case /* optional services.auth.ChooseCharacterResponse char */ 3:
433
434
  message.char = ChooseCharacterResponse.internalBinaryRead(reader, reader.uint32(), options, message.char);
434
435
  break;
436
+ case /* bool can_be_config_admin */ 4:
437
+ message.canBeConfigAdmin = reader.bool();
438
+ break;
435
439
  default:
436
440
  let u = options.readUnknownField;
437
441
  if (u === "throw")
@@ -453,6 +457,9 @@ class LoginResponse$Type extends MessageType<LoginResponse> {
453
457
  /* optional services.auth.ChooseCharacterResponse char = 3; */
454
458
  if (message.char)
455
459
  ChooseCharacterResponse.internalBinaryWrite(message.char, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
460
+ /* bool can_be_config_admin = 4; */
461
+ if (message.canBeConfigAdmin !== false)
462
+ writer.tag(4, WireType.Varint).bool(message.canBeConfigAdmin);
456
463
  let u = options.writeUnknownFields;
457
464
  if (u !== false)
458
465
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1234,7 +1241,9 @@ export const GetCharactersResponse = new GetCharactersResponse$Type();
1234
1241
  class ChooseCharacterRequest$Type extends MessageType<ChooseCharacterRequest> {
1235
1242
  constructor() {
1236
1243
  super("services.auth.ChooseCharacterRequest", [
1237
- { no: 1, name: "char_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } }
1244
+ { no: 1, name: "char_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
1245
+ { no: 2, name: "restore_superuser", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
1246
+ { no: 3, name: "superuser_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
1238
1247
  ]);
1239
1248
  }
1240
1249
  create(value?: PartialMessage<ChooseCharacterRequest>): ChooseCharacterRequest {
@@ -1252,6 +1261,12 @@ class ChooseCharacterRequest$Type extends MessageType<ChooseCharacterRequest> {
1252
1261
  case /* int32 char_id */ 1:
1253
1262
  message.charId = reader.int32();
1254
1263
  break;
1264
+ case /* optional bool restore_superuser */ 2:
1265
+ message.restoreSuperuser = reader.bool();
1266
+ break;
1267
+ case /* optional string superuser_job */ 3:
1268
+ message.superuserJob = reader.string();
1269
+ break;
1255
1270
  default:
1256
1271
  let u = options.readUnknownField;
1257
1272
  if (u === "throw")
@@ -1267,6 +1282,12 @@ class ChooseCharacterRequest$Type extends MessageType<ChooseCharacterRequest> {
1267
1282
  /* int32 char_id = 1; */
1268
1283
  if (message.charId !== 0)
1269
1284
  writer.tag(1, WireType.Varint).int32(message.charId);
1285
+ /* optional bool restore_superuser = 2; */
1286
+ if (message.restoreSuperuser !== undefined)
1287
+ writer.tag(2, WireType.Varint).bool(message.restoreSuperuser);
1288
+ /* optional string superuser_job = 3; */
1289
+ if (message.superuserJob !== undefined)
1290
+ writer.tag(3, WireType.LengthDelimited).string(message.superuserJob);
1270
1291
  let u = options.writeUnknownFields;
1271
1292
  if (u !== false)
1272
1293
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1286,16 +1307,13 @@ class ChooseCharacterResponse$Type extends MessageType<ChooseCharacterResponse>
1286
1307
  { no: 3, name: "expires", kind: "message", T: () => Timestamp },
1287
1308
  { no: 4, name: "job_props", kind: "message", T: () => JobProps },
1288
1309
  { no: 5, name: "char", kind: "message", T: () => User, options: { "tagger.tags": "alias:\"user\"" } },
1289
- { no: 6, name: "permissions", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Permission },
1290
- { no: 7, name: "attributes", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RoleAttribute }
1310
+ { no: 8, name: "authorization", kind: "message", T: () => AuthorizationState }
1291
1311
  ]);
1292
1312
  }
1293
1313
  create(value?: PartialMessage<ChooseCharacterResponse>): ChooseCharacterResponse {
1294
1314
  const message = globalThis.Object.create((this.messagePrototype!));
1295
1315
  message.token = "";
1296
1316
  message.username = "";
1297
- message.permissions = [];
1298
- message.attributes = [];
1299
1317
  if (value !== undefined)
1300
1318
  reflectionMergePartial<ChooseCharacterResponse>(this, message, value);
1301
1319
  return message;
@@ -1320,11 +1338,8 @@ class ChooseCharacterResponse$Type extends MessageType<ChooseCharacterResponse>
1320
1338
  case /* resources.users.User char */ 5:
1321
1339
  message.char = User.internalBinaryRead(reader, reader.uint32(), options, message.char);
1322
1340
  break;
1323
- case /* repeated resources.permissions.permissions.Permission permissions */ 6:
1324
- message.permissions.push(Permission.internalBinaryRead(reader, reader.uint32(), options));
1325
- break;
1326
- case /* repeated resources.permissions.attributes.RoleAttribute attributes */ 7:
1327
- message.attributes.push(RoleAttribute.internalBinaryRead(reader, reader.uint32(), options));
1341
+ case /* resources.permissions.authorization.AuthorizationState authorization */ 8:
1342
+ message.authorization = AuthorizationState.internalBinaryRead(reader, reader.uint32(), options, message.authorization);
1328
1343
  break;
1329
1344
  default:
1330
1345
  let u = options.readUnknownField;
@@ -1353,12 +1368,9 @@ class ChooseCharacterResponse$Type extends MessageType<ChooseCharacterResponse>
1353
1368
  /* resources.users.User char = 5; */
1354
1369
  if (message.char)
1355
1370
  User.internalBinaryWrite(message.char, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
1356
- /* repeated resources.permissions.permissions.Permission permissions = 6; */
1357
- for (let i = 0; i < message.permissions.length; i++)
1358
- Permission.internalBinaryWrite(message.permissions[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
1359
- /* repeated resources.permissions.attributes.RoleAttribute attributes = 7; */
1360
- for (let i = 0; i < message.attributes.length; i++)
1361
- RoleAttribute.internalBinaryWrite(message.attributes[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
1371
+ /* resources.permissions.authorization.AuthorizationState authorization = 8; */
1372
+ if (message.authorization)
1373
+ AuthorizationState.internalBinaryWrite(message.authorization, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
1362
1374
  let u = options.writeUnknownFields;
1363
1375
  if (u !== false)
1364
1376
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1423,16 +1435,13 @@ class ImpersonateJobResponse$Type extends MessageType<ImpersonateJobResponse> {
1423
1435
  { no: 1, name: "token", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1424
1436
  { no: 2, name: "expires", kind: "message", T: () => Timestamp },
1425
1437
  { no: 3, name: "char", kind: "message", T: () => User, options: { "tagger.tags": "alias:\"user\"" } },
1426
- { no: 4, name: "permissions", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Permission },
1427
- { no: 5, name: "attributes", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RoleAttribute },
1438
+ { no: 7, name: "authorization", kind: "message", T: () => AuthorizationState },
1428
1439
  { no: 6, name: "state", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
1429
1440
  ]);
1430
1441
  }
1431
1442
  create(value?: PartialMessage<ImpersonateJobResponse>): ImpersonateJobResponse {
1432
1443
  const message = globalThis.Object.create((this.messagePrototype!));
1433
1444
  message.token = "";
1434
- message.permissions = [];
1435
- message.attributes = [];
1436
1445
  message.state = false;
1437
1446
  if (value !== undefined)
1438
1447
  reflectionMergePartial<ImpersonateJobResponse>(this, message, value);
@@ -1452,11 +1461,8 @@ class ImpersonateJobResponse$Type extends MessageType<ImpersonateJobResponse> {
1452
1461
  case /* resources.users.User char */ 3:
1453
1462
  message.char = User.internalBinaryRead(reader, reader.uint32(), options, message.char);
1454
1463
  break;
1455
- case /* repeated resources.permissions.permissions.Permission permissions */ 4:
1456
- message.permissions.push(Permission.internalBinaryRead(reader, reader.uint32(), options));
1457
- break;
1458
- case /* repeated resources.permissions.attributes.RoleAttribute attributes */ 5:
1459
- message.attributes.push(RoleAttribute.internalBinaryRead(reader, reader.uint32(), options));
1464
+ case /* resources.permissions.authorization.AuthorizationState authorization */ 7:
1465
+ message.authorization = AuthorizationState.internalBinaryRead(reader, reader.uint32(), options, message.authorization);
1460
1466
  break;
1461
1467
  case /* bool state */ 6:
1462
1468
  message.state = reader.bool();
@@ -1482,15 +1488,12 @@ class ImpersonateJobResponse$Type extends MessageType<ImpersonateJobResponse> {
1482
1488
  /* resources.users.User char = 3; */
1483
1489
  if (message.char)
1484
1490
  User.internalBinaryWrite(message.char, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
1485
- /* repeated resources.permissions.permissions.Permission permissions = 4; */
1486
- for (let i = 0; i < message.permissions.length; i++)
1487
- Permission.internalBinaryWrite(message.permissions[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
1488
- /* repeated resources.permissions.attributes.RoleAttribute attributes = 5; */
1489
- for (let i = 0; i < message.attributes.length; i++)
1490
- RoleAttribute.internalBinaryWrite(message.attributes[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
1491
1491
  /* bool state = 6; */
1492
1492
  if (message.state !== false)
1493
1493
  writer.tag(6, WireType.Varint).bool(message.state);
1494
+ /* resources.permissions.authorization.AuthorizationState authorization = 7; */
1495
+ if (message.authorization)
1496
+ AuthorizationState.internalBinaryWrite(message.authorization, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
1494
1497
  let u = options.writeUnknownFields;
1495
1498
  if (u !== false)
1496
1499
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1657,15 +1660,12 @@ class SetSuperuserModeResponse$Type extends MessageType<SetSuperuserModeResponse
1657
1660
  { no: 2, name: "expires", kind: "message", T: () => Timestamp },
1658
1661
  { no: 3, name: "job_props", kind: "message", T: () => JobProps },
1659
1662
  { no: 4, name: "char", kind: "message", T: () => User, options: { "tagger.tags": "alias:\"user\"" } },
1660
- { no: 5, name: "permissions", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Permission },
1661
- { no: 6, name: "attributes", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RoleAttribute }
1663
+ { no: 7, name: "authorization", kind: "message", T: () => AuthorizationState }
1662
1664
  ]);
1663
1665
  }
1664
1666
  create(value?: PartialMessage<SetSuperuserModeResponse>): SetSuperuserModeResponse {
1665
1667
  const message = globalThis.Object.create((this.messagePrototype!));
1666
1668
  message.token = "";
1667
- message.permissions = [];
1668
- message.attributes = [];
1669
1669
  if (value !== undefined)
1670
1670
  reflectionMergePartial<SetSuperuserModeResponse>(this, message, value);
1671
1671
  return message;
@@ -1687,11 +1687,8 @@ class SetSuperuserModeResponse$Type extends MessageType<SetSuperuserModeResponse
1687
1687
  case /* resources.users.User char */ 4:
1688
1688
  message.char = User.internalBinaryRead(reader, reader.uint32(), options, message.char);
1689
1689
  break;
1690
- case /* repeated resources.permissions.permissions.Permission permissions */ 5:
1691
- message.permissions.push(Permission.internalBinaryRead(reader, reader.uint32(), options));
1692
- break;
1693
- case /* repeated resources.permissions.attributes.RoleAttribute attributes */ 6:
1694
- message.attributes.push(RoleAttribute.internalBinaryRead(reader, reader.uint32(), options));
1690
+ case /* resources.permissions.authorization.AuthorizationState authorization */ 7:
1691
+ message.authorization = AuthorizationState.internalBinaryRead(reader, reader.uint32(), options, message.authorization);
1695
1692
  break;
1696
1693
  default:
1697
1694
  let u = options.readUnknownField;
@@ -1717,12 +1714,9 @@ class SetSuperuserModeResponse$Type extends MessageType<SetSuperuserModeResponse
1717
1714
  /* resources.users.User char = 4; */
1718
1715
  if (message.char)
1719
1716
  User.internalBinaryWrite(message.char, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
1720
- /* repeated resources.permissions.permissions.Permission permissions = 5; */
1721
- for (let i = 0; i < message.permissions.length; i++)
1722
- Permission.internalBinaryWrite(message.permissions[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
1723
- /* repeated resources.permissions.attributes.RoleAttribute attributes = 6; */
1724
- for (let i = 0; i < message.attributes.length; i++)
1725
- RoleAttribute.internalBinaryWrite(message.attributes[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
1717
+ /* resources.permissions.authorization.AuthorizationState authorization = 7; */
1718
+ if (message.authorization)
1719
+ AuthorizationState.internalBinaryWrite(message.authorization, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
1726
1720
  let u = options.writeUnknownFields;
1727
1721
  if (u !== false)
1728
1722
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -12,6 +12,10 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
12
12
  import type { PartialMessage } from "@protobuf-ts/runtime";
13
13
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
14
14
  import { MessageType } from "@protobuf-ts/runtime";
15
+ import { DispatchAssignments } from "../../resources/centrum/dispatches/dispatches";
16
+ import { DispatchSpec } from "../../resources/centrum/dispatches/dispatches";
17
+ import { UnitAssignments } from "../../resources/centrum/units/units";
18
+ import { UnitSpec } from "../../resources/centrum/units/units";
15
19
  import { DispatchStatus } from "../../resources/centrum/dispatches/dispatches";
16
20
  import { UnitStatus } from "../../resources/centrum/units/units";
17
21
  import { Dispatch } from "../../resources/centrum/dispatches/dispatches";
@@ -163,6 +167,13 @@ export interface StreamRequest {
163
167
  * @generated from protobuf message services.centrum.StreamResponse
164
168
  */
165
169
  export interface StreamResponse {
170
+ /**
171
+ * Monotonic JetStream sequence of the source KV stream. It orders aggregate
172
+ * updates and delete tombstones for a single KV-backed resource.
173
+ *
174
+ * @generated from protobuf field: uint64 kv_revision = 13
175
+ */
176
+ kvRevision: number;
166
177
  /**
167
178
  * @generated from protobuf oneof: change
168
179
  */
@@ -232,6 +243,39 @@ export interface StreamResponse {
232
243
  * @generated from protobuf field: resources.centrum.dispatches.DispatchStatus dispatch_status = 11
233
244
  */
234
245
  dispatchStatus: DispatchStatus;
246
+ } | {
247
+ oneofKind: "settingsDeleted";
248
+ /**
249
+ * @generated from protobuf field: string settings_deleted = 12
250
+ */
251
+ settingsDeleted: string;
252
+ } | {
253
+ oneofKind: "unitSpecUpdated";
254
+ /**
255
+ * Independent unit projection updates. These replace the corresponding
256
+ * portion of a unit without requiring the full composed resource.
257
+ *
258
+ * @generated from protobuf field: resources.centrum.units.UnitSpec unit_spec_updated = 14
259
+ */
260
+ unitSpecUpdated: UnitSpec;
261
+ } | {
262
+ oneofKind: "unitMembersUpdated";
263
+ /**
264
+ * @generated from protobuf field: resources.centrum.units.UnitAssignments unit_members_updated = 15
265
+ */
266
+ unitMembersUpdated: UnitAssignments;
267
+ } | {
268
+ oneofKind: "dispatchSpecUpdated";
269
+ /**
270
+ * @generated from protobuf field: resources.centrum.dispatches.DispatchSpec dispatch_spec_updated = 16
271
+ */
272
+ dispatchSpecUpdated: DispatchSpec;
273
+ } | {
274
+ oneofKind: "dispatchAssignmentsUpdated";
275
+ /**
276
+ * @generated from protobuf field: resources.centrum.dispatches.DispatchAssignments dispatch_assignments_updated = 17
277
+ */
278
+ dispatchAssignmentsUpdated: DispatchAssignments;
235
279
  } | {
236
280
  oneofKind: undefined;
237
281
  };
@@ -869,6 +913,7 @@ export const StreamRequest = new StreamRequest$Type();
869
913
  class StreamResponse$Type extends MessageType<StreamResponse> {
870
914
  constructor() {
871
915
  super("services.centrum.StreamResponse", [
916
+ { no: 13, name: "kv_revision", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
872
917
  { no: 1, name: "handshake", kind: "message", oneof: "change", T: () => StreamHandshake },
873
918
  { no: 2, name: "latest_state", kind: "message", oneof: "change", T: () => LatestState },
874
919
  { no: 3, name: "settings", kind: "message", oneof: "change", T: () => Settings },
@@ -879,11 +924,17 @@ class StreamResponse$Type extends MessageType<StreamResponse> {
879
924
  { no: 8, name: "unit_status", kind: "message", oneof: "change", T: () => UnitStatus },
880
925
  { no: 9, name: "dispatch_deleted", kind: "scalar", oneof: "change", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
881
926
  { no: 10, name: "dispatch_updated", kind: "message", oneof: "change", T: () => Dispatch },
882
- { no: 11, name: "dispatch_status", kind: "message", oneof: "change", T: () => DispatchStatus }
927
+ { no: 11, name: "dispatch_status", kind: "message", oneof: "change", T: () => DispatchStatus },
928
+ { no: 12, name: "settings_deleted", kind: "scalar", oneof: "change", T: 9 /*ScalarType.STRING*/ },
929
+ { no: 14, name: "unit_spec_updated", kind: "message", oneof: "change", T: () => UnitSpec },
930
+ { no: 15, name: "unit_members_updated", kind: "message", oneof: "change", T: () => UnitAssignments },
931
+ { no: 16, name: "dispatch_spec_updated", kind: "message", oneof: "change", T: () => DispatchSpec },
932
+ { no: 17, name: "dispatch_assignments_updated", kind: "message", oneof: "change", T: () => DispatchAssignments }
883
933
  ]);
884
934
  }
885
935
  create(value?: PartialMessage<StreamResponse>): StreamResponse {
886
936
  const message = globalThis.Object.create((this.messagePrototype!));
937
+ message.kvRevision = 0;
887
938
  message.change = { oneofKind: undefined };
888
939
  if (value !== undefined)
889
940
  reflectionMergePartial<StreamResponse>(this, message, value);
@@ -894,6 +945,9 @@ class StreamResponse$Type extends MessageType<StreamResponse> {
894
945
  while (reader.pos < end) {
895
946
  let [fieldNo, wireType] = reader.tag();
896
947
  switch (fieldNo) {
948
+ case /* uint64 kv_revision */ 13:
949
+ message.kvRevision = reader.uint64().toNumber();
950
+ break;
897
951
  case /* services.centrum.StreamHandshake handshake */ 1:
898
952
  message.change = {
899
953
  oneofKind: "handshake",
@@ -960,6 +1014,36 @@ class StreamResponse$Type extends MessageType<StreamResponse> {
960
1014
  dispatchStatus: DispatchStatus.internalBinaryRead(reader, reader.uint32(), options, (message.change as any).dispatchStatus)
961
1015
  };
962
1016
  break;
1017
+ case /* string settings_deleted */ 12:
1018
+ message.change = {
1019
+ oneofKind: "settingsDeleted",
1020
+ settingsDeleted: reader.string()
1021
+ };
1022
+ break;
1023
+ case /* resources.centrum.units.UnitSpec unit_spec_updated */ 14:
1024
+ message.change = {
1025
+ oneofKind: "unitSpecUpdated",
1026
+ unitSpecUpdated: UnitSpec.internalBinaryRead(reader, reader.uint32(), options, (message.change as any).unitSpecUpdated)
1027
+ };
1028
+ break;
1029
+ case /* resources.centrum.units.UnitAssignments unit_members_updated */ 15:
1030
+ message.change = {
1031
+ oneofKind: "unitMembersUpdated",
1032
+ unitMembersUpdated: UnitAssignments.internalBinaryRead(reader, reader.uint32(), options, (message.change as any).unitMembersUpdated)
1033
+ };
1034
+ break;
1035
+ case /* resources.centrum.dispatches.DispatchSpec dispatch_spec_updated */ 16:
1036
+ message.change = {
1037
+ oneofKind: "dispatchSpecUpdated",
1038
+ dispatchSpecUpdated: DispatchSpec.internalBinaryRead(reader, reader.uint32(), options, (message.change as any).dispatchSpecUpdated)
1039
+ };
1040
+ break;
1041
+ case /* resources.centrum.dispatches.DispatchAssignments dispatch_assignments_updated */ 17:
1042
+ message.change = {
1043
+ oneofKind: "dispatchAssignmentsUpdated",
1044
+ dispatchAssignmentsUpdated: DispatchAssignments.internalBinaryRead(reader, reader.uint32(), options, (message.change as any).dispatchAssignmentsUpdated)
1045
+ };
1046
+ break;
963
1047
  default:
964
1048
  let u = options.readUnknownField;
965
1049
  if (u === "throw")
@@ -1005,6 +1089,24 @@ class StreamResponse$Type extends MessageType<StreamResponse> {
1005
1089
  /* resources.centrum.dispatches.DispatchStatus dispatch_status = 11; */
1006
1090
  if (message.change.oneofKind === "dispatchStatus")
1007
1091
  DispatchStatus.internalBinaryWrite(message.change.dispatchStatus, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
1092
+ /* string settings_deleted = 12; */
1093
+ if (message.change.oneofKind === "settingsDeleted")
1094
+ writer.tag(12, WireType.LengthDelimited).string(message.change.settingsDeleted);
1095
+ /* uint64 kv_revision = 13; */
1096
+ if (message.kvRevision !== 0)
1097
+ writer.tag(13, WireType.Varint).uint64(message.kvRevision);
1098
+ /* resources.centrum.units.UnitSpec unit_spec_updated = 14; */
1099
+ if (message.change.oneofKind === "unitSpecUpdated")
1100
+ UnitSpec.internalBinaryWrite(message.change.unitSpecUpdated, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
1101
+ /* resources.centrum.units.UnitAssignments unit_members_updated = 15; */
1102
+ if (message.change.oneofKind === "unitMembersUpdated")
1103
+ UnitAssignments.internalBinaryWrite(message.change.unitMembersUpdated, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
1104
+ /* resources.centrum.dispatches.DispatchSpec dispatch_spec_updated = 16; */
1105
+ if (message.change.oneofKind === "dispatchSpecUpdated")
1106
+ DispatchSpec.internalBinaryWrite(message.change.dispatchSpecUpdated, writer.tag(16, WireType.LengthDelimited).fork(), options).join();
1107
+ /* resources.centrum.dispatches.DispatchAssignments dispatch_assignments_updated = 17; */
1108
+ if (message.change.oneofKind === "dispatchAssignmentsUpdated")
1109
+ DispatchAssignments.internalBinaryWrite(message.change.dispatchAssignmentsUpdated, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
1008
1110
  let u = options.writeUnknownFields;
1009
1111
  if (u !== false)
1010
1112
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -194,6 +194,14 @@ export interface UpdateDispatchStatusRequest {
194
194
  * @generated from protobuf message services.centrum.UpdateDispatchStatusResponse
195
195
  */
196
196
  export interface UpdateDispatchStatusResponse {
197
+ /**
198
+ * @generated from protobuf field: optional resources.centrum.dispatches.DispatchStatus status = 1
199
+ */
200
+ status?: DispatchStatus;
201
+ /**
202
+ * @generated from protobuf field: bool updated = 2
203
+ */
204
+ updated: boolean;
197
205
  }
198
206
  /**
199
207
  * @generated from protobuf message services.centrum.AssignDispatchRequest
@@ -1041,10 +1049,14 @@ export const UpdateDispatchStatusRequest = new UpdateDispatchStatusRequest$Type(
1041
1049
  // @generated message type with reflection information, may provide speed optimized methods
1042
1050
  class UpdateDispatchStatusResponse$Type extends MessageType<UpdateDispatchStatusResponse> {
1043
1051
  constructor() {
1044
- super("services.centrum.UpdateDispatchStatusResponse", []);
1052
+ super("services.centrum.UpdateDispatchStatusResponse", [
1053
+ { no: 1, name: "status", kind: "message", T: () => DispatchStatus },
1054
+ { no: 2, name: "updated", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
1055
+ ]);
1045
1056
  }
1046
1057
  create(value?: PartialMessage<UpdateDispatchStatusResponse>): UpdateDispatchStatusResponse {
1047
1058
  const message = globalThis.Object.create((this.messagePrototype!));
1059
+ message.updated = false;
1048
1060
  if (value !== undefined)
1049
1061
  reflectionMergePartial<UpdateDispatchStatusResponse>(this, message, value);
1050
1062
  return message;
@@ -1054,6 +1066,12 @@ class UpdateDispatchStatusResponse$Type extends MessageType<UpdateDispatchStatus
1054
1066
  while (reader.pos < end) {
1055
1067
  let [fieldNo, wireType] = reader.tag();
1056
1068
  switch (fieldNo) {
1069
+ case /* optional resources.centrum.dispatches.DispatchStatus status */ 1:
1070
+ message.status = DispatchStatus.internalBinaryRead(reader, reader.uint32(), options, message.status);
1071
+ break;
1072
+ case /* bool updated */ 2:
1073
+ message.updated = reader.bool();
1074
+ break;
1057
1075
  default:
1058
1076
  let u = options.readUnknownField;
1059
1077
  if (u === "throw")
@@ -1066,6 +1084,12 @@ class UpdateDispatchStatusResponse$Type extends MessageType<UpdateDispatchStatus
1066
1084
  return message;
1067
1085
  }
1068
1086
  internalBinaryWrite(message: UpdateDispatchStatusResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1087
+ /* optional resources.centrum.dispatches.DispatchStatus status = 1; */
1088
+ if (message.status)
1089
+ DispatchStatus.internalBinaryWrite(message.status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1090
+ /* bool updated = 2; */
1091
+ if (message.updated !== false)
1092
+ writer.tag(2, WireType.Varint).bool(message.updated);
1069
1093
  let u = options.writeUnknownFields;
1070
1094
  if (u !== false)
1071
1095
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -172,6 +172,14 @@ export interface UpdateUnitStatusRequest {
172
172
  * @generated from protobuf message services.centrum.UpdateUnitStatusResponse
173
173
  */
174
174
  export interface UpdateUnitStatusResponse {
175
+ /**
176
+ * @generated from protobuf field: optional resources.centrum.units.UnitStatus status = 1
177
+ */
178
+ status?: UnitStatus;
179
+ /**
180
+ * @generated from protobuf field: bool updated = 2
181
+ */
182
+ updated: boolean;
175
183
  }
176
184
  // @generated message type with reflection information, may provide speed optimized methods
177
185
  class JoinUnitRequest$Type extends MessageType<JoinUnitRequest> {
@@ -934,10 +942,14 @@ export const UpdateUnitStatusRequest = new UpdateUnitStatusRequest$Type();
934
942
  // @generated message type with reflection information, may provide speed optimized methods
935
943
  class UpdateUnitStatusResponse$Type extends MessageType<UpdateUnitStatusResponse> {
936
944
  constructor() {
937
- super("services.centrum.UpdateUnitStatusResponse", []);
945
+ super("services.centrum.UpdateUnitStatusResponse", [
946
+ { no: 1, name: "status", kind: "message", T: () => UnitStatus },
947
+ { no: 2, name: "updated", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
948
+ ]);
938
949
  }
939
950
  create(value?: PartialMessage<UpdateUnitStatusResponse>): UpdateUnitStatusResponse {
940
951
  const message = globalThis.Object.create((this.messagePrototype!));
952
+ message.updated = false;
941
953
  if (value !== undefined)
942
954
  reflectionMergePartial<UpdateUnitStatusResponse>(this, message, value);
943
955
  return message;
@@ -947,6 +959,12 @@ class UpdateUnitStatusResponse$Type extends MessageType<UpdateUnitStatusResponse
947
959
  while (reader.pos < end) {
948
960
  let [fieldNo, wireType] = reader.tag();
949
961
  switch (fieldNo) {
962
+ case /* optional resources.centrum.units.UnitStatus status */ 1:
963
+ message.status = UnitStatus.internalBinaryRead(reader, reader.uint32(), options, message.status);
964
+ break;
965
+ case /* bool updated */ 2:
966
+ message.updated = reader.bool();
967
+ break;
950
968
  default:
951
969
  let u = options.readUnknownField;
952
970
  if (u === "throw")
@@ -959,6 +977,12 @@ class UpdateUnitStatusResponse$Type extends MessageType<UpdateUnitStatusResponse
959
977
  return message;
960
978
  }
961
979
  internalBinaryWrite(message: UpdateUnitStatusResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
980
+ /* optional resources.centrum.units.UnitStatus status = 1; */
981
+ if (message.status)
982
+ UnitStatus.internalBinaryWrite(message.status, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
983
+ /* bool updated = 2; */
984
+ if (message.updated !== false)
985
+ writer.tag(2, WireType.Varint).bool(message.updated);
962
986
  let u = options.writeUnknownFields;
963
987
  if (u !== false)
964
988
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -5,6 +5,10 @@
5
5
  import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
6
6
  import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
7
7
  import { CitizensService } from "./citizens";
8
+ import type { DeleteCitizenFileResponse } from "./citizens";
9
+ import type { DeleteCitizenFileRequest } from "./citizens";
10
+ import type { ListCitizenFilesResponse } from "./citizens";
11
+ import type { ListCitizenFilesRequest } from "./citizens";
8
12
  import type { DeleteMugshotResponse } from "./citizens";
9
13
  import type { DeleteMugshotRequest } from "./citizens";
10
14
  import type { DeleteAvatarResponse } from "./citizens";
@@ -67,6 +71,24 @@ export interface ICitizensServiceClient {
67
71
  * @generated from protobuf rpc: DeleteMugshot
68
72
  */
69
73
  deleteMugshot(input: DeleteMugshotRequest, options?: RpcOptions): UnaryCall<DeleteMugshotRequest, DeleteMugshotResponse>;
74
+ /**
75
+ * @generated from protobuf rpc: ListCitizenFiles
76
+ */
77
+ listCitizenFiles(input: ListCitizenFilesRequest, options?: RpcOptions): UnaryCall<ListCitizenFilesRequest, ListCitizenFilesResponse>;
78
+ /**
79
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
80
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
81
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
82
+ *
83
+ * @generated from protobuf rpc: UploadCitizenFile
84
+ */
85
+ uploadCitizenFile(options?: RpcOptions): ClientStreamingCall<UploadFileRequest, UploadFileResponse>;
86
+ /**
87
+ * Requires DeleteCitizenFile and SetUserProps with the user.files property.
88
+ *
89
+ * @generated from protobuf rpc: DeleteCitizenFile
90
+ */
91
+ deleteCitizenFile(input: DeleteCitizenFileRequest, options?: RpcOptions): UnaryCall<DeleteCitizenFileRequest, DeleteCitizenFileResponse>;
70
92
  }
71
93
  /**
72
94
  * @generated from protobuf service services.citizens.CitizensService
@@ -141,4 +163,31 @@ export class CitizensServiceClient implements ICitizensServiceClient, ServiceInf
141
163
  const method = this.methods[7], opt = this._transport.mergeOptions(options);
142
164
  return stackIntercept<DeleteMugshotRequest, DeleteMugshotResponse>("unary", this._transport, method, opt, input);
143
165
  }
166
+ /**
167
+ * @generated from protobuf rpc: ListCitizenFiles
168
+ */
169
+ listCitizenFiles(input: ListCitizenFilesRequest, options?: RpcOptions): UnaryCall<ListCitizenFilesRequest, ListCitizenFilesResponse> {
170
+ const method = this.methods[8], opt = this._transport.mergeOptions(options);
171
+ return stackIntercept<ListCitizenFilesRequest, ListCitizenFilesResponse>("unary", this._transport, method, opt, input);
172
+ }
173
+ /**
174
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
175
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
176
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
177
+ *
178
+ * @generated from protobuf rpc: UploadCitizenFile
179
+ */
180
+ uploadCitizenFile(options?: RpcOptions): ClientStreamingCall<UploadFileRequest, UploadFileResponse> {
181
+ const method = this.methods[9], opt = this._transport.mergeOptions(options);
182
+ return stackIntercept<UploadFileRequest, UploadFileResponse>("clientStreaming", this._transport, method, opt);
183
+ }
184
+ /**
185
+ * Requires DeleteCitizenFile and SetUserProps with the user.files property.
186
+ *
187
+ * @generated from protobuf rpc: DeleteCitizenFile
188
+ */
189
+ deleteCitizenFile(input: DeleteCitizenFileRequest, options?: RpcOptions): UnaryCall<DeleteCitizenFileRequest, DeleteCitizenFileResponse> {
190
+ const method = this.methods[10], opt = this._transport.mergeOptions(options);
191
+ return stackIntercept<DeleteCitizenFileRequest, DeleteCitizenFileResponse>("unary", this._transport, method, opt, input);
192
+ }
144
193
  }