@mixedbread/sdk 0.14.0 → 0.16.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 +25 -0
- package/README.md +31 -0
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +1 -1
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +0 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +0 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.js +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js +26 -5
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +26 -5
- package/internal/utils/path.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/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 +41 -130
- package/resources/parsing/jobs.d.mts.map +1 -1
- package/resources/parsing/jobs.d.ts +41 -130
- 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 +5 -103
- package/resources/vector-stores/files.d.mts.map +1 -1
- package/resources/vector-stores/files.d.ts +5 -103
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +2 -1
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +2 -1
- 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 +7 -105
- package/resources/vector-stores/vector-stores.d.mts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +7 -105
- 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 +6 -6
- package/src/core/pagination.ts +0 -2
- package/src/internal/uploads.ts +1 -1
- package/src/internal/utils/log.ts +1 -1
- package/src/internal/utils/path.ts +30 -7
- 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/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 +47 -139
- package/src/resources/parsing/parsing.ts +2 -0
- package/src/resources/vector-stores/files.ts +11 -115
- package/src/resources/vector-stores/index.ts +2 -2
- package/src/resources/vector-stores/vector-stores.ts +9 -117
- 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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BAAkB,EAC7C,KAAK,kBAAkB,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,CA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AkBG;IACH,MAAM,CAAC,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;AA0qBD,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;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AO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AA0qBD,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';
|
@@ -890,10 +890,10 @@ export declare namespace Mixedbread {
|
|
890
890
|
type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk,
|
891
891
|
type VectorStore as VectorStore,
|
892
892
|
type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions,
|
893
|
-
type VectorStoreListResponse as VectorStoreListResponse,
|
894
893
|
type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
|
895
894
|
type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
|
896
895
|
type VectorStoreSearchResponse as VectorStoreSearchResponse,
|
896
|
+
type VectorStoresCursor as VectorStoresCursor,
|
897
897
|
type VectorStoreCreateParams as VectorStoreCreateParams,
|
898
898
|
type VectorStoreUpdateParams as VectorStoreUpdateParams,
|
899
899
|
type VectorStoreListParams as VectorStoreListParams,
|
@@ -907,8 +907,8 @@ export declare namespace Mixedbread {
|
|
907
907
|
Files as Files,
|
908
908
|
type FileObject as FileObject,
|
909
909
|
type PaginationWithTotal as PaginationWithTotal,
|
910
|
-
type FileListResponse as FileListResponse,
|
911
910
|
type FileDeleteResponse as FileDeleteResponse,
|
911
|
+
type FileObjectsCursor as FileObjectsCursor,
|
912
912
|
type FileCreateParams as FileCreateParams,
|
913
913
|
type FileUpdateParams as FileUpdateParams,
|
914
914
|
type FileListParams as FileListParams,
|
@@ -931,8 +931,8 @@ export declare namespace Mixedbread {
|
|
931
931
|
type LinearDataSource as LinearDataSource,
|
932
932
|
type NotionDataSource as NotionDataSource,
|
933
933
|
type Oauth2Params as Oauth2Params,
|
934
|
-
type DataSourceListResponse as DataSourceListResponse,
|
935
934
|
type DataSourceDeleteResponse as DataSourceDeleteResponse,
|
935
|
+
type DataSourcesCursor as DataSourcesCursor,
|
936
936
|
type DataSourceCreateParams as DataSourceCreateParams,
|
937
937
|
type DataSourceUpdateParams as DataSourceUpdateParams,
|
938
938
|
type DataSourceListParams as DataSourceListParams,
|
package/src/core/pagination.ts
CHANGED
package/src/internal/uploads.ts
CHANGED
@@ -90,7 +90,7 @@ export const multipartFormRequestOptions = async (
|
|
90
90
|
return { ...opts, body: await createForm(opts.body, fetch) };
|
91
91
|
};
|
92
92
|
|
93
|
-
const supportsFormDataMap =
|
93
|
+
const supportsFormDataMap = /* @__PURE__ */ new WeakMap<Fetch, Promise<boolean>>();
|
94
94
|
|
95
95
|
/**
|
96
96
|
* node-fetch doesn't support the global FormData object in recent node versions. Instead of sending
|
@@ -58,7 +58,7 @@ const noopLogger = {
|
|
58
58
|
debug: noop,
|
59
59
|
};
|
60
60
|
|
61
|
-
let cachedLoggers =
|
61
|
+
let cachedLoggers = /* @__PURE__ */ new WeakMap<Logger, [LogLevel, Logger]>();
|
62
62
|
|
63
63
|
export function loggerFor(client: Mixedbread): Logger {
|
64
64
|
const logger = client.logger;
|
@@ -12,25 +12,43 @@ export function encodeURIPath(str: string) {
|
|
12
12
|
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
13
13
|
}
|
14
14
|
|
15
|
+
const EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
16
|
+
|
15
17
|
export const createPathTagFunction = (pathEncoder = encodeURIPath) =>
|
16
18
|
function path(statics: readonly string[], ...params: readonly unknown[]): string {
|
17
19
|
// If there are no params, no processing is needed.
|
18
20
|
if (statics.length === 1) return statics[0]!;
|
19
21
|
|
20
22
|
let postPath = false;
|
23
|
+
const invalidSegments = [];
|
21
24
|
const path = statics.reduce((previousValue, currentValue, index) => {
|
22
25
|
if (/[?#]/.test(currentValue)) {
|
23
26
|
postPath = true;
|
24
27
|
}
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
const value = params[index];
|
29
|
+
let encoded = (postPath ? encodeURIComponent : pathEncoder)('' + value);
|
30
|
+
if (
|
31
|
+
index !== params.length &&
|
32
|
+
(value == null ||
|
33
|
+
(typeof value === 'object' &&
|
34
|
+
// handle values from other realms
|
35
|
+
value.toString ===
|
36
|
+
Object.getPrototypeOf(Object.getPrototypeOf((value as any).hasOwnProperty ?? EMPTY) ?? EMPTY)
|
37
|
+
?.toString))
|
38
|
+
) {
|
39
|
+
encoded = value + '';
|
40
|
+
invalidSegments.push({
|
41
|
+
start: previousValue.length + currentValue.length,
|
42
|
+
length: encoded.length,
|
43
|
+
error: `Value of type ${Object.prototype.toString
|
44
|
+
.call(value)
|
45
|
+
.slice(8, -1)} is not a valid path parameter`,
|
46
|
+
});
|
47
|
+
}
|
48
|
+
return previousValue + currentValue + (index === params.length ? '' : encoded);
|
30
49
|
}, '');
|
31
50
|
|
32
51
|
const pathOnly = path.split(/[?#]/, 1)[0]!;
|
33
|
-
const invalidSegments = [];
|
34
52
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
35
53
|
let match;
|
36
54
|
|
@@ -39,9 +57,12 @@ export const createPathTagFunction = (pathEncoder = encodeURIPath) =>
|
|
39
57
|
invalidSegments.push({
|
40
58
|
start: match.index,
|
41
59
|
length: match[0].length,
|
60
|
+
error: `Value "${match[0]}" can\'t be safely passed as a path parameter`,
|
42
61
|
});
|
43
62
|
}
|
44
63
|
|
64
|
+
invalidSegments.sort((a, b) => a.start - b.start);
|
65
|
+
|
45
66
|
if (invalidSegments.length > 0) {
|
46
67
|
let lastEnd = 0;
|
47
68
|
const underline = invalidSegments.reduce((acc, segment) => {
|
@@ -52,7 +73,9 @@ export const createPathTagFunction = (pathEncoder = encodeURIPath) =>
|
|
52
73
|
}, '');
|
53
74
|
|
54
75
|
throw new MixedbreadError(
|
55
|
-
`Path parameters result in path with invalid segments:\n${
|
76
|
+
`Path parameters result in path with invalid segments:\n${invalidSegments
|
77
|
+
.map((e) => e.error)
|
78
|
+
.join('\n')}\n${path}\n${underline}`,
|
56
79
|
);
|
57
80
|
}
|
58
81
|
|
@@ -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';
|