@planqk/planqk-api-sdk 1.3.6 → 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/.fossa.yml +1 -0
- package/.gitlab-ci.yml +21 -14
- 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 +319 -0
- 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/src/sdk/core/file.ts +0 -11
- /package/dist/sdk/{core/file.js → api/resources/serviceExecutions/client/index.js} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A file that can be uploaded. Can be a file-like object (stream, buffer, blob, etc.),
|
|
3
|
+
* a path to a file, or an object with a file-like object and metadata.
|
|
4
|
+
*/
|
|
5
|
+
export type Uploadable = Uploadable.FileLike | Uploadable.FromPath | Uploadable.WithMetadata;
|
|
6
|
+
export declare namespace Uploadable {
|
|
7
|
+
/**
|
|
8
|
+
* Various file-like objects that can be used to upload a file.
|
|
9
|
+
*/
|
|
10
|
+
type FileLike = ArrayBuffer | ArrayBufferLike | ArrayBufferView | Uint8Array | import("buffer").Buffer | import("buffer").Blob | import("buffer").File | import("stream").Readable | import("stream/web").ReadableStream | globalThis.Blob | globalThis.File | ReadableStream;
|
|
11
|
+
/**
|
|
12
|
+
* A file path with optional metadata, used for uploading a file from the file system.
|
|
13
|
+
*/
|
|
14
|
+
type FromPath = {
|
|
15
|
+
/** The path to the file to upload */
|
|
16
|
+
path: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional override for the file name (defaults to basename of path).
|
|
19
|
+
* This is used to set the `Content-Disposition` header in upload requests.
|
|
20
|
+
*/
|
|
21
|
+
filename?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
|
|
24
|
+
* This is used to set the `Content-Type` header in upload requests.
|
|
25
|
+
*/
|
|
26
|
+
contentType?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Optional file size in bytes.
|
|
29
|
+
* If not provided, the file size will be determined from the file system.
|
|
30
|
+
* The content length is used to set the `Content-Length` header in upload requests.
|
|
31
|
+
*/
|
|
32
|
+
contentLength?: number;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* A file-like object with metadata, used for uploading files.
|
|
36
|
+
*/
|
|
37
|
+
type WithMetadata = {
|
|
38
|
+
/** The file data */
|
|
39
|
+
data: FileLike;
|
|
40
|
+
/**
|
|
41
|
+
* Optional override for the file name (defaults to basename of path).
|
|
42
|
+
* This is used to set the `Content-Disposition` header in upload requests.
|
|
43
|
+
*/
|
|
44
|
+
filename?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Optional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
|
|
47
|
+
* This is used to set the `Content-Type` header in upload requests.
|
|
48
|
+
*
|
|
49
|
+
* If not provided, the content type may be determined from the data itself.
|
|
50
|
+
* * If the data is a `File`, `Blob`, or similar, the content type will be determined from the file itself, if the type is set.
|
|
51
|
+
* * Any other data type will not have a content type set, and the upload request will use `Content-Type: application/octet-stream` instead.
|
|
52
|
+
*/
|
|
53
|
+
contentType?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Optional file size in bytes.
|
|
56
|
+
* The content length is used to set the `Content-Length` header in upload requests.
|
|
57
|
+
* If the content length is not provided and cannot be determined, the upload request will not include the `Content-Length` header, but will use `Transfer-Encoding: chunked` instead.
|
|
58
|
+
*
|
|
59
|
+
* If not provided, the file size will be determined depending on the data type.
|
|
60
|
+
* * If the data is of type `fs.ReadStream` (`createReadStream`), the size will be determined from the file system.
|
|
61
|
+
* * If the data is a `Buffer`, `ArrayBuffer`, `Uint8Array`, `Blob`, `File`, or similar, the size will be determined from the data itself.
|
|
62
|
+
* * If the data is a `Readable` or `ReadableStream`, the size will not be determined.
|
|
63
|
+
*/
|
|
64
|
+
contentLength?: number;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -123,19 +123,28 @@ class FormDataWrapper {
|
|
|
123
123
|
async convertToBlob(value) {
|
|
124
124
|
if (isStreamLike(value) || isReadableStream(value)) {
|
|
125
125
|
const buffer = await streamToBuffer(value);
|
|
126
|
-
|
|
126
|
+
// Create a new Uint8Array to ensure ArrayBuffer compatibility
|
|
127
|
+
const uint8Array = new Uint8Array(buffer.length);
|
|
128
|
+
uint8Array.set(buffer);
|
|
129
|
+
return new Blob([uint8Array]);
|
|
127
130
|
}
|
|
128
131
|
if (value instanceof Blob) {
|
|
129
132
|
return value;
|
|
130
133
|
}
|
|
131
134
|
if (isBuffer(value)) {
|
|
132
|
-
|
|
135
|
+
// Create a new Uint8Array to ensure ArrayBuffer compatibility
|
|
136
|
+
const uint8Array = new Uint8Array(value.length);
|
|
137
|
+
uint8Array.set(value);
|
|
138
|
+
return new Blob([uint8Array]);
|
|
133
139
|
}
|
|
134
140
|
if (value instanceof ArrayBuffer) {
|
|
135
141
|
return new Blob([value]);
|
|
136
142
|
}
|
|
137
143
|
if (isArrayBufferView(value)) {
|
|
138
|
-
|
|
144
|
+
// Create a new Uint8Array to ensure ArrayBuffer compatibility
|
|
145
|
+
const uint8Array = new Uint8Array(value.byteLength);
|
|
146
|
+
uint8Array.set(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));
|
|
147
|
+
return new Blob([uint8Array]);
|
|
139
148
|
}
|
|
140
149
|
if (typeof value === "string") {
|
|
141
150
|
return new Blob([value]);
|
package/dist/sdk/core/index.d.ts
CHANGED
package/dist/sdk/core/index.js
CHANGED
|
@@ -36,9 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.url = void 0;
|
|
39
|
+
exports.file = exports.url = void 0;
|
|
40
40
|
__exportStar(require("./fetcher/index.js"), exports);
|
|
41
41
|
__exportStar(require("./runtime/index.js"), exports);
|
|
42
42
|
exports.url = __importStar(require("./url/index.js"));
|
|
43
43
|
__exportStar(require("./form-data-utils/index.js"), exports);
|
|
44
|
-
|
|
44
|
+
exports.file = __importStar(require("./file/index.js"));
|
|
@@ -5,6 +5,9 @@ function join(base, ...segments) {
|
|
|
5
5
|
if (!base) {
|
|
6
6
|
return "";
|
|
7
7
|
}
|
|
8
|
+
if (segments.length === 0) {
|
|
9
|
+
return base;
|
|
10
|
+
}
|
|
8
11
|
if (base.includes("://")) {
|
|
9
12
|
let url;
|
|
10
13
|
try {
|
|
@@ -14,24 +17,37 @@ function join(base, ...segments) {
|
|
|
14
17
|
// Fallback to path joining if URL is malformed
|
|
15
18
|
return joinPath(base, ...segments);
|
|
16
19
|
}
|
|
20
|
+
const lastSegment = segments[segments.length - 1];
|
|
21
|
+
const shouldPreserveTrailingSlash = lastSegment && lastSegment.endsWith("/");
|
|
17
22
|
for (const segment of segments) {
|
|
18
23
|
const cleanSegment = trimSlashes(segment);
|
|
19
24
|
if (cleanSegment) {
|
|
20
25
|
url.pathname = joinPathSegments(url.pathname, cleanSegment);
|
|
21
26
|
}
|
|
22
27
|
}
|
|
28
|
+
if (shouldPreserveTrailingSlash && !url.pathname.endsWith("/")) {
|
|
29
|
+
url.pathname += "/";
|
|
30
|
+
}
|
|
23
31
|
return url.toString();
|
|
24
32
|
}
|
|
25
33
|
return joinPath(base, ...segments);
|
|
26
34
|
}
|
|
27
35
|
function joinPath(base, ...segments) {
|
|
36
|
+
if (segments.length === 0) {
|
|
37
|
+
return base;
|
|
38
|
+
}
|
|
28
39
|
let result = base;
|
|
40
|
+
const lastSegment = segments[segments.length - 1];
|
|
41
|
+
const shouldPreserveTrailingSlash = lastSegment && lastSegment.endsWith("/");
|
|
29
42
|
for (const segment of segments) {
|
|
30
43
|
const cleanSegment = trimSlashes(segment);
|
|
31
44
|
if (cleanSegment) {
|
|
32
45
|
result = joinPathSegments(result, cleanSegment);
|
|
33
46
|
}
|
|
34
47
|
}
|
|
48
|
+
if (shouldPreserveTrailingSlash && !result.endsWith("/")) {
|
|
49
|
+
result += "/";
|
|
50
|
+
}
|
|
35
51
|
return result;
|
|
36
52
|
}
|
|
37
53
|
function joinPathSegments(left, right) {
|
|
@@ -43,7 +59,11 @@ function joinPathSegments(left, right) {
|
|
|
43
59
|
function trimSlashes(str) {
|
|
44
60
|
if (!str)
|
|
45
61
|
return str;
|
|
46
|
-
let start =
|
|
47
|
-
let end = str.
|
|
48
|
-
|
|
62
|
+
let start = 0;
|
|
63
|
+
let end = str.length;
|
|
64
|
+
if (str.startsWith("/"))
|
|
65
|
+
start = 1;
|
|
66
|
+
if (str.endsWith("/"))
|
|
67
|
+
end = str.length - 1;
|
|
68
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
49
69
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./core/exports.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./core/exports.js"), exports);
|
package/dist/sdk/index.d.ts
CHANGED
package/dist/sdk/index.js
CHANGED
|
@@ -32,6 +32,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
39
|
exports.PlanqkApiEnvironment = exports.PlanqkApiClient = exports.PlanqkApiTimeoutError = exports.PlanqkApiError = exports.PlanqkApi = void 0;
|
|
37
40
|
exports.PlanqkApi = __importStar(require("./api/index.js"));
|
|
@@ -42,3 +45,4 @@ var Client_js_1 = require("./Client.js");
|
|
|
42
45
|
Object.defineProperty(exports, "PlanqkApiClient", { enumerable: true, get: function () { return Client_js_1.PlanqkApiClient; } });
|
|
43
46
|
var environments_js_1 = require("./environments.js");
|
|
44
47
|
Object.defineProperty(exports, "PlanqkApiEnvironment", { enumerable: true, get: function () { return environments_js_1.PlanqkApiEnvironment; } });
|
|
48
|
+
__exportStar(require("./exports.js"), exports);
|
package/fern/fern.config.json
CHANGED
package/fern/generators.yml
CHANGED
|
@@ -6,8 +6,8 @@ default-group: local
|
|
|
6
6
|
groups:
|
|
7
7
|
local:
|
|
8
8
|
generators:
|
|
9
|
-
- name: fernapi/fern-typescript-
|
|
10
|
-
version: 2.
|
|
9
|
+
- name: fernapi/fern-typescript-sdk
|
|
10
|
+
version: 2.10.0
|
|
11
11
|
output:
|
|
12
12
|
location: local-file-system
|
|
13
13
|
path: ../generated/typescript
|
|
@@ -18,8 +18,14 @@ groups:
|
|
|
18
18
|
skipResponseValidation: true
|
|
19
19
|
noSerdeLayer: true
|
|
20
20
|
- name: fernapi/fern-python-sdk
|
|
21
|
-
version: 4.
|
|
21
|
+
version: 4.28.0
|
|
22
22
|
output:
|
|
23
23
|
location: local-file-system
|
|
24
24
|
path: ../generated/python
|
|
25
25
|
config: {}
|
|
26
|
+
- name: fernapi/fern-postman
|
|
27
|
+
version: 0.0.45
|
|
28
|
+
output:
|
|
29
|
+
location: local-file-system
|
|
30
|
+
path: ../generated/postman
|
|
31
|
+
config: {}
|