@harnessio/react-chaos-manager-client 1.77.0 → 1.79.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.
- package/dist/chaos-manager/src/services/hooks/useListChaosServiceDrRunsQuery.d.ts +43 -0
- package/dist/chaos-manager/src/services/hooks/useListChaosServiceDrRunsQuery.js +14 -0
- package/dist/chaos-manager/src/services/index.d.ts +8 -0
- package/dist/chaos-manager/src/services/index.js +1 -0
- package/dist/chaos-manager/src/services/schemas/ChaoscomponentChaosComponentExecutionNode.d.ts +2 -0
- package/dist/chaos-manager/src/services/schemas/ChaosservicesDrExecutionResponse.d.ts +35 -0
- package/dist/chaos-manager/src/services/schemas/ChaosservicesDrExecutionResponse.js +1 -0
- package/dist/chaos-manager/src/services/schemas/ChaosservicesListDrExecutionsResponse.d.ts +7 -0
- package/dist/chaos-manager/src/services/schemas/ChaosservicesListDrExecutionsResponse.js +1 -0
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageChaosStatsByType.d.ts +9 -0
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageChaosStatsByType.js +4 -0
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadRatioConfig.d.ts +14 -0
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadRatioConfig.js +4 -0
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadStats.d.ts +5 -0
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadStats.js +4 -0
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadStatsByType.d.ts +5 -0
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageLoadStatsByType.js +4 -0
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageOverallServiceUsageStats.d.ts +15 -0
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusagePeriodicStats.d.ts +22 -1
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageServiceType.d.ts +1 -1
- package/dist/chaos-manager/src/services/schemas/ChaosserviceusageStatsByType.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ChaosservicesListDrExecutionsResponse } from '../schemas/ChaosservicesListDrExecutionsResponse';
|
|
3
|
+
import type { ApiRestError } from '../schemas/ApiRestError';
|
|
4
|
+
import { FetcherOptions } from '../../../../custom-fetcher/index.js';
|
|
5
|
+
export interface ListChaosServiceDrRunsQueryPathParams {
|
|
6
|
+
identity: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ListChaosServiceDrRunsQueryQueryParams {
|
|
9
|
+
accountIdentifier: string;
|
|
10
|
+
correlationID?: string;
|
|
11
|
+
includeAllScope?: boolean;
|
|
12
|
+
infraIds?: string;
|
|
13
|
+
/**
|
|
14
|
+
* @default 15
|
|
15
|
+
*/
|
|
16
|
+
limit?: number;
|
|
17
|
+
organizationIdentifier?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @default 0
|
|
20
|
+
*/
|
|
21
|
+
page?: number;
|
|
22
|
+
parentUniqueId?: string;
|
|
23
|
+
projectIdentifier?: string;
|
|
24
|
+
search?: string;
|
|
25
|
+
sortAscending?: boolean;
|
|
26
|
+
sortField?: 'experimentName' | 'lastExecuted' | 'lastUpdated' | 'name';
|
|
27
|
+
statuses?: string;
|
|
28
|
+
useParentUniqueID?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export type ListChaosServiceDrRunsOkResponse = ChaosservicesListDrExecutionsResponse;
|
|
31
|
+
export type ListChaosServiceDrRunsErrorResponse = ApiRestError;
|
|
32
|
+
export interface ListChaosServiceDrRunsProps extends ListChaosServiceDrRunsQueryPathParams, Omit<FetcherOptions<ListChaosServiceDrRunsQueryQueryParams, unknown>, 'url'> {
|
|
33
|
+
queryParams: ListChaosServiceDrRunsQueryQueryParams;
|
|
34
|
+
}
|
|
35
|
+
export interface ListChaosServiceDrRunsResponseContainer {
|
|
36
|
+
body: ListChaosServiceDrRunsOkResponse;
|
|
37
|
+
headers: Headers;
|
|
38
|
+
}
|
|
39
|
+
export declare function listChaosServiceDrRuns(props: ListChaosServiceDrRunsProps): Promise<ListChaosServiceDrRunsResponseContainer>;
|
|
40
|
+
/**
|
|
41
|
+
* List the DR runs in which a chaos service was exercised, along with the pipeline execution context of each run.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useListChaosServiceDrRunsQuery(props: ListChaosServiceDrRunsProps, options?: Omit<UseQueryOptions<ListChaosServiceDrRunsResponseContainer, ListChaosServiceDrRunsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListChaosServiceDrRunsResponseContainer, ApiRestError>;
|
|
@@ -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 listChaosServiceDrRuns(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v3/chaos-services/${props.identity}/dr-runs`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List the DR runs in which a chaos service was exercised, along with the pipeline execution context of each run.
|
|
11
|
+
*/
|
|
12
|
+
export function useListChaosServiceDrRunsQuery(props, options) {
|
|
13
|
+
return useQuery(['listChaosServiceDRRuns', props.identity, props.queryParams], ({ signal }) => listChaosServiceDrRuns(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -318,6 +318,8 @@ export type { ListChaosExperimentRunsV3ErrorResponse, ListChaosExperimentRunsV3O
|
|
|
318
318
|
export { listChaosExperimentRunsV3, useListChaosExperimentRunsV3Query, } from './hooks/useListChaosExperimentRunsV3Query';
|
|
319
319
|
export type { ListChaosHubErrorResponse, ListChaosHubOkResponse, ListChaosHubProps, ListChaosHubQueryQueryParams, } from './hooks/useListChaosHubQuery';
|
|
320
320
|
export { listChaosHub, useListChaosHubQuery } from './hooks/useListChaosHubQuery';
|
|
321
|
+
export type { ListChaosServiceDrRunsErrorResponse, ListChaosServiceDrRunsOkResponse, ListChaosServiceDrRunsProps, ListChaosServiceDrRunsQueryPathParams, ListChaosServiceDrRunsQueryQueryParams, } from './hooks/useListChaosServiceDrRunsQuery';
|
|
322
|
+
export { listChaosServiceDrRuns, useListChaosServiceDrRunsQuery, } from './hooks/useListChaosServiceDrRunsQuery';
|
|
321
323
|
export type { ListChaosServiceExecutionsErrorResponse, ListChaosServiceExecutionsOkResponse, ListChaosServiceExecutionsProps, ListChaosServiceExecutionsQueryPathParams, ListChaosServiceExecutionsQueryQueryParams, } from './hooks/useListChaosServiceExecutionsQuery';
|
|
322
324
|
export { listChaosServiceExecutions, useListChaosServiceExecutionsQuery, } from './hooks/useListChaosServiceExecutionsQuery';
|
|
323
325
|
export type { ListChaosServiceLoadTestsErrorResponse, ListChaosServiceLoadTestsOkResponse, ListChaosServiceLoadTestsProps, ListChaosServiceLoadTestsQueryPathParams, ListChaosServiceLoadTestsQueryQueryParams, } from './hooks/useListChaosServiceLoadTestsQuery';
|
|
@@ -726,14 +728,20 @@ export type { ChaosresourcenotesNoteType } from './schemas/ChaosresourcenotesNot
|
|
|
726
728
|
export type { ChaosservicesChaosServiceResponse } from './schemas/ChaosservicesChaosServiceResponse';
|
|
727
729
|
export type { ChaosservicesCreateRequest } from './schemas/ChaosservicesCreateRequest';
|
|
728
730
|
export type { ChaosservicesDeleteResponse } from './schemas/ChaosservicesDeleteResponse';
|
|
731
|
+
export type { ChaosservicesDrExecutionResponse } from './schemas/ChaosservicesDrExecutionResponse';
|
|
729
732
|
export type { ChaosservicesExperimentExecutionResponse } from './schemas/ChaosservicesExperimentExecutionResponse';
|
|
730
733
|
export type { ChaosservicesListChaosServiceResponse } from './schemas/ChaosservicesListChaosServiceResponse';
|
|
734
|
+
export type { ChaosservicesListDrExecutionsResponse } from './schemas/ChaosservicesListDrExecutionsResponse';
|
|
731
735
|
export type { ChaosservicesListExperimentExecutionsResponse } from './schemas/ChaosservicesListExperimentExecutionsResponse';
|
|
732
736
|
export type { ChaosservicesListLoadTestsResponse } from './schemas/ChaosservicesListLoadTestsResponse';
|
|
733
737
|
export type { ChaosservicesLoadTestSummaryResponse } from './schemas/ChaosservicesLoadTestSummaryResponse';
|
|
734
738
|
export type { ChaosservicesServiceProbeAssociation } from './schemas/ChaosservicesServiceProbeAssociation';
|
|
735
739
|
export type { ChaosservicesUpdateRequest } from './schemas/ChaosservicesUpdateRequest';
|
|
740
|
+
export type { ChaosserviceusageChaosStatsByType } from './schemas/ChaosserviceusageChaosStatsByType';
|
|
736
741
|
export type { ChaosserviceusageInfrastructureType } from './schemas/ChaosserviceusageInfrastructureType';
|
|
742
|
+
export type { ChaosserviceusageLoadRatioConfig } from './schemas/ChaosserviceusageLoadRatioConfig';
|
|
743
|
+
export type { ChaosserviceusageLoadStats } from './schemas/ChaosserviceusageLoadStats';
|
|
744
|
+
export type { ChaosserviceusageLoadStatsByType } from './schemas/ChaosserviceusageLoadStatsByType';
|
|
737
745
|
export type { ChaosserviceusageOverallServiceUsageStats } from './schemas/ChaosserviceusageOverallServiceUsageStats';
|
|
738
746
|
export type { ChaosserviceusagePeriodicStats } from './schemas/ChaosserviceusagePeriodicStats';
|
|
739
747
|
export type { ChaosserviceusageServiceData } from './schemas/ChaosserviceusageServiceData';
|
|
@@ -158,6 +158,7 @@ export { listChaosComponent, useListChaosComponentQuery } from './hooks/useListC
|
|
|
158
158
|
export { listChaosEnabledInfraV2, useListChaosEnabledInfraV2Query, } from './hooks/useListChaosEnabledInfraV2Query';
|
|
159
159
|
export { listChaosExperimentRunsV3, useListChaosExperimentRunsV3Query, } from './hooks/useListChaosExperimentRunsV3Query';
|
|
160
160
|
export { listChaosHub, useListChaosHubQuery } from './hooks/useListChaosHubQuery';
|
|
161
|
+
export { listChaosServiceDrRuns, useListChaosServiceDrRunsQuery, } from './hooks/useListChaosServiceDrRunsQuery';
|
|
161
162
|
export { listChaosServiceExecutions, useListChaosServiceExecutionsQuery, } from './hooks/useListChaosServiceExecutionsQuery';
|
|
162
163
|
export { listChaosServiceLoadTests, useListChaosServiceLoadTestsQuery, } from './hooks/useListChaosServiceLoadTestsQuery';
|
|
163
164
|
export { listChaosServices, useListChaosServicesQuery } from './hooks/useListChaosServicesQuery';
|
package/dist/chaos-manager/src/services/schemas/ChaoscomponentChaosComponentExecutionNode.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { ChaoscomponentType } from '../schemas/ChaoscomponentType';
|
|
|
7
7
|
export interface ChaoscomponentChaosComponentExecutionNode {
|
|
8
8
|
accountID?: string;
|
|
9
9
|
chaosData?: ChaoscomponentChaosData;
|
|
10
|
+
createdBy?: string;
|
|
10
11
|
errorData?: ChaoscomponentErrorData;
|
|
11
12
|
finishedAt?: number;
|
|
12
13
|
identity?: string;
|
|
@@ -25,4 +26,5 @@ export interface ChaoscomponentChaosComponentExecutionNode {
|
|
|
25
26
|
status?: ChaoscomponentStatus;
|
|
26
27
|
streamID?: string;
|
|
27
28
|
type?: ChaoscomponentType;
|
|
29
|
+
updatedBy?: string;
|
|
28
30
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { HcesdkUserDetails } from '../schemas/HcesdkUserDetails';
|
|
2
|
+
import type { ChaoscomponentPipelineDetails } from '../schemas/ChaoscomponentPipelineDetails';
|
|
3
|
+
export interface ChaosservicesDrExecutionResponse {
|
|
4
|
+
/**
|
|
5
|
+
* account id to access the resource
|
|
6
|
+
*/
|
|
7
|
+
accountIdentifier: string;
|
|
8
|
+
createdBy?: HcesdkUserDetails;
|
|
9
|
+
finishedAt?: number;
|
|
10
|
+
identity?: string;
|
|
11
|
+
infraID?: string;
|
|
12
|
+
infraType?: string;
|
|
13
|
+
lastUpdatedAt?: number;
|
|
14
|
+
name?: string;
|
|
15
|
+
notifyID?: string;
|
|
16
|
+
/**
|
|
17
|
+
* organization id to access the resource
|
|
18
|
+
*/
|
|
19
|
+
organizationIdentifier?: string;
|
|
20
|
+
/**
|
|
21
|
+
* resolved parent scope unique ID (from scope-info API or query param)
|
|
22
|
+
*/
|
|
23
|
+
parentUniqueId?: string;
|
|
24
|
+
pipelineDetails?: ChaoscomponentPipelineDetails;
|
|
25
|
+
probeName?: string;
|
|
26
|
+
/**
|
|
27
|
+
* project id to access the resource
|
|
28
|
+
*/
|
|
29
|
+
projectIdentifier?: string;
|
|
30
|
+
runID?: string;
|
|
31
|
+
startedAt?: number;
|
|
32
|
+
status?: string;
|
|
33
|
+
type?: string;
|
|
34
|
+
updatedBy?: HcesdkUserDetails;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChaosservicesDrExecutionResponse } from '../schemas/ChaosservicesDrExecutionResponse';
|
|
2
|
+
import type { SharedPaginationResponse } from '../schemas/SharedPaginationResponse';
|
|
3
|
+
export interface ChaosservicesListDrExecutionsResponse {
|
|
4
|
+
correlationID?: string;
|
|
5
|
+
data?: ChaosservicesDrExecutionResponse[];
|
|
6
|
+
pagination?: SharedPaginationResponse;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ChaosserviceusageLoadRatioConfig {
|
|
2
|
+
baseServiceWeight?: number;
|
|
3
|
+
categoricalWeights?: {
|
|
4
|
+
[key: string]: {
|
|
5
|
+
[key: string]: number;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
metricThresholds?: {
|
|
9
|
+
[key: string]: number;
|
|
10
|
+
};
|
|
11
|
+
metricWeights?: {
|
|
12
|
+
[key: string]: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
package/dist/chaos-manager/src/services/schemas/ChaosserviceusageOverallServiceUsageStats.d.ts
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import type { ChaosserviceusageStatsByType } from '../schemas/ChaosserviceusageStatsByType';
|
|
2
|
+
import type { ChaosserviceusageLoadRatioConfig } from '../schemas/ChaosserviceusageLoadRatioConfig';
|
|
3
|
+
import type { ChaosserviceusageLoadStats } from '../schemas/ChaosserviceusageLoadStats';
|
|
2
4
|
export interface ChaosserviceusageOverallServiceUsageStats {
|
|
3
5
|
accountID?: string;
|
|
4
6
|
licenseServiceMapping?: ChaosserviceusageStatsByType;
|
|
7
|
+
/**
|
|
8
|
+
* LoadRatioConfig is the complexity factor behind LoadStats.ServiceUsage.
|
|
9
|
+
* Nil when the account has no load ratio config yet.
|
|
10
|
+
*/
|
|
11
|
+
loadRatioConfig?: ChaosserviceusageLoadRatioConfig;
|
|
12
|
+
/**
|
|
13
|
+
* LoadStats is the load testing share of TotalUsage plus its activity counts.
|
|
14
|
+
*/
|
|
15
|
+
loadStats?: ChaosserviceusageLoadStats;
|
|
5
16
|
serviceStats?: ChaosserviceusageStatsByType;
|
|
17
|
+
/**
|
|
18
|
+
* TotalUsage is the account's total license utilisation over the window,
|
|
19
|
+
* covering both chaos service usage and LoadStats.ServiceUsage.
|
|
20
|
+
*/
|
|
6
21
|
totalUsage?: number;
|
|
7
22
|
}
|
|
@@ -1,8 +1,29 @@
|
|
|
1
|
+
import type { ChaosserviceusageChaosStatsByType } from '../schemas/ChaosserviceusageChaosStatsByType';
|
|
2
|
+
import type { ChaosserviceusageLoadStatsByType } from '../schemas/ChaosserviceusageLoadStatsByType';
|
|
1
3
|
import type { ChaosserviceusageStatsByType } from '../schemas/ChaosserviceusageStatsByType';
|
|
2
4
|
export interface ChaosserviceusagePeriodicStats {
|
|
3
|
-
|
|
5
|
+
/**
|
|
6
|
+
* ExperimentStatsByType has no load category: load runs are counted by
|
|
7
|
+
* LoadExecutionsByType, broken down by language rather than infra type.
|
|
8
|
+
*/
|
|
9
|
+
experimentStatsByType?: ChaosserviceusageChaosStatsByType;
|
|
10
|
+
loadExecutionsByType?: ChaosserviceusageLoadStatsByType;
|
|
11
|
+
/**
|
|
12
|
+
* LoadServicesStatsByType counts the services load tested in the period,
|
|
13
|
+
* grouped by scripting language. LoadExecutionsByType counts their load
|
|
14
|
+
* test runs the same way. The period's load license utilisation is not
|
|
15
|
+
* repeated here: it is ServiceStatsByType.Load.
|
|
16
|
+
*/
|
|
17
|
+
loadServicesStatsByType?: ChaosserviceusageLoadStatsByType;
|
|
18
|
+
/**
|
|
19
|
+
* ServiceStatsByType.Load is the period's load license utilisation.
|
|
20
|
+
*/
|
|
4
21
|
serviceStatsByType?: ChaosserviceusageStatsByType;
|
|
5
22
|
timestamp?: number;
|
|
23
|
+
/**
|
|
24
|
+
* TotalServicesConsumption is the period's full license utilisation: the
|
|
25
|
+
* sum of every ServiceStatsByType category, load included.
|
|
26
|
+
*/
|
|
6
27
|
totalConsumption?: number;
|
|
7
28
|
totalExperimentRunsConsumption?: number;
|
|
8
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ChaosserviceusageServiceType = 'CloudResources' | 'ContainerServices' | 'Kubernetes' | 'Linux' | 'Others' | 'Serverless' | 'Windows';
|
|
1
|
+
export type ChaosserviceusageServiceType = 'CloudResources' | 'ContainerServices' | 'Kubernetes' | 'Linux' | 'Load' | 'Others' | 'Serverless' | 'Windows';
|
package/package.json
CHANGED