@harnessio/react-ssca-manager-client 0.4.0 → 0.6.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.
Files changed (21) hide show
  1. package/dist/ssca-manager/src/services/hooks/{useGetArtifactDetailComponentViewMutation.d.ts → useGetArtifactDetailComponentViewQuery.d.ts} +7 -7
  2. package/dist/ssca-manager/src/services/hooks/{useGetArtifactDetailComponentViewMutation.js → useGetArtifactDetailComponentViewQuery.js} +11 -3
  3. package/dist/ssca-manager/src/services/hooks/useGetArtifactDetailDeploymentViewQuery.d.ts +41 -0
  4. package/dist/ssca-manager/src/services/hooks/useGetArtifactDetailDeploymentViewQuery.js +22 -0
  5. package/dist/ssca-manager/src/services/hooks/useGetArtifactDetailsQuery.d.ts +22 -0
  6. package/dist/ssca-manager/src/services/hooks/useGetArtifactDetailsQuery.js +14 -0
  7. package/dist/ssca-manager/src/services/index.d.ts +11 -2
  8. package/dist/ssca-manager/src/services/index.js +3 -1
  9. package/dist/ssca-manager/src/services/responses/ArtifactDeploymentViewResponseBodyResponse.d.ts +2 -0
  10. package/dist/ssca-manager/src/services/responses/ArtifactDeploymentViewResponseBodyResponse.js +1 -0
  11. package/dist/ssca-manager/src/services/responses/ArtifactDetailResponseBodyResponse.d.ts +2 -0
  12. package/dist/ssca-manager/src/services/responses/ArtifactDetailResponseBodyResponse.js +1 -0
  13. package/dist/ssca-manager/src/services/schemas/ArtifactDeploymentViewRequestBody.d.ts +5 -0
  14. package/dist/ssca-manager/src/services/schemas/ArtifactDeploymentViewRequestBody.js +4 -0
  15. package/dist/ssca-manager/src/services/schemas/ArtifactDeploymentViewResponse.d.ts +14 -0
  16. package/dist/ssca-manager/src/services/schemas/ArtifactDeploymentViewResponse.js +4 -0
  17. package/dist/ssca-manager/src/services/schemas/ArtifactDetailResponse.d.ts +12 -0
  18. package/dist/ssca-manager/src/services/schemas/ArtifactDetailResponse.js +4 -0
  19. package/dist/ssca-manager/src/services/schemas/ArtifactListingRequestBody.d.ts +4 -4
  20. package/dist/ssca-manager/src/services/schemas/ArtifactListingResponse.d.ts +3 -0
  21. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { UseMutationOptions } from '@tanstack/react-query';
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { ArtifactComponentViewResponseBodyResponse } from '../responses/ArtifactComponentViewResponseBodyResponse';
3
3
  import type { ArtifactComponentViewRequestBody } from '../schemas/ArtifactComponentViewRequestBody';
4
4
  import type { ResponseWithPagination } from '../helpers';
5
5
  import { FetcherOptions } from '../../../../fetcher/index.js';
6
- export interface GetArtifactDetailComponentViewMutationPathParams {
6
+ export interface GetArtifactDetailComponentViewQueryPathParams {
7
7
  org: string;
8
8
  project: string;
9
9
  artifact: string;
10
10
  tag: string;
11
11
  }
12
- export interface GetArtifactDetailComponentViewMutationQueryParams {
12
+ export interface GetArtifactDetailComponentViewQueryQueryParams {
13
13
  /**
14
14
  * @default 30
15
15
  */
@@ -24,18 +24,18 @@ export interface GetArtifactDetailComponentViewMutationQueryParams {
24
24
  page?: number;
25
25
  sort?: {};
26
26
  }
27
- export interface GetArtifactDetailComponentViewMutationHeaderParams {
27
+ export interface GetArtifactDetailComponentViewQueryHeaderParams {
28
28
  'Harness-Account'?: string;
29
29
  }
30
30
  export type GetArtifactDetailComponentViewRequestBody = ArtifactComponentViewRequestBody;
31
31
  export type GetArtifactDetailComponentViewOkResponse = ResponseWithPagination<ArtifactComponentViewResponseBodyResponse>;
32
32
  export type GetArtifactDetailComponentViewErrorResponse = unknown;
33
- export interface GetArtifactDetailComponentViewProps extends GetArtifactDetailComponentViewMutationPathParams, Omit<FetcherOptions<GetArtifactDetailComponentViewMutationQueryParams, GetArtifactDetailComponentViewRequestBody, GetArtifactDetailComponentViewMutationHeaderParams>, 'url'> {
34
- queryParams: GetArtifactDetailComponentViewMutationQueryParams;
33
+ export interface GetArtifactDetailComponentViewProps extends GetArtifactDetailComponentViewQueryPathParams, Omit<FetcherOptions<GetArtifactDetailComponentViewQueryQueryParams, GetArtifactDetailComponentViewRequestBody, GetArtifactDetailComponentViewQueryHeaderParams>, 'url'> {
34
+ queryParams: GetArtifactDetailComponentViewQueryQueryParams;
35
35
  body: GetArtifactDetailComponentViewRequestBody;
36
36
  }
37
37
  export declare function getArtifactDetailComponentView(props: GetArtifactDetailComponentViewProps): Promise<GetArtifactDetailComponentViewOkResponse>;
38
38
  /**
39
39
  * Get artifact detail component view
40
40
  */
41
- export declare function useGetArtifactDetailComponentViewMutation(options?: Omit<UseMutationOptions<GetArtifactDetailComponentViewOkResponse, GetArtifactDetailComponentViewErrorResponse, GetArtifactDetailComponentViewProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<GetArtifactDetailComponentViewOkResponse, unknown, GetArtifactDetailComponentViewProps, unknown>;
41
+ export declare function useGetArtifactDetailComponentViewQuery(props: GetArtifactDetailComponentViewProps, options?: Omit<UseQueryOptions<GetArtifactDetailComponentViewOkResponse, GetArtifactDetailComponentViewErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetArtifactDetailComponentViewOkResponse, 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 { useMutation } from '@tanstack/react-query';
4
+ import { useQuery } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function getArtifactDetailComponentView(props) {
7
7
  return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/artifact/${props.artifact}/tag/${props.tag}/components`, method: 'POST' }, props));
@@ -9,6 +9,14 @@ export function getArtifactDetailComponentView(props) {
9
9
  /**
10
10
  * Get artifact detail component view
11
11
  */
12
- export function useGetArtifactDetailComponentViewMutation(options) {
13
- return useMutation((mutateProps) => getArtifactDetailComponentView(mutateProps), options);
12
+ export function useGetArtifactDetailComponentViewQuery(props, options) {
13
+ return useQuery([
14
+ 'getArtifactDetailComponentView',
15
+ props.org,
16
+ props.project,
17
+ props.artifact,
18
+ props.tag,
19
+ props.queryParams,
20
+ props.body,
21
+ ], ({ signal }) => getArtifactDetailComponentView(Object.assign(Object.assign({}, props), { signal })), options);
14
22
  }
@@ -0,0 +1,41 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ArtifactDeploymentViewResponseBodyResponse } from '../responses/ArtifactDeploymentViewResponseBodyResponse';
3
+ import type { ArtifactDeploymentViewRequestBody } from '../schemas/ArtifactDeploymentViewRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetArtifactDetailDeploymentViewQueryPathParams {
7
+ org: string;
8
+ project: string;
9
+ artifact: string;
10
+ tag: string;
11
+ }
12
+ export interface GetArtifactDetailDeploymentViewQueryQueryParams {
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 GetArtifactDetailDeploymentViewQueryHeaderParams {
28
+ 'Harness-Account'?: string;
29
+ }
30
+ export type GetArtifactDetailDeploymentViewRequestBody = ArtifactDeploymentViewRequestBody;
31
+ export type GetArtifactDetailDeploymentViewOkResponse = ResponseWithPagination<ArtifactDeploymentViewResponseBodyResponse>;
32
+ export type GetArtifactDetailDeploymentViewErrorResponse = unknown;
33
+ export interface GetArtifactDetailDeploymentViewProps extends GetArtifactDetailDeploymentViewQueryPathParams, Omit<FetcherOptions<GetArtifactDetailDeploymentViewQueryQueryParams, GetArtifactDetailDeploymentViewRequestBody, GetArtifactDetailDeploymentViewQueryHeaderParams>, 'url'> {
34
+ queryParams: GetArtifactDetailDeploymentViewQueryQueryParams;
35
+ body: GetArtifactDetailDeploymentViewRequestBody;
36
+ }
37
+ export declare function getArtifactDetailDeploymentView(props: GetArtifactDetailDeploymentViewProps): Promise<GetArtifactDetailDeploymentViewOkResponse>;
38
+ /**
39
+ * Get artifact detail deployment view
40
+ */
41
+ export declare function useGetArtifactDetailDeploymentViewQuery(props: GetArtifactDetailDeploymentViewProps, options?: Omit<UseQueryOptions<GetArtifactDetailDeploymentViewOkResponse, GetArtifactDetailDeploymentViewErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetArtifactDetailDeploymentViewOkResponse, unknown>;
@@ -0,0 +1,22 @@
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 getArtifactDetailDeploymentView(props) {
7
+ return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/artifact/${props.artifact}/tag/${props.tag}/deployments`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Get artifact detail deployment view
11
+ */
12
+ export function useGetArtifactDetailDeploymentViewQuery(props, options) {
13
+ return useQuery([
14
+ 'getArtifactDetailDeploymentView',
15
+ props.org,
16
+ props.project,
17
+ props.artifact,
18
+ props.tag,
19
+ props.queryParams,
20
+ props.body,
21
+ ], ({ signal }) => getArtifactDetailDeploymentView(Object.assign(Object.assign({}, props), { signal })), options);
22
+ }
@@ -0,0 +1,22 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ArtifactDetailResponseBodyResponse } from '../responses/ArtifactDetailResponseBodyResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetArtifactDetailsQueryPathParams {
6
+ org: string;
7
+ project: string;
8
+ artifact: string;
9
+ tag: string;
10
+ }
11
+ export interface GetArtifactDetailsQueryHeaderParams {
12
+ 'Harness-Account'?: string;
13
+ }
14
+ export type GetArtifactDetailsOkResponse = ResponseWithPagination<ArtifactDetailResponseBodyResponse | unknown>;
15
+ export type GetArtifactDetailsErrorResponse = unknown;
16
+ export interface GetArtifactDetailsProps extends GetArtifactDetailsQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetArtifactDetailsQueryHeaderParams>, 'url'> {
17
+ }
18
+ export declare function getArtifactDetails(props: GetArtifactDetailsProps): Promise<GetArtifactDetailsOkResponse>;
19
+ /**
20
+ * Get artifact details
21
+ */
22
+ export declare function useGetArtifactDetailsQuery(props: GetArtifactDetailsProps, options?: Omit<UseQueryOptions<GetArtifactDetailsOkResponse, GetArtifactDetailsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetArtifactDetailsOkResponse, 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 getArtifactDetails(props) {
7
+ return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/artifact/${props.artifact}/tag/${props.tag}/details`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get artifact details
11
+ */
12
+ export function useGetArtifactDetailsQuery(props, options) {
13
+ return useQuery(['getArtifactDetails', props.org, props.project, props.artifact, props.tag], ({ signal }) => getArtifactDetails(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -1,8 +1,12 @@
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
+ export type { GetArtifactDetailComponentViewErrorResponse, GetArtifactDetailComponentViewOkResponse, GetArtifactDetailComponentViewProps, GetArtifactDetailComponentViewQueryPathParams, GetArtifactDetailComponentViewQueryQueryParams, GetArtifactDetailComponentViewRequestBody, } from './hooks/useGetArtifactDetailComponentViewQuery';
5
+ export { getArtifactDetailComponentView, useGetArtifactDetailComponentViewQuery, } from './hooks/useGetArtifactDetailComponentViewQuery';
6
+ export type { GetArtifactDetailDeploymentViewErrorResponse, GetArtifactDetailDeploymentViewOkResponse, GetArtifactDetailDeploymentViewProps, GetArtifactDetailDeploymentViewQueryPathParams, GetArtifactDetailDeploymentViewQueryQueryParams, GetArtifactDetailDeploymentViewRequestBody, } from './hooks/useGetArtifactDetailDeploymentViewQuery';
7
+ export { getArtifactDetailDeploymentView, useGetArtifactDetailDeploymentViewQuery, } from './hooks/useGetArtifactDetailDeploymentViewQuery';
8
+ export type { GetArtifactDetailsErrorResponse, GetArtifactDetailsOkResponse, GetArtifactDetailsProps, GetArtifactDetailsQueryPathParams, } from './hooks/useGetArtifactDetailsQuery';
9
+ export { getArtifactDetails, useGetArtifactDetailsQuery } from './hooks/useGetArtifactDetailsQuery';
6
10
  export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
7
11
  export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
8
12
  export type { ListArtifactsErrorResponse, ListArtifactsOkResponse, ListArtifactsProps, ListArtifactsQueryPathParams, ListArtifactsQueryQueryParams, ListArtifactsRequestBody, } from './hooks/useListArtifactsQuery';
@@ -11,11 +15,16 @@ export type { ListLatestArtifactsErrorResponse, ListLatestArtifactsOkResponse, L
11
15
  export { listLatestArtifacts, useListLatestArtifactsQuery, } from './hooks/useListLatestArtifactsQuery';
12
16
  export type { ArtifactListingRequestBodyRequestBody } from './requestBodies/ArtifactListingRequestBodyRequestBody';
13
17
  export type { ArtifactComponentViewResponseBodyResponse } from './responses/ArtifactComponentViewResponseBodyResponse';
18
+ export type { ArtifactDeploymentViewResponseBodyResponse } from './responses/ArtifactDeploymentViewResponseBodyResponse';
19
+ export type { ArtifactDetailResponseBodyResponse } from './responses/ArtifactDetailResponseBodyResponse';
14
20
  export type { ArtifactListingResponseBodyResponse } from './responses/ArtifactListingResponseBodyResponse';
15
21
  export type { ArtifactSbomResponseBodyResponse } from './responses/ArtifactSbomResponseBodyResponse';
16
22
  export type { PolicyViolationResponseResponse } from './responses/PolicyViolationResponseResponse';
17
23
  export type { ArtifactComponentViewRequestBody } from './schemas/ArtifactComponentViewRequestBody';
18
24
  export type { ArtifactComponentViewResponse } from './schemas/ArtifactComponentViewResponse';
25
+ export type { ArtifactDeploymentViewRequestBody } from './schemas/ArtifactDeploymentViewRequestBody';
26
+ export type { ArtifactDeploymentViewResponse } from './schemas/ArtifactDeploymentViewResponse';
27
+ export type { ArtifactDetailResponse } from './schemas/ArtifactDetailResponse';
19
28
  export type { ArtifactListingRequestBody } from './schemas/ArtifactListingRequestBody';
20
29
  export type { ArtifactListingResponse } from './schemas/ArtifactListingResponse';
21
30
  export type { ArtifactSbomResponseBody } from './schemas/ArtifactSbomResponseBody';
@@ -1,5 +1,7 @@
1
1
  export { downloadSbom, useDownloadSbomQuery } from './hooks/useDownloadSbomQuery';
2
- export { getArtifactDetailComponentView, useGetArtifactDetailComponentViewMutation, } from './hooks/useGetArtifactDetailComponentViewMutation';
2
+ export { getArtifactDetailComponentView, useGetArtifactDetailComponentViewQuery, } from './hooks/useGetArtifactDetailComponentViewQuery';
3
+ export { getArtifactDetailDeploymentView, useGetArtifactDetailDeploymentViewQuery, } from './hooks/useGetArtifactDetailDeploymentViewQuery';
4
+ export { getArtifactDetails, useGetArtifactDetailsQuery } from './hooks/useGetArtifactDetailsQuery';
3
5
  export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
4
6
  export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
5
7
  export { listLatestArtifacts, useListLatestArtifactsQuery, } from './hooks/useListLatestArtifactsQuery';
@@ -0,0 +1,2 @@
1
+ import type { ArtifactDeploymentViewResponse } from '../schemas/ArtifactDeploymentViewResponse';
2
+ export type ArtifactDeploymentViewResponseBodyResponse = ArtifactDeploymentViewResponse[];
@@ -0,0 +1,2 @@
1
+ import type { ArtifactDetailResponse } from '../schemas/ArtifactDetailResponse';
2
+ export type ArtifactDetailResponseBodyResponse = ArtifactDetailResponse;
@@ -0,0 +1,5 @@
1
+ export interface ArtifactDeploymentViewRequestBody {
2
+ environment?: string;
3
+ 'environment_type '?: 'ALL' | 'NONPROD' | 'PROD';
4
+ policy_violation?: 'ALLOW' | 'DENY';
5
+ }
@@ -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 {};
@@ -0,0 +1,14 @@
1
+ export interface ArtifactDeploymentViewResponse {
2
+ allow_list_policy_violation?: string;
3
+ attested_status?: 'FAIL' | 'PASS';
4
+ deny_list_policy_violation?: string;
5
+ enforcement_id?: string;
6
+ id?: string;
7
+ name?: string;
8
+ pipeline_execution_id?: string;
9
+ pipeline_id?: string;
10
+ triggered_at?: string;
11
+ triggered_by?: string;
12
+ triggered_by_id?: string;
13
+ type?: 'NONPROD' | 'PROD';
14
+ }
@@ -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 {};
@@ -0,0 +1,12 @@
1
+ export interface ArtifactDetailResponse {
2
+ artifact_id: string;
3
+ artifact_name: string;
4
+ build_pipeline_execution_id?: string;
5
+ build_pipeline_id?: string;
6
+ components_count?: number;
7
+ non_prod_env_count?: number;
8
+ orchestration_id?: string;
9
+ prod_env_count?: number;
10
+ tag: string;
11
+ updated?: string;
12
+ }
@@ -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 {};
@@ -1,12 +1,12 @@
1
1
  export interface ArtifactListingRequestBody {
2
- component_filter?: {
2
+ component_filter?: Array<{
3
3
  field_name?: 'ComponentName' | 'ComponentVersion';
4
- operator?: 'EQ';
4
+ operator?: 'Contains' | 'Equals' | 'StartsWith';
5
5
  value?: string;
6
- };
6
+ }>;
7
7
  environment_type?: 'All' | 'NonProd' | 'None' | 'Prod';
8
8
  license_filter?: {
9
- operator?: 'EQ';
9
+ operator?: 'Equals';
10
10
  value?: string;
11
11
  };
12
12
  policy_violation?: 'ALLOW' | 'DENY';
@@ -3,10 +3,13 @@ export interface ArtifactListingResponse {
3
3
  allow_list_violation_count?: number;
4
4
  artifact_id: string;
5
5
  artifact_name: string;
6
+ build_pipeline_execution_id?: string;
7
+ build_pipeline_id?: string;
6
8
  components_count?: number;
7
9
  deny_list_violation_count?: number;
8
10
  enforcement_id?: string;
9
11
  non_prod_env_count?: number;
12
+ orchestration_id?: string;
10
13
  prod_env_count?: number;
11
14
  sbom_url?: string;
12
15
  tag: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",