@fivenet-app/gen 2026.8.5 → 2026.10.2
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/LICENSE +201 -0
- package/clients.ts +12 -0
- package/codegen/perms/perms.ts +331 -2
- package/google/protobuf/any.ts +47 -103
- package/google/protobuf/descriptor.ts +39 -32
- package/google/protobuf/struct.ts +33 -22
- package/google/protobuf/timestamp.ts +9 -8
- package/package.json +2 -2
- package/perms.ts +41 -13
- package/resources/centrum/dispatches/dispatches.ts +206 -13
- package/resources/centrum/units/units.ts +207 -0
- package/resources/cron/cron.ts +44 -3
- package/resources/documents/templates/templates.ts +3 -3
- package/resources/file/file.ts +3 -3
- package/resources/file/filestore.ts +26 -10
- package/resources/jobs/colleagues/activity/activity.ts +50 -8
- package/resources/jobs/colleagues/colleagues.ts +14 -1
- package/resources/jobs/groups/short/group_member_short.ts +129 -0
- package/resources/jobs/job_asset.ts +116 -0
- package/resources/jobs/user_selector.ts +1 -15
- package/resources/notifications/clientview/clientview.ts +5 -1
- package/resources/notifications/events/events.ts +35 -1
- package/resources/notifications/notifications.ts +322 -2
- package/resources/permissions/attributes/attributes.ts +164 -2
- package/resources/permissions/authorization/authorization.ts +86 -0
- package/resources/permissions/permissions/permissions.ts +16 -1
- package/resources/properties/properties.ts +1648 -0
- package/resources/qualifications/activity/activity.ts +328 -0
- package/resources/qualifications/exam/exam.ts +108 -4
- package/resources/qualifications/qualifications.ts +36 -2
- package/resources/settings/config.ts +3 -3
- package/resources/sync/activity/activity.ts +4 -4
- package/resources/sync/data/data.ts +16 -4
- package/resources/users/activity/activity.ts +220 -3
- package/resources/users/props/props.ts +13 -1
- package/resources/users/user.ts +13 -1
- package/resources/vehicles/activity/activity.ts +222 -3
- package/resources/vehicles/props/props.ts +13 -1
- package/resources/vehicles/vehicles.ts +13 -1
- package/services/auth/auth.ts +61 -67
- package/services/centrum/centrum.ts +103 -1
- package/services/centrum/dispatches.ts +25 -1
- package/services/centrum/units.ts +25 -1
- package/services/citizens/citizens.client.ts +49 -0
- package/services/citizens/citizens.ts +384 -7
- package/services/documents/documents.ts +1 -0
- package/services/documents/templates.ts +12 -1
- package/services/jobs/colleagues.ts +26 -1
- package/services/jobs/conduct.ts +1 -0
- package/services/jobs/groups.ts +62 -4
- package/services/notifications/notifications.client.ts +40 -1
- package/services/notifications/notifications.ts +483 -3
- package/services/qualifications/qualifications.client.ts +20 -7
- package/services/qualifications/qualifications.ts +265 -4
- package/services/settings/job_assets.client.ts +105 -0
- package/services/settings/job_assets.ts +373 -0
- package/services/settings/properties.client.ts +194 -0
- package/services/settings/properties.ts +1555 -0
- package/services/settings/system.ts +29 -9
- package/services/sync/sync.ts +115 -12
- package/services/vehicles/vehicles.client.ts +52 -0
- package/services/vehicles/vehicles.ts +385 -7
- package/svcs.ts +58 -0
package/resources/cron/cron.ts
CHANGED
|
@@ -76,6 +76,12 @@ export interface Cronjob {
|
|
|
76
76
|
* @generated from protobuf field: optional resources.cron.CronjobCompletedEvent last_completed_event = 9
|
|
77
77
|
*/
|
|
78
78
|
lastCompletedEvent?: CronjobCompletedEvent;
|
|
79
|
+
/**
|
|
80
|
+
* ID of the currently claimed run
|
|
81
|
+
*
|
|
82
|
+
* @generated from protobuf field: string run_id = 10
|
|
83
|
+
*/
|
|
84
|
+
runId: string;
|
|
79
85
|
}
|
|
80
86
|
/**
|
|
81
87
|
* @generated from protobuf message resources.cron.CronjobData
|
|
@@ -126,6 +132,18 @@ export interface CronjobCompletedEvent {
|
|
|
126
132
|
* @generated from protobuf field: string name = 1
|
|
127
133
|
*/
|
|
128
134
|
name: string;
|
|
135
|
+
/**
|
|
136
|
+
* Unique ID of the execution this event belongs to
|
|
137
|
+
*
|
|
138
|
+
* @generated from protobuf field: string run_id = 9
|
|
139
|
+
*/
|
|
140
|
+
runId: string;
|
|
141
|
+
/**
|
|
142
|
+
* Start time of the execution this event belongs to
|
|
143
|
+
*
|
|
144
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp started_time = 10
|
|
145
|
+
*/
|
|
146
|
+
startedTime?: Timestamp;
|
|
129
147
|
/**
|
|
130
148
|
* Cronjob execution success status
|
|
131
149
|
*
|
|
@@ -181,7 +199,7 @@ export interface GenericCronData {
|
|
|
181
199
|
};
|
|
182
200
|
}
|
|
183
201
|
/**
|
|
184
|
-
* States of
|
|
202
|
+
* States of Cronjob
|
|
185
203
|
*
|
|
186
204
|
* @generated from protobuf enum resources.cron.CronjobState
|
|
187
205
|
*/
|
|
@@ -213,9 +231,10 @@ class Cronjob$Type extends MessageType<Cronjob> {
|
|
|
213
231
|
{ no: 4, name: "next_schedule_time", kind: "message", T: () => Timestamp },
|
|
214
232
|
{ no: 5, name: "last_attempt_time", kind: "message", T: () => Timestamp },
|
|
215
233
|
{ no: 6, name: "started_time", kind: "message", T: () => Timestamp },
|
|
216
|
-
{ no: 7, name: "timeout", kind: "message", T: () => Duration, options: { "buf.validate.field": { duration: { lte: { seconds: "1800" },
|
|
234
|
+
{ no: 7, name: "timeout", kind: "message", T: () => Duration, options: { "buf.validate.field": { duration: { lte: { seconds: "1800" }, gt: {} } } } },
|
|
217
235
|
{ no: 8, name: "data", kind: "message", T: () => CronjobData },
|
|
218
|
-
{ no: 9, name: "last_completed_event", kind: "message", T: () => CronjobCompletedEvent }
|
|
236
|
+
{ no: 9, name: "last_completed_event", kind: "message", T: () => CronjobCompletedEvent },
|
|
237
|
+
{ no: 10, name: "run_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
219
238
|
]);
|
|
220
239
|
}
|
|
221
240
|
create(value?: PartialMessage<Cronjob>): Cronjob {
|
|
@@ -223,6 +242,7 @@ class Cronjob$Type extends MessageType<Cronjob> {
|
|
|
223
242
|
message.name = "";
|
|
224
243
|
message.schedule = "";
|
|
225
244
|
message.state = 0;
|
|
245
|
+
message.runId = "";
|
|
226
246
|
if (value !== undefined)
|
|
227
247
|
reflectionMergePartial<Cronjob>(this, message, value);
|
|
228
248
|
return message;
|
|
@@ -259,6 +279,9 @@ class Cronjob$Type extends MessageType<Cronjob> {
|
|
|
259
279
|
case /* optional resources.cron.CronjobCompletedEvent last_completed_event */ 9:
|
|
260
280
|
message.lastCompletedEvent = CronjobCompletedEvent.internalBinaryRead(reader, reader.uint32(), options, message.lastCompletedEvent);
|
|
261
281
|
break;
|
|
282
|
+
case /* string run_id */ 10:
|
|
283
|
+
message.runId = reader.string();
|
|
284
|
+
break;
|
|
262
285
|
default:
|
|
263
286
|
let u = options.readUnknownField;
|
|
264
287
|
if (u === "throw")
|
|
@@ -298,6 +321,9 @@ class Cronjob$Type extends MessageType<Cronjob> {
|
|
|
298
321
|
/* optional resources.cron.CronjobCompletedEvent last_completed_event = 9; */
|
|
299
322
|
if (message.lastCompletedEvent)
|
|
300
323
|
CronjobCompletedEvent.internalBinaryWrite(message.lastCompletedEvent, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
324
|
+
/* string run_id = 10; */
|
|
325
|
+
if (message.runId !== "")
|
|
326
|
+
writer.tag(10, WireType.LengthDelimited).string(message.runId);
|
|
301
327
|
let u = options.writeUnknownFields;
|
|
302
328
|
if (u !== false)
|
|
303
329
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -466,6 +492,8 @@ class CronjobCompletedEvent$Type extends MessageType<CronjobCompletedEvent> {
|
|
|
466
492
|
constructor() {
|
|
467
493
|
super("resources.cron.CronjobCompletedEvent", [
|
|
468
494
|
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
495
|
+
{ no: 9, name: "run_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
496
|
+
{ no: 10, name: "started_time", kind: "message", T: () => Timestamp },
|
|
469
497
|
{ no: 2, name: "success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
470
498
|
{ no: 7, name: "cancelled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
471
499
|
{ no: 3, name: "end_date", kind: "message", T: () => Timestamp },
|
|
@@ -478,6 +506,7 @@ class CronjobCompletedEvent$Type extends MessageType<CronjobCompletedEvent> {
|
|
|
478
506
|
create(value?: PartialMessage<CronjobCompletedEvent>): CronjobCompletedEvent {
|
|
479
507
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
480
508
|
message.name = "";
|
|
509
|
+
message.runId = "";
|
|
481
510
|
message.success = false;
|
|
482
511
|
message.cancelled = false;
|
|
483
512
|
message.nodeName = "";
|
|
@@ -493,6 +522,12 @@ class CronjobCompletedEvent$Type extends MessageType<CronjobCompletedEvent> {
|
|
|
493
522
|
case /* string name */ 1:
|
|
494
523
|
message.name = reader.string();
|
|
495
524
|
break;
|
|
525
|
+
case /* string run_id */ 9:
|
|
526
|
+
message.runId = reader.string();
|
|
527
|
+
break;
|
|
528
|
+
case /* optional resources.timestamp.Timestamp started_time */ 10:
|
|
529
|
+
message.startedTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startedTime);
|
|
530
|
+
break;
|
|
496
531
|
case /* bool success */ 2:
|
|
497
532
|
message.success = reader.bool();
|
|
498
533
|
break;
|
|
@@ -550,6 +585,12 @@ class CronjobCompletedEvent$Type extends MessageType<CronjobCompletedEvent> {
|
|
|
550
585
|
/* optional string error_message = 8; */
|
|
551
586
|
if (message.errorMessage !== undefined)
|
|
552
587
|
writer.tag(8, WireType.LengthDelimited).string(message.errorMessage);
|
|
588
|
+
/* string run_id = 9; */
|
|
589
|
+
if (message.runId !== "")
|
|
590
|
+
writer.tag(9, WireType.LengthDelimited).string(message.runId);
|
|
591
|
+
/* optional resources.timestamp.Timestamp started_time = 10; */
|
|
592
|
+
if (message.startedTime)
|
|
593
|
+
Timestamp.internalBinaryWrite(message.startedTime, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
553
594
|
let u = options.writeUnknownFields;
|
|
554
595
|
if (u !== false)
|
|
555
596
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -318,9 +318,9 @@ class Template$Type extends MessageType<Template> {
|
|
|
318
318
|
{ no: 8, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
319
319
|
{ no: 9, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "7" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
320
320
|
{ no: 10, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
321
|
-
{ no: 11, name: "content_title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxBytes: "10240" } }, "codegen.sanitizer.sanitizer": { enabled: true }, "tagger.tags": "alias:\"content_title\"" } },
|
|
322
|
-
{ no: 12, name: "content", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "0", maxBytes: "2000000" } }, "codegen.sanitizer.sanitizer": { enabled: true }, "tagger.tags": "alias:\"content\"" } },
|
|
323
|
-
{ no: 13, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "tagger.tags": "alias:\"state\"" } },
|
|
321
|
+
{ no: 11, name: "content_title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxBytes: "10240" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true }, "tagger.tags": "alias:\"content_title\"" } },
|
|
322
|
+
{ no: 12, name: "content", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "0", maxBytes: "2000000" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "Sanitize" }, "tagger.tags": "alias:\"content\"" } },
|
|
323
|
+
{ no: 13, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true }, "tagger.tags": "alias:\"state\"" } },
|
|
324
324
|
{ no: 14, name: "schema", kind: "message", T: () => TemplateSchema, options: { "tagger.tags": "alias:\"schema\"" } },
|
|
325
325
|
{ no: 15, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
326
326
|
{ no: 16, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
package/resources/file/file.ts
CHANGED
|
@@ -56,10 +56,10 @@ class File$Type extends MessageType<File> {
|
|
|
56
56
|
super("resources.file.File", [
|
|
57
57
|
{ no: 1, name: "parent_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
|
|
58
58
|
{ no: 2, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
|
|
59
|
-
{ no: 3, name: "file_path", kind: "scalar", T: 9 /*ScalarType.STRING
|
|
59
|
+
{ no: 3, name: "file_path", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } } } },
|
|
60
60
|
{ no: 4, name: "created_at", kind: "message", T: () => Timestamp },
|
|
61
|
-
{ no: 5, name: "byte_size", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER
|
|
62
|
-
{ no: 6, name: "content_type", kind: "scalar", T: 9 /*ScalarType.STRING
|
|
61
|
+
{ no: 5, name: "byte_size", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gte: "0" } } } },
|
|
62
|
+
{ no: 6, name: "content_type", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "127" } } } },
|
|
63
63
|
{ no: 7, name: "meta", kind: "message", T: () => FileMeta },
|
|
64
64
|
{ no: 8, name: "is_dir", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
65
65
|
]);
|
|
@@ -46,9 +46,11 @@ export interface UploadMeta {
|
|
|
46
46
|
*/
|
|
47
47
|
parentId: number;
|
|
48
48
|
/**
|
|
49
|
+
* Namespace is a logical grouping of files, e.g. "documents", "wiki", "avatars", etc.
|
|
50
|
+
*
|
|
49
51
|
* @generated from protobuf field: string namespace = 2
|
|
50
52
|
*/
|
|
51
|
-
namespace: string;
|
|
53
|
+
namespace: string;
|
|
52
54
|
/**
|
|
53
55
|
* @generated from protobuf field: string original_name = 3
|
|
54
56
|
*/
|
|
@@ -60,11 +62,17 @@ export interface UploadMeta {
|
|
|
60
62
|
/**
|
|
61
63
|
* @generated from protobuf field: int64 size = 5
|
|
62
64
|
*/
|
|
63
|
-
size: number; // Size in bytes
|
|
65
|
+
size: number; // Size in bytes; the largest configured upload limit is 5 MiB
|
|
64
66
|
/**
|
|
65
67
|
* @generated from protobuf field: string reason = 6
|
|
66
68
|
*/
|
|
67
69
|
reason: string;
|
|
70
|
+
/**
|
|
71
|
+
* String parent key for resources whose natural identifier is not numeric.
|
|
72
|
+
*
|
|
73
|
+
* @generated from protobuf field: string parent_key = 7
|
|
74
|
+
*/
|
|
75
|
+
parentKey: string;
|
|
68
76
|
}
|
|
69
77
|
/**
|
|
70
78
|
* @generated from protobuf message resources.file.UploadFileResponse
|
|
@@ -166,11 +174,12 @@ class UploadMeta$Type extends MessageType<UploadMeta> {
|
|
|
166
174
|
constructor() {
|
|
167
175
|
super("resources.file.UploadMeta", [
|
|
168
176
|
{ no: 1, name: "parent_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
169
|
-
{ no: 2, name: "namespace", kind: "scalar", T: 9 /*ScalarType.STRING
|
|
170
|
-
{ no: 3, name: "original_name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
|
|
171
|
-
{ no: 4, name: "content_type", kind: "scalar", T: 9 /*ScalarType.STRING
|
|
172
|
-
{ no: 5, name: "size", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
|
|
173
|
-
{ no: 6, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { minLen: "3", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } }
|
|
177
|
+
{ no: 2, name: "namespace", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "64", pattern: "^[a-zA-Z0-9_-]+$" } } } },
|
|
178
|
+
{ no: 3, name: "original_name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "255" } } } },
|
|
179
|
+
{ no: 4, name: "content_type", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "127" } } } },
|
|
180
|
+
{ no: 5, name: "size", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { lte: "5242880", gt: "0" } } } },
|
|
181
|
+
{ no: 6, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { minLen: "3", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
182
|
+
{ no: 7, name: "parent_key", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } }
|
|
174
183
|
]);
|
|
175
184
|
}
|
|
176
185
|
create(value?: PartialMessage<UploadMeta>): UploadMeta {
|
|
@@ -181,6 +190,7 @@ class UploadMeta$Type extends MessageType<UploadMeta> {
|
|
|
181
190
|
message.contentType = "";
|
|
182
191
|
message.size = 0;
|
|
183
192
|
message.reason = "";
|
|
193
|
+
message.parentKey = "";
|
|
184
194
|
if (value !== undefined)
|
|
185
195
|
reflectionMergePartial<UploadMeta>(this, message, value);
|
|
186
196
|
return message;
|
|
@@ -208,6 +218,9 @@ class UploadMeta$Type extends MessageType<UploadMeta> {
|
|
|
208
218
|
case /* string reason */ 6:
|
|
209
219
|
message.reason = reader.string();
|
|
210
220
|
break;
|
|
221
|
+
case /* string parent_key */ 7:
|
|
222
|
+
message.parentKey = reader.string();
|
|
223
|
+
break;
|
|
211
224
|
default:
|
|
212
225
|
let u = options.readUnknownField;
|
|
213
226
|
if (u === "throw")
|
|
@@ -238,6 +251,9 @@ class UploadMeta$Type extends MessageType<UploadMeta> {
|
|
|
238
251
|
/* string reason = 6; */
|
|
239
252
|
if (message.reason !== "")
|
|
240
253
|
writer.tag(6, WireType.LengthDelimited).string(message.reason);
|
|
254
|
+
/* string parent_key = 7; */
|
|
255
|
+
if (message.parentKey !== "")
|
|
256
|
+
writer.tag(7, WireType.LengthDelimited).string(message.parentKey);
|
|
241
257
|
let u = options.writeUnknownFields;
|
|
242
258
|
if (u !== false)
|
|
243
259
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -252,9 +268,9 @@ export const UploadMeta = new UploadMeta$Type();
|
|
|
252
268
|
class UploadFileResponse$Type extends MessageType<UploadFileResponse> {
|
|
253
269
|
constructor() {
|
|
254
270
|
super("resources.file.UploadFileResponse", [
|
|
255
|
-
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER
|
|
256
|
-
{ no: 2, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING
|
|
257
|
-
{ no: 3, name: "file", kind: "message", T: () => File }
|
|
271
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
|
|
272
|
+
{ no: 2, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } } } },
|
|
273
|
+
{ no: 3, name: "file", kind: "message", T: () => File, options: { "buf.validate.field": { required: true } } }
|
|
258
274
|
]);
|
|
259
275
|
}
|
|
260
276
|
create(value?: PartialMessage<UploadFileResponse>): UploadFileResponse {
|
|
@@ -125,13 +125,23 @@ export interface GradeChange {
|
|
|
125
125
|
*/
|
|
126
126
|
export interface LabelsChange {
|
|
127
127
|
/**
|
|
128
|
-
* @
|
|
128
|
+
* @deprecated
|
|
129
|
+
* @generated from protobuf field: repeated resources.jobs.labels.Label added = 1 [deprecated = true]
|
|
129
130
|
*/
|
|
130
131
|
added: Label[];
|
|
131
132
|
/**
|
|
132
|
-
* @
|
|
133
|
+
* @deprecated
|
|
134
|
+
* @generated from protobuf field: repeated resources.jobs.labels.Label removed = 2 [deprecated = true]
|
|
133
135
|
*/
|
|
134
|
-
removed: Label[];
|
|
136
|
+
removed: Label[];
|
|
137
|
+
/**
|
|
138
|
+
* @generated from protobuf field: repeated int64 added_ids = 3
|
|
139
|
+
*/
|
|
140
|
+
addedIds: number[];
|
|
141
|
+
/**
|
|
142
|
+
* @generated from protobuf field: repeated int64 removed_ids = 4
|
|
143
|
+
*/
|
|
144
|
+
removedIds: number[];
|
|
135
145
|
}
|
|
136
146
|
/**
|
|
137
147
|
* @generated from protobuf message resources.jobs.colleagues.activity.NameChange
|
|
@@ -494,13 +504,17 @@ class LabelsChange$Type extends MessageType<LabelsChange> {
|
|
|
494
504
|
constructor() {
|
|
495
505
|
super("resources.jobs.colleagues.activity.LabelsChange", [
|
|
496
506
|
{ no: 1, name: "added", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Label },
|
|
497
|
-
{ no: 2, name: "removed", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Label }
|
|
507
|
+
{ no: 2, name: "removed", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Label },
|
|
508
|
+
{ no: 3, name: "added_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
509
|
+
{ no: 4, name: "removed_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
498
510
|
]);
|
|
499
511
|
}
|
|
500
512
|
create(value?: PartialMessage<LabelsChange>): LabelsChange {
|
|
501
513
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
502
514
|
message.added = [];
|
|
503
515
|
message.removed = [];
|
|
516
|
+
message.addedIds = [];
|
|
517
|
+
message.removedIds = [];
|
|
504
518
|
if (value !== undefined)
|
|
505
519
|
reflectionMergePartial<LabelsChange>(this, message, value);
|
|
506
520
|
return message;
|
|
@@ -510,12 +524,26 @@ class LabelsChange$Type extends MessageType<LabelsChange> {
|
|
|
510
524
|
while (reader.pos < end) {
|
|
511
525
|
let [fieldNo, wireType] = reader.tag();
|
|
512
526
|
switch (fieldNo) {
|
|
513
|
-
case /* repeated resources.jobs.labels.Label added */ 1:
|
|
527
|
+
case /* repeated resources.jobs.labels.Label added = 1 [deprecated = true] */ 1:
|
|
514
528
|
message.added.push(Label.internalBinaryRead(reader, reader.uint32(), options));
|
|
515
529
|
break;
|
|
516
|
-
case /* repeated resources.jobs.labels.Label removed */ 2:
|
|
530
|
+
case /* repeated resources.jobs.labels.Label removed = 2 [deprecated = true] */ 2:
|
|
517
531
|
message.removed.push(Label.internalBinaryRead(reader, reader.uint32(), options));
|
|
518
532
|
break;
|
|
533
|
+
case /* repeated int64 added_ids */ 3:
|
|
534
|
+
if (wireType === WireType.LengthDelimited)
|
|
535
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
536
|
+
message.addedIds.push(reader.int64().toNumber());
|
|
537
|
+
else
|
|
538
|
+
message.addedIds.push(reader.int64().toNumber());
|
|
539
|
+
break;
|
|
540
|
+
case /* repeated int64 removed_ids */ 4:
|
|
541
|
+
if (wireType === WireType.LengthDelimited)
|
|
542
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e;)
|
|
543
|
+
message.removedIds.push(reader.int64().toNumber());
|
|
544
|
+
else
|
|
545
|
+
message.removedIds.push(reader.int64().toNumber());
|
|
546
|
+
break;
|
|
519
547
|
default:
|
|
520
548
|
let u = options.readUnknownField;
|
|
521
549
|
if (u === "throw")
|
|
@@ -528,12 +556,26 @@ class LabelsChange$Type extends MessageType<LabelsChange> {
|
|
|
528
556
|
return message;
|
|
529
557
|
}
|
|
530
558
|
internalBinaryWrite(message: LabelsChange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
531
|
-
/* repeated resources.jobs.labels.Label added = 1; */
|
|
559
|
+
/* repeated resources.jobs.labels.Label added = 1 [deprecated = true]; */
|
|
532
560
|
for (let i = 0; i < message.added.length; i++)
|
|
533
561
|
Label.internalBinaryWrite(message.added[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
534
|
-
/* repeated resources.jobs.labels.Label removed = 2; */
|
|
562
|
+
/* repeated resources.jobs.labels.Label removed = 2 [deprecated = true]; */
|
|
535
563
|
for (let i = 0; i < message.removed.length; i++)
|
|
536
564
|
Label.internalBinaryWrite(message.removed[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
565
|
+
/* repeated int64 added_ids = 3; */
|
|
566
|
+
if (message.addedIds.length) {
|
|
567
|
+
writer.tag(3, WireType.LengthDelimited).fork();
|
|
568
|
+
for (let i = 0; i < message.addedIds.length; i++)
|
|
569
|
+
writer.int64(message.addedIds[i]);
|
|
570
|
+
writer.join();
|
|
571
|
+
}
|
|
572
|
+
/* repeated int64 removed_ids = 4; */
|
|
573
|
+
if (message.removedIds.length) {
|
|
574
|
+
writer.tag(4, WireType.LengthDelimited).fork();
|
|
575
|
+
for (let i = 0; i < message.removedIds.length; i++)
|
|
576
|
+
writer.int64(message.removedIds[i]);
|
|
577
|
+
writer.join();
|
|
578
|
+
}
|
|
537
579
|
let u = options.writeUnknownFields;
|
|
538
580
|
if (u !== false)
|
|
539
581
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -11,6 +11,7 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
11
11
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
+
import { GroupMemberShort } from "../groups/short/group_member_short";
|
|
14
15
|
import { Labels } from "../labels/labels";
|
|
15
16
|
import { Timestamp } from "../../timestamp/timestamp";
|
|
16
17
|
/**
|
|
@@ -110,6 +111,10 @@ export interface ColleagueProps {
|
|
|
110
111
|
* @generated from protobuf field: optional string name_suffix = 9
|
|
111
112
|
*/
|
|
112
113
|
nameSuffix?: string;
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf field: repeated resources.jobs.groups.short.GroupMemberShort groups = 10
|
|
116
|
+
*/
|
|
117
|
+
groups: GroupMemberShort[];
|
|
113
118
|
}
|
|
114
119
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
115
120
|
class Colleague$Type extends MessageType<Colleague> {
|
|
@@ -259,13 +264,15 @@ class ColleagueProps$Type extends MessageType<ColleagueProps> {
|
|
|
259
264
|
{ no: 6, name: "note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
260
265
|
{ no: 7, name: "labels", kind: "message", T: () => Labels },
|
|
261
266
|
{ no: 8, name: "name_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } } } },
|
|
262
|
-
{ no: 9, name: "name_suffix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } } } }
|
|
267
|
+
{ no: 9, name: "name_suffix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } } } },
|
|
268
|
+
{ no: 10, name: "groups", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => GroupMemberShort }
|
|
263
269
|
]);
|
|
264
270
|
}
|
|
265
271
|
create(value?: PartialMessage<ColleagueProps>): ColleagueProps {
|
|
266
272
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
267
273
|
message.userId = 0;
|
|
268
274
|
message.job = "";
|
|
275
|
+
message.groups = [];
|
|
269
276
|
if (value !== undefined)
|
|
270
277
|
reflectionMergePartial<ColleagueProps>(this, message, value);
|
|
271
278
|
return message;
|
|
@@ -302,6 +309,9 @@ class ColleagueProps$Type extends MessageType<ColleagueProps> {
|
|
|
302
309
|
case /* optional string name_suffix */ 9:
|
|
303
310
|
message.nameSuffix = reader.string();
|
|
304
311
|
break;
|
|
312
|
+
case /* repeated resources.jobs.groups.short.GroupMemberShort groups */ 10:
|
|
313
|
+
message.groups.push(GroupMemberShort.internalBinaryRead(reader, reader.uint32(), options));
|
|
314
|
+
break;
|
|
305
315
|
default:
|
|
306
316
|
let u = options.readUnknownField;
|
|
307
317
|
if (u === "throw")
|
|
@@ -341,6 +351,9 @@ class ColleagueProps$Type extends MessageType<ColleagueProps> {
|
|
|
341
351
|
/* optional string name_suffix = 9; */
|
|
342
352
|
if (message.nameSuffix !== undefined)
|
|
343
353
|
writer.tag(9, WireType.LengthDelimited).string(message.nameSuffix);
|
|
354
|
+
/* repeated resources.jobs.groups.short.GroupMemberShort groups = 10; */
|
|
355
|
+
for (let i = 0; i < message.groups.length; i++)
|
|
356
|
+
GroupMemberShort.internalBinaryWrite(message.groups[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
344
357
|
let u = options.writeUnknownFields;
|
|
345
358
|
if (u !== false)
|
|
346
359
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -0,0 +1,129 @@
|
|
|
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/jobs/groups/short/group_member_short.proto" (package "resources.jobs.groups.short", 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
|
+
* Lightweight group information attached to a colleague.
|
|
16
|
+
*
|
|
17
|
+
* @generated from protobuf message resources.jobs.groups.short.GroupMemberShort
|
|
18
|
+
*/
|
|
19
|
+
export interface GroupMemberShort {
|
|
20
|
+
/**
|
|
21
|
+
* @generated from protobuf field: int64 id = 1
|
|
22
|
+
*/
|
|
23
|
+
id: number;
|
|
24
|
+
/**
|
|
25
|
+
* @generated from protobuf field: string job = 2
|
|
26
|
+
*/
|
|
27
|
+
job: string;
|
|
28
|
+
/**
|
|
29
|
+
* @generated from protobuf field: string name = 3
|
|
30
|
+
*/
|
|
31
|
+
name: string;
|
|
32
|
+
/**
|
|
33
|
+
* @generated from protobuf field: optional string short_name = 4
|
|
34
|
+
*/
|
|
35
|
+
shortName?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @generated from protobuf field: optional string color = 5
|
|
38
|
+
*/
|
|
39
|
+
color?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf field: bool is_leader = 6
|
|
42
|
+
*/
|
|
43
|
+
isLeader: boolean;
|
|
44
|
+
}
|
|
45
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
46
|
+
class GroupMemberShort$Type extends MessageType<GroupMemberShort> {
|
|
47
|
+
constructor() {
|
|
48
|
+
super("resources.jobs.groups.short.GroupMemberShort", [
|
|
49
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } },
|
|
50
|
+
{ no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
51
|
+
{ no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } },
|
|
52
|
+
{ no: 4, name: "short_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } } } },
|
|
53
|
+
{ no: 5, name: "color", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } } } },
|
|
54
|
+
{ no: 6, name: "is_leader", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
create(value?: PartialMessage<GroupMemberShort>): GroupMemberShort {
|
|
58
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
59
|
+
message.id = 0;
|
|
60
|
+
message.job = "";
|
|
61
|
+
message.name = "";
|
|
62
|
+
message.isLeader = false;
|
|
63
|
+
if (value !== undefined)
|
|
64
|
+
reflectionMergePartial<GroupMemberShort>(this, message, value);
|
|
65
|
+
return message;
|
|
66
|
+
}
|
|
67
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GroupMemberShort): GroupMemberShort {
|
|
68
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
69
|
+
while (reader.pos < end) {
|
|
70
|
+
let [fieldNo, wireType] = reader.tag();
|
|
71
|
+
switch (fieldNo) {
|
|
72
|
+
case /* int64 id */ 1:
|
|
73
|
+
message.id = reader.int64().toNumber();
|
|
74
|
+
break;
|
|
75
|
+
case /* string job */ 2:
|
|
76
|
+
message.job = reader.string();
|
|
77
|
+
break;
|
|
78
|
+
case /* string name */ 3:
|
|
79
|
+
message.name = reader.string();
|
|
80
|
+
break;
|
|
81
|
+
case /* optional string short_name */ 4:
|
|
82
|
+
message.shortName = reader.string();
|
|
83
|
+
break;
|
|
84
|
+
case /* optional string color */ 5:
|
|
85
|
+
message.color = reader.string();
|
|
86
|
+
break;
|
|
87
|
+
case /* bool is_leader */ 6:
|
|
88
|
+
message.isLeader = reader.bool();
|
|
89
|
+
break;
|
|
90
|
+
default:
|
|
91
|
+
let u = options.readUnknownField;
|
|
92
|
+
if (u === "throw")
|
|
93
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
94
|
+
let d = reader.skip(wireType);
|
|
95
|
+
if (u !== false)
|
|
96
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return message;
|
|
100
|
+
}
|
|
101
|
+
internalBinaryWrite(message: GroupMemberShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
102
|
+
/* int64 id = 1; */
|
|
103
|
+
if (message.id !== 0)
|
|
104
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
105
|
+
/* string job = 2; */
|
|
106
|
+
if (message.job !== "")
|
|
107
|
+
writer.tag(2, WireType.LengthDelimited).string(message.job);
|
|
108
|
+
/* string name = 3; */
|
|
109
|
+
if (message.name !== "")
|
|
110
|
+
writer.tag(3, WireType.LengthDelimited).string(message.name);
|
|
111
|
+
/* optional string short_name = 4; */
|
|
112
|
+
if (message.shortName !== undefined)
|
|
113
|
+
writer.tag(4, WireType.LengthDelimited).string(message.shortName);
|
|
114
|
+
/* optional string color = 5; */
|
|
115
|
+
if (message.color !== undefined)
|
|
116
|
+
writer.tag(5, WireType.LengthDelimited).string(message.color);
|
|
117
|
+
/* bool is_leader = 6; */
|
|
118
|
+
if (message.isLeader !== false)
|
|
119
|
+
writer.tag(6, WireType.Varint).bool(message.isLeader);
|
|
120
|
+
let u = options.writeUnknownFields;
|
|
121
|
+
if (u !== false)
|
|
122
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
123
|
+
return writer;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* @generated MessageType for protobuf message resources.jobs.groups.short.GroupMemberShort
|
|
128
|
+
*/
|
|
129
|
+
export const GroupMemberShort = new GroupMemberShort$Type();
|
|
@@ -0,0 +1,116 @@
|
|
|
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/jobs/job_asset.proto" (package "resources.jobs", 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 { Timestamp } from "../timestamp/timestamp";
|
|
15
|
+
import { File } from "../file/file";
|
|
16
|
+
/**
|
|
17
|
+
* @generated from protobuf message resources.jobs.JobAsset
|
|
18
|
+
*/
|
|
19
|
+
export interface JobAsset {
|
|
20
|
+
/**
|
|
21
|
+
* @generated from protobuf field: int64 id = 1
|
|
22
|
+
*/
|
|
23
|
+
id: number;
|
|
24
|
+
/**
|
|
25
|
+
* @generated from protobuf field: resources.file.File file = 2
|
|
26
|
+
*/
|
|
27
|
+
file?: File;
|
|
28
|
+
/**
|
|
29
|
+
* @generated from protobuf field: optional int32 created_by_user_id = 3
|
|
30
|
+
*/
|
|
31
|
+
createdByUserId?: number;
|
|
32
|
+
/**
|
|
33
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 4
|
|
34
|
+
*/
|
|
35
|
+
createdAt?: Timestamp;
|
|
36
|
+
/**
|
|
37
|
+
* @generated from protobuf field: string display_name = 5
|
|
38
|
+
*/
|
|
39
|
+
displayName: string;
|
|
40
|
+
}
|
|
41
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
42
|
+
class JobAsset$Type extends MessageType<JobAsset> {
|
|
43
|
+
constructor() {
|
|
44
|
+
super("resources.jobs.JobAsset", [
|
|
45
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
46
|
+
{ no: 2, name: "file", kind: "message", T: () => File },
|
|
47
|
+
{ no: 3, name: "created_by_user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
48
|
+
{ no: 4, name: "created_at", kind: "message", T: () => Timestamp },
|
|
49
|
+
{ no: 5, name: "display_name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } }
|
|
50
|
+
]);
|
|
51
|
+
}
|
|
52
|
+
create(value?: PartialMessage<JobAsset>): JobAsset {
|
|
53
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
54
|
+
message.id = 0;
|
|
55
|
+
message.displayName = "";
|
|
56
|
+
if (value !== undefined)
|
|
57
|
+
reflectionMergePartial<JobAsset>(this, message, value);
|
|
58
|
+
return message;
|
|
59
|
+
}
|
|
60
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JobAsset): JobAsset {
|
|
61
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
62
|
+
while (reader.pos < end) {
|
|
63
|
+
let [fieldNo, wireType] = reader.tag();
|
|
64
|
+
switch (fieldNo) {
|
|
65
|
+
case /* int64 id */ 1:
|
|
66
|
+
message.id = reader.int64().toNumber();
|
|
67
|
+
break;
|
|
68
|
+
case /* resources.file.File file */ 2:
|
|
69
|
+
message.file = File.internalBinaryRead(reader, reader.uint32(), options, message.file);
|
|
70
|
+
break;
|
|
71
|
+
case /* optional int32 created_by_user_id */ 3:
|
|
72
|
+
message.createdByUserId = reader.int32();
|
|
73
|
+
break;
|
|
74
|
+
case /* resources.timestamp.Timestamp created_at */ 4:
|
|
75
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
76
|
+
break;
|
|
77
|
+
case /* string display_name */ 5:
|
|
78
|
+
message.displayName = reader.string();
|
|
79
|
+
break;
|
|
80
|
+
default:
|
|
81
|
+
let u = options.readUnknownField;
|
|
82
|
+
if (u === "throw")
|
|
83
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
84
|
+
let d = reader.skip(wireType);
|
|
85
|
+
if (u !== false)
|
|
86
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return message;
|
|
90
|
+
}
|
|
91
|
+
internalBinaryWrite(message: JobAsset, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
92
|
+
/* int64 id = 1; */
|
|
93
|
+
if (message.id !== 0)
|
|
94
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
95
|
+
/* resources.file.File file = 2; */
|
|
96
|
+
if (message.file)
|
|
97
|
+
File.internalBinaryWrite(message.file, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
98
|
+
/* optional int32 created_by_user_id = 3; */
|
|
99
|
+
if (message.createdByUserId !== undefined)
|
|
100
|
+
writer.tag(3, WireType.Varint).int32(message.createdByUserId);
|
|
101
|
+
/* resources.timestamp.Timestamp created_at = 4; */
|
|
102
|
+
if (message.createdAt)
|
|
103
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
104
|
+
/* string display_name = 5; */
|
|
105
|
+
if (message.displayName !== "")
|
|
106
|
+
writer.tag(5, WireType.LengthDelimited).string(message.displayName);
|
|
107
|
+
let u = options.writeUnknownFields;
|
|
108
|
+
if (u !== false)
|
|
109
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
110
|
+
return writer;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @generated MessageType for protobuf message resources.jobs.JobAsset
|
|
115
|
+
*/
|
|
116
|
+
export const JobAsset = new JobAsset$Type();
|