@aignostics/sdk 3.0.0 → 3.2.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.
@@ -21444,6 +21444,41 @@ var applicationFactory = Factory.define(() => ({
21444
21444
  regulatory_classes: f2.helpers.arrayElements(["RUO", "IVDR", "FDA"], { min: 1, max: 2 }),
21445
21445
  versions: applicationVersionFactory.buildList(f2.number.int({ min: 1, max: 3 }))
21446
21446
  }));
21447
+ var inputArtifactFactory = Factory.define(() => ({
21448
+ name: f2.system.fileName(),
21449
+ mime_type: f2.helpers.arrayElement(["image/tiff", "image/jpeg", "image/png"]),
21450
+ metadata_schema: {
21451
+ type: "object",
21452
+ properties: {
21453
+ checksum_base64_crc32c: { type: "string" },
21454
+ mime_type: { type: "string" },
21455
+ height: { type: "integer" },
21456
+ width: { type: "integer" },
21457
+ mpp: { type: "number" }
21458
+ },
21459
+ required: ["checksum_base64_crc32c", "mime_type"]
21460
+ }
21461
+ }));
21462
+ var outputArtifactSchemaFactory = Factory.define(() => ({
21463
+ name: f2.system.fileName(),
21464
+ mime_type: f2.helpers.arrayElement(["application/json", "image/tiff", "text/csv"]),
21465
+ metadata_schema: {
21466
+ type: "object",
21467
+ properties: {
21468
+ mime_type: { type: "string" },
21469
+ size_bytes: { type: "integer" }
21470
+ }
21471
+ },
21472
+ scope: "ITEM",
21473
+ visibility: "EXTERNAL"
21474
+ }));
21475
+ var versionDetailsFactory = Factory.define(() => ({
21476
+ version_number: f2.system.semver(),
21477
+ changelog: f2.lorem.paragraph(),
21478
+ input_artifacts: inputArtifactFactory.buildList(f2.number.int({ min: 1, max: 3 })),
21479
+ output_artifacts: outputArtifactSchemaFactory.buildList(f2.number.int({ min: 1, max: 5 })),
21480
+ released_at: f2.date.past().toISOString()
21481
+ }));
21447
21482
  var outputArtifactFactory = Factory.define(() => ({
21448
21483
  output_artifact_id: f2.string.uuid(),
21449
21484
  name: f2.system.fileName(),
@@ -21528,6 +21563,8 @@ var mockResponses = {
21528
21563
  applicationsEmpty: [],
21529
21564
  // Mock single application response
21530
21565
  applicationSuccess: applicationFactory.build(),
21566
+ // Mock application version details response
21567
+ versionDetailsSuccess: versionDetailsFactory.build({ version_number: "v1.0.0" }),
21531
21568
  // Mock application runs response
21532
21569
  applicationRunsSuccess: runFactory.buildList(2),
21533
21570
  // Mock single run response
@@ -21556,6 +21593,9 @@ var factories = {
21556
21593
  applicationShort: applicationShortFactory,
21557
21594
  application: applicationFactory,
21558
21595
  applicationVersion: applicationVersionFactory,
21596
+ versionDetails: versionDetailsFactory,
21597
+ inputArtifact: inputArtifactFactory,
21598
+ outputArtifactSchema: outputArtifactSchemaFactory,
21559
21599
  run: runFactory,
21560
21600
  runCreationResponse: runCreationResponseFactory,
21561
21601
  itemResult: itemResultFactory,
@@ -21570,6 +21610,9 @@ var handlers = {
21570
21610
  http.get("*/v1/applications/:applicationId", () => {
21571
21611
  return HttpResponse.json(mockResponses.applicationSuccess, { status: 200 });
21572
21612
  }),
21613
+ http.get("*/v1/applications/:applicationId/versions/:version", () => {
21614
+ return HttpResponse.json(mockResponses.versionDetailsSuccess, { status: 200 });
21615
+ }),
21573
21616
  http.get("*/v1/runs", () => {
21574
21617
  return HttpResponse.json(mockResponses.applicationRunsSuccess, { status: 200 });
21575
21618
  }),
@@ -21594,6 +21637,9 @@ var handlers = {
21594
21637
  http.get("*/v1/applications/:applicationId", () => {
21595
21638
  return HttpResponse.json(mockResponses.applicationSuccess, { status: 200 });
21596
21639
  }),
21640
+ http.get("*/v1/applications/:applicationId/versions/:version", () => {
21641
+ return HttpResponse.json(mockResponses.versionDetailsSuccess, { status: 200 });
21642
+ }),
21597
21643
  http.get("*/v1/runs", () => {
21598
21644
  return HttpResponse.json([], { status: 200 });
21599
21645
  }),
@@ -21609,6 +21655,9 @@ var handlers = {
21609
21655
  http.get("*/v1/applications/:applicationId", () => {
21610
21656
  return HttpResponse.json(mockResponses.error, { status: 404 });
21611
21657
  }),
21658
+ http.get("*/v1/applications/:applicationId/versions/:version", () => {
21659
+ return HttpResponse.json(mockResponses.error, { status: 404 });
21660
+ }),
21612
21661
  http.get("*/v1/runs", () => {
21613
21662
  return HttpResponse.json(mockResponses.error, { status: 404 });
21614
21663
  }),
@@ -21632,6 +21681,9 @@ var handlers = {
21632
21681
  http.get("*/v1/applications/:applicationId", () => {
21633
21682
  return HttpResponse.json(mockResponses.validationError, { status: 422 });
21634
21683
  }),
21684
+ http.get("*/v1/applications/:applicationId/versions/:version", () => {
21685
+ return HttpResponse.json(mockResponses.validationError, { status: 422 });
21686
+ }),
21635
21687
  http.get("*/v1/runs", () => {
21636
21688
  return HttpResponse.json(mockResponses.validationError, { status: 422 });
21637
21689
  }),
@@ -21655,6 +21707,9 @@ var handlers = {
21655
21707
  http.get("*/v1/applications/:applicationId", () => {
21656
21708
  return HttpResponse.json(mockResponses.error, { status: 500 });
21657
21709
  }),
21710
+ http.get("*/v1/applications/:applicationId/versions/:version", () => {
21711
+ return HttpResponse.json(mockResponses.error, { status: 500 });
21712
+ }),
21658
21713
  http.get("*/v1/runs", () => {
21659
21714
  return HttpResponse.json(mockResponses.error, { status: 500 });
21660
21715
  }),
@@ -21679,6 +21734,9 @@ var handlers = {
21679
21734
  http.get("*/v1/applications/:applicationId", () => {
21680
21735
  return HttpResponse.error();
21681
21736
  }),
21737
+ http.get("*/v1/applications/:applicationId/versions/:version", () => {
21738
+ return HttpResponse.error();
21739
+ }),
21682
21740
  http.get("*/v1/runs", () => {
21683
21741
  return HttpResponse.error();
21684
21742
  }),