vidnavigator 2.3.0 → 2.3.1

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 CHANGED
@@ -684,7 +684,7 @@ Search YouTube videos and uploaded files with AI-powered ranking/reranking.
684
684
  // Search YouTube videos
685
685
  const videoResults = await vn.searchYouTube({
686
686
  query: 'how to deploy a Node.js app',
687
- focus: 'relevance', // 'relevance' (default) | 'popularity' | 'brevity'
687
+ focus: 'relevance', // 'relevance' (default) | 'recency' | 'popularity' | 'brevity'
688
688
  max_results: 5, // caps how many candidates are analysed (and the cost)
689
689
  include_usage: true, // attach a per-call usage block
690
690
  });
@@ -700,6 +700,15 @@ if (videoResults.status === 'partial') {
700
700
  console.log('Partial results:', videoResults.error_code); // "insufficient_credits_video_search"
701
701
  }
702
702
 
703
+ // The filters combine: the most recent videos of five minutes at most, published since 2025
704
+ const recent = await vn.searchYouTube({
705
+ query: 'how to deploy a Node.js app',
706
+ focus: 'recency',
707
+ duration: 300,
708
+ start_year: 2025,
709
+ max_results: 5,
710
+ });
711
+
703
712
  // Search uploaded files — optionally scoped to a namespace
704
713
  const fileResults = await vn.searchFiles({
705
714
  query: 'quarterly revenue discussion',
@@ -896,7 +905,7 @@ Returns `transcript_analysis` containing:
896
905
  | `searchVideos(payload)` | **Deprecated** — forwards to `searchYouTube()` |
897
906
  | `searchFiles(payload)` | Semantic search across uploaded files, with optional `namespace_ids` scope |
898
907
 
899
- **`searchYouTube` options:** `query` (required), `use_enhanced_search` (default `true`), `start_year`, `end_year`, `focus` (`'relevance'` (default) \| `'popularity'` \| `'brevity'`), `duration`, `max_results` (caps candidates analysed & cost; defaults to your plan ceiling), `include_usage`.
908
+ **`searchYouTube` options:** `query` (required), `use_enhanced_search` (default `true`), `start_year` / `end_year` (only videos published in or after / in or before that year), `focus` (what comes first among the matches: `'relevance'` (default) \| `'recency'` \| `'popularity'` \| `'brevity'`), `duration` (maximum length in seconds; longer videos are left out), `max_results` (caps candidates analysed & cost; defaults to your plan ceiling), `include_usage`.
900
909
 
901
910
  Results include `relevance_score`, `transcript_summary`, `people`, `places`, `key_subjects`, `query_answer`, `timestamps`, and `relevant_text`. If credits run out mid-search the API returns a partial result: `searchYouTube` surfaces it as `{ status: 'partial', error_code: 'insufficient_credits_video_search', results, usage? }` instead of throwing.
902
911
 
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export * from './webhooks';
7
7
  export { Job } from './jobs';
8
8
  export type { TaskStatus, PollableTask, PollOptions, JobOperation, SubmitOptions, RunOptions, JobInfo } from './jobs';
9
9
  /** SDK version (keep in sync with package.json) */
10
- export declare const SDK_VERSION = "2.3.0";
10
+ export declare const SDK_VERSION = "2.3.1";
11
11
  export interface SDKConfig {
12
12
  apiKey: string;
13
13
  baseURL?: string;
@@ -129,13 +129,22 @@ export interface ExtractDataResult {
129
129
  file_info?: FileInfo;
130
130
  usage?: UsageBlock;
131
131
  }
132
- export type YouTubeSearchFocus = 'relevance' | 'popularity' | 'brevity';
132
+ /**
133
+ * What comes first among the videos that match the query: the best matches
134
+ * (`relevance`), the most recent (`recency`), the most viewed (`popularity`)
135
+ * or the shortest (`brevity`).
136
+ */
137
+ export type YouTubeSearchFocus = 'relevance' | 'recency' | 'popularity' | 'brevity';
133
138
  export type SearchYouTubePayload = {
134
139
  query: string;
135
140
  use_enhanced_search?: boolean;
141
+ /** Only videos published in or after this year. */
136
142
  start_year?: number;
143
+ /** Only videos published in or before this year. */
137
144
  end_year?: number;
145
+ /** Defaults to `relevance`. With another value, `explanation` is empty. */
138
146
  focus?: YouTubeSearchFocus;
147
+ /** Maximum duration in seconds: longer videos are left out. */
139
148
  duration?: number;
140
149
  max_results?: number;
141
150
  include_usage?: boolean;
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ __exportStar(require("./webhooks"), exports);
31
31
  var jobs_2 = require("./jobs");
32
32
  Object.defineProperty(exports, "Job", { enumerable: true, get: function () { return jobs_2.Job; } });
33
33
  /** SDK version (keep in sync with package.json) */
34
- exports.SDK_VERSION = '2.3.0';
34
+ exports.SDK_VERSION = '2.3.1';
35
35
  /**
36
36
  * A LIVE room usually answers in 1-5 s, up to ~30 s when the API has to open a TikTok page, and two
37
37
  * minutes at worst. A shorter configured axios timeout is raised to this for that call only.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vidnavigator",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Official JavaScript SDK for the VidNavigator Developer API",
5
5
  "author": "VidNavigator",
6
6
  "license": "Apache-2.0",
package/src/index.ts CHANGED
@@ -65,7 +65,7 @@ export { Job } from './jobs';
65
65
  export type { TaskStatus, PollableTask, PollOptions, JobOperation, SubmitOptions, RunOptions, JobInfo } from './jobs';
66
66
 
67
67
  /** SDK version (keep in sync with package.json) */
68
- export const SDK_VERSION = '2.3.0';
68
+ export const SDK_VERSION = '2.3.1';
69
69
 
70
70
  /**
71
71
  * A LIVE room usually answers in 1-5 s, up to ~30 s when the API has to open a TikTok page, and two
@@ -218,14 +218,23 @@ export interface ExtractDataResult {
218
218
  usage?: UsageBlock;
219
219
  }
220
220
 
221
- export type YouTubeSearchFocus = 'relevance' | 'popularity' | 'brevity';
221
+ /**
222
+ * What comes first among the videos that match the query: the best matches
223
+ * (`relevance`), the most recent (`recency`), the most viewed (`popularity`)
224
+ * or the shortest (`brevity`).
225
+ */
226
+ export type YouTubeSearchFocus = 'relevance' | 'recency' | 'popularity' | 'brevity';
222
227
 
223
228
  export type SearchYouTubePayload = {
224
229
  query: string;
225
230
  use_enhanced_search?: boolean;
231
+ /** Only videos published in or after this year. */
226
232
  start_year?: number;
233
+ /** Only videos published in or before this year. */
227
234
  end_year?: number;
235
+ /** Defaults to `relevance`. With another value, `explanation` is empty. */
228
236
  focus?: YouTubeSearchFocus;
237
+ /** Maximum duration in seconds: longer videos are left out. */
229
238
  duration?: number;
230
239
  max_results?: number;
231
240
  include_usage?: boolean;