vidnavigator 0.1.2 → 0.1.3

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/dist/index.d.ts CHANGED
@@ -43,6 +43,21 @@ export declare class VidNavigatorClient {
43
43
  file_id: string;
44
44
  message: string;
45
45
  }>;
46
+ getFileUrl(file_id: string): Promise<{
47
+ file_id: string;
48
+ file_url: string;
49
+ }>;
50
+ retryFileProcessing(file_id: string): Promise<{
51
+ file_id: string;
52
+ file_name: string;
53
+ file_status: string;
54
+ message: string;
55
+ }>;
56
+ cancelFileUpload(file_id: string): Promise<{
57
+ file_id: string;
58
+ file_name: string;
59
+ message: string;
60
+ }>;
46
61
  analyzeVideo(payload: {
47
62
  video_url: string;
48
63
  query?: string;
package/dist/index.js CHANGED
@@ -124,6 +124,18 @@ class VidNavigatorClient {
124
124
  const response = await this.request('DELETE', `/file/${file_id}/delete`);
125
125
  return response.data;
126
126
  }
127
+ async getFileUrl(file_id) {
128
+ const response = await this.request('GET', `/file/${file_id}/url`);
129
+ return response.data;
130
+ }
131
+ async retryFileProcessing(file_id) {
132
+ const response = await this.request('POST', `/file/${file_id}/retry`);
133
+ return response.data;
134
+ }
135
+ async cancelFileUpload(file_id) {
136
+ const response = await this.request('POST', `/file/${file_id}/cancel`);
137
+ return response.data;
138
+ }
127
139
  //endregion
128
140
  //region --- Analysis ---
129
141
  async analyzeVideo(payload) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vidnavigator",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
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
@@ -182,6 +182,30 @@ export class VidNavigatorClient {
182
182
  );
183
183
  return response.data;
184
184
  }
185
+
186
+ async getFileUrl(file_id: string): Promise<{ file_id: string; file_url: string }> {
187
+ const response = await this.request<ApiSuccessResponse<{ file_id: string; file_url: string }>>(
188
+ 'GET',
189
+ `/file/${file_id}/url`
190
+ );
191
+ return response.data;
192
+ }
193
+
194
+ async retryFileProcessing(file_id: string): Promise<{ file_id: string; file_name: string; file_status: string; message: string }> {
195
+ const response = await this.request<ApiSuccessResponse<{ file_id: string; file_name: string; file_status: string; message: string }>>(
196
+ 'POST',
197
+ `/file/${file_id}/retry`
198
+ );
199
+ return response.data;
200
+ }
201
+
202
+ async cancelFileUpload(file_id: string): Promise<{ file_id: string; file_name: string; message: string }> {
203
+ const response = await this.request<ApiSuccessResponse<{ file_id: string; file_name: string; message: string }>>(
204
+ 'POST',
205
+ `/file/${file_id}/cancel`
206
+ );
207
+ return response.data;
208
+ }
185
209
  //endregion
186
210
 
187
211
  //region --- Analysis ---