@fivenet-app/gen 2025.5.3 → 2026.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/README.md +1 -1
  2. package/buf/validate/validate.ts +11301 -0
  3. package/clients.ts +193 -154
  4. package/codegen/dbscanner/dbscanner.ts +91 -0
  5. package/codegen/perms/perms.ts +287 -0
  6. package/codegen/sanitizer/sanitizer.ts +113 -0
  7. package/google/protobuf/any.ts +4 -3
  8. package/google/protobuf/descriptor.ts +393 -239
  9. package/google/protobuf/duration.ts +4 -3
  10. package/google/protobuf/struct.ts +485 -0
  11. package/google/protobuf/timestamp.ts +4 -3
  12. package/package.json +3 -3
  13. package/perms.ts +217 -160
  14. package/resources/accounts/accounts.ts +115 -47
  15. package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +33 -32
  16. package/resources/audit/audit.ts +172 -53
  17. package/resources/calendar/{access.ts → access/access.ts} +72 -71
  18. package/resources/calendar/calendar.ts +79 -543
  19. package/resources/calendar/entries/entries.ts +474 -0
  20. package/resources/centrum/access/access.ts +345 -0
  21. package/resources/centrum/dispatchers/dispatchers.ts +149 -0
  22. package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +267 -164
  23. package/resources/centrum/joblist.ts +136 -0
  24. package/resources/centrum/settings/settings.ts +657 -0
  25. package/resources/centrum/{units_access.ts → units/access/access.ts} +78 -79
  26. package/resources/centrum/{units.ts → units/units.ts} +230 -130
  27. package/resources/clientconfig/clientconfig.ts +1015 -0
  28. package/resources/collab/collab.ts +805 -0
  29. package/resources/common/content/content.ts +169 -63
  30. package/resources/common/content/diff_activity.ts +267 -0
  31. package/resources/common/database/database.ts +92 -35
  32. package/resources/common/error.ts +17 -16
  33. package/resources/common/i18n.ts +20 -24
  34. package/resources/common/id_mapping.ts +69 -0
  35. package/resources/common/tests/objects.ts +4 -3
  36. package/resources/{common/cron → cron}/cron.ts +77 -65
  37. package/resources/discord/discord.ts +209 -0
  38. package/resources/documents/{access.ts → access/access.ts} +75 -76
  39. package/resources/documents/{activity.ts → activity/activity.ts} +349 -124
  40. package/resources/documents/approval/approval.ts +945 -0
  41. package/resources/documents/{category.ts → category/category.ts} +25 -32
  42. package/resources/documents/{comment.ts → comment/comment.ts} +35 -34
  43. package/resources/documents/data/data.ts +303 -0
  44. package/resources/documents/documents.ts +374 -686
  45. package/resources/{common/uuid.ts → documents/forms/forms.ts} +22 -21
  46. package/resources/documents/pins/pins.ts +127 -0
  47. package/resources/documents/references/references.ts +187 -0
  48. package/resources/documents/relations/relations.ts +184 -0
  49. package/resources/documents/{requests.ts → requests/requests.ts} +45 -44
  50. package/resources/documents/stamps/stamp.ts +355 -0
  51. package/resources/documents/{templates.ts → templates/templates.ts} +524 -199
  52. package/resources/documents/workflow/workflow.ts +600 -0
  53. package/resources/file/file.ts +152 -0
  54. package/{services/settings → resources/file}/filestore.ts +179 -165
  55. package/resources/file/meta.ts +148 -0
  56. package/resources/{common/grpcws → grpcws}/grpcws.ts +66 -65
  57. package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +83 -86
  58. package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +76 -80
  59. package/resources/jobs/{conduct.ts → conduct/conduct.ts} +86 -62
  60. package/resources/jobs/jobs.ts +14 -13
  61. package/resources/jobs/{labels.ts → labels/labels.ts} +36 -37
  62. package/resources/jobs/{job_props.ts → props/props.ts} +63 -65
  63. package/resources/jobs/{job_settings.ts → settings/settings.ts} +89 -96
  64. package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +42 -41
  65. package/resources/laws/laws.ts +40 -49
  66. package/resources/livemap/coords.ts +81 -0
  67. package/resources/livemap/heatmap/heatmap.ts +93 -0
  68. package/resources/livemap/{livemap.ts → markers/marker_marker.ts} +68 -335
  69. package/resources/livemap/markers/user_marker.ts +377 -0
  70. package/resources/mailer/{access.ts → access/access.ts} +119 -118
  71. package/resources/mailer/{email.ts → emails/email.ts} +38 -41
  72. package/resources/mailer/{events.ts → events/events.ts} +44 -43
  73. package/resources/mailer/{message.ts → messages/message.ts} +69 -74
  74. package/resources/mailer/{settings.ts → settings/settings.ts} +23 -25
  75. package/resources/mailer/{template.ts → templates/template.ts} +37 -40
  76. package/resources/mailer/{thread.ts → threads/thread.ts} +93 -94
  77. package/resources/notifications/clientview/clientview.ts +239 -0
  78. package/resources/notifications/{events.ts → events/events.ts} +67 -130
  79. package/resources/notifications/notifications.ts +55 -60
  80. package/resources/permissions/{attributes.ts → attributes/attributes.ts} +94 -237
  81. package/resources/permissions/events/events.ts +149 -0
  82. package/resources/permissions/{permissions.ts → permissions/permissions.ts} +127 -47
  83. package/resources/qualifications/{access.ts → access/access.ts} +43 -42
  84. package/resources/qualifications/{exam.ts → exam/exam.ts} +419 -229
  85. package/resources/qualifications/qualifications.ts +327 -388
  86. package/resources/settings/banner.ts +14 -21
  87. package/resources/settings/config.ts +663 -79
  88. package/resources/settings/data.ts +90 -0
  89. package/resources/settings/perms.ts +151 -0
  90. package/resources/settings/status.ts +533 -0
  91. package/resources/stats/stats.ts +382 -2
  92. package/resources/sync/{activity.ts → activity/activity.ts} +126 -46
  93. package/resources/sync/data/data.ts +1001 -0
  94. package/resources/sync/data/v2/data.ts +220 -0
  95. package/resources/timestamp/timestamp.ts +3 -2
  96. package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
  97. package/resources/userinfo/userinfo.ts +442 -0
  98. package/resources/users/{activity.ts → activity/activity.ts} +182 -166
  99. package/resources/users/{labels.ts → labels/labels.ts} +27 -30
  100. package/resources/users/{licenses.ts → licenses/licenses.ts} +18 -17
  101. package/resources/users/{props.ts → props/props.ts} +109 -77
  102. package/resources/users/short/user.ts +184 -0
  103. package/resources/users/user.ts +528 -0
  104. package/resources/vehicles/activity/activity.ts +231 -0
  105. package/resources/vehicles/props/props.ts +125 -0
  106. package/resources/vehicles/vehicles.ts +43 -18
  107. package/resources/wiki/{access.ts → access/access.ts} +72 -71
  108. package/resources/wiki/{activity.ts → activity/activity.ts} +218 -102
  109. package/resources/wiki/page.ts +164 -93
  110. package/services/auth/auth.client.ts +45 -35
  111. package/services/auth/auth.ts +498 -288
  112. package/services/calendar/calendar.client.ts +32 -91
  113. package/services/calendar/calendar.ts +157 -134
  114. package/services/centrum/centrum.client.ts +97 -137
  115. package/services/centrum/centrum.ts +755 -352
  116. package/services/citizens/citizens.client.ts +70 -39
  117. package/services/citizens/citizens.ts +226 -112
  118. package/services/completor/completor.client.ts +16 -35
  119. package/services/completor/completor.ts +95 -54
  120. package/services/documents/approval.client.ts +188 -0
  121. package/services/documents/approval.ts +1776 -0
  122. package/services/documents/collab.client.ts +46 -0
  123. package/services/documents/collab.ts +13 -0
  124. package/services/documents/documents.client.ts +88 -217
  125. package/services/documents/documents.ts +579 -619
  126. package/services/documents/forms.client.ts +51 -0
  127. package/services/documents/forms.ts +232 -0
  128. package/services/documents/stamps.client.ts +77 -0
  129. package/services/documents/stamps.ts +481 -0
  130. package/services/documents/stats.client.ts +38 -0
  131. package/services/documents/stats.ts +245 -0
  132. package/services/filestore/filestore.client.ts +86 -0
  133. package/services/filestore/filestore.ts +262 -0
  134. package/services/jobs/conduct.client.ts +40 -28
  135. package/services/jobs/conduct.ts +183 -56
  136. package/services/jobs/jobs.client.ts +22 -61
  137. package/services/jobs/jobs.ts +138 -121
  138. package/services/jobs/stats.client.ts +38 -0
  139. package/services/jobs/stats.ts +207 -0
  140. package/services/jobs/timeclock.client.ts +8 -19
  141. package/services/jobs/timeclock.ts +76 -75
  142. package/services/livemap/livemap.client.ts +8 -19
  143. package/services/livemap/livemap.ts +297 -126
  144. package/services/mailer/mailer.client.ts +44 -127
  145. package/services/mailer/mailer.ts +266 -269
  146. package/services/notifications/notifications.client.ts +65 -0
  147. package/services/{notificator/notificator.ts → notifications/notifications.ts} +126 -83
  148. package/services/qualifications/qualifications.client.ts +46 -91
  149. package/services/qualifications/qualifications.ts +250 -209
  150. package/services/settings/accounts.client.ts +31 -33
  151. package/services/settings/accounts.ts +251 -67
  152. package/services/settings/config.client.ts +6 -13
  153. package/services/settings/config.ts +8 -7
  154. package/services/settings/cron.client.ts +4 -7
  155. package/services/settings/cron.ts +7 -6
  156. package/services/settings/laws.client.ts +10 -25
  157. package/services/settings/laws.ts +30 -29
  158. package/services/settings/settings.client.ts +57 -103
  159. package/services/settings/settings.ts +237 -633
  160. package/services/settings/system.client.ts +103 -0
  161. package/services/settings/system.ts +718 -0
  162. package/services/stats/stats.client.ts +9 -8
  163. package/services/stats/stats.ts +27 -26
  164. package/services/sync/sync.client.ts +16 -15
  165. package/services/sync/sync.ts +174 -97
  166. package/services/sync/v2/sync.client.ts +331 -0
  167. package/services/sync/v2/sync.ts +1766 -0
  168. package/services/vehicles/vehicles.client.ts +17 -7
  169. package/services/vehicles/vehicles.ts +170 -25
  170. package/services/wiki/collab.client.ts +46 -0
  171. package/services/wiki/collab.ts +13 -0
  172. package/services/wiki/wiki.client.ts +28 -37
  173. package/services/wiki/wiki.ts +97 -67
  174. package/svcs.ts +174 -106
  175. package/resources/centrum/attributes.ts +0 -186
  176. package/resources/centrum/disponents.ts +0 -81
  177. package/resources/centrum/settings.ts +0 -307
  178. package/resources/documents/workflow.ts +0 -351
  179. package/resources/filestore/file.ts +0 -204
  180. package/resources/internet/access.ts +0 -358
  181. package/resources/internet/ads.ts +0 -257
  182. package/resources/internet/domain.ts +0 -328
  183. package/resources/internet/page.ts +0 -428
  184. package/resources/internet/search.ts +0 -128
  185. package/resources/livemap/tracker.ts +0 -81
  186. package/resources/sync/data.ts +0 -587
  187. package/resources/users/users.ts +0 -435
  188. package/services/internet/ads.client.ts +0 -41
  189. package/services/internet/ads.ts +0 -145
  190. package/services/internet/domain.client.ts +0 -109
  191. package/services/internet/domain.ts +0 -658
  192. package/services/internet/internet.client.ts +0 -58
  193. package/services/internet/internet.ts +0 -268
  194. package/services/notificator/notificator.client.ts +0 -76
  195. package/services/settings/filestore.client.ts +0 -75
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
2
- // @generated from protobuf file "resources/mailer/message.proto" (package "resources.mailer", syntax proto3)
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
+ // @generated from protobuf file "resources/mailer/messages/message.proto" (package "resources.mailer.messages", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
6
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
@@ -10,79 +11,73 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
11
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
13
  import { MessageType } from "@protobuf-ts/runtime";
13
- import { Content } from "../common/content/content";
14
- import { Timestamp } from "../timestamp/timestamp";
15
- import { Email } from "./email";
14
+ import { Content } from "../../common/content/content";
15
+ import { Timestamp } from "../../timestamp/timestamp";
16
+ import { Email } from "../emails/email";
16
17
  /**
17
- * @generated from protobuf message resources.mailer.Message
18
+ * @generated from protobuf message resources.mailer.messages.Message
18
19
  */
19
20
  export interface Message {
20
21
  /**
21
- * @generated from protobuf field: uint64 id = 1;
22
+ * @generated from protobuf field: int64 id = 1
22
23
  */
23
24
  id: number;
24
25
  /**
25
- * @generated from protobuf field: uint64 thread_id = 2;
26
+ * @generated from protobuf field: int64 thread_id = 2
26
27
  */
27
28
  threadId: number;
28
29
  /**
29
- * @generated from protobuf field: uint64 sender_id = 3;
30
+ * @generated from protobuf field: int64 sender_id = 3
30
31
  */
31
32
  senderId: number;
32
33
  /**
33
- * @generated from protobuf field: optional resources.mailer.Email sender = 4;
34
+ * @generated from protobuf field: optional resources.mailer.emails.Email sender = 4
34
35
  */
35
- sender?: Email; // @gotags: alias:"sender"
36
+ sender?: Email;
36
37
  /**
37
- * @generated from protobuf field: resources.timestamp.Timestamp created_at = 5;
38
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 5
38
39
  */
39
40
  createdAt?: Timestamp;
40
41
  /**
41
- * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 6;
42
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 6
42
43
  */
43
44
  updatedAt?: Timestamp;
44
45
  /**
45
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 7;
46
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 7
46
47
  */
47
48
  deletedAt?: Timestamp;
48
49
  /**
49
- * @sanitize: method=StripTags
50
- *
51
- * @generated from protobuf field: string title = 8;
50
+ * @generated from protobuf field: string title = 8
52
51
  */
53
52
  title: string;
54
53
  /**
55
- * @sanitize
56
- *
57
- * @generated from protobuf field: resources.common.content.Content content = 9;
54
+ * @generated from protobuf field: resources.common.content.Content content = 9
58
55
  */
59
56
  content?: Content;
60
57
  /**
61
- * @generated from protobuf field: optional resources.mailer.MessageData data = 10;
58
+ * @generated from protobuf field: optional resources.mailer.messages.MessageData data = 10
62
59
  */
63
60
  data?: MessageData;
64
61
  /**
65
- * @generated from protobuf field: optional int32 creator_id = 11;
62
+ * @generated from protobuf field: optional int32 creator_id = 11
66
63
  */
67
64
  creatorId?: number;
68
65
  /**
69
- * @generated from protobuf field: optional string creator_job = 12;
66
+ * @generated from protobuf field: optional string creator_job = 12
70
67
  */
71
68
  creatorJob?: string;
72
69
  }
73
70
  /**
74
- * @dbscanner: json
75
- *
76
- * @generated from protobuf message resources.mailer.MessageData
71
+ * @generated from protobuf message resources.mailer.messages.MessageData
77
72
  */
78
73
  export interface MessageData {
79
74
  /**
80
- * @generated from protobuf field: repeated resources.mailer.MessageAttachment attachments = 1;
75
+ * @generated from protobuf field: repeated resources.mailer.messages.MessageAttachment attachments = 1
81
76
  */
82
77
  attachments: MessageAttachment[];
83
78
  }
84
79
  /**
85
- * @generated from protobuf message resources.mailer.MessageAttachment
80
+ * @generated from protobuf message resources.mailer.messages.MessageAttachment
86
81
  */
87
82
  export interface MessageAttachment {
88
83
  /**
@@ -91,7 +86,7 @@ export interface MessageAttachment {
91
86
  data: {
92
87
  oneofKind: "document";
93
88
  /**
94
- * @generated from protobuf field: resources.mailer.MessageAttachmentDocument document = 1;
89
+ * @generated from protobuf field: resources.mailer.messages.MessageAttachmentDocument document = 1
95
90
  */
96
91
  document: MessageAttachmentDocument;
97
92
  } | {
@@ -99,31 +94,31 @@ export interface MessageAttachment {
99
94
  };
100
95
  }
101
96
  /**
102
- * @generated from protobuf message resources.mailer.MessageAttachmentDocument
97
+ * @generated from protobuf message resources.mailer.messages.MessageAttachmentDocument
103
98
  */
104
99
  export interface MessageAttachmentDocument {
105
100
  /**
106
- * @generated from protobuf field: uint64 id = 1;
101
+ * @generated from protobuf field: int64 id = 1
107
102
  */
108
103
  id: number;
109
104
  /**
110
- * @generated from protobuf field: optional string title = 2;
105
+ * @generated from protobuf field: optional string title = 2
111
106
  */
112
107
  title?: string;
113
108
  }
114
109
  // @generated message type with reflection information, may provide speed optimized methods
115
110
  class Message$Type extends MessageType<Message> {
116
111
  constructor() {
117
- super("resources.mailer.Message", [
118
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
119
- { no: 2, name: "thread_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
120
- { no: 3, name: "sender_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
121
- { no: 4, name: "sender", kind: "message", T: () => Email },
112
+ super("resources.mailer.messages.Message", [
113
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
114
+ { no: 2, name: "thread_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
115
+ { no: 3, name: "sender_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
116
+ { no: 4, name: "sender", kind: "message", T: () => Email, options: { "tagger.tags": "alias:\"sender\"" } },
122
117
  { no: 5, name: "created_at", kind: "message", T: () => Timestamp },
123
118
  { no: 6, name: "updated_at", kind: "message", T: () => Timestamp },
124
119
  { no: 7, name: "deleted_at", kind: "message", T: () => Timestamp },
125
- { no: 8, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "255" } } } },
126
- { no: 9, name: "content", kind: "message", T: () => Content },
120
+ { no: 8, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
121
+ { no: 9, name: "content", kind: "message", T: () => Content, options: { "codegen.sanitizer.sanitizer": { enabled: true } } },
127
122
  { no: 10, name: "data", kind: "message", T: () => MessageData },
128
123
  { no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
129
124
  { no: 12, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
@@ -144,16 +139,16 @@ class Message$Type extends MessageType<Message> {
144
139
  while (reader.pos < end) {
145
140
  let [fieldNo, wireType] = reader.tag();
146
141
  switch (fieldNo) {
147
- case /* uint64 id */ 1:
148
- message.id = reader.uint64().toNumber();
142
+ case /* int64 id */ 1:
143
+ message.id = reader.int64().toNumber();
149
144
  break;
150
- case /* uint64 thread_id */ 2:
151
- message.threadId = reader.uint64().toNumber();
145
+ case /* int64 thread_id */ 2:
146
+ message.threadId = reader.int64().toNumber();
152
147
  break;
153
- case /* uint64 sender_id */ 3:
154
- message.senderId = reader.uint64().toNumber();
148
+ case /* int64 sender_id */ 3:
149
+ message.senderId = reader.int64().toNumber();
155
150
  break;
156
- case /* optional resources.mailer.Email sender */ 4:
151
+ case /* optional resources.mailer.emails.Email sender */ 4:
157
152
  message.sender = Email.internalBinaryRead(reader, reader.uint32(), options, message.sender);
158
153
  break;
159
154
  case /* resources.timestamp.Timestamp created_at */ 5:
@@ -171,7 +166,7 @@ class Message$Type extends MessageType<Message> {
171
166
  case /* resources.common.content.Content content */ 9:
172
167
  message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
173
168
  break;
174
- case /* optional resources.mailer.MessageData data */ 10:
169
+ case /* optional resources.mailer.messages.MessageData data */ 10:
175
170
  message.data = MessageData.internalBinaryRead(reader, reader.uint32(), options, message.data);
176
171
  break;
177
172
  case /* optional int32 creator_id */ 11:
@@ -192,16 +187,16 @@ class Message$Type extends MessageType<Message> {
192
187
  return message;
193
188
  }
194
189
  internalBinaryWrite(message: Message, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
195
- /* uint64 id = 1; */
190
+ /* int64 id = 1; */
196
191
  if (message.id !== 0)
197
- writer.tag(1, WireType.Varint).uint64(message.id);
198
- /* uint64 thread_id = 2; */
192
+ writer.tag(1, WireType.Varint).int64(message.id);
193
+ /* int64 thread_id = 2; */
199
194
  if (message.threadId !== 0)
200
- writer.tag(2, WireType.Varint).uint64(message.threadId);
201
- /* uint64 sender_id = 3; */
195
+ writer.tag(2, WireType.Varint).int64(message.threadId);
196
+ /* int64 sender_id = 3; */
202
197
  if (message.senderId !== 0)
203
- writer.tag(3, WireType.Varint).uint64(message.senderId);
204
- /* optional resources.mailer.Email sender = 4; */
198
+ writer.tag(3, WireType.Varint).int64(message.senderId);
199
+ /* optional resources.mailer.emails.Email sender = 4; */
205
200
  if (message.sender)
206
201
  Email.internalBinaryWrite(message.sender, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
207
202
  /* resources.timestamp.Timestamp created_at = 5; */
@@ -219,7 +214,7 @@ class Message$Type extends MessageType<Message> {
219
214
  /* resources.common.content.Content content = 9; */
220
215
  if (message.content)
221
216
  Content.internalBinaryWrite(message.content, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
222
- /* optional resources.mailer.MessageData data = 10; */
217
+ /* optional resources.mailer.messages.MessageData data = 10; */
223
218
  if (message.data)
224
219
  MessageData.internalBinaryWrite(message.data, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
225
220
  /* optional int32 creator_id = 11; */
@@ -235,15 +230,15 @@ class Message$Type extends MessageType<Message> {
235
230
  }
236
231
  }
237
232
  /**
238
- * @generated MessageType for protobuf message resources.mailer.Message
233
+ * @generated MessageType for protobuf message resources.mailer.messages.Message
239
234
  */
240
235
  export const Message = new Message$Type();
241
236
  // @generated message type with reflection information, may provide speed optimized methods
242
237
  class MessageData$Type extends MessageType<MessageData> {
243
238
  constructor() {
244
- super("resources.mailer.MessageData", [
245
- { no: 1, name: "attachments", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MessageAttachment, options: { "validate.rules": { repeated: { maxItems: "3" } } } }
246
- ]);
239
+ super("resources.mailer.messages.MessageData", [
240
+ { no: 1, name: "attachments", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MessageAttachment, options: { "buf.validate.field": { repeated: { maxItems: "3" } } } }
241
+ ], { "codegen.dbscanner.dbscanner": { enabled: true } });
247
242
  }
248
243
  create(value?: PartialMessage<MessageData>): MessageData {
249
244
  const message = globalThis.Object.create((this.messagePrototype!));
@@ -257,7 +252,7 @@ class MessageData$Type extends MessageType<MessageData> {
257
252
  while (reader.pos < end) {
258
253
  let [fieldNo, wireType] = reader.tag();
259
254
  switch (fieldNo) {
260
- case /* repeated resources.mailer.MessageAttachment attachments */ 1:
255
+ case /* repeated resources.mailer.messages.MessageAttachment attachments */ 1:
261
256
  message.attachments.push(MessageAttachment.internalBinaryRead(reader, reader.uint32(), options));
262
257
  break;
263
258
  default:
@@ -272,7 +267,7 @@ class MessageData$Type extends MessageType<MessageData> {
272
267
  return message;
273
268
  }
274
269
  internalBinaryWrite(message: MessageData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
275
- /* repeated resources.mailer.MessageAttachment attachments = 1; */
270
+ /* repeated resources.mailer.messages.MessageAttachment attachments = 1; */
276
271
  for (let i = 0; i < message.attachments.length; i++)
277
272
  MessageAttachment.internalBinaryWrite(message.attachments[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
278
273
  let u = options.writeUnknownFields;
@@ -282,13 +277,13 @@ class MessageData$Type extends MessageType<MessageData> {
282
277
  }
283
278
  }
284
279
  /**
285
- * @generated MessageType for protobuf message resources.mailer.MessageData
280
+ * @generated MessageType for protobuf message resources.mailer.messages.MessageData
286
281
  */
287
282
  export const MessageData = new MessageData$Type();
288
283
  // @generated message type with reflection information, may provide speed optimized methods
289
284
  class MessageAttachment$Type extends MessageType<MessageAttachment> {
290
285
  constructor() {
291
- super("resources.mailer.MessageAttachment", [
286
+ super("resources.mailer.messages.MessageAttachment", [
292
287
  { no: 1, name: "document", kind: "message", oneof: "data", T: () => MessageAttachmentDocument }
293
288
  ]);
294
289
  }
@@ -304,7 +299,7 @@ class MessageAttachment$Type extends MessageType<MessageAttachment> {
304
299
  while (reader.pos < end) {
305
300
  let [fieldNo, wireType] = reader.tag();
306
301
  switch (fieldNo) {
307
- case /* resources.mailer.MessageAttachmentDocument document */ 1:
302
+ case /* resources.mailer.messages.MessageAttachmentDocument document */ 1:
308
303
  message.data = {
309
304
  oneofKind: "document",
310
305
  document: MessageAttachmentDocument.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).document)
@@ -322,7 +317,7 @@ class MessageAttachment$Type extends MessageType<MessageAttachment> {
322
317
  return message;
323
318
  }
324
319
  internalBinaryWrite(message: MessageAttachment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
325
- /* resources.mailer.MessageAttachmentDocument document = 1; */
320
+ /* resources.mailer.messages.MessageAttachmentDocument document = 1; */
326
321
  if (message.data.oneofKind === "document")
327
322
  MessageAttachmentDocument.internalBinaryWrite(message.data.document, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
328
323
  let u = options.writeUnknownFields;
@@ -332,15 +327,15 @@ class MessageAttachment$Type extends MessageType<MessageAttachment> {
332
327
  }
333
328
  }
334
329
  /**
335
- * @generated MessageType for protobuf message resources.mailer.MessageAttachment
330
+ * @generated MessageType for protobuf message resources.mailer.messages.MessageAttachment
336
331
  */
337
332
  export const MessageAttachment = new MessageAttachment$Type();
338
333
  // @generated message type with reflection information, may provide speed optimized methods
339
334
  class MessageAttachmentDocument$Type extends MessageType<MessageAttachmentDocument> {
340
335
  constructor() {
341
- super("resources.mailer.MessageAttachmentDocument", [
342
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
343
- { no: 2, name: "title", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "768" } } } }
336
+ super("resources.mailer.messages.MessageAttachmentDocument", [
337
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
338
+ { no: 2, name: "title", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "768" } } } }
344
339
  ]);
345
340
  }
346
341
  create(value?: PartialMessage<MessageAttachmentDocument>): MessageAttachmentDocument {
@@ -355,8 +350,8 @@ class MessageAttachmentDocument$Type extends MessageType<MessageAttachmentDocume
355
350
  while (reader.pos < end) {
356
351
  let [fieldNo, wireType] = reader.tag();
357
352
  switch (fieldNo) {
358
- case /* uint64 id */ 1:
359
- message.id = reader.uint64().toNumber();
353
+ case /* int64 id */ 1:
354
+ message.id = reader.int64().toNumber();
360
355
  break;
361
356
  case /* optional string title */ 2:
362
357
  message.title = reader.string();
@@ -373,9 +368,9 @@ class MessageAttachmentDocument$Type extends MessageType<MessageAttachmentDocume
373
368
  return message;
374
369
  }
375
370
  internalBinaryWrite(message: MessageAttachmentDocument, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
376
- /* uint64 id = 1; */
371
+ /* int64 id = 1; */
377
372
  if (message.id !== 0)
378
- writer.tag(1, WireType.Varint).uint64(message.id);
373
+ writer.tag(1, WireType.Varint).int64(message.id);
379
374
  /* optional string title = 2; */
380
375
  if (message.title !== undefined)
381
376
  writer.tag(2, WireType.LengthDelimited).string(message.title);
@@ -386,6 +381,6 @@ class MessageAttachmentDocument$Type extends MessageType<MessageAttachmentDocume
386
381
  }
387
382
  }
388
383
  /**
389
- * @generated MessageType for protobuf message resources.mailer.MessageAttachmentDocument
384
+ * @generated MessageType for protobuf message resources.mailer.messages.MessageAttachmentDocument
390
385
  */
391
386
  export const MessageAttachmentDocument = new MessageAttachmentDocument$Type();
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
2
- // @generated from protobuf file "resources/mailer/settings.proto" (package "resources.mailer", syntax proto3)
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
+ // @generated from protobuf file "resources/mailer/settings/settings.proto" (package "resources.mailer.settings", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
6
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
@@ -10,34 +11,31 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
11
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
13
  import { MessageType } from "@protobuf-ts/runtime";
14
+ import { Content } from "../../common/content/content";
13
15
  /**
14
- * @generated from protobuf message resources.mailer.EmailSettings
16
+ * @generated from protobuf message resources.mailer.settings.EmailSettings
15
17
  */
16
18
  export interface EmailSettings {
17
19
  /**
18
- * @generated from protobuf field: uint64 email_id = 1;
20
+ * @generated from protobuf field: int64 email_id = 1
19
21
  */
20
22
  emailId: number;
21
23
  /**
22
- * @sanitize
23
- *
24
- * @generated from protobuf field: optional string signature = 2;
24
+ * @generated from protobuf field: optional resources.common.content.Content signature = 2
25
25
  */
26
- signature?: string;
26
+ signature?: Content;
27
27
  /**
28
- * @sanitize: method=StripTags
29
- *
30
- * @generated from protobuf field: repeated string blocked_emails = 3;
28
+ * @generated from protobuf field: repeated string blocked_emails = 3
31
29
  */
32
30
  blockedEmails: string[];
33
31
  }
34
32
  // @generated message type with reflection information, may provide speed optimized methods
35
33
  class EmailSettings$Type extends MessageType<EmailSettings> {
36
34
  constructor() {
37
- super("resources.mailer.EmailSettings", [
38
- { no: 1, name: "email_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
39
- { no: 2, name: "signature", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "1024" } } } },
40
- { no: 3, name: "blocked_emails", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { maxItems: "25" } } } }
35
+ super("resources.mailer.settings.EmailSettings", [
36
+ { no: 1, name: "email_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
37
+ { no: 2, name: "signature", kind: "message", T: () => Content },
38
+ { no: 3, name: "blocked_emails", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { repeated: { maxItems: "25" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } }
41
39
  ]);
42
40
  }
43
41
  create(value?: PartialMessage<EmailSettings>): EmailSettings {
@@ -53,11 +51,11 @@ class EmailSettings$Type extends MessageType<EmailSettings> {
53
51
  while (reader.pos < end) {
54
52
  let [fieldNo, wireType] = reader.tag();
55
53
  switch (fieldNo) {
56
- case /* uint64 email_id */ 1:
57
- message.emailId = reader.uint64().toNumber();
54
+ case /* int64 email_id */ 1:
55
+ message.emailId = reader.int64().toNumber();
58
56
  break;
59
- case /* optional string signature */ 2:
60
- message.signature = reader.string();
57
+ case /* optional resources.common.content.Content signature */ 2:
58
+ message.signature = Content.internalBinaryRead(reader, reader.uint32(), options, message.signature);
61
59
  break;
62
60
  case /* repeated string blocked_emails */ 3:
63
61
  message.blockedEmails.push(reader.string());
@@ -74,12 +72,12 @@ class EmailSettings$Type extends MessageType<EmailSettings> {
74
72
  return message;
75
73
  }
76
74
  internalBinaryWrite(message: EmailSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
77
- /* uint64 email_id = 1; */
75
+ /* int64 email_id = 1; */
78
76
  if (message.emailId !== 0)
79
- writer.tag(1, WireType.Varint).uint64(message.emailId);
80
- /* optional string signature = 2; */
81
- if (message.signature !== undefined)
82
- writer.tag(2, WireType.LengthDelimited).string(message.signature);
77
+ writer.tag(1, WireType.Varint).int64(message.emailId);
78
+ /* optional resources.common.content.Content signature = 2; */
79
+ if (message.signature)
80
+ Content.internalBinaryWrite(message.signature, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
83
81
  /* repeated string blocked_emails = 3; */
84
82
  for (let i = 0; i < message.blockedEmails.length; i++)
85
83
  writer.tag(3, WireType.LengthDelimited).string(message.blockedEmails[i]);
@@ -90,6 +88,6 @@ class EmailSettings$Type extends MessageType<EmailSettings> {
90
88
  }
91
89
  }
92
90
  /**
93
- * @generated MessageType for protobuf message resources.mailer.EmailSettings
91
+ * @generated MessageType for protobuf message resources.mailer.settings.EmailSettings
94
92
  */
95
93
  export const EmailSettings = new EmailSettings$Type();
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
2
- // @generated from protobuf file "resources/mailer/template.proto" (package "resources.mailer", syntax proto3)
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
+ // @generated from protobuf file "resources/mailer/templates/template.proto" (package "resources.mailer.templates", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
6
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
@@ -10,65 +11,62 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
11
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
13
  import { MessageType } from "@protobuf-ts/runtime";
13
- import { Timestamp } from "../timestamp/timestamp";
14
+ import { Content } from "../../common/content/content";
15
+ import { Timestamp } from "../../timestamp/timestamp";
14
16
  /**
15
- * @generated from protobuf message resources.mailer.Template
17
+ * @generated from protobuf message resources.mailer.templates.Template
16
18
  */
17
19
  export interface Template {
18
20
  /**
19
- * @generated from protobuf field: uint64 id = 1;
21
+ * @generated from protobuf field: int64 id = 1
20
22
  */
21
23
  id: number;
22
24
  /**
23
- * @generated from protobuf field: resources.timestamp.Timestamp created_at = 3;
25
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 3
24
26
  */
25
27
  createdAt?: Timestamp;
26
28
  /**
27
- * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 4;
29
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 4
28
30
  */
29
31
  updatedAt?: Timestamp;
30
32
  /**
31
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 5;
33
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 5
32
34
  */
33
35
  deletedAt?: Timestamp;
34
36
  /**
35
- * @generated from protobuf field: uint64 email_id = 6;
37
+ * @generated from protobuf field: int64 email_id = 6
36
38
  */
37
39
  emailId: number;
38
40
  /**
39
- * @sanitize: method=StripTags
40
- *
41
- * @generated from protobuf field: string title = 7;
41
+ * @generated from protobuf field: string title = 7
42
42
  */
43
43
  title: string;
44
44
  /**
45
- * @sanitize
46
- *
47
- * @generated from protobuf field: string content = 8;
45
+ * @generated from protobuf field: resources.common.content.Content content = 8
48
46
  */
49
- content: string;
47
+ content?: Content;
50
48
  /**
51
- * @generated from protobuf field: optional string creator_job = 9;
49
+ * @generated from protobuf field: optional string creator_job = 9
52
50
  */
53
51
  creatorJob?: string;
54
52
  /**
55
- * @generated from protobuf field: optional int32 creator_id = 10;
53
+ * @generated from protobuf field: optional int32 creator_id = 10
56
54
  */
57
55
  creatorId?: number;
58
56
  }
59
57
  // @generated message type with reflection information, may provide speed optimized methods
60
58
  class Template$Type extends MessageType<Template> {
61
59
  constructor() {
62
- super("resources.mailer.Template", [
63
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
60
+ super("resources.mailer.templates.Template", [
61
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
64
62
  { no: 3, name: "created_at", kind: "message", T: () => Timestamp },
65
63
  { no: 4, name: "updated_at", kind: "message", T: () => Timestamp },
66
64
  { no: 5, name: "deleted_at", kind: "message", T: () => Timestamp },
67
- { no: 6, name: "email_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
68
- { no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "255" } } } },
69
- { no: 8, name: "content", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "10240" } } } },
70
- { no: 9, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "40" } } } },
71
- { no: 10, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } }
65
+ { no: 6, name: "email_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
66
+ { no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
67
+ { no: 8, name: "content", kind: "message", T: () => Content },
68
+ { no: 9, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "40" } } } },
69
+ { no: 10, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } }
72
70
  ]);
73
71
  }
74
72
  create(value?: PartialMessage<Template>): Template {
@@ -76,7 +74,6 @@ class Template$Type extends MessageType<Template> {
76
74
  message.id = 0;
77
75
  message.emailId = 0;
78
76
  message.title = "";
79
- message.content = "";
80
77
  if (value !== undefined)
81
78
  reflectionMergePartial<Template>(this, message, value);
82
79
  return message;
@@ -86,8 +83,8 @@ class Template$Type extends MessageType<Template> {
86
83
  while (reader.pos < end) {
87
84
  let [fieldNo, wireType] = reader.tag();
88
85
  switch (fieldNo) {
89
- case /* uint64 id */ 1:
90
- message.id = reader.uint64().toNumber();
86
+ case /* int64 id */ 1:
87
+ message.id = reader.int64().toNumber();
91
88
  break;
92
89
  case /* resources.timestamp.Timestamp created_at */ 3:
93
90
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
@@ -98,14 +95,14 @@ class Template$Type extends MessageType<Template> {
98
95
  case /* optional resources.timestamp.Timestamp deleted_at */ 5:
99
96
  message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
100
97
  break;
101
- case /* uint64 email_id */ 6:
102
- message.emailId = reader.uint64().toNumber();
98
+ case /* int64 email_id */ 6:
99
+ message.emailId = reader.int64().toNumber();
103
100
  break;
104
101
  case /* string title */ 7:
105
102
  message.title = reader.string();
106
103
  break;
107
- case /* string content */ 8:
108
- message.content = reader.string();
104
+ case /* resources.common.content.Content content */ 8:
105
+ message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
109
106
  break;
110
107
  case /* optional string creator_job */ 9:
111
108
  message.creatorJob = reader.string();
@@ -125,9 +122,9 @@ class Template$Type extends MessageType<Template> {
125
122
  return message;
126
123
  }
127
124
  internalBinaryWrite(message: Template, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
128
- /* uint64 id = 1; */
125
+ /* int64 id = 1; */
129
126
  if (message.id !== 0)
130
- writer.tag(1, WireType.Varint).uint64(message.id);
127
+ writer.tag(1, WireType.Varint).int64(message.id);
131
128
  /* resources.timestamp.Timestamp created_at = 3; */
132
129
  if (message.createdAt)
133
130
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
@@ -137,15 +134,15 @@ class Template$Type extends MessageType<Template> {
137
134
  /* optional resources.timestamp.Timestamp deleted_at = 5; */
138
135
  if (message.deletedAt)
139
136
  Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
140
- /* uint64 email_id = 6; */
137
+ /* int64 email_id = 6; */
141
138
  if (message.emailId !== 0)
142
- writer.tag(6, WireType.Varint).uint64(message.emailId);
139
+ writer.tag(6, WireType.Varint).int64(message.emailId);
143
140
  /* string title = 7; */
144
141
  if (message.title !== "")
145
142
  writer.tag(7, WireType.LengthDelimited).string(message.title);
146
- /* string content = 8; */
147
- if (message.content !== "")
148
- writer.tag(8, WireType.LengthDelimited).string(message.content);
143
+ /* resources.common.content.Content content = 8; */
144
+ if (message.content)
145
+ Content.internalBinaryWrite(message.content, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
149
146
  /* optional string creator_job = 9; */
150
147
  if (message.creatorJob !== undefined)
151
148
  writer.tag(9, WireType.LengthDelimited).string(message.creatorJob);
@@ -159,6 +156,6 @@ class Template$Type extends MessageType<Template> {
159
156
  }
160
157
  }
161
158
  /**
162
- * @generated MessageType for protobuf message resources.mailer.Template
159
+ * @generated MessageType for protobuf message resources.mailer.templates.Template
163
160
  */
164
161
  export const Template = new Template$Type();