@harnessio/react-ssca-manager-client 0.1.0 → 0.1.1

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,21 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { TokenIssueResponseBodyResponse } from '../responses/TokenIssueResponseBodyResponse';
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<TokenIssueResponseBodyResponse>;
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(['download-sbom', props.org, props.project, props['orchestration-id']], ({ signal }) => downloadSbom(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -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';
4
6
  export type { PolicyViolationResponseResponse } from './responses/PolicyViolationResponseResponse';
7
+ export type { TokenIssueResponseBodyResponse } from './responses/TokenIssueResponseBodyResponse';
5
8
  export type { PolicyViolation } from './schemas/PolicyViolation';
9
+ export type { TokenIssueResponseBody } from './schemas/TokenIssueResponseBody';
@@ -1 +1,2 @@
1
+ export { downloadSbom, useDownloadSbomQuery } from './hooks/useDownloadSbomQuery';
1
2
  export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
@@ -0,0 +1,2 @@
1
+ import type { TokenIssueResponseBody } from '../schemas/TokenIssueResponseBody';
2
+ export type TokenIssueResponseBodyResponse = TokenIssueResponseBody;
@@ -0,0 +1,6 @@
1
+ export interface TokenIssueResponseBody {
2
+ /**
3
+ * Issued cross-service JWT
4
+ */
5
+ token: string;
6
+ }
@@ -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.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",