@mixedbread/sdk 0.15.0 → 0.17.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 +22 -0
- package/README.md +31 -0
- package/bin/migration-config.json +4 -0
- package/client.d.mts +8 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -6
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +10 -16
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +10 -16
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/internal/request-options.d.mts +42 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +42 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/data-sources/connectors.d.mts +5 -106
- package/resources/data-sources/connectors.d.mts.map +1 -1
- package/resources/data-sources/connectors.d.ts +5 -106
- package/resources/data-sources/connectors.d.ts.map +1 -1
- package/resources/data-sources/connectors.js +2 -1
- package/resources/data-sources/connectors.js.map +1 -1
- package/resources/data-sources/connectors.mjs +2 -1
- package/resources/data-sources/connectors.mjs.map +1 -1
- package/resources/data-sources/data-sources.d.mts +7 -108
- package/resources/data-sources/data-sources.d.mts.map +1 -1
- package/resources/data-sources/data-sources.d.ts +7 -108
- package/resources/data-sources/data-sources.d.ts.map +1 -1
- package/resources/data-sources/data-sources.js +2 -1
- package/resources/data-sources/data-sources.js.map +1 -1
- package/resources/data-sources/data-sources.mjs +2 -1
- package/resources/data-sources/data-sources.mjs.map +1 -1
- package/resources/data-sources/index.d.mts +2 -2
- package/resources/data-sources/index.d.mts.map +1 -1
- package/resources/data-sources/index.d.ts +2 -2
- package/resources/data-sources/index.d.ts.map +1 -1
- package/resources/embeddings.d.mts +1 -1
- package/resources/embeddings.d.mts.map +1 -1
- package/resources/embeddings.d.ts +1 -1
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/files.d.mts +5 -103
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +5 -103
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +2 -1
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +2 -1
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.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 +33 -134
- package/resources/parsing/jobs.d.mts.map +1 -1
- package/resources/parsing/jobs.d.ts +33 -134
- package/resources/parsing/jobs.d.ts.map +1 -1
- package/resources/parsing/jobs.js +2 -1
- package/resources/parsing/jobs.js.map +1 -1
- package/resources/parsing/jobs.mjs +2 -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/vector-stores/files.d.mts +135 -95
- package/resources/vector-stores/files.d.mts.map +1 -1
- package/resources/vector-stores/files.d.ts +135 -95
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +7 -3
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +7 -3
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/index.d.mts +2 -2
- package/resources/vector-stores/index.d.mts.map +1 -1
- package/resources/vector-stores/index.d.ts +2 -2
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.d.mts +23 -117
- package/resources/vector-stores/vector-stores.d.mts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +23 -117
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +2 -1
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +2 -1
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/src/client.ts +8 -6
- package/src/core/pagination.ts +10 -18
- package/src/internal/request-options.ts +53 -0
- package/src/resources/data-sources/connectors.ts +11 -118
- package/src/resources/data-sources/data-sources.ts +9 -120
- package/src/resources/data-sources/index.ts +2 -2
- package/src/resources/embeddings.ts +2 -1
- package/src/resources/files.ts +7 -115
- package/src/resources/index.ts +3 -3
- package/src/resources/parsing/index.ts +1 -0
- package/src/resources/parsing/jobs.ts +38 -145
- package/src/resources/parsing/parsing.ts +2 -0
- package/src/resources/vector-stores/files.ts +167 -103
- package/src/resources/vector-stores/index.ts +2 -2
- package/src/resources/vector-stores/vector-stores.ts +29 -132
- 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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vector-stores.d.ts","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,QAAQ;OACb,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,
|
1
|
+
{"version":3,"file":"vector-stores.d.ts","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,QAAQ;OACb,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,kBAAk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BAAkB,IAAI,kBAAkB,EAC7C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
@@ -6,6 +6,7 @@ const tslib_1 = require("../../internal/tslib.js");
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
7
7
|
const FilesAPI = tslib_1.__importStar(require("./files.js"));
|
8
8
|
const files_1 = require("./files.js");
|
9
|
+
const pagination_1 = require("../../core/pagination.js");
|
9
10
|
const path_1 = require("../../internal/utils/path.js");
|
10
11
|
class VectorStores extends resource_1.APIResource {
|
11
12
|
constructor() {
|
@@ -54,7 +55,7 @@ class VectorStores extends resource_1.APIResource {
|
|
54
55
|
* Returns: VectorStoreListResponse: The list of vector stores.
|
55
56
|
*/
|
56
57
|
list(query = {}, options) {
|
57
|
-
return this._client.
|
58
|
+
return this._client.getAPIList('/v1/vector_stores', (pagination_1.Cursor), { query, ...options });
|
58
59
|
}
|
59
60
|
/**
|
60
61
|
* Delete a vector store by ID or name.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vector-stores.js","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,sCAciB;
|
1
|
+
{"version":3,"file":"vector-stores.js","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,sCAciB;AAEjB,yDAA+E;AAE/E,uDAAiD;AAEjD,MAAa,YAAa,SAAQ,sBAAW;IAA7C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,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,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AArGD,oCAqGC;AA+qBD,YAAY,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
3
3
|
import * as FilesAPI from "./files.mjs";
|
4
4
|
import { Files, } from "./files.mjs";
|
5
|
+
import { Cursor } from "../../core/pagination.mjs";
|
5
6
|
import { path } from "../../internal/utils/path.mjs";
|
6
7
|
export class VectorStores extends APIResource {
|
7
8
|
constructor() {
|
@@ -50,7 +51,7 @@ export class VectorStores extends APIResource {
|
|
50
51
|
* Returns: VectorStoreListResponse: The list of vector stores.
|
51
52
|
*/
|
52
53
|
list(query = {}, options) {
|
53
|
-
return this._client.
|
54
|
+
return this._client.getAPIList('/v1/vector_stores', (Cursor), { query, ...options });
|
54
55
|
}
|
55
56
|
/**
|
56
57
|
* Delete a vector store by ID or name.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vector-stores.mjs","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,
|
1
|
+
{"version":3,"file":"vector-stores.mjs","sourceRoot":"","sources":["../../src/resources/vector-stores/vector-stores.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAQL,KAAK,GAMN;OAEM,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoG3D,CAAC;IAlGC;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CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AA+qBD,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
package/src/client.ts
CHANGED
@@ -50,8 +50,8 @@ import {
|
|
50
50
|
FileCreateParams,
|
51
51
|
FileDeleteResponse,
|
52
52
|
FileListParams,
|
53
|
-
FileListResponse,
|
54
53
|
FileObject,
|
54
|
+
FileObjectsCursor,
|
55
55
|
FileUpdateParams,
|
56
56
|
Files,
|
57
57
|
PaginationWithTotal,
|
@@ -61,11 +61,11 @@ import {
|
|
61
61
|
DataSourceCreateParams,
|
62
62
|
DataSourceDeleteResponse,
|
63
63
|
DataSourceListParams,
|
64
|
-
DataSourceListResponse,
|
65
64
|
DataSourceOauth2Params,
|
66
65
|
DataSourceType,
|
67
66
|
DataSourceUpdateParams,
|
68
67
|
DataSources,
|
68
|
+
DataSourcesCursor,
|
69
69
|
LinearDataSource,
|
70
70
|
NotionDataSource,
|
71
71
|
Oauth2Params,
|
@@ -83,13 +83,13 @@ import {
|
|
83
83
|
VectorStoreCreateParams,
|
84
84
|
VectorStoreDeleteResponse,
|
85
85
|
VectorStoreListParams,
|
86
|
-
VectorStoreListResponse,
|
87
86
|
VectorStoreQuestionAnsweringParams,
|
88
87
|
VectorStoreQuestionAnsweringResponse,
|
89
88
|
VectorStoreSearchParams,
|
90
89
|
VectorStoreSearchResponse,
|
91
90
|
VectorStoreUpdateParams,
|
92
91
|
VectorStores,
|
92
|
+
VectorStoresCursor,
|
93
93
|
} from './resources/vector-stores/vector-stores';
|
94
94
|
import { type Fetch } from './internal/builtin-types';
|
95
95
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
@@ -138,6 +138,8 @@ export interface ClientOptions {
|
|
138
138
|
*
|
139
139
|
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
140
140
|
* much longer than this timeout before the promise succeeds or fails.
|
141
|
+
*
|
142
|
+
* @unit milliseconds
|
141
143
|
*/
|
142
144
|
timeout?: number | undefined;
|
143
145
|
/**
|
@@ -890,10 +892,10 @@ export declare namespace Mixedbread {
|
|
890
892
|
type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk,
|
891
893
|
type VectorStore as VectorStore,
|
892
894
|
type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions,
|
893
|
-
type VectorStoreListResponse as VectorStoreListResponse,
|
894
895
|
type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
|
895
896
|
type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
|
896
897
|
type VectorStoreSearchResponse as VectorStoreSearchResponse,
|
898
|
+
type VectorStoresCursor as VectorStoresCursor,
|
897
899
|
type VectorStoreCreateParams as VectorStoreCreateParams,
|
898
900
|
type VectorStoreUpdateParams as VectorStoreUpdateParams,
|
899
901
|
type VectorStoreListParams as VectorStoreListParams,
|
@@ -907,8 +909,8 @@ export declare namespace Mixedbread {
|
|
907
909
|
Files as Files,
|
908
910
|
type FileObject as FileObject,
|
909
911
|
type PaginationWithTotal as PaginationWithTotal,
|
910
|
-
type FileListResponse as FileListResponse,
|
911
912
|
type FileDeleteResponse as FileDeleteResponse,
|
913
|
+
type FileObjectsCursor as FileObjectsCursor,
|
912
914
|
type FileCreateParams as FileCreateParams,
|
913
915
|
type FileUpdateParams as FileUpdateParams,
|
914
916
|
type FileListParams as FileListParams,
|
@@ -931,8 +933,8 @@ export declare namespace Mixedbread {
|
|
931
933
|
type LinearDataSource as LinearDataSource,
|
932
934
|
type NotionDataSource as NotionDataSource,
|
933
935
|
type Oauth2Params as Oauth2Params,
|
934
|
-
type DataSourceListResponse as DataSourceListResponse,
|
935
936
|
type DataSourceDeleteResponse as DataSourceDeleteResponse,
|
937
|
+
type DataSourcesCursor as DataSourcesCursor,
|
936
938
|
type DataSourceCreateParams as DataSourceCreateParams,
|
937
939
|
type DataSourceUpdateParams as DataSourceUpdateParams,
|
938
940
|
type DataSourceListParams as DataSourceListParams,
|
package/src/core/pagination.ts
CHANGED
@@ -201,27 +201,19 @@ export namespace CursorResponse {
|
|
201
201
|
}
|
202
202
|
|
203
203
|
export interface CursorParams {
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
export interface Query {
|
209
|
-
/**
|
210
|
-
* The cursor to base the request on for the next elements.
|
211
|
-
*/
|
212
|
-
after?: string;
|
213
|
-
|
214
|
-
/**
|
215
|
-
* The cursor to base the request on for the previous elements.
|
216
|
-
*/
|
217
|
-
before?: string;
|
204
|
+
/**
|
205
|
+
* The cursor to base the request on for the next elements.
|
206
|
+
*/
|
207
|
+
after?: string;
|
218
208
|
|
219
|
-
|
209
|
+
/**
|
210
|
+
* The cursor to base the request on for the previous elements.
|
211
|
+
*/
|
212
|
+
before?: string;
|
220
213
|
|
221
|
-
|
214
|
+
limit?: number;
|
222
215
|
|
223
|
-
|
224
|
-
}
|
216
|
+
include_total?: boolean;
|
225
217
|
}
|
226
218
|
|
227
219
|
export class Cursor<Item> extends AbstractPage<Item> implements CursorResponse<Item> {
|
@@ -9,17 +9,70 @@ import { type HeadersLike } from './headers';
|
|
9
9
|
export type FinalRequestOptions = RequestOptions & { method: HTTPMethod; path: string };
|
10
10
|
|
11
11
|
export type RequestOptions = {
|
12
|
+
/**
|
13
|
+
* The HTTP method for the request (e.g., 'get', 'post', 'put', 'delete').
|
14
|
+
*/
|
12
15
|
method?: HTTPMethod;
|
16
|
+
|
17
|
+
/**
|
18
|
+
* The URL path for the request.
|
19
|
+
*
|
20
|
+
* @example "/v1/foo"
|
21
|
+
*/
|
13
22
|
path?: string;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Query parameters to include in the request URL.
|
26
|
+
*/
|
14
27
|
query?: object | undefined | null;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* The request body. Can be a string, JSON object, FormData, or other supported types.
|
31
|
+
*/
|
15
32
|
body?: unknown;
|
33
|
+
|
34
|
+
/**
|
35
|
+
* HTTP headers to include with the request. Can be a Headers object, plain object, or array of tuples.
|
36
|
+
*/
|
16
37
|
headers?: HeadersLike;
|
38
|
+
|
39
|
+
/**
|
40
|
+
* The maximum number of times that the client will retry a request in case of a
|
41
|
+
* temporary failure, like a network error or a 5XX error from the server.
|
42
|
+
*
|
43
|
+
* @default 2
|
44
|
+
*/
|
17
45
|
maxRetries?: number;
|
46
|
+
|
18
47
|
stream?: boolean | undefined;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* The maximum amount of time (in milliseconds) that the client should wait for a response
|
51
|
+
* from the server before timing out a single request.
|
52
|
+
*
|
53
|
+
* @unit milliseconds
|
54
|
+
*/
|
19
55
|
timeout?: number;
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Additional `RequestInit` options to be passed to the underlying `fetch` call.
|
59
|
+
* These options will be merged with the client's default fetch options.
|
60
|
+
*/
|
20
61
|
fetchOptions?: MergedRequestInit;
|
62
|
+
|
63
|
+
/**
|
64
|
+
* An AbortSignal that can be used to cancel the request.
|
65
|
+
*/
|
21
66
|
signal?: AbortSignal | undefined | null;
|
67
|
+
|
68
|
+
/**
|
69
|
+
* A unique key for this request to enable idempotency.
|
70
|
+
*/
|
22
71
|
idempotencyKey?: string;
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Override the default base URL for this specific request.
|
75
|
+
*/
|
23
76
|
defaultBaseURL?: string | undefined;
|
24
77
|
|
25
78
|
__binaryResponse?: boolean | undefined;
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
5
|
+
import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
|
5
6
|
import { RequestOptions } from '../../internal/request-options';
|
6
7
|
import { path } from '../../internal/utils/path';
|
7
8
|
|
@@ -72,8 +73,12 @@ export class Connectors extends APIResource {
|
|
72
73
|
dataSourceID: string,
|
73
74
|
query: ConnectorListParams | null | undefined = {},
|
74
75
|
options?: RequestOptions,
|
75
|
-
):
|
76
|
-
return this._client.
|
76
|
+
): PagePromise<DataSourceConnectorsCursor, DataSourceConnector> {
|
77
|
+
return this._client.getAPIList(
|
78
|
+
path`/v1/data_sources/${dataSourceID}/connectors`,
|
79
|
+
Cursor<DataSourceConnector>,
|
80
|
+
{ query, ...options },
|
81
|
+
);
|
77
82
|
}
|
78
83
|
|
79
84
|
/**
|
@@ -94,6 +99,8 @@ export class Connectors extends APIResource {
|
|
94
99
|
}
|
95
100
|
}
|
96
101
|
|
102
|
+
export type DataSourceConnectorsCursor = Cursor<DataSourceConnector>;
|
103
|
+
|
97
104
|
/**
|
98
105
|
* Service-level representation of a connector.
|
99
106
|
*/
|
@@ -169,98 +176,6 @@ export interface DataSourceConnector {
|
|
169
176
|
object?: 'data_source.connector';
|
170
177
|
}
|
171
178
|
|
172
|
-
/**
|
173
|
-
* A list of connectors with pagination.
|
174
|
-
*/
|
175
|
-
export interface ConnectorListResponse {
|
176
|
-
/**
|
177
|
-
* Response model for cursor-based pagination.
|
178
|
-
*
|
179
|
-
* Examples: Forward pagination response: { "has_more": true, "first_cursor":
|
180
|
-
* "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
|
181
|
-
* "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
|
182
|
-
*
|
183
|
-
* Final page response:
|
184
|
-
* {
|
185
|
-
* "has_more": false,
|
186
|
-
* "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
|
187
|
-
* "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
|
188
|
-
* "total": 42
|
189
|
-
* }
|
190
|
-
*
|
191
|
-
* Empty results:
|
192
|
-
* {
|
193
|
-
* "has_more": false,
|
194
|
-
* "first_cursor": null,
|
195
|
-
* "last_cursor": null,
|
196
|
-
* "total": 0
|
197
|
-
* }
|
198
|
-
*/
|
199
|
-
pagination: ConnectorListResponse.Pagination;
|
200
|
-
|
201
|
-
/**
|
202
|
-
* The list of connectors
|
203
|
-
*/
|
204
|
-
data: Array<DataSourceConnector>;
|
205
|
-
|
206
|
-
/**
|
207
|
-
* The object type of the response
|
208
|
-
*/
|
209
|
-
object?: 'list';
|
210
|
-
}
|
211
|
-
|
212
|
-
export namespace ConnectorListResponse {
|
213
|
-
/**
|
214
|
-
* Response model for cursor-based pagination.
|
215
|
-
*
|
216
|
-
* Examples: Forward pagination response: { "has_more": true, "first_cursor":
|
217
|
-
* "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
|
218
|
-
* "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
|
219
|
-
*
|
220
|
-
* Final page response:
|
221
|
-
* {
|
222
|
-
* "has_more": false,
|
223
|
-
* "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
|
224
|
-
* "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
|
225
|
-
* "total": 42
|
226
|
-
* }
|
227
|
-
*
|
228
|
-
* Empty results:
|
229
|
-
* {
|
230
|
-
* "has_more": false,
|
231
|
-
* "first_cursor": null,
|
232
|
-
* "last_cursor": null,
|
233
|
-
* "total": 0
|
234
|
-
* }
|
235
|
-
*/
|
236
|
-
export interface Pagination {
|
237
|
-
/**
|
238
|
-
* Contextual direction-aware flag: True if more items exist in the requested
|
239
|
-
* pagination direction. For 'after': more items after this page. For 'before':
|
240
|
-
* more items before this page.
|
241
|
-
*/
|
242
|
-
has_more: boolean;
|
243
|
-
|
244
|
-
/**
|
245
|
-
* Cursor of the first item in this page. Use for backward pagination. None if page
|
246
|
-
* is empty.
|
247
|
-
*/
|
248
|
-
first_cursor: string | null;
|
249
|
-
|
250
|
-
/**
|
251
|
-
* Cursor of the last item in this page. Use for forward pagination. None if page
|
252
|
-
* is empty.
|
253
|
-
*/
|
254
|
-
last_cursor: string | null;
|
255
|
-
|
256
|
-
/**
|
257
|
-
* Total number of items available across all pages. Only included when
|
258
|
-
* include_total=true was requested. Expensive operation - use sparingly.
|
259
|
-
*/
|
260
|
-
total?: number | null;
|
261
|
-
}
|
262
|
-
}
|
263
|
-
|
264
179
|
/**
|
265
180
|
* Deleted connector.
|
266
181
|
*/
|
@@ -352,29 +267,7 @@ export interface ConnectorUpdateParams {
|
|
352
267
|
polling_interval?: number | string | null;
|
353
268
|
}
|
354
269
|
|
355
|
-
export interface ConnectorListParams {
|
356
|
-
/**
|
357
|
-
* Maximum number of items to return per page (1-100)
|
358
|
-
*/
|
359
|
-
limit?: number;
|
360
|
-
|
361
|
-
/**
|
362
|
-
* Cursor for forward pagination - get items after this position. Use last_cursor
|
363
|
-
* from previous response.
|
364
|
-
*/
|
365
|
-
after?: string | null;
|
366
|
-
|
367
|
-
/**
|
368
|
-
* Cursor for backward pagination - get items before this position. Use
|
369
|
-
* first_cursor from previous response.
|
370
|
-
*/
|
371
|
-
before?: string | null;
|
372
|
-
|
373
|
-
/**
|
374
|
-
* Whether to include total count in response (expensive operation)
|
375
|
-
*/
|
376
|
-
include_total?: boolean;
|
377
|
-
}
|
270
|
+
export interface ConnectorListParams extends CursorParams {}
|
378
271
|
|
379
272
|
export interface ConnectorDeleteParams {
|
380
273
|
/**
|
@@ -386,8 +279,8 @@ export interface ConnectorDeleteParams {
|
|
386
279
|
export declare namespace Connectors {
|
387
280
|
export {
|
388
281
|
type DataSourceConnector as DataSourceConnector,
|
389
|
-
type ConnectorListResponse as ConnectorListResponse,
|
390
282
|
type ConnectorDeleteResponse as ConnectorDeleteResponse,
|
283
|
+
type DataSourceConnectorsCursor as DataSourceConnectorsCursor,
|
391
284
|
type ConnectorCreateParams as ConnectorCreateParams,
|
392
285
|
type ConnectorRetrieveParams as ConnectorRetrieveParams,
|
393
286
|
type ConnectorUpdateParams as ConnectorUpdateParams,
|
@@ -7,13 +7,14 @@ import {
|
|
7
7
|
ConnectorDeleteParams,
|
8
8
|
ConnectorDeleteResponse,
|
9
9
|
ConnectorListParams,
|
10
|
-
ConnectorListResponse,
|
11
10
|
ConnectorRetrieveParams,
|
12
11
|
ConnectorUpdateParams,
|
13
12
|
Connectors,
|
14
13
|
DataSourceConnector,
|
14
|
+
DataSourceConnectorsCursor,
|
15
15
|
} from './connectors';
|
16
16
|
import { APIPromise } from '../../core/api-promise';
|
17
|
+
import { Cursor, type CursorParams, PagePromise } from '../../core/pagination';
|
17
18
|
import { RequestOptions } from '../../internal/request-options';
|
18
19
|
import { path } from '../../internal/utils/path';
|
19
20
|
|
@@ -66,8 +67,8 @@ export class DataSources extends APIResource {
|
|
66
67
|
list(
|
67
68
|
query: DataSourceListParams | null | undefined = {},
|
68
69
|
options?: RequestOptions,
|
69
|
-
):
|
70
|
-
return this._client.
|
70
|
+
): PagePromise<DataSourcesCursor, DataSource> {
|
71
|
+
return this._client.getAPIList('/v1/data_sources/', Cursor<DataSource>, { query, ...options });
|
71
72
|
}
|
72
73
|
|
73
74
|
/**
|
@@ -80,6 +81,8 @@ export class DataSources extends APIResource {
|
|
80
81
|
}
|
81
82
|
}
|
82
83
|
|
84
|
+
export type DataSourcesCursor = Cursor<DataSource>;
|
85
|
+
|
83
86
|
/**
|
84
87
|
* Service-level representation of a data source.
|
85
88
|
*/
|
@@ -255,98 +258,6 @@ export interface Oauth2Params {
|
|
255
258
|
type?: 'oauth2';
|
256
259
|
}
|
257
260
|
|
258
|
-
/**
|
259
|
-
* A list of data sources with pagination.
|
260
|
-
*/
|
261
|
-
export interface DataSourceListResponse {
|
262
|
-
/**
|
263
|
-
* Response model for cursor-based pagination.
|
264
|
-
*
|
265
|
-
* Examples: Forward pagination response: { "has_more": true, "first_cursor":
|
266
|
-
* "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
|
267
|
-
* "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
|
268
|
-
*
|
269
|
-
* Final page response:
|
270
|
-
* {
|
271
|
-
* "has_more": false,
|
272
|
-
* "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
|
273
|
-
* "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
|
274
|
-
* "total": 42
|
275
|
-
* }
|
276
|
-
*
|
277
|
-
* Empty results:
|
278
|
-
* {
|
279
|
-
* "has_more": false,
|
280
|
-
* "first_cursor": null,
|
281
|
-
* "last_cursor": null,
|
282
|
-
* "total": 0
|
283
|
-
* }
|
284
|
-
*/
|
285
|
-
pagination: DataSourceListResponse.Pagination;
|
286
|
-
|
287
|
-
/**
|
288
|
-
* The list of data sources
|
289
|
-
*/
|
290
|
-
data: Array<DataSource>;
|
291
|
-
|
292
|
-
/**
|
293
|
-
* The object type of the response
|
294
|
-
*/
|
295
|
-
object?: 'list';
|
296
|
-
}
|
297
|
-
|
298
|
-
export namespace DataSourceListResponse {
|
299
|
-
/**
|
300
|
-
* Response model for cursor-based pagination.
|
301
|
-
*
|
302
|
-
* Examples: Forward pagination response: { "has_more": true, "first_cursor":
|
303
|
-
* "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMSIsImlkIjoiYWJjMTIzIn0=", "last_cursor":
|
304
|
-
* "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMCIsImlkIjoieHl6Nzg5In0=", "total": null }
|
305
|
-
*
|
306
|
-
* Final page response:
|
307
|
-
* {
|
308
|
-
* "has_more": false,
|
309
|
-
* "first_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOSIsImlkIjoibGFzdDEyMyJ9",
|
310
|
-
* "last_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0yOCIsImlkIjoiZmluYWw0NTYifQ==",
|
311
|
-
* "total": 42
|
312
|
-
* }
|
313
|
-
*
|
314
|
-
* Empty results:
|
315
|
-
* {
|
316
|
-
* "has_more": false,
|
317
|
-
* "first_cursor": null,
|
318
|
-
* "last_cursor": null,
|
319
|
-
* "total": 0
|
320
|
-
* }
|
321
|
-
*/
|
322
|
-
export interface Pagination {
|
323
|
-
/**
|
324
|
-
* Contextual direction-aware flag: True if more items exist in the requested
|
325
|
-
* pagination direction. For 'after': more items after this page. For 'before':
|
326
|
-
* more items before this page.
|
327
|
-
*/
|
328
|
-
has_more: boolean;
|
329
|
-
|
330
|
-
/**
|
331
|
-
* Cursor of the first item in this page. Use for backward pagination. None if page
|
332
|
-
* is empty.
|
333
|
-
*/
|
334
|
-
first_cursor: string | null;
|
335
|
-
|
336
|
-
/**
|
337
|
-
* Cursor of the last item in this page. Use for forward pagination. None if page
|
338
|
-
* is empty.
|
339
|
-
*/
|
340
|
-
last_cursor: string | null;
|
341
|
-
|
342
|
-
/**
|
343
|
-
* Total number of items available across all pages. Only included when
|
344
|
-
* include_total=true was requested. Expensive operation - use sparingly.
|
345
|
-
*/
|
346
|
-
total?: number | null;
|
347
|
-
}
|
348
|
-
}
|
349
|
-
|
350
261
|
/**
|
351
262
|
* Deleted data source.
|
352
263
|
*/
|
@@ -497,29 +408,7 @@ export declare namespace DataSourceUpdateParams {
|
|
497
408
|
}
|
498
409
|
}
|
499
410
|
|
500
|
-
export interface DataSourceListParams {
|
501
|
-
/**
|
502
|
-
* Maximum number of items to return per page (1-100)
|
503
|
-
*/
|
504
|
-
limit?: number;
|
505
|
-
|
506
|
-
/**
|
507
|
-
* Cursor for forward pagination - get items after this position. Use last_cursor
|
508
|
-
* from previous response.
|
509
|
-
*/
|
510
|
-
after?: string | null;
|
511
|
-
|
512
|
-
/**
|
513
|
-
* Cursor for backward pagination - get items before this position. Use
|
514
|
-
* first_cursor from previous response.
|
515
|
-
*/
|
516
|
-
before?: string | null;
|
517
|
-
|
518
|
-
/**
|
519
|
-
* Whether to include total count in response (expensive operation)
|
520
|
-
*/
|
521
|
-
include_total?: boolean;
|
522
|
-
}
|
411
|
+
export interface DataSourceListParams extends CursorParams {}
|
523
412
|
|
524
413
|
DataSources.Connectors = Connectors;
|
525
414
|
|
@@ -531,8 +420,8 @@ export declare namespace DataSources {
|
|
531
420
|
type LinearDataSource as LinearDataSource,
|
532
421
|
type NotionDataSource as NotionDataSource,
|
533
422
|
type Oauth2Params as Oauth2Params,
|
534
|
-
type DataSourceListResponse as DataSourceListResponse,
|
535
423
|
type DataSourceDeleteResponse as DataSourceDeleteResponse,
|
424
|
+
type DataSourcesCursor as DataSourcesCursor,
|
536
425
|
type DataSourceCreateParams as DataSourceCreateParams,
|
537
426
|
type DataSourceUpdateParams as DataSourceUpdateParams,
|
538
427
|
type DataSourceListParams as DataSourceListParams,
|
@@ -541,8 +430,8 @@ export declare namespace DataSources {
|
|
541
430
|
export {
|
542
431
|
Connectors as Connectors,
|
543
432
|
type DataSourceConnector as DataSourceConnector,
|
544
|
-
type ConnectorListResponse as ConnectorListResponse,
|
545
433
|
type ConnectorDeleteResponse as ConnectorDeleteResponse,
|
434
|
+
type DataSourceConnectorsCursor as DataSourceConnectorsCursor,
|
546
435
|
type ConnectorCreateParams as ConnectorCreateParams,
|
547
436
|
type ConnectorRetrieveParams as ConnectorRetrieveParams,
|
548
437
|
type ConnectorUpdateParams as ConnectorUpdateParams,
|
@@ -3,13 +3,13 @@
|
|
3
3
|
export {
|
4
4
|
Connectors,
|
5
5
|
type DataSourceConnector,
|
6
|
-
type ConnectorListResponse,
|
7
6
|
type ConnectorDeleteResponse,
|
8
7
|
type ConnectorCreateParams,
|
9
8
|
type ConnectorRetrieveParams,
|
10
9
|
type ConnectorUpdateParams,
|
11
10
|
type ConnectorListParams,
|
12
11
|
type ConnectorDeleteParams,
|
12
|
+
type DataSourceConnectorsCursor,
|
13
13
|
} from './connectors';
|
14
14
|
export {
|
15
15
|
DataSources,
|
@@ -19,9 +19,9 @@ export {
|
|
19
19
|
type LinearDataSource,
|
20
20
|
type NotionDataSource,
|
21
21
|
type Oauth2Params,
|
22
|
-
type DataSourceListResponse,
|
23
22
|
type DataSourceDeleteResponse,
|
24
23
|
type DataSourceCreateParams,
|
25
24
|
type DataSourceUpdateParams,
|
26
25
|
type DataSourceListParams,
|
26
|
+
type DataSourcesCursor,
|
27
27
|
} from './data-sources';
|