@fivenet-app/gen 2025.9.1 → 2026.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/clients.ts +36 -0
- package/codegen/perms/perms.ts +186 -15
- package/codegen/sanitizer/sanitizer.ts +34 -1
- package/package.json +2 -2
- package/perms.ts +140 -8
- package/resources/accounts/accounts.ts +98 -31
- package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +20 -20
- package/resources/audit/audit.ts +156 -38
- package/resources/calendar/{access.ts → access/access.ts} +30 -30
- package/resources/calendar/calendar.ts +17 -477
- package/resources/calendar/entries/entries.ts +474 -0
- package/resources/centrum/{access.ts → access/access.ts} +22 -22
- package/resources/centrum/{dispatchers.ts → dispatchers/dispatchers.ts} +14 -14
- package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +151 -185
- package/resources/centrum/joblist.ts +136 -0
- package/resources/centrum/{settings.ts → settings/settings.ts} +70 -70
- package/resources/centrum/{units_access.ts → units/access/access.ts} +30 -30
- package/resources/centrum/{units.ts → units/units.ts} +131 -51
- package/resources/citizens/labels/labels.ts +526 -0
- package/resources/{users → citizens/licenses}/licenses.ts +17 -17
- package/resources/clientconfig/clientconfig.ts +126 -258
- package/resources/collab/collab.ts +4 -16
- package/resources/common/content/content.ts +108 -85
- package/resources/common/content/diff_activity.ts +267 -0
- package/resources/common/i18n.ts +2 -2
- package/resources/{common/cron → cron}/cron.ts +43 -43
- package/resources/documents/{access.ts → access/access.ts} +29 -52
- package/resources/documents/{activity.ts → activity/activity.ts} +171 -123
- package/resources/documents/approval/approval.ts +945 -0
- package/resources/documents/{category.ts → category/category.ts} +7 -7
- package/resources/documents/{comment.ts → comment/comment.ts} +10 -10
- package/resources/documents/data/data.ts +303 -0
- package/resources/documents/documents.ts +282 -667
- package/resources/{common/uuid.ts → documents/forms/forms.ts} +20 -20
- package/resources/documents/{pins.ts → pins/pins.ts} +5 -5
- package/resources/documents/references/references.ts +187 -0
- package/resources/documents/relations/relations.ts +184 -0
- package/resources/documents/{requests.ts → requests/requests.ts} +18 -18
- package/resources/documents/stamps/stamp.ts +355 -0
- package/resources/documents/{templates.ts → templates/templates.ts} +426 -84
- package/resources/documents/{workflow.ts → workflow/workflow.ts} +264 -26
- package/resources/file/filestore.ts +1 -1
- package/resources/{common/grpcws → grpcws}/grpcws.ts +52 -52
- package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +54 -54
- package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +17 -28
- package/resources/jobs/{conduct.ts → conduct/conduct.ts} +70 -45
- package/resources/jobs/{labels.ts → labels/labels.ts} +34 -23
- package/resources/jobs/{job_props.ts → props/props.ts} +26 -38
- package/resources/jobs/{job_settings.ts → settings/settings.ts} +53 -53
- package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +17 -17
- package/resources/livemap/{heatmap.ts → heatmap/heatmap.ts} +4 -4
- package/resources/livemap/{marker_marker.ts → markers/marker_marker.ts} +35 -35
- package/resources/livemap/{user_marker.ts → markers/user_marker.ts} +115 -36
- package/resources/mailer/{access.ts → access/access.ts} +67 -67
- package/resources/mailer/{email.ts → emails/email.ts} +19 -19
- package/resources/mailer/{events.ts → events/events.ts} +24 -24
- package/resources/mailer/{message.ts → messages/message.ts} +29 -29
- package/resources/mailer/{settings.ts → settings/settings.ts} +14 -13
- package/resources/mailer/{template.ts → templates/template.ts} +15 -15
- package/resources/mailer/{thread.ts → threads/thread.ts} +29 -29
- package/resources/notifications/{client_view.ts → clientview/clientview.ts} +22 -22
- package/resources/notifications/{events.ts → events/events.ts} +20 -20
- package/resources/notifications/notifications.ts +4 -4
- package/resources/permissions/{attributes.ts → attributes/attributes.ts} +42 -42
- package/resources/permissions/{events.ts → events/events.ts} +7 -7
- package/resources/permissions/{permissions.ts → permissions/permissions.ts} +30 -19
- package/resources/qualifications/{access.ts → access/access.ts} +19 -19
- package/resources/qualifications/{exam.ts → exam/exam.ts} +269 -141
- package/resources/qualifications/qualifications.ts +51 -179
- package/resources/settings/banner.ts +3 -3
- package/resources/settings/config.ts +527 -25
- package/resources/{documents/state.ts → settings/data.ts} +41 -20
- package/resources/settings/perms.ts +14 -14
- package/resources/stats/stats.ts +379 -0
- package/resources/sync/{activity.ts → activity/activity.ts} +104 -25
- package/resources/sync/{data.ts → data/data.ts} +405 -59
- package/resources/userinfo/{user_info.ts → userinfo.ts} +71 -93
- package/resources/users/{activity.ts → activity/activity.ts} +242 -101
- package/resources/users/{props.ts → props/props.ts} +91 -69
- package/resources/users/short/user.ts +184 -0
- package/resources/users/{users.ts → user.ts} +266 -195
- package/resources/vehicles/{activity.ts → activity/activity.ts} +20 -20
- package/resources/vehicles/{props.ts → props/props.ts} +28 -6
- package/resources/vehicles/vehicles.ts +20 -8
- package/resources/wiki/{access.ts → access/access.ts} +30 -30
- package/resources/wiki/{activity.ts → activity/activity.ts} +104 -70
- package/resources/wiki/page.ts +39 -15
- package/services/auth/auth.client.ts +23 -10
- package/services/auth/auth.ts +445 -262
- package/services/calendar/calendar.ts +56 -34
- package/services/centrum/centrum.ts +127 -127
- package/services/citizens/citizens.client.ts +0 -13
- package/services/citizens/citizens.ts +44 -134
- package/services/citizens/labels.client.ts +77 -0
- package/services/citizens/labels.ts +455 -0
- package/services/completor/completor.ts +36 -16
- package/services/documents/approval.client.ts +188 -0
- package/services/documents/approval.ts +1776 -0
- package/services/documents/documents.ts +164 -186
- package/services/documents/forms.client.ts +51 -0
- package/services/documents/forms.ts +232 -0
- package/services/documents/stamps.client.ts +77 -0
- package/services/documents/stamps.ts +481 -0
- package/services/documents/stats.client.ts +38 -0
- package/services/documents/stats.ts +245 -0
- package/services/jobs/conduct.client.ts +30 -3
- package/services/jobs/conduct.ts +159 -33
- package/services/jobs/jobs.ts +43 -43
- package/services/jobs/stats.client.ts +38 -0
- package/services/jobs/stats.ts +207 -0
- package/services/jobs/timeclock.ts +39 -39
- package/services/livemap/livemap.ts +18 -18
- package/services/mailer/mailer.ts +78 -78
- package/services/notifications/notifications.ts +35 -35
- package/services/qualifications/qualifications.ts +81 -46
- package/services/settings/accounts.client.ts +23 -10
- package/services/settings/accounts.ts +191 -30
- package/services/settings/cron.client.ts +13 -0
- package/services/settings/cron.ts +118 -5
- package/services/settings/laws.ts +1 -1
- package/services/settings/settings.ts +73 -52
- package/services/settings/system.client.ts +13 -0
- package/services/settings/system.ts +115 -15
- package/services/stats/stats.client.ts +7 -7
- package/services/stats/stats.ts +24 -24
- package/services/sync/sync.client.ts +271 -37
- package/services/sync/sync.ts +1525 -421
- package/services/vehicles/vehicles.ts +8 -8
- package/services/wiki/wiki.ts +8 -8
- package/svcs.ts +100 -6
- package/resources/centrum/attributes.ts +0 -183
- package/resources/documents/signoff.ts +0 -55
- package/resources/users/labels.ts +0 -160
|
@@ -159,10 +159,6 @@ export interface CollabHandshake {
|
|
|
159
159
|
* @generated from protobuf field: uint64 client_id = 1
|
|
160
160
|
*/
|
|
161
161
|
clientId: number;
|
|
162
|
-
/**
|
|
163
|
-
* @generated from protobuf field: bool first = 2
|
|
164
|
-
*/
|
|
165
|
-
first: boolean;
|
|
166
162
|
}
|
|
167
163
|
/**
|
|
168
164
|
* @generated from protobuf message resources.collab.TargetSaved
|
|
@@ -344,7 +340,7 @@ class SyncStep$Type extends MessageType<SyncStep> {
|
|
|
344
340
|
constructor() {
|
|
345
341
|
super("resources.collab.SyncStep", [
|
|
346
342
|
{ no: 1, name: "step", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { in: [1, 2] } } } },
|
|
347
|
-
{ no: 2, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES
|
|
343
|
+
{ no: 2, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/, options: { "codegen.audit.redacted": true } },
|
|
348
344
|
{ no: 3, name: "receiver_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { uint64: { gt: "0" } } } }
|
|
349
345
|
]);
|
|
350
346
|
}
|
|
@@ -405,7 +401,7 @@ export const SyncStep = new SyncStep$Type();
|
|
|
405
401
|
class YjsUpdate$Type extends MessageType<YjsUpdate> {
|
|
406
402
|
constructor() {
|
|
407
403
|
super("resources.collab.YjsUpdate", [
|
|
408
|
-
{ no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES
|
|
404
|
+
{ no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/, options: { "codegen.audit.redacted": true } }
|
|
409
405
|
]);
|
|
410
406
|
}
|
|
411
407
|
create(value?: PartialMessage<YjsUpdate>): YjsUpdate {
|
|
@@ -452,7 +448,7 @@ export const YjsUpdate = new YjsUpdate$Type();
|
|
|
452
448
|
class AwarenessPing$Type extends MessageType<AwarenessPing> {
|
|
453
449
|
constructor() {
|
|
454
450
|
super("resources.collab.AwarenessPing", [
|
|
455
|
-
{ no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES
|
|
451
|
+
{ no: 1, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/, options: { "codegen.audit.redacted": true } }
|
|
456
452
|
]);
|
|
457
453
|
}
|
|
458
454
|
create(value?: PartialMessage<AwarenessPing>): AwarenessPing {
|
|
@@ -617,14 +613,12 @@ export const ServerPacket = new ServerPacket$Type();
|
|
|
617
613
|
class CollabHandshake$Type extends MessageType<CollabHandshake> {
|
|
618
614
|
constructor() {
|
|
619
615
|
super("resources.collab.CollabHandshake", [
|
|
620
|
-
{ no: 1, name: "client_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
621
|
-
{ no: 2, name: "first", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
616
|
+
{ no: 1, name: "client_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ }
|
|
622
617
|
]);
|
|
623
618
|
}
|
|
624
619
|
create(value?: PartialMessage<CollabHandshake>): CollabHandshake {
|
|
625
620
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
626
621
|
message.clientId = 0;
|
|
627
|
-
message.first = false;
|
|
628
622
|
if (value !== undefined)
|
|
629
623
|
reflectionMergePartial<CollabHandshake>(this, message, value);
|
|
630
624
|
return message;
|
|
@@ -637,9 +631,6 @@ class CollabHandshake$Type extends MessageType<CollabHandshake> {
|
|
|
637
631
|
case /* uint64 client_id */ 1:
|
|
638
632
|
message.clientId = reader.uint64().toNumber();
|
|
639
633
|
break;
|
|
640
|
-
case /* bool first */ 2:
|
|
641
|
-
message.first = reader.bool();
|
|
642
|
-
break;
|
|
643
634
|
default:
|
|
644
635
|
let u = options.readUnknownField;
|
|
645
636
|
if (u === "throw")
|
|
@@ -655,9 +646,6 @@ class CollabHandshake$Type extends MessageType<CollabHandshake> {
|
|
|
655
646
|
/* uint64 client_id = 1; */
|
|
656
647
|
if (message.clientId !== 0)
|
|
657
648
|
writer.tag(1, WireType.Varint).uint64(message.clientId);
|
|
658
|
-
/* bool first = 2; */
|
|
659
|
-
if (message.first !== false)
|
|
660
|
-
writer.tag(2, WireType.Varint).bool(message.first);
|
|
661
649
|
let u = options.writeUnknownFields;
|
|
662
650
|
if (u !== false)
|
|
663
651
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -17,22 +17,36 @@ import { Struct } from "../../../google/protobuf/struct";
|
|
|
17
17
|
*/
|
|
18
18
|
export interface Content {
|
|
19
19
|
/**
|
|
20
|
-
* @generated from protobuf field:
|
|
20
|
+
* @generated from protobuf field: string version = 1
|
|
21
21
|
*/
|
|
22
|
-
version
|
|
22
|
+
version: string;
|
|
23
23
|
/**
|
|
24
|
-
* @generated from protobuf field:
|
|
24
|
+
* @generated from protobuf field: resources.common.content.ContentType content_type = 2
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
contentType: ContentType;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Deprecated: Legacy HTML (only for viewing old content)
|
|
29
|
+
*
|
|
30
|
+
* @generated from protobuf field: optional string raw_html = 3
|
|
29
31
|
*/
|
|
30
|
-
|
|
32
|
+
rawHtml?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Deprecated: Legacy custom HTML to JSON AST (only for viewing old content)
|
|
35
|
+
*
|
|
36
|
+
* @generated from protobuf field: optional resources.common.content.RichTextHtmlNode content = 4
|
|
37
|
+
*/
|
|
38
|
+
content?: RichTextHtmlNode;
|
|
39
|
+
/**
|
|
40
|
+
* Tiptap JSON Document
|
|
41
|
+
*
|
|
42
|
+
* @generated from protobuf field: google.protobuf.Struct tiptap_json = 5
|
|
43
|
+
*/
|
|
44
|
+
tiptapJson?: Struct;
|
|
31
45
|
}
|
|
32
46
|
/**
|
|
33
|
-
* @generated from protobuf message resources.common.content.
|
|
47
|
+
* @generated from protobuf message resources.common.content.RichTextHtmlNode
|
|
34
48
|
*/
|
|
35
|
-
export interface
|
|
49
|
+
export interface RichTextHtmlNode {
|
|
36
50
|
/**
|
|
37
51
|
* @generated from protobuf field: resources.common.content.NodeType type = 1
|
|
38
52
|
*/
|
|
@@ -56,28 +70,24 @@ export interface JSONNode {
|
|
|
56
70
|
*/
|
|
57
71
|
text?: string;
|
|
58
72
|
/**
|
|
59
|
-
* @generated from protobuf field: repeated resources.common.content.
|
|
73
|
+
* @generated from protobuf field: repeated resources.common.content.RichTextHtmlNode content = 6
|
|
60
74
|
*/
|
|
61
|
-
content:
|
|
75
|
+
content: RichTextHtmlNode[];
|
|
62
76
|
}
|
|
63
77
|
/**
|
|
64
|
-
* @generated from protobuf message resources.common.content.
|
|
78
|
+
* @generated from protobuf message resources.common.content.ExtractedContent
|
|
65
79
|
*/
|
|
66
|
-
export interface
|
|
67
|
-
/**
|
|
68
|
-
* @generated from protobuf field: google.protobuf.Struct json = 1
|
|
69
|
-
*/
|
|
70
|
-
json?: Struct;
|
|
80
|
+
export interface ExtractedContent {
|
|
71
81
|
/**
|
|
72
|
-
* @generated from protobuf field: string
|
|
82
|
+
* @generated from protobuf field: string text = 1
|
|
73
83
|
*/
|
|
74
|
-
|
|
84
|
+
text: string;
|
|
75
85
|
/**
|
|
76
|
-
* @generated from protobuf field: uint32 word_count =
|
|
86
|
+
* @generated from protobuf field: uint32 word_count = 2
|
|
77
87
|
*/
|
|
78
88
|
wordCount: number;
|
|
79
89
|
/**
|
|
80
|
-
* @generated from protobuf field: string first_heading =
|
|
90
|
+
* @generated from protobuf field: string first_heading = 3
|
|
81
91
|
*/
|
|
82
92
|
firstHeading: string;
|
|
83
93
|
}
|
|
@@ -90,10 +100,14 @@ export enum ContentType {
|
|
|
90
100
|
*/
|
|
91
101
|
UNSPECIFIED = 0,
|
|
92
102
|
/**
|
|
103
|
+
* Used for legacy HTML content
|
|
104
|
+
*
|
|
93
105
|
* @generated from protobuf enum value: CONTENT_TYPE_HTML = 1;
|
|
94
106
|
*/
|
|
95
107
|
HTML = 1,
|
|
96
108
|
/**
|
|
109
|
+
* Used for Tiptap JSON content
|
|
110
|
+
*
|
|
97
111
|
* @generated from protobuf enum value: CONTENT_TYPE_TIPTAP_JSON = 2;
|
|
98
112
|
*/
|
|
99
113
|
TIPTAP_JSON = 2
|
|
@@ -127,13 +141,17 @@ export enum NodeType {
|
|
|
127
141
|
class Content$Type extends MessageType<Content> {
|
|
128
142
|
constructor() {
|
|
129
143
|
super("resources.common.content.Content", [
|
|
130
|
-
{ no: 1, name: "version", kind: "scalar",
|
|
131
|
-
{ no: 2, name: "
|
|
132
|
-
{ no: 3, name: "
|
|
144
|
+
{ no: 1, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "24" } } } },
|
|
145
|
+
{ no: 2, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
146
|
+
{ no: 3, name: "raw_html", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
147
|
+
{ no: 4, name: "content", kind: "message", T: () => RichTextHtmlNode },
|
|
148
|
+
{ no: 5, name: "tiptap_json", kind: "message", T: () => Struct, options: { "codegen.sanitizer.sanitizer": { enabled: true, tiptapJson: true } } }
|
|
133
149
|
]);
|
|
134
150
|
}
|
|
135
151
|
create(value?: PartialMessage<Content>): Content {
|
|
136
152
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
153
|
+
message.version = "";
|
|
154
|
+
message.contentType = 0;
|
|
137
155
|
if (value !== undefined)
|
|
138
156
|
reflectionMergePartial<Content>(this, message, value);
|
|
139
157
|
return message;
|
|
@@ -143,14 +161,20 @@ class Content$Type extends MessageType<Content> {
|
|
|
143
161
|
while (reader.pos < end) {
|
|
144
162
|
let [fieldNo, wireType] = reader.tag();
|
|
145
163
|
switch (fieldNo) {
|
|
146
|
-
case /*
|
|
164
|
+
case /* string version */ 1:
|
|
147
165
|
message.version = reader.string();
|
|
148
166
|
break;
|
|
149
|
-
case /*
|
|
150
|
-
message.
|
|
167
|
+
case /* resources.common.content.ContentType content_type */ 2:
|
|
168
|
+
message.contentType = reader.int32();
|
|
169
|
+
break;
|
|
170
|
+
case /* optional string raw_html */ 3:
|
|
171
|
+
message.rawHtml = reader.string();
|
|
172
|
+
break;
|
|
173
|
+
case /* optional resources.common.content.RichTextHtmlNode content */ 4:
|
|
174
|
+
message.content = RichTextHtmlNode.internalBinaryRead(reader, reader.uint32(), options, message.content);
|
|
151
175
|
break;
|
|
152
|
-
case /*
|
|
153
|
-
message.
|
|
176
|
+
case /* google.protobuf.Struct tiptap_json */ 5:
|
|
177
|
+
message.tiptapJson = Struct.internalBinaryRead(reader, reader.uint32(), options, message.tiptapJson);
|
|
154
178
|
break;
|
|
155
179
|
default:
|
|
156
180
|
let u = options.readUnknownField;
|
|
@@ -164,15 +188,21 @@ class Content$Type extends MessageType<Content> {
|
|
|
164
188
|
return message;
|
|
165
189
|
}
|
|
166
190
|
internalBinaryWrite(message: Content, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
167
|
-
/*
|
|
168
|
-
if (message.version !==
|
|
191
|
+
/* string version = 1; */
|
|
192
|
+
if (message.version !== "")
|
|
169
193
|
writer.tag(1, WireType.LengthDelimited).string(message.version);
|
|
170
|
-
/*
|
|
194
|
+
/* resources.common.content.ContentType content_type = 2; */
|
|
195
|
+
if (message.contentType !== 0)
|
|
196
|
+
writer.tag(2, WireType.Varint).int32(message.contentType);
|
|
197
|
+
/* optional string raw_html = 3; */
|
|
198
|
+
if (message.rawHtml !== undefined)
|
|
199
|
+
writer.tag(3, WireType.LengthDelimited).string(message.rawHtml);
|
|
200
|
+
/* optional resources.common.content.RichTextHtmlNode content = 4; */
|
|
171
201
|
if (message.content)
|
|
172
|
-
|
|
173
|
-
/*
|
|
174
|
-
if (message.
|
|
175
|
-
writer.tag(
|
|
202
|
+
RichTextHtmlNode.internalBinaryWrite(message.content, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
203
|
+
/* google.protobuf.Struct tiptap_json = 5; */
|
|
204
|
+
if (message.tiptapJson)
|
|
205
|
+
Struct.internalBinaryWrite(message.tiptapJson, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
176
206
|
let u = options.writeUnknownFields;
|
|
177
207
|
if (u !== false)
|
|
178
208
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -184,28 +214,28 @@ class Content$Type extends MessageType<Content> {
|
|
|
184
214
|
*/
|
|
185
215
|
export const Content = new Content$Type();
|
|
186
216
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
187
|
-
class
|
|
217
|
+
class RichTextHtmlNode$Type extends MessageType<RichTextHtmlNode> {
|
|
188
218
|
constructor() {
|
|
189
|
-
super("resources.common.content.
|
|
219
|
+
super("resources.common.content.RichTextHtmlNode", [
|
|
190
220
|
{ 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,
|
|
192
|
-
{ no: 3, name: "tag", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true,
|
|
193
|
-
{ no: 4, name: "attrs", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ }, options: { "codegen.sanitizer.sanitizer": { enabled: true,
|
|
194
|
-
{ no: 5, name: "text", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true,
|
|
195
|
-
{ no: 6, name: "content", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () =>
|
|
221
|
+
{ no: 2, name: "id", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
222
|
+
{ no: 3, name: "tag", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
223
|
+
{ no: 4, name: "attrs", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ }, options: { "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
224
|
+
{ no: 5, name: "text", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
225
|
+
{ no: 6, name: "content", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => RichTextHtmlNode }
|
|
196
226
|
]);
|
|
197
227
|
}
|
|
198
|
-
create(value?: PartialMessage<
|
|
228
|
+
create(value?: PartialMessage<RichTextHtmlNode>): RichTextHtmlNode {
|
|
199
229
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
200
230
|
message.type = 0;
|
|
201
231
|
message.tag = "";
|
|
202
232
|
message.attrs = {};
|
|
203
233
|
message.content = [];
|
|
204
234
|
if (value !== undefined)
|
|
205
|
-
reflectionMergePartial<
|
|
235
|
+
reflectionMergePartial<RichTextHtmlNode>(this, message, value);
|
|
206
236
|
return message;
|
|
207
237
|
}
|
|
208
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?:
|
|
238
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RichTextHtmlNode): RichTextHtmlNode {
|
|
209
239
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
210
240
|
while (reader.pos < end) {
|
|
211
241
|
let [fieldNo, wireType] = reader.tag();
|
|
@@ -225,8 +255,8 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
225
255
|
case /* optional string text */ 5:
|
|
226
256
|
message.text = reader.string();
|
|
227
257
|
break;
|
|
228
|
-
case /* repeated resources.common.content.
|
|
229
|
-
message.content.push(
|
|
258
|
+
case /* repeated resources.common.content.RichTextHtmlNode content */ 6:
|
|
259
|
+
message.content.push(RichTextHtmlNode.internalBinaryRead(reader, reader.uint32(), options));
|
|
230
260
|
break;
|
|
231
261
|
default:
|
|
232
262
|
let u = options.readUnknownField;
|
|
@@ -239,8 +269,8 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
239
269
|
}
|
|
240
270
|
return message;
|
|
241
271
|
}
|
|
242
|
-
private binaryReadMap4(map:
|
|
243
|
-
let len = reader.uint32(), end = reader.pos + len, key: keyof
|
|
272
|
+
private binaryReadMap4(map: RichTextHtmlNode["attrs"], reader: IBinaryReader, options: BinaryReadOptions): void {
|
|
273
|
+
let len = reader.uint32(), end = reader.pos + len, key: keyof RichTextHtmlNode["attrs"] | undefined, val: RichTextHtmlNode["attrs"][any] | undefined;
|
|
244
274
|
while (reader.pos < end) {
|
|
245
275
|
let [fieldNo, wireType] = reader.tag();
|
|
246
276
|
switch (fieldNo) {
|
|
@@ -250,12 +280,12 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
250
280
|
case 2:
|
|
251
281
|
val = reader.string();
|
|
252
282
|
break;
|
|
253
|
-
default: throw new globalThis.Error("unknown map entry field for resources.common.content.
|
|
283
|
+
default: throw new globalThis.Error("unknown map entry field for resources.common.content.RichTextHtmlNode.attrs");
|
|
254
284
|
}
|
|
255
285
|
}
|
|
256
286
|
map[key ?? ""] = val ?? "";
|
|
257
287
|
}
|
|
258
|
-
internalBinaryWrite(message:
|
|
288
|
+
internalBinaryWrite(message: RichTextHtmlNode, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
259
289
|
/* resources.common.content.NodeType type = 1; */
|
|
260
290
|
if (message.type !== 0)
|
|
261
291
|
writer.tag(1, WireType.Varint).int32(message.type);
|
|
@@ -271,9 +301,9 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
271
301
|
/* optional string text = 5; */
|
|
272
302
|
if (message.text !== undefined)
|
|
273
303
|
writer.tag(5, WireType.LengthDelimited).string(message.text);
|
|
274
|
-
/* repeated resources.common.content.
|
|
304
|
+
/* repeated resources.common.content.RichTextHtmlNode content = 6; */
|
|
275
305
|
for (let i = 0; i < message.content.length; i++)
|
|
276
|
-
|
|
306
|
+
RichTextHtmlNode.internalBinaryWrite(message.content[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
277
307
|
let u = options.writeUnknownFields;
|
|
278
308
|
if (u !== false)
|
|
279
309
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -281,43 +311,39 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
281
311
|
}
|
|
282
312
|
}
|
|
283
313
|
/**
|
|
284
|
-
* @generated MessageType for protobuf message resources.common.content.
|
|
314
|
+
* @generated MessageType for protobuf message resources.common.content.RichTextHtmlNode
|
|
285
315
|
*/
|
|
286
|
-
export const
|
|
316
|
+
export const RichTextHtmlNode = new RichTextHtmlNode$Type();
|
|
287
317
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
288
|
-
class
|
|
318
|
+
class ExtractedContent$Type extends MessageType<ExtractedContent> {
|
|
289
319
|
constructor() {
|
|
290
|
-
super("resources.common.content.
|
|
291
|
-
{ no: 1, name: "
|
|
292
|
-
{ no: 2, name: "
|
|
293
|
-
{ no: 3, name: "
|
|
294
|
-
{ no: 4, name: "first_heading", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } }
|
|
320
|
+
super("resources.common.content.ExtractedContent", [
|
|
321
|
+
{ no: 1, name: "text", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
322
|
+
{ no: 2, name: "word_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
323
|
+
{ no: 3, name: "first_heading", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
295
324
|
]);
|
|
296
325
|
}
|
|
297
|
-
create(value?: PartialMessage<
|
|
326
|
+
create(value?: PartialMessage<ExtractedContent>): ExtractedContent {
|
|
298
327
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
299
|
-
message.
|
|
328
|
+
message.text = "";
|
|
300
329
|
message.wordCount = 0;
|
|
301
330
|
message.firstHeading = "";
|
|
302
331
|
if (value !== undefined)
|
|
303
|
-
reflectionMergePartial<
|
|
332
|
+
reflectionMergePartial<ExtractedContent>(this, message, value);
|
|
304
333
|
return message;
|
|
305
334
|
}
|
|
306
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?:
|
|
335
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtractedContent): ExtractedContent {
|
|
307
336
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
308
337
|
while (reader.pos < end) {
|
|
309
338
|
let [fieldNo, wireType] = reader.tag();
|
|
310
339
|
switch (fieldNo) {
|
|
311
|
-
case /*
|
|
312
|
-
message.
|
|
313
|
-
break;
|
|
314
|
-
case /* string summary */ 2:
|
|
315
|
-
message.summary = reader.string();
|
|
340
|
+
case /* string text */ 1:
|
|
341
|
+
message.text = reader.string();
|
|
316
342
|
break;
|
|
317
|
-
case /* uint32 word_count */
|
|
343
|
+
case /* uint32 word_count */ 2:
|
|
318
344
|
message.wordCount = reader.uint32();
|
|
319
345
|
break;
|
|
320
|
-
case /* string first_heading */
|
|
346
|
+
case /* string first_heading */ 3:
|
|
321
347
|
message.firstHeading = reader.string();
|
|
322
348
|
break;
|
|
323
349
|
default:
|
|
@@ -331,19 +357,16 @@ class TiptapJSONDocument$Type extends MessageType<TiptapJSONDocument> {
|
|
|
331
357
|
}
|
|
332
358
|
return message;
|
|
333
359
|
}
|
|
334
|
-
internalBinaryWrite(message:
|
|
335
|
-
/*
|
|
336
|
-
if (message.
|
|
337
|
-
|
|
338
|
-
/*
|
|
339
|
-
if (message.summary !== "")
|
|
340
|
-
writer.tag(2, WireType.LengthDelimited).string(message.summary);
|
|
341
|
-
/* uint32 word_count = 3; */
|
|
360
|
+
internalBinaryWrite(message: ExtractedContent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
361
|
+
/* string text = 1; */
|
|
362
|
+
if (message.text !== "")
|
|
363
|
+
writer.tag(1, WireType.LengthDelimited).string(message.text);
|
|
364
|
+
/* uint32 word_count = 2; */
|
|
342
365
|
if (message.wordCount !== 0)
|
|
343
|
-
writer.tag(
|
|
344
|
-
/* string first_heading =
|
|
366
|
+
writer.tag(2, WireType.Varint).uint32(message.wordCount);
|
|
367
|
+
/* string first_heading = 3; */
|
|
345
368
|
if (message.firstHeading !== "")
|
|
346
|
-
writer.tag(
|
|
369
|
+
writer.tag(3, WireType.LengthDelimited).string(message.firstHeading);
|
|
347
370
|
let u = options.writeUnknownFields;
|
|
348
371
|
if (u !== false)
|
|
349
372
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -351,6 +374,6 @@ class TiptapJSONDocument$Type extends MessageType<TiptapJSONDocument> {
|
|
|
351
374
|
}
|
|
352
375
|
}
|
|
353
376
|
/**
|
|
354
|
-
* @generated MessageType for protobuf message resources.common.content.
|
|
377
|
+
* @generated MessageType for protobuf message resources.common.content.ExtractedContent
|
|
355
378
|
*/
|
|
356
|
-
export const
|
|
379
|
+
export const ExtractedContent = new ExtractedContent$Type();
|