@planqk/planqk-service-sdk 2.1.1 → 2.2.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.
Files changed (173) hide show
  1. package/.gitlab-ci.yml +8 -39
  2. package/README-node.md +16 -12
  3. package/README.md +30 -41
  4. package/dist/sdk/Client.d.ts +10 -4
  5. package/dist/sdk/Client.js +46 -4
  6. package/dist/sdk/api/index.d.ts +2 -3
  7. package/dist/sdk/api/index.js +2 -3
  8. package/dist/sdk/api/resources/index.d.ts +2 -2
  9. package/dist/sdk/api/resources/index.js +2 -2
  10. package/dist/sdk/api/resources/serviceApi/client/Client.d.ts +41 -55
  11. package/dist/sdk/api/resources/serviceApi/client/Client.js +131 -227
  12. package/dist/sdk/api/resources/serviceApi/index.d.ts +2 -2
  13. package/dist/sdk/api/resources/serviceApi/index.js +2 -2
  14. package/dist/sdk/api/resources/serviceApi/types/GetResultResponse.d.ts +13 -3
  15. package/dist/sdk/api/resources/serviceApi/types/index.d.ts +1 -4
  16. package/dist/sdk/api/resources/serviceApi/types/index.js +1 -4
  17. package/dist/sdk/api/types/ServiceExecution.d.ts +12 -2
  18. package/dist/sdk/api/types/ServiceExecution.js +12 -0
  19. package/dist/sdk/api/types/index.d.ts +2 -6
  20. package/dist/sdk/api/types/index.js +2 -6
  21. package/dist/sdk/core/auth/BasicAuth.js +3 -3
  22. package/dist/sdk/core/auth/index.d.ts +2 -2
  23. package/dist/sdk/core/auth/index.js +4 -4
  24. package/dist/sdk/core/base64.d.ts +2 -0
  25. package/dist/sdk/core/base64.js +26 -0
  26. package/dist/sdk/core/fetcher/APIResponse.d.ts +10 -0
  27. package/dist/sdk/core/fetcher/BinaryResponse.d.ts +20 -0
  28. package/dist/sdk/core/fetcher/BinaryResponse.js +17 -0
  29. package/dist/sdk/core/fetcher/Fetcher.d.ts +5 -4
  30. package/dist/sdk/core/fetcher/Fetcher.js +41 -22
  31. package/dist/sdk/core/fetcher/Headers.d.ts +2 -0
  32. package/dist/sdk/core/fetcher/Headers.js +85 -0
  33. package/dist/sdk/core/fetcher/HttpResponsePromise.d.ts +58 -0
  34. package/dist/sdk/core/fetcher/HttpResponsePromise.js +94 -0
  35. package/dist/sdk/core/fetcher/RawResponse.d.ts +29 -0
  36. package/dist/sdk/core/fetcher/RawResponse.js +44 -0
  37. package/dist/sdk/core/fetcher/ResponseWithBody.d.ts +4 -0
  38. package/dist/sdk/core/fetcher/ResponseWithBody.js +6 -0
  39. package/dist/sdk/core/fetcher/createRequestUrl.d.ts +1 -1
  40. package/dist/sdk/core/fetcher/createRequestUrl.js +3 -7
  41. package/dist/sdk/core/fetcher/getErrorResponseBody.d.ts +1 -0
  42. package/dist/sdk/core/fetcher/getErrorResponseBody.js +32 -0
  43. package/dist/sdk/core/fetcher/getFetchFn.d.ts +1 -4
  44. package/dist/sdk/core/fetcher/getFetchFn.js +1 -52
  45. package/dist/sdk/core/fetcher/getRequestBody.js +2 -1
  46. package/dist/sdk/core/fetcher/getResponseBody.js +34 -30
  47. package/dist/sdk/core/fetcher/index.d.ts +9 -5
  48. package/dist/sdk/core/fetcher/index.js +13 -7
  49. package/dist/sdk/core/fetcher/makeRequest.js +3 -3
  50. package/dist/sdk/core/fetcher/requestWithRetries.js +14 -5
  51. package/dist/sdk/core/headers.d.ts +3 -0
  52. package/dist/sdk/core/headers.js +29 -0
  53. package/dist/sdk/core/index.d.ts +5 -3
  54. package/dist/sdk/core/index.js +28 -3
  55. package/dist/sdk/core/json.d.ts +15 -0
  56. package/dist/sdk/core/json.js +24 -0
  57. package/dist/sdk/core/runtime/index.d.ts +1 -1
  58. package/dist/sdk/core/runtime/index.js +2 -2
  59. package/dist/sdk/core/runtime/runtime.d.ts +1 -1
  60. package/dist/sdk/core/runtime/runtime.js +49 -40
  61. package/dist/sdk/core/url/index.d.ts +2 -0
  62. package/dist/sdk/core/url/index.js +7 -0
  63. package/dist/sdk/core/url/join.d.ts +1 -0
  64. package/dist/sdk/core/url/join.js +49 -0
  65. package/dist/sdk/core/url/qs.d.ts +6 -0
  66. package/dist/sdk/core/url/qs.js +67 -0
  67. package/dist/sdk/errors/PlanqkServiceApiError.d.ts +4 -1
  68. package/dist/sdk/errors/PlanqkServiceApiError.js +7 -8
  69. package/dist/sdk/errors/PlanqkServiceApiTimeoutError.d.ts +1 -1
  70. package/dist/sdk/errors/PlanqkServiceApiTimeoutError.js +2 -2
  71. package/dist/sdk/errors/index.d.ts +2 -2
  72. package/dist/sdk/errors/index.js +4 -4
  73. package/dist/sdk/index.d.ts +4 -4
  74. package/dist/sdk/index.js +9 -9
  75. package/fern/fern.config.json +1 -1
  76. package/fern/generators.yml +2 -2
  77. package/fern/openapi/openapi.yml +41 -131
  78. package/notebooks/python-sdk.ipynb +1 -1
  79. package/package.json +2 -3
  80. package/planqk/service/_version.py +1 -1
  81. package/pyproject.toml +1 -1
  82. package/src/index.test.ts +29 -16
  83. package/src/sdk/Client.ts +27 -7
  84. package/src/sdk/api/index.ts +2 -3
  85. package/src/sdk/api/resources/index.ts +2 -2
  86. package/src/sdk/api/resources/serviceApi/client/Client.ts +223 -250
  87. package/src/sdk/api/resources/serviceApi/index.ts +2 -2
  88. package/src/sdk/api/resources/serviceApi/types/GetResultResponse.ts +15 -3
  89. package/src/sdk/api/resources/serviceApi/types/index.ts +1 -4
  90. package/src/sdk/api/types/ServiceExecution.ts +13 -3
  91. package/src/sdk/api/types/index.ts +2 -6
  92. package/src/sdk/core/auth/BasicAuth.ts +3 -3
  93. package/src/sdk/core/auth/index.ts +2 -2
  94. package/src/sdk/core/base64.ts +27 -0
  95. package/src/sdk/core/fetcher/APIResponse.ts +11 -0
  96. package/src/sdk/core/fetcher/BinaryResponse.ts +36 -0
  97. package/src/sdk/core/fetcher/Fetcher.ts +46 -26
  98. package/src/sdk/core/fetcher/Headers.ts +93 -0
  99. package/src/sdk/core/fetcher/HttpResponsePromise.ts +116 -0
  100. package/src/sdk/core/fetcher/RawResponse.ts +61 -0
  101. package/src/sdk/core/fetcher/ResponseWithBody.ts +7 -0
  102. package/src/sdk/core/fetcher/createRequestUrl.ts +4 -8
  103. package/src/sdk/core/fetcher/getErrorResponseBody.ts +32 -0
  104. package/src/sdk/core/fetcher/getFetchFn.ts +2 -24
  105. package/src/sdk/core/fetcher/getRequestBody.ts +3 -1
  106. package/src/sdk/core/fetcher/getResponseBody.ts +38 -27
  107. package/src/sdk/core/fetcher/index.ts +9 -5
  108. package/src/sdk/core/fetcher/makeRequest.ts +2 -2
  109. package/src/sdk/core/fetcher/requestWithRetries.ts +18 -6
  110. package/src/sdk/core/fetcher/signals.ts +1 -1
  111. package/src/sdk/core/headers.ts +35 -0
  112. package/src/sdk/core/index.ts +5 -3
  113. package/src/sdk/core/json.ts +27 -0
  114. package/src/sdk/core/runtime/index.ts +1 -1
  115. package/src/sdk/core/runtime/runtime.ts +60 -53
  116. package/src/sdk/core/url/index.ts +2 -0
  117. package/src/sdk/core/url/join.ts +55 -0
  118. package/src/sdk/core/url/qs.ts +74 -0
  119. package/src/sdk/errors/PlanqkServiceApiError.ts +21 -11
  120. package/src/sdk/errors/PlanqkServiceApiTimeoutError.ts +2 -2
  121. package/src/sdk/errors/index.ts +2 -2
  122. package/src/sdk/index.ts +4 -4
  123. package/dist/sdk/api/errors/BadRequestError.d.ts +0 -7
  124. package/dist/sdk/api/errors/BadRequestError.js +0 -51
  125. package/dist/sdk/api/errors/ForbiddenError.d.ts +0 -7
  126. package/dist/sdk/api/errors/ForbiddenError.js +0 -51
  127. package/dist/sdk/api/errors/InternalServerError.d.ts +0 -7
  128. package/dist/sdk/api/errors/InternalServerError.js +0 -51
  129. package/dist/sdk/api/errors/NotFoundError.d.ts +0 -7
  130. package/dist/sdk/api/errors/NotFoundError.js +0 -51
  131. package/dist/sdk/api/errors/UnauthorizedError.d.ts +0 -7
  132. package/dist/sdk/api/errors/UnauthorizedError.js +0 -51
  133. package/dist/sdk/api/errors/index.d.ts +0 -5
  134. package/dist/sdk/api/errors/index.js +0 -21
  135. package/dist/sdk/api/resources/serviceApi/types/GetResultResponseEmbedded.d.ts +0 -7
  136. package/dist/sdk/api/resources/serviceApi/types/GetResultResponseEmbedded.js +0 -5
  137. package/dist/sdk/api/resources/serviceApi/types/GetResultResponseLinks.d.ts +0 -7
  138. package/dist/sdk/api/resources/serviceApi/types/GetResultResponseLinks.js +0 -5
  139. package/dist/sdk/api/resources/serviceApi/types/HealthCheckResponse.d.ts +0 -7
  140. package/dist/sdk/api/resources/serviceApi/types/HealthCheckResponse.js +0 -5
  141. package/dist/sdk/api/types/InputData.d.ts +0 -4
  142. package/dist/sdk/api/types/InputData.js +0 -5
  143. package/dist/sdk/api/types/InputDataRef.d.ts +0 -8
  144. package/dist/sdk/api/types/InputDataRef.js +0 -5
  145. package/dist/sdk/api/types/InputParams.d.ts +0 -4
  146. package/dist/sdk/api/types/InputParams.js +0 -5
  147. package/dist/sdk/api/types/ServiceExecutionStatus.d.ts +0 -12
  148. package/dist/sdk/api/types/ServiceExecutionStatus.js +0 -14
  149. package/dist/sdk/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
  150. package/dist/sdk/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -232
  151. package/dist/sdk/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
  152. package/dist/sdk/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -91
  153. package/dist/sdk/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
  154. package/dist/sdk/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -214
  155. package/dist/sdk/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
  156. package/dist/sdk/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -48
  157. package/src/sdk/api/errors/BadRequestError.ts +0 -16
  158. package/src/sdk/api/errors/ForbiddenError.ts +0 -16
  159. package/src/sdk/api/errors/InternalServerError.ts +0 -16
  160. package/src/sdk/api/errors/NotFoundError.ts +0 -16
  161. package/src/sdk/api/errors/UnauthorizedError.ts +0 -16
  162. package/src/sdk/api/errors/index.ts +0 -5
  163. package/src/sdk/api/resources/serviceApi/types/GetResultResponseEmbedded.ts +0 -9
  164. package/src/sdk/api/resources/serviceApi/types/GetResultResponseLinks.ts +0 -9
  165. package/src/sdk/api/resources/serviceApi/types/HealthCheckResponse.ts +0 -8
  166. package/src/sdk/api/types/InputData.ts +0 -5
  167. package/src/sdk/api/types/InputDataRef.ts +0 -9
  168. package/src/sdk/api/types/InputParams.ts +0 -5
  169. package/src/sdk/api/types/ServiceExecutionStatus.ts +0 -14
  170. package/src/sdk/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts +0 -252
  171. package/src/sdk/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts +0 -106
  172. package/src/sdk/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts +0 -239
  173. package/src/sdk/core/fetcher/stream-wrappers/chooseStreamWrapper.ts +0 -33
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.join = join;
4
+ function join(base, ...segments) {
5
+ if (!base) {
6
+ return "";
7
+ }
8
+ if (base.includes("://")) {
9
+ let url;
10
+ try {
11
+ url = new URL(base);
12
+ }
13
+ catch {
14
+ // Fallback to path joining if URL is malformed
15
+ return joinPath(base, ...segments);
16
+ }
17
+ for (const segment of segments) {
18
+ const cleanSegment = trimSlashes(segment);
19
+ if (cleanSegment) {
20
+ url.pathname = joinPathSegments(url.pathname, cleanSegment);
21
+ }
22
+ }
23
+ return url.toString();
24
+ }
25
+ return joinPath(base, ...segments);
26
+ }
27
+ function joinPath(base, ...segments) {
28
+ let result = base;
29
+ for (const segment of segments) {
30
+ const cleanSegment = trimSlashes(segment);
31
+ if (cleanSegment) {
32
+ result = joinPathSegments(result, cleanSegment);
33
+ }
34
+ }
35
+ return result;
36
+ }
37
+ function joinPathSegments(left, right) {
38
+ if (left.endsWith("/")) {
39
+ return left + right;
40
+ }
41
+ return left + "/" + right;
42
+ }
43
+ function trimSlashes(str) {
44
+ if (!str)
45
+ return str;
46
+ let start = str.startsWith("/") ? 1 : 0;
47
+ let end = str.endsWith("/") ? str.length - 1 : str.length;
48
+ return str.slice(start, end);
49
+ }
@@ -0,0 +1,6 @@
1
+ interface QueryStringOptions {
2
+ arrayFormat?: "indices" | "repeat";
3
+ encode?: boolean;
4
+ }
5
+ export declare function toQueryString(obj: unknown, options?: QueryStringOptions): string;
6
+ export {};
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toQueryString = toQueryString;
4
+ const defaultQsOptions = {
5
+ arrayFormat: "indices",
6
+ encode: true,
7
+ };
8
+ function encodeValue(value, shouldEncode) {
9
+ if (value === undefined) {
10
+ return "";
11
+ }
12
+ if (value === null) {
13
+ return "";
14
+ }
15
+ const stringValue = String(value);
16
+ return shouldEncode ? encodeURIComponent(stringValue) : stringValue;
17
+ }
18
+ function stringifyObject(obj, prefix = "", options) {
19
+ const parts = [];
20
+ for (const [key, value] of Object.entries(obj)) {
21
+ const fullKey = prefix ? `${prefix}[${key}]` : key;
22
+ if (value === undefined) {
23
+ continue;
24
+ }
25
+ if (Array.isArray(value)) {
26
+ if (value.length === 0) {
27
+ continue;
28
+ }
29
+ for (let i = 0; i < value.length; i++) {
30
+ const item = value[i];
31
+ if (item === undefined) {
32
+ continue;
33
+ }
34
+ if (typeof item === "object" && !Array.isArray(item) && item !== null) {
35
+ const arrayKey = options.arrayFormat === "indices" ? `${fullKey}[${i}]` : fullKey;
36
+ parts.push(...stringifyObject(item, arrayKey, options));
37
+ }
38
+ else {
39
+ const arrayKey = options.arrayFormat === "indices" ? `${fullKey}[${i}]` : fullKey;
40
+ const encodedKey = options.encode ? encodeURIComponent(arrayKey) : arrayKey;
41
+ parts.push(`${encodedKey}=${encodeValue(item, options.encode)}`);
42
+ }
43
+ }
44
+ }
45
+ else if (typeof value === "object" && value !== null) {
46
+ if (Object.keys(value).length === 0) {
47
+ continue;
48
+ }
49
+ parts.push(...stringifyObject(value, fullKey, options));
50
+ }
51
+ else {
52
+ const encodedKey = options.encode ? encodeURIComponent(fullKey) : fullKey;
53
+ parts.push(`${encodedKey}=${encodeValue(value, options.encode)}`);
54
+ }
55
+ }
56
+ return parts;
57
+ }
58
+ function toQueryString(obj, options) {
59
+ if (obj == null || typeof obj !== "object") {
60
+ return "";
61
+ }
62
+ const parts = stringifyObject(obj, "", {
63
+ ...defaultQsOptions,
64
+ ...options,
65
+ });
66
+ return parts.join("&");
67
+ }
@@ -1,12 +1,15 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as core from "../core/index.js";
4
5
  export declare class PlanqkServiceApiError extends Error {
5
6
  readonly statusCode?: number;
6
7
  readonly body?: unknown;
7
- constructor({ message, statusCode, body }: {
8
+ readonly rawResponse?: core.RawResponse;
9
+ constructor({ message, statusCode, body, rawResponse, }: {
8
10
  message?: string;
9
11
  statusCode?: number;
10
12
  body?: unknown;
13
+ rawResponse?: core.RawResponse;
11
14
  });
12
15
  }
@@ -4,18 +4,17 @@
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PlanqkServiceApiError = void 0;
7
+ const json_js_1 = require("../core/json.js");
7
8
  class PlanqkServiceApiError extends Error {
8
9
  statusCode;
9
10
  body;
10
- constructor({ message, statusCode, body }) {
11
+ rawResponse;
12
+ constructor({ message, statusCode, body, rawResponse, }) {
11
13
  super(buildMessage({ message, statusCode, body }));
12
14
  Object.setPrototypeOf(this, PlanqkServiceApiError.prototype);
13
- if (statusCode != null) {
14
- this.statusCode = statusCode;
15
- }
16
- if (body !== undefined) {
17
- this.body = body;
18
- }
15
+ this.statusCode = statusCode;
16
+ this.body = body;
17
+ this.rawResponse = rawResponse;
19
18
  }
20
19
  }
21
20
  exports.PlanqkServiceApiError = PlanqkServiceApiError;
@@ -28,7 +27,7 @@ function buildMessage({ message, statusCode, body, }) {
28
27
  lines.push(`Status code: ${statusCode.toString()}`);
29
28
  }
30
29
  if (body != null) {
31
- lines.push(`Body: ${JSON.stringify(body, undefined, 2)}`);
30
+ lines.push(`Body: ${(0, json_js_1.toJson)(body, undefined, 2)}`);
32
31
  }
33
32
  return lines.join("\n");
34
33
  }
@@ -2,5 +2,5 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export declare class PlanqkServiceApiTimeoutError extends Error {
5
- constructor();
5
+ constructor(message: string);
6
6
  }
@@ -5,8 +5,8 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PlanqkServiceApiTimeoutError = void 0;
7
7
  class PlanqkServiceApiTimeoutError extends Error {
8
- constructor() {
9
- super("Timeout");
8
+ constructor(message) {
9
+ super(message);
10
10
  Object.setPrototypeOf(this, PlanqkServiceApiTimeoutError.prototype);
11
11
  }
12
12
  }
@@ -1,2 +1,2 @@
1
- export { PlanqkServiceApiError } from "./PlanqkServiceApiError";
2
- export { PlanqkServiceApiTimeoutError } from "./PlanqkServiceApiTimeoutError";
1
+ export { PlanqkServiceApiError } from "./PlanqkServiceApiError.js";
2
+ export { PlanqkServiceApiTimeoutError } from "./PlanqkServiceApiTimeoutError.js";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PlanqkServiceApiTimeoutError = exports.PlanqkServiceApiError = void 0;
4
- var PlanqkServiceApiError_1 = require("./PlanqkServiceApiError");
5
- Object.defineProperty(exports, "PlanqkServiceApiError", { enumerable: true, get: function () { return PlanqkServiceApiError_1.PlanqkServiceApiError; } });
6
- var PlanqkServiceApiTimeoutError_1 = require("./PlanqkServiceApiTimeoutError");
7
- Object.defineProperty(exports, "PlanqkServiceApiTimeoutError", { enumerable: true, get: function () { return PlanqkServiceApiTimeoutError_1.PlanqkServiceApiTimeoutError; } });
4
+ var PlanqkServiceApiError_js_1 = require("./PlanqkServiceApiError.js");
5
+ Object.defineProperty(exports, "PlanqkServiceApiError", { enumerable: true, get: function () { return PlanqkServiceApiError_js_1.PlanqkServiceApiError; } });
6
+ var PlanqkServiceApiTimeoutError_js_1 = require("./PlanqkServiceApiTimeoutError.js");
7
+ Object.defineProperty(exports, "PlanqkServiceApiTimeoutError", { enumerable: true, get: function () { return PlanqkServiceApiTimeoutError_js_1.PlanqkServiceApiTimeoutError; } });
@@ -1,4 +1,4 @@
1
- export * as PlanqkServiceApi from "./api";
2
- export { PlanqkServiceApiClient } from "./Client";
3
- export { PlanqkServiceApiEnvironment } from "./environments";
4
- export { PlanqkServiceApiError, PlanqkServiceApiTimeoutError } from "./errors";
1
+ export * as PlanqkServiceApi from "./api/index.js";
2
+ export { PlanqkServiceApiError, PlanqkServiceApiTimeoutError } from "./errors/index.js";
3
+ export { PlanqkServiceApiClient } from "./Client.js";
4
+ export { PlanqkServiceApiEnvironment } from "./environments.js";
package/dist/sdk/index.js CHANGED
@@ -33,12 +33,12 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.PlanqkServiceApiTimeoutError = exports.PlanqkServiceApiError = exports.PlanqkServiceApiEnvironment = exports.PlanqkServiceApiClient = exports.PlanqkServiceApi = void 0;
37
- exports.PlanqkServiceApi = __importStar(require("./api"));
38
- var Client_1 = require("./Client");
39
- Object.defineProperty(exports, "PlanqkServiceApiClient", { enumerable: true, get: function () { return Client_1.PlanqkServiceApiClient; } });
40
- var environments_1 = require("./environments");
41
- Object.defineProperty(exports, "PlanqkServiceApiEnvironment", { enumerable: true, get: function () { return environments_1.PlanqkServiceApiEnvironment; } });
42
- var errors_1 = require("./errors");
43
- Object.defineProperty(exports, "PlanqkServiceApiError", { enumerable: true, get: function () { return errors_1.PlanqkServiceApiError; } });
44
- Object.defineProperty(exports, "PlanqkServiceApiTimeoutError", { enumerable: true, get: function () { return errors_1.PlanqkServiceApiTimeoutError; } });
36
+ exports.PlanqkServiceApiEnvironment = exports.PlanqkServiceApiClient = exports.PlanqkServiceApiTimeoutError = exports.PlanqkServiceApiError = exports.PlanqkServiceApi = void 0;
37
+ exports.PlanqkServiceApi = __importStar(require("./api/index.js"));
38
+ var index_js_1 = require("./errors/index.js");
39
+ Object.defineProperty(exports, "PlanqkServiceApiError", { enumerable: true, get: function () { return index_js_1.PlanqkServiceApiError; } });
40
+ Object.defineProperty(exports, "PlanqkServiceApiTimeoutError", { enumerable: true, get: function () { return index_js_1.PlanqkServiceApiTimeoutError; } });
41
+ var Client_js_1 = require("./Client.js");
42
+ Object.defineProperty(exports, "PlanqkServiceApiClient", { enumerable: true, get: function () { return Client_js_1.PlanqkServiceApiClient; } });
43
+ var environments_js_1 = require("./environments.js");
44
+ Object.defineProperty(exports, "PlanqkServiceApiEnvironment", { enumerable: true, get: function () { return environments_js_1.PlanqkServiceApiEnvironment; } });
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "organization": "planqk-service",
3
- "version": "0.56.17"
3
+ "version": "0.65.35"
4
4
  }
@@ -7,7 +7,7 @@ groups:
7
7
  local:
8
8
  generators:
9
9
  - name: fernapi/fern-typescript-node-sdk
10
- version: 0.39.3
10
+ version: 2.4.6
11
11
  output:
12
12
  location: local-file-system
13
13
  path: ../generated/typescript
@@ -18,7 +18,7 @@ groups:
18
18
  skipResponseValidation: true
19
19
  noSerdeLayer: true
20
20
  - name: fernapi/fern-python-sdk
21
- version: 4.3.16
21
+ version: 4.25.0
22
22
  output:
23
23
  location: local-file-system
24
24
  path: ../generated/python
@@ -1,4 +1,4 @@
1
- openapi: 3.0.0
1
+ openapi: 3.1.0
2
2
  info:
3
3
  version: "1.0"
4
4
  title: PLANQK Service API
@@ -9,56 +9,38 @@ paths:
9
9
  get:
10
10
  tags:
11
11
  - Service API
12
- summary: Health checking endpoint
12
+ summary: List of service executions
13
13
  description: |
14
- This method checks the health of the service.
15
- operationId: healthCheck
14
+ Retrieves a list of all service executions.
15
+ The response includes links to each service execution, allowing for further queries on their status and results.
16
+ operationId: getServiceExecutions
16
17
  responses:
17
18
  "200":
18
- description: OK
19
+ description: List of service executions
19
20
  content:
20
21
  application/json:
21
22
  schema:
22
- type: object
23
- properties:
24
- status:
25
- type: string
26
- description: Status of the service
27
- example: "Service is up and running"
23
+ type: array
24
+ items:
25
+ $ref: "#/components/schemas/ServiceExecution"
28
26
  post:
29
27
  tags:
30
28
  - Service API
31
29
  summary: Asynchronous execution of the service
32
30
  description: |
33
- This method starts a service execution, which in turn is processed asynchronously by PLANQK.
31
+ Starts a service execution, which in turn is processed asynchronously.
34
32
  The location header of the response contains the URL which can be used to query the status and the result of the service execution.
35
- operationId: execute
33
+ operationId: startExecution
36
34
  requestBody:
37
35
  required: true
38
36
  content:
39
37
  application/json:
40
38
  schema:
41
39
  type: object
42
- additionalProperties:
43
- type: object
44
- oneOf:
45
- - required:
46
- - data
47
- properties:
48
- data:
49
- $ref: '#/components/schemas/InputData'
50
- params:
51
- $ref: '#/components/schemas/InputParams'
52
- - required:
53
- - dataRef
54
- properties:
55
- dataRef:
56
- $ref: '#/components/schemas/InputDataRef'
57
- params:
58
- $ref: '#/components/schemas/InputParams'
40
+ additionalProperties: true
59
41
  responses:
60
42
  "201":
61
- description: Service execution successfully submitted
43
+ description: Service execution is submitted
62
44
  content:
63
45
  application/json:
64
46
  schema:
@@ -68,23 +50,14 @@ paths:
68
50
  description: URL to query the status and the result of a service execution
69
51
  schema:
70
52
  type: string
71
- "400":
72
- description: Invalid input
73
- "401":
74
- description: Unauthorized
75
- "403":
76
- description: Forbidden
77
- "404":
78
- description: Not found
79
- "500":
80
- description: Internal server error
81
53
  /{id}:
82
54
  get:
83
55
  tags:
84
56
  - Service API
85
57
  summary: Check the status of a service execution
86
58
  description: |
87
- This method checks the status of a service execution.
59
+ Retrieves the status of a service execution.
60
+ The status can be one of the following: UNKNOWN, PENDING, RUNNING, SUCCEEDED, CANCELLED, FAILED.
88
61
  operationId: getStatus
89
62
  parameters:
90
63
  - in: path
@@ -95,26 +68,20 @@ paths:
95
68
  type: string
96
69
  responses:
97
70
  "200":
98
- description: Ok
71
+ description: A service execution
99
72
  content:
100
73
  application/json:
101
74
  schema:
102
75
  $ref: "#/components/schemas/ServiceExecution"
103
- "401":
104
- description: Unauthorized
105
- "403":
106
- description: Forbidden
107
- "404":
108
- description: Not found
109
- "500":
110
- description: Internal server error
111
76
  /{id}/result:
112
77
  get:
113
78
  tags:
114
79
  - Service API
115
80
  summary: Get the result of a service execution
116
81
  description: |
117
- This method retrieves the result of a service execution.
82
+ Retrieves the result of a service execution.
83
+ The result is returned as a JSON object containing the status and any additional data.
84
+ The result may include links to download specific result files.
118
85
  operationId: getResult
119
86
  parameters:
120
87
  - in: path
@@ -125,13 +92,12 @@ paths:
125
92
  type: string
126
93
  responses:
127
94
  "200":
128
- description: Ok
95
+ description: The service execution result
129
96
  content:
130
97
  application/json:
131
98
  schema:
132
99
  type: object
133
- additionalProperties:
134
- type: string
100
+ additionalProperties: true
135
101
  properties:
136
102
  _links:
137
103
  type: object
@@ -145,21 +111,15 @@ paths:
145
111
  properties:
146
112
  status:
147
113
  $ref: '#/components/schemas/ServiceExecution'
148
- "401":
149
- description: Unauthorized
150
- "403":
151
- description: Forbidden
152
- "404":
153
- description: Not found
154
- "500":
155
- description: Internal server error
156
114
  /{id}/result/{file}:
157
115
  get:
158
116
  tags:
159
117
  - Service API
160
118
  summary: Download a result file of a service execution
161
119
  description: |
162
- This method downloads a result file of a service execution.
120
+ Retrieves a specific result file of a service execution.
121
+ The file name is provided in the path parameter.
122
+ The result file is returned as a binary stream.
163
123
  operationId: getResultFile
164
124
  parameters:
165
125
  - in: path
@@ -176,27 +136,19 @@ paths:
176
136
  type: string
177
137
  responses:
178
138
  "200":
179
- description: Ok
139
+ description: The content of a result file
180
140
  content:
181
141
  application/octet-stream:
182
142
  schema:
183
143
  type: string
184
144
  format: binary
185
- "401":
186
- description: Unauthorized
187
- "403":
188
- description: Forbidden
189
- "404":
190
- description: Not found
191
- "500":
192
- description: Internal server error
193
145
  /{id}/log:
194
146
  get:
195
147
  tags:
196
148
  - Service API
197
149
  summary: Get the log output of a service execution
198
150
  description: |
199
- This method retrieves the log output of a service execution.
151
+ Returns a list of log entries for a service execution in chronological order, where the first entry is the oldest.
200
152
  operationId: getLogs
201
153
  parameters:
202
154
  - in: path
@@ -207,29 +159,21 @@ paths:
207
159
  type: string
208
160
  responses:
209
161
  "200":
210
- description: Ok
162
+ description: List of log entries
211
163
  content:
212
164
  application/json:
213
165
  schema:
214
166
  type: array
215
167
  items:
216
168
  type: string
217
- "401":
218
- description: Unauthorized
219
- "403":
220
- description: Forbidden
221
- "404":
222
- description: Not found
223
- "500":
224
- description: Internal server error
225
169
  /{id}/cancel:
226
170
  put:
227
171
  tags:
228
172
  - Service API
229
173
  summary: Cancel a service execution
230
174
  description: |
231
- This method cancels a service execution.
232
- operationId: cancel
175
+ Cancel a pending or running service execution.
176
+ operationId: cancelExecution
233
177
  parameters:
234
178
  - in: path
235
179
  name: id
@@ -239,64 +183,32 @@ paths:
239
183
  type: string
240
184
  responses:
241
185
  "200":
242
- description: Ok
186
+ description: Service execution is cancelled
243
187
  content:
244
188
  application/json:
245
189
  schema:
246
190
  $ref: "#/components/schemas/ServiceExecution"
247
- "401":
248
- description: Unauthorized
249
- "403":
250
- description: Forbidden
251
- "404":
252
- description: Not found
253
- "500":
254
- description: Internal server error
255
191
  components:
256
192
  schemas:
257
- InputData:
258
- type: object
259
- additionalProperties:
260
- type: object
261
- InputParams:
262
- type: object
263
- additionalProperties:
264
- type: object
265
- InputDataRef:
266
- type: object
267
- properties:
268
- dataPoolId:
269
- type: string
270
- example: 87cb778e-ac43-11ec-b909-0242ac120002
271
- dataSourceDescriptorId:
272
- type: string
273
- example: 87cb778e-ac43-11ec-b909-0242ac120002
274
- fileId:
275
- type: string
276
- example: 87cb778e-ac43-11ec-b909-0242ac120002
277
- required:
278
- - dataPoolId
279
- - dataSourceDescriptorId
280
- - fileId
281
193
  ServiceExecution:
282
194
  type: object
283
195
  properties:
284
196
  id:
285
197
  type: string
286
- example: 87cb778e-ac43-11ec-b909-0242ac120002
198
+ examples: [ 87cb778e-ac43-11ec-b909-0242ac120002 ]
287
199
  status:
288
200
  type: string
289
- enum: [UNKNOWN, PENDING, RUNNING, SUCCEEDED, CANCELLED, FAILED]
290
- example: SUCCEEDED
201
+ enum: [ UNKNOWN, PENDING, RUNNING, SUCCEEDED, CANCELLED, FAILED ]
202
+ examples: [ SUCCEEDED ]
291
203
  createdAt:
292
204
  type: string
293
- example: "2022-01-01 22:38:08"
205
+ examples: [ "2022-01-01 22:38:08" ]
294
206
  startedAt:
295
207
  type: string
296
- example: "2022-01-01 22:39:08"
208
+ examples: [ "2022-01-01 22:39:08" ]
297
209
  endedAt:
298
210
  type: string
299
- example: "2022-01-01 22:40:08"
211
+ examples: [ "2022-01-01 22:40:08" ]
300
212
  # Representation of link as defined in HAL: https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-11
301
213
  HALLink:
302
214
  type: object
@@ -326,17 +238,15 @@ components:
326
238
  hreflang:
327
239
  type: string
328
240
  description: The language of the link's target resource (optional)
329
-
330
241
  securitySchemes:
331
- oauthClientCredentials:
242
+ ApplicationCredentials:
332
243
  type: oauth2
333
244
  flows:
334
245
  clientCredentials:
335
246
  tokenUrl: https://gateway.platform.planqk.de/token
336
247
  scopes: {}
337
-
338
- servers:
339
- - url: https://gateway.platform.planqk.de
340
-
341
248
  security:
342
- - oauthClientCredentials: []
249
+ - ApplicationCredentials: []
250
+ servers:
251
+ - url: https://gateway.34.90.225.20.nip.io/<context>/<service>/<version>
252
+ description: The service endpoint
@@ -18,6 +18,7 @@
18
18
  "outputs": [],
19
19
  "source": [
20
20
  "import os\n",
21
+ "\n",
21
22
  "from dotenv import load_dotenv\n",
22
23
  "\n",
23
24
  "# Make a copy of .env.example and rename it to .env, place it in the \n",
@@ -218,7 +219,6 @@
218
219
  "metadata": {},
219
220
  "outputs": [],
220
221
  "source": [
221
- "import json\n",
222
222
  "from planqk.service.sdk.types.input_data_ref import InputDataRef\n",
223
223
  "\n",
224
224
  "# Create a client\n",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planqk/planqk-service-sdk",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "SDK to interact with PLANQK Managed Services.",
5
5
  "author": "Kipu Quantum GmbH",
6
6
  "contributors": [
@@ -45,6 +45,5 @@
45
45
  "private": false,
46
46
  "publishConfig": {
47
47
  "access": "public"
48
- },
49
- "readme": "./README-node.md"
48
+ }
50
49
  }
@@ -1 +1 @@
1
- __version__ = "2.1.1"
1
+ __version__ = "2.2.0"
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "planqk-service-sdk"
3
- version = "2.1.1"
3
+ version = "2.2.0"
4
4
  description = "SDK to interact with PLANQK Managed Services."
5
5
  authors = [
6
6
  { name = "Kipu Quantum GmbH", email = "info@kipu-quantum.com" },