@uidu/client 3.16.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 CHANGED
@@ -1,5 +1,26 @@
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
+
3
24
  ## 3.16.0
4
25
 
5
26
  ### 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>;