@aignostics/sdk 3.1.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -246,6 +246,35 @@ var PublicApiAxiosParamCreator = function(configuration) {
246
246
  options: localVarRequestOptions
247
247
  };
248
248
  },
249
+ /**
250
+ * Download the artifact file with the specified artifact_id, belonging to the specified run. The artifact_is is returned by the `GET /v1/runs/{run_id}/items` endpoint as part of the item results, and can also be retrieved via `GET /v1/runs/{run_id}/items/{external_id}`. The endpoint may return a redirect response with a presigned URL to download the artifact file from the storage bucket. The presigned URL is valid for a limited time, so it should be used immediately after receiving the response.
251
+ * @summary Get Artifact Url
252
+ * @param {string} runId Run id, returned by `POST /runs/` endpoint
253
+ * @param {string} artifactId The artifact id to download
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ */
257
+ getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet: async (runId, artifactId, options = {}) => {
258
+ assertParamExists("getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet", "runId", runId);
259
+ assertParamExists("getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet", "artifactId", artifactId);
260
+ const localVarPath = `/v1/runs/{run_id}/artifacts/{artifact_id}/file`.replace(`{${"run_id"}}`, encodeURIComponent(String(runId))).replace(`{${"artifact_id"}}`, encodeURIComponent(String(artifactId)));
261
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
262
+ let baseOptions;
263
+ if (configuration) {
264
+ baseOptions = configuration.baseOptions;
265
+ }
266
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
267
+ const localVarHeaderParameter = {};
268
+ const localVarQueryParameter = {};
269
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
270
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
271
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
272
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
273
+ return {
274
+ url: toPathString(localVarUrlObj),
275
+ options: localVarRequestOptions
276
+ };
277
+ },
249
278
  /**
250
279
  * Retrieve details of a specific item (slide) by its external ID and the run ID.
251
280
  * @summary Get Item By Run
@@ -432,11 +461,12 @@ var PublicApiAxiosParamCreator = function(configuration) {
432
461
  * @param {string | null} [customMetadata] Use PostgreSQL JSONPath expressions to filter runs by their custom_metadata. #### URL Encoding Required **Important**: JSONPath expressions contain special characters that must be URL-encoded when used in query parameters. Most HTTP clients handle this automatically, but when constructing URLs manually, please ensure proper encoding. #### Examples (Clear Format): - **Field existence**: `$.study` - Runs that have a study field defined - **Exact value match**: `$.study ? (@ == \"high\")` - Runs with specific study value - **Numeric comparison**: `$.confidence_score ? (@ > 0.75)` - Runs with confidence score greater than 0.75 - **Array operations**: `$.tags[*] ? (@ == \"draft\")` - Runs with tags array containing \"draft\" - **Complex conditions**: `$.resources ? (@.gpu_count > 2 && @.memory_gb >= 16)` - Runs with high resource requirements #### Examples (URL-Encoded Format): - **Field existence**: `%24.study` - **Exact value match**: `%24.study%20%3F%20(%40%20%3D%3D%20%22high%22)` - **Numeric comparison**: `%24.confidence_score%20%3F%20(%40%20%3E%200.75)` - **Array operations**: `%24.tags%5B*%5D%20%3F%20(%40%20%3D%3D%20%22draft%22)` - **Complex conditions**: `%24.resources%20%3F%20(%40.gpu_count%20%3E%202%20%26%26%20%40.memory_gb%20%3E%3D%2016)` #### Notes - JSONPath expressions are evaluated using PostgreSQL\'s `@?` operator - The `$.` prefix is automatically added to root-level field references if missing - String values in conditions must be enclosed in double quotes - Use `&&` for AND operations and `||` for OR operations - Regular expressions use `like_regex` with standard regex syntax - **Please remember to URL-encode the entire JSONPath expression when making HTTP requests**
433
462
  * @param {number} [page]
434
463
  * @param {number} [pageSize]
464
+ * @param {string | null} [forOrganization] Filter runs by organization ID. Available for superadmins (any org) and admins (own org only). When provided, returns all runs for the specified organization instead of only the caller\'s own runs.
435
465
  * @param {Array<string> | null} [sort] Sort the results by one or more fields. Use &#x60;+&#x60; for ascending and &#x60;-&#x60; for descending order. **Available fields:** - &#x60;run_id&#x60; - &#x60;application_id&#x60; - &#x60;version_number&#x60; - &#x60;custom_metadata&#x60; - &#x60;submitted_at&#x60; - &#x60;submitted_by&#x60; - &#x60;terminated_at&#x60; - &#x60;termination_reason&#x60; **Examples:** - &#x60;?sort&#x3D;submitted_at&#x60; - Sort by creation time (ascending) - &#x60;?sort&#x3D;-submitted_at&#x60; - Sort by creation time (descending) - &#x60;?sort&#x3D;state&amp;sort&#x3D;-submitted_at&#x60; - Sort by state, then by time (descending)
436
466
  * @param {*} [options] Override http request option.
437
467
  * @throws {RequiredError}
438
468
  */
439
- listRunsV1RunsGet: async (applicationId, applicationVersion, externalId, customMetadata, page, pageSize, sort, options = {}) => {
469
+ listRunsV1RunsGet: async (applicationId, applicationVersion, externalId, customMetadata, page, pageSize, forOrganization, sort, options = {}) => {
440
470
  const localVarPath = `/v1/runs`;
441
471
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
442
472
  let baseOptions;
@@ -465,6 +495,9 @@ var PublicApiAxiosParamCreator = function(configuration) {
465
495
  if (pageSize !== void 0) {
466
496
  localVarQueryParameter["page_size"] = pageSize;
467
497
  }
498
+ if (forOrganization !== void 0) {
499
+ localVarQueryParameter["for_organization"] = forOrganization;
500
+ }
468
501
  if (sort) {
469
502
  localVarQueryParameter["sort"] = sort;
470
503
  }
@@ -625,6 +658,20 @@ var PublicApiFp = function(configuration) {
625
658
  const localVarOperationServerBasePath = operationServerMap["PublicApi.deleteRunItemsV1RunsRunIdArtifactsDelete"]?.[localVarOperationServerIndex]?.url;
626
659
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
627
660
  },
661
+ /**
662
+ * Download the artifact file with the specified artifact_id, belonging to the specified run. The artifact_is is returned by the `GET /v1/runs/{run_id}/items` endpoint as part of the item results, and can also be retrieved via `GET /v1/runs/{run_id}/items/{external_id}`. The endpoint may return a redirect response with a presigned URL to download the artifact file from the storage bucket. The presigned URL is valid for a limited time, so it should be used immediately after receiving the response.
663
+ * @summary Get Artifact Url
664
+ * @param {string} runId Run id, returned by &#x60;POST /runs/&#x60; endpoint
665
+ * @param {string} artifactId The artifact id to download
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ */
669
+ async getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(runId, artifactId, options) {
670
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(runId, artifactId, options);
671
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
672
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet"]?.[localVarOperationServerIndex]?.url;
673
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
674
+ },
628
675
  /**
629
676
  * Retrieve details of a specific item (slide) by its external ID and the run ID.
630
677
  * @summary Get Item By Run
@@ -709,12 +756,13 @@ var PublicApiFp = function(configuration) {
709
756
  * @param {string | null} [customMetadata] Use PostgreSQL JSONPath expressions to filter runs by their custom_metadata. #### URL Encoding Required **Important**: JSONPath expressions contain special characters that must be URL-encoded when used in query parameters. Most HTTP clients handle this automatically, but when constructing URLs manually, please ensure proper encoding. #### Examples (Clear Format): - **Field existence**: &#x60;$.study&#x60; - Runs that have a study field defined - **Exact value match**: &#x60;$.study ? (@ &#x3D;&#x3D; \&quot;high\&quot;)&#x60; - Runs with specific study value - **Numeric comparison**: &#x60;$.confidence_score ? (@ &gt; 0.75)&#x60; - Runs with confidence score greater than 0.75 - **Array operations**: &#x60;$.tags[*] ? (@ &#x3D;&#x3D; \&quot;draft\&quot;)&#x60; - Runs with tags array containing \&quot;draft\&quot; - **Complex conditions**: &#x60;$.resources ? (@.gpu_count &gt; 2 &amp;&amp; @.memory_gb &gt;&#x3D; 16)&#x60; - Runs with high resource requirements #### Examples (URL-Encoded Format): - **Field existence**: &#x60;%24.study&#x60; - **Exact value match**: &#x60;%24.study%20%3F%20(%40%20%3D%3D%20%22high%22)&#x60; - **Numeric comparison**: &#x60;%24.confidence_score%20%3F%20(%40%20%3E%200.75)&#x60; - **Array operations**: &#x60;%24.tags%5B*%5D%20%3F%20(%40%20%3D%3D%20%22draft%22)&#x60; - **Complex conditions**: &#x60;%24.resources%20%3F%20(%40.gpu_count%20%3E%202%20%26%26%20%40.memory_gb%20%3E%3D%2016)&#x60; #### Notes - JSONPath expressions are evaluated using PostgreSQL\&#39;s &#x60;@?&#x60; operator - The &#x60;$.&#x60; prefix is automatically added to root-level field references if missing - String values in conditions must be enclosed in double quotes - Use &#x60;&amp;&amp;&#x60; for AND operations and &#x60;||&#x60; for OR operations - Regular expressions use &#x60;like_regex&#x60; with standard regex syntax - **Please remember to URL-encode the entire JSONPath expression when making HTTP requests**
710
757
  * @param {number} [page]
711
758
  * @param {number} [pageSize]
759
+ * @param {string | null} [forOrganization] Filter runs by organization ID. Available for superadmins (any org) and admins (own org only). When provided, returns all runs for the specified organization instead of only the caller\&#39;s own runs.
712
760
  * @param {Array<string> | null} [sort] Sort the results by one or more fields. Use &#x60;+&#x60; for ascending and &#x60;-&#x60; for descending order. **Available fields:** - &#x60;run_id&#x60; - &#x60;application_id&#x60; - &#x60;version_number&#x60; - &#x60;custom_metadata&#x60; - &#x60;submitted_at&#x60; - &#x60;submitted_by&#x60; - &#x60;terminated_at&#x60; - &#x60;termination_reason&#x60; **Examples:** - &#x60;?sort&#x3D;submitted_at&#x60; - Sort by creation time (ascending) - &#x60;?sort&#x3D;-submitted_at&#x60; - Sort by creation time (descending) - &#x60;?sort&#x3D;state&amp;sort&#x3D;-submitted_at&#x60; - Sort by state, then by time (descending)
713
761
  * @param {*} [options] Override http request option.
714
762
  * @throws {RequiredError}
715
763
  */
716
- async listRunsV1RunsGet(applicationId, applicationVersion, externalId, customMetadata, page, pageSize, sort, options) {
717
- const localVarAxiosArgs = await localVarAxiosParamCreator.listRunsV1RunsGet(applicationId, applicationVersion, externalId, customMetadata, page, pageSize, sort, options);
764
+ async listRunsV1RunsGet(applicationId, applicationVersion, externalId, customMetadata, page, pageSize, forOrganization, sort, options) {
765
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listRunsV1RunsGet(applicationId, applicationVersion, externalId, customMetadata, page, pageSize, forOrganization, sort, options);
718
766
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
719
767
  const localVarOperationServerBasePath = operationServerMap["PublicApi.listRunsV1RunsGet"]?.[localVarOperationServerIndex]?.url;
720
768
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -806,6 +854,16 @@ var PublicApiFactory = function(configuration, basePath, axios) {
806
854
  deleteRunItemsV1RunsRunIdArtifactsDelete(requestParameters, options) {
807
855
  return localVarFp.deleteRunItemsV1RunsRunIdArtifactsDelete(requestParameters.runId, options).then((request) => request(axios, basePath));
808
856
  },
857
+ /**
858
+ * Download the artifact file with the specified artifact_id, belonging to the specified run. The artifact_is is returned by the `GET /v1/runs/{run_id}/items` endpoint as part of the item results, and can also be retrieved via `GET /v1/runs/{run_id}/items/{external_id}`. The endpoint may return a redirect response with a presigned URL to download the artifact file from the storage bucket. The presigned URL is valid for a limited time, so it should be used immediately after receiving the response.
859
+ * @summary Get Artifact Url
860
+ * @param {PublicApiGetArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGetRequest} requestParameters Request parameters.
861
+ * @param {*} [options] Override http request option.
862
+ * @throws {RequiredError}
863
+ */
864
+ getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters, options) {
865
+ return localVarFp.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters.runId, requestParameters.artifactId, options).then((request) => request(axios, basePath));
866
+ },
809
867
  /**
810
868
  * Retrieve details of a specific item (slide) by its external ID and the run ID.
811
869
  * @summary Get Item By Run
@@ -863,7 +921,7 @@ var PublicApiFactory = function(configuration, basePath, axios) {
863
921
  * @throws {RequiredError}
864
922
  */
865
923
  listRunsV1RunsGet(requestParameters = {}, options) {
866
- return localVarFp.listRunsV1RunsGet(requestParameters.applicationId, requestParameters.applicationVersion, requestParameters.externalId, requestParameters.customMetadata, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
924
+ return localVarFp.listRunsV1RunsGet(requestParameters.applicationId, requestParameters.applicationVersion, requestParameters.externalId, requestParameters.customMetadata, requestParameters.page, requestParameters.pageSize, requestParameters.forOrganization, requestParameters.sort, options).then((request) => request(axios, basePath));
867
925
  },
868
926
  /**
869
927
  * Update the custom metadata of the item with the specified `external_id`, belonging to the specified run. Optionally, a checksum may be provided along the custom metadata JSON. It can be used to verify if the custom metadata was updated since the last time it was accessed. If the checksum is provided, it must match the existing custom metadata in the system, ensuring that the current custom metadata value to be overwritten is acknowledged by the user. If no checksum is provided, submitted metadata directly overwrites the existing metadata, without any checks. The latest custom metadata and checksum can be retrieved for individual items via `GET /v1/runs/{run_id}/items/{external_id}`, and for all items of a run via `GET /v1/runs/{run_id}/items`.
@@ -942,6 +1000,17 @@ var PublicApi = class extends BaseAPI {
942
1000
  deleteRunItemsV1RunsRunIdArtifactsDelete(requestParameters, options) {
943
1001
  return PublicApiFp(this.configuration).deleteRunItemsV1RunsRunIdArtifactsDelete(requestParameters.runId, options).then((request) => request(this.axios, this.basePath));
944
1002
  }
1003
+ /**
1004
+ * Download the artifact file with the specified artifact_id, belonging to the specified run. The artifact_is is returned by the `GET /v1/runs/{run_id}/items` endpoint as part of the item results, and can also be retrieved via `GET /v1/runs/{run_id}/items/{external_id}`. The endpoint may return a redirect response with a presigned URL to download the artifact file from the storage bucket. The presigned URL is valid for a limited time, so it should be used immediately after receiving the response.
1005
+ * @summary Get Artifact Url
1006
+ * @param {PublicApiGetArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGetRequest} requestParameters Request parameters.
1007
+ * @param {*} [options] Override http request option.
1008
+ * @throws {RequiredError}
1009
+ * @memberof PublicApi
1010
+ */
1011
+ getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters, options) {
1012
+ return PublicApiFp(this.configuration).getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters.runId, requestParameters.artifactId, options).then((request) => request(this.axios, this.basePath));
1013
+ }
945
1014
  /**
946
1015
  * Retrieve details of a specific item (slide) by its external ID and the run ID.
947
1016
  * @summary Get Item By Run
@@ -1005,7 +1074,7 @@ var PublicApi = class extends BaseAPI {
1005
1074
  * @memberof PublicApi
1006
1075
  */
1007
1076
  listRunsV1RunsGet(requestParameters = {}, options) {
1008
- return PublicApiFp(this.configuration).listRunsV1RunsGet(requestParameters.applicationId, requestParameters.applicationVersion, requestParameters.externalId, requestParameters.customMetadata, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
1077
+ return PublicApiFp(this.configuration).listRunsV1RunsGet(requestParameters.applicationId, requestParameters.applicationVersion, requestParameters.externalId, requestParameters.customMetadata, requestParameters.page, requestParameters.pageSize, requestParameters.forOrganization, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
1009
1078
  }
1010
1079
  /**
1011
1080
  * Update the custom metadata of the item with the specified `external_id`, belonging to the specified run. Optionally, a checksum may be provided along the custom metadata JSON. It can be used to verify if the custom metadata was updated since the last time it was accessed. If the checksum is provided, it must match the existing custom metadata in the system, ensuring that the current custom metadata value to be overwritten is acknowledged by the user. If no checksum is provided, submitted metadata directly overwrites the existing metadata, without any checks. The latest custom metadata and checksum can be retrieved for individual items via `GET /v1/runs/{run_id}/items/{external_id}`, and for all items of a run via `GET /v1/runs/{run_id}/items`.
@@ -1215,6 +1284,87 @@ var UnexpectedError = class extends BaseError {
1215
1284
  super(message, "UNEXPECTED_ERROR", options);
1216
1285
  }
1217
1286
  };
1287
+
1288
+ // src/entities/application-run/utils.ts
1289
+ function getRunProgress(run) {
1290
+ const {
1291
+ item_count,
1292
+ item_succeeded_count,
1293
+ item_user_error_count,
1294
+ item_system_error_count,
1295
+ item_skipped_count
1296
+ } = run.statistics;
1297
+ if (item_count === 0) return 0;
1298
+ const processed = item_succeeded_count + item_user_error_count + item_system_error_count + item_skipped_count;
1299
+ return Math.round(processed / item_count * 100);
1300
+ }
1301
+ function getRunStatus(run) {
1302
+ const { state, statistics, termination_reason } = run;
1303
+ switch (state) {
1304
+ case "PENDING":
1305
+ return "PENDING";
1306
+ case "PROCESSING":
1307
+ return "PROCESSING";
1308
+ case "TERMINATED":
1309
+ if (termination_reason === "CANCELED_BY_USER") {
1310
+ return "CANCELED";
1311
+ }
1312
+ if (termination_reason === "CANCELED_BY_SYSTEM") {
1313
+ return "FAILED";
1314
+ }
1315
+ if (statistics.item_count !== statistics.item_succeeded_count) {
1316
+ return "COMPLETED_WITH_ERRORS";
1317
+ }
1318
+ return "COMPLETED";
1319
+ }
1320
+ }
1321
+ var canDownloadRunItems = (run) => {
1322
+ const status = getRunStatus(run);
1323
+ return !["FAILED", "CANCELED", "PENDING", "PROCESSING"].includes(status);
1324
+ };
1325
+
1326
+ // src/entities/application-run/process-application-run.ts
1327
+ var processApplicationRun = (run) => {
1328
+ return {
1329
+ ...run,
1330
+ progress: getRunProgress(run),
1331
+ status: getRunStatus(run),
1332
+ can_download: canDownloadRunItems(run)
1333
+ };
1334
+ };
1335
+
1336
+ // src/entities/run-item/utils.ts
1337
+ var canDownloadItem = (item) => {
1338
+ return getItemStatus(item) === "COMPLETED";
1339
+ };
1340
+ function getItemStatus(item) {
1341
+ const { state, termination_reason } = item;
1342
+ switch (state) {
1343
+ case "PENDING":
1344
+ return "PENDING";
1345
+ case "PROCESSING":
1346
+ return "PROCESSING";
1347
+ case "TERMINATED":
1348
+ if (termination_reason === "SYSTEM_ERROR" || termination_reason === "USER_ERROR") {
1349
+ return "FAILED";
1350
+ }
1351
+ if (termination_reason === "SKIPPED") {
1352
+ return "SKIPPED";
1353
+ }
1354
+ return "COMPLETED";
1355
+ }
1356
+ }
1357
+
1358
+ // src/entities/run-item/process-run-item.ts
1359
+ var processRunItem = (item) => {
1360
+ return {
1361
+ ...item,
1362
+ status: getItemStatus(item),
1363
+ can_download: canDownloadItem(item)
1364
+ };
1365
+ };
1366
+
1367
+ // src/platform-sdk.ts
1218
1368
  var validationErrorSchema = z.object({
1219
1369
  detail: z.array(
1220
1370
  z.object({
@@ -1477,9 +1627,11 @@ var PlatformSDKHttp = class {
1477
1627
  applicationId: options?.applicationId,
1478
1628
  applicationVersion: options?.applicationVersion,
1479
1629
  customMetadata: options?.customMetadata,
1480
- sort: options?.sort
1630
+ sort: options?.sort,
1631
+ page: options?.page,
1632
+ pageSize: options?.pageSize
1481
1633
  });
1482
- return response.data;
1634
+ return response.data.map(processApplicationRun);
1483
1635
  } catch (error) {
1484
1636
  handleRequestError(error);
1485
1637
  }
@@ -1564,7 +1716,7 @@ var PlatformSDKHttp = class {
1564
1716
  const response = await client.getRunV1RunsRunIdGet({
1565
1717
  runId: applicationRunId
1566
1718
  });
1567
- return response.data;
1719
+ return processApplicationRun(response.data);
1568
1720
  } catch (error) {
1569
1721
  handleRequestError(error);
1570
1722
  }
@@ -1636,13 +1788,26 @@ var PlatformSDKHttp = class {
1636
1788
  * }
1637
1789
  * ```
1638
1790
  */
1639
- async listRunResults(applicationRunId) {
1791
+ async listRunResults(applicationRunId, {
1792
+ page,
1793
+ pageSize,
1794
+ sort,
1795
+ externalIdIn,
1796
+ state,
1797
+ terminationReason
1798
+ } = {}) {
1640
1799
  const client = await this.#getClient();
1641
1800
  try {
1642
1801
  const response = await client.listRunItemsV1RunsRunIdItemsGet({
1643
- runId: applicationRunId
1802
+ runId: applicationRunId,
1803
+ page,
1804
+ pageSize,
1805
+ sort,
1806
+ externalIdIn,
1807
+ state,
1808
+ terminationReason
1644
1809
  });
1645
- return response.data;
1810
+ return response.data.map(processRunItem);
1646
1811
  } catch (error) {
1647
1812
  handleRequestError(error);
1648
1813
  }
@@ -1694,6 +1859,6 @@ var PlatformSDKHttp = class {
1694
1859
  // src/index.ts
1695
1860
  var index_default = PlatformSDKHttp;
1696
1861
 
1697
- export { APIError, ArtifactOutput, ArtifactState, ArtifactTerminationReason, AuthenticationError, BaseError, Configuration, ConfigurationError, ItemOutput, ItemState, ItemTerminationReason, OutputArtifactScope, OutputArtifactVisibility, PlatformSDKHttp, PublicApi, PublicApiAxiosParamCreator, PublicApiFactory, PublicApiFp, RunOutput, RunState, RunTerminationReason, index_default as default };
1862
+ export { APIError, ArtifactOutput, ArtifactState, ArtifactTerminationReason, AuthenticationError, BaseError, Configuration, ConfigurationError, ItemOutput, ItemState, ItemTerminationReason, OutputArtifactScope, OutputArtifactVisibility, PlatformSDKHttp, PublicApi, PublicApiAxiosParamCreator, PublicApiFactory, PublicApiFp, RunOutput, RunState, RunTerminationReason, canDownloadItem, canDownloadRunItems, index_default as default, getItemStatus, getRunProgress, getRunStatus, processApplicationRun, processRunItem };
1698
1863
  //# sourceMappingURL=index.js.map
1699
1864
  //# sourceMappingURL=index.js.map