@aignostics/sdk 3.4.0 → 3.5.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 CHANGED
@@ -94,6 +94,11 @@ var ArtifactTerminationReason = {
94
94
  SystemError: "SYSTEM_ERROR",
95
95
  Skipped: "SKIPPED"
96
96
  };
97
+ var GrantRelation = {
98
+ Owner: "owner",
99
+ Editor: "editor",
100
+ Viewer: "viewer"
101
+ };
97
102
  var ItemOutput = {
98
103
  None: "NONE",
99
104
  Full: "FULL"
@@ -117,6 +122,12 @@ var OutputArtifactVisibility = {
117
122
  Internal: "INTERNAL",
118
123
  External: "EXTERNAL"
119
124
  };
125
+ var ResourceType = {
126
+ Run: "run",
127
+ Item: "item",
128
+ OutputArtifact: "output_artifact",
129
+ ShareToken: "share_token"
130
+ };
120
131
  var RunOutput = {
121
132
  None: "NONE",
122
133
  Partial: "PARTIAL",
@@ -132,6 +143,12 @@ var RunTerminationReason = {
132
143
  CanceledBySystem: "CANCELED_BY_SYSTEM",
133
144
  CanceledByUser: "CANCELED_BY_USER"
134
145
  };
146
+ var SubjectType = {
147
+ User: "user",
148
+ OrganizationAdmin: "organization_admin",
149
+ OrganizationUser: "organization_user",
150
+ ShareToken: "share_token"
151
+ };
135
152
  var VersionDocumentVisibility = {
136
153
  Public: "public",
137
154
  Internal: "internal"
@@ -194,6 +211,35 @@ var PublicApiAxiosParamCreator = function(configuration) {
194
211
  options: localVarRequestOptions
195
212
  };
196
213
  },
214
+ /**
215
+ * Create a grant to share access to a resource with a subject (user or organization).
216
+ * @summary Create Grant
217
+ * @param {GrantCreateRequest} grantCreateRequest
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ */
221
+ createGrantV1AccessGrantsPost: async (grantCreateRequest, options = {}) => {
222
+ assertParamExists("createGrantV1AccessGrantsPost", "grantCreateRequest", grantCreateRequest);
223
+ const localVarPath = `/v1/access/grants`;
224
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
225
+ let baseOptions;
226
+ if (configuration) {
227
+ baseOptions = configuration.baseOptions;
228
+ }
229
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
230
+ const localVarHeaderParameter = {};
231
+ const localVarQueryParameter = {};
232
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
233
+ localVarHeaderParameter["Content-Type"] = "application/json";
234
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
235
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
236
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
237
+ localVarRequestOptions.data = serializeDataIfNeeded(grantCreateRequest, localVarRequestOptions, configuration);
238
+ return {
239
+ url: toPathString(localVarUrlObj),
240
+ options: localVarRequestOptions
241
+ };
242
+ },
197
243
  /**
198
244
  * This endpoint initiates a processing run for a selected application and version, and returns a `run_id` for tracking purposes. Slide processing occurs asynchronously, allowing you to retrieve results for individual slides as soon as they complete processing. The system typically processes slides in batches. Below is an example of the required payload for initiating an Atlas H&E TME processing run. ### Payload The payload includes `application_id`, optional `version_number`, and `items` base fields. `application_id` is the unique identifier for the application. `version_number` is the semantic version to use. If not provided, the latest available version will be used. `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 custom_metadata, specific to the chosen application. Example payload structure with the comments: ``` { application_id: \"he-tme\", version_number: \"1.0.0-beta\", items: [{ \"external_id\": \"slide_1\", \"custom_metadata\": {\"project\": \"sample-study\"}, \"input_artifacts\": [{ \"name\": \"user_slide\", \"download_url\": \"https://...\", \"metadata\": { \"specimen\": { \"disease\": \"LUNG_CANCER\", \"tissue\": \"LUNG\" }, \"staining_method\": \"H&E\", \"width_px\": 136223, \"height_px\": 87761, \"resolution_mpp\": 0.2628238, \"media-type\":\"image/tiff\", \"checksum_base64_crc32c\": \"64RKKA==\" } }] }] } ``` | Parameter | Description | | :---- | :---- | | `application_id` required | Unique ID for the application | | `version_number` optional | Semantic version of the application. If not provided, the latest available version will be used | | `items` required | List of submitted items i.e. whole slide images (WSIs) with parameters described below. | | `external_id` required | Unique WSI name or ID for easy reference to items, provided by the caller. The `external_id` should be unique across all items of the run. | | `input_artifacts` required | List of provided artifacts for a WSI; at the moment Atlas H&E-TME receives only 1 artifact per slide (the slide itself), but for some other applications this can be a slide and a segmentation map | | `name` required | Type of artifact; Atlas H&E-TME supports only `\"input_slide\"` | | `download_url` required | Signed URL to the input file in the S3 or GCS; Should be valid for at least 6 days | | `specimen: disease` required | Supported cancer types for Atlas H&E-TME (see full list in Atlas H&E-TME manual) | | `specimen: tissue` required | Supported tissue types for Atlas H&E-TME (see full list in Atlas H&E-TME manual) | | `staining_method` required | WSI stain bio-marker; Atlas H&E-TME supports only `\"H&E\"` | | `width_px` required | Integer value. Number of pixels of the WSI in the X dimension. | | `height_px` required | Integer value. Number of pixels of the WSI in the Y dimension. | | `resolution_mpp` required | Resolution of WSI in micrometers per pixel; check allowed range in Atlas H&E-TME manual | | `media-type` required | Supported media formats; available values are: image/tiff (for .tiff or .tif WSI), application/dicom (for DICOM ), application/zip (for zipped DICOM), and application/octet-stream (for .svs WSI) | | `checksum_base64_crc32c` required | Base64-encoded big-endian CRC32C checksum of the WSI image | ### Response The endpoint returns the run UUID. After that, the job is scheduled for the execution in the background. To check the status of the run, call `GET v1/runs/{run_id}` endpoint with the returned run UUID. ### Rejection Apart from the authentication, authorization, and malformed input error, the request can be rejected when specific quota limit is exceeded. More details on quotas is described in the documentation
199
245
  * @summary Initiate Run
@@ -223,6 +269,35 @@ var PublicApiAxiosParamCreator = function(configuration) {
223
269
  options: localVarRequestOptions
224
270
  };
225
271
  },
272
+ /**
273
+ * Create a share token. The returned share_token value is shown only once and is never stored. Use POST /access/grants with subject_type=share_token to grant access to a resource.
274
+ * @summary Create Share Token
275
+ * @param {ShareTokenCreateRequest} shareTokenCreateRequest
276
+ * @param {*} [options] Override http request option.
277
+ * @throws {RequiredError}
278
+ */
279
+ createShareTokenV1AccessShareTokensPost: async (shareTokenCreateRequest, options = {}) => {
280
+ assertParamExists("createShareTokenV1AccessShareTokensPost", "shareTokenCreateRequest", shareTokenCreateRequest);
281
+ const localVarPath = `/v1/access/share-tokens`;
282
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
283
+ let baseOptions;
284
+ if (configuration) {
285
+ baseOptions = configuration.baseOptions;
286
+ }
287
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
288
+ const localVarHeaderParameter = {};
289
+ const localVarQueryParameter = {};
290
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
291
+ localVarHeaderParameter["Content-Type"] = "application/json";
292
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
293
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
294
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
295
+ localVarRequestOptions.data = serializeDataIfNeeded(shareTokenCreateRequest, localVarRequestOptions, configuration);
296
+ return {
297
+ url: toPathString(localVarUrlObj),
298
+ options: localVarRequestOptions
299
+ };
300
+ },
226
301
  /**
227
302
  * This endpoint allows the caller to explicitly delete artifacts generated by a run. It can only be invoked when the run has reached a final state, i.e. `PROCESSED`, `CANCELED_SYSTEM`, or `CANCELED_USER`. Note that by default, all artifacts are automatically deleted 30 days after the run finishes, regardless of whether the caller explicitly requests such deletion.
228
303
  * @summary Delete Run Items
@@ -255,10 +330,11 @@ var PublicApiAxiosParamCreator = function(configuration) {
255
330
  * @summary Get Artifact Url
256
331
  * @param {string} runId Run id, returned by `POST /runs/` endpoint
257
332
  * @param {string} artifactId The artifact id to download
333
+ * @param {string | null} [shareToken] Share token for accessing shared runs
258
334
  * @param {*} [options] Override http request option.
259
335
  * @throws {RequiredError}
260
336
  */
261
- getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet: async (runId, artifactId, options = {}) => {
337
+ getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet: async (runId, artifactId, shareToken, options = {}) => {
262
338
  assertParamExists("getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet", "runId", runId);
263
339
  assertParamExists("getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet", "artifactId", artifactId);
264
340
  const localVarPath = `/v1/runs/{run_id}/artifacts/{artifact_id}/file`.replace(`{${"run_id"}}`, encodeURIComponent(String(runId))).replace(`{${"artifact_id"}}`, encodeURIComponent(String(artifactId)));
@@ -271,6 +347,36 @@ var PublicApiAxiosParamCreator = function(configuration) {
271
347
  const localVarHeaderParameter = {};
272
348
  const localVarQueryParameter = {};
273
349
  await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
350
+ if (shareToken !== void 0) {
351
+ localVarQueryParameter["share_token"] = shareToken;
352
+ }
353
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
354
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
355
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
356
+ return {
357
+ url: toPathString(localVarUrlObj),
358
+ options: localVarRequestOptions
359
+ };
360
+ },
361
+ /**
362
+ * Get a grant by its ID.
363
+ * @summary Get Grant
364
+ * @param {string} grantId Grant ID
365
+ * @param {*} [options] Override http request option.
366
+ * @throws {RequiredError}
367
+ */
368
+ getGrantV1AccessGrantsGrantIdGet: async (grantId, options = {}) => {
369
+ assertParamExists("getGrantV1AccessGrantsGrantIdGet", "grantId", grantId);
370
+ const localVarPath = `/v1/access/grants/{grant_id}`.replace(`{${"grant_id"}}`, encodeURIComponent(String(grantId)));
371
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
372
+ let baseOptions;
373
+ if (configuration) {
374
+ baseOptions = configuration.baseOptions;
375
+ }
376
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
377
+ const localVarHeaderParameter = {};
378
+ const localVarQueryParameter = {};
379
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
274
380
  setSearchParams(localVarUrlObj, localVarQueryParameter);
275
381
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
276
382
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -284,10 +390,11 @@ var PublicApiAxiosParamCreator = function(configuration) {
284
390
  * @summary Get Item By Run
285
391
  * @param {string} runId The run id, returned by `POST /runs/` endpoint
286
392
  * @param {string} externalId The `external_id` that was defined for the item by the customer that triggered the run.
393
+ * @param {string | null} [shareToken] Share token for accessing shared runs
287
394
  * @param {*} [options] Override http request option.
288
395
  * @throws {RequiredError}
289
396
  */
290
- getItemByRunV1RunsRunIdItemsExternalIdGet: async (runId, externalId, options = {}) => {
397
+ getItemByRunV1RunsRunIdItemsExternalIdGet: async (runId, externalId, shareToken, options = {}) => {
291
398
  assertParamExists("getItemByRunV1RunsRunIdItemsExternalIdGet", "runId", runId);
292
399
  assertParamExists("getItemByRunV1RunsRunIdItemsExternalIdGet", "externalId", externalId);
293
400
  const localVarPath = `/v1/runs/{run_id}/items/{external_id}`.replace(`{${"run_id"}}`, encodeURIComponent(String(runId))).replace(`{${"external_id"}}`, encodeURIComponent(String(externalId)));
@@ -300,6 +407,9 @@ var PublicApiAxiosParamCreator = function(configuration) {
300
407
  const localVarHeaderParameter = {};
301
408
  const localVarQueryParameter = {};
302
409
  await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
410
+ if (shareToken !== void 0) {
411
+ localVarQueryParameter["share_token"] = shareToken;
412
+ }
303
413
  setSearchParams(localVarUrlObj, localVarQueryParameter);
304
414
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
305
415
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -334,13 +444,14 @@ var PublicApiAxiosParamCreator = function(configuration) {
334
444
  };
335
445
  },
336
446
  /**
337
- * This endpoint allows the caller to retrieve the current status of a run along with other relevant run details. A run becomes available immediately after it is created through the `POST /v1/runs/` endpoint. To download the output results, use `GET /v1/runs/{run_id}/` items to get outputs for all slides. Access to a run is restricted to the user who created it.
447
+ * This endpoint allows the caller to retrieve the current status of a run along with other relevant run details. A run becomes available immediately after it is created through the `POST /v1/runs/` endpoint. To download the output results, use `GET /v1/runs/{run_id}/` items to get outputs for all slides. Access to a run is restricted to the user who created it, or users with an active grant or valid share token.
338
448
  * @summary Get run details
339
449
  * @param {string} runId Run id, returned by `POST /v1/runs/` endpoint
450
+ * @param {string | null} [shareToken] Share token for accessing shared runs
340
451
  * @param {*} [options] Override http request option.
341
452
  * @throws {RequiredError}
342
453
  */
343
- getRunV1RunsRunIdGet: async (runId, options = {}) => {
454
+ getRunV1RunsRunIdGet: async (runId, shareToken, options = {}) => {
344
455
  assertParamExists("getRunV1RunsRunIdGet", "runId", runId);
345
456
  const localVarPath = `/v1/runs/{run_id}`.replace(`{${"run_id"}}`, encodeURIComponent(String(runId)));
346
457
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -352,6 +463,36 @@ var PublicApiAxiosParamCreator = function(configuration) {
352
463
  const localVarHeaderParameter = {};
353
464
  const localVarQueryParameter = {};
354
465
  await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
466
+ if (shareToken !== void 0) {
467
+ localVarQueryParameter["share_token"] = shareToken;
468
+ }
469
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
470
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
471
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
472
+ return {
473
+ url: toPathString(localVarUrlObj),
474
+ options: localVarRequestOptions
475
+ };
476
+ },
477
+ /**
478
+ * Get a share token by its ID.
479
+ * @summary Get Share Token
480
+ * @param {string} shareTokenId Share token ID
481
+ * @param {*} [options] Override http request option.
482
+ * @throws {RequiredError}
483
+ */
484
+ getShareTokenV1AccessShareTokensShareTokenIdGet: async (shareTokenId, options = {}) => {
485
+ assertParamExists("getShareTokenV1AccessShareTokensShareTokenIdGet", "shareTokenId", shareTokenId);
486
+ const localVarPath = `/v1/access/share-tokens/{share_token_id}`.replace(`{${"share_token_id"}}`, encodeURIComponent(String(shareTokenId)));
487
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
488
+ let baseOptions;
489
+ if (configuration) {
490
+ baseOptions = configuration.baseOptions;
491
+ }
492
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
493
+ const localVarHeaderParameter = {};
494
+ const localVarQueryParameter = {};
495
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
355
496
  setSearchParams(localVarUrlObj, localVarQueryParameter);
356
497
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
357
498
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -490,10 +631,72 @@ var PublicApiAxiosParamCreator = function(configuration) {
490
631
  options: localVarRequestOptions
491
632
  };
492
633
  },
634
+ /**
635
+ * List grants. Org admins see all grants for all resources in their organization. Regular users see grants for all resources they submitted.
636
+ * @summary List Grants
637
+ * @param {ResourceType | null} [resourceType]
638
+ * @param {string | null} [resourceId]
639
+ * @param {SubjectType | null} [subjectType]
640
+ * @param {string | null} [subjectId]
641
+ * @param {Array<GrantRelation> | null} [relation] Filter grants by relation type. Can be specified multiple times.
642
+ * @param {boolean | null} [revoked]
643
+ * @param {number} [page]
644
+ * @param {number} [pageSize]
645
+ * @param {Array<string> | null} [sort] Sort the results by one or more fields. Use &#x60;+&#x60; for ascending and &#x60;-&#x60; for descending order.
646
+ * @param {*} [options] Override http request option.
647
+ * @throws {RequiredError}
648
+ */
649
+ listGrantsV1AccessGrantsGet: async (resourceType, resourceId, subjectType, subjectId, relation, revoked, page, pageSize, sort, options = {}) => {
650
+ const localVarPath = `/v1/access/grants`;
651
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
652
+ let baseOptions;
653
+ if (configuration) {
654
+ baseOptions = configuration.baseOptions;
655
+ }
656
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
657
+ const localVarHeaderParameter = {};
658
+ const localVarQueryParameter = {};
659
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
660
+ if (resourceType !== void 0) {
661
+ localVarQueryParameter["resource_type"] = resourceType;
662
+ }
663
+ if (resourceId !== void 0) {
664
+ localVarQueryParameter["resource_id"] = resourceId;
665
+ }
666
+ if (subjectType !== void 0) {
667
+ localVarQueryParameter["subject_type"] = subjectType;
668
+ }
669
+ if (subjectId !== void 0) {
670
+ localVarQueryParameter["subject_id"] = subjectId;
671
+ }
672
+ if (relation) {
673
+ localVarQueryParameter["relation"] = relation;
674
+ }
675
+ if (revoked !== void 0) {
676
+ localVarQueryParameter["revoked"] = revoked;
677
+ }
678
+ if (page !== void 0) {
679
+ localVarQueryParameter["page"] = page;
680
+ }
681
+ if (pageSize !== void 0) {
682
+ localVarQueryParameter["page_size"] = pageSize;
683
+ }
684
+ if (sort) {
685
+ localVarQueryParameter["sort"] = sort;
686
+ }
687
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
688
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
689
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
690
+ return {
691
+ url: toPathString(localVarUrlObj),
692
+ options: localVarRequestOptions
693
+ };
694
+ },
493
695
  /**
494
696
  * List items in a run with filtering, sorting, and pagination capabilities. Returns paginated items within a specific run. Results can be filtered by `item_id`, `external_ids`, `custom_metadata`, `terminated_at`, and `termination_reason` using JSONPath expressions. ## JSONPath Metadata Filtering Use PostgreSQL JSONPath expressions to filter items using their custom_metadata. ### Examples: - **Field existence**: `$.case_id` - Results that have a case_id field defined - **Exact value match**: `$.priority ? (@ == \"high\")` - Results with high priority - **Numeric comparison**: `$.confidence_score ? (@ > 0.95)` - Results with high confidence - **Array operations**: `$.flags[*] ? (@ == \"reviewed\")` - Results flagged as reviewed - **Complex conditions**: `$.metrics ? (@.accuracy > 0.9 && @.recall > 0.8)` - Results meeting performance thresholds ## 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
495
697
  * @summary List Run Items
496
698
  * @param {string} runId Run id, returned by &#x60;POST /v1/runs/&#x60; endpoint
699
+ * @param {string | null} [shareToken] Share token for accessing shared runs
497
700
  * @param {Array<string> | null} [itemIdIn] Filter for item ids
498
701
  * @param {Array<string> | null} [externalIdIn] Filter for items by their external_id from the input payload
499
702
  * @param {ItemState | null} [state] Filter items by their state
@@ -505,7 +708,7 @@ var PublicApiAxiosParamCreator = function(configuration) {
505
708
  * @param {*} [options] Override http request option.
506
709
  * @throws {RequiredError}
507
710
  */
508
- listRunItemsV1RunsRunIdItemsGet: async (runId, itemIdIn, externalIdIn, state, terminationReason, customMetadata, page, pageSize, sort, options = {}) => {
711
+ listRunItemsV1RunsRunIdItemsGet: async (runId, shareToken, itemIdIn, externalIdIn, state, terminationReason, customMetadata, page, pageSize, sort, options = {}) => {
509
712
  assertParamExists("listRunItemsV1RunsRunIdItemsGet", "runId", runId);
510
713
  const localVarPath = `/v1/runs/{run_id}/items`.replace(`{${"run_id"}}`, encodeURIComponent(String(runId)));
511
714
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -517,6 +720,9 @@ var PublicApiAxiosParamCreator = function(configuration) {
517
720
  const localVarHeaderParameter = {};
518
721
  const localVarQueryParameter = {};
519
722
  await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
723
+ if (shareToken !== void 0) {
724
+ localVarQueryParameter["share_token"] = shareToken;
725
+ }
520
726
  if (itemIdIn) {
521
727
  localVarQueryParameter["item_id__in"] = itemIdIn;
522
728
  }
@@ -558,12 +764,14 @@ var PublicApiAxiosParamCreator = function(configuration) {
558
764
  * @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**
559
765
  * @param {number} [page]
560
766
  * @param {number} [pageSize]
767
+ * @param {string | null} [submittedBy] Filter runs by the user who submitted them. Use the special value &#x60;me&#x60; to return only runs submitted by the current user.
768
+ * @param {string | null} [organizationId] Filter runs by the organization of the submitter. Use the special value &#x60;my_org&#x60; to filter by the current user\&#39;s organization.
561
769
  * @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.
562
770
  * @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)
563
771
  * @param {*} [options] Override http request option.
564
772
  * @throws {RequiredError}
565
773
  */
566
- listRunsV1RunsGet: async (applicationId, applicationVersion, externalId, customMetadata, page, pageSize, forOrganization, sort, options = {}) => {
774
+ listRunsV1RunsGet: async (applicationId, applicationVersion, externalId, customMetadata, page, pageSize, submittedBy, organizationId, forOrganization, sort, options = {}) => {
567
775
  const localVarPath = `/v1/runs`;
568
776
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
569
777
  let baseOptions;
@@ -592,6 +800,12 @@ var PublicApiAxiosParamCreator = function(configuration) {
592
800
  if (pageSize !== void 0) {
593
801
  localVarQueryParameter["page_size"] = pageSize;
594
802
  }
803
+ if (submittedBy !== void 0) {
804
+ localVarQueryParameter["submitted_by"] = submittedBy;
805
+ }
806
+ if (organizationId !== void 0) {
807
+ localVarQueryParameter["organization_id"] = organizationId;
808
+ }
595
809
  if (forOrganization !== void 0) {
596
810
  localVarQueryParameter["for_organization"] = forOrganization;
597
811
  }
@@ -606,6 +820,55 @@ var PublicApiAxiosParamCreator = function(configuration) {
606
820
  options: localVarRequestOptions
607
821
  };
608
822
  },
823
+ /**
824
+ * List share tokens. Service and Superadmin see all tokens; other users see only their own.
825
+ * @summary List Share Tokens
826
+ * @param {string | null} [runId] Filter by run ID
827
+ * @param {string | null} [createdBy] Filter by share token creator
828
+ * @param {boolean | null} [revoked]
829
+ * @param {number} [page]
830
+ * @param {number} [pageSize]
831
+ * @param {Array<string> | null} [sort] Sort the results by one or more fields. Use &#x60;+&#x60; for ascending and &#x60;-&#x60; for descending order.
832
+ * @param {*} [options] Override http request option.
833
+ * @throws {RequiredError}
834
+ */
835
+ listShareTokensV1AccessShareTokensGet: async (runId, createdBy, revoked, page, pageSize, sort, options = {}) => {
836
+ const localVarPath = `/v1/access/share-tokens`;
837
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
838
+ let baseOptions;
839
+ if (configuration) {
840
+ baseOptions = configuration.baseOptions;
841
+ }
842
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
843
+ const localVarHeaderParameter = {};
844
+ const localVarQueryParameter = {};
845
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
846
+ if (runId !== void 0) {
847
+ localVarQueryParameter["run_id"] = runId;
848
+ }
849
+ if (createdBy !== void 0) {
850
+ localVarQueryParameter["created_by"] = createdBy;
851
+ }
852
+ if (revoked !== void 0) {
853
+ localVarQueryParameter["revoked"] = revoked;
854
+ }
855
+ if (page !== void 0) {
856
+ localVarQueryParameter["page"] = page;
857
+ }
858
+ if (pageSize !== void 0) {
859
+ localVarQueryParameter["page_size"] = pageSize;
860
+ }
861
+ if (sort) {
862
+ localVarQueryParameter["sort"] = sort;
863
+ }
864
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
865
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
866
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
867
+ return {
868
+ url: toPathString(localVarUrlObj),
869
+ options: localVarRequestOptions
870
+ };
871
+ },
609
872
  /**
610
873
  * List public documents attached to an application version. Returns only documents with ``visibility=public`` and ``status=uploaded``.
611
874
  * @summary List version documents
@@ -725,6 +988,60 @@ var PublicApiAxiosParamCreator = function(configuration) {
725
988
  url: toPathString(localVarUrlObj),
726
989
  options: localVarRequestOptions
727
990
  };
991
+ },
992
+ /**
993
+ * Revoke a grant by its ID. Sets the revoked_at timestamp on the grant.
994
+ * @summary Revoke Grant
995
+ * @param {string} grantId Grant ID
996
+ * @param {*} [options] Override http request option.
997
+ * @throws {RequiredError}
998
+ */
999
+ revokeGrantV1AccessGrantsGrantIdDelete: async (grantId, options = {}) => {
1000
+ assertParamExists("revokeGrantV1AccessGrantsGrantIdDelete", "grantId", grantId);
1001
+ const localVarPath = `/v1/access/grants/{grant_id}`.replace(`{${"grant_id"}}`, encodeURIComponent(String(grantId)));
1002
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1003
+ let baseOptions;
1004
+ if (configuration) {
1005
+ baseOptions = configuration.baseOptions;
1006
+ }
1007
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
1008
+ const localVarHeaderParameter = {};
1009
+ const localVarQueryParameter = {};
1010
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
1011
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1012
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1013
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1014
+ return {
1015
+ url: toPathString(localVarUrlObj),
1016
+ options: localVarRequestOptions
1017
+ };
1018
+ },
1019
+ /**
1020
+ * Revoke a share token by its ID. Invalidates the credential regardless of any active grants.
1021
+ * @summary Revoke Share Token
1022
+ * @param {string} shareTokenId Share token ID
1023
+ * @param {*} [options] Override http request option.
1024
+ * @throws {RequiredError}
1025
+ */
1026
+ revokeShareTokenV1AccessShareTokensShareTokenIdDelete: async (shareTokenId, options = {}) => {
1027
+ assertParamExists("revokeShareTokenV1AccessShareTokensShareTokenIdDelete", "shareTokenId", shareTokenId);
1028
+ const localVarPath = `/v1/access/share-tokens/{share_token_id}`.replace(`{${"share_token_id"}}`, encodeURIComponent(String(shareTokenId)));
1029
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1030
+ let baseOptions;
1031
+ if (configuration) {
1032
+ baseOptions = configuration.baseOptions;
1033
+ }
1034
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
1035
+ const localVarHeaderParameter = {};
1036
+ const localVarQueryParameter = {};
1037
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
1038
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1039
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1040
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1041
+ return {
1042
+ url: toPathString(localVarUrlObj),
1043
+ options: localVarRequestOptions
1044
+ };
728
1045
  }
729
1046
  };
730
1047
  };
@@ -758,6 +1075,19 @@ var PublicApiFp = function(configuration) {
758
1075
  const localVarOperationServerBasePath = operationServerMap["PublicApi.cancelRunV1RunsRunIdCancelPost"]?.[localVarOperationServerIndex]?.url;
759
1076
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
760
1077
  },
1078
+ /**
1079
+ * Create a grant to share access to a resource with a subject (user or organization).
1080
+ * @summary Create Grant
1081
+ * @param {GrantCreateRequest} grantCreateRequest
1082
+ * @param {*} [options] Override http request option.
1083
+ * @throws {RequiredError}
1084
+ */
1085
+ async createGrantV1AccessGrantsPost(grantCreateRequest, options) {
1086
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createGrantV1AccessGrantsPost(grantCreateRequest, options);
1087
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1088
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.createGrantV1AccessGrantsPost"]?.[localVarOperationServerIndex]?.url;
1089
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1090
+ },
761
1091
  /**
762
1092
  * This endpoint initiates a processing run for a selected application and version, and returns a `run_id` for tracking purposes. Slide processing occurs asynchronously, allowing you to retrieve results for individual slides as soon as they complete processing. The system typically processes slides in batches. Below is an example of the required payload for initiating an Atlas H&E TME processing run. ### Payload The payload includes `application_id`, optional `version_number`, and `items` base fields. `application_id` is the unique identifier for the application. `version_number` is the semantic version to use. If not provided, the latest available version will be used. `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 custom_metadata, specific to the chosen application. Example payload structure with the comments: ``` { application_id: \"he-tme\", version_number: \"1.0.0-beta\", items: [{ \"external_id\": \"slide_1\", \"custom_metadata\": {\"project\": \"sample-study\"}, \"input_artifacts\": [{ \"name\": \"user_slide\", \"download_url\": \"https://...\", \"metadata\": { \"specimen\": { \"disease\": \"LUNG_CANCER\", \"tissue\": \"LUNG\" }, \"staining_method\": \"H&E\", \"width_px\": 136223, \"height_px\": 87761, \"resolution_mpp\": 0.2628238, \"media-type\":\"image/tiff\", \"checksum_base64_crc32c\": \"64RKKA==\" } }] }] } ``` | Parameter | Description | | :---- | :---- | | `application_id` required | Unique ID for the application | | `version_number` optional | Semantic version of the application. If not provided, the latest available version will be used | | `items` required | List of submitted items i.e. whole slide images (WSIs) with parameters described below. | | `external_id` required | Unique WSI name or ID for easy reference to items, provided by the caller. The `external_id` should be unique across all items of the run. | | `input_artifacts` required | List of provided artifacts for a WSI; at the moment Atlas H&E-TME receives only 1 artifact per slide (the slide itself), but for some other applications this can be a slide and a segmentation map | | `name` required | Type of artifact; Atlas H&E-TME supports only `\"input_slide\"` | | `download_url` required | Signed URL to the input file in the S3 or GCS; Should be valid for at least 6 days | | `specimen: disease` required | Supported cancer types for Atlas H&E-TME (see full list in Atlas H&E-TME manual) | | `specimen: tissue` required | Supported tissue types for Atlas H&E-TME (see full list in Atlas H&E-TME manual) | | `staining_method` required | WSI stain bio-marker; Atlas H&E-TME supports only `\"H&E\"` | | `width_px` required | Integer value. Number of pixels of the WSI in the X dimension. | | `height_px` required | Integer value. Number of pixels of the WSI in the Y dimension. | | `resolution_mpp` required | Resolution of WSI in micrometers per pixel; check allowed range in Atlas H&E-TME manual | | `media-type` required | Supported media formats; available values are: image/tiff (for .tiff or .tif WSI), application/dicom (for DICOM ), application/zip (for zipped DICOM), and application/octet-stream (for .svs WSI) | | `checksum_base64_crc32c` required | Base64-encoded big-endian CRC32C checksum of the WSI image | ### Response The endpoint returns the run UUID. After that, the job is scheduled for the execution in the background. To check the status of the run, call `GET v1/runs/{run_id}` endpoint with the returned run UUID. ### Rejection Apart from the authentication, authorization, and malformed input error, the request can be rejected when specific quota limit is exceeded. More details on quotas is described in the documentation
763
1093
  * @summary Initiate Run
@@ -771,6 +1101,19 @@ var PublicApiFp = function(configuration) {
771
1101
  const localVarOperationServerBasePath = operationServerMap["PublicApi.createRunV1RunsPost"]?.[localVarOperationServerIndex]?.url;
772
1102
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
773
1103
  },
1104
+ /**
1105
+ * Create a share token. The returned share_token value is shown only once and is never stored. Use POST /access/grants with subject_type=share_token to grant access to a resource.
1106
+ * @summary Create Share Token
1107
+ * @param {ShareTokenCreateRequest} shareTokenCreateRequest
1108
+ * @param {*} [options] Override http request option.
1109
+ * @throws {RequiredError}
1110
+ */
1111
+ async createShareTokenV1AccessShareTokensPost(shareTokenCreateRequest, options) {
1112
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createShareTokenV1AccessShareTokensPost(shareTokenCreateRequest, options);
1113
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1114
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.createShareTokenV1AccessShareTokensPost"]?.[localVarOperationServerIndex]?.url;
1115
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1116
+ },
774
1117
  /**
775
1118
  * This endpoint allows the caller to explicitly delete artifacts generated by a run. It can only be invoked when the run has reached a final state, i.e. `PROCESSED`, `CANCELED_SYSTEM`, or `CANCELED_USER`. Note that by default, all artifacts are automatically deleted 30 days after the run finishes, regardless of whether the caller explicitly requests such deletion.
776
1119
  * @summary Delete Run Items
@@ -789,25 +1132,40 @@ var PublicApiFp = function(configuration) {
789
1132
  * @summary Get Artifact Url
790
1133
  * @param {string} runId Run id, returned by &#x60;POST /runs/&#x60; endpoint
791
1134
  * @param {string} artifactId The artifact id to download
1135
+ * @param {string | null} [shareToken] Share token for accessing shared runs
792
1136
  * @param {*} [options] Override http request option.
793
1137
  * @throws {RequiredError}
794
1138
  */
795
- async getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(runId, artifactId, options) {
796
- const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(runId, artifactId, options);
1139
+ async getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(runId, artifactId, shareToken, options) {
1140
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(runId, artifactId, shareToken, options);
797
1141
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
798
1142
  const localVarOperationServerBasePath = operationServerMap["PublicApi.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet"]?.[localVarOperationServerIndex]?.url;
799
1143
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
800
1144
  },
1145
+ /**
1146
+ * Get a grant by its ID.
1147
+ * @summary Get Grant
1148
+ * @param {string} grantId Grant ID
1149
+ * @param {*} [options] Override http request option.
1150
+ * @throws {RequiredError}
1151
+ */
1152
+ async getGrantV1AccessGrantsGrantIdGet(grantId, options) {
1153
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getGrantV1AccessGrantsGrantIdGet(grantId, options);
1154
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1155
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.getGrantV1AccessGrantsGrantIdGet"]?.[localVarOperationServerIndex]?.url;
1156
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1157
+ },
801
1158
  /**
802
1159
  * Retrieve details of a specific item (slide) by its external ID and the run ID.
803
1160
  * @summary Get Item By Run
804
1161
  * @param {string} runId The run id, returned by &#x60;POST /runs/&#x60; endpoint
805
1162
  * @param {string} externalId The &#x60;external_id&#x60; that was defined for the item by the customer that triggered the run.
1163
+ * @param {string | null} [shareToken] Share token for accessing shared runs
806
1164
  * @param {*} [options] Override http request option.
807
1165
  * @throws {RequiredError}
808
1166
  */
809
- async getItemByRunV1RunsRunIdItemsExternalIdGet(runId, externalId, options) {
810
- const localVarAxiosArgs = await localVarAxiosParamCreator.getItemByRunV1RunsRunIdItemsExternalIdGet(runId, externalId, options);
1167
+ async getItemByRunV1RunsRunIdItemsExternalIdGet(runId, externalId, shareToken, options) {
1168
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getItemByRunV1RunsRunIdItemsExternalIdGet(runId, externalId, shareToken, options);
811
1169
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
812
1170
  const localVarOperationServerBasePath = operationServerMap["PublicApi.getItemByRunV1RunsRunIdItemsExternalIdGet"]?.[localVarOperationServerIndex]?.url;
813
1171
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -825,18 +1183,32 @@ var PublicApiFp = function(configuration) {
825
1183
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
826
1184
  },
827
1185
  /**
828
- * This endpoint allows the caller to retrieve the current status of a run along with other relevant run details. A run becomes available immediately after it is created through the `POST /v1/runs/` endpoint. To download the output results, use `GET /v1/runs/{run_id}/` items to get outputs for all slides. Access to a run is restricted to the user who created it.
1186
+ * This endpoint allows the caller to retrieve the current status of a run along with other relevant run details. A run becomes available immediately after it is created through the `POST /v1/runs/` endpoint. To download the output results, use `GET /v1/runs/{run_id}/` items to get outputs for all slides. Access to a run is restricted to the user who created it, or users with an active grant or valid share token.
829
1187
  * @summary Get run details
830
1188
  * @param {string} runId Run id, returned by &#x60;POST /v1/runs/&#x60; endpoint
1189
+ * @param {string | null} [shareToken] Share token for accessing shared runs
831
1190
  * @param {*} [options] Override http request option.
832
1191
  * @throws {RequiredError}
833
1192
  */
834
- async getRunV1RunsRunIdGet(runId, options) {
835
- const localVarAxiosArgs = await localVarAxiosParamCreator.getRunV1RunsRunIdGet(runId, options);
1193
+ async getRunV1RunsRunIdGet(runId, shareToken, options) {
1194
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRunV1RunsRunIdGet(runId, shareToken, options);
836
1195
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
837
1196
  const localVarOperationServerBasePath = operationServerMap["PublicApi.getRunV1RunsRunIdGet"]?.[localVarOperationServerIndex]?.url;
838
1197
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
839
1198
  },
1199
+ /**
1200
+ * Get a share token by its ID.
1201
+ * @summary Get Share Token
1202
+ * @param {string} shareTokenId Share token ID
1203
+ * @param {*} [options] Override http request option.
1204
+ * @throws {RequiredError}
1205
+ */
1206
+ async getShareTokenV1AccessShareTokensShareTokenIdGet(shareTokenId, options) {
1207
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getShareTokenV1AccessShareTokensShareTokenIdGet(shareTokenId, options);
1208
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1209
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.getShareTokenV1AccessShareTokensShareTokenIdGet"]?.[localVarOperationServerIndex]?.url;
1210
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1211
+ },
840
1212
  /**
841
1213
  * Return metadata for a single public document attached to an application version.
842
1214
  * @summary Get version document metadata
@@ -897,10 +1269,32 @@ var PublicApiFp = function(configuration) {
897
1269
  const localVarOperationServerBasePath = operationServerMap["PublicApi.listApplicationsV1ApplicationsGet"]?.[localVarOperationServerIndex]?.url;
898
1270
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
899
1271
  },
1272
+ /**
1273
+ * List grants. Org admins see all grants for all resources in their organization. Regular users see grants for all resources they submitted.
1274
+ * @summary List Grants
1275
+ * @param {ResourceType | null} [resourceType]
1276
+ * @param {string | null} [resourceId]
1277
+ * @param {SubjectType | null} [subjectType]
1278
+ * @param {string | null} [subjectId]
1279
+ * @param {Array<GrantRelation> | null} [relation] Filter grants by relation type. Can be specified multiple times.
1280
+ * @param {boolean | null} [revoked]
1281
+ * @param {number} [page]
1282
+ * @param {number} [pageSize]
1283
+ * @param {Array<string> | null} [sort] Sort the results by one or more fields. Use &#x60;+&#x60; for ascending and &#x60;-&#x60; for descending order.
1284
+ * @param {*} [options] Override http request option.
1285
+ * @throws {RequiredError}
1286
+ */
1287
+ async listGrantsV1AccessGrantsGet(resourceType, resourceId, subjectType, subjectId, relation, revoked, page, pageSize, sort, options) {
1288
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listGrantsV1AccessGrantsGet(resourceType, resourceId, subjectType, subjectId, relation, revoked, page, pageSize, sort, options);
1289
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1290
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.listGrantsV1AccessGrantsGet"]?.[localVarOperationServerIndex]?.url;
1291
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1292
+ },
900
1293
  /**
901
1294
  * List items in a run with filtering, sorting, and pagination capabilities. Returns paginated items within a specific run. Results can be filtered by `item_id`, `external_ids`, `custom_metadata`, `terminated_at`, and `termination_reason` using JSONPath expressions. ## JSONPath Metadata Filtering Use PostgreSQL JSONPath expressions to filter items using their custom_metadata. ### Examples: - **Field existence**: `$.case_id` - Results that have a case_id field defined - **Exact value match**: `$.priority ? (@ == \"high\")` - Results with high priority - **Numeric comparison**: `$.confidence_score ? (@ > 0.95)` - Results with high confidence - **Array operations**: `$.flags[*] ? (@ == \"reviewed\")` - Results flagged as reviewed - **Complex conditions**: `$.metrics ? (@.accuracy > 0.9 && @.recall > 0.8)` - Results meeting performance thresholds ## 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
902
1295
  * @summary List Run Items
903
1296
  * @param {string} runId Run id, returned by &#x60;POST /v1/runs/&#x60; endpoint
1297
+ * @param {string | null} [shareToken] Share token for accessing shared runs
904
1298
  * @param {Array<string> | null} [itemIdIn] Filter for item ids
905
1299
  * @param {Array<string> | null} [externalIdIn] Filter for items by their external_id from the input payload
906
1300
  * @param {ItemState | null} [state] Filter items by their state
@@ -912,8 +1306,8 @@ var PublicApiFp = function(configuration) {
912
1306
  * @param {*} [options] Override http request option.
913
1307
  * @throws {RequiredError}
914
1308
  */
915
- async listRunItemsV1RunsRunIdItemsGet(runId, itemIdIn, externalIdIn, state, terminationReason, customMetadata, page, pageSize, sort, options) {
916
- const localVarAxiosArgs = await localVarAxiosParamCreator.listRunItemsV1RunsRunIdItemsGet(runId, itemIdIn, externalIdIn, state, terminationReason, customMetadata, page, pageSize, sort, options);
1309
+ async listRunItemsV1RunsRunIdItemsGet(runId, shareToken, itemIdIn, externalIdIn, state, terminationReason, customMetadata, page, pageSize, sort, options) {
1310
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listRunItemsV1RunsRunIdItemsGet(runId, shareToken, itemIdIn, externalIdIn, state, terminationReason, customMetadata, page, pageSize, sort, options);
917
1311
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
918
1312
  const localVarOperationServerBasePath = operationServerMap["PublicApi.listRunItemsV1RunsRunIdItemsGet"]?.[localVarOperationServerIndex]?.url;
919
1313
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -927,17 +1321,37 @@ var PublicApiFp = function(configuration) {
927
1321
  * @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**
928
1322
  * @param {number} [page]
929
1323
  * @param {number} [pageSize]
1324
+ * @param {string | null} [submittedBy] Filter runs by the user who submitted them. Use the special value &#x60;me&#x60; to return only runs submitted by the current user.
1325
+ * @param {string | null} [organizationId] Filter runs by the organization of the submitter. Use the special value &#x60;my_org&#x60; to filter by the current user\&#39;s organization.
930
1326
  * @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.
931
1327
  * @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)
932
1328
  * @param {*} [options] Override http request option.
933
1329
  * @throws {RequiredError}
934
1330
  */
935
- async listRunsV1RunsGet(applicationId, applicationVersion, externalId, customMetadata, page, pageSize, forOrganization, sort, options) {
936
- const localVarAxiosArgs = await localVarAxiosParamCreator.listRunsV1RunsGet(applicationId, applicationVersion, externalId, customMetadata, page, pageSize, forOrganization, sort, options);
1331
+ async listRunsV1RunsGet(applicationId, applicationVersion, externalId, customMetadata, page, pageSize, submittedBy, organizationId, forOrganization, sort, options) {
1332
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listRunsV1RunsGet(applicationId, applicationVersion, externalId, customMetadata, page, pageSize, submittedBy, organizationId, forOrganization, sort, options);
937
1333
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
938
1334
  const localVarOperationServerBasePath = operationServerMap["PublicApi.listRunsV1RunsGet"]?.[localVarOperationServerIndex]?.url;
939
1335
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
940
1336
  },
1337
+ /**
1338
+ * List share tokens. Service and Superadmin see all tokens; other users see only their own.
1339
+ * @summary List Share Tokens
1340
+ * @param {string | null} [runId] Filter by run ID
1341
+ * @param {string | null} [createdBy] Filter by share token creator
1342
+ * @param {boolean | null} [revoked]
1343
+ * @param {number} [page]
1344
+ * @param {number} [pageSize]
1345
+ * @param {Array<string> | null} [sort] Sort the results by one or more fields. Use &#x60;+&#x60; for ascending and &#x60;-&#x60; for descending order.
1346
+ * @param {*} [options] Override http request option.
1347
+ * @throws {RequiredError}
1348
+ */
1349
+ async listShareTokensV1AccessShareTokensGet(runId, createdBy, revoked, page, pageSize, sort, options) {
1350
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listShareTokensV1AccessShareTokensGet(runId, createdBy, revoked, page, pageSize, sort, options);
1351
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1352
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.listShareTokensV1AccessShareTokensGet"]?.[localVarOperationServerIndex]?.url;
1353
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1354
+ },
941
1355
  /**
942
1356
  * List public documents attached to an application version. Returns only documents with ``visibility=public`` and ``status=uploaded``.
943
1357
  * @summary List version documents
@@ -993,6 +1407,32 @@ var PublicApiFp = function(configuration) {
993
1407
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
994
1408
  const localVarOperationServerBasePath = operationServerMap["PublicApi.readApplicationByIdV1ApplicationsApplicationIdGet"]?.[localVarOperationServerIndex]?.url;
995
1409
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1410
+ },
1411
+ /**
1412
+ * Revoke a grant by its ID. Sets the revoked_at timestamp on the grant.
1413
+ * @summary Revoke Grant
1414
+ * @param {string} grantId Grant ID
1415
+ * @param {*} [options] Override http request option.
1416
+ * @throws {RequiredError}
1417
+ */
1418
+ async revokeGrantV1AccessGrantsGrantIdDelete(grantId, options) {
1419
+ const localVarAxiosArgs = await localVarAxiosParamCreator.revokeGrantV1AccessGrantsGrantIdDelete(grantId, options);
1420
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1421
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.revokeGrantV1AccessGrantsGrantIdDelete"]?.[localVarOperationServerIndex]?.url;
1422
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1423
+ },
1424
+ /**
1425
+ * Revoke a share token by its ID. Invalidates the credential regardless of any active grants.
1426
+ * @summary Revoke Share Token
1427
+ * @param {string} shareTokenId Share token ID
1428
+ * @param {*} [options] Override http request option.
1429
+ * @throws {RequiredError}
1430
+ */
1431
+ async revokeShareTokenV1AccessShareTokensShareTokenIdDelete(shareTokenId, options) {
1432
+ const localVarAxiosArgs = await localVarAxiosParamCreator.revokeShareTokenV1AccessShareTokensShareTokenIdDelete(shareTokenId, options);
1433
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1434
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.revokeShareTokenV1AccessShareTokensShareTokenIdDelete"]?.[localVarOperationServerIndex]?.url;
1435
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
996
1436
  }
997
1437
  };
998
1438
  };
@@ -1019,6 +1459,16 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1019
1459
  cancelRunV1RunsRunIdCancelPost(requestParameters, options) {
1020
1460
  return localVarFp.cancelRunV1RunsRunIdCancelPost(requestParameters.runId, options).then((request) => request(axios, basePath));
1021
1461
  },
1462
+ /**
1463
+ * Create a grant to share access to a resource with a subject (user or organization).
1464
+ * @summary Create Grant
1465
+ * @param {PublicApiCreateGrantV1AccessGrantsPostRequest} requestParameters Request parameters.
1466
+ * @param {*} [options] Override http request option.
1467
+ * @throws {RequiredError}
1468
+ */
1469
+ createGrantV1AccessGrantsPost(requestParameters, options) {
1470
+ return localVarFp.createGrantV1AccessGrantsPost(requestParameters.grantCreateRequest, options).then((request) => request(axios, basePath));
1471
+ },
1022
1472
  /**
1023
1473
  * This endpoint initiates a processing run for a selected application and version, and returns a `run_id` for tracking purposes. Slide processing occurs asynchronously, allowing you to retrieve results for individual slides as soon as they complete processing. The system typically processes slides in batches. Below is an example of the required payload for initiating an Atlas H&E TME processing run. ### Payload The payload includes `application_id`, optional `version_number`, and `items` base fields. `application_id` is the unique identifier for the application. `version_number` is the semantic version to use. If not provided, the latest available version will be used. `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 custom_metadata, specific to the chosen application. Example payload structure with the comments: ``` { application_id: \"he-tme\", version_number: \"1.0.0-beta\", items: [{ \"external_id\": \"slide_1\", \"custom_metadata\": {\"project\": \"sample-study\"}, \"input_artifacts\": [{ \"name\": \"user_slide\", \"download_url\": \"https://...\", \"metadata\": { \"specimen\": { \"disease\": \"LUNG_CANCER\", \"tissue\": \"LUNG\" }, \"staining_method\": \"H&E\", \"width_px\": 136223, \"height_px\": 87761, \"resolution_mpp\": 0.2628238, \"media-type\":\"image/tiff\", \"checksum_base64_crc32c\": \"64RKKA==\" } }] }] } ``` | Parameter | Description | | :---- | :---- | | `application_id` required | Unique ID for the application | | `version_number` optional | Semantic version of the application. If not provided, the latest available version will be used | | `items` required | List of submitted items i.e. whole slide images (WSIs) with parameters described below. | | `external_id` required | Unique WSI name or ID for easy reference to items, provided by the caller. The `external_id` should be unique across all items of the run. | | `input_artifacts` required | List of provided artifacts for a WSI; at the moment Atlas H&E-TME receives only 1 artifact per slide (the slide itself), but for some other applications this can be a slide and a segmentation map | | `name` required | Type of artifact; Atlas H&E-TME supports only `\"input_slide\"` | | `download_url` required | Signed URL to the input file in the S3 or GCS; Should be valid for at least 6 days | | `specimen: disease` required | Supported cancer types for Atlas H&E-TME (see full list in Atlas H&E-TME manual) | | `specimen: tissue` required | Supported tissue types for Atlas H&E-TME (see full list in Atlas H&E-TME manual) | | `staining_method` required | WSI stain bio-marker; Atlas H&E-TME supports only `\"H&E\"` | | `width_px` required | Integer value. Number of pixels of the WSI in the X dimension. | | `height_px` required | Integer value. Number of pixels of the WSI in the Y dimension. | | `resolution_mpp` required | Resolution of WSI in micrometers per pixel; check allowed range in Atlas H&E-TME manual | | `media-type` required | Supported media formats; available values are: image/tiff (for .tiff or .tif WSI), application/dicom (for DICOM ), application/zip (for zipped DICOM), and application/octet-stream (for .svs WSI) | | `checksum_base64_crc32c` required | Base64-encoded big-endian CRC32C checksum of the WSI image | ### Response The endpoint returns the run UUID. After that, the job is scheduled for the execution in the background. To check the status of the run, call `GET v1/runs/{run_id}` endpoint with the returned run UUID. ### Rejection Apart from the authentication, authorization, and malformed input error, the request can be rejected when specific quota limit is exceeded. More details on quotas is described in the documentation
1024
1474
  * @summary Initiate Run
@@ -1029,6 +1479,16 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1029
1479
  createRunV1RunsPost(requestParameters, options) {
1030
1480
  return localVarFp.createRunV1RunsPost(requestParameters.runCreationRequest, options).then((request) => request(axios, basePath));
1031
1481
  },
1482
+ /**
1483
+ * Create a share token. The returned share_token value is shown only once and is never stored. Use POST /access/grants with subject_type=share_token to grant access to a resource.
1484
+ * @summary Create Share Token
1485
+ * @param {PublicApiCreateShareTokenV1AccessShareTokensPostRequest} requestParameters Request parameters.
1486
+ * @param {*} [options] Override http request option.
1487
+ * @throws {RequiredError}
1488
+ */
1489
+ createShareTokenV1AccessShareTokensPost(requestParameters, options) {
1490
+ return localVarFp.createShareTokenV1AccessShareTokensPost(requestParameters.shareTokenCreateRequest, options).then((request) => request(axios, basePath));
1491
+ },
1032
1492
  /**
1033
1493
  * This endpoint allows the caller to explicitly delete artifacts generated by a run. It can only be invoked when the run has reached a final state, i.e. `PROCESSED`, `CANCELED_SYSTEM`, or `CANCELED_USER`. Note that by default, all artifacts are automatically deleted 30 days after the run finishes, regardless of whether the caller explicitly requests such deletion.
1034
1494
  * @summary Delete Run Items
@@ -1047,7 +1507,17 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1047
1507
  * @throws {RequiredError}
1048
1508
  */
1049
1509
  getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters, options) {
1050
- return localVarFp.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters.runId, requestParameters.artifactId, options).then((request) => request(axios, basePath));
1510
+ return localVarFp.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters.runId, requestParameters.artifactId, requestParameters.shareToken, options).then((request) => request(axios, basePath));
1511
+ },
1512
+ /**
1513
+ * Get a grant by its ID.
1514
+ * @summary Get Grant
1515
+ * @param {PublicApiGetGrantV1AccessGrantsGrantIdGetRequest} requestParameters Request parameters.
1516
+ * @param {*} [options] Override http request option.
1517
+ * @throws {RequiredError}
1518
+ */
1519
+ getGrantV1AccessGrantsGrantIdGet(requestParameters, options) {
1520
+ return localVarFp.getGrantV1AccessGrantsGrantIdGet(requestParameters.grantId, options).then((request) => request(axios, basePath));
1051
1521
  },
1052
1522
  /**
1053
1523
  * Retrieve details of a specific item (slide) by its external ID and the run ID.
@@ -1057,7 +1527,7 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1057
1527
  * @throws {RequiredError}
1058
1528
  */
1059
1529
  getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters, options) {
1060
- return localVarFp.getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters.runId, requestParameters.externalId, options).then((request) => request(axios, basePath));
1530
+ return localVarFp.getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters.runId, requestParameters.externalId, requestParameters.shareToken, options).then((request) => request(axios, basePath));
1061
1531
  },
1062
1532
  /**
1063
1533
  * Retrieves your identity details, including name, email, and organization. This is useful for verifying that the request is being made under the correct user profile and organization context, as well as confirming that the expected environment variables are correctly set (in case you are using Python SDK)
@@ -1069,14 +1539,24 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1069
1539
  return localVarFp.getMeV1MeGet(options).then((request) => request(axios, basePath));
1070
1540
  },
1071
1541
  /**
1072
- * This endpoint allows the caller to retrieve the current status of a run along with other relevant run details. A run becomes available immediately after it is created through the `POST /v1/runs/` endpoint. To download the output results, use `GET /v1/runs/{run_id}/` items to get outputs for all slides. Access to a run is restricted to the user who created it.
1542
+ * This endpoint allows the caller to retrieve the current status of a run along with other relevant run details. A run becomes available immediately after it is created through the `POST /v1/runs/` endpoint. To download the output results, use `GET /v1/runs/{run_id}/` items to get outputs for all slides. Access to a run is restricted to the user who created it, or users with an active grant or valid share token.
1073
1543
  * @summary Get run details
1074
1544
  * @param {PublicApiGetRunV1RunsRunIdGetRequest} requestParameters Request parameters.
1075
1545
  * @param {*} [options] Override http request option.
1076
1546
  * @throws {RequiredError}
1077
1547
  */
1078
1548
  getRunV1RunsRunIdGet(requestParameters, options) {
1079
- return localVarFp.getRunV1RunsRunIdGet(requestParameters.runId, options).then((request) => request(axios, basePath));
1549
+ return localVarFp.getRunV1RunsRunIdGet(requestParameters.runId, requestParameters.shareToken, options).then((request) => request(axios, basePath));
1550
+ },
1551
+ /**
1552
+ * Get a share token by its ID.
1553
+ * @summary Get Share Token
1554
+ * @param {PublicApiGetShareTokenV1AccessShareTokensShareTokenIdGetRequest} requestParameters Request parameters.
1555
+ * @param {*} [options] Override http request option.
1556
+ * @throws {RequiredError}
1557
+ */
1558
+ getShareTokenV1AccessShareTokensShareTokenIdGet(requestParameters, options) {
1559
+ return localVarFp.getShareTokenV1AccessShareTokensShareTokenIdGet(requestParameters.shareTokenId, options).then((request) => request(axios, basePath));
1080
1560
  },
1081
1561
  /**
1082
1562
  * Return metadata for a single public document attached to an application version.
@@ -1118,6 +1598,16 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1118
1598
  listApplicationsV1ApplicationsGet(requestParameters = {}, options) {
1119
1599
  return localVarFp.listApplicationsV1ApplicationsGet(requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
1120
1600
  },
1601
+ /**
1602
+ * List grants. Org admins see all grants for all resources in their organization. Regular users see grants for all resources they submitted.
1603
+ * @summary List Grants
1604
+ * @param {PublicApiListGrantsV1AccessGrantsGetRequest} requestParameters Request parameters.
1605
+ * @param {*} [options] Override http request option.
1606
+ * @throws {RequiredError}
1607
+ */
1608
+ listGrantsV1AccessGrantsGet(requestParameters = {}, options) {
1609
+ return localVarFp.listGrantsV1AccessGrantsGet(requestParameters.resourceType, requestParameters.resourceId, requestParameters.subjectType, requestParameters.subjectId, requestParameters.relation, requestParameters.revoked, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
1610
+ },
1121
1611
  /**
1122
1612
  * List items in a run with filtering, sorting, and pagination capabilities. Returns paginated items within a specific run. Results can be filtered by `item_id`, `external_ids`, `custom_metadata`, `terminated_at`, and `termination_reason` using JSONPath expressions. ## JSONPath Metadata Filtering Use PostgreSQL JSONPath expressions to filter items using their custom_metadata. ### Examples: - **Field existence**: `$.case_id` - Results that have a case_id field defined - **Exact value match**: `$.priority ? (@ == \"high\")` - Results with high priority - **Numeric comparison**: `$.confidence_score ? (@ > 0.95)` - Results with high confidence - **Array operations**: `$.flags[*] ? (@ == \"reviewed\")` - Results flagged as reviewed - **Complex conditions**: `$.metrics ? (@.accuracy > 0.9 && @.recall > 0.8)` - Results meeting performance thresholds ## 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
1123
1613
  * @summary List Run Items
@@ -1126,7 +1616,7 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1126
1616
  * @throws {RequiredError}
1127
1617
  */
1128
1618
  listRunItemsV1RunsRunIdItemsGet(requestParameters, options) {
1129
- return localVarFp.listRunItemsV1RunsRunIdItemsGet(requestParameters.runId, requestParameters.itemIdIn, requestParameters.externalIdIn, requestParameters.state, requestParameters.terminationReason, requestParameters.customMetadata, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
1619
+ return localVarFp.listRunItemsV1RunsRunIdItemsGet(requestParameters.runId, requestParameters.shareToken, requestParameters.itemIdIn, requestParameters.externalIdIn, requestParameters.state, requestParameters.terminationReason, requestParameters.customMetadata, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
1130
1620
  },
1131
1621
  /**
1132
1622
  * List runs with filtering, sorting, and pagination capabilities. Returns paginated runs that were submitted by the user.
@@ -1136,7 +1626,17 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1136
1626
  * @throws {RequiredError}
1137
1627
  */
1138
1628
  listRunsV1RunsGet(requestParameters = {}, options) {
1139
- 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));
1629
+ return localVarFp.listRunsV1RunsGet(requestParameters.applicationId, requestParameters.applicationVersion, requestParameters.externalId, requestParameters.customMetadata, requestParameters.page, requestParameters.pageSize, requestParameters.submittedBy, requestParameters.organizationId, requestParameters.forOrganization, requestParameters.sort, options).then((request) => request(axios, basePath));
1630
+ },
1631
+ /**
1632
+ * List share tokens. Service and Superadmin see all tokens; other users see only their own.
1633
+ * @summary List Share Tokens
1634
+ * @param {PublicApiListShareTokensV1AccessShareTokensGetRequest} requestParameters Request parameters.
1635
+ * @param {*} [options] Override http request option.
1636
+ * @throws {RequiredError}
1637
+ */
1638
+ listShareTokensV1AccessShareTokensGet(requestParameters = {}, options) {
1639
+ return localVarFp.listShareTokensV1AccessShareTokensGet(requestParameters.runId, requestParameters.createdBy, requestParameters.revoked, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
1140
1640
  },
1141
1641
  /**
1142
1642
  * List public documents attached to an application version. Returns only documents with ``visibility=public`` and ``status=uploaded``.
@@ -1177,6 +1677,26 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1177
1677
  */
1178
1678
  readApplicationByIdV1ApplicationsApplicationIdGet(requestParameters, options) {
1179
1679
  return localVarFp.readApplicationByIdV1ApplicationsApplicationIdGet(requestParameters.applicationId, options).then((request) => request(axios, basePath));
1680
+ },
1681
+ /**
1682
+ * Revoke a grant by its ID. Sets the revoked_at timestamp on the grant.
1683
+ * @summary Revoke Grant
1684
+ * @param {PublicApiRevokeGrantV1AccessGrantsGrantIdDeleteRequest} requestParameters Request parameters.
1685
+ * @param {*} [options] Override http request option.
1686
+ * @throws {RequiredError}
1687
+ */
1688
+ revokeGrantV1AccessGrantsGrantIdDelete(requestParameters, options) {
1689
+ return localVarFp.revokeGrantV1AccessGrantsGrantIdDelete(requestParameters.grantId, options).then((request) => request(axios, basePath));
1690
+ },
1691
+ /**
1692
+ * Revoke a share token by its ID. Invalidates the credential regardless of any active grants.
1693
+ * @summary Revoke Share Token
1694
+ * @param {PublicApiRevokeShareTokenV1AccessShareTokensShareTokenIdDeleteRequest} requestParameters Request parameters.
1695
+ * @param {*} [options] Override http request option.
1696
+ * @throws {RequiredError}
1697
+ */
1698
+ revokeShareTokenV1AccessShareTokensShareTokenIdDelete(requestParameters, options) {
1699
+ return localVarFp.revokeShareTokenV1AccessShareTokensShareTokenIdDelete(requestParameters.shareTokenId, options).then((request) => request(axios, basePath));
1180
1700
  }
1181
1701
  };
1182
1702
  };
@@ -1203,6 +1723,17 @@ var PublicApi = class extends BaseAPI {
1203
1723
  cancelRunV1RunsRunIdCancelPost(requestParameters, options) {
1204
1724
  return PublicApiFp(this.configuration).cancelRunV1RunsRunIdCancelPost(requestParameters.runId, options).then((request) => request(this.axios, this.basePath));
1205
1725
  }
1726
+ /**
1727
+ * Create a grant to share access to a resource with a subject (user or organization).
1728
+ * @summary Create Grant
1729
+ * @param {PublicApiCreateGrantV1AccessGrantsPostRequest} requestParameters Request parameters.
1730
+ * @param {*} [options] Override http request option.
1731
+ * @throws {RequiredError}
1732
+ * @memberof PublicApi
1733
+ */
1734
+ createGrantV1AccessGrantsPost(requestParameters, options) {
1735
+ return PublicApiFp(this.configuration).createGrantV1AccessGrantsPost(requestParameters.grantCreateRequest, options).then((request) => request(this.axios, this.basePath));
1736
+ }
1206
1737
  /**
1207
1738
  * This endpoint initiates a processing run for a selected application and version, and returns a `run_id` for tracking purposes. Slide processing occurs asynchronously, allowing you to retrieve results for individual slides as soon as they complete processing. The system typically processes slides in batches. Below is an example of the required payload for initiating an Atlas H&E TME processing run. ### Payload The payload includes `application_id`, optional `version_number`, and `items` base fields. `application_id` is the unique identifier for the application. `version_number` is the semantic version to use. If not provided, the latest available version will be used. `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 custom_metadata, specific to the chosen application. Example payload structure with the comments: ``` { application_id: \"he-tme\", version_number: \"1.0.0-beta\", items: [{ \"external_id\": \"slide_1\", \"custom_metadata\": {\"project\": \"sample-study\"}, \"input_artifacts\": [{ \"name\": \"user_slide\", \"download_url\": \"https://...\", \"metadata\": { \"specimen\": { \"disease\": \"LUNG_CANCER\", \"tissue\": \"LUNG\" }, \"staining_method\": \"H&E\", \"width_px\": 136223, \"height_px\": 87761, \"resolution_mpp\": 0.2628238, \"media-type\":\"image/tiff\", \"checksum_base64_crc32c\": \"64RKKA==\" } }] }] } ``` | Parameter | Description | | :---- | :---- | | `application_id` required | Unique ID for the application | | `version_number` optional | Semantic version of the application. If not provided, the latest available version will be used | | `items` required | List of submitted items i.e. whole slide images (WSIs) with parameters described below. | | `external_id` required | Unique WSI name or ID for easy reference to items, provided by the caller. The `external_id` should be unique across all items of the run. | | `input_artifacts` required | List of provided artifacts for a WSI; at the moment Atlas H&E-TME receives only 1 artifact per slide (the slide itself), but for some other applications this can be a slide and a segmentation map | | `name` required | Type of artifact; Atlas H&E-TME supports only `\"input_slide\"` | | `download_url` required | Signed URL to the input file in the S3 or GCS; Should be valid for at least 6 days | | `specimen: disease` required | Supported cancer types for Atlas H&E-TME (see full list in Atlas H&E-TME manual) | | `specimen: tissue` required | Supported tissue types for Atlas H&E-TME (see full list in Atlas H&E-TME manual) | | `staining_method` required | WSI stain bio-marker; Atlas H&E-TME supports only `\"H&E\"` | | `width_px` required | Integer value. Number of pixels of the WSI in the X dimension. | | `height_px` required | Integer value. Number of pixels of the WSI in the Y dimension. | | `resolution_mpp` required | Resolution of WSI in micrometers per pixel; check allowed range in Atlas H&E-TME manual | | `media-type` required | Supported media formats; available values are: image/tiff (for .tiff or .tif WSI), application/dicom (for DICOM ), application/zip (for zipped DICOM), and application/octet-stream (for .svs WSI) | | `checksum_base64_crc32c` required | Base64-encoded big-endian CRC32C checksum of the WSI image | ### Response The endpoint returns the run UUID. After that, the job is scheduled for the execution in the background. To check the status of the run, call `GET v1/runs/{run_id}` endpoint with the returned run UUID. ### Rejection Apart from the authentication, authorization, and malformed input error, the request can be rejected when specific quota limit is exceeded. More details on quotas is described in the documentation
1208
1739
  * @summary Initiate Run
@@ -1214,6 +1745,17 @@ var PublicApi = class extends BaseAPI {
1214
1745
  createRunV1RunsPost(requestParameters, options) {
1215
1746
  return PublicApiFp(this.configuration).createRunV1RunsPost(requestParameters.runCreationRequest, options).then((request) => request(this.axios, this.basePath));
1216
1747
  }
1748
+ /**
1749
+ * Create a share token. The returned share_token value is shown only once and is never stored. Use POST /access/grants with subject_type=share_token to grant access to a resource.
1750
+ * @summary Create Share Token
1751
+ * @param {PublicApiCreateShareTokenV1AccessShareTokensPostRequest} requestParameters Request parameters.
1752
+ * @param {*} [options] Override http request option.
1753
+ * @throws {RequiredError}
1754
+ * @memberof PublicApi
1755
+ */
1756
+ createShareTokenV1AccessShareTokensPost(requestParameters, options) {
1757
+ return PublicApiFp(this.configuration).createShareTokenV1AccessShareTokensPost(requestParameters.shareTokenCreateRequest, options).then((request) => request(this.axios, this.basePath));
1758
+ }
1217
1759
  /**
1218
1760
  * This endpoint allows the caller to explicitly delete artifacts generated by a run. It can only be invoked when the run has reached a final state, i.e. `PROCESSED`, `CANCELED_SYSTEM`, or `CANCELED_USER`. Note that by default, all artifacts are automatically deleted 30 days after the run finishes, regardless of whether the caller explicitly requests such deletion.
1219
1761
  * @summary Delete Run Items
@@ -1234,7 +1776,18 @@ var PublicApi = class extends BaseAPI {
1234
1776
  * @memberof PublicApi
1235
1777
  */
1236
1778
  getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters, options) {
1237
- return PublicApiFp(this.configuration).getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters.runId, requestParameters.artifactId, options).then((request) => request(this.axios, this.basePath));
1779
+ return PublicApiFp(this.configuration).getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters.runId, requestParameters.artifactId, requestParameters.shareToken, options).then((request) => request(this.axios, this.basePath));
1780
+ }
1781
+ /**
1782
+ * Get a grant by its ID.
1783
+ * @summary Get Grant
1784
+ * @param {PublicApiGetGrantV1AccessGrantsGrantIdGetRequest} requestParameters Request parameters.
1785
+ * @param {*} [options] Override http request option.
1786
+ * @throws {RequiredError}
1787
+ * @memberof PublicApi
1788
+ */
1789
+ getGrantV1AccessGrantsGrantIdGet(requestParameters, options) {
1790
+ return PublicApiFp(this.configuration).getGrantV1AccessGrantsGrantIdGet(requestParameters.grantId, options).then((request) => request(this.axios, this.basePath));
1238
1791
  }
1239
1792
  /**
1240
1793
  * Retrieve details of a specific item (slide) by its external ID and the run ID.
@@ -1245,7 +1798,7 @@ var PublicApi = class extends BaseAPI {
1245
1798
  * @memberof PublicApi
1246
1799
  */
1247
1800
  getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters, options) {
1248
- return PublicApiFp(this.configuration).getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters.runId, requestParameters.externalId, options).then((request) => request(this.axios, this.basePath));
1801
+ return PublicApiFp(this.configuration).getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters.runId, requestParameters.externalId, requestParameters.shareToken, options).then((request) => request(this.axios, this.basePath));
1249
1802
  }
1250
1803
  /**
1251
1804
  * Retrieves your identity details, including name, email, and organization. This is useful for verifying that the request is being made under the correct user profile and organization context, as well as confirming that the expected environment variables are correctly set (in case you are using Python SDK)
@@ -1258,7 +1811,7 @@ var PublicApi = class extends BaseAPI {
1258
1811
  return PublicApiFp(this.configuration).getMeV1MeGet(options).then((request) => request(this.axios, this.basePath));
1259
1812
  }
1260
1813
  /**
1261
- * This endpoint allows the caller to retrieve the current status of a run along with other relevant run details. A run becomes available immediately after it is created through the `POST /v1/runs/` endpoint. To download the output results, use `GET /v1/runs/{run_id}/` items to get outputs for all slides. Access to a run is restricted to the user who created it.
1814
+ * This endpoint allows the caller to retrieve the current status of a run along with other relevant run details. A run becomes available immediately after it is created through the `POST /v1/runs/` endpoint. To download the output results, use `GET /v1/runs/{run_id}/` items to get outputs for all slides. Access to a run is restricted to the user who created it, or users with an active grant or valid share token.
1262
1815
  * @summary Get run details
1263
1816
  * @param {PublicApiGetRunV1RunsRunIdGetRequest} requestParameters Request parameters.
1264
1817
  * @param {*} [options] Override http request option.
@@ -1266,7 +1819,18 @@ var PublicApi = class extends BaseAPI {
1266
1819
  * @memberof PublicApi
1267
1820
  */
1268
1821
  getRunV1RunsRunIdGet(requestParameters, options) {
1269
- return PublicApiFp(this.configuration).getRunV1RunsRunIdGet(requestParameters.runId, options).then((request) => request(this.axios, this.basePath));
1822
+ return PublicApiFp(this.configuration).getRunV1RunsRunIdGet(requestParameters.runId, requestParameters.shareToken, options).then((request) => request(this.axios, this.basePath));
1823
+ }
1824
+ /**
1825
+ * Get a share token by its ID.
1826
+ * @summary Get Share Token
1827
+ * @param {PublicApiGetShareTokenV1AccessShareTokensShareTokenIdGetRequest} requestParameters Request parameters.
1828
+ * @param {*} [options] Override http request option.
1829
+ * @throws {RequiredError}
1830
+ * @memberof PublicApi
1831
+ */
1832
+ getShareTokenV1AccessShareTokensShareTokenIdGet(requestParameters, options) {
1833
+ return PublicApiFp(this.configuration).getShareTokenV1AccessShareTokensShareTokenIdGet(requestParameters.shareTokenId, options).then((request) => request(this.axios, this.basePath));
1270
1834
  }
1271
1835
  /**
1272
1836
  * Return metadata for a single public document attached to an application version.
@@ -1312,6 +1876,17 @@ var PublicApi = class extends BaseAPI {
1312
1876
  listApplicationsV1ApplicationsGet(requestParameters = {}, options) {
1313
1877
  return PublicApiFp(this.configuration).listApplicationsV1ApplicationsGet(requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
1314
1878
  }
1879
+ /**
1880
+ * List grants. Org admins see all grants for all resources in their organization. Regular users see grants for all resources they submitted.
1881
+ * @summary List Grants
1882
+ * @param {PublicApiListGrantsV1AccessGrantsGetRequest} requestParameters Request parameters.
1883
+ * @param {*} [options] Override http request option.
1884
+ * @throws {RequiredError}
1885
+ * @memberof PublicApi
1886
+ */
1887
+ listGrantsV1AccessGrantsGet(requestParameters = {}, options) {
1888
+ return PublicApiFp(this.configuration).listGrantsV1AccessGrantsGet(requestParameters.resourceType, requestParameters.resourceId, requestParameters.subjectType, requestParameters.subjectId, requestParameters.relation, requestParameters.revoked, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
1889
+ }
1315
1890
  /**
1316
1891
  * List items in a run with filtering, sorting, and pagination capabilities. Returns paginated items within a specific run. Results can be filtered by `item_id`, `external_ids`, `custom_metadata`, `terminated_at`, and `termination_reason` using JSONPath expressions. ## JSONPath Metadata Filtering Use PostgreSQL JSONPath expressions to filter items using their custom_metadata. ### Examples: - **Field existence**: `$.case_id` - Results that have a case_id field defined - **Exact value match**: `$.priority ? (@ == \"high\")` - Results with high priority - **Numeric comparison**: `$.confidence_score ? (@ > 0.95)` - Results with high confidence - **Array operations**: `$.flags[*] ? (@ == \"reviewed\")` - Results flagged as reviewed - **Complex conditions**: `$.metrics ? (@.accuracy > 0.9 && @.recall > 0.8)` - Results meeting performance thresholds ## 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
1317
1892
  * @summary List Run Items
@@ -1321,7 +1896,7 @@ var PublicApi = class extends BaseAPI {
1321
1896
  * @memberof PublicApi
1322
1897
  */
1323
1898
  listRunItemsV1RunsRunIdItemsGet(requestParameters, options) {
1324
- return PublicApiFp(this.configuration).listRunItemsV1RunsRunIdItemsGet(requestParameters.runId, requestParameters.itemIdIn, requestParameters.externalIdIn, requestParameters.state, requestParameters.terminationReason, requestParameters.customMetadata, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
1899
+ return PublicApiFp(this.configuration).listRunItemsV1RunsRunIdItemsGet(requestParameters.runId, requestParameters.shareToken, requestParameters.itemIdIn, requestParameters.externalIdIn, requestParameters.state, requestParameters.terminationReason, requestParameters.customMetadata, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
1325
1900
  }
1326
1901
  /**
1327
1902
  * List runs with filtering, sorting, and pagination capabilities. Returns paginated runs that were submitted by the user.
@@ -1332,7 +1907,18 @@ var PublicApi = class extends BaseAPI {
1332
1907
  * @memberof PublicApi
1333
1908
  */
1334
1909
  listRunsV1RunsGet(requestParameters = {}, options) {
1335
- 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));
1910
+ return PublicApiFp(this.configuration).listRunsV1RunsGet(requestParameters.applicationId, requestParameters.applicationVersion, requestParameters.externalId, requestParameters.customMetadata, requestParameters.page, requestParameters.pageSize, requestParameters.submittedBy, requestParameters.organizationId, requestParameters.forOrganization, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
1911
+ }
1912
+ /**
1913
+ * List share tokens. Service and Superadmin see all tokens; other users see only their own.
1914
+ * @summary List Share Tokens
1915
+ * @param {PublicApiListShareTokensV1AccessShareTokensGetRequest} requestParameters Request parameters.
1916
+ * @param {*} [options] Override http request option.
1917
+ * @throws {RequiredError}
1918
+ * @memberof PublicApi
1919
+ */
1920
+ listShareTokensV1AccessShareTokensGet(requestParameters = {}, options) {
1921
+ return PublicApiFp(this.configuration).listShareTokensV1AccessShareTokensGet(requestParameters.runId, requestParameters.createdBy, requestParameters.revoked, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
1336
1922
  }
1337
1923
  /**
1338
1924
  * List public documents attached to an application version. Returns only documents with ``visibility=public`` and ``status=uploaded``.
@@ -1378,6 +1964,28 @@ var PublicApi = class extends BaseAPI {
1378
1964
  readApplicationByIdV1ApplicationsApplicationIdGet(requestParameters, options) {
1379
1965
  return PublicApiFp(this.configuration).readApplicationByIdV1ApplicationsApplicationIdGet(requestParameters.applicationId, options).then((request) => request(this.axios, this.basePath));
1380
1966
  }
1967
+ /**
1968
+ * Revoke a grant by its ID. Sets the revoked_at timestamp on the grant.
1969
+ * @summary Revoke Grant
1970
+ * @param {PublicApiRevokeGrantV1AccessGrantsGrantIdDeleteRequest} requestParameters Request parameters.
1971
+ * @param {*} [options] Override http request option.
1972
+ * @throws {RequiredError}
1973
+ * @memberof PublicApi
1974
+ */
1975
+ revokeGrantV1AccessGrantsGrantIdDelete(requestParameters, options) {
1976
+ return PublicApiFp(this.configuration).revokeGrantV1AccessGrantsGrantIdDelete(requestParameters.grantId, options).then((request) => request(this.axios, this.basePath));
1977
+ }
1978
+ /**
1979
+ * Revoke a share token by its ID. Invalidates the credential regardless of any active grants.
1980
+ * @summary Revoke Share Token
1981
+ * @param {PublicApiRevokeShareTokenV1AccessShareTokensShareTokenIdDeleteRequest} requestParameters Request parameters.
1982
+ * @param {*} [options] Override http request option.
1983
+ * @throws {RequiredError}
1984
+ * @memberof PublicApi
1985
+ */
1986
+ revokeShareTokenV1AccessShareTokensShareTokenIdDelete(requestParameters, options) {
1987
+ return PublicApiFp(this.configuration).revokeShareTokenV1AccessShareTokensShareTokenIdDelete(requestParameters.shareTokenId, options).then((request) => request(this.axios, this.basePath));
1988
+ }
1381
1989
  };
1382
1990
 
1383
1991
  // src/generated/configuration.ts
@@ -1568,23 +2176,33 @@ function getRunProgress(run) {
1568
2176
  return Math.round(processed / item_count * 100);
1569
2177
  }
1570
2178
  function getRunStatus(run) {
1571
- const { state, statistics, termination_reason } = run;
2179
+ const { state, termination_reason, output } = run;
1572
2180
  switch (state) {
1573
2181
  case "PENDING":
1574
2182
  return "PENDING";
1575
2183
  case "PROCESSING":
1576
2184
  return "PROCESSING";
1577
2185
  case "TERMINATED":
1578
- if (termination_reason === "CANCELED_BY_USER") {
1579
- return "CANCELED";
1580
- }
1581
- if (termination_reason === "CANCELED_BY_SYSTEM") {
1582
- return "FAILED";
1583
- }
1584
- if (statistics.item_count !== statistics.item_succeeded_count) {
1585
- return "COMPLETED_WITH_ERRORS";
2186
+ switch (termination_reason) {
2187
+ case "CANCELED_BY_USER":
2188
+ return "CANCELED";
2189
+ case "CANCELED_BY_SYSTEM":
2190
+ case "ALL_ITEMS_PROCESSED":
2191
+ switch (output) {
2192
+ case "NONE":
2193
+ return "FAILED";
2194
+ case "PARTIAL":
2195
+ return "COMPLETED_WITH_ERRORS";
2196
+ case "FULL":
2197
+ return "COMPLETED";
2198
+ default:
2199
+ return "UNKNOWN";
2200
+ }
2201
+ default:
2202
+ return "UNKNOWN";
1586
2203
  }
1587
- return "COMPLETED";
2204
+ default:
2205
+ return "UNKNOWN";
1588
2206
  }
1589
2207
  }
1590
2208
  var canDownloadRunItems = (run) => {
@@ -1606,6 +2224,12 @@ var processApplicationRun = (run) => {
1606
2224
  var canDownloadItem = (item) => {
1607
2225
  return getItemStatus(item) === "COMPLETED";
1608
2226
  };
2227
+ var ERROR_TERMINATION_REASONS = /* @__PURE__ */ new Set([
2228
+ "CANCELED_BY_SYSTEM",
2229
+ "CANCELED_BY_USER",
2230
+ "SYSTEM_ERROR",
2231
+ "USER_ERROR"
2232
+ ]);
1609
2233
  function getItemStatus(item) {
1610
2234
  const { state, termination_reason } = item;
1611
2235
  switch (state) {
@@ -1614,13 +2238,19 @@ function getItemStatus(item) {
1614
2238
  case "PROCESSING":
1615
2239
  return "PROCESSING";
1616
2240
  case "TERMINATED":
1617
- if (termination_reason === "SYSTEM_ERROR" || termination_reason === "USER_ERROR") {
2241
+ if (!termination_reason) {
2242
+ return "UNKNOWN";
2243
+ }
2244
+ if (ERROR_TERMINATION_REASONS.has(termination_reason)) {
1618
2245
  return "FAILED";
1619
2246
  }
1620
2247
  if (termination_reason === "SKIPPED") {
1621
2248
  return "SKIPPED";
1622
2249
  }
1623
- return "COMPLETED";
2250
+ if (termination_reason === "SUCCEEDED") {
2251
+ return "COMPLETED";
2252
+ }
2253
+ return "UNKNOWN";
1624
2254
  }
1625
2255
  }
1626
2256
 
@@ -2448,6 +3078,6 @@ var PlatformSDKHttp = class {
2448
3078
  // src/index.ts
2449
3079
  var index_default = PlatformSDKHttp;
2450
3080
 
2451
- export { APIError, ArtifactOutput, ArtifactState, ArtifactTerminationReason, AuthenticationError, BaseError, Configuration, ConfigurationError, ItemOutput, ItemState, ItemTerminationReason, OutputArtifactScope, OutputArtifactVisibility, PlatformSDKHttp, PublicApi, PublicApiAxiosParamCreator, PublicApiFactory, PublicApiFp, RunOutput, RunState, RunTerminationReason, VersionDocumentVisibility, canDownloadItem, canDownloadRunItems, index_default as default, getItemStatus, getRunProgress, getRunStatus, processApplicationRun, processRunItem };
3081
+ export { APIError, ArtifactOutput, ArtifactState, ArtifactTerminationReason, AuthenticationError, BaseError, Configuration, ConfigurationError, GrantRelation, ItemOutput, ItemState, ItemTerminationReason, OutputArtifactScope, OutputArtifactVisibility, PlatformSDKHttp, PublicApi, PublicApiAxiosParamCreator, PublicApiFactory, PublicApiFp, ResourceType, RunOutput, RunState, RunTerminationReason, SubjectType, VersionDocumentVisibility, canDownloadItem, canDownloadRunItems, index_default as default, getItemStatus, getRunProgress, getRunStatus, processApplicationRun, processRunItem };
2452
3082
  //# sourceMappingURL=index.js.map
2453
3083
  //# sourceMappingURL=index.js.map