@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# @uidu/client
|
|
2
2
|
|
|
3
|
+
## 3.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e4ffc15: Add `updateAttendance` to `@uidu/client` — change an attendance's `rsvpStatus`,
|
|
8
|
+
check it in, or edit its other attributes; returns the payload as-is,
|
|
9
|
+
`{ errors, attendance }`. Adds `update` to the `attendances` resource
|
|
10
|
+
(`uidu attendances update <id>`) in `@uidu/cli`. Demoed with a "Cancel RSVP"
|
|
11
|
+
action on the event RSVP form in `apps/demo`.
|
|
12
|
+
- 20e1713: Add `createEnrollment` / `updateEnrollment` to `@uidu/client` — enroll a
|
|
13
|
+
contact in a course, or update an enrollment's `aasmState`, `outcome` or
|
|
14
|
+
`certificateStatus`; both return the payload as-is, `{ errors, enrollment }`.
|
|
15
|
+
Adds an `enrollments` resource (`list`, `get`, `create`, `update`) to
|
|
16
|
+
`@uidu/cli`, pairing the existing `getEnrollment` / `listEnrollments` reads
|
|
17
|
+
with their writes. Demoed on a new "Enrollments" admin page in `apps/demo`.
|
|
18
|
+
- 440536f: Add `createEventInstance` / `updateEventInstance` to `@uidu/client` — add a new
|
|
19
|
+
occurrence (date/time) to a recurring event, or update one's schedule or
|
|
20
|
+
venue; both return the payload as-is, `{ errors, eventInstance }`. Adds an
|
|
21
|
+
`event-instances` resource (`create`, `update`) to `@uidu/cli`. Demoed on a new
|
|
22
|
+
"Event instances" admin page in `apps/demo`.
|
|
23
|
+
|
|
24
|
+
## 3.16.0
|
|
25
|
+
|
|
26
|
+
### Minor Changes
|
|
27
|
+
|
|
28
|
+
- 4518526: Add `createChannelKbCollection` / `updateChannelKbCollection` to `@uidu/client`
|
|
29
|
+
— publishes a knowledge-base collection on a help-center channel
|
|
30
|
+
(`channelId`, `kbCollectionId`, `position`), distinct from the collection's
|
|
31
|
+
content itself (the `kb` domain). Adds a `channel-kb-collections` resource
|
|
32
|
+
(`create`, `update`) to `@uidu/cli`. Demoed on the Help Center admin page in
|
|
33
|
+
`apps/demo`.
|
|
34
|
+
|
|
35
|
+
## 3.15.0
|
|
36
|
+
|
|
37
|
+
### Minor Changes
|
|
38
|
+
|
|
39
|
+
- f046e6b: Add `createEmployeeCertification` to `@uidu/client` — issues a certification
|
|
40
|
+
to an employee (`employeeId`, `certificationId`, optional `issuedAt` and
|
|
41
|
+
generated certificate `documentId`/`blobId`). Adds an
|
|
42
|
+
`employee-certifications` resource (`create`) to `@uidu/cli`. Takes an
|
|
43
|
+
existing `certificationId` directly: the SDK has no `certifications` domain
|
|
44
|
+
yet (`Certifications::Certification::Create` is still on the drift backlog).
|
|
45
|
+
Demoed on the employee detail page in `apps/demo`.
|
|
46
|
+
- 7f3c05c: Add `createEmploymentTerm` / `updateEmploymentTerm` to `@uidu/client` (contract
|
|
47
|
+
variations: hours, job title, CCNL or kind, effective from a date — distinct
|
|
48
|
+
from `employments`, the contract span itself) and an `employment-terms`
|
|
49
|
+
resource (`create`, `update`) to `@uidu/cli`. Demoed on the employee detail
|
|
50
|
+
page in `apps/demo`.
|
|
51
|
+
|
|
3
52
|
## 3.14.0
|
|
4
53
|
|
|
5
54
|
### Minor Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
|
-
import { type GetCourseQuery, type GetCourseQueryVariables, type GetEnrollmentQuery, type GetEnrollmentQueryVariables, type GetLectureQuery, type GetLectureQueryVariables, type ListCoursesQueryVariables, type ListEnrollmentsQueryVariables, type ListLecturesQueryVariables } from "./generated/index.js";
|
|
2
|
+
import { type CreateEnrollmentMutationVariables, type GetCourseQuery, type GetCourseQueryVariables, type GetEnrollmentQuery, type GetEnrollmentQueryVariables, type GetLectureQuery, type GetLectureQueryVariables, type ListCoursesQueryVariables, type ListEnrollmentsQueryVariables, type ListLecturesQueryVariables, type UpdateEnrollmentMutationVariables } from "./generated/index.js";
|
|
3
3
|
export type Course = NonNullable<NonNullable<GetCourseQuery['currentWorkspace']>['course']>;
|
|
4
4
|
export type Enrollment = NonNullable<NonNullable<GetEnrollmentQuery['currentWorkspace']>['enrollment']>;
|
|
5
5
|
export type Lecture = NonNullable<NonNullable<GetLectureQuery['currentWorkspace']>['lecture']>;
|
|
@@ -59,6 +59,42 @@ export declare function listEnrollments(client: UiduClient, variables?: ListEnro
|
|
|
59
59
|
name?: string | null;
|
|
60
60
|
} | null;
|
|
61
61
|
}[]>;
|
|
62
|
+
/**
|
|
63
|
+
* Enroll a contact in a course; returns the payload as-is,
|
|
64
|
+
* `{ errors, enrollment }`, validation failures included.
|
|
65
|
+
*/
|
|
66
|
+
export declare function createEnrollment(client: UiduClient, variables: CreateEnrollmentMutationVariables): Promise<{
|
|
67
|
+
__typename?: "CreateEnrollmentPayload";
|
|
68
|
+
enrollment?: {
|
|
69
|
+
__typename?: "Enrollment";
|
|
70
|
+
id: string;
|
|
71
|
+
aasmState?: string | null;
|
|
72
|
+
} | null;
|
|
73
|
+
errors: Array<{
|
|
74
|
+
__typename?: "Error";
|
|
75
|
+
key: string;
|
|
76
|
+
name: string;
|
|
77
|
+
type: string;
|
|
78
|
+
}>;
|
|
79
|
+
} | null>;
|
|
80
|
+
/**
|
|
81
|
+
* Update an enrollment — its `aasmState`, `outcome`, `certificateStatus` or
|
|
82
|
+
* other attributes; returns the payload as-is, `{ errors, enrollment }`.
|
|
83
|
+
*/
|
|
84
|
+
export declare function updateEnrollment(client: UiduClient, variables: UpdateEnrollmentMutationVariables): Promise<{
|
|
85
|
+
__typename?: "UpdateEnrollmentPayload";
|
|
86
|
+
enrollment?: {
|
|
87
|
+
__typename?: "Enrollment";
|
|
88
|
+
id: string;
|
|
89
|
+
aasmState?: string | null;
|
|
90
|
+
} | null;
|
|
91
|
+
errors: Array<{
|
|
92
|
+
__typename?: "Error";
|
|
93
|
+
key: string;
|
|
94
|
+
name: string;
|
|
95
|
+
type: string;
|
|
96
|
+
}>;
|
|
97
|
+
} | null>;
|
|
62
98
|
/**
|
|
63
99
|
* One lecture with its `body`, its course and its `nextLecture` /
|
|
64
100
|
* `previousLecture` for navigation, or null.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
|
-
import { type CreateAttendanceMutationVariables, type CreateEventMutationVariables, type GetEventQuery, type GetEventQueryVariables, type ListEventsQueryVariables } from "./generated/index.js";
|
|
2
|
+
import { type CreateAttendanceMutationVariables, type CreateEventMutationVariables, type CreateEventInstanceMutationVariables, type GetEventQuery, type GetEventQueryVariables, type ListEventsQueryVariables, type UpdateAttendanceMutationVariables, type UpdateEventInstanceMutationVariables } from "./generated/index.js";
|
|
3
3
|
export type Event = NonNullable<NonNullable<GetEventQuery['currentWorkspace']>['event']>;
|
|
4
4
|
/**
|
|
5
5
|
* One event with its primary address, its next or current `instance` and all
|
|
@@ -58,6 +58,25 @@ export declare function createAttendance(client: UiduClient, variables: CreateAt
|
|
|
58
58
|
} | null;
|
|
59
59
|
} | null;
|
|
60
60
|
} | null>;
|
|
61
|
+
/**
|
|
62
|
+
* Update an attendance — change its `rsvpStatus`, check it in, or edit its
|
|
63
|
+
* other attributes; returns the payload as-is, `{ errors, attendance }`.
|
|
64
|
+
*/
|
|
65
|
+
export declare function updateAttendance(client: UiduClient, variables: UpdateAttendanceMutationVariables): Promise<{
|
|
66
|
+
__typename?: "UpdateAttendancePayload";
|
|
67
|
+
attendance?: {
|
|
68
|
+
__typename?: "Attendance";
|
|
69
|
+
id: string;
|
|
70
|
+
rsvpStatus?: string | null;
|
|
71
|
+
checkedIn?: boolean | null;
|
|
72
|
+
} | null;
|
|
73
|
+
errors: Array<{
|
|
74
|
+
__typename?: "Error";
|
|
75
|
+
key: string;
|
|
76
|
+
name: string;
|
|
77
|
+
type: string;
|
|
78
|
+
}>;
|
|
79
|
+
} | null>;
|
|
61
80
|
/**
|
|
62
81
|
* Create an event; returns the payload as-is, `{ errors, event }`, validation
|
|
63
82
|
* failures included.
|
|
@@ -76,3 +95,41 @@ export declare function createEvent(client: UiduClient, variables: CreateEventMu
|
|
|
76
95
|
type: string;
|
|
77
96
|
}>;
|
|
78
97
|
} | null>;
|
|
98
|
+
/**
|
|
99
|
+
* Create a new occurrence (date/time) of a recurring event; returns the
|
|
100
|
+
* payload as-is, `{ errors, eventInstance }`.
|
|
101
|
+
*/
|
|
102
|
+
export declare function createEventInstance(client: UiduClient, variables: CreateEventInstanceMutationVariables): Promise<{
|
|
103
|
+
__typename?: "CreateEventInstancePayload";
|
|
104
|
+
eventInstance?: {
|
|
105
|
+
__typename?: "EventInstance";
|
|
106
|
+
id: string;
|
|
107
|
+
beginsAt?: any | null;
|
|
108
|
+
finishesAt?: any | null;
|
|
109
|
+
} | null;
|
|
110
|
+
errors: Array<{
|
|
111
|
+
__typename?: "Error";
|
|
112
|
+
key: string;
|
|
113
|
+
name: string;
|
|
114
|
+
type: string;
|
|
115
|
+
}>;
|
|
116
|
+
} | null>;
|
|
117
|
+
/**
|
|
118
|
+
* Update an event instance's schedule or venue; returns the payload as-is,
|
|
119
|
+
* `{ errors, eventInstance }`.
|
|
120
|
+
*/
|
|
121
|
+
export declare function updateEventInstance(client: UiduClient, variables: UpdateEventInstanceMutationVariables): Promise<{
|
|
122
|
+
__typename?: "UpdateEventInstancePayload";
|
|
123
|
+
eventInstance?: {
|
|
124
|
+
__typename?: "EventInstance";
|
|
125
|
+
id: string;
|
|
126
|
+
beginsAt?: any | null;
|
|
127
|
+
finishesAt?: any | null;
|
|
128
|
+
} | null;
|
|
129
|
+
errors: Array<{
|
|
130
|
+
__typename?: "Error";
|
|
131
|
+
key: string;
|
|
132
|
+
name: string;
|
|
133
|
+
type: string;
|
|
134
|
+
}>;
|
|
135
|
+
} | null>;
|