@harnessio/react-ssca-manager-client 0.3.0 → 0.4.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/useGetArtifactDetailComponentViewMutation.d.ts +1 -4
- package/dist/ssca-manager/src/services/hooks/useGetPolicyViolationsQuery.d.ts +1 -4
- package/dist/ssca-manager/src/services/hooks/{useListArtifactsMutation.d.ts → useListArtifactsQuery.d.ts} +8 -11
- package/dist/ssca-manager/src/services/hooks/{useListArtifactsMutation.js → useListArtifactsQuery.js} +3 -3
- package/dist/ssca-manager/src/services/hooks/useListLatestArtifactsQuery.d.ts +36 -0
- package/dist/ssca-manager/src/services/hooks/{useListLatestArtifactsMutation.js → useListLatestArtifactsQuery.js} +3 -3
- package/dist/ssca-manager/src/services/index.d.ts +4 -4
- package/dist/ssca-manager/src/services/index.js +2 -2
- package/dist/ssca-manager/src/services/schemas/ArtifactListingResponse.d.ts +1 -0
- package/package.json +1 -1
- package/dist/ssca-manager/src/services/hooks/useListLatestArtifactsMutation.d.ts +0 -39
|
@@ -22,10 +22,7 @@ export interface GetArtifactDetailComponentViewMutationQueryParams {
|
|
|
22
22
|
* @default 0
|
|
23
23
|
*/
|
|
24
24
|
page?: number;
|
|
25
|
-
|
|
26
|
-
* @default "name"
|
|
27
|
-
*/
|
|
28
|
-
sort?: 'created' | 'identifier' | 'license' | 'name' | 'supplier' | 'updated';
|
|
25
|
+
sort?: {};
|
|
29
26
|
}
|
|
30
27
|
export interface GetArtifactDetailComponentViewMutationHeaderParams {
|
|
31
28
|
'Harness-Account'?: string;
|
|
@@ -20,10 +20,7 @@ export interface GetPolicyViolationsQueryQueryParams {
|
|
|
20
20
|
* @default 0
|
|
21
21
|
*/
|
|
22
22
|
page?: number;
|
|
23
|
-
|
|
24
|
-
* @default "name"
|
|
25
|
-
*/
|
|
26
|
-
sort?: 'created' | 'identifier' | 'license' | 'name' | 'supplier' | 'updated';
|
|
23
|
+
sort?: {};
|
|
27
24
|
search_text?: string;
|
|
28
25
|
}
|
|
29
26
|
export interface GetPolicyViolationsQueryHeaderParams {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { ArtifactListingResponseBodyResponse } from '../responses/ArtifactListingResponseBodyResponse';
|
|
3
3
|
import type { ArtifactListingRequestBodyRequestBody } from '../requestBodies/ArtifactListingRequestBodyRequestBody';
|
|
4
4
|
import type { ResponseWithPagination } from '../helpers';
|
|
5
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
-
export interface
|
|
6
|
+
export interface ListArtifactsQueryPathParams {
|
|
7
7
|
org: string;
|
|
8
8
|
project: string;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface ListArtifactsQueryQueryParams {
|
|
11
11
|
/**
|
|
12
12
|
* @default 30
|
|
13
13
|
*/
|
|
@@ -20,23 +20,20 @@ export interface ListArtifactsMutationQueryParams {
|
|
|
20
20
|
* @default 0
|
|
21
21
|
*/
|
|
22
22
|
page?: number;
|
|
23
|
-
|
|
24
|
-
* @default "name"
|
|
25
|
-
*/
|
|
26
|
-
sort?: 'created' | 'identifier' | 'license' | 'name' | 'supplier' | 'updated';
|
|
23
|
+
sort?: {};
|
|
27
24
|
}
|
|
28
|
-
export interface
|
|
25
|
+
export interface ListArtifactsQueryHeaderParams {
|
|
29
26
|
'Harness-Account'?: string;
|
|
30
27
|
}
|
|
31
28
|
export type ListArtifactsRequestBody = ArtifactListingRequestBodyRequestBody;
|
|
32
29
|
export type ListArtifactsOkResponse = ResponseWithPagination<ArtifactListingResponseBodyResponse>;
|
|
33
30
|
export type ListArtifactsErrorResponse = unknown;
|
|
34
|
-
export interface ListArtifactsProps extends
|
|
35
|
-
queryParams:
|
|
31
|
+
export interface ListArtifactsProps extends ListArtifactsQueryPathParams, Omit<FetcherOptions<ListArtifactsQueryQueryParams, ListArtifactsRequestBody, ListArtifactsQueryHeaderParams>, 'url'> {
|
|
32
|
+
queryParams: ListArtifactsQueryQueryParams;
|
|
36
33
|
body: ListArtifactsRequestBody;
|
|
37
34
|
}
|
|
38
35
|
export declare function listArtifacts(props: ListArtifactsProps): Promise<ListArtifactsOkResponse>;
|
|
39
36
|
/**
|
|
40
37
|
* List all artifacts
|
|
41
38
|
*/
|
|
42
|
-
export declare function
|
|
39
|
+
export declare function useListArtifactsQuery(props: ListArtifactsProps, options?: Omit<UseQueryOptions<ListArtifactsOkResponse, ListArtifactsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListArtifactsOkResponse, unknown>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
3
|
// Please do not modify this code directly.
|
|
4
|
-
import {
|
|
4
|
+
import { useQuery } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function listArtifacts(props) {
|
|
7
7
|
return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/artifacts`, method: 'POST' }, props));
|
|
@@ -9,6 +9,6 @@ export function listArtifacts(props) {
|
|
|
9
9
|
/**
|
|
10
10
|
* List all artifacts
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
13
|
-
return
|
|
12
|
+
export function useListArtifactsQuery(props, options) {
|
|
13
|
+
return useQuery(['listArtifacts', props.org, props.project, props.queryParams, props.body], ({ signal }) => listArtifacts(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
14
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ArtifactListingResponseBodyResponse } from '../responses/ArtifactListingResponseBodyResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface ListLatestArtifactsQueryPathParams {
|
|
6
|
+
org: string;
|
|
7
|
+
project: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ListLatestArtifactsQueryQueryParams {
|
|
10
|
+
/**
|
|
11
|
+
* @default 30
|
|
12
|
+
*/
|
|
13
|
+
limit?: number;
|
|
14
|
+
/**
|
|
15
|
+
* @default "ASC"
|
|
16
|
+
*/
|
|
17
|
+
order?: 'ASC' | 'DESC';
|
|
18
|
+
/**
|
|
19
|
+
* @default 0
|
|
20
|
+
*/
|
|
21
|
+
page?: number;
|
|
22
|
+
sort?: {};
|
|
23
|
+
}
|
|
24
|
+
export interface ListLatestArtifactsQueryHeaderParams {
|
|
25
|
+
'Harness-Account'?: string;
|
|
26
|
+
}
|
|
27
|
+
export type ListLatestArtifactsOkResponse = ResponseWithPagination<ArtifactListingResponseBodyResponse>;
|
|
28
|
+
export type ListLatestArtifactsErrorResponse = unknown;
|
|
29
|
+
export interface ListLatestArtifactsProps extends ListLatestArtifactsQueryPathParams, Omit<FetcherOptions<ListLatestArtifactsQueryQueryParams, unknown, ListLatestArtifactsQueryHeaderParams>, 'url'> {
|
|
30
|
+
queryParams: ListLatestArtifactsQueryQueryParams;
|
|
31
|
+
}
|
|
32
|
+
export declare function listLatestArtifacts(props: ListLatestArtifactsProps): Promise<ListLatestArtifactsOkResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* List latest version of all artifacts
|
|
35
|
+
*/
|
|
36
|
+
export declare function useListLatestArtifactsQuery(props: ListLatestArtifactsProps, options?: Omit<UseQueryOptions<ListLatestArtifactsOkResponse, ListLatestArtifactsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListLatestArtifactsOkResponse, unknown>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
3
|
// Please do not modify this code directly.
|
|
4
|
-
import {
|
|
4
|
+
import { useQuery } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function listLatestArtifacts(props) {
|
|
7
7
|
return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/grouped-artifacts`, method: 'POST' }, props));
|
|
@@ -9,6 +9,6 @@ export function listLatestArtifacts(props) {
|
|
|
9
9
|
/**
|
|
10
10
|
* List latest version of all artifacts
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
13
|
-
return
|
|
12
|
+
export function useListLatestArtifactsQuery(props, options) {
|
|
13
|
+
return useQuery(['listLatestArtifacts', props.org, props.project, props.queryParams], ({ signal }) => listLatestArtifacts(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
14
|
}
|
|
@@ -5,10 +5,10 @@ export type { GetArtifactDetailComponentViewErrorResponse, GetArtifactDetailComp
|
|
|
5
5
|
export { getArtifactDetailComponentView, useGetArtifactDetailComponentViewMutation, } from './hooks/useGetArtifactDetailComponentViewMutation';
|
|
6
6
|
export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
|
|
7
7
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
8
|
-
export type { ListArtifactsErrorResponse,
|
|
9
|
-
export { listArtifacts,
|
|
10
|
-
export type { ListLatestArtifactsErrorResponse,
|
|
11
|
-
export { listLatestArtifacts,
|
|
8
|
+
export type { ListArtifactsErrorResponse, ListArtifactsOkResponse, ListArtifactsProps, ListArtifactsQueryPathParams, ListArtifactsQueryQueryParams, ListArtifactsRequestBody, } from './hooks/useListArtifactsQuery';
|
|
9
|
+
export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
|
|
10
|
+
export type { ListLatestArtifactsErrorResponse, ListLatestArtifactsOkResponse, ListLatestArtifactsProps, ListLatestArtifactsQueryPathParams, ListLatestArtifactsQueryQueryParams, } from './hooks/useListLatestArtifactsQuery';
|
|
11
|
+
export { listLatestArtifacts, useListLatestArtifactsQuery, } from './hooks/useListLatestArtifactsQuery';
|
|
12
12
|
export type { ArtifactListingRequestBodyRequestBody } from './requestBodies/ArtifactListingRequestBodyRequestBody';
|
|
13
13
|
export type { ArtifactComponentViewResponseBodyResponse } from './responses/ArtifactComponentViewResponseBodyResponse';
|
|
14
14
|
export type { ArtifactListingResponseBodyResponse } from './responses/ArtifactListingResponseBodyResponse';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { downloadSbom, useDownloadSbomQuery } from './hooks/useDownloadSbomQuery';
|
|
2
2
|
export { getArtifactDetailComponentView, useGetArtifactDetailComponentViewMutation, } from './hooks/useGetArtifactDetailComponentViewMutation';
|
|
3
3
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
4
|
-
export { listArtifacts,
|
|
5
|
-
export { listLatestArtifacts,
|
|
4
|
+
export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
|
|
5
|
+
export { listLatestArtifacts, useListLatestArtifactsQuery, } from './hooks/useListLatestArtifactsQuery';
|
package/package.json
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { ArtifactListingResponseBodyResponse } from '../responses/ArtifactListingResponseBodyResponse';
|
|
3
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
-
export interface ListLatestArtifactsMutationPathParams {
|
|
6
|
-
org: string;
|
|
7
|
-
project: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ListLatestArtifactsMutationQueryParams {
|
|
10
|
-
/**
|
|
11
|
-
* @default 30
|
|
12
|
-
*/
|
|
13
|
-
limit?: number;
|
|
14
|
-
/**
|
|
15
|
-
* @default "ASC"
|
|
16
|
-
*/
|
|
17
|
-
order?: 'ASC' | 'DESC';
|
|
18
|
-
/**
|
|
19
|
-
* @default 0
|
|
20
|
-
*/
|
|
21
|
-
page?: number;
|
|
22
|
-
/**
|
|
23
|
-
* @default "name"
|
|
24
|
-
*/
|
|
25
|
-
sort?: 'created' | 'identifier' | 'license' | 'name' | 'supplier' | 'updated';
|
|
26
|
-
}
|
|
27
|
-
export interface ListLatestArtifactsMutationHeaderParams {
|
|
28
|
-
'Harness-Account'?: string;
|
|
29
|
-
}
|
|
30
|
-
export type ListLatestArtifactsOkResponse = ResponseWithPagination<ArtifactListingResponseBodyResponse>;
|
|
31
|
-
export type ListLatestArtifactsErrorResponse = unknown;
|
|
32
|
-
export interface ListLatestArtifactsProps extends ListLatestArtifactsMutationPathParams, Omit<FetcherOptions<ListLatestArtifactsMutationQueryParams, unknown, ListLatestArtifactsMutationHeaderParams>, 'url'> {
|
|
33
|
-
queryParams: ListLatestArtifactsMutationQueryParams;
|
|
34
|
-
}
|
|
35
|
-
export declare function listLatestArtifacts(props: ListLatestArtifactsProps): Promise<ListLatestArtifactsOkResponse>;
|
|
36
|
-
/**
|
|
37
|
-
* List latest version of all artifacts
|
|
38
|
-
*/
|
|
39
|
-
export declare function useListLatestArtifactsMutation(options?: Omit<UseMutationOptions<ListLatestArtifactsOkResponse, ListLatestArtifactsErrorResponse, ListLatestArtifactsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ListLatestArtifactsOkResponse, unknown, ListLatestArtifactsProps, unknown>;
|