@planqk/planqk-api-sdk 1.0.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 (222) hide show
  1. package/.devcontainer/devcontainer.json +32 -0
  2. package/.devcontainer/post-create.sh +7 -0
  3. package/.env.template +2 -0
  4. package/.gitlab-ci.yml +71 -0
  5. package/.python-version +1 -0
  6. package/.releaserc.json +45 -0
  7. package/LICENSE +201 -0
  8. package/README-node.md +18 -0
  9. package/README-python.md +21 -0
  10. package/README.md +56 -0
  11. package/dist/Client.d.ts +32 -0
  12. package/dist/Client.js +60 -0
  13. package/dist/api/errors/BadRequestError.d.ts +8 -0
  14. package/dist/api/errors/BadRequestError.js +52 -0
  15. package/dist/api/errors/ForbiddenError.d.ts +8 -0
  16. package/dist/api/errors/ForbiddenError.js +52 -0
  17. package/dist/api/errors/InternalServerError.d.ts +8 -0
  18. package/dist/api/errors/InternalServerError.js +52 -0
  19. package/dist/api/errors/NotFoundError.d.ts +8 -0
  20. package/dist/api/errors/NotFoundError.js +52 -0
  21. package/dist/api/errors/UnauthorizedError.d.ts +8 -0
  22. package/dist/api/errors/UnauthorizedError.js +52 -0
  23. package/dist/api/errors/index.d.ts +5 -0
  24. package/dist/api/errors/index.js +21 -0
  25. package/dist/api/index.d.ts +3 -0
  26. package/dist/api/index.js +19 -0
  27. package/dist/api/resources/dataPools/client/Client.d.ts +177 -0
  28. package/dist/api/resources/dataPools/client/Client.js +676 -0
  29. package/dist/api/resources/dataPools/client/index.d.ts +2 -0
  30. package/dist/api/resources/dataPools/client/index.js +17 -0
  31. package/dist/api/resources/dataPools/client/requests/AddDataPoolFileRequest.d.ts +14 -0
  32. package/dist/api/resources/dataPools/client/requests/AddDataPoolFileRequest.js +5 -0
  33. package/dist/api/resources/dataPools/client/requests/CreateDataPoolRequest.d.ts +10 -0
  34. package/dist/api/resources/dataPools/client/requests/CreateDataPoolRequest.js +5 -0
  35. package/dist/api/resources/dataPools/client/requests/UpdateDataPoolRequest.d.ts +12 -0
  36. package/dist/api/resources/dataPools/client/requests/UpdateDataPoolRequest.js +5 -0
  37. package/dist/api/resources/dataPools/client/requests/index.d.ts +3 -0
  38. package/dist/api/resources/dataPools/client/requests/index.js +2 -0
  39. package/dist/api/resources/dataPools/index.d.ts +1 -0
  40. package/dist/api/resources/dataPools/index.js +17 -0
  41. package/dist/api/resources/index.d.ts +2 -0
  42. package/dist/api/resources/index.js +41 -0
  43. package/dist/api/types/DataPoolDto.d.ts +23 -0
  44. package/dist/api/types/DataPoolDto.js +14 -0
  45. package/dist/api/types/DataPoolFileDto.d.ts +12 -0
  46. package/dist/api/types/DataPoolFileDto.js +5 -0
  47. package/dist/api/types/OauthScope.d.ts +9 -0
  48. package/dist/api/types/OauthScope.js +9 -0
  49. package/dist/api/types/index.d.ts +3 -0
  50. package/dist/api/types/index.js +19 -0
  51. package/dist/core/fetcher/APIResponse.d.ts +20 -0
  52. package/dist/core/fetcher/APIResponse.js +2 -0
  53. package/dist/core/fetcher/BinaryResponse.d.ts +20 -0
  54. package/dist/core/fetcher/BinaryResponse.js +17 -0
  55. package/dist/core/fetcher/Fetcher.d.ts +40 -0
  56. package/dist/core/fetcher/Fetcher.js +105 -0
  57. package/dist/core/fetcher/Headers.d.ts +2 -0
  58. package/dist/core/fetcher/Headers.js +85 -0
  59. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  60. package/dist/core/fetcher/HttpResponsePromise.js +94 -0
  61. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  62. package/dist/core/fetcher/RawResponse.js +44 -0
  63. package/dist/core/fetcher/ResponseWithBody.d.ts +4 -0
  64. package/dist/core/fetcher/ResponseWithBody.js +6 -0
  65. package/dist/core/fetcher/Supplier.d.ts +4 -0
  66. package/dist/core/fetcher/Supplier.js +13 -0
  67. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  68. package/dist/core/fetcher/createRequestUrl.js +8 -0
  69. package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
  70. package/dist/core/fetcher/getErrorResponseBody.js +32 -0
  71. package/dist/core/fetcher/getFetchFn.d.ts +1 -0
  72. package/dist/core/fetcher/getFetchFn.js +6 -0
  73. package/dist/core/fetcher/getHeader.d.ts +1 -0
  74. package/dist/core/fetcher/getHeader.js +11 -0
  75. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  76. package/dist/core/fetcher/getRequestBody.js +12 -0
  77. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  78. package/dist/core/fetcher/getResponseBody.js +44 -0
  79. package/dist/core/fetcher/index.d.ts +9 -0
  80. package/dist/core/fetcher/index.js +15 -0
  81. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  82. package/dist/core/fetcher/makeRequest.js +33 -0
  83. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  84. package/dist/core/fetcher/requestWithRetries.js +29 -0
  85. package/dist/core/fetcher/signals.d.ts +11 -0
  86. package/dist/core/fetcher/signals.js +36 -0
  87. package/dist/core/file.d.ts +1 -0
  88. package/dist/core/file.js +2 -0
  89. package/dist/core/form-data-utils/FormDataWrapper.d.ts +16 -0
  90. package/dist/core/form-data-utils/FormDataWrapper.js +166 -0
  91. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  92. package/dist/core/form-data-utils/encodeAsFormParameter.js +12 -0
  93. package/dist/core/form-data-utils/index.d.ts +2 -0
  94. package/dist/core/form-data-utils/index.js +20 -0
  95. package/dist/core/headers.d.ts +3 -0
  96. package/dist/core/headers.js +29 -0
  97. package/dist/core/index.d.ts +5 -0
  98. package/dist/core/index.js +44 -0
  99. package/dist/core/json.d.ts +15 -0
  100. package/dist/core/json.js +24 -0
  101. package/dist/core/runtime/index.d.ts +1 -0
  102. package/dist/core/runtime/index.js +5 -0
  103. package/dist/core/runtime/runtime.d.ts +9 -0
  104. package/dist/core/runtime/runtime.js +101 -0
  105. package/dist/core/url/index.d.ts +2 -0
  106. package/dist/core/url/index.js +7 -0
  107. package/dist/core/url/join.d.ts +1 -0
  108. package/dist/core/url/join.js +49 -0
  109. package/dist/core/url/qs.d.ts +6 -0
  110. package/dist/core/url/qs.js +67 -0
  111. package/dist/environments.d.ts +7 -0
  112. package/dist/environments.js +9 -0
  113. package/dist/errors/PlanqkApiError.d.ts +15 -0
  114. package/dist/errors/PlanqkApiError.js +33 -0
  115. package/dist/errors/PlanqkApiTimeoutError.d.ts +6 -0
  116. package/dist/errors/PlanqkApiTimeoutError.js +13 -0
  117. package/dist/errors/index.d.ts +2 -0
  118. package/dist/errors/index.js +7 -0
  119. package/dist/index.d.ts +4 -0
  120. package/dist/index.js +44 -0
  121. package/eslint.config.mjs +11 -0
  122. package/fern/fern.config.json +4 -0
  123. package/fern/generators.yml +25 -0
  124. package/fern/openapi/openapi.json +610 -0
  125. package/notebooks/python-sdk.ipynb +218 -0
  126. package/package.json +48 -0
  127. package/planqk/__init__.py +0 -0
  128. package/planqk/api/__init__.py +1 -0
  129. package/planqk/api/_version.py +1 -0
  130. package/planqk/api/client.py +19 -0
  131. package/planqk/api/credentials.py +103 -0
  132. package/planqk/api/sdk/__init__.py +25 -0
  133. package/planqk/api/sdk/client.py +153 -0
  134. package/planqk/api/sdk/core/__init__.py +52 -0
  135. package/planqk/api/sdk/core/api_error.py +23 -0
  136. package/planqk/api/sdk/core/client_wrapper.py +76 -0
  137. package/planqk/api/sdk/core/datetime_utils.py +28 -0
  138. package/planqk/api/sdk/core/file.py +67 -0
  139. package/planqk/api/sdk/core/force_multipart.py +16 -0
  140. package/planqk/api/sdk/core/http_client.py +543 -0
  141. package/planqk/api/sdk/core/http_response.py +55 -0
  142. package/planqk/api/sdk/core/jsonable_encoder.py +100 -0
  143. package/planqk/api/sdk/core/pydantic_utilities.py +255 -0
  144. package/planqk/api/sdk/core/query_encoder.py +58 -0
  145. package/planqk/api/sdk/core/remove_none_from_dict.py +11 -0
  146. package/planqk/api/sdk/core/request_options.py +35 -0
  147. package/planqk/api/sdk/core/serialization.py +276 -0
  148. package/planqk/api/sdk/data_pools/__init__.py +4 -0
  149. package/planqk/api/sdk/data_pools/client.py +700 -0
  150. package/planqk/api/sdk/data_pools/raw_client.py +1650 -0
  151. package/planqk/api/sdk/environment.py +7 -0
  152. package/planqk/api/sdk/errors/__init__.py +11 -0
  153. package/planqk/api/sdk/errors/bad_request_error.py +10 -0
  154. package/planqk/api/sdk/errors/forbidden_error.py +10 -0
  155. package/planqk/api/sdk/errors/internal_server_error.py +10 -0
  156. package/planqk/api/sdk/errors/not_found_error.py +10 -0
  157. package/planqk/api/sdk/errors/unauthorized_error.py +10 -0
  158. package/planqk/api/sdk/types/__init__.py +10 -0
  159. package/planqk/api/sdk/types/data_pool_dto.py +33 -0
  160. package/planqk/api/sdk/types/data_pool_dto_current_user_permission.py +5 -0
  161. package/planqk/api/sdk/types/data_pool_file_dto.py +27 -0
  162. package/planqk/api/sdk/types/oauth_scope.py +5 -0
  163. package/pyproject.toml +51 -0
  164. package/scripts/update-version.sh +6 -0
  165. package/src/Client.ts +53 -0
  166. package/src/api/errors/BadRequestError.ts +18 -0
  167. package/src/api/errors/ForbiddenError.ts +18 -0
  168. package/src/api/errors/InternalServerError.ts +18 -0
  169. package/src/api/errors/NotFoundError.ts +18 -0
  170. package/src/api/errors/UnauthorizedError.ts +18 -0
  171. package/src/api/errors/index.ts +5 -0
  172. package/src/api/index.ts +3 -0
  173. package/src/api/resources/dataPools/client/Client.ts +825 -0
  174. package/src/api/resources/dataPools/client/index.ts +2 -0
  175. package/src/api/resources/dataPools/client/requests/AddDataPoolFileRequest.ts +17 -0
  176. package/src/api/resources/dataPools/client/requests/CreateDataPoolRequest.ts +11 -0
  177. package/src/api/resources/dataPools/client/requests/UpdateDataPoolRequest.ts +13 -0
  178. package/src/api/resources/dataPools/client/requests/index.ts +3 -0
  179. package/src/api/resources/dataPools/index.ts +1 -0
  180. package/src/api/resources/index.ts +2 -0
  181. package/src/api/types/DataPoolDto.ts +25 -0
  182. package/src/api/types/DataPoolFileDto.ts +13 -0
  183. package/src/api/types/OauthScope.ts +10 -0
  184. package/src/api/types/index.ts +3 -0
  185. package/src/core/fetcher/APIResponse.ts +23 -0
  186. package/src/core/fetcher/BinaryResponse.ts +36 -0
  187. package/src/core/fetcher/Fetcher.ts +163 -0
  188. package/src/core/fetcher/Headers.ts +93 -0
  189. package/src/core/fetcher/HttpResponsePromise.ts +116 -0
  190. package/src/core/fetcher/RawResponse.ts +61 -0
  191. package/src/core/fetcher/ResponseWithBody.ts +7 -0
  192. package/src/core/fetcher/Supplier.ts +11 -0
  193. package/src/core/fetcher/createRequestUrl.ts +6 -0
  194. package/src/core/fetcher/getErrorResponseBody.ts +32 -0
  195. package/src/core/fetcher/getFetchFn.ts +3 -0
  196. package/src/core/fetcher/getHeader.ts +8 -0
  197. package/src/core/fetcher/getRequestBody.ts +16 -0
  198. package/src/core/fetcher/getResponseBody.ts +43 -0
  199. package/src/core/fetcher/index.ts +9 -0
  200. package/src/core/fetcher/makeRequest.ts +44 -0
  201. package/src/core/fetcher/requestWithRetries.ts +33 -0
  202. package/src/core/fetcher/signals.ts +38 -0
  203. package/src/core/file.ts +11 -0
  204. package/src/core/form-data-utils/FormDataWrapper.ts +176 -0
  205. package/src/core/form-data-utils/encodeAsFormParameter.ts +12 -0
  206. package/src/core/form-data-utils/index.ts +2 -0
  207. package/src/core/headers.ts +35 -0
  208. package/src/core/index.ts +5 -0
  209. package/src/core/json.ts +27 -0
  210. package/src/core/runtime/index.ts +1 -0
  211. package/src/core/runtime/runtime.ts +133 -0
  212. package/src/core/url/index.ts +2 -0
  213. package/src/core/url/join.ts +55 -0
  214. package/src/core/url/qs.ts +74 -0
  215. package/src/environments.ts +9 -0
  216. package/src/errors/PlanqkApiError.ts +55 -0
  217. package/src/errors/PlanqkApiTimeoutError.ts +10 -0
  218. package/src/errors/index.ts +2 -0
  219. package/src/index.test.ts +17 -0
  220. package/src/index.ts +4 -0
  221. package/tsconfig.json +18 -0
  222. package/uv.lock +1102 -0
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.ForbiddenError = void 0;
40
+ const errors = __importStar(require("../../errors/index.js"));
41
+ class ForbiddenError extends errors.PlanqkApiError {
42
+ constructor(body, rawResponse) {
43
+ super({
44
+ message: "ForbiddenError",
45
+ statusCode: 403,
46
+ body: body,
47
+ rawResponse: rawResponse,
48
+ });
49
+ Object.setPrototypeOf(this, ForbiddenError.prototype);
50
+ }
51
+ }
52
+ exports.ForbiddenError = ForbiddenError;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.js";
5
+ import * as core from "../../core/index.js";
6
+ export declare class InternalServerError extends errors.PlanqkApiError {
7
+ constructor(body?: any, rawResponse?: core.RawResponse);
8
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.InternalServerError = void 0;
40
+ const errors = __importStar(require("../../errors/index.js"));
41
+ class InternalServerError extends errors.PlanqkApiError {
42
+ constructor(body, rawResponse) {
43
+ super({
44
+ message: "InternalServerError",
45
+ statusCode: 500,
46
+ body: body,
47
+ rawResponse: rawResponse,
48
+ });
49
+ Object.setPrototypeOf(this, InternalServerError.prototype);
50
+ }
51
+ }
52
+ exports.InternalServerError = InternalServerError;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.js";
5
+ import * as core from "../../core/index.js";
6
+ export declare class NotFoundError extends errors.PlanqkApiError {
7
+ constructor(body?: any, rawResponse?: core.RawResponse);
8
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.NotFoundError = void 0;
40
+ const errors = __importStar(require("../../errors/index.js"));
41
+ class NotFoundError extends errors.PlanqkApiError {
42
+ constructor(body, rawResponse) {
43
+ super({
44
+ message: "NotFoundError",
45
+ statusCode: 404,
46
+ body: body,
47
+ rawResponse: rawResponse,
48
+ });
49
+ Object.setPrototypeOf(this, NotFoundError.prototype);
50
+ }
51
+ }
52
+ exports.NotFoundError = NotFoundError;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors/index.js";
5
+ import * as core from "../../core/index.js";
6
+ export declare class UnauthorizedError extends errors.PlanqkApiError {
7
+ constructor(body?: any, rawResponse?: core.RawResponse);
8
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.UnauthorizedError = void 0;
40
+ const errors = __importStar(require("../../errors/index.js"));
41
+ class UnauthorizedError extends errors.PlanqkApiError {
42
+ constructor(body, rawResponse) {
43
+ super({
44
+ message: "UnauthorizedError",
45
+ statusCode: 401,
46
+ body: body,
47
+ rawResponse: rawResponse,
48
+ });
49
+ Object.setPrototypeOf(this, UnauthorizedError.prototype);
50
+ }
51
+ }
52
+ exports.UnauthorizedError = UnauthorizedError;
@@ -0,0 +1,5 @@
1
+ export * from "./UnauthorizedError.js";
2
+ export * from "./ForbiddenError.js";
3
+ export * from "./NotFoundError.js";
4
+ export * from "./InternalServerError.js";
5
+ export * from "./BadRequestError.js";
@@ -0,0 +1,21 @@
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("./UnauthorizedError.js"), exports);
18
+ __exportStar(require("./ForbiddenError.js"), exports);
19
+ __exportStar(require("./NotFoundError.js"), exports);
20
+ __exportStar(require("./InternalServerError.js"), exports);
21
+ __exportStar(require("./BadRequestError.js"), exports);
@@ -0,0 +1,3 @@
1
+ export * from "./types/index.js";
2
+ export * from "./errors/index.js";
3
+ export * from "./resources/index.js";
@@ -0,0 +1,19 @@
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("./types/index.js"), exports);
18
+ __exportStar(require("./errors/index.js"), exports);
19
+ __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1,177 @@
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 DataPools {
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
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
15
+ }
16
+ interface RequestOptions {
17
+ /** The maximum time to wait for a response in seconds. */
18
+ timeoutInSeconds?: number;
19
+ /** The number of times to retry the request. Defaults to 2. */
20
+ maxRetries?: number;
21
+ /** A hook to abort the request. */
22
+ abortSignal?: AbortSignal;
23
+ /** Additional headers to include in the request. */
24
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
25
+ }
26
+ }
27
+ export declare class DataPools {
28
+ protected readonly _options: DataPools.Options;
29
+ constructor(_options: DataPools.Options);
30
+ /**
31
+ * Get a specific data pool (identified by its ID).
32
+ *
33
+ * @param {string} id
34
+ * @param {DataPools.RequestOptions} requestOptions - Request-specific configuration.
35
+ *
36
+ * @throws {@link PlanqkApi.UnauthorizedError}
37
+ * @throws {@link PlanqkApi.ForbiddenError}
38
+ * @throws {@link PlanqkApi.NotFoundError}
39
+ * @throws {@link PlanqkApi.InternalServerError}
40
+ *
41
+ * @example
42
+ * await client.dataPools.getDataPool("id")
43
+ */
44
+ getDataPool(id: string, requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<PlanqkApi.DataPoolDto>;
45
+ private __getDataPool;
46
+ /**
47
+ * Update an existing data pool (identified by its ID).
48
+ *
49
+ * @param {string} id
50
+ * @param {PlanqkApi.UpdateDataPoolRequest} request
51
+ * @param {DataPools.RequestOptions} requestOptions - Request-specific configuration.
52
+ *
53
+ * @throws {@link PlanqkApi.BadRequestError}
54
+ * @throws {@link PlanqkApi.UnauthorizedError}
55
+ * @throws {@link PlanqkApi.ForbiddenError}
56
+ * @throws {@link PlanqkApi.NotFoundError}
57
+ * @throws {@link PlanqkApi.InternalServerError}
58
+ *
59
+ * @example
60
+ * await client.dataPools.updateDataPool("id")
61
+ */
62
+ updateDataPool(id: string, request?: PlanqkApi.UpdateDataPoolRequest, requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<PlanqkApi.DataPoolDto>;
63
+ private __updateDataPool;
64
+ /**
65
+ * Delete a specific data pool (identified by its ID).
66
+ *
67
+ * @param {string} id
68
+ * @param {DataPools.RequestOptions} requestOptions - Request-specific configuration.
69
+ *
70
+ * @throws {@link PlanqkApi.UnauthorizedError}
71
+ * @throws {@link PlanqkApi.ForbiddenError}
72
+ * @throws {@link PlanqkApi.NotFoundError}
73
+ * @throws {@link PlanqkApi.InternalServerError}
74
+ *
75
+ * @example
76
+ * await client.dataPools.deleteDataPool("id")
77
+ */
78
+ deleteDataPool(id: string, requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<void>;
79
+ private __deleteDataPool;
80
+ /**
81
+ * Get a list of all data pools for the current user.
82
+ *
83
+ * @param {DataPools.RequestOptions} requestOptions - Request-specific configuration.
84
+ *
85
+ * @throws {@link PlanqkApi.UnauthorizedError}
86
+ * @throws {@link PlanqkApi.ForbiddenError}
87
+ * @throws {@link PlanqkApi.NotFoundError}
88
+ * @throws {@link PlanqkApi.InternalServerError}
89
+ *
90
+ * @example
91
+ * await client.dataPools.getDataPools()
92
+ */
93
+ getDataPools(requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<PlanqkApi.DataPoolDto[]>;
94
+ private __getDataPools;
95
+ /**
96
+ * Create a new data pool.
97
+ *
98
+ * @param {PlanqkApi.CreateDataPoolRequest} request
99
+ * @param {DataPools.RequestOptions} requestOptions - Request-specific configuration.
100
+ *
101
+ * @throws {@link PlanqkApi.BadRequestError}
102
+ * @throws {@link PlanqkApi.UnauthorizedError}
103
+ * @throws {@link PlanqkApi.ForbiddenError}
104
+ * @throws {@link PlanqkApi.NotFoundError}
105
+ * @throws {@link PlanqkApi.InternalServerError}
106
+ *
107
+ * @example
108
+ * await client.dataPools.createDataPool()
109
+ */
110
+ createDataPool(request?: PlanqkApi.CreateDataPoolRequest, requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<PlanqkApi.DataPoolDto>;
111
+ private __createDataPool;
112
+ /**
113
+ * Get all files associated with a specific data pool (identified by its ID).
114
+ *
115
+ * @param {string} id
116
+ * @param {DataPools.RequestOptions} requestOptions - Request-specific configuration.
117
+ *
118
+ * @throws {@link PlanqkApi.UnauthorizedError}
119
+ * @throws {@link PlanqkApi.ForbiddenError}
120
+ * @throws {@link PlanqkApi.NotFoundError}
121
+ * @throws {@link PlanqkApi.InternalServerError}
122
+ *
123
+ * @example
124
+ * await client.dataPools.getDataPoolFiles("id")
125
+ */
126
+ getDataPoolFiles(id: string, requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<PlanqkApi.DataPoolFileDto[]>;
127
+ private __getDataPoolFiles;
128
+ /**
129
+ * Add a new file to a specific data pool (identified by its ID).
130
+ *
131
+ * @param {string} id
132
+ * @param {PlanqkApi.AddDataPoolFileRequest} request
133
+ * @param {DataPools.RequestOptions} requestOptions - Request-specific configuration.
134
+ *
135
+ * @throws {@link PlanqkApi.BadRequestError}
136
+ * @throws {@link PlanqkApi.UnauthorizedError}
137
+ * @throws {@link PlanqkApi.ForbiddenError}
138
+ * @throws {@link PlanqkApi.NotFoundError}
139
+ * @throws {@link PlanqkApi.InternalServerError}
140
+ *
141
+ * @example
142
+ * await client.dataPools.addDataPoolFile("id", {
143
+ * file: fs.createReadStream("/path/to/your/file")
144
+ * })
145
+ */
146
+ addDataPoolFile(id: string, request: PlanqkApi.AddDataPoolFileRequest, requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<PlanqkApi.DataPoolFileDto>;
147
+ private __addDataPoolFile;
148
+ /**
149
+ * Get the content of a specific file from a data pool (both file and data pool identified by their ID).
150
+ * @throws {@link PlanqkApi.UnauthorizedError}
151
+ * @throws {@link PlanqkApi.ForbiddenError}
152
+ * @throws {@link PlanqkApi.NotFoundError}
153
+ * @throws {@link PlanqkApi.InternalServerError}
154
+ */
155
+ getDataPoolFile(id: string, fileId: string, requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
156
+ private __getDataPoolFile;
157
+ /**
158
+ * Delete a specific file from a data pool (both file and data pool identified by their IDs).
159
+ *
160
+ * @param {string} id
161
+ * @param {string} fileId
162
+ * @param {DataPools.RequestOptions} requestOptions - Request-specific configuration.
163
+ *
164
+ * @throws {@link PlanqkApi.UnauthorizedError}
165
+ * @throws {@link PlanqkApi.ForbiddenError}
166
+ * @throws {@link PlanqkApi.NotFoundError}
167
+ * @throws {@link PlanqkApi.InternalServerError}
168
+ *
169
+ * @example
170
+ * await client.dataPools.deleteDataPoolFile("id", "fileId")
171
+ */
172
+ deleteDataPoolFile(id: string, fileId: string, requestOptions?: DataPools.RequestOptions): core.HttpResponsePromise<void>;
173
+ private __deleteDataPoolFile;
174
+ protected _getCustomAuthorizationHeaders(): Promise<{
175
+ "X-Auth-Token": string;
176
+ }>;
177
+ }