@harnessio/react-ssca-manager-client 0.2.0 → 0.3.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 +44 -0
- package/dist/ssca-manager/src/services/hooks/useGetArtifactDetailComponentViewMutation.js +14 -0
- package/dist/ssca-manager/src/services/hooks/useGetPolicyViolationsQuery.d.ts +1 -1
- package/dist/ssca-manager/src/services/hooks/useListArtifactsMutation.d.ts +42 -0
- package/dist/ssca-manager/src/services/hooks/useListArtifactsMutation.js +14 -0
- package/dist/ssca-manager/src/services/hooks/useListLatestArtifactsMutation.d.ts +39 -0
- package/dist/ssca-manager/src/services/hooks/useListLatestArtifactsMutation.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 +13 -0
- package/dist/ssca-manager/src/services/schemas/ArtifactListingResponse.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
/**
|
|
26
|
+
* @default "name"
|
|
27
|
+
*/
|
|
28
|
+
sort?: 'created' | 'identifier' | 'license' | 'name' | 'supplier' | 'updated';
|
|
29
|
+
}
|
|
30
|
+
export interface GetArtifactDetailComponentViewMutationHeaderParams {
|
|
31
|
+
'Harness-Account'?: string;
|
|
32
|
+
}
|
|
33
|
+
export type GetArtifactDetailComponentViewRequestBody = ArtifactComponentViewRequestBody;
|
|
34
|
+
export type GetArtifactDetailComponentViewOkResponse = ResponseWithPagination<ArtifactComponentViewResponseBodyResponse>;
|
|
35
|
+
export type GetArtifactDetailComponentViewErrorResponse = unknown;
|
|
36
|
+
export interface GetArtifactDetailComponentViewProps extends GetArtifactDetailComponentViewMutationPathParams, Omit<FetcherOptions<GetArtifactDetailComponentViewMutationQueryParams, GetArtifactDetailComponentViewRequestBody, GetArtifactDetailComponentViewMutationHeaderParams>, 'url'> {
|
|
37
|
+
queryParams: GetArtifactDetailComponentViewMutationQueryParams;
|
|
38
|
+
body: GetArtifactDetailComponentViewRequestBody;
|
|
39
|
+
}
|
|
40
|
+
export declare function getArtifactDetailComponentView(props: GetArtifactDetailComponentViewProps): Promise<GetArtifactDetailComponentViewOkResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Get artifact detail component view
|
|
43
|
+
*/
|
|
44
|
+
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
|
+
}
|
|
@@ -23,7 +23,7 @@ export interface GetPolicyViolationsQueryQueryParams {
|
|
|
23
23
|
/**
|
|
24
24
|
* @default "name"
|
|
25
25
|
*/
|
|
26
|
-
sort?: 'created' | 'identifier' | 'name' | 'updated';
|
|
26
|
+
sort?: 'created' | 'identifier' | 'license' | 'name' | 'supplier' | 'updated';
|
|
27
27
|
search_text?: string;
|
|
28
28
|
}
|
|
29
29
|
export interface GetPolicyViolationsQueryHeaderParams {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { UseMutationOptions } 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 ListArtifactsMutationPathParams {
|
|
7
|
+
org: string;
|
|
8
|
+
project: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ListArtifactsMutationQueryParams {
|
|
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
|
+
/**
|
|
24
|
+
* @default "name"
|
|
25
|
+
*/
|
|
26
|
+
sort?: 'created' | 'identifier' | 'license' | 'name' | 'supplier' | 'updated';
|
|
27
|
+
}
|
|
28
|
+
export interface ListArtifactsMutationHeaderParams {
|
|
29
|
+
'Harness-Account'?: string;
|
|
30
|
+
}
|
|
31
|
+
export type ListArtifactsRequestBody = ArtifactListingRequestBodyRequestBody;
|
|
32
|
+
export type ListArtifactsOkResponse = ResponseWithPagination<ArtifactListingResponseBodyResponse>;
|
|
33
|
+
export type ListArtifactsErrorResponse = unknown;
|
|
34
|
+
export interface ListArtifactsProps extends ListArtifactsMutationPathParams, Omit<FetcherOptions<ListArtifactsMutationQueryParams, ListArtifactsRequestBody, ListArtifactsMutationHeaderParams>, 'url'> {
|
|
35
|
+
queryParams: ListArtifactsMutationQueryParams;
|
|
36
|
+
body: ListArtifactsRequestBody;
|
|
37
|
+
}
|
|
38
|
+
export declare function listArtifacts(props: ListArtifactsProps): Promise<ListArtifactsOkResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* List all artifacts
|
|
41
|
+
*/
|
|
42
|
+
export declare function useListArtifactsMutation(options?: Omit<UseMutationOptions<ListArtifactsOkResponse, ListArtifactsErrorResponse, ListArtifactsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ListArtifactsOkResponse, unknown, ListArtifactsProps, 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 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 useListArtifactsMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => listArtifacts(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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>;
|
|
@@ -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 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 useListLatestArtifactsMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => listLatestArtifacts(mutateProps), 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, ListArtifactsMutationPathParams, ListArtifactsMutationQueryParams, ListArtifactsOkResponse, ListArtifactsProps, ListArtifactsRequestBody, } from './hooks/useListArtifactsMutation';
|
|
9
|
+
export { listArtifacts, useListArtifactsMutation } from './hooks/useListArtifactsMutation';
|
|
10
|
+
export type { ListLatestArtifactsErrorResponse, ListLatestArtifactsMutationPathParams, ListLatestArtifactsMutationQueryParams, ListLatestArtifactsOkResponse, ListLatestArtifactsProps, } from './hooks/useListLatestArtifactsMutation';
|
|
11
|
+
export { listLatestArtifacts, useListLatestArtifactsMutation, } from './hooks/useListLatestArtifactsMutation';
|
|
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, useListArtifactsMutation } from './hooks/useListArtifactsMutation';
|
|
5
|
+
export { listLatestArtifacts, useListLatestArtifactsMutation, } from './hooks/useListLatestArtifactsMutation';
|
|
@@ -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,13 @@
|
|
|
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
|
+
non_prod_env_count?: number;
|
|
9
|
+
prod_env_count?: number;
|
|
10
|
+
sbom_url?: string;
|
|
11
|
+
tag: string;
|
|
12
|
+
updated_at?: string;
|
|
13
|
+
}
|