@aviaryhq/cloudglue-js 0.4.11 → 0.4.13
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/generated/Chat.d.ts +8 -8
- package/dist/generated/Chat.js +30 -30
- package/dist/generated/Collections.d.ts +25 -23
- package/dist/generated/Collections.js +266 -264
- package/dist/generated/Describe.d.ts +7 -7
- package/dist/generated/Describe.js +58 -58
- package/dist/generated/Extract.d.ts +6 -6
- package/dist/generated/Extract.js +52 -52
- package/dist/generated/Face_Detection.d.ts +6 -6
- package/dist/generated/Face_Detection.js +25 -25
- package/dist/generated/Face_Match.d.ts +6 -6
- package/dist/generated/Face_Match.js +26 -26
- package/dist/generated/Files.d.ts +1009 -10
- package/dist/generated/Files.js +247 -115
- package/dist/generated/Frames.d.ts +2 -2
- package/dist/generated/Frames.js +17 -17
- package/dist/generated/Search.d.ts +212 -19
- package/dist/generated/Search.js +143 -30
- package/dist/generated/Segmentations.d.ts +208 -2
- package/dist/generated/Segmentations.js +34 -29
- package/dist/generated/Segments.d.ts +13 -13
- package/dist/generated/Segments.js +49 -49
- package/dist/generated/Tags.d.ts +660 -0
- package/dist/generated/Tags.js +160 -0
- package/dist/generated/Transcribe.d.ts +7 -7
- package/dist/generated/Transcribe.js +46 -46
- package/dist/generated/Webhooks.d.ts +5 -5
- package/dist/generated/Webhooks.js +61 -61
- package/dist/generated/common.d.ts +391 -11
- package/dist/generated/common.js +63 -28
- package/dist/generated/index.d.ts +14 -13
- package/dist/generated/index.js +3 -1
- package/dist/src/api/chat-completion.api.d.ts +38 -0
- package/dist/src/api/chat-completion.api.js +15 -0
- package/dist/src/api/collections.api.d.ts +666 -0
- package/dist/src/api/collections.api.js +134 -0
- package/dist/src/api/describe.api.d.ts +153 -0
- package/dist/src/api/describe.api.js +57 -0
- package/dist/src/api/extract.api.d.ts +144 -0
- package/dist/src/api/extract.api.js +55 -0
- package/dist/src/api/face-detection.api.d.ts +77 -0
- package/dist/src/api/face-detection.api.js +41 -0
- package/dist/src/api/face-match.api.d.ts +94 -0
- package/dist/src/api/face-match.api.js +41 -0
- package/dist/src/api/files.api.d.ts +705 -0
- package/dist/src/api/files.api.js +146 -0
- package/dist/src/api/frame-extraction.api.d.ts +264 -0
- package/dist/src/api/frame-extraction.api.js +37 -0
- package/dist/src/api/search.api.d.ts +316 -0
- package/dist/src/api/search.api.js +22 -0
- package/dist/src/api/segmentations.api.d.ts +395 -0
- package/dist/src/api/segmentations.api.js +36 -0
- package/dist/src/api/segments.api.d.ts +141 -0
- package/dist/src/api/segments.api.js +40 -0
- package/dist/src/api/tags.api.d.ts +71 -0
- package/dist/src/api/tags.api.js +31 -0
- package/dist/src/api/transcribe.api.d.ts +150 -0
- package/dist/src/api/transcribe.api.js +65 -0
- package/dist/src/api/webhooks.api.d.ts +69 -0
- package/dist/src/api/webhooks.api.js +28 -0
- package/dist/src/client.d.ts +20 -2967
- package/dist/src/client.js +55 -643
- package/dist/src/error.d.ts +7 -0
- package/dist/src/error.js +14 -0
- package/dist/src/types.d.ts +20 -8
- package/package.json +2 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare class CloudGlueError extends Error {
|
|
2
|
+
readonly statusCode?: number | undefined;
|
|
3
|
+
readonly data?: string | undefined;
|
|
4
|
+
readonly headers?: Record<string, any> | undefined;
|
|
5
|
+
readonly responseData?: any | undefined;
|
|
6
|
+
constructor(message: string, statusCode?: number | undefined, data?: string | undefined, headers?: Record<string, any> | undefined, responseData?: any | undefined);
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloudGlueError = void 0;
|
|
4
|
+
class CloudGlueError extends Error {
|
|
5
|
+
constructor(message, statusCode, data, headers, responseData) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.statusCode = statusCode;
|
|
8
|
+
this.data = data;
|
|
9
|
+
this.headers = headers;
|
|
10
|
+
this.responseData = responseData;
|
|
11
|
+
this.name = 'CloudGlueError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.CloudGlueError = CloudGlueError;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
+
import { ListVideoTagsResponse, VideoTag } from '../generated/common';
|
|
2
3
|
import { schemas as collectionsSchemas } from '../generated/Collections';
|
|
3
4
|
import { schemas as chatSchemas } from '../generated/Chat';
|
|
4
5
|
import { schemas as transcribeSchemas } from '../generated/Transcribe';
|
|
@@ -12,6 +13,7 @@ import { FrameExtraction } from '../generated/common';
|
|
|
12
13
|
import { schemas as faceDetectionSchemas } from '../generated/Face_Detection';
|
|
13
14
|
import { schemas as faceMatchSchemas } from '../generated/Face_Match';
|
|
14
15
|
import { FilterOperator } from './enums';
|
|
16
|
+
import { schemas as tagsSchemas } from '../generated/Tags';
|
|
15
17
|
/**
|
|
16
18
|
* Represents a video file in the Cloudglue system
|
|
17
19
|
* Contains metadata about the file including its status, size, and video information
|
|
@@ -61,7 +63,7 @@ export type CollectionVideoEntities = z.infer<typeof collectionsSchemas.FileEnti
|
|
|
61
63
|
* Used for interacting with videos through natural language
|
|
62
64
|
*/
|
|
63
65
|
export type ChatMessage = {
|
|
64
|
-
role:
|
|
66
|
+
role: 'system' | 'user' | 'assistant';
|
|
65
67
|
content: string;
|
|
66
68
|
name?: string;
|
|
67
69
|
};
|
|
@@ -169,7 +171,7 @@ export type CollectionMediaDescriptionsList = z.infer<typeof collectionsSchemas.
|
|
|
169
171
|
export type FileFaceDetections = z.infer<typeof collectionsSchemas.FileFaceDetections>;
|
|
170
172
|
export type NarrativeConfig = z.infer<typeof segmentsSchemas.NarrativeConfig>;
|
|
171
173
|
export type ShotConfig = z.infer<typeof segmentsSchemas.ShotConfig>;
|
|
172
|
-
export type WebhookEvents = z.infer<typeof webhooksSchemas['WebhookEvents']>;
|
|
174
|
+
export type WebhookEvents = z.infer<(typeof webhooksSchemas)['WebhookEvents']>;
|
|
173
175
|
/**
|
|
174
176
|
* Represents a frame extraction job
|
|
175
177
|
*/
|
|
@@ -177,7 +179,7 @@ export type { FrameExtraction };
|
|
|
177
179
|
/**
|
|
178
180
|
* Configuration for frame extraction
|
|
179
181
|
*/
|
|
180
|
-
export type { FrameExtractionConfig, FrameExtractionUniformConfig, FrameExtractionThumbnailsConfig } from '../generated/common';
|
|
182
|
+
export type { FrameExtractionConfig, FrameExtractionUniformConfig, FrameExtractionThumbnailsConfig, } from '../generated/common';
|
|
181
183
|
/**
|
|
182
184
|
* Represents a face detection job
|
|
183
185
|
*/
|
|
@@ -233,26 +235,36 @@ export interface Filter {
|
|
|
233
235
|
valueTextArray?: string[];
|
|
234
236
|
}>;
|
|
235
237
|
video_info?: Array<{
|
|
236
|
-
path:
|
|
238
|
+
path: 'duration_seconds' | 'has_audio';
|
|
237
239
|
operator: FilterOperator;
|
|
238
240
|
valueText?: string;
|
|
239
241
|
valueTextArray?: string[];
|
|
240
242
|
}>;
|
|
241
243
|
file?: Array<{
|
|
242
|
-
path:
|
|
244
|
+
path: 'bytes' | 'filename' | 'uri' | 'created_at' | 'id';
|
|
243
245
|
operator: FilterOperator;
|
|
244
246
|
valueText?: string;
|
|
245
247
|
valueTextArray?: string[];
|
|
246
248
|
}>;
|
|
247
249
|
}
|
|
248
250
|
export interface ListFilesParams {
|
|
249
|
-
status?:
|
|
251
|
+
status?: 'pending' | 'processing' | 'completed' | 'failed' | 'not_applicable';
|
|
250
252
|
limit?: number;
|
|
251
253
|
offset?: number;
|
|
252
|
-
order?:
|
|
253
|
-
sort?:
|
|
254
|
+
order?: 'created_at' | 'filename';
|
|
255
|
+
sort?: 'asc' | 'desc';
|
|
254
256
|
created_before?: string;
|
|
255
257
|
created_after?: string;
|
|
256
258
|
filter?: Filter;
|
|
257
259
|
}
|
|
258
260
|
export type DefaultSegmentationConfig = z.infer<typeof collectionsSchemas.DefaultSegmentationConfig>;
|
|
261
|
+
export type WaitForReadyOptions = {
|
|
262
|
+
/** Interval in milliseconds between polling attempts. Defaults to 5000ms (5 seconds). */
|
|
263
|
+
pollingInterval?: number;
|
|
264
|
+
/** Maximum number of polling attempts before giving up. Defaults to 36 (3 minutes total with default interval). */
|
|
265
|
+
maxAttempts?: number;
|
|
266
|
+
};
|
|
267
|
+
export type ThumbnailType = 'segment' | 'keyframe' | 'file' | 'frame';
|
|
268
|
+
export type CreateVideoTagParams = z.infer<typeof tagsSchemas.CreateVideoTagRequest>;
|
|
269
|
+
export type UpdateVideoTagParams = z.infer<typeof tagsSchemas.UpdateVideoTagRequest>;
|
|
270
|
+
export type { ListVideoTagsResponse, VideoTag };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aviaryhq/cloudglue-js",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.13",
|
|
4
4
|
"description": "Cloudglue API client for Node.js",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^20.0.0",
|
|
41
41
|
"openapi-zod-client": "^1.18.3",
|
|
42
|
+
"prettier": "^3.7.4",
|
|
42
43
|
"rimraf": "^6.1.2",
|
|
43
44
|
"typescript": "^5.3.3"
|
|
44
45
|
},
|