@harnessio/react-ssca-manager-client 0.34.0 → 0.35.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/useSscaLicenseUsageQuery.d.ts +23 -0
- package/dist/ssca-manager/src/services/hooks/useSscaLicenseUsageQuery.js +14 -0
- package/dist/ssca-manager/src/services/index.d.ts +3 -0
- package/dist/ssca-manager/src/services/index.js +1 -0
- package/dist/ssca-manager/src/services/schemas/LicenseUsageResponse.d.ts +17 -0
- package/dist/ssca-manager/src/services/schemas/LicenseUsageResponse.js +4 -0
- package/package.json +1 -1
|
@@ -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';
|
|
@@ -134,6 +136,7 @@ export type { ExcludeArtifactRequest } from './schemas/ExcludeArtifactRequest';
|
|
|
134
136
|
export type { LicenseDrift } from './schemas/LicenseDrift';
|
|
135
137
|
export type { LicenseDriftSummary } from './schemas/LicenseDriftSummary';
|
|
136
138
|
export type { LicenseFilter } from './schemas/LicenseFilter';
|
|
139
|
+
export type { LicenseUsageResponse } from './schemas/LicenseUsageResponse';
|
|
137
140
|
export type { NameOperator } from './schemas/NameOperator';
|
|
138
141
|
export type { Operator } from './schemas/Operator';
|
|
139
142
|
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';
|
|
@@ -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
|
+
}
|