Skip to content

Waitlist methods: admit, join

The Waitlist Verbs admit, join as typed SDK methods, with inputs, result, refusals and an example.

Reference for Waitlist, one group of Waitlist methods.

Waitlist.admit

Admit releases Leads from a Waitlist to the Offer they waited for, in the order the Waitlist ranks them. Verb page.

TypeScript
interface WaitlistVerbs {
  admit(input: WaitlistAdmitInput, options?: SB.CallOptions): SB.Call<WaitlistAdmitOutput>
}

Emits Waitlist.admitted.

Inputs

InputTypeRequiredDescription
waitlistWaitlistrequiredThe Waitlist.
countintegerrequiredHow many Leads to admit.

Returns

OutputTypeRequiredDescription
leadslist of LeadrequiredThe admitted Leads.
waitlistWaitlistrequiredThe Waitlist after the admitted Leads left it.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

TypeScript
import { $ } from 'startup-builder'

const { leads, waitlist } = await $.Waitlist.admit({ waitlist: 'waitlist_rBixb72HGB', count: 1 })

Waitlist.join

Join adds a Lead to a Waitlist for an Offer that is not open to them. Verb page.

TypeScript
interface WaitlistVerbs {
  join(input: WaitlistJoinInput, options?: SB.CallOptions): SB.Call<WaitlistJoinOutput>
}

Emits Waitlist.joined.

Inputs

InputTypeRequiredDescription
waitlistWaitlistrequiredThe Waitlist to join.
emailemailrequiredWhere to reach the Lead.

Returns

OutputTypeRequiredDescription
leadLeadrequiredThe waiting Lead.
waitlistWaitlistrequiredThe Waitlist joined.

Refuses when

CheckErrorFixThen call
The input does not match the schema of the operation.invalid-inputRead the schema of the operation, then send every required field with the right type.None.
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

TypeScript
import { $ } from 'startup-builder'

const { lead, waitlist } = await $.Waitlist.join({ waitlist: 'waitlist_rBixb72HGB', email: 'dana@leaseline.app' })