@harnessio/react-chaos-manager-client 1.91.7 → 1.91.8
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/chaos-manager/src/services/hooks/useListScannedRisksQuery.d.ts +1 -0
- package/dist/chaos-manager/src/services/hooks/useUpdateScannedRiskStatusMutation.d.ts +32 -0
- package/dist/chaos-manager/src/services/hooks/useUpdateScannedRiskStatusMutation.js +14 -0
- package/dist/chaos-manager/src/services/index.d.ts +4 -0
- package/dist/chaos-manager/src/services/index.js +1 -0
- package/dist/chaos-manager/src/services/schemas/ScannedrisksRiskStatusDetails.d.ts +11 -0
- package/dist/chaos-manager/src/services/schemas/ScannedrisksRiskStatusDetails.js +1 -0
- package/dist/chaos-manager/src/services/schemas/ScannedrisksScannedRiskSpec.d.ts +6 -0
- package/dist/chaos-manager/src/services/schemas/ScannedrisksUpdateStatusRequest.d.ts +9 -0
- package/dist/chaos-manager/src/services/schemas/ScannedrisksUpdateStatusRequest.js +1 -0
- package/package.json +1 -1
|
@@ -36,6 +36,7 @@ export interface ListScannedRisksQueryQueryParams {
|
|
|
36
36
|
sortField?: 'firstDetected' | 'lastDetected' | 'lastUpdated' | 'name' | 'occurrenceCount' | 'severity';
|
|
37
37
|
source?: 'DiscoveryAgent' | 'PipelineExecution' | 'ProbeExecution';
|
|
38
38
|
startTime?: number;
|
|
39
|
+
status?: 'Ignored' | 'Invalid' | 'Open' | 'Resolved';
|
|
39
40
|
tags?: string;
|
|
40
41
|
validationType?: string;
|
|
41
42
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ScannedrisksGetResponse } from '../schemas/ScannedrisksGetResponse';
|
|
3
|
+
import type { SharedError } from '../schemas/SharedError';
|
|
4
|
+
import type { ScannedrisksUpdateStatusRequest } from '../schemas/ScannedrisksUpdateStatusRequest';
|
|
5
|
+
import { FetcherOptions } from '../../../../custom-fetcher/index.js';
|
|
6
|
+
export interface UpdateScannedRiskStatusMutationPathParams {
|
|
7
|
+
identity: string;
|
|
8
|
+
}
|
|
9
|
+
export interface UpdateScannedRiskStatusMutationQueryParams {
|
|
10
|
+
accountIdentifier: string;
|
|
11
|
+
correlationID?: string;
|
|
12
|
+
organizationIdentifier?: string;
|
|
13
|
+
parentUniqueId?: string;
|
|
14
|
+
projectIdentifier?: string;
|
|
15
|
+
}
|
|
16
|
+
export type UpdateScannedRiskStatusRequestBody = ScannedrisksUpdateStatusRequest;
|
|
17
|
+
export type UpdateScannedRiskStatusOkResponse = ScannedrisksGetResponse;
|
|
18
|
+
export type UpdateScannedRiskStatusErrorResponse = SharedError;
|
|
19
|
+
export interface UpdateScannedRiskStatusProps extends UpdateScannedRiskStatusMutationPathParams, Omit<FetcherOptions<UpdateScannedRiskStatusMutationQueryParams, UpdateScannedRiskStatusRequestBody>, 'url'> {
|
|
20
|
+
queryParams: UpdateScannedRiskStatusMutationQueryParams;
|
|
21
|
+
body: UpdateScannedRiskStatusRequestBody;
|
|
22
|
+
}
|
|
23
|
+
export interface UpdateScannedRiskStatusResponseContainer {
|
|
24
|
+
body: UpdateScannedRiskStatusOkResponse;
|
|
25
|
+
headers: Headers;
|
|
26
|
+
}
|
|
27
|
+
export declare function updateScannedRiskStatus(props: UpdateScannedRiskStatusProps): Promise<UpdateScannedRiskStatusResponseContainer>;
|
|
28
|
+
export type UpdateScannedRiskStatusMutationProps<T extends keyof UpdateScannedRiskStatusProps> = Omit<UpdateScannedRiskStatusProps, T> & Partial<Pick<UpdateScannedRiskStatusProps, T>>;
|
|
29
|
+
/**
|
|
30
|
+
* sets a scanned risk to Open, Ignored, or Resolved. Resolved requires mitigated=true. Ignored risks stay Ignored when detected again; Resolved risks reopen. Invalid is set only when the risk rule changes and cannot be set or cleared here.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useUpdateScannedRiskStatusMutation<T extends keyof UpdateScannedRiskStatusProps>(props: Pick<Partial<UpdateScannedRiskStatusProps>, T>, options?: Omit<UseMutationOptions<UpdateScannedRiskStatusResponseContainer, UpdateScannedRiskStatusErrorResponse, UpdateScannedRiskStatusMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateScannedRiskStatusResponseContainer, SharedError, UpdateScannedRiskStatusMutationProps<T>, 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 '../../../../custom-fetcher/index.js';
|
|
6
|
+
export function updateScannedRiskStatus(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v3/scanned-risks/${props.identity}/status`, method: 'PUT' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* sets a scanned risk to Open, Ignored, or Resolved. Resolved requires mitigated=true. Ignored risks stay Ignored when detected again; Resolved risks reopen. Invalid is set only when the risk rule changes and cannot be set or cleared here.
|
|
11
|
+
*/
|
|
12
|
+
export function useUpdateScannedRiskStatusMutation(props, options) {
|
|
13
|
+
return useMutation((mutateProps) => updateScannedRiskStatus(Object.assign(Object.assign({}, props), mutateProps)), options);
|
|
14
|
+
}
|
|
@@ -594,6 +594,8 @@ export type { UpdateRiskScanErrorResponse, UpdateRiskScanMutationPathParams, Upd
|
|
|
594
594
|
export { updateRiskScan, useUpdateRiskScanMutation } from './hooks/useUpdateRiskScanMutation';
|
|
595
595
|
export type { UpdateRuleErrorResponse, UpdateRuleMutationPathParams, UpdateRuleMutationProps, UpdateRuleMutationQueryParams, UpdateRuleOkResponse, UpdateRuleProps, UpdateRuleRequestBody, } from './hooks/useUpdateRuleMutation';
|
|
596
596
|
export { updateRule, useUpdateRuleMutation } from './hooks/useUpdateRuleMutation';
|
|
597
|
+
export type { UpdateScannedRiskStatusErrorResponse, UpdateScannedRiskStatusMutationPathParams, UpdateScannedRiskStatusMutationProps, UpdateScannedRiskStatusMutationQueryParams, UpdateScannedRiskStatusOkResponse, UpdateScannedRiskStatusProps, UpdateScannedRiskStatusRequestBody, } from './hooks/useUpdateScannedRiskStatusMutation';
|
|
598
|
+
export { updateScannedRiskStatus, useUpdateScannedRiskStatusMutation, } from './hooks/useUpdateScannedRiskStatusMutation';
|
|
597
599
|
export type { UpgradeLegacyKubernetesChaosInfraErrorResponse, UpgradeLegacyKubernetesChaosInfraMutationPathParams, UpgradeLegacyKubernetesChaosInfraMutationProps, UpgradeLegacyKubernetesChaosInfraMutationQueryParams, UpgradeLegacyKubernetesChaosInfraOkResponse, UpgradeLegacyKubernetesChaosInfraProps, } from './hooks/useUpgradeLegacyKubernetesChaosInfraMutation';
|
|
598
600
|
export { upgradeLegacyKubernetesChaosInfra, useUpgradeLegacyKubernetesChaosInfraMutation, } from './hooks/useUpgradeLegacyKubernetesChaosInfraMutation';
|
|
599
601
|
export type { VerifyChaosStageInPipelineRunErrorResponse, VerifyChaosStageInPipelineRunOkResponse, VerifyChaosStageInPipelineRunProps, VerifyChaosStageInPipelineRunQueryQueryParams, } from './hooks/useVerifyChaosStageInPipelineRunQuery';
|
|
@@ -1419,11 +1421,13 @@ export type { ScannedrisksOccurrenceDetail } from './schemas/ScannedrisksOccurre
|
|
|
1419
1421
|
export type { ScannedrisksOccurrencesResponse } from './schemas/ScannedrisksOccurrencesResponse';
|
|
1420
1422
|
export type { ScannedrisksRiskStat } from './schemas/ScannedrisksRiskStat';
|
|
1421
1423
|
export type { ScannedrisksRiskStatus } from './schemas/ScannedrisksRiskStatus';
|
|
1424
|
+
export type { ScannedrisksRiskStatusDetails } from './schemas/ScannedrisksRiskStatusDetails';
|
|
1422
1425
|
export type { ScannedrisksScannedRisk } from './schemas/ScannedrisksScannedRisk';
|
|
1423
1426
|
export type { ScannedrisksScannedRiskSpec } from './schemas/ScannedrisksScannedRiskSpec';
|
|
1424
1427
|
export type { ScannedrisksServiceRiskSummary } from './schemas/ScannedrisksServiceRiskSummary';
|
|
1425
1428
|
export type { ScannedrisksServiceRiskSummaryQuery } from './schemas/ScannedrisksServiceRiskSummaryQuery';
|
|
1426
1429
|
export type { ScannedrisksServiceRiskSummaryResponse } from './schemas/ScannedrisksServiceRiskSummaryResponse';
|
|
1430
|
+
export type { ScannedrisksUpdateStatusRequest } from './schemas/ScannedrisksUpdateStatusRequest';
|
|
1427
1431
|
export type { ScannedrisksValidationType } from './schemas/ScannedrisksValidationType';
|
|
1428
1432
|
export type { SecurityGovernanceAccessControl } from './schemas/SecurityGovernanceAccessControl';
|
|
1429
1433
|
export type { SecurityGovernanceApplicationSpec } from './schemas/SecurityGovernanceApplicationSpec';
|
|
@@ -296,6 +296,7 @@ export { updateRisk, useUpdateRiskMutation } from './hooks/useUpdateRiskMutation
|
|
|
296
296
|
export { updateRiskRule, useUpdateRiskRuleMutation } from './hooks/useUpdateRiskRuleMutation';
|
|
297
297
|
export { updateRiskScan, useUpdateRiskScanMutation } from './hooks/useUpdateRiskScanMutation';
|
|
298
298
|
export { updateRule, useUpdateRuleMutation } from './hooks/useUpdateRuleMutation';
|
|
299
|
+
export { updateScannedRiskStatus, useUpdateScannedRiskStatusMutation, } from './hooks/useUpdateScannedRiskStatusMutation';
|
|
299
300
|
export { upgradeLegacyKubernetesChaosInfra, useUpgradeLegacyKubernetesChaosInfraMutation, } from './hooks/useUpgradeLegacyKubernetesChaosInfraMutation';
|
|
300
301
|
export { useVerifyChaosStageInPipelineRunQuery, verifyChaosStageInPipelineRun, } from './hooks/useVerifyChaosStageInPipelineRunQuery';
|
|
301
302
|
export { useVerifyProbeMutation, verifyProbe } from './hooks/useVerifyProbeMutation';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ScannedrisksRiskStatus } from '../schemas/ScannedrisksRiskStatus';
|
|
2
|
+
export interface ScannedrisksRiskStatusDetails {
|
|
3
|
+
/**
|
|
4
|
+
* Mitigated is the user's confirmation, required to resolve a risk.
|
|
5
|
+
*/
|
|
6
|
+
mitigated?: boolean;
|
|
7
|
+
note?: string;
|
|
8
|
+
previousStatus?: ScannedrisksRiskStatus;
|
|
9
|
+
updatedAt?: number;
|
|
10
|
+
updatedBy?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import type { RiskCategory } from '../schemas/RiskCategory';
|
|
|
2
2
|
import type { RiskSeverity } from '../schemas/RiskSeverity';
|
|
3
3
|
import type { RiskScanType } from '../schemas/RiskScanType';
|
|
4
4
|
import type { ScannedrisksRiskStatus } from '../schemas/ScannedrisksRiskStatus';
|
|
5
|
+
import type { ScannedrisksRiskStatusDetails } from '../schemas/ScannedrisksRiskStatusDetails';
|
|
5
6
|
import type { RiskTargetService } from '../schemas/RiskTargetService';
|
|
6
7
|
import type { ScannedrisksValidationType } from '../schemas/ScannedrisksValidationType';
|
|
7
8
|
export interface ScannedrisksScannedRiskSpec {
|
|
@@ -39,6 +40,11 @@ export interface ScannedrisksScannedRiskSpec {
|
|
|
39
40
|
*/
|
|
40
41
|
sources?: RiskScanType[];
|
|
41
42
|
status?: ScannedrisksRiskStatus;
|
|
43
|
+
/**
|
|
44
|
+
* StatusDetails is set by the last user status change. A later detection
|
|
45
|
+
* that reopens the risk keeps it and records the status it reopened from.
|
|
46
|
+
*/
|
|
47
|
+
statusDetails?: ScannedrisksRiskStatusDetails;
|
|
42
48
|
targetService?: RiskTargetService;
|
|
43
49
|
/**
|
|
44
50
|
* ValidationType reflects only the most recently written occurrence's
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ScannedrisksRiskStatus } from '../schemas/ScannedrisksRiskStatus';
|
|
2
|
+
export interface ScannedrisksUpdateStatusRequest {
|
|
3
|
+
/**
|
|
4
|
+
* Mitigated confirms the risk is mitigated. Required to be true for Resolved.
|
|
5
|
+
*/
|
|
6
|
+
mitigated?: boolean;
|
|
7
|
+
note?: string;
|
|
8
|
+
status: ScannedrisksRiskStatus;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED