@harnessio/react-ti-service-client 0.6.5 → 0.6.6
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/useGetAllTestMarkingsQuery.d.ts +2 -1
- package/dist/ti-service/src/services/hooks/useGetAllTestMarkingsQuery.js +1 -1
- package/dist/ti-service/src/services/hooks/useGetExecutionCoverageReportQuery.d.ts +1 -2
- package/dist/ti-service/src/services/hooks/useGetExecutionCoverageReportQuery.js +1 -1
- package/dist/ti-service/src/services/hooks/useUpsertPoliciesMutation.d.ts +1 -1
- package/dist/ti-service/src/services/hooks/useUpsertPoliciesMutation.js +1 -1
- package/dist/ti-service/src/services/index.d.ts +0 -1
- package/dist/ti-service/src/services/schemas/ItemSummary.d.ts +0 -2
- package/dist/ti-service/src/services/schemas/Policy.d.ts +2 -2
- package/dist/ti-service/src/services/schemas/ReportOutput.d.ts +0 -2
- package/dist/ti-service/src/services/schemas/TestCase.d.ts +8 -0
- package/dist/ti-service/src/services/schemas/TestMarkingDetail.d.ts +8 -0
- package/dist/ti-service/src/services/schemas/TestMarkingsResponse.d.ts +5 -0
- package/package.json +1 -1
- package/dist/ti-service/src/services/schemas/LinkedRepoSummary.d.ts +0 -8
- package/dist/ti-service/src/services/schemas/LinkedRepoSummary.js +0 -4
|
@@ -18,6 +18,7 @@ export interface GetAllTestMarkingsQueryQueryParams {
|
|
|
18
18
|
pageSize?: number;
|
|
19
19
|
flaky?: boolean;
|
|
20
20
|
quarantine?: boolean;
|
|
21
|
+
problematic?: boolean;
|
|
21
22
|
test_name?: string;
|
|
22
23
|
}
|
|
23
24
|
export type GetAllTestMarkingsOkResponse = TestMarkingsResponse;
|
|
@@ -31,7 +32,7 @@ export interface GetAllTestMarkingsResponseContainer {
|
|
|
31
32
|
}
|
|
32
33
|
export declare function getAllTestMarkings(props: GetAllTestMarkingsProps): Promise<GetAllTestMarkingsResponseContainer>;
|
|
33
34
|
/**
|
|
34
|
-
* Returns all tests with their combined flaky and
|
|
35
|
+
* Returns all tests with their combined flaky, quarantine, and problematic markings for the given account and repo, with pagination. Use the optional `flaky`, `quarantine`, and `problematic` parameters to filter results to only tests with a specific status for each field. The response also includes `totalFlaky`, `totalQuarantine`, and `totalProblematic` — the aggregate counts across the entire repository, independent of any active pagination or filters.
|
|
35
36
|
*
|
|
36
37
|
*/
|
|
37
38
|
export declare function useGetAllTestMarkingsQuery(props: GetAllTestMarkingsProps, options?: Omit<UseQueryOptions<GetAllTestMarkingsResponseContainer, GetAllTestMarkingsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAllTestMarkingsResponseContainer, import("..").Error>;
|
|
@@ -7,7 +7,7 @@ export function getAllTestMarkings(props) {
|
|
|
7
7
|
return fetcher(Object.assign({ url: `/test-management/tests`, method: 'GET' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Returns all tests with their combined flaky and
|
|
10
|
+
* Returns all tests with their combined flaky, quarantine, and problematic markings for the given account and repo, with pagination. Use the optional `flaky`, `quarantine`, and `problematic` parameters to filter results to only tests with a specific status for each field. The response also includes `totalFlaky`, `totalQuarantine`, and `totalProblematic` — the aggregate counts across the entire repository, independent of any active pagination or filters.
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
export function useGetAllTestMarkingsQuery(props, options) {
|
|
@@ -12,7 +12,6 @@ export interface GetExecutionCoverageReportQueryPathParams {
|
|
|
12
12
|
}
|
|
13
13
|
export interface GetExecutionCoverageReportQueryQueryParams {
|
|
14
14
|
accountId: string;
|
|
15
|
-
include_linked_repo?: boolean;
|
|
16
15
|
tag?: string[];
|
|
17
16
|
orgId: string;
|
|
18
17
|
projectId: string;
|
|
@@ -33,6 +32,6 @@ export interface GetExecutionCoverageReportResponseContainer {
|
|
|
33
32
|
}
|
|
34
33
|
export declare function getExecutionCoverageReport(props: GetExecutionCoverageReportProps): Promise<GetExecutionCoverageReportResponseContainer>;
|
|
35
34
|
/**
|
|
36
|
-
* Retrieve pipeline execution coverage data for a specific file path or directory tree. Use the tags parameter to filter coverage by specific tags.
|
|
35
|
+
* Retrieve pipeline execution coverage data for a specific file path or directory tree. Use the tags parameter to filter coverage by specific tags.
|
|
37
36
|
*/
|
|
38
37
|
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.
|
|
11
11
|
*/
|
|
12
12
|
export function useGetExecutionCoverageReportQuery(props, options) {
|
|
13
13
|
return useQuery([
|
|
@@ -26,7 +26,7 @@ export interface UpsertPoliciesResponseContainer {
|
|
|
26
26
|
export declare function upsertPolicies(props: UpsertPoliciesProps): Promise<UpsertPoliciesResponseContainer>;
|
|
27
27
|
export type UpsertPoliciesMutationProps<T extends keyof UpsertPoliciesProps> = Omit<UpsertPoliciesProps, T> & Partial<Pick<UpsertPoliciesProps, T>>;
|
|
28
28
|
/**
|
|
29
|
-
* Replaces all policies for the given account, org, project, and repo scope with the supplied list. Sending an empty array clears all policies. Each policy must have at least one rule condition and one action. Valid rule conditions: `"test is flaky"`, `"test is slow"`, `"test failed"`, `"passes ? consecutive times on ? branch"`, `"failed more than ? times on ? branch"`, `"test passed and failed on the same commit"
|
|
29
|
+
* Replaces all policies for the given account, org, project, and repo scope with the supplied list. Sending an empty array clears all policies. Each policy must have at least one rule condition and one action. Valid rule conditions: `"test is flaky"`, `"test is slow"`, `"test failed"`, `"passes ? consecutive times on ? branch"`, `"failed more than ? times on ? branch"`, `"test passed and failed on the same commit"`, `"marked for ? days"`, `"quarantine when ? is marked"` (cascade rule with no action; the value must be `"flaky"` or `"problematic"`). Valid actions: `"mark quarantine"`, `"mark unquarantine"`, `"unmark quarantine"`, `"mark flaky"`, `"mark unflaky"`, `"unmark flaky"`, `"mark problematic"`, `"mark unproblematic"`, `"unmark problematic"`.
|
|
30
30
|
*
|
|
31
31
|
*/
|
|
32
32
|
export declare function useUpsertPoliciesMutation<T extends keyof UpsertPoliciesProps>(props: Pick<Partial<UpsertPoliciesProps>, T>, options?: Omit<UseMutationOptions<UpsertPoliciesResponseContainer, UpsertPoliciesErrorResponse, UpsertPoliciesMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpsertPoliciesResponseContainer, import("..").Error, UpsertPoliciesMutationProps<T>, unknown>;
|
|
@@ -7,7 +7,7 @@ export function upsertPolicies(props) {
|
|
|
7
7
|
return fetcher(Object.assign({ url: `/test-management/policies`, method: 'PUT' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Replaces all policies for the given account, org, project, and repo scope with the supplied list. Sending an empty array clears all policies. Each policy must have at least one rule condition and one action. Valid rule conditions: `"test is flaky"`, `"test is slow"`, `"test failed"`, `"passes ? consecutive times on ? branch"`, `"failed more than ? times on ? branch"`, `"test passed and failed on the same commit"
|
|
10
|
+
* Replaces all policies for the given account, org, project, and repo scope with the supplied list. Sending an empty array clears all policies. Each policy must have at least one rule condition and one action. Valid rule conditions: `"test is flaky"`, `"test is slow"`, `"test failed"`, `"passes ? consecutive times on ? branch"`, `"failed more than ? times on ? branch"`, `"test passed and failed on the same commit"`, `"marked for ? days"`, `"quarantine when ? is marked"` (cascade rule with no action; the value must be `"flaky"` or `"problematic"`). Valid actions: `"mark quarantine"`, `"mark unquarantine"`, `"unmark quarantine"`, `"mark flaky"`, `"mark unflaky"`, `"unmark flaky"`, `"mark problematic"`, `"mark unproblematic"`, `"unmark problematic"`.
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
export function useUpsertPoliciesMutation(props, options) {
|
|
@@ -43,7 +43,6 @@ 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';
|
|
47
46
|
export type { MarkedTest } from './schemas/MarkedTest';
|
|
48
47
|
export type { MarkedTestsResponse } from './schemas/MarkedTestsResponse';
|
|
49
48
|
export type { Pagination } from './schemas/Pagination';
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type { LinkedRepoSummary } from '../schemas/LinkedRepoSummary';
|
|
2
1
|
import type { CoverageSummary } from '../schemas/CoverageSummary';
|
|
3
2
|
export interface ItemSummary extends CoverageSummary {
|
|
4
3
|
git_ref?: string;
|
|
5
4
|
is_harness_code?: boolean;
|
|
6
|
-
linked_repos?: LinkedRepoSummary[];
|
|
7
5
|
path?: string;
|
|
8
6
|
type?: 'directory' | 'file' | 'repository';
|
|
9
7
|
}
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export interface Policy {
|
|
6
6
|
/**
|
|
7
|
-
* One or more actions to apply. Valid values: "mark quarantine", "mark unquarantine", "unmark quarantine", "mark flaky", "mark unflaky", "unmark flaky".
|
|
7
|
+
* One or more actions to apply. Valid values: "mark quarantine", "mark unquarantine", "unmark quarantine", "mark flaky", "mark unflaky", "unmark flaky", "mark problematic", "mark unproblematic", "unmark problematic".
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
action: string[];
|
|
11
11
|
/**
|
|
12
|
-
* One or more rule conditions. Valid values: "test is flaky", "test is slow", "test failed", "passes ? consecutive times on ? branch", "failed more than ? times on ? branch", "test passed and failed on the same commit".
|
|
12
|
+
* One or more rule conditions. Valid values: "test is flaky", "test is slow", "test failed", "passes ? consecutive times on ? branch", "failed more than ? times on ? branch", "test passed and failed on the same commit", "marked for ? days", "quarantine when ? is marked" (cascade rule with no action; value must be "flaky" or "problematic").
|
|
13
13
|
*
|
|
14
14
|
*/
|
|
15
15
|
rule: string[];
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { ItemSummary } from '../schemas/ItemSummary';
|
|
2
|
-
import type { LinkedRepoSummary } from '../schemas/LinkedRepoSummary';
|
|
3
2
|
import type { CoverageSummary } from '../schemas/CoverageSummary';
|
|
4
3
|
export interface ReportOutput {
|
|
5
4
|
git_ref?: string;
|
|
6
5
|
is_harness_code?: boolean;
|
|
7
6
|
items?: ItemSummary[];
|
|
8
7
|
lines?: Array<number[]>;
|
|
9
|
-
linked_repos?: LinkedRepoSummary[];
|
|
10
8
|
path?: string;
|
|
11
9
|
summary: CoverageSummary;
|
|
12
10
|
}
|
|
@@ -8,6 +8,14 @@ export interface TestCase {
|
|
|
8
8
|
file_name?: string;
|
|
9
9
|
flaky?: boolean;
|
|
10
10
|
name?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the test is currently marked problematic
|
|
13
|
+
*/
|
|
14
|
+
problematic?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the test is currently quarantined
|
|
17
|
+
*/
|
|
18
|
+
quarantine?: boolean;
|
|
11
19
|
result?: Result;
|
|
12
20
|
/**
|
|
13
21
|
* (Truncated) stderr while running the test
|
|
@@ -14,6 +14,14 @@ export interface TestMarkingDetail {
|
|
|
14
14
|
* true = flaky, false = not flaky, null = not marked
|
|
15
15
|
*/
|
|
16
16
|
flaky_status?: boolean | null;
|
|
17
|
+
/**
|
|
18
|
+
* Optional reason the test was marked problematic
|
|
19
|
+
*/
|
|
20
|
+
problematic_reason?: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* true = problematic, false = not problematic, null = not marked
|
|
23
|
+
*/
|
|
24
|
+
problematic_status?: boolean | null;
|
|
17
25
|
/**
|
|
18
26
|
* Optional reason the test was quarantined
|
|
19
27
|
*/
|
|
@@ -11,6 +11,11 @@ export interface TestMarkingsResponse {
|
|
|
11
11
|
* @example 12
|
|
12
12
|
*/
|
|
13
13
|
totalFlaky?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Total number of tests marked as problematic in the repository (independent of pagination and filters)
|
|
16
|
+
* @example 3
|
|
17
|
+
*/
|
|
18
|
+
totalProblematic?: number;
|
|
14
19
|
/**
|
|
15
20
|
* Total number of tests marked as quarantined in the repository (independent of pagination and filters)
|
|
16
21
|
* @example 5
|
package/package.json
CHANGED