@fivenet-app/gen 2025.5.2 → 2025.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/buf/validate/validate.ts +11301 -0
- package/clients.ts +157 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +208 -0
- package/codegen/sanitizer/sanitizer.ts +80 -0
- package/google/protobuf/any.ts +4 -3
- package/google/protobuf/descriptor.ts +393 -239
- package/google/protobuf/duration.ts +4 -3
- package/google/protobuf/struct.ts +485 -0
- package/google/protobuf/timestamp.ts +4 -3
- package/package.json +3 -3
- package/perms.ts +85 -159
- package/resources/accounts/accounts.ts +26 -25
- package/resources/accounts/oauth2.ts +30 -29
- package/resources/audit/audit.ts +36 -35
- package/resources/calendar/access.ts +49 -48
- package/resources/calendar/calendar.ts +122 -126
- package/resources/centrum/access.ts +345 -0
- package/resources/centrum/attributes.ts +8 -11
- package/resources/centrum/dispatchers.ts +149 -0
- package/resources/centrum/dispatches.ts +252 -115
- package/resources/centrum/settings.ts +384 -34
- package/resources/centrum/units.ts +112 -92
- package/resources/centrum/units_access.ts +54 -55
- package/resources/clientconfig/clientconfig.ts +890 -0
- package/resources/collab/collab.ts +817 -0
- package/resources/common/content/content.ts +113 -30
- package/resources/common/cron/cron.ts +43 -31
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- package/resources/common/grpcws/grpcws.ts +24 -23
- package/resources/common/i18n.ts +20 -24
- package/resources/common/id_mapping.ts +69 -0
- package/resources/common/tests/objects.ts +4 -3
- package/resources/common/uuid.ts +4 -3
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/access.ts +52 -53
- package/resources/documents/activity.ts +235 -58
- package/resources/documents/category.ts +20 -27
- package/resources/documents/comment.ts +26 -25
- package/resources/documents/documents.ts +335 -262
- package/resources/documents/pins.ts +127 -0
- package/resources/documents/requests.ts +31 -30
- package/resources/documents/signoff.ts +55 -0
- package/resources/documents/state.ts +69 -0
- package/resources/documents/templates.ts +119 -136
- package/resources/documents/workflow.ts +35 -24
- package/resources/file/file.ts +152 -0
- package/{services/settings → resources/file}/filestore.ts +179 -165
- package/resources/file/meta.ts +148 -0
- package/resources/jobs/activity.ts +39 -42
- package/resources/jobs/colleagues.ts +67 -60
- package/resources/jobs/conduct.ts +29 -30
- package/resources/jobs/job_props.ts +46 -48
- package/resources/jobs/job_settings.ts +45 -52
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/labels.ts +21 -22
- package/resources/jobs/timeclock.ts +26 -25
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → marker_marker.ts} +43 -310
- package/resources/livemap/user_marker.ts +298 -0
- package/resources/mailer/access.ts +75 -74
- package/resources/mailer/email.ts +24 -27
- package/resources/mailer/events.ts +25 -24
- package/resources/mailer/message.ts +45 -50
- package/resources/mailer/settings.ts +12 -15
- package/resources/mailer/template.ts +25 -28
- package/resources/mailer/thread.ts +70 -71
- package/resources/notifications/client_view.ts +239 -0
- package/resources/notifications/events.ts +50 -101
- package/resources/notifications/notifications.ts +52 -57
- package/resources/permissions/attributes.ts +63 -206
- package/resources/permissions/events.ts +149 -0
- package/resources/permissions/permissions.ts +103 -34
- package/resources/qualifications/access.ts +27 -26
- package/resources/qualifications/exam.ts +188 -126
- package/resources/qualifications/qualifications.ts +370 -303
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +163 -79
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +3 -2
- package/resources/sync/activity.ts +24 -23
- package/resources/sync/data.ts +94 -26
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/user_info.ts +464 -0
- package/resources/users/activity.ts +80 -85
- package/resources/users/labels.ts +18 -21
- package/resources/users/licenses.ts +9 -8
- package/resources/users/props.ts +61 -51
- package/resources/users/users.ts +100 -78
- package/resources/vehicles/activity.ts +231 -0
- package/resources/vehicles/props.ts +103 -0
- package/resources/vehicles/vehicles.ts +28 -15
- package/resources/wiki/access.ts +49 -48
- package/resources/wiki/activity.ts +133 -51
- package/resources/wiki/page.ts +134 -87
- package/services/auth/auth.client.ts +24 -27
- package/services/auth/auth.ts +222 -195
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +110 -109
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +701 -298
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +183 -93
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +65 -44
- package/services/documents/collab.client.ts +46 -0
- package/services/documents/collab.ts +13 -0
- package/services/documents/documents.client.ts +88 -217
- package/services/documents/documents.ts +490 -508
- package/services/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +10 -25
- package/services/jobs/conduct.ts +36 -35
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +108 -91
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +47 -46
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +290 -119
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +213 -216
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +117 -74
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +181 -175
- package/services/settings/accounts.client.ts +10 -25
- package/services/settings/accounts.ts +64 -41
- package/services/settings/config.client.ts +6 -13
- package/services/settings/config.ts +8 -7
- package/services/settings/cron.client.ts +4 -7
- package/services/settings/cron.ts +4 -3
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +29 -28
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +190 -607
- package/services/settings/system.client.ts +90 -0
- package/services/settings/system.ts +618 -0
- package/services/stats/stats.client.ts +4 -3
- package/services/stats/stats.ts +4 -3
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +82 -52
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +169 -24
- package/services/wiki/collab.client.ts +46 -0
- package/services/wiki/collab.ts +13 -0
- package/services/wiki/wiki.client.ts +28 -37
- package/services/wiki/wiki.ts +93 -63
- package/svcs.ts +79 -103
- package/resources/centrum/disponents.ts +0 -81
- package/resources/filestore/file.ts +0 -204
- package/resources/internet/access.ts +0 -358
- package/resources/internet/ads.ts +0 -257
- package/resources/internet/domain.ts +0 -328
- package/resources/internet/page.ts +0 -428
- package/resources/internet/search.ts +0 -128
- package/resources/livemap/tracker.ts +0 -81
- package/services/internet/ads.client.ts +0 -41
- package/services/internet/ads.ts +0 -145
- package/services/internet/domain.client.ts +0 -109
- package/services/internet/domain.ts +0 -658
- package/services/internet/internet.client.ts +0 -58
- package/services/internet/internet.ts +0 -268
- package/services/notificator/notificator.client.ts +0 -76
- package/services/settings/filestore.client.ts +0 -75
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
|
+
// @generated from protobuf file "resources/notifications/client_view.proto" (package "resources.notifications", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
+
import { Struct } from "../../google/protobuf/struct";
|
|
15
|
+
/**
|
|
16
|
+
* @generated from protobuf message resources.notifications.ClientView
|
|
17
|
+
*/
|
|
18
|
+
export interface ClientView {
|
|
19
|
+
/**
|
|
20
|
+
* @generated from protobuf field: resources.notifications.ObjectType type = 1
|
|
21
|
+
*/
|
|
22
|
+
type: ObjectType;
|
|
23
|
+
/**
|
|
24
|
+
* @generated from protobuf field: optional int64 id = 2
|
|
25
|
+
*/
|
|
26
|
+
id?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @generated from protobuf message resources.notifications.ObjectEvent
|
|
30
|
+
*/
|
|
31
|
+
export interface ObjectEvent {
|
|
32
|
+
/**
|
|
33
|
+
* @generated from protobuf field: resources.notifications.ObjectType type = 1
|
|
34
|
+
*/
|
|
35
|
+
type: ObjectType;
|
|
36
|
+
/**
|
|
37
|
+
* @generated from protobuf field: optional int64 id = 2
|
|
38
|
+
*/
|
|
39
|
+
id?: number;
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf field: resources.notifications.ObjectEventType event_type = 3
|
|
42
|
+
*/
|
|
43
|
+
eventType: ObjectEventType;
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf field: optional int32 user_id = 4
|
|
46
|
+
*/
|
|
47
|
+
userId?: number;
|
|
48
|
+
/**
|
|
49
|
+
* @generated from protobuf field: optional string job = 5
|
|
50
|
+
*/
|
|
51
|
+
job?: string;
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf field: optional google.protobuf.Struct data = 6
|
|
54
|
+
*/
|
|
55
|
+
data?: Struct;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @generated from protobuf enum resources.notifications.ObjectType
|
|
59
|
+
*/
|
|
60
|
+
export enum ObjectType {
|
|
61
|
+
/**
|
|
62
|
+
* @generated from protobuf enum value: OBJECT_TYPE_UNSPECIFIED = 0;
|
|
63
|
+
*/
|
|
64
|
+
UNSPECIFIED = 0,
|
|
65
|
+
/**
|
|
66
|
+
* @generated from protobuf enum value: OBJECT_TYPE_CITIZEN = 1;
|
|
67
|
+
*/
|
|
68
|
+
CITIZEN = 1,
|
|
69
|
+
/**
|
|
70
|
+
* @generated from protobuf enum value: OBJECT_TYPE_DOCUMENT = 2;
|
|
71
|
+
*/
|
|
72
|
+
DOCUMENT = 2,
|
|
73
|
+
/**
|
|
74
|
+
* @generated from protobuf enum value: OBJECT_TYPE_WIKI_PAGE = 3;
|
|
75
|
+
*/
|
|
76
|
+
WIKI_PAGE = 3,
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf enum value: OBJECT_TYPE_JOBS_COLLEAGUE = 4;
|
|
79
|
+
*/
|
|
80
|
+
JOBS_COLLEAGUE = 4,
|
|
81
|
+
/**
|
|
82
|
+
* @generated from protobuf enum value: OBJECT_TYPE_JOBS_CONDUCT = 5;
|
|
83
|
+
*/
|
|
84
|
+
JOBS_CONDUCT = 5
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @generated from protobuf enum resources.notifications.ObjectEventType
|
|
88
|
+
*/
|
|
89
|
+
export enum ObjectEventType {
|
|
90
|
+
/**
|
|
91
|
+
* @generated from protobuf enum value: OBJECT_EVENT_TYPE_UNSPECIFIED = 0;
|
|
92
|
+
*/
|
|
93
|
+
UNSPECIFIED = 0,
|
|
94
|
+
/**
|
|
95
|
+
* @generated from protobuf enum value: OBJECT_EVENT_TYPE_UPDATED = 1;
|
|
96
|
+
*/
|
|
97
|
+
UPDATED = 1,
|
|
98
|
+
/**
|
|
99
|
+
* @generated from protobuf enum value: OBJECT_EVENT_TYPE_DELETED = 2;
|
|
100
|
+
*/
|
|
101
|
+
DELETED = 2
|
|
102
|
+
}
|
|
103
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
104
|
+
class ClientView$Type extends MessageType<ClientView> {
|
|
105
|
+
constructor() {
|
|
106
|
+
super("resources.notifications.ClientView", [
|
|
107
|
+
{ no: 1, name: "type", kind: "enum", T: () => ["resources.notifications.ObjectType", ObjectType, "OBJECT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
108
|
+
{ no: 2, name: "id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
109
|
+
]);
|
|
110
|
+
}
|
|
111
|
+
create(value?: PartialMessage<ClientView>): ClientView {
|
|
112
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
113
|
+
message.type = 0;
|
|
114
|
+
if (value !== undefined)
|
|
115
|
+
reflectionMergePartial<ClientView>(this, message, value);
|
|
116
|
+
return message;
|
|
117
|
+
}
|
|
118
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClientView): ClientView {
|
|
119
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
120
|
+
while (reader.pos < end) {
|
|
121
|
+
let [fieldNo, wireType] = reader.tag();
|
|
122
|
+
switch (fieldNo) {
|
|
123
|
+
case /* resources.notifications.ObjectType type */ 1:
|
|
124
|
+
message.type = reader.int32();
|
|
125
|
+
break;
|
|
126
|
+
case /* optional int64 id */ 2:
|
|
127
|
+
message.id = reader.int64().toNumber();
|
|
128
|
+
break;
|
|
129
|
+
default:
|
|
130
|
+
let u = options.readUnknownField;
|
|
131
|
+
if (u === "throw")
|
|
132
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
133
|
+
let d = reader.skip(wireType);
|
|
134
|
+
if (u !== false)
|
|
135
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return message;
|
|
139
|
+
}
|
|
140
|
+
internalBinaryWrite(message: ClientView, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
141
|
+
/* resources.notifications.ObjectType type = 1; */
|
|
142
|
+
if (message.type !== 0)
|
|
143
|
+
writer.tag(1, WireType.Varint).int32(message.type);
|
|
144
|
+
/* optional int64 id = 2; */
|
|
145
|
+
if (message.id !== undefined)
|
|
146
|
+
writer.tag(2, WireType.Varint).int64(message.id);
|
|
147
|
+
let u = options.writeUnknownFields;
|
|
148
|
+
if (u !== false)
|
|
149
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
150
|
+
return writer;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @generated MessageType for protobuf message resources.notifications.ClientView
|
|
155
|
+
*/
|
|
156
|
+
export const ClientView = new ClientView$Type();
|
|
157
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
158
|
+
class ObjectEvent$Type extends MessageType<ObjectEvent> {
|
|
159
|
+
constructor() {
|
|
160
|
+
super("resources.notifications.ObjectEvent", [
|
|
161
|
+
{ no: 1, name: "type", kind: "enum", T: () => ["resources.notifications.ObjectType", ObjectType, "OBJECT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
162
|
+
{ no: 2, name: "id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
163
|
+
{ no: 3, name: "event_type", kind: "enum", T: () => ["resources.notifications.ObjectEventType", ObjectEventType, "OBJECT_EVENT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
164
|
+
{ no: 4, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
165
|
+
{ no: 5, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
166
|
+
{ no: 6, name: "data", kind: "message", T: () => Struct }
|
|
167
|
+
]);
|
|
168
|
+
}
|
|
169
|
+
create(value?: PartialMessage<ObjectEvent>): ObjectEvent {
|
|
170
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
171
|
+
message.type = 0;
|
|
172
|
+
message.eventType = 0;
|
|
173
|
+
if (value !== undefined)
|
|
174
|
+
reflectionMergePartial<ObjectEvent>(this, message, value);
|
|
175
|
+
return message;
|
|
176
|
+
}
|
|
177
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ObjectEvent): ObjectEvent {
|
|
178
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
179
|
+
while (reader.pos < end) {
|
|
180
|
+
let [fieldNo, wireType] = reader.tag();
|
|
181
|
+
switch (fieldNo) {
|
|
182
|
+
case /* resources.notifications.ObjectType type */ 1:
|
|
183
|
+
message.type = reader.int32();
|
|
184
|
+
break;
|
|
185
|
+
case /* optional int64 id */ 2:
|
|
186
|
+
message.id = reader.int64().toNumber();
|
|
187
|
+
break;
|
|
188
|
+
case /* resources.notifications.ObjectEventType event_type */ 3:
|
|
189
|
+
message.eventType = reader.int32();
|
|
190
|
+
break;
|
|
191
|
+
case /* optional int32 user_id */ 4:
|
|
192
|
+
message.userId = reader.int32();
|
|
193
|
+
break;
|
|
194
|
+
case /* optional string job */ 5:
|
|
195
|
+
message.job = reader.string();
|
|
196
|
+
break;
|
|
197
|
+
case /* optional google.protobuf.Struct data */ 6:
|
|
198
|
+
message.data = Struct.internalBinaryRead(reader, reader.uint32(), options, message.data);
|
|
199
|
+
break;
|
|
200
|
+
default:
|
|
201
|
+
let u = options.readUnknownField;
|
|
202
|
+
if (u === "throw")
|
|
203
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
204
|
+
let d = reader.skip(wireType);
|
|
205
|
+
if (u !== false)
|
|
206
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return message;
|
|
210
|
+
}
|
|
211
|
+
internalBinaryWrite(message: ObjectEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
212
|
+
/* resources.notifications.ObjectType type = 1; */
|
|
213
|
+
if (message.type !== 0)
|
|
214
|
+
writer.tag(1, WireType.Varint).int32(message.type);
|
|
215
|
+
/* optional int64 id = 2; */
|
|
216
|
+
if (message.id !== undefined)
|
|
217
|
+
writer.tag(2, WireType.Varint).int64(message.id);
|
|
218
|
+
/* resources.notifications.ObjectEventType event_type = 3; */
|
|
219
|
+
if (message.eventType !== 0)
|
|
220
|
+
writer.tag(3, WireType.Varint).int32(message.eventType);
|
|
221
|
+
/* optional int32 user_id = 4; */
|
|
222
|
+
if (message.userId !== undefined)
|
|
223
|
+
writer.tag(4, WireType.Varint).int32(message.userId);
|
|
224
|
+
/* optional string job = 5; */
|
|
225
|
+
if (message.job !== undefined)
|
|
226
|
+
writer.tag(5, WireType.LengthDelimited).string(message.job);
|
|
227
|
+
/* optional google.protobuf.Struct data = 6; */
|
|
228
|
+
if (message.data)
|
|
229
|
+
Struct.internalBinaryWrite(message.data, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
230
|
+
let u = options.writeUnknownFields;
|
|
231
|
+
if (u !== false)
|
|
232
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
233
|
+
return writer;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* @generated MessageType for protobuf message resources.notifications.ObjectEvent
|
|
238
|
+
*/
|
|
239
|
+
export const ObjectEvent = new ObjectEvent$Type();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
2
|
// @generated from protobuf file "resources/notifications/events.proto" (package "resources.notifications", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
3
4
|
// @ts-nocheck
|
|
4
5
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
5
6
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
@@ -10,12 +11,13 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
10
11
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
11
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
13
|
-
import {
|
|
14
|
+
import { ClientConfig } from "../clientconfig/clientconfig";
|
|
14
15
|
import { JobProps } from "../jobs/job_props";
|
|
16
|
+
import { UserInfoChanged } from "../userinfo/user_info";
|
|
15
17
|
import { Notification } from "./notifications";
|
|
16
|
-
// User Events
|
|
17
|
-
|
|
18
18
|
/**
|
|
19
|
+
* User related events
|
|
20
|
+
*
|
|
19
21
|
* @generated from protobuf message resources.notifications.UserEvent
|
|
20
22
|
*/
|
|
21
23
|
export interface UserEvent {
|
|
@@ -25,7 +27,7 @@ export interface UserEvent {
|
|
|
25
27
|
data: {
|
|
26
28
|
oneofKind: "refreshToken";
|
|
27
29
|
/**
|
|
28
|
-
* @generated from protobuf field: bool refresh_token = 1
|
|
30
|
+
* @generated from protobuf field: bool refresh_token = 1
|
|
29
31
|
*/
|
|
30
32
|
refreshToken: boolean;
|
|
31
33
|
} | {
|
|
@@ -33,22 +35,28 @@ export interface UserEvent {
|
|
|
33
35
|
/**
|
|
34
36
|
* Notifications
|
|
35
37
|
*
|
|
36
|
-
* @generated from protobuf field: resources.notifications.Notification notification = 2
|
|
38
|
+
* @generated from protobuf field: resources.notifications.Notification notification = 2
|
|
37
39
|
*/
|
|
38
40
|
notification: Notification;
|
|
39
41
|
} | {
|
|
40
42
|
oneofKind: "notificationsReadCount";
|
|
41
43
|
/**
|
|
42
|
-
* @generated from protobuf field:
|
|
44
|
+
* @generated from protobuf field: int64 notifications_read_count = 3
|
|
43
45
|
*/
|
|
44
46
|
notificationsReadCount: number;
|
|
47
|
+
} | {
|
|
48
|
+
oneofKind: "userInfoChanged";
|
|
49
|
+
/**
|
|
50
|
+
* @generated from protobuf field: resources.userinfo.UserInfoChanged user_info_changed = 4
|
|
51
|
+
*/
|
|
52
|
+
userInfoChanged: UserInfoChanged;
|
|
45
53
|
} | {
|
|
46
54
|
oneofKind: undefined;
|
|
47
55
|
};
|
|
48
56
|
}
|
|
49
|
-
// Job Events
|
|
50
|
-
|
|
51
57
|
/**
|
|
58
|
+
* Job related events
|
|
59
|
+
*
|
|
52
60
|
* @generated from protobuf message resources.notifications.JobEvent
|
|
53
61
|
*/
|
|
54
62
|
export interface JobEvent {
|
|
@@ -58,16 +66,16 @@ export interface JobEvent {
|
|
|
58
66
|
data: {
|
|
59
67
|
oneofKind: "jobProps";
|
|
60
68
|
/**
|
|
61
|
-
* @generated from protobuf field: resources.jobs.JobProps job_props = 1
|
|
69
|
+
* @generated from protobuf field: resources.jobs.JobProps job_props = 1
|
|
62
70
|
*/
|
|
63
71
|
jobProps: JobProps;
|
|
64
72
|
} | {
|
|
65
73
|
oneofKind: undefined;
|
|
66
74
|
};
|
|
67
75
|
}
|
|
68
|
-
// Job Grade Events
|
|
69
|
-
|
|
70
76
|
/**
|
|
77
|
+
* Job grade events
|
|
78
|
+
*
|
|
71
79
|
* @generated from protobuf message resources.notifications.JobGradeEvent
|
|
72
80
|
*/
|
|
73
81
|
export interface JobGradeEvent {
|
|
@@ -77,16 +85,16 @@ export interface JobGradeEvent {
|
|
|
77
85
|
data: {
|
|
78
86
|
oneofKind: "refreshToken";
|
|
79
87
|
/**
|
|
80
|
-
* @generated from protobuf field: bool refresh_token = 1
|
|
88
|
+
* @generated from protobuf field: bool refresh_token = 1
|
|
81
89
|
*/
|
|
82
90
|
refreshToken: boolean;
|
|
83
91
|
} | {
|
|
84
92
|
oneofKind: undefined;
|
|
85
93
|
};
|
|
86
94
|
}
|
|
87
|
-
// System Events
|
|
88
|
-
|
|
89
95
|
/**
|
|
96
|
+
* System related events
|
|
97
|
+
*
|
|
90
98
|
* @generated from protobuf message resources.notifications.SystemEvent
|
|
91
99
|
*/
|
|
92
100
|
export interface SystemEvent {
|
|
@@ -94,37 +102,25 @@ export interface SystemEvent {
|
|
|
94
102
|
* @generated from protobuf oneof: data
|
|
95
103
|
*/
|
|
96
104
|
data: {
|
|
97
|
-
oneofKind: "
|
|
105
|
+
oneofKind: "clientConfig";
|
|
98
106
|
/**
|
|
99
|
-
*
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
} | {
|
|
103
|
-
oneofKind: "bannerMessage";
|
|
104
|
-
/**
|
|
105
|
-
* @generated from protobuf field: resources.notifications.BannerMessageWrapper banner_message = 2;
|
|
107
|
+
* Client configuration update (e.g., feature gates, game settings, banner message)
|
|
108
|
+
*
|
|
109
|
+
* @generated from protobuf field: resources.clientconfig.ClientConfig client_config = 1
|
|
106
110
|
*/
|
|
107
|
-
|
|
111
|
+
clientConfig: ClientConfig;
|
|
108
112
|
} | {
|
|
109
113
|
oneofKind: undefined;
|
|
110
114
|
};
|
|
111
115
|
}
|
|
112
|
-
/**
|
|
113
|
-
* @generated from protobuf message resources.notifications.BannerMessageWrapper
|
|
114
|
-
*/
|
|
115
|
-
export interface BannerMessageWrapper {
|
|
116
|
-
/**
|
|
117
|
-
* @generated from protobuf field: optional resources.settings.BannerMessage banner_message = 1;
|
|
118
|
-
*/
|
|
119
|
-
bannerMessage?: BannerMessage;
|
|
120
|
-
}
|
|
121
116
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
122
117
|
class UserEvent$Type extends MessageType<UserEvent> {
|
|
123
118
|
constructor() {
|
|
124
119
|
super("resources.notifications.UserEvent", [
|
|
125
120
|
{ no: 1, name: "refresh_token", kind: "scalar", oneof: "data", T: 8 /*ScalarType.BOOL*/ },
|
|
126
121
|
{ no: 2, name: "notification", kind: "message", oneof: "data", T: () => Notification },
|
|
127
|
-
{ no: 3, name: "notifications_read_count", kind: "scalar", oneof: "data", T:
|
|
122
|
+
{ no: 3, name: "notifications_read_count", kind: "scalar", oneof: "data", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
123
|
+
{ no: 4, name: "user_info_changed", kind: "message", oneof: "data", T: () => UserInfoChanged }
|
|
128
124
|
]);
|
|
129
125
|
}
|
|
130
126
|
create(value?: PartialMessage<UserEvent>): UserEvent {
|
|
@@ -151,10 +147,16 @@ class UserEvent$Type extends MessageType<UserEvent> {
|
|
|
151
147
|
notification: Notification.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).notification)
|
|
152
148
|
};
|
|
153
149
|
break;
|
|
154
|
-
case /*
|
|
150
|
+
case /* int64 notifications_read_count */ 3:
|
|
155
151
|
message.data = {
|
|
156
152
|
oneofKind: "notificationsReadCount",
|
|
157
|
-
notificationsReadCount: reader.
|
|
153
|
+
notificationsReadCount: reader.int64().toNumber()
|
|
154
|
+
};
|
|
155
|
+
break;
|
|
156
|
+
case /* resources.userinfo.UserInfoChanged user_info_changed */ 4:
|
|
157
|
+
message.data = {
|
|
158
|
+
oneofKind: "userInfoChanged",
|
|
159
|
+
userInfoChanged: UserInfoChanged.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).userInfoChanged)
|
|
158
160
|
};
|
|
159
161
|
break;
|
|
160
162
|
default:
|
|
@@ -175,9 +177,12 @@ class UserEvent$Type extends MessageType<UserEvent> {
|
|
|
175
177
|
/* resources.notifications.Notification notification = 2; */
|
|
176
178
|
if (message.data.oneofKind === "notification")
|
|
177
179
|
Notification.internalBinaryWrite(message.data.notification, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
178
|
-
/*
|
|
180
|
+
/* int64 notifications_read_count = 3; */
|
|
179
181
|
if (message.data.oneofKind === "notificationsReadCount")
|
|
180
|
-
writer.tag(3, WireType.Varint).
|
|
182
|
+
writer.tag(3, WireType.Varint).int64(message.data.notificationsReadCount);
|
|
183
|
+
/* resources.userinfo.UserInfoChanged user_info_changed = 4; */
|
|
184
|
+
if (message.data.oneofKind === "userInfoChanged")
|
|
185
|
+
UserInfoChanged.internalBinaryWrite(message.data.userInfoChanged, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
181
186
|
let u = options.writeUnknownFields;
|
|
182
187
|
if (u !== false)
|
|
183
188
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -292,8 +297,7 @@ export const JobGradeEvent = new JobGradeEvent$Type();
|
|
|
292
297
|
class SystemEvent$Type extends MessageType<SystemEvent> {
|
|
293
298
|
constructor() {
|
|
294
299
|
super("resources.notifications.SystemEvent", [
|
|
295
|
-
{ no: 1, name: "
|
|
296
|
-
{ no: 2, name: "banner_message", kind: "message", oneof: "data", T: () => BannerMessageWrapper }
|
|
300
|
+
{ no: 1, name: "client_config", kind: "message", oneof: "data", T: () => ClientConfig }
|
|
297
301
|
]);
|
|
298
302
|
}
|
|
299
303
|
create(value?: PartialMessage<SystemEvent>): SystemEvent {
|
|
@@ -308,16 +312,10 @@ class SystemEvent$Type extends MessageType<SystemEvent> {
|
|
|
308
312
|
while (reader.pos < end) {
|
|
309
313
|
let [fieldNo, wireType] = reader.tag();
|
|
310
314
|
switch (fieldNo) {
|
|
311
|
-
case /*
|
|
312
|
-
message.data = {
|
|
313
|
-
oneofKind: "ping",
|
|
314
|
-
ping: reader.bool()
|
|
315
|
-
};
|
|
316
|
-
break;
|
|
317
|
-
case /* resources.notifications.BannerMessageWrapper banner_message */ 2:
|
|
315
|
+
case /* resources.clientconfig.ClientConfig client_config */ 1:
|
|
318
316
|
message.data = {
|
|
319
|
-
oneofKind: "
|
|
320
|
-
|
|
317
|
+
oneofKind: "clientConfig",
|
|
318
|
+
clientConfig: ClientConfig.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).clientConfig)
|
|
321
319
|
};
|
|
322
320
|
break;
|
|
323
321
|
default:
|
|
@@ -332,12 +330,9 @@ class SystemEvent$Type extends MessageType<SystemEvent> {
|
|
|
332
330
|
return message;
|
|
333
331
|
}
|
|
334
332
|
internalBinaryWrite(message: SystemEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
335
|
-
/*
|
|
336
|
-
if (message.data.oneofKind === "
|
|
337
|
-
writer.tag(1, WireType.
|
|
338
|
-
/* resources.notifications.BannerMessageWrapper banner_message = 2; */
|
|
339
|
-
if (message.data.oneofKind === "bannerMessage")
|
|
340
|
-
BannerMessageWrapper.internalBinaryWrite(message.data.bannerMessage, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
333
|
+
/* resources.clientconfig.ClientConfig client_config = 1; */
|
|
334
|
+
if (message.data.oneofKind === "clientConfig")
|
|
335
|
+
ClientConfig.internalBinaryWrite(message.data.clientConfig, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
341
336
|
let u = options.writeUnknownFields;
|
|
342
337
|
if (u !== false)
|
|
343
338
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -348,49 +343,3 @@ class SystemEvent$Type extends MessageType<SystemEvent> {
|
|
|
348
343
|
* @generated MessageType for protobuf message resources.notifications.SystemEvent
|
|
349
344
|
*/
|
|
350
345
|
export const SystemEvent = new SystemEvent$Type();
|
|
351
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
352
|
-
class BannerMessageWrapper$Type extends MessageType<BannerMessageWrapper> {
|
|
353
|
-
constructor() {
|
|
354
|
-
super("resources.notifications.BannerMessageWrapper", [
|
|
355
|
-
{ no: 1, name: "banner_message", kind: "message", T: () => BannerMessage }
|
|
356
|
-
]);
|
|
357
|
-
}
|
|
358
|
-
create(value?: PartialMessage<BannerMessageWrapper>): BannerMessageWrapper {
|
|
359
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
360
|
-
if (value !== undefined)
|
|
361
|
-
reflectionMergePartial<BannerMessageWrapper>(this, message, value);
|
|
362
|
-
return message;
|
|
363
|
-
}
|
|
364
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BannerMessageWrapper): BannerMessageWrapper {
|
|
365
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
366
|
-
while (reader.pos < end) {
|
|
367
|
-
let [fieldNo, wireType] = reader.tag();
|
|
368
|
-
switch (fieldNo) {
|
|
369
|
-
case /* optional resources.settings.BannerMessage banner_message */ 1:
|
|
370
|
-
message.bannerMessage = BannerMessage.internalBinaryRead(reader, reader.uint32(), options, message.bannerMessage);
|
|
371
|
-
break;
|
|
372
|
-
default:
|
|
373
|
-
let u = options.readUnknownField;
|
|
374
|
-
if (u === "throw")
|
|
375
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
376
|
-
let d = reader.skip(wireType);
|
|
377
|
-
if (u !== false)
|
|
378
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
return message;
|
|
382
|
-
}
|
|
383
|
-
internalBinaryWrite(message: BannerMessageWrapper, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
384
|
-
/* optional resources.settings.BannerMessage banner_message = 1; */
|
|
385
|
-
if (message.bannerMessage)
|
|
386
|
-
BannerMessage.internalBinaryWrite(message.bannerMessage, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
387
|
-
let u = options.writeUnknownFields;
|
|
388
|
-
if (u !== false)
|
|
389
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
390
|
-
return writer;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* @generated MessageType for protobuf message resources.notifications.BannerMessageWrapper
|
|
395
|
-
*/
|
|
396
|
-
export const BannerMessageWrapper = new BannerMessageWrapper$Type();
|