@aignostics/sdk 3.0.0 → 3.1.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.1.0.tgz +0 -0
- package/dist/{api-3iWGLFaA.d.cts → api-CZ17GBr_.d.cts} +108 -71
- package/dist/{api-3iWGLFaA.d.ts → api-CZ17GBr_.d.ts} +108 -71
- package/dist/index.cjs +87 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -3
- package/dist/index.d.ts +33 -3
- package/dist/index.js +87 -47
- package/dist/index.js.map +1 -1
- package/dist/test-utils/http-mocks.cjs +58 -0
- package/dist/test-utils/http-mocks.cjs.map +1 -1
- package/dist/test-utils/http-mocks.d.cts +5 -1
- package/dist/test-utils/http-mocks.d.ts +5 -1
- package/dist/test-utils/http-mocks.js +58 -0
- package/dist/test-utils/http-mocks.js.map +1 -1
- package/package.json +1 -1
- package/dist/aignostics-sdk-3.0.0.tgz +0 -0
|
@@ -2,7 +2,7 @@ import * as msw_node from 'msw/node';
|
|
|
2
2
|
import * as msw from 'msw';
|
|
3
3
|
import * as fishery from 'fishery';
|
|
4
4
|
import { Factory } from 'fishery';
|
|
5
|
-
import { A as ApplicationReadShortResponse, a as ApplicationReadResponse, R as RunReadResponse, c as RunCreationResponse, I as ItemResultReadResponse, d as ApplicationVersion, o as OutputArtifactResultReadResponse } from '../api-
|
|
5
|
+
import { A as ApplicationReadShortResponse, a as ApplicationReadResponse, V as VersionReadResponse, R as RunReadResponse, c as RunCreationResponse, I as ItemResultReadResponse, d as ApplicationVersion, i as InputArtifact, o as OutputArtifact, p as OutputArtifactResultReadResponse } from '../api-CZ17GBr_.cjs';
|
|
6
6
|
import 'axios';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -12,6 +12,7 @@ declare const mockResponses: {
|
|
|
12
12
|
applicationsSuccess: ApplicationReadShortResponse[];
|
|
13
13
|
applicationsEmpty: never[];
|
|
14
14
|
applicationSuccess: ApplicationReadResponse;
|
|
15
|
+
versionDetailsSuccess: VersionReadResponse;
|
|
15
16
|
applicationRunsSuccess: RunReadResponse[];
|
|
16
17
|
runSuccess: RunReadResponse;
|
|
17
18
|
createRunSuccess: RunCreationResponse;
|
|
@@ -33,6 +34,9 @@ declare const factories: {
|
|
|
33
34
|
applicationShort: Factory<ApplicationReadShortResponse, any, ApplicationReadShortResponse, fishery.DeepPartialObject<ApplicationReadShortResponse>>;
|
|
34
35
|
application: Factory<ApplicationReadResponse, any, ApplicationReadResponse, fishery.DeepPartialObject<ApplicationReadResponse>>;
|
|
35
36
|
applicationVersion: Factory<ApplicationVersion, any, ApplicationVersion, fishery.DeepPartialObject<ApplicationVersion>>;
|
|
37
|
+
versionDetails: Factory<VersionReadResponse, any, VersionReadResponse, fishery.DeepPartialObject<VersionReadResponse>>;
|
|
38
|
+
inputArtifact: Factory<InputArtifact, any, InputArtifact, fishery.DeepPartialObject<InputArtifact>>;
|
|
39
|
+
outputArtifactSchema: Factory<OutputArtifact, any, OutputArtifact, fishery.DeepPartialObject<OutputArtifact>>;
|
|
36
40
|
run: Factory<RunReadResponse, any, RunReadResponse, fishery.DeepPartialObject<RunReadResponse>>;
|
|
37
41
|
runCreationResponse: Factory<RunCreationResponse, any, RunCreationResponse, fishery.DeepPartialObject<RunCreationResponse>>;
|
|
38
42
|
itemResult: Factory<ItemResultReadResponse, any, ItemResultReadResponse, fishery.DeepPartialObject<ItemResultReadResponse>>;
|
|
@@ -2,7 +2,7 @@ import * as msw_node from 'msw/node';
|
|
|
2
2
|
import * as msw from 'msw';
|
|
3
3
|
import * as fishery from 'fishery';
|
|
4
4
|
import { Factory } from 'fishery';
|
|
5
|
-
import { A as ApplicationReadShortResponse, a as ApplicationReadResponse, R as RunReadResponse, c as RunCreationResponse, I as ItemResultReadResponse, d as ApplicationVersion, o as OutputArtifactResultReadResponse } from '../api-
|
|
5
|
+
import { A as ApplicationReadShortResponse, a as ApplicationReadResponse, V as VersionReadResponse, R as RunReadResponse, c as RunCreationResponse, I as ItemResultReadResponse, d as ApplicationVersion, i as InputArtifact, o as OutputArtifact, p as OutputArtifactResultReadResponse } from '../api-CZ17GBr_.js';
|
|
6
6
|
import 'axios';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -12,6 +12,7 @@ declare const mockResponses: {
|
|
|
12
12
|
applicationsSuccess: ApplicationReadShortResponse[];
|
|
13
13
|
applicationsEmpty: never[];
|
|
14
14
|
applicationSuccess: ApplicationReadResponse;
|
|
15
|
+
versionDetailsSuccess: VersionReadResponse;
|
|
15
16
|
applicationRunsSuccess: RunReadResponse[];
|
|
16
17
|
runSuccess: RunReadResponse;
|
|
17
18
|
createRunSuccess: RunCreationResponse;
|
|
@@ -33,6 +34,9 @@ declare const factories: {
|
|
|
33
34
|
applicationShort: Factory<ApplicationReadShortResponse, any, ApplicationReadShortResponse, fishery.DeepPartialObject<ApplicationReadShortResponse>>;
|
|
34
35
|
application: Factory<ApplicationReadResponse, any, ApplicationReadResponse, fishery.DeepPartialObject<ApplicationReadResponse>>;
|
|
35
36
|
applicationVersion: Factory<ApplicationVersion, any, ApplicationVersion, fishery.DeepPartialObject<ApplicationVersion>>;
|
|
37
|
+
versionDetails: Factory<VersionReadResponse, any, VersionReadResponse, fishery.DeepPartialObject<VersionReadResponse>>;
|
|
38
|
+
inputArtifact: Factory<InputArtifact, any, InputArtifact, fishery.DeepPartialObject<InputArtifact>>;
|
|
39
|
+
outputArtifactSchema: Factory<OutputArtifact, any, OutputArtifact, fishery.DeepPartialObject<OutputArtifact>>;
|
|
36
40
|
run: Factory<RunReadResponse, any, RunReadResponse, fishery.DeepPartialObject<RunReadResponse>>;
|
|
37
41
|
runCreationResponse: Factory<RunCreationResponse, any, RunCreationResponse, fishery.DeepPartialObject<RunCreationResponse>>;
|
|
38
42
|
itemResult: Factory<ItemResultReadResponse, any, ItemResultReadResponse, fishery.DeepPartialObject<ItemResultReadResponse>>;
|
|
@@ -21435,6 +21435,41 @@ var applicationFactory = Factory.define(() => ({
|
|
|
21435
21435
|
regulatory_classes: f2.helpers.arrayElements(["RUO", "IVDR", "FDA"], { min: 1, max: 2 }),
|
|
21436
21436
|
versions: applicationVersionFactory.buildList(f2.number.int({ min: 1, max: 3 }))
|
|
21437
21437
|
}));
|
|
21438
|
+
var inputArtifactFactory = Factory.define(() => ({
|
|
21439
|
+
name: f2.system.fileName(),
|
|
21440
|
+
mime_type: f2.helpers.arrayElement(["image/tiff", "image/jpeg", "image/png"]),
|
|
21441
|
+
metadata_schema: {
|
|
21442
|
+
type: "object",
|
|
21443
|
+
properties: {
|
|
21444
|
+
checksum_base64_crc32c: { type: "string" },
|
|
21445
|
+
mime_type: { type: "string" },
|
|
21446
|
+
height: { type: "integer" },
|
|
21447
|
+
width: { type: "integer" },
|
|
21448
|
+
mpp: { type: "number" }
|
|
21449
|
+
},
|
|
21450
|
+
required: ["checksum_base64_crc32c", "mime_type"]
|
|
21451
|
+
}
|
|
21452
|
+
}));
|
|
21453
|
+
var outputArtifactSchemaFactory = Factory.define(() => ({
|
|
21454
|
+
name: f2.system.fileName(),
|
|
21455
|
+
mime_type: f2.helpers.arrayElement(["application/json", "image/tiff", "text/csv"]),
|
|
21456
|
+
metadata_schema: {
|
|
21457
|
+
type: "object",
|
|
21458
|
+
properties: {
|
|
21459
|
+
mime_type: { type: "string" },
|
|
21460
|
+
size_bytes: { type: "integer" }
|
|
21461
|
+
}
|
|
21462
|
+
},
|
|
21463
|
+
scope: "ITEM",
|
|
21464
|
+
visibility: "EXTERNAL"
|
|
21465
|
+
}));
|
|
21466
|
+
var versionDetailsFactory = Factory.define(() => ({
|
|
21467
|
+
version_number: f2.system.semver(),
|
|
21468
|
+
changelog: f2.lorem.paragraph(),
|
|
21469
|
+
input_artifacts: inputArtifactFactory.buildList(f2.number.int({ min: 1, max: 3 })),
|
|
21470
|
+
output_artifacts: outputArtifactSchemaFactory.buildList(f2.number.int({ min: 1, max: 5 })),
|
|
21471
|
+
released_at: f2.date.past().toISOString()
|
|
21472
|
+
}));
|
|
21438
21473
|
var outputArtifactFactory = Factory.define(() => ({
|
|
21439
21474
|
output_artifact_id: f2.string.uuid(),
|
|
21440
21475
|
name: f2.system.fileName(),
|
|
@@ -21519,6 +21554,8 @@ var mockResponses = {
|
|
|
21519
21554
|
applicationsEmpty: [],
|
|
21520
21555
|
// Mock single application response
|
|
21521
21556
|
applicationSuccess: applicationFactory.build(),
|
|
21557
|
+
// Mock application version details response
|
|
21558
|
+
versionDetailsSuccess: versionDetailsFactory.build({ version_number: "v1.0.0" }),
|
|
21522
21559
|
// Mock application runs response
|
|
21523
21560
|
applicationRunsSuccess: runFactory.buildList(2),
|
|
21524
21561
|
// Mock single run response
|
|
@@ -21547,6 +21584,9 @@ var factories = {
|
|
|
21547
21584
|
applicationShort: applicationShortFactory,
|
|
21548
21585
|
application: applicationFactory,
|
|
21549
21586
|
applicationVersion: applicationVersionFactory,
|
|
21587
|
+
versionDetails: versionDetailsFactory,
|
|
21588
|
+
inputArtifact: inputArtifactFactory,
|
|
21589
|
+
outputArtifactSchema: outputArtifactSchemaFactory,
|
|
21550
21590
|
run: runFactory,
|
|
21551
21591
|
runCreationResponse: runCreationResponseFactory,
|
|
21552
21592
|
itemResult: itemResultFactory,
|
|
@@ -21561,6 +21601,9 @@ var handlers = {
|
|
|
21561
21601
|
http.get("*/v1/applications/:applicationId", () => {
|
|
21562
21602
|
return HttpResponse.json(mockResponses.applicationSuccess, { status: 200 });
|
|
21563
21603
|
}),
|
|
21604
|
+
http.get("*/v1/applications/:applicationId/versions/:version", () => {
|
|
21605
|
+
return HttpResponse.json(mockResponses.versionDetailsSuccess, { status: 200 });
|
|
21606
|
+
}),
|
|
21564
21607
|
http.get("*/v1/runs", () => {
|
|
21565
21608
|
return HttpResponse.json(mockResponses.applicationRunsSuccess, { status: 200 });
|
|
21566
21609
|
}),
|
|
@@ -21585,6 +21628,9 @@ var handlers = {
|
|
|
21585
21628
|
http.get("*/v1/applications/:applicationId", () => {
|
|
21586
21629
|
return HttpResponse.json(mockResponses.applicationSuccess, { status: 200 });
|
|
21587
21630
|
}),
|
|
21631
|
+
http.get("*/v1/applications/:applicationId/versions/:version", () => {
|
|
21632
|
+
return HttpResponse.json(mockResponses.versionDetailsSuccess, { status: 200 });
|
|
21633
|
+
}),
|
|
21588
21634
|
http.get("*/v1/runs", () => {
|
|
21589
21635
|
return HttpResponse.json([], { status: 200 });
|
|
21590
21636
|
}),
|
|
@@ -21600,6 +21646,9 @@ var handlers = {
|
|
|
21600
21646
|
http.get("*/v1/applications/:applicationId", () => {
|
|
21601
21647
|
return HttpResponse.json(mockResponses.error, { status: 404 });
|
|
21602
21648
|
}),
|
|
21649
|
+
http.get("*/v1/applications/:applicationId/versions/:version", () => {
|
|
21650
|
+
return HttpResponse.json(mockResponses.error, { status: 404 });
|
|
21651
|
+
}),
|
|
21603
21652
|
http.get("*/v1/runs", () => {
|
|
21604
21653
|
return HttpResponse.json(mockResponses.error, { status: 404 });
|
|
21605
21654
|
}),
|
|
@@ -21623,6 +21672,9 @@ var handlers = {
|
|
|
21623
21672
|
http.get("*/v1/applications/:applicationId", () => {
|
|
21624
21673
|
return HttpResponse.json(mockResponses.validationError, { status: 422 });
|
|
21625
21674
|
}),
|
|
21675
|
+
http.get("*/v1/applications/:applicationId/versions/:version", () => {
|
|
21676
|
+
return HttpResponse.json(mockResponses.validationError, { status: 422 });
|
|
21677
|
+
}),
|
|
21626
21678
|
http.get("*/v1/runs", () => {
|
|
21627
21679
|
return HttpResponse.json(mockResponses.validationError, { status: 422 });
|
|
21628
21680
|
}),
|
|
@@ -21646,6 +21698,9 @@ var handlers = {
|
|
|
21646
21698
|
http.get("*/v1/applications/:applicationId", () => {
|
|
21647
21699
|
return HttpResponse.json(mockResponses.error, { status: 500 });
|
|
21648
21700
|
}),
|
|
21701
|
+
http.get("*/v1/applications/:applicationId/versions/:version", () => {
|
|
21702
|
+
return HttpResponse.json(mockResponses.error, { status: 500 });
|
|
21703
|
+
}),
|
|
21649
21704
|
http.get("*/v1/runs", () => {
|
|
21650
21705
|
return HttpResponse.json(mockResponses.error, { status: 500 });
|
|
21651
21706
|
}),
|
|
@@ -21670,6 +21725,9 @@ var handlers = {
|
|
|
21670
21725
|
http.get("*/v1/applications/:applicationId", () => {
|
|
21671
21726
|
return HttpResponse.error();
|
|
21672
21727
|
}),
|
|
21728
|
+
http.get("*/v1/applications/:applicationId/versions/:version", () => {
|
|
21729
|
+
return HttpResponse.error();
|
|
21730
|
+
}),
|
|
21673
21731
|
http.get("*/v1/runs", () => {
|
|
21674
21732
|
return HttpResponse.error();
|
|
21675
21733
|
}),
|