|
1 | 1 | // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
2 | 2 |
|
3 | 3 | import { APIResource } from '../../../core/resource'; |
| 4 | +import * as FilesAPI from '../../files/files'; |
4 | 5 | import { APIPromise } from '../../../core/api-promise'; |
5 | 6 | import { type Uploadable } from '../../../core/uploads'; |
6 | 7 | import { RequestOptions } from '../../../internal/request-options'; |
@@ -156,7 +157,7 @@ export interface FileUploadResponse { |
156 | 157 | * Legacy metadata. Send `metadata` in `responseFields` in API request to get |
157 | 158 | * metadata in the upload API response. |
158 | 159 | */ |
159 | | - metadata?: FileUploadResponse.Metadata; |
| 160 | + metadata?: FilesAPI.Metadata; |
160 | 161 |
|
161 | 162 | /** |
162 | 163 | * Name of the asset. |
@@ -240,229 +241,6 @@ export namespace FileUploadResponse { |
240 | 241 | 'remove-bg'?: 'success' | 'pending' | 'failed'; |
241 | 242 | } |
242 | 243 |
|
243 | | - /** |
244 | | - * Legacy metadata. Send `metadata` in `responseFields` in API request to get |
245 | | - * metadata in the upload API response. |
246 | | - */ |
247 | | - export interface Metadata { |
248 | | - /** |
249 | | - * The audio codec used in the video (only for video). |
250 | | - */ |
251 | | - audioCodec?: string; |
252 | | - |
253 | | - /** |
254 | | - * The bit rate of the video in kbps (only for video). |
255 | | - */ |
256 | | - bitRate?: number; |
257 | | - |
258 | | - /** |
259 | | - * The density of the image in DPI. |
260 | | - */ |
261 | | - density?: number; |
262 | | - |
263 | | - /** |
264 | | - * The duration of the video in seconds (only for video). |
265 | | - */ |
266 | | - duration?: number; |
267 | | - |
268 | | - exif?: Metadata.Exif; |
269 | | - |
270 | | - /** |
271 | | - * The format of the file (e.g., 'jpg', 'mp4'). |
272 | | - */ |
273 | | - format?: string; |
274 | | - |
275 | | - /** |
276 | | - * Indicates if the image has a color profile. |
277 | | - */ |
278 | | - hasColorProfile?: boolean; |
279 | | - |
280 | | - /** |
281 | | - * Indicates if the image contains transparent areas. |
282 | | - */ |
283 | | - hasTransparency?: boolean; |
284 | | - |
285 | | - /** |
286 | | - * The height of the image or video in pixels. |
287 | | - */ |
288 | | - height?: number; |
289 | | - |
290 | | - /** |
291 | | - * Perceptual hash of the image. |
292 | | - */ |
293 | | - pHash?: string; |
294 | | - |
295 | | - /** |
296 | | - * The quality indicator of the image. |
297 | | - */ |
298 | | - quality?: number; |
299 | | - |
300 | | - /** |
301 | | - * The file size in bytes. |
302 | | - */ |
303 | | - size?: number; |
304 | | - |
305 | | - /** |
306 | | - * The video codec used in the video (only for video). |
307 | | - */ |
308 | | - videoCodec?: string; |
309 | | - |
310 | | - /** |
311 | | - * The width of the image or video in pixels. |
312 | | - */ |
313 | | - width?: number; |
314 | | - } |
315 | | - |
316 | | - export namespace Metadata { |
317 | | - export interface Exif { |
318 | | - /** |
319 | | - * Object containing Exif details. |
320 | | - */ |
321 | | - exif?: Exif.Exif; |
322 | | - |
323 | | - /** |
324 | | - * Object containing GPS information. |
325 | | - */ |
326 | | - gps?: Exif.Gps; |
327 | | - |
328 | | - /** |
329 | | - * Object containing EXIF image information. |
330 | | - */ |
331 | | - image?: Exif.Image; |
332 | | - |
333 | | - /** |
334 | | - * JSON object. |
335 | | - */ |
336 | | - interoperability?: Exif.Interoperability; |
337 | | - |
338 | | - makernote?: { [key: string]: unknown }; |
339 | | - |
340 | | - /** |
341 | | - * Object containing Thumbnail information. |
342 | | - */ |
343 | | - thumbnail?: Exif.Thumbnail; |
344 | | - } |
345 | | - |
346 | | - export namespace Exif { |
347 | | - /** |
348 | | - * Object containing Exif details. |
349 | | - */ |
350 | | - export interface Exif { |
351 | | - ApertureValue?: number; |
352 | | - |
353 | | - ColorSpace?: number; |
354 | | - |
355 | | - CreateDate?: string; |
356 | | - |
357 | | - CustomRendered?: number; |
358 | | - |
359 | | - DateTimeOriginal?: string; |
360 | | - |
361 | | - ExifImageHeight?: number; |
362 | | - |
363 | | - ExifImageWidth?: number; |
364 | | - |
365 | | - ExifVersion?: string; |
366 | | - |
367 | | - ExposureCompensation?: number; |
368 | | - |
369 | | - ExposureMode?: number; |
370 | | - |
371 | | - ExposureProgram?: number; |
372 | | - |
373 | | - ExposureTime?: number; |
374 | | - |
375 | | - Flash?: number; |
376 | | - |
377 | | - FlashpixVersion?: string; |
378 | | - |
379 | | - FNumber?: number; |
380 | | - |
381 | | - FocalLength?: number; |
382 | | - |
383 | | - FocalPlaneResolutionUnit?: number; |
384 | | - |
385 | | - FocalPlaneXResolution?: number; |
386 | | - |
387 | | - FocalPlaneYResolution?: number; |
388 | | - |
389 | | - InteropOffset?: number; |
390 | | - |
391 | | - ISO?: number; |
392 | | - |
393 | | - MeteringMode?: number; |
394 | | - |
395 | | - SceneCaptureType?: number; |
396 | | - |
397 | | - ShutterSpeedValue?: number; |
398 | | - |
399 | | - SubSecTime?: string; |
400 | | - |
401 | | - WhiteBalance?: number; |
402 | | - } |
403 | | - |
404 | | - /** |
405 | | - * Object containing GPS information. |
406 | | - */ |
407 | | - export interface Gps { |
408 | | - GPSVersionID?: Array<number>; |
409 | | - } |
410 | | - |
411 | | - /** |
412 | | - * Object containing EXIF image information. |
413 | | - */ |
414 | | - export interface Image { |
415 | | - ExifOffset?: number; |
416 | | - |
417 | | - GPSInfo?: number; |
418 | | - |
419 | | - Make?: string; |
420 | | - |
421 | | - Model?: string; |
422 | | - |
423 | | - ModifyDate?: string; |
424 | | - |
425 | | - Orientation?: number; |
426 | | - |
427 | | - ResolutionUnit?: number; |
428 | | - |
429 | | - Software?: string; |
430 | | - |
431 | | - XResolution?: number; |
432 | | - |
433 | | - YCbCrPositioning?: number; |
434 | | - |
435 | | - YResolution?: number; |
436 | | - } |
437 | | - |
438 | | - /** |
439 | | - * JSON object. |
440 | | - */ |
441 | | - export interface Interoperability { |
442 | | - InteropIndex?: string; |
443 | | - |
444 | | - InteropVersion?: string; |
445 | | - } |
446 | | - |
447 | | - /** |
448 | | - * Object containing Thumbnail information. |
449 | | - */ |
450 | | - export interface Thumbnail { |
451 | | - Compression?: number; |
452 | | - |
453 | | - ResolutionUnit?: number; |
454 | | - |
455 | | - ThumbnailLength?: number; |
456 | | - |
457 | | - ThumbnailOffset?: number; |
458 | | - |
459 | | - XResolution?: number; |
460 | | - |
461 | | - YResolution?: number; |
462 | | - } |
463 | | - } |
464 | | - } |
465 | | - |
466 | 244 | /** |
467 | 245 | * An object containing the file or file version's `id` (versionId) and `name`. |
468 | 246 | */ |
|
0 commit comments