@fivenet-app/gen 2026.8.5 → 2026.10.2
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/LICENSE +201 -0
- package/clients.ts +12 -0
- package/codegen/perms/perms.ts +331 -2
- package/google/protobuf/any.ts +47 -103
- package/google/protobuf/descriptor.ts +39 -32
- package/google/protobuf/struct.ts +33 -22
- package/google/protobuf/timestamp.ts +9 -8
- package/package.json +2 -2
- package/perms.ts +41 -13
- package/resources/centrum/dispatches/dispatches.ts +206 -13
- package/resources/centrum/units/units.ts +207 -0
- package/resources/cron/cron.ts +44 -3
- package/resources/documents/templates/templates.ts +3 -3
- package/resources/file/file.ts +3 -3
- package/resources/file/filestore.ts +26 -10
- package/resources/jobs/colleagues/activity/activity.ts +50 -8
- package/resources/jobs/colleagues/colleagues.ts +14 -1
- package/resources/jobs/groups/short/group_member_short.ts +129 -0
- package/resources/jobs/job_asset.ts +116 -0
- package/resources/jobs/user_selector.ts +1 -15
- package/resources/notifications/clientview/clientview.ts +5 -1
- package/resources/notifications/events/events.ts +35 -1
- package/resources/notifications/notifications.ts +322 -2
- package/resources/permissions/attributes/attributes.ts +164 -2
- package/resources/permissions/authorization/authorization.ts +86 -0
- package/resources/permissions/permissions/permissions.ts +16 -1
- package/resources/properties/properties.ts +1648 -0
- package/resources/qualifications/activity/activity.ts +328 -0
- package/resources/qualifications/exam/exam.ts +108 -4
- package/resources/qualifications/qualifications.ts +36 -2
- package/resources/settings/config.ts +3 -3
- package/resources/sync/activity/activity.ts +4 -4
- package/resources/sync/data/data.ts +16 -4
- package/resources/users/activity/activity.ts +220 -3
- package/resources/users/props/props.ts +13 -1
- package/resources/users/user.ts +13 -1
- package/resources/vehicles/activity/activity.ts +222 -3
- package/resources/vehicles/props/props.ts +13 -1
- package/resources/vehicles/vehicles.ts +13 -1
- package/services/auth/auth.ts +61 -67
- package/services/centrum/centrum.ts +103 -1
- package/services/centrum/dispatches.ts +25 -1
- package/services/centrum/units.ts +25 -1
- package/services/citizens/citizens.client.ts +49 -0
- package/services/citizens/citizens.ts +384 -7
- package/services/documents/documents.ts +1 -0
- package/services/documents/templates.ts +12 -1
- package/services/jobs/colleagues.ts +26 -1
- package/services/jobs/conduct.ts +1 -0
- package/services/jobs/groups.ts +62 -4
- package/services/notifications/notifications.client.ts +40 -1
- package/services/notifications/notifications.ts +483 -3
- package/services/qualifications/qualifications.client.ts +20 -7
- package/services/qualifications/qualifications.ts +265 -4
- package/services/settings/job_assets.client.ts +105 -0
- package/services/settings/job_assets.ts +373 -0
- package/services/settings/properties.client.ts +194 -0
- package/services/settings/properties.ts +1555 -0
- package/services/settings/system.ts +29 -9
- package/services/sync/sync.ts +115 -12
- package/services/vehicles/vehicles.client.ts +52 -0
- package/services/vehicles/vehicles.ts +385 -7
- package/svcs.ts +58 -0
|
@@ -42,12 +42,6 @@ export interface GroupUserSelector {
|
|
|
42
42
|
* @generated from protobuf field: bool include_leaders = 2
|
|
43
43
|
*/
|
|
44
44
|
includeLeaders: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Normally false: group exclusions should be respected.
|
|
47
|
-
*
|
|
48
|
-
* @generated from protobuf field: bool include_excluded = 3
|
|
49
|
-
*/
|
|
50
|
-
includeExcluded: boolean;
|
|
51
45
|
}
|
|
52
46
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
53
47
|
class UserSelector$Type extends MessageType<UserSelector> {
|
|
@@ -116,15 +110,13 @@ class GroupUserSelector$Type extends MessageType<GroupUserSelector> {
|
|
|
116
110
|
constructor() {
|
|
117
111
|
super("resources.jobs.GroupUserSelector", [
|
|
118
112
|
{ no: 1, name: "group_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { repeated: { maxItems: "5", items: { int64: { gt: "0" } } } } } },
|
|
119
|
-
{ no: 2, name: "include_leaders", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
120
|
-
{ no: 3, name: "include_excluded", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
113
|
+
{ no: 2, name: "include_leaders", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
121
114
|
]);
|
|
122
115
|
}
|
|
123
116
|
create(value?: PartialMessage<GroupUserSelector>): GroupUserSelector {
|
|
124
117
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
125
118
|
message.groupIds = [];
|
|
126
119
|
message.includeLeaders = false;
|
|
127
|
-
message.includeExcluded = false;
|
|
128
120
|
if (value !== undefined)
|
|
129
121
|
reflectionMergePartial<GroupUserSelector>(this, message, value);
|
|
130
122
|
return message;
|
|
@@ -144,9 +136,6 @@ class GroupUserSelector$Type extends MessageType<GroupUserSelector> {
|
|
|
144
136
|
case /* bool include_leaders */ 2:
|
|
145
137
|
message.includeLeaders = reader.bool();
|
|
146
138
|
break;
|
|
147
|
-
case /* bool include_excluded */ 3:
|
|
148
|
-
message.includeExcluded = reader.bool();
|
|
149
|
-
break;
|
|
150
139
|
default:
|
|
151
140
|
let u = options.readUnknownField;
|
|
152
141
|
if (u === "throw")
|
|
@@ -169,9 +158,6 @@ class GroupUserSelector$Type extends MessageType<GroupUserSelector> {
|
|
|
169
158
|
/* bool include_leaders = 2; */
|
|
170
159
|
if (message.includeLeaders !== false)
|
|
171
160
|
writer.tag(2, WireType.Varint).bool(message.includeLeaders);
|
|
172
|
-
/* bool include_excluded = 3; */
|
|
173
|
-
if (message.includeExcluded !== false)
|
|
174
|
-
writer.tag(3, WireType.Varint).bool(message.includeExcluded);
|
|
175
161
|
let u = options.writeUnknownFields;
|
|
176
162
|
if (u !== false)
|
|
177
163
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -81,7 +81,11 @@ export enum ObjectType {
|
|
|
81
81
|
/**
|
|
82
82
|
* @generated from protobuf enum value: OBJECT_TYPE_JOBS_CONDUCT = 5;
|
|
83
83
|
*/
|
|
84
|
-
JOBS_CONDUCT = 5
|
|
84
|
+
JOBS_CONDUCT = 5,
|
|
85
|
+
/**
|
|
86
|
+
* @generated from protobuf enum value: OBJECT_TYPE_QUALIFICATION = 6;
|
|
87
|
+
*/
|
|
88
|
+
QUALIFICATION = 6
|
|
85
89
|
}
|
|
86
90
|
/**
|
|
87
91
|
* @generated from protobuf enum resources.notifications.clientview.ObjectEventType
|
|
@@ -22,6 +22,13 @@ import { Notification } from "../notifications";
|
|
|
22
22
|
* @generated from protobuf message resources.notifications.events.UserEvent
|
|
23
23
|
*/
|
|
24
24
|
export interface UserEvent {
|
|
25
|
+
/**
|
|
26
|
+
* Present on durable notification events to let streams update their badge
|
|
27
|
+
* count, provided per stream on best-effort basis.
|
|
28
|
+
*
|
|
29
|
+
* @generated from protobuf field: optional int64 unread_count = 7
|
|
30
|
+
*/
|
|
31
|
+
unreadCount?: number;
|
|
25
32
|
/**
|
|
26
33
|
* @generated from protobuf oneof: data
|
|
27
34
|
*/
|
|
@@ -42,6 +49,8 @@ export interface UserEvent {
|
|
|
42
49
|
} | {
|
|
43
50
|
oneofKind: "notificationsReadCount";
|
|
44
51
|
/**
|
|
52
|
+
* Deprecated delta kept for wire compatibility with older clients.
|
|
53
|
+
*
|
|
45
54
|
* @generated from protobuf field: int64 notifications_read_count = 3
|
|
46
55
|
*/
|
|
47
56
|
notificationsReadCount: number;
|
|
@@ -57,6 +66,14 @@ export interface UserEvent {
|
|
|
57
66
|
* @generated from protobuf field: resources.userinfo.AccountGroupsChanged account_groups_changed = 5
|
|
58
67
|
*/
|
|
59
68
|
accountGroupsChanged: AccountGroupsChanged;
|
|
69
|
+
} | {
|
|
70
|
+
oneofKind: "notificationsUnreadCount";
|
|
71
|
+
/**
|
|
72
|
+
* The authoritative unread count after a notification-state mutation.
|
|
73
|
+
*
|
|
74
|
+
* @generated from protobuf field: int64 notifications_unread_count = 6
|
|
75
|
+
*/
|
|
76
|
+
notificationsUnreadCount: number;
|
|
60
77
|
} | {
|
|
61
78
|
oneofKind: undefined;
|
|
62
79
|
};
|
|
@@ -132,11 +149,13 @@ export interface SystemEvent {
|
|
|
132
149
|
class UserEvent$Type extends MessageType<UserEvent> {
|
|
133
150
|
constructor() {
|
|
134
151
|
super("resources.notifications.events.UserEvent", [
|
|
152
|
+
{ no: 7, name: "unread_count", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
135
153
|
{ no: 1, name: "refresh_token", kind: "scalar", oneof: "data", T: 8 /*ScalarType.BOOL*/ },
|
|
136
154
|
{ no: 2, name: "notification", kind: "message", oneof: "data", T: () => Notification },
|
|
137
155
|
{ no: 3, name: "notifications_read_count", kind: "scalar", oneof: "data", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
138
156
|
{ no: 4, name: "user_info_changed", kind: "message", oneof: "data", T: () => UserInfoChanged },
|
|
139
|
-
{ no: 5, name: "account_groups_changed", kind: "message", oneof: "data", T: () => AccountGroupsChanged }
|
|
157
|
+
{ no: 5, name: "account_groups_changed", kind: "message", oneof: "data", T: () => AccountGroupsChanged },
|
|
158
|
+
{ no: 6, name: "notifications_unread_count", kind: "scalar", oneof: "data", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
140
159
|
]);
|
|
141
160
|
}
|
|
142
161
|
create(value?: PartialMessage<UserEvent>): UserEvent {
|
|
@@ -151,6 +170,9 @@ class UserEvent$Type extends MessageType<UserEvent> {
|
|
|
151
170
|
while (reader.pos < end) {
|
|
152
171
|
let [fieldNo, wireType] = reader.tag();
|
|
153
172
|
switch (fieldNo) {
|
|
173
|
+
case /* optional int64 unread_count */ 7:
|
|
174
|
+
message.unreadCount = reader.int64().toNumber();
|
|
175
|
+
break;
|
|
154
176
|
case /* bool refresh_token */ 1:
|
|
155
177
|
message.data = {
|
|
156
178
|
oneofKind: "refreshToken",
|
|
@@ -181,6 +203,12 @@ class UserEvent$Type extends MessageType<UserEvent> {
|
|
|
181
203
|
accountGroupsChanged: AccountGroupsChanged.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).accountGroupsChanged)
|
|
182
204
|
};
|
|
183
205
|
break;
|
|
206
|
+
case /* int64 notifications_unread_count */ 6:
|
|
207
|
+
message.data = {
|
|
208
|
+
oneofKind: "notificationsUnreadCount",
|
|
209
|
+
notificationsUnreadCount: reader.int64().toNumber()
|
|
210
|
+
};
|
|
211
|
+
break;
|
|
184
212
|
default:
|
|
185
213
|
let u = options.readUnknownField;
|
|
186
214
|
if (u === "throw")
|
|
@@ -208,6 +236,12 @@ class UserEvent$Type extends MessageType<UserEvent> {
|
|
|
208
236
|
/* resources.userinfo.AccountGroupsChanged account_groups_changed = 5; */
|
|
209
237
|
if (message.data.oneofKind === "accountGroupsChanged")
|
|
210
238
|
AccountGroupsChanged.internalBinaryWrite(message.data.accountGroupsChanged, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
239
|
+
/* int64 notifications_unread_count = 6; */
|
|
240
|
+
if (message.data.oneofKind === "notificationsUnreadCount")
|
|
241
|
+
writer.tag(6, WireType.Varint).int64(message.data.notificationsUnreadCount);
|
|
242
|
+
/* optional int64 unread_count = 7; */
|
|
243
|
+
if (message.unreadCount !== undefined)
|
|
244
|
+
writer.tag(7, WireType.Varint).int64(message.unreadCount);
|
|
211
245
|
let u = options.writeUnknownFields;
|
|
212
246
|
if (u !== false)
|
|
213
247
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -14,6 +14,56 @@ import { MessageType } from "@protobuf-ts/runtime";
|
|
|
14
14
|
import { UserShort } from "../users/short/user";
|
|
15
15
|
import { I18NItem } from "../common/i18n";
|
|
16
16
|
import { Timestamp } from "../timestamp/timestamp";
|
|
17
|
+
/**
|
|
18
|
+
* A per-user override for notification delivery. An unspecified category and
|
|
19
|
+
* kind form the global default; a category with an unspecified kind is a
|
|
20
|
+
* category default; and both set is a kind-specific override. Optional fields
|
|
21
|
+
* intentionally inherit from the less specific scope when absent.
|
|
22
|
+
*
|
|
23
|
+
* @generated from protobuf message resources.notifications.NotificationPreference
|
|
24
|
+
*/
|
|
25
|
+
export interface NotificationPreference {
|
|
26
|
+
/**
|
|
27
|
+
* @generated from protobuf field: resources.notifications.NotificationCategory category = 1
|
|
28
|
+
*/
|
|
29
|
+
category: NotificationCategory;
|
|
30
|
+
/**
|
|
31
|
+
* @generated from protobuf field: resources.notifications.NotificationKind kind = 2
|
|
32
|
+
*/
|
|
33
|
+
kind: NotificationKind;
|
|
34
|
+
/**
|
|
35
|
+
* @generated from protobuf field: optional bool inbox_enabled = 3
|
|
36
|
+
*/
|
|
37
|
+
inboxEnabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @generated from protobuf field: optional bool toast_enabled = 4
|
|
40
|
+
*/
|
|
41
|
+
toastEnabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @generated from protobuf field: optional bool sound_enabled = 5
|
|
44
|
+
*/
|
|
45
|
+
soundEnabled?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Delivery instructions are resolved server-side and are only attached to a
|
|
49
|
+
* live notification event. They are never persisted with the notification.
|
|
50
|
+
*
|
|
51
|
+
* @generated from protobuf message resources.notifications.NotificationDelivery
|
|
52
|
+
*/
|
|
53
|
+
export interface NotificationDelivery {
|
|
54
|
+
/**
|
|
55
|
+
* @generated from protobuf field: bool inbox_enabled = 1
|
|
56
|
+
*/
|
|
57
|
+
inboxEnabled: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* @generated from protobuf field: bool toast_enabled = 2
|
|
60
|
+
*/
|
|
61
|
+
toastEnabled: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* @generated from protobuf field: bool sound_enabled = 3
|
|
64
|
+
*/
|
|
65
|
+
soundEnabled: boolean;
|
|
66
|
+
}
|
|
17
67
|
/**
|
|
18
68
|
* @generated from protobuf message resources.notifications.Notification
|
|
19
69
|
*/
|
|
@@ -58,6 +108,30 @@ export interface Notification {
|
|
|
58
108
|
* @generated from protobuf field: optional bool starred = 10
|
|
59
109
|
*/
|
|
60
110
|
starred?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* @generated from protobuf field: resources.notifications.NotificationKind kind = 11
|
|
113
|
+
*/
|
|
114
|
+
kind: NotificationKind;
|
|
115
|
+
/**
|
|
116
|
+
* @generated from protobuf field: optional int32 actor_user_id = 12
|
|
117
|
+
*/
|
|
118
|
+
actorUserId?: number;
|
|
119
|
+
/**
|
|
120
|
+
* @generated from protobuf field: optional string entity_type = 13
|
|
121
|
+
*/
|
|
122
|
+
entityType?: string;
|
|
123
|
+
/**
|
|
124
|
+
* @generated from protobuf field: optional int64 entity_id = 14
|
|
125
|
+
*/
|
|
126
|
+
entityId?: number;
|
|
127
|
+
/**
|
|
128
|
+
* @generated from protobuf field: resources.timestamp.Timestamp archived_at = 15
|
|
129
|
+
*/
|
|
130
|
+
archivedAt?: Timestamp;
|
|
131
|
+
/**
|
|
132
|
+
* @generated from protobuf field: optional resources.notifications.NotificationDelivery delivery = 16
|
|
133
|
+
*/
|
|
134
|
+
delivery?: NotificationDelivery;
|
|
61
135
|
}
|
|
62
136
|
/**
|
|
63
137
|
* @generated from protobuf message resources.notifications.Data
|
|
@@ -150,8 +224,211 @@ export enum NotificationCategory {
|
|
|
150
224
|
/**
|
|
151
225
|
* @generated from protobuf enum value: NOTIFICATION_CATEGORY_CALENDAR = 3;
|
|
152
226
|
*/
|
|
153
|
-
CALENDAR = 3
|
|
227
|
+
CALENDAR = 3,
|
|
228
|
+
/**
|
|
229
|
+
* @generated from protobuf enum value: NOTIFICATION_CATEGORY_JOBS = 4;
|
|
230
|
+
*/
|
|
231
|
+
JOBS = 4,
|
|
232
|
+
/**
|
|
233
|
+
* @generated from protobuf enum value: NOTIFICATION_CATEGORY_QUALIFICATIONS = 5;
|
|
234
|
+
*/
|
|
235
|
+
QUALIFICATIONS = 5,
|
|
236
|
+
/**
|
|
237
|
+
* @generated from protobuf enum value: NOTIFICATION_CATEGORY_MAILER = 6;
|
|
238
|
+
*/
|
|
239
|
+
MAILER = 6,
|
|
240
|
+
/**
|
|
241
|
+
* @generated from protobuf enum value: NOTIFICATION_CATEGORY_DISPATCH = 7;
|
|
242
|
+
*/
|
|
243
|
+
DISPATCH = 7,
|
|
244
|
+
/**
|
|
245
|
+
* @generated from protobuf enum value: NOTIFICATION_CATEGORY_SYSTEM = 8;
|
|
246
|
+
*/
|
|
247
|
+
SYSTEM = 8
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* A precise, typed event within a notification category. Categories remain
|
|
251
|
+
* intentionally broad so clients can provide consistent filtering and UI.
|
|
252
|
+
*
|
|
253
|
+
* @generated from protobuf enum resources.notifications.NotificationKind
|
|
254
|
+
*/
|
|
255
|
+
export enum NotificationKind {
|
|
256
|
+
/**
|
|
257
|
+
* @generated from protobuf enum value: NOTIFICATION_KIND_UNSPECIFIED = 0;
|
|
258
|
+
*/
|
|
259
|
+
UNSPECIFIED = 0,
|
|
260
|
+
/**
|
|
261
|
+
* @generated from protobuf enum value: NOTIFICATION_KIND_JOBS_GROUP_LEADERSHIP_ADDED = 1;
|
|
262
|
+
*/
|
|
263
|
+
JOBS_GROUP_LEADERSHIP_ADDED = 1,
|
|
264
|
+
/**
|
|
265
|
+
* @generated from protobuf enum value: NOTIFICATION_KIND_JOBS_GROUP_LEADERSHIP_REMOVED = 2;
|
|
266
|
+
*/
|
|
267
|
+
JOBS_GROUP_LEADERSHIP_REMOVED = 2,
|
|
268
|
+
/**
|
|
269
|
+
* @generated from protobuf enum value: NOTIFICATION_KIND_JOBS_GROUP_MEMBER_ADDED = 3;
|
|
270
|
+
*/
|
|
271
|
+
JOBS_GROUP_MEMBER_ADDED = 3,
|
|
272
|
+
/**
|
|
273
|
+
* @generated from protobuf enum value: NOTIFICATION_KIND_JOBS_GROUP_MEMBER_REMOVED = 4;
|
|
274
|
+
*/
|
|
275
|
+
JOBS_GROUP_MEMBER_REMOVED = 4,
|
|
276
|
+
/**
|
|
277
|
+
* @generated from protobuf enum value: NOTIFICATION_KIND_DOCUMENT_APPROVAL_ASSIGNED = 5;
|
|
278
|
+
*/
|
|
279
|
+
DOCUMENT_APPROVAL_ASSIGNED = 5,
|
|
280
|
+
/**
|
|
281
|
+
* @generated from protobuf enum value: NOTIFICATION_KIND_DOCUMENT_REQUEST_CREATED = 6;
|
|
282
|
+
*/
|
|
283
|
+
DOCUMENT_REQUEST_CREATED = 6,
|
|
284
|
+
/**
|
|
285
|
+
* @generated from protobuf enum value: NOTIFICATION_KIND_DOCUMENT_REQUEST_DECIDED = 7;
|
|
286
|
+
*/
|
|
287
|
+
DOCUMENT_REQUEST_DECIDED = 7,
|
|
288
|
+
/**
|
|
289
|
+
* @generated from protobuf enum value: NOTIFICATION_KIND_DOCUMENT_REQUEST_CANCELLED = 8;
|
|
290
|
+
*/
|
|
291
|
+
DOCUMENT_REQUEST_CANCELLED = 8
|
|
292
|
+
}
|
|
293
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
294
|
+
class NotificationPreference$Type extends MessageType<NotificationPreference> {
|
|
295
|
+
constructor() {
|
|
296
|
+
super("resources.notifications.NotificationPreference", [
|
|
297
|
+
{ no: 1, name: "category", kind: "enum", T: () => ["resources.notifications.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
298
|
+
{ no: 2, name: "kind", kind: "enum", T: () => ["resources.notifications.NotificationKind", NotificationKind, "NOTIFICATION_KIND_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
299
|
+
{ no: 3, name: "inbox_enabled", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
300
|
+
{ no: 4, name: "toast_enabled", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
301
|
+
{ no: 5, name: "sound_enabled", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
302
|
+
]);
|
|
303
|
+
}
|
|
304
|
+
create(value?: PartialMessage<NotificationPreference>): NotificationPreference {
|
|
305
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
306
|
+
message.category = 0;
|
|
307
|
+
message.kind = 0;
|
|
308
|
+
if (value !== undefined)
|
|
309
|
+
reflectionMergePartial<NotificationPreference>(this, message, value);
|
|
310
|
+
return message;
|
|
311
|
+
}
|
|
312
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NotificationPreference): NotificationPreference {
|
|
313
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
314
|
+
while (reader.pos < end) {
|
|
315
|
+
let [fieldNo, wireType] = reader.tag();
|
|
316
|
+
switch (fieldNo) {
|
|
317
|
+
case /* resources.notifications.NotificationCategory category */ 1:
|
|
318
|
+
message.category = reader.int32();
|
|
319
|
+
break;
|
|
320
|
+
case /* resources.notifications.NotificationKind kind */ 2:
|
|
321
|
+
message.kind = reader.int32();
|
|
322
|
+
break;
|
|
323
|
+
case /* optional bool inbox_enabled */ 3:
|
|
324
|
+
message.inboxEnabled = reader.bool();
|
|
325
|
+
break;
|
|
326
|
+
case /* optional bool toast_enabled */ 4:
|
|
327
|
+
message.toastEnabled = reader.bool();
|
|
328
|
+
break;
|
|
329
|
+
case /* optional bool sound_enabled */ 5:
|
|
330
|
+
message.soundEnabled = reader.bool();
|
|
331
|
+
break;
|
|
332
|
+
default:
|
|
333
|
+
let u = options.readUnknownField;
|
|
334
|
+
if (u === "throw")
|
|
335
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
336
|
+
let d = reader.skip(wireType);
|
|
337
|
+
if (u !== false)
|
|
338
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return message;
|
|
342
|
+
}
|
|
343
|
+
internalBinaryWrite(message: NotificationPreference, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
344
|
+
/* resources.notifications.NotificationCategory category = 1; */
|
|
345
|
+
if (message.category !== 0)
|
|
346
|
+
writer.tag(1, WireType.Varint).int32(message.category);
|
|
347
|
+
/* resources.notifications.NotificationKind kind = 2; */
|
|
348
|
+
if (message.kind !== 0)
|
|
349
|
+
writer.tag(2, WireType.Varint).int32(message.kind);
|
|
350
|
+
/* optional bool inbox_enabled = 3; */
|
|
351
|
+
if (message.inboxEnabled !== undefined)
|
|
352
|
+
writer.tag(3, WireType.Varint).bool(message.inboxEnabled);
|
|
353
|
+
/* optional bool toast_enabled = 4; */
|
|
354
|
+
if (message.toastEnabled !== undefined)
|
|
355
|
+
writer.tag(4, WireType.Varint).bool(message.toastEnabled);
|
|
356
|
+
/* optional bool sound_enabled = 5; */
|
|
357
|
+
if (message.soundEnabled !== undefined)
|
|
358
|
+
writer.tag(5, WireType.Varint).bool(message.soundEnabled);
|
|
359
|
+
let u = options.writeUnknownFields;
|
|
360
|
+
if (u !== false)
|
|
361
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
362
|
+
return writer;
|
|
363
|
+
}
|
|
154
364
|
}
|
|
365
|
+
/**
|
|
366
|
+
* @generated MessageType for protobuf message resources.notifications.NotificationPreference
|
|
367
|
+
*/
|
|
368
|
+
export const NotificationPreference = new NotificationPreference$Type();
|
|
369
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
370
|
+
class NotificationDelivery$Type extends MessageType<NotificationDelivery> {
|
|
371
|
+
constructor() {
|
|
372
|
+
super("resources.notifications.NotificationDelivery", [
|
|
373
|
+
{ no: 1, name: "inbox_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
374
|
+
{ no: 2, name: "toast_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
375
|
+
{ no: 3, name: "sound_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
376
|
+
]);
|
|
377
|
+
}
|
|
378
|
+
create(value?: PartialMessage<NotificationDelivery>): NotificationDelivery {
|
|
379
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
380
|
+
message.inboxEnabled = false;
|
|
381
|
+
message.toastEnabled = false;
|
|
382
|
+
message.soundEnabled = false;
|
|
383
|
+
if (value !== undefined)
|
|
384
|
+
reflectionMergePartial<NotificationDelivery>(this, message, value);
|
|
385
|
+
return message;
|
|
386
|
+
}
|
|
387
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NotificationDelivery): NotificationDelivery {
|
|
388
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
389
|
+
while (reader.pos < end) {
|
|
390
|
+
let [fieldNo, wireType] = reader.tag();
|
|
391
|
+
switch (fieldNo) {
|
|
392
|
+
case /* bool inbox_enabled */ 1:
|
|
393
|
+
message.inboxEnabled = reader.bool();
|
|
394
|
+
break;
|
|
395
|
+
case /* bool toast_enabled */ 2:
|
|
396
|
+
message.toastEnabled = reader.bool();
|
|
397
|
+
break;
|
|
398
|
+
case /* bool sound_enabled */ 3:
|
|
399
|
+
message.soundEnabled = reader.bool();
|
|
400
|
+
break;
|
|
401
|
+
default:
|
|
402
|
+
let u = options.readUnknownField;
|
|
403
|
+
if (u === "throw")
|
|
404
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
405
|
+
let d = reader.skip(wireType);
|
|
406
|
+
if (u !== false)
|
|
407
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
return message;
|
|
411
|
+
}
|
|
412
|
+
internalBinaryWrite(message: NotificationDelivery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
413
|
+
/* bool inbox_enabled = 1; */
|
|
414
|
+
if (message.inboxEnabled !== false)
|
|
415
|
+
writer.tag(1, WireType.Varint).bool(message.inboxEnabled);
|
|
416
|
+
/* bool toast_enabled = 2; */
|
|
417
|
+
if (message.toastEnabled !== false)
|
|
418
|
+
writer.tag(2, WireType.Varint).bool(message.toastEnabled);
|
|
419
|
+
/* bool sound_enabled = 3; */
|
|
420
|
+
if (message.soundEnabled !== false)
|
|
421
|
+
writer.tag(3, WireType.Varint).bool(message.soundEnabled);
|
|
422
|
+
let u = options.writeUnknownFields;
|
|
423
|
+
if (u !== false)
|
|
424
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
425
|
+
return writer;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* @generated MessageType for protobuf message resources.notifications.NotificationDelivery
|
|
430
|
+
*/
|
|
431
|
+
export const NotificationDelivery = new NotificationDelivery$Type();
|
|
155
432
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
156
433
|
class Notification$Type extends MessageType<Notification> {
|
|
157
434
|
constructor() {
|
|
@@ -165,7 +442,13 @@ class Notification$Type extends MessageType<Notification> {
|
|
|
165
442
|
{ no: 7, name: "content", kind: "message", T: () => I18NItem, options: { "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
166
443
|
{ no: 8, name: "category", kind: "enum", T: () => ["resources.notifications.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
167
444
|
{ no: 9, name: "data", kind: "message", T: () => Data },
|
|
168
|
-
{ no: 10, name: "starred", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
445
|
+
{ no: 10, name: "starred", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
446
|
+
{ no: 11, name: "kind", kind: "enum", T: () => ["resources.notifications.NotificationKind", NotificationKind, "NOTIFICATION_KIND_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
447
|
+
{ no: 12, name: "actor_user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
448
|
+
{ no: 13, name: "entity_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
|
|
449
|
+
{ no: 14, name: "entity_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gte: "0" } } } },
|
|
450
|
+
{ no: 15, name: "archived_at", kind: "message", T: () => Timestamp },
|
|
451
|
+
{ no: 16, name: "delivery", kind: "message", T: () => NotificationDelivery }
|
|
169
452
|
]);
|
|
170
453
|
}
|
|
171
454
|
create(value?: PartialMessage<Notification>): Notification {
|
|
@@ -174,6 +457,7 @@ class Notification$Type extends MessageType<Notification> {
|
|
|
174
457
|
message.userId = 0;
|
|
175
458
|
message.type = 0;
|
|
176
459
|
message.category = 0;
|
|
460
|
+
message.kind = 0;
|
|
177
461
|
if (value !== undefined)
|
|
178
462
|
reflectionMergePartial<Notification>(this, message, value);
|
|
179
463
|
return message;
|
|
@@ -213,6 +497,24 @@ class Notification$Type extends MessageType<Notification> {
|
|
|
213
497
|
case /* optional bool starred */ 10:
|
|
214
498
|
message.starred = reader.bool();
|
|
215
499
|
break;
|
|
500
|
+
case /* resources.notifications.NotificationKind kind */ 11:
|
|
501
|
+
message.kind = reader.int32();
|
|
502
|
+
break;
|
|
503
|
+
case /* optional int32 actor_user_id */ 12:
|
|
504
|
+
message.actorUserId = reader.int32();
|
|
505
|
+
break;
|
|
506
|
+
case /* optional string entity_type */ 13:
|
|
507
|
+
message.entityType = reader.string();
|
|
508
|
+
break;
|
|
509
|
+
case /* optional int64 entity_id */ 14:
|
|
510
|
+
message.entityId = reader.int64().toNumber();
|
|
511
|
+
break;
|
|
512
|
+
case /* resources.timestamp.Timestamp archived_at */ 15:
|
|
513
|
+
message.archivedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.archivedAt);
|
|
514
|
+
break;
|
|
515
|
+
case /* optional resources.notifications.NotificationDelivery delivery */ 16:
|
|
516
|
+
message.delivery = NotificationDelivery.internalBinaryRead(reader, reader.uint32(), options, message.delivery);
|
|
517
|
+
break;
|
|
216
518
|
default:
|
|
217
519
|
let u = options.readUnknownField;
|
|
218
520
|
if (u === "throw")
|
|
@@ -255,6 +557,24 @@ class Notification$Type extends MessageType<Notification> {
|
|
|
255
557
|
/* optional bool starred = 10; */
|
|
256
558
|
if (message.starred !== undefined)
|
|
257
559
|
writer.tag(10, WireType.Varint).bool(message.starred);
|
|
560
|
+
/* resources.notifications.NotificationKind kind = 11; */
|
|
561
|
+
if (message.kind !== 0)
|
|
562
|
+
writer.tag(11, WireType.Varint).int32(message.kind);
|
|
563
|
+
/* optional int32 actor_user_id = 12; */
|
|
564
|
+
if (message.actorUserId !== undefined)
|
|
565
|
+
writer.tag(12, WireType.Varint).int32(message.actorUserId);
|
|
566
|
+
/* optional string entity_type = 13; */
|
|
567
|
+
if (message.entityType !== undefined)
|
|
568
|
+
writer.tag(13, WireType.LengthDelimited).string(message.entityType);
|
|
569
|
+
/* optional int64 entity_id = 14; */
|
|
570
|
+
if (message.entityId !== undefined)
|
|
571
|
+
writer.tag(14, WireType.Varint).int64(message.entityId);
|
|
572
|
+
/* resources.timestamp.Timestamp archived_at = 15; */
|
|
573
|
+
if (message.archivedAt)
|
|
574
|
+
Timestamp.internalBinaryWrite(message.archivedAt, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
575
|
+
/* optional resources.notifications.NotificationDelivery delivery = 16; */
|
|
576
|
+
if (message.delivery)
|
|
577
|
+
NotificationDelivery.internalBinaryWrite(message.delivery, writer.tag(16, WireType.LengthDelimited).fork(), options).join();
|
|
258
578
|
let u = options.writeUnknownFields;
|
|
259
579
|
if (u !== false)
|
|
260
580
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|