@harnessio/react-pipeline-swagger-service-client 1.5.1 → 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
  }
@@ -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
  }
@@ -19,12 +19,12 @@ 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
- 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';
@@ -8,9 +8,9 @@ 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
- 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.3",
4
4
  "description": "Harness React pipeline service client - Pipeline APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",