@harnessio/react-ssca-manager-client 0.18.0 → 0.19.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.
- package/dist/ssca-manager/src/services/hooks/useCreateRemediationTrackerMutation.js +1 -1
- package/dist/ssca-manager/src/services/hooks/useGetOverallSummaryQuery.d.ts +20 -0
- package/dist/ssca-manager/src/services/hooks/useGetOverallSummaryQuery.js +14 -0
- package/dist/ssca-manager/src/services/hooks/useListRemediationsQuery.d.ts +39 -0
- package/dist/ssca-manager/src/services/hooks/useListRemediationsQuery.js +14 -0
- package/dist/ssca-manager/src/services/index.d.ts +11 -0
- package/dist/ssca-manager/src/services/index.js +2 -0
- package/dist/ssca-manager/src/services/responses/RemediationListingResponseBodyResponse.d.ts +2 -0
- package/dist/ssca-manager/src/services/responses/RemediationListingResponseBodyResponse.js +1 -0
- package/dist/ssca-manager/src/services/responses/RemediationTrackersOverallSummaryResponseBodyResponse.d.ts +2 -0
- package/dist/ssca-manager/src/services/responses/RemediationTrackersOverallSummaryResponseBodyResponse.js +1 -0
- package/dist/ssca-manager/src/services/schemas/DeploymentsCount.d.ts +22 -0
- package/dist/ssca-manager/src/services/schemas/DeploymentsCount.js +4 -0
- package/dist/ssca-manager/src/services/schemas/RemediationCount.d.ts +10 -0
- package/dist/ssca-manager/src/services/schemas/RemediationCount.js +1 -0
- package/dist/ssca-manager/src/services/schemas/RemediationListingResponse.d.ts +42 -0
- package/dist/ssca-manager/src/services/schemas/RemediationListingResponse.js +1 -0
- package/dist/ssca-manager/src/services/schemas/RemediationStatus.d.ts +2 -0
- package/dist/ssca-manager/src/services/schemas/RemediationStatus.js +4 -0
- package/dist/ssca-manager/src/services/schemas/RemediationTrackersOverallSummaryResponseBody.d.ts +12 -0
- package/dist/ssca-manager/src/services/schemas/RemediationTrackersOverallSummaryResponseBody.js +1 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useMutation } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function createRemediationTracker(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/remediations`, method: 'POST' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Create Remediation Tracker.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { RemediationTrackersOverallSummaryResponseBodyResponse } from '../responses/RemediationTrackersOverallSummaryResponseBodyResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetOverallSummaryQueryPathParams {
|
|
6
|
+
org: string;
|
|
7
|
+
project: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetOverallSummaryQueryHeaderParams {
|
|
10
|
+
'Harness-Account'?: string;
|
|
11
|
+
}
|
|
12
|
+
export type GetOverallSummaryOkResponse = ResponseWithPagination<RemediationTrackersOverallSummaryResponseBodyResponse>;
|
|
13
|
+
export type GetOverallSummaryErrorResponse = unknown;
|
|
14
|
+
export interface GetOverallSummaryProps extends GetOverallSummaryQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetOverallSummaryQueryHeaderParams>, 'url'> {
|
|
15
|
+
}
|
|
16
|
+
export declare function getOverallSummary(props: GetOverallSummaryProps): Promise<GetOverallSummaryOkResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Get Overall summary of Remediation Trackers.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useGetOverallSummaryQuery(props: GetOverallSummaryProps, options?: Omit<UseQueryOptions<GetOverallSummaryOkResponse, GetOverallSummaryErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetOverallSummaryOkResponse, unknown>;
|
|
@@ -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 '../../../../fetcher/index.js';
|
|
6
|
+
export function getOverallSummary(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/remediations/overall-summary`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get Overall summary of Remediation Trackers.
|
|
11
|
+
*/
|
|
12
|
+
export function useGetOverallSummaryQuery(props, options) {
|
|
13
|
+
return useQuery(['getOverallSummary', props.org, props.project], ({ signal }) => getOverallSummary(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { RemediationListingResponseBodyResponse } from '../responses/RemediationListingResponseBodyResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface ListRemediationsQueryPathParams {
|
|
6
|
+
org: string;
|
|
7
|
+
project: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ListRemediationsQueryQueryParams {
|
|
10
|
+
/**
|
|
11
|
+
* @default 30
|
|
12
|
+
*/
|
|
13
|
+
limit?: number;
|
|
14
|
+
/**
|
|
15
|
+
* @default "ASC"
|
|
16
|
+
*/
|
|
17
|
+
order?: 'ASC' | 'DESC';
|
|
18
|
+
/**
|
|
19
|
+
* @default 0
|
|
20
|
+
*/
|
|
21
|
+
page?: number;
|
|
22
|
+
/**
|
|
23
|
+
* @default "component"
|
|
24
|
+
*/
|
|
25
|
+
sort?: {};
|
|
26
|
+
}
|
|
27
|
+
export interface ListRemediationsQueryHeaderParams {
|
|
28
|
+
'Harness-Account'?: string;
|
|
29
|
+
}
|
|
30
|
+
export type ListRemediationsOkResponse = ResponseWithPagination<RemediationListingResponseBodyResponse>;
|
|
31
|
+
export type ListRemediationsErrorResponse = unknown;
|
|
32
|
+
export interface ListRemediationsProps extends ListRemediationsQueryPathParams, Omit<FetcherOptions<ListRemediationsQueryQueryParams, unknown, ListRemediationsQueryHeaderParams>, 'url'> {
|
|
33
|
+
queryParams: ListRemediationsQueryQueryParams;
|
|
34
|
+
}
|
|
35
|
+
export declare function listRemediations(props: ListRemediationsProps): Promise<ListRemediationsOkResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* List all Remediation Trackers.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useListRemediationsQuery(props: ListRemediationsProps, options?: Omit<UseQueryOptions<ListRemediationsOkResponse, ListRemediationsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListRemediationsOkResponse, unknown>;
|
|
@@ -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 '../../../../fetcher/index.js';
|
|
6
|
+
export function listRemediations(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/remediations`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List all Remediation Trackers.
|
|
11
|
+
*/
|
|
12
|
+
export function useListRemediationsQuery(props, options) {
|
|
13
|
+
return useQuery(['listRemediations', props.org, props.project, props.queryParams], ({ signal }) => listRemediations(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -17,6 +17,8 @@ export type { GetComponentDriftErrorResponse, GetComponentDriftOkResponse, GetCo
|
|
|
17
17
|
export { getComponentDrift, useGetComponentDriftQuery } from './hooks/useGetComponentDriftQuery';
|
|
18
18
|
export type { GetLicenseDriftErrorResponse, GetLicenseDriftOkResponse, GetLicenseDriftProps, GetLicenseDriftQueryPathParams, GetLicenseDriftQueryQueryParams, } from './hooks/useGetLicenseDriftQuery';
|
|
19
19
|
export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
|
|
20
|
+
export type { GetOverallSummaryErrorResponse, GetOverallSummaryOkResponse, GetOverallSummaryProps, GetOverallSummaryQueryPathParams, } from './hooks/useGetOverallSummaryQuery';
|
|
21
|
+
export { getOverallSummary, useGetOverallSummaryQuery } from './hooks/useGetOverallSummaryQuery';
|
|
20
22
|
export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
|
|
21
23
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
22
24
|
export type { GetSbomScorecardErrorResponse, GetSbomScorecardOkResponse, GetSbomScorecardProps, GetSbomScorecardQueryPathParams, } from './hooks/useGetSbomScorecardQuery';
|
|
@@ -25,6 +27,8 @@ export type { ListArtifactsErrorResponse, ListArtifactsOkResponse, ListArtifacts
|
|
|
25
27
|
export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
|
|
26
28
|
export type { ListLatestArtifactsErrorResponse, ListLatestArtifactsOkResponse, ListLatestArtifactsProps, ListLatestArtifactsQueryPathParams, ListLatestArtifactsQueryQueryParams, } from './hooks/useListLatestArtifactsQuery';
|
|
27
29
|
export { listLatestArtifacts, useListLatestArtifactsQuery, } from './hooks/useListLatestArtifactsQuery';
|
|
30
|
+
export type { ListRemediationsErrorResponse, ListRemediationsOkResponse, ListRemediationsProps, ListRemediationsQueryPathParams, ListRemediationsQueryQueryParams, } from './hooks/useListRemediationsQuery';
|
|
31
|
+
export { listRemediations, useListRemediationsQuery } from './hooks/useListRemediationsQuery';
|
|
28
32
|
export type { SetBaselineForArtifactErrorResponse, SetBaselineForArtifactMutationPathParams, SetBaselineForArtifactOkResponse, SetBaselineForArtifactProps, SetBaselineForArtifactRequestBody, } from './hooks/useSetBaselineForArtifactMutation';
|
|
29
33
|
export { setBaselineForArtifact, useSetBaselineForArtifactMutation, } from './hooks/useSetBaselineForArtifactMutation';
|
|
30
34
|
export type { ArtifactListingRequestBodyRequestBody } from './requestBodies/ArtifactListingRequestBodyRequestBody';
|
|
@@ -40,7 +44,9 @@ export type { BaselineResponseBodyResponse } from './responses/BaselineResponseB
|
|
|
40
44
|
export type { ComponentDriftResponseBodyResponse } from './responses/ComponentDriftResponseBodyResponse';
|
|
41
45
|
export type { LicenseDriftResponseBodyResponse } from './responses/LicenseDriftResponseBodyResponse';
|
|
42
46
|
export type { PolicyViolationResponseResponse } from './responses/PolicyViolationResponseResponse';
|
|
47
|
+
export type { RemediationListingResponseBodyResponse } from './responses/RemediationListingResponseBodyResponse';
|
|
43
48
|
export type { RemediationTrackerCreateResponseBodyResponse } from './responses/RemediationTrackerCreateResponseBodyResponse';
|
|
49
|
+
export type { RemediationTrackersOverallSummaryResponseBodyResponse } from './responses/RemediationTrackersOverallSummaryResponseBodyResponse';
|
|
44
50
|
export type { SaveResponseResponse } from './responses/SaveResponseResponse';
|
|
45
51
|
export type { SbomScorecardResponseBodyResponse } from './responses/SbomScorecardResponseBodyResponse';
|
|
46
52
|
export type { ArtifactComponentViewRequestBody } from './schemas/ArtifactComponentViewRequestBody';
|
|
@@ -61,14 +67,19 @@ export type { ComponentDriftSummary } from './schemas/ComponentDriftSummary';
|
|
|
61
67
|
export type { ComponentFilter } from './schemas/ComponentFilter';
|
|
62
68
|
export type { ComponentSummary } from './schemas/ComponentSummary';
|
|
63
69
|
export type { ContactInfo } from './schemas/ContactInfo';
|
|
70
|
+
export type { DeploymentsCount } from './schemas/DeploymentsCount';
|
|
64
71
|
export type { LicenseDrift } from './schemas/LicenseDrift';
|
|
65
72
|
export type { LicenseDriftSummary } from './schemas/LicenseDriftSummary';
|
|
66
73
|
export type { LicenseFilter } from './schemas/LicenseFilter';
|
|
67
74
|
export type { Operator } from './schemas/Operator';
|
|
68
75
|
export type { PolicyViolation } from './schemas/PolicyViolation';
|
|
69
76
|
export type { RemediationCondition } from './schemas/RemediationCondition';
|
|
77
|
+
export type { RemediationCount } from './schemas/RemediationCount';
|
|
78
|
+
export type { RemediationListingResponse } from './schemas/RemediationListingResponse';
|
|
79
|
+
export type { RemediationStatus } from './schemas/RemediationStatus';
|
|
70
80
|
export type { RemediationTrackerCreateRequestBody } from './schemas/RemediationTrackerCreateRequestBody';
|
|
71
81
|
export type { RemediationTrackerCreateResponseBody } from './schemas/RemediationTrackerCreateResponseBody';
|
|
82
|
+
export type { RemediationTrackersOverallSummaryResponseBody } from './schemas/RemediationTrackersOverallSummaryResponseBody';
|
|
72
83
|
export type { SaveResponse } from './schemas/SaveResponse';
|
|
73
84
|
export type { SbomDetailsForScorecard } from './schemas/SbomDetailsForScorecard';
|
|
74
85
|
export type { SbomScorecardResponseBody } from './schemas/SbomScorecardResponseBody';
|
|
@@ -7,8 +7,10 @@ export { getArtifactDetails, useGetArtifactDetailsQuery } from './hooks/useGetAr
|
|
|
7
7
|
export { getBaselineForArtifact, useGetBaselineForArtifactQuery, } from './hooks/useGetBaselineForArtifactQuery';
|
|
8
8
|
export { getComponentDrift, useGetComponentDriftQuery } from './hooks/useGetComponentDriftQuery';
|
|
9
9
|
export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
|
|
10
|
+
export { getOverallSummary, useGetOverallSummaryQuery } from './hooks/useGetOverallSummaryQuery';
|
|
10
11
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
11
12
|
export { getSbomScorecard, useGetSbomScorecardQuery } from './hooks/useGetSbomScorecardQuery';
|
|
12
13
|
export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
|
|
13
14
|
export { listLatestArtifacts, useListLatestArtifactsQuery, } from './hooks/useListLatestArtifactsQuery';
|
|
15
|
+
export { listRemediations, useListRemediationsQuery } from './hooks/useListRemediationsQuery';
|
|
14
16
|
export { setBaselineForArtifact, useSetBaselineForArtifactMutation, } from './hooks/useSetBaselineForArtifactMutation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface DeploymentsCount {
|
|
2
|
+
/**
|
|
3
|
+
* Patched Non Prod Deployments.
|
|
4
|
+
* @format int64
|
|
5
|
+
*/
|
|
6
|
+
patched_non_prod_count: number;
|
|
7
|
+
/**
|
|
8
|
+
* Patched Prod Deployments.
|
|
9
|
+
* @format int64
|
|
10
|
+
*/
|
|
11
|
+
patched_prod_count: number;
|
|
12
|
+
/**
|
|
13
|
+
* Pending Non Prod Deployments to remediate.
|
|
14
|
+
* @format int64
|
|
15
|
+
*/
|
|
16
|
+
pending_non_prod_count: number;
|
|
17
|
+
/**
|
|
18
|
+
* Pending Prod Deployments to remediate.
|
|
19
|
+
* @format int64
|
|
20
|
+
*/
|
|
21
|
+
pending_prod_count: number;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ContactInfo } from '../schemas/ContactInfo';
|
|
2
|
+
import type { DeploymentsCount } from '../schemas/DeploymentsCount';
|
|
3
|
+
import type { RemediationCondition } from '../schemas/RemediationCondition';
|
|
4
|
+
import type { VulnerabilitySeverity } from '../schemas/VulnerabilitySeverity';
|
|
5
|
+
import type { RemediationStatus } from '../schemas/RemediationStatus';
|
|
6
|
+
export interface RemediationListingResponse {
|
|
7
|
+
/**
|
|
8
|
+
* Total distinct artifacts included in the tracker.
|
|
9
|
+
* @format int64
|
|
10
|
+
*/
|
|
11
|
+
artifacts: number;
|
|
12
|
+
/**
|
|
13
|
+
* Component Name.
|
|
14
|
+
*/
|
|
15
|
+
component: string;
|
|
16
|
+
contact?: ContactInfo;
|
|
17
|
+
/**
|
|
18
|
+
* CVE number.
|
|
19
|
+
*/
|
|
20
|
+
cve?: string;
|
|
21
|
+
deployments_count: DeploymentsCount;
|
|
22
|
+
/**
|
|
23
|
+
* Tracker Id.
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
remediation_condition?: RemediationCondition;
|
|
27
|
+
/**
|
|
28
|
+
* This indicates how we are going with schedule of target date.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
schedule_status?: string;
|
|
32
|
+
severity: VulnerabilitySeverity;
|
|
33
|
+
status: RemediationStatus;
|
|
34
|
+
/**
|
|
35
|
+
* Target End Date set by the user.
|
|
36
|
+
*/
|
|
37
|
+
target_date?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Component Version.
|
|
40
|
+
*/
|
|
41
|
+
version: string;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/ssca-manager/src/services/schemas/RemediationTrackersOverallSummaryResponseBody.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RemediationCount } from '../schemas/RemediationCount';
|
|
2
|
+
export interface RemediationTrackersOverallSummaryResponseBody {
|
|
3
|
+
/**
|
|
4
|
+
* Mean time to complete the Remediation in Hours.
|
|
5
|
+
* @format double
|
|
6
|
+
*/
|
|
7
|
+
mean_time_to_remediate_in_hours?: number;
|
|
8
|
+
/**
|
|
9
|
+
* List of statuses and their counts.
|
|
10
|
+
*/
|
|
11
|
+
remediation_counts?: RemediationCount[];
|
|
12
|
+
}
|
package/dist/ssca-manager/src/services/schemas/RemediationTrackersOverallSummaryResponseBody.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|