@mixedbread/sdk 0.5.0 → 0.6.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 (171) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/bin/migration-config.json +103 -0
  3. package/client.d.mts +15 -28
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +15 -28
  6. package/client.d.ts.map +1 -1
  7. package/client.js +9 -22
  8. package/client.js.map +1 -1
  9. package/client.mjs +9 -22
  10. package/client.mjs.map +1 -1
  11. package/internal/headers.js +1 -1
  12. package/internal/headers.js.map +1 -1
  13. package/internal/headers.mjs +1 -1
  14. package/internal/headers.mjs.map +1 -1
  15. package/package.json +1 -4
  16. package/resources/api-keys.d.mts +171 -0
  17. package/resources/api-keys.d.mts.map +1 -0
  18. package/resources/api-keys.d.ts +171 -0
  19. package/resources/api-keys.d.ts.map +1 -0
  20. package/resources/api-keys.js +76 -0
  21. package/resources/api-keys.js.map +1 -0
  22. package/resources/api-keys.mjs +72 -0
  23. package/resources/api-keys.mjs.map +1 -0
  24. package/resources/chat.d.mts +27 -0
  25. package/resources/chat.d.mts.map +1 -0
  26. package/resources/chat.d.ts +27 -0
  27. package/resources/chat.d.ts.map +1 -0
  28. package/resources/chat.js +28 -0
  29. package/resources/chat.js.map +1 -0
  30. package/resources/chat.mjs +24 -0
  31. package/resources/chat.mjs.map +1 -0
  32. package/resources/data-sources/connectors.d.mts +193 -0
  33. package/resources/data-sources/connectors.d.mts.map +1 -0
  34. package/resources/data-sources/connectors.d.ts +193 -0
  35. package/resources/data-sources/connectors.d.ts.map +1 -0
  36. package/resources/data-sources/connectors.js +73 -0
  37. package/resources/data-sources/connectors.js.map +1 -0
  38. package/resources/data-sources/connectors.mjs +69 -0
  39. package/resources/data-sources/connectors.mjs.map +1 -0
  40. package/resources/data-sources/data-sources.d.mts +183 -0
  41. package/resources/data-sources/data-sources.d.mts.map +1 -0
  42. package/resources/data-sources/data-sources.d.ts +183 -0
  43. package/resources/data-sources/data-sources.d.ts.map +1 -0
  44. package/resources/data-sources/data-sources.js +66 -0
  45. package/resources/data-sources/data-sources.js.map +1 -0
  46. package/resources/data-sources/data-sources.mjs +61 -0
  47. package/resources/data-sources/data-sources.mjs.map +1 -0
  48. package/resources/data-sources/index.d.mts +3 -0
  49. package/resources/data-sources/index.d.mts.map +1 -0
  50. package/resources/data-sources/index.d.ts +3 -0
  51. package/resources/data-sources/index.d.ts.map +1 -0
  52. package/resources/data-sources/index.js +9 -0
  53. package/resources/data-sources/index.js.map +1 -0
  54. package/resources/data-sources/index.mjs +4 -0
  55. package/resources/data-sources/index.mjs.map +1 -0
  56. package/resources/data-sources.d.mts +2 -0
  57. package/resources/data-sources.d.mts.map +1 -0
  58. package/resources/data-sources.d.ts +2 -0
  59. package/resources/data-sources.d.ts.map +1 -0
  60. package/resources/data-sources.js +6 -0
  61. package/resources/data-sources.js.map +1 -0
  62. package/resources/data-sources.mjs +3 -0
  63. package/resources/data-sources.mjs.map +1 -0
  64. package/resources/embeddings.d.mts +7 -11
  65. package/resources/embeddings.d.mts.map +1 -1
  66. package/resources/embeddings.d.ts +7 -11
  67. package/resources/embeddings.d.ts.map +1 -1
  68. package/resources/embeddings.js +0 -9
  69. package/resources/embeddings.js.map +1 -1
  70. package/resources/embeddings.mjs +0 -9
  71. package/resources/embeddings.mjs.map +1 -1
  72. package/resources/extractions/content.d.mts +42 -44
  73. package/resources/extractions/content.d.mts.map +1 -1
  74. package/resources/extractions/content.d.ts +42 -44
  75. package/resources/extractions/content.d.ts.map +1 -1
  76. package/resources/extractions/extractions.d.mts +2 -2
  77. package/resources/extractions/extractions.d.mts.map +1 -1
  78. package/resources/extractions/extractions.d.ts +2 -2
  79. package/resources/extractions/extractions.d.ts.map +1 -1
  80. package/resources/extractions/extractions.js.map +1 -1
  81. package/resources/extractions/extractions.mjs.map +1 -1
  82. package/resources/extractions/index.d.mts +1 -1
  83. package/resources/extractions/index.d.mts.map +1 -1
  84. package/resources/extractions/index.d.ts +1 -1
  85. package/resources/extractions/index.d.ts.map +1 -1
  86. package/resources/extractions/index.js.map +1 -1
  87. package/resources/extractions/index.mjs +1 -1
  88. package/resources/extractions/index.mjs.map +1 -1
  89. package/resources/extractions/jobs.d.mts +2 -1
  90. package/resources/extractions/jobs.d.mts.map +1 -1
  91. package/resources/extractions/jobs.d.ts +2 -1
  92. package/resources/extractions/jobs.d.ts.map +1 -1
  93. package/resources/extractions/jobs.js.map +1 -1
  94. package/resources/extractions/jobs.mjs.map +1 -1
  95. package/resources/files.d.mts +18 -1
  96. package/resources/files.d.mts.map +1 -1
  97. package/resources/files.d.ts +18 -1
  98. package/resources/files.d.ts.map +1 -1
  99. package/resources/index.d.mts +6 -3
  100. package/resources/index.d.mts.map +1 -1
  101. package/resources/index.d.ts +6 -3
  102. package/resources/index.d.ts.map +1 -1
  103. package/resources/index.js +7 -1
  104. package/resources/index.js.map +1 -1
  105. package/resources/index.mjs +3 -0
  106. package/resources/index.mjs.map +1 -1
  107. package/resources/parsing/index.d.mts +1 -1
  108. package/resources/parsing/index.d.mts.map +1 -1
  109. package/resources/parsing/index.d.ts +1 -1
  110. package/resources/parsing/index.d.ts.map +1 -1
  111. package/resources/parsing/index.js.map +1 -1
  112. package/resources/parsing/index.mjs.map +1 -1
  113. package/resources/parsing/jobs.d.mts +24 -10
  114. package/resources/parsing/jobs.d.mts.map +1 -1
  115. package/resources/parsing/jobs.d.ts +24 -10
  116. package/resources/parsing/jobs.d.ts.map +1 -1
  117. package/resources/parsing/jobs.js.map +1 -1
  118. package/resources/parsing/jobs.mjs.map +1 -1
  119. package/resources/parsing/parsing.d.mts +2 -2
  120. package/resources/parsing/parsing.d.mts.map +1 -1
  121. package/resources/parsing/parsing.d.ts +2 -2
  122. package/resources/parsing/parsing.d.ts.map +1 -1
  123. package/resources/parsing/parsing.js.map +1 -1
  124. package/resources/parsing/parsing.mjs.map +1 -1
  125. package/resources/top-level.d.mts +5 -4
  126. package/resources/top-level.d.mts.map +1 -1
  127. package/resources/top-level.d.ts +5 -4
  128. package/resources/top-level.d.ts.map +1 -1
  129. package/resources/vector-stores/files.d.mts +29 -2
  130. package/resources/vector-stores/files.d.mts.map +1 -1
  131. package/resources/vector-stores/files.d.ts +29 -2
  132. package/resources/vector-stores/files.d.ts.map +1 -1
  133. package/resources/vector-stores/index.d.mts +1 -1
  134. package/resources/vector-stores/index.d.mts.map +1 -1
  135. package/resources/vector-stores/index.d.ts +1 -1
  136. package/resources/vector-stores/index.d.ts.map +1 -1
  137. package/resources/vector-stores/index.js.map +1 -1
  138. package/resources/vector-stores/index.mjs.map +1 -1
  139. package/resources/vector-stores/vector-stores.d.mts +209 -79
  140. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  141. package/resources/vector-stores/vector-stores.d.ts +209 -79
  142. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  143. package/resources/vector-stores/vector-stores.js.map +1 -1
  144. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  145. package/src/client.ts +68 -30
  146. package/src/internal/headers.ts +1 -1
  147. package/src/resources/api-keys.ts +225 -0
  148. package/src/resources/chat.ts +33 -0
  149. package/src/resources/data-sources/connectors.ts +280 -0
  150. package/src/resources/data-sources/data-sources.ts +271 -0
  151. package/src/resources/data-sources/index.ts +24 -0
  152. package/src/resources/data-sources.ts +3 -0
  153. package/src/resources/embeddings.ts +25 -19
  154. package/src/resources/extractions/content.ts +48 -45
  155. package/src/resources/extractions/extractions.ts +3 -1
  156. package/src/resources/extractions/index.ts +7 -1
  157. package/src/resources/extractions/jobs.ts +2 -1
  158. package/src/resources/files.ts +21 -0
  159. package/src/resources/index.ts +27 -4
  160. package/src/resources/parsing/index.ts +4 -0
  161. package/src/resources/parsing/jobs.ts +42 -44
  162. package/src/resources/parsing/parsing.ts +8 -0
  163. package/src/resources/top-level.ts +5 -44
  164. package/src/resources/vector-stores/files.ts +39 -2
  165. package/src/resources/vector-stores/index.ts +4 -3
  166. package/src/resources/vector-stores/vector-stores.ts +251 -89
  167. package/src/version.ts +1 -1
  168. package/version.d.mts +1 -1
  169. package/version.d.ts +1 -1
  170. package/version.js +1 -1
  171. package/version.mjs +1 -1
@@ -0,0 +1,271 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as ConnectorsAPI from './connectors';
5
+ import {
6
+ ConnectorCreateParams,
7
+ ConnectorDeleteParams,
8
+ ConnectorDeleteResponse,
9
+ ConnectorListParams,
10
+ ConnectorRetrieveParams,
11
+ ConnectorUpdateParams,
12
+ Connectors,
13
+ DataSourceConnector,
14
+ DataSourceConnectorsLimitOffset,
15
+ } from './connectors';
16
+ import { APIPromise } from '../../core/api-promise';
17
+ import { LimitOffset, type LimitOffsetParams, PagePromise } from '../../core/pagination';
18
+ import { RequestOptions } from '../../internal/request-options';
19
+ import { path } from '../../internal/utils/path';
20
+
21
+ export class DataSources extends APIResource {
22
+ connectors: ConnectorsAPI.Connectors = new ConnectorsAPI.Connectors(this._client);
23
+
24
+ /**
25
+ * Create a new data source.
26
+ *
27
+ * Args: params: The data source to create.
28
+ *
29
+ * Returns: The created data source.
30
+ */
31
+ create(body: DataSourceCreateParams, options?: RequestOptions): APIPromise<DataSource> {
32
+ return this._client.post('/v1/data_sources/', { body, ...options });
33
+ }
34
+
35
+ /**
36
+ * Get a data source by ID.
37
+ *
38
+ * Args: data_source_id: The ID of the data source to fetch.
39
+ *
40
+ * Returns: The data source.
41
+ */
42
+ retrieve(dataSourceID: string, options?: RequestOptions): APIPromise<DataSource> {
43
+ return this._client.get(path`/v1/data_sources/${dataSourceID}`, options);
44
+ }
45
+
46
+ /**
47
+ * Update a data source.
48
+ *
49
+ * Args: data_source_id: The ID of the data source to update. params: The data
50
+ * source to update.
51
+ *
52
+ * Returns: The updated data source.
53
+ */
54
+ update(
55
+ dataSourceID: string,
56
+ body: DataSourceUpdateParams,
57
+ options?: RequestOptions,
58
+ ): APIPromise<DataSource> {
59
+ return this._client.put(path`/v1/data_sources/${dataSourceID}`, { body, ...options });
60
+ }
61
+
62
+ /**
63
+ * Get all data sources.
64
+ *
65
+ * Returns: The list of data sources.
66
+ */
67
+ list(
68
+ query: DataSourceListParams | null | undefined = {},
69
+ options?: RequestOptions,
70
+ ): PagePromise<DataSourcesLimitOffset, DataSource> {
71
+ return this._client.getAPIList('/v1/data_sources/', LimitOffset<DataSource>, { query, ...options });
72
+ }
73
+
74
+ /**
75
+ * Delete a data source.
76
+ *
77
+ * Args: data_source_id: The ID of the data source to delete.
78
+ */
79
+ delete(dataSourceID: string, options?: RequestOptions): APIPromise<DataSourceDeleteResponse> {
80
+ return this._client.delete(path`/v1/data_sources/${dataSourceID}`, options);
81
+ }
82
+ }
83
+
84
+ export type DataSourcesLimitOffset = LimitOffset<DataSource>;
85
+
86
+ /**
87
+ * Service-level representation of a data source.
88
+ */
89
+ export interface DataSource {
90
+ /**
91
+ * The ID of the data source
92
+ */
93
+ id: string;
94
+
95
+ /**
96
+ * The creation time of the data source
97
+ */
98
+ created_at: string;
99
+
100
+ /**
101
+ * The last update time of the data source
102
+ */
103
+ updated_at: string;
104
+
105
+ /**
106
+ * The type of data source
107
+ */
108
+ type: DataSourceType;
109
+
110
+ /**
111
+ * The name of the data source
112
+ */
113
+ name: string;
114
+
115
+ /**
116
+ * The metadata of the data source
117
+ */
118
+ metadata: unknown;
119
+
120
+ /**
121
+ * Authentication parameters for a OAuth data source.
122
+ */
123
+ auth_params: DataSourceOauth2Params | null;
124
+
125
+ /**
126
+ * The type of the object
127
+ */
128
+ object?: 'data_source';
129
+ }
130
+
131
+ /**
132
+ * Authentication parameters for a OAuth data source.
133
+ */
134
+ export interface DataSourceOauth2Params {
135
+ type?: 'oauth2';
136
+
137
+ /**
138
+ * The timestamp when the OAuth2 credentials were created
139
+ */
140
+ created_at?: string;
141
+
142
+ /**
143
+ * The OAuth2 client ID
144
+ */
145
+ client_id: string;
146
+
147
+ /**
148
+ * The OAuth2 client secret
149
+ */
150
+ client_secret: string;
151
+
152
+ /**
153
+ * The OAuth2 redirect URI
154
+ */
155
+ redirect_uri: string;
156
+
157
+ /**
158
+ * The OAuth2 scope
159
+ */
160
+ scope: string;
161
+
162
+ /**
163
+ * The OAuth2 access token
164
+ */
165
+ access_token?: string | null;
166
+
167
+ /**
168
+ * The OAuth2 refresh token
169
+ */
170
+ refresh_token?: string | null;
171
+
172
+ /**
173
+ * The OAuth2 token type
174
+ */
175
+ token_type?: string | null;
176
+
177
+ /**
178
+ * The OAuth2 token expiration timestamp
179
+ */
180
+ expires_on?: string | null;
181
+ }
182
+
183
+ export type DataSourceType = 'notion' | 'linear';
184
+
185
+ /**
186
+ * Deleted data source.
187
+ */
188
+ export interface DataSourceDeleteResponse {
189
+ /**
190
+ * The ID of the data source
191
+ */
192
+ id: string;
193
+
194
+ /**
195
+ * Whether the data source was deleted
196
+ */
197
+ deleted?: boolean;
198
+
199
+ /**
200
+ * The type of the object
201
+ */
202
+ object?: 'data_source';
203
+ }
204
+
205
+ export interface DataSourceCreateParams {
206
+ /**
207
+ * The type of data source to create
208
+ */
209
+ type: DataSourceType;
210
+
211
+ /**
212
+ * The name of the data source
213
+ */
214
+ name: string;
215
+
216
+ /**
217
+ * The metadata of the data source
218
+ */
219
+ metadata?: unknown;
220
+
221
+ /**
222
+ * Authentication parameters for a OAuth data source.
223
+ */
224
+ auth_params?: DataSourceOauth2Params | null;
225
+ }
226
+
227
+ export interface DataSourceUpdateParams {
228
+ /**
229
+ * The name of the data source
230
+ */
231
+ name?: string | null;
232
+
233
+ /**
234
+ * The metadata of the data source
235
+ */
236
+ metadata?: unknown;
237
+
238
+ /**
239
+ * Authentication parameters for a OAuth data source.
240
+ */
241
+ auth_params?: DataSourceOauth2Params | null;
242
+ }
243
+
244
+ export interface DataSourceListParams extends LimitOffsetParams {}
245
+
246
+ DataSources.Connectors = Connectors;
247
+
248
+ export declare namespace DataSources {
249
+ export {
250
+ type DataSource as DataSource,
251
+ type DataSourceOauth2Params as DataSourceOauth2Params,
252
+ type DataSourceType as DataSourceType,
253
+ type DataSourceDeleteResponse as DataSourceDeleteResponse,
254
+ type DataSourcesLimitOffset as DataSourcesLimitOffset,
255
+ type DataSourceCreateParams as DataSourceCreateParams,
256
+ type DataSourceUpdateParams as DataSourceUpdateParams,
257
+ type DataSourceListParams as DataSourceListParams,
258
+ };
259
+
260
+ export {
261
+ Connectors as Connectors,
262
+ type DataSourceConnector as DataSourceConnector,
263
+ type ConnectorDeleteResponse as ConnectorDeleteResponse,
264
+ type DataSourceConnectorsLimitOffset as DataSourceConnectorsLimitOffset,
265
+ type ConnectorCreateParams as ConnectorCreateParams,
266
+ type ConnectorRetrieveParams as ConnectorRetrieveParams,
267
+ type ConnectorUpdateParams as ConnectorUpdateParams,
268
+ type ConnectorListParams as ConnectorListParams,
269
+ type ConnectorDeleteParams as ConnectorDeleteParams,
270
+ };
271
+ }
@@ -0,0 +1,24 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Connectors,
5
+ type DataSourceConnector,
6
+ type ConnectorDeleteResponse,
7
+ type ConnectorCreateParams,
8
+ type ConnectorRetrieveParams,
9
+ type ConnectorUpdateParams,
10
+ type ConnectorListParams,
11
+ type ConnectorDeleteParams,
12
+ type DataSourceConnectorsLimitOffset,
13
+ } from './connectors';
14
+ export {
15
+ DataSources,
16
+ type DataSource,
17
+ type DataSourceOauth2Params,
18
+ type DataSourceType,
19
+ type DataSourceDeleteResponse,
20
+ type DataSourceCreateParams,
21
+ type DataSourceUpdateParams,
22
+ type DataSourceListParams,
23
+ type DataSourcesLimitOffset,
24
+ } from './data-sources';
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './data-sources/index';
@@ -13,15 +13,6 @@ export class Embeddings extends APIResource {
13
13
  * Args: params: The parameters for creating embeddings.
14
14
  *
15
15
  * Returns: EmbeddingCreateResponse: The response containing the embeddings.
16
- *
17
- * @example
18
- * ```ts
19
- * const embeddingCreateResponse =
20
- * await client.embeddings.create({
21
- * model: 'mixedbread-ai/mxbai-embed-large-v1',
22
- * input: 'x',
23
- * });
24
- * ```
25
16
  */
26
17
  create(
27
18
  body: EmbeddingCreateParams,
@@ -31,6 +22,25 @@ export class Embeddings extends APIResource {
31
22
  }
32
23
  }
33
24
 
25
+ /**
26
+ * Enumeration of encoding formats.
27
+ */
28
+ export type EncodingFormat = 'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8';
29
+
30
+ export type ObjectType =
31
+ | 'list'
32
+ | 'parsing_job'
33
+ | 'extraction_job'
34
+ | 'embedding'
35
+ | 'embedding_dict'
36
+ | 'rank_result'
37
+ | 'file'
38
+ | 'vector_store'
39
+ | 'vector_store.file'
40
+ | 'api_key'
41
+ | 'data_source'
42
+ | 'data_source.connector';
43
+
34
44
  export interface EmbeddingCreateParams {
35
45
  /**
36
46
  * The model to use for creating embeddings.
@@ -61,17 +71,13 @@ export interface EmbeddingCreateParams {
61
71
  * The encoding format(s) of the embeddings. Can be a single format or a list of
62
72
  * formats.
63
73
  */
64
- encoding_format?:
65
- | 'float'
66
- | 'float16'
67
- | 'base64'
68
- | 'binary'
69
- | 'ubinary'
70
- | 'int8'
71
- | 'uint8'
72
- | Array<'float' | 'float16' | 'base64' | 'binary' | 'ubinary' | 'int8' | 'uint8'>;
74
+ encoding_format?: EncodingFormat | Array<EncodingFormat>;
73
75
  }
74
76
 
75
77
  export declare namespace Embeddings {
76
- export { type EmbeddingCreateParams as EmbeddingCreateParams };
78
+ export {
79
+ type EncodingFormat as EncodingFormat,
80
+ type ObjectType as ObjectType,
81
+ type EmbeddingCreateParams as EmbeddingCreateParams,
82
+ };
77
83
  }
@@ -26,70 +26,73 @@ export interface ExtractionResult {
26
26
  warnings: Array<string>;
27
27
  }
28
28
 
29
- export interface ContentCreateParams {
29
+ /**
30
+ * Model for image input validation.
31
+ */
32
+ export interface ImageURLInput {
30
33
  /**
31
- * The content to extract from
34
+ * Input type identifier
32
35
  */
33
- content: string | Array<string> | Array<ContentCreateParams.TextInput | ContentCreateParams.ImageURLInput>;
36
+ type?: 'image_url';
34
37
 
35
38
  /**
36
- * The JSON schema to use for extraction
39
+ * The image input specification.
37
40
  */
38
- json_schema: Record<string, unknown>;
41
+ image_url: ImageURLInput.ImageURL;
42
+ }
39
43
 
44
+ export namespace ImageURLInput {
40
45
  /**
41
- * Additional instructions for the extraction
46
+ * The image input specification.
42
47
  */
43
- instructions?: string | null;
48
+ export interface ImageURL {
49
+ /**
50
+ * The image URL. Can be either a URL or a Data URI.
51
+ */
52
+ url: string;
53
+ }
44
54
  }
45
55
 
46
- export namespace ContentCreateParams {
56
+ /**
57
+ * Model for text input validation.
58
+ *
59
+ * Attributes: type: Input type identifier, always "text" text: The actual text
60
+ * content, with length and whitespace constraints
61
+ */
62
+ export interface TextInput {
47
63
  /**
48
- * Model for text input validation.
49
- *
50
- * Attributes: type: Input type identifier, always "text" text: The actual text
51
- * content, with length and whitespace constraints
64
+ * Input type identifier
52
65
  */
53
- export interface TextInput {
54
- /**
55
- * Input type identifier
56
- */
57
- type?: 'text';
66
+ type?: 'text';
58
67
 
59
- /**
60
- * Text content to process
61
- */
62
- text: string;
63
- }
68
+ /**
69
+ * Text content to process
70
+ */
71
+ text: string;
72
+ }
64
73
 
74
+ export interface ContentCreateParams {
65
75
  /**
66
- * Model for image input validation.
76
+ * The content to extract from
67
77
  */
68
- export interface ImageURLInput {
69
- /**
70
- * Input type identifier
71
- */
72
- type?: 'image_url';
78
+ content: string | Array<string> | Array<TextInput | ImageURLInput>;
73
79
 
74
- /**
75
- * The image input specification.
76
- */
77
- image_url: ImageURLInput.ImageURL;
78
- }
80
+ /**
81
+ * The JSON schema to use for extraction
82
+ */
83
+ json_schema: Record<string, unknown>;
79
84
 
80
- export namespace ImageURLInput {
81
- /**
82
- * The image input specification.
83
- */
84
- export interface ImageURL {
85
- /**
86
- * The image URL. Can be either a URL or a Data URI.
87
- */
88
- url: string;
89
- }
90
- }
85
+ /**
86
+ * Additional instructions for the extraction
87
+ */
88
+ instructions?: string | null;
91
89
  }
92
90
 
93
91
  export declare namespace Content {
94
- export { type ExtractionResult as ExtractionResult, type ContentCreateParams as ContentCreateParams };
92
+ export {
93
+ type ExtractionResult as ExtractionResult,
94
+ type ImageURLInput as ImageURLInput,
95
+ type TextInput as TextInput,
96
+ type ContentCreateParams as ContentCreateParams,
97
+ };
95
98
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as ContentAPI from './content';
5
- import { Content, ContentCreateParams, ExtractionResult } from './content';
5
+ import { Content, ContentCreateParams, ExtractionResult, ImageURLInput, TextInput } from './content';
6
6
  import * as JobsAPI from './jobs';
7
7
  import { ExtractionJob, JobCreateParams, Jobs } from './jobs';
8
8
  import * as SchemaAPI from './schema';
@@ -42,6 +42,8 @@ export declare namespace Extractions {
42
42
  export {
43
43
  Content as Content,
44
44
  type ExtractionResult as ExtractionResult,
45
+ type ImageURLInput as ImageURLInput,
46
+ type TextInput as TextInput,
45
47
  type ContentCreateParams as ContentCreateParams,
46
48
  };
47
49
  }
@@ -1,6 +1,12 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { Content, type ExtractionResult, type ContentCreateParams } from './content';
3
+ export {
4
+ Content,
5
+ type ExtractionResult,
6
+ type ImageURLInput,
7
+ type TextInput,
8
+ type ContentCreateParams,
9
+ } from './content';
4
10
  export { Extractions } from './extractions';
5
11
  export { Jobs, type ExtractionJob, type JobCreateParams } from './jobs';
6
12
  export {
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as ContentAPI from './content';
5
+ import * as ParsingJobsAPI from '../parsing/jobs';
5
6
  import { APIPromise } from '../../core/api-promise';
6
7
  import { RequestOptions } from '../../internal/request-options';
7
8
  import { path } from '../../internal/utils/path';
@@ -72,7 +73,7 @@ export interface ExtractionJob {
72
73
  /**
73
74
  * Current status of the job
74
75
  */
75
- status: 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
76
+ status: ParsingJobsAPI.ParsingJobStatus;
76
77
 
77
78
  /**
78
79
  * The result of an extraction job.
@@ -132,6 +132,26 @@ export interface FileObject {
132
132
  updated_at: string;
133
133
  }
134
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
+
135
155
  export interface FileDeleteResponse {
136
156
  /**
137
157
  * The ID of the deleted file
@@ -168,6 +188,7 @@ export interface FileListParams extends LimitOffsetParams {}
168
188
  export declare namespace Files {
169
189
  export {
170
190
  type FileObject as FileObject,
191
+ type PaginationWithTotal as PaginationWithTotal,
171
192
  type FileDeleteResponse as FileDeleteResponse,
172
193
  type FileObjectsLimitOffset as FileObjectsLimitOffset,
173
194
  type FileCreateParams as FileCreateParams,
@@ -1,11 +1,33 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export * from './shared';
4
- export { Embeddings, type EmbeddingCreateParams } from './embeddings';
4
+ export {
5
+ APIKeys,
6
+ type APIKey,
7
+ type APIKeyCreated,
8
+ type APIKeyDeleteResponse,
9
+ type APIKeyCreateParams,
10
+ type APIKeyListParams,
11
+ type APIKeysLimitOffset,
12
+ } from './api-keys';
13
+ export { Chat, type ChatCreateCompletionResponse } from './chat';
14
+ export {
15
+ DataSources,
16
+ type DataSource,
17
+ type DataSourceOauth2Params,
18
+ type DataSourceType,
19
+ type DataSourceDeleteResponse,
20
+ type DataSourceCreateParams,
21
+ type DataSourceUpdateParams,
22
+ type DataSourceListParams,
23
+ type DataSourcesLimitOffset,
24
+ } from './data-sources/data-sources';
25
+ export { Embeddings, type EncodingFormat, type ObjectType, type EmbeddingCreateParams } from './embeddings';
5
26
  export { Extractions } from './extractions/extractions';
6
27
  export {
7
28
  Files,
8
29
  type FileObject,
30
+ type PaginationWithTotal,
9
31
  type FileDeleteResponse,
10
32
  type FileCreateParams,
11
33
  type FileUpdateParams,
@@ -16,11 +38,12 @@ export { Parsing } from './parsing/parsing';
16
38
  export {
17
39
  VectorStores,
18
40
  type ExpiresAfter,
19
- type FileCounts,
20
- type ScoredVectorStoreChunk,
41
+ type ScoredAudioURLInputChunk,
42
+ type ScoredImageURLInputChunk,
43
+ type ScoredTextInputChunk,
44
+ type ScoredVideoURLInputChunk,
21
45
  type VectorStore,
22
46
  type VectorStoreChunkSearchOptions,
23
- type VectorStoreFileSearchOptions,
24
47
  type VectorStoreDeleteResponse,
25
48
  type VectorStoreQuestionAnsweringResponse,
26
49
  type VectorStoreSearchResponse,
@@ -2,7 +2,11 @@
2
2
 
3
3
  export {
4
4
  Jobs,
5
+ type ChunkingStrategy,
6
+ type ElementType,
7
+ type ParsingJobStatus,
5
8
  type ParsingJob,
9
+ type ReturnFormat,
6
10
  type JobListResponse,
7
11
  type JobDeleteResponse,
8
12
  type JobCreateParams,