Types

Every object the API takes or returns. The makeworlds package exports each as a TypeScript type of the same name.

Worlds

WorldList

The worlds you can see.

FieldTypeDescription
worldsWorld[]

World

A world: private copies of the services your app talks to, with their URLs.

FieldTypeDescription
idstringExample: "world_k2v9x0q1m4"
namestringExample: "Thread routing eval"
team_idstringExample: "team_k2v9x0q1m4s7d8f3a6b5"
created_bystring | nullId of the user who created the world. null when an API key created it.
ui_urlstring (uri)The world's main page: the UI of its first service. Each service's own URLs are under its name. Example: "https://k2v9x0q1m4-slack.makeworlds.dev/"
servicesWorldService[]The services in this world, each with its UI.
slackSlackUrlsnull when the world has no Slack.
jiraJiraUrlsnull when the world has no Jira.
created_atstring (date-time)
updated_atstring (date-time)

WorldService

A service in a world.

FieldTypeDescription
name"slack" | "jira"
titlestringExample: "Slack"
ui_urlstring (uri)The service's UI in this world.

WorldCreate

A new world. Give a spec for each service it should have.

FieldTypeDescription
namestring1 to 80 characters. Example: "Thread routing eval"
slack optionalSlackSpecEverything in the world's Slack workspace. Omitted ids, credentials and tokens are generated. Leave it out to create the world without Slack.
jira optionalJiraSpecEverything in the world's Jira site. Omitted ids and credentials are generated. Leave it out to create the world without Jira.

WorldCreated

A new world, with each service's URLs and effective spec.

FieldTypeDescription
idstringExample: "world_k2v9x0q1m4"
namestringExample: "Thread routing eval"
team_idstringExample: "team_k2v9x0q1m4s7d8f3a6b5"
created_bystring | nullId of the user who created the world. null when an API key created it.
ui_urlstring (uri)The world's main page: the UI of its first service. Each service's own URLs are under its name. Example: "https://k2v9x0q1m4-slack.makeworlds.dev/"
servicesWorldService[]The services in this world, each with its UI.
slackSlackCreatednull when the world has no Slack.
jiraJiraCreatednull when the world has no Jira.
created_atstring (date-time)
updated_atstring (date-time)

WorldSpec

Each service's spec, or null for a service the world was created without.

FieldTypeDescription
slackobject
jiraobject

TeamList

The teams you can see.

FieldTypeDescription
teamsTeam[]

Team

A team. Worlds and API keys belong to a team.

FieldTypeDescription
idstringExample: "team_k2v9x0q1m4s7d8f3a6b5"
namestringExample: "Empirical"
role"owner" | "member" | nullYour role in the team. null when the request is authenticated with an API key, which belongs to the team rather than a person.
created_atstring (date-time)
updated_atstring (date-time)

TeamDetail

A team with its members.

FieldTypeDescription
idstringExample: "team_k2v9x0q1m4s7d8f3a6b5"
namestringExample: "Empirical"
role"owner" | "member" | nullYour role in the team. null when the request is authenticated with an API key, which belongs to the team rather than a person.
created_atstring (date-time)
updated_atstring (date-time)
membersMember[]

Member

A person in a team.

FieldTypeDescription
idstringExample: "user_p0r7w2c9n5h1j4k8l3m6"
emailstring (email)
namestring | null
role"owner" | "member"

TeamUpdate

New values for a team.

FieldTypeDescription
namestring1 to 80 characters. Example: "Empirical"

ApiKeyList

The team's API keys, without their secrets.

FieldTypeDescription
api_keysApiKey[]

ApiKey

An API key. The secret itself is shown only when the key is created.

FieldTypeDescription
idstringExample: "key_w2rh3pmnhl1pe2wjxgqs"
namestringExample: "CI"
prefixstringThe first characters of the secret, to tell keys apart. Example: "wk_live_4fQ9zT"
created_bystring | nullId of the user who created the key.
created_atstring (date-time)
updated_atstring (date-time)
last_used_atstring (date-time) | null

ApiKeyCreate

A new API key.

FieldTypeDescription
namestring1 to 80 characters. Example: "CI"

ApiKeyCreated

A new API key with its secret.

FieldTypeDescription
idstringExample: "key_w2rh3pmnhl1pe2wjxgqs"
namestringExample: "CI"
prefixstringThe first characters of the secret, to tell keys apart. Example: "wk_live_4fQ9zT"
created_bystring | nullId of the user who created the key.
created_atstring (date-time)
updated_atstring (date-time)
last_used_atstring (date-time) | null
secretstringThe key itself. Shown only in this response. Example: "wk_live_4fQ9zTb1Lx7mKc2RyV8nHs0dWq5ePj3uGa6oNi9E"

ApiError

Every error response from the API and world controls.

FieldTypeDescription
errorApiErrorDetailWhat went wrong.

ApiErrorDetail

What went wrong.

FieldTypeDescription
codestringStable, for code to match on. Example: "not_found"
messagestringFor people; may change. Example: "No team with that id is visible to you."

Slack

SlackUrls

null when the world has no Slack.

FieldTypeDescription
api_urlstring (uri)Use as the Slack Web API base URL, e.g. slackApiUrl in @slack/web-api. Example: "https://k2v9x0q1m4-slack.makeworlds.dev/api/"
oauth_authorize_urlstring (uri)Send users here instead of slack.com/oauth/v2/authorize to install your app. Example: "https://k2v9x0q1m4-slack.makeworlds.dev/oauth/v2/authorize"
ui_urlstring (uri)The world's Slack UI. Example: "https://k2v9x0q1m4-slack.makeworlds.dev/"

SlackSpec

Everything in the world's Slack workspace. Omitted ids, credentials and tokens are generated. Leave it out to create the world without Slack.

FieldTypeDescription
teamSlackTeamSpecThe world's Slack workspace.
users optionalSlackUserSpec[]
channels optionalSlackChannelSpec[]
apps optionalSlackAppSpec[]

SlackTeamSpec

The world's Slack workspace.

FieldTypeDescription
id optionalstringPin the team id, e.g. to match installs your app already stored. Generated if left out. Example: "T0ACME00001"
namestringThe workspace name. 1 to 80 characters. Example: "Acme"
domainstringThe workspace subdomain. Example: "acme"

SlackUserSpec

A person in the workspace.

FieldTypeDescription
id optionalstringExample: "U0ALICE00001"
namestringExample: "alice"
real_namestring1 to 200 characters. Example: "Alice Tester"
emailstring (email)Example: "alice@acme.test"
token optionalstringPin the user's token, to act as them with any Slack client.

SlackChannelSpec

A channel, its members and its first messages.

FieldTypeDescription
id optionalstringExample: "C0GENERAL001"
namestringExample: "general"
private optionalboolean
topic optionalstringUp to 250 characters.
membersstring[]User names or ids. The first member created the channel.
messages optionalSlackMessageSpec[]Posted in order before any app is installed, so they send no events.

SlackMessageSpec

A message posted when the world is created.

FieldTypeDescription
userstringA user's name or id. Example: "alice"
textstringUp to 40000 characters. Example: "Deploy failed on main, can someone look?"
replies optionalSlackReplySpec[]

SlackReplySpec

A reply in the message's thread.

FieldTypeDescription
userstringA user's name or id. Example: "alice"
textstringUp to 40000 characters. Example: "Looking now."

SlackAppSpec

A Slack app, defined by its manifest.

FieldTypeDescription
manifestSlackManifestA Slack app manifest (JSON). Its redirect_urls, scopes, event_subscriptions and interactivity apply in this world. Example: {"display_information":{"name":"My app"},"features":{"bot_user":{"display_name":"my-app"}},"oauth_config":{"scopes":{"bot":["app_mentions:read","chat:write","channels:history"]}},"settings":{"event_subscriptions":{"request_url":"https://example.com/slack/events","bot_events":["app_mention"]}}}
credentials optionalSlackCredentialsSpecPin some or all credentials, e.g. to match secrets your app already has. Real Slack generates them; worlds lets you choose.
install optionalSlackInstallSpecInstall the app into the world's workspace.

SlackManifest

A Slack app manifest (JSON). Its redirect_urls, scopes, event_subscriptions and interactivity apply in this world.

FieldTypeDescription
display_informationSlackManifestDisplayInformationHow the app shows in Slack.
features optionalSlackManifestFeaturesThe app's features.
oauth_config optionalSlackManifestOAuthConfigHow the app is installed over OAuth.
settings optionalSlackManifestSettingsEvents and interactivity settings.

SlackManifestDisplayInformation

How the app shows in Slack.

FieldTypeDescription
namestring
description optionalstring

SlackManifestFeatures

The app's features.

FieldTypeDescription
bot_user optionalSlackManifestBotUserThe app's bot user.

SlackManifestBotUser

The app's bot user.

FieldTypeDescription
display_name optionalstring
always_online optionalboolean

SlackManifestOAuthConfig

How the app is installed over OAuth.

FieldTypeDescription
redirect_urls optionalstring[]Allowed redirect_uri prefixes. A * in the host matches one label.
scopes optionalSlackManifestScopesOAuth scopes the app asks for.

SlackManifestScopes

OAuth scopes the app asks for.

FieldTypeDescription
bot optionalstring[]
user optionalstring[]

SlackManifestSettings

Events and interactivity settings.

FieldTypeDescription
event_subscriptions optionalSlackManifestEventSubscriptionsThe Events API subscription.
interactivity optionalSlackManifestInteractivityWhere the world posts interactive payloads.

SlackManifestEventSubscriptions

The Events API subscription.

FieldTypeDescription
request_url optionalstring (uri)Where the world posts events.
bot_events optionalstring[]Event types to send, such as app_mention.

SlackManifestInteractivity

Where the world posts interactive payloads.

FieldTypeDescription
is_enabled optionalboolean
request_url optionalstring (uri)

SlackCredentialsSpec

Pin some or all credentials, e.g. to match secrets your app already has. Real Slack generates them; worlds lets you choose.

FieldTypeDescription
client_id optionalstring
client_secret optionalstring
signing_secret optionalstring
verification_token optionalstring

SlackInstallSpec

Install the app into the world's workspace.

FieldTypeDescription
installerstringThe user (name or id) who installs the app.
bot_user_id optionalstringExample: "U0EMPIRICAL1"
bot_token optionalstringPin the bot token, so a recreated world matches tokens your app already stored.
channels optionalstring[]Channel names the bot is a member of.

SlackCreated

null when the world has no Slack.

FieldTypeDescription
api_urlstring (uri)Use as the Slack Web API base URL, e.g. slackApiUrl in @slack/web-api. Example: "https://k2v9x0q1m4-slack.makeworlds.dev/api/"
oauth_authorize_urlstring (uri)Send users here instead of slack.com/oauth/v2/authorize to install your app. Example: "https://k2v9x0q1m4-slack.makeworlds.dev/oauth/v2/authorize"
ui_urlstring (uri)The world's Slack UI. Example: "https://k2v9x0q1m4-slack.makeworlds.dev/"
specSlackStateThe world's spec with every generated id, credential and token filled in. Create a world from it to get an identical one.

SlackState

The world's spec with every generated id, credential and token filled in. Create a world from it to get an identical one.

FieldTypeDescription
teamSlackTeamStateThe workspace, with its id.
usersSlackUserState[]
channelsSlackChannelState[]
appsSlackAppState[]

SlackTeamState

The workspace, with its id.

FieldTypeDescription
idstring
namestring
domainstring

SlackUserState

A user, with every generated field filled in.

FieldTypeDescription
idstring
namestring
real_namestring
emailstring
tokenstring | nullThe pinned user token. null when none was pinned.

SlackChannelState

A channel, with its id and member ids.

FieldTypeDescription
idstring
namestring
privateboolean
topicstring
membersstring[]User ids.
messagesSlackMessageSpec[]

SlackAppState

An app, with all its credentials.

FieldTypeDescription
app_idstring
manifestSlackManifestA Slack app manifest (JSON). Its redirect_urls, scopes, event_subscriptions and interactivity apply in this world. Example: {"display_information":{"name":"My app"},"features":{"bot_user":{"display_name":"my-app"}},"oauth_config":{"scopes":{"bot":["app_mentions:read","chat:write","channels:history"]}},"settings":{"event_subscriptions":{"request_url":"https://example.com/slack/events","bot_events":["app_mention"]}}}
credentialsSlackCredentialsThe app's OAuth and request-signing credentials.
installSlackInstallStatenull when the spec didn't install the app.

SlackCredentials

The app's OAuth and request-signing credentials.

FieldTypeDescription
client_idstring
client_secretstring
signing_secretstring
verification_tokenstring

SlackInstallState

null when the spec didn't install the app.

FieldTypeDescription
installerstringThe installing user's id.
bot_user_idstring
bot_tokenstring
channelsstring[]Channel names the bot is a member of.

SlackTokenRequest

Whose token to get.

FieldTypeDescription
userstringThe user who acts: their name or id. Bots can't be acted as. Example: "alice"

SlackToken

A user token, to call the Web API as that user.

FieldTypeDescription
user_idstringExample: "U0ALICE00001"
tokenstringExample: "xoxp-worlds-0b6c…"

SlackWorldState

The workspace as it is now, and one channel's messages.

FieldTypeDescription
teamSlackWorldTeamThe workspace.
usersSlackWorldUser[]
channelsSlackWorldChannel[]
messagesSlackMessage[]The channel's messages, oldest first. Empty without channel.

SlackWorldTeam

The workspace.

FieldTypeDescription
idstring
namestring

SlackWorldUser

A user or bot in the workspace now.

FieldTypeDescription
idstring
namestring
real_namestring
is_botboolean
has_tokenbooleanWhether the user can be acted as.

SlackWorldChannel

A channel in the workspace now.

FieldTypeDescription
idstring
namestring
is_privateboolean
topicstring
membersstring[]User ids.

SlackMessage

A message as the world's Slack UI shows it.

FieldTypeDescription
tsstring
thread_ts optionalstring
userstring
textstring
reply_countinteger
reply_usersstring[]
reactionsSlackReaction[]
bot_name optionalstring
editedboolean
filesSlackFileRef[]
imagesSlackImage[]

SlackReaction

An emoji reaction on a message.

FieldTypeDescription
namestringThe emoji name. Example: "eyes"
usersstring[]Ids of the users who reacted.
countinteger

SlackFileRef

A file shared in a message.

FieldTypeDescription
idstring
namestring
mimetypestring
sizeinteger

SlackImage

An image in a message, from a file or a block.

FieldTypeDescription
file_id optionalstring
url optionalstring
altstring

SlackActRequest

A Web API call to make as a user.

FieldTypeDescription
userstringThe user who acts: their name or id. Bots can't be acted as. Example: "alice"
method"chat.postMessage" | "conversations.create" | "conversations.invite" | "reactions.add" | "reactions.remove"Example: "chat.postMessage"
args optionalobjectThe method's arguments, as the Web API takes them. Example: {"channel":"C0GENERAL001","text":"Hey <@U0EMPIRICAL1>, can you take a look?"}

SlackWebApiResponse

The Slack Web API's response, as is: ok false with an error is a Slack error, not a failed request.

FieldTypeDescription
okboolean
error optionalstring

SlackUploadRequest

A file to share as a user.

FieldTypeDescription
userstringThe user who acts: their name or id. Bots can't be acted as. Example: "alice"
channelstringA channel id. Example: "C0GENERAL001"
filestring (binary)
text optionalstringA message to share the file with.
thread_ts optionalstringShare it in this thread.

Jira

JiraUrls

null when the world has no Jira.

FieldTypeDescription
site_urlstring (uri)The Jira site, in place of https://your-site.atlassian.net. Issue pages are at /browse/{key}. Example: "https://k2v9x0q1m4-jira.makeworlds.dev"
auth_urlstring (uri)In place of https://auth.atlassian.com: /authorize and /oauth/token. Example: "https://k2v9x0q1m4-jira-auth.makeworlds.dev"
api_urlstring (uri)In place of https://api.atlassian.com: /oauth/token/accessible-resources and /ex/jira/{cloudId}/rest/api/3. Example: "https://k2v9x0q1m4-jira-api.makeworlds.dev"

JiraSpec

Everything in the world's Jira site. Omitted ids and credentials are generated. Leave it out to create the world without Jira.

FieldTypeDescription
siteJiraSiteSpecThe world's Jira Cloud site.
users optionalJiraUserSpec[]
projects optionalJiraProjectSpec[]
issues optionalJiraIssueSpec[]Created in order before any app is installed, so they send no webhooks.
apps optionalJiraAppSpec[]

JiraSiteSpec

The world's Jira Cloud site.

FieldTypeDescription
cloud_id optionalstring (uuid)Pin the cloud id, e.g. to match one your app already stored. Generated if left out.
namestringThe site's subdomain, as in <name>.atlassian.net. Example: "acme"

JiraUserSpec

A person on the site.

FieldTypeDescription
account_id optionalstringExample: "712020:4f1c6b9e-3d2a-4e8f-9b7c-1a2b3c4d5e6f"
namestringExample: "alice"
display_namestring1 to 200 characters. Example: "Alice Tester"
emailstring (email)Example: "alice@acme.test"
hide_email optionalbooleanHide the email from apps, like a profile with email visibility off. GET /user then has no emailAddress.

JiraProjectSpec

A project; issues belong to one.

FieldTypeDescription
id optionalstring
keystringExample: "WRLD"
namestring1 to 80 characters. Example: "Worlds"

JiraIssueSpec

An issue created with the world.

FieldTypeDescription
projectstringExample: "WRLD"
summarystring1 to 255 characters. Example: "Checkout fails for guest users"
description optionalstringUp to 32000 characters.
labels optionalstring[]
status"To Do" | "In Progress" | "Done"
reporterstringA user's name or id. Example: "alice"
assignee optionalstringA user's name or id. Example: "alice"
comments optionalJiraCommentSpec[]

JiraCommentSpec

A comment on the issue, oldest first.

FieldTypeDescription
authorstringA user's name or id. Example: "alice"
bodystring1 to 32000 characters. Example: "Repro'd on staging."

JiraAppSpec

An OAuth 2.0 (3LO) app, as in the Atlassian developer console.

FieldTypeDescription
namestring1 to 80 characters. Example: "My app"
callback_urlsstring[]OAuth 2.0 (3LO) callback URLs. redirect_uri must equal one of them; a * in the host matches one label. Example: ["https://example.com/jira/callback"]
scopes"read:jira-work" | "write:jira-work" | "read:jira-user" | "manage:jira-webhook" | "manage:jira-project" | "manage:jira-configuration" | "read:me"[]Scopes the app may request (offline_access is always allowed). Example: ["read:jira-work","write:jira-work","read:jira-user","manage:jira-webhook"]
credentials optionalJiraCredentialsSpecPin the client id and secret, e.g. to match ones your app already has.

JiraCredentialsSpec

Pin the client id and secret, e.g. to match ones your app already has.

FieldTypeDescription
client_id optionalstring8 to 128 characters.
client_secret optionalstring16 to 256 characters.

JiraCreated

null when the world has no Jira.

FieldTypeDescription
site_urlstring (uri)The Jira site, in place of https://your-site.atlassian.net. Issue pages are at /browse/{key}. Example: "https://k2v9x0q1m4-jira.makeworlds.dev"
auth_urlstring (uri)In place of https://auth.atlassian.com: /authorize and /oauth/token. Example: "https://k2v9x0q1m4-jira-auth.makeworlds.dev"
api_urlstring (uri)In place of https://api.atlassian.com: /oauth/token/accessible-resources and /ex/jira/{cloudId}/rest/api/3. Example: "https://k2v9x0q1m4-jira-api.makeworlds.dev"
specJiraStateThe world's Jira spec with every generated id and credential filled in.

JiraState

The world's Jira spec with every generated id and credential filled in.

FieldTypeDescription
siteJiraSiteStateThe site, with its cloud id and URL.
usersJiraUserState[]
projectsJiraProjectState[]
issuesJiraIssueState[]
appsJiraAppState[]

JiraSiteState

The site, with its cloud id and URL.

FieldTypeDescription
cloud_idstring
namestring
urlstring

JiraUserState

A user, with every generated field filled in.

FieldTypeDescription
account_idstring
namestring
display_namestring
emailstring
hide_emailboolean

JiraProjectState

A project, with its id.

FieldTypeDescription
idstring
keystring
namestring

JiraIssueState

An issue from the spec, with the key it was given.

FieldTypeDescription
projectstringExample: "WRLD"
summarystring1 to 255 characters. Example: "Checkout fails for guest users"
description optionalstringUp to 32000 characters.
labels optionalstring[]
status"To Do" | "In Progress" | "Done"
reporterstringA user's name or id. Example: "alice"
assignee optionalstringA user's name or id. Example: "alice"
comments optionalJiraCommentSpec[]
keystring

JiraAppState

An app, with its credentials.

FieldTypeDescription
namestring
callback_urlsstring[]
scopes"read:jira-work" | "write:jira-work" | "read:jira-user" | "manage:jira-webhook" | "manage:jira-project" | "manage:jira-configuration" | "read:me"[]
credentialsJiraCredentialsThe app's OAuth client credentials.

JiraCredentials

The app's OAuth client credentials.

FieldTypeDescription
client_idstring8 to 128 characters.
client_secretstring16 to 256 characters.

JiraWorldState

The site as it is now: its spec, issues and registered webhooks.

FieldTypeDescription
specJiraStateThe world's Jira spec with every generated id and credential filled in.
issuesJiraIssue[]
webhooksJiraWebhook[]

JiraIssue

The issue as the Jira REST API returns it.

FieldTypeDescription
idstring
keystringExample: "WRLD-1"
selfstring (uri)
fieldsJiraIssueFieldsThe issue's fields.

JiraIssueFields

The issue's fields.

FieldTypeDescription
summarystring
descriptionJiraAdfAn Atlassian Document Format document.
labelsstring[]
statusJiraStatusThe issue's workflow status.
reporterJiraUserA user as the Jira REST API returns them.
assigneeJiraUserA user as the Jira REST API returns them.
createdstring
updatedstring

JiraAdf

An Atlassian Document Format document.

FieldTypeDescription
type"doc"
version1
contentobject[]

JiraStatus

The issue's workflow status.

FieldTypeDescription
name"To Do" | "In Progress" | "Done"

JiraUser

A user as the Jira REST API returns them.

FieldTypeDescription
accountIdstring
displayNamestring
emailAddress optionalstring

JiraWebhook

A dynamic webhook an app registered.

FieldTypeDescription
idinteger
client_idstringThe app that registered it.
account_idstringThe user it was registered as.
urlstring
jqlstring
eventsstring[]
expires_atnumberMilliseconds since the epoch.

JiraIssueCreate

An issue to create as a user.

FieldTypeDescription
userstringThe user who acts: their name or account id. Webhooks name them as the actor. Example: "alice"
projectstringA project key. Example: "WRLD"
summarystring1 to 255 characters. Example: "Checkout fails for guest users"
description optionalstring | JiraAdfPlain text, or an Atlassian Document Format document.
labels optionalstring[]
status"To Do" | "In Progress" | "Done"
assignee optionalstringA user's name or id. Example: "alice"

JiraIssueUpdate

Changes to make to an issue as a user.

FieldTypeDescription
userstringThe user who acts: their name or account id. Webhooks name them as the actor. Example: "alice"
summary optionalstring1 to 255 characters. Example: "Checkout fails for guest users"
description optionalstring | JiraAdf | nullPlain text, or an Atlassian Document Format document.
labels optionalstring[]
status optional"To Do" | "In Progress" | "Done"
assignee optionalstring | nullnull unassigns the issue. Example: "alice"

JiraIssueUpdated

The changed issue and what changed.

FieldTypeDescription
issueJiraIssueThe issue as the Jira REST API returns it.
changelogJiraChangeItem[]

JiraChangeItem

One changed field, as in a Jira changelog.

FieldTypeDescription
fieldstring
fieldtype"jira"
fieldIdstring
fromstring | null
fromStringstring | null
tostring | null
toStringstring | null

JiraCommentCreate

A comment to post as a user.

FieldTypeDescription
userstringThe user who acts: their name or account id. Webhooks name them as the actor. Example: "alice"
bodystring | JiraAdfPlain text, or an Atlassian Document Format document.

JiraComment

The comment as the Jira REST API returns it.

FieldTypeDescription
idstring
selfstring (uri)
authorJiraUserA user as the Jira REST API returns them.
bodyJiraAdfAn Atlassian Document Format document.
createdstring
updatedstring