@aignostics/sdk 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1375 @@
1
+ import globalAxios2, { isAxiosError } from 'axios';
2
+ import z from 'zod';
3
+
4
+ // package.json
5
+ var package_default = {
6
+ version: "0.0.0-development"};
7
+ var BASE_PATH = "https://raw.githubusercontent.com/api".replace(/\/+$/, "");
8
+ var BaseAPI = class {
9
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios2) {
10
+ this.basePath = basePath;
11
+ this.axios = axios;
12
+ if (configuration) {
13
+ this.configuration = configuration;
14
+ this.basePath = configuration.basePath ?? basePath;
15
+ }
16
+ }
17
+ configuration;
18
+ };
19
+ var RequiredError = class extends Error {
20
+ constructor(field, msg) {
21
+ super(msg);
22
+ this.field = field;
23
+ this.name = "RequiredError";
24
+ }
25
+ };
26
+ var operationServerMap = {};
27
+
28
+ // src/generated/common.ts
29
+ var DUMMY_BASE_URL = "https://example.com";
30
+ var assertParamExists = function(functionName, paramName, paramValue) {
31
+ if (paramValue === null || paramValue === void 0) {
32
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
33
+ }
34
+ };
35
+ var setOAuthToObject = async function(object, name, scopes, configuration) {
36
+ if (configuration && configuration.accessToken) {
37
+ const localVarAccessTokenValue = typeof configuration.accessToken === "function" ? await configuration.accessToken(name, scopes) : await configuration.accessToken;
38
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
39
+ }
40
+ };
41
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
42
+ if (parameter == null) return;
43
+ if (typeof parameter === "object") {
44
+ if (Array.isArray(parameter)) {
45
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
46
+ } else {
47
+ Object.keys(parameter).forEach(
48
+ (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
49
+ );
50
+ }
51
+ } else {
52
+ if (urlSearchParams.has(key)) {
53
+ urlSearchParams.append(key, parameter);
54
+ } else {
55
+ urlSearchParams.set(key, parameter);
56
+ }
57
+ }
58
+ }
59
+ var setSearchParams = function(url, ...objects) {
60
+ const searchParams = new URLSearchParams(url.search);
61
+ setFlattenedQueryParams(searchParams, objects);
62
+ url.search = searchParams.toString();
63
+ };
64
+ var serializeDataIfNeeded = function(value, requestOptions, configuration) {
65
+ const nonString = typeof value !== "string";
66
+ const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
67
+ return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}) : value || "";
68
+ };
69
+ var toPathString = function(url) {
70
+ return url.pathname + url.search + url.hash;
71
+ };
72
+ var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
73
+ return (axios = globalAxios3, basePath = BASE_PATH2) => {
74
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
75
+ return axios.request(axiosRequestArgs);
76
+ };
77
+ };
78
+
79
+ // src/generated/api.ts
80
+ var ApplicationRunStatus = {
81
+ CanceledSystem: "CANCELED_SYSTEM",
82
+ CanceledUser: "CANCELED_USER",
83
+ Completed: "COMPLETED",
84
+ CompletedWithError: "COMPLETED_WITH_ERROR",
85
+ Received: "RECEIVED",
86
+ Rejected: "REJECTED",
87
+ Running: "RUNNING",
88
+ Scheduled: "SCHEDULED"
89
+ };
90
+ var ItemStatus = {
91
+ Pending: "PENDING",
92
+ CanceledUser: "CANCELED_USER",
93
+ CanceledSystem: "CANCELED_SYSTEM",
94
+ ErrorUser: "ERROR_USER",
95
+ ErrorSystem: "ERROR_SYSTEM",
96
+ Succeeded: "SUCCEEDED"
97
+ };
98
+ var OutputArtifactScope = {
99
+ Item: "ITEM",
100
+ Global: "GLOBAL"
101
+ };
102
+ var PublicApiAxiosParamCreator = function(configuration) {
103
+ return {
104
+ /**
105
+ * The application run can be canceled by the user who created the application run. The execution can be canceled any time while the application is not in a final state. The pending items will not be processed and will not add to the cost. When the application is canceled, the already completed items stay available for download.
106
+ * @summary Cancel Application Run
107
+ * @param {string} applicationRunId Application run id, returned by `POST /runs/` endpoint
108
+ * @param {*} [options] Override http request option.
109
+ * @throws {RequiredError}
110
+ */
111
+ cancelApplicationRunV1RunsApplicationRunIdCancelPost: async (applicationRunId, options = {}) => {
112
+ assertParamExists("cancelApplicationRunV1RunsApplicationRunIdCancelPost", "applicationRunId", applicationRunId);
113
+ const localVarPath = `/v1/runs/{application_run_id}/cancel`.replace(`{${"application_run_id"}}`, encodeURIComponent(String(applicationRunId)));
114
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
115
+ let baseOptions;
116
+ if (configuration) {
117
+ baseOptions = configuration.baseOptions;
118
+ }
119
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
120
+ const localVarHeaderParameter = {};
121
+ const localVarQueryParameter = {};
122
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
123
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
124
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
125
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
126
+ return {
127
+ url: toPathString(localVarUrlObj),
128
+ options: localVarRequestOptions
129
+ };
130
+ },
131
+ /**
132
+ * The endpoint is used to process the input items by the chosen application version. The endpoint returns the `application_run_id`. The processing fo the items is done asynchronously. To check the status or cancel the execution, use the /v1/runs/{application_run_id} endpoint. ### Payload The payload includes `application_version_id` and `items` base fields. `application_version_id` is the id used for `/v1/versions/{application_id}` endpoint. `items` includes the list of the items to process (slides, in case of HETA application). Every item has a set of standard fields defined by the API, plus the metadata, specific to the chosen application. Example payload structure with the comments: ``` { application_version_id: \"test-app:v0.0.2\", items: [{ \"reference\": \"slide_1\", <-- Input ID to connect the input and the output artifact \"input_artifacts\": [{ \"name\": \"input_slide\", <-- Name of the artifact defined by the application (For HETA it is\"input_slide\") \"download_url\": \"https://...\", <-- signed URL to the input file in the S3 or GCS. Should be valid for more than 6 days \"metadata\": { <-- The metadata fields defined by the application. (The example fields set for a slide files are provided) \"checksum_base64_crc32c\": \"abc12==\", \"mime_type\": \"image/tiff\", \"height\": 100, \"weight\": 500, \"mpp\": 0.543 } }] }] } ``` ### Response The endpoint returns the application run UUID. After that the job is scheduled for the execution in the background. To check the status of the run call `v1/runs/{application_run_id}`. ### Rejection Apart from the authentication, authorization and malformed input error, the request can be rejected when the quota limit is exceeded. More details on quotas is described in the documentation
133
+ * @summary Create Application Run
134
+ * @param {RunCreationRequest} runCreationRequest
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ */
138
+ createApplicationRunV1RunsPost: async (runCreationRequest, options = {}) => {
139
+ assertParamExists("createApplicationRunV1RunsPost", "runCreationRequest", runCreationRequest);
140
+ const localVarPath = `/v1/runs`;
141
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
142
+ let baseOptions;
143
+ if (configuration) {
144
+ baseOptions = configuration.baseOptions;
145
+ }
146
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
147
+ const localVarHeaderParameter = {};
148
+ const localVarQueryParameter = {};
149
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
150
+ localVarHeaderParameter["Content-Type"] = "application/json";
151
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
152
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
153
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
154
+ localVarRequestOptions.data = serializeDataIfNeeded(runCreationRequest, localVarRequestOptions, configuration);
155
+ return {
156
+ url: toPathString(localVarUrlObj),
157
+ options: localVarRequestOptions
158
+ };
159
+ },
160
+ /**
161
+ * Delete the application run results. It can only be called when the application is in a final state (meaning it\'s not in `received` or `pending` states). To delete the results of the running artifacts, first call `POST /v1/runs/{application_run_id}/cancel` to cancel the application run. The output results are deleted automatically 30 days after the application run is finished.
162
+ * @summary Delete Application Run Results
163
+ * @param {string} applicationRunId Application run id, returned by &#x60;POST /runs/&#x60; endpoint
164
+ * @param {*} [options] Override http request option.
165
+ * @throws {RequiredError}
166
+ */
167
+ deleteApplicationRunResultsV1RunsApplicationRunIdResultsDelete: async (applicationRunId, options = {}) => {
168
+ assertParamExists("deleteApplicationRunResultsV1RunsApplicationRunIdResultsDelete", "applicationRunId", applicationRunId);
169
+ const localVarPath = `/v1/runs/{application_run_id}/results`.replace(`{${"application_run_id"}}`, encodeURIComponent(String(applicationRunId)));
170
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
171
+ let baseOptions;
172
+ if (configuration) {
173
+ baseOptions = configuration.baseOptions;
174
+ }
175
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
176
+ const localVarHeaderParameter = {};
177
+ const localVarQueryParameter = {};
178
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
179
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
180
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
181
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
182
+ return {
183
+ url: toPathString(localVarUrlObj),
184
+ options: localVarRequestOptions
185
+ };
186
+ },
187
+ /**
188
+ *
189
+ * @summary Get Me
190
+ * @param {*} [options] Override http request option.
191
+ * @throws {RequiredError}
192
+ */
193
+ getMeV1MeGet: async (options = {}) => {
194
+ const localVarPath = `/v1/me`;
195
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
196
+ let baseOptions;
197
+ if (configuration) {
198
+ baseOptions = configuration.baseOptions;
199
+ }
200
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
201
+ const localVarHeaderParameter = {};
202
+ const localVarQueryParameter = {};
203
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
204
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
205
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
206
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
207
+ return {
208
+ url: toPathString(localVarUrlObj),
209
+ options: localVarRequestOptions
210
+ };
211
+ },
212
+ /**
213
+ * Returns the details of the application run. The application run is available as soon as it is created via `POST /runs/` endpoint. To download the items results, call `/runs/{application_run_id}/results`. The application is only available to the user who triggered it, regardless of the role.
214
+ * @summary Get Run
215
+ * @param {string} applicationRunId Application run id, returned by &#x60;POST /runs/&#x60; endpoint
216
+ * @param {Array<any> | null} [include]
217
+ * @param {*} [options] Override http request option.
218
+ * @throws {RequiredError}
219
+ */
220
+ getRunV1RunsApplicationRunIdGet: async (applicationRunId, include, options = {}) => {
221
+ assertParamExists("getRunV1RunsApplicationRunIdGet", "applicationRunId", applicationRunId);
222
+ const localVarPath = `/v1/runs/{application_run_id}`.replace(`{${"application_run_id"}}`, encodeURIComponent(String(applicationRunId)));
223
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
224
+ let baseOptions;
225
+ if (configuration) {
226
+ baseOptions = configuration.baseOptions;
227
+ }
228
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
229
+ const localVarHeaderParameter = {};
230
+ const localVarQueryParameter = {};
231
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
232
+ if (include) {
233
+ localVarQueryParameter["include"] = include;
234
+ }
235
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
236
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
237
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
238
+ return {
239
+ url: toPathString(localVarUrlObj),
240
+ options: localVarRequestOptions
241
+ };
242
+ },
243
+ /**
244
+ * The endpoint returns the application runs triggered by the caller. After the application run is created by POST /v1/runs, it becomes available for the current endpoint
245
+ * @summary List Application Runs
246
+ * @param {string | null} [applicationId] Optional application ID filter
247
+ * @param {string | null} [applicationVersion] Optional application version filter
248
+ * @param {Array<any> | null} [include] Request optional output values. Used internally by the platform
249
+ * @param {number} [page]
250
+ * @param {number} [pageSize]
251
+ * @param {Array<string> | null} [sort]
252
+ * @param {*} [options] Override http request option.
253
+ * @throws {RequiredError}
254
+ */
255
+ listApplicationRunsV1RunsGet: async (applicationId, applicationVersion, include, page, pageSize, sort, options = {}) => {
256
+ const localVarPath = `/v1/runs`;
257
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
258
+ let baseOptions;
259
+ if (configuration) {
260
+ baseOptions = configuration.baseOptions;
261
+ }
262
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
263
+ const localVarHeaderParameter = {};
264
+ const localVarQueryParameter = {};
265
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
266
+ if (applicationId !== void 0) {
267
+ localVarQueryParameter["application_id"] = applicationId;
268
+ }
269
+ if (applicationVersion !== void 0) {
270
+ localVarQueryParameter["application_version"] = applicationVersion;
271
+ }
272
+ if (include) {
273
+ localVarQueryParameter["include"] = include;
274
+ }
275
+ if (page !== void 0) {
276
+ localVarQueryParameter["page"] = page;
277
+ }
278
+ if (pageSize !== void 0) {
279
+ localVarQueryParameter["page_size"] = pageSize;
280
+ }
281
+ if (sort) {
282
+ localVarQueryParameter["sort"] = sort;
283
+ }
284
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
285
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
286
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
287
+ return {
288
+ url: toPathString(localVarUrlObj),
289
+ options: localVarRequestOptions
290
+ };
291
+ },
292
+ /**
293
+ * Returns the list of the applications, available to the caller. The application is available if any of the version of the application is assigned to the user organization. To switch between organizations, the user should re-login and choose the needed organization.
294
+ * @summary List Applications
295
+ * @param {number} [page]
296
+ * @param {number} [pageSize]
297
+ * @param {Array<string> | null} [sort]
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ */
301
+ listApplicationsV1ApplicationsGet: async (page, pageSize, sort, options = {}) => {
302
+ const localVarPath = `/v1/applications`;
303
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
304
+ let baseOptions;
305
+ if (configuration) {
306
+ baseOptions = configuration.baseOptions;
307
+ }
308
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
309
+ const localVarHeaderParameter = {};
310
+ const localVarQueryParameter = {};
311
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
312
+ if (page !== void 0) {
313
+ localVarQueryParameter["page"] = page;
314
+ }
315
+ if (pageSize !== void 0) {
316
+ localVarQueryParameter["page_size"] = pageSize;
317
+ }
318
+ if (sort) {
319
+ localVarQueryParameter["sort"] = sort;
320
+ }
321
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
322
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
323
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
324
+ return {
325
+ url: toPathString(localVarUrlObj),
326
+ options: localVarRequestOptions
327
+ };
328
+ },
329
+ /**
330
+ * Get the list of the results for the run items
331
+ * @summary List Run Results
332
+ * @param {string} applicationRunId Application run id, returned by &#x60;POST /runs/&#x60; endpoint
333
+ * @param {Array<string> | null} [itemIdIn] Filter for items ids
334
+ * @param {Array<string> | null} [referenceIn] Filter for items by their reference from the input payload
335
+ * @param {Array<ItemStatus> | null} [statusIn] Filter for items in certain statuses
336
+ * @param {number} [page]
337
+ * @param {number} [pageSize]
338
+ * @param {Array<string> | null} [sort]
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ */
342
+ listRunResultsV1RunsApplicationRunIdResultsGet: async (applicationRunId, itemIdIn, referenceIn, statusIn, page, pageSize, sort, options = {}) => {
343
+ assertParamExists("listRunResultsV1RunsApplicationRunIdResultsGet", "applicationRunId", applicationRunId);
344
+ const localVarPath = `/v1/runs/{application_run_id}/results`.replace(`{${"application_run_id"}}`, encodeURIComponent(String(applicationRunId)));
345
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
346
+ let baseOptions;
347
+ if (configuration) {
348
+ baseOptions = configuration.baseOptions;
349
+ }
350
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
351
+ const localVarHeaderParameter = {};
352
+ const localVarQueryParameter = {};
353
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
354
+ if (itemIdIn) {
355
+ localVarQueryParameter["item_id__in"] = itemIdIn;
356
+ }
357
+ if (referenceIn) {
358
+ localVarQueryParameter["reference__in"] = referenceIn;
359
+ }
360
+ if (statusIn) {
361
+ localVarQueryParameter["status__in"] = statusIn;
362
+ }
363
+ if (page !== void 0) {
364
+ localVarQueryParameter["page"] = page;
365
+ }
366
+ if (pageSize !== void 0) {
367
+ localVarQueryParameter["page_size"] = pageSize;
368
+ }
369
+ if (sort) {
370
+ localVarQueryParameter["sort"] = sort;
371
+ }
372
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
373
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
374
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
375
+ return {
376
+ url: toPathString(localVarUrlObj),
377
+ options: localVarRequestOptions
378
+ };
379
+ },
380
+ /**
381
+ * Returns the list of the application versions for this application, available to the caller. The application version is available if it is assigned to the user\'s organization. The application versions are assigned to the organization by the Aignostics admin. To assign or unassign a version from your organization, please contact Aignostics support team.
382
+ * @summary List Versions By Application Id
383
+ * @param {string} applicationId
384
+ * @param {number} [page]
385
+ * @param {number} [pageSize]
386
+ * @param {string | null} [version]
387
+ * @param {Array<any> | null} [include]
388
+ * @param {Array<string> | null} [sort]
389
+ * @param {*} [options] Override http request option.
390
+ * @throws {RequiredError}
391
+ */
392
+ listVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGet: async (applicationId, page, pageSize, version, include, sort, options = {}) => {
393
+ assertParamExists("listVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGet", "applicationId", applicationId);
394
+ const localVarPath = `/v1/applications/{application_id}/versions`.replace(`{${"application_id"}}`, encodeURIComponent(String(applicationId)));
395
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
396
+ let baseOptions;
397
+ if (configuration) {
398
+ baseOptions = configuration.baseOptions;
399
+ }
400
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
401
+ const localVarHeaderParameter = {};
402
+ const localVarQueryParameter = {};
403
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
404
+ if (page !== void 0) {
405
+ localVarQueryParameter["page"] = page;
406
+ }
407
+ if (pageSize !== void 0) {
408
+ localVarQueryParameter["page_size"] = pageSize;
409
+ }
410
+ if (version !== void 0) {
411
+ localVarQueryParameter["version"] = version;
412
+ }
413
+ if (include) {
414
+ localVarQueryParameter["include"] = include;
415
+ }
416
+ if (sort) {
417
+ localVarQueryParameter["sort"] = sort;
418
+ }
419
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
420
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
421
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
422
+ return {
423
+ url: toPathString(localVarUrlObj),
424
+ options: localVarRequestOptions
425
+ };
426
+ }
427
+ };
428
+ };
429
+ var PublicApiFp = function(configuration) {
430
+ const localVarAxiosParamCreator = PublicApiAxiosParamCreator(configuration);
431
+ return {
432
+ /**
433
+ * The application run can be canceled by the user who created the application run. The execution can be canceled any time while the application is not in a final state. The pending items will not be processed and will not add to the cost. When the application is canceled, the already completed items stay available for download.
434
+ * @summary Cancel Application Run
435
+ * @param {string} applicationRunId Application run id, returned by &#x60;POST /runs/&#x60; endpoint
436
+ * @param {*} [options] Override http request option.
437
+ * @throws {RequiredError}
438
+ */
439
+ async cancelApplicationRunV1RunsApplicationRunIdCancelPost(applicationRunId, options) {
440
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cancelApplicationRunV1RunsApplicationRunIdCancelPost(applicationRunId, options);
441
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
442
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.cancelApplicationRunV1RunsApplicationRunIdCancelPost"]?.[localVarOperationServerIndex]?.url;
443
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
444
+ },
445
+ /**
446
+ * The endpoint is used to process the input items by the chosen application version. The endpoint returns the `application_run_id`. The processing fo the items is done asynchronously. To check the status or cancel the execution, use the /v1/runs/{application_run_id} endpoint. ### Payload The payload includes `application_version_id` and `items` base fields. `application_version_id` is the id used for `/v1/versions/{application_id}` endpoint. `items` includes the list of the items to process (slides, in case of HETA application). Every item has a set of standard fields defined by the API, plus the metadata, specific to the chosen application. Example payload structure with the comments: ``` { application_version_id: \"test-app:v0.0.2\", items: [{ \"reference\": \"slide_1\", <-- Input ID to connect the input and the output artifact \"input_artifacts\": [{ \"name\": \"input_slide\", <-- Name of the artifact defined by the application (For HETA it is\"input_slide\") \"download_url\": \"https://...\", <-- signed URL to the input file in the S3 or GCS. Should be valid for more than 6 days \"metadata\": { <-- The metadata fields defined by the application. (The example fields set for a slide files are provided) \"checksum_base64_crc32c\": \"abc12==\", \"mime_type\": \"image/tiff\", \"height\": 100, \"weight\": 500, \"mpp\": 0.543 } }] }] } ``` ### Response The endpoint returns the application run UUID. After that the job is scheduled for the execution in the background. To check the status of the run call `v1/runs/{application_run_id}`. ### Rejection Apart from the authentication, authorization and malformed input error, the request can be rejected when the quota limit is exceeded. More details on quotas is described in the documentation
447
+ * @summary Create Application Run
448
+ * @param {RunCreationRequest} runCreationRequest
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ */
452
+ async createApplicationRunV1RunsPost(runCreationRequest, options) {
453
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createApplicationRunV1RunsPost(runCreationRequest, options);
454
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
455
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.createApplicationRunV1RunsPost"]?.[localVarOperationServerIndex]?.url;
456
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
457
+ },
458
+ /**
459
+ * Delete the application run results. It can only be called when the application is in a final state (meaning it\'s not in `received` or `pending` states). To delete the results of the running artifacts, first call `POST /v1/runs/{application_run_id}/cancel` to cancel the application run. The output results are deleted automatically 30 days after the application run is finished.
460
+ * @summary Delete Application Run Results
461
+ * @param {string} applicationRunId Application run id, returned by &#x60;POST /runs/&#x60; endpoint
462
+ * @param {*} [options] Override http request option.
463
+ * @throws {RequiredError}
464
+ */
465
+ async deleteApplicationRunResultsV1RunsApplicationRunIdResultsDelete(applicationRunId, options) {
466
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteApplicationRunResultsV1RunsApplicationRunIdResultsDelete(applicationRunId, options);
467
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
468
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.deleteApplicationRunResultsV1RunsApplicationRunIdResultsDelete"]?.[localVarOperationServerIndex]?.url;
469
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
470
+ },
471
+ /**
472
+ *
473
+ * @summary Get Me
474
+ * @param {*} [options] Override http request option.
475
+ * @throws {RequiredError}
476
+ */
477
+ async getMeV1MeGet(options) {
478
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getMeV1MeGet(options);
479
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
480
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.getMeV1MeGet"]?.[localVarOperationServerIndex]?.url;
481
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
482
+ },
483
+ /**
484
+ * Returns the details of the application run. The application run is available as soon as it is created via `POST /runs/` endpoint. To download the items results, call `/runs/{application_run_id}/results`. The application is only available to the user who triggered it, regardless of the role.
485
+ * @summary Get Run
486
+ * @param {string} applicationRunId Application run id, returned by &#x60;POST /runs/&#x60; endpoint
487
+ * @param {Array<any> | null} [include]
488
+ * @param {*} [options] Override http request option.
489
+ * @throws {RequiredError}
490
+ */
491
+ async getRunV1RunsApplicationRunIdGet(applicationRunId, include, options) {
492
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRunV1RunsApplicationRunIdGet(applicationRunId, include, options);
493
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
494
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.getRunV1RunsApplicationRunIdGet"]?.[localVarOperationServerIndex]?.url;
495
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
496
+ },
497
+ /**
498
+ * The endpoint returns the application runs triggered by the caller. After the application run is created by POST /v1/runs, it becomes available for the current endpoint
499
+ * @summary List Application Runs
500
+ * @param {string | null} [applicationId] Optional application ID filter
501
+ * @param {string | null} [applicationVersion] Optional application version filter
502
+ * @param {Array<any> | null} [include] Request optional output values. Used internally by the platform
503
+ * @param {number} [page]
504
+ * @param {number} [pageSize]
505
+ * @param {Array<string> | null} [sort]
506
+ * @param {*} [options] Override http request option.
507
+ * @throws {RequiredError}
508
+ */
509
+ async listApplicationRunsV1RunsGet(applicationId, applicationVersion, include, page, pageSize, sort, options) {
510
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listApplicationRunsV1RunsGet(applicationId, applicationVersion, include, page, pageSize, sort, options);
511
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
512
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.listApplicationRunsV1RunsGet"]?.[localVarOperationServerIndex]?.url;
513
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
514
+ },
515
+ /**
516
+ * Returns the list of the applications, available to the caller. The application is available if any of the version of the application is assigned to the user organization. To switch between organizations, the user should re-login and choose the needed organization.
517
+ * @summary List Applications
518
+ * @param {number} [page]
519
+ * @param {number} [pageSize]
520
+ * @param {Array<string> | null} [sort]
521
+ * @param {*} [options] Override http request option.
522
+ * @throws {RequiredError}
523
+ */
524
+ async listApplicationsV1ApplicationsGet(page, pageSize, sort, options) {
525
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listApplicationsV1ApplicationsGet(page, pageSize, sort, options);
526
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
527
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.listApplicationsV1ApplicationsGet"]?.[localVarOperationServerIndex]?.url;
528
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
529
+ },
530
+ /**
531
+ * Get the list of the results for the run items
532
+ * @summary List Run Results
533
+ * @param {string} applicationRunId Application run id, returned by &#x60;POST /runs/&#x60; endpoint
534
+ * @param {Array<string> | null} [itemIdIn] Filter for items ids
535
+ * @param {Array<string> | null} [referenceIn] Filter for items by their reference from the input payload
536
+ * @param {Array<ItemStatus> | null} [statusIn] Filter for items in certain statuses
537
+ * @param {number} [page]
538
+ * @param {number} [pageSize]
539
+ * @param {Array<string> | null} [sort]
540
+ * @param {*} [options] Override http request option.
541
+ * @throws {RequiredError}
542
+ */
543
+ async listRunResultsV1RunsApplicationRunIdResultsGet(applicationRunId, itemIdIn, referenceIn, statusIn, page, pageSize, sort, options) {
544
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listRunResultsV1RunsApplicationRunIdResultsGet(applicationRunId, itemIdIn, referenceIn, statusIn, page, pageSize, sort, options);
545
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
546
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.listRunResultsV1RunsApplicationRunIdResultsGet"]?.[localVarOperationServerIndex]?.url;
547
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
548
+ },
549
+ /**
550
+ * Returns the list of the application versions for this application, available to the caller. The application version is available if it is assigned to the user\'s organization. The application versions are assigned to the organization by the Aignostics admin. To assign or unassign a version from your organization, please contact Aignostics support team.
551
+ * @summary List Versions By Application Id
552
+ * @param {string} applicationId
553
+ * @param {number} [page]
554
+ * @param {number} [pageSize]
555
+ * @param {string | null} [version]
556
+ * @param {Array<any> | null} [include]
557
+ * @param {Array<string> | null} [sort]
558
+ * @param {*} [options] Override http request option.
559
+ * @throws {RequiredError}
560
+ */
561
+ async listVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGet(applicationId, page, pageSize, version, include, sort, options) {
562
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGet(applicationId, page, pageSize, version, include, sort, options);
563
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
564
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.listVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGet"]?.[localVarOperationServerIndex]?.url;
565
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
566
+ }
567
+ };
568
+ };
569
+ var PublicApiFactory = function(configuration, basePath, axios) {
570
+ const localVarFp = PublicApiFp(configuration);
571
+ return {
572
+ /**
573
+ * The application run can be canceled by the user who created the application run. The execution can be canceled any time while the application is not in a final state. The pending items will not be processed and will not add to the cost. When the application is canceled, the already completed items stay available for download.
574
+ * @summary Cancel Application Run
575
+ * @param {PublicApiCancelApplicationRunV1RunsApplicationRunIdCancelPostRequest} requestParameters Request parameters.
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ */
579
+ cancelApplicationRunV1RunsApplicationRunIdCancelPost(requestParameters, options) {
580
+ return localVarFp.cancelApplicationRunV1RunsApplicationRunIdCancelPost(requestParameters.applicationRunId, options).then((request) => request(axios, basePath));
581
+ },
582
+ /**
583
+ * The endpoint is used to process the input items by the chosen application version. The endpoint returns the `application_run_id`. The processing fo the items is done asynchronously. To check the status or cancel the execution, use the /v1/runs/{application_run_id} endpoint. ### Payload The payload includes `application_version_id` and `items` base fields. `application_version_id` is the id used for `/v1/versions/{application_id}` endpoint. `items` includes the list of the items to process (slides, in case of HETA application). Every item has a set of standard fields defined by the API, plus the metadata, specific to the chosen application. Example payload structure with the comments: ``` { application_version_id: \"test-app:v0.0.2\", items: [{ \"reference\": \"slide_1\", <-- Input ID to connect the input and the output artifact \"input_artifacts\": [{ \"name\": \"input_slide\", <-- Name of the artifact defined by the application (For HETA it is\"input_slide\") \"download_url\": \"https://...\", <-- signed URL to the input file in the S3 or GCS. Should be valid for more than 6 days \"metadata\": { <-- The metadata fields defined by the application. (The example fields set for a slide files are provided) \"checksum_base64_crc32c\": \"abc12==\", \"mime_type\": \"image/tiff\", \"height\": 100, \"weight\": 500, \"mpp\": 0.543 } }] }] } ``` ### Response The endpoint returns the application run UUID. After that the job is scheduled for the execution in the background. To check the status of the run call `v1/runs/{application_run_id}`. ### Rejection Apart from the authentication, authorization and malformed input error, the request can be rejected when the quota limit is exceeded. More details on quotas is described in the documentation
584
+ * @summary Create Application Run
585
+ * @param {PublicApiCreateApplicationRunV1RunsPostRequest} requestParameters Request parameters.
586
+ * @param {*} [options] Override http request option.
587
+ * @throws {RequiredError}
588
+ */
589
+ createApplicationRunV1RunsPost(requestParameters, options) {
590
+ return localVarFp.createApplicationRunV1RunsPost(requestParameters.runCreationRequest, options).then((request) => request(axios, basePath));
591
+ },
592
+ /**
593
+ * Delete the application run results. It can only be called when the application is in a final state (meaning it\'s not in `received` or `pending` states). To delete the results of the running artifacts, first call `POST /v1/runs/{application_run_id}/cancel` to cancel the application run. The output results are deleted automatically 30 days after the application run is finished.
594
+ * @summary Delete Application Run Results
595
+ * @param {PublicApiDeleteApplicationRunResultsV1RunsApplicationRunIdResultsDeleteRequest} requestParameters Request parameters.
596
+ * @param {*} [options] Override http request option.
597
+ * @throws {RequiredError}
598
+ */
599
+ deleteApplicationRunResultsV1RunsApplicationRunIdResultsDelete(requestParameters, options) {
600
+ return localVarFp.deleteApplicationRunResultsV1RunsApplicationRunIdResultsDelete(requestParameters.applicationRunId, options).then((request) => request(axios, basePath));
601
+ },
602
+ /**
603
+ *
604
+ * @summary Get Me
605
+ * @param {*} [options] Override http request option.
606
+ * @throws {RequiredError}
607
+ */
608
+ getMeV1MeGet(options) {
609
+ return localVarFp.getMeV1MeGet(options).then((request) => request(axios, basePath));
610
+ },
611
+ /**
612
+ * Returns the details of the application run. The application run is available as soon as it is created via `POST /runs/` endpoint. To download the items results, call `/runs/{application_run_id}/results`. The application is only available to the user who triggered it, regardless of the role.
613
+ * @summary Get Run
614
+ * @param {PublicApiGetRunV1RunsApplicationRunIdGetRequest} requestParameters Request parameters.
615
+ * @param {*} [options] Override http request option.
616
+ * @throws {RequiredError}
617
+ */
618
+ getRunV1RunsApplicationRunIdGet(requestParameters, options) {
619
+ return localVarFp.getRunV1RunsApplicationRunIdGet(requestParameters.applicationRunId, requestParameters.include, options).then((request) => request(axios, basePath));
620
+ },
621
+ /**
622
+ * The endpoint returns the application runs triggered by the caller. After the application run is created by POST /v1/runs, it becomes available for the current endpoint
623
+ * @summary List Application Runs
624
+ * @param {PublicApiListApplicationRunsV1RunsGetRequest} requestParameters Request parameters.
625
+ * @param {*} [options] Override http request option.
626
+ * @throws {RequiredError}
627
+ */
628
+ listApplicationRunsV1RunsGet(requestParameters = {}, options) {
629
+ return localVarFp.listApplicationRunsV1RunsGet(requestParameters.applicationId, requestParameters.applicationVersion, requestParameters.include, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
630
+ },
631
+ /**
632
+ * Returns the list of the applications, available to the caller. The application is available if any of the version of the application is assigned to the user organization. To switch between organizations, the user should re-login and choose the needed organization.
633
+ * @summary List Applications
634
+ * @param {PublicApiListApplicationsV1ApplicationsGetRequest} requestParameters Request parameters.
635
+ * @param {*} [options] Override http request option.
636
+ * @throws {RequiredError}
637
+ */
638
+ listApplicationsV1ApplicationsGet(requestParameters = {}, options) {
639
+ return localVarFp.listApplicationsV1ApplicationsGet(requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
640
+ },
641
+ /**
642
+ * Get the list of the results for the run items
643
+ * @summary List Run Results
644
+ * @param {PublicApiListRunResultsV1RunsApplicationRunIdResultsGetRequest} requestParameters Request parameters.
645
+ * @param {*} [options] Override http request option.
646
+ * @throws {RequiredError}
647
+ */
648
+ listRunResultsV1RunsApplicationRunIdResultsGet(requestParameters, options) {
649
+ return localVarFp.listRunResultsV1RunsApplicationRunIdResultsGet(requestParameters.applicationRunId, requestParameters.itemIdIn, requestParameters.referenceIn, requestParameters.statusIn, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
650
+ },
651
+ /**
652
+ * Returns the list of the application versions for this application, available to the caller. The application version is available if it is assigned to the user\'s organization. The application versions are assigned to the organization by the Aignostics admin. To assign or unassign a version from your organization, please contact Aignostics support team.
653
+ * @summary List Versions By Application Id
654
+ * @param {PublicApiListVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGetRequest} requestParameters Request parameters.
655
+ * @param {*} [options] Override http request option.
656
+ * @throws {RequiredError}
657
+ */
658
+ listVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGet(requestParameters, options) {
659
+ return localVarFp.listVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGet(requestParameters.applicationId, requestParameters.page, requestParameters.pageSize, requestParameters.version, requestParameters.include, requestParameters.sort, options).then((request) => request(axios, basePath));
660
+ }
661
+ };
662
+ };
663
+ var PublicApi = class extends BaseAPI {
664
+ /**
665
+ * The application run can be canceled by the user who created the application run. The execution can be canceled any time while the application is not in a final state. The pending items will not be processed and will not add to the cost. When the application is canceled, the already completed items stay available for download.
666
+ * @summary Cancel Application Run
667
+ * @param {PublicApiCancelApplicationRunV1RunsApplicationRunIdCancelPostRequest} requestParameters Request parameters.
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ * @memberof PublicApi
671
+ */
672
+ cancelApplicationRunV1RunsApplicationRunIdCancelPost(requestParameters, options) {
673
+ return PublicApiFp(this.configuration).cancelApplicationRunV1RunsApplicationRunIdCancelPost(requestParameters.applicationRunId, options).then((request) => request(this.axios, this.basePath));
674
+ }
675
+ /**
676
+ * The endpoint is used to process the input items by the chosen application version. The endpoint returns the `application_run_id`. The processing fo the items is done asynchronously. To check the status or cancel the execution, use the /v1/runs/{application_run_id} endpoint. ### Payload The payload includes `application_version_id` and `items` base fields. `application_version_id` is the id used for `/v1/versions/{application_id}` endpoint. `items` includes the list of the items to process (slides, in case of HETA application). Every item has a set of standard fields defined by the API, plus the metadata, specific to the chosen application. Example payload structure with the comments: ``` { application_version_id: \"test-app:v0.0.2\", items: [{ \"reference\": \"slide_1\", <-- Input ID to connect the input and the output artifact \"input_artifacts\": [{ \"name\": \"input_slide\", <-- Name of the artifact defined by the application (For HETA it is\"input_slide\") \"download_url\": \"https://...\", <-- signed URL to the input file in the S3 or GCS. Should be valid for more than 6 days \"metadata\": { <-- The metadata fields defined by the application. (The example fields set for a slide files are provided) \"checksum_base64_crc32c\": \"abc12==\", \"mime_type\": \"image/tiff\", \"height\": 100, \"weight\": 500, \"mpp\": 0.543 } }] }] } ``` ### Response The endpoint returns the application run UUID. After that the job is scheduled for the execution in the background. To check the status of the run call `v1/runs/{application_run_id}`. ### Rejection Apart from the authentication, authorization and malformed input error, the request can be rejected when the quota limit is exceeded. More details on quotas is described in the documentation
677
+ * @summary Create Application Run
678
+ * @param {PublicApiCreateApplicationRunV1RunsPostRequest} requestParameters Request parameters.
679
+ * @param {*} [options] Override http request option.
680
+ * @throws {RequiredError}
681
+ * @memberof PublicApi
682
+ */
683
+ createApplicationRunV1RunsPost(requestParameters, options) {
684
+ return PublicApiFp(this.configuration).createApplicationRunV1RunsPost(requestParameters.runCreationRequest, options).then((request) => request(this.axios, this.basePath));
685
+ }
686
+ /**
687
+ * Delete the application run results. It can only be called when the application is in a final state (meaning it\'s not in `received` or `pending` states). To delete the results of the running artifacts, first call `POST /v1/runs/{application_run_id}/cancel` to cancel the application run. The output results are deleted automatically 30 days after the application run is finished.
688
+ * @summary Delete Application Run Results
689
+ * @param {PublicApiDeleteApplicationRunResultsV1RunsApplicationRunIdResultsDeleteRequest} requestParameters Request parameters.
690
+ * @param {*} [options] Override http request option.
691
+ * @throws {RequiredError}
692
+ * @memberof PublicApi
693
+ */
694
+ deleteApplicationRunResultsV1RunsApplicationRunIdResultsDelete(requestParameters, options) {
695
+ return PublicApiFp(this.configuration).deleteApplicationRunResultsV1RunsApplicationRunIdResultsDelete(requestParameters.applicationRunId, options).then((request) => request(this.axios, this.basePath));
696
+ }
697
+ /**
698
+ *
699
+ * @summary Get Me
700
+ * @param {*} [options] Override http request option.
701
+ * @throws {RequiredError}
702
+ * @memberof PublicApi
703
+ */
704
+ getMeV1MeGet(options) {
705
+ return PublicApiFp(this.configuration).getMeV1MeGet(options).then((request) => request(this.axios, this.basePath));
706
+ }
707
+ /**
708
+ * Returns the details of the application run. The application run is available as soon as it is created via `POST /runs/` endpoint. To download the items results, call `/runs/{application_run_id}/results`. The application is only available to the user who triggered it, regardless of the role.
709
+ * @summary Get Run
710
+ * @param {PublicApiGetRunV1RunsApplicationRunIdGetRequest} requestParameters Request parameters.
711
+ * @param {*} [options] Override http request option.
712
+ * @throws {RequiredError}
713
+ * @memberof PublicApi
714
+ */
715
+ getRunV1RunsApplicationRunIdGet(requestParameters, options) {
716
+ return PublicApiFp(this.configuration).getRunV1RunsApplicationRunIdGet(requestParameters.applicationRunId, requestParameters.include, options).then((request) => request(this.axios, this.basePath));
717
+ }
718
+ /**
719
+ * The endpoint returns the application runs triggered by the caller. After the application run is created by POST /v1/runs, it becomes available for the current endpoint
720
+ * @summary List Application Runs
721
+ * @param {PublicApiListApplicationRunsV1RunsGetRequest} requestParameters Request parameters.
722
+ * @param {*} [options] Override http request option.
723
+ * @throws {RequiredError}
724
+ * @memberof PublicApi
725
+ */
726
+ listApplicationRunsV1RunsGet(requestParameters = {}, options) {
727
+ return PublicApiFp(this.configuration).listApplicationRunsV1RunsGet(requestParameters.applicationId, requestParameters.applicationVersion, requestParameters.include, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
728
+ }
729
+ /**
730
+ * Returns the list of the applications, available to the caller. The application is available if any of the version of the application is assigned to the user organization. To switch between organizations, the user should re-login and choose the needed organization.
731
+ * @summary List Applications
732
+ * @param {PublicApiListApplicationsV1ApplicationsGetRequest} requestParameters Request parameters.
733
+ * @param {*} [options] Override http request option.
734
+ * @throws {RequiredError}
735
+ * @memberof PublicApi
736
+ */
737
+ listApplicationsV1ApplicationsGet(requestParameters = {}, options) {
738
+ return PublicApiFp(this.configuration).listApplicationsV1ApplicationsGet(requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
739
+ }
740
+ /**
741
+ * Get the list of the results for the run items
742
+ * @summary List Run Results
743
+ * @param {PublicApiListRunResultsV1RunsApplicationRunIdResultsGetRequest} requestParameters Request parameters.
744
+ * @param {*} [options] Override http request option.
745
+ * @throws {RequiredError}
746
+ * @memberof PublicApi
747
+ */
748
+ listRunResultsV1RunsApplicationRunIdResultsGet(requestParameters, options) {
749
+ return PublicApiFp(this.configuration).listRunResultsV1RunsApplicationRunIdResultsGet(requestParameters.applicationRunId, requestParameters.itemIdIn, requestParameters.referenceIn, requestParameters.statusIn, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
750
+ }
751
+ /**
752
+ * Returns the list of the application versions for this application, available to the caller. The application version is available if it is assigned to the user\'s organization. The application versions are assigned to the organization by the Aignostics admin. To assign or unassign a version from your organization, please contact Aignostics support team.
753
+ * @summary List Versions By Application Id
754
+ * @param {PublicApiListVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGetRequest} requestParameters Request parameters.
755
+ * @param {*} [options] Override http request option.
756
+ * @throws {RequiredError}
757
+ * @memberof PublicApi
758
+ */
759
+ listVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGet(requestParameters, options) {
760
+ return PublicApiFp(this.configuration).listVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGet(requestParameters.applicationId, requestParameters.page, requestParameters.pageSize, requestParameters.version, requestParameters.include, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
761
+ }
762
+ };
763
+
764
+ // src/generated/configuration.ts
765
+ var Configuration = class {
766
+ /**
767
+ * parameter for apiKey security
768
+ * @param name security name
769
+ * @memberof Configuration
770
+ */
771
+ apiKey;
772
+ /**
773
+ * parameter for basic security
774
+ *
775
+ * @type {string}
776
+ * @memberof Configuration
777
+ */
778
+ username;
779
+ /**
780
+ * parameter for basic security
781
+ *
782
+ * @type {string}
783
+ * @memberof Configuration
784
+ */
785
+ password;
786
+ /**
787
+ * parameter for oauth2 security
788
+ * @param name security name
789
+ * @param scopes oauth2 scope
790
+ * @memberof Configuration
791
+ */
792
+ accessToken;
793
+ /**
794
+ * override base path
795
+ *
796
+ * @type {string}
797
+ * @memberof Configuration
798
+ */
799
+ basePath;
800
+ /**
801
+ * override server index
802
+ *
803
+ * @type {number}
804
+ * @memberof Configuration
805
+ */
806
+ serverIndex;
807
+ /**
808
+ * base options for axios calls
809
+ *
810
+ * @type {any}
811
+ * @memberof Configuration
812
+ */
813
+ baseOptions;
814
+ /**
815
+ * The FormData constructor that will be used to create multipart form data
816
+ * requests. You can inject this here so that execution environments that
817
+ * do not support the FormData class can still run the generated client.
818
+ *
819
+ * @type {new () => FormData}
820
+ */
821
+ formDataCtor;
822
+ constructor(param = {}) {
823
+ this.apiKey = param.apiKey;
824
+ this.username = param.username;
825
+ this.password = param.password;
826
+ this.accessToken = param.accessToken;
827
+ this.basePath = param.basePath;
828
+ this.serverIndex = param.serverIndex;
829
+ this.baseOptions = {
830
+ ...param.baseOptions,
831
+ headers: {
832
+ ...param.baseOptions?.headers
833
+ }
834
+ };
835
+ this.formDataCtor = param.formDataCtor;
836
+ }
837
+ /**
838
+ * Check if the given MIME is a JSON MIME.
839
+ * JSON MIME examples:
840
+ * application/json
841
+ * application/json; charset=UTF8
842
+ * APPLICATION/JSON
843
+ * application/vnd.company+json
844
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
845
+ * @return True if the given MIME is JSON, false otherwise.
846
+ */
847
+ isJsonMime(mime) {
848
+ const jsonMime = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
849
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === "application/json-patch+json");
850
+ }
851
+ };
852
+
853
+ // src/errors.ts
854
+ var BaseError = class extends Error {
855
+ /**
856
+ * Error code for programmatic error handling
857
+ */
858
+ code;
859
+ /**
860
+ * Additional context or metadata related to the error
861
+ */
862
+ context;
863
+ /**
864
+ * Original error that caused this error, if applicable
865
+ */
866
+ originalError;
867
+ /**
868
+ * Creates a new BaseError instance
869
+ *
870
+ * @param message - Human-readable error message
871
+ * @param code - Error code for programmatic handling
872
+ * @param context - Additional error context or metadata
873
+ */
874
+ constructor(message, code, { context, originalError } = {}) {
875
+ super(message);
876
+ this.name = this.constructor.name;
877
+ this.code = code;
878
+ this.context = context;
879
+ this.originalError = originalError;
880
+ if (Error.captureStackTrace) {
881
+ Error.captureStackTrace(this, this.constructor);
882
+ }
883
+ }
884
+ };
885
+ var AuthenticationError = class extends BaseError {
886
+ /**
887
+ * Creates a new AuthenticationError instance
888
+ *
889
+ * @param message - Human-readable error message describing the authentication issue
890
+ * @param options - Additional options about the authentication failure
891
+ * @param options.context - Additional context about the authentication failure
892
+ * @param options.originalError - Original error that caused this authentication error
893
+ */
894
+ constructor(message, options = {}) {
895
+ super(message, "AUTHENTICATION_ERROR", options);
896
+ }
897
+ };
898
+ var APIError = class extends BaseError {
899
+ /**
900
+ * HTTP status code from the failed API request
901
+ */
902
+ statusCode;
903
+ /**
904
+ * Creates a new APIError instance
905
+ *
906
+ * @param message - Human-readable error message describing the API issue
907
+ * @param statusCode - HTTP status code from the failed request
908
+ * @param context - Additional context about the API failure
909
+ */
910
+ constructor(message, options = {}) {
911
+ super(message, "API_ERROR", options);
912
+ this.statusCode = options.statusCode;
913
+ }
914
+ };
915
+ var ConfigurationError = class extends BaseError {
916
+ /**
917
+ * Creates a new ConfigurationError instance
918
+ *
919
+ * @param message - Human-readable error message describing the configuration issue
920
+ * @param context - Additional context about the configuration problem
921
+ */
922
+ constructor(message, options = {}) {
923
+ super(message, "CONFIGURATION_ERROR", options);
924
+ }
925
+ };
926
+ var UnexpectedError = class extends BaseError {
927
+ /**
928
+ * Creates a new UnexpectedError instance
929
+ *
930
+ * @param message - Human-readable error message describing the unexpected issue
931
+ * @param context - Additional context about the unexpected error
932
+ */
933
+ constructor(message, options = {}) {
934
+ super(message, "UNEXPECTED_ERROR", options);
935
+ }
936
+ };
937
+ var validationErrorSchema = z.object({
938
+ detail: z.array(
939
+ z.object({
940
+ loc: z.array(z.union([z.string(), z.number()])),
941
+ msg: z.string(),
942
+ type: z.string()
943
+ })
944
+ )
945
+ });
946
+ var errorResponseSchema = z.union([validationErrorSchema, z.any()]);
947
+ function handleRequestError(error) {
948
+ if (isAxiosError(error)) {
949
+ switch (error.status) {
950
+ case 422: {
951
+ throw new APIError(`Validation error: ${error.message}`, {
952
+ context: {
953
+ responseBody: validationErrorSchema.parse(error.response?.data)
954
+ },
955
+ originalError: error,
956
+ statusCode: 422
957
+ });
958
+ }
959
+ case 404: {
960
+ throw new APIError(`Resource not found: ${error.message}`, {
961
+ context: {
962
+ responseBody: errorResponseSchema.parse(error.response?.data)
963
+ },
964
+ originalError: error,
965
+ statusCode: 404
966
+ });
967
+ }
968
+ default: {
969
+ throw new APIError(`API request failed: ${error.message}`, {
970
+ context: {
971
+ responseBody: errorResponseSchema.parse(error.response?.data)
972
+ },
973
+ originalError: error
974
+ });
975
+ }
976
+ }
977
+ }
978
+ throw new UnexpectedError(`Unexpected error: ${String(error)}`, { originalError: error });
979
+ }
980
+ var PlatformSDKHttp = class {
981
+ #config;
982
+ /**
983
+ * Creates a new instance of the Platform SDK
984
+ * @param config Configuration options
985
+ */
986
+ constructor(config) {
987
+ this.#config = {
988
+ baseURL: config.baseURL || "https://api.aignostics.com",
989
+ timeout: config.timeout || 1e4,
990
+ ...config
991
+ };
992
+ }
993
+ async #getClient() {
994
+ const accessToken = await this.#config.tokenProvider();
995
+ if (!accessToken) {
996
+ throw new AuthenticationError(
997
+ "No access token available. Please provide a tokenProvider in the SDK configuration that returns a valid token."
998
+ );
999
+ }
1000
+ return new PublicApi({
1001
+ basePath: this.#config.baseURL,
1002
+ accessToken,
1003
+ isJsonMime(mime) {
1004
+ return mime === "application/json";
1005
+ }
1006
+ });
1007
+ }
1008
+ /**
1009
+ * Test the connection to the Aignostics Platform API
1010
+ *
1011
+ * This method performs a simple API call to verify that the SDK can successfully
1012
+ * connect to the platform using the provided configuration and authentication.
1013
+ * It's useful for validating setup and troubleshooting connectivity issues.
1014
+ *
1015
+ * @returns A promise that resolves to `true` if the connection is successful
1016
+ * @throws {AuthenticationError} If no valid authentication token is available
1017
+ * @throws {Error} If the connection test fails due to network issues or API errors
1018
+ *
1019
+ * @example
1020
+ * ```typescript
1021
+ * const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
1022
+ *
1023
+ * try {
1024
+ * const isConnected = await sdk.testConnection();
1025
+ * console.log('Connection successful:', isConnected);
1026
+ * } catch (error) {
1027
+ * console.error('Connection failed:', error.message);
1028
+ * }
1029
+ * ```
1030
+ */
1031
+ async testConnection() {
1032
+ const client = await this.#getClient();
1033
+ try {
1034
+ const response = await client.listApplicationsV1ApplicationsGet();
1035
+ return response.status === 200;
1036
+ } catch (error) {
1037
+ throw new Error(`Connection test failed: ${String(error)}`);
1038
+ }
1039
+ }
1040
+ /**
1041
+ * Retrieve a list of all available applications on the platform
1042
+ *
1043
+ * This method fetches all applications that are accessible with the current
1044
+ * authentication credentials. Applications represent different AI models or
1045
+ * processing pipelines available on the Aignostics Platform.
1046
+ *
1047
+ * @returns A promise that resolves to an array of application objects
1048
+ * @throws {AuthenticationError} If no valid authentication token is available
1049
+ * @throws {Error} If the request fails due to network issues or API errors
1050
+ *
1051
+ * @example
1052
+ * ```typescript
1053
+ * const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
1054
+ *
1055
+ * try {
1056
+ * const applications = await sdk.listApplications();
1057
+ * console.log(`Found ${applications.length} applications`);
1058
+ * applications.forEach(app => {
1059
+ * console.log(`- ${app.name} (ID: ${app.id})`);
1060
+ * });
1061
+ * } catch (error) {
1062
+ * console.error('Failed to list applications:', error.message);
1063
+ * }
1064
+ * ```
1065
+ */
1066
+ async listApplications() {
1067
+ const client = await this.#getClient();
1068
+ try {
1069
+ const response = await client.listApplicationsV1ApplicationsGet();
1070
+ return response.data;
1071
+ } catch (error) {
1072
+ handleRequestError(error);
1073
+ }
1074
+ }
1075
+ /**
1076
+ * Retrieve all versions of a specific application
1077
+ *
1078
+ * This method fetches all available versions for a given application ID.
1079
+ * Application versions represent different iterations or configurations of
1080
+ * an AI model, allowing you to choose specific versions for processing.
1081
+ *
1082
+ * @param applicationId - The unique identifier of the application
1083
+ * @returns A promise that resolves to an array of application version objects
1084
+ * @throws {AuthenticationError} If no valid authentication token is available
1085
+ * @throws {Error} If the request fails due to network issues, invalid application ID, or API errors
1086
+ *
1087
+ * @example
1088
+ * ```typescript
1089
+ * const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
1090
+ *
1091
+ * try {
1092
+ * const versions = await sdk.listApplicationVersions('app-123');
1093
+ * console.log(`Found ${versions.length} versions for application`);
1094
+ * versions.forEach(version => {
1095
+ * console.log(`- Version ${version.version} (ID: ${version.id})`);
1096
+ * });
1097
+ * } catch (error) {
1098
+ * console.error('Failed to list application versions:', error.message);
1099
+ * }
1100
+ * ```
1101
+ */
1102
+ async listApplicationVersions(applicationId) {
1103
+ const client = await this.#getClient();
1104
+ try {
1105
+ const response = await client.listVersionsByApplicationIdV1ApplicationsApplicationIdVersionsGet({
1106
+ applicationId
1107
+ });
1108
+ return response.data;
1109
+ } catch (error) {
1110
+ handleRequestError(error);
1111
+ }
1112
+ }
1113
+ /**
1114
+ * Retrieve a list of application runs with optional filtering
1115
+ *
1116
+ * This method fetches application runs (processing jobs) that have been
1117
+ * submitted to the platform. You can optionally filter by application ID
1118
+ * and/or application version to narrow down the results.
1119
+ *
1120
+ * @param options - Optional filtering parameters
1121
+ * @param options.applicationId - Filter runs by specific application ID
1122
+ * @param options.applicationVersion - Filter runs by specific application version
1123
+ * @returns A promise that resolves to an array of application run objects
1124
+ * @throws {Error} If the request fails due to network issues, authentication problems, or API errors
1125
+ *
1126
+ * @example
1127
+ * ```typescript
1128
+ * const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
1129
+ *
1130
+ * try {
1131
+ * // Get all runs
1132
+ * const allRuns = await sdk.listApplicationRuns();
1133
+ *
1134
+ * // Get runs for a specific application
1135
+ * const appRuns = await sdk.listApplicationRuns({
1136
+ * applicationId: 'app-123'
1137
+ * });
1138
+ *
1139
+ * // Get runs for a specific application version
1140
+ * const versionRuns = await sdk.listApplicationRuns({
1141
+ * applicationId: 'app-123',
1142
+ * applicationVersion: 'v1.2.0'
1143
+ * });
1144
+ *
1145
+ * console.log(`Found ${allRuns.length} total runs`);
1146
+ * } catch (error) {
1147
+ * console.error('Failed to list application runs:', error.message);
1148
+ * }
1149
+ * ```
1150
+ */
1151
+ async listApplicationRuns(options) {
1152
+ const client = await this.#getClient();
1153
+ try {
1154
+ const response = await client.listApplicationRunsV1RunsGet({
1155
+ applicationId: options?.applicationId,
1156
+ applicationVersion: options?.applicationVersion
1157
+ });
1158
+ return response.data;
1159
+ } catch (error) {
1160
+ handleRequestError(error);
1161
+ }
1162
+ }
1163
+ /**
1164
+ * Create and submit a new application run for processing
1165
+ *
1166
+ * This method creates a new processing job by submitting data items to a
1167
+ * specific application version. The run will be queued and processed
1168
+ * asynchronously on the Aignostics Platform.
1169
+ *
1170
+ * @param request - The run creation request containing application version ID and items to process
1171
+ * @returns A promise that resolves to the created run response with run ID and status
1172
+ * @throws {Error} If the request fails due to network issues, authentication problems, invalid request data, or API errors
1173
+ *
1174
+ * @example
1175
+ * ```typescript
1176
+ * const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
1177
+ *
1178
+ * try {
1179
+ * const runRequest = {
1180
+ * application_version_id: 'app-version-123',
1181
+ * items: [
1182
+ * {
1183
+ * id: 'item-1',
1184
+ * data: { }
1185
+ * },
1186
+ * {
1187
+ * id: 'item-2',
1188
+ * data: { }
1189
+ * }
1190
+ * ]
1191
+ * };
1192
+ *
1193
+ * const run = await sdk.createApplicationRun(runRequest);
1194
+ * console.log(`Created run with ID: ${run.id}`);
1195
+ * console.log(`Status: ${run.status}`);
1196
+ * } catch (error) {
1197
+ * console.error('Failed to create application run:', error.message);
1198
+ * }
1199
+ * ```
1200
+ */
1201
+ async createApplicationRun(request) {
1202
+ const client = await this.#getClient();
1203
+ try {
1204
+ const response = await client.createApplicationRunV1RunsPost({
1205
+ runCreationRequest: request
1206
+ });
1207
+ return response.data;
1208
+ } catch (error) {
1209
+ handleRequestError(error);
1210
+ }
1211
+ }
1212
+ /**
1213
+ * Retrieve detailed information about a specific application run
1214
+ *
1215
+ * This method fetches complete details about a processing job, including
1216
+ * its current status, progress, metadata, and execution information.
1217
+ *
1218
+ * @param applicationRunId - The unique identifier of the application run
1219
+ * @returns A promise that resolves to the run details object
1220
+ * @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or API errors
1221
+ *
1222
+ * @example
1223
+ * ```typescript
1224
+ * const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
1225
+ *
1226
+ * try {
1227
+ * const run = await sdk.getRun('run-123');
1228
+ * console.log(`Run ID: ${run.id}`);
1229
+ * console.log(`Status: ${run.status}`);
1230
+ * console.log(`Progress: ${run.progress}%`);
1231
+ * console.log(`Created: ${run.created_at}`);
1232
+ * } catch (error) {
1233
+ * console.error('Failed to get run details:', error.message);
1234
+ * }
1235
+ * ```
1236
+ */
1237
+ async getRun(applicationRunId) {
1238
+ const client = await this.#getClient();
1239
+ try {
1240
+ const response = await client.getRunV1RunsApplicationRunIdGet({
1241
+ applicationRunId
1242
+ });
1243
+ return response.data;
1244
+ } catch (error) {
1245
+ handleRequestError(error);
1246
+ }
1247
+ }
1248
+ /**
1249
+ * Cancel a running or queued application run
1250
+ *
1251
+ * This method attempts to cancel an application run that is currently
1252
+ * in progress or waiting in the queue. Once cancelled, the run cannot
1253
+ * be resumed and will transition to a cancelled state.
1254
+ *
1255
+ * @param applicationRunId - The unique identifier of the application run to cancel
1256
+ * @returns A promise that resolves when the cancellation request is successful
1257
+ * @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or if the run cannot be cancelled
1258
+ *
1259
+ * @example
1260
+ * ```typescript
1261
+ * const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
1262
+ *
1263
+ * try {
1264
+ * await sdk.cancelApplicationRun('run-123');
1265
+ * console.log('Run cancellation requested successfully');
1266
+ *
1267
+ * // Check the status to confirm cancellation
1268
+ * const run = await sdk.getRun('run-123');
1269
+ * console.log(`Updated status: ${run.status}`);
1270
+ * } catch (error) {
1271
+ * console.error('Failed to cancel run:', error.message);
1272
+ * }
1273
+ * ```
1274
+ */
1275
+ async cancelApplicationRun(applicationRunId) {
1276
+ const client = await this.#getClient();
1277
+ try {
1278
+ await client.cancelApplicationRunV1RunsApplicationRunIdCancelPost({
1279
+ applicationRunId
1280
+ });
1281
+ } catch (error) {
1282
+ handleRequestError(error);
1283
+ }
1284
+ }
1285
+ /**
1286
+ * Retrieve the processing results for a completed application run
1287
+ *
1288
+ * This method fetches all result items produced by a completed application run.
1289
+ * Results include the processed data, analysis outcomes, and any generated
1290
+ * artifacts from the AI model execution.
1291
+ *
1292
+ * @param applicationRunId - The unique identifier of the application run
1293
+ * @returns A promise that resolves to an array of result items
1294
+ * @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or API errors
1295
+ *
1296
+ * @example
1297
+ * ```typescript
1298
+ * const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
1299
+ *
1300
+ * try {
1301
+ * const results = await sdk.listRunResults('run-123');
1302
+ * console.log(`Found ${results.length} result items`);
1303
+ *
1304
+ * results.forEach((result, index) => {
1305
+ * console.log(`Result ${index + 1}:`);
1306
+ * console.log(`- Item ID: ${result.item_id}`);
1307
+ * console.log(`- Status: ${result.status}`);
1308
+ * console.log(`- Data: ${JSON.stringify(result.data)}`);
1309
+ * });
1310
+ * } catch (error) {
1311
+ * console.error('Failed to list run results:', error.message);
1312
+ * }
1313
+ * ```
1314
+ */
1315
+ async listRunResults(applicationRunId) {
1316
+ const client = await this.#getClient();
1317
+ try {
1318
+ const response = await client.listRunResultsV1RunsApplicationRunIdResultsGet({
1319
+ applicationRunId
1320
+ });
1321
+ return response.data;
1322
+ } catch (error) {
1323
+ handleRequestError(error);
1324
+ }
1325
+ }
1326
+ /**
1327
+ * Get the current version of the SDK
1328
+ *
1329
+ * This method returns the version string of the Platform SDK, which can be
1330
+ * useful for debugging, logging, or ensuring compatibility with API versions.
1331
+ *
1332
+ * @returns The SDK version string (e.g., "1.2.3")
1333
+ *
1334
+ * @example
1335
+ * ```typescript
1336
+ * const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
1337
+ * console.log(`Using SDK version: ${sdk.getVersion()}`);
1338
+ * ```
1339
+ */
1340
+ getVersion() {
1341
+ return package_default.version;
1342
+ }
1343
+ /**
1344
+ * Get the current SDK configuration
1345
+ *
1346
+ * This method returns a copy of the current configuration used by the SDK,
1347
+ * including the base URL, timeout settings, and other options. The returned
1348
+ * object is a copy to prevent accidental modification of the internal config.
1349
+ *
1350
+ * @returns A copy of the current SDK configuration object
1351
+ *
1352
+ * @example
1353
+ * ```typescript
1354
+ * const sdk = new PlatformSDKHttp({
1355
+ * baseURL: 'https://api.aignostics.com',
1356
+ * tokenProvider: () => 'your-token',
1357
+ * timeout: 30000
1358
+ * });
1359
+ *
1360
+ * const config = sdk.getConfig();
1361
+ * console.log(`Base URL: ${config.baseURL}`);
1362
+ * console.log(`Timeout: ${config.timeout}ms`);
1363
+ * ```
1364
+ */
1365
+ getConfig() {
1366
+ return { ...this.#config };
1367
+ }
1368
+ };
1369
+
1370
+ // src/index.ts
1371
+ var index_default = PlatformSDKHttp;
1372
+
1373
+ export { APIError, ApplicationRunStatus, AuthenticationError, BaseError, Configuration, ConfigurationError, ItemStatus, OutputArtifactScope, PlatformSDKHttp, PublicApi, PublicApiAxiosParamCreator, PublicApiFactory, PublicApiFp, index_default as default };
1374
+ //# sourceMappingURL=index.js.map
1375
+ //# sourceMappingURL=index.js.map