@craftware/crafty-sdk 0.10.4 → 0.12.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.
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/resources/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAmB3C,SAAS,SAAS,CAAC,IAAgB,EAAE,IAAY;IAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAEpC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,WAAW,CAAC;YACpB,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,yDAAyD;SACnE,CAAC,CAAC;IACL,CAAC;IAED,OAAO,UAAU,kBAAkB,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,CAAC;AACzD,CAAC;AAED,SAAS,KAAK,CAAC,KAAgC;IAC7C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC5G,CAAC;AAED,MAAM,OAAO,aAAa;IACY;IAApC,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExD,0FAA0F;IACnF,KAAK,CAAC,GAAG,CAAC,OAAwB;QACvC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;QAEnG,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF;AAED,MAAM,OAAO,cAAc;IACW;IAApC,YAAoC,IAAgB;QAAhB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CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;QAEzI,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAUM,KAAK,CAAC,KAAK,CAChB,cAA6E,EAC7E,OAA+B;QAE/B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC;YAC3C,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,cAA2C,EAAE,OAAO,CAAC;YACzE,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,cAAmD,EAAE,OAAO,CAAC,CAAC;QACpF,OAAO,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC;QAE9B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
@@ -433,8 +433,21 @@ export type CraftyOrderLine = {
433
433
  unit_price: string;
434
434
  quantity: number;
435
435
  amount: string;
436
+ /** This line's share of the coupon discount. */
437
+ discount: string;
436
438
  tax: CraftyStoreTax | null;
437
439
  };
440
+ export type CraftyCouponType = "percent" | "fixed" | "free_delivery";
441
+ /** The coupon an order or quote applied, as its rules stood then. */
442
+ export type CraftyAppliedCoupon = {
443
+ code: string;
444
+ type: CraftyCouponType;
445
+ percent: string | null;
446
+ amount: string | null;
447
+ max_discount: string | null;
448
+ min_subtotal: string | null;
449
+ };
450
+ export type CraftyCouponErrorReason = "not_found" | "paused" | "not_started" | "expired" | "exhausted" | "used_by_email" | "minimum" | "not_eligible" | "too_many_attempts";
438
451
  export type CraftyOrderTaxLine = CraftyStoreTax & {
439
452
  base: string;
440
453
  amount: string;
@@ -454,11 +467,24 @@ export type CraftyQuote = {
454
467
  }>;
455
468
  item_count: number;
456
469
  subtotal: string;
470
+ /** Discount of the coupon on the products, before taxes. */
471
+ discount_total: string;
457
472
  delivery_fee: string;
473
+ /** The delivery fee a free-delivery coupon waived. */
474
+ delivery_discount: string;
458
475
  delivery_free_from: string | null;
459
476
  taxes: CraftyOrderTaxLine[];
460
477
  tax_total: string;
461
478
  total: string;
479
+ /** The coupon that applied, or null. */
480
+ coupon: CraftyAppliedCoupon | null;
481
+ /** Why the code sent doesn't apply (localized `message`); `missing` is what the cart lacks to reach its minimum. */
482
+ coupon_error: {
483
+ code: string;
484
+ reason: CraftyCouponErrorReason;
485
+ message: string;
486
+ missing: string | null;
487
+ } | null;
462
488
  };
463
489
  export type CraftyQuoteResponse = SingleResponse<CraftyQuote>;
464
490
  export type CraftyOrderStatus = "new" | "confirmed" | "ready" | "delivered" | "cancelled";
@@ -467,7 +493,8 @@ export type CraftyOrder = {
467
493
  number: string;
468
494
  status: CraftyOrderStatus;
469
495
  payment_status: "pending" | "paid";
470
- payment_method: CraftyPaymentMethod;
496
+ /** "none" when a coupon left nothing to pay. */
497
+ payment_method: CraftyPaymentMethod | "none";
471
498
  fulfillment: CraftyFulfillment;
472
499
  source: "site" | "panel" | "mcp";
473
500
  locale: string | null;
@@ -487,7 +514,10 @@ export type CraftyOrder = {
487
514
  pickup_address: string | null;
488
515
  items: CraftyOrderLine[];
489
516
  subtotal: string;
517
+ discount_total: string;
490
518
  delivery_fee: string;
519
+ delivery_discount: string;
520
+ coupon: CraftyAppliedCoupon | null;
491
521
  taxes: CraftyOrderTaxLine[];
492
522
  tax_total: string;
493
523
  total: string;
@@ -516,7 +546,124 @@ export type CraftyCheckoutOptions = RequestOptions & {
516
546
  fields?: Record<string, string>;
517
547
  /** Delivery or pickup as chosen in the cart; the checkout opens with it selected. */
518
548
  fulfillment?: CraftyFulfillment;
549
+ /** A discount code to open the checkout with, e.g. `cart.coupon()`; the visitor can still change or remove it there. */
550
+ coupon?: string | null;
519
551
  /** Called with the new session before the browser leaves, e.g. `(session) => cart.rememberCheckout(session.id)`. */
520
552
  onSession?: (session: CraftyCheckoutSession) => void;
521
553
  };
554
+ /** A service visitors can book (an entry of "servicios"). `price` is a decimal string. */
555
+ export type CraftyBookingService = {
556
+ slug: string;
557
+ name: string;
558
+ description: string | null;
559
+ duration_minutes: number;
560
+ price: string | null;
561
+ /** Slugs of the professionals who do it. */
562
+ professionals: string[];
563
+ };
564
+ /** Someone who takes bookings (an entry of "profesionales"). */
565
+ export type CraftyBookingProfessional = {
566
+ slug: string;
567
+ name: string;
568
+ bio: string | null;
569
+ };
570
+ /** One range of opening hours, local times "HH:MM". */
571
+ export type CraftyBookingHoursRange = {
572
+ start: string;
573
+ end: string;
574
+ };
575
+ export type CraftyBookingWeekday = "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
576
+ /** The business's public booking settings (`GET /bookings`). */
577
+ export type CraftyBookingConfig = {
578
+ /** True while the business takes bookings. */
579
+ enabled: boolean;
580
+ name: string;
581
+ /** IANA time zone of the business; every local time is in it. */
582
+ timezone: string;
583
+ currency: string;
584
+ services_collection: string;
585
+ professionals_collection: string;
586
+ services: CraftyBookingService[];
587
+ professionals: CraftyBookingProfessional[];
588
+ hours: Record<CraftyBookingWeekday, CraftyBookingHoursRange[]>;
589
+ closed_dates: string[];
590
+ min_notice_minutes: number;
591
+ max_days_ahead: number;
592
+ cancel_notice_minutes: number;
593
+ payment_methods: Array<"pay_at_venue" | "transfer">;
594
+ address: string | null;
595
+ phone: string | null;
596
+ checkout_url: string | null;
597
+ };
598
+ export type CraftyBookingConfigResponse = SingleResponse<CraftyBookingConfig>;
599
+ /** A free start time. Pass `start` to `checkout.start({ booking })`. */
600
+ export type CraftyAvailabilitySlot = {
601
+ /** ISO 8601 with the business's offset, e.g. "2026-11-02T10:00:00-04:00". */
602
+ start: string;
603
+ /** Local time "HH:MM". */
604
+ time: string;
605
+ /** Slugs of the professionals free at this time. */
606
+ professionals: string[];
607
+ };
608
+ export type CraftyAvailabilityDay = {
609
+ /** Local date "YYYY-MM-DD". */
610
+ date: string;
611
+ /** Closed all day (weekly hours or a closed date). */
612
+ closed: boolean;
613
+ slots: CraftyAvailabilitySlot[];
614
+ };
615
+ export type CraftyAvailability = {
616
+ service: string;
617
+ timezone: string;
618
+ days: CraftyAvailabilityDay[];
619
+ };
620
+ export type CraftyAvailabilityResponse = SingleResponse<CraftyAvailability>;
621
+ export type CraftyAvailabilityQuery = {
622
+ /** Service slug. */
623
+ service: string;
624
+ /** Professional slug; leave it out for anyone free. */
625
+ professional?: string | null;
626
+ /** First local date "YYYY-MM-DD" (default today). */
627
+ from?: string;
628
+ /** Last local date "YYYY-MM-DD" (default from + 6 days, at most 62 days). */
629
+ to?: string;
630
+ };
631
+ /** The slot to book: what `checkout.start({ booking })` takes. */
632
+ export type CraftyBookingRequest = {
633
+ service: string;
634
+ /** Professional slug; leave it out for whoever is free at that time. */
635
+ professional?: string | null;
636
+ /** A slot's `start`, or a local "YYYY-MM-DD HH:MM". */
637
+ start: string;
638
+ };
639
+ export type CraftyBookingCheckoutSession = CraftyCheckoutSession & {
640
+ /** Until when the slot is held for the visitor. */
641
+ held_until: string;
642
+ };
643
+ export type CraftyBookingCheckoutSessionResponse = SingleResponse<CraftyBookingCheckoutSession>;
644
+ export type CraftyBookingStatus = "pending" | "confirmed" | "completed" | "no_show" | "cancelled";
645
+ /** A booking as its customer sees it (`bookings.get(number, token)`). */
646
+ export type CraftyBooking = {
647
+ number: string;
648
+ status: CraftyBookingStatus;
649
+ service: {
650
+ name: string;
651
+ duration_minutes: number;
652
+ };
653
+ professional: {
654
+ name: string;
655
+ } | null;
656
+ starts_at: string;
657
+ ends_at: string;
658
+ timezone: string;
659
+ customer: {
660
+ name: string | null;
661
+ };
662
+ currency: string;
663
+ total: string;
664
+ payment_method: string | null;
665
+ payment_status: "pending" | "paid";
666
+ cancelled_at: string | null;
667
+ };
668
+ export type CraftyBookingResponse = SingleResponse<CraftyBooking>;
522
669
  //# sourceMappingURL=public.d.ts.map
@@ -1 +1 @@
1
-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,IAAI,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "0.10.4";
1
+ export declare const SDK_VERSION = "0.12.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Generated by scripts/write-version.mjs from package.json. Do not edit.
2
- export const SDK_VERSION = "0.10.4";
2
+ export const SDK_VERSION = "0.12.0";
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@craftware/crafty-sdk",
3
- "version": "0.10.4",
3
+ "version": "0.12.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -40,13 +40,13 @@ npm create crafty@latest mi-sitio -- --url=https://<tenant>.crafty.do
40
40
  # same flow: npx @craftware/crafty-cli create mi-sitio --url=https://<tenant>.crafty.do
41
41
  ```
42
42
 
43
- It asks for the framework and template (today: Astro, `astro-services` = "sitio de servicios", `astro-store` = "tienda" or `astro-docs` = "documentación"; Next.js and Nuxt are coming), logs in through the browser (device flow; the user approves, an admin account is needed), creates the site with the starter's block types, collections, form and demo content, configures the visual editor routes, and writes `.env` (`CRAFTY_API_URL`, `CRAFTY_API_KEY`, `CRAFTY_SITE`), `crafty.json` and `src/crafty.types.ts`. Then:
43
+ It asks for the framework and template (today: Astro, `astro-services` = "sitio de servicios", `astro-store` = "tienda", `astro-booking` = "barbería / salón (citas)" or `astro-docs` = "documentación"; Next.js and Nuxt are coming), logs in through the browser (device flow; the user approves, an admin account is needed), creates the site with the starter's block types, collections, form and demo content, configures the visual editor routes, and writes `.env` (`CRAFTY_API_URL`, `CRAFTY_API_KEY`, `CRAFTY_SITE`), `crafty.json` and `src/crafty.types.ts`. Then:
44
44
 
45
45
  ```bash
46
46
  cd mi-sitio && npm install && npm run dev # npm run deploy → Crafty Hosting
47
47
  ```
48
48
 
49
- - Flags (after `--`): `--url`, `--framework=astro`, `--template=astro-services|astro-store|astro-docs`, `--name`, `--site=<slug>`, `--draft` (keep demo content as drafts; by default it is published so the static build shows it), `--yes` (no prompts). Agents should pass `--url` and `--yes` so nothing blocks on a prompt; the browser approval still needs the user.
49
+ - Flags (after `--`): `--url`, `--framework=astro`, `--template=astro-services|astro-store|astro-booking|astro-docs`, `--name`, `--site=<slug>`, `--draft` (keep demo content as drafts; by default it is published so the static build shows it), `--yes` (no prompts). Agents should pass `--url` and `--yes` so nothing blocks on a prompt; the browser approval still needs the user.
50
50
  - The command is interactive only for the login: tell the user to open the printed URL and approve the code.
51
51
  - After it finishes, **read the project's `AGENTS.md`** and follow its conventions (one renderer per block type in `src/render/blocks/`, routes in `src/lib/routes.ts`, `npm run types` after changing the content model) instead of the generic steps in Phase 2.
52
52
  - If the site slug already exists it fails before creating anything; if provisioning fails midway it names the half-created site: delete it in the panel or rerun with another `--site`.
@@ -173,6 +173,8 @@ Structured data (schema.org JSON-LD for Google rich results and AI search): do *
173
173
 
174
174
  Online store (when the site's "Tienda" tab is on): products are entries of `productos`; keep the cart with `createCart()` from `@craftware/crafty-sdk/cart`, show totals from `crafty.orders.quote(cart.items())` and send the visitor to Crafty's hosted checkout with `crafty.checkout.start(cart.items())`. Never compute prices or taxes in the frontend. **Details: `references/online-store.md`.**
175
175
 
176
+ Online bookings (when the site's "Citas" tab is on): services and professionals are entries of `servicios` and `profesionales`; show free times from `crafty.bookings.availability({ service, professional })` in the browser and send the visitor to the hosted checkout with `crafty.checkout.start({ booking: { service, professional, start } })`. Never compute free times in the frontend. **Details: `references/online-bookings.md`.**
177
+
176
178
  ## Phase 3 — Deploy a static site with the CLI
177
179
 
178
180
  ```bash
@@ -241,5 +243,6 @@ These are two different credentials — do not mix them:
241
243
  - `references/mcp-configuration.md` — connecting every client, scopes, and the full MCP tool catalog with workflows.
242
244
  - `references/sdk-development.md` — the complete SDK surface, block helpers, error handling, and examples.
243
245
  - `references/online-store.md` — the online store: switching it on (`configure_store`), the products collection, cart, quotes, hosted checkout, orders and webhooks.
246
+ - `references/online-bookings.md` — online bookings: switching them on (`configure_bookings`), services and professionals, hours and blocks, free slots, the hosted checkout, the calendar, the API, MCP tools and webhooks.
244
247
  - `references/migrate-to-crafty.md` — migrating an existing site (WordPress or any other) into Crafty: crawl, classify, model, bulk import as drafts, media, redirects, human review, publish.
245
248
  - `references/visual-editor.md` — preparing a site for the visual editor: the mandatory question, marking, preview tokens, bridge, headers, `configure_visual_editor`, verification.
@@ -158,8 +158,20 @@ Form submissions may contain personal data, so they require their own scope.
158
158
  | `configure_store` | `site_id` | `environment` (default `production`), `enabled`, `currency`, `order_prefix`, `prices_include_tax`, `taxes`, `default_tax`, `delivery` (`enabled`, `fee`, `free_from`, `tax`, `zone`), `pickup` (`enabled`, `address`), `payment_methods` (`cash_on_delivery`, `pay_at_pickup`, `transfer`), `transfer_accounts`, `notify_emails`, `customer_emails`, `return_url`, `color`, `logo_media_id`, `font`, `corners`, `checkout_fields`, `checkout_analytics`, `captcha` | admins only; `enabled: true` needs the store in the plan and creates (or adopts) the `productos` collection and the checkout URL; only sent keys change; with only `site_id` it just reads; returns the settings, `open`, the products summary and `checkout_url`. See `online-store.md` |
159
159
  | `list_orders` | `site_id` | `environment`, `status`, `payment_status`, `search`, `limit`, `page` | needs the `orders` permission (read) |
160
160
  | `get_order` | `site_id`, `number` | `environment` | the order with its lines (`id`s for `update_order`), `fields`, `metadata`, `payment_url`, `next_statuses` and history |
161
- | `create_order` | `site_id`, `customer`, `fulfillment`, `payment_method`, `items` | `environment`, `address`, `fields`, `metadata`, `locale`, `expected_total` | `orders` write permission; source `mcp`; returns the order and its `payment_url` |
162
- | `update_order` | `site_id`, `number` | `environment`, edit keys (`items`, `fulfillment`, `payment_method`, `customer`, `address`, `fields`, `metadata`), `notify`, `status`, `paid`, `payment_reference`, `internal_note` | edits only unpaid open orders (metadata always); old lines keep their price; fires `order.updated` |
161
+ | `create_order` | `site_id`, `customer`, `fulfillment`, `payment_method`, `items` | `environment`, `address`, `fields`, `metadata`, `coupon`, `locale`, `expected_total` | `orders` write permission; source `mcp`; returns the order and its `payment_url` |
162
+ | `update_order` | `site_id`, `number` | `environment`, edit keys (`items`, `fulfillment`, `payment_method`, `customer`, `address`, `fields`, `metadata`, `coupon`, `coupon_below_minimum`), `notify`, `status`, `paid`, `payment_reference`, `internal_note` | edits only unpaid open orders (metadata always); old lines keep their price; fires `order.updated` |
163
+ | `list_coupons` | `site_id` | `environment`, `status`, `search` | coupons with `status`, `uses`, `orders`, `sales`, `discounted`; needs the `coupons` permission (read) |
164
+ | `get_coupon` | `site_id`, `code` | `environment` | one coupon's rules (products as slugs) and results |
165
+ | `upsert_coupon` | `site_id`, `code` | `environment`, `name`, `type`, `value`, `max_discount`, `min_subtotal`, `applies_to`, `products`, `max_uses`, `max_uses_per_email`, `starts_at`, `ends_at`, `is_active` | creates or changes by code; a used coupon keeps its code and type; needs `coupons` write |
166
+ | `delete_coupon` | `site_id`, `code` | `environment` | deletes an unused coupon, pauses a used one |
167
+ | `configure_bookings` | `site_id` | `environment` (default `production`), `enabled`, `timezone`, `hours` (merged by weekday), `closed_dates`, `min_notice_minutes`, `max_days_ahead`, `slot_interval`, `cancel_notice_minutes`, `auto_confirm`, `reminder_hours`, `payment_methods` (`pay_at_venue`, `transfer`), `address`, `phone`, `checkout_fields` | admins only; `enabled: true` needs bookings in the plan and creates (or adopts) the `servicios` and `profesionales` collections; only sent keys change; with only `site_id` it just reads; returns the settings, `open`, the service and professional slugs and `checkout_url`. See `online-bookings.md` |
168
+ | `get_booking_availability` | `site_id` | `environment`, `service`, `professional`, `from`, `to` | without `service`: the bookable services and professionals; with it: free slots per local day (up to 31 days), each with the professionals free |
169
+ | `list_bookings` | `site_id` | `environment`, `from`, `to`, `status`, `professional`, `search`, `metadata`, `limit`, `page` | needs the bookings permission (read) |
170
+ | `get_booking` | `site_id`, `number` | `environment` | the booking with `next_statuses`, `internal_note`, `customer_url` and `events` |
171
+ | `create_booking` | `site_id`, `service`, `start`, `customer` | `environment`, `professional`, `payment_method`, `fields`, `metadata`, `outside_hours`, `internal_note`, `locale` | bookings write permission; source `mcp`; a taken slot answers `SLOT_UNAVAILABLE` |
172
+ | `update_booking` | `site_id`, `number` | `environment`, `start`, `professional`, `outside_hours`, `status`, `paid`, `payment_reference`, `internal_note`, `metadata` | moves, changes the status, marks paid; returns the booking and `applied` |
173
+ | `set_professional_schedule` | `site_id`, `professional` | `environment`, `mode` (`shop`/`own`), `hours` | without `mode` it reads; own hours always fall inside the shop's |
174
+ | `manage_booking_blocks` | `site_id`, `action` (`list`/`create`/`delete`) | `environment`, `professional`, `repeat` (`once`/`weekly`), `from_date`, `to_date`, `all_day`, `start_time`, `end_time`, `weekdays`, `reason`, `id` (to delete) | blocks time for one professional or the whole shop; `create` returns how many bookings already fall inside |
163
175
  | `upsert_assistant_answer` | `site_id`, `question`, `answer` | `environment` (default `production`), `answer_id` | adds a fixed answer, or edits the one with `answer_id`; the assistant uses it from the next visitor message |
164
176
  | `delete_assistant_answer` | `site_id`, `answer_id` | `environment` (default `production`) | deletes one fixed answer |
165
177
  | `upsert_redirects` | `site_id`, `redirects` | `environment` (default `production`), `dry_run` | up to 500 `{ source, destination, status_code? }` per call, matched by `source`; `source` is a path starting with `/` (no spaces, `?` or `#`; Cloudflare Pages `*` splats and `:placeholders` allowed), `destination` a path or absolute http(s) URL, `status_code` 301 (default) / 302 / 307 / 308; invalid items are listed in `failed` and skipped. Crafty hosting writes them to `_redirects` on the next deploy (after the site's own rules; limit 2000 static + 100 dynamic); custom frontends read `GET /api/v1/redirects` |
@@ -0,0 +1,210 @@
1
+ # Online bookings
2
+
3
+ Crafty takes appointments for any site that works by the hour: barbershops, salons, spas, studios, clinics. Visitors pick a service, a professional (or "whoever is free") and a free time; Crafty's **hosted checkout** asks for their details and confirms the booking. The business sees it in the panel's calendar, the customer gets a confirmation with a calendar file and a reminder, and both can cancel. Crafty charges no commission.
4
+
5
+ Payments are manual for now: the customer **pays at the venue** or by **bank transfer**. Card deposits through the business's own gateway come later and plug into the same bookings.
6
+
7
+ The frontend never decides which times are free and never touches payment data. It lists services, asks Crafty for the free slots of one service, and sends the visitor to the hosted checkout with the slot they chose, which stays held for them while they fill in their details.
8
+
9
+ ## How it fits together
10
+
11
+ | Piece | Where | What it does |
12
+ | --- | --- | --- |
13
+ | Plan | Crafty central (`bookings_enabled`) | The workspace's plan must include online bookings. It is separate from the store. |
14
+ | Settings | Panel → site → **Citas → Ajustes**, or `configure_bookings` (admins) | Switch bookings on per environment; time zone, weekly hours, closed dates, notice, how far ahead, slot interval, cancellation window, auto-confirm, reminder, payment methods, address, phone, the booking's own fields. |
15
+ | Services | The `servicios` collection | One published entry per service, with its duration and price. |
16
+ | Professionals | The `profesionales` collection | One entry per person who takes bookings. Each can have their own hours and blocked times. |
17
+ | Booking page | Your frontend, with the SDK | `crafty.bookings.config()` and `crafty.bookings.availability()`; `crafty.checkout.start({ booking })`. |
18
+ | Checkout | `checkout.crafty.do/{store}/c/{session}` (hosted) | Customer details, the booking's fields, payment method, captcha; confirms the booking. |
19
+ | Booking page for the customer | `checkout.crafty.do/{store}/o/{number}?t={token}` | Date, time, who, price, payment instructions, add to calendar (`.ics`), cancel. Linked from every email. |
20
+ | Calendar | Panel → **Citas** | Day, week and list views per professional; create, move, confirm, complete, no-show, cancel, mark paid, internal note, resend the email; block time. |
21
+ | Integrations | Webhooks `booking.created`, `booking.updated`, `booking.cancelled`, `booking.reminder_sent`; the authenticated API and the MCP tools | Sync with another calendar, a CRM or a POS. |
22
+
23
+ Every booking is also an order (`kind: "booking"`), so it shares the store's order numbers, emails, taxes, checkout look and analytics.
24
+
25
+ ## 1. Switch bookings on
26
+
27
+ In the panel: site → **Citas** → **Ajustes** → **Activar citas**. Through MCP (admins):
28
+
29
+ ```json
30
+ configure_bookings {
31
+ "site_id": 3,
32
+ "enabled": true,
33
+ "timezone": "America/Santo_Domingo",
34
+ "hours": {
35
+ "mon": [],
36
+ "tue": [{ "start": "09:00", "end": "13:00" }, { "start": "14:00", "end": "19:00" }],
37
+ "sat": [{ "start": "08:00", "end": "18:00" }],
38
+ "sun": [{ "start": "09:00", "end": "13:00" }]
39
+ },
40
+ "closed_dates": ["2026-12-25"],
41
+ "min_notice_minutes": 60,
42
+ "max_days_ahead": 30,
43
+ "slot_interval": 15,
44
+ "cancel_notice_minutes": 120,
45
+ "auto_confirm": true,
46
+ "reminder_hours": 24,
47
+ "payment_methods": { "pay_at_venue": true, "transfer": false },
48
+ "address": "Calle El Conde 101, Zona Colonial",
49
+ "phone": "809-555-0101"
50
+ }
51
+ ```
52
+
53
+ Switching it on:
54
+
55
+ - creates the `servicios` and `profesionales` collections, or adopts existing ones with those slugs when their booking fields have the types below (otherwise it reports the conflicting fields);
56
+ - gives the environment a checkout URL (the same handle as the store);
57
+ - keeps every setting you leave out. `hours` merges by weekday: a day left out keeps its hours, `[]` closes it; up to 3 ranges per day.
58
+
59
+ | Setting | Default | Meaning |
60
+ | --- | --- | --- |
61
+ | `timezone` | `America/Santo_Domingo` | Every local time (hours, slots, emails) is in it. |
62
+ | `hours` | Mon–Sat 09:00–18:00 | The shop's weekly hours. A professional's own hours always fall inside them. |
63
+ | `min_notice_minutes` | 120 | The latest a visitor can book before a slot. |
64
+ | `max_days_ahead` | 30 | How far ahead visitors can book (1–365). |
65
+ | `slot_interval` | 15 | Minutes between offered start times (5, 10, 15, 20, 30, 60). |
66
+ | `cancel_notice_minutes` | 120 | Until when the customer can cancel online (0 = until it starts). |
67
+ | `auto_confirm` | `true` | `false` leaves site bookings pending until the shop confirms them. |
68
+ | `reminder_hours` | 24 | Hours before the booking to email a reminder (0 turns it off). |
69
+
70
+ Switching it off stops new bookings; existing bookings and the collections stay. Send `configure_bookings` with only `site_id` to read the current settings, the service and professional slugs and the checkout URL.
71
+
72
+ Notification emails, the transfer accounts, the return URL and the checkout's look are the store's settings (`configure_store`), so they are shared with orders.
73
+
74
+ ## 2. Services and professionals
75
+
76
+ While bookings are on, these fields can be relabeled but not removed or retyped, and the collections can't be deleted. Add any other fields you need.
77
+
78
+ | Collection | Field | Type | Notes |
79
+ | --- | --- | --- | --- |
80
+ | `servicios` | `nombre` | string, required | Name (also the title and slug source). |
81
+ | | `duracion` | number, required | Minutes the booking takes (5–720). |
82
+ | | `precio` | decimal, required | Price in the store currency. A service without a price can't be booked. |
83
+ | | `impuesto` | string | A tax key of the store (`itbis-18`…). Empty uses the default. |
84
+ | | `imagenes` | multiReference → Media | |
85
+ | | `profesionales` | multiReference → `profesionales` | Who does it. **Empty means everyone.** |
86
+ | | `margen` | number | Minutes kept free after it (cleanup); never shown to the customer. |
87
+ | | `deposito` | decimal | Deposit when card payments arrive. |
88
+ | `profesionales` | `nombre` | string, required | |
89
+ | | `foto` | reference → Media | |
90
+ | | `activo` | boolean | `false` stops taking bookings without deleting the entry. |
91
+
92
+ Only **published** services and active, published professionals are bookable. A shop without professionals still works: bookings go to the shop as a whole, one at a time.
93
+
94
+ Each professional's hours and blocks (Panel → Citas → click their name, or MCP):
95
+
96
+ - `set_professional_schedule { site_id, professional: "luis", mode: "own", hours: { … } }` gives them their own weekly hours; `mode: "shop"` goes back to the shop's.
97
+ - `manage_booking_blocks` with `action: "create"` blocks a range once (`from_date`, `to_date`, `all_day` or `start_time`/`end_time`) or every week (`repeat: "weekly"`, `weekdays`, times), for one professional or the whole shop. It answers how many bookings already fall inside (they stay; move or cancel them). `action: "list"` and `action: "delete"` read and remove blocks.
98
+
99
+ ## 3. The booking page in the frontend
100
+
101
+ ```ts
102
+ import { createCraftyClient, CraftyError } from "@craftware/crafty-sdk";
103
+
104
+ const crafty = createCraftyClient({ baseUrl, apiKey, siteSlug: "navaja" });
105
+
106
+ const config = await crafty.bookings.config();
107
+ // { enabled, timezone, currency, services: [{ slug, name, duration_minutes, price, professionals }],
108
+ // professionals: [{ slug, name, bio }], hours, closed_dates, min_notice_minutes, max_days_ahead, … }
109
+
110
+ const availability = await crafty.bookings.availability({
111
+ service: "corte-y-barba",
112
+ professional: "luis", // leave it out for whoever is free
113
+ from: "2026-11-05", // local dates; default today → today + 6 days, at most 62 days
114
+ to: "2026-11-11",
115
+ });
116
+ // { timezone, days: [{ date, closed, slots: [{ start: "2026-11-05T14:00:00-04:00", time: "14:00", professionals: ["luis"] }] }] }
117
+ ```
118
+
119
+ When the visitor picks a slot:
120
+
121
+ ```ts
122
+ try {
123
+ await crafty.checkout.start(
124
+ { booking: { service: "corte-y-barba", professional: "luis", start: slot.start } },
125
+ { returnUrl: `${location.origin}/gracias`, cancelUrl: location.href },
126
+ );
127
+ } catch (error) {
128
+ if (error instanceof CraftyError && error.code === "SLOT_UNAVAILABLE") {
129
+ // Someone took it meanwhile: reload the slots and ask for another time.
130
+ }
131
+ }
132
+ ```
133
+
134
+ `checkout.start` opens a session, holds the slot for 10 minutes (`held_until`) and sends the browser to the hosted checkout. `checkout.create` does the same without redirecting. With `professional` left out, Crafty assigns whoever is free at that time.
135
+
136
+ Rules for the page:
137
+
138
+ - Show `config.services` (they are the bookable ones, with the price Crafty will charge) and only the slots from `availability()`. Never compute free times in the frontend: hours, blocks, other bookings, holds, notice and buffers all count.
139
+ - Fetch slots in the browser, never at build time: a static build would show times that are long gone.
140
+ - Show the time zone's local times (`slot.time`, or `slot.start` with its offset).
141
+ - `config.enabled === false` means the shop isn't taking bookings: show the phone instead.
142
+
143
+ A customer's booking can be read with the number and the token from their link: `crafty.bookings.get(number, token)`.
144
+
145
+ ## 4. Checkout, emails and cancellation
146
+
147
+ The hosted checkout shows the service, who, when and the price, asks for name, email and phone plus the booking's own fields (`checkout_fields` of `configure_bookings`, same shape as the store's), a payment method and the captcha, and confirms the booking (or leaves it pending when `auto_confirm` is off). It then shows the booking page.
148
+
149
+ Emails, with the store's look: confirmation to the customer with a calendar file, a notice to the store's notify emails, the reminder `reminder_hours` before, and a notice when the booking is moved or cancelled by either side. The customer cancels from the booking page until `cancel_notice_minutes` before the start.
150
+
151
+ ## 5. The calendar in the panel
152
+
153
+ Panel → site → **Citas**: day and week views with a column per professional, and a list. From there the business creates bookings for walk-ins or phone calls (they may go outside the hours with a warning), moves them by date, time or professional, changes the status (`pending` → `confirmed` → `completed` or `no_show`, or `cancelled`), marks them paid, keeps an internal note and resends the email. Editors need the **Citas** section (read to see, write to change).
154
+
155
+ ## REST endpoints
156
+
157
+ ### Public
158
+
159
+ No API key is required; the site is in the URL. Errors use `{ error, message }`.
160
+
161
+ | Method | Path | Notes |
162
+ | --- | --- | --- |
163
+ | GET | `/api/v1/sites/{site}/bookings` | Public settings, services and professionals. |
164
+ | GET | `/api/v1/sites/{site}/bookings/availability` | `service`, `professional?`, `from?`, `to?` (local dates). |
165
+ | POST | `/api/v1/sites/{site}/bookings/checkout` | Body `{ service, professional?, start, fields?, return_url?, cancel_url?, locale? }` → 201 `{ data: { id, url, expires_at, held_until } }`. |
166
+ | GET | `/api/v1/sites/{site}/bookings/{number}` | Token in `?token=` or `X-Order-Token`. |
167
+
168
+ Rejections: `SLOT_UNAVAILABLE` (409), `SERVICE_UNAVAILABLE`, `PROFESSIONAL_UNAVAILABLE`, `PAYMENT_METHOD_DISABLED`, `TOO_MANY_BOOKINGS`, and `BOOKINGS_DISABLED` when bookings are off.
169
+
170
+ ### Authenticated bookings API
171
+
172
+ For another calendar, a CRM or a POS: an OAuth token (the same as MCP) with `crafty:read` to read and `crafty:write` to create or change; editors need the bookings permission. Pass `site` (slug) and optionally `environment` (default `production`) in the query or body.
173
+
174
+ | Method | Path | Notes |
175
+ | --- | --- | --- |
176
+ | GET | `/api/v1/bookings` | Filters `from`, `to` (local dates), `status`, `professional` (slug), `search` (number, name, email, phone), `metadata[crm_id]=…` (up to 5 pairs), `per_page` (max 100). |
177
+ | POST | `/api/v1/bookings` | Body `{ service, professional?, start, customer: { name, email?, phone? }, payment_method?, fields?, metadata?, outside_hours?, internal_note?, locale? }` → 201. |
178
+ | GET | `/api/v1/bookings/{number}` | The booking with `next_statuses`, `internal_note`, `customer_url` and `events`. |
179
+ | PATCH | `/api/v1/bookings/{number}` | Any of `start`, `professional`, `outside_hours`, `status`, `paid`, `payment_reference`, `internal_note`, `metadata`. Returns the booking and `applied`. |
180
+
181
+ Each booking carries `starts_at`/`ends_at` in the shop's time zone plus `starts_at_utc`/`ends_at_utc`, and `metadata` (up to 20 string pairs) to tie it to the other system's record.
182
+
183
+ ## MCP tools
184
+
185
+ | Tool | Scope | What it does |
186
+ | --- | --- | --- |
187
+ | `configure_bookings` | admins | Read or change the settings above. |
188
+ | `get_booking_availability` | read | Without `service`: the services and professionals. With it: free slots per day. |
189
+ | `list_bookings`, `get_booking` | read | Same filters and shape as the API. |
190
+ | `create_booking` | write | A booking for a customer, e.g. from a phone call. |
191
+ | `update_booking` | write | Move, change status, mark paid, note, metadata. |
192
+ | `set_professional_schedule` | write | A professional's own hours or the shop's. |
193
+ | `manage_booking_blocks` | write (list: read) | Block time once or weekly. |
194
+
195
+ ## Webhooks
196
+
197
+ Content webhooks (`upsert_webhook`) can listen to `booking.created`, `booking.updated` (with `changes`: `status`, `start`, `professional`, `payment`, `metadata`), `booking.cancelled` and `booking.reminder_sent`. The body's `data` is the booking (`type: "booking"`) without the internal note. Bookings also fire the order events (`order.created`, `order.status_changed`, `order.paid`), whose data includes `kind: "booking"`.
198
+
199
+ ## Starter
200
+
201
+ `npm create crafty -- --template=astro-booking` creates a barbershop site in Astro: services with price and duration, the team, and a `/reservar` page (service → professional → day and time) that opens the hosted checkout. It creates the `servicios` and `profesionales` collections with demo services and barbers, and switches bookings on when the workspace plan includes them.
202
+
203
+ ## Common pitfalls
204
+
205
+ - **Free times computed or cached in the frontend.** Always ask `availability()` in the browser; Crafty checks the slot again when the checkout opens.
206
+ - **Services as drafts or without a price.** Only published services with a price are bookable.
207
+ - **Everyone does every service.** That's what an empty `profesionales` field means; fill it to restrict a service to some people.
208
+ - **A professional's hours outside the shop's.** Slots are the overlap: widen the shop's hours first.
209
+ - **Times off by hours.** Set `timezone` before taking bookings; slots and emails use it.
210
+ - **Checkout 404.** Bookings are off, the plan doesn't include them, or the session expired: start a new one.