@harnessio/react-ssca-manager-client 0.16.0 → 0.17.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/useGetComponentDriftQuery.d.ts +1 -0
- package/dist/ssca-manager/src/services/hooks/useGetLicenseDriftQuery.d.ts +1 -0
- package/dist/ssca-manager/src/services/hooks/useGetSbomScorecardQuery.d.ts +21 -0
- package/dist/ssca-manager/src/services/hooks/useGetSbomScorecardQuery.js +14 -0
- package/dist/ssca-manager/src/services/index.d.ts +7 -0
- package/dist/ssca-manager/src/services/index.js +1 -0
- package/dist/ssca-manager/src/services/responses/SbomScorecardResponseBodyResponse.d.ts +2 -0
- package/dist/ssca-manager/src/services/responses/SbomScorecardResponseBodyResponse.js +1 -0
- package/dist/ssca-manager/src/services/schemas/CategoryScorecard.d.ts +14 -0
- package/dist/ssca-manager/src/services/schemas/CategoryScorecard.js +4 -0
- package/dist/ssca-manager/src/services/schemas/SbomDetailsForScorecard.d.ts +8 -0
- package/dist/ssca-manager/src/services/schemas/SbomDetailsForScorecard.js +4 -0
- package/dist/ssca-manager/src/services/schemas/SbomScorecardResponseBody.d.ts +15 -0
- package/dist/ssca-manager/src/services/schemas/SbomScorecardResponseBody.js +1 -0
- package/dist/ssca-manager/src/services/schemas/ScorecardInfo.d.ts +4 -0
- package/dist/ssca-manager/src/services/schemas/ScorecardInfo.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { SbomScorecardResponseBodyResponse } from '../responses/SbomScorecardResponseBodyResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetSbomScorecardQueryPathParams {
|
|
6
|
+
org: string;
|
|
7
|
+
project: string;
|
|
8
|
+
'orchestration-id': string;
|
|
9
|
+
}
|
|
10
|
+
export interface GetSbomScorecardQueryHeaderParams {
|
|
11
|
+
'Harness-Account'?: string;
|
|
12
|
+
}
|
|
13
|
+
export type GetSbomScorecardOkResponse = ResponseWithPagination<SbomScorecardResponseBodyResponse>;
|
|
14
|
+
export type GetSbomScorecardErrorResponse = unknown;
|
|
15
|
+
export interface GetSbomScorecardProps extends GetSbomScorecardQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetSbomScorecardQueryHeaderParams>, 'url'> {
|
|
16
|
+
}
|
|
17
|
+
export declare function getSbomScorecard(props: GetSbomScorecardProps): Promise<GetSbomScorecardOkResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Get SBOM Scorecard
|
|
20
|
+
*/
|
|
21
|
+
export declare function useGetSbomScorecardQuery(props: GetSbomScorecardProps, options?: Omit<UseQueryOptions<GetSbomScorecardOkResponse, GetSbomScorecardErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetSbomScorecardOkResponse, 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 getSbomScorecard(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/orchestration/${props['orchestration-id']}/sbom-scorecard`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get SBOM Scorecard
|
|
11
|
+
*/
|
|
12
|
+
export function useGetSbomScorecardQuery(props, options) {
|
|
13
|
+
return useQuery(['getSbomScorecard', props.org, props.project, props['orchestration-id']], ({ signal }) => getSbomScorecard(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -17,6 +17,8 @@ export type { GetLicenseDriftErrorResponse, GetLicenseDriftOkResponse, GetLicens
|
|
|
17
17
|
export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
|
|
18
18
|
export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
|
|
19
19
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
20
|
+
export type { GetSbomScorecardErrorResponse, GetSbomScorecardOkResponse, GetSbomScorecardProps, GetSbomScorecardQueryPathParams, } from './hooks/useGetSbomScorecardQuery';
|
|
21
|
+
export { getSbomScorecard, useGetSbomScorecardQuery } from './hooks/useGetSbomScorecardQuery';
|
|
20
22
|
export type { ListArtifactsErrorResponse, ListArtifactsOkResponse, ListArtifactsProps, ListArtifactsQueryPathParams, ListArtifactsQueryQueryParams, ListArtifactsRequestBody, } from './hooks/useListArtifactsQuery';
|
|
21
23
|
export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
|
|
22
24
|
export type { ListLatestArtifactsErrorResponse, ListLatestArtifactsOkResponse, ListLatestArtifactsProps, ListLatestArtifactsQueryPathParams, ListLatestArtifactsQueryQueryParams, } from './hooks/useListLatestArtifactsQuery';
|
|
@@ -36,6 +38,7 @@ export type { ComponentDriftResponseBodyResponse } from './responses/ComponentDr
|
|
|
36
38
|
export type { LicenseDriftResponseBodyResponse } from './responses/LicenseDriftResponseBodyResponse';
|
|
37
39
|
export type { PolicyViolationResponseResponse } from './responses/PolicyViolationResponseResponse';
|
|
38
40
|
export type { SaveResponseResponse } from './responses/SaveResponseResponse';
|
|
41
|
+
export type { SbomScorecardResponseBodyResponse } from './responses/SbomScorecardResponseBodyResponse';
|
|
39
42
|
export type { ArtifactComponentViewRequestBody } from './schemas/ArtifactComponentViewRequestBody';
|
|
40
43
|
export type { ArtifactComponentViewResponse } from './schemas/ArtifactComponentViewResponse';
|
|
41
44
|
export type { ArtifactDeploymentViewRequestBody } from './schemas/ArtifactDeploymentViewRequestBody';
|
|
@@ -48,6 +51,7 @@ export type { ArtifactSbomDriftResponse } from './schemas/ArtifactSbomDriftRespo
|
|
|
48
51
|
export type { ArtifactSbomResponseBody } from './schemas/ArtifactSbomResponseBody';
|
|
49
52
|
export type { BaselineRequestBody } from './schemas/BaselineRequestBody';
|
|
50
53
|
export type { BaselineResponseBody } from './schemas/BaselineResponseBody';
|
|
54
|
+
export type { CategoryScorecard } from './schemas/CategoryScorecard';
|
|
51
55
|
export type { ComponentDrift } from './schemas/ComponentDrift';
|
|
52
56
|
export type { ComponentFilter } from './schemas/ComponentFilter';
|
|
53
57
|
export type { ComponentSummary } from './schemas/ComponentSummary';
|
|
@@ -56,4 +60,7 @@ export type { LicenseFilter } from './schemas/LicenseFilter';
|
|
|
56
60
|
export type { Operator } from './schemas/Operator';
|
|
57
61
|
export type { PolicyViolation } from './schemas/PolicyViolation';
|
|
58
62
|
export type { SaveResponse } from './schemas/SaveResponse';
|
|
63
|
+
export type { SbomDetailsForScorecard } from './schemas/SbomDetailsForScorecard';
|
|
64
|
+
export type { SbomScorecardResponseBody } from './schemas/SbomScorecardResponseBody';
|
|
65
|
+
export type { ScorecardInfo } from './schemas/ScorecardInfo';
|
|
59
66
|
export type { Slsa } from './schemas/Slsa';
|
|
@@ -7,6 +7,7 @@ export { getBaselineForArtifact, useGetBaselineForArtifactQuery, } from './hooks
|
|
|
7
7
|
export { getComponentDrift, useGetComponentDriftQuery } from './hooks/useGetComponentDriftQuery';
|
|
8
8
|
export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
|
|
9
9
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
10
|
+
export { getSbomScorecard, useGetSbomScorecardQuery } from './hooks/useGetSbomScorecardQuery';
|
|
10
11
|
export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
|
|
11
12
|
export { listLatestArtifacts, useListLatestArtifactsQuery, } from './hooks/useListLatestArtifactsQuery';
|
|
12
13
|
export { setBaselineForArtifact, useSetBaselineForArtifactMutation, } from './hooks/useSetBaselineForArtifactMutation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CategoryScorecard {
|
|
2
|
+
checks?: Array<{
|
|
3
|
+
description?: string;
|
|
4
|
+
is_enabled?: string;
|
|
5
|
+
max_score?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
score?: string;
|
|
8
|
+
}>;
|
|
9
|
+
is_enabled?: string;
|
|
10
|
+
max_score?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
score?: string;
|
|
13
|
+
weightage?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CategoryScorecard } from '../schemas/CategoryScorecard';
|
|
2
|
+
import type { SbomDetailsForScorecard } from '../schemas/SbomDetailsForScorecard';
|
|
3
|
+
import type { ScorecardInfo } from '../schemas/ScorecardInfo';
|
|
4
|
+
export interface SbomScorecardResponseBody {
|
|
5
|
+
account_id?: string;
|
|
6
|
+
avg_score?: string;
|
|
7
|
+
category?: CategoryScorecard[];
|
|
8
|
+
creation_on?: string;
|
|
9
|
+
max_score?: string;
|
|
10
|
+
orchestration_id?: string;
|
|
11
|
+
org_id?: string;
|
|
12
|
+
project_id?: string;
|
|
13
|
+
sbom_details?: SbomDetailsForScorecard;
|
|
14
|
+
score_card_info?: ScorecardInfo;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|