@harnessio/react-chaos-manager-client 1.64.1 → 1.65.1-beta.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 (90) hide show
  1. package/dist/chaos-manager/src/services/hooks/useAbortChaosComponentForMachineMutation.d.ts +28 -0
  2. package/dist/chaos-manager/src/services/hooks/useAbortChaosComponentForMachineMutation.js +14 -0
  3. package/dist/chaos-manager/src/services/hooks/useCreateChaosServiceMutation.d.ts +30 -0
  4. package/dist/chaos-manager/src/services/hooks/useCreateChaosServiceMutation.js +14 -0
  5. package/dist/chaos-manager/src/services/hooks/useDeleteChaosServiceMutation.d.ts +30 -0
  6. package/dist/chaos-manager/src/services/hooks/useDeleteChaosServiceMutation.js +14 -0
  7. package/dist/chaos-manager/src/services/hooks/useGetChaosServiceQuery.d.ts +29 -0
  8. package/dist/chaos-manager/src/services/hooks/useGetChaosServiceQuery.js +14 -0
  9. package/dist/chaos-manager/src/services/hooks/useGetDashboardV3Query.d.ts +29 -0
  10. package/dist/chaos-manager/src/services/hooks/useGetDashboardV3Query.js +14 -0
  11. package/dist/chaos-manager/src/services/hooks/useGetKubeObjectV3Mutation.d.ts +32 -0
  12. package/dist/chaos-manager/src/services/hooks/useGetKubeObjectV3Mutation.js +14 -0
  13. package/dist/chaos-manager/src/services/hooks/useListChaosServicesQuery.d.ts +41 -0
  14. package/dist/chaos-manager/src/services/hooks/useListChaosServicesQuery.js +14 -0
  15. package/dist/chaos-manager/src/services/hooks/useListDashboardsV3Query.d.ts +40 -0
  16. package/dist/chaos-manager/src/services/hooks/useListDashboardsV3Query.js +14 -0
  17. package/dist/chaos-manager/src/services/hooks/useRunChaosComponentForMachineMutation.d.ts +28 -0
  18. package/dist/chaos-manager/src/services/hooks/useRunChaosComponentForMachineMutation.js +14 -0
  19. package/dist/chaos-manager/src/services/hooks/useUpdateChaosServiceMutation.d.ts +33 -0
  20. package/dist/chaos-manager/src/services/hooks/useUpdateChaosServiceMutation.js +14 -0
  21. package/dist/chaos-manager/src/services/hooks/useUpdateDashboardV3Mutation.d.ts +33 -0
  22. package/dist/chaos-manager/src/services/hooks/useUpdateDashboardV3Mutation.js +14 -0
  23. package/dist/chaos-manager/src/services/index.d.ts +49 -0
  24. package/dist/chaos-manager/src/services/index.js +11 -0
  25. package/dist/chaos-manager/src/services/schemas/ActionAction.d.ts +14 -0
  26. package/dist/chaos-manager/src/services/schemas/ActionAction.js +1 -0
  27. package/dist/chaos-manager/src/services/schemas/ActionContainerAction.d.ts +38 -0
  28. package/dist/chaos-manager/src/services/schemas/ActionContainerAction.js +1 -0
  29. package/dist/chaos-manager/src/services/schemas/ActionCustomScriptAction.d.ts +6 -0
  30. package/dist/chaos-manager/src/services/schemas/ActionCustomScriptAction.js +1 -0
  31. package/dist/chaos-manager/src/services/schemas/ActionDelayAction.d.ts +3 -0
  32. package/dist/chaos-manager/src/services/schemas/ActionDelayAction.js +4 -0
  33. package/dist/chaos-manager/src/services/schemas/ActionRunProperties.d.ts +8 -0
  34. package/dist/chaos-manager/src/services/schemas/ActionRunProperties.js +4 -0
  35. package/dist/chaos-manager/src/services/schemas/ChaosExecutionNodesChaosExecutionNode.d.ts +4 -0
  36. package/dist/chaos-manager/src/services/schemas/ChaosExperimentChaosExperimentRequest.d.ts +1 -0
  37. package/dist/chaos-manager/src/services/schemas/ChaosservicesChaosServiceResponse.d.ts +26 -0
  38. package/dist/chaos-manager/src/services/schemas/ChaosservicesChaosServiceResponse.js +1 -0
  39. package/dist/chaos-manager/src/services/schemas/ChaosservicesCreateRequest.d.ts +12 -0
  40. package/dist/chaos-manager/src/services/schemas/ChaosservicesCreateRequest.js +1 -0
  41. package/dist/chaos-manager/src/services/schemas/ChaosservicesDeleteResponse.d.ts +4 -0
  42. package/dist/chaos-manager/src/services/schemas/ChaosservicesDeleteResponse.js +4 -0
  43. package/dist/chaos-manager/src/services/schemas/ChaosservicesListChaosServiceResponse.d.ts +7 -0
  44. package/dist/chaos-manager/src/services/schemas/ChaosservicesListChaosServiceResponse.js +1 -0
  45. package/dist/chaos-manager/src/services/schemas/ChaosservicesServiceProbeAssociation.d.ts +5 -0
  46. package/dist/chaos-manager/src/services/schemas/ChaosservicesServiceProbeAssociation.js +1 -0
  47. package/dist/chaos-manager/src/services/schemas/ChaosservicesUpdateRequest.d.ts +12 -0
  48. package/dist/chaos-manager/src/services/schemas/ChaosservicesUpdateRequest.js +1 -0
  49. package/dist/chaos-manager/src/services/schemas/DashboardCategoryCount.d.ts +4 -0
  50. package/dist/chaos-manager/src/services/schemas/DashboardCategoryCount.js +4 -0
  51. package/dist/chaos-manager/src/services/schemas/DashboardDashboardCounts.d.ts +7 -0
  52. package/dist/chaos-manager/src/services/schemas/DashboardDashboardCounts.js +1 -0
  53. package/dist/chaos-manager/src/services/schemas/DashboardDashboardResponse.d.ts +19 -0
  54. package/dist/chaos-manager/src/services/schemas/DashboardDashboardResponse.js +1 -0
  55. package/dist/chaos-manager/src/services/schemas/DashboardListDashboardResponse.d.ts +9 -0
  56. package/dist/chaos-manager/src/services/schemas/DashboardListDashboardResponse.js +1 -0
  57. package/dist/chaos-manager/src/services/schemas/DashboardUpdateRequest.d.ts +4 -0
  58. package/dist/chaos-manager/src/services/schemas/DashboardUpdateRequest.js +4 -0
  59. package/dist/chaos-manager/src/services/schemas/ExperimentActionRef.d.ts +2 -0
  60. package/dist/chaos-manager/src/services/schemas/ExperimentFault.d.ts +16 -0
  61. package/dist/chaos-manager/src/services/schemas/ExperimentFault.js +1 -0
  62. package/dist/chaos-manager/src/services/schemas/ExperimentFaultRef.d.ts +2 -0
  63. package/dist/chaos-manager/src/services/schemas/ExperimentProbeRef.d.ts +2 -0
  64. package/dist/chaos-manager/src/services/schemas/ExperimentsGetResponse.d.ts +1 -0
  65. package/dist/chaos-manager/src/services/schemas/ExperimenttemplateAction.d.ts +2 -0
  66. package/dist/chaos-manager/src/services/schemas/ExperimenttemplateProbe.d.ts +2 -0
  67. package/dist/chaos-manager/src/services/schemas/GithubComHarnessHceSaasHceSdkTypesApiMachineInfraInfra.d.ts +4 -0
  68. package/dist/chaos-manager/src/services/schemas/InfraRegisterInfraRequest.d.ts +4 -0
  69. package/dist/chaos-manager/src/services/schemas/InfraUpdateInfraRequest.d.ts +1 -0
  70. package/dist/chaos-manager/src/services/schemas/InfraopsGetKubeObjectBody.d.ts +6 -0
  71. package/dist/chaos-manager/src/services/schemas/InfraopsGetKubeObjectBody.js +1 -0
  72. package/dist/chaos-manager/src/services/schemas/InfraopsGetKubeObjectResponse.d.ts +9 -0
  73. package/dist/chaos-manager/src/services/schemas/InfraopsGetKubeObjectResponse.js +1 -0
  74. package/dist/chaos-manager/src/services/schemas/InfraopsKubeGvrRequest.d.ts +5 -0
  75. package/dist/chaos-manager/src/services/schemas/InfraopsKubeGvrRequest.js +4 -0
  76. package/dist/chaos-manager/src/services/schemas/InfraopsKubeObject.d.ts +5 -0
  77. package/dist/chaos-manager/src/services/schemas/InfraopsKubeObject.js +1 -0
  78. package/dist/chaos-manager/src/services/schemas/InfraopsObjectData.d.ts +4 -0
  79. package/dist/chaos-manager/src/services/schemas/InfraopsObjectData.js +4 -0
  80. package/dist/chaos-manager/src/services/schemas/ModelAbortChaosComponentForMachineRequest.d.ts +5 -0
  81. package/dist/chaos-manager/src/services/schemas/ModelAbortChaosComponentForMachineRequest.js +4 -0
  82. package/dist/chaos-manager/src/services/schemas/ModelAbortChaosComponentForMachineResponse.d.ts +4 -0
  83. package/dist/chaos-manager/src/services/schemas/ModelAbortChaosComponentForMachineResponse.js +4 -0
  84. package/dist/chaos-manager/src/services/schemas/ModelRunChaosComponentForMachineRequest.d.ts +18 -0
  85. package/dist/chaos-manager/src/services/schemas/ModelRunChaosComponentForMachineRequest.js +1 -0
  86. package/dist/chaos-manager/src/services/schemas/ModelRunChaosComponentForMachineResponse.d.ts +5 -0
  87. package/dist/chaos-manager/src/services/schemas/ModelRunChaosComponentForMachineResponse.js +1 -0
  88. package/dist/chaos-manager/src/services/schemas/ModelRunChaosComponentForMachineResponseData.d.ts +5 -0
  89. package/dist/chaos-manager/src/services/schemas/ModelRunChaosComponentForMachineResponseData.js +4 -0
  90. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ModelAbortChaosComponentForMachineResponse } from '../schemas/ModelAbortChaosComponentForMachineResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import type { ModelAbortChaosComponentForMachineRequest } from '../schemas/ModelAbortChaosComponentForMachineRequest';
5
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
6
+ export interface AbortChaosComponentForMachineMutationQueryParams {
7
+ accountIdentifier: string;
8
+ organizationIdentifier?: string;
9
+ parentUniqueId?: string;
10
+ projectIdentifier?: string;
11
+ }
12
+ export type AbortChaosComponentForMachineRequestBody = ModelAbortChaosComponentForMachineRequest;
13
+ export type AbortChaosComponentForMachineOkResponse = ModelAbortChaosComponentForMachineResponse;
14
+ export type AbortChaosComponentForMachineErrorResponse = ApiRestError;
15
+ export interface AbortChaosComponentForMachineProps extends Omit<FetcherOptions<AbortChaosComponentForMachineMutationQueryParams, AbortChaosComponentForMachineRequestBody>, 'url'> {
16
+ queryParams: AbortChaosComponentForMachineMutationQueryParams;
17
+ body: AbortChaosComponentForMachineRequestBody;
18
+ }
19
+ export interface AbortChaosComponentForMachineResponseContainer {
20
+ body: AbortChaosComponentForMachineOkResponse;
21
+ headers: Headers;
22
+ }
23
+ export declare function abortChaosComponentForMachine(props: AbortChaosComponentForMachineProps): Promise<AbortChaosComponentForMachineResponseContainer>;
24
+ export type AbortChaosComponentForMachineMutationProps<T extends keyof AbortChaosComponentForMachineProps> = Omit<AbortChaosComponentForMachineProps, T> & Partial<Pick<AbortChaosComponentForMachineProps, T>>;
25
+ /**
26
+ * Aborts a running ChaosComponent (DDPR) that was dispatched on behalf of a machine experiment
27
+ */
28
+ export declare function useAbortChaosComponentForMachineMutation<T extends keyof AbortChaosComponentForMachineProps>(props: Pick<Partial<AbortChaosComponentForMachineProps>, T>, options?: Omit<UseMutationOptions<AbortChaosComponentForMachineResponseContainer, AbortChaosComponentForMachineErrorResponse, AbortChaosComponentForMachineMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<AbortChaosComponentForMachineResponseContainer, ApiRestError, AbortChaosComponentForMachineMutationProps<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 abortChaosComponentForMachine(props) {
7
+ return fetcher(Object.assign({ url: `/internalv3/machine/abort-chaos-component`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Aborts a running ChaosComponent (DDPR) that was dispatched on behalf of a machine experiment
11
+ */
12
+ export function useAbortChaosComponentForMachineMutation(props, options) {
13
+ return useMutation((mutateProps) => abortChaosComponentForMachine(Object.assign(Object.assign({}, props), mutateProps)), options);
14
+ }
@@ -0,0 +1,30 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ChaosservicesChaosServiceResponse } from '../schemas/ChaosservicesChaosServiceResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import type { ChaosservicesCreateRequest } from '../schemas/ChaosservicesCreateRequest';
5
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
6
+ export interface CreateChaosServiceMutationQueryParams {
7
+ accountIdentifier: string;
8
+ correlationID?: string;
9
+ organizationIdentifier?: string;
10
+ parentUniqueId?: string;
11
+ projectIdentifier?: string;
12
+ useParentUniqueID?: boolean;
13
+ }
14
+ export type CreateChaosServiceRequestBody = ChaosservicesCreateRequest;
15
+ export type CreateChaosServiceOkResponse = ChaosservicesChaosServiceResponse;
16
+ export type CreateChaosServiceErrorResponse = ApiRestError;
17
+ export interface CreateChaosServiceProps extends Omit<FetcherOptions<CreateChaosServiceMutationQueryParams, CreateChaosServiceRequestBody>, 'url'> {
18
+ queryParams: CreateChaosServiceMutationQueryParams;
19
+ body: CreateChaosServiceRequestBody;
20
+ }
21
+ export interface CreateChaosServiceResponseContainer {
22
+ body: CreateChaosServiceOkResponse;
23
+ headers: Headers;
24
+ }
25
+ export declare function createChaosService(props: CreateChaosServiceProps): Promise<CreateChaosServiceResponseContainer>;
26
+ export type CreateChaosServiceMutationProps<T extends keyof CreateChaosServiceProps> = Omit<CreateChaosServiceProps, T> & Partial<Pick<CreateChaosServiceProps, T>>;
27
+ /**
28
+ * Create a chaos service
29
+ */
30
+ export declare function useCreateChaosServiceMutation<T extends keyof CreateChaosServiceProps>(props: Pick<Partial<CreateChaosServiceProps>, T>, options?: Omit<UseMutationOptions<CreateChaosServiceResponseContainer, CreateChaosServiceErrorResponse, CreateChaosServiceMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateChaosServiceResponseContainer, ApiRestError, CreateChaosServiceMutationProps<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 createChaosService(props) {
7
+ return fetcher(Object.assign({ url: `/v3/chaos-services`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Create a chaos service
11
+ */
12
+ export function useCreateChaosServiceMutation(props, options) {
13
+ return useMutation((mutateProps) => createChaosService(Object.assign(Object.assign({}, props), mutateProps)), options);
14
+ }
@@ -0,0 +1,30 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ChaosservicesDeleteResponse } from '../schemas/ChaosservicesDeleteResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
+ export interface DeleteChaosServiceMutationPathParams {
6
+ identity: string;
7
+ }
8
+ export interface DeleteChaosServiceMutationQueryParams {
9
+ accountIdentifier: string;
10
+ correlationID?: string;
11
+ organizationIdentifier?: string;
12
+ parentUniqueId?: string;
13
+ projectIdentifier?: string;
14
+ useParentUniqueID?: boolean;
15
+ }
16
+ export type DeleteChaosServiceOkResponse = ChaosservicesDeleteResponse;
17
+ export type DeleteChaosServiceErrorResponse = ApiRestError;
18
+ export interface DeleteChaosServiceProps extends DeleteChaosServiceMutationPathParams, Omit<FetcherOptions<DeleteChaosServiceMutationQueryParams, unknown>, 'url'> {
19
+ queryParams: DeleteChaosServiceMutationQueryParams;
20
+ }
21
+ export interface DeleteChaosServiceResponseContainer {
22
+ body: DeleteChaosServiceOkResponse;
23
+ headers: Headers;
24
+ }
25
+ export declare function deleteChaosService(props: DeleteChaosServiceProps): Promise<DeleteChaosServiceResponseContainer>;
26
+ export type DeleteChaosServiceMutationProps<T extends keyof DeleteChaosServiceProps> = Omit<DeleteChaosServiceProps, T> & Partial<Pick<DeleteChaosServiceProps, T>>;
27
+ /**
28
+ * Delete a chaos service
29
+ */
30
+ export declare function useDeleteChaosServiceMutation<T extends keyof DeleteChaosServiceProps>(props: Pick<Partial<DeleteChaosServiceProps>, T>, options?: Omit<UseMutationOptions<DeleteChaosServiceResponseContainer, DeleteChaosServiceErrorResponse, DeleteChaosServiceMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteChaosServiceResponseContainer, ApiRestError, DeleteChaosServiceMutationProps<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 deleteChaosService(props) {
7
+ return fetcher(Object.assign({ url: `/v3/chaos-services/${props.identity}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Delete a chaos service
11
+ */
12
+ export function useDeleteChaosServiceMutation(props, options) {
13
+ return useMutation((mutateProps) => deleteChaosService(Object.assign(Object.assign({}, props), mutateProps)), options);
14
+ }
@@ -0,0 +1,29 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ChaosservicesChaosServiceResponse } from '../schemas/ChaosservicesChaosServiceResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
+ export interface GetChaosServiceQueryPathParams {
6
+ identity: string;
7
+ }
8
+ export interface GetChaosServiceQueryQueryParams {
9
+ accountIdentifier: string;
10
+ correlationID?: string;
11
+ organizationIdentifier?: string;
12
+ parentUniqueId?: string;
13
+ projectIdentifier?: string;
14
+ useParentUniqueID?: boolean;
15
+ }
16
+ export type GetChaosServiceOkResponse = ChaosservicesChaosServiceResponse;
17
+ export type GetChaosServiceErrorResponse = ApiRestError;
18
+ export interface GetChaosServiceProps extends GetChaosServiceQueryPathParams, Omit<FetcherOptions<GetChaosServiceQueryQueryParams, unknown>, 'url'> {
19
+ queryParams: GetChaosServiceQueryQueryParams;
20
+ }
21
+ export interface GetChaosServiceResponseContainer {
22
+ body: GetChaosServiceOkResponse;
23
+ headers: Headers;
24
+ }
25
+ export declare function getChaosService(props: GetChaosServiceProps): Promise<GetChaosServiceResponseContainer>;
26
+ /**
27
+ * Get a chaos service by identity
28
+ */
29
+ export declare function useGetChaosServiceQuery(props: GetChaosServiceProps, options?: Omit<UseQueryOptions<GetChaosServiceResponseContainer, GetChaosServiceErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetChaosServiceResponseContainer, 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 getChaosService(props) {
7
+ return fetcher(Object.assign({ url: `/v3/chaos-services/${props.identity}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get a chaos service by identity
11
+ */
12
+ export function useGetChaosServiceQuery(props, options) {
13
+ return useQuery(['getChaosService', props.identity, props.queryParams], ({ signal }) => getChaosService(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,29 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { DashboardDashboardResponse } from '../schemas/DashboardDashboardResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
+ export interface GetDashboardV3QueryPathParams {
6
+ identity: string;
7
+ }
8
+ export interface GetDashboardV3QueryQueryParams {
9
+ accountIdentifier: string;
10
+ correlationID?: string;
11
+ organizationIdentifier?: string;
12
+ parentUniqueId?: string;
13
+ projectIdentifier?: string;
14
+ useParentUniqueID?: boolean;
15
+ }
16
+ export type GetDashboardV3OkResponse = DashboardDashboardResponse;
17
+ export type GetDashboardV3ErrorResponse = ApiRestError;
18
+ export interface GetDashboardV3Props extends GetDashboardV3QueryPathParams, Omit<FetcherOptions<GetDashboardV3QueryQueryParams, unknown>, 'url'> {
19
+ queryParams: GetDashboardV3QueryQueryParams;
20
+ }
21
+ export interface GetDashboardV3ResponseContainer {
22
+ body: GetDashboardV3OkResponse;
23
+ headers: Headers;
24
+ }
25
+ export declare function getDashboardV3(props: GetDashboardV3Props): Promise<GetDashboardV3ResponseContainer>;
26
+ /**
27
+ * gets a dashboard by identity for the given project
28
+ */
29
+ export declare function useGetDashboardV3Query(props: GetDashboardV3Props, options?: Omit<UseQueryOptions<GetDashboardV3ResponseContainer, GetDashboardV3ErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetDashboardV3ResponseContainer, 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 getDashboardV3(props) {
7
+ return fetcher(Object.assign({ url: `/v3/dashboards/${props.identity}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * gets a dashboard by identity for the given project
11
+ */
12
+ export function useGetDashboardV3Query(props, options) {
13
+ return useQuery(['GetDashboardV3', props.identity, props.queryParams], ({ signal }) => getDashboardV3(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,32 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { InfraopsGetKubeObjectResponse } from '../schemas/InfraopsGetKubeObjectResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import type { InfraopsGetKubeObjectBody } from '../schemas/InfraopsGetKubeObjectBody';
5
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
6
+ export interface GetKubeObjectV3MutationPathParams {
7
+ identity: string;
8
+ }
9
+ export interface GetKubeObjectV3MutationQueryParams {
10
+ accountIdentifier: string;
11
+ correlationID?: string;
12
+ organizationIdentifier?: string;
13
+ parentUniqueId?: string;
14
+ projectIdentifier?: string;
15
+ }
16
+ export type GetKubeObjectV3RequestBody = InfraopsGetKubeObjectBody;
17
+ export type GetKubeObjectV3OkResponse = InfraopsGetKubeObjectResponse;
18
+ export type GetKubeObjectV3ErrorResponse = ApiRestError;
19
+ export interface GetKubeObjectV3Props extends GetKubeObjectV3MutationPathParams, Omit<FetcherOptions<GetKubeObjectV3MutationQueryParams, GetKubeObjectV3RequestBody>, 'url'> {
20
+ queryParams: GetKubeObjectV3MutationQueryParams;
21
+ body: GetKubeObjectV3RequestBody;
22
+ }
23
+ export interface GetKubeObjectV3ResponseContainer {
24
+ body: GetKubeObjectV3OkResponse;
25
+ headers: Headers;
26
+ }
27
+ export declare function getKubeObjectV3(props: GetKubeObjectV3Props): Promise<GetKubeObjectV3ResponseContainer>;
28
+ export type GetKubeObjectV3MutationProps<T extends keyof GetKubeObjectV3Props> = Omit<GetKubeObjectV3Props, T> & Partial<Pick<GetKubeObjectV3Props, T>>;
29
+ /**
30
+ * Discovers Kubernetes resources (group/version/resource) on a chaos infrastructure via delegate task.
31
+ */
32
+ export declare function useGetKubeObjectV3Mutation<T extends keyof GetKubeObjectV3Props>(props: Pick<Partial<GetKubeObjectV3Props>, T>, options?: Omit<UseMutationOptions<GetKubeObjectV3ResponseContainer, GetKubeObjectV3ErrorResponse, GetKubeObjectV3MutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<GetKubeObjectV3ResponseContainer, ApiRestError, GetKubeObjectV3MutationProps<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 getKubeObjectV3(props) {
7
+ return fetcher(Object.assign({ url: `/v3/chaos-infrastructures/${props.identity}/kube-objects`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Discovers Kubernetes resources (group/version/resource) on a chaos infrastructure via delegate task.
11
+ */
12
+ export function useGetKubeObjectV3Mutation(props, options) {
13
+ return useMutation((mutateProps) => getKubeObjectV3(Object.assign(Object.assign({}, props), mutateProps)), options);
14
+ }
@@ -0,0 +1,41 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ChaosservicesListChaosServiceResponse } from '../schemas/ChaosservicesListChaosServiceResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
+ export interface ListChaosServicesQueryQueryParams {
6
+ accountIdentifier: string;
7
+ correlationID?: string;
8
+ environmentIdentity?: string;
9
+ includeAllScope?: boolean;
10
+ infrastructureIdentity?: 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
+ sortAscending?: boolean;
24
+ sortField?: 'experimentName' | 'lastExecuted' | 'lastUpdated' | 'name';
25
+ tags?: string;
26
+ useParentUniqueID?: boolean;
27
+ }
28
+ export type ListChaosServicesOkResponse = ChaosservicesListChaosServiceResponse;
29
+ export type ListChaosServicesErrorResponse = ApiRestError;
30
+ export interface ListChaosServicesProps extends Omit<FetcherOptions<ListChaosServicesQueryQueryParams, unknown>, 'url'> {
31
+ queryParams: ListChaosServicesQueryQueryParams;
32
+ }
33
+ export interface ListChaosServicesResponseContainer {
34
+ body: ListChaosServicesOkResponse;
35
+ headers: Headers;
36
+ }
37
+ export declare function listChaosServices(props: ListChaosServicesProps): Promise<ListChaosServicesResponseContainer>;
38
+ /**
39
+ * List chaos services
40
+ */
41
+ export declare function useListChaosServicesQuery(props: ListChaosServicesProps, options?: Omit<UseQueryOptions<ListChaosServicesResponseContainer, ListChaosServicesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListChaosServicesResponseContainer, 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 listChaosServices(props) {
7
+ return fetcher(Object.assign({ url: `/v3/chaos-services`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * List chaos services
11
+ */
12
+ export function useListChaosServicesQuery(props, options) {
13
+ return useQuery(['listChaosServices', props.queryParams], ({ signal }) => listChaosServices(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,40 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { DashboardListDashboardResponse } from '../schemas/DashboardListDashboardResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
5
+ export interface ListDashboardsV3QueryQueryParams {
6
+ accountIdentifier: string;
7
+ category?: string;
8
+ correlationID?: string;
9
+ favourite?: boolean;
10
+ /**
11
+ * @default 15
12
+ */
13
+ limit?: number;
14
+ organizationIdentifier?: string;
15
+ /**
16
+ * @default 0
17
+ */
18
+ page?: number;
19
+ parentUniqueId?: string;
20
+ projectIdentifier?: string;
21
+ search?: string;
22
+ sortAscending?: boolean;
23
+ sortField?: 'experimentName' | 'lastExecuted' | 'lastUpdated' | 'name';
24
+ tags?: string;
25
+ useParentUniqueID?: boolean;
26
+ }
27
+ export type ListDashboardsV3OkResponse = DashboardListDashboardResponse;
28
+ export type ListDashboardsV3ErrorResponse = ApiRestError;
29
+ export interface ListDashboardsV3Props extends Omit<FetcherOptions<ListDashboardsV3QueryQueryParams, unknown>, 'url'> {
30
+ queryParams: ListDashboardsV3QueryQueryParams;
31
+ }
32
+ export interface ListDashboardsV3ResponseContainer {
33
+ body: ListDashboardsV3OkResponse;
34
+ headers: Headers;
35
+ }
36
+ export declare function listDashboardsV3(props: ListDashboardsV3Props): Promise<ListDashboardsV3ResponseContainer>;
37
+ /**
38
+ * lists out-of-the-box dashboards for the given project with search, tag/category/favourite filters, sort and pagination
39
+ */
40
+ export declare function useListDashboardsV3Query(props: ListDashboardsV3Props, options?: Omit<UseQueryOptions<ListDashboardsV3ResponseContainer, ListDashboardsV3ErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListDashboardsV3ResponseContainer, 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 listDashboardsV3(props) {
7
+ return fetcher(Object.assign({ url: `/v3/dashboards`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * lists out-of-the-box dashboards for the given project with search, tag/category/favourite filters, sort and pagination
11
+ */
12
+ export function useListDashboardsV3Query(props, options) {
13
+ return useQuery(['ListDashboardsV3', props.queryParams], ({ signal }) => listDashboardsV3(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,28 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ModelRunChaosComponentForMachineResponse } from '../schemas/ModelRunChaosComponentForMachineResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import type { ModelRunChaosComponentForMachineRequest } from '../schemas/ModelRunChaosComponentForMachineRequest';
5
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
6
+ export interface RunChaosComponentForMachineMutationQueryParams {
7
+ accountIdentifier: string;
8
+ organizationIdentifier?: string;
9
+ parentUniqueId?: string;
10
+ projectIdentifier?: string;
11
+ }
12
+ export type RunChaosComponentForMachineRequestBody = ModelRunChaosComponentForMachineRequest;
13
+ export type RunChaosComponentForMachineOkResponse = ModelRunChaosComponentForMachineResponse;
14
+ export type RunChaosComponentForMachineErrorResponse = ApiRestError;
15
+ export interface RunChaosComponentForMachineProps extends Omit<FetcherOptions<RunChaosComponentForMachineMutationQueryParams, RunChaosComponentForMachineRequestBody>, 'url'> {
16
+ queryParams: RunChaosComponentForMachineMutationQueryParams;
17
+ body: RunChaosComponentForMachineRequestBody;
18
+ }
19
+ export interface RunChaosComponentForMachineResponseContainer {
20
+ body: RunChaosComponentForMachineOkResponse;
21
+ headers: Headers;
22
+ }
23
+ export declare function runChaosComponentForMachine(props: RunChaosComponentForMachineProps): Promise<RunChaosComponentForMachineResponseContainer>;
24
+ export type RunChaosComponentForMachineMutationProps<T extends keyof RunChaosComponentForMachineProps> = Omit<RunChaosComponentForMachineProps, T> & Partial<Pick<RunChaosComponentForMachineProps, T>>;
25
+ /**
26
+ * Creates and executes a ChaosComponent on K8s infra for probes/actions that
27
+ */
28
+ export declare function useRunChaosComponentForMachineMutation<T extends keyof RunChaosComponentForMachineProps>(props: Pick<Partial<RunChaosComponentForMachineProps>, T>, options?: Omit<UseMutationOptions<RunChaosComponentForMachineResponseContainer, RunChaosComponentForMachineErrorResponse, RunChaosComponentForMachineMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<RunChaosComponentForMachineResponseContainer, ApiRestError, RunChaosComponentForMachineMutationProps<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 runChaosComponentForMachine(props) {
7
+ return fetcher(Object.assign({ url: `/internalv3/machine/run-chaos-component`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Creates and executes a ChaosComponent on K8s infra for probes/actions that
11
+ */
12
+ export function useRunChaosComponentForMachineMutation(props, options) {
13
+ return useMutation((mutateProps) => runChaosComponentForMachine(Object.assign(Object.assign({}, props), mutateProps)), options);
14
+ }
@@ -0,0 +1,33 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ChaosservicesChaosServiceResponse } from '../schemas/ChaosservicesChaosServiceResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import type { ChaosservicesUpdateRequest } from '../schemas/ChaosservicesUpdateRequest';
5
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
6
+ export interface UpdateChaosServiceMutationPathParams {
7
+ identity: string;
8
+ }
9
+ export interface UpdateChaosServiceMutationQueryParams {
10
+ accountIdentifier: string;
11
+ correlationID?: string;
12
+ organizationIdentifier?: string;
13
+ parentUniqueId?: string;
14
+ projectIdentifier?: string;
15
+ useParentUniqueID?: boolean;
16
+ }
17
+ export type UpdateChaosServiceRequestBody = ChaosservicesUpdateRequest;
18
+ export type UpdateChaosServiceOkResponse = ChaosservicesChaosServiceResponse;
19
+ export type UpdateChaosServiceErrorResponse = ApiRestError;
20
+ export interface UpdateChaosServiceProps extends UpdateChaosServiceMutationPathParams, Omit<FetcherOptions<UpdateChaosServiceMutationQueryParams, UpdateChaosServiceRequestBody>, 'url'> {
21
+ queryParams: UpdateChaosServiceMutationQueryParams;
22
+ body: UpdateChaosServiceRequestBody;
23
+ }
24
+ export interface UpdateChaosServiceResponseContainer {
25
+ body: UpdateChaosServiceOkResponse;
26
+ headers: Headers;
27
+ }
28
+ export declare function updateChaosService(props: UpdateChaosServiceProps): Promise<UpdateChaosServiceResponseContainer>;
29
+ export type UpdateChaosServiceMutationProps<T extends keyof UpdateChaosServiceProps> = Omit<UpdateChaosServiceProps, T> & Partial<Pick<UpdateChaosServiceProps, T>>;
30
+ /**
31
+ * updates a chaos service
32
+ */
33
+ export declare function useUpdateChaosServiceMutation<T extends keyof UpdateChaosServiceProps>(props: Pick<Partial<UpdateChaosServiceProps>, T>, options?: Omit<UseMutationOptions<UpdateChaosServiceResponseContainer, UpdateChaosServiceErrorResponse, UpdateChaosServiceMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateChaosServiceResponseContainer, ApiRestError, UpdateChaosServiceMutationProps<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 updateChaosService(props) {
7
+ return fetcher(Object.assign({ url: `/v3/chaos-services/${props.identity}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * updates a chaos service
11
+ */
12
+ export function useUpdateChaosServiceMutation(props, options) {
13
+ return useMutation((mutateProps) => updateChaosService(Object.assign(Object.assign({}, props), mutateProps)), options);
14
+ }
@@ -0,0 +1,33 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { DashboardDashboardResponse } from '../schemas/DashboardDashboardResponse';
3
+ import type { ApiRestError } from '../schemas/ApiRestError';
4
+ import type { DashboardUpdateRequest } from '../schemas/DashboardUpdateRequest';
5
+ import { FetcherOptions } from '../../../../custom-fetcher/index.js';
6
+ export interface UpdateDashboardV3MutationPathParams {
7
+ identity: string;
8
+ }
9
+ export interface UpdateDashboardV3MutationQueryParams {
10
+ accountIdentifier: string;
11
+ correlationID?: string;
12
+ organizationIdentifier?: string;
13
+ parentUniqueId?: string;
14
+ projectIdentifier?: string;
15
+ useParentUniqueID?: boolean;
16
+ }
17
+ export type UpdateDashboardV3RequestBody = DashboardUpdateRequest;
18
+ export type UpdateDashboardV3OkResponse = DashboardDashboardResponse;
19
+ export type UpdateDashboardV3ErrorResponse = ApiRestError;
20
+ export interface UpdateDashboardV3Props extends UpdateDashboardV3MutationPathParams, Omit<FetcherOptions<UpdateDashboardV3MutationQueryParams, UpdateDashboardV3RequestBody>, 'url'> {
21
+ queryParams: UpdateDashboardV3MutationQueryParams;
22
+ body: UpdateDashboardV3RequestBody;
23
+ }
24
+ export interface UpdateDashboardV3ResponseContainer {
25
+ body: UpdateDashboardV3OkResponse;
26
+ headers: Headers;
27
+ }
28
+ export declare function updateDashboardV3(props: UpdateDashboardV3Props): Promise<UpdateDashboardV3ResponseContainer>;
29
+ export type UpdateDashboardV3MutationProps<T extends keyof UpdateDashboardV3Props> = Omit<UpdateDashboardV3Props, T> & Partial<Pick<UpdateDashboardV3Props, T>>;
30
+ /**
31
+ * updates the tags and favourite flag of a dashboard for the given project
32
+ */
33
+ export declare function useUpdateDashboardV3Mutation<T extends keyof UpdateDashboardV3Props>(props: Pick<Partial<UpdateDashboardV3Props>, T>, options?: Omit<UseMutationOptions<UpdateDashboardV3ResponseContainer, UpdateDashboardV3ErrorResponse, UpdateDashboardV3MutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateDashboardV3ResponseContainer, ApiRestError, UpdateDashboardV3MutationProps<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 updateDashboardV3(props) {
7
+ return fetcher(Object.assign({ url: `/v3/dashboards/${props.identity}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * updates the tags and favourite flag of a dashboard for the given project
11
+ */
12
+ export function useUpdateDashboardV3Mutation(props, options) {
13
+ return useMutation((mutateProps) => updateDashboardV3(Object.assign(Object.assign({}, props), mutateProps)), options);
14
+ }