@harnessio/react-pipeline-swagger-service-client 1.5.1 → 1.5.2

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 { ResponsePagePmsPipelineSummaryResponse } from '../schemas/ResponsePagePmsPipelineSummaryResponse';
3
3
  import type { Failure } from '../schemas/Failure';
4
4
  import type { Error } from '../schemas/Error';
5
5
  import type { PipelineFilterProperties } from '../schemas/PipelineFilterProperties';
6
6
  import type { ResponseWithPagination } from '../helpers';
7
7
  import { FetcherOptions } from '../../../../fetcher/index.js';
8
- export interface GetPipelineListMutationQueryParams {
8
+ export interface GetPipelineListQueryQueryParams {
9
9
  accountIdentifier: string;
10
10
  orgIdentifier: string;
11
11
  projectIdentifier: string;
@@ -37,12 +37,12 @@ export interface GetPipelineListMutationQueryParams {
37
37
  export type GetPipelineListRequestBody = PipelineFilterProperties;
38
38
  export type GetPipelineListOkResponse = ResponseWithPagination<ResponsePagePmsPipelineSummaryResponse>;
39
39
  export type GetPipelineListErrorResponse = Failure | Error;
40
- export interface GetPipelineListProps extends Omit<FetcherOptions<GetPipelineListMutationQueryParams, GetPipelineListRequestBody>, 'url'> {
41
- queryParams: GetPipelineListMutationQueryParams;
40
+ export interface GetPipelineListProps extends Omit<FetcherOptions<GetPipelineListQueryQueryParams, GetPipelineListRequestBody>, 'url'> {
41
+ queryParams: GetPipelineListQueryQueryParams;
42
42
  body: GetPipelineListRequestBody;
43
43
  }
44
44
  export declare function getPipelineList(props: GetPipelineListProps): Promise<GetPipelineListOkResponse>;
45
45
  /**
46
46
  *
47
47
  */
48
- export declare function useGetPipelineListMutation(options?: Omit<UseMutationOptions<GetPipelineListOkResponse, GetPipelineListErrorResponse, GetPipelineListProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<GetPipelineListOkResponse, GetPipelineListErrorResponse, GetPipelineListProps, unknown>;
48
+ export declare function useGetPipelineListQuery(props: GetPipelineListProps, options?: Omit<UseQueryOptions<GetPipelineListOkResponse, GetPipelineListErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetPipelineListOkResponse, GetPipelineListErrorResponse>;
@@ -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 getPipelineList(props) {
7
7
  return fetcher(Object.assign({ url: `/pipelines/list`, method: 'POST' }, props));
@@ -9,6 +9,6 @@ export function getPipelineList(props) {
9
9
  /**
10
10
  *
11
11
  */
12
- export function useGetPipelineListMutation(options) {
13
- return useMutation((mutateProps) => getPipelineList(mutateProps), options);
12
+ export function useGetPipelineListQuery(props, options) {
13
+ return useQuery(['getPipelineList', props.queryParams, props.body], ({ signal }) => getPipelineList(Object.assign(Object.assign({}, props), { signal })), options);
14
14
  }
@@ -23,8 +23,8 @@ export type { GetListOfExecutionsErrorResponse, GetListOfExecutionsMutationQuery
23
23
  export { getListOfExecutions, useGetListOfExecutionsMutation, } from './hooks/useGetListOfExecutionsMutation';
24
24
  export type { GetNotesForExecutionErrorResponse, GetNotesForExecutionOkResponse, GetNotesForExecutionProps, GetNotesForExecutionQueryPathParams, GetNotesForExecutionQueryQueryParams, } from './hooks/useGetNotesForExecutionQuery';
25
25
  export { getNotesForExecution, useGetNotesForExecutionQuery, } from './hooks/useGetNotesForExecutionQuery';
26
- export type { GetPipelineListErrorResponse, GetPipelineListMutationQueryParams, GetPipelineListOkResponse, GetPipelineListProps, GetPipelineListRequestBody, } from './hooks/useGetPipelineListMutation';
27
- export { getPipelineList, useGetPipelineListMutation } from './hooks/useGetPipelineListMutation';
26
+ export type { GetPipelineListErrorResponse, GetPipelineListOkResponse, GetPipelineListProps, GetPipelineListQueryQueryParams, GetPipelineListRequestBody, } from './hooks/useGetPipelineListQuery';
27
+ export { getPipelineList, useGetPipelineListQuery } from './hooks/useGetPipelineListQuery';
28
28
  export type { GetPipelineSummaryErrorResponse, GetPipelineSummaryOkResponse, GetPipelineSummaryProps, GetPipelineSummaryQueryPathParams, GetPipelineSummaryQueryQueryParams, } from './hooks/useGetPipelineSummaryQuery';
29
29
  export { getPipelineSummary, useGetPipelineSummaryQuery } from './hooks/useGetPipelineSummaryQuery';
30
30
  export type { GetPolicyEvaluationErrorResponse, GetPolicyEvaluationOkResponse, GetPolicyEvaluationProps, GetPolicyEvaluationQueryPathParams, GetPolicyEvaluationQueryQueryParams, } from './hooks/useGetPolicyEvaluationQuery';
@@ -10,7 +10,7 @@ export { getFilter, useGetFilterQuery } from './hooks/useGetFilterQuery';
10
10
  export { getGitTriggerEventDetails, useGetGitTriggerEventDetailsQuery, } from './hooks/useGetGitTriggerEventDetailsQuery';
11
11
  export { getListOfExecutions, useGetListOfExecutionsMutation, } from './hooks/useGetListOfExecutionsMutation';
12
12
  export { getNotesForExecution, useGetNotesForExecutionQuery, } from './hooks/useGetNotesForExecutionQuery';
13
- export { getPipelineList, useGetPipelineListMutation } from './hooks/useGetPipelineListMutation';
13
+ export { getPipelineList, useGetPipelineListQuery } from './hooks/useGetPipelineListQuery';
14
14
  export { getPipelineSummary, useGetPipelineSummaryQuery } from './hooks/useGetPipelineSummaryQuery';
15
15
  export { getPolicyEvaluation, useGetPolicyEvaluationQuery, } from './hooks/useGetPolicyEvaluationQuery';
16
16
  export { getTriggerCatalog, useGetTriggerCatalogQuery } from './hooks/useGetTriggerCatalogQuery';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-pipeline-swagger-service-client",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Harness React pipeline service client - Pipeline APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",