@aignostics/sdk 3.3.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/aignostics-sdk-3.5.0.tgz +0 -0
- package/dist/{api-CWohsFN3.d.cts → api-CrZaHZZr.d.cts} +1187 -23
- package/dist/{api-CWohsFN3.d.ts → api-CrZaHZZr.d.ts} +1187 -23
- package/dist/index.cjs +1211 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -2
- package/dist/index.d.ts +36 -2
- package/dist/index.js +1208 -26
- package/dist/index.js.map +1 -1
- package/dist/test-utils/http-mocks.cjs +26 -1
- package/dist/test-utils/http-mocks.cjs.map +1 -1
- package/dist/test-utils/http-mocks.d.cts +1 -1
- package/dist/test-utils/http-mocks.d.ts +1 -1
- package/dist/test-utils/http-mocks.js +26 -1
- package/dist/test-utils/http-mocks.js.map +1 -1
- package/package.json +2 -1
- package/dist/aignostics-sdk-3.3.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,
|
|
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-CrZaHZZr.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-CrZaHZZr.cjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -84,6 +84,7 @@ interface PlatformSDK {
|
|
|
84
84
|
terminationReason?: ItemTerminationReason;
|
|
85
85
|
}): Promise<ApplicationRunItem[]>;
|
|
86
86
|
getApplicationVersionDetails(applicationId: string, version: string): Promise<VersionReadResponse>;
|
|
87
|
+
downloadArtifact(runId: string, artifactId: string): Promise<ArrayBuffer>;
|
|
87
88
|
}
|
|
88
89
|
/**
|
|
89
90
|
* Main SDK class for interacting with the Aignostics Platform
|
|
@@ -419,6 +420,39 @@ declare class PlatformSDKHttp implements PlatformSDK {
|
|
|
419
420
|
* ```
|
|
420
421
|
*/
|
|
421
422
|
getConfig(): PlatformSDKConfig;
|
|
423
|
+
/**
|
|
424
|
+
* Download an artifact file from a completed application run
|
|
425
|
+
*
|
|
426
|
+
* This method retrieves the binary content of a specific artifact produced
|
|
427
|
+
* during an application run. Artifacts can include generated reports, processed
|
|
428
|
+
* images, or other output files from the AI model execution.
|
|
429
|
+
*
|
|
430
|
+
* The download is performed with automatic retries for transient failures.
|
|
431
|
+
* Non-retryable HTTP status codes (403, 404, 410, 422) will abort immediately.
|
|
432
|
+
*
|
|
433
|
+
* @param runId - The unique identifier of the application run
|
|
434
|
+
* @param artifactId - The unique identifier of the artifact to download
|
|
435
|
+
* @returns A promise that resolves to an ArrayBuffer containing the artifact's binary content
|
|
436
|
+
* @throws {AuthenticationError} If no valid authentication token is available
|
|
437
|
+
* @throws {APIError} If the API request fails (e.g., 403, 404, 410, 422, or other HTTP errors)
|
|
438
|
+
* @throws {UnexpectedError} If a non-HTTP error occurs
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* ```typescript
|
|
442
|
+
* const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
|
|
443
|
+
*
|
|
444
|
+
* try {
|
|
445
|
+
* const buffer = await sdk.downloadArtifact('run-123', 'artifact-456');
|
|
446
|
+
* console.log(`Downloaded ${buffer.byteLength} bytes`);
|
|
447
|
+
*
|
|
448
|
+
* // Write to file (Node.js)
|
|
449
|
+
* fs.writeFileSync('output.bin', Buffer.from(buffer));
|
|
450
|
+
* } catch (error) {
|
|
451
|
+
* console.error('Failed to download artifact:', error.message);
|
|
452
|
+
* }
|
|
453
|
+
* ```
|
|
454
|
+
*/
|
|
455
|
+
downloadArtifact(runId: string, artifactId: string): Promise<ArrayBuffer>;
|
|
422
456
|
}
|
|
423
457
|
|
|
424
458
|
type ErrorCode = 'AUTHENTICATION_ERROR' | 'API_ERROR' | 'CONFIGURATION_ERROR' | 'UNEXPECTED_ERROR';
|
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,
|
|
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-CrZaHZZr.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-CrZaHZZr.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -84,6 +84,7 @@ interface PlatformSDK {
|
|
|
84
84
|
terminationReason?: ItemTerminationReason;
|
|
85
85
|
}): Promise<ApplicationRunItem[]>;
|
|
86
86
|
getApplicationVersionDetails(applicationId: string, version: string): Promise<VersionReadResponse>;
|
|
87
|
+
downloadArtifact(runId: string, artifactId: string): Promise<ArrayBuffer>;
|
|
87
88
|
}
|
|
88
89
|
/**
|
|
89
90
|
* Main SDK class for interacting with the Aignostics Platform
|
|
@@ -419,6 +420,39 @@ declare class PlatformSDKHttp implements PlatformSDK {
|
|
|
419
420
|
* ```
|
|
420
421
|
*/
|
|
421
422
|
getConfig(): PlatformSDKConfig;
|
|
423
|
+
/**
|
|
424
|
+
* Download an artifact file from a completed application run
|
|
425
|
+
*
|
|
426
|
+
* This method retrieves the binary content of a specific artifact produced
|
|
427
|
+
* during an application run. Artifacts can include generated reports, processed
|
|
428
|
+
* images, or other output files from the AI model execution.
|
|
429
|
+
*
|
|
430
|
+
* The download is performed with automatic retries for transient failures.
|
|
431
|
+
* Non-retryable HTTP status codes (403, 404, 410, 422) will abort immediately.
|
|
432
|
+
*
|
|
433
|
+
* @param runId - The unique identifier of the application run
|
|
434
|
+
* @param artifactId - The unique identifier of the artifact to download
|
|
435
|
+
* @returns A promise that resolves to an ArrayBuffer containing the artifact's binary content
|
|
436
|
+
* @throws {AuthenticationError} If no valid authentication token is available
|
|
437
|
+
* @throws {APIError} If the API request fails (e.g., 403, 404, 410, 422, or other HTTP errors)
|
|
438
|
+
* @throws {UnexpectedError} If a non-HTTP error occurs
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* ```typescript
|
|
442
|
+
* const sdk = new PlatformSDKHttp({ tokenProvider: () => 'your-token' });
|
|
443
|
+
*
|
|
444
|
+
* try {
|
|
445
|
+
* const buffer = await sdk.downloadArtifact('run-123', 'artifact-456');
|
|
446
|
+
* console.log(`Downloaded ${buffer.byteLength} bytes`);
|
|
447
|
+
*
|
|
448
|
+
* // Write to file (Node.js)
|
|
449
|
+
* fs.writeFileSync('output.bin', Buffer.from(buffer));
|
|
450
|
+
* } catch (error) {
|
|
451
|
+
* console.error('Failed to download artifact:', error.message);
|
|
452
|
+
* }
|
|
453
|
+
* ```
|
|
454
|
+
*/
|
|
455
|
+
downloadArtifact(runId: string, artifactId: string): Promise<ArrayBuffer>;
|
|
422
456
|
}
|
|
423
457
|
|
|
424
458
|
type ErrorCode = 'AUTHENTICATION_ERROR' | 'API_ERROR' | 'CONFIGURATION_ERROR' | 'UNEXPECTED_ERROR';
|