@fivenet-app/gen 0.9.3-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/README.md +1 -0
- package/google/protobuf/any.ts +322 -0
- package/google/protobuf/descriptor.ts +3475 -0
- package/google/protobuf/duration.ts +231 -0
- package/google/protobuf/timestamp.ts +290 -0
- package/package.json +15 -0
- package/perms.ts +178 -0
- package/resources/accounts/accounts.ts +195 -0
- package/resources/accounts/oauth2.ts +230 -0
- package/resources/calendar/access.ts +362 -0
- package/resources/calendar/calendar.ts +955 -0
- package/resources/centrum/access.ts +380 -0
- package/resources/centrum/dispatches.ts +854 -0
- package/resources/centrum/general.ts +231 -0
- package/resources/centrum/settings.ts +303 -0
- package/resources/centrum/units.ts +620 -0
- package/resources/common/access/dummy.ts +309 -0
- package/resources/common/content/content.ts +252 -0
- package/resources/common/cron/cron.ts +536 -0
- package/resources/common/database/database.ts +306 -0
- package/resources/common/error.ts +79 -0
- package/resources/common/grpcws/grpcws.ts +615 -0
- package/resources/common/i18n.ts +102 -0
- package/resources/common/uuid.ts +68 -0
- package/resources/documents/access.ts +388 -0
- package/resources/documents/activity.ts +803 -0
- package/resources/documents/category.ts +132 -0
- package/resources/documents/comment.ts +161 -0
- package/resources/documents/documents.ts +1124 -0
- package/resources/documents/requests.ts +196 -0
- package/resources/documents/templates.ts +949 -0
- package/resources/documents/workflow.ts +349 -0
- package/resources/filestore/file.ts +204 -0
- package/resources/internet/ads.ts +257 -0
- package/resources/internet/domain.ts +136 -0
- package/resources/internet/internet.ts +344 -0
- package/resources/internet/page.ts +236 -0
- package/resources/internet/search.ts +104 -0
- package/resources/jobs/activity.ts +600 -0
- package/resources/jobs/colleagues.ts +346 -0
- package/resources/jobs/conduct.ts +220 -0
- package/resources/jobs/labels.ts +240 -0
- package/resources/jobs/timeclock.ts +372 -0
- package/resources/laws/laws.ts +293 -0
- package/resources/livemap/livemap.ts +728 -0
- package/resources/livemap/tracker.ts +81 -0
- package/resources/mailer/access.ts +485 -0
- package/resources/mailer/email.ts +222 -0
- package/resources/mailer/events.ts +196 -0
- package/resources/mailer/message.ts +285 -0
- package/resources/mailer/settings.ts +95 -0
- package/resources/mailer/template.ts +164 -0
- package/resources/mailer/thread.ts +422 -0
- package/resources/mailer/user.ts +93 -0
- package/resources/notifications/events.ts +287 -0
- package/resources/notifications/notifications.ts +444 -0
- package/resources/permissions/permissions.ts +829 -0
- package/resources/qualifications/access.ts +275 -0
- package/resources/qualifications/exam.ts +1421 -0
- package/resources/qualifications/qualifications.ts +1289 -0
- package/resources/rector/audit.ts +226 -0
- package/resources/rector/config.ts +922 -0
- package/resources/stats/stats.ts +67 -0
- package/resources/sync/activity.ts +356 -0
- package/resources/sync/data.ts +455 -0
- package/resources/timestamp/timestamp.ts +78 -0
- package/resources/users/activity.ts +211 -0
- package/resources/users/job_props.ts +992 -0
- package/resources/users/jobs.ts +171 -0
- package/resources/users/labels.ts +161 -0
- package/resources/users/props.ts +207 -0
- package/resources/users/users.ts +570 -0
- package/resources/vehicles/vehicles.ts +114 -0
- package/resources/wiki/access.ts +362 -0
- package/resources/wiki/activity.ts +591 -0
- package/resources/wiki/page.ts +548 -0
- package/services/auth/auth.client.ts +171 -0
- package/services/auth/auth.ts +1331 -0
- package/services/calendar/calendar.client.ts +262 -0
- package/services/calendar/calendar.ts +1733 -0
- package/services/centrum/centrum.client.ts +365 -0
- package/services/centrum/centrum.ts +2619 -0
- package/services/citizenstore/citizenstore.client.ts +126 -0
- package/services/citizenstore/citizenstore.ts +847 -0
- package/services/completor/completor.client.ts +109 -0
- package/services/completor/completor.ts +616 -0
- package/services/dmv/vehicles.client.ts +41 -0
- package/services/dmv/vehicles.ts +191 -0
- package/services/docstore/docstore.client.ts +653 -0
- package/services/docstore/docstore.ts +4571 -0
- package/services/internet/ads.client.ts +41 -0
- package/services/internet/ads.ts +145 -0
- package/services/internet/internet.client.ts +58 -0
- package/services/internet/internet.ts +257 -0
- package/services/jobs/conduct.client.ts +92 -0
- package/services/jobs/conduct.ts +541 -0
- package/services/jobs/jobs.client.ts +194 -0
- package/services/jobs/jobs.ts +1301 -0
- package/services/jobs/timeclock.client.ts +75 -0
- package/services/jobs/timeclock.ts +808 -0
- package/services/livemapper/livemap.client.ts +76 -0
- package/services/livemapper/livemap.ts +552 -0
- package/services/mailer/mailer.client.ts +381 -0
- package/services/mailer/mailer.ts +2590 -0
- package/services/notificator/notificator.client.ts +76 -0
- package/services/notificator/notificator.ts +510 -0
- package/services/qualifications/qualifications.client.ts +279 -0
- package/services/qualifications/qualifications.ts +2142 -0
- package/services/rector/config.client.ts +58 -0
- package/services/rector/config.ts +216 -0
- package/services/rector/filestore.client.ts +75 -0
- package/services/rector/filestore.ts +378 -0
- package/services/rector/laws.client.ts +92 -0
- package/services/rector/laws.ts +416 -0
- package/services/rector/rector.client.ts +211 -0
- package/services/rector/rector.ts +1540 -0
- package/services/stats/stats.client.ts +37 -0
- package/services/stats/stats.ts +128 -0
- package/services/sync/sync.client.ts +110 -0
- package/services/sync/sync.ts +831 -0
- package/services/wiki/wiki.client.ts +126 -0
- package/services/wiki/wiki.ts +749 -0
- package/svcs.ts +307 -0
|
@@ -0,0 +1,1124 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.9.4 with parameter optimize_speed,long_type_number,force_server_none
|
|
2
|
+
// @generated from protobuf file "resources/documents/documents.proto" (package "resources.documents", syntax proto3)
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
5
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
6
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
7
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
9
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
10
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
11
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
13
|
+
import { Workflow } from "./workflow";
|
|
14
|
+
import { UserShort } from "../users/users";
|
|
15
|
+
import { Content } from "../common/content/content";
|
|
16
|
+
import { ContentType } from "../common/content/content";
|
|
17
|
+
import { Category } from "./category";
|
|
18
|
+
import { Timestamp } from "../timestamp/timestamp";
|
|
19
|
+
/**
|
|
20
|
+
* @generated from protobuf message resources.documents.Document
|
|
21
|
+
*/
|
|
22
|
+
export interface Document {
|
|
23
|
+
/**
|
|
24
|
+
* @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2;
|
|
29
|
+
*/
|
|
30
|
+
createdAt?: Timestamp;
|
|
31
|
+
/**
|
|
32
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
|
|
33
|
+
*/
|
|
34
|
+
updatedAt?: Timestamp;
|
|
35
|
+
/**
|
|
36
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4;
|
|
37
|
+
*/
|
|
38
|
+
deletedAt?: Timestamp;
|
|
39
|
+
/**
|
|
40
|
+
* @generated from protobuf field: optional uint64 category_id = 5 [jstype = JS_STRING];
|
|
41
|
+
*/
|
|
42
|
+
categoryId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* @generated from protobuf field: optional resources.documents.Category category = 6;
|
|
45
|
+
*/
|
|
46
|
+
category?: Category; // @gotags: alias:"category"
|
|
47
|
+
/**
|
|
48
|
+
* @sanitize
|
|
49
|
+
*
|
|
50
|
+
* @generated from protobuf field: string title = 7;
|
|
51
|
+
*/
|
|
52
|
+
title: string;
|
|
53
|
+
/**
|
|
54
|
+
* @generated from protobuf field: resources.common.content.ContentType content_type = 8;
|
|
55
|
+
*/
|
|
56
|
+
contentType: ContentType; // @gotags: alias:"content_type"
|
|
57
|
+
/**
|
|
58
|
+
* @generated from protobuf field: resources.common.content.Content content = 9;
|
|
59
|
+
*/
|
|
60
|
+
content?: Content;
|
|
61
|
+
/**
|
|
62
|
+
* @sanitize
|
|
63
|
+
*
|
|
64
|
+
* @generated from protobuf field: optional string data = 10;
|
|
65
|
+
*/
|
|
66
|
+
data?: string; // @gotags: alias:"data"
|
|
67
|
+
/**
|
|
68
|
+
* @generated from protobuf field: optional int32 creator_id = 11;
|
|
69
|
+
*/
|
|
70
|
+
creatorId?: number;
|
|
71
|
+
/**
|
|
72
|
+
* @generated from protobuf field: optional resources.users.UserShort creator = 12;
|
|
73
|
+
*/
|
|
74
|
+
creator?: UserShort; // @gotags: alias:"creator"
|
|
75
|
+
/**
|
|
76
|
+
* @generated from protobuf field: string creator_job = 13;
|
|
77
|
+
*/
|
|
78
|
+
creatorJob: string;
|
|
79
|
+
/**
|
|
80
|
+
* @generated from protobuf field: optional string creator_job_label = 14;
|
|
81
|
+
*/
|
|
82
|
+
creatorJobLabel?: string;
|
|
83
|
+
/**
|
|
84
|
+
* @sanitize
|
|
85
|
+
*
|
|
86
|
+
* @generated from protobuf field: string state = 15;
|
|
87
|
+
*/
|
|
88
|
+
state: string;
|
|
89
|
+
/**
|
|
90
|
+
* @generated from protobuf field: bool closed = 16;
|
|
91
|
+
*/
|
|
92
|
+
closed: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* @generated from protobuf field: bool public = 17;
|
|
95
|
+
*/
|
|
96
|
+
public: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* @generated from protobuf field: optional uint64 template_id = 18 [jstype = JS_STRING];
|
|
99
|
+
*/
|
|
100
|
+
templateId?: string;
|
|
101
|
+
/**
|
|
102
|
+
* @generated from protobuf field: bool pinned = 19;
|
|
103
|
+
*/
|
|
104
|
+
pinned: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* @generated from protobuf field: optional resources.documents.WorkflowState workflow_state = 20;
|
|
107
|
+
*/
|
|
108
|
+
workflowState?: WorkflowState;
|
|
109
|
+
/**
|
|
110
|
+
* @generated from protobuf field: optional resources.documents.WorkflowUserState workflow_user = 21;
|
|
111
|
+
*/
|
|
112
|
+
workflowUser?: WorkflowUserState;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf message resources.documents.DocumentShort
|
|
116
|
+
*/
|
|
117
|
+
export interface DocumentShort {
|
|
118
|
+
/**
|
|
119
|
+
* @generated from protobuf field: uint64 id = 1 [jstype = JS_STRING];
|
|
120
|
+
*/
|
|
121
|
+
id: string;
|
|
122
|
+
/**
|
|
123
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2;
|
|
124
|
+
*/
|
|
125
|
+
createdAt?: Timestamp;
|
|
126
|
+
/**
|
|
127
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
|
|
128
|
+
*/
|
|
129
|
+
updatedAt?: Timestamp;
|
|
130
|
+
/**
|
|
131
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4;
|
|
132
|
+
*/
|
|
133
|
+
deletedAt?: Timestamp;
|
|
134
|
+
/**
|
|
135
|
+
* @generated from protobuf field: optional uint64 category_id = 5 [jstype = JS_STRING];
|
|
136
|
+
*/
|
|
137
|
+
categoryId?: string;
|
|
138
|
+
/**
|
|
139
|
+
* @generated from protobuf field: optional resources.documents.Category category = 6;
|
|
140
|
+
*/
|
|
141
|
+
category?: Category; // @gotags: alias:"category"
|
|
142
|
+
/**
|
|
143
|
+
* @sanitize
|
|
144
|
+
*
|
|
145
|
+
* @generated from protobuf field: string title = 7;
|
|
146
|
+
*/
|
|
147
|
+
title: string;
|
|
148
|
+
/**
|
|
149
|
+
* @generated from protobuf field: resources.common.content.ContentType content_type = 8;
|
|
150
|
+
*/
|
|
151
|
+
contentType: ContentType; // @gotags: alias:"content_type"
|
|
152
|
+
/**
|
|
153
|
+
* @sanitize
|
|
154
|
+
*
|
|
155
|
+
* @generated from protobuf field: resources.common.content.Content content = 9;
|
|
156
|
+
*/
|
|
157
|
+
content?: Content;
|
|
158
|
+
/**
|
|
159
|
+
* @generated from protobuf field: optional int32 creator_id = 10;
|
|
160
|
+
*/
|
|
161
|
+
creatorId?: number;
|
|
162
|
+
/**
|
|
163
|
+
* @generated from protobuf field: optional resources.users.UserShort creator = 11;
|
|
164
|
+
*/
|
|
165
|
+
creator?: UserShort; // @gotags: alias:"creator"
|
|
166
|
+
/**
|
|
167
|
+
* @generated from protobuf field: string creator_job = 12;
|
|
168
|
+
*/
|
|
169
|
+
creatorJob: string; // @gotags: alias:"creator_job"
|
|
170
|
+
/**
|
|
171
|
+
* @generated from protobuf field: optional string creator_job_label = 13;
|
|
172
|
+
*/
|
|
173
|
+
creatorJobLabel?: string;
|
|
174
|
+
/**
|
|
175
|
+
* @sanitize
|
|
176
|
+
*
|
|
177
|
+
* @generated from protobuf field: string state = 14;
|
|
178
|
+
*/
|
|
179
|
+
state: string; // @gotags: alias:"state"
|
|
180
|
+
/**
|
|
181
|
+
* @generated from protobuf field: bool closed = 15;
|
|
182
|
+
*/
|
|
183
|
+
closed: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* @generated from protobuf field: bool public = 16;
|
|
186
|
+
*/
|
|
187
|
+
public: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* @generated from protobuf field: optional resources.documents.WorkflowState workflow_state = 20;
|
|
190
|
+
*/
|
|
191
|
+
workflowState?: WorkflowState;
|
|
192
|
+
/**
|
|
193
|
+
* @generated from protobuf field: optional resources.documents.WorkflowUserState workflow_user = 21;
|
|
194
|
+
*/
|
|
195
|
+
workflowUser?: WorkflowUserState;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* @generated from protobuf message resources.documents.DocumentReference
|
|
199
|
+
*/
|
|
200
|
+
export interface DocumentReference {
|
|
201
|
+
/**
|
|
202
|
+
* @generated from protobuf field: optional uint64 id = 1 [jstype = JS_STRING];
|
|
203
|
+
*/
|
|
204
|
+
id?: string;
|
|
205
|
+
/**
|
|
206
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
|
|
207
|
+
*/
|
|
208
|
+
createdAt?: Timestamp;
|
|
209
|
+
/**
|
|
210
|
+
* @generated from protobuf field: uint64 source_document_id = 3 [jstype = JS_STRING];
|
|
211
|
+
*/
|
|
212
|
+
sourceDocumentId: string; // @gotags: alias:"source_document_id"
|
|
213
|
+
/**
|
|
214
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort source_document = 4;
|
|
215
|
+
*/
|
|
216
|
+
sourceDocument?: DocumentShort; // @gotags: alias:"source_document"
|
|
217
|
+
/**
|
|
218
|
+
* @generated from protobuf field: resources.documents.DocReference reference = 5;
|
|
219
|
+
*/
|
|
220
|
+
reference: DocReference; // @gotags: alias:"reference"
|
|
221
|
+
/**
|
|
222
|
+
* @generated from protobuf field: uint64 target_document_id = 6 [jstype = JS_STRING];
|
|
223
|
+
*/
|
|
224
|
+
targetDocumentId: string; // @gotags: alias:"target_document_id"
|
|
225
|
+
/**
|
|
226
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort target_document = 7;
|
|
227
|
+
*/
|
|
228
|
+
targetDocument?: DocumentShort; // @gotags: alias:"target_document"
|
|
229
|
+
/**
|
|
230
|
+
* @generated from protobuf field: optional int32 creator_id = 8;
|
|
231
|
+
*/
|
|
232
|
+
creatorId?: number;
|
|
233
|
+
/**
|
|
234
|
+
* @generated from protobuf field: optional resources.users.UserShort creator = 9;
|
|
235
|
+
*/
|
|
236
|
+
creator?: UserShort; // @gotags: alias:"ref_creator"
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* @generated from protobuf message resources.documents.DocumentRelation
|
|
240
|
+
*/
|
|
241
|
+
export interface DocumentRelation {
|
|
242
|
+
/**
|
|
243
|
+
* @generated from protobuf field: optional uint64 id = 1 [jstype = JS_STRING];
|
|
244
|
+
*/
|
|
245
|
+
id?: string;
|
|
246
|
+
/**
|
|
247
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
|
|
248
|
+
*/
|
|
249
|
+
createdAt?: Timestamp;
|
|
250
|
+
/**
|
|
251
|
+
* @generated from protobuf field: uint64 document_id = 3 [jstype = JS_STRING];
|
|
252
|
+
*/
|
|
253
|
+
documentId: string;
|
|
254
|
+
/**
|
|
255
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort document = 4;
|
|
256
|
+
*/
|
|
257
|
+
document?: DocumentShort; // @gotags: alias:"document"
|
|
258
|
+
/**
|
|
259
|
+
* @generated from protobuf field: int32 source_user_id = 5;
|
|
260
|
+
*/
|
|
261
|
+
sourceUserId: number; // @gotags: alias:"source_user_id"
|
|
262
|
+
/**
|
|
263
|
+
* @generated from protobuf field: optional resources.users.UserShort source_user = 6;
|
|
264
|
+
*/
|
|
265
|
+
sourceUser?: UserShort; // @gotags: alias:"source_user"
|
|
266
|
+
/**
|
|
267
|
+
* @generated from protobuf field: resources.documents.DocRelation relation = 7;
|
|
268
|
+
*/
|
|
269
|
+
relation: DocRelation; // @gotags: alias:"relation"
|
|
270
|
+
/**
|
|
271
|
+
* @generated from protobuf field: int32 target_user_id = 8;
|
|
272
|
+
*/
|
|
273
|
+
targetUserId: number; // @gotags: alias:"target_user_id"
|
|
274
|
+
/**
|
|
275
|
+
* @generated from protobuf field: optional resources.users.UserShort target_user = 9;
|
|
276
|
+
*/
|
|
277
|
+
targetUser?: UserShort; // @gotags: alias:"target_user"
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* @generated from protobuf message resources.documents.WorkflowState
|
|
281
|
+
*/
|
|
282
|
+
export interface WorkflowState {
|
|
283
|
+
/**
|
|
284
|
+
* @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
|
|
285
|
+
*/
|
|
286
|
+
documentId: string;
|
|
287
|
+
/**
|
|
288
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp next_reminder_time = 2;
|
|
289
|
+
*/
|
|
290
|
+
nextReminderTime?: Timestamp;
|
|
291
|
+
/**
|
|
292
|
+
* @generated from protobuf field: optional int32 next_reminder_count = 3;
|
|
293
|
+
*/
|
|
294
|
+
nextReminderCount?: number;
|
|
295
|
+
/**
|
|
296
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp auto_close_time = 4;
|
|
297
|
+
*/
|
|
298
|
+
autoCloseTime?: Timestamp;
|
|
299
|
+
/**
|
|
300
|
+
* @generated from protobuf field: optional resources.documents.Workflow workflow = 5;
|
|
301
|
+
*/
|
|
302
|
+
workflow?: Workflow; // @gotags: alias:"workflow"
|
|
303
|
+
/**
|
|
304
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort document = 6;
|
|
305
|
+
*/
|
|
306
|
+
document?: DocumentShort;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* @generated from protobuf message resources.documents.WorkflowUserState
|
|
310
|
+
*/
|
|
311
|
+
export interface WorkflowUserState {
|
|
312
|
+
/**
|
|
313
|
+
* @generated from protobuf field: uint64 document_id = 1 [jstype = JS_STRING];
|
|
314
|
+
*/
|
|
315
|
+
documentId: string;
|
|
316
|
+
/**
|
|
317
|
+
* @generated from protobuf field: int32 user_id = 2;
|
|
318
|
+
*/
|
|
319
|
+
userId: number;
|
|
320
|
+
/**
|
|
321
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp manual_reminder_time = 3;
|
|
322
|
+
*/
|
|
323
|
+
manualReminderTime?: Timestamp;
|
|
324
|
+
/**
|
|
325
|
+
* @generated from protobuf field: optional string manual_reminder_message = 4;
|
|
326
|
+
*/
|
|
327
|
+
manualReminderMessage?: string;
|
|
328
|
+
/**
|
|
329
|
+
* @generated from protobuf field: optional resources.documents.Workflow workflow = 5;
|
|
330
|
+
*/
|
|
331
|
+
workflow?: Workflow; // @gotags: alias:"workflow"
|
|
332
|
+
/**
|
|
333
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort document = 6;
|
|
334
|
+
*/
|
|
335
|
+
document?: DocumentShort;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* @generated from protobuf enum resources.documents.DocReference
|
|
339
|
+
*/
|
|
340
|
+
export enum DocReference {
|
|
341
|
+
/**
|
|
342
|
+
* @generated from protobuf enum value: DOC_REFERENCE_UNSPECIFIED = 0;
|
|
343
|
+
*/
|
|
344
|
+
UNSPECIFIED = 0,
|
|
345
|
+
/**
|
|
346
|
+
* @generated from protobuf enum value: DOC_REFERENCE_LINKED = 1;
|
|
347
|
+
*/
|
|
348
|
+
LINKED = 1,
|
|
349
|
+
/**
|
|
350
|
+
* @generated from protobuf enum value: DOC_REFERENCE_SOLVES = 2;
|
|
351
|
+
*/
|
|
352
|
+
SOLVES = 2,
|
|
353
|
+
/**
|
|
354
|
+
* @generated from protobuf enum value: DOC_REFERENCE_CLOSES = 3;
|
|
355
|
+
*/
|
|
356
|
+
CLOSES = 3,
|
|
357
|
+
/**
|
|
358
|
+
* @generated from protobuf enum value: DOC_REFERENCE_DEPRECATES = 4;
|
|
359
|
+
*/
|
|
360
|
+
DEPRECATES = 4
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* @generated from protobuf enum resources.documents.DocRelation
|
|
364
|
+
*/
|
|
365
|
+
export enum DocRelation {
|
|
366
|
+
/**
|
|
367
|
+
* @generated from protobuf enum value: DOC_RELATION_UNSPECIFIED = 0;
|
|
368
|
+
*/
|
|
369
|
+
UNSPECIFIED = 0,
|
|
370
|
+
/**
|
|
371
|
+
* @generated from protobuf enum value: DOC_RELATION_MENTIONED = 1;
|
|
372
|
+
*/
|
|
373
|
+
MENTIONED = 1,
|
|
374
|
+
/**
|
|
375
|
+
* @generated from protobuf enum value: DOC_RELATION_TARGETS = 2;
|
|
376
|
+
*/
|
|
377
|
+
TARGETS = 2,
|
|
378
|
+
/**
|
|
379
|
+
* @generated from protobuf enum value: DOC_RELATION_CAUSED = 3;
|
|
380
|
+
*/
|
|
381
|
+
CAUSED = 3
|
|
382
|
+
}
|
|
383
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
384
|
+
class Document$Type extends MessageType<Document> {
|
|
385
|
+
constructor() {
|
|
386
|
+
super("resources.documents.Document", [
|
|
387
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
388
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
389
|
+
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
390
|
+
{ no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
391
|
+
{ no: 5, name: "category_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
|
|
392
|
+
{ no: 6, name: "category", kind: "message", T: () => Category },
|
|
393
|
+
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "1024" } } } },
|
|
394
|
+
{ no: 8, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
|
|
395
|
+
{ no: 9, name: "content", kind: "message", T: () => Content },
|
|
396
|
+
{ no: 10, name: "data", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxBytes: "1000000" } } } },
|
|
397
|
+
{ no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
|
|
398
|
+
{ no: 12, name: "creator", kind: "message", T: () => UserShort },
|
|
399
|
+
{ no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
|
|
400
|
+
{ no: 14, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
|
|
401
|
+
{ no: 15, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "32" } } } },
|
|
402
|
+
{ no: 16, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
403
|
+
{ no: 17, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
404
|
+
{ no: 18, name: "template_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
|
|
405
|
+
{ no: 19, name: "pinned", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
406
|
+
{ no: 20, name: "workflow_state", kind: "message", T: () => WorkflowState },
|
|
407
|
+
{ no: 21, name: "workflow_user", kind: "message", T: () => WorkflowUserState }
|
|
408
|
+
]);
|
|
409
|
+
}
|
|
410
|
+
create(value?: PartialMessage<Document>): Document {
|
|
411
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
412
|
+
message.id = "0";
|
|
413
|
+
message.title = "";
|
|
414
|
+
message.contentType = 0;
|
|
415
|
+
message.creatorJob = "";
|
|
416
|
+
message.state = "";
|
|
417
|
+
message.closed = false;
|
|
418
|
+
message.public = false;
|
|
419
|
+
message.pinned = false;
|
|
420
|
+
if (value !== undefined)
|
|
421
|
+
reflectionMergePartial<Document>(this, message, value);
|
|
422
|
+
return message;
|
|
423
|
+
}
|
|
424
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Document): Document {
|
|
425
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
426
|
+
while (reader.pos < end) {
|
|
427
|
+
let [fieldNo, wireType] = reader.tag();
|
|
428
|
+
switch (fieldNo) {
|
|
429
|
+
case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
|
|
430
|
+
message.id = reader.uint64().toString();
|
|
431
|
+
break;
|
|
432
|
+
case /* resources.timestamp.Timestamp created_at */ 2:
|
|
433
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
434
|
+
break;
|
|
435
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 3:
|
|
436
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
437
|
+
break;
|
|
438
|
+
case /* optional resources.timestamp.Timestamp deleted_at */ 4:
|
|
439
|
+
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
440
|
+
break;
|
|
441
|
+
case /* optional uint64 category_id = 5 [jstype = JS_STRING];*/ 5:
|
|
442
|
+
message.categoryId = reader.uint64().toString();
|
|
443
|
+
break;
|
|
444
|
+
case /* optional resources.documents.Category category */ 6:
|
|
445
|
+
message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
|
|
446
|
+
break;
|
|
447
|
+
case /* string title */ 7:
|
|
448
|
+
message.title = reader.string();
|
|
449
|
+
break;
|
|
450
|
+
case /* resources.common.content.ContentType content_type */ 8:
|
|
451
|
+
message.contentType = reader.int32();
|
|
452
|
+
break;
|
|
453
|
+
case /* resources.common.content.Content content */ 9:
|
|
454
|
+
message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
|
|
455
|
+
break;
|
|
456
|
+
case /* optional string data */ 10:
|
|
457
|
+
message.data = reader.string();
|
|
458
|
+
break;
|
|
459
|
+
case /* optional int32 creator_id */ 11:
|
|
460
|
+
message.creatorId = reader.int32();
|
|
461
|
+
break;
|
|
462
|
+
case /* optional resources.users.UserShort creator */ 12:
|
|
463
|
+
message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
464
|
+
break;
|
|
465
|
+
case /* string creator_job */ 13:
|
|
466
|
+
message.creatorJob = reader.string();
|
|
467
|
+
break;
|
|
468
|
+
case /* optional string creator_job_label */ 14:
|
|
469
|
+
message.creatorJobLabel = reader.string();
|
|
470
|
+
break;
|
|
471
|
+
case /* string state */ 15:
|
|
472
|
+
message.state = reader.string();
|
|
473
|
+
break;
|
|
474
|
+
case /* bool closed */ 16:
|
|
475
|
+
message.closed = reader.bool();
|
|
476
|
+
break;
|
|
477
|
+
case /* bool public */ 17:
|
|
478
|
+
message.public = reader.bool();
|
|
479
|
+
break;
|
|
480
|
+
case /* optional uint64 template_id = 18 [jstype = JS_STRING];*/ 18:
|
|
481
|
+
message.templateId = reader.uint64().toString();
|
|
482
|
+
break;
|
|
483
|
+
case /* bool pinned */ 19:
|
|
484
|
+
message.pinned = reader.bool();
|
|
485
|
+
break;
|
|
486
|
+
case /* optional resources.documents.WorkflowState workflow_state */ 20:
|
|
487
|
+
message.workflowState = WorkflowState.internalBinaryRead(reader, reader.uint32(), options, message.workflowState);
|
|
488
|
+
break;
|
|
489
|
+
case /* optional resources.documents.WorkflowUserState workflow_user */ 21:
|
|
490
|
+
message.workflowUser = WorkflowUserState.internalBinaryRead(reader, reader.uint32(), options, message.workflowUser);
|
|
491
|
+
break;
|
|
492
|
+
default:
|
|
493
|
+
let u = options.readUnknownField;
|
|
494
|
+
if (u === "throw")
|
|
495
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
496
|
+
let d = reader.skip(wireType);
|
|
497
|
+
if (u !== false)
|
|
498
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
return message;
|
|
502
|
+
}
|
|
503
|
+
internalBinaryWrite(message: Document, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
504
|
+
/* uint64 id = 1 [jstype = JS_STRING]; */
|
|
505
|
+
if (message.id !== "0")
|
|
506
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
507
|
+
/* resources.timestamp.Timestamp created_at = 2; */
|
|
508
|
+
if (message.createdAt)
|
|
509
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
510
|
+
/* optional resources.timestamp.Timestamp updated_at = 3; */
|
|
511
|
+
if (message.updatedAt)
|
|
512
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
513
|
+
/* optional resources.timestamp.Timestamp deleted_at = 4; */
|
|
514
|
+
if (message.deletedAt)
|
|
515
|
+
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
516
|
+
/* optional uint64 category_id = 5 [jstype = JS_STRING]; */
|
|
517
|
+
if (message.categoryId !== undefined)
|
|
518
|
+
writer.tag(5, WireType.Varint).uint64(message.categoryId);
|
|
519
|
+
/* optional resources.documents.Category category = 6; */
|
|
520
|
+
if (message.category)
|
|
521
|
+
Category.internalBinaryWrite(message.category, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
522
|
+
/* string title = 7; */
|
|
523
|
+
if (message.title !== "")
|
|
524
|
+
writer.tag(7, WireType.LengthDelimited).string(message.title);
|
|
525
|
+
/* resources.common.content.ContentType content_type = 8; */
|
|
526
|
+
if (message.contentType !== 0)
|
|
527
|
+
writer.tag(8, WireType.Varint).int32(message.contentType);
|
|
528
|
+
/* resources.common.content.Content content = 9; */
|
|
529
|
+
if (message.content)
|
|
530
|
+
Content.internalBinaryWrite(message.content, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
531
|
+
/* optional string data = 10; */
|
|
532
|
+
if (message.data !== undefined)
|
|
533
|
+
writer.tag(10, WireType.LengthDelimited).string(message.data);
|
|
534
|
+
/* optional int32 creator_id = 11; */
|
|
535
|
+
if (message.creatorId !== undefined)
|
|
536
|
+
writer.tag(11, WireType.Varint).int32(message.creatorId);
|
|
537
|
+
/* optional resources.users.UserShort creator = 12; */
|
|
538
|
+
if (message.creator)
|
|
539
|
+
UserShort.internalBinaryWrite(message.creator, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
540
|
+
/* string creator_job = 13; */
|
|
541
|
+
if (message.creatorJob !== "")
|
|
542
|
+
writer.tag(13, WireType.LengthDelimited).string(message.creatorJob);
|
|
543
|
+
/* optional string creator_job_label = 14; */
|
|
544
|
+
if (message.creatorJobLabel !== undefined)
|
|
545
|
+
writer.tag(14, WireType.LengthDelimited).string(message.creatorJobLabel);
|
|
546
|
+
/* string state = 15; */
|
|
547
|
+
if (message.state !== "")
|
|
548
|
+
writer.tag(15, WireType.LengthDelimited).string(message.state);
|
|
549
|
+
/* bool closed = 16; */
|
|
550
|
+
if (message.closed !== false)
|
|
551
|
+
writer.tag(16, WireType.Varint).bool(message.closed);
|
|
552
|
+
/* bool public = 17; */
|
|
553
|
+
if (message.public !== false)
|
|
554
|
+
writer.tag(17, WireType.Varint).bool(message.public);
|
|
555
|
+
/* optional uint64 template_id = 18 [jstype = JS_STRING]; */
|
|
556
|
+
if (message.templateId !== undefined)
|
|
557
|
+
writer.tag(18, WireType.Varint).uint64(message.templateId);
|
|
558
|
+
/* bool pinned = 19; */
|
|
559
|
+
if (message.pinned !== false)
|
|
560
|
+
writer.tag(19, WireType.Varint).bool(message.pinned);
|
|
561
|
+
/* optional resources.documents.WorkflowState workflow_state = 20; */
|
|
562
|
+
if (message.workflowState)
|
|
563
|
+
WorkflowState.internalBinaryWrite(message.workflowState, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
|
|
564
|
+
/* optional resources.documents.WorkflowUserState workflow_user = 21; */
|
|
565
|
+
if (message.workflowUser)
|
|
566
|
+
WorkflowUserState.internalBinaryWrite(message.workflowUser, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
|
|
567
|
+
let u = options.writeUnknownFields;
|
|
568
|
+
if (u !== false)
|
|
569
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
570
|
+
return writer;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* @generated MessageType for protobuf message resources.documents.Document
|
|
575
|
+
*/
|
|
576
|
+
export const Document = new Document$Type();
|
|
577
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
578
|
+
class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
579
|
+
constructor() {
|
|
580
|
+
super("resources.documents.DocumentShort", [
|
|
581
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
582
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
583
|
+
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
584
|
+
{ no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
|
|
585
|
+
{ no: 5, name: "category_id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
|
|
586
|
+
{ no: 6, name: "category", kind: "message", T: () => Category },
|
|
587
|
+
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "1024" } } } },
|
|
588
|
+
{ no: 8, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
|
|
589
|
+
{ no: 9, name: "content", kind: "message", T: () => Content },
|
|
590
|
+
{ no: 10, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
|
|
591
|
+
{ no: 11, name: "creator", kind: "message", T: () => UserShort },
|
|
592
|
+
{ no: 12, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
|
|
593
|
+
{ no: 13, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
|
|
594
|
+
{ no: 14, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "32" } } } },
|
|
595
|
+
{ no: 15, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
596
|
+
{ no: 16, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
597
|
+
{ no: 20, name: "workflow_state", kind: "message", T: () => WorkflowState },
|
|
598
|
+
{ no: 21, name: "workflow_user", kind: "message", T: () => WorkflowUserState }
|
|
599
|
+
]);
|
|
600
|
+
}
|
|
601
|
+
create(value?: PartialMessage<DocumentShort>): DocumentShort {
|
|
602
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
603
|
+
message.id = "0";
|
|
604
|
+
message.title = "";
|
|
605
|
+
message.contentType = 0;
|
|
606
|
+
message.creatorJob = "";
|
|
607
|
+
message.state = "";
|
|
608
|
+
message.closed = false;
|
|
609
|
+
message.public = false;
|
|
610
|
+
if (value !== undefined)
|
|
611
|
+
reflectionMergePartial<DocumentShort>(this, message, value);
|
|
612
|
+
return message;
|
|
613
|
+
}
|
|
614
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentShort): DocumentShort {
|
|
615
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
616
|
+
while (reader.pos < end) {
|
|
617
|
+
let [fieldNo, wireType] = reader.tag();
|
|
618
|
+
switch (fieldNo) {
|
|
619
|
+
case /* uint64 id = 1 [jstype = JS_STRING];*/ 1:
|
|
620
|
+
message.id = reader.uint64().toString();
|
|
621
|
+
break;
|
|
622
|
+
case /* resources.timestamp.Timestamp created_at */ 2:
|
|
623
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
624
|
+
break;
|
|
625
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 3:
|
|
626
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
627
|
+
break;
|
|
628
|
+
case /* optional resources.timestamp.Timestamp deleted_at */ 4:
|
|
629
|
+
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
630
|
+
break;
|
|
631
|
+
case /* optional uint64 category_id = 5 [jstype = JS_STRING];*/ 5:
|
|
632
|
+
message.categoryId = reader.uint64().toString();
|
|
633
|
+
break;
|
|
634
|
+
case /* optional resources.documents.Category category */ 6:
|
|
635
|
+
message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
|
|
636
|
+
break;
|
|
637
|
+
case /* string title */ 7:
|
|
638
|
+
message.title = reader.string();
|
|
639
|
+
break;
|
|
640
|
+
case /* resources.common.content.ContentType content_type */ 8:
|
|
641
|
+
message.contentType = reader.int32();
|
|
642
|
+
break;
|
|
643
|
+
case /* resources.common.content.Content content */ 9:
|
|
644
|
+
message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
|
|
645
|
+
break;
|
|
646
|
+
case /* optional int32 creator_id */ 10:
|
|
647
|
+
message.creatorId = reader.int32();
|
|
648
|
+
break;
|
|
649
|
+
case /* optional resources.users.UserShort creator */ 11:
|
|
650
|
+
message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
651
|
+
break;
|
|
652
|
+
case /* string creator_job */ 12:
|
|
653
|
+
message.creatorJob = reader.string();
|
|
654
|
+
break;
|
|
655
|
+
case /* optional string creator_job_label */ 13:
|
|
656
|
+
message.creatorJobLabel = reader.string();
|
|
657
|
+
break;
|
|
658
|
+
case /* string state */ 14:
|
|
659
|
+
message.state = reader.string();
|
|
660
|
+
break;
|
|
661
|
+
case /* bool closed */ 15:
|
|
662
|
+
message.closed = reader.bool();
|
|
663
|
+
break;
|
|
664
|
+
case /* bool public */ 16:
|
|
665
|
+
message.public = reader.bool();
|
|
666
|
+
break;
|
|
667
|
+
case /* optional resources.documents.WorkflowState workflow_state */ 20:
|
|
668
|
+
message.workflowState = WorkflowState.internalBinaryRead(reader, reader.uint32(), options, message.workflowState);
|
|
669
|
+
break;
|
|
670
|
+
case /* optional resources.documents.WorkflowUserState workflow_user */ 21:
|
|
671
|
+
message.workflowUser = WorkflowUserState.internalBinaryRead(reader, reader.uint32(), options, message.workflowUser);
|
|
672
|
+
break;
|
|
673
|
+
default:
|
|
674
|
+
let u = options.readUnknownField;
|
|
675
|
+
if (u === "throw")
|
|
676
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
677
|
+
let d = reader.skip(wireType);
|
|
678
|
+
if (u !== false)
|
|
679
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
return message;
|
|
683
|
+
}
|
|
684
|
+
internalBinaryWrite(message: DocumentShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
685
|
+
/* uint64 id = 1 [jstype = JS_STRING]; */
|
|
686
|
+
if (message.id !== "0")
|
|
687
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
688
|
+
/* resources.timestamp.Timestamp created_at = 2; */
|
|
689
|
+
if (message.createdAt)
|
|
690
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
691
|
+
/* optional resources.timestamp.Timestamp updated_at = 3; */
|
|
692
|
+
if (message.updatedAt)
|
|
693
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
694
|
+
/* optional resources.timestamp.Timestamp deleted_at = 4; */
|
|
695
|
+
if (message.deletedAt)
|
|
696
|
+
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
697
|
+
/* optional uint64 category_id = 5 [jstype = JS_STRING]; */
|
|
698
|
+
if (message.categoryId !== undefined)
|
|
699
|
+
writer.tag(5, WireType.Varint).uint64(message.categoryId);
|
|
700
|
+
/* optional resources.documents.Category category = 6; */
|
|
701
|
+
if (message.category)
|
|
702
|
+
Category.internalBinaryWrite(message.category, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
703
|
+
/* string title = 7; */
|
|
704
|
+
if (message.title !== "")
|
|
705
|
+
writer.tag(7, WireType.LengthDelimited).string(message.title);
|
|
706
|
+
/* resources.common.content.ContentType content_type = 8; */
|
|
707
|
+
if (message.contentType !== 0)
|
|
708
|
+
writer.tag(8, WireType.Varint).int32(message.contentType);
|
|
709
|
+
/* resources.common.content.Content content = 9; */
|
|
710
|
+
if (message.content)
|
|
711
|
+
Content.internalBinaryWrite(message.content, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
712
|
+
/* optional int32 creator_id = 10; */
|
|
713
|
+
if (message.creatorId !== undefined)
|
|
714
|
+
writer.tag(10, WireType.Varint).int32(message.creatorId);
|
|
715
|
+
/* optional resources.users.UserShort creator = 11; */
|
|
716
|
+
if (message.creator)
|
|
717
|
+
UserShort.internalBinaryWrite(message.creator, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
718
|
+
/* string creator_job = 12; */
|
|
719
|
+
if (message.creatorJob !== "")
|
|
720
|
+
writer.tag(12, WireType.LengthDelimited).string(message.creatorJob);
|
|
721
|
+
/* optional string creator_job_label = 13; */
|
|
722
|
+
if (message.creatorJobLabel !== undefined)
|
|
723
|
+
writer.tag(13, WireType.LengthDelimited).string(message.creatorJobLabel);
|
|
724
|
+
/* string state = 14; */
|
|
725
|
+
if (message.state !== "")
|
|
726
|
+
writer.tag(14, WireType.LengthDelimited).string(message.state);
|
|
727
|
+
/* bool closed = 15; */
|
|
728
|
+
if (message.closed !== false)
|
|
729
|
+
writer.tag(15, WireType.Varint).bool(message.closed);
|
|
730
|
+
/* bool public = 16; */
|
|
731
|
+
if (message.public !== false)
|
|
732
|
+
writer.tag(16, WireType.Varint).bool(message.public);
|
|
733
|
+
/* optional resources.documents.WorkflowState workflow_state = 20; */
|
|
734
|
+
if (message.workflowState)
|
|
735
|
+
WorkflowState.internalBinaryWrite(message.workflowState, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
|
|
736
|
+
/* optional resources.documents.WorkflowUserState workflow_user = 21; */
|
|
737
|
+
if (message.workflowUser)
|
|
738
|
+
WorkflowUserState.internalBinaryWrite(message.workflowUser, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
|
|
739
|
+
let u = options.writeUnknownFields;
|
|
740
|
+
if (u !== false)
|
|
741
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
742
|
+
return writer;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* @generated MessageType for protobuf message resources.documents.DocumentShort
|
|
747
|
+
*/
|
|
748
|
+
export const DocumentShort = new DocumentShort$Type();
|
|
749
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
750
|
+
class DocumentReference$Type extends MessageType<DocumentReference> {
|
|
751
|
+
constructor() {
|
|
752
|
+
super("resources.documents.DocumentReference", [
|
|
753
|
+
{ no: 1, name: "id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
|
|
754
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
755
|
+
{ no: 3, name: "source_document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
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.rules": { enum: { definedOnly: true } } } },
|
|
758
|
+
{ no: 6, name: "target_document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
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.rules": { int32: { gt: 0 } } } },
|
|
761
|
+
{ no: 9, name: "creator", kind: "message", T: () => UserShort }
|
|
762
|
+
]);
|
|
763
|
+
}
|
|
764
|
+
create(value?: PartialMessage<DocumentReference>): DocumentReference {
|
|
765
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
766
|
+
message.sourceDocumentId = "0";
|
|
767
|
+
message.reference = 0;
|
|
768
|
+
message.targetDocumentId = "0";
|
|
769
|
+
if (value !== undefined)
|
|
770
|
+
reflectionMergePartial<DocumentReference>(this, message, value);
|
|
771
|
+
return message;
|
|
772
|
+
}
|
|
773
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentReference): DocumentReference {
|
|
774
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
775
|
+
while (reader.pos < end) {
|
|
776
|
+
let [fieldNo, wireType] = reader.tag();
|
|
777
|
+
switch (fieldNo) {
|
|
778
|
+
case /* optional uint64 id = 1 [jstype = JS_STRING];*/ 1:
|
|
779
|
+
message.id = reader.uint64().toString();
|
|
780
|
+
break;
|
|
781
|
+
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
782
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
783
|
+
break;
|
|
784
|
+
case /* uint64 source_document_id = 3 [jstype = JS_STRING];*/ 3:
|
|
785
|
+
message.sourceDocumentId = reader.uint64().toString();
|
|
786
|
+
break;
|
|
787
|
+
case /* optional resources.documents.DocumentShort source_document */ 4:
|
|
788
|
+
message.sourceDocument = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.sourceDocument);
|
|
789
|
+
break;
|
|
790
|
+
case /* resources.documents.DocReference reference */ 5:
|
|
791
|
+
message.reference = reader.int32();
|
|
792
|
+
break;
|
|
793
|
+
case /* uint64 target_document_id = 6 [jstype = JS_STRING];*/ 6:
|
|
794
|
+
message.targetDocumentId = reader.uint64().toString();
|
|
795
|
+
break;
|
|
796
|
+
case /* optional resources.documents.DocumentShort target_document */ 7:
|
|
797
|
+
message.targetDocument = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.targetDocument);
|
|
798
|
+
break;
|
|
799
|
+
case /* optional int32 creator_id */ 8:
|
|
800
|
+
message.creatorId = reader.int32();
|
|
801
|
+
break;
|
|
802
|
+
case /* optional resources.users.UserShort creator */ 9:
|
|
803
|
+
message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
804
|
+
break;
|
|
805
|
+
default:
|
|
806
|
+
let u = options.readUnknownField;
|
|
807
|
+
if (u === "throw")
|
|
808
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
809
|
+
let d = reader.skip(wireType);
|
|
810
|
+
if (u !== false)
|
|
811
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
return message;
|
|
815
|
+
}
|
|
816
|
+
internalBinaryWrite(message: DocumentReference, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
817
|
+
/* optional uint64 id = 1 [jstype = JS_STRING]; */
|
|
818
|
+
if (message.id !== undefined)
|
|
819
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
820
|
+
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
821
|
+
if (message.createdAt)
|
|
822
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
823
|
+
/* uint64 source_document_id = 3 [jstype = JS_STRING]; */
|
|
824
|
+
if (message.sourceDocumentId !== "0")
|
|
825
|
+
writer.tag(3, WireType.Varint).uint64(message.sourceDocumentId);
|
|
826
|
+
/* optional resources.documents.DocumentShort source_document = 4; */
|
|
827
|
+
if (message.sourceDocument)
|
|
828
|
+
DocumentShort.internalBinaryWrite(message.sourceDocument, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
829
|
+
/* resources.documents.DocReference reference = 5; */
|
|
830
|
+
if (message.reference !== 0)
|
|
831
|
+
writer.tag(5, WireType.Varint).int32(message.reference);
|
|
832
|
+
/* uint64 target_document_id = 6 [jstype = JS_STRING]; */
|
|
833
|
+
if (message.targetDocumentId !== "0")
|
|
834
|
+
writer.tag(6, WireType.Varint).uint64(message.targetDocumentId);
|
|
835
|
+
/* optional resources.documents.DocumentShort target_document = 7; */
|
|
836
|
+
if (message.targetDocument)
|
|
837
|
+
DocumentShort.internalBinaryWrite(message.targetDocument, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
838
|
+
/* optional int32 creator_id = 8; */
|
|
839
|
+
if (message.creatorId !== undefined)
|
|
840
|
+
writer.tag(8, WireType.Varint).int32(message.creatorId);
|
|
841
|
+
/* optional resources.users.UserShort creator = 9; */
|
|
842
|
+
if (message.creator)
|
|
843
|
+
UserShort.internalBinaryWrite(message.creator, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
844
|
+
let u = options.writeUnknownFields;
|
|
845
|
+
if (u !== false)
|
|
846
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
847
|
+
return writer;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* @generated MessageType for protobuf message resources.documents.DocumentReference
|
|
852
|
+
*/
|
|
853
|
+
export const DocumentReference = new DocumentReference$Type();
|
|
854
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
855
|
+
class DocumentRelation$Type extends MessageType<DocumentRelation> {
|
|
856
|
+
constructor() {
|
|
857
|
+
super("resources.documents.DocumentRelation", [
|
|
858
|
+
{ no: 1, name: "id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
|
|
859
|
+
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
860
|
+
{ no: 3, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
861
|
+
{ no: 4, name: "document", kind: "message", T: () => DocumentShort },
|
|
862
|
+
{ no: 5, name: "source_user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
|
|
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.rules": { enum: { definedOnly: true } } } },
|
|
865
|
+
{ no: 8, name: "target_user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
|
|
866
|
+
{ no: 9, name: "target_user", kind: "message", T: () => UserShort }
|
|
867
|
+
]);
|
|
868
|
+
}
|
|
869
|
+
create(value?: PartialMessage<DocumentRelation>): DocumentRelation {
|
|
870
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
871
|
+
message.documentId = "0";
|
|
872
|
+
message.sourceUserId = 0;
|
|
873
|
+
message.relation = 0;
|
|
874
|
+
message.targetUserId = 0;
|
|
875
|
+
if (value !== undefined)
|
|
876
|
+
reflectionMergePartial<DocumentRelation>(this, message, value);
|
|
877
|
+
return message;
|
|
878
|
+
}
|
|
879
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentRelation): DocumentRelation {
|
|
880
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
881
|
+
while (reader.pos < end) {
|
|
882
|
+
let [fieldNo, wireType] = reader.tag();
|
|
883
|
+
switch (fieldNo) {
|
|
884
|
+
case /* optional uint64 id = 1 [jstype = JS_STRING];*/ 1:
|
|
885
|
+
message.id = reader.uint64().toString();
|
|
886
|
+
break;
|
|
887
|
+
case /* optional resources.timestamp.Timestamp created_at */ 2:
|
|
888
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
889
|
+
break;
|
|
890
|
+
case /* uint64 document_id = 3 [jstype = JS_STRING];*/ 3:
|
|
891
|
+
message.documentId = reader.uint64().toString();
|
|
892
|
+
break;
|
|
893
|
+
case /* optional resources.documents.DocumentShort document */ 4:
|
|
894
|
+
message.document = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.document);
|
|
895
|
+
break;
|
|
896
|
+
case /* int32 source_user_id */ 5:
|
|
897
|
+
message.sourceUserId = reader.int32();
|
|
898
|
+
break;
|
|
899
|
+
case /* optional resources.users.UserShort source_user */ 6:
|
|
900
|
+
message.sourceUser = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.sourceUser);
|
|
901
|
+
break;
|
|
902
|
+
case /* resources.documents.DocRelation relation */ 7:
|
|
903
|
+
message.relation = reader.int32();
|
|
904
|
+
break;
|
|
905
|
+
case /* int32 target_user_id */ 8:
|
|
906
|
+
message.targetUserId = reader.int32();
|
|
907
|
+
break;
|
|
908
|
+
case /* optional resources.users.UserShort target_user */ 9:
|
|
909
|
+
message.targetUser = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.targetUser);
|
|
910
|
+
break;
|
|
911
|
+
default:
|
|
912
|
+
let u = options.readUnknownField;
|
|
913
|
+
if (u === "throw")
|
|
914
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
915
|
+
let d = reader.skip(wireType);
|
|
916
|
+
if (u !== false)
|
|
917
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
return message;
|
|
921
|
+
}
|
|
922
|
+
internalBinaryWrite(message: DocumentRelation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
923
|
+
/* optional uint64 id = 1 [jstype = JS_STRING]; */
|
|
924
|
+
if (message.id !== undefined)
|
|
925
|
+
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
926
|
+
/* optional resources.timestamp.Timestamp created_at = 2; */
|
|
927
|
+
if (message.createdAt)
|
|
928
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
929
|
+
/* uint64 document_id = 3 [jstype = JS_STRING]; */
|
|
930
|
+
if (message.documentId !== "0")
|
|
931
|
+
writer.tag(3, WireType.Varint).uint64(message.documentId);
|
|
932
|
+
/* optional resources.documents.DocumentShort document = 4; */
|
|
933
|
+
if (message.document)
|
|
934
|
+
DocumentShort.internalBinaryWrite(message.document, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
935
|
+
/* int32 source_user_id = 5; */
|
|
936
|
+
if (message.sourceUserId !== 0)
|
|
937
|
+
writer.tag(5, WireType.Varint).int32(message.sourceUserId);
|
|
938
|
+
/* optional resources.users.UserShort source_user = 6; */
|
|
939
|
+
if (message.sourceUser)
|
|
940
|
+
UserShort.internalBinaryWrite(message.sourceUser, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
941
|
+
/* resources.documents.DocRelation relation = 7; */
|
|
942
|
+
if (message.relation !== 0)
|
|
943
|
+
writer.tag(7, WireType.Varint).int32(message.relation);
|
|
944
|
+
/* int32 target_user_id = 8; */
|
|
945
|
+
if (message.targetUserId !== 0)
|
|
946
|
+
writer.tag(8, WireType.Varint).int32(message.targetUserId);
|
|
947
|
+
/* optional resources.users.UserShort target_user = 9; */
|
|
948
|
+
if (message.targetUser)
|
|
949
|
+
UserShort.internalBinaryWrite(message.targetUser, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
950
|
+
let u = options.writeUnknownFields;
|
|
951
|
+
if (u !== false)
|
|
952
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
953
|
+
return writer;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* @generated MessageType for protobuf message resources.documents.DocumentRelation
|
|
958
|
+
*/
|
|
959
|
+
export const DocumentRelation = new DocumentRelation$Type();
|
|
960
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
961
|
+
class WorkflowState$Type extends MessageType<WorkflowState> {
|
|
962
|
+
constructor() {
|
|
963
|
+
super("resources.documents.WorkflowState", [
|
|
964
|
+
{ no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
965
|
+
{ no: 2, name: "next_reminder_time", kind: "message", T: () => Timestamp },
|
|
966
|
+
{ no: 3, name: "next_reminder_count", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
967
|
+
{ no: 4, name: "auto_close_time", kind: "message", T: () => Timestamp },
|
|
968
|
+
{ no: 5, name: "workflow", kind: "message", T: () => Workflow },
|
|
969
|
+
{ no: 6, name: "document", kind: "message", T: () => DocumentShort }
|
|
970
|
+
]);
|
|
971
|
+
}
|
|
972
|
+
create(value?: PartialMessage<WorkflowState>): WorkflowState {
|
|
973
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
974
|
+
message.documentId = "0";
|
|
975
|
+
if (value !== undefined)
|
|
976
|
+
reflectionMergePartial<WorkflowState>(this, message, value);
|
|
977
|
+
return message;
|
|
978
|
+
}
|
|
979
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WorkflowState): WorkflowState {
|
|
980
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
981
|
+
while (reader.pos < end) {
|
|
982
|
+
let [fieldNo, wireType] = reader.tag();
|
|
983
|
+
switch (fieldNo) {
|
|
984
|
+
case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
|
|
985
|
+
message.documentId = reader.uint64().toString();
|
|
986
|
+
break;
|
|
987
|
+
case /* optional resources.timestamp.Timestamp next_reminder_time */ 2:
|
|
988
|
+
message.nextReminderTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.nextReminderTime);
|
|
989
|
+
break;
|
|
990
|
+
case /* optional int32 next_reminder_count */ 3:
|
|
991
|
+
message.nextReminderCount = reader.int32();
|
|
992
|
+
break;
|
|
993
|
+
case /* optional resources.timestamp.Timestamp auto_close_time */ 4:
|
|
994
|
+
message.autoCloseTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.autoCloseTime);
|
|
995
|
+
break;
|
|
996
|
+
case /* optional resources.documents.Workflow workflow */ 5:
|
|
997
|
+
message.workflow = Workflow.internalBinaryRead(reader, reader.uint32(), options, message.workflow);
|
|
998
|
+
break;
|
|
999
|
+
case /* optional resources.documents.DocumentShort document */ 6:
|
|
1000
|
+
message.document = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.document);
|
|
1001
|
+
break;
|
|
1002
|
+
default:
|
|
1003
|
+
let u = options.readUnknownField;
|
|
1004
|
+
if (u === "throw")
|
|
1005
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1006
|
+
let d = reader.skip(wireType);
|
|
1007
|
+
if (u !== false)
|
|
1008
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
return message;
|
|
1012
|
+
}
|
|
1013
|
+
internalBinaryWrite(message: WorkflowState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1014
|
+
/* uint64 document_id = 1 [jstype = JS_STRING]; */
|
|
1015
|
+
if (message.documentId !== "0")
|
|
1016
|
+
writer.tag(1, WireType.Varint).uint64(message.documentId);
|
|
1017
|
+
/* optional resources.timestamp.Timestamp next_reminder_time = 2; */
|
|
1018
|
+
if (message.nextReminderTime)
|
|
1019
|
+
Timestamp.internalBinaryWrite(message.nextReminderTime, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1020
|
+
/* optional int32 next_reminder_count = 3; */
|
|
1021
|
+
if (message.nextReminderCount !== undefined)
|
|
1022
|
+
writer.tag(3, WireType.Varint).int32(message.nextReminderCount);
|
|
1023
|
+
/* optional resources.timestamp.Timestamp auto_close_time = 4; */
|
|
1024
|
+
if (message.autoCloseTime)
|
|
1025
|
+
Timestamp.internalBinaryWrite(message.autoCloseTime, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
1026
|
+
/* optional resources.documents.Workflow workflow = 5; */
|
|
1027
|
+
if (message.workflow)
|
|
1028
|
+
Workflow.internalBinaryWrite(message.workflow, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
1029
|
+
/* optional resources.documents.DocumentShort document = 6; */
|
|
1030
|
+
if (message.document)
|
|
1031
|
+
DocumentShort.internalBinaryWrite(message.document, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
1032
|
+
let u = options.writeUnknownFields;
|
|
1033
|
+
if (u !== false)
|
|
1034
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1035
|
+
return writer;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* @generated MessageType for protobuf message resources.documents.WorkflowState
|
|
1040
|
+
*/
|
|
1041
|
+
export const WorkflowState = new WorkflowState$Type();
|
|
1042
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1043
|
+
class WorkflowUserState$Type extends MessageType<WorkflowUserState> {
|
|
1044
|
+
constructor() {
|
|
1045
|
+
super("resources.documents.WorkflowUserState", [
|
|
1046
|
+
{ no: 1, name: "document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
1047
|
+
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
|
|
1048
|
+
{ 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.rules": { string: { maxLen: "255" } } } },
|
|
1050
|
+
{ no: 5, name: "workflow", kind: "message", T: () => Workflow },
|
|
1051
|
+
{ no: 6, name: "document", kind: "message", T: () => DocumentShort }
|
|
1052
|
+
]);
|
|
1053
|
+
}
|
|
1054
|
+
create(value?: PartialMessage<WorkflowUserState>): WorkflowUserState {
|
|
1055
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1056
|
+
message.documentId = "0";
|
|
1057
|
+
message.userId = 0;
|
|
1058
|
+
if (value !== undefined)
|
|
1059
|
+
reflectionMergePartial<WorkflowUserState>(this, message, value);
|
|
1060
|
+
return message;
|
|
1061
|
+
}
|
|
1062
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WorkflowUserState): WorkflowUserState {
|
|
1063
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1064
|
+
while (reader.pos < end) {
|
|
1065
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1066
|
+
switch (fieldNo) {
|
|
1067
|
+
case /* uint64 document_id = 1 [jstype = JS_STRING];*/ 1:
|
|
1068
|
+
message.documentId = reader.uint64().toString();
|
|
1069
|
+
break;
|
|
1070
|
+
case /* int32 user_id */ 2:
|
|
1071
|
+
message.userId = reader.int32();
|
|
1072
|
+
break;
|
|
1073
|
+
case /* optional resources.timestamp.Timestamp manual_reminder_time */ 3:
|
|
1074
|
+
message.manualReminderTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.manualReminderTime);
|
|
1075
|
+
break;
|
|
1076
|
+
case /* optional string manual_reminder_message */ 4:
|
|
1077
|
+
message.manualReminderMessage = reader.string();
|
|
1078
|
+
break;
|
|
1079
|
+
case /* optional resources.documents.Workflow workflow */ 5:
|
|
1080
|
+
message.workflow = Workflow.internalBinaryRead(reader, reader.uint32(), options, message.workflow);
|
|
1081
|
+
break;
|
|
1082
|
+
case /* optional resources.documents.DocumentShort document */ 6:
|
|
1083
|
+
message.document = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.document);
|
|
1084
|
+
break;
|
|
1085
|
+
default:
|
|
1086
|
+
let u = options.readUnknownField;
|
|
1087
|
+
if (u === "throw")
|
|
1088
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1089
|
+
let d = reader.skip(wireType);
|
|
1090
|
+
if (u !== false)
|
|
1091
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
return message;
|
|
1095
|
+
}
|
|
1096
|
+
internalBinaryWrite(message: WorkflowUserState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1097
|
+
/* uint64 document_id = 1 [jstype = JS_STRING]; */
|
|
1098
|
+
if (message.documentId !== "0")
|
|
1099
|
+
writer.tag(1, WireType.Varint).uint64(message.documentId);
|
|
1100
|
+
/* int32 user_id = 2; */
|
|
1101
|
+
if (message.userId !== 0)
|
|
1102
|
+
writer.tag(2, WireType.Varint).int32(message.userId);
|
|
1103
|
+
/* optional resources.timestamp.Timestamp manual_reminder_time = 3; */
|
|
1104
|
+
if (message.manualReminderTime)
|
|
1105
|
+
Timestamp.internalBinaryWrite(message.manualReminderTime, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1106
|
+
/* optional string manual_reminder_message = 4; */
|
|
1107
|
+
if (message.manualReminderMessage !== undefined)
|
|
1108
|
+
writer.tag(4, WireType.LengthDelimited).string(message.manualReminderMessage);
|
|
1109
|
+
/* optional resources.documents.Workflow workflow = 5; */
|
|
1110
|
+
if (message.workflow)
|
|
1111
|
+
Workflow.internalBinaryWrite(message.workflow, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
1112
|
+
/* optional resources.documents.DocumentShort document = 6; */
|
|
1113
|
+
if (message.document)
|
|
1114
|
+
DocumentShort.internalBinaryWrite(message.document, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
1115
|
+
let u = options.writeUnknownFields;
|
|
1116
|
+
if (u !== false)
|
|
1117
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1118
|
+
return writer;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* @generated MessageType for protobuf message resources.documents.WorkflowUserState
|
|
1123
|
+
*/
|
|
1124
|
+
export const WorkflowUserState = new WorkflowUserState$Type();
|