@fivenet-app/gen 2025.5.2 → 2025.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/buf/validate/validate.ts +11301 -0
- package/clients.ts +157 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +208 -0
- package/codegen/sanitizer/sanitizer.ts +80 -0
- package/google/protobuf/any.ts +4 -3
- package/google/protobuf/descriptor.ts +393 -239
- package/google/protobuf/duration.ts +4 -3
- package/google/protobuf/struct.ts +485 -0
- package/google/protobuf/timestamp.ts +4 -3
- package/package.json +3 -3
- package/perms.ts +85 -159
- package/resources/accounts/accounts.ts +26 -25
- package/resources/accounts/oauth2.ts +30 -29
- package/resources/audit/audit.ts +36 -35
- package/resources/calendar/access.ts +49 -48
- package/resources/calendar/calendar.ts +122 -126
- package/resources/centrum/access.ts +345 -0
- package/resources/centrum/attributes.ts +8 -11
- package/resources/centrum/dispatchers.ts +149 -0
- package/resources/centrum/dispatches.ts +252 -115
- package/resources/centrum/settings.ts +384 -34
- package/resources/centrum/units.ts +112 -92
- package/resources/centrum/units_access.ts +54 -55
- package/resources/clientconfig/clientconfig.ts +890 -0
- package/resources/collab/collab.ts +817 -0
- package/resources/common/content/content.ts +113 -30
- package/resources/common/cron/cron.ts +43 -31
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- package/resources/common/grpcws/grpcws.ts +24 -23
- package/resources/common/i18n.ts +20 -24
- package/resources/common/id_mapping.ts +69 -0
- package/resources/common/tests/objects.ts +4 -3
- package/resources/common/uuid.ts +4 -3
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/access.ts +52 -53
- package/resources/documents/activity.ts +235 -58
- package/resources/documents/category.ts +20 -27
- package/resources/documents/comment.ts +26 -25
- package/resources/documents/documents.ts +335 -262
- package/resources/documents/pins.ts +127 -0
- package/resources/documents/requests.ts +31 -30
- package/resources/documents/signoff.ts +55 -0
- package/resources/documents/state.ts +69 -0
- package/resources/documents/templates.ts +119 -136
- package/resources/documents/workflow.ts +35 -24
- package/resources/file/file.ts +152 -0
- package/{services/settings → resources/file}/filestore.ts +179 -165
- package/resources/file/meta.ts +148 -0
- package/resources/jobs/activity.ts +39 -42
- package/resources/jobs/colleagues.ts +67 -60
- package/resources/jobs/conduct.ts +29 -30
- package/resources/jobs/job_props.ts +46 -48
- package/resources/jobs/job_settings.ts +45 -52
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/labels.ts +21 -22
- package/resources/jobs/timeclock.ts +26 -25
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → marker_marker.ts} +43 -310
- package/resources/livemap/user_marker.ts +298 -0
- package/resources/mailer/access.ts +75 -74
- package/resources/mailer/email.ts +24 -27
- package/resources/mailer/events.ts +25 -24
- package/resources/mailer/message.ts +45 -50
- package/resources/mailer/settings.ts +12 -15
- package/resources/mailer/template.ts +25 -28
- package/resources/mailer/thread.ts +70 -71
- package/resources/notifications/client_view.ts +239 -0
- package/resources/notifications/events.ts +50 -101
- package/resources/notifications/notifications.ts +52 -57
- package/resources/permissions/attributes.ts +63 -206
- package/resources/permissions/events.ts +149 -0
- package/resources/permissions/permissions.ts +103 -34
- package/resources/qualifications/access.ts +27 -26
- package/resources/qualifications/exam.ts +188 -126
- package/resources/qualifications/qualifications.ts +370 -303
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +163 -79
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +3 -2
- package/resources/sync/activity.ts +24 -23
- package/resources/sync/data.ts +94 -26
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/user_info.ts +464 -0
- package/resources/users/activity.ts +80 -85
- package/resources/users/labels.ts +18 -21
- package/resources/users/licenses.ts +9 -8
- package/resources/users/props.ts +61 -51
- package/resources/users/users.ts +100 -78
- package/resources/vehicles/activity.ts +231 -0
- package/resources/vehicles/props.ts +103 -0
- package/resources/vehicles/vehicles.ts +28 -15
- package/resources/wiki/access.ts +49 -48
- package/resources/wiki/activity.ts +133 -51
- package/resources/wiki/page.ts +134 -87
- package/services/auth/auth.client.ts +24 -27
- package/services/auth/auth.ts +222 -195
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +110 -109
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +701 -298
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +183 -93
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +65 -44
- package/services/documents/collab.client.ts +46 -0
- package/services/documents/collab.ts +13 -0
- package/services/documents/documents.client.ts +88 -217
- package/services/documents/documents.ts +490 -508
- package/services/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +10 -25
- package/services/jobs/conduct.ts +36 -35
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +108 -91
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +47 -46
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +290 -119
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +213 -216
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +117 -74
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +181 -175
- package/services/settings/accounts.client.ts +10 -25
- package/services/settings/accounts.ts +64 -41
- package/services/settings/config.client.ts +6 -13
- package/services/settings/config.ts +8 -7
- package/services/settings/cron.client.ts +4 -7
- package/services/settings/cron.ts +4 -3
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +29 -28
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +190 -607
- package/services/settings/system.client.ts +90 -0
- package/services/settings/system.ts +618 -0
- package/services/stats/stats.client.ts +4 -3
- package/services/stats/stats.ts +4 -3
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +82 -52
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +169 -24
- package/services/wiki/collab.client.ts +46 -0
- package/services/wiki/collab.ts +13 -0
- package/services/wiki/wiki.client.ts +28 -37
- package/services/wiki/wiki.ts +93 -63
- package/svcs.ts +79 -103
- package/resources/centrum/disponents.ts +0 -81
- package/resources/filestore/file.ts +0 -204
- package/resources/internet/access.ts +0 -358
- package/resources/internet/ads.ts +0 -257
- package/resources/internet/domain.ts +0 -328
- package/resources/internet/page.ts +0 -428
- package/resources/internet/search.ts +0 -128
- package/resources/livemap/tracker.ts +0 -81
- package/services/internet/ads.client.ts +0 -41
- package/services/internet/ads.ts +0 -145
- package/services/internet/domain.client.ts +0 -109
- package/services/internet/domain.ts +0 -658
- package/services/internet/internet.client.ts +0 -58
- package/services/internet/internet.ts +0 -268
- package/services/notificator/notificator.client.ts +0 -76
- package/services/settings/filestore.client.ts +0 -75
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
2
|
// @generated from protobuf file "resources/common/content/content.proto" (package "resources.common.content", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
3
4
|
// @ts-nocheck
|
|
4
5
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
5
6
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
@@ -10,22 +11,21 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
10
11
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
11
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
+
import { Struct } from "../../../google/protobuf/struct";
|
|
13
15
|
/**
|
|
14
16
|
* @generated from protobuf message resources.common.content.Content
|
|
15
17
|
*/
|
|
16
18
|
export interface Content {
|
|
17
19
|
/**
|
|
18
|
-
* @generated from protobuf field: optional string version = 1
|
|
20
|
+
* @generated from protobuf field: optional string version = 1
|
|
19
21
|
*/
|
|
20
22
|
version?: string;
|
|
21
23
|
/**
|
|
22
|
-
* @generated from protobuf field: optional resources.common.content.JSONNode content = 2
|
|
24
|
+
* @generated from protobuf field: optional resources.common.content.JSONNode content = 2
|
|
23
25
|
*/
|
|
24
26
|
content?: JSONNode;
|
|
25
27
|
/**
|
|
26
|
-
* @
|
|
27
|
-
*
|
|
28
|
-
* @generated from protobuf field: optional string raw_content = 3;
|
|
28
|
+
* @generated from protobuf field: optional string raw_content = 3
|
|
29
29
|
*/
|
|
30
30
|
rawContent?: string;
|
|
31
31
|
}
|
|
@@ -34,40 +34,53 @@ export interface Content {
|
|
|
34
34
|
*/
|
|
35
35
|
export interface JSONNode {
|
|
36
36
|
/**
|
|
37
|
-
* @generated from protobuf field: resources.common.content.NodeType type = 1
|
|
37
|
+
* @generated from protobuf field: resources.common.content.NodeType type = 1
|
|
38
38
|
*/
|
|
39
39
|
type: NodeType;
|
|
40
40
|
/**
|
|
41
|
-
* @
|
|
42
|
-
*
|
|
43
|
-
* @generated from protobuf field: optional string id = 2;
|
|
41
|
+
* @generated from protobuf field: optional string id = 2
|
|
44
42
|
*/
|
|
45
43
|
id?: string;
|
|
46
44
|
/**
|
|
47
|
-
* @
|
|
48
|
-
*
|
|
49
|
-
* @generated from protobuf field: string tag = 3;
|
|
45
|
+
* @generated from protobuf field: string tag = 3
|
|
50
46
|
*/
|
|
51
47
|
tag: string;
|
|
52
48
|
/**
|
|
53
|
-
* @
|
|
54
|
-
*
|
|
55
|
-
* @generated from protobuf field: map<string, string> attrs = 4;
|
|
49
|
+
* @generated from protobuf field: map<string, string> attrs = 4
|
|
56
50
|
*/
|
|
57
51
|
attrs: {
|
|
58
52
|
[key: string]: string;
|
|
59
53
|
};
|
|
60
54
|
/**
|
|
61
|
-
* @
|
|
62
|
-
*
|
|
63
|
-
* @generated from protobuf field: optional string text = 5;
|
|
55
|
+
* @generated from protobuf field: optional string text = 5
|
|
64
56
|
*/
|
|
65
57
|
text?: string;
|
|
66
58
|
/**
|
|
67
|
-
* @generated from protobuf field: repeated resources.common.content.JSONNode content = 6
|
|
59
|
+
* @generated from protobuf field: repeated resources.common.content.JSONNode content = 6
|
|
68
60
|
*/
|
|
69
61
|
content: JSONNode[];
|
|
70
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* @generated from protobuf message resources.common.content.TiptapJSONDocument
|
|
65
|
+
*/
|
|
66
|
+
export interface TiptapJSONDocument {
|
|
67
|
+
/**
|
|
68
|
+
* @generated from protobuf field: google.protobuf.Struct json = 1
|
|
69
|
+
*/
|
|
70
|
+
json?: Struct;
|
|
71
|
+
/**
|
|
72
|
+
* @generated from protobuf field: string summary = 2
|
|
73
|
+
*/
|
|
74
|
+
summary: string;
|
|
75
|
+
/**
|
|
76
|
+
* @generated from protobuf field: uint32 word_count = 3
|
|
77
|
+
*/
|
|
78
|
+
wordCount: number;
|
|
79
|
+
/**
|
|
80
|
+
* @generated from protobuf field: string first_heading = 4
|
|
81
|
+
*/
|
|
82
|
+
firstHeading: string;
|
|
83
|
+
}
|
|
71
84
|
/**
|
|
72
85
|
* @generated from protobuf enum resources.common.content.ContentType
|
|
73
86
|
*/
|
|
@@ -81,9 +94,9 @@ export enum ContentType {
|
|
|
81
94
|
*/
|
|
82
95
|
HTML = 1,
|
|
83
96
|
/**
|
|
84
|
-
* @generated from protobuf enum value:
|
|
97
|
+
* @generated from protobuf enum value: CONTENT_TYPE_TIPTAP_JSON = 2;
|
|
85
98
|
*/
|
|
86
|
-
|
|
99
|
+
TIPTAP_JSON = 2
|
|
87
100
|
}
|
|
88
101
|
/**
|
|
89
102
|
* @generated from protobuf enum resources.common.content.NodeType
|
|
@@ -114,9 +127,9 @@ export enum NodeType {
|
|
|
114
127
|
class Content$Type extends MessageType<Content> {
|
|
115
128
|
constructor() {
|
|
116
129
|
super("resources.common.content.Content", [
|
|
117
|
-
{ no: 1, name: "version", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
130
|
+
{ no: 1, name: "version", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "24" } } } },
|
|
118
131
|
{ no: 2, name: "content", kind: "message", T: () => JSONNode },
|
|
119
|
-
{ no: 3, name: "raw_content", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
132
|
+
{ no: 3, name: "raw_content", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxBytes: "2000000" } }, "codegen.sanitizer.sanitizer": { enabled: true } } }
|
|
120
133
|
]);
|
|
121
134
|
}
|
|
122
135
|
create(value?: PartialMessage<Content>): Content {
|
|
@@ -174,11 +187,11 @@ export const Content = new Content$Type();
|
|
|
174
187
|
class JSONNode$Type extends MessageType<JSONNode> {
|
|
175
188
|
constructor() {
|
|
176
189
|
super("resources.common.content.JSONNode", [
|
|
177
|
-
{ no: 1, name: "type", kind: "enum", T: () => ["resources.common.content.NodeType", NodeType, "NODE_TYPE_"], options: { "validate.
|
|
178
|
-
{ no: 2, name: "id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING
|
|
179
|
-
{ no: 3, name: "tag", kind: "scalar", T: 9 /*ScalarType.STRING
|
|
180
|
-
{ no: 4, name: "attrs", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } },
|
|
181
|
-
{ no: 5, name: "text", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING
|
|
190
|
+
{ no: 1, name: "type", kind: "enum", T: () => ["resources.common.content.NodeType", NodeType, "NODE_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
191
|
+
{ no: 2, name: "id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
192
|
+
{ no: 3, name: "tag", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
193
|
+
{ no: 4, name: "attrs", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ }, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
194
|
+
{ no: 5, name: "text", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
182
195
|
{ no: 6, name: "content", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => JSONNode }
|
|
183
196
|
]);
|
|
184
197
|
}
|
|
@@ -237,7 +250,7 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
237
250
|
case 2:
|
|
238
251
|
val = reader.string();
|
|
239
252
|
break;
|
|
240
|
-
default: throw new globalThis.Error("unknown map entry field for
|
|
253
|
+
default: throw new globalThis.Error("unknown map entry field for resources.common.content.JSONNode.attrs");
|
|
241
254
|
}
|
|
242
255
|
}
|
|
243
256
|
map[key ?? ""] = val ?? "";
|
|
@@ -271,3 +284,73 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
271
284
|
* @generated MessageType for protobuf message resources.common.content.JSONNode
|
|
272
285
|
*/
|
|
273
286
|
export const JSONNode = new JSONNode$Type();
|
|
287
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
288
|
+
class TiptapJSONDocument$Type extends MessageType<TiptapJSONDocument> {
|
|
289
|
+
constructor() {
|
|
290
|
+
super("resources.common.content.TiptapJSONDocument", [
|
|
291
|
+
{ no: 1, name: "json", kind: "message", T: () => Struct },
|
|
292
|
+
{ no: 2, name: "summary", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
293
|
+
{ no: 3, name: "word_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
294
|
+
{ no: 4, name: "first_heading", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } }
|
|
295
|
+
]);
|
|
296
|
+
}
|
|
297
|
+
create(value?: PartialMessage<TiptapJSONDocument>): TiptapJSONDocument {
|
|
298
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
299
|
+
message.summary = "";
|
|
300
|
+
message.wordCount = 0;
|
|
301
|
+
message.firstHeading = "";
|
|
302
|
+
if (value !== undefined)
|
|
303
|
+
reflectionMergePartial<TiptapJSONDocument>(this, message, value);
|
|
304
|
+
return message;
|
|
305
|
+
}
|
|
306
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TiptapJSONDocument): TiptapJSONDocument {
|
|
307
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
308
|
+
while (reader.pos < end) {
|
|
309
|
+
let [fieldNo, wireType] = reader.tag();
|
|
310
|
+
switch (fieldNo) {
|
|
311
|
+
case /* google.protobuf.Struct json */ 1:
|
|
312
|
+
message.json = Struct.internalBinaryRead(reader, reader.uint32(), options, message.json);
|
|
313
|
+
break;
|
|
314
|
+
case /* string summary */ 2:
|
|
315
|
+
message.summary = reader.string();
|
|
316
|
+
break;
|
|
317
|
+
case /* uint32 word_count */ 3:
|
|
318
|
+
message.wordCount = reader.uint32();
|
|
319
|
+
break;
|
|
320
|
+
case /* string first_heading */ 4:
|
|
321
|
+
message.firstHeading = reader.string();
|
|
322
|
+
break;
|
|
323
|
+
default:
|
|
324
|
+
let u = options.readUnknownField;
|
|
325
|
+
if (u === "throw")
|
|
326
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
327
|
+
let d = reader.skip(wireType);
|
|
328
|
+
if (u !== false)
|
|
329
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
return message;
|
|
333
|
+
}
|
|
334
|
+
internalBinaryWrite(message: TiptapJSONDocument, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
335
|
+
/* google.protobuf.Struct json = 1; */
|
|
336
|
+
if (message.json)
|
|
337
|
+
Struct.internalBinaryWrite(message.json, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
338
|
+
/* string summary = 2; */
|
|
339
|
+
if (message.summary !== "")
|
|
340
|
+
writer.tag(2, WireType.LengthDelimited).string(message.summary);
|
|
341
|
+
/* uint32 word_count = 3; */
|
|
342
|
+
if (message.wordCount !== 0)
|
|
343
|
+
writer.tag(3, WireType.Varint).uint32(message.wordCount);
|
|
344
|
+
/* string first_heading = 4; */
|
|
345
|
+
if (message.firstHeading !== "")
|
|
346
|
+
writer.tag(4, WireType.LengthDelimited).string(message.firstHeading);
|
|
347
|
+
let u = options.writeUnknownFields;
|
|
348
|
+
if (u !== false)
|
|
349
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
350
|
+
return writer;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* @generated MessageType for protobuf message resources.common.content.TiptapJSONDocument
|
|
355
|
+
*/
|
|
356
|
+
export const TiptapJSONDocument = new TiptapJSONDocument$Type();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
2
|
// @generated from protobuf file "resources/common/cron/cron.proto" (package "resources.common.cron", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
3
4
|
// @ts-nocheck
|
|
4
5
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
5
6
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
@@ -20,7 +21,7 @@ export interface Cronjob {
|
|
|
20
21
|
/**
|
|
21
22
|
* Cronjob name
|
|
22
23
|
*
|
|
23
|
-
* @generated from protobuf field: string name = 1
|
|
24
|
+
* @generated from protobuf field: string name = 1
|
|
24
25
|
*/
|
|
25
26
|
name: string;
|
|
26
27
|
/**
|
|
@@ -30,49 +31,49 @@ export interface Cronjob {
|
|
|
30
31
|
*
|
|
31
32
|
* To generate Cronjob schedule expressions, you can also use web tools like https://crontab.guru/.
|
|
32
33
|
*
|
|
33
|
-
* @generated from protobuf field: string schedule = 2
|
|
34
|
+
* @generated from protobuf field: string schedule = 2
|
|
34
35
|
*/
|
|
35
36
|
schedule: string;
|
|
36
37
|
/**
|
|
37
38
|
* Cronjob state
|
|
38
39
|
*
|
|
39
|
-
* @generated from protobuf field: resources.common.cron.CronjobState state = 3
|
|
40
|
+
* @generated from protobuf field: resources.common.cron.CronjobState state = 3
|
|
40
41
|
*/
|
|
41
42
|
state: CronjobState;
|
|
42
43
|
/**
|
|
43
44
|
* Next time the cronjob should be run
|
|
44
45
|
*
|
|
45
|
-
* @generated from protobuf field: resources.timestamp.Timestamp next_schedule_time = 4
|
|
46
|
+
* @generated from protobuf field: resources.timestamp.Timestamp next_schedule_time = 4
|
|
46
47
|
*/
|
|
47
48
|
nextScheduleTime?: Timestamp;
|
|
48
49
|
/**
|
|
49
50
|
* Last attempted start time of Cronjob
|
|
50
51
|
*
|
|
51
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp last_attempt_time = 5
|
|
52
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp last_attempt_time = 5
|
|
52
53
|
*/
|
|
53
54
|
lastAttemptTime?: Timestamp;
|
|
54
55
|
/**
|
|
55
56
|
* Time current cronjob was started
|
|
56
57
|
*
|
|
57
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp started_time = 6
|
|
58
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp started_time = 6
|
|
58
59
|
*/
|
|
59
60
|
startedTime?: Timestamp;
|
|
60
61
|
/**
|
|
61
62
|
* Optional timeout for cronjob execution
|
|
62
63
|
*
|
|
63
|
-
* @generated from protobuf field: optional google.protobuf.Duration timeout = 7
|
|
64
|
+
* @generated from protobuf field: optional google.protobuf.Duration timeout = 7
|
|
64
65
|
*/
|
|
65
66
|
timeout?: Duration;
|
|
66
67
|
/**
|
|
67
68
|
* Cronjob data
|
|
68
69
|
*
|
|
69
|
-
* @generated from protobuf field: resources.common.cron.CronjobData data = 8
|
|
70
|
+
* @generated from protobuf field: resources.common.cron.CronjobData data = 8
|
|
70
71
|
*/
|
|
71
72
|
data?: CronjobData;
|
|
72
73
|
/**
|
|
73
74
|
* Last event info to ease debugging and tracking
|
|
74
75
|
*
|
|
75
|
-
* @generated from protobuf field: optional resources.common.cron.CronjobCompletedEvent last_completed_event = 9
|
|
76
|
+
* @generated from protobuf field: optional resources.common.cron.CronjobCompletedEvent last_completed_event = 9
|
|
76
77
|
*/
|
|
77
78
|
lastCompletedEvent?: CronjobCompletedEvent;
|
|
78
79
|
}
|
|
@@ -81,11 +82,11 @@ export interface Cronjob {
|
|
|
81
82
|
*/
|
|
82
83
|
export interface CronjobData {
|
|
83
84
|
/**
|
|
84
|
-
* @generated from protobuf field: resources.timestamp.Timestamp updated_at = 1
|
|
85
|
+
* @generated from protobuf field: resources.timestamp.Timestamp updated_at = 1
|
|
85
86
|
*/
|
|
86
87
|
updatedAt?: Timestamp;
|
|
87
88
|
/**
|
|
88
|
-
* @generated from protobuf field: optional google.protobuf.Any data = 2
|
|
89
|
+
* @generated from protobuf field: optional google.protobuf.Any data = 2
|
|
89
90
|
*/
|
|
90
91
|
data?: Any;
|
|
91
92
|
}
|
|
@@ -96,11 +97,11 @@ export interface CronjobLockOwnerState {
|
|
|
96
97
|
/**
|
|
97
98
|
* Hostname of the agent the cronjob is running on
|
|
98
99
|
*
|
|
99
|
-
* @generated from protobuf field: string hostname = 1
|
|
100
|
+
* @generated from protobuf field: string hostname = 1
|
|
100
101
|
*/
|
|
101
102
|
hostname: string;
|
|
102
103
|
/**
|
|
103
|
-
* @generated from protobuf field: resources.timestamp.Timestamp updated_at = 2
|
|
104
|
+
* @generated from protobuf field: resources.timestamp.Timestamp updated_at = 2
|
|
104
105
|
*/
|
|
105
106
|
updatedAt?: Timestamp;
|
|
106
107
|
}
|
|
@@ -111,7 +112,7 @@ export interface CronjobSchedulerEvent {
|
|
|
111
112
|
/**
|
|
112
113
|
* Full Cronjob spec
|
|
113
114
|
*
|
|
114
|
-
* @generated from protobuf field: resources.common.cron.Cronjob cronjob = 1
|
|
115
|
+
* @generated from protobuf field: resources.common.cron.Cronjob cronjob = 1
|
|
115
116
|
*/
|
|
116
117
|
cronjob?: Cronjob;
|
|
117
118
|
}
|
|
@@ -122,54 +123,58 @@ export interface CronjobCompletedEvent {
|
|
|
122
123
|
/**
|
|
123
124
|
* Cronjob name
|
|
124
125
|
*
|
|
125
|
-
* @generated from protobuf field: string name = 1
|
|
126
|
+
* @generated from protobuf field: string name = 1
|
|
126
127
|
*/
|
|
127
128
|
name: string;
|
|
128
129
|
/**
|
|
129
130
|
* Cronjob execution success status
|
|
130
131
|
*
|
|
131
|
-
* @generated from protobuf field: bool success = 2
|
|
132
|
+
* @generated from protobuf field: bool success = 2
|
|
132
133
|
*/
|
|
133
134
|
success: boolean;
|
|
134
135
|
/**
|
|
135
136
|
* Cronjob execution was cancelled
|
|
136
137
|
*
|
|
137
|
-
* @generated from protobuf field: bool cancelled = 7
|
|
138
|
+
* @generated from protobuf field: bool cancelled = 7
|
|
138
139
|
*/
|
|
139
140
|
cancelled: boolean;
|
|
140
141
|
/**
|
|
141
142
|
* Cronjob end time
|
|
142
143
|
*
|
|
143
|
-
* @generated from protobuf field: resources.timestamp.Timestamp
|
|
144
|
+
* @generated from protobuf field: resources.timestamp.Timestamp end_date = 3
|
|
144
145
|
*/
|
|
145
146
|
endDate?: Timestamp;
|
|
146
147
|
/**
|
|
147
148
|
* Cronjob execution time/elapsed time
|
|
148
149
|
*
|
|
149
|
-
* @generated from protobuf field: google.protobuf.Duration elapsed = 4
|
|
150
|
+
* @generated from protobuf field: google.protobuf.Duration elapsed = 4
|
|
150
151
|
*/
|
|
151
152
|
elapsed?: Duration;
|
|
152
153
|
/**
|
|
153
154
|
* Cronjob data (can be empty if not touched by the Cronjob handler)
|
|
154
155
|
*
|
|
155
|
-
* @generated from protobuf field: optional resources.common.cron.CronjobData data = 5
|
|
156
|
+
* @generated from protobuf field: optional resources.common.cron.CronjobData data = 5
|
|
156
157
|
*/
|
|
157
158
|
data?: CronjobData;
|
|
158
159
|
/**
|
|
159
160
|
* Name of the node where the cronjob was executed
|
|
160
161
|
*
|
|
161
|
-
* @generated from protobuf field: string node_name = 6
|
|
162
|
+
* @generated from protobuf field: string node_name = 6
|
|
162
163
|
*/
|
|
163
164
|
nodeName: string;
|
|
165
|
+
/**
|
|
166
|
+
* Error message (if success = false)
|
|
167
|
+
*
|
|
168
|
+
* @generated from protobuf field: optional string error_message = 8
|
|
169
|
+
*/
|
|
170
|
+
errorMessage?: string;
|
|
164
171
|
}
|
|
165
172
|
/**
|
|
166
173
|
* @generated from protobuf message resources.common.cron.GenericCronData
|
|
167
174
|
*/
|
|
168
175
|
export interface GenericCronData {
|
|
169
176
|
/**
|
|
170
|
-
* @
|
|
171
|
-
*
|
|
172
|
-
* @generated from protobuf field: map<string, string> attributes = 1;
|
|
177
|
+
* @generated from protobuf field: map<string, string> attributes = 1
|
|
173
178
|
*/
|
|
174
179
|
attributes: {
|
|
175
180
|
[key: string]: string;
|
|
@@ -463,10 +468,11 @@ class CronjobCompletedEvent$Type extends MessageType<CronjobCompletedEvent> {
|
|
|
463
468
|
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
464
469
|
{ no: 2, name: "success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
465
470
|
{ no: 7, name: "cancelled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
466
|
-
{ no: 3, name: "
|
|
471
|
+
{ no: 3, name: "end_date", kind: "message", T: () => Timestamp },
|
|
467
472
|
{ no: 4, name: "elapsed", kind: "message", T: () => Duration },
|
|
468
473
|
{ no: 5, name: "data", kind: "message", T: () => CronjobData },
|
|
469
|
-
{ no: 6, name: "node_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
474
|
+
{ no: 6, name: "node_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
475
|
+
{ no: 8, name: "error_message", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
|
|
470
476
|
]);
|
|
471
477
|
}
|
|
472
478
|
create(value?: PartialMessage<CronjobCompletedEvent>): CronjobCompletedEvent {
|
|
@@ -493,7 +499,7 @@ class CronjobCompletedEvent$Type extends MessageType<CronjobCompletedEvent> {
|
|
|
493
499
|
case /* bool cancelled */ 7:
|
|
494
500
|
message.cancelled = reader.bool();
|
|
495
501
|
break;
|
|
496
|
-
case /* resources.timestamp.Timestamp
|
|
502
|
+
case /* resources.timestamp.Timestamp end_date */ 3:
|
|
497
503
|
message.endDate = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.endDate);
|
|
498
504
|
break;
|
|
499
505
|
case /* google.protobuf.Duration elapsed */ 4:
|
|
@@ -505,6 +511,9 @@ class CronjobCompletedEvent$Type extends MessageType<CronjobCompletedEvent> {
|
|
|
505
511
|
case /* string node_name */ 6:
|
|
506
512
|
message.nodeName = reader.string();
|
|
507
513
|
break;
|
|
514
|
+
case /* optional string error_message */ 8:
|
|
515
|
+
message.errorMessage = reader.string();
|
|
516
|
+
break;
|
|
508
517
|
default:
|
|
509
518
|
let u = options.readUnknownField;
|
|
510
519
|
if (u === "throw")
|
|
@@ -523,7 +532,7 @@ class CronjobCompletedEvent$Type extends MessageType<CronjobCompletedEvent> {
|
|
|
523
532
|
/* bool success = 2; */
|
|
524
533
|
if (message.success !== false)
|
|
525
534
|
writer.tag(2, WireType.Varint).bool(message.success);
|
|
526
|
-
/* resources.timestamp.Timestamp
|
|
535
|
+
/* resources.timestamp.Timestamp end_date = 3; */
|
|
527
536
|
if (message.endDate)
|
|
528
537
|
Timestamp.internalBinaryWrite(message.endDate, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
529
538
|
/* google.protobuf.Duration elapsed = 4; */
|
|
@@ -538,6 +547,9 @@ class CronjobCompletedEvent$Type extends MessageType<CronjobCompletedEvent> {
|
|
|
538
547
|
/* bool cancelled = 7; */
|
|
539
548
|
if (message.cancelled !== false)
|
|
540
549
|
writer.tag(7, WireType.Varint).bool(message.cancelled);
|
|
550
|
+
/* optional string error_message = 8; */
|
|
551
|
+
if (message.errorMessage !== undefined)
|
|
552
|
+
writer.tag(8, WireType.LengthDelimited).string(message.errorMessage);
|
|
541
553
|
let u = options.writeUnknownFields;
|
|
542
554
|
if (u !== false)
|
|
543
555
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -552,7 +564,7 @@ export const CronjobCompletedEvent = new CronjobCompletedEvent$Type();
|
|
|
552
564
|
class GenericCronData$Type extends MessageType<GenericCronData> {
|
|
553
565
|
constructor() {
|
|
554
566
|
super("resources.common.cron.GenericCronData", [
|
|
555
|
-
{ no: 1, name: "attributes", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }
|
|
567
|
+
{ no: 1, name: "attributes", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ }, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } }
|
|
556
568
|
]);
|
|
557
569
|
}
|
|
558
570
|
create(value?: PartialMessage<GenericCronData>): GenericCronData {
|
|
@@ -592,7 +604,7 @@ class GenericCronData$Type extends MessageType<GenericCronData> {
|
|
|
592
604
|
case 2:
|
|
593
605
|
val = reader.string();
|
|
594
606
|
break;
|
|
595
|
-
default: throw new globalThis.Error("unknown map entry field for
|
|
607
|
+
default: throw new globalThis.Error("unknown map entry field for resources.common.cron.GenericCronData.attributes");
|
|
596
608
|
}
|
|
597
609
|
}
|
|
598
610
|
map[key ?? ""] = val ?? "";
|