11// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22
33import { APIResource } from '../core/resource' ;
4+ import * as FilesAPI from './files/files' ;
45import { APIPromise } from '../core/api-promise' ;
56import { RequestOptions } from '../internal/request-options' ;
67
@@ -19,196 +20,7 @@ export class Assets extends APIResource {
1920 }
2021}
2122
22- /**
23- * Object containing details of a file or file version.
24- */
25- export interface File {
26- /**
27- * An array of tags assigned to the file by auto tagging.
28- */
29- AITags ?: Array < File . AITag > | null ;
30-
31- /**
32- * Date and time when the file was uploaded. The date and time is in ISO8601
33- * format.
34- */
35- createdAt ?: string ;
36-
37- /**
38- * An string with custom coordinates of the file.
39- */
40- customCoordinates ?: string | null ;
41-
42- /**
43- * An object with custom metadata for the file.
44- */
45- customMetadata ?: { [ key : string ] : unknown } ;
46-
47- /**
48- * Unique identifier of the asset.
49- */
50- fileId ?: string ;
51-
52- /**
53- * Path of the file. This is the path you would use in the URL to access the file.
54- * For example, if the file is at the root of the media library, the path will be
55- * `/file.jpg`. If the file is inside a folder named `images`, the path will be
56- * `/images/file.jpg`.
57- */
58- filePath ?: string ;
59-
60- /**
61- * Type of the file. Possible values are `image`, `non-image`.
62- */
63- fileType ?: string ;
64-
65- /**
66- * Specifies if the image has an alpha channel.
67- */
68- hasAlpha ?: boolean ;
69-
70- /**
71- * Height of the file.
72- */
73- height ?: number ;
74-
75- /**
76- * Specifies if the file is private or not.
77- */
78- isPrivateFile ?: boolean ;
79-
80- /**
81- * Specifies if the file is published or not.
82- */
83- isPublished ?: boolean ;
84-
85- /**
86- * MIME type of the file.
87- */
88- mime ?: string ;
89-
90- /**
91- * Name of the asset.
92- */
93- name ?: string ;
94-
95- /**
96- * Size of the file in bytes.
97- */
98- size ?: number ;
99-
100- /**
101- * An array of tags assigned to the file. Tags are used to search files in the
102- * media library.
103- */
104- tags ?: Array < string > | null ;
105-
106- /**
107- * URL of the thumbnail image. This URL is used to access the thumbnail image of
108- * the file in the media library.
109- */
110- thumbnail ?: string ;
111-
112- /**
113- * Type of the asset.
114- */
115- type ?: 'file' | 'file-version' ;
116-
117- /**
118- * Date and time when the file was last updated. The date and time is in ISO8601
119- * format.
120- */
121- updatedAt ?: string ;
122-
123- /**
124- * URL of the file.
125- */
126- url ?: string ;
127-
128- /**
129- * An object with details of the file version.
130- */
131- versionInfo ?: File . VersionInfo ;
132-
133- /**
134- * Width of the file.
135- */
136- width ?: number ;
137- }
138-
139- export namespace File {
140- export interface AITag {
141- /**
142- * Confidence score of the tag.
143- */
144- confidence ?: number ;
145-
146- /**
147- * Name of the tag.
148- */
149- name ?: string ;
150-
151- /**
152- * Source of the tag. Possible values are `google-auto-tagging` and
153- * `aws-auto-tagging`.
154- */
155- source ?: string ;
156- }
157-
158- /**
159- * An object with details of the file version.
160- */
161- export interface VersionInfo {
162- /**
163- * Unique identifier of the file version.
164- */
165- id ?: string ;
166-
167- /**
168- * Name of the file version.
169- */
170- name ?: string ;
171- }
172- }
173-
174- export interface Folder {
175- /**
176- * Date and time when the folder was created. The date and time is in ISO8601
177- * format.
178- */
179- createdAt ?: string ;
180-
181- /**
182- * Unique identifier of the asset.
183- */
184- folderId ?: string ;
185-
186- /**
187- * Path of the folder. This is the path you would use in the URL to access the
188- * folder. For example, if the folder is at the root of the media library, the path
189- * will be /folder. If the folder is inside another folder named images, the path
190- * will be /images/folder.
191- */
192- folderPath ?: string ;
193-
194- /**
195- * Name of the asset.
196- */
197- name ?: string ;
198-
199- /**
200- * Type of the asset.
201- */
202- type ?: 'folder' ;
203-
204- /**
205- * Date and time when the folder was last updated. The date and time is in ISO8601
206- * format.
207- */
208- updatedAt ?: string ;
209- }
210-
211- export type AssetListResponse = Array < File | Folder > ;
23+ export type AssetListResponse = Array < FilesAPI . File | FilesAPI . Folder > ;
21224
21325export interface AssetListParams {
21426 /**
@@ -289,10 +101,5 @@ export interface AssetListParams {
289101}
290102
291103export declare namespace Assets {
292- export {
293- type File as File ,
294- type Folder as Folder ,
295- type AssetListResponse as AssetListResponse ,
296- type AssetListParams as AssetListParams ,
297- } ;
104+ export { type AssetListResponse as AssetListResponse , type AssetListParams as AssetListParams } ;
298105}
0 commit comments