@openbooking-sh/adapter-usp
Not on npm yet. This package is in the repository and its first
release is pending, so npm install will not find it until
then.
Universal Scheduling Protocol (draft). Exposes a
BookingService over the Universal Scheduling Protocol
(USP), the draft standard from Wix and Stripe that lets any platform
or AI assistant discover and book a business: the profile at
/.well-known/usp, the catalog, availability, holds and
bookings over REST. Platforms sign in with a key they make themselves
(no accounts), or, when you turn it on, by signing requests with a key
they publish in their profile (HTTP message signatures, ES256). Each
business chooses how a booking becomes real: the customer confirms on
a page (default), or the assistant books immediately. Follows a draft
spec and may change with it. Most apps use it through
@openbooking-sh/server (usp: {}) or hosted
OpenBooking.
Part of OpenBooking: open-source booking that every AI assistant can use.
npm install @openbooking-sh/adapter-usp
Usage #
import { createUsp } from '@openbooking-sh/adapter-usp';
const usp = createUsp({
service,
baseUrl: 'https://bistro.example.com', // the public address platforms sign
continueUrl: (b) => bookingPage.confirmUrl(b), // where the customer confirms a held booking
state: postgresStores(db).usp, // shared by every instance when you run more than one
});
app.route(usp.path, usp.router);
app.get('/.well-known/usp', async (c) => c.json(await usp.profile()));
Learn more #
- OpenBooking on GitHub: the full SDK, docs and examples
- openbooking.sh
Apache-2.0
This page is generated from
packages/adapter-usp/README.md
in the open-source repository. To fix something, change it there.