@harnessio/react-ssca-manager-client 0.2.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 +41 -0
- package/dist/ssca-manager/src/services/hooks/useGetArtifactDetailComponentViewMutation.js +14 -0
- package/dist/ssca-manager/src/services/hooks/useGetPolicyViolationsQuery.d.ts +1 -4
- package/dist/ssca-manager/src/services/hooks/useListArtifactsQuery.d.ts +39 -0
- package/dist/ssca-manager/src/services/hooks/useListArtifactsQuery.js +14 -0
- package/dist/ssca-manager/src/services/hooks/useListLatestArtifactsQuery.d.ts +36 -0
- package/dist/ssca-manager/src/services/hooks/useListLatestArtifactsQuery.js +14 -0
- package/dist/ssca-manager/src/services/index.d.ts +13 -0
- package/dist/ssca-manager/src/services/index.js +3 -0
- package/dist/ssca-manager/src/services/requestBodies/ArtifactListingRequestBodyRequestBody.d.ts +2 -0
- package/dist/ssca-manager/src/services/requestBodies/ArtifactListingRequestBodyRequestBody.js +1 -0
- package/dist/ssca-manager/src/services/responses/ArtifactComponentViewResponseBodyResponse.d.ts +2 -0
- package/dist/ssca-manager/src/services/responses/ArtifactComponentViewResponseBodyResponse.js +1 -0
- package/dist/ssca-manager/src/services/responses/ArtifactListingResponseBodyResponse.d.ts +2 -0
- package/dist/ssca-manager/src/services/responses/ArtifactListingResponseBodyResponse.js +1 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactComponentViewRequestBody.d.ts +13 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactComponentViewRequestBody.js +4 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactComponentViewResponse.d.ts +8 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactComponentViewResponse.js +4 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactListingRequestBody.d.ts +14 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactListingRequestBody.js +4 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactListingResponse.d.ts +14 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactListingResponse.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ArtifactComponentViewResponseBodyResponse } from '../responses/ArtifactComponentViewResponseBodyResponse';
|
|
3
|
+
import type { ArtifactComponentViewRequestBody } from '../schemas/ArtifactComponentViewRequestBody';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface GetArtifactDetailComponentViewMutationPathParams {
|
|
7
|
+
org: string;
|
|
8
|
+
project: string;
|
|
9
|
+
artifact: string;
|
|
10
|
+
tag: string;
|
|
11
|
+
}
|
|
12
|
+
export interface GetArtifactDetailComponentViewMutationQueryParams {
|
|
13
|
+
/**
|
|
14
|
+
* @default 30
|
|
15
|
+
*/
|
|
16
|
+
limit?: number;
|
|
17
|
+
/**
|
|
18
|
+
* @default "ASC"
|
|
19
|
+
*/
|
|
20
|
+
order?: 'ASC' | 'DESC';
|
|
21
|
+
/**
|
|
22
|
+
* @default 0
|
|
23
|
+
*/
|
|
24
|
+
page?: number;
|
|
25
|
+
sort?: {};
|
|
26
|
+
}
|
|
27
|
+
export interface GetArtifactDetailComponentViewMutationHeaderParams {
|
|
28
|
+
'Harness-Account'?: string;
|
|
29
|
+
}
|
|
30
|
+
export type GetArtifactDetailComponentViewRequestBody = ArtifactComponentViewRequestBody;
|
|
31
|
+
export type GetArtifactDetailComponentViewOkResponse = ResponseWithPagination<ArtifactComponentViewResponseBodyResponse>;
|
|
32
|
+
export type GetArtifactDetailComponentViewErrorResponse = unknown;
|
|
33
|
+
export interface GetArtifactDetailComponentViewProps extends GetArtifactDetailComponentViewMutationPathParams, Omit<FetcherOptions<GetArtifactDetailComponentViewMutationQueryParams, GetArtifactDetailComponentViewRequestBody, GetArtifactDetailComponentViewMutationHeaderParams>, 'url'> {
|
|
34
|
+
queryParams: GetArtifactDetailComponentViewMutationQueryParams;
|
|
35
|
+
body: GetArtifactDetailComponentViewRequestBody;
|
|
36
|
+
}
|
|
37
|
+
export declare function getArtifactDetailComponentView(props: GetArtifactDetailComponentViewProps): Promise<GetArtifactDetailComponentViewOkResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Get artifact detail component view
|
|
40
|
+
*/
|
|
41
|
+
export declare function useGetArtifactDetailComponentViewMutation(options?: Omit<UseMutationOptions<GetArtifactDetailComponentViewOkResponse, GetArtifactDetailComponentViewErrorResponse, GetArtifactDetailComponentViewProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<GetArtifactDetailComponentViewOkResponse, unknown, GetArtifactDetailComponentViewProps, 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 { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function getArtifactDetailComponentView(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/artifact/${props.artifact}/tag/${props.tag}/components`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get artifact detail component view
|
|
11
|
+
*/
|
|
12
|
+
export function useGetArtifactDetailComponentViewMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => getArtifactDetailComponentView(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -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' | 'name' | 'updated';
|
|
23
|
+
sort?: {};
|
|
27
24
|
search_text?: string;
|
|
28
25
|
}
|
|
29
26
|
export interface GetPolicyViolationsQueryHeaderParams {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ArtifactListingResponseBodyResponse } from '../responses/ArtifactListingResponseBodyResponse';
|
|
3
|
+
import type { ArtifactListingRequestBodyRequestBody } from '../requestBodies/ArtifactListingRequestBodyRequestBody';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface ListArtifactsQueryPathParams {
|
|
7
|
+
org: string;
|
|
8
|
+
project: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ListArtifactsQueryQueryParams {
|
|
11
|
+
/**
|
|
12
|
+
* @default 30
|
|
13
|
+
*/
|
|
14
|
+
limit?: number;
|
|
15
|
+
/**
|
|
16
|
+
* @default "ASC"
|
|
17
|
+
*/
|
|
18
|
+
order?: 'ASC' | 'DESC';
|
|
19
|
+
/**
|
|
20
|
+
* @default 0
|
|
21
|
+
*/
|
|
22
|
+
page?: number;
|
|
23
|
+
sort?: {};
|
|
24
|
+
}
|
|
25
|
+
export interface ListArtifactsQueryHeaderParams {
|
|
26
|
+
'Harness-Account'?: string;
|
|
27
|
+
}
|
|
28
|
+
export type ListArtifactsRequestBody = ArtifactListingRequestBodyRequestBody;
|
|
29
|
+
export type ListArtifactsOkResponse = ResponseWithPagination<ArtifactListingResponseBodyResponse>;
|
|
30
|
+
export type ListArtifactsErrorResponse = unknown;
|
|
31
|
+
export interface ListArtifactsProps extends ListArtifactsQueryPathParams, Omit<FetcherOptions<ListArtifactsQueryQueryParams, ListArtifactsRequestBody, ListArtifactsQueryHeaderParams>, 'url'> {
|
|
32
|
+
queryParams: ListArtifactsQueryQueryParams;
|
|
33
|
+
body: ListArtifactsRequestBody;
|
|
34
|
+
}
|
|
35
|
+
export declare function listArtifacts(props: ListArtifactsProps): Promise<ListArtifactsOkResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* List all artifacts
|
|
38
|
+
*/
|
|
39
|
+
export declare function useListArtifactsQuery(props: ListArtifactsProps, options?: Omit<UseQueryOptions<ListArtifactsOkResponse, ListArtifactsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListArtifactsOkResponse, 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 listArtifacts(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/artifacts`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List all artifacts
|
|
11
|
+
*/
|
|
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
|
+
}
|
|
@@ -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>;
|
|
@@ -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 listLatestArtifacts(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/grouped-artifacts`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List latest version of all artifacts
|
|
11
|
+
*/
|
|
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
|
+
}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
export type { GetPathParamsType, ResponseWithPagination } from './helpers';
|
|
2
2
|
export type { DownloadSbomErrorResponse, DownloadSbomOkResponse, DownloadSbomProps, DownloadSbomQueryPathParams, } from './hooks/useDownloadSbomQuery';
|
|
3
3
|
export { downloadSbom, useDownloadSbomQuery } from './hooks/useDownloadSbomQuery';
|
|
4
|
+
export type { GetArtifactDetailComponentViewErrorResponse, GetArtifactDetailComponentViewMutationPathParams, GetArtifactDetailComponentViewMutationQueryParams, GetArtifactDetailComponentViewOkResponse, GetArtifactDetailComponentViewProps, GetArtifactDetailComponentViewRequestBody, } from './hooks/useGetArtifactDetailComponentViewMutation';
|
|
5
|
+
export { getArtifactDetailComponentView, useGetArtifactDetailComponentViewMutation, } from './hooks/useGetArtifactDetailComponentViewMutation';
|
|
4
6
|
export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
|
|
5
7
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
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
|
+
export type { ArtifactListingRequestBodyRequestBody } from './requestBodies/ArtifactListingRequestBodyRequestBody';
|
|
13
|
+
export type { ArtifactComponentViewResponseBodyResponse } from './responses/ArtifactComponentViewResponseBodyResponse';
|
|
14
|
+
export type { ArtifactListingResponseBodyResponse } from './responses/ArtifactListingResponseBodyResponse';
|
|
6
15
|
export type { ArtifactSbomResponseBodyResponse } from './responses/ArtifactSbomResponseBodyResponse';
|
|
7
16
|
export type { PolicyViolationResponseResponse } from './responses/PolicyViolationResponseResponse';
|
|
17
|
+
export type { ArtifactComponentViewRequestBody } from './schemas/ArtifactComponentViewRequestBody';
|
|
18
|
+
export type { ArtifactComponentViewResponse } from './schemas/ArtifactComponentViewResponse';
|
|
19
|
+
export type { ArtifactListingRequestBody } from './schemas/ArtifactListingRequestBody';
|
|
20
|
+
export type { ArtifactListingResponse } from './schemas/ArtifactListingResponse';
|
|
8
21
|
export type { ArtifactSbomResponseBody } from './schemas/ArtifactSbomResponseBody';
|
|
9
22
|
export type { PolicyViolation } from './schemas/PolicyViolation';
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { downloadSbom, useDownloadSbomQuery } from './hooks/useDownloadSbomQuery';
|
|
2
|
+
export { getArtifactDetailComponentView, useGetArtifactDetailComponentViewMutation, } from './hooks/useGetArtifactDetailComponentViewMutation';
|
|
2
3
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
4
|
+
export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
|
|
5
|
+
export { listLatestArtifacts, useListLatestArtifactsQuery, } from './hooks/useListLatestArtifactsQuery';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ArtifactComponentViewRequestBody {
|
|
2
|
+
component_filter?: {
|
|
3
|
+
field_name?: string;
|
|
4
|
+
operator?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
};
|
|
7
|
+
license_filter?: {
|
|
8
|
+
operator?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
};
|
|
11
|
+
package_manager?: string;
|
|
12
|
+
supplier?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ArtifactListingRequestBody {
|
|
2
|
+
component_filter?: {
|
|
3
|
+
field_name?: 'ComponentName' | 'ComponentVersion';
|
|
4
|
+
operator?: 'EQ';
|
|
5
|
+
value?: string;
|
|
6
|
+
};
|
|
7
|
+
environment_type?: 'All' | 'NonProd' | 'None' | 'Prod';
|
|
8
|
+
license_filter?: {
|
|
9
|
+
operator?: 'EQ';
|
|
10
|
+
value?: string;
|
|
11
|
+
};
|
|
12
|
+
policy_violation?: 'ALLOW' | 'DENY';
|
|
13
|
+
search_term?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ArtifactListingResponse {
|
|
2
|
+
activity?: 'DEPLOYED' | 'GENERATED';
|
|
3
|
+
allow_list_violation_count?: number;
|
|
4
|
+
artifact_id: string;
|
|
5
|
+
artifact_name: string;
|
|
6
|
+
components_count?: number;
|
|
7
|
+
deny_list_violation_count?: number;
|
|
8
|
+
enforcement_id?: string;
|
|
9
|
+
non_prod_env_count?: number;
|
|
10
|
+
prod_env_count?: number;
|
|
11
|
+
sbom_url?: string;
|
|
12
|
+
tag: string;
|
|
13
|
+
updated_at?: string;
|
|
14
|
+
}
|