@planqk/planqk-api-sdk 1.3.7 → 1.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/.gitlab-ci.yml +21 -18
- package/.releaserc.json +2 -1
- package/dist/sdk/Client.d.ts +8 -0
- package/dist/sdk/Client.js +12 -2
- package/dist/sdk/api/resources/dataPools/client/Client.d.ts +4 -1
- package/dist/sdk/api/resources/dataPools/client/Client.js +57 -39
- package/dist/sdk/api/resources/dataPools/client/requests/AddDataPoolFileRequest.d.ts +1 -1
- package/dist/sdk/api/resources/dataPools/client/requests/CreateDataPoolRequest.d.ts +1 -0
- package/dist/sdk/api/resources/dataPools/client/requests/UpdateDataPoolRequest.d.ts +3 -0
- package/dist/sdk/api/resources/index.d.ts +3 -0
- package/dist/sdk/api/resources/index.js +4 -1
- package/dist/sdk/api/resources/serviceExecutions/client/Client.d.ts +90 -0
- package/dist/sdk/api/resources/serviceExecutions/client/Client.js +271 -0
- package/dist/sdk/api/resources/serviceExecutions/client/index.d.ts +1 -0
- package/dist/sdk/api/resources/serviceExecutions/index.d.ts +1 -0
- package/dist/sdk/api/resources/serviceExecutions/index.js +17 -0
- package/dist/sdk/api/resources/serviceJobs/client/Client.d.ts +138 -0
- package/dist/sdk/api/resources/serviceJobs/client/Client.js +489 -0
- package/dist/sdk/api/resources/serviceJobs/client/index.d.ts +2 -0
- package/dist/sdk/api/resources/serviceJobs/client/index.js +17 -0
- package/dist/sdk/api/resources/serviceJobs/client/requests/CreateServiceJobRequest.d.ts +15 -0
- package/dist/sdk/api/resources/serviceJobs/client/requests/CreateServiceJobRequest.js +5 -0
- package/dist/sdk/api/resources/serviceJobs/client/requests/index.d.ts +1 -0
- package/dist/sdk/api/resources/serviceJobs/client/requests/index.js +2 -0
- package/dist/sdk/api/resources/serviceJobs/index.d.ts +1 -0
- package/dist/sdk/api/resources/serviceJobs/index.js +17 -0
- package/dist/sdk/api/types/ActivityInstance.d.ts +20 -0
- package/dist/sdk/api/types/ActivityInstance.js +14 -0
- package/dist/sdk/api/types/DataPoolDto.d.ts +5 -0
- package/dist/sdk/api/types/DataPoolFileDto.d.ts +7 -0
- package/dist/sdk/api/types/LogEntry.d.ts +24 -0
- package/dist/sdk/api/types/LogEntry.js +16 -0
- package/dist/sdk/api/types/MetricDataPoint.d.ts +12 -0
- package/dist/sdk/api/types/MetricDataPoint.js +5 -0
- package/dist/sdk/api/types/ServiceExecutionDto.d.ts +21 -0
- package/dist/sdk/api/types/ServiceExecutionDto.js +17 -0
- package/dist/sdk/api/types/ServiceExecutionLogs.d.ts +5 -0
- package/dist/sdk/api/types/ServiceExecutionLogs.js +5 -0
- package/dist/sdk/api/types/ServiceExecutionMetrics.d.ts +23 -0
- package/dist/sdk/api/types/ServiceExecutionMetrics.js +5 -0
- package/dist/sdk/api/types/ServiceJobDto.d.ts +46 -0
- package/dist/sdk/api/types/ServiceJobDto.js +22 -0
- package/dist/sdk/api/types/VariableInstance.d.ts +9 -0
- package/dist/sdk/api/types/VariableInstance.js +5 -0
- package/dist/sdk/api/types/WorkflowInstance.d.ts +23 -0
- package/dist/sdk/api/types/WorkflowInstance.js +17 -0
- package/dist/sdk/api/types/WorkflowServiceExecutionDto.d.ts +8 -0
- package/dist/sdk/api/types/WorkflowServiceExecutionDto.js +5 -0
- package/dist/sdk/api/types/index.d.ts +10 -0
- package/dist/sdk/api/types/index.js +10 -0
- package/dist/sdk/core/exports.d.ts +1 -0
- package/dist/sdk/core/exports.js +17 -0
- package/dist/sdk/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/sdk/core/fetcher/Fetcher.js +2 -2
- package/dist/sdk/core/fetcher/index.d.ts +5 -5
- package/dist/sdk/core/fetcher/index.js +5 -5
- package/dist/sdk/core/file/exports.d.ts +1 -0
- package/dist/sdk/core/file/exports.js +2 -0
- package/dist/sdk/core/file/file.d.ts +5 -0
- package/dist/sdk/core/file/file.js +185 -0
- package/dist/sdk/core/file/index.d.ts +2 -0
- package/dist/sdk/core/file/index.js +18 -0
- package/dist/sdk/core/file/types.d.ts +66 -0
- package/dist/sdk/core/file/types.js +2 -0
- package/dist/sdk/core/form-data-utils/FormDataWrapper.js +12 -3
- package/dist/sdk/core/index.d.ts +1 -1
- package/dist/sdk/core/index.js +2 -2
- package/dist/sdk/core/url/join.js +23 -3
- package/dist/sdk/exports.d.ts +1 -0
- package/dist/sdk/exports.js +17 -0
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/index.js +4 -0
- package/fern/fern.config.json +1 -1
- package/fern/generators.yml +9 -3
- package/fern/openapi/openapi.json +950 -54
- package/package.json +1 -1
- package/planqk/api/_version.py +1 -1
- package/pyproject.toml +1 -1
- package/requirements.txt +117 -113
- package/scripts/update-version.sh +2 -0
- package/src/index.test.ts +11 -0
- package/src/sdk/Client.ts +14 -0
- package/src/sdk/api/resources/dataPools/client/Client.ts +95 -75
- package/src/sdk/api/resources/dataPools/client/requests/AddDataPoolFileRequest.ts +1 -1
- package/src/sdk/api/resources/dataPools/client/requests/CreateDataPoolRequest.ts +1 -0
- package/src/sdk/api/resources/dataPools/client/requests/UpdateDataPoolRequest.ts +3 -0
- package/src/sdk/api/resources/index.ts +3 -0
- package/src/sdk/api/resources/serviceExecutions/client/Client.ts +323 -0
- package/src/sdk/api/resources/serviceExecutions/client/index.ts +1 -0
- package/src/sdk/api/resources/serviceExecutions/index.ts +1 -0
- package/src/sdk/api/resources/serviceJobs/client/Client.ts +581 -0
- package/src/sdk/api/resources/serviceJobs/client/index.ts +2 -0
- package/src/sdk/api/resources/serviceJobs/client/requests/CreateServiceJobRequest.ts +16 -0
- package/src/sdk/api/resources/serviceJobs/client/requests/index.ts +1 -0
- package/src/sdk/api/resources/serviceJobs/index.ts +1 -0
- package/src/sdk/api/types/ActivityInstance.ts +22 -0
- package/src/sdk/api/types/DataPoolDto.ts +5 -0
- package/src/sdk/api/types/DataPoolFileDto.ts +7 -0
- package/src/sdk/api/types/LogEntry.ts +26 -0
- package/src/sdk/api/types/MetricDataPoint.ts +13 -0
- package/src/sdk/api/types/ServiceExecutionDto.ts +23 -0
- package/src/sdk/api/types/ServiceExecutionLogs.ts +7 -0
- package/src/sdk/api/types/ServiceExecutionMetrics.ts +25 -0
- package/src/sdk/api/types/ServiceJobDto.ts +48 -0
- package/src/sdk/api/types/VariableInstance.ts +10 -0
- package/src/sdk/api/types/WorkflowInstance.ts +26 -0
- package/src/sdk/api/types/WorkflowServiceExecutionDto.ts +10 -0
- package/src/sdk/api/types/index.ts +10 -0
- package/src/sdk/core/exports.ts +1 -0
- package/src/sdk/core/fetcher/Fetcher.ts +3 -3
- package/src/sdk/core/fetcher/index.ts +5 -5
- package/src/sdk/core/file/exports.ts +1 -0
- package/src/sdk/core/file/file.ts +186 -0
- package/src/sdk/core/file/index.ts +2 -0
- package/src/sdk/core/file/types.ts +81 -0
- package/src/sdk/core/form-data-utils/FormDataWrapper.ts +12 -3
- package/src/sdk/core/index.ts +1 -1
- package/src/sdk/core/url/join.ts +28 -3
- package/src/sdk/exports.ts +1 -0
- package/src/sdk/index.ts +1 -0
- package/uv.lock +245 -228
- package/dist/sdk/core/file.d.ts +0 -1
- package/planqk/__init__.py +0 -0
- package/requirements-dev.txt +0 -682
- package/src/sdk/core/file.ts +0 -11
- /package/dist/sdk/{core/file.js → api/resources/serviceExecutions/client/index.js} +0 -0
package/.gitlab-ci.yml
CHANGED
|
@@ -10,11 +10,31 @@ variables:
|
|
|
10
10
|
|
|
11
11
|
stages:
|
|
12
12
|
- commit-test
|
|
13
|
-
- install
|
|
14
13
|
- compliance
|
|
15
14
|
- commit-release-check
|
|
16
15
|
- release-package
|
|
17
16
|
|
|
17
|
+
compile-node-sdk:
|
|
18
|
+
stage: commit-test
|
|
19
|
+
rules:
|
|
20
|
+
- if: '$CI_COMMIT_MESSAGE =~ /^chore\(release\):/'
|
|
21
|
+
when: never
|
|
22
|
+
- if: '$CI_PIPELINE_SOURCE == "web"'
|
|
23
|
+
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
24
|
+
image: node:lts
|
|
25
|
+
before_script:
|
|
26
|
+
- npm ci
|
|
27
|
+
script:
|
|
28
|
+
- npm run build
|
|
29
|
+
artifacts:
|
|
30
|
+
expire_in: 1 hour
|
|
31
|
+
paths:
|
|
32
|
+
- dist
|
|
33
|
+
cache:
|
|
34
|
+
key: node_modules
|
|
35
|
+
paths:
|
|
36
|
+
- node_modules
|
|
37
|
+
|
|
18
38
|
semantic-release:
|
|
19
39
|
stage: commit-release-check
|
|
20
40
|
rules:
|
|
@@ -37,22 +57,6 @@ semantic-release:
|
|
|
37
57
|
script:
|
|
38
58
|
- semantic-release
|
|
39
59
|
|
|
40
|
-
install:
|
|
41
|
-
stage: install
|
|
42
|
-
rules:
|
|
43
|
-
- if: '$CI_COMMIT_TAG'
|
|
44
|
-
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
|
|
45
|
-
script:
|
|
46
|
-
- uv sync --frozen --no-dev
|
|
47
|
-
- uv export --format requirements-txt --no-dev --no-emit-project > requirements.txt
|
|
48
|
-
- uv export --format requirements-txt --dev --no-emit-project > requirements-dev.txt
|
|
49
|
-
artifacts:
|
|
50
|
-
expire_in: 1 hour
|
|
51
|
-
paths:
|
|
52
|
-
- .venv
|
|
53
|
-
- requirements.txt
|
|
54
|
-
- requirements-dev.txt
|
|
55
|
-
|
|
56
60
|
oss-compliance-check:
|
|
57
61
|
stage: compliance
|
|
58
62
|
rules:
|
|
@@ -61,7 +65,6 @@ oss-compliance-check:
|
|
|
61
65
|
before_script:
|
|
62
66
|
- apt-get update && apt-get install -y --no-install-recommends ca-certificates curl
|
|
63
67
|
- curl https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
|
|
64
|
-
- source .venv/bin/activate
|
|
65
68
|
script:
|
|
66
69
|
- FOSSA_REVISION=$([ -z $CI_COMMIT_TAG ] && echo $CI_COMMIT_SHA || echo $CI_COMMIT_TAG)
|
|
67
70
|
- FOSSA_BRANCH=$([ -z $CI_COMMIT_BRANCH ] && echo 'main' || echo $CI_COMMIT_BRANCH)
|
package/.releaserc.json
CHANGED
package/dist/sdk/Client.d.ts
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "./environments.js";
|
|
5
5
|
import * as core from "./core/index.js";
|
|
6
|
+
import { ServiceJobs } from "./api/resources/serviceJobs/client/Client.js";
|
|
6
7
|
import { DataPools } from "./api/resources/dataPools/client/Client.js";
|
|
8
|
+
import { ServiceExecutions } from "./api/resources/serviceExecutions/client/Client.js";
|
|
7
9
|
export declare namespace PlanqkApiClient {
|
|
8
10
|
interface Options {
|
|
9
11
|
environment?: core.Supplier<environments.PlanqkApiEnvironment | string>;
|
|
@@ -24,13 +26,19 @@ export declare namespace PlanqkApiClient {
|
|
|
24
26
|
abortSignal?: AbortSignal;
|
|
25
27
|
/** Override the X-OrganizationId header */
|
|
26
28
|
organizationId?: string | undefined;
|
|
29
|
+
/** Additional query string parameters to include in the request. */
|
|
30
|
+
queryParams?: Record<string, unknown>;
|
|
27
31
|
/** Additional headers to include in the request. */
|
|
28
32
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
35
|
export declare class PlanqkApiClient {
|
|
32
36
|
protected readonly _options: PlanqkApiClient.Options;
|
|
37
|
+
protected _serviceJobs: ServiceJobs | undefined;
|
|
33
38
|
protected _dataPools: DataPools | undefined;
|
|
39
|
+
protected _serviceExecutions: ServiceExecutions | undefined;
|
|
34
40
|
constructor(_options: PlanqkApiClient.Options);
|
|
41
|
+
get serviceJobs(): ServiceJobs;
|
|
35
42
|
get dataPools(): DataPools;
|
|
43
|
+
get serviceExecutions(): ServiceExecutions;
|
|
36
44
|
}
|
package/dist/sdk/Client.js
CHANGED
|
@@ -39,10 +39,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.PlanqkApiClient = void 0;
|
|
40
40
|
const core = __importStar(require("./core/index.js"));
|
|
41
41
|
const headers_js_1 = require("./core/headers.js");
|
|
42
|
-
const Client_js_1 = require("./api/resources/
|
|
42
|
+
const Client_js_1 = require("./api/resources/serviceJobs/client/Client.js");
|
|
43
|
+
const Client_js_2 = require("./api/resources/dataPools/client/Client.js");
|
|
44
|
+
const Client_js_3 = require("./api/resources/serviceExecutions/client/Client.js");
|
|
43
45
|
class PlanqkApiClient {
|
|
44
46
|
_options;
|
|
47
|
+
_serviceJobs;
|
|
45
48
|
_dataPools;
|
|
49
|
+
_serviceExecutions;
|
|
46
50
|
constructor(_options) {
|
|
47
51
|
this._options = {
|
|
48
52
|
..._options,
|
|
@@ -54,8 +58,14 @@ class PlanqkApiClient {
|
|
|
54
58
|
}, _options?.headers),
|
|
55
59
|
};
|
|
56
60
|
}
|
|
61
|
+
get serviceJobs() {
|
|
62
|
+
return (this._serviceJobs ??= new Client_js_1.ServiceJobs(this._options));
|
|
63
|
+
}
|
|
57
64
|
get dataPools() {
|
|
58
|
-
return (this._dataPools ??= new
|
|
65
|
+
return (this._dataPools ??= new Client_js_2.DataPools(this._options));
|
|
66
|
+
}
|
|
67
|
+
get serviceExecutions() {
|
|
68
|
+
return (this._serviceExecutions ??= new Client_js_3.ServiceExecutions(this._options));
|
|
59
69
|
}
|
|
60
70
|
}
|
|
61
71
|
exports.PlanqkApiClient = PlanqkApiClient;
|
|
@@ -24,6 +24,8 @@ export declare namespace DataPools {
|
|
|
24
24
|
abortSignal?: AbortSignal;
|
|
25
25
|
/** Override the X-OrganizationId header */
|
|
26
26
|
organizationId?: string | undefined;
|
|
27
|
+
/** Additional query string parameters to include in the request. */
|
|
28
|
+
queryParams?: Record<string, unknown>;
|
|
27
29
|
/** Additional headers to include in the request. */
|
|
28
30
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
29
31
|
}
|
|
@@ -85,7 +87,7 @@ export declare class DataPools {
|
|
|
85
87
|
deleteDataPool(id: string, requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<void>;
|
|
86
88
|
private __deleteDataPool;
|
|
87
89
|
/**
|
|
88
|
-
* Get a list of all data pools for the current user.
|
|
90
|
+
* Get a list of all data pools for the current user or organization.
|
|
89
91
|
*
|
|
90
92
|
* @param {DataPools.RequestOptions} requestOptions - Request-specific configuration.
|
|
91
93
|
*
|
|
@@ -146,6 +148,7 @@ export declare class DataPools {
|
|
|
146
148
|
* @throws {@link PlanqkApi.InternalServerError}
|
|
147
149
|
*
|
|
148
150
|
* @example
|
|
151
|
+
* import { createReadStream } from "fs";
|
|
149
152
|
* await client.dataPools.addDataPoolFile("id", {
|
|
150
153
|
* file: fs.createReadStream("/path/to/your/file")
|
|
151
154
|
* })
|
|
@@ -68,15 +68,17 @@ class DataPools {
|
|
|
68
68
|
return core.HttpResponsePromise.fromPromise(this.__getDataPool(id, requestOptions));
|
|
69
69
|
}
|
|
70
70
|
async __getDataPool(id, requestOptions) {
|
|
71
|
+
let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
72
|
+
"X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
|
|
73
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
74
|
+
}), requestOptions?.headers);
|
|
71
75
|
const _response = await core.fetcher({
|
|
72
76
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
73
77
|
(await core.Supplier.get(this._options.environment)) ??
|
|
74
78
|
environments.PlanqkApiEnvironment.Default, `datapools/${encodeURIComponent(id)}`),
|
|
75
79
|
method: "GET",
|
|
76
|
-
headers:
|
|
77
|
-
|
|
78
|
-
...(await this._getCustomAuthorizationHeaders()),
|
|
79
|
-
}), requestOptions?.headers),
|
|
80
|
+
headers: _headers,
|
|
81
|
+
queryParameters: requestOptions?.queryParams,
|
|
80
82
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
81
83
|
maxRetries: requestOptions?.maxRetries,
|
|
82
84
|
withCredentials: true,
|
|
@@ -139,16 +141,18 @@ class DataPools {
|
|
|
139
141
|
return core.HttpResponsePromise.fromPromise(this.__updateDataPool(id, request, requestOptions));
|
|
140
142
|
}
|
|
141
143
|
async __updateDataPool(id, request = {}, requestOptions) {
|
|
144
|
+
let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
145
|
+
"X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
|
|
146
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
147
|
+
}), requestOptions?.headers);
|
|
142
148
|
const _response = await core.fetcher({
|
|
143
149
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
144
150
|
(await core.Supplier.get(this._options.environment)) ??
|
|
145
151
|
environments.PlanqkApiEnvironment.Default, `datapools/${encodeURIComponent(id)}`),
|
|
146
152
|
method: "PUT",
|
|
147
|
-
headers:
|
|
148
|
-
"X-OrganizationId": requestOptions?.organizationId,
|
|
149
|
-
...(await this._getCustomAuthorizationHeaders()),
|
|
150
|
-
}), requestOptions?.headers),
|
|
153
|
+
headers: _headers,
|
|
151
154
|
contentType: "application/json",
|
|
155
|
+
queryParameters: requestOptions?.queryParams,
|
|
152
156
|
requestType: "json",
|
|
153
157
|
body: request,
|
|
154
158
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -213,15 +217,17 @@ class DataPools {
|
|
|
213
217
|
return core.HttpResponsePromise.fromPromise(this.__deleteDataPool(id, requestOptions));
|
|
214
218
|
}
|
|
215
219
|
async __deleteDataPool(id, requestOptions) {
|
|
220
|
+
let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
221
|
+
"X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
|
|
222
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
223
|
+
}), requestOptions?.headers);
|
|
216
224
|
const _response = await core.fetcher({
|
|
217
225
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
218
226
|
(await core.Supplier.get(this._options.environment)) ??
|
|
219
227
|
environments.PlanqkApiEnvironment.Default, `datapools/${encodeURIComponent(id)}`),
|
|
220
228
|
method: "DELETE",
|
|
221
|
-
headers:
|
|
222
|
-
|
|
223
|
-
...(await this._getCustomAuthorizationHeaders()),
|
|
224
|
-
}), requestOptions?.headers),
|
|
229
|
+
headers: _headers,
|
|
230
|
+
queryParameters: requestOptions?.queryParams,
|
|
225
231
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
226
232
|
maxRetries: requestOptions?.maxRetries,
|
|
227
233
|
withCredentials: true,
|
|
@@ -265,7 +271,7 @@ class DataPools {
|
|
|
265
271
|
}
|
|
266
272
|
}
|
|
267
273
|
/**
|
|
268
|
-
* Get a list of all data pools for the current user.
|
|
274
|
+
* Get a list of all data pools for the current user or organization.
|
|
269
275
|
*
|
|
270
276
|
* @param {DataPools.RequestOptions} requestOptions - Request-specific configuration.
|
|
271
277
|
*
|
|
@@ -281,15 +287,17 @@ class DataPools {
|
|
|
281
287
|
return core.HttpResponsePromise.fromPromise(this.__getDataPools(requestOptions));
|
|
282
288
|
}
|
|
283
289
|
async __getDataPools(requestOptions) {
|
|
290
|
+
let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
291
|
+
"X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
|
|
292
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
293
|
+
}), requestOptions?.headers);
|
|
284
294
|
const _response = await core.fetcher({
|
|
285
295
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
286
296
|
(await core.Supplier.get(this._options.environment)) ??
|
|
287
297
|
environments.PlanqkApiEnvironment.Default, "datapools"),
|
|
288
298
|
method: "GET",
|
|
289
|
-
headers:
|
|
290
|
-
|
|
291
|
-
...(await this._getCustomAuthorizationHeaders()),
|
|
292
|
-
}), requestOptions?.headers),
|
|
299
|
+
headers: _headers,
|
|
300
|
+
queryParameters: requestOptions?.queryParams,
|
|
293
301
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
294
302
|
maxRetries: requestOptions?.maxRetries,
|
|
295
303
|
withCredentials: true,
|
|
@@ -351,16 +359,18 @@ class DataPools {
|
|
|
351
359
|
return core.HttpResponsePromise.fromPromise(this.__createDataPool(request, requestOptions));
|
|
352
360
|
}
|
|
353
361
|
async __createDataPool(request = {}, requestOptions) {
|
|
362
|
+
let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
363
|
+
"X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
|
|
364
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
365
|
+
}), requestOptions?.headers);
|
|
354
366
|
const _response = await core.fetcher({
|
|
355
367
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
356
368
|
(await core.Supplier.get(this._options.environment)) ??
|
|
357
369
|
environments.PlanqkApiEnvironment.Default, "datapools"),
|
|
358
370
|
method: "POST",
|
|
359
|
-
headers:
|
|
360
|
-
"X-OrganizationId": requestOptions?.organizationId,
|
|
361
|
-
...(await this._getCustomAuthorizationHeaders()),
|
|
362
|
-
}), requestOptions?.headers),
|
|
371
|
+
headers: _headers,
|
|
363
372
|
contentType: "application/json",
|
|
373
|
+
queryParameters: requestOptions?.queryParams,
|
|
364
374
|
requestType: "json",
|
|
365
375
|
body: request,
|
|
366
376
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -425,15 +435,17 @@ class DataPools {
|
|
|
425
435
|
return core.HttpResponsePromise.fromPromise(this.__getDataPoolFiles(id, requestOptions));
|
|
426
436
|
}
|
|
427
437
|
async __getDataPoolFiles(id, requestOptions) {
|
|
438
|
+
let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
439
|
+
"X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
|
|
440
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
441
|
+
}), requestOptions?.headers);
|
|
428
442
|
const _response = await core.fetcher({
|
|
429
443
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
430
444
|
(await core.Supplier.get(this._options.environment)) ??
|
|
431
445
|
environments.PlanqkApiEnvironment.Default, `datapools/${encodeURIComponent(id)}/files`),
|
|
432
446
|
method: "GET",
|
|
433
|
-
headers:
|
|
434
|
-
|
|
435
|
-
...(await this._getCustomAuthorizationHeaders()),
|
|
436
|
-
}), requestOptions?.headers),
|
|
447
|
+
headers: _headers,
|
|
448
|
+
queryParameters: requestOptions?.queryParams,
|
|
437
449
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
438
450
|
maxRetries: requestOptions?.maxRetries,
|
|
439
451
|
withCredentials: true,
|
|
@@ -490,6 +502,7 @@ class DataPools {
|
|
|
490
502
|
* @throws {@link PlanqkApi.InternalServerError}
|
|
491
503
|
*
|
|
492
504
|
* @example
|
|
505
|
+
* import { createReadStream } from "fs";
|
|
493
506
|
* await client.dataPools.addDataPoolFile("id", {
|
|
494
507
|
* file: fs.createReadStream("/path/to/your/file")
|
|
495
508
|
* })
|
|
@@ -505,17 +518,18 @@ class DataPools {
|
|
|
505
518
|
const _request = await core.newFormData();
|
|
506
519
|
await _request.appendFile("file", request.file);
|
|
507
520
|
const _maybeEncodedRequest = await _request.getRequest();
|
|
521
|
+
let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
522
|
+
"X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
|
|
523
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
524
|
+
..._maybeEncodedRequest.headers,
|
|
525
|
+
}), requestOptions?.headers);
|
|
508
526
|
const _response = await core.fetcher({
|
|
509
527
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
510
528
|
(await core.Supplier.get(this._options.environment)) ??
|
|
511
529
|
environments.PlanqkApiEnvironment.Default, `datapools/${encodeURIComponent(id)}/files`),
|
|
512
530
|
method: "POST",
|
|
513
|
-
headers:
|
|
514
|
-
|
|
515
|
-
...(await this._getCustomAuthorizationHeaders()),
|
|
516
|
-
..._maybeEncodedRequest.headers,
|
|
517
|
-
}), requestOptions?.headers),
|
|
518
|
-
queryParameters: _queryParams,
|
|
531
|
+
headers: _headers,
|
|
532
|
+
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
|
519
533
|
requestType: "file",
|
|
520
534
|
duplex: _maybeEncodedRequest.duplex,
|
|
521
535
|
body: _maybeEncodedRequest.body,
|
|
@@ -574,15 +588,17 @@ class DataPools {
|
|
|
574
588
|
return core.HttpResponsePromise.fromPromise(this.__getDataPoolFile(id, fileId, requestOptions));
|
|
575
589
|
}
|
|
576
590
|
async __getDataPoolFile(id, fileId, requestOptions) {
|
|
591
|
+
let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
592
|
+
"X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
|
|
593
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
594
|
+
}), requestOptions?.headers);
|
|
577
595
|
const _response = await core.fetcher({
|
|
578
596
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
579
597
|
(await core.Supplier.get(this._options.environment)) ??
|
|
580
598
|
environments.PlanqkApiEnvironment.Default, `datapools/${encodeURIComponent(id)}/files/${encodeURIComponent(fileId)}`),
|
|
581
599
|
method: "GET",
|
|
582
|
-
headers:
|
|
583
|
-
|
|
584
|
-
...(await this._getCustomAuthorizationHeaders()),
|
|
585
|
-
}), requestOptions?.headers),
|
|
600
|
+
headers: _headers,
|
|
601
|
+
queryParameters: requestOptions?.queryParams,
|
|
586
602
|
responseType: "binary-response",
|
|
587
603
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
588
604
|
maxRetries: requestOptions?.maxRetries,
|
|
@@ -645,15 +661,17 @@ class DataPools {
|
|
|
645
661
|
return core.HttpResponsePromise.fromPromise(this.__deleteDataPoolFile(id, fileId, requestOptions));
|
|
646
662
|
}
|
|
647
663
|
async __deleteDataPoolFile(id, fileId, requestOptions) {
|
|
664
|
+
let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
665
|
+
"X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
|
|
666
|
+
...(await this._getCustomAuthorizationHeaders()),
|
|
667
|
+
}), requestOptions?.headers);
|
|
648
668
|
const _response = await core.fetcher({
|
|
649
669
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
650
670
|
(await core.Supplier.get(this._options.environment)) ??
|
|
651
671
|
environments.PlanqkApiEnvironment.Default, `datapools/${encodeURIComponent(id)}/files/${encodeURIComponent(fileId)}`),
|
|
652
672
|
method: "DELETE",
|
|
653
|
-
headers:
|
|
654
|
-
|
|
655
|
-
...(await this._getCustomAuthorizationHeaders()),
|
|
656
|
-
}), requestOptions?.headers),
|
|
673
|
+
headers: _headers,
|
|
674
|
+
queryParameters: requestOptions?.queryParams,
|
|
657
675
|
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
658
676
|
maxRetries: requestOptions?.maxRetries,
|
|
659
677
|
withCredentials: true,
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
* {}
|
|
7
7
|
*/
|
|
8
8
|
export interface UpdateDataPoolRequest {
|
|
9
|
+
/** The name of the data pool. Must be at least 3 characters and at most 255 characters long. */
|
|
9
10
|
name?: string;
|
|
11
|
+
/** Short description of the data pool. */
|
|
10
12
|
shortDescription?: string;
|
|
13
|
+
/** Detailed description of the data pool. */
|
|
11
14
|
description?: string;
|
|
12
15
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
export * as serviceJobs from "./serviceJobs/index.js";
|
|
1
2
|
export * as dataPools from "./dataPools/index.js";
|
|
3
|
+
export * as serviceExecutions from "./serviceExecutions/index.js";
|
|
4
|
+
export * from "./serviceJobs/client/requests/index.js";
|
|
2
5
|
export * from "./dataPools/client/requests/index.js";
|
|
@@ -36,6 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.dataPools = void 0;
|
|
39
|
+
exports.serviceExecutions = exports.dataPools = exports.serviceJobs = void 0;
|
|
40
|
+
exports.serviceJobs = __importStar(require("./serviceJobs/index.js"));
|
|
40
41
|
exports.dataPools = __importStar(require("./dataPools/index.js"));
|
|
42
|
+
exports.serviceExecutions = __importStar(require("./serviceExecutions/index.js"));
|
|
43
|
+
__exportStar(require("./serviceJobs/client/requests/index.js"), exports);
|
|
41
44
|
__exportStar(require("./dataPools/client/requests/index.js"), exports);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments.js";
|
|
5
|
+
import * as core from "../../../../core/index.js";
|
|
6
|
+
import * as PlanqkApi from "../../../index.js";
|
|
7
|
+
export declare namespace ServiceExecutions {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.PlanqkApiEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
13
|
+
/** Override the X-OrganizationId header */
|
|
14
|
+
organizationId?: core.Supplier<string | undefined>;
|
|
15
|
+
/** Additional headers to include in requests. */
|
|
16
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
17
|
+
}
|
|
18
|
+
interface RequestOptions {
|
|
19
|
+
/** The maximum time to wait for a response in seconds. */
|
|
20
|
+
timeoutInSeconds?: number;
|
|
21
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
22
|
+
maxRetries?: number;
|
|
23
|
+
/** A hook to abort the request. */
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
/** Override the X-OrganizationId header */
|
|
26
|
+
organizationId?: string | undefined;
|
|
27
|
+
/** Additional query string parameters to include in the request. */
|
|
28
|
+
queryParams?: Record<string, unknown>;
|
|
29
|
+
/** Additional headers to include in the request. */
|
|
30
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Track status, costs, logs, metrics, and results of your service executions.
|
|
35
|
+
*/
|
|
36
|
+
export declare class ServiceExecutions {
|
|
37
|
+
protected readonly _options: ServiceExecutions.Options;
|
|
38
|
+
constructor(_options: ServiceExecutions.Options);
|
|
39
|
+
/**
|
|
40
|
+
* Get a specific service execution (identified by its ID).
|
|
41
|
+
*
|
|
42
|
+
* @param {string} id
|
|
43
|
+
* @param {ServiceExecutions.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link PlanqkApi.UnauthorizedError}
|
|
46
|
+
* @throws {@link PlanqkApi.ForbiddenError}
|
|
47
|
+
* @throws {@link PlanqkApi.NotFoundError}
|
|
48
|
+
* @throws {@link PlanqkApi.InternalServerError}
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* await client.serviceExecutions.getServiceExecution("id")
|
|
52
|
+
*/
|
|
53
|
+
getServiceExecution(id: string, requestOptions?: ServiceExecutions.RequestOptions): core.HttpResponsePromise<string>;
|
|
54
|
+
private __getServiceExecution;
|
|
55
|
+
/**
|
|
56
|
+
* Check if the tenant has view permission for a specific service execution (identified by its ID).
|
|
57
|
+
*
|
|
58
|
+
* @param {string} id
|
|
59
|
+
* @param {ServiceExecutions.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link PlanqkApi.UnauthorizedError}
|
|
62
|
+
* @throws {@link PlanqkApi.ForbiddenError}
|
|
63
|
+
* @throws {@link PlanqkApi.NotFoundError}
|
|
64
|
+
* @throws {@link PlanqkApi.InternalServerError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.serviceExecutions.headServiceExecution("id")
|
|
68
|
+
*/
|
|
69
|
+
headServiceExecution(id: string, requestOptions?: ServiceExecutions.RequestOptions): core.HttpResponsePromise<Headers>;
|
|
70
|
+
private __headServiceExecution;
|
|
71
|
+
/**
|
|
72
|
+
* Get resource usage metrics for a specific service execution (identified by its ID).
|
|
73
|
+
*
|
|
74
|
+
* @param {string} id
|
|
75
|
+
* @param {ServiceExecutions.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link PlanqkApi.UnauthorizedError}
|
|
78
|
+
* @throws {@link PlanqkApi.ForbiddenError}
|
|
79
|
+
* @throws {@link PlanqkApi.NotFoundError}
|
|
80
|
+
* @throws {@link PlanqkApi.InternalServerError}
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await client.serviceExecutions.getServiceExecutionMetrics("id")
|
|
84
|
+
*/
|
|
85
|
+
getServiceExecutionMetrics(id: string, requestOptions?: ServiceExecutions.RequestOptions): core.HttpResponsePromise<PlanqkApi.ServiceExecutionMetrics>;
|
|
86
|
+
private __getServiceExecutionMetrics;
|
|
87
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
88
|
+
"X-Auth-Token": string;
|
|
89
|
+
}>;
|
|
90
|
+
}
|