UNPKG

n8n-nodes-base

Version:

Base nodes of n8n

90 lines (85 loc) 2.06 kB
/** * Slack Node - Version 2.1 * Discriminator: resource=message, operation=search */ interface Credentials { slackApi: CredentialReference; slackOAuth2Api: CredentialReference; } export type SlackV21MessageSearchParams = { resource: 'message'; operation: 'search'; authentication?: 'accessToken' | 'oAuth2' | Expression<string>; /** * The text to search for within messages */ query?: string | Expression<string> | PlaceholderValue; /** * How search results should be sorted. You can sort by. * @default desc */ sort?: 'desc' | 'asc' | 'relevance' | Expression<string>; /** * Whether to return all results or only up to a given limit * @default false */ returnAll?: boolean | Expression<boolean>; /** * Max number of results to return * @displayOptions.show { returnAll: [false] } * @default 25 */ limit?: number | Expression<number>; /** * Options * @default {} */ options?: { /** Choose from the list, or specify IDs using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt; * @default [] */ searchChannel?: string[]; }; }; export type SlackV21MessageSearchOutput = { blocks?: Array<{ block_id?: string; elements?: Array<{ elements?: Array<{ text?: string; type?: string; user_id?: string; }>; type?: string; }>; type?: string; }>; channel?: { id?: string; is_channel?: boolean; is_ext_shared?: boolean; is_group?: boolean; is_im?: boolean; is_mpim?: boolean; is_org_shared?: boolean; is_pending_ext_shared?: boolean; is_private?: boolean; is_shared?: boolean; name?: string; }; iid?: string; no_reactions?: boolean; permalink?: string; team?: string; text?: string; ts?: string; type?: string; username?: string; }; export type SlackV21MessageSearchNode = { type: 'n8n-nodes-base.slack'; version: 2.1; credentials?: Credentials; config: NodeConfig<SlackV21MessageSearchParams>; output?: Items<SlackV21MessageSearchOutput>; };