@harnessio/react-ssca-manager-client 0.41.0 → 0.41.1
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/useAskQuestionMutation.d.ts +25 -0
- package/dist/ssca-manager/src/services/hooks/useAskQuestionMutation.js +14 -0
- package/dist/ssca-manager/src/services/hooks/useGetPackageVersionsQuery.d.ts +25 -0
- package/dist/ssca-manager/src/services/hooks/useGetPackageVersionsQuery.js +14 -0
- package/dist/ssca-manager/src/services/index.d.ts +9 -1
- package/dist/ssca-manager/src/services/index.js +2 -0
- package/dist/ssca-manager/src/services/schemas/ComplianceCheck.d.ts +12 -11
- package/dist/ssca-manager/src/services/schemas/{ComplianceCheckEntity.d.ts → ComplianceCheckEntityType.d.ts} +1 -1
- package/dist/ssca-manager/src/services/schemas/ComplianceCheckSeverity.d.ts +2 -0
- package/dist/ssca-manager/src/services/schemas/ComplianceCheckSeverity.js +4 -0
- package/dist/ssca-manager/src/services/schemas/ComplianceFilter.d.ts +4 -3
- package/dist/ssca-manager/src/services/schemas/ComplianceStandardType.d.ts +2 -0
- package/dist/ssca-manager/src/services/schemas/ComplianceStandardType.js +4 -0
- package/dist/ssca-manager/src/services/schemas/OpenSourcePackageDto.d.ts +13 -0
- package/dist/ssca-manager/src/services/schemas/OpenSourcePackageDto.js +4 -0
- package/dist/ssca-manager/src/services/schemas/OpenSourcePackageVersion.d.ts +6 -0
- package/dist/ssca-manager/src/services/schemas/OpenSourcePackageVersion.js +4 -0
- package/package.json +1 -1
- /package/dist/ssca-manager/src/services/schemas/{ComplianceCheckEntity.js → ComplianceCheckEntityType.js} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { OpenSourcePackageDto } from '../schemas/OpenSourcePackageDto';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface AskQuestionMutationPathParams {
|
|
6
|
+
org: string;
|
|
7
|
+
project: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AskQuestionMutationHeaderParams {
|
|
10
|
+
'Harness-Account': string;
|
|
11
|
+
}
|
|
12
|
+
export type AskQuestionRequestBody = {
|
|
13
|
+
question?: string;
|
|
14
|
+
system?: string;
|
|
15
|
+
};
|
|
16
|
+
export type AskQuestionOkResponse = ResponseWithPagination<OpenSourcePackageDto[]>;
|
|
17
|
+
export type AskQuestionErrorResponse = unknown;
|
|
18
|
+
export interface AskQuestionProps extends AskQuestionMutationPathParams, Omit<FetcherOptions<unknown, AskQuestionRequestBody, AskQuestionMutationHeaderParams>, 'url'> {
|
|
19
|
+
body: AskQuestionRequestBody;
|
|
20
|
+
}
|
|
21
|
+
export declare function askQuestion(props: AskQuestionProps): Promise<AskQuestionOkResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Ask Question
|
|
24
|
+
*/
|
|
25
|
+
export declare function useAskQuestionMutation(options?: Omit<UseMutationOptions<AskQuestionOkResponse, AskQuestionErrorResponse, AskQuestionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<AskQuestionOkResponse, unknown, AskQuestionProps, 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 askQuestion(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/ossecure-intel`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Ask Question
|
|
11
|
+
*/
|
|
12
|
+
export function useAskQuestionMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => askQuestion(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { OpenSourcePackageVersion } from '../schemas/OpenSourcePackageVersion';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetPackageVersionsQueryPathParams {
|
|
6
|
+
org: string;
|
|
7
|
+
project: string;
|
|
8
|
+
package: string;
|
|
9
|
+
system: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GetPackageVersionsQueryHeaderParams {
|
|
12
|
+
'Harness-Account': string;
|
|
13
|
+
}
|
|
14
|
+
export type GetPackageVersionsOkResponse = ResponseWithPagination<{
|
|
15
|
+
name?: string;
|
|
16
|
+
versions?: OpenSourcePackageVersion[];
|
|
17
|
+
}>;
|
|
18
|
+
export type GetPackageVersionsErrorResponse = unknown;
|
|
19
|
+
export interface GetPackageVersionsProps extends GetPackageVersionsQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetPackageVersionsQueryHeaderParams>, 'url'> {
|
|
20
|
+
}
|
|
21
|
+
export declare function getPackageVersions(props: GetPackageVersionsProps): Promise<GetPackageVersionsOkResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Get Package Versions
|
|
24
|
+
*/
|
|
25
|
+
export declare function useGetPackageVersionsQuery(props: GetPackageVersionsProps, options?: Omit<UseQueryOptions<GetPackageVersionsOkResponse, GetPackageVersionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetPackageVersionsOkResponse, 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 getPackageVersions(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/system/${props.system}/packages/${props.package}/versions`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get Package Versions
|
|
11
|
+
*/
|
|
12
|
+
export function useGetPackageVersionsQuery(props, options) {
|
|
13
|
+
return useQuery(['getPackageVersions', props.org, props.project, props.package, props.system], ({ signal }) => getPackageVersions(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type { GetPathParamsType, ResponseWithPagination } from './helpers';
|
|
2
2
|
export type { ArtifactListErrorResponse, ArtifactListOkResponse, ArtifactListProps, ArtifactListQueryPathParams, ArtifactListQueryQueryParams, ArtifactListRequestBody, } from './hooks/useArtifactListQuery';
|
|
3
3
|
export { artifactList, useArtifactListQuery } from './hooks/useArtifactListQuery';
|
|
4
|
+
export type { AskQuestionErrorResponse, AskQuestionMutationPathParams, AskQuestionOkResponse, AskQuestionProps, AskQuestionRequestBody, } from './hooks/useAskQuestionMutation';
|
|
5
|
+
export { askQuestion, useAskQuestionMutation } from './hooks/useAskQuestionMutation';
|
|
4
6
|
export type { CalculateDriftForArtifactErrorResponse, CalculateDriftForArtifactMutationPathParams, CalculateDriftForArtifactOkResponse, CalculateDriftForArtifactProps, CalculateDriftForArtifactRequestBody, } from './hooks/useCalculateDriftForArtifactMutation';
|
|
5
7
|
export { calculateDriftForArtifact, useCalculateDriftForArtifactMutation, } from './hooks/useCalculateDriftForArtifactMutation';
|
|
6
8
|
export type { CheckArtifactAndDeploymentsErrorResponse, CheckArtifactAndDeploymentsMutationPathParams, CheckArtifactAndDeploymentsOkResponse, CheckArtifactAndDeploymentsProps, CheckArtifactAndDeploymentsRequestBody, } from './hooks/useCheckArtifactAndDeploymentsMutation';
|
|
@@ -55,6 +57,8 @@ export type { GetLicenseDriftErrorResponse, GetLicenseDriftOkResponse, GetLicens
|
|
|
55
57
|
export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
|
|
56
58
|
export type { GetOverallSummaryErrorResponse, GetOverallSummaryOkResponse, GetOverallSummaryProps, GetOverallSummaryQueryPathParams, } from './hooks/useGetOverallSummaryQuery';
|
|
57
59
|
export { getOverallSummary, useGetOverallSummaryQuery } from './hooks/useGetOverallSummaryQuery';
|
|
60
|
+
export type { GetPackageVersionsErrorResponse, GetPackageVersionsOkResponse, GetPackageVersionsProps, GetPackageVersionsQueryPathParams, } from './hooks/useGetPackageVersionsQuery';
|
|
61
|
+
export { getPackageVersions, useGetPackageVersionsQuery } from './hooks/useGetPackageVersionsQuery';
|
|
58
62
|
export type { GetPipelineArtifactListErrorResponse, GetPipelineArtifactListOkResponse, GetPipelineArtifactListProps, GetPipelineArtifactListQueryPathParams, GetPipelineArtifactListRequestBody, } from './hooks/useGetPipelineArtifactListQuery';
|
|
59
63
|
export { getPipelineArtifactList, useGetPipelineArtifactListQuery, } from './hooks/useGetPipelineArtifactListQuery';
|
|
60
64
|
export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
|
|
@@ -151,9 +155,11 @@ export type { BaselineResponseBody } from './schemas/BaselineResponseBody';
|
|
|
151
155
|
export type { CategoryScorecard } from './schemas/CategoryScorecard';
|
|
152
156
|
export type { CategoryScorecardCheck } from './schemas/CategoryScorecardCheck';
|
|
153
157
|
export type { ComplianceCheck } from './schemas/ComplianceCheck';
|
|
154
|
-
export type {
|
|
158
|
+
export type { ComplianceCheckEntityType } from './schemas/ComplianceCheckEntityType';
|
|
159
|
+
export type { ComplianceCheckSeverity } from './schemas/ComplianceCheckSeverity';
|
|
155
160
|
export type { ComplianceCheckType } from './schemas/ComplianceCheckType';
|
|
156
161
|
export type { ComplianceFilter } from './schemas/ComplianceFilter';
|
|
162
|
+
export type { ComplianceStandardType } from './schemas/ComplianceStandardType';
|
|
157
163
|
export type { ComponentDrift } from './schemas/ComponentDrift';
|
|
158
164
|
export type { ComponentDriftSummary } from './schemas/ComponentDriftSummary';
|
|
159
165
|
export type { ComponentDto } from './schemas/ComponentDto';
|
|
@@ -179,6 +185,8 @@ export type { LicenseFilter } from './schemas/LicenseFilter';
|
|
|
179
185
|
export type { LicenseUsageResponse } from './schemas/LicenseUsageResponse';
|
|
180
186
|
export type { ListIntegrationReposResponse } from './schemas/ListIntegrationReposResponse';
|
|
181
187
|
export type { NameOperator } from './schemas/NameOperator';
|
|
188
|
+
export type { OpenSourcePackageDto } from './schemas/OpenSourcePackageDto';
|
|
189
|
+
export type { OpenSourcePackageVersion } from './schemas/OpenSourcePackageVersion';
|
|
182
190
|
export type { Operator } from './schemas/Operator';
|
|
183
191
|
export type { OrchestrationModelPipeline } from './schemas/OrchestrationModelPipeline';
|
|
184
192
|
export type { PipelineInfo } from './schemas/PipelineInfo';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { artifactList, useArtifactListQuery } from './hooks/useArtifactListQuery';
|
|
2
|
+
export { askQuestion, useAskQuestionMutation } from './hooks/useAskQuestionMutation';
|
|
2
3
|
export { calculateDriftForArtifact, useCalculateDriftForArtifactMutation, } from './hooks/useCalculateDriftForArtifactMutation';
|
|
3
4
|
export { checkArtifactAndDeployments, useCheckArtifactAndDeploymentsMutation, } from './hooks/useCheckArtifactAndDeploymentsMutation';
|
|
4
5
|
export { closeRemediationTracker, useCloseRemediationTrackerMutation, } from './hooks/useCloseRemediationTrackerMutation';
|
|
@@ -26,6 +27,7 @@ export { getEnvironmentListForRemediation, useGetEnvironmentListForRemediationQu
|
|
|
26
27
|
export { getIntegrationRepos, useGetIntegrationReposQuery, } from './hooks/useGetIntegrationReposQuery';
|
|
27
28
|
export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
|
|
28
29
|
export { getOverallSummary, useGetOverallSummaryQuery } from './hooks/useGetOverallSummaryQuery';
|
|
30
|
+
export { getPackageVersions, useGetPackageVersionsQuery } from './hooks/useGetPackageVersionsQuery';
|
|
29
31
|
export { getPipelineArtifactList, useGetPipelineArtifactListQuery, } from './hooks/useGetPipelineArtifactListQuery';
|
|
30
32
|
export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
|
|
31
33
|
export { getProvenance, useGetProvenanceQuery } from './hooks/useGetProvenanceQuery';
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComplianceCheckEntityType } from '../schemas/ComplianceCheckEntityType';
|
|
2
|
+
import type { ComplianceCheckSeverity } from '../schemas/ComplianceCheckSeverity';
|
|
3
|
+
import type { ComplianceStandardType } from '../schemas/ComplianceStandardType';
|
|
2
4
|
import type { ComplianceCheckType } from '../schemas/ComplianceCheckType';
|
|
3
5
|
/**
|
|
4
6
|
* Represents Single SSCA Compliance Check
|
|
5
7
|
*/
|
|
6
8
|
export interface ComplianceCheck {
|
|
7
|
-
category
|
|
8
|
-
category_id
|
|
9
|
-
compliance_id
|
|
10
|
-
description
|
|
11
|
-
entity
|
|
9
|
+
category: string;
|
|
10
|
+
category_id: string;
|
|
11
|
+
compliance_id: string;
|
|
12
|
+
description: string;
|
|
13
|
+
entity: ComplianceCheckEntityType;
|
|
12
14
|
remediation?: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
standards?: string[];
|
|
15
|
+
severity: ComplianceCheckSeverity;
|
|
16
|
+
standards: ComplianceStandardType[];
|
|
16
17
|
tags?: string[];
|
|
17
|
-
title
|
|
18
|
-
type
|
|
18
|
+
title: string;
|
|
19
|
+
type: ComplianceCheckType;
|
|
19
20
|
url?: string;
|
|
20
21
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComplianceCheckEntityType } from '../schemas/ComplianceCheckEntityType';
|
|
2
|
+
import type { ComplianceStandardType } from '../schemas/ComplianceStandardType';
|
|
2
3
|
import type { ComplianceCheckType } from '../schemas/ComplianceCheckType';
|
|
3
4
|
export interface ComplianceFilter {
|
|
4
|
-
entity?:
|
|
5
|
-
|
|
5
|
+
entity?: ComplianceCheckEntityType;
|
|
6
|
+
standards?: ComplianceStandardType[];
|
|
6
7
|
type?: ComplianceCheckType;
|
|
7
8
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface OpenSourcePackageDto {
|
|
2
|
+
default_version?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
repo_url?: string;
|
|
6
|
+
score?: string;
|
|
7
|
+
system?: string;
|
|
8
|
+
tags?: Array<{
|
|
9
|
+
key?: string;
|
|
10
|
+
value?: string;
|
|
11
|
+
}>;
|
|
12
|
+
total_versions?: string;
|
|
13
|
+
}
|
package/package.json
CHANGED
|
File without changes
|