@fivenet-app/gen 2025.9.1 → 2026.4.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/clients.ts +36 -0
- package/codegen/perms/perms.ts +186 -15
- package/codegen/sanitizer/sanitizer.ts +34 -1
- package/package.json +2 -2
- package/perms.ts +140 -8
- package/resources/accounts/accounts.ts +98 -31
- package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +20 -20
- package/resources/audit/audit.ts +156 -38
- package/resources/calendar/{access.ts → access/access.ts} +30 -30
- package/resources/calendar/calendar.ts +17 -477
- package/resources/calendar/entries/entries.ts +474 -0
- package/resources/centrum/{access.ts → access/access.ts} +22 -22
- package/resources/centrum/{dispatchers.ts → dispatchers/dispatchers.ts} +14 -14
- package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +151 -185
- package/resources/centrum/joblist.ts +136 -0
- package/resources/centrum/{settings.ts → settings/settings.ts} +70 -70
- package/resources/centrum/{units_access.ts → units/access/access.ts} +30 -30
- package/resources/centrum/{units.ts → units/units.ts} +131 -51
- package/resources/citizens/labels/labels.ts +526 -0
- package/resources/{users → citizens/licenses}/licenses.ts +17 -17
- package/resources/clientconfig/clientconfig.ts +126 -258
- package/resources/collab/collab.ts +4 -16
- package/resources/common/content/content.ts +108 -85
- package/resources/common/content/diff_activity.ts +267 -0
- package/resources/common/i18n.ts +2 -2
- package/resources/{common/cron → cron}/cron.ts +43 -43
- package/resources/documents/{access.ts → access/access.ts} +29 -52
- package/resources/documents/{activity.ts → activity/activity.ts} +171 -123
- package/resources/documents/approval/approval.ts +945 -0
- package/resources/documents/{category.ts → category/category.ts} +7 -7
- package/resources/documents/{comment.ts → comment/comment.ts} +10 -10
- package/resources/documents/data/data.ts +303 -0
- package/resources/documents/documents.ts +282 -667
- package/resources/{common/uuid.ts → documents/forms/forms.ts} +20 -20
- package/resources/documents/{pins.ts → pins/pins.ts} +5 -5
- package/resources/documents/references/references.ts +187 -0
- package/resources/documents/relations/relations.ts +184 -0
- package/resources/documents/{requests.ts → requests/requests.ts} +18 -18
- package/resources/documents/stamps/stamp.ts +355 -0
- package/resources/documents/{templates.ts → templates/templates.ts} +426 -84
- package/resources/documents/{workflow.ts → workflow/workflow.ts} +264 -26
- package/resources/file/filestore.ts +1 -1
- package/resources/{common/grpcws → grpcws}/grpcws.ts +52 -52
- package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +54 -54
- package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +17 -28
- package/resources/jobs/{conduct.ts → conduct/conduct.ts} +70 -45
- package/resources/jobs/{labels.ts → labels/labels.ts} +34 -23
- package/resources/jobs/{job_props.ts → props/props.ts} +26 -38
- package/resources/jobs/{job_settings.ts → settings/settings.ts} +53 -53
- package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +17 -17
- package/resources/livemap/{heatmap.ts → heatmap/heatmap.ts} +4 -4
- package/resources/livemap/{marker_marker.ts → markers/marker_marker.ts} +35 -35
- package/resources/livemap/{user_marker.ts → markers/user_marker.ts} +115 -36
- package/resources/mailer/{access.ts → access/access.ts} +67 -67
- package/resources/mailer/{email.ts → emails/email.ts} +19 -19
- package/resources/mailer/{events.ts → events/events.ts} +24 -24
- package/resources/mailer/{message.ts → messages/message.ts} +29 -29
- package/resources/mailer/{settings.ts → settings/settings.ts} +14 -13
- package/resources/mailer/{template.ts → templates/template.ts} +15 -15
- package/resources/mailer/{thread.ts → threads/thread.ts} +29 -29
- package/resources/notifications/{client_view.ts → clientview/clientview.ts} +22 -22
- package/resources/notifications/{events.ts → events/events.ts} +20 -20
- package/resources/notifications/notifications.ts +4 -4
- package/resources/permissions/{attributes.ts → attributes/attributes.ts} +42 -42
- package/resources/permissions/{events.ts → events/events.ts} +7 -7
- package/resources/permissions/{permissions.ts → permissions/permissions.ts} +30 -19
- package/resources/qualifications/{access.ts → access/access.ts} +19 -19
- package/resources/qualifications/{exam.ts → exam/exam.ts} +269 -141
- package/resources/qualifications/qualifications.ts +51 -179
- package/resources/settings/banner.ts +3 -3
- package/resources/settings/config.ts +527 -25
- package/resources/{documents/state.ts → settings/data.ts} +41 -20
- package/resources/settings/perms.ts +14 -14
- package/resources/stats/stats.ts +379 -0
- package/resources/sync/{activity.ts → activity/activity.ts} +104 -25
- package/resources/sync/{data.ts → data/data.ts} +405 -59
- package/resources/userinfo/{user_info.ts → userinfo.ts} +71 -93
- package/resources/users/{activity.ts → activity/activity.ts} +242 -101
- package/resources/users/{props.ts → props/props.ts} +91 -69
- package/resources/users/short/user.ts +184 -0
- package/resources/users/{users.ts → user.ts} +266 -195
- package/resources/vehicles/{activity.ts → activity/activity.ts} +20 -20
- package/resources/vehicles/{props.ts → props/props.ts} +28 -6
- package/resources/vehicles/vehicles.ts +20 -8
- package/resources/wiki/{access.ts → access/access.ts} +30 -30
- package/resources/wiki/{activity.ts → activity/activity.ts} +104 -70
- package/resources/wiki/page.ts +39 -15
- package/services/auth/auth.client.ts +23 -10
- package/services/auth/auth.ts +445 -262
- package/services/calendar/calendar.ts +56 -34
- package/services/centrum/centrum.ts +127 -127
- package/services/citizens/citizens.client.ts +0 -13
- package/services/citizens/citizens.ts +44 -134
- package/services/citizens/labels.client.ts +77 -0
- package/services/citizens/labels.ts +455 -0
- package/services/completor/completor.ts +36 -16
- package/services/documents/approval.client.ts +188 -0
- package/services/documents/approval.ts +1776 -0
- package/services/documents/documents.ts +164 -186
- 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/jobs/conduct.client.ts +30 -3
- package/services/jobs/conduct.ts +159 -33
- package/services/jobs/jobs.ts +43 -43
- package/services/jobs/stats.client.ts +38 -0
- package/services/jobs/stats.ts +207 -0
- package/services/jobs/timeclock.ts +39 -39
- package/services/livemap/livemap.ts +18 -18
- package/services/mailer/mailer.ts +78 -78
- package/services/notifications/notifications.ts +35 -35
- package/services/qualifications/qualifications.ts +81 -46
- package/services/settings/accounts.client.ts +23 -10
- package/services/settings/accounts.ts +191 -30
- package/services/settings/cron.client.ts +13 -0
- package/services/settings/cron.ts +118 -5
- package/services/settings/laws.ts +1 -1
- package/services/settings/settings.ts +73 -52
- package/services/settings/system.client.ts +13 -0
- package/services/settings/system.ts +115 -15
- package/services/stats/stats.client.ts +7 -7
- package/services/stats/stats.ts +24 -24
- package/services/sync/sync.client.ts +271 -37
- package/services/sync/sync.ts +1525 -421
- package/services/vehicles/vehicles.ts +8 -8
- package/services/wiki/wiki.ts +8 -8
- package/svcs.ts +100 -6
- package/resources/centrum/attributes.ts +0 -183
- package/resources/documents/signoff.ts +0 -55
- package/resources/users/labels.ts +0 -160
|
@@ -0,0 +1,945 @@
|
|
|
1
|
+
// @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
|
|
2
|
+
// @generated from protobuf file "resources/documents/approval/approval.proto" (package "resources.documents.approval", syntax proto3)
|
|
3
|
+
// tslint:disable
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
14
|
+
import { Stamp } from "../stamps/stamp";
|
|
15
|
+
import { DocumentShort } from "../documents";
|
|
16
|
+
import { UserShort } from "../../users/short/user";
|
|
17
|
+
import { Timestamp } from "../../timestamp/timestamp";
|
|
18
|
+
/**
|
|
19
|
+
* @generated from protobuf message resources.documents.approval.ApprovalPolicy
|
|
20
|
+
*/
|
|
21
|
+
export interface ApprovalPolicy {
|
|
22
|
+
/**
|
|
23
|
+
* @generated from protobuf field: int64 document_id = 3
|
|
24
|
+
*/
|
|
25
|
+
documentId: number;
|
|
26
|
+
/**
|
|
27
|
+
* @generated from protobuf field: resources.timestamp.Timestamp snapshot_date = 4
|
|
28
|
+
*/
|
|
29
|
+
snapshotDate?: Timestamp;
|
|
30
|
+
/**
|
|
31
|
+
* @generated from protobuf field: resources.documents.approval.OnEditBehavior on_edit_behavior = 5
|
|
32
|
+
*/
|
|
33
|
+
onEditBehavior: OnEditBehavior;
|
|
34
|
+
/**
|
|
35
|
+
* @generated from protobuf field: resources.documents.approval.ApprovalRuleKind rule_kind = 6
|
|
36
|
+
*/
|
|
37
|
+
ruleKind: ApprovalRuleKind;
|
|
38
|
+
/**
|
|
39
|
+
* @generated from protobuf field: optional int32 required_count = 7
|
|
40
|
+
*/
|
|
41
|
+
requiredCount?: number;
|
|
42
|
+
/**
|
|
43
|
+
* @generated from protobuf field: bool signature_required = 8
|
|
44
|
+
*/
|
|
45
|
+
signatureRequired: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* @generated from protobuf field: bool self_approve_allowed = 19
|
|
48
|
+
*/
|
|
49
|
+
selfApproveAllowed: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* @generated from protobuf field: int32 assigned_count = 9
|
|
52
|
+
*/
|
|
53
|
+
assignedCount: number;
|
|
54
|
+
/**
|
|
55
|
+
* @generated from protobuf field: int32 approved_count = 10
|
|
56
|
+
*/
|
|
57
|
+
approvedCount: number;
|
|
58
|
+
/**
|
|
59
|
+
* @generated from protobuf field: int32 declined_count = 11
|
|
60
|
+
*/
|
|
61
|
+
declinedCount: number;
|
|
62
|
+
/**
|
|
63
|
+
* @generated from protobuf field: int32 pending_count = 12
|
|
64
|
+
*/
|
|
65
|
+
pendingCount: number;
|
|
66
|
+
/**
|
|
67
|
+
* @generated from protobuf field: bool any_declined = 13
|
|
68
|
+
*/
|
|
69
|
+
anyDeclined: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp started_at = 14
|
|
72
|
+
*/
|
|
73
|
+
startedAt?: Timestamp;
|
|
74
|
+
/**
|
|
75
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp completed_at = 15
|
|
76
|
+
*/
|
|
77
|
+
completedAt?: Timestamp;
|
|
78
|
+
/**
|
|
79
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 16
|
|
80
|
+
*/
|
|
81
|
+
createdAt?: Timestamp;
|
|
82
|
+
/**
|
|
83
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 17
|
|
84
|
+
*/
|
|
85
|
+
updatedAt?: Timestamp;
|
|
86
|
+
/**
|
|
87
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 18
|
|
88
|
+
*/
|
|
89
|
+
deletedAt?: Timestamp;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @generated from protobuf message resources.documents.approval.ApprovalTask
|
|
93
|
+
*/
|
|
94
|
+
export interface ApprovalTask {
|
|
95
|
+
/**
|
|
96
|
+
* @generated from protobuf field: int64 id = 1
|
|
97
|
+
*/
|
|
98
|
+
id: number;
|
|
99
|
+
/**
|
|
100
|
+
* @generated from protobuf field: int64 document_id = 3
|
|
101
|
+
*/
|
|
102
|
+
documentId: number;
|
|
103
|
+
/**
|
|
104
|
+
* @generated from protobuf field: resources.timestamp.Timestamp snapshot_date = 4
|
|
105
|
+
*/
|
|
106
|
+
snapshotDate?: Timestamp;
|
|
107
|
+
/**
|
|
108
|
+
* @generated from protobuf field: resources.documents.approval.ApprovalAssigneeKind assignee_kind = 5
|
|
109
|
+
*/
|
|
110
|
+
assigneeKind: ApprovalAssigneeKind;
|
|
111
|
+
/**
|
|
112
|
+
* @generated from protobuf field: optional int32 user_id = 6
|
|
113
|
+
*/
|
|
114
|
+
userId?: number;
|
|
115
|
+
/**
|
|
116
|
+
* @generated from protobuf field: optional resources.users.short.UserShort user = 7
|
|
117
|
+
*/
|
|
118
|
+
user?: UserShort;
|
|
119
|
+
/**
|
|
120
|
+
* @generated from protobuf field: optional string job = 8
|
|
121
|
+
*/
|
|
122
|
+
job?: string;
|
|
123
|
+
/**
|
|
124
|
+
* @generated from protobuf field: optional string job_label = 9
|
|
125
|
+
*/
|
|
126
|
+
jobLabel?: string;
|
|
127
|
+
/**
|
|
128
|
+
* @generated from protobuf field: optional int32 minimum_grade = 10
|
|
129
|
+
*/
|
|
130
|
+
minimumGrade?: number;
|
|
131
|
+
/**
|
|
132
|
+
* @generated from protobuf field: optional string job_grade_label = 11
|
|
133
|
+
*/
|
|
134
|
+
jobGradeLabel?: string;
|
|
135
|
+
/**
|
|
136
|
+
* "Leadership", "Counterparty Rep"
|
|
137
|
+
*
|
|
138
|
+
* @generated from protobuf field: optional string label = 12
|
|
139
|
+
*/
|
|
140
|
+
label?: string;
|
|
141
|
+
/**
|
|
142
|
+
* @generated from protobuf field: bool signature_required = 13
|
|
143
|
+
*/
|
|
144
|
+
signatureRequired: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* >=1; meaningful only for Job tasks; always 1 for User
|
|
147
|
+
*
|
|
148
|
+
* @generated from protobuf field: int32 slot_no = 14
|
|
149
|
+
*/
|
|
150
|
+
slotNo: number;
|
|
151
|
+
/**
|
|
152
|
+
* @generated from protobuf field: resources.documents.approval.ApprovalTaskStatus status = 15
|
|
153
|
+
*/
|
|
154
|
+
status: ApprovalTaskStatus;
|
|
155
|
+
/**
|
|
156
|
+
* Optional comment on approve/decline
|
|
157
|
+
*
|
|
158
|
+
* @generated from protobuf field: optional string comment = 16
|
|
159
|
+
*/
|
|
160
|
+
comment?: string;
|
|
161
|
+
/**
|
|
162
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 17
|
|
163
|
+
*/
|
|
164
|
+
createdAt?: Timestamp;
|
|
165
|
+
/**
|
|
166
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp completed_at = 18
|
|
167
|
+
*/
|
|
168
|
+
completedAt?: Timestamp;
|
|
169
|
+
/**
|
|
170
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp due_at = 19
|
|
171
|
+
*/
|
|
172
|
+
dueAt?: Timestamp;
|
|
173
|
+
/**
|
|
174
|
+
* @generated from protobuf field: int32 decision_count = 20
|
|
175
|
+
*/
|
|
176
|
+
decisionCount: number;
|
|
177
|
+
/**
|
|
178
|
+
* @generated from protobuf field: optional int64 approval_id = 21
|
|
179
|
+
*/
|
|
180
|
+
approvalId?: number;
|
|
181
|
+
/**
|
|
182
|
+
* @generated from protobuf field: int32 creator_id = 22
|
|
183
|
+
*/
|
|
184
|
+
creatorId: number;
|
|
185
|
+
/**
|
|
186
|
+
* @generated from protobuf field: optional resources.users.short.UserShort creator = 23
|
|
187
|
+
*/
|
|
188
|
+
creator?: UserShort;
|
|
189
|
+
/**
|
|
190
|
+
* @generated from protobuf field: string creator_job = 24
|
|
191
|
+
*/
|
|
192
|
+
creatorJob: string;
|
|
193
|
+
/**
|
|
194
|
+
* @generated from protobuf field: optional string creator_job_label = 25
|
|
195
|
+
*/
|
|
196
|
+
creatorJobLabel?: string;
|
|
197
|
+
/**
|
|
198
|
+
* @generated from protobuf field: optional resources.documents.DocumentShort document = 26
|
|
199
|
+
*/
|
|
200
|
+
document?: DocumentShort;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* @generated from protobuf message resources.documents.approval.Approval
|
|
204
|
+
*/
|
|
205
|
+
export interface Approval {
|
|
206
|
+
/**
|
|
207
|
+
* @generated from protobuf field: int64 id = 1
|
|
208
|
+
*/
|
|
209
|
+
id: number;
|
|
210
|
+
/**
|
|
211
|
+
* @generated from protobuf field: int64 document_id = 3
|
|
212
|
+
*/
|
|
213
|
+
documentId: number;
|
|
214
|
+
/**
|
|
215
|
+
* @generated from protobuf field: resources.timestamp.Timestamp snapshot_date = 4
|
|
216
|
+
*/
|
|
217
|
+
snapshotDate?: Timestamp;
|
|
218
|
+
/**
|
|
219
|
+
* Link to originating task (if any)
|
|
220
|
+
*
|
|
221
|
+
* @generated from protobuf field: optional int64 task_id = 5
|
|
222
|
+
*/
|
|
223
|
+
taskId?: number;
|
|
224
|
+
/**
|
|
225
|
+
* @generated from protobuf field: optional int32 user_id = 6
|
|
226
|
+
*/
|
|
227
|
+
userId?: number;
|
|
228
|
+
/**
|
|
229
|
+
* @generated from protobuf field: optional resources.users.short.UserShort user = 7
|
|
230
|
+
*/
|
|
231
|
+
user?: UserShort;
|
|
232
|
+
/**
|
|
233
|
+
* @generated from protobuf field: optional string user_job = 8
|
|
234
|
+
*/
|
|
235
|
+
userJob?: string;
|
|
236
|
+
/**
|
|
237
|
+
* @generated from protobuf field: optional string user_job_label = 9
|
|
238
|
+
*/
|
|
239
|
+
userJobLabel?: string;
|
|
240
|
+
/**
|
|
241
|
+
* @generated from protobuf field: optional int32 user_grade = 10
|
|
242
|
+
*/
|
|
243
|
+
userGrade?: number;
|
|
244
|
+
/**
|
|
245
|
+
* @generated from protobuf field: optional string user_grade_label = 11
|
|
246
|
+
*/
|
|
247
|
+
userGradeLabel?: string;
|
|
248
|
+
/**
|
|
249
|
+
* SVG path, typed preview, stamp fill, etc.
|
|
250
|
+
*
|
|
251
|
+
* @generated from protobuf field: optional string payload_svg = 12
|
|
252
|
+
*/
|
|
253
|
+
payloadSvg?: string;
|
|
254
|
+
/**
|
|
255
|
+
* @generated from protobuf field: optional int64 stamp_id = 13
|
|
256
|
+
*/
|
|
257
|
+
stampId?: number;
|
|
258
|
+
/**
|
|
259
|
+
* @generated from protobuf field: optional resources.documents.stamps.Stamp stamp = 14
|
|
260
|
+
*/
|
|
261
|
+
stamp?: Stamp;
|
|
262
|
+
/**
|
|
263
|
+
* @generated from protobuf field: resources.documents.approval.ApprovalStatus status = 15
|
|
264
|
+
*/
|
|
265
|
+
status: ApprovalStatus;
|
|
266
|
+
/**
|
|
267
|
+
* @generated from protobuf field: optional string comment = 16
|
|
268
|
+
*/
|
|
269
|
+
comment?: string;
|
|
270
|
+
/**
|
|
271
|
+
* @generated from protobuf field: resources.timestamp.Timestamp created_at = 17
|
|
272
|
+
*/
|
|
273
|
+
createdAt?: Timestamp;
|
|
274
|
+
/**
|
|
275
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp revoked_at = 18
|
|
276
|
+
*/
|
|
277
|
+
revokedAt?: Timestamp;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Policy snapshot applied to a specific version
|
|
281
|
+
*
|
|
282
|
+
* @generated from protobuf enum resources.documents.approval.OnEditBehavior
|
|
283
|
+
*/
|
|
284
|
+
export enum OnEditBehavior {
|
|
285
|
+
/**
|
|
286
|
+
* @generated from protobuf enum value: ON_EDIT_BEHAVIOR_UNSPECIFIED = 0;
|
|
287
|
+
*/
|
|
288
|
+
UNSPECIFIED = 0,
|
|
289
|
+
/**
|
|
290
|
+
* Keep approvals where possible
|
|
291
|
+
*
|
|
292
|
+
* @generated from protobuf enum value: ON_EDIT_BEHAVIOR_KEEP_PROGRESS = 1;
|
|
293
|
+
*/
|
|
294
|
+
KEEP_PROGRESS = 1,
|
|
295
|
+
/**
|
|
296
|
+
* Reset review on content edits
|
|
297
|
+
*
|
|
298
|
+
* @generated from protobuf enum value: ON_EDIT_BEHAVIOR_RESET = 2;
|
|
299
|
+
*/
|
|
300
|
+
RESET = 2
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* @generated from protobuf enum resources.documents.approval.ApprovalRuleKind
|
|
304
|
+
*/
|
|
305
|
+
export enum ApprovalRuleKind {
|
|
306
|
+
/**
|
|
307
|
+
* @generated from protobuf enum value: APPROVAL_RULE_KIND_UNSPECIFIED = 0;
|
|
308
|
+
*/
|
|
309
|
+
UNSPECIFIED = 0,
|
|
310
|
+
/**
|
|
311
|
+
* Require all approvals (based on tasks created)
|
|
312
|
+
*
|
|
313
|
+
* @generated from protobuf enum value: APPROVAL_RULE_KIND_REQUIRE_ALL = 1;
|
|
314
|
+
*/
|
|
315
|
+
REQUIRE_ALL = 1,
|
|
316
|
+
/**
|
|
317
|
+
* Quorum of N approvals based on `required_count`
|
|
318
|
+
*
|
|
319
|
+
* @generated from protobuf enum value: APPROVAL_RULE_KIND_QUORUM_ANY = 2;
|
|
320
|
+
*/
|
|
321
|
+
QUORUM_ANY = 2
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* @generated from protobuf enum resources.documents.approval.ApprovalAssigneeKind
|
|
325
|
+
*/
|
|
326
|
+
export enum ApprovalAssigneeKind {
|
|
327
|
+
/**
|
|
328
|
+
* @generated from protobuf enum value: APPROVAL_ASSIGNEE_KIND_UNSPECIFIED = 0;
|
|
329
|
+
*/
|
|
330
|
+
UNSPECIFIED = 0,
|
|
331
|
+
/**
|
|
332
|
+
* @generated from protobuf enum value: APPROVAL_ASSIGNEE_KIND_USER = 1;
|
|
333
|
+
*/
|
|
334
|
+
USER = 1,
|
|
335
|
+
/**
|
|
336
|
+
* @generated from protobuf enum value: APPROVAL_ASSIGNEE_KIND_JOB_GRADE = 2;
|
|
337
|
+
*/
|
|
338
|
+
JOB_GRADE = 2
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* @generated from protobuf enum resources.documents.approval.ApprovalTaskStatus
|
|
342
|
+
*/
|
|
343
|
+
export enum ApprovalTaskStatus {
|
|
344
|
+
/**
|
|
345
|
+
* @generated from protobuf enum value: APPROVAL_TASK_STATUS_UNSPECIFIED = 0;
|
|
346
|
+
*/
|
|
347
|
+
UNSPECIFIED = 0,
|
|
348
|
+
/**
|
|
349
|
+
* @generated from protobuf enum value: APPROVAL_TASK_STATUS_PENDING = 1;
|
|
350
|
+
*/
|
|
351
|
+
PENDING = 1,
|
|
352
|
+
/**
|
|
353
|
+
* @generated from protobuf enum value: APPROVAL_TASK_STATUS_APPROVED = 2;
|
|
354
|
+
*/
|
|
355
|
+
APPROVED = 2,
|
|
356
|
+
/**
|
|
357
|
+
* @generated from protobuf enum value: APPROVAL_TASK_STATUS_DECLINED = 3;
|
|
358
|
+
*/
|
|
359
|
+
DECLINED = 3,
|
|
360
|
+
/**
|
|
361
|
+
* @generated from protobuf enum value: APPROVAL_TASK_STATUS_EXPIRED = 4;
|
|
362
|
+
*/
|
|
363
|
+
EXPIRED = 4,
|
|
364
|
+
/**
|
|
365
|
+
* @generated from protobuf enum value: APPROVAL_TASK_STATUS_CANCELLED = 5;
|
|
366
|
+
*/
|
|
367
|
+
CANCELLED = 5,
|
|
368
|
+
/**
|
|
369
|
+
* @generated from protobuf enum value: APPROVAL_TASK_STATUS_COMPLETED = 6;
|
|
370
|
+
*/
|
|
371
|
+
COMPLETED = 6
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* @generated from protobuf enum resources.documents.approval.ApprovalStatus
|
|
375
|
+
*/
|
|
376
|
+
export enum ApprovalStatus {
|
|
377
|
+
/**
|
|
378
|
+
* @generated from protobuf enum value: APPROVAL_STATUS_UNSPECIFIED = 0;
|
|
379
|
+
*/
|
|
380
|
+
UNSPECIFIED = 0,
|
|
381
|
+
/**
|
|
382
|
+
* @generated from protobuf enum value: APPROVAL_STATUS_APPROVED = 1;
|
|
383
|
+
*/
|
|
384
|
+
APPROVED = 1,
|
|
385
|
+
/**
|
|
386
|
+
* @generated from protobuf enum value: APPROVAL_STATUS_DECLINED = 2;
|
|
387
|
+
*/
|
|
388
|
+
DECLINED = 2,
|
|
389
|
+
/**
|
|
390
|
+
* @generated from protobuf enum value: APPROVAL_STATUS_REVOKED = 3;
|
|
391
|
+
*/
|
|
392
|
+
REVOKED = 3
|
|
393
|
+
}
|
|
394
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
395
|
+
class ApprovalPolicy$Type extends MessageType<ApprovalPolicy> {
|
|
396
|
+
constructor() {
|
|
397
|
+
super("resources.documents.approval.ApprovalPolicy", [
|
|
398
|
+
{ no: 3, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
399
|
+
{ no: 4, name: "snapshot_date", kind: "message", T: () => Timestamp },
|
|
400
|
+
{ no: 5, name: "on_edit_behavior", kind: "enum", T: () => ["resources.documents.approval.OnEditBehavior", OnEditBehavior, "ON_EDIT_BEHAVIOR_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
401
|
+
{ no: 6, name: "rule_kind", kind: "enum", T: () => ["resources.documents.approval.ApprovalRuleKind", ApprovalRuleKind, "APPROVAL_RULE_KIND_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
402
|
+
{ no: 7, name: "required_count", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 1 } } } },
|
|
403
|
+
{ no: 8, name: "signature_required", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
404
|
+
{ no: 19, name: "self_approve_allowed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
405
|
+
{ no: 9, name: "assigned_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
406
|
+
{ no: 10, name: "approved_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
407
|
+
{ no: 11, name: "declined_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
408
|
+
{ no: 12, name: "pending_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
409
|
+
{ no: 13, name: "any_declined", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
410
|
+
{ no: 14, name: "started_at", kind: "message", T: () => Timestamp },
|
|
411
|
+
{ no: 15, name: "completed_at", kind: "message", T: () => Timestamp },
|
|
412
|
+
{ no: 16, name: "created_at", kind: "message", T: () => Timestamp },
|
|
413
|
+
{ no: 17, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
414
|
+
{ no: 18, name: "deleted_at", kind: "message", T: () => Timestamp }
|
|
415
|
+
]);
|
|
416
|
+
}
|
|
417
|
+
create(value?: PartialMessage<ApprovalPolicy>): ApprovalPolicy {
|
|
418
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
419
|
+
message.documentId = 0;
|
|
420
|
+
message.onEditBehavior = 0;
|
|
421
|
+
message.ruleKind = 0;
|
|
422
|
+
message.signatureRequired = false;
|
|
423
|
+
message.selfApproveAllowed = false;
|
|
424
|
+
message.assignedCount = 0;
|
|
425
|
+
message.approvedCount = 0;
|
|
426
|
+
message.declinedCount = 0;
|
|
427
|
+
message.pendingCount = 0;
|
|
428
|
+
message.anyDeclined = false;
|
|
429
|
+
if (value !== undefined)
|
|
430
|
+
reflectionMergePartial<ApprovalPolicy>(this, message, value);
|
|
431
|
+
return message;
|
|
432
|
+
}
|
|
433
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ApprovalPolicy): ApprovalPolicy {
|
|
434
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
435
|
+
while (reader.pos < end) {
|
|
436
|
+
let [fieldNo, wireType] = reader.tag();
|
|
437
|
+
switch (fieldNo) {
|
|
438
|
+
case /* int64 document_id */ 3:
|
|
439
|
+
message.documentId = reader.int64().toNumber();
|
|
440
|
+
break;
|
|
441
|
+
case /* resources.timestamp.Timestamp snapshot_date */ 4:
|
|
442
|
+
message.snapshotDate = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.snapshotDate);
|
|
443
|
+
break;
|
|
444
|
+
case /* resources.documents.approval.OnEditBehavior on_edit_behavior */ 5:
|
|
445
|
+
message.onEditBehavior = reader.int32();
|
|
446
|
+
break;
|
|
447
|
+
case /* resources.documents.approval.ApprovalRuleKind rule_kind */ 6:
|
|
448
|
+
message.ruleKind = reader.int32();
|
|
449
|
+
break;
|
|
450
|
+
case /* optional int32 required_count */ 7:
|
|
451
|
+
message.requiredCount = reader.int32();
|
|
452
|
+
break;
|
|
453
|
+
case /* bool signature_required */ 8:
|
|
454
|
+
message.signatureRequired = reader.bool();
|
|
455
|
+
break;
|
|
456
|
+
case /* bool self_approve_allowed */ 19:
|
|
457
|
+
message.selfApproveAllowed = reader.bool();
|
|
458
|
+
break;
|
|
459
|
+
case /* int32 assigned_count */ 9:
|
|
460
|
+
message.assignedCount = reader.int32();
|
|
461
|
+
break;
|
|
462
|
+
case /* int32 approved_count */ 10:
|
|
463
|
+
message.approvedCount = reader.int32();
|
|
464
|
+
break;
|
|
465
|
+
case /* int32 declined_count */ 11:
|
|
466
|
+
message.declinedCount = reader.int32();
|
|
467
|
+
break;
|
|
468
|
+
case /* int32 pending_count */ 12:
|
|
469
|
+
message.pendingCount = reader.int32();
|
|
470
|
+
break;
|
|
471
|
+
case /* bool any_declined */ 13:
|
|
472
|
+
message.anyDeclined = reader.bool();
|
|
473
|
+
break;
|
|
474
|
+
case /* optional resources.timestamp.Timestamp started_at */ 14:
|
|
475
|
+
message.startedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startedAt);
|
|
476
|
+
break;
|
|
477
|
+
case /* optional resources.timestamp.Timestamp completed_at */ 15:
|
|
478
|
+
message.completedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.completedAt);
|
|
479
|
+
break;
|
|
480
|
+
case /* resources.timestamp.Timestamp created_at */ 16:
|
|
481
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
482
|
+
break;
|
|
483
|
+
case /* optional resources.timestamp.Timestamp updated_at */ 17:
|
|
484
|
+
message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
|
|
485
|
+
break;
|
|
486
|
+
case /* optional resources.timestamp.Timestamp deleted_at */ 18:
|
|
487
|
+
message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
|
|
488
|
+
break;
|
|
489
|
+
default:
|
|
490
|
+
let u = options.readUnknownField;
|
|
491
|
+
if (u === "throw")
|
|
492
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
493
|
+
let d = reader.skip(wireType);
|
|
494
|
+
if (u !== false)
|
|
495
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
return message;
|
|
499
|
+
}
|
|
500
|
+
internalBinaryWrite(message: ApprovalPolicy, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
501
|
+
/* int64 document_id = 3; */
|
|
502
|
+
if (message.documentId !== 0)
|
|
503
|
+
writer.tag(3, WireType.Varint).int64(message.documentId);
|
|
504
|
+
/* resources.timestamp.Timestamp snapshot_date = 4; */
|
|
505
|
+
if (message.snapshotDate)
|
|
506
|
+
Timestamp.internalBinaryWrite(message.snapshotDate, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
507
|
+
/* resources.documents.approval.OnEditBehavior on_edit_behavior = 5; */
|
|
508
|
+
if (message.onEditBehavior !== 0)
|
|
509
|
+
writer.tag(5, WireType.Varint).int32(message.onEditBehavior);
|
|
510
|
+
/* resources.documents.approval.ApprovalRuleKind rule_kind = 6; */
|
|
511
|
+
if (message.ruleKind !== 0)
|
|
512
|
+
writer.tag(6, WireType.Varint).int32(message.ruleKind);
|
|
513
|
+
/* optional int32 required_count = 7; */
|
|
514
|
+
if (message.requiredCount !== undefined)
|
|
515
|
+
writer.tag(7, WireType.Varint).int32(message.requiredCount);
|
|
516
|
+
/* bool signature_required = 8; */
|
|
517
|
+
if (message.signatureRequired !== false)
|
|
518
|
+
writer.tag(8, WireType.Varint).bool(message.signatureRequired);
|
|
519
|
+
/* int32 assigned_count = 9; */
|
|
520
|
+
if (message.assignedCount !== 0)
|
|
521
|
+
writer.tag(9, WireType.Varint).int32(message.assignedCount);
|
|
522
|
+
/* int32 approved_count = 10; */
|
|
523
|
+
if (message.approvedCount !== 0)
|
|
524
|
+
writer.tag(10, WireType.Varint).int32(message.approvedCount);
|
|
525
|
+
/* int32 declined_count = 11; */
|
|
526
|
+
if (message.declinedCount !== 0)
|
|
527
|
+
writer.tag(11, WireType.Varint).int32(message.declinedCount);
|
|
528
|
+
/* int32 pending_count = 12; */
|
|
529
|
+
if (message.pendingCount !== 0)
|
|
530
|
+
writer.tag(12, WireType.Varint).int32(message.pendingCount);
|
|
531
|
+
/* bool any_declined = 13; */
|
|
532
|
+
if (message.anyDeclined !== false)
|
|
533
|
+
writer.tag(13, WireType.Varint).bool(message.anyDeclined);
|
|
534
|
+
/* optional resources.timestamp.Timestamp started_at = 14; */
|
|
535
|
+
if (message.startedAt)
|
|
536
|
+
Timestamp.internalBinaryWrite(message.startedAt, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
|
537
|
+
/* optional resources.timestamp.Timestamp completed_at = 15; */
|
|
538
|
+
if (message.completedAt)
|
|
539
|
+
Timestamp.internalBinaryWrite(message.completedAt, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
540
|
+
/* resources.timestamp.Timestamp created_at = 16; */
|
|
541
|
+
if (message.createdAt)
|
|
542
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(16, WireType.LengthDelimited).fork(), options).join();
|
|
543
|
+
/* optional resources.timestamp.Timestamp updated_at = 17; */
|
|
544
|
+
if (message.updatedAt)
|
|
545
|
+
Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
|
|
546
|
+
/* optional resources.timestamp.Timestamp deleted_at = 18; */
|
|
547
|
+
if (message.deletedAt)
|
|
548
|
+
Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
|
|
549
|
+
/* bool self_approve_allowed = 19; */
|
|
550
|
+
if (message.selfApproveAllowed !== false)
|
|
551
|
+
writer.tag(19, WireType.Varint).bool(message.selfApproveAllowed);
|
|
552
|
+
let u = options.writeUnknownFields;
|
|
553
|
+
if (u !== false)
|
|
554
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
555
|
+
return writer;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* @generated MessageType for protobuf message resources.documents.approval.ApprovalPolicy
|
|
560
|
+
*/
|
|
561
|
+
export const ApprovalPolicy = new ApprovalPolicy$Type();
|
|
562
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
563
|
+
class ApprovalTask$Type extends MessageType<ApprovalTask> {
|
|
564
|
+
constructor() {
|
|
565
|
+
super("resources.documents.approval.ApprovalTask", [
|
|
566
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
567
|
+
{ no: 3, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
568
|
+
{ no: 4, name: "snapshot_date", kind: "message", T: () => Timestamp },
|
|
569
|
+
{ no: 5, name: "assignee_kind", kind: "enum", T: () => ["resources.documents.approval.ApprovalAssigneeKind", ApprovalAssigneeKind, "APPROVAL_ASSIGNEE_KIND_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
570
|
+
{ no: 6, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
571
|
+
{ no: 7, name: "user", kind: "message", T: () => UserShort },
|
|
572
|
+
{ no: 8, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
573
|
+
{ no: 9, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
574
|
+
{ no: 10, name: "minimum_grade", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
575
|
+
{ no: 11, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
576
|
+
{ no: 12, name: "label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "120" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
|
|
577
|
+
{ no: 13, name: "signature_required", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
578
|
+
{ no: 14, name: "slot_no", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { lte: 5, gte: 1 } } } },
|
|
579
|
+
{ no: 15, name: "status", kind: "enum", T: () => ["resources.documents.approval.ApprovalTaskStatus", ApprovalTaskStatus, "APPROVAL_TASK_STATUS_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
580
|
+
{ no: 16, name: "comment", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
581
|
+
{ no: 17, name: "created_at", kind: "message", T: () => Timestamp },
|
|
582
|
+
{ no: 18, name: "completed_at", kind: "message", T: () => Timestamp },
|
|
583
|
+
{ no: 19, name: "due_at", kind: "message", T: () => Timestamp },
|
|
584
|
+
{ no: 20, name: "decision_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
585
|
+
{ no: 21, name: "approval_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
586
|
+
{ no: 22, name: "creator_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
587
|
+
{ no: 23, name: "creator", kind: "message", T: () => UserShort },
|
|
588
|
+
{ no: 24, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
|
|
589
|
+
{ no: 25, name: "creator_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
590
|
+
{ no: 26, name: "document", kind: "message", T: () => DocumentShort }
|
|
591
|
+
]);
|
|
592
|
+
}
|
|
593
|
+
create(value?: PartialMessage<ApprovalTask>): ApprovalTask {
|
|
594
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
595
|
+
message.id = 0;
|
|
596
|
+
message.documentId = 0;
|
|
597
|
+
message.assigneeKind = 0;
|
|
598
|
+
message.signatureRequired = false;
|
|
599
|
+
message.slotNo = 0;
|
|
600
|
+
message.status = 0;
|
|
601
|
+
message.decisionCount = 0;
|
|
602
|
+
message.creatorId = 0;
|
|
603
|
+
message.creatorJob = "";
|
|
604
|
+
if (value !== undefined)
|
|
605
|
+
reflectionMergePartial<ApprovalTask>(this, message, value);
|
|
606
|
+
return message;
|
|
607
|
+
}
|
|
608
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ApprovalTask): ApprovalTask {
|
|
609
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
610
|
+
while (reader.pos < end) {
|
|
611
|
+
let [fieldNo, wireType] = reader.tag();
|
|
612
|
+
switch (fieldNo) {
|
|
613
|
+
case /* int64 id */ 1:
|
|
614
|
+
message.id = reader.int64().toNumber();
|
|
615
|
+
break;
|
|
616
|
+
case /* int64 document_id */ 3:
|
|
617
|
+
message.documentId = reader.int64().toNumber();
|
|
618
|
+
break;
|
|
619
|
+
case /* resources.timestamp.Timestamp snapshot_date */ 4:
|
|
620
|
+
message.snapshotDate = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.snapshotDate);
|
|
621
|
+
break;
|
|
622
|
+
case /* resources.documents.approval.ApprovalAssigneeKind assignee_kind */ 5:
|
|
623
|
+
message.assigneeKind = reader.int32();
|
|
624
|
+
break;
|
|
625
|
+
case /* optional int32 user_id */ 6:
|
|
626
|
+
message.userId = reader.int32();
|
|
627
|
+
break;
|
|
628
|
+
case /* optional resources.users.short.UserShort user */ 7:
|
|
629
|
+
message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
|
|
630
|
+
break;
|
|
631
|
+
case /* optional string job */ 8:
|
|
632
|
+
message.job = reader.string();
|
|
633
|
+
break;
|
|
634
|
+
case /* optional string job_label */ 9:
|
|
635
|
+
message.jobLabel = reader.string();
|
|
636
|
+
break;
|
|
637
|
+
case /* optional int32 minimum_grade */ 10:
|
|
638
|
+
message.minimumGrade = reader.int32();
|
|
639
|
+
break;
|
|
640
|
+
case /* optional string job_grade_label */ 11:
|
|
641
|
+
message.jobGradeLabel = reader.string();
|
|
642
|
+
break;
|
|
643
|
+
case /* optional string label */ 12:
|
|
644
|
+
message.label = reader.string();
|
|
645
|
+
break;
|
|
646
|
+
case /* bool signature_required */ 13:
|
|
647
|
+
message.signatureRequired = reader.bool();
|
|
648
|
+
break;
|
|
649
|
+
case /* int32 slot_no */ 14:
|
|
650
|
+
message.slotNo = reader.int32();
|
|
651
|
+
break;
|
|
652
|
+
case /* resources.documents.approval.ApprovalTaskStatus status */ 15:
|
|
653
|
+
message.status = reader.int32();
|
|
654
|
+
break;
|
|
655
|
+
case /* optional string comment */ 16:
|
|
656
|
+
message.comment = reader.string();
|
|
657
|
+
break;
|
|
658
|
+
case /* resources.timestamp.Timestamp created_at */ 17:
|
|
659
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
660
|
+
break;
|
|
661
|
+
case /* optional resources.timestamp.Timestamp completed_at */ 18:
|
|
662
|
+
message.completedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.completedAt);
|
|
663
|
+
break;
|
|
664
|
+
case /* optional resources.timestamp.Timestamp due_at */ 19:
|
|
665
|
+
message.dueAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.dueAt);
|
|
666
|
+
break;
|
|
667
|
+
case /* int32 decision_count */ 20:
|
|
668
|
+
message.decisionCount = reader.int32();
|
|
669
|
+
break;
|
|
670
|
+
case /* optional int64 approval_id */ 21:
|
|
671
|
+
message.approvalId = reader.int64().toNumber();
|
|
672
|
+
break;
|
|
673
|
+
case /* int32 creator_id */ 22:
|
|
674
|
+
message.creatorId = reader.int32();
|
|
675
|
+
break;
|
|
676
|
+
case /* optional resources.users.short.UserShort creator */ 23:
|
|
677
|
+
message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
|
|
678
|
+
break;
|
|
679
|
+
case /* string creator_job */ 24:
|
|
680
|
+
message.creatorJob = reader.string();
|
|
681
|
+
break;
|
|
682
|
+
case /* optional string creator_job_label */ 25:
|
|
683
|
+
message.creatorJobLabel = reader.string();
|
|
684
|
+
break;
|
|
685
|
+
case /* optional resources.documents.DocumentShort document */ 26:
|
|
686
|
+
message.document = DocumentShort.internalBinaryRead(reader, reader.uint32(), options, message.document);
|
|
687
|
+
break;
|
|
688
|
+
default:
|
|
689
|
+
let u = options.readUnknownField;
|
|
690
|
+
if (u === "throw")
|
|
691
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
692
|
+
let d = reader.skip(wireType);
|
|
693
|
+
if (u !== false)
|
|
694
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
return message;
|
|
698
|
+
}
|
|
699
|
+
internalBinaryWrite(message: ApprovalTask, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
700
|
+
/* int64 id = 1; */
|
|
701
|
+
if (message.id !== 0)
|
|
702
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
703
|
+
/* int64 document_id = 3; */
|
|
704
|
+
if (message.documentId !== 0)
|
|
705
|
+
writer.tag(3, WireType.Varint).int64(message.documentId);
|
|
706
|
+
/* resources.timestamp.Timestamp snapshot_date = 4; */
|
|
707
|
+
if (message.snapshotDate)
|
|
708
|
+
Timestamp.internalBinaryWrite(message.snapshotDate, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
709
|
+
/* resources.documents.approval.ApprovalAssigneeKind assignee_kind = 5; */
|
|
710
|
+
if (message.assigneeKind !== 0)
|
|
711
|
+
writer.tag(5, WireType.Varint).int32(message.assigneeKind);
|
|
712
|
+
/* optional int32 user_id = 6; */
|
|
713
|
+
if (message.userId !== undefined)
|
|
714
|
+
writer.tag(6, WireType.Varint).int32(message.userId);
|
|
715
|
+
/* optional resources.users.short.UserShort user = 7; */
|
|
716
|
+
if (message.user)
|
|
717
|
+
UserShort.internalBinaryWrite(message.user, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
718
|
+
/* optional string job = 8; */
|
|
719
|
+
if (message.job !== undefined)
|
|
720
|
+
writer.tag(8, WireType.LengthDelimited).string(message.job);
|
|
721
|
+
/* optional string job_label = 9; */
|
|
722
|
+
if (message.jobLabel !== undefined)
|
|
723
|
+
writer.tag(9, WireType.LengthDelimited).string(message.jobLabel);
|
|
724
|
+
/* optional int32 minimum_grade = 10; */
|
|
725
|
+
if (message.minimumGrade !== undefined)
|
|
726
|
+
writer.tag(10, WireType.Varint).int32(message.minimumGrade);
|
|
727
|
+
/* optional string job_grade_label = 11; */
|
|
728
|
+
if (message.jobGradeLabel !== undefined)
|
|
729
|
+
writer.tag(11, WireType.LengthDelimited).string(message.jobGradeLabel);
|
|
730
|
+
/* optional string label = 12; */
|
|
731
|
+
if (message.label !== undefined)
|
|
732
|
+
writer.tag(12, WireType.LengthDelimited).string(message.label);
|
|
733
|
+
/* bool signature_required = 13; */
|
|
734
|
+
if (message.signatureRequired !== false)
|
|
735
|
+
writer.tag(13, WireType.Varint).bool(message.signatureRequired);
|
|
736
|
+
/* int32 slot_no = 14; */
|
|
737
|
+
if (message.slotNo !== 0)
|
|
738
|
+
writer.tag(14, WireType.Varint).int32(message.slotNo);
|
|
739
|
+
/* resources.documents.approval.ApprovalTaskStatus status = 15; */
|
|
740
|
+
if (message.status !== 0)
|
|
741
|
+
writer.tag(15, WireType.Varint).int32(message.status);
|
|
742
|
+
/* optional string comment = 16; */
|
|
743
|
+
if (message.comment !== undefined)
|
|
744
|
+
writer.tag(16, WireType.LengthDelimited).string(message.comment);
|
|
745
|
+
/* resources.timestamp.Timestamp created_at = 17; */
|
|
746
|
+
if (message.createdAt)
|
|
747
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
|
|
748
|
+
/* optional resources.timestamp.Timestamp completed_at = 18; */
|
|
749
|
+
if (message.completedAt)
|
|
750
|
+
Timestamp.internalBinaryWrite(message.completedAt, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
|
|
751
|
+
/* optional resources.timestamp.Timestamp due_at = 19; */
|
|
752
|
+
if (message.dueAt)
|
|
753
|
+
Timestamp.internalBinaryWrite(message.dueAt, writer.tag(19, WireType.LengthDelimited).fork(), options).join();
|
|
754
|
+
/* int32 decision_count = 20; */
|
|
755
|
+
if (message.decisionCount !== 0)
|
|
756
|
+
writer.tag(20, WireType.Varint).int32(message.decisionCount);
|
|
757
|
+
/* optional int64 approval_id = 21; */
|
|
758
|
+
if (message.approvalId !== undefined)
|
|
759
|
+
writer.tag(21, WireType.Varint).int64(message.approvalId);
|
|
760
|
+
/* int32 creator_id = 22; */
|
|
761
|
+
if (message.creatorId !== 0)
|
|
762
|
+
writer.tag(22, WireType.Varint).int32(message.creatorId);
|
|
763
|
+
/* optional resources.users.short.UserShort creator = 23; */
|
|
764
|
+
if (message.creator)
|
|
765
|
+
UserShort.internalBinaryWrite(message.creator, writer.tag(23, WireType.LengthDelimited).fork(), options).join();
|
|
766
|
+
/* string creator_job = 24; */
|
|
767
|
+
if (message.creatorJob !== "")
|
|
768
|
+
writer.tag(24, WireType.LengthDelimited).string(message.creatorJob);
|
|
769
|
+
/* optional string creator_job_label = 25; */
|
|
770
|
+
if (message.creatorJobLabel !== undefined)
|
|
771
|
+
writer.tag(25, WireType.LengthDelimited).string(message.creatorJobLabel);
|
|
772
|
+
/* optional resources.documents.DocumentShort document = 26; */
|
|
773
|
+
if (message.document)
|
|
774
|
+
DocumentShort.internalBinaryWrite(message.document, writer.tag(26, WireType.LengthDelimited).fork(), options).join();
|
|
775
|
+
let u = options.writeUnknownFields;
|
|
776
|
+
if (u !== false)
|
|
777
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
778
|
+
return writer;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* @generated MessageType for protobuf message resources.documents.approval.ApprovalTask
|
|
783
|
+
*/
|
|
784
|
+
export const ApprovalTask = new ApprovalTask$Type();
|
|
785
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
786
|
+
class Approval$Type extends MessageType<Approval> {
|
|
787
|
+
constructor() {
|
|
788
|
+
super("resources.documents.approval.Approval", [
|
|
789
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
790
|
+
{ no: 3, name: "document_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
791
|
+
{ no: 4, name: "snapshot_date", kind: "message", T: () => Timestamp },
|
|
792
|
+
{ no: 5, name: "task_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
793
|
+
{ no: 6, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
794
|
+
{ no: 7, name: "user", kind: "message", T: () => UserShort },
|
|
795
|
+
{ no: 8, name: "user_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
796
|
+
{ no: 9, name: "user_job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
797
|
+
{ no: 10, name: "user_grade", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
|
|
798
|
+
{ no: 11, name: "user_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
799
|
+
{ no: 12, name: "payload_svg", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "codegen.sanitizer.sanitizer": { enabled: true, method: "SanitizeSVG" } } },
|
|
800
|
+
{ no: 13, name: "stamp_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
801
|
+
{ no: 14, name: "stamp", kind: "message", T: () => Stamp },
|
|
802
|
+
{ no: 15, name: "status", kind: "enum", T: () => ["resources.documents.approval.ApprovalStatus", ApprovalStatus, "APPROVAL_STATUS_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
|
|
803
|
+
{ no: 16, name: "comment", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "500" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
|
|
804
|
+
{ no: 17, name: "created_at", kind: "message", T: () => Timestamp },
|
|
805
|
+
{ no: 18, name: "revoked_at", kind: "message", T: () => Timestamp }
|
|
806
|
+
]);
|
|
807
|
+
}
|
|
808
|
+
create(value?: PartialMessage<Approval>): Approval {
|
|
809
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
810
|
+
message.id = 0;
|
|
811
|
+
message.documentId = 0;
|
|
812
|
+
message.status = 0;
|
|
813
|
+
if (value !== undefined)
|
|
814
|
+
reflectionMergePartial<Approval>(this, message, value);
|
|
815
|
+
return message;
|
|
816
|
+
}
|
|
817
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Approval): Approval {
|
|
818
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
819
|
+
while (reader.pos < end) {
|
|
820
|
+
let [fieldNo, wireType] = reader.tag();
|
|
821
|
+
switch (fieldNo) {
|
|
822
|
+
case /* int64 id */ 1:
|
|
823
|
+
message.id = reader.int64().toNumber();
|
|
824
|
+
break;
|
|
825
|
+
case /* int64 document_id */ 3:
|
|
826
|
+
message.documentId = reader.int64().toNumber();
|
|
827
|
+
break;
|
|
828
|
+
case /* resources.timestamp.Timestamp snapshot_date */ 4:
|
|
829
|
+
message.snapshotDate = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.snapshotDate);
|
|
830
|
+
break;
|
|
831
|
+
case /* optional int64 task_id */ 5:
|
|
832
|
+
message.taskId = reader.int64().toNumber();
|
|
833
|
+
break;
|
|
834
|
+
case /* optional int32 user_id */ 6:
|
|
835
|
+
message.userId = reader.int32();
|
|
836
|
+
break;
|
|
837
|
+
case /* optional resources.users.short.UserShort user */ 7:
|
|
838
|
+
message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
|
|
839
|
+
break;
|
|
840
|
+
case /* optional string user_job */ 8:
|
|
841
|
+
message.userJob = reader.string();
|
|
842
|
+
break;
|
|
843
|
+
case /* optional string user_job_label */ 9:
|
|
844
|
+
message.userJobLabel = reader.string();
|
|
845
|
+
break;
|
|
846
|
+
case /* optional int32 user_grade */ 10:
|
|
847
|
+
message.userGrade = reader.int32();
|
|
848
|
+
break;
|
|
849
|
+
case /* optional string user_grade_label */ 11:
|
|
850
|
+
message.userGradeLabel = reader.string();
|
|
851
|
+
break;
|
|
852
|
+
case /* optional string payload_svg */ 12:
|
|
853
|
+
message.payloadSvg = reader.string();
|
|
854
|
+
break;
|
|
855
|
+
case /* optional int64 stamp_id */ 13:
|
|
856
|
+
message.stampId = reader.int64().toNumber();
|
|
857
|
+
break;
|
|
858
|
+
case /* optional resources.documents.stamps.Stamp stamp */ 14:
|
|
859
|
+
message.stamp = Stamp.internalBinaryRead(reader, reader.uint32(), options, message.stamp);
|
|
860
|
+
break;
|
|
861
|
+
case /* resources.documents.approval.ApprovalStatus status */ 15:
|
|
862
|
+
message.status = reader.int32();
|
|
863
|
+
break;
|
|
864
|
+
case /* optional string comment */ 16:
|
|
865
|
+
message.comment = reader.string();
|
|
866
|
+
break;
|
|
867
|
+
case /* resources.timestamp.Timestamp created_at */ 17:
|
|
868
|
+
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
869
|
+
break;
|
|
870
|
+
case /* optional resources.timestamp.Timestamp revoked_at */ 18:
|
|
871
|
+
message.revokedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.revokedAt);
|
|
872
|
+
break;
|
|
873
|
+
default:
|
|
874
|
+
let u = options.readUnknownField;
|
|
875
|
+
if (u === "throw")
|
|
876
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
877
|
+
let d = reader.skip(wireType);
|
|
878
|
+
if (u !== false)
|
|
879
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
return message;
|
|
883
|
+
}
|
|
884
|
+
internalBinaryWrite(message: Approval, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
885
|
+
/* int64 id = 1; */
|
|
886
|
+
if (message.id !== 0)
|
|
887
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
888
|
+
/* int64 document_id = 3; */
|
|
889
|
+
if (message.documentId !== 0)
|
|
890
|
+
writer.tag(3, WireType.Varint).int64(message.documentId);
|
|
891
|
+
/* resources.timestamp.Timestamp snapshot_date = 4; */
|
|
892
|
+
if (message.snapshotDate)
|
|
893
|
+
Timestamp.internalBinaryWrite(message.snapshotDate, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
894
|
+
/* optional int64 task_id = 5; */
|
|
895
|
+
if (message.taskId !== undefined)
|
|
896
|
+
writer.tag(5, WireType.Varint).int64(message.taskId);
|
|
897
|
+
/* optional int32 user_id = 6; */
|
|
898
|
+
if (message.userId !== undefined)
|
|
899
|
+
writer.tag(6, WireType.Varint).int32(message.userId);
|
|
900
|
+
/* optional resources.users.short.UserShort user = 7; */
|
|
901
|
+
if (message.user)
|
|
902
|
+
UserShort.internalBinaryWrite(message.user, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
903
|
+
/* optional string user_job = 8; */
|
|
904
|
+
if (message.userJob !== undefined)
|
|
905
|
+
writer.tag(8, WireType.LengthDelimited).string(message.userJob);
|
|
906
|
+
/* optional string user_job_label = 9; */
|
|
907
|
+
if (message.userJobLabel !== undefined)
|
|
908
|
+
writer.tag(9, WireType.LengthDelimited).string(message.userJobLabel);
|
|
909
|
+
/* optional int32 user_grade = 10; */
|
|
910
|
+
if (message.userGrade !== undefined)
|
|
911
|
+
writer.tag(10, WireType.Varint).int32(message.userGrade);
|
|
912
|
+
/* optional string user_grade_label = 11; */
|
|
913
|
+
if (message.userGradeLabel !== undefined)
|
|
914
|
+
writer.tag(11, WireType.LengthDelimited).string(message.userGradeLabel);
|
|
915
|
+
/* optional string payload_svg = 12; */
|
|
916
|
+
if (message.payloadSvg !== undefined)
|
|
917
|
+
writer.tag(12, WireType.LengthDelimited).string(message.payloadSvg);
|
|
918
|
+
/* optional int64 stamp_id = 13; */
|
|
919
|
+
if (message.stampId !== undefined)
|
|
920
|
+
writer.tag(13, WireType.Varint).int64(message.stampId);
|
|
921
|
+
/* optional resources.documents.stamps.Stamp stamp = 14; */
|
|
922
|
+
if (message.stamp)
|
|
923
|
+
Stamp.internalBinaryWrite(message.stamp, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
|
924
|
+
/* resources.documents.approval.ApprovalStatus status = 15; */
|
|
925
|
+
if (message.status !== 0)
|
|
926
|
+
writer.tag(15, WireType.Varint).int32(message.status);
|
|
927
|
+
/* optional string comment = 16; */
|
|
928
|
+
if (message.comment !== undefined)
|
|
929
|
+
writer.tag(16, WireType.LengthDelimited).string(message.comment);
|
|
930
|
+
/* resources.timestamp.Timestamp created_at = 17; */
|
|
931
|
+
if (message.createdAt)
|
|
932
|
+
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
|
|
933
|
+
/* optional resources.timestamp.Timestamp revoked_at = 18; */
|
|
934
|
+
if (message.revokedAt)
|
|
935
|
+
Timestamp.internalBinaryWrite(message.revokedAt, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
|
|
936
|
+
let u = options.writeUnknownFields;
|
|
937
|
+
if (u !== false)
|
|
938
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
939
|
+
return writer;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* @generated MessageType for protobuf message resources.documents.approval.Approval
|
|
944
|
+
*/
|
|
945
|
+
export const Approval = new Approval$Type();
|