@harnessio/react-ssca-manager-client 0.84.8 → 0.84.9

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.
@@ -0,0 +1,16 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { AutoPrPresetsResponse } from '../schemas/AutoPrPresetsResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetAutoPrPresetsQueryHeaderParams {
6
+ 'Harness-Account': string;
7
+ }
8
+ export type GetAutoPrPresetsOkResponse = ResponseWithPagination<AutoPrPresetsResponse>;
9
+ export type GetAutoPrPresetsErrorResponse = unknown;
10
+ export interface GetAutoPrPresetsProps extends Omit<FetcherOptions<unknown, unknown, GetAutoPrPresetsQueryHeaderParams>, 'url'> {
11
+ }
12
+ export declare function getAutoPrPresets(props: GetAutoPrPresetsProps): Promise<GetAutoPrPresetsOkResponse>;
13
+ /**
14
+ * Returns all available Auto PR preset configurations with their default rule values
15
+ */
16
+ export declare function useGetAutoPrPresetsQuery(props: GetAutoPrPresetsProps, options?: Omit<UseQueryOptions<GetAutoPrPresetsOkResponse, GetAutoPrPresetsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAutoPrPresetsOkResponse, 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 getAutoPrPresets(props) {
7
+ return fetcher(Object.assign({ url: `/v1/ssca-config/auto-pr-config/presets`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns all available Auto PR preset configurations with their default rule values
11
+ */
12
+ export function useGetAutoPrPresetsQuery(props, options) {
13
+ return useQuery(['getAutoPrPresets'], ({ signal }) => getAutoPrPresets(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -2,10 +2,6 @@ import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { ArtifactComponentOverviewResponseBodyResponse } from '../responses/ArtifactComponentOverviewResponseBodyResponse';
3
3
  import type { ResponseWithPagination } from '../helpers';
4
4
  import { FetcherOptions } from '../../../../fetcher/index.js';
5
- export interface GetComponentDetailsByPurlQueryPathParams {
6
- org: string;
7
- project: string;
8
- }
9
5
  export interface GetComponentDetailsByPurlQueryQueryParams {
10
6
  purl: string;
11
7
  }
@@ -14,7 +10,7 @@ export interface GetComponentDetailsByPurlQueryHeaderParams {
14
10
  }
15
11
  export type GetComponentDetailsByPurlOkResponse = ResponseWithPagination<ArtifactComponentOverviewResponseBodyResponse>;
16
12
  export type GetComponentDetailsByPurlErrorResponse = unknown;
17
- export interface GetComponentDetailsByPurlProps extends GetComponentDetailsByPurlQueryPathParams, Omit<FetcherOptions<GetComponentDetailsByPurlQueryQueryParams, unknown, GetComponentDetailsByPurlQueryHeaderParams>, 'url'> {
13
+ export interface GetComponentDetailsByPurlProps extends Omit<FetcherOptions<GetComponentDetailsByPurlQueryQueryParams, unknown, GetComponentDetailsByPurlQueryHeaderParams>, 'url'> {
18
14
  queryParams: GetComponentDetailsByPurlQueryQueryParams;
19
15
  }
20
16
  export declare function getComponentDetailsByPurl(props: GetComponentDetailsByPurlProps): Promise<GetComponentDetailsByPurlOkResponse>;
@@ -4,11 +4,11 @@
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function getComponentDetailsByPurl(props) {
7
- return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/components/details`, method: 'GET' }, props));
7
+ return fetcher(Object.assign({ url: `/v1/components/details`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
10
  * Get component details by PURL
11
11
  */
12
12
  export function useGetComponentDetailsByPurlQuery(props, options) {
13
- return useQuery(['getComponentDetailsByPurl', props.org, props.project, props.queryParams], ({ signal }) => getComponentDetailsByPurl(Object.assign(Object.assign({}, props), { signal })), options);
13
+ return useQuery(['getComponentDetailsByPurl', props.queryParams], ({ signal }) => getComponentDetailsByPurl(Object.assign(Object.assign({}, props), { signal })), options);
14
14
  }
@@ -2,10 +2,6 @@ import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { ComponentVulnerabilityListResponseBodyResponse } from '../responses/ComponentVulnerabilityListResponseBodyResponse';
3
3
  import type { ResponseWithPagination } from '../helpers';
4
4
  import { FetcherOptions } from '../../../../fetcher/index.js';
5
- export interface GetComponentVulnerabilitiesByPurlQueryPathParams {
6
- org: string;
7
- project: string;
8
- }
9
5
  export interface GetComponentVulnerabilitiesByPurlQueryQueryParams {
10
6
  purl: string;
11
7
  /**
@@ -28,7 +24,7 @@ export interface GetComponentVulnerabilitiesByPurlQueryHeaderParams {
28
24
  }
29
25
  export type GetComponentVulnerabilitiesByPurlOkResponse = ResponseWithPagination<ComponentVulnerabilityListResponseBodyResponse>;
30
26
  export type GetComponentVulnerabilitiesByPurlErrorResponse = unknown;
31
- export interface GetComponentVulnerabilitiesByPurlProps extends GetComponentVulnerabilitiesByPurlQueryPathParams, Omit<FetcherOptions<GetComponentVulnerabilitiesByPurlQueryQueryParams, unknown, GetComponentVulnerabilitiesByPurlQueryHeaderParams>, 'url'> {
27
+ export interface GetComponentVulnerabilitiesByPurlProps extends Omit<FetcherOptions<GetComponentVulnerabilitiesByPurlQueryQueryParams, unknown, GetComponentVulnerabilitiesByPurlQueryHeaderParams>, 'url'> {
32
28
  queryParams: GetComponentVulnerabilitiesByPurlQueryQueryParams;
33
29
  }
34
30
  export declare function getComponentVulnerabilitiesByPurl(props: GetComponentVulnerabilitiesByPurlProps): Promise<GetComponentVulnerabilitiesByPurlOkResponse>;
@@ -4,11 +4,11 @@
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function getComponentVulnerabilitiesByPurl(props) {
7
- return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/components/vulnerabilities`, method: 'GET' }, props));
7
+ return fetcher(Object.assign({ url: `/v1/components/vulnerabilities`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
10
  * Get component vulnerabilities by PURL
11
11
  */
12
12
  export function useGetComponentVulnerabilitiesByPurlQuery(props, options) {
13
- return useQuery(['getComponentVulnerabilitiesByPurl', props.org, props.project, props.queryParams], ({ signal }) => getComponentVulnerabilitiesByPurl(Object.assign(Object.assign({}, props), { signal })), options);
13
+ return useQuery(['getComponentVulnerabilitiesByPurl', props.queryParams], ({ signal }) => getComponentVulnerabilitiesByPurl(Object.assign(Object.assign({}, props), { signal })), options);
14
14
  }
@@ -65,6 +65,8 @@ export type { GetArtifactV2OverviewErrorResponse, GetArtifactV2OverviewOkRespons
65
65
  export { getArtifactV2Overview, useGetArtifactV2OverviewQuery, } from './hooks/useGetArtifactV2OverviewQuery';
66
66
  export type { GetAutoPrConfigErrorResponse, GetAutoPrConfigOkResponse, GetAutoPrConfigProps, GetAutoPrConfigQueryQueryParams, } from './hooks/useGetAutoPrConfigQuery';
67
67
  export { getAutoPrConfig, useGetAutoPrConfigQuery } from './hooks/useGetAutoPrConfigQuery';
68
+ export type { GetAutoPrPresetsErrorResponse, GetAutoPrPresetsOkResponse, GetAutoPrPresetsProps, } from './hooks/useGetAutoPrPresetsQuery';
69
+ export { getAutoPrPresets, useGetAutoPrPresetsQuery } from './hooks/useGetAutoPrPresetsQuery';
68
70
  export type { GetBaselineForArtifactErrorResponse, GetBaselineForArtifactOkResponse, GetBaselineForArtifactProps, GetBaselineForArtifactQueryPathParams, } from './hooks/useGetBaselineForArtifactQuery';
69
71
  export { getBaselineForArtifact, useGetBaselineForArtifactQuery, } from './hooks/useGetBaselineForArtifactQuery';
70
72
  export type { GetCicdOverviewErrorResponse, GetCicdOverviewOkResponse, GetCicdOverviewProps, GetCicdOverviewQueryPathParams, } from './hooks/useGetCicdOverviewQuery';
@@ -87,13 +89,13 @@ export type { GetComplianceStandardsFiltersErrorResponse, GetComplianceStandards
87
89
  export { getComplianceStandardsFilters, useGetComplianceStandardsFiltersQuery, } from './hooks/useGetComplianceStandardsFiltersQuery';
88
90
  export type { GetComplianceStandardsErrorResponse, GetComplianceStandardsMutationPathParams, GetComplianceStandardsMutationQueryParams, GetComplianceStandardsOkResponse, GetComplianceStandardsProps, GetComplianceStandardsRequestBody, } from './hooks/useGetComplianceStandardsMutation';
89
91
  export { getComplianceStandards, useGetComplianceStandardsMutation, } from './hooks/useGetComplianceStandardsMutation';
90
- export type { GetComponentDetailsByPurlErrorResponse, GetComponentDetailsByPurlOkResponse, GetComponentDetailsByPurlProps, GetComponentDetailsByPurlQueryPathParams, GetComponentDetailsByPurlQueryQueryParams, } from './hooks/useGetComponentDetailsByPurlQuery';
92
+ export type { GetComponentDetailsByPurlErrorResponse, GetComponentDetailsByPurlOkResponse, GetComponentDetailsByPurlProps, GetComponentDetailsByPurlQueryQueryParams, } from './hooks/useGetComponentDetailsByPurlQuery';
91
93
  export { getComponentDetailsByPurl, useGetComponentDetailsByPurlQuery, } from './hooks/useGetComponentDetailsByPurlQuery';
92
94
  export type { GetComponentDriftErrorResponse, GetComponentDriftOkResponse, GetComponentDriftProps, GetComponentDriftQueryPathParams, GetComponentDriftQueryQueryParams, } from './hooks/useGetComponentDriftQuery';
93
95
  export { getComponentDrift, useGetComponentDriftQuery } from './hooks/useGetComponentDriftQuery';
94
96
  export type { GetComponentTicketErrorResponse, GetComponentTicketOkResponse, GetComponentTicketProps, GetComponentTicketQueryPathParams, GetComponentTicketQueryQueryParams, } from './hooks/useGetComponentTicketQuery';
95
97
  export { getComponentTicket, useGetComponentTicketQuery } from './hooks/useGetComponentTicketQuery';
96
- export type { GetComponentVulnerabilitiesByPurlErrorResponse, GetComponentVulnerabilitiesByPurlOkResponse, GetComponentVulnerabilitiesByPurlProps, GetComponentVulnerabilitiesByPurlQueryPathParams, GetComponentVulnerabilitiesByPurlQueryQueryParams, } from './hooks/useGetComponentVulnerabilitiesByPurlQuery';
98
+ export type { GetComponentVulnerabilitiesByPurlErrorResponse, GetComponentVulnerabilitiesByPurlOkResponse, GetComponentVulnerabilitiesByPurlProps, GetComponentVulnerabilitiesByPurlQueryQueryParams, } from './hooks/useGetComponentVulnerabilitiesByPurlQuery';
97
99
  export { getComponentVulnerabilitiesByPurl, useGetComponentVulnerabilitiesByPurlQuery, } from './hooks/useGetComponentVulnerabilitiesByPurlQuery';
98
100
  export type { GetComponentsErrorResponse, GetComponentsOkResponse, GetComponentsProps, GetComponentsQueryPathParams, GetComponentsQueryQueryParams, } from './hooks/useGetComponentsQuery';
99
101
  export { getComponents, useGetComponentsQuery } from './hooks/useGetComponentsQuery';
@@ -325,6 +327,8 @@ export type { AutoPrConfigResponseBody } from './schemas/AutoPrConfigResponseBod
325
327
  export type { AutoPrConfigUpdates } from './schemas/AutoPrConfigUpdates';
326
328
  export type { AutoPrDependencySafetyRule } from './schemas/AutoPrDependencySafetyRule';
327
329
  export type { AutoPrPreset } from './schemas/AutoPrPreset';
330
+ export type { AutoPrPresetConfig } from './schemas/AutoPrPresetConfig';
331
+ export type { AutoPrPresetsResponse } from './schemas/AutoPrPresetsResponse';
328
332
  export type { AutoPrSchedule } from './schemas/AutoPrSchedule';
329
333
  export type { AutoPrScheduleType } from './schemas/AutoPrScheduleType';
330
334
  export type { AutoPrSecurityRule } from './schemas/AutoPrSecurityRule';
@@ -31,6 +31,7 @@ export { getArtifactV2DetailComponentView, useGetArtifactV2DetailComponentViewQu
31
31
  export { getArtifactV2DetailDeploymentView, useGetArtifactV2DetailDeploymentViewQuery, } from './hooks/useGetArtifactV2DetailDeploymentViewQuery';
32
32
  export { getArtifactV2Overview, useGetArtifactV2OverviewQuery, } from './hooks/useGetArtifactV2OverviewQuery';
33
33
  export { getAutoPrConfig, useGetAutoPrConfigQuery } from './hooks/useGetAutoPrConfigQuery';
34
+ export { getAutoPrPresets, useGetAutoPrPresetsQuery } from './hooks/useGetAutoPrPresetsQuery';
34
35
  export { getBaselineForArtifact, useGetBaselineForArtifactQuery, } from './hooks/useGetBaselineForArtifactQuery';
35
36
  export { getCicdOverview, useGetCicdOverviewQuery } from './hooks/useGetCicdOverviewQuery';
36
37
  export { getCicdRulesEvaluationTrend, useGetCicdRulesEvaluationTrendQuery, } from './hooks/useGetCicdRulesEvaluationTrendQuery';
@@ -0,0 +1,16 @@
1
+ import type { AutoPrAdvancedRule } from '../schemas/AutoPrAdvancedRule';
2
+ import type { AutoPrSchedule } from '../schemas/AutoPrSchedule';
3
+ import type { AutoPrComplianceRule } from '../schemas/AutoPrComplianceRule';
4
+ import type { AutoPrDependencySafetyRule } from '../schemas/AutoPrDependencySafetyRule';
5
+ import type { AutoPrPreset } from '../schemas/AutoPrPreset';
6
+ import type { AutoPrSecurityRule } from '../schemas/AutoPrSecurityRule';
7
+ import type { AutoPrVersioningRule } from '../schemas/AutoPrVersioningRule';
8
+ export interface AutoPrPresetConfig {
9
+ advanced_rule?: AutoPrAdvancedRule;
10
+ auto_pr_schedule?: AutoPrSchedule;
11
+ compliance_rule?: AutoPrComplianceRule;
12
+ dependency_safety_rule?: AutoPrDependencySafetyRule;
13
+ preset?: AutoPrPreset;
14
+ security_rule?: AutoPrSecurityRule;
15
+ versioning_rule?: AutoPrVersioningRule;
16
+ }
@@ -0,0 +1,7 @@
1
+ import type { AutoPrPresetConfig } from '../schemas/AutoPrPresetConfig';
2
+ export interface AutoPrPresetsResponse {
3
+ /**
4
+ * List of available Auto PR presets with their default configurations
5
+ */
6
+ presets?: AutoPrPresetConfig[];
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.84.8",
3
+ "version": "0.84.9",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",