@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.
- package/CHANGELOG.md +33 -0
- package/bin/migration-config.json +103 -0
- package/client.d.mts +15 -28
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -28
- package/client.d.ts.map +1 -1
- package/client.js +9 -22
- package/client.js.map +1 -1
- package/client.mjs +9 -22
- package/client.mjs.map +1 -1
- package/internal/headers.js +1 -1
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +1 -1
- package/internal/headers.mjs.map +1 -1
- package/package.json +1 -4
- package/resources/api-keys.d.mts +171 -0
- package/resources/api-keys.d.mts.map +1 -0
- package/resources/api-keys.d.ts +171 -0
- package/resources/api-keys.d.ts.map +1 -0
- package/resources/api-keys.js +76 -0
- package/resources/api-keys.js.map +1 -0
- package/resources/api-keys.mjs +72 -0
- package/resources/api-keys.mjs.map +1 -0
- package/resources/chat.d.mts +27 -0
- package/resources/chat.d.mts.map +1 -0
- package/resources/chat.d.ts +27 -0
- package/resources/chat.d.ts.map +1 -0
- package/resources/chat.js +28 -0
- package/resources/chat.js.map +1 -0
- package/resources/chat.mjs +24 -0
- package/resources/chat.mjs.map +1 -0
- package/resources/data-sources/connectors.d.mts +193 -0
- package/resources/data-sources/connectors.d.mts.map +1 -0
- package/resources/data-sources/connectors.d.ts +193 -0
- package/resources/data-sources/connectors.d.ts.map +1 -0
- package/resources/data-sources/connectors.js +73 -0
- package/resources/data-sources/connectors.js.map +1 -0
- package/resources/data-sources/connectors.mjs +69 -0
- package/resources/data-sources/connectors.mjs.map +1 -0
- package/resources/data-sources/data-sources.d.mts +183 -0
- package/resources/data-sources/data-sources.d.mts.map +1 -0
- package/resources/data-sources/data-sources.d.ts +183 -0
- package/resources/data-sources/data-sources.d.ts.map +1 -0
- package/resources/data-sources/data-sources.js +66 -0
- package/resources/data-sources/data-sources.js.map +1 -0
- package/resources/data-sources/data-sources.mjs +61 -0
- package/resources/data-sources/data-sources.mjs.map +1 -0
- package/resources/data-sources/index.d.mts +3 -0
- package/resources/data-sources/index.d.mts.map +1 -0
- package/resources/data-sources/index.d.ts +3 -0
- package/resources/data-sources/index.d.ts.map +1 -0
- package/resources/data-sources/index.js +9 -0
- package/resources/data-sources/index.js.map +1 -0
- package/resources/data-sources/index.mjs +4 -0
- package/resources/data-sources/index.mjs.map +1 -0
- package/resources/data-sources.d.mts +2 -0
- package/resources/data-sources.d.mts.map +1 -0
- package/resources/data-sources.d.ts +2 -0
- package/resources/data-sources.d.ts.map +1 -0
- package/resources/data-sources.js +6 -0
- package/resources/data-sources.js.map +1 -0
- package/resources/data-sources.mjs +3 -0
- package/resources/data-sources.mjs.map +1 -0
- package/resources/embeddings.d.mts +7 -11
- package/resources/embeddings.d.mts.map +1 -1
- package/resources/embeddings.d.ts +7 -11
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js +0 -9
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs +0 -9
- package/resources/embeddings.mjs.map +1 -1
- package/resources/extractions/content.d.mts +42 -44
- package/resources/extractions/content.d.mts.map +1 -1
- package/resources/extractions/content.d.ts +42 -44
- package/resources/extractions/content.d.ts.map +1 -1
- package/resources/extractions/extractions.d.mts +2 -2
- package/resources/extractions/extractions.d.mts.map +1 -1
- package/resources/extractions/extractions.d.ts +2 -2
- package/resources/extractions/extractions.d.ts.map +1 -1
- package/resources/extractions/extractions.js.map +1 -1
- package/resources/extractions/extractions.mjs.map +1 -1
- package/resources/extractions/index.d.mts +1 -1
- package/resources/extractions/index.d.mts.map +1 -1
- package/resources/extractions/index.d.ts +1 -1
- package/resources/extractions/index.d.ts.map +1 -1
- package/resources/extractions/index.js.map +1 -1
- package/resources/extractions/index.mjs +1 -1
- package/resources/extractions/index.mjs.map +1 -1
- package/resources/extractions/jobs.d.mts +2 -1
- package/resources/extractions/jobs.d.mts.map +1 -1
- package/resources/extractions/jobs.d.ts +2 -1
- package/resources/extractions/jobs.d.ts.map +1 -1
- package/resources/extractions/jobs.js.map +1 -1
- package/resources/extractions/jobs.mjs.map +1 -1
- package/resources/files.d.mts +18 -1
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +18 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.mts +6 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/parsing/index.d.mts +1 -1
- package/resources/parsing/index.d.mts.map +1 -1
- package/resources/parsing/index.d.ts +1 -1
- package/resources/parsing/index.d.ts.map +1 -1
- package/resources/parsing/index.js.map +1 -1
- package/resources/parsing/index.mjs.map +1 -1
- package/resources/parsing/jobs.d.mts +24 -10
- package/resources/parsing/jobs.d.mts.map +1 -1
- package/resources/parsing/jobs.d.ts +24 -10
- package/resources/parsing/jobs.d.ts.map +1 -1
- package/resources/parsing/jobs.js.map +1 -1
- package/resources/parsing/jobs.mjs.map +1 -1
- package/resources/parsing/parsing.d.mts +2 -2
- package/resources/parsing/parsing.d.mts.map +1 -1
- package/resources/parsing/parsing.d.ts +2 -2
- package/resources/parsing/parsing.d.ts.map +1 -1
- package/resources/parsing/parsing.js.map +1 -1
- package/resources/parsing/parsing.mjs.map +1 -1
- package/resources/top-level.d.mts +5 -4
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +5 -4
- package/resources/top-level.d.ts.map +1 -1
- package/resources/vector-stores/files.d.mts +29 -2
- package/resources/vector-stores/files.d.mts.map +1 -1
- package/resources/vector-stores/files.d.ts +29 -2
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/index.d.mts +1 -1
- package/resources/vector-stores/index.d.mts.map +1 -1
- package/resources/vector-stores/index.d.ts +1 -1
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/index.js.map +1 -1
- package/resources/vector-stores/index.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.mts +209 -79
- package/resources/vector-stores/vector-stores.d.mts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +209 -79
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/src/client.ts +68 -30
- package/src/internal/headers.ts +1 -1
- package/src/resources/api-keys.ts +225 -0
- package/src/resources/chat.ts +33 -0
- package/src/resources/data-sources/connectors.ts +280 -0
- package/src/resources/data-sources/data-sources.ts +271 -0
- package/src/resources/data-sources/index.ts +24 -0
- package/src/resources/data-sources.ts +3 -0
- package/src/resources/embeddings.ts +25 -19
- package/src/resources/extractions/content.ts +48 -45
- package/src/resources/extractions/extractions.ts +3 -1
- package/src/resources/extractions/index.ts +7 -1
- package/src/resources/extractions/jobs.ts +2 -1
- package/src/resources/files.ts +21 -0
- package/src/resources/index.ts +27 -4
- package/src/resources/parsing/index.ts +4 -0
- package/src/resources/parsing/jobs.ts +42 -44
- package/src/resources/parsing/parsing.ts +8 -0
- package/src/resources/top-level.ts +5 -44
- package/src/resources/vector-stores/files.ts +39 -2
- package/src/resources/vector-stores/index.ts +4 -3
- package/src/resources/vector-stores/vector-stores.ts +251 -89
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
@@ -0,0 +1,225 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
import { APIResource } from '../core/resource';
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
5
|
+
import { LimitOffset, type LimitOffsetParams, PagePromise } from '../core/pagination';
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
7
|
+
import { path } from '../internal/utils/path';
|
8
|
+
|
9
|
+
export class APIKeys extends APIResource {
|
10
|
+
/**
|
11
|
+
* Create a new API key.
|
12
|
+
*
|
13
|
+
* Args: params: The parameters for creating the API key.
|
14
|
+
*
|
15
|
+
* Returns: ApiKeyCreated: The response containing the details of the created API
|
16
|
+
* key.
|
17
|
+
*/
|
18
|
+
create(body: APIKeyCreateParams, options?: RequestOptions): APIPromise<APIKeyCreated> {
|
19
|
+
return this._client.post('/v1/api-keys', { body, ...options });
|
20
|
+
}
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Retrieve details of a specific API key by its ID.
|
24
|
+
*
|
25
|
+
* Args: api_key_id: The ID of the API key to retrieve.
|
26
|
+
*
|
27
|
+
* Returns: ApiKey: The response containing the API key details.
|
28
|
+
*/
|
29
|
+
retrieve(apiKeyID: string, options?: RequestOptions): APIPromise<APIKey> {
|
30
|
+
return this._client.get(path`/v1/api-keys/${apiKeyID}`, options);
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* List all API keys for the authenticated user.
|
35
|
+
*
|
36
|
+
* Args: pagination: The pagination options
|
37
|
+
*
|
38
|
+
* Returns: A list of API keys belonging to the user.
|
39
|
+
*/
|
40
|
+
list(
|
41
|
+
query: APIKeyListParams | null | undefined = {},
|
42
|
+
options?: RequestOptions,
|
43
|
+
): PagePromise<APIKeysLimitOffset, APIKey> {
|
44
|
+
return this._client.getAPIList('/v1/api-keys', LimitOffset<APIKey>, { query, ...options });
|
45
|
+
}
|
46
|
+
|
47
|
+
/**
|
48
|
+
* Delete a specific API key by its ID.
|
49
|
+
*
|
50
|
+
* Args: api_key_id: The ID of the API key to delete.
|
51
|
+
*
|
52
|
+
* Returns: ApiKeyDeleted: The response containing the details of the deleted API
|
53
|
+
* key.
|
54
|
+
*/
|
55
|
+
delete(apiKeyID: string, options?: RequestOptions): APIPromise<APIKeyDeleteResponse> {
|
56
|
+
return this._client.delete(path`/v1/api-keys/${apiKeyID}`, options);
|
57
|
+
}
|
58
|
+
|
59
|
+
/**
|
60
|
+
* Reroll the secret for a specific API key by its ID.
|
61
|
+
*
|
62
|
+
* This generates a new secret key, invalidating the old one.
|
63
|
+
*
|
64
|
+
* Args: api_key_id: The ID of the API key to reroll.
|
65
|
+
*
|
66
|
+
* Returns: ApiKeyCreated: The response containing the API key details with the new
|
67
|
+
* secret key.
|
68
|
+
*/
|
69
|
+
reroll(apiKeyID: string, options?: RequestOptions): APIPromise<APIKeyCreated> {
|
70
|
+
return this._client.post(path`/v1/api-keys/${apiKeyID}/reroll`, options);
|
71
|
+
}
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Revoke a specific API key by its ID.
|
75
|
+
*
|
76
|
+
* Args: api_key_id: The ID of the API key to revoke.
|
77
|
+
*
|
78
|
+
* Returns: ApiKey: The response containing the details of the revoked API key.
|
79
|
+
*/
|
80
|
+
revoke(apiKeyID: string, options?: RequestOptions): APIPromise<APIKey> {
|
81
|
+
return this._client.post(path`/v1/api-keys/${apiKeyID}/revoke`, options);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
export type APIKeysLimitOffset = LimitOffset<APIKey>;
|
86
|
+
|
87
|
+
/**
|
88
|
+
* Response model for an API key.
|
89
|
+
*/
|
90
|
+
export interface APIKey {
|
91
|
+
/**
|
92
|
+
* The ID of the API key
|
93
|
+
*/
|
94
|
+
id: string;
|
95
|
+
|
96
|
+
/**
|
97
|
+
* The name of the API key
|
98
|
+
*/
|
99
|
+
name: string;
|
100
|
+
|
101
|
+
/**
|
102
|
+
* The redacted value of the API key
|
103
|
+
*/
|
104
|
+
redacted_value: string;
|
105
|
+
|
106
|
+
/**
|
107
|
+
* The expiration datetime of the API key
|
108
|
+
*/
|
109
|
+
expires_at?: string | null;
|
110
|
+
|
111
|
+
/**
|
112
|
+
* The creation datetime of the API key
|
113
|
+
*/
|
114
|
+
created_at: string;
|
115
|
+
|
116
|
+
/**
|
117
|
+
* The last update datetime of the API key
|
118
|
+
*/
|
119
|
+
updated_at: string;
|
120
|
+
|
121
|
+
/**
|
122
|
+
* The last active datetime of the API key
|
123
|
+
*/
|
124
|
+
last_active_at?: string | null;
|
125
|
+
|
126
|
+
/**
|
127
|
+
* The type of the object
|
128
|
+
*/
|
129
|
+
object?: 'api_key';
|
130
|
+
}
|
131
|
+
|
132
|
+
/**
|
133
|
+
* Response model for creating an API key.
|
134
|
+
*/
|
135
|
+
export interface APIKeyCreated {
|
136
|
+
/**
|
137
|
+
* The ID of the API key
|
138
|
+
*/
|
139
|
+
id: string;
|
140
|
+
|
141
|
+
/**
|
142
|
+
* The name of the API key
|
143
|
+
*/
|
144
|
+
name: string;
|
145
|
+
|
146
|
+
/**
|
147
|
+
* The redacted value of the API key
|
148
|
+
*/
|
149
|
+
redacted_value: string;
|
150
|
+
|
151
|
+
/**
|
152
|
+
* The expiration datetime of the API key
|
153
|
+
*/
|
154
|
+
expires_at?: string | null;
|
155
|
+
|
156
|
+
/**
|
157
|
+
* The creation datetime of the API key
|
158
|
+
*/
|
159
|
+
created_at: string;
|
160
|
+
|
161
|
+
/**
|
162
|
+
* The last update datetime of the API key
|
163
|
+
*/
|
164
|
+
updated_at: string;
|
165
|
+
|
166
|
+
/**
|
167
|
+
* The last active datetime of the API key
|
168
|
+
*/
|
169
|
+
last_active_at?: string | null;
|
170
|
+
|
171
|
+
/**
|
172
|
+
* The type of the object
|
173
|
+
*/
|
174
|
+
object?: 'api_key';
|
175
|
+
|
176
|
+
/**
|
177
|
+
* The value of the API key
|
178
|
+
*/
|
179
|
+
value: string;
|
180
|
+
}
|
181
|
+
|
182
|
+
/**
|
183
|
+
* Response model for deleting an API key.
|
184
|
+
*/
|
185
|
+
export interface APIKeyDeleteResponse {
|
186
|
+
/**
|
187
|
+
* The ID of the deleted API key
|
188
|
+
*/
|
189
|
+
id: string;
|
190
|
+
|
191
|
+
/**
|
192
|
+
* Whether the API key was deleted
|
193
|
+
*/
|
194
|
+
deleted: boolean;
|
195
|
+
|
196
|
+
/**
|
197
|
+
* The type of the object deleted
|
198
|
+
*/
|
199
|
+
object?: 'api_key';
|
200
|
+
}
|
201
|
+
|
202
|
+
export interface APIKeyCreateParams {
|
203
|
+
/**
|
204
|
+
* A name/description for the API key
|
205
|
+
*/
|
206
|
+
name?: string;
|
207
|
+
|
208
|
+
/**
|
209
|
+
* Optional expiration datetime
|
210
|
+
*/
|
211
|
+
expires_at?: string | null;
|
212
|
+
}
|
213
|
+
|
214
|
+
export interface APIKeyListParams extends LimitOffsetParams {}
|
215
|
+
|
216
|
+
export declare namespace APIKeys {
|
217
|
+
export {
|
218
|
+
type APIKey as APIKey,
|
219
|
+
type APIKeyCreated as APIKeyCreated,
|
220
|
+
type APIKeyDeleteResponse as APIKeyDeleteResponse,
|
221
|
+
type APIKeysLimitOffset as APIKeysLimitOffset,
|
222
|
+
type APIKeyCreateParams as APIKeyCreateParams,
|
223
|
+
type APIKeyListParams as APIKeyListParams,
|
224
|
+
};
|
225
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
import { APIResource } from '../core/resource';
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
6
|
+
|
7
|
+
export class Chat extends APIResource {
|
8
|
+
/**
|
9
|
+
* Create a chat completion using the provided parameters.
|
10
|
+
*
|
11
|
+
* Generates a completion response based on the chat messages and model parameters
|
12
|
+
* provided. The response can be either a full completion or streamed chunks
|
13
|
+
* depending on the request parameters.
|
14
|
+
*
|
15
|
+
* Args: params: Parameters for creating the chat completion including messages,
|
16
|
+
* model selection, and generation settings user: The authenticated user making the
|
17
|
+
* request
|
18
|
+
*
|
19
|
+
* Returns: Either a ChatCompletion containing the full response, or
|
20
|
+
* ChatCompletionChunk for streaming
|
21
|
+
*
|
22
|
+
* Raises: HTTPException: If there is an error creating the completion (500)
|
23
|
+
*/
|
24
|
+
createCompletion(options?: RequestOptions): APIPromise<unknown> {
|
25
|
+
return this._client.post('/v1/chat/completions', options);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
export type ChatCreateCompletionResponse = unknown;
|
30
|
+
|
31
|
+
export declare namespace Chat {
|
32
|
+
export { type ChatCreateCompletionResponse as ChatCreateCompletionResponse };
|
33
|
+
}
|
@@ -0,0 +1,280 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
|
3
|
+
import { APIResource } from '../../core/resource';
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
5
|
+
import { LimitOffset, type LimitOffsetParams, PagePromise } from '../../core/pagination';
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
7
|
+
import { path } from '../../internal/utils/path';
|
8
|
+
|
9
|
+
export class Connectors extends APIResource {
|
10
|
+
/**
|
11
|
+
* Create a new connector.
|
12
|
+
*
|
13
|
+
* Args: data_source_id: The ID of the data source to create a connector for.
|
14
|
+
* params: The connector to create.
|
15
|
+
*
|
16
|
+
* Returns: The created connector.
|
17
|
+
*/
|
18
|
+
create(
|
19
|
+
dataSourceID: string,
|
20
|
+
body: ConnectorCreateParams,
|
21
|
+
options?: RequestOptions,
|
22
|
+
): APIPromise<DataSourceConnector> {
|
23
|
+
return this._client.post(path`/v1/data_sources/${dataSourceID}/connectors`, { body, ...options });
|
24
|
+
}
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Get a connector by ID.
|
28
|
+
*
|
29
|
+
* Args: data_source_id: The ID of the data source to get a connector for.
|
30
|
+
* connector_id: The ID of the connector to get.
|
31
|
+
*
|
32
|
+
* Returns: The connector.
|
33
|
+
*/
|
34
|
+
retrieve(
|
35
|
+
connectorID: string,
|
36
|
+
params: ConnectorRetrieveParams,
|
37
|
+
options?: RequestOptions,
|
38
|
+
): APIPromise<DataSourceConnector> {
|
39
|
+
const { data_source_id } = params;
|
40
|
+
return this._client.get(path`/v1/data_sources/${data_source_id}/connectors/${connectorID}`, options);
|
41
|
+
}
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Update a connector.
|
45
|
+
*
|
46
|
+
* Args: data_source_id: The ID of the data source to update a connector for.
|
47
|
+
* connector_id: The ID of the connector to update. params: The connector to
|
48
|
+
* update.
|
49
|
+
*
|
50
|
+
* Returns: The updated connector.
|
51
|
+
*/
|
52
|
+
update(
|
53
|
+
connectorID: string,
|
54
|
+
params: ConnectorUpdateParams,
|
55
|
+
options?: RequestOptions,
|
56
|
+
): APIPromise<DataSourceConnector> {
|
57
|
+
const { data_source_id, ...body } = params;
|
58
|
+
return this._client.put(path`/v1/data_sources/${data_source_id}/connectors/${connectorID}`, {
|
59
|
+
body,
|
60
|
+
...options,
|
61
|
+
});
|
62
|
+
}
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Get all connectors for a data source.
|
66
|
+
*
|
67
|
+
* Args: data_source_id: The ID of the data source to get connectors for.
|
68
|
+
* pagination: The pagination options.
|
69
|
+
*
|
70
|
+
* Returns: The list of connectors.
|
71
|
+
*/
|
72
|
+
list(
|
73
|
+
dataSourceID: string,
|
74
|
+
query: ConnectorListParams | null | undefined = {},
|
75
|
+
options?: RequestOptions,
|
76
|
+
): PagePromise<DataSourceConnectorsLimitOffset, DataSourceConnector> {
|
77
|
+
return this._client.getAPIList(
|
78
|
+
path`/v1/data_sources/${dataSourceID}/connectors`,
|
79
|
+
LimitOffset<DataSourceConnector>,
|
80
|
+
{ query, ...options },
|
81
|
+
);
|
82
|
+
}
|
83
|
+
|
84
|
+
/**
|
85
|
+
* Delete a connector.
|
86
|
+
*
|
87
|
+
* Args: data_source_id: The ID of the data source to delete a connector for.
|
88
|
+
* connector_id: The ID of the connector to delete.
|
89
|
+
*
|
90
|
+
* Returns: The deleted connector.
|
91
|
+
*/
|
92
|
+
delete(
|
93
|
+
connectorID: string,
|
94
|
+
params: ConnectorDeleteParams,
|
95
|
+
options?: RequestOptions,
|
96
|
+
): APIPromise<ConnectorDeleteResponse> {
|
97
|
+
const { data_source_id } = params;
|
98
|
+
return this._client.delete(path`/v1/data_sources/${data_source_id}/connectors/${connectorID}`, options);
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
export type DataSourceConnectorsLimitOffset = LimitOffset<DataSourceConnector>;
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Service-level representation of a connector.
|
106
|
+
*/
|
107
|
+
export interface DataSourceConnector {
|
108
|
+
/**
|
109
|
+
* The ID of the connector
|
110
|
+
*/
|
111
|
+
id: string;
|
112
|
+
|
113
|
+
/**
|
114
|
+
* The creation time of the connector
|
115
|
+
*/
|
116
|
+
created_at: string;
|
117
|
+
|
118
|
+
/**
|
119
|
+
* The last update time of the connector
|
120
|
+
*/
|
121
|
+
updated_at: string;
|
122
|
+
|
123
|
+
/**
|
124
|
+
* The ID of the vector store
|
125
|
+
*/
|
126
|
+
vector_store_id: string;
|
127
|
+
|
128
|
+
/**
|
129
|
+
* The ID of the data source
|
130
|
+
*/
|
131
|
+
data_source_id: string;
|
132
|
+
|
133
|
+
/**
|
134
|
+
* The name of the connector
|
135
|
+
*/
|
136
|
+
name?: string;
|
137
|
+
|
138
|
+
/**
|
139
|
+
* The metadata of the connector
|
140
|
+
*/
|
141
|
+
metadata: unknown;
|
142
|
+
|
143
|
+
/**
|
144
|
+
* The polling interval of the connector
|
145
|
+
*/
|
146
|
+
polling_interval: string;
|
147
|
+
|
148
|
+
/**
|
149
|
+
* The start time of the connector
|
150
|
+
*/
|
151
|
+
started_at: string | null;
|
152
|
+
|
153
|
+
/**
|
154
|
+
* The finish time of the connector
|
155
|
+
*/
|
156
|
+
finished_at: string | null;
|
157
|
+
|
158
|
+
/**
|
159
|
+
* The last sync time of the connector
|
160
|
+
*/
|
161
|
+
last_synced_at: string | null;
|
162
|
+
|
163
|
+
/**
|
164
|
+
* The sync status of the connector
|
165
|
+
*/
|
166
|
+
status: 'idle' | 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
|
167
|
+
|
168
|
+
/**
|
169
|
+
* The sync error of the connector
|
170
|
+
*/
|
171
|
+
error: string | null;
|
172
|
+
|
173
|
+
/**
|
174
|
+
* The type of the object
|
175
|
+
*/
|
176
|
+
object?: 'data_source.connector';
|
177
|
+
}
|
178
|
+
|
179
|
+
/**
|
180
|
+
* Deleted connector.
|
181
|
+
*/
|
182
|
+
export interface ConnectorDeleteResponse {
|
183
|
+
/**
|
184
|
+
* The ID of the connector
|
185
|
+
*/
|
186
|
+
id: string;
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Whether the connector was deleted
|
190
|
+
*/
|
191
|
+
deleted?: boolean;
|
192
|
+
|
193
|
+
/**
|
194
|
+
* The type of the object
|
195
|
+
*/
|
196
|
+
object?: 'data_source.connector';
|
197
|
+
}
|
198
|
+
|
199
|
+
export interface ConnectorCreateParams {
|
200
|
+
/**
|
201
|
+
* The ID of the vector store
|
202
|
+
*/
|
203
|
+
vector_store_id: string;
|
204
|
+
|
205
|
+
/**
|
206
|
+
* The name of the connector
|
207
|
+
*/
|
208
|
+
name?: string;
|
209
|
+
|
210
|
+
/**
|
211
|
+
* Whether the connector should be synced after creation
|
212
|
+
*/
|
213
|
+
trigger_sync?: boolean;
|
214
|
+
|
215
|
+
/**
|
216
|
+
* The metadata of the connector
|
217
|
+
*/
|
218
|
+
metadata?: unknown;
|
219
|
+
|
220
|
+
/**
|
221
|
+
* The polling interval of the connector
|
222
|
+
*/
|
223
|
+
polling_interval?: string | null;
|
224
|
+
}
|
225
|
+
|
226
|
+
export interface ConnectorRetrieveParams {
|
227
|
+
/**
|
228
|
+
* The ID of the data source to get a connector for
|
229
|
+
*/
|
230
|
+
data_source_id: string;
|
231
|
+
}
|
232
|
+
|
233
|
+
export interface ConnectorUpdateParams {
|
234
|
+
/**
|
235
|
+
* Path param: The ID of the data source to update a connector for
|
236
|
+
*/
|
237
|
+
data_source_id: string;
|
238
|
+
|
239
|
+
/**
|
240
|
+
* Body param: The name of the connector
|
241
|
+
*/
|
242
|
+
name?: string | null;
|
243
|
+
|
244
|
+
/**
|
245
|
+
* Body param: The metadata of the connector
|
246
|
+
*/
|
247
|
+
metadata?: Record<string, unknown> | null;
|
248
|
+
|
249
|
+
/**
|
250
|
+
* Body param: Whether the connector should be synced after update
|
251
|
+
*/
|
252
|
+
trigger_sync?: boolean | null;
|
253
|
+
|
254
|
+
/**
|
255
|
+
* Body param: The polling interval of the connector
|
256
|
+
*/
|
257
|
+
polling_interval?: string | null;
|
258
|
+
}
|
259
|
+
|
260
|
+
export interface ConnectorListParams extends LimitOffsetParams {}
|
261
|
+
|
262
|
+
export interface ConnectorDeleteParams {
|
263
|
+
/**
|
264
|
+
* The ID of the data source to delete a connector for
|
265
|
+
*/
|
266
|
+
data_source_id: string;
|
267
|
+
}
|
268
|
+
|
269
|
+
export declare namespace Connectors {
|
270
|
+
export {
|
271
|
+
type DataSourceConnector as DataSourceConnector,
|
272
|
+
type ConnectorDeleteResponse as ConnectorDeleteResponse,
|
273
|
+
type DataSourceConnectorsLimitOffset as DataSourceConnectorsLimitOffset,
|
274
|
+
type ConnectorCreateParams as ConnectorCreateParams,
|
275
|
+
type ConnectorRetrieveParams as ConnectorRetrieveParams,
|
276
|
+
type ConnectorUpdateParams as ConnectorUpdateParams,
|
277
|
+
type ConnectorListParams as ConnectorListParams,
|
278
|
+
type ConnectorDeleteParams as ConnectorDeleteParams,
|
279
|
+
};
|
280
|
+
}
|