youtube-knowledge-mcp 2.1.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +153 -38
- package/dist/brain-schemas.d.ts +10 -10
- package/dist/brain-schemas.d.ts.map +1 -1
- package/dist/brain-schemas.js +0 -4
- package/dist/brain-schemas.js.map +1 -1
- package/dist/harvest-schemas.d.ts +75 -0
- package/dist/harvest-schemas.d.ts.map +1 -0
- package/dist/harvest-schemas.js +106 -0
- package/dist/harvest-schemas.js.map +1 -0
- package/dist/http/app.d.ts +16 -0
- package/dist/http/app.d.ts.map +1 -0
- package/dist/http/app.js +176 -0
- package/dist/http/app.js.map +1 -0
- package/dist/http/auth.d.ts +38 -0
- package/dist/http/auth.d.ts.map +1 -0
- package/dist/http/auth.js +79 -0
- package/dist/http/auth.js.map +1 -0
- package/dist/http/config.d.ts +41 -0
- package/dist/http/config.d.ts.map +1 -0
- package/dist/http/config.js +65 -0
- package/dist/http/config.js.map +1 -0
- package/dist/http/rate-limiter.d.ts +24 -0
- package/dist/http/rate-limiter.d.ts.map +1 -0
- package/dist/http/rate-limiter.js +55 -0
- package/dist/http/rate-limiter.js.map +1 -0
- package/dist/http/sessions.d.ts +34 -0
- package/dist/http/sessions.d.ts.map +1 -0
- package/dist/http/sessions.js +62 -0
- package/dist/http/sessions.js.map +1 -0
- package/dist/http.d.ts +6 -48
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +35 -252
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -517
- package/dist/index.js.map +1 -1
- package/dist/prompts-brain.d.ts +4 -0
- package/dist/prompts-brain.d.ts.map +1 -0
- package/dist/prompts-brain.js +48 -0
- package/dist/prompts-brain.js.map +1 -0
- package/dist/prompts-research.d.ts +4 -0
- package/dist/prompts-research.d.ts.map +1 -0
- package/dist/prompts-research.js +74 -0
- package/dist/prompts-research.js.map +1 -0
- package/dist/prompts-shared.d.ts +13 -0
- package/dist/prompts-shared.d.ts.map +1 -0
- package/dist/prompts-shared.js +7 -0
- package/dist/prompts-shared.js.map +1 -0
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +5 -100
- package/dist/prompts.js.map +1 -1
- package/dist/registry/brain-tools.d.ts +4 -0
- package/dist/registry/brain-tools.d.ts.map +1 -0
- package/dist/registry/brain-tools.js +104 -0
- package/dist/registry/brain-tools.js.map +1 -0
- package/dist/registry/channel-tools.d.ts +4 -0
- package/dist/registry/channel-tools.d.ts.map +1 -0
- package/dist/registry/channel-tools.js +53 -0
- package/dist/registry/channel-tools.js.map +1 -0
- package/dist/registry/harvest-tools.d.ts +10 -0
- package/dist/registry/harvest-tools.d.ts.map +1 -0
- package/dist/registry/harvest-tools.js +109 -0
- package/dist/registry/harvest-tools.js.map +1 -0
- package/dist/registry/health-tools.d.ts +4 -0
- package/dist/registry/health-tools.d.ts.map +1 -0
- package/dist/registry/health-tools.js +39 -0
- package/dist/registry/health-tools.js.map +1 -0
- package/dist/registry/index.d.ts +8 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +29 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/library-tools.d.ts +4 -0
- package/dist/registry/library-tools.d.ts.map +1 -0
- package/dist/registry/library-tools.js +116 -0
- package/dist/registry/library-tools.js.map +1 -0
- package/dist/registry/media-tools.d.ts +4 -0
- package/dist/registry/media-tools.d.ts.map +1 -0
- package/dist/registry/media-tools.js +100 -0
- package/dist/registry/media-tools.js.map +1 -0
- package/dist/registry/thumbnail-tools.d.ts +7 -0
- package/dist/registry/thumbnail-tools.d.ts.map +1 -0
- package/dist/registry/thumbnail-tools.js +72 -0
- package/dist/registry/thumbnail-tools.js.map +1 -0
- package/dist/registry/transcript-tools.d.ts +4 -0
- package/dist/registry/transcript-tools.d.ts.map +1 -0
- package/dist/registry/transcript-tools.js +68 -0
- package/dist/registry/transcript-tools.js.map +1 -0
- package/dist/registry/types.d.ts +41 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +17 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/registry/video-tools.d.ts +4 -0
- package/dist/registry/video-tools.d.ts.map +1 -0
- package/dist/registry/video-tools.js +101 -0
- package/dist/registry/video-tools.js.map +1 -0
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +13 -10
- package/dist/resources.js.map +1 -1
- package/dist/schemas.d.ts +250 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +61 -0
- package/dist/schemas.js.map +1 -1
- package/dist/thumbnail-resource.d.ts +8 -0
- package/dist/thumbnail-resource.d.ts.map +1 -0
- package/dist/thumbnail-resource.js +38 -0
- package/dist/thumbnail-resource.js.map +1 -0
- package/dist/thumbnail-schemas.d.ts +512 -0
- package/dist/thumbnail-schemas.d.ts.map +1 -0
- package/dist/thumbnail-schemas.js +95 -0
- package/dist/thumbnail-schemas.js.map +1 -0
- package/dist/tools/ask-brain.js +1 -1
- package/dist/tools/ask-brain.js.map +1 -1
- package/dist/tools/batch.js +1 -1
- package/dist/tools/batch.js.map +1 -1
- package/dist/tools/brain-info.js +1 -1
- package/dist/tools/brain-info.js.map +1 -1
- package/dist/tools/build-brain.js +1 -1
- package/dist/tools/build-brain.js.map +1 -1
- package/dist/tools/check-health.d.ts +61 -0
- package/dist/tools/check-health.d.ts.map +1 -1
- package/dist/tools/check-health.js +94 -6
- package/dist/tools/check-health.js.map +1 -1
- package/dist/tools/clips.d.ts +9 -41
- package/dist/tools/clips.d.ts.map +1 -1
- package/dist/tools/clips.js +52 -128
- package/dist/tools/clips.js.map +1 -1
- package/dist/tools/fetch-channel-thumbnails.d.ts +179 -0
- package/dist/tools/fetch-channel-thumbnails.d.ts.map +1 -0
- package/dist/tools/fetch-channel-thumbnails.js +123 -0
- package/dist/tools/fetch-channel-thumbnails.js.map +1 -0
- package/dist/tools/fetch-videos.d.ts +18 -4
- package/dist/tools/fetch-videos.d.ts.map +1 -1
- package/dist/tools/fetch-videos.js +64 -20
- package/dist/tools/fetch-videos.js.map +1 -1
- package/dist/tools/frames-subtitles.d.ts +44 -0
- package/dist/tools/frames-subtitles.d.ts.map +1 -0
- package/dist/tools/frames-subtitles.js +104 -0
- package/dist/tools/frames-subtitles.js.map +1 -0
- package/dist/tools/get-channel-info.d.ts +2 -0
- package/dist/tools/get-channel-info.d.ts.map +1 -1
- package/dist/tools/get-channel-info.js +8 -1
- package/dist/tools/get-channel-info.js.map +1 -1
- package/dist/tools/get-comments.d.ts +238 -6
- package/dist/tools/get-comments.d.ts.map +1 -1
- package/dist/tools/get-comments.js +85 -21
- package/dist/tools/get-comments.js.map +1 -1
- package/dist/tools/get-coverage.d.ts +122 -0
- package/dist/tools/get-coverage.d.ts.map +1 -0
- package/dist/tools/get-coverage.js +105 -0
- package/dist/tools/get-coverage.js.map +1 -0
- package/dist/tools/get-playlist-info.d.ts.map +1 -1
- package/dist/tools/get-playlist-info.js +1 -0
- package/dist/tools/get-playlist-info.js.map +1 -1
- package/dist/tools/get-thumbnail.d.ts +38 -0
- package/dist/tools/get-thumbnail.d.ts.map +1 -0
- package/dist/tools/get-thumbnail.js +152 -0
- package/dist/tools/get-thumbnail.js.map +1 -0
- package/dist/tools/get-transcript.d.ts.map +1 -1
- package/dist/tools/get-transcript.js +2 -14
- package/dist/tools/get-transcript.js.map +1 -1
- package/dist/tools/harvest-channel.d.ts +92 -0
- package/dist/tools/harvest-channel.d.ts.map +1 -0
- package/dist/tools/harvest-channel.js +62 -0
- package/dist/tools/harvest-channel.js.map +1 -0
- package/dist/tools/harvest-comments.d.ts +81 -0
- package/dist/tools/harvest-comments.d.ts.map +1 -0
- package/dist/tools/harvest-comments.js +115 -0
- package/dist/tools/harvest-comments.js.map +1 -0
- package/dist/tools/library.d.ts.map +1 -1
- package/dist/tools/library.js +14 -4
- package/dist/tools/library.js.map +1 -1
- package/dist/tools/list-channel-thumbnails.d.ts +235 -0
- package/dist/tools/list-channel-thumbnails.d.ts.map +1 -0
- package/dist/tools/list-channel-thumbnails.js +79 -0
- package/dist/tools/list-channel-thumbnails.js.map +1 -0
- package/dist/tools/list-library.js +1 -1
- package/dist/tools/list-library.js.map +1 -1
- package/dist/tools/prune-harvest.d.ts +59 -0
- package/dist/tools/prune-harvest.d.ts.map +1 -0
- package/dist/tools/prune-harvest.js +108 -0
- package/dist/tools/prune-harvest.js.map +1 -0
- package/dist/tools/query-comments.d.ts +125 -0
- package/dist/tools/query-comments.d.ts.map +1 -0
- package/dist/tools/query-comments.js +106 -0
- package/dist/tools/query-comments.js.map +1 -0
- package/dist/tools/query-videos.d.ts +118 -0
- package/dist/tools/query-videos.d.ts.map +1 -0
- package/dist/tools/query-videos.js +97 -0
- package/dist/tools/query-videos.js.map +1 -0
- package/dist/tools/repair-store.d.ts +34 -0
- package/dist/tools/repair-store.d.ts.map +1 -0
- package/dist/tools/repair-store.js +58 -0
- package/dist/tools/repair-store.js.map +1 -0
- package/dist/tools/save-to-library.d.ts.map +1 -1
- package/dist/tools/save-to-library.js +5 -1
- package/dist/tools/save-to-library.js.map +1 -1
- package/dist/tools/search-channels.d.ts +6 -0
- package/dist/tools/search-channels.d.ts.map +1 -1
- package/dist/tools/search-channels.js +5 -1
- package/dist/tools/search-channels.js.map +1 -1
- package/dist/tools/search-transcript.d.ts.map +1 -1
- package/dist/tools/search-transcript.js +6 -13
- package/dist/tools/search-transcript.js.map +1 -1
- package/dist/tools/search-videos.d.ts +3 -0
- package/dist/tools/search-videos.d.ts.map +1 -1
- package/dist/tools/search-videos.js +1 -1
- package/dist/tools/search-videos.js.map +1 -1
- package/dist/utils/batches.d.ts +15 -0
- package/dist/utils/batches.d.ts.map +1 -0
- package/dist/utils/batches.js +31 -0
- package/dist/utils/batches.js.map +1 -0
- package/dist/utils/brain-build.d.ts.map +1 -1
- package/dist/utils/brain-build.js +1 -12
- package/dist/utils/brain-build.js.map +1 -1
- package/dist/utils/brain-index.d.ts.map +1 -1
- package/dist/utils/brain-index.js +3 -2
- package/dist/utils/brain-index.js.map +1 -1
- package/dist/utils/brain-lock.d.ts +2 -18
- package/dist/utils/brain-lock.d.ts.map +1 -1
- package/dist/utils/brain-lock.js +4 -80
- package/dist/utils/brain-lock.js.map +1 -1
- package/dist/utils/brain-lookup.d.ts +8 -0
- package/dist/utils/brain-lookup.d.ts.map +1 -1
- package/dist/utils/brain-lookup.js +5 -31
- package/dist/utils/brain-lookup.js.map +1 -1
- package/dist/utils/brain-storage.d.ts.map +1 -1
- package/dist/utils/brain-storage.js +5 -5
- package/dist/utils/brain-storage.js.map +1 -1
- package/dist/utils/caption-probe.d.ts +7 -0
- package/dist/utils/caption-probe.d.ts.map +1 -0
- package/dist/utils/caption-probe.js +36 -0
- package/dist/utils/caption-probe.js.map +1 -0
- package/dist/utils/channel-images.d.ts +16 -0
- package/dist/utils/channel-images.d.ts.map +1 -0
- package/dist/utils/channel-images.js +35 -0
- package/dist/utils/channel-images.js.map +1 -0
- package/dist/utils/channel-lookup.d.ts +5 -0
- package/dist/utils/channel-lookup.d.ts.map +1 -0
- package/dist/utils/channel-lookup.js +37 -0
- package/dist/utils/channel-lookup.js.map +1 -0
- package/dist/utils/chapters.d.ts +11 -0
- package/dist/utils/chapters.d.ts.map +1 -0
- package/dist/utils/chapters.js +24 -0
- package/dist/utils/chapters.js.map +1 -0
- package/dist/utils/clips.d.ts.map +1 -1
- package/dist/utils/clips.js +18 -26
- package/dist/utils/clips.js.map +1 -1
- package/dist/utils/comment-store.d.ts +71 -0
- package/dist/utils/comment-store.d.ts.map +1 -0
- package/dist/utils/comment-store.js +129 -0
- package/dist/utils/comment-store.js.map +1 -0
- package/dist/utils/comment-threads.d.ts +51 -0
- package/dist/utils/comment-threads.d.ts.map +1 -0
- package/dist/utils/comment-threads.js +76 -0
- package/dist/utils/comment-threads.js.map +1 -0
- package/dist/utils/coverage-text.d.ts +3 -0
- package/dist/utils/coverage-text.d.ts.map +1 -0
- package/dist/utils/coverage-text.js +62 -0
- package/dist/utils/coverage-text.js.map +1 -0
- package/dist/utils/coverage.d.ts +57 -0
- package/dist/utils/coverage.d.ts.map +1 -0
- package/dist/utils/coverage.js +142 -0
- package/dist/utils/coverage.js.map +1 -0
- package/dist/utils/env.d.ts +26 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +72 -0
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/errors.d.ts +1 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +28 -2
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/file-lock.d.ts +34 -0
- package/dist/utils/file-lock.d.ts.map +1 -0
- package/dist/utils/file-lock.js +91 -0
- package/dist/utils/file-lock.js.map +1 -0
- package/dist/utils/flat-listing.d.ts +89 -0
- package/dist/utils/flat-listing.d.ts.map +1 -0
- package/dist/utils/flat-listing.js +68 -0
- package/dist/utils/flat-listing.js.map +1 -0
- package/dist/utils/format.d.ts +18 -4
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +2 -6
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/guard.d.ts +21 -0
- package/dist/utils/guard.d.ts.map +1 -0
- package/dist/utils/guard.js +105 -0
- package/dist/utils/guard.js.map +1 -0
- package/dist/utils/harvest-catalog.d.ts +44 -0
- package/dist/utils/harvest-catalog.d.ts.map +1 -0
- package/dist/utils/harvest-catalog.js +164 -0
- package/dist/utils/harvest-catalog.js.map +1 -0
- package/dist/utils/harvest-lock.d.ts +3 -0
- package/dist/utils/harvest-lock.d.ts.map +1 -0
- package/dist/utils/harvest-lock.js +26 -0
- package/dist/utils/harvest-lock.js.map +1 -0
- package/dist/utils/harvest-receipts.d.ts +14 -0
- package/dist/utils/harvest-receipts.d.ts.map +1 -0
- package/dist/utils/harvest-receipts.js +110 -0
- package/dist/utils/harvest-receipts.js.map +1 -0
- package/dist/utils/image-dimensions.d.ts +19 -0
- package/dist/utils/image-dimensions.d.ts.map +1 -0
- package/dist/utils/image-dimensions.js +93 -0
- package/dist/utils/image-dimensions.js.map +1 -0
- package/dist/utils/image-fetch.d.ts +31 -0
- package/dist/utils/image-fetch.d.ts.map +1 -0
- package/dist/utils/image-fetch.js +141 -0
- package/dist/utils/image-fetch.js.map +1 -0
- package/dist/utils/json-file.d.ts +14 -5
- package/dist/utils/json-file.d.ts.map +1 -1
- package/dist/utils/json-file.js +24 -9
- package/dist/utils/json-file.js.map +1 -1
- package/dist/utils/listing-cursor.d.ts +31 -0
- package/dist/utils/listing-cursor.d.ts.map +1 -0
- package/dist/utils/listing-cursor.js +39 -0
- package/dist/utils/listing-cursor.js.map +1 -0
- package/dist/utils/paths.d.ts +10 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +14 -0
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/pattern.d.ts +30 -0
- package/dist/utils/pattern.d.ts.map +1 -0
- package/dist/utils/pattern.js +130 -0
- package/dist/utils/pattern.js.map +1 -0
- package/dist/utils/pot-preflight.d.ts +53 -0
- package/dist/utils/pot-preflight.d.ts.map +1 -0
- package/dist/utils/pot-preflight.js +146 -0
- package/dist/utils/pot-preflight.js.map +1 -0
- package/dist/utils/search-index.d.ts.map +1 -1
- package/dist/utils/search-index.js +9 -4
- package/dist/utils/search-index.js.map +1 -1
- package/dist/utils/sleep.d.ts +9 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +25 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/storage.d.ts.map +1 -1
- package/dist/utils/storage.js +14 -8
- package/dist/utils/storage.js.map +1 -1
- package/dist/utils/store-health.d.ts +37 -0
- package/dist/utils/store-health.d.ts.map +1 -0
- package/dist/utils/store-health.js +92 -0
- package/dist/utils/store-health.js.map +1 -0
- package/dist/utils/store-migrations.d.ts +33 -0
- package/dist/utils/store-migrations.d.ts.map +1 -0
- package/dist/utils/store-migrations.js +41 -0
- package/dist/utils/store-migrations.js.map +1 -0
- package/dist/utils/store-paths.d.ts +33 -0
- package/dist/utils/store-paths.d.ts.map +1 -0
- package/dist/utils/store-paths.js +48 -0
- package/dist/utils/store-paths.js.map +1 -0
- package/dist/utils/store-rows.d.ts +22 -0
- package/dist/utils/store-rows.d.ts.map +1 -0
- package/dist/utils/store-rows.js +62 -0
- package/dist/utils/store-rows.js.map +1 -0
- package/dist/utils/store-schema.d.ts +16 -0
- package/dist/utils/store-schema.d.ts.map +1 -0
- package/dist/utils/store-schema.js +168 -0
- package/dist/utils/store-schema.js.map +1 -0
- package/dist/utils/store.d.ts +34 -0
- package/dist/utils/store.d.ts.map +1 -0
- package/dist/utils/store.js +157 -0
- package/dist/utils/store.js.map +1 -0
- package/dist/utils/subtitles.d.ts +7 -0
- package/dist/utils/subtitles.d.ts.map +1 -0
- package/dist/utils/subtitles.js +30 -0
- package/dist/utils/subtitles.js.map +1 -0
- package/dist/utils/thumbnail-entry.d.ts +19 -0
- package/dist/utils/thumbnail-entry.d.ts.map +1 -0
- package/dist/utils/thumbnail-entry.js +119 -0
- package/dist/utils/thumbnail-entry.js.map +1 -0
- package/dist/utils/thumbnail-fetch.d.ts +37 -0
- package/dist/utils/thumbnail-fetch.d.ts.map +1 -0
- package/dist/utils/thumbnail-fetch.js +89 -0
- package/dist/utils/thumbnail-fetch.js.map +1 -0
- package/dist/utils/thumbnail-ladder.d.ts +44 -0
- package/dist/utils/thumbnail-ladder.d.ts.map +1 -0
- package/dist/utils/thumbnail-ladder.js +68 -0
- package/dist/utils/thumbnail-ladder.js.map +1 -0
- package/dist/utils/thumbnail-listing.d.ts +16 -0
- package/dist/utils/thumbnail-listing.d.ts.map +1 -0
- package/dist/utils/thumbnail-listing.js +26 -0
- package/dist/utils/thumbnail-listing.js.map +1 -0
- package/dist/utils/thumbnail-paths.d.ts +20 -0
- package/dist/utils/thumbnail-paths.d.ts.map +1 -0
- package/dist/utils/thumbnail-paths.js +35 -0
- package/dist/utils/thumbnail-paths.js.map +1 -0
- package/dist/utils/thumbnail-store.d.ts +19 -0
- package/dist/utils/thumbnail-store.d.ts.map +1 -0
- package/dist/utils/thumbnail-store.js +125 -0
- package/dist/utils/thumbnail-store.js.map +1 -0
- package/dist/utils/transcript-cache.d.ts +20 -0
- package/dist/utils/transcript-cache.d.ts.map +1 -0
- package/dist/utils/transcript-cache.js +127 -0
- package/dist/utils/transcript-cache.js.map +1 -0
- package/dist/utils/transcript-search.d.ts +20 -0
- package/dist/utils/transcript-search.d.ts.map +1 -0
- package/dist/utils/transcript-search.js +35 -0
- package/dist/utils/transcript-search.js.map +1 -0
- package/dist/utils/transcript.d.ts +10 -31
- package/dist/utils/transcript.d.ts.map +1 -1
- package/dist/utils/transcript.js +2 -64
- package/dist/utils/transcript.js.map +1 -1
- package/dist/utils/validate-youtube.d.ts +35 -0
- package/dist/utils/validate-youtube.d.ts.map +1 -0
- package/dist/utils/validate-youtube.js +87 -0
- package/dist/utils/validate-youtube.js.map +1 -0
- package/dist/utils/validate.d.ts +11 -4
- package/dist/utils/validate.d.ts.map +1 -1
- package/dist/utils/validate.js +43 -36
- package/dist/utils/validate.js.map +1 -1
- package/dist/utils/version.d.ts +2 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +19 -0
- package/dist/utils/version.js.map +1 -0
- package/dist/utils/video-stats-cache.d.ts +16 -0
- package/dist/utils/video-stats-cache.d.ts.map +1 -0
- package/dist/utils/video-stats-cache.js +81 -0
- package/dist/utils/video-stats-cache.js.map +1 -0
- package/dist/utils/video-stats.d.ts +186 -0
- package/dist/utils/video-stats.d.ts.map +1 -0
- package/dist/utils/video-stats.js +168 -0
- package/dist/utils/video-stats.js.map +1 -0
- package/dist/utils/video-store.d.ts +69 -0
- package/dist/utils/video-store.d.ts.map +1 -0
- package/dist/utils/video-store.js +77 -0
- package/dist/utils/video-store.js.map +1 -0
- package/dist/utils/youtube-channel.d.ts +51 -0
- package/dist/utils/youtube-channel.d.ts.map +1 -0
- package/dist/utils/youtube-channel.js +91 -0
- package/dist/utils/youtube-channel.js.map +1 -0
- package/dist/utils/youtube-download.d.ts +27 -0
- package/dist/utils/youtube-download.d.ts.map +1 -0
- package/dist/utils/youtube-download.js +118 -0
- package/dist/utils/youtube-download.js.map +1 -0
- package/dist/utils/youtube-schemas.d.ts +492 -0
- package/dist/utils/youtube-schemas.d.ts.map +1 -0
- package/dist/utils/youtube-schemas.js +148 -0
- package/dist/utils/youtube-schemas.js.map +1 -0
- package/dist/utils/youtube-search.d.ts +14 -0
- package/dist/utils/youtube-search.d.ts.map +1 -0
- package/dist/utils/youtube-search.js +39 -0
- package/dist/utils/youtube-search.js.map +1 -0
- package/dist/utils/youtube-url.d.ts +25 -0
- package/dist/utils/youtube-url.d.ts.map +1 -0
- package/dist/utils/youtube-url.js +75 -0
- package/dist/utils/youtube-url.js.map +1 -0
- package/dist/utils/youtube-video.d.ts +68 -0
- package/dist/utils/youtube-video.d.ts.map +1 -0
- package/dist/utils/youtube-video.js +110 -0
- package/dist/utils/youtube-video.js.map +1 -0
- package/dist/utils/youtube.d.ts +10 -122
- package/dist/utils/youtube.d.ts.map +1 -1
- package/dist/utils/youtube.js +11 -486
- package/dist/utils/youtube.js.map +1 -1
- package/dist/utils/ytdlp-env.d.ts +33 -0
- package/dist/utils/ytdlp-env.d.ts.map +1 -0
- package/dist/utils/ytdlp-env.js +121 -0
- package/dist/utils/ytdlp-env.js.map +1 -0
- package/dist/utils/ytdlp-limiter.d.ts +27 -0
- package/dist/utils/ytdlp-limiter.d.ts.map +1 -0
- package/dist/utils/ytdlp-limiter.js +85 -0
- package/dist/utils/ytdlp-limiter.js.map +1 -0
- package/dist/utils/ytdlp-pacer.d.ts +64 -0
- package/dist/utils/ytdlp-pacer.d.ts.map +1 -0
- package/dist/utils/ytdlp-pacer.js +165 -0
- package/dist/utils/ytdlp-pacer.js.map +1 -0
- package/dist/utils/ytdlp-parse.d.ts +13 -0
- package/dist/utils/ytdlp-parse.d.ts.map +1 -0
- package/dist/utils/ytdlp-parse.js +48 -0
- package/dist/utils/ytdlp-parse.js.map +1 -0
- package/dist/utils/ytdlp-stream.d.ts +32 -0
- package/dist/utils/ytdlp-stream.d.ts.map +1 -0
- package/dist/utils/ytdlp-stream.js +61 -0
- package/dist/utils/ytdlp-stream.js.map +1 -0
- package/dist/utils/ytdlp.d.ts +23 -18
- package/dist/utils/ytdlp.d.ts.map +1 -1
- package/dist/utils/ytdlp.js +56 -134
- package/dist/utils/ytdlp.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The shapes yt-dlp's JSON output is checked against.
|
|
4
|
+
*
|
|
5
|
+
* Every field is optional or nullable: yt-dlp emits `null` for what it could
|
|
6
|
+
* not find and omits what it never looked for, and a row missing a field is
|
|
7
|
+
* still a usable row. What the schemas guarantee is that a field that *is*
|
|
8
|
+
* present has the type the code reads it as — which the previous "is it an
|
|
9
|
+
* object" guard did not.
|
|
10
|
+
*/
|
|
11
|
+
/** `--print '%(.{...})j'` for one video: yt-dlp writes `null` for what it did not find. */
|
|
12
|
+
export declare const videoInfoRowSchema: z.ZodObject<{
|
|
13
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17
|
+
upload_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
+
tags: z.ZodUnknown;
|
|
20
|
+
thumbnail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
view_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
22
|
+
like_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
23
|
+
comment_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
24
|
+
availability: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
live_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
id?: string | null | undefined;
|
|
28
|
+
title?: string | null | undefined;
|
|
29
|
+
channel?: string | null | undefined;
|
|
30
|
+
description?: string | null | undefined;
|
|
31
|
+
tags?: unknown;
|
|
32
|
+
duration?: number | null | undefined;
|
|
33
|
+
upload_date?: string | null | undefined;
|
|
34
|
+
thumbnail?: string | null | undefined;
|
|
35
|
+
view_count?: number | null | undefined;
|
|
36
|
+
like_count?: number | null | undefined;
|
|
37
|
+
comment_count?: number | null | undefined;
|
|
38
|
+
availability?: string | null | undefined;
|
|
39
|
+
live_status?: string | null | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
id?: string | null | undefined;
|
|
42
|
+
title?: string | null | undefined;
|
|
43
|
+
channel?: string | null | undefined;
|
|
44
|
+
description?: string | null | undefined;
|
|
45
|
+
tags?: unknown;
|
|
46
|
+
duration?: number | null | undefined;
|
|
47
|
+
upload_date?: string | null | undefined;
|
|
48
|
+
thumbnail?: string | null | undefined;
|
|
49
|
+
view_count?: number | null | undefined;
|
|
50
|
+
like_count?: number | null | undefined;
|
|
51
|
+
comment_count?: number | null | undefined;
|
|
52
|
+
availability?: string | null | undefined;
|
|
53
|
+
live_status?: string | null | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
/** `--print 'after_move:%(.{title,filepath})j'`: where yt-dlp put the finished file. */
|
|
56
|
+
export declare const afterMoveRowSchema: z.ZodObject<{
|
|
57
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
+
filepath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
title?: string | null | undefined;
|
|
61
|
+
filepath?: string | null | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
title?: string | null | undefined;
|
|
64
|
+
filepath?: string | null | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export declare const chapterRowSchema: z.ZodObject<{
|
|
67
|
+
title: z.ZodString;
|
|
68
|
+
start_time: z.ZodNumber;
|
|
69
|
+
end_time: z.ZodNumber;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
title: string;
|
|
72
|
+
start_time: number;
|
|
73
|
+
end_time: number;
|
|
74
|
+
}, {
|
|
75
|
+
title: string;
|
|
76
|
+
start_time: number;
|
|
77
|
+
end_time: number;
|
|
78
|
+
}>;
|
|
79
|
+
export declare const videoDetailsRowSchema: z.ZodObject<{
|
|
80
|
+
chapters: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
81
|
+
title: z.ZodString;
|
|
82
|
+
start_time: z.ZodNumber;
|
|
83
|
+
end_time: z.ZodNumber;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
title: string;
|
|
86
|
+
start_time: number;
|
|
87
|
+
end_time: number;
|
|
88
|
+
}, {
|
|
89
|
+
title: string;
|
|
90
|
+
start_time: number;
|
|
91
|
+
end_time: number;
|
|
92
|
+
}>, "many">>>;
|
|
93
|
+
upload_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
+
duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
95
|
+
/**
|
|
96
|
+
* The video's real comment count — trustworthy ONLY here, because this read
|
|
97
|
+
* does not pass --write-comments. With that flag yt-dlp replaces the value
|
|
98
|
+
* with the number it extracted (measured: 300 against a video with 2.4M).
|
|
99
|
+
*/
|
|
100
|
+
comment_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
duration?: number | null | undefined;
|
|
103
|
+
upload_date?: string | null | undefined;
|
|
104
|
+
comment_count?: number | null | undefined;
|
|
105
|
+
chapters?: {
|
|
106
|
+
title: string;
|
|
107
|
+
start_time: number;
|
|
108
|
+
end_time: number;
|
|
109
|
+
}[] | null | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
duration?: number | null | undefined;
|
|
112
|
+
upload_date?: string | null | undefined;
|
|
113
|
+
comment_count?: number | null | undefined;
|
|
114
|
+
chapters?: {
|
|
115
|
+
title: string;
|
|
116
|
+
start_time: number;
|
|
117
|
+
end_time: number;
|
|
118
|
+
}[] | null | undefined;
|
|
119
|
+
}>;
|
|
120
|
+
/**
|
|
121
|
+
* Every field yt-dlp returns for a comment, verified against 2026.08.19.
|
|
122
|
+
*
|
|
123
|
+
* Nine of these were previously dropped on the floor after being paid for:
|
|
124
|
+
* the extraction fetches them either way, so discarding `id` and `parent`
|
|
125
|
+
* meant a thread could not be rebuilt from what we already had.
|
|
126
|
+
*/
|
|
127
|
+
export declare const commentRowSchema: z.ZodObject<{
|
|
128
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
129
|
+
author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
|
+
author_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
|
+
author_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
|
+
author_thumbnail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
133
|
+
author_is_uploader: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
134
|
+
author_is_verified: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
135
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
136
|
+
like_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
137
|
+
is_pinned: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
138
|
+
is_favorited: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
139
|
+
timestamp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
140
|
+
_time_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
/** 'root' for a top-level comment; the parent's id for a reply. */
|
|
142
|
+
parent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
id?: string | null | undefined;
|
|
145
|
+
author?: string | null | undefined;
|
|
146
|
+
text?: string | null | undefined;
|
|
147
|
+
timestamp?: number | null | undefined;
|
|
148
|
+
parent?: string | null | undefined;
|
|
149
|
+
like_count?: number | null | undefined;
|
|
150
|
+
author_id?: string | null | undefined;
|
|
151
|
+
author_url?: string | null | undefined;
|
|
152
|
+
author_thumbnail?: string | null | undefined;
|
|
153
|
+
author_is_uploader?: boolean | null | undefined;
|
|
154
|
+
author_is_verified?: boolean | null | undefined;
|
|
155
|
+
is_pinned?: boolean | null | undefined;
|
|
156
|
+
is_favorited?: boolean | null | undefined;
|
|
157
|
+
_time_text?: string | null | undefined;
|
|
158
|
+
}, {
|
|
159
|
+
id?: string | null | undefined;
|
|
160
|
+
author?: string | null | undefined;
|
|
161
|
+
text?: string | null | undefined;
|
|
162
|
+
timestamp?: number | null | undefined;
|
|
163
|
+
parent?: string | null | undefined;
|
|
164
|
+
like_count?: number | null | undefined;
|
|
165
|
+
author_id?: string | null | undefined;
|
|
166
|
+
author_url?: string | null | undefined;
|
|
167
|
+
author_thumbnail?: string | null | undefined;
|
|
168
|
+
author_is_uploader?: boolean | null | undefined;
|
|
169
|
+
author_is_verified?: boolean | null | undefined;
|
|
170
|
+
is_pinned?: boolean | null | undefined;
|
|
171
|
+
is_favorited?: boolean | null | undefined;
|
|
172
|
+
_time_text?: string | null | undefined;
|
|
173
|
+
}>;
|
|
174
|
+
export declare const commentsRowSchema: z.ZodObject<{
|
|
175
|
+
comments: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
176
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
177
|
+
author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
178
|
+
author_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
179
|
+
author_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
180
|
+
author_thumbnail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
181
|
+
author_is_uploader: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
182
|
+
author_is_verified: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
183
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
184
|
+
like_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
185
|
+
is_pinned: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
186
|
+
is_favorited: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
187
|
+
timestamp: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
188
|
+
_time_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
|
+
/** 'root' for a top-level comment; the parent's id for a reply. */
|
|
190
|
+
parent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
191
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
id?: string | null | undefined;
|
|
193
|
+
author?: string | null | undefined;
|
|
194
|
+
text?: string | null | undefined;
|
|
195
|
+
timestamp?: number | null | undefined;
|
|
196
|
+
parent?: string | null | undefined;
|
|
197
|
+
like_count?: number | null | undefined;
|
|
198
|
+
author_id?: string | null | undefined;
|
|
199
|
+
author_url?: string | null | undefined;
|
|
200
|
+
author_thumbnail?: string | null | undefined;
|
|
201
|
+
author_is_uploader?: boolean | null | undefined;
|
|
202
|
+
author_is_verified?: boolean | null | undefined;
|
|
203
|
+
is_pinned?: boolean | null | undefined;
|
|
204
|
+
is_favorited?: boolean | null | undefined;
|
|
205
|
+
_time_text?: string | null | undefined;
|
|
206
|
+
}, {
|
|
207
|
+
id?: string | null | undefined;
|
|
208
|
+
author?: string | null | undefined;
|
|
209
|
+
text?: string | null | undefined;
|
|
210
|
+
timestamp?: number | null | undefined;
|
|
211
|
+
parent?: string | null | undefined;
|
|
212
|
+
like_count?: number | null | undefined;
|
|
213
|
+
author_id?: string | null | undefined;
|
|
214
|
+
author_url?: string | null | undefined;
|
|
215
|
+
author_thumbnail?: string | null | undefined;
|
|
216
|
+
author_is_uploader?: boolean | null | undefined;
|
|
217
|
+
author_is_verified?: boolean | null | undefined;
|
|
218
|
+
is_pinned?: boolean | null | undefined;
|
|
219
|
+
is_favorited?: boolean | null | undefined;
|
|
220
|
+
_time_text?: string | null | undefined;
|
|
221
|
+
}>, "many">>>;
|
|
222
|
+
/**
|
|
223
|
+
* With --write-comments yt-dlp OVERWRITES this with the number extracted,
|
|
224
|
+
* and sets it to null when the extraction was interrupted. So it is a
|
|
225
|
+
* three-state signal about this run, never the video's real total, which
|
|
226
|
+
* only a separate metadata pass can report.
|
|
227
|
+
*/
|
|
228
|
+
comment_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
comment_count?: number | null | undefined;
|
|
231
|
+
comments?: {
|
|
232
|
+
id?: string | null | undefined;
|
|
233
|
+
author?: string | null | undefined;
|
|
234
|
+
text?: string | null | undefined;
|
|
235
|
+
timestamp?: number | null | undefined;
|
|
236
|
+
parent?: string | null | undefined;
|
|
237
|
+
like_count?: number | null | undefined;
|
|
238
|
+
author_id?: string | null | undefined;
|
|
239
|
+
author_url?: string | null | undefined;
|
|
240
|
+
author_thumbnail?: string | null | undefined;
|
|
241
|
+
author_is_uploader?: boolean | null | undefined;
|
|
242
|
+
author_is_verified?: boolean | null | undefined;
|
|
243
|
+
is_pinned?: boolean | null | undefined;
|
|
244
|
+
is_favorited?: boolean | null | undefined;
|
|
245
|
+
_time_text?: string | null | undefined;
|
|
246
|
+
}[] | null | undefined;
|
|
247
|
+
}, {
|
|
248
|
+
comment_count?: number | null | undefined;
|
|
249
|
+
comments?: {
|
|
250
|
+
id?: string | null | undefined;
|
|
251
|
+
author?: string | null | undefined;
|
|
252
|
+
text?: string | null | undefined;
|
|
253
|
+
timestamp?: number | null | undefined;
|
|
254
|
+
parent?: string | null | undefined;
|
|
255
|
+
like_count?: number | null | undefined;
|
|
256
|
+
author_id?: string | null | undefined;
|
|
257
|
+
author_url?: string | null | undefined;
|
|
258
|
+
author_thumbnail?: string | null | undefined;
|
|
259
|
+
author_is_uploader?: boolean | null | undefined;
|
|
260
|
+
author_is_verified?: boolean | null | undefined;
|
|
261
|
+
is_pinned?: boolean | null | undefined;
|
|
262
|
+
is_favorited?: boolean | null | undefined;
|
|
263
|
+
_time_text?: string | null | undefined;
|
|
264
|
+
}[] | null | undefined;
|
|
265
|
+
}>;
|
|
266
|
+
export declare const formatRowSchema: z.ZodObject<{
|
|
267
|
+
format_id: z.ZodString;
|
|
268
|
+
ext: z.ZodString;
|
|
269
|
+
resolution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
270
|
+
width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
271
|
+
height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
272
|
+
fps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
273
|
+
vcodec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
274
|
+
acodec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
275
|
+
filesize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
276
|
+
filesize_approx: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
277
|
+
format_note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
|
+
}, "strip", z.ZodTypeAny, {
|
|
279
|
+
ext: string;
|
|
280
|
+
format_id: string;
|
|
281
|
+
resolution?: string | null | undefined;
|
|
282
|
+
fps?: number | null | undefined;
|
|
283
|
+
vcodec?: string | null | undefined;
|
|
284
|
+
acodec?: string | null | undefined;
|
|
285
|
+
width?: number | null | undefined;
|
|
286
|
+
height?: number | null | undefined;
|
|
287
|
+
filesize?: number | null | undefined;
|
|
288
|
+
filesize_approx?: number | null | undefined;
|
|
289
|
+
format_note?: string | null | undefined;
|
|
290
|
+
}, {
|
|
291
|
+
ext: string;
|
|
292
|
+
format_id: string;
|
|
293
|
+
resolution?: string | null | undefined;
|
|
294
|
+
fps?: number | null | undefined;
|
|
295
|
+
vcodec?: string | null | undefined;
|
|
296
|
+
acodec?: string | null | undefined;
|
|
297
|
+
width?: number | null | undefined;
|
|
298
|
+
height?: number | null | undefined;
|
|
299
|
+
filesize?: number | null | undefined;
|
|
300
|
+
filesize_approx?: number | null | undefined;
|
|
301
|
+
format_note?: string | null | undefined;
|
|
302
|
+
}>;
|
|
303
|
+
export declare const formatsRowSchema: z.ZodObject<{
|
|
304
|
+
formats: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
305
|
+
format_id: z.ZodString;
|
|
306
|
+
ext: z.ZodString;
|
|
307
|
+
resolution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
308
|
+
width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
309
|
+
height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
310
|
+
fps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
311
|
+
vcodec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
312
|
+
acodec: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
313
|
+
filesize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
314
|
+
filesize_approx: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
315
|
+
format_note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
316
|
+
}, "strip", z.ZodTypeAny, {
|
|
317
|
+
ext: string;
|
|
318
|
+
format_id: string;
|
|
319
|
+
resolution?: string | null | undefined;
|
|
320
|
+
fps?: number | null | undefined;
|
|
321
|
+
vcodec?: string | null | undefined;
|
|
322
|
+
acodec?: string | null | undefined;
|
|
323
|
+
width?: number | null | undefined;
|
|
324
|
+
height?: number | null | undefined;
|
|
325
|
+
filesize?: number | null | undefined;
|
|
326
|
+
filesize_approx?: number | null | undefined;
|
|
327
|
+
format_note?: string | null | undefined;
|
|
328
|
+
}, {
|
|
329
|
+
ext: string;
|
|
330
|
+
format_id: string;
|
|
331
|
+
resolution?: string | null | undefined;
|
|
332
|
+
fps?: number | null | undefined;
|
|
333
|
+
vcodec?: string | null | undefined;
|
|
334
|
+
acodec?: string | null | undefined;
|
|
335
|
+
width?: number | null | undefined;
|
|
336
|
+
height?: number | null | undefined;
|
|
337
|
+
filesize?: number | null | undefined;
|
|
338
|
+
filesize_approx?: number | null | undefined;
|
|
339
|
+
format_note?: string | null | undefined;
|
|
340
|
+
}>, "many">>>;
|
|
341
|
+
}, "strip", z.ZodTypeAny, {
|
|
342
|
+
formats?: {
|
|
343
|
+
ext: string;
|
|
344
|
+
format_id: string;
|
|
345
|
+
resolution?: string | null | undefined;
|
|
346
|
+
fps?: number | null | undefined;
|
|
347
|
+
vcodec?: string | null | undefined;
|
|
348
|
+
acodec?: string | null | undefined;
|
|
349
|
+
width?: number | null | undefined;
|
|
350
|
+
height?: number | null | undefined;
|
|
351
|
+
filesize?: number | null | undefined;
|
|
352
|
+
filesize_approx?: number | null | undefined;
|
|
353
|
+
format_note?: string | null | undefined;
|
|
354
|
+
}[] | null | undefined;
|
|
355
|
+
}, {
|
|
356
|
+
formats?: {
|
|
357
|
+
ext: string;
|
|
358
|
+
format_id: string;
|
|
359
|
+
resolution?: string | null | undefined;
|
|
360
|
+
fps?: number | null | undefined;
|
|
361
|
+
vcodec?: string | null | undefined;
|
|
362
|
+
acodec?: string | null | undefined;
|
|
363
|
+
width?: number | null | undefined;
|
|
364
|
+
height?: number | null | undefined;
|
|
365
|
+
filesize?: number | null | undefined;
|
|
366
|
+
filesize_approx?: number | null | undefined;
|
|
367
|
+
format_note?: string | null | undefined;
|
|
368
|
+
}[] | null | undefined;
|
|
369
|
+
}>;
|
|
370
|
+
export declare const captionTracksSchema: z.ZodObject<{
|
|
371
|
+
subtitles: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
372
|
+
automatic_captions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
373
|
+
}, "strip", z.ZodTypeAny, {
|
|
374
|
+
subtitles?: Record<string, unknown> | null | undefined;
|
|
375
|
+
automatic_captions?: Record<string, unknown> | null | undefined;
|
|
376
|
+
}, {
|
|
377
|
+
subtitles?: Record<string, unknown> | null | undefined;
|
|
378
|
+
automatic_captions?: Record<string, unknown> | null | undefined;
|
|
379
|
+
}>;
|
|
380
|
+
/**
|
|
381
|
+
* yt-dlp's search rows. Only `id` is required — the rest are absent often
|
|
382
|
+
* enough (age-gated entries, deleted uploads still in the index) that treating
|
|
383
|
+
* them as guaranteed is what produced `undefined` in rendered output.
|
|
384
|
+
*/
|
|
385
|
+
export declare const searchResultSchema: z.ZodObject<{
|
|
386
|
+
id: z.ZodString;
|
|
387
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
388
|
+
duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
389
|
+
channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
390
|
+
view_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
391
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
392
|
+
}, "strip", z.ZodTypeAny, {
|
|
393
|
+
id: string;
|
|
394
|
+
title?: string | null | undefined;
|
|
395
|
+
url?: string | null | undefined;
|
|
396
|
+
channel?: string | null | undefined;
|
|
397
|
+
duration?: number | null | undefined;
|
|
398
|
+
view_count?: number | null | undefined;
|
|
399
|
+
}, {
|
|
400
|
+
id: string;
|
|
401
|
+
title?: string | null | undefined;
|
|
402
|
+
url?: string | null | undefined;
|
|
403
|
+
channel?: string | null | undefined;
|
|
404
|
+
duration?: number | null | undefined;
|
|
405
|
+
view_count?: number | null | undefined;
|
|
406
|
+
}>;
|
|
407
|
+
export declare const channelSearchRowSchema: z.ZodObject<{
|
|
408
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
409
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
410
|
+
channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
411
|
+
channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
412
|
+
channel_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
413
|
+
uploader_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
414
|
+
channel_follower_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
415
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
416
|
+
}, "strip", z.ZodTypeAny, {
|
|
417
|
+
id?: string | null | undefined;
|
|
418
|
+
title?: string | null | undefined;
|
|
419
|
+
channel?: string | null | undefined;
|
|
420
|
+
description?: string | null | undefined;
|
|
421
|
+
channel_id?: string | null | undefined;
|
|
422
|
+
channel_url?: string | null | undefined;
|
|
423
|
+
uploader_id?: string | null | undefined;
|
|
424
|
+
channel_follower_count?: number | null | undefined;
|
|
425
|
+
}, {
|
|
426
|
+
id?: string | null | undefined;
|
|
427
|
+
title?: string | null | undefined;
|
|
428
|
+
channel?: string | null | undefined;
|
|
429
|
+
description?: string | null | undefined;
|
|
430
|
+
channel_id?: string | null | undefined;
|
|
431
|
+
channel_url?: string | null | undefined;
|
|
432
|
+
uploader_id?: string | null | undefined;
|
|
433
|
+
channel_follower_count?: number | null | undefined;
|
|
434
|
+
}>;
|
|
435
|
+
export declare const channelMetaSchema: z.ZodObject<{
|
|
436
|
+
channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
437
|
+
channel_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
438
|
+
channel_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
439
|
+
uploader_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
440
|
+
channel_follower_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
441
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
442
|
+
/** Checked by `selectChannelImages`, which tolerates any shape. */
|
|
443
|
+
thumbnails: z.ZodUnknown;
|
|
444
|
+
}, "strip", z.ZodTypeAny, {
|
|
445
|
+
channel?: string | null | undefined;
|
|
446
|
+
description?: string | null | undefined;
|
|
447
|
+
channel_id?: string | null | undefined;
|
|
448
|
+
channel_url?: string | null | undefined;
|
|
449
|
+
uploader_id?: string | null | undefined;
|
|
450
|
+
channel_follower_count?: number | null | undefined;
|
|
451
|
+
thumbnails?: unknown;
|
|
452
|
+
}, {
|
|
453
|
+
channel?: string | null | undefined;
|
|
454
|
+
description?: string | null | undefined;
|
|
455
|
+
channel_id?: string | null | undefined;
|
|
456
|
+
channel_url?: string | null | undefined;
|
|
457
|
+
uploader_id?: string | null | undefined;
|
|
458
|
+
channel_follower_count?: number | null | undefined;
|
|
459
|
+
thumbnails?: unknown;
|
|
460
|
+
}>;
|
|
461
|
+
export declare const playlistMetaSchema: z.ZodObject<{
|
|
462
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
463
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
464
|
+
channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
465
|
+
channel_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
466
|
+
uploader_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
467
|
+
playlist_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
468
|
+
modified_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
469
|
+
webpage_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
470
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
471
|
+
}, "strip", z.ZodTypeAny, {
|
|
472
|
+
id?: string | null | undefined;
|
|
473
|
+
title?: string | null | undefined;
|
|
474
|
+
channel?: string | null | undefined;
|
|
475
|
+
description?: string | null | undefined;
|
|
476
|
+
channel_url?: string | null | undefined;
|
|
477
|
+
uploader_id?: string | null | undefined;
|
|
478
|
+
playlist_count?: number | null | undefined;
|
|
479
|
+
modified_date?: string | null | undefined;
|
|
480
|
+
webpage_url?: string | null | undefined;
|
|
481
|
+
}, {
|
|
482
|
+
id?: string | null | undefined;
|
|
483
|
+
title?: string | null | undefined;
|
|
484
|
+
channel?: string | null | undefined;
|
|
485
|
+
description?: string | null | undefined;
|
|
486
|
+
channel_url?: string | null | undefined;
|
|
487
|
+
uploader_id?: string | null | undefined;
|
|
488
|
+
playlist_count?: number | null | undefined;
|
|
489
|
+
modified_date?: string | null | undefined;
|
|
490
|
+
webpage_url?: string | null | undefined;
|
|
491
|
+
}>;
|
|
492
|
+
//# sourceMappingURL=youtube-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"youtube-schemas.d.ts","sourceRoot":"","sources":["../../src/utils/youtube-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AAEH,2FAA2F;AAC3F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgB7B,CAAC;AAEH,wFAAwF;AACxF,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;IAIhC;;;;OAIG;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;IAc3B,mEAAmE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEnE,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;QAJ5B,mEAAmE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMnE;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY1B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;EAO7B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;EASjC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;IAO5B,mEAAmE;;;;;;;;;;;;;;;;;;EAEnE,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU7B,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The shapes yt-dlp's JSON output is checked against.
|
|
4
|
+
*
|
|
5
|
+
* Every field is optional or nullable: yt-dlp emits `null` for what it could
|
|
6
|
+
* not find and omits what it never looked for, and a row missing a field is
|
|
7
|
+
* still a usable row. What the schemas guarantee is that a field that *is*
|
|
8
|
+
* present has the type the code reads it as — which the previous "is it an
|
|
9
|
+
* object" guard did not.
|
|
10
|
+
*/
|
|
11
|
+
/** `--print '%(.{...})j'` for one video: yt-dlp writes `null` for what it did not find. */
|
|
12
|
+
export const videoInfoRowSchema = z.object({
|
|
13
|
+
id: z.string().nullish(),
|
|
14
|
+
title: z.string().nullish(),
|
|
15
|
+
channel: z.string().nullish(),
|
|
16
|
+
duration: z.number().nullish(),
|
|
17
|
+
upload_date: z.string().nullish(),
|
|
18
|
+
description: z.string().nullish(),
|
|
19
|
+
// Kept loose on purpose: a tag list is read for the strings it holds, and a
|
|
20
|
+
// video whose tags field is odd should still be readable.
|
|
21
|
+
tags: z.unknown(),
|
|
22
|
+
thumbnail: z.string().nullish(),
|
|
23
|
+
view_count: z.number().nullish(),
|
|
24
|
+
like_count: z.number().nullish(),
|
|
25
|
+
comment_count: z.number().nullish(),
|
|
26
|
+
availability: z.string().nullish(),
|
|
27
|
+
live_status: z.string().nullish(),
|
|
28
|
+
});
|
|
29
|
+
/** `--print 'after_move:%(.{title,filepath})j'`: where yt-dlp put the finished file. */
|
|
30
|
+
export const afterMoveRowSchema = z.object({
|
|
31
|
+
title: z.string().nullish(),
|
|
32
|
+
filepath: z.string().nullish(),
|
|
33
|
+
});
|
|
34
|
+
export const chapterRowSchema = z.object({
|
|
35
|
+
title: z.string(),
|
|
36
|
+
start_time: z.number(),
|
|
37
|
+
end_time: z.number(),
|
|
38
|
+
});
|
|
39
|
+
export const videoDetailsRowSchema = z.object({
|
|
40
|
+
chapters: z.array(chapterRowSchema).nullish(),
|
|
41
|
+
upload_date: z.string().nullish(),
|
|
42
|
+
duration: z.number().nullish(),
|
|
43
|
+
/**
|
|
44
|
+
* The video's real comment count — trustworthy ONLY here, because this read
|
|
45
|
+
* does not pass --write-comments. With that flag yt-dlp replaces the value
|
|
46
|
+
* with the number it extracted (measured: 300 against a video with 2.4M).
|
|
47
|
+
*/
|
|
48
|
+
comment_count: z.number().nullish(),
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* Every field yt-dlp returns for a comment, verified against 2026.08.19.
|
|
52
|
+
*
|
|
53
|
+
* Nine of these were previously dropped on the floor after being paid for:
|
|
54
|
+
* the extraction fetches them either way, so discarding `id` and `parent`
|
|
55
|
+
* meant a thread could not be rebuilt from what we already had.
|
|
56
|
+
*/
|
|
57
|
+
export const commentRowSchema = z.object({
|
|
58
|
+
id: z.string().nullish(),
|
|
59
|
+
author: z.string().nullish(),
|
|
60
|
+
author_id: z.string().nullish(),
|
|
61
|
+
author_url: z.string().nullish(),
|
|
62
|
+
author_thumbnail: z.string().nullish(),
|
|
63
|
+
author_is_uploader: z.boolean().nullish(),
|
|
64
|
+
author_is_verified: z.boolean().nullish(),
|
|
65
|
+
text: z.string().nullish(),
|
|
66
|
+
like_count: z.number().nullish(),
|
|
67
|
+
is_pinned: z.boolean().nullish(),
|
|
68
|
+
is_favorited: z.boolean().nullish(),
|
|
69
|
+
timestamp: z.number().nullish(),
|
|
70
|
+
_time_text: z.string().nullish(),
|
|
71
|
+
/** 'root' for a top-level comment; the parent's id for a reply. */
|
|
72
|
+
parent: z.string().nullish(),
|
|
73
|
+
});
|
|
74
|
+
export const commentsRowSchema = z.object({
|
|
75
|
+
comments: z.array(commentRowSchema).nullish(),
|
|
76
|
+
/**
|
|
77
|
+
* With --write-comments yt-dlp OVERWRITES this with the number extracted,
|
|
78
|
+
* and sets it to null when the extraction was interrupted. So it is a
|
|
79
|
+
* three-state signal about this run, never the video's real total, which
|
|
80
|
+
* only a separate metadata pass can report.
|
|
81
|
+
*/
|
|
82
|
+
comment_count: z.number().nullish(),
|
|
83
|
+
});
|
|
84
|
+
export const formatRowSchema = z.object({
|
|
85
|
+
format_id: z.string(),
|
|
86
|
+
ext: z.string(),
|
|
87
|
+
resolution: z.string().nullish(),
|
|
88
|
+
width: z.number().nullish(),
|
|
89
|
+
height: z.number().nullish(),
|
|
90
|
+
fps: z.number().nullish(),
|
|
91
|
+
vcodec: z.string().nullish(),
|
|
92
|
+
acodec: z.string().nullish(),
|
|
93
|
+
filesize: z.number().nullish(),
|
|
94
|
+
filesize_approx: z.number().nullish(),
|
|
95
|
+
format_note: z.string().nullish(),
|
|
96
|
+
});
|
|
97
|
+
export const formatsRowSchema = z.object({
|
|
98
|
+
formats: z.array(formatRowSchema).nullish(),
|
|
99
|
+
});
|
|
100
|
+
export const captionTracksSchema = z.object({
|
|
101
|
+
subtitles: z.record(z.string(), z.unknown()).nullish(),
|
|
102
|
+
automatic_captions: z.record(z.string(), z.unknown()).nullish(),
|
|
103
|
+
});
|
|
104
|
+
/**
|
|
105
|
+
* yt-dlp's search rows. Only `id` is required — the rest are absent often
|
|
106
|
+
* enough (age-gated entries, deleted uploads still in the index) that treating
|
|
107
|
+
* them as guaranteed is what produced `undefined` in rendered output.
|
|
108
|
+
*/
|
|
109
|
+
export const searchResultSchema = z.object({
|
|
110
|
+
id: z.string(),
|
|
111
|
+
title: z.string().nullish(),
|
|
112
|
+
duration: z.number().nullish(),
|
|
113
|
+
channel: z.string().nullish(),
|
|
114
|
+
view_count: z.number().nullish(),
|
|
115
|
+
url: z.string().nullish(),
|
|
116
|
+
});
|
|
117
|
+
export const channelSearchRowSchema = z.object({
|
|
118
|
+
id: z.string().nullish(),
|
|
119
|
+
title: z.string().nullish(),
|
|
120
|
+
channel: z.string().nullish(),
|
|
121
|
+
channel_id: z.string().nullish(),
|
|
122
|
+
channel_url: z.string().nullish(),
|
|
123
|
+
uploader_id: z.string().nullish(),
|
|
124
|
+
channel_follower_count: z.number().nullish(),
|
|
125
|
+
description: z.string().nullish(),
|
|
126
|
+
});
|
|
127
|
+
export const channelMetaSchema = z.object({
|
|
128
|
+
channel: z.string().nullish(),
|
|
129
|
+
channel_id: z.string().nullish(),
|
|
130
|
+
channel_url: z.string().nullish(),
|
|
131
|
+
uploader_id: z.string().nullish(),
|
|
132
|
+
channel_follower_count: z.number().nullish(),
|
|
133
|
+
description: z.string().nullish(),
|
|
134
|
+
/** Checked by `selectChannelImages`, which tolerates any shape. */
|
|
135
|
+
thumbnails: z.unknown(),
|
|
136
|
+
});
|
|
137
|
+
export const playlistMetaSchema = z.object({
|
|
138
|
+
id: z.string().nullish(),
|
|
139
|
+
title: z.string().nullish(),
|
|
140
|
+
channel: z.string().nullish(),
|
|
141
|
+
channel_url: z.string().nullish(),
|
|
142
|
+
uploader_id: z.string().nullish(),
|
|
143
|
+
playlist_count: z.number().nullish(),
|
|
144
|
+
modified_date: z.string().nullish(),
|
|
145
|
+
webpage_url: z.string().nullish(),
|
|
146
|
+
description: z.string().nullish(),
|
|
147
|
+
});
|
|
148
|
+
//# sourceMappingURL=youtube-schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"youtube-schemas.js","sourceRoot":"","sources":["../../src/utils/youtube-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AAEH,2FAA2F;AAC3F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC7B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACjC,4EAA4E;IAC5E,0DAA0D;IAC1D,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE;IACjB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAChC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAChC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACnC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IAClC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;CAClC,CAAC,CA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,EAAE;IAC7B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACjC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACpC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACnC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;CAClC,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ChannelInfo } from './youtube-channel.js';
|
|
2
|
+
/** Keyword search for videos and channels. */
|
|
3
|
+
export interface SearchResult {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
duration: number;
|
|
7
|
+
durationFormatted: string;
|
|
8
|
+
channel: string;
|
|
9
|
+
viewCount: number;
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function searchVideos(query: string, limit?: number): Promise<SearchResult[]>;
|
|
13
|
+
export declare function searchChannels(query: string, limit?: number): Promise<ChannelInfo[]>;
|
|
14
|
+
//# sourceMappingURL=youtube-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"youtube-search.d.ts","sourceRoot":"","sources":["../../src/utils/youtube-search.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,8CAA8C;AAE9C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAsB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAiBpF;AAED,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAsBrF"}
|