@harnessio/react-pipeline-swagger-service-client 1.8.0 → 1.8.1

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,26 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ResponsePipelineExecutionInterrupt } from '../schemas/ResponsePipelineExecutionInterrupt';
3
+ import type { Failure } from '../schemas/Failure';
4
+ import type { AccessControlCheckError } from '../schemas/AccessControlCheckError';
5
+ import type { Error } from '../schemas/Error';
6
+ import type { ResponseWithPagination } from '../helpers';
7
+ import { FetcherOptions } from '../../../../fetcher/index.js';
8
+ export interface HandleInterruptMutationPathParams {
9
+ planExecutionId: string;
10
+ }
11
+ export interface HandleInterruptMutationQueryParams {
12
+ accountIdentifier: string;
13
+ orgIdentifier: string;
14
+ projectIdentifier: string;
15
+ interruptType: 'AbortAll' | 'UserMarkedFailure';
16
+ }
17
+ export type HandleInterruptOkResponse = ResponseWithPagination<ResponsePipelineExecutionInterrupt>;
18
+ export type HandleInterruptErrorResponse = Failure | AccessControlCheckError | Error;
19
+ export interface HandleInterruptProps extends HandleInterruptMutationPathParams, Omit<FetcherOptions<HandleInterruptMutationQueryParams, unknown>, 'url'> {
20
+ queryParams: HandleInterruptMutationQueryParams;
21
+ }
22
+ export declare function handleInterrupt(props: HandleInterruptProps): Promise<HandleInterruptOkResponse>;
23
+ /**
24
+ *
25
+ */
26
+ export declare function useHandleInterruptMutation(options?: Omit<UseMutationOptions<HandleInterruptOkResponse, HandleInterruptErrorResponse, HandleInterruptProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<HandleInterruptOkResponse, HandleInterruptErrorResponse, HandleInterruptProps, 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 '../../../../fetcher/index.js';
6
+ export function handleInterrupt(props) {
7
+ return fetcher(Object.assign({ url: `/pipeline/execute/interrupt/${props.planExecutionId}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ *
11
+ */
12
+ export function useHandleInterruptMutation(options) {
13
+ return useMutation((mutateProps) => handleInterrupt(mutateProps), options);
14
+ }
@@ -55,6 +55,8 @@ export type { GetTriggerListForTargetErrorResponse, GetTriggerListForTargetOkRes
55
55
  export { getTriggerListForTarget, useGetTriggerListForTargetQuery, } from './hooks/useGetTriggerListForTargetQuery';
56
56
  export type { GetTriggerErrorResponse, GetTriggerOkResponse, GetTriggerProps, GetTriggerQueryPathParams, GetTriggerQueryQueryParams, } from './hooks/useGetTriggerQuery';
57
57
  export { getTrigger, useGetTriggerQuery } from './hooks/useGetTriggerQuery';
58
+ export type { HandleInterruptErrorResponse, HandleInterruptMutationPathParams, HandleInterruptMutationQueryParams, HandleInterruptOkResponse, HandleInterruptProps, } from './hooks/useHandleInterruptMutation';
59
+ export { handleInterrupt, useHandleInterruptMutation } from './hooks/useHandleInterruptMutation';
58
60
  export type { HandleStageInterruptErrorResponse, HandleStageInterruptMutationPathParams, HandleStageInterruptMutationQueryParams, HandleStageInterruptOkResponse, HandleStageInterruptProps, } from './hooks/useHandleStageInterruptMutation';
59
61
  export { handleStageInterrupt, useHandleStageInterruptMutation, } from './hooks/useHandleStageInterruptMutation';
60
62
  export type { PostFilterErrorResponse, PostFilterMutationQueryParams, PostFilterOkResponse, PostFilterProps, PostFilterRequestBody, } from './hooks/usePostFilterMutation';
@@ -26,6 +26,7 @@ export { getTriggerCatalog, useGetTriggerCatalogQuery } from './hooks/useGetTrig
26
26
  export { getTriggerDetails, useGetTriggerDetailsQuery } from './hooks/useGetTriggerDetailsQuery';
27
27
  export { getTriggerListForTarget, useGetTriggerListForTargetQuery, } from './hooks/useGetTriggerListForTargetQuery';
28
28
  export { getTrigger, useGetTriggerQuery } from './hooks/useGetTriggerQuery';
29
+ export { handleInterrupt, useHandleInterruptMutation } from './hooks/useHandleInterruptMutation';
29
30
  export { handleStageInterrupt, useHandleStageInterruptMutation, } from './hooks/useHandleStageInterruptMutation';
30
31
  export { postFilter, usePostFilterMutation } from './hooks/usePostFilterMutation';
31
32
  export { retryHistory, useRetryHistoryQuery } from './hooks/useRetryHistoryQuery';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-pipeline-swagger-service-client",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Harness React pipeline service client - Pipeline APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",