@aviaryhq/cloudglue-js 0.4.0 → 0.4.2
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/Collections.d.ts +785 -4
- package/dist/generated/Collections.js +148 -1
- package/dist/generated/Search.d.ts +85 -14
- package/dist/generated/Search.js +37 -6
- package/dist/generated/Segments.d.ts +21 -3
- package/dist/generated/Segments.js +35 -4
- package/dist/src/client.d.ts +173 -18
- package/dist/src/client.js +7 -1
- package/dist/src/types.d.ts +8 -0
- package/package.json +1 -1
package/dist/src/client.d.ts
CHANGED
|
@@ -65,10 +65,10 @@ interface ListCollectionParams {
|
|
|
65
65
|
offset?: number;
|
|
66
66
|
order?: "name" | "created_at";
|
|
67
67
|
sort?: "asc" | "desc";
|
|
68
|
-
collection_type?: "entities" | "rich-transcripts" | "media-descriptions";
|
|
68
|
+
collection_type?: "entities" | "rich-transcripts" | "media-descriptions" | "face-analysis";
|
|
69
69
|
}
|
|
70
70
|
interface CreateCollectionParams {
|
|
71
|
-
collection_type: "entities" | "rich-transcripts" | "media-descriptions";
|
|
71
|
+
collection_type: "entities" | "rich-transcripts" | "media-descriptions" | "face-analysis";
|
|
72
72
|
name: string;
|
|
73
73
|
description?: string;
|
|
74
74
|
extract_config?: {
|
|
@@ -93,6 +93,18 @@ interface CreateCollectionParams {
|
|
|
93
93
|
};
|
|
94
94
|
default_segmentation_config?: SegmentationConfig;
|
|
95
95
|
default_thumbnails_config?: ThumbnailsConfig;
|
|
96
|
+
face_detection_config?: {
|
|
97
|
+
frame_extraction_config: {
|
|
98
|
+
strategy: "uniform";
|
|
99
|
+
uniform_config?: {
|
|
100
|
+
frames_per_second?: number;
|
|
101
|
+
max_width?: number;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
thumbnails_config?: {
|
|
105
|
+
enable_frame_thumbnails?: boolean;
|
|
106
|
+
};
|
|
107
|
+
} | null;
|
|
96
108
|
}
|
|
97
109
|
interface ListCollectionVideosParams {
|
|
98
110
|
limit?: number;
|
|
@@ -161,9 +173,13 @@ interface ChatCompletionParams {
|
|
|
161
173
|
temperature?: number;
|
|
162
174
|
}
|
|
163
175
|
interface SearchParams {
|
|
164
|
-
scope: "file" | "segment";
|
|
176
|
+
scope: "file" | "segment" | "face";
|
|
165
177
|
collections: string[];
|
|
166
|
-
query
|
|
178
|
+
query?: string;
|
|
179
|
+
source_image?: {
|
|
180
|
+
url?: string;
|
|
181
|
+
base64?: string;
|
|
182
|
+
};
|
|
167
183
|
limit?: number;
|
|
168
184
|
filter?: Filter;
|
|
169
185
|
}
|
|
@@ -183,7 +199,7 @@ declare class EnhancedFilesApi {
|
|
|
183
199
|
limit: number;
|
|
184
200
|
offset: number;
|
|
185
201
|
}>;
|
|
186
|
-
uploadFile(params: UploadFileParams): Promise<import("axios").AxiosResponse<any, any
|
|
202
|
+
uploadFile(params: UploadFileParams): Promise<import("axios").AxiosResponse<any, any>>;
|
|
187
203
|
getFile(fileId: string): Promise<import("zod").objectOutputType<{
|
|
188
204
|
id: import("zod").ZodString;
|
|
189
205
|
status: import("zod").ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
|
|
@@ -639,7 +655,7 @@ declare class EnhancedCollectionsApi {
|
|
|
639
655
|
object: "collection";
|
|
640
656
|
name: string;
|
|
641
657
|
description?: (string | null) | undefined;
|
|
642
|
-
collection_type: "media-descriptions" | "entities" | "rich-transcripts";
|
|
658
|
+
collection_type: "media-descriptions" | "entities" | "rich-transcripts" | "face-analysis";
|
|
643
659
|
extract_config?: Partial<{
|
|
644
660
|
prompt: string;
|
|
645
661
|
schema: {};
|
|
@@ -662,6 +678,18 @@ declare class EnhancedCollectionsApi {
|
|
|
662
678
|
}> | undefined;
|
|
663
679
|
default_segmentation_config?: import("../generated/common").SegmentationConfig | undefined;
|
|
664
680
|
default_thumbnails_config?: ThumbnailsConfig | undefined;
|
|
681
|
+
face_detection_config?: Partial<{
|
|
682
|
+
frame_extraction_config: {
|
|
683
|
+
strategy: "uniform";
|
|
684
|
+
uniform_config?: Partial<{
|
|
685
|
+
frames_per_second: number;
|
|
686
|
+
max_width: number;
|
|
687
|
+
}> | undefined;
|
|
688
|
+
};
|
|
689
|
+
thumbnails_config: Partial<{
|
|
690
|
+
enable_frame_thumbnails: boolean;
|
|
691
|
+
}>;
|
|
692
|
+
}> | null | undefined;
|
|
665
693
|
created_at: number;
|
|
666
694
|
file_count: number;
|
|
667
695
|
}>;
|
|
@@ -674,7 +702,7 @@ declare class EnhancedCollectionsApi {
|
|
|
674
702
|
object: "collection";
|
|
675
703
|
name: string;
|
|
676
704
|
description?: (string | null) | undefined;
|
|
677
|
-
collection_type: "media-descriptions" | "entities" | "rich-transcripts";
|
|
705
|
+
collection_type: "media-descriptions" | "entities" | "rich-transcripts" | "face-analysis";
|
|
678
706
|
extract_config?: Partial<{
|
|
679
707
|
prompt: string;
|
|
680
708
|
schema: {};
|
|
@@ -697,6 +725,18 @@ declare class EnhancedCollectionsApi {
|
|
|
697
725
|
}> | undefined;
|
|
698
726
|
default_segmentation_config?: import("../generated/common").SegmentationConfig | undefined;
|
|
699
727
|
default_thumbnails_config?: ThumbnailsConfig | undefined;
|
|
728
|
+
face_detection_config?: Partial<{
|
|
729
|
+
frame_extraction_config: {
|
|
730
|
+
strategy: "uniform";
|
|
731
|
+
uniform_config?: Partial<{
|
|
732
|
+
frames_per_second: number;
|
|
733
|
+
max_width: number;
|
|
734
|
+
}> | undefined;
|
|
735
|
+
};
|
|
736
|
+
thumbnails_config: Partial<{
|
|
737
|
+
enable_frame_thumbnails: boolean;
|
|
738
|
+
}>;
|
|
739
|
+
}> | null | undefined;
|
|
700
740
|
created_at: number;
|
|
701
741
|
file_count: number;
|
|
702
742
|
}>;
|
|
@@ -705,7 +745,7 @@ declare class EnhancedCollectionsApi {
|
|
|
705
745
|
object: "collection";
|
|
706
746
|
name: string;
|
|
707
747
|
description?: (string | null) | undefined;
|
|
708
|
-
collection_type: "media-descriptions" | "entities" | "rich-transcripts";
|
|
748
|
+
collection_type: "media-descriptions" | "entities" | "rich-transcripts" | "face-analysis";
|
|
709
749
|
extract_config?: Partial<{
|
|
710
750
|
prompt: string;
|
|
711
751
|
schema: {};
|
|
@@ -728,6 +768,18 @@ declare class EnhancedCollectionsApi {
|
|
|
728
768
|
}> | undefined;
|
|
729
769
|
default_segmentation_config?: import("../generated/common").SegmentationConfig | undefined;
|
|
730
770
|
default_thumbnails_config?: ThumbnailsConfig | undefined;
|
|
771
|
+
face_detection_config?: Partial<{
|
|
772
|
+
frame_extraction_config: {
|
|
773
|
+
strategy: "uniform";
|
|
774
|
+
uniform_config?: Partial<{
|
|
775
|
+
frames_per_second: number;
|
|
776
|
+
max_width: number;
|
|
777
|
+
}> | undefined;
|
|
778
|
+
};
|
|
779
|
+
thumbnails_config: Partial<{
|
|
780
|
+
enable_frame_thumbnails: boolean;
|
|
781
|
+
}>;
|
|
782
|
+
}> | null | undefined;
|
|
731
783
|
created_at: number;
|
|
732
784
|
file_count: number;
|
|
733
785
|
}>;
|
|
@@ -743,7 +795,7 @@ declare class EnhancedCollectionsApi {
|
|
|
743
795
|
object: "collection";
|
|
744
796
|
name: string;
|
|
745
797
|
description?: (string | null) | undefined;
|
|
746
|
-
collection_type: "media-descriptions" | "entities" | "rich-transcripts";
|
|
798
|
+
collection_type: "media-descriptions" | "entities" | "rich-transcripts" | "face-analysis";
|
|
747
799
|
extract_config?: Partial<{
|
|
748
800
|
prompt: string;
|
|
749
801
|
schema: {};
|
|
@@ -766,6 +818,18 @@ declare class EnhancedCollectionsApi {
|
|
|
766
818
|
}> | undefined;
|
|
767
819
|
default_segmentation_config?: import("../generated/common").SegmentationConfig | undefined;
|
|
768
820
|
default_thumbnails_config?: ThumbnailsConfig | undefined;
|
|
821
|
+
face_detection_config?: Partial<{
|
|
822
|
+
frame_extraction_config: {
|
|
823
|
+
strategy: "uniform";
|
|
824
|
+
uniform_config?: Partial<{
|
|
825
|
+
frames_per_second: number;
|
|
826
|
+
max_width: number;
|
|
827
|
+
}> | undefined;
|
|
828
|
+
};
|
|
829
|
+
thumbnails_config: Partial<{
|
|
830
|
+
enable_frame_thumbnails: boolean;
|
|
831
|
+
}>;
|
|
832
|
+
}> | null | undefined;
|
|
769
833
|
created_at: number;
|
|
770
834
|
file_count: number;
|
|
771
835
|
}>;
|
|
@@ -1094,6 +1158,80 @@ declare class EnhancedCollectionsApi {
|
|
|
1094
1158
|
speech: Array<import("../generated/common").SpeechOutputPart>;
|
|
1095
1159
|
audio_description: Array<import("../generated/common").DescribeOutputPart>;
|
|
1096
1160
|
}>>;
|
|
1161
|
+
getFaceDetections(collectionId: string, fileId: string, params?: {
|
|
1162
|
+
limit?: number;
|
|
1163
|
+
offset?: number;
|
|
1164
|
+
}): Promise<import("zod").objectOutputType<{
|
|
1165
|
+
collection_id: import("zod").ZodString;
|
|
1166
|
+
file_id: import("zod").ZodString;
|
|
1167
|
+
faces: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1168
|
+
id: import("zod").ZodString;
|
|
1169
|
+
face_bounding_box: import("zod").ZodObject<{
|
|
1170
|
+
height: import("zod").ZodNumber;
|
|
1171
|
+
width: import("zod").ZodNumber;
|
|
1172
|
+
top: import("zod").ZodNumber;
|
|
1173
|
+
left: import("zod").ZodNumber;
|
|
1174
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
1175
|
+
height: import("zod").ZodNumber;
|
|
1176
|
+
width: import("zod").ZodNumber;
|
|
1177
|
+
top: import("zod").ZodNumber;
|
|
1178
|
+
left: import("zod").ZodNumber;
|
|
1179
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
1180
|
+
height: import("zod").ZodNumber;
|
|
1181
|
+
width: import("zod").ZodNumber;
|
|
1182
|
+
top: import("zod").ZodNumber;
|
|
1183
|
+
left: import("zod").ZodNumber;
|
|
1184
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
1185
|
+
frame_id: import("zod").ZodString;
|
|
1186
|
+
timestamp: import("zod").ZodNumber;
|
|
1187
|
+
thumbnail_url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1188
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
1189
|
+
id: import("zod").ZodString;
|
|
1190
|
+
face_bounding_box: import("zod").ZodObject<{
|
|
1191
|
+
height: import("zod").ZodNumber;
|
|
1192
|
+
width: import("zod").ZodNumber;
|
|
1193
|
+
top: import("zod").ZodNumber;
|
|
1194
|
+
left: import("zod").ZodNumber;
|
|
1195
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
1196
|
+
height: import("zod").ZodNumber;
|
|
1197
|
+
width: import("zod").ZodNumber;
|
|
1198
|
+
top: import("zod").ZodNumber;
|
|
1199
|
+
left: import("zod").ZodNumber;
|
|
1200
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
1201
|
+
height: import("zod").ZodNumber;
|
|
1202
|
+
width: import("zod").ZodNumber;
|
|
1203
|
+
top: import("zod").ZodNumber;
|
|
1204
|
+
left: import("zod").ZodNumber;
|
|
1205
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
1206
|
+
frame_id: import("zod").ZodString;
|
|
1207
|
+
timestamp: import("zod").ZodNumber;
|
|
1208
|
+
thumbnail_url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1209
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
1210
|
+
id: import("zod").ZodString;
|
|
1211
|
+
face_bounding_box: import("zod").ZodObject<{
|
|
1212
|
+
height: import("zod").ZodNumber;
|
|
1213
|
+
width: import("zod").ZodNumber;
|
|
1214
|
+
top: import("zod").ZodNumber;
|
|
1215
|
+
left: import("zod").ZodNumber;
|
|
1216
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
1217
|
+
height: import("zod").ZodNumber;
|
|
1218
|
+
width: import("zod").ZodNumber;
|
|
1219
|
+
top: import("zod").ZodNumber;
|
|
1220
|
+
left: import("zod").ZodNumber;
|
|
1221
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
1222
|
+
height: import("zod").ZodNumber;
|
|
1223
|
+
width: import("zod").ZodNumber;
|
|
1224
|
+
top: import("zod").ZodNumber;
|
|
1225
|
+
left: import("zod").ZodNumber;
|
|
1226
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
1227
|
+
frame_id: import("zod").ZodString;
|
|
1228
|
+
timestamp: import("zod").ZodNumber;
|
|
1229
|
+
thumbnail_url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1230
|
+
}, import("zod").ZodTypeAny, "passthrough">>, "many">;
|
|
1231
|
+
total: import("zod").ZodNumber;
|
|
1232
|
+
limit: import("zod").ZodNumber;
|
|
1233
|
+
offset: import("zod").ZodNumber;
|
|
1234
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
1097
1235
|
listMediaDescriptions(collectionId: string, params?: ListCollectionMediaDescriptionsParams): Promise<{
|
|
1098
1236
|
object: "list";
|
|
1099
1237
|
data: Array<{
|
|
@@ -1684,8 +1822,9 @@ declare class EnhancedSearchApi {
|
|
|
1684
1822
|
searchContent(params: SearchParams): Promise<{
|
|
1685
1823
|
id: string;
|
|
1686
1824
|
object: "search";
|
|
1687
|
-
query
|
|
1688
|
-
scope: "file" | "segment";
|
|
1825
|
+
query?: string | undefined;
|
|
1826
|
+
scope: "file" | "segment" | "face";
|
|
1827
|
+
search_target?: ("file" | "segment") | undefined;
|
|
1689
1828
|
results: Array<{
|
|
1690
1829
|
type: "file";
|
|
1691
1830
|
file_id: string;
|
|
@@ -1724,6 +1863,21 @@ declare class EnhancedSearchApi {
|
|
|
1724
1863
|
end_time: number;
|
|
1725
1864
|
}>> | undefined;
|
|
1726
1865
|
thumbnail_url?: string | undefined;
|
|
1866
|
+
} | {
|
|
1867
|
+
type: "face";
|
|
1868
|
+
file_id: string;
|
|
1869
|
+
collection_id: string;
|
|
1870
|
+
face_id: string;
|
|
1871
|
+
frame_id: string;
|
|
1872
|
+
score: number;
|
|
1873
|
+
timestamp: number;
|
|
1874
|
+
face_bounding_box?: {
|
|
1875
|
+
height: number;
|
|
1876
|
+
width: number;
|
|
1877
|
+
top: number;
|
|
1878
|
+
left: number;
|
|
1879
|
+
} | undefined;
|
|
1880
|
+
thumbnail_url?: string | undefined;
|
|
1727
1881
|
}>;
|
|
1728
1882
|
total: number;
|
|
1729
1883
|
limit: number;
|
|
@@ -1903,13 +2057,8 @@ declare class EnhancedSegmentsApi {
|
|
|
1903
2057
|
}> | undefined;
|
|
1904
2058
|
narrative_config?: Partial<{
|
|
1905
2059
|
prompt: string;
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
segments?: Array<{
|
|
1909
|
-
start_time: number;
|
|
1910
|
-
end_time: number;
|
|
1911
|
-
description?: string | undefined;
|
|
1912
|
-
thumbnail_url?: string | undefined;
|
|
2060
|
+
strategy: "direct" | "long" | "balanced";
|
|
2061
|
+
number_of_chapters: number;
|
|
1913
2062
|
}> | undefined;
|
|
1914
2063
|
}>;
|
|
1915
2064
|
total: number;
|
|
@@ -1930,6 +2079,8 @@ declare class EnhancedSegmentsApi {
|
|
|
1930
2079
|
}> | undefined;
|
|
1931
2080
|
narrative_config?: Partial<{
|
|
1932
2081
|
prompt: string;
|
|
2082
|
+
strategy: "direct" | "long" | "balanced";
|
|
2083
|
+
number_of_chapters: number;
|
|
1933
2084
|
}> | undefined;
|
|
1934
2085
|
total_segments?: number | undefined;
|
|
1935
2086
|
segments?: Array<{
|
|
@@ -1958,6 +2109,8 @@ declare class EnhancedSegmentsApi {
|
|
|
1958
2109
|
}> | undefined;
|
|
1959
2110
|
narrative_config?: Partial<{
|
|
1960
2111
|
prompt: string;
|
|
2112
|
+
strategy: "direct" | "long" | "balanced";
|
|
2113
|
+
number_of_chapters: number;
|
|
1961
2114
|
}> | undefined;
|
|
1962
2115
|
total_segments?: number | undefined;
|
|
1963
2116
|
segments?: Array<{
|
|
@@ -1984,6 +2137,8 @@ declare class EnhancedSegmentsApi {
|
|
|
1984
2137
|
}> | undefined;
|
|
1985
2138
|
narrative_config?: Partial<{
|
|
1986
2139
|
prompt: string;
|
|
2140
|
+
strategy: "direct" | "long" | "balanced";
|
|
2141
|
+
number_of_chapters: number;
|
|
1987
2142
|
}> | undefined;
|
|
1988
2143
|
total_segments?: number | undefined;
|
|
1989
2144
|
segments?: Array<{
|
package/dist/src/client.js
CHANGED
|
@@ -229,6 +229,12 @@ class EnhancedCollectionsApi {
|
|
|
229
229
|
queries: { ...options },
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
|
+
async getFaceDetections(collectionId, fileId, params = {}) {
|
|
233
|
+
return this.api.getFaceDetections({
|
|
234
|
+
params: { collection_id: collectionId, file_id: fileId },
|
|
235
|
+
queries: params
|
|
236
|
+
});
|
|
237
|
+
}
|
|
232
238
|
async listMediaDescriptions(collectionId, params = {}) {
|
|
233
239
|
return this.api.listCollectionMediaDescriptions({
|
|
234
240
|
params: { collection_id: collectionId },
|
|
@@ -639,7 +645,7 @@ class CloudGlue {
|
|
|
639
645
|
headers: {
|
|
640
646
|
Authorization: `Bearer ${this.apiKey}`,
|
|
641
647
|
'x-sdk-client': 'cloudglue-js',
|
|
642
|
-
'x-sdk-version': '0.4.
|
|
648
|
+
'x-sdk-version': '0.4.2',
|
|
643
649
|
},
|
|
644
650
|
baseURL: this.baseUrl,
|
|
645
651
|
timeout: this.timeout,
|
package/dist/src/types.d.ts
CHANGED
|
@@ -125,6 +125,10 @@ export type FileSearchResult = z.infer<typeof searchSchemas.FileSearchResult>;
|
|
|
125
125
|
* Represents a segment-level search result
|
|
126
126
|
*/
|
|
127
127
|
export type SegmentSearchResult = z.infer<typeof searchSchemas.SegmentSearchResult>;
|
|
128
|
+
/**
|
|
129
|
+
* Represents a face-level search result
|
|
130
|
+
*/
|
|
131
|
+
export type FaceSearchResult = z.infer<typeof searchSchemas.FaceSearchResult>;
|
|
128
132
|
/**
|
|
129
133
|
* Represents search filter criteria for filtering results
|
|
130
134
|
*/
|
|
@@ -150,6 +154,10 @@ export type CollectionMediaDescription = z.infer<typeof collectionsSchemas.Media
|
|
|
150
154
|
* Represents a list of media descriptions for files in a collection
|
|
151
155
|
*/
|
|
152
156
|
export type CollectionMediaDescriptionsList = z.infer<typeof collectionsSchemas.CollectionMediaDescriptionsList>;
|
|
157
|
+
/**
|
|
158
|
+
* Represents face detections for a file in a collection
|
|
159
|
+
*/
|
|
160
|
+
export type FileFaceDetections = z.infer<typeof collectionsSchemas.FileFaceDetections>;
|
|
153
161
|
export type NarrativeConfig = z.infer<typeof segmentsSchemas.NarrativeConfig>;
|
|
154
162
|
export type ShotConfig = z.infer<typeof segmentsSchemas.ShotConfig>;
|
|
155
163
|
export type WebhookEvents = z.infer<typeof webhooksSchemas['WebhookEvents']>;
|