Skip to content

Commit 3dbf797

Browse files
feat(api): manual updates
1 parent 09c169c commit 3dbf797

File tree

8 files changed

+59
-816
lines changed

8 files changed

+59
-816
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 42
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-967cd0e731df83a642ded194cacae3628050f679c600b1efd4e66cf269973531.yml
33
openapi_spec_hash: 98642308bee81ac776b7b1843089b888
4-
config_hash: 733231d3642f7945a9459fbc90ddfb8e
4+
config_hash: 91cbeb97fdb75393dffd187ec25a4080

api.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ Methods:
1717

1818
Types:
1919

20+
- <code><a href="./src/resources/files/files.ts">File</a></code>
21+
- <code><a href="./src/resources/files/files.ts">Folder</a></code>
2022
- <code><a href="./src/resources/files/files.ts">FileUpdateResponse</a></code>
2123
- <code><a href="./src/resources/files/files.ts">FileCopyResponse</a></code>
22-
- <code><a href="./src/resources/files/files.ts">FileGetResponse</a></code>
2324
- <code><a href="./src/resources/files/files.ts">FileMoveResponse</a></code>
2425
- <code><a href="./src/resources/files/files.ts">FileRenameResponse</a></code>
2526
- <code><a href="./src/resources/files/files.ts">FileUploadResponse</a></code>
@@ -29,7 +30,7 @@ Methods:
2930
- <code title="patch /v1/files/{fileId}/details">client.files.<a href="./src/resources/files/files.ts">update</a>(fileID, { ...params }) -> FileUpdateResponse</code>
3031
- <code title="delete /v1/files/{fileId}">client.files.<a href="./src/resources/files/files.ts">delete</a>(fileID) -> void</code>
3132
- <code title="post /v1/files/copy">client.files.<a href="./src/resources/files/files.ts">copy</a>({ ...params }) -> FileCopyResponse</code>
32-
- <code title="get /v1/files/{fileId}/details">client.files.<a href="./src/resources/files/files.ts">get</a>(fileID) -> FileGetResponse</code>
33+
- <code title="get /v1/files/{fileId}/details">client.files.<a href="./src/resources/files/files.ts">get</a>(fileID) -> File</code>
3334
- <code title="post /v1/files/move">client.files.<a href="./src/resources/files/files.ts">move</a>({ ...params }) -> FileMoveResponse</code>
3435
- <code title="put /v1/files/rename">client.files.<a href="./src/resources/files/files.ts">rename</a>({ ...params }) -> FileRenameResponse</code>
3536
- <code title="post /api/v1/files/upload">client.files.<a href="./src/resources/files/files.ts">upload</a>({ ...params }) -> FileUploadResponse</code>
@@ -56,15 +57,13 @@ Types:
5657

5758
- <code><a href="./src/resources/files/versions.ts">VersionListResponse</a></code>
5859
- <code><a href="./src/resources/files/versions.ts">VersionDeleteResponse</a></code>
59-
- <code><a href="./src/resources/files/versions.ts">VersionGetResponse</a></code>
60-
- <code><a href="./src/resources/files/versions.ts">VersionRestoreResponse</a></code>
6160

6261
Methods:
6362

6463
- <code title="get /v1/files/{fileId}/versions">client.files.versions.<a href="./src/resources/files/versions.ts">list</a>(fileID) -> VersionListResponse</code>
6564
- <code title="delete /v1/files/{fileId}/versions/{versionId}">client.files.versions.<a href="./src/resources/files/versions.ts">delete</a>(versionID, { ...params }) -> VersionDeleteResponse</code>
66-
- <code title="get /v1/files/{fileId}/versions/{versionId}">client.files.versions.<a href="./src/resources/files/versions.ts">get</a>(versionID, { ...params }) -> VersionGetResponse</code>
67-
- <code title="put /v1/files/{fileId}/versions/{versionId}/restore">client.files.versions.<a href="./src/resources/files/versions.ts">restore</a>(versionID, { ...params }) -> VersionRestoreResponse</code>
65+
- <code title="get /v1/files/{fileId}/versions/{versionId}">client.files.versions.<a href="./src/resources/files/versions.ts">get</a>(versionID, { ...params }) -> File</code>
66+
- <code title="put /v1/files/{fileId}/versions/{versionId}/restore">client.files.versions.<a href="./src/resources/files/versions.ts">restore</a>(versionID, { ...params }) -> File</code>
6867

6968
## Metadata
7069

src/client.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ import { Accounts } from './resources/accounts/accounts';
3838
import { Beta } from './resources/beta/beta';
3939
import { Cache } from './resources/cache/cache';
4040
import {
41+
File,
4142
FileCopyParams,
4243
FileCopyResponse,
43-
FileGetResponse,
4444
FileMoveParams,
4545
FileMoveResponse,
4646
FileRenameParams,
@@ -50,6 +50,7 @@ import {
5050
FileUploadParams,
5151
FileUploadResponse,
5252
Files,
53+
Folder,
5354
} from './resources/files/files';
5455
import {
5556
FolderCopyParams,
@@ -826,9 +827,10 @@ export declare namespace ImageKit {
826827

827828
export {
828829
Files as Files,
830+
type File as File,
831+
type Folder as Folder,
829832
type FileUpdateResponse as FileUpdateResponse,
830833
type FileCopyResponse as FileCopyResponse,
831-
type FileGetResponse as FileGetResponse,
832834
type FileMoveResponse as FileMoveResponse,
833835
type FileRenameResponse as FileRenameResponse,
834836
type FileUploadResponse as FileUploadResponse,

src/resources/assets.ts

Lines changed: 2 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../core/resource';
4+
import * as FilesAPI from './files/files';
45
import { APIPromise } from '../core/api-promise';
56
import { 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

21525
export interface AssetListParams {
21626
/**

0 commit comments

Comments
 (0)