@harnessio/react-chaos-manager-client 1.90.0 → 1.91.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.
Files changed (24) hide show
  1. package/dist/chaos-manager/src/services/hooks/useListRiskScanRisksQuery.d.ts +49 -0
  2. package/dist/chaos-manager/src/services/hooks/useListRiskScanRisksQuery.js +14 -0
  3. package/dist/chaos-manager/src/services/hooks/useListRiskScanServicesQuery.d.ts +37 -0
  4. package/dist/chaos-manager/src/services/hooks/useListRiskScanServicesQuery.js +14 -0
  5. package/dist/chaos-manager/src/services/hooks/useListRiskScanSuggestedServicesQuery.d.ts +29 -0
  6. package/dist/chaos-manager/src/services/hooks/useListRiskScanSuggestedServicesQuery.js +14 -0
  7. package/dist/chaos-manager/src/services/index.d.ts +13 -0
  8. package/dist/chaos-manager/src/services/index.js +3 -0
  9. package/dist/chaos-manager/src/services/schemas/RiskscansHeatmapRow.d.ts +2 -1
  10. package/dist/chaos-manager/src/services/schemas/RiskscansScanRiskItem.d.ts +17 -0
  11. package/dist/chaos-manager/src/services/schemas/RiskscansScanRiskItem.js +1 -0
  12. package/dist/chaos-manager/src/services/schemas/RiskscansScanRisksResponse.d.ts +7 -0
  13. package/dist/chaos-manager/src/services/schemas/RiskscansScanRisksResponse.js +1 -0
  14. package/dist/chaos-manager/src/services/schemas/RiskscansScanServiceItem.d.ts +8 -0
  15. package/dist/chaos-manager/src/services/schemas/RiskscansScanServiceItem.js +1 -0
  16. package/dist/chaos-manager/src/services/schemas/RiskscansScanServiceRiskCounts.d.ts +7 -0
  17. package/dist/chaos-manager/src/services/schemas/RiskscansScanServiceRiskCounts.js +4 -0
  18. package/dist/chaos-manager/src/services/schemas/RiskscansScanServicesResponse.d.ts +7 -0
  19. package/dist/chaos-manager/src/services/schemas/RiskscansScanServicesResponse.js +1 -0
  20. package/dist/chaos-manager/src/services/schemas/RiskscansScanSuggestedServicesResponse.d.ts +5 -0
  21. package/dist/chaos-manager/src/services/schemas/RiskscansScanSuggestedServicesResponse.js +1 -0
  22. package/dist/chaos-manager/src/services/schemas/RiskscansServiceInScanContext.d.ts +8 -0
  23. package/dist/chaos-manager/src/services/schemas/RiskscansServiceInScanContext.js +4 -0
  24. package/package.json +1 -1
@@ -0,0 +1,49 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { RiskscansScanRisksResponse } from '../schemas/RiskscansScanRisksResponse';
3
+ import type { SharedError } from '../schemas/SharedError';
4
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
+ export interface ListRiskScanRisksQueryPathParams {
6
+ identity: string;
7
+ }
8
+ export interface ListRiskScanRisksQueryQueryParams {
9
+ accountIdentifier: string;
10
+ agentIdentity?: string;
11
+ correlationID?: string;
12
+ environmentIdentity?: string;
13
+ externalID?: string;
14
+ infrastructureIdentity?: string;
15
+ /**
16
+ * @default 15
17
+ */
18
+ limit?: number;
19
+ organizationIdentifier?: string;
20
+ /**
21
+ * @default 0
22
+ */
23
+ page?: number;
24
+ parentUniqueId?: string;
25
+ projectIdentifier?: string;
26
+ riskRuleIdentities?: string;
27
+ search?: string;
28
+ serviceIdentity?: string;
29
+ severity?: 'Critical' | 'High' | 'Low' | 'Medium';
30
+ sortAscending?: boolean;
31
+ sortField?: 'createdAt' | 'experimentName' | 'lastExecuted' | 'lastUpdated' | 'name';
32
+ status?: 'Ignored' | 'InProgress' | 'Open' | 'Resolved';
33
+ tags?: string;
34
+ validationType?: 'Confirmed' | 'Passive';
35
+ }
36
+ export type ListRiskScanRisksOkResponse = RiskscansScanRisksResponse;
37
+ export type ListRiskScanRisksErrorResponse = SharedError;
38
+ export interface ListRiskScanRisksProps extends ListRiskScanRisksQueryPathParams, Omit<FetcherOptions<ListRiskScanRisksQueryQueryParams, unknown>, 'url'> {
39
+ queryParams: ListRiskScanRisksQueryQueryParams;
40
+ }
41
+ export interface ListRiskScanRisksResponseContainer {
42
+ body: ListRiskScanRisksOkResponse;
43
+ headers: Headers;
44
+ }
45
+ export declare function listRiskScanRisks(props: ListRiskScanRisksProps): Promise<ListRiskScanRisksResponseContainer>;
46
+ /**
47
+ * returns a paginated list of risks detected by the scan, each carrying the service detail relevant to the scan type in serviceInScanContext
48
+ */
49
+ export declare function useListRiskScanRisksQuery(props: ListRiskScanRisksProps, options?: Omit<UseQueryOptions<ListRiskScanRisksResponseContainer, ListRiskScanRisksErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListRiskScanRisksResponseContainer, SharedError>;
@@ -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 '../../../../custom-fetcher/index.js';
6
+ export function listRiskScanRisks(props) {
7
+ return fetcher(Object.assign({ url: `/v3/risk-scans/${props.identity}/risks`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * returns a paginated list of risks detected by the scan, each carrying the service detail relevant to the scan type in serviceInScanContext
11
+ */
12
+ export function useListRiskScanRisksQuery(props, options) {
13
+ return useQuery(['listRiskScanRisks', props.identity, props.queryParams], ({ signal }) => listRiskScanRisks(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,37 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { RiskscansScanServicesResponse } from '../schemas/RiskscansScanServicesResponse';
3
+ import type { SharedError } from '../schemas/SharedError';
4
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
+ export interface ListRiskScanServicesQueryPathParams {
6
+ identity: string;
7
+ }
8
+ export interface ListRiskScanServicesQueryQueryParams {
9
+ accountIdentifier: string;
10
+ correlationID?: string;
11
+ /**
12
+ * @default 15
13
+ */
14
+ limit?: number;
15
+ organizationIdentifier?: string;
16
+ /**
17
+ * @default 0
18
+ */
19
+ page?: number;
20
+ parentUniqueId?: string;
21
+ projectIdentifier?: string;
22
+ search?: string;
23
+ }
24
+ export type ListRiskScanServicesOkResponse = RiskscansScanServicesResponse;
25
+ export type ListRiskScanServicesErrorResponse = SharedError;
26
+ export interface ListRiskScanServicesProps extends ListRiskScanServicesQueryPathParams, Omit<FetcherOptions<ListRiskScanServicesQueryQueryParams, unknown>, 'url'> {
27
+ queryParams: ListRiskScanServicesQueryQueryParams;
28
+ }
29
+ export interface ListRiskScanServicesResponseContainer {
30
+ body: ListRiskScanServicesOkResponse;
31
+ headers: Headers;
32
+ }
33
+ export declare function listRiskScanServices(props: ListRiskScanServicesProps): Promise<ListRiskScanServicesResponseContainer>;
34
+ /**
35
+ * returns the distinct services that have risks in this scan, each with its per-severity risk counts and the service detail relevant to the scan type; each row can be drilled into via the risks endpoint using serviceIdentity
36
+ */
37
+ export declare function useListRiskScanServicesQuery(props: ListRiskScanServicesProps, options?: Omit<UseQueryOptions<ListRiskScanServicesResponseContainer, ListRiskScanServicesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListRiskScanServicesResponseContainer, SharedError>;
@@ -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 '../../../../custom-fetcher/index.js';
6
+ export function listRiskScanServices(props) {
7
+ return fetcher(Object.assign({ url: `/v3/risk-scans/${props.identity}/services`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * returns the distinct services that have risks in this scan, each with its per-severity risk counts and the service detail relevant to the scan type; each row can be drilled into via the risks endpoint using serviceIdentity
11
+ */
12
+ export function useListRiskScanServicesQuery(props, options) {
13
+ return useQuery(['listRiskScanServices', props.identity, props.queryParams], ({ signal }) => listRiskScanServices(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,29 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { RiskscansScanSuggestedServicesResponse } from '../schemas/RiskscansScanSuggestedServicesResponse';
3
+ import type { SharedError } from '../schemas/SharedError';
4
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
+ export interface ListRiskScanSuggestedServicesQueryPathParams {
6
+ identity: string;
7
+ }
8
+ export interface ListRiskScanSuggestedServicesQueryQueryParams {
9
+ accountIdentifier: string;
10
+ correlationID?: string;
11
+ organizationIdentifier?: string;
12
+ parentUniqueId?: string;
13
+ projectIdentifier?: string;
14
+ search?: string;
15
+ }
16
+ export type ListRiskScanSuggestedServicesOkResponse = RiskscansScanSuggestedServicesResponse;
17
+ export type ListRiskScanSuggestedServicesErrorResponse = SharedError;
18
+ export interface ListRiskScanSuggestedServicesProps extends ListRiskScanSuggestedServicesQueryPathParams, Omit<FetcherOptions<ListRiskScanSuggestedServicesQueryQueryParams, unknown>, 'url'> {
19
+ queryParams: ListRiskScanSuggestedServicesQueryQueryParams;
20
+ }
21
+ export interface ListRiskScanSuggestedServicesResponseContainer {
22
+ body: ListRiskScanSuggestedServicesOkResponse;
23
+ headers: Headers;
24
+ }
25
+ export declare function listRiskScanSuggestedServices(props: ListRiskScanSuggestedServicesProps): Promise<ListRiskScanSuggestedServicesResponseContainer>;
26
+ /**
27
+ * returns the full list of distinct services that have risks in this scan, carrying the service detail relevant to the scan type; used to populate the service filter dropdown of the risks endpoint
28
+ */
29
+ export declare function useListRiskScanSuggestedServicesQuery(props: ListRiskScanSuggestedServicesProps, options?: Omit<UseQueryOptions<ListRiskScanSuggestedServicesResponseContainer, ListRiskScanSuggestedServicesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListRiskScanSuggestedServicesResponseContainer, SharedError>;
@@ -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 '../../../../custom-fetcher/index.js';
6
+ export function listRiskScanSuggestedServices(props) {
7
+ return fetcher(Object.assign({ url: `/v3/risk-scans/${props.identity}/suggested-services`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * returns the full list of distinct services that have risks in this scan, carrying the service detail relevant to the scan type; used to populate the service filter dropdown of the risks endpoint
11
+ */
12
+ export function useListRiskScanSuggestedServicesQuery(props, options) {
13
+ return useQuery(['listRiskScanSuggestedServices', props.identity, props.queryParams], ({ signal }) => listRiskScanSuggestedServices(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -430,6 +430,12 @@ export type { ListRiskExperimentRecommendationsErrorResponse, ListRiskExperiment
430
430
  export { listRiskExperimentRecommendations, useListRiskExperimentRecommendationsQuery, } from './hooks/useListRiskExperimentRecommendationsQuery';
431
431
  export type { ListRiskRulesErrorResponse, ListRiskRulesOkResponse, ListRiskRulesProps, ListRiskRulesQueryQueryParams, } from './hooks/useListRiskRulesQuery';
432
432
  export { listRiskRules, useListRiskRulesQuery } from './hooks/useListRiskRulesQuery';
433
+ export type { ListRiskScanRisksErrorResponse, ListRiskScanRisksOkResponse, ListRiskScanRisksProps, ListRiskScanRisksQueryPathParams, ListRiskScanRisksQueryQueryParams, } from './hooks/useListRiskScanRisksQuery';
434
+ export { listRiskScanRisks, useListRiskScanRisksQuery } from './hooks/useListRiskScanRisksQuery';
435
+ export type { ListRiskScanServicesErrorResponse, ListRiskScanServicesOkResponse, ListRiskScanServicesProps, ListRiskScanServicesQueryPathParams, ListRiskScanServicesQueryQueryParams, } from './hooks/useListRiskScanServicesQuery';
436
+ export { listRiskScanServices, useListRiskScanServicesQuery, } from './hooks/useListRiskScanServicesQuery';
437
+ export type { ListRiskScanSuggestedServicesErrorResponse, ListRiskScanSuggestedServicesOkResponse, ListRiskScanSuggestedServicesProps, ListRiskScanSuggestedServicesQueryPathParams, ListRiskScanSuggestedServicesQueryQueryParams, } from './hooks/useListRiskScanSuggestedServicesQuery';
438
+ export { listRiskScanSuggestedServices, useListRiskScanSuggestedServicesQuery, } from './hooks/useListRiskScanSuggestedServicesQuery';
433
439
  export type { ListRiskScansErrorResponse, ListRiskScansOkResponse, ListRiskScansProps, ListRiskScansQueryQueryParams, } from './hooks/useListRiskScansQuery';
434
440
  export { listRiskScans, useListRiskScansQuery } from './hooks/useListRiskScansQuery';
435
441
  export type { ListRisksErrorResponse, ListRisksOkResponse, ListRisksProps, ListRisksQueryQueryParams, } from './hooks/useListRisksQuery';
@@ -1365,7 +1371,14 @@ export type { RiskscansOccurrenceDetails } from './schemas/RiskscansOccurrenceDe
1365
1371
  export type { RiskscansReportResponse } from './schemas/RiskscansReportResponse';
1366
1372
  export type { RiskscansReportSummary } from './schemas/RiskscansReportSummary';
1367
1373
  export type { RiskscansRiskScanResponse } from './schemas/RiskscansRiskScanResponse';
1374
+ export type { RiskscansScanRiskItem } from './schemas/RiskscansScanRiskItem';
1375
+ export type { RiskscansScanRisksResponse } from './schemas/RiskscansScanRisksResponse';
1376
+ export type { RiskscansScanServiceItem } from './schemas/RiskscansScanServiceItem';
1377
+ export type { RiskscansScanServiceRiskCounts } from './schemas/RiskscansScanServiceRiskCounts';
1378
+ export type { RiskscansScanServicesResponse } from './schemas/RiskscansScanServicesResponse';
1379
+ export type { RiskscansScanSuggestedServicesResponse } from './schemas/RiskscansScanSuggestedServicesResponse';
1368
1380
  export type { RiskscansScannedRiskWithOccurrences } from './schemas/RiskscansScannedRiskWithOccurrences';
1381
+ export type { RiskscansServiceInScanContext } from './schemas/RiskscansServiceInScanContext';
1369
1382
  export type { RiskscansUpdateRequest } from './schemas/RiskscansUpdateRequest';
1370
1383
  export type { ScannedrisksGetResponse } from './schemas/ScannedrisksGetResponse';
1371
1384
  export type { ScannedrisksListResponse } from './schemas/ScannedrisksListResponse';
@@ -214,6 +214,9 @@ export { listProbes, useListProbesQuery } from './hooks/useListProbesQuery';
214
214
  export { listRecommendations, useListRecommendationsQuery, } from './hooks/useListRecommendationsQuery';
215
215
  export { listRiskExperimentRecommendations, useListRiskExperimentRecommendationsQuery, } from './hooks/useListRiskExperimentRecommendationsQuery';
216
216
  export { listRiskRules, useListRiskRulesQuery } from './hooks/useListRiskRulesQuery';
217
+ export { listRiskScanRisks, useListRiskScanRisksQuery } from './hooks/useListRiskScanRisksQuery';
218
+ export { listRiskScanServices, useListRiskScanServicesQuery, } from './hooks/useListRiskScanServicesQuery';
219
+ export { listRiskScanSuggestedServices, useListRiskScanSuggestedServicesQuery, } from './hooks/useListRiskScanSuggestedServicesQuery';
217
220
  export { listRiskScans, useListRiskScansQuery } from './hooks/useListRiskScansQuery';
218
221
  export { listRisks, useListRisksQuery } from './hooks/useListRisksQuery';
219
222
  export { listRule, useListRuleQuery } from './hooks/useListRuleQuery';
@@ -1,7 +1,8 @@
1
1
  import type { RiskscansHeatmapCell } from '../schemas/RiskscansHeatmapCell';
2
+ import type { RiskscansServiceInScanContext } from '../schemas/RiskscansServiceInScanContext';
2
3
  export interface RiskscansHeatmapRow {
3
4
  cells?: RiskscansHeatmapCell[];
4
5
  serviceIdentity?: string;
6
+ serviceInScanContext?: RiskscansServiceInScanContext;
5
7
  serviceName?: string;
6
- serviceType?: string;
7
8
  }
@@ -0,0 +1,17 @@
1
+ import type { RiskscansServiceInScanContext } from '../schemas/RiskscansServiceInScanContext';
2
+ export interface RiskscansScanRiskItem {
3
+ description?: string;
4
+ fingerprint?: string;
5
+ firstDetected?: number;
6
+ identity?: string;
7
+ lastDetected?: number;
8
+ name?: string;
9
+ occurrenceCount?: number;
10
+ riskRuleId?: string;
11
+ riskRuleName?: string;
12
+ serviceInScanContext?: RiskscansServiceInScanContext;
13
+ severity?: string;
14
+ status?: string;
15
+ tags?: string[];
16
+ validationTypes?: string[];
17
+ }
@@ -0,0 +1,7 @@
1
+ import type { RiskscansScanRiskItem } from '../schemas/RiskscansScanRiskItem';
2
+ import type { SharedPaginationResponse } from '../schemas/SharedPaginationResponse';
3
+ export interface RiskscansScanRisksResponse {
4
+ correlationID?: string;
5
+ data?: RiskscansScanRiskItem[];
6
+ pagination?: SharedPaginationResponse;
7
+ }
@@ -0,0 +1,8 @@
1
+ import type { RiskscansScanServiceRiskCounts } from '../schemas/RiskscansScanServiceRiskCounts';
2
+ import type { RiskscansServiceInScanContext } from '../schemas/RiskscansServiceInScanContext';
3
+ export interface RiskscansScanServiceItem {
4
+ riskCounts?: RiskscansScanServiceRiskCounts;
5
+ serviceIdentity?: string;
6
+ serviceInScanContext?: RiskscansServiceInScanContext;
7
+ serviceName?: string;
8
+ }
@@ -0,0 +1,7 @@
1
+ export interface RiskscansScanServiceRiskCounts {
2
+ critical?: number;
3
+ high?: number;
4
+ low?: number;
5
+ medium?: number;
6
+ total?: number;
7
+ }
@@ -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 {};
@@ -0,0 +1,7 @@
1
+ import type { RiskscansScanServiceItem } from '../schemas/RiskscansScanServiceItem';
2
+ import type { SharedPaginationResponse } from '../schemas/SharedPaginationResponse';
3
+ export interface RiskscansScanServicesResponse {
4
+ correlationID?: string;
5
+ data?: RiskscansScanServiceItem[];
6
+ pagination?: SharedPaginationResponse;
7
+ }
@@ -0,0 +1,5 @@
1
+ import type { RiskscansServiceInScanContext } from '../schemas/RiskscansServiceInScanContext';
2
+ export interface RiskscansScanSuggestedServicesResponse {
3
+ correlationID?: string;
4
+ data?: RiskscansServiceInScanContext[];
5
+ }
@@ -0,0 +1,8 @@
1
+ export interface RiskscansServiceInScanContext {
2
+ agentIdentity?: string;
3
+ environmentIdentity?: string;
4
+ externalID?: string;
5
+ infrastructureIdentity?: string;
6
+ serviceIdentity?: string;
7
+ serviceName?: string;
8
+ }
@@ -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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-chaos-manager-client",
3
- "version": "1.90.0",
3
+ "version": "1.91.0",
4
4
  "description": "Harness React Chaos Manager Service Client - APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",