@harnessio/react-chaos-manager-client 1.91.1 → 1.91.2

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.
@@ -23,6 +23,6 @@ export interface GetRiskScanResponseContainer {
23
23
  }
24
24
  export declare function getRiskScan(props: GetRiskScanProps): Promise<GetRiskScanResponseContainer>;
25
25
  /**
26
- * gets a risk scan by its identity
26
+ * gets a risk scan by its identity. recommendationCounts.total is the number of live experiment recommendations for risks this scan detected. The field is omitted when the count cannot be loaded.
27
27
  */
28
28
  export declare function useGetRiskScanQuery(props: GetRiskScanProps, options?: Omit<UseQueryOptions<GetRiskScanResponseContainer, GetRiskScanErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetRiskScanResponseContainer, SharedError>;
@@ -7,7 +7,7 @@ export function getRiskScan(props) {
7
7
  return fetcher(Object.assign({ url: `/v3/risk-scans/${props.identity}`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
- * gets a risk scan by its identity
10
+ * gets a risk scan by its identity. recommendationCounts.total is the number of live experiment recommendations for risks this scan detected. The field is omitted when the count cannot be loaded.
11
11
  */
12
12
  export function useGetRiskScanQuery(props, options) {
13
13
  return useQuery(['getRiskScan', props.identity, props.queryParams], ({ signal }) => getRiskScan(Object.assign(Object.assign({}, props), { signal })), options);
@@ -5,6 +5,7 @@ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
5
  export interface ListRiskExperimentRecommendationsQueryQueryParams {
6
6
  accountIdentifier: string;
7
7
  correlationID?: string;
8
+ endTime?: number;
8
9
  /**
9
10
  * @default 15
10
11
  */
@@ -16,8 +17,23 @@ export interface ListRiskExperimentRecommendationsQueryQueryParams {
16
17
  page?: number;
17
18
  parentUniqueId?: string;
18
19
  projectIdentifier?: string;
20
+ scanIdentity?: string;
19
21
  scannedRiskIdentity?: string;
20
22
  search?: string;
23
+ serviceFilterV2CDServiceEnvironmentID?: string;
24
+ serviceFilterV2CDServiceIdentity?: string;
25
+ serviceFilterV2CDServiceInfrastructureID?: string;
26
+ serviceFilterV2ChaosServiceIdentity?: string;
27
+ serviceFilterV2DiscoveredServiceAgentID?: string;
28
+ serviceFilterV2DiscoveredServiceEnvironmentID?: string;
29
+ serviceFilterV2DiscoveredServiceExternalID?: string;
30
+ serviceFilterV2Kind?: 'CDService' | 'ChaosService' | 'DiscoveredService';
31
+ serviceIdentity?: string;
32
+ severity?: 'Critical' | 'High' | 'Low' | 'Medium';
33
+ sortAscending?: boolean;
34
+ sortField?: 'lastUpdated' | 'name' | 'severity';
35
+ source?: 'DiscoveryAgent' | 'PipelineExecution' | 'ProbeExecution';
36
+ startTime?: number;
21
37
  }
22
38
  export type ListRiskExperimentRecommendationsOkResponse = RiskexperimentrecommendationsListResponse;
23
39
  export type ListRiskExperimentRecommendationsErrorResponse = SharedError;
@@ -30,6 +46,10 @@ export interface ListRiskExperimentRecommendationsResponseContainer {
30
46
  }
31
47
  export declare function listRiskExperimentRecommendations(props: ListRiskExperimentRecommendationsProps): Promise<ListRiskExperimentRecommendationsResponseContainer>;
32
48
  /**
33
- * returns the live risk experiment recommendations. Missing recommendations are created by the background reconciler. When scannedRiskIdentity is set, only that risk's recommendation is returned.
49
+ * returns the live risk experiment recommendations. Missing recommendations are created by the background reconciler.
50
+ * When scannedRiskIdentity is set, only that risk's recommendation is returned. scanIdentity limits the list to risks detected by that scan.
51
+ * severity, source, and the serviceIdentity/serviceFilterV2 fields filter the same way as the scanned-risks list.
52
+ * startTime and endTime are unix milliseconds and limit the list to recommendations created in that window.
53
+ * sortField orders by name, severity, or lastUpdated (the default, newest first).
34
54
  */
35
55
  export declare function useListRiskExperimentRecommendationsQuery(props: ListRiskExperimentRecommendationsProps, options?: Omit<UseQueryOptions<ListRiskExperimentRecommendationsResponseContainer, ListRiskExperimentRecommendationsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListRiskExperimentRecommendationsResponseContainer, SharedError>;
@@ -7,7 +7,11 @@ export function listRiskExperimentRecommendations(props) {
7
7
  return fetcher(Object.assign({ url: `/v3/risk-experiment-recommendations`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
- * returns the live risk experiment recommendations. Missing recommendations are created by the background reconciler. When scannedRiskIdentity is set, only that risk's recommendation is returned.
10
+ * returns the live risk experiment recommendations. Missing recommendations are created by the background reconciler.
11
+ * When scannedRiskIdentity is set, only that risk's recommendation is returned. scanIdentity limits the list to risks detected by that scan.
12
+ * severity, source, and the serviceIdentity/serviceFilterV2 fields filter the same way as the scanned-risks list.
13
+ * startTime and endTime are unix milliseconds and limit the list to recommendations created in that window.
14
+ * sortField orders by name, severity, or lastUpdated (the default, newest first).
11
15
  */
12
16
  export function useListRiskExperimentRecommendationsQuery(props, options) {
13
17
  return useQuery(['listRiskExperimentRecommendations', props.queryParams], ({ signal }) => listRiskExperimentRecommendations(Object.assign(Object.assign({}, props), { signal })), options);
@@ -28,7 +28,7 @@ export interface ListRiskScanRisksQueryQueryParams {
28
28
  serviceIdentity?: string;
29
29
  severity?: 'Critical' | 'High' | 'Low' | 'Medium';
30
30
  sortAscending?: boolean;
31
- sortField?: 'createdAt' | 'experimentName' | 'lastExecuted' | 'lastUpdated' | 'name';
31
+ sortField?: 'firstDetected' | 'lastDetected' | 'name' | 'occurrenceCount' | 'severity';
32
32
  status?: 'Ignored' | 'InProgress' | 'Open' | 'Resolved';
33
33
  tags?: string;
34
34
  validationType?: 'Confirmed' | 'Passive';
@@ -31,7 +31,7 @@ export interface ListScannedRisksQueryQueryParams {
31
31
  serviceFilterV2DiscoveredServiceExternalID?: string;
32
32
  serviceFilterV2Kind?: 'CDService' | 'ChaosService' | 'DiscoveredService';
33
33
  serviceIdentity?: string;
34
- severity?: string;
34
+ severity?: 'Critical' | 'High' | 'Low' | 'Medium';
35
35
  sortAscending?: boolean;
36
36
  sortField?: 'firstDetected' | 'lastDetected' | 'lastUpdated' | 'name' | 'occurrenceCount' | 'severity';
37
37
  source?: 'DiscoveryAgent' | 'PipelineExecution' | 'ProbeExecution';
@@ -1368,6 +1368,7 @@ export type { RiskscansHeatmapSummary } from './schemas/RiskscansHeatmapSummary'
1368
1368
  export type { RiskscansListResponse } from './schemas/RiskscansListResponse';
1369
1369
  export type { RiskscansOccurrenceContext } from './schemas/RiskscansOccurrenceContext';
1370
1370
  export type { RiskscansOccurrenceDetails } from './schemas/RiskscansOccurrenceDetails';
1371
+ export type { RiskscansRecommendationCounts } from './schemas/RiskscansRecommendationCounts';
1371
1372
  export type { RiskscansReportResponse } from './schemas/RiskscansReportResponse';
1372
1373
  export type { RiskscansReportSummary } from './schemas/RiskscansReportSummary';
1373
1374
  export type { RiskscansRiskScanResponse } from './schemas/RiskscansRiskScanResponse';
@@ -29,6 +29,10 @@ export interface RiskexperimentrecommendationsRiskExperimentRecommendationSpec {
29
29
  riskRuleId?: string;
30
30
  scanType?: RiskScanType;
31
31
  severity?: RiskSeverity;
32
+ /**
33
+ * SeverityOrder is Severity.Order(), so a severity sort ranks Critical above Low.
34
+ */
35
+ severityOrder?: number;
32
36
  status?: RiskexperimentrecommendationsStatus;
33
37
  workload?: RiskexperimentrecommendationsWorkload;
34
38
  }
@@ -0,0 +1,3 @@
1
+ export interface RiskscansRecommendationCounts {
2
+ total?: number;
3
+ }
@@ -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,6 +1,7 @@
1
1
  import type { RiskCollectionSummary } from '../schemas/RiskCollectionSummary';
2
2
  import type { HcesdkUserDetails } from '../schemas/HcesdkUserDetails';
3
3
  import type { RiskDetectionMethod } from '../schemas/RiskDetectionMethod';
4
+ import type { RiskscansRecommendationCounts } from '../schemas/RiskscansRecommendationCounts';
4
5
  import type { RiskReportInfo } from '../schemas/RiskReportInfo';
5
6
  import type { RiskScanResult } from '../schemas/RiskScanResult';
6
7
  import type { RiskRiskSummary } from '../schemas/RiskRiskSummary';
@@ -29,6 +30,7 @@ export interface RiskscansRiskScanResponse {
29
30
  */
30
31
  parentUniqueID?: string;
31
32
  projectID?: string;
33
+ recommendationCounts?: RiskscansRecommendationCounts;
32
34
  report?: RiskReportInfo;
33
35
  result?: RiskScanResult;
34
36
  retryCount?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-chaos-manager-client",
3
- "version": "1.91.1",
3
+ "version": "1.91.2",
4
4
  "description": "Harness React Chaos Manager Service Client - APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",