@fivenet-app/gen 2025.5.3 → 2026.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/buf/validate/validate.ts +11301 -0
- package/clients.ts +193 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +287 -0
- package/codegen/sanitizer/sanitizer.ts +113 -0
- package/google/protobuf/any.ts +4 -3
- package/google/protobuf/descriptor.ts +393 -239
- package/google/protobuf/duration.ts +4 -3
- package/google/protobuf/struct.ts +485 -0
- package/google/protobuf/timestamp.ts +4 -3
- package/package.json +3 -3
- package/perms.ts +217 -160
- package/resources/accounts/accounts.ts +115 -47
- package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +33 -32
- package/resources/audit/audit.ts +172 -53
- package/resources/calendar/{access.ts → access/access.ts} +72 -71
- package/resources/calendar/calendar.ts +79 -543
- package/resources/calendar/entries/entries.ts +474 -0
- package/resources/centrum/access/access.ts +345 -0
- package/resources/centrum/dispatchers/dispatchers.ts +149 -0
- package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +267 -164
- package/resources/centrum/joblist.ts +136 -0
- package/resources/centrum/settings/settings.ts +657 -0
- package/resources/centrum/{units_access.ts → units/access/access.ts} +78 -79
- package/resources/centrum/{units.ts → units/units.ts} +230 -130
- package/resources/clientconfig/clientconfig.ts +1015 -0
- package/resources/collab/collab.ts +805 -0
- package/resources/common/content/content.ts +169 -63
- package/resources/common/content/diff_activity.ts +267 -0
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- package/resources/common/i18n.ts +20 -24
- package/resources/common/id_mapping.ts +69 -0
- package/resources/common/tests/objects.ts +4 -3
- package/resources/{common/cron → cron}/cron.ts +77 -65
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/{access.ts → access/access.ts} +75 -76
- package/resources/documents/{activity.ts → activity/activity.ts} +349 -124
- package/resources/documents/approval/approval.ts +945 -0
- package/resources/documents/{category.ts → category/category.ts} +25 -32
- package/resources/documents/{comment.ts → comment/comment.ts} +35 -34
- package/resources/documents/data/data.ts +303 -0
- package/resources/documents/documents.ts +374 -686
- package/resources/{common/uuid.ts → documents/forms/forms.ts} +22 -21
- package/resources/documents/pins/pins.ts +127 -0
- package/resources/documents/references/references.ts +187 -0
- package/resources/documents/relations/relations.ts +184 -0
- package/resources/documents/{requests.ts → requests/requests.ts} +45 -44
- package/resources/documents/stamps/stamp.ts +355 -0
- package/resources/documents/{templates.ts → templates/templates.ts} +524 -199
- package/resources/documents/workflow/workflow.ts +600 -0
- package/resources/file/file.ts +152 -0
- package/{services/settings → resources/file}/filestore.ts +179 -165
- package/resources/file/meta.ts +148 -0
- package/resources/{common/grpcws → grpcws}/grpcws.ts +66 -65
- package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +83 -86
- package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +76 -80
- package/resources/jobs/{conduct.ts → conduct/conduct.ts} +86 -62
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/{labels.ts → labels/labels.ts} +36 -37
- package/resources/jobs/{job_props.ts → props/props.ts} +63 -65
- package/resources/jobs/{job_settings.ts → settings/settings.ts} +89 -96
- package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +42 -41
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → markers/marker_marker.ts} +68 -335
- package/resources/livemap/markers/user_marker.ts +377 -0
- package/resources/mailer/{access.ts → access/access.ts} +119 -118
- package/resources/mailer/{email.ts → emails/email.ts} +38 -41
- package/resources/mailer/{events.ts → events/events.ts} +44 -43
- package/resources/mailer/{message.ts → messages/message.ts} +69 -74
- package/resources/mailer/{settings.ts → settings/settings.ts} +23 -25
- package/resources/mailer/{template.ts → templates/template.ts} +37 -40
- package/resources/mailer/{thread.ts → threads/thread.ts} +93 -94
- package/resources/notifications/clientview/clientview.ts +239 -0
- package/resources/notifications/{events.ts → events/events.ts} +67 -130
- package/resources/notifications/notifications.ts +55 -60
- package/resources/permissions/{attributes.ts → attributes/attributes.ts} +94 -237
- package/resources/permissions/events/events.ts +149 -0
- package/resources/permissions/{permissions.ts → permissions/permissions.ts} +127 -47
- package/resources/qualifications/{access.ts → access/access.ts} +43 -42
- package/resources/qualifications/{exam.ts → exam/exam.ts} +419 -229
- package/resources/qualifications/qualifications.ts +327 -388
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +663 -79
- package/resources/settings/data.ts +90 -0
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +382 -2
- package/resources/sync/{activity.ts → activity/activity.ts} +126 -46
- package/resources/sync/data/data.ts +1001 -0
- package/resources/sync/data/v2/data.ts +220 -0
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/userinfo.ts +442 -0
- package/resources/users/{activity.ts → activity/activity.ts} +182 -166
- package/resources/users/{labels.ts → labels/labels.ts} +27 -30
- package/resources/users/{licenses.ts → licenses/licenses.ts} +18 -17
- package/resources/users/{props.ts → props/props.ts} +109 -77
- package/resources/users/short/user.ts +184 -0
- package/resources/users/user.ts +528 -0
- package/resources/vehicles/activity/activity.ts +231 -0
- package/resources/vehicles/props/props.ts +125 -0
- package/resources/vehicles/vehicles.ts +43 -18
- package/resources/wiki/{access.ts → access/access.ts} +72 -71
- package/resources/wiki/{activity.ts → activity/activity.ts} +218 -102
- package/resources/wiki/page.ts +164 -93
- package/services/auth/auth.client.ts +45 -35
- package/services/auth/auth.ts +498 -288
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +157 -134
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +755 -352
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +226 -112
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +95 -54
- package/services/documents/approval.client.ts +188 -0
- package/services/documents/approval.ts +1776 -0
- package/services/documents/collab.client.ts +46 -0
- package/services/documents/collab.ts +13 -0
- package/services/documents/documents.client.ts +88 -217
- package/services/documents/documents.ts +579 -619
- package/services/documents/forms.client.ts +51 -0
- package/services/documents/forms.ts +232 -0
- package/services/documents/stamps.client.ts +77 -0
- package/services/documents/stamps.ts +481 -0
- package/services/documents/stats.client.ts +38 -0
- package/services/documents/stats.ts +245 -0
- package/services/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +40 -28
- package/services/jobs/conduct.ts +183 -56
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +138 -121
- package/services/jobs/stats.client.ts +38 -0
- package/services/jobs/stats.ts +207 -0
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +76 -75
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +297 -126
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +266 -269
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +126 -83
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +250 -209
- package/services/settings/accounts.client.ts +31 -33
- package/services/settings/accounts.ts +251 -67
- package/services/settings/config.client.ts +6 -13
- package/services/settings/config.ts +8 -7
- package/services/settings/cron.client.ts +4 -7
- package/services/settings/cron.ts +7 -6
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +30 -29
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +237 -633
- package/services/settings/system.client.ts +103 -0
- package/services/settings/system.ts +718 -0
- package/services/stats/stats.client.ts +9 -8
- package/services/stats/stats.ts +27 -26
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +174 -97
- package/services/sync/v2/sync.client.ts +331 -0
- package/services/sync/v2/sync.ts +1766 -0
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +170 -25
- package/services/wiki/collab.client.ts +46 -0
- package/services/wiki/collab.ts +13 -0
- package/services/wiki/wiki.client.ts +28 -37
- package/services/wiki/wiki.ts +97 -67
- package/svcs.ts +174 -106
- package/resources/centrum/attributes.ts +0 -186
- package/resources/centrum/disponents.ts +0 -81
- package/resources/centrum/settings.ts +0 -307
- package/resources/documents/workflow.ts +0 -351
- package/resources/filestore/file.ts +0 -204
- package/resources/internet/access.ts +0 -358
- package/resources/internet/ads.ts +0 -257
- package/resources/internet/domain.ts +0 -328
- package/resources/internet/page.ts +0 -428
- package/resources/internet/search.ts +0 -128
- package/resources/livemap/tracker.ts +0 -81
- package/resources/sync/data.ts +0 -587
- package/resources/users/users.ts +0 -435
- package/services/internet/ads.client.ts +0 -41
- package/services/internet/ads.ts +0 -145
- package/services/internet/domain.client.ts +0 -109
- package/services/internet/domain.ts +0 -658
- package/services/internet/internet.client.ts +0 -58
- package/services/internet/internet.ts +0 -268
- package/services/notificator/notificator.client.ts +0 -76
- package/services/settings/filestore.client.ts +0 -75
|
@@ -0,0 +1,805 @@
|
|
|
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/collab/collab.proto" (package "resources.collab", 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
|
+
/**
|
|
15
|
+
* @generated from protobuf message resources.collab.ClientPacket
|
|
16
|
+
*/
|
|
17
|
+
export interface ClientPacket {
|
|
18
|
+
/**
|
|
19
|
+
* @generated from protobuf oneof: msg
|
|
20
|
+
*/
|
|
21
|
+
msg: {
|
|
22
|
+
oneofKind: "hello";
|
|
23
|
+
/**
|
|
24
|
+
* Must be the first message
|
|
25
|
+
*
|
|
26
|
+
* @generated from protobuf field: resources.collab.CollabInit hello = 1
|
|
27
|
+
*/
|
|
28
|
+
hello: CollabInit;
|
|
29
|
+
} | {
|
|
30
|
+
oneofKind: "syncStep";
|
|
31
|
+
/**
|
|
32
|
+
* @generated from protobuf field: resources.collab.SyncStep sync_step = 2
|
|
33
|
+
*/
|
|
34
|
+
syncStep: SyncStep;
|
|
35
|
+
} | {
|
|
36
|
+
oneofKind: "yjsUpdate";
|
|
37
|
+
/**
|
|
38
|
+
* @generated from protobuf field: resources.collab.YjsUpdate yjs_update = 3
|
|
39
|
+
*/
|
|
40
|
+
yjsUpdate: YjsUpdate;
|
|
41
|
+
} | {
|
|
42
|
+
oneofKind: "awareness";
|
|
43
|
+
/**
|
|
44
|
+
* @generated from protobuf field: resources.collab.AwarenessPing awareness = 4
|
|
45
|
+
*/
|
|
46
|
+
awareness: AwarenessPing;
|
|
47
|
+
} | {
|
|
48
|
+
oneofKind: undefined;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @generated from protobuf message resources.collab.CollabInit
|
|
53
|
+
*/
|
|
54
|
+
export interface CollabInit {
|
|
55
|
+
/**
|
|
56
|
+
* @generated from protobuf field: int64 target_id = 1
|
|
57
|
+
*/
|
|
58
|
+
targetId: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @generated from protobuf message resources.collab.SyncStep
|
|
62
|
+
*/
|
|
63
|
+
export interface SyncStep {
|
|
64
|
+
/**
|
|
65
|
+
* @generated from protobuf field: int32 step = 1
|
|
66
|
+
*/
|
|
67
|
+
step: number;
|
|
68
|
+
/**
|
|
69
|
+
* @generated from protobuf field: bytes data = 2
|
|
70
|
+
*/
|
|
71
|
+
data: Uint8Array;
|
|
72
|
+
/**
|
|
73
|
+
* @generated from protobuf field: optional uint64 receiver_id = 3
|
|
74
|
+
*/
|
|
75
|
+
receiverId?: number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf message resources.collab.YjsUpdate
|
|
79
|
+
*/
|
|
80
|
+
export interface YjsUpdate {
|
|
81
|
+
/**
|
|
82
|
+
* @generated from protobuf field: bytes data = 1
|
|
83
|
+
*/
|
|
84
|
+
data: Uint8Array;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @generated from protobuf message resources.collab.AwarenessPing
|
|
88
|
+
*/
|
|
89
|
+
export interface AwarenessPing {
|
|
90
|
+
/**
|
|
91
|
+
* @generated from protobuf field: bytes data = 1
|
|
92
|
+
*/
|
|
93
|
+
data: Uint8Array;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @generated from protobuf message resources.collab.ServerPacket
|
|
97
|
+
*/
|
|
98
|
+
export interface ServerPacket {
|
|
99
|
+
/**
|
|
100
|
+
* Who generated this packet (same ID used in awareness)
|
|
101
|
+
*
|
|
102
|
+
* @generated from protobuf field: uint64 sender_id = 1
|
|
103
|
+
*/
|
|
104
|
+
senderId: number;
|
|
105
|
+
/**
|
|
106
|
+
* @generated from protobuf oneof: msg
|
|
107
|
+
*/
|
|
108
|
+
msg: {
|
|
109
|
+
oneofKind: "handshake";
|
|
110
|
+
/**
|
|
111
|
+
* @generated from protobuf field: resources.collab.CollabHandshake handshake = 2
|
|
112
|
+
*/
|
|
113
|
+
handshake: CollabHandshake;
|
|
114
|
+
} | {
|
|
115
|
+
oneofKind: "syncStep";
|
|
116
|
+
/**
|
|
117
|
+
* @generated from protobuf field: resources.collab.SyncStep sync_step = 3
|
|
118
|
+
*/
|
|
119
|
+
syncStep: SyncStep;
|
|
120
|
+
} | {
|
|
121
|
+
oneofKind: "yjsUpdate";
|
|
122
|
+
/**
|
|
123
|
+
* @generated from protobuf field: resources.collab.YjsUpdate yjs_update = 4
|
|
124
|
+
*/
|
|
125
|
+
yjsUpdate: YjsUpdate;
|
|
126
|
+
} | {
|
|
127
|
+
oneofKind: "awareness";
|
|
128
|
+
/**
|
|
129
|
+
* @generated from protobuf field: resources.collab.AwarenessPing awareness = 5
|
|
130
|
+
*/
|
|
131
|
+
awareness: AwarenessPing;
|
|
132
|
+
} | {
|
|
133
|
+
oneofKind: "targetSaved";
|
|
134
|
+
/**
|
|
135
|
+
* @generated from protobuf field: resources.collab.TargetSaved target_saved = 6
|
|
136
|
+
*/
|
|
137
|
+
targetSaved: TargetSaved;
|
|
138
|
+
} | {
|
|
139
|
+
oneofKind: "promote";
|
|
140
|
+
/**
|
|
141
|
+
* @generated from protobuf field: resources.collab.FirstPromote promote = 7
|
|
142
|
+
*/
|
|
143
|
+
promote: FirstPromote;
|
|
144
|
+
} | {
|
|
145
|
+
oneofKind: "clientUpdate";
|
|
146
|
+
/**
|
|
147
|
+
* @generated from protobuf field: resources.collab.ClientUpdate client_update = 8
|
|
148
|
+
*/
|
|
149
|
+
clientUpdate: ClientUpdate;
|
|
150
|
+
} | {
|
|
151
|
+
oneofKind: undefined;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* @generated from protobuf message resources.collab.CollabHandshake
|
|
156
|
+
*/
|
|
157
|
+
export interface CollabHandshake {
|
|
158
|
+
/**
|
|
159
|
+
* @generated from protobuf field: uint64 client_id = 1
|
|
160
|
+
*/
|
|
161
|
+
clientId: number;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* @generated from protobuf message resources.collab.TargetSaved
|
|
165
|
+
*/
|
|
166
|
+
export interface TargetSaved {
|
|
167
|
+
/**
|
|
168
|
+
* @generated from protobuf field: int64 target_id = 1
|
|
169
|
+
*/
|
|
170
|
+
targetId: number;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* @generated from protobuf message resources.collab.FirstPromote
|
|
174
|
+
*/
|
|
175
|
+
export interface FirstPromote {
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* @generated from protobuf message resources.collab.ClientUpdate
|
|
179
|
+
*/
|
|
180
|
+
export interface ClientUpdate {
|
|
181
|
+
/**
|
|
182
|
+
* @generated from protobuf field: bool joined = 1
|
|
183
|
+
*/
|
|
184
|
+
joined: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* @generated from protobuf field: uint64 client_id = 2
|
|
187
|
+
*/
|
|
188
|
+
clientId: number;
|
|
189
|
+
/**
|
|
190
|
+
* @generated from protobuf field: optional string label = 3
|
|
191
|
+
*/
|
|
192
|
+
label?: string;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* @generated from protobuf enum resources.collab.ClientRole
|
|
196
|
+
*/
|
|
197
|
+
export enum ClientRole {
|
|
198
|
+
/**
|
|
199
|
+
* @generated from protobuf enum value: CLIENT_ROLE_UNSPECIFIED = 0;
|
|
200
|
+
*/
|
|
201
|
+
UNSPECIFIED = 0,
|
|
202
|
+
/**
|
|
203
|
+
* @generated from protobuf enum value: CLIENT_ROLE_READER = 1;
|
|
204
|
+
*/
|
|
205
|
+
READER = 1,
|
|
206
|
+
/**
|
|
207
|
+
* @generated from protobuf enum value: CLIENT_ROLE_WRITER = 2;
|
|
208
|
+
*/
|
|
209
|
+
WRITER = 2
|
|
210
|
+
}
|
|
211
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
212
|
+
class ClientPacket$Type extends MessageType<ClientPacket> {
|
|
213
|
+
constructor() {
|
|
214
|
+
super("resources.collab.ClientPacket", [
|
|
215
|
+
{ no: 1, name: "hello", kind: "message", oneof: "msg", T: () => CollabInit },
|
|
216
|
+
{ no: 2, name: "sync_step", kind: "message", oneof: "msg", T: () => SyncStep },
|
|
217
|
+
{ no: 3, name: "yjs_update", kind: "message", oneof: "msg", T: () => YjsUpdate },
|
|
218
|
+
{ no: 4, name: "awareness", kind: "message", oneof: "msg", T: () => AwarenessPing }
|
|
219
|
+
]);
|
|
220
|
+
}
|
|
221
|
+
create(value?: PartialMessage<ClientPacket>): ClientPacket {
|
|
222
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
223
|
+
message.msg = { oneofKind: undefined };
|
|
224
|
+
if (value !== undefined)
|
|
225
|
+
reflectionMergePartial<ClientPacket>(this, message, value);
|
|
226
|
+
return message;
|
|
227
|
+
}
|
|
228
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClientPacket): ClientPacket {
|
|
229
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
230
|
+
while (reader.pos < end) {
|
|
231
|
+
let [fieldNo, wireType] = reader.tag();
|
|
232
|
+
switch (fieldNo) {
|
|
233
|
+
case /* resources.collab.CollabInit hello */ 1:
|
|
234
|
+
message.msg = {
|
|
235
|
+
oneofKind: "hello",
|
|
236
|
+
hello: CollabInit.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).hello)
|
|
237
|
+
};
|
|
238
|
+
break;
|
|
239
|
+
case /* resources.collab.SyncStep sync_step */ 2:
|
|
240
|
+
message.msg = {
|
|
241
|
+
oneofKind: "syncStep",
|
|
242
|
+
syncStep: SyncStep.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).syncStep)
|
|
243
|
+
};
|
|
244
|
+
break;
|
|
245
|
+
case /* resources.collab.YjsUpdate yjs_update */ 3:
|
|
246
|
+
message.msg = {
|
|
247
|
+
oneofKind: "yjsUpdate",
|
|
248
|
+
yjsUpdate: YjsUpdate.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).yjsUpdate)
|
|
249
|
+
};
|
|
250
|
+
break;
|
|
251
|
+
case /* resources.collab.AwarenessPing awareness */ 4:
|
|
252
|
+
message.msg = {
|
|
253
|
+
oneofKind: "awareness",
|
|
254
|
+
awareness: AwarenessPing.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).awareness)
|
|
255
|
+
};
|
|
256
|
+
break;
|
|
257
|
+
default:
|
|
258
|
+
let u = options.readUnknownField;
|
|
259
|
+
if (u === "throw")
|
|
260
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
261
|
+
let d = reader.skip(wireType);
|
|
262
|
+
if (u !== false)
|
|
263
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return message;
|
|
267
|
+
}
|
|
268
|
+
internalBinaryWrite(message: ClientPacket, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
269
|
+
/* resources.collab.CollabInit hello = 1; */
|
|
270
|
+
if (message.msg.oneofKind === "hello")
|
|
271
|
+
CollabInit.internalBinaryWrite(message.msg.hello, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
272
|
+
/* resources.collab.SyncStep sync_step = 2; */
|
|
273
|
+
if (message.msg.oneofKind === "syncStep")
|
|
274
|
+
SyncStep.internalBinaryWrite(message.msg.syncStep, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
275
|
+
/* resources.collab.YjsUpdate yjs_update = 3; */
|
|
276
|
+
if (message.msg.oneofKind === "yjsUpdate")
|
|
277
|
+
YjsUpdate.internalBinaryWrite(message.msg.yjsUpdate, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
278
|
+
/* resources.collab.AwarenessPing awareness = 4; */
|
|
279
|
+
if (message.msg.oneofKind === "awareness")
|
|
280
|
+
AwarenessPing.internalBinaryWrite(message.msg.awareness, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
281
|
+
let u = options.writeUnknownFields;
|
|
282
|
+
if (u !== false)
|
|
283
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
284
|
+
return writer;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* @generated MessageType for protobuf message resources.collab.ClientPacket
|
|
289
|
+
*/
|
|
290
|
+
export const ClientPacket = new ClientPacket$Type();
|
|
291
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
292
|
+
class CollabInit$Type extends MessageType<CollabInit> {
|
|
293
|
+
constructor() {
|
|
294
|
+
super("resources.collab.CollabInit", [
|
|
295
|
+
{ no: 1, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } }
|
|
296
|
+
]);
|
|
297
|
+
}
|
|
298
|
+
create(value?: PartialMessage<CollabInit>): CollabInit {
|
|
299
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
300
|
+
message.targetId = 0;
|
|
301
|
+
if (value !== undefined)
|
|
302
|
+
reflectionMergePartial<CollabInit>(this, message, value);
|
|
303
|
+
return message;
|
|
304
|
+
}
|
|
305
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CollabInit): CollabInit {
|
|
306
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
307
|
+
while (reader.pos < end) {
|
|
308
|
+
let [fieldNo, wireType] = reader.tag();
|
|
309
|
+
switch (fieldNo) {
|
|
310
|
+
case /* int64 target_id */ 1:
|
|
311
|
+
message.targetId = reader.int64().toNumber();
|
|
312
|
+
break;
|
|
313
|
+
default:
|
|
314
|
+
let u = options.readUnknownField;
|
|
315
|
+
if (u === "throw")
|
|
316
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
317
|
+
let d = reader.skip(wireType);
|
|
318
|
+
if (u !== false)
|
|
319
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return message;
|
|
323
|
+
}
|
|
324
|
+
internalBinaryWrite(message: CollabInit, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
325
|
+
/* int64 target_id = 1; */
|
|
326
|
+
if (message.targetId !== 0)
|
|
327
|
+
writer.tag(1, WireType.Varint).int64(message.targetId);
|
|
328
|
+
let u = options.writeUnknownFields;
|
|
329
|
+
if (u !== false)
|
|
330
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
331
|
+
return writer;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* @generated MessageType for protobuf message resources.collab.CollabInit
|
|
336
|
+
*/
|
|
337
|
+
export const CollabInit = new CollabInit$Type();
|
|
338
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
339
|
+
class SyncStep$Type extends MessageType<SyncStep> {
|
|
340
|
+
constructor() {
|
|
341
|
+
super("resources.collab.SyncStep", [
|
|
342
|
+
{ no: 1, name: "step", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { in: [1, 2] } } } },
|
|
343
|
+
{ no: 2, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/, options: { "codegen.audit.redacted": true } },
|
|
344
|
+
{ no: 3, name: "receiver_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { uint64: { gt: "0" } } } }
|
|
345
|
+
]);
|
|
346
|
+
}
|
|
347
|
+
create(value?: PartialMessage<SyncStep>): SyncStep {
|
|
348
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
349
|
+
message.step = 0;
|
|
350
|
+
message.data = new Uint8Array(0);
|
|
351
|
+
if (value !== undefined)
|
|
352
|
+
reflectionMergePartial<SyncStep>(this, message, value);
|
|
353
|
+
return message;
|
|
354
|
+
}
|
|
355
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SyncStep): SyncStep {
|
|
356
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
357
|
+
while (reader.pos < end) {
|
|
358
|
+
let [fieldNo, wireType] = reader.tag();
|
|
359
|
+
switch (fieldNo) {
|
|
360
|
+
case /* int32 step */ 1:
|
|
361
|
+
message.step = reader.int32();
|
|
362
|
+
break;
|
|
363
|
+
case /* bytes data */ 2:
|
|
364
|
+
message.data = reader.bytes();
|
|
365
|
+
break;
|
|
366
|
+
case /* optional uint64 receiver_id */ 3:
|
|
367
|
+
message.receiverId = reader.uint64().toNumber();
|
|
368
|
+
break;
|
|
369
|
+
default:
|
|
370
|
+
let u = options.readUnknownField;
|
|
371
|
+
if (u === "throw")
|
|
372
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
373
|
+
let d = reader.skip(wireType);
|
|
374
|
+
if (u !== false)
|
|
375
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return message;
|
|
379
|
+
}
|
|
380
|
+
internalBinaryWrite(message: SyncStep, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
381
|
+
/* int32 step = 1; */
|
|
382
|
+
if (message.step !== 0)
|
|
383
|
+
writer.tag(1, WireType.Varint).int32(message.step);
|
|
384
|
+
/* bytes data = 2; */
|
|
385
|
+
if (message.data.length)
|
|
386
|
+
writer.tag(2, WireType.LengthDelimited).bytes(message.data);
|
|
387
|
+
/* optional uint64 receiver_id = 3; */
|
|
388
|
+
if (message.receiverId !== undefined)
|
|
389
|
+
writer.tag(3, WireType.Varint).uint64(message.receiverId);
|
|
390
|
+
let u = options.writeUnknownFields;
|
|
391
|
+
if (u !== false)
|
|
392
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
393
|
+
return writer;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* @generated MessageType for protobuf message resources.collab.SyncStep
|
|
398
|
+
*/
|
|
399
|
+
export const SyncStep = new SyncStep$Type();
|
|
400
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
401
|
+
class YjsUpdate$Type extends MessageType<YjsUpdate> {
|
|
402
|
+
constructor() {
|
|
403
|
+
super("resources.collab.YjsUpdate", [
|
|
404
|
+
{ no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/, options: { "codegen.audit.redacted": true } }
|
|
405
|
+
]);
|
|
406
|
+
}
|
|
407
|
+
create(value?: PartialMessage<YjsUpdate>): YjsUpdate {
|
|
408
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
409
|
+
message.data = new Uint8Array(0);
|
|
410
|
+
if (value !== undefined)
|
|
411
|
+
reflectionMergePartial<YjsUpdate>(this, message, value);
|
|
412
|
+
return message;
|
|
413
|
+
}
|
|
414
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: YjsUpdate): YjsUpdate {
|
|
415
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
416
|
+
while (reader.pos < end) {
|
|
417
|
+
let [fieldNo, wireType] = reader.tag();
|
|
418
|
+
switch (fieldNo) {
|
|
419
|
+
case /* bytes data */ 1:
|
|
420
|
+
message.data = reader.bytes();
|
|
421
|
+
break;
|
|
422
|
+
default:
|
|
423
|
+
let u = options.readUnknownField;
|
|
424
|
+
if (u === "throw")
|
|
425
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
426
|
+
let d = reader.skip(wireType);
|
|
427
|
+
if (u !== false)
|
|
428
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return message;
|
|
432
|
+
}
|
|
433
|
+
internalBinaryWrite(message: YjsUpdate, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
434
|
+
/* bytes data = 1; */
|
|
435
|
+
if (message.data.length)
|
|
436
|
+
writer.tag(1, WireType.LengthDelimited).bytes(message.data);
|
|
437
|
+
let u = options.writeUnknownFields;
|
|
438
|
+
if (u !== false)
|
|
439
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
440
|
+
return writer;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* @generated MessageType for protobuf message resources.collab.YjsUpdate
|
|
445
|
+
*/
|
|
446
|
+
export const YjsUpdate = new YjsUpdate$Type();
|
|
447
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
448
|
+
class AwarenessPing$Type extends MessageType<AwarenessPing> {
|
|
449
|
+
constructor() {
|
|
450
|
+
super("resources.collab.AwarenessPing", [
|
|
451
|
+
{ no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/, options: { "codegen.audit.redacted": true } }
|
|
452
|
+
]);
|
|
453
|
+
}
|
|
454
|
+
create(value?: PartialMessage<AwarenessPing>): AwarenessPing {
|
|
455
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
456
|
+
message.data = new Uint8Array(0);
|
|
457
|
+
if (value !== undefined)
|
|
458
|
+
reflectionMergePartial<AwarenessPing>(this, message, value);
|
|
459
|
+
return message;
|
|
460
|
+
}
|
|
461
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AwarenessPing): AwarenessPing {
|
|
462
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
463
|
+
while (reader.pos < end) {
|
|
464
|
+
let [fieldNo, wireType] = reader.tag();
|
|
465
|
+
switch (fieldNo) {
|
|
466
|
+
case /* bytes data */ 1:
|
|
467
|
+
message.data = reader.bytes();
|
|
468
|
+
break;
|
|
469
|
+
default:
|
|
470
|
+
let u = options.readUnknownField;
|
|
471
|
+
if (u === "throw")
|
|
472
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
473
|
+
let d = reader.skip(wireType);
|
|
474
|
+
if (u !== false)
|
|
475
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
return message;
|
|
479
|
+
}
|
|
480
|
+
internalBinaryWrite(message: AwarenessPing, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
481
|
+
/* bytes data = 1; */
|
|
482
|
+
if (message.data.length)
|
|
483
|
+
writer.tag(1, WireType.LengthDelimited).bytes(message.data);
|
|
484
|
+
let u = options.writeUnknownFields;
|
|
485
|
+
if (u !== false)
|
|
486
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
487
|
+
return writer;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* @generated MessageType for protobuf message resources.collab.AwarenessPing
|
|
492
|
+
*/
|
|
493
|
+
export const AwarenessPing = new AwarenessPing$Type();
|
|
494
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
495
|
+
class ServerPacket$Type extends MessageType<ServerPacket> {
|
|
496
|
+
constructor() {
|
|
497
|
+
super("resources.collab.ServerPacket", [
|
|
498
|
+
{ no: 1, name: "sender_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { uint64: { gt: "0" } } } },
|
|
499
|
+
{ no: 2, name: "handshake", kind: "message", oneof: "msg", T: () => CollabHandshake },
|
|
500
|
+
{ no: 3, name: "sync_step", kind: "message", oneof: "msg", T: () => SyncStep },
|
|
501
|
+
{ no: 4, name: "yjs_update", kind: "message", oneof: "msg", T: () => YjsUpdate },
|
|
502
|
+
{ no: 5, name: "awareness", kind: "message", oneof: "msg", T: () => AwarenessPing },
|
|
503
|
+
{ no: 6, name: "target_saved", kind: "message", oneof: "msg", T: () => TargetSaved },
|
|
504
|
+
{ no: 7, name: "promote", kind: "message", oneof: "msg", T: () => FirstPromote },
|
|
505
|
+
{ no: 8, name: "client_update", kind: "message", oneof: "msg", T: () => ClientUpdate }
|
|
506
|
+
]);
|
|
507
|
+
}
|
|
508
|
+
create(value?: PartialMessage<ServerPacket>): ServerPacket {
|
|
509
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
510
|
+
message.senderId = 0;
|
|
511
|
+
message.msg = { oneofKind: undefined };
|
|
512
|
+
if (value !== undefined)
|
|
513
|
+
reflectionMergePartial<ServerPacket>(this, message, value);
|
|
514
|
+
return message;
|
|
515
|
+
}
|
|
516
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServerPacket): ServerPacket {
|
|
517
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
518
|
+
while (reader.pos < end) {
|
|
519
|
+
let [fieldNo, wireType] = reader.tag();
|
|
520
|
+
switch (fieldNo) {
|
|
521
|
+
case /* uint64 sender_id */ 1:
|
|
522
|
+
message.senderId = reader.uint64().toNumber();
|
|
523
|
+
break;
|
|
524
|
+
case /* resources.collab.CollabHandshake handshake */ 2:
|
|
525
|
+
message.msg = {
|
|
526
|
+
oneofKind: "handshake",
|
|
527
|
+
handshake: CollabHandshake.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).handshake)
|
|
528
|
+
};
|
|
529
|
+
break;
|
|
530
|
+
case /* resources.collab.SyncStep sync_step */ 3:
|
|
531
|
+
message.msg = {
|
|
532
|
+
oneofKind: "syncStep",
|
|
533
|
+
syncStep: SyncStep.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).syncStep)
|
|
534
|
+
};
|
|
535
|
+
break;
|
|
536
|
+
case /* resources.collab.YjsUpdate yjs_update */ 4:
|
|
537
|
+
message.msg = {
|
|
538
|
+
oneofKind: "yjsUpdate",
|
|
539
|
+
yjsUpdate: YjsUpdate.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).yjsUpdate)
|
|
540
|
+
};
|
|
541
|
+
break;
|
|
542
|
+
case /* resources.collab.AwarenessPing awareness */ 5:
|
|
543
|
+
message.msg = {
|
|
544
|
+
oneofKind: "awareness",
|
|
545
|
+
awareness: AwarenessPing.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).awareness)
|
|
546
|
+
};
|
|
547
|
+
break;
|
|
548
|
+
case /* resources.collab.TargetSaved target_saved */ 6:
|
|
549
|
+
message.msg = {
|
|
550
|
+
oneofKind: "targetSaved",
|
|
551
|
+
targetSaved: TargetSaved.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).targetSaved)
|
|
552
|
+
};
|
|
553
|
+
break;
|
|
554
|
+
case /* resources.collab.FirstPromote promote */ 7:
|
|
555
|
+
message.msg = {
|
|
556
|
+
oneofKind: "promote",
|
|
557
|
+
promote: FirstPromote.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).promote)
|
|
558
|
+
};
|
|
559
|
+
break;
|
|
560
|
+
case /* resources.collab.ClientUpdate client_update */ 8:
|
|
561
|
+
message.msg = {
|
|
562
|
+
oneofKind: "clientUpdate",
|
|
563
|
+
clientUpdate: ClientUpdate.internalBinaryRead(reader, reader.uint32(), options, (message.msg as any).clientUpdate)
|
|
564
|
+
};
|
|
565
|
+
break;
|
|
566
|
+
default:
|
|
567
|
+
let u = options.readUnknownField;
|
|
568
|
+
if (u === "throw")
|
|
569
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
570
|
+
let d = reader.skip(wireType);
|
|
571
|
+
if (u !== false)
|
|
572
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
return message;
|
|
576
|
+
}
|
|
577
|
+
internalBinaryWrite(message: ServerPacket, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
578
|
+
/* uint64 sender_id = 1; */
|
|
579
|
+
if (message.senderId !== 0)
|
|
580
|
+
writer.tag(1, WireType.Varint).uint64(message.senderId);
|
|
581
|
+
/* resources.collab.CollabHandshake handshake = 2; */
|
|
582
|
+
if (message.msg.oneofKind === "handshake")
|
|
583
|
+
CollabHandshake.internalBinaryWrite(message.msg.handshake, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
584
|
+
/* resources.collab.SyncStep sync_step = 3; */
|
|
585
|
+
if (message.msg.oneofKind === "syncStep")
|
|
586
|
+
SyncStep.internalBinaryWrite(message.msg.syncStep, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
587
|
+
/* resources.collab.YjsUpdate yjs_update = 4; */
|
|
588
|
+
if (message.msg.oneofKind === "yjsUpdate")
|
|
589
|
+
YjsUpdate.internalBinaryWrite(message.msg.yjsUpdate, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
590
|
+
/* resources.collab.AwarenessPing awareness = 5; */
|
|
591
|
+
if (message.msg.oneofKind === "awareness")
|
|
592
|
+
AwarenessPing.internalBinaryWrite(message.msg.awareness, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
593
|
+
/* resources.collab.TargetSaved target_saved = 6; */
|
|
594
|
+
if (message.msg.oneofKind === "targetSaved")
|
|
595
|
+
TargetSaved.internalBinaryWrite(message.msg.targetSaved, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
596
|
+
/* resources.collab.FirstPromote promote = 7; */
|
|
597
|
+
if (message.msg.oneofKind === "promote")
|
|
598
|
+
FirstPromote.internalBinaryWrite(message.msg.promote, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
599
|
+
/* resources.collab.ClientUpdate client_update = 8; */
|
|
600
|
+
if (message.msg.oneofKind === "clientUpdate")
|
|
601
|
+
ClientUpdate.internalBinaryWrite(message.msg.clientUpdate, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
602
|
+
let u = options.writeUnknownFields;
|
|
603
|
+
if (u !== false)
|
|
604
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
605
|
+
return writer;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* @generated MessageType for protobuf message resources.collab.ServerPacket
|
|
610
|
+
*/
|
|
611
|
+
export const ServerPacket = new ServerPacket$Type();
|
|
612
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
613
|
+
class CollabHandshake$Type extends MessageType<CollabHandshake> {
|
|
614
|
+
constructor() {
|
|
615
|
+
super("resources.collab.CollabHandshake", [
|
|
616
|
+
{ no: 1, name: "client_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
617
|
+
]);
|
|
618
|
+
}
|
|
619
|
+
create(value?: PartialMessage<CollabHandshake>): CollabHandshake {
|
|
620
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
621
|
+
message.clientId = 0;
|
|
622
|
+
if (value !== undefined)
|
|
623
|
+
reflectionMergePartial<CollabHandshake>(this, message, value);
|
|
624
|
+
return message;
|
|
625
|
+
}
|
|
626
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CollabHandshake): CollabHandshake {
|
|
627
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
628
|
+
while (reader.pos < end) {
|
|
629
|
+
let [fieldNo, wireType] = reader.tag();
|
|
630
|
+
switch (fieldNo) {
|
|
631
|
+
case /* uint64 client_id */ 1:
|
|
632
|
+
message.clientId = reader.uint64().toNumber();
|
|
633
|
+
break;
|
|
634
|
+
default:
|
|
635
|
+
let u = options.readUnknownField;
|
|
636
|
+
if (u === "throw")
|
|
637
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
638
|
+
let d = reader.skip(wireType);
|
|
639
|
+
if (u !== false)
|
|
640
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
return message;
|
|
644
|
+
}
|
|
645
|
+
internalBinaryWrite(message: CollabHandshake, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
646
|
+
/* uint64 client_id = 1; */
|
|
647
|
+
if (message.clientId !== 0)
|
|
648
|
+
writer.tag(1, WireType.Varint).uint64(message.clientId);
|
|
649
|
+
let u = options.writeUnknownFields;
|
|
650
|
+
if (u !== false)
|
|
651
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
652
|
+
return writer;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* @generated MessageType for protobuf message resources.collab.CollabHandshake
|
|
657
|
+
*/
|
|
658
|
+
export const CollabHandshake = new CollabHandshake$Type();
|
|
659
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
660
|
+
class TargetSaved$Type extends MessageType<TargetSaved> {
|
|
661
|
+
constructor() {
|
|
662
|
+
super("resources.collab.TargetSaved", [
|
|
663
|
+
{ no: 1, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } }
|
|
664
|
+
]);
|
|
665
|
+
}
|
|
666
|
+
create(value?: PartialMessage<TargetSaved>): TargetSaved {
|
|
667
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
668
|
+
message.targetId = 0;
|
|
669
|
+
if (value !== undefined)
|
|
670
|
+
reflectionMergePartial<TargetSaved>(this, message, value);
|
|
671
|
+
return message;
|
|
672
|
+
}
|
|
673
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TargetSaved): TargetSaved {
|
|
674
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
675
|
+
while (reader.pos < end) {
|
|
676
|
+
let [fieldNo, wireType] = reader.tag();
|
|
677
|
+
switch (fieldNo) {
|
|
678
|
+
case /* int64 target_id */ 1:
|
|
679
|
+
message.targetId = reader.int64().toNumber();
|
|
680
|
+
break;
|
|
681
|
+
default:
|
|
682
|
+
let u = options.readUnknownField;
|
|
683
|
+
if (u === "throw")
|
|
684
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
685
|
+
let d = reader.skip(wireType);
|
|
686
|
+
if (u !== false)
|
|
687
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
return message;
|
|
691
|
+
}
|
|
692
|
+
internalBinaryWrite(message: TargetSaved, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
693
|
+
/* int64 target_id = 1; */
|
|
694
|
+
if (message.targetId !== 0)
|
|
695
|
+
writer.tag(1, WireType.Varint).int64(message.targetId);
|
|
696
|
+
let u = options.writeUnknownFields;
|
|
697
|
+
if (u !== false)
|
|
698
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
699
|
+
return writer;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* @generated MessageType for protobuf message resources.collab.TargetSaved
|
|
704
|
+
*/
|
|
705
|
+
export const TargetSaved = new TargetSaved$Type();
|
|
706
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
707
|
+
class FirstPromote$Type extends MessageType<FirstPromote> {
|
|
708
|
+
constructor() {
|
|
709
|
+
super("resources.collab.FirstPromote", []);
|
|
710
|
+
}
|
|
711
|
+
create(value?: PartialMessage<FirstPromote>): FirstPromote {
|
|
712
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
713
|
+
if (value !== undefined)
|
|
714
|
+
reflectionMergePartial<FirstPromote>(this, message, value);
|
|
715
|
+
return message;
|
|
716
|
+
}
|
|
717
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FirstPromote): FirstPromote {
|
|
718
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
719
|
+
while (reader.pos < end) {
|
|
720
|
+
let [fieldNo, wireType] = reader.tag();
|
|
721
|
+
switch (fieldNo) {
|
|
722
|
+
default:
|
|
723
|
+
let u = options.readUnknownField;
|
|
724
|
+
if (u === "throw")
|
|
725
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
726
|
+
let d = reader.skip(wireType);
|
|
727
|
+
if (u !== false)
|
|
728
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
return message;
|
|
732
|
+
}
|
|
733
|
+
internalBinaryWrite(message: FirstPromote, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
734
|
+
let u = options.writeUnknownFields;
|
|
735
|
+
if (u !== false)
|
|
736
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
737
|
+
return writer;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* @generated MessageType for protobuf message resources.collab.FirstPromote
|
|
742
|
+
*/
|
|
743
|
+
export const FirstPromote = new FirstPromote$Type();
|
|
744
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
745
|
+
class ClientUpdate$Type extends MessageType<ClientUpdate> {
|
|
746
|
+
constructor() {
|
|
747
|
+
super("resources.collab.ClientUpdate", [
|
|
748
|
+
{ no: 1, name: "joined", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
749
|
+
{ no: 2, name: "client_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { uint64: { gt: "0" } } } },
|
|
750
|
+
{ no: 3, name: "label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } }
|
|
751
|
+
]);
|
|
752
|
+
}
|
|
753
|
+
create(value?: PartialMessage<ClientUpdate>): ClientUpdate {
|
|
754
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
755
|
+
message.joined = false;
|
|
756
|
+
message.clientId = 0;
|
|
757
|
+
if (value !== undefined)
|
|
758
|
+
reflectionMergePartial<ClientUpdate>(this, message, value);
|
|
759
|
+
return message;
|
|
760
|
+
}
|
|
761
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClientUpdate): ClientUpdate {
|
|
762
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
763
|
+
while (reader.pos < end) {
|
|
764
|
+
let [fieldNo, wireType] = reader.tag();
|
|
765
|
+
switch (fieldNo) {
|
|
766
|
+
case /* bool joined */ 1:
|
|
767
|
+
message.joined = reader.bool();
|
|
768
|
+
break;
|
|
769
|
+
case /* uint64 client_id */ 2:
|
|
770
|
+
message.clientId = reader.uint64().toNumber();
|
|
771
|
+
break;
|
|
772
|
+
case /* optional string label */ 3:
|
|
773
|
+
message.label = reader.string();
|
|
774
|
+
break;
|
|
775
|
+
default:
|
|
776
|
+
let u = options.readUnknownField;
|
|
777
|
+
if (u === "throw")
|
|
778
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
779
|
+
let d = reader.skip(wireType);
|
|
780
|
+
if (u !== false)
|
|
781
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
return message;
|
|
785
|
+
}
|
|
786
|
+
internalBinaryWrite(message: ClientUpdate, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
787
|
+
/* bool joined = 1; */
|
|
788
|
+
if (message.joined !== false)
|
|
789
|
+
writer.tag(1, WireType.Varint).bool(message.joined);
|
|
790
|
+
/* uint64 client_id = 2; */
|
|
791
|
+
if (message.clientId !== 0)
|
|
792
|
+
writer.tag(2, WireType.Varint).uint64(message.clientId);
|
|
793
|
+
/* optional string label = 3; */
|
|
794
|
+
if (message.label !== undefined)
|
|
795
|
+
writer.tag(3, WireType.LengthDelimited).string(message.label);
|
|
796
|
+
let u = options.writeUnknownFields;
|
|
797
|
+
if (u !== false)
|
|
798
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
799
|
+
return writer;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* @generated MessageType for protobuf message resources.collab.ClientUpdate
|
|
804
|
+
*/
|
|
805
|
+
export const ClientUpdate = new ClientUpdate$Type();
|