@harnessio/react-chaos-manager-client 1.69.0 → 1.71.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.
@@ -0,0 +1,45 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ChaosservicesListExperimentExecutionsResponse } from '../schemas/ChaosservicesListExperimentExecutionsResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
+ export interface ListChaosServiceExecutionsQueryPathParams {
6
+ identity: string;
7
+ }
8
+ export interface ListChaosServiceExecutionsQueryQueryParams {
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
+ '-'?: string;
26
+ sortAscending?: boolean;
27
+ sortField?: 'experimentName' | 'lastExecuted' | 'lastUpdated' | 'name';
28
+ statuses?: string;
29
+ stepTypes?: string;
30
+ useParentUniqueID?: boolean;
31
+ }
32
+ export type ListChaosServiceExecutionsOkResponse = ChaosservicesListExperimentExecutionsResponse;
33
+ export type ListChaosServiceExecutionsErrorResponse = ApiRestError;
34
+ export interface ListChaosServiceExecutionsProps extends ListChaosServiceExecutionsQueryPathParams, Omit<FetcherOptions<ListChaosServiceExecutionsQueryQueryParams, unknown>, 'url'> {
35
+ queryParams: ListChaosServiceExecutionsQueryQueryParams;
36
+ }
37
+ export interface ListChaosServiceExecutionsResponseContainer {
38
+ body: ListChaosServiceExecutionsOkResponse;
39
+ headers: Headers;
40
+ }
41
+ export declare function listChaosServiceExecutions(props: ListChaosServiceExecutionsProps): Promise<ListChaosServiceExecutionsResponseContainer>;
42
+ /**
43
+ * List the experiment runs in which a chaos service was executed.
44
+ */
45
+ export declare function useListChaosServiceExecutionsQuery(props: ListChaosServiceExecutionsProps, options?: Omit<UseQueryOptions<ListChaosServiceExecutionsResponseContainer, ListChaosServiceExecutionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListChaosServiceExecutionsResponseContainer, 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 listChaosServiceExecutions(props) {
7
+ return fetcher(Object.assign({ url: `/v3/chaos-services/${props.identity}/experiment-runs`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * List the experiment runs in which a chaos service was executed.
11
+ */
12
+ export function useListChaosServiceExecutionsQuery(props, options) {
13
+ return useQuery(['listChaosServiceExecutions', props.identity, props.queryParams], ({ signal }) => listChaosServiceExecutions(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -306,6 +306,8 @@ export type { ListChaosExperimentRunsV3ErrorResponse, ListChaosExperimentRunsV3O
306
306
  export { listChaosExperimentRunsV3, useListChaosExperimentRunsV3Query, } from './hooks/useListChaosExperimentRunsV3Query';
307
307
  export type { ListChaosHubErrorResponse, ListChaosHubOkResponse, ListChaosHubProps, ListChaosHubQueryQueryParams, } from './hooks/useListChaosHubQuery';
308
308
  export { listChaosHub, useListChaosHubQuery } from './hooks/useListChaosHubQuery';
309
+ export type { ListChaosServiceExecutionsErrorResponse, ListChaosServiceExecutionsOkResponse, ListChaosServiceExecutionsProps, ListChaosServiceExecutionsQueryPathParams, ListChaosServiceExecutionsQueryQueryParams, } from './hooks/useListChaosServiceExecutionsQuery';
310
+ export { listChaosServiceExecutions, useListChaosServiceExecutionsQuery, } from './hooks/useListChaosServiceExecutionsQuery';
309
311
  export type { ListChaosServicesErrorResponse, ListChaosServicesOkResponse, ListChaosServicesProps, ListChaosServicesQueryQueryParams, } from './hooks/useListChaosServicesQuery';
310
312
  export { listChaosServices, useListChaosServicesQuery } from './hooks/useListChaosServicesQuery';
311
313
  export type { ListChaosV2ExperimentErrorResponse, ListChaosV2ExperimentOkResponse, ListChaosV2ExperimentProps, ListChaosV2ExperimentQueryQueryParams, } from './hooks/useListChaosV2ExperimentQuery';
@@ -701,7 +703,9 @@ export type { ChaosresourcenotesNoteType } from './schemas/ChaosresourcenotesNot
701
703
  export type { ChaosservicesChaosServiceResponse } from './schemas/ChaosservicesChaosServiceResponse';
702
704
  export type { ChaosservicesCreateRequest } from './schemas/ChaosservicesCreateRequest';
703
705
  export type { ChaosservicesDeleteResponse } from './schemas/ChaosservicesDeleteResponse';
706
+ export type { ChaosservicesExperimentExecutionResponse } from './schemas/ChaosservicesExperimentExecutionResponse';
704
707
  export type { ChaosservicesListChaosServiceResponse } from './schemas/ChaosservicesListChaosServiceResponse';
708
+ export type { ChaosservicesListExperimentExecutionsResponse } from './schemas/ChaosservicesListExperimentExecutionsResponse';
705
709
  export type { ChaosservicesServiceProbeAssociation } from './schemas/ChaosservicesServiceProbeAssociation';
706
710
  export type { ChaosservicesUpdateRequest } from './schemas/ChaosservicesUpdateRequest';
707
711
  export type { ChaosserviceusageInfrastructureType } from './schemas/ChaosserviceusageInfrastructureType';
@@ -152,6 +152,7 @@ export { listChaosComponent, useListChaosComponentQuery } from './hooks/useListC
152
152
  export { listChaosEnabledInfraV2, useListChaosEnabledInfraV2Query, } from './hooks/useListChaosEnabledInfraV2Query';
153
153
  export { listChaosExperimentRunsV3, useListChaosExperimentRunsV3Query, } from './hooks/useListChaosExperimentRunsV3Query';
154
154
  export { listChaosHub, useListChaosHubQuery } from './hooks/useListChaosHubQuery';
155
+ export { listChaosServiceExecutions, useListChaosServiceExecutionsQuery, } from './hooks/useListChaosServiceExecutionsQuery';
155
156
  export { listChaosServices, useListChaosServicesQuery } from './hooks/useListChaosServicesQuery';
156
157
  export { listChaosV2Experiment, useListChaosV2ExperimentQuery, } from './hooks/useListChaosV2ExperimentQuery';
157
158
  export { listCondition, useListConditionQuery } from './hooks/useListConditionQuery';
@@ -0,0 +1,24 @@
1
+ import type { HcesdkUserDetails } from '../schemas/HcesdkUserDetails';
2
+ export interface ChaosservicesExperimentExecutionResponse {
3
+ completed?: boolean;
4
+ createdAt?: number;
5
+ createdBy?: HcesdkUserDetails;
6
+ experimentID?: string;
7
+ experimentIdentifier?: string;
8
+ experimentName?: string;
9
+ experimentRunID?: string;
10
+ experimentType?: string;
11
+ faultsAwaited?: number;
12
+ faultsFailed?: number;
13
+ faultsNA?: number;
14
+ faultsPassed?: number;
15
+ faultsStopped?: number;
16
+ infraID?: string;
17
+ isRemoved: boolean;
18
+ phase?: string;
19
+ resiliencyScore?: number;
20
+ runSequence?: number;
21
+ totalFaults?: number;
22
+ updatedAt?: number;
23
+ updatedBy?: HcesdkUserDetails;
24
+ }
@@ -0,0 +1,7 @@
1
+ import type { ChaosservicesExperimentExecutionResponse } from '../schemas/ChaosservicesExperimentExecutionResponse';
2
+ import type { SharedPaginationResponse } from '../schemas/SharedPaginationResponse';
3
+ export interface ChaosservicesListExperimentExecutionsResponse {
4
+ correlationID?: string;
5
+ data?: ChaosservicesExperimentExecutionResponse[];
6
+ pagination?: SharedPaginationResponse;
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-chaos-manager-client",
3
- "version": "1.69.0",
3
+ "version": "1.71.0",
4
4
  "description": "Harness React Chaos Manager Service Client - APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",