@kernhq/module-hr 0.15.0 → 0.17.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/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +1 -0
- package/dist/contract/index.js.map +1 -1
- package/dist/contract/models.d.ts +1 -0
- package/dist/contract/models.d.ts.map +1 -1
- package/dist/contract/models.js +15 -0
- package/dist/contract/models.js.map +1 -1
- package/dist/contract/permissions.d.ts +8 -0
- package/dist/contract/permissions.d.ts.map +1 -1
- package/dist/contract/permissions.js +20 -0
- package/dist/contract/permissions.js.map +1 -1
- package/dist/contract/privacy.d.ts +860 -0
- package/dist/contract/privacy.d.ts.map +1 -0
- package/dist/contract/privacy.js +412 -0
- package/dist/contract/privacy.js.map +1 -0
- package/dist/contract/router.d.ts +815 -0
- package/dist/contract/router.d.ts.map +1 -1
- package/dist/contract/router.js +105 -0
- package/dist/contract/router.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +51 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/jobs.d.ts.map +1 -1
- package/dist/server/jobs.js +44 -7
- package/dist/server/jobs.js.map +1 -1
- package/dist/server/router.d.ts +994 -1
- package/dist/server/router.d.ts.map +1 -1
- package/dist/server/router.js +766 -282
- package/dist/server/router.js.map +1 -1
- package/dist/server/schema.d.ts +397 -1
- package/dist/server/schema.d.ts.map +1 -1
- package/dist/server/schema.js +109 -0
- package/dist/server/schema.js.map +1 -1
- package/dist/server/services/audit.d.ts +249 -0
- package/dist/server/services/audit.d.ts.map +1 -0
- package/dist/server/services/audit.js +230 -0
- package/dist/server/services/audit.js.map +1 -0
- package/dist/server/services/people.d.ts +53 -1
- package/dist/server/services/people.d.ts.map +1 -1
- package/dist/server/services/people.js +74 -1
- package/dist/server/services/people.js.map +1 -1
- package/dist/server/services/privacy.d.ts +514 -0
- package/dist/server/services/privacy.d.ts.map +1 -0
- package/dist/server/services/privacy.js +972 -0
- package/dist/server/services/privacy.js.map +1 -0
- package/migrations/0011_privacy.sql +77 -0
- package/migrations/meta/0011_snapshot.json +4450 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/src/client/messages.ts +17 -0
- package/src/client/widgets/ApprovalsWidget.svelte +119 -8
- package/src/contract/index.ts +1 -0
- package/src/contract/models.ts +15 -0
- package/src/contract/permissions.ts +22 -0
- package/src/contract/privacy.ts +452 -0
- package/src/contract/router.ts +121 -0
|
@@ -0,0 +1,860 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The classes retention is expressed in.
|
|
4
|
+
*
|
|
5
|
+
* They follow the redact/retain split rather than the table list, because that is the split a
|
|
6
|
+
* retention decision is actually made in: "how long do we keep the evidence behind a day sheet" is
|
|
7
|
+
* one question whatever tables it lands in.
|
|
8
|
+
*/
|
|
9
|
+
export declare const RetentionClass: z.ZodEnum<{
|
|
10
|
+
leave: "leave";
|
|
11
|
+
punchDetail: "punchDetail";
|
|
12
|
+
punches: "punches";
|
|
13
|
+
attendanceDays: "attendanceDays";
|
|
14
|
+
personHistory: "personHistory";
|
|
15
|
+
personDocuments: "personDocuments";
|
|
16
|
+
terminatedPeople: "terminatedPeople";
|
|
17
|
+
sensitiveAccessLog: "sensitiveAccessLog";
|
|
18
|
+
}>;
|
|
19
|
+
export type RetentionClass = z.infer<typeof RetentionClass>;
|
|
20
|
+
/**
|
|
21
|
+
* How long HR keeps each class, per workspace.
|
|
22
|
+
*
|
|
23
|
+
* A table rather than module settings, and the reason is mechanical: `core.settings.setModule`
|
|
24
|
+
* validates the merged blob against the module's declared zod schema and a zod object strips what it
|
|
25
|
+
* does not declare — so a retention key stored beside `country` and `employeeNumberPrefix` would be
|
|
26
|
+
* deleted by the next unrelated settings write, silently, from a screen that never mentions
|
|
27
|
+
* retention. Extending `HrSettings` instead is the other honest route and is a change to a shared
|
|
28
|
+
* shape; this one keeps the numbers where nothing can quietly drop them.
|
|
29
|
+
*
|
|
30
|
+
* Workspace-wide for now. The honest end state is per legal entity — a Dutch entity and a Turkish
|
|
31
|
+
* one have different obligations, which is exactly why `periods` is already per legal entity — and
|
|
32
|
+
* the row carries a jsonb config so that move is an added column rather than a new table.
|
|
33
|
+
*/
|
|
34
|
+
export declare const HrRetention: z.ZodObject<{
|
|
35
|
+
punchDetail: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
36
|
+
punches: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
37
|
+
attendanceDays: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
38
|
+
leave: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
39
|
+
personHistory: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
40
|
+
personDocuments: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
41
|
+
terminatedPeople: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
42
|
+
sensitiveAccessLog: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type HrRetention = z.infer<typeof HrRetention>;
|
|
45
|
+
/** One class, its horizon, and what has already passed it. */
|
|
46
|
+
export declare const RetentionClassState: z.ZodObject<{
|
|
47
|
+
class: z.ZodEnum<{
|
|
48
|
+
leave: "leave";
|
|
49
|
+
punchDetail: "punchDetail";
|
|
50
|
+
punches: "punches";
|
|
51
|
+
attendanceDays: "attendanceDays";
|
|
52
|
+
personHistory: "personHistory";
|
|
53
|
+
personDocuments: "personDocuments";
|
|
54
|
+
terminatedPeople: "terminatedPeople";
|
|
55
|
+
sensitiveAccessLog: "sensitiveAccessLog";
|
|
56
|
+
}>;
|
|
57
|
+
days: z.ZodNullable<z.ZodNumber>;
|
|
58
|
+
dueNow: z.ZodNullable<z.ZodNumber>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export type RetentionClassState = z.infer<typeof RetentionClassState>;
|
|
61
|
+
export declare const RetentionSettings: z.ZodObject<{
|
|
62
|
+
classes: z.ZodArray<z.ZodObject<{
|
|
63
|
+
class: z.ZodEnum<{
|
|
64
|
+
leave: "leave";
|
|
65
|
+
punchDetail: "punchDetail";
|
|
66
|
+
punches: "punches";
|
|
67
|
+
attendanceDays: "attendanceDays";
|
|
68
|
+
personHistory: "personHistory";
|
|
69
|
+
personDocuments: "personDocuments";
|
|
70
|
+
terminatedPeople: "terminatedPeople";
|
|
71
|
+
sensitiveAccessLog: "sensitiveAccessLog";
|
|
72
|
+
}>;
|
|
73
|
+
days: z.ZodNullable<z.ZodNumber>;
|
|
74
|
+
dueNow: z.ZodNullable<z.ZodNumber>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
updatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
77
|
+
updatedBy: z.ZodNullable<z.ZodUUID>;
|
|
78
|
+
sweepEnabled: z.ZodLiteral<false>;
|
|
79
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export type RetentionSettings = z.infer<typeof RetentionSettings>;
|
|
82
|
+
/** The units erasure reports in. One per group of columns that survive or go together. */
|
|
83
|
+
export declare const ErasureClass: z.ZodEnum<{
|
|
84
|
+
sensitive: "sensitive";
|
|
85
|
+
employment: "employment";
|
|
86
|
+
approvals: "approvals";
|
|
87
|
+
attendance: "attendance";
|
|
88
|
+
documents: "documents";
|
|
89
|
+
punches: "punches";
|
|
90
|
+
identity: "identity";
|
|
91
|
+
history: "history";
|
|
92
|
+
leaveRequests: "leaveRequests";
|
|
93
|
+
leaveLedger: "leaveLedger";
|
|
94
|
+
officeAssignments: "officeAssignments";
|
|
95
|
+
approvalDecisions: "approvalDecisions";
|
|
96
|
+
regularizations: "regularizations";
|
|
97
|
+
delegations: "delegations";
|
|
98
|
+
headship: "headship";
|
|
99
|
+
}>;
|
|
100
|
+
export type ErasureClass = z.infer<typeof ErasureClass>;
|
|
101
|
+
/** A class the erasure cleared, and exactly which columns it cleared. */
|
|
102
|
+
export declare const ErasureRedaction: z.ZodObject<{
|
|
103
|
+
class: z.ZodEnum<{
|
|
104
|
+
sensitive: "sensitive";
|
|
105
|
+
employment: "employment";
|
|
106
|
+
approvals: "approvals";
|
|
107
|
+
attendance: "attendance";
|
|
108
|
+
documents: "documents";
|
|
109
|
+
punches: "punches";
|
|
110
|
+
identity: "identity";
|
|
111
|
+
history: "history";
|
|
112
|
+
leaveRequests: "leaveRequests";
|
|
113
|
+
leaveLedger: "leaveLedger";
|
|
114
|
+
officeAssignments: "officeAssignments";
|
|
115
|
+
approvalDecisions: "approvalDecisions";
|
|
116
|
+
regularizations: "regularizations";
|
|
117
|
+
delegations: "delegations";
|
|
118
|
+
headship: "headship";
|
|
119
|
+
}>;
|
|
120
|
+
table: z.ZodString;
|
|
121
|
+
rows: z.ZodNumber;
|
|
122
|
+
columns: z.ZodArray<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type ErasureRedaction = z.infer<typeof ErasureRedaction>;
|
|
125
|
+
/**
|
|
126
|
+
* Why a record survived an erasure.
|
|
127
|
+
*
|
|
128
|
+
* An enum rather than a sentence: a reason composed on the server is English for every reader, and
|
|
129
|
+
* this one is read by the person who asked to be forgotten. The client renders it.
|
|
130
|
+
*/
|
|
131
|
+
export declare const RetentionBasis: z.ZodEnum<{
|
|
132
|
+
payRecord: "payRecord";
|
|
133
|
+
auditTrail: "auditTrail";
|
|
134
|
+
retentionHorizon: "retentionHorizon";
|
|
135
|
+
notRemovable: "notRemovable";
|
|
136
|
+
anotherPersonsRecord: "anotherPersonsRecord";
|
|
137
|
+
}>;
|
|
138
|
+
export type RetentionBasis = z.infer<typeof RetentionBasis>;
|
|
139
|
+
export declare const ErasureRetained: z.ZodObject<{
|
|
140
|
+
class: z.ZodEnum<{
|
|
141
|
+
sensitive: "sensitive";
|
|
142
|
+
employment: "employment";
|
|
143
|
+
approvals: "approvals";
|
|
144
|
+
attendance: "attendance";
|
|
145
|
+
documents: "documents";
|
|
146
|
+
punches: "punches";
|
|
147
|
+
identity: "identity";
|
|
148
|
+
history: "history";
|
|
149
|
+
leaveRequests: "leaveRequests";
|
|
150
|
+
leaveLedger: "leaveLedger";
|
|
151
|
+
officeAssignments: "officeAssignments";
|
|
152
|
+
approvalDecisions: "approvalDecisions";
|
|
153
|
+
regularizations: "regularizations";
|
|
154
|
+
delegations: "delegations";
|
|
155
|
+
headship: "headship";
|
|
156
|
+
}>;
|
|
157
|
+
table: z.ZodString;
|
|
158
|
+
rows: z.ZodNumber;
|
|
159
|
+
basis: z.ZodEnum<{
|
|
160
|
+
payRecord: "payRecord";
|
|
161
|
+
auditTrail: "auditTrail";
|
|
162
|
+
retentionHorizon: "retentionHorizon";
|
|
163
|
+
notRemovable: "notRemovable";
|
|
164
|
+
anotherPersonsRecord: "anotherPersonsRecord";
|
|
165
|
+
}>;
|
|
166
|
+
retentionDays: z.ZodNullable<z.ZodNumber>;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
export type ErasureRetained = z.infer<typeof ErasureRetained>;
|
|
169
|
+
/**
|
|
170
|
+
* Things the response has to state in words, as keys the client renders.
|
|
171
|
+
*
|
|
172
|
+
* Each one is a promise this module would otherwise be making and not keeping.
|
|
173
|
+
*/
|
|
174
|
+
export declare const ErasureCaveat: z.ZodEnum<{
|
|
175
|
+
documentFilesRemain: "documentFilesRemain";
|
|
176
|
+
photoFileOrphaned: "photoFileOrphaned";
|
|
177
|
+
leaveDocumentFilesRemain: "leaveDocumentFilesRemain";
|
|
178
|
+
nationalIdKeptForAudit: "nationalIdKeptForAudit";
|
|
179
|
+
actorHistoryKept: "actorHistoryKept";
|
|
180
|
+
lockedPeriodUntouched: "lockedPeriodUntouched";
|
|
181
|
+
}>;
|
|
182
|
+
export type ErasureCaveat = z.infer<typeof ErasureCaveat>;
|
|
183
|
+
/**
|
|
184
|
+
* What an erasure did, or would do.
|
|
185
|
+
*
|
|
186
|
+
* The same shape either way, because a preview computed differently from the thing it previews is a
|
|
187
|
+
* preview that eventually lies — the rule `accrual.preview` is written under.
|
|
188
|
+
*/
|
|
189
|
+
export declare const ErasureReport: z.ZodObject<{
|
|
190
|
+
personId: z.ZodUUID;
|
|
191
|
+
dryRun: z.ZodBoolean;
|
|
192
|
+
erasedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
193
|
+
displayName: z.ZodString;
|
|
194
|
+
redacted: z.ZodArray<z.ZodObject<{
|
|
195
|
+
class: z.ZodEnum<{
|
|
196
|
+
sensitive: "sensitive";
|
|
197
|
+
employment: "employment";
|
|
198
|
+
approvals: "approvals";
|
|
199
|
+
attendance: "attendance";
|
|
200
|
+
documents: "documents";
|
|
201
|
+
punches: "punches";
|
|
202
|
+
identity: "identity";
|
|
203
|
+
history: "history";
|
|
204
|
+
leaveRequests: "leaveRequests";
|
|
205
|
+
leaveLedger: "leaveLedger";
|
|
206
|
+
officeAssignments: "officeAssignments";
|
|
207
|
+
approvalDecisions: "approvalDecisions";
|
|
208
|
+
regularizations: "regularizations";
|
|
209
|
+
delegations: "delegations";
|
|
210
|
+
headship: "headship";
|
|
211
|
+
}>;
|
|
212
|
+
table: z.ZodString;
|
|
213
|
+
rows: z.ZodNumber;
|
|
214
|
+
columns: z.ZodArray<z.ZodString>;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
kept: z.ZodArray<z.ZodObject<{
|
|
217
|
+
class: z.ZodEnum<{
|
|
218
|
+
sensitive: "sensitive";
|
|
219
|
+
employment: "employment";
|
|
220
|
+
approvals: "approvals";
|
|
221
|
+
attendance: "attendance";
|
|
222
|
+
documents: "documents";
|
|
223
|
+
punches: "punches";
|
|
224
|
+
identity: "identity";
|
|
225
|
+
history: "history";
|
|
226
|
+
leaveRequests: "leaveRequests";
|
|
227
|
+
leaveLedger: "leaveLedger";
|
|
228
|
+
officeAssignments: "officeAssignments";
|
|
229
|
+
approvalDecisions: "approvalDecisions";
|
|
230
|
+
regularizations: "regularizations";
|
|
231
|
+
delegations: "delegations";
|
|
232
|
+
headship: "headship";
|
|
233
|
+
}>;
|
|
234
|
+
table: z.ZodString;
|
|
235
|
+
rows: z.ZodNumber;
|
|
236
|
+
basis: z.ZodEnum<{
|
|
237
|
+
payRecord: "payRecord";
|
|
238
|
+
auditTrail: "auditTrail";
|
|
239
|
+
retentionHorizon: "retentionHorizon";
|
|
240
|
+
notRemovable: "notRemovable";
|
|
241
|
+
anotherPersonsRecord: "anotherPersonsRecord";
|
|
242
|
+
}>;
|
|
243
|
+
retentionDays: z.ZodNullable<z.ZodNumber>;
|
|
244
|
+
}, z.core.$strip>>;
|
|
245
|
+
caveats: z.ZodArray<z.ZodEnum<{
|
|
246
|
+
documentFilesRemain: "documentFilesRemain";
|
|
247
|
+
photoFileOrphaned: "photoFileOrphaned";
|
|
248
|
+
leaveDocumentFilesRemain: "leaveDocumentFilesRemain";
|
|
249
|
+
nationalIdKeptForAudit: "nationalIdKeptForAudit";
|
|
250
|
+
actorHistoryKept: "actorHistoryKept";
|
|
251
|
+
lockedPeriodUntouched: "lockedPeriodUntouched";
|
|
252
|
+
}>>;
|
|
253
|
+
filesRemaining: z.ZodArray<z.ZodUUID>;
|
|
254
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
export type ErasureReport = z.infer<typeof ErasureReport>;
|
|
257
|
+
/**
|
|
258
|
+
* How a sensitive record was reached.
|
|
259
|
+
*
|
|
260
|
+
* Derived from the principal, never taken from the caller — a client-supplied value is one the
|
|
261
|
+
* reader controls, and this log exists to say what happened rather than what the reader claimed.
|
|
262
|
+
* `export` is the exception and is not reachable from a request: it is passed by the one server-side
|
|
263
|
+
* path that takes a bulk copy of a record, which is `privacy.subjectAccess`.
|
|
264
|
+
*
|
|
265
|
+
* There is no `mcp` and no `service`, and both omissions are the same rule rather than an oversight.
|
|
266
|
+
* Core's MCP proxy forwards a plain bearer token, so an assistant's read arrives as an ordinary
|
|
267
|
+
* `kind: 'user'` principal that nothing here can honestly tell from a browser; and a service
|
|
268
|
+
* principal carries no user id at all, so the read is refused before a row is built. A value nothing
|
|
269
|
+
* can ever write is the same lie as a permission key nothing asks about. See `services/audit.ts`.
|
|
270
|
+
*/
|
|
271
|
+
export declare const SensitiveAccessVia: z.ZodEnum<{
|
|
272
|
+
ui: "ui";
|
|
273
|
+
api: "api";
|
|
274
|
+
export: "export";
|
|
275
|
+
}>;
|
|
276
|
+
export type SensitiveAccessVia = z.infer<typeof SensitiveAccessVia>;
|
|
277
|
+
/**
|
|
278
|
+
* One read of somebody's identity, birth date or bank details.
|
|
279
|
+
*
|
|
280
|
+
* Written in the same transaction as the read, in HR's own schema. `mod_core.activity_events` also
|
|
281
|
+
* gets a best-effort copy so the workspace's single audit console shows that HR sensitive data was
|
|
282
|
+
* touched — but it cannot be the record, for two reasons: it is read behind `core.audit.view`,
|
|
283
|
+
* which owners and admins hold by default and `hr.person.view_sensitive` deliberately nobody does,
|
|
284
|
+
* so publishing the read there inverts the model the sensitive split exists to create; and the
|
|
285
|
+
* cross-service call is allowed to fail, which is right for a notification and wrong for evidence.
|
|
286
|
+
* A subject-access response that answers "who looked at my data" out of a log with silent holes is
|
|
287
|
+
* worse than one that says it cannot answer.
|
|
288
|
+
*/
|
|
289
|
+
export declare const SensitiveAccess: z.ZodObject<{
|
|
290
|
+
id: z.ZodUUID;
|
|
291
|
+
personId: z.ZodUUID;
|
|
292
|
+
actorUserId: z.ZodUUID;
|
|
293
|
+
actorPersonId: z.ZodNullable<z.ZodUUID>;
|
|
294
|
+
fields: z.ZodArray<z.ZodString>;
|
|
295
|
+
purpose: z.ZodNullable<z.ZodString>;
|
|
296
|
+
via: z.ZodEnum<{
|
|
297
|
+
ui: "ui";
|
|
298
|
+
api: "api";
|
|
299
|
+
export: "export";
|
|
300
|
+
}>;
|
|
301
|
+
at: z.ZodISODateTime;
|
|
302
|
+
}, z.core.$strip>;
|
|
303
|
+
export type SensitiveAccess = z.infer<typeof SensitiveAccess>;
|
|
304
|
+
/** `person_history`, with the values. Redacting it in a subject's own bundle defeats the purpose. */
|
|
305
|
+
export declare const PersonHistoryEntry: z.ZodObject<{
|
|
306
|
+
id: z.ZodUUID;
|
|
307
|
+
field: z.ZodString;
|
|
308
|
+
from: z.ZodUnknown;
|
|
309
|
+
to: z.ZodUnknown;
|
|
310
|
+
at: z.ZodISODateTime;
|
|
311
|
+
actorId: z.ZodNullable<z.ZodUUID>;
|
|
312
|
+
source: z.ZodString;
|
|
313
|
+
}, z.core.$strip>;
|
|
314
|
+
export type PersonHistoryEntry = z.infer<typeof PersonHistoryEntry>;
|
|
315
|
+
/** A request exploded into days — what the balance was actually charged for. */
|
|
316
|
+
export declare const LeaveRequestDay: z.ZodObject<{
|
|
317
|
+
id: z.ZodUUID;
|
|
318
|
+
requestId: z.ZodUUID;
|
|
319
|
+
date: z.ZodISODate;
|
|
320
|
+
fraction: z.ZodNumber;
|
|
321
|
+
counted: z.ZodBoolean;
|
|
322
|
+
status: z.ZodString;
|
|
323
|
+
}, z.core.$strip>;
|
|
324
|
+
export type LeaveRequestDay = z.infer<typeof LeaveRequestDay>;
|
|
325
|
+
/** A section that hit the row cap. Named, with its numbers, so nothing is short by surprise. */
|
|
326
|
+
export declare const BundleTruncation: z.ZodObject<{
|
|
327
|
+
section: z.ZodString;
|
|
328
|
+
returned: z.ZodNumber;
|
|
329
|
+
cap: z.ZodNumber;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
/** Something this bundle does not contain, and why. */
|
|
332
|
+
export declare const BundleExclusion: z.ZodObject<{
|
|
333
|
+
section: z.ZodString;
|
|
334
|
+
reason: z.ZodEnum<{
|
|
335
|
+
fileContentsNotExportable: "fileContentsNotExportable";
|
|
336
|
+
notRequested: "notRequested";
|
|
337
|
+
}>;
|
|
338
|
+
}, z.core.$strip>;
|
|
339
|
+
export declare const SubjectAccessManifest: z.ZodObject<{
|
|
340
|
+
personId: z.ZodUUID;
|
|
341
|
+
generatedAt: z.ZodISODateTime;
|
|
342
|
+
generatedBy: z.ZodNullable<z.ZodUUID>;
|
|
343
|
+
moduleVersion: z.ZodString;
|
|
344
|
+
truncated: z.ZodArray<z.ZodObject<{
|
|
345
|
+
section: z.ZodString;
|
|
346
|
+
returned: z.ZodNumber;
|
|
347
|
+
cap: z.ZodNumber;
|
|
348
|
+
}, z.core.$strip>>;
|
|
349
|
+
excluded: z.ZodArray<z.ZodObject<{
|
|
350
|
+
section: z.ZodString;
|
|
351
|
+
reason: z.ZodEnum<{
|
|
352
|
+
fileContentsNotExportable: "fileContentsNotExportable";
|
|
353
|
+
notRequested: "notRequested";
|
|
354
|
+
}>;
|
|
355
|
+
}, z.core.$strip>>;
|
|
356
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
export type SubjectAccessManifest = z.infer<typeof SubjectAccessManifest>;
|
|
359
|
+
/**
|
|
360
|
+
* Everything HR holds about one person, including the parts they cannot reach through the product.
|
|
361
|
+
*
|
|
362
|
+
* Structured JSON rather than a zip of files, and one person at a time. Both are deliberate:
|
|
363
|
+
*
|
|
364
|
+
* - **The rows are not the problem; documents are.** Five years of four punches a day is about nine
|
|
365
|
+
* thousand rows and two to three megabytes — large for a response and bounded. A contract PDF,
|
|
366
|
+
* three payslips a year and an identity scan has no upper bound at all, which is why the file
|
|
367
|
+
* bytes are named in `manifest.excluded` instead of being streamed through a request handler.
|
|
368
|
+
* Every section is capped and every cap that bites is named in `manifest.truncated`.
|
|
369
|
+
* - **There is no workspace-wide variant, and there will not be.** Five hundred people is two and a
|
|
370
|
+
* half million rows with decrypted bank details in flight. `personId` is required and there is no
|
|
371
|
+
* filter.
|
|
372
|
+
*
|
|
373
|
+
* `sensitive` is decrypted here, which makes this the most dangerous object the module produces —
|
|
374
|
+
* so producing it writes a `sensitive_access_log` row with `via: 'export'` before it is returned. An
|
|
375
|
+
* export is a bulk read of that record, not a smaller one.
|
|
376
|
+
*/
|
|
377
|
+
export declare const SubjectAccessBundle: z.ZodObject<{
|
|
378
|
+
manifest: z.ZodObject<{
|
|
379
|
+
personId: z.ZodUUID;
|
|
380
|
+
generatedAt: z.ZodISODateTime;
|
|
381
|
+
generatedBy: z.ZodNullable<z.ZodUUID>;
|
|
382
|
+
moduleVersion: z.ZodString;
|
|
383
|
+
truncated: z.ZodArray<z.ZodObject<{
|
|
384
|
+
section: z.ZodString;
|
|
385
|
+
returned: z.ZodNumber;
|
|
386
|
+
cap: z.ZodNumber;
|
|
387
|
+
}, z.core.$strip>>;
|
|
388
|
+
excluded: z.ZodArray<z.ZodObject<{
|
|
389
|
+
section: z.ZodString;
|
|
390
|
+
reason: z.ZodEnum<{
|
|
391
|
+
fileContentsNotExportable: "fileContentsNotExportable";
|
|
392
|
+
notRequested: "notRequested";
|
|
393
|
+
}>;
|
|
394
|
+
}, z.core.$strip>>;
|
|
395
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
396
|
+
}, z.core.$strip>;
|
|
397
|
+
person: z.ZodObject<{
|
|
398
|
+
userId: z.ZodNullable<z.ZodUUID>;
|
|
399
|
+
employeeNo: z.ZodNullable<z.ZodString>;
|
|
400
|
+
displayName: z.ZodString;
|
|
401
|
+
workEmail: z.ZodNullable<z.ZodEmail>;
|
|
402
|
+
personalEmail: z.ZodNullable<z.ZodEmail>;
|
|
403
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
404
|
+
photoFileId: z.ZodNullable<z.ZodUUID>;
|
|
405
|
+
status: z.ZodEnum<{
|
|
406
|
+
onboarding: "onboarding";
|
|
407
|
+
active: "active";
|
|
408
|
+
on_leave: "on_leave";
|
|
409
|
+
offboarding: "offboarding";
|
|
410
|
+
terminated: "terminated";
|
|
411
|
+
}>;
|
|
412
|
+
hiredOn: z.ZodNullable<z.ZodISODate>;
|
|
413
|
+
terminatedOn: z.ZodNullable<z.ZodISODate>;
|
|
414
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
415
|
+
custom: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
416
|
+
personnelHidden: z.ZodDefault<z.ZodBoolean>;
|
|
417
|
+
erasedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
418
|
+
createdAt: z.ZodISODateTime;
|
|
419
|
+
updatedAt: z.ZodISODateTime;
|
|
420
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
421
|
+
id: z.ZodUUID;
|
|
422
|
+
}, z.core.$strip>;
|
|
423
|
+
sensitive: z.ZodObject<{
|
|
424
|
+
nationalId: z.ZodNullable<z.ZodString>;
|
|
425
|
+
birthDate: z.ZodNullable<z.ZodISODate>;
|
|
426
|
+
iban: z.ZodNullable<z.ZodString>;
|
|
427
|
+
emergencyContact: z.ZodNullable<z.ZodObject<{
|
|
428
|
+
name: z.ZodString;
|
|
429
|
+
relationship: z.ZodOptional<z.ZodString>;
|
|
430
|
+
phone: z.ZodString;
|
|
431
|
+
}, z.core.$strip>>;
|
|
432
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
433
|
+
personId: z.ZodUUID;
|
|
434
|
+
}, z.core.$strip>;
|
|
435
|
+
employment: z.ZodArray<z.ZodObject<{
|
|
436
|
+
personId: z.ZodUUID;
|
|
437
|
+
effectiveFrom: z.ZodISODate;
|
|
438
|
+
effectiveTo: z.ZodNullable<z.ZodISODate>;
|
|
439
|
+
orgUnitId: z.ZodNullable<z.ZodUUID>;
|
|
440
|
+
positionId: z.ZodNullable<z.ZodUUID>;
|
|
441
|
+
legalEntityId: z.ZodNullable<z.ZodUUID>;
|
|
442
|
+
costCenterId: z.ZodNullable<z.ZodUUID>;
|
|
443
|
+
managerPersonId: z.ZodNullable<z.ZodUUID>;
|
|
444
|
+
employmentType: z.ZodEnum<{
|
|
445
|
+
full_time: "full_time";
|
|
446
|
+
part_time: "part_time";
|
|
447
|
+
contract: "contract";
|
|
448
|
+
intern: "intern";
|
|
449
|
+
temporary: "temporary";
|
|
450
|
+
freelance: "freelance";
|
|
451
|
+
}>;
|
|
452
|
+
fte: z.ZodNumber;
|
|
453
|
+
contractHoursWeek: z.ZodNullable<z.ZodNumber>;
|
|
454
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
455
|
+
createdAt: z.ZodISODateTime;
|
|
456
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
457
|
+
id: z.ZodUUID;
|
|
458
|
+
}, z.core.$strip>>;
|
|
459
|
+
offices: z.ZodArray<z.ZodObject<{
|
|
460
|
+
personId: z.ZodUUID;
|
|
461
|
+
officeId: z.ZodUUID;
|
|
462
|
+
isPrimary: z.ZodBoolean;
|
|
463
|
+
effectiveFrom: z.ZodISODate;
|
|
464
|
+
effectiveTo: z.ZodNullable<z.ZodISODate>;
|
|
465
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
466
|
+
createdAt: z.ZodISODateTime;
|
|
467
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
468
|
+
id: z.ZodUUID;
|
|
469
|
+
}, z.core.$strip>>;
|
|
470
|
+
history: z.ZodArray<z.ZodObject<{
|
|
471
|
+
id: z.ZodUUID;
|
|
472
|
+
field: z.ZodString;
|
|
473
|
+
from: z.ZodUnknown;
|
|
474
|
+
to: z.ZodUnknown;
|
|
475
|
+
at: z.ZodISODateTime;
|
|
476
|
+
actorId: z.ZodNullable<z.ZodUUID>;
|
|
477
|
+
source: z.ZodString;
|
|
478
|
+
}, z.core.$strip>>;
|
|
479
|
+
documents: z.ZodArray<z.ZodObject<{
|
|
480
|
+
personId: z.ZodUUID;
|
|
481
|
+
fileId: z.ZodUUID;
|
|
482
|
+
name: z.ZodString;
|
|
483
|
+
kind: z.ZodString;
|
|
484
|
+
issuedOn: z.ZodNullable<z.ZodISODate>;
|
|
485
|
+
expiresOn: z.ZodNullable<z.ZodISODate>;
|
|
486
|
+
uploadedBy: z.ZodNullable<z.ZodUUID>;
|
|
487
|
+
createdAt: z.ZodISODateTime;
|
|
488
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
489
|
+
id: z.ZodUUID;
|
|
490
|
+
}, z.core.$strip>>;
|
|
491
|
+
leave: z.ZodObject<{
|
|
492
|
+
types: z.ZodArray<z.ZodObject<{
|
|
493
|
+
key: z.ZodString;
|
|
494
|
+
name: z.ZodString;
|
|
495
|
+
paid: z.ZodBoolean;
|
|
496
|
+
unit: z.ZodEnum<{
|
|
497
|
+
half_day: "half_day";
|
|
498
|
+
day: "day";
|
|
499
|
+
hour: "hour";
|
|
500
|
+
}>;
|
|
501
|
+
color: z.ZodNullable<z.ZodString>;
|
|
502
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
503
|
+
requiresDocumentAfterDays: z.ZodNullable<z.ZodNumber>;
|
|
504
|
+
countsWorkingDaysOnly: z.ZodBoolean;
|
|
505
|
+
allowNegative: z.ZodBoolean;
|
|
506
|
+
maxNegativeMinutes: z.ZodNumber;
|
|
507
|
+
order: z.ZodNumber;
|
|
508
|
+
archivedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
509
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
510
|
+
id: z.ZodUUID;
|
|
511
|
+
}, z.core.$strip>>;
|
|
512
|
+
requests: z.ZodArray<z.ZodObject<{
|
|
513
|
+
personId: z.ZodUUID;
|
|
514
|
+
leaveTypeId: z.ZodUUID;
|
|
515
|
+
startsOn: z.ZodISODate;
|
|
516
|
+
endsOn: z.ZodISODate;
|
|
517
|
+
startPart: z.ZodEnum<{
|
|
518
|
+
full: "full";
|
|
519
|
+
morning: "morning";
|
|
520
|
+
afternoon: "afternoon";
|
|
521
|
+
}>;
|
|
522
|
+
endPart: z.ZodEnum<{
|
|
523
|
+
full: "full";
|
|
524
|
+
morning: "morning";
|
|
525
|
+
afternoon: "afternoon";
|
|
526
|
+
}>;
|
|
527
|
+
hours: z.ZodNullable<z.ZodNumber>;
|
|
528
|
+
workingDays: z.ZodNumber;
|
|
529
|
+
minutes: z.ZodNumber;
|
|
530
|
+
status: z.ZodEnum<{
|
|
531
|
+
pending: "pending";
|
|
532
|
+
approved: "approved";
|
|
533
|
+
rejected: "rejected";
|
|
534
|
+
cancelled: "cancelled";
|
|
535
|
+
draft: "draft";
|
|
536
|
+
withdrawn: "withdrawn";
|
|
537
|
+
}>;
|
|
538
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
539
|
+
documentFileId: z.ZodNullable<z.ZodUUID>;
|
|
540
|
+
approvalRequestId: z.ZodNullable<z.ZodUUID>;
|
|
541
|
+
decidedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
542
|
+
createdAt: z.ZodISODateTime;
|
|
543
|
+
updatedAt: z.ZodISODateTime;
|
|
544
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
545
|
+
id: z.ZodUUID;
|
|
546
|
+
}, z.core.$strip>>;
|
|
547
|
+
days: z.ZodArray<z.ZodObject<{
|
|
548
|
+
id: z.ZodUUID;
|
|
549
|
+
requestId: z.ZodUUID;
|
|
550
|
+
date: z.ZodISODate;
|
|
551
|
+
fraction: z.ZodNumber;
|
|
552
|
+
counted: z.ZodBoolean;
|
|
553
|
+
status: z.ZodString;
|
|
554
|
+
}, z.core.$strip>>;
|
|
555
|
+
ledger: z.ZodArray<z.ZodObject<{
|
|
556
|
+
personId: z.ZodUUID;
|
|
557
|
+
leaveTypeId: z.ZodUUID;
|
|
558
|
+
kind: z.ZodEnum<{
|
|
559
|
+
grant: "grant";
|
|
560
|
+
accrual: "accrual";
|
|
561
|
+
consumption: "consumption";
|
|
562
|
+
reversal: "reversal";
|
|
563
|
+
expiry: "expiry";
|
|
564
|
+
adjustment: "adjustment";
|
|
565
|
+
carry_in: "carry_in";
|
|
566
|
+
carry_out: "carry_out";
|
|
567
|
+
encashment: "encashment";
|
|
568
|
+
}>;
|
|
569
|
+
amountMinutes: z.ZodNumber;
|
|
570
|
+
effectiveOn: z.ZodISODate;
|
|
571
|
+
periodYear: z.ZodNumber;
|
|
572
|
+
requestId: z.ZodNullable<z.ZodUUID>;
|
|
573
|
+
reversesEntryId: z.ZodNullable<z.ZodUUID>;
|
|
574
|
+
policyHash: z.ZodNullable<z.ZodString>;
|
|
575
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
576
|
+
createdBy: z.ZodNullable<z.ZodUUID>;
|
|
577
|
+
createdAt: z.ZodISODateTime;
|
|
578
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
579
|
+
id: z.ZodUUID;
|
|
580
|
+
}, z.core.$strip>>;
|
|
581
|
+
closingBalanceMinutes: z.ZodNumber;
|
|
582
|
+
}, z.core.$strip>;
|
|
583
|
+
attendance: z.ZodObject<{
|
|
584
|
+
punches: z.ZodArray<z.ZodObject<{
|
|
585
|
+
personId: z.ZodUUID;
|
|
586
|
+
direction: z.ZodEnum<{
|
|
587
|
+
out: "out";
|
|
588
|
+
in: "in";
|
|
589
|
+
break_start: "break_start";
|
|
590
|
+
break_end: "break_end";
|
|
591
|
+
}>;
|
|
592
|
+
at: z.ZodISODateTime;
|
|
593
|
+
clientReportedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
594
|
+
skewMs: z.ZodNullable<z.ZodNumber>;
|
|
595
|
+
businessDate: z.ZodISODate;
|
|
596
|
+
timezone: z.ZodString;
|
|
597
|
+
method: z.ZodEnum<{
|
|
598
|
+
web: "web";
|
|
599
|
+
mobile: "mobile";
|
|
600
|
+
kiosk: "kiosk";
|
|
601
|
+
qr: "qr";
|
|
602
|
+
device: "device";
|
|
603
|
+
import: "import";
|
|
604
|
+
manual: "manual";
|
|
605
|
+
auto: "auto";
|
|
606
|
+
}>;
|
|
607
|
+
officeId: z.ZodNullable<z.ZodUUID>;
|
|
608
|
+
deviceId: z.ZodNullable<z.ZodUUID>;
|
|
609
|
+
geo: z.ZodNullable<z.ZodObject<{
|
|
610
|
+
lat: z.ZodNumber;
|
|
611
|
+
lng: z.ZodNumber;
|
|
612
|
+
accuracyM: z.ZodOptional<z.ZodNumber>;
|
|
613
|
+
}, z.core.$strip>>;
|
|
614
|
+
trust: z.ZodEnum<{
|
|
615
|
+
trusted: "trusted";
|
|
616
|
+
claimed: "claimed";
|
|
617
|
+
disputed: "disputed";
|
|
618
|
+
}>;
|
|
619
|
+
voidedByPunchId: z.ZodNullable<z.ZodUUID>;
|
|
620
|
+
note: z.ZodNullable<z.ZodString>;
|
|
621
|
+
createdAt: z.ZodISODateTime;
|
|
622
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
623
|
+
id: z.ZodUUID;
|
|
624
|
+
}, z.core.$strip>>;
|
|
625
|
+
days: z.ZodArray<z.ZodObject<{
|
|
626
|
+
personId: z.ZodUUID;
|
|
627
|
+
businessDate: z.ZodISODate;
|
|
628
|
+
scheduledMinutes: z.ZodNumber;
|
|
629
|
+
workedMinutes: z.ZodNumber;
|
|
630
|
+
breakMinutes: z.ZodNumber;
|
|
631
|
+
overtimeMinutes: z.ZodNumber;
|
|
632
|
+
beyondCapMinutes: z.ZodNullable<z.ZodNumber>;
|
|
633
|
+
lateMinutes: z.ZodNumber;
|
|
634
|
+
earlyLeaveMinutes: z.ZodNumber;
|
|
635
|
+
status: z.ZodEnum<{
|
|
636
|
+
leave: "leave";
|
|
637
|
+
pending: "pending";
|
|
638
|
+
present: "present";
|
|
639
|
+
absent: "absent";
|
|
640
|
+
holiday: "holiday";
|
|
641
|
+
weekend: "weekend";
|
|
642
|
+
partial: "partial";
|
|
643
|
+
}>;
|
|
644
|
+
leaveRequestId: z.ZodNullable<z.ZodUUID>;
|
|
645
|
+
anomalies: z.ZodArray<z.ZodString>;
|
|
646
|
+
firstIn: z.ZodNullable<z.ZodISODateTime>;
|
|
647
|
+
lastOut: z.ZodNullable<z.ZodISODateTime>;
|
|
648
|
+
policyHash: z.ZodNullable<z.ZodString>;
|
|
649
|
+
locked: z.ZodBoolean;
|
|
650
|
+
computedAt: z.ZodISODateTime;
|
|
651
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
652
|
+
id: z.ZodUUID;
|
|
653
|
+
}, z.core.$strip>>;
|
|
654
|
+
}, z.core.$strip>;
|
|
655
|
+
regularizations: z.ZodArray<z.ZodObject<{
|
|
656
|
+
personId: z.ZodUUID;
|
|
657
|
+
businessDate: z.ZodISODate;
|
|
658
|
+
punchId: z.ZodNullable<z.ZodUUID>;
|
|
659
|
+
proposed: z.ZodArray<z.ZodObject<{
|
|
660
|
+
direction: z.ZodEnum<{
|
|
661
|
+
out: "out";
|
|
662
|
+
in: "in";
|
|
663
|
+
break_start: "break_start";
|
|
664
|
+
break_end: "break_end";
|
|
665
|
+
}>;
|
|
666
|
+
at: z.ZodISODateTime;
|
|
667
|
+
}, z.core.$strip>>;
|
|
668
|
+
reason: z.ZodString;
|
|
669
|
+
status: z.ZodEnum<{
|
|
670
|
+
pending: "pending";
|
|
671
|
+
approved: "approved";
|
|
672
|
+
rejected: "rejected";
|
|
673
|
+
cancelled: "cancelled";
|
|
674
|
+
}>;
|
|
675
|
+
approvalRequestId: z.ZodNullable<z.ZodUUID>;
|
|
676
|
+
appliedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
677
|
+
createdAt: z.ZodISODateTime;
|
|
678
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
679
|
+
id: z.ZodUUID;
|
|
680
|
+
}, z.core.$strip>>;
|
|
681
|
+
approvals: z.ZodObject<{
|
|
682
|
+
raised: z.ZodArray<z.ZodObject<{
|
|
683
|
+
subjectType: z.ZodEnum<{
|
|
684
|
+
leave: "leave";
|
|
685
|
+
regularization: "regularization";
|
|
686
|
+
overtime: "overtime";
|
|
687
|
+
timesheet: "timesheet";
|
|
688
|
+
shift_swap: "shift_swap";
|
|
689
|
+
}>;
|
|
690
|
+
subjectId: z.ZodUUID;
|
|
691
|
+
summary: z.ZodString;
|
|
692
|
+
summaryParams: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
693
|
+
status: z.ZodEnum<{
|
|
694
|
+
pending: "pending";
|
|
695
|
+
approved: "approved";
|
|
696
|
+
rejected: "rejected";
|
|
697
|
+
cancelled: "cancelled";
|
|
698
|
+
}>;
|
|
699
|
+
currentStep: z.ZodNumber;
|
|
700
|
+
requestedBy: z.ZodNullable<z.ZodUUID>;
|
|
701
|
+
requesterPersonId: z.ZodNullable<z.ZodUUID>;
|
|
702
|
+
requesterName: z.ZodNullable<z.ZodString>;
|
|
703
|
+
requestedAt: z.ZodISODateTime;
|
|
704
|
+
decidedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
705
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
706
|
+
id: z.ZodUUID;
|
|
707
|
+
requestId: z.ZodUUID;
|
|
708
|
+
stepIndex: z.ZodNumber;
|
|
709
|
+
name: z.ZodString;
|
|
710
|
+
mode: z.ZodEnum<{
|
|
711
|
+
any: "any";
|
|
712
|
+
all: "all";
|
|
713
|
+
quorum: "quorum";
|
|
714
|
+
}>;
|
|
715
|
+
minApprovals: z.ZodNumber;
|
|
716
|
+
approverIds: z.ZodArray<z.ZodUUID>;
|
|
717
|
+
status: z.ZodEnum<{
|
|
718
|
+
pending: "pending";
|
|
719
|
+
approved: "approved";
|
|
720
|
+
rejected: "rejected";
|
|
721
|
+
cancelled: "cancelled";
|
|
722
|
+
}>;
|
|
723
|
+
dueAt: z.ZodNullable<z.ZodISODateTime>;
|
|
724
|
+
escalatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
725
|
+
decisions: z.ZodArray<z.ZodObject<{
|
|
726
|
+
id: z.ZodUUID;
|
|
727
|
+
stepId: z.ZodUUID;
|
|
728
|
+
approverId: z.ZodUUID;
|
|
729
|
+
onBehalfOfId: z.ZodNullable<z.ZodUUID>;
|
|
730
|
+
decision: z.ZodEnum<{
|
|
731
|
+
approve: "approve";
|
|
732
|
+
reject: "reject";
|
|
733
|
+
}>;
|
|
734
|
+
comment: z.ZodNullable<z.ZodString>;
|
|
735
|
+
at: z.ZodISODateTime;
|
|
736
|
+
}, z.core.$strip>>;
|
|
737
|
+
}, z.core.$strip>>;
|
|
738
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
739
|
+
id: z.ZodUUID;
|
|
740
|
+
}, z.core.$strip>>;
|
|
741
|
+
approverOn: z.ZodArray<z.ZodObject<{
|
|
742
|
+
id: z.ZodUUID;
|
|
743
|
+
requestId: z.ZodUUID;
|
|
744
|
+
stepIndex: z.ZodNumber;
|
|
745
|
+
name: z.ZodString;
|
|
746
|
+
mode: z.ZodEnum<{
|
|
747
|
+
any: "any";
|
|
748
|
+
all: "all";
|
|
749
|
+
quorum: "quorum";
|
|
750
|
+
}>;
|
|
751
|
+
minApprovals: z.ZodNumber;
|
|
752
|
+
approverIds: z.ZodArray<z.ZodUUID>;
|
|
753
|
+
status: z.ZodEnum<{
|
|
754
|
+
pending: "pending";
|
|
755
|
+
approved: "approved";
|
|
756
|
+
rejected: "rejected";
|
|
757
|
+
cancelled: "cancelled";
|
|
758
|
+
}>;
|
|
759
|
+
dueAt: z.ZodNullable<z.ZodISODateTime>;
|
|
760
|
+
escalatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
761
|
+
decisions: z.ZodArray<z.ZodObject<{
|
|
762
|
+
id: z.ZodUUID;
|
|
763
|
+
stepId: z.ZodUUID;
|
|
764
|
+
approverId: z.ZodUUID;
|
|
765
|
+
onBehalfOfId: z.ZodNullable<z.ZodUUID>;
|
|
766
|
+
decision: z.ZodEnum<{
|
|
767
|
+
approve: "approve";
|
|
768
|
+
reject: "reject";
|
|
769
|
+
}>;
|
|
770
|
+
comment: z.ZodNullable<z.ZodString>;
|
|
771
|
+
at: z.ZodISODateTime;
|
|
772
|
+
}, z.core.$strip>>;
|
|
773
|
+
}, z.core.$strip>>;
|
|
774
|
+
decisions: z.ZodArray<z.ZodObject<{
|
|
775
|
+
id: z.ZodUUID;
|
|
776
|
+
stepId: z.ZodUUID;
|
|
777
|
+
approverId: z.ZodUUID;
|
|
778
|
+
onBehalfOfId: z.ZodNullable<z.ZodUUID>;
|
|
779
|
+
decision: z.ZodEnum<{
|
|
780
|
+
approve: "approve";
|
|
781
|
+
reject: "reject";
|
|
782
|
+
}>;
|
|
783
|
+
comment: z.ZodNullable<z.ZodString>;
|
|
784
|
+
at: z.ZodISODateTime;
|
|
785
|
+
}, z.core.$strip>>;
|
|
786
|
+
}, z.core.$strip>;
|
|
787
|
+
delegations: z.ZodObject<{
|
|
788
|
+
given: z.ZodArray<z.ZodObject<{
|
|
789
|
+
fromPersonId: z.ZodUUID;
|
|
790
|
+
toPersonId: z.ZodUUID;
|
|
791
|
+
subjectType: z.ZodNullable<z.ZodEnum<{
|
|
792
|
+
leave: "leave";
|
|
793
|
+
regularization: "regularization";
|
|
794
|
+
overtime: "overtime";
|
|
795
|
+
timesheet: "timesheet";
|
|
796
|
+
shift_swap: "shift_swap";
|
|
797
|
+
}>>;
|
|
798
|
+
startsOn: z.ZodISODate;
|
|
799
|
+
endsOn: z.ZodISODate;
|
|
800
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
801
|
+
createdAt: z.ZodISODateTime;
|
|
802
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
803
|
+
id: z.ZodUUID;
|
|
804
|
+
}, z.core.$strip>>;
|
|
805
|
+
received: z.ZodArray<z.ZodObject<{
|
|
806
|
+
fromPersonId: z.ZodUUID;
|
|
807
|
+
toPersonId: z.ZodUUID;
|
|
808
|
+
subjectType: z.ZodNullable<z.ZodEnum<{
|
|
809
|
+
leave: "leave";
|
|
810
|
+
regularization: "regularization";
|
|
811
|
+
overtime: "overtime";
|
|
812
|
+
timesheet: "timesheet";
|
|
813
|
+
shift_swap: "shift_swap";
|
|
814
|
+
}>>;
|
|
815
|
+
startsOn: z.ZodISODate;
|
|
816
|
+
endsOn: z.ZodISODate;
|
|
817
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
818
|
+
createdAt: z.ZodISODateTime;
|
|
819
|
+
workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
|
|
820
|
+
id: z.ZodUUID;
|
|
821
|
+
}, z.core.$strip>>;
|
|
822
|
+
}, z.core.$strip>;
|
|
823
|
+
policiesInForce: z.ZodArray<z.ZodObject<{
|
|
824
|
+
kind: z.ZodEnum<{
|
|
825
|
+
overtime: "overtime";
|
|
826
|
+
accrual: "accrual";
|
|
827
|
+
carry_forward: "carry_forward";
|
|
828
|
+
rounding: "rounding";
|
|
829
|
+
working_time: "working_time";
|
|
830
|
+
}>;
|
|
831
|
+
policyId: z.ZodNullable<z.ZodUUID>;
|
|
832
|
+
policyName: z.ZodNullable<z.ZodString>;
|
|
833
|
+
config: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
834
|
+
from: z.ZodNullable<z.ZodEnum<{
|
|
835
|
+
person: "person";
|
|
836
|
+
office: "office";
|
|
837
|
+
legal_entity: "legal_entity";
|
|
838
|
+
org_unit: "org_unit";
|
|
839
|
+
position: "position";
|
|
840
|
+
workspace: "workspace";
|
|
841
|
+
}>>;
|
|
842
|
+
fromSubjectId: z.ZodNullable<z.ZodUUID>;
|
|
843
|
+
}, z.core.$strip>>;
|
|
844
|
+
accessLog: z.ZodArray<z.ZodObject<{
|
|
845
|
+
id: z.ZodUUID;
|
|
846
|
+
personId: z.ZodUUID;
|
|
847
|
+
actorUserId: z.ZodUUID;
|
|
848
|
+
actorPersonId: z.ZodNullable<z.ZodUUID>;
|
|
849
|
+
fields: z.ZodArray<z.ZodString>;
|
|
850
|
+
purpose: z.ZodNullable<z.ZodString>;
|
|
851
|
+
via: z.ZodEnum<{
|
|
852
|
+
ui: "ui";
|
|
853
|
+
api: "api";
|
|
854
|
+
export: "export";
|
|
855
|
+
}>;
|
|
856
|
+
at: z.ZodISODateTime;
|
|
857
|
+
}, z.core.$strip>>;
|
|
858
|
+
}, z.core.$strip>;
|
|
859
|
+
export type SubjectAccessBundle = z.infer<typeof SubjectAccessBundle>;
|
|
860
|
+
//# sourceMappingURL=privacy.d.ts.map
|