@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.
- package/buf/validate/validate.ts +11301 -0
- package/clients.ts +157 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +208 -0
- package/codegen/sanitizer/sanitizer.ts +80 -0
- package/google/protobuf/any.ts +4 -3
- package/google/protobuf/descriptor.ts +393 -239
- package/google/protobuf/duration.ts +4 -3
- package/google/protobuf/struct.ts +485 -0
- package/google/protobuf/timestamp.ts +4 -3
- package/package.json +3 -3
- package/perms.ts +85 -159
- package/resources/accounts/accounts.ts +26 -25
- package/resources/accounts/oauth2.ts +30 -29
- package/resources/audit/audit.ts +36 -35
- package/resources/calendar/access.ts +49 -48
- package/resources/calendar/calendar.ts +122 -126
- package/resources/centrum/access.ts +345 -0
- package/resources/centrum/attributes.ts +8 -11
- package/resources/centrum/dispatchers.ts +149 -0
- package/resources/centrum/dispatches.ts +252 -115
- package/resources/centrum/settings.ts +384 -34
- package/resources/centrum/units.ts +112 -92
- package/resources/centrum/units_access.ts +54 -55
- package/resources/clientconfig/clientconfig.ts +890 -0
- package/resources/collab/collab.ts +817 -0
- package/resources/common/content/content.ts +113 -30
- package/resources/common/cron/cron.ts +43 -31
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- package/resources/common/grpcws/grpcws.ts +24 -23
- package/resources/common/i18n.ts +20 -24
- package/resources/common/id_mapping.ts +69 -0
- package/resources/common/tests/objects.ts +4 -3
- package/resources/common/uuid.ts +4 -3
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/access.ts +52 -53
- package/resources/documents/activity.ts +235 -58
- package/resources/documents/category.ts +20 -27
- package/resources/documents/comment.ts +26 -25
- package/resources/documents/documents.ts +335 -262
- package/resources/documents/pins.ts +127 -0
- package/resources/documents/requests.ts +31 -30
- package/resources/documents/signoff.ts +55 -0
- package/resources/documents/state.ts +69 -0
- package/resources/documents/templates.ts +119 -136
- package/resources/documents/workflow.ts +35 -24
- package/resources/file/file.ts +152 -0
- package/{services/settings → resources/file}/filestore.ts +179 -165
- package/resources/file/meta.ts +148 -0
- package/resources/jobs/activity.ts +39 -42
- package/resources/jobs/colleagues.ts +67 -60
- package/resources/jobs/conduct.ts +29 -30
- package/resources/jobs/job_props.ts +46 -48
- package/resources/jobs/job_settings.ts +45 -52
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/labels.ts +21 -22
- package/resources/jobs/timeclock.ts +26 -25
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → marker_marker.ts} +43 -310
- package/resources/livemap/user_marker.ts +298 -0
- package/resources/mailer/access.ts +75 -74
- package/resources/mailer/email.ts +24 -27
- package/resources/mailer/events.ts +25 -24
- package/resources/mailer/message.ts +45 -50
- package/resources/mailer/settings.ts +12 -15
- package/resources/mailer/template.ts +25 -28
- package/resources/mailer/thread.ts +70 -71
- package/resources/notifications/client_view.ts +239 -0
- package/resources/notifications/events.ts +50 -101
- package/resources/notifications/notifications.ts +52 -57
- package/resources/permissions/attributes.ts +63 -206
- package/resources/permissions/events.ts +149 -0
- package/resources/permissions/permissions.ts +103 -34
- package/resources/qualifications/access.ts +27 -26
- package/resources/qualifications/exam.ts +188 -126
- package/resources/qualifications/qualifications.ts +370 -303
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +163 -79
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +3 -2
- package/resources/sync/activity.ts +24 -23
- package/resources/sync/data.ts +94 -26
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/user_info.ts +464 -0
- package/resources/users/activity.ts +80 -85
- package/resources/users/labels.ts +18 -21
- package/resources/users/licenses.ts +9 -8
- package/resources/users/props.ts +61 -51
- package/resources/users/users.ts +100 -78
- package/resources/vehicles/activity.ts +231 -0
- package/resources/vehicles/props.ts +103 -0
- package/resources/vehicles/vehicles.ts +28 -15
- package/resources/wiki/access.ts +49 -48
- package/resources/wiki/activity.ts +133 -51
- package/resources/wiki/page.ts +134 -87
- package/services/auth/auth.client.ts +24 -27
- package/services/auth/auth.ts +222 -195
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +110 -109
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +701 -298
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +183 -93
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +65 -44
- package/services/documents/collab.client.ts +46 -0
- package/services/documents/collab.ts +13 -0
- package/services/documents/documents.client.ts +88 -217
- package/services/documents/documents.ts +490 -508
- package/services/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +10 -25
- package/services/jobs/conduct.ts +36 -35
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +108 -91
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +47 -46
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +290 -119
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +213 -216
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +117 -74
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +181 -175
- package/services/settings/accounts.client.ts +10 -25
- package/services/settings/accounts.ts +64 -41
- package/services/settings/config.client.ts +6 -13
- package/services/settings/config.ts +8 -7
- package/services/settings/cron.client.ts +4 -7
- package/services/settings/cron.ts +4 -3
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +29 -28
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +190 -607
- package/services/settings/system.client.ts +90 -0
- package/services/settings/system.ts +618 -0
- package/services/stats/stats.client.ts +4 -3
- package/services/stats/stats.ts +4 -3
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +82 -52
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +169 -24
- package/services/wiki/collab.client.ts +46 -0
- package/services/wiki/collab.ts +13 -0
- package/services/wiki/wiki.client.ts +28 -37
- package/services/wiki/wiki.ts +93 -63
- package/svcs.ts +79 -103
- package/resources/centrum/disponents.ts +0 -81
- package/resources/filestore/file.ts +0 -204
- package/resources/internet/access.ts +0 -358
- package/resources/internet/ads.ts +0 -257
- package/resources/internet/domain.ts +0 -328
- package/resources/internet/page.ts +0 -428
- package/resources/internet/search.ts +0 -128
- package/resources/livemap/tracker.ts +0 -81
- package/services/internet/ads.client.ts +0 -41
- package/services/internet/ads.ts +0 -145
- package/services/internet/domain.client.ts +0 -109
- package/services/internet/domain.ts +0 -658
- package/services/internet/internet.client.ts +0 -58
- package/services/internet/internet.ts +0 -268
- package/services/notificator/notificator.client.ts +0 -76
- package/services/settings/filestore.client.ts +0 -75
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.
|
|
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/mailer/template.proto" (package "resources.mailer", 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,39 @@ import { Timestamp } from "../timestamp/timestamp";
|
|
|
16
17
|
*/
|
|
17
18
|
export interface Template {
|
|
18
19
|
/**
|
|
19
|
-
* @generated from protobuf field:
|
|
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 = 3
|
|
24
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 3
|
|
24
25
|
*/
|
|
25
26
|
createdAt?: Timestamp;
|
|
26
27
|
/**
|
|
27
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 4
|
|
28
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 4
|
|
28
29
|
*/
|
|
29
30
|
updatedAt?: Timestamp;
|
|
30
31
|
/**
|
|
31
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 5
|
|
32
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 5
|
|
32
33
|
*/
|
|
33
34
|
deletedAt?: Timestamp;
|
|
34
35
|
/**
|
|
35
|
-
* @generated from protobuf field:
|
|
36
|
+
* @generated from protobuf field: int64 email_id = 6
|
|
36
37
|
*/
|
|
37
38
|
emailId: number;
|
|
38
39
|
/**
|
|
39
|
-
* @
|
|
40
|
-
*
|
|
41
|
-
* @generated from protobuf field: string title = 7;
|
|
40
|
+
* @generated from protobuf field: string title = 7
|
|
42
41
|
*/
|
|
43
42
|
title: string;
|
|
44
43
|
/**
|
|
45
|
-
* @
|
|
46
|
-
*
|
|
47
|
-
* @generated from protobuf field: string content = 8;
|
|
44
|
+
* @generated from protobuf field: string content = 8
|
|
48
45
|
*/
|
|
49
46
|
content: string;
|
|
50
47
|
/**
|
|
51
|
-
* @generated from protobuf field: optional string creator_job = 9
|
|
48
|
+
* @generated from protobuf field: optional string creator_job = 9
|
|
52
49
|
*/
|
|
53
50
|
creatorJob?: string;
|
|
54
51
|
/**
|
|
55
|
-
* @generated from protobuf field: optional int32 creator_id = 10
|
|
52
|
+
* @generated from protobuf field: optional int32 creator_id = 10
|
|
56
53
|
*/
|
|
57
54
|
creatorId?: number;
|
|
58
55
|
}
|
|
@@ -60,15 +57,15 @@ export interface Template {
|
|
|
60
57
|
class Template$Type extends MessageType<Template> {
|
|
61
58
|
constructor() {
|
|
62
59
|
super("resources.mailer.Template", [
|
|
63
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
60
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
64
61
|
{ no: 3, name: "created_at", kind: "message", T: () => Timestamp },
|
|
65
62
|
{ no: 4, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
66
63
|
{ no: 5, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
67
|
-
{ no: 6, name: "email_id", kind: "scalar", T:
|
|
68
|
-
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
69
|
-
{ no: 8, name: "content", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
70
|
-
{ no: 9, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
71
|
-
{ no: 10, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
64
|
+
{ no: 6, name: "email_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
65
|
+
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
66
|
+
{ no: 8, name: "content", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "10240" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
67
|
+
{ no: 9, name: "creator_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "40" } } } },
|
|
68
|
+
{ no: 10, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } }
|
|
72
69
|
]);
|
|
73
70
|
}
|
|
74
71
|
create(value?: PartialMessage<Template>): Template {
|
|
@@ -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 /*
|
|
90
|
-
message.id = reader.
|
|
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,8 +95,8 @@ 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 /*
|
|
102
|
-
message.emailId = reader.
|
|
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();
|
|
@@ -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
|
-
/*
|
|
125
|
+
/* int64 id = 1; */
|
|
129
126
|
if (message.id !== 0)
|
|
130
|
-
writer.tag(1, WireType.Varint).
|
|
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,9 +134,9 @@ 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
|
-
/*
|
|
137
|
+
/* int64 email_id = 6; */
|
|
141
138
|
if (message.emailId !== 0)
|
|
142
|
-
writer.tag(6, WireType.Varint).
|
|
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);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.
|
|
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/mailer/thread.proto" (package "resources.mailer", 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";
|
|
@@ -18,74 +19,72 @@ import { Timestamp } from "../timestamp/timestamp";
|
|
|
18
19
|
*/
|
|
19
20
|
export interface Thread {
|
|
20
21
|
/**
|
|
21
|
-
* @generated from protobuf field:
|
|
22
|
+
* @generated from protobuf field: int64 id = 1
|
|
22
23
|
*/
|
|
23
24
|
id: number;
|
|
24
25
|
/**
|
|
25
|
-
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
26
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
26
27
|
*/
|
|
27
28
|
createdAt?: Timestamp;
|
|
28
29
|
/**
|
|
29
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
30
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
30
31
|
*/
|
|
31
32
|
updatedAt?: Timestamp;
|
|
32
33
|
/**
|
|
33
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
34
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
34
35
|
*/
|
|
35
36
|
deletedAt?: Timestamp;
|
|
36
37
|
/**
|
|
37
|
-
* @generated from protobuf field:
|
|
38
|
+
* @generated from protobuf field: int64 creator_email_id = 5
|
|
38
39
|
*/
|
|
39
40
|
creatorEmailId: number;
|
|
40
41
|
/**
|
|
41
|
-
* @generated from protobuf field: optional resources.mailer.Email creator_email = 6
|
|
42
|
+
* @generated from protobuf field: optional resources.mailer.Email creator_email = 6
|
|
42
43
|
*/
|
|
43
44
|
creatorEmail?: Email;
|
|
44
45
|
/**
|
|
45
|
-
* @generated from protobuf field: optional int32 creator_id = 7
|
|
46
|
+
* @generated from protobuf field: optional int32 creator_id = 7
|
|
46
47
|
*/
|
|
47
48
|
creatorId?: number;
|
|
48
49
|
/**
|
|
49
|
-
* @generated from protobuf field: optional resources.users.UserShort creator = 8
|
|
50
|
+
* @generated from protobuf field: optional resources.users.UserShort creator = 8
|
|
50
51
|
*/
|
|
51
|
-
creator?: UserShort;
|
|
52
|
+
creator?: UserShort;
|
|
52
53
|
/**
|
|
53
|
-
* @
|
|
54
|
-
*
|
|
55
|
-
* @generated from protobuf field: string title = 9;
|
|
54
|
+
* @generated from protobuf field: string title = 9
|
|
56
55
|
*/
|
|
57
56
|
title: string;
|
|
58
57
|
/**
|
|
59
|
-
* @generated from protobuf field: repeated resources.mailer.ThreadRecipientEmail recipients = 10
|
|
58
|
+
* @generated from protobuf field: repeated resources.mailer.ThreadRecipientEmail recipients = 10
|
|
60
59
|
*/
|
|
61
60
|
recipients: ThreadRecipientEmail[];
|
|
62
61
|
/**
|
|
63
|
-
* @generated from protobuf field: optional resources.mailer.ThreadState state = 11
|
|
62
|
+
* @generated from protobuf field: optional resources.mailer.ThreadState state = 11
|
|
64
63
|
*/
|
|
65
|
-
state?: ThreadState;
|
|
64
|
+
state?: ThreadState;
|
|
66
65
|
}
|
|
67
66
|
/**
|
|
68
67
|
* @generated from protobuf message resources.mailer.ThreadRecipientEmail
|
|
69
68
|
*/
|
|
70
69
|
export interface ThreadRecipientEmail {
|
|
71
70
|
/**
|
|
72
|
-
* @generated from protobuf field:
|
|
71
|
+
* @generated from protobuf field: int64 id = 1
|
|
73
72
|
*/
|
|
74
|
-
id: number;
|
|
73
|
+
id: number;
|
|
75
74
|
/**
|
|
76
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
75
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
77
76
|
*/
|
|
78
77
|
createdAt?: Timestamp;
|
|
79
78
|
/**
|
|
80
|
-
* @generated from protobuf field:
|
|
79
|
+
* @generated from protobuf field: int64 target_id = 4
|
|
81
80
|
*/
|
|
82
|
-
targetId: number;
|
|
81
|
+
targetId: number;
|
|
83
82
|
/**
|
|
84
|
-
* @generated from protobuf field:
|
|
83
|
+
* @generated from protobuf field: int64 email_id = 5
|
|
85
84
|
*/
|
|
86
85
|
emailId: number;
|
|
87
86
|
/**
|
|
88
|
-
* @generated from protobuf field: optional resources.mailer.Email email = 6
|
|
87
|
+
* @generated from protobuf field: optional resources.mailer.Email email = 6
|
|
89
88
|
*/
|
|
90
89
|
email?: Email;
|
|
91
90
|
}
|
|
@@ -94,35 +93,35 @@ export interface ThreadRecipientEmail {
|
|
|
94
93
|
*/
|
|
95
94
|
export interface ThreadState {
|
|
96
95
|
/**
|
|
97
|
-
* @generated from protobuf field:
|
|
96
|
+
* @generated from protobuf field: int64 thread_id = 1
|
|
98
97
|
*/
|
|
99
98
|
threadId: number;
|
|
100
99
|
/**
|
|
101
|
-
* @generated from protobuf field:
|
|
100
|
+
* @generated from protobuf field: int64 email_id = 2
|
|
102
101
|
*/
|
|
103
102
|
emailId: number;
|
|
104
103
|
/**
|
|
105
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp last_read = 3
|
|
104
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp last_read = 3
|
|
106
105
|
*/
|
|
107
106
|
lastRead?: Timestamp;
|
|
108
107
|
/**
|
|
109
|
-
* @generated from protobuf field: optional bool unread = 4
|
|
108
|
+
* @generated from protobuf field: optional bool unread = 4
|
|
110
109
|
*/
|
|
111
110
|
unread?: boolean;
|
|
112
111
|
/**
|
|
113
|
-
* @generated from protobuf field: optional bool important = 5
|
|
112
|
+
* @generated from protobuf field: optional bool important = 5
|
|
114
113
|
*/
|
|
115
114
|
important?: boolean;
|
|
116
115
|
/**
|
|
117
|
-
* @generated from protobuf field: optional bool favorite = 6
|
|
116
|
+
* @generated from protobuf field: optional bool favorite = 6
|
|
118
117
|
*/
|
|
119
118
|
favorite?: boolean;
|
|
120
119
|
/**
|
|
121
|
-
* @generated from protobuf field: optional bool muted = 7
|
|
120
|
+
* @generated from protobuf field: optional bool muted = 7
|
|
122
121
|
*/
|
|
123
122
|
muted?: boolean;
|
|
124
123
|
/**
|
|
125
|
-
* @generated from protobuf field: optional bool archived = 8
|
|
124
|
+
* @generated from protobuf field: optional bool archived = 8
|
|
126
125
|
*/
|
|
127
126
|
archived?: boolean;
|
|
128
127
|
}
|
|
@@ -130,17 +129,17 @@ export interface ThreadState {
|
|
|
130
129
|
class Thread$Type extends MessageType<Thread> {
|
|
131
130
|
constructor() {
|
|
132
131
|
super("resources.mailer.Thread", [
|
|
133
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
132
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
134
133
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
135
134
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
136
135
|
{ no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
137
|
-
{ no: 5, name: "creator_email_id", kind: "scalar", T:
|
|
136
|
+
{ no: 5, name: "creator_email_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
138
137
|
{ no: 6, name: "creator_email", kind: "message", T: () => Email },
|
|
139
|
-
{ no: 7, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
140
|
-
{ no: 8, name: "creator", kind: "message", T: () => UserShort },
|
|
141
|
-
{ no: 9, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
142
|
-
{ no: 10, name: "recipients", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ThreadRecipientEmail, options: { "validate.
|
|
143
|
-
{ no: 11, name: "state", kind: "message", T: () => ThreadState }
|
|
138
|
+
{ no: 7, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
139
|
+
{ no: 8, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
|
|
140
|
+
{ no: 9, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
141
|
+
{ no: 10, name: "recipients", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ThreadRecipientEmail, options: { "buf.validate.field": { repeated: { maxItems: "20" } } } },
|
|
142
|
+
{ no: 11, name: "state", kind: "message", T: () => ThreadState, options: { "tagger.tags": "alias:\"thread_state\"" } }
|
|
144
143
|
]);
|
|
145
144
|
}
|
|
146
145
|
create(value?: PartialMessage<Thread>): Thread {
|
|
@@ -158,8 +157,8 @@ class Thread$Type extends MessageType<Thread> {
|
|
|
158
157
|
while (reader.pos < end) {
|
|
159
158
|
let [fieldNo, wireType] = reader.tag();
|
|
160
159
|
switch (fieldNo) {
|
|
161
|
-
case /*
|
|
162
|
-
message.id = reader.
|
|
160
|
+
case /* int64 id */ 1:
|
|
161
|
+
message.id = reader.int64().toNumber();
|
|
163
162
|
break;
|
|
164
163
|
case /* resources.timestamp.Timestamp created_at */ 2:
|
|
165
164
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -170,8 +169,8 @@ class Thread$Type extends MessageType<Thread> {
|
|
|
170
169
|
case /* optional resources.timestamp.Timestamp deleted_at */ 4:
|
|
171
170
|
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
172
171
|
break;
|
|
173
|
-
case /*
|
|
174
|
-
message.creatorEmailId = reader.
|
|
172
|
+
case /* int64 creator_email_id */ 5:
|
|
173
|
+
message.creatorEmailId = reader.int64().toNumber();
|
|
175
174
|
break;
|
|
176
175
|
case /* optional resources.mailer.Email creator_email */ 6:
|
|
177
176
|
message.creatorEmail = Email.internalBinaryRead(reader, reader.uint32(), options, message.creatorEmail);
|
|
@@ -203,9 +202,9 @@ class Thread$Type extends MessageType<Thread> {
|
|
|
203
202
|
return message;
|
|
204
203
|
}
|
|
205
204
|
internalBinaryWrite(message: Thread, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
206
|
-
/*
|
|
205
|
+
/* int64 id = 1; */
|
|
207
206
|
if (message.id !== 0)
|
|
208
|
-
writer.tag(1, WireType.Varint).
|
|
207
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
209
208
|
/* resources.timestamp.Timestamp created_at = 2; */
|
|
210
209
|
if (message.createdAt)
|
|
211
210
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -215,9 +214,9 @@ class Thread$Type extends MessageType<Thread> {
|
|
|
215
214
|
/* optional resources.timestamp.Timestamp deleted_at = 4; */
|
|
216
215
|
if (message.deletedAt)
|
|
217
216
|
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
218
|
-
/*
|
|
217
|
+
/* int64 creator_email_id = 5; */
|
|
219
218
|
if (message.creatorEmailId !== 0)
|
|
220
|
-
writer.tag(5, WireType.Varint).
|
|
219
|
+
writer.tag(5, WireType.Varint).int64(message.creatorEmailId);
|
|
221
220
|
/* optional resources.mailer.Email creator_email = 6; */
|
|
222
221
|
if (message.creatorEmail)
|
|
223
222
|
Email.internalBinaryWrite(message.creatorEmail, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -250,10 +249,10 @@ export const Thread = new Thread$Type();
|
|
|
250
249
|
class ThreadRecipientEmail$Type extends MessageType<ThreadRecipientEmail> {
|
|
251
250
|
constructor() {
|
|
252
251
|
super("resources.mailer.ThreadRecipientEmail", [
|
|
253
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
252
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
|
|
254
253
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
255
|
-
{ no: 4, name: "target_id", kind: "scalar", T:
|
|
256
|
-
{ no: 5, name: "email_id", kind: "scalar", T:
|
|
254
|
+
{ no: 4, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "alias:\"thread_id\"" } },
|
|
255
|
+
{ no: 5, name: "email_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
257
256
|
{ no: 6, name: "email", kind: "message", T: () => Email }
|
|
258
257
|
]);
|
|
259
258
|
}
|
|
@@ -271,17 +270,17 @@ class ThreadRecipientEmail$Type extends MessageType<ThreadRecipientEmail> {
|
|
|
271
270
|
while (reader.pos < end) {
|
|
272
271
|
let [fieldNo, wireType] = reader.tag();
|
|
273
272
|
switch (fieldNo) {
|
|
274
|
-
case /*
|
|
275
|
-
message.id = reader.
|
|
273
|
+
case /* int64 id */ 1:
|
|
274
|
+
message.id = reader.int64().toNumber();
|
|
276
275
|
break;
|
|
277
276
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
278
277
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
279
278
|
break;
|
|
280
|
-
case /*
|
|
281
|
-
message.targetId = reader.
|
|
279
|
+
case /* int64 target_id */ 4:
|
|
280
|
+
message.targetId = reader.int64().toNumber();
|
|
282
281
|
break;
|
|
283
|
-
case /*
|
|
284
|
-
message.emailId = reader.
|
|
282
|
+
case /* int64 email_id */ 5:
|
|
283
|
+
message.emailId = reader.int64().toNumber();
|
|
285
284
|
break;
|
|
286
285
|
case /* optional resources.mailer.Email email */ 6:
|
|
287
286
|
message.email = Email.internalBinaryRead(reader, reader.uint32(), options, message.email);
|
|
@@ -298,18 +297,18 @@ class ThreadRecipientEmail$Type extends MessageType<ThreadRecipientEmail> {
|
|
|
298
297
|
return message;
|
|
299
298
|
}
|
|
300
299
|
internalBinaryWrite(message: ThreadRecipientEmail, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
301
|
-
/*
|
|
300
|
+
/* int64 id = 1; */
|
|
302
301
|
if (message.id !== 0)
|
|
303
|
-
writer.tag(1, WireType.Varint).
|
|
302
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
304
303
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
305
304
|
if (message.createdAt)
|
|
306
305
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
307
|
-
/*
|
|
306
|
+
/* int64 target_id = 4; */
|
|
308
307
|
if (message.targetId !== 0)
|
|
309
|
-
writer.tag(4, WireType.Varint).
|
|
310
|
-
/*
|
|
308
|
+
writer.tag(4, WireType.Varint).int64(message.targetId);
|
|
309
|
+
/* int64 email_id = 5; */
|
|
311
310
|
if (message.emailId !== 0)
|
|
312
|
-
writer.tag(5, WireType.Varint).
|
|
311
|
+
writer.tag(5, WireType.Varint).int64(message.emailId);
|
|
313
312
|
/* optional resources.mailer.Email email = 6; */
|
|
314
313
|
if (message.email)
|
|
315
314
|
Email.internalBinaryWrite(message.email, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -327,8 +326,8 @@ export const ThreadRecipientEmail = new ThreadRecipientEmail$Type();
|
|
|
327
326
|
class ThreadState$Type extends MessageType<ThreadState> {
|
|
328
327
|
constructor() {
|
|
329
328
|
super("resources.mailer.ThreadState", [
|
|
330
|
-
{ no: 1, name: "thread_id", kind: "scalar", T:
|
|
331
|
-
{ no: 2, name: "email_id", kind: "scalar", T:
|
|
329
|
+
{ no: 1, name: "thread_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
330
|
+
{ no: 2, name: "email_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
332
331
|
{ no: 3, name: "last_read", kind: "message", T: () => Timestamp },
|
|
333
332
|
{ no: 4, name: "unread", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
334
333
|
{ no: 5, name: "important", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
@@ -350,11 +349,11 @@ class ThreadState$Type extends MessageType<ThreadState> {
|
|
|
350
349
|
while (reader.pos < end) {
|
|
351
350
|
let [fieldNo, wireType] = reader.tag();
|
|
352
351
|
switch (fieldNo) {
|
|
353
|
-
case /*
|
|
354
|
-
message.threadId = reader.
|
|
352
|
+
case /* int64 thread_id */ 1:
|
|
353
|
+
message.threadId = reader.int64().toNumber();
|
|
355
354
|
break;
|
|
356
|
-
case /*
|
|
357
|
-
message.emailId = reader.
|
|
355
|
+
case /* int64 email_id */ 2:
|
|
356
|
+
message.emailId = reader.int64().toNumber();
|
|
358
357
|
break;
|
|
359
358
|
case /* optional resources.timestamp.Timestamp last_read */ 3:
|
|
360
359
|
message.lastRead = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastRead);
|
|
@@ -386,12 +385,12 @@ class ThreadState$Type extends MessageType<ThreadState> {
|
|
|
386
385
|
return message;
|
|
387
386
|
}
|
|
388
387
|
internalBinaryWrite(message: ThreadState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
389
|
-
/*
|
|
388
|
+
/* int64 thread_id = 1; */
|
|
390
389
|
if (message.threadId !== 0)
|
|
391
|
-
writer.tag(1, WireType.Varint).
|
|
392
|
-
/*
|
|
390
|
+
writer.tag(1, WireType.Varint).int64(message.threadId);
|
|
391
|
+
/* int64 email_id = 2; */
|
|
393
392
|
if (message.emailId !== 0)
|
|
394
|
-
writer.tag(2, WireType.Varint).
|
|
393
|
+
writer.tag(2, WireType.Varint).int64(message.emailId);
|
|
395
394
|
/* optional resources.timestamp.Timestamp last_read = 3; */
|
|
396
395
|
if (message.lastRead)
|
|
397
396
|
Timestamp.internalBinaryWrite(message.lastRead, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|