instill-sdk 0.0.2 → 0.0.4
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/README.md +62 -42
- package/dist/{chunk-3VVR3XHW.mjs → chunk-3NVQTT4B.mjs} +5 -5
- package/dist/chunk-4BC7UGYC.mjs +114 -0
- package/dist/chunk-4CRJTVPW.mjs +132 -0
- package/dist/{chunk-JONZWFL5.mjs → chunk-4LUKB34H.mjs} +48 -52
- package/dist/chunk-5FTGMS4X.mjs +46 -0
- package/dist/chunk-6K6UDAWM.mjs +114 -0
- package/dist/{chunk-IPW3WQCQ.mjs → chunk-7VLTGUGU.mjs} +18 -1
- package/dist/chunk-DZXTDWWF.mjs +69 -0
- package/dist/{chunk-4VWYH26Q.mjs → chunk-EI3U4WOS.mjs} +1 -1
- package/dist/{chunk-KHFNAMT4.mjs → chunk-GEEYB6IX.mjs} +1 -1
- package/dist/{chunk-G5M7VUJT.mjs → chunk-GFLAFXAN.mjs} +1 -1
- package/dist/chunk-GX3ELROF.mjs +141 -0
- package/dist/{chunk-YK7RY2CG.mjs → chunk-I4VMGZBF.mjs} +104 -32
- package/dist/{chunk-YXNMG2RZ.mjs → chunk-JBSVFVPW.mjs} +1 -1
- package/dist/{chunk-NRP5M7FG.mjs → chunk-K7AV4FXF.mjs} +13 -11
- package/dist/{chunk-DIAPO2ML.mjs → chunk-LIXOPQVC.mjs} +20 -9
- package/dist/{chunk-EBWGEVUX.mjs → chunk-QG4SF5DT.mjs} +5 -1
- package/dist/{chunk-GPM5FDRS.mjs → chunk-SFKHRD33.mjs} +18 -18
- package/dist/{chunk-MS2EILMH.mjs → chunk-V2NMRJ2Y.mjs} +20 -16
- package/dist/connector/ConnectorClient.d.ts +32 -32
- package/dist/connector/ConnectorClient.js +90 -85
- package/dist/connector/ConnectorClient.mjs +5 -5
- package/dist/connector/action.d.ts +19 -9
- package/dist/connector/action.js +17 -17
- package/dist/connector/action.mjs +7 -7
- package/dist/connector/index.mjs +5 -5
- package/dist/connector/mutation.d.ts +13 -13
- package/dist/connector/mutation.js +35 -30
- package/dist/connector/mutation.mjs +9 -9
- package/dist/connector/queries.d.ts +11 -11
- package/dist/connector/queries.js +26 -22
- package/dist/connector/queries.mjs +10 -10
- package/dist/connector/types.d.ts +36 -50
- package/dist/helper/getQueryString.d.ts +3 -2
- package/dist/helper/getQueryString.js +5 -1
- package/dist/helper/getQueryString.mjs +1 -1
- package/dist/helper/getQueryString.test.js +5 -1
- package/dist/helper/getQueryString.test.mjs +1 -1
- package/dist/helper/index.js +5 -1
- package/dist/helper/index.mjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +573 -143
- package/dist/index.mjs +55 -20
- package/dist/metric/MetricClient.js +5 -1
- package/dist/metric/MetricClient.mjs +3 -3
- package/dist/metric/pipeline/queries.js +5 -1
- package/dist/metric/pipeline/queries.mjs +2 -2
- package/dist/mgmt/AuthClient.d.ts +9 -3
- package/dist/mgmt/AuthClient.js +51 -11
- package/dist/mgmt/AuthClient.mjs +5 -5
- package/dist/mgmt/action.d.ts +4 -0
- package/dist/mgmt/action.js +20 -2
- package/dist/mgmt/action.mjs +5 -3
- package/dist/mgmt/index.d.ts +0 -1
- package/dist/mgmt/index.mjs +6 -7
- package/dist/mgmt/mutation.d.ts +4 -4
- package/dist/mgmt/mutation.js +6 -6
- package/dist/mgmt/mutation.mjs +3 -3
- package/dist/mgmt/queries.d.ts +14 -2
- package/dist/mgmt/queries.js +67 -5
- package/dist/mgmt/queries.mjs +10 -4
- package/dist/mgmt/types.d.ts +62 -1
- package/dist/mgmt/types.mjs +0 -1
- package/dist/model/ModelClient.js +5 -1
- package/dist/model/ModelClient.mjs +3 -3
- package/dist/model/index.mjs +3 -3
- package/dist/model/queries.js +5 -1
- package/dist/model/queries.mjs +2 -2
- package/dist/organization/OrganizationClient.d.ts +43 -0
- package/dist/organization/OrganizationClient.js +378 -0
- package/dist/organization/OrganizationClient.mjs +15 -0
- package/dist/organization/index.d.ts +2 -0
- package/dist/organization/index.js +310 -0
- package/dist/organization/index.mjs +40 -0
- package/dist/organization/mutations.d.ts +32 -0
- package/dist/organization/mutations.js +144 -0
- package/dist/organization/mutations.mjs +19 -0
- package/dist/organization/queries.d.ts +34 -0
- package/dist/organization/queries.js +191 -0
- package/dist/organization/queries.mjs +23 -0
- package/dist/organization/types.d.ts +81 -0
- package/dist/organization/types.js +18 -0
- package/dist/organization/types.mjs +0 -0
- package/dist/pipeline/PipelineClient.d.ts +7 -5
- package/dist/pipeline/PipelineClient.js +81 -47
- package/dist/pipeline/PipelineClient.mjs +4 -4
- package/dist/pipeline/action.d.ts +13 -12
- package/dist/pipeline/action.js +13 -11
- package/dist/pipeline/action.mjs +1 -1
- package/dist/pipeline/index.mjs +5 -5
- package/dist/pipeline/queries.d.ts +37 -18
- package/dist/pipeline/queries.js +110 -32
- package/dist/pipeline/queries.mjs +8 -4
- package/dist/pipeline/types.d.ts +89 -18
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +53 -2
- package/package.json +1 -2
- package/dist/chunk-6M57XUNI.mjs +0 -64
- package/dist/chunk-VIPORJ6H.mjs +0 -77
- package/dist/chunk-YT6ZGA4J.mjs +0 -46
- /package/dist/{chunk-JY37AKV6.mjs → chunk-IESWEQM7.mjs} +0 -0
- /package/dist/{chunk-VASX6R4R.mjs → chunk-ZVLPH226.mjs} +0 -0
|
@@ -20,72 +20,77 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/connector/mutation.ts
|
|
21
21
|
var mutation_exports = {};
|
|
22
22
|
__export(mutation_exports, {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
createUserConnectorMutation: () => createUserConnectorMutation,
|
|
24
|
+
deleteUserConnectorMutation: () => deleteUserConnectorMutation,
|
|
25
|
+
renameUserConnector: () => renameUserConnector,
|
|
26
|
+
updateUserConnectorMutation: () => updateUserConnectorMutation
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(mutation_exports);
|
|
29
|
-
async function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
async function createUserConnectorMutation({
|
|
30
|
+
entityName,
|
|
31
|
+
payload,
|
|
32
|
+
axiosInstance
|
|
33
33
|
}) {
|
|
34
34
|
try {
|
|
35
35
|
const res = await axiosInstance.post(
|
|
36
|
-
`${
|
|
36
|
+
`${entityName}/connectors`,
|
|
37
37
|
payload
|
|
38
38
|
);
|
|
39
|
-
return Promise.resolve(res.data.
|
|
39
|
+
return Promise.resolve(res.data.connector);
|
|
40
40
|
} catch (err) {
|
|
41
41
|
return Promise.reject(err);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
async function
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
async function deleteUserConnectorMutation({
|
|
45
|
+
connectorName,
|
|
46
|
+
axiosInstance
|
|
47
47
|
}) {
|
|
48
48
|
try {
|
|
49
|
-
await axiosInstance.delete(`/${
|
|
49
|
+
await axiosInstance.delete(`/${connectorName}`);
|
|
50
50
|
} catch (err) {
|
|
51
51
|
return Promise.reject(err);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
async function
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
async function updateUserConnectorMutation({
|
|
55
|
+
payload,
|
|
56
|
+
axiosInstance
|
|
57
57
|
}) {
|
|
58
58
|
try {
|
|
59
59
|
const res = await axiosInstance.patch(
|
|
60
|
-
`/${payload.
|
|
60
|
+
`/${payload.connectorName}`,
|
|
61
61
|
{
|
|
62
62
|
...payload,
|
|
63
|
-
|
|
63
|
+
// connector name don't need to be sent to the server
|
|
64
|
+
connectorName: void 0
|
|
64
65
|
}
|
|
65
66
|
);
|
|
66
|
-
return Promise.resolve(res.data.
|
|
67
|
+
return Promise.resolve(res.data.connector);
|
|
67
68
|
} catch (err) {
|
|
68
69
|
return Promise.reject(err);
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
async function
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
async function renameUserConnector({
|
|
73
|
+
payload,
|
|
74
|
+
axiosInstance
|
|
74
75
|
}) {
|
|
75
76
|
try {
|
|
76
77
|
const { data } = await axiosInstance.post(
|
|
77
|
-
`/${payload.
|
|
78
|
-
|
|
78
|
+
`/${payload.connectorName}/rename`,
|
|
79
|
+
{
|
|
80
|
+
...payload,
|
|
81
|
+
// connector name don't need to be sent to the server
|
|
82
|
+
connectorName: void 0
|
|
83
|
+
}
|
|
79
84
|
);
|
|
80
|
-
return Promise.resolve(data.
|
|
85
|
+
return Promise.resolve(data.connector);
|
|
81
86
|
} catch (err) {
|
|
82
87
|
return Promise.reject(err);
|
|
83
88
|
}
|
|
84
89
|
}
|
|
85
90
|
// Annotate the CommonJS export names for ESM import in node:
|
|
86
91
|
0 && (module.exports = {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
createUserConnectorMutation,
|
|
93
|
+
deleteUserConnectorMutation,
|
|
94
|
+
renameUserConnector,
|
|
95
|
+
updateUserConnectorMutation
|
|
91
96
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "../chunk-
|
|
2
|
+
createUserConnectorMutation,
|
|
3
|
+
deleteUserConnectorMutation,
|
|
4
|
+
renameUserConnector,
|
|
5
|
+
updateUserConnectorMutation
|
|
6
|
+
} from "../chunk-DZXTDWWF.mjs";
|
|
7
7
|
import "../chunk-EXJ4UK7Q.mjs";
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
createUserConnectorMutation,
|
|
10
|
+
deleteUserConnectorMutation,
|
|
11
|
+
renameUserConnector,
|
|
12
|
+
updateUserConnectorMutation
|
|
13
13
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { Nullable } from "../types";
|
|
3
|
-
import { ConnectorDefinition,
|
|
4
|
-
export declare function
|
|
3
|
+
import { ConnectorDefinition, ConnectorWatchState, ConnectorWithDefinition } from "./types";
|
|
4
|
+
export declare function listConnectorsQuery({ axiosInstance, pageSize, nextPageToken, filter, }: {
|
|
5
5
|
axiosInstance: AxiosInstance;
|
|
6
6
|
pageSize: Nullable<number>;
|
|
7
7
|
nextPageToken: Nullable<string>;
|
|
8
8
|
filter: Nullable<string>;
|
|
9
|
-
}): Promise<
|
|
10
|
-
export declare function
|
|
9
|
+
}): Promise<ConnectorWithDefinition[]>;
|
|
10
|
+
export declare function listUserConnectorsQuery({ axiosInstance, userName, pageSize, nextPageToken, filter, }: {
|
|
11
11
|
axiosInstance: AxiosInstance;
|
|
12
12
|
userName: string;
|
|
13
13
|
pageSize: Nullable<number>;
|
|
14
14
|
nextPageToken: Nullable<string>;
|
|
15
15
|
filter: Nullable<string>;
|
|
16
|
-
}): Promise<
|
|
16
|
+
}): Promise<ConnectorWithDefinition[]>;
|
|
17
17
|
export declare function listConnectorDefinitionsQuery({ axiosInstance, pageSize, nextPageToken, filter, }: {
|
|
18
18
|
axiosInstance: AxiosInstance;
|
|
19
19
|
pageSize: Nullable<number>;
|
|
@@ -24,11 +24,11 @@ export declare function getConnectorDefinitionQuery({ axiosInstance, connectorDe
|
|
|
24
24
|
axiosInstance: AxiosInstance;
|
|
25
25
|
connectorDefinitionName: string;
|
|
26
26
|
}): Promise<ConnectorDefinition>;
|
|
27
|
-
export declare function
|
|
27
|
+
export declare function getUserConnectorQuery({ axiosInstance, connectorName, }: {
|
|
28
28
|
axiosInstance: AxiosInstance;
|
|
29
|
-
|
|
30
|
-
}): Promise<
|
|
31
|
-
export declare function
|
|
29
|
+
connectorName: string;
|
|
30
|
+
}): Promise<ConnectorWithDefinition>;
|
|
31
|
+
export declare function watchUserConnector({ axiosInstance, connectorName, }: {
|
|
32
32
|
axiosInstance: AxiosInstance;
|
|
33
|
-
|
|
34
|
-
}): Promise<
|
|
33
|
+
connectorName: string;
|
|
34
|
+
}): Promise<ConnectorWatchState>;
|
|
@@ -31,11 +31,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var queries_exports = {};
|
|
32
32
|
__export(queries_exports, {
|
|
33
33
|
getConnectorDefinitionQuery: () => getConnectorDefinitionQuery,
|
|
34
|
-
|
|
34
|
+
getUserConnectorQuery: () => getUserConnectorQuery,
|
|
35
35
|
listConnectorDefinitionsQuery: () => listConnectorDefinitionsQuery,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
listConnectorsQuery: () => listConnectorsQuery,
|
|
37
|
+
listUserConnectorsQuery: () => listUserConnectorsQuery,
|
|
38
|
+
watchUserConnector: () => watchUserConnector
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(queries_exports);
|
|
41
41
|
|
|
@@ -47,7 +47,8 @@ var getQueryString = ({
|
|
|
47
47
|
baseURL,
|
|
48
48
|
pageSize,
|
|
49
49
|
nextPageToken,
|
|
50
|
-
filter
|
|
50
|
+
filter,
|
|
51
|
+
queryParams
|
|
51
52
|
}) => {
|
|
52
53
|
let url = baseURL;
|
|
53
54
|
if (pageSize || nextPageToken || filter) {
|
|
@@ -66,6 +67,9 @@ var getQueryString = ({
|
|
|
66
67
|
if (filter) {
|
|
67
68
|
url += `filter=${filter}&`;
|
|
68
69
|
}
|
|
70
|
+
if (queryParams) {
|
|
71
|
+
url += `${queryParams}&`;
|
|
72
|
+
}
|
|
69
73
|
if (url.endsWith("&")) {
|
|
70
74
|
url = url.slice(0, -1);
|
|
71
75
|
}
|
|
@@ -76,7 +80,7 @@ var getQueryString = ({
|
|
|
76
80
|
var import_axios2 = __toESM(require("axios"));
|
|
77
81
|
|
|
78
82
|
// src/connector/queries.ts
|
|
79
|
-
async function
|
|
83
|
+
async function listConnectorsQuery({
|
|
80
84
|
axiosInstance,
|
|
81
85
|
pageSize,
|
|
82
86
|
nextPageToken,
|
|
@@ -93,10 +97,10 @@ async function listConnectorResourcesQuery({
|
|
|
93
97
|
const { data } = await axiosInstance.get(
|
|
94
98
|
queryString
|
|
95
99
|
);
|
|
96
|
-
connectors.push(...data.
|
|
100
|
+
connectors.push(...data.connectors);
|
|
97
101
|
if (data.next_page_token) {
|
|
98
102
|
connectors.push(
|
|
99
|
-
...await
|
|
103
|
+
...await listConnectorsQuery({
|
|
100
104
|
axiosInstance,
|
|
101
105
|
pageSize,
|
|
102
106
|
nextPageToken: data.next_page_token,
|
|
@@ -109,7 +113,7 @@ async function listConnectorResourcesQuery({
|
|
|
109
113
|
return Promise.reject(err);
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
|
-
async function
|
|
116
|
+
async function listUserConnectorsQuery({
|
|
113
117
|
axiosInstance,
|
|
114
118
|
userName,
|
|
115
119
|
pageSize,
|
|
@@ -127,10 +131,10 @@ async function listUserConnectorResourcesQuery({
|
|
|
127
131
|
const { data } = await axiosInstance.get(
|
|
128
132
|
queryString
|
|
129
133
|
);
|
|
130
|
-
connectors.push(...data.
|
|
134
|
+
connectors.push(...data.connectors);
|
|
131
135
|
if (data.next_page_token) {
|
|
132
136
|
connectors.push(
|
|
133
|
-
...await
|
|
137
|
+
...await listUserConnectorsQuery({
|
|
134
138
|
axiosInstance,
|
|
135
139
|
userName,
|
|
136
140
|
pageSize,
|
|
@@ -190,26 +194,26 @@ async function getConnectorDefinitionQuery({
|
|
|
190
194
|
return Promise.reject(err);
|
|
191
195
|
}
|
|
192
196
|
}
|
|
193
|
-
async function
|
|
197
|
+
async function getUserConnectorQuery({
|
|
194
198
|
axiosInstance,
|
|
195
|
-
|
|
199
|
+
connectorName
|
|
196
200
|
}) {
|
|
197
201
|
try {
|
|
198
202
|
const { data } = await axiosInstance.get(
|
|
199
|
-
`/${
|
|
203
|
+
`/${connectorName}?view=VIEW_FULL`
|
|
200
204
|
);
|
|
201
|
-
return Promise.resolve(data.
|
|
205
|
+
return Promise.resolve(data.connector);
|
|
202
206
|
} catch (err) {
|
|
203
207
|
return Promise.reject(err);
|
|
204
208
|
}
|
|
205
209
|
}
|
|
206
|
-
async function
|
|
210
|
+
async function watchUserConnector({
|
|
207
211
|
axiosInstance,
|
|
208
|
-
|
|
212
|
+
connectorName
|
|
209
213
|
}) {
|
|
210
214
|
try {
|
|
211
215
|
const { data } = await axiosInstance.get(
|
|
212
|
-
`/${
|
|
216
|
+
`/${connectorName}/watch`
|
|
213
217
|
);
|
|
214
218
|
return Promise.resolve(data);
|
|
215
219
|
} catch (err) {
|
|
@@ -219,9 +223,9 @@ async function watchUserConnectorResource({
|
|
|
219
223
|
// Annotate the CommonJS export names for ESM import in node:
|
|
220
224
|
0 && (module.exports = {
|
|
221
225
|
getConnectorDefinitionQuery,
|
|
222
|
-
|
|
226
|
+
getUserConnectorQuery,
|
|
223
227
|
listConnectorDefinitionsQuery,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
228
|
+
listConnectorsQuery,
|
|
229
|
+
listUserConnectorsQuery,
|
|
230
|
+
watchUserConnector
|
|
227
231
|
});
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConnectorDefinitionQuery,
|
|
3
|
-
|
|
3
|
+
getUserConnectorQuery,
|
|
4
4
|
listConnectorDefinitionsQuery,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "../chunk-
|
|
5
|
+
listConnectorsQuery,
|
|
6
|
+
listUserConnectorsQuery,
|
|
7
|
+
watchUserConnector
|
|
8
|
+
} from "../chunk-SFKHRD33.mjs";
|
|
9
9
|
import "../chunk-6ZXT6X3H.mjs";
|
|
10
10
|
import "../chunk-JTTE7IZY.mjs";
|
|
11
11
|
import "../chunk-DXEIDDIA.mjs";
|
|
12
12
|
import "../chunk-RVRM4NPL.mjs";
|
|
13
13
|
import "../chunk-7KV3Y36U.mjs";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-QG4SF5DT.mjs";
|
|
15
15
|
import "../chunk-EXJ4UK7Q.mjs";
|
|
16
16
|
export {
|
|
17
17
|
getConnectorDefinitionQuery,
|
|
18
|
-
|
|
18
|
+
getUserConnectorQuery,
|
|
19
19
|
listConnectorDefinitionsQuery,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
listConnectorsQuery,
|
|
21
|
+
listUserConnectorsQuery,
|
|
22
|
+
watchUserConnector
|
|
23
23
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { AirbyteFieldValues } from "
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type ConnectorResource = {
|
|
1
|
+
import { AirbyteFieldValues, Owner, Spec } from "../types";
|
|
2
|
+
export type ConnectorState = "STATE_CONNECTED" | "STATE_DISCONNECTED" | "STATE_ERROR" | "STATE_UNSPECIFIED";
|
|
3
|
+
export type ConnectorVisibility = "VISIBILITY_UNSPECIFIED" | "VISIBILITY_PRIVATE" | "VISIBILITY_PUBLIC";
|
|
4
|
+
export type ConnectorType = "CONNECTOR_TYPE_UNSPECIFIED" | "CONNECTOR_TYPE_OPERATOR" | "CONNECTOR_TYPE_DATA" | "CONNECTOR_TYPE_AI" | "CONNECTOR_TYPE_APPLICATION";
|
|
5
|
+
export type Connector = {
|
|
7
6
|
name: string;
|
|
8
7
|
uid: string;
|
|
9
8
|
id: string;
|
|
10
9
|
connector_definition: null;
|
|
11
10
|
connector_definition_name: string;
|
|
12
|
-
type:
|
|
11
|
+
type: ConnectorType;
|
|
13
12
|
task: string;
|
|
14
13
|
description: string;
|
|
15
14
|
configuration: Record<string, any> | Record<string, never>;
|
|
16
|
-
state:
|
|
15
|
+
state: ConnectorState;
|
|
17
16
|
tombstone: boolean;
|
|
18
17
|
user: string;
|
|
19
18
|
create_time: string;
|
|
20
19
|
update_time: string;
|
|
21
|
-
visibility:
|
|
20
|
+
visibility: ConnectorVisibility;
|
|
21
|
+
owner: Owner;
|
|
22
22
|
};
|
|
23
|
-
export type
|
|
23
|
+
export type ConnectorWithDefinition = Omit<Connector, "connector_definition"> & {
|
|
24
24
|
connector_definition: ConnectorDefinition;
|
|
25
25
|
};
|
|
26
26
|
export type ConnectorDefinition = {
|
|
@@ -31,7 +31,7 @@ export type ConnectorDefinition = {
|
|
|
31
31
|
documentation_url: string;
|
|
32
32
|
icon: string;
|
|
33
33
|
icon_url: string;
|
|
34
|
-
|
|
34
|
+
type: ConnectorType;
|
|
35
35
|
spec: Spec;
|
|
36
36
|
tombstone: boolean;
|
|
37
37
|
public: boolean;
|
|
@@ -39,64 +39,50 @@ export type ConnectorDefinition = {
|
|
|
39
39
|
vendor: string;
|
|
40
40
|
vendor_attributes: Record<string, any>;
|
|
41
41
|
};
|
|
42
|
-
export type
|
|
43
|
-
state:
|
|
42
|
+
export type ConnectorWatchState = {
|
|
43
|
+
state: ConnectorState;
|
|
44
44
|
};
|
|
45
|
-
export type
|
|
46
|
-
export type
|
|
47
|
-
watchState:
|
|
48
|
-
} &
|
|
49
|
-
export type
|
|
50
|
-
state: ConnectorResourceState;
|
|
51
|
-
};
|
|
52
|
-
export type ConnectUserConnectorResourceResponse = {
|
|
53
|
-
connector_resource: ConnectorResource;
|
|
54
|
-
};
|
|
55
|
-
export type DisconnectUserConnectorResourceResponse = {
|
|
56
|
-
connector_resource: ConnectorResource;
|
|
57
|
-
};
|
|
58
|
-
export type CreateUserConnectorResourcePayload = {
|
|
45
|
+
export type ConnectorsWatchState = Record<string, ConnectorWatchState>;
|
|
46
|
+
export type ConnectorWithWatchState = {
|
|
47
|
+
watchState: ConnectorState;
|
|
48
|
+
} & ConnectorWithDefinition;
|
|
49
|
+
export type CreateUserConnectorPayload = {
|
|
59
50
|
id: string;
|
|
60
51
|
connector_definition_name: string;
|
|
61
52
|
description?: string;
|
|
62
53
|
configuration: Record<string, any> | Record<string, never>;
|
|
63
54
|
};
|
|
64
|
-
export type
|
|
65
|
-
|
|
55
|
+
export type CreateUserConnectorResponse = {
|
|
56
|
+
connector: ConnectorWithDefinition;
|
|
66
57
|
};
|
|
67
|
-
export type
|
|
68
|
-
|
|
58
|
+
export type UpdateUserConnectorPayload = {
|
|
59
|
+
connectorName: string;
|
|
69
60
|
description?: string;
|
|
70
61
|
configuration: /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ Record<string, any> | AirbyteFieldValues | Record<string, never>;
|
|
71
62
|
};
|
|
72
|
-
export type
|
|
73
|
-
|
|
63
|
+
export type UpdateUserConnectorResponse = {
|
|
64
|
+
connector: ConnectorWithDefinition;
|
|
74
65
|
};
|
|
75
|
-
export type
|
|
76
|
-
|
|
66
|
+
export type RenameUserConnectorPayload = {
|
|
67
|
+
connectorName: string;
|
|
77
68
|
new_connector_id: string;
|
|
78
69
|
};
|
|
79
|
-
export type
|
|
80
|
-
|
|
70
|
+
export type RenameUserConnectorResponse = {
|
|
71
|
+
connector: Connector;
|
|
81
72
|
};
|
|
82
|
-
export type
|
|
83
|
-
|
|
84
|
-
next_page_token: string;
|
|
85
|
-
total_size: number;
|
|
73
|
+
export type GetConnectorDefinitionResponse = {
|
|
74
|
+
connector_definition: ConnectorDefinition;
|
|
86
75
|
};
|
|
87
|
-
export type
|
|
88
|
-
|
|
89
|
-
next_page_token: string;
|
|
90
|
-
total_size: number;
|
|
76
|
+
export type GetUserConnectorResponse = {
|
|
77
|
+
connector: ConnectorWithDefinition;
|
|
91
78
|
};
|
|
92
79
|
export type ListConnectorDefinitionsResponse = {
|
|
93
80
|
connector_definitions: ConnectorDefinition[];
|
|
94
81
|
next_page_token: string;
|
|
95
82
|
total_size: number;
|
|
96
83
|
};
|
|
97
|
-
export type
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
connector_resource: ConnectorResourceWithDefinition;
|
|
84
|
+
export type ListConnectorsResponse = {
|
|
85
|
+
connectors: ConnectorWithDefinition[];
|
|
86
|
+
next_page_token: string;
|
|
87
|
+
total_size: number;
|
|
102
88
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Nullable } from "../types";
|
|
2
|
-
export declare const getQueryString: ({ baseURL, pageSize, nextPageToken, filter, }: {
|
|
2
|
+
export declare const getQueryString: ({ baseURL, pageSize, nextPageToken, filter, queryParams, }: {
|
|
3
3
|
baseURL: string;
|
|
4
4
|
pageSize: Nullable<number>;
|
|
5
5
|
nextPageToken: Nullable<string>;
|
|
6
|
-
filter
|
|
6
|
+
filter?: Nullable<string> | undefined;
|
|
7
|
+
queryParams?: string | undefined;
|
|
7
8
|
}) => string;
|
|
@@ -27,7 +27,8 @@ var getQueryString = ({
|
|
|
27
27
|
baseURL,
|
|
28
28
|
pageSize,
|
|
29
29
|
nextPageToken,
|
|
30
|
-
filter
|
|
30
|
+
filter,
|
|
31
|
+
queryParams
|
|
31
32
|
}) => {
|
|
32
33
|
let url = baseURL;
|
|
33
34
|
if (pageSize || nextPageToken || filter) {
|
|
@@ -46,6 +47,9 @@ var getQueryString = ({
|
|
|
46
47
|
if (filter) {
|
|
47
48
|
url += `filter=${filter}&`;
|
|
48
49
|
}
|
|
50
|
+
if (queryParams) {
|
|
51
|
+
url += `${queryParams}&`;
|
|
52
|
+
}
|
|
49
53
|
if (url.endsWith("&")) {
|
|
50
54
|
url = url.slice(0, -1);
|
|
51
55
|
}
|
|
@@ -14952,7 +14952,8 @@ var getQueryString = ({
|
|
|
14952
14952
|
baseURL,
|
|
14953
14953
|
pageSize,
|
|
14954
14954
|
nextPageToken,
|
|
14955
|
-
filter
|
|
14955
|
+
filter,
|
|
14956
|
+
queryParams
|
|
14956
14957
|
}) => {
|
|
14957
14958
|
let url = baseURL;
|
|
14958
14959
|
if (pageSize || nextPageToken || filter) {
|
|
@@ -14971,6 +14972,9 @@ var getQueryString = ({
|
|
|
14971
14972
|
if (filter) {
|
|
14972
14973
|
url += `filter=${filter}&`;
|
|
14973
14974
|
}
|
|
14975
|
+
if (queryParams) {
|
|
14976
|
+
url += `${queryParams}&`;
|
|
14977
|
+
}
|
|
14974
14978
|
if (url.endsWith("&")) {
|
|
14975
14979
|
url = url.slice(0, -1);
|
|
14976
14980
|
}
|
package/dist/helper/index.js
CHANGED
|
@@ -95,7 +95,8 @@ var getQueryString = ({
|
|
|
95
95
|
baseURL,
|
|
96
96
|
pageSize,
|
|
97
97
|
nextPageToken,
|
|
98
|
-
filter
|
|
98
|
+
filter,
|
|
99
|
+
queryParams
|
|
99
100
|
}) => {
|
|
100
101
|
let url = baseURL;
|
|
101
102
|
if (pageSize || nextPageToken || filter) {
|
|
@@ -114,6 +115,9 @@ var getQueryString = ({
|
|
|
114
115
|
if (filter) {
|
|
115
116
|
url += `filter=${filter}&`;
|
|
116
117
|
}
|
|
118
|
+
if (queryParams) {
|
|
119
|
+
url += `${queryParams}&`;
|
|
120
|
+
}
|
|
117
121
|
if (url.endsWith("&")) {
|
|
118
122
|
url = url.slice(0, -1);
|
|
119
123
|
}
|
package/dist/helper/index.mjs
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import AuthClient from "./mgmt/AuthClient";
|
|
|
4
4
|
import ModelClient from "./model/ModelClient";
|
|
5
5
|
import OperationClient from "./operation/OperationClient";
|
|
6
6
|
import PipelineClient from "./pipeline/PipelineClient";
|
|
7
|
+
import OrganizationClient from "./organization/OrganizationClient";
|
|
7
8
|
declare class InstillClient {
|
|
8
9
|
Pipeline: PipelineClient;
|
|
9
10
|
Auth: AuthClient;
|
|
@@ -11,6 +12,7 @@ declare class InstillClient {
|
|
|
11
12
|
Metric: MetricClient;
|
|
12
13
|
Model: ModelClient;
|
|
13
14
|
Operation: OperationClient;
|
|
15
|
+
Organization: OrganizationClient;
|
|
14
16
|
constructor(baseUrl: string, appVersion: string, apiToken: string);
|
|
15
17
|
}
|
|
16
18
|
export * from "./types";
|
|
@@ -21,4 +23,5 @@ export * from "./mgmt";
|
|
|
21
23
|
export * from "./model";
|
|
22
24
|
export * from "./operation";
|
|
23
25
|
export * from "./pipeline";
|
|
26
|
+
export * from "./organization";
|
|
24
27
|
export default InstillClient;
|