Skip to content

Mandate methods: authorize, pause, resume

The Mandate Verbs authorize, pause, resume as typed SDK methods, with inputs, result, refusals and an example.

Reference for Mandate, one group of Mandate methods.

Mandate.authorize

Authorize grants an Agent a standing Mandate to perform a Verb within a Limit, without asking each time. Verb page.

TypeScript
interface MandateVerbs {
  authorize(input: MandateAuthorizeInput, options?: SB.CallOptions): SB.Call<Mandate>
}

Emits Mandate.authorized.

Inputs

InputTypeRequiredDescription
agentAgentrequiredThe agent that receives the Mandate.
verbstringrequiredThe Verb it covers, as Noun.verb.
limitLimitrequiredThe bound the Mandate holds to.
forPartyThe person the agent acts for, under delegation: the principal and author of record.
channelslist of ChannelThe Channels it may send through.
topicsstring[]What it may send about; a send outside them becomes an Approval.
approvejsonThe approval rule for one-way sends, such as the first 20 waiting for an Approval.
windowstringThe delay window each one-way send waits, as a duration.
expiresAtdatetimeWhen the Mandate lapses.

Returns

OutputTypeRequiredDescription
mandateMandaterequiredThe active Mandate.

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 mandate = await $.Mandate.authorize({ agent: 'agent_tCzKDMorKn', verb: 'Example verb', limit: 'limit_UWHXYVKsJB' })

Mandate.pause

Pause stops every new Action under a Mandate at once and keeps its scope, so it can resume unchanged. Verb page.

TypeScript
interface MandateVerbs {
  pause(input: MandatePauseInput, options?: SB.CallOptions): SB.Call<Mandate>
}

Emits Mandate.paused.

Inputs

InputTypeRequiredDescription
mandateMandaterequiredThe Mandate to hold.
reasontextWhy the Mandate stops.

Returns

OutputTypeRequiredDescription
mandateMandaterequiredThe paused Mandate.

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 mandate = await $.Mandate.pause({ mandate: 'mandate_mKKPrmFQYD' })

Mandate.resume

Resume restarts a paused Mandate with its scope, Limits and approval rule unchanged. Verb page.

TypeScript
interface MandateVerbs {
  resume(input: MandateResumeInput, options?: SB.CallOptions): SB.Call<Mandate>
}

Emits Mandate.resumed.

Inputs

InputTypeRequiredDescription
mandateMandaterequiredThe paused Mandate.

Returns

OutputTypeRequiredDescription
mandateMandaterequiredThe active Mandate.

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 mandate = await $.Mandate.resume({ mandate: 'mandate_mKKPrmFQYD' })