@mixedbread/sdk 0.55.0 → 0.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -3
  9. package/client.mjs.map +1 -1
  10. package/index.d.mts +1 -0
  11. package/index.d.mts.map +1 -1
  12. package/index.d.ts +1 -0
  13. package/index.d.ts.map +1 -1
  14. package/index.js +3 -1
  15. package/index.js.map +1 -1
  16. package/index.mjs +1 -0
  17. package/index.mjs.map +1 -1
  18. package/internal/tslib.js +17 -17
  19. package/internal/utils/query.d.mts +2 -0
  20. package/internal/utils/query.d.mts.map +1 -0
  21. package/internal/utils/query.d.ts +2 -0
  22. package/internal/utils/query.d.ts.map +1 -0
  23. package/internal/utils/query.js +10 -0
  24. package/internal/utils/query.js.map +1 -0
  25. package/internal/utils/query.mjs +6 -0
  26. package/internal/utils/query.mjs.map +1 -0
  27. package/internal/utils.d.mts +1 -0
  28. package/internal/utils.d.ts +1 -0
  29. package/internal/utils.js +1 -0
  30. package/internal/utils.js.map +1 -1
  31. package/internal/utils.mjs +1 -0
  32. package/lib/upload-file.d.mts +34 -0
  33. package/lib/upload-file.d.mts.map +1 -0
  34. package/lib/upload-file.d.ts +34 -0
  35. package/lib/upload-file.d.ts.map +1 -0
  36. package/lib/upload-file.js +146 -0
  37. package/lib/upload-file.js.map +1 -0
  38. package/lib/upload-file.mjs +141 -0
  39. package/lib/upload-file.mjs.map +1 -0
  40. package/package.json +1 -1
  41. package/resources/files/files.d.mts +156 -0
  42. package/resources/files/files.d.mts.map +1 -0
  43. package/resources/files/files.d.ts +156 -0
  44. package/resources/files/files.d.ts.map +1 -0
  45. package/resources/files/files.js +86 -0
  46. package/resources/files/files.js.map +1 -0
  47. package/resources/files/files.mjs +81 -0
  48. package/resources/files/files.mjs.map +1 -0
  49. package/resources/files/index.d.mts +3 -0
  50. package/resources/files/index.d.mts.map +1 -0
  51. package/resources/files/index.d.ts +3 -0
  52. package/resources/files/index.d.ts.map +1 -0
  53. package/resources/files/index.js +9 -0
  54. package/resources/files/index.js.map +1 -0
  55. package/resources/files/index.mjs +4 -0
  56. package/resources/files/index.mjs.map +1 -0
  57. package/resources/files/uploads.d.mts +169 -0
  58. package/resources/files/uploads.d.mts.map +1 -0
  59. package/resources/files/uploads.d.ts +169 -0
  60. package/resources/files/uploads.d.ts.map +1 -0
  61. package/resources/files/uploads.js +43 -0
  62. package/resources/files/uploads.js.map +1 -0
  63. package/resources/files/uploads.mjs +39 -0
  64. package/resources/files/uploads.mjs.map +1 -0
  65. package/resources/files.d.mts +1 -144
  66. package/resources/files.d.mts.map +1 -1
  67. package/resources/files.d.ts +1 -144
  68. package/resources/files.d.ts.map +1 -1
  69. package/resources/files.js +2 -73
  70. package/resources/files.js.map +1 -1
  71. package/resources/files.mjs +1 -71
  72. package/resources/files.mjs.map +1 -1
  73. package/resources/index.d.mts +1 -1
  74. package/resources/index.d.ts +1 -1
  75. package/resources/index.js +1 -1
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +1 -1
  78. package/resources/stores/files.d.mts +10 -7
  79. package/resources/stores/files.d.mts.map +1 -1
  80. package/resources/stores/files.d.ts +10 -7
  81. package/resources/stores/files.d.ts.map +1 -1
  82. package/resources/stores/files.js +15 -4
  83. package/resources/stores/files.js.map +1 -1
  84. package/resources/stores/files.mjs +15 -4
  85. package/resources/stores/files.mjs.map +1 -1
  86. package/resources/stores/stores.d.mts +4 -4
  87. package/resources/stores/stores.d.mts.map +1 -1
  88. package/resources/stores/stores.d.ts +4 -4
  89. package/resources/stores/stores.d.ts.map +1 -1
  90. package/src/client.ts +15 -15
  91. package/src/index.ts +1 -0
  92. package/src/internal/utils/query.ts +7 -0
  93. package/src/internal/utils.ts +1 -0
  94. package/src/lib/upload-file.ts +233 -0
  95. package/src/resources/files/files.ts +239 -0
  96. package/src/resources/files/index.ts +23 -0
  97. package/src/resources/files/uploads.ts +229 -0
  98. package/src/resources/files.ts +1 -201
  99. package/src/resources/index.ts +1 -1
  100. package/src/resources/stores/files.ts +28 -7
  101. package/src/resources/stores/stores.ts +4 -4
  102. package/src/version.ts +1 -1
  103. package/version.d.mts +1 -1
  104. package/version.d.ts +1 -1
  105. package/version.js +1 -1
  106. package/version.mjs +1 -1
@@ -0,0 +1,239 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as UploadsAPI from './uploads';
5
+ import {
6
+ MultipartUploadPart,
7
+ MultipartUploadPartURL,
8
+ UploadAbortResponse,
9
+ UploadCompleteParams,
10
+ UploadCreateParams,
11
+ UploadCreateResponse,
12
+ UploadListResponse,
13
+ UploadRetrieveResponse,
14
+ Uploads,
15
+ } from './uploads';
16
+ import { APIPromise } from '../../core/api-promise';
17
+ import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
18
+ import { type Uploadable } from '../../core/uploads';
19
+ import { buildHeaders } from '../../internal/headers';
20
+ import { RequestOptions } from '../../internal/request-options';
21
+ import { multipartFormRequestOptions } from '../../internal/uploads';
22
+ import { path } from '../../internal/utils/path';
23
+ import { handleFileCreate, type MultipartUploadConfig } from '../../lib/upload-file';
24
+
25
+ export class Files extends APIResource {
26
+ uploads: UploadsAPI.Uploads = new UploadsAPI.Uploads(this._client);
27
+
28
+ /**
29
+ * Upload a new file.
30
+ *
31
+ * Args: file: The file to upload.
32
+ *
33
+ * Returns: FileResponse: The response containing the details of the uploaded file.
34
+ */
35
+ create(body: FileCreateParams, options?: RequestOptions): APIPromise<FileObject> {
36
+ return handleFileCreate(this._client, body, options);
37
+ }
38
+
39
+ /**
40
+ * Retrieve details of a specific file by its ID.
41
+ *
42
+ * Args: file_id: The ID of the file to retrieve.
43
+ *
44
+ * Returns: FileResponse: The response containing the file details.
45
+ */
46
+ retrieve(fileID: string, options?: RequestOptions): APIPromise<FileObject> {
47
+ return this._client.get(path`/v1/files/${fileID}`, options);
48
+ }
49
+
50
+ /**
51
+ * Update the details of a specific file.
52
+ *
53
+ * Args: file_id: The ID of the file to update. file: The new details for the file.
54
+ *
55
+ * Returns: FileObject: The updated file details.
56
+ */
57
+ update(fileID: string, body: FileUpdateParams, options?: RequestOptions): APIPromise<FileObject> {
58
+ return this._client.post(
59
+ path`/v1/files/${fileID}`,
60
+ multipartFormRequestOptions({ body, ...options }, this._client),
61
+ );
62
+ }
63
+
64
+ /**
65
+ * List all files for the authenticated user.
66
+ *
67
+ * Args: pagination: The pagination options
68
+ *
69
+ * Returns: A list of files belonging to the user.
70
+ */
71
+ list(
72
+ query: FileListParams | null | undefined = {},
73
+ options?: RequestOptions,
74
+ ): PagePromise<FileObjectsCursor, FileObject> {
75
+ return this._client.getAPIList('/v1/files', Cursor<FileObject>, { query, ...options });
76
+ }
77
+
78
+ /**
79
+ * Delete a specific file by its ID.
80
+ *
81
+ * Args: file_id: The ID of the file to delete.
82
+ *
83
+ * Returns: FileDeleted: The response containing the details of the deleted file.
84
+ */
85
+ delete(fileID: string, options?: RequestOptions): APIPromise<FileDeleteResponse> {
86
+ return this._client.delete(path`/v1/files/${fileID}`, options);
87
+ }
88
+
89
+ /**
90
+ * Download a specific file by its ID.
91
+ *
92
+ * Args: file_id: The ID of the file to download.
93
+ *
94
+ * Returns: FileStreamResponse: The response containing the file to be downloaded.
95
+ */
96
+ content(fileID: string, options?: RequestOptions): APIPromise<Response> {
97
+ return this._client.get(path`/v1/files/${fileID}/content`, {
98
+ ...options,
99
+ headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]),
100
+ __binaryResponse: true,
101
+ });
102
+ }
103
+ }
104
+
105
+ export type FileObjectsCursor = Cursor<FileObject>;
106
+
107
+ /**
108
+ * A model representing a file object in the system.
109
+ *
110
+ * This model contains metadata about files stored in the system, including
111
+ * identifiers, size information, and timestamps.
112
+ */
113
+ export interface FileObject {
114
+ /**
115
+ * Unique identifier for the file
116
+ */
117
+ id: string;
118
+
119
+ /**
120
+ * Name of the file including extension
121
+ */
122
+ filename: string;
123
+
124
+ /**
125
+ * Size of the file in bytes
126
+ */
127
+ bytes: number;
128
+
129
+ /**
130
+ * MIME type of the file
131
+ */
132
+ mime_type: string;
133
+
134
+ /**
135
+ * Version of the file
136
+ */
137
+ version: number;
138
+
139
+ /**
140
+ * Timestamp when the file was created
141
+ */
142
+ created_at: string;
143
+
144
+ /**
145
+ * Timestamp when the file was last updated
146
+ */
147
+ updated_at: string;
148
+ }
149
+
150
+ /**
151
+ * Pagination model that includes total count of items.
152
+ */
153
+ export interface PaginationWithTotal {
154
+ /**
155
+ * Maximum number of items to return per page
156
+ */
157
+ limit?: number;
158
+
159
+ /**
160
+ * Offset of the first item to return
161
+ */
162
+ offset?: number;
163
+
164
+ /**
165
+ * Total number of items available
166
+ */
167
+ total?: number;
168
+ }
169
+
170
+ export interface FileDeleteResponse {
171
+ /**
172
+ * The ID of the deleted file
173
+ */
174
+ id: string;
175
+
176
+ /**
177
+ * Whether the file was deleted
178
+ */
179
+ deleted?: boolean;
180
+
181
+ /**
182
+ * The type of the deleted object
183
+ */
184
+ object?: 'file';
185
+ }
186
+
187
+ export interface FileCreateParams {
188
+ /**
189
+ * The file to upload
190
+ */
191
+ file: Uploadable;
192
+
193
+ /**
194
+ * Optional configuration for automatic multipart uploads.
195
+ * When the file size exceeds the threshold (default 100MB), the SDK
196
+ * will automatically use multipart upload with presigned URLs.
197
+ */
198
+ multipartUpload?: MultipartUploadConfig;
199
+ }
200
+
201
+ export interface FileUpdateParams {
202
+ /**
203
+ * The file to update
204
+ */
205
+ file: Uploadable;
206
+ }
207
+
208
+ export interface FileListParams extends CursorParams {
209
+ /**
210
+ * Search query for fuzzy matching over name and description fields
211
+ */
212
+ q?: string | null;
213
+ }
214
+
215
+ Files.Uploads = Uploads;
216
+
217
+ export declare namespace Files {
218
+ export {
219
+ type FileObject as FileObject,
220
+ type PaginationWithTotal as PaginationWithTotal,
221
+ type FileDeleteResponse as FileDeleteResponse,
222
+ type FileObjectsCursor as FileObjectsCursor,
223
+ type FileCreateParams as FileCreateParams,
224
+ type FileUpdateParams as FileUpdateParams,
225
+ type FileListParams as FileListParams,
226
+ };
227
+
228
+ export {
229
+ Uploads as Uploads,
230
+ type MultipartUploadPart as MultipartUploadPart,
231
+ type MultipartUploadPartURL as MultipartUploadPartURL,
232
+ type UploadCreateResponse as UploadCreateResponse,
233
+ type UploadRetrieveResponse as UploadRetrieveResponse,
234
+ type UploadListResponse as UploadListResponse,
235
+ type UploadAbortResponse as UploadAbortResponse,
236
+ type UploadCreateParams as UploadCreateParams,
237
+ type UploadCompleteParams as UploadCompleteParams,
238
+ };
239
+ }
@@ -0,0 +1,23 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Files,
5
+ type FileObject,
6
+ type PaginationWithTotal,
7
+ type FileDeleteResponse,
8
+ type FileCreateParams,
9
+ type FileUpdateParams,
10
+ type FileListParams,
11
+ type FileObjectsCursor,
12
+ } from './files';
13
+ export {
14
+ Uploads,
15
+ type MultipartUploadPart,
16
+ type MultipartUploadPartURL,
17
+ type UploadCreateResponse,
18
+ type UploadRetrieveResponse,
19
+ type UploadListResponse,
20
+ type UploadAbortResponse,
21
+ type UploadCreateParams,
22
+ type UploadCompleteParams,
23
+ } from './uploads';
@@ -0,0 +1,229 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as FilesAPI from './files';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class Uploads extends APIResource {
10
+ /**
11
+ * Initiate a multipart upload and receive presigned URLs for uploading parts
12
+ * directly to storage.
13
+ */
14
+ create(body: UploadCreateParams, options?: RequestOptions): APIPromise<UploadCreateResponse> {
15
+ return this._client.post('/v1/files/uploads', { body, ...options });
16
+ }
17
+
18
+ /**
19
+ * Get a multipart upload's details with fresh presigned URLs for any parts not yet
20
+ * uploaded.
21
+ */
22
+ retrieve(uploadID: string, options?: RequestOptions): APIPromise<UploadRetrieveResponse> {
23
+ return this._client.get(path`/v1/files/uploads/${uploadID}`, options);
24
+ }
25
+
26
+ /**
27
+ * List all in-progress multipart uploads for the authenticated organization.
28
+ */
29
+ list(options?: RequestOptions): APIPromise<UploadListResponse> {
30
+ return this._client.get('/v1/files/uploads', options);
31
+ }
32
+
33
+ /**
34
+ * Abort a multipart upload and clean up any uploaded parts.
35
+ */
36
+ abort(uploadID: string, options?: RequestOptions): APIPromise<UploadAbortResponse> {
37
+ return this._client.post(path`/v1/files/uploads/${uploadID}/abort`, options);
38
+ }
39
+
40
+ /**
41
+ * Complete a multipart upload after all parts have been uploaded. Creates the file
42
+ * object and returns it.
43
+ */
44
+ complete(
45
+ uploadID: string,
46
+ body: UploadCompleteParams,
47
+ options?: RequestOptions,
48
+ ): APIPromise<FilesAPI.FileObject> {
49
+ return this._client.post(path`/v1/files/uploads/${uploadID}/complete`, { body, ...options });
50
+ }
51
+ }
52
+
53
+ export interface MultipartUploadPart {
54
+ /**
55
+ * 1-based part number
56
+ */
57
+ part_number: number;
58
+
59
+ /**
60
+ * ETag returned by the storage backend after uploading the part
61
+ */
62
+ etag: string;
63
+ }
64
+
65
+ export interface MultipartUploadPartURL {
66
+ /**
67
+ * 1-based part number
68
+ */
69
+ part_number: number;
70
+
71
+ /**
72
+ * Presigned URL for uploading this part
73
+ */
74
+ url: string;
75
+ }
76
+
77
+ export interface UploadCreateResponse {
78
+ /**
79
+ * The multipart upload ID (use this to complete or abort)
80
+ */
81
+ id: string;
82
+
83
+ /**
84
+ * Presigned URLs for uploading parts
85
+ */
86
+ part_urls: Array<MultipartUploadPartURL>;
87
+ }
88
+
89
+ export interface UploadRetrieveResponse {
90
+ /**
91
+ * The multipart upload record ID
92
+ */
93
+ id: string;
94
+
95
+ /**
96
+ * Original filename
97
+ */
98
+ filename: string;
99
+
100
+ /**
101
+ * Total file size in bytes
102
+ */
103
+ file_size: number;
104
+
105
+ /**
106
+ * MIME type of the file
107
+ */
108
+ mime_type: string;
109
+
110
+ /**
111
+ * Number of parts the file was split into
112
+ */
113
+ part_count: number;
114
+
115
+ /**
116
+ * When the upload was initiated
117
+ */
118
+ created_at: string;
119
+
120
+ /**
121
+ * Parts that have already been uploaded
122
+ */
123
+ completed_parts: Array<MultipartUploadPart>;
124
+
125
+ /**
126
+ * Presigned URLs for the parts that still need to be uploaded
127
+ */
128
+ part_urls: Array<MultipartUploadPartURL>;
129
+ }
130
+
131
+ export interface UploadListResponse {
132
+ /**
133
+ * List of in-progress multipart uploads
134
+ */
135
+ data: Array<UploadListResponse.Data>;
136
+ }
137
+
138
+ export namespace UploadListResponse {
139
+ export interface Data {
140
+ /**
141
+ * The multipart upload record ID
142
+ */
143
+ id: string;
144
+
145
+ /**
146
+ * Original filename
147
+ */
148
+ filename: string;
149
+
150
+ /**
151
+ * Total file size in bytes
152
+ */
153
+ file_size: number;
154
+
155
+ /**
156
+ * MIME type of the file
157
+ */
158
+ mime_type: string;
159
+
160
+ /**
161
+ * Number of parts the file was split into
162
+ */
163
+ part_count: number;
164
+
165
+ /**
166
+ * When the upload was initiated
167
+ */
168
+ created_at: string;
169
+ }
170
+ }
171
+
172
+ export interface UploadAbortResponse {
173
+ /**
174
+ * The ID of the deleted file
175
+ */
176
+ id: string;
177
+
178
+ /**
179
+ * Whether the file was deleted
180
+ */
181
+ deleted?: boolean;
182
+
183
+ /**
184
+ * The type of the deleted object
185
+ */
186
+ object?: 'file';
187
+ }
188
+
189
+ export interface UploadCreateParams {
190
+ /**
191
+ * Name of the file including extension
192
+ */
193
+ filename: string;
194
+
195
+ /**
196
+ * Total size of the file in bytes
197
+ */
198
+ file_size: number;
199
+
200
+ /**
201
+ * MIME type of the file
202
+ */
203
+ mime_type: string;
204
+
205
+ /**
206
+ * Number of parts to split the upload into
207
+ */
208
+ part_count?: number;
209
+ }
210
+
211
+ export interface UploadCompleteParams {
212
+ /**
213
+ * List of completed parts with their ETags
214
+ */
215
+ parts: Array<MultipartUploadPart>;
216
+ }
217
+
218
+ export declare namespace Uploads {
219
+ export {
220
+ type MultipartUploadPart as MultipartUploadPart,
221
+ type MultipartUploadPartURL as MultipartUploadPartURL,
222
+ type UploadCreateResponse as UploadCreateResponse,
223
+ type UploadRetrieveResponse as UploadRetrieveResponse,
224
+ type UploadListResponse as UploadListResponse,
225
+ type UploadAbortResponse as UploadAbortResponse,
226
+ type UploadCreateParams as UploadCreateParams,
227
+ type UploadCompleteParams as UploadCompleteParams,
228
+ };
229
+ }
@@ -1,203 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../core/resource';
4
- import { APIPromise } from '../core/api-promise';
5
- import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
6
- import { type Uploadable } from '../core/uploads';
7
- import { buildHeaders } from '../internal/headers';
8
- import { RequestOptions } from '../internal/request-options';
9
- import { multipartFormRequestOptions } from '../internal/uploads';
10
- import { path } from '../internal/utils/path';
11
-
12
- export class Files extends APIResource {
13
- /**
14
- * Upload a new file.
15
- *
16
- * Args: file: The file to upload.
17
- *
18
- * Returns: FileResponse: The response containing the details of the uploaded file.
19
- */
20
- create(body: FileCreateParams, options?: RequestOptions): APIPromise<FileObject> {
21
- return this._client.post('/v1/files', multipartFormRequestOptions({ body, ...options }, this._client));
22
- }
23
-
24
- /**
25
- * Retrieve details of a specific file by its ID.
26
- *
27
- * Args: file_id: The ID of the file to retrieve.
28
- *
29
- * Returns: FileResponse: The response containing the file details.
30
- */
31
- retrieve(fileID: string, options?: RequestOptions): APIPromise<FileObject> {
32
- return this._client.get(path`/v1/files/${fileID}`, options);
33
- }
34
-
35
- /**
36
- * Update the details of a specific file.
37
- *
38
- * Args: file_id: The ID of the file to update. file: The new details for the file.
39
- *
40
- * Returns: FileObject: The updated file details.
41
- */
42
- update(fileID: string, body: FileUpdateParams, options?: RequestOptions): APIPromise<FileObject> {
43
- return this._client.post(
44
- path`/v1/files/${fileID}`,
45
- multipartFormRequestOptions({ body, ...options }, this._client),
46
- );
47
- }
48
-
49
- /**
50
- * List all files for the authenticated user.
51
- *
52
- * Args: pagination: The pagination options
53
- *
54
- * Returns: A list of files belonging to the user.
55
- */
56
- list(
57
- query: FileListParams | null | undefined = {},
58
- options?: RequestOptions,
59
- ): PagePromise<FileObjectsCursor, FileObject> {
60
- return this._client.getAPIList('/v1/files', Cursor<FileObject>, { query, ...options });
61
- }
62
-
63
- /**
64
- * Delete a specific file by its ID.
65
- *
66
- * Args: file_id: The ID of the file to delete.
67
- *
68
- * Returns: FileDeleted: The response containing the details of the deleted file.
69
- */
70
- delete(fileID: string, options?: RequestOptions): APIPromise<FileDeleteResponse> {
71
- return this._client.delete(path`/v1/files/${fileID}`, options);
72
- }
73
-
74
- /**
75
- * Download a specific file by its ID.
76
- *
77
- * Args: file_id: The ID of the file to download.
78
- *
79
- * Returns: FileStreamResponse: The response containing the file to be downloaded.
80
- */
81
- content(fileID: string, options?: RequestOptions): APIPromise<Response> {
82
- return this._client.get(path`/v1/files/${fileID}/content`, {
83
- ...options,
84
- headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]),
85
- __binaryResponse: true,
86
- });
87
- }
88
- }
89
-
90
- export type FileObjectsCursor = Cursor<FileObject>;
91
-
92
- /**
93
- * A model representing a file object in the system.
94
- *
95
- * This model contains metadata about files stored in the system, including
96
- * identifiers, size information, and timestamps.
97
- */
98
- export interface FileObject {
99
- /**
100
- * Unique identifier for the file
101
- */
102
- id: string;
103
-
104
- /**
105
- * Name of the file including extension
106
- */
107
- filename: string;
108
-
109
- /**
110
- * Size of the file in bytes
111
- */
112
- bytes: number;
113
-
114
- /**
115
- * MIME type of the file
116
- */
117
- mime_type: string;
118
-
119
- /**
120
- * Version of the file
121
- */
122
- version: number;
123
-
124
- /**
125
- * Timestamp when the file was created
126
- */
127
- created_at: string;
128
-
129
- /**
130
- * Timestamp when the file was last updated
131
- */
132
- updated_at: string;
133
- }
134
-
135
- /**
136
- * Pagination model that includes total count of items.
137
- */
138
- export interface PaginationWithTotal {
139
- /**
140
- * Maximum number of items to return per page
141
- */
142
- limit?: number;
143
-
144
- /**
145
- * Offset of the first item to return
146
- */
147
- offset?: number;
148
-
149
- /**
150
- * Total number of items available
151
- */
152
- total?: number;
153
- }
154
-
155
- export interface FileDeleteResponse {
156
- /**
157
- * The ID of the deleted file
158
- */
159
- id: string;
160
-
161
- /**
162
- * Whether the file was deleted
163
- */
164
- deleted?: boolean;
165
-
166
- /**
167
- * The type of the deleted object
168
- */
169
- object?: 'file';
170
- }
171
-
172
- export interface FileCreateParams {
173
- /**
174
- * The file to upload
175
- */
176
- file: Uploadable;
177
- }
178
-
179
- export interface FileUpdateParams {
180
- /**
181
- * The file to update
182
- */
183
- file: Uploadable;
184
- }
185
-
186
- export interface FileListParams extends CursorParams {
187
- /**
188
- * Search query for fuzzy matching over name and description fields
189
- */
190
- q?: string | null;
191
- }
192
-
193
- export declare namespace Files {
194
- export {
195
- type FileObject as FileObject,
196
- type PaginationWithTotal as PaginationWithTotal,
197
- type FileDeleteResponse as FileDeleteResponse,
198
- type FileObjectsCursor as FileObjectsCursor,
199
- type FileCreateParams as FileCreateParams,
200
- type FileUpdateParams as FileUpdateParams,
201
- type FileListParams as FileListParams,
202
- };
203
- }
3
+ export * from './files/index';
@@ -36,7 +36,7 @@ export {
36
36
  type FileUpdateParams,
37
37
  type FileListParams,
38
38
  type FileObjectsCursor,
39
- } from './files';
39
+ } from './files/files';
40
40
  export { Parsing } from './parsing/parsing';
41
41
  export {
42
42
  Stores,