@planqk/planqk-api-sdk 1.9.3 → 1.9.4

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 (165) hide show
  1. package/README-node.md +17 -0
  2. package/README-python.md +17 -0
  3. package/README.md +66 -6
  4. package/package.json +1 -1
  5. package/pyproject.toml +1 -1
  6. package/uv.lock +1 -1
  7. package/.gitlab-ci.yml +0 -110
  8. package/dist/index.d.ts +0 -1
  9. package/dist/index.js +0 -17
  10. package/dist/sdk/Client.d.ts +0 -44
  11. package/dist/sdk/Client.js +0 -71
  12. package/dist/sdk/api/errors/BadRequestError.d.ts +0 -8
  13. package/dist/sdk/api/errors/BadRequestError.js +0 -52
  14. package/dist/sdk/api/errors/ForbiddenError.d.ts +0 -8
  15. package/dist/sdk/api/errors/ForbiddenError.js +0 -52
  16. package/dist/sdk/api/errors/InternalServerError.d.ts +0 -8
  17. package/dist/sdk/api/errors/InternalServerError.js +0 -52
  18. package/dist/sdk/api/errors/NotFoundError.d.ts +0 -8
  19. package/dist/sdk/api/errors/NotFoundError.js +0 -52
  20. package/dist/sdk/api/errors/UnauthorizedError.d.ts +0 -8
  21. package/dist/sdk/api/errors/UnauthorizedError.js +0 -52
  22. package/dist/sdk/api/errors/index.d.ts +0 -5
  23. package/dist/sdk/api/errors/index.js +0 -21
  24. package/dist/sdk/api/index.d.ts +0 -3
  25. package/dist/sdk/api/index.js +0 -19
  26. package/dist/sdk/api/resources/dataPools/client/Client.d.ts +0 -187
  27. package/dist/sdk/api/resources/dataPools/client/Client.js +0 -722
  28. package/dist/sdk/api/resources/dataPools/client/index.d.ts +0 -2
  29. package/dist/sdk/api/resources/dataPools/client/index.js +0 -17
  30. package/dist/sdk/api/resources/dataPools/client/requests/AddDataPoolFileRequest.d.ts +0 -14
  31. package/dist/sdk/api/resources/dataPools/client/requests/AddDataPoolFileRequest.js +0 -5
  32. package/dist/sdk/api/resources/dataPools/client/requests/CreateDataPoolRequest.d.ts +0 -11
  33. package/dist/sdk/api/resources/dataPools/client/requests/CreateDataPoolRequest.js +0 -5
  34. package/dist/sdk/api/resources/dataPools/client/requests/UpdateDataPoolRequest.d.ts +0 -15
  35. package/dist/sdk/api/resources/dataPools/client/requests/UpdateDataPoolRequest.js +0 -5
  36. package/dist/sdk/api/resources/dataPools/client/requests/index.d.ts +0 -3
  37. package/dist/sdk/api/resources/dataPools/client/requests/index.js +0 -2
  38. package/dist/sdk/api/resources/dataPools/index.d.ts +0 -1
  39. package/dist/sdk/api/resources/dataPools/index.js +0 -17
  40. package/dist/sdk/api/resources/index.d.ts +0 -5
  41. package/dist/sdk/api/resources/index.js +0 -44
  42. package/dist/sdk/api/resources/serviceExecutions/client/Client.d.ts +0 -90
  43. package/dist/sdk/api/resources/serviceExecutions/client/Client.js +0 -271
  44. package/dist/sdk/api/resources/serviceExecutions/client/index.d.ts +0 -1
  45. package/dist/sdk/api/resources/serviceExecutions/client/index.js +0 -2
  46. package/dist/sdk/api/resources/serviceExecutions/index.d.ts +0 -1
  47. package/dist/sdk/api/resources/serviceExecutions/index.js +0 -17
  48. package/dist/sdk/api/resources/serviceJobs/client/Client.d.ts +0 -138
  49. package/dist/sdk/api/resources/serviceJobs/client/Client.js +0 -489
  50. package/dist/sdk/api/resources/serviceJobs/client/index.d.ts +0 -2
  51. package/dist/sdk/api/resources/serviceJobs/client/index.js +0 -17
  52. package/dist/sdk/api/resources/serviceJobs/client/requests/CreateServiceJobRequest.d.ts +0 -15
  53. package/dist/sdk/api/resources/serviceJobs/client/requests/CreateServiceJobRequest.js +0 -5
  54. package/dist/sdk/api/resources/serviceJobs/client/requests/index.d.ts +0 -1
  55. package/dist/sdk/api/resources/serviceJobs/client/requests/index.js +0 -2
  56. package/dist/sdk/api/resources/serviceJobs/index.d.ts +0 -1
  57. package/dist/sdk/api/resources/serviceJobs/index.js +0 -17
  58. package/dist/sdk/api/types/ActivityInstance.d.ts +0 -20
  59. package/dist/sdk/api/types/ActivityInstance.js +0 -14
  60. package/dist/sdk/api/types/DataPoolDto.d.ts +0 -28
  61. package/dist/sdk/api/types/DataPoolDto.js +0 -14
  62. package/dist/sdk/api/types/DataPoolFileDto.d.ts +0 -19
  63. package/dist/sdk/api/types/DataPoolFileDto.js +0 -5
  64. package/dist/sdk/api/types/LogEntry.d.ts +0 -24
  65. package/dist/sdk/api/types/LogEntry.js +0 -16
  66. package/dist/sdk/api/types/MetricDataPoint.d.ts +0 -12
  67. package/dist/sdk/api/types/MetricDataPoint.js +0 -5
  68. package/dist/sdk/api/types/OauthScope.d.ts +0 -9
  69. package/dist/sdk/api/types/OauthScope.js +0 -9
  70. package/dist/sdk/api/types/ServiceExecutionDto.d.ts +0 -21
  71. package/dist/sdk/api/types/ServiceExecutionDto.js +0 -17
  72. package/dist/sdk/api/types/ServiceExecutionLogs.d.ts +0 -5
  73. package/dist/sdk/api/types/ServiceExecutionLogs.js +0 -5
  74. package/dist/sdk/api/types/ServiceExecutionMetrics.d.ts +0 -23
  75. package/dist/sdk/api/types/ServiceExecutionMetrics.js +0 -5
  76. package/dist/sdk/api/types/ServiceJobDto.d.ts +0 -46
  77. package/dist/sdk/api/types/ServiceJobDto.js +0 -22
  78. package/dist/sdk/api/types/VariableInstance.d.ts +0 -9
  79. package/dist/sdk/api/types/VariableInstance.js +0 -5
  80. package/dist/sdk/api/types/WorkflowInstance.d.ts +0 -23
  81. package/dist/sdk/api/types/WorkflowInstance.js +0 -17
  82. package/dist/sdk/api/types/WorkflowServiceExecutionDto.d.ts +0 -8
  83. package/dist/sdk/api/types/WorkflowServiceExecutionDto.js +0 -5
  84. package/dist/sdk/api/types/index.d.ts +0 -13
  85. package/dist/sdk/api/types/index.js +0 -29
  86. package/dist/sdk/core/exports.d.ts +0 -1
  87. package/dist/sdk/core/exports.js +0 -17
  88. package/dist/sdk/core/fetcher/APIResponse.d.ts +0 -20
  89. package/dist/sdk/core/fetcher/APIResponse.js +0 -2
  90. package/dist/sdk/core/fetcher/BinaryResponse.d.ts +0 -20
  91. package/dist/sdk/core/fetcher/BinaryResponse.js +0 -17
  92. package/dist/sdk/core/fetcher/Fetcher.d.ts +0 -40
  93. package/dist/sdk/core/fetcher/Fetcher.js +0 -105
  94. package/dist/sdk/core/fetcher/Headers.d.ts +0 -2
  95. package/dist/sdk/core/fetcher/Headers.js +0 -85
  96. package/dist/sdk/core/fetcher/HttpResponsePromise.d.ts +0 -58
  97. package/dist/sdk/core/fetcher/HttpResponsePromise.js +0 -94
  98. package/dist/sdk/core/fetcher/RawResponse.d.ts +0 -29
  99. package/dist/sdk/core/fetcher/RawResponse.js +0 -44
  100. package/dist/sdk/core/fetcher/ResponseWithBody.d.ts +0 -4
  101. package/dist/sdk/core/fetcher/ResponseWithBody.js +0 -6
  102. package/dist/sdk/core/fetcher/Supplier.d.ts +0 -4
  103. package/dist/sdk/core/fetcher/Supplier.js +0 -13
  104. package/dist/sdk/core/fetcher/createRequestUrl.d.ts +0 -1
  105. package/dist/sdk/core/fetcher/createRequestUrl.js +0 -8
  106. package/dist/sdk/core/fetcher/getErrorResponseBody.d.ts +0 -1
  107. package/dist/sdk/core/fetcher/getErrorResponseBody.js +0 -32
  108. package/dist/sdk/core/fetcher/getFetchFn.d.ts +0 -1
  109. package/dist/sdk/core/fetcher/getFetchFn.js +0 -6
  110. package/dist/sdk/core/fetcher/getHeader.d.ts +0 -1
  111. package/dist/sdk/core/fetcher/getHeader.js +0 -11
  112. package/dist/sdk/core/fetcher/getRequestBody.d.ts +0 -7
  113. package/dist/sdk/core/fetcher/getRequestBody.js +0 -12
  114. package/dist/sdk/core/fetcher/getResponseBody.d.ts +0 -1
  115. package/dist/sdk/core/fetcher/getResponseBody.js +0 -44
  116. package/dist/sdk/core/fetcher/index.d.ts +0 -9
  117. package/dist/sdk/core/fetcher/index.js +0 -15
  118. package/dist/sdk/core/fetcher/makeRequest.d.ts +0 -1
  119. package/dist/sdk/core/fetcher/makeRequest.js +0 -33
  120. package/dist/sdk/core/fetcher/requestWithRetries.d.ts +0 -1
  121. package/dist/sdk/core/fetcher/requestWithRetries.js +0 -29
  122. package/dist/sdk/core/fetcher/signals.d.ts +0 -11
  123. package/dist/sdk/core/fetcher/signals.js +0 -36
  124. package/dist/sdk/core/file/exports.d.ts +0 -1
  125. package/dist/sdk/core/file/exports.js +0 -2
  126. package/dist/sdk/core/file/file.d.ts +0 -5
  127. package/dist/sdk/core/file/file.js +0 -185
  128. package/dist/sdk/core/file/index.d.ts +0 -2
  129. package/dist/sdk/core/file/index.js +0 -18
  130. package/dist/sdk/core/file/types.d.ts +0 -66
  131. package/dist/sdk/core/file/types.js +0 -2
  132. package/dist/sdk/core/form-data-utils/FormDataWrapper.d.ts +0 -16
  133. package/dist/sdk/core/form-data-utils/FormDataWrapper.js +0 -175
  134. package/dist/sdk/core/form-data-utils/encodeAsFormParameter.d.ts +0 -1
  135. package/dist/sdk/core/form-data-utils/encodeAsFormParameter.js +0 -12
  136. package/dist/sdk/core/form-data-utils/index.d.ts +0 -2
  137. package/dist/sdk/core/form-data-utils/index.js +0 -20
  138. package/dist/sdk/core/headers.d.ts +0 -3
  139. package/dist/sdk/core/headers.js +0 -29
  140. package/dist/sdk/core/index.d.ts +0 -5
  141. package/dist/sdk/core/index.js +0 -44
  142. package/dist/sdk/core/json.d.ts +0 -15
  143. package/dist/sdk/core/json.js +0 -24
  144. package/dist/sdk/core/runtime/index.d.ts +0 -1
  145. package/dist/sdk/core/runtime/index.js +0 -5
  146. package/dist/sdk/core/runtime/runtime.d.ts +0 -9
  147. package/dist/sdk/core/runtime/runtime.js +0 -101
  148. package/dist/sdk/core/url/index.d.ts +0 -2
  149. package/dist/sdk/core/url/index.js +0 -7
  150. package/dist/sdk/core/url/join.d.ts +0 -1
  151. package/dist/sdk/core/url/join.js +0 -69
  152. package/dist/sdk/core/url/qs.d.ts +0 -6
  153. package/dist/sdk/core/url/qs.js +0 -67
  154. package/dist/sdk/environments.d.ts +0 -7
  155. package/dist/sdk/environments.js +0 -9
  156. package/dist/sdk/errors/PlanqkApiError.d.ts +0 -15
  157. package/dist/sdk/errors/PlanqkApiError.js +0 -33
  158. package/dist/sdk/errors/PlanqkApiTimeoutError.d.ts +0 -6
  159. package/dist/sdk/errors/PlanqkApiTimeoutError.js +0 -13
  160. package/dist/sdk/errors/index.d.ts +0 -2
  161. package/dist/sdk/errors/index.js +0 -7
  162. package/dist/sdk/exports.d.ts +0 -1
  163. package/dist/sdk/exports.js +0 -17
  164. package/dist/sdk/index.d.ts +0 -5
  165. package/dist/sdk/index.js +0 -48
@@ -1,2 +0,0 @@
1
- export {};
2
- export * from "./requests/index.js";
@@ -1,17 +0,0 @@
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("./requests/index.js"), exports);
@@ -1,14 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as core from "../../../../../core/index.js";
5
- /**
6
- * @example
7
- * {
8
- * file: fs.createReadStream("/path/to/your/file")
9
- * }
10
- */
11
- export interface AddDataPoolFileRequest {
12
- filename?: string;
13
- file: core.file.Uploadable.FileLike;
14
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * @example
6
- * {}
7
- */
8
- export interface CreateDataPoolRequest {
9
- /** The name of the data pool. Must be at least 3 characters and at most 255 characters long. */
10
- name?: string;
11
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * @example
6
- * {}
7
- */
8
- export interface UpdateDataPoolRequest {
9
- /** The name of the data pool. Must be at least 3 characters and at most 255 characters long. */
10
- name?: string;
11
- /** Short description of the data pool. */
12
- shortDescription?: string;
13
- /** Detailed description of the data pool. */
14
- description?: string;
15
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- export { type UpdateDataPoolRequest } from "./UpdateDataPoolRequest.js";
2
- export { type CreateDataPoolRequest } from "./CreateDataPoolRequest.js";
3
- export { type AddDataPoolFileRequest } from "./AddDataPoolFileRequest.js";
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export * from "./client/index.js";
@@ -1,17 +0,0 @@
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("./client/index.js"), exports);
@@ -1,5 +0,0 @@
1
- export * as serviceJobs from "./serviceJobs/index.js";
2
- export * as dataPools from "./dataPools/index.js";
3
- export * as serviceExecutions from "./serviceExecutions/index.js";
4
- export * from "./serviceJobs/client/requests/index.js";
5
- export * from "./dataPools/client/requests/index.js";
@@ -1,44 +0,0 @@
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
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.serviceExecutions = exports.dataPools = exports.serviceJobs = void 0;
40
- exports.serviceJobs = __importStar(require("./serviceJobs/index.js"));
41
- exports.dataPools = __importStar(require("./dataPools/index.js"));
42
- exports.serviceExecutions = __importStar(require("./serviceExecutions/index.js"));
43
- __exportStar(require("./serviceJobs/client/requests/index.js"), exports);
44
- __exportStar(require("./dataPools/client/requests/index.js"), exports);
@@ -1,90 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as environments from "../../../../environments.js";
5
- import * as core from "../../../../core/index.js";
6
- import * as PlanqkApi from "../../../index.js";
7
- export declare namespace ServiceExecutions {
8
- interface Options {
9
- environment?: core.Supplier<environments.PlanqkApiEnvironment | string>;
10
- /** Specify a custom URL to connect the client to. */
11
- baseUrl?: core.Supplier<string>;
12
- apiKey: core.Supplier<string>;
13
- /** Override the X-OrganizationId header */
14
- organizationId?: core.Supplier<string | undefined>;
15
- /** Additional headers to include in requests. */
16
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
17
- }
18
- interface RequestOptions {
19
- /** The maximum time to wait for a response in seconds. */
20
- timeoutInSeconds?: number;
21
- /** The number of times to retry the request. Defaults to 2. */
22
- maxRetries?: number;
23
- /** A hook to abort the request. */
24
- abortSignal?: AbortSignal;
25
- /** Override the X-OrganizationId header */
26
- organizationId?: string | undefined;
27
- /** Additional query string parameters to include in the request. */
28
- queryParams?: Record<string, unknown>;
29
- /** Additional headers to include in the request. */
30
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
31
- }
32
- }
33
- /**
34
- * Track status, costs, logs, metrics, and results of your service executions.
35
- */
36
- export declare class ServiceExecutions {
37
- protected readonly _options: ServiceExecutions.Options;
38
- constructor(_options: ServiceExecutions.Options);
39
- /**
40
- * Get a specific service execution (identified by its ID).
41
- *
42
- * @param {string} id
43
- * @param {ServiceExecutions.RequestOptions} requestOptions - Request-specific configuration.
44
- *
45
- * @throws {@link PlanqkApi.UnauthorizedError}
46
- * @throws {@link PlanqkApi.ForbiddenError}
47
- * @throws {@link PlanqkApi.NotFoundError}
48
- * @throws {@link PlanqkApi.InternalServerError}
49
- *
50
- * @example
51
- * await client.serviceExecutions.getServiceExecution("id")
52
- */
53
- getServiceExecution(id: string, requestOptions?: ServiceExecutions.RequestOptions): core.HttpResponsePromise<string>;
54
- private __getServiceExecution;
55
- /**
56
- * Check if the tenant has view permission for a specific service execution (identified by its ID).
57
- *
58
- * @param {string} id
59
- * @param {ServiceExecutions.RequestOptions} requestOptions - Request-specific configuration.
60
- *
61
- * @throws {@link PlanqkApi.UnauthorizedError}
62
- * @throws {@link PlanqkApi.ForbiddenError}
63
- * @throws {@link PlanqkApi.NotFoundError}
64
- * @throws {@link PlanqkApi.InternalServerError}
65
- *
66
- * @example
67
- * await client.serviceExecutions.headServiceExecution("id")
68
- */
69
- headServiceExecution(id: string, requestOptions?: ServiceExecutions.RequestOptions): core.HttpResponsePromise<Headers>;
70
- private __headServiceExecution;
71
- /**
72
- * Get resource usage metrics for a specific service execution (identified by its ID).
73
- *
74
- * @param {string} id
75
- * @param {ServiceExecutions.RequestOptions} requestOptions - Request-specific configuration.
76
- *
77
- * @throws {@link PlanqkApi.UnauthorizedError}
78
- * @throws {@link PlanqkApi.ForbiddenError}
79
- * @throws {@link PlanqkApi.NotFoundError}
80
- * @throws {@link PlanqkApi.InternalServerError}
81
- *
82
- * @example
83
- * await client.serviceExecutions.getServiceExecutionMetrics("id")
84
- */
85
- getServiceExecutionMetrics(id: string, requestOptions?: ServiceExecutions.RequestOptions): core.HttpResponsePromise<PlanqkApi.ServiceExecutionMetrics>;
86
- private __getServiceExecutionMetrics;
87
- protected _getCustomAuthorizationHeaders(): Promise<{
88
- "X-Auth-Token": string;
89
- }>;
90
- }
@@ -1,271 +0,0 @@
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.ServiceExecutions = void 0;
40
- const environments = __importStar(require("../../../../environments.js"));
41
- const core = __importStar(require("../../../../core/index.js"));
42
- const PlanqkApi = __importStar(require("../../../index.js"));
43
- const headers_js_1 = require("../../../../core/headers.js");
44
- const errors = __importStar(require("../../../../errors/index.js"));
45
- /**
46
- * Track status, costs, logs, metrics, and results of your service executions.
47
- */
48
- class ServiceExecutions {
49
- _options;
50
- constructor(_options) {
51
- this._options = _options;
52
- }
53
- /**
54
- * Get a specific service execution (identified by its ID).
55
- *
56
- * @param {string} id
57
- * @param {ServiceExecutions.RequestOptions} requestOptions - Request-specific configuration.
58
- *
59
- * @throws {@link PlanqkApi.UnauthorizedError}
60
- * @throws {@link PlanqkApi.ForbiddenError}
61
- * @throws {@link PlanqkApi.NotFoundError}
62
- * @throws {@link PlanqkApi.InternalServerError}
63
- *
64
- * @example
65
- * await client.serviceExecutions.getServiceExecution("id")
66
- */
67
- getServiceExecution(id, requestOptions) {
68
- return core.HttpResponsePromise.fromPromise(this.__getServiceExecution(id, requestOptions));
69
- }
70
- async __getServiceExecution(id, requestOptions) {
71
- let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
72
- "X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
73
- ...(await this._getCustomAuthorizationHeaders()),
74
- }), requestOptions?.headers);
75
- const _response = await core.fetcher({
76
- url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
77
- (await core.Supplier.get(this._options.environment)) ??
78
- environments.PlanqkApiEnvironment.Default, `service-executions/v1/${encodeURIComponent(id)}`),
79
- method: "GET",
80
- headers: _headers,
81
- queryParameters: requestOptions?.queryParams,
82
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
83
- maxRetries: requestOptions?.maxRetries,
84
- withCredentials: true,
85
- abortSignal: requestOptions?.abortSignal,
86
- });
87
- if (_response.ok) {
88
- return { data: _response.body, rawResponse: _response.rawResponse };
89
- }
90
- if (_response.error.reason === "status-code") {
91
- switch (_response.error.statusCode) {
92
- case 401:
93
- throw new PlanqkApi.UnauthorizedError(_response.error.body, _response.rawResponse);
94
- case 403:
95
- throw new PlanqkApi.ForbiddenError(_response.error.body, _response.rawResponse);
96
- case 404:
97
- throw new PlanqkApi.NotFoundError(_response.error.body, _response.rawResponse);
98
- case 500:
99
- throw new PlanqkApi.InternalServerError(_response.error.body, _response.rawResponse);
100
- default:
101
- throw new errors.PlanqkApiError({
102
- statusCode: _response.error.statusCode,
103
- body: _response.error.body,
104
- rawResponse: _response.rawResponse,
105
- });
106
- }
107
- }
108
- switch (_response.error.reason) {
109
- case "non-json":
110
- throw new errors.PlanqkApiError({
111
- statusCode: _response.error.statusCode,
112
- body: _response.error.rawBody,
113
- rawResponse: _response.rawResponse,
114
- });
115
- case "timeout":
116
- throw new errors.PlanqkApiTimeoutError("Timeout exceeded when calling GET /service-executions/v1/{id}.");
117
- case "unknown":
118
- throw new errors.PlanqkApiError({
119
- message: _response.error.errorMessage,
120
- rawResponse: _response.rawResponse,
121
- });
122
- }
123
- }
124
- /**
125
- * Check if the tenant has view permission for a specific service execution (identified by its ID).
126
- *
127
- * @param {string} id
128
- * @param {ServiceExecutions.RequestOptions} requestOptions - Request-specific configuration.
129
- *
130
- * @throws {@link PlanqkApi.UnauthorizedError}
131
- * @throws {@link PlanqkApi.ForbiddenError}
132
- * @throws {@link PlanqkApi.NotFoundError}
133
- * @throws {@link PlanqkApi.InternalServerError}
134
- *
135
- * @example
136
- * await client.serviceExecutions.headServiceExecution("id")
137
- */
138
- headServiceExecution(id, requestOptions) {
139
- return core.HttpResponsePromise.fromPromise(this.__headServiceExecution(id, requestOptions));
140
- }
141
- async __headServiceExecution(id, requestOptions) {
142
- let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
143
- "X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
144
- ...(await this._getCustomAuthorizationHeaders()),
145
- }), requestOptions?.headers);
146
- const _response = await core.fetcher({
147
- url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
148
- (await core.Supplier.get(this._options.environment)) ??
149
- environments.PlanqkApiEnvironment.Default, `service-executions/v1/${encodeURIComponent(id)}`),
150
- method: "HEAD",
151
- headers: _headers,
152
- queryParameters: requestOptions?.queryParams,
153
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
154
- maxRetries: requestOptions?.maxRetries,
155
- withCredentials: true,
156
- abortSignal: requestOptions?.abortSignal,
157
- });
158
- if (_response.ok) {
159
- return { data: _response.rawResponse.headers, rawResponse: _response.rawResponse };
160
- }
161
- if (_response.error.reason === "status-code") {
162
- switch (_response.error.statusCode) {
163
- case 401:
164
- throw new PlanqkApi.UnauthorizedError(_response.error.body, _response.rawResponse);
165
- case 403:
166
- throw new PlanqkApi.ForbiddenError(_response.error.body, _response.rawResponse);
167
- case 404:
168
- throw new PlanqkApi.NotFoundError(_response.error.body, _response.rawResponse);
169
- case 500:
170
- throw new PlanqkApi.InternalServerError(_response.error.body, _response.rawResponse);
171
- default:
172
- throw new errors.PlanqkApiError({
173
- statusCode: _response.error.statusCode,
174
- body: _response.error.body,
175
- rawResponse: _response.rawResponse,
176
- });
177
- }
178
- }
179
- switch (_response.error.reason) {
180
- case "non-json":
181
- throw new errors.PlanqkApiError({
182
- statusCode: _response.error.statusCode,
183
- body: _response.error.rawBody,
184
- rawResponse: _response.rawResponse,
185
- });
186
- case "timeout":
187
- throw new errors.PlanqkApiTimeoutError("Timeout exceeded when calling HEAD /service-executions/v1/{id}.");
188
- case "unknown":
189
- throw new errors.PlanqkApiError({
190
- message: _response.error.errorMessage,
191
- rawResponse: _response.rawResponse,
192
- });
193
- }
194
- }
195
- /**
196
- * Get resource usage metrics for a specific service execution (identified by its ID).
197
- *
198
- * @param {string} id
199
- * @param {ServiceExecutions.RequestOptions} requestOptions - Request-specific configuration.
200
- *
201
- * @throws {@link PlanqkApi.UnauthorizedError}
202
- * @throws {@link PlanqkApi.ForbiddenError}
203
- * @throws {@link PlanqkApi.NotFoundError}
204
- * @throws {@link PlanqkApi.InternalServerError}
205
- *
206
- * @example
207
- * await client.serviceExecutions.getServiceExecutionMetrics("id")
208
- */
209
- getServiceExecutionMetrics(id, requestOptions) {
210
- return core.HttpResponsePromise.fromPromise(this.__getServiceExecutionMetrics(id, requestOptions));
211
- }
212
- async __getServiceExecutionMetrics(id, requestOptions) {
213
- let _headers = (0, headers_js_1.mergeHeaders)(this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
214
- "X-OrganizationId": requestOptions?.organizationId ?? this._options?.organizationId,
215
- ...(await this._getCustomAuthorizationHeaders()),
216
- }), requestOptions?.headers);
217
- const _response = await core.fetcher({
218
- url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
219
- (await core.Supplier.get(this._options.environment)) ??
220
- environments.PlanqkApiEnvironment.Default, `service-executions/v1/${encodeURIComponent(id)}/metrics`),
221
- method: "GET",
222
- headers: _headers,
223
- queryParameters: requestOptions?.queryParams,
224
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
225
- maxRetries: requestOptions?.maxRetries,
226
- withCredentials: true,
227
- abortSignal: requestOptions?.abortSignal,
228
- });
229
- if (_response.ok) {
230
- return { data: _response.body, rawResponse: _response.rawResponse };
231
- }
232
- if (_response.error.reason === "status-code") {
233
- switch (_response.error.statusCode) {
234
- case 401:
235
- throw new PlanqkApi.UnauthorizedError(_response.error.body, _response.rawResponse);
236
- case 403:
237
- throw new PlanqkApi.ForbiddenError(_response.error.body, _response.rawResponse);
238
- case 404:
239
- throw new PlanqkApi.NotFoundError(_response.error.body, _response.rawResponse);
240
- case 500:
241
- throw new PlanqkApi.InternalServerError(_response.error.body, _response.rawResponse);
242
- default:
243
- throw new errors.PlanqkApiError({
244
- statusCode: _response.error.statusCode,
245
- body: _response.error.body,
246
- rawResponse: _response.rawResponse,
247
- });
248
- }
249
- }
250
- switch (_response.error.reason) {
251
- case "non-json":
252
- throw new errors.PlanqkApiError({
253
- statusCode: _response.error.statusCode,
254
- body: _response.error.rawBody,
255
- rawResponse: _response.rawResponse,
256
- });
257
- case "timeout":
258
- throw new errors.PlanqkApiTimeoutError("Timeout exceeded when calling GET /service-executions/v1/{id}/metrics.");
259
- case "unknown":
260
- throw new errors.PlanqkApiError({
261
- message: _response.error.errorMessage,
262
- rawResponse: _response.rawResponse,
263
- });
264
- }
265
- }
266
- async _getCustomAuthorizationHeaders() {
267
- const apiKeyValue = await core.Supplier.get(this._options.apiKey);
268
- return { "X-Auth-Token": apiKeyValue };
269
- }
270
- }
271
- exports.ServiceExecutions = ServiceExecutions;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export * from "./client/index.js";
@@ -1,17 +0,0 @@
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("./client/index.js"), exports);