@harnessio/react-pipeline-swagger-service-client 1.7.0 → 1.7.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,24 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ResponseBoolean } from '../schemas/ResponseBoolean';
3
+ import type { Failure } from '../schemas/Failure';
4
+ import type { Error } from '../schemas/Error';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface CanRetryExecutionQueryPathParams {
8
+ planExecutionId: string;
9
+ }
10
+ export interface CanRetryExecutionQueryQueryParams {
11
+ accountIdentifier: string;
12
+ orgIdentifier: string;
13
+ projectIdentifier: string;
14
+ }
15
+ export type CanRetryExecutionOkResponse = ResponseWithPagination<ResponseBoolean>;
16
+ export type CanRetryExecutionErrorResponse = Failure | Error;
17
+ export interface CanRetryExecutionProps extends CanRetryExecutionQueryPathParams, Omit<FetcherOptions<CanRetryExecutionQueryQueryParams, unknown>, 'url'> {
18
+ queryParams: CanRetryExecutionQueryQueryParams;
19
+ }
20
+ export declare function canRetryExecution(props: CanRetryExecutionProps): Promise<CanRetryExecutionOkResponse>;
21
+ /**
22
+ *
23
+ */
24
+ export declare function useCanRetryExecutionQuery(props: CanRetryExecutionProps, options?: Omit<UseQueryOptions<CanRetryExecutionOkResponse, CanRetryExecutionErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<CanRetryExecutionOkResponse, CanRetryExecutionErrorResponse>;
@@ -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 '../../../../fetcher/index.js';
6
+ export function canRetryExecution(props) {
7
+ return fetcher(Object.assign({ url: `/pipelines/execution/canRetry/${props.planExecutionId}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ *
11
+ */
12
+ export function useCanRetryExecutionQuery(props, options) {
13
+ return useQuery(['canRetryExecution', props.planExecutionId, props.queryParams], ({ signal }) => canRetryExecution(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,27 @@
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 HandleStageInterruptMutationPathParams {
9
+ planExecutionId: string;
10
+ nodeExecutionId: string;
11
+ }
12
+ export interface HandleStageInterruptMutationQueryParams {
13
+ accountIdentifier: string;
14
+ orgIdentifier: string;
15
+ projectIdentifier: string;
16
+ interruptType: 'AbortAll' | 'UserMarkedFailure';
17
+ }
18
+ export type HandleStageInterruptOkResponse = ResponseWithPagination<ResponsePipelineExecutionInterrupt>;
19
+ export type HandleStageInterruptErrorResponse = Failure | AccessControlCheckError | Error;
20
+ export interface HandleStageInterruptProps extends HandleStageInterruptMutationPathParams, Omit<FetcherOptions<HandleStageInterruptMutationQueryParams, unknown>, 'url'> {
21
+ queryParams: HandleStageInterruptMutationQueryParams;
22
+ }
23
+ export declare function handleStageInterrupt(props: HandleStageInterruptProps): Promise<HandleStageInterruptOkResponse>;
24
+ /**
25
+ *
26
+ */
27
+ export declare function useHandleStageInterruptMutation(options?: Omit<UseMutationOptions<HandleStageInterruptOkResponse, HandleStageInterruptErrorResponse, HandleStageInterruptProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<HandleStageInterruptOkResponse, HandleStageInterruptErrorResponse, HandleStageInterruptProps, 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 handleStageInterrupt(props) {
7
+ return fetcher(Object.assign({ url: `/pipeline/execute/interrupt/${props.planExecutionId}/${props.nodeExecutionId}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ *
11
+ */
12
+ export function useHandleStageInterruptMutation(options) {
13
+ return useMutation((mutateProps) => handleStageInterrupt(mutateProps), options);
14
+ }
@@ -1,4 +1,6 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
+ export type { CanRetryExecutionErrorResponse, CanRetryExecutionOkResponse, CanRetryExecutionProps, CanRetryExecutionQueryPathParams, CanRetryExecutionQueryQueryParams, } from './hooks/useCanRetryExecutionQuery';
3
+ export { canRetryExecution, useCanRetryExecutionQuery } from './hooks/useCanRetryExecutionQuery';
2
4
  export type { CreateTriggerErrorResponse, CreateTriggerMutationQueryParams, CreateTriggerOkResponse, CreateTriggerProps, CreateTriggerRequestBody, } from './hooks/useCreateTriggerMutation';
3
5
  export { createTrigger, useCreateTriggerMutation } from './hooks/useCreateTriggerMutation';
4
6
  export type { DeleteFilterErrorResponse, DeleteFilterMutationPathParams, DeleteFilterMutationQueryParams, DeleteFilterOkResponse, DeleteFilterProps, } from './hooks/useDeleteFilterMutation';
@@ -43,6 +45,8 @@ export type { GetTriggerListForTargetErrorResponse, GetTriggerListForTargetOkRes
43
45
  export { getTriggerListForTarget, useGetTriggerListForTargetQuery, } from './hooks/useGetTriggerListForTargetQuery';
44
46
  export type { GetTriggerErrorResponse, GetTriggerOkResponse, GetTriggerProps, GetTriggerQueryPathParams, GetTriggerQueryQueryParams, } from './hooks/useGetTriggerQuery';
45
47
  export { getTrigger, useGetTriggerQuery } from './hooks/useGetTriggerQuery';
48
+ export type { HandleStageInterruptErrorResponse, HandleStageInterruptMutationPathParams, HandleStageInterruptMutationQueryParams, HandleStageInterruptOkResponse, HandleStageInterruptProps, } from './hooks/useHandleStageInterruptMutation';
49
+ export { handleStageInterrupt, useHandleStageInterruptMutation, } from './hooks/useHandleStageInterruptMutation';
46
50
  export type { PostFilterErrorResponse, PostFilterMutationQueryParams, PostFilterOkResponse, PostFilterProps, PostFilterRequestBody, } from './hooks/usePostFilterMutation';
47
51
  export { postFilter, usePostFilterMutation } from './hooks/usePostFilterMutation';
48
52
  export type { RetryHistoryErrorResponse, RetryHistoryOkResponse, RetryHistoryProps, RetryHistoryQueryPathParams, RetryHistoryQueryQueryParams, } from './hooks/useRetryHistoryQuery';
@@ -116,6 +120,7 @@ export type { PermissionCheck } from './schemas/PermissionCheck';
116
120
  export type { PipelineAnnotation } from './schemas/PipelineAnnotation';
117
121
  export type { PipelineAnnotationsResponseDto } from './schemas/PipelineAnnotationsResponseDto';
118
122
  export type { PipelineExecutionDetail } from './schemas/PipelineExecutionDetail';
123
+ export type { PipelineExecutionInterrupt } from './schemas/PipelineExecutionInterrupt';
119
124
  export type { PipelineExecutionNotes } from './schemas/PipelineExecutionNotes';
120
125
  export type { PipelineExecutionSummary } from './schemas/PipelineExecutionSummary';
121
126
  export type { PipelineFilterProperties } from './schemas/PipelineFilterProperties';
@@ -143,6 +148,7 @@ export type { ResponsePagePipelineExecutionSummary } from './schemas/ResponsePag
143
148
  export type { ResponsePagePmsPipelineSummaryResponse } from './schemas/ResponsePagePmsPipelineSummaryResponse';
144
149
  export type { ResponsePipelineAnnotationsResponseDto } from './schemas/ResponsePipelineAnnotationsResponseDto';
145
150
  export type { ResponsePipelineExecutionDetail } from './schemas/ResponsePipelineExecutionDetail';
151
+ export type { ResponsePipelineExecutionInterrupt } from './schemas/ResponsePipelineExecutionInterrupt';
146
152
  export type { ResponsePipelineExecutionNotes } from './schemas/ResponsePipelineExecutionNotes';
147
153
  export type { ResponsePmsPipelineListBranchesResponse } from './schemas/ResponsePmsPipelineListBranchesResponse';
148
154
  export type { ResponsePmsPipelineListRepoResponse } from './schemas/ResponsePmsPipelineListRepoResponse';
@@ -1,3 +1,4 @@
1
+ export { canRetryExecution, useCanRetryExecutionQuery } from './hooks/useCanRetryExecutionQuery';
1
2
  export { createTrigger, useCreateTriggerMutation } from './hooks/useCreateTriggerMutation';
2
3
  export { deleteFilter, useDeleteFilterMutation } from './hooks/useDeleteFilterMutation';
3
4
  export { deleteTrigger, useDeleteTriggerMutation } from './hooks/useDeleteTriggerMutation';
@@ -20,6 +21,7 @@ export { getTriggerCatalog, useGetTriggerCatalogQuery } from './hooks/useGetTrig
20
21
  export { getTriggerDetails, useGetTriggerDetailsQuery } from './hooks/useGetTriggerDetailsQuery';
21
22
  export { getTriggerListForTarget, useGetTriggerListForTargetQuery, } from './hooks/useGetTriggerListForTargetQuery';
22
23
  export { getTrigger, useGetTriggerQuery } from './hooks/useGetTriggerQuery';
24
+ export { handleStageInterrupt, useHandleStageInterruptMutation, } from './hooks/useHandleStageInterruptMutation';
23
25
  export { postFilter, usePostFilterMutation } from './hooks/usePostFilterMutation';
24
26
  export { retryHistory, useRetryHistoryQuery } from './hooks/useRetryHistoryQuery';
25
27
  export { triggerEventHistory, useTriggerEventHistoryQuery, } from './hooks/useTriggerEventHistoryQuery';
@@ -0,0 +1,5 @@
1
+ export interface PipelineExecutionInterrupt {
2
+ id?: string;
3
+ planExecutionId?: string;
4
+ type?: 'Abort' | 'AbortAll' | 'ExpireAll' | 'Ignore' | 'MarkAsFailure' | 'MarkAsSuccess' | 'Pause' | 'PipelineRollback' | 'Resume' | 'Retry' | 'StageRollback' | 'StepGroupRollback' | 'UserMarkedFailure';
5
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { PipelineExecutionInterrupt } from '../schemas/PipelineExecutionInterrupt';
2
+ export interface ResponsePipelineExecutionInterrupt {
3
+ correlationId?: string;
4
+ data?: PipelineExecutionInterrupt;
5
+ metaData?: {
6
+ [key: string]: any;
7
+ };
8
+ status?: 'ERROR' | 'FAILURE' | 'SUCCESS';
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-pipeline-swagger-service-client",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Harness React pipeline service client - Pipeline APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",