@aviaryhq/cloudglue-js 0.5.9 → 0.6.0
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 +3 -1
- package/dist/generated/Collections.js +13 -11
- package/dist/generated/Describe.d.ts +7722 -43
- package/dist/generated/Describe.js +4 -64
- package/dist/generated/Files.d.ts +1097 -27
- package/dist/generated/Files.js +174 -0
- package/dist/generated/Response.d.ts +727 -0
- package/dist/generated/Response.js +318 -0
- package/dist/generated/Search.js +3 -3
- package/dist/generated/Segmentations.d.ts +6311 -933
- package/dist/generated/Segmentations.js +48 -0
- package/dist/generated/Segments.d.ts +4 -21
- package/dist/generated/Segments.js +8 -16
- package/dist/generated/common.d.ts +3745 -22
- package/dist/generated/common.js +86 -2
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +3 -1
- package/dist/src/api/describe.api.d.ts +1546 -109
- package/dist/src/api/files.api.d.ts +236 -3
- package/dist/src/api/files.api.js +27 -0
- package/dist/src/api/response.api.d.ts +269 -0
- package/dist/src/api/response.api.js +85 -0
- package/dist/src/api/segmentations.api.d.ts +896 -3
- package/dist/src/api/segmentations.api.js +13 -0
- package/dist/src/api/segments.api.d.ts +10 -28
- package/dist/src/client.d.ts +6 -0
- package/dist/src/client.js +6 -1
- package/dist/src/types.d.ts +42 -5
- package/package.json +1 -1
|
@@ -32,5 +32,18 @@ class EnhancedSegmentationsApi {
|
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* List all describe jobs that referenced the specified segmentation.
|
|
37
|
+
* Returns describe job records associated with the segmentation.
|
|
38
|
+
* @param segmentationId - The ID of the segmentation
|
|
39
|
+
* @param params - Optional parameters for filtering and pagination
|
|
40
|
+
* @returns List of describe jobs for the segmentation
|
|
41
|
+
*/
|
|
42
|
+
async listSegmentationDescribes(segmentationId, params = {}) {
|
|
43
|
+
return this.api.listSegmentationDescribes({
|
|
44
|
+
params: { segmentation_id: segmentationId },
|
|
45
|
+
queries: params,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
35
48
|
}
|
|
36
49
|
exports.EnhancedSegmentationsApi = EnhancedSegmentationsApi;
|
|
@@ -28,13 +28,7 @@ export declare class EnhancedSegmentsApi {
|
|
|
28
28
|
max_duration_seconds: number;
|
|
29
29
|
min_duration_seconds: number;
|
|
30
30
|
}> | undefined;
|
|
31
|
-
narrative_config?:
|
|
32
|
-
prompt: string;
|
|
33
|
-
strategy: "comprehensive" | "balanced";
|
|
34
|
-
number_of_chapters: number;
|
|
35
|
-
min_chapters: number;
|
|
36
|
-
max_chapters: number;
|
|
37
|
-
}> | undefined;
|
|
31
|
+
narrative_config?: import("../../generated/common").NarrativeConfig | undefined;
|
|
38
32
|
}>;
|
|
39
33
|
total: number;
|
|
40
34
|
limit: number;
|
|
@@ -52,15 +46,10 @@ export declare class EnhancedSegmentsApi {
|
|
|
52
46
|
max_duration_seconds: number;
|
|
53
47
|
min_duration_seconds: number;
|
|
54
48
|
}> | undefined;
|
|
55
|
-
narrative_config?:
|
|
56
|
-
prompt: string;
|
|
57
|
-
strategy: "comprehensive" | "balanced";
|
|
58
|
-
number_of_chapters: number;
|
|
59
|
-
min_chapters: number;
|
|
60
|
-
max_chapters: number;
|
|
61
|
-
}> | undefined;
|
|
49
|
+
narrative_config?: import("../../generated/common").NarrativeConfig | undefined;
|
|
62
50
|
total_segments?: number | undefined;
|
|
63
51
|
total_shots?: number | undefined;
|
|
52
|
+
total_chapters?: number | undefined;
|
|
64
53
|
segments?: Array<{
|
|
65
54
|
start_time: number;
|
|
66
55
|
end_time: number;
|
|
@@ -69,6 +58,7 @@ export declare class EnhancedSegmentsApi {
|
|
|
69
58
|
shot_index?: number | undefined;
|
|
70
59
|
}> | undefined;
|
|
71
60
|
shots?: Array<import("../../generated/common").Shot> | undefined;
|
|
61
|
+
chapters?: Array<import("../../generated/common").Chapter> | undefined;
|
|
72
62
|
}>;
|
|
73
63
|
createSegmentJob(params: {
|
|
74
64
|
url: string;
|
|
@@ -87,15 +77,10 @@ export declare class EnhancedSegmentsApi {
|
|
|
87
77
|
max_duration_seconds: number;
|
|
88
78
|
min_duration_seconds: number;
|
|
89
79
|
}> | undefined;
|
|
90
|
-
narrative_config?:
|
|
91
|
-
prompt: string;
|
|
92
|
-
strategy: "comprehensive" | "balanced";
|
|
93
|
-
number_of_chapters: number;
|
|
94
|
-
min_chapters: number;
|
|
95
|
-
max_chapters: number;
|
|
96
|
-
}> | undefined;
|
|
80
|
+
narrative_config?: import("../../generated/common").NarrativeConfig | undefined;
|
|
97
81
|
total_segments?: number | undefined;
|
|
98
82
|
total_shots?: number | undefined;
|
|
83
|
+
total_chapters?: number | undefined;
|
|
99
84
|
segments?: Array<{
|
|
100
85
|
start_time: number;
|
|
101
86
|
end_time: number;
|
|
@@ -104,6 +89,7 @@ export declare class EnhancedSegmentsApi {
|
|
|
104
89
|
shot_index?: number | undefined;
|
|
105
90
|
}> | undefined;
|
|
106
91
|
shots?: Array<import("../../generated/common").Shot> | undefined;
|
|
92
|
+
chapters?: Array<import("../../generated/common").Chapter> | undefined;
|
|
107
93
|
}>;
|
|
108
94
|
deleteSegmentJob(jobId: string): Promise<import("zod").objectOutputType<{
|
|
109
95
|
id: import("zod").ZodString;
|
|
@@ -120,15 +106,10 @@ export declare class EnhancedSegmentsApi {
|
|
|
120
106
|
max_duration_seconds: number;
|
|
121
107
|
min_duration_seconds: number;
|
|
122
108
|
}> | undefined;
|
|
123
|
-
narrative_config?:
|
|
124
|
-
prompt: string;
|
|
125
|
-
strategy: "comprehensive" | "balanced";
|
|
126
|
-
number_of_chapters: number;
|
|
127
|
-
min_chapters: number;
|
|
128
|
-
max_chapters: number;
|
|
129
|
-
}> | undefined;
|
|
109
|
+
narrative_config?: import("../../generated/common").NarrativeConfig | undefined;
|
|
130
110
|
total_segments?: number | undefined;
|
|
131
111
|
total_shots?: number | undefined;
|
|
112
|
+
total_chapters?: number | undefined;
|
|
132
113
|
segments?: Array<{
|
|
133
114
|
start_time: number;
|
|
134
115
|
end_time: number;
|
|
@@ -137,5 +118,6 @@ export declare class EnhancedSegmentsApi {
|
|
|
137
118
|
shot_index?: number | undefined;
|
|
138
119
|
}> | undefined;
|
|
139
120
|
shots?: Array<import("../../generated/common").Shot> | undefined;
|
|
121
|
+
chapters?: Array<import("../../generated/common").Chapter> | undefined;
|
|
140
122
|
}>;
|
|
141
123
|
}
|
package/dist/src/client.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { EnhancedTranscribeApi } from './api/transcribe.api';
|
|
|
14
14
|
import { EnhancedChatApi } from './api/chat-completion.api';
|
|
15
15
|
import { EnhancedCollectionsApi } from './api/collections.api';
|
|
16
16
|
import { EnhancedShareableApi } from './api/shareable.api';
|
|
17
|
+
import { EnhancedResponseApi } from './api/response.api';
|
|
17
18
|
/**
|
|
18
19
|
* Main CloudGlue client class that provides access to all API functionality
|
|
19
20
|
* through enhanced, user-friendly interfaces
|
|
@@ -93,5 +94,10 @@ export declare class CloudGlue {
|
|
|
93
94
|
* Provides methods for creating and managing shareable assets
|
|
94
95
|
*/
|
|
95
96
|
readonly shareable: EnhancedShareableApi;
|
|
97
|
+
/**
|
|
98
|
+
* Response API for OpenAI Responses-compatible chat completions
|
|
99
|
+
* Provides methods for creating and managing responses with video collections
|
|
100
|
+
*/
|
|
101
|
+
readonly responses: EnhancedResponseApi;
|
|
96
102
|
constructor(config?: CloudGlueConfig);
|
|
97
103
|
}
|
package/dist/src/client.js
CHANGED
|
@@ -16,6 +16,7 @@ const Face_Detection_1 = require("../generated/Face_Detection");
|
|
|
16
16
|
const Face_Match_1 = require("../generated/Face_Match");
|
|
17
17
|
const Tags_1 = require("../generated/Tags");
|
|
18
18
|
const Share_1 = require("../generated/Share");
|
|
19
|
+
const Response_1 = require("../generated/Response");
|
|
19
20
|
const webhooks_api_1 = require("./api/webhooks.api");
|
|
20
21
|
const tags_api_1 = require("./api/tags.api");
|
|
21
22
|
const error_1 = require("./error");
|
|
@@ -32,6 +33,7 @@ const transcribe_api_1 = require("./api/transcribe.api");
|
|
|
32
33
|
const chat_completion_api_1 = require("./api/chat-completion.api");
|
|
33
34
|
const collections_api_1 = require("./api/collections.api");
|
|
34
35
|
const shareable_api_1 = require("./api/shareable.api");
|
|
36
|
+
const response_api_1 = require("./api/response.api");
|
|
35
37
|
/**
|
|
36
38
|
* Main CloudGlue client class that provides access to all API functionality
|
|
37
39
|
* through enhanced, user-friendly interfaces
|
|
@@ -48,7 +50,7 @@ class CloudGlue {
|
|
|
48
50
|
headers: {
|
|
49
51
|
Authorization: `Bearer ${this.apiKey}`,
|
|
50
52
|
'x-sdk-client': 'cloudglue-js',
|
|
51
|
-
'x-sdk-version': '0.
|
|
53
|
+
'x-sdk-version': '0.6.0',
|
|
52
54
|
},
|
|
53
55
|
baseURL: this.baseUrl,
|
|
54
56
|
timeout: this.timeout,
|
|
@@ -75,6 +77,7 @@ class CloudGlue {
|
|
|
75
77
|
const webhooksApi = (0, Webhooks_1.createApiClient)(this.baseUrl, sharedConfig);
|
|
76
78
|
const tagsApi = (0, Tags_1.createApiClient)(this.baseUrl, sharedConfig);
|
|
77
79
|
const shareableApi = (0, Share_1.createApiClient)(this.baseUrl, sharedConfig);
|
|
80
|
+
const responseApi = (0, Response_1.createApiClient)(this.baseUrl, sharedConfig);
|
|
78
81
|
// Configure base URL and axios config for all clients
|
|
79
82
|
[
|
|
80
83
|
filesApi,
|
|
@@ -92,6 +95,7 @@ class CloudGlue {
|
|
|
92
95
|
webhooksApi,
|
|
93
96
|
tagsApi,
|
|
94
97
|
shareableApi,
|
|
98
|
+
responseApi,
|
|
95
99
|
].forEach((client) => {
|
|
96
100
|
Object.assign(client.axios.defaults, axiosConfig);
|
|
97
101
|
client.axios.interceptors.response.use((response) => {
|
|
@@ -126,6 +130,7 @@ class CloudGlue {
|
|
|
126
130
|
this.webhooks = new webhooks_api_1.EnhancedWebhooksApi(webhooksApi);
|
|
127
131
|
this.tags = new tags_api_1.EnhancedTagsApi(tagsApi);
|
|
128
132
|
this.shareable = new shareable_api_1.EnhancedShareableApi(shareableApi);
|
|
133
|
+
this.responses = new response_api_1.EnhancedResponseApi(responseApi);
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
exports.CloudGlue = CloudGlue;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -5,9 +5,8 @@ import { schemas as chatSchemas } from '../generated/Chat';
|
|
|
5
5
|
import { schemas as transcribeSchemas } from '../generated/Transcribe';
|
|
6
6
|
import { schemas as extractSchemas } from '../generated/Extract';
|
|
7
7
|
import { schemas as searchSchemas } from '../generated/Search';
|
|
8
|
-
import { schemas as describeSchemas } from '../generated/Describe';
|
|
9
8
|
import { schemas as segmentsSchemas } from '../generated/Segments';
|
|
10
|
-
import { SegmentationUniformConfig as SegmentationUniformConfigType, SegmentationShotDetectorConfig as SegmentationShotDetectorConfigType, SegmentationConfig as SegmentationConfigType } from '../generated/common';
|
|
9
|
+
import { SegmentationUniformConfig as SegmentationUniformConfigType, SegmentationShotDetectorConfig as SegmentationShotDetectorConfigType, SegmentationConfig as SegmentationConfigType, NarrativeConfig as NarrativeConfigType, Chapter as ChapterType, Describe as DescribeType, DescribeList as DescribeListType } from '../generated/common';
|
|
11
10
|
import { schemas as webhooksSchemas } from '../generated/Webhooks';
|
|
12
11
|
import { FrameExtraction } from '../generated/common';
|
|
13
12
|
import { schemas as faceDetectionSchemas } from '../generated/Face_Detection';
|
|
@@ -153,11 +152,11 @@ export type SearchFilter = z.infer<typeof searchSchemas.SearchRequest>['filter']
|
|
|
153
152
|
* Represents the result of a video description request
|
|
154
153
|
* Contains detailed information about the video content including speech, text, and visual descriptions
|
|
155
154
|
*/
|
|
156
|
-
export type Describe = z.infer<typeof
|
|
155
|
+
export type Describe = z.infer<typeof DescribeType>;
|
|
157
156
|
/**
|
|
158
157
|
* Represents a list of description jobs
|
|
159
158
|
*/
|
|
160
|
-
export type DescribeList = z.infer<typeof
|
|
159
|
+
export type DescribeList = z.infer<typeof DescribeListType>;
|
|
161
160
|
/**
|
|
162
161
|
* Represents media description data for a video in a collection
|
|
163
162
|
*/
|
|
@@ -170,7 +169,12 @@ export type CollectionMediaDescriptionsList = z.infer<typeof collectionsSchemas.
|
|
|
170
169
|
* Represents face detections for a file in a collection
|
|
171
170
|
*/
|
|
172
171
|
export type FileFaceDetections = z.infer<typeof collectionsSchemas.FileFaceDetections>;
|
|
173
|
-
export type NarrativeConfig = z.infer<typeof
|
|
172
|
+
export type NarrativeConfig = z.infer<typeof NarrativeConfigType>;
|
|
173
|
+
/**
|
|
174
|
+
* Represents a chapter within a narrative segmentation
|
|
175
|
+
* Contains timing and description information for the chapter
|
|
176
|
+
*/
|
|
177
|
+
export type Chapter = z.infer<typeof ChapterType>;
|
|
174
178
|
export type ShotConfig = z.infer<typeof segmentsSchemas.ShotConfig>;
|
|
175
179
|
export type WebhookEvents = z.infer<(typeof webhooksSchemas)['WebhookEvents']>;
|
|
176
180
|
/**
|
|
@@ -274,3 +278,36 @@ export type ShareableAssetListResponse = z.infer<typeof shareableSchemas.Shareab
|
|
|
274
278
|
export type CreateShareableAssetRequest = z.infer<typeof shareableSchemas.CreateShareableAssetRequest>;
|
|
275
279
|
export type UpdateShareableAssetRequest = z.infer<typeof shareableSchemas.UpdateShareableAssetRequest>;
|
|
276
280
|
export type Modalities = 'speech' | 'visual_scene_description' | 'scene_text' | 'audio_description' | 'summary' | 'segment_summary' | 'title';
|
|
281
|
+
import { schemas as responseSchemas } from '../generated/Response';
|
|
282
|
+
/**
|
|
283
|
+
* Represents a Response API response object
|
|
284
|
+
*/
|
|
285
|
+
export type Response = z.infer<typeof responseSchemas.Response>;
|
|
286
|
+
/**
|
|
287
|
+
* Represents a list of Response API responses
|
|
288
|
+
*/
|
|
289
|
+
export type ResponseList = z.infer<typeof responseSchemas.ResponseList>;
|
|
290
|
+
/**
|
|
291
|
+
* Represents a Response API list item (without full output data)
|
|
292
|
+
*/
|
|
293
|
+
export type ResponseListItem = z.infer<typeof responseSchemas.ResponseListItem>;
|
|
294
|
+
/**
|
|
295
|
+
* Represents a Response API input message
|
|
296
|
+
*/
|
|
297
|
+
export type ResponseInputMessage = z.infer<typeof responseSchemas.ResponseInputMessage>;
|
|
298
|
+
/**
|
|
299
|
+
* Represents a Response API output message
|
|
300
|
+
*/
|
|
301
|
+
export type ResponseOutputMessage = z.infer<typeof responseSchemas.ResponseOutputMessage>;
|
|
302
|
+
/**
|
|
303
|
+
* Represents a citation annotation in a Response API response
|
|
304
|
+
*/
|
|
305
|
+
export type ResponseAnnotation = z.infer<typeof responseSchemas.ResponseAnnotation>;
|
|
306
|
+
/**
|
|
307
|
+
* Represents usage information for a Response API response
|
|
308
|
+
*/
|
|
309
|
+
export type ResponseUsage = z.infer<typeof responseSchemas.ResponseUsage>;
|
|
310
|
+
/**
|
|
311
|
+
* Represents knowledge base configuration for the Response API
|
|
312
|
+
*/
|
|
313
|
+
export type ResponseKnowledgeBase = z.infer<typeof responseSchemas.ResponseKnowledgeBase>;
|