@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 "resources/documents/activity.proto" (package "resources.documents", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
6
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
@@ -20,49 +21,47 @@ import { Timestamp } from "../timestamp/timestamp";
20
21
  */
21
22
  export interface DocActivity {
22
23
  /**
23
- * @generated from protobuf field: uint64 id = 1;
24
+ * @generated from protobuf field: int64 id = 1
24
25
  */
25
26
  id: number;
26
27
  /**
27
- * @generated from protobuf field: resources.timestamp.Timestamp created_at = 2;
28
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
28
29
  */
29
30
  createdAt?: Timestamp;
30
31
  /**
31
- * @generated from protobuf field: uint64 document_id = 3;
32
+ * @generated from protobuf field: int64 document_id = 3
32
33
  */
33
34
  documentId: number;
34
35
  /**
35
- * @generated from protobuf field: resources.documents.DocActivityType activity_type = 4;
36
+ * @generated from protobuf field: resources.documents.DocActivityType activity_type = 4
36
37
  */
37
38
  activityType: DocActivityType;
38
39
  /**
39
- * @generated from protobuf field: optional int32 creator_id = 5;
40
+ * @generated from protobuf field: optional int32 creator_id = 5
40
41
  */
41
42
  creatorId?: number;
42
43
  /**
43
- * @generated from protobuf field: optional resources.users.UserShort creator = 6;
44
+ * @generated from protobuf field: optional resources.users.UserShort creator = 6
44
45
  */
45
- creator?: UserShort; // @gotags: alias:"creator"
46
+ creator?: UserShort;
46
47
  /**
47
- * @generated from protobuf field: string creator_job = 7;
48
+ * @generated from protobuf field: string creator_job = 7
48
49
  */
49
50
  creatorJob: string;
50
51
  /**
51
- * @generated from protobuf field: optional string creator_job_label = 8;
52
+ * @generated from protobuf field: optional string creator_job_label = 8
52
53
  */
53
54
  creatorJobLabel?: string;
54
55
  /**
55
- * @generated from protobuf field: optional string reason = 9;
56
+ * @generated from protobuf field: optional string reason = 9
56
57
  */
57
58
  reason?: string;
58
59
  /**
59
- * @generated from protobuf field: resources.documents.DocActivityData data = 10;
60
+ * @generated from protobuf field: resources.documents.DocActivityData data = 10
60
61
  */
61
62
  data?: DocActivityData;
62
63
  }
63
64
  /**
64
- * @dbscanner: json
65
- *
66
65
  * @generated from protobuf message resources.documents.DocActivityData
67
66
  */
68
67
  export interface DocActivityData {
@@ -72,27 +71,33 @@ export interface DocActivityData {
72
71
  data: {
73
72
  oneofKind: "updated";
74
73
  /**
75
- * @generated from protobuf field: resources.documents.DocUpdated updated = 1;
74
+ * @generated from protobuf field: resources.documents.DocUpdated updated = 1
76
75
  */
77
76
  updated: DocUpdated;
78
77
  } | {
79
78
  oneofKind: "ownerChanged";
80
79
  /**
81
- * @generated from protobuf field: resources.documents.DocOwnerChanged owner_changed = 2;
80
+ * @generated from protobuf field: resources.documents.DocOwnerChanged owner_changed = 2
82
81
  */
83
82
  ownerChanged: DocOwnerChanged;
84
83
  } | {
85
84
  oneofKind: "accessUpdated";
86
85
  /**
87
- * @generated from protobuf field: resources.documents.DocAccessUpdated access_updated = 4;
86
+ * @generated from protobuf field: resources.documents.DocAccessUpdated access_updated = 4
88
87
  */
89
88
  accessUpdated: DocAccessUpdated;
90
89
  } | {
91
90
  oneofKind: "accessRequested";
92
91
  /**
93
- * @generated from protobuf field: resources.documents.DocAccessRequested access_requested = 5;
92
+ * @generated from protobuf field: resources.documents.DocAccessRequested access_requested = 5
94
93
  */
95
94
  accessRequested: DocAccessRequested;
95
+ } | {
96
+ oneofKind: "signOffRequested";
97
+ /**
98
+ * @generated from protobuf field: resources.documents.DocSignOffRequested sign_off_requested = 6
99
+ */
100
+ signOffRequested: DocSignOffRequested;
96
101
  } | {
97
102
  oneofKind: undefined;
98
103
  };
@@ -102,28 +107,45 @@ export interface DocActivityData {
102
107
  */
103
108
  export interface DocUpdated {
104
109
  /**
105
- * @generated from protobuf field: optional string title_diff = 1;
110
+ * @generated from protobuf field: optional string title_diff = 1
106
111
  */
107
112
  titleDiff?: string;
108
113
  /**
109
- * @generated from protobuf field: optional string content_diff = 2;
114
+ * @generated from protobuf field: optional string content_diff = 2
110
115
  */
111
116
  contentDiff?: string;
112
117
  /**
113
- * @generated from protobuf field: optional string state_diff = 3;
118
+ * @generated from protobuf field: optional string state_diff = 3
114
119
  */
115
120
  stateDiff?: string;
121
+ /**
122
+ * @generated from protobuf field: optional resources.documents.DocFilesChange files_change = 4
123
+ */
124
+ filesChange?: DocFilesChange;
125
+ }
126
+ /**
127
+ * @generated from protobuf message resources.documents.DocFilesChange
128
+ */
129
+ export interface DocFilesChange {
130
+ /**
131
+ * @generated from protobuf field: int64 added = 1
132
+ */
133
+ added: number;
134
+ /**
135
+ * @generated from protobuf field: int64 deleted = 2
136
+ */
137
+ deleted: number;
116
138
  }
117
139
  /**
118
140
  * @generated from protobuf message resources.documents.DocOwnerChanged
119
141
  */
120
142
  export interface DocOwnerChanged {
121
143
  /**
122
- * @generated from protobuf field: int32 new_owner_id = 1;
144
+ * @generated from protobuf field: int32 new_owner_id = 1
123
145
  */
124
146
  newOwnerId: number;
125
147
  /**
126
- * @generated from protobuf field: resources.users.UserShort new_owner = 2;
148
+ * @generated from protobuf field: resources.users.UserShort new_owner = 2
127
149
  */
128
150
  newOwner?: UserShort;
129
151
  }
@@ -132,7 +154,7 @@ export interface DocOwnerChanged {
132
154
  */
133
155
  export interface DocAccessRequested {
134
156
  /**
135
- * @generated from protobuf field: resources.documents.AccessLevel level = 1;
157
+ * @generated from protobuf field: resources.documents.AccessLevel level = 1
136
158
  */
137
159
  level: AccessLevel;
138
160
  }
@@ -141,11 +163,11 @@ export interface DocAccessRequested {
141
163
  */
142
164
  export interface DocAccessUpdated {
143
165
  /**
144
- * @generated from protobuf field: resources.documents.DocAccessJobsDiff jobs = 1;
166
+ * @generated from protobuf field: resources.documents.DocAccessJobsDiff jobs = 1
145
167
  */
146
168
  jobs?: DocAccessJobsDiff;
147
169
  /**
148
- * @generated from protobuf field: resources.documents.DocAccessUsersDiff users = 2;
170
+ * @generated from protobuf field: resources.documents.DocAccessUsersDiff users = 2
149
171
  */
150
172
  users?: DocAccessUsersDiff;
151
173
  }
@@ -154,15 +176,15 @@ export interface DocAccessUpdated {
154
176
  */
155
177
  export interface DocAccessJobsDiff {
156
178
  /**
157
- * @generated from protobuf field: repeated resources.documents.DocumentJobAccess to_create = 1;
179
+ * @generated from protobuf field: repeated resources.documents.DocumentJobAccess to_create = 1
158
180
  */
159
181
  toCreate: DocumentJobAccess[];
160
182
  /**
161
- * @generated from protobuf field: repeated resources.documents.DocumentJobAccess to_update = 2;
183
+ * @generated from protobuf field: repeated resources.documents.DocumentJobAccess to_update = 2
162
184
  */
163
185
  toUpdate: DocumentJobAccess[];
164
186
  /**
165
- * @generated from protobuf field: repeated resources.documents.DocumentJobAccess to_delete = 3;
187
+ * @generated from protobuf field: repeated resources.documents.DocumentJobAccess to_delete = 3
166
188
  */
167
189
  toDelete: DocumentJobAccess[];
168
190
  }
@@ -171,18 +193,31 @@ export interface DocAccessJobsDiff {
171
193
  */
172
194
  export interface DocAccessUsersDiff {
173
195
  /**
174
- * @generated from protobuf field: repeated resources.documents.DocumentUserAccess to_create = 1;
196
+ * @generated from protobuf field: repeated resources.documents.DocumentUserAccess to_create = 1
175
197
  */
176
198
  toCreate: DocumentUserAccess[];
177
199
  /**
178
- * @generated from protobuf field: repeated resources.documents.DocumentUserAccess to_update = 2;
200
+ * @generated from protobuf field: repeated resources.documents.DocumentUserAccess to_update = 2
179
201
  */
180
202
  toUpdate: DocumentUserAccess[];
181
203
  /**
182
- * @generated from protobuf field: repeated resources.documents.DocumentUserAccess to_delete = 3;
204
+ * @generated from protobuf field: repeated resources.documents.DocumentUserAccess to_delete = 3
183
205
  */
184
206
  toDelete: DocumentUserAccess[];
185
207
  }
208
+ /**
209
+ * @generated from protobuf message resources.documents.DocSignOffRequested
210
+ */
211
+ export interface DocSignOffRequested {
212
+ /**
213
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deadline = 1
214
+ */
215
+ deadline?: Timestamp;
216
+ /**
217
+ * @generated from protobuf field: repeated resources.users.UserShort approvers = 2
218
+ */
219
+ approvers: UserShort[];
220
+ }
186
221
  /**
187
222
  * @generated from protobuf enum resources.documents.DocActivityType
188
223
  */
@@ -229,6 +264,18 @@ export enum DocActivityType {
229
264
  * @generated from protobuf enum value: DOC_ACTIVITY_TYPE_DELETED = 9;
230
265
  */
231
266
  DELETED = 9,
267
+ /**
268
+ * @generated from protobuf enum value: DOC_ACTIVITY_TYPE_DRAFT_TOGGLED = 19;
269
+ */
270
+ DRAFT_TOGGLED = 19,
271
+ /**
272
+ * @generated from protobuf enum value: DOC_ACTIVITY_TYPE_SIGN_OFF_APPROVED = 21;
273
+ */
274
+ SIGN_OFF_APPROVED = 21,
275
+ /**
276
+ * @generated from protobuf enum value: DOC_ACTIVITY_TYPE_SIGN_OFF_REJECTED = 22;
277
+ */
278
+ SIGN_OFF_REJECTED = 22,
232
279
  /**
233
280
  * Comments
234
281
  *
@@ -268,21 +315,25 @@ export enum DocActivityType {
268
315
  /**
269
316
  * @generated from protobuf enum value: DOC_ACTIVITY_TYPE_REQUESTED_DELETION = 18;
270
317
  */
271
- REQUESTED_DELETION = 18
318
+ REQUESTED_DELETION = 18,
319
+ /**
320
+ * @generated from protobuf enum value: DOC_ACTIVITY_TYPE_REQUESTED_SIGN_OFF = 20;
321
+ */
322
+ REQUESTED_SIGN_OFF = 20
272
323
  }
273
324
  // @generated message type with reflection information, may provide speed optimized methods
274
325
  class DocActivity$Type extends MessageType<DocActivity> {
275
326
  constructor() {
276
327
  super("resources.documents.DocActivity", [
277
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
328
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
278
329
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
279
- { no: 3, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
330
+ { no: 3, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
280
331
  { no: 4, name: "activity_type", kind: "enum", T: () => ["resources.documents.DocActivityType", DocActivityType, "DOC_ACTIVITY_TYPE_"] },
281
- { no: 5, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
282
- { no: 6, name: "creator", kind: "message", T: () => UserShort },
283
- { no: 7, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
284
- { no: 8, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
285
- { no: 9, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
332
+ { no: 5, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
333
+ { no: 6, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
334
+ { no: 7, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
335
+ { no: 8, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
336
+ { no: 9, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
286
337
  { no: 10, name: "data", kind: "message", T: () => DocActivityData }
287
338
  ]);
288
339
  }
@@ -301,14 +352,14 @@ class DocActivity$Type extends MessageType<DocActivity> {
301
352
  while (reader.pos < end) {
302
353
  let [fieldNo, wireType] = reader.tag();
303
354
  switch (fieldNo) {
304
- case /* uint64 id */ 1:
305
- message.id = reader.uint64().toNumber();
355
+ case /* int64 id */ 1:
356
+ message.id = reader.int64().toNumber();
306
357
  break;
307
358
  case /* resources.timestamp.Timestamp created_at */ 2:
308
359
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
309
360
  break;
310
- case /* uint64 document_id */ 3:
311
- message.documentId = reader.uint64().toNumber();
361
+ case /* int64 document_id */ 3:
362
+ message.documentId = reader.int64().toNumber();
312
363
  break;
313
364
  case /* resources.documents.DocActivityType activity_type */ 4:
314
365
  message.activityType = reader.int32();
@@ -343,15 +394,15 @@ class DocActivity$Type extends MessageType<DocActivity> {
343
394
  return message;
344
395
  }
345
396
  internalBinaryWrite(message: DocActivity, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
346
- /* uint64 id = 1; */
397
+ /* int64 id = 1; */
347
398
  if (message.id !== 0)
348
- writer.tag(1, WireType.Varint).uint64(message.id);
399
+ writer.tag(1, WireType.Varint).int64(message.id);
349
400
  /* resources.timestamp.Timestamp created_at = 2; */
350
401
  if (message.createdAt)
351
402
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
352
- /* uint64 document_id = 3; */
403
+ /* int64 document_id = 3; */
353
404
  if (message.documentId !== 0)
354
- writer.tag(3, WireType.Varint).uint64(message.documentId);
405
+ writer.tag(3, WireType.Varint).int64(message.documentId);
355
406
  /* resources.documents.DocActivityType activity_type = 4; */
356
407
  if (message.activityType !== 0)
357
408
  writer.tag(4, WireType.Varint).int32(message.activityType);
@@ -390,8 +441,9 @@ class DocActivityData$Type extends MessageType<DocActivityData> {
390
441
  { no: 1, name: "updated", kind: "message", oneof: "data", T: () => DocUpdated },
391
442
  { no: 2, name: "owner_changed", kind: "message", oneof: "data", T: () => DocOwnerChanged },
392
443
  { no: 4, name: "access_updated", kind: "message", oneof: "data", T: () => DocAccessUpdated },
393
- { no: 5, name: "access_requested", kind: "message", oneof: "data", T: () => DocAccessRequested }
394
- ]);
444
+ { no: 5, name: "access_requested", kind: "message", oneof: "data", T: () => DocAccessRequested },
445
+ { no: 6, name: "sign_off_requested", kind: "message", oneof: "data", T: () => DocSignOffRequested }
446
+ ], { "codegen.dbscanner.dbscanner": { enabled: true } });
395
447
  }
396
448
  create(value?: PartialMessage<DocActivityData>): DocActivityData {
397
449
  const message = globalThis.Object.create((this.messagePrototype!));
@@ -429,6 +481,12 @@ class DocActivityData$Type extends MessageType<DocActivityData> {
429
481
  accessRequested: DocAccessRequested.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).accessRequested)
430
482
  };
431
483
  break;
484
+ case /* resources.documents.DocSignOffRequested sign_off_requested */ 6:
485
+ message.data = {
486
+ oneofKind: "signOffRequested",
487
+ signOffRequested: DocSignOffRequested.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).signOffRequested)
488
+ };
489
+ break;
432
490
  default:
433
491
  let u = options.readUnknownField;
434
492
  if (u === "throw")
@@ -453,6 +511,9 @@ class DocActivityData$Type extends MessageType<DocActivityData> {
453
511
  /* resources.documents.DocAccessRequested access_requested = 5; */
454
512
  if (message.data.oneofKind === "accessRequested")
455
513
  DocAccessRequested.internalBinaryWrite(message.data.accessRequested, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
514
+ /* resources.documents.DocSignOffRequested sign_off_requested = 6; */
515
+ if (message.data.oneofKind === "signOffRequested")
516
+ DocSignOffRequested.internalBinaryWrite(message.data.signOffRequested, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
456
517
  let u = options.writeUnknownFields;
457
518
  if (u !== false)
458
519
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -469,7 +530,8 @@ class DocUpdated$Type extends MessageType<DocUpdated> {
469
530
  super("resources.documents.DocUpdated", [
470
531
  { no: 1, name: "title_diff", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
471
532
  { no: 2, name: "content_diff", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
472
- { no: 3, name: "state_diff", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
533
+ { no: 3, name: "state_diff", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
534
+ { no: 4, name: "files_change", kind: "message", T: () => DocFilesChange }
473
535
  ]);
474
536
  }
475
537
  create(value?: PartialMessage<DocUpdated>): DocUpdated {
@@ -492,6 +554,9 @@ class DocUpdated$Type extends MessageType<DocUpdated> {
492
554
  case /* optional string state_diff */ 3:
493
555
  message.stateDiff = reader.string();
494
556
  break;
557
+ case /* optional resources.documents.DocFilesChange files_change */ 4:
558
+ message.filesChange = DocFilesChange.internalBinaryRead(reader, reader.uint32(), options, message.filesChange);
559
+ break;
495
560
  default:
496
561
  let u = options.readUnknownField;
497
562
  if (u === "throw")
@@ -513,6 +578,9 @@ class DocUpdated$Type extends MessageType<DocUpdated> {
513
578
  /* optional string state_diff = 3; */
514
579
  if (message.stateDiff !== undefined)
515
580
  writer.tag(3, WireType.LengthDelimited).string(message.stateDiff);
581
+ /* optional resources.documents.DocFilesChange files_change = 4; */
582
+ if (message.filesChange)
583
+ DocFilesChange.internalBinaryWrite(message.filesChange, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
516
584
  let u = options.writeUnknownFields;
517
585
  if (u !== false)
518
586
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -524,6 +592,61 @@ class DocUpdated$Type extends MessageType<DocUpdated> {
524
592
  */
525
593
  export const DocUpdated = new DocUpdated$Type();
526
594
  // @generated message type with reflection information, may provide speed optimized methods
595
+ class DocFilesChange$Type extends MessageType<DocFilesChange> {
596
+ constructor() {
597
+ super("resources.documents.DocFilesChange", [
598
+ { no: 1, name: "added", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
599
+ { no: 2, name: "deleted", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
600
+ ]);
601
+ }
602
+ create(value?: PartialMessage<DocFilesChange>): DocFilesChange {
603
+ const message = globalThis.Object.create((this.messagePrototype!));
604
+ message.added = 0;
605
+ message.deleted = 0;
606
+ if (value !== undefined)
607
+ reflectionMergePartial<DocFilesChange>(this, message, value);
608
+ return message;
609
+ }
610
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocFilesChange): DocFilesChange {
611
+ let message = target ?? this.create(), end = reader.pos + length;
612
+ while (reader.pos < end) {
613
+ let [fieldNo, wireType] = reader.tag();
614
+ switch (fieldNo) {
615
+ case /* int64 added */ 1:
616
+ message.added = reader.int64().toNumber();
617
+ break;
618
+ case /* int64 deleted */ 2:
619
+ message.deleted = reader.int64().toNumber();
620
+ break;
621
+ default:
622
+ let u = options.readUnknownField;
623
+ if (u === "throw")
624
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
625
+ let d = reader.skip(wireType);
626
+ if (u !== false)
627
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
628
+ }
629
+ }
630
+ return message;
631
+ }
632
+ internalBinaryWrite(message: DocFilesChange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
633
+ /* int64 added = 1; */
634
+ if (message.added !== 0)
635
+ writer.tag(1, WireType.Varint).int64(message.added);
636
+ /* int64 deleted = 2; */
637
+ if (message.deleted !== 0)
638
+ writer.tag(2, WireType.Varint).int64(message.deleted);
639
+ let u = options.writeUnknownFields;
640
+ if (u !== false)
641
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
642
+ return writer;
643
+ }
644
+ }
645
+ /**
646
+ * @generated MessageType for protobuf message resources.documents.DocFilesChange
647
+ */
648
+ export const DocFilesChange = new DocFilesChange$Type();
649
+ // @generated message type with reflection information, may provide speed optimized methods
527
650
  class DocOwnerChanged$Type extends MessageType<DocOwnerChanged> {
528
651
  constructor() {
529
652
  super("resources.documents.DocOwnerChanged", [
@@ -581,7 +704,7 @@ export const DocOwnerChanged = new DocOwnerChanged$Type();
581
704
  class DocAccessRequested$Type extends MessageType<DocAccessRequested> {
582
705
  constructor() {
583
706
  super("resources.documents.DocAccessRequested", [
584
- { no: 1, name: "level", kind: "enum", T: () => ["resources.documents.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "validate.rules": { enum: { definedOnly: true } } } }
707
+ { no: 1, name: "level", kind: "enum", T: () => ["resources.documents.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
585
708
  ]);
586
709
  }
587
710
  create(value?: PartialMessage<DocAccessRequested>): DocAccessRequested {
@@ -681,9 +804,9 @@ export const DocAccessUpdated = new DocAccessUpdated$Type();
681
804
  class DocAccessJobsDiff$Type extends MessageType<DocAccessJobsDiff> {
682
805
  constructor() {
683
806
  super("resources.documents.DocAccessJobsDiff", [
684
- { no: 1, name: "to_create", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentJobAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } },
685
- { no: 2, name: "to_update", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentJobAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } },
686
- { no: 3, name: "to_delete", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentJobAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } }
807
+ { no: 1, name: "to_create", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
808
+ { no: 2, name: "to_update", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
809
+ { no: 3, name: "to_delete", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } }
687
810
  ]);
688
811
  }
689
812
  create(value?: PartialMessage<DocAccessJobsDiff>): DocAccessJobsDiff {
@@ -744,9 +867,9 @@ export const DocAccessJobsDiff = new DocAccessJobsDiff$Type();
744
867
  class DocAccessUsersDiff$Type extends MessageType<DocAccessUsersDiff> {
745
868
  constructor() {
746
869
  super("resources.documents.DocAccessUsersDiff", [
747
- { no: 1, name: "to_create", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentUserAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } },
748
- { no: 2, name: "to_update", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentUserAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } },
749
- { no: 3, name: "to_delete", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentUserAccess, options: { "validate.rules": { repeated: { maxItems: "20" } } } }
870
+ { no: 1, name: "to_create", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentUserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
871
+ { no: 2, name: "to_update", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentUserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
872
+ { no: 3, name: "to_delete", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentUserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } }
750
873
  ]);
751
874
  }
752
875
  create(value?: PartialMessage<DocAccessUsersDiff>): DocAccessUsersDiff {
@@ -803,3 +926,57 @@ class DocAccessUsersDiff$Type extends MessageType<DocAccessUsersDiff> {
803
926
  * @generated MessageType for protobuf message resources.documents.DocAccessUsersDiff
804
927
  */
805
928
  export const DocAccessUsersDiff = new DocAccessUsersDiff$Type();
929
+ // @generated message type with reflection information, may provide speed optimized methods
930
+ class DocSignOffRequested$Type extends MessageType<DocSignOffRequested> {
931
+ constructor() {
932
+ super("resources.documents.DocSignOffRequested", [
933
+ { no: 1, name: "deadline", kind: "message", T: () => Timestamp },
934
+ { no: 2, name: "approvers", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UserShort, options: { "buf.validate.field": { repeated: { maxItems: "8" } } } }
935
+ ]);
936
+ }
937
+ create(value?: PartialMessage<DocSignOffRequested>): DocSignOffRequested {
938
+ const message = globalThis.Object.create((this.messagePrototype!));
939
+ message.approvers = [];
940
+ if (value !== undefined)
941
+ reflectionMergePartial<DocSignOffRequested>(this, message, value);
942
+ return message;
943
+ }
944
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocSignOffRequested): DocSignOffRequested {
945
+ let message = target ?? this.create(), end = reader.pos + length;
946
+ while (reader.pos < end) {
947
+ let [fieldNo, wireType] = reader.tag();
948
+ switch (fieldNo) {
949
+ case /* optional resources.timestamp.Timestamp deadline */ 1:
950
+ message.deadline = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deadline);
951
+ break;
952
+ case /* repeated resources.users.UserShort approvers */ 2:
953
+ message.approvers.push(UserShort.internalBinaryRead(reader, reader.uint32(), options));
954
+ break;
955
+ default:
956
+ let u = options.readUnknownField;
957
+ if (u === "throw")
958
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
959
+ let d = reader.skip(wireType);
960
+ if (u !== false)
961
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
962
+ }
963
+ }
964
+ return message;
965
+ }
966
+ internalBinaryWrite(message: DocSignOffRequested, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
967
+ /* optional resources.timestamp.Timestamp deadline = 1; */
968
+ if (message.deadline)
969
+ Timestamp.internalBinaryWrite(message.deadline, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
970
+ /* repeated resources.users.UserShort approvers = 2; */
971
+ for (let i = 0; i < message.approvers.length; i++)
972
+ UserShort.internalBinaryWrite(message.approvers[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
973
+ let u = options.writeUnknownFields;
974
+ if (u !== false)
975
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
976
+ return writer;
977
+ }
978
+ }
979
+ /**
980
+ * @generated MessageType for protobuf message resources.documents.DocSignOffRequested
981
+ */
982
+ export const DocSignOffRequested = new DocSignOffRequested$Type();
@@ -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 "resources/documents/category.proto" (package "resources.documents", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
6
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
@@ -16,43 +17,35 @@ import { Timestamp } from "../timestamp/timestamp";
16
17
  */
17
18
  export interface Category {
18
19
  /**
19
- * @generated from protobuf field: uint64 id = 1;
20
+ * @generated from protobuf field: int64 id = 1
20
21
  */
21
22
  id: number;
22
23
  /**
23
- * @generated from protobuf field: resources.timestamp.Timestamp created_at = 2;
24
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
24
25
  */
25
26
  createdAt?: Timestamp;
26
27
  /**
27
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 3;
28
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 3
28
29
  */
29
30
  deletedAt?: Timestamp;
30
31
  /**
31
- * @sanitize
32
- *
33
- * @generated from protobuf field: string name = 4;
32
+ * @generated from protobuf field: string name = 4
34
33
  */
35
34
  name: string;
36
35
  /**
37
- * @sanitize
38
- *
39
- * @generated from protobuf field: optional string description = 5;
36
+ * @generated from protobuf field: optional string description = 5
40
37
  */
41
38
  description?: string;
42
39
  /**
43
- * @generated from protobuf field: optional string job = 6;
40
+ * @generated from protobuf field: optional string job = 6
44
41
  */
45
42
  job?: string;
46
43
  /**
47
- * @sanitize: method=StripTags
48
- *
49
- * @generated from protobuf field: optional string color = 7;
44
+ * @generated from protobuf field: optional string color = 7
50
45
  */
51
46
  color?: string;
52
47
  /**
53
- * @sanitize: method=StripTags
54
- *
55
- * @generated from protobuf field: optional string icon = 8;
48
+ * @generated from protobuf field: optional string icon = 8
56
49
  */
57
50
  icon?: string;
58
51
  }
@@ -60,14 +53,14 @@ export interface Category {
60
53
  class Category$Type extends MessageType<Category> {
61
54
  constructor() {
62
55
  super("resources.documents.Category", [
63
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
56
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
64
57
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
65
58
  { no: 3, name: "deleted_at", kind: "message", T: () => Timestamp },
66
- { no: 4, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "128" } } } },
67
- { no: 5, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
68
- { no: 6, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
69
- { no: 7, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "7" } } } },
70
- { no: 8, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } }
59
+ { no: 4, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
60
+ { no: 5, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
61
+ { no: 6, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
62
+ { no: 7, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "7" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
63
+ { no: 8, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128", suffix: "Icon" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } }
71
64
  ]);
72
65
  }
73
66
  create(value?: PartialMessage<Category>): Category {
@@ -83,8 +76,8 @@ class Category$Type extends MessageType<Category> {
83
76
  while (reader.pos < end) {
84
77
  let [fieldNo, wireType] = reader.tag();
85
78
  switch (fieldNo) {
86
- case /* uint64 id */ 1:
87
- message.id = reader.uint64().toNumber();
79
+ case /* int64 id */ 1:
80
+ message.id = reader.int64().toNumber();
88
81
  break;
89
82
  case /* resources.timestamp.Timestamp created_at */ 2:
90
83
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
@@ -119,9 +112,9 @@ class Category$Type extends MessageType<Category> {
119
112
  return message;
120
113
  }
121
114
  internalBinaryWrite(message: Category, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
122
- /* uint64 id = 1; */
115
+ /* int64 id = 1; */
123
116
  if (message.id !== 0)
124
- writer.tag(1, WireType.Varint).uint64(message.id);
117
+ writer.tag(1, WireType.Varint).int64(message.id);
125
118
  /* resources.timestamp.Timestamp created_at = 2; */
126
119
  if (message.createdAt)
127
120
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();