n8n-nodes-base
Version:
Base nodes of n8n
46 lines (41 loc) • 1.43 kB
text/typescript
/**
* Slack Node - Version 2.1
* Discriminator: resource=channel, operation=open
*/
interface Credentials {
slackApi: CredentialReference;
slackOAuth2Api: CredentialReference;
}
/** Opens or resumes a direct message or multi-person direct message */
export type SlackV21ChannelOpenParams = {
resource: 'channel';
operation: 'open';
authentication?: 'accessToken' | 'oAuth2' | Expression<string>;
/**
* Options
* @default {}
*/
options?: {
/** Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead.
*/
channelId?: string | Expression<string> | PlaceholderValue;
/** Whether you want the full IM channel definition in the response
* @default false
*/
returnIm?: boolean | Expression<boolean>;
/** If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a channel when not supplying users. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
users?: string[];
};
};
export type SlackV21ChannelOpenOutput = {
id?: string;
};
export type SlackV21ChannelOpenNode = {
type: 'n8n-nodes-base.slack';
version: 2.1;
credentials?: Credentials;
config: NodeConfig<SlackV21ChannelOpenParams>;
output?: Items<SlackV21ChannelOpenOutput>;
};