@aignostics/sdk 3.5.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/aignostics-sdk-3.5.1.tgz +0 -0
- package/dist/{api-CrZaHZZr.d.cts → api-B0sQ1mLM.d.cts} +36 -6
- package/dist/{api-CrZaHZZr.d.ts → api-B0sQ1mLM.d.ts} +36 -6
- package/dist/index.cjs +59 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -10
- package/dist/index.d.ts +16 -10
- package/dist/index.js +59 -22
- package/dist/index.js.map +1 -1
- package/dist/test-utils/http-mocks.d.cts +1 -1
- package/dist/test-utils/http-mocks.d.ts +1 -1
- package/package.json +1 -1
- package/dist/aignostics-sdk-3.5.0.tgz +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RunReadResponse, I as ItemResultReadResponse, A as ApplicationReadShortResponse, a as ApplicationReadResponse, b as RunCreationRequest, c as RunCreationResponse, d as ItemState, e as ItemTerminationReason, V as VersionReadResponse } from './api-
|
|
2
|
-
export { f as ApplicationVersion, g as ArtifactOutput, h as ArtifactState, i as ArtifactTerminationReason, an as Configuration, am as ConfigurationParameters, C as CustomMetadataUpdateRequest, j as CustomMetadataUpdateResponse, G as GrantCreateRequest, k as GrantReadResponse, l as GrantRelation, H as HTTPValidationError, m as InputArtifact, n as InputArtifactCreationRequest, o as InputArtifactResultReadResponse, p as ItemCreationRequest, q as ItemOutput, M as MeReadResponse, O as OrganizationReadResponse, r as OutputArtifact, s as OutputArtifactResultReadResponse, t as OutputArtifactScope, u as OutputArtifactVisibility, al as PublicApi, Y as PublicApiApplicationVersionDetailsV1ApplicationsApplicationIdVersionsVersionGetRequest, Q as PublicApiAxiosParamCreator, Z as PublicApiCancelRunV1RunsRunIdCancelPostRequest, _ as PublicApiCreateGrantV1AccessGrantsPostRequest, $ as PublicApiCreateRunV1RunsPostRequest, a0 as PublicApiCreateShareTokenV1AccessShareTokensPostRequest, a1 as PublicApiDeleteRunItemsV1RunsRunIdArtifactsDeleteRequest, W as PublicApiFactory, T as PublicApiFp, a2 as PublicApiGetArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGetRequest, a3 as PublicApiGetGrantV1AccessGrantsGrantIdGetRequest, a4 as PublicApiGetItemByRunV1RunsRunIdItemsExternalIdGetRequest, a5 as PublicApiGetRunV1RunsRunIdGetRequest, a6 as PublicApiGetShareTokenV1AccessShareTokensShareTokenIdGetRequest, a8 as PublicApiGetVersionDocumentContentRequest, a9 as PublicApiGetVersionDocumentFileRequest, a7 as PublicApiGetVersionDocumentRequest, X as PublicApiInterface, aa as PublicApiListApplicationsV1ApplicationsGetRequest, ab as PublicApiListGrantsV1AccessGrantsGetRequest, ac as PublicApiListRunItemsV1RunsRunIdItemsGetRequest, ad as PublicApiListRunsV1RunsGetRequest, ae as PublicApiListShareTokensV1AccessShareTokensGetRequest, af as PublicApiListVersionDocumentsRequest, ag as PublicApiPutItemCustomMetadataByRunV1RunsRunIdItemsExternalIdCustomMetadataPutRequest, ah as PublicApiPutRunCustomMetadataV1RunsRunIdCustomMetadataPutRequest, ai as PublicApiReadApplicationByIdV1ApplicationsApplicationIdGetRequest, aj as PublicApiRevokeGrantV1AccessGrantsGrantIdDeleteRequest, ak as PublicApiRevokeShareTokenV1AccessShareTokensShareTokenIdDeleteRequest, v as ResourceType, w as RunItemStatistics, x as RunOutput, y as RunState, z as RunTerminationReason, S as SchedulingRequest, B as SchedulingResponse, D as ShareTokenCreateRequest, E as ShareTokenCreateResponse, F as ShareTokenReadResponse, J as SubjectType, U as UserReadResponse, K as ValidationError, L as ValidationErrorLocInner, N as VersionDocumentResponse, P as VersionDocumentVisibility } from './api-
|
|
1
|
+
import { R as RunReadResponse, I as ItemResultReadResponse, A as ApplicationReadShortResponse, a as ApplicationReadResponse, b as RunCreationRequest, c as RunCreationResponse, d as ItemState, e as ItemTerminationReason, V as VersionReadResponse } from './api-B0sQ1mLM.cjs';
|
|
2
|
+
export { f as ApplicationVersion, g as ArtifactOutput, h as ArtifactState, i as ArtifactTerminationReason, an as Configuration, am as ConfigurationParameters, C as CustomMetadataUpdateRequest, j as CustomMetadataUpdateResponse, G as GrantCreateRequest, k as GrantReadResponse, l as GrantRelation, H as HTTPValidationError, m as InputArtifact, n as InputArtifactCreationRequest, o as InputArtifactResultReadResponse, p as ItemCreationRequest, q as ItemOutput, M as MeReadResponse, O as OrganizationReadResponse, r as OutputArtifact, s as OutputArtifactResultReadResponse, t as OutputArtifactScope, u as OutputArtifactVisibility, al as PublicApi, Y as PublicApiApplicationVersionDetailsV1ApplicationsApplicationIdVersionsVersionGetRequest, Q as PublicApiAxiosParamCreator, Z as PublicApiCancelRunV1RunsRunIdCancelPostRequest, _ as PublicApiCreateGrantV1AccessGrantsPostRequest, $ as PublicApiCreateRunV1RunsPostRequest, a0 as PublicApiCreateShareTokenV1AccessShareTokensPostRequest, a1 as PublicApiDeleteRunItemsV1RunsRunIdArtifactsDeleteRequest, W as PublicApiFactory, T as PublicApiFp, a2 as PublicApiGetArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGetRequest, a3 as PublicApiGetGrantV1AccessGrantsGrantIdGetRequest, a4 as PublicApiGetItemByRunV1RunsRunIdItemsExternalIdGetRequest, a5 as PublicApiGetRunV1RunsRunIdGetRequest, a6 as PublicApiGetShareTokenV1AccessShareTokensShareTokenIdGetRequest, a8 as PublicApiGetVersionDocumentContentRequest, a9 as PublicApiGetVersionDocumentFileRequest, a7 as PublicApiGetVersionDocumentRequest, X as PublicApiInterface, aa as PublicApiListApplicationsV1ApplicationsGetRequest, ab as PublicApiListGrantsV1AccessGrantsGetRequest, ac as PublicApiListRunItemsV1RunsRunIdItemsGetRequest, ad as PublicApiListRunsV1RunsGetRequest, ae as PublicApiListShareTokensV1AccessShareTokensGetRequest, af as PublicApiListVersionDocumentsRequest, ag as PublicApiPutItemCustomMetadataByRunV1RunsRunIdItemsExternalIdCustomMetadataPutRequest, ah as PublicApiPutRunCustomMetadataV1RunsRunIdCustomMetadataPutRequest, ai as PublicApiReadApplicationByIdV1ApplicationsApplicationIdGetRequest, aj as PublicApiRevokeGrantV1AccessGrantsGrantIdDeleteRequest, ak as PublicApiRevokeShareTokenV1AccessShareTokensShareTokenIdDeleteRequest, v as ResourceType, w as RunItemStatistics, x as RunOutput, y as RunState, z as RunTerminationReason, S as SchedulingRequest, B as SchedulingResponse, D as ShareTokenCreateRequest, E as ShareTokenCreateResponse, F as ShareTokenReadResponse, J as SubjectType, U as UserReadResponse, K as ValidationError, L as ValidationErrorLocInner, N as VersionDocumentResponse, P as VersionDocumentVisibility } from './api-B0sQ1mLM.cjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -18,7 +18,7 @@ interface ApplicationRun extends RunReadResponse {
|
|
|
18
18
|
can_download: boolean;
|
|
19
19
|
}
|
|
20
20
|
/** Derived run status that simplifies the raw `state` + `termination_reason` combination. */
|
|
21
|
-
type RunStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'CANCELED' | 'FAILED';
|
|
21
|
+
type RunStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'CANCELED' | 'FAILED' | 'UNKNOWN';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Enriched run-item entity that extends the raw API response
|
|
@@ -34,7 +34,7 @@ interface ApplicationRunItem extends ItemResultReadResponse {
|
|
|
34
34
|
status: string;
|
|
35
35
|
}
|
|
36
36
|
/** Derived item status that simplifies the raw `state` + `termination_reason` combination. */
|
|
37
|
-
type ItemStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'SKIPPED';
|
|
37
|
+
type ItemStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'SKIPPED' | 'UNKNOWN';
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Token provider function that returns a valid access token
|
|
@@ -564,14 +564,18 @@ declare const processApplicationRun: (run: RunReadResponse) => ApplicationRun;
|
|
|
564
564
|
*/
|
|
565
565
|
declare function getRunProgress(run: RunReadResponse): number;
|
|
566
566
|
/**
|
|
567
|
-
* Derive a human-readable {@link RunStatus} from the raw API `state
|
|
567
|
+
* Derive a human-readable {@link RunStatus} from the raw API `state`,
|
|
568
|
+
* `termination_reason`, and `output`.
|
|
568
569
|
*
|
|
569
570
|
* Mapping rules:
|
|
570
571
|
* - PENDING / PROCESSING → passed through as-is
|
|
571
572
|
* - TERMINATED + CANCELED_BY_USER → CANCELED
|
|
572
|
-
* - TERMINATED + CANCELED_BY_SYSTEM →
|
|
573
|
-
*
|
|
574
|
-
*
|
|
573
|
+
* - TERMINATED + CANCELED_BY_SYSTEM or ALL_ITEMS_PROCESSED → derived from `output`:
|
|
574
|
+
* - NONE → FAILED (no items succeeded)
|
|
575
|
+
* - PARTIAL → COMPLETED_WITH_ERRORS (some items succeeded)
|
|
576
|
+
* - FULL → COMPLETED (all items succeeded)
|
|
577
|
+
* - otherwise → UNKNOWN
|
|
578
|
+
* - any other termination reason, or non-terminal state, → UNKNOWN
|
|
575
579
|
*
|
|
576
580
|
* @param run - Raw run response from the API
|
|
577
581
|
*/
|
|
@@ -610,9 +614,11 @@ declare const canDownloadItem: (item: ItemResultReadResponse) => boolean;
|
|
|
610
614
|
*
|
|
611
615
|
* Mapping rules:
|
|
612
616
|
* - PENDING / PROCESSING → passed through as-is
|
|
613
|
-
* - TERMINATED +
|
|
617
|
+
* - TERMINATED + no termination_reason → UNKNOWN
|
|
618
|
+
* - TERMINATED + an error reason (SYSTEM_ERROR, USER_ERROR, CANCELED_BY_SYSTEM, CANCELED_BY_USER) → FAILED
|
|
614
619
|
* - TERMINATED + SKIPPED → SKIPPED
|
|
615
|
-
* - TERMINATED
|
|
620
|
+
* - TERMINATED + SUCCEEDED → COMPLETED
|
|
621
|
+
* - TERMINATED + any unrecognized reason → UNKNOWN
|
|
616
622
|
*
|
|
617
623
|
* @param item - Raw item response from the API
|
|
618
624
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RunReadResponse, I as ItemResultReadResponse, A as ApplicationReadShortResponse, a as ApplicationReadResponse, b as RunCreationRequest, c as RunCreationResponse, d as ItemState, e as ItemTerminationReason, V as VersionReadResponse } from './api-
|
|
2
|
-
export { f as ApplicationVersion, g as ArtifactOutput, h as ArtifactState, i as ArtifactTerminationReason, an as Configuration, am as ConfigurationParameters, C as CustomMetadataUpdateRequest, j as CustomMetadataUpdateResponse, G as GrantCreateRequest, k as GrantReadResponse, l as GrantRelation, H as HTTPValidationError, m as InputArtifact, n as InputArtifactCreationRequest, o as InputArtifactResultReadResponse, p as ItemCreationRequest, q as ItemOutput, M as MeReadResponse, O as OrganizationReadResponse, r as OutputArtifact, s as OutputArtifactResultReadResponse, t as OutputArtifactScope, u as OutputArtifactVisibility, al as PublicApi, Y as PublicApiApplicationVersionDetailsV1ApplicationsApplicationIdVersionsVersionGetRequest, Q as PublicApiAxiosParamCreator, Z as PublicApiCancelRunV1RunsRunIdCancelPostRequest, _ as PublicApiCreateGrantV1AccessGrantsPostRequest, $ as PublicApiCreateRunV1RunsPostRequest, a0 as PublicApiCreateShareTokenV1AccessShareTokensPostRequest, a1 as PublicApiDeleteRunItemsV1RunsRunIdArtifactsDeleteRequest, W as PublicApiFactory, T as PublicApiFp, a2 as PublicApiGetArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGetRequest, a3 as PublicApiGetGrantV1AccessGrantsGrantIdGetRequest, a4 as PublicApiGetItemByRunV1RunsRunIdItemsExternalIdGetRequest, a5 as PublicApiGetRunV1RunsRunIdGetRequest, a6 as PublicApiGetShareTokenV1AccessShareTokensShareTokenIdGetRequest, a8 as PublicApiGetVersionDocumentContentRequest, a9 as PublicApiGetVersionDocumentFileRequest, a7 as PublicApiGetVersionDocumentRequest, X as PublicApiInterface, aa as PublicApiListApplicationsV1ApplicationsGetRequest, ab as PublicApiListGrantsV1AccessGrantsGetRequest, ac as PublicApiListRunItemsV1RunsRunIdItemsGetRequest, ad as PublicApiListRunsV1RunsGetRequest, ae as PublicApiListShareTokensV1AccessShareTokensGetRequest, af as PublicApiListVersionDocumentsRequest, ag as PublicApiPutItemCustomMetadataByRunV1RunsRunIdItemsExternalIdCustomMetadataPutRequest, ah as PublicApiPutRunCustomMetadataV1RunsRunIdCustomMetadataPutRequest, ai as PublicApiReadApplicationByIdV1ApplicationsApplicationIdGetRequest, aj as PublicApiRevokeGrantV1AccessGrantsGrantIdDeleteRequest, ak as PublicApiRevokeShareTokenV1AccessShareTokensShareTokenIdDeleteRequest, v as ResourceType, w as RunItemStatistics, x as RunOutput, y as RunState, z as RunTerminationReason, S as SchedulingRequest, B as SchedulingResponse, D as ShareTokenCreateRequest, E as ShareTokenCreateResponse, F as ShareTokenReadResponse, J as SubjectType, U as UserReadResponse, K as ValidationError, L as ValidationErrorLocInner, N as VersionDocumentResponse, P as VersionDocumentVisibility } from './api-
|
|
1
|
+
import { R as RunReadResponse, I as ItemResultReadResponse, A as ApplicationReadShortResponse, a as ApplicationReadResponse, b as RunCreationRequest, c as RunCreationResponse, d as ItemState, e as ItemTerminationReason, V as VersionReadResponse } from './api-B0sQ1mLM.js';
|
|
2
|
+
export { f as ApplicationVersion, g as ArtifactOutput, h as ArtifactState, i as ArtifactTerminationReason, an as Configuration, am as ConfigurationParameters, C as CustomMetadataUpdateRequest, j as CustomMetadataUpdateResponse, G as GrantCreateRequest, k as GrantReadResponse, l as GrantRelation, H as HTTPValidationError, m as InputArtifact, n as InputArtifactCreationRequest, o as InputArtifactResultReadResponse, p as ItemCreationRequest, q as ItemOutput, M as MeReadResponse, O as OrganizationReadResponse, r as OutputArtifact, s as OutputArtifactResultReadResponse, t as OutputArtifactScope, u as OutputArtifactVisibility, al as PublicApi, Y as PublicApiApplicationVersionDetailsV1ApplicationsApplicationIdVersionsVersionGetRequest, Q as PublicApiAxiosParamCreator, Z as PublicApiCancelRunV1RunsRunIdCancelPostRequest, _ as PublicApiCreateGrantV1AccessGrantsPostRequest, $ as PublicApiCreateRunV1RunsPostRequest, a0 as PublicApiCreateShareTokenV1AccessShareTokensPostRequest, a1 as PublicApiDeleteRunItemsV1RunsRunIdArtifactsDeleteRequest, W as PublicApiFactory, T as PublicApiFp, a2 as PublicApiGetArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGetRequest, a3 as PublicApiGetGrantV1AccessGrantsGrantIdGetRequest, a4 as PublicApiGetItemByRunV1RunsRunIdItemsExternalIdGetRequest, a5 as PublicApiGetRunV1RunsRunIdGetRequest, a6 as PublicApiGetShareTokenV1AccessShareTokensShareTokenIdGetRequest, a8 as PublicApiGetVersionDocumentContentRequest, a9 as PublicApiGetVersionDocumentFileRequest, a7 as PublicApiGetVersionDocumentRequest, X as PublicApiInterface, aa as PublicApiListApplicationsV1ApplicationsGetRequest, ab as PublicApiListGrantsV1AccessGrantsGetRequest, ac as PublicApiListRunItemsV1RunsRunIdItemsGetRequest, ad as PublicApiListRunsV1RunsGetRequest, ae as PublicApiListShareTokensV1AccessShareTokensGetRequest, af as PublicApiListVersionDocumentsRequest, ag as PublicApiPutItemCustomMetadataByRunV1RunsRunIdItemsExternalIdCustomMetadataPutRequest, ah as PublicApiPutRunCustomMetadataV1RunsRunIdCustomMetadataPutRequest, ai as PublicApiReadApplicationByIdV1ApplicationsApplicationIdGetRequest, aj as PublicApiRevokeGrantV1AccessGrantsGrantIdDeleteRequest, ak as PublicApiRevokeShareTokenV1AccessShareTokensShareTokenIdDeleteRequest, v as ResourceType, w as RunItemStatistics, x as RunOutput, y as RunState, z as RunTerminationReason, S as SchedulingRequest, B as SchedulingResponse, D as ShareTokenCreateRequest, E as ShareTokenCreateResponse, F as ShareTokenReadResponse, J as SubjectType, U as UserReadResponse, K as ValidationError, L as ValidationErrorLocInner, N as VersionDocumentResponse, P as VersionDocumentVisibility } from './api-B0sQ1mLM.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -18,7 +18,7 @@ interface ApplicationRun extends RunReadResponse {
|
|
|
18
18
|
can_download: boolean;
|
|
19
19
|
}
|
|
20
20
|
/** Derived run status that simplifies the raw `state` + `termination_reason` combination. */
|
|
21
|
-
type RunStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'CANCELED' | 'FAILED';
|
|
21
|
+
type RunStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'CANCELED' | 'FAILED' | 'UNKNOWN';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Enriched run-item entity that extends the raw API response
|
|
@@ -34,7 +34,7 @@ interface ApplicationRunItem extends ItemResultReadResponse {
|
|
|
34
34
|
status: string;
|
|
35
35
|
}
|
|
36
36
|
/** Derived item status that simplifies the raw `state` + `termination_reason` combination. */
|
|
37
|
-
type ItemStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'SKIPPED';
|
|
37
|
+
type ItemStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'SKIPPED' | 'UNKNOWN';
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Token provider function that returns a valid access token
|
|
@@ -564,14 +564,18 @@ declare const processApplicationRun: (run: RunReadResponse) => ApplicationRun;
|
|
|
564
564
|
*/
|
|
565
565
|
declare function getRunProgress(run: RunReadResponse): number;
|
|
566
566
|
/**
|
|
567
|
-
* Derive a human-readable {@link RunStatus} from the raw API `state
|
|
567
|
+
* Derive a human-readable {@link RunStatus} from the raw API `state`,
|
|
568
|
+
* `termination_reason`, and `output`.
|
|
568
569
|
*
|
|
569
570
|
* Mapping rules:
|
|
570
571
|
* - PENDING / PROCESSING → passed through as-is
|
|
571
572
|
* - TERMINATED + CANCELED_BY_USER → CANCELED
|
|
572
|
-
* - TERMINATED + CANCELED_BY_SYSTEM →
|
|
573
|
-
*
|
|
574
|
-
*
|
|
573
|
+
* - TERMINATED + CANCELED_BY_SYSTEM or ALL_ITEMS_PROCESSED → derived from `output`:
|
|
574
|
+
* - NONE → FAILED (no items succeeded)
|
|
575
|
+
* - PARTIAL → COMPLETED_WITH_ERRORS (some items succeeded)
|
|
576
|
+
* - FULL → COMPLETED (all items succeeded)
|
|
577
|
+
* - otherwise → UNKNOWN
|
|
578
|
+
* - any other termination reason, or non-terminal state, → UNKNOWN
|
|
575
579
|
*
|
|
576
580
|
* @param run - Raw run response from the API
|
|
577
581
|
*/
|
|
@@ -610,9 +614,11 @@ declare const canDownloadItem: (item: ItemResultReadResponse) => boolean;
|
|
|
610
614
|
*
|
|
611
615
|
* Mapping rules:
|
|
612
616
|
* - PENDING / PROCESSING → passed through as-is
|
|
613
|
-
* - TERMINATED +
|
|
617
|
+
* - TERMINATED + no termination_reason → UNKNOWN
|
|
618
|
+
* - TERMINATED + an error reason (SYSTEM_ERROR, USER_ERROR, CANCELED_BY_SYSTEM, CANCELED_BY_USER) → FAILED
|
|
614
619
|
* - TERMINATED + SKIPPED → SKIPPED
|
|
615
|
-
* - TERMINATED
|
|
620
|
+
* - TERMINATED + SUCCEEDED → COMPLETED
|
|
621
|
+
* - TERMINATED + any unrecognized reason → UNKNOWN
|
|
616
622
|
*
|
|
617
623
|
* @param item - Raw item response from the API
|
|
618
624
|
*/
|
package/dist/index.js
CHANGED
|
@@ -638,6 +638,7 @@ var PublicApiAxiosParamCreator = function(configuration) {
|
|
|
638
638
|
* @param {string | null} [resourceId]
|
|
639
639
|
* @param {SubjectType | null} [subjectType]
|
|
640
640
|
* @param {string | null} [subjectId]
|
|
641
|
+
* @param {Array<GrantRelation> | null} [relation] Filter grants by relation type. Can be specified multiple times.
|
|
641
642
|
* @param {boolean | null} [revoked]
|
|
642
643
|
* @param {number} [page]
|
|
643
644
|
* @param {number} [pageSize]
|
|
@@ -645,7 +646,7 @@ var PublicApiAxiosParamCreator = function(configuration) {
|
|
|
645
646
|
* @param {*} [options] Override http request option.
|
|
646
647
|
* @throws {RequiredError}
|
|
647
648
|
*/
|
|
648
|
-
listGrantsV1AccessGrantsGet: async (resourceType, resourceId, subjectType, subjectId, revoked, page, pageSize, sort, options = {}) => {
|
|
649
|
+
listGrantsV1AccessGrantsGet: async (resourceType, resourceId, subjectType, subjectId, relation, revoked, page, pageSize, sort, options = {}) => {
|
|
649
650
|
const localVarPath = `/v1/access/grants`;
|
|
650
651
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
651
652
|
let baseOptions;
|
|
@@ -668,6 +669,9 @@ var PublicApiAxiosParamCreator = function(configuration) {
|
|
|
668
669
|
if (subjectId !== void 0) {
|
|
669
670
|
localVarQueryParameter["subject_id"] = subjectId;
|
|
670
671
|
}
|
|
672
|
+
if (relation) {
|
|
673
|
+
localVarQueryParameter["relation"] = relation;
|
|
674
|
+
}
|
|
671
675
|
if (revoked !== void 0) {
|
|
672
676
|
localVarQueryParameter["revoked"] = revoked;
|
|
673
677
|
}
|
|
@@ -760,12 +764,14 @@ var PublicApiAxiosParamCreator = function(configuration) {
|
|
|
760
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**: `$.study` - Runs that have a study field defined - **Exact value match**: `$.study ? (@ == \"high\")` - Runs with specific study value - **Numeric comparison**: `$.confidence_score ? (@ > 0.75)` - Runs with confidence score greater than 0.75 - **Array operations**: `$.tags[*] ? (@ == \"draft\")` - Runs with tags array containing \"draft\" - **Complex conditions**: `$.resources ? (@.gpu_count > 2 && @.memory_gb >= 16)` - Runs with high resource requirements #### Examples (URL-Encoded Format): - **Field existence**: `%24.study` - **Exact value match**: `%24.study%20%3F%20(%40%20%3D%3D%20%22high%22)` - **Numeric comparison**: `%24.confidence_score%20%3F%20(%40%20%3E%200.75)` - **Array operations**: `%24.tags%5B*%5D%20%3F%20(%40%20%3D%3D%20%22draft%22)` - **Complex conditions**: `%24.resources%20%3F%20(%40.gpu_count%20%3E%202%20%26%26%20%40.memory_gb%20%3E%3D%2016)` #### Notes - JSONPath expressions are evaluated using PostgreSQL\'s `@?` operator - The `$.` prefix is automatically added to root-level field references if missing - String values in conditions must be enclosed in double quotes - Use `&&` for AND operations and `||` for OR operations - Regular expressions use `like_regex` with standard regex syntax - **Please remember to URL-encode the entire JSONPath expression when making HTTP requests**
|
|
761
765
|
* @param {number} [page]
|
|
762
766
|
* @param {number} [pageSize]
|
|
767
|
+
* @param {string | null} [submittedBy] Filter runs by the user who submitted them. Use the special value `me` 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 `my_org` to filter by the current user\'s organization.
|
|
763
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\'s own runs.
|
|
764
770
|
* @param {Array<string> | null} [sort] Sort the results by one or more fields. Use `+` for ascending and `-` for descending order. **Available fields:** - `run_id` - `application_id` - `version_number` - `custom_metadata` - `submitted_at` - `submitted_by` - `terminated_at` - `termination_reason` **Examples:** - `?sort=submitted_at` - Sort by creation time (ascending) - `?sort=-submitted_at` - Sort by creation time (descending) - `?sort=state&sort=-submitted_at` - Sort by state, then by time (descending)
|
|
765
771
|
* @param {*} [options] Override http request option.
|
|
766
772
|
* @throws {RequiredError}
|
|
767
773
|
*/
|
|
768
|
-
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 = {}) => {
|
|
769
775
|
const localVarPath = `/v1/runs`;
|
|
770
776
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
771
777
|
let baseOptions;
|
|
@@ -794,6 +800,12 @@ var PublicApiAxiosParamCreator = function(configuration) {
|
|
|
794
800
|
if (pageSize !== void 0) {
|
|
795
801
|
localVarQueryParameter["page_size"] = pageSize;
|
|
796
802
|
}
|
|
803
|
+
if (submittedBy !== void 0) {
|
|
804
|
+
localVarQueryParameter["submitted_by"] = submittedBy;
|
|
805
|
+
}
|
|
806
|
+
if (organizationId !== void 0) {
|
|
807
|
+
localVarQueryParameter["organization_id"] = organizationId;
|
|
808
|
+
}
|
|
797
809
|
if (forOrganization !== void 0) {
|
|
798
810
|
localVarQueryParameter["for_organization"] = forOrganization;
|
|
799
811
|
}
|
|
@@ -1264,6 +1276,7 @@ var PublicApiFp = function(configuration) {
|
|
|
1264
1276
|
* @param {string | null} [resourceId]
|
|
1265
1277
|
* @param {SubjectType | null} [subjectType]
|
|
1266
1278
|
* @param {string | null} [subjectId]
|
|
1279
|
+
* @param {Array<GrantRelation> | null} [relation] Filter grants by relation type. Can be specified multiple times.
|
|
1267
1280
|
* @param {boolean | null} [revoked]
|
|
1268
1281
|
* @param {number} [page]
|
|
1269
1282
|
* @param {number} [pageSize]
|
|
@@ -1271,8 +1284,8 @@ var PublicApiFp = function(configuration) {
|
|
|
1271
1284
|
* @param {*} [options] Override http request option.
|
|
1272
1285
|
* @throws {RequiredError}
|
|
1273
1286
|
*/
|
|
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);
|
|
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);
|
|
1276
1289
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1277
1290
|
const localVarOperationServerBasePath = operationServerMap["PublicApi.listGrantsV1AccessGrantsGet"]?.[localVarOperationServerIndex]?.url;
|
|
1278
1291
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -1308,13 +1321,15 @@ var PublicApiFp = function(configuration) {
|
|
|
1308
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**: `$.study` - Runs that have a study field defined - **Exact value match**: `$.study ? (@ == \"high\")` - Runs with specific study value - **Numeric comparison**: `$.confidence_score ? (@ > 0.75)` - Runs with confidence score greater than 0.75 - **Array operations**: `$.tags[*] ? (@ == \"draft\")` - Runs with tags array containing \"draft\" - **Complex conditions**: `$.resources ? (@.gpu_count > 2 && @.memory_gb >= 16)` - Runs with high resource requirements #### Examples (URL-Encoded Format): - **Field existence**: `%24.study` - **Exact value match**: `%24.study%20%3F%20(%40%20%3D%3D%20%22high%22)` - **Numeric comparison**: `%24.confidence_score%20%3F%20(%40%20%3E%200.75)` - **Array operations**: `%24.tags%5B*%5D%20%3F%20(%40%20%3D%3D%20%22draft%22)` - **Complex conditions**: `%24.resources%20%3F%20(%40.gpu_count%20%3E%202%20%26%26%20%40.memory_gb%20%3E%3D%2016)` #### Notes - JSONPath expressions are evaluated using PostgreSQL\'s `@?` operator - The `$.` prefix is automatically added to root-level field references if missing - String values in conditions must be enclosed in double quotes - Use `&&` for AND operations and `||` for OR operations - Regular expressions use `like_regex` with standard regex syntax - **Please remember to URL-encode the entire JSONPath expression when making HTTP requests**
|
|
1309
1322
|
* @param {number} [page]
|
|
1310
1323
|
* @param {number} [pageSize]
|
|
1324
|
+
* @param {string | null} [submittedBy] Filter runs by the user who submitted them. Use the special value `me` 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 `my_org` to filter by the current user\'s organization.
|
|
1311
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\'s own runs.
|
|
1312
1327
|
* @param {Array<string> | null} [sort] Sort the results by one or more fields. Use `+` for ascending and `-` for descending order. **Available fields:** - `run_id` - `application_id` - `version_number` - `custom_metadata` - `submitted_at` - `submitted_by` - `terminated_at` - `termination_reason` **Examples:** - `?sort=submitted_at` - Sort by creation time (ascending) - `?sort=-submitted_at` - Sort by creation time (descending) - `?sort=state&sort=-submitted_at` - Sort by state, then by time (descending)
|
|
1313
1328
|
* @param {*} [options] Override http request option.
|
|
1314
1329
|
* @throws {RequiredError}
|
|
1315
1330
|
*/
|
|
1316
|
-
async listRunsV1RunsGet(applicationId, applicationVersion, externalId, customMetadata, page, pageSize, forOrganization, sort, options) {
|
|
1317
|
-
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);
|
|
1318
1333
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1319
1334
|
const localVarOperationServerBasePath = operationServerMap["PublicApi.listRunsV1RunsGet"]?.[localVarOperationServerIndex]?.url;
|
|
1320
1335
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -1591,7 +1606,7 @@ var PublicApiFactory = function(configuration, basePath, axios) {
|
|
|
1591
1606
|
* @throws {RequiredError}
|
|
1592
1607
|
*/
|
|
1593
1608
|
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));
|
|
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));
|
|
1595
1610
|
},
|
|
1596
1611
|
/**
|
|
1597
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
|
|
@@ -1611,7 +1626,7 @@ var PublicApiFactory = function(configuration, basePath, axios) {
|
|
|
1611
1626
|
* @throws {RequiredError}
|
|
1612
1627
|
*/
|
|
1613
1628
|
listRunsV1RunsGet(requestParameters = {}, options) {
|
|
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));
|
|
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));
|
|
1615
1630
|
},
|
|
1616
1631
|
/**
|
|
1617
1632
|
* List share tokens. Service and Superadmin see all tokens; other users see only their own.
|
|
@@ -1870,7 +1885,7 @@ var PublicApi = class extends BaseAPI {
|
|
|
1870
1885
|
* @memberof PublicApi
|
|
1871
1886
|
*/
|
|
1872
1887
|
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));
|
|
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));
|
|
1874
1889
|
}
|
|
1875
1890
|
/**
|
|
1876
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
|
|
@@ -1892,7 +1907,7 @@ var PublicApi = class extends BaseAPI {
|
|
|
1892
1907
|
* @memberof PublicApi
|
|
1893
1908
|
*/
|
|
1894
1909
|
listRunsV1RunsGet(requestParameters = {}, options) {
|
|
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));
|
|
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));
|
|
1896
1911
|
}
|
|
1897
1912
|
/**
|
|
1898
1913
|
* List share tokens. Service and Superadmin see all tokens; other users see only their own.
|
|
@@ -2161,23 +2176,33 @@ function getRunProgress(run) {
|
|
|
2161
2176
|
return Math.round(processed / item_count * 100);
|
|
2162
2177
|
}
|
|
2163
2178
|
function getRunStatus(run) {
|
|
2164
|
-
const { state,
|
|
2179
|
+
const { state, termination_reason, output } = run;
|
|
2165
2180
|
switch (state) {
|
|
2166
2181
|
case "PENDING":
|
|
2167
2182
|
return "PENDING";
|
|
2168
2183
|
case "PROCESSING":
|
|
2169
2184
|
return "PROCESSING";
|
|
2170
2185
|
case "TERMINATED":
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
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";
|
|
2179
2203
|
}
|
|
2180
|
-
|
|
2204
|
+
default:
|
|
2205
|
+
return "UNKNOWN";
|
|
2181
2206
|
}
|
|
2182
2207
|
}
|
|
2183
2208
|
var canDownloadRunItems = (run) => {
|
|
@@ -2199,6 +2224,12 @@ var processApplicationRun = (run) => {
|
|
|
2199
2224
|
var canDownloadItem = (item) => {
|
|
2200
2225
|
return getItemStatus(item) === "COMPLETED";
|
|
2201
2226
|
};
|
|
2227
|
+
var ERROR_TERMINATION_REASONS = /* @__PURE__ */ new Set([
|
|
2228
|
+
"CANCELED_BY_SYSTEM",
|
|
2229
|
+
"CANCELED_BY_USER",
|
|
2230
|
+
"SYSTEM_ERROR",
|
|
2231
|
+
"USER_ERROR"
|
|
2232
|
+
]);
|
|
2202
2233
|
function getItemStatus(item) {
|
|
2203
2234
|
const { state, termination_reason } = item;
|
|
2204
2235
|
switch (state) {
|
|
@@ -2207,13 +2238,19 @@ function getItemStatus(item) {
|
|
|
2207
2238
|
case "PROCESSING":
|
|
2208
2239
|
return "PROCESSING";
|
|
2209
2240
|
case "TERMINATED":
|
|
2210
|
-
if (termination_reason
|
|
2241
|
+
if (!termination_reason) {
|
|
2242
|
+
return "UNKNOWN";
|
|
2243
|
+
}
|
|
2244
|
+
if (ERROR_TERMINATION_REASONS.has(termination_reason)) {
|
|
2211
2245
|
return "FAILED";
|
|
2212
2246
|
}
|
|
2213
2247
|
if (termination_reason === "SKIPPED") {
|
|
2214
2248
|
return "SKIPPED";
|
|
2215
2249
|
}
|
|
2216
|
-
|
|
2250
|
+
if (termination_reason === "SUCCEEDED") {
|
|
2251
|
+
return "COMPLETED";
|
|
2252
|
+
}
|
|
2253
|
+
return "UNKNOWN";
|
|
2217
2254
|
}
|
|
2218
2255
|
}
|
|
2219
2256
|
|