@harnessio/react-ssca-manager-client 0.1.0 → 0.2.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/useDownloadSbomQuery.d.ts +21 -0
- package/dist/ssca-manager/src/services/hooks/useDownloadSbomQuery.js +14 -0
- package/dist/ssca-manager/src/services/hooks/useGetPolicyViolationsQuery.d.ts +7 -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/ArtifactSbomResponseBodyResponse.d.ts +2 -0
- package/dist/ssca-manager/src/services/responses/ArtifactSbomResponseBodyResponse.js +1 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactSbomResponseBody.d.ts +6 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactSbomResponseBody.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ArtifactSbomResponseBodyResponse } from '../responses/ArtifactSbomResponseBodyResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface DownloadSbomQueryPathParams {
|
|
6
|
+
org: string;
|
|
7
|
+
project: string;
|
|
8
|
+
'orchestration-id': string;
|
|
9
|
+
}
|
|
10
|
+
export interface DownloadSbomQueryHeaderParams {
|
|
11
|
+
'Harness-Account'?: string;
|
|
12
|
+
}
|
|
13
|
+
export type DownloadSbomOkResponse = ResponseWithPagination<ArtifactSbomResponseBodyResponse>;
|
|
14
|
+
export type DownloadSbomErrorResponse = unknown;
|
|
15
|
+
export interface DownloadSbomProps extends DownloadSbomQueryPathParams, Omit<FetcherOptions<unknown, unknown, DownloadSbomQueryHeaderParams>, 'url'> {
|
|
16
|
+
}
|
|
17
|
+
export declare function downloadSbom(props: DownloadSbomProps): Promise<DownloadSbomOkResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Download SBOM for an artifact
|
|
20
|
+
*/
|
|
21
|
+
export declare function useDownloadSbomQuery(props: DownloadSbomProps, options?: Omit<UseQueryOptions<DownloadSbomOkResponse, DownloadSbomErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<DownloadSbomOkResponse, 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 downloadSbom(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/orchestration/${props['orchestration-id']}/sbom-download`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Download SBOM for an artifact
|
|
11
|
+
*/
|
|
12
|
+
export function useDownloadSbomQuery(props, options) {
|
|
13
|
+
return useQuery(['downloadSbom', props.org, props.project, props['orchestration-id']], ({ signal }) => downloadSbom(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -12,12 +12,19 @@ export interface GetPolicyViolationsQueryQueryParams {
|
|
|
12
12
|
* @default 30
|
|
13
13
|
*/
|
|
14
14
|
limit?: number;
|
|
15
|
+
/**
|
|
16
|
+
* @default "ASC"
|
|
17
|
+
*/
|
|
15
18
|
order?: 'ASC' | 'DESC';
|
|
16
19
|
/**
|
|
17
20
|
* @default 0
|
|
18
21
|
*/
|
|
19
22
|
page?: number;
|
|
23
|
+
/**
|
|
24
|
+
* @default "name"
|
|
25
|
+
*/
|
|
20
26
|
sort?: 'created' | 'identifier' | 'name' | 'updated';
|
|
27
|
+
search_text?: string;
|
|
21
28
|
}
|
|
22
29
|
export interface GetPolicyViolationsQueryHeaderParams {
|
|
23
30
|
'Harness-Account'?: string;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export type { GetPathParamsType, ResponseWithPagination } from './helpers';
|
|
2
|
+
export type { DownloadSbomErrorResponse, DownloadSbomOkResponse, DownloadSbomProps, DownloadSbomQueryPathParams, } from './hooks/useDownloadSbomQuery';
|
|
3
|
+
export { downloadSbom, useDownloadSbomQuery } from './hooks/useDownloadSbomQuery';
|
|
2
4
|
export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
|
|
3
5
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
6
|
+
export type { ArtifactSbomResponseBodyResponse } from './responses/ArtifactSbomResponseBodyResponse';
|
|
4
7
|
export type { PolicyViolationResponseResponse } from './responses/PolicyViolationResponseResponse';
|
|
8
|
+
export type { ArtifactSbomResponseBody } from './schemas/ArtifactSbomResponseBody';
|
|
5
9
|
export type { PolicyViolation } from './schemas/PolicyViolation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|