@fivenet-app/gen 0.9.3-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/google/protobuf/any.ts +322 -0
- package/google/protobuf/descriptor.ts +3475 -0
- package/google/protobuf/duration.ts +231 -0
- package/google/protobuf/timestamp.ts +290 -0
- package/package.json +15 -0
- package/perms.ts +178 -0
- package/resources/accounts/accounts.ts +195 -0
- package/resources/accounts/oauth2.ts +230 -0
- package/resources/calendar/access.ts +362 -0
- package/resources/calendar/calendar.ts +955 -0
- package/resources/centrum/access.ts +380 -0
- package/resources/centrum/dispatches.ts +854 -0
- package/resources/centrum/general.ts +231 -0
- package/resources/centrum/settings.ts +303 -0
- package/resources/centrum/units.ts +620 -0
- package/resources/common/access/dummy.ts +309 -0
- package/resources/common/content/content.ts +252 -0
- package/resources/common/cron/cron.ts +536 -0
- package/resources/common/database/database.ts +306 -0
- package/resources/common/error.ts +79 -0
- package/resources/common/grpcws/grpcws.ts +615 -0
- package/resources/common/i18n.ts +102 -0
- package/resources/common/uuid.ts +68 -0
- package/resources/documents/access.ts +388 -0
- package/resources/documents/activity.ts +803 -0
- package/resources/documents/category.ts +132 -0
- package/resources/documents/comment.ts +161 -0
- package/resources/documents/documents.ts +1124 -0
- package/resources/documents/requests.ts +196 -0
- package/resources/documents/templates.ts +949 -0
- package/resources/documents/workflow.ts +349 -0
- package/resources/filestore/file.ts +204 -0
- package/resources/internet/ads.ts +257 -0
- package/resources/internet/domain.ts +136 -0
- package/resources/internet/internet.ts +344 -0
- package/resources/internet/page.ts +236 -0
- package/resources/internet/search.ts +104 -0
- package/resources/jobs/activity.ts +600 -0
- package/resources/jobs/colleagues.ts +346 -0
- package/resources/jobs/conduct.ts +220 -0
- package/resources/jobs/labels.ts +240 -0
- package/resources/jobs/timeclock.ts +372 -0
- package/resources/laws/laws.ts +293 -0
- package/resources/livemap/livemap.ts +728 -0
- package/resources/livemap/tracker.ts +81 -0
- package/resources/mailer/access.ts +485 -0
- package/resources/mailer/email.ts +222 -0
- package/resources/mailer/events.ts +196 -0
- package/resources/mailer/message.ts +285 -0
- package/resources/mailer/settings.ts +95 -0
- package/resources/mailer/template.ts +164 -0
- package/resources/mailer/thread.ts +422 -0
- package/resources/mailer/user.ts +93 -0
- package/resources/notifications/events.ts +287 -0
- package/resources/notifications/notifications.ts +444 -0
- package/resources/permissions/permissions.ts +829 -0
- package/resources/qualifications/access.ts +275 -0
- package/resources/qualifications/exam.ts +1421 -0
- package/resources/qualifications/qualifications.ts +1289 -0
- package/resources/rector/audit.ts +226 -0
- package/resources/rector/config.ts +922 -0
- package/resources/stats/stats.ts +67 -0
- package/resources/sync/activity.ts +356 -0
- package/resources/sync/data.ts +455 -0
- package/resources/timestamp/timestamp.ts +78 -0
- package/resources/users/activity.ts +211 -0
- package/resources/users/job_props.ts +992 -0
- package/resources/users/jobs.ts +171 -0
- package/resources/users/labels.ts +161 -0
- package/resources/users/props.ts +207 -0
- package/resources/users/users.ts +570 -0
- package/resources/vehicles/vehicles.ts +114 -0
- package/resources/wiki/access.ts +362 -0
- package/resources/wiki/activity.ts +591 -0
- package/resources/wiki/page.ts +548 -0
- package/services/auth/auth.client.ts +171 -0
- package/services/auth/auth.ts +1331 -0
- package/services/calendar/calendar.client.ts +262 -0
- package/services/calendar/calendar.ts +1733 -0
- package/services/centrum/centrum.client.ts +365 -0
- package/services/centrum/centrum.ts +2619 -0
- package/services/citizenstore/citizenstore.client.ts +126 -0
- package/services/citizenstore/citizenstore.ts +847 -0
- package/services/completor/completor.client.ts +109 -0
- package/services/completor/completor.ts +616 -0
- package/services/dmv/vehicles.client.ts +41 -0
- package/services/dmv/vehicles.ts +191 -0
- package/services/docstore/docstore.client.ts +653 -0
- package/services/docstore/docstore.ts +4571 -0
- package/services/internet/ads.client.ts +41 -0
- package/services/internet/ads.ts +145 -0
- package/services/internet/internet.client.ts +58 -0
- package/services/internet/internet.ts +257 -0
- package/services/jobs/conduct.client.ts +92 -0
- package/services/jobs/conduct.ts +541 -0
- package/services/jobs/jobs.client.ts +194 -0
- package/services/jobs/jobs.ts +1301 -0
- package/services/jobs/timeclock.client.ts +75 -0
- package/services/jobs/timeclock.ts +808 -0
- package/services/livemapper/livemap.client.ts +76 -0
- package/services/livemapper/livemap.ts +552 -0
- package/services/mailer/mailer.client.ts +381 -0
- package/services/mailer/mailer.ts +2590 -0
- package/services/notificator/notificator.client.ts +76 -0
- package/services/notificator/notificator.ts +510 -0
- package/services/qualifications/qualifications.client.ts +279 -0
- package/services/qualifications/qualifications.ts +2142 -0
- package/services/rector/config.client.ts +58 -0
- package/services/rector/config.ts +216 -0
- package/services/rector/filestore.client.ts +75 -0
- package/services/rector/filestore.ts +378 -0
- package/services/rector/laws.client.ts +92 -0
- package/services/rector/laws.ts +416 -0
- package/services/rector/rector.client.ts +211 -0
- package/services/rector/rector.ts +1540 -0
- package/services/stats/stats.client.ts +37 -0
- package/services/stats/stats.ts +128 -0
- package/services/sync/sync.client.ts +110 -0
- package/services/sync/sync.ts +831 -0
- package/services/wiki/wiki.client.ts +126 -0
- package/services/wiki/wiki.ts +749 -0
- package/svcs.ts +307 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
|
|
2
|
+
// @generated from protobuf file "services/notificator/notificator.proto" (package "services.notificator", syntax proto3)
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
|
5
|
+
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
|
6
|
+
import { NotificatorService } from "./notificator";
|
|
7
|
+
import type { StreamResponse } from "./notificator";
|
|
8
|
+
import type { StreamRequest } from "./notificator";
|
|
9
|
+
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
|
|
10
|
+
import type { MarkNotificationsResponse } from "./notificator";
|
|
11
|
+
import type { MarkNotificationsRequest } from "./notificator";
|
|
12
|
+
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
|
13
|
+
import type { GetNotificationsResponse } from "./notificator";
|
|
14
|
+
import type { GetNotificationsRequest } from "./notificator";
|
|
15
|
+
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
16
|
+
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
|
17
|
+
/**
|
|
18
|
+
* @generated from protobuf service services.notificator.NotificatorService
|
|
19
|
+
*/
|
|
20
|
+
export interface INotificatorServiceClient {
|
|
21
|
+
/**
|
|
22
|
+
* @perm: Name=Any
|
|
23
|
+
*
|
|
24
|
+
* @generated from protobuf rpc: GetNotifications(services.notificator.GetNotificationsRequest) returns (services.notificator.GetNotificationsResponse);
|
|
25
|
+
*/
|
|
26
|
+
getNotifications(input: GetNotificationsRequest, options?: RpcOptions): UnaryCall<GetNotificationsRequest, GetNotificationsResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* @perm: Name=Any
|
|
29
|
+
*
|
|
30
|
+
* @generated from protobuf rpc: MarkNotifications(services.notificator.MarkNotificationsRequest) returns (services.notificator.MarkNotificationsResponse);
|
|
31
|
+
*/
|
|
32
|
+
markNotifications(input: MarkNotificationsRequest, options?: RpcOptions): UnaryCall<MarkNotificationsRequest, MarkNotificationsResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* @perm: Name=Any
|
|
35
|
+
*
|
|
36
|
+
* @generated from protobuf rpc: Stream(services.notificator.StreamRequest) returns (stream services.notificator.StreamResponse);
|
|
37
|
+
*/
|
|
38
|
+
stream(input: StreamRequest, options?: RpcOptions): ServerStreamingCall<StreamRequest, StreamResponse>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf service services.notificator.NotificatorService
|
|
42
|
+
*/
|
|
43
|
+
export class NotificatorServiceClient implements INotificatorServiceClient, ServiceInfo {
|
|
44
|
+
typeName = NotificatorService.typeName;
|
|
45
|
+
methods = NotificatorService.methods;
|
|
46
|
+
options = NotificatorService.options;
|
|
47
|
+
constructor(private readonly _transport: RpcTransport) {
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @perm: Name=Any
|
|
51
|
+
*
|
|
52
|
+
* @generated from protobuf rpc: GetNotifications(services.notificator.GetNotificationsRequest) returns (services.notificator.GetNotificationsResponse);
|
|
53
|
+
*/
|
|
54
|
+
getNotifications(input: GetNotificationsRequest, options?: RpcOptions): UnaryCall<GetNotificationsRequest, GetNotificationsResponse> {
|
|
55
|
+
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
56
|
+
return stackIntercept<GetNotificationsRequest, GetNotificationsResponse>("unary", this._transport, method, opt, input);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @perm: Name=Any
|
|
60
|
+
*
|
|
61
|
+
* @generated from protobuf rpc: MarkNotifications(services.notificator.MarkNotificationsRequest) returns (services.notificator.MarkNotificationsResponse);
|
|
62
|
+
*/
|
|
63
|
+
markNotifications(input: MarkNotificationsRequest, options?: RpcOptions): UnaryCall<MarkNotificationsRequest, MarkNotificationsResponse> {
|
|
64
|
+
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
|
65
|
+
return stackIntercept<MarkNotificationsRequest, MarkNotificationsResponse>("unary", this._transport, method, opt, input);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @perm: Name=Any
|
|
69
|
+
*
|
|
70
|
+
* @generated from protobuf rpc: Stream(services.notificator.StreamRequest) returns (stream services.notificator.StreamResponse);
|
|
71
|
+
*/
|
|
72
|
+
stream(input: StreamRequest, options?: RpcOptions): ServerStreamingCall<StreamRequest, StreamResponse> {
|
|
73
|
+
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
|
74
|
+
return stackIntercept<StreamRequest, StreamResponse>("serverStreaming", this._transport, method, opt, input);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
|
|
2
|
+
// @generated from protobuf file "services/notificator/notificator.proto" (package "services.notificator", syntax proto3)
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
9
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
10
|
+
import { WireType } 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 { MailerEvent } from "../../resources/mailer/events";
|
|
15
|
+
import { SystemEvent } from "../../resources/notifications/events";
|
|
16
|
+
import { JobGradeEvent } from "../../resources/notifications/events";
|
|
17
|
+
import { JobEvent } from "../../resources/notifications/events";
|
|
18
|
+
import { UserEvent } from "../../resources/notifications/events";
|
|
19
|
+
import { Notification } from "../../resources/notifications/notifications";
|
|
20
|
+
import { PaginationResponse } from "../../resources/common/database/database";
|
|
21
|
+
import { NotificationCategory } from "../../resources/notifications/notifications";
|
|
22
|
+
import { PaginationRequest } from "../../resources/common/database/database";
|
|
23
|
+
/**
|
|
24
|
+
* @generated from protobuf message services.notificator.GetNotificationsRequest
|
|
25
|
+
*/
|
|
26
|
+
export interface GetNotificationsRequest {
|
|
27
|
+
/**
|
|
28
|
+
* @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1;
|
|
29
|
+
*/
|
|
30
|
+
pagination?: PaginationRequest;
|
|
31
|
+
/**
|
|
32
|
+
* @generated from protobuf field: optional bool include_read = 2;
|
|
33
|
+
*/
|
|
34
|
+
includeRead?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @generated from protobuf field: repeated resources.notifications.NotificationCategory categories = 3;
|
|
37
|
+
*/
|
|
38
|
+
categories: NotificationCategory[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf message services.notificator.GetNotificationsResponse
|
|
42
|
+
*/
|
|
43
|
+
export interface GetNotificationsResponse {
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1;
|
|
46
|
+
*/
|
|
47
|
+
pagination?: PaginationResponse;
|
|
48
|
+
/**
|
|
49
|
+
* @generated from protobuf field: repeated resources.notifications.Notification notifications = 2;
|
|
50
|
+
*/
|
|
51
|
+
notifications: Notification[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @generated from protobuf message services.notificator.MarkNotificationsRequest
|
|
55
|
+
*/
|
|
56
|
+
export interface MarkNotificationsRequest {
|
|
57
|
+
/**
|
|
58
|
+
* @generated from protobuf field: bool unread = 1;
|
|
59
|
+
*/
|
|
60
|
+
unread: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* @generated from protobuf field: repeated uint64 ids = 2 [jstype = JS_STRING];
|
|
63
|
+
*/
|
|
64
|
+
ids: string[];
|
|
65
|
+
/**
|
|
66
|
+
* @generated from protobuf field: optional bool all = 3;
|
|
67
|
+
*/
|
|
68
|
+
all?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* @generated from protobuf message services.notificator.MarkNotificationsResponse
|
|
72
|
+
*/
|
|
73
|
+
export interface MarkNotificationsResponse {
|
|
74
|
+
/**
|
|
75
|
+
* @generated from protobuf field: uint64 updated = 1 [jstype = JS_STRING];
|
|
76
|
+
*/
|
|
77
|
+
updated: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @generated from protobuf message services.notificator.StreamRequest
|
|
81
|
+
*/
|
|
82
|
+
export interface StreamRequest {
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @generated from protobuf message services.notificator.StreamResponse
|
|
86
|
+
*/
|
|
87
|
+
export interface StreamResponse {
|
|
88
|
+
/**
|
|
89
|
+
* @generated from protobuf field: int32 notification_count = 1;
|
|
90
|
+
*/
|
|
91
|
+
notificationCount: number;
|
|
92
|
+
/**
|
|
93
|
+
* @generated from protobuf field: optional bool restart = 2;
|
|
94
|
+
*/
|
|
95
|
+
restart?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* @generated from protobuf oneof: data
|
|
98
|
+
*/
|
|
99
|
+
data: {
|
|
100
|
+
oneofKind: "userEvent";
|
|
101
|
+
/**
|
|
102
|
+
* @generated from protobuf field: resources.notifications.UserEvent user_event = 3;
|
|
103
|
+
*/
|
|
104
|
+
userEvent: UserEvent;
|
|
105
|
+
} | {
|
|
106
|
+
oneofKind: "jobEvent";
|
|
107
|
+
/**
|
|
108
|
+
* @generated from protobuf field: resources.notifications.JobEvent job_event = 4;
|
|
109
|
+
*/
|
|
110
|
+
jobEvent: JobEvent;
|
|
111
|
+
} | {
|
|
112
|
+
oneofKind: "jobGradeEvent";
|
|
113
|
+
/**
|
|
114
|
+
* @generated from protobuf field: resources.notifications.JobGradeEvent job_grade_event = 7;
|
|
115
|
+
*/
|
|
116
|
+
jobGradeEvent: JobGradeEvent;
|
|
117
|
+
} | {
|
|
118
|
+
oneofKind: "systemEvent";
|
|
119
|
+
/**
|
|
120
|
+
* @generated from protobuf field: resources.notifications.SystemEvent system_event = 5;
|
|
121
|
+
*/
|
|
122
|
+
systemEvent: SystemEvent;
|
|
123
|
+
} | {
|
|
124
|
+
oneofKind: "mailerEvent";
|
|
125
|
+
/**
|
|
126
|
+
* @generated from protobuf field: resources.mailer.MailerEvent mailer_event = 6;
|
|
127
|
+
*/
|
|
128
|
+
mailerEvent: MailerEvent;
|
|
129
|
+
} | {
|
|
130
|
+
oneofKind: undefined;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
134
|
+
class GetNotificationsRequest$Type extends MessageType<GetNotificationsRequest> {
|
|
135
|
+
constructor() {
|
|
136
|
+
super("services.notificator.GetNotificationsRequest", [
|
|
137
|
+
{ no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "validate.rules": { message: { required: true } } } },
|
|
138
|
+
{ no: 2, name: "include_read", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
139
|
+
{ no: 3, name: "categories", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.notifications.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "validate.rules": { repeated: { maxItems: "4", items: { enum: { definedOnly: true } } } } } }
|
|
140
|
+
]);
|
|
141
|
+
}
|
|
142
|
+
create(value?: PartialMessage<GetNotificationsRequest>): GetNotificationsRequest {
|
|
143
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
144
|
+
message.categories = [];
|
|
145
|
+
if (value !== undefined)
|
|
146
|
+
reflectionMergePartial<GetNotificationsRequest>(this, message, value);
|
|
147
|
+
return message;
|
|
148
|
+
}
|
|
149
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetNotificationsRequest): GetNotificationsRequest {
|
|
150
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
151
|
+
while (reader.pos < end) {
|
|
152
|
+
let [fieldNo, wireType] = reader.tag();
|
|
153
|
+
switch (fieldNo) {
|
|
154
|
+
case /* resources.common.database.PaginationRequest pagination */ 1:
|
|
155
|
+
message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
|
|
156
|
+
break;
|
|
157
|
+
case /* optional bool include_read */ 2:
|
|
158
|
+
message.includeRead = reader.bool();
|
|
159
|
+
break;
|
|
160
|
+
case /* repeated resources.notifications.NotificationCategory categories */ 3:
|
|
161
|
+
if (wireType === WireType.LengthDelimited)
|
|
162
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
163
|
+
message.categories.push(reader.int32());
|
|
164
|
+
else
|
|
165
|
+
message.categories.push(reader.int32());
|
|
166
|
+
break;
|
|
167
|
+
default:
|
|
168
|
+
let u = options.readUnknownField;
|
|
169
|
+
if (u === "throw")
|
|
170
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
171
|
+
let d = reader.skip(wireType);
|
|
172
|
+
if (u !== false)
|
|
173
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return message;
|
|
177
|
+
}
|
|
178
|
+
internalBinaryWrite(message: GetNotificationsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
179
|
+
/* resources.common.database.PaginationRequest pagination = 1; */
|
|
180
|
+
if (message.pagination)
|
|
181
|
+
PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
182
|
+
/* optional bool include_read = 2; */
|
|
183
|
+
if (message.includeRead !== undefined)
|
|
184
|
+
writer.tag(2, WireType.Varint).bool(message.includeRead);
|
|
185
|
+
/* repeated resources.notifications.NotificationCategory categories = 3; */
|
|
186
|
+
if (message.categories.length) {
|
|
187
|
+
writer.tag(3, WireType.LengthDelimited).fork();
|
|
188
|
+
for (let i = 0; i < message.categories.length; i++)
|
|
189
|
+
writer.int32(message.categories[i]);
|
|
190
|
+
writer.join();
|
|
191
|
+
}
|
|
192
|
+
let u = options.writeUnknownFields;
|
|
193
|
+
if (u !== false)
|
|
194
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
195
|
+
return writer;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* @generated MessageType for protobuf message services.notificator.GetNotificationsRequest
|
|
200
|
+
*/
|
|
201
|
+
export const GetNotificationsRequest = new GetNotificationsRequest$Type();
|
|
202
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
203
|
+
class GetNotificationsResponse$Type extends MessageType<GetNotificationsResponse> {
|
|
204
|
+
constructor() {
|
|
205
|
+
super("services.notificator.GetNotificationsResponse", [
|
|
206
|
+
{ no: 1, name: "pagination", kind: "message", T: () => PaginationResponse },
|
|
207
|
+
{ no: 2, name: "notifications", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Notification }
|
|
208
|
+
]);
|
|
209
|
+
}
|
|
210
|
+
create(value?: PartialMessage<GetNotificationsResponse>): GetNotificationsResponse {
|
|
211
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
212
|
+
message.notifications = [];
|
|
213
|
+
if (value !== undefined)
|
|
214
|
+
reflectionMergePartial<GetNotificationsResponse>(this, message, value);
|
|
215
|
+
return message;
|
|
216
|
+
}
|
|
217
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetNotificationsResponse): GetNotificationsResponse {
|
|
218
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
219
|
+
while (reader.pos < end) {
|
|
220
|
+
let [fieldNo, wireType] = reader.tag();
|
|
221
|
+
switch (fieldNo) {
|
|
222
|
+
case /* resources.common.database.PaginationResponse pagination */ 1:
|
|
223
|
+
message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
|
|
224
|
+
break;
|
|
225
|
+
case /* repeated resources.notifications.Notification notifications */ 2:
|
|
226
|
+
message.notifications.push(Notification.internalBinaryRead(reader, reader.uint32(), options));
|
|
227
|
+
break;
|
|
228
|
+
default:
|
|
229
|
+
let u = options.readUnknownField;
|
|
230
|
+
if (u === "throw")
|
|
231
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
232
|
+
let d = reader.skip(wireType);
|
|
233
|
+
if (u !== false)
|
|
234
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return message;
|
|
238
|
+
}
|
|
239
|
+
internalBinaryWrite(message: GetNotificationsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
240
|
+
/* resources.common.database.PaginationResponse pagination = 1; */
|
|
241
|
+
if (message.pagination)
|
|
242
|
+
PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
243
|
+
/* repeated resources.notifications.Notification notifications = 2; */
|
|
244
|
+
for (let i = 0; i < message.notifications.length; i++)
|
|
245
|
+
Notification.internalBinaryWrite(message.notifications[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
246
|
+
let u = options.writeUnknownFields;
|
|
247
|
+
if (u !== false)
|
|
248
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
249
|
+
return writer;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* @generated MessageType for protobuf message services.notificator.GetNotificationsResponse
|
|
254
|
+
*/
|
|
255
|
+
export const GetNotificationsResponse = new GetNotificationsResponse$Type();
|
|
256
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
257
|
+
class MarkNotificationsRequest$Type extends MessageType<MarkNotificationsRequest> {
|
|
258
|
+
constructor() {
|
|
259
|
+
super("services.notificator.MarkNotificationsRequest", [
|
|
260
|
+
{ no: 1, name: "unread", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
261
|
+
{ no: 2, name: "ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/, options: { "validate.rules": { repeated: { minItems: "1", maxItems: "20", ignoreEmpty: true } } } },
|
|
262
|
+
{ no: 3, name: "all", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
263
|
+
]);
|
|
264
|
+
}
|
|
265
|
+
create(value?: PartialMessage<MarkNotificationsRequest>): MarkNotificationsRequest {
|
|
266
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
267
|
+
message.unread = false;
|
|
268
|
+
message.ids = [];
|
|
269
|
+
if (value !== undefined)
|
|
270
|
+
reflectionMergePartial<MarkNotificationsRequest>(this, message, value);
|
|
271
|
+
return message;
|
|
272
|
+
}
|
|
273
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MarkNotificationsRequest): MarkNotificationsRequest {
|
|
274
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
275
|
+
while (reader.pos < end) {
|
|
276
|
+
let [fieldNo, wireType] = reader.tag();
|
|
277
|
+
switch (fieldNo) {
|
|
278
|
+
case /* bool unread */ 1:
|
|
279
|
+
message.unread = reader.bool();
|
|
280
|
+
break;
|
|
281
|
+
case /* repeated uint64 ids = 2 [jstype = JS_STRING];*/ 2:
|
|
282
|
+
if (wireType === WireType.LengthDelimited)
|
|
283
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
284
|
+
message.ids.push(reader.uint64().toString());
|
|
285
|
+
else
|
|
286
|
+
message.ids.push(reader.uint64().toString());
|
|
287
|
+
break;
|
|
288
|
+
case /* optional bool all */ 3:
|
|
289
|
+
message.all = reader.bool();
|
|
290
|
+
break;
|
|
291
|
+
default:
|
|
292
|
+
let u = options.readUnknownField;
|
|
293
|
+
if (u === "throw")
|
|
294
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
295
|
+
let d = reader.skip(wireType);
|
|
296
|
+
if (u !== false)
|
|
297
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return message;
|
|
301
|
+
}
|
|
302
|
+
internalBinaryWrite(message: MarkNotificationsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
303
|
+
/* bool unread = 1; */
|
|
304
|
+
if (message.unread !== false)
|
|
305
|
+
writer.tag(1, WireType.Varint).bool(message.unread);
|
|
306
|
+
/* repeated uint64 ids = 2 [jstype = JS_STRING]; */
|
|
307
|
+
if (message.ids.length) {
|
|
308
|
+
writer.tag(2, WireType.LengthDelimited).fork();
|
|
309
|
+
for (let i = 0; i < message.ids.length; i++)
|
|
310
|
+
writer.uint64(message.ids[i]);
|
|
311
|
+
writer.join();
|
|
312
|
+
}
|
|
313
|
+
/* optional bool all = 3; */
|
|
314
|
+
if (message.all !== undefined)
|
|
315
|
+
writer.tag(3, WireType.Varint).bool(message.all);
|
|
316
|
+
let u = options.writeUnknownFields;
|
|
317
|
+
if (u !== false)
|
|
318
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
319
|
+
return writer;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* @generated MessageType for protobuf message services.notificator.MarkNotificationsRequest
|
|
324
|
+
*/
|
|
325
|
+
export const MarkNotificationsRequest = new MarkNotificationsRequest$Type();
|
|
326
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
327
|
+
class MarkNotificationsResponse$Type extends MessageType<MarkNotificationsResponse> {
|
|
328
|
+
constructor() {
|
|
329
|
+
super("services.notificator.MarkNotificationsResponse", [
|
|
330
|
+
{ no: 1, name: "updated", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
|
|
331
|
+
]);
|
|
332
|
+
}
|
|
333
|
+
create(value?: PartialMessage<MarkNotificationsResponse>): MarkNotificationsResponse {
|
|
334
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
335
|
+
message.updated = "0";
|
|
336
|
+
if (value !== undefined)
|
|
337
|
+
reflectionMergePartial<MarkNotificationsResponse>(this, message, value);
|
|
338
|
+
return message;
|
|
339
|
+
}
|
|
340
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MarkNotificationsResponse): MarkNotificationsResponse {
|
|
341
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
342
|
+
while (reader.pos < end) {
|
|
343
|
+
let [fieldNo, wireType] = reader.tag();
|
|
344
|
+
switch (fieldNo) {
|
|
345
|
+
case /* uint64 updated = 1 [jstype = JS_STRING];*/ 1:
|
|
346
|
+
message.updated = reader.uint64().toString();
|
|
347
|
+
break;
|
|
348
|
+
default:
|
|
349
|
+
let u = options.readUnknownField;
|
|
350
|
+
if (u === "throw")
|
|
351
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
352
|
+
let d = reader.skip(wireType);
|
|
353
|
+
if (u !== false)
|
|
354
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return message;
|
|
358
|
+
}
|
|
359
|
+
internalBinaryWrite(message: MarkNotificationsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
360
|
+
/* uint64 updated = 1 [jstype = JS_STRING]; */
|
|
361
|
+
if (message.updated !== "0")
|
|
362
|
+
writer.tag(1, WireType.Varint).uint64(message.updated);
|
|
363
|
+
let u = options.writeUnknownFields;
|
|
364
|
+
if (u !== false)
|
|
365
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
366
|
+
return writer;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* @generated MessageType for protobuf message services.notificator.MarkNotificationsResponse
|
|
371
|
+
*/
|
|
372
|
+
export const MarkNotificationsResponse = new MarkNotificationsResponse$Type();
|
|
373
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
374
|
+
class StreamRequest$Type extends MessageType<StreamRequest> {
|
|
375
|
+
constructor() {
|
|
376
|
+
super("services.notificator.StreamRequest", []);
|
|
377
|
+
}
|
|
378
|
+
create(value?: PartialMessage<StreamRequest>): StreamRequest {
|
|
379
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
380
|
+
if (value !== undefined)
|
|
381
|
+
reflectionMergePartial<StreamRequest>(this, message, value);
|
|
382
|
+
return message;
|
|
383
|
+
}
|
|
384
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StreamRequest): StreamRequest {
|
|
385
|
+
return target ?? this.create();
|
|
386
|
+
}
|
|
387
|
+
internalBinaryWrite(message: StreamRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
388
|
+
let u = options.writeUnknownFields;
|
|
389
|
+
if (u !== false)
|
|
390
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
391
|
+
return writer;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* @generated MessageType for protobuf message services.notificator.StreamRequest
|
|
396
|
+
*/
|
|
397
|
+
export const StreamRequest = new StreamRequest$Type();
|
|
398
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
399
|
+
class StreamResponse$Type extends MessageType<StreamResponse> {
|
|
400
|
+
constructor() {
|
|
401
|
+
super("services.notificator.StreamResponse", [
|
|
402
|
+
{ no: 1, name: "notification_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
403
|
+
{ no: 2, name: "restart", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
404
|
+
{ no: 3, name: "user_event", kind: "message", oneof: "data", T: () => UserEvent },
|
|
405
|
+
{ no: 4, name: "job_event", kind: "message", oneof: "data", T: () => JobEvent },
|
|
406
|
+
{ no: 7, name: "job_grade_event", kind: "message", oneof: "data", T: () => JobGradeEvent },
|
|
407
|
+
{ no: 5, name: "system_event", kind: "message", oneof: "data", T: () => SystemEvent },
|
|
408
|
+
{ no: 6, name: "mailer_event", kind: "message", oneof: "data", T: () => MailerEvent }
|
|
409
|
+
]);
|
|
410
|
+
}
|
|
411
|
+
create(value?: PartialMessage<StreamResponse>): StreamResponse {
|
|
412
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
413
|
+
message.notificationCount = 0;
|
|
414
|
+
message.data = { oneofKind: undefined };
|
|
415
|
+
if (value !== undefined)
|
|
416
|
+
reflectionMergePartial<StreamResponse>(this, message, value);
|
|
417
|
+
return message;
|
|
418
|
+
}
|
|
419
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StreamResponse): StreamResponse {
|
|
420
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
421
|
+
while (reader.pos < end) {
|
|
422
|
+
let [fieldNo, wireType] = reader.tag();
|
|
423
|
+
switch (fieldNo) {
|
|
424
|
+
case /* int32 notification_count */ 1:
|
|
425
|
+
message.notificationCount = reader.int32();
|
|
426
|
+
break;
|
|
427
|
+
case /* optional bool restart */ 2:
|
|
428
|
+
message.restart = reader.bool();
|
|
429
|
+
break;
|
|
430
|
+
case /* resources.notifications.UserEvent user_event */ 3:
|
|
431
|
+
message.data = {
|
|
432
|
+
oneofKind: "userEvent",
|
|
433
|
+
userEvent: UserEvent.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).userEvent)
|
|
434
|
+
};
|
|
435
|
+
break;
|
|
436
|
+
case /* resources.notifications.JobEvent job_event */ 4:
|
|
437
|
+
message.data = {
|
|
438
|
+
oneofKind: "jobEvent",
|
|
439
|
+
jobEvent: JobEvent.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).jobEvent)
|
|
440
|
+
};
|
|
441
|
+
break;
|
|
442
|
+
case /* resources.notifications.JobGradeEvent job_grade_event */ 7:
|
|
443
|
+
message.data = {
|
|
444
|
+
oneofKind: "jobGradeEvent",
|
|
445
|
+
jobGradeEvent: JobGradeEvent.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).jobGradeEvent)
|
|
446
|
+
};
|
|
447
|
+
break;
|
|
448
|
+
case /* resources.notifications.SystemEvent system_event */ 5:
|
|
449
|
+
message.data = {
|
|
450
|
+
oneofKind: "systemEvent",
|
|
451
|
+
systemEvent: SystemEvent.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).systemEvent)
|
|
452
|
+
};
|
|
453
|
+
break;
|
|
454
|
+
case /* resources.mailer.MailerEvent mailer_event */ 6:
|
|
455
|
+
message.data = {
|
|
456
|
+
oneofKind: "mailerEvent",
|
|
457
|
+
mailerEvent: MailerEvent.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).mailerEvent)
|
|
458
|
+
};
|
|
459
|
+
break;
|
|
460
|
+
default:
|
|
461
|
+
let u = options.readUnknownField;
|
|
462
|
+
if (u === "throw")
|
|
463
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
464
|
+
let d = reader.skip(wireType);
|
|
465
|
+
if (u !== false)
|
|
466
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
return message;
|
|
470
|
+
}
|
|
471
|
+
internalBinaryWrite(message: StreamResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
472
|
+
/* int32 notification_count = 1; */
|
|
473
|
+
if (message.notificationCount !== 0)
|
|
474
|
+
writer.tag(1, WireType.Varint).int32(message.notificationCount);
|
|
475
|
+
/* optional bool restart = 2; */
|
|
476
|
+
if (message.restart !== undefined)
|
|
477
|
+
writer.tag(2, WireType.Varint).bool(message.restart);
|
|
478
|
+
/* resources.notifications.UserEvent user_event = 3; */
|
|
479
|
+
if (message.data.oneofKind === "userEvent")
|
|
480
|
+
UserEvent.internalBinaryWrite(message.data.userEvent, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
481
|
+
/* resources.notifications.JobEvent job_event = 4; */
|
|
482
|
+
if (message.data.oneofKind === "jobEvent")
|
|
483
|
+
JobEvent.internalBinaryWrite(message.data.jobEvent, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
484
|
+
/* resources.notifications.JobGradeEvent job_grade_event = 7; */
|
|
485
|
+
if (message.data.oneofKind === "jobGradeEvent")
|
|
486
|
+
JobGradeEvent.internalBinaryWrite(message.data.jobGradeEvent, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
487
|
+
/* resources.notifications.SystemEvent system_event = 5; */
|
|
488
|
+
if (message.data.oneofKind === "systemEvent")
|
|
489
|
+
SystemEvent.internalBinaryWrite(message.data.systemEvent, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
490
|
+
/* resources.mailer.MailerEvent mailer_event = 6; */
|
|
491
|
+
if (message.data.oneofKind === "mailerEvent")
|
|
492
|
+
MailerEvent.internalBinaryWrite(message.data.mailerEvent, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
493
|
+
let u = options.writeUnknownFields;
|
|
494
|
+
if (u !== false)
|
|
495
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
496
|
+
return writer;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* @generated MessageType for protobuf message services.notificator.StreamResponse
|
|
501
|
+
*/
|
|
502
|
+
export const StreamResponse = new StreamResponse$Type();
|
|
503
|
+
/**
|
|
504
|
+
* @generated ServiceType for protobuf service services.notificator.NotificatorService
|
|
505
|
+
*/
|
|
506
|
+
export const NotificatorService = new ServiceType("services.notificator.NotificatorService", [
|
|
507
|
+
{ name: "GetNotifications", options: {}, I: GetNotificationsRequest, O: GetNotificationsResponse },
|
|
508
|
+
{ name: "MarkNotifications", options: {}, I: MarkNotificationsRequest, O: MarkNotificationsResponse },
|
|
509
|
+
{ name: "Stream", serverStreaming: true, options: {}, I: StreamRequest, O: StreamResponse }
|
|
510
|
+
]);
|