@uidu/client 3.14.0 → 3.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/CHANGELOG.md +49 -0
- package/dist/declarations/src/courses.d.ts +37 -1
- package/dist/declarations/src/events.d.ts +58 -1
- package/dist/declarations/src/generated/index.d.ts +1409 -8
- package/dist/declarations/src/index.d.ts +3 -3
- package/dist/declarations/src/mutations.d.ts +175 -1
- package/dist/uidu-client.cjs.dev.js +101 -1
- package/dist/uidu-client.cjs.prod.js +101 -1
- package/dist/uidu-client.esm.js +92 -2
- package/package.json +1 -1
- package/src/courses.ts +28 -0
- package/src/events.ts +42 -0
- package/src/generated/index.ts +1194 -16
- package/src/index.ts +16 -1
- package/src/mutations.ts +72 -0
- package/src/queries/courses/EnrollmentMutations.graphql +27 -0
- package/src/queries/events/EventInstanceMutations.graphql +29 -0
- package/src/queries/events/UpdateAttendance.graphql +14 -0
- package/src/queries/help-center/ChannelKbCollectionMutations.graphql +41 -0
- package/src/queries/people/EmployeeCertificationMutations.graphql +25 -0
- package/src/queries/people/EmploymentTermMutations.graphql +67 -0
package/src/index.ts
CHANGED
|
@@ -94,6 +94,8 @@ export {
|
|
|
94
94
|
createChannel,
|
|
95
95
|
updateChannel,
|
|
96
96
|
deleteChannel,
|
|
97
|
+
createChannelKbCollection,
|
|
98
|
+
updateChannelKbCollection,
|
|
97
99
|
updateEvent,
|
|
98
100
|
updateStory,
|
|
99
101
|
updateDonationCampaign,
|
|
@@ -106,10 +108,13 @@ export {
|
|
|
106
108
|
deleteSpace,
|
|
107
109
|
createEmployee,
|
|
108
110
|
updateEmployee,
|
|
111
|
+
createEmployeeCertification,
|
|
109
112
|
createEmployment,
|
|
110
113
|
updateEmployment,
|
|
111
114
|
deleteEmployment,
|
|
112
115
|
terminateEmployment,
|
|
116
|
+
createEmploymentTerm,
|
|
117
|
+
updateEmploymentTerm,
|
|
113
118
|
createCompensation,
|
|
114
119
|
updateCompensation,
|
|
115
120
|
deleteCompensation,
|
|
@@ -130,7 +135,15 @@ export type { Channel } from './help-center';
|
|
|
130
135
|
export { search } from './search';
|
|
131
136
|
export type { SearchResult } from './search';
|
|
132
137
|
|
|
133
|
-
export {
|
|
138
|
+
export {
|
|
139
|
+
getEvent,
|
|
140
|
+
listEvents,
|
|
141
|
+
createAttendance,
|
|
142
|
+
updateAttendance,
|
|
143
|
+
createEvent,
|
|
144
|
+
createEventInstance,
|
|
145
|
+
updateEventInstance,
|
|
146
|
+
} from './events';
|
|
134
147
|
export type { Event } from './events';
|
|
135
148
|
|
|
136
149
|
export { getCall, listCalls } from './calls';
|
|
@@ -199,6 +212,8 @@ export {
|
|
|
199
212
|
listCourses,
|
|
200
213
|
getEnrollment,
|
|
201
214
|
listEnrollments,
|
|
215
|
+
createEnrollment,
|
|
216
|
+
updateEnrollment,
|
|
202
217
|
getLecture,
|
|
203
218
|
listLectures,
|
|
204
219
|
} from './courses';
|
package/src/mutations.ts
CHANGED
|
@@ -7,6 +7,8 @@ import type { UiduClient } from './client';
|
|
|
7
7
|
import {
|
|
8
8
|
CreateChannelDocument,
|
|
9
9
|
type CreateChannelMutationVariables,
|
|
10
|
+
CreateChannelKbCollectionDocument,
|
|
11
|
+
type CreateChannelKbCollectionMutationVariables,
|
|
10
12
|
CreateContactDocument,
|
|
11
13
|
type CreateContactMutationVariables,
|
|
12
14
|
CreateCourseDocument,
|
|
@@ -17,8 +19,12 @@ import {
|
|
|
17
19
|
type CreateDealMutationVariables,
|
|
18
20
|
CreateEmployeeDocument,
|
|
19
21
|
type CreateEmployeeMutationVariables,
|
|
22
|
+
CreateEmployeeCertificationDocument,
|
|
23
|
+
type CreateEmployeeCertificationMutationVariables,
|
|
20
24
|
CreateEmploymentDocument,
|
|
21
25
|
type CreateEmploymentMutationVariables,
|
|
26
|
+
CreateEmploymentTermDocument,
|
|
27
|
+
type CreateEmploymentTermMutationVariables,
|
|
22
28
|
CreateFormDocument,
|
|
23
29
|
type CreateFormMutationVariables,
|
|
24
30
|
CreateKbArticleDocument,
|
|
@@ -53,6 +59,8 @@ import {
|
|
|
53
59
|
type DeleteTaskMutationVariables,
|
|
54
60
|
UpdateChannelDocument,
|
|
55
61
|
type UpdateChannelMutationVariables,
|
|
62
|
+
UpdateChannelKbCollectionDocument,
|
|
63
|
+
type UpdateChannelKbCollectionMutationVariables,
|
|
56
64
|
UpdateCompensationDocument,
|
|
57
65
|
type UpdateCompensationMutationVariables,
|
|
58
66
|
UpdateCourseDocument,
|
|
@@ -65,6 +73,8 @@ import {
|
|
|
65
73
|
type UpdateEmployeeMutationVariables,
|
|
66
74
|
UpdateEmploymentDocument,
|
|
67
75
|
type UpdateEmploymentMutationVariables,
|
|
76
|
+
UpdateEmploymentTermDocument,
|
|
77
|
+
type UpdateEmploymentTermMutationVariables,
|
|
68
78
|
UpdateEventDocument,
|
|
69
79
|
type UpdateEventMutationVariables,
|
|
70
80
|
UpdateFormDocument,
|
|
@@ -179,6 +189,20 @@ export async function createEmployee(c: UiduClient, v: CreateEmployeeMutationVar
|
|
|
179
189
|
export async function updateEmployee(c: UiduClient, v: UpdateEmployeeMutationVariables) {
|
|
180
190
|
return (await c.mutate(UpdateEmployeeDocument, v)).updateEmployee ?? null;
|
|
181
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Issue a certification (`attributes.certificationId`) to an employee
|
|
194
|
+
* (`attributes.employeeId`), optionally with its issue date and a generated
|
|
195
|
+
* certificate (`documentId`/`blobId`). Returns the payload (with `errors`) or
|
|
196
|
+
* null. The new record is at `employeeCertification.node`.
|
|
197
|
+
*/
|
|
198
|
+
export async function createEmployeeCertification(
|
|
199
|
+
c: UiduClient,
|
|
200
|
+
v: CreateEmployeeCertificationMutationVariables,
|
|
201
|
+
) {
|
|
202
|
+
return (
|
|
203
|
+
(await c.mutate(CreateEmployeeCertificationDocument, v)).createEmployeeCertification ?? null
|
|
204
|
+
);
|
|
205
|
+
}
|
|
182
206
|
/**
|
|
183
207
|
* Hire: open a new employment (contract) for `attributes.employeeId` with its
|
|
184
208
|
* start date, kind, role and hours. Returns the payload (with `errors`) or
|
|
@@ -222,6 +246,29 @@ export async function terminateEmployment(
|
|
|
222
246
|
});
|
|
223
247
|
}
|
|
224
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Open a new employment term under `attributes.employmentId` — a variation of
|
|
251
|
+
* the hours, job title, CCNL or contract kind, effective from `effectiveFrom`
|
|
252
|
+
* (the term in force until then is closed on that date). Returns the payload
|
|
253
|
+
* (with `errors`) or null. The new term is at `employmentTerm.node`.
|
|
254
|
+
*/
|
|
255
|
+
export async function createEmploymentTerm(
|
|
256
|
+
c: UiduClient,
|
|
257
|
+
v: CreateEmploymentTermMutationVariables,
|
|
258
|
+
) {
|
|
259
|
+
return (await c.mutate(CreateEmploymentTermDocument, v)).createEmploymentTerm ?? null;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Update an employment term: `{ input: { id, attributes } }`. Returns the
|
|
263
|
+
* payload (with `errors`) or null.
|
|
264
|
+
*/
|
|
265
|
+
export async function updateEmploymentTerm(
|
|
266
|
+
c: UiduClient,
|
|
267
|
+
v: UpdateEmploymentTermMutationVariables,
|
|
268
|
+
) {
|
|
269
|
+
return (await c.mutate(UpdateEmploymentTermDocument, v)).updateEmploymentTerm ?? null;
|
|
270
|
+
}
|
|
271
|
+
|
|
225
272
|
// --- Time clocks (punches) ---
|
|
226
273
|
/**
|
|
227
274
|
* Record a time-clock punch (`beginsAt`, optional `finishesAt`, `resourceId`).
|
|
@@ -323,6 +370,31 @@ export async function deleteChannel(c: UiduClient, v: DeleteChannelMutationVaria
|
|
|
323
370
|
return (await c.mutate(DeleteChannelDocument, v)).deleteChannel ?? null;
|
|
324
371
|
}
|
|
325
372
|
|
|
373
|
+
// --- Channel ↔ knowledge-base collection links ---
|
|
374
|
+
// Publishes a KB collection on a help-center channel (`attributes.channelId`,
|
|
375
|
+
// `kbCollectionId`, `position`) — distinct from the collection/article content
|
|
376
|
+
// itself, which lives in the `kb` domain.
|
|
377
|
+
/**
|
|
378
|
+
* Publish a knowledge-base collection on a help-center channel. Returns the
|
|
379
|
+
* payload (with `errors`) or null. The new link is at `channelKbCollection`.
|
|
380
|
+
*/
|
|
381
|
+
export async function createChannelKbCollection(
|
|
382
|
+
c: UiduClient,
|
|
383
|
+
v: CreateChannelKbCollectionMutationVariables,
|
|
384
|
+
) {
|
|
385
|
+
return (await c.mutate(CreateChannelKbCollectionDocument, v)).createChannelKbCollection ?? null;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Update a channel/collection link, e.g. its `position`: `{ input: { id,
|
|
389
|
+
* attributes } }`. Returns the payload (with `errors`) or null.
|
|
390
|
+
*/
|
|
391
|
+
export async function updateChannelKbCollection(
|
|
392
|
+
c: UiduClient,
|
|
393
|
+
v: UpdateChannelKbCollectionMutationVariables,
|
|
394
|
+
) {
|
|
395
|
+
return (await c.mutate(UpdateChannelKbCollectionDocument, v)).updateChannelKbCollection ?? null;
|
|
396
|
+
}
|
|
397
|
+
|
|
326
398
|
// --- Content updates (create lives in the scope's domain file) ---
|
|
327
399
|
/**
|
|
328
400
|
* Update an event: `{ input: { id, attributes } }` (create it with
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
mutation CreateEnrollment($input: CreateEnrollmentInput!) {
|
|
2
|
+
createEnrollment(input: $input) {
|
|
3
|
+
enrollment {
|
|
4
|
+
id
|
|
5
|
+
aasmState
|
|
6
|
+
}
|
|
7
|
+
errors {
|
|
8
|
+
key
|
|
9
|
+
name
|
|
10
|
+
type
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
mutation UpdateEnrollment($input: UpdateEnrollmentInput!) {
|
|
16
|
+
updateEnrollment(input: $input) {
|
|
17
|
+
enrollment {
|
|
18
|
+
id
|
|
19
|
+
aasmState
|
|
20
|
+
}
|
|
21
|
+
errors {
|
|
22
|
+
key
|
|
23
|
+
name
|
|
24
|
+
type
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
mutation CreateEventInstance($input: CreateEventInstanceInput!) {
|
|
2
|
+
createEventInstance(input: $input) {
|
|
3
|
+
eventInstance {
|
|
4
|
+
id
|
|
5
|
+
beginsAt
|
|
6
|
+
finishesAt
|
|
7
|
+
}
|
|
8
|
+
errors {
|
|
9
|
+
key
|
|
10
|
+
name
|
|
11
|
+
type
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
mutation UpdateEventInstance($input: UpdateEventInstanceInput!) {
|
|
17
|
+
updateEventInstance(input: $input) {
|
|
18
|
+
eventInstance {
|
|
19
|
+
id
|
|
20
|
+
beginsAt
|
|
21
|
+
finishesAt
|
|
22
|
+
}
|
|
23
|
+
errors {
|
|
24
|
+
key
|
|
25
|
+
name
|
|
26
|
+
type
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
mutation CreateChannelKbCollection($input: CreateChannelKbCollectionInput!) {
|
|
2
|
+
createChannelKbCollection(input: $input) {
|
|
3
|
+
channelKbCollection {
|
|
4
|
+
id
|
|
5
|
+
position
|
|
6
|
+
channel {
|
|
7
|
+
id
|
|
8
|
+
}
|
|
9
|
+
kbCollection {
|
|
10
|
+
id
|
|
11
|
+
name
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
errors {
|
|
15
|
+
key
|
|
16
|
+
name
|
|
17
|
+
type
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
mutation UpdateChannelKbCollection($input: UpdateChannelKbCollectionInput!) {
|
|
23
|
+
updateChannelKbCollection(input: $input) {
|
|
24
|
+
channelKbCollection {
|
|
25
|
+
id
|
|
26
|
+
position
|
|
27
|
+
channel {
|
|
28
|
+
id
|
|
29
|
+
}
|
|
30
|
+
kbCollection {
|
|
31
|
+
id
|
|
32
|
+
name
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
errors {
|
|
36
|
+
key
|
|
37
|
+
name
|
|
38
|
+
type
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
mutation CreateEmployeeCertification($input: CreateEmployeeCertificationInput!) {
|
|
2
|
+
createEmployeeCertification(input: $input) {
|
|
3
|
+
employeeCertification {
|
|
4
|
+
node {
|
|
5
|
+
id
|
|
6
|
+
issuedAt
|
|
7
|
+
expiresAt
|
|
8
|
+
validNow
|
|
9
|
+
metadata
|
|
10
|
+
employee {
|
|
11
|
+
id
|
|
12
|
+
}
|
|
13
|
+
certification {
|
|
14
|
+
id
|
|
15
|
+
name
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
errors {
|
|
20
|
+
key
|
|
21
|
+
name
|
|
22
|
+
type
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
mutation CreateEmploymentTerm($input: CreateEmploymentTermInput!) {
|
|
2
|
+
createEmploymentTerm(input: $input) {
|
|
3
|
+
employmentTerm {
|
|
4
|
+
node {
|
|
5
|
+
id
|
|
6
|
+
effectiveFrom
|
|
7
|
+
effectiveTo
|
|
8
|
+
endDate
|
|
9
|
+
jobTitle
|
|
10
|
+
workingHours
|
|
11
|
+
workingFrequency
|
|
12
|
+
fteRatio
|
|
13
|
+
isInitial
|
|
14
|
+
state
|
|
15
|
+
employment {
|
|
16
|
+
id
|
|
17
|
+
}
|
|
18
|
+
employmentKind {
|
|
19
|
+
id
|
|
20
|
+
name
|
|
21
|
+
}
|
|
22
|
+
ccnl {
|
|
23
|
+
id
|
|
24
|
+
name
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
errors {
|
|
29
|
+
key
|
|
30
|
+
name
|
|
31
|
+
type
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
mutation UpdateEmploymentTerm($input: UpdateEmploymentTermInput!) {
|
|
37
|
+
updateEmploymentTerm(input: $input) {
|
|
38
|
+
employmentTerm {
|
|
39
|
+
id
|
|
40
|
+
effectiveFrom
|
|
41
|
+
effectiveTo
|
|
42
|
+
endDate
|
|
43
|
+
jobTitle
|
|
44
|
+
workingHours
|
|
45
|
+
workingFrequency
|
|
46
|
+
fteRatio
|
|
47
|
+
isInitial
|
|
48
|
+
state
|
|
49
|
+
employment {
|
|
50
|
+
id
|
|
51
|
+
}
|
|
52
|
+
employmentKind {
|
|
53
|
+
id
|
|
54
|
+
name
|
|
55
|
+
}
|
|
56
|
+
ccnl {
|
|
57
|
+
id
|
|
58
|
+
name
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
errors {
|
|
62
|
+
key
|
|
63
|
+
name
|
|
64
|
+
type
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|