UNPKG

@microfox/slack

Version:

This package provides a lightweight, proxy interface to the official Slack Web API, offering a curated set of the most commonly used functions for building Slack integrations. It is designed to be simple, efficient, and easy to integrate into your project

135 lines (134 loc) 4.28 kB
{ "post": { "operationId": "getConversationHistory", "summary": "Fetches a conversation's history of messages and events.", "description": "Fetches a conversation's history of messages and events from a specific channel.", "tags": [ "channel", "message" ], "ai": { "systemPrompt": "Provide a `channelId` (starts with 'C') to retrieve conversation history." }, "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "body": { "type": "object", "description": "Body of the getConversationHistory sls call", "properties": { "arguments": { "type": "object", "properties": { "channelId": { "type": "string", "description": "The ID of the channel to fetch history for. Channel IDs start with 'C'." }, "limit": { "type": "integer", "description": "The maximum number of items to return." }, "latest": { "type": "string", "description": "End of the time range of messages to include in results." }, "oldest": { "type": "string", "description": "Start of the time range of messages to include in results." }, "inclusive": { "type": "boolean", "description": "Include messages with latest or oldest timestamps in results." }, "cursor": { "type": "string", "description": "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata." } }, "required": [ "channelId" ] } }, "required": [ "arguments" ] } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "user": { "type": "string" }, "text": { "type": "string" }, "ts": { "type": "string" } } } }, "nextCursor": { "type": "string" } } } } } }, "400": { "description": "Bad Request - The server cannot process the request due to a client error.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error - The server encountered an unexpected condition that prevented it from fulfilling the request.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } } } } }