@fivenet-app/gen 2026.5.1 → 2026.7.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/clients.ts +6 -0
- package/codegen/perms/perms.ts +14 -2
- package/codegen/sanitizer/sanitizer.ts +6 -0
- package/google/protobuf/descriptor.ts +11 -3
- package/google/protobuf/timestamp.ts +7 -6
- package/package.json +1 -1
- package/perms.ts +343 -3
- package/resources/access/access.ts +481 -0
- package/resources/calendar/access/access.ts +0 -330
- package/resources/calendar/calendar.ts +307 -25
- package/resources/calendar/entries/entries.ts +204 -11
- package/resources/centrum/units/access/access.ts +0 -373
- package/resources/centrum/units/units.ts +20 -8
- package/resources/citizens/labels/access.ts +0 -191
- package/resources/citizens/labels/labels.ts +20 -8
- package/resources/common/content/diff_activity.ts +1 -1
- package/resources/cron/cron.ts +1 -1
- package/resources/documents/access/access.ts +0 -329
- package/resources/documents/activity/activity.ts +49 -45
- package/resources/documents/documents.ts +1 -1
- package/resources/documents/requests/requests.ts +1 -1
- package/resources/documents/stamps/stamp.ts +40 -210
- package/resources/documents/templates/templates.ts +158 -318
- package/resources/jobs/colleagues/activity/activity.ts +1 -1
- package/resources/jobs/conduct/conduct.ts +2 -2
- package/resources/jobs/jobs.ts +22 -0
- package/resources/jobs/labels/labels.ts +9 -9
- package/resources/laws/laws.ts +24 -0
- package/resources/livemap/markers/marker_marker.ts +311 -4
- package/resources/mailer/access/access.ts +0 -457
- package/resources/mailer/emails/email.ts +4 -4
- package/resources/notifications/events/events.ts +18 -1
- package/resources/qualifications/access/access.ts +0 -248
- package/resources/qualifications/qualifications.ts +9 -9
- package/resources/settings/config.ts +53 -5
- package/resources/settings/data.ts +1 -1
- package/resources/stats/stats.ts +32 -20
- package/resources/sync/data/data.ts +13 -1
- package/resources/userinfo/userinfo.ts +202 -51
- package/resources/users/activity/activity.ts +1 -1
- package/resources/wiki/access/access.ts +0 -330
- package/resources/wiki/activity/activity.ts +45 -45
- package/resources/wiki/page.ts +9 -9
- package/services/calendar/calendar.ts +1 -1
- package/services/calendar/entries.ts +12 -1
- package/services/centrum/dispatches.ts +27 -7
- package/services/centrum/units.client.ts +15 -2
- package/services/centrum/units.ts +231 -123
- package/services/citizens/citizens.ts +1 -1
- package/services/citizens/labels.client.ts +7 -20
- package/services/citizens/labels.ts +35 -183
- package/services/documents/approval.ts +15 -4
- package/services/documents/collab.ts +1 -1
- package/services/documents/documents.ts +38 -38
- package/services/documents/stats.ts +14 -2
- package/services/filestore/filestore.ts +4 -4
- package/services/jobs/colleagues.ts +3 -3
- package/services/jobs/conduct.ts +2 -2
- package/services/jobs/groups.client.ts +22 -0
- package/services/jobs/groups.ts +9 -0
- package/services/jobs/timeclock.ts +2 -2
- package/services/mailer/thread.ts +2 -2
- package/services/qualifications/qualifications.ts +52 -34
- package/services/settings/accounts.ts +5 -5
- package/services/settings/config.ts +2 -2
- package/services/settings/cron.ts +2 -2
- package/services/settings/laws.client.ts +28 -2
- package/services/settings/laws.ts +229 -1
- package/services/settings/system.ts +6 -6
- package/services/sync/sync.client.ts +42 -14
- package/services/sync/sync.ts +162 -13
- package/services/wiki/wiki.client.ts +15 -2
- package/services/wiki/wiki.ts +122 -0
- package/svcs.ts +18 -2
|
@@ -0,0 +1,481 @@
|
|
|
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/access/access.proto" (package "resources.access", 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 { UserShort } from "../users/short/user";
|
|
15
|
+
/**
|
|
16
|
+
* @generated from protobuf message resources.access.Access
|
|
17
|
+
*/
|
|
18
|
+
export interface Access {
|
|
19
|
+
/**
|
|
20
|
+
* @generated from protobuf field: repeated resources.access.JobAccess jobs = 1
|
|
21
|
+
*/
|
|
22
|
+
jobs: JobAccess[];
|
|
23
|
+
/**
|
|
24
|
+
* @generated from protobuf field: repeated resources.access.UserAccess users = 2
|
|
25
|
+
*/
|
|
26
|
+
users: UserAccess[];
|
|
27
|
+
/**
|
|
28
|
+
* @generated from protobuf field: repeated resources.access.QualificationAccess qualifications = 3
|
|
29
|
+
*/
|
|
30
|
+
qualifications: QualificationAccess[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @generated from protobuf message resources.access.JobAccess
|
|
34
|
+
*/
|
|
35
|
+
export interface JobAccess {
|
|
36
|
+
/**
|
|
37
|
+
* @generated from protobuf field: int64 id = 1
|
|
38
|
+
*/
|
|
39
|
+
id: number;
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf field: int64 target_id = 3
|
|
42
|
+
*/
|
|
43
|
+
targetId: number;
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf field: string job = 4
|
|
46
|
+
*/
|
|
47
|
+
job: string;
|
|
48
|
+
/**
|
|
49
|
+
* @generated from protobuf field: optional string job_label = 5
|
|
50
|
+
*/
|
|
51
|
+
jobLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf field: int32 minimum_grade = 6
|
|
54
|
+
*/
|
|
55
|
+
minimumGrade: number;
|
|
56
|
+
/**
|
|
57
|
+
* @generated from protobuf field: optional string job_grade_label = 7
|
|
58
|
+
*/
|
|
59
|
+
jobGradeLabel?: string;
|
|
60
|
+
/**
|
|
61
|
+
* @generated from protobuf field: int32 access = 8
|
|
62
|
+
*/
|
|
63
|
+
access: number;
|
|
64
|
+
/**
|
|
65
|
+
* @generated from protobuf field: optional bool required = 9
|
|
66
|
+
*/
|
|
67
|
+
required?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* @generated from protobuf field: optional int32 required_access = 10
|
|
70
|
+
*/
|
|
71
|
+
requiredAccess?: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @generated from protobuf message resources.access.UserAccess
|
|
75
|
+
*/
|
|
76
|
+
export interface UserAccess {
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf field: int64 id = 1
|
|
79
|
+
*/
|
|
80
|
+
id: number;
|
|
81
|
+
/**
|
|
82
|
+
* @generated from protobuf field: int64 target_id = 3
|
|
83
|
+
*/
|
|
84
|
+
targetId: number;
|
|
85
|
+
/**
|
|
86
|
+
* @generated from protobuf field: int32 user_id = 4
|
|
87
|
+
*/
|
|
88
|
+
userId: number;
|
|
89
|
+
/**
|
|
90
|
+
* @generated from protobuf field: optional resources.users.short.UserShort user = 5
|
|
91
|
+
*/
|
|
92
|
+
user?: UserShort;
|
|
93
|
+
/**
|
|
94
|
+
* @generated from protobuf field: int32 access = 6
|
|
95
|
+
*/
|
|
96
|
+
access: number;
|
|
97
|
+
/**
|
|
98
|
+
* @generated from protobuf field: optional bool required = 7
|
|
99
|
+
*/
|
|
100
|
+
required?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* @generated from protobuf field: optional int32 required_access = 8
|
|
103
|
+
*/
|
|
104
|
+
requiredAccess?: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @generated from protobuf message resources.access.QualificationAccess
|
|
108
|
+
*/
|
|
109
|
+
export interface QualificationAccess {
|
|
110
|
+
/**
|
|
111
|
+
* @generated from protobuf field: int64 id = 1
|
|
112
|
+
*/
|
|
113
|
+
id: number;
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf field: int64 target_id = 3
|
|
116
|
+
*/
|
|
117
|
+
targetId: number;
|
|
118
|
+
/**
|
|
119
|
+
* @generated from protobuf field: int64 qualification_id = 4
|
|
120
|
+
*/
|
|
121
|
+
qualificationId: number;
|
|
122
|
+
/**
|
|
123
|
+
* @generated from protobuf field: int32 access = 6
|
|
124
|
+
*/
|
|
125
|
+
access: number;
|
|
126
|
+
/**
|
|
127
|
+
* @generated from protobuf field: optional bool required = 7
|
|
128
|
+
*/
|
|
129
|
+
required?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* @generated from protobuf field: optional int32 required_access = 8
|
|
132
|
+
*/
|
|
133
|
+
requiredAccess?: number;
|
|
134
|
+
}
|
|
135
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
136
|
+
class Access$Type extends MessageType<Access> {
|
|
137
|
+
constructor() {
|
|
138
|
+
super("resources.access.Access", [
|
|
139
|
+
{ no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => JobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"job_access\"" } },
|
|
140
|
+
{ no: 2, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"user_access\"" } },
|
|
141
|
+
{ no: 3, name: "qualifications", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QualificationAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"qualification_access\"" } }
|
|
142
|
+
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
143
|
+
}
|
|
144
|
+
create(value?: PartialMessage<Access>): Access {
|
|
145
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
146
|
+
message.jobs = [];
|
|
147
|
+
message.users = [];
|
|
148
|
+
message.qualifications = [];
|
|
149
|
+
if (value !== undefined)
|
|
150
|
+
reflectionMergePartial<Access>(this, message, value);
|
|
151
|
+
return message;
|
|
152
|
+
}
|
|
153
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Access): Access {
|
|
154
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
155
|
+
while (reader.pos < end) {
|
|
156
|
+
let [fieldNo, wireType] = reader.tag();
|
|
157
|
+
switch (fieldNo) {
|
|
158
|
+
case /* repeated resources.access.JobAccess jobs */ 1:
|
|
159
|
+
message.jobs.push(JobAccess.internalBinaryRead(reader, reader.uint32(), options));
|
|
160
|
+
break;
|
|
161
|
+
case /* repeated resources.access.UserAccess users */ 2:
|
|
162
|
+
message.users.push(UserAccess.internalBinaryRead(reader, reader.uint32(), options));
|
|
163
|
+
break;
|
|
164
|
+
case /* repeated resources.access.QualificationAccess qualifications */ 3:
|
|
165
|
+
message.qualifications.push(QualificationAccess.internalBinaryRead(reader, reader.uint32(), options));
|
|
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: Access, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
179
|
+
/* repeated resources.access.JobAccess jobs = 1; */
|
|
180
|
+
for (let i = 0; i < message.jobs.length; i++)
|
|
181
|
+
JobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
182
|
+
/* repeated resources.access.UserAccess users = 2; */
|
|
183
|
+
for (let i = 0; i < message.users.length; i++)
|
|
184
|
+
UserAccess.internalBinaryWrite(message.users[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
185
|
+
/* repeated resources.access.QualificationAccess qualifications = 3; */
|
|
186
|
+
for (let i = 0; i < message.qualifications.length; i++)
|
|
187
|
+
QualificationAccess.internalBinaryWrite(message.qualifications[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
188
|
+
let u = options.writeUnknownFields;
|
|
189
|
+
if (u !== false)
|
|
190
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
191
|
+
return writer;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* @generated MessageType for protobuf message resources.access.Access
|
|
196
|
+
*/
|
|
197
|
+
export const Access = new Access$Type();
|
|
198
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
199
|
+
class JobAccess$Type extends MessageType<JobAccess> {
|
|
200
|
+
constructor() {
|
|
201
|
+
super("resources.access.JobAccess", [
|
|
202
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
203
|
+
{ no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
204
|
+
{ no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
205
|
+
{ no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
206
|
+
{ no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
207
|
+
{ no: 7, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
208
|
+
{ no: 8, name: "access", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
209
|
+
{ no: 9, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
210
|
+
{ no: 10, name: "required_access", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
|
|
211
|
+
]);
|
|
212
|
+
}
|
|
213
|
+
create(value?: PartialMessage<JobAccess>): JobAccess {
|
|
214
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
215
|
+
message.id = 0;
|
|
216
|
+
message.targetId = 0;
|
|
217
|
+
message.job = "";
|
|
218
|
+
message.minimumGrade = 0;
|
|
219
|
+
message.access = 0;
|
|
220
|
+
if (value !== undefined)
|
|
221
|
+
reflectionMergePartial<JobAccess>(this, message, value);
|
|
222
|
+
return message;
|
|
223
|
+
}
|
|
224
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JobAccess): JobAccess {
|
|
225
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
226
|
+
while (reader.pos < end) {
|
|
227
|
+
let [fieldNo, wireType] = reader.tag();
|
|
228
|
+
switch (fieldNo) {
|
|
229
|
+
case /* int64 id */ 1:
|
|
230
|
+
message.id = reader.int64().toNumber();
|
|
231
|
+
break;
|
|
232
|
+
case /* int64 target_id */ 3:
|
|
233
|
+
message.targetId = reader.int64().toNumber();
|
|
234
|
+
break;
|
|
235
|
+
case /* string job */ 4:
|
|
236
|
+
message.job = reader.string();
|
|
237
|
+
break;
|
|
238
|
+
case /* optional string job_label */ 5:
|
|
239
|
+
message.jobLabel = reader.string();
|
|
240
|
+
break;
|
|
241
|
+
case /* int32 minimum_grade */ 6:
|
|
242
|
+
message.minimumGrade = reader.int32();
|
|
243
|
+
break;
|
|
244
|
+
case /* optional string job_grade_label */ 7:
|
|
245
|
+
message.jobGradeLabel = reader.string();
|
|
246
|
+
break;
|
|
247
|
+
case /* int32 access */ 8:
|
|
248
|
+
message.access = reader.int32();
|
|
249
|
+
break;
|
|
250
|
+
case /* optional bool required */ 9:
|
|
251
|
+
message.required = reader.bool();
|
|
252
|
+
break;
|
|
253
|
+
case /* optional int32 required_access */ 10:
|
|
254
|
+
message.requiredAccess = reader.int32();
|
|
255
|
+
break;
|
|
256
|
+
default:
|
|
257
|
+
let u = options.readUnknownField;
|
|
258
|
+
if (u === "throw")
|
|
259
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
260
|
+
let d = reader.skip(wireType);
|
|
261
|
+
if (u !== false)
|
|
262
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return message;
|
|
266
|
+
}
|
|
267
|
+
internalBinaryWrite(message: JobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
268
|
+
/* int64 id = 1; */
|
|
269
|
+
if (message.id !== 0)
|
|
270
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
271
|
+
/* int64 target_id = 3; */
|
|
272
|
+
if (message.targetId !== 0)
|
|
273
|
+
writer.tag(3, WireType.Varint).int64(message.targetId);
|
|
274
|
+
/* string job = 4; */
|
|
275
|
+
if (message.job !== "")
|
|
276
|
+
writer.tag(4, WireType.LengthDelimited).string(message.job);
|
|
277
|
+
/* optional string job_label = 5; */
|
|
278
|
+
if (message.jobLabel !== undefined)
|
|
279
|
+
writer.tag(5, WireType.LengthDelimited).string(message.jobLabel);
|
|
280
|
+
/* int32 minimum_grade = 6; */
|
|
281
|
+
if (message.minimumGrade !== 0)
|
|
282
|
+
writer.tag(6, WireType.Varint).int32(message.minimumGrade);
|
|
283
|
+
/* optional string job_grade_label = 7; */
|
|
284
|
+
if (message.jobGradeLabel !== undefined)
|
|
285
|
+
writer.tag(7, WireType.LengthDelimited).string(message.jobGradeLabel);
|
|
286
|
+
/* int32 access = 8; */
|
|
287
|
+
if (message.access !== 0)
|
|
288
|
+
writer.tag(8, WireType.Varint).int32(message.access);
|
|
289
|
+
/* optional bool required = 9; */
|
|
290
|
+
if (message.required !== undefined)
|
|
291
|
+
writer.tag(9, WireType.Varint).bool(message.required);
|
|
292
|
+
/* optional int32 required_access = 10; */
|
|
293
|
+
if (message.requiredAccess !== undefined)
|
|
294
|
+
writer.tag(10, WireType.Varint).int32(message.requiredAccess);
|
|
295
|
+
let u = options.writeUnknownFields;
|
|
296
|
+
if (u !== false)
|
|
297
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
298
|
+
return writer;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* @generated MessageType for protobuf message resources.access.JobAccess
|
|
303
|
+
*/
|
|
304
|
+
export const JobAccess = new JobAccess$Type();
|
|
305
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
306
|
+
class UserAccess$Type extends MessageType<UserAccess> {
|
|
307
|
+
constructor() {
|
|
308
|
+
super("resources.access.UserAccess", [
|
|
309
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
310
|
+
{ no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
311
|
+
{ no: 4, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
312
|
+
{ no: 5, name: "user", kind: "message", T: () => UserShort },
|
|
313
|
+
{ no: 6, name: "access", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
314
|
+
{ no: 7, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
315
|
+
{ no: 8, name: "required_access", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
|
|
316
|
+
]);
|
|
317
|
+
}
|
|
318
|
+
create(value?: PartialMessage<UserAccess>): UserAccess {
|
|
319
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
320
|
+
message.id = 0;
|
|
321
|
+
message.targetId = 0;
|
|
322
|
+
message.userId = 0;
|
|
323
|
+
message.access = 0;
|
|
324
|
+
if (value !== undefined)
|
|
325
|
+
reflectionMergePartial<UserAccess>(this, message, value);
|
|
326
|
+
return message;
|
|
327
|
+
}
|
|
328
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserAccess): UserAccess {
|
|
329
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
330
|
+
while (reader.pos < end) {
|
|
331
|
+
let [fieldNo, wireType] = reader.tag();
|
|
332
|
+
switch (fieldNo) {
|
|
333
|
+
case /* int64 id */ 1:
|
|
334
|
+
message.id = reader.int64().toNumber();
|
|
335
|
+
break;
|
|
336
|
+
case /* int64 target_id */ 3:
|
|
337
|
+
message.targetId = reader.int64().toNumber();
|
|
338
|
+
break;
|
|
339
|
+
case /* int32 user_id */ 4:
|
|
340
|
+
message.userId = reader.int32();
|
|
341
|
+
break;
|
|
342
|
+
case /* optional resources.users.short.UserShort user */ 5:
|
|
343
|
+
message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
|
|
344
|
+
break;
|
|
345
|
+
case /* int32 access */ 6:
|
|
346
|
+
message.access = reader.int32();
|
|
347
|
+
break;
|
|
348
|
+
case /* optional bool required */ 7:
|
|
349
|
+
message.required = reader.bool();
|
|
350
|
+
break;
|
|
351
|
+
case /* optional int32 required_access */ 8:
|
|
352
|
+
message.requiredAccess = reader.int32();
|
|
353
|
+
break;
|
|
354
|
+
default:
|
|
355
|
+
let u = options.readUnknownField;
|
|
356
|
+
if (u === "throw")
|
|
357
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
358
|
+
let d = reader.skip(wireType);
|
|
359
|
+
if (u !== false)
|
|
360
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return message;
|
|
364
|
+
}
|
|
365
|
+
internalBinaryWrite(message: UserAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
366
|
+
/* int64 id = 1; */
|
|
367
|
+
if (message.id !== 0)
|
|
368
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
369
|
+
/* int64 target_id = 3; */
|
|
370
|
+
if (message.targetId !== 0)
|
|
371
|
+
writer.tag(3, WireType.Varint).int64(message.targetId);
|
|
372
|
+
/* int32 user_id = 4; */
|
|
373
|
+
if (message.userId !== 0)
|
|
374
|
+
writer.tag(4, WireType.Varint).int32(message.userId);
|
|
375
|
+
/* optional resources.users.short.UserShort user = 5; */
|
|
376
|
+
if (message.user)
|
|
377
|
+
UserShort.internalBinaryWrite(message.user, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
378
|
+
/* int32 access = 6; */
|
|
379
|
+
if (message.access !== 0)
|
|
380
|
+
writer.tag(6, WireType.Varint).int32(message.access);
|
|
381
|
+
/* optional bool required = 7; */
|
|
382
|
+
if (message.required !== undefined)
|
|
383
|
+
writer.tag(7, WireType.Varint).bool(message.required);
|
|
384
|
+
/* optional int32 required_access = 8; */
|
|
385
|
+
if (message.requiredAccess !== undefined)
|
|
386
|
+
writer.tag(8, WireType.Varint).int32(message.requiredAccess);
|
|
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.access.UserAccess
|
|
395
|
+
*/
|
|
396
|
+
export const UserAccess = new UserAccess$Type();
|
|
397
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
398
|
+
class QualificationAccess$Type extends MessageType<QualificationAccess> {
|
|
399
|
+
constructor() {
|
|
400
|
+
super("resources.access.QualificationAccess", [
|
|
401
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
402
|
+
{ no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
403
|
+
{ no: 4, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
|
|
404
|
+
{ no: 6, name: "access", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
405
|
+
{ no: 7, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
406
|
+
{ no: 8, name: "required_access", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
|
|
407
|
+
]);
|
|
408
|
+
}
|
|
409
|
+
create(value?: PartialMessage<QualificationAccess>): QualificationAccess {
|
|
410
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
411
|
+
message.id = 0;
|
|
412
|
+
message.targetId = 0;
|
|
413
|
+
message.qualificationId = 0;
|
|
414
|
+
message.access = 0;
|
|
415
|
+
if (value !== undefined)
|
|
416
|
+
reflectionMergePartial<QualificationAccess>(this, message, value);
|
|
417
|
+
return message;
|
|
418
|
+
}
|
|
419
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: QualificationAccess): QualificationAccess {
|
|
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 /* int64 id */ 1:
|
|
425
|
+
message.id = reader.int64().toNumber();
|
|
426
|
+
break;
|
|
427
|
+
case /* int64 target_id */ 3:
|
|
428
|
+
message.targetId = reader.int64().toNumber();
|
|
429
|
+
break;
|
|
430
|
+
case /* int64 qualification_id */ 4:
|
|
431
|
+
message.qualificationId = reader.int64().toNumber();
|
|
432
|
+
break;
|
|
433
|
+
case /* int32 access */ 6:
|
|
434
|
+
message.access = reader.int32();
|
|
435
|
+
break;
|
|
436
|
+
case /* optional bool required */ 7:
|
|
437
|
+
message.required = reader.bool();
|
|
438
|
+
break;
|
|
439
|
+
case /* optional int32 required_access */ 8:
|
|
440
|
+
message.requiredAccess = reader.int32();
|
|
441
|
+
break;
|
|
442
|
+
default:
|
|
443
|
+
let u = options.readUnknownField;
|
|
444
|
+
if (u === "throw")
|
|
445
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
446
|
+
let d = reader.skip(wireType);
|
|
447
|
+
if (u !== false)
|
|
448
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
return message;
|
|
452
|
+
}
|
|
453
|
+
internalBinaryWrite(message: QualificationAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
454
|
+
/* int64 id = 1; */
|
|
455
|
+
if (message.id !== 0)
|
|
456
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
457
|
+
/* int64 target_id = 3; */
|
|
458
|
+
if (message.targetId !== 0)
|
|
459
|
+
writer.tag(3, WireType.Varint).int64(message.targetId);
|
|
460
|
+
/* int64 qualification_id = 4; */
|
|
461
|
+
if (message.qualificationId !== 0)
|
|
462
|
+
writer.tag(4, WireType.Varint).int64(message.qualificationId);
|
|
463
|
+
/* int32 access = 6; */
|
|
464
|
+
if (message.access !== 0)
|
|
465
|
+
writer.tag(6, WireType.Varint).int32(message.access);
|
|
466
|
+
/* optional bool required = 7; */
|
|
467
|
+
if (message.required !== undefined)
|
|
468
|
+
writer.tag(7, WireType.Varint).bool(message.required);
|
|
469
|
+
/* optional int32 required_access = 8; */
|
|
470
|
+
if (message.requiredAccess !== undefined)
|
|
471
|
+
writer.tag(8, WireType.Varint).int32(message.requiredAccess);
|
|
472
|
+
let u = options.writeUnknownFields;
|
|
473
|
+
if (u !== false)
|
|
474
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
475
|
+
return writer;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* @generated MessageType for protobuf message resources.access.QualificationAccess
|
|
480
|
+
*/
|
|
481
|
+
export const QualificationAccess = new QualificationAccess$Type();
|