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

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 { ResponseExecutionGraph } from '../schemas/ResponseExecutionGraph';
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 GetExecutionGraphQueryPathParams {
8
+ planExecutionId: string;
9
+ }
10
+ export interface GetExecutionGraphQueryQueryParams {
11
+ accountIdentifier: string;
12
+ orgIdentifier: string;
13
+ projectIdentifier: string;
14
+ }
15
+ export type GetExecutionGraphOkResponse = ResponseWithPagination<ResponseExecutionGraph>;
16
+ export type GetExecutionGraphErrorResponse = Failure | Error;
17
+ export interface GetExecutionGraphProps extends GetExecutionGraphQueryPathParams, Omit<FetcherOptions<GetExecutionGraphQueryQueryParams, unknown>, 'url'> {
18
+ queryParams: GetExecutionGraphQueryQueryParams;
19
+ }
20
+ export declare function getExecutionGraph(props: GetExecutionGraphProps): Promise<GetExecutionGraphOkResponse>;
21
+ /**
22
+ *
23
+ */
24
+ export declare function useGetExecutionGraphQuery(props: GetExecutionGraphProps, options?: Omit<UseQueryOptions<GetExecutionGraphOkResponse, GetExecutionGraphErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetExecutionGraphOkResponse, GetExecutionGraphErrorResponse>;
@@ -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 getExecutionGraph(props) {
7
+ return fetcher(Object.assign({ url: `/pipelines/execution/getExecutionGraph/${props.planExecutionId}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ *
11
+ */
12
+ export function useGetExecutionGraphQuery(props, options) {
13
+ return useQuery(['getExecutionGraph', props.planExecutionId, props.queryParams], ({ signal }) => getExecutionGraph(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 HandleManualInterventionInterruptMutationPathParams {
9
+ planExecutionId: string;
10
+ nodeExecutionId: string;
11
+ }
12
+ export interface HandleManualInterventionInterruptMutationQueryParams {
13
+ accountIdentifier: string;
14
+ orgIdentifier: string;
15
+ projectIdentifier: string;
16
+ interruptType: 'Abort' | 'AbortAll' | 'ExpireAll' | 'Ignore' | 'MarkAsFailure' | 'MarkAsSuccess' | 'Pause' | 'PipelineRollback' | 'Resume' | 'Retry' | 'StageRollback' | 'StepGroupRollback' | 'UserMarkedFailure';
17
+ }
18
+ export type HandleManualInterventionInterruptOkResponse = ResponseWithPagination<ResponsePipelineExecutionInterrupt>;
19
+ export type HandleManualInterventionInterruptErrorResponse = Failure | AccessControlCheckError | Error;
20
+ export interface HandleManualInterventionInterruptProps extends HandleManualInterventionInterruptMutationPathParams, Omit<FetcherOptions<HandleManualInterventionInterruptMutationQueryParams, unknown>, 'url'> {
21
+ queryParams: HandleManualInterventionInterruptMutationQueryParams;
22
+ }
23
+ export declare function handleManualInterventionInterrupt(props: HandleManualInterventionInterruptProps): Promise<HandleManualInterventionInterruptOkResponse>;
24
+ /**
25
+ *
26
+ */
27
+ export declare function useHandleManualInterventionInterruptMutation(options?: Omit<UseMutationOptions<HandleManualInterventionInterruptOkResponse, HandleManualInterventionInterruptErrorResponse, HandleManualInterventionInterruptProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<HandleManualInterventionInterruptOkResponse, HandleManualInterventionInterruptErrorResponse, HandleManualInterventionInterruptProps, 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 handleManualInterventionInterrupt(props) {
7
+ return fetcher(Object.assign({ url: `/pipeline/execute/manualIntervention/interrupt/${props.planExecutionId}/${props.nodeExecutionId}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ *
11
+ */
12
+ export function useHandleManualInterventionInterruptMutation(options) {
13
+ return useMutation((mutateProps) => handleManualInterventionInterrupt(mutateProps), options);
14
+ }
@@ -23,6 +23,8 @@ export type { GetExecutionDataErrorResponse, GetExecutionDataOkResponse, GetExec
23
23
  export { getExecutionData, useGetExecutionDataQuery } from './hooks/useGetExecutionDataQuery';
24
24
  export type { GetExecutionDetailV2ErrorResponse, GetExecutionDetailV2OkResponse, GetExecutionDetailV2Props, GetExecutionDetailV2QueryPathParams, GetExecutionDetailV2QueryQueryParams, } from './hooks/useGetExecutionDetailV2Query';
25
25
  export { getExecutionDetailV2, useGetExecutionDetailV2Query, } from './hooks/useGetExecutionDetailV2Query';
26
+ export type { GetExecutionGraphErrorResponse, GetExecutionGraphOkResponse, GetExecutionGraphProps, GetExecutionGraphQueryPathParams, GetExecutionGraphQueryQueryParams, } from './hooks/useGetExecutionGraphQuery';
27
+ export { getExecutionGraph, useGetExecutionGraphQuery } from './hooks/useGetExecutionGraphQuery';
26
28
  export type { GetExecutionRepositoriesListErrorResponse, GetExecutionRepositoriesListOkResponse, GetExecutionRepositoriesListProps, GetExecutionRepositoriesListQueryQueryParams, } from './hooks/useGetExecutionRepositoriesListQuery';
27
29
  export { getExecutionRepositoriesList, useGetExecutionRepositoriesListQuery, } from './hooks/useGetExecutionRepositoriesListQuery';
28
30
  export type { GetFilterListErrorResponse, GetFilterListOkResponse, GetFilterListProps, GetFilterListQueryQueryParams, } from './hooks/useGetFilterListQuery';
@@ -57,6 +59,8 @@ export type { GetTriggerErrorResponse, GetTriggerOkResponse, GetTriggerProps, Ge
57
59
  export { getTrigger, useGetTriggerQuery } from './hooks/useGetTriggerQuery';
58
60
  export type { HandleInterruptErrorResponse, HandleInterruptMutationPathParams, HandleInterruptMutationQueryParams, HandleInterruptOkResponse, HandleInterruptProps, } from './hooks/useHandleInterruptMutation';
59
61
  export { handleInterrupt, useHandleInterruptMutation } from './hooks/useHandleInterruptMutation';
62
+ export type { HandleManualInterventionInterruptErrorResponse, HandleManualInterventionInterruptMutationPathParams, HandleManualInterventionInterruptMutationQueryParams, HandleManualInterventionInterruptOkResponse, HandleManualInterventionInterruptProps, } from './hooks/useHandleManualInterventionInterruptMutation';
63
+ export { handleManualInterventionInterrupt, useHandleManualInterventionInterruptMutation, } from './hooks/useHandleManualInterventionInterruptMutation';
60
64
  export type { HandleStageInterruptErrorResponse, HandleStageInterruptMutationPathParams, HandleStageInterruptMutationQueryParams, HandleStageInterruptOkResponse, HandleStageInterruptProps, } from './hooks/useHandleStageInterruptMutation';
61
65
  export { handleStageInterrupt, useHandleStageInterruptMutation, } from './hooks/useHandleStageInterruptMutation';
62
66
  export type { PostFilterErrorResponse, PostFilterMutationQueryParams, PostFilterOkResponse, PostFilterProps, PostFilterRequestBody, } from './hooks/usePostFilterMutation';
@@ -156,6 +160,7 @@ export type { ResourceScope } from './schemas/ResourceScope';
156
160
  export type { ResponseAnnotationContentResponseDto } from './schemas/ResponseAnnotationContentResponseDto';
157
161
  export type { ResponseBoolean } from './schemas/ResponseBoolean';
158
162
  export type { ResponseExecutionDataResponse } from './schemas/ResponseExecutionDataResponse';
163
+ export type { ResponseExecutionGraph } from './schemas/ResponseExecutionGraph';
159
164
  export type { ResponseFilterDto } from './schemas/ResponseFilterDto';
160
165
  export type { ResponseInputSetResponse } from './schemas/ResponseInputSetResponse';
161
166
  export type { ResponseMapStringMapStringListString } from './schemas/ResponseMapStringMapStringListString';
@@ -10,6 +10,7 @@ export { getBatchInputSetsMetadata, useGetBatchInputSetsMetadataMutation, } from
10
10
  export { getExecutionBranchesList, useGetExecutionBranchesListQuery, } from './hooks/useGetExecutionBranchesListQuery';
11
11
  export { getExecutionData, useGetExecutionDataQuery } from './hooks/useGetExecutionDataQuery';
12
12
  export { getExecutionDetailV2, useGetExecutionDetailV2Query, } from './hooks/useGetExecutionDetailV2Query';
13
+ export { getExecutionGraph, useGetExecutionGraphQuery } from './hooks/useGetExecutionGraphQuery';
13
14
  export { getExecutionRepositoriesList, useGetExecutionRepositoriesListQuery, } from './hooks/useGetExecutionRepositoriesListQuery';
14
15
  export { getFilterList, useGetFilterListQuery } from './hooks/useGetFilterListQuery';
15
16
  export { getFilter, useGetFilterQuery } from './hooks/useGetFilterQuery';
@@ -27,6 +28,7 @@ export { getTriggerDetails, useGetTriggerDetailsQuery } from './hooks/useGetTrig
27
28
  export { getTriggerListForTarget, useGetTriggerListForTargetQuery, } from './hooks/useGetTriggerListForTargetQuery';
28
29
  export { getTrigger, useGetTriggerQuery } from './hooks/useGetTriggerQuery';
29
30
  export { handleInterrupt, useHandleInterruptMutation } from './hooks/useHandleInterruptMutation';
31
+ export { handleManualInterventionInterrupt, useHandleManualInterventionInterruptMutation, } from './hooks/useHandleManualInterventionInterruptMutation';
30
32
  export { handleStageInterrupt, useHandleStageInterruptMutation, } from './hooks/useHandleStageInterruptMutation';
31
33
  export { postFilter, usePostFilterMutation } from './hooks/usePostFilterMutation';
32
34
  export { retryHistory, useRetryHistoryQuery } from './hooks/useRetryHistoryQuery';
@@ -0,0 +1,9 @@
1
+ import type { ExecutionGraph } from '../schemas/ExecutionGraph';
2
+ export interface ResponseExecutionGraph {
3
+ correlationId?: string;
4
+ data?: ExecutionGraph;
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.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "Harness React pipeline service client - Pipeline APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",