Skip to content

Commit 9b3c754

Browse files
committed
fix(youtube): remove captions tool (requires OAuth), fix tinybird defaults, encode pageToken
1 parent 8255483 commit 9b3c754

File tree

7 files changed

+5
-147
lines changed

7 files changed

+5
-147
lines changed

apps/sim/blocks/blocks/tinybird.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,15 @@ export const TinybirdBlock: BlockConfig<TinybirdResponse> = {
7777
{ label: 'None', id: 'none' },
7878
{ label: 'Gzip', id: 'gzip' },
7979
],
80+
value: () => 'none',
8081
mode: 'advanced',
8182
condition: { field: 'operation', value: 'tinybird_events' },
8283
},
8384
{
8485
id: 'wait',
8586
title: 'Wait for Acknowledgment',
8687
type: 'switch',
88+
value: () => 'false',
8789
mode: 'advanced',
8890
condition: { field: 'operation', value: 'tinybird_events' },
8991
},

apps/sim/blocks/blocks/youtube.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const YouTubeBlock: BlockConfig<YouTubeResponse> = {
99
description: 'Interact with YouTube videos, channels, and playlists',
1010
authMode: AuthMode.ApiKey,
1111
longDescription:
12-
'Integrate YouTube into the workflow. Can search for videos, get trending videos, get video details, get video captions, get video categories, get channel information, get all videos from a channel, get channel playlists, get playlist items, and get video comments.',
12+
'Integrate YouTube into the workflow. Can search for videos, get trending videos, get video details, get video categories, get channel information, get all videos from a channel, get channel playlists, get playlist items, and get video comments.',
1313
docsLink: 'https://docs.sim.ai/tools/youtube',
1414
category: 'tools',
1515
bgColor: '#FF0000',
@@ -23,7 +23,6 @@ export const YouTubeBlock: BlockConfig<YouTubeResponse> = {
2323
{ label: 'Search Videos', id: 'youtube_search' },
2424
{ label: 'Get Trending Videos', id: 'youtube_trending' },
2525
{ label: 'Get Video Details', id: 'youtube_video_details' },
26-
{ label: 'Get Video Captions', id: 'youtube_captions' },
2726
{ label: 'Get Video Categories', id: 'youtube_video_categories' },
2827
{ label: 'Get Channel Info', id: 'youtube_channel_info' },
2928
{ label: 'Get Channel Videos', id: 'youtube_channel_videos' },
@@ -244,15 +243,6 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
244243
required: true,
245244
condition: { field: 'operation', value: 'youtube_video_details' },
246245
},
247-
// Get Video Captions operation inputs
248-
{
249-
id: 'videoId',
250-
title: 'Video ID',
251-
type: 'short-input',
252-
placeholder: 'Enter YouTube video ID',
253-
required: true,
254-
condition: { field: 'operation', value: 'youtube_captions' },
255-
},
256246
// Get Video Categories operation inputs
257247
{
258248
id: 'hl',
@@ -417,7 +407,6 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
417407
],
418408
tools: {
419409
access: [
420-
'youtube_captions',
421410
'youtube_channel_info',
422411
'youtube_channel_playlists',
423412
'youtube_channel_videos',
@@ -442,8 +431,6 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
442431
return 'youtube_trending'
443432
case 'youtube_video_details':
444433
return 'youtube_video_details'
445-
case 'youtube_captions':
446-
return 'youtube_captions'
447434
case 'youtube_video_categories':
448435
return 'youtube_video_categories'
449436
case 'youtube_channel_info':
@@ -481,7 +468,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
481468
relevanceLanguage: { type: 'string', description: 'Language code (ISO 639-1)' },
482469
safeSearch: { type: 'string', description: 'Safe search level' },
483470
hl: { type: 'string', description: 'Language for category names' },
484-
// Video Details, Comments & Captions
471+
// Video Details & Comments
485472
videoId: { type: 'string', description: 'YouTube video ID' },
486473
// Channel Info
487474
channelId: { type: 'string', description: 'YouTube channel ID' },

apps/sim/tools/registry.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,6 @@ import {
16421642
import { workflowExecutorTool } from '@/tools/workflow'
16431643
import { xReadTool, xSearchTool, xUserTool, xWriteTool } from '@/tools/x'
16441644
import {
1645-
youtubeCaptionsTool,
16461645
youtubeChannelInfoTool,
16471646
youtubeChannelPlaylistsTool,
16481647
youtubeChannelVideosTool,
@@ -1985,7 +1984,6 @@ export const tools: Record<string, ToolConfig> = {
19851984
typeform_create_form: typeformCreateFormTool,
19861985
typeform_update_form: typeformUpdateFormTool,
19871986
typeform_delete_form: typeformDeleteFormTool,
1988-
youtube_captions: youtubeCaptionsTool,
19891987
youtube_channel_info: youtubeChannelInfoTool,
19901988
youtube_channel_playlists: youtubeChannelPlaylistsTool,
19911989
youtube_channel_videos: youtubeChannelVideosTool,

apps/sim/tools/youtube/captions.ts

Lines changed: 0 additions & 105 deletions
This file was deleted.

apps/sim/tools/youtube/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { youtubeCaptionsTool } from '@/tools/youtube/captions'
21
import { youtubeChannelInfoTool } from '@/tools/youtube/channel_info'
32
import { youtubeChannelPlaylistsTool } from '@/tools/youtube/channel_playlists'
43
import { youtubeChannelVideosTool } from '@/tools/youtube/channel_videos'
@@ -16,6 +15,5 @@ export { youtubePlaylistItemsTool }
1615
export { youtubeCommentsTool }
1716
export { youtubeChannelVideosTool }
1817
export { youtubeChannelPlaylistsTool }
19-
export { youtubeCaptionsTool }
2018
export { youtubeTrendingTool }
2119
export { youtubeVideoCategoriesTool }

apps/sim/tools/youtube/trending.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const youtubeTrendingTool: ToolConfig<YouTubeTrendingParams, YouTubeTrend
5252
url += `&videoCategoryId=${params.videoCategoryId}`
5353
}
5454
if (params.pageToken) {
55-
url += `&pageToken=${params.pageToken}`
55+
url += `&pageToken=${encodeURIComponent(params.pageToken)}`
5656
}
5757
return url
5858
},

apps/sim/tools/youtube/types.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -196,27 +196,6 @@ export interface YouTubeChannelPlaylistsResponse extends ToolResponse {
196196
}
197197
}
198198

199-
export interface YouTubeCaptionsParams {
200-
apiKey: string
201-
videoId: string
202-
}
203-
204-
export interface YouTubeCaptionsResponse extends ToolResponse {
205-
output: {
206-
items: Array<{
207-
captionId: string
208-
language: string
209-
name: string
210-
trackKind: string
211-
lastUpdated: string
212-
isCC: boolean
213-
isAutoSynced: boolean
214-
audioTrackType: string | null
215-
}>
216-
totalResults: number
217-
}
218-
}
219-
220199
export interface YouTubeTrendingParams {
221200
apiKey: string
222201
regionCode?: string
@@ -270,6 +249,5 @@ export type YouTubeResponse =
270249
| YouTubeCommentsResponse
271250
| YouTubeChannelVideosResponse
272251
| YouTubeChannelPlaylistsResponse
273-
| YouTubeCaptionsResponse
274252
| YouTubeTrendingResponse
275253
| YouTubeVideoCategoriesResponse

0 commit comments

Comments
 (0)