@harnessio/react-ssca-manager-client 0.42.0 → 0.43.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.
@@ -1,13 +1,13 @@
1
- import { UseMutationOptions } from '@tanstack/react-query';
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { ArtifactSourcesListingResponseResponse } from '../responses/ArtifactSourcesListingResponseResponse';
3
3
  import type { ArtifactListingRequestBodyRequestBody } from '../requestBodies/ArtifactListingRequestBodyRequestBody';
4
4
  import type { ResponseWithPagination } from '../helpers';
5
5
  import { FetcherOptions } from '../../../../fetcher/index.js';
6
- export interface ListArtifactSourcesMutationPathParams {
6
+ export interface ListArtifactSourcesQueryPathParams {
7
7
  org: string;
8
8
  project: string;
9
9
  }
10
- export interface ListArtifactSourcesMutationQueryParams {
10
+ export interface ListArtifactSourcesQueryQueryParams {
11
11
  /**
12
12
  * @default 30
13
13
  */
@@ -20,23 +20,20 @@ export interface ListArtifactSourcesMutationQueryParams {
20
20
  * @default 0
21
21
  */
22
22
  page?: number;
23
- /**
24
- * @default "name"
25
- */
26
23
  sort?: {};
27
24
  }
28
- export interface ListArtifactSourcesMutationHeaderParams {
25
+ export interface ListArtifactSourcesQueryHeaderParams {
29
26
  'Harness-Account': string;
30
27
  }
31
28
  export type ListArtifactSourcesRequestBody = ArtifactListingRequestBodyRequestBody;
32
29
  export type ListArtifactSourcesOkResponse = ResponseWithPagination<ArtifactSourcesListingResponseResponse>;
33
30
  export type ListArtifactSourcesErrorResponse = unknown;
34
- export interface ListArtifactSourcesProps extends ListArtifactSourcesMutationPathParams, Omit<FetcherOptions<ListArtifactSourcesMutationQueryParams, ListArtifactSourcesRequestBody, ListArtifactSourcesMutationHeaderParams>, 'url'> {
35
- queryParams: ListArtifactSourcesMutationQueryParams;
31
+ export interface ListArtifactSourcesProps extends ListArtifactSourcesQueryPathParams, Omit<FetcherOptions<ListArtifactSourcesQueryQueryParams, ListArtifactSourcesRequestBody, ListArtifactSourcesQueryHeaderParams>, 'url'> {
32
+ queryParams: ListArtifactSourcesQueryQueryParams;
36
33
  body: ListArtifactSourcesRequestBody;
37
34
  }
38
35
  export declare function listArtifactSources(props: ListArtifactSourcesProps): Promise<ListArtifactSourcesOkResponse>;
39
36
  /**
40
37
  * List Artifact Sources and associated artifacts count
41
38
  */
42
- export declare function useListArtifactSourcesMutation(options?: Omit<UseMutationOptions<ListArtifactSourcesOkResponse, ListArtifactSourcesErrorResponse, ListArtifactSourcesProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ListArtifactSourcesOkResponse, unknown, ListArtifactSourcesProps, unknown>;
39
+ export declare function useListArtifactSourcesQuery(props: ListArtifactSourcesProps, options?: Omit<UseQueryOptions<ListArtifactSourcesOkResponse, ListArtifactSourcesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListArtifactSourcesOkResponse, 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 listArtifactSources(props) {
7
7
  return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/artifact-sources`, method: 'POST' }, props));
@@ -9,6 +9,6 @@ export function listArtifactSources(props) {
9
9
  /**
10
10
  * List Artifact Sources and associated artifacts count
11
11
  */
12
- export function useListArtifactSourcesMutation(options) {
13
- return useMutation((mutateProps) => listArtifactSources(mutateProps), options);
12
+ export function useListArtifactSourcesQuery(props, options) {
13
+ return useQuery(['listArtifactSources', props.org, props.project, props.queryParams, props.body], ({ signal }) => listArtifactSources(Object.assign(Object.assign({}, props), { signal })), options);
14
14
  }
@@ -1,8 +1,6 @@
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';
6
4
  export type { CalculateDriftForArtifactErrorResponse, CalculateDriftForArtifactMutationPathParams, CalculateDriftForArtifactOkResponse, CalculateDriftForArtifactProps, CalculateDriftForArtifactRequestBody, } from './hooks/useCalculateDriftForArtifactMutation';
7
5
  export { calculateDriftForArtifact, useCalculateDriftForArtifactMutation, } from './hooks/useCalculateDriftForArtifactMutation';
8
6
  export type { CheckArtifactAndDeploymentsErrorResponse, CheckArtifactAndDeploymentsMutationPathParams, CheckArtifactAndDeploymentsOkResponse, CheckArtifactAndDeploymentsProps, CheckArtifactAndDeploymentsRequestBody, } from './hooks/useCheckArtifactAndDeploymentsMutation';
@@ -57,8 +55,6 @@ export type { GetLicenseDriftErrorResponse, GetLicenseDriftOkResponse, GetLicens
57
55
  export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
58
56
  export type { GetOverallSummaryErrorResponse, GetOverallSummaryOkResponse, GetOverallSummaryProps, GetOverallSummaryQueryPathParams, } from './hooks/useGetOverallSummaryQuery';
59
57
  export { getOverallSummary, useGetOverallSummaryQuery } from './hooks/useGetOverallSummaryQuery';
60
- export type { GetPackageVersionsErrorResponse, GetPackageVersionsOkResponse, GetPackageVersionsProps, GetPackageVersionsQueryPathParams, } from './hooks/useGetPackageVersionsQuery';
61
- export { getPackageVersions, useGetPackageVersionsQuery } from './hooks/useGetPackageVersionsQuery';
62
58
  export type { GetPipelineArtifactListErrorResponse, GetPipelineArtifactListOkResponse, GetPipelineArtifactListProps, GetPipelineArtifactListQueryPathParams, GetPipelineArtifactListRequestBody, } from './hooks/useGetPipelineArtifactListQuery';
63
59
  export { getPipelineArtifactList, useGetPipelineArtifactListQuery, } from './hooks/useGetPipelineArtifactListQuery';
64
60
  export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
@@ -71,8 +67,8 @@ export type { GetSbomScorecardErrorResponse, GetSbomScorecardOkResponse, GetSbom
71
67
  export { getSbomScorecard, useGetSbomScorecardQuery } from './hooks/useGetSbomScorecardQuery';
72
68
  export type { GetSscaSummaryErrorResponse, GetSscaSummaryOkResponse, GetSscaSummaryProps, GetSscaSummaryQueryPathParams, } from './hooks/useGetSscaSummaryQuery';
73
69
  export { getSscaSummary, useGetSscaSummaryQuery } from './hooks/useGetSscaSummaryQuery';
74
- export type { ListArtifactSourcesErrorResponse, ListArtifactSourcesMutationPathParams, ListArtifactSourcesMutationQueryParams, ListArtifactSourcesOkResponse, ListArtifactSourcesProps, ListArtifactSourcesRequestBody, } from './hooks/useListArtifactSourcesMutation';
75
- export { listArtifactSources, useListArtifactSourcesMutation, } from './hooks/useListArtifactSourcesMutation';
70
+ export type { ListArtifactSourcesErrorResponse, ListArtifactSourcesOkResponse, ListArtifactSourcesProps, ListArtifactSourcesQueryPathParams, ListArtifactSourcesQueryQueryParams, ListArtifactSourcesRequestBody, } from './hooks/useListArtifactSourcesQuery';
71
+ export { listArtifactSources, useListArtifactSourcesQuery, } from './hooks/useListArtifactSourcesQuery';
76
72
  export type { ListArtifactsErrorResponse, ListArtifactsOkResponse, ListArtifactsProps, ListArtifactsQueryPathParams, ListArtifactsQueryQueryParams, ListArtifactsRequestBody, } from './hooks/useListArtifactsQuery';
77
73
  export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
78
74
  export type { ListIntegrationsErrorResponse, ListIntegrationsOkResponse, ListIntegrationsProps, ListIntegrationsQueryPathParams, ListIntegrationsQueryQueryParams, } from './hooks/useListIntegrationsQuery';
@@ -170,6 +166,7 @@ export type { ContactInfo } from './schemas/ContactInfo';
170
166
  export type { CreateIntegrationRequest } from './schemas/CreateIntegrationRequest';
171
167
  export type { CreateTicketRequest } from './schemas/CreateTicketRequest';
172
168
  export type { CreateTicketResponse } from './schemas/CreateTicketResponse';
169
+ export type { Deployments } from './schemas/Deployments';
173
170
  export type { DeploymentsCount } from './schemas/DeploymentsCount';
174
171
  export type { EnforcementModelPipeline } from './schemas/EnforcementModelPipeline';
175
172
  export type { EnvironmentInfo } from './schemas/EnvironmentInfo';
@@ -185,8 +182,6 @@ export type { LicenseFilter } from './schemas/LicenseFilter';
185
182
  export type { LicenseUsageResponse } from './schemas/LicenseUsageResponse';
186
183
  export type { ListIntegrationReposResponse } from './schemas/ListIntegrationReposResponse';
187
184
  export type { NameOperator } from './schemas/NameOperator';
188
- export type { OpenSourcePackageDto } from './schemas/OpenSourcePackageDto';
189
- export type { OpenSourcePackageVersion } from './schemas/OpenSourcePackageVersion';
190
185
  export type { Operator } from './schemas/Operator';
191
186
  export type { OrchestrationModelPipeline } from './schemas/OrchestrationModelPipeline';
192
187
  export type { PipelineInfo } from './schemas/PipelineInfo';
@@ -1,5 +1,4 @@
1
1
  export { artifactList, useArtifactListQuery } from './hooks/useArtifactListQuery';
2
- export { askQuestion, useAskQuestionMutation } from './hooks/useAskQuestionMutation';
3
2
  export { calculateDriftForArtifact, useCalculateDriftForArtifactMutation, } from './hooks/useCalculateDriftForArtifactMutation';
4
3
  export { checkArtifactAndDeployments, useCheckArtifactAndDeploymentsMutation, } from './hooks/useCheckArtifactAndDeploymentsMutation';
5
4
  export { closeRemediationTracker, useCloseRemediationTrackerMutation, } from './hooks/useCloseRemediationTrackerMutation';
@@ -27,14 +26,13 @@ export { getEnvironmentListForRemediation, useGetEnvironmentListForRemediationQu
27
26
  export { getIntegrationRepos, useGetIntegrationReposQuery, } from './hooks/useGetIntegrationReposQuery';
28
27
  export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
29
28
  export { getOverallSummary, useGetOverallSummaryQuery } from './hooks/useGetOverallSummaryQuery';
30
- export { getPackageVersions, useGetPackageVersionsQuery } from './hooks/useGetPackageVersionsQuery';
31
29
  export { getPipelineArtifactList, useGetPipelineArtifactListQuery, } from './hooks/useGetPipelineArtifactListQuery';
32
30
  export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
33
31
  export { getProvenance, useGetProvenanceQuery } from './hooks/useGetProvenanceQuery';
34
32
  export { getRemediationDetails, useGetRemediationDetailsQuery, } from './hooks/useGetRemediationDetailsQuery';
35
33
  export { getSbomScorecard, useGetSbomScorecardQuery } from './hooks/useGetSbomScorecardQuery';
36
34
  export { getSscaSummary, useGetSscaSummaryQuery } from './hooks/useGetSscaSummaryQuery';
37
- export { listArtifactSources, useListArtifactSourcesMutation, } from './hooks/useListArtifactSourcesMutation';
35
+ export { listArtifactSources, useListArtifactSourcesQuery, } from './hooks/useListArtifactSourcesQuery';
38
36
  export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
39
37
  export { listIntegrations, useListIntegrationsQuery } from './hooks/useListIntegrationsQuery';
40
38
  export { listLatestArtifacts, useListLatestArtifactsQuery, } from './hooks/useListLatestArtifactsQuery';
@@ -1,12 +1,20 @@
1
+ import type { Deployments } from '../schemas/Deployments';
2
+ import type { StoIssueCount } from '../schemas/StoIssueCount';
1
3
  export interface ArtifactSourcesListingResponse {
2
4
  /**
3
5
  * Count of artifacts with the given url and name.
4
6
  */
5
7
  count?: number;
8
+ deployments?: Deployments;
6
9
  /**
7
10
  * Artifact name
8
11
  */
9
12
  name?: string;
13
+ /**
14
+ * Identifier of the Artifact Source
15
+ */
16
+ source_id?: string;
17
+ sto_issue_count?: StoIssueCount;
10
18
  /**
11
19
  * Artifact Registry url
12
20
  */
@@ -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 {};
@@ -6,14 +6,18 @@ import type { ComplianceCheckType } from '../schemas/ComplianceCheckType';
6
6
  * Represents Single SSCA Compliance Check
7
7
  */
8
8
  export interface ComplianceCheck {
9
+ can_execute: boolean;
9
10
  category: string;
10
11
  category_id: string;
11
12
  compliance_id: string;
12
13
  description: string;
13
14
  entity: ComplianceCheckEntityType;
15
+ integrations?: string;
14
16
  remediation?: string;
15
17
  severity: ComplianceCheckSeverity;
16
18
  standards: ComplianceStandardType[];
19
+ sub_category: string;
20
+ sub_category_id: string;
17
21
  tags?: string[];
18
22
  title: string;
19
23
  type: ComplianceCheckType;
@@ -0,0 +1,4 @@
1
+ export interface Deployments {
2
+ non_prod_env_count?: number;
3
+ prod_env_count?: number;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1,25 +0,0 @@
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>;
@@ -1,14 +0,0 @@
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
- }
@@ -1,24 +0,0 @@
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
- }
10
- export interface GetPackageVersionsQueryHeaderParams {
11
- 'Harness-Account': string;
12
- }
13
- export type GetPackageVersionsOkResponse = ResponseWithPagination<{
14
- name?: string;
15
- versions?: OpenSourcePackageVersion[];
16
- }>;
17
- export type GetPackageVersionsErrorResponse = unknown;
18
- export interface GetPackageVersionsProps extends GetPackageVersionsQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetPackageVersionsQueryHeaderParams>, 'url'> {
19
- }
20
- export declare function getPackageVersions(props: GetPackageVersionsProps): Promise<GetPackageVersionsOkResponse>;
21
- /**
22
- * Get Package Versions
23
- */
24
- export declare function useGetPackageVersionsQuery(props: GetPackageVersionsProps, options?: Omit<UseQueryOptions<GetPackageVersionsOkResponse, GetPackageVersionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetPackageVersionsOkResponse, unknown>;
@@ -1,14 +0,0 @@
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}/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], ({ signal }) => getPackageVersions(Object.assign(Object.assign({}, props), { signal })), options);
14
- }
@@ -1,13 +0,0 @@
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
- }
@@ -1,6 +0,0 @@
1
- export interface OpenSourcePackageVersion {
2
- advisories?: number;
3
- dependencies?: number;
4
- time?: string;
5
- version?: string;
6
- }
@@ -1,4 +0,0 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
- export {};