@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
|
@@ -19,8 +19,10 @@ import { JobGradeEvent } from "../../resources/notifications/events/events";
|
|
|
19
19
|
import { JobEvent } from "../../resources/notifications/events/events";
|
|
20
20
|
import { UserEvent } from "../../resources/notifications/events/events";
|
|
21
21
|
import { ClientView } from "../../resources/notifications/clientview/clientview";
|
|
22
|
+
import { NotificationPreference } from "../../resources/notifications/notifications";
|
|
22
23
|
import { Notification } from "../../resources/notifications/notifications";
|
|
23
24
|
import { PaginationResponse } from "../../resources/common/database/database";
|
|
25
|
+
import { NotificationKind } from "../../resources/notifications/notifications";
|
|
24
26
|
import { NotificationCategory } from "../../resources/notifications/notifications";
|
|
25
27
|
import { PaginationRequest } from "../../resources/common/database/database";
|
|
26
28
|
/**
|
|
@@ -39,6 +41,22 @@ export interface GetNotificationsRequest {
|
|
|
39
41
|
* @generated from protobuf field: repeated resources.notifications.NotificationCategory categories = 3
|
|
40
42
|
*/
|
|
41
43
|
categories: NotificationCategory[];
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf field: repeated resources.notifications.NotificationKind kinds = 4
|
|
46
|
+
*/
|
|
47
|
+
kinds: NotificationKind[];
|
|
48
|
+
/**
|
|
49
|
+
* @generated from protobuf field: optional bool include_archived = 5
|
|
50
|
+
*/
|
|
51
|
+
includeArchived?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf field: optional bool starred_only = 6
|
|
54
|
+
*/
|
|
55
|
+
starredOnly?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* @generated from protobuf field: optional bool archived_only = 7
|
|
58
|
+
*/
|
|
59
|
+
archivedOnly?: boolean;
|
|
42
60
|
}
|
|
43
61
|
/**
|
|
44
62
|
* @generated from protobuf message services.notifications.GetNotificationsResponse
|
|
@@ -78,6 +96,85 @@ export interface MarkNotificationsResponse {
|
|
|
78
96
|
* @generated from protobuf field: int64 updated = 1
|
|
79
97
|
*/
|
|
80
98
|
updated: number;
|
|
99
|
+
/**
|
|
100
|
+
* The authoritative unread count after the mutation.
|
|
101
|
+
*
|
|
102
|
+
* @generated from protobuf field: int64 unread_count = 2
|
|
103
|
+
*/
|
|
104
|
+
unreadCount: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @generated from protobuf message services.notifications.UpdateNotificationStateRequest
|
|
108
|
+
*/
|
|
109
|
+
export interface UpdateNotificationStateRequest {
|
|
110
|
+
/**
|
|
111
|
+
* @generated from protobuf field: repeated int64 ids = 1
|
|
112
|
+
*/
|
|
113
|
+
ids: number[];
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf field: optional bool unread = 2
|
|
116
|
+
*/
|
|
117
|
+
unread?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* @generated from protobuf field: optional bool starred = 3
|
|
120
|
+
*/
|
|
121
|
+
starred?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* @generated from protobuf field: optional bool archived = 4
|
|
124
|
+
*/
|
|
125
|
+
archived?: boolean;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* @generated from protobuf message services.notifications.UpdateNotificationStateResponse
|
|
129
|
+
*/
|
|
130
|
+
export interface UpdateNotificationStateResponse {
|
|
131
|
+
/**
|
|
132
|
+
* @generated from protobuf field: int64 updated = 1
|
|
133
|
+
*/
|
|
134
|
+
updated: number;
|
|
135
|
+
/**
|
|
136
|
+
* @generated from protobuf field: int64 unread_count = 2
|
|
137
|
+
*/
|
|
138
|
+
unreadCount: number;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* @generated from protobuf message services.notifications.GetNotificationPreferencesRequest
|
|
142
|
+
*/
|
|
143
|
+
export interface GetNotificationPreferencesRequest {
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* @generated from protobuf message services.notifications.GetNotificationPreferencesResponse
|
|
147
|
+
*/
|
|
148
|
+
export interface GetNotificationPreferencesResponse {
|
|
149
|
+
/**
|
|
150
|
+
* @generated from protobuf field: repeated resources.notifications.NotificationPreference preferences = 1
|
|
151
|
+
*/
|
|
152
|
+
preferences: NotificationPreference[];
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Updates one preference scope. Fields omitted from preference inherit from a
|
|
156
|
+
* less-specific scope. reset removes the complete override for this scope.
|
|
157
|
+
*
|
|
158
|
+
* @generated from protobuf message services.notifications.UpdateNotificationPreferenceRequest
|
|
159
|
+
*/
|
|
160
|
+
export interface UpdateNotificationPreferenceRequest {
|
|
161
|
+
/**
|
|
162
|
+
* @generated from protobuf field: resources.notifications.NotificationPreference preference = 1
|
|
163
|
+
*/
|
|
164
|
+
preference?: NotificationPreference;
|
|
165
|
+
/**
|
|
166
|
+
* @generated from protobuf field: optional bool reset = 2
|
|
167
|
+
*/
|
|
168
|
+
reset?: boolean;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* @generated from protobuf message services.notifications.UpdateNotificationPreferenceResponse
|
|
172
|
+
*/
|
|
173
|
+
export interface UpdateNotificationPreferenceResponse {
|
|
174
|
+
/**
|
|
175
|
+
* @generated from protobuf field: repeated resources.notifications.NotificationPreference preferences = 1
|
|
176
|
+
*/
|
|
177
|
+
preferences: NotificationPreference[];
|
|
81
178
|
}
|
|
82
179
|
/**
|
|
83
180
|
* @generated from protobuf message services.notifications.StreamRequest
|
|
@@ -147,6 +244,15 @@ export interface StreamResponse {
|
|
|
147
244
|
* @generated from protobuf field: resources.notifications.clientview.ObjectEvent object_event = 8
|
|
148
245
|
*/
|
|
149
246
|
objectEvent: ObjectEvent;
|
|
247
|
+
} | {
|
|
248
|
+
oneofKind: "notificationState";
|
|
249
|
+
/**
|
|
250
|
+
* Sent immediately after a stream is established so clients can render
|
|
251
|
+
* notification state without waiting for a later event.
|
|
252
|
+
*
|
|
253
|
+
* @generated from protobuf field: bool notification_state = 9
|
|
254
|
+
*/
|
|
255
|
+
notificationState: boolean;
|
|
150
256
|
} | {
|
|
151
257
|
oneofKind: undefined;
|
|
152
258
|
};
|
|
@@ -157,12 +263,17 @@ class GetNotificationsRequest$Type extends MessageType<GetNotificationsRequest>
|
|
|
157
263
|
super("services.notifications.GetNotificationsRequest", [
|
|
158
264
|
{ no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
|
|
159
265
|
{ no: 2, name: "include_read", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
160
|
-
{ no: 3, name: "categories", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.notifications.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "buf.validate.field": { repeated: { maxItems: "
|
|
266
|
+
{ no: 3, name: "categories", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.notifications.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "buf.validate.field": { repeated: { maxItems: "8", items: { enum: { definedOnly: true } } } } } },
|
|
267
|
+
{ no: 4, name: "kinds", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.notifications.NotificationKind", NotificationKind, "NOTIFICATION_KIND_"], options: { "buf.validate.field": { repeated: { maxItems: "32", items: { enum: { definedOnly: true } } } } } },
|
|
268
|
+
{ no: 5, name: "include_archived", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
269
|
+
{ no: 6, name: "starred_only", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
270
|
+
{ no: 7, name: "archived_only", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
161
271
|
]);
|
|
162
272
|
}
|
|
163
273
|
create(value?: PartialMessage<GetNotificationsRequest>): GetNotificationsRequest {
|
|
164
274
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
165
275
|
message.categories = [];
|
|
276
|
+
message.kinds = [];
|
|
166
277
|
if (value !== undefined)
|
|
167
278
|
reflectionMergePartial<GetNotificationsRequest>(this, message, value);
|
|
168
279
|
return message;
|
|
@@ -185,6 +296,22 @@ class GetNotificationsRequest$Type extends MessageType<GetNotificationsRequest>
|
|
|
185
296
|
else
|
|
186
297
|
message.categories.push(reader.int32());
|
|
187
298
|
break;
|
|
299
|
+
case /* repeated resources.notifications.NotificationKind kinds */ 4:
|
|
300
|
+
if (wireType === WireType.LengthDelimited)
|
|
301
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
302
|
+
message.kinds.push(reader.int32());
|
|
303
|
+
else
|
|
304
|
+
message.kinds.push(reader.int32());
|
|
305
|
+
break;
|
|
306
|
+
case /* optional bool include_archived */ 5:
|
|
307
|
+
message.includeArchived = reader.bool();
|
|
308
|
+
break;
|
|
309
|
+
case /* optional bool starred_only */ 6:
|
|
310
|
+
message.starredOnly = reader.bool();
|
|
311
|
+
break;
|
|
312
|
+
case /* optional bool archived_only */ 7:
|
|
313
|
+
message.archivedOnly = reader.bool();
|
|
314
|
+
break;
|
|
188
315
|
default:
|
|
189
316
|
let u = options.readUnknownField;
|
|
190
317
|
if (u === "throw")
|
|
@@ -210,6 +337,22 @@ class GetNotificationsRequest$Type extends MessageType<GetNotificationsRequest>
|
|
|
210
337
|
writer.int32(message.categories[i]);
|
|
211
338
|
writer.join();
|
|
212
339
|
}
|
|
340
|
+
/* repeated resources.notifications.NotificationKind kinds = 4; */
|
|
341
|
+
if (message.kinds.length) {
|
|
342
|
+
writer.tag(4, WireType.LengthDelimited).fork();
|
|
343
|
+
for (let i = 0; i < message.kinds.length; i++)
|
|
344
|
+
writer.int32(message.kinds[i]);
|
|
345
|
+
writer.join();
|
|
346
|
+
}
|
|
347
|
+
/* optional bool include_archived = 5; */
|
|
348
|
+
if (message.includeArchived !== undefined)
|
|
349
|
+
writer.tag(5, WireType.Varint).bool(message.includeArchived);
|
|
350
|
+
/* optional bool starred_only = 6; */
|
|
351
|
+
if (message.starredOnly !== undefined)
|
|
352
|
+
writer.tag(6, WireType.Varint).bool(message.starredOnly);
|
|
353
|
+
/* optional bool archived_only = 7; */
|
|
354
|
+
if (message.archivedOnly !== undefined)
|
|
355
|
+
writer.tag(7, WireType.Varint).bool(message.archivedOnly);
|
|
213
356
|
let u = options.writeUnknownFields;
|
|
214
357
|
if (u !== false)
|
|
215
358
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -348,12 +491,14 @@ export const MarkNotificationsRequest = new MarkNotificationsRequest$Type();
|
|
|
348
491
|
class MarkNotificationsResponse$Type extends MessageType<MarkNotificationsResponse> {
|
|
349
492
|
constructor() {
|
|
350
493
|
super("services.notifications.MarkNotificationsResponse", [
|
|
351
|
-
{ no: 1, name: "updated", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
494
|
+
{ no: 1, name: "updated", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
495
|
+
{ no: 2, name: "unread_count", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
352
496
|
]);
|
|
353
497
|
}
|
|
354
498
|
create(value?: PartialMessage<MarkNotificationsResponse>): MarkNotificationsResponse {
|
|
355
499
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
356
500
|
message.updated = 0;
|
|
501
|
+
message.unreadCount = 0;
|
|
357
502
|
if (value !== undefined)
|
|
358
503
|
reflectionMergePartial<MarkNotificationsResponse>(this, message, value);
|
|
359
504
|
return message;
|
|
@@ -366,6 +511,9 @@ class MarkNotificationsResponse$Type extends MessageType<MarkNotificationsRespon
|
|
|
366
511
|
case /* int64 updated */ 1:
|
|
367
512
|
message.updated = reader.int64().toNumber();
|
|
368
513
|
break;
|
|
514
|
+
case /* int64 unread_count */ 2:
|
|
515
|
+
message.unreadCount = reader.int64().toNumber();
|
|
516
|
+
break;
|
|
369
517
|
default:
|
|
370
518
|
let u = options.readUnknownField;
|
|
371
519
|
if (u === "throw")
|
|
@@ -381,6 +529,9 @@ class MarkNotificationsResponse$Type extends MessageType<MarkNotificationsRespon
|
|
|
381
529
|
/* int64 updated = 1; */
|
|
382
530
|
if (message.updated !== 0)
|
|
383
531
|
writer.tag(1, WireType.Varint).int64(message.updated);
|
|
532
|
+
/* int64 unread_count = 2; */
|
|
533
|
+
if (message.unreadCount !== 0)
|
|
534
|
+
writer.tag(2, WireType.Varint).int64(message.unreadCount);
|
|
384
535
|
let u = options.writeUnknownFields;
|
|
385
536
|
if (u !== false)
|
|
386
537
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -392,6 +543,322 @@ class MarkNotificationsResponse$Type extends MessageType<MarkNotificationsRespon
|
|
|
392
543
|
*/
|
|
393
544
|
export const MarkNotificationsResponse = new MarkNotificationsResponse$Type();
|
|
394
545
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
546
|
+
class UpdateNotificationStateRequest$Type extends MessageType<UpdateNotificationStateRequest> {
|
|
547
|
+
constructor() {
|
|
548
|
+
super("services.notifications.UpdateNotificationStateRequest", [
|
|
549
|
+
{ no: 1, name: "ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { repeated: { minItems: "1", maxItems: "20" } } } },
|
|
550
|
+
{ no: 2, name: "unread", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
551
|
+
{ no: 3, name: "starred", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
552
|
+
{ no: 4, name: "archived", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
553
|
+
]);
|
|
554
|
+
}
|
|
555
|
+
create(value?: PartialMessage<UpdateNotificationStateRequest>): UpdateNotificationStateRequest {
|
|
556
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
557
|
+
message.ids = [];
|
|
558
|
+
if (value !== undefined)
|
|
559
|
+
reflectionMergePartial<UpdateNotificationStateRequest>(this, message, value);
|
|
560
|
+
return message;
|
|
561
|
+
}
|
|
562
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateNotificationStateRequest): UpdateNotificationStateRequest {
|
|
563
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
564
|
+
while (reader.pos < end) {
|
|
565
|
+
let [fieldNo, wireType] = reader.tag();
|
|
566
|
+
switch (fieldNo) {
|
|
567
|
+
case /* repeated int64 ids */ 1:
|
|
568
|
+
if (wireType === WireType.LengthDelimited)
|
|
569
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
570
|
+
message.ids.push(reader.int64().toNumber());
|
|
571
|
+
else
|
|
572
|
+
message.ids.push(reader.int64().toNumber());
|
|
573
|
+
break;
|
|
574
|
+
case /* optional bool unread */ 2:
|
|
575
|
+
message.unread = reader.bool();
|
|
576
|
+
break;
|
|
577
|
+
case /* optional bool starred */ 3:
|
|
578
|
+
message.starred = reader.bool();
|
|
579
|
+
break;
|
|
580
|
+
case /* optional bool archived */ 4:
|
|
581
|
+
message.archived = reader.bool();
|
|
582
|
+
break;
|
|
583
|
+
default:
|
|
584
|
+
let u = options.readUnknownField;
|
|
585
|
+
if (u === "throw")
|
|
586
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
587
|
+
let d = reader.skip(wireType);
|
|
588
|
+
if (u !== false)
|
|
589
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
return message;
|
|
593
|
+
}
|
|
594
|
+
internalBinaryWrite(message: UpdateNotificationStateRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
595
|
+
/* repeated int64 ids = 1; */
|
|
596
|
+
if (message.ids.length) {
|
|
597
|
+
writer.tag(1, WireType.LengthDelimited).fork();
|
|
598
|
+
for (let i = 0; i < message.ids.length; i++)
|
|
599
|
+
writer.int64(message.ids[i]);
|
|
600
|
+
writer.join();
|
|
601
|
+
}
|
|
602
|
+
/* optional bool unread = 2; */
|
|
603
|
+
if (message.unread !== undefined)
|
|
604
|
+
writer.tag(2, WireType.Varint).bool(message.unread);
|
|
605
|
+
/* optional bool starred = 3; */
|
|
606
|
+
if (message.starred !== undefined)
|
|
607
|
+
writer.tag(3, WireType.Varint).bool(message.starred);
|
|
608
|
+
/* optional bool archived = 4; */
|
|
609
|
+
if (message.archived !== undefined)
|
|
610
|
+
writer.tag(4, WireType.Varint).bool(message.archived);
|
|
611
|
+
let u = options.writeUnknownFields;
|
|
612
|
+
if (u !== false)
|
|
613
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
614
|
+
return writer;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* @generated MessageType for protobuf message services.notifications.UpdateNotificationStateRequest
|
|
619
|
+
*/
|
|
620
|
+
export const UpdateNotificationStateRequest = new UpdateNotificationStateRequest$Type();
|
|
621
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
622
|
+
class UpdateNotificationStateResponse$Type extends MessageType<UpdateNotificationStateResponse> {
|
|
623
|
+
constructor() {
|
|
624
|
+
super("services.notifications.UpdateNotificationStateResponse", [
|
|
625
|
+
{ no: 1, name: "updated", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
626
|
+
{ no: 2, name: "unread_count", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
627
|
+
]);
|
|
628
|
+
}
|
|
629
|
+
create(value?: PartialMessage<UpdateNotificationStateResponse>): UpdateNotificationStateResponse {
|
|
630
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
631
|
+
message.updated = 0;
|
|
632
|
+
message.unreadCount = 0;
|
|
633
|
+
if (value !== undefined)
|
|
634
|
+
reflectionMergePartial<UpdateNotificationStateResponse>(this, message, value);
|
|
635
|
+
return message;
|
|
636
|
+
}
|
|
637
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateNotificationStateResponse): UpdateNotificationStateResponse {
|
|
638
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
639
|
+
while (reader.pos < end) {
|
|
640
|
+
let [fieldNo, wireType] = reader.tag();
|
|
641
|
+
switch (fieldNo) {
|
|
642
|
+
case /* int64 updated */ 1:
|
|
643
|
+
message.updated = reader.int64().toNumber();
|
|
644
|
+
break;
|
|
645
|
+
case /* int64 unread_count */ 2:
|
|
646
|
+
message.unreadCount = reader.int64().toNumber();
|
|
647
|
+
break;
|
|
648
|
+
default:
|
|
649
|
+
let u = options.readUnknownField;
|
|
650
|
+
if (u === "throw")
|
|
651
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
652
|
+
let d = reader.skip(wireType);
|
|
653
|
+
if (u !== false)
|
|
654
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
return message;
|
|
658
|
+
}
|
|
659
|
+
internalBinaryWrite(message: UpdateNotificationStateResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
660
|
+
/* int64 updated = 1; */
|
|
661
|
+
if (message.updated !== 0)
|
|
662
|
+
writer.tag(1, WireType.Varint).int64(message.updated);
|
|
663
|
+
/* int64 unread_count = 2; */
|
|
664
|
+
if (message.unreadCount !== 0)
|
|
665
|
+
writer.tag(2, WireType.Varint).int64(message.unreadCount);
|
|
666
|
+
let u = options.writeUnknownFields;
|
|
667
|
+
if (u !== false)
|
|
668
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
669
|
+
return writer;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* @generated MessageType for protobuf message services.notifications.UpdateNotificationStateResponse
|
|
674
|
+
*/
|
|
675
|
+
export const UpdateNotificationStateResponse = new UpdateNotificationStateResponse$Type();
|
|
676
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
677
|
+
class GetNotificationPreferencesRequest$Type extends MessageType<GetNotificationPreferencesRequest> {
|
|
678
|
+
constructor() {
|
|
679
|
+
super("services.notifications.GetNotificationPreferencesRequest", []);
|
|
680
|
+
}
|
|
681
|
+
create(value?: PartialMessage<GetNotificationPreferencesRequest>): GetNotificationPreferencesRequest {
|
|
682
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
683
|
+
if (value !== undefined)
|
|
684
|
+
reflectionMergePartial<GetNotificationPreferencesRequest>(this, message, value);
|
|
685
|
+
return message;
|
|
686
|
+
}
|
|
687
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetNotificationPreferencesRequest): GetNotificationPreferencesRequest {
|
|
688
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
689
|
+
while (reader.pos < end) {
|
|
690
|
+
let [fieldNo, wireType] = reader.tag();
|
|
691
|
+
switch (fieldNo) {
|
|
692
|
+
default:
|
|
693
|
+
let u = options.readUnknownField;
|
|
694
|
+
if (u === "throw")
|
|
695
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
696
|
+
let d = reader.skip(wireType);
|
|
697
|
+
if (u !== false)
|
|
698
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return message;
|
|
702
|
+
}
|
|
703
|
+
internalBinaryWrite(message: GetNotificationPreferencesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
704
|
+
let u = options.writeUnknownFields;
|
|
705
|
+
if (u !== false)
|
|
706
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
707
|
+
return writer;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* @generated MessageType for protobuf message services.notifications.GetNotificationPreferencesRequest
|
|
712
|
+
*/
|
|
713
|
+
export const GetNotificationPreferencesRequest = new GetNotificationPreferencesRequest$Type();
|
|
714
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
715
|
+
class GetNotificationPreferencesResponse$Type extends MessageType<GetNotificationPreferencesResponse> {
|
|
716
|
+
constructor() {
|
|
717
|
+
super("services.notifications.GetNotificationPreferencesResponse", [
|
|
718
|
+
{ no: 1, name: "preferences", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => NotificationPreference, options: { "codegen.itemslen.enabled": true } }
|
|
719
|
+
]);
|
|
720
|
+
}
|
|
721
|
+
create(value?: PartialMessage<GetNotificationPreferencesResponse>): GetNotificationPreferencesResponse {
|
|
722
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
723
|
+
message.preferences = [];
|
|
724
|
+
if (value !== undefined)
|
|
725
|
+
reflectionMergePartial<GetNotificationPreferencesResponse>(this, message, value);
|
|
726
|
+
return message;
|
|
727
|
+
}
|
|
728
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetNotificationPreferencesResponse): GetNotificationPreferencesResponse {
|
|
729
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
730
|
+
while (reader.pos < end) {
|
|
731
|
+
let [fieldNo, wireType] = reader.tag();
|
|
732
|
+
switch (fieldNo) {
|
|
733
|
+
case /* repeated resources.notifications.NotificationPreference preferences */ 1:
|
|
734
|
+
message.preferences.push(NotificationPreference.internalBinaryRead(reader, reader.uint32(), options));
|
|
735
|
+
break;
|
|
736
|
+
default:
|
|
737
|
+
let u = options.readUnknownField;
|
|
738
|
+
if (u === "throw")
|
|
739
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
740
|
+
let d = reader.skip(wireType);
|
|
741
|
+
if (u !== false)
|
|
742
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
return message;
|
|
746
|
+
}
|
|
747
|
+
internalBinaryWrite(message: GetNotificationPreferencesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
748
|
+
/* repeated resources.notifications.NotificationPreference preferences = 1; */
|
|
749
|
+
for (let i = 0; i < message.preferences.length; i++)
|
|
750
|
+
NotificationPreference.internalBinaryWrite(message.preferences[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
751
|
+
let u = options.writeUnknownFields;
|
|
752
|
+
if (u !== false)
|
|
753
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
754
|
+
return writer;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* @generated MessageType for protobuf message services.notifications.GetNotificationPreferencesResponse
|
|
759
|
+
*/
|
|
760
|
+
export const GetNotificationPreferencesResponse = new GetNotificationPreferencesResponse$Type();
|
|
761
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
762
|
+
class UpdateNotificationPreferenceRequest$Type extends MessageType<UpdateNotificationPreferenceRequest> {
|
|
763
|
+
constructor() {
|
|
764
|
+
super("services.notifications.UpdateNotificationPreferenceRequest", [
|
|
765
|
+
{ no: 1, name: "preference", kind: "message", T: () => NotificationPreference, options: { "buf.validate.field": { required: true } } },
|
|
766
|
+
{ no: 2, name: "reset", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
767
|
+
]);
|
|
768
|
+
}
|
|
769
|
+
create(value?: PartialMessage<UpdateNotificationPreferenceRequest>): UpdateNotificationPreferenceRequest {
|
|
770
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
771
|
+
if (value !== undefined)
|
|
772
|
+
reflectionMergePartial<UpdateNotificationPreferenceRequest>(this, message, value);
|
|
773
|
+
return message;
|
|
774
|
+
}
|
|
775
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateNotificationPreferenceRequest): UpdateNotificationPreferenceRequest {
|
|
776
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
777
|
+
while (reader.pos < end) {
|
|
778
|
+
let [fieldNo, wireType] = reader.tag();
|
|
779
|
+
switch (fieldNo) {
|
|
780
|
+
case /* resources.notifications.NotificationPreference preference */ 1:
|
|
781
|
+
message.preference = NotificationPreference.internalBinaryRead(reader, reader.uint32(), options, message.preference);
|
|
782
|
+
break;
|
|
783
|
+
case /* optional bool reset */ 2:
|
|
784
|
+
message.reset = reader.bool();
|
|
785
|
+
break;
|
|
786
|
+
default:
|
|
787
|
+
let u = options.readUnknownField;
|
|
788
|
+
if (u === "throw")
|
|
789
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
790
|
+
let d = reader.skip(wireType);
|
|
791
|
+
if (u !== false)
|
|
792
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
return message;
|
|
796
|
+
}
|
|
797
|
+
internalBinaryWrite(message: UpdateNotificationPreferenceRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
798
|
+
/* resources.notifications.NotificationPreference preference = 1; */
|
|
799
|
+
if (message.preference)
|
|
800
|
+
NotificationPreference.internalBinaryWrite(message.preference, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
801
|
+
/* optional bool reset = 2; */
|
|
802
|
+
if (message.reset !== undefined)
|
|
803
|
+
writer.tag(2, WireType.Varint).bool(message.reset);
|
|
804
|
+
let u = options.writeUnknownFields;
|
|
805
|
+
if (u !== false)
|
|
806
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
807
|
+
return writer;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* @generated MessageType for protobuf message services.notifications.UpdateNotificationPreferenceRequest
|
|
812
|
+
*/
|
|
813
|
+
export const UpdateNotificationPreferenceRequest = new UpdateNotificationPreferenceRequest$Type();
|
|
814
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
815
|
+
class UpdateNotificationPreferenceResponse$Type extends MessageType<UpdateNotificationPreferenceResponse> {
|
|
816
|
+
constructor() {
|
|
817
|
+
super("services.notifications.UpdateNotificationPreferenceResponse", [
|
|
818
|
+
{ no: 1, name: "preferences", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => NotificationPreference, options: { "codegen.itemslen.enabled": true } }
|
|
819
|
+
]);
|
|
820
|
+
}
|
|
821
|
+
create(value?: PartialMessage<UpdateNotificationPreferenceResponse>): UpdateNotificationPreferenceResponse {
|
|
822
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
823
|
+
message.preferences = [];
|
|
824
|
+
if (value !== undefined)
|
|
825
|
+
reflectionMergePartial<UpdateNotificationPreferenceResponse>(this, message, value);
|
|
826
|
+
return message;
|
|
827
|
+
}
|
|
828
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateNotificationPreferenceResponse): UpdateNotificationPreferenceResponse {
|
|
829
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
830
|
+
while (reader.pos < end) {
|
|
831
|
+
let [fieldNo, wireType] = reader.tag();
|
|
832
|
+
switch (fieldNo) {
|
|
833
|
+
case /* repeated resources.notifications.NotificationPreference preferences */ 1:
|
|
834
|
+
message.preferences.push(NotificationPreference.internalBinaryRead(reader, reader.uint32(), options));
|
|
835
|
+
break;
|
|
836
|
+
default:
|
|
837
|
+
let u = options.readUnknownField;
|
|
838
|
+
if (u === "throw")
|
|
839
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
840
|
+
let d = reader.skip(wireType);
|
|
841
|
+
if (u !== false)
|
|
842
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
return message;
|
|
846
|
+
}
|
|
847
|
+
internalBinaryWrite(message: UpdateNotificationPreferenceResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
848
|
+
/* repeated resources.notifications.NotificationPreference preferences = 1; */
|
|
849
|
+
for (let i = 0; i < message.preferences.length; i++)
|
|
850
|
+
NotificationPreference.internalBinaryWrite(message.preferences[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
851
|
+
let u = options.writeUnknownFields;
|
|
852
|
+
if (u !== false)
|
|
853
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
854
|
+
return writer;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* @generated MessageType for protobuf message services.notifications.UpdateNotificationPreferenceResponse
|
|
859
|
+
*/
|
|
860
|
+
export const UpdateNotificationPreferenceResponse = new UpdateNotificationPreferenceResponse$Type();
|
|
861
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
395
862
|
class StreamRequest$Type extends MessageType<StreamRequest> {
|
|
396
863
|
constructor() {
|
|
397
864
|
super("services.notifications.StreamRequest", [
|
|
@@ -452,7 +919,8 @@ class StreamResponse$Type extends MessageType<StreamResponse> {
|
|
|
452
919
|
{ no: 5, name: "job_grade_event", kind: "message", oneof: "data", T: () => JobGradeEvent },
|
|
453
920
|
{ no: 6, name: "system_event", kind: "message", oneof: "data", T: () => SystemEvent },
|
|
454
921
|
{ no: 7, name: "mailer_event", kind: "message", oneof: "data", T: () => MailerEvent },
|
|
455
|
-
{ no: 8, name: "object_event", kind: "message", oneof: "data", T: () => ObjectEvent }
|
|
922
|
+
{ no: 8, name: "object_event", kind: "message", oneof: "data", T: () => ObjectEvent },
|
|
923
|
+
{ no: 9, name: "notification_state", kind: "scalar", oneof: "data", T: 8 /*ScalarType.BOOL*/ }
|
|
456
924
|
]);
|
|
457
925
|
}
|
|
458
926
|
create(value?: PartialMessage<StreamResponse>): StreamResponse {
|
|
@@ -510,6 +978,12 @@ class StreamResponse$Type extends MessageType<StreamResponse> {
|
|
|
510
978
|
objectEvent: ObjectEvent.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).objectEvent)
|
|
511
979
|
};
|
|
512
980
|
break;
|
|
981
|
+
case /* bool notification_state */ 9:
|
|
982
|
+
message.data = {
|
|
983
|
+
oneofKind: "notificationState",
|
|
984
|
+
notificationState: reader.bool()
|
|
985
|
+
};
|
|
986
|
+
break;
|
|
513
987
|
default:
|
|
514
988
|
let u = options.readUnknownField;
|
|
515
989
|
if (u === "throw")
|
|
@@ -546,6 +1020,9 @@ class StreamResponse$Type extends MessageType<StreamResponse> {
|
|
|
546
1020
|
/* resources.notifications.clientview.ObjectEvent object_event = 8; */
|
|
547
1021
|
if (message.data.oneofKind === "objectEvent")
|
|
548
1022
|
ObjectEvent.internalBinaryWrite(message.data.objectEvent, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
1023
|
+
/* bool notification_state = 9; */
|
|
1024
|
+
if (message.data.oneofKind === "notificationState")
|
|
1025
|
+
writer.tag(9, WireType.Varint).bool(message.data.notificationState);
|
|
549
1026
|
let u = options.writeUnknownFields;
|
|
550
1027
|
if (u !== false)
|
|
551
1028
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -562,5 +1039,8 @@ export const StreamResponse = new StreamResponse$Type();
|
|
|
562
1039
|
export const NotificationsService = new ServiceType("services.notifications.NotificationsService", [
|
|
563
1040
|
{ name: "GetNotifications", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: GetNotificationsRequest, O: GetNotificationsResponse },
|
|
564
1041
|
{ name: "MarkNotifications", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: MarkNotificationsRequest, O: MarkNotificationsResponse },
|
|
1042
|
+
{ name: "UpdateNotificationState", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: UpdateNotificationStateRequest, O: UpdateNotificationStateResponse },
|
|
1043
|
+
{ name: "GetNotificationPreferences", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: GetNotificationPreferencesRequest, O: GetNotificationPreferencesResponse },
|
|
1044
|
+
{ name: "UpdateNotificationPreference", options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: UpdateNotificationPreferenceRequest, O: UpdateNotificationPreferenceResponse },
|
|
565
1045
|
{ name: "Stream", serverStreaming: true, clientStreaming: true, options: { "codegen.perms.perms": { enabled: true, name: "Any" } }, I: StreamRequest, O: StreamResponse }
|
|
566
1046
|
]);
|