n8n-nodes-base
Version:
Base nodes of n8n
74 lines (70 loc) • 2.62 kB
text/typescript
/**
* Twist Node - Version 1
* Discriminator: resource=messageConversation, operation=create
*/
interface Credentials {
twistOAuth2Api: CredentialReference;
}
/** Initiates a public or private channel-based conversation */
export type TwistV1MessageConversationCreateParams = {
resource: 'messageConversation';
operation: 'create';
/**
* The ID of the workspace. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
*/
workspaceId?: string | Expression<string>;
/**
* The ID of the conversation. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
*/
conversationId?: string | Expression<string>;
/**
* The content of the new message. Mentions can be used as <code>[Name](twist-mention://user_id)</code> for users or <code>[Group name](twist-group-mention://group_id)</code> for groups.
*/
content?: string | Expression<string> | PlaceholderValue;
/**
* Other options to set
* @default {}
*/
additionalFields?: {
/** Actions
* @default {}
*/
actionsUi?: {
/** Action
*/
actionValues?: Array<{
/** The action of the button
*/
action?: 'open_url' | 'prefill_message' | 'send_reply' | Expression<string>;
/** The text for the action button
*/
button_text?: string | Expression<string> | PlaceholderValue;
/** The text for the action button
* @displayOptions.show { action: ["send_reply", "prefill_message"] }
*/
message?: string | Expression<string> | PlaceholderValue;
/** The type of the button. (Currently only <code>action</code> is available).
*/
type?: 'action' | Expression<string>;
/** URL to redirect
* @displayOptions.show { action: ["open_url"] }
*/
url?: string | Expression<string> | PlaceholderValue;
}>;
};
/** Name of the property that holds the binary data. Multiple can be defined separated by comma.
* @default data
*/
binaryProperties?: string | Expression<string> | PlaceholderValue;
/** The users that are directly mentioned. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
direct_mentions?: string[];
};
};
export type TwistV1MessageConversationCreateNode = {
type: 'n8n-nodes-base.twist';
version: 1;
credentials?: Credentials;
config: NodeConfig<TwistV1MessageConversationCreateParams>;
};