@harnessio/react-ssca-manager-client 0.84.11 → 0.84.12
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/useDownloadAttestationQuery.d.ts +21 -0
- package/dist/ssca-manager/src/services/hooks/useDownloadAttestationQuery.js +14 -0
- package/dist/ssca-manager/src/services/index.d.ts +2 -0
- package/dist/ssca-manager/src/services/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AttestationDownloadResponseResponse } from '../responses/AttestationDownloadResponseResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface DownloadAttestationQueryPathParams {
|
|
6
|
+
org: string;
|
|
7
|
+
project: string;
|
|
8
|
+
digest: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DownloadAttestationQueryHeaderParams {
|
|
11
|
+
'Harness-Account': string;
|
|
12
|
+
}
|
|
13
|
+
export type DownloadAttestationOkResponse = ResponseWithPagination<AttestationDownloadResponseResponse>;
|
|
14
|
+
export type DownloadAttestationErrorResponse = unknown;
|
|
15
|
+
export interface DownloadAttestationProps extends DownloadAttestationQueryPathParams, Omit<FetcherOptions<unknown, unknown, DownloadAttestationQueryHeaderParams>, 'url'> {
|
|
16
|
+
}
|
|
17
|
+
export declare function downloadAttestation(props: DownloadAttestationProps): Promise<DownloadAttestationOkResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Download DSSE attestation envelope by digest
|
|
20
|
+
*/
|
|
21
|
+
export declare function useDownloadAttestationQuery(props: DownloadAttestationProps, options?: Omit<UseQueryOptions<DownloadAttestationOkResponse, DownloadAttestationErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<DownloadAttestationOkResponse, 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 downloadAttestation(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v2/orgs/${props.org}/projects/${props.project}/attestations/download/${props.digest}`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Download DSSE attestation envelope by digest
|
|
11
|
+
*/
|
|
12
|
+
export function useDownloadAttestationQuery(props, options) {
|
|
13
|
+
return useQuery(['downloadAttestation', props.org, props.project, props.digest], ({ signal }) => downloadAttestation(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -23,6 +23,8 @@ export type { CreateTicketErrorResponse, CreateTicketMutationPathParams, CreateT
|
|
|
23
23
|
export { createTicket, useCreateTicketMutation } from './hooks/useCreateTicketMutation';
|
|
24
24
|
export type { DeleteIntegrationErrorResponse, DeleteIntegrationMutationPathParams, DeleteIntegrationOkResponse, DeleteIntegrationProps, } from './hooks/useDeleteIntegrationMutation';
|
|
25
25
|
export { deleteIntegration, useDeleteIntegrationMutation, } from './hooks/useDeleteIntegrationMutation';
|
|
26
|
+
export type { DownloadAttestationErrorResponse, DownloadAttestationOkResponse, DownloadAttestationProps, DownloadAttestationQueryPathParams, } from './hooks/useDownloadAttestationQuery';
|
|
27
|
+
export { downloadAttestation, useDownloadAttestationQuery, } from './hooks/useDownloadAttestationQuery';
|
|
26
28
|
export type { DownloadSbomErrorResponse, DownloadSbomOkResponse, DownloadSbomProps, DownloadSbomQueryPathParams, } from './hooks/useDownloadSbomQuery';
|
|
27
29
|
export { downloadSbom, useDownloadSbomQuery } from './hooks/useDownloadSbomQuery';
|
|
28
30
|
export type { ExcludeArtifactErrorResponse, ExcludeArtifactMutationPathParams, ExcludeArtifactOkResponse, ExcludeArtifactProps, ExcludeArtifactRequestBody, } from './hooks/useExcludeArtifactMutation';
|
|
@@ -10,6 +10,7 @@ export { createRemediationPullRequest, useCreateRemediationPullRequestMutation,
|
|
|
10
10
|
export { createRemediationTracker, useCreateRemediationTrackerMutation, } from './hooks/useCreateRemediationTrackerMutation';
|
|
11
11
|
export { createTicket, useCreateTicketMutation } from './hooks/useCreateTicketMutation';
|
|
12
12
|
export { deleteIntegration, useDeleteIntegrationMutation, } from './hooks/useDeleteIntegrationMutation';
|
|
13
|
+
export { downloadAttestation, useDownloadAttestationQuery, } from './hooks/useDownloadAttestationQuery';
|
|
13
14
|
export { downloadSbom, useDownloadSbomQuery } from './hooks/useDownloadSbomQuery';
|
|
14
15
|
export { excludeArtifact, useExcludeArtifactMutation } from './hooks/useExcludeArtifactMutation';
|
|
15
16
|
export { fetchComplianceResultsByArtifact, useFetchComplianceResultsByArtifactQuery, } from './hooks/useFetchComplianceResultsByArtifactQuery';
|