@kernhq/module-hr 0.18.0 → 0.19.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/capabilities.d.ts.map +1 -1
- package/dist/contract/capabilities.js +26 -0
- package/dist/contract/capabilities.js.map +1 -1
- package/dist/contract/exports.d.ts +459 -0
- package/dist/contract/exports.d.ts.map +1 -0
- package/dist/contract/exports.js +331 -0
- package/dist/contract/exports.js.map +1 -0
- 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/permissions.d.ts +8 -0
- package/dist/contract/permissions.d.ts.map +1 -1
- package/dist/contract/permissions.js +32 -3
- package/dist/contract/permissions.js.map +1 -1
- package/dist/contract/reports.d.ts +4 -0
- package/dist/contract/reports.d.ts.map +1 -1
- package/dist/contract/reports.js +11 -1
- package/dist/contract/reports.js.map +1 -1
- package/dist/contract/router.d.ts +274 -0
- package/dist/contract/router.d.ts.map +1 -1
- package/dist/contract/router.js +67 -0
- package/dist/contract/router.js.map +1 -1
- package/dist/server/router.d.ts +285 -0
- package/dist/server/router.d.ts.map +1 -1
- package/dist/server/router.js +120 -2
- package/dist/server/router.js.map +1 -1
- package/dist/server/services/exports.d.ts +321 -0
- package/dist/server/services/exports.d.ts.map +1 -0
- package/dist/server/services/exports.js +765 -0
- package/dist/server/services/exports.js.map +1 -0
- package/dist/server/services/ledger.d.ts.map +1 -1
- package/dist/server/services/ledger.js +27 -3
- package/dist/server/services/ledger.js.map +1 -1
- package/dist/server/services/reports.d.ts +2 -0
- package/dist/server/services/reports.d.ts.map +1 -1
- package/dist/server/services/reports.js +14 -7
- package/dist/server/services/reports.js.map +1 -1
- package/package.json +1 -1
- package/src/client/messages.ts +13 -0
- package/src/contract/capabilities.ts +26 -0
- package/src/contract/exports.ts +354 -0
- package/src/contract/index.ts +1 -0
- package/src/contract/permissions.ts +34 -3
- package/src/contract/reports.ts +11 -1
- package/src/contract/router.ts +73 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/contract/capabilities.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,cAAc;;;;;;;;
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/contract/capabilities.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,cAAc;;;;;;;;GA0HzB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAA;AAElE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,WAAmB,CAAA;AAChE,eAAO,MAAM,wBAAwB,GAAI,IAAI,MAAM,WAAwB,CAAA;AAE3E;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CA8FpE,CAAA"}
|
|
@@ -129,6 +129,21 @@ export const hrCapabilities = defineCapabilities([
|
|
|
129
129
|
defaultEnabled: false,
|
|
130
130
|
level: 2,
|
|
131
131
|
},
|
|
132
|
+
{
|
|
133
|
+
id: 'payroll_export',
|
|
134
|
+
label: 'Payroll export',
|
|
135
|
+
description: 'Hand a closed period to a payroll provider as CSV, per legal entity',
|
|
136
|
+
// Everything it reads: the day sheet, the periods that say the numbers have stopped moving, and
|
|
137
|
+
// the employment facts under `core`.
|
|
138
|
+
dependsOn: ['core', 'periods', 'attendance'],
|
|
139
|
+
// Off by default, and its own switch rather than riding on the two above — which is the whole
|
|
140
|
+
// argument for it existing. A company can perfectly well clock people in and close its months
|
|
141
|
+
// and still not want every employee's pay basis leaving the building as a file. The permission
|
|
142
|
+
// decides *who* may export; this decides whether the workspace does that at all, and the two
|
|
143
|
+
// answer different questions.
|
|
144
|
+
defaultEnabled: false,
|
|
145
|
+
level: 3,
|
|
146
|
+
},
|
|
132
147
|
]);
|
|
133
148
|
/**
|
|
134
149
|
* The message ids a screen reads a capability's `label` and `description` through.
|
|
@@ -184,6 +199,7 @@ export const hrCapabilityProcedures = {
|
|
|
184
199
|
'calendars.workingDays',
|
|
185
200
|
],
|
|
186
201
|
documents: ['documents.list', 'documents.attach', 'documents.remove'],
|
|
202
|
+
payroll_export: ['payroll.export.v1', 'payroll.export.preview'],
|
|
187
203
|
leave: [
|
|
188
204
|
'leave.types.list',
|
|
189
205
|
'leave.types.create',
|
|
@@ -198,6 +214,9 @@ export const hrCapabilityProcedures = {
|
|
|
198
214
|
'leave.requests.create',
|
|
199
215
|
'leave.requests.cancel',
|
|
200
216
|
'leave.team.calendar',
|
|
217
|
+
// Same reason as the attendance reports above: a balance report in a workspace with no leave is
|
|
218
|
+
// not zero days, it is a question that does not apply.
|
|
219
|
+
'reports.leaveBalance',
|
|
201
220
|
],
|
|
202
221
|
attendance: [
|
|
203
222
|
'attendance.state',
|
|
@@ -216,6 +235,13 @@ export const hrCapabilityProcedures = {
|
|
|
216
235
|
'attendance.schedules.assign',
|
|
217
236
|
'attendance.regularizations.list',
|
|
218
237
|
'attendance.regularizations.request',
|
|
238
|
+
// The three reports built from `attendance_days`. A workspace that never switched attendance on
|
|
239
|
+
// has no day sheet to aggregate, so a report over it would answer zero rather than 404 — which
|
|
240
|
+
// is the shape of lie this map exists to prevent: a number is a worse "not available" than an
|
|
241
|
+
// error, because it looks like an answer.
|
|
242
|
+
'reports.attendance',
|
|
243
|
+
'reports.overtime',
|
|
244
|
+
'reports.absence',
|
|
219
245
|
],
|
|
220
246
|
leave_accrual: [
|
|
221
247
|
'policies.list',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/contract/capabilities.ts"],"names":[],"mappings":"AAAA,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;;GASG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsC;IACvE,OAAO,EAAE;QACP,cAAc;QACd,aAAa;QACb,gBAAgB;QAChB,gBAAgB;QAChB,iBAAiB;QACjB,oBAAoB;QACpB,gBAAgB;QAChB,kBAAkB;QAClB,gBAAgB;KACjB;IACD,cAAc,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,kBAAkB,CAAC;IAC3G,SAAS,EAAE;QACT,gBAAgB;QAChB,eAAe;QACf,kBAAkB;QAClB,kBAAkB;QAClB,mBAAmB;QACnB,qBAAqB;QACrB,oBAAoB;QACpB,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;QACxB,sBAAsB;QACtB,uBAAuB;KACxB;IACD,SAAS,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,CAAC;IACrE,KAAK,EAAE;QACL,kBAAkB;QAClB,oBAAoB;QACpB,oBAAoB;QACpB,qBAAqB;QACrB,mBAAmB;QACnB,mBAAmB;QACnB,cAAc;QACd,qBAAqB;QACrB,oBAAoB;QACpB,yBAAyB;QACzB,uBAAuB;QACvB,uBAAuB;QACvB,qBAAqB;
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/contract/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC;IAC/C;QACE,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,6DAA6D;QAC1E,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,CAAC;KACT;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,+EAA+E;QAC5F,SAAS,EAAE,CAAC,MAAM,CAAC;QACnB,iGAAiG;QACj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AqB;QACrB,iBAAiB;QACjB,aAAa;KACd;IACD,OAAO,EAAE,CAAC,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,CAAC;IAC7E,SAAS,EAAE;QACT,uBAAuB;QACvB,yBAAyB;QACzB,yBAAyB;QACzB,0BAA0B;QAC1B,oBAAoB;QACpB,4BAA4B;QAC5B,uBAAuB;KACxB;CACF,CAAA"}
|
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The payroll handover, and the four rules that make it safe to hand over.
|
|
4
|
+
*
|
|
5
|
+
* Kern does not compute pay. This file carries identity, the period, the employment facts that let a
|
|
6
|
+
* provider pick a rate, and quantities — minutes and days. There is no gross, no net, no hourly rate,
|
|
7
|
+
* no deduction and no currency amount anywhere in it; the moment a column reads as money, Kern is a
|
|
8
|
+
* payroll system and owes the accuracy of one. `OvertimeConfig.rate` says the same thing one file
|
|
9
|
+
* over: a multiplier is a fact about a policy, and multiplying anything by it is somebody else's job.
|
|
10
|
+
*
|
|
11
|
+
* **1. Per legal entity, keyed by (entity, period, person).** A person who transfers mid-period
|
|
12
|
+
* produces two rows, one in each entity's file, each carrying only that entity's days. Two entities
|
|
13
|
+
* in one workspace are two filings, in two currencies, to two authorities, on two closing days —
|
|
14
|
+
* `periods.legal_entity_id` exists for exactly that reason and `PolicyService.isLocked` already
|
|
15
|
+
* answers per entity. So `legalEntityId` is a **required** input rather than an optional slice: there
|
|
16
|
+
* is no "export everything", because that is an invitation to send one provider another entity's
|
|
17
|
+
* people.
|
|
18
|
+
*
|
|
19
|
+
* **2. Two files, not one.** `hours.csv` has a fixed column set. `leave.csv` is long-form — one row
|
|
20
|
+
* per person per leave type — because leave types are workspace data (`leave_types` is keyed on
|
|
21
|
+
* `(workspace_id, key)`), so a wide file with a column per type would have a column set that depends
|
|
22
|
+
* on the customer's own rows, and a column set that depends on customer data cannot be frozen.
|
|
23
|
+
*
|
|
24
|
+
* **3. Frozen, and the version travels in four places.** See {@link PAYROLL_EXPORT_CONTRACT}.
|
|
25
|
+
*
|
|
26
|
+
* **4. Refuse rather than guess.** An open period, an entity with nobody in it, or a person with no
|
|
27
|
+
* employment row covering their days is a refusal with a sentence, never a row of zeros a payroll
|
|
28
|
+
* clerk will pay from. The one escape hatch is `draft`, and a draft stamps itself — in the manifest,
|
|
29
|
+
* in the filename, and in every row's `open_days`.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The contract identity, and **not** the package version.
|
|
33
|
+
*
|
|
34
|
+
* `@kernhq/module-hr` bumps on every patch and every image in an instance carries one
|
|
35
|
+
* `KERN_VERSION`; the CSV shape has to move on its own axis, so this is a hardcoded literal rather
|
|
36
|
+
* than `packageVersion(import.meta.url)`. `kernVersion` sits in the manifest as provenance and is
|
|
37
|
+
* never the contract identity.
|
|
38
|
+
*
|
|
39
|
+
* It travels in four places, each doing a different job:
|
|
40
|
+
*
|
|
41
|
+
* 1. **The procedure and its route** — `payroll.export.v1`, `GET /payroll/export/v1`. A new shape is
|
|
42
|
+
* a new procedure, never a parameter on this one: freezing a branch inside a function three people
|
|
43
|
+
* will edit has never worked, and separate procedures are what make the freeze structural.
|
|
44
|
+
* 2. **The filename** — `kern-payroll-v1_<entity>_2026-06_hours.csv`. The only part that survives
|
|
45
|
+
* being emailed to a bureau and opened by somebody who never saw the API.
|
|
46
|
+
* 3. **The manifest** — `contract: 'kern-payroll-v1'` beside `generatedAt`, `kernVersion` and the
|
|
47
|
+
* report header triple.
|
|
48
|
+
* 4. **Every row**, as the first column. A manifest can be separated from its CSVs and a filename can
|
|
49
|
+
* be changed on the way to a payroll system; a file that has lost both must still be able to say
|
|
50
|
+
* what shape it is. This is a column in the frozen set, **not** a banner row above the header —
|
|
51
|
+
* a version line above the column names breaks every importer that assumes row 1 is the header,
|
|
52
|
+
* which is most of them and all of the spreadsheet ones.
|
|
53
|
+
*
|
|
54
|
+
* What "frozen" forbids, once v1 has shipped: no new column, not even appended at the end; no removed
|
|
55
|
+
* or renamed column; no reordering; no changed emptiness semantics (`beyond_cap_minutes` empty means
|
|
56
|
+
* "no ceiling was in force" and must never start meaning zero); no changed units, so minutes stay
|
|
57
|
+
* minutes and `dayLengthMinutes` stays 480 even if this module later grows a per-workspace working
|
|
58
|
+
* day; and no changed encoding, delimiter, line ending or quoting. A later column is
|
|
59
|
+
* `payroll.export.v2` — a new procedure, a new filename prefix, a new manifest `contract` — shipping
|
|
60
|
+
* alongside v1 with v1 untouched. That is expensive on purpose: the expense is what stops the column
|
|
61
|
+
* set drifting, and a contract nobody pays to change is not frozen.
|
|
62
|
+
*/
|
|
63
|
+
export declare const PAYROLL_EXPORT_CONTRACT = "kern-payroll-v1";
|
|
64
|
+
/**
|
|
65
|
+
* `hours.csv`, in order. **This array is the file format.**
|
|
66
|
+
*
|
|
67
|
+
* Every column exists in the schema today. The quantities come from `attendance_days` and never from
|
|
68
|
+
* `punches`: punches are append-only and a voided punch survives beside its correction, so summing
|
|
69
|
+
* them double-counts every fix ever made. The day sheet is the projection that has already applied
|
|
70
|
+
* the schedule, the calendar and the rounding.
|
|
71
|
+
*
|
|
72
|
+
* Three of these carry a decision rather than a number:
|
|
73
|
+
*
|
|
74
|
+
* - `beyond_cap_minutes` is **empty, never `0`**, where no statutory ceiling was in force. Zero means
|
|
75
|
+
* a ceiling applied and nothing exceeded it. A provider reading 0 for empty is the one place this
|
|
76
|
+
* export can cause a wrong payment, which is why `capped_days` and `uncapped_days` sit beside it.
|
|
77
|
+
* - `scheduled_worked_minutes` excludes work on unrostered days, because a numerator that includes
|
|
78
|
+
* them over a denominator that excludes them is how a team that turned up exactly as asked reads
|
|
79
|
+
* 121%.
|
|
80
|
+
* - `employment_changed_in_period` is true when more than one employment row overlaps the period.
|
|
81
|
+
* Without it the export hands over the end-state FTE for somebody who went 1.0 → 0.6 on the 15th,
|
|
82
|
+
* and the provider pays the whole month at one of them.
|
|
83
|
+
*/
|
|
84
|
+
export declare const PAYROLL_HOURS_COLUMNS: readonly ["contract", "legal_entity_id", "legal_entity_name", "period_start", "period_end", "person_id", "employee_no", "display_name", "employment_type", "fte", "contract_hours_week", "cost_center_code", "position_title", "hired_on", "terminated_on", "employment_changed_in_period", "day_sheets", "scheduled_minutes", "worked_minutes", "scheduled_worked_minutes", "break_minutes", "overtime_minutes", "late_minutes", "early_leave_minutes", "beyond_cap_minutes", "capped_days", "uncapped_days", "locked_days", "open_days", "paid_leave_days", "unpaid_leave_days"];
|
|
85
|
+
/**
|
|
86
|
+
* `leave.csv`, in order. One row per (person, entity, period, leave type).
|
|
87
|
+
*
|
|
88
|
+
* Built from `leave_request_days` filtered `counted and status = 'approved'`, joined out to
|
|
89
|
+
* `leave_requests` → `leave_types`. **Not** `leave_ledger`: the ledger is the balance and carries
|
|
90
|
+
* `grant`, `accrual`, `carry_in` and `expiry`, which are movements rather than leave anybody took in
|
|
91
|
+
* this period. **Not** `leave_requests.minutes` summed per day either — that counts a five-day
|
|
92
|
+
* request five times, an off-by-a-factor this module has already been bitten by once.
|
|
93
|
+
*
|
|
94
|
+
* `days` sums `fraction`, which is exact and needs no day length. `dayLengthMinutes` is published in
|
|
95
|
+
* the manifest for anyone who wants to convert; this file does not convert for them.
|
|
96
|
+
*/
|
|
97
|
+
export declare const PAYROLL_LEAVE_COLUMNS: readonly ["contract", "legal_entity_id", "legal_entity_name", "period_start", "period_end", "person_id", "employee_no", "leave_type_key", "leave_type_name", "paid", "unit", "days", "requests"];
|
|
98
|
+
export declare const PayrollHoursRow: z.ZodObject<{
|
|
99
|
+
personId: z.ZodUUID;
|
|
100
|
+
employeeNo: z.ZodNullable<z.ZodString>;
|
|
101
|
+
displayName: z.ZodString;
|
|
102
|
+
employmentType: z.ZodString;
|
|
103
|
+
fte: z.ZodNumber;
|
|
104
|
+
contractHoursWeek: z.ZodNullable<z.ZodNumber>;
|
|
105
|
+
costCenterCode: z.ZodNullable<z.ZodString>;
|
|
106
|
+
positionTitle: z.ZodNullable<z.ZodString>;
|
|
107
|
+
hiredOn: z.ZodNullable<z.ZodISODate>;
|
|
108
|
+
terminatedOn: z.ZodNullable<z.ZodISODate>;
|
|
109
|
+
employmentChangedInPeriod: z.ZodBoolean;
|
|
110
|
+
daySheets: z.ZodNumber;
|
|
111
|
+
scheduledMinutes: z.ZodNumber;
|
|
112
|
+
workedMinutes: z.ZodNumber;
|
|
113
|
+
scheduledWorkedMinutes: z.ZodNumber;
|
|
114
|
+
breakMinutes: z.ZodNumber;
|
|
115
|
+
overtimeMinutes: z.ZodNumber;
|
|
116
|
+
lateMinutes: z.ZodNumber;
|
|
117
|
+
earlyLeaveMinutes: z.ZodNumber;
|
|
118
|
+
beyondCapMinutes: z.ZodNullable<z.ZodNumber>;
|
|
119
|
+
cappedDays: z.ZodNumber;
|
|
120
|
+
uncappedDays: z.ZodNumber;
|
|
121
|
+
lockedDays: z.ZodNumber;
|
|
122
|
+
openDays: z.ZodNumber;
|
|
123
|
+
paidLeaveDays: z.ZodNumber;
|
|
124
|
+
unpaidLeaveDays: z.ZodNumber;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
export type PayrollHoursRow = z.infer<typeof PayrollHoursRow>;
|
|
127
|
+
export declare const PayrollLeaveRow: z.ZodObject<{
|
|
128
|
+
personId: z.ZodUUID;
|
|
129
|
+
employeeNo: z.ZodNullable<z.ZodString>;
|
|
130
|
+
leaveTypeKey: z.ZodString;
|
|
131
|
+
leaveTypeName: z.ZodString;
|
|
132
|
+
paid: z.ZodBoolean;
|
|
133
|
+
unit: z.ZodEnum<{
|
|
134
|
+
half_day: "half_day";
|
|
135
|
+
day: "day";
|
|
136
|
+
hour: "hour";
|
|
137
|
+
}>;
|
|
138
|
+
days: z.ZodNumber;
|
|
139
|
+
requests: z.ZodNumber;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export type PayrollLeaveRow = z.infer<typeof PayrollLeaveRow>;
|
|
142
|
+
/** The headline figures over the whole population, so a screen shows a total before a file exists. */
|
|
143
|
+
export declare const PayrollExportTotals: z.ZodObject<{
|
|
144
|
+
people: z.ZodNumber;
|
|
145
|
+
daySheets: z.ZodNumber;
|
|
146
|
+
scheduledMinutes: z.ZodNumber;
|
|
147
|
+
workedMinutes: z.ZodNumber;
|
|
148
|
+
scheduledWorkedMinutes: z.ZodNumber;
|
|
149
|
+
breakMinutes: z.ZodNumber;
|
|
150
|
+
overtimeMinutes: z.ZodNumber;
|
|
151
|
+
lateMinutes: z.ZodNumber;
|
|
152
|
+
earlyLeaveMinutes: z.ZodNumber;
|
|
153
|
+
beyondCapMinutes: z.ZodNullable<z.ZodNumber>;
|
|
154
|
+
cappedDays: z.ZodNumber;
|
|
155
|
+
uncappedDays: z.ZodNumber;
|
|
156
|
+
lockedDays: z.ZodNumber;
|
|
157
|
+
openDays: z.ZodNumber;
|
|
158
|
+
paidLeaveDays: z.ZodNumber;
|
|
159
|
+
unpaidLeaveDays: z.ZodNumber;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
export type PayrollExportTotals = z.infer<typeof PayrollExportTotals>;
|
|
162
|
+
/**
|
|
163
|
+
* Why this export will not be written.
|
|
164
|
+
*
|
|
165
|
+
* `payroll.export.preview` returns these so a screen can show them **before** anybody downloads
|
|
166
|
+
* anything; `payroll.export.v1` throws the first of them. `hr.period.not_locked` mirrors the spelling
|
|
167
|
+
* of `hr.period.locked`, which `PolicyService.assertOpen` throws pointed the other way.
|
|
168
|
+
*/
|
|
169
|
+
export declare const PayrollExportRefusalCode: z.ZodEnum<{
|
|
170
|
+
"hr.period.not_locked": "hr.period.not_locked";
|
|
171
|
+
"hr.payroll.empty": "hr.payroll.empty";
|
|
172
|
+
"hr.payroll.no_employment": "hr.payroll.no_employment";
|
|
173
|
+
}>;
|
|
174
|
+
export type PayrollExportRefusalCode = z.infer<typeof PayrollExportRefusalCode>;
|
|
175
|
+
export declare const PayrollExportRefusal: z.ZodObject<{
|
|
176
|
+
code: z.ZodEnum<{
|
|
177
|
+
"hr.period.not_locked": "hr.period.not_locked";
|
|
178
|
+
"hr.payroll.empty": "hr.payroll.empty";
|
|
179
|
+
"hr.payroll.no_employment": "hr.payroll.no_employment";
|
|
180
|
+
}>;
|
|
181
|
+
message: z.ZodString;
|
|
182
|
+
personIds: z.ZodArray<z.ZodUUID>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
export type PayrollExportRefusal = z.infer<typeof PayrollExportRefusal>;
|
|
185
|
+
/**
|
|
186
|
+
* How the bytes are written, restated in the manifest so a reader never has to infer it.
|
|
187
|
+
*
|
|
188
|
+
* UTF-8 **with a byte order mark**, because Excel on Windows mangles Turkish and Persian names
|
|
189
|
+
* without one and this module ships country packs for both. Comma, CRLF, RFC 4180 quoting, ISO dates,
|
|
190
|
+
* `.` decimal separator with two places on `fte` and on leave-day fractions. Every one of these is
|
|
191
|
+
* frozen for as long as v1 is published.
|
|
192
|
+
*/
|
|
193
|
+
export declare const PayrollExportFormat: z.ZodObject<{
|
|
194
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
195
|
+
byteOrderMark: z.ZodLiteral<true>;
|
|
196
|
+
delimiter: z.ZodLiteral<",">;
|
|
197
|
+
lineEnding: z.ZodLiteral<"crlf">;
|
|
198
|
+
quoting: z.ZodLiteral<"rfc4180">;
|
|
199
|
+
decimalSeparator: z.ZodLiteral<".">;
|
|
200
|
+
decimalPlaces: z.ZodLiteral<2>;
|
|
201
|
+
dateFormat: z.ZodLiteral<"iso-8601">;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
export type PayrollExportFormat = z.infer<typeof PayrollExportFormat>;
|
|
204
|
+
export declare const PayrollExportManifest: z.ZodObject<{
|
|
205
|
+
contract: z.ZodLiteral<"kern-payroll-v1">;
|
|
206
|
+
generatedAt: z.ZodISODateTime;
|
|
207
|
+
kernVersion: z.ZodString;
|
|
208
|
+
finality: z.ZodEnum<{
|
|
209
|
+
draft: "draft";
|
|
210
|
+
final: "final";
|
|
211
|
+
}>;
|
|
212
|
+
draft: z.ZodBoolean;
|
|
213
|
+
legalEntityId: z.ZodUUID;
|
|
214
|
+
legalEntityName: z.ZodString;
|
|
215
|
+
country: z.ZodString;
|
|
216
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
217
|
+
periodId: z.ZodUUID;
|
|
218
|
+
periodStart: z.ZodISODate;
|
|
219
|
+
periodEnd: z.ZodISODate;
|
|
220
|
+
periodStatus: z.ZodEnum<{
|
|
221
|
+
locked: "locked";
|
|
222
|
+
open: "open";
|
|
223
|
+
}>;
|
|
224
|
+
population: z.ZodNumber;
|
|
225
|
+
counted: z.ZodNumber;
|
|
226
|
+
scope: z.ZodObject<{
|
|
227
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
228
|
+
askedAt: z.ZodLiteral<"workspace">;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
attendance: z.ZodObject<{
|
|
231
|
+
lockedDays: z.ZodNumber;
|
|
232
|
+
openDays: z.ZodNumber;
|
|
233
|
+
final: z.ZodBoolean;
|
|
234
|
+
firstOpenDay: z.ZodNullable<z.ZodISODate>;
|
|
235
|
+
lastLockedDay: z.ZodNullable<z.ZodISODate>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
dayLengthMinutes: z.ZodNumber;
|
|
238
|
+
format: z.ZodObject<{
|
|
239
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
240
|
+
byteOrderMark: z.ZodLiteral<true>;
|
|
241
|
+
delimiter: z.ZodLiteral<",">;
|
|
242
|
+
lineEnding: z.ZodLiteral<"crlf">;
|
|
243
|
+
quoting: z.ZodLiteral<"rfc4180">;
|
|
244
|
+
decimalSeparator: z.ZodLiteral<".">;
|
|
245
|
+
decimalPlaces: z.ZodLiteral<2>;
|
|
246
|
+
dateFormat: z.ZodLiteral<"iso-8601">;
|
|
247
|
+
}, z.core.$strip>;
|
|
248
|
+
files: z.ZodArray<z.ZodObject<{
|
|
249
|
+
name: z.ZodString;
|
|
250
|
+
columns: z.ZodArray<z.ZodString>;
|
|
251
|
+
rows: z.ZodNumber;
|
|
252
|
+
}, z.core.$strip>>;
|
|
253
|
+
}, z.core.$strip>;
|
|
254
|
+
export type PayrollExportManifest = z.infer<typeof PayrollExportManifest>;
|
|
255
|
+
export declare const PayrollExportFile: z.ZodObject<{
|
|
256
|
+
name: z.ZodString;
|
|
257
|
+
contentType: z.ZodString;
|
|
258
|
+
content: z.ZodString;
|
|
259
|
+
}, z.core.$strip>;
|
|
260
|
+
export type PayrollExportFile = z.infer<typeof PayrollExportFile>;
|
|
261
|
+
/**
|
|
262
|
+
* What `payroll.export.v1` hands back: the manifest, and the three files beside each other.
|
|
263
|
+
*
|
|
264
|
+
* Synchronous and streamed into the response rather than delivered as a job, and that is a checked
|
|
265
|
+
* constraint rather than a preference. Core exposes exactly one file procedure over the broker —
|
|
266
|
+
* `files.get` — so a module cannot mint a `FileObject`; `createUpload` requires a user principal and
|
|
267
|
+
* a background job has none. Writing bytes straight into `kernel.storage` would produce an object
|
|
268
|
+
* invisible to `core.files.*`, absent from the workspace file list, uncounted by the `storageBytes`
|
|
269
|
+
* entitlement and deleted by nothing — orphans by design. Async delivery becomes possible the day
|
|
270
|
+
* core grows a procedure that mints a file for a service principal, and that is a change to core.
|
|
271
|
+
*/
|
|
272
|
+
export declare const PayrollExport: z.ZodObject<{
|
|
273
|
+
manifest: z.ZodObject<{
|
|
274
|
+
contract: z.ZodLiteral<"kern-payroll-v1">;
|
|
275
|
+
generatedAt: z.ZodISODateTime;
|
|
276
|
+
kernVersion: z.ZodString;
|
|
277
|
+
finality: z.ZodEnum<{
|
|
278
|
+
draft: "draft";
|
|
279
|
+
final: "final";
|
|
280
|
+
}>;
|
|
281
|
+
draft: z.ZodBoolean;
|
|
282
|
+
legalEntityId: z.ZodUUID;
|
|
283
|
+
legalEntityName: z.ZodString;
|
|
284
|
+
country: z.ZodString;
|
|
285
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
286
|
+
periodId: z.ZodUUID;
|
|
287
|
+
periodStart: z.ZodISODate;
|
|
288
|
+
periodEnd: z.ZodISODate;
|
|
289
|
+
periodStatus: z.ZodEnum<{
|
|
290
|
+
locked: "locked";
|
|
291
|
+
open: "open";
|
|
292
|
+
}>;
|
|
293
|
+
population: z.ZodNumber;
|
|
294
|
+
counted: z.ZodNumber;
|
|
295
|
+
scope: z.ZodObject<{
|
|
296
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
297
|
+
askedAt: z.ZodLiteral<"workspace">;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
attendance: z.ZodObject<{
|
|
300
|
+
lockedDays: z.ZodNumber;
|
|
301
|
+
openDays: z.ZodNumber;
|
|
302
|
+
final: z.ZodBoolean;
|
|
303
|
+
firstOpenDay: z.ZodNullable<z.ZodISODate>;
|
|
304
|
+
lastLockedDay: z.ZodNullable<z.ZodISODate>;
|
|
305
|
+
}, z.core.$strip>;
|
|
306
|
+
dayLengthMinutes: z.ZodNumber;
|
|
307
|
+
format: z.ZodObject<{
|
|
308
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
309
|
+
byteOrderMark: z.ZodLiteral<true>;
|
|
310
|
+
delimiter: z.ZodLiteral<",">;
|
|
311
|
+
lineEnding: z.ZodLiteral<"crlf">;
|
|
312
|
+
quoting: z.ZodLiteral<"rfc4180">;
|
|
313
|
+
decimalSeparator: z.ZodLiteral<".">;
|
|
314
|
+
decimalPlaces: z.ZodLiteral<2>;
|
|
315
|
+
dateFormat: z.ZodLiteral<"iso-8601">;
|
|
316
|
+
}, z.core.$strip>;
|
|
317
|
+
files: z.ZodArray<z.ZodObject<{
|
|
318
|
+
name: z.ZodString;
|
|
319
|
+
columns: z.ZodArray<z.ZodString>;
|
|
320
|
+
rows: z.ZodNumber;
|
|
321
|
+
}, z.core.$strip>>;
|
|
322
|
+
}, z.core.$strip>;
|
|
323
|
+
files: z.ZodArray<z.ZodObject<{
|
|
324
|
+
name: z.ZodString;
|
|
325
|
+
contentType: z.ZodString;
|
|
326
|
+
content: z.ZodString;
|
|
327
|
+
}, z.core.$strip>>;
|
|
328
|
+
}, z.core.$strip>;
|
|
329
|
+
export type PayrollExport = z.infer<typeof PayrollExport>;
|
|
330
|
+
/**
|
|
331
|
+
* The same rows as JSON, with no file and no refusal thrown.
|
|
332
|
+
*
|
|
333
|
+
* So a screen can show the totals and the reasons it would be refused before anybody downloads
|
|
334
|
+
* anything. `exportable` is `refusals.length === 0`.
|
|
335
|
+
*/
|
|
336
|
+
export declare const PayrollExportPreview: z.ZodObject<{
|
|
337
|
+
manifest: z.ZodObject<{
|
|
338
|
+
contract: z.ZodLiteral<"kern-payroll-v1">;
|
|
339
|
+
generatedAt: z.ZodISODateTime;
|
|
340
|
+
kernVersion: z.ZodString;
|
|
341
|
+
finality: z.ZodEnum<{
|
|
342
|
+
draft: "draft";
|
|
343
|
+
final: "final";
|
|
344
|
+
}>;
|
|
345
|
+
draft: z.ZodBoolean;
|
|
346
|
+
legalEntityId: z.ZodUUID;
|
|
347
|
+
legalEntityName: z.ZodString;
|
|
348
|
+
country: z.ZodString;
|
|
349
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
350
|
+
periodId: z.ZodUUID;
|
|
351
|
+
periodStart: z.ZodISODate;
|
|
352
|
+
periodEnd: z.ZodISODate;
|
|
353
|
+
periodStatus: z.ZodEnum<{
|
|
354
|
+
locked: "locked";
|
|
355
|
+
open: "open";
|
|
356
|
+
}>;
|
|
357
|
+
population: z.ZodNumber;
|
|
358
|
+
counted: z.ZodNumber;
|
|
359
|
+
scope: z.ZodObject<{
|
|
360
|
+
permissions: z.ZodArray<z.ZodString>;
|
|
361
|
+
askedAt: z.ZodLiteral<"workspace">;
|
|
362
|
+
}, z.core.$strip>;
|
|
363
|
+
attendance: z.ZodObject<{
|
|
364
|
+
lockedDays: z.ZodNumber;
|
|
365
|
+
openDays: z.ZodNumber;
|
|
366
|
+
final: z.ZodBoolean;
|
|
367
|
+
firstOpenDay: z.ZodNullable<z.ZodISODate>;
|
|
368
|
+
lastLockedDay: z.ZodNullable<z.ZodISODate>;
|
|
369
|
+
}, z.core.$strip>;
|
|
370
|
+
dayLengthMinutes: z.ZodNumber;
|
|
371
|
+
format: z.ZodObject<{
|
|
372
|
+
encoding: z.ZodLiteral<"utf-8">;
|
|
373
|
+
byteOrderMark: z.ZodLiteral<true>;
|
|
374
|
+
delimiter: z.ZodLiteral<",">;
|
|
375
|
+
lineEnding: z.ZodLiteral<"crlf">;
|
|
376
|
+
quoting: z.ZodLiteral<"rfc4180">;
|
|
377
|
+
decimalSeparator: z.ZodLiteral<".">;
|
|
378
|
+
decimalPlaces: z.ZodLiteral<2>;
|
|
379
|
+
dateFormat: z.ZodLiteral<"iso-8601">;
|
|
380
|
+
}, z.core.$strip>;
|
|
381
|
+
files: z.ZodArray<z.ZodObject<{
|
|
382
|
+
name: z.ZodString;
|
|
383
|
+
columns: z.ZodArray<z.ZodString>;
|
|
384
|
+
rows: z.ZodNumber;
|
|
385
|
+
}, z.core.$strip>>;
|
|
386
|
+
}, z.core.$strip>;
|
|
387
|
+
refusals: z.ZodArray<z.ZodObject<{
|
|
388
|
+
code: z.ZodEnum<{
|
|
389
|
+
"hr.period.not_locked": "hr.period.not_locked";
|
|
390
|
+
"hr.payroll.empty": "hr.payroll.empty";
|
|
391
|
+
"hr.payroll.no_employment": "hr.payroll.no_employment";
|
|
392
|
+
}>;
|
|
393
|
+
message: z.ZodString;
|
|
394
|
+
personIds: z.ZodArray<z.ZodUUID>;
|
|
395
|
+
}, z.core.$strip>>;
|
|
396
|
+
exportable: z.ZodBoolean;
|
|
397
|
+
totals: z.ZodObject<{
|
|
398
|
+
people: z.ZodNumber;
|
|
399
|
+
daySheets: z.ZodNumber;
|
|
400
|
+
scheduledMinutes: z.ZodNumber;
|
|
401
|
+
workedMinutes: z.ZodNumber;
|
|
402
|
+
scheduledWorkedMinutes: z.ZodNumber;
|
|
403
|
+
breakMinutes: z.ZodNumber;
|
|
404
|
+
overtimeMinutes: z.ZodNumber;
|
|
405
|
+
lateMinutes: z.ZodNumber;
|
|
406
|
+
earlyLeaveMinutes: z.ZodNumber;
|
|
407
|
+
beyondCapMinutes: z.ZodNullable<z.ZodNumber>;
|
|
408
|
+
cappedDays: z.ZodNumber;
|
|
409
|
+
uncappedDays: z.ZodNumber;
|
|
410
|
+
lockedDays: z.ZodNumber;
|
|
411
|
+
openDays: z.ZodNumber;
|
|
412
|
+
paidLeaveDays: z.ZodNumber;
|
|
413
|
+
unpaidLeaveDays: z.ZodNumber;
|
|
414
|
+
}, z.core.$strip>;
|
|
415
|
+
hours: z.ZodArray<z.ZodObject<{
|
|
416
|
+
personId: z.ZodUUID;
|
|
417
|
+
employeeNo: z.ZodNullable<z.ZodString>;
|
|
418
|
+
displayName: z.ZodString;
|
|
419
|
+
employmentType: z.ZodString;
|
|
420
|
+
fte: z.ZodNumber;
|
|
421
|
+
contractHoursWeek: z.ZodNullable<z.ZodNumber>;
|
|
422
|
+
costCenterCode: z.ZodNullable<z.ZodString>;
|
|
423
|
+
positionTitle: z.ZodNullable<z.ZodString>;
|
|
424
|
+
hiredOn: z.ZodNullable<z.ZodISODate>;
|
|
425
|
+
terminatedOn: z.ZodNullable<z.ZodISODate>;
|
|
426
|
+
employmentChangedInPeriod: z.ZodBoolean;
|
|
427
|
+
daySheets: z.ZodNumber;
|
|
428
|
+
scheduledMinutes: z.ZodNumber;
|
|
429
|
+
workedMinutes: z.ZodNumber;
|
|
430
|
+
scheduledWorkedMinutes: z.ZodNumber;
|
|
431
|
+
breakMinutes: z.ZodNumber;
|
|
432
|
+
overtimeMinutes: z.ZodNumber;
|
|
433
|
+
lateMinutes: z.ZodNumber;
|
|
434
|
+
earlyLeaveMinutes: z.ZodNumber;
|
|
435
|
+
beyondCapMinutes: z.ZodNullable<z.ZodNumber>;
|
|
436
|
+
cappedDays: z.ZodNumber;
|
|
437
|
+
uncappedDays: z.ZodNumber;
|
|
438
|
+
lockedDays: z.ZodNumber;
|
|
439
|
+
openDays: z.ZodNumber;
|
|
440
|
+
paidLeaveDays: z.ZodNumber;
|
|
441
|
+
unpaidLeaveDays: z.ZodNumber;
|
|
442
|
+
}, z.core.$strip>>;
|
|
443
|
+
leave: z.ZodArray<z.ZodObject<{
|
|
444
|
+
personId: z.ZodUUID;
|
|
445
|
+
employeeNo: z.ZodNullable<z.ZodString>;
|
|
446
|
+
leaveTypeKey: z.ZodString;
|
|
447
|
+
leaveTypeName: z.ZodString;
|
|
448
|
+
paid: z.ZodBoolean;
|
|
449
|
+
unit: z.ZodEnum<{
|
|
450
|
+
half_day: "half_day";
|
|
451
|
+
day: "day";
|
|
452
|
+
hour: "hour";
|
|
453
|
+
}>;
|
|
454
|
+
days: z.ZodNumber;
|
|
455
|
+
requests: z.ZodNumber;
|
|
456
|
+
}, z.core.$strip>>;
|
|
457
|
+
}, z.core.$strip>;
|
|
458
|
+
export type PayrollExportPreview = z.infer<typeof PayrollExportPreview>;
|
|
459
|
+
//# sourceMappingURL=exports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/contract/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,uBAAuB,oBAAoB,CAAA;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,qBAAqB,ojBAgCxB,CAAA;AAEV;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,kMAcxB,CAAA;AAEV,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyC1B,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAE7D,eAAO,MAAM,eAAe;;;;;;;;;;;;;iBAU1B,CAAA;AACF,MAAM,MAA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