All skills
wix avatar

/wix-vibe-headless

@1563591 official
by Wix.comwix/skills33 stars
33

Client-only, dependency-free REST scaffolds for connecting an already-built front end (a vibe-coded app, an HTML/JSX/Vite project, a design-tool export) to a live Wix site over the site's public WIX_CLIENT_ID — the browser talks to Wix directly, no SDK, no backend, no build step. One skill covering every Wix business solution: Stores/eCommerce storefront (products, cart, checkout), Bookings (services, slots, appointments), Blog (posts, categories, tags), Events & Tickets (browse, RSVP, ticketing), Portfolio (collections, projects, galleries), Restaurants (menu, online ordering, reservations), Forms (any visitor-fillable form — contact/enquiry, signup, waitlist, application, survey, quote request; schema-driven render + submit), CMS / Wix Data (list, detail, filter, CRUD), Pricing Plans (memberships, subscriptions, checkout), and Members (custom login — email+password, Google/Facebook, and custom SSO — plus account areas and member-gated content). Each vertical ships a copy-as-is REST layer plus wiring instructions. Read-only over the owner's content — never provisions, never mocks data. Triggers: connect my Wix store/shop, build a storefront over Wix, add a cart and checkout, connect Wix Bookings, take appointments/reservations, show my Wix blog, list my Wix events, sell tickets, take RSVPs, build a portfolio from Wix Portfolio, show my restaurant menu / order online / book a table, display my Wix CMS collection, wire a contact form to Wix, add a contact/enquiry form, build a signup or application form, take survey responses, sell membership/subscription plans, add member login / sign up, let members log in with Google or Facebook, custom login page, account / profile page, gate content behind login, sign in with SSO/Okta, 'here is my WIX_CLIENT_ID', connect this app to my Wix site over REST. Use this for CLIENT-ONLY REST integration over an existing site; use `wix-headless` instead for SDK + Wix CLI builds, hosting, and one-prompt new-site creation.

Use this Skill: https://skilld.dev/gh/wix/skills/wix-vibe-headless

This session only. Nothing lands on disk.

referenceseventsseedSEED.md

≈1.8k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Events — seeding

Seed Wix Events (Events V3) by calling seed-events.cjs — don't hand-write the REST calls. It's a build-time module (run via exec_tool, not shipped in the app) that abstracts every Wix Events seed operation. require it and call the functions with plain data.

NOT yet live-verified — transcribed from setup-events.md. Endpoints/fields are as written in the recipe; if a live call disagrees, trust the docs (see Fallback).

Two one-way constraints fix the order: registration.initialType (TICKETING/RSVP) is immutable after create, and publishing is one-way. So per event: create DRAFT → (ticketed) add tiers → publish. setupEvents installs the Wix Events app first (idempotent — a re-install returns 200), so seeding works even if the site doesn't have it yet.

// build-time exec_tool
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
const seed = require(require("path").resolve(".agents/skills/wix-vibe-headless/references/events/seed/seed-events.cjs"));
const ctx = { token: accessToken, siteId: WIX_METASITE_ID };

// DEFAULT — one call runs the whole flow per event (create DRAFT → tiers → publish), then resolves
// category NAMES → ids + assigns and attaches main images. Ids are kept in memory; nothing is
// hand-threaded across exec calls. Dates MUST be in the future (ISO-8601 UTC); default ~60–90 days
// out and note it if the request gives none. price is a decimal STRING; ticket name <= 30 chars;
// omit ticketTiers for RSVP/free, omit imageUrl if you have none.
const summary = await seed.setupEvents(ctx, {
  events: [{
    title: "Summer Synth Festival", shortDescription: "One night of analog sound.",
    type: "TICKETING", startDate: "2026-10-01T03:30:00.000Z", endDate: "2026-10-01T07:00:00.000Z",
    timeZoneId: "America/Los_Angeles",
    location: { name: "The Echo Lot", type: "VENUE", address: { addressLine: "120 Harbor St", city: "Seattle", subdivision: "US-WA", postalCode: "98101", country: "US" } },
    ticketTiers: [{ name: "General Admission", price: "65.00", initialLimit: 200 }],
    category: "Talks",
    // imageUrl is optional and attached IN this one call. Pass a plain url — the module imports it to
    // Wix Media for you (events binds the main image by file id). Use the FINAL https://media.base44.com/...
    // url from the COMPLETED generate_image (it runs in the background while you build — wait for it),
    // never a still-generating /__generating__/<id>.png placeholder. altText defaults to the event slug.
    imageUrl: "https://media.base44.com/…",
  }],
});
// summary -> { events: [{ id, slug, ticketCount, category }], categories: [{ id, name }], imagesAttached }

Seeding is additive — never delete or overwrite existing content. Don't clean up, don't remove "sample" data, don't reset. Just add.

Escape hatch — individual functions

Reach for the functions below only when the one-call setupEvents doesn't fit (re-running a single step, a shape it doesn't model). setupEvents is built from them, in this order:

// STEP 1 — create each event as a DRAFT. TICKETING = paid tiers; RSVP = free built-in form (no fields to seed).
const ev = await seed.createEvent(ctx, {
  title: "Summer Synth Festival", shortDescription: "One night of analog sound.",
  type: "TICKETING", startDate: "2026-10-01T03:30:00.000Z", endDate: "2026-10-01T07:00:00.000Z",
  timeZoneId: "America/Los_Angeles",
  location: { name: "The Echo Lot", type: "VENUE", address: { addressLine: "120 Harbor St", city: "Seattle", subdivision: "US-WA", postalCode: "98101", country: "US" } },
});

// STEP 2 — TICKETING only: add tiers BEFORE publish. price is a decimal STRING; name <= 30 chars; omit initialLimit for unlimited.
const tiers = await seed.createTicketTiers(ctx, ev.id, [{ name: "General Admission", price: "65.00", initialLimit: 200 }]);

// STEP 3 — publish (one-way; ticketed events only after tiers exist)
await seed.publishEvent(ctx, ev.id);

// STEP 4 (optional) — group by a format/track (v1 Categories)
const cats = await seed.createEventCategories(ctx, ["Talks"]);
await seed.assignEventsToCategory(ctx, cats[0].id, [ev.id]);

// Attach images (optional): import the url to Wix Media (events binds by file id), then set mainImage.
const file = await seed.importImage(ctx, imageUrl);   // → { id, url } (Wix Media file id + wixstatic url)
await seed.setEventMainImage(ctx, { eventId: ev.id, id: file.id, url: file.url, height: 1024, width: 1024, altText: ev.slug });

Paid-ticket precondition — record, do NOT block: seeding succeeds and the event goes live regardless of payment setup, but completing a paid purchase later needs a premium plan and a configured payment method in the dashboard. Note it in the kept output; never fail the seed over it. Free/RSVP events need neither.

Functions

fn does
setupEvents(ctx, {events}) DEFAULT — one call: per event create DRAFT → tiers → publish, then resolve category names → assign + attach images → {events, categories, imagesAttached}
createEvent(ctx, event) STEP 1 — create ONE draft event (no bulk; loop for many) → {id, slug}
createTicketTiers(ctx, eventId, tiers) STEP 2 — TICKETING only, parallel batch → [{id}]
publishEvent(ctx, eventId) STEP 3 — publish (one-way)
createEventCategories(ctx, names) STEP 4 (opt) — v1 Categories, one call each → [{id,name}]
assignEventsToCategory(ctx, categoryId, eventIds) STEP 4 (opt) — path /{categoryId}/events, body {eventId:[…]}
importImage(ctx, url) import an external url into Wix Media → {id,url} (file id + wixstatic url); the main image binds by this file id
setEventMainImage(ctx, {eventId,id,url,height,width,altText}) optional — PATCH mainImage (no revision); id = a Wix Media file id from importImage

Reference

If a call returns a shape you didn't expect, or you need an operation this module doesn't cover, use the documentation skill available in your environment to search + read the live Wix API reference — never guess. The authoritative source recipe is wix-headless/references/inline-recipes/setup-events.md.

Read a method's page before writing its call: it carries the exact body shape, the required permission scope, and the response envelope.

Source: SKILL.md on GitHub

1 warning6d3 checks · Risk SAFE
  • Gen Agent Trust Hub6d

    The skill is safe and provides a comprehensive integration framework for Wix Headless services. It uses platform-secured connectors for authentication and includes automated scaffolding utilities to assist with project setup.

  • Socket6d

    No alerts

  • Snyk6d

    Risk: MEDIUM · 1 issue

Signed by skilld at 1563591. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 4 weeks ago

README badge

README badge for wix/skills/wix-vibe-headless