@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
|
@@ -2,57 +2,6 @@
|
|
|
2
2
|
// @generated from protobuf file "resources/citizens/labels/access.proto" (package "resources.citizens.labels", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
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.citizens.labels.LabelAccess
|
|
16
|
-
*/
|
|
17
|
-
export interface LabelAccess {
|
|
18
|
-
/**
|
|
19
|
-
* @generated from protobuf field: repeated resources.citizens.labels.JobAccess jobs = 1
|
|
20
|
-
*/
|
|
21
|
-
jobs: JobAccess[];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @generated from protobuf message resources.citizens.labels.JobAccess
|
|
25
|
-
*/
|
|
26
|
-
export interface JobAccess {
|
|
27
|
-
/**
|
|
28
|
-
* @generated from protobuf field: int64 id = 1
|
|
29
|
-
*/
|
|
30
|
-
id: number;
|
|
31
|
-
/**
|
|
32
|
-
* @generated from protobuf field: int64 target_id = 2
|
|
33
|
-
*/
|
|
34
|
-
targetId: number;
|
|
35
|
-
/**
|
|
36
|
-
* @generated from protobuf field: string job = 3
|
|
37
|
-
*/
|
|
38
|
-
job: string;
|
|
39
|
-
/**
|
|
40
|
-
* @generated from protobuf field: optional string job_label = 4
|
|
41
|
-
*/
|
|
42
|
-
jobLabel?: string;
|
|
43
|
-
/**
|
|
44
|
-
* @generated from protobuf field: int32 minimum_grade = 5
|
|
45
|
-
*/
|
|
46
|
-
minimumGrade: number;
|
|
47
|
-
/**
|
|
48
|
-
* @generated from protobuf field: optional string job_grade_label = 6
|
|
49
|
-
*/
|
|
50
|
-
jobGradeLabel?: string;
|
|
51
|
-
/**
|
|
52
|
-
* @generated from protobuf field: resources.citizens.labels.AccessLevel access = 7
|
|
53
|
-
*/
|
|
54
|
-
access: AccessLevel;
|
|
55
|
-
}
|
|
56
5
|
/**
|
|
57
6
|
* @generated from protobuf enum resources.citizens.labels.AccessLevel
|
|
58
7
|
*/
|
|
@@ -74,143 +23,3 @@ export enum AccessLevel {
|
|
|
74
23
|
*/
|
|
75
24
|
REMOVE = 3
|
|
76
25
|
}
|
|
77
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
78
|
-
class LabelAccess$Type extends MessageType<LabelAccess> {
|
|
79
|
-
constructor() {
|
|
80
|
-
super("resources.citizens.labels.LabelAccess", [
|
|
81
|
-
{ no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => JobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"job_access\"" } }
|
|
82
|
-
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
83
|
-
}
|
|
84
|
-
create(value?: PartialMessage<LabelAccess>): LabelAccess {
|
|
85
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
86
|
-
message.jobs = [];
|
|
87
|
-
if (value !== undefined)
|
|
88
|
-
reflectionMergePartial<LabelAccess>(this, message, value);
|
|
89
|
-
return message;
|
|
90
|
-
}
|
|
91
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LabelAccess): LabelAccess {
|
|
92
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
93
|
-
while (reader.pos < end) {
|
|
94
|
-
let [fieldNo, wireType] = reader.tag();
|
|
95
|
-
switch (fieldNo) {
|
|
96
|
-
case /* repeated resources.citizens.labels.JobAccess jobs */ 1:
|
|
97
|
-
message.jobs.push(JobAccess.internalBinaryRead(reader, reader.uint32(), options));
|
|
98
|
-
break;
|
|
99
|
-
default:
|
|
100
|
-
let u = options.readUnknownField;
|
|
101
|
-
if (u === "throw")
|
|
102
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
103
|
-
let d = reader.skip(wireType);
|
|
104
|
-
if (u !== false)
|
|
105
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return message;
|
|
109
|
-
}
|
|
110
|
-
internalBinaryWrite(message: LabelAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
111
|
-
/* repeated resources.citizens.labels.JobAccess jobs = 1; */
|
|
112
|
-
for (let i = 0; i < message.jobs.length; i++)
|
|
113
|
-
JobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
114
|
-
let u = options.writeUnknownFields;
|
|
115
|
-
if (u !== false)
|
|
116
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
117
|
-
return writer;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* @generated MessageType for protobuf message resources.citizens.labels.LabelAccess
|
|
122
|
-
*/
|
|
123
|
-
export const LabelAccess = new LabelAccess$Type();
|
|
124
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
125
|
-
class JobAccess$Type extends MessageType<JobAccess> {
|
|
126
|
-
constructor() {
|
|
127
|
-
super("resources.citizens.labels.JobAccess", [
|
|
128
|
-
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\"" } },
|
|
129
|
-
{ no: 2, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
130
|
-
{ no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
131
|
-
{ no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
132
|
-
{ no: 5, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
133
|
-
{ no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
134
|
-
{ no: 7, name: "access", kind: "enum", T: () => ["resources.citizens.labels.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
|
|
135
|
-
]);
|
|
136
|
-
}
|
|
137
|
-
create(value?: PartialMessage<JobAccess>): JobAccess {
|
|
138
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
139
|
-
message.id = 0;
|
|
140
|
-
message.targetId = 0;
|
|
141
|
-
message.job = "";
|
|
142
|
-
message.minimumGrade = 0;
|
|
143
|
-
message.access = 0;
|
|
144
|
-
if (value !== undefined)
|
|
145
|
-
reflectionMergePartial<JobAccess>(this, message, value);
|
|
146
|
-
return message;
|
|
147
|
-
}
|
|
148
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JobAccess): JobAccess {
|
|
149
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
150
|
-
while (reader.pos < end) {
|
|
151
|
-
let [fieldNo, wireType] = reader.tag();
|
|
152
|
-
switch (fieldNo) {
|
|
153
|
-
case /* int64 id */ 1:
|
|
154
|
-
message.id = reader.int64().toNumber();
|
|
155
|
-
break;
|
|
156
|
-
case /* int64 target_id */ 2:
|
|
157
|
-
message.targetId = reader.int64().toNumber();
|
|
158
|
-
break;
|
|
159
|
-
case /* string job */ 3:
|
|
160
|
-
message.job = reader.string();
|
|
161
|
-
break;
|
|
162
|
-
case /* optional string job_label */ 4:
|
|
163
|
-
message.jobLabel = reader.string();
|
|
164
|
-
break;
|
|
165
|
-
case /* int32 minimum_grade */ 5:
|
|
166
|
-
message.minimumGrade = reader.int32();
|
|
167
|
-
break;
|
|
168
|
-
case /* optional string job_grade_label */ 6:
|
|
169
|
-
message.jobGradeLabel = reader.string();
|
|
170
|
-
break;
|
|
171
|
-
case /* resources.citizens.labels.AccessLevel access */ 7:
|
|
172
|
-
message.access = reader.int32();
|
|
173
|
-
break;
|
|
174
|
-
default:
|
|
175
|
-
let u = options.readUnknownField;
|
|
176
|
-
if (u === "throw")
|
|
177
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
178
|
-
let d = reader.skip(wireType);
|
|
179
|
-
if (u !== false)
|
|
180
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
return message;
|
|
184
|
-
}
|
|
185
|
-
internalBinaryWrite(message: JobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
186
|
-
/* int64 id = 1; */
|
|
187
|
-
if (message.id !== 0)
|
|
188
|
-
writer.tag(1, WireType.Varint).int64(message.id);
|
|
189
|
-
/* int64 target_id = 2; */
|
|
190
|
-
if (message.targetId !== 0)
|
|
191
|
-
writer.tag(2, WireType.Varint).int64(message.targetId);
|
|
192
|
-
/* string job = 3; */
|
|
193
|
-
if (message.job !== "")
|
|
194
|
-
writer.tag(3, WireType.LengthDelimited).string(message.job);
|
|
195
|
-
/* optional string job_label = 4; */
|
|
196
|
-
if (message.jobLabel !== undefined)
|
|
197
|
-
writer.tag(4, WireType.LengthDelimited).string(message.jobLabel);
|
|
198
|
-
/* int32 minimum_grade = 5; */
|
|
199
|
-
if (message.minimumGrade !== 0)
|
|
200
|
-
writer.tag(5, WireType.Varint).int32(message.minimumGrade);
|
|
201
|
-
/* optional string job_grade_label = 6; */
|
|
202
|
-
if (message.jobGradeLabel !== undefined)
|
|
203
|
-
writer.tag(6, WireType.LengthDelimited).string(message.jobGradeLabel);
|
|
204
|
-
/* resources.citizens.labels.AccessLevel access = 7; */
|
|
205
|
-
if (message.access !== 0)
|
|
206
|
-
writer.tag(7, WireType.Varint).int32(message.access);
|
|
207
|
-
let u = options.writeUnknownFields;
|
|
208
|
-
if (u !== false)
|
|
209
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
210
|
-
return writer;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* @generated MessageType for protobuf message resources.citizens.labels.JobAccess
|
|
215
|
-
*/
|
|
216
|
-
export const JobAccess = new JobAccess$Type();
|
|
@@ -12,7 +12,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
|
12
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
14
|
import { Duration } from "../../../google/protobuf/duration";
|
|
15
|
-
import {
|
|
15
|
+
import { Access } from "../../access/access";
|
|
16
16
|
import { Timestamp } from "../../timestamp/timestamp";
|
|
17
17
|
/**
|
|
18
18
|
* @generated from protobuf message resources.citizens.labels.Labels
|
|
@@ -47,6 +47,10 @@ export interface Label {
|
|
|
47
47
|
* @generated from protobuf field: optional string job = 5
|
|
48
48
|
*/
|
|
49
49
|
job?: string;
|
|
50
|
+
/**
|
|
51
|
+
* @generated from protobuf field: int32 sort_order = 12
|
|
52
|
+
*/
|
|
53
|
+
sortOrder: number;
|
|
50
54
|
/**
|
|
51
55
|
* @generated from protobuf field: string name = 6
|
|
52
56
|
*/
|
|
@@ -64,9 +68,9 @@ export interface Label {
|
|
|
64
68
|
*/
|
|
65
69
|
settings?: Settings;
|
|
66
70
|
/**
|
|
67
|
-
* @generated from protobuf field: optional resources.
|
|
71
|
+
* @generated from protobuf field: optional resources.access.Access access = 10
|
|
68
72
|
*/
|
|
69
|
-
access?:
|
|
73
|
+
access?: Access;
|
|
70
74
|
/**
|
|
71
75
|
* Citizen label assignment data
|
|
72
76
|
*
|
|
@@ -147,17 +151,19 @@ class Label$Type extends MessageType<Label> {
|
|
|
147
151
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
148
152
|
{ no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
149
153
|
{ no: 5, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
154
|
+
{ no: 12, name: "sort_order", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
150
155
|
{ no: 6, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "48" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
151
156
|
{ no: 7, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { len: "7", pattern: "^#[A-Fa-f0-9]{6}$" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
152
157
|
{ no: 8, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
153
158
|
{ no: 9, name: "settings", kind: "message", T: () => Settings },
|
|
154
|
-
{ no: 10, name: "access", kind: "message", T: () =>
|
|
159
|
+
{ no: 10, name: "access", kind: "message", T: () => Access, options: { "buf.validate.field": { required: true } } },
|
|
155
160
|
{ no: 11, name: "expires_at", kind: "message", T: () => Timestamp }
|
|
156
161
|
]);
|
|
157
162
|
}
|
|
158
163
|
create(value?: PartialMessage<Label>): Label {
|
|
159
164
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
160
165
|
message.id = 0;
|
|
166
|
+
message.sortOrder = 0;
|
|
161
167
|
message.name = "";
|
|
162
168
|
message.color = "";
|
|
163
169
|
if (value !== undefined)
|
|
@@ -184,6 +190,9 @@ class Label$Type extends MessageType<Label> {
|
|
|
184
190
|
case /* optional string job */ 5:
|
|
185
191
|
message.job = reader.string();
|
|
186
192
|
break;
|
|
193
|
+
case /* int32 sort_order */ 12:
|
|
194
|
+
message.sortOrder = reader.int32();
|
|
195
|
+
break;
|
|
187
196
|
case /* string name */ 6:
|
|
188
197
|
message.name = reader.string();
|
|
189
198
|
break;
|
|
@@ -196,8 +205,8 @@ class Label$Type extends MessageType<Label> {
|
|
|
196
205
|
case /* optional resources.citizens.labels.Settings settings */ 9:
|
|
197
206
|
message.settings = Settings.internalBinaryRead(reader, reader.uint32(), options, message.settings);
|
|
198
207
|
break;
|
|
199
|
-
case /* optional resources.
|
|
200
|
-
message.access =
|
|
208
|
+
case /* optional resources.access.Access access */ 10:
|
|
209
|
+
message.access = Access.internalBinaryRead(reader, reader.uint32(), options, message.access);
|
|
201
210
|
break;
|
|
202
211
|
case /* optional resources.timestamp.Timestamp expires_at */ 11:
|
|
203
212
|
message.expiresAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt);
|
|
@@ -241,12 +250,15 @@ class Label$Type extends MessageType<Label> {
|
|
|
241
250
|
/* optional resources.citizens.labels.Settings settings = 9; */
|
|
242
251
|
if (message.settings)
|
|
243
252
|
Settings.internalBinaryWrite(message.settings, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
244
|
-
/* optional resources.
|
|
253
|
+
/* optional resources.access.Access access = 10; */
|
|
245
254
|
if (message.access)
|
|
246
|
-
|
|
255
|
+
Access.internalBinaryWrite(message.access, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
247
256
|
/* optional resources.timestamp.Timestamp expires_at = 11; */
|
|
248
257
|
if (message.expiresAt)
|
|
249
258
|
Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
259
|
+
/* int32 sort_order = 12; */
|
|
260
|
+
if (message.sortOrder !== 0)
|
|
261
|
+
writer.tag(12, WireType.Varint).int32(message.sortOrder);
|
|
250
262
|
let u = options.writeUnknownFields;
|
|
251
263
|
if (u !== false)
|
|
252
264
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -97,7 +97,7 @@ export enum Kind {
|
|
|
97
97
|
class ContentDiffOp$Type extends MessageType<ContentDiffOp> {
|
|
98
98
|
constructor() {
|
|
99
99
|
super("resources.common.content.ContentDiffOp", [
|
|
100
|
-
{ no: 1, name: "kind", kind: "enum", T: () => ["resources.common.content.Kind", Kind, "KIND_"] },
|
|
100
|
+
{ no: 1, name: "kind", kind: "enum", T: () => ["resources.common.content.Kind", Kind, "KIND_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
101
101
|
{ no: 2, name: "text", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
102
102
|
]);
|
|
103
103
|
}
|
package/resources/cron/cron.ts
CHANGED
|
@@ -209,7 +209,7 @@ class Cronjob$Type extends MessageType<Cronjob> {
|
|
|
209
209
|
super("resources.cron.Cronjob", [
|
|
210
210
|
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
211
211
|
{ no: 2, name: "schedule", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
212
|
-
{ no: 3, name: "state", kind: "enum", T: () => ["resources.cron.CronjobState", CronjobState, "CRONJOB_STATE_"] },
|
|
212
|
+
{ no: 3, name: "state", kind: "enum", T: () => ["resources.cron.CronjobState", CronjobState, "CRONJOB_STATE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
213
213
|
{ no: 4, name: "next_schedule_time", kind: "message", T: () => Timestamp },
|
|
214
214
|
{ no: 5, name: "last_attempt_time", kind: "message", T: () => Timestamp },
|
|
215
215
|
{ no: 6, name: "started_time", kind: "message", T: () => Timestamp },
|
|
@@ -2,95 +2,6 @@
|
|
|
2
2
|
// @generated from protobuf file "resources/documents/access/access.proto" (package "resources.documents.access", syntax proto3)
|
|
3
3
|
// tslint:disable
|
|
4
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.documents.access.DocumentAccess
|
|
17
|
-
*/
|
|
18
|
-
export interface DocumentAccess {
|
|
19
|
-
/**
|
|
20
|
-
* @generated from protobuf field: repeated resources.documents.access.DocumentJobAccess jobs = 1
|
|
21
|
-
*/
|
|
22
|
-
jobs: DocumentJobAccess[];
|
|
23
|
-
/**
|
|
24
|
-
* @generated from protobuf field: repeated resources.documents.access.DocumentUserAccess users = 2
|
|
25
|
-
*/
|
|
26
|
-
users: DocumentUserAccess[];
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @generated from protobuf message resources.documents.access.DocumentJobAccess
|
|
30
|
-
*/
|
|
31
|
-
export interface DocumentJobAccess {
|
|
32
|
-
/**
|
|
33
|
-
* @generated from protobuf field: int64 id = 1
|
|
34
|
-
*/
|
|
35
|
-
id: number;
|
|
36
|
-
/**
|
|
37
|
-
* @generated from protobuf field: int64 target_id = 3
|
|
38
|
-
*/
|
|
39
|
-
targetId: number;
|
|
40
|
-
/**
|
|
41
|
-
* @generated from protobuf field: string job = 4
|
|
42
|
-
*/
|
|
43
|
-
job: string;
|
|
44
|
-
/**
|
|
45
|
-
* @generated from protobuf field: optional string job_label = 5
|
|
46
|
-
*/
|
|
47
|
-
jobLabel?: string;
|
|
48
|
-
/**
|
|
49
|
-
* @generated from protobuf field: int32 minimum_grade = 6
|
|
50
|
-
*/
|
|
51
|
-
minimumGrade: number;
|
|
52
|
-
/**
|
|
53
|
-
* @generated from protobuf field: optional string job_grade_label = 7
|
|
54
|
-
*/
|
|
55
|
-
jobGradeLabel?: string;
|
|
56
|
-
/**
|
|
57
|
-
* @generated from protobuf field: resources.documents.access.AccessLevel access = 8
|
|
58
|
-
*/
|
|
59
|
-
access: AccessLevel;
|
|
60
|
-
/**
|
|
61
|
-
* @generated from protobuf field: optional bool required = 9
|
|
62
|
-
*/
|
|
63
|
-
required?: boolean;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* @generated from protobuf message resources.documents.access.DocumentUserAccess
|
|
67
|
-
*/
|
|
68
|
-
export interface DocumentUserAccess {
|
|
69
|
-
/**
|
|
70
|
-
* @generated from protobuf field: int64 id = 1
|
|
71
|
-
*/
|
|
72
|
-
id: number;
|
|
73
|
-
/**
|
|
74
|
-
* @generated from protobuf field: int64 target_id = 3
|
|
75
|
-
*/
|
|
76
|
-
targetId: number;
|
|
77
|
-
/**
|
|
78
|
-
* @generated from protobuf field: int32 user_id = 4
|
|
79
|
-
*/
|
|
80
|
-
userId: number;
|
|
81
|
-
/**
|
|
82
|
-
* @generated from protobuf field: optional resources.users.short.UserShort user = 5
|
|
83
|
-
*/
|
|
84
|
-
user?: UserShort;
|
|
85
|
-
/**
|
|
86
|
-
* @generated from protobuf field: resources.documents.access.AccessLevel access = 6
|
|
87
|
-
*/
|
|
88
|
-
access: AccessLevel;
|
|
89
|
-
/**
|
|
90
|
-
* @generated from protobuf field: optional bool required = 7
|
|
91
|
-
*/
|
|
92
|
-
required?: boolean;
|
|
93
|
-
}
|
|
94
5
|
/**
|
|
95
6
|
* @generated from protobuf enum resources.documents.access.AccessLevel
|
|
96
7
|
*/
|
|
@@ -124,243 +35,3 @@ export enum AccessLevel {
|
|
|
124
35
|
*/
|
|
125
36
|
EDIT = 6
|
|
126
37
|
}
|
|
127
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
128
|
-
class DocumentAccess$Type extends MessageType<DocumentAccess> {
|
|
129
|
-
constructor() {
|
|
130
|
-
super("resources.documents.access.DocumentAccess", [
|
|
131
|
-
{ no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"job_access\"" } },
|
|
132
|
-
{ no: 2, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DocumentUserAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"user_access\"" } }
|
|
133
|
-
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
134
|
-
}
|
|
135
|
-
create(value?: PartialMessage<DocumentAccess>): DocumentAccess {
|
|
136
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
137
|
-
message.jobs = [];
|
|
138
|
-
message.users = [];
|
|
139
|
-
if (value !== undefined)
|
|
140
|
-
reflectionMergePartial<DocumentAccess>(this, message, value);
|
|
141
|
-
return message;
|
|
142
|
-
}
|
|
143
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentAccess): DocumentAccess {
|
|
144
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
145
|
-
while (reader.pos < end) {
|
|
146
|
-
let [fieldNo, wireType] = reader.tag();
|
|
147
|
-
switch (fieldNo) {
|
|
148
|
-
case /* repeated resources.documents.access.DocumentJobAccess jobs */ 1:
|
|
149
|
-
message.jobs.push(DocumentJobAccess.internalBinaryRead(reader, reader.uint32(), options));
|
|
150
|
-
break;
|
|
151
|
-
case /* repeated resources.documents.access.DocumentUserAccess users */ 2:
|
|
152
|
-
message.users.push(DocumentUserAccess.internalBinaryRead(reader, reader.uint32(), options));
|
|
153
|
-
break;
|
|
154
|
-
default:
|
|
155
|
-
let u = options.readUnknownField;
|
|
156
|
-
if (u === "throw")
|
|
157
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
158
|
-
let d = reader.skip(wireType);
|
|
159
|
-
if (u !== false)
|
|
160
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
return message;
|
|
164
|
-
}
|
|
165
|
-
internalBinaryWrite(message: DocumentAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
166
|
-
/* repeated resources.documents.access.DocumentJobAccess jobs = 1; */
|
|
167
|
-
for (let i = 0; i < message.jobs.length; i++)
|
|
168
|
-
DocumentJobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
169
|
-
/* repeated resources.documents.access.DocumentUserAccess users = 2; */
|
|
170
|
-
for (let i = 0; i < message.users.length; i++)
|
|
171
|
-
DocumentUserAccess.internalBinaryWrite(message.users[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
172
|
-
let u = options.writeUnknownFields;
|
|
173
|
-
if (u !== false)
|
|
174
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
175
|
-
return writer;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* @generated MessageType for protobuf message resources.documents.access.DocumentAccess
|
|
180
|
-
*/
|
|
181
|
-
export const DocumentAccess = new DocumentAccess$Type();
|
|
182
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
183
|
-
class DocumentJobAccess$Type extends MessageType<DocumentJobAccess> {
|
|
184
|
-
constructor() {
|
|
185
|
-
super("resources.documents.access.DocumentJobAccess", [
|
|
186
|
-
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
187
|
-
{ no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
188
|
-
{ no: 4, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
189
|
-
{ no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
190
|
-
{ no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
191
|
-
{ no: 7, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
192
|
-
{ no: 8, name: "access", kind: "enum", T: () => ["resources.documents.access.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
193
|
-
{ no: 9, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
194
|
-
]);
|
|
195
|
-
}
|
|
196
|
-
create(value?: PartialMessage<DocumentJobAccess>): DocumentJobAccess {
|
|
197
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
198
|
-
message.id = 0;
|
|
199
|
-
message.targetId = 0;
|
|
200
|
-
message.job = "";
|
|
201
|
-
message.minimumGrade = 0;
|
|
202
|
-
message.access = 0;
|
|
203
|
-
if (value !== undefined)
|
|
204
|
-
reflectionMergePartial<DocumentJobAccess>(this, message, value);
|
|
205
|
-
return message;
|
|
206
|
-
}
|
|
207
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentJobAccess): DocumentJobAccess {
|
|
208
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
209
|
-
while (reader.pos < end) {
|
|
210
|
-
let [fieldNo, wireType] = reader.tag();
|
|
211
|
-
switch (fieldNo) {
|
|
212
|
-
case /* int64 id */ 1:
|
|
213
|
-
message.id = reader.int64().toNumber();
|
|
214
|
-
break;
|
|
215
|
-
case /* int64 target_id */ 3:
|
|
216
|
-
message.targetId = reader.int64().toNumber();
|
|
217
|
-
break;
|
|
218
|
-
case /* string job */ 4:
|
|
219
|
-
message.job = reader.string();
|
|
220
|
-
break;
|
|
221
|
-
case /* optional string job_label */ 5:
|
|
222
|
-
message.jobLabel = reader.string();
|
|
223
|
-
break;
|
|
224
|
-
case /* int32 minimum_grade */ 6:
|
|
225
|
-
message.minimumGrade = reader.int32();
|
|
226
|
-
break;
|
|
227
|
-
case /* optional string job_grade_label */ 7:
|
|
228
|
-
message.jobGradeLabel = reader.string();
|
|
229
|
-
break;
|
|
230
|
-
case /* resources.documents.access.AccessLevel access */ 8:
|
|
231
|
-
message.access = reader.int32();
|
|
232
|
-
break;
|
|
233
|
-
case /* optional bool required */ 9:
|
|
234
|
-
message.required = reader.bool();
|
|
235
|
-
break;
|
|
236
|
-
default:
|
|
237
|
-
let u = options.readUnknownField;
|
|
238
|
-
if (u === "throw")
|
|
239
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
240
|
-
let d = reader.skip(wireType);
|
|
241
|
-
if (u !== false)
|
|
242
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
return message;
|
|
246
|
-
}
|
|
247
|
-
internalBinaryWrite(message: DocumentJobAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
248
|
-
/* int64 id = 1; */
|
|
249
|
-
if (message.id !== 0)
|
|
250
|
-
writer.tag(1, WireType.Varint).int64(message.id);
|
|
251
|
-
/* int64 target_id = 3; */
|
|
252
|
-
if (message.targetId !== 0)
|
|
253
|
-
writer.tag(3, WireType.Varint).int64(message.targetId);
|
|
254
|
-
/* string job = 4; */
|
|
255
|
-
if (message.job !== "")
|
|
256
|
-
writer.tag(4, WireType.LengthDelimited).string(message.job);
|
|
257
|
-
/* optional string job_label = 5; */
|
|
258
|
-
if (message.jobLabel !== undefined)
|
|
259
|
-
writer.tag(5, WireType.LengthDelimited).string(message.jobLabel);
|
|
260
|
-
/* int32 minimum_grade = 6; */
|
|
261
|
-
if (message.minimumGrade !== 0)
|
|
262
|
-
writer.tag(6, WireType.Varint).int32(message.minimumGrade);
|
|
263
|
-
/* optional string job_grade_label = 7; */
|
|
264
|
-
if (message.jobGradeLabel !== undefined)
|
|
265
|
-
writer.tag(7, WireType.LengthDelimited).string(message.jobGradeLabel);
|
|
266
|
-
/* resources.documents.access.AccessLevel access = 8; */
|
|
267
|
-
if (message.access !== 0)
|
|
268
|
-
writer.tag(8, WireType.Varint).int32(message.access);
|
|
269
|
-
/* optional bool required = 9; */
|
|
270
|
-
if (message.required !== undefined)
|
|
271
|
-
writer.tag(9, WireType.Varint).bool(message.required);
|
|
272
|
-
let u = options.writeUnknownFields;
|
|
273
|
-
if (u !== false)
|
|
274
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
275
|
-
return writer;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* @generated MessageType for protobuf message resources.documents.access.DocumentJobAccess
|
|
280
|
-
*/
|
|
281
|
-
export const DocumentJobAccess = new DocumentJobAccess$Type();
|
|
282
|
-
// @generated message type with reflection information, may provide speed optimized methods
|
|
283
|
-
class DocumentUserAccess$Type extends MessageType<DocumentUserAccess> {
|
|
284
|
-
constructor() {
|
|
285
|
-
super("resources.documents.access.DocumentUserAccess", [
|
|
286
|
-
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
287
|
-
{ no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
288
|
-
{ no: 4, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
289
|
-
{ no: 5, name: "user", kind: "message", T: () => UserShort },
|
|
290
|
-
{ no: 6, name: "access", kind: "enum", T: () => ["resources.documents.access.AccessLevel", AccessLevel, "ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
291
|
-
{ no: 7, name: "required", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
292
|
-
]);
|
|
293
|
-
}
|
|
294
|
-
create(value?: PartialMessage<DocumentUserAccess>): DocumentUserAccess {
|
|
295
|
-
const message = globalThis.Object.create((this.messagePrototype!));
|
|
296
|
-
message.id = 0;
|
|
297
|
-
message.targetId = 0;
|
|
298
|
-
message.userId = 0;
|
|
299
|
-
message.access = 0;
|
|
300
|
-
if (value !== undefined)
|
|
301
|
-
reflectionMergePartial<DocumentUserAccess>(this, message, value);
|
|
302
|
-
return message;
|
|
303
|
-
}
|
|
304
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentUserAccess): DocumentUserAccess {
|
|
305
|
-
let message = target ?? this.create(), end = reader.pos + length;
|
|
306
|
-
while (reader.pos < end) {
|
|
307
|
-
let [fieldNo, wireType] = reader.tag();
|
|
308
|
-
switch (fieldNo) {
|
|
309
|
-
case /* int64 id */ 1:
|
|
310
|
-
message.id = reader.int64().toNumber();
|
|
311
|
-
break;
|
|
312
|
-
case /* int64 target_id */ 3:
|
|
313
|
-
message.targetId = reader.int64().toNumber();
|
|
314
|
-
break;
|
|
315
|
-
case /* int32 user_id */ 4:
|
|
316
|
-
message.userId = reader.int32();
|
|
317
|
-
break;
|
|
318
|
-
case /* optional resources.users.short.UserShort user */ 5:
|
|
319
|
-
message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
|
|
320
|
-
break;
|
|
321
|
-
case /* resources.documents.access.AccessLevel access */ 6:
|
|
322
|
-
message.access = reader.int32();
|
|
323
|
-
break;
|
|
324
|
-
case /* optional bool required */ 7:
|
|
325
|
-
message.required = reader.bool();
|
|
326
|
-
break;
|
|
327
|
-
default:
|
|
328
|
-
let u = options.readUnknownField;
|
|
329
|
-
if (u === "throw")
|
|
330
|
-
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
331
|
-
let d = reader.skip(wireType);
|
|
332
|
-
if (u !== false)
|
|
333
|
-
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
return message;
|
|
337
|
-
}
|
|
338
|
-
internalBinaryWrite(message: DocumentUserAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
339
|
-
/* int64 id = 1; */
|
|
340
|
-
if (message.id !== 0)
|
|
341
|
-
writer.tag(1, WireType.Varint).int64(message.id);
|
|
342
|
-
/* int64 target_id = 3; */
|
|
343
|
-
if (message.targetId !== 0)
|
|
344
|
-
writer.tag(3, WireType.Varint).int64(message.targetId);
|
|
345
|
-
/* int32 user_id = 4; */
|
|
346
|
-
if (message.userId !== 0)
|
|
347
|
-
writer.tag(4, WireType.Varint).int32(message.userId);
|
|
348
|
-
/* optional resources.users.short.UserShort user = 5; */
|
|
349
|
-
if (message.user)
|
|
350
|
-
UserShort.internalBinaryWrite(message.user, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
351
|
-
/* resources.documents.access.AccessLevel access = 6; */
|
|
352
|
-
if (message.access !== 0)
|
|
353
|
-
writer.tag(6, WireType.Varint).int32(message.access);
|
|
354
|
-
/* optional bool required = 7; */
|
|
355
|
-
if (message.required !== undefined)
|
|
356
|
-
writer.tag(7, WireType.Varint).bool(message.required);
|
|
357
|
-
let u = options.writeUnknownFields;
|
|
358
|
-
if (u !== false)
|
|
359
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
360
|
-
return writer;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* @generated MessageType for protobuf message resources.documents.access.DocumentUserAccess
|
|
365
|
-
*/
|
|
366
|
-
export const DocumentUserAccess = new DocumentUserAccess$Type();
|