twelvelabs-js 1.2.7 → 1.2.8
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/Client.d.ts +4 -0
- package/Client.js +6 -2
- package/api/client/requests/AnalyzeRequest.d.ts +1 -1
- package/api/client/requests/AnalyzeStreamRequest.d.ts +1 -1
- package/api/errors/GatewayTimeoutError.d.ts +9 -0
- package/api/errors/GatewayTimeoutError.js +52 -0
- package/api/errors/ServiceUnavailableError.d.ts +9 -0
- package/api/errors/ServiceUnavailableError.js +52 -0
- package/api/errors/index.d.ts +2 -0
- package/api/errors/index.js +2 -0
- package/api/resources/analyzeAsync/client/Client.d.ts +3 -0
- package/api/resources/analyzeAsync/client/Client.js +5 -0
- package/api/resources/analyzeAsync/resources/batches/client/Client.d.ts +231 -0
- package/api/resources/analyzeAsync/resources/batches/client/Client.js +667 -0
- package/api/resources/analyzeAsync/resources/batches/client/index.d.ts +1 -0
- package/api/resources/analyzeAsync/resources/batches/client/index.js +17 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/BatchesListRequest.d.ts +42 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/BatchesListRequest.js +5 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.d.ts +101 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.js +5 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/index.d.ts +2 -0
- package/api/resources/analyzeAsync/resources/batches/client/requests/index.js +2 -0
- package/api/resources/analyzeAsync/resources/batches/index.d.ts +2 -0
- package/api/resources/analyzeAsync/resources/batches/index.js +18 -0
- package/api/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.d.ts +8 -0
- package/api/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.js +10 -0
- package/api/resources/analyzeAsync/resources/batches/types/BatchesListResponse.d.ts +9 -0
- package/api/resources/analyzeAsync/resources/batches/types/BatchesListResponse.js +5 -0
- package/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.d.ts +15 -0
- package/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.js +10 -0
- package/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.d.ts +10 -0
- package/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.js +9 -0
- package/api/resources/analyzeAsync/resources/batches/types/index.d.ts +4 -0
- package/api/resources/analyzeAsync/resources/batches/types/index.js +20 -0
- package/api/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/api/resources/analyzeAsync/resources/index.js +4 -1
- package/api/resources/analyzeAsync/resources/tasks/client/Client.d.ts +2 -0
- package/api/resources/analyzeAsync/resources/tasks/client/Client.js +6 -4
- package/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +1 -1
- package/api/resources/assets/client/Client.js +7 -7
- package/api/resources/embed/client/Client.js +1 -1
- package/api/resources/embed/resources/tasks/client/Client.js +4 -4
- package/api/resources/embed/resources/v2/client/Client.js +1 -1
- package/api/resources/embed/resources/v2/resources/tasks/client/Client.js +3 -3
- package/api/resources/entityCollections/client/Client.js +5 -5
- package/api/resources/entityCollections/resources/entities/client/Client.js +9 -9
- package/api/resources/indexes/client/Client.js +5 -5
- package/api/resources/indexes/resources/indexedAssets/client/Client.d.ts +2 -0
- package/api/resources/indexes/resources/indexedAssets/client/Client.js +8 -6
- package/api/resources/indexes/resources/videos/client/Client.js +4 -4
- package/api/resources/multipartUpload/client/Client.js +5 -5
- package/api/resources/search/client/Client.js +2 -2
- package/api/resources/tasks/client/Client.d.ts +2 -0
- package/api/resources/tasks/client/Client.js +6 -4
- package/api/types/AnalyzeBatchStatusResponse.d.ts +21 -0
- package/api/types/AnalyzeBatchStatusResponse.js +5 -0
- package/api/types/AnalyzeBatchSummary.d.ts +28 -0
- package/api/types/AnalyzeBatchSummary.js +5 -0
- package/api/types/AnalyzeBatchSummaryAnalysisMode.d.ts +11 -0
- package/api/types/AnalyzeBatchSummaryAnalysisMode.js +10 -0
- package/api/types/BatchDefaults.d.ts +46 -0
- package/api/types/BatchDefaults.js +5 -0
- package/api/types/BatchItemError.d.ts +12 -0
- package/api/types/BatchItemError.js +5 -0
- package/api/types/BatchItemRequest.d.ts +36 -0
- package/api/types/BatchItemRequest.js +5 -0
- package/api/types/BatchItemStatus.d.ts +14 -0
- package/api/types/BatchItemStatus.js +13 -0
- package/api/types/BatchPrompt.d.ts +13 -0
- package/api/types/BatchPrompt.js +5 -0
- package/api/types/BatchResultItem.d.ts +17 -0
- package/api/types/BatchResultItem.js +5 -0
- package/api/types/BatchStatus.d.ts +15 -0
- package/api/types/BatchStatus.js +14 -0
- package/api/types/BatchVideoContext.d.ts +13 -0
- package/api/types/BatchVideoContext.js +5 -0
- package/api/types/BatchVideoContextType.d.ts +10 -0
- package/api/types/BatchVideoContextType.js +9 -0
- package/api/types/CreateAnalyzeBatchResponse.d.ts +20 -0
- package/api/types/CreateAnalyzeBatchResponse.js +5 -0
- package/api/types/CreatedBatchItem.d.ts +12 -0
- package/api/types/CreatedBatchItem.js +5 -0
- package/api/types/index.d.ts +14 -0
- package/api/types/index.js +14 -0
- package/dist/Client.d.ts +4 -0
- package/dist/Client.js +6 -2
- package/dist/api/client/requests/AnalyzeRequest.d.ts +1 -1
- package/dist/api/client/requests/AnalyzeStreamRequest.d.ts +1 -1
- package/dist/api/errors/GatewayTimeoutError.d.ts +9 -0
- package/dist/api/errors/GatewayTimeoutError.js +52 -0
- package/dist/api/errors/ServiceUnavailableError.d.ts +9 -0
- package/dist/api/errors/ServiceUnavailableError.js +52 -0
- package/dist/api/errors/index.d.ts +2 -0
- package/dist/api/errors/index.js +2 -0
- package/dist/api/resources/analyzeAsync/client/Client.d.ts +3 -0
- package/dist/api/resources/analyzeAsync/client/Client.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/Client.d.ts +231 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/Client.js +667 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/index.d.ts +1 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/index.js +17 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/BatchesListRequest.d.ts +42 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/BatchesListRequest.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.d.ts +101 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/index.d.ts +2 -0
- package/dist/api/resources/analyzeAsync/resources/batches/client/requests/index.js +2 -0
- package/dist/api/resources/analyzeAsync/resources/batches/index.d.ts +2 -0
- package/dist/api/resources/analyzeAsync/resources/batches/index.js +18 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.d.ts +8 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.js +10 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/BatchesListResponse.d.ts +9 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/BatchesListResponse.js +5 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.d.ts +15 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.js +10 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.d.ts +10 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.js +9 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/index.d.ts +4 -0
- package/dist/api/resources/analyzeAsync/resources/batches/types/index.js +20 -0
- package/dist/api/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/dist/api/resources/analyzeAsync/resources/index.js +4 -1
- package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.d.ts +2 -0
- package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.js +6 -4
- package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +1 -1
- package/dist/api/resources/assets/client/Client.js +7 -7
- package/dist/api/resources/embed/client/Client.js +1 -1
- package/dist/api/resources/embed/resources/tasks/client/Client.js +4 -4
- package/dist/api/resources/embed/resources/v2/client/Client.js +1 -1
- package/dist/api/resources/embed/resources/v2/resources/tasks/client/Client.js +3 -3
- package/dist/api/resources/entityCollections/client/Client.js +5 -5
- package/dist/api/resources/entityCollections/resources/entities/client/Client.js +9 -9
- package/dist/api/resources/indexes/client/Client.js +5 -5
- package/dist/api/resources/indexes/resources/indexedAssets/client/Client.d.ts +2 -0
- package/dist/api/resources/indexes/resources/indexedAssets/client/Client.js +8 -6
- package/dist/api/resources/indexes/resources/videos/client/Client.js +4 -4
- package/dist/api/resources/multipartUpload/client/Client.js +5 -5
- package/dist/api/resources/search/client/Client.js +2 -2
- package/dist/api/resources/tasks/client/Client.d.ts +2 -0
- package/dist/api/resources/tasks/client/Client.js +6 -4
- package/dist/api/types/AnalyzeBatchStatusResponse.d.ts +21 -0
- package/dist/api/types/AnalyzeBatchStatusResponse.js +5 -0
- package/dist/api/types/AnalyzeBatchSummary.d.ts +28 -0
- package/dist/api/types/AnalyzeBatchSummary.js +5 -0
- package/dist/api/types/AnalyzeBatchSummaryAnalysisMode.d.ts +11 -0
- package/dist/api/types/AnalyzeBatchSummaryAnalysisMode.js +10 -0
- package/dist/api/types/BatchDefaults.d.ts +46 -0
- package/dist/api/types/BatchDefaults.js +5 -0
- package/dist/api/types/BatchItemError.d.ts +12 -0
- package/dist/api/types/BatchItemError.js +5 -0
- package/dist/api/types/BatchItemRequest.d.ts +36 -0
- package/dist/api/types/BatchItemRequest.js +5 -0
- package/dist/api/types/BatchItemStatus.d.ts +14 -0
- package/dist/api/types/BatchItemStatus.js +13 -0
- package/dist/api/types/BatchPrompt.d.ts +13 -0
- package/dist/api/types/BatchPrompt.js +5 -0
- package/dist/api/types/BatchResultItem.d.ts +17 -0
- package/dist/api/types/BatchResultItem.js +5 -0
- package/dist/api/types/BatchStatus.d.ts +15 -0
- package/dist/api/types/BatchStatus.js +14 -0
- package/dist/api/types/BatchVideoContext.d.ts +13 -0
- package/dist/api/types/BatchVideoContext.js +5 -0
- package/dist/api/types/BatchVideoContextType.d.ts +10 -0
- package/dist/api/types/BatchVideoContextType.js +9 -0
- package/dist/api/types/CreateAnalyzeBatchResponse.d.ts +20 -0
- package/dist/api/types/CreateAnalyzeBatchResponse.js +5 -0
- package/dist/api/types/CreatedBatchItem.d.ts +12 -0
- package/dist/api/types/CreatedBatchItem.js +5 -0
- package/dist/api/types/index.d.ts +14 -0
- package/dist/api/types/index.js +14 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/index.d.ts +1 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/index.js +17 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.d.ts +19 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.js +50 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/client/requests/index.js +5 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/index.d.ts +2 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/index.js +18 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.d.ts +10 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.js +41 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/BatchesListResponse.d.ts +15 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/BatchesListResponse.js +46 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.d.ts +10 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.js +41 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.d.ts +10 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.js +41 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/index.d.ts +4 -0
- package/dist/serialization/resources/analyzeAsync/resources/batches/types/index.js +20 -0
- package/dist/serialization/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/dist/serialization/resources/analyzeAsync/resources/index.js +4 -1
- package/dist/serialization/types/AnalyzeBatchStatusResponse.d.ts +19 -0
- package/dist/serialization/types/AnalyzeBatchStatusResponse.js +52 -0
- package/dist/serialization/types/AnalyzeBatchSummary.d.ts +23 -0
- package/dist/serialization/types/AnalyzeBatchSummary.js +54 -0
- package/dist/serialization/types/AnalyzeBatchSummaryAnalysisMode.d.ts +10 -0
- package/dist/serialization/types/AnalyzeBatchSummaryAnalysisMode.js +41 -0
- package/dist/serialization/types/BatchDefaults.d.ts +22 -0
- package/dist/serialization/types/BatchDefaults.js +53 -0
- package/dist/serialization/types/BatchItemError.d.ts +13 -0
- package/dist/serialization/types/BatchItemError.js +44 -0
- package/dist/serialization/types/BatchItemRequest.d.ts +25 -0
- package/dist/serialization/types/BatchItemRequest.js +56 -0
- package/dist/serialization/types/BatchItemStatus.d.ts +10 -0
- package/dist/serialization/types/BatchItemStatus.js +41 -0
- package/dist/serialization/types/BatchPrompt.d.ts +14 -0
- package/dist/serialization/types/BatchPrompt.js +45 -0
- package/dist/serialization/types/BatchResultItem.d.ts +19 -0
- package/dist/serialization/types/BatchResultItem.js +50 -0
- package/dist/serialization/types/BatchStatus.d.ts +10 -0
- package/dist/serialization/types/BatchStatus.js +41 -0
- package/dist/serialization/types/BatchVideoContext.d.ts +14 -0
- package/dist/serialization/types/BatchVideoContext.js +45 -0
- package/dist/serialization/types/BatchVideoContextType.d.ts +10 -0
- package/dist/serialization/types/BatchVideoContextType.js +41 -0
- package/dist/serialization/types/CreateAnalyzeBatchResponse.d.ts +19 -0
- package/dist/serialization/types/CreateAnalyzeBatchResponse.js +50 -0
- package/dist/serialization/types/CreatedBatchItem.d.ts +13 -0
- package/dist/serialization/types/CreatedBatchItem.js +44 -0
- package/dist/serialization/types/index.d.ts +14 -0
- package/dist/serialization/types/index.js +14 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +489 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/index.d.ts +1 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/index.js +17 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.d.ts +19 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/requests/CreateAnalyzeBatchRequest.js +50 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/requests/index.d.ts +1 -0
- package/serialization/resources/analyzeAsync/resources/batches/client/requests/index.js +5 -0
- package/serialization/resources/analyzeAsync/resources/batches/index.d.ts +2 -0
- package/serialization/resources/analyzeAsync/resources/batches/index.js +18 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.d.ts +10 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/BatchesListRequestAnalysisModeItem.js +41 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/BatchesListResponse.d.ts +15 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/BatchesListResponse.js +46 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.d.ts +10 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestAnalysisMode.js +41 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.d.ts +10 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/CreateAnalyzeBatchRequestModelName.js +41 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/index.d.ts +4 -0
- package/serialization/resources/analyzeAsync/resources/batches/types/index.js +20 -0
- package/serialization/resources/analyzeAsync/resources/index.d.ts +3 -0
- package/serialization/resources/analyzeAsync/resources/index.js +4 -1
- package/serialization/types/AnalyzeBatchStatusResponse.d.ts +19 -0
- package/serialization/types/AnalyzeBatchStatusResponse.js +52 -0
- package/serialization/types/AnalyzeBatchSummary.d.ts +23 -0
- package/serialization/types/AnalyzeBatchSummary.js +54 -0
- package/serialization/types/AnalyzeBatchSummaryAnalysisMode.d.ts +10 -0
- package/serialization/types/AnalyzeBatchSummaryAnalysisMode.js +41 -0
- package/serialization/types/BatchDefaults.d.ts +22 -0
- package/serialization/types/BatchDefaults.js +53 -0
- package/serialization/types/BatchItemError.d.ts +13 -0
- package/serialization/types/BatchItemError.js +44 -0
- package/serialization/types/BatchItemRequest.d.ts +25 -0
- package/serialization/types/BatchItemRequest.js +56 -0
- package/serialization/types/BatchItemStatus.d.ts +10 -0
- package/serialization/types/BatchItemStatus.js +41 -0
- package/serialization/types/BatchPrompt.d.ts +14 -0
- package/serialization/types/BatchPrompt.js +45 -0
- package/serialization/types/BatchResultItem.d.ts +19 -0
- package/serialization/types/BatchResultItem.js +50 -0
- package/serialization/types/BatchStatus.d.ts +10 -0
- package/serialization/types/BatchStatus.js +41 -0
- package/serialization/types/BatchVideoContext.d.ts +14 -0
- package/serialization/types/BatchVideoContext.js +45 -0
- package/serialization/types/BatchVideoContextType.d.ts +10 -0
- package/serialization/types/BatchVideoContextType.js +41 -0
- package/serialization/types/CreateAnalyzeBatchResponse.d.ts +19 -0
- package/serialization/types/CreateAnalyzeBatchResponse.js +50 -0
- package/serialization/types/CreatedBatchItem.d.ts +13 -0
- package/serialization/types/CreatedBatchItem.js +44 -0
- package/serialization/types/index.d.ts +14 -0
- package/serialization/types/index.js +14 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TwelvelabsApi from "../index";
|
|
5
|
+
/**
|
|
6
|
+
* Default values applied to every item that does not override them. Every field is optional. Items in the `requests` array override these values. To override the `prompt` or `response_format` field, provide the full object on the item. You cannot change only some of its nested fields.
|
|
7
|
+
*/
|
|
8
|
+
export interface BatchDefaults {
|
|
9
|
+
prompt?: TwelvelabsApi.BatchPrompt;
|
|
10
|
+
responseFormat?: TwelvelabsApi.AsyncResponseFormat;
|
|
11
|
+
temperature?: TwelvelabsApi.AnalyzeTemperature;
|
|
12
|
+
/** The maximum number of tokens to generate per item. The allowed range depends on the model and analysis mode (see the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint for the per-mode table). */
|
|
13
|
+
maxTokens?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Minimum duration for each extracted segment, in seconds. Applies only when the `analysis_mode` field is `time_based_metadata`.
|
|
16
|
+
*
|
|
17
|
+
* **Min:** 2
|
|
18
|
+
*/
|
|
19
|
+
minSegmentDuration?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Maximum duration for each extracted segment, in seconds. Must be greater than or equal to the `min_segment_duration` field. Applies only when the `analysis_mode` field is `time_based_metadata`.
|
|
22
|
+
*
|
|
23
|
+
* **Min:** 2
|
|
24
|
+
*/
|
|
25
|
+
maxSegmentDuration?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Start of the analysis window, in seconds, applied to every item. Use with `end_time` to analyze only the `[start_time, end_time)` portion of each video.
|
|
28
|
+
*
|
|
29
|
+
* <Note title="Notes">
|
|
30
|
+
* - If omitted, defaults to `0`.
|
|
31
|
+
* - Must be less than `end_time`.
|
|
32
|
+
* - Mutually exclusive with `response_format.segment_definitions[].time_ranges`.
|
|
33
|
+
* </Note>
|
|
34
|
+
*/
|
|
35
|
+
startTime?: number;
|
|
36
|
+
/**
|
|
37
|
+
* End of the analysis window, in seconds, applied to every item. Use with `start_time` to analyze only the `[start_time, end_time)` portion of each video.
|
|
38
|
+
*
|
|
39
|
+
* <Note title="Notes">
|
|
40
|
+
* - If omitted, defaults to the video duration.
|
|
41
|
+
* - Must be greater than `start_time`.
|
|
42
|
+
* - Mutually exclusive with `response_format.segment_definitions[].time_ranges`.
|
|
43
|
+
* </Note>
|
|
44
|
+
*/
|
|
45
|
+
endTime?: number;
|
|
46
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Failure details for a single batch item.
|
|
6
|
+
*/
|
|
7
|
+
export interface BatchItemError {
|
|
8
|
+
/** A machine-readable error code identifying the failure category. Omitted until the per-item error catalog is wired through; until then, only `message` is guaranteed. */
|
|
9
|
+
code?: string;
|
|
10
|
+
/** A human-readable explanation of the failure. */
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TwelvelabsApi from "../index";
|
|
5
|
+
/**
|
|
6
|
+
* A single analysis request inside a batch. Identify the video in the `video` field. Every other field is optional and overrides the matching field in the `defaults` object.
|
|
7
|
+
*/
|
|
8
|
+
export interface BatchItemRequest {
|
|
9
|
+
/** Identifies the asset to analyze. */
|
|
10
|
+
video: TwelvelabsApi.BatchVideoContext;
|
|
11
|
+
/**
|
|
12
|
+
* An optional identifier you set per item when you create the batch. Use this field to map batch results back to records in your system, for example, to correlate each result with the source video in your database.
|
|
13
|
+
*
|
|
14
|
+
* The platform stores this value unchanged. It appears in:
|
|
15
|
+
* - **Batch responses**: the array named `items` in the Create a batch response, and each line returned by the [`GET`](/v1.3/api-reference/analyze-videos/batch-analysis/retrieve-batch-results) method of the `/analyze/batches/{batch_id}/results` endpoint.
|
|
16
|
+
* - **Task responses**: each batch request creates an analysis task. The `custom_id` field appears in the [`GET`](/v1.3/api-reference/analyze-videos/retrieve-analysis-task-status-results) method of the `/analyze/tasks/{task_id}` endpoint, the [`GET`](/v1.3/api-reference/analyze-videos/list-async-analysis-tasks) method of the `/analyze/tasks` endpoint, and the `analyze.task.ready` and `analyze.task.failed` webhook payloads.
|
|
17
|
+
*
|
|
18
|
+
* **Format**: 1–64 characters. Alphanumeric, hyphens (`-`), and underscores (`_`) only. An empty string is rejected with a `400 Bad Request`.
|
|
19
|
+
*
|
|
20
|
+
* The value must be unique within a batch. Submitting two items with the same value in the `custom_id` field in the same batch returns a `400 Bad Request`. Items without a custom identifier still receive a unique task identifier generated by the platform in results.
|
|
21
|
+
*/
|
|
22
|
+
customId?: string;
|
|
23
|
+
prompt?: TwelvelabsApi.BatchPrompt;
|
|
24
|
+
responseFormat?: TwelvelabsApi.AsyncResponseFormat;
|
|
25
|
+
temperature?: TwelvelabsApi.AnalyzeTemperature;
|
|
26
|
+
/** Override the `defaults.max_tokens` value for this item. */
|
|
27
|
+
maxTokens?: number;
|
|
28
|
+
/** Override the `defaults.min_segment_duration` value for this item. */
|
|
29
|
+
minSegmentDuration?: number;
|
|
30
|
+
/** Override the `defaults.max_segment_duration` value for this item. */
|
|
31
|
+
maxSegmentDuration?: number;
|
|
32
|
+
/** Override the `defaults.start_time` value for this item. */
|
|
33
|
+
startTime?: number;
|
|
34
|
+
/** Override the `defaults.end_time` value for this item. */
|
|
35
|
+
endTime?: number;
|
|
36
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The status of a result entry. This field is different from the batch status. For the meaning of each value, see the [Item statuses](/v1.3/api-reference/analyze-videos/batch-analysis/the-batch-object#item-statuses) section on the **The batch object** page.
|
|
6
|
+
*/
|
|
7
|
+
export type BatchItemStatus = "queued" | "processing" | "ready" | "failed" | "canceled";
|
|
8
|
+
export declare const BatchItemStatus: {
|
|
9
|
+
readonly Queued: "queued";
|
|
10
|
+
readonly Processing: "processing";
|
|
11
|
+
readonly Ready: "ready";
|
|
12
|
+
readonly Failed: "failed";
|
|
13
|
+
readonly Canceled: "canceled";
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BatchItemStatus = void 0;
|
|
7
|
+
exports.BatchItemStatus = {
|
|
8
|
+
Queued: "queued",
|
|
9
|
+
Processing: "processing",
|
|
10
|
+
Ready: "ready",
|
|
11
|
+
Failed: "failed",
|
|
12
|
+
Canceled: "canceled",
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TwelvelabsApi from "../index";
|
|
5
|
+
/**
|
|
6
|
+
* A structured prompt with `<@name>` placeholders for referencing images. Not supported when `analysis_mode` is `time_based_metadata`.
|
|
7
|
+
*/
|
|
8
|
+
export interface BatchPrompt {
|
|
9
|
+
/** The text of the prompt. Use `<@name>` placeholders to reference images declared in `media_sources` (Example: `"Is there a <@tiger-1> in the video?"`). This text counts toward the [context window](/v1.3/docs/concepts/models/pegasus#context-window). */
|
|
10
|
+
inputText: string;
|
|
11
|
+
/** Reference images for the `<@name>` placeholders in the prompt. Maximum 4 sources. */
|
|
12
|
+
mediaSources?: TwelvelabsApi.SmeMediaSource[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TwelvelabsApi from "../index";
|
|
5
|
+
/**
|
|
6
|
+
* One result entry per item. Result entries in the `ready` status include the `data` field. Result entries in the `failed` status include the `error` field. Result entries in the `queued`, `processing`, or `canceled` status include neither field.
|
|
7
|
+
*/
|
|
8
|
+
export interface BatchResultItem {
|
|
9
|
+
/** The unique task identifier generated by the platform for this item. */
|
|
10
|
+
taskId: string;
|
|
11
|
+
/** The custom identifier you provided when you created the batch. If you did not provide one, this field is `null`. */
|
|
12
|
+
customId?: string;
|
|
13
|
+
status: TwelvelabsApi.BatchItemStatus;
|
|
14
|
+
/** Contains the analysis result for an item in the `ready` status. The analysis text is in this object's nested `data` field. The envelope uses the same schema as the `result` field in the [`GET`](/v1.3/api-reference/analyze-videos/retrieve-analysis-task-status-results) method of the `/analyze/tasks/{task_id}` endpoint. */
|
|
15
|
+
data?: TwelvelabsApi.AnalyzeTaskResult;
|
|
16
|
+
error?: TwelvelabsApi.BatchItemError;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The status of a batch. For the meaning of each value, see the [Batch statuses](/v1.3/api-reference/analyze-videos/batch-analysis/the-batch-object#batch-statuses) section on the **The batch object** page.
|
|
6
|
+
*/
|
|
7
|
+
export type BatchStatus = "pending" | "processing" | "canceling" | "canceled" | "completed" | "expired";
|
|
8
|
+
export declare const BatchStatus: {
|
|
9
|
+
readonly Pending: "pending";
|
|
10
|
+
readonly Processing: "processing";
|
|
11
|
+
readonly Canceling: "canceling";
|
|
12
|
+
readonly Canceled: "canceled";
|
|
13
|
+
readonly Completed: "completed";
|
|
14
|
+
readonly Expired: "expired";
|
|
15
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BatchStatus = void 0;
|
|
7
|
+
exports.BatchStatus = {
|
|
8
|
+
Pending: "pending",
|
|
9
|
+
Processing: "processing",
|
|
10
|
+
Canceling: "canceling",
|
|
11
|
+
Canceled: "canceled",
|
|
12
|
+
Completed: "completed",
|
|
13
|
+
Expired: "expired",
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TwelvelabsApi from "../index";
|
|
5
|
+
/**
|
|
6
|
+
* Identifies the asset to analyze.
|
|
7
|
+
*/
|
|
8
|
+
export interface BatchVideoContext {
|
|
9
|
+
/** Set this field to `asset_id` to indicate that you're providing the video as an asset. */
|
|
10
|
+
type: TwelvelabsApi.BatchVideoContextType;
|
|
11
|
+
/** The unique identifier of an asset from a [direct](/v1.3/api-reference/upload-content/direct-uploads) or [multipart](/v1.3/api-reference/upload-content/multipart-uploads) upload. The asset status must be `ready`. Use the [Retrieve an asset](/v1.3/api-reference/upload-content/direct-uploads/retrieve) method to check the status. */
|
|
12
|
+
assetId: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Set this field to `asset_id` to indicate that you're providing the video as an asset.
|
|
6
|
+
*/
|
|
7
|
+
export type BatchVideoContextType = "asset_id";
|
|
8
|
+
export declare const BatchVideoContextType: {
|
|
9
|
+
readonly AssetId: "asset_id";
|
|
10
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TwelvelabsApi from "../index";
|
|
5
|
+
/**
|
|
6
|
+
* Response when creating a new batch.
|
|
7
|
+
*/
|
|
8
|
+
export interface CreateAnalyzeBatchResponse {
|
|
9
|
+
/** The unique identifier of the batch. */
|
|
10
|
+
batchId: string;
|
|
11
|
+
status: TwelvelabsApi.BatchStatus;
|
|
12
|
+
/** The number of items submitted in the batch. */
|
|
13
|
+
totalItems: number;
|
|
14
|
+
/** The date and time, in the RFC 3339 format, when the batch was created. */
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
/** The date and time, in the RFC 3339 format, when the batch expires (the `created_at` field value plus 24 hours). Unfinished items at expiration are canceled. Items that finished before then remain retrievable for 30 days after creation, when the batch and its results are deleted. */
|
|
17
|
+
expiresAt: Date;
|
|
18
|
+
/** One entry per submitted item. Each entry pairs the unique task identifier generated by the platform with the custom identifier you provided when you created the batch. */
|
|
19
|
+
items: TwelvelabsApi.CreatedBatchItem[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* One submitted item in the Create a batch response.
|
|
6
|
+
*/
|
|
7
|
+
export interface CreatedBatchItem {
|
|
8
|
+
/** The unique task identifier generated by the platform for this item. Use this value with the [`GET`](/v1.3/api-reference/analyze-videos/retrieve-analysis-task-status-results) method of the `/analyze/tasks/{task_id}` endpoint to retrieve the task's status and results. */
|
|
9
|
+
taskId: string;
|
|
10
|
+
/** The custom identifier you provided when you created the batch. If you did not provide one, this field is `null`. */
|
|
11
|
+
customId?: string;
|
|
12
|
+
}
|
package/api/types/index.d.ts
CHANGED
|
@@ -161,6 +161,20 @@ export * from "./AnalyzeTaskResultUsage";
|
|
|
161
161
|
export * from "./AnalyzeTaskResult";
|
|
162
162
|
export * from "./AnalyzeTaskError";
|
|
163
163
|
export * from "./AnalyzeTaskWebhookInfo";
|
|
164
|
+
export * from "./BatchStatus";
|
|
165
|
+
export * from "./BatchItemStatus";
|
|
166
|
+
export * from "./BatchPrompt";
|
|
167
|
+
export * from "./BatchDefaults";
|
|
168
|
+
export * from "./BatchVideoContextType";
|
|
169
|
+
export * from "./BatchVideoContext";
|
|
170
|
+
export * from "./BatchItemRequest";
|
|
171
|
+
export * from "./CreateAnalyzeBatchResponse";
|
|
172
|
+
export * from "./CreatedBatchItem";
|
|
173
|
+
export * from "./AnalyzeBatchSummaryAnalysisMode";
|
|
174
|
+
export * from "./AnalyzeBatchSummary";
|
|
175
|
+
export * from "./AnalyzeBatchStatusResponse";
|
|
176
|
+
export * from "./BatchResultItem";
|
|
177
|
+
export * from "./BatchItemError";
|
|
164
178
|
export * from "./AssetMethod";
|
|
165
179
|
export * from "./AssetStatus";
|
|
166
180
|
export * from "./Asset";
|
package/api/types/index.js
CHANGED
|
@@ -177,6 +177,20 @@ __exportStar(require("./AnalyzeTaskResultUsage"), exports);
|
|
|
177
177
|
__exportStar(require("./AnalyzeTaskResult"), exports);
|
|
178
178
|
__exportStar(require("./AnalyzeTaskError"), exports);
|
|
179
179
|
__exportStar(require("./AnalyzeTaskWebhookInfo"), exports);
|
|
180
|
+
__exportStar(require("./BatchStatus"), exports);
|
|
181
|
+
__exportStar(require("./BatchItemStatus"), exports);
|
|
182
|
+
__exportStar(require("./BatchPrompt"), exports);
|
|
183
|
+
__exportStar(require("./BatchDefaults"), exports);
|
|
184
|
+
__exportStar(require("./BatchVideoContextType"), exports);
|
|
185
|
+
__exportStar(require("./BatchVideoContext"), exports);
|
|
186
|
+
__exportStar(require("./BatchItemRequest"), exports);
|
|
187
|
+
__exportStar(require("./CreateAnalyzeBatchResponse"), exports);
|
|
188
|
+
__exportStar(require("./CreatedBatchItem"), exports);
|
|
189
|
+
__exportStar(require("./AnalyzeBatchSummaryAnalysisMode"), exports);
|
|
190
|
+
__exportStar(require("./AnalyzeBatchSummary"), exports);
|
|
191
|
+
__exportStar(require("./AnalyzeBatchStatusResponse"), exports);
|
|
192
|
+
__exportStar(require("./BatchResultItem"), exports);
|
|
193
|
+
__exportStar(require("./BatchItemError"), exports);
|
|
180
194
|
__exportStar(require("./AssetMethod"), exports);
|
|
181
195
|
__exportStar(require("./AssetStatus"), exports);
|
|
182
196
|
__exportStar(require("./Asset"), exports);
|
package/dist/Client.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ export declare class TwelvelabsApiClient {
|
|
|
69
69
|
* - Videos longer than 1 hour. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint instead.
|
|
70
70
|
* - Video segmentation with custom segment definitions. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint with the `model_name` parameter set to `pegasus1.5` instead.
|
|
71
71
|
*
|
|
72
|
+
* On the Free plan, you have a total of 600 minutes (10 hours) shared across indexing, analysis, and segmentation. For details, see the [Video hours and video count limits](/v1.3/docs/concepts/indexes#video-hours-and-video-count-limits) section.
|
|
73
|
+
*
|
|
72
74
|
* <Note title="Note">
|
|
73
75
|
* This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
74
76
|
* </Note>
|
|
@@ -95,6 +97,8 @@ export declare class TwelvelabsApiClient {
|
|
|
95
97
|
* - Videos longer than 1 hour. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint instead.
|
|
96
98
|
* - Video segmentation with custom segment definitions. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint with the `model_name` parameter set to `pegasus1.5` instead.
|
|
97
99
|
*
|
|
100
|
+
* On the Free plan, you have a total of 600 minutes (10 hours) shared across indexing, analysis, and segmentation. For details, see the [Video hours and video count limits](/v1.3/docs/concepts/indexes#video-hours-and-video-count-limits) section.
|
|
101
|
+
*
|
|
98
102
|
* <Note title="Note">
|
|
99
103
|
* This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
100
104
|
* </Note>
|
package/dist/Client.js
CHANGED
|
@@ -119,6 +119,8 @@ class TwelvelabsApiClient {
|
|
|
119
119
|
* - Videos longer than 1 hour. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint instead.
|
|
120
120
|
* - Video segmentation with custom segment definitions. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint with the `model_name` parameter set to `pegasus1.5` instead.
|
|
121
121
|
*
|
|
122
|
+
* On the Free plan, you have a total of 600 minutes (10 hours) shared across indexing, analysis, and segmentation. For details, see the [Video hours and video count limits](/v1.3/docs/concepts/indexes#video-hours-and-video-count-limits) section.
|
|
123
|
+
*
|
|
122
124
|
* <Note title="Note">
|
|
123
125
|
* This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
124
126
|
* </Note>
|
|
@@ -132,7 +134,7 @@ class TwelvelabsApiClient {
|
|
|
132
134
|
const _response = yield core.fetcher({
|
|
133
135
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, "analyze"),
|
|
134
136
|
method: "POST",
|
|
135
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
137
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.8", "User-Agent": "twelvelabs-js/1.2.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
136
138
|
contentType: "application/json",
|
|
137
139
|
requestType: "json",
|
|
138
140
|
body: Object.assign(Object.assign({}, serializers.AnalyzeStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { stream: true }),
|
|
@@ -215,6 +217,8 @@ class TwelvelabsApiClient {
|
|
|
215
217
|
* - Videos longer than 1 hour. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint instead.
|
|
216
218
|
* - Video segmentation with custom segment definitions. Use the [`POST`](/v1.3/api-reference/analyze-videos/create-async-analysis-task) method of the `/analyze/tasks` endpoint with the `model_name` parameter set to `pegasus1.5` instead.
|
|
217
219
|
*
|
|
220
|
+
* On the Free plan, you have a total of 600 minutes (10 hours) shared across indexing, analysis, and segmentation. For details, see the [Video hours and video count limits](/v1.3/docs/concepts/indexes#video-hours-and-video-count-limits) section.
|
|
221
|
+
*
|
|
218
222
|
* <Note title="Note">
|
|
219
223
|
* This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
|
|
220
224
|
* </Note>
|
|
@@ -238,7 +242,7 @@ class TwelvelabsApiClient {
|
|
|
238
242
|
const _response = yield core.fetcher({
|
|
239
243
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TwelvelabsApiEnvironment.Default, "analyze"),
|
|
240
244
|
method: "POST",
|
|
241
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
245
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.8", "User-Agent": "twelvelabs-js/1.2.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
242
246
|
contentType: "application/json",
|
|
243
247
|
requestType: "json",
|
|
244
248
|
body: Object.assign(Object.assign({}, serializers.AnalyzeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { stream: false }),
|
|
@@ -42,7 +42,7 @@ export interface AnalyzeRequest {
|
|
|
42
42
|
*
|
|
43
43
|
* | Model | Min | Max | Default |
|
|
44
44
|
* |-------|-----|-----|---------|
|
|
45
|
-
* | Pegasus 1.2 |
|
|
45
|
+
* | Pegasus 1.2 | 2 | 4,096 | 4,096 |
|
|
46
46
|
* | Pegasus 1.5 | 512 | 98,304 | 4,096 |
|
|
47
47
|
*/
|
|
48
48
|
maxTokens?: number;
|
|
@@ -42,7 +42,7 @@ export interface AnalyzeStreamRequest {
|
|
|
42
42
|
*
|
|
43
43
|
* | Model | Min | Max | Default |
|
|
44
44
|
* |-------|-----|-----|---------|
|
|
45
|
-
* | Pegasus 1.2 |
|
|
45
|
+
* | Pegasus 1.2 | 2 | 4,096 | 4,096 |
|
|
46
46
|
* | Pegasus 1.5 | 512 | 98,304 | 4,096 |
|
|
47
47
|
*/
|
|
48
48
|
maxTokens?: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as errors from "../../errors/index";
|
|
5
|
+
import * as TwelvelabsApi from "../index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare class GatewayTimeoutError extends errors.TwelvelabsApiError {
|
|
8
|
+
constructor(body: TwelvelabsApi.ErrorResponse, rawResponse?: core.RawResponse);
|
|
9
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.GatewayTimeoutError = void 0;
|
|
40
|
+
const errors = __importStar(require("../../errors/index"));
|
|
41
|
+
class GatewayTimeoutError extends errors.TwelvelabsApiError {
|
|
42
|
+
constructor(body, rawResponse) {
|
|
43
|
+
super({
|
|
44
|
+
message: "GatewayTimeoutError",
|
|
45
|
+
statusCode: 504,
|
|
46
|
+
body: body,
|
|
47
|
+
rawResponse: rawResponse,
|
|
48
|
+
});
|
|
49
|
+
Object.setPrototypeOf(this, GatewayTimeoutError.prototype);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.GatewayTimeoutError = GatewayTimeoutError;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as errors from "../../errors/index";
|
|
5
|
+
import * as TwelvelabsApi from "../index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare class ServiceUnavailableError extends errors.TwelvelabsApiError {
|
|
8
|
+
constructor(body: TwelvelabsApi.ErrorResponse, rawResponse?: core.RawResponse);
|
|
9
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ServiceUnavailableError = void 0;
|
|
40
|
+
const errors = __importStar(require("../../errors/index"));
|
|
41
|
+
class ServiceUnavailableError extends errors.TwelvelabsApiError {
|
|
42
|
+
constructor(body, rawResponse) {
|
|
43
|
+
super({
|
|
44
|
+
message: "ServiceUnavailableError",
|
|
45
|
+
statusCode: 503,
|
|
46
|
+
body: body,
|
|
47
|
+
rawResponse: rawResponse,
|
|
48
|
+
});
|
|
49
|
+
Object.setPrototypeOf(this, ServiceUnavailableError.prototype);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.ServiceUnavailableError = ServiceUnavailableError;
|
package/dist/api/errors/index.js
CHANGED
|
@@ -20,3 +20,5 @@ __exportStar(require("./InternalServerError"), exports);
|
|
|
20
20
|
__exportStar(require("./ConflictError"), exports);
|
|
21
21
|
__exportStar(require("./ForbiddenError"), exports);
|
|
22
22
|
__exportStar(require("./TooManyRequestsError"), exports);
|
|
23
|
+
__exportStar(require("./ServiceUnavailableError"), exports);
|
|
24
|
+
__exportStar(require("./GatewayTimeoutError"), exports);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../environments";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
6
|
import { Tasks } from "../resources/tasks/client/Client";
|
|
7
|
+
import { Batches } from "../resources/batches/client/Client";
|
|
7
8
|
export declare namespace AnalyzeAsync {
|
|
8
9
|
interface Options {
|
|
9
10
|
environment?: core.Supplier<environments.TwelvelabsApiEnvironment | string>;
|
|
@@ -15,6 +16,8 @@ export declare namespace AnalyzeAsync {
|
|
|
15
16
|
export declare class AnalyzeAsync {
|
|
16
17
|
protected readonly _options: AnalyzeAsync.Options;
|
|
17
18
|
protected _tasks: Tasks | undefined;
|
|
19
|
+
protected _batches: Batches | undefined;
|
|
18
20
|
constructor(_options: AnalyzeAsync.Options);
|
|
19
21
|
get tasks(): Tasks;
|
|
22
|
+
get batches(): Batches;
|
|
20
23
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AnalyzeAsync = void 0;
|
|
7
7
|
const Client_1 = require("../resources/tasks/client/Client");
|
|
8
|
+
const Client_2 = require("../resources/batches/client/Client");
|
|
8
9
|
class AnalyzeAsync {
|
|
9
10
|
constructor(_options) {
|
|
10
11
|
this._options = _options;
|
|
@@ -13,5 +14,9 @@ class AnalyzeAsync {
|
|
|
13
14
|
var _a;
|
|
14
15
|
return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_1.Tasks(this._options)));
|
|
15
16
|
}
|
|
17
|
+
get batches() {
|
|
18
|
+
var _a;
|
|
19
|
+
return ((_a = this._batches) !== null && _a !== void 0 ? _a : (this._batches = new Client_2.Batches(this._options)));
|
|
20
|
+
}
|
|
16
21
|
}
|
|
17
22
|
exports.AnalyzeAsync = AnalyzeAsync;
|