@harnessio/react-ti-service-client 0.6.3 → 0.6.5
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/useGetExecutionCoverageReportQuery.d.ts +2 -1
- package/dist/ti-service/src/services/hooks/useGetExecutionCoverageReportQuery.js +1 -1
- package/dist/ti-service/src/services/hooks/useSetFlakyStatusMutation.d.ts +2 -1
- package/dist/ti-service/src/services/hooks/useSetFlakyStatusMutation.js +2 -1
- package/dist/ti-service/src/services/hooks/useSetQuarantineStatusMutation.d.ts +2 -1
- package/dist/ti-service/src/services/hooks/useSetQuarantineStatusMutation.js +2 -1
- package/dist/ti-service/src/services/index.d.ts +1 -0
- package/dist/ti-service/src/services/schemas/ItemSummary.d.ts +2 -0
- package/dist/ti-service/src/services/schemas/LinkedRepoSummary.d.ts +8 -0
- package/dist/ti-service/src/services/schemas/LinkedRepoSummary.js +4 -0
- package/dist/ti-service/src/services/schemas/ReportOutput.d.ts +2 -0
- package/dist/ti-service/src/services/schemas/TestMarkingRequest.d.ts +15 -7
- package/dist/ti-service/src/services/schemas/TestReportSummary.d.ts +12 -0
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ export interface GetExecutionCoverageReportQueryPathParams {
|
|
|
12
12
|
}
|
|
13
13
|
export interface GetExecutionCoverageReportQueryQueryParams {
|
|
14
14
|
accountId: string;
|
|
15
|
+
include_linked_repo?: boolean;
|
|
15
16
|
tag?: string[];
|
|
16
17
|
orgId: string;
|
|
17
18
|
projectId: string;
|
|
@@ -32,6 +33,6 @@ export interface GetExecutionCoverageReportResponseContainer {
|
|
|
32
33
|
}
|
|
33
34
|
export declare function getExecutionCoverageReport(props: GetExecutionCoverageReportProps): Promise<GetExecutionCoverageReportResponseContainer>;
|
|
34
35
|
/**
|
|
35
|
-
* Retrieve pipeline execution coverage data for a specific file path or directory tree. Use the tags parameter to filter coverage by specific tags.
|
|
36
|
+
* Retrieve pipeline execution coverage data for a specific file path or directory tree. Use the tags parameter to filter coverage by specific tags. Set include_linked_repo=true to attach linked Harness Code repositories (repo_id, repo_path, and importing) for non-Harness repos; provider context is resolved from the execution.
|
|
36
37
|
*/
|
|
37
38
|
export declare function useGetExecutionCoverageReportQuery(props: GetExecutionCoverageReportProps, options?: Omit<UseQueryOptions<GetExecutionCoverageReportResponseContainer, GetExecutionCoverageReportErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetExecutionCoverageReportResponseContainer, import("..").Error>;
|
|
@@ -7,7 +7,7 @@ export function getExecutionCoverageReport(props) {
|
|
|
7
7
|
return fetcher(Object.assign({ url: `/coverage/api/v1/accounts/${props.account_identifier}/executions/${props.execution_id}/tree/${props.tree_path}`, method: 'GET' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Retrieve pipeline execution coverage data for a specific file path or directory tree. Use the tags parameter to filter coverage by specific tags.
|
|
10
|
+
* Retrieve pipeline execution coverage data for a specific file path or directory tree. Use the tags parameter to filter coverage by specific tags. Set include_linked_repo=true to attach linked Harness Code repositories (repo_id, repo_path, and importing) for non-Harness repos; provider context is resolved from the execution.
|
|
11
11
|
*/
|
|
12
12
|
export function useGetExecutionCoverageReportQuery(props, options) {
|
|
13
13
|
return useQuery([
|
|
@@ -24,7 +24,8 @@ export interface SetFlakyStatusResponseContainer {
|
|
|
24
24
|
export declare function setFlakyStatus(props: SetFlakyStatusProps): Promise<SetFlakyStatusResponseContainer>;
|
|
25
25
|
export type SetFlakyStatusMutationProps<T extends keyof SetFlakyStatusProps> = Omit<SetFlakyStatusProps, T> & Partial<Pick<SetFlakyStatusProps, T>>;
|
|
26
26
|
/**
|
|
27
|
-
* Upserts the flaky marking for each test in the request body. A `marking` of `"true"` marks the test as flaky, `"false"` removes the marking, and `"unset"` clears any stored value.
|
|
27
|
+
* Upserts the flaky marking for each test in the request body. A `marking` of `"true"` (or boolean `true`) marks the test as flaky, `"false"` removes the marking, and `"unset"` clears any stored value.
|
|
28
|
+
* Each item may identify a test either by `test_id` alone **or** by the combination of `test_name` + `class_name`. When every item supplies a `test_id` the `repo` query parameter is not required.
|
|
28
29
|
*
|
|
29
30
|
*/
|
|
30
31
|
export declare function useSetFlakyStatusMutation<T extends keyof SetFlakyStatusProps>(props: Pick<Partial<SetFlakyStatusProps>, T>, options?: Omit<UseMutationOptions<SetFlakyStatusResponseContainer, SetFlakyStatusErrorResponse, SetFlakyStatusMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SetFlakyStatusResponseContainer, import("..").Error, SetFlakyStatusMutationProps<T>, unknown>;
|
|
@@ -7,7 +7,8 @@ export function setFlakyStatus(props) {
|
|
|
7
7
|
return fetcher(Object.assign({ url: `/test-management/flaky`, method: 'POST' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Upserts the flaky marking for each test in the request body. A `marking` of `"true"` marks the test as flaky, `"false"` removes the marking, and `"unset"` clears any stored value.
|
|
10
|
+
* Upserts the flaky marking for each test in the request body. A `marking` of `"true"` (or boolean `true`) marks the test as flaky, `"false"` removes the marking, and `"unset"` clears any stored value.
|
|
11
|
+
* Each item may identify a test either by `test_id` alone **or** by the combination of `test_name` + `class_name`. When every item supplies a `test_id` the `repo` query parameter is not required.
|
|
11
12
|
*
|
|
12
13
|
*/
|
|
13
14
|
export function useSetFlakyStatusMutation(props, options) {
|
|
@@ -24,7 +24,8 @@ export interface SetQuarantineStatusResponseContainer {
|
|
|
24
24
|
export declare function setQuarantineStatus(props: SetQuarantineStatusProps): Promise<SetQuarantineStatusResponseContainer>;
|
|
25
25
|
export type SetQuarantineStatusMutationProps<T extends keyof SetQuarantineStatusProps> = Omit<SetQuarantineStatusProps, T> & Partial<Pick<SetQuarantineStatusProps, T>>;
|
|
26
26
|
/**
|
|
27
|
-
* Upserts the quarantine marking for each test in the request body. A `marking` of `"true"` quarantines the test, `"false"` removes the quarantine, and `"unset"` clears any stored value.
|
|
27
|
+
* Upserts the quarantine marking for each test in the request body. A `marking` of `"true"` (or boolean `true`) quarantines the test, `"false"` removes the quarantine, and `"unset"` clears any stored value.
|
|
28
|
+
* Each item may identify a test either by `test_id` alone **or** by the combination of `test_name` + `class_name`. When every item supplies a `test_id` the `repo` query parameter is not required.
|
|
28
29
|
*
|
|
29
30
|
*/
|
|
30
31
|
export declare function useSetQuarantineStatusMutation<T extends keyof SetQuarantineStatusProps>(props: Pick<Partial<SetQuarantineStatusProps>, T>, options?: Omit<UseMutationOptions<SetQuarantineStatusResponseContainer, SetQuarantineStatusErrorResponse, SetQuarantineStatusMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SetQuarantineStatusResponseContainer, import("..").Error, SetQuarantineStatusMutationProps<T>, unknown>;
|
|
@@ -7,7 +7,8 @@ export function setQuarantineStatus(props) {
|
|
|
7
7
|
return fetcher(Object.assign({ url: `/test-management/quarantine`, method: 'POST' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Upserts the quarantine marking for each test in the request body. A `marking` of `"true"` quarantines the test, `"false"` removes the quarantine, and `"unset"` clears any stored value.
|
|
10
|
+
* Upserts the quarantine marking for each test in the request body. A `marking` of `"true"` (or boolean `true`) quarantines the test, `"false"` removes the quarantine, and `"unset"` clears any stored value.
|
|
11
|
+
* Each item may identify a test either by `test_id` alone **or** by the combination of `test_name` + `class_name`. When every item supplies a `test_id` the `repo` query parameter is not required.
|
|
11
12
|
*
|
|
12
13
|
*/
|
|
13
14
|
export function useSetQuarantineStatusMutation(props, options) {
|
|
@@ -43,6 +43,7 @@ export type { CoverageMetric } from './schemas/CoverageMetric';
|
|
|
43
43
|
export type { CoverageSummary } from './schemas/CoverageSummary';
|
|
44
44
|
export type { Error } from './schemas/Error';
|
|
45
45
|
export type { ItemSummary } from './schemas/ItemSummary';
|
|
46
|
+
export type { LinkedRepoSummary } from './schemas/LinkedRepoSummary';
|
|
46
47
|
export type { MarkedTest } from './schemas/MarkedTest';
|
|
47
48
|
export type { MarkedTestsResponse } from './schemas/MarkedTestsResponse';
|
|
48
49
|
export type { Pagination } from './schemas/Pagination';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { LinkedRepoSummary } from '../schemas/LinkedRepoSummary';
|
|
1
2
|
import type { CoverageSummary } from '../schemas/CoverageSummary';
|
|
2
3
|
export interface ItemSummary extends CoverageSummary {
|
|
3
4
|
git_ref?: string;
|
|
4
5
|
is_harness_code?: boolean;
|
|
6
|
+
linked_repos?: LinkedRepoSummary[];
|
|
5
7
|
path?: string;
|
|
6
8
|
type?: 'directory' | 'file' | 'repository';
|
|
7
9
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ItemSummary } from '../schemas/ItemSummary';
|
|
2
|
+
import type { LinkedRepoSummary } from '../schemas/LinkedRepoSummary';
|
|
2
3
|
import type { CoverageSummary } from '../schemas/CoverageSummary';
|
|
3
4
|
export interface ReportOutput {
|
|
4
5
|
git_ref?: string;
|
|
5
6
|
is_harness_code?: boolean;
|
|
6
7
|
items?: ItemSummary[];
|
|
7
8
|
lines?: Array<number[]>;
|
|
9
|
+
linked_repos?: LinkedRepoSummary[];
|
|
8
10
|
path?: string;
|
|
9
11
|
summary: CoverageSummary;
|
|
10
12
|
}
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Request payload for setting flaky or quarantine status on a single test
|
|
2
|
+
* Request payload for setting flaky or quarantine status on a single test. A test can be identified either by `test_id` alone **or** by the combination of `test_name` + `class_name` (with optional `suite_name`). When `test_id` is provided, `test_name`, `class_name`, and the `repo` query parameter are not required.
|
|
3
|
+
*
|
|
3
4
|
*/
|
|
4
5
|
export interface TestMarkingRequest {
|
|
5
6
|
/**
|
|
6
|
-
* Fully-qualified class name of the test
|
|
7
|
+
* Fully-qualified class name of the test (required when test_id is absent)
|
|
7
8
|
* @example "com.example.MyTest"
|
|
8
9
|
*/
|
|
9
|
-
class_name
|
|
10
|
+
class_name?: string;
|
|
10
11
|
/**
|
|
11
|
-
* Desired marking state
|
|
12
|
+
* Desired marking state. Accepts either a JSON boolean (`true`/`false`) or the string values `"true"`, `"false"`, or `"unset"`. `"unset"` clears any stored value.
|
|
13
|
+
*
|
|
12
14
|
*/
|
|
13
|
-
marking: 'false' | 'true' | 'unset';
|
|
15
|
+
marking: (boolean & 'false') | 'true' | 'unset';
|
|
14
16
|
/**
|
|
15
17
|
* Suite (module) the test belongs to
|
|
16
18
|
* @example "unit"
|
|
17
19
|
*/
|
|
18
20
|
suite_name?: string;
|
|
19
21
|
/**
|
|
20
|
-
*
|
|
22
|
+
* Deterministic identifier for the test (returned by list endpoints). When provided, `test_name` and `class_name` are not needed.
|
|
23
|
+
*
|
|
24
|
+
* @example "36449"
|
|
25
|
+
*/
|
|
26
|
+
test_id?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Name of the test method (required when test_id is absent)
|
|
21
29
|
* @example "shouldReturnTrue"
|
|
22
30
|
*/
|
|
23
|
-
test_name
|
|
31
|
+
test_name?: string;
|
|
24
32
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export interface TestReportSummary {
|
|
2
|
+
/**
|
|
3
|
+
* Status of the aggregation: 'complete' when the build sentinel row exists, 'partial' when showing the best available stage or step result
|
|
4
|
+
*/
|
|
5
|
+
aggregation_status?: 'complete' | 'partial';
|
|
2
6
|
/**
|
|
3
7
|
* @format int64
|
|
4
8
|
*/
|
|
@@ -19,6 +23,14 @@ export interface TestReportSummary {
|
|
|
19
23
|
* @format int64
|
|
20
24
|
*/
|
|
21
25
|
skipped_tests?: number;
|
|
26
|
+
/**
|
|
27
|
+
* When aggregation_status is 'partial', the stage ID whose counters are shown
|
|
28
|
+
*/
|
|
29
|
+
source_stage_id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* When aggregation_status is 'partial' and no stage sentinel exists, the step ID whose counters are shown
|
|
32
|
+
*/
|
|
33
|
+
source_step_id?: string;
|
|
22
34
|
/**
|
|
23
35
|
* @format int64
|
|
24
36
|
*/
|