@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.
@@ -17,6 +17,7 @@ export interface GetComponentDriftQueryQueryParams {
17
17
  * @default 30
18
18
  */
19
19
  limit?: number;
20
+ search_term?: string;
20
21
  }
21
22
  export interface GetComponentDriftQueryHeaderParams {
22
23
  'Harness-Account'?: string;
@@ -17,6 +17,7 @@ export interface GetLicenseDriftQueryQueryParams {
17
17
  * @default 30
18
18
  */
19
19
  limit?: number;
20
+ search_term?: string;
20
21
  }
21
22
  export interface GetLicenseDriftQueryHeaderParams {
22
23
  'Harness-Account'?: string;
@@ -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,2 @@
1
+ import type { SbomScorecardResponseBody } from '../schemas/SbomScorecardResponseBody';
2
+ export type SbomScorecardResponseBodyResponse = SbomScorecardResponseBody;
@@ -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,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,8 @@
1
+ export interface SbomDetailsForScorecard {
2
+ file_format?: string;
3
+ sbom_file_name?: string;
4
+ sbom_format?: string;
5
+ sbom_version?: string;
6
+ tool_name?: string;
7
+ tool_version?: string;
8
+ }
@@ -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,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,4 @@
1
+ export interface ScorecardInfo {
2
+ tool_name?: string;
3
+ tool_version?: string;
4
+ }
@@ -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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",