@harnessio/react-sei-panorama-service-client 0.10.14 → 0.10.15

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,20 +1,20 @@
1
- import { UseMutationOptions } from '@tanstack/react-query';
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { PrVelocityResponseDto } from '../schemas/PrVelocityResponseDto';
3
3
  import type { ProductivityControllerRequest } from '../schemas/ProductivityControllerRequest';
4
4
  import type { ResponseWithPagination } from '../helpers';
5
5
  import { FetcherOptions } from '../../../../fetcher/index.js';
6
- export interface ProductivityControllerPrVelocityMutationQueryParams {
6
+ export interface ProductivityControllerPrVelocityQueryQueryParams {
7
7
  account: string;
8
8
  }
9
9
  export type ProductivityControllerPrVelocityRequestBody = ProductivityControllerRequest;
10
10
  export type ProductivityControllerPrVelocityOkResponse = ResponseWithPagination<PrVelocityResponseDto>;
11
11
  export type ProductivityControllerPrVelocityErrorResponse = string;
12
- export interface ProductivityControllerPrVelocityProps extends Omit<FetcherOptions<ProductivityControllerPrVelocityMutationQueryParams, ProductivityControllerPrVelocityRequestBody>, 'url'> {
13
- queryParams: ProductivityControllerPrVelocityMutationQueryParams;
12
+ export interface ProductivityControllerPrVelocityProps extends Omit<FetcherOptions<ProductivityControllerPrVelocityQueryQueryParams, ProductivityControllerPrVelocityRequestBody>, 'url'> {
13
+ queryParams: ProductivityControllerPrVelocityQueryQueryParams;
14
14
  body: ProductivityControllerPrVelocityRequestBody;
15
15
  }
16
16
  export declare function productivityControllerPrVelocity(props: ProductivityControllerPrVelocityProps): Promise<ProductivityControllerPrVelocityOkResponse>;
17
17
  /**
18
18
  * Get PR Velocity for a collection
19
19
  */
20
- export declare function useProductivityControllerPrVelocityMutation(options?: Omit<UseMutationOptions<ProductivityControllerPrVelocityOkResponse, ProductivityControllerPrVelocityErrorResponse, ProductivityControllerPrVelocityProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ProductivityControllerPrVelocityOkResponse, string, ProductivityControllerPrVelocityProps, unknown>;
20
+ export declare function useProductivityControllerPrVelocityQuery(props: ProductivityControllerPrVelocityProps, options?: Omit<UseQueryOptions<ProductivityControllerPrVelocityOkResponse, ProductivityControllerPrVelocityErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ProductivityControllerPrVelocityOkResponse, string>;
@@ -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 productivityControllerPrVelocity(props) {
7
7
  return fetcher(Object.assign({ url: `/v2/productivity/volume/pr_velocity`, method: 'POST' }, props));
@@ -9,6 +9,6 @@ export function productivityControllerPrVelocity(props) {
9
9
  /**
10
10
  * Get PR Velocity for a collection
11
11
  */
12
- export function useProductivityControllerPrVelocityMutation(options) {
13
- return useMutation((mutateProps) => productivityControllerPrVelocity(mutateProps), options);
12
+ export function useProductivityControllerPrVelocityQuery(props, options) {
13
+ return useQuery(['ProductivityControllerPrVelocity', props.queryParams, props.body], ({ signal }) => productivityControllerPrVelocity(Object.assign(Object.assign({}, props), { signal })), options);
14
14
  }
@@ -43,8 +43,8 @@ export type { JiraIssuesControllerGetJiraIssueCountErrorResponse, JiraIssuesCont
43
43
  export { jiraIssuesControllerGetJiraIssueCount, useJiraIssuesControllerGetJiraIssueCountQuery, } from './hooks/useJiraIssuesControllerGetJiraIssueCountQuery';
44
44
  export type { LegacyHealthControllerCheckErrorResponse, LegacyHealthControllerCheckOkResponse, LegacyHealthControllerCheckProps, } from './hooks/useLegacyHealthControllerCheckQuery';
45
45
  export { legacyHealthControllerCheck, useLegacyHealthControllerCheckQuery, } from './hooks/useLegacyHealthControllerCheckQuery';
46
- export type { ProductivityControllerPrVelocityErrorResponse, ProductivityControllerPrVelocityMutationQueryParams, ProductivityControllerPrVelocityOkResponse, ProductivityControllerPrVelocityProps, ProductivityControllerPrVelocityRequestBody, } from './hooks/useProductivityControllerPrVelocityMutation';
47
- export { productivityControllerPrVelocity, useProductivityControllerPrVelocityMutation, } from './hooks/useProductivityControllerPrVelocityMutation';
46
+ export type { ProductivityControllerPrVelocityErrorResponse, ProductivityControllerPrVelocityOkResponse, ProductivityControllerPrVelocityProps, ProductivityControllerPrVelocityQueryQueryParams, ProductivityControllerPrVelocityRequestBody, } from './hooks/useProductivityControllerPrVelocityQuery';
47
+ export { productivityControllerPrVelocity, useProductivityControllerPrVelocityQuery, } from './hooks/useProductivityControllerPrVelocityQuery';
48
48
  export type { Category } from './schemas/Category';
49
49
  export type { CollectionEnriched } from './schemas/CollectionEnriched';
50
50
  export type { CollectionFilter } from './schemas/CollectionFilter';
@@ -20,4 +20,4 @@ export { doraControllerMttrBreakdown, useDoraControllerMttrBreakdownQuery, } fro
20
20
  export { doraControllerSummary, useDoraControllerSummaryQuery, } from './hooks/useDoraControllerSummaryQuery';
21
21
  export { jiraIssuesControllerGetJiraIssueCount, useJiraIssuesControllerGetJiraIssueCountQuery, } from './hooks/useJiraIssuesControllerGetJiraIssueCountQuery';
22
22
  export { legacyHealthControllerCheck, useLegacyHealthControllerCheckQuery, } from './hooks/useLegacyHealthControllerCheckQuery';
23
- export { productivityControllerPrVelocity, useProductivityControllerPrVelocityMutation, } from './hooks/useProductivityControllerPrVelocityMutation';
23
+ export { productivityControllerPrVelocity, useProductivityControllerPrVelocityQuery, } from './hooks/useProductivityControllerPrVelocityQuery';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-sei-panorama-service-client",
3
- "version": "0.10.14",
3
+ "version": "0.10.15",
4
4
  "description": "Harness React sei panorama service client - SEI Panorama APIs integrated with react hooks for Panorama project",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",