@fivenet-app/gen 2025.5.2 → 2025.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/buf/validate/validate.ts +11301 -0
- package/clients.ts +157 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +208 -0
- package/codegen/sanitizer/sanitizer.ts +80 -0
- package/google/protobuf/any.ts +4 -3
- package/google/protobuf/descriptor.ts +393 -239
- package/google/protobuf/duration.ts +4 -3
- package/google/protobuf/struct.ts +485 -0
- package/google/protobuf/timestamp.ts +4 -3
- package/package.json +3 -3
- package/perms.ts +85 -159
- package/resources/accounts/accounts.ts +26 -25
- package/resources/accounts/oauth2.ts +30 -29
- package/resources/audit/audit.ts +36 -35
- package/resources/calendar/access.ts +49 -48
- package/resources/calendar/calendar.ts +122 -126
- package/resources/centrum/access.ts +345 -0
- package/resources/centrum/attributes.ts +8 -11
- package/resources/centrum/dispatchers.ts +149 -0
- package/resources/centrum/dispatches.ts +252 -115
- package/resources/centrum/settings.ts +384 -34
- package/resources/centrum/units.ts +112 -92
- package/resources/centrum/units_access.ts +54 -55
- package/resources/clientconfig/clientconfig.ts +890 -0
- package/resources/collab/collab.ts +817 -0
- package/resources/common/content/content.ts +113 -30
- package/resources/common/cron/cron.ts +43 -31
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- package/resources/common/grpcws/grpcws.ts +24 -23
- package/resources/common/i18n.ts +20 -24
- package/resources/common/id_mapping.ts +69 -0
- package/resources/common/tests/objects.ts +4 -3
- package/resources/common/uuid.ts +4 -3
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/access.ts +52 -53
- package/resources/documents/activity.ts +235 -58
- package/resources/documents/category.ts +20 -27
- package/resources/documents/comment.ts +26 -25
- package/resources/documents/documents.ts +335 -262
- package/resources/documents/pins.ts +127 -0
- package/resources/documents/requests.ts +31 -30
- package/resources/documents/signoff.ts +55 -0
- package/resources/documents/state.ts +69 -0
- package/resources/documents/templates.ts +119 -136
- package/resources/documents/workflow.ts +35 -24
- package/resources/file/file.ts +152 -0
- package/{services/settings → resources/file}/filestore.ts +179 -165
- package/resources/file/meta.ts +148 -0
- package/resources/jobs/activity.ts +39 -42
- package/resources/jobs/colleagues.ts +67 -60
- package/resources/jobs/conduct.ts +29 -30
- package/resources/jobs/job_props.ts +46 -48
- package/resources/jobs/job_settings.ts +45 -52
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/labels.ts +21 -22
- package/resources/jobs/timeclock.ts +26 -25
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → marker_marker.ts} +43 -310
- package/resources/livemap/user_marker.ts +298 -0
- package/resources/mailer/access.ts +75 -74
- package/resources/mailer/email.ts +24 -27
- package/resources/mailer/events.ts +25 -24
- package/resources/mailer/message.ts +45 -50
- package/resources/mailer/settings.ts +12 -15
- package/resources/mailer/template.ts +25 -28
- package/resources/mailer/thread.ts +70 -71
- package/resources/notifications/client_view.ts +239 -0
- package/resources/notifications/events.ts +50 -101
- package/resources/notifications/notifications.ts +52 -57
- package/resources/permissions/attributes.ts +63 -206
- package/resources/permissions/events.ts +149 -0
- package/resources/permissions/permissions.ts +103 -34
- package/resources/qualifications/access.ts +27 -26
- package/resources/qualifications/exam.ts +188 -126
- package/resources/qualifications/qualifications.ts +370 -303
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +163 -79
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +3 -2
- package/resources/sync/activity.ts +24 -23
- package/resources/sync/data.ts +94 -26
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/user_info.ts +464 -0
- package/resources/users/activity.ts +80 -85
- package/resources/users/labels.ts +18 -21
- package/resources/users/licenses.ts +9 -8
- package/resources/users/props.ts +61 -51
- package/resources/users/users.ts +100 -78
- package/resources/vehicles/activity.ts +231 -0
- package/resources/vehicles/props.ts +103 -0
- package/resources/vehicles/vehicles.ts +28 -15
- package/resources/wiki/access.ts +49 -48
- package/resources/wiki/activity.ts +133 -51
- package/resources/wiki/page.ts +134 -87
- package/services/auth/auth.client.ts +24 -27
- package/services/auth/auth.ts +222 -195
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +110 -109
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +701 -298
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +183 -93
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +65 -44
- package/services/documents/collab.client.ts +46 -0
- package/services/documents/collab.ts +13 -0
- package/services/documents/documents.client.ts +88 -217
- package/services/documents/documents.ts +490 -508
- package/services/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +10 -25
- package/services/jobs/conduct.ts +36 -35
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +108 -91
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +47 -46
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +290 -119
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +213 -216
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +117 -74
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +181 -175
- package/services/settings/accounts.client.ts +10 -25
- package/services/settings/accounts.ts +64 -41
- package/services/settings/config.client.ts +6 -13
- package/services/settings/config.ts +8 -7
- package/services/settings/cron.client.ts +4 -7
- package/services/settings/cron.ts +4 -3
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +29 -28
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +190 -607
- package/services/settings/system.client.ts +90 -0
- package/services/settings/system.ts +618 -0
- package/services/stats/stats.client.ts +4 -3
- package/services/stats/stats.ts +4 -3
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +82 -52
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +169 -24
- package/services/wiki/collab.client.ts +46 -0
- package/services/wiki/collab.ts +13 -0
- package/services/wiki/wiki.client.ts +28 -37
- package/services/wiki/wiki.ts +93 -63
- package/svcs.ts +79 -103
- package/resources/centrum/disponents.ts +0 -81
- package/resources/filestore/file.ts +0 -204
- package/resources/internet/access.ts +0 -358
- package/resources/internet/ads.ts +0 -257
- package/resources/internet/domain.ts +0 -328
- package/resources/internet/page.ts +0 -428
- package/resources/internet/search.ts +0 -128
- package/resources/livemap/tracker.ts +0 -81
- package/services/internet/ads.client.ts +0 -41
- package/services/internet/ads.ts +0 -145
- package/services/internet/domain.client.ts +0 -109
- package/services/internet/domain.ts +0 -658
- package/services/internet/internet.client.ts +0 -58
- package/services/internet/internet.ts +0 -268
- package/services/notificator/notificator.client.ts +0 -76
- package/services/settings/filestore.client.ts +0 -75
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
2
|
// @generated from protobuf file "resources/documents/documents.proto" (package "resources.documents", 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";
|
|
@@ -11,6 +12,8 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
|
11
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
13
14
|
import { Workflow } from "./workflow";
|
|
15
|
+
import { File } from "../file/file";
|
|
16
|
+
import { DocumentPin } from "./pins";
|
|
14
17
|
import { UserShort } from "../users/users";
|
|
15
18
|
import { Content } from "../common/content/content";
|
|
16
19
|
import { ContentType } from "../common/content/content";
|
|
@@ -21,176 +24,180 @@ import { Timestamp } from "../timestamp/timestamp";
|
|
|
21
24
|
*/
|
|
22
25
|
export interface Document {
|
|
23
26
|
/**
|
|
24
|
-
* @generated from protobuf field:
|
|
27
|
+
* @generated from protobuf field: int64 id = 1
|
|
25
28
|
*/
|
|
26
29
|
id: number;
|
|
27
30
|
/**
|
|
28
|
-
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
31
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
29
32
|
*/
|
|
30
33
|
createdAt?: Timestamp;
|
|
31
34
|
/**
|
|
32
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
35
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
33
36
|
*/
|
|
34
37
|
updatedAt?: Timestamp;
|
|
35
38
|
/**
|
|
36
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
39
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
37
40
|
*/
|
|
38
41
|
deletedAt?: Timestamp;
|
|
39
42
|
/**
|
|
40
|
-
* @generated from protobuf field: optional
|
|
43
|
+
* @generated from protobuf field: optional int64 category_id = 5
|
|
41
44
|
*/
|
|
42
45
|
categoryId?: number;
|
|
43
46
|
/**
|
|
44
|
-
* @generated from protobuf field: optional resources.documents.Category category = 6
|
|
47
|
+
* @generated from protobuf field: optional resources.documents.Category category = 6
|
|
45
48
|
*/
|
|
46
|
-
category?: Category;
|
|
49
|
+
category?: Category;
|
|
47
50
|
/**
|
|
48
|
-
* @
|
|
49
|
-
*
|
|
50
|
-
* @generated from protobuf field: string title = 7;
|
|
51
|
+
* @generated from protobuf field: string title = 7
|
|
51
52
|
*/
|
|
52
53
|
title: string;
|
|
53
54
|
/**
|
|
54
|
-
* @generated from protobuf field: resources.common.content.ContentType content_type = 8
|
|
55
|
+
* @generated from protobuf field: resources.common.content.ContentType content_type = 8
|
|
55
56
|
*/
|
|
56
|
-
contentType: ContentType;
|
|
57
|
+
contentType: ContentType;
|
|
57
58
|
/**
|
|
58
|
-
* @generated from protobuf field: resources.common.content.Content content = 9
|
|
59
|
+
* @generated from protobuf field: resources.common.content.Content content = 9
|
|
59
60
|
*/
|
|
60
61
|
content?: Content;
|
|
61
62
|
/**
|
|
62
|
-
* @
|
|
63
|
-
*
|
|
64
|
-
* @generated from protobuf field: optional string data = 10;
|
|
63
|
+
* @generated from protobuf field: optional string data = 10
|
|
65
64
|
*/
|
|
66
|
-
data?: string;
|
|
65
|
+
data?: string;
|
|
67
66
|
/**
|
|
68
|
-
* @generated from protobuf field: optional int32 creator_id = 11
|
|
67
|
+
* @generated from protobuf field: optional int32 creator_id = 11
|
|
69
68
|
*/
|
|
70
69
|
creatorId?: number;
|
|
71
70
|
/**
|
|
72
|
-
* @generated from protobuf field: optional resources.users.UserShort creator = 12
|
|
71
|
+
* @generated from protobuf field: optional resources.users.UserShort creator = 12
|
|
73
72
|
*/
|
|
74
|
-
creator?: UserShort;
|
|
73
|
+
creator?: UserShort;
|
|
75
74
|
/**
|
|
76
|
-
* @generated from protobuf field: string creator_job = 13
|
|
75
|
+
* @generated from protobuf field: string creator_job = 13
|
|
77
76
|
*/
|
|
78
77
|
creatorJob: string;
|
|
79
78
|
/**
|
|
80
|
-
* @generated from protobuf field: optional string creator_job_label = 14
|
|
79
|
+
* @generated from protobuf field: optional string creator_job_label = 14
|
|
81
80
|
*/
|
|
82
81
|
creatorJobLabel?: string;
|
|
83
82
|
/**
|
|
84
|
-
* @
|
|
85
|
-
*
|
|
86
|
-
* @generated from protobuf field: string state = 15;
|
|
83
|
+
* @generated from protobuf field: string state = 15
|
|
87
84
|
*/
|
|
88
85
|
state: string;
|
|
89
86
|
/**
|
|
90
|
-
* @generated from protobuf field: bool closed = 16
|
|
87
|
+
* @generated from protobuf field: bool closed = 16
|
|
91
88
|
*/
|
|
92
89
|
closed: boolean;
|
|
93
90
|
/**
|
|
94
|
-
* @generated from protobuf field: bool
|
|
91
|
+
* @generated from protobuf field: bool draft = 17
|
|
92
|
+
*/
|
|
93
|
+
draft: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* @generated from protobuf field: bool public = 18
|
|
95
96
|
*/
|
|
96
97
|
public: boolean;
|
|
97
98
|
/**
|
|
98
|
-
* @generated from protobuf field: optional
|
|
99
|
+
* @generated from protobuf field: optional int64 template_id = 19
|
|
99
100
|
*/
|
|
100
101
|
templateId?: number;
|
|
101
102
|
/**
|
|
102
|
-
* @generated from protobuf field:
|
|
103
|
+
* @generated from protobuf field: optional resources.documents.DocumentPin pin = 20
|
|
103
104
|
*/
|
|
104
|
-
|
|
105
|
+
pin?: DocumentPin;
|
|
105
106
|
/**
|
|
106
|
-
* @generated from protobuf field: optional resources.documents.WorkflowState workflow_state =
|
|
107
|
+
* @generated from protobuf field: optional resources.documents.WorkflowState workflow_state = 21
|
|
107
108
|
*/
|
|
108
109
|
workflowState?: WorkflowState;
|
|
109
110
|
/**
|
|
110
|
-
* @generated from protobuf field: optional resources.documents.WorkflowUserState workflow_user =
|
|
111
|
+
* @generated from protobuf field: optional resources.documents.WorkflowUserState workflow_user = 22
|
|
111
112
|
*/
|
|
112
113
|
workflowUser?: WorkflowUserState;
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf field: repeated resources.file.File files = 23
|
|
116
|
+
*/
|
|
117
|
+
files: File[];
|
|
113
118
|
}
|
|
114
119
|
/**
|
|
115
120
|
* @generated from protobuf message resources.documents.DocumentShort
|
|
116
121
|
*/
|
|
117
122
|
export interface DocumentShort {
|
|
118
123
|
/**
|
|
119
|
-
* @generated from protobuf field:
|
|
124
|
+
* @generated from protobuf field: int64 id = 1
|
|
120
125
|
*/
|
|
121
126
|
id: number;
|
|
122
127
|
/**
|
|
123
|
-
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
128
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
124
129
|
*/
|
|
125
130
|
createdAt?: Timestamp;
|
|
126
131
|
/**
|
|
127
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
132
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
128
133
|
*/
|
|
129
134
|
updatedAt?: Timestamp;
|
|
130
135
|
/**
|
|
131
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
136
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
132
137
|
*/
|
|
133
138
|
deletedAt?: Timestamp;
|
|
134
139
|
/**
|
|
135
|
-
* @generated from protobuf field: optional
|
|
140
|
+
* @generated from protobuf field: optional int64 category_id = 5
|
|
136
141
|
*/
|
|
137
142
|
categoryId?: number;
|
|
138
143
|
/**
|
|
139
|
-
* @generated from protobuf field: optional resources.documents.Category category = 6
|
|
144
|
+
* @generated from protobuf field: optional resources.documents.Category category = 6
|
|
140
145
|
*/
|
|
141
|
-
category?: Category;
|
|
146
|
+
category?: Category;
|
|
142
147
|
/**
|
|
143
|
-
* @
|
|
144
|
-
*
|
|
145
|
-
* @generated from protobuf field: string title = 7;
|
|
148
|
+
* @generated from protobuf field: string title = 7
|
|
146
149
|
*/
|
|
147
150
|
title: string;
|
|
148
151
|
/**
|
|
149
|
-
* @generated from protobuf field: resources.common.content.ContentType content_type = 8
|
|
152
|
+
* @generated from protobuf field: resources.common.content.ContentType content_type = 8
|
|
150
153
|
*/
|
|
151
|
-
contentType: ContentType;
|
|
154
|
+
contentType: ContentType;
|
|
152
155
|
/**
|
|
153
|
-
* @
|
|
154
|
-
*
|
|
155
|
-
* @generated from protobuf field: resources.common.content.Content content = 9;
|
|
156
|
+
* @generated from protobuf field: resources.common.content.Content content = 9
|
|
156
157
|
*/
|
|
157
158
|
content?: Content;
|
|
158
159
|
/**
|
|
159
|
-
* @generated from protobuf field: optional int32 creator_id =
|
|
160
|
+
* @generated from protobuf field: optional int32 creator_id = 11
|
|
160
161
|
*/
|
|
161
162
|
creatorId?: number;
|
|
162
163
|
/**
|
|
163
|
-
* @generated from protobuf field: optional resources.users.UserShort creator =
|
|
164
|
+
* @generated from protobuf field: optional resources.users.UserShort creator = 12
|
|
164
165
|
*/
|
|
165
|
-
creator?: UserShort;
|
|
166
|
+
creator?: UserShort;
|
|
166
167
|
/**
|
|
167
|
-
* @generated from protobuf field: string creator_job =
|
|
168
|
+
* @generated from protobuf field: string creator_job = 13
|
|
168
169
|
*/
|
|
169
|
-
creatorJob: string;
|
|
170
|
+
creatorJob: string;
|
|
170
171
|
/**
|
|
171
|
-
* @generated from protobuf field: optional string creator_job_label =
|
|
172
|
+
* @generated from protobuf field: optional string creator_job_label = 14
|
|
172
173
|
*/
|
|
173
174
|
creatorJobLabel?: string;
|
|
174
175
|
/**
|
|
175
|
-
* @
|
|
176
|
-
*
|
|
177
|
-
* @generated from protobuf field: string state = 14;
|
|
176
|
+
* @generated from protobuf field: string state = 15
|
|
178
177
|
*/
|
|
179
|
-
state: string;
|
|
178
|
+
state: string;
|
|
180
179
|
/**
|
|
181
|
-
* @generated from protobuf field: bool closed =
|
|
180
|
+
* @generated from protobuf field: bool closed = 16
|
|
182
181
|
*/
|
|
183
182
|
closed: boolean;
|
|
184
183
|
/**
|
|
185
|
-
* @generated from protobuf field: bool
|
|
184
|
+
* @generated from protobuf field: bool draft = 17
|
|
185
|
+
*/
|
|
186
|
+
draft: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* @generated from protobuf field: bool public = 18
|
|
186
189
|
*/
|
|
187
190
|
public: boolean;
|
|
188
191
|
/**
|
|
189
|
-
* @generated from protobuf field: optional resources.documents.
|
|
192
|
+
* @generated from protobuf field: optional resources.documents.DocumentPin pin = 20
|
|
193
|
+
*/
|
|
194
|
+
pin?: DocumentPin;
|
|
195
|
+
/**
|
|
196
|
+
* @generated from protobuf field: optional resources.documents.WorkflowState workflow_state = 21
|
|
190
197
|
*/
|
|
191
198
|
workflowState?: WorkflowState;
|
|
192
199
|
/**
|
|
193
|
-
* @generated from protobuf field: optional resources.documents.WorkflowUserState workflow_user =
|
|
200
|
+
* @generated from protobuf field: optional resources.documents.WorkflowUserState workflow_user = 22
|
|
194
201
|
*/
|
|
195
202
|
workflowUser?: WorkflowUserState;
|
|
196
203
|
}
|
|
@@ -199,109 +206,113 @@ export interface DocumentShort {
|
|
|
199
206
|
*/
|
|
200
207
|
export interface DocumentReference {
|
|
201
208
|
/**
|
|
202
|
-
* @generated from protobuf field: optional
|
|
209
|
+
* @generated from protobuf field: optional int64 id = 1
|
|
203
210
|
*/
|
|
204
211
|
id?: number;
|
|
205
212
|
/**
|
|
206
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
213
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
207
214
|
*/
|
|
208
215
|
createdAt?: Timestamp;
|
|
209
216
|
/**
|
|
210
|
-
* @generated from protobuf field:
|
|
217
|
+
* @generated from protobuf field: int64 source_document_id = 3
|
|
211
218
|
*/
|
|
212
|
-
sourceDocumentId: number;
|
|
219
|
+
sourceDocumentId: number;
|
|
213
220
|
/**
|
|
214
|
-
* @generated from protobuf field: optional resources.documents.DocumentShort source_document = 4
|
|
221
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort source_document = 4
|
|
215
222
|
*/
|
|
216
|
-
sourceDocument?: DocumentShort;
|
|
223
|
+
sourceDocument?: DocumentShort;
|
|
217
224
|
/**
|
|
218
|
-
* @generated from protobuf field: resources.documents.DocReference reference = 5
|
|
225
|
+
* @generated from protobuf field: resources.documents.DocReference reference = 5
|
|
219
226
|
*/
|
|
220
|
-
reference: DocReference;
|
|
227
|
+
reference: DocReference;
|
|
221
228
|
/**
|
|
222
|
-
* @generated from protobuf field:
|
|
229
|
+
* @generated from protobuf field: int64 target_document_id = 6
|
|
223
230
|
*/
|
|
224
|
-
targetDocumentId: number;
|
|
231
|
+
targetDocumentId: number;
|
|
225
232
|
/**
|
|
226
|
-
* @generated from protobuf field: optional resources.documents.DocumentShort target_document = 7
|
|
233
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort target_document = 7
|
|
227
234
|
*/
|
|
228
|
-
targetDocument?: DocumentShort;
|
|
235
|
+
targetDocument?: DocumentShort;
|
|
229
236
|
/**
|
|
230
|
-
* @generated from protobuf field: optional int32 creator_id = 8
|
|
237
|
+
* @generated from protobuf field: optional int32 creator_id = 8
|
|
231
238
|
*/
|
|
232
239
|
creatorId?: number;
|
|
233
240
|
/**
|
|
234
|
-
* @generated from protobuf field: optional resources.users.UserShort creator = 9
|
|
241
|
+
* @generated from protobuf field: optional resources.users.UserShort creator = 9
|
|
235
242
|
*/
|
|
236
|
-
creator?: UserShort;
|
|
243
|
+
creator?: UserShort;
|
|
237
244
|
}
|
|
238
245
|
/**
|
|
239
246
|
* @generated from protobuf message resources.documents.DocumentRelation
|
|
240
247
|
*/
|
|
241
248
|
export interface DocumentRelation {
|
|
242
249
|
/**
|
|
243
|
-
* @generated from protobuf field: optional
|
|
250
|
+
* @generated from protobuf field: optional int64 id = 1
|
|
244
251
|
*/
|
|
245
252
|
id?: number;
|
|
246
253
|
/**
|
|
247
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
254
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
|
|
248
255
|
*/
|
|
249
256
|
createdAt?: Timestamp;
|
|
250
257
|
/**
|
|
251
|
-
* @generated from protobuf field:
|
|
258
|
+
* @generated from protobuf field: int64 document_id = 3
|
|
252
259
|
*/
|
|
253
260
|
documentId: number;
|
|
254
261
|
/**
|
|
255
|
-
* @generated from protobuf field: optional resources.documents.DocumentShort document = 4
|
|
262
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort document = 4
|
|
256
263
|
*/
|
|
257
|
-
document?: DocumentShort;
|
|
264
|
+
document?: DocumentShort;
|
|
258
265
|
/**
|
|
259
|
-
* @generated from protobuf field: int32 source_user_id = 5
|
|
266
|
+
* @generated from protobuf field: int32 source_user_id = 5
|
|
260
267
|
*/
|
|
261
|
-
sourceUserId: number;
|
|
268
|
+
sourceUserId: number;
|
|
262
269
|
/**
|
|
263
|
-
* @generated from protobuf field: optional resources.users.UserShort source_user = 6
|
|
270
|
+
* @generated from protobuf field: optional resources.users.UserShort source_user = 6
|
|
264
271
|
*/
|
|
265
|
-
sourceUser?: UserShort;
|
|
272
|
+
sourceUser?: UserShort;
|
|
266
273
|
/**
|
|
267
|
-
* @generated from protobuf field: resources.documents.DocRelation relation = 7
|
|
274
|
+
* @generated from protobuf field: resources.documents.DocRelation relation = 7
|
|
268
275
|
*/
|
|
269
|
-
relation: DocRelation;
|
|
276
|
+
relation: DocRelation;
|
|
270
277
|
/**
|
|
271
|
-
* @generated from protobuf field: int32 target_user_id = 8
|
|
278
|
+
* @generated from protobuf field: int32 target_user_id = 8
|
|
272
279
|
*/
|
|
273
|
-
targetUserId: number;
|
|
280
|
+
targetUserId: number;
|
|
274
281
|
/**
|
|
275
|
-
* @generated from protobuf field: optional resources.users.UserShort target_user = 9
|
|
282
|
+
* @generated from protobuf field: optional resources.users.UserShort target_user = 9
|
|
276
283
|
*/
|
|
277
|
-
targetUser?: UserShort;
|
|
284
|
+
targetUser?: UserShort;
|
|
278
285
|
}
|
|
279
286
|
/**
|
|
280
287
|
* @generated from protobuf message resources.documents.WorkflowState
|
|
281
288
|
*/
|
|
282
289
|
export interface WorkflowState {
|
|
283
290
|
/**
|
|
284
|
-
* @generated from protobuf field:
|
|
291
|
+
* @generated from protobuf field: int64 document_id = 1
|
|
285
292
|
*/
|
|
286
293
|
documentId: number;
|
|
287
294
|
/**
|
|
288
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp next_reminder_time = 2
|
|
295
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp next_reminder_time = 2
|
|
289
296
|
*/
|
|
290
297
|
nextReminderTime?: Timestamp;
|
|
291
298
|
/**
|
|
292
|
-
* @generated from protobuf field: optional int32 next_reminder_count = 3
|
|
299
|
+
* @generated from protobuf field: optional int32 next_reminder_count = 3
|
|
293
300
|
*/
|
|
294
301
|
nextReminderCount?: number;
|
|
295
302
|
/**
|
|
296
|
-
* @generated from protobuf field:
|
|
303
|
+
* @generated from protobuf field: int32 reminder_count = 5
|
|
304
|
+
*/
|
|
305
|
+
reminderCount: number;
|
|
306
|
+
/**
|
|
307
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp auto_close_time = 4
|
|
297
308
|
*/
|
|
298
309
|
autoCloseTime?: Timestamp;
|
|
299
310
|
/**
|
|
300
|
-
* @generated from protobuf field: optional resources.documents.Workflow workflow =
|
|
311
|
+
* @generated from protobuf field: optional resources.documents.Workflow workflow = 6
|
|
301
312
|
*/
|
|
302
|
-
workflow?: Workflow;
|
|
313
|
+
workflow?: Workflow;
|
|
303
314
|
/**
|
|
304
|
-
* @generated from protobuf field: optional resources.documents.DocumentShort document =
|
|
315
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort document = 7
|
|
305
316
|
*/
|
|
306
317
|
document?: DocumentShort;
|
|
307
318
|
}
|
|
@@ -310,27 +321,35 @@ export interface WorkflowState {
|
|
|
310
321
|
*/
|
|
311
322
|
export interface WorkflowUserState {
|
|
312
323
|
/**
|
|
313
|
-
* @generated from protobuf field:
|
|
324
|
+
* @generated from protobuf field: int64 document_id = 1
|
|
314
325
|
*/
|
|
315
326
|
documentId: number;
|
|
316
327
|
/**
|
|
317
|
-
* @generated from protobuf field: int32 user_id = 2
|
|
328
|
+
* @generated from protobuf field: int32 user_id = 2
|
|
318
329
|
*/
|
|
319
330
|
userId: number;
|
|
320
331
|
/**
|
|
321
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp manual_reminder_time = 3
|
|
332
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp manual_reminder_time = 3
|
|
322
333
|
*/
|
|
323
334
|
manualReminderTime?: Timestamp;
|
|
324
335
|
/**
|
|
325
|
-
* @generated from protobuf field: optional string manual_reminder_message = 4
|
|
336
|
+
* @generated from protobuf field: optional string manual_reminder_message = 4
|
|
326
337
|
*/
|
|
327
338
|
manualReminderMessage?: string;
|
|
328
339
|
/**
|
|
329
|
-
* @generated from protobuf field:
|
|
340
|
+
* @generated from protobuf field: int32 reminder_count = 5
|
|
341
|
+
*/
|
|
342
|
+
reminderCount: number;
|
|
343
|
+
/**
|
|
344
|
+
* @generated from protobuf field: int32 max_reminder_count = 6
|
|
345
|
+
*/
|
|
346
|
+
maxReminderCount: number;
|
|
347
|
+
/**
|
|
348
|
+
* @generated from protobuf field: optional resources.documents.Workflow workflow = 7
|
|
330
349
|
*/
|
|
331
|
-
workflow?: Workflow;
|
|
350
|
+
workflow?: Workflow;
|
|
332
351
|
/**
|
|
333
|
-
* @generated from protobuf field: optional resources.documents.DocumentShort document =
|
|
352
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort document = 8
|
|
334
353
|
*/
|
|
335
354
|
document?: DocumentShort;
|
|
336
355
|
}
|
|
@@ -384,27 +403,29 @@ export enum DocRelation {
|
|
|
384
403
|
class Document$Type extends MessageType<Document> {
|
|
385
404
|
constructor() {
|
|
386
405
|
super("resources.documents.Document", [
|
|
387
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
406
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
388
407
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
389
408
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
390
409
|
{ no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
391
|
-
{ no: 5, name: "category_id", kind: "scalar", opt: true, T:
|
|
392
|
-
{ no: 6, name: "category", kind: "message", T: () => Category },
|
|
393
|
-
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
394
|
-
{ no: 8, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "validate.
|
|
410
|
+
{ no: 5, name: "category_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
411
|
+
{ no: 6, name: "category", kind: "message", T: () => Category, options: { "tagger.tags": "alias:\"category\"" } },
|
|
412
|
+
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
413
|
+
{ no: 8, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
395
414
|
{ no: 9, name: "content", kind: "message", T: () => Content },
|
|
396
|
-
{ no: 10, name: "data", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
397
|
-
{ no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
398
|
-
{ no: 12, name: "creator", kind: "message", T: () => UserShort },
|
|
399
|
-
{ no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
400
|
-
{ no: 14, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
401
|
-
{ no: 15, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
415
|
+
{ no: 10, name: "data", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxBytes: "1000000" } }, "codegen.sanitizer.sanitizer": { enabled: true }, "tagger.tags": "alias:\"data\"" } },
|
|
416
|
+
{ no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
417
|
+
{ no: 12, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
|
|
418
|
+
{ no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
419
|
+
{ no: 14, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
420
|
+
{ no: 15, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
402
421
|
{ no: 16, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
403
|
-
{ no: 17, name: "
|
|
404
|
-
{ no: 18, name: "
|
|
405
|
-
{ no: 19, name: "
|
|
406
|
-
{ no: 20, name: "
|
|
407
|
-
{ no: 21, name: "
|
|
422
|
+
{ no: 17, name: "draft", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
423
|
+
{ no: 18, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
424
|
+
{ no: 19, name: "template_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
425
|
+
{ no: 20, name: "pin", kind: "message", T: () => DocumentPin, options: { "tagger.tags": "alias:\"pin\"" } },
|
|
426
|
+
{ no: 21, name: "workflow_state", kind: "message", T: () => WorkflowState },
|
|
427
|
+
{ no: 22, name: "workflow_user", kind: "message", T: () => WorkflowUserState },
|
|
428
|
+
{ no: 23, name: "files", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => File, options: { "tagger.tags": "alias:\"files\"" } }
|
|
408
429
|
]);
|
|
409
430
|
}
|
|
410
431
|
create(value?: PartialMessage<Document>): Document {
|
|
@@ -415,8 +436,9 @@ class Document$Type extends MessageType<Document> {
|
|
|
415
436
|
message.creatorJob = "";
|
|
416
437
|
message.state = "";
|
|
417
438
|
message.closed = false;
|
|
439
|
+
message.draft = false;
|
|
418
440
|
message.public = false;
|
|
419
|
-
message.
|
|
441
|
+
message.files = [];
|
|
420
442
|
if (value !== undefined)
|
|
421
443
|
reflectionMergePartial<Document>(this, message, value);
|
|
422
444
|
return message;
|
|
@@ -426,8 +448,8 @@ class Document$Type extends MessageType<Document> {
|
|
|
426
448
|
while (reader.pos < end) {
|
|
427
449
|
let [fieldNo, wireType] = reader.tag();
|
|
428
450
|
switch (fieldNo) {
|
|
429
|
-
case /*
|
|
430
|
-
message.id = reader.
|
|
451
|
+
case /* int64 id */ 1:
|
|
452
|
+
message.id = reader.int64().toNumber();
|
|
431
453
|
break;
|
|
432
454
|
case /* resources.timestamp.Timestamp created_at */ 2:
|
|
433
455
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -438,8 +460,8 @@ class Document$Type extends MessageType<Document> {
|
|
|
438
460
|
case /* optional resources.timestamp.Timestamp deleted_at */ 4:
|
|
439
461
|
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
440
462
|
break;
|
|
441
|
-
case /* optional
|
|
442
|
-
message.categoryId = reader.
|
|
463
|
+
case /* optional int64 category_id */ 5:
|
|
464
|
+
message.categoryId = reader.int64().toNumber();
|
|
443
465
|
break;
|
|
444
466
|
case /* optional resources.documents.Category category */ 6:
|
|
445
467
|
message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
|
|
@@ -474,21 +496,27 @@ class Document$Type extends MessageType<Document> {
|
|
|
474
496
|
case /* bool closed */ 16:
|
|
475
497
|
message.closed = reader.bool();
|
|
476
498
|
break;
|
|
477
|
-
case /* bool
|
|
499
|
+
case /* bool draft */ 17:
|
|
500
|
+
message.draft = reader.bool();
|
|
501
|
+
break;
|
|
502
|
+
case /* bool public */ 18:
|
|
478
503
|
message.public = reader.bool();
|
|
479
504
|
break;
|
|
480
|
-
case /* optional
|
|
481
|
-
message.templateId = reader.
|
|
505
|
+
case /* optional int64 template_id */ 19:
|
|
506
|
+
message.templateId = reader.int64().toNumber();
|
|
482
507
|
break;
|
|
483
|
-
case /*
|
|
484
|
-
message.
|
|
508
|
+
case /* optional resources.documents.DocumentPin pin */ 20:
|
|
509
|
+
message.pin = DocumentPin.internalBinaryRead(reader, reader.uint32(), options, message.pin);
|
|
485
510
|
break;
|
|
486
|
-
case /* optional resources.documents.WorkflowState workflow_state */
|
|
511
|
+
case /* optional resources.documents.WorkflowState workflow_state */ 21:
|
|
487
512
|
message.workflowState = WorkflowState.internalBinaryRead(reader, reader.uint32(), options, message.workflowState);
|
|
488
513
|
break;
|
|
489
|
-
case /* optional resources.documents.WorkflowUserState workflow_user */
|
|
514
|
+
case /* optional resources.documents.WorkflowUserState workflow_user */ 22:
|
|
490
515
|
message.workflowUser = WorkflowUserState.internalBinaryRead(reader, reader.uint32(), options, message.workflowUser);
|
|
491
516
|
break;
|
|
517
|
+
case /* repeated resources.file.File files */ 23:
|
|
518
|
+
message.files.push(File.internalBinaryRead(reader, reader.uint32(), options));
|
|
519
|
+
break;
|
|
492
520
|
default:
|
|
493
521
|
let u = options.readUnknownField;
|
|
494
522
|
if (u === "throw")
|
|
@@ -501,9 +529,9 @@ class Document$Type extends MessageType<Document> {
|
|
|
501
529
|
return message;
|
|
502
530
|
}
|
|
503
531
|
internalBinaryWrite(message: Document, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
504
|
-
/*
|
|
532
|
+
/* int64 id = 1; */
|
|
505
533
|
if (message.id !== 0)
|
|
506
|
-
writer.tag(1, WireType.Varint).
|
|
534
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
507
535
|
/* resources.timestamp.Timestamp created_at = 2; */
|
|
508
536
|
if (message.createdAt)
|
|
509
537
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -513,9 +541,9 @@ class Document$Type extends MessageType<Document> {
|
|
|
513
541
|
/* optional resources.timestamp.Timestamp deleted_at = 4; */
|
|
514
542
|
if (message.deletedAt)
|
|
515
543
|
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
516
|
-
/* optional
|
|
544
|
+
/* optional int64 category_id = 5; */
|
|
517
545
|
if (message.categoryId !== undefined)
|
|
518
|
-
writer.tag(5, WireType.Varint).
|
|
546
|
+
writer.tag(5, WireType.Varint).int64(message.categoryId);
|
|
519
547
|
/* optional resources.documents.Category category = 6; */
|
|
520
548
|
if (message.category)
|
|
521
549
|
Category.internalBinaryWrite(message.category, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -549,21 +577,27 @@ class Document$Type extends MessageType<Document> {
|
|
|
549
577
|
/* bool closed = 16; */
|
|
550
578
|
if (message.closed !== false)
|
|
551
579
|
writer.tag(16, WireType.Varint).bool(message.closed);
|
|
552
|
-
/* bool
|
|
580
|
+
/* bool draft = 17; */
|
|
581
|
+
if (message.draft !== false)
|
|
582
|
+
writer.tag(17, WireType.Varint).bool(message.draft);
|
|
583
|
+
/* bool public = 18; */
|
|
553
584
|
if (message.public !== false)
|
|
554
|
-
writer.tag(
|
|
555
|
-
/* optional
|
|
585
|
+
writer.tag(18, WireType.Varint).bool(message.public);
|
|
586
|
+
/* optional int64 template_id = 19; */
|
|
556
587
|
if (message.templateId !== undefined)
|
|
557
|
-
writer.tag(
|
|
558
|
-
/*
|
|
559
|
-
if (message.
|
|
560
|
-
writer.tag(
|
|
561
|
-
/* optional resources.documents.WorkflowState workflow_state =
|
|
588
|
+
writer.tag(19, WireType.Varint).int64(message.templateId);
|
|
589
|
+
/* optional resources.documents.DocumentPin pin = 20; */
|
|
590
|
+
if (message.pin)
|
|
591
|
+
DocumentPin.internalBinaryWrite(message.pin, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
|
|
592
|
+
/* optional resources.documents.WorkflowState workflow_state = 21; */
|
|
562
593
|
if (message.workflowState)
|
|
563
|
-
WorkflowState.internalBinaryWrite(message.workflowState, writer.tag(
|
|
564
|
-
/* optional resources.documents.WorkflowUserState workflow_user =
|
|
594
|
+
WorkflowState.internalBinaryWrite(message.workflowState, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
|
|
595
|
+
/* optional resources.documents.WorkflowUserState workflow_user = 22; */
|
|
565
596
|
if (message.workflowUser)
|
|
566
|
-
WorkflowUserState.internalBinaryWrite(message.workflowUser, writer.tag(
|
|
597
|
+
WorkflowUserState.internalBinaryWrite(message.workflowUser, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
|
|
598
|
+
/* repeated resources.file.File files = 23; */
|
|
599
|
+
for (let i = 0; i < message.files.length; i++)
|
|
600
|
+
File.internalBinaryWrite(message.files[i], writer.tag(23, WireType.LengthDelimited).fork(), options).join();
|
|
567
601
|
let u = options.writeUnknownFields;
|
|
568
602
|
if (u !== false)
|
|
569
603
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -578,24 +612,26 @@ export const Document = new Document$Type();
|
|
|
578
612
|
class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
579
613
|
constructor() {
|
|
580
614
|
super("resources.documents.DocumentShort", [
|
|
581
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
615
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
582
616
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
583
617
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
584
618
|
{ no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
585
|
-
{ no: 5, name: "category_id", kind: "scalar", opt: true, T:
|
|
586
|
-
{ no: 6, name: "category", kind: "message", T: () => Category },
|
|
587
|
-
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
588
|
-
{ no: 8, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "validate.
|
|
619
|
+
{ no: 5, name: "category_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
620
|
+
{ no: 6, name: "category", kind: "message", T: () => Category, options: { "tagger.tags": "alias:\"category\"" } },
|
|
621
|
+
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
622
|
+
{ no: 8, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
589
623
|
{ no: 9, name: "content", kind: "message", T: () => Content },
|
|
590
|
-
{ no:
|
|
591
|
-
{ no:
|
|
592
|
-
{ no:
|
|
593
|
-
{ no:
|
|
594
|
-
{ no:
|
|
595
|
-
{ no:
|
|
596
|
-
{ no:
|
|
597
|
-
{ no:
|
|
598
|
-
{ no:
|
|
624
|
+
{ no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
625
|
+
{ no: 12, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
|
|
626
|
+
{ no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
627
|
+
{ no: 14, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
628
|
+
{ no: 15, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
629
|
+
{ no: 16, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
630
|
+
{ no: 17, name: "draft", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
631
|
+
{ no: 18, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
632
|
+
{ no: 20, name: "pin", kind: "message", T: () => DocumentPin, options: { "tagger.tags": "alias:\"pin\"" } },
|
|
633
|
+
{ no: 21, name: "workflow_state", kind: "message", T: () => WorkflowState },
|
|
634
|
+
{ no: 22, name: "workflow_user", kind: "message", T: () => WorkflowUserState }
|
|
599
635
|
]);
|
|
600
636
|
}
|
|
601
637
|
create(value?: PartialMessage<DocumentShort>): DocumentShort {
|
|
@@ -606,6 +642,7 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
606
642
|
message.creatorJob = "";
|
|
607
643
|
message.state = "";
|
|
608
644
|
message.closed = false;
|
|
645
|
+
message.draft = false;
|
|
609
646
|
message.public = false;
|
|
610
647
|
if (value !== undefined)
|
|
611
648
|
reflectionMergePartial<DocumentShort>(this, message, value);
|
|
@@ -616,8 +653,8 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
616
653
|
while (reader.pos < end) {
|
|
617
654
|
let [fieldNo, wireType] = reader.tag();
|
|
618
655
|
switch (fieldNo) {
|
|
619
|
-
case /*
|
|
620
|
-
message.id = reader.
|
|
656
|
+
case /* int64 id */ 1:
|
|
657
|
+
message.id = reader.int64().toNumber();
|
|
621
658
|
break;
|
|
622
659
|
case /* resources.timestamp.Timestamp created_at */ 2:
|
|
623
660
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -628,8 +665,8 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
628
665
|
case /* optional resources.timestamp.Timestamp deleted_at */ 4:
|
|
629
666
|
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
630
667
|
break;
|
|
631
|
-
case /* optional
|
|
632
|
-
message.categoryId = reader.
|
|
668
|
+
case /* optional int64 category_id */ 5:
|
|
669
|
+
message.categoryId = reader.int64().toNumber();
|
|
633
670
|
break;
|
|
634
671
|
case /* optional resources.documents.Category category */ 6:
|
|
635
672
|
message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
|
|
@@ -643,31 +680,37 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
643
680
|
case /* resources.common.content.Content content */ 9:
|
|
644
681
|
message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
|
|
645
682
|
break;
|
|
646
|
-
case /* optional int32 creator_id */
|
|
683
|
+
case /* optional int32 creator_id */ 11:
|
|
647
684
|
message.creatorId = reader.int32();
|
|
648
685
|
break;
|
|
649
|
-
case /* optional resources.users.UserShort creator */
|
|
686
|
+
case /* optional resources.users.UserShort creator */ 12:
|
|
650
687
|
message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
651
688
|
break;
|
|
652
|
-
case /* string creator_job */
|
|
689
|
+
case /* string creator_job */ 13:
|
|
653
690
|
message.creatorJob = reader.string();
|
|
654
691
|
break;
|
|
655
|
-
case /* optional string creator_job_label */
|
|
692
|
+
case /* optional string creator_job_label */ 14:
|
|
656
693
|
message.creatorJobLabel = reader.string();
|
|
657
694
|
break;
|
|
658
|
-
case /* string state */
|
|
695
|
+
case /* string state */ 15:
|
|
659
696
|
message.state = reader.string();
|
|
660
697
|
break;
|
|
661
|
-
case /* bool closed */
|
|
698
|
+
case /* bool closed */ 16:
|
|
662
699
|
message.closed = reader.bool();
|
|
663
700
|
break;
|
|
664
|
-
case /* bool
|
|
701
|
+
case /* bool draft */ 17:
|
|
702
|
+
message.draft = reader.bool();
|
|
703
|
+
break;
|
|
704
|
+
case /* bool public */ 18:
|
|
665
705
|
message.public = reader.bool();
|
|
666
706
|
break;
|
|
667
|
-
case /* optional resources.documents.
|
|
707
|
+
case /* optional resources.documents.DocumentPin pin */ 20:
|
|
708
|
+
message.pin = DocumentPin.internalBinaryRead(reader, reader.uint32(), options, message.pin);
|
|
709
|
+
break;
|
|
710
|
+
case /* optional resources.documents.WorkflowState workflow_state */ 21:
|
|
668
711
|
message.workflowState = WorkflowState.internalBinaryRead(reader, reader.uint32(), options, message.workflowState);
|
|
669
712
|
break;
|
|
670
|
-
case /* optional resources.documents.WorkflowUserState workflow_user */
|
|
713
|
+
case /* optional resources.documents.WorkflowUserState workflow_user */ 22:
|
|
671
714
|
message.workflowUser = WorkflowUserState.internalBinaryRead(reader, reader.uint32(), options, message.workflowUser);
|
|
672
715
|
break;
|
|
673
716
|
default:
|
|
@@ -682,9 +725,9 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
682
725
|
return message;
|
|
683
726
|
}
|
|
684
727
|
internalBinaryWrite(message: DocumentShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
685
|
-
/*
|
|
728
|
+
/* int64 id = 1; */
|
|
686
729
|
if (message.id !== 0)
|
|
687
|
-
writer.tag(1, WireType.Varint).
|
|
730
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
688
731
|
/* resources.timestamp.Timestamp created_at = 2; */
|
|
689
732
|
if (message.createdAt)
|
|
690
733
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -694,9 +737,9 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
694
737
|
/* optional resources.timestamp.Timestamp deleted_at = 4; */
|
|
695
738
|
if (message.deletedAt)
|
|
696
739
|
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
697
|
-
/* optional
|
|
740
|
+
/* optional int64 category_id = 5; */
|
|
698
741
|
if (message.categoryId !== undefined)
|
|
699
|
-
writer.tag(5, WireType.Varint).
|
|
742
|
+
writer.tag(5, WireType.Varint).int64(message.categoryId);
|
|
700
743
|
/* optional resources.documents.Category category = 6; */
|
|
701
744
|
if (message.category)
|
|
702
745
|
Category.internalBinaryWrite(message.category, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -709,33 +752,39 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
709
752
|
/* resources.common.content.Content content = 9; */
|
|
710
753
|
if (message.content)
|
|
711
754
|
Content.internalBinaryWrite(message.content, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
712
|
-
/* optional int32 creator_id =
|
|
755
|
+
/* optional int32 creator_id = 11; */
|
|
713
756
|
if (message.creatorId !== undefined)
|
|
714
|
-
writer.tag(
|
|
715
|
-
/* optional resources.users.UserShort creator =
|
|
757
|
+
writer.tag(11, WireType.Varint).int32(message.creatorId);
|
|
758
|
+
/* optional resources.users.UserShort creator = 12; */
|
|
716
759
|
if (message.creator)
|
|
717
|
-
UserShort.internalBinaryWrite(message.creator, writer.tag(
|
|
718
|
-
/* string creator_job =
|
|
760
|
+
UserShort.internalBinaryWrite(message.creator, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
761
|
+
/* string creator_job = 13; */
|
|
719
762
|
if (message.creatorJob !== "")
|
|
720
|
-
writer.tag(
|
|
721
|
-
/* optional string creator_job_label =
|
|
763
|
+
writer.tag(13, WireType.LengthDelimited).string(message.creatorJob);
|
|
764
|
+
/* optional string creator_job_label = 14; */
|
|
722
765
|
if (message.creatorJobLabel !== undefined)
|
|
723
|
-
writer.tag(
|
|
724
|
-
/* string state =
|
|
766
|
+
writer.tag(14, WireType.LengthDelimited).string(message.creatorJobLabel);
|
|
767
|
+
/* string state = 15; */
|
|
725
768
|
if (message.state !== "")
|
|
726
|
-
writer.tag(
|
|
727
|
-
/* bool closed =
|
|
769
|
+
writer.tag(15, WireType.LengthDelimited).string(message.state);
|
|
770
|
+
/* bool closed = 16; */
|
|
728
771
|
if (message.closed !== false)
|
|
729
|
-
writer.tag(
|
|
730
|
-
/* bool
|
|
772
|
+
writer.tag(16, WireType.Varint).bool(message.closed);
|
|
773
|
+
/* bool draft = 17; */
|
|
774
|
+
if (message.draft !== false)
|
|
775
|
+
writer.tag(17, WireType.Varint).bool(message.draft);
|
|
776
|
+
/* bool public = 18; */
|
|
731
777
|
if (message.public !== false)
|
|
732
|
-
writer.tag(
|
|
733
|
-
/* optional resources.documents.
|
|
778
|
+
writer.tag(18, WireType.Varint).bool(message.public);
|
|
779
|
+
/* optional resources.documents.DocumentPin pin = 20; */
|
|
780
|
+
if (message.pin)
|
|
781
|
+
DocumentPin.internalBinaryWrite(message.pin, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
|
|
782
|
+
/* optional resources.documents.WorkflowState workflow_state = 21; */
|
|
734
783
|
if (message.workflowState)
|
|
735
|
-
WorkflowState.internalBinaryWrite(message.workflowState, writer.tag(
|
|
736
|
-
/* optional resources.documents.WorkflowUserState workflow_user =
|
|
784
|
+
WorkflowState.internalBinaryWrite(message.workflowState, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
|
|
785
|
+
/* optional resources.documents.WorkflowUserState workflow_user = 22; */
|
|
737
786
|
if (message.workflowUser)
|
|
738
|
-
WorkflowUserState.internalBinaryWrite(message.workflowUser, writer.tag(
|
|
787
|
+
WorkflowUserState.internalBinaryWrite(message.workflowUser, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
|
|
739
788
|
let u = options.writeUnknownFields;
|
|
740
789
|
if (u !== false)
|
|
741
790
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -750,15 +799,15 @@ export const DocumentShort = new DocumentShort$Type();
|
|
|
750
799
|
class DocumentReference$Type extends MessageType<DocumentReference> {
|
|
751
800
|
constructor() {
|
|
752
801
|
super("resources.documents.DocumentReference", [
|
|
753
|
-
{ no: 1, name: "id", kind: "scalar", opt: true, T:
|
|
802
|
+
{ no: 1, name: "id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
754
803
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
755
|
-
{ no: 3, name: "source_document_id", kind: "scalar", T:
|
|
756
|
-
{ no: 4, name: "source_document", kind: "message", T: () => DocumentShort },
|
|
757
|
-
{ no: 5, name: "reference", kind: "enum", T: () => ["resources.documents.DocReference", DocReference, "DOC_REFERENCE_"], options: { "validate.
|
|
758
|
-
{ no: 6, name: "target_document_id", kind: "scalar", T:
|
|
759
|
-
{ no: 7, name: "target_document", kind: "message", T: () => DocumentShort },
|
|
760
|
-
{ no: 8, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
761
|
-
{ no: 9, name: "creator", kind: "message", T: () => UserShort }
|
|
804
|
+
{ no: 3, name: "source_document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "alias:\"source_document_id\"" } },
|
|
805
|
+
{ no: 4, name: "source_document", kind: "message", T: () => DocumentShort, options: { "tagger.tags": "alias:\"source_document\"" } },
|
|
806
|
+
{ no: 5, name: "reference", kind: "enum", T: () => ["resources.documents.DocReference", DocReference, "DOC_REFERENCE_"], options: { "buf.validate.field": { enum: { definedOnly: true } }, "tagger.tags": "alias:\"reference\"" } },
|
|
807
|
+
{ no: 6, name: "target_document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "alias:\"target_document_id\"" } },
|
|
808
|
+
{ no: 7, name: "target_document", kind: "message", T: () => DocumentShort, options: { "tagger.tags": "alias:\"target_document\"" } },
|
|
809
|
+
{ no: 8, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
810
|
+
{ no: 9, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"ref_creator\"" } }
|
|
762
811
|
]);
|
|
763
812
|
}
|
|
764
813
|
create(value?: PartialMessage<DocumentReference>): DocumentReference {
|
|
@@ -775,14 +824,14 @@ class DocumentReference$Type extends MessageType<DocumentReference> {
|
|
|
775
824
|
while (reader.pos < end) {
|
|
776
825
|
let [fieldNo, wireType] = reader.tag();
|
|
777
826
|
switch (fieldNo) {
|
|
778
|
-
case /* optional
|
|
779
|
-
message.id = reader.
|
|
827
|
+
case /* optional int64 id */ 1:
|
|
828
|
+
message.id = reader.int64().toNumber();
|
|
780
829
|
break;
|
|
781
830
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
782
831
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
783
832
|
break;
|
|
784
|
-
case /*
|
|
785
|
-
message.sourceDocumentId = reader.
|
|
833
|
+
case /* int64 source_document_id */ 3:
|
|
834
|
+
message.sourceDocumentId = reader.int64().toNumber();
|
|
786
835
|
break;
|
|
787
836
|
case /* optional resources.documents.DocumentShort source_document */ 4:
|
|
788
837
|
message.sourceDocument = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.sourceDocument);
|
|
@@ -790,8 +839,8 @@ class DocumentReference$Type extends MessageType<DocumentReference> {
|
|
|
790
839
|
case /* resources.documents.DocReference reference */ 5:
|
|
791
840
|
message.reference = reader.int32();
|
|
792
841
|
break;
|
|
793
|
-
case /*
|
|
794
|
-
message.targetDocumentId = reader.
|
|
842
|
+
case /* int64 target_document_id */ 6:
|
|
843
|
+
message.targetDocumentId = reader.int64().toNumber();
|
|
795
844
|
break;
|
|
796
845
|
case /* optional resources.documents.DocumentShort target_document */ 7:
|
|
797
846
|
message.targetDocument = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.targetDocument);
|
|
@@ -814,24 +863,24 @@ class DocumentReference$Type extends MessageType<DocumentReference> {
|
|
|
814
863
|
return message;
|
|
815
864
|
}
|
|
816
865
|
internalBinaryWrite(message: DocumentReference, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
817
|
-
/* optional
|
|
866
|
+
/* optional int64 id = 1; */
|
|
818
867
|
if (message.id !== undefined)
|
|
819
|
-
writer.tag(1, WireType.Varint).
|
|
868
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
820
869
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
821
870
|
if (message.createdAt)
|
|
822
871
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
823
|
-
/*
|
|
872
|
+
/* int64 source_document_id = 3; */
|
|
824
873
|
if (message.sourceDocumentId !== 0)
|
|
825
|
-
writer.tag(3, WireType.Varint).
|
|
874
|
+
writer.tag(3, WireType.Varint).int64(message.sourceDocumentId);
|
|
826
875
|
/* optional resources.documents.DocumentShort source_document = 4; */
|
|
827
876
|
if (message.sourceDocument)
|
|
828
877
|
DocumentShort.internalBinaryWrite(message.sourceDocument, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
829
878
|
/* resources.documents.DocReference reference = 5; */
|
|
830
879
|
if (message.reference !== 0)
|
|
831
880
|
writer.tag(5, WireType.Varint).int32(message.reference);
|
|
832
|
-
/*
|
|
881
|
+
/* int64 target_document_id = 6; */
|
|
833
882
|
if (message.targetDocumentId !== 0)
|
|
834
|
-
writer.tag(6, WireType.Varint).
|
|
883
|
+
writer.tag(6, WireType.Varint).int64(message.targetDocumentId);
|
|
835
884
|
/* optional resources.documents.DocumentShort target_document = 7; */
|
|
836
885
|
if (message.targetDocument)
|
|
837
886
|
DocumentShort.internalBinaryWrite(message.targetDocument, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -855,15 +904,15 @@ export const DocumentReference = new DocumentReference$Type();
|
|
|
855
904
|
class DocumentRelation$Type extends MessageType<DocumentRelation> {
|
|
856
905
|
constructor() {
|
|
857
906
|
super("resources.documents.DocumentRelation", [
|
|
858
|
-
{ no: 1, name: "id", kind: "scalar", opt: true, T:
|
|
907
|
+
{ no: 1, name: "id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
859
908
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
860
|
-
{ no: 3, name: "document_id", kind: "scalar", T:
|
|
861
|
-
{ no: 4, name: "document", kind: "message", T: () => DocumentShort },
|
|
862
|
-
{ no: 5, name: "source_user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
863
|
-
{ no: 6, name: "source_user", kind: "message", T: () => UserShort },
|
|
864
|
-
{ no: 7, name: "relation", kind: "enum", T: () => ["resources.documents.DocRelation", DocRelation, "DOC_RELATION_"], options: { "validate.
|
|
865
|
-
{ no: 8, name: "target_user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
866
|
-
{ no: 9, name: "target_user", kind: "message", T: () => UserShort }
|
|
909
|
+
{ no: 3, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
910
|
+
{ no: 4, name: "document", kind: "message", T: () => DocumentShort, options: { "tagger.tags": "alias:\"document\"" } },
|
|
911
|
+
{ no: 5, name: "source_user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } }, "tagger.tags": "alias:\"source_user_id\"" } },
|
|
912
|
+
{ no: 6, name: "source_user", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"source_user\"" } },
|
|
913
|
+
{ no: 7, name: "relation", kind: "enum", T: () => ["resources.documents.DocRelation", DocRelation, "DOC_RELATION_"], options: { "buf.validate.field": { enum: { definedOnly: true } }, "tagger.tags": "alias:\"relation\"" } },
|
|
914
|
+
{ no: 8, name: "target_user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } }, "tagger.tags": "alias:\"target_user_id\"" } },
|
|
915
|
+
{ no: 9, name: "target_user", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"target_user\"" } }
|
|
867
916
|
]);
|
|
868
917
|
}
|
|
869
918
|
create(value?: PartialMessage<DocumentRelation>): DocumentRelation {
|
|
@@ -881,14 +930,14 @@ class DocumentRelation$Type extends MessageType<DocumentRelation> {
|
|
|
881
930
|
while (reader.pos < end) {
|
|
882
931
|
let [fieldNo, wireType] = reader.tag();
|
|
883
932
|
switch (fieldNo) {
|
|
884
|
-
case /* optional
|
|
885
|
-
message.id = reader.
|
|
933
|
+
case /* optional int64 id */ 1:
|
|
934
|
+
message.id = reader.int64().toNumber();
|
|
886
935
|
break;
|
|
887
936
|
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
888
937
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
889
938
|
break;
|
|
890
|
-
case /*
|
|
891
|
-
message.documentId = reader.
|
|
939
|
+
case /* int64 document_id */ 3:
|
|
940
|
+
message.documentId = reader.int64().toNumber();
|
|
892
941
|
break;
|
|
893
942
|
case /* optional resources.documents.DocumentShort document */ 4:
|
|
894
943
|
message.document = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.document);
|
|
@@ -920,15 +969,15 @@ class DocumentRelation$Type extends MessageType<DocumentRelation> {
|
|
|
920
969
|
return message;
|
|
921
970
|
}
|
|
922
971
|
internalBinaryWrite(message: DocumentRelation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
923
|
-
/* optional
|
|
972
|
+
/* optional int64 id = 1; */
|
|
924
973
|
if (message.id !== undefined)
|
|
925
|
-
writer.tag(1, WireType.Varint).
|
|
974
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
926
975
|
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
927
976
|
if (message.createdAt)
|
|
928
977
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
929
|
-
/*
|
|
978
|
+
/* int64 document_id = 3; */
|
|
930
979
|
if (message.documentId !== 0)
|
|
931
|
-
writer.tag(3, WireType.Varint).
|
|
980
|
+
writer.tag(3, WireType.Varint).int64(message.documentId);
|
|
932
981
|
/* optional resources.documents.DocumentShort document = 4; */
|
|
933
982
|
if (message.document)
|
|
934
983
|
DocumentShort.internalBinaryWrite(message.document, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -961,17 +1010,19 @@ export const DocumentRelation = new DocumentRelation$Type();
|
|
|
961
1010
|
class WorkflowState$Type extends MessageType<WorkflowState> {
|
|
962
1011
|
constructor() {
|
|
963
1012
|
super("resources.documents.WorkflowState", [
|
|
964
|
-
{ no: 1, name: "document_id", kind: "scalar", T:
|
|
1013
|
+
{ no: 1, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
965
1014
|
{ no: 2, name: "next_reminder_time", kind: "message", T: () => Timestamp },
|
|
966
1015
|
{ no: 3, name: "next_reminder_count", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
1016
|
+
{ no: 5, name: "reminder_count", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { lte: 10, gte: 1 } } } },
|
|
967
1017
|
{ no: 4, name: "auto_close_time", kind: "message", T: () => Timestamp },
|
|
968
|
-
{ no:
|
|
969
|
-
{ no:
|
|
1018
|
+
{ no: 6, name: "workflow", kind: "message", T: () => Workflow, options: { "tagger.tags": "alias:\"workflow\"" } },
|
|
1019
|
+
{ no: 7, name: "document", kind: "message", T: () => DocumentShort }
|
|
970
1020
|
]);
|
|
971
1021
|
}
|
|
972
1022
|
create(value?: PartialMessage<WorkflowState>): WorkflowState {
|
|
973
1023
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
974
1024
|
message.documentId = 0;
|
|
1025
|
+
message.reminderCount = 0;
|
|
975
1026
|
if (value !== undefined)
|
|
976
1027
|
reflectionMergePartial<WorkflowState>(this, message, value);
|
|
977
1028
|
return message;
|
|
@@ -981,8 +1032,8 @@ class WorkflowState$Type extends MessageType<WorkflowState> {
|
|
|
981
1032
|
while (reader.pos < end) {
|
|
982
1033
|
let [fieldNo, wireType] = reader.tag();
|
|
983
1034
|
switch (fieldNo) {
|
|
984
|
-
case /*
|
|
985
|
-
message.documentId = reader.
|
|
1035
|
+
case /* int64 document_id */ 1:
|
|
1036
|
+
message.documentId = reader.int64().toNumber();
|
|
986
1037
|
break;
|
|
987
1038
|
case /* optional resources.timestamp.Timestamp next_reminder_time */ 2:
|
|
988
1039
|
message.nextReminderTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.nextReminderTime);
|
|
@@ -990,13 +1041,16 @@ class WorkflowState$Type extends MessageType<WorkflowState> {
|
|
|
990
1041
|
case /* optional int32 next_reminder_count */ 3:
|
|
991
1042
|
message.nextReminderCount = reader.int32();
|
|
992
1043
|
break;
|
|
1044
|
+
case /* int32 reminder_count */ 5:
|
|
1045
|
+
message.reminderCount = reader.int32();
|
|
1046
|
+
break;
|
|
993
1047
|
case /* optional resources.timestamp.Timestamp auto_close_time */ 4:
|
|
994
1048
|
message.autoCloseTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.autoCloseTime);
|
|
995
1049
|
break;
|
|
996
|
-
case /* optional resources.documents.Workflow workflow */
|
|
1050
|
+
case /* optional resources.documents.Workflow workflow */ 6:
|
|
997
1051
|
message.workflow = Workflow.internalBinaryRead(reader, reader.uint32(), options, message.workflow);
|
|
998
1052
|
break;
|
|
999
|
-
case /* optional resources.documents.DocumentShort document */
|
|
1053
|
+
case /* optional resources.documents.DocumentShort document */ 7:
|
|
1000
1054
|
message.document = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.document);
|
|
1001
1055
|
break;
|
|
1002
1056
|
default:
|
|
@@ -1011,9 +1065,9 @@ class WorkflowState$Type extends MessageType<WorkflowState> {
|
|
|
1011
1065
|
return message;
|
|
1012
1066
|
}
|
|
1013
1067
|
internalBinaryWrite(message: WorkflowState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1014
|
-
/*
|
|
1068
|
+
/* int64 document_id = 1; */
|
|
1015
1069
|
if (message.documentId !== 0)
|
|
1016
|
-
writer.tag(1, WireType.Varint).
|
|
1070
|
+
writer.tag(1, WireType.Varint).int64(message.documentId);
|
|
1017
1071
|
/* optional resources.timestamp.Timestamp next_reminder_time = 2; */
|
|
1018
1072
|
if (message.nextReminderTime)
|
|
1019
1073
|
Timestamp.internalBinaryWrite(message.nextReminderTime, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -1023,12 +1077,15 @@ class WorkflowState$Type extends MessageType<WorkflowState> {
|
|
|
1023
1077
|
/* optional resources.timestamp.Timestamp auto_close_time = 4; */
|
|
1024
1078
|
if (message.autoCloseTime)
|
|
1025
1079
|
Timestamp.internalBinaryWrite(message.autoCloseTime, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
1026
|
-
/*
|
|
1080
|
+
/* int32 reminder_count = 5; */
|
|
1081
|
+
if (message.reminderCount !== 0)
|
|
1082
|
+
writer.tag(5, WireType.Varint).int32(message.reminderCount);
|
|
1083
|
+
/* optional resources.documents.Workflow workflow = 6; */
|
|
1027
1084
|
if (message.workflow)
|
|
1028
|
-
Workflow.internalBinaryWrite(message.workflow, writer.tag(
|
|
1029
|
-
/* optional resources.documents.DocumentShort document =
|
|
1085
|
+
Workflow.internalBinaryWrite(message.workflow, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
1086
|
+
/* optional resources.documents.DocumentShort document = 7; */
|
|
1030
1087
|
if (message.document)
|
|
1031
|
-
DocumentShort.internalBinaryWrite(message.document, writer.tag(
|
|
1088
|
+
DocumentShort.internalBinaryWrite(message.document, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
1032
1089
|
let u = options.writeUnknownFields;
|
|
1033
1090
|
if (u !== false)
|
|
1034
1091
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1043,18 +1100,22 @@ export const WorkflowState = new WorkflowState$Type();
|
|
|
1043
1100
|
class WorkflowUserState$Type extends MessageType<WorkflowUserState> {
|
|
1044
1101
|
constructor() {
|
|
1045
1102
|
super("resources.documents.WorkflowUserState", [
|
|
1046
|
-
{ no: 1, name: "document_id", kind: "scalar", T:
|
|
1047
|
-
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
1103
|
+
{ no: 1, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
1104
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
1048
1105
|
{ no: 3, name: "manual_reminder_time", kind: "message", T: () => Timestamp },
|
|
1049
|
-
{ no: 4, name: "manual_reminder_message", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
1050
|
-
{ no: 5, name: "
|
|
1051
|
-
{ no: 6, name: "
|
|
1106
|
+
{ no: 4, name: "manual_reminder_message", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
|
|
1107
|
+
{ no: 5, name: "reminder_count", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { lte: 10, gte: 1 } } } },
|
|
1108
|
+
{ no: 6, name: "max_reminder_count", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { lte: 10, gte: 1 } } } },
|
|
1109
|
+
{ no: 7, name: "workflow", kind: "message", T: () => Workflow, options: { "tagger.tags": "alias:\"workflow\"" } },
|
|
1110
|
+
{ no: 8, name: "document", kind: "message", T: () => DocumentShort }
|
|
1052
1111
|
]);
|
|
1053
1112
|
}
|
|
1054
1113
|
create(value?: PartialMessage<WorkflowUserState>): WorkflowUserState {
|
|
1055
1114
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1056
1115
|
message.documentId = 0;
|
|
1057
1116
|
message.userId = 0;
|
|
1117
|
+
message.reminderCount = 0;
|
|
1118
|
+
message.maxReminderCount = 0;
|
|
1058
1119
|
if (value !== undefined)
|
|
1059
1120
|
reflectionMergePartial<WorkflowUserState>(this, message, value);
|
|
1060
1121
|
return message;
|
|
@@ -1064,8 +1125,8 @@ class WorkflowUserState$Type extends MessageType<WorkflowUserState> {
|
|
|
1064
1125
|
while (reader.pos < end) {
|
|
1065
1126
|
let [fieldNo, wireType] = reader.tag();
|
|
1066
1127
|
switch (fieldNo) {
|
|
1067
|
-
case /*
|
|
1068
|
-
message.documentId = reader.
|
|
1128
|
+
case /* int64 document_id */ 1:
|
|
1129
|
+
message.documentId = reader.int64().toNumber();
|
|
1069
1130
|
break;
|
|
1070
1131
|
case /* int32 user_id */ 2:
|
|
1071
1132
|
message.userId = reader.int32();
|
|
@@ -1076,10 +1137,16 @@ class WorkflowUserState$Type extends MessageType<WorkflowUserState> {
|
|
|
1076
1137
|
case /* optional string manual_reminder_message */ 4:
|
|
1077
1138
|
message.manualReminderMessage = reader.string();
|
|
1078
1139
|
break;
|
|
1079
|
-
case /*
|
|
1140
|
+
case /* int32 reminder_count */ 5:
|
|
1141
|
+
message.reminderCount = reader.int32();
|
|
1142
|
+
break;
|
|
1143
|
+
case /* int32 max_reminder_count */ 6:
|
|
1144
|
+
message.maxReminderCount = reader.int32();
|
|
1145
|
+
break;
|
|
1146
|
+
case /* optional resources.documents.Workflow workflow */ 7:
|
|
1080
1147
|
message.workflow = Workflow.internalBinaryRead(reader, reader.uint32(), options, message.workflow);
|
|
1081
1148
|
break;
|
|
1082
|
-
case /* optional resources.documents.DocumentShort document */
|
|
1149
|
+
case /* optional resources.documents.DocumentShort document */ 8:
|
|
1083
1150
|
message.document = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.document);
|
|
1084
1151
|
break;
|
|
1085
1152
|
default:
|
|
@@ -1094,9 +1161,9 @@ class WorkflowUserState$Type extends MessageType<WorkflowUserState> {
|
|
|
1094
1161
|
return message;
|
|
1095
1162
|
}
|
|
1096
1163
|
internalBinaryWrite(message: WorkflowUserState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1097
|
-
/*
|
|
1164
|
+
/* int64 document_id = 1; */
|
|
1098
1165
|
if (message.documentId !== 0)
|
|
1099
|
-
writer.tag(1, WireType.Varint).
|
|
1166
|
+
writer.tag(1, WireType.Varint).int64(message.documentId);
|
|
1100
1167
|
/* int32 user_id = 2; */
|
|
1101
1168
|
if (message.userId !== 0)
|
|
1102
1169
|
writer.tag(2, WireType.Varint).int32(message.userId);
|
|
@@ -1106,12 +1173,18 @@ class WorkflowUserState$Type extends MessageType<WorkflowUserState> {
|
|
|
1106
1173
|
/* optional string manual_reminder_message = 4; */
|
|
1107
1174
|
if (message.manualReminderMessage !== undefined)
|
|
1108
1175
|
writer.tag(4, WireType.LengthDelimited).string(message.manualReminderMessage);
|
|
1109
|
-
/*
|
|
1176
|
+
/* int32 reminder_count = 5; */
|
|
1177
|
+
if (message.reminderCount !== 0)
|
|
1178
|
+
writer.tag(5, WireType.Varint).int32(message.reminderCount);
|
|
1179
|
+
/* int32 max_reminder_count = 6; */
|
|
1180
|
+
if (message.maxReminderCount !== 0)
|
|
1181
|
+
writer.tag(6, WireType.Varint).int32(message.maxReminderCount);
|
|
1182
|
+
/* optional resources.documents.Workflow workflow = 7; */
|
|
1110
1183
|
if (message.workflow)
|
|
1111
|
-
Workflow.internalBinaryWrite(message.workflow, writer.tag(
|
|
1112
|
-
/* optional resources.documents.DocumentShort document =
|
|
1184
|
+
Workflow.internalBinaryWrite(message.workflow, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
1185
|
+
/* optional resources.documents.DocumentShort document = 8; */
|
|
1113
1186
|
if (message.document)
|
|
1114
|
-
DocumentShort.internalBinaryWrite(message.document, writer.tag(
|
|
1187
|
+
DocumentShort.internalBinaryWrite(message.document, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
1115
1188
|
let u = options.writeUnknownFields;
|
|
1116
1189
|
if (u !== false)
|
|
1117
1190
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|