@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
package/resources/wiki/page.ts
CHANGED
|
@@ -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/wiki/page.proto" (package "resources.wiki", 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,10 +11,10 @@ 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";
|
|
13
|
-
import { File } from "../filestore/file";
|
|
14
14
|
import { ContentType } from "../common/content/content";
|
|
15
15
|
import { UserShort } from "../users/users";
|
|
16
16
|
import { Timestamp } from "../timestamp/timestamp";
|
|
17
|
+
import { File } from "../file/file";
|
|
17
18
|
import { PageAccess } from "./access";
|
|
18
19
|
import { Content } from "../common/content/content";
|
|
19
20
|
/**
|
|
@@ -21,150 +22,158 @@ import { Content } from "../common/content/content";
|
|
|
21
22
|
*/
|
|
22
23
|
export interface Page {
|
|
23
24
|
/**
|
|
24
|
-
* @generated from protobuf field:
|
|
25
|
+
* @generated from protobuf field: int64 id = 1
|
|
25
26
|
*/
|
|
26
|
-
id: number;
|
|
27
|
+
id: number;
|
|
27
28
|
/**
|
|
28
|
-
* @
|
|
29
|
-
*
|
|
30
|
-
* @generated from protobuf field: string job = 2;
|
|
29
|
+
* @generated from protobuf field: string job = 2
|
|
31
30
|
*/
|
|
32
31
|
job: string;
|
|
33
32
|
/**
|
|
34
|
-
* @generated from protobuf field: optional string job_label = 3
|
|
33
|
+
* @generated from protobuf field: optional string job_label = 3
|
|
35
34
|
*/
|
|
36
35
|
jobLabel?: string;
|
|
37
36
|
/**
|
|
38
|
-
* @generated from protobuf field: optional
|
|
37
|
+
* @generated from protobuf field: optional int64 parent_id = 4
|
|
39
38
|
*/
|
|
40
39
|
parentId?: number;
|
|
41
40
|
/**
|
|
42
|
-
* @generated from protobuf field: resources.wiki.PageMeta meta = 5
|
|
41
|
+
* @generated from protobuf field: resources.wiki.PageMeta meta = 5
|
|
43
42
|
*/
|
|
44
43
|
meta?: PageMeta;
|
|
45
44
|
/**
|
|
46
|
-
* @generated from protobuf field: resources.common.content.Content content = 6
|
|
45
|
+
* @generated from protobuf field: resources.common.content.Content content = 6
|
|
47
46
|
*/
|
|
48
47
|
content?: Content;
|
|
49
48
|
/**
|
|
50
|
-
* @generated from protobuf field: resources.wiki.PageAccess access = 7
|
|
49
|
+
* @generated from protobuf field: resources.wiki.PageAccess access = 7
|
|
51
50
|
*/
|
|
52
51
|
access?: PageAccess;
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf field: repeated resources.file.File files = 8
|
|
54
|
+
*/
|
|
55
|
+
files: File[];
|
|
53
56
|
}
|
|
54
57
|
/**
|
|
55
58
|
* @generated from protobuf message resources.wiki.PageMeta
|
|
56
59
|
*/
|
|
57
60
|
export interface PageMeta {
|
|
58
61
|
/**
|
|
59
|
-
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 1
|
|
62
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 1
|
|
60
63
|
*/
|
|
61
64
|
createdAt?: Timestamp;
|
|
62
65
|
/**
|
|
63
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 2
|
|
66
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 2
|
|
64
67
|
*/
|
|
65
68
|
updatedAt?: Timestamp;
|
|
66
69
|
/**
|
|
67
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 3
|
|
70
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 3
|
|
68
71
|
*/
|
|
69
72
|
deletedAt?: Timestamp;
|
|
70
73
|
/**
|
|
71
|
-
* @
|
|
72
|
-
*
|
|
73
|
-
* @generated from protobuf field: optional string slug = 4;
|
|
74
|
+
* @generated from protobuf field: optional string slug = 4
|
|
74
75
|
*/
|
|
75
76
|
slug?: string;
|
|
76
77
|
/**
|
|
77
|
-
* @
|
|
78
|
-
*
|
|
79
|
-
* @generated from protobuf field: string title = 5;
|
|
78
|
+
* @generated from protobuf field: string title = 5
|
|
80
79
|
*/
|
|
81
80
|
title: string;
|
|
82
81
|
/**
|
|
83
|
-
* @
|
|
84
|
-
*
|
|
85
|
-
* @generated from protobuf field: string description = 6;
|
|
82
|
+
* @generated from protobuf field: string description = 6
|
|
86
83
|
*/
|
|
87
84
|
description: string;
|
|
88
85
|
/**
|
|
89
|
-
* @generated from protobuf field: optional int32 creator_id = 7
|
|
86
|
+
* @generated from protobuf field: optional int32 creator_id = 7
|
|
90
87
|
*/
|
|
91
88
|
creatorId?: number;
|
|
92
89
|
/**
|
|
93
|
-
* @generated from protobuf field: optional resources.users.UserShort creator = 8
|
|
90
|
+
* @generated from protobuf field: optional resources.users.UserShort creator = 8
|
|
94
91
|
*/
|
|
95
|
-
creator?: UserShort;
|
|
92
|
+
creator?: UserShort;
|
|
96
93
|
/**
|
|
97
|
-
* @generated from protobuf field: resources.common.content.ContentType content_type = 9
|
|
94
|
+
* @generated from protobuf field: resources.common.content.ContentType content_type = 9
|
|
98
95
|
*/
|
|
99
96
|
contentType: ContentType;
|
|
100
97
|
/**
|
|
101
|
-
* @
|
|
102
|
-
*
|
|
103
|
-
* @generated from protobuf field: repeated string tags = 10;
|
|
98
|
+
* @generated from protobuf field: repeated string tags = 10
|
|
104
99
|
*/
|
|
105
100
|
tags: string[];
|
|
106
101
|
/**
|
|
107
|
-
* @generated from protobuf field: optional bool toc = 11
|
|
102
|
+
* @generated from protobuf field: optional bool toc = 11
|
|
108
103
|
*/
|
|
109
104
|
toc?: boolean;
|
|
110
105
|
/**
|
|
111
|
-
* @generated from protobuf field: bool public = 12
|
|
106
|
+
* @generated from protobuf field: bool public = 12
|
|
112
107
|
*/
|
|
113
108
|
public: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* @generated from protobuf field: bool draft = 13
|
|
111
|
+
*/
|
|
112
|
+
draft: boolean;
|
|
114
113
|
}
|
|
115
114
|
/**
|
|
116
115
|
* @generated from protobuf message resources.wiki.PageShort
|
|
117
116
|
*/
|
|
118
117
|
export interface PageShort {
|
|
119
118
|
/**
|
|
120
|
-
* @generated from protobuf field:
|
|
119
|
+
* @generated from protobuf field: int64 id = 1
|
|
121
120
|
*/
|
|
122
|
-
id: number;
|
|
121
|
+
id: number;
|
|
123
122
|
/**
|
|
124
|
-
* @generated from protobuf field: string job = 2
|
|
123
|
+
* @generated from protobuf field: string job = 2
|
|
125
124
|
*/
|
|
126
125
|
job: string;
|
|
127
126
|
/**
|
|
128
|
-
* @generated from protobuf field: optional string job_label = 3
|
|
127
|
+
* @generated from protobuf field: optional string job_label = 3
|
|
129
128
|
*/
|
|
130
129
|
jobLabel?: string;
|
|
131
130
|
/**
|
|
132
|
-
* @generated from protobuf field: optional
|
|
131
|
+
* @generated from protobuf field: optional int64 parent_id = 4
|
|
133
132
|
*/
|
|
134
133
|
parentId?: number;
|
|
135
134
|
/**
|
|
136
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 5
|
|
135
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 5
|
|
137
136
|
*/
|
|
138
137
|
deletedAt?: Timestamp;
|
|
139
138
|
/**
|
|
140
|
-
* @
|
|
141
|
-
*
|
|
142
|
-
* @generated from protobuf field: optional string slug = 6;
|
|
139
|
+
* @generated from protobuf field: optional string slug = 6
|
|
143
140
|
*/
|
|
144
141
|
slug?: string;
|
|
145
142
|
/**
|
|
146
|
-
* @generated from protobuf field: string title = 7
|
|
143
|
+
* @generated from protobuf field: string title = 7
|
|
147
144
|
*/
|
|
148
145
|
title: string;
|
|
149
146
|
/**
|
|
150
|
-
* @generated from protobuf field: string description = 8
|
|
147
|
+
* @generated from protobuf field: string description = 8
|
|
151
148
|
*/
|
|
152
149
|
description: string;
|
|
153
150
|
/**
|
|
154
|
-
* @generated from protobuf field: repeated resources.wiki.PageShort children = 9
|
|
151
|
+
* @generated from protobuf field: repeated resources.wiki.PageShort children = 9
|
|
155
152
|
*/
|
|
156
153
|
children: PageShort[];
|
|
157
154
|
/**
|
|
158
|
-
* @generated from protobuf field: optional resources.wiki.PageRootInfo root_info = 10
|
|
155
|
+
* @generated from protobuf field: optional resources.wiki.PageRootInfo root_info = 10
|
|
159
156
|
*/
|
|
160
157
|
rootInfo?: PageRootInfo;
|
|
158
|
+
/**
|
|
159
|
+
* @generated from protobuf field: optional int32 level = 11
|
|
160
|
+
*/
|
|
161
|
+
level?: number;
|
|
162
|
+
/**
|
|
163
|
+
* @generated from protobuf field: bool draft = 13
|
|
164
|
+
*/
|
|
165
|
+
draft: boolean;
|
|
161
166
|
}
|
|
162
167
|
/**
|
|
163
168
|
* @generated from protobuf message resources.wiki.PageRootInfo
|
|
164
169
|
*/
|
|
165
170
|
export interface PageRootInfo {
|
|
166
171
|
/**
|
|
167
|
-
* @generated from protobuf field: optional
|
|
172
|
+
* @generated from protobuf field: optional int64 logo_file_id = 1
|
|
173
|
+
*/
|
|
174
|
+
logoFileId?: number;
|
|
175
|
+
/**
|
|
176
|
+
* @generated from protobuf field: optional resources.file.File logo = 2
|
|
168
177
|
*/
|
|
169
178
|
logo?: File;
|
|
170
179
|
}
|
|
@@ -172,19 +181,21 @@ export interface PageRootInfo {
|
|
|
172
181
|
class Page$Type extends MessageType<Page> {
|
|
173
182
|
constructor() {
|
|
174
183
|
super("resources.wiki.Page", [
|
|
175
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
176
|
-
{ no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
177
|
-
{ no: 3, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
178
|
-
{ no: 4, name: "parent_id", kind: "scalar", opt: true, T:
|
|
179
|
-
{ no: 5, name: "meta", kind: "message", T: () => PageMeta, options: { "validate.
|
|
184
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
|
|
185
|
+
{ no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
186
|
+
{ no: 3, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
187
|
+
{ no: 4, name: "parent_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
188
|
+
{ no: 5, name: "meta", kind: "message", T: () => PageMeta, options: { "buf.validate.field": { required: true } } },
|
|
180
189
|
{ no: 6, name: "content", kind: "message", T: () => Content },
|
|
181
|
-
{ no: 7, name: "access", kind: "message", T: () => PageAccess, options: { "validate.
|
|
190
|
+
{ no: 7, name: "access", kind: "message", T: () => PageAccess, options: { "buf.validate.field": { required: true } } },
|
|
191
|
+
{ no: 8, name: "files", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => File, options: { "tagger.tags": "alias:\"files\"" } }
|
|
182
192
|
]);
|
|
183
193
|
}
|
|
184
194
|
create(value?: PartialMessage<Page>): Page {
|
|
185
195
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
186
196
|
message.id = 0;
|
|
187
197
|
message.job = "";
|
|
198
|
+
message.files = [];
|
|
188
199
|
if (value !== undefined)
|
|
189
200
|
reflectionMergePartial<Page>(this, message, value);
|
|
190
201
|
return message;
|
|
@@ -194,8 +205,8 @@ class Page$Type extends MessageType<Page> {
|
|
|
194
205
|
while (reader.pos < end) {
|
|
195
206
|
let [fieldNo, wireType] = reader.tag();
|
|
196
207
|
switch (fieldNo) {
|
|
197
|
-
case /*
|
|
198
|
-
message.id = reader.
|
|
208
|
+
case /* int64 id */ 1:
|
|
209
|
+
message.id = reader.int64().toNumber();
|
|
199
210
|
break;
|
|
200
211
|
case /* string job */ 2:
|
|
201
212
|
message.job = reader.string();
|
|
@@ -203,8 +214,8 @@ class Page$Type extends MessageType<Page> {
|
|
|
203
214
|
case /* optional string job_label */ 3:
|
|
204
215
|
message.jobLabel = reader.string();
|
|
205
216
|
break;
|
|
206
|
-
case /* optional
|
|
207
|
-
message.parentId = reader.
|
|
217
|
+
case /* optional int64 parent_id */ 4:
|
|
218
|
+
message.parentId = reader.int64().toNumber();
|
|
208
219
|
break;
|
|
209
220
|
case /* resources.wiki.PageMeta meta */ 5:
|
|
210
221
|
message.meta = PageMeta.internalBinaryRead(reader, reader.uint32(), options, message.meta);
|
|
@@ -215,6 +226,9 @@ class Page$Type extends MessageType<Page> {
|
|
|
215
226
|
case /* resources.wiki.PageAccess access */ 7:
|
|
216
227
|
message.access = PageAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
|
|
217
228
|
break;
|
|
229
|
+
case /* repeated resources.file.File files */ 8:
|
|
230
|
+
message.files.push(File.internalBinaryRead(reader, reader.uint32(), options));
|
|
231
|
+
break;
|
|
218
232
|
default:
|
|
219
233
|
let u = options.readUnknownField;
|
|
220
234
|
if (u === "throw")
|
|
@@ -227,18 +241,18 @@ class Page$Type extends MessageType<Page> {
|
|
|
227
241
|
return message;
|
|
228
242
|
}
|
|
229
243
|
internalBinaryWrite(message: Page, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
230
|
-
/*
|
|
244
|
+
/* int64 id = 1; */
|
|
231
245
|
if (message.id !== 0)
|
|
232
|
-
writer.tag(1, WireType.Varint).
|
|
246
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
233
247
|
/* string job = 2; */
|
|
234
248
|
if (message.job !== "")
|
|
235
249
|
writer.tag(2, WireType.LengthDelimited).string(message.job);
|
|
236
250
|
/* optional string job_label = 3; */
|
|
237
251
|
if (message.jobLabel !== undefined)
|
|
238
252
|
writer.tag(3, WireType.LengthDelimited).string(message.jobLabel);
|
|
239
|
-
/* optional
|
|
253
|
+
/* optional int64 parent_id = 4; */
|
|
240
254
|
if (message.parentId !== undefined)
|
|
241
|
-
writer.tag(4, WireType.Varint).
|
|
255
|
+
writer.tag(4, WireType.Varint).int64(message.parentId);
|
|
242
256
|
/* resources.wiki.PageMeta meta = 5; */
|
|
243
257
|
if (message.meta)
|
|
244
258
|
PageMeta.internalBinaryWrite(message.meta, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -248,6 +262,9 @@ class Page$Type extends MessageType<Page> {
|
|
|
248
262
|
/* resources.wiki.PageAccess access = 7; */
|
|
249
263
|
if (message.access)
|
|
250
264
|
PageAccess.internalBinaryWrite(message.access, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
265
|
+
/* repeated resources.file.File files = 8; */
|
|
266
|
+
for (let i = 0; i < message.files.length; i++)
|
|
267
|
+
File.internalBinaryWrite(message.files[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
251
268
|
let u = options.writeUnknownFields;
|
|
252
269
|
if (u !== false)
|
|
253
270
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -265,15 +282,16 @@ class PageMeta$Type extends MessageType<PageMeta> {
|
|
|
265
282
|
{ no: 1, name: "created_at", kind: "message", T: () => Timestamp },
|
|
266
283
|
{ no: 2, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
267
284
|
{ no: 3, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
268
|
-
{ no: 4, name: "slug", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
269
|
-
{ no: 5, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
270
|
-
{ no: 6, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
271
|
-
{ no: 7, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
272
|
-
{ no: 8, name: "creator", kind: "message", T: () => UserShort },
|
|
273
|
-
{ no: 9, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "validate.
|
|
274
|
-
{ no: 10, name: "tags", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING
|
|
285
|
+
{ no: 4, name: "slug", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "100" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
286
|
+
{ no: 5, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "1024" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
287
|
+
{ no: 6, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
288
|
+
{ no: 7, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
289
|
+
{ no: 8, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
|
|
290
|
+
{ no: 9, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
291
|
+
{ no: 10, name: "tags", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
275
292
|
{ no: 11, name: "toc", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
276
|
-
{ no: 12, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
293
|
+
{ no: 12, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
294
|
+
{ no: 13, name: "draft", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
277
295
|
]);
|
|
278
296
|
}
|
|
279
297
|
create(value?: PartialMessage<PageMeta>): PageMeta {
|
|
@@ -283,6 +301,7 @@ class PageMeta$Type extends MessageType<PageMeta> {
|
|
|
283
301
|
message.contentType = 0;
|
|
284
302
|
message.tags = [];
|
|
285
303
|
message.public = false;
|
|
304
|
+
message.draft = false;
|
|
286
305
|
if (value !== undefined)
|
|
287
306
|
reflectionMergePartial<PageMeta>(this, message, value);
|
|
288
307
|
return message;
|
|
@@ -328,6 +347,9 @@ class PageMeta$Type extends MessageType<PageMeta> {
|
|
|
328
347
|
case /* bool public */ 12:
|
|
329
348
|
message.public = reader.bool();
|
|
330
349
|
break;
|
|
350
|
+
case /* bool draft */ 13:
|
|
351
|
+
message.draft = reader.bool();
|
|
352
|
+
break;
|
|
331
353
|
default:
|
|
332
354
|
let u = options.readUnknownField;
|
|
333
355
|
if (u === "throw")
|
|
@@ -376,6 +398,9 @@ class PageMeta$Type extends MessageType<PageMeta> {
|
|
|
376
398
|
/* bool public = 12; */
|
|
377
399
|
if (message.public !== false)
|
|
378
400
|
writer.tag(12, WireType.Varint).bool(message.public);
|
|
401
|
+
/* bool draft = 13; */
|
|
402
|
+
if (message.draft !== false)
|
|
403
|
+
writer.tag(13, WireType.Varint).bool(message.draft);
|
|
379
404
|
let u = options.writeUnknownFields;
|
|
380
405
|
if (u !== false)
|
|
381
406
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -390,16 +415,18 @@ export const PageMeta = new PageMeta$Type();
|
|
|
390
415
|
class PageShort$Type extends MessageType<PageShort> {
|
|
391
416
|
constructor() {
|
|
392
417
|
super("resources.wiki.PageShort", [
|
|
393
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
394
|
-
{ no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
395
|
-
{ no: 3, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
396
|
-
{ no: 4, name: "parent_id", kind: "scalar", opt: true, T:
|
|
418
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
|
|
419
|
+
{ no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
420
|
+
{ no: 3, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
421
|
+
{ no: 4, name: "parent_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
397
422
|
{ no: 5, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
398
|
-
{ no: 6, name: "slug", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
423
|
+
{ no: 6, name: "slug", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "100" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
399
424
|
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
400
425
|
{ no: 8, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
401
426
|
{ no: 9, name: "children", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PageShort },
|
|
402
|
-
{ no: 10, name: "root_info", kind: "message", T: () => PageRootInfo }
|
|
427
|
+
{ no: 10, name: "root_info", kind: "message", T: () => PageRootInfo },
|
|
428
|
+
{ no: 11, name: "level", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
429
|
+
{ no: 13, name: "draft", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
403
430
|
]);
|
|
404
431
|
}
|
|
405
432
|
create(value?: PartialMessage<PageShort>): PageShort {
|
|
@@ -409,6 +436,7 @@ class PageShort$Type extends MessageType<PageShort> {
|
|
|
409
436
|
message.title = "";
|
|
410
437
|
message.description = "";
|
|
411
438
|
message.children = [];
|
|
439
|
+
message.draft = false;
|
|
412
440
|
if (value !== undefined)
|
|
413
441
|
reflectionMergePartial<PageShort>(this, message, value);
|
|
414
442
|
return message;
|
|
@@ -418,8 +446,8 @@ class PageShort$Type extends MessageType<PageShort> {
|
|
|
418
446
|
while (reader.pos < end) {
|
|
419
447
|
let [fieldNo, wireType] = reader.tag();
|
|
420
448
|
switch (fieldNo) {
|
|
421
|
-
case /*
|
|
422
|
-
message.id = reader.
|
|
449
|
+
case /* int64 id */ 1:
|
|
450
|
+
message.id = reader.int64().toNumber();
|
|
423
451
|
break;
|
|
424
452
|
case /* string job */ 2:
|
|
425
453
|
message.job = reader.string();
|
|
@@ -427,8 +455,8 @@ class PageShort$Type extends MessageType<PageShort> {
|
|
|
427
455
|
case /* optional string job_label */ 3:
|
|
428
456
|
message.jobLabel = reader.string();
|
|
429
457
|
break;
|
|
430
|
-
case /* optional
|
|
431
|
-
message.parentId = reader.
|
|
458
|
+
case /* optional int64 parent_id */ 4:
|
|
459
|
+
message.parentId = reader.int64().toNumber();
|
|
432
460
|
break;
|
|
433
461
|
case /* optional resources.timestamp.Timestamp deleted_at */ 5:
|
|
434
462
|
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
@@ -448,6 +476,12 @@ class PageShort$Type extends MessageType<PageShort> {
|
|
|
448
476
|
case /* optional resources.wiki.PageRootInfo root_info */ 10:
|
|
449
477
|
message.rootInfo = PageRootInfo.internalBinaryRead(reader, reader.uint32(), options, message.rootInfo);
|
|
450
478
|
break;
|
|
479
|
+
case /* optional int32 level */ 11:
|
|
480
|
+
message.level = reader.int32();
|
|
481
|
+
break;
|
|
482
|
+
case /* bool draft */ 13:
|
|
483
|
+
message.draft = reader.bool();
|
|
484
|
+
break;
|
|
451
485
|
default:
|
|
452
486
|
let u = options.readUnknownField;
|
|
453
487
|
if (u === "throw")
|
|
@@ -460,18 +494,18 @@ class PageShort$Type extends MessageType<PageShort> {
|
|
|
460
494
|
return message;
|
|
461
495
|
}
|
|
462
496
|
internalBinaryWrite(message: PageShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
463
|
-
/*
|
|
497
|
+
/* int64 id = 1; */
|
|
464
498
|
if (message.id !== 0)
|
|
465
|
-
writer.tag(1, WireType.Varint).
|
|
499
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
466
500
|
/* string job = 2; */
|
|
467
501
|
if (message.job !== "")
|
|
468
502
|
writer.tag(2, WireType.LengthDelimited).string(message.job);
|
|
469
503
|
/* optional string job_label = 3; */
|
|
470
504
|
if (message.jobLabel !== undefined)
|
|
471
505
|
writer.tag(3, WireType.LengthDelimited).string(message.jobLabel);
|
|
472
|
-
/* optional
|
|
506
|
+
/* optional int64 parent_id = 4; */
|
|
473
507
|
if (message.parentId !== undefined)
|
|
474
|
-
writer.tag(4, WireType.Varint).
|
|
508
|
+
writer.tag(4, WireType.Varint).int64(message.parentId);
|
|
475
509
|
/* optional resources.timestamp.Timestamp deleted_at = 5; */
|
|
476
510
|
if (message.deletedAt)
|
|
477
511
|
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -490,6 +524,12 @@ class PageShort$Type extends MessageType<PageShort> {
|
|
|
490
524
|
/* optional resources.wiki.PageRootInfo root_info = 10; */
|
|
491
525
|
if (message.rootInfo)
|
|
492
526
|
PageRootInfo.internalBinaryWrite(message.rootInfo, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
527
|
+
/* optional int32 level = 11; */
|
|
528
|
+
if (message.level !== undefined)
|
|
529
|
+
writer.tag(11, WireType.Varint).int32(message.level);
|
|
530
|
+
/* bool draft = 13; */
|
|
531
|
+
if (message.draft !== false)
|
|
532
|
+
writer.tag(13, WireType.Varint).bool(message.draft);
|
|
493
533
|
let u = options.writeUnknownFields;
|
|
494
534
|
if (u !== false)
|
|
495
535
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -504,7 +544,8 @@ export const PageShort = new PageShort$Type();
|
|
|
504
544
|
class PageRootInfo$Type extends MessageType<PageRootInfo> {
|
|
505
545
|
constructor() {
|
|
506
546
|
super("resources.wiki.PageRootInfo", [
|
|
507
|
-
{ no: 1, name: "
|
|
547
|
+
{ no: 1, name: "logo_file_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
548
|
+
{ no: 2, name: "logo", kind: "message", T: () => File, options: { "tagger.tags": "alias:\"logo\"" } }
|
|
508
549
|
]);
|
|
509
550
|
}
|
|
510
551
|
create(value?: PartialMessage<PageRootInfo>): PageRootInfo {
|
|
@@ -518,7 +559,10 @@ class PageRootInfo$Type extends MessageType<PageRootInfo> {
|
|
|
518
559
|
while (reader.pos < end) {
|
|
519
560
|
let [fieldNo, wireType] = reader.tag();
|
|
520
561
|
switch (fieldNo) {
|
|
521
|
-
case /* optional
|
|
562
|
+
case /* optional int64 logo_file_id */ 1:
|
|
563
|
+
message.logoFileId = reader.int64().toNumber();
|
|
564
|
+
break;
|
|
565
|
+
case /* optional resources.file.File logo */ 2:
|
|
522
566
|
message.logo = File.internalBinaryRead(reader, reader.uint32(), options, message.logo);
|
|
523
567
|
break;
|
|
524
568
|
default:
|
|
@@ -533,9 +577,12 @@ class PageRootInfo$Type extends MessageType<PageRootInfo> {
|
|
|
533
577
|
return message;
|
|
534
578
|
}
|
|
535
579
|
internalBinaryWrite(message: PageRootInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
536
|
-
/* optional
|
|
580
|
+
/* optional int64 logo_file_id = 1; */
|
|
581
|
+
if (message.logoFileId !== undefined)
|
|
582
|
+
writer.tag(1, WireType.Varint).int64(message.logoFileId);
|
|
583
|
+
/* optional resources.file.File logo = 2; */
|
|
537
584
|
if (message.logo)
|
|
538
|
-
File.internalBinaryWrite(message.logo, writer.tag(
|
|
585
|
+
File.internalBinaryWrite(message.logo, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
539
586
|
let u = options.writeUnknownFields;
|
|
540
587
|
if (u !== false)
|
|
541
588
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|