@aviaryhq/cloudglue-js 0.4.6 → 0.4.7
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/Files.d.ts +253 -2
- package/dist/generated/Files.js +20 -1
- package/dist/generated/Search.d.ts +10 -0
- package/dist/generated/Search.js +8 -1
- package/dist/generated/Segmentations.d.ts +240 -0
- package/dist/generated/Segments.d.ts +12 -2
- package/dist/generated/Segments.js +16 -6
- package/dist/generated/common.d.ts +140 -0
- package/dist/generated/common.js +11 -1
- package/dist/src/client.d.ts +109 -59
- package/dist/src/client.js +1 -1
- package/dist/src/types.d.ts +42 -0
- package/package.json +1 -1
|
@@ -73,6 +73,7 @@ export type Segmentation = {
|
|
|
73
73
|
segmentation_config: SegmentationConfig;
|
|
74
74
|
thumbnails_config: ThumbnailsConfig;
|
|
75
75
|
total_segments?: number | undefined;
|
|
76
|
+
total_shots?: number | undefined;
|
|
76
77
|
data?: {
|
|
77
78
|
object: "list";
|
|
78
79
|
segments?: Array<{
|
|
@@ -81,11 +82,17 @@ export type Segmentation = {
|
|
|
81
82
|
end_time: number;
|
|
82
83
|
thumbnail_url?: string | undefined;
|
|
83
84
|
}> | undefined;
|
|
85
|
+
shots?: Array<Shot> | undefined;
|
|
84
86
|
total: number;
|
|
85
87
|
limit: number;
|
|
86
88
|
offset: number;
|
|
87
89
|
} | undefined;
|
|
88
90
|
};
|
|
91
|
+
export type Shot = {
|
|
92
|
+
index: number;
|
|
93
|
+
start_time: number;
|
|
94
|
+
end_time: number;
|
|
95
|
+
};
|
|
89
96
|
export type FrameExtractionConfig = {
|
|
90
97
|
strategy: "uniform";
|
|
91
98
|
uniform_config?: FrameExtractionUniformConfig | undefined;
|
|
@@ -1073,6 +1080,19 @@ export declare const File: z.ZodObject<{
|
|
|
1073
1080
|
thumbnail_url: z.ZodOptional<z.ZodString>;
|
|
1074
1081
|
source: z.ZodOptional<z.ZodEnum<["video", "youtube", "s3", "dropbox", "http", "upload", "google-drive", "zoom", "gong"]>>;
|
|
1075
1082
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1083
|
+
export declare const Shot: z.ZodObject<{
|
|
1084
|
+
index: z.ZodNumber;
|
|
1085
|
+
start_time: z.ZodNumber;
|
|
1086
|
+
end_time: z.ZodNumber;
|
|
1087
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1088
|
+
index: z.ZodNumber;
|
|
1089
|
+
start_time: z.ZodNumber;
|
|
1090
|
+
end_time: z.ZodNumber;
|
|
1091
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1092
|
+
index: z.ZodNumber;
|
|
1093
|
+
start_time: z.ZodNumber;
|
|
1094
|
+
end_time: z.ZodNumber;
|
|
1095
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1076
1096
|
export declare const Segmentation: z.ZodObject<{
|
|
1077
1097
|
segmentation_id: z.ZodString;
|
|
1078
1098
|
status: z.ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
|
|
@@ -1279,6 +1299,7 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1279
1299
|
enable_segment_thumbnails: z.ZodBoolean;
|
|
1280
1300
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1281
1301
|
total_segments: z.ZodOptional<z.ZodNumber>;
|
|
1302
|
+
total_shots: z.ZodOptional<z.ZodNumber>;
|
|
1282
1303
|
data: z.ZodOptional<z.ZodObject<{
|
|
1283
1304
|
object: z.ZodLiteral<"list">;
|
|
1284
1305
|
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1297,6 +1318,19 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1297
1318
|
end_time: z.ZodNumber;
|
|
1298
1319
|
thumbnail_url: z.ZodOptional<z.ZodString>;
|
|
1299
1320
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1321
|
+
shots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1322
|
+
index: z.ZodNumber;
|
|
1323
|
+
start_time: z.ZodNumber;
|
|
1324
|
+
end_time: z.ZodNumber;
|
|
1325
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1326
|
+
index: z.ZodNumber;
|
|
1327
|
+
start_time: z.ZodNumber;
|
|
1328
|
+
end_time: z.ZodNumber;
|
|
1329
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1330
|
+
index: z.ZodNumber;
|
|
1331
|
+
start_time: z.ZodNumber;
|
|
1332
|
+
end_time: z.ZodNumber;
|
|
1333
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1300
1334
|
total: z.ZodNumber;
|
|
1301
1335
|
limit: z.ZodNumber;
|
|
1302
1336
|
offset: z.ZodNumber;
|
|
@@ -1318,6 +1352,19 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1318
1352
|
end_time: z.ZodNumber;
|
|
1319
1353
|
thumbnail_url: z.ZodOptional<z.ZodString>;
|
|
1320
1354
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1355
|
+
shots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1356
|
+
index: z.ZodNumber;
|
|
1357
|
+
start_time: z.ZodNumber;
|
|
1358
|
+
end_time: z.ZodNumber;
|
|
1359
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1360
|
+
index: z.ZodNumber;
|
|
1361
|
+
start_time: z.ZodNumber;
|
|
1362
|
+
end_time: z.ZodNumber;
|
|
1363
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1364
|
+
index: z.ZodNumber;
|
|
1365
|
+
start_time: z.ZodNumber;
|
|
1366
|
+
end_time: z.ZodNumber;
|
|
1367
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1321
1368
|
total: z.ZodNumber;
|
|
1322
1369
|
limit: z.ZodNumber;
|
|
1323
1370
|
offset: z.ZodNumber;
|
|
@@ -1339,6 +1386,19 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1339
1386
|
end_time: z.ZodNumber;
|
|
1340
1387
|
thumbnail_url: z.ZodOptional<z.ZodString>;
|
|
1341
1388
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1389
|
+
shots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1390
|
+
index: z.ZodNumber;
|
|
1391
|
+
start_time: z.ZodNumber;
|
|
1392
|
+
end_time: z.ZodNumber;
|
|
1393
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1394
|
+
index: z.ZodNumber;
|
|
1395
|
+
start_time: z.ZodNumber;
|
|
1396
|
+
end_time: z.ZodNumber;
|
|
1397
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1398
|
+
index: z.ZodNumber;
|
|
1399
|
+
start_time: z.ZodNumber;
|
|
1400
|
+
end_time: z.ZodNumber;
|
|
1401
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1342
1402
|
total: z.ZodNumber;
|
|
1343
1403
|
limit: z.ZodNumber;
|
|
1344
1404
|
offset: z.ZodNumber;
|
|
@@ -1549,6 +1609,7 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1549
1609
|
enable_segment_thumbnails: z.ZodBoolean;
|
|
1550
1610
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1551
1611
|
total_segments: z.ZodOptional<z.ZodNumber>;
|
|
1612
|
+
total_shots: z.ZodOptional<z.ZodNumber>;
|
|
1552
1613
|
data: z.ZodOptional<z.ZodObject<{
|
|
1553
1614
|
object: z.ZodLiteral<"list">;
|
|
1554
1615
|
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1567,6 +1628,19 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1567
1628
|
end_time: z.ZodNumber;
|
|
1568
1629
|
thumbnail_url: z.ZodOptional<z.ZodString>;
|
|
1569
1630
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1631
|
+
shots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1632
|
+
index: z.ZodNumber;
|
|
1633
|
+
start_time: z.ZodNumber;
|
|
1634
|
+
end_time: z.ZodNumber;
|
|
1635
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1636
|
+
index: z.ZodNumber;
|
|
1637
|
+
start_time: z.ZodNumber;
|
|
1638
|
+
end_time: z.ZodNumber;
|
|
1639
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1640
|
+
index: z.ZodNumber;
|
|
1641
|
+
start_time: z.ZodNumber;
|
|
1642
|
+
end_time: z.ZodNumber;
|
|
1643
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1570
1644
|
total: z.ZodNumber;
|
|
1571
1645
|
limit: z.ZodNumber;
|
|
1572
1646
|
offset: z.ZodNumber;
|
|
@@ -1588,6 +1662,19 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1588
1662
|
end_time: z.ZodNumber;
|
|
1589
1663
|
thumbnail_url: z.ZodOptional<z.ZodString>;
|
|
1590
1664
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1665
|
+
shots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1666
|
+
index: z.ZodNumber;
|
|
1667
|
+
start_time: z.ZodNumber;
|
|
1668
|
+
end_time: z.ZodNumber;
|
|
1669
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1670
|
+
index: z.ZodNumber;
|
|
1671
|
+
start_time: z.ZodNumber;
|
|
1672
|
+
end_time: z.ZodNumber;
|
|
1673
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1674
|
+
index: z.ZodNumber;
|
|
1675
|
+
start_time: z.ZodNumber;
|
|
1676
|
+
end_time: z.ZodNumber;
|
|
1677
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1591
1678
|
total: z.ZodNumber;
|
|
1592
1679
|
limit: z.ZodNumber;
|
|
1593
1680
|
offset: z.ZodNumber;
|
|
@@ -1609,6 +1696,19 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1609
1696
|
end_time: z.ZodNumber;
|
|
1610
1697
|
thumbnail_url: z.ZodOptional<z.ZodString>;
|
|
1611
1698
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1699
|
+
shots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1700
|
+
index: z.ZodNumber;
|
|
1701
|
+
start_time: z.ZodNumber;
|
|
1702
|
+
end_time: z.ZodNumber;
|
|
1703
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1704
|
+
index: z.ZodNumber;
|
|
1705
|
+
start_time: z.ZodNumber;
|
|
1706
|
+
end_time: z.ZodNumber;
|
|
1707
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1708
|
+
index: z.ZodNumber;
|
|
1709
|
+
start_time: z.ZodNumber;
|
|
1710
|
+
end_time: z.ZodNumber;
|
|
1711
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1612
1712
|
total: z.ZodNumber;
|
|
1613
1713
|
limit: z.ZodNumber;
|
|
1614
1714
|
offset: z.ZodNumber;
|
|
@@ -1819,6 +1919,7 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1819
1919
|
enable_segment_thumbnails: z.ZodBoolean;
|
|
1820
1920
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1821
1921
|
total_segments: z.ZodOptional<z.ZodNumber>;
|
|
1922
|
+
total_shots: z.ZodOptional<z.ZodNumber>;
|
|
1822
1923
|
data: z.ZodOptional<z.ZodObject<{
|
|
1823
1924
|
object: z.ZodLiteral<"list">;
|
|
1824
1925
|
segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1837,6 +1938,19 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1837
1938
|
end_time: z.ZodNumber;
|
|
1838
1939
|
thumbnail_url: z.ZodOptional<z.ZodString>;
|
|
1839
1940
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1941
|
+
shots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1942
|
+
index: z.ZodNumber;
|
|
1943
|
+
start_time: z.ZodNumber;
|
|
1944
|
+
end_time: z.ZodNumber;
|
|
1945
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1946
|
+
index: z.ZodNumber;
|
|
1947
|
+
start_time: z.ZodNumber;
|
|
1948
|
+
end_time: z.ZodNumber;
|
|
1949
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1950
|
+
index: z.ZodNumber;
|
|
1951
|
+
start_time: z.ZodNumber;
|
|
1952
|
+
end_time: z.ZodNumber;
|
|
1953
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1840
1954
|
total: z.ZodNumber;
|
|
1841
1955
|
limit: z.ZodNumber;
|
|
1842
1956
|
offset: z.ZodNumber;
|
|
@@ -1858,6 +1972,19 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1858
1972
|
end_time: z.ZodNumber;
|
|
1859
1973
|
thumbnail_url: z.ZodOptional<z.ZodString>;
|
|
1860
1974
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1975
|
+
shots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1976
|
+
index: z.ZodNumber;
|
|
1977
|
+
start_time: z.ZodNumber;
|
|
1978
|
+
end_time: z.ZodNumber;
|
|
1979
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1980
|
+
index: z.ZodNumber;
|
|
1981
|
+
start_time: z.ZodNumber;
|
|
1982
|
+
end_time: z.ZodNumber;
|
|
1983
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1984
|
+
index: z.ZodNumber;
|
|
1985
|
+
start_time: z.ZodNumber;
|
|
1986
|
+
end_time: z.ZodNumber;
|
|
1987
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1861
1988
|
total: z.ZodNumber;
|
|
1862
1989
|
limit: z.ZodNumber;
|
|
1863
1990
|
offset: z.ZodNumber;
|
|
@@ -1879,6 +2006,19 @@ export declare const Segmentation: z.ZodObject<{
|
|
|
1879
2006
|
end_time: z.ZodNumber;
|
|
1880
2007
|
thumbnail_url: z.ZodOptional<z.ZodString>;
|
|
1881
2008
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
2009
|
+
shots: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2010
|
+
index: z.ZodNumber;
|
|
2011
|
+
start_time: z.ZodNumber;
|
|
2012
|
+
end_time: z.ZodNumber;
|
|
2013
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2014
|
+
index: z.ZodNumber;
|
|
2015
|
+
start_time: z.ZodNumber;
|
|
2016
|
+
end_time: z.ZodNumber;
|
|
2017
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2018
|
+
index: z.ZodNumber;
|
|
2019
|
+
start_time: z.ZodNumber;
|
|
2020
|
+
end_time: z.ZodNumber;
|
|
2021
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1882
2022
|
total: z.ZodNumber;
|
|
1883
2023
|
limit: z.ZodNumber;
|
|
1884
2024
|
offset: z.ZodNumber;
|
package/dist/generated/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FaceBoundingBox = exports.FrameExtraction = exports.FrameExtractionConfig = exports.FrameExtractionThumbnailsConfig = exports.FrameExtractionUniformConfig = exports.DescribeOutput = exports.SpeechOutputPart = exports.DescribeOutputPart = exports.ThumbnailList = exports.Thumbnail = exports.Segmentation = exports.File = exports.FileSegmentationConfig = exports.SegmentationConfig = exports.SegmentationManualConfig = exports.SegmentationShotDetectorConfig = exports.SegmentationUniformConfig = exports.ThumbnailsConfig = void 0;
|
|
3
|
+
exports.FaceBoundingBox = exports.FrameExtraction = exports.FrameExtractionConfig = exports.FrameExtractionThumbnailsConfig = exports.FrameExtractionUniformConfig = exports.DescribeOutput = exports.SpeechOutputPart = exports.DescribeOutputPart = exports.ThumbnailList = exports.Thumbnail = exports.Segmentation = exports.Shot = exports.File = exports.FileSegmentationConfig = exports.SegmentationConfig = exports.SegmentationManualConfig = exports.SegmentationShotDetectorConfig = exports.SegmentationUniformConfig = exports.ThumbnailsConfig = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.ThumbnailsConfig = zod_1.z
|
|
6
6
|
.object({ enable_segment_thumbnails: zod_1.z.boolean() })
|
|
@@ -95,6 +95,14 @@ exports.File = zod_1.z
|
|
|
95
95
|
})
|
|
96
96
|
.strict()
|
|
97
97
|
.passthrough();
|
|
98
|
+
exports.Shot = zod_1.z
|
|
99
|
+
.object({
|
|
100
|
+
index: zod_1.z.number().int(),
|
|
101
|
+
start_time: zod_1.z.number().gte(0),
|
|
102
|
+
end_time: zod_1.z.number().gte(0),
|
|
103
|
+
})
|
|
104
|
+
.strict()
|
|
105
|
+
.passthrough();
|
|
98
106
|
exports.Segmentation = zod_1.z
|
|
99
107
|
.object({
|
|
100
108
|
segmentation_id: zod_1.z.string().uuid(),
|
|
@@ -110,6 +118,7 @@ exports.Segmentation = zod_1.z
|
|
|
110
118
|
segmentation_config: exports.SegmentationConfig,
|
|
111
119
|
thumbnails_config: exports.ThumbnailsConfig,
|
|
112
120
|
total_segments: zod_1.z.number().gte(0).optional(),
|
|
121
|
+
total_shots: zod_1.z.number().gte(0).optional(),
|
|
113
122
|
data: zod_1.z
|
|
114
123
|
.object({
|
|
115
124
|
object: zod_1.z.literal("list"),
|
|
@@ -124,6 +133,7 @@ exports.Segmentation = zod_1.z
|
|
|
124
133
|
.strict()
|
|
125
134
|
.passthrough())
|
|
126
135
|
.optional(),
|
|
136
|
+
shots: zod_1.z.array(exports.Shot).optional(),
|
|
127
137
|
total: zod_1.z.number().int(),
|
|
128
138
|
limit: zod_1.z.number().int(),
|
|
129
139
|
offset: zod_1.z.number().int(),
|
package/dist/src/client.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FilesApi, CollectionsApi, ChatApi, TranscribeApi, ExtractApi, SearchApi, DescribeApi, SegmentsApi, WebhooksApi, FramesApi, Face_DetectionApi, Face_MatchApi } from "../generated";
|
|
2
|
-
import {
|
|
3
|
-
import type { File, NarrativeConfig, SegmentationConfig, ShotConfig, UpdateFileParams } from "./types";
|
|
2
|
+
import type { CloudGlueConfig, File, Filter, ListFilesParams, NarrativeConfig, SearchRequest, SegmentationConfig, ShotConfig, UpdateFileParams } from "./types";
|
|
4
3
|
import { SegmentationsApi } from "../generated/Segmentations";
|
|
5
4
|
import { ThumbnailsConfig, FrameExtractionConfig } from "../generated/common";
|
|
6
5
|
import { WebhookEvents } from './types';
|
|
@@ -11,47 +10,6 @@ export declare class CloudGlueError extends Error {
|
|
|
11
10
|
readonly responseData?: any | undefined;
|
|
12
11
|
constructor(message: string, statusCode?: number | undefined, data?: string | undefined, headers?: Record<string, any> | undefined, responseData?: any | undefined);
|
|
13
12
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Configuration options for initializing the CloudGlue client
|
|
16
|
-
*/
|
|
17
|
-
export interface CloudGlueConfig {
|
|
18
|
-
apiKey?: string;
|
|
19
|
-
baseUrl?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Time limit in milliseconds before we timeout a request
|
|
22
|
-
*/
|
|
23
|
-
timeout?: number;
|
|
24
|
-
}
|
|
25
|
-
export interface Filter {
|
|
26
|
-
metadata?: Array<{
|
|
27
|
-
path: string;
|
|
28
|
-
operator: FilterOperator;
|
|
29
|
-
valueText?: string;
|
|
30
|
-
valueTextArray?: string[];
|
|
31
|
-
}>;
|
|
32
|
-
video_info?: Array<{
|
|
33
|
-
path: "duration_seconds" | "has_audio";
|
|
34
|
-
operator: FilterOperator;
|
|
35
|
-
valueText?: string;
|
|
36
|
-
valueTextArray?: string[];
|
|
37
|
-
}>;
|
|
38
|
-
file?: Array<{
|
|
39
|
-
path: "bytes" | "filename" | "uri" | "created_at" | "id";
|
|
40
|
-
operator: FilterOperator;
|
|
41
|
-
valueText?: string;
|
|
42
|
-
valueTextArray?: string[];
|
|
43
|
-
}>;
|
|
44
|
-
}
|
|
45
|
-
export interface ListFilesParams {
|
|
46
|
-
status?: "pending" | "processing" | "completed" | "failed" | "not_applicable";
|
|
47
|
-
limit?: number;
|
|
48
|
-
offset?: number;
|
|
49
|
-
order?: "created_at" | "filename";
|
|
50
|
-
sort?: "asc" | "desc";
|
|
51
|
-
created_before?: string;
|
|
52
|
-
created_after?: string;
|
|
53
|
-
filter?: Filter;
|
|
54
|
-
}
|
|
55
13
|
interface UploadFileParams {
|
|
56
14
|
file: globalThis.File;
|
|
57
15
|
metadata?: Record<string, any>;
|
|
@@ -172,20 +130,6 @@ interface ChatCompletionParams {
|
|
|
172
130
|
};
|
|
173
131
|
temperature?: number;
|
|
174
132
|
}
|
|
175
|
-
interface SearchParams {
|
|
176
|
-
scope: "file" | "segment" | "face";
|
|
177
|
-
collections: string[];
|
|
178
|
-
query?: string;
|
|
179
|
-
source_image?: {
|
|
180
|
-
url?: string;
|
|
181
|
-
base64?: string;
|
|
182
|
-
};
|
|
183
|
-
limit?: number;
|
|
184
|
-
filter?: Filter;
|
|
185
|
-
threshold?: number;
|
|
186
|
-
group_by_key?: "file";
|
|
187
|
-
sort_by?: "score" | "item_count";
|
|
188
|
-
}
|
|
189
133
|
interface WaitForReadyOptions {
|
|
190
134
|
/** Interval in milliseconds between polling attempts. Defaults to 5000ms (5 seconds). */
|
|
191
135
|
pollingInterval?: number;
|
|
@@ -272,7 +216,15 @@ declare class EnhancedFilesApi {
|
|
|
272
216
|
offset?: number;
|
|
273
217
|
}): Promise<{
|
|
274
218
|
object: "list";
|
|
275
|
-
data: Array<
|
|
219
|
+
data: Array<{
|
|
220
|
+
segmentation_id: string;
|
|
221
|
+
status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
|
|
222
|
+
created_at: number;
|
|
223
|
+
file_id: string;
|
|
224
|
+
segmentation_config: import("../generated/common").SegmentationConfig;
|
|
225
|
+
thumbnails_config: ThumbnailsConfig;
|
|
226
|
+
total_segments?: number | undefined;
|
|
227
|
+
}>;
|
|
276
228
|
total: number;
|
|
277
229
|
limit: number;
|
|
278
230
|
offset: number;
|
|
@@ -519,6 +471,7 @@ declare class EnhancedFilesApi {
|
|
|
519
471
|
enable_segment_thumbnails: import("zod").ZodBoolean;
|
|
520
472
|
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
521
473
|
total_segments: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
474
|
+
total_shots: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
522
475
|
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
523
476
|
object: import("zod").ZodLiteral<"list">;
|
|
524
477
|
segments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -537,6 +490,19 @@ declare class EnhancedFilesApi {
|
|
|
537
490
|
end_time: import("zod").ZodNumber;
|
|
538
491
|
thumbnail_url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
539
492
|
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
493
|
+
shots: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
494
|
+
index: import("zod").ZodNumber;
|
|
495
|
+
start_time: import("zod").ZodNumber;
|
|
496
|
+
end_time: import("zod").ZodNumber;
|
|
497
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
498
|
+
index: import("zod").ZodNumber;
|
|
499
|
+
start_time: import("zod").ZodNumber;
|
|
500
|
+
end_time: import("zod").ZodNumber;
|
|
501
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
502
|
+
index: import("zod").ZodNumber;
|
|
503
|
+
start_time: import("zod").ZodNumber;
|
|
504
|
+
end_time: import("zod").ZodNumber;
|
|
505
|
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
540
506
|
total: import("zod").ZodNumber;
|
|
541
507
|
limit: import("zod").ZodNumber;
|
|
542
508
|
offset: import("zod").ZodNumber;
|
|
@@ -558,6 +524,19 @@ declare class EnhancedFilesApi {
|
|
|
558
524
|
end_time: import("zod").ZodNumber;
|
|
559
525
|
thumbnail_url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
560
526
|
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
527
|
+
shots: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
528
|
+
index: import("zod").ZodNumber;
|
|
529
|
+
start_time: import("zod").ZodNumber;
|
|
530
|
+
end_time: import("zod").ZodNumber;
|
|
531
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
532
|
+
index: import("zod").ZodNumber;
|
|
533
|
+
start_time: import("zod").ZodNumber;
|
|
534
|
+
end_time: import("zod").ZodNumber;
|
|
535
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
536
|
+
index: import("zod").ZodNumber;
|
|
537
|
+
start_time: import("zod").ZodNumber;
|
|
538
|
+
end_time: import("zod").ZodNumber;
|
|
539
|
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
561
540
|
total: import("zod").ZodNumber;
|
|
562
541
|
limit: import("zod").ZodNumber;
|
|
563
542
|
offset: import("zod").ZodNumber;
|
|
@@ -579,6 +558,19 @@ declare class EnhancedFilesApi {
|
|
|
579
558
|
end_time: import("zod").ZodNumber;
|
|
580
559
|
thumbnail_url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
581
560
|
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
561
|
+
shots: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
562
|
+
index: import("zod").ZodNumber;
|
|
563
|
+
start_time: import("zod").ZodNumber;
|
|
564
|
+
end_time: import("zod").ZodNumber;
|
|
565
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
566
|
+
index: import("zod").ZodNumber;
|
|
567
|
+
start_time: import("zod").ZodNumber;
|
|
568
|
+
end_time: import("zod").ZodNumber;
|
|
569
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
570
|
+
index: import("zod").ZodNumber;
|
|
571
|
+
start_time: import("zod").ZodNumber;
|
|
572
|
+
end_time: import("zod").ZodNumber;
|
|
573
|
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
582
574
|
total: import("zod").ZodNumber;
|
|
583
575
|
limit: import("zod").ZodNumber;
|
|
584
576
|
offset: import("zod").ZodNumber;
|
|
@@ -1916,6 +1908,7 @@ declare class EnhancedSegmentationsApi {
|
|
|
1916
1908
|
enable_segment_thumbnails: import("zod").ZodBoolean;
|
|
1917
1909
|
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
1918
1910
|
total_segments: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1911
|
+
total_shots: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1919
1912
|
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1920
1913
|
object: import("zod").ZodLiteral<"list">;
|
|
1921
1914
|
segments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -1934,6 +1927,19 @@ declare class EnhancedSegmentationsApi {
|
|
|
1934
1927
|
end_time: import("zod").ZodNumber;
|
|
1935
1928
|
thumbnail_url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1936
1929
|
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
1930
|
+
shots: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1931
|
+
index: import("zod").ZodNumber;
|
|
1932
|
+
start_time: import("zod").ZodNumber;
|
|
1933
|
+
end_time: import("zod").ZodNumber;
|
|
1934
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
1935
|
+
index: import("zod").ZodNumber;
|
|
1936
|
+
start_time: import("zod").ZodNumber;
|
|
1937
|
+
end_time: import("zod").ZodNumber;
|
|
1938
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
1939
|
+
index: import("zod").ZodNumber;
|
|
1940
|
+
start_time: import("zod").ZodNumber;
|
|
1941
|
+
end_time: import("zod").ZodNumber;
|
|
1942
|
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
1937
1943
|
total: import("zod").ZodNumber;
|
|
1938
1944
|
limit: import("zod").ZodNumber;
|
|
1939
1945
|
offset: import("zod").ZodNumber;
|
|
@@ -1955,6 +1961,19 @@ declare class EnhancedSegmentationsApi {
|
|
|
1955
1961
|
end_time: import("zod").ZodNumber;
|
|
1956
1962
|
thumbnail_url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1957
1963
|
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
1964
|
+
shots: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1965
|
+
index: import("zod").ZodNumber;
|
|
1966
|
+
start_time: import("zod").ZodNumber;
|
|
1967
|
+
end_time: import("zod").ZodNumber;
|
|
1968
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
1969
|
+
index: import("zod").ZodNumber;
|
|
1970
|
+
start_time: import("zod").ZodNumber;
|
|
1971
|
+
end_time: import("zod").ZodNumber;
|
|
1972
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
1973
|
+
index: import("zod").ZodNumber;
|
|
1974
|
+
start_time: import("zod").ZodNumber;
|
|
1975
|
+
end_time: import("zod").ZodNumber;
|
|
1976
|
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
1958
1977
|
total: import("zod").ZodNumber;
|
|
1959
1978
|
limit: import("zod").ZodNumber;
|
|
1960
1979
|
offset: import("zod").ZodNumber;
|
|
@@ -1976,6 +1995,19 @@ declare class EnhancedSegmentationsApi {
|
|
|
1976
1995
|
end_time: import("zod").ZodNumber;
|
|
1977
1996
|
thumbnail_url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1978
1997
|
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
1998
|
+
shots: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1999
|
+
index: import("zod").ZodNumber;
|
|
2000
|
+
start_time: import("zod").ZodNumber;
|
|
2001
|
+
end_time: import("zod").ZodNumber;
|
|
2002
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
2003
|
+
index: import("zod").ZodNumber;
|
|
2004
|
+
start_time: import("zod").ZodNumber;
|
|
2005
|
+
end_time: import("zod").ZodNumber;
|
|
2006
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
2007
|
+
index: import("zod").ZodNumber;
|
|
2008
|
+
start_time: import("zod").ZodNumber;
|
|
2009
|
+
end_time: import("zod").ZodNumber;
|
|
2010
|
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">>;
|
|
1979
2011
|
total: import("zod").ZodNumber;
|
|
1980
2012
|
limit: import("zod").ZodNumber;
|
|
1981
2013
|
offset: import("zod").ZodNumber;
|
|
@@ -2026,13 +2058,14 @@ declare class EnhancedSegmentationsApi {
|
|
|
2026
2058
|
declare class EnhancedSearchApi {
|
|
2027
2059
|
private readonly api;
|
|
2028
2060
|
constructor(api: typeof SearchApi);
|
|
2029
|
-
searchContent(params:
|
|
2061
|
+
searchContent(params: SearchRequest): Promise<{
|
|
2030
2062
|
id: string;
|
|
2031
2063
|
object: "search";
|
|
2032
2064
|
query?: string | undefined;
|
|
2033
2065
|
scope: "file" | "segment" | "face";
|
|
2034
2066
|
group_by_key?: "file" | undefined;
|
|
2035
2067
|
group_count?: number | undefined;
|
|
2068
|
+
search_modalities?: ("general_content" | "speech_lexical" | "ocr_lexical")[] | undefined;
|
|
2036
2069
|
results: Array<{
|
|
2037
2070
|
type: "file";
|
|
2038
2071
|
file_id: string;
|
|
@@ -2322,6 +2355,8 @@ declare class EnhancedSegmentsApi {
|
|
|
2322
2355
|
prompt: string;
|
|
2323
2356
|
strategy: "comprehensive" | "balanced";
|
|
2324
2357
|
number_of_chapters: number;
|
|
2358
|
+
min_chapters: number;
|
|
2359
|
+
max_chapters: number;
|
|
2325
2360
|
}> | undefined;
|
|
2326
2361
|
}>;
|
|
2327
2362
|
total: number;
|
|
@@ -2344,14 +2379,19 @@ declare class EnhancedSegmentsApi {
|
|
|
2344
2379
|
prompt: string;
|
|
2345
2380
|
strategy: "comprehensive" | "balanced";
|
|
2346
2381
|
number_of_chapters: number;
|
|
2382
|
+
min_chapters: number;
|
|
2383
|
+
max_chapters: number;
|
|
2347
2384
|
}> | undefined;
|
|
2348
2385
|
total_segments?: number | undefined;
|
|
2386
|
+
total_shots?: number | undefined;
|
|
2349
2387
|
segments?: Array<{
|
|
2350
2388
|
start_time: number;
|
|
2351
2389
|
end_time: number;
|
|
2352
2390
|
description?: string | undefined;
|
|
2353
2391
|
thumbnail_url?: string | undefined;
|
|
2392
|
+
shot_index?: number | undefined;
|
|
2354
2393
|
}> | undefined;
|
|
2394
|
+
shots?: Array<import("../generated/common").Shot> | undefined;
|
|
2355
2395
|
}>;
|
|
2356
2396
|
createSegmentJob(params: {
|
|
2357
2397
|
url: string;
|
|
@@ -2374,14 +2414,19 @@ declare class EnhancedSegmentsApi {
|
|
|
2374
2414
|
prompt: string;
|
|
2375
2415
|
strategy: "comprehensive" | "balanced";
|
|
2376
2416
|
number_of_chapters: number;
|
|
2417
|
+
min_chapters: number;
|
|
2418
|
+
max_chapters: number;
|
|
2377
2419
|
}> | undefined;
|
|
2378
2420
|
total_segments?: number | undefined;
|
|
2421
|
+
total_shots?: number | undefined;
|
|
2379
2422
|
segments?: Array<{
|
|
2380
2423
|
start_time: number;
|
|
2381
2424
|
end_time: number;
|
|
2382
2425
|
description?: string | undefined;
|
|
2383
2426
|
thumbnail_url?: string | undefined;
|
|
2427
|
+
shot_index?: number | undefined;
|
|
2384
2428
|
}> | undefined;
|
|
2429
|
+
shots?: Array<import("../generated/common").Shot> | undefined;
|
|
2385
2430
|
}>;
|
|
2386
2431
|
deleteSegmentJob(jobId: string): Promise<import("zod").objectOutputType<{
|
|
2387
2432
|
id: import("zod").ZodString;
|
|
@@ -2402,14 +2447,19 @@ declare class EnhancedSegmentsApi {
|
|
|
2402
2447
|
prompt: string;
|
|
2403
2448
|
strategy: "comprehensive" | "balanced";
|
|
2404
2449
|
number_of_chapters: number;
|
|
2450
|
+
min_chapters: number;
|
|
2451
|
+
max_chapters: number;
|
|
2405
2452
|
}> | undefined;
|
|
2406
2453
|
total_segments?: number | undefined;
|
|
2454
|
+
total_shots?: number | undefined;
|
|
2407
2455
|
segments?: Array<{
|
|
2408
2456
|
start_time: number;
|
|
2409
2457
|
end_time: number;
|
|
2410
2458
|
description?: string | undefined;
|
|
2411
2459
|
thumbnail_url?: string | undefined;
|
|
2460
|
+
shot_index?: number | undefined;
|
|
2412
2461
|
}> | undefined;
|
|
2462
|
+
shots?: Array<import("../generated/common").Shot> | undefined;
|
|
2413
2463
|
}>;
|
|
2414
2464
|
}
|
|
2415
2465
|
declare class EnhancedWebhooksApi {
|
package/dist/src/client.js
CHANGED
package/dist/src/types.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { schemas as webhooksSchemas } from '../generated/Webhooks';
|
|
|
11
11
|
import { FrameExtraction } from '../generated/common';
|
|
12
12
|
import { schemas as faceDetectionSchemas } from '../generated/Face_Detection';
|
|
13
13
|
import { schemas as faceMatchSchemas } from '../generated/Face_Match';
|
|
14
|
+
import { FilterOperator } from './enums';
|
|
14
15
|
/**
|
|
15
16
|
* Represents a video file in the Cloudglue system
|
|
16
17
|
* Contains metadata about the file including its status, size, and video information
|
|
@@ -213,3 +214,44 @@ export type EnhancedSourceImage = {
|
|
|
213
214
|
base64_image?: string;
|
|
214
215
|
file_path?: string;
|
|
215
216
|
};
|
|
217
|
+
/**
|
|
218
|
+
* Configuration options for initializing the CloudGlue client
|
|
219
|
+
*/
|
|
220
|
+
export interface CloudGlueConfig {
|
|
221
|
+
apiKey?: string;
|
|
222
|
+
baseUrl?: string;
|
|
223
|
+
/**
|
|
224
|
+
* Time limit in milliseconds before we timeout a request
|
|
225
|
+
*/
|
|
226
|
+
timeout?: number;
|
|
227
|
+
}
|
|
228
|
+
export interface Filter {
|
|
229
|
+
metadata?: Array<{
|
|
230
|
+
path: string;
|
|
231
|
+
operator: FilterOperator;
|
|
232
|
+
valueText?: string;
|
|
233
|
+
valueTextArray?: string[];
|
|
234
|
+
}>;
|
|
235
|
+
video_info?: Array<{
|
|
236
|
+
path: "duration_seconds" | "has_audio";
|
|
237
|
+
operator: FilterOperator;
|
|
238
|
+
valueText?: string;
|
|
239
|
+
valueTextArray?: string[];
|
|
240
|
+
}>;
|
|
241
|
+
file?: Array<{
|
|
242
|
+
path: "bytes" | "filename" | "uri" | "created_at" | "id";
|
|
243
|
+
operator: FilterOperator;
|
|
244
|
+
valueText?: string;
|
|
245
|
+
valueTextArray?: string[];
|
|
246
|
+
}>;
|
|
247
|
+
}
|
|
248
|
+
export interface ListFilesParams {
|
|
249
|
+
status?: "pending" | "processing" | "completed" | "failed" | "not_applicable";
|
|
250
|
+
limit?: number;
|
|
251
|
+
offset?: number;
|
|
252
|
+
order?: "created_at" | "filename";
|
|
253
|
+
sort?: "asc" | "desc";
|
|
254
|
+
created_before?: string;
|
|
255
|
+
created_after?: string;
|
|
256
|
+
filter?: Filter;
|
|
257
|
+
}
|