twelvelabs-js 1.2.5 → 1.2.6
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.js +2 -2
- package/api/client/requests/AnalyzeRequest.d.ts +6 -4
- package/api/client/requests/AnalyzeStreamRequest.d.ts +6 -4
- package/api/resources/analyzeAsync/resources/tasks/client/Client.js +4 -4
- package/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +6 -4
- package/api/resources/assets/client/Client.d.ts +29 -2
- package/api/resources/assets/client/Client.js +86 -8
- package/api/resources/assets/client/requests/AssetsReplaceUserMetadataRequest.d.ts +18 -0
- package/api/resources/assets/client/requests/AssetsReplaceUserMetadataRequest.js +5 -0
- package/api/resources/assets/client/requests/index.d.ts +1 -0
- 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.js +6 -6
- package/api/resources/indexes/resources/videos/client/Client.js +4 -4
- package/api/resources/indexes/resources/videos/types/VideosRetrieveResponse.d.ts +1 -1
- package/api/resources/multipartUpload/client/Client.js +5 -5
- package/api/resources/search/client/Client.js +2 -2
- package/api/resources/tasks/client/Client.js +4 -4
- package/api/types/AnalyzeTimeRange.d.ts +10 -2
- package/api/types/IndexedAssetDetailed.d.ts +1 -1
- package/api/types/UserMetadata.d.ts +2 -2
- package/dist/Client.js +2 -2
- package/dist/api/client/requests/AnalyzeRequest.d.ts +6 -4
- package/dist/api/client/requests/AnalyzeStreamRequest.d.ts +6 -4
- package/dist/api/resources/analyzeAsync/resources/tasks/client/Client.js +4 -4
- package/dist/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts +6 -4
- package/dist/api/resources/assets/client/Client.d.ts +29 -2
- package/dist/api/resources/assets/client/Client.js +86 -8
- package/dist/api/resources/assets/client/requests/AssetsReplaceUserMetadataRequest.d.ts +18 -0
- package/dist/api/resources/assets/client/requests/AssetsReplaceUserMetadataRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/index.d.ts +1 -0
- 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.js +6 -6
- package/dist/api/resources/indexes/resources/videos/client/Client.js +4 -4
- package/dist/api/resources/indexes/resources/videos/types/VideosRetrieveResponse.d.ts +1 -1
- 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.js +4 -4
- package/dist/api/types/AnalyzeTimeRange.d.ts +10 -2
- package/dist/api/types/IndexedAssetDetailed.d.ts +1 -1
- package/dist/api/types/UserMetadata.d.ts +2 -2
- package/dist/serialization/resources/assets/client/requests/AssetsReplaceUserMetadataRequest.d.ts +13 -0
- package/dist/serialization/resources/assets/client/requests/AssetsReplaceUserMetadataRequest.js +44 -0
- package/dist/serialization/resources/assets/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/assets/client/requests/index.js +3 -1
- package/dist/serialization/resources/indexes/resources/videos/types/VideosRetrieveResponse.d.ts +2 -1
- package/dist/serialization/resources/indexes/resources/videos/types/VideosRetrieveResponse.js +2 -1
- package/dist/serialization/types/IndexedAssetDetailed.d.ts +2 -1
- package/dist/serialization/types/IndexedAssetDetailed.js +2 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/resources/EmbedTasksWrapper.js +13 -8
- package/dist/wrapper/resources/TasksWrapper.js +13 -8
- package/package.json +1 -1
- package/reference.md +86 -2
- package/serialization/resources/assets/client/requests/AssetsReplaceUserMetadataRequest.d.ts +13 -0
- package/serialization/resources/assets/client/requests/AssetsReplaceUserMetadataRequest.js +44 -0
- package/serialization/resources/assets/client/requests/index.d.ts +1 -0
- package/serialization/resources/assets/client/requests/index.js +3 -1
- package/serialization/resources/indexes/resources/videos/types/VideosRetrieveResponse.d.ts +2 -1
- package/serialization/resources/indexes/resources/videos/types/VideosRetrieveResponse.js +2 -1
- package/serialization/types/IndexedAssetDetailed.d.ts +2 -1
- package/serialization/types/IndexedAssetDetailed.js +2 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/resources/EmbedTasksWrapper.js +13 -8
- package/wrapper/resources/TasksWrapper.js +13 -8
package/Client.js
CHANGED
|
@@ -132,7 +132,7 @@ class TwelvelabsApiClient {
|
|
|
132
132
|
const _response = yield core.fetcher({
|
|
133
133
|
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
134
|
method: "POST",
|
|
135
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
135
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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
136
|
contentType: "application/json",
|
|
137
137
|
requestType: "json",
|
|
138
138
|
body: Object.assign(Object.assign({}, serializers.AnalyzeStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { stream: true }),
|
|
@@ -238,7 +238,7 @@ class TwelvelabsApiClient {
|
|
|
238
238
|
const _response = yield core.fetcher({
|
|
239
239
|
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
240
|
method: "POST",
|
|
241
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
241
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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
242
|
contentType: "application/json",
|
|
243
243
|
requestType: "json",
|
|
244
244
|
body: Object.assign(Object.assign({}, serializers.AnalyzeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })), { stream: false }),
|
|
@@ -47,19 +47,21 @@ export interface AnalyzeRequest {
|
|
|
47
47
|
*/
|
|
48
48
|
maxTokens?: number;
|
|
49
49
|
/**
|
|
50
|
-
* Start of the analysis window, in seconds. Use with `end_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
50
|
+
* Start of the analysis window, as an absolute timestamp in seconds, based on the video's internal metadata. Use with `end_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
51
51
|
*
|
|
52
52
|
* <Note title="Notes">
|
|
53
|
-
* - If omitted, defaults to
|
|
53
|
+
* - If omitted, defaults to the video's internal start time.
|
|
54
|
+
* - Most videos start at 0, but some (for example, from cameras or broadcast recordings) may have a non-zero start time. To find the value, run `ffprobe -v error -show_entries format=start_time,duration -of default=noprint_wrappers=1 your_video.mp4`.
|
|
54
55
|
* - Must be less than `end_time` and less than the video duration. The clip (`end_time - start_time`) must be at least `4` seconds.
|
|
55
56
|
* </Note>
|
|
56
57
|
*/
|
|
57
58
|
startTime?: number;
|
|
58
59
|
/**
|
|
59
|
-
* End of the analysis window, in seconds. Use with `start_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
60
|
+
* End of the analysis window, as an absolute timestamp in seconds, based on the video's internal metadata. Use with `start_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
60
61
|
*
|
|
61
62
|
* <Note title="Notes">
|
|
62
|
-
* - If omitted, defaults to the video duration.
|
|
63
|
+
* - If omitted, defaults to the video's internal start time plus its duration.
|
|
64
|
+
* - Most videos start at 0, but some (for example, from cameras or broadcast recordings) may have a non-zero start time. To find the value, run `ffprobe -v error -show_entries format=start_time,duration -of default=noprint_wrappers=1 your_video.mp4`.
|
|
63
65
|
* - Must be greater than `start_time` and less than or equal to the video duration. The clip (`end_time - start_time`) must be at least `4` seconds.
|
|
64
66
|
* </Note>
|
|
65
67
|
*/
|
|
@@ -47,19 +47,21 @@ export interface AnalyzeStreamRequest {
|
|
|
47
47
|
*/
|
|
48
48
|
maxTokens?: number;
|
|
49
49
|
/**
|
|
50
|
-
* Start of the analysis window, in seconds. Use with `end_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
50
|
+
* Start of the analysis window, as an absolute timestamp in seconds, based on the video's internal metadata. Use with `end_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
51
51
|
*
|
|
52
52
|
* <Note title="Notes">
|
|
53
|
-
* - If omitted, defaults to
|
|
53
|
+
* - If omitted, defaults to the video's internal start time.
|
|
54
|
+
* - Most videos start at 0, but some (for example, from cameras or broadcast recordings) may have a non-zero start time. To find the value, run `ffprobe -v error -show_entries format=start_time,duration -of default=noprint_wrappers=1 your_video.mp4`.
|
|
54
55
|
* - Must be less than `end_time` and less than the video duration. The clip (`end_time - start_time`) must be at least `4` seconds.
|
|
55
56
|
* </Note>
|
|
56
57
|
*/
|
|
57
58
|
startTime?: number;
|
|
58
59
|
/**
|
|
59
|
-
* End of the analysis window, in seconds. Use with `start_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
60
|
+
* End of the analysis window, as an absolute timestamp in seconds, based on the video's internal metadata. Use with `start_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
60
61
|
*
|
|
61
62
|
* <Note title="Notes">
|
|
62
|
-
* - If omitted, defaults to the video duration.
|
|
63
|
+
* - If omitted, defaults to the video's internal start time plus its duration.
|
|
64
|
+
* - Most videos start at 0, but some (for example, from cameras or broadcast recordings) may have a non-zero start time. To find the value, run `ffprobe -v error -show_entries format=start_time,duration -of default=noprint_wrappers=1 your_video.mp4`.
|
|
63
65
|
* - Must be greater than `start_time` and less than or equal to the video duration. The clip (`end_time - start_time`) must be at least `4` seconds.
|
|
64
66
|
* </Note>
|
|
65
67
|
*/
|
|
@@ -112,7 +112,7 @@ class Tasks {
|
|
|
112
112
|
const _response = yield core.fetcher({
|
|
113
113
|
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/tasks"),
|
|
114
114
|
method: "GET",
|
|
115
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
115
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
queryParameters: _queryParams,
|
|
118
118
|
requestType: "json",
|
|
@@ -373,7 +373,7 @@ class Tasks {
|
|
|
373
373
|
const _response = yield core.fetcher({
|
|
374
374
|
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/tasks"),
|
|
375
375
|
method: "POST",
|
|
376
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
376
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
377
377
|
contentType: "application/json",
|
|
378
378
|
requestType: "json",
|
|
379
379
|
body: serializers.analyzeAsync.CreateAsyncAnalyzeRequest.jsonOrThrow(request, {
|
|
@@ -454,7 +454,7 @@ class Tasks {
|
|
|
454
454
|
const _response = yield core.fetcher({
|
|
455
455
|
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/tasks/${encodeURIComponent(taskId)}`),
|
|
456
456
|
method: "GET",
|
|
457
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
457
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
458
458
|
contentType: "application/json",
|
|
459
459
|
requestType: "json",
|
|
460
460
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
|
@@ -522,7 +522,7 @@ class Tasks {
|
|
|
522
522
|
const _response = yield core.fetcher({
|
|
523
523
|
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/tasks/${encodeURIComponent(taskId)}`),
|
|
524
524
|
method: "DELETE",
|
|
525
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
525
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
526
526
|
contentType: "application/json",
|
|
527
527
|
requestType: "json",
|
|
528
528
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
package/api/resources/analyzeAsync/resources/tasks/client/requests/CreateAsyncAnalyzeRequest.d.ts
CHANGED
|
@@ -244,10 +244,11 @@ export interface CreateAsyncAnalyzeRequest {
|
|
|
244
244
|
*/
|
|
245
245
|
maxSegmentDuration?: number;
|
|
246
246
|
/**
|
|
247
|
-
* Start of the analysis window, in seconds. Use with `end_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
247
|
+
* Start of the analysis window, as an absolute timestamp in seconds, based on the video's internal metadata. Use with `end_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
248
248
|
*
|
|
249
249
|
* <Note title="Notes">
|
|
250
|
-
* - If omitted, defaults to
|
|
250
|
+
* - If omitted, defaults to the video's internal start time.
|
|
251
|
+
* - Most videos start at 0, but some (for example, from cameras or broadcast recordings) may have a non-zero start time. To find the value, run `ffprobe -v error -show_entries format=start_time,duration -of default=noprint_wrappers=1 your_video.mp4`.
|
|
251
252
|
* - Must be less than `end_time` and less than the video duration. The clip (`end_time - start_time`) must be at least `4` seconds.
|
|
252
253
|
* - Mutually exclusive with `response_format.segment_definitions[].time_ranges`.
|
|
253
254
|
* - Together with `end_time`, this parameter determines the billable video duration. If you omit both, billing uses the full video duration. For details, see the [Frequently asked questions](/v1.3/docs/resources/frequently-asked-questions#how-is-video-segmentation-priced) page.
|
|
@@ -255,10 +256,11 @@ export interface CreateAsyncAnalyzeRequest {
|
|
|
255
256
|
*/
|
|
256
257
|
startTime?: number;
|
|
257
258
|
/**
|
|
258
|
-
* End of the analysis window, in seconds. Use with `start_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
259
|
+
* End of the analysis window, as an absolute timestamp in seconds, based on the video's internal metadata. Use with `start_time` to analyze only a portion of the video. Requires `model_name` set to `pegasus1.5`.
|
|
259
260
|
*
|
|
260
261
|
* <Note title="Notes">
|
|
261
|
-
* - If omitted, defaults to the video duration.
|
|
262
|
+
* - If omitted, defaults to the video's internal start time plus its duration.
|
|
263
|
+
* - Most videos start at 0, but some (for example, from cameras or broadcast recordings) may have a non-zero start time. To find the value, run `ffprobe -v error -show_entries format=start_time,duration -of default=noprint_wrappers=1 your_video.mp4`.
|
|
262
264
|
* - Must be greater than `start_time` and less than or equal to the video duration. The clip (`end_time - start_time`) must be at least `4` seconds.
|
|
263
265
|
* - Mutually exclusive with `response_format.segment_definitions[].time_ranges`.
|
|
264
266
|
* - Together with `start_time`, this parameter determines the billable video duration. If you omit both, billing uses the full video duration. For details, see the [Frequently asked questions](/v1.3/docs/resources/frequently-asked-questions#how-is-video-segmentation-priced) page.
|
|
@@ -116,7 +116,34 @@ export declare class Assets {
|
|
|
116
116
|
delete(assetId: string, request?: TwelvelabsApi.AssetsDeleteRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<void>;
|
|
117
117
|
private __delete;
|
|
118
118
|
/**
|
|
119
|
-
* This method
|
|
119
|
+
* This method replaces the entire user-defined metadata of the specified asset. Unlike the [`PATCH`](/v1.3/api-reference/upload-content/direct-uploads/update-user-metadata) method, which merges your changes with the existing metadata, this method overwrites the stored value in full:
|
|
120
|
+
* - A key with a value creates or replaces that key.
|
|
121
|
+
* - A key set to an empty string (`""`) or `null` is ignored.
|
|
122
|
+
* - A key you omit from the request body is removed.
|
|
123
|
+
*
|
|
124
|
+
* To clear all metadata, send an empty object (`{}`) in the `user_metadata` field. This produces the same result as the [`DELETE`](/v1.3/api-reference/upload-content/direct-uploads/delete-user-metadata) method.
|
|
125
|
+
*
|
|
126
|
+
* @param {string} assetId - The unique identifier of the asset whose user-defined metadata to replace.
|
|
127
|
+
* @param {TwelvelabsApi.AssetsReplaceUserMetadataRequest} request
|
|
128
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
|
+
*
|
|
130
|
+
* @throws {@link TwelvelabsApi.BadRequestError}
|
|
131
|
+
* @throws {@link TwelvelabsApi.NotFoundError}
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* await client.assets.replaceUserMetadata("6298d673f1090f1100476d4c", {
|
|
135
|
+
* userMetadata: {
|
|
136
|
+
* "category": "recentlyAdded",
|
|
137
|
+
* "batchNumber": 5,
|
|
138
|
+
* "rating": 9.3,
|
|
139
|
+
* "needsReview": true
|
|
140
|
+
* }
|
|
141
|
+
* })
|
|
142
|
+
*/
|
|
143
|
+
replaceUserMetadata(assetId: string, request: TwelvelabsApi.AssetsReplaceUserMetadataRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<void>;
|
|
144
|
+
private __replaceUserMetadata;
|
|
145
|
+
/**
|
|
146
|
+
* This method deletes the user-defined metadata of the specified asset. To achieve the same result, you can also send an empty object (`{}`) in the `user_metadata` field of the [`PUT`](/v1.3/api-reference/upload-content/direct-uploads/replace-asset-user-metadata) method.
|
|
120
147
|
*
|
|
121
148
|
* This action cannot be undone.
|
|
122
149
|
*
|
|
@@ -138,7 +165,7 @@ export declare class Assets {
|
|
|
138
165
|
* - A key set to an empty string (`""`) is ignored.
|
|
139
166
|
* - A key you omit from the request keeps its current value.
|
|
140
167
|
*
|
|
141
|
-
* To replace all metadata
|
|
168
|
+
* To replace all metadata in a single call, use the [`PUT`](/v1.3/api-reference/upload-content/direct-uploads/replace-asset-user-metadata) method of the `/assets/{asset_id}/user-metadata` endpoint instead.
|
|
142
169
|
*
|
|
143
170
|
* @param {string} assetId - The unique identifier of the asset whose user-defined metadata to update.
|
|
144
171
|
* @param {TwelvelabsApi.AssetsUpdateUserMetadataRequest} request
|
|
@@ -112,7 +112,7 @@ class Assets {
|
|
|
112
112
|
const _response = yield core.fetcher({
|
|
113
113
|
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, "assets"),
|
|
114
114
|
method: "GET",
|
|
115
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
115
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
116
116
|
contentType: "application/json",
|
|
117
117
|
queryParameters: _queryParams,
|
|
118
118
|
requestType: "json",
|
|
@@ -237,7 +237,7 @@ class Assets {
|
|
|
237
237
|
const _response = yield core.fetcher({
|
|
238
238
|
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, "assets"),
|
|
239
239
|
method: "POST",
|
|
240
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
240
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
241
241
|
requestType: "file",
|
|
242
242
|
duplex: _maybeEncodedRequest.duplex,
|
|
243
243
|
body: _maybeEncodedRequest.body,
|
|
@@ -305,7 +305,7 @@ class Assets {
|
|
|
305
305
|
const _response = yield core.fetcher({
|
|
306
306
|
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, `assets/${encodeURIComponent(assetId)}`),
|
|
307
307
|
method: "GET",
|
|
308
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
308
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
309
309
|
contentType: "application/json",
|
|
310
310
|
requestType: "json",
|
|
311
311
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
|
@@ -387,7 +387,7 @@ class Assets {
|
|
|
387
387
|
const _response = yield core.fetcher({
|
|
388
388
|
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, `assets/${encodeURIComponent(assetId)}`),
|
|
389
389
|
method: "DELETE",
|
|
390
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
390
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
391
391
|
contentType: "application/json",
|
|
392
392
|
queryParameters: _queryParams,
|
|
393
393
|
requestType: "json",
|
|
@@ -430,7 +430,85 @@ class Assets {
|
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
/**
|
|
433
|
-
* This method
|
|
433
|
+
* This method replaces the entire user-defined metadata of the specified asset. Unlike the [`PATCH`](/v1.3/api-reference/upload-content/direct-uploads/update-user-metadata) method, which merges your changes with the existing metadata, this method overwrites the stored value in full:
|
|
434
|
+
* - A key with a value creates or replaces that key.
|
|
435
|
+
* - A key set to an empty string (`""`) or `null` is ignored.
|
|
436
|
+
* - A key you omit from the request body is removed.
|
|
437
|
+
*
|
|
438
|
+
* To clear all metadata, send an empty object (`{}`) in the `user_metadata` field. This produces the same result as the [`DELETE`](/v1.3/api-reference/upload-content/direct-uploads/delete-user-metadata) method.
|
|
439
|
+
*
|
|
440
|
+
* @param {string} assetId - The unique identifier of the asset whose user-defined metadata to replace.
|
|
441
|
+
* @param {TwelvelabsApi.AssetsReplaceUserMetadataRequest} request
|
|
442
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
443
|
+
*
|
|
444
|
+
* @throws {@link TwelvelabsApi.BadRequestError}
|
|
445
|
+
* @throws {@link TwelvelabsApi.NotFoundError}
|
|
446
|
+
*
|
|
447
|
+
* @example
|
|
448
|
+
* await client.assets.replaceUserMetadata("6298d673f1090f1100476d4c", {
|
|
449
|
+
* userMetadata: {
|
|
450
|
+
* "category": "recentlyAdded",
|
|
451
|
+
* "batchNumber": 5,
|
|
452
|
+
* "rating": 9.3,
|
|
453
|
+
* "needsReview": true
|
|
454
|
+
* }
|
|
455
|
+
* })
|
|
456
|
+
*/
|
|
457
|
+
replaceUserMetadata(assetId, request, requestOptions) {
|
|
458
|
+
return core.HttpResponsePromise.fromPromise(this.__replaceUserMetadata(assetId, request, requestOptions));
|
|
459
|
+
}
|
|
460
|
+
__replaceUserMetadata(assetId, request, requestOptions) {
|
|
461
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
462
|
+
var _a, _b;
|
|
463
|
+
const _response = yield core.fetcher({
|
|
464
|
+
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, `assets/${encodeURIComponent(assetId)}/user-metadata`),
|
|
465
|
+
method: "PUT",
|
|
466
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
467
|
+
contentType: "application/json",
|
|
468
|
+
requestType: "json",
|
|
469
|
+
body: serializers.AssetsReplaceUserMetadataRequest.jsonOrThrow(request, {
|
|
470
|
+
unrecognizedObjectKeys: "strip",
|
|
471
|
+
}),
|
|
472
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
|
473
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
474
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
475
|
+
});
|
|
476
|
+
if (_response.ok) {
|
|
477
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
478
|
+
}
|
|
479
|
+
if (_response.error.reason === "status-code") {
|
|
480
|
+
switch (_response.error.statusCode) {
|
|
481
|
+
case 400:
|
|
482
|
+
throw new TwelvelabsApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
483
|
+
case 404:
|
|
484
|
+
throw new TwelvelabsApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
485
|
+
default:
|
|
486
|
+
throw new errors.TwelvelabsApiError({
|
|
487
|
+
statusCode: _response.error.statusCode,
|
|
488
|
+
body: _response.error.body,
|
|
489
|
+
rawResponse: _response.rawResponse,
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
switch (_response.error.reason) {
|
|
494
|
+
case "non-json":
|
|
495
|
+
throw new errors.TwelvelabsApiError({
|
|
496
|
+
statusCode: _response.error.statusCode,
|
|
497
|
+
body: _response.error.rawBody,
|
|
498
|
+
rawResponse: _response.rawResponse,
|
|
499
|
+
});
|
|
500
|
+
case "timeout":
|
|
501
|
+
throw new errors.TwelvelabsApiTimeoutError("Timeout exceeded when calling PUT /assets/{asset_id}/user-metadata.");
|
|
502
|
+
case "unknown":
|
|
503
|
+
throw new errors.TwelvelabsApiError({
|
|
504
|
+
message: _response.error.errorMessage,
|
|
505
|
+
rawResponse: _response.rawResponse,
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* This method deletes the user-defined metadata of the specified asset. To achieve the same result, you can also send an empty object (`{}`) in the `user_metadata` field of the [`PUT`](/v1.3/api-reference/upload-content/direct-uploads/replace-asset-user-metadata) method.
|
|
434
512
|
*
|
|
435
513
|
* This action cannot be undone.
|
|
436
514
|
*
|
|
@@ -452,7 +530,7 @@ class Assets {
|
|
|
452
530
|
const _response = yield core.fetcher({
|
|
453
531
|
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, `assets/${encodeURIComponent(assetId)}/user-metadata`),
|
|
454
532
|
method: "DELETE",
|
|
455
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
533
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
456
534
|
contentType: "application/json",
|
|
457
535
|
requestType: "json",
|
|
458
536
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
|
@@ -500,7 +578,7 @@ class Assets {
|
|
|
500
578
|
* - A key set to an empty string (`""`) is ignored.
|
|
501
579
|
* - A key you omit from the request keeps its current value.
|
|
502
580
|
*
|
|
503
|
-
* To replace all metadata
|
|
581
|
+
* To replace all metadata in a single call, use the [`PUT`](/v1.3/api-reference/upload-content/direct-uploads/replace-asset-user-metadata) method of the `/assets/{asset_id}/user-metadata` endpoint instead.
|
|
504
582
|
*
|
|
505
583
|
* @param {string} assetId - The unique identifier of the asset whose user-defined metadata to update.
|
|
506
584
|
* @param {TwelvelabsApi.AssetsUpdateUserMetadataRequest} request
|
|
@@ -528,7 +606,7 @@ class Assets {
|
|
|
528
606
|
const _response = yield core.fetcher({
|
|
529
607
|
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, `assets/${encodeURIComponent(assetId)}/user-metadata`),
|
|
530
608
|
method: "PATCH",
|
|
531
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
609
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
532
610
|
contentType: "application/json",
|
|
533
611
|
requestType: "json",
|
|
534
612
|
body: serializers.AssetsUpdateUserMetadataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as TwelvelabsApi from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* userMetadata: {
|
|
9
|
+
* "category": "recentlyAdded",
|
|
10
|
+
* "batchNumber": 5,
|
|
11
|
+
* "rating": 9.3,
|
|
12
|
+
* "needsReview": true
|
|
13
|
+
* }
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
export interface AssetsReplaceUserMetadataRequest {
|
|
17
|
+
userMetadata: TwelvelabsApi.UserMetadata;
|
|
18
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { type AssetsListRequest } from "./AssetsListRequest";
|
|
2
2
|
export { type AssetsCreateRequest } from "./AssetsCreateRequest";
|
|
3
3
|
export { type AssetsDeleteRequest } from "./AssetsDeleteRequest";
|
|
4
|
+
export { type AssetsReplaceUserMetadataRequest } from "./AssetsReplaceUserMetadataRequest";
|
|
4
5
|
export { type AssetsUpdateUserMetadataRequest } from "./AssetsUpdateUserMetadataRequest";
|
|
@@ -141,7 +141,7 @@ class Embed {
|
|
|
141
141
|
const _response = yield core.fetcher({
|
|
142
142
|
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, "embed"),
|
|
143
143
|
method: "POST",
|
|
144
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
144
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
145
145
|
requestType: "file",
|
|
146
146
|
duplex: _maybeEncodedRequest.duplex,
|
|
147
147
|
body: _maybeEncodedRequest.body,
|
|
@@ -108,7 +108,7 @@ class Tasks {
|
|
|
108
108
|
const _response = yield core.fetcher({
|
|
109
109
|
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, "embed/tasks"),
|
|
110
110
|
method: "GET",
|
|
111
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
111
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
112
112
|
contentType: "application/json",
|
|
113
113
|
queryParameters: _queryParams,
|
|
114
114
|
requestType: "json",
|
|
@@ -239,7 +239,7 @@ class Tasks {
|
|
|
239
239
|
const _response = yield core.fetcher({
|
|
240
240
|
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, "embed/tasks"),
|
|
241
241
|
method: "POST",
|
|
242
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
242
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
243
243
|
requestType: "file",
|
|
244
244
|
duplex: _maybeEncodedRequest.duplex,
|
|
245
245
|
body: _maybeEncodedRequest.body,
|
|
@@ -315,7 +315,7 @@ class Tasks {
|
|
|
315
315
|
const _response = yield core.fetcher({
|
|
316
316
|
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, `embed/tasks/${encodeURIComponent(taskId)}/status`),
|
|
317
317
|
method: "GET",
|
|
318
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
318
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
319
319
|
contentType: "application/json",
|
|
320
320
|
requestType: "json",
|
|
321
321
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
|
@@ -398,7 +398,7 @@ class Tasks {
|
|
|
398
398
|
const _response = yield core.fetcher({
|
|
399
399
|
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, `embed/tasks/${encodeURIComponent(taskId)}`),
|
|
400
400
|
method: "GET",
|
|
401
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
401
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
402
402
|
contentType: "application/json",
|
|
403
403
|
queryParameters: _queryParams,
|
|
404
404
|
requestType: "json",
|
|
@@ -285,7 +285,7 @@ class V2 {
|
|
|
285
285
|
const _response = yield core.fetcher({
|
|
286
286
|
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, "embed-v2"),
|
|
287
287
|
method: "POST",
|
|
288
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
288
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
289
289
|
contentType: "application/json",
|
|
290
290
|
requestType: "json",
|
|
291
291
|
body: serializers.embed.CreateEmbeddingsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -105,7 +105,7 @@ class Tasks {
|
|
|
105
105
|
const _response = yield core.fetcher({
|
|
106
106
|
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, "embed-v2/tasks"),
|
|
107
107
|
method: "GET",
|
|
108
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
108
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
109
109
|
contentType: "application/json",
|
|
110
110
|
queryParameters: _queryParams,
|
|
111
111
|
requestType: "json",
|
|
@@ -271,7 +271,7 @@ class Tasks {
|
|
|
271
271
|
const _response = yield core.fetcher({
|
|
272
272
|
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, "embed-v2/tasks"),
|
|
273
273
|
method: "POST",
|
|
274
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
274
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
275
275
|
contentType: "application/json",
|
|
276
276
|
requestType: "json",
|
|
277
277
|
body: serializers.embed.v2.CreateAsyncEmbeddingRequest.jsonOrThrow(request, {
|
|
@@ -354,7 +354,7 @@ class Tasks {
|
|
|
354
354
|
const _response = yield core.fetcher({
|
|
355
355
|
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, `embed-v2/tasks/${encodeURIComponent(taskId)}`),
|
|
356
356
|
method: "GET",
|
|
357
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
357
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
358
358
|
contentType: "application/json",
|
|
359
359
|
requestType: "json",
|
|
360
360
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
|
@@ -107,7 +107,7 @@ class EntityCollections {
|
|
|
107
107
|
const _response = yield core.fetcher({
|
|
108
108
|
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, "entity-collections"),
|
|
109
109
|
method: "GET",
|
|
110
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
110
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
111
111
|
contentType: "application/json",
|
|
112
112
|
queryParameters: _queryParams,
|
|
113
113
|
requestType: "json",
|
|
@@ -190,7 +190,7 @@ class EntityCollections {
|
|
|
190
190
|
const _response = yield core.fetcher({
|
|
191
191
|
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, "entity-collections"),
|
|
192
192
|
method: "POST",
|
|
193
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
193
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
194
194
|
contentType: "application/json",
|
|
195
195
|
requestType: "json",
|
|
196
196
|
body: serializers.EntityCollectionsCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -258,7 +258,7 @@ class EntityCollections {
|
|
|
258
258
|
const _response = yield core.fetcher({
|
|
259
259
|
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, `entity-collections/${encodeURIComponent(entityCollectionId)}`),
|
|
260
260
|
method: "GET",
|
|
261
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
261
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
262
262
|
contentType: "application/json",
|
|
263
263
|
requestType: "json",
|
|
264
264
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
|
@@ -325,7 +325,7 @@ class EntityCollections {
|
|
|
325
325
|
const _response = yield core.fetcher({
|
|
326
326
|
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, `entity-collections/${encodeURIComponent(entityCollectionId)}`),
|
|
327
327
|
method: "DELETE",
|
|
328
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
328
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
329
329
|
contentType: "application/json",
|
|
330
330
|
requestType: "json",
|
|
331
331
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 600000,
|
|
@@ -385,7 +385,7 @@ class EntityCollections {
|
|
|
385
385
|
const _response = yield core.fetcher({
|
|
386
386
|
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, `entity-collections/${encodeURIComponent(entityCollectionId)}`),
|
|
387
387
|
method: "PATCH",
|
|
388
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.
|
|
388
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "twelvelabs-js", "X-Fern-SDK-Version": "1.2.6", "User-Agent": "twelvelabs-js/1.2.6", "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),
|
|
389
389
|
contentType: "application/json",
|
|
390
390
|
requestType: "json",
|
|
391
391
|
body: serializers.EntityCollectionsUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|