/** * 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; /** * The text to search for within messages */ query?: string | Expression | PlaceholderValue; /** * How search results should be sorted. You can sort by. * @default desc */ sort?: 'desc' | 'asc' | 'relevance' | Expression; /** * Whether to return all results or only up to a given limit * @default false */ returnAll?: boolean | Expression; /** * Max number of results to return * @displayOptions.show { returnAll: [false] } * @default 25 */ limit?: number | Expression; /** * Options * @default {} */ options?: { /** Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a> * @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; output?: Items; };