Skip to content

Cloud API from your server · Node 20+, Bun, Deno, Workers

@openseat/node

Server client for the OpenSeat Cloud API: hold, book, release and block seats with your secret key, create events from your own platform, and verify OpenSeat webhooks. Zero dependencies.

The OpenSeat Cloud API from your server. Hold, book, release and block seats with your secret key, create events from your own ticketing platform, mint embeddable-designer sessions, and verify OpenSeat webhooks.

  • 1 function
  • 3 classes
  • 32 interfaces
  • 16 types
  • 4 constants
  • MIT
npm i @openseat/node
first npm release pending

Install commands show the public npm names. The first npm release is pending; the packages are free and MIT licensed.

Import
import {
  OpenSeat,
  OpenSeatError,
  verifyWebhook,
} from "@openseat/node";
import type {
  OpenSeatWebhookEvent,
  ServerHoldInput,
} from "@openseat/node";

Functions1

function

verifyWebhook

Verifies an OpenSeat webhook and returns its parsed body. Pass the RAW request body (the exact bytes OpenSeat sent: express.raw({ type: "application/json" }), or await request.text()), never re-serialised JSON. During a secret rotation pass both secrets; any one matching any v1 is enough. Throws OpenSeatWebhookError.

function verifyWebhook(
  rawBody: string | Uint8Array,
  signatureHeader: string | null | undefined,
  secret: string | readonly string[],
  o?: VerifyWebhookOptions,
): Promise<OpenSeatWebhookEvent>;

Parameters

ParameterTypeDescription
rawBodystring | Uint8Array
signatureHeaderstring | null | undefined
secretstring | readonly string[]
ooptionalVerifyWebhookOptions

Default {}

Returns

@openseat/node/src/webhooks.ts

Classes3

class

OpenSeat

The OpenSeat Cloud API from your server, with your secret key. Never construct it in a browser.

class OpenSeat

Members

MemberTypeDescription
constructorconstructor(o: OpenSeatOptions)
memethod() => Promise<MeResponse>

Who this key is: answers "is my key working?".

holds{ create: (i: { eventKey: string; } & ServerHoldInput & { idempotencyKey?: string; }) => Promise<ServerHold>; retrieve: (holdToken: string) => Promise<HoldDetails>; attachOrder: (holdToken: string, orderId: string) => Promise<HoldDetails>; extend: (holdToken: string, i: { seconds: number; }) => Promise<HoldDetails>; release: (holdToken: string) => Promise<HoldDetails>; }
events{ list: () => AsyncIterable<EventSummary>; retrieve: (eventKey: string) => Promise<EventDetails>; objects: (eventKey: string, q?: { status?: SeatStatus; }) => AsyncIterable<SeatObject>; categories: (eventKey: string) => Promise<CategoryInfo[]>; create: (i: CreateEventInput & { idempotencyKey?: string; }) => Promise<CreatedEvent>; update: (eventKey: string, i: UpdateEventInput) => Promise<EventDetails>; changeLayout: …
bookings{ list: (q?: BookingListQuery) => AsyncIterable<Booking>; retrieve: (id: string) => Promise<Booking>; byOrder: (eventKey: string, orderId: string) => Promise<Booking | null>; eraseExtraData: (id: string) => Promise<void>; }
webhookEndpoints{ list: () => Promise<WebhookEndpoint[]>; create: (i: CreateWebhookEndpointInput) => Promise<WebhookEndpoint & { secret: string; }>; retrieve: (id: string) => Promise<WebhookEndpoint>; update: (id: string, i: UpdateWebhookEndpointInput) => Promise<WebhookEndpoint>; delete: (id: string) => Promise<void>; rotateSecret: (id: string, i?: { overlapHours?: number; }) => Promise<{ secret: string; }>; test: (id: string) => P …
layouts{ list: () => AsyncIterable<LayoutSummary>; retrieve: (layoutKey: string) => Promise<LayoutDetails>; }
designerSessions{ create: (i: CreateDesignerSessionInput) => Promise<DesignerSessionCreated>; retrieve: (id: string) => Promise<DesignerSessionInfo>; revoke: (id: string) => Promise<void>; }

Every member is readonly.

@openseat/node/src/client.ts

class

OpenSeatError

A failed OpenSeat call. Switch on code (and reason for the detail); check refundRequired after book.

class OpenSeatError extends Error

Extends Error: its public members apply here too.

Members

MemberTypeDescription
nameunknown
codeOpenSeatErrorCode
reasonoptionalOpenSeatErrorReason
statusoptionalnumber

The HTTP status, when the server answered.

requestIdoptionalstring

OpenSeat-Request-Id of the failed response; quote it in support requests.

retryableboolean

True when the same call may succeed later (network errors, timeouts, 429 and 5xx).

retryAfterMsoptionalnumber

From Retry-After on 429 and 503 responses.

unavailableSeatIdsoptionalreadonly string[]
unavailableAreaIdsoptionalreadonly string[]
detailsoptionalreadonly { path: string; message: string; }[]

Field-level problems of a 422 VALIDATION refusal.

refundRequiredboolean

True when the booking can never succeed for this payment: refund the buyer.

constructorconstructor(code: OpenSeatErrorCode, message: string, o?: OpenSeatErrorOptions)

Every member is readonly.

@openseat/node/src/errors.ts

class

OpenSeatWebhookError

class OpenSeatWebhookError extends Error

Extends Error: its public members apply here too.

Members

MemberTypeDescription
nameunknown
codeOpenSeatWebhookErrorCode
constructorconstructor(code: OpenSeatWebhookErrorCode, message: string)

Every member is readonly.

@openseat/node/src/webhooks.ts

Interfaces32

interface

AreaQuantity

interface AreaQuantity

Members

MemberTypeDescription
inventoryIdstring
quantitynumber

@openseat/node/src/cloud-wire.ts

interface

AreaRecord

interface AreaRecord

Members

MemberTypeDescription
inventoryIdstring
statusSeatStatus
remainingnumber
capacitynumber
versionnumber

@openseat/node/src/cloud-wire.ts

interface

BlockResult

interface BlockResult

Members

MemberTypeDescription
blockedstring[]
notBlocked{ objectId: string; reason: "held" | "booked" | "unknown" | "already_blocked"; }[]

@openseat/node/src/client.ts

interface

BookingListQuery

interface BookingListQuery

Members

MemberTypeDescription
eventKeyoptionalstring
orderIdoptionalstring
statusoptional"confirmed" | "cancelled"
sourceoptional"hosted" | "api"

@openseat/node/src/client.ts

interface

BookInput

interface BookInput

Members

MemberTypeDescription
eventKeystring
holdTokenstring
orderIdstring

Your order ID. It is attached to the hold if it isn't already.

seatIdsoptionalreadonly string[]

When sent, must equal the hold's seats (as sets), else 409 HOLD_MISMATCH and nothing is booked.

areasoptionalAreaQuantity[]
extraDataoptionalRecord<string, unknown>
seatExtraDataoptionalRecord<string, Record<string, unknown>>
amountPaiseoptionalnumber

What you charged, for your own records. Informational.

idempotencyKeyoptionalstring

Default book:<eventKey>:<orderId>, so a retry after a crash replays the same booking.

@openseat/node/src/client.ts

interface

CategoryInfo

One ticket type (category) of the layout the event was published with (events.categories).

interface CategoryInfo

Members

MemberTypeDescription
categoryIdstring
namestring
colourstring | null
seatsnumber
placesnumber
boothsnumber
priceLabelstring | null
sellableboolean

@openseat/node/src/cloud-wire.ts

interface

CreateDesignerSessionInput

interface CreateDesignerSessionInput

Members

MemberTypeDescription
layoutKeyoptionalstring

Edit this existing layout. Leave out (with or without create) for a session that creates one.

createoptional{ name: string; layoutKey?: string; }

Let the session create a new layout with this name (and optional key).

permissionsoptionalDesignerPermission[]

Default both layout:read and layout:write.

originstring

The exact origin of the page that embeds the designer; it must be one of your allowed designer origins.

expiresInoptionalnumber

Seconds. Default 1800.

Default 1800

useroptional{ id?: string; name?: string; }

Your admin user, shown in OpenSeat's activity log (display only).

@openseat/node/src/client.ts

interface

CreateEventInput

What events.create sends to POST /server/events.

interface CreateEventInput

Members

MemberTypeDescription
eventKeystring
layoutKeystring
namestring
startsAtstring
venueoptionalstring
maxTicketsPerBookingoptionalnumber
holdSecondsoptionalnumber
categoryPriceLabelsoptionalRecord<string, string>

@openseat/node/src/cloud-wire.ts

interface

CreateWebhookEndpointInput

interface CreateWebhookEndpointInput

Members

MemberTypeDescription
urlstring
descriptionoptionalstring
eventTypesstring[]
eventKeysoptionalstring[]
includeExtraDataoptionalboolean

@openseat/node/src/client.ts

interface

DesignerExternalUser

The platform's own user, as it passed it when minting (display only, never authorization).

interface DesignerExternalUser

Members

MemberTypeDescription
idstring | null
namestring | null

@openseat/node/src/designer-wire.ts

interface

DesignerSessionCreated

A new designer session (designerSessions.create). The token is shown once; embedUrl carries it in the fragment.

interface DesignerSessionCreated

Members

MemberTypeDescription
idstring
tokenstring
embedUrlstring
expiresAtstring
modeMode
layoutKeystring | null
permissionsDesignerPermission[]
originstring

@openseat/node/src/designer-wire.ts

interface

DesignerSessionInfo

A designer session as designerSessions.retrieve and the dashboard's session list show it (never its token).

interface DesignerSessionInfo

Members

MemberTypeDescription
idstring
modeMode
layoutKeystring | null
permissionsDesignerPermission[]
originstring
createdAtstring
expiresAtstring
lastUsedAtstring | null
closedAtstring | null
revokedAtstring | null
statusDesignerSessionStatus
savesnumber
externalUserDesignerExternalUser | null
createdBy{ userId: string; name: string | null; } | null

The dashboard user who opened a preview session; null for API-minted sessions.

@openseat/node/src/designer-wire.ts

interface

EventDetails

interface EventDetails extends EventSummary

Extends EventSummary

Members

MemberTypeDescription
counts{ available: number; held: number; booked: number; blocked: number; }

Seats; an expired hold counts as available.

areas(AreaRecord & { label: string; held: number; sold: number; blocked: boolean; })[]
priceLabelsRecord<string, string>
eventKeystring

From EventSummary

namestring

From EventSummary

startsAtstring

From EventSummary

venuestring

From EventSummary

modeMode

From EventSummary

status"published" | "archived"

From EventSummary

saleOpenboolean

From EventSummary

hostedPageboolean

From EventSummary

apiAccessboolean

From EventSummary

layoutRevisionnumber

From EventSummary

holdSecondsnumber

From EventSummary

maxTicketsPerBookingnumber

From EventSummary

@openseat/node/src/cloud-wire.ts

interface

EventSummary

interface EventSummary

Members

MemberTypeDescription
eventKeystring
namestring
startsAtstring
venuestring
modeMode
status"published" | "archived"
saleOpenboolean
hostedPageboolean
apiAccessboolean
layoutRevisionnumber
holdSecondsnumber
maxTicketsPerBookingnumber

@openseat/node/src/cloud-wire.ts

interface

LayoutSummary

interface LayoutSummary

Members

MemberTypeDescription
layoutKeystring
namestring
revisionnumber
seatCountnumber
placeCountnumber
categories{ id: string; name: string; }[]
updatedAtstring

@openseat/node/src/cloud-wire.ts

interface

MeResponse

interface MeResponse

Members

MemberTypeDescription
ownerIdstring
modeMode
kind"secret"
scopesstring[]
last4string
keyNamestring

@openseat/node/src/client.ts

interface

OpenSeatErrorOptions

interface OpenSeatErrorOptions

Members

MemberTypeDescription
reasonoptionalOpenSeatErrorReason
statusoptionalnumber
requestIdoptionalstring
retryableoptionalboolean
retryAfterMsoptionalnumber
unavailableSeatIdsoptionalreadonly string[]
unavailableAreaIdsoptionalreadonly string[]
detailsoptionalreadonly { path: string; message: string; }[]
causeoptionalunknown

@openseat/node/src/errors.ts

interface

OpenSeatOptions

interface OpenSeatOptions

Members

MemberTypeDescription
secretKeystring

os_sk_live_… or os_sk_test_…. Keep it in your server's environment (OPENSEAT_SECRET_KEY).

baseUrlstring

Your OpenSeat address, for example https://openseat.example.com (a trailing /api is accepted).

timeoutMsoptionalnumber

Per attempt. Default 15000.

Default 15000

maxRetriesoptionalnumber

Extra attempts after the first for retryable failures. Default 2.

Default 2

fetchoptionaltypeof fetch

Defaults to the global fetch.

allowInsecureHttpoptionalboolean

Allows a plain http:// baseUrl on a host other than localhost. Off by default: the secret key travels in every request, so only use this on a private network you control.

@openseat/node/src/client.ts

interface

OpenSeatWebhookEvent

A verified webhook delivery. Deduplicate on id: a delivery can arrive more than once.

interface OpenSeatWebhookEvent<T extends string = string>

Members

MemberTypeDescription
idstring
typeT
apiVersionstring
createdAtstring
modeMode
sequencenumber
dataRecord<string, unknown>

@openseat/node/src/webhooks.ts

interface

ReleaseInput

What events.release sends. Omitting both seatIds and areas releases the whole booking.

interface ReleaseInput

Members

MemberTypeDescription
bookingIdoptionalstring
orderIdoptionalstring
seatIdsoptionalstring[]
areasoptionalAreaQuantity[]
blockoptionalboolean
noteoptionalstring

@openseat/node/src/cloud-wire.ts

interface

ReleaseResult

interface ReleaseResult

Members

MemberTypeDescription
releasedSeatIdsstring[]
releasedAreasAreaQuantity[]
booking{ bookingId: string; status: "confirmed" | "cancelled"; }
notReleased{ seatId?: string; inventoryId?: string; reason: "not_in_booking" | "already_released" | "quantity_exceeds"; }[]

@openseat/node/src/cloud-wire.ts

interface

ServerHoldInput

What holds.create sends to POST /server/events/:eventKey/holds (the event key is in the path).

interface ServerHoldInput

Members

MemberTypeDescription
buyerRefstring
seatIdsoptionalstring[]
areasoptionalAreaQuantity[]
holdTokenoptionalstring

@openseat/node/src/cloud-wire.ts

interface

UnblockResult

interface UnblockResult

Members

MemberTypeDescription
unblockedstring[]
notUnblocked{ objectId: string; reason: "not_blocked" | "not_for_sale"; }[]

@openseat/node/src/client.ts

interface

UpdateEventInput

interface UpdateEventInput

Members

MemberTypeDescription
nameoptionalstring
startsAtoptionalstring
venueoptionalstring
saleOpenoptionalboolean
maxTicketsPerBookingoptionalnumber
holdSecondsoptionalnumber
categoryPriceLabelsoptionalRecord<string, string>

@openseat/node/src/client.ts

interface

VerifyWebhookOptions

interface VerifyWebhookOptions

Members

MemberTypeDescription
toleranceSecoptionalnumber

Maximum age (and clock skew) of the signature timestamp, in seconds. Default 300.

Default 300

nowoptional() => number

Current time in milliseconds. Default Date.now.

@openseat/node/src/webhooks.ts

interface

WebhookDelivery

interface WebhookDelivery

Members

MemberTypeDescription
idstring
eventIdstring
eventTypestring
status"pending" | "succeeded" | "failed"
attemptsnumber
nextAttemptAtstring | null
lastAttemptAtstring | null
lastStatusCodenumber | null
lastErrorstring | null
lastDurationMsnumber | null
createdAtstring

@openseat/node/src/cloud-wire.ts

interface

WebhookEndpoint

interface WebhookEndpoint

Members

MemberTypeDescription
idstring
urlstring
descriptionstring
modeMode
eventTypesstring[]
eventKeysstring[] | null
includeExtraDataboolean
enabledboolean
disabledReasonstring | null
failingSincestring | null
secretPrefixstring
createdAtstring
updatedAtstring
createdBy{ userId: string; name: string | null; } | null
successRate24hnumber | null

Succeeded / finished deliveries in the last 24 h, 0..1; null when there were none.

@openseat/node/src/cloud-wire.ts

interface

WireBooking

A booking, as events.book, bookings.list and bookings.retrieve return it.

interface WireBooking

Members

MemberTypeDescription
bookingIdstring
referencestring
eventKeystring
orderIdstring | null
holdIdstring
source"hosted" | "api"
status"confirmed" | "cancelled"
lateboolean
bookedAtstring
amountPaisenumber | null

api: what the customer said it charged; hosted: null.

seats{ seatId: string; label: string; categoryId: string | null; active: boolean; extraData?: Record<string, unknown>; }[]
areas{ inventoryId: string; label: string; categoryId: string | null; quantity: number; active: boolean; }[]
extraDataoptionalRecord<string, unknown>
replayedoptionalboolean

@openseat/node/src/cloud-wire.ts

interface

WireError

interface WireError

Members

MemberTypeDescription
error{ code: string; message: string; reason?: OpenSeatErrorReason; unavailableSeatIds?: string[]; unavailableAreaIds?: string[]; maxExpiresAt?: string; minimumSdk?: string; details?: { path: string; message: string; }[]; }

@openseat/node/src/cloud-wire.ts

interface

WireHoldDetails

A hold as holds.retrieve, attachOrder, extend and release return it.

interface WireHoldDetails

Members

MemberTypeDescription
eventKeystring
status"active" | "expired" | "released" | "booked" | "failed"
lockedboolean
holdIdstring | null
orderIdstring | null
bookingIdstring | null
seats{ seatId: string; label: string; categoryId: string | null; pricePaise: number | null; }[]
areas{ inventoryId: string; label: string; categoryId: string | null; quantity: number; pricePaise: number | null; }[]
ticketCountnumber
createdAtstring
firstHeldAtstring | null
expiresAtstring
maxExpiresAtstring
serverTimestring

@openseat/node/src/cloud-wire.ts

interface

WireObject

One seat, place or booth of an event and its status (events.objects).

interface WireObject

Members

MemberTypeDescription
objectIdstring
labelstring
statusSeatStatus
categoryIdstring | null
tableKeystring | null
holdIdoptionalstring
holdExpiresAtoptionalstring
orderIdoptionalstring
bookingIdoptionalstring
bookedAtoptionalstring
sourceoptional"hosted" | "api"
blockNoteoptionalstring

@openseat/node/src/cloud-wire.ts

Types16

type

Booking

type Booking = WireBooking;

Members

MemberTypeDescription
bookingIdstring
referencestring
eventKeystring
orderIdstring | null
holdIdstring
source"hosted" | "api"
status"confirmed" | "cancelled"
lateboolean
bookedAtstring
amountPaisenumber | null

api: what the customer said it charged; hosted: null.

seats{ seatId: string; label: string; categoryId: string | null; active: boolean; extraData?: Record<string, unknown>; }[]
areas{ inventoryId: string; label: string; categoryId: string | null; quantity: number; active: boolean; }[]
extraDataoptionalRecord<string, unknown>
replayedoptionalboolean

@openseat/node/src/client.ts

type

CreatedEvent

type CreatedEvent = EventDetails & {
  layoutKey: string;
  created: boolean;
};

Members

MemberTypeDescription
counts{ available: number; held: number; booked: number; blocked: number; }

Seats; an expired hold counts as available.

areas(AreaRecord & { label: string; held: number; sold: number; blocked: boolean; })[]
priceLabelsRecord<string, string>
eventKeystring
namestring
startsAtstring
venuestring
modeMode
status"published" | "archived"
saleOpenboolean
hostedPageboolean
apiAccessboolean
layoutRevisionnumber
holdSecondsnumber
maxTicketsPerBookingnumber
layoutKeystring
createdboolean

@openseat/node/src/cloud-wire.ts

type

DesignerPermission

type DesignerPermission = "layout:read" | "layout:write";

@openseat/node/src/designer-wire.ts

type

DesignerSessionStatus

type DesignerSessionStatus = "active" | "expired" | "closed" | "revoked";

@openseat/node/src/designer-wire.ts

type

HoldDetails

type HoldDetails = WireHoldDetails;

Members

MemberTypeDescription
eventKeystring
status"active" | "expired" | "released" | "booked" | "failed"
lockedboolean
holdIdstring | null
orderIdstring | null
bookingIdstring | null
seats{ seatId: string; label: string; categoryId: string | null; pricePaise: number | null; }[]
areas{ inventoryId: string; label: string; categoryId: string | null; quantity: number; pricePaise: number | null; }[]
ticketCountnumber
createdAtstring
firstHeldAtstring | null
expiresAtstring
maxExpiresAtstring
serverTimestring

@openseat/node/src/client.ts

type

HoldStatus

type HoldStatus = "active" | "expired" | "released" | "booked";

@openseat/node/src/cloud-wire.ts

type

Mode

Same union as Mode in wire.ts; repeated here so this file stands alone.

type Mode = "live" | "test";

@openseat/node/src/cloud-wire.ts

type

OpenSeatErrorCode

Every error code a call can fail with: the server's error.code values plus NETWORK and TIMEOUT.

type OpenSeatErrorCode =
  | "SEATS_UNAVAILABLE"
  | "AREA_SOLD_OUT"
  | "LIMIT_EXCEEDED"
  | "HOLD_EXPIRED"
  | "HOLD_NOT_FOUND"
  | "CONFLICT"
  | "UNAUTHORIZED"
  | "FORBIDDEN"
  | "VALIDATION"
  | "RATE_LIMITED"
  | "NOT_FOUND"
  | "SERVER"
  | "NETWORK"
  | "TIMEOUT";

@openseat/node/src/errors.ts

type

OpenSeatErrorReason

Every reason the Cloud API gives when it refuses a request (the reason of an error response).

type OpenSeatErrorReason =
  | "KEY_INVALID"
  | "WRONG_KEY_KIND"
  | "KEY_MISUSE"
  | "KEY_IN_URL"
  | "ORIGIN_NOT_ALLOWED"
  | "INSUFFICIENT_SCOPE"
  | "REAUTH_REQUIRED"
  | "KEY_LIMIT"
  | "EVENT_NOT_API_ENABLED"
  | "EVENT_MODE_MISMATCH"
  | "EVENT_NOT_PUBLISHED"
  | "EVENT_KEY_TAKEN"
  | "EVENT_KEY_LOCKED"
  | "HOSTED_PAGE_OFF"
  | "PRICES_REQUIRED"
  | "SALE_CLOSED"
  | "SDK_TOO_OLD"
  | "HOLD_TOKEN_IN_URL"
  | "HOLD_LOCKED"
  | "HOLD_MISMATCH"
  | "HOLD_ALREADY_BOOKED"
  | "EXTENSION_LIMIT"
  | "EXPIRED"
  | "RELEASED"
  | "SEATS_TAKEN"
  | "ORDER_ID_IN_USE"
  | "HOSTED_BOOKING"
// … 17 more lines (type truncated)

This type is long; its declaration is shortened here.

@openseat/node/src/cloud-wire.ts

type

OpenSeatWebhookErrorCode

Why a delivery was refused. Answer 400 and do nothing; never act on an unverified body.

type OpenSeatWebhookErrorCode =
  | "MISSING_HEADER"
  | "HEADER_TOO_LARGE"
  | "MALFORMED_HEADER"
  | "TIMESTAMP_OUT_OF_RANGE"
  | "SIGNATURE_MISMATCH"
  | "INVALID_PAYLOAD"
  | "INVALID_SECRET";

@openseat/node/src/webhooks.ts

type

ReleaseBookingInput

type ReleaseBookingInput = ReleaseInput & {
  idempotencyKey?: string;
};

Members

MemberTypeDescription
bookingIdoptionalstring
orderIdoptionalstring
seatIdsoptionalstring[]
areasoptionalAreaQuantity[]
blockoptionalboolean
noteoptionalstring
idempotencyKeyoptionalstring

@openseat/node/src/client.ts

type

SeatObject

type SeatObject = WireObject;

Members

MemberTypeDescription
objectIdstring
labelstring
statusSeatStatus
categoryIdstring | null
tableKeystring | null
holdIdoptionalstring
holdExpiresAtoptionalstring
orderIdoptionalstring
bookingIdoptionalstring
bookedAtoptionalstring
sourceoptional"hosted" | "api"
blockNoteoptionalstring

@openseat/node/src/client.ts

type

SeatStatus

type SeatStatus = "available" | "held" | "booked" | "blocked";

@openseat/node/src/cloud-wire.ts

type

ServerHold

type ServerHold = WireHoldDetails & {
  holdToken: string;
};

Members

MemberTypeDescription
eventKeystring
status"active" | "expired" | "released" | "booked" | "failed"
lockedboolean
holdIdstring | null
orderIdstring | null
bookingIdstring | null
seats{ seatId: string; label: string; categoryId: string | null; pricePaise: number | null; }[]
areas{ inventoryId: string; label: string; categoryId: string | null; quantity: number; pricePaise: number | null; }[]
ticketCountnumber
createdAtstring
firstHeldAtstring | null
expiresAtstring
maxExpiresAtstring
serverTimestring
holdTokenstring

@openseat/node/src/cloud-wire.ts

type

UpdateWebhookEndpointInput

type UpdateWebhookEndpointInput = Partial<{
  url: string;
  description: string;
  eventTypes: string[];
  eventKeys: string[] | null;
  includeExtraData: boolean;
  enabled: boolean;
}>;

Members

MemberTypeDescription
urloptionalstring
descriptionoptionalstring
eventTypesoptionalstring[]
eventKeysoptionalstring[] | null
includeExtraDataoptionalboolean
enabledoptionalboolean

@openseat/node/src/client.ts

type

WebhookType

type WebhookType =
  | "booking.created"
  | "booking.released"
  | "hold.expired"
  | "hold.released"
  | "seats.blocked"
  | "seats.unblocked"
  | "event.updated"
  | "layout.updated"
  | "webhook_endpoint.test";

@openseat/node/src/cloud-wire.ts

Constants4

const

MAX_SIGNATURE_HEADER_LENGTH

Hostile-input caps, all checked before any HMAC work.

const MAX_SIGNATURE_HEADER_LENGTH = 8192

@openseat/node/src/webhooks.ts

const

MAX_SIGNATURES

const MAX_SIGNATURES = 8

@openseat/node/src/webhooks.ts

const

OPEN_SEAT_ERROR_REASONS

The reasons as a runtime list, so an unknown reason from a newer server is dropped rather than typed as one it isn't. The check below fails to compile if this list and the OpenSeatErrorReason union differ.

const OPEN_SEAT_ERROR_REASONS: readonly [
  "KEY_INVALID",
  "WRONG_KEY_KIND",
  "KEY_MISUSE",
  "KEY_IN_URL",
  "ORIGIN_NOT_ALLOWED",
  "INSUFFICIENT_SCOPE",
  "REAUTH_REQUIRED",
  "KEY_LIMIT",
  "EVENT_NOT_API_ENABLED",
  "EVENT_MODE_MISMATCH",
  "EVENT_NOT_PUBLISHED",
  "EVENT_KEY_TAKEN",
  "EVENT_KEY_LOCKED",
  "HOSTED_PAGE_OFF",
  "PRICES_REQUIRED",
  "SALE_CLOSED",
  "SDK_TOO_OLD",
  "HOLD_TOKEN_IN_URL",
  "HOLD_LOCKED",
  "HOLD_MISMATCH",
  "HOLD_ALREADY_BOOKED",
  "EXTENSION_LIMIT",
  "EXPIRED",
  "RELEASED",
  "SEATS_TAKEN",
  "ORDER_ID_IN_USE",
  "HOSTED_BOOKING",
// … 18 more lines (type truncated)

This type is long; its declaration is shortened here.

@openseat/node/src/errors.ts

const

VERSION

This package's version, sent as OpenSeat-Client: node/<version>. A test keeps it equal to package.json.

const VERSION = "0.1.0"

@openseat/node/src/version.ts