@harnessio/react-ssca-manager-client 0.18.0 → 0.20.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.
Files changed (24) hide show
  1. package/dist/ssca-manager/src/services/hooks/useCreateRemediationTrackerMutation.js +1 -1
  2. package/dist/ssca-manager/src/services/hooks/useGetOverallSummaryQuery.d.ts +20 -0
  3. package/dist/ssca-manager/src/services/hooks/useGetOverallSummaryQuery.js +14 -0
  4. package/dist/ssca-manager/src/services/hooks/useListRemediationsQuery.d.ts +39 -0
  5. package/dist/ssca-manager/src/services/hooks/useListRemediationsQuery.js +14 -0
  6. package/dist/ssca-manager/src/services/index.d.ts +11 -0
  7. package/dist/ssca-manager/src/services/index.js +2 -0
  8. package/dist/ssca-manager/src/services/responses/RemediationListingResponseBodyResponse.d.ts +2 -0
  9. package/dist/ssca-manager/src/services/responses/RemediationListingResponseBodyResponse.js +1 -0
  10. package/dist/ssca-manager/src/services/responses/RemediationTrackersOverallSummaryResponseBodyResponse.d.ts +2 -0
  11. package/dist/ssca-manager/src/services/responses/RemediationTrackersOverallSummaryResponseBodyResponse.js +1 -0
  12. package/dist/ssca-manager/src/services/schemas/DeploymentsCount.d.ts +22 -0
  13. package/dist/ssca-manager/src/services/schemas/DeploymentsCount.js +4 -0
  14. package/dist/ssca-manager/src/services/schemas/PolicyViolation.d.ts +2 -0
  15. package/dist/ssca-manager/src/services/schemas/RemediationCount.d.ts +10 -0
  16. package/dist/ssca-manager/src/services/schemas/RemediationCount.js +1 -0
  17. package/dist/ssca-manager/src/services/schemas/RemediationListingResponse.d.ts +38 -0
  18. package/dist/ssca-manager/src/services/schemas/RemediationListingResponse.js +1 -0
  19. package/dist/ssca-manager/src/services/schemas/RemediationStatus.d.ts +2 -0
  20. package/dist/ssca-manager/src/services/schemas/RemediationStatus.js +4 -0
  21. package/dist/ssca-manager/src/services/schemas/RemediationTrackersOverallSummaryResponseBody.d.ts +12 -0
  22. package/dist/ssca-manager/src/services/schemas/RemediationTrackersOverallSummaryResponseBody.js +1 -0
  23. package/dist/ssca-manager/src/services/schemas/VulnerabilityInfo.d.ts +0 -4
  24. 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}/remediation`, method: 'POST' }, props));
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,2 @@
1
+ import type { RemediationListingResponse } from '../schemas/RemediationListingResponse';
2
+ export type RemediationListingResponseBodyResponse = RemediationListingResponse[];
@@ -0,0 +1,2 @@
1
+ import type { RemediationTrackersOverallSummaryResponseBody } from '../schemas/RemediationTrackersOverallSummaryResponseBody';
2
+ export type RemediationTrackersOverallSummaryResponseBodyResponse = RemediationTrackersOverallSummaryResponseBody;
@@ -0,0 +1,22 @@
1
+ export interface DeploymentsCount {
2
+ /**
3
+ * Patched Non Prod Deployments.
4
+ * @format int64
5
+ */
6
+ patched_non_prod_count?: number | null;
7
+ /**
8
+ * Patched Prod Deployments.
9
+ * @format int64
10
+ */
11
+ patched_prod_count?: number | null;
12
+ /**
13
+ * Pending Non Prod Deployments to remediate.
14
+ * @format int64
15
+ */
16
+ pending_non_prod_count?: number | null;
17
+ /**
18
+ * Pending Prod Deployments to remediate.
19
+ * @format int64
20
+ */
21
+ pending_prod_count?: number | null;
22
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -2,7 +2,9 @@ export interface PolicyViolation {
2
2
  account?: string;
3
3
  artifact_id?: string;
4
4
  enforcement_id?: string;
5
+ exemption_id?: string;
5
6
  image_name?: string;
7
+ is_exempted?: boolean;
6
8
  license?: string[];
7
9
  name?: string;
8
10
  orchestration_id?: string;
@@ -0,0 +1,10 @@
1
+ import type { RemediationStatus } from '../schemas/RemediationStatus';
2
+ export interface RemediationCount {
3
+ /**
4
+ * Number of trackers having the status.
5
+ * @format int64
6
+ * @default 0
7
+ */
8
+ count?: number;
9
+ status?: RemediationStatus;
10
+ }
@@ -0,0 +1,38 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ export interface RemediationStatus {
2
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -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
+ }
@@ -4,10 +4,6 @@ export interface VulnerabilityInfo {
4
4
  * Name of the component where vulnerability is found.
5
5
  */
6
6
  component_name: string;
7
- /**
8
- * Version(s) of the component where vulnerability is found.
9
- */
10
- component_version?: string;
11
7
  severity: VulnerabilitySeverity;
12
8
  type: {};
13
9
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",