n8n-nodes-base
Version:
Base nodes of n8n
82 lines (77 loc) • 2.04 kB
text/typescript
/**
* Slack Node - Version 2.1
* Discriminator: resource=channel, operation=history
*/
interface Credentials {
slackApi: CredentialReference;
slackOAuth2Api: CredentialReference;
}
/** Get a conversation's history of messages and events */
export type SlackV21ChannelHistoryParams = {
resource: 'channel';
operation: 'history';
authentication?: 'accessToken' | 'oAuth2' | Expression<string>;
/**
* The Slack channel to get the history from
* @default {"mode":"list","value":""}
*/
channelId?: { __rl: true; mode: 'list' | 'id' | 'url'; value: string; cachedResultName?: 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 50
*/
limit?: number | Expression<number>;
/**
* Filters
* @default {}
*/
filters?: {
/** Whether to include messages with latest or oldest timestamp in results only when either timestamp is specified
* @default false
*/
inclusive?: boolean | Expression<boolean>;
/** End of time range of messages to include in results
*/
latest?: string | Expression<string>;
/** Start of time range of messages to include in results
*/
oldest?: string | Expression<string>;
};
};
export type SlackV21ChannelHistoryOutput = {
blocks?: Array<{
block_id?: string;
elements?: Array<{
elements?: Array<{
style?: {
bold?: boolean;
italic?: boolean;
};
text?: string;
type?: string;
}>;
type?: string;
}>;
type?: string;
}>;
bot_id?: string;
client_msg_id?: string;
team?: string;
text?: string;
ts?: string;
type?: string;
user?: string;
};
export type SlackV21ChannelHistoryNode = {
type: 'n8n-nodes-base.slack';
version: 2.1;
credentials?: Credentials;
config: NodeConfig<SlackV21ChannelHistoryParams>;
output?: Items<SlackV21ChannelHistoryOutput>;
};