@harnessio/react-ti-service-client 0.3.3 → 0.3.4
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/ti-service/src/services/hooks/useTestCaseSummaryV2Query.d.ts +47 -0
- package/dist/ti-service/src/services/hooks/useTestCaseSummaryV2Query.js +14 -0
- package/dist/ti-service/src/services/index.d.ts +7 -0
- package/dist/ti-service/src/services/index.js +1 -0
- package/dist/ti-service/src/services/schemas/ItemSummary.d.ts +2 -0
- package/dist/ti-service/src/services/schemas/ReportOutput.d.ts +2 -0
- package/dist/ti-service/src/services/schemas/ResponseMetadata.d.ts +6 -0
- package/dist/ti-service/src/services/schemas/ResponseMetadata.js +4 -0
- package/dist/ti-service/src/services/schemas/Result.d.ts +16 -0
- package/dist/ti-service/src/services/schemas/Result.js +1 -0
- package/dist/ti-service/src/services/schemas/TestCase.d.ts +21 -0
- package/dist/ti-service/src/services/schemas/TestCase.js +1 -0
- package/dist/ti-service/src/services/schemas/TestCaseStatus.d.ts +4 -0
- package/dist/ti-service/src/services/schemas/TestCaseStatus.js +4 -0
- package/dist/ti-service/src/services/schemas/TestCases.d.ts +6 -0
- package/dist/ti-service/src/services/schemas/TestCases.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { TestCases } from '../schemas/TestCases';
|
|
3
|
+
import type { BadRequestResponse } from '../responses/BadRequestResponse';
|
|
4
|
+
import type { NotFoundResponse } from '../responses/NotFoundResponse';
|
|
5
|
+
import type { InternalErrorResponse } from '../responses/InternalErrorResponse';
|
|
6
|
+
import { FetcherOptions } from '../../../../custom-fetcher/index.js';
|
|
7
|
+
export interface TestCaseSummaryV2QueryQueryParams {
|
|
8
|
+
accountId: string;
|
|
9
|
+
orgId: string;
|
|
10
|
+
projectId: string;
|
|
11
|
+
pipelineId: string;
|
|
12
|
+
buildId: string;
|
|
13
|
+
stepId?: string;
|
|
14
|
+
stageId?: string;
|
|
15
|
+
report: 'junit';
|
|
16
|
+
suite_name?: string;
|
|
17
|
+
testCaseSearchTerm?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @default 100
|
|
20
|
+
*/
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
/**
|
|
23
|
+
* @default 0
|
|
24
|
+
*/
|
|
25
|
+
pageIndex?: number;
|
|
26
|
+
status?: 'failed';
|
|
27
|
+
flaky?: boolean;
|
|
28
|
+
sort?: 'class_name' | 'duration_ms' | 'name' | 'status';
|
|
29
|
+
/**
|
|
30
|
+
* @default "ASC"
|
|
31
|
+
*/
|
|
32
|
+
order?: 'ASC' | 'DESC';
|
|
33
|
+
}
|
|
34
|
+
export type TestCaseSummaryV2OkResponse = TestCases;
|
|
35
|
+
export type TestCaseSummaryV2ErrorResponse = BadRequestResponse | NotFoundResponse | InternalErrorResponse;
|
|
36
|
+
export interface TestCaseSummaryV2Props extends Omit<FetcherOptions<TestCaseSummaryV2QueryQueryParams, unknown>, 'url'> {
|
|
37
|
+
queryParams: TestCaseSummaryV2QueryQueryParams;
|
|
38
|
+
}
|
|
39
|
+
export interface TestCaseSummaryV2ResponseContainer {
|
|
40
|
+
body: TestCaseSummaryV2OkResponse;
|
|
41
|
+
headers: Headers;
|
|
42
|
+
}
|
|
43
|
+
export declare function testCaseSummaryV2(props: TestCaseSummaryV2Props): Promise<TestCaseSummaryV2ResponseContainer>;
|
|
44
|
+
/**
|
|
45
|
+
* Get test case details
|
|
46
|
+
*/
|
|
47
|
+
export declare function useTestCaseSummaryV2Query(props: TestCaseSummaryV2Props, options?: Omit<UseQueryOptions<TestCaseSummaryV2ResponseContainer, TestCaseSummaryV2ErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<TestCaseSummaryV2ResponseContainer, import("..").Error>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useQuery } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../custom-fetcher/index.js';
|
|
6
|
+
export function testCaseSummaryV2(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/reports/test_cases_v2`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get test case details
|
|
11
|
+
*/
|
|
12
|
+
export function useTestCaseSummaryV2Query(props, options) {
|
|
13
|
+
return useQuery(['testCaseSummaryV2', props.queryParams], ({ signal }) => testCaseSummaryV2(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -8,6 +8,8 @@ export type { ReportsInfoErrorResponse, ReportsInfoOkResponse, ReportsInfoProps,
|
|
|
8
8
|
export { reportsInfo, useReportsInfoQuery } from './hooks/useReportsInfoQuery';
|
|
9
9
|
export type { SearchCoverageFilesErrorResponse, SearchCoverageFilesOkResponse, SearchCoverageFilesProps, SearchCoverageFilesQueryPathParams, SearchCoverageFilesQueryQueryParams, } from './hooks/useSearchCoverageFilesQuery';
|
|
10
10
|
export { searchCoverageFiles, useSearchCoverageFilesQuery, } from './hooks/useSearchCoverageFilesQuery';
|
|
11
|
+
export type { TestCaseSummaryV2ErrorResponse, TestCaseSummaryV2OkResponse, TestCaseSummaryV2Props, TestCaseSummaryV2QueryQueryParams, } from './hooks/useTestCaseSummaryV2Query';
|
|
12
|
+
export { testCaseSummaryV2, useTestCaseSummaryV2Query } from './hooks/useTestCaseSummaryV2Query';
|
|
11
13
|
export type { TestInfoErrorResponse, TestInfoOkResponse, TestInfoProps, TestInfoQueryQueryParams, } from './hooks/useTestInfoQuery';
|
|
12
14
|
export { testInfo, useTestInfoQuery } from './hooks/useTestInfoQuery';
|
|
13
15
|
export type { TestOverviewErrorResponse, TestOverviewOkResponse, TestOverviewProps, TestOverviewQueryQueryParams, } from './hooks/useTestOverviewQuery';
|
|
@@ -22,8 +24,13 @@ export type { Error } from './schemas/Error';
|
|
|
22
24
|
export type { ItemSummary } from './schemas/ItemSummary';
|
|
23
25
|
export type { PipelineExecutionReport } from './schemas/PipelineExecutionReport';
|
|
24
26
|
export type { ReportOutput } from './schemas/ReportOutput';
|
|
27
|
+
export type { ResponseMetadata } from './schemas/ResponseMetadata';
|
|
28
|
+
export type { Result } from './schemas/Result';
|
|
25
29
|
export type { SearchResults } from './schemas/SearchResults';
|
|
26
30
|
export type { SelectionDetails } from './schemas/SelectionDetails';
|
|
27
31
|
export type { SelectionOverview } from './schemas/SelectionOverview';
|
|
28
32
|
export type { StepInfo } from './schemas/StepInfo';
|
|
33
|
+
export type { TestCase } from './schemas/TestCase';
|
|
34
|
+
export type { TestCaseStatus } from './schemas/TestCaseStatus';
|
|
35
|
+
export type { TestCases } from './schemas/TestCases';
|
|
29
36
|
export type { TestReportSummary } from './schemas/TestReportSummary';
|
|
@@ -3,5 +3,6 @@ export { getToken, useGetTokenQuery } from './hooks/useGetTokenQuery';
|
|
|
3
3
|
export { reportSummary, useReportSummaryQuery } from './hooks/useReportSummaryQuery';
|
|
4
4
|
export { reportsInfo, useReportsInfoQuery } from './hooks/useReportsInfoQuery';
|
|
5
5
|
export { searchCoverageFiles, useSearchCoverageFilesQuery, } from './hooks/useSearchCoverageFilesQuery';
|
|
6
|
+
export { testCaseSummaryV2, useTestCaseSummaryV2Query } from './hooks/useTestCaseSummaryV2Query';
|
|
6
7
|
export { testInfo, useTestInfoQuery } from './hooks/useTestInfoQuery';
|
|
7
8
|
export { testOverview, useTestOverviewQuery } from './hooks/useTestOverviewQuery';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ItemSummary } from '../schemas/ItemSummary';
|
|
2
2
|
import type { CoverageSummary } from '../schemas/CoverageSummary';
|
|
3
3
|
export interface ReportOutput {
|
|
4
|
+
git_ref?: string;
|
|
5
|
+
is_harness_code?: boolean;
|
|
4
6
|
items?: ItemSummary[];
|
|
5
7
|
lines?: Array<number[]>;
|
|
6
8
|
path?: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TestCaseStatus } from '../schemas/TestCaseStatus';
|
|
2
|
+
export interface Result {
|
|
3
|
+
/**
|
|
4
|
+
* Description corresponding to the test case status
|
|
5
|
+
*/
|
|
6
|
+
desc?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Message corresponding to the test case status
|
|
9
|
+
*/
|
|
10
|
+
message?: string;
|
|
11
|
+
status?: TestCaseStatus;
|
|
12
|
+
/**
|
|
13
|
+
* Type corresponding to the test case status
|
|
14
|
+
*/
|
|
15
|
+
type?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Result } from '../schemas/Result';
|
|
2
|
+
export interface TestCase {
|
|
3
|
+
class_name?: string;
|
|
4
|
+
/**
|
|
5
|
+
* @format int64
|
|
6
|
+
*/
|
|
7
|
+
duration_ms?: number;
|
|
8
|
+
file_name?: string;
|
|
9
|
+
flaky?: boolean;
|
|
10
|
+
name?: string;
|
|
11
|
+
result?: Result;
|
|
12
|
+
/**
|
|
13
|
+
* (Truncated) stderr while running the test
|
|
14
|
+
*/
|
|
15
|
+
stderr?: string;
|
|
16
|
+
/**
|
|
17
|
+
* (Truncated) stdout while running the test
|
|
18
|
+
*/
|
|
19
|
+
stdout?: string;
|
|
20
|
+
suite_name?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|