n8n-nodes-base
Version:
Base nodes of n8n
105 lines (100 loc) • 2.55 kB
text/typescript
/**
* Slack Node - Version 2.1
* Discriminator: resource=channel, operation=replies
*/
interface Credentials {
slackApi: CredentialReference;
slackOAuth2Api: CredentialReference;
}
/** Get a thread of messages posted to a channel */
export type SlackV21ChannelRepliesParams = {
resource: 'channel';
operation: 'replies';
authentication?: 'accessToken' | 'oAuth2' | Expression<string>;
/**
* The Slack channel to replies to
* @default {"mode":"list","value":""}
*/
channelId?: { __rl: true; mode: 'list' | 'id' | 'url'; value: string; cachedResultName?: string };
/**
* Timestamp of the message to reply
*/
ts: number | Expression<number>;
/**
* 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> | PlaceholderValue;
/** Start of time range of messages to include in results
*/
oldest?: string | Expression<string> | PlaceholderValue;
};
};
export type SlackV21ChannelRepliesOutput = {
app_id?: string;
blocks?: Array<{
block_id?: string;
elements?: Array<{
elements?: Array<{
text?: string;
type?: string;
}>;
type?: string;
}>;
type?: string;
}>;
bot_id?: string;
bot_profile?: {
app_id?: string;
deleted?: boolean;
icons?: {
image_36?: string;
image_48?: string;
image_72?: string;
};
id?: string;
name?: string;
team_id?: string;
updated?: number;
user_id?: string;
};
client_msg_id?: string;
is_locked?: boolean;
latest_reply?: string;
parent_user_id?: string;
reply_count?: number;
reply_users?: Array<string>;
reply_users_count?: number;
subscribed?: boolean;
team?: string;
text?: string;
thread_ts?: string;
ts?: string;
type?: string;
user?: string;
};
export type SlackV21ChannelRepliesNode = {
type: 'n8n-nodes-base.slack';
version: 2.1;
credentials?: Credentials;
config: NodeConfig<SlackV21ChannelRepliesParams>;
output?: Items<SlackV21ChannelRepliesOutput>;
};