kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
docs: include descriptions of API method params
rodzic
f101856e48
commit
eed8e0534a
|
@ -55,51 +55,171 @@ export type SlackBlock = {
|
||||||
[key: string]: any
|
[key: string]: any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters for the Slack API's `chat.postMessage` method.
|
||||||
|
*
|
||||||
|
* @see {@link https://api.slack.com/methods/chat.postMessage}
|
||||||
|
*/
|
||||||
export type SlackPostMessageParams = {
|
export type SlackPostMessageParams = {
|
||||||
/**
|
/**
|
||||||
* The text of the message to send.
|
* The formatted text of the message to be published.
|
||||||
*/
|
*/
|
||||||
text: string
|
text: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ID of the channel to send the message to.
|
* Channel, private group, or IM channel to send the message to. Can be an encoded ID, or a name.
|
||||||
*/
|
*/
|
||||||
channel?: string
|
channel?: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The timestamp of a parent message to send the message as a reply to.
|
* Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead.
|
||||||
*/
|
*/
|
||||||
thread_ts?: string
|
thread_ts?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A JSON-based array of structured attachments, presented as a URL-encoded string.
|
||||||
|
*/
|
||||||
attachments?: SlackAttachment[]
|
attachments?: SlackAttachment[]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A JSON-based array of structured blocks, presented as a URL-encoded string.
|
||||||
|
*/
|
||||||
blocks?: SlackBlock[]
|
blocks?: SlackBlock[]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emoji to use as the icon for this message. Overrides icon_url.
|
||||||
|
*/
|
||||||
icon_emoji?: string
|
icon_emoji?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL to an image to use as the icon for this message.
|
||||||
|
*/
|
||||||
icon_url?: string
|
icon_url?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If set to true, user group handles (to name just one example) will be linked in the message text.
|
||||||
|
*/
|
||||||
link_names?: boolean
|
link_names?: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change how messages are treated (default: 'none').
|
||||||
|
*/
|
||||||
parse?: 'full' | 'none'
|
parse?: 'full' | 'none'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation.
|
||||||
|
*/
|
||||||
reply_broadcast?: boolean
|
reply_broadcast?: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pass true to enable unfurling of primarily text-based content.
|
||||||
|
*/
|
||||||
unfurl_links?: boolean
|
unfurl_links?: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pass false to disable unfurling of media content.
|
||||||
|
*/
|
||||||
unfurl_media?: boolean
|
unfurl_media?: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set your bot's user name.
|
||||||
|
*/
|
||||||
username?: string
|
username?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters for the Slack API's `conversations.history` method.
|
||||||
|
*
|
||||||
|
* @see {@link https://api.slack.com/methods/conversations.history}
|
||||||
|
*/
|
||||||
export type SlackConversationHistoryParams = {
|
export type SlackConversationHistoryParams = {
|
||||||
|
/**
|
||||||
|
* The conversation ID to fetch history for.
|
||||||
|
*/
|
||||||
channel: string
|
channel: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only messages after this Unix timestamp will be included in results (default: `0`).
|
||||||
|
*/
|
||||||
oldest?: string
|
oldest?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The cursor value used for pagination of results (default: first page).
|
||||||
|
*/
|
||||||
cursor?: string
|
cursor?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only messages before this Unix timestamp will be included in results (default: now).
|
||||||
|
*/
|
||||||
latest?: string
|
latest?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum number of items to return (default: `100`).
|
||||||
|
*/
|
||||||
limit?: number
|
limit?: number
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Include messages with the oldest or latest timestamps in results. Ignored unless either timestamp is specified (default: `false`).
|
||||||
|
*/
|
||||||
inclusive?: boolean
|
inclusive?: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return all metadata associated with the messages (default: `false`).
|
||||||
|
*/
|
||||||
include_all_metadata?: boolean
|
include_all_metadata?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters for the Slack API's `conversations.replies` method.
|
||||||
|
*
|
||||||
|
* @see {@link https://api.slack.com/methods/conversations.replies}
|
||||||
|
*/
|
||||||
export type SlackConversationRepliesParams = {
|
export type SlackConversationRepliesParams = {
|
||||||
|
/**
|
||||||
|
* The conversation ID to fetch the thread from.
|
||||||
|
*/
|
||||||
channel: string
|
channel: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unique identifier of either a thread’s parent message or a message in the thread.
|
||||||
|
*
|
||||||
|
* ### Notes
|
||||||
|
*
|
||||||
|
* - ts must be the timestamp of an existing message with 0 or more replies.
|
||||||
|
* - If there are no replies then just the single message referenced by ts will return - it is just an ordinary, unthreaded message.
|
||||||
|
*/
|
||||||
ts: string
|
ts: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The cursor value used for pagination of results.
|
||||||
|
* Set this to the `next_cursor` attribute returned by a previous request's response_metadata.
|
||||||
|
*/
|
||||||
cursor?: string
|
cursor?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only messages before this Unix timestamp will be included in results.
|
||||||
|
*/
|
||||||
latest?: string
|
latest?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only messages after this Unix timestamp will be included in results.
|
||||||
|
*/
|
||||||
oddest?: string
|
oddest?: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The maximum number of items to return.
|
||||||
|
* Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
|
||||||
|
*/
|
||||||
limit?: number
|
limit?: number
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Include messages with the oldest or latest timestamps in results. Ignored unless either timestamp is specified.
|
||||||
|
*/
|
||||||
inclusive?: boolean
|
inclusive?: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return all metadata associated with this message.
|
||||||
|
*/
|
||||||
include_thread_metadata?: boolean
|
include_thread_metadata?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue