@uidu/client 3.3.0 → 3.4.1

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.
@@ -82,6 +82,8 @@ describe('contractEvents', () => {
82
82
  endReason: 'contract_end',
83
83
  jobTitle: 'Senior Dev',
84
84
  contractType: 'determinato',
85
+ ccnl: null,
86
+ compensations: [],
85
87
  },
86
88
  {
87
89
  id: 'c1',
@@ -90,6 +92,8 @@ describe('contractEvents', () => {
90
92
  endReason: null,
91
93
  jobTitle: 'Dev',
92
94
  contractType: 'indeterminato',
95
+ ccnl: null,
96
+ compensations: [],
93
97
  },
94
98
  ],
95
99
  },
@@ -104,6 +108,8 @@ describe('contractEvents', () => {
104
108
  endReason: null,
105
109
  jobTitle: null,
106
110
  contractType: null,
111
+ ccnl: null,
112
+ compensations: [],
107
113
  },
108
114
  ],
109
115
  },
package/src/people.ts CHANGED
@@ -139,6 +139,18 @@ export async function listCcnls(
139
139
 
140
140
  // --- Employment history & contract events ---
141
141
 
142
+ /** A pay item attached to a contract. */
143
+ export type CompensationRecord = {
144
+ id: string;
145
+ amount: number | null;
146
+ currency: string | null;
147
+ /** e.g. monthly, yearly, hourly. */
148
+ frequency: string | null;
149
+ /** e.g. base, bonus. */
150
+ componentType: string | null;
151
+ effectiveFrom: string | null;
152
+ };
153
+
142
154
  /** A single contract (employment) reduced to the fields that describe its span. */
143
155
  export type EmploymentRecord = {
144
156
  id: string;
@@ -147,6 +159,10 @@ export type EmploymentRecord = {
147
159
  endReason: string | null;
148
160
  jobTitle: string | null;
149
161
  contractType: string | null;
162
+ /** The CCNL (national collective labor contract) that applies, if any. */
163
+ ccnl: { id: string; name: string | null } | null;
164
+ /** Pay items on this contract, most recent effective date first. */
165
+ compensations: CompensationRecord[];
150
166
  };
151
167
 
152
168
  /** An employee together with their full list of contracts. */
@@ -179,6 +195,19 @@ export async function listEmploymentHistory(
179
195
  endReason: e.endReason ?? null,
180
196
  jobTitle: e.jobTitle ?? null,
181
197
  contractType: e.contractType ?? null,
198
+ ccnl: e.ccnl ? { id: e.ccnl.id ?? '', name: e.ccnl.name ?? null } : null,
199
+ compensations: nodes(e.compensations)
200
+ .map((c) => ({
201
+ id: c.id ?? '',
202
+ amount: c.amount ?? null,
203
+ currency: c.currency ?? null,
204
+ frequency: c.frequency ?? null,
205
+ componentType: c.componentType ?? null,
206
+ effectiveFrom: c.effectiveFrom ?? null,
207
+ }))
208
+ .sort((a, b) =>
209
+ (b.effectiveFrom ?? '').localeCompare(a.effectiveFrom ?? ''),
210
+ ),
182
211
  })),
183
212
  }));
184
213
  }
@@ -0,0 +1,32 @@
1
+ mutation CreateApplication($input: CreateApplicationInput!) {
2
+ createApplication(input: $input) {
3
+ errors {
4
+ key
5
+ name
6
+ type
7
+ }
8
+ application {
9
+ id
10
+ aasmState
11
+ summary
12
+ completedAt
13
+ createdAt
14
+ contact {
15
+ id
16
+ humanName
17
+ email
18
+ }
19
+ applicable {
20
+ __typename
21
+ ... on Call {
22
+ id
23
+ name
24
+ kind
25
+ }
26
+ }
27
+ formResponse {
28
+ id
29
+ }
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,40 @@
1
+ query ListApplications($first: Int, $after: String) {
2
+ currentWorkspace {
3
+ applications(first: $first, after: $after) {
4
+ pageInfo {
5
+ hasNextPage
6
+ endCursor
7
+ }
8
+ edges {
9
+ node {
10
+ id
11
+ aasmState
12
+ summary
13
+ completedAt
14
+ createdAt
15
+ status {
16
+ id
17
+ name
18
+ color
19
+ }
20
+ contact {
21
+ id
22
+ humanName
23
+ email
24
+ }
25
+ applicable {
26
+ __typename
27
+ ... on Call {
28
+ id
29
+ name
30
+ kind
31
+ }
32
+ }
33
+ formResponse {
34
+ id
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
@@ -18,6 +18,7 @@ query ListCalls($first: Int, $after: String) {
18
18
  salaryMax
19
19
  publishedAt
20
20
  expiresAt
21
+ publicUrl
21
22
  publicPath
22
23
  published
23
24
  primaryAddress {
@@ -0,0 +1,50 @@
1
+ mutation CreateCompensation($input: CreateCompensationInput!) {
2
+ createCompensation(input: $input) {
3
+ compensation {
4
+ node {
5
+ id
6
+ amount
7
+ currency
8
+ frequency
9
+ componentType
10
+ effectiveFrom
11
+ }
12
+ }
13
+ errors {
14
+ key
15
+ name
16
+ type
17
+ }
18
+ }
19
+ }
20
+
21
+ mutation UpdateCompensation($input: UpdateCompensationInput!) {
22
+ updateCompensation(input: $input) {
23
+ compensation {
24
+ id
25
+ amount
26
+ currency
27
+ frequency
28
+ componentType
29
+ effectiveFrom
30
+ }
31
+ errors {
32
+ key
33
+ name
34
+ type
35
+ }
36
+ }
37
+ }
38
+
39
+ mutation DeleteCompensation($input: DeleteCompensationInput!) {
40
+ deleteCompensation(input: $input) {
41
+ compensation {
42
+ id
43
+ }
44
+ errors {
45
+ key
46
+ name
47
+ type
48
+ }
49
+ }
50
+ }
@@ -26,6 +26,22 @@ query ListEmploymentHistory(
26
26
  endReason
27
27
  jobTitle
28
28
  contractType
29
+ ccnl {
30
+ id
31
+ name
32
+ }
33
+ compensations(first: 20) {
34
+ edges {
35
+ node {
36
+ id
37
+ amount
38
+ currency
39
+ frequency
40
+ componentType
41
+ effectiveFrom
42
+ }
43
+ }
44
+ }
29
45
  }
30
46
  }
31
47
  }