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