@harnessio/react-ssca-manager-client 0.34.0 → 0.36.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.
@@ -22,6 +22,7 @@ export interface GetPolicyViolationsQueryQueryParams {
22
22
  page?: number;
23
23
  sort?: {};
24
24
  search_text?: string;
25
+ image_layer?: 'APP' | 'BASE' | 'DISTRO';
25
26
  }
26
27
  export interface GetPolicyViolationsQueryHeaderParams {
27
28
  'Harness-Account': string;
@@ -0,0 +1,23 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { LicenseUsageResponse } from '../schemas/LicenseUsageResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface SscaLicenseUsageQueryQueryParams {
6
+ /**
7
+ * @format int64
8
+ */
9
+ timestamp?: number;
10
+ }
11
+ export interface SscaLicenseUsageQueryHeaderParams {
12
+ 'Harness-Account': string;
13
+ }
14
+ export type SscaLicenseUsageOkResponse = ResponseWithPagination<LicenseUsageResponse>;
15
+ export type SscaLicenseUsageErrorResponse = unknown;
16
+ export interface SscaLicenseUsageProps extends Omit<FetcherOptions<SscaLicenseUsageQueryQueryParams, unknown, SscaLicenseUsageQueryHeaderParams>, 'url'> {
17
+ queryParams: SscaLicenseUsageQueryQueryParams;
18
+ }
19
+ export declare function sscaLicenseUsage(props: SscaLicenseUsageProps): Promise<SscaLicenseUsageOkResponse>;
20
+ /**
21
+ * SSCA module license usage
22
+ */
23
+ export declare function useSscaLicenseUsageQuery(props: SscaLicenseUsageProps, options?: Omit<UseQueryOptions<SscaLicenseUsageOkResponse, SscaLicenseUsageErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<SscaLicenseUsageOkResponse, 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 sscaLicenseUsage(props) {
7
+ return fetcher(Object.assign({ url: `/v1/license/ssca/usage`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * SSCA module license usage
11
+ */
12
+ export function useSscaLicenseUsageQuery(props, options) {
13
+ return useQuery(['sscaLicenseUsage', props.queryParams], ({ signal }) => sscaLicenseUsage(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -59,6 +59,8 @@ export type { ListRemediationsErrorResponse, ListRemediationsOkResponse, ListRem
59
59
  export { listRemediations, useListRemediationsQuery } from './hooks/useListRemediationsQuery';
60
60
  export type { SetBaselineForArtifactErrorResponse, SetBaselineForArtifactMutationPathParams, SetBaselineForArtifactOkResponse, SetBaselineForArtifactProps, SetBaselineForArtifactRequestBody, } from './hooks/useSetBaselineForArtifactMutation';
61
61
  export { setBaselineForArtifact, useSetBaselineForArtifactMutation, } from './hooks/useSetBaselineForArtifactMutation';
62
+ export type { SscaLicenseUsageErrorResponse, SscaLicenseUsageOkResponse, SscaLicenseUsageProps, SscaLicenseUsageQueryQueryParams, } from './hooks/useSscaLicenseUsageQuery';
63
+ export { sscaLicenseUsage, useSscaLicenseUsageQuery } from './hooks/useSscaLicenseUsageQuery';
62
64
  export type { UpdateRemediationTrackerErrorResponse, UpdateRemediationTrackerMutationPathParams, UpdateRemediationTrackerOkResponse, UpdateRemediationTrackerProps, UpdateRemediationTrackerRequestBody, } from './hooks/useUpdateRemediationTrackerMutation';
63
65
  export { updateRemediationTracker, useUpdateRemediationTrackerMutation, } from './hooks/useUpdateRemediationTrackerMutation';
64
66
  export type { ArtifactListingPipelineRequestBodyRequestBody } from './requestBodies/ArtifactListingPipelineRequestBodyRequestBody';
@@ -131,9 +133,11 @@ export type { EnvironmentInfo } from './schemas/EnvironmentInfo';
131
133
  export type { EnvironmentType } from './schemas/EnvironmentType';
132
134
  export type { EnvironmentTypeFilter } from './schemas/EnvironmentTypeFilter';
133
135
  export type { ExcludeArtifactRequest } from './schemas/ExcludeArtifactRequest';
136
+ export type { LayerType } from './schemas/LayerType';
134
137
  export type { LicenseDrift } from './schemas/LicenseDrift';
135
138
  export type { LicenseDriftSummary } from './schemas/LicenseDriftSummary';
136
139
  export type { LicenseFilter } from './schemas/LicenseFilter';
140
+ export type { LicenseUsageResponse } from './schemas/LicenseUsageResponse';
137
141
  export type { NameOperator } from './schemas/NameOperator';
138
142
  export type { Operator } from './schemas/Operator';
139
143
  export type { OrchestrationModelPipeline } from './schemas/OrchestrationModelPipeline';
@@ -28,4 +28,5 @@ export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQu
28
28
  export { listLatestArtifacts, useListLatestArtifactsQuery, } from './hooks/useListLatestArtifactsQuery';
29
29
  export { listRemediations, useListRemediationsQuery } from './hooks/useListRemediationsQuery';
30
30
  export { setBaselineForArtifact, useSetBaselineForArtifactMutation, } from './hooks/useSetBaselineForArtifactMutation';
31
+ export { sscaLicenseUsage, useSscaLicenseUsageQuery } from './hooks/useSscaLicenseUsageQuery';
31
32
  export { updateRemediationTracker, useUpdateRemediationTrackerMutation, } from './hooks/useUpdateRemediationTrackerMutation';
@@ -1,7 +1,9 @@
1
1
  import type { ComponentFilter } from '../schemas/ComponentFilter';
2
+ import type { LayerType } from '../schemas/LayerType';
2
3
  import type { LicenseFilter } from '../schemas/LicenseFilter';
3
4
  export interface ArtifactComponentViewRequestBody {
4
5
  component_filter?: ComponentFilter[];
6
+ image_layer?: LayerType;
5
7
  license_filter?: LicenseFilter;
6
8
  package_manager?: string;
7
9
  package_supplier?: string;
@@ -1,4 +1,6 @@
1
+ import type { LayerType } from '../schemas/LayerType';
1
2
  export interface ArtifactComponentViewResponse {
3
+ filter_tags?: LayerType[];
2
4
  package_license?: string;
3
5
  package_manager?: string;
4
6
  package_name?: string;
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -1,7 +1,9 @@
1
+ import type { LayerType } from '../schemas/LayerType';
1
2
  /**
2
3
  * Provides component summary
3
4
  */
4
5
  export interface ComponentSummary {
6
+ filter_tags?: LayerType[];
5
7
  /**
6
8
  * Licenses of component
7
9
  */
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -0,0 +1,2 @@
1
+ export interface LayerType {
2
+ }
@@ -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,17 @@
1
+ export interface LicenseUsageResponse {
2
+ usage_data?: {
3
+ /**
4
+ * @format int64
5
+ */
6
+ count: number;
7
+ display_name: string;
8
+ references?: {
9
+ account?: string;
10
+ count?: string;
11
+ identifier?: string;
12
+ name?: string;
13
+ org?: string;
14
+ project?: string;
15
+ };
16
+ };
17
+ }
@@ -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,10 +1,13 @@
1
+ import type { LayerType } from '../schemas/LayerType';
1
2
  export interface PolicyViolation {
2
3
  account?: string;
3
4
  artifact_id?: string;
4
5
  enforcement_id?: string;
5
6
  exemption_id?: string;
7
+ filter_tags?: LayerType[];
6
8
  image_name?: string;
7
9
  is_exempted?: boolean;
10
+ language?: string;
8
11
  license?: string[];
9
12
  name?: string;
10
13
  orchestration_id?: string;
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.34.0",
3
+ "version": "0.36.0",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",