Skip to content
SDKProductSites and appsDashboard

Dashboard methods: ask, schedule

The Dashboard Verbs ask, schedule as typed SDK methods, with inputs, result, refusals and an example.

Reference for Dashboard, one group of Dashboard methods.

Dashboard.ask

Ask answers a plain-language question with a query over the Startup’s records and shows the query beside the result. Verb page.

TypeScript
interface DashboardVerbs {
  ask(input: DashboardAskInput, options?: SB.CallOptions): SB.Call<DashboardAskOutput>
}

Emits Dashboard.asked.

Inputs

InputTypeRequiredDescription
questiontextrequiredThe question, in plain language.
dashboardDashboardThe Dashboard to add the answer to as a tile.

Returns

OutputTypeRequiredDescription
querytextrequiredThe query it ran, to read and reuse.
rowsjsonrequiredThe result, as a table or chart.
dashboardDashboardrequiredThe Dashboard the question was asked on.

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 { query, rows, dashboard } = await $.Dashboard.ask({ question: 'Example question' })

Dashboard.schedule

Schedule sends a Dashboard on a cadence to a Mailbox, a Channel or an Agent’s context, rendered for each. Verb page.

TypeScript
interface DashboardVerbs {
  schedule(input: DashboardScheduleInput, options?: SB.CallOptions): SB.Call<Dashboard>
}

Emits Dashboard.scheduled.

Inputs

InputTypeRequiredDescription
dashboardDashboardrequiredThe Dashboard to send.
cadencestringrequiredHow often it goes out.
tostringrequiredThe Mailbox, Channel or Agent that receives it.

Returns

OutputTypeRequiredDescription
dashboardDashboardrequiredThe Dashboard, with its schedule.

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 dashboard = await $.Dashboard.schedule({ dashboard: 'dashboard_QL9I0ALqO4', cadence: 'daily', to: 'Example to' })