@harnessio/react-ssca-manager-client 0.1.1 → 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 +2 -2
- package/dist/ssca-manager/src/services/hooks/useDownloadSbomQuery.js +1 -1
- package/dist/ssca-manager/src/services/hooks/useGetPolicyViolationsQuery.d.ts +7 -0
- package/dist/ssca-manager/src/services/index.d.ts +2 -2
- package/dist/ssca-manager/src/services/responses/ArtifactSbomResponseBodyResponse.d.ts +2 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactSbomResponseBody.d.ts +6 -0
- package/package.json +1 -1
- package/dist/ssca-manager/src/services/responses/TokenIssueResponseBodyResponse.d.ts +0 -2
- package/dist/ssca-manager/src/services/schemas/TokenIssueResponseBody.d.ts +0 -6
- /package/dist/ssca-manager/src/services/responses/{TokenIssueResponseBodyResponse.js → ArtifactSbomResponseBodyResponse.js} +0 -0
- /package/dist/ssca-manager/src/services/schemas/{TokenIssueResponseBody.js → ArtifactSbomResponseBody.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ArtifactSbomResponseBodyResponse } from '../responses/ArtifactSbomResponseBodyResponse';
|
|
3
3
|
import type { ResponseWithPagination } from '../helpers';
|
|
4
4
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
5
|
export interface DownloadSbomQueryPathParams {
|
|
@@ -10,7 +10,7 @@ export interface DownloadSbomQueryPathParams {
|
|
|
10
10
|
export interface DownloadSbomQueryHeaderParams {
|
|
11
11
|
'Harness-Account'?: string;
|
|
12
12
|
}
|
|
13
|
-
export type DownloadSbomOkResponse = ResponseWithPagination<
|
|
13
|
+
export type DownloadSbomOkResponse = ResponseWithPagination<ArtifactSbomResponseBodyResponse>;
|
|
14
14
|
export type DownloadSbomErrorResponse = unknown;
|
|
15
15
|
export interface DownloadSbomProps extends DownloadSbomQueryPathParams, Omit<FetcherOptions<unknown, unknown, DownloadSbomQueryHeaderParams>, 'url'> {
|
|
16
16
|
}
|
|
@@ -10,5 +10,5 @@ export function downloadSbom(props) {
|
|
|
10
10
|
* Download SBOM for an artifact
|
|
11
11
|
*/
|
|
12
12
|
export function useDownloadSbomQuery(props, options) {
|
|
13
|
-
return useQuery(['
|
|
13
|
+
return useQuery(['downloadSbom', props.org, props.project, props['orchestration-id']], ({ signal }) => downloadSbom(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
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;
|
|
@@ -3,7 +3,7 @@ export type { DownloadSbomErrorResponse, DownloadSbomOkResponse, DownloadSbomPro
|
|
|
3
3
|
export { downloadSbom, useDownloadSbomQuery } from './hooks/useDownloadSbomQuery';
|
|
4
4
|
export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
|
|
5
5
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
6
|
+
export type { ArtifactSbomResponseBodyResponse } from './responses/ArtifactSbomResponseBodyResponse';
|
|
6
7
|
export type { PolicyViolationResponseResponse } from './responses/PolicyViolationResponseResponse';
|
|
7
|
-
export type {
|
|
8
|
+
export type { ArtifactSbomResponseBody } from './schemas/ArtifactSbomResponseBody';
|
|
8
9
|
export type { PolicyViolation } from './schemas/PolicyViolation';
|
|
9
|
-
export type { TokenIssueResponseBody } from './schemas/TokenIssueResponseBody';
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|