@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 @@
|
|
1
|
+
{"version":3,"file":"connectors.js","sourceRoot":"","sources":["../../src/resources/data-sources/connectors.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAyF;AAEzF,uDAAiD;AAEjD,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;OAOG;IACH,MAAM,CACJ,YAAoB,EACpB,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,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generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
3
|
+
import { LimitOffset } from "../../core/pagination.mjs";
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
5
|
+
export class Connectors extends APIResource {
|
6
|
+
/**
|
7
|
+
* Create a new connector.
|
8
|
+
*
|
9
|
+
* Args: data_source_id: The ID of the data source to create a connector for.
|
10
|
+
* params: The connector to create.
|
11
|
+
*
|
12
|
+
* Returns: The created connector.
|
13
|
+
*/
|
14
|
+
create(dataSourceID, body, options) {
|
15
|
+
return this._client.post(path `/v1/data_sources/${dataSourceID}/connectors`, { body, ...options });
|
16
|
+
}
|
17
|
+
/**
|
18
|
+
* Get a connector by ID.
|
19
|
+
*
|
20
|
+
* Args: data_source_id: The ID of the data source to get a connector for.
|
21
|
+
* connector_id: The ID of the connector to get.
|
22
|
+
*
|
23
|
+
* Returns: The connector.
|
24
|
+
*/
|
25
|
+
retrieve(connectorID, params, options) {
|
26
|
+
const { data_source_id } = params;
|
27
|
+
return this._client.get(path `/v1/data_sources/${data_source_id}/connectors/${connectorID}`, options);
|
28
|
+
}
|
29
|
+
/**
|
30
|
+
* Update a connector.
|
31
|
+
*
|
32
|
+
* Args: data_source_id: The ID of the data source to update a connector for.
|
33
|
+
* connector_id: The ID of the connector to update. params: The connector to
|
34
|
+
* update.
|
35
|
+
*
|
36
|
+
* Returns: The updated connector.
|
37
|
+
*/
|
38
|
+
update(connectorID, params, options) {
|
39
|
+
const { data_source_id, ...body } = params;
|
40
|
+
return this._client.put(path `/v1/data_sources/${data_source_id}/connectors/${connectorID}`, {
|
41
|
+
body,
|
42
|
+
...options,
|
43
|
+
});
|
44
|
+
}
|
45
|
+
/**
|
46
|
+
* Get all connectors for a data source.
|
47
|
+
*
|
48
|
+
* Args: data_source_id: The ID of the data source to get connectors for.
|
49
|
+
* pagination: The pagination options.
|
50
|
+
*
|
51
|
+
* Returns: The list of connectors.
|
52
|
+
*/
|
53
|
+
list(dataSourceID, query = {}, options) {
|
54
|
+
return this._client.getAPIList(path `/v1/data_sources/${dataSourceID}/connectors`, (LimitOffset), { query, ...options });
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
* Delete a connector.
|
58
|
+
*
|
59
|
+
* Args: data_source_id: The ID of the data source to delete a connector for.
|
60
|
+
* connector_id: The ID of the connector to delete.
|
61
|
+
*
|
62
|
+
* Returns: The deleted connector.
|
63
|
+
*/
|
64
|
+
delete(connectorID, params, options) {
|
65
|
+
const { data_source_id } = params;
|
66
|
+
return this._client.delete(path `/v1/data_sources/${data_source_id}/connectors/${connectorID}`, options);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
//# sourceMappingURL=connectors.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"connectors.mjs","sourceRoot":"","sources":["../../src/resources/data-sources/connectors.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,WAAW,EAAuC;OAEpD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;OAOG;IACH,MAAM,CACJ,YAAoB,EACpB,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,oBAAoB,YAAY,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CACN,WAAmB,EACnB,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,oBAAoB,cAAc,eAAe,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IACvG,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CACJ,WAAmB,EACnB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,oBAAoB,cAAc,eAAe,WAAW,EAAE,EAAE;YAC1F,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,YAAoB,EACpB,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,oBAAoB,YAAY,aAAa,EACjD,CAAA,WAAgC,CAAA,EAChC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CACJ,WAAmB,EACnB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,oBAAoB,cAAc,eAAe,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1G,CAAC;CACF"}
|
@@ -0,0 +1,183 @@
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
2
|
+
import * as ConnectorsAPI from "./connectors.mjs";
|
3
|
+
import { ConnectorCreateParams, ConnectorDeleteParams, ConnectorDeleteResponse, ConnectorListParams, ConnectorRetrieveParams, ConnectorUpdateParams, Connectors, DataSourceConnector, DataSourceConnectorsLimitOffset } from "./connectors.mjs";
|
4
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
5
|
+
import { LimitOffset, type LimitOffsetParams, PagePromise } from "../../core/pagination.mjs";
|
6
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
7
|
+
export declare class DataSources extends APIResource {
|
8
|
+
connectors: ConnectorsAPI.Connectors;
|
9
|
+
/**
|
10
|
+
* Create a new data source.
|
11
|
+
*
|
12
|
+
* Args: params: The data source to create.
|
13
|
+
*
|
14
|
+
* Returns: The created data source.
|
15
|
+
*/
|
16
|
+
create(body: DataSourceCreateParams, options?: RequestOptions): APIPromise<DataSource>;
|
17
|
+
/**
|
18
|
+
* Get a data source by ID.
|
19
|
+
*
|
20
|
+
* Args: data_source_id: The ID of the data source to fetch.
|
21
|
+
*
|
22
|
+
* Returns: The data source.
|
23
|
+
*/
|
24
|
+
retrieve(dataSourceID: string, options?: RequestOptions): APIPromise<DataSource>;
|
25
|
+
/**
|
26
|
+
* Update a data source.
|
27
|
+
*
|
28
|
+
* Args: data_source_id: The ID of the data source to update. params: The data
|
29
|
+
* source to update.
|
30
|
+
*
|
31
|
+
* Returns: The updated data source.
|
32
|
+
*/
|
33
|
+
update(dataSourceID: string, body: DataSourceUpdateParams, options?: RequestOptions): APIPromise<DataSource>;
|
34
|
+
/**
|
35
|
+
* Get all data sources.
|
36
|
+
*
|
37
|
+
* Returns: The list of data sources.
|
38
|
+
*/
|
39
|
+
list(query?: DataSourceListParams | null | undefined, options?: RequestOptions): PagePromise<DataSourcesLimitOffset, DataSource>;
|
40
|
+
/**
|
41
|
+
* Delete a data source.
|
42
|
+
*
|
43
|
+
* Args: data_source_id: The ID of the data source to delete.
|
44
|
+
*/
|
45
|
+
delete(dataSourceID: string, options?: RequestOptions): APIPromise<DataSourceDeleteResponse>;
|
46
|
+
}
|
47
|
+
export type DataSourcesLimitOffset = LimitOffset<DataSource>;
|
48
|
+
/**
|
49
|
+
* Service-level representation of a data source.
|
50
|
+
*/
|
51
|
+
export interface DataSource {
|
52
|
+
/**
|
53
|
+
* The ID of the data source
|
54
|
+
*/
|
55
|
+
id: string;
|
56
|
+
/**
|
57
|
+
* The creation time of the data source
|
58
|
+
*/
|
59
|
+
created_at: string;
|
60
|
+
/**
|
61
|
+
* The last update time of the data source
|
62
|
+
*/
|
63
|
+
updated_at: string;
|
64
|
+
/**
|
65
|
+
* The type of data source
|
66
|
+
*/
|
67
|
+
type: DataSourceType;
|
68
|
+
/**
|
69
|
+
* The name of the data source
|
70
|
+
*/
|
71
|
+
name: string;
|
72
|
+
/**
|
73
|
+
* The metadata of the data source
|
74
|
+
*/
|
75
|
+
metadata: unknown;
|
76
|
+
/**
|
77
|
+
* Authentication parameters for a OAuth data source.
|
78
|
+
*/
|
79
|
+
auth_params: DataSourceOauth2Params | null;
|
80
|
+
/**
|
81
|
+
* The type of the object
|
82
|
+
*/
|
83
|
+
object?: 'data_source';
|
84
|
+
}
|
85
|
+
/**
|
86
|
+
* Authentication parameters for a OAuth data source.
|
87
|
+
*/
|
88
|
+
export interface DataSourceOauth2Params {
|
89
|
+
type?: 'oauth2';
|
90
|
+
/**
|
91
|
+
* The timestamp when the OAuth2 credentials were created
|
92
|
+
*/
|
93
|
+
created_at?: string;
|
94
|
+
/**
|
95
|
+
* The OAuth2 client ID
|
96
|
+
*/
|
97
|
+
client_id: string;
|
98
|
+
/**
|
99
|
+
* The OAuth2 client secret
|
100
|
+
*/
|
101
|
+
client_secret: string;
|
102
|
+
/**
|
103
|
+
* The OAuth2 redirect URI
|
104
|
+
*/
|
105
|
+
redirect_uri: string;
|
106
|
+
/**
|
107
|
+
* The OAuth2 scope
|
108
|
+
*/
|
109
|
+
scope: string;
|
110
|
+
/**
|
111
|
+
* The OAuth2 access token
|
112
|
+
*/
|
113
|
+
access_token?: string | null;
|
114
|
+
/**
|
115
|
+
* The OAuth2 refresh token
|
116
|
+
*/
|
117
|
+
refresh_token?: string | null;
|
118
|
+
/**
|
119
|
+
* The OAuth2 token type
|
120
|
+
*/
|
121
|
+
token_type?: string | null;
|
122
|
+
/**
|
123
|
+
* The OAuth2 token expiration timestamp
|
124
|
+
*/
|
125
|
+
expires_on?: string | null;
|
126
|
+
}
|
127
|
+
export type DataSourceType = 'notion' | 'linear';
|
128
|
+
/**
|
129
|
+
* Deleted data source.
|
130
|
+
*/
|
131
|
+
export interface DataSourceDeleteResponse {
|
132
|
+
/**
|
133
|
+
* The ID of the data source
|
134
|
+
*/
|
135
|
+
id: string;
|
136
|
+
/**
|
137
|
+
* Whether the data source was deleted
|
138
|
+
*/
|
139
|
+
deleted?: boolean;
|
140
|
+
/**
|
141
|
+
* The type of the object
|
142
|
+
*/
|
143
|
+
object?: 'data_source';
|
144
|
+
}
|
145
|
+
export interface DataSourceCreateParams {
|
146
|
+
/**
|
147
|
+
* The type of data source to create
|
148
|
+
*/
|
149
|
+
type: DataSourceType;
|
150
|
+
/**
|
151
|
+
* The name of the data source
|
152
|
+
*/
|
153
|
+
name: string;
|
154
|
+
/**
|
155
|
+
* The metadata of the data source
|
156
|
+
*/
|
157
|
+
metadata?: unknown;
|
158
|
+
/**
|
159
|
+
* Authentication parameters for a OAuth data source.
|
160
|
+
*/
|
161
|
+
auth_params?: DataSourceOauth2Params | null;
|
162
|
+
}
|
163
|
+
export interface DataSourceUpdateParams {
|
164
|
+
/**
|
165
|
+
* The name of the data source
|
166
|
+
*/
|
167
|
+
name?: string | null;
|
168
|
+
/**
|
169
|
+
* The metadata of the data source
|
170
|
+
*/
|
171
|
+
metadata?: unknown;
|
172
|
+
/**
|
173
|
+
* Authentication parameters for a OAuth data source.
|
174
|
+
*/
|
175
|
+
auth_params?: DataSourceOauth2Params | null;
|
176
|
+
}
|
177
|
+
export interface DataSourceListParams extends LimitOffsetParams {
|
178
|
+
}
|
179
|
+
export declare namespace DataSources {
|
180
|
+
export { type DataSource as DataSource, type DataSourceOauth2Params as DataSourceOauth2Params, type DataSourceType as DataSourceType, type DataSourceDeleteResponse as DataSourceDeleteResponse, type DataSourcesLimitOffset as DataSourcesLimitOffset, type DataSourceCreateParams as DataSourceCreateParams, type DataSourceUpdateParams as DataSourceUpdateParams, type DataSourceListParams as DataSourceListParams, };
|
181
|
+
export { Connectors as Connectors, type DataSourceConnector as DataSourceConnector, type ConnectorDeleteResponse as ConnectorDeleteResponse, type DataSourceConnectorsLimitOffset as DataSourceConnectorsLimitOffset, type ConnectorCreateParams as ConnectorCreateParams, type ConnectorRetrieveParams as ConnectorRetrieveParams, type ConnectorUpdateParams as ConnectorUpdateParams, type ConnectorListParams as ConnectorListParams, type ConnectorDeleteParams as ConnectorDeleteParams, };
|
182
|
+
}
|
183
|
+
//# sourceMappingURL=data-sources.d.mts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"data-sources.d.mts","sourceRoot":"","sources":["../../src/resources/data-sources/data-sources.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EACL,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,UAAU,EACV,mBAAmB,EACnB,+BAA+B,EAChC;OACM,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,WAAW,EAAE;OACpD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAElF;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAItF;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAIhF;;;;;;;OAOG;IACH,MAAM,CACJ,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,UAAU,CAAC;IAIzB;;;;OAIG;IACH,IAAI,CACF,KAAK,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sBAAsB,EAAE,UAAU,CAAC;IAIlD;;;;OAIG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAA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ource } from "../../core/resource.js";
|
2
|
+
import * as ConnectorsAPI from "./connectors.js";
|
3
|
+
import { ConnectorCreateParams, ConnectorDeleteParams, ConnectorDeleteResponse, ConnectorListParams, ConnectorRetrieveParams, ConnectorUpdateParams, Connectors, DataSourceConnector, DataSourceConnectorsLimitOffset } from "./connectors.js";
|
4
|
+
import { APIPromise } from "../../core/api-promise.js";
|
5
|
+
import { LimitOffset, type LimitOffsetParams, PagePromise } from "../../core/pagination.js";
|
6
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
7
|
+
export declare class DataSources extends APIResource {
|
8
|
+
connectors: ConnectorsAPI.Connectors;
|
9
|
+
/**
|
10
|
+
* Create a new data source.
|
11
|
+
*
|
12
|
+
* Args: params: The data source to create.
|
13
|
+
*
|
14
|
+
* Returns: The created data source.
|
15
|
+
*/
|
16
|
+
create(body: DataSourceCreateParams, options?: RequestOptions): APIPromise<DataSource>;
|
17
|
+
/**
|
18
|
+
* Get a data source by ID.
|
19
|
+
*
|
20
|
+
* Args: data_source_id: The ID of the data source to fetch.
|
21
|
+
*
|
22
|
+
* Returns: The data source.
|
23
|
+
*/
|
24
|
+
retrieve(dataSourceID: string, options?: RequestOptions): APIPromise<DataSource>;
|
25
|
+
/**
|
26
|
+
* Update a data source.
|
27
|
+
*
|
28
|
+
* Args: data_source_id: The ID of the data source to update. params: The data
|
29
|
+
* source to update.
|
30
|
+
*
|
31
|
+
* Returns: The updated data source.
|
32
|
+
*/
|
33
|
+
update(dataSourceID: string, body: DataSourceUpdateParams, options?: RequestOptions): APIPromise<DataSource>;
|
34
|
+
/**
|
35
|
+
* Get all data sources.
|
36
|
+
*
|
37
|
+
* Returns: The list of data sources.
|
38
|
+
*/
|
39
|
+
list(query?: DataSourceListParams | null | undefined, options?: RequestOptions): PagePromise<DataSourcesLimitOffset, DataSource>;
|
40
|
+
/**
|
41
|
+
* Delete a data source.
|
42
|
+
*
|
43
|
+
* Args: data_source_id: The ID of the data source to delete.
|
44
|
+
*/
|
45
|
+
delete(dataSourceID: string, options?: RequestOptions): APIPromise<DataSourceDeleteResponse>;
|
46
|
+
}
|
47
|
+
export type DataSourcesLimitOffset = LimitOffset<DataSource>;
|
48
|
+
/**
|
49
|
+
* Service-level representation of a data source.
|
50
|
+
*/
|
51
|
+
export interface DataSource {
|
52
|
+
/**
|
53
|
+
* The ID of the data source
|
54
|
+
*/
|
55
|
+
id: string;
|
56
|
+
/**
|
57
|
+
* The creation time of the data source
|
58
|
+
*/
|
59
|
+
created_at: string;
|
60
|
+
/**
|
61
|
+
* The last update time of the data source
|
62
|
+
*/
|
63
|
+
updated_at: string;
|
64
|
+
/**
|
65
|
+
* The type of data source
|
66
|
+
*/
|
67
|
+
type: DataSourceType;
|
68
|
+
/**
|
69
|
+
* The name of the data source
|
70
|
+
*/
|
71
|
+
name: string;
|
72
|
+
/**
|
73
|
+
* The metadata of the data source
|
74
|
+
*/
|
75
|
+
metadata: unknown;
|
76
|
+
/**
|
77
|
+
* Authentication parameters for a OAuth data source.
|
78
|
+
*/
|
79
|
+
auth_params: DataSourceOauth2Params | null;
|
80
|
+
/**
|
81
|
+
* The type of the object
|
82
|
+
*/
|
83
|
+
object?: 'data_source';
|
84
|
+
}
|
85
|
+
/**
|
86
|
+
* Authentication parameters for a OAuth data source.
|
87
|
+
*/
|
88
|
+
export interface DataSourceOauth2Params {
|
89
|
+
type?: 'oauth2';
|
90
|
+
/**
|
91
|
+
* The timestamp when the OAuth2 credentials were created
|
92
|
+
*/
|
93
|
+
created_at?: string;
|
94
|
+
/**
|
95
|
+
* The OAuth2 client ID
|
96
|
+
*/
|
97
|
+
client_id: string;
|
98
|
+
/**
|
99
|
+
* The OAuth2 client secret
|
100
|
+
*/
|
101
|
+
client_secret: string;
|
102
|
+
/**
|
103
|
+
* The OAuth2 redirect URI
|
104
|
+
*/
|
105
|
+
redirect_uri: string;
|
106
|
+
/**
|
107
|
+
* The OAuth2 scope
|
108
|
+
*/
|
109
|
+
scope: string;
|
110
|
+
/**
|
111
|
+
* The OAuth2 access token
|
112
|
+
*/
|
113
|
+
access_token?: string | null;
|
114
|
+
/**
|
115
|
+
* The OAuth2 refresh token
|
116
|
+
*/
|
117
|
+
refresh_token?: string | null;
|
118
|
+
/**
|
119
|
+
* The OAuth2 token type
|
120
|
+
*/
|
121
|
+
token_type?: string | null;
|
122
|
+
/**
|
123
|
+
* The OAuth2 token expiration timestamp
|
124
|
+
*/
|
125
|
+
expires_on?: string | null;
|
126
|
+
}
|
127
|
+
export type DataSourceType = 'notion' | 'linear';
|
128
|
+
/**
|
129
|
+
* Deleted data source.
|
130
|
+
*/
|
131
|
+
export interface DataSourceDeleteResponse {
|
132
|
+
/**
|
133
|
+
* The ID of the data source
|
134
|
+
*/
|
135
|
+
id: string;
|
136
|
+
/**
|
137
|
+
* Whether the data source was deleted
|
138
|
+
*/
|
139
|
+
deleted?: boolean;
|
140
|
+
/**
|
141
|
+
* The type of the object
|
142
|
+
*/
|
143
|
+
object?: 'data_source';
|
144
|
+
}
|
145
|
+
export interface DataSourceCreateParams {
|
146
|
+
/**
|
147
|
+
* The type of data source to create
|
148
|
+
*/
|
149
|
+
type: DataSourceType;
|
150
|
+
/**
|
151
|
+
* The name of the data source
|
152
|
+
*/
|
153
|
+
name: string;
|
154
|
+
/**
|
155
|
+
* The metadata of the data source
|
156
|
+
*/
|
157
|
+
metadata?: unknown;
|
158
|
+
/**
|
159
|
+
* Authentication parameters for a OAuth data source.
|
160
|
+
*/
|
161
|
+
auth_params?: DataSourceOauth2Params | null;
|
162
|
+
}
|
163
|
+
export interface DataSourceUpdateParams {
|
164
|
+
/**
|
165
|
+
* The name of the data source
|
166
|
+
*/
|
167
|
+
name?: string | null;
|
168
|
+
/**
|
169
|
+
* The metadata of the data source
|
170
|
+
*/
|
171
|
+
metadata?: unknown;
|
172
|
+
/**
|
173
|
+
* Authentication parameters for a OAuth data source.
|
174
|
+
*/
|
175
|
+
auth_params?: DataSourceOauth2Params | null;
|
176
|
+
}
|
177
|
+
export interface DataSourceListParams extends LimitOffsetParams {
|
178
|
+
}
|
179
|
+
export declare namespace DataSources {
|
180
|
+
export { type DataSource as DataSource, type DataSourceOauth2Params as DataSourceOauth2Params, type DataSourceType as DataSourceType, type DataSourceDeleteResponse as DataSourceDeleteResponse, type DataSourcesLimitOffset as DataSourcesLimitOffset, type DataSourceCreateParams as DataSourceCreateParams, type DataSourceUpdateParams as DataSourceUpdateParams, type DataSourceListParams as DataSourceListParams, };
|
181
|
+
export { Connectors as Connectors, type DataSourceConnector as DataSourceConnector, type ConnectorDeleteResponse as ConnectorDeleteResponse, type DataSourceConnectorsLimitOffset as DataSourceConnectorsLimitOffset, type ConnectorCreateParams as ConnectorCreateParams, type ConnectorRetrieveParams as ConnectorRetrieveParams, type ConnectorUpdateParams as ConnectorUpdateParams, type ConnectorListParams as ConnectorListParams, type ConnectorDeleteParams as ConnectorDeleteParams, };
|
182
|
+
}
|
183
|
+
//# sourceMappingURL=data-sources.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"data-sources.d.ts","sourceRoot":"","sources":["../../src/resources/data-sources/data-sources.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EACL,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,UAAU,EACV,mBAAmB,EACnB,+BAA+B,EAChC;OACM,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,WAAW,EAAE;OACpD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAElF;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAItF;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,EAAE,MAA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AsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
"use strict";
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.DataSources = void 0;
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
7
|
+
const ConnectorsAPI = tslib_1.__importStar(require("./connectors.js"));
|
8
|
+
const connectors_1 = require("./connectors.js");
|
9
|
+
const pagination_1 = require("../../core/pagination.js");
|
10
|
+
const path_1 = require("../../internal/utils/path.js");
|
11
|
+
class DataSources extends resource_1.APIResource {
|
12
|
+
constructor() {
|
13
|
+
super(...arguments);
|
14
|
+
this.connectors = new ConnectorsAPI.Connectors(this._client);
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* Create a new data source.
|
18
|
+
*
|
19
|
+
* Args: params: The data source to create.
|
20
|
+
*
|
21
|
+
* Returns: The created data source.
|
22
|
+
*/
|
23
|
+
create(body, options) {
|
24
|
+
return this._client.post('/v1/data_sources/', { body, ...options });
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* Get a data source by ID.
|
28
|
+
*
|
29
|
+
* Args: data_source_id: The ID of the data source to fetch.
|
30
|
+
*
|
31
|
+
* Returns: The data source.
|
32
|
+
*/
|
33
|
+
retrieve(dataSourceID, options) {
|
34
|
+
return this._client.get((0, path_1.path) `/v1/data_sources/${dataSourceID}`, options);
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* Update a data source.
|
38
|
+
*
|
39
|
+
* Args: data_source_id: The ID of the data source to update. params: The data
|
40
|
+
* source to update.
|
41
|
+
*
|
42
|
+
* Returns: The updated data source.
|
43
|
+
*/
|
44
|
+
update(dataSourceID, body, options) {
|
45
|
+
return this._client.put((0, path_1.path) `/v1/data_sources/${dataSourceID}`, { body, ...options });
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* Get all data sources.
|
49
|
+
*
|
50
|
+
* Returns: The list of data sources.
|
51
|
+
*/
|
52
|
+
list(query = {}, options) {
|
53
|
+
return this._client.getAPIList('/v1/data_sources/', (pagination_1.LimitOffset), { query, ...options });
|
54
|
+
}
|
55
|
+
/**
|
56
|
+
* Delete a data source.
|
57
|
+
*
|
58
|
+
* Args: data_source_id: The ID of the data source to delete.
|
59
|
+
*/
|
60
|
+
delete(dataSourceID, options) {
|
61
|
+
return this._client.delete((0, path_1.path) `/v1/data_sources/${dataSourceID}`, options);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
exports.DataSources = DataSources;
|
65
|
+
DataSources.Connectors = connectors_1.Connectors;
|
66
|
+
//# sourceMappingURL=data-sources.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"data-sources.js","sourceRoot":"","sources":["../../src/resources/data-sources/data-sources.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,uEAA8C;AAC9C,gDAUsB;AAEtB,yDAAyF;AAEzF,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA4DpF,CAAC;IA1DC;;;;;;OAMG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,YAAoB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CACJ,YAAoB,EACpB,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;OAIG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAA,wBAAuB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,YAAoB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,oBAAoB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AA7DD,kCA6DC;AAoKD,WAAW,CAAC,UAAU,GAAG,uBAAU,CAAC"}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
3
|
+
import * as ConnectorsAPI from "./connectors.mjs";
|
4
|
+
import { Connectors, } from "./connectors.mjs";
|
5
|
+
import { LimitOffset } from "../../core/pagination.mjs";
|
6
|
+
import { path } from "../../internal/utils/path.mjs";
|
7
|
+
export class DataSources extends APIResource {
|
8
|
+
constructor() {
|
9
|
+
super(...arguments);
|
10
|
+
this.connectors = new ConnectorsAPI.Connectors(this._client);
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* Create a new data source.
|
14
|
+
*
|
15
|
+
* Args: params: The data source to create.
|
16
|
+
*
|
17
|
+
* Returns: The created data source.
|
18
|
+
*/
|
19
|
+
create(body, options) {
|
20
|
+
return this._client.post('/v1/data_sources/', { body, ...options });
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Get a data source by ID.
|
24
|
+
*
|
25
|
+
* Args: data_source_id: The ID of the data source to fetch.
|
26
|
+
*
|
27
|
+
* Returns: The data source.
|
28
|
+
*/
|
29
|
+
retrieve(dataSourceID, options) {
|
30
|
+
return this._client.get(path `/v1/data_sources/${dataSourceID}`, options);
|
31
|
+
}
|
32
|
+
/**
|
33
|
+
* Update a data source.
|
34
|
+
*
|
35
|
+
* Args: data_source_id: The ID of the data source to update. params: The data
|
36
|
+
* source to update.
|
37
|
+
*
|
38
|
+
* Returns: The updated data source.
|
39
|
+
*/
|
40
|
+
update(dataSourceID, body, options) {
|
41
|
+
return this._client.put(path `/v1/data_sources/${dataSourceID}`, { body, ...options });
|
42
|
+
}
|
43
|
+
/**
|
44
|
+
* Get all data sources.
|
45
|
+
*
|
46
|
+
* Returns: The list of data sources.
|
47
|
+
*/
|
48
|
+
list(query = {}, options) {
|
49
|
+
return this._client.getAPIList('/v1/data_sources/', (LimitOffset), { query, ...options });
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Delete a data source.
|
53
|
+
*
|
54
|
+
* Args: data_source_id: The ID of the data source to delete.
|
55
|
+
*/
|
56
|
+
delete(dataSourceID, options) {
|
57
|
+
return this._client.delete(path `/v1/data_sources/${dataSourceID}`, options);
|
58
|
+
}
|
59
|
+
}
|
60
|
+
DataSources.Connectors = Connectors;
|
61
|
+
//# sourceMappingURL=data-sources.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{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oBAAoB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AAoKD,WAAW,CAAC,UAAU,GAAG,UAAU,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export { Connectors, type DataSourceConnector, type ConnectorDeleteResponse, type ConnectorCreateParams, type ConnectorRetrieveParams, type ConnectorUpdateParams, type ConnectorListParams, type ConnectorDeleteParams, type DataSourceConnectorsLimitOffset, } from "./connectors.mjs";
|
2
|
+
export { DataSources, type DataSource, type DataSourceOauth2Params, type DataSourceType, type DataSourceDeleteResponse, type DataSourceCreateParams, type DataSourceUpdateParams, type DataSourceListParams, type DataSourcesLimitOffset, } from "./data-sources.mjs";
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":"OAEO,EACL,UAAU,EACV,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,GACrC;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,GAC5B"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export { Connectors, type DataSourceConnector, type ConnectorDeleteResponse, type ConnectorCreateParams, type ConnectorRetrieveParams, type ConnectorUpdateParams, type ConnectorListParams, type ConnectorDeleteParams, type DataSourceConnectorsLimitOffset, } from "./connectors.js";
|
2
|
+
export { DataSources, type DataSource, type DataSourceOauth2Params, type DataSourceType, type DataSourceDeleteResponse, type DataSourceCreateParams, type DataSourceUpdateParams, type DataSourceListParams, type DataSourcesLimitOffset, } from "./data-sources.js";
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":"OAEO,EACL,UAAU,EACV,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,GACrC;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,GAC5B"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.DataSources = exports.Connectors = void 0;
|
5
|
+
var connectors_1 = require("./connectors.js");
|
6
|
+
Object.defineProperty(exports, "Connectors", { enumerable: true, get: function () { return connectors_1.Connectors; } });
|
7
|
+
var data_sources_1 = require("./data-sources.js");
|
8
|
+
Object.defineProperty(exports, "DataSources", { enumerable: true, get: function () { return data_sources_1.DataSources; } });
|
9
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CAUsB;AATpB,wGAAA,UAAU,OAAA;AAUZ,kDAUwB;AATtB,2GAAA,WAAW,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,UAAU,GASX;OACM,EACL,WAAW,GASZ"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"data-sources.d.mts","sourceRoot":"","sources":["../src/resources/data-sources.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"data-sources.d.ts","sourceRoot":"","sources":["../src/resources/data-sources.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
5
|
+
tslib_1.__exportStar(require("./data-sources/index.js"), exports);
|
6
|
+
//# sourceMappingURL=data-sources.js.map
|