@planqk/planqk-api-sdk 1.2.0 → 1.3.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/.env.template +2 -1
- package/.gitlab-ci.yml +1 -0
- package/README-node.md +13 -0
- package/README-python.md +13 -0
- package/README.md +6 -49
- package/apps/python-test-app/main.py +159 -0
- package/apps/python-test-app/my_file.txt +1 -0
- package/apps/ts-test-app/index.ts +140 -0
- package/apps/ts-test-app/package-lock.json +693 -0
- package/apps/ts-test-app/package.json +19 -0
- package/apps/ts-test-app/test-file.txt +1 -0
- package/apps/ts-test-app/tsconfig.json +11 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.js +4 -31
- package/dist/{Client.d.ts → sdk/Client.d.ts} +2 -5
- package/dist/{Client.js → sdk/Client.js} +1 -6
- package/dist/{api → sdk/api}/resources/dataPools/client/Client.d.ts +3 -3
- package/dist/{api → sdk/api}/resources/dataPools/client/Client.js +1 -1
- package/dist/sdk/api/resources/index.d.ts +2 -0
- package/dist/{api → sdk/api}/resources/index.js +1 -3
- package/dist/sdk/api/types/index.d.ts +3 -0
- package/dist/{api/resources/authentication → sdk/api}/types/index.js +3 -1
- package/dist/sdk/index.d.ts +4 -0
- package/dist/sdk/index.js +44 -0
- package/fern/fern.config.json +1 -1
- package/fern/openapi/openapi.json +2 -202
- package/package.json +3 -4
- package/planqk/api/_version.py +1 -1
- package/pyproject.toml +2 -6
- package/src/index.test.ts +6 -5
- package/src/index.ts +1 -4
- package/src/{Client.ts → sdk/Client.ts} +2 -8
- package/src/{api → sdk/api}/resources/dataPools/client/Client.ts +2 -2
- package/src/sdk/api/resources/index.ts +2 -0
- package/src/sdk/api/types/index.ts +3 -0
- package/src/sdk/index.ts +4 -0
- package/uv.lock +320 -297
- package/dist/api/resources/authentication/client/Client.d.ts +0 -55
- package/dist/api/resources/authentication/client/Client.js +0 -126
- package/dist/api/resources/authentication/client/index.d.ts +0 -1
- package/dist/api/resources/authentication/index.d.ts +0 -2
- package/dist/api/resources/authentication/index.js +0 -18
- package/dist/api/resources/authentication/types/AuthorizeResponse.d.ts +0 -5
- package/dist/api/resources/authentication/types/AuthorizeResponse.js +0 -5
- package/dist/api/resources/authentication/types/index.d.ts +0 -1
- package/dist/api/resources/dataPools/client/requests/index.js +0 -2
- package/dist/api/resources/index.d.ts +0 -4
- package/dist/api/types/AccessToken.d.ts +0 -10
- package/dist/api/types/AccessToken.js +0 -5
- package/dist/api/types/OrganizationMembership.d.ts +0 -22
- package/dist/api/types/OrganizationMembership.js +0 -19
- package/dist/api/types/PersonalAccessTokenPrincipal.d.ts +0 -18
- package/dist/api/types/PersonalAccessTokenPrincipal.js +0 -14
- package/dist/api/types/ServiceExecution.d.ts +0 -20
- package/dist/api/types/ServiceExecution.js +0 -16
- package/dist/api/types/ServiceExecutionTokenPrincipal.d.ts +0 -8
- package/dist/api/types/ServiceExecutionTokenPrincipal.js +0 -5
- package/dist/api/types/UserContext.d.ts +0 -24
- package/dist/api/types/UserContext.js +0 -19
- package/dist/api/types/index.d.ts +0 -9
- package/dist/api/types/index.js +0 -25
- package/src/api/resources/authentication/client/Client.ts +0 -134
- package/src/api/resources/authentication/client/index.ts +0 -1
- package/src/api/resources/authentication/index.ts +0 -2
- package/src/api/resources/authentication/types/AuthorizeResponse.ts +0 -7
- package/src/api/resources/authentication/types/index.ts +0 -1
- package/src/api/resources/index.ts +0 -4
- package/src/api/types/AccessToken.ts +0 -11
- package/src/api/types/OrganizationMembership.ts +0 -24
- package/src/api/types/PersonalAccessTokenPrincipal.ts +0 -21
- package/src/api/types/ServiceExecution.ts +0 -22
- package/src/api/types/ServiceExecutionTokenPrincipal.ts +0 -10
- package/src/api/types/UserContext.ts +0 -27
- package/src/api/types/index.ts +0 -9
- package/dist/{api → sdk/api}/errors/BadRequestError.d.ts +0 -0
- package/dist/{api → sdk/api}/errors/BadRequestError.js +0 -0
- package/dist/{api → sdk/api}/errors/ForbiddenError.d.ts +0 -0
- package/dist/{api → sdk/api}/errors/ForbiddenError.js +0 -0
- package/dist/{api → sdk/api}/errors/InternalServerError.d.ts +0 -0
- package/dist/{api → sdk/api}/errors/InternalServerError.js +0 -0
- package/dist/{api → sdk/api}/errors/NotFoundError.d.ts +0 -0
- package/dist/{api → sdk/api}/errors/NotFoundError.js +0 -0
- package/dist/{api → sdk/api}/errors/UnauthorizedError.d.ts +0 -0
- package/dist/{api → sdk/api}/errors/UnauthorizedError.js +0 -0
- package/dist/{api → sdk/api}/errors/index.d.ts +0 -0
- package/dist/{api → sdk/api}/errors/index.js +0 -0
- package/dist/{api → sdk/api}/index.d.ts +1 -1
- package/dist/{api → sdk/api}/index.js +1 -1
- package/dist/{api → sdk/api}/resources/dataPools/client/index.d.ts +0 -0
- package/dist/{api → sdk/api}/resources/dataPools/client/index.js +0 -0
- package/dist/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.d.ts +0 -0
- package/dist/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.js +0 -0
- package/dist/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.d.ts +0 -0
- package/dist/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.js +0 -0
- package/dist/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.d.ts +0 -0
- package/dist/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.js +0 -0
- package/dist/{api → sdk/api}/resources/dataPools/client/requests/index.d.ts +0 -0
- package/dist/{api/resources/authentication/client → sdk/api/resources/dataPools/client/requests}/index.js +0 -0
- package/dist/{api → sdk/api}/resources/dataPools/index.d.ts +0 -0
- package/dist/{api → sdk/api}/resources/dataPools/index.js +0 -0
- package/dist/{api → sdk/api}/types/DataPoolDto.d.ts +0 -0
- package/dist/{api → sdk/api}/types/DataPoolDto.js +0 -0
- package/dist/{api → sdk/api}/types/DataPoolFileDto.d.ts +0 -0
- package/dist/{api → sdk/api}/types/DataPoolFileDto.js +0 -0
- package/dist/{api → sdk/api}/types/OauthScope.d.ts +0 -0
- package/dist/{api → sdk/api}/types/OauthScope.js +0 -0
- package/dist/{core → sdk/core}/fetcher/APIResponse.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/APIResponse.js +0 -0
- package/dist/{core → sdk/core}/fetcher/BinaryResponse.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/BinaryResponse.js +0 -0
- package/dist/{core → sdk/core}/fetcher/Fetcher.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/Fetcher.js +0 -0
- package/dist/{core → sdk/core}/fetcher/Headers.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/Headers.js +0 -0
- package/dist/{core → sdk/core}/fetcher/HttpResponsePromise.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/HttpResponsePromise.js +0 -0
- package/dist/{core → sdk/core}/fetcher/RawResponse.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/RawResponse.js +0 -0
- package/dist/{core → sdk/core}/fetcher/ResponseWithBody.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/ResponseWithBody.js +0 -0
- package/dist/{core → sdk/core}/fetcher/Supplier.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/Supplier.js +0 -0
- package/dist/{core → sdk/core}/fetcher/createRequestUrl.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/createRequestUrl.js +0 -0
- package/dist/{core → sdk/core}/fetcher/getErrorResponseBody.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/getErrorResponseBody.js +0 -0
- package/dist/{core → sdk/core}/fetcher/getFetchFn.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/getFetchFn.js +0 -0
- package/dist/{core → sdk/core}/fetcher/getHeader.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/getHeader.js +0 -0
- package/dist/{core → sdk/core}/fetcher/getRequestBody.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/getRequestBody.js +0 -0
- package/dist/{core → sdk/core}/fetcher/getResponseBody.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/getResponseBody.js +0 -0
- package/dist/{core → sdk/core}/fetcher/index.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/index.js +0 -0
- package/dist/{core → sdk/core}/fetcher/makeRequest.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/makeRequest.js +0 -0
- package/dist/{core → sdk/core}/fetcher/requestWithRetries.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/requestWithRetries.js +0 -0
- package/dist/{core → sdk/core}/fetcher/signals.d.ts +0 -0
- package/dist/{core → sdk/core}/fetcher/signals.js +0 -0
- package/dist/{core → sdk/core}/file.d.ts +0 -0
- package/dist/{core → sdk/core}/file.js +0 -0
- package/dist/{core → sdk/core}/form-data-utils/FormDataWrapper.d.ts +0 -0
- package/dist/{core → sdk/core}/form-data-utils/FormDataWrapper.js +0 -0
- package/dist/{core → sdk/core}/form-data-utils/encodeAsFormParameter.d.ts +0 -0
- package/dist/{core → sdk/core}/form-data-utils/encodeAsFormParameter.js +0 -0
- package/dist/{core → sdk/core}/form-data-utils/index.d.ts +0 -0
- package/dist/{core → sdk/core}/form-data-utils/index.js +0 -0
- package/dist/{core → sdk/core}/headers.d.ts +0 -0
- package/dist/{core → sdk/core}/headers.js +0 -0
- package/dist/{core → sdk/core}/index.d.ts +0 -0
- package/dist/{core → sdk/core}/index.js +0 -0
- package/dist/{core → sdk/core}/json.d.ts +0 -0
- package/dist/{core → sdk/core}/json.js +0 -0
- package/dist/{core → sdk/core}/runtime/index.d.ts +0 -0
- package/dist/{core → sdk/core}/runtime/index.js +0 -0
- package/dist/{core → sdk/core}/runtime/runtime.d.ts +0 -0
- package/dist/{core → sdk/core}/runtime/runtime.js +0 -0
- package/dist/{core → sdk/core}/url/index.d.ts +0 -0
- package/dist/{core → sdk/core}/url/index.js +0 -0
- package/dist/{core → sdk/core}/url/join.d.ts +0 -0
- package/dist/{core → sdk/core}/url/join.js +0 -0
- package/dist/{core → sdk/core}/url/qs.d.ts +0 -0
- package/dist/{core → sdk/core}/url/qs.js +0 -0
- package/dist/{environments.d.ts → sdk/environments.d.ts} +0 -0
- package/dist/{environments.js → sdk/environments.js} +0 -0
- package/dist/{errors → sdk/errors}/PlanqkApiError.d.ts +0 -0
- package/dist/{errors → sdk/errors}/PlanqkApiError.js +0 -0
- package/dist/{errors → sdk/errors}/PlanqkApiTimeoutError.d.ts +0 -0
- package/dist/{errors → sdk/errors}/PlanqkApiTimeoutError.js +0 -0
- package/dist/{errors → sdk/errors}/index.d.ts +0 -0
- package/dist/{errors → sdk/errors}/index.js +0 -0
- package/src/{api → sdk/api}/errors/BadRequestError.ts +0 -0
- package/src/{api → sdk/api}/errors/ForbiddenError.ts +0 -0
- package/src/{api → sdk/api}/errors/InternalServerError.ts +0 -0
- package/src/{api → sdk/api}/errors/NotFoundError.ts +0 -0
- package/src/{api → sdk/api}/errors/UnauthorizedError.ts +0 -0
- package/src/{api → sdk/api}/errors/index.ts +0 -0
- package/src/{api → sdk/api}/index.ts +1 -1
- /package/src/{api → sdk/api}/resources/dataPools/client/index.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/AddDataPoolFileRequest.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/CreateDataPoolRequest.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/UpdateDataPoolRequest.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/client/requests/index.ts +0 -0
- /package/src/{api → sdk/api}/resources/dataPools/index.ts +0 -0
- /package/src/{api → sdk/api}/types/DataPoolDto.ts +0 -0
- /package/src/{api → sdk/api}/types/DataPoolFileDto.ts +0 -0
- /package/src/{api → sdk/api}/types/OauthScope.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/APIResponse.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/BinaryResponse.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/Fetcher.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/Headers.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/HttpResponsePromise.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/RawResponse.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/ResponseWithBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/Supplier.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/createRequestUrl.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getErrorResponseBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getFetchFn.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getHeader.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getRequestBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/getResponseBody.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/index.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/makeRequest.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/requestWithRetries.ts +0 -0
- /package/src/{core → sdk/core}/fetcher/signals.ts +0 -0
- /package/src/{core → sdk/core}/file.ts +0 -0
- /package/src/{core → sdk/core}/form-data-utils/FormDataWrapper.ts +0 -0
- /package/src/{core → sdk/core}/form-data-utils/encodeAsFormParameter.ts +0 -0
- /package/src/{core → sdk/core}/form-data-utils/index.ts +0 -0
- /package/src/{core → sdk/core}/headers.ts +0 -0
- /package/src/{core → sdk/core}/index.ts +0 -0
- /package/src/{core → sdk/core}/json.ts +0 -0
- /package/src/{core → sdk/core}/runtime/index.ts +0 -0
- /package/src/{core → sdk/core}/runtime/runtime.ts +0 -0
- /package/src/{core → sdk/core}/url/index.ts +0 -0
- /package/src/{core → sdk/core}/url/join.ts +0 -0
- /package/src/{core → sdk/core}/url/qs.ts +0 -0
- /package/src/{environments.ts → sdk/environments.ts} +0 -0
- /package/src/{errors → sdk/errors}/PlanqkApiError.ts +0 -0
- /package/src/{errors → sdk/errors}/PlanqkApiTimeoutError.ts +0 -0
- /package/src/{errors → sdk/errors}/index.ts +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ts-test-app",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.ts",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "npx tsc && node dist/index.js",
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"description": "",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@planqk/planqk-api-sdk": "^1.2.0",
|
|
14
|
+
"@types/node": "^20.14.10"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"typescript": "^5.8.3"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This is a test file for the PlanQK API SDK.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -10,35 +10,8 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
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
|
+
};
|
|
35
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
|
|
37
|
-
exports.PlanqkApi = __importStar(require("./api/index.js"));
|
|
38
|
-
var index_js_1 = require("./errors/index.js");
|
|
39
|
-
Object.defineProperty(exports, "PlanqkApiError", { enumerable: true, get: function () { return index_js_1.PlanqkApiError; } });
|
|
40
|
-
Object.defineProperty(exports, "PlanqkApiTimeoutError", { enumerable: true, get: function () { return index_js_1.PlanqkApiTimeoutError; } });
|
|
41
|
-
var Client_js_1 = require("./Client.js");
|
|
42
|
-
Object.defineProperty(exports, "PlanqkApiClient", { enumerable: true, get: function () { return Client_js_1.PlanqkApiClient; } });
|
|
43
|
-
var environments_js_1 = require("./environments.js");
|
|
44
|
-
Object.defineProperty(exports, "PlanqkApiEnvironment", { enumerable: true, get: function () { return environments_js_1.PlanqkApiEnvironment; } });
|
|
17
|
+
__exportStar(require("./sdk"), exports);
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
import * as environments from "./environments.js";
|
|
5
5
|
import * as core from "./core/index.js";
|
|
6
6
|
import { DataPools } from "./api/resources/dataPools/client/Client.js";
|
|
7
|
-
import { Authentication } from "./api/resources/authentication/client/Client.js";
|
|
8
7
|
export declare namespace PlanqkApiClient {
|
|
9
8
|
interface Options {
|
|
10
9
|
environment?: core.Supplier<environments.PlanqkApiEnvironment | string>;
|
|
11
10
|
/** Specify a custom URL to connect the client to. */
|
|
12
11
|
baseUrl?: core.Supplier<string>;
|
|
13
|
-
apiKey
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
14
13
|
/** Override the X-OrganizationId header */
|
|
15
14
|
organizationId?: core.Supplier<string | undefined>;
|
|
16
15
|
/** Additional headers to include in requests. */
|
|
@@ -32,8 +31,6 @@ export declare namespace PlanqkApiClient {
|
|
|
32
31
|
export declare class PlanqkApiClient {
|
|
33
32
|
protected readonly _options: PlanqkApiClient.Options;
|
|
34
33
|
protected _dataPools: DataPools | undefined;
|
|
35
|
-
|
|
36
|
-
constructor(_options?: PlanqkApiClient.Options);
|
|
34
|
+
constructor(_options: PlanqkApiClient.Options);
|
|
37
35
|
get dataPools(): DataPools;
|
|
38
|
-
get authentication(): Authentication;
|
|
39
36
|
}
|
|
@@ -40,12 +40,10 @@ exports.PlanqkApiClient = void 0;
|
|
|
40
40
|
const core = __importStar(require("./core/index.js"));
|
|
41
41
|
const headers_js_1 = require("./core/headers.js");
|
|
42
42
|
const Client_js_1 = require("./api/resources/dataPools/client/Client.js");
|
|
43
|
-
const Client_js_2 = require("./api/resources/authentication/client/Client.js");
|
|
44
43
|
class PlanqkApiClient {
|
|
45
44
|
_options;
|
|
46
45
|
_dataPools;
|
|
47
|
-
|
|
48
|
-
constructor(_options = {}) {
|
|
46
|
+
constructor(_options) {
|
|
49
47
|
this._options = {
|
|
50
48
|
..._options,
|
|
51
49
|
headers: (0, headers_js_1.mergeHeaders)({
|
|
@@ -59,8 +57,5 @@ class PlanqkApiClient {
|
|
|
59
57
|
get dataPools() {
|
|
60
58
|
return (this._dataPools ??= new Client_js_1.DataPools(this._options));
|
|
61
59
|
}
|
|
62
|
-
get authentication() {
|
|
63
|
-
return (this._authentication ??= new Client_js_2.Authentication(this._options));
|
|
64
|
-
}
|
|
65
60
|
}
|
|
66
61
|
exports.PlanqkApiClient = PlanqkApiClient;
|
|
@@ -9,7 +9,7 @@ export declare namespace DataPools {
|
|
|
9
9
|
environment?: core.Supplier<environments.PlanqkApiEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
13
13
|
/** Override the X-OrganizationId header */
|
|
14
14
|
organizationId?: core.Supplier<string | undefined>;
|
|
15
15
|
/** Additional headers to include in requests. */
|
|
@@ -33,7 +33,7 @@ export declare namespace DataPools {
|
|
|
33
33
|
*/
|
|
34
34
|
export declare class DataPools {
|
|
35
35
|
protected readonly _options: DataPools.Options;
|
|
36
|
-
constructor(_options
|
|
36
|
+
constructor(_options: DataPools.Options);
|
|
37
37
|
/**
|
|
38
38
|
* Get a specific data pool (identified by its ID).
|
|
39
39
|
*
|
|
@@ -179,6 +179,6 @@ export declare class DataPools {
|
|
|
179
179
|
deleteDataPoolFile(id: string, fileId: string, requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<void>;
|
|
180
180
|
private __deleteDataPoolFile;
|
|
181
181
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
182
|
-
"X-Auth-Token": string
|
|
182
|
+
"X-Auth-Token": string;
|
|
183
183
|
}>;
|
|
184
184
|
}
|
|
@@ -36,8 +36,6 @@ 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 =
|
|
40
|
-
exports.authentication = __importStar(require("./authentication/index.js"));
|
|
41
|
-
__exportStar(require("./authentication/types/index.js"), exports);
|
|
39
|
+
exports.dataPools = void 0;
|
|
42
40
|
exports.dataPools = __importStar(require("./dataPools/index.js"));
|
|
43
41
|
__exportStar(require("./dataPools/client/requests/index.js"), exports);
|
|
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./OauthScope.js"), exports);
|
|
18
|
+
__exportStar(require("./DataPoolDto.js"), exports);
|
|
19
|
+
__exportStar(require("./DataPoolFileDto.js"), exports);
|
|
@@ -0,0 +1,44 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PlanqkApiEnvironment = exports.PlanqkApiClient = exports.PlanqkApiTimeoutError = exports.PlanqkApiError = exports.PlanqkApi = void 0;
|
|
37
|
+
exports.PlanqkApi = __importStar(require("./api/index.js"));
|
|
38
|
+
var index_js_1 = require("./errors/index.js");
|
|
39
|
+
Object.defineProperty(exports, "PlanqkApiError", { enumerable: true, get: function () { return index_js_1.PlanqkApiError; } });
|
|
40
|
+
Object.defineProperty(exports, "PlanqkApiTimeoutError", { enumerable: true, get: function () { return index_js_1.PlanqkApiTimeoutError; } });
|
|
41
|
+
var Client_js_1 = require("./Client.js");
|
|
42
|
+
Object.defineProperty(exports, "PlanqkApiClient", { enumerable: true, get: function () { return Client_js_1.PlanqkApiClient; } });
|
|
43
|
+
var environments_js_1 = require("./environments.js");
|
|
44
|
+
Object.defineProperty(exports, "PlanqkApiEnvironment", { enumerable: true, get: function () { return environments_js_1.PlanqkApiEnvironment; } });
|
package/fern/fern.config.json
CHANGED
|
@@ -17,10 +17,6 @@
|
|
|
17
17
|
}
|
|
18
18
|
],
|
|
19
19
|
"tags": [
|
|
20
|
-
{
|
|
21
|
-
"name": "Authentication",
|
|
22
|
-
"description": "Endpoints for checking authentication and authorization."
|
|
23
|
-
},
|
|
24
20
|
{
|
|
25
21
|
"name": "Data Pools",
|
|
26
22
|
"description": "Manage data pools, which are organized collections of files that serve as reusable data sources for services."
|
|
@@ -475,57 +471,6 @@
|
|
|
475
471
|
]
|
|
476
472
|
}
|
|
477
473
|
},
|
|
478
|
-
"/authorize": {
|
|
479
|
-
"post": {
|
|
480
|
-
"tags": [
|
|
481
|
-
"Authentication"
|
|
482
|
-
],
|
|
483
|
-
"description": "Get the authenticated principal based on the provided token.",
|
|
484
|
-
"operationId": "authorize",
|
|
485
|
-
"parameters": [
|
|
486
|
-
{
|
|
487
|
-
"name": "X-Auth-Token",
|
|
488
|
-
"in": "header",
|
|
489
|
-
"required": false,
|
|
490
|
-
"schema": {
|
|
491
|
-
"type": "string"
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
],
|
|
495
|
-
"responses": {
|
|
496
|
-
"200": {
|
|
497
|
-
"description": "The scopes of the provided token.",
|
|
498
|
-
"content": {
|
|
499
|
-
"application/json": {
|
|
500
|
-
"schema": {
|
|
501
|
-
"type": "object",
|
|
502
|
-
"oneOf": [
|
|
503
|
-
{
|
|
504
|
-
"$ref": "#/components/schemas/PersonalAccessTokenPrincipal"
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
"$ref": "#/components/schemas/ServiceExecutionTokenPrincipal"
|
|
508
|
-
}
|
|
509
|
-
]
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
},
|
|
514
|
-
"401": {
|
|
515
|
-
"description": "Unauthorized"
|
|
516
|
-
},
|
|
517
|
-
"403": {
|
|
518
|
-
"description": "Forbidden"
|
|
519
|
-
},
|
|
520
|
-
"404": {
|
|
521
|
-
"description": "Not Found"
|
|
522
|
-
},
|
|
523
|
-
"500": {
|
|
524
|
-
"description": "Internal Server Error"
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
},
|
|
529
474
|
"/datapools/{id}/files/{fileId}": {
|
|
530
475
|
"get": {
|
|
531
476
|
"tags": [
|
|
@@ -746,151 +691,6 @@
|
|
|
746
691
|
"pattern": "^\\d{4}\\-\\d{2}\\-\\d{2}\\s{1}\\d{2}\\:\\d{2}\\:\\d{2}$"
|
|
747
692
|
}
|
|
748
693
|
}
|
|
749
|
-
},
|
|
750
|
-
"AccessToken": {
|
|
751
|
-
"type": "object",
|
|
752
|
-
"properties": {
|
|
753
|
-
"id": {
|
|
754
|
-
"type": "string",
|
|
755
|
-
"format": "uuid"
|
|
756
|
-
},
|
|
757
|
-
"name": {
|
|
758
|
-
"type": "string"
|
|
759
|
-
},
|
|
760
|
-
"createdAt": {
|
|
761
|
-
"type": "string",
|
|
762
|
-
"format": "date-time"
|
|
763
|
-
},
|
|
764
|
-
"usedAt": {
|
|
765
|
-
"type": "string",
|
|
766
|
-
"format": "date-time"
|
|
767
|
-
},
|
|
768
|
-
"expiresAt": {
|
|
769
|
-
"type": "string",
|
|
770
|
-
"format": "date"
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
},
|
|
774
|
-
"OrganizationMembership": {
|
|
775
|
-
"type": "object",
|
|
776
|
-
"properties": {
|
|
777
|
-
"id": {
|
|
778
|
-
"type": "string",
|
|
779
|
-
"format": "uuid"
|
|
780
|
-
},
|
|
781
|
-
"accountType": {
|
|
782
|
-
"type": "string",
|
|
783
|
-
"enum": [
|
|
784
|
-
"BASIC",
|
|
785
|
-
"PRO",
|
|
786
|
-
"BUSINESS"
|
|
787
|
-
]
|
|
788
|
-
},
|
|
789
|
-
"role": {
|
|
790
|
-
"type": "string",
|
|
791
|
-
"enum": [
|
|
792
|
-
"VIEWER",
|
|
793
|
-
"MAINTAINER",
|
|
794
|
-
"OWNER"
|
|
795
|
-
]
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
"PersonalAccessTokenPrincipal": {
|
|
800
|
-
"type": "object",
|
|
801
|
-
"properties": {
|
|
802
|
-
"id": {
|
|
803
|
-
"type": "string",
|
|
804
|
-
"format": "uuid"
|
|
805
|
-
},
|
|
806
|
-
"accessToken": {
|
|
807
|
-
"$ref": "#/components/schemas/AccessToken"
|
|
808
|
-
},
|
|
809
|
-
"accountType": {
|
|
810
|
-
"type": "string",
|
|
811
|
-
"enum": [
|
|
812
|
-
"BASIC",
|
|
813
|
-
"PRO",
|
|
814
|
-
"BUSINESS"
|
|
815
|
-
]
|
|
816
|
-
},
|
|
817
|
-
"organizationMemberships": {
|
|
818
|
-
"type": "array",
|
|
819
|
-
"items": {
|
|
820
|
-
"$ref": "#/components/schemas/OrganizationMembership"
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
},
|
|
825
|
-
"ServiceExecution": {
|
|
826
|
-
"type": "object",
|
|
827
|
-
"properties": {
|
|
828
|
-
"id": {
|
|
829
|
-
"type": "string",
|
|
830
|
-
"format": "uuid"
|
|
831
|
-
},
|
|
832
|
-
"createdAt": {
|
|
833
|
-
"type": "string",
|
|
834
|
-
"format": "date-time"
|
|
835
|
-
},
|
|
836
|
-
"startedAt": {
|
|
837
|
-
"type": "string",
|
|
838
|
-
"format": "date-time"
|
|
839
|
-
},
|
|
840
|
-
"endedAt": {
|
|
841
|
-
"type": "string",
|
|
842
|
-
"format": "date-time"
|
|
843
|
-
},
|
|
844
|
-
"status": {
|
|
845
|
-
"type": "string",
|
|
846
|
-
"enum": [
|
|
847
|
-
"UNKNOWN",
|
|
848
|
-
"PENDING",
|
|
849
|
-
"RUNNING",
|
|
850
|
-
"SUCCEEDED",
|
|
851
|
-
"FAILED"
|
|
852
|
-
]
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
},
|
|
856
|
-
"ServiceExecutionTokenPrincipal": {
|
|
857
|
-
"type": "object",
|
|
858
|
-
"properties": {
|
|
859
|
-
"serviceExecution": {
|
|
860
|
-
"$ref": "#/components/schemas/ServiceExecution"
|
|
861
|
-
},
|
|
862
|
-
"serviceProvider": {
|
|
863
|
-
"$ref": "#/components/schemas/UserContext"
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
},
|
|
867
|
-
"UserContext": {
|
|
868
|
-
"type": "object",
|
|
869
|
-
"properties": {
|
|
870
|
-
"id": {
|
|
871
|
-
"type": "string",
|
|
872
|
-
"format": "uuid"
|
|
873
|
-
},
|
|
874
|
-
"contextType": {
|
|
875
|
-
"type": "string",
|
|
876
|
-
"enum": [
|
|
877
|
-
"USER",
|
|
878
|
-
"ORGANIZATION",
|
|
879
|
-
"SERVICE_EXECUTION"
|
|
880
|
-
]
|
|
881
|
-
},
|
|
882
|
-
"accountType": {
|
|
883
|
-
"type": "string",
|
|
884
|
-
"enum": [
|
|
885
|
-
"BASIC",
|
|
886
|
-
"PRO",
|
|
887
|
-
"BUSINESS"
|
|
888
|
-
]
|
|
889
|
-
},
|
|
890
|
-
"parent": {
|
|
891
|
-
"$ref": "#/components/schemas/UserContext"
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
694
|
}
|
|
895
695
|
},
|
|
896
696
|
"securitySchemes": {
|
|
@@ -903,8 +703,8 @@
|
|
|
903
703
|
"type": "oauth2",
|
|
904
704
|
"flows": {
|
|
905
705
|
"password": {
|
|
906
|
-
"tokenUrl": "https://login.
|
|
907
|
-
"refreshUrl": "https://login.
|
|
706
|
+
"tokenUrl": "https://login.planqk.de/realms/planqk/protocol/openid-connect/token",
|
|
707
|
+
"refreshUrl": "https://login.planqk.de/realms/planqk/protocol/openid-connect/token",
|
|
908
708
|
"scopes": {
|
|
909
709
|
"profile": ""
|
|
910
710
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planqk/planqk-api-sdk",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "SDK to interact with official PLANQK API.",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "SDK to interact with the official PLANQK API.",
|
|
5
5
|
"author": "Kipu Quantum GmbH",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Wurster, Michael <michael.wurster@kipu-quantum.com>"
|
|
@@ -43,6 +43,5 @@
|
|
|
43
43
|
"private": false,
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
|
-
}
|
|
47
|
-
"readme": "./README-node.md"
|
|
46
|
+
}
|
|
48
47
|
}
|
package/planqk/api/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.
|
|
1
|
+
__version__ = "1.3.0"
|
package/pyproject.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "planqk-api-sdk"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.3.0"
|
|
4
4
|
description = "SDK to interact with the official PLANQK API."
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Kipu Quantum GmbH", email = "info@kipu-quantum.com" },
|
|
@@ -28,6 +28,7 @@ dev = [
|
|
|
28
28
|
"pylint>=3.3.5",
|
|
29
29
|
"pytest>=8.3.5",
|
|
30
30
|
"pytest-dotenv>=0.5.2",
|
|
31
|
+
"python-dotenv>=1.1.1",
|
|
31
32
|
]
|
|
32
33
|
|
|
33
34
|
[project.urls]
|
|
@@ -49,8 +50,3 @@ include = ["planqk*"]
|
|
|
49
50
|
ignore-paths = '^planqk/api/sdk/.*$'
|
|
50
51
|
max-line-length = 120
|
|
51
52
|
disable = ['missing-module-docstring', 'missing-class-docstring', 'missing-function-docstring']
|
|
52
|
-
|
|
53
|
-
[tool.uv.workspace]
|
|
54
|
-
members = [
|
|
55
|
-
"python-test-app",
|
|
56
|
-
]
|
package/src/index.test.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import process from 'node:process'
|
|
2
2
|
import {test} from 'vitest'
|
|
3
3
|
import 'dotenv/config'
|
|
4
|
-
import {PlanqkApiClient} from "./
|
|
4
|
+
import {PlanqkApiClient} from "./sdk";
|
|
5
5
|
|
|
6
|
-
test.skip('
|
|
7
|
-
const accessToken = process.env.PLANQK_PERSONAL_ACCESS_TOKEN!
|
|
6
|
+
test.skip('integration test: data pools', {timeout: 5 * 60 * 1000}, async () => {
|
|
8
7
|
const baseUrl = process.env.PLANQK_API_BASE_URL!
|
|
8
|
+
const apiKey = process.env.PLANQK_PERSONAL_ACCESS_TOKEN!
|
|
9
|
+
const organizationId = process.env.PLANQK_ORGANIZATION_ID
|
|
9
10
|
|
|
10
|
-
const client = new PlanqkApiClient({baseUrl
|
|
11
|
+
const client = new PlanqkApiClient({baseUrl, apiKey, organizationId})
|
|
11
12
|
|
|
12
|
-
const dataPools = await client.dataPools.getDataPools()
|
|
13
|
+
const dataPools = await client.dataPools.getDataPools()
|
|
13
14
|
console.log(dataPools)
|
|
14
15
|
|
|
15
16
|
const files = await client.dataPools.getDataPoolFiles(dataPools[0].id!)
|
package/src/index.ts
CHANGED
|
@@ -6,14 +6,13 @@ import * as environments from "./environments.js";
|
|
|
6
6
|
import * as core from "./core/index.js";
|
|
7
7
|
import { mergeHeaders } from "./core/headers.js";
|
|
8
8
|
import { DataPools } from "./api/resources/dataPools/client/Client.js";
|
|
9
|
-
import { Authentication } from "./api/resources/authentication/client/Client.js";
|
|
10
9
|
|
|
11
10
|
export declare namespace PlanqkApiClient {
|
|
12
11
|
export interface Options {
|
|
13
12
|
environment?: core.Supplier<environments.PlanqkApiEnvironment | string>;
|
|
14
13
|
/** Specify a custom URL to connect the client to. */
|
|
15
14
|
baseUrl?: core.Supplier<string>;
|
|
16
|
-
apiKey
|
|
15
|
+
apiKey: core.Supplier<string>;
|
|
17
16
|
/** Override the X-OrganizationId header */
|
|
18
17
|
organizationId?: core.Supplier<string | undefined>;
|
|
19
18
|
/** Additional headers to include in requests. */
|
|
@@ -37,9 +36,8 @@ export declare namespace PlanqkApiClient {
|
|
|
37
36
|
export class PlanqkApiClient {
|
|
38
37
|
protected readonly _options: PlanqkApiClient.Options;
|
|
39
38
|
protected _dataPools: DataPools | undefined;
|
|
40
|
-
protected _authentication: Authentication | undefined;
|
|
41
39
|
|
|
42
|
-
constructor(_options: PlanqkApiClient.Options
|
|
40
|
+
constructor(_options: PlanqkApiClient.Options) {
|
|
43
41
|
this._options = {
|
|
44
42
|
..._options,
|
|
45
43
|
headers: mergeHeaders(
|
|
@@ -57,8 +55,4 @@ export class PlanqkApiClient {
|
|
|
57
55
|
public get dataPools(): DataPools {
|
|
58
56
|
return (this._dataPools ??= new DataPools(this._options));
|
|
59
57
|
}
|
|
60
|
-
|
|
61
|
-
public get authentication(): Authentication {
|
|
62
|
-
return (this._authentication ??= new Authentication(this._options));
|
|
63
|
-
}
|
|
64
58
|
}
|
|
@@ -14,7 +14,7 @@ export declare namespace DataPools {
|
|
|
14
14
|
environment?: core.Supplier<environments.PlanqkApiEnvironment | string>;
|
|
15
15
|
/** Specify a custom URL to connect the client to. */
|
|
16
16
|
baseUrl?: core.Supplier<string>;
|
|
17
|
-
apiKey
|
|
17
|
+
apiKey: core.Supplier<string>;
|
|
18
18
|
/** Override the X-OrganizationId header */
|
|
19
19
|
organizationId?: core.Supplier<string | undefined>;
|
|
20
20
|
/** Additional headers to include in requests. */
|
|
@@ -41,7 +41,7 @@ export declare namespace DataPools {
|
|
|
41
41
|
export class DataPools {
|
|
42
42
|
protected readonly _options: DataPools.Options;
|
|
43
43
|
|
|
44
|
-
constructor(_options: DataPools.Options
|
|
44
|
+
constructor(_options: DataPools.Options) {
|
|
45
45
|
this._options = _options;
|
|
46
46
|
}
|
|
47
47
|
|
package/src/sdk/index.ts
ADDED