@doany-ai/calendar 0.1.0-alpha.3 → 0.1.0-alpha.5
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 +1 -1
- package/dist/types.d.ts +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Keep `AuthProvider` in `src/App.jsx`: `BookingFlow` and `SessionList` read the s
|
|
|
29
29
|
|
|
30
30
|
What the hooks return, as the platform gives them (the fields this package reads; `src/types.ts` has them all).
|
|
31
31
|
|
|
32
|
-
- **BookableService** (`services.list` / `useBookableServices`): `id` (what `slots` and `book` take), `item_name`, `booking_mode` (`appointment` | `class`), `
|
|
32
|
+
- **BookableService** (`services.list` / `useBookableServices`): `id` (what `slots` and `book` take), `item_name`, `booking_mode` (`appointment` | `class`), `online_booking_enabled` (false: the business takes this service's bookings itself; the site shows no booking entry), `variants[]` (`id`, `name`, `duration_minutes`, `price_amount`, `currency`, `is_default`), `payment_requirement` (`none` | `full_online`), `location_type` (`business_address` | `customer_address` | `online`) + `address`, `phone_required`, `booking_fields[]` (the questions: `key`, `type`, `label`, `required`, `options`), `allow_customer_cancel`, `cancellation_cutoff_minutes`, `cancellation_policy_text`, `booking_horizon_days`, `seat_capacity`.
|
|
33
33
|
- **Slot** (`useSlots`): `start_at`, `end_at`, `slot_token` (good for five minutes; holds nothing), `token_expires_at`.
|
|
34
34
|
- **Booking** (`useSessions`): an appointment or a class session: `id`, `version`, `kind`, `status`, `item_name`, `variant_name`, `start_at`, `end_at`, `timezone`, `price_amount`, `currency`, `payment_requirement`, `location_type`, `address`, `booking_fields_snapshot`, `allowed_actions` (`create_registration` while seats are open); a session adds `capacity`, `remaining_seats`, `allowed_variants[]` (the tickets).
|
|
35
35
|
- **Registration** (`useRegistration`, in every booking result): one person's place: `id`, `booking_id`, `version`, `status` (`pending_payment` | `confirmed` | `canceled` | `expired`), `order_id` (when paid online), `hold_expires_at`, `allowed_actions` (`cancel` when the policy allows).
|
package/dist/types.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import type { DoanyClientLike } from "@doany-ai/app-core";
|
|
|
4
4
|
* fields this package reads. A real SDK client satisfies `CalendarClient`
|
|
5
5
|
* structurally (`tests/sdk-contract.types.ts` checks it).
|
|
6
6
|
*/
|
|
7
|
-
export type BookingMode = "appointment" | "class";
|
|
8
|
-
export type PaymentRequirement = "none" | "full_online";
|
|
9
|
-
export type LocationType = "business_address" | "customer_address" | "online";
|
|
7
|
+
export type BookingMode = "appointment" | "class" | (string & {});
|
|
8
|
+
export type PaymentRequirement = "none" | "full_online" | (string & {});
|
|
9
|
+
export type LocationType = "business_address" | "customer_address" | "online" | (string & {});
|
|
10
10
|
export interface BookingField {
|
|
11
11
|
key: string;
|
|
12
12
|
type: "text" | "textarea" | "select" | "multiselect" | "checkbox";
|
|
@@ -30,8 +30,8 @@ export interface BookableService {
|
|
|
30
30
|
catalog_item_id: string;
|
|
31
31
|
booking_mode: BookingMode;
|
|
32
32
|
status: string;
|
|
33
|
-
/** `false`: the business
|
|
34
|
-
|
|
33
|
+
/** `false`: the business takes this service's bookings itself; the site shows no booking entry. */
|
|
34
|
+
online_booking_enabled: boolean;
|
|
35
35
|
version: number;
|
|
36
36
|
item_name: string;
|
|
37
37
|
item_version: number;
|
|
@@ -83,8 +83,8 @@ export interface SessionVariant {
|
|
|
83
83
|
export interface Booking {
|
|
84
84
|
id: string;
|
|
85
85
|
version: number;
|
|
86
|
-
kind: "appointment" | "session";
|
|
87
|
-
status: "scheduled" | "canceled";
|
|
86
|
+
kind: "appointment" | "session" | (string & {});
|
|
87
|
+
status: "scheduled" | "canceled" | (string & {});
|
|
88
88
|
service_setting_id: string;
|
|
89
89
|
catalog_item_variant_id: string;
|
|
90
90
|
item_name: string;
|
|
@@ -116,7 +116,7 @@ export interface Attendee {
|
|
|
116
116
|
phone?: string | null;
|
|
117
117
|
answers?: Record<string, unknown>;
|
|
118
118
|
}
|
|
119
|
-
export type RegistrationStatus = "pending_payment" | "confirmed" | "canceled" | "expired";
|
|
119
|
+
export type RegistrationStatus = "pending_payment" | "confirmed" | "canceled" | "expired" | (string & {});
|
|
120
120
|
export interface Registration {
|
|
121
121
|
id: string;
|
|
122
122
|
booking_id: string;
|
|
@@ -200,8 +200,8 @@ export interface RegistrationDetail {
|
|
|
200
200
|
/** A catalog item as the service pages read it: what the booking record does not carry. */
|
|
201
201
|
export interface CatalogItemSummary {
|
|
202
202
|
id: string;
|
|
203
|
-
type?: "service" | "product" | "plan" | "bundle";
|
|
204
|
-
kind: "service" | "physical" | "digital" | "plan" | "bundle";
|
|
203
|
+
type?: "service" | "product" | "plan" | "bundle" | (string & {});
|
|
204
|
+
kind: "service" | "physical" | "digital" | "plan" | "bundle" | (string & {});
|
|
205
205
|
status: string;
|
|
206
206
|
name: string;
|
|
207
207
|
description: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doany-ai/calendar",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.5",
|
|
4
4
|
"description": "Booking the business's services, on a Doany site: calendar hooks and default components (service list, date and time picker, booking flow, class sessions, booking status)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|