@harnessio/react-pipeline-swagger-service-client 1.5.2 → 1.5.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.
@@ -1,11 +1,11 @@
1
- import { UseMutationOptions } from '@tanstack/react-query';
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { ResponsePagePipelineExecutionSummary } from '../schemas/ResponsePagePipelineExecutionSummary';
3
3
  import type { Failure } from '../schemas/Failure';
4
4
  import type { Error } from '../schemas/Error';
5
5
  import type { FilterPropertiesRequestBody } from '../requestBodies/FilterPropertiesRequestBody';
6
6
  import type { ResponseWithPagination } from '../helpers';
7
7
  import { FetcherOptions } from '../../../../fetcher/index.js';
8
- export interface GetListOfExecutionsMutationQueryParams {
8
+ export interface GetListOfExecutionsQueryQueryParams {
9
9
  accountIdentifier: string;
10
10
  orgIdentifier: string;
11
11
  projectIdentifier: string;
@@ -40,12 +40,12 @@ export interface GetListOfExecutionsMutationQueryParams {
40
40
  export type GetListOfExecutionsRequestBody = FilterPropertiesRequestBody;
41
41
  export type GetListOfExecutionsOkResponse = ResponseWithPagination<ResponsePagePipelineExecutionSummary>;
42
42
  export type GetListOfExecutionsErrorResponse = Failure | Error;
43
- export interface GetListOfExecutionsProps extends Omit<FetcherOptions<GetListOfExecutionsMutationQueryParams, GetListOfExecutionsRequestBody>, 'url'> {
44
- queryParams: GetListOfExecutionsMutationQueryParams;
43
+ export interface GetListOfExecutionsProps extends Omit<FetcherOptions<GetListOfExecutionsQueryQueryParams, GetListOfExecutionsRequestBody>, 'url'> {
44
+ queryParams: GetListOfExecutionsQueryQueryParams;
45
45
  body: GetListOfExecutionsRequestBody;
46
46
  }
47
47
  export declare function getListOfExecutions(props: GetListOfExecutionsProps): Promise<GetListOfExecutionsOkResponse>;
48
48
  /**
49
49
  *
50
50
  */
51
- export declare function useGetListOfExecutionsMutation(options?: Omit<UseMutationOptions<GetListOfExecutionsOkResponse, GetListOfExecutionsErrorResponse, GetListOfExecutionsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<GetListOfExecutionsOkResponse, GetListOfExecutionsErrorResponse, GetListOfExecutionsProps, unknown>;
51
+ export declare function useGetListOfExecutionsQuery(props: GetListOfExecutionsProps, options?: Omit<UseQueryOptions<GetListOfExecutionsOkResponse, GetListOfExecutionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetListOfExecutionsOkResponse, GetListOfExecutionsErrorResponse>;
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable */
2
2
  // This code is autogenerated using @harnessio/oats-cli.
3
3
  // Please do not modify this code directly.
4
- import { useMutation } from '@tanstack/react-query';
4
+ import { useQuery } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function getListOfExecutions(props) {
7
7
  return fetcher(Object.assign({ url: `/pipelines/execution/summary`, method: 'POST' }, props));
@@ -9,6 +9,6 @@ export function getListOfExecutions(props) {
9
9
  /**
10
10
  *
11
11
  */
12
- export function useGetListOfExecutionsMutation(options) {
13
- return useMutation((mutateProps) => getListOfExecutions(mutateProps), options);
12
+ export function useGetListOfExecutionsQuery(props, options) {
13
+ return useQuery(['getListOfExecutions', props.queryParams, props.body], ({ signal }) => getListOfExecutions(Object.assign(Object.assign({}, props), { signal })), options);
14
14
  }
@@ -19,8 +19,8 @@ export type { GetFilterErrorResponse, GetFilterOkResponse, GetFilterProps, GetFi
19
19
  export { getFilter, useGetFilterQuery } from './hooks/useGetFilterQuery';
20
20
  export type { GetGitTriggerEventDetailsErrorResponse, GetGitTriggerEventDetailsOkResponse, GetGitTriggerEventDetailsProps, } from './hooks/useGetGitTriggerEventDetailsQuery';
21
21
  export { getGitTriggerEventDetails, useGetGitTriggerEventDetailsQuery, } from './hooks/useGetGitTriggerEventDetailsQuery';
22
- export type { GetListOfExecutionsErrorResponse, GetListOfExecutionsMutationQueryParams, GetListOfExecutionsOkResponse, GetListOfExecutionsProps, GetListOfExecutionsRequestBody, } from './hooks/useGetListOfExecutionsMutation';
23
- export { getListOfExecutions, useGetListOfExecutionsMutation, } from './hooks/useGetListOfExecutionsMutation';
22
+ export type { GetListOfExecutionsErrorResponse, GetListOfExecutionsOkResponse, GetListOfExecutionsProps, GetListOfExecutionsQueryQueryParams, GetListOfExecutionsRequestBody, } from './hooks/useGetListOfExecutionsQuery';
23
+ export { getListOfExecutions, useGetListOfExecutionsQuery, } from './hooks/useGetListOfExecutionsQuery';
24
24
  export type { GetNotesForExecutionErrorResponse, GetNotesForExecutionOkResponse, GetNotesForExecutionProps, GetNotesForExecutionQueryPathParams, GetNotesForExecutionQueryQueryParams, } from './hooks/useGetNotesForExecutionQuery';
25
25
  export { getNotesForExecution, useGetNotesForExecutionQuery, } from './hooks/useGetNotesForExecutionQuery';
26
26
  export type { GetPipelineListErrorResponse, GetPipelineListOkResponse, GetPipelineListProps, GetPipelineListQueryQueryParams, GetPipelineListRequestBody, } from './hooks/useGetPipelineListQuery';
@@ -8,7 +8,7 @@ export { getExecutionRepositoriesList, useGetExecutionRepositoriesListQuery, } f
8
8
  export { getFilterList, useGetFilterListQuery } from './hooks/useGetFilterListQuery';
9
9
  export { getFilter, useGetFilterQuery } from './hooks/useGetFilterQuery';
10
10
  export { getGitTriggerEventDetails, useGetGitTriggerEventDetailsQuery, } from './hooks/useGetGitTriggerEventDetailsQuery';
11
- export { getListOfExecutions, useGetListOfExecutionsMutation, } from './hooks/useGetListOfExecutionsMutation';
11
+ export { getListOfExecutions, useGetListOfExecutionsQuery, } from './hooks/useGetListOfExecutionsQuery';
12
12
  export { getNotesForExecution, useGetNotesForExecutionQuery, } from './hooks/useGetNotesForExecutionQuery';
13
13
  export { getPipelineList, useGetPipelineListQuery } from './hooks/useGetPipelineListQuery';
14
14
  export { getPipelineSummary, useGetPipelineSummaryQuery } from './hooks/useGetPipelineSummaryQuery';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-pipeline-swagger-service-client",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Harness React pipeline service client - Pipeline APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",