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