@aignostics/sdk 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -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,68 @@ 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 {boolean | null} [revoked]
642
+ * @param {number} [page]
643
+ * @param {number} [pageSize]
644
+ * @param {Array<string> | null} [sort] Sort the results by one or more fields. Use &#x60;+&#x60; for ascending and &#x60;-&#x60; for descending order.
645
+ * @param {*} [options] Override http request option.
646
+ * @throws {RequiredError}
647
+ */
648
+ listGrantsV1AccessGrantsGet: async (resourceType, resourceId, subjectType, subjectId, revoked, page, pageSize, sort, options = {}) => {
649
+ const localVarPath = `/v1/access/grants`;
650
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
651
+ let baseOptions;
652
+ if (configuration) {
653
+ baseOptions = configuration.baseOptions;
654
+ }
655
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
656
+ const localVarHeaderParameter = {};
657
+ const localVarQueryParameter = {};
658
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
659
+ if (resourceType !== void 0) {
660
+ localVarQueryParameter["resource_type"] = resourceType;
661
+ }
662
+ if (resourceId !== void 0) {
663
+ localVarQueryParameter["resource_id"] = resourceId;
664
+ }
665
+ if (subjectType !== void 0) {
666
+ localVarQueryParameter["subject_type"] = subjectType;
667
+ }
668
+ if (subjectId !== void 0) {
669
+ localVarQueryParameter["subject_id"] = subjectId;
670
+ }
671
+ if (revoked !== void 0) {
672
+ localVarQueryParameter["revoked"] = revoked;
673
+ }
674
+ if (page !== void 0) {
675
+ localVarQueryParameter["page"] = page;
676
+ }
677
+ if (pageSize !== void 0) {
678
+ localVarQueryParameter["page_size"] = pageSize;
679
+ }
680
+ if (sort) {
681
+ localVarQueryParameter["sort"] = sort;
682
+ }
683
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
684
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
685
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
686
+ return {
687
+ url: toPathString(localVarUrlObj),
688
+ options: localVarRequestOptions
689
+ };
690
+ },
493
691
  /**
494
692
  * 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
693
  * @summary List Run Items
496
694
  * @param {string} runId Run id, returned by &#x60;POST /v1/runs/&#x60; endpoint
695
+ * @param {string | null} [shareToken] Share token for accessing shared runs
497
696
  * @param {Array<string> | null} [itemIdIn] Filter for item ids
498
697
  * @param {Array<string> | null} [externalIdIn] Filter for items by their external_id from the input payload
499
698
  * @param {ItemState | null} [state] Filter items by their state
@@ -505,7 +704,7 @@ var PublicApiAxiosParamCreator = function(configuration) {
505
704
  * @param {*} [options] Override http request option.
506
705
  * @throws {RequiredError}
507
706
  */
508
- listRunItemsV1RunsRunIdItemsGet: async (runId, itemIdIn, externalIdIn, state, terminationReason, customMetadata, page, pageSize, sort, options = {}) => {
707
+ listRunItemsV1RunsRunIdItemsGet: async (runId, shareToken, itemIdIn, externalIdIn, state, terminationReason, customMetadata, page, pageSize, sort, options = {}) => {
509
708
  assertParamExists("listRunItemsV1RunsRunIdItemsGet", "runId", runId);
510
709
  const localVarPath = `/v1/runs/{run_id}/items`.replace(`{${"run_id"}}`, encodeURIComponent(String(runId)));
511
710
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -517,6 +716,9 @@ var PublicApiAxiosParamCreator = function(configuration) {
517
716
  const localVarHeaderParameter = {};
518
717
  const localVarQueryParameter = {};
519
718
  await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
719
+ if (shareToken !== void 0) {
720
+ localVarQueryParameter["share_token"] = shareToken;
721
+ }
520
722
  if (itemIdIn) {
521
723
  localVarQueryParameter["item_id__in"] = itemIdIn;
522
724
  }
@@ -606,6 +808,55 @@ var PublicApiAxiosParamCreator = function(configuration) {
606
808
  options: localVarRequestOptions
607
809
  };
608
810
  },
811
+ /**
812
+ * List share tokens. Service and Superadmin see all tokens; other users see only their own.
813
+ * @summary List Share Tokens
814
+ * @param {string | null} [runId] Filter by run ID
815
+ * @param {string | null} [createdBy] Filter by share token creator
816
+ * @param {boolean | null} [revoked]
817
+ * @param {number} [page]
818
+ * @param {number} [pageSize]
819
+ * @param {Array<string> | null} [sort] Sort the results by one or more fields. Use &#x60;+&#x60; for ascending and &#x60;-&#x60; for descending order.
820
+ * @param {*} [options] Override http request option.
821
+ * @throws {RequiredError}
822
+ */
823
+ listShareTokensV1AccessShareTokensGet: async (runId, createdBy, revoked, page, pageSize, sort, options = {}) => {
824
+ const localVarPath = `/v1/access/share-tokens`;
825
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
826
+ let baseOptions;
827
+ if (configuration) {
828
+ baseOptions = configuration.baseOptions;
829
+ }
830
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
831
+ const localVarHeaderParameter = {};
832
+ const localVarQueryParameter = {};
833
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
834
+ if (runId !== void 0) {
835
+ localVarQueryParameter["run_id"] = runId;
836
+ }
837
+ if (createdBy !== void 0) {
838
+ localVarQueryParameter["created_by"] = createdBy;
839
+ }
840
+ if (revoked !== void 0) {
841
+ localVarQueryParameter["revoked"] = revoked;
842
+ }
843
+ if (page !== void 0) {
844
+ localVarQueryParameter["page"] = page;
845
+ }
846
+ if (pageSize !== void 0) {
847
+ localVarQueryParameter["page_size"] = pageSize;
848
+ }
849
+ if (sort) {
850
+ localVarQueryParameter["sort"] = sort;
851
+ }
852
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
853
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
854
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
855
+ return {
856
+ url: toPathString(localVarUrlObj),
857
+ options: localVarRequestOptions
858
+ };
859
+ },
609
860
  /**
610
861
  * List public documents attached to an application version. Returns only documents with ``visibility=public`` and ``status=uploaded``.
611
862
  * @summary List version documents
@@ -725,6 +976,60 @@ var PublicApiAxiosParamCreator = function(configuration) {
725
976
  url: toPathString(localVarUrlObj),
726
977
  options: localVarRequestOptions
727
978
  };
979
+ },
980
+ /**
981
+ * Revoke a grant by its ID. Sets the revoked_at timestamp on the grant.
982
+ * @summary Revoke Grant
983
+ * @param {string} grantId Grant ID
984
+ * @param {*} [options] Override http request option.
985
+ * @throws {RequiredError}
986
+ */
987
+ revokeGrantV1AccessGrantsGrantIdDelete: async (grantId, options = {}) => {
988
+ assertParamExists("revokeGrantV1AccessGrantsGrantIdDelete", "grantId", grantId);
989
+ const localVarPath = `/v1/access/grants/{grant_id}`.replace(`{${"grant_id"}}`, encodeURIComponent(String(grantId)));
990
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
991
+ let baseOptions;
992
+ if (configuration) {
993
+ baseOptions = configuration.baseOptions;
994
+ }
995
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
996
+ const localVarHeaderParameter = {};
997
+ const localVarQueryParameter = {};
998
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
999
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1000
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1001
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1002
+ return {
1003
+ url: toPathString(localVarUrlObj),
1004
+ options: localVarRequestOptions
1005
+ };
1006
+ },
1007
+ /**
1008
+ * Revoke a share token by its ID. Invalidates the credential regardless of any active grants.
1009
+ * @summary Revoke Share Token
1010
+ * @param {string} shareTokenId Share token ID
1011
+ * @param {*} [options] Override http request option.
1012
+ * @throws {RequiredError}
1013
+ */
1014
+ revokeShareTokenV1AccessShareTokensShareTokenIdDelete: async (shareTokenId, options = {}) => {
1015
+ assertParamExists("revokeShareTokenV1AccessShareTokensShareTokenIdDelete", "shareTokenId", shareTokenId);
1016
+ const localVarPath = `/v1/access/share-tokens/{share_token_id}`.replace(`{${"share_token_id"}}`, encodeURIComponent(String(shareTokenId)));
1017
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1018
+ let baseOptions;
1019
+ if (configuration) {
1020
+ baseOptions = configuration.baseOptions;
1021
+ }
1022
+ const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
1023
+ const localVarHeaderParameter = {};
1024
+ const localVarQueryParameter = {};
1025
+ await setOAuthToObject(localVarHeaderParameter, "OAuth2AuthorizationCodeBearer", [], configuration);
1026
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1027
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1028
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1029
+ return {
1030
+ url: toPathString(localVarUrlObj),
1031
+ options: localVarRequestOptions
1032
+ };
728
1033
  }
729
1034
  };
730
1035
  };
@@ -758,6 +1063,19 @@ var PublicApiFp = function(configuration) {
758
1063
  const localVarOperationServerBasePath = operationServerMap["PublicApi.cancelRunV1RunsRunIdCancelPost"]?.[localVarOperationServerIndex]?.url;
759
1064
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
760
1065
  },
1066
+ /**
1067
+ * Create a grant to share access to a resource with a subject (user or organization).
1068
+ * @summary Create Grant
1069
+ * @param {GrantCreateRequest} grantCreateRequest
1070
+ * @param {*} [options] Override http request option.
1071
+ * @throws {RequiredError}
1072
+ */
1073
+ async createGrantV1AccessGrantsPost(grantCreateRequest, options) {
1074
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createGrantV1AccessGrantsPost(grantCreateRequest, options);
1075
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1076
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.createGrantV1AccessGrantsPost"]?.[localVarOperationServerIndex]?.url;
1077
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1078
+ },
761
1079
  /**
762
1080
  * 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
1081
  * @summary Initiate Run
@@ -771,6 +1089,19 @@ var PublicApiFp = function(configuration) {
771
1089
  const localVarOperationServerBasePath = operationServerMap["PublicApi.createRunV1RunsPost"]?.[localVarOperationServerIndex]?.url;
772
1090
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
773
1091
  },
1092
+ /**
1093
+ * 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.
1094
+ * @summary Create Share Token
1095
+ * @param {ShareTokenCreateRequest} shareTokenCreateRequest
1096
+ * @param {*} [options] Override http request option.
1097
+ * @throws {RequiredError}
1098
+ */
1099
+ async createShareTokenV1AccessShareTokensPost(shareTokenCreateRequest, options) {
1100
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createShareTokenV1AccessShareTokensPost(shareTokenCreateRequest, options);
1101
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1102
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.createShareTokenV1AccessShareTokensPost"]?.[localVarOperationServerIndex]?.url;
1103
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1104
+ },
774
1105
  /**
775
1106
  * 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
1107
  * @summary Delete Run Items
@@ -789,25 +1120,40 @@ var PublicApiFp = function(configuration) {
789
1120
  * @summary Get Artifact Url
790
1121
  * @param {string} runId Run id, returned by &#x60;POST /runs/&#x60; endpoint
791
1122
  * @param {string} artifactId The artifact id to download
1123
+ * @param {string | null} [shareToken] Share token for accessing shared runs
792
1124
  * @param {*} [options] Override http request option.
793
1125
  * @throws {RequiredError}
794
1126
  */
795
- async getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(runId, artifactId, options) {
796
- const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(runId, artifactId, options);
1127
+ async getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(runId, artifactId, shareToken, options) {
1128
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(runId, artifactId, shareToken, options);
797
1129
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
798
1130
  const localVarOperationServerBasePath = operationServerMap["PublicApi.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet"]?.[localVarOperationServerIndex]?.url;
799
1131
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
800
1132
  },
1133
+ /**
1134
+ * Get a grant by its ID.
1135
+ * @summary Get Grant
1136
+ * @param {string} grantId Grant ID
1137
+ * @param {*} [options] Override http request option.
1138
+ * @throws {RequiredError}
1139
+ */
1140
+ async getGrantV1AccessGrantsGrantIdGet(grantId, options) {
1141
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getGrantV1AccessGrantsGrantIdGet(grantId, options);
1142
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1143
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.getGrantV1AccessGrantsGrantIdGet"]?.[localVarOperationServerIndex]?.url;
1144
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1145
+ },
801
1146
  /**
802
1147
  * Retrieve details of a specific item (slide) by its external ID and the run ID.
803
1148
  * @summary Get Item By Run
804
1149
  * @param {string} runId The run id, returned by &#x60;POST /runs/&#x60; endpoint
805
1150
  * @param {string} externalId The &#x60;external_id&#x60; that was defined for the item by the customer that triggered the run.
1151
+ * @param {string | null} [shareToken] Share token for accessing shared runs
806
1152
  * @param {*} [options] Override http request option.
807
1153
  * @throws {RequiredError}
808
1154
  */
809
- async getItemByRunV1RunsRunIdItemsExternalIdGet(runId, externalId, options) {
810
- const localVarAxiosArgs = await localVarAxiosParamCreator.getItemByRunV1RunsRunIdItemsExternalIdGet(runId, externalId, options);
1155
+ async getItemByRunV1RunsRunIdItemsExternalIdGet(runId, externalId, shareToken, options) {
1156
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getItemByRunV1RunsRunIdItemsExternalIdGet(runId, externalId, shareToken, options);
811
1157
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
812
1158
  const localVarOperationServerBasePath = operationServerMap["PublicApi.getItemByRunV1RunsRunIdItemsExternalIdGet"]?.[localVarOperationServerIndex]?.url;
813
1159
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -825,18 +1171,32 @@ var PublicApiFp = function(configuration) {
825
1171
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
826
1172
  },
827
1173
  /**
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.
1174
+ * 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
1175
  * @summary Get run details
830
1176
  * @param {string} runId Run id, returned by &#x60;POST /v1/runs/&#x60; endpoint
1177
+ * @param {string | null} [shareToken] Share token for accessing shared runs
831
1178
  * @param {*} [options] Override http request option.
832
1179
  * @throws {RequiredError}
833
1180
  */
834
- async getRunV1RunsRunIdGet(runId, options) {
835
- const localVarAxiosArgs = await localVarAxiosParamCreator.getRunV1RunsRunIdGet(runId, options);
1181
+ async getRunV1RunsRunIdGet(runId, shareToken, options) {
1182
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getRunV1RunsRunIdGet(runId, shareToken, options);
836
1183
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
837
1184
  const localVarOperationServerBasePath = operationServerMap["PublicApi.getRunV1RunsRunIdGet"]?.[localVarOperationServerIndex]?.url;
838
1185
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
839
1186
  },
1187
+ /**
1188
+ * Get a share token by its ID.
1189
+ * @summary Get Share Token
1190
+ * @param {string} shareTokenId Share token ID
1191
+ * @param {*} [options] Override http request option.
1192
+ * @throws {RequiredError}
1193
+ */
1194
+ async getShareTokenV1AccessShareTokensShareTokenIdGet(shareTokenId, options) {
1195
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getShareTokenV1AccessShareTokensShareTokenIdGet(shareTokenId, options);
1196
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1197
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.getShareTokenV1AccessShareTokensShareTokenIdGet"]?.[localVarOperationServerIndex]?.url;
1198
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1199
+ },
840
1200
  /**
841
1201
  * Return metadata for a single public document attached to an application version.
842
1202
  * @summary Get version document metadata
@@ -897,10 +1257,31 @@ var PublicApiFp = function(configuration) {
897
1257
  const localVarOperationServerBasePath = operationServerMap["PublicApi.listApplicationsV1ApplicationsGet"]?.[localVarOperationServerIndex]?.url;
898
1258
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
899
1259
  },
1260
+ /**
1261
+ * List grants. Org admins see all grants for all resources in their organization. Regular users see grants for all resources they submitted.
1262
+ * @summary List Grants
1263
+ * @param {ResourceType | null} [resourceType]
1264
+ * @param {string | null} [resourceId]
1265
+ * @param {SubjectType | null} [subjectType]
1266
+ * @param {string | null} [subjectId]
1267
+ * @param {boolean | null} [revoked]
1268
+ * @param {number} [page]
1269
+ * @param {number} [pageSize]
1270
+ * @param {Array<string> | null} [sort] Sort the results by one or more fields. Use &#x60;+&#x60; for ascending and &#x60;-&#x60; for descending order.
1271
+ * @param {*} [options] Override http request option.
1272
+ * @throws {RequiredError}
1273
+ */
1274
+ async listGrantsV1AccessGrantsGet(resourceType, resourceId, subjectType, subjectId, revoked, page, pageSize, sort, options) {
1275
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listGrantsV1AccessGrantsGet(resourceType, resourceId, subjectType, subjectId, revoked, page, pageSize, sort, options);
1276
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1277
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.listGrantsV1AccessGrantsGet"]?.[localVarOperationServerIndex]?.url;
1278
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1279
+ },
900
1280
  /**
901
1281
  * 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
1282
  * @summary List Run Items
903
1283
  * @param {string} runId Run id, returned by &#x60;POST /v1/runs/&#x60; endpoint
1284
+ * @param {string | null} [shareToken] Share token for accessing shared runs
904
1285
  * @param {Array<string> | null} [itemIdIn] Filter for item ids
905
1286
  * @param {Array<string> | null} [externalIdIn] Filter for items by their external_id from the input payload
906
1287
  * @param {ItemState | null} [state] Filter items by their state
@@ -912,8 +1293,8 @@ var PublicApiFp = function(configuration) {
912
1293
  * @param {*} [options] Override http request option.
913
1294
  * @throws {RequiredError}
914
1295
  */
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);
1296
+ async listRunItemsV1RunsRunIdItemsGet(runId, shareToken, itemIdIn, externalIdIn, state, terminationReason, customMetadata, page, pageSize, sort, options) {
1297
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listRunItemsV1RunsRunIdItemsGet(runId, shareToken, itemIdIn, externalIdIn, state, terminationReason, customMetadata, page, pageSize, sort, options);
917
1298
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
918
1299
  const localVarOperationServerBasePath = operationServerMap["PublicApi.listRunItemsV1RunsRunIdItemsGet"]?.[localVarOperationServerIndex]?.url;
919
1300
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -938,6 +1319,24 @@ var PublicApiFp = function(configuration) {
938
1319
  const localVarOperationServerBasePath = operationServerMap["PublicApi.listRunsV1RunsGet"]?.[localVarOperationServerIndex]?.url;
939
1320
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
940
1321
  },
1322
+ /**
1323
+ * List share tokens. Service and Superadmin see all tokens; other users see only their own.
1324
+ * @summary List Share Tokens
1325
+ * @param {string | null} [runId] Filter by run ID
1326
+ * @param {string | null} [createdBy] Filter by share token creator
1327
+ * @param {boolean | null} [revoked]
1328
+ * @param {number} [page]
1329
+ * @param {number} [pageSize]
1330
+ * @param {Array<string> | null} [sort] Sort the results by one or more fields. Use &#x60;+&#x60; for ascending and &#x60;-&#x60; for descending order.
1331
+ * @param {*} [options] Override http request option.
1332
+ * @throws {RequiredError}
1333
+ */
1334
+ async listShareTokensV1AccessShareTokensGet(runId, createdBy, revoked, page, pageSize, sort, options) {
1335
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listShareTokensV1AccessShareTokensGet(runId, createdBy, revoked, page, pageSize, sort, options);
1336
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1337
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.listShareTokensV1AccessShareTokensGet"]?.[localVarOperationServerIndex]?.url;
1338
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1339
+ },
941
1340
  /**
942
1341
  * List public documents attached to an application version. Returns only documents with ``visibility=public`` and ``status=uploaded``.
943
1342
  * @summary List version documents
@@ -993,6 +1392,32 @@ var PublicApiFp = function(configuration) {
993
1392
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
994
1393
  const localVarOperationServerBasePath = operationServerMap["PublicApi.readApplicationByIdV1ApplicationsApplicationIdGet"]?.[localVarOperationServerIndex]?.url;
995
1394
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1395
+ },
1396
+ /**
1397
+ * Revoke a grant by its ID. Sets the revoked_at timestamp on the grant.
1398
+ * @summary Revoke Grant
1399
+ * @param {string} grantId Grant ID
1400
+ * @param {*} [options] Override http request option.
1401
+ * @throws {RequiredError}
1402
+ */
1403
+ async revokeGrantV1AccessGrantsGrantIdDelete(grantId, options) {
1404
+ const localVarAxiosArgs = await localVarAxiosParamCreator.revokeGrantV1AccessGrantsGrantIdDelete(grantId, options);
1405
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1406
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.revokeGrantV1AccessGrantsGrantIdDelete"]?.[localVarOperationServerIndex]?.url;
1407
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1408
+ },
1409
+ /**
1410
+ * Revoke a share token by its ID. Invalidates the credential regardless of any active grants.
1411
+ * @summary Revoke Share Token
1412
+ * @param {string} shareTokenId Share token ID
1413
+ * @param {*} [options] Override http request option.
1414
+ * @throws {RequiredError}
1415
+ */
1416
+ async revokeShareTokenV1AccessShareTokensShareTokenIdDelete(shareTokenId, options) {
1417
+ const localVarAxiosArgs = await localVarAxiosParamCreator.revokeShareTokenV1AccessShareTokensShareTokenIdDelete(shareTokenId, options);
1418
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1419
+ const localVarOperationServerBasePath = operationServerMap["PublicApi.revokeShareTokenV1AccessShareTokensShareTokenIdDelete"]?.[localVarOperationServerIndex]?.url;
1420
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
996
1421
  }
997
1422
  };
998
1423
  };
@@ -1019,6 +1444,16 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1019
1444
  cancelRunV1RunsRunIdCancelPost(requestParameters, options) {
1020
1445
  return localVarFp.cancelRunV1RunsRunIdCancelPost(requestParameters.runId, options).then((request) => request(axios, basePath));
1021
1446
  },
1447
+ /**
1448
+ * Create a grant to share access to a resource with a subject (user or organization).
1449
+ * @summary Create Grant
1450
+ * @param {PublicApiCreateGrantV1AccessGrantsPostRequest} requestParameters Request parameters.
1451
+ * @param {*} [options] Override http request option.
1452
+ * @throws {RequiredError}
1453
+ */
1454
+ createGrantV1AccessGrantsPost(requestParameters, options) {
1455
+ return localVarFp.createGrantV1AccessGrantsPost(requestParameters.grantCreateRequest, options).then((request) => request(axios, basePath));
1456
+ },
1022
1457
  /**
1023
1458
  * 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
1459
  * @summary Initiate Run
@@ -1029,6 +1464,16 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1029
1464
  createRunV1RunsPost(requestParameters, options) {
1030
1465
  return localVarFp.createRunV1RunsPost(requestParameters.runCreationRequest, options).then((request) => request(axios, basePath));
1031
1466
  },
1467
+ /**
1468
+ * 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.
1469
+ * @summary Create Share Token
1470
+ * @param {PublicApiCreateShareTokenV1AccessShareTokensPostRequest} requestParameters Request parameters.
1471
+ * @param {*} [options] Override http request option.
1472
+ * @throws {RequiredError}
1473
+ */
1474
+ createShareTokenV1AccessShareTokensPost(requestParameters, options) {
1475
+ return localVarFp.createShareTokenV1AccessShareTokensPost(requestParameters.shareTokenCreateRequest, options).then((request) => request(axios, basePath));
1476
+ },
1032
1477
  /**
1033
1478
  * 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
1479
  * @summary Delete Run Items
@@ -1047,7 +1492,17 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1047
1492
  * @throws {RequiredError}
1048
1493
  */
1049
1494
  getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters, options) {
1050
- return localVarFp.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters.runId, requestParameters.artifactId, options).then((request) => request(axios, basePath));
1495
+ return localVarFp.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters.runId, requestParameters.artifactId, requestParameters.shareToken, options).then((request) => request(axios, basePath));
1496
+ },
1497
+ /**
1498
+ * Get a grant by its ID.
1499
+ * @summary Get Grant
1500
+ * @param {PublicApiGetGrantV1AccessGrantsGrantIdGetRequest} requestParameters Request parameters.
1501
+ * @param {*} [options] Override http request option.
1502
+ * @throws {RequiredError}
1503
+ */
1504
+ getGrantV1AccessGrantsGrantIdGet(requestParameters, options) {
1505
+ return localVarFp.getGrantV1AccessGrantsGrantIdGet(requestParameters.grantId, options).then((request) => request(axios, basePath));
1051
1506
  },
1052
1507
  /**
1053
1508
  * Retrieve details of a specific item (slide) by its external ID and the run ID.
@@ -1057,7 +1512,7 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1057
1512
  * @throws {RequiredError}
1058
1513
  */
1059
1514
  getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters, options) {
1060
- return localVarFp.getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters.runId, requestParameters.externalId, options).then((request) => request(axios, basePath));
1515
+ return localVarFp.getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters.runId, requestParameters.externalId, requestParameters.shareToken, options).then((request) => request(axios, basePath));
1061
1516
  },
1062
1517
  /**
1063
1518
  * 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 +1524,24 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1069
1524
  return localVarFp.getMeV1MeGet(options).then((request) => request(axios, basePath));
1070
1525
  },
1071
1526
  /**
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.
1527
+ * 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
1528
  * @summary Get run details
1074
1529
  * @param {PublicApiGetRunV1RunsRunIdGetRequest} requestParameters Request parameters.
1075
1530
  * @param {*} [options] Override http request option.
1076
1531
  * @throws {RequiredError}
1077
1532
  */
1078
1533
  getRunV1RunsRunIdGet(requestParameters, options) {
1079
- return localVarFp.getRunV1RunsRunIdGet(requestParameters.runId, options).then((request) => request(axios, basePath));
1534
+ return localVarFp.getRunV1RunsRunIdGet(requestParameters.runId, requestParameters.shareToken, options).then((request) => request(axios, basePath));
1535
+ },
1536
+ /**
1537
+ * Get a share token by its ID.
1538
+ * @summary Get Share Token
1539
+ * @param {PublicApiGetShareTokenV1AccessShareTokensShareTokenIdGetRequest} requestParameters Request parameters.
1540
+ * @param {*} [options] Override http request option.
1541
+ * @throws {RequiredError}
1542
+ */
1543
+ getShareTokenV1AccessShareTokensShareTokenIdGet(requestParameters, options) {
1544
+ return localVarFp.getShareTokenV1AccessShareTokensShareTokenIdGet(requestParameters.shareTokenId, options).then((request) => request(axios, basePath));
1080
1545
  },
1081
1546
  /**
1082
1547
  * Return metadata for a single public document attached to an application version.
@@ -1118,6 +1583,16 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1118
1583
  listApplicationsV1ApplicationsGet(requestParameters = {}, options) {
1119
1584
  return localVarFp.listApplicationsV1ApplicationsGet(requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
1120
1585
  },
1586
+ /**
1587
+ * List grants. Org admins see all grants for all resources in their organization. Regular users see grants for all resources they submitted.
1588
+ * @summary List Grants
1589
+ * @param {PublicApiListGrantsV1AccessGrantsGetRequest} requestParameters Request parameters.
1590
+ * @param {*} [options] Override http request option.
1591
+ * @throws {RequiredError}
1592
+ */
1593
+ listGrantsV1AccessGrantsGet(requestParameters = {}, options) {
1594
+ return localVarFp.listGrantsV1AccessGrantsGet(requestParameters.resourceType, requestParameters.resourceId, requestParameters.subjectType, requestParameters.subjectId, requestParameters.revoked, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
1595
+ },
1121
1596
  /**
1122
1597
  * 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
1598
  * @summary List Run Items
@@ -1126,7 +1601,7 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1126
1601
  * @throws {RequiredError}
1127
1602
  */
1128
1603
  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));
1604
+ 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
1605
  },
1131
1606
  /**
1132
1607
  * List runs with filtering, sorting, and pagination capabilities. Returns paginated runs that were submitted by the user.
@@ -1138,6 +1613,16 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1138
1613
  listRunsV1RunsGet(requestParameters = {}, options) {
1139
1614
  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));
1140
1615
  },
1616
+ /**
1617
+ * List share tokens. Service and Superadmin see all tokens; other users see only their own.
1618
+ * @summary List Share Tokens
1619
+ * @param {PublicApiListShareTokensV1AccessShareTokensGetRequest} requestParameters Request parameters.
1620
+ * @param {*} [options] Override http request option.
1621
+ * @throws {RequiredError}
1622
+ */
1623
+ listShareTokensV1AccessShareTokensGet(requestParameters = {}, options) {
1624
+ return localVarFp.listShareTokensV1AccessShareTokensGet(requestParameters.runId, requestParameters.createdBy, requestParameters.revoked, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(axios, basePath));
1625
+ },
1141
1626
  /**
1142
1627
  * List public documents attached to an application version. Returns only documents with ``visibility=public`` and ``status=uploaded``.
1143
1628
  * @summary List version documents
@@ -1177,6 +1662,26 @@ var PublicApiFactory = function(configuration, basePath, axios) {
1177
1662
  */
1178
1663
  readApplicationByIdV1ApplicationsApplicationIdGet(requestParameters, options) {
1179
1664
  return localVarFp.readApplicationByIdV1ApplicationsApplicationIdGet(requestParameters.applicationId, options).then((request) => request(axios, basePath));
1665
+ },
1666
+ /**
1667
+ * Revoke a grant by its ID. Sets the revoked_at timestamp on the grant.
1668
+ * @summary Revoke Grant
1669
+ * @param {PublicApiRevokeGrantV1AccessGrantsGrantIdDeleteRequest} requestParameters Request parameters.
1670
+ * @param {*} [options] Override http request option.
1671
+ * @throws {RequiredError}
1672
+ */
1673
+ revokeGrantV1AccessGrantsGrantIdDelete(requestParameters, options) {
1674
+ return localVarFp.revokeGrantV1AccessGrantsGrantIdDelete(requestParameters.grantId, options).then((request) => request(axios, basePath));
1675
+ },
1676
+ /**
1677
+ * Revoke a share token by its ID. Invalidates the credential regardless of any active grants.
1678
+ * @summary Revoke Share Token
1679
+ * @param {PublicApiRevokeShareTokenV1AccessShareTokensShareTokenIdDeleteRequest} requestParameters Request parameters.
1680
+ * @param {*} [options] Override http request option.
1681
+ * @throws {RequiredError}
1682
+ */
1683
+ revokeShareTokenV1AccessShareTokensShareTokenIdDelete(requestParameters, options) {
1684
+ return localVarFp.revokeShareTokenV1AccessShareTokensShareTokenIdDelete(requestParameters.shareTokenId, options).then((request) => request(axios, basePath));
1180
1685
  }
1181
1686
  };
1182
1687
  };
@@ -1203,6 +1708,17 @@ var PublicApi = class extends BaseAPI {
1203
1708
  cancelRunV1RunsRunIdCancelPost(requestParameters, options) {
1204
1709
  return PublicApiFp(this.configuration).cancelRunV1RunsRunIdCancelPost(requestParameters.runId, options).then((request) => request(this.axios, this.basePath));
1205
1710
  }
1711
+ /**
1712
+ * Create a grant to share access to a resource with a subject (user or organization).
1713
+ * @summary Create Grant
1714
+ * @param {PublicApiCreateGrantV1AccessGrantsPostRequest} requestParameters Request parameters.
1715
+ * @param {*} [options] Override http request option.
1716
+ * @throws {RequiredError}
1717
+ * @memberof PublicApi
1718
+ */
1719
+ createGrantV1AccessGrantsPost(requestParameters, options) {
1720
+ return PublicApiFp(this.configuration).createGrantV1AccessGrantsPost(requestParameters.grantCreateRequest, options).then((request) => request(this.axios, this.basePath));
1721
+ }
1206
1722
  /**
1207
1723
  * 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
1724
  * @summary Initiate Run
@@ -1214,6 +1730,17 @@ var PublicApi = class extends BaseAPI {
1214
1730
  createRunV1RunsPost(requestParameters, options) {
1215
1731
  return PublicApiFp(this.configuration).createRunV1RunsPost(requestParameters.runCreationRequest, options).then((request) => request(this.axios, this.basePath));
1216
1732
  }
1733
+ /**
1734
+ * 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.
1735
+ * @summary Create Share Token
1736
+ * @param {PublicApiCreateShareTokenV1AccessShareTokensPostRequest} requestParameters Request parameters.
1737
+ * @param {*} [options] Override http request option.
1738
+ * @throws {RequiredError}
1739
+ * @memberof PublicApi
1740
+ */
1741
+ createShareTokenV1AccessShareTokensPost(requestParameters, options) {
1742
+ return PublicApiFp(this.configuration).createShareTokenV1AccessShareTokensPost(requestParameters.shareTokenCreateRequest, options).then((request) => request(this.axios, this.basePath));
1743
+ }
1217
1744
  /**
1218
1745
  * 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
1746
  * @summary Delete Run Items
@@ -1234,7 +1761,18 @@ var PublicApi = class extends BaseAPI {
1234
1761
  * @memberof PublicApi
1235
1762
  */
1236
1763
  getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters, options) {
1237
- return PublicApiFp(this.configuration).getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters.runId, requestParameters.artifactId, options).then((request) => request(this.axios, this.basePath));
1764
+ return PublicApiFp(this.configuration).getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet(requestParameters.runId, requestParameters.artifactId, requestParameters.shareToken, options).then((request) => request(this.axios, this.basePath));
1765
+ }
1766
+ /**
1767
+ * Get a grant by its ID.
1768
+ * @summary Get Grant
1769
+ * @param {PublicApiGetGrantV1AccessGrantsGrantIdGetRequest} requestParameters Request parameters.
1770
+ * @param {*} [options] Override http request option.
1771
+ * @throws {RequiredError}
1772
+ * @memberof PublicApi
1773
+ */
1774
+ getGrantV1AccessGrantsGrantIdGet(requestParameters, options) {
1775
+ return PublicApiFp(this.configuration).getGrantV1AccessGrantsGrantIdGet(requestParameters.grantId, options).then((request) => request(this.axios, this.basePath));
1238
1776
  }
1239
1777
  /**
1240
1778
  * Retrieve details of a specific item (slide) by its external ID and the run ID.
@@ -1245,7 +1783,7 @@ var PublicApi = class extends BaseAPI {
1245
1783
  * @memberof PublicApi
1246
1784
  */
1247
1785
  getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters, options) {
1248
- return PublicApiFp(this.configuration).getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters.runId, requestParameters.externalId, options).then((request) => request(this.axios, this.basePath));
1786
+ return PublicApiFp(this.configuration).getItemByRunV1RunsRunIdItemsExternalIdGet(requestParameters.runId, requestParameters.externalId, requestParameters.shareToken, options).then((request) => request(this.axios, this.basePath));
1249
1787
  }
1250
1788
  /**
1251
1789
  * 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 +1796,7 @@ var PublicApi = class extends BaseAPI {
1258
1796
  return PublicApiFp(this.configuration).getMeV1MeGet(options).then((request) => request(this.axios, this.basePath));
1259
1797
  }
1260
1798
  /**
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.
1799
+ * 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
1800
  * @summary Get run details
1263
1801
  * @param {PublicApiGetRunV1RunsRunIdGetRequest} requestParameters Request parameters.
1264
1802
  * @param {*} [options] Override http request option.
@@ -1266,7 +1804,18 @@ var PublicApi = class extends BaseAPI {
1266
1804
  * @memberof PublicApi
1267
1805
  */
1268
1806
  getRunV1RunsRunIdGet(requestParameters, options) {
1269
- return PublicApiFp(this.configuration).getRunV1RunsRunIdGet(requestParameters.runId, options).then((request) => request(this.axios, this.basePath));
1807
+ return PublicApiFp(this.configuration).getRunV1RunsRunIdGet(requestParameters.runId, requestParameters.shareToken, options).then((request) => request(this.axios, this.basePath));
1808
+ }
1809
+ /**
1810
+ * Get a share token by its ID.
1811
+ * @summary Get Share Token
1812
+ * @param {PublicApiGetShareTokenV1AccessShareTokensShareTokenIdGetRequest} requestParameters Request parameters.
1813
+ * @param {*} [options] Override http request option.
1814
+ * @throws {RequiredError}
1815
+ * @memberof PublicApi
1816
+ */
1817
+ getShareTokenV1AccessShareTokensShareTokenIdGet(requestParameters, options) {
1818
+ return PublicApiFp(this.configuration).getShareTokenV1AccessShareTokensShareTokenIdGet(requestParameters.shareTokenId, options).then((request) => request(this.axios, this.basePath));
1270
1819
  }
1271
1820
  /**
1272
1821
  * Return metadata for a single public document attached to an application version.
@@ -1312,6 +1861,17 @@ var PublicApi = class extends BaseAPI {
1312
1861
  listApplicationsV1ApplicationsGet(requestParameters = {}, options) {
1313
1862
  return PublicApiFp(this.configuration).listApplicationsV1ApplicationsGet(requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
1314
1863
  }
1864
+ /**
1865
+ * List grants. Org admins see all grants for all resources in their organization. Regular users see grants for all resources they submitted.
1866
+ * @summary List Grants
1867
+ * @param {PublicApiListGrantsV1AccessGrantsGetRequest} requestParameters Request parameters.
1868
+ * @param {*} [options] Override http request option.
1869
+ * @throws {RequiredError}
1870
+ * @memberof PublicApi
1871
+ */
1872
+ listGrantsV1AccessGrantsGet(requestParameters = {}, options) {
1873
+ return PublicApiFp(this.configuration).listGrantsV1AccessGrantsGet(requestParameters.resourceType, requestParameters.resourceId, requestParameters.subjectType, requestParameters.subjectId, requestParameters.revoked, requestParameters.page, requestParameters.pageSize, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
1874
+ }
1315
1875
  /**
1316
1876
  * 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
1877
  * @summary List Run Items
@@ -1321,7 +1881,7 @@ var PublicApi = class extends BaseAPI {
1321
1881
  * @memberof PublicApi
1322
1882
  */
1323
1883
  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));
1884
+ 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
1885
  }
1326
1886
  /**
1327
1887
  * List runs with filtering, sorting, and pagination capabilities. Returns paginated runs that were submitted by the user.
@@ -1334,6 +1894,17 @@ var PublicApi = class extends BaseAPI {
1334
1894
  listRunsV1RunsGet(requestParameters = {}, options) {
1335
1895
  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));
1336
1896
  }
1897
+ /**
1898
+ * List share tokens. Service and Superadmin see all tokens; other users see only their own.
1899
+ * @summary List Share Tokens
1900
+ * @param {PublicApiListShareTokensV1AccessShareTokensGetRequest} requestParameters Request parameters.
1901
+ * @param {*} [options] Override http request option.
1902
+ * @throws {RequiredError}
1903
+ * @memberof PublicApi
1904
+ */
1905
+ listShareTokensV1AccessShareTokensGet(requestParameters = {}, options) {
1906
+ 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));
1907
+ }
1337
1908
  /**
1338
1909
  * List public documents attached to an application version. Returns only documents with ``visibility=public`` and ``status=uploaded``.
1339
1910
  * @summary List version documents
@@ -1378,6 +1949,28 @@ var PublicApi = class extends BaseAPI {
1378
1949
  readApplicationByIdV1ApplicationsApplicationIdGet(requestParameters, options) {
1379
1950
  return PublicApiFp(this.configuration).readApplicationByIdV1ApplicationsApplicationIdGet(requestParameters.applicationId, options).then((request) => request(this.axios, this.basePath));
1380
1951
  }
1952
+ /**
1953
+ * Revoke a grant by its ID. Sets the revoked_at timestamp on the grant.
1954
+ * @summary Revoke Grant
1955
+ * @param {PublicApiRevokeGrantV1AccessGrantsGrantIdDeleteRequest} requestParameters Request parameters.
1956
+ * @param {*} [options] Override http request option.
1957
+ * @throws {RequiredError}
1958
+ * @memberof PublicApi
1959
+ */
1960
+ revokeGrantV1AccessGrantsGrantIdDelete(requestParameters, options) {
1961
+ return PublicApiFp(this.configuration).revokeGrantV1AccessGrantsGrantIdDelete(requestParameters.grantId, options).then((request) => request(this.axios, this.basePath));
1962
+ }
1963
+ /**
1964
+ * Revoke a share token by its ID. Invalidates the credential regardless of any active grants.
1965
+ * @summary Revoke Share Token
1966
+ * @param {PublicApiRevokeShareTokenV1AccessShareTokensShareTokenIdDeleteRequest} requestParameters Request parameters.
1967
+ * @param {*} [options] Override http request option.
1968
+ * @throws {RequiredError}
1969
+ * @memberof PublicApi
1970
+ */
1971
+ revokeShareTokenV1AccessShareTokensShareTokenIdDelete(requestParameters, options) {
1972
+ return PublicApiFp(this.configuration).revokeShareTokenV1AccessShareTokensShareTokenIdDelete(requestParameters.shareTokenId, options).then((request) => request(this.axios, this.basePath));
1973
+ }
1381
1974
  };
1382
1975
 
1383
1976
  // src/generated/configuration.ts
@@ -2448,6 +3041,6 @@ var PlatformSDKHttp = class {
2448
3041
  // src/index.ts
2449
3042
  var index_default = PlatformSDKHttp;
2450
3043
 
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 };
3044
+ 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
3045
  //# sourceMappingURL=index.js.map
2453
3046
  //# sourceMappingURL=index.js.map