@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.
- package/README.md +1 -1
- package/buf/validate/validate.ts +11301 -0
- package/clients.ts +193 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +287 -0
- package/codegen/sanitizer/sanitizer.ts +113 -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 +217 -160
- package/resources/accounts/accounts.ts +115 -47
- package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +33 -32
- package/resources/audit/audit.ts +172 -53
- package/resources/calendar/{access.ts → access/access.ts} +72 -71
- package/resources/calendar/calendar.ts +79 -543
- package/resources/calendar/entries/entries.ts +474 -0
- package/resources/centrum/access/access.ts +345 -0
- package/resources/centrum/dispatchers/dispatchers.ts +149 -0
- package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +267 -164
- package/resources/centrum/joblist.ts +136 -0
- package/resources/centrum/settings/settings.ts +657 -0
- package/resources/centrum/{units_access.ts → units/access/access.ts} +78 -79
- package/resources/centrum/{units.ts → units/units.ts} +230 -130
- package/resources/clientconfig/clientconfig.ts +1015 -0
- package/resources/collab/collab.ts +805 -0
- package/resources/common/content/content.ts +169 -63
- package/resources/common/content/diff_activity.ts +267 -0
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- 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/cron → cron}/cron.ts +77 -65
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/{access.ts → access/access.ts} +75 -76
- package/resources/documents/{activity.ts → activity/activity.ts} +349 -124
- package/resources/documents/approval/approval.ts +945 -0
- package/resources/documents/{category.ts → category/category.ts} +25 -32
- package/resources/documents/{comment.ts → comment/comment.ts} +35 -34
- package/resources/documents/data/data.ts +303 -0
- package/resources/documents/documents.ts +374 -686
- package/resources/{common/uuid.ts → documents/forms/forms.ts} +22 -21
- package/resources/documents/pins/pins.ts +127 -0
- package/resources/documents/references/references.ts +187 -0
- package/resources/documents/relations/relations.ts +184 -0
- package/resources/documents/{requests.ts → requests/requests.ts} +45 -44
- package/resources/documents/stamps/stamp.ts +355 -0
- package/resources/documents/{templates.ts → templates/templates.ts} +524 -199
- package/resources/documents/workflow/workflow.ts +600 -0
- 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/{common/grpcws → grpcws}/grpcws.ts +66 -65
- package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +83 -86
- package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +76 -80
- package/resources/jobs/{conduct.ts → conduct/conduct.ts} +86 -62
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/{labels.ts → labels/labels.ts} +36 -37
- package/resources/jobs/{job_props.ts → props/props.ts} +63 -65
- package/resources/jobs/{job_settings.ts → settings/settings.ts} +89 -96
- package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +42 -41
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → markers/marker_marker.ts} +68 -335
- package/resources/livemap/markers/user_marker.ts +377 -0
- package/resources/mailer/{access.ts → access/access.ts} +119 -118
- package/resources/mailer/{email.ts → emails/email.ts} +38 -41
- package/resources/mailer/{events.ts → events/events.ts} +44 -43
- package/resources/mailer/{message.ts → messages/message.ts} +69 -74
- package/resources/mailer/{settings.ts → settings/settings.ts} +23 -25
- package/resources/mailer/{template.ts → templates/template.ts} +37 -40
- package/resources/mailer/{thread.ts → threads/thread.ts} +93 -94
- package/resources/notifications/clientview/clientview.ts +239 -0
- package/resources/notifications/{events.ts → events/events.ts} +67 -130
- package/resources/notifications/notifications.ts +55 -60
- package/resources/permissions/{attributes.ts → attributes/attributes.ts} +94 -237
- package/resources/permissions/events/events.ts +149 -0
- package/resources/permissions/{permissions.ts → permissions/permissions.ts} +127 -47
- package/resources/qualifications/{access.ts → access/access.ts} +43 -42
- package/resources/qualifications/{exam.ts → exam/exam.ts} +419 -229
- package/resources/qualifications/qualifications.ts +327 -388
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +663 -79
- package/resources/settings/data.ts +90 -0
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +382 -2
- package/resources/sync/{activity.ts → activity/activity.ts} +126 -46
- package/resources/sync/data/data.ts +1001 -0
- package/resources/sync/data/v2/data.ts +220 -0
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/userinfo.ts +442 -0
- package/resources/users/{activity.ts → activity/activity.ts} +182 -166
- package/resources/users/{labels.ts → labels/labels.ts} +27 -30
- package/resources/users/{licenses.ts → licenses/licenses.ts} +18 -17
- package/resources/users/{props.ts → props/props.ts} +109 -77
- package/resources/users/short/user.ts +184 -0
- package/resources/users/user.ts +528 -0
- package/resources/vehicles/activity/activity.ts +231 -0
- package/resources/vehicles/props/props.ts +125 -0
- package/resources/vehicles/vehicles.ts +43 -18
- package/resources/wiki/{access.ts → access/access.ts} +72 -71
- package/resources/wiki/{activity.ts → activity/activity.ts} +218 -102
- package/resources/wiki/page.ts +164 -93
- package/services/auth/auth.client.ts +45 -35
- package/services/auth/auth.ts +498 -288
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +157 -134
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +755 -352
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +226 -112
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +95 -54
- package/services/documents/approval.client.ts +188 -0
- package/services/documents/approval.ts +1776 -0
- 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 +579 -619
- package/services/documents/forms.client.ts +51 -0
- package/services/documents/forms.ts +232 -0
- package/services/documents/stamps.client.ts +77 -0
- package/services/documents/stamps.ts +481 -0
- package/services/documents/stats.client.ts +38 -0
- package/services/documents/stats.ts +245 -0
- package/services/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +40 -28
- package/services/jobs/conduct.ts +183 -56
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +138 -121
- package/services/jobs/stats.client.ts +38 -0
- package/services/jobs/stats.ts +207 -0
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +76 -75
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +297 -126
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +266 -269
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +126 -83
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +250 -209
- package/services/settings/accounts.client.ts +31 -33
- package/services/settings/accounts.ts +251 -67
- 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 +7 -6
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +30 -29
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +237 -633
- package/services/settings/system.client.ts +103 -0
- package/services/settings/system.ts +718 -0
- package/services/stats/stats.client.ts +9 -8
- package/services/stats/stats.ts +27 -26
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +174 -97
- package/services/sync/v2/sync.client.ts +331 -0
- package/services/sync/v2/sync.ts +1766 -0
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +170 -25
- 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 +97 -67
- package/svcs.ts +174 -106
- package/resources/centrum/attributes.ts +0 -186
- package/resources/centrum/disponents.ts +0 -81
- package/resources/centrum/settings.ts +0 -307
- package/resources/documents/workflow.ts +0 -351
- 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/resources/sync/data.ts +0 -587
- package/resources/users/users.ts +0 -435
- 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.
|
|
2
|
-
// @generated from protobuf file "resources/mailer/thread.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/threads/thread.proto" (package "resources.mailer.threads", 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,137 +11,135 @@ 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 { UserShort } from "
|
|
14
|
-
import { Email } from "
|
|
15
|
-
import { Timestamp } from "
|
|
14
|
+
import { UserShort } from "../../users/short/user";
|
|
15
|
+
import { Email } from "../emails/email";
|
|
16
|
+
import { Timestamp } from "../../timestamp/timestamp";
|
|
16
17
|
/**
|
|
17
|
-
* @generated from protobuf message resources.mailer.Thread
|
|
18
|
+
* @generated from protobuf message resources.mailer.threads.Thread
|
|
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.emails.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.short.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.threads.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.threads.ThreadState state = 11
|
|
64
63
|
*/
|
|
65
|
-
state?: ThreadState;
|
|
64
|
+
state?: ThreadState;
|
|
66
65
|
}
|
|
67
66
|
/**
|
|
68
|
-
* @generated from protobuf message resources.mailer.ThreadRecipientEmail
|
|
67
|
+
* @generated from protobuf message resources.mailer.threads.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.emails.Email email = 6
|
|
89
88
|
*/
|
|
90
89
|
email?: Email;
|
|
91
90
|
}
|
|
92
91
|
/**
|
|
93
|
-
* @generated from protobuf message resources.mailer.ThreadState
|
|
92
|
+
* @generated from protobuf message resources.mailer.threads.ThreadState
|
|
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
|
}
|
|
129
128
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
130
129
|
class Thread$Type extends MessageType<Thread> {
|
|
131
130
|
constructor() {
|
|
132
|
-
super("resources.mailer.Thread", [
|
|
133
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
131
|
+
super("resources.mailer.threads.Thread", [
|
|
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, stripHtmlTags: true } } },
|
|
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,25 +169,25 @@ 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
|
-
case /* optional resources.mailer.Email creator_email */ 6:
|
|
175
|
+
case /* optional resources.mailer.emails.Email creator_email */ 6:
|
|
177
176
|
message.creatorEmail = Email.internalBinaryRead(reader, reader.uint32(), options, message.creatorEmail);
|
|
178
177
|
break;
|
|
179
178
|
case /* optional int32 creator_id */ 7:
|
|
180
179
|
message.creatorId = reader.int32();
|
|
181
180
|
break;
|
|
182
|
-
case /* optional resources.users.UserShort creator */ 8:
|
|
181
|
+
case /* optional resources.users.short.UserShort creator */ 8:
|
|
183
182
|
message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
184
183
|
break;
|
|
185
184
|
case /* string title */ 9:
|
|
186
185
|
message.title = reader.string();
|
|
187
186
|
break;
|
|
188
|
-
case /* repeated resources.mailer.ThreadRecipientEmail recipients */ 10:
|
|
187
|
+
case /* repeated resources.mailer.threads.ThreadRecipientEmail recipients */ 10:
|
|
189
188
|
message.recipients.push(ThreadRecipientEmail.internalBinaryRead(reader, reader.uint32(), options));
|
|
190
189
|
break;
|
|
191
|
-
case /* optional resources.mailer.ThreadState state */ 11:
|
|
190
|
+
case /* optional resources.mailer.threads.ThreadState state */ 11:
|
|
192
191
|
message.state = ThreadState.internalBinaryRead(reader, reader.uint32(), options, message.state);
|
|
193
192
|
break;
|
|
194
193
|
default:
|
|
@@ -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,25 +214,25 @@ 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).
|
|
221
|
-
/* optional resources.mailer.Email creator_email = 6; */
|
|
219
|
+
writer.tag(5, WireType.Varint).int64(message.creatorEmailId);
|
|
220
|
+
/* optional resources.mailer.emails.Email creator_email = 6; */
|
|
222
221
|
if (message.creatorEmail)
|
|
223
222
|
Email.internalBinaryWrite(message.creatorEmail, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
224
223
|
/* optional int32 creator_id = 7; */
|
|
225
224
|
if (message.creatorId !== undefined)
|
|
226
225
|
writer.tag(7, WireType.Varint).int32(message.creatorId);
|
|
227
|
-
/* optional resources.users.UserShort creator = 8; */
|
|
226
|
+
/* optional resources.users.short.UserShort creator = 8; */
|
|
228
227
|
if (message.creator)
|
|
229
228
|
UserShort.internalBinaryWrite(message.creator, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
230
229
|
/* string title = 9; */
|
|
231
230
|
if (message.title !== "")
|
|
232
231
|
writer.tag(9, WireType.LengthDelimited).string(message.title);
|
|
233
|
-
/* repeated resources.mailer.ThreadRecipientEmail recipients = 10; */
|
|
232
|
+
/* repeated resources.mailer.threads.ThreadRecipientEmail recipients = 10; */
|
|
234
233
|
for (let i = 0; i < message.recipients.length; i++)
|
|
235
234
|
ThreadRecipientEmail.internalBinaryWrite(message.recipients[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
236
|
-
/* optional resources.mailer.ThreadState state = 11; */
|
|
235
|
+
/* optional resources.mailer.threads.ThreadState state = 11; */
|
|
237
236
|
if (message.state)
|
|
238
237
|
ThreadState.internalBinaryWrite(message.state, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
239
238
|
let u = options.writeUnknownFields;
|
|
@@ -243,17 +242,17 @@ class Thread$Type extends MessageType<Thread> {
|
|
|
243
242
|
}
|
|
244
243
|
}
|
|
245
244
|
/**
|
|
246
|
-
* @generated MessageType for protobuf message resources.mailer.Thread
|
|
245
|
+
* @generated MessageType for protobuf message resources.mailer.threads.Thread
|
|
247
246
|
*/
|
|
248
247
|
export const Thread = new Thread$Type();
|
|
249
248
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
250
249
|
class ThreadRecipientEmail$Type extends MessageType<ThreadRecipientEmail> {
|
|
251
250
|
constructor() {
|
|
252
|
-
super("resources.mailer.ThreadRecipientEmail", [
|
|
253
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
251
|
+
super("resources.mailer.threads.ThreadRecipientEmail", [
|
|
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,19 +270,19 @@ 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
|
-
case /* optional resources.mailer.Email email */ 6:
|
|
285
|
+
case /* optional resources.mailer.emails.Email email */ 6:
|
|
287
286
|
message.email = Email.internalBinaryRead(reader, reader.uint32(), options, message.email);
|
|
288
287
|
break;
|
|
289
288
|
default:
|
|
@@ -298,19 +297,19 @@ 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).
|
|
313
|
-
/* optional resources.mailer.Email email = 6; */
|
|
311
|
+
writer.tag(5, WireType.Varint).int64(message.emailId);
|
|
312
|
+
/* optional resources.mailer.emails.Email email = 6; */
|
|
314
313
|
if (message.email)
|
|
315
314
|
Email.internalBinaryWrite(message.email, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
316
315
|
let u = options.writeUnknownFields;
|
|
@@ -320,15 +319,15 @@ class ThreadRecipientEmail$Type extends MessageType<ThreadRecipientEmail> {
|
|
|
320
319
|
}
|
|
321
320
|
}
|
|
322
321
|
/**
|
|
323
|
-
* @generated MessageType for protobuf message resources.mailer.ThreadRecipientEmail
|
|
322
|
+
* @generated MessageType for protobuf message resources.mailer.threads.ThreadRecipientEmail
|
|
324
323
|
*/
|
|
325
324
|
export const ThreadRecipientEmail = new ThreadRecipientEmail$Type();
|
|
326
325
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
327
326
|
class ThreadState$Type extends MessageType<ThreadState> {
|
|
328
327
|
constructor() {
|
|
329
|
-
super("resources.mailer.ThreadState", [
|
|
330
|
-
{ no: 1, name: "thread_id", kind: "scalar", T:
|
|
331
|
-
{ no: 2, name: "email_id", kind: "scalar", T:
|
|
328
|
+
super("resources.mailer.threads.ThreadState", [
|
|
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();
|
|
@@ -417,6 +416,6 @@ class ThreadState$Type extends MessageType<ThreadState> {
|
|
|
417
416
|
}
|
|
418
417
|
}
|
|
419
418
|
/**
|
|
420
|
-
* @generated MessageType for protobuf message resources.mailer.ThreadState
|
|
419
|
+
* @generated MessageType for protobuf message resources.mailer.threads.ThreadState
|
|
421
420
|
*/
|
|
422
421
|
export const ThreadState = new ThreadState$Type();
|
|
@@ -0,0 +1,239 @@
|
|
|
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/notifications/clientview/clientview.proto" (package "resources.notifications.clientview", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
+
import { Struct } from "../../../google/protobuf/struct";
|
|
15
|
+
/**
|
|
16
|
+
* @generated from protobuf message resources.notifications.clientview.ClientView
|
|
17
|
+
*/
|
|
18
|
+
export interface ClientView {
|
|
19
|
+
/**
|
|
20
|
+
* @generated from protobuf field: resources.notifications.clientview.ObjectType type = 1
|
|
21
|
+
*/
|
|
22
|
+
type: ObjectType;
|
|
23
|
+
/**
|
|
24
|
+
* @generated from protobuf field: optional int64 id = 2
|
|
25
|
+
*/
|
|
26
|
+
id?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @generated from protobuf message resources.notifications.clientview.ObjectEvent
|
|
30
|
+
*/
|
|
31
|
+
export interface ObjectEvent {
|
|
32
|
+
/**
|
|
33
|
+
* @generated from protobuf field: resources.notifications.clientview.ObjectType type = 1
|
|
34
|
+
*/
|
|
35
|
+
type: ObjectType;
|
|
36
|
+
/**
|
|
37
|
+
* @generated from protobuf field: optional int64 id = 2
|
|
38
|
+
*/
|
|
39
|
+
id?: number;
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf field: resources.notifications.clientview.ObjectEventType event_type = 3
|
|
42
|
+
*/
|
|
43
|
+
eventType: ObjectEventType;
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf field: optional int32 user_id = 4
|
|
46
|
+
*/
|
|
47
|
+
userId?: number;
|
|
48
|
+
/**
|
|
49
|
+
* @generated from protobuf field: optional string job = 5
|
|
50
|
+
*/
|
|
51
|
+
job?: string;
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf field: optional google.protobuf.Struct data = 6
|
|
54
|
+
*/
|
|
55
|
+
data?: Struct;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @generated from protobuf enum resources.notifications.clientview.ObjectType
|
|
59
|
+
*/
|
|
60
|
+
export enum ObjectType {
|
|
61
|
+
/**
|
|
62
|
+
* @generated from protobuf enum value: OBJECT_TYPE_UNSPECIFIED = 0;
|
|
63
|
+
*/
|
|
64
|
+
UNSPECIFIED = 0,
|
|
65
|
+
/**
|
|
66
|
+
* @generated from protobuf enum value: OBJECT_TYPE_CITIZEN = 1;
|
|
67
|
+
*/
|
|
68
|
+
CITIZEN = 1,
|
|
69
|
+
/**
|
|
70
|
+
* @generated from protobuf enum value: OBJECT_TYPE_DOCUMENT = 2;
|
|
71
|
+
*/
|
|
72
|
+
DOCUMENT = 2,
|
|
73
|
+
/**
|
|
74
|
+
* @generated from protobuf enum value: OBJECT_TYPE_WIKI_PAGE = 3;
|
|
75
|
+
*/
|
|
76
|
+
WIKI_PAGE = 3,
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf enum value: OBJECT_TYPE_JOBS_COLLEAGUE = 4;
|
|
79
|
+
*/
|
|
80
|
+
JOBS_COLLEAGUE = 4,
|
|
81
|
+
/**
|
|
82
|
+
* @generated from protobuf enum value: OBJECT_TYPE_JOBS_CONDUCT = 5;
|
|
83
|
+
*/
|
|
84
|
+
JOBS_CONDUCT = 5
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @generated from protobuf enum resources.notifications.clientview.ObjectEventType
|
|
88
|
+
*/
|
|
89
|
+
export enum ObjectEventType {
|
|
90
|
+
/**
|
|
91
|
+
* @generated from protobuf enum value: OBJECT_EVENT_TYPE_UNSPECIFIED = 0;
|
|
92
|
+
*/
|
|
93
|
+
UNSPECIFIED = 0,
|
|
94
|
+
/**
|
|
95
|
+
* @generated from protobuf enum value: OBJECT_EVENT_TYPE_UPDATED = 1;
|
|
96
|
+
*/
|
|
97
|
+
UPDATED = 1,
|
|
98
|
+
/**
|
|
99
|
+
* @generated from protobuf enum value: OBJECT_EVENT_TYPE_DELETED = 2;
|
|
100
|
+
*/
|
|
101
|
+
DELETED = 2
|
|
102
|
+
}
|
|
103
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
104
|
+
class ClientView$Type extends MessageType<ClientView> {
|
|
105
|
+
constructor() {
|
|
106
|
+
super("resources.notifications.clientview.ClientView", [
|
|
107
|
+
{ no: 1, name: "type", kind: "enum", T: () => ["resources.notifications.clientview.ObjectType", ObjectType, "OBJECT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
108
|
+
{ no: 2, name: "id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
109
|
+
]);
|
|
110
|
+
}
|
|
111
|
+
create(value?: PartialMessage<ClientView>): ClientView {
|
|
112
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
113
|
+
message.type = 0;
|
|
114
|
+
if (value !== undefined)
|
|
115
|
+
reflectionMergePartial<ClientView>(this, message, value);
|
|
116
|
+
return message;
|
|
117
|
+
}
|
|
118
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClientView): ClientView {
|
|
119
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
120
|
+
while (reader.pos < end) {
|
|
121
|
+
let [fieldNo, wireType] = reader.tag();
|
|
122
|
+
switch (fieldNo) {
|
|
123
|
+
case /* resources.notifications.clientview.ObjectType type */ 1:
|
|
124
|
+
message.type = reader.int32();
|
|
125
|
+
break;
|
|
126
|
+
case /* optional int64 id */ 2:
|
|
127
|
+
message.id = reader.int64().toNumber();
|
|
128
|
+
break;
|
|
129
|
+
default:
|
|
130
|
+
let u = options.readUnknownField;
|
|
131
|
+
if (u === "throw")
|
|
132
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
133
|
+
let d = reader.skip(wireType);
|
|
134
|
+
if (u !== false)
|
|
135
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return message;
|
|
139
|
+
}
|
|
140
|
+
internalBinaryWrite(message: ClientView, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
141
|
+
/* resources.notifications.clientview.ObjectType type = 1; */
|
|
142
|
+
if (message.type !== 0)
|
|
143
|
+
writer.tag(1, WireType.Varint).int32(message.type);
|
|
144
|
+
/* optional int64 id = 2; */
|
|
145
|
+
if (message.id !== undefined)
|
|
146
|
+
writer.tag(2, WireType.Varint).int64(message.id);
|
|
147
|
+
let u = options.writeUnknownFields;
|
|
148
|
+
if (u !== false)
|
|
149
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
150
|
+
return writer;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @generated MessageType for protobuf message resources.notifications.clientview.ClientView
|
|
155
|
+
*/
|
|
156
|
+
export const ClientView = new ClientView$Type();
|
|
157
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
158
|
+
class ObjectEvent$Type extends MessageType<ObjectEvent> {
|
|
159
|
+
constructor() {
|
|
160
|
+
super("resources.notifications.clientview.ObjectEvent", [
|
|
161
|
+
{ no: 1, name: "type", kind: "enum", T: () => ["resources.notifications.clientview.ObjectType", ObjectType, "OBJECT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
162
|
+
{ no: 2, name: "id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
163
|
+
{ no: 3, name: "event_type", kind: "enum", T: () => ["resources.notifications.clientview.ObjectEventType", ObjectEventType, "OBJECT_EVENT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
164
|
+
{ no: 4, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
165
|
+
{ no: 5, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
166
|
+
{ no: 6, name: "data", kind: "message", T: () => Struct }
|
|
167
|
+
]);
|
|
168
|
+
}
|
|
169
|
+
create(value?: PartialMessage<ObjectEvent>): ObjectEvent {
|
|
170
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
171
|
+
message.type = 0;
|
|
172
|
+
message.eventType = 0;
|
|
173
|
+
if (value !== undefined)
|
|
174
|
+
reflectionMergePartial<ObjectEvent>(this, message, value);
|
|
175
|
+
return message;
|
|
176
|
+
}
|
|
177
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ObjectEvent): ObjectEvent {
|
|
178
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
179
|
+
while (reader.pos < end) {
|
|
180
|
+
let [fieldNo, wireType] = reader.tag();
|
|
181
|
+
switch (fieldNo) {
|
|
182
|
+
case /* resources.notifications.clientview.ObjectType type */ 1:
|
|
183
|
+
message.type = reader.int32();
|
|
184
|
+
break;
|
|
185
|
+
case /* optional int64 id */ 2:
|
|
186
|
+
message.id = reader.int64().toNumber();
|
|
187
|
+
break;
|
|
188
|
+
case /* resources.notifications.clientview.ObjectEventType event_type */ 3:
|
|
189
|
+
message.eventType = reader.int32();
|
|
190
|
+
break;
|
|
191
|
+
case /* optional int32 user_id */ 4:
|
|
192
|
+
message.userId = reader.int32();
|
|
193
|
+
break;
|
|
194
|
+
case /* optional string job */ 5:
|
|
195
|
+
message.job = reader.string();
|
|
196
|
+
break;
|
|
197
|
+
case /* optional google.protobuf.Struct data */ 6:
|
|
198
|
+
message.data = Struct.internalBinaryRead(reader, reader.uint32(), options, message.data);
|
|
199
|
+
break;
|
|
200
|
+
default:
|
|
201
|
+
let u = options.readUnknownField;
|
|
202
|
+
if (u === "throw")
|
|
203
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
204
|
+
let d = reader.skip(wireType);
|
|
205
|
+
if (u !== false)
|
|
206
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return message;
|
|
210
|
+
}
|
|
211
|
+
internalBinaryWrite(message: ObjectEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
212
|
+
/* resources.notifications.clientview.ObjectType type = 1; */
|
|
213
|
+
if (message.type !== 0)
|
|
214
|
+
writer.tag(1, WireType.Varint).int32(message.type);
|
|
215
|
+
/* optional int64 id = 2; */
|
|
216
|
+
if (message.id !== undefined)
|
|
217
|
+
writer.tag(2, WireType.Varint).int64(message.id);
|
|
218
|
+
/* resources.notifications.clientview.ObjectEventType event_type = 3; */
|
|
219
|
+
if (message.eventType !== 0)
|
|
220
|
+
writer.tag(3, WireType.Varint).int32(message.eventType);
|
|
221
|
+
/* optional int32 user_id = 4; */
|
|
222
|
+
if (message.userId !== undefined)
|
|
223
|
+
writer.tag(4, WireType.Varint).int32(message.userId);
|
|
224
|
+
/* optional string job = 5; */
|
|
225
|
+
if (message.job !== undefined)
|
|
226
|
+
writer.tag(5, WireType.LengthDelimited).string(message.job);
|
|
227
|
+
/* optional google.protobuf.Struct data = 6; */
|
|
228
|
+
if (message.data)
|
|
229
|
+
Struct.internalBinaryWrite(message.data, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
230
|
+
let u = options.writeUnknownFields;
|
|
231
|
+
if (u !== false)
|
|
232
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
233
|
+
return writer;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* @generated MessageType for protobuf message resources.notifications.clientview.ObjectEvent
|
|
238
|
+
*/
|
|
239
|
+
export const ObjectEvent = new ObjectEvent$Type();
|