@fivenet-app/gen 0.9.3 → 0.9.5-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/clients.ts +150 -0
  2. package/google/protobuf/any.ts +10 -6
  3. package/google/protobuf/descriptor.ts +1255 -76
  4. package/google/protobuf/duration.ts +1 -2
  5. package/google/protobuf/timestamp.ts +3 -6
  6. package/package.json +5 -1
  7. package/perms.ts +9 -1
  8. package/resources/accounts/accounts.ts +9 -9
  9. package/resources/accounts/oauth2.ts +17 -17
  10. package/resources/calendar/access.ts +33 -33
  11. package/resources/calendar/calendar.ts +51 -49
  12. package/resources/centrum/access.ts +57 -42
  13. package/resources/centrum/attributes.ts +182 -0
  14. package/resources/centrum/dispatches.ts +73 -71
  15. package/resources/centrum/disponents.ts +81 -0
  16. package/resources/centrum/settings.ts +5 -1
  17. package/resources/centrum/units.ts +49 -49
  18. package/resources/centrum/user_unit.ts +104 -0
  19. package/resources/common/content/content.ts +47 -26
  20. package/resources/common/cron/cron.ts +37 -1
  21. package/resources/common/database/database.ts +37 -19
  22. package/resources/common/error.ts +1 -1
  23. package/resources/common/grpcws/grpcws.ts +59 -33
  24. package/resources/common/i18n.ts +4 -1
  25. package/resources/common/tests/objects.ts +82 -0
  26. package/resources/common/uuid.ts +1 -1
  27. package/resources/documents/access.ts +37 -35
  28. package/resources/documents/activity.ts +19 -17
  29. package/resources/documents/category.ts +9 -9
  30. package/resources/documents/comment.ts +17 -17
  31. package/resources/documents/documents.ts +89 -89
  32. package/resources/documents/requests.ts +17 -17
  33. package/resources/documents/templates.ts +50 -35
  34. package/resources/documents/workflow.ts +3 -1
  35. package/resources/filestore/file.ts +1 -1
  36. package/resources/internet/access.ts +358 -0
  37. package/resources/internet/ads.ts +9 -9
  38. package/resources/internet/domain.ts +216 -24
  39. package/resources/internet/page.ts +215 -23
  40. package/resources/internet/search.ts +42 -18
  41. package/resources/jobs/activity.ts +11 -9
  42. package/resources/jobs/colleagues.ts +1 -1
  43. package/resources/jobs/conduct.ts +9 -9
  44. package/resources/jobs/labels.ts +9 -9
  45. package/resources/jobs/timeclock.ts +7 -3
  46. package/resources/laws/laws.ts +25 -25
  47. package/resources/livemap/livemap.ts +314 -295
  48. package/resources/livemap/tracker.ts +1 -1
  49. package/resources/mailer/access.ts +57 -57
  50. package/resources/mailer/email.ts +9 -9
  51. package/resources/mailer/events.ts +19 -19
  52. package/resources/mailer/message.ts +151 -45
  53. package/resources/mailer/settings.ts +9 -9
  54. package/resources/mailer/template.ts +17 -17
  55. package/resources/mailer/thread.ts +57 -57
  56. package/resources/notifications/events.ts +112 -3
  57. package/resources/notifications/notifications.ts +23 -21
  58. package/resources/permissions/permissions.ts +67 -65
  59. package/resources/qualifications/access.ts +33 -24
  60. package/resources/qualifications/exam.ts +226 -44
  61. package/resources/qualifications/qualifications.ts +99 -71
  62. package/resources/rector/audit.ts +17 -17
  63. package/resources/rector/banner.ts +133 -0
  64. package/resources/rector/config.ts +84 -17
  65. package/resources/stats/stats.ts +1 -1
  66. package/resources/sync/activity.ts +93 -15
  67. package/resources/sync/data.ts +143 -11
  68. package/resources/timestamp/timestamp.ts +1 -1
  69. package/resources/users/activity.ts +995 -37
  70. package/resources/users/job_props.ts +6 -709
  71. package/resources/users/job_settings.ts +765 -0
  72. package/resources/users/jobs.ts +1 -1
  73. package/resources/users/labels.ts +11 -9
  74. package/resources/users/licenses.ts +148 -0
  75. package/resources/users/props.ts +1 -1
  76. package/resources/users/users.ts +2 -137
  77. package/resources/vehicles/vehicles.ts +38 -5
  78. package/resources/wiki/access.ts +34 -38
  79. package/resources/wiki/activity.ts +19 -17
  80. package/resources/wiki/page.ts +29 -29
  81. package/services/auth/auth.client.ts +7 -1
  82. package/services/auth/auth.ts +110 -33
  83. package/services/calendar/calendar.client.ts +1 -1
  84. package/services/calendar/calendar.ts +98 -59
  85. package/services/centrum/centrum.client.ts +1 -1
  86. package/services/centrum/centrum.ts +268 -125
  87. package/services/citizenstore/citizenstore.client.ts +1 -1
  88. package/services/citizenstore/citizenstore.ts +25 -2
  89. package/services/completor/completor.client.ts +1 -1
  90. package/services/completor/completor.ts +15 -2
  91. package/services/dmv/vehicles.client.ts +1 -1
  92. package/services/dmv/vehicles.ts +13 -2
  93. package/services/docstore/docstore.client.ts +1 -1
  94. package/services/docstore/docstore.ts +491 -296
  95. package/services/internet/ads.client.ts +1 -1
  96. package/services/internet/ads.ts +1 -1
  97. package/services/internet/domain.client.ts +109 -0
  98. package/services/internet/domain.ts +658 -0
  99. package/services/internet/internet.client.ts +1 -1
  100. package/services/internet/internet.ts +15 -4
  101. package/services/jobs/conduct.client.ts +1 -1
  102. package/services/jobs/conduct.ts +30 -17
  103. package/services/jobs/jobs.client.ts +1 -1
  104. package/services/jobs/jobs.ts +43 -17
  105. package/services/jobs/timeclock.client.ts +1 -1
  106. package/services/jobs/timeclock.ts +20 -20
  107. package/services/livemapper/livemap.client.ts +1 -1
  108. package/services/livemapper/livemap.ts +137 -35
  109. package/services/mailer/mailer.client.ts +1 -1
  110. package/services/mailer/mailer.ts +216 -164
  111. package/services/notificator/notificator.client.ts +1 -1
  112. package/services/notificator/notificator.ts +30 -17
  113. package/services/qualifications/qualifications.client.ts +3 -3
  114. package/services/qualifications/qualifications.ts +190 -115
  115. package/services/rector/config.client.ts +1 -1
  116. package/services/rector/config.ts +16 -3
  117. package/services/rector/filestore.client.ts +1 -1
  118. package/services/rector/filestore.ts +15 -2
  119. package/services/rector/laws.client.ts +1 -1
  120. package/services/rector/laws.ts +45 -19
  121. package/services/rector/rector.client.ts +1 -1
  122. package/services/rector/rector.ts +135 -70
  123. package/services/stats/stats.client.ts +1 -1
  124. package/services/stats/stats.ts +16 -3
  125. package/services/sync/sync.client.ts +43 -3
  126. package/services/sync/sync.ts +301 -34
  127. package/services/wiki/wiki.client.ts +1 -1
  128. package/services/wiki/wiki.ts +39 -26
  129. package/svcs.ts +17 -1
  130. package/resources/centrum/general.ts +0 -231
  131. package/resources/common/access/dummy.ts +0 -309
  132. package/resources/internet/internet.ts +0 -344
  133. package/resources/mailer/user.ts +0 -93
@@ -1,4 +1,4 @@
1
- // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
1
+ // @generated by protobuf-ts 2.9.6 with parameter optimize_speed,long_type_number,force_server_none
2
2
  // @generated from protobuf file "resources/centrum/settings.proto" (package "resources.centrum", syntax proto3)
3
3
  // @ts-nocheck
4
4
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -40,6 +40,8 @@ export interface Settings {
40
40
  timings?: Timings;
41
41
  }
42
42
  /**
43
+ * @dbscanner: json
44
+ *
43
45
  * @generated from protobuf message resources.centrum.PredefinedStatus
44
46
  */
45
47
  export interface PredefinedStatus {
@@ -57,6 +59,8 @@ export interface PredefinedStatus {
57
59
  dispatchStatus: string[];
58
60
  }
59
61
  /**
62
+ * @dbscanner: json
63
+ *
60
64
  * @generated from protobuf message resources.centrum.Timings
61
65
  */
62
66
  export interface Timings {
@@ -1,4 +1,4 @@
1
- // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
1
+ // @generated by protobuf-ts 2.9.6 with parameter optimize_speed,long_type_number,force_server_none
2
2
  // @generated from protobuf file "resources/centrum/units.proto" (package "resources.centrum", syntax proto3)
3
3
  // @ts-nocheck
4
4
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -12,16 +12,16 @@ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
12
  import { MessageType } from "@protobuf-ts/runtime";
13
13
  import { Colleague } from "../jobs/colleagues";
14
14
  import { UnitAccess } from "./access";
15
- import { Attributes } from "./general";
15
+ import { UnitAttributes } from "./attributes";
16
16
  import { Timestamp } from "../timestamp/timestamp";
17
17
  /**
18
18
  * @generated from protobuf message resources.centrum.Unit
19
19
  */
20
20
  export interface Unit {
21
21
  /**
22
- * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
22
+ * @generated from protobuf field: uint64 id = 1;
23
23
  */
24
- id: string; // @gotags: sql:"primary_key" alias:"id"
24
+ id: number; // @gotags: sql:"primary_key" alias:"id"
25
25
  /**
26
26
  * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
27
27
  */
@@ -67,9 +67,9 @@ export interface Unit {
67
67
  */
68
68
  users: UnitAssignment[];
69
69
  /**
70
- * @generated from protobuf field: optional resources.centrum.Attributes attributes = 12;
70
+ * @generated from protobuf field: optional resources.centrum.UnitAttributes attributes = 12;
71
71
  */
72
- attributes?: Attributes;
72
+ attributes?: UnitAttributes;
73
73
  /**
74
74
  * @generated from protobuf field: optional string home_postal = 13;
75
75
  */
@@ -84,9 +84,9 @@ export interface Unit {
84
84
  */
85
85
  export interface UnitAssignments {
86
86
  /**
87
- * @generated from protobuf field: uint64 unit_id = 1 [jstype = JS_STRING];
87
+ * @generated from protobuf field: uint64 unit_id = 1;
88
88
  */
89
- unitId: string;
89
+ unitId: number;
90
90
  /**
91
91
  * @generated from protobuf field: string job = 2;
92
92
  */
@@ -101,9 +101,9 @@ export interface UnitAssignments {
101
101
  */
102
102
  export interface UnitAssignment {
103
103
  /**
104
- * @generated from protobuf field: uint64 unit_id = 1 [jstype = JS_STRING];
104
+ * @generated from protobuf field: uint64 unit_id = 1;
105
105
  */
106
- unitId: string; // @gotags: sql:"primary_key" alias:"unit_id"
106
+ unitId: number; // @gotags: sql:"primary_key" alias:"unit_id"
107
107
  /**
108
108
  * @generated from protobuf field: int32 user_id = 2;
109
109
  */
@@ -118,17 +118,17 @@ export interface UnitAssignment {
118
118
  */
119
119
  export interface UnitStatus {
120
120
  /**
121
- * @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
121
+ * @generated from protobuf field: uint64 id = 1;
122
122
  */
123
- id: string; // @gotags: sql:"primary_key" alias:"id"
123
+ id: number; // @gotags: sql:"primary_key" alias:"id"
124
124
  /**
125
125
  * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
126
126
  */
127
127
  createdAt?: Timestamp;
128
128
  /**
129
- * @generated from protobuf field: uint64 unit_id = 3 [jstype = JS_STRING];
129
+ * @generated from protobuf field: uint64 unit_id = 3;
130
130
  */
131
- unitId: string;
131
+ unitId: number;
132
132
  /**
133
133
  * @generated from protobuf field: optional resources.centrum.Unit unit = 4;
134
134
  */
@@ -221,7 +221,7 @@ export enum StatusUnit {
221
221
  class Unit$Type extends MessageType<Unit> {
222
222
  constructor() {
223
223
  super("resources.centrum.Unit", [
224
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
224
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
225
225
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
226
226
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
227
227
  { no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
@@ -231,14 +231,14 @@ class Unit$Type extends MessageType<Unit> {
231
231
  { no: 8, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
232
232
  { no: 9, name: "status", kind: "message", T: () => UnitStatus },
233
233
  { no: 11, name: "users", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => UnitAssignment },
234
- { no: 12, name: "attributes", kind: "message", T: () => Attributes },
234
+ { no: 12, name: "attributes", kind: "message", T: () => UnitAttributes },
235
235
  { no: 13, name: "home_postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "48" } } } },
236
236
  { no: 14, name: "access", kind: "message", T: () => UnitAccess }
237
237
  ]);
238
238
  }
239
239
  create(value?: PartialMessage<Unit>): Unit {
240
240
  const message = globalThis.Object.create((this.messagePrototype!));
241
- message.id = "0";
241
+ message.id = 0;
242
242
  message.job = "";
243
243
  message.name = "";
244
244
  message.initials = "";
@@ -253,8 +253,8 @@ class Unit$Type extends MessageType<Unit> {
253
253
  while (reader.pos < end) {
254
254
  let [fieldNo, wireType] = reader.tag();
255
255
  switch (fieldNo) {
256
- case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
257
- message.id = reader.uint64().toString();
256
+ case /* uint64 id */ 1:
257
+ message.id = reader.uint64().toNumber();
258
258
  break;
259
259
  case /* optional resources.timestamp.Timestamp created_at */ 2:
260
260
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
@@ -283,8 +283,8 @@ class Unit$Type extends MessageType<Unit> {
283
283
  case /* repeated resources.centrum.UnitAssignment users */ 11:
284
284
  message.users.push(UnitAssignment.internalBinaryRead(reader, reader.uint32(), options));
285
285
  break;
286
- case /* optional resources.centrum.Attributes attributes */ 12:
287
- message.attributes = Attributes.internalBinaryRead(reader, reader.uint32(), options, message.attributes);
286
+ case /* optional resources.centrum.UnitAttributes attributes */ 12:
287
+ message.attributes = UnitAttributes.internalBinaryRead(reader, reader.uint32(), options, message.attributes);
288
288
  break;
289
289
  case /* optional string home_postal */ 13:
290
290
  message.homePostal = reader.string();
@@ -304,8 +304,8 @@ class Unit$Type extends MessageType<Unit> {
304
304
  return message;
305
305
  }
306
306
  internalBinaryWrite(message: Unit, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
307
- /* uint64 id = 1 [jstype = JS_STRING]; */
308
- if (message.id !== "0")
307
+ /* uint64 id = 1; */
308
+ if (message.id !== 0)
309
309
  writer.tag(1, WireType.Varint).uint64(message.id);
310
310
  /* optional resources.timestamp.Timestamp created_at = 2; */
311
311
  if (message.createdAt)
@@ -334,9 +334,9 @@ class Unit$Type extends MessageType<Unit> {
334
334
  /* repeated resources.centrum.UnitAssignment users = 11; */
335
335
  for (let i = 0; i < message.users.length; i++)
336
336
  UnitAssignment.internalBinaryWrite(message.users[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
337
- /* optional resources.centrum.Attributes attributes = 12; */
337
+ /* optional resources.centrum.UnitAttributes attributes = 12; */
338
338
  if (message.attributes)
339
- Attributes.internalBinaryWrite(message.attributes, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
339
+ UnitAttributes.internalBinaryWrite(message.attributes, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
340
340
  /* optional string home_postal = 13; */
341
341
  if (message.homePostal !== undefined)
342
342
  writer.tag(13, WireType.LengthDelimited).string(message.homePostal);
@@ -357,14 +357,14 @@ export const Unit = new Unit$Type();
357
357
  class UnitAssignments$Type extends MessageType<UnitAssignments> {
358
358
  constructor() {
359
359
  super("resources.centrum.UnitAssignments", [
360
- { no: 1, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
360
+ { no: 1, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
361
361
  { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
362
362
  { no: 3, name: "users", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => UnitAssignment }
363
363
  ]);
364
364
  }
365
365
  create(value?: PartialMessage<UnitAssignments>): UnitAssignments {
366
366
  const message = globalThis.Object.create((this.messagePrototype!));
367
- message.unitId = "0";
367
+ message.unitId = 0;
368
368
  message.job = "";
369
369
  message.users = [];
370
370
  if (value !== undefined)
@@ -376,8 +376,8 @@ class UnitAssignments$Type extends MessageType<UnitAssignments> {
376
376
  while (reader.pos < end) {
377
377
  let [fieldNo, wireType] = reader.tag();
378
378
  switch (fieldNo) {
379
- case /* uint64 unit_id = 1 [jstype = JS_STRING];*/ 1:
380
- message.unitId = reader.uint64().toString();
379
+ case /* uint64 unit_id */ 1:
380
+ message.unitId = reader.uint64().toNumber();
381
381
  break;
382
382
  case /* string job */ 2:
383
383
  message.job = reader.string();
@@ -397,8 +397,8 @@ class UnitAssignments$Type extends MessageType<UnitAssignments> {
397
397
  return message;
398
398
  }
399
399
  internalBinaryWrite(message: UnitAssignments, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
400
- /* uint64 unit_id = 1 [jstype = JS_STRING]; */
401
- if (message.unitId !== "0")
400
+ /* uint64 unit_id = 1; */
401
+ if (message.unitId !== 0)
402
402
  writer.tag(1, WireType.Varint).uint64(message.unitId);
403
403
  /* string job = 2; */
404
404
  if (message.job !== "")
@@ -420,14 +420,14 @@ export const UnitAssignments = new UnitAssignments$Type();
420
420
  class UnitAssignment$Type extends MessageType<UnitAssignment> {
421
421
  constructor() {
422
422
  super("resources.centrum.UnitAssignment", [
423
- { no: 1, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
423
+ { no: 1, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
424
424
  { no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
425
425
  { no: 3, name: "user", kind: "message", T: () => Colleague }
426
426
  ]);
427
427
  }
428
428
  create(value?: PartialMessage<UnitAssignment>): UnitAssignment {
429
429
  const message = globalThis.Object.create((this.messagePrototype!));
430
- message.unitId = "0";
430
+ message.unitId = 0;
431
431
  message.userId = 0;
432
432
  if (value !== undefined)
433
433
  reflectionMergePartial<UnitAssignment>(this, message, value);
@@ -438,8 +438,8 @@ class UnitAssignment$Type extends MessageType<UnitAssignment> {
438
438
  while (reader.pos < end) {
439
439
  let [fieldNo, wireType] = reader.tag();
440
440
  switch (fieldNo) {
441
- case /* uint64 unit_id = 1 [jstype = JS_STRING];*/ 1:
442
- message.unitId = reader.uint64().toString();
441
+ case /* uint64 unit_id */ 1:
442
+ message.unitId = reader.uint64().toNumber();
443
443
  break;
444
444
  case /* int32 user_id */ 2:
445
445
  message.userId = reader.int32();
@@ -459,8 +459,8 @@ class UnitAssignment$Type extends MessageType<UnitAssignment> {
459
459
  return message;
460
460
  }
461
461
  internalBinaryWrite(message: UnitAssignment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
462
- /* uint64 unit_id = 1 [jstype = JS_STRING]; */
463
- if (message.unitId !== "0")
462
+ /* uint64 unit_id = 1; */
463
+ if (message.unitId !== 0)
464
464
  writer.tag(1, WireType.Varint).uint64(message.unitId);
465
465
  /* int32 user_id = 2; */
466
466
  if (message.userId !== 0)
@@ -482,9 +482,9 @@ export const UnitAssignment = new UnitAssignment$Type();
482
482
  class UnitStatus$Type extends MessageType<UnitStatus> {
483
483
  constructor() {
484
484
  super("resources.centrum.UnitStatus", [
485
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
485
+ { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
486
486
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
487
- { no: 3, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
487
+ { no: 3, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
488
488
  { no: 4, name: "unit", kind: "message", T: () => Unit },
489
489
  { no: 5, name: "status", kind: "enum", T: () => ["resources.centrum.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
490
490
  { no: 6, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
@@ -500,8 +500,8 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
500
500
  }
501
501
  create(value?: PartialMessage<UnitStatus>): UnitStatus {
502
502
  const message = globalThis.Object.create((this.messagePrototype!));
503
- message.id = "0";
504
- message.unitId = "0";
503
+ message.id = 0;
504
+ message.unitId = 0;
505
505
  message.status = 0;
506
506
  if (value !== undefined)
507
507
  reflectionMergePartial<UnitStatus>(this, message, value);
@@ -512,14 +512,14 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
512
512
  while (reader.pos < end) {
513
513
  let [fieldNo, wireType] = reader.tag();
514
514
  switch (fieldNo) {
515
- case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
516
- message.id = reader.uint64().toString();
515
+ case /* uint64 id */ 1:
516
+ message.id = reader.uint64().toNumber();
517
517
  break;
518
518
  case /* optional resources.timestamp.Timestamp created_at */ 2:
519
519
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
520
520
  break;
521
- case /* uint64 unit_id = 3 [jstype = JS_STRING];*/ 3:
522
- message.unitId = reader.uint64().toString();
521
+ case /* uint64 unit_id */ 3:
522
+ message.unitId = reader.uint64().toNumber();
523
523
  break;
524
524
  case /* optional resources.centrum.Unit unit */ 4:
525
525
  message.unit = Unit.internalBinaryRead(reader, reader.uint32(), options, message.unit);
@@ -566,14 +566,14 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
566
566
  return message;
567
567
  }
568
568
  internalBinaryWrite(message: UnitStatus, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
569
- /* uint64 id = 1 [jstype = JS_STRING]; */
570
- if (message.id !== "0")
569
+ /* uint64 id = 1; */
570
+ if (message.id !== 0)
571
571
  writer.tag(1, WireType.Varint).uint64(message.id);
572
572
  /* optional resources.timestamp.Timestamp created_at = 2; */
573
573
  if (message.createdAt)
574
574
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
575
- /* uint64 unit_id = 3 [jstype = JS_STRING]; */
576
- if (message.unitId !== "0")
575
+ /* uint64 unit_id = 3; */
576
+ if (message.unitId !== 0)
577
577
  writer.tag(3, WireType.Varint).uint64(message.unitId);
578
578
  /* optional resources.centrum.Unit unit = 4; */
579
579
  if (message.unit)
@@ -0,0 +1,104 @@
1
+ // @generated by protobuf-ts 2.9.6 with parameter optimize_speed,long_type_number,force_server_none
2
+ // @generated from protobuf file "resources/centrum/user_unit.proto" (package "resources.centrum", syntax proto3)
3
+ // @ts-nocheck
4
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
+ import { WireType } from "@protobuf-ts/runtime";
7
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
9
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
+ import type { PartialMessage } from "@protobuf-ts/runtime";
11
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
+ import { MessageType } from "@protobuf-ts/runtime";
13
+ import { Timestamp } from "../timestamp/timestamp";
14
+ /**
15
+ * @generated from protobuf message resources.centrum.UserUnitMapping
16
+ */
17
+ export interface UserUnitMapping {
18
+ /**
19
+ * @generated from protobuf field: uint64 unit_id = 1;
20
+ */
21
+ unitId: number;
22
+ /**
23
+ * @generated from protobuf field: string job = 2;
24
+ */
25
+ job: string;
26
+ /**
27
+ * @generated from protobuf field: int32 user_id = 3;
28
+ */
29
+ userId: number;
30
+ /**
31
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 4;
32
+ */
33
+ createdAt?: Timestamp;
34
+ }
35
+ // @generated message type with reflection information, may provide speed optimized methods
36
+ class UserUnitMapping$Type extends MessageType<UserUnitMapping> {
37
+ constructor() {
38
+ super("resources.centrum.UserUnitMapping", [
39
+ { no: 1, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
40
+ { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
41
+ { no: 3, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
42
+ { no: 4, name: "created_at", kind: "message", T: () => Timestamp }
43
+ ]);
44
+ }
45
+ create(value?: PartialMessage<UserUnitMapping>): UserUnitMapping {
46
+ const message = globalThis.Object.create((this.messagePrototype!));
47
+ message.unitId = 0;
48
+ message.job = "";
49
+ message.userId = 0;
50
+ if (value !== undefined)
51
+ reflectionMergePartial<UserUnitMapping>(this, message, value);
52
+ return message;
53
+ }
54
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserUnitMapping): UserUnitMapping {
55
+ let message = target ?? this.create(), end = reader.pos + length;
56
+ while (reader.pos < end) {
57
+ let [fieldNo, wireType] = reader.tag();
58
+ switch (fieldNo) {
59
+ case /* uint64 unit_id */ 1:
60
+ message.unitId = reader.uint64().toNumber();
61
+ break;
62
+ case /* string job */ 2:
63
+ message.job = reader.string();
64
+ break;
65
+ case /* int32 user_id */ 3:
66
+ message.userId = reader.int32();
67
+ break;
68
+ case /* resources.timestamp.Timestamp created_at */ 4:
69
+ message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
70
+ break;
71
+ default:
72
+ let u = options.readUnknownField;
73
+ if (u === "throw")
74
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
75
+ let d = reader.skip(wireType);
76
+ if (u !== false)
77
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
78
+ }
79
+ }
80
+ return message;
81
+ }
82
+ internalBinaryWrite(message: UserUnitMapping, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
83
+ /* uint64 unit_id = 1; */
84
+ if (message.unitId !== 0)
85
+ writer.tag(1, WireType.Varint).uint64(message.unitId);
86
+ /* string job = 2; */
87
+ if (message.job !== "")
88
+ writer.tag(2, WireType.LengthDelimited).string(message.job);
89
+ /* int32 user_id = 3; */
90
+ if (message.userId !== 0)
91
+ writer.tag(3, WireType.Varint).int32(message.userId);
92
+ /* resources.timestamp.Timestamp created_at = 4; */
93
+ if (message.createdAt)
94
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
95
+ let u = options.writeUnknownFields;
96
+ if (u !== false)
97
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
98
+ return writer;
99
+ }
100
+ }
101
+ /**
102
+ * @generated MessageType for protobuf message resources.centrum.UserUnitMapping
103
+ */
104
+ export const UserUnitMapping = new UserUnitMapping$Type();
@@ -1,4 +1,4 @@
1
- // @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
1
+ // @generated by protobuf-ts 2.9.6 with parameter optimize_speed,long_type_number,force_server_none
2
2
  // @generated from protobuf file "resources/common/content/content.proto" (package "resources.common.content", syntax proto3)
3
3
  // @ts-nocheck
4
4
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -34,17 +34,15 @@ export interface Content {
34
34
  */
35
35
  export interface JSONNode {
36
36
  /**
37
- * @sanitize: method=StripTags
38
- *
39
- * @generated from protobuf field: string type = 1;
37
+ * @generated from protobuf field: resources.common.content.NodeType type = 1;
40
38
  */
41
- type: string;
39
+ type: NodeType;
42
40
  /**
43
41
  * @sanitize: method=StripTags
44
42
  *
45
- * @generated from protobuf field: string id = 2;
43
+ * @generated from protobuf field: optional string id = 2;
46
44
  */
47
- id: string;
45
+ id?: string;
48
46
  /**
49
47
  * @sanitize: method=StripTags
50
48
  *
@@ -62,9 +60,9 @@ export interface JSONNode {
62
60
  /**
63
61
  * @sanitize: method=StripTags
64
62
  *
65
- * @generated from protobuf field: string text = 5;
63
+ * @generated from protobuf field: optional string text = 5;
66
64
  */
67
- text: string;
65
+ text?: string;
68
66
  /**
69
67
  * @generated from protobuf field: repeated resources.common.content.JSONNode content = 6;
70
68
  */
@@ -87,6 +85,31 @@ export enum ContentType {
87
85
  */
88
86
  PLAIN = 2
89
87
  }
88
+ /**
89
+ * @generated from protobuf enum resources.common.content.NodeType
90
+ */
91
+ export enum NodeType {
92
+ /**
93
+ * @generated from protobuf enum value: NODE_TYPE_UNSPECIFIED = 0;
94
+ */
95
+ UNSPECIFIED = 0,
96
+ /**
97
+ * @generated from protobuf enum value: NODE_TYPE_DOC = 1;
98
+ */
99
+ DOC = 1,
100
+ /**
101
+ * @generated from protobuf enum value: NODE_TYPE_ELEMENT = 2;
102
+ */
103
+ ELEMENT = 2,
104
+ /**
105
+ * @generated from protobuf enum value: NODE_TYPE_TEXT = 3;
106
+ */
107
+ TEXT = 3,
108
+ /**
109
+ * @generated from protobuf enum value: NODE_TYPE_COMMENT = 4;
110
+ */
111
+ COMMENT = 4
112
+ }
90
113
  // @generated message type with reflection information, may provide speed optimized methods
91
114
  class Content$Type extends MessageType<Content> {
92
115
  constructor() {
@@ -151,21 +174,19 @@ export const Content = new Content$Type();
151
174
  class JSONNode$Type extends MessageType<JSONNode> {
152
175
  constructor() {
153
176
  super("resources.common.content.JSONNode", [
154
- { no: 1, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
155
- { no: 2, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
177
+ { no: 1, name: "type", kind: "enum", T: () => ["resources.common.content.NodeType", NodeType, "NODE_TYPE_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
178
+ { no: 2, name: "id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
156
179
  { no: 3, name: "tag", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
157
180
  { no: 4, name: "attrs", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } },
158
- { no: 5, name: "text", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
181
+ { no: 5, name: "text", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
159
182
  { no: 6, name: "content", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => JSONNode }
160
183
  ]);
161
184
  }
162
185
  create(value?: PartialMessage<JSONNode>): JSONNode {
163
186
  const message = globalThis.Object.create((this.messagePrototype!));
164
- message.type = "";
165
- message.id = "";
187
+ message.type = 0;
166
188
  message.tag = "";
167
189
  message.attrs = {};
168
- message.text = "";
169
190
  message.content = [];
170
191
  if (value !== undefined)
171
192
  reflectionMergePartial<JSONNode>(this, message, value);
@@ -176,10 +197,10 @@ class JSONNode$Type extends MessageType<JSONNode> {
176
197
  while (reader.pos < end) {
177
198
  let [fieldNo, wireType] = reader.tag();
178
199
  switch (fieldNo) {
179
- case /* string type */ 1:
180
- message.type = reader.string();
200
+ case /* resources.common.content.NodeType type */ 1:
201
+ message.type = reader.int32();
181
202
  break;
182
- case /* string id */ 2:
203
+ case /* optional string id */ 2:
183
204
  message.id = reader.string();
184
205
  break;
185
206
  case /* string tag */ 3:
@@ -188,7 +209,7 @@ class JSONNode$Type extends MessageType<JSONNode> {
188
209
  case /* map<string, string> attrs */ 4:
189
210
  this.binaryReadMap4(message.attrs, reader, options);
190
211
  break;
191
- case /* string text */ 5:
212
+ case /* optional string text */ 5:
192
213
  message.text = reader.string();
193
214
  break;
194
215
  case /* repeated resources.common.content.JSONNode content */ 6:
@@ -222,11 +243,11 @@ class JSONNode$Type extends MessageType<JSONNode> {
222
243
  map[key ?? ""] = val ?? "";
223
244
  }
224
245
  internalBinaryWrite(message: JSONNode, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
225
- /* string type = 1; */
226
- if (message.type !== "")
227
- writer.tag(1, WireType.LengthDelimited).string(message.type);
228
- /* string id = 2; */
229
- if (message.id !== "")
246
+ /* resources.common.content.NodeType type = 1; */
247
+ if (message.type !== 0)
248
+ writer.tag(1, WireType.Varint).int32(message.type);
249
+ /* optional string id = 2; */
250
+ if (message.id !== undefined)
230
251
  writer.tag(2, WireType.LengthDelimited).string(message.id);
231
252
  /* string tag = 3; */
232
253
  if (message.tag !== "")
@@ -234,8 +255,8 @@ class JSONNode$Type extends MessageType<JSONNode> {
234
255
  /* map<string, string> attrs = 4; */
235
256
  for (let k of globalThis.Object.keys(message.attrs))
236
257
  writer.tag(4, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.attrs[k]).join();
237
- /* string text = 5; */
238
- if (message.text !== "")
258
+ /* optional string text = 5; */
259
+ if (message.text !== undefined)
239
260
  writer.tag(5, WireType.LengthDelimited).string(message.text);
240
261
  /* repeated resources.common.content.JSONNode content = 6; */
241
262
  for (let i = 0; i < message.content.length; i++)