@acms-subir/client 0.1.16 → 0.1.17
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/README.md +2 -1
- package/dist/types.d.ts +13 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ language. Update the site before shipping an app build with a newer client.
|
|
|
48
48
|
| `calendars()` | Public calendars |
|
|
49
49
|
| `resources(opts)`, `resource(slug, opts)` | Public resources; slug lookup scans list pages |
|
|
50
50
|
| `availability(opts)` | Required `resource`, `link`; optional `from`, `days`, `minutes` |
|
|
51
|
-
| `rsvpStatus(slug, { start })` | One event date's RSVP status: `open` or `reason` (`disabled`, `ended`, `cancelled`, `full`), live `going`/`left`, `maxSeats` for one RSVP right now, `autoConfirm`, and `form` (questions and `version`, or `null`). `start` is the occurrence's start exactly as `events()` returns it (a UTC ISO string such as `2026-10-05T14:00:00.000Z`). Never cached |
|
|
51
|
+
| `rsvpStatus(slug, { start })` | One event date's RSVP status: `open` or `reason` (`disabled`, `ended`, `closed` past the event's deadline, `cancelled`, `full`), `closesAt` (when RSVPs to the date close, or `null`: open until it ends), live `going`/`left`, `maxSeats` for one RSVP right now, `autoConfirm`, and `form` (questions and `version`, or `null`). `start` is the occurrence's start exactly as `events()` returns it (a UTC ISO string such as `2026-10-05T14:00:00.000Z`). Never cached |
|
|
52
52
|
| `book(opts)` | Resource booking or RSVP input (`RsvpInput` for an RSVP), optional `idempotencyKey`; sends the client's `locale` (or `opts.locale`) for its emails |
|
|
53
53
|
| `openapi()` | Raw OpenAPI document |
|
|
54
54
|
| `registerDevice({ token, platform, locale?, topics?, channels? })` | Register or refresh an Expo push token (call on every app start); `{ created, device }`. `channels`: Android channels the app created (e.g. `['urgent']`) |
|
|
@@ -121,6 +121,7 @@ if (status.open) {
|
|
|
121
121
|
// required when the event asks questions: a changed form answers 409, so read the status again
|
|
122
122
|
...(status.form ? { formVersion: status.form.version } : {}),
|
|
123
123
|
};
|
|
124
|
+
// an email that already has an RSVP for this date: AcmsError 409 with code 'duplicate' (its link is emailed again)
|
|
124
125
|
const result = await client.book({ ...rsvp, idempotencyKey: crypto.randomUUID() });
|
|
125
126
|
// pending when the organiser approves RSVPs; status.form?.confirmation is the thank-you text.
|
|
126
127
|
// result.manageToken changes or cancels it later (manageBooking, cancelBooking), like the email's link:
|
package/dist/types.d.ts
CHANGED
|
@@ -221,6 +221,8 @@ export type Event = {
|
|
|
221
221
|
"capacity": number;
|
|
222
222
|
"autoConfirm": boolean;
|
|
223
223
|
"maxSeats": number;
|
|
224
|
+
"closesAt": string | null;
|
|
225
|
+
"closeBefore": number;
|
|
224
226
|
"form"?: {
|
|
225
227
|
"title": string;
|
|
226
228
|
"intro": string;
|
|
@@ -311,6 +313,8 @@ export type Events = {
|
|
|
311
313
|
"capacity": number;
|
|
312
314
|
"autoConfirm": boolean;
|
|
313
315
|
"maxSeats": number;
|
|
316
|
+
"closesAt": string | null;
|
|
317
|
+
"closeBefore": number;
|
|
314
318
|
"form"?: {
|
|
315
319
|
"title": string;
|
|
316
320
|
"intro": string;
|
|
@@ -450,6 +454,8 @@ export type SearchResults = {
|
|
|
450
454
|
"capacity": number;
|
|
451
455
|
"autoConfirm": boolean;
|
|
452
456
|
"maxSeats": number;
|
|
457
|
+
"closesAt": string | null;
|
|
458
|
+
"closeBefore": number;
|
|
453
459
|
"form"?: {
|
|
454
460
|
"title": string;
|
|
455
461
|
"intro": string;
|
|
@@ -610,12 +616,13 @@ export type RsvpStatus = {
|
|
|
610
616
|
"start": string;
|
|
611
617
|
"end": string;
|
|
612
618
|
"open": boolean;
|
|
613
|
-
"reason": ("disabled" | "ended" | "cancelled" | "full") | (null);
|
|
619
|
+
"reason": ("disabled" | "ended" | "closed" | "cancelled" | "full") | (null);
|
|
614
620
|
"going": number;
|
|
615
621
|
"left": (number) | (null);
|
|
616
622
|
"capacity": number;
|
|
617
623
|
"maxSeats": number;
|
|
618
624
|
"autoConfirm": boolean;
|
|
625
|
+
"closesAt": (string) | (null);
|
|
619
626
|
"form": ({
|
|
620
627
|
"version": string;
|
|
621
628
|
"title": string;
|
|
@@ -967,7 +974,7 @@ export type LiveStatus = {
|
|
|
967
974
|
export type ApiErrorResponse = {
|
|
968
975
|
"version": 1;
|
|
969
976
|
"error": {
|
|
970
|
-
"code": "invalid_request" | "unauthorized" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "gone" | "payload_too_large" | "unsupported_media_type" | "rate_limited" | "upstream_error" | "internal_error";
|
|
977
|
+
"code": "invalid_request" | "unauthorized" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "duplicate" | "gone" | "payload_too_large" | "unsupported_media_type" | "rate_limited" | "upstream_error" | "internal_error";
|
|
971
978
|
"message": string;
|
|
972
979
|
"issues"?: Array<{
|
|
973
980
|
"path": Array<string | number>;
|
|
@@ -1153,6 +1160,8 @@ export type EditorDocument = {
|
|
|
1153
1160
|
"capacity": number;
|
|
1154
1161
|
"autoConfirm": boolean;
|
|
1155
1162
|
"maxSeats": number;
|
|
1163
|
+
"closesAt": string | null;
|
|
1164
|
+
"closeBefore": number;
|
|
1156
1165
|
"form"?: {
|
|
1157
1166
|
"title": string;
|
|
1158
1167
|
"intro": string;
|
|
@@ -2083,6 +2092,8 @@ export type EditorSaveInput = {
|
|
|
2083
2092
|
"capacity": number;
|
|
2084
2093
|
"autoConfirm": boolean;
|
|
2085
2094
|
"maxSeats": number;
|
|
2095
|
+
"closesAt"?: (string) | (null);
|
|
2096
|
+
"closeBefore"?: number;
|
|
2086
2097
|
"form"?: {
|
|
2087
2098
|
"title"?: string;
|
|
2088
2099
|
"intro"?: string;
|