@fivenet-app/gen 0.9.3-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.
- package/README.md +1 -0
- package/google/protobuf/any.ts +322 -0
- package/google/protobuf/descriptor.ts +3475 -0
- package/google/protobuf/duration.ts +231 -0
- package/google/protobuf/timestamp.ts +290 -0
- package/package.json +15 -0
- package/perms.ts +178 -0
- package/resources/accounts/accounts.ts +195 -0
- package/resources/accounts/oauth2.ts +230 -0
- package/resources/calendar/access.ts +362 -0
- package/resources/calendar/calendar.ts +955 -0
- package/resources/centrum/access.ts +380 -0
- package/resources/centrum/dispatches.ts +854 -0
- package/resources/centrum/general.ts +231 -0
- package/resources/centrum/settings.ts +303 -0
- package/resources/centrum/units.ts +620 -0
- package/resources/common/access/dummy.ts +309 -0
- package/resources/common/content/content.ts +252 -0
- package/resources/common/cron/cron.ts +536 -0
- package/resources/common/database/database.ts +306 -0
- package/resources/common/error.ts +79 -0
- package/resources/common/grpcws/grpcws.ts +615 -0
- package/resources/common/i18n.ts +102 -0
- package/resources/common/uuid.ts +68 -0
- package/resources/documents/access.ts +388 -0
- package/resources/documents/activity.ts +803 -0
- package/resources/documents/category.ts +132 -0
- package/resources/documents/comment.ts +161 -0
- package/resources/documents/documents.ts +1124 -0
- package/resources/documents/requests.ts +196 -0
- package/resources/documents/templates.ts +949 -0
- package/resources/documents/workflow.ts +349 -0
- package/resources/filestore/file.ts +204 -0
- package/resources/internet/ads.ts +257 -0
- package/resources/internet/domain.ts +136 -0
- package/resources/internet/internet.ts +344 -0
- package/resources/internet/page.ts +236 -0
- package/resources/internet/search.ts +104 -0
- package/resources/jobs/activity.ts +600 -0
- package/resources/jobs/colleagues.ts +346 -0
- package/resources/jobs/conduct.ts +220 -0
- package/resources/jobs/labels.ts +240 -0
- package/resources/jobs/timeclock.ts +372 -0
- package/resources/laws/laws.ts +293 -0
- package/resources/livemap/livemap.ts +728 -0
- package/resources/livemap/tracker.ts +81 -0
- package/resources/mailer/access.ts +485 -0
- package/resources/mailer/email.ts +222 -0
- package/resources/mailer/events.ts +196 -0
- package/resources/mailer/message.ts +285 -0
- package/resources/mailer/settings.ts +95 -0
- package/resources/mailer/template.ts +164 -0
- package/resources/mailer/thread.ts +422 -0
- package/resources/mailer/user.ts +93 -0
- package/resources/notifications/events.ts +287 -0
- package/resources/notifications/notifications.ts +444 -0
- package/resources/permissions/permissions.ts +829 -0
- package/resources/qualifications/access.ts +275 -0
- package/resources/qualifications/exam.ts +1421 -0
- package/resources/qualifications/qualifications.ts +1289 -0
- package/resources/rector/audit.ts +226 -0
- package/resources/rector/config.ts +922 -0
- package/resources/stats/stats.ts +67 -0
- package/resources/sync/activity.ts +356 -0
- package/resources/sync/data.ts +455 -0
- package/resources/timestamp/timestamp.ts +78 -0
- package/resources/users/activity.ts +211 -0
- package/resources/users/job_props.ts +992 -0
- package/resources/users/jobs.ts +171 -0
- package/resources/users/labels.ts +161 -0
- package/resources/users/props.ts +207 -0
- package/resources/users/users.ts +570 -0
- package/resources/vehicles/vehicles.ts +114 -0
- package/resources/wiki/access.ts +362 -0
- package/resources/wiki/activity.ts +591 -0
- package/resources/wiki/page.ts +548 -0
- package/services/auth/auth.client.ts +171 -0
- package/services/auth/auth.ts +1331 -0
- package/services/calendar/calendar.client.ts +262 -0
- package/services/calendar/calendar.ts +1733 -0
- package/services/centrum/centrum.client.ts +365 -0
- package/services/centrum/centrum.ts +2619 -0
- package/services/citizenstore/citizenstore.client.ts +126 -0
- package/services/citizenstore/citizenstore.ts +847 -0
- package/services/completor/completor.client.ts +109 -0
- package/services/completor/completor.ts +616 -0
- package/services/dmv/vehicles.client.ts +41 -0
- package/services/dmv/vehicles.ts +191 -0
- package/services/docstore/docstore.client.ts +653 -0
- package/services/docstore/docstore.ts +4571 -0
- package/services/internet/ads.client.ts +41 -0
- package/services/internet/ads.ts +145 -0
- package/services/internet/internet.client.ts +58 -0
- package/services/internet/internet.ts +257 -0
- package/services/jobs/conduct.client.ts +92 -0
- package/services/jobs/conduct.ts +541 -0
- package/services/jobs/jobs.client.ts +194 -0
- package/services/jobs/jobs.ts +1301 -0
- package/services/jobs/timeclock.client.ts +75 -0
- package/services/jobs/timeclock.ts +808 -0
- package/services/livemapper/livemap.client.ts +76 -0
- package/services/livemapper/livemap.ts +552 -0
- package/services/mailer/mailer.client.ts +381 -0
- package/services/mailer/mailer.ts +2590 -0
- package/services/notificator/notificator.client.ts +76 -0
- package/services/notificator/notificator.ts +510 -0
- package/services/qualifications/qualifications.client.ts +279 -0
- package/services/qualifications/qualifications.ts +2142 -0
- package/services/rector/config.client.ts +58 -0
- package/services/rector/config.ts +216 -0
- package/services/rector/filestore.client.ts +75 -0
- package/services/rector/filestore.ts +378 -0
- package/services/rector/laws.client.ts +92 -0
- package/services/rector/laws.ts +416 -0
- package/services/rector/rector.client.ts +211 -0
- package/services/rector/rector.ts +1540 -0
- package/services/stats/stats.client.ts +37 -0
- package/services/stats/stats.ts +128 -0
- package/services/sync/sync.client.ts +110 -0
- package/services/sync/sync.ts +831 -0
- package/services/wiki/wiki.client.ts +126 -0
- package/services/wiki/wiki.ts +749 -0
- package/svcs.ts +307 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
|
|
2
|
+
// @generated from protobuf file "resources/mailer/message.proto" (package "resources.mailer", 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 { Content } from "../common/content/content";
|
|
14
|
+
import { Timestamp } from "../timestamp/timestamp";
|
|
15
|
+
import { Email } from "./email";
|
|
16
|
+
/**
|
|
17
|
+
* @generated from protobuf message resources.mailer.Message
|
|
18
|
+
*/
|
|
19
|
+
export interface Message {
|
|
20
|
+
/**
|
|
21
|
+
* @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* @generated from protobuf field: uint64 thread_id = 2 [jstype = JS_STRING];
|
|
26
|
+
*/
|
|
27
|
+
threadId: string;
|
|
28
|
+
/**
|
|
29
|
+
* @generated from protobuf field: uint64 sender_id = 3 [jstype = JS_STRING];
|
|
30
|
+
*/
|
|
31
|
+
senderId: string;
|
|
32
|
+
/**
|
|
33
|
+
* @generated from protobuf field: optional resources.mailer.Email sender = 4;
|
|
34
|
+
*/
|
|
35
|
+
sender?: Email; // @gotags: alias:"sender"
|
|
36
|
+
/**
|
|
37
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 5;
|
|
38
|
+
*/
|
|
39
|
+
createdAt?: Timestamp;
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 6;
|
|
42
|
+
*/
|
|
43
|
+
updatedAt?: Timestamp;
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 7;
|
|
46
|
+
*/
|
|
47
|
+
deletedAt?: Timestamp;
|
|
48
|
+
/**
|
|
49
|
+
* @sanitize: method=StripTags
|
|
50
|
+
*
|
|
51
|
+
* @generated from protobuf field: string title = 8;
|
|
52
|
+
*/
|
|
53
|
+
title: string;
|
|
54
|
+
/**
|
|
55
|
+
* @sanitize
|
|
56
|
+
*
|
|
57
|
+
* @generated from protobuf field: resources.common.content.Content content = 9;
|
|
58
|
+
*/
|
|
59
|
+
content?: Content;
|
|
60
|
+
/**
|
|
61
|
+
* @generated from protobuf field: optional resources.mailer.MessageData data = 10;
|
|
62
|
+
*/
|
|
63
|
+
data?: MessageData;
|
|
64
|
+
/**
|
|
65
|
+
* @generated from protobuf field: optional int32 creator_id = 11;
|
|
66
|
+
*/
|
|
67
|
+
creatorId?: number;
|
|
68
|
+
/**
|
|
69
|
+
* @generated from protobuf field: optional string creator_job = 12;
|
|
70
|
+
*/
|
|
71
|
+
creatorJob?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @generated from protobuf message resources.mailer.MessageData
|
|
75
|
+
*/
|
|
76
|
+
export interface MessageData {
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf field: repeated resources.mailer.MessageDataEntry entry = 1;
|
|
79
|
+
*/
|
|
80
|
+
entry: MessageDataEntry[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @generated from protobuf message resources.mailer.MessageDataEntry
|
|
84
|
+
*/
|
|
85
|
+
export interface MessageDataEntry {
|
|
86
|
+
}
|
|
87
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
88
|
+
class Message$Type extends MessageType<Message> {
|
|
89
|
+
constructor() {
|
|
90
|
+
super("resources.mailer.Message", [
|
|
91
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
92
|
+
{ no: 2, name: "thread_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
93
|
+
{ no: 3, name: "sender_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
94
|
+
{ no: 4, name: "sender", kind: "message", T: () => Email },
|
|
95
|
+
{ no: 5, name: "created_at", kind: "message", T: () => Timestamp },
|
|
96
|
+
{ no: 6, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
97
|
+
{ no: 7, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
98
|
+
{ no: 8, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "255" } } } },
|
|
99
|
+
{ no: 9, name: "content", kind: "message", T: () => Content },
|
|
100
|
+
{ no: 10, name: "data", kind: "message", T: () => MessageData },
|
|
101
|
+
{ no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
102
|
+
{ no: 12, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
103
|
+
]);
|
|
104
|
+
}
|
|
105
|
+
create(value?: PartialMessage<Message>): Message {
|
|
106
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
107
|
+
message.id = "0";
|
|
108
|
+
message.threadId = "0";
|
|
109
|
+
message.senderId = "0";
|
|
110
|
+
message.title = "";
|
|
111
|
+
if (value !== undefined)
|
|
112
|
+
reflectionMergePartial<Message>(this, message, value);
|
|
113
|
+
return message;
|
|
114
|
+
}
|
|
115
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Message): Message {
|
|
116
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
117
|
+
while (reader.pos < end) {
|
|
118
|
+
let [fieldNo, wireType] = reader.tag();
|
|
119
|
+
switch (fieldNo) {
|
|
120
|
+
case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
|
|
121
|
+
message.id = reader.uint64().toString();
|
|
122
|
+
break;
|
|
123
|
+
case /* uint64 thread_id = 2 [jstype = JS_STRING];*/ 2:
|
|
124
|
+
message.threadId = reader.uint64().toString();
|
|
125
|
+
break;
|
|
126
|
+
case /* uint64 sender_id = 3 [jstype = JS_STRING];*/ 3:
|
|
127
|
+
message.senderId = reader.uint64().toString();
|
|
128
|
+
break;
|
|
129
|
+
case /* optional resources.mailer.Email sender */ 4:
|
|
130
|
+
message.sender = Email.internalBinaryRead(reader, reader.uint32(), options, message.sender);
|
|
131
|
+
break;
|
|
132
|
+
case /* resources.timestamp.Timestamp created_at */ 5:
|
|
133
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
134
|
+
break;
|
|
135
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 6:
|
|
136
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
137
|
+
break;
|
|
138
|
+
case /* optional resources.timestamp.Timestamp deleted_at */ 7:
|
|
139
|
+
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
140
|
+
break;
|
|
141
|
+
case /* string title */ 8:
|
|
142
|
+
message.title = reader.string();
|
|
143
|
+
break;
|
|
144
|
+
case /* resources.common.content.Content content */ 9:
|
|
145
|
+
message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
|
|
146
|
+
break;
|
|
147
|
+
case /* optional resources.mailer.MessageData data */ 10:
|
|
148
|
+
message.data = MessageData.internalBinaryRead(reader, reader.uint32(), options, message.data);
|
|
149
|
+
break;
|
|
150
|
+
case /* optional int32 creator_id */ 11:
|
|
151
|
+
message.creatorId = reader.int32();
|
|
152
|
+
break;
|
|
153
|
+
case /* optional string creator_job */ 12:
|
|
154
|
+
message.creatorJob = reader.string();
|
|
155
|
+
break;
|
|
156
|
+
default:
|
|
157
|
+
let u = options.readUnknownField;
|
|
158
|
+
if (u === "throw")
|
|
159
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
160
|
+
let d = reader.skip(wireType);
|
|
161
|
+
if (u !== false)
|
|
162
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return message;
|
|
166
|
+
}
|
|
167
|
+
internalBinaryWrite(message: Message, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
168
|
+
/* uint64 id = 1 [jstype = JS_STRING]; */
|
|
169
|
+
if (message.id !== "0")
|
|
170
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
171
|
+
/* uint64 thread_id = 2 [jstype = JS_STRING]; */
|
|
172
|
+
if (message.threadId !== "0")
|
|
173
|
+
writer.tag(2, WireType.Varint).uint64(message.threadId);
|
|
174
|
+
/* uint64 sender_id = 3 [jstype = JS_STRING]; */
|
|
175
|
+
if (message.senderId !== "0")
|
|
176
|
+
writer.tag(3, WireType.Varint).uint64(message.senderId);
|
|
177
|
+
/* optional resources.mailer.Email sender = 4; */
|
|
178
|
+
if (message.sender)
|
|
179
|
+
Email.internalBinaryWrite(message.sender, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
180
|
+
/* resources.timestamp.Timestamp created_at = 5; */
|
|
181
|
+
if (message.createdAt)
|
|
182
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
183
|
+
/* optional resources.timestamp.Timestamp updated_at = 6; */
|
|
184
|
+
if (message.updatedAt)
|
|
185
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
186
|
+
/* optional resources.timestamp.Timestamp deleted_at = 7; */
|
|
187
|
+
if (message.deletedAt)
|
|
188
|
+
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
189
|
+
/* string title = 8; */
|
|
190
|
+
if (message.title !== "")
|
|
191
|
+
writer.tag(8, WireType.LengthDelimited).string(message.title);
|
|
192
|
+
/* resources.common.content.Content content = 9; */
|
|
193
|
+
if (message.content)
|
|
194
|
+
Content.internalBinaryWrite(message.content, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
195
|
+
/* optional resources.mailer.MessageData data = 10; */
|
|
196
|
+
if (message.data)
|
|
197
|
+
MessageData.internalBinaryWrite(message.data, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
198
|
+
/* optional int32 creator_id = 11; */
|
|
199
|
+
if (message.creatorId !== undefined)
|
|
200
|
+
writer.tag(11, WireType.Varint).int32(message.creatorId);
|
|
201
|
+
/* optional string creator_job = 12; */
|
|
202
|
+
if (message.creatorJob !== undefined)
|
|
203
|
+
writer.tag(12, WireType.LengthDelimited).string(message.creatorJob);
|
|
204
|
+
let u = options.writeUnknownFields;
|
|
205
|
+
if (u !== false)
|
|
206
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
207
|
+
return writer;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* @generated MessageType for protobuf message resources.mailer.Message
|
|
212
|
+
*/
|
|
213
|
+
export const Message = new Message$Type();
|
|
214
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
215
|
+
class MessageData$Type extends MessageType<MessageData> {
|
|
216
|
+
constructor() {
|
|
217
|
+
super("resources.mailer.MessageData", [
|
|
218
|
+
{ no: 1, name: "entry", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => MessageDataEntry, options: { "validate.rules": { repeated: { maxItems: "3" } } } }
|
|
219
|
+
]);
|
|
220
|
+
}
|
|
221
|
+
create(value?: PartialMessage<MessageData>): MessageData {
|
|
222
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
223
|
+
message.entry = [];
|
|
224
|
+
if (value !== undefined)
|
|
225
|
+
reflectionMergePartial<MessageData>(this, message, value);
|
|
226
|
+
return message;
|
|
227
|
+
}
|
|
228
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageData): MessageData {
|
|
229
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
230
|
+
while (reader.pos < end) {
|
|
231
|
+
let [fieldNo, wireType] = reader.tag();
|
|
232
|
+
switch (fieldNo) {
|
|
233
|
+
case /* repeated resources.mailer.MessageDataEntry entry */ 1:
|
|
234
|
+
message.entry.push(MessageDataEntry.internalBinaryRead(reader, reader.uint32(), options));
|
|
235
|
+
break;
|
|
236
|
+
default:
|
|
237
|
+
let u = options.readUnknownField;
|
|
238
|
+
if (u === "throw")
|
|
239
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
240
|
+
let d = reader.skip(wireType);
|
|
241
|
+
if (u !== false)
|
|
242
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return message;
|
|
246
|
+
}
|
|
247
|
+
internalBinaryWrite(message: MessageData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
248
|
+
/* repeated resources.mailer.MessageDataEntry entry = 1; */
|
|
249
|
+
for (let i = 0; i < message.entry.length; i++)
|
|
250
|
+
MessageDataEntry.internalBinaryWrite(message.entry[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
251
|
+
let u = options.writeUnknownFields;
|
|
252
|
+
if (u !== false)
|
|
253
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
254
|
+
return writer;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* @generated MessageType for protobuf message resources.mailer.MessageData
|
|
259
|
+
*/
|
|
260
|
+
export const MessageData = new MessageData$Type();
|
|
261
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
262
|
+
class MessageDataEntry$Type extends MessageType<MessageDataEntry> {
|
|
263
|
+
constructor() {
|
|
264
|
+
super("resources.mailer.MessageDataEntry", []);
|
|
265
|
+
}
|
|
266
|
+
create(value?: PartialMessage<MessageDataEntry>): MessageDataEntry {
|
|
267
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
268
|
+
if (value !== undefined)
|
|
269
|
+
reflectionMergePartial<MessageDataEntry>(this, message, value);
|
|
270
|
+
return message;
|
|
271
|
+
}
|
|
272
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageDataEntry): MessageDataEntry {
|
|
273
|
+
return target ?? this.create();
|
|
274
|
+
}
|
|
275
|
+
internalBinaryWrite(message: MessageDataEntry, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
276
|
+
let u = options.writeUnknownFields;
|
|
277
|
+
if (u !== false)
|
|
278
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
279
|
+
return writer;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* @generated MessageType for protobuf message resources.mailer.MessageDataEntry
|
|
284
|
+
*/
|
|
285
|
+
export const MessageDataEntry = new MessageDataEntry$Type();
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
|
|
2
|
+
// @generated from protobuf file "resources/mailer/settings.proto" (package "resources.mailer", 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
|
+
/**
|
|
14
|
+
* @generated from protobuf message resources.mailer.EmailSettings
|
|
15
|
+
*/
|
|
16
|
+
export interface EmailSettings {
|
|
17
|
+
/**
|
|
18
|
+
* @generated from protobuf field: uint64 email_id = 1 [jstype = JS_STRING];
|
|
19
|
+
*/
|
|
20
|
+
emailId: string;
|
|
21
|
+
/**
|
|
22
|
+
* @sanitize
|
|
23
|
+
*
|
|
24
|
+
* @generated from protobuf field: optional string signature = 2;
|
|
25
|
+
*/
|
|
26
|
+
signature?: string;
|
|
27
|
+
/**
|
|
28
|
+
* @sanitize: method=StripTags
|
|
29
|
+
*
|
|
30
|
+
* @generated from protobuf field: repeated string blocked_emails = 3;
|
|
31
|
+
*/
|
|
32
|
+
blockedEmails: string[];
|
|
33
|
+
}
|
|
34
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
35
|
+
class EmailSettings$Type extends MessageType<EmailSettings> {
|
|
36
|
+
constructor() {
|
|
37
|
+
super("resources.mailer.EmailSettings", [
|
|
38
|
+
{ no: 1, name: "email_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
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" } } } }
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
create(value?: PartialMessage<EmailSettings>): EmailSettings {
|
|
44
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
45
|
+
message.emailId = "0";
|
|
46
|
+
message.blockedEmails = [];
|
|
47
|
+
if (value !== undefined)
|
|
48
|
+
reflectionMergePartial<EmailSettings>(this, message, value);
|
|
49
|
+
return message;
|
|
50
|
+
}
|
|
51
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EmailSettings): EmailSettings {
|
|
52
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
53
|
+
while (reader.pos < end) {
|
|
54
|
+
let [fieldNo, wireType] = reader.tag();
|
|
55
|
+
switch (fieldNo) {
|
|
56
|
+
case /* uint64 email_id = 1 [jstype = JS_STRING];*/ 1:
|
|
57
|
+
message.emailId = reader.uint64().toString();
|
|
58
|
+
break;
|
|
59
|
+
case /* optional string signature */ 2:
|
|
60
|
+
message.signature = reader.string();
|
|
61
|
+
break;
|
|
62
|
+
case /* repeated string blocked_emails */ 3:
|
|
63
|
+
message.blockedEmails.push(reader.string());
|
|
64
|
+
break;
|
|
65
|
+
default:
|
|
66
|
+
let u = options.readUnknownField;
|
|
67
|
+
if (u === "throw")
|
|
68
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
69
|
+
let d = reader.skip(wireType);
|
|
70
|
+
if (u !== false)
|
|
71
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return message;
|
|
75
|
+
}
|
|
76
|
+
internalBinaryWrite(message: EmailSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
77
|
+
/* uint64 email_id = 1 [jstype = JS_STRING]; */
|
|
78
|
+
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);
|
|
83
|
+
/* repeated string blocked_emails = 3; */
|
|
84
|
+
for (let i = 0; i < message.blockedEmails.length; i++)
|
|
85
|
+
writer.tag(3, WireType.LengthDelimited).string(message.blockedEmails[i]);
|
|
86
|
+
let u = options.writeUnknownFields;
|
|
87
|
+
if (u !== false)
|
|
88
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
89
|
+
return writer;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* @generated MessageType for protobuf message resources.mailer.EmailSettings
|
|
94
|
+
*/
|
|
95
|
+
export const EmailSettings = new EmailSettings$Type();
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
|
|
2
|
+
// @generated from protobuf file "resources/mailer/template.proto" (package "resources.mailer", 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.mailer.Template
|
|
16
|
+
*/
|
|
17
|
+
export interface Template {
|
|
18
|
+
/**
|
|
19
|
+
* @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
/**
|
|
23
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 3;
|
|
24
|
+
*/
|
|
25
|
+
createdAt?: Timestamp;
|
|
26
|
+
/**
|
|
27
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 4;
|
|
28
|
+
*/
|
|
29
|
+
updatedAt?: Timestamp;
|
|
30
|
+
/**
|
|
31
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 5;
|
|
32
|
+
*/
|
|
33
|
+
deletedAt?: Timestamp;
|
|
34
|
+
/**
|
|
35
|
+
* @generated from protobuf field: uint64 email_id = 6 [jstype = JS_STRING];
|
|
36
|
+
*/
|
|
37
|
+
emailId: string;
|
|
38
|
+
/**
|
|
39
|
+
* @sanitize: method=StripTags
|
|
40
|
+
*
|
|
41
|
+
* @generated from protobuf field: string title = 7;
|
|
42
|
+
*/
|
|
43
|
+
title: string;
|
|
44
|
+
/**
|
|
45
|
+
* @sanitize
|
|
46
|
+
*
|
|
47
|
+
* @generated from protobuf field: string content = 8;
|
|
48
|
+
*/
|
|
49
|
+
content: string;
|
|
50
|
+
/**
|
|
51
|
+
* @generated from protobuf field: optional string creator_job = 9;
|
|
52
|
+
*/
|
|
53
|
+
creatorJob?: string;
|
|
54
|
+
/**
|
|
55
|
+
* @generated from protobuf field: optional int32 creator_id = 10;
|
|
56
|
+
*/
|
|
57
|
+
creatorId?: number;
|
|
58
|
+
}
|
|
59
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
60
|
+
class Template$Type extends MessageType<Template> {
|
|
61
|
+
constructor() {
|
|
62
|
+
super("resources.mailer.Template", [
|
|
63
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
64
|
+
{ no: 3, name: "created_at", kind: "message", T: () => Timestamp },
|
|
65
|
+
{ no: 4, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
66
|
+
{ no: 5, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
67
|
+
{ no: 6, name: "email_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
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 } } } }
|
|
72
|
+
]);
|
|
73
|
+
}
|
|
74
|
+
create(value?: PartialMessage<Template>): Template {
|
|
75
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
76
|
+
message.id = "0";
|
|
77
|
+
message.emailId = "0";
|
|
78
|
+
message.title = "";
|
|
79
|
+
message.content = "";
|
|
80
|
+
if (value !== undefined)
|
|
81
|
+
reflectionMergePartial<Template>(this, message, value);
|
|
82
|
+
return message;
|
|
83
|
+
}
|
|
84
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Template): Template {
|
|
85
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
86
|
+
while (reader.pos < end) {
|
|
87
|
+
let [fieldNo, wireType] = reader.tag();
|
|
88
|
+
switch (fieldNo) {
|
|
89
|
+
case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
|
|
90
|
+
message.id = reader.uint64().toString();
|
|
91
|
+
break;
|
|
92
|
+
case /* resources.timestamp.Timestamp created_at */ 3:
|
|
93
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
94
|
+
break;
|
|
95
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 4:
|
|
96
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
97
|
+
break;
|
|
98
|
+
case /* optional resources.timestamp.Timestamp deleted_at */ 5:
|
|
99
|
+
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
100
|
+
break;
|
|
101
|
+
case /* uint64 email_id = 6 [jstype = JS_STRING];*/ 6:
|
|
102
|
+
message.emailId = reader.uint64().toString();
|
|
103
|
+
break;
|
|
104
|
+
case /* string title */ 7:
|
|
105
|
+
message.title = reader.string();
|
|
106
|
+
break;
|
|
107
|
+
case /* string content */ 8:
|
|
108
|
+
message.content = reader.string();
|
|
109
|
+
break;
|
|
110
|
+
case /* optional string creator_job */ 9:
|
|
111
|
+
message.creatorJob = reader.string();
|
|
112
|
+
break;
|
|
113
|
+
case /* optional int32 creator_id */ 10:
|
|
114
|
+
message.creatorId = reader.int32();
|
|
115
|
+
break;
|
|
116
|
+
default:
|
|
117
|
+
let u = options.readUnknownField;
|
|
118
|
+
if (u === "throw")
|
|
119
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
120
|
+
let d = reader.skip(wireType);
|
|
121
|
+
if (u !== false)
|
|
122
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return message;
|
|
126
|
+
}
|
|
127
|
+
internalBinaryWrite(message: Template, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
128
|
+
/* uint64 id = 1 [jstype = JS_STRING]; */
|
|
129
|
+
if (message.id !== "0")
|
|
130
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
131
|
+
/* resources.timestamp.Timestamp created_at = 3; */
|
|
132
|
+
if (message.createdAt)
|
|
133
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
134
|
+
/* optional resources.timestamp.Timestamp updated_at = 4; */
|
|
135
|
+
if (message.updatedAt)
|
|
136
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
137
|
+
/* optional resources.timestamp.Timestamp deleted_at = 5; */
|
|
138
|
+
if (message.deletedAt)
|
|
139
|
+
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
140
|
+
/* uint64 email_id = 6 [jstype = JS_STRING]; */
|
|
141
|
+
if (message.emailId !== "0")
|
|
142
|
+
writer.tag(6, WireType.Varint).uint64(message.emailId);
|
|
143
|
+
/* string title = 7; */
|
|
144
|
+
if (message.title !== "")
|
|
145
|
+
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);
|
|
149
|
+
/* optional string creator_job = 9; */
|
|
150
|
+
if (message.creatorJob !== undefined)
|
|
151
|
+
writer.tag(9, WireType.LengthDelimited).string(message.creatorJob);
|
|
152
|
+
/* optional int32 creator_id = 10; */
|
|
153
|
+
if (message.creatorId !== undefined)
|
|
154
|
+
writer.tag(10, WireType.Varint).int32(message.creatorId);
|
|
155
|
+
let u = options.writeUnknownFields;
|
|
156
|
+
if (u !== false)
|
|
157
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
158
|
+
return writer;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* @generated MessageType for protobuf message resources.mailer.Template
|
|
163
|
+
*/
|
|
164
|
+
export const Template = new Template$Type();
|