mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
Merge 633b000ddb
into 8790a0df3d
This commit is contained in:
commit
38a6d4a5dc
|
@ -244,9 +244,15 @@ export class Telegram implements INodeType {
|
||||||
{
|
{
|
||||||
name: 'Send Audio',
|
name: 'Send Audio',
|
||||||
value: 'sendAudio',
|
value: 'sendAudio',
|
||||||
description: 'Send a audio file',
|
description: 'Send an audio file',
|
||||||
action: 'Send an audio file',
|
action: 'Send an audio file',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Send Voice',
|
||||||
|
value: 'sendVoice',
|
||||||
|
description: 'Send a voice message',
|
||||||
|
action: 'Send a voice message',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Send Chat Action',
|
name: 'Send Chat Action',
|
||||||
value: 'sendChatAction',
|
value: 'sendChatAction',
|
||||||
|
@ -301,6 +307,12 @@ export class Telegram implements INodeType {
|
||||||
description: 'Send a video',
|
description: 'Send a video',
|
||||||
action: 'Send a video',
|
action: 'Send a video',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Send Video Note',
|
||||||
|
value: 'sendVideoNote',
|
||||||
|
description: 'Send a video note',
|
||||||
|
action: 'Send a video note',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Unpin Chat Message',
|
name: 'Unpin Chat Message',
|
||||||
value: 'unpinChatMessage',
|
value: 'unpinChatMessage',
|
||||||
|
@ -333,6 +345,7 @@ export class Telegram implements INodeType {
|
||||||
'setTitle',
|
'setTitle',
|
||||||
'sendAnimation',
|
'sendAnimation',
|
||||||
'sendAudio',
|
'sendAudio',
|
||||||
|
'sendVoice',
|
||||||
'sendChatAction',
|
'sendChatAction',
|
||||||
'sendDocument',
|
'sendDocument',
|
||||||
'sendLocation',
|
'sendLocation',
|
||||||
|
@ -341,6 +354,7 @@ export class Telegram implements INodeType {
|
||||||
'sendPhoto',
|
'sendPhoto',
|
||||||
'sendSticker',
|
'sendSticker',
|
||||||
'sendVideo',
|
'sendVideo',
|
||||||
|
'sendVideoNote',
|
||||||
'unpinChatMessage',
|
'unpinChatMessage',
|
||||||
],
|
],
|
||||||
resource: ['chat', 'message'],
|
resource: ['chat', 'message'],
|
||||||
|
@ -706,7 +720,7 @@ export class Telegram implements INodeType {
|
||||||
'Unique identifier for the target chat or username, To find your chat ID ask @get_id_bot',
|
'Unique identifier for the target chat or username, To find your chat ID ask @get_id_bot',
|
||||||
},
|
},
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// message:sendAnimation/sendAudio/sendDocument/sendPhoto/sendSticker/sendVideo
|
// message:sendAnimation/sendAudio/sendVoice/sendDocument/sendPhoto/sendSticker/sendVideo/sendVideoNote
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -720,9 +734,11 @@ export class Telegram implements INodeType {
|
||||||
operation: [
|
operation: [
|
||||||
'sendAnimation',
|
'sendAnimation',
|
||||||
'sendAudio',
|
'sendAudio',
|
||||||
|
'sendVoice',
|
||||||
'sendDocument',
|
'sendDocument',
|
||||||
'sendPhoto',
|
'sendPhoto',
|
||||||
'sendVideo',
|
'sendVideo',
|
||||||
|
'sendVideoNote',
|
||||||
'sendSticker',
|
'sendSticker',
|
||||||
],
|
],
|
||||||
resource: ['message'],
|
resource: ['message'],
|
||||||
|
@ -742,9 +758,11 @@ export class Telegram implements INodeType {
|
||||||
operation: [
|
operation: [
|
||||||
'sendAnimation',
|
'sendAnimation',
|
||||||
'sendAudio',
|
'sendAudio',
|
||||||
|
'sendVoice',
|
||||||
'sendDocument',
|
'sendDocument',
|
||||||
'sendPhoto',
|
'sendPhoto',
|
||||||
'sendVideo',
|
'sendVideo',
|
||||||
|
'sendVideoNote',
|
||||||
'sendSticker',
|
'sendSticker',
|
||||||
],
|
],
|
||||||
resource: ['message'],
|
resource: ['message'],
|
||||||
|
@ -845,6 +863,24 @@ export class Telegram implements INodeType {
|
||||||
description:
|
description:
|
||||||
'Audio file to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
|
'Audio file to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
|
||||||
},
|
},
|
||||||
|
// ----------------------------------
|
||||||
|
// message:sendVoice
|
||||||
|
// ----------------------------------
|
||||||
|
{
|
||||||
|
displayName: 'Voice',
|
||||||
|
name: 'file',
|
||||||
|
type: 'string',
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
operation: ['sendVoice'],
|
||||||
|
resource: ['message'],
|
||||||
|
binaryData: [false],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
description:
|
||||||
|
'Voice message to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
|
||||||
|
},
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// message:sendChatAction
|
// message:sendChatAction
|
||||||
|
@ -870,6 +906,11 @@ export class Telegram implements INodeType {
|
||||||
value: 'record_audio',
|
value: 'record_audio',
|
||||||
action: 'Record audio',
|
action: 'Record audio',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Record Voice',
|
||||||
|
value: 'record_voice',
|
||||||
|
action: 'Record voice',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Record Video',
|
name: 'Record Video',
|
||||||
value: 'record_video',
|
value: 'record_video',
|
||||||
|
@ -1141,11 +1182,27 @@ export class Telegram implements INodeType {
|
||||||
description:
|
description:
|
||||||
'Video file to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
|
'Video file to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
|
||||||
},
|
},
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// message:editMessageText/sendAnimation/sendAudio/sendLocation/sendMessage/sendPhoto/sendSticker/sendVideo
|
// message:sendVideoNote
|
||||||
|
// ----------------------------------
|
||||||
|
{
|
||||||
|
displayName: 'VideoNote',
|
||||||
|
name: 'file',
|
||||||
|
type: 'string',
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
operation: ['sendVideoNote'],
|
||||||
|
resource: ['message'],
|
||||||
|
binaryData: [false],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
description:
|
||||||
|
'VideoNote file to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), an HTTP URL for Telegram to get a file from the Internet.',
|
||||||
|
},
|
||||||
|
// ----------------------------------
|
||||||
|
// message:editMessageText/sendAnimation/sendAudio/sendLocation/sendMessage/sendPhoto/sendSticker/sendVideo/SendVideoNote
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
|
|
||||||
{
|
{
|
||||||
displayName: 'Reply Markup',
|
displayName: 'Reply Markup',
|
||||||
name: 'replyMarkup',
|
name: 'replyMarkup',
|
||||||
|
@ -1158,7 +1215,9 @@ export class Telegram implements INodeType {
|
||||||
'sendPhoto',
|
'sendPhoto',
|
||||||
'sendSticker',
|
'sendSticker',
|
||||||
'sendVideo',
|
'sendVideo',
|
||||||
|
'sendVideoNote',
|
||||||
'sendAudio',
|
'sendAudio',
|
||||||
|
'sendVoice',
|
||||||
'sendLocation',
|
'sendLocation',
|
||||||
],
|
],
|
||||||
resource: ['message'],
|
resource: ['message'],
|
||||||
|
@ -1190,7 +1249,6 @@ export class Telegram implements INodeType {
|
||||||
default: 'none',
|
default: 'none',
|
||||||
description: 'Additional interface options',
|
description: 'Additional interface options',
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
displayName: 'Force Reply',
|
displayName: 'Force Reply',
|
||||||
name: 'forceReply',
|
name: 'forceReply',
|
||||||
|
@ -1221,7 +1279,6 @@ export class Telegram implements INodeType {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
displayName: 'Inline Keyboard',
|
displayName: 'Inline Keyboard',
|
||||||
name: 'inlineKeyboard',
|
name: 'inlineKeyboard',
|
||||||
|
@ -1515,6 +1572,7 @@ export class Telegram implements INodeType {
|
||||||
'editMessageText',
|
'editMessageText',
|
||||||
'sendAnimation',
|
'sendAnimation',
|
||||||
'sendAudio',
|
'sendAudio',
|
||||||
|
'sendVoice',
|
||||||
'sendDocument',
|
'sendDocument',
|
||||||
'sendLocation',
|
'sendLocation',
|
||||||
'sendMessage',
|
'sendMessage',
|
||||||
|
@ -1522,6 +1580,7 @@ export class Telegram implements INodeType {
|
||||||
'sendPhoto',
|
'sendPhoto',
|
||||||
'sendSticker',
|
'sendSticker',
|
||||||
'sendVideo',
|
'sendVideo',
|
||||||
|
'sendVideoNote',
|
||||||
],
|
],
|
||||||
resource: ['message'],
|
resource: ['message'],
|
||||||
},
|
},
|
||||||
|
@ -1547,9 +1606,11 @@ export class Telegram implements INodeType {
|
||||||
'/operation': [
|
'/operation': [
|
||||||
'sendAnimation',
|
'sendAnimation',
|
||||||
'sendAudio',
|
'sendAudio',
|
||||||
|
'sendVoice',
|
||||||
'sendDocument',
|
'sendDocument',
|
||||||
'sendPhoto',
|
'sendPhoto',
|
||||||
'sendVideo',
|
'sendVideo',
|
||||||
|
'sendVideoNote',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1590,7 +1651,7 @@ export class Telegram implements INodeType {
|
||||||
},
|
},
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/operation': ['sendAnimation', 'sendAudio', 'sendVideo'],
|
'/operation': ['sendAnimation', 'sendAudio', 'sendVoice', 'sendVideo'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: 0,
|
default: 0,
|
||||||
|
@ -1606,9 +1667,11 @@ export class Telegram implements INodeType {
|
||||||
'/operation': [
|
'/operation': [
|
||||||
'sendAnimation',
|
'sendAnimation',
|
||||||
'sendAudio',
|
'sendAudio',
|
||||||
|
'sendVoice',
|
||||||
'sendDocument',
|
'sendDocument',
|
||||||
'sendPhoto',
|
'sendPhoto',
|
||||||
'sendVideo',
|
'sendVideo',
|
||||||
|
'sendVideoNote',
|
||||||
'sendSticker',
|
'sendSticker',
|
||||||
],
|
],
|
||||||
'/resource': ['message'],
|
'/resource': ['message'],
|
||||||
|
@ -1656,9 +1719,11 @@ export class Telegram implements INodeType {
|
||||||
'editMessageText',
|
'editMessageText',
|
||||||
'sendAnimation',
|
'sendAnimation',
|
||||||
'sendAudio',
|
'sendAudio',
|
||||||
|
'sendVoice',
|
||||||
'sendMessage',
|
'sendMessage',
|
||||||
'sendPhoto',
|
'sendPhoto',
|
||||||
'sendVideo',
|
'sendVideo',
|
||||||
|
'sendVideoNote',
|
||||||
'sendDocument',
|
'sendDocument',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -1699,6 +1764,7 @@ export class Telegram implements INodeType {
|
||||||
'/operation': [
|
'/operation': [
|
||||||
'sendAnimation',
|
'sendAnimation',
|
||||||
'sendAudio',
|
'sendAudio',
|
||||||
|
'sendVoice',
|
||||||
'sendChatAction',
|
'sendChatAction',
|
||||||
'sendDocument',
|
'sendDocument',
|
||||||
'sendLocation',
|
'sendLocation',
|
||||||
|
@ -1707,6 +1773,7 @@ export class Telegram implements INodeType {
|
||||||
'sendPhoto',
|
'sendPhoto',
|
||||||
'sendSticker',
|
'sendSticker',
|
||||||
'sendVideo',
|
'sendVideo',
|
||||||
|
'sendVideoNote',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1731,7 +1798,13 @@ export class Telegram implements INodeType {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/operation': ['sendAnimation', 'sendAudio', 'sendDocument', 'sendVideo'],
|
'/operation': [
|
||||||
|
'sendAnimation',
|
||||||
|
'sendAudio',
|
||||||
|
'sendDocument',
|
||||||
|
'sendVideo',
|
||||||
|
'sendVideoNote',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: '',
|
default: '',
|
||||||
|
@ -1987,6 +2060,18 @@ export class Telegram implements INodeType {
|
||||||
body.chat_id = this.getNodeParameter('chatId', i) as string;
|
body.chat_id = this.getNodeParameter('chatId', i) as string;
|
||||||
body.audio = this.getNodeParameter('file', i, '') as string;
|
body.audio = this.getNodeParameter('file', i, '') as string;
|
||||||
|
|
||||||
|
// Add additional fields and replyMarkup
|
||||||
|
addAdditionalFields.call(this, body, i);
|
||||||
|
} else if (operation === 'sendVoice') {
|
||||||
|
// ----------------------------------
|
||||||
|
// message:sendVoice
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
|
endpoint = 'sendVoice';
|
||||||
|
|
||||||
|
body.chat_id = this.getNodeParameter('chatId', i) as string;
|
||||||
|
body.audio = this.getNodeParameter('file', i, '') as string;
|
||||||
|
|
||||||
// Add additional fields and replyMarkup
|
// Add additional fields and replyMarkup
|
||||||
addAdditionalFields.call(this, body, i);
|
addAdditionalFields.call(this, body, i);
|
||||||
} else if (operation === 'sendChatAction') {
|
} else if (operation === 'sendChatAction') {
|
||||||
|
@ -2090,6 +2175,18 @@ export class Telegram implements INodeType {
|
||||||
body.chat_id = this.getNodeParameter('chatId', i) as string;
|
body.chat_id = this.getNodeParameter('chatId', i) as string;
|
||||||
body.video = this.getNodeParameter('file', i, '') as string;
|
body.video = this.getNodeParameter('file', i, '') as string;
|
||||||
|
|
||||||
|
// Add additional fields and replyMarkup
|
||||||
|
addAdditionalFields.call(this, body, i);
|
||||||
|
} else if (operation === 'sendVideoNote') {
|
||||||
|
// ----------------------------------
|
||||||
|
// message:sendVideoNote
|
||||||
|
// ----------------------------------
|
||||||
|
|
||||||
|
endpoint = 'sendVideoNote';
|
||||||
|
|
||||||
|
body.chat_id = this.getNodeParameter('chatId', i) as string;
|
||||||
|
body.video = this.getNodeParameter('file', i, '') as string;
|
||||||
|
|
||||||
// Add additional fields and replyMarkup
|
// Add additional fields and replyMarkup
|
||||||
addAdditionalFields.call(this, body, i);
|
addAdditionalFields.call(this, body, i);
|
||||||
}
|
}
|
||||||
|
|
140
packages/nodes-base/nodes/Telegram/__schema__/v1.2.0/message/sendVideoNote.json
vendored
Normal file
140
packages/nodes-base/nodes/Telegram/__schema__/v1.2.0/message/sendVideoNote.json
vendored
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ok": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"message_id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"from": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"is_bot": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"first_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["id", "is_bot", "first_name", "username"]
|
||||||
|
},
|
||||||
|
"chat": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"first_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["id", "type"]
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"caption": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"video_note": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"duration": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"width": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"height": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"file_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"mime_type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"thumbnail": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"file_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_unique_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_size": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"width": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"height": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["file_id", "file_unique_id", "file_size", "width", "height"]
|
||||||
|
},
|
||||||
|
"thumb": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"file_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_unique_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_size": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"width": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"height": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["file_id", "file_unique_id", "file_size", "width", "height"]
|
||||||
|
},
|
||||||
|
"file_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_unique_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_size": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"duration",
|
||||||
|
"width",
|
||||||
|
"height",
|
||||||
|
"mime_type",
|
||||||
|
"file_id",
|
||||||
|
"file_unique_id",
|
||||||
|
"file_size"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["message_id", "chat", "date"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["ok", "result"]
|
||||||
|
}
|
104
packages/nodes-base/nodes/Telegram/__schema__/v1.2.0/message/sendVoice.json
vendored
Normal file
104
packages/nodes-base/nodes/Telegram/__schema__/v1.2.0/message/sendVoice.json
vendored
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ok": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"message_id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"from": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"is_bot": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"first_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"is_bot",
|
||||||
|
"first_name",
|
||||||
|
"username"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"chat": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"first_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"last_name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"voice": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"duration": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"file_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"mime_type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_unique_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"file_size": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"duration",
|
||||||
|
"file_name",
|
||||||
|
"mime_type",
|
||||||
|
"file_id",
|
||||||
|
"file_unique_id",
|
||||||
|
"file_size"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"message_id",
|
||||||
|
"from",
|
||||||
|
"chat",
|
||||||
|
"date"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"ok",
|
||||||
|
"result"
|
||||||
|
]
|
||||||
|
}
|
|
@ -381,6 +381,34 @@ export const sendAudioResponse = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
export const sendVoiceResponse = {
|
||||||
|
ok: true,
|
||||||
|
result: {
|
||||||
|
message_id: 47,
|
||||||
|
from: {
|
||||||
|
id: 9876543210,
|
||||||
|
is_bot: true,
|
||||||
|
first_name: '@n8n',
|
||||||
|
username: 'n8n_test_bot',
|
||||||
|
},
|
||||||
|
chat: {
|
||||||
|
id: 123456789,
|
||||||
|
first_name: 'Nathan',
|
||||||
|
last_name: 'W',
|
||||||
|
username: 'n8n',
|
||||||
|
type: 'private',
|
||||||
|
},
|
||||||
|
date: 1732969291,
|
||||||
|
audio: {
|
||||||
|
duration: 3,
|
||||||
|
file_name: 'sample-3s.mp3',
|
||||||
|
mime_type: 'audio/mpeg',
|
||||||
|
file_id: 'CQACAgQAAxkDAAMuZ0sDSxCh3hW89NQa-eTpxKioqGAAAjsEAAIBCU1SGtsPA4N9TSo2BA',
|
||||||
|
file_unique_id: 'AgADOwQAAgEJTVI',
|
||||||
|
file_size: 52079,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export const getMemberResponse = {
|
export const getMemberResponse = {
|
||||||
ok: true,
|
ok: true,
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {
|
||||||
chatAdministratorsResponse,
|
chatAdministratorsResponse,
|
||||||
sendAnimationMessageResponse,
|
sendAnimationMessageResponse,
|
||||||
sendAudioResponse,
|
sendAudioResponse,
|
||||||
|
sendVoiceResponse,
|
||||||
getMemberResponse,
|
getMemberResponse,
|
||||||
} from './apiResponses';
|
} from './apiResponses';
|
||||||
import { FAKE_CREDENTIALS_DATA } from '../../../../test/nodes/FakeCredentialsMap';
|
import { FAKE_CREDENTIALS_DATA } from '../../../../test/nodes/FakeCredentialsMap';
|
||||||
|
@ -38,6 +39,7 @@ describe('Telegram', () => {
|
||||||
mock.post('/bottestToken/getChatAdministrators').reply(200, chatAdministratorsResponse);
|
mock.post('/bottestToken/getChatAdministrators').reply(200, chatAdministratorsResponse);
|
||||||
mock.post('/bottestToken/sendAnimation').reply(200, sendAnimationMessageResponse);
|
mock.post('/bottestToken/sendAnimation').reply(200, sendAnimationMessageResponse);
|
||||||
mock.post('/bottestToken/sendAudio').reply(200, sendAudioResponse);
|
mock.post('/bottestToken/sendAudio').reply(200, sendAudioResponse);
|
||||||
|
mock.post('/bottestToken/sendVoice').reply(200, sendVoiceResponse);
|
||||||
mock.post('/bottestToken/getChatMember').reply(200, getMemberResponse);
|
mock.post('/bottestToken/getChatMember').reply(200, getMemberResponse);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7014,6 +7014,7 @@ packages:
|
||||||
bson@6.10.0:
|
bson@6.10.0:
|
||||||
resolution: {integrity: sha512-ROchNosXMJD2cbQGm84KoP7vOGPO6/bOAW0veMMbzhXLqoZptcaYRVLitwvuhwhjjpU1qP4YZRWLhgETdgqUQw==}
|
resolution: {integrity: sha512-ROchNosXMJD2cbQGm84KoP7vOGPO6/bOAW0veMMbzhXLqoZptcaYRVLitwvuhwhjjpU1qP4YZRWLhgETdgqUQw==}
|
||||||
engines: {node: '>=16.20.1'}
|
engines: {node: '>=16.20.1'}
|
||||||
|
deprecated: a critical bug affecting only useBigInt64=true deserialization usage is fixed in bson@6.10.3
|
||||||
|
|
||||||
buffer-crc32@0.2.13:
|
buffer-crc32@0.2.13:
|
||||||
resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}
|
resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}
|
||||||
|
@ -7847,10 +7848,6 @@ packages:
|
||||||
resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==}
|
resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==}
|
||||||
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
|
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
|
||||||
|
|
||||||
detect-libc@2.0.1:
|
|
||||||
resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==}
|
|
||||||
engines: {node: '>=8'}
|
|
||||||
|
|
||||||
detect-libc@2.0.3:
|
detect-libc@2.0.3:
|
||||||
resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==}
|
resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
|
@ -8861,6 +8858,7 @@ packages:
|
||||||
gm@1.25.0:
|
gm@1.25.0:
|
||||||
resolution: {integrity: sha512-4kKdWXTtgQ4biIo7hZA396HT062nDVVHPjQcurNZ3o/voYN+o5FUC5kOwuORbpExp3XbTJ3SU7iRipiIhQtovw==}
|
resolution: {integrity: sha512-4kKdWXTtgQ4biIo7hZA396HT062nDVVHPjQcurNZ3o/voYN+o5FUC5kOwuORbpExp3XbTJ3SU7iRipiIhQtovw==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
|
deprecated: The gm module has been sunset. Please migrate to an alternative. https://github.com/aheckmann/gm?tab=readme-ov-file#2025-02-24-this-project-is-not-maintained
|
||||||
|
|
||||||
google-auth-library@8.9.0:
|
google-auth-library@8.9.0:
|
||||||
resolution: {integrity: sha512-f7aQCJODJFmYWN6PeNKzgvy9LI2tYmXnzpNDHEjG5sDNPgGb2FXQyTBnXeSH+PAtpKESFD+LmHw3Ox3mN7e1Fg==}
|
resolution: {integrity: sha512-f7aQCJODJFmYWN6PeNKzgvy9LI2tYmXnzpNDHEjG5sDNPgGb2FXQyTBnXeSH+PAtpKESFD+LmHw3Ox3mN7e1Fg==}
|
||||||
|
@ -8883,9 +8881,6 @@ packages:
|
||||||
gopd@1.0.1:
|
gopd@1.0.1:
|
||||||
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
|
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
|
||||||
|
|
||||||
graceful-fs@4.2.10:
|
|
||||||
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==}
|
|
||||||
|
|
||||||
graceful-fs@4.2.11:
|
graceful-fs@4.2.11:
|
||||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||||
|
|
||||||
|
@ -20955,8 +20950,6 @@ snapshots:
|
||||||
|
|
||||||
destroy@1.2.0: {}
|
destroy@1.2.0: {}
|
||||||
|
|
||||||
detect-libc@2.0.1: {}
|
|
||||||
|
|
||||||
detect-libc@2.0.3: {}
|
detect-libc@2.0.3: {}
|
||||||
|
|
||||||
detect-newline@3.1.0: {}
|
detect-newline@3.1.0: {}
|
||||||
|
@ -22351,9 +22344,6 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
get-intrinsic: 1.2.4
|
get-intrinsic: 1.2.4
|
||||||
|
|
||||||
graceful-fs@4.2.10:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
graceful-fs@4.2.11: {}
|
graceful-fs@4.2.11: {}
|
||||||
|
|
||||||
graphemer@1.4.0: {}
|
graphemer@1.4.0: {}
|
||||||
|
@ -24696,7 +24686,7 @@ snapshots:
|
||||||
dependencies:
|
dependencies:
|
||||||
env-paths: 2.2.1
|
env-paths: 2.2.1
|
||||||
glob: 7.2.3
|
glob: 7.2.3
|
||||||
graceful-fs: 4.2.10
|
graceful-fs: 4.2.11
|
||||||
make-fetch-happen: 9.1.0
|
make-fetch-happen: 9.1.0
|
||||||
nopt: 5.0.0
|
nopt: 5.0.0
|
||||||
npmlog: 6.0.2
|
npmlog: 6.0.2
|
||||||
|
@ -25373,7 +25363,7 @@ snapshots:
|
||||||
|
|
||||||
prebuild-install@7.1.1:
|
prebuild-install@7.1.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
detect-libc: 2.0.1
|
detect-libc: 2.0.3
|
||||||
expand-template: 2.0.3
|
expand-template: 2.0.3
|
||||||
github-from-package: 0.0.0
|
github-from-package: 0.0.0
|
||||||
minimist: 1.2.8
|
minimist: 1.2.8
|
||||||
|
|
Loading…
Reference in a new issue