@uidu/client 3.5.0 → 3.6.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/CHANGELOG.md +10 -0
- package/dist/declarations/src/bookings.d.ts +1 -1
- package/dist/declarations/src/generated/index.d.ts +8635 -263
- package/dist/declarations/src/mutations.d.ts +15 -3
- package/dist/declarations/src/people.d.ts +16 -1
- package/dist/uidu-client.cjs.dev.js +6 -2
- package/dist/uidu-client.cjs.prod.js +6 -2
- package/dist/uidu-client.esm.js +6 -2
- package/package.json +1 -1
- package/src/generated/index.ts +9837 -297
- package/src/people.test.ts +3 -0
- package/src/people.ts +12 -1
- package/src/queries/people/GetEmployee.graphql +4 -1
- package/src/queries/people/ListEmployees.graphql +4 -1
- package/src/queries/people/ListEmploymentHistory.graphql +4 -1
- package/src/queries/people/PeopleMutations.graphql +8 -2
package/src/people.test.ts
CHANGED
|
@@ -81,6 +81,7 @@ describe('contractEvents', () => {
|
|
|
81
81
|
endDate: '2025-03-31',
|
|
82
82
|
endReason: 'contract_end',
|
|
83
83
|
jobTitle: 'Senior Dev',
|
|
84
|
+
employmentKind: { id: 'ek1', name: 'determinato' },
|
|
84
85
|
contractType: 'determinato',
|
|
85
86
|
ccnl: null,
|
|
86
87
|
compensations: [],
|
|
@@ -91,6 +92,7 @@ describe('contractEvents', () => {
|
|
|
91
92
|
endDate: null,
|
|
92
93
|
endReason: null,
|
|
93
94
|
jobTitle: 'Dev',
|
|
95
|
+
employmentKind: { id: 'ek2', name: 'indeterminato' },
|
|
94
96
|
contractType: 'indeterminato',
|
|
95
97
|
ccnl: null,
|
|
96
98
|
compensations: [],
|
|
@@ -107,6 +109,7 @@ describe('contractEvents', () => {
|
|
|
107
109
|
endDate: null,
|
|
108
110
|
endReason: null,
|
|
109
111
|
jobTitle: null,
|
|
112
|
+
employmentKind: null,
|
|
110
113
|
contractType: null,
|
|
111
114
|
ccnl: null,
|
|
112
115
|
compensations: [],
|
package/src/people.ts
CHANGED
|
@@ -158,6 +158,14 @@ export type EmploymentRecord = {
|
|
|
158
158
|
endDate: string | null;
|
|
159
159
|
endReason: string | null;
|
|
160
160
|
jobTitle: string | null;
|
|
161
|
+
/**
|
|
162
|
+
* The contract type, as a record. It used to be a free string on the
|
|
163
|
+
* employment (`contractType`); uidu promoted it to `EmploymentKind` so a
|
|
164
|
+
* workspace can configure its own, which is why writes take
|
|
165
|
+
* `employmentKindId`.
|
|
166
|
+
*/
|
|
167
|
+
employmentKind: { id: string; name: string | null } | null;
|
|
168
|
+
/** The contract type's name — `employmentKind.name`, kept flat for display. */
|
|
161
169
|
contractType: string | null;
|
|
162
170
|
/** The CCNL (national collective labor contract) that applies, if any. */
|
|
163
171
|
ccnl: { id: string; name: string | null } | null;
|
|
@@ -194,7 +202,10 @@ export async function listEmploymentHistory(
|
|
|
194
202
|
endDate: e.endDate ?? null,
|
|
195
203
|
endReason: e.endReason ?? null,
|
|
196
204
|
jobTitle: e.jobTitle ?? null,
|
|
197
|
-
|
|
205
|
+
employmentKind: e.employmentKind
|
|
206
|
+
? { id: e.employmentKind.id ?? '', name: e.employmentKind.name ?? null }
|
|
207
|
+
: null,
|
|
208
|
+
contractType: e.employmentKind?.name ?? null,
|
|
198
209
|
ccnl: e.ccnl ? { id: e.ccnl.id ?? '', name: e.ccnl.name ?? null } : null,
|
|
199
210
|
compensations: nodes(e.compensations)
|
|
200
211
|
.map((c) => ({
|
|
@@ -39,7 +39,10 @@ mutation CreateEmployment($input: CreateEmploymentInput!) {
|
|
|
39
39
|
node {
|
|
40
40
|
id
|
|
41
41
|
jobTitle
|
|
42
|
-
|
|
42
|
+
employmentKind {
|
|
43
|
+
id
|
|
44
|
+
name
|
|
45
|
+
}
|
|
43
46
|
classification
|
|
44
47
|
startDate
|
|
45
48
|
endDate
|
|
@@ -59,7 +62,10 @@ mutation UpdateEmployment($input: UpdateEmploymentInput!) {
|
|
|
59
62
|
employment {
|
|
60
63
|
id
|
|
61
64
|
jobTitle
|
|
62
|
-
|
|
65
|
+
employmentKind {
|
|
66
|
+
id
|
|
67
|
+
name
|
|
68
|
+
}
|
|
63
69
|
classification
|
|
64
70
|
startDate
|
|
65
71
|
endDate
|