@fivenet-app/gen 2025.5.3 → 2026.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/buf/validate/validate.ts +11301 -0
- package/clients.ts +193 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +287 -0
- package/codegen/sanitizer/sanitizer.ts +113 -0
- package/google/protobuf/any.ts +4 -3
- package/google/protobuf/descriptor.ts +393 -239
- package/google/protobuf/duration.ts +4 -3
- package/google/protobuf/struct.ts +485 -0
- package/google/protobuf/timestamp.ts +4 -3
- package/package.json +3 -3
- package/perms.ts +217 -160
- package/resources/accounts/accounts.ts +115 -47
- package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +33 -32
- package/resources/audit/audit.ts +172 -53
- package/resources/calendar/{access.ts → access/access.ts} +72 -71
- package/resources/calendar/calendar.ts +79 -543
- package/resources/calendar/entries/entries.ts +474 -0
- package/resources/centrum/access/access.ts +345 -0
- package/resources/centrum/dispatchers/dispatchers.ts +149 -0
- package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +267 -164
- package/resources/centrum/joblist.ts +136 -0
- package/resources/centrum/settings/settings.ts +657 -0
- package/resources/centrum/{units_access.ts → units/access/access.ts} +78 -79
- package/resources/centrum/{units.ts → units/units.ts} +230 -130
- package/resources/clientconfig/clientconfig.ts +1015 -0
- package/resources/collab/collab.ts +805 -0
- package/resources/common/content/content.ts +169 -63
- package/resources/common/content/diff_activity.ts +267 -0
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- package/resources/common/i18n.ts +20 -24
- package/resources/common/id_mapping.ts +69 -0
- package/resources/common/tests/objects.ts +4 -3
- package/resources/{common/cron → cron}/cron.ts +77 -65
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/{access.ts → access/access.ts} +75 -76
- package/resources/documents/{activity.ts → activity/activity.ts} +349 -124
- package/resources/documents/approval/approval.ts +945 -0
- package/resources/documents/{category.ts → category/category.ts} +25 -32
- package/resources/documents/{comment.ts → comment/comment.ts} +35 -34
- package/resources/documents/data/data.ts +303 -0
- package/resources/documents/documents.ts +374 -686
- package/resources/{common/uuid.ts → documents/forms/forms.ts} +22 -21
- package/resources/documents/pins/pins.ts +127 -0
- package/resources/documents/references/references.ts +187 -0
- package/resources/documents/relations/relations.ts +184 -0
- package/resources/documents/{requests.ts → requests/requests.ts} +45 -44
- package/resources/documents/stamps/stamp.ts +355 -0
- package/resources/documents/{templates.ts → templates/templates.ts} +524 -199
- package/resources/documents/workflow/workflow.ts +600 -0
- package/resources/file/file.ts +152 -0
- package/{services/settings → resources/file}/filestore.ts +179 -165
- package/resources/file/meta.ts +148 -0
- package/resources/{common/grpcws → grpcws}/grpcws.ts +66 -65
- package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +83 -86
- package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +76 -80
- package/resources/jobs/{conduct.ts → conduct/conduct.ts} +86 -62
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/{labels.ts → labels/labels.ts} +36 -37
- package/resources/jobs/{job_props.ts → props/props.ts} +63 -65
- package/resources/jobs/{job_settings.ts → settings/settings.ts} +89 -96
- package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +42 -41
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → markers/marker_marker.ts} +68 -335
- package/resources/livemap/markers/user_marker.ts +377 -0
- package/resources/mailer/{access.ts → access/access.ts} +119 -118
- package/resources/mailer/{email.ts → emails/email.ts} +38 -41
- package/resources/mailer/{events.ts → events/events.ts} +44 -43
- package/resources/mailer/{message.ts → messages/message.ts} +69 -74
- package/resources/mailer/{settings.ts → settings/settings.ts} +23 -25
- package/resources/mailer/{template.ts → templates/template.ts} +37 -40
- package/resources/mailer/{thread.ts → threads/thread.ts} +93 -94
- package/resources/notifications/clientview/clientview.ts +239 -0
- package/resources/notifications/{events.ts → events/events.ts} +67 -130
- package/resources/notifications/notifications.ts +55 -60
- package/resources/permissions/{attributes.ts → attributes/attributes.ts} +94 -237
- package/resources/permissions/events/events.ts +149 -0
- package/resources/permissions/{permissions.ts → permissions/permissions.ts} +127 -47
- package/resources/qualifications/{access.ts → access/access.ts} +43 -42
- package/resources/qualifications/{exam.ts → exam/exam.ts} +419 -229
- package/resources/qualifications/qualifications.ts +327 -388
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +663 -79
- package/resources/settings/data.ts +90 -0
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +382 -2
- package/resources/sync/{activity.ts → activity/activity.ts} +126 -46
- package/resources/sync/data/data.ts +1001 -0
- package/resources/sync/data/v2/data.ts +220 -0
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/userinfo.ts +442 -0
- package/resources/users/{activity.ts → activity/activity.ts} +182 -166
- package/resources/users/{labels.ts → labels/labels.ts} +27 -30
- package/resources/users/{licenses.ts → licenses/licenses.ts} +18 -17
- package/resources/users/{props.ts → props/props.ts} +109 -77
- package/resources/users/short/user.ts +184 -0
- package/resources/users/user.ts +528 -0
- package/resources/vehicles/activity/activity.ts +231 -0
- package/resources/vehicles/props/props.ts +125 -0
- package/resources/vehicles/vehicles.ts +43 -18
- package/resources/wiki/{access.ts → access/access.ts} +72 -71
- package/resources/wiki/{activity.ts → activity/activity.ts} +218 -102
- package/resources/wiki/page.ts +164 -93
- package/services/auth/auth.client.ts +45 -35
- package/services/auth/auth.ts +498 -288
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +157 -134
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +755 -352
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +226 -112
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +95 -54
- package/services/documents/approval.client.ts +188 -0
- package/services/documents/approval.ts +1776 -0
- package/services/documents/collab.client.ts +46 -0
- package/services/documents/collab.ts +13 -0
- package/services/documents/documents.client.ts +88 -217
- package/services/documents/documents.ts +579 -619
- package/services/documents/forms.client.ts +51 -0
- package/services/documents/forms.ts +232 -0
- package/services/documents/stamps.client.ts +77 -0
- package/services/documents/stamps.ts +481 -0
- package/services/documents/stats.client.ts +38 -0
- package/services/documents/stats.ts +245 -0
- package/services/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +40 -28
- package/services/jobs/conduct.ts +183 -56
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +138 -121
- package/services/jobs/stats.client.ts +38 -0
- package/services/jobs/stats.ts +207 -0
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +76 -75
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +297 -126
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +266 -269
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +126 -83
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +250 -209
- package/services/settings/accounts.client.ts +31 -33
- package/services/settings/accounts.ts +251 -67
- package/services/settings/config.client.ts +6 -13
- package/services/settings/config.ts +8 -7
- package/services/settings/cron.client.ts +4 -7
- package/services/settings/cron.ts +7 -6
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +30 -29
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +237 -633
- package/services/settings/system.client.ts +103 -0
- package/services/settings/system.ts +718 -0
- package/services/stats/stats.client.ts +9 -8
- package/services/stats/stats.ts +27 -26
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +174 -97
- package/services/sync/v2/sync.client.ts +331 -0
- package/services/sync/v2/sync.ts +1766 -0
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +170 -25
- package/services/wiki/collab.client.ts +46 -0
- package/services/wiki/collab.ts +13 -0
- package/services/wiki/wiki.client.ts +28 -37
- package/services/wiki/wiki.ts +97 -67
- package/svcs.ts +174 -106
- package/resources/centrum/attributes.ts +0 -186
- package/resources/centrum/disponents.ts +0 -81
- package/resources/centrum/settings.ts +0 -307
- package/resources/documents/workflow.ts +0 -351
- package/resources/filestore/file.ts +0 -204
- package/resources/internet/access.ts +0 -358
- package/resources/internet/ads.ts +0 -257
- package/resources/internet/domain.ts +0 -328
- package/resources/internet/page.ts +0 -428
- package/resources/internet/search.ts +0 -128
- package/resources/livemap/tracker.ts +0 -81
- package/resources/sync/data.ts +0 -587
- package/resources/users/users.ts +0 -435
- package/services/internet/ads.client.ts +0 -41
- package/services/internet/ads.ts +0 -145
- package/services/internet/domain.client.ts +0 -109
- package/services/internet/domain.ts +0 -658
- package/services/internet/internet.client.ts +0 -58
- package/services/internet/internet.ts +0 -268
- package/services/notificator/notificator.client.ts +0 -76
- package/services/settings/filestore.client.ts +0 -75
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
2
|
// @generated from protobuf file "resources/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";
|
|
@@ -10,401 +11,308 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
10
11
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
11
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
14
|
+
import { File } from "../file/file";
|
|
15
|
+
import { WorkflowUserState } from "./workflow/workflow";
|
|
16
|
+
import { WorkflowState } from "./workflow/workflow";
|
|
17
|
+
import { DocumentPin } from "./pins/pins";
|
|
18
|
+
import { UserShort } from "../users/short/user";
|
|
19
|
+
import { DocumentData } from "./data/data";
|
|
15
20
|
import { Content } from "../common/content/content";
|
|
16
21
|
import { ContentType } from "../common/content/content";
|
|
17
|
-
import { Category } from "./category";
|
|
22
|
+
import { Category } from "./category/category";
|
|
18
23
|
import { Timestamp } from "../timestamp/timestamp";
|
|
19
24
|
/**
|
|
20
25
|
* @generated from protobuf message resources.documents.Document
|
|
21
26
|
*/
|
|
22
27
|
export interface Document {
|
|
23
28
|
/**
|
|
24
|
-
* @generated from protobuf field:
|
|
29
|
+
* @generated from protobuf field: int64 id = 1
|
|
25
30
|
*/
|
|
26
31
|
id: number;
|
|
27
32
|
/**
|
|
28
|
-
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
33
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
29
34
|
*/
|
|
30
35
|
createdAt?: Timestamp;
|
|
31
36
|
/**
|
|
32
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
37
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
33
38
|
*/
|
|
34
39
|
updatedAt?: Timestamp;
|
|
35
40
|
/**
|
|
36
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
41
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
37
42
|
*/
|
|
38
43
|
deletedAt?: Timestamp;
|
|
39
44
|
/**
|
|
40
|
-
* @generated from protobuf field: optional
|
|
45
|
+
* @generated from protobuf field: optional int64 category_id = 5
|
|
41
46
|
*/
|
|
42
47
|
categoryId?: number;
|
|
43
48
|
/**
|
|
44
|
-
* @generated from protobuf field: optional resources.documents.Category category = 6
|
|
49
|
+
* @generated from protobuf field: optional resources.documents.category.Category category = 6
|
|
45
50
|
*/
|
|
46
|
-
category?: Category;
|
|
51
|
+
category?: Category;
|
|
47
52
|
/**
|
|
48
|
-
* @
|
|
49
|
-
*
|
|
50
|
-
* @generated from protobuf field: string title = 7;
|
|
53
|
+
* @generated from protobuf field: string title = 7
|
|
51
54
|
*/
|
|
52
55
|
title: string;
|
|
53
56
|
/**
|
|
54
|
-
*
|
|
57
|
+
* Derived field (server authored)
|
|
58
|
+
*
|
|
59
|
+
* @generated from protobuf field: optional uint32 word_count = 21
|
|
55
60
|
*/
|
|
56
|
-
|
|
61
|
+
wordCount?: number;
|
|
57
62
|
/**
|
|
58
|
-
*
|
|
63
|
+
* Derived field (server authored)
|
|
64
|
+
*
|
|
65
|
+
* @generated from protobuf field: optional string first_heading = 22
|
|
59
66
|
*/
|
|
60
|
-
|
|
67
|
+
firstHeading?: string;
|
|
61
68
|
/**
|
|
62
|
-
* @
|
|
63
|
-
*
|
|
64
|
-
* @generated from protobuf field: optional string data = 10;
|
|
69
|
+
* @generated from protobuf field: resources.common.content.ContentType content_type = 8
|
|
65
70
|
*/
|
|
66
|
-
|
|
71
|
+
contentType: ContentType;
|
|
67
72
|
/**
|
|
68
|
-
* @generated from protobuf field:
|
|
73
|
+
* @generated from protobuf field: resources.common.content.Content content = 9
|
|
69
74
|
*/
|
|
70
|
-
|
|
75
|
+
content?: Content;
|
|
71
76
|
/**
|
|
72
|
-
* @generated from protobuf field: optional resources.
|
|
77
|
+
* @generated from protobuf field: optional resources.documents.data.DocumentData data = 10
|
|
73
78
|
*/
|
|
74
|
-
|
|
79
|
+
data?: DocumentData;
|
|
75
80
|
/**
|
|
76
|
-
* @generated from protobuf field:
|
|
81
|
+
* @generated from protobuf field: optional int32 creator_id = 11
|
|
77
82
|
*/
|
|
78
|
-
|
|
83
|
+
creatorId?: number;
|
|
79
84
|
/**
|
|
80
|
-
* @generated from protobuf field: optional
|
|
85
|
+
* @generated from protobuf field: optional resources.users.short.UserShort creator = 12
|
|
81
86
|
*/
|
|
82
|
-
|
|
87
|
+
creator?: UserShort;
|
|
83
88
|
/**
|
|
84
|
-
* @
|
|
85
|
-
*
|
|
86
|
-
* @generated from protobuf field: string state = 15;
|
|
89
|
+
* @generated from protobuf field: string creator_job = 13
|
|
87
90
|
*/
|
|
88
|
-
|
|
91
|
+
creatorJob: string;
|
|
89
92
|
/**
|
|
90
|
-
* @generated from protobuf field:
|
|
93
|
+
* @generated from protobuf field: optional string creator_job_label = 14
|
|
91
94
|
*/
|
|
92
|
-
|
|
95
|
+
creatorJobLabel?: string;
|
|
93
96
|
/**
|
|
94
|
-
* @generated from protobuf field:
|
|
97
|
+
* @generated from protobuf field: resources.documents.DocumentMeta meta = 15
|
|
95
98
|
*/
|
|
96
|
-
|
|
99
|
+
meta?: DocumentMeta;
|
|
97
100
|
/**
|
|
98
|
-
* @generated from protobuf field: optional
|
|
101
|
+
* @generated from protobuf field: optional int64 template_id = 16
|
|
99
102
|
*/
|
|
100
103
|
templateId?: number;
|
|
101
104
|
/**
|
|
102
|
-
* @generated from protobuf field:
|
|
105
|
+
* @generated from protobuf field: optional resources.documents.pins.DocumentPin pin = 17
|
|
103
106
|
*/
|
|
104
|
-
|
|
107
|
+
pin?: DocumentPin;
|
|
105
108
|
/**
|
|
106
|
-
* @generated from protobuf field: optional resources.documents.WorkflowState workflow_state =
|
|
109
|
+
* @generated from protobuf field: optional resources.documents.workflow.WorkflowState workflow_state = 18
|
|
107
110
|
*/
|
|
108
111
|
workflowState?: WorkflowState;
|
|
109
112
|
/**
|
|
110
|
-
* @generated from protobuf field: optional resources.documents.WorkflowUserState workflow_user =
|
|
113
|
+
* @generated from protobuf field: optional resources.documents.workflow.WorkflowUserState workflow_user = 19
|
|
111
114
|
*/
|
|
112
115
|
workflowUser?: WorkflowUserState;
|
|
116
|
+
/**
|
|
117
|
+
* @generated from protobuf field: repeated resources.file.File files = 20
|
|
118
|
+
*/
|
|
119
|
+
files: File[];
|
|
113
120
|
}
|
|
114
121
|
/**
|
|
115
122
|
* @generated from protobuf message resources.documents.DocumentShort
|
|
116
123
|
*/
|
|
117
124
|
export interface DocumentShort {
|
|
118
125
|
/**
|
|
119
|
-
* @generated from protobuf field:
|
|
126
|
+
* @generated from protobuf field: int64 id = 1
|
|
120
127
|
*/
|
|
121
128
|
id: number;
|
|
122
129
|
/**
|
|
123
|
-
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
130
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 2
|
|
124
131
|
*/
|
|
125
132
|
createdAt?: Timestamp;
|
|
126
133
|
/**
|
|
127
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
134
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
|
|
128
135
|
*/
|
|
129
136
|
updatedAt?: Timestamp;
|
|
130
137
|
/**
|
|
131
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
138
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
|
|
132
139
|
*/
|
|
133
140
|
deletedAt?: Timestamp;
|
|
134
141
|
/**
|
|
135
|
-
* @generated from protobuf field: optional
|
|
142
|
+
* @generated from protobuf field: optional int64 category_id = 5
|
|
136
143
|
*/
|
|
137
144
|
categoryId?: number;
|
|
138
145
|
/**
|
|
139
|
-
* @generated from protobuf field: optional resources.documents.Category category = 6
|
|
146
|
+
* @generated from protobuf field: optional resources.documents.category.Category category = 6
|
|
140
147
|
*/
|
|
141
|
-
category?: Category;
|
|
148
|
+
category?: Category;
|
|
142
149
|
/**
|
|
143
|
-
* @
|
|
144
|
-
*
|
|
145
|
-
* @generated from protobuf field: string title = 7;
|
|
150
|
+
* @generated from protobuf field: string title = 7
|
|
146
151
|
*/
|
|
147
152
|
title: string;
|
|
148
153
|
/**
|
|
149
|
-
*
|
|
150
|
-
*/
|
|
151
|
-
contentType: ContentType; // @gotags: alias:"content_type"
|
|
152
|
-
/**
|
|
153
|
-
* @sanitize
|
|
154
|
+
* Derived field (server authored)
|
|
154
155
|
*
|
|
155
|
-
* @generated from protobuf field:
|
|
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;
|
|
156
|
+
* @generated from protobuf field: optional uint32 word_count = 21
|
|
164
157
|
*/
|
|
165
|
-
|
|
158
|
+
wordCount?: number;
|
|
166
159
|
/**
|
|
167
|
-
*
|
|
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
|
|
160
|
+
* Derived field (server authored)
|
|
176
161
|
*
|
|
177
|
-
* @generated from protobuf field: string
|
|
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;
|
|
162
|
+
* @generated from protobuf field: optional string first_heading = 22
|
|
203
163
|
*/
|
|
204
|
-
|
|
164
|
+
firstHeading?: string;
|
|
205
165
|
/**
|
|
206
|
-
* @generated from protobuf field:
|
|
166
|
+
* @generated from protobuf field: resources.common.content.ContentType content_type = 8
|
|
207
167
|
*/
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* @generated from protobuf field: uint64 source_document_id = 3;
|
|
211
|
-
*/
|
|
212
|
-
sourceDocumentId: number; // @gotags: alias:"source_document_id"
|
|
168
|
+
contentType: ContentType;
|
|
213
169
|
/**
|
|
214
|
-
* @generated from protobuf field:
|
|
170
|
+
* @generated from protobuf field: resources.common.content.Content content = 9
|
|
215
171
|
*/
|
|
216
|
-
|
|
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;
|
|
223
|
-
*/
|
|
224
|
-
targetDocumentId: number; // @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"
|
|
172
|
+
content?: Content;
|
|
229
173
|
/**
|
|
230
|
-
* @generated from protobuf field: optional int32 creator_id =
|
|
174
|
+
* @generated from protobuf field: optional int32 creator_id = 11
|
|
231
175
|
*/
|
|
232
176
|
creatorId?: number;
|
|
233
177
|
/**
|
|
234
|
-
* @generated from protobuf field: optional resources.users.UserShort creator =
|
|
178
|
+
* @generated from protobuf field: optional resources.users.short.UserShort creator = 12
|
|
235
179
|
*/
|
|
236
|
-
creator?: UserShort;
|
|
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;
|
|
244
|
-
*/
|
|
245
|
-
id?: number;
|
|
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;
|
|
252
|
-
*/
|
|
253
|
-
documentId: number;
|
|
180
|
+
creator?: UserShort;
|
|
254
181
|
/**
|
|
255
|
-
* @generated from protobuf field:
|
|
182
|
+
* @generated from protobuf field: string creator_job = 13
|
|
256
183
|
*/
|
|
257
|
-
|
|
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;
|
|
285
|
-
*/
|
|
286
|
-
documentId: number;
|
|
184
|
+
creatorJob: string;
|
|
287
185
|
/**
|
|
288
|
-
* @generated from protobuf field: optional
|
|
186
|
+
* @generated from protobuf field: optional string creator_job_label = 14
|
|
289
187
|
*/
|
|
290
|
-
|
|
188
|
+
creatorJobLabel?: string;
|
|
291
189
|
/**
|
|
292
|
-
* @generated from protobuf field:
|
|
190
|
+
* @generated from protobuf field: resources.documents.DocumentMeta meta = 15
|
|
293
191
|
*/
|
|
294
|
-
|
|
192
|
+
meta?: DocumentMeta;
|
|
295
193
|
/**
|
|
296
|
-
* @generated from protobuf field: optional resources.
|
|
194
|
+
* @generated from protobuf field: optional resources.documents.pins.DocumentPin pin = 17
|
|
297
195
|
*/
|
|
298
|
-
|
|
196
|
+
pin?: DocumentPin;
|
|
299
197
|
/**
|
|
300
|
-
* @generated from protobuf field: optional resources.documents.
|
|
198
|
+
* @generated from protobuf field: optional resources.documents.workflow.WorkflowState workflow_state = 18
|
|
301
199
|
*/
|
|
302
|
-
|
|
200
|
+
workflowState?: WorkflowState;
|
|
303
201
|
/**
|
|
304
|
-
* @generated from protobuf field: optional resources.documents.
|
|
202
|
+
* @generated from protobuf field: optional resources.documents.workflow.WorkflowUserState workflow_user = 19
|
|
305
203
|
*/
|
|
306
|
-
|
|
204
|
+
workflowUser?: WorkflowUserState;
|
|
307
205
|
}
|
|
308
206
|
/**
|
|
309
|
-
* @generated from protobuf message resources.documents.
|
|
207
|
+
* @generated from protobuf message resources.documents.DocumentMeta
|
|
310
208
|
*/
|
|
311
|
-
export interface
|
|
209
|
+
export interface DocumentMeta {
|
|
312
210
|
/**
|
|
313
|
-
* @generated from protobuf field:
|
|
211
|
+
* @generated from protobuf field: int64 document_id = 1
|
|
314
212
|
*/
|
|
315
213
|
documentId: number;
|
|
316
214
|
/**
|
|
317
|
-
* @generated from protobuf field:
|
|
215
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp recomputed_at = 2
|
|
318
216
|
*/
|
|
319
|
-
|
|
217
|
+
recomputedAt?: Timestamp;
|
|
320
218
|
/**
|
|
321
|
-
* @generated from protobuf field:
|
|
219
|
+
* @generated from protobuf field: bool closed = 3
|
|
322
220
|
*/
|
|
323
|
-
|
|
221
|
+
closed: boolean;
|
|
324
222
|
/**
|
|
325
|
-
* @generated from protobuf field:
|
|
223
|
+
* @generated from protobuf field: bool draft = 4
|
|
326
224
|
*/
|
|
327
|
-
|
|
225
|
+
draft: boolean;
|
|
328
226
|
/**
|
|
329
|
-
* @generated from protobuf field:
|
|
227
|
+
* @generated from protobuf field: bool public = 5
|
|
330
228
|
*/
|
|
331
|
-
|
|
229
|
+
public: boolean;
|
|
332
230
|
/**
|
|
333
|
-
* @generated from protobuf field:
|
|
231
|
+
* @generated from protobuf field: string state = 6
|
|
334
232
|
*/
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* @generated from protobuf enum resources.documents.DocReference
|
|
339
|
-
*/
|
|
340
|
-
export enum DocReference {
|
|
233
|
+
state: string;
|
|
341
234
|
/**
|
|
342
|
-
*
|
|
235
|
+
* Overall aggregates - At least one approval policy fully satisfied
|
|
236
|
+
*
|
|
237
|
+
* @generated from protobuf field: optional bool approved = 7
|
|
343
238
|
*/
|
|
344
|
-
|
|
239
|
+
approved?: boolean;
|
|
345
240
|
/**
|
|
346
|
-
*
|
|
241
|
+
* Approval rollups
|
|
242
|
+
* Total approvals needed across policies
|
|
243
|
+
*
|
|
244
|
+
* @generated from protobuf field: optional int32 ap_required_total = 16
|
|
347
245
|
*/
|
|
348
|
-
|
|
246
|
+
apRequiredTotal?: number;
|
|
349
247
|
/**
|
|
350
|
-
*
|
|
248
|
+
* Approvals collected
|
|
249
|
+
*
|
|
250
|
+
* @generated from protobuf field: optional int32 ap_collected_approved = 17
|
|
351
251
|
*/
|
|
352
|
-
|
|
252
|
+
apCollectedApproved?: number;
|
|
353
253
|
/**
|
|
354
|
-
*
|
|
254
|
+
* How many left to satisfy
|
|
255
|
+
*
|
|
256
|
+
* @generated from protobuf field: optional int32 ap_required_remaining = 18
|
|
355
257
|
*/
|
|
356
|
-
|
|
258
|
+
apRequiredRemaining?: number;
|
|
357
259
|
/**
|
|
358
|
-
*
|
|
260
|
+
* Number of declines
|
|
261
|
+
*
|
|
262
|
+
* @generated from protobuf field: optional int32 ap_declined_count = 19
|
|
359
263
|
*/
|
|
360
|
-
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* @generated from protobuf enum resources.documents.DocRelation
|
|
364
|
-
*/
|
|
365
|
-
export enum DocRelation {
|
|
264
|
+
apDeclinedCount?: number;
|
|
366
265
|
/**
|
|
367
|
-
*
|
|
266
|
+
* Tasks still pending (optional)
|
|
267
|
+
*
|
|
268
|
+
* @generated from protobuf field: optional int32 ap_pending_count = 20
|
|
368
269
|
*/
|
|
369
|
-
|
|
270
|
+
apPendingCount?: number;
|
|
370
271
|
/**
|
|
371
|
-
*
|
|
272
|
+
* Quick flag if any declines
|
|
273
|
+
*
|
|
274
|
+
* @generated from protobuf field: optional bool ap_any_declined = 21
|
|
372
275
|
*/
|
|
373
|
-
|
|
276
|
+
apAnyDeclined?: boolean;
|
|
374
277
|
/**
|
|
375
|
-
*
|
|
278
|
+
* Number of active approval policies
|
|
279
|
+
*
|
|
280
|
+
* @generated from protobuf field: optional int32 ap_policies_active = 22
|
|
376
281
|
*/
|
|
377
|
-
|
|
282
|
+
apPoliciesActive?: number;
|
|
378
283
|
/**
|
|
379
|
-
*
|
|
284
|
+
* Number of comments on the document
|
|
285
|
+
*
|
|
286
|
+
* @generated from protobuf field: optional int32 comment_count = 23
|
|
380
287
|
*/
|
|
381
|
-
|
|
288
|
+
commentCount?: number;
|
|
382
289
|
}
|
|
383
290
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
384
291
|
class Document$Type extends MessageType<Document> {
|
|
385
292
|
constructor() {
|
|
386
293
|
super("resources.documents.Document", [
|
|
387
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
294
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
388
295
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
389
296
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
390
297
|
{ 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:
|
|
395
|
-
{ no:
|
|
396
|
-
{ no:
|
|
397
|
-
{ no:
|
|
398
|
-
{ no:
|
|
399
|
-
{ no:
|
|
400
|
-
{ no:
|
|
401
|
-
{ no:
|
|
402
|
-
{ no:
|
|
403
|
-
{ no:
|
|
404
|
-
{ no:
|
|
405
|
-
{ no:
|
|
406
|
-
{ no:
|
|
407
|
-
{ no:
|
|
298
|
+
{ no: 5, name: "category_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
299
|
+
{ no: 6, name: "category", kind: "message", T: () => Category, options: { "tagger.tags": "alias:\"category\"" } },
|
|
300
|
+
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
301
|
+
{ no: 21, name: "word_count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
|
|
302
|
+
{ no: 22, name: "first_heading", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
303
|
+
{ no: 8, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
304
|
+
{ no: 9, name: "content", kind: "message", T: () => Content, options: { "tagger.tags": "alias:\"content_json\"" } },
|
|
305
|
+
{ no: 10, name: "data", kind: "message", T: () => DocumentData, options: { "tagger.tags": "alias:\"data\"" } },
|
|
306
|
+
{ no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
307
|
+
{ no: 12, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
|
|
308
|
+
{ no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
309
|
+
{ no: 14, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
310
|
+
{ no: 15, name: "meta", kind: "message", T: () => DocumentMeta, options: { "tagger.tags": "alias:\"meta\"" } },
|
|
311
|
+
{ no: 16, name: "template_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
312
|
+
{ no: 17, name: "pin", kind: "message", T: () => DocumentPin, options: { "tagger.tags": "alias:\"pin\"" } },
|
|
313
|
+
{ no: 18, name: "workflow_state", kind: "message", T: () => WorkflowState },
|
|
314
|
+
{ no: 19, name: "workflow_user", kind: "message", T: () => WorkflowUserState },
|
|
315
|
+
{ no: 20, name: "files", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => File, options: { "tagger.tags": "alias:\"files\"" } }
|
|
408
316
|
]);
|
|
409
317
|
}
|
|
410
318
|
create(value?: PartialMessage<Document>): Document {
|
|
@@ -413,10 +321,7 @@ class Document$Type extends MessageType<Document> {
|
|
|
413
321
|
message.title = "";
|
|
414
322
|
message.contentType = 0;
|
|
415
323
|
message.creatorJob = "";
|
|
416
|
-
message.
|
|
417
|
-
message.closed = false;
|
|
418
|
-
message.public = false;
|
|
419
|
-
message.pinned = false;
|
|
324
|
+
message.files = [];
|
|
420
325
|
if (value !== undefined)
|
|
421
326
|
reflectionMergePartial<Document>(this, message, value);
|
|
422
327
|
return message;
|
|
@@ -426,8 +331,8 @@ class Document$Type extends MessageType<Document> {
|
|
|
426
331
|
while (reader.pos < end) {
|
|
427
332
|
let [fieldNo, wireType] = reader.tag();
|
|
428
333
|
switch (fieldNo) {
|
|
429
|
-
case /*
|
|
430
|
-
message.id = reader.
|
|
334
|
+
case /* int64 id */ 1:
|
|
335
|
+
message.id = reader.int64().toNumber();
|
|
431
336
|
break;
|
|
432
337
|
case /* resources.timestamp.Timestamp created_at */ 2:
|
|
433
338
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -438,28 +343,34 @@ class Document$Type extends MessageType<Document> {
|
|
|
438
343
|
case /* optional resources.timestamp.Timestamp deleted_at */ 4:
|
|
439
344
|
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
440
345
|
break;
|
|
441
|
-
case /* optional
|
|
442
|
-
message.categoryId = reader.
|
|
346
|
+
case /* optional int64 category_id */ 5:
|
|
347
|
+
message.categoryId = reader.int64().toNumber();
|
|
443
348
|
break;
|
|
444
|
-
case /* optional resources.documents.Category category */ 6:
|
|
349
|
+
case /* optional resources.documents.category.Category category */ 6:
|
|
445
350
|
message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
|
|
446
351
|
break;
|
|
447
352
|
case /* string title */ 7:
|
|
448
353
|
message.title = reader.string();
|
|
449
354
|
break;
|
|
355
|
+
case /* optional uint32 word_count */ 21:
|
|
356
|
+
message.wordCount = reader.uint32();
|
|
357
|
+
break;
|
|
358
|
+
case /* optional string first_heading */ 22:
|
|
359
|
+
message.firstHeading = reader.string();
|
|
360
|
+
break;
|
|
450
361
|
case /* resources.common.content.ContentType content_type */ 8:
|
|
451
362
|
message.contentType = reader.int32();
|
|
452
363
|
break;
|
|
453
364
|
case /* resources.common.content.Content content */ 9:
|
|
454
365
|
message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
|
|
455
366
|
break;
|
|
456
|
-
case /* optional
|
|
457
|
-
message.data = reader.
|
|
367
|
+
case /* optional resources.documents.data.DocumentData data */ 10:
|
|
368
|
+
message.data = DocumentData.internalBinaryRead(reader, reader.uint32(), options, message.data);
|
|
458
369
|
break;
|
|
459
370
|
case /* optional int32 creator_id */ 11:
|
|
460
371
|
message.creatorId = reader.int32();
|
|
461
372
|
break;
|
|
462
|
-
case /* optional resources.users.UserShort creator */ 12:
|
|
373
|
+
case /* optional resources.users.short.UserShort creator */ 12:
|
|
463
374
|
message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
464
375
|
break;
|
|
465
376
|
case /* string creator_job */ 13:
|
|
@@ -468,27 +379,24 @@ class Document$Type extends MessageType<Document> {
|
|
|
468
379
|
case /* optional string creator_job_label */ 14:
|
|
469
380
|
message.creatorJobLabel = reader.string();
|
|
470
381
|
break;
|
|
471
|
-
case /*
|
|
472
|
-
message.
|
|
473
|
-
break;
|
|
474
|
-
case /* bool closed */ 16:
|
|
475
|
-
message.closed = reader.bool();
|
|
476
|
-
break;
|
|
477
|
-
case /* bool public */ 17:
|
|
478
|
-
message.public = reader.bool();
|
|
382
|
+
case /* resources.documents.DocumentMeta meta */ 15:
|
|
383
|
+
message.meta = DocumentMeta.internalBinaryRead(reader, reader.uint32(), options, message.meta);
|
|
479
384
|
break;
|
|
480
|
-
case /* optional
|
|
481
|
-
message.templateId = reader.
|
|
385
|
+
case /* optional int64 template_id */ 16:
|
|
386
|
+
message.templateId = reader.int64().toNumber();
|
|
482
387
|
break;
|
|
483
|
-
case /*
|
|
484
|
-
message.
|
|
388
|
+
case /* optional resources.documents.pins.DocumentPin pin */ 17:
|
|
389
|
+
message.pin = DocumentPin.internalBinaryRead(reader, reader.uint32(), options, message.pin);
|
|
485
390
|
break;
|
|
486
|
-
case /* optional resources.documents.WorkflowState workflow_state */
|
|
391
|
+
case /* optional resources.documents.workflow.WorkflowState workflow_state */ 18:
|
|
487
392
|
message.workflowState = WorkflowState.internalBinaryRead(reader, reader.uint32(), options, message.workflowState);
|
|
488
393
|
break;
|
|
489
|
-
case /* optional resources.documents.WorkflowUserState workflow_user */
|
|
394
|
+
case /* optional resources.documents.workflow.WorkflowUserState workflow_user */ 19:
|
|
490
395
|
message.workflowUser = WorkflowUserState.internalBinaryRead(reader, reader.uint32(), options, message.workflowUser);
|
|
491
396
|
break;
|
|
397
|
+
case /* repeated resources.file.File files */ 20:
|
|
398
|
+
message.files.push(File.internalBinaryRead(reader, reader.uint32(), options));
|
|
399
|
+
break;
|
|
492
400
|
default:
|
|
493
401
|
let u = options.readUnknownField;
|
|
494
402
|
if (u === "throw")
|
|
@@ -501,9 +409,9 @@ class Document$Type extends MessageType<Document> {
|
|
|
501
409
|
return message;
|
|
502
410
|
}
|
|
503
411
|
internalBinaryWrite(message: Document, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
504
|
-
/*
|
|
412
|
+
/* int64 id = 1; */
|
|
505
413
|
if (message.id !== 0)
|
|
506
|
-
writer.tag(1, WireType.Varint).
|
|
414
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
507
415
|
/* resources.timestamp.Timestamp created_at = 2; */
|
|
508
416
|
if (message.createdAt)
|
|
509
417
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -513,10 +421,10 @@ class Document$Type extends MessageType<Document> {
|
|
|
513
421
|
/* optional resources.timestamp.Timestamp deleted_at = 4; */
|
|
514
422
|
if (message.deletedAt)
|
|
515
423
|
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
516
|
-
/* optional
|
|
424
|
+
/* optional int64 category_id = 5; */
|
|
517
425
|
if (message.categoryId !== undefined)
|
|
518
|
-
writer.tag(5, WireType.Varint).
|
|
519
|
-
/* optional resources.documents.Category category = 6; */
|
|
426
|
+
writer.tag(5, WireType.Varint).int64(message.categoryId);
|
|
427
|
+
/* optional resources.documents.category.Category category = 6; */
|
|
520
428
|
if (message.category)
|
|
521
429
|
Category.internalBinaryWrite(message.category, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
522
430
|
/* string title = 7; */
|
|
@@ -528,13 +436,13 @@ class Document$Type extends MessageType<Document> {
|
|
|
528
436
|
/* resources.common.content.Content content = 9; */
|
|
529
437
|
if (message.content)
|
|
530
438
|
Content.internalBinaryWrite(message.content, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
531
|
-
/* optional
|
|
532
|
-
if (message.data
|
|
533
|
-
writer.tag(10, WireType.LengthDelimited).
|
|
439
|
+
/* optional resources.documents.data.DocumentData data = 10; */
|
|
440
|
+
if (message.data)
|
|
441
|
+
DocumentData.internalBinaryWrite(message.data, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
534
442
|
/* optional int32 creator_id = 11; */
|
|
535
443
|
if (message.creatorId !== undefined)
|
|
536
444
|
writer.tag(11, WireType.Varint).int32(message.creatorId);
|
|
537
|
-
/* optional resources.users.UserShort creator = 12; */
|
|
445
|
+
/* optional resources.users.short.UserShort creator = 12; */
|
|
538
446
|
if (message.creator)
|
|
539
447
|
UserShort.internalBinaryWrite(message.creator, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
540
448
|
/* string creator_job = 13; */
|
|
@@ -543,27 +451,30 @@ class Document$Type extends MessageType<Document> {
|
|
|
543
451
|
/* optional string creator_job_label = 14; */
|
|
544
452
|
if (message.creatorJobLabel !== undefined)
|
|
545
453
|
writer.tag(14, WireType.LengthDelimited).string(message.creatorJobLabel);
|
|
546
|
-
/*
|
|
547
|
-
if (message.
|
|
548
|
-
writer.tag(15, WireType.LengthDelimited).
|
|
549
|
-
/*
|
|
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; */
|
|
454
|
+
/* resources.documents.DocumentMeta meta = 15; */
|
|
455
|
+
if (message.meta)
|
|
456
|
+
DocumentMeta.internalBinaryWrite(message.meta, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
457
|
+
/* optional int64 template_id = 16; */
|
|
556
458
|
if (message.templateId !== undefined)
|
|
557
|
-
writer.tag(
|
|
558
|
-
/*
|
|
559
|
-
if (message.
|
|
560
|
-
writer.tag(
|
|
561
|
-
/* optional resources.documents.WorkflowState workflow_state =
|
|
459
|
+
writer.tag(16, WireType.Varint).int64(message.templateId);
|
|
460
|
+
/* optional resources.documents.pins.DocumentPin pin = 17; */
|
|
461
|
+
if (message.pin)
|
|
462
|
+
DocumentPin.internalBinaryWrite(message.pin, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
|
|
463
|
+
/* optional resources.documents.workflow.WorkflowState workflow_state = 18; */
|
|
562
464
|
if (message.workflowState)
|
|
563
|
-
WorkflowState.internalBinaryWrite(message.workflowState, writer.tag(
|
|
564
|
-
/* optional resources.documents.WorkflowUserState workflow_user =
|
|
465
|
+
WorkflowState.internalBinaryWrite(message.workflowState, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
|
|
466
|
+
/* optional resources.documents.workflow.WorkflowUserState workflow_user = 19; */
|
|
565
467
|
if (message.workflowUser)
|
|
566
|
-
WorkflowUserState.internalBinaryWrite(message.workflowUser, writer.tag(
|
|
468
|
+
WorkflowUserState.internalBinaryWrite(message.workflowUser, writer.tag(19, WireType.LengthDelimited).fork(), options).join();
|
|
469
|
+
/* repeated resources.file.File files = 20; */
|
|
470
|
+
for (let i = 0; i < message.files.length; i++)
|
|
471
|
+
File.internalBinaryWrite(message.files[i], writer.tag(20, WireType.LengthDelimited).fork(), options).join();
|
|
472
|
+
/* optional uint32 word_count = 21; */
|
|
473
|
+
if (message.wordCount !== undefined)
|
|
474
|
+
writer.tag(21, WireType.Varint).uint32(message.wordCount);
|
|
475
|
+
/* optional string first_heading = 22; */
|
|
476
|
+
if (message.firstHeading !== undefined)
|
|
477
|
+
writer.tag(22, WireType.LengthDelimited).string(message.firstHeading);
|
|
567
478
|
let u = options.writeUnknownFields;
|
|
568
479
|
if (u !== false)
|
|
569
480
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -578,24 +489,25 @@ export const Document = new Document$Type();
|
|
|
578
489
|
class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
579
490
|
constructor() {
|
|
580
491
|
super("resources.documents.DocumentShort", [
|
|
581
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
492
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
582
493
|
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
583
494
|
{ no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
584
495
|
{ 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:
|
|
496
|
+
{ no: 5, name: "category_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
497
|
+
{ no: 6, name: "category", kind: "message", T: () => Category, options: { "tagger.tags": "alias:\"category\"" } },
|
|
498
|
+
{ no: 7, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
499
|
+
{ no: 21, name: "word_count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
|
|
500
|
+
{ no: 22, name: "first_heading", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
501
|
+
{ no: 8, name: "content_type", kind: "enum", T: () => ["resources.common.content.ContentType", ContentType, "CONTENT_TYPE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
589
502
|
{ 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: 21, name: "workflow_user", kind: "message", T: () => WorkflowUserState }
|
|
503
|
+
{ no: 11, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
|
|
504
|
+
{ no: 12, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
|
|
505
|
+
{ no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
506
|
+
{ no: 14, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
|
|
507
|
+
{ no: 15, name: "meta", kind: "message", T: () => DocumentMeta, options: { "tagger.tags": "alias:\"meta\"" } },
|
|
508
|
+
{ no: 17, name: "pin", kind: "message", T: () => DocumentPin, options: { "tagger.tags": "alias:\"pin\"" } },
|
|
509
|
+
{ no: 18, name: "workflow_state", kind: "message", T: () => WorkflowState },
|
|
510
|
+
{ no: 19, name: "workflow_user", kind: "message", T: () => WorkflowUserState }
|
|
599
511
|
]);
|
|
600
512
|
}
|
|
601
513
|
create(value?: PartialMessage<DocumentShort>): DocumentShort {
|
|
@@ -604,9 +516,6 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
604
516
|
message.title = "";
|
|
605
517
|
message.contentType = 0;
|
|
606
518
|
message.creatorJob = "";
|
|
607
|
-
message.state = "";
|
|
608
|
-
message.closed = false;
|
|
609
|
-
message.public = false;
|
|
610
519
|
if (value !== undefined)
|
|
611
520
|
reflectionMergePartial<DocumentShort>(this, message, value);
|
|
612
521
|
return message;
|
|
@@ -616,8 +525,8 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
616
525
|
while (reader.pos < end) {
|
|
617
526
|
let [fieldNo, wireType] = reader.tag();
|
|
618
527
|
switch (fieldNo) {
|
|
619
|
-
case /*
|
|
620
|
-
message.id = reader.
|
|
528
|
+
case /* int64 id */ 1:
|
|
529
|
+
message.id = reader.int64().toNumber();
|
|
621
530
|
break;
|
|
622
531
|
case /* resources.timestamp.Timestamp created_at */ 2:
|
|
623
532
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -628,46 +537,49 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
628
537
|
case /* optional resources.timestamp.Timestamp deleted_at */ 4:
|
|
629
538
|
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
630
539
|
break;
|
|
631
|
-
case /* optional
|
|
632
|
-
message.categoryId = reader.
|
|
540
|
+
case /* optional int64 category_id */ 5:
|
|
541
|
+
message.categoryId = reader.int64().toNumber();
|
|
633
542
|
break;
|
|
634
|
-
case /* optional resources.documents.Category category */ 6:
|
|
543
|
+
case /* optional resources.documents.category.Category category */ 6:
|
|
635
544
|
message.category = Category.internalBinaryRead(reader, reader.uint32(), options, message.category);
|
|
636
545
|
break;
|
|
637
546
|
case /* string title */ 7:
|
|
638
547
|
message.title = reader.string();
|
|
639
548
|
break;
|
|
549
|
+
case /* optional uint32 word_count */ 21:
|
|
550
|
+
message.wordCount = reader.uint32();
|
|
551
|
+
break;
|
|
552
|
+
case /* optional string first_heading */ 22:
|
|
553
|
+
message.firstHeading = reader.string();
|
|
554
|
+
break;
|
|
640
555
|
case /* resources.common.content.ContentType content_type */ 8:
|
|
641
556
|
message.contentType = reader.int32();
|
|
642
557
|
break;
|
|
643
558
|
case /* resources.common.content.Content content */ 9:
|
|
644
559
|
message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
|
|
645
560
|
break;
|
|
646
|
-
case /* optional int32 creator_id */
|
|
561
|
+
case /* optional int32 creator_id */ 11:
|
|
647
562
|
message.creatorId = reader.int32();
|
|
648
563
|
break;
|
|
649
|
-
case /* optional resources.users.UserShort creator */
|
|
564
|
+
case /* optional resources.users.short.UserShort creator */ 12:
|
|
650
565
|
message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
651
566
|
break;
|
|
652
|
-
case /* string creator_job */
|
|
567
|
+
case /* string creator_job */ 13:
|
|
653
568
|
message.creatorJob = reader.string();
|
|
654
569
|
break;
|
|
655
|
-
case /* optional string creator_job_label */
|
|
570
|
+
case /* optional string creator_job_label */ 14:
|
|
656
571
|
message.creatorJobLabel = reader.string();
|
|
657
572
|
break;
|
|
658
|
-
case /*
|
|
659
|
-
message.
|
|
660
|
-
break;
|
|
661
|
-
case /* bool closed */ 15:
|
|
662
|
-
message.closed = reader.bool();
|
|
573
|
+
case /* resources.documents.DocumentMeta meta */ 15:
|
|
574
|
+
message.meta = DocumentMeta.internalBinaryRead(reader, reader.uint32(), options, message.meta);
|
|
663
575
|
break;
|
|
664
|
-
case /*
|
|
665
|
-
message.
|
|
576
|
+
case /* optional resources.documents.pins.DocumentPin pin */ 17:
|
|
577
|
+
message.pin = DocumentPin.internalBinaryRead(reader, reader.uint32(), options, message.pin);
|
|
666
578
|
break;
|
|
667
|
-
case /* optional resources.documents.WorkflowState workflow_state */
|
|
579
|
+
case /* optional resources.documents.workflow.WorkflowState workflow_state */ 18:
|
|
668
580
|
message.workflowState = WorkflowState.internalBinaryRead(reader, reader.uint32(), options, message.workflowState);
|
|
669
581
|
break;
|
|
670
|
-
case /* optional resources.documents.WorkflowUserState workflow_user */
|
|
582
|
+
case /* optional resources.documents.workflow.WorkflowUserState workflow_user */ 19:
|
|
671
583
|
message.workflowUser = WorkflowUserState.internalBinaryRead(reader, reader.uint32(), options, message.workflowUser);
|
|
672
584
|
break;
|
|
673
585
|
default:
|
|
@@ -682,9 +594,9 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
682
594
|
return message;
|
|
683
595
|
}
|
|
684
596
|
internalBinaryWrite(message: DocumentShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
685
|
-
/*
|
|
597
|
+
/* int64 id = 1; */
|
|
686
598
|
if (message.id !== 0)
|
|
687
|
-
writer.tag(1, WireType.Varint).
|
|
599
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
688
600
|
/* resources.timestamp.Timestamp created_at = 2; */
|
|
689
601
|
if (message.createdAt)
|
|
690
602
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -694,10 +606,10 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
694
606
|
/* optional resources.timestamp.Timestamp deleted_at = 4; */
|
|
695
607
|
if (message.deletedAt)
|
|
696
608
|
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
697
|
-
/* optional
|
|
609
|
+
/* optional int64 category_id = 5; */
|
|
698
610
|
if (message.categoryId !== undefined)
|
|
699
|
-
writer.tag(5, WireType.Varint).
|
|
700
|
-
/* optional resources.documents.Category category = 6; */
|
|
611
|
+
writer.tag(5, WireType.Varint).int64(message.categoryId);
|
|
612
|
+
/* optional resources.documents.category.Category category = 6; */
|
|
701
613
|
if (message.category)
|
|
702
614
|
Category.internalBinaryWrite(message.category, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
703
615
|
/* string title = 7; */
|
|
@@ -709,33 +621,36 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
709
621
|
/* resources.common.content.Content content = 9; */
|
|
710
622
|
if (message.content)
|
|
711
623
|
Content.internalBinaryWrite(message.content, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
712
|
-
/* optional int32 creator_id =
|
|
624
|
+
/* optional int32 creator_id = 11; */
|
|
713
625
|
if (message.creatorId !== undefined)
|
|
714
|
-
writer.tag(
|
|
715
|
-
/* optional resources.users.UserShort creator =
|
|
626
|
+
writer.tag(11, WireType.Varint).int32(message.creatorId);
|
|
627
|
+
/* optional resources.users.short.UserShort creator = 12; */
|
|
716
628
|
if (message.creator)
|
|
717
|
-
UserShort.internalBinaryWrite(message.creator, writer.tag(
|
|
718
|
-
/* string creator_job =
|
|
629
|
+
UserShort.internalBinaryWrite(message.creator, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
630
|
+
/* string creator_job = 13; */
|
|
719
631
|
if (message.creatorJob !== "")
|
|
720
|
-
writer.tag(
|
|
721
|
-
/* optional string creator_job_label =
|
|
632
|
+
writer.tag(13, WireType.LengthDelimited).string(message.creatorJob);
|
|
633
|
+
/* optional string creator_job_label = 14; */
|
|
722
634
|
if (message.creatorJobLabel !== undefined)
|
|
723
|
-
writer.tag(
|
|
724
|
-
/*
|
|
725
|
-
if (message.
|
|
726
|
-
writer.tag(
|
|
727
|
-
/*
|
|
728
|
-
if (message.
|
|
729
|
-
writer.tag(
|
|
730
|
-
/*
|
|
731
|
-
if (message.public !== false)
|
|
732
|
-
writer.tag(16, WireType.Varint).bool(message.public);
|
|
733
|
-
/* optional resources.documents.WorkflowState workflow_state = 20; */
|
|
635
|
+
writer.tag(14, WireType.LengthDelimited).string(message.creatorJobLabel);
|
|
636
|
+
/* resources.documents.DocumentMeta meta = 15; */
|
|
637
|
+
if (message.meta)
|
|
638
|
+
DocumentMeta.internalBinaryWrite(message.meta, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
639
|
+
/* optional resources.documents.pins.DocumentPin pin = 17; */
|
|
640
|
+
if (message.pin)
|
|
641
|
+
DocumentPin.internalBinaryWrite(message.pin, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
|
|
642
|
+
/* optional resources.documents.workflow.WorkflowState workflow_state = 18; */
|
|
734
643
|
if (message.workflowState)
|
|
735
|
-
WorkflowState.internalBinaryWrite(message.workflowState, writer.tag(
|
|
736
|
-
/* optional resources.documents.WorkflowUserState workflow_user =
|
|
644
|
+
WorkflowState.internalBinaryWrite(message.workflowState, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
|
|
645
|
+
/* optional resources.documents.workflow.WorkflowUserState workflow_user = 19; */
|
|
737
646
|
if (message.workflowUser)
|
|
738
|
-
WorkflowUserState.internalBinaryWrite(message.workflowUser, writer.tag(
|
|
647
|
+
WorkflowUserState.internalBinaryWrite(message.workflowUser, writer.tag(19, WireType.LengthDelimited).fork(), options).join();
|
|
648
|
+
/* optional uint32 word_count = 21; */
|
|
649
|
+
if (message.wordCount !== undefined)
|
|
650
|
+
writer.tag(21, WireType.Varint).uint32(message.wordCount);
|
|
651
|
+
/* optional string first_heading = 22; */
|
|
652
|
+
if (message.firstHeading !== undefined)
|
|
653
|
+
writer.tag(22, WireType.LengthDelimited).string(message.firstHeading);
|
|
739
654
|
let u = options.writeUnknownFields;
|
|
740
655
|
if (u !== false)
|
|
741
656
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -747,340 +662,86 @@ class DocumentShort$Type extends MessageType<DocumentShort> {
|
|
|
747
662
|
*/
|
|
748
663
|
export const DocumentShort = new DocumentShort$Type();
|
|
749
664
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
750
|
-
class
|
|
751
|
-
constructor() {
|
|
752
|
-
super("resources.documents.DocumentReference", [
|
|
753
|
-
{ no: 1, name: "id", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
754
|
-
{ no: 2, name: "created_at", kind: "message", T: () => Timestamp },
|
|
755
|
-
{ no: 3, name: "source_document_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
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*/, L: 2 /*LongType.NUMBER*/ },
|
|
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:
|
|
779
|
-
message.id = reader.uint64().toNumber();
|
|
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:
|
|
785
|
-
message.sourceDocumentId = reader.uint64().toNumber();
|
|
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:
|
|
794
|
-
message.targetDocumentId = reader.uint64().toNumber();
|
|
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; */
|
|
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; */
|
|
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; */
|
|
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> {
|
|
665
|
+
class DocumentMeta$Type extends MessageType<DocumentMeta> {
|
|
856
666
|
constructor() {
|
|
857
|
-
super("resources.documents.
|
|
858
|
-
{ no: 1, name: "
|
|
859
|
-
{ no: 2, name: "
|
|
860
|
-
{ no: 3, name: "
|
|
861
|
-
{ no: 4, name: "
|
|
862
|
-
{ no: 5, name: "
|
|
863
|
-
{ no: 6, name: "
|
|
864
|
-
{ no: 7, name: "
|
|
865
|
-
{ no:
|
|
866
|
-
{ no:
|
|
667
|
+
super("resources.documents.DocumentMeta", [
|
|
668
|
+
{ no: 1, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
669
|
+
{ no: 2, name: "recomputed_at", kind: "message", T: () => Timestamp },
|
|
670
|
+
{ no: 3, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
671
|
+
{ no: 4, name: "draft", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
672
|
+
{ no: 5, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
673
|
+
{ no: 6, name: "state", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
674
|
+
{ no: 7, name: "approved", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
675
|
+
{ no: 16, name: "ap_required_total", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
676
|
+
{ no: 17, name: "ap_collected_approved", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
677
|
+
{ no: 18, name: "ap_required_remaining", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
678
|
+
{ no: 19, name: "ap_declined_count", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
679
|
+
{ no: 20, name: "ap_pending_count", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
680
|
+
{ no: 21, name: "ap_any_declined", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
|
|
681
|
+
{ no: 22, name: "ap_policies_active", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
682
|
+
{ no: 23, name: "comment_count", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }
|
|
867
683
|
]);
|
|
868
684
|
}
|
|
869
|
-
create(value?: PartialMessage<
|
|
685
|
+
create(value?: PartialMessage<DocumentMeta>): DocumentMeta {
|
|
870
686
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
871
687
|
message.documentId = 0;
|
|
872
|
-
message.
|
|
873
|
-
message.
|
|
874
|
-
message.
|
|
688
|
+
message.closed = false;
|
|
689
|
+
message.draft = false;
|
|
690
|
+
message.public = false;
|
|
691
|
+
message.state = "";
|
|
875
692
|
if (value !== undefined)
|
|
876
|
-
reflectionMergePartial<
|
|
693
|
+
reflectionMergePartial<DocumentMeta>(this, message, value);
|
|
877
694
|
return message;
|
|
878
695
|
}
|
|
879
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?:
|
|
696
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DocumentMeta): DocumentMeta {
|
|
880
697
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
881
698
|
while (reader.pos < end) {
|
|
882
699
|
let [fieldNo, wireType] = reader.tag();
|
|
883
700
|
switch (fieldNo) {
|
|
884
|
-
case /*
|
|
885
|
-
message.
|
|
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:
|
|
891
|
-
message.documentId = reader.uint64().toNumber();
|
|
892
|
-
break;
|
|
893
|
-
case /* optional resources.documents.DocumentShort document */ 4:
|
|
894
|
-
message.document = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.document);
|
|
701
|
+
case /* int64 document_id */ 1:
|
|
702
|
+
message.documentId = reader.int64().toNumber();
|
|
895
703
|
break;
|
|
896
|
-
case /*
|
|
897
|
-
message.
|
|
704
|
+
case /* optional resources.timestamp.Timestamp recomputed_at */ 2:
|
|
705
|
+
message.recomputedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.recomputedAt);
|
|
898
706
|
break;
|
|
899
|
-
case /*
|
|
900
|
-
message.
|
|
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();
|
|
707
|
+
case /* bool closed */ 3:
|
|
708
|
+
message.closed = reader.bool();
|
|
907
709
|
break;
|
|
908
|
-
case /*
|
|
909
|
-
message.
|
|
710
|
+
case /* bool draft */ 4:
|
|
711
|
+
message.draft = reader.bool();
|
|
910
712
|
break;
|
|
911
|
-
|
|
912
|
-
|
|
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; */
|
|
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; */
|
|
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*/, L: 2 /*LongType.NUMBER*/ },
|
|
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:
|
|
985
|
-
message.documentId = reader.uint64().toNumber();
|
|
713
|
+
case /* bool public */ 5:
|
|
714
|
+
message.public = reader.bool();
|
|
986
715
|
break;
|
|
987
|
-
case /*
|
|
988
|
-
message.
|
|
716
|
+
case /* string state */ 6:
|
|
717
|
+
message.state = reader.string();
|
|
989
718
|
break;
|
|
990
|
-
case /* optional
|
|
991
|
-
message.
|
|
719
|
+
case /* optional bool approved */ 7:
|
|
720
|
+
message.approved = reader.bool();
|
|
992
721
|
break;
|
|
993
|
-
case /* optional
|
|
994
|
-
message.
|
|
722
|
+
case /* optional int32 ap_required_total */ 16:
|
|
723
|
+
message.apRequiredTotal = reader.int32();
|
|
995
724
|
break;
|
|
996
|
-
case /* optional
|
|
997
|
-
message.
|
|
725
|
+
case /* optional int32 ap_collected_approved */ 17:
|
|
726
|
+
message.apCollectedApproved = reader.int32();
|
|
998
727
|
break;
|
|
999
|
-
case /* optional
|
|
1000
|
-
message.
|
|
728
|
+
case /* optional int32 ap_required_remaining */ 18:
|
|
729
|
+
message.apRequiredRemaining = reader.int32();
|
|
1001
730
|
break;
|
|
1002
|
-
|
|
1003
|
-
|
|
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; */
|
|
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*/, L: 2 /*LongType.NUMBER*/ },
|
|
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:
|
|
1068
|
-
message.documentId = reader.uint64().toNumber();
|
|
731
|
+
case /* optional int32 ap_declined_count */ 19:
|
|
732
|
+
message.apDeclinedCount = reader.int32();
|
|
1069
733
|
break;
|
|
1070
|
-
case /* int32
|
|
1071
|
-
message.
|
|
734
|
+
case /* optional int32 ap_pending_count */ 20:
|
|
735
|
+
message.apPendingCount = reader.int32();
|
|
1072
736
|
break;
|
|
1073
|
-
case /* optional
|
|
1074
|
-
message.
|
|
737
|
+
case /* optional bool ap_any_declined */ 21:
|
|
738
|
+
message.apAnyDeclined = reader.bool();
|
|
1075
739
|
break;
|
|
1076
|
-
case /* optional
|
|
1077
|
-
message.
|
|
740
|
+
case /* optional int32 ap_policies_active */ 22:
|
|
741
|
+
message.apPoliciesActive = reader.int32();
|
|
1078
742
|
break;
|
|
1079
|
-
case /* optional
|
|
1080
|
-
message.
|
|
1081
|
-
break;
|
|
1082
|
-
case /* optional resources.documents.DocumentShort document */ 6:
|
|
1083
|
-
message.document = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.document);
|
|
743
|
+
case /* optional int32 comment_count */ 23:
|
|
744
|
+
message.commentCount = reader.int32();
|
|
1084
745
|
break;
|
|
1085
746
|
default:
|
|
1086
747
|
let u = options.readUnknownField;
|
|
@@ -1093,25 +754,52 @@ class WorkflowUserState$Type extends MessageType<WorkflowUserState> {
|
|
|
1093
754
|
}
|
|
1094
755
|
return message;
|
|
1095
756
|
}
|
|
1096
|
-
internalBinaryWrite(message:
|
|
1097
|
-
/*
|
|
757
|
+
internalBinaryWrite(message: DocumentMeta, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
758
|
+
/* int64 document_id = 1; */
|
|
1098
759
|
if (message.documentId !== 0)
|
|
1099
|
-
writer.tag(1, WireType.Varint).
|
|
1100
|
-
/*
|
|
1101
|
-
if (message.
|
|
1102
|
-
writer.tag(2, WireType.
|
|
1103
|
-
/*
|
|
1104
|
-
if (message.
|
|
1105
|
-
|
|
1106
|
-
/*
|
|
1107
|
-
if (message.
|
|
1108
|
-
writer.tag(4, WireType.
|
|
1109
|
-
/*
|
|
1110
|
-
if (message.
|
|
1111
|
-
|
|
1112
|
-
/*
|
|
1113
|
-
if (message.
|
|
1114
|
-
|
|
760
|
+
writer.tag(1, WireType.Varint).int64(message.documentId);
|
|
761
|
+
/* optional resources.timestamp.Timestamp recomputed_at = 2; */
|
|
762
|
+
if (message.recomputedAt)
|
|
763
|
+
Timestamp.internalBinaryWrite(message.recomputedAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
764
|
+
/* bool closed = 3; */
|
|
765
|
+
if (message.closed !== false)
|
|
766
|
+
writer.tag(3, WireType.Varint).bool(message.closed);
|
|
767
|
+
/* bool draft = 4; */
|
|
768
|
+
if (message.draft !== false)
|
|
769
|
+
writer.tag(4, WireType.Varint).bool(message.draft);
|
|
770
|
+
/* bool public = 5; */
|
|
771
|
+
if (message.public !== false)
|
|
772
|
+
writer.tag(5, WireType.Varint).bool(message.public);
|
|
773
|
+
/* string state = 6; */
|
|
774
|
+
if (message.state !== "")
|
|
775
|
+
writer.tag(6, WireType.LengthDelimited).string(message.state);
|
|
776
|
+
/* optional bool approved = 7; */
|
|
777
|
+
if (message.approved !== undefined)
|
|
778
|
+
writer.tag(7, WireType.Varint).bool(message.approved);
|
|
779
|
+
/* optional int32 ap_required_total = 16; */
|
|
780
|
+
if (message.apRequiredTotal !== undefined)
|
|
781
|
+
writer.tag(16, WireType.Varint).int32(message.apRequiredTotal);
|
|
782
|
+
/* optional int32 ap_collected_approved = 17; */
|
|
783
|
+
if (message.apCollectedApproved !== undefined)
|
|
784
|
+
writer.tag(17, WireType.Varint).int32(message.apCollectedApproved);
|
|
785
|
+
/* optional int32 ap_required_remaining = 18; */
|
|
786
|
+
if (message.apRequiredRemaining !== undefined)
|
|
787
|
+
writer.tag(18, WireType.Varint).int32(message.apRequiredRemaining);
|
|
788
|
+
/* optional int32 ap_declined_count = 19; */
|
|
789
|
+
if (message.apDeclinedCount !== undefined)
|
|
790
|
+
writer.tag(19, WireType.Varint).int32(message.apDeclinedCount);
|
|
791
|
+
/* optional int32 ap_pending_count = 20; */
|
|
792
|
+
if (message.apPendingCount !== undefined)
|
|
793
|
+
writer.tag(20, WireType.Varint).int32(message.apPendingCount);
|
|
794
|
+
/* optional bool ap_any_declined = 21; */
|
|
795
|
+
if (message.apAnyDeclined !== undefined)
|
|
796
|
+
writer.tag(21, WireType.Varint).bool(message.apAnyDeclined);
|
|
797
|
+
/* optional int32 ap_policies_active = 22; */
|
|
798
|
+
if (message.apPoliciesActive !== undefined)
|
|
799
|
+
writer.tag(22, WireType.Varint).int32(message.apPoliciesActive);
|
|
800
|
+
/* optional int32 comment_count = 23; */
|
|
801
|
+
if (message.commentCount !== undefined)
|
|
802
|
+
writer.tag(23, WireType.Varint).int32(message.commentCount);
|
|
1115
803
|
let u = options.writeUnknownFields;
|
|
1116
804
|
if (u !== false)
|
|
1117
805
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -1119,6 +807,6 @@ class WorkflowUserState$Type extends MessageType<WorkflowUserState> {
|
|
|
1119
807
|
}
|
|
1120
808
|
}
|
|
1121
809
|
/**
|
|
1122
|
-
* @generated MessageType for protobuf message resources.documents.
|
|
810
|
+
* @generated MessageType for protobuf message resources.documents.DocumentMeta
|
|
1123
811
|
*/
|
|
1124
|
-
export const
|
|
812
|
+
export const DocumentMeta = new DocumentMeta$Type();
|