@fivenet-app/gen 2025.5.3 → 2026.3.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/buf/validate/validate.ts +11301 -0
- package/clients.ts +193 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +287 -0
- package/codegen/sanitizer/sanitizer.ts +113 -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 +217 -160
- package/resources/accounts/accounts.ts +115 -47
- package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +33 -32
- package/resources/audit/audit.ts +172 -53
- package/resources/calendar/{access.ts → access/access.ts} +72 -71
- package/resources/calendar/calendar.ts +79 -543
- package/resources/calendar/entries/entries.ts +474 -0
- package/resources/centrum/access/access.ts +345 -0
- package/resources/centrum/dispatchers/dispatchers.ts +149 -0
- package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +267 -164
- package/resources/centrum/joblist.ts +136 -0
- package/resources/centrum/settings/settings.ts +657 -0
- package/resources/centrum/{units_access.ts → units/access/access.ts} +78 -79
- package/resources/centrum/{units.ts → units/units.ts} +230 -130
- package/resources/clientconfig/clientconfig.ts +1015 -0
- package/resources/collab/collab.ts +805 -0
- package/resources/common/content/content.ts +169 -63
- package/resources/common/content/diff_activity.ts +267 -0
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- 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/cron → cron}/cron.ts +77 -65
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/{access.ts → access/access.ts} +75 -76
- package/resources/documents/{activity.ts → activity/activity.ts} +349 -124
- package/resources/documents/approval/approval.ts +945 -0
- package/resources/documents/{category.ts → category/category.ts} +25 -32
- package/resources/documents/{comment.ts → comment/comment.ts} +35 -34
- package/resources/documents/data/data.ts +303 -0
- package/resources/documents/documents.ts +374 -686
- package/resources/{common/uuid.ts → documents/forms/forms.ts} +22 -21
- package/resources/documents/pins/pins.ts +127 -0
- package/resources/documents/references/references.ts +187 -0
- package/resources/documents/relations/relations.ts +184 -0
- package/resources/documents/{requests.ts → requests/requests.ts} +45 -44
- package/resources/documents/stamps/stamp.ts +355 -0
- package/resources/documents/{templates.ts → templates/templates.ts} +524 -199
- package/resources/documents/workflow/workflow.ts +600 -0
- 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/{common/grpcws → grpcws}/grpcws.ts +66 -65
- package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +83 -86
- package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +76 -80
- package/resources/jobs/{conduct.ts → conduct/conduct.ts} +86 -62
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/{labels.ts → labels/labels.ts} +36 -37
- package/resources/jobs/{job_props.ts → props/props.ts} +63 -65
- package/resources/jobs/{job_settings.ts → settings/settings.ts} +89 -96
- package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +42 -41
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → markers/marker_marker.ts} +68 -335
- package/resources/livemap/markers/user_marker.ts +377 -0
- package/resources/mailer/{access.ts → access/access.ts} +119 -118
- package/resources/mailer/{email.ts → emails/email.ts} +38 -41
- package/resources/mailer/{events.ts → events/events.ts} +44 -43
- package/resources/mailer/{message.ts → messages/message.ts} +69 -74
- package/resources/mailer/{settings.ts → settings/settings.ts} +23 -25
- package/resources/mailer/{template.ts → templates/template.ts} +37 -40
- package/resources/mailer/{thread.ts → threads/thread.ts} +93 -94
- package/resources/notifications/clientview/clientview.ts +239 -0
- package/resources/notifications/{events.ts → events/events.ts} +67 -130
- package/resources/notifications/notifications.ts +55 -60
- package/resources/permissions/{attributes.ts → attributes/attributes.ts} +94 -237
- package/resources/permissions/events/events.ts +149 -0
- package/resources/permissions/{permissions.ts → permissions/permissions.ts} +127 -47
- package/resources/qualifications/{access.ts → access/access.ts} +43 -42
- package/resources/qualifications/{exam.ts → exam/exam.ts} +419 -229
- package/resources/qualifications/qualifications.ts +327 -388
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +663 -79
- package/resources/settings/data.ts +90 -0
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +382 -2
- package/resources/sync/{activity.ts → activity/activity.ts} +126 -46
- package/resources/sync/data/data.ts +1001 -0
- package/resources/sync/data/v2/data.ts +220 -0
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/userinfo.ts +442 -0
- package/resources/users/{activity.ts → activity/activity.ts} +182 -166
- package/resources/users/{labels.ts → labels/labels.ts} +27 -30
- package/resources/users/{licenses.ts → licenses/licenses.ts} +18 -17
- package/resources/users/{props.ts → props/props.ts} +109 -77
- package/resources/users/short/user.ts +184 -0
- package/resources/users/user.ts +528 -0
- package/resources/vehicles/activity/activity.ts +231 -0
- package/resources/vehicles/props/props.ts +125 -0
- package/resources/vehicles/vehicles.ts +43 -18
- package/resources/wiki/{access.ts → access/access.ts} +72 -71
- package/resources/wiki/{activity.ts → activity/activity.ts} +218 -102
- package/resources/wiki/page.ts +164 -93
- package/services/auth/auth.client.ts +45 -35
- package/services/auth/auth.ts +498 -288
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +157 -134
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +755 -352
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +226 -112
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +95 -54
- package/services/documents/approval.client.ts +188 -0
- package/services/documents/approval.ts +1776 -0
- 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 +579 -619
- 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/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +40 -28
- package/services/jobs/conduct.ts +183 -56
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +138 -121
- package/services/jobs/stats.client.ts +38 -0
- package/services/jobs/stats.ts +207 -0
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +76 -75
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +297 -126
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +266 -269
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +126 -83
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +250 -209
- package/services/settings/accounts.client.ts +31 -33
- package/services/settings/accounts.ts +251 -67
- 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 +7 -6
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +30 -29
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +237 -633
- package/services/settings/system.client.ts +103 -0
- package/services/settings/system.ts +718 -0
- package/services/stats/stats.client.ts +9 -8
- package/services/stats/stats.ts +27 -26
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +174 -97
- package/services/sync/v2/sync.client.ts +331 -0
- package/services/sync/v2/sync.ts +1766 -0
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +170 -25
- 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 +97 -67
- package/svcs.ts +174 -106
- package/resources/centrum/attributes.ts +0 -186
- package/resources/centrum/disponents.ts +0 -81
- package/resources/centrum/settings.ts +0 -307
- package/resources/documents/workflow.ts +0 -351
- 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/resources/sync/data.ts +0 -587
- package/resources/users/users.ts +0 -435
- 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,63 +11,85 @@ 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:
|
|
20
|
+
* @generated from protobuf field: string version = 1
|
|
19
21
|
*/
|
|
20
|
-
version
|
|
22
|
+
version: string;
|
|
21
23
|
/**
|
|
22
|
-
* @generated from protobuf field:
|
|
24
|
+
* @generated from protobuf field: resources.common.content.ContentType content_type = 2
|
|
23
25
|
*/
|
|
24
|
-
|
|
26
|
+
contentType: ContentType;
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
28
|
+
* Deprecated: Legacy HTML (only for viewing old content)
|
|
27
29
|
*
|
|
28
|
-
* @generated from protobuf field: optional string
|
|
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
|
-
* @generated from protobuf field: resources.common.content.NodeType type = 1
|
|
51
|
+
* @generated from protobuf field: resources.common.content.NodeType type = 1
|
|
38
52
|
*/
|
|
39
53
|
type: NodeType;
|
|
40
54
|
/**
|
|
41
|
-
* @
|
|
42
|
-
*
|
|
43
|
-
* @generated from protobuf field: optional string id = 2;
|
|
55
|
+
* @generated from protobuf field: optional string id = 2
|
|
44
56
|
*/
|
|
45
57
|
id?: string;
|
|
46
58
|
/**
|
|
47
|
-
* @
|
|
48
|
-
*
|
|
49
|
-
* @generated from protobuf field: string tag = 3;
|
|
59
|
+
* @generated from protobuf field: string tag = 3
|
|
50
60
|
*/
|
|
51
61
|
tag: string;
|
|
52
62
|
/**
|
|
53
|
-
* @
|
|
54
|
-
*
|
|
55
|
-
* @generated from protobuf field: map<string, string> attrs = 4;
|
|
63
|
+
* @generated from protobuf field: map<string, string> attrs = 4
|
|
56
64
|
*/
|
|
57
65
|
attrs: {
|
|
58
66
|
[key: string]: string;
|
|
59
67
|
};
|
|
60
68
|
/**
|
|
61
|
-
* @
|
|
62
|
-
*
|
|
63
|
-
* @generated from protobuf field: optional string text = 5;
|
|
69
|
+
* @generated from protobuf field: optional string text = 5
|
|
64
70
|
*/
|
|
65
71
|
text?: string;
|
|
66
72
|
/**
|
|
67
|
-
* @generated from protobuf field: repeated resources.common.content.
|
|
73
|
+
* @generated from protobuf field: repeated resources.common.content.RichTextHtmlNode content = 6
|
|
68
74
|
*/
|
|
69
|
-
content:
|
|
75
|
+
content: RichTextHtmlNode[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @generated from protobuf message resources.common.content.ExtractedContent
|
|
79
|
+
*/
|
|
80
|
+
export interface ExtractedContent {
|
|
81
|
+
/**
|
|
82
|
+
* @generated from protobuf field: string text = 1
|
|
83
|
+
*/
|
|
84
|
+
text: string;
|
|
85
|
+
/**
|
|
86
|
+
* @generated from protobuf field: uint32 word_count = 2
|
|
87
|
+
*/
|
|
88
|
+
wordCount: number;
|
|
89
|
+
/**
|
|
90
|
+
* @generated from protobuf field: string first_heading = 3
|
|
91
|
+
*/
|
|
92
|
+
firstHeading: string;
|
|
70
93
|
}
|
|
71
94
|
/**
|
|
72
95
|
* @generated from protobuf enum resources.common.content.ContentType
|
|
@@ -77,13 +100,17 @@ export enum ContentType {
|
|
|
77
100
|
*/
|
|
78
101
|
UNSPECIFIED = 0,
|
|
79
102
|
/**
|
|
103
|
+
* Used for legacy HTML content
|
|
104
|
+
*
|
|
80
105
|
* @generated from protobuf enum value: CONTENT_TYPE_HTML = 1;
|
|
81
106
|
*/
|
|
82
107
|
HTML = 1,
|
|
83
108
|
/**
|
|
84
|
-
*
|
|
109
|
+
* Used for Tiptap JSON content
|
|
110
|
+
*
|
|
111
|
+
* @generated from protobuf enum value: CONTENT_TYPE_TIPTAP_JSON = 2;
|
|
85
112
|
*/
|
|
86
|
-
|
|
113
|
+
TIPTAP_JSON = 2
|
|
87
114
|
}
|
|
88
115
|
/**
|
|
89
116
|
* @generated from protobuf enum resources.common.content.NodeType
|
|
@@ -114,13 +141,17 @@ export enum NodeType {
|
|
|
114
141
|
class Content$Type extends MessageType<Content> {
|
|
115
142
|
constructor() {
|
|
116
143
|
super("resources.common.content.Content", [
|
|
117
|
-
{ no: 1, name: "version", kind: "scalar",
|
|
118
|
-
{ no: 2, name: "
|
|
119
|
-
{ 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 } } }
|
|
120
149
|
]);
|
|
121
150
|
}
|
|
122
151
|
create(value?: PartialMessage<Content>): Content {
|
|
123
152
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
153
|
+
message.version = "";
|
|
154
|
+
message.contentType = 0;
|
|
124
155
|
if (value !== undefined)
|
|
125
156
|
reflectionMergePartial<Content>(this, message, value);
|
|
126
157
|
return message;
|
|
@@ -130,14 +161,20 @@ class Content$Type extends MessageType<Content> {
|
|
|
130
161
|
while (reader.pos < end) {
|
|
131
162
|
let [fieldNo, wireType] = reader.tag();
|
|
132
163
|
switch (fieldNo) {
|
|
133
|
-
case /*
|
|
164
|
+
case /* string version */ 1:
|
|
134
165
|
message.version = reader.string();
|
|
135
166
|
break;
|
|
136
|
-
case /*
|
|
137
|
-
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();
|
|
138
172
|
break;
|
|
139
|
-
case /* optional
|
|
140
|
-
message.
|
|
173
|
+
case /* optional resources.common.content.RichTextHtmlNode content */ 4:
|
|
174
|
+
message.content = RichTextHtmlNode.internalBinaryRead(reader, reader.uint32(), options, message.content);
|
|
175
|
+
break;
|
|
176
|
+
case /* google.protobuf.Struct tiptap_json */ 5:
|
|
177
|
+
message.tiptapJson = Struct.internalBinaryRead(reader, reader.uint32(), options, message.tiptapJson);
|
|
141
178
|
break;
|
|
142
179
|
default:
|
|
143
180
|
let u = options.readUnknownField;
|
|
@@ -151,15 +188,21 @@ class Content$Type extends MessageType<Content> {
|
|
|
151
188
|
return message;
|
|
152
189
|
}
|
|
153
190
|
internalBinaryWrite(message: Content, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
154
|
-
/*
|
|
155
|
-
if (message.version !==
|
|
191
|
+
/* string version = 1; */
|
|
192
|
+
if (message.version !== "")
|
|
156
193
|
writer.tag(1, WireType.LengthDelimited).string(message.version);
|
|
157
|
-
/*
|
|
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; */
|
|
158
201
|
if (message.content)
|
|
159
|
-
|
|
160
|
-
/*
|
|
161
|
-
if (message.
|
|
162
|
-
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();
|
|
163
206
|
let u = options.writeUnknownFields;
|
|
164
207
|
if (u !== false)
|
|
165
208
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -171,28 +214,28 @@ class Content$Type extends MessageType<Content> {
|
|
|
171
214
|
*/
|
|
172
215
|
export const Content = new Content$Type();
|
|
173
216
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
174
|
-
class
|
|
217
|
+
class RichTextHtmlNode$Type extends MessageType<RichTextHtmlNode> {
|
|
175
218
|
constructor() {
|
|
176
|
-
super("resources.common.content.
|
|
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
|
|
182
|
-
{ no: 6, name: "content", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () =>
|
|
219
|
+
super("resources.common.content.RichTextHtmlNode", [
|
|
220
|
+
{ no: 1, name: "type", kind: "enum", T: () => ["resources.common.content.NodeType", NodeType, "NODE_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
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 }
|
|
183
226
|
]);
|
|
184
227
|
}
|
|
185
|
-
create(value?: PartialMessage<
|
|
228
|
+
create(value?: PartialMessage<RichTextHtmlNode>): RichTextHtmlNode {
|
|
186
229
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
187
230
|
message.type = 0;
|
|
188
231
|
message.tag = "";
|
|
189
232
|
message.attrs = {};
|
|
190
233
|
message.content = [];
|
|
191
234
|
if (value !== undefined)
|
|
192
|
-
reflectionMergePartial<
|
|
235
|
+
reflectionMergePartial<RichTextHtmlNode>(this, message, value);
|
|
193
236
|
return message;
|
|
194
237
|
}
|
|
195
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?:
|
|
238
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RichTextHtmlNode): RichTextHtmlNode {
|
|
196
239
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
197
240
|
while (reader.pos < end) {
|
|
198
241
|
let [fieldNo, wireType] = reader.tag();
|
|
@@ -212,8 +255,8 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
212
255
|
case /* optional string text */ 5:
|
|
213
256
|
message.text = reader.string();
|
|
214
257
|
break;
|
|
215
|
-
case /* repeated resources.common.content.
|
|
216
|
-
message.content.push(
|
|
258
|
+
case /* repeated resources.common.content.RichTextHtmlNode content */ 6:
|
|
259
|
+
message.content.push(RichTextHtmlNode.internalBinaryRead(reader, reader.uint32(), options));
|
|
217
260
|
break;
|
|
218
261
|
default:
|
|
219
262
|
let u = options.readUnknownField;
|
|
@@ -226,8 +269,8 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
226
269
|
}
|
|
227
270
|
return message;
|
|
228
271
|
}
|
|
229
|
-
private binaryReadMap4(map:
|
|
230
|
-
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;
|
|
231
274
|
while (reader.pos < end) {
|
|
232
275
|
let [fieldNo, wireType] = reader.tag();
|
|
233
276
|
switch (fieldNo) {
|
|
@@ -237,12 +280,12 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
237
280
|
case 2:
|
|
238
281
|
val = reader.string();
|
|
239
282
|
break;
|
|
240
|
-
default: throw new globalThis.Error("unknown map entry field for
|
|
283
|
+
default: throw new globalThis.Error("unknown map entry field for resources.common.content.RichTextHtmlNode.attrs");
|
|
241
284
|
}
|
|
242
285
|
}
|
|
243
286
|
map[key ?? ""] = val ?? "";
|
|
244
287
|
}
|
|
245
|
-
internalBinaryWrite(message:
|
|
288
|
+
internalBinaryWrite(message: RichTextHtmlNode, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
246
289
|
/* resources.common.content.NodeType type = 1; */
|
|
247
290
|
if (message.type !== 0)
|
|
248
291
|
writer.tag(1, WireType.Varint).int32(message.type);
|
|
@@ -258,9 +301,72 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
258
301
|
/* optional string text = 5; */
|
|
259
302
|
if (message.text !== undefined)
|
|
260
303
|
writer.tag(5, WireType.LengthDelimited).string(message.text);
|
|
261
|
-
/* repeated resources.common.content.
|
|
304
|
+
/* repeated resources.common.content.RichTextHtmlNode content = 6; */
|
|
262
305
|
for (let i = 0; i < message.content.length; i++)
|
|
263
|
-
|
|
306
|
+
RichTextHtmlNode.internalBinaryWrite(message.content[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
307
|
+
let u = options.writeUnknownFields;
|
|
308
|
+
if (u !== false)
|
|
309
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
310
|
+
return writer;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* @generated MessageType for protobuf message resources.common.content.RichTextHtmlNode
|
|
315
|
+
*/
|
|
316
|
+
export const RichTextHtmlNode = new RichTextHtmlNode$Type();
|
|
317
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
318
|
+
class ExtractedContent$Type extends MessageType<ExtractedContent> {
|
|
319
|
+
constructor() {
|
|
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*/ }
|
|
324
|
+
]);
|
|
325
|
+
}
|
|
326
|
+
create(value?: PartialMessage<ExtractedContent>): ExtractedContent {
|
|
327
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
328
|
+
message.text = "";
|
|
329
|
+
message.wordCount = 0;
|
|
330
|
+
message.firstHeading = "";
|
|
331
|
+
if (value !== undefined)
|
|
332
|
+
reflectionMergePartial<ExtractedContent>(this, message, value);
|
|
333
|
+
return message;
|
|
334
|
+
}
|
|
335
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtractedContent): ExtractedContent {
|
|
336
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
337
|
+
while (reader.pos < end) {
|
|
338
|
+
let [fieldNo, wireType] = reader.tag();
|
|
339
|
+
switch (fieldNo) {
|
|
340
|
+
case /* string text */ 1:
|
|
341
|
+
message.text = reader.string();
|
|
342
|
+
break;
|
|
343
|
+
case /* uint32 word_count */ 2:
|
|
344
|
+
message.wordCount = reader.uint32();
|
|
345
|
+
break;
|
|
346
|
+
case /* string first_heading */ 3:
|
|
347
|
+
message.firstHeading = reader.string();
|
|
348
|
+
break;
|
|
349
|
+
default:
|
|
350
|
+
let u = options.readUnknownField;
|
|
351
|
+
if (u === "throw")
|
|
352
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
353
|
+
let d = reader.skip(wireType);
|
|
354
|
+
if (u !== false)
|
|
355
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return message;
|
|
359
|
+
}
|
|
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; */
|
|
365
|
+
if (message.wordCount !== 0)
|
|
366
|
+
writer.tag(2, WireType.Varint).uint32(message.wordCount);
|
|
367
|
+
/* string first_heading = 3; */
|
|
368
|
+
if (message.firstHeading !== "")
|
|
369
|
+
writer.tag(3, WireType.LengthDelimited).string(message.firstHeading);
|
|
264
370
|
let u = options.writeUnknownFields;
|
|
265
371
|
if (u !== false)
|
|
266
372
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -268,6 +374,6 @@ class JSONNode$Type extends MessageType<JSONNode> {
|
|
|
268
374
|
}
|
|
269
375
|
}
|
|
270
376
|
/**
|
|
271
|
-
* @generated MessageType for protobuf message resources.common.content.
|
|
377
|
+
* @generated MessageType for protobuf message resources.common.content.ExtractedContent
|
|
272
378
|
*/
|
|
273
|
-
export const
|
|
379
|
+
export const ExtractedContent = new ExtractedContent$Type();
|
|
@@ -0,0 +1,267 @@
|
|
|
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/common/content/diff_activity.proto" (package "resources.common.content", 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
|
+
* One diff operation, designed for inline client rendering.
|
|
16
|
+
*
|
|
17
|
+
* @generated from protobuf message resources.common.content.ContentDiffOp
|
|
18
|
+
*/
|
|
19
|
+
export interface ContentDiffOp {
|
|
20
|
+
/**
|
|
21
|
+
* @generated from protobuf field: resources.common.content.Kind kind = 1
|
|
22
|
+
*/
|
|
23
|
+
kind: Kind;
|
|
24
|
+
/**
|
|
25
|
+
* Plain text segment. Can contain whitespace and newlines.
|
|
26
|
+
* Client renders:
|
|
27
|
+
* - EQUAL: normal text
|
|
28
|
+
* - INSERT: highlighted
|
|
29
|
+
* - DELETE: strikethrough or hidden behind a toggle
|
|
30
|
+
*
|
|
31
|
+
* @generated from protobuf field: string text = 2
|
|
32
|
+
*/
|
|
33
|
+
text: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Optional stats to quickly show "what changed" without parsing ops.
|
|
37
|
+
*
|
|
38
|
+
* @generated from protobuf message resources.common.content.ContentDiffStats
|
|
39
|
+
*/
|
|
40
|
+
export interface ContentDiffStats {
|
|
41
|
+
/**
|
|
42
|
+
* Counts are measured in runes/codepoints on the server side.
|
|
43
|
+
*
|
|
44
|
+
* @generated from protobuf field: uint32 inserted_runes = 1
|
|
45
|
+
*/
|
|
46
|
+
insertedRunes: number;
|
|
47
|
+
/**
|
|
48
|
+
* @generated from protobuf field: uint32 deleted_runes = 2
|
|
49
|
+
*/
|
|
50
|
+
deletedRunes: number;
|
|
51
|
+
/**
|
|
52
|
+
* Optional: number of diff ops (after cleanup/coalescing).
|
|
53
|
+
*
|
|
54
|
+
* @generated from protobuf field: uint32 op_count = 3
|
|
55
|
+
*/
|
|
56
|
+
opCount: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @generated from protobuf message resources.common.content.ContentDiff
|
|
60
|
+
*/
|
|
61
|
+
export interface ContentDiff {
|
|
62
|
+
/**
|
|
63
|
+
* Quick summary for badge like "+12 / -3"
|
|
64
|
+
*
|
|
65
|
+
* @generated from protobuf field: resources.common.content.ContentDiffStats stats = 1
|
|
66
|
+
*/
|
|
67
|
+
stats?: ContentDiffStats;
|
|
68
|
+
/**
|
|
69
|
+
* The diff itself for inline rendering
|
|
70
|
+
*
|
|
71
|
+
* @generated from protobuf field: repeated resources.common.content.ContentDiffOp ops = 2
|
|
72
|
+
*/
|
|
73
|
+
ops: ContentDiffOp[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @generated from protobuf enum resources.common.content.Kind
|
|
77
|
+
*/
|
|
78
|
+
export enum Kind {
|
|
79
|
+
/**
|
|
80
|
+
* @generated from protobuf enum value: KIND_UNSPECIFIED = 0;
|
|
81
|
+
*/
|
|
82
|
+
UNSPECIFIED = 0,
|
|
83
|
+
/**
|
|
84
|
+
* @generated from protobuf enum value: KIND_EQUAL = 1;
|
|
85
|
+
*/
|
|
86
|
+
EQUAL = 1,
|
|
87
|
+
/**
|
|
88
|
+
* @generated from protobuf enum value: KIND_INSERT = 2;
|
|
89
|
+
*/
|
|
90
|
+
INSERT = 2,
|
|
91
|
+
/**
|
|
92
|
+
* @generated from protobuf enum value: KIND_DELETE = 3;
|
|
93
|
+
*/
|
|
94
|
+
DELETE = 3
|
|
95
|
+
}
|
|
96
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
97
|
+
class ContentDiffOp$Type extends MessageType<ContentDiffOp> {
|
|
98
|
+
constructor() {
|
|
99
|
+
super("resources.common.content.ContentDiffOp", [
|
|
100
|
+
{ no: 1, name: "kind", kind: "enum", T: () => ["resources.common.content.Kind", Kind, "KIND_"] },
|
|
101
|
+
{ no: 2, name: "text", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
102
|
+
]);
|
|
103
|
+
}
|
|
104
|
+
create(value?: PartialMessage<ContentDiffOp>): ContentDiffOp {
|
|
105
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
106
|
+
message.kind = 0;
|
|
107
|
+
message.text = "";
|
|
108
|
+
if (value !== undefined)
|
|
109
|
+
reflectionMergePartial<ContentDiffOp>(this, message, value);
|
|
110
|
+
return message;
|
|
111
|
+
}
|
|
112
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ContentDiffOp): ContentDiffOp {
|
|
113
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
114
|
+
while (reader.pos < end) {
|
|
115
|
+
let [fieldNo, wireType] = reader.tag();
|
|
116
|
+
switch (fieldNo) {
|
|
117
|
+
case /* resources.common.content.Kind kind */ 1:
|
|
118
|
+
message.kind = reader.int32();
|
|
119
|
+
break;
|
|
120
|
+
case /* string text */ 2:
|
|
121
|
+
message.text = reader.string();
|
|
122
|
+
break;
|
|
123
|
+
default:
|
|
124
|
+
let u = options.readUnknownField;
|
|
125
|
+
if (u === "throw")
|
|
126
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
127
|
+
let d = reader.skip(wireType);
|
|
128
|
+
if (u !== false)
|
|
129
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return message;
|
|
133
|
+
}
|
|
134
|
+
internalBinaryWrite(message: ContentDiffOp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
135
|
+
/* resources.common.content.Kind kind = 1; */
|
|
136
|
+
if (message.kind !== 0)
|
|
137
|
+
writer.tag(1, WireType.Varint).int32(message.kind);
|
|
138
|
+
/* string text = 2; */
|
|
139
|
+
if (message.text !== "")
|
|
140
|
+
writer.tag(2, WireType.LengthDelimited).string(message.text);
|
|
141
|
+
let u = options.writeUnknownFields;
|
|
142
|
+
if (u !== false)
|
|
143
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
144
|
+
return writer;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* @generated MessageType for protobuf message resources.common.content.ContentDiffOp
|
|
149
|
+
*/
|
|
150
|
+
export const ContentDiffOp = new ContentDiffOp$Type();
|
|
151
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
152
|
+
class ContentDiffStats$Type extends MessageType<ContentDiffStats> {
|
|
153
|
+
constructor() {
|
|
154
|
+
super("resources.common.content.ContentDiffStats", [
|
|
155
|
+
{ no: 1, name: "inserted_runes", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
156
|
+
{ no: 2, name: "deleted_runes", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
157
|
+
{ no: 3, name: "op_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
|
|
158
|
+
]);
|
|
159
|
+
}
|
|
160
|
+
create(value?: PartialMessage<ContentDiffStats>): ContentDiffStats {
|
|
161
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
162
|
+
message.insertedRunes = 0;
|
|
163
|
+
message.deletedRunes = 0;
|
|
164
|
+
message.opCount = 0;
|
|
165
|
+
if (value !== undefined)
|
|
166
|
+
reflectionMergePartial<ContentDiffStats>(this, message, value);
|
|
167
|
+
return message;
|
|
168
|
+
}
|
|
169
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ContentDiffStats): ContentDiffStats {
|
|
170
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
171
|
+
while (reader.pos < end) {
|
|
172
|
+
let [fieldNo, wireType] = reader.tag();
|
|
173
|
+
switch (fieldNo) {
|
|
174
|
+
case /* uint32 inserted_runes */ 1:
|
|
175
|
+
message.insertedRunes = reader.uint32();
|
|
176
|
+
break;
|
|
177
|
+
case /* uint32 deleted_runes */ 2:
|
|
178
|
+
message.deletedRunes = reader.uint32();
|
|
179
|
+
break;
|
|
180
|
+
case /* uint32 op_count */ 3:
|
|
181
|
+
message.opCount = reader.uint32();
|
|
182
|
+
break;
|
|
183
|
+
default:
|
|
184
|
+
let u = options.readUnknownField;
|
|
185
|
+
if (u === "throw")
|
|
186
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
187
|
+
let d = reader.skip(wireType);
|
|
188
|
+
if (u !== false)
|
|
189
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return message;
|
|
193
|
+
}
|
|
194
|
+
internalBinaryWrite(message: ContentDiffStats, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
195
|
+
/* uint32 inserted_runes = 1; */
|
|
196
|
+
if (message.insertedRunes !== 0)
|
|
197
|
+
writer.tag(1, WireType.Varint).uint32(message.insertedRunes);
|
|
198
|
+
/* uint32 deleted_runes = 2; */
|
|
199
|
+
if (message.deletedRunes !== 0)
|
|
200
|
+
writer.tag(2, WireType.Varint).uint32(message.deletedRunes);
|
|
201
|
+
/* uint32 op_count = 3; */
|
|
202
|
+
if (message.opCount !== 0)
|
|
203
|
+
writer.tag(3, WireType.Varint).uint32(message.opCount);
|
|
204
|
+
let u = options.writeUnknownFields;
|
|
205
|
+
if (u !== false)
|
|
206
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
207
|
+
return writer;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* @generated MessageType for protobuf message resources.common.content.ContentDiffStats
|
|
212
|
+
*/
|
|
213
|
+
export const ContentDiffStats = new ContentDiffStats$Type();
|
|
214
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
215
|
+
class ContentDiff$Type extends MessageType<ContentDiff> {
|
|
216
|
+
constructor() {
|
|
217
|
+
super("resources.common.content.ContentDiff", [
|
|
218
|
+
{ no: 1, name: "stats", kind: "message", T: () => ContentDiffStats },
|
|
219
|
+
{ no: 2, name: "ops", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ContentDiffOp }
|
|
220
|
+
]);
|
|
221
|
+
}
|
|
222
|
+
create(value?: PartialMessage<ContentDiff>): ContentDiff {
|
|
223
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
224
|
+
message.ops = [];
|
|
225
|
+
if (value !== undefined)
|
|
226
|
+
reflectionMergePartial<ContentDiff>(this, message, value);
|
|
227
|
+
return message;
|
|
228
|
+
}
|
|
229
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ContentDiff): ContentDiff {
|
|
230
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
231
|
+
while (reader.pos < end) {
|
|
232
|
+
let [fieldNo, wireType] = reader.tag();
|
|
233
|
+
switch (fieldNo) {
|
|
234
|
+
case /* resources.common.content.ContentDiffStats stats */ 1:
|
|
235
|
+
message.stats = ContentDiffStats.internalBinaryRead(reader, reader.uint32(), options, message.stats);
|
|
236
|
+
break;
|
|
237
|
+
case /* repeated resources.common.content.ContentDiffOp ops */ 2:
|
|
238
|
+
message.ops.push(ContentDiffOp.internalBinaryRead(reader, reader.uint32(), options));
|
|
239
|
+
break;
|
|
240
|
+
default:
|
|
241
|
+
let u = options.readUnknownField;
|
|
242
|
+
if (u === "throw")
|
|
243
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
244
|
+
let d = reader.skip(wireType);
|
|
245
|
+
if (u !== false)
|
|
246
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return message;
|
|
250
|
+
}
|
|
251
|
+
internalBinaryWrite(message: ContentDiff, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
252
|
+
/* resources.common.content.ContentDiffStats stats = 1; */
|
|
253
|
+
if (message.stats)
|
|
254
|
+
ContentDiffStats.internalBinaryWrite(message.stats, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
255
|
+
/* repeated resources.common.content.ContentDiffOp ops = 2; */
|
|
256
|
+
for (let i = 0; i < message.ops.length; i++)
|
|
257
|
+
ContentDiffOp.internalBinaryWrite(message.ops[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
258
|
+
let u = options.writeUnknownFields;
|
|
259
|
+
if (u !== false)
|
|
260
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
261
|
+
return writer;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* @generated MessageType for protobuf message resources.common.content.ContentDiff
|
|
266
|
+
*/
|
|
267
|
+
export const ContentDiff = new ContentDiff$Type();
|