n8n-nodes-base
Version:
Base nodes of n8n
132 lines (127 loc) • 3.61 kB
text/typescript
/**
* Telegram Node - Version 1
* Discriminator: resource=chat, operation=administrators
*/
interface Credentials {
telegramApi: CredentialReference;
}
/** Get the Administrators of a chat */
export type TelegramV1ChatAdministratorsParams = {
resource: 'chat';
operation: 'administrators';
/**
* Unique identifier for the target chat or username, To find your chat ID ask @get_id_bot
*/
chatId?: string | Expression<string> | PlaceholderValue;
/**
* Adds a custom keyboard with reply options
* @displayOptions.show { replyMarkup: ["replyKeyboard"] }
* @default {}
*/
replyKeyboard?: {
/** Rows
*/
rows?: Array<{
/** The value to set
* @default {}
*/
row?: {
/** Buttons
*/
buttons?: Array<{
/** Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed.
*/
text?: string | Expression<string> | PlaceholderValue;
/** Additional Fields
* @default {}
*/
additionalFields?: {
/** Whether the user's phone number will be sent as a contact when the button is pressed.Available in private chats only
* @default false
*/
request_contact?: boolean | Expression<boolean>;
/** Whether the user's request_location
* @default false
*/
request_location?: boolean | Expression<boolean>;
/** Launch the Telegram Web App
* @default {}
*/
web_app?: {
/** An HTTPS URL of a Web App to be opened
*/
url?: string | Expression<string> | PlaceholderValue;
};
};
}>;
};
}>;
};
/**
* Reply Keyboard Options
* @displayOptions.show { replyMarkup: ["replyKeyboard"] }
* @default {}
*/
replyKeyboardOptions?: {
/** Whether to request clients to resize the keyboard vertically for optimal fit
* @default false
*/
resize_keyboard?: boolean | Expression<boolean>;
/** Whether to request clients to hide the keyboard as soon as it's been used
* @default false
*/
one_time_keyboard?: boolean | Expression<boolean>;
/** Whether to show the keyboard to specific users only
* @default false
*/
selective?: boolean | Expression<boolean>;
};
/**
* Reply Keyboard Remove
* @displayOptions.show { replyMarkup: ["replyKeyboardRemove"] }
* @default {}
*/
replyKeyboardRemove?: {
/** Whether to request clients to remove the custom keyboard
* @default false
*/
remove_keyboard?: boolean | Expression<boolean>;
/** Whether to force reply from specific users only
* @default false
*/
selective?: boolean | Expression<boolean>;
};
};
export type TelegramV1ChatAdministratorsOutput = {
can_be_edited?: boolean;
can_change_info?: boolean;
can_delete_messages?: boolean;
can_delete_stories?: boolean;
can_edit_stories?: boolean;
can_invite_users?: boolean;
can_manage_chat?: boolean;
can_manage_topics?: boolean;
can_manage_video_chats?: boolean;
can_manage_voice_chats?: boolean;
can_pin_messages?: boolean;
can_post_stories?: boolean;
can_promote_members?: boolean;
can_restrict_members?: boolean;
is_anonymous?: boolean;
status?: string;
user?: {
first_name?: string;
id?: number;
is_bot?: boolean;
language_code?: string;
last_name?: string;
username?: string;
};
};
export type TelegramV1ChatAdministratorsNode = {
type: 'n8n-nodes-base.telegram';
version: 1;
credentials?: Credentials;
config: NodeConfig<TelegramV1ChatAdministratorsParams>;
output?: Items<TelegramV1ChatAdministratorsOutput>;
};