@crvouga/mockingbird-service-slack 3.13.0 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -1
- package/dist/chunk-JBHAW5J2.js +1635 -0
- package/dist/chunk-JBHAW5J2.js.map +7 -0
- package/dist/chunk-KQ42UMHX.js +361 -0
- package/dist/chunk-KQ42UMHX.js.map +7 -0
- package/dist/cli.js +3 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +102 -94
- package/dist/index.js +1 -3
- package/dist/server.d.ts +45 -37
- package/dist/server.js +2 -4
- package/package.json +3 -2
- package/dist/admin-ui.js +0 -27
- package/dist/admin-ui.js.map +0 -7
- package/dist/chunk-3FOAQLKT.js +0 -7
- package/dist/chunk-3FOAQLKT.js.map +0 -7
- package/dist/chunk-5NRPYAM3.js +0 -5452
- package/dist/chunk-5NRPYAM3.js.map +0 -7
- package/dist/chunk-BIGZEVCR.js +0 -13000
- package/dist/chunk-BIGZEVCR.js.map +0 -7
- package/dist/chunk-BQ74Q6RF.js +0 -97
- package/dist/chunk-BQ74Q6RF.js.map +0 -7
- package/dist/crypto-MGRUDI6C.js +0 -22
- package/dist/crypto-MGRUDI6C.js.map +0 -7
- package/dist/helpers-YXBX6BXY.js +0 -87
- package/dist/helpers-YXBX6BXY.js.map +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["<define:__MOCKINGBIRD_ADMIN_BRAND__>", "../src/index.ts", "mockingbird-service-runtime:@crvouga/mockingbird-runtime/service", "../src/blocks.ts", "../src/expanded-state.ts", "../src/generated/openapi.ts", "../src/native-operations.ts", "../src/sockets.ts", "../src/state.ts", "../src/runtime.ts"],
|
|
4
|
+
"sourcesContent": ["{\"vendor\":\"Slack\",\"website\":\"https://slack.com\",\"docs\":\"https://docs.slack.dev/reference/methods\",\"guide\":\"https://mockingbird.chrisvouga.dev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EtMi41Mi0yLjUyMVYyLjUyMkEyLjUyNyAyLjUyNyAwIDAgMSAxNS4xNjUgMGEyLjUyOCAyLjUyOCAwIDAgMSAyLjUyMyAyLjUyMnY2LjMxMnpNMTUuMTY1IDE4Ljk1NmEyLjUyOCAyLjUyOCAwIDAgMSAyLjUyMyAyLjUyMkEyLjUyOCAyLjUyOCAwIDAgMSAxNS4xNjUgMjRhMi41MjcgMi41MjcgMCAwIDEtMi41Mi0yLjUyMnYtMi41MjJoMi41MnpNMTUuMTY1IDE3LjY4OGEyLjUyNyAyLjUyNyAwIDAgMS0yLjUyLTIuNTIzIDIuNTI2IDIuNTI2IDAgMCAxIDIuNTItMi41Mmg2LjMxM0EyLjUyNyAyLjUyNyAwIDAgMSAyNCAxNS4xNjVhMi41MjggMi41MjggMCAwIDEtMi41MjIgMi41MjNoLTYuMzEzeiIvPjwvc3ZnPg==\",\"color\":\"#4A154B\",\"description\":\"Boost productivity and save time with Slack \u2014 the AI work platform for managing projects, automating workflows, and connecting teams securely. Start working smarter today.\"}", "import type { FetchAPI } from \"@crvouga/mockingbird-core\"\nimport {\n ProviderExpansion,\n type ProviderOptions,\n type SlackSeedConfig,\n seedSlack,\n selectOperations,\n slackPlugin,\n} from \"@crvouga/mockingbird-http-provider\"\nimport {\n ADMIN_PREFIX,\n type APIOptions,\n annotateResponse,\n bearerToken,\n bootSqlite,\n createService,\n defineOperations,\n faultEffect,\n HttpError,\n jsonRes,\n matchNamespacePath,\n type OperationContext,\n opaqueToken,\n type Service,\n} from \"@crvouga/mockingbird-service\"\nimport type { SqliteClient } from \"@crvouga/mockingbird-sqlite\"\nimport { Hono } from \"hono\"\nimport { attachmentBlockIssues, blockIssues } from \"./blocks.js\"\nimport { syncFromExpanded, syncToExpanded } from \"./expanded-state.js\"\nimport { document } from \"./generated/openapi.js\"\nimport { type NativeOperationId, nativeOperationIds } from \"./native-operations.js\"\nimport { closeSocketNamespace, issueSocketTicket } from \"./sockets.js\"\nimport {\n type Settings,\n type SlackChannel,\n type SlackFile,\n type SlackMessage,\n SlackState,\n type SlackUser,\n} from \"./state.js\"\n\nexport type { FetchAPI } from \"@crvouga/mockingbird-core\"\nexport type { SqliteClient } from \"@crvouga/mockingbird-sqlite\"\nexport type { OperationId, SupportedOperationId } from \"./generated/openapi.js\"\nexport { document, operationIds, supportedOperationIds } from \"./generated/openapi.js\"\nexport type {\n Settings,\n SlackChannel,\n SlackFile,\n SlackHook,\n SlackMessage,\n SlackUser,\n SlackView,\n} from \"./state.js\"\nexport { DEFAULT_CHANNELS, DEFAULT_FILES, DEFAULT_SETTINGS, DEFAULT_USERS } from \"./state.js\"\n\nexport const SLACK_NAMESPACE = \"slack\"\n\nexport type SlackAPIOptions = APIOptions &\n Pick<ProviderOptions, \"tokens\" | \"baseUrl\" | \"publicNamespace\" | \"adminPrefix\" | \"random\"> & {\n fixtures?: SlackSeedConfig\n /** Initial per-namespace settings (workspace identity, accepted tokens, strict channels). */\n settings?: Partial<Settings>\n /**\n * Public namespace (`default`, or the `x-mockingbird-namespace` value). Socket records are\n * keyed by this, which is what `/__admin` selects. `namespace` is the storage key.\n */\n publicNamespace?: string\n }\n\nconst WEBHOOK_PATH = /^\\/services\\/([^/]+\\/[^/]+\\/[^/]+)\\/?$/\n\n/**\n * The credential a Slack request carries, for `PUT /__admin/credentials`: the Web API bearer\n * token, or an incoming webhook's `T\u2026/B\u2026/X\u2026` path (the webhook URL is its own credential).\n */\nexport const slackCredential = (\n request: Request,\n adminPrefix = ADMIN_PREFIX,\n): string | undefined => {\n const token = bearerToken(request)\n if (token) return token\n const path = new URL(request.url).pathname\n return WEBHOOK_PATH.exec(matchNamespacePath(path, adminPrefix)?.[2] ?? path)?.[1]\n}\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value)\n\nconst text = (status: number, body: string, headers: Record<string, string> = {}) =>\n new Response(body, {\n status,\n headers: { \"content-type\": \"text/plain; charset=utf-8\", ...headers },\n })\n\n/** Slack answers logical failures with HTTP 200 and `{ok: false, error}`. */\nconst fail = (error: string, extra: Record<string, unknown> = {}) =>\n jsonRes(200, { ok: false, error, ...extra })\n\n/** Thrown inside a handler to answer `{ok: false, error}`. */\nclass SlackError extends Error {\n constructor(\n readonly code: string,\n readonly extra: Record<string, unknown> = {},\n ) {\n super(code)\n }\n}\n\ntype Reply = { body: Record<string, unknown>; ids?: Record<string, string> }\n\nconst reply = (body: Record<string, unknown>, ids?: { ids: Record<string, string> }): Reply =>\n ids ? { body, ids: ids.ids } : { body }\n\ntype Args = Record<string, unknown> & { __json: boolean; __charset: boolean }\n\n/**\n * Web API arguments the way Slack reads them: query string, then a form body or a JSON body\n * (Slack accepts both for write methods). Form fields that carry structures (`blocks`,\n * `attachments`, `view`) arrive JSON-encoded and are decoded here.\n */\nconst readArgs = (context: OperationContext): Args => {\n const args: Record<string, unknown> = {}\n for (const [key, value] of context.url.searchParams) args[key] = value\n const body = context.body\n const contentType = context.request.headers.get(\"content-type\") ?? \"\"\n let json = false\n if (body.kind === \"json\") {\n if (!isRecord(body.value)) throw new SlackError(\"invalid_json\")\n Object.assign(args, body.value)\n json = true\n } else if (body.kind === \"form\") {\n Object.assign(args, body.value)\n for (const key of [\"blocks\", \"attachments\", \"view\"]) {\n const raw = args[key]\n if (typeof raw !== \"string\") continue\n try {\n args[key] = JSON.parse(raw)\n } catch {\n throw new SlackError(key === \"blocks\" ? \"invalid_blocks_format\" : \"invalid_arguments\", {\n response_metadata: { messages: [`[ERROR] ${key} must be valid JSON`] },\n })\n }\n }\n } else if (body.kind === \"invalid\") {\n throw new SlackError(\"invalid_json\")\n }\n return Object.assign(args, { __json: json, __charset: /charset=/i.test(contentType) })\n}\n\nconst str = (value: unknown): string | undefined =>\n typeof value === \"string\" && value.length > 0\n ? value\n : typeof value === \"number\"\n ? String(value)\n : undefined\n\n/** Slack app-level tokens (`xapp-1-A\u2026-\u2026`). Bot tokens are a different credential. */\nconst APP_TOKEN = /^xapp-[A-Za-z0-9][A-Za-z0-9_-]{8,}$/\n\nconst flag = (value: unknown): boolean | null => {\n if (typeof value === \"boolean\") return value\n if (value === \"true\") return true\n if (value === \"false\") return false\n return null\n}\n\nconst invalidBlocks = (issues: string[]) =>\n new SlackError(\"invalid_blocks\", {\n response_metadata: { messages: issues.map((issue) => `[ERROR] ${issue}`) },\n })\n\n/** Blocks must be an array of Block Kit blocks within their documented limits (see `blocks.ts`). */\nconst checkBlocks = (blocks: unknown): unknown[] | null => {\n if (blocks === undefined || blocks === null || blocks === \"\") return null\n const issues = blockIssues(blocks)\n if (issues.length > 0) throw invalidBlocks(issues)\n return blocks as unknown[]\n}\n\n/** The same limits for the `blocks` carried inside `attachments[]`; the attachments are stored as sent. */\nconst checkAttachments = (attachments: unknown): unknown[] | null => {\n if (!Array.isArray(attachments)) return null\n const issues = attachmentBlockIssues(attachments)\n if (issues.length > 0) throw invalidBlocks(issues)\n return attachments\n}\n\n/**\n * Stateful mock of Slack incoming webhooks and the Web API methods our apps call.\n *\n * Every post lands in the namespace's outbox (`GET /__admin/outbox`), with its text, blocks,\n * `thread_ts` and the `ts` Slack would assign, so a suite can assert that an alert fired.\n */\nexport class SlackAPI implements FetchAPI {\n readonly app: Hono\n readonly sqlite: SqliteClient\n readonly state: SlackState\n private tail: Promise<unknown> = Promise.resolve()\n private readonly expansion: ProviderExpansion\n private readonly service: Service\n private readonly now: () => number\n private readonly namespaceName: string\n\n constructor(options: SlackAPIOptions = {}) {\n const sqlite = bootSqlite(options.sqlite)\n const namespace = options.namespace ?? SLACK_NAMESPACE\n this.namespaceName = options.publicNamespace ?? \"default\"\n this.now = options.now ?? (() => Date.now())\n this.state = new SlackState(sqlite, namespace, { settings: options.settings ?? {} })\n const api =\n (fn: (args: Args, context: OperationContext) => Reply) => (context: OperationContext) => {\n try {\n const args = readArgs(context)\n const { body, ids } = fn(args, context)\n // Real Slack still succeeds, with a warning, when a JSON post omits the charset.\n const warn = args.__json && !args.__charset\n const response = jsonRes(\n 200,\n warn\n ? {\n ...body,\n warning: \"missing_charset\",\n response_metadata: { warnings: [\"missing_charset\"] },\n }\n : body,\n )\n return ids ? annotateResponse(response, { ids }) : response\n } catch (error) {\n if (error instanceof SlackError) return fail(error.code, error.extra)\n throw error\n }\n }\n const handlers = defineOperations<NativeOperationId>({\n PostIncomingWebhook: (context) => this.incomingWebhook(context),\n ChatPostMessage: api((args, context) => this.postMessage(args, context)),\n ChatUpdate: api((args, context) => this.update(args, context)),\n ChatPostEphemeral: api((args, context) => this.postEphemeral(args, context)),\n ChatGetPermalink: api((args, context) => this.permalink(args, context)),\n ChatGetPermalinkGet: api((args, context) => this.permalink(args, context)),\n ReactionsAdd: api((args, context) => this.react(args, context, \"add\")),\n ReactionsRemove: api((args, context) => this.react(args, context, \"remove\")),\n ReactionsGet: api((args, context) => this.reactions(args, context)),\n ReactionsGetGet: api((args, context) => this.reactions(args, context)),\n AuthTest: api(() => this.authTest()),\n AuthTestGet: api(() => this.authTest()),\n ConversationsJoin: api((args, context) => this.join(args, context)),\n UsersInfo: api((args) => this.userInfo(args)),\n UsersInfoGet: api((args) => this.userInfo(args)),\n UsersLookupByEmail: api((args) => this.lookupByEmail(args)),\n UsersLookupByEmailGet: api((args) => this.lookupByEmail(args)),\n FilesInfo: api((args) => this.fileInfo(args)),\n FilesInfoGet: api((args) => this.fileInfo(args)),\n ViewsOpen: api((args) => this.openView(args)),\n AppsConnectionsOpen: (context) => this.connectionsOpen(context),\n })\n this.service = createService({\n document: selectOperations(document, nativeOperationIds),\n handlers,\n sqlite,\n namespace,\n now: this.now,\n notFound: (request) =>\n new URL(request.url).pathname.startsWith(\"/api/\")\n ? fail(\"unknown_method\")\n : text(404, \"no_service\"),\n onError: (error) => {\n if (error instanceof HttpError) return error.toResponse()\n throw error\n },\n before: (context) => this.gate(context),\n })\n this.app = new Hono().all(\"*\", (c) => this.fetch(c.req.raw))\n this.sqlite = this.service.sqlite\n this.expansion = new ProviderExpansion(\n slackPlugin,\n selectOperations(document, nativeOperationIds),\n {\n ...(options.baseUrl ? { baseUrl: options.baseUrl } : {}),\n ...(options.tokens ? { tokens: options.tokens } : {}),\n ...(options.random ? { random: options.random } : {}),\n ...(options.publicNamespace !== undefined\n ? { publicNamespace: options.publicNamespace }\n : {}),\n ...(options.adminPrefix !== undefined ? { adminPrefix: options.adminPrefix } : {}),\n sqlite,\n namespace,\n now: this.now,\n fallbackUser: { login: this.state.current().botUserId, id: 1, scopes: [] },\n },\n )\n if (options.fixtures) {\n this.expansion.configureFixtures(options.fixtures, seedSlack)\n syncFromExpanded(this.state, this.expansion)\n }\n }\n\n fetch(request: Request): Promise<Response> {\n const result = this.tail.then(\n () => this.handleFetch(request),\n () => this.handleFetch(request),\n )\n this.tail = result.then(\n () => undefined,\n () => undefined,\n )\n return result\n }\n private async handleFetch(request: Request): Promise<Response> {\n if (this.expansion.handles(request)) {\n syncToExpanded(this.state, this.expansion)\n const path = new URL(request.url).pathname\n if (path.startsWith(\"/api/\") && !path.includes(\"oauth\")) {\n let token = bearerToken(request) ?? new URL(request.url).searchParams.get(\"token\")\n if (\n !token &&\n request.headers.get(\"content-type\")?.includes(\"application/x-www-form-urlencoded\")\n )\n token = String((await request.clone().formData()).get(\"token\") ?? \"\")\n if (!token) return fail(\"not_authed\")\n const accepted = this.settings().tokens\n if (!(accepted.length ? accepted.includes(token) : /^xox[abp]-/.test(token)))\n return fail(\"invalid_auth\")\n if (!bearerToken(request)) {\n const headers = new Headers(request.headers)\n headers.set(\"authorization\", `Bearer ${token}`)\n request = new Request(request, { headers })\n }\n }\n const response = await this.expansion.fetch(request)\n syncFromExpanded(this.state, this.expansion)\n return response\n }\n const response = await this.service.fetch(request)\n return response\n }\n\n async reset(): Promise<void> {\n await this.tail\n closeSocketNamespace(this.namespaceName)\n await this.service.reset()\n await this.expansion.reset()\n syncFromExpanded(this.state, this.expansion)\n this.state.ensureSeeded()\n }\n\n /** Every message in the outbox, oldest first. */\n messages(): SlackMessage[] {\n return this.state.outbox.list()\n }\n\n private settings(): Settings {\n return this.state.current()\n }\n\n /** Fault effects every surface shares, then Web API authentication. */\n private gate(context: OperationContext): Response | undefined {\n const webhook = context.operation.operationId === \"PostIncomingWebhook\"\n const limited = faultEffect(context.request, \"rate_limited\")\n if (limited !== undefined) {\n const retryAfter = String(limited.retryAfter ?? 1)\n return webhook\n ? text(429, \"rate_limited\", { \"retry-after\": retryAfter })\n : jsonRes(429, { ok: false, error: \"ratelimited\" }, { \"retry-after\": retryAfter })\n }\n const broken = faultEffect(context.request, \"server_error\")\n if (broken !== undefined) {\n const status = typeof broken.status === \"number\" ? broken.status : 500\n const code = status === 503 ? \"service_unavailable\" : \"internal_error\"\n return webhook ? text(status, code) : jsonRes(status, { ok: false, error: code })\n }\n if (webhook || context.operation.operationId === \"AppsConnectionsOpen\") return undefined\n if (faultEffect(context.request, \"invalid_auth\") !== undefined) return fail(\"invalid_auth\")\n const token = bearerToken(context.request) ?? this.bodyToken(context)\n if (!token) return fail(\"not_authed\")\n const accepted = this.settings().tokens\n const ok = accepted.length > 0 ? accepted.includes(token) : /^xox[abp]-/.test(token)\n return ok ? undefined : fail(\"invalid_auth\")\n }\n\n /** Form posts may carry `token=` instead of the header (Slack's legacy style). */\n private bodyToken(context: OperationContext): string | undefined {\n const fromQuery = context.url.searchParams.get(\"token\")\n if (fromQuery) return fromQuery\n return context.body.kind === \"form\" ? str(context.body.value.token) : undefined\n }\n\n private iso(): string {\n return new Date(this.now()).toISOString()\n }\n\n /**\n * Resolve a channel id or name. Unknown channels are created on first use unless\n * `strictChannels` is set; the `channel_not_found` preset forces the error.\n */\n private channel(ref: unknown, context: OperationContext): SlackChannel {\n const wanted = str(ref)\n if (!wanted || faultEffect(context.request, \"channel_not_found\") !== undefined) {\n throw new SlackError(\"channel_not_found\")\n }\n const found = this.state.findChannel(wanted)\n if (found) return found\n if (this.settings().strictChannels) throw new SlackError(\"channel_not_found\")\n const isId = /^[CGD][A-Z0-9]{2,}$/.test(wanted)\n const name = isId ? wanted.toLowerCase() : wanted.replace(/^#/, \"\").toLowerCase()\n const created: SlackChannel = {\n id: isId ? wanted : `C${opaqueToken(`channel:${name}`, 10).toUpperCase()}`,\n name,\n is_private: wanted.startsWith(\"G\"),\n is_archived: false,\n is_member: true,\n created: Math.floor(this.now() / 1000),\n }\n this.state.channels.insert(created.id, created)\n return created\n }\n\n private messageBody(message: SlackMessage) {\n const settings = this.settings()\n return {\n type: \"message\" as const,\n ...(message.text !== null ? { text: message.text } : { text: \"\" }),\n user: settings.botUserId,\n bot_id: settings.botId,\n app_id: settings.appId,\n team: settings.teamId,\n ts: message.ts,\n ...(message.thread_ts !== null ? { thread_ts: message.thread_ts } : {}),\n ...(message.blocks !== null ? { blocks: message.blocks } : {}),\n ...(message.edited !== null ? { edited: message.edited } : {}),\n ...(message.reactions.length > 0 ? { reactions: message.reactions } : {}),\n }\n }\n\n private record(\n message: Omit<SlackMessage, \"id\" | \"createdAt\" | \"reactions\" | \"workspace\">,\n ): SlackMessage {\n const stored: SlackMessage = {\n ...message,\n id: `${message.channel}:${message.ts}`,\n createdAt: this.iso(),\n reactions: [],\n workspace: this.settings().teamId,\n }\n return this.state.outbox.record(stored)\n }\n\n private incomingWebhook(context: OperationContext): Response {\n const path = `${context.params.team}/${context.params.bot}/${context.params.secret}`\n const webhook = `/services/${path}`\n const hooks = this.state.hooks.list()\n const hook = this.state.hooks.get(path)\n if (hooks.length > 0 && !hook) return text(404, \"no_service\")\n if (faultEffect(context.request, \"no_service\") !== undefined) return text(404, \"no_service\")\n if (faultEffect(context.request, \"channel_not_found\") !== undefined) {\n return text(404, \"channel_not_found\")\n }\n let payload: unknown\n const body = context.body\n if (body.kind === \"json\") payload = body.value\n else if (body.kind === \"form\" && typeof body.value.payload === \"string\") {\n try {\n payload = JSON.parse(body.value.payload)\n } catch {\n return text(400, \"invalid_payload\")\n }\n } else return text(400, \"invalid_payload\")\n if (!isRecord(payload)) return text(400, \"invalid_payload\")\n let blocks: unknown[] | null\n let attachments: unknown[] | null\n try {\n blocks = checkBlocks(payload.blocks)\n attachments = checkAttachments(payload.attachments)\n } catch {\n return text(400, \"invalid_blocks\")\n }\n if (attachments && attachments.length > 100) return text(400, \"too_many_attachments\")\n const messageText = typeof payload.text === \"string\" ? payload.text : null\n if (!messageText && !blocks && !attachments) return text(400, \"no_text\")\n const channel = hook ? this.state.findChannel(hook.channel) : undefined\n if (channel?.is_archived) return text(410, \"channel_is_archived\")\n const ts = this.state.nextTs(this.now())\n const target = channel?.id ?? hook?.channel ?? webhook\n const message = this.record({\n to: [webhook, ...(channel ? [channel.id, `#${channel.name}`] : hook ? [hook.channel] : [])],\n source: \"webhook\",\n method: \"incoming-webhook\",\n webhook,\n channel: target,\n text: messageText,\n blocks,\n attachments,\n thread_ts: str(payload.thread_ts) ?? null,\n ts,\n user: null,\n ephemeral: false,\n edited: null,\n unfurl_links: flag(payload.unfurl_links),\n })\n return annotateResponse(text(200, \"ok\"), { ids: { ts: message.ts, webhook: path } })\n }\n\n private postMessage(args: Args, context: OperationContext): Reply {\n const channel = this.channel(args.channel, context)\n if (channel.is_archived) throw new SlackError(\"is_archived\")\n const blocks = checkBlocks(args.blocks)\n const attachments = checkAttachments(args.attachments)\n const messageText = typeof args.text === \"string\" ? args.text : null\n if (!messageText && !blocks && !attachments) throw new SlackError(\"no_text\")\n if (messageText && messageText.length > 40_000) throw new SlackError(\"msg_too_long\")\n const message = this.record({\n to: [channel.id, `#${channel.name}`],\n source: \"api\",\n method: \"chat.postMessage\",\n webhook: null,\n channel: channel.id,\n text: messageText,\n blocks,\n attachments,\n thread_ts: str(args.thread_ts) ?? null,\n ts: this.state.nextTs(this.now()),\n user: this.settings().botUserId,\n ephemeral: false,\n edited: null,\n unfurl_links: flag(args.unfurl_links),\n })\n return reply(\n {\n ok: true,\n channel: channel.id,\n ts: message.ts,\n message: this.messageBody(message),\n },\n { ids: { channel: channel.id, ts: message.ts } },\n )\n }\n\n private update(args: Args, context: OperationContext): Reply {\n const channel = this.channel(args.channel, context)\n const ts = str(args.ts)\n const message = ts ? this.state.findMessage(channel.id, ts) : undefined\n if (!message) throw new SlackError(\"message_not_found\")\n if (message.source !== \"api\") throw new SlackError(\"cant_update_message\")\n const blocks = checkBlocks(args.blocks)\n checkAttachments(args.attachments)\n const messageText = typeof args.text === \"string\" ? args.text : null\n if (!messageText && !blocks && args.blocks === undefined) throw new SlackError(\"no_text\")\n const next: SlackMessage = {\n ...message,\n text: messageText ?? message.text,\n // Omitted blocks are retained, as Slack documents; `[]` clears them.\n blocks:\n Array.isArray(args.blocks) && args.blocks.length === 0 ? null : (blocks ?? message.blocks),\n edited: { user: this.settings().botUserId, ts: this.state.nextTs(this.now()) },\n }\n this.state.outbox.update(message.id, next)\n return reply(\n {\n ok: true,\n channel: channel.id,\n ts: message.ts,\n text: next.text ?? \"\",\n message: this.messageBody(next),\n },\n { ids: { channel: channel.id, ts: message.ts } },\n )\n }\n\n private postEphemeral(args: Args, context: OperationContext): Reply {\n const channel = this.channel(args.channel, context)\n const userId = str(args.user)\n const user = userId ? this.state.users.get(userId) : undefined\n if (!user) throw new SlackError(\"user_not_found\")\n const blocks = checkBlocks(args.blocks)\n checkAttachments(args.attachments)\n const messageText = typeof args.text === \"string\" ? args.text : null\n if (!messageText && !blocks) throw new SlackError(\"no_text\")\n const message = this.record({\n to: [channel.id, `#${channel.name}`, user.id],\n source: \"api\",\n method: \"chat.postEphemeral\",\n webhook: null,\n channel: channel.id,\n text: messageText,\n blocks,\n attachments: null,\n thread_ts: str(args.thread_ts) ?? null,\n ts: this.state.nextTs(this.now()),\n user: user.id,\n ephemeral: true,\n edited: null,\n unfurl_links: flag(args.unfurl_links),\n })\n return reply(\n { ok: true, message_ts: message.ts },\n {\n ids: { channel: channel.id, ts: message.ts },\n },\n )\n }\n\n private permalink(args: Args, context: OperationContext): Reply {\n const channel = this.channel(args.channel, context)\n const ts = str(args.message_ts)\n const message = ts ? this.state.findMessage(channel.id, ts) : undefined\n if (!message) throw new SlackError(\"message_not_found\")\n const base = `https://${this.settings().teamDomain}.slack.com/archives/${channel.id}/p${message.ts.replace(\".\", \"\")}`\n const permalink = message.thread_ts\n ? `${base}?thread_ts=${message.thread_ts}&cid=${channel.id}`\n : base\n return reply({ ok: true, channel: channel.id, permalink })\n }\n\n private react(args: Args, context: OperationContext, mode: \"add\" | \"remove\"): Reply {\n const name = str(args.name)?.replace(/:/g, \"\")\n if (!name) throw new SlackError(\"invalid_name\")\n if (args.channel === undefined && args.timestamp === undefined) {\n throw new SlackError(\"no_item_specified\")\n }\n const channel = this.channel(args.channel, context)\n const ts = str(args.timestamp)\n const message = ts ? this.state.findMessage(channel.id, ts) : undefined\n if (!message) throw new SlackError(\"message_not_found\")\n const bot = this.settings().botUserId\n const reactions = message.reactions.map((r) => ({ ...r, users: [...r.users] }))\n const existing = reactions.find((r) => r.name === name)\n if (mode === \"add\") {\n if (existing?.users.includes(bot)) throw new SlackError(\"already_reacted\")\n if (existing) {\n existing.users.push(bot)\n existing.count = existing.users.length\n } else reactions.push({ name, users: [bot], count: 1 })\n } else {\n if (!existing?.users.includes(bot)) throw new SlackError(\"no_reaction\")\n existing.users = existing.users.filter((u) => u !== bot)\n existing.count = existing.users.length\n }\n this.state.outbox.update(message.id, {\n ...message,\n reactions: reactions.filter((r) => r.count > 0),\n })\n return reply({ ok: true })\n }\n\n private reactions(args: Args, context: OperationContext): Reply {\n if (args.channel === undefined && args.timestamp === undefined) {\n throw new SlackError(\"no_item_specified\")\n }\n const channel = this.channel(args.channel, context)\n const ts = str(args.timestamp)\n const message = ts ? this.state.findMessage(channel.id, ts) : undefined\n if (!message) throw new SlackError(\"message_not_found\")\n return reply({\n ok: true,\n type: \"message\",\n channel: channel.id,\n message: this.messageBody(message),\n })\n }\n\n private authTest(): Reply {\n const settings = this.settings()\n const bot = this.state.users.get(settings.botUserId)\n return reply({\n ok: true,\n url: `https://${settings.teamDomain}.slack.com/`,\n team: settings.teamName,\n user: bot?.name ?? \"mockingbird\",\n team_id: settings.teamId,\n user_id: settings.botUserId,\n bot_id: settings.botId,\n is_enterprise_install: false,\n })\n }\n\n private channelBody(channel: SlackChannel) {\n return {\n id: channel.id,\n name: channel.name,\n is_channel: !channel.is_private,\n is_private: channel.is_private,\n is_archived: channel.is_archived,\n is_member: channel.is_member,\n created: channel.created,\n }\n }\n\n private join(args: Args, context: OperationContext): Reply {\n const channel = this.channel(args.channel, context)\n if (channel.is_archived) throw new SlackError(\"is_archived\")\n if (channel.is_private) throw new SlackError(\"method_not_supported_for_channel_type\")\n if (channel.is_member) {\n return reply({\n ok: true,\n channel: this.channelBody(channel),\n warning: \"already_in_channel\",\n response_metadata: { warnings: [\"already_in_channel\"] },\n })\n }\n const joined = { ...channel, is_member: true }\n this.state.channels.update(channel.id, joined)\n return reply({ ok: true, channel: this.channelBody(joined) })\n }\n\n private userBody(user: SlackUser) {\n return {\n id: user.id,\n team_id: this.settings().teamId,\n name: user.name,\n real_name: user.real_name,\n deleted: user.deleted,\n is_bot: user.is_bot,\n tz: user.tz,\n profile: {\n real_name: user.real_name,\n display_name: user.name,\n ...(user.email !== null ? { email: user.email } : {}),\n },\n }\n }\n\n private userInfo(args: Args): Reply {\n const id = str(args.user)\n const user = id ? this.state.users.get(id) : undefined\n if (!user) throw new SlackError(\"user_not_found\")\n return reply({ ok: true, user: this.userBody(user) })\n }\n\n private lookupByEmail(args: Args): Reply {\n const email = str(args.email)\n if (!email) throw new SlackError(\"invalid_arguments\")\n const user = this.state.findUserByEmail(email)\n if (!user) throw new SlackError(\"users_not_found\")\n return reply({ ok: true, user: this.userBody(user) })\n }\n\n private fileBody(file: SlackFile) {\n const settings = this.settings()\n const base = `https://files.slack.com/files-pri/${settings.teamId}-${file.id}`\n return {\n ...file,\n url_private: `${base}/${encodeURIComponent(file.name)}`,\n url_private_download: `${base}/download/${encodeURIComponent(file.name)}`,\n permalink: `https://${settings.teamDomain}.slack.com/files/${settings.botUserId}/${file.id}/${encodeURIComponent(file.name)}`,\n }\n }\n\n private fileInfo(args: Args): Reply {\n const id = str(args.file)\n const file = id ? this.state.files.get(id) : undefined\n if (!file) throw new SlackError(\"file_not_found\")\n return reply({ ok: true, file: this.fileBody(file) })\n }\n\n /**\n * `apps.connections.open`. The app token must be an `Authorization: Bearer xapp-\u2026` header\n * (Slack rejects a body token). The WebSocket URL is on this same host; the Node server\n * accepts it. `@slack/socket-mode@2.0.4` reconnects by calling this method again \u2014 it does\n * not read a URL out of a `disconnect` envelope, and Slack's documented envelope has none.\n */\n private connectionsOpen(context: OperationContext): Response {\n const limited = faultEffect(context.request, \"connections_open_429\")\n if (limited) {\n const retryAfter = String(typeof limited.retryAfter === \"number\" ? limited.retryAfter : 1)\n return jsonRes(429, { ok: false, error: \"ratelimited\" }, { \"retry-after\": retryAfter })\n }\n const broken = faultEffect(context.request, \"connections_open_5xx\")\n if (broken) {\n const status = typeof broken.status === \"number\" ? broken.status : 500\n const code = status === 503 ? \"service_unavailable\" : \"internal_error\"\n return jsonRes(status, { ok: false, error: code })\n }\n if (faultEffect(context.request, \"connections_open_invalid_auth\") !== undefined) {\n return fail(\"invalid_auth\")\n }\n const token = bearerToken(context.request)\n if (!token) return fail(\"not_authed\")\n if (/^xox[abp]-/.test(token)) return fail(\"not_allowed_token_type\")\n if (!APP_TOKEN.test(token)) return fail(\"invalid_auth\")\n const settings = this.settings()\n if (settings.revokedAppTokens.includes(token)) return fail(\"token_revoked\")\n if (settings.appTokens.length > 0 && !settings.appTokens.includes(token)) {\n return fail(\"invalid_auth\")\n }\n const latency = faultEffect(context.request, \"socket_hello_latency\")\n const helloLatencyMs =\n latency === undefined\n ? 0\n : typeof latency.latencyMs === \"number\"\n ? latency.latencyMs\n : typeof latency.delayMs === \"number\"\n ? latency.delayMs\n : 0\n const issued = issueSocketTicket({\n namespace: this.namespaceName,\n appId: settings.appId,\n helloLatencyMs,\n closeAfterHello: faultEffect(context.request, \"socket_close_after_hello\") !== undefined,\n abnormalClose: faultEffect(context.request, \"socket_abnormal_close\") !== undefined,\n lifetimeMs: settings.socketLifetimeMs,\n })\n const host = context.request.headers.get(\"host\") ?? context.url.host\n const forwarded = context.request.headers.get(\"x-forwarded-proto\")\n const scheme = forwarded === \"https\" || context.url.protocol === \"https:\" ? \"wss\" : \"ws\"\n const url = `${scheme}://${host}/link/?ticket=${encodeURIComponent(issued.ticket)}&app_id=${encodeURIComponent(settings.appId)}`\n const contentType = context.request.headers.get(\"content-type\") ?? \"\"\n const json = contentType.includes(\"application/json\")\n const response = jsonRes(\n 200,\n json && !/charset=/i.test(contentType)\n ? {\n ok: true,\n url,\n warning: \"missing_charset\",\n response_metadata: { warnings: [\"missing_charset\"] },\n }\n : { ok: true, url },\n )\n return annotateResponse(response, { ids: { app_id: settings.appId } })\n }\n\n private openView(args: Args): Reply {\n if (!str(args.trigger_id)) throw new SlackError(\"invalid_arguments\")\n const view = args.view\n if (!isRecord(view) || (view.type !== \"modal\" && view.type !== \"home\")) {\n throw new SlackError(\"invalid_arguments\", {\n response_metadata: { messages: [\"[ERROR] view.type must be modal\"] },\n })\n }\n const settings = this.settings()\n const seq = this.state.views.nextSequence()\n const id = `V${opaqueToken(`view:${seq}`, 10).toUpperCase()}`\n const stored = {\n ...view,\n id,\n team_id: settings.teamId,\n state: { values: {} },\n hash: `${Math.floor(this.now() / 1000)}.${opaqueToken(`hash:${seq}`, 8)}`,\n app_id: settings.appId,\n bot_id: settings.botId,\n blocks: Array.isArray(view.blocks) ? view.blocks : [],\n }\n this.state.views.insert(id, stored)\n return reply({ ok: true, view: stored }, { ids: { view: id } })\n }\n}\n\nexport type { SlackRuntime, SlackRuntimeOptions } from \"./runtime.js\"\nexport { createRuntime, SLACK_PRESETS } from \"./runtime.js\"\n", "export * from \"@crvouga/mockingbird-runtime/service\"\nimport { PACKAGE_VERSION as SHARED_VERSION, createRuntime as sharedRuntime } from \"@crvouga/mockingbird-runtime/service\"\nexport const PACKAGE_VERSION =\n typeof __MOCKINGBIRD_PACKAGE_VERSION__ === \"string\" ? __MOCKINGBIRD_PACKAGE_VERSION__ : SHARED_VERSION\nconst ADMIN_BRAND =\n typeof __MOCKINGBIRD_ADMIN_BRAND__ === \"object\" ? __MOCKINGBIRD_ADMIN_BRAND__ : undefined\nexport const createRuntime = (options) =>\n sharedRuntime({\n ...options,\n version: options.version ?? PACKAGE_VERSION,\n adminBrand: options.adminBrand ?? ADMIN_BRAND,\n })\n", "/**\n * Block Kit limits, from the per-block reference pages on docs.slack.dev (best guess, not\n * oracle-verified: the exact messages Slack returns were never observed live). Only the documented\n * constraints are checked, and only on fields that are present; required-field rules (a section\n * with neither `text` nor `fields`, an image without `alt_text`) are not modelled.\n */\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value)\n\n/** Every block `type` Block Kit documents; anything else is `invalid_blocks`. */\nexport const BLOCK_TYPES: ReadonlySet<string> = new Set([\n \"actions\",\n \"alert\",\n \"call\",\n \"card\",\n \"carousel\",\n \"context\",\n \"context_actions\",\n \"divider\",\n \"file\",\n \"header\",\n \"image\",\n \"input\",\n \"markdown\",\n \"plan\",\n \"rich_text\",\n \"section\",\n \"table\",\n \"task_card\",\n \"video\",\n])\n\n/** At most this many blocks in a message (top level, and inside each attachment). */\nexport const MAX_BLOCKS = 50\n\ntype Issues = string[]\n\n/** A text object (`plain_text` or `mrkdwn`), `text` at most `max` characters; the header allows only plain text. */\nconst checkText = (\n value: unknown,\n path: string,\n max: number,\n issues: Issues,\n plainOnly = false,\n): void => {\n if (!isRecord(value)) {\n issues.push(`must be a text object [json-pointer:${path}]`)\n return\n }\n if (value.type !== \"plain_text\" && !(value.type === \"mrkdwn\" && !plainOnly)) {\n issues.push(\n `must be of type ${plainOnly ? \"plain_text\" : \"plain_text or mrkdwn\"} [json-pointer:${path}/type]`,\n )\n }\n if (typeof value.text !== \"string\" || value.text.length === 0) {\n issues.push(`must be a non-empty string [json-pointer:${path}/text]`)\n } else if (value.text.length > max) {\n issues.push(`must be less than ${max + 1} characters [json-pointer:${path}/text]`)\n }\n}\n\nconst checkList = (\n value: unknown,\n path: string,\n max: number,\n issues: Issues,\n each?: (item: unknown, itemPath: string) => void,\n): void => {\n if (!Array.isArray(value)) {\n issues.push(`must be an array [json-pointer:${path}]`)\n return\n }\n if (value.length > max)\n issues.push(`must have fewer than ${max + 1} items [json-pointer:${path}]`)\n if (!each) return\n for (const [index, item] of value.entries()) each(item, `${path}/${index}`)\n}\n\nconst checkBlock = (block: unknown, path: string, issues: Issues): void => {\n if (!isRecord(block) || typeof block.type !== \"string\") {\n issues.push(`must be an object with a type [json-pointer:${path}]`)\n return\n }\n if (!BLOCK_TYPES.has(block.type)) {\n issues.push(`unsupported type: ${block.type} [json-pointer:${path}/type]`)\n return\n }\n if (block.block_id !== undefined) {\n if (typeof block.block_id !== \"string\" || block.block_id.length > 255) {\n issues.push(`must be a string of at most 255 characters [json-pointer:${path}/block_id]`)\n }\n }\n switch (block.type) {\n case \"section\":\n if (block.text !== undefined) checkText(block.text, `${path}/text`, 3000, issues)\n if (block.fields !== undefined) {\n checkList(block.fields, `${path}/fields`, 10, issues, (field, fieldPath) =>\n checkText(field, fieldPath, 2000, issues),\n )\n }\n break\n case \"header\":\n if (block.text !== undefined) checkText(block.text, `${path}/text`, 150, issues, true)\n break\n case \"context\":\n if (block.elements !== undefined) checkList(block.elements, `${path}/elements`, 10, issues)\n break\n case \"actions\":\n if (block.elements !== undefined) checkList(block.elements, `${path}/elements`, 25, issues)\n break\n }\n}\n\n/** The problems with a `blocks` array (empty when it is acceptable). */\nexport const blockIssues = (blocks: unknown, path = \"/blocks\"): string[] => {\n const issues: Issues = []\n checkList(blocks, path, MAX_BLOCKS, issues, (block, blockPath) =>\n checkBlock(block, blockPath, issues),\n )\n return issues\n}\n\n/** The problems with the `blocks` inside each `attachments[]` entry (other attachment fields are not checked). */\nexport const attachmentBlockIssues = (attachments: unknown): string[] => {\n if (!Array.isArray(attachments)) return []\n const issues: Issues = []\n attachments.forEach((attachment, index) => {\n if (isRecord(attachment) && attachment.blocks !== undefined && attachment.blocks !== null) {\n issues.push(...blockIssues(attachment.blocks, `/attachments/${index}/blocks`))\n }\n })\n return issues\n}\n", "import {\n formatSlackView,\n getSlackStore,\n type ProviderExpansion,\n} from \"@crvouga/mockingbird-http-provider\"\nimport { Collection } from \"@crvouga/mockingbird-service\"\nimport type { SlackMessage, SlackState } from \"./state.js\"\n\nexport function syncToExpanded(state: SlackState, expansion: ProviderExpansion): void {\n const ss = getSlackStore(expansion.store)\n const settings = state.current()\n expansion.store.meta.insert(\"native-slack-actor\", {\n app_id: settings.appId,\n bot_id: settings.botId,\n })\n const team = ss.teams.all()[0]\n if (team)\n ss.teams.update(team.id, {\n team_id: settings.teamId,\n name: settings.teamName,\n domain: settings.teamDomain,\n })\n for (const { value: user } of state.users.list()) {\n const existing = ss.users.findOneBy(\"user_id\", user.id)\n const value = {\n user_id: user.id,\n team_id: settings.teamId,\n name: user.name,\n real_name: user.real_name,\n email: user.email ?? \"\",\n is_admin: !user.is_bot,\n is_bot: user.is_bot,\n deleted: user.deleted,\n profile: {\n display_name: user.name,\n real_name: user.real_name,\n email: user.email ?? \"\",\n image_48: \"\",\n image_192: \"\",\n },\n }\n if (!existing)\n ss.users.insert({ ...value, last_activity: Math.floor(expansion.store.now() / 1000) })\n else if (\n existing.name !== user.name ||\n existing.real_name !== user.real_name ||\n existing.email !== user.email\n )\n ss.users.update(existing.id, { ...value, profile: { ...existing.profile, ...value.profile } })\n }\n for (const { value: channel } of state.channels.list()) {\n const existing = ss.channels.findOneBy(\"channel_id\", channel.id)\n const value = {\n channel_id: channel.id,\n team_id: settings.teamId,\n name: channel.name,\n is_channel: true,\n is_private: channel.is_private,\n is_archived: channel.is_archived,\n topic: { value: \"\", creator: settings.botUserId, last_set: 0 },\n purpose: { value: \"\", creator: settings.botUserId, last_set: 0 },\n members: channel.is_member ? [settings.botUserId] : [],\n creator: settings.botUserId,\n num_members: channel.is_member ? 1 : 0,\n }\n if (!existing) ss.channels.insert(value)\n else if (\n existing.name !== channel.name ||\n existing.is_archived !== channel.is_archived ||\n existing.members.includes(settings.botUserId) !== channel.is_member\n )\n ss.channels.update(existing.id, {\n name: channel.name,\n is_archived: channel.is_archived,\n members: channel.is_member\n ? [...new Set([...existing.members, settings.botUserId])]\n : existing.members.filter((id) => id !== settings.botUserId),\n })\n }\n for (const { value: file } of state.files.list()) {\n const existing = ss.files.findOneBy(\"file_id\", file.id)\n const value = {\n file_id: file.id,\n team_id: settings.teamId,\n user: settings.botUserId,\n name: file.name,\n title: file.title,\n mimetype: file.mimetype,\n filetype: file.filetype,\n pretty_type: file.filetype,\n mode: \"hosted\" as const,\n size: file.size,\n created: file.created,\n timestamp: file.created,\n url_private: \"\",\n url_private_download: \"\",\n permalink: \"\",\n is_external: false,\n external_type: \"\",\n is_public: false,\n public_url_shared: false,\n display_as_bot: false,\n editable: true,\n deleted: false,\n channels: [],\n groups: [],\n ims: [],\n shares: {},\n }\n if (!existing) ss.files.insert(value)\n else if (existing.title !== file.title) ss.files.update(existing.id, { title: file.title })\n }\n for (const { value: view } of state.views.list()) {\n const existing = ss.views.findOneBy(\"view_id\", view.id)\n if (existing) continue\n const value = {\n view_id: view.id,\n team_id: settings.teamId,\n user_id: settings.botUserId,\n type: view.type === \"home\" ? (\"home\" as const) : (\"modal\" as const),\n blocks: Array.isArray(view.blocks) ? (view.blocks as Record<string, unknown>[]) : [],\n private_metadata: typeof view.private_metadata === \"string\" ? view.private_metadata : \"\",\n callback_id: typeof view.callback_id === \"string\" ? view.callback_id : \"\",\n external_id: typeof view.external_id === \"string\" ? view.external_id : \"\",\n title: (view.title as Record<string, unknown>) ?? null,\n submit: (view.submit as Record<string, unknown>) ?? null,\n close: (view.close as Record<string, unknown>) ?? null,\n state: (view.state as Record<string, unknown>) ?? { values: {} },\n hash: String(view.hash ?? \"\"),\n clear_on_close: view.clear_on_close === true,\n notify_on_close: view.notify_on_close === true,\n root_view_id: view.id,\n app_id: settings.appId,\n bot_id: settings.botId,\n created: Math.floor(expansion.store.now() / 1000),\n updated: Math.floor(expansion.store.now() / 1000),\n }\n ss.views.insert(value)\n }\n for (const message of state.outbox.list()) {\n if (message.ephemeral) continue\n const existing = ss.messages\n .findBy(\"channel_id\", message.channel)\n .find((row) => row.ts === message.ts)\n const value = {\n ts: message.ts,\n channel_id: message.channel,\n user: message.user ?? settings.botUserId,\n text: message.text ?? \"\",\n type: \"message\" as const,\n ...(message.blocks ? { blocks: message.blocks as Record<string, unknown>[] } : {}),\n ...(message.attachments\n ? { attachments: message.attachments as Record<string, unknown>[] }\n : {}),\n ...(message.thread_ts ? { thread_ts: message.thread_ts } : {}),\n ...(message.edited ? { edited: message.edited } : {}),\n reply_count: 0,\n reply_users: [],\n reactions: message.reactions,\n }\n if (existing) {\n if (\n existing.text !== value.text ||\n JSON.stringify(existing.reactions) !== JSON.stringify(value.reactions)\n )\n ss.messages.update(existing.id, value)\n } else ss.messages.insert(value)\n const marker = `native-message:${message.channel}:${message.ts}`\n if (!expansion.store.meta.has(marker)) expansion.store.meta.insert(marker, true)\n }\n // A native chat.delete must disappear from history as well.\n for (const message of ss.messages.all()) {\n if (\n expansion.store.meta.get(`native-message:${message.channel_id}:${message.ts}`) &&\n !state.outbox.get(`${message.channel_id}:${message.ts}`)\n )\n ss.messages.delete(message.id)\n }\n}\n\nexport function syncFromExpanded(state: SlackState, expansion: ProviderExpansion): void {\n const ss = getSlackStore(expansion.store)\n const settings = state.current()\n for (const channel of ss.channels.all()) {\n if (channel.team_id !== settings.teamId) continue\n const value = {\n id: channel.channel_id,\n name: channel.name,\n is_private: channel.is_private,\n is_archived: channel.is_archived,\n is_member: channel.members.includes(settings.botUserId),\n created: Math.floor(Date.parse(channel.created_at) / 1000),\n }\n if (state.channels.has(value.id)) state.channels.update(value.id, value)\n else state.channels.insert(value.id, value)\n }\n for (const user of ss.users.all()) {\n if (user.team_id !== settings.teamId) continue\n const value = {\n id: user.user_id,\n name: user.name,\n real_name: user.real_name,\n email: user.email,\n is_bot: user.is_bot,\n deleted: user.deleted,\n tz: \"UTC\",\n }\n if (state.users.has(value.id)) state.users.update(value.id, value)\n else state.users.insert(value.id, value)\n }\n for (const file of ss.files.all()) {\n if (file.deleted) {\n state.files.delete(file.file_id)\n continue\n }\n const value = {\n id: file.file_id,\n name: file.name,\n title: file.title,\n mimetype: file.mimetype,\n filetype: file.filetype,\n size: file.size,\n created: file.created,\n }\n if (state.files.has(file.file_id)) state.files.update(file.file_id, value)\n else state.files.insert(file.file_id, value)\n }\n for (const view of ss.views.all()) {\n const value = formatSlackView(view)\n if (state.views.has(view.view_id)) state.views.update(view.view_id, value)\n else state.views.insert(view.view_id, value)\n }\n for (const message of ss.messages.all()) {\n const id = `${message.channel_id}:${message.ts}`\n const existing = state.outbox.get(id)\n const value: SlackMessage = {\n ...existing,\n id,\n to: existing?.to ?? [message.channel_id],\n createdAt: existing?.createdAt ?? message.created_at,\n source: existing?.source ?? \"api\",\n method: existing?.method ?? \"chat.postMessage\",\n webhook: existing?.webhook ?? null,\n channel: message.channel_id,\n text: message.text,\n blocks: message.blocks ?? null,\n attachments: message.attachments ?? null,\n thread_ts: message.thread_ts ?? null,\n ts: message.ts,\n user: message.user,\n ephemeral: false,\n edited: message.edited ?? null,\n reactions: message.reactions,\n unfurl_links: message.unfurl_links ?? null,\n workspace: settings.teamId,\n }\n if (existing) state.outbox.update(id, value)\n else state.outbox.record(value)\n if (!expansion.store.meta.has(`native-message:${id}`))\n expansion.store.meta.insert(`native-message:${id}`, true)\n }\n const outbox = new Collection<SlackMessage>(expansion.sqlite, expansion.namespace, \"outbox\")\n for (const message of outbox.list())\n if (\n expansion.store.meta.has(`native-message:${message.id}`) &&\n !ss.messages.all().some((row) => `${row.channel_id}:${row.ts}` === message.id)\n )\n outbox.delete(message.id)\n}\n", "// Generated by @crvouga/mockingbird-openapi-codegen from openapi.yaml. Do not edit.\n\nimport type { OpenAPIDocument } from \"@crvouga/mockingbird-openapi\"\n\nexport const document: OpenAPIDocument = JSON.parse(`{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Slack incoming webhooks and Web API (Mockingbird subset)\",\"description\":\"Stateful emulator subset of Slack: incoming webhooks (\\`POST /services/T/B/X\\`) and the Web API\\\\nmethods our apps call. Every message lands in an outbox a suite can assert on. Hand-authored\\\\nfrom Slack's documented wire shapes and the consumers (backend \\`postSlackWebhook\\`, EMR\\\\n\\`slack-web-api.ts\\`, request-intake \\`SlackClient\\`, release-conductor).\\\\n\",\"version\":\"1\",\"x-mockingbird-upstream\":{\"note\":\"Hand-authored from https://api.slack.com/methods and https://api.slack.com/messaging/webhooks (Slack publishes no maintained OpenAPI for these methods).\"}},\"servers\":[{\"url\":\"https://slack.com\"},{\"url\":\"https://hooks.slack.com\"}],\"security\":[{\"bearerAuth\":[]}],\"paths\":{\"/services/{team}/{bot}/{secret}\":{\"parameters\":[{\"name\":\"team\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\",\"pattern\":\"^T[A-Z0-9]{2,12}$\"}},{\"name\":\"bot\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\",\"pattern\":\"^B[A-Z0-9]{2,12}$\"}},{\"name\":\"secret\",\"in\":\"path\",\"required\":true,\"schema\":{\"type\":\"string\",\"pattern\":\"^[A-Za-z0-9]{8,24}$\"}}],\"post\":{\"operationId\":\"PostIncomingWebhook\",\"summary\":\"Incoming webhook: post a message to the hook's channel\",\"description\":\"Answers \\`200 ok\\` (text/plain). Bad payloads get Slack's plain-text error codes (\\`invalid_payload\\`, \\`no_text\\`, \\`invalid_blocks\\`); an unregistered hook is \\`404 no_service\\` once any hook is registered. Also accepts form bodies with a \\`payload=<json>\\` field.\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":false}},\"requestBody\":{\"required\":true,\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"text\":{\"type\":\"string\",\"maxLength\":400},\"blocks\":{\"type\":\"array\",\"maxItems\":3,\"items\":{\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"section\",\"divider\",\"header\",\"context\"]},\"text\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mrkdwn\",\"plain_text\"]},\"text\":{\"type\":\"string\",\"maxLength\":200}}}}}},\"thread_ts\":{\"type\":\"string\",\"maxLength\":24},\"username\":{\"type\":\"string\",\"maxLength\":40},\"icon_emoji\":{\"type\":\"string\",\"maxLength\":40},\"unfurl_links\":{\"type\":\"boolean\"}}}}}},\"responses\":{\"200\":{\"description\":\"Posted\",\"content\":{\"text/plain\":{\"schema\":{\"type\":\"string\",\"enum\":[\"ok\"]}}}},\"400\":{\"description\":\"\\`invalid_payload\\`, \\`no_text\\`, \\`invalid_blocks\\`, \\`too_many_attachments\\`\",\"content\":{\"text/plain\":{\"schema\":{\"type\":\"string\"}}}},\"403\":{\"description\":\"\\`action_prohibited\\`, \\`posting_to_general_channel_denied\\`\",\"content\":{\"text/plain\":{\"schema\":{\"type\":\"string\"}}}},\"404\":{\"description\":\"\\`no_service\\`, \\`channel_not_found\\`\",\"content\":{\"text/plain\":{\"schema\":{\"type\":\"string\"}}}},\"410\":{\"description\":\"\\`channel_is_archived\\`\",\"content\":{\"text/plain\":{\"schema\":{\"type\":\"string\"}}}},\"429\":{\"description\":\"\\`rate_limited\\`, with \\`retry-after\\`\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"text/plain\":{\"schema\":{\"type\":\"string\"}}}},\"500\":{\"description\":\"\\`internal_error\\`\",\"content\":{\"text/plain\":{\"schema\":{\"type\":\"string\"}}}},\"503\":{\"description\":\"\\`service_unavailable\\`\",\"content\":{\"text/plain\":{\"schema\":{\"type\":\"string\"}}}}},\"security\":[]}},\"/api/chat.postMessage\":{\"post\":{\"operationId\":\"ChatPostMessage\",\"summary\":\"chat.postMessage: post a message (or a thread reply) to a channel\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":false}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"text\":{\"type\":\"string\",\"maxLength\":400},\"blocks\":{\"type\":\"string\",\"description\":\"JSON-encoded blocks\",\"maxLength\":2000},\"thread_ts\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}}},\"required\":[\"channel\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"text\":{\"type\":\"string\",\"maxLength\":400},\"blocks\":{\"type\":\"array\",\"maxItems\":3,\"items\":{\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"section\",\"divider\",\"header\",\"context\"]},\"text\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mrkdwn\",\"plain_text\"]},\"text\":{\"type\":\"string\",\"maxLength\":200}}}}}},\"thread_ts\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}},\"mrkdwn\":{\"type\":\"boolean\"},\"unfurl_links\":{\"type\":\"boolean\"}},\"required\":[\"channel\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PostMessageResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/chat.update\":{\"post\":{\"operationId\":\"ChatUpdate\",\"summary\":\"chat.update: edit a message the bot posted\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":false}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"ts\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}},\"text\":{\"type\":\"string\",\"maxLength\":400}},\"required\":[\"channel\",\"ts\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"ts\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}},\"text\":{\"type\":\"string\",\"maxLength\":400},\"blocks\":{\"type\":\"array\",\"maxItems\":3,\"items\":{\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"section\",\"divider\",\"header\",\"context\"]},\"text\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mrkdwn\",\"plain_text\"]},\"text\":{\"type\":\"string\",\"maxLength\":200}}}}}}},\"required\":[\"channel\",\"ts\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/UpdateResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/chat.postEphemeral\":{\"post\":{\"operationId\":\"ChatPostEphemeral\",\"summary\":\"chat.postEphemeral: a message only one user sees\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":false}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"user\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":20,\"x-mockingbird-resource-ref\":{\"type\":\"user\",\"missing\":\"U00MISSING\"}},\"text\":{\"type\":\"string\",\"maxLength\":400}},\"required\":[\"channel\",\"user\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"user\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":20,\"x-mockingbird-resource-ref\":{\"type\":\"user\",\"missing\":\"U00MISSING\"}},\"text\":{\"type\":\"string\",\"maxLength\":400},\"blocks\":{\"type\":\"array\",\"maxItems\":3,\"items\":{\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"section\",\"divider\",\"header\",\"context\"]},\"text\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"mrkdwn\",\"plain_text\"]},\"text\":{\"type\":\"string\",\"maxLength\":200}}}}}},\"thread_ts\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}}},\"required\":[\"channel\",\"user\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/EphemeralResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/chat.getPermalink\":{\"get\":{\"operationId\":\"ChatGetPermalinkGet\",\"summary\":\"chat.getPermalink (query arguments)\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"parameters\":[{\"name\":\"channel\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"}},{\"name\":\"message_ts\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}}}],\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PermalinkResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}},\"post\":{\"operationId\":\"ChatGetPermalink\",\"summary\":\"chat.getPermalink: the permalink of a message\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"message_ts\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}}},\"required\":[\"channel\",\"message_ts\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"message_ts\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}}},\"required\":[\"channel\",\"message_ts\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PermalinkResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/reactions.add\":{\"post\":{\"operationId\":\"ReactionsAdd\",\"summary\":\"reactions.add: react to a message\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":false}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"timestamp\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}},\"name\":{\"type\":\"string\",\"enum\":[\"eyes\",\"white_check_mark\",\"x\",\"thumbsup\",\"rotating_light\"]}},\"required\":[\"channel\",\"timestamp\",\"name\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"timestamp\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}},\"name\":{\"type\":\"string\",\"enum\":[\"eyes\",\"white_check_mark\",\"x\",\"thumbsup\",\"rotating_light\"]}},\"required\":[\"channel\",\"timestamp\",\"name\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Envelope\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/reactions.remove\":{\"post\":{\"operationId\":\"ReactionsRemove\",\"summary\":\"reactions.remove: take a reaction back\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":false}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"timestamp\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}},\"name\":{\"type\":\"string\",\"enum\":[\"eyes\",\"white_check_mark\",\"x\",\"thumbsup\",\"rotating_light\"]}},\"required\":[\"name\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"timestamp\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}},\"name\":{\"type\":\"string\",\"enum\":[\"eyes\",\"white_check_mark\",\"x\",\"thumbsup\",\"rotating_light\"]}},\"required\":[\"name\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/Envelope\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/reactions.get\":{\"get\":{\"operationId\":\"ReactionsGetGet\",\"summary\":\"reactions.get (query arguments)\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"parameters\":[{\"name\":\"channel\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"}},{\"name\":\"timestamp\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}}},{\"name\":\"full\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"enum\":[\"true\",\"false\"]}}],\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ReactionsGetResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}},\"post\":{\"operationId\":\"ReactionsGet\",\"summary\":\"reactions.get: a message and its reactions\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"timestamp\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}},\"full\":{\"type\":\"string\",\"enum\":[\"true\",\"false\"]}},\"required\":[\"channel\",\"timestamp\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"},\"timestamp\":{\"type\":\"string\",\"maxLength\":24,\"x-mockingbird-resource-ref\":{\"type\":\"message\",\"missing\":\"1000000000.000000\"}},\"full\":{\"type\":\"boolean\"}},\"required\":[\"channel\",\"timestamp\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ReactionsGetResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/auth.test\":{\"get\":{\"operationId\":\"AuthTestGet\",\"summary\":\"auth.test (GET)\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"parameters\":[],\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AuthTestResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}},\"post\":{\"operationId\":\"AuthTest\",\"summary\":\"auth.test: who the token belongs to\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{}}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{}}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/AuthTestResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/conversations.join\":{\"post\":{\"operationId\":\"ConversationsJoin\",\"summary\":\"conversations.join: the bot joins a public channel\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":false}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"}},\"required\":[\"channel\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40,\"description\":\"Channel id (\\`C\u2026\\`) or name (\\`#alerts\\`)\"}},\"required\":[\"channel\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/JoinResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/users.info\":{\"get\":{\"operationId\":\"UsersInfoGet\",\"summary\":\"users.info (query arguments)\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"parameters\":[{\"name\":\"user\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":20,\"x-mockingbird-resource-ref\":{\"type\":\"user\",\"missing\":\"U00MISSING\"}}}],\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/UserResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}},\"post\":{\"operationId\":\"UsersInfo\",\"summary\":\"users.info: a user's profile\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":20,\"x-mockingbird-resource-ref\":{\"type\":\"user\",\"missing\":\"U00MISSING\"}}},\"required\":[\"user\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":20,\"x-mockingbird-resource-ref\":{\"type\":\"user\",\"missing\":\"U00MISSING\"}}},\"required\":[\"user\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/UserResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/users.lookupByEmail\":{\"get\":{\"operationId\":\"UsersLookupByEmailGet\",\"summary\":\"users.lookupByEmail (query arguments)\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"parameters\":[{\"name\":\"email\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"format\":\"email\",\"maxLength\":80}}],\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/UserResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}},\"post\":{\"operationId\":\"UsersLookupByEmail\",\"summary\":\"users.lookupByEmail: find a user by email\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"email\":{\"type\":\"string\",\"format\":\"email\",\"maxLength\":80}},\"required\":[\"email\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"email\":{\"type\":\"string\",\"format\":\"email\",\"maxLength\":80}},\"required\":[\"email\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/UserResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/files.info\":{\"get\":{\"operationId\":\"FilesInfoGet\",\"summary\":\"files.info (query arguments)\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"parameters\":[{\"name\":\"file\",\"in\":\"query\",\"required\":false,\"schema\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":20,\"x-mockingbird-resource-ref\":{\"type\":\"file\",\"missing\":\"F00MISSING\"}}}],\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/FileResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}},\"post\":{\"operationId\":\"FilesInfo\",\"summary\":\"files.info: a file's metadata and private download URL\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":true}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"file\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":20,\"x-mockingbird-resource-ref\":{\"type\":\"file\",\"missing\":\"F00MISSING\"}}},\"required\":[\"file\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"file\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":20,\"x-mockingbird-resource-ref\":{\"type\":\"file\",\"missing\":\"F00MISSING\"}}},\"required\":[\"file\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/FileResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/views.open\":{\"post\":{\"operationId\":\"ViewsOpen\",\"summary\":\"views.open: open a modal for a trigger\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":false}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"trigger_id\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40},\"view\":{\"type\":\"string\",\"description\":\"JSON-encoded view\",\"maxLength\":2000}},\"required\":[\"trigger_id\",\"view\"]}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"trigger_id\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":40},\"view\":{\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"modal\",\"home\"]},\"callback_id\":{\"type\":\"string\",\"maxLength\":40},\"title\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"plain_text\"]},\"text\":{\"type\":\"string\",\"maxLength\":24}}},\"blocks\":{\"type\":\"array\",\"maxItems\":3,\"items\":{\"type\":\"object\"}},\"private_metadata\":{\"type\":\"string\",\"maxLength\":200}}}},\"required\":[\"trigger_id\",\"view\"]}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` with the method's fields, or \\`ok: false\\` with an \\`error\\` code (Slack answers logical failures with HTTP 200)\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ViewResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/api/apps.connections.open\":{\"post\":{\"operationId\":\"AppsConnectionsOpen\",\"summary\":\"apps.connections.open: mint a one-use Socket Mode WebSocket URL\",\"description\":\"App-level token (\\`xapp-\\`) in the \\`Authorization\\` header. A missing token is \\`not_authed\\`,\\\\na bot or user token is \\`not_allowed_token_type\\`, and a malformed, unknown, or revoked\\\\napp token is \\`invalid_auth\\` or \\`token_revoked\\`. Logical errors are HTTP 200. The \\`url\\`\\\\nis a \\`ws://\\` or \\`wss://\\` URL on this server (\\`/link/?ticket=\u2026&app_id=\u2026\\`).\\\\n\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":true,\"safe\":false}},\"requestBody\":{\"required\":false,\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{}}},\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{}}}}},\"responses\":{\"200\":{\"description\":\"Slack envelope: \\`ok: true\\` and a WebSocket \\`url\\`, or \\`ok: false\\` with an \\`error\\` code\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ConnectionsOpenResponse\"}}}},\"429\":{\"description\":\"Rate limited (\\`ratelimited\\`), with \\`retry-after\\` seconds\",\"headers\":{\"retry-after\":{\"schema\":{\"type\":\"string\"}}},\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"500\":{\"description\":\"Slack is having trouble\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}},\"503\":{\"description\":\"Slack is unavailable\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorEnvelope\"}}}}}}},\"/\":{\"get\":{\"operationId\":\"GET /\",\"summary\":\"GET /\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/files.list\":{\"get\":{\"operationId\":\"GET /api/files.list\",\"summary\":\"GET /api/files.list\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}},\"post\":{\"operationId\":\"POST /api/files.list\",\"summary\":\"POST /api/files.list\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/pins.list\":{\"get\":{\"operationId\":\"GET /api/pins.list\",\"summary\":\"GET /api/pins.list\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}},\"post\":{\"operationId\":\"POST /api/pins.list\",\"summary\":\"POST /api/pins.list\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/users.getPresence\":{\"get\":{\"operationId\":\"GET /api/users.getPresence\",\"summary\":\"GET /api/users.getPresence\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}},\"post\":{\"operationId\":\"POST /api/users.getPresence\",\"summary\":\"POST /api/users.getPresence\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/users.profile.get\":{\"get\":{\"operationId\":\"GET /api/users.profile.get\",\"summary\":\"GET /api/users.profile.get\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}},\"post\":{\"operationId\":\"POST /api/users.profile.get\",\"summary\":\"POST /api/users.profile.get\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/files-pri/{fileId}/{filename}\":{\"get\":{\"operationId\":\"GET /files-pri/:fileId/:filename\",\"summary\":\"GET /files-pri/:fileId/:filename\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[{\"in\":\"path\",\"name\":\"fileId\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"in\":\"path\",\"name\":\"filename\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/oauth/v2/authorize\":{\"get\":{\"operationId\":\"GET /oauth/v2/authorize\",\"summary\":\"GET /oauth/v2/authorize\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/bookmarks.add\":{\"post\":{\"operationId\":\"POST /api/bookmarks.add\",\"summary\":\"POST /api/bookmarks.add\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/bookmarks.edit\":{\"post\":{\"operationId\":\"POST /api/bookmarks.edit\",\"summary\":\"POST /api/bookmarks.edit\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/bookmarks.list\":{\"post\":{\"operationId\":\"POST /api/bookmarks.list\",\"summary\":\"POST /api/bookmarks.list\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/bookmarks.remove\":{\"post\":{\"operationId\":\"POST /api/bookmarks.remove\",\"summary\":\"POST /api/bookmarks.remove\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/bots.info\":{\"post\":{\"operationId\":\"POST /api/bots.info\",\"summary\":\"POST /api/bots.info\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/chat.delete\":{\"post\":{\"operationId\":\"POST /api/chat.delete\",\"summary\":\"POST /api/chat.delete\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/chat.deleteScheduledMessage\":{\"post\":{\"operationId\":\"POST /api/chat.deleteScheduledMessage\",\"summary\":\"POST /api/chat.deleteScheduledMessage\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/chat.meMessage\":{\"post\":{\"operationId\":\"POST /api/chat.meMessage\",\"summary\":\"POST /api/chat.meMessage\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/chat.scheduleMessage\":{\"post\":{\"operationId\":\"POST /api/chat.scheduleMessage\",\"summary\":\"POST /api/chat.scheduleMessage\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/chat.scheduledMessages.list\":{\"post\":{\"operationId\":\"POST /api/chat.scheduledMessages.list\",\"summary\":\"POST /api/chat.scheduledMessages.list\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.archive\":{\"post\":{\"operationId\":\"POST /api/conversations.archive\",\"summary\":\"POST /api/conversations.archive\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.close\":{\"post\":{\"operationId\":\"POST /api/conversations.close\",\"summary\":\"POST /api/conversations.close\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.create\":{\"post\":{\"operationId\":\"POST /api/conversations.create\",\"summary\":\"POST /api/conversations.create\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.history\":{\"post\":{\"operationId\":\"POST /api/conversations.history\",\"summary\":\"POST /api/conversations.history\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.info\":{\"post\":{\"operationId\":\"POST /api/conversations.info\",\"summary\":\"POST /api/conversations.info\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.invite\":{\"post\":{\"operationId\":\"POST /api/conversations.invite\",\"summary\":\"POST /api/conversations.invite\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.kick\":{\"post\":{\"operationId\":\"POST /api/conversations.kick\",\"summary\":\"POST /api/conversations.kick\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.leave\":{\"post\":{\"operationId\":\"POST /api/conversations.leave\",\"summary\":\"POST /api/conversations.leave\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.list\":{\"post\":{\"operationId\":\"POST /api/conversations.list\",\"summary\":\"POST /api/conversations.list\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.mark\":{\"post\":{\"operationId\":\"POST /api/conversations.mark\",\"summary\":\"POST /api/conversations.mark\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.members\":{\"post\":{\"operationId\":\"POST /api/conversations.members\",\"summary\":\"POST /api/conversations.members\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.open\":{\"post\":{\"operationId\":\"POST /api/conversations.open\",\"summary\":\"POST /api/conversations.open\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.rename\":{\"post\":{\"operationId\":\"POST /api/conversations.rename\",\"summary\":\"POST /api/conversations.rename\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.replies\":{\"post\":{\"operationId\":\"POST /api/conversations.replies\",\"summary\":\"POST /api/conversations.replies\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.setPurpose\":{\"post\":{\"operationId\":\"POST /api/conversations.setPurpose\",\"summary\":\"POST /api/conversations.setPurpose\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.setTopic\":{\"post\":{\"operationId\":\"POST /api/conversations.setTopic\",\"summary\":\"POST /api/conversations.setTopic\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/conversations.unarchive\":{\"post\":{\"operationId\":\"POST /api/conversations.unarchive\",\"summary\":\"POST /api/conversations.unarchive\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/files.completeUploadExternal\":{\"post\":{\"operationId\":\"POST /api/files.completeUploadExternal\",\"summary\":\"POST /api/files.completeUploadExternal\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/files.delete\":{\"post\":{\"operationId\":\"POST /api/files.delete\",\"summary\":\"POST /api/files.delete\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/files.getUploadURLExternal\":{\"post\":{\"operationId\":\"POST /api/files.getUploadURLExternal\",\"summary\":\"POST /api/files.getUploadURLExternal\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/oauth.v2.access\":{\"post\":{\"operationId\":\"POST /api/oauth.v2.access\",\"summary\":\"POST /api/oauth.v2.access\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/pins.add\":{\"post\":{\"operationId\":\"POST /api/pins.add\",\"summary\":\"POST /api/pins.add\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/pins.remove\":{\"post\":{\"operationId\":\"POST /api/pins.remove\",\"summary\":\"POST /api/pins.remove\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/team.info\":{\"post\":{\"operationId\":\"POST /api/team.info\",\"summary\":\"POST /api/team.info\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/users.list\":{\"post\":{\"operationId\":\"POST /api/users.list\",\"summary\":\"POST /api/users.list\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/users.profile.set\":{\"post\":{\"operationId\":\"POST /api/users.profile.set\",\"summary\":\"POST /api/users.profile.set\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/users.setPresence\":{\"post\":{\"operationId\":\"POST /api/users.setPresence\",\"summary\":\"POST /api/users.setPresence\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/views.generateTriggerId\":{\"post\":{\"operationId\":\"POST /api/views.generateTriggerId\",\"summary\":\"POST /api/views.generateTriggerId\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/views.publish\":{\"post\":{\"operationId\":\"POST /api/views.publish\",\"summary\":\"POST /api/views.publish\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/views.push\":{\"post\":{\"operationId\":\"POST /api/views.push\",\"summary\":\"POST /api/views.push\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/api/views.update\":{\"post\":{\"operationId\":\"POST /api/views.update\",\"summary\":\"POST /api/views.update\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/oauth/v2/authorize/callback\":{\"post\":{\"operationId\":\"POST /oauth/v2/authorize/callback\",\"summary\":\"POST /oauth/v2/authorize/callback\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}},\"/upload/v1/{fileId}\":{\"post\":{\"operationId\":\"POST /upload/v1/:fileId\",\"summary\":\"POST /upload/v1/:fileId\",\"x-mockingbird\":{\"supported\":true,\"parity\":{\"enabled\":false,\"safe\":false,\"reason\":\"Verified against a pinned package oracle; independent live vendor evidence is not available.\"}},\"parameters\":[{\"in\":\"path\",\"name\":\"fileId\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"responses\":{\"default\":{\"description\":\"Provider response. Exact behavior is exercised against the pinned package oracle; not independently vendor-verified.\"}}}}},\"components\":{\"securitySchemes\":{\"bearerAuth\":{\"type\":\"http\",\"scheme\":\"bearer\"}},\"schemas\":{\"Envelope\":{\"type\":\"object\",\"required\":[\"ok\"],\"properties\":{\"ok\":{\"type\":\"boolean\"},\"error\":{\"type\":\"string\"},\"warning\":{\"type\":\"string\"},\"needed\":{\"type\":\"string\"},\"provided\":{\"type\":\"string\"},\"response_metadata\":{\"type\":\"object\",\"properties\":{\"messages\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"warnings\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}}},\"ErrorEnvelope\":{\"type\":\"object\",\"required\":[\"ok\",\"error\"],\"properties\":{\"ok\":{\"type\":\"boolean\",\"enum\":[false]},\"error\":{\"type\":\"string\"}}},\"Message\":{\"type\":\"object\",\"required\":[\"type\",\"ts\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"message\"]},\"subtype\":{\"type\":\"string\"},\"text\":{\"type\":\"string\"},\"user\":{\"type\":\"string\"},\"bot_id\":{\"type\":\"string\"},\"app_id\":{\"type\":\"string\"},\"team\":{\"type\":\"string\"},\"ts\":{\"type\":\"string\",\"x-mockingbird-volatile\":{\"kind\":\"id\"}},\"thread_ts\":{\"type\":\"string\",\"x-mockingbird-volatile\":{\"kind\":\"id\"}},\"blocks\":{\"type\":\"array\",\"items\":{\"type\":\"object\"}},\"edited\":{\"type\":\"object\",\"properties\":{\"user\":{\"type\":\"string\"},\"ts\":{\"type\":\"string\",\"x-mockingbird-volatile\":{\"kind\":\"id\"}}}},\"reactions\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"count\":{\"type\":\"integer\"},\"users\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}}}},\"PostMessageResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\"},\"ts\":{\"type\":\"string\",\"x-mockingbird-resource\":{\"type\":\"message\",\"identity\":true},\"x-mockingbird-volatile\":{\"kind\":\"id\"}},\"message\":{\"$ref\":\"#/components/schemas/Message\"}}}]},\"ReactionsGetResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"message\"]},\"channel\":{\"type\":\"string\"},\"message\":{\"$ref\":\"#/components/schemas/Message\"}}}]},\"UpdateResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\"},\"ts\":{\"type\":\"string\",\"x-mockingbird-volatile\":{\"kind\":\"id\"}},\"text\":{\"type\":\"string\"},\"message\":{\"$ref\":\"#/components/schemas/Message\"}}}]},\"EphemeralResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"message_ts\":{\"type\":\"string\",\"x-mockingbird-volatile\":{\"kind\":\"id\"}}}}]},\"PermalinkResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"channel\":{\"type\":\"string\"},\"permalink\":{\"type\":\"string\",\"x-mockingbird-volatile\":{\"kind\":\"url\"}}}}]},\"AuthTestResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"url\":{\"type\":\"string\"},\"team\":{\"type\":\"string\"},\"user\":{\"type\":\"string\"},\"team_id\":{\"type\":\"string\"},\"user_id\":{\"type\":\"string\"},\"bot_id\":{\"type\":\"string\"},\"is_enterprise_install\":{\"type\":\"boolean\"}}}]},\"Channel\":{\"type\":\"object\",\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"is_channel\":{\"type\":\"boolean\"},\"is_private\":{\"type\":\"boolean\"},\"is_archived\":{\"type\":\"boolean\"},\"is_member\":{\"type\":\"boolean\"},\"created\":{\"type\":\"integer\"}}},\"JoinResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"channel\":{\"$ref\":\"#/components/schemas/Channel\"}}}]},\"User\":{\"type\":\"object\",\"required\":[\"id\",\"name\"],\"properties\":{\"id\":{\"type\":\"string\",\"x-mockingbird-resource\":{\"type\":\"user\",\"identity\":true}},\"team_id\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"real_name\":{\"type\":\"string\"},\"deleted\":{\"type\":\"boolean\"},\"is_bot\":{\"type\":\"boolean\"},\"tz\":{\"type\":\"string\"},\"profile\":{\"type\":\"object\",\"properties\":{\"email\":{\"type\":\"string\"},\"real_name\":{\"type\":\"string\"},\"display_name\":{\"type\":\"string\"}}}}},\"UserResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"user\":{\"$ref\":\"#/components/schemas/User\"}}}]},\"File\":{\"type\":\"object\",\"required\":[\"id\"],\"properties\":{\"id\":{\"type\":\"string\",\"x-mockingbird-resource\":{\"type\":\"file\",\"identity\":true}},\"name\":{\"type\":\"string\"},\"title\":{\"type\":\"string\"},\"mimetype\":{\"type\":\"string\"},\"filetype\":{\"type\":\"string\"},\"size\":{\"type\":\"integer\"},\"created\":{\"type\":\"integer\"},\"url_private\":{\"type\":\"string\"},\"url_private_download\":{\"type\":\"string\"},\"permalink\":{\"type\":\"string\"}}},\"FileResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"file\":{\"$ref\":\"#/components/schemas/File\"}}}]},\"ViewResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"view\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"x-mockingbird-volatile\":{\"kind\":\"id\"}},\"type\":{\"type\":\"string\"},\"team_id\":{\"type\":\"string\"},\"callback_id\":{\"type\":\"string\"},\"hash\":{\"type\":\"string\",\"x-mockingbird-volatile\":{\"kind\":\"opaque\"}},\"blocks\":{\"type\":\"array\",\"items\":{\"type\":\"object\"}},\"state\":{\"type\":\"object\"},\"private_metadata\":{\"type\":\"string\"},\"title\":{\"type\":\"object\"},\"app_id\":{\"type\":\"string\"},\"bot_id\":{\"type\":\"string\"}}}}}]},\"ConnectionsOpenResponse\":{\"allOf\":[{\"$ref\":\"#/components/schemas/Envelope\"},{\"type\":\"object\",\"properties\":{\"url\":{\"type\":\"string\",\"description\":\"One-use Socket Mode WebSocket URL (\\`ticket\\` query parameter).\",\"x-mockingbird-volatile\":{\"kind\":\"url\"}}}}]}}}}`) as OpenAPIDocument\n\nexport type OperationId = \"PostIncomingWebhook\" | \"ChatPostMessage\" | \"ChatUpdate\" | \"ChatPostEphemeral\" | \"ChatGetPermalinkGet\" | \"ChatGetPermalink\" | \"ReactionsAdd\" | \"ReactionsRemove\" | \"ReactionsGetGet\" | \"ReactionsGet\" | \"AuthTestGet\" | \"AuthTest\" | \"ConversationsJoin\" | \"UsersInfoGet\" | \"UsersInfo\" | \"UsersLookupByEmailGet\" | \"UsersLookupByEmail\" | \"FilesInfoGet\" | \"FilesInfo\" | \"ViewsOpen\" | \"AppsConnectionsOpen\" | \"GET /\" | \"GET /api/files.list\" | \"POST /api/files.list\" | \"GET /api/pins.list\" | \"POST /api/pins.list\" | \"GET /api/users.getPresence\" | \"POST /api/users.getPresence\" | \"GET /api/users.profile.get\" | \"POST /api/users.profile.get\" | \"GET /files-pri/:fileId/:filename\" | \"GET /oauth/v2/authorize\" | \"POST /api/bookmarks.add\" | \"POST /api/bookmarks.edit\" | \"POST /api/bookmarks.list\" | \"POST /api/bookmarks.remove\" | \"POST /api/bots.info\" | \"POST /api/chat.delete\" | \"POST /api/chat.deleteScheduledMessage\" | \"POST /api/chat.meMessage\" | \"POST /api/chat.scheduleMessage\" | \"POST /api/chat.scheduledMessages.list\" | \"POST /api/conversations.archive\" | \"POST /api/conversations.close\" | \"POST /api/conversations.create\" | \"POST /api/conversations.history\" | \"POST /api/conversations.info\" | \"POST /api/conversations.invite\" | \"POST /api/conversations.kick\" | \"POST /api/conversations.leave\" | \"POST /api/conversations.list\" | \"POST /api/conversations.mark\" | \"POST /api/conversations.members\" | \"POST /api/conversations.open\" | \"POST /api/conversations.rename\" | \"POST /api/conversations.replies\" | \"POST /api/conversations.setPurpose\" | \"POST /api/conversations.setTopic\" | \"POST /api/conversations.unarchive\" | \"POST /api/files.completeUploadExternal\" | \"POST /api/files.delete\" | \"POST /api/files.getUploadURLExternal\" | \"POST /api/oauth.v2.access\" | \"POST /api/pins.add\" | \"POST /api/pins.remove\" | \"POST /api/team.info\" | \"POST /api/users.list\" | \"POST /api/users.profile.set\" | \"POST /api/users.setPresence\" | \"POST /api/views.generateTriggerId\" | \"POST /api/views.publish\" | \"POST /api/views.push\" | \"POST /api/views.update\" | \"POST /oauth/v2/authorize/callback\" | \"POST /upload/v1/:fileId\"\nexport type SupportedOperationId = \"PostIncomingWebhook\" | \"ChatPostMessage\" | \"ChatUpdate\" | \"ChatPostEphemeral\" | \"ChatGetPermalinkGet\" | \"ChatGetPermalink\" | \"ReactionsAdd\" | \"ReactionsRemove\" | \"ReactionsGetGet\" | \"ReactionsGet\" | \"AuthTestGet\" | \"AuthTest\" | \"ConversationsJoin\" | \"UsersInfoGet\" | \"UsersInfo\" | \"UsersLookupByEmailGet\" | \"UsersLookupByEmail\" | \"FilesInfoGet\" | \"FilesInfo\" | \"ViewsOpen\" | \"AppsConnectionsOpen\" | \"GET /\" | \"GET /api/files.list\" | \"POST /api/files.list\" | \"GET /api/pins.list\" | \"POST /api/pins.list\" | \"GET /api/users.getPresence\" | \"POST /api/users.getPresence\" | \"GET /api/users.profile.get\" | \"POST /api/users.profile.get\" | \"GET /files-pri/:fileId/:filename\" | \"GET /oauth/v2/authorize\" | \"POST /api/bookmarks.add\" | \"POST /api/bookmarks.edit\" | \"POST /api/bookmarks.list\" | \"POST /api/bookmarks.remove\" | \"POST /api/bots.info\" | \"POST /api/chat.delete\" | \"POST /api/chat.deleteScheduledMessage\" | \"POST /api/chat.meMessage\" | \"POST /api/chat.scheduleMessage\" | \"POST /api/chat.scheduledMessages.list\" | \"POST /api/conversations.archive\" | \"POST /api/conversations.close\" | \"POST /api/conversations.create\" | \"POST /api/conversations.history\" | \"POST /api/conversations.info\" | \"POST /api/conversations.invite\" | \"POST /api/conversations.kick\" | \"POST /api/conversations.leave\" | \"POST /api/conversations.list\" | \"POST /api/conversations.mark\" | \"POST /api/conversations.members\" | \"POST /api/conversations.open\" | \"POST /api/conversations.rename\" | \"POST /api/conversations.replies\" | \"POST /api/conversations.setPurpose\" | \"POST /api/conversations.setTopic\" | \"POST /api/conversations.unarchive\" | \"POST /api/files.completeUploadExternal\" | \"POST /api/files.delete\" | \"POST /api/files.getUploadURLExternal\" | \"POST /api/oauth.v2.access\" | \"POST /api/pins.add\" | \"POST /api/pins.remove\" | \"POST /api/team.info\" | \"POST /api/users.list\" | \"POST /api/users.profile.set\" | \"POST /api/users.setPresence\" | \"POST /api/views.generateTriggerId\" | \"POST /api/views.publish\" | \"POST /api/views.push\" | \"POST /api/views.update\" | \"POST /oauth/v2/authorize/callback\" | \"POST /upload/v1/:fileId\"\nexport const operationIds = [\"PostIncomingWebhook\",\"ChatPostMessage\",\"ChatUpdate\",\"ChatPostEphemeral\",\"ChatGetPermalinkGet\",\"ChatGetPermalink\",\"ReactionsAdd\",\"ReactionsRemove\",\"ReactionsGetGet\",\"ReactionsGet\",\"AuthTestGet\",\"AuthTest\",\"ConversationsJoin\",\"UsersInfoGet\",\"UsersInfo\",\"UsersLookupByEmailGet\",\"UsersLookupByEmail\",\"FilesInfoGet\",\"FilesInfo\",\"ViewsOpen\",\"AppsConnectionsOpen\",\"GET /\",\"GET /api/files.list\",\"POST /api/files.list\",\"GET /api/pins.list\",\"POST /api/pins.list\",\"GET /api/users.getPresence\",\"POST /api/users.getPresence\",\"GET /api/users.profile.get\",\"POST /api/users.profile.get\",\"GET /files-pri/:fileId/:filename\",\"GET /oauth/v2/authorize\",\"POST /api/bookmarks.add\",\"POST /api/bookmarks.edit\",\"POST /api/bookmarks.list\",\"POST /api/bookmarks.remove\",\"POST /api/bots.info\",\"POST /api/chat.delete\",\"POST /api/chat.deleteScheduledMessage\",\"POST /api/chat.meMessage\",\"POST /api/chat.scheduleMessage\",\"POST /api/chat.scheduledMessages.list\",\"POST /api/conversations.archive\",\"POST /api/conversations.close\",\"POST /api/conversations.create\",\"POST /api/conversations.history\",\"POST /api/conversations.info\",\"POST /api/conversations.invite\",\"POST /api/conversations.kick\",\"POST /api/conversations.leave\",\"POST /api/conversations.list\",\"POST /api/conversations.mark\",\"POST /api/conversations.members\",\"POST /api/conversations.open\",\"POST /api/conversations.rename\",\"POST /api/conversations.replies\",\"POST /api/conversations.setPurpose\",\"POST /api/conversations.setTopic\",\"POST /api/conversations.unarchive\",\"POST /api/files.completeUploadExternal\",\"POST /api/files.delete\",\"POST /api/files.getUploadURLExternal\",\"POST /api/oauth.v2.access\",\"POST /api/pins.add\",\"POST /api/pins.remove\",\"POST /api/team.info\",\"POST /api/users.list\",\"POST /api/users.profile.set\",\"POST /api/users.setPresence\",\"POST /api/views.generateTriggerId\",\"POST /api/views.publish\",\"POST /api/views.push\",\"POST /api/views.update\",\"POST /oauth/v2/authorize/callback\",\"POST /upload/v1/:fileId\"] as const\nexport const supportedOperationIds = [\"PostIncomingWebhook\",\"ChatPostMessage\",\"ChatUpdate\",\"ChatPostEphemeral\",\"ChatGetPermalinkGet\",\"ChatGetPermalink\",\"ReactionsAdd\",\"ReactionsRemove\",\"ReactionsGetGet\",\"ReactionsGet\",\"AuthTestGet\",\"AuthTest\",\"ConversationsJoin\",\"UsersInfoGet\",\"UsersInfo\",\"UsersLookupByEmailGet\",\"UsersLookupByEmail\",\"FilesInfoGet\",\"FilesInfo\",\"ViewsOpen\",\"AppsConnectionsOpen\",\"GET /\",\"GET /api/files.list\",\"POST /api/files.list\",\"GET /api/pins.list\",\"POST /api/pins.list\",\"GET /api/users.getPresence\",\"POST /api/users.getPresence\",\"GET /api/users.profile.get\",\"POST /api/users.profile.get\",\"GET /files-pri/:fileId/:filename\",\"GET /oauth/v2/authorize\",\"POST /api/bookmarks.add\",\"POST /api/bookmarks.edit\",\"POST /api/bookmarks.list\",\"POST /api/bookmarks.remove\",\"POST /api/bots.info\",\"POST /api/chat.delete\",\"POST /api/chat.deleteScheduledMessage\",\"POST /api/chat.meMessage\",\"POST /api/chat.scheduleMessage\",\"POST /api/chat.scheduledMessages.list\",\"POST /api/conversations.archive\",\"POST /api/conversations.close\",\"POST /api/conversations.create\",\"POST /api/conversations.history\",\"POST /api/conversations.info\",\"POST /api/conversations.invite\",\"POST /api/conversations.kick\",\"POST /api/conversations.leave\",\"POST /api/conversations.list\",\"POST /api/conversations.mark\",\"POST /api/conversations.members\",\"POST /api/conversations.open\",\"POST /api/conversations.rename\",\"POST /api/conversations.replies\",\"POST /api/conversations.setPurpose\",\"POST /api/conversations.setTopic\",\"POST /api/conversations.unarchive\",\"POST /api/files.completeUploadExternal\",\"POST /api/files.delete\",\"POST /api/files.getUploadURLExternal\",\"POST /api/oauth.v2.access\",\"POST /api/pins.add\",\"POST /api/pins.remove\",\"POST /api/team.info\",\"POST /api/users.list\",\"POST /api/users.profile.set\",\"POST /api/users.setPresence\",\"POST /api/views.generateTriggerId\",\"POST /api/views.publish\",\"POST /api/views.push\",\"POST /api/views.update\",\"POST /oauth/v2/authorize/callback\",\"POST /upload/v1/:fileId\"] as const\n", "export const nativeOperationIds = [\n \"PostIncomingWebhook\",\n \"ChatPostMessage\",\n \"ChatUpdate\",\n \"ChatPostEphemeral\",\n \"ChatGetPermalinkGet\",\n \"ChatGetPermalink\",\n \"ReactionsAdd\",\n \"ReactionsRemove\",\n \"ReactionsGetGet\",\n \"ReactionsGet\",\n \"AuthTestGet\",\n \"AuthTest\",\n \"ConversationsJoin\",\n \"UsersInfoGet\",\n \"UsersInfo\",\n \"UsersLookupByEmailGet\",\n \"UsersLookupByEmail\",\n \"FilesInfoGet\",\n \"FilesInfo\",\n \"ViewsOpen\",\n \"AppsConnectionsOpen\",\n] as const\nexport type NativeOperationId = (typeof nativeOperationIds)[number]\n", "/**\n * Socket Mode tickets and connection records.\n *\n * The HTTP handler (portable) mints tickets. The Node server binds a transport when the\n * WebSocket upgrades. Nothing here imports Node, so the published fetch entry stays portable.\n */\n\nexport type SocketState = \"pending\" | \"open\" | \"closing\" | \"closed\"\n\nexport type SocketRecord = {\n namespace: string\n appId: string\n ticket: string\n connectedAt: string | null\n state: SocketState\n reconnectCount: number\n helloLatencyMs: number\n closeAfterHello: boolean\n abnormalClose: boolean\n /** Close with a `warning` disconnect when this many ms have passed. `null` keeps it open. */\n lifetimeMs: number | null\n}\n\nexport type SocketTransport = {\n disconnect(reason: string, code: number): void\n destroy(): void\n}\n\nexport type IssueSocketInput = {\n namespace: string\n appId: string\n helloLatencyMs: number\n closeAfterHello: boolean\n abnormalClose: boolean\n lifetimeMs: number | null\n}\n\nconst records = new Map<string, SocketRecord>()\nconst transports = new Map<string, SocketTransport>()\n/** How many tickets this namespace has been issued, including closed ones. */\nconst issued = new Map<string, number>()\n\nconst publicRecord = (record: SocketRecord): SocketRecord => ({\n namespace: record.namespace,\n appId: record.appId,\n ticket: record.ticket,\n connectedAt: record.connectedAt,\n state: record.state,\n reconnectCount: record.reconnectCount,\n helloLatencyMs: record.helloLatencyMs,\n closeAfterHello: record.closeAfterHello,\n abnormalClose: record.abnormalClose,\n lifetimeMs: record.lifetimeMs,\n})\n\nexport const issueSocketTicket = (input: IssueSocketInput): SocketRecord => {\n const prior = issued.get(input.namespace) ?? 0\n issued.set(input.namespace, prior + 1)\n const record: SocketRecord = {\n ...input,\n ticket: crypto.randomUUID(),\n connectedAt: null,\n state: \"pending\",\n reconnectCount: prior,\n }\n records.set(record.ticket, record)\n return publicRecord(record)\n}\n\n/**\n * Claim a pending ticket for one WebSocket. A second upgrade, or a ticket that already\n * closed, fails: Slack tickets are single-use.\n */\nexport const claimSocketTicket = (ticket: string): SocketRecord | undefined => {\n const record = records.get(ticket)\n if (record?.state !== \"pending\") return undefined\n record.state = \"open\"\n record.connectedAt = new Date().toISOString()\n return publicRecord(record)\n}\n\nexport const socketRecord = (ticket: string): SocketRecord | undefined => {\n const record = records.get(ticket)\n return record ? publicRecord(record) : undefined\n}\n\nexport const openSocketCount = (namespace: string): number => {\n let count = 0\n for (const record of records.values()) {\n if (record.namespace === namespace && record.state === \"open\") count += 1\n }\n return count\n}\n\nexport const listSocketConnections = (namespace?: string): SocketRecord[] =>\n [...records.values()]\n .filter((record) => namespace === undefined || record.namespace === namespace)\n .map(publicRecord)\n\nexport const bindSocketTransport = (ticket: string, transport: SocketTransport): void => {\n transports.set(ticket, transport)\n}\n\nexport const unbindSocketTransport = (ticket: string): void => {\n transports.delete(ticket)\n}\n\nexport const markSocketClosed = (ticket: string): void => {\n const record = records.get(ticket)\n if (!record || record.state === \"closed\") return\n record.state = \"closed\"\n transports.delete(ticket)\n}\n\n/** Send Slack's disconnect envelope to every open socket in the namespace. */\nexport const disconnectSockets = (namespace: string, reason: string, code: number): number => {\n let closed = 0\n for (const record of records.values()) {\n if (record.namespace !== namespace || record.state !== \"open\") continue\n record.state = \"closing\"\n closed += 1\n const transport = transports.get(record.ticket)\n if (transport) transport.disconnect(reason, code)\n else record.state = \"closed\"\n }\n return closed\n}\n\n/** Drop every socket and ticket for a namespace. Used by reset. */\nexport const closeSocketNamespace = (namespace: string): void => {\n for (const record of [...records.values()]) {\n if (record.namespace !== namespace) continue\n transports.get(record.ticket)?.destroy()\n transports.delete(record.ticket)\n records.delete(record.ticket)\n }\n issued.delete(namespace)\n}\n", "import { Collection, OutboxStore } from \"@crvouga/mockingbird-service\"\nimport type { SqliteClient } from \"@crvouga/mockingbird-sqlite\"\n\n/**\n * One message the app \"sent\": an incoming-webhook post or a Web API post. The outbox is the\n * point of this mock, so it keeps the text and blocks (the request journal never does).\n */\nexport type SlackMessage = {\n id: string\n /** Webhook path (`/services/T/B/X`) and/or channel id and name, for `?to=` matching. */\n to: string[]\n createdAt: string\n source: \"webhook\" | \"api\"\n /** The Web API method, or `incoming-webhook`. */\n method: string\n /** `/services/T\u2026/B\u2026/X\u2026` for webhook posts. */\n webhook: string | null\n /** Channel id (`C\u2026`), or the webhook path when the hook has no registered channel. */\n channel: string\n text: string | null\n blocks: unknown[] | null\n attachments: unknown[] | null\n thread_ts: string | null\n ts: string\n /** Bot user id for Web API posts; the ephemeral recipient for `chat.postEphemeral`. */\n user: string | null\n ephemeral: boolean\n edited: { user: string; ts: string } | null\n reactions: { name: string; users: string[]; count: number }[]\n /** `unfurl_links` as the caller sent it, or `null` when the call omitted it. */\n unfurl_links: boolean | null\n /** Workspace id (`team_id`) the message was posted in. */\n workspace: string\n}\n\nexport type SlackChannel = {\n id: string\n name: string\n is_private: boolean\n is_archived: boolean\n /** Whether the bot is in it (`conversations.join` flips this and warns when already true). */\n is_member: boolean\n created: number\n}\n\nexport type SlackUser = {\n id: string\n name: string\n real_name: string\n email: string | null\n is_bot: boolean\n deleted: boolean\n tz: string\n}\n\nexport type SlackFile = {\n id: string\n name: string\n title: string\n mimetype: string\n filetype: string\n size: number\n created: number\n}\n\n/** A registered incoming webhook: the path suffix `T\u2026/B\u2026/X\u2026` and the channel it posts to. */\nexport type SlackHook = { path: string; channel: string }\n\nexport type SlackView = Record<string, unknown> & { id: string }\n\n/** Per-namespace knobs, set through `PUT /__admin/settings`; cleared on reset. */\nexport type Settings = {\n /** Workspace identity `auth.test` and permalinks report. */\n teamId: string\n teamName: string\n teamDomain: string\n botUserId: string\n botId: string\n appId: string\n /**\n * Tokens the Web API accepts. Empty (the default) accepts any `xoxb-`/`xoxp-`/`xoxa-`\n * token; anything else is `invalid_auth`, a missing token `not_authed`.\n */\n tokens: string[]\n /**\n * App-level tokens (`xapp-`) `apps.connections.open` accepts. Empty (the default) accepts\n * any well-formed `xapp-` token; a token that is not in the list is `invalid_auth`.\n */\n appTokens: string[]\n /** App-level tokens that answer `token_revoked` and open no socket. */\n revokedAppTokens: string[]\n /**\n * Close an open Socket Mode connection after this many milliseconds with a `warning`\n * disconnect. `null` (the default) leaves the socket up until the client or an admin\n * disconnect closes it.\n */\n socketLifetimeMs: number | null\n /**\n * Unknown channels answer `channel_not_found` when true. Default false: any channel id or\n * name is created on first use, so a suite need not seed the app's channel ids.\n */\n strictChannels: boolean\n}\n\nexport const DEFAULT_SETTINGS: Settings = {\n teamId: \"T0MOCKBIRD\",\n teamName: \"Mockingbird\",\n teamDomain: \"mockingbird\",\n botUserId: \"U0MOCKBOT\",\n botId: \"B0MOCKBOT\",\n appId: \"A0MOCKAPP\",\n tokens: [],\n appTokens: [],\n revokedAppTokens: [],\n socketLifetimeMs: null,\n strictChannels: false,\n}\n\nexport const DEFAULT_CHANNELS: readonly SlackChannel[] = [\n {\n id: \"C0GENERAL\",\n name: \"general\",\n is_private: false,\n is_archived: false,\n is_member: true,\n created: 1_700_000_000,\n },\n {\n id: \"C0ALERTS\",\n name: \"alerts\",\n is_private: false,\n is_archived: false,\n is_member: false,\n created: 1_700_000_000,\n },\n]\n\nexport const DEFAULT_USERS: readonly SlackUser[] = [\n {\n id: \"U0MOCKBOT\",\n name: \"mockingbird\",\n real_name: \"Mockingbird Bot\",\n email: null,\n is_bot: true,\n deleted: false,\n tz: \"America/Los_Angeles\",\n },\n {\n id: \"U0ADA\",\n name: \"ada\",\n real_name: \"Ada Lovelace\",\n email: \"ada@example.com\",\n is_bot: false,\n deleted: false,\n tz: \"America/Los_Angeles\",\n },\n]\n\nexport const DEFAULT_FILES: readonly SlackFile[] = [\n {\n id: \"F0REPORT\",\n name: \"lab-report.pdf\",\n title: \"lab-report.pdf\",\n mimetype: \"application/pdf\",\n filetype: \"pdf\",\n size: 48_213,\n created: 1_700_000_000,\n },\n]\n\nexport class SlackState {\n readonly outbox: OutboxStore<SlackMessage>\n readonly channels: Collection<SlackChannel>\n readonly users: Collection<SlackUser>\n readonly files: Collection<SlackFile>\n readonly hooks: Collection<SlackHook>\n readonly views: Collection<SlackView>\n readonly settings: Collection<Settings>\n /** Only its sequence is used: the microsecond part of every `ts`. */\n private readonly tsCounter: Collection<never>\n\n constructor(\n sqlite: SqliteClient,\n namespace: string,\n private readonly seed: { settings: Partial<Settings> },\n ) {\n this.outbox = new OutboxStore<SlackMessage>(sqlite, namespace)\n this.channels = new Collection(sqlite, namespace, \"channels\")\n this.users = new Collection(sqlite, namespace, \"users\")\n this.files = new Collection(sqlite, namespace, \"files\")\n this.hooks = new Collection(sqlite, namespace, \"hooks\")\n this.views = new Collection(sqlite, namespace, \"views\")\n this.settings = new Collection(sqlite, namespace, \"settings\")\n this.tsCounter = new Collection(sqlite, namespace, \"ts\")\n this.ensureSeeded()\n }\n\n /** Re-apply the default workspace after a reset. */\n ensureSeeded(): void {\n if (!this.settings.has(\"settings\")) {\n this.settings.insert(\"settings\", { ...DEFAULT_SETTINGS, ...this.seed.settings })\n }\n if (this.channels.count() === 0) {\n for (const channel of DEFAULT_CHANNELS) this.channels.insert(channel.id, channel)\n }\n if (this.users.count() === 0) {\n const bot = this.current().botUserId\n for (const user of DEFAULT_USERS) {\n const id = user.is_bot ? bot : user.id\n this.users.insert(id, { ...user, id })\n }\n }\n if (this.files.count() === 0) {\n for (const file of DEFAULT_FILES) this.files.insert(file.id, file)\n }\n }\n\n current(): Settings {\n return this.settings.get(\"settings\") ?? DEFAULT_SETTINGS\n }\n\n update(patch: Partial<Settings>): Settings {\n const next = { ...this.current(), ...patch }\n this.settings.insert(\"settings\", next)\n return next\n }\n\n /** `1700000000.000042`: mock-clock seconds, then a per-namespace counter as microseconds. */\n nextTs(nowMs: number): string {\n const seq = this.tsCounter.nextSequence() % 1_000_000\n return `${Math.floor(nowMs / 1000)}.${String(seq).padStart(6, \"0\")}`\n }\n\n /** By id (`C\u2026`), or by name with or without `#`. */\n findChannel(ref: string): SlackChannel | undefined {\n const byId = this.channels.get(ref)\n if (byId) return byId\n const name = ref.replace(/^#/, \"\").toLowerCase()\n return this.channels.list({ where: (c) => c.name === name }).at(0)?.value\n }\n\n findUserByEmail(email: string): SlackUser | undefined {\n const wanted = email.toLowerCase()\n return this.users.list({ where: (u) => u.email?.toLowerCase() === wanted }).at(0)?.value\n }\n\n /** The message `ts` in `channel` (webhook posts are addressed by their hook's channel). */\n findMessage(channel: string, ts: string): SlackMessage | undefined {\n return this.outbox\n .list({ where: (m) => m.ts === ts && !m.ephemeral && m.channel === channel })\n .at(0)\n }\n}\n", "import {\n type AdminRoutes,\n type Clock,\n createRuntime as createServiceRuntime,\n type FaultPreset,\n type MockControls,\n type OutboxItem,\n type OutboxStore,\n outboxAdminRoutes,\n type RequestLog,\n type ServiceRuntime,\n} from \"@crvouga/mockingbird-service\"\nimport type { SqliteClient } from \"@crvouga/mockingbird-sqlite\"\nimport { document } from \"./generated/openapi.js\"\nimport type { SlackAPIOptions } from \"./index.js\"\nimport { SLACK_NAMESPACE, SlackAPI, slackCredential } from \"./index.js\"\nimport { disconnectSockets, listSocketConnections } from \"./sockets.js\"\nimport type { Settings, SlackChannel, SlackFile, SlackUser } from \"./state.js\"\n\n/**\n * Every named Slack misbehaviour our consumers branch on, switched on with\n * `POST /__admin/faults {\"preset\": \"<name>\"}` (add `count` to limit it, `params` to tune it).\n */\nexport const SLACK_PRESETS: Record<string, FaultPreset> = {\n rate_limited: {\n description:\n \"Webhooks answer 429 rate_limited and the Web API 429 {ok:false, error:ratelimited}, both with retry-after (params.retryAfter seconds, default 1)\",\n rules: [{ effect: \"rate_limited\", params: { retryAfter: 1 } }],\n },\n \"5xx\": {\n description:\n \"Every call answers 500 internal_error (params.status 503 gives service_unavailable); our clients retry these\",\n rules: [{ effect: \"server_error\", params: { status: 500 } }],\n },\n service_unavailable: {\n description: \"Every call answers 503 service_unavailable\",\n rules: [{ effect: \"server_error\", params: { status: 503 } }],\n },\n channel_not_found: {\n description:\n \"Webhooks answer 404 channel_not_found; Web API channel methods answer {ok:false, error:channel_not_found}\",\n rules: [{ effect: \"channel_not_found\" }],\n },\n no_service: {\n description: \"Webhooks answer 404 no_service (the hook was revoked): a terminal 4xx\",\n rules: [{ operationId: \"PostIncomingWebhook\", effect: \"no_service\" }],\n },\n invalid_auth: {\n description: \"Web API calls answer {ok:false, error:invalid_auth} (the bot token was revoked)\",\n rules: [{ pathPrefix: \"/api/\", effect: \"invalid_auth\" }],\n },\n connections_open_invalid_auth: {\n description:\n \"apps.connections.open answers {ok:false, error:invalid_auth} and does not mint a ticket\",\n rules: [{ operationId: \"AppsConnectionsOpen\", effect: \"connections_open_invalid_auth\" }],\n },\n connections_open_429: {\n description:\n \"apps.connections.open answers 429 {ok:false, error:ratelimited} with retry-after (params.retryAfter seconds, default 1)\",\n rules: [\n {\n operationId: \"AppsConnectionsOpen\",\n effect: \"connections_open_429\",\n params: { retryAfter: 1 },\n },\n ],\n },\n connections_open_5xx: {\n description:\n \"apps.connections.open answers 500 internal_error (params.status 503 gives service_unavailable)\",\n rules: [\n {\n operationId: \"AppsConnectionsOpen\",\n effect: \"connections_open_5xx\",\n params: { status: 500 },\n },\n ],\n },\n socket_close_after_hello: {\n description: \"The next Socket Mode WebSocket sends hello, then a normal close frame\",\n rules: [{ operationId: \"AppsConnectionsOpen\", effect: \"socket_close_after_hello\" }],\n },\n socket_abnormal_close: {\n description:\n \"The next Socket Mode WebSocket sends hello, then drops the TCP connection (close code 1006)\",\n rules: [{ operationId: \"AppsConnectionsOpen\", effect: \"socket_abnormal_close\" }],\n },\n socket_hello_latency: {\n description:\n \"Delay the Socket Mode hello frame by params.latencyMs (default 0). The HTTP response is not delayed\",\n rules: [\n {\n operationId: \"AppsConnectionsOpen\",\n effect: \"socket_hello_latency\",\n params: { latencyMs: 0 },\n },\n ],\n },\n}\n\nexport type SlackRuntimeOptions = Pick<SlackAPIOptions, \"fixtures\" | \"baseUrl\" | \"tokens\"> & {\n sqlite?: SqliteClient\n clock?: Clock\n seed?: number | string\n adminPrefix?: string\n adminKey?: string\n /** Admin controls to boot with: clock, latency, faults, seed, a starting snapshot. */\n adminControls?: MockControls\n onLog?: (entry: RequestLog) => void\n settings?: Partial<Settings>\n}\n\nexport type SlackRuntime = ServiceRuntime<SlackAPI>\n\nconst json = (status: number, body: unknown) =>\n new Response(JSON.stringify(body), { status, headers: { \"content-type\": \"application/json\" } })\nconst adminError = (status: number, message: string) =>\n json(status, { error: { type: \"mockingbird_admin\", message } })\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value)\nconst list = (body: unknown, key: string): unknown[] | undefined =>\n Array.isArray(body) ? body : isRecord(body) && Array.isArray(body[key]) ? body[key] : undefined\n\n/** `/services/T/B/X`, `T/B/X`, or a full hooks.slack.com URL, as the `T/B/X` suffix. */\nconst hookSuffix = (value: string): string => {\n let path = value\n try {\n if (/^https?:\\/\\//.test(value)) path = new URL(value).pathname\n } catch {\n // Not a URL: use as-is.\n }\n return path\n .replace(/^\\/?ns\\/[^/]+/, \"\")\n .replace(/^\\/?services\\//, \"\")\n .replace(/^\\/|\\/$/g, \"\")\n}\n\nconst outboxFilter = (params: URLSearchParams) => {\n const webhook = params.get(\"webhook\")\n const channel = params.get(\"channel\")\n const thread = params.get(\"thread_ts\")\n const source = params.get(\"source\")\n if (webhook === null && channel === null && thread === null && source === null) return undefined\n return (item: Record<string, unknown>) => {\n if (webhook !== null && item.webhook !== `/services/${hookSuffix(webhook)}`) return false\n if (channel !== null) {\n const wanted = channel.toLowerCase().replace(/^#/, \"\")\n const recipients = (item.to as string[]).map((t) => t.toLowerCase().replace(/^#/, \"\"))\n if (!recipients.includes(wanted)) return false\n }\n if (thread !== null && item.thread_ts !== thread) return false\n if (source !== null && item.source !== source) return false\n return true\n }\n}\n\nconst adminRoutes = (runtime: ServiceRuntime<SlackAPI>): AdminRoutes => ({\n ...outboxAdminRoutes(\n runtime,\n (api) => api.state.outbox as unknown as OutboxStore<OutboxItem>,\n outboxFilter,\n ),\n \"GET /hooks\": ({ namespace }) =>\n json(200, {\n hooks: runtime\n .instance(namespace)\n .state.hooks.list({ order: \"oldest\" })\n .map((row) => ({ ...row.value, url: `/services/${row.value.path}` })),\n }),\n \"POST /hooks\": ({ body, namespace }) => {\n const entries = list(body, \"hooks\") ?? (isRecord(body) ? [body] : undefined)\n if (!entries || entries.some((e) => !isRecord(e) || typeof e.path !== \"string\")) {\n return adminError(400, 'expected {\"path\": \"T\u2026/B\u2026/X\u2026\", \"channel\"?: \"C\u2026\"} or {\"hooks\": [...]}')\n }\n const api = runtime.instance(namespace)\n const created = (entries as Record<string, unknown>[]).map((entry) => {\n const path = hookSuffix(entry.path as string)\n const hook = {\n path,\n channel: typeof entry.channel === \"string\" ? entry.channel : `/services/${path}`,\n }\n api.state.hooks.insert(path, hook)\n return { ...hook, url: `/services/${path}` }\n })\n return json(201, { hooks: created })\n },\n \"DELETE /hooks\": ({ namespace, url }) => {\n const api = runtime.instance(namespace)\n const only = url.searchParams.get(\"path\")\n for (const row of api.state.hooks.list()) {\n if (only === null || row.id === hookSuffix(only)) api.state.hooks.delete(row.id)\n }\n return json(200, { status: \"ok\" })\n },\n \"GET /channels\": ({ namespace }) =>\n json(200, {\n channels: runtime\n .instance(namespace)\n .state.channels.list({ order: \"oldest\" })\n .map((r) => r.value),\n }),\n \"POST /channels\": ({ body, namespace }) => {\n const entries = list(body, \"channels\") ?? (isRecord(body) ? [body] : undefined)\n if (!entries || entries.some((e) => !isRecord(e) || typeof e.name !== \"string\")) {\n return adminError(\n 400,\n 'expected {\"id\"?, \"name\", \"is_private\"?, \"is_archived\"?, \"is_member\"?}',\n )\n }\n const api = runtime.instance(namespace)\n const saved = (entries as Record<string, unknown>[]).map((entry) => {\n const name = (entry.name as string).replace(/^#/, \"\").toLowerCase()\n const channel: SlackChannel = {\n id:\n typeof entry.id === \"string\"\n ? entry.id\n : `C${name.toUpperCase().replace(/[^A-Z0-9]/g, \"\")}`.slice(0, 11),\n name,\n is_private: entry.is_private === true,\n is_archived: entry.is_archived === true,\n is_member: entry.is_member !== false,\n created: Math.floor(runtime.namespaceClock(namespace).now() / 1000),\n }\n api.state.channels.insert(channel.id, channel)\n return channel\n })\n return json(201, { channels: saved })\n },\n \"GET /users\": ({ namespace }) =>\n json(200, {\n users: runtime\n .instance(namespace)\n .state.users.list({ order: \"oldest\" })\n .map((r) => r.value),\n }),\n \"POST /users\": ({ body, namespace }) => {\n const entries = list(body, \"users\") ?? (isRecord(body) ? [body] : undefined)\n if (!entries || entries.some((e) => !isRecord(e) || typeof e.id !== \"string\")) {\n return adminError(400, 'expected {\"id\": \"U\u2026\", \"name\"?, \"real_name\"?, \"email\"?}')\n }\n const api = runtime.instance(namespace)\n const saved = (entries as Record<string, unknown>[]).map((entry) => {\n const id = entry.id as string\n const user: SlackUser = {\n id,\n name: typeof entry.name === \"string\" ? entry.name : id.toLowerCase(),\n real_name: typeof entry.real_name === \"string\" ? entry.real_name : id,\n email: typeof entry.email === \"string\" ? entry.email : null,\n is_bot: entry.is_bot === true,\n deleted: entry.deleted === true,\n tz: typeof entry.tz === \"string\" ? entry.tz : \"America/Los_Angeles\",\n }\n api.state.users.insert(id, user)\n return user\n })\n return json(201, { users: saved })\n },\n \"POST /files\": ({ body, namespace }) => {\n const entries = list(body, \"files\") ?? (isRecord(body) ? [body] : undefined)\n if (!entries || entries.some((e) => !isRecord(e) || typeof e.id !== \"string\")) {\n return adminError(400, 'expected {\"id\": \"F\u2026\", \"name\"?, \"mimetype\"?, \"size\"?}')\n }\n const api = runtime.instance(namespace)\n const saved = (entries as Record<string, unknown>[]).map((entry) => {\n const id = entry.id as string\n const name = typeof entry.name === \"string\" ? entry.name : `${id}.bin`\n const file: SlackFile = {\n id,\n name,\n title: typeof entry.title === \"string\" ? entry.title : name,\n mimetype: typeof entry.mimetype === \"string\" ? entry.mimetype : \"application/octet-stream\",\n filetype: typeof entry.filetype === \"string\" ? entry.filetype : \"binary\",\n size: typeof entry.size === \"number\" ? entry.size : 0,\n created: Math.floor(runtime.namespaceClock(namespace).now() / 1000),\n }\n api.state.files.insert(id, file)\n return file\n })\n return json(201, { files: saved })\n },\n \"GET /views\": ({ namespace }) =>\n json(200, {\n views: runtime\n .instance(namespace)\n .state.views.list({ order: \"oldest\" })\n .map((r) => r.value),\n }),\n \"GET /settings\": ({ namespace }) => json(200, runtime.instance(namespace).state.current()),\n \"PUT /settings\": ({ body, namespace }) => {\n if (!isRecord(body)) return adminError(400, \"expected a JSON object\")\n const patch: Partial<Settings> = {}\n for (const key of [\n \"teamId\",\n \"teamName\",\n \"teamDomain\",\n \"botUserId\",\n \"botId\",\n \"appId\",\n ] as const) {\n if (body[key] === undefined) continue\n if (typeof body[key] !== \"string\") return adminError(400, `${key}: string`)\n patch[key] = body[key] as string\n }\n if (body.tokens !== undefined) {\n if (!Array.isArray(body.tokens)) return adminError(400, \"tokens: string[]\")\n patch.tokens = body.tokens.map(String)\n }\n if (body.strictChannels !== undefined) {\n if (typeof body.strictChannels !== \"boolean\")\n return adminError(400, \"strictChannels: boolean\")\n patch.strictChannels = body.strictChannels\n }\n for (const key of [\"appTokens\", \"revokedAppTokens\"] as const) {\n if (body[key] === undefined) continue\n const entries = body[key]\n if (!Array.isArray(entries) || entries.some((entry) => typeof entry !== \"string\")) {\n return adminError(400, `${key}: string[]`)\n }\n patch[key] = entries.map(String)\n }\n if (body.socketLifetimeMs !== undefined) {\n if (\n body.socketLifetimeMs !== null &&\n (typeof body.socketLifetimeMs !== \"number\" || body.socketLifetimeMs < 0)\n ) {\n return adminError(400, \"socketLifetimeMs: number | null\")\n }\n patch.socketLifetimeMs = body.socketLifetimeMs\n }\n return json(200, runtime.instance(namespace).state.update(patch))\n },\n \"GET /socket/connections\": ({ namespace }) =>\n json(200, {\n connections: listSocketConnections(namespace).map((row) => ({\n namespace: row.namespace,\n appId: row.appId,\n ticket: row.ticket,\n connectedAt: row.connectedAt,\n state: row.state,\n reconnectCount: row.reconnectCount,\n })),\n }),\n \"POST /socket/disconnect\": ({ body, namespace }) => {\n const reason = isRecord(body) && typeof body.reason === \"string\" ? body.reason : \"warning\"\n if (reason !== \"warning\" && reason !== \"refresh_requested\" && reason !== \"link_disabled\") {\n return adminError(400, \"reason must be warning, refresh_requested, or link_disabled\")\n }\n const code = isRecord(body) && typeof body.code === \"number\" ? body.code : 1000\n return json(200, { closed: disconnectSockets(namespace, reason, code) })\n },\n})\n\n/**\n * The Slack mock with Mockingbird's full service contract: `/__admin/health`, `/__admin/*`, the outbox\n * (`GET /__admin/outbox?webhook=|channel=`), namespaces by header, by `/__admin/ns/<name>` path prefix,\n * or by credential (a bot token or a webhook's `T/B/X` path), clock control and fault presets.\n */\nexport const createRuntime = (options: SlackRuntimeOptions = {}): SlackRuntime =>\n createServiceRuntime<SlackAPI>({\n name: SLACK_NAMESPACE,\n document,\n ...(options.sqlite ? { sqlite: options.sqlite } : {}),\n ...(options.clock ? { clock: options.clock } : {}),\n ...(options.seed !== undefined ? { seed: options.seed } : {}),\n ...(options.adminPrefix !== undefined ? { adminPrefix: options.adminPrefix } : {}),\n ...(options.adminKey !== undefined ? { adminKey: options.adminKey } : {}),\n ...(options.adminControls !== undefined ? { adminControls: options.adminControls } : {}),\n ...(options.onLog ? { onLog: options.onLog } : {}),\n credential: (request) => slackCredential(request, options.adminPrefix),\n presets: SLACK_PRESETS,\n create: ({ sqlite, namespace, publicNamespace, adminPrefix, clock, rng }) =>\n new SlackAPI({\n ...(options.fixtures ? { fixtures: options.fixtures } : {}),\n ...(options.baseUrl ? { baseUrl: options.baseUrl } : {}),\n ...(options.tokens ? { tokens: options.tokens } : {}),\n sqlite,\n namespace,\n publicNamespace,\n adminPrefix,\n now: clock.now,\n random: rng.next,\n ...(options.settings ? { settings: options.settings } : {}),\n }),\n admin: adminRoutes,\n })\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA,+CAAC,QAAS,SAAQ,SAAU,qBAAoB,MAAO,4CAA2C,OAAQ,qDAAoD,MAAO,8gDAA6gD,OAAQ,WAAU,aAAc,mLAA6K;;;ACC/3D;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACRP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAc;AACd,SAAS,mBAAmB,gBAAgB,iBAAiB,qBAAqB;AAC3E,IAAM,kBACX,OAAsD,sBAAkC;AAC1F,IAAM,cACJ,OAAO,2CAAgC,WAAW,yCAA8B;A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