@harnessio/react-ssca-manager-client 0.24.0 → 0.26.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.
@@ -0,0 +1,36 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ComponentListResponseBodyResponse } from '../responses/ComponentListResponseBodyResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetComponentsQueryPathParams {
6
+ org: string;
7
+ project: string;
8
+ }
9
+ export interface GetComponentsQueryQueryParams {
10
+ search_term?: string;
11
+ /**
12
+ * @default 30
13
+ */
14
+ limit?: number;
15
+ /**
16
+ * @default "ASC"
17
+ */
18
+ order?: 'ASC' | 'DESC';
19
+ /**
20
+ * @default 0
21
+ */
22
+ page?: number;
23
+ }
24
+ export interface GetComponentsQueryHeaderParams {
25
+ 'Harness-Account'?: string;
26
+ }
27
+ export type GetComponentsOkResponse = ResponseWithPagination<ComponentListResponseBodyResponse>;
28
+ export type GetComponentsErrorResponse = unknown;
29
+ export interface GetComponentsProps extends GetComponentsQueryPathParams, Omit<FetcherOptions<GetComponentsQueryQueryParams, unknown, GetComponentsQueryHeaderParams>, 'url'> {
30
+ queryParams: GetComponentsQueryQueryParams;
31
+ }
32
+ export declare function getComponents(props: GetComponentsProps): Promise<GetComponentsOkResponse>;
33
+ /**
34
+ * Get components for project
35
+ */
36
+ export declare function useGetComponentsQuery(props: GetComponentsProps, options?: Omit<UseQueryOptions<GetComponentsOkResponse, GetComponentsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetComponentsOkResponse, 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 getComponents(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/components`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get components for project
11
+ */
12
+ export function useGetComponentsQuery(props, options) {
13
+ return useQuery(['getComponents', props.org, props.project, props.queryParams], ({ signal }) => getComponents(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -29,6 +29,8 @@ export type { GetBaselineForArtifactErrorResponse, GetBaselineForArtifactOkRespo
29
29
  export { getBaselineForArtifact, useGetBaselineForArtifactQuery, } from './hooks/useGetBaselineForArtifactQuery';
30
30
  export type { GetComponentDriftErrorResponse, GetComponentDriftOkResponse, GetComponentDriftProps, GetComponentDriftQueryPathParams, GetComponentDriftQueryQueryParams, } from './hooks/useGetComponentDriftQuery';
31
31
  export { getComponentDrift, useGetComponentDriftQuery } from './hooks/useGetComponentDriftQuery';
32
+ export type { GetComponentsErrorResponse, GetComponentsOkResponse, GetComponentsProps, GetComponentsQueryPathParams, GetComponentsQueryQueryParams, } from './hooks/useGetComponentsQuery';
33
+ export { getComponents, useGetComponentsQuery } from './hooks/useGetComponentsQuery';
32
34
  export type { GetDeploymentsListForArtifactInRemediationErrorResponse, GetDeploymentsListForArtifactInRemediationOkResponse, GetDeploymentsListForArtifactInRemediationProps, GetDeploymentsListForArtifactInRemediationQueryPathParams, GetDeploymentsListForArtifactInRemediationQueryQueryParams, GetDeploymentsListForArtifactInRemediationRequestBody, } from './hooks/useGetDeploymentsListForArtifactInRemediationQuery';
33
35
  export { getDeploymentsListForArtifactInRemediation, useGetDeploymentsListForArtifactInRemediationQuery, } from './hooks/useGetDeploymentsListForArtifactInRemediationQuery';
34
36
  export type { GetEnvironmentListForRemediationErrorResponse, GetEnvironmentListForRemediationOkResponse, GetEnvironmentListForRemediationProps, GetEnvironmentListForRemediationQueryPathParams, GetEnvironmentListForRemediationQueryQueryParams, } from './hooks/useGetEnvironmentListForRemediationQuery';
@@ -71,6 +73,7 @@ export type { ArtifactSbomDriftResponseBodyResponse } from './responses/Artifact
71
73
  export type { ArtifactSbomResponseBodyResponse } from './responses/ArtifactSbomResponseBodyResponse';
72
74
  export type { BaselineResponseBodyResponse } from './responses/BaselineResponseBodyResponse';
73
75
  export type { ComponentDriftResponseBodyResponse } from './responses/ComponentDriftResponseBodyResponse';
76
+ export type { ComponentListResponseBodyResponse } from './responses/ComponentListResponseBodyResponse';
74
77
  export type { CreateTicketResponseBodyResponse } from './responses/CreateTicketResponseBodyResponse';
75
78
  export type { LicenseDriftResponseBodyResponse } from './responses/LicenseDriftResponseBodyResponse';
76
79
  export type { PolicyViolationResponseResponse } from './responses/PolicyViolationResponseResponse';
@@ -103,6 +106,7 @@ export type { BaselineResponseBody } from './schemas/BaselineResponseBody';
103
106
  export type { CategoryScorecard } from './schemas/CategoryScorecard';
104
107
  export type { ComponentDrift } from './schemas/ComponentDrift';
105
108
  export type { ComponentDriftSummary } from './schemas/ComponentDriftSummary';
109
+ export type { ComponentDto } from './schemas/ComponentDto';
106
110
  export type { ComponentFilter } from './schemas/ComponentFilter';
107
111
  export type { ComponentSummary } from './schemas/ComponentSummary';
108
112
  export type { ContactInfo } from './schemas/ContactInfo';
@@ -13,6 +13,7 @@ export { getArtifactInRemediationDetails, useGetArtifactInRemediationDetailsQuer
13
13
  export { getArtifactListForRemediation, useGetArtifactListForRemediationQuery, } from './hooks/useGetArtifactListForRemediationQuery';
14
14
  export { getBaselineForArtifact, useGetBaselineForArtifactQuery, } from './hooks/useGetBaselineForArtifactQuery';
15
15
  export { getComponentDrift, useGetComponentDriftQuery } from './hooks/useGetComponentDriftQuery';
16
+ export { getComponents, useGetComponentsQuery } from './hooks/useGetComponentsQuery';
16
17
  export { getDeploymentsListForArtifactInRemediation, useGetDeploymentsListForArtifactInRemediationQuery, } from './hooks/useGetDeploymentsListForArtifactInRemediationQuery';
17
18
  export { getEnvironmentListForRemediation, useGetEnvironmentListForRemediationQuery, } from './hooks/useGetEnvironmentListForRemediationQuery';
18
19
  export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
@@ -0,0 +1,2 @@
1
+ import type { ComponentDto } from '../schemas/ComponentDto';
2
+ export type ComponentListResponseBodyResponse = ComponentDto[];
@@ -35,6 +35,10 @@ export interface ArtifactDetailResponse {
35
35
  * Count of production env in which artifact is deployed
36
36
  */
37
37
  prod_env_count?: number;
38
+ scorecard?: {
39
+ avg_score?: string;
40
+ max_score?: string;
41
+ };
38
42
  /**
39
43
  * Version of the artifact
40
44
  */
@@ -0,0 +1,5 @@
1
+ export interface ComponentDto {
2
+ name?: string;
3
+ org?: string;
4
+ project?: string;
5
+ }
@@ -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.24.0",
3
+ "version": "0.26.0",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",