11import { FileType } from "./FileType" ;
2- import { Item } from "./Item" ;
32
43export interface EmbeddedMetadataValues {
54 [ key : string ] :
@@ -56,13 +55,13 @@ export interface FileDetailsOptions {
5655 * Example - 50,50,500,500
5756 */
5857 customCoordinates ?: string ;
59- /*
60- * Object with array of extensions to be processed on the image.
61- */
58+ /*
59+ * Object with array of extensions to be processed on the image.
60+ */
6261 extensions ?: Extension ;
6362 /*
64- * Final status of pending extensions will be sent to this URL.
65- */
63+ * Final status of pending extensions will be sent to this URL.
64+ */
6665 webhookUrl ?: string
6766 /*
6867 * Array of AI tags to remove from the asset.
@@ -93,9 +92,9 @@ export interface FileObject {
9392 */
9493 fileId : string ;
9594 /**
96- * Type of item. It can be either file or folder.
95+ * Type of item. It can be either file, file-version or folder.
9796 */
98- type : Item ;
97+ type : "file" | "file-version" ;
9998 /**
10099 * Name of the file or folder.
101100 */
@@ -180,6 +179,38 @@ export interface FileObject {
180179 versionInfo ?: { name : string ; id : string } ;
181180}
182181
182+ /**
183+ *
184+ * Folder object.
185+ *
186+ * @see {@link https://docs.imagekit.io/api-reference/media-api#file-object-structure }
187+ */
188+ export interface FolderObject {
189+ /**
190+ * The unique fileId of the folder.
191+ */
192+ folderId : string ;
193+ /**
194+ * Type of item. It can be either file, file-version or folder.
195+ */
196+ type : "folder" ;
197+ /**
198+ * Name of the file or folder.
199+ */
200+ name : string ;
201+ /**
202+ * The relative path of the folder.
203+ */
204+ folderPath : string ;
205+ /*
206+ * The date and time when the folder was first created. The format is YYYY-MM-DDTHH:mm:ss.sssZ
207+ */
208+ createdAt : string ;
209+ /*
210+ * The date and time when the folder was last updated. The format is YYYY-MM-DDTHH:mm:ss.sssZ
211+ */
212+ updatedAt : string ;
213+ }
183214
184215export interface FileVersionDetailsOptions {
185216 /**
@@ -190,4 +221,4 @@ export interface FileVersionDetailsOptions {
190221 * The unique versionId of the uploaded file's version. This is returned in list files API and upload API as id within the versionInfo parameter.
191222 */
192223 versionId : string ;
193- }
224+ }
0 commit comments