@harnessio/react-ssca-manager-client 0.24.0 → 0.25.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/useGetComponentsQuery.d.ts +36 -0
- package/dist/ssca-manager/src/services/hooks/useGetComponentsQuery.js +14 -0
- package/dist/ssca-manager/src/services/index.d.ts +4 -0
- package/dist/ssca-manager/src/services/index.js +1 -0
- package/dist/ssca-manager/src/services/responses/ComponentListResponseBodyResponse.d.ts +2 -0
- package/dist/ssca-manager/src/services/responses/ComponentListResponseBodyResponse.js +1 -0
- package/dist/ssca-manager/src/services/schemas/ComponentDto.d.ts +5 -0
- package/dist/ssca-manager/src/services/schemas/ComponentDto.js +4 -0
- package/package.json +1 -1
|
@@ -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 @@
|
|
|
1
|
+
export {};
|