Skip to content

Video methods: draft, finalize

The Video Verbs draft, finalize as typed SDK methods, with inputs, result, refusals and an example.

Reference for Video, one group of Video methods.

Video.draft

Draft writes a Video’s timeline from a Startup’s records, its Brand and a Template, with a draft mark on every frame. Verb page.

TypeScript
interface VideoVerbs {
  draft(input: VideoDraftInput, options?: SB.CallOptions): SB.Call<Video>
}

Emits Video.drafted.

Inputs

InputTypeRequiredDescription
brandBrandrequiredThe Brand the Video speaks for.
offerOfferThe Offer the Video presents.

Returns

OutputTypeRequiredDescription
videoVideorequiredThe drafted Video, in status Draft.

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.

Example

TypeScript
import { $ } from 'startup-builder'

const video = await $.Video.draft({ brand: 'brand_PluVQrB1HF' })

Video.finalize

Finalize lifts a Video’s draft mark once every claim it makes reads from a live record, so its cuts can be published. Verb page.

TypeScript
interface VideoVerbs {
  finalize(input: VideoFinalizeInput, options?: SB.CallOptions): SB.Call<Video>
}

Emits Video.finalized.

Inputs

InputTypeRequiredDescription
videoVideorequiredThe rendered Video to finalize.

Returns

OutputTypeRequiredDescription
videoVideorequiredThe Video, in status Final.

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.

Example

TypeScript
import { $ } from 'startup-builder'

const video = await $.Video.finalize({ video: 'video_xVlGG2TxBA' })