@wix/agent-skills 1.8.0 → 1.10.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/package.json +1 -1
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +2 -1
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +14 -0
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +11 -6
- package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +3 -17
- package/skills/wix-app/references/editor-react-component/SSR.md +119 -0
- package/skills/wix-design-system/SKILL.md +1 -1
- package/skills/wix-headless/references/BUILD-astro.md +5 -7
- package/skills/wix-headless/references/DESIGN_SYSTEM.md +6 -16
- package/skills/wix-headless/references/SETUP.md +1 -1
- package/skills/wix-headless/references/astro/bookings/COMPONENTS.md +41 -333
- package/skills/wix-headless/references/astro/bookings/SERVICES_PAGES.md +77 -428
- package/skills/wix-headless/references/astro/cms/FAQ_KNOWLEDGE_BASE.md +2 -2
- package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +7 -10
- package/skills/wix-headless/references/astro/ecom/CART_WIRING.md +2 -2
- package/skills/wix-headless/references/astro/ecom/COMPONENTS_CSS.md +3 -3
- package/skills/wix-headless/references/astro/gift-cards/COMPONENTS.md +2 -2
- package/skills/wix-headless/references/astro/stores/BACK_IN_STOCK.md +7 -7
- package/skills/wix-headless/references/astro/stores/COMPONENTS_CSS.md +4 -4
- package/skills/wix-headless/references/astro/stores/PRODUCT_PAGES.md +2 -2
- package/skills/wix-headless/references/astro/templates/Footer.astro +4 -4
- package/skills/wix-headless/references/astro/templates/Navigation.astro +4 -4
- package/skills/wix-headless/references/astro/templates/bookings/AvailabilityCalendar.tsx +298 -142
- package/skills/wix-headless/references/astro/templates/bookings/BookingForm.tsx +104 -162
- package/skills/wix-headless/references/astro/templates/bookings/ServiceBookingFlow.tsx +35 -14
- package/skills/wix-headless/references/astro/templates/bookings/ServiceCard.astro +11 -2
- package/skills/wix-headless/references/astro/templates/bookings/booking-confirmation.astro +23 -85
- package/skills/wix-headless/references/astro/templates/bookings/bookingDriver.ts +245 -0
- package/skills/wix-headless/references/astro/templates/bookings/components-bookings.css +209 -198
- package/skills/wix-headless/references/astro/templates/bookings/services/[slug].astro +114 -19
- package/skills/wix-headless/references/astro/templates/bookings/services/index.astro +131 -15
- package/skills/wix-headless/references/astro/templates/ecom/CartView.tsx +3 -3
- package/skills/wix-headless/references/astro/templates/ecom/cart.astro +3 -3
- package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +17 -17
- package/skills/wix-headless/references/astro/templates/ecom/thank-you.astro +3 -3
- package/skills/wix-headless/references/astro/templates/gift-cards/_home-teaser-snippet.astro +4 -4
- package/skills/wix-headless/references/astro/templates/gift-cards/components-gift-cards.css +19 -18
- package/skills/wix-headless/references/astro/templates/gift-cards/gift-cards.astro +3 -3
- package/skills/wix-headless/references/astro/templates/global.css +17 -15
- package/skills/wix-headless/references/astro/templates/index.astro +4 -4
- package/skills/wix-headless/references/astro/templates/stores/components-stores.css +31 -31
- package/skills/wix-headless/references/astro/templates/stores/products/[slug].astro +4 -4
- package/skills/wix-headless/references/bookings/FLOW.md +246 -0
- package/skills/wix-headless/references/bookings/INSTRUCTIONS.md +65 -76
- package/skills/wix-headless/references/bookings/SERVICES_DATA.md +60 -0
- package/skills/wix-headless/references/custom/bookings/WIRING.md +169 -60
- package/skills/wix-headless/references/shared/DESIGN_MD.md +2 -3
- package/skills/wix-headless/references/shared/IMPLEMENTER.md +4 -4
- package/skills/wix-headless/references/shared/STYLING.md +15 -18
- package/skills/wix-headless/references/stores/INSTRUCTIONS.md +2 -2
- package/skills/wix-headless/references/verticals/bookings.md +9 -9
- package/skills/wix-headless/scripts/compose.mjs +4 -19
- package/skills/wix-headless/scripts/emit-design-tokens.mjs +0 -3
- package/skills/wix-manage/SKILL.md +12 -0
- package/skills/wix-manage/references/app-installation/install-wix-apps.md +3 -27
- package/skills/wix-manage/references/bookings/create-appointment-service.md +254 -0
- package/skills/wix-manage/references/bookings/create-booking-service-from-prompt.md +37 -0
- package/skills/wix-manage/references/bookings/create-class-service.md +233 -0
- package/skills/wix-manage/references/bookings/create-course-service.md +237 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +2 -1
- package/skills/wix-manage/references/cms/cms-schema-management.md +1 -1
- package/skills/wix-manage/references/stores/create-product-from-image.md +154 -2
- package/skills/wix-headless/references/astro/templates/bookings/ManageBooking.tsx +0 -84
- package/skills/wix-headless/references/astro/templates/bookings/api/confirm-booking.ts +0 -34
- package/skills/wix-headless/references/astro/templates/bookings/api/waitlist.ts +0 -74
- package/skills/wix-headless/references/astro/templates/bookings/manage-booking.astro +0 -76
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
// src/pages/manage-booking.astro — per-booking manage page (view + cancel).
|
|
3
|
-
// Reached from the confirmation page or a shared manage link:
|
|
4
|
-
// /manage-booking?bookingId=<id>&service=<name>
|
|
5
|
-
//
|
|
6
|
-
// A visitor token can't list/cancel bookings (queryExtendedBookings/cancelBooking
|
|
7
|
-
// are APP/MEMBER identity). The supported visitor path is the ANONYMOUS ACTION
|
|
8
|
-
// TOKEN: the server elevates (app identity) to mint a per-booking token, then the
|
|
9
|
-
// no-auth bookingsGet/CancelBookingAnonymously methods act on it. Minting MUST be
|
|
10
|
-
// server-side; the token is then safe to hand to the browser island.
|
|
11
|
-
import Layout from "../layouts/Layout.astro";
|
|
12
|
-
import ManageBooking from "../components/ManageBooking";
|
|
13
|
-
import { auth } from "@wix/essentials";
|
|
14
|
-
import { bookings } from "@wix/bookings";
|
|
15
|
-
|
|
16
|
-
const bookingId = Astro.url.searchParams.get("bookingId");
|
|
17
|
-
|
|
18
|
-
let token: string | null = null;
|
|
19
|
-
let booking: any = null;
|
|
20
|
-
let allowed = { cancel: false, reschedule: false };
|
|
21
|
-
let error: string | null = null;
|
|
22
|
-
|
|
23
|
-
if (!bookingId) {
|
|
24
|
-
error = "No booking was specified.";
|
|
25
|
-
} else {
|
|
26
|
-
try {
|
|
27
|
-
const tokenRes = await auth.elevate(bookings.getAnonymousActionToken)(bookingId); // APP identity → elevate
|
|
28
|
-
token = tokenRes.token ?? null;
|
|
29
|
-
if (token) {
|
|
30
|
-
const res = await bookings.bookingsGetBookingAnonymously(token); // no auth
|
|
31
|
-
booking = res.booking ?? null;
|
|
32
|
-
allowed = {
|
|
33
|
-
cancel: !!res.allowedAnonymousActions?.cancel,
|
|
34
|
-
reschedule: !!res.allowedAnonymousActions?.reschedule,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
} catch (err) {
|
|
38
|
-
console.error("[manage-booking] load failed:", err);
|
|
39
|
-
error = "We couldn't load this booking — the link may have expired.";
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const serviceName =
|
|
44
|
-
booking?.bookedEntity?.title ?? Astro.url.searchParams.get("service") ?? "your booking";
|
|
45
|
-
const startDate =
|
|
46
|
-
(booking?.startDate as string | undefined) ??
|
|
47
|
-
booking?.bookedEntity?.slot?.startDate ??
|
|
48
|
-
Astro.url.searchParams.get("startDate") ??
|
|
49
|
-
null;
|
|
50
|
-
const status = (booking?.status as string | undefined) ?? null;
|
|
51
|
-
const revision = (booking?.revision as string | undefined) ?? "";
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
<Layout title="Manage your booking">
|
|
55
|
-
<section class="container-reading px-lg py-4xl">
|
|
56
|
-
<a href="/services" class="inline-block text-sm text-mute hover:text-ink mb-xl">← All services</a>
|
|
57
|
-
<hr class="editorial-rule w-16 ml-0" />
|
|
58
|
-
<h1 class="font-display text-4xl md:text-5xl leading-tight mb-xl">Manage your booking</h1>
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
error ? (
|
|
62
|
-
<p class="booking-error">{error}</p>
|
|
63
|
-
) : (
|
|
64
|
-
<ManageBooking
|
|
65
|
-
token={token}
|
|
66
|
-
revision={revision}
|
|
67
|
-
serviceName={serviceName}
|
|
68
|
-
startDate={startDate}
|
|
69
|
-
status={status}
|
|
70
|
-
canCancel={allowed.cancel}
|
|
71
|
-
client:only="react"
|
|
72
|
-
/>
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
</section>
|
|
76
|
-
</Layout>
|