Skip to content

Startup methods: advance, build, graduate

The Startup Verbs advance, build, graduate as typed SDK methods, with inputs, result, refusals and an example.

Reference for Startup, one group of Startup methods.

Startup.advance

Advance moves a Startup to its next Lifecycle state once every entry check of that state passes. Verb page.

TypeScript
interface StartupVerbs {
  advance(input: StartupAdvanceInput, options?: SB.CallOptions): SB.Call<Startup>
}

Emits Startup.advanced.

Inputs

InputTypeRequiredDescription
startupStartuprequiredThe Startup to advance.
tostringThe target state. Defaults to the next state.

Returns

OutputTypeRequiredDescription
startupStartuprequiredThe Startup in its new state.

Refuses when

CheckErrorFixThen call
Any entry check of the target Lifecycle staterefusedPass each check the error names, then call it again.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 startup = await $.Startup.advance({ startup: 'startup_l3hr1EnUGY' })

Startup.build

Build provisions the Systems, Sites and Interfaces a Startup’s definition declares, and moves the Startup to Building. Verb page.

TypeScript
interface StartupVerbs {
  build(input: StartupBuildInput, options?: SB.CallOptions): SB.Call<Startup>
}

Emits Startup.built.

Inputs

InputTypeRequiredDescription
startupStartuprequiredThe Startup to build.

Returns

OutputTypeRequiredDescription
startupStartuprequiredThe Startup, now Building.

Refuses when

CheckErrorFixThen call
Template chosen (building-template)refusedName a Startup Template in the definition.Startup.update
Problem stated (building-problem)refusedWrite the problem slot with its workarounds and why now.Hypothesis.create
Brand named (building-brand)refusedGive the Brand a name, a voice, a logo, and a theme.Brand.update
Products declared (building-products)refusedSet the kind of every Product.Product.update
Three slots at Commitment (building-slots)refusedRun the cheapest test on each slot below Commitment, such as a reserve deposit.Experiment.start
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 startup = await $.Startup.build({ startup: 'startup_l3hr1EnUGY' })

Startup.graduate

Graduate moves a Startup to a Company of its own, with its Customers, Domains and records intact. Verb page.

TypeScript
interface StartupVerbs {
  graduate(input: StartupGraduateInput, options?: SB.CallOptions): SB.Call<Startup>
}

Emits Startup.graduated.

Inputs

InputTypeRequiredDescription
startupStartuprequiredThe Startup to graduate.
companyCompanyrequiredThe Company that holds it next.

Returns

OutputTypeRequiredDescription
startupStartuprequiredThe Startup, held by its new Company.

Refuses when

CheckErrorFixThen call
Company of its own (graduate-company)refusedA company of its own holds the Startup, with its Brand, Customers, and records moved intact.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 startup = await $.Startup.graduate({ startup: 'startup_l3hr1EnUGY', company: 'company_28zYNZEno0' })