@aignostics/sdk 2.3.1 → 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.
@@ -0,0 +1,69 @@
1
+ import * as msw_node from 'msw/node';
2
+ import * as msw from 'msw';
3
+ import * as fishery from 'fishery';
4
+ import { Factory } from 'fishery';
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
+ import 'axios';
7
+
8
+ /**
9
+ * Mock responses for API endpoints using factories
10
+ */
11
+ declare const mockResponses: {
12
+ applicationsSuccess: ApplicationReadShortResponse[];
13
+ applicationsEmpty: never[];
14
+ applicationSuccess: ApplicationReadResponse;
15
+ versionDetailsSuccess: VersionReadResponse;
16
+ applicationRunsSuccess: RunReadResponse[];
17
+ runSuccess: RunReadResponse;
18
+ createRunSuccess: RunCreationResponse;
19
+ runResultsSuccess: ItemResultReadResponse[];
20
+ error: {
21
+ error: string;
22
+ message: string;
23
+ statusCode: number;
24
+ };
25
+ validationError: {
26
+ detail: {
27
+ loc: string[];
28
+ type: string;
29
+ msg: string;
30
+ }[];
31
+ };
32
+ };
33
+ declare const factories: {
34
+ applicationShort: Factory<ApplicationReadShortResponse, any, ApplicationReadShortResponse, fishery.DeepPartialObject<ApplicationReadShortResponse>>;
35
+ application: Factory<ApplicationReadResponse, any, ApplicationReadResponse, fishery.DeepPartialObject<ApplicationReadResponse>>;
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>>;
40
+ run: Factory<RunReadResponse, any, RunReadResponse, fishery.DeepPartialObject<RunReadResponse>>;
41
+ runCreationResponse: Factory<RunCreationResponse, any, RunCreationResponse, fishery.DeepPartialObject<RunCreationResponse>>;
42
+ itemResult: Factory<ItemResultReadResponse, any, ItemResultReadResponse, fishery.DeepPartialObject<ItemResultReadResponse>>;
43
+ outputArtifact: Factory<OutputArtifactResultReadResponse, any, OutputArtifactResultReadResponse, fishery.DeepPartialObject<OutputArtifactResultReadResponse>>;
44
+ };
45
+ /**
46
+ * HTTP request handlers for different scenarios
47
+ */
48
+ declare const handlers: {
49
+ success: msw.HttpHandler[];
50
+ empty: msw.HttpHandler[];
51
+ notFoundError: msw.HttpHandler[];
52
+ validationError: msw.HttpHandler[];
53
+ internalServerError: msw.HttpHandler[];
54
+ networkError: msw.HttpHandler[];
55
+ };
56
+ /**
57
+ * Create a mock server with specific handlers
58
+ */
59
+ declare function createMockServer(handlerSet?: keyof typeof handlers): msw_node.SetupServerApi;
60
+ /**
61
+ * Default mock server for successful responses
62
+ */
63
+ declare const server: msw_node.SetupServerApi;
64
+ /**
65
+ * Helper function to reset handlers for a specific scenario
66
+ */
67
+ declare function setMockScenario(scenario: keyof typeof handlers): void;
68
+
69
+ export { createMockServer, factories, handlers, mockResponses, server, setMockScenario };
@@ -0,0 +1,69 @@
1
+ import * as msw_node from 'msw/node';
2
+ import * as msw from 'msw';
3
+ import * as fishery from 'fishery';
4
+ import { Factory } from 'fishery';
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
+ import 'axios';
7
+
8
+ /**
9
+ * Mock responses for API endpoints using factories
10
+ */
11
+ declare const mockResponses: {
12
+ applicationsSuccess: ApplicationReadShortResponse[];
13
+ applicationsEmpty: never[];
14
+ applicationSuccess: ApplicationReadResponse;
15
+ versionDetailsSuccess: VersionReadResponse;
16
+ applicationRunsSuccess: RunReadResponse[];
17
+ runSuccess: RunReadResponse;
18
+ createRunSuccess: RunCreationResponse;
19
+ runResultsSuccess: ItemResultReadResponse[];
20
+ error: {
21
+ error: string;
22
+ message: string;
23
+ statusCode: number;
24
+ };
25
+ validationError: {
26
+ detail: {
27
+ loc: string[];
28
+ type: string;
29
+ msg: string;
30
+ }[];
31
+ };
32
+ };
33
+ declare const factories: {
34
+ applicationShort: Factory<ApplicationReadShortResponse, any, ApplicationReadShortResponse, fishery.DeepPartialObject<ApplicationReadShortResponse>>;
35
+ application: Factory<ApplicationReadResponse, any, ApplicationReadResponse, fishery.DeepPartialObject<ApplicationReadResponse>>;
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>>;
40
+ run: Factory<RunReadResponse, any, RunReadResponse, fishery.DeepPartialObject<RunReadResponse>>;
41
+ runCreationResponse: Factory<RunCreationResponse, any, RunCreationResponse, fishery.DeepPartialObject<RunCreationResponse>>;
42
+ itemResult: Factory<ItemResultReadResponse, any, ItemResultReadResponse, fishery.DeepPartialObject<ItemResultReadResponse>>;
43
+ outputArtifact: Factory<OutputArtifactResultReadResponse, any, OutputArtifactResultReadResponse, fishery.DeepPartialObject<OutputArtifactResultReadResponse>>;
44
+ };
45
+ /**
46
+ * HTTP request handlers for different scenarios
47
+ */
48
+ declare const handlers: {
49
+ success: msw.HttpHandler[];
50
+ empty: msw.HttpHandler[];
51
+ notFoundError: msw.HttpHandler[];
52
+ validationError: msw.HttpHandler[];
53
+ internalServerError: msw.HttpHandler[];
54
+ networkError: msw.HttpHandler[];
55
+ };
56
+ /**
57
+ * Create a mock server with specific handlers
58
+ */
59
+ declare function createMockServer(handlerSet?: keyof typeof handlers): msw_node.SetupServerApi;
60
+ /**
61
+ * Default mock server for successful responses
62
+ */
63
+ declare const server: msw_node.SetupServerApi;
64
+ /**
65
+ * Helper function to reset handlers for a specific scenario
66
+ */
67
+ declare function setMockScenario(scenario: keyof typeof handlers): void;
68
+
69
+ export { createMockServer, factories, handlers, mockResponses, server, setMockScenario };