@harnessio/react-idp-service-client 0.49.6 → 0.49.8
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.
- package/dist/idp-service/src/services/hooks/{useCdEntitiesFetchMutation.d.ts → useCdEntitiesFetchQuery.d.ts} +6 -6
- package/dist/idp-service/src/services/hooks/{useCdEntitiesFetchMutation.js → useCdEntitiesFetchQuery.js} +3 -3
- package/dist/idp-service/src/services/hooks/useGetAllLayoutsV2Query.d.ts +16 -0
- package/dist/idp-service/src/services/hooks/useGetAllLayoutsV2Query.js +14 -0
- package/dist/idp-service/src/services/index.d.ts +4 -2
- package/dist/idp-service/src/services/index.js +2 -1
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { OnboardingCdEntitiesFetchResponseResponse } from '../responses/OnboardingCdEntitiesFetchResponseResponse';
|
|
3
3
|
import type { OnboardingCdEntitiesFetchRequestRequestBody } from '../requestBodies/OnboardingCdEntitiesFetchRequestRequestBody';
|
|
4
4
|
import type { ResponseWithPagination } from '../helpers';
|
|
5
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
-
export interface
|
|
6
|
+
export interface CdEntitiesFetchQueryQueryParams {
|
|
7
7
|
page?: number;
|
|
8
8
|
limit?: number;
|
|
9
9
|
search_term?: string;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface CdEntitiesFetchQueryHeaderParams {
|
|
12
12
|
'Harness-Account'?: string;
|
|
13
13
|
}
|
|
14
14
|
export type CdEntitiesFetchRequestBody = OnboardingCdEntitiesFetchRequestRequestBody;
|
|
15
15
|
export type CdEntitiesFetchOkResponse = ResponseWithPagination<OnboardingCdEntitiesFetchResponseResponse>;
|
|
16
16
|
export type CdEntitiesFetchErrorResponse = unknown;
|
|
17
|
-
export interface CdEntitiesFetchProps extends Omit<FetcherOptions<
|
|
18
|
-
queryParams:
|
|
17
|
+
export interface CdEntitiesFetchProps extends Omit<FetcherOptions<CdEntitiesFetchQueryQueryParams, CdEntitiesFetchRequestBody, CdEntitiesFetchQueryHeaderParams>, 'url'> {
|
|
18
|
+
queryParams: CdEntitiesFetchQueryQueryParams;
|
|
19
19
|
body: CdEntitiesFetchRequestBody;
|
|
20
20
|
}
|
|
21
21
|
export declare function cdEntitiesFetch(props: CdEntitiesFetchProps): Promise<CdEntitiesFetchOkResponse>;
|
|
22
22
|
/**
|
|
23
23
|
* Fetch CD entities as IDP entities for import
|
|
24
24
|
*/
|
|
25
|
-
export declare function
|
|
25
|
+
export declare function useCdEntitiesFetchQuery(props: CdEntitiesFetchProps, options?: Omit<UseQueryOptions<CdEntitiesFetchOkResponse, CdEntitiesFetchErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<CdEntitiesFetchOkResponse, unknown>;
|
|
@@ -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 {
|
|
4
|
+
import { useQuery } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function cdEntitiesFetch(props) {
|
|
7
7
|
return fetcher(Object.assign({ url: `/v2/onboarding/cd-entities-fetch`, method: 'POST' }, props));
|
|
@@ -9,6 +9,6 @@ export function cdEntitiesFetch(props) {
|
|
|
9
9
|
/**
|
|
10
10
|
* Fetch CD entities as IDP entities for import
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
13
|
-
return
|
|
12
|
+
export function useCdEntitiesFetchQuery(props, options) {
|
|
13
|
+
return useQuery(['cd-entities-fetch', props.queryParams, props.body], ({ signal }) => cdEntitiesFetch(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
14
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { LayoutResponseResponse } from '../responses/LayoutResponseResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetAllLayoutsV2QueryHeaderParams {
|
|
6
|
+
'Harness-Account'?: string;
|
|
7
|
+
}
|
|
8
|
+
export type GetAllLayoutsV2OkResponse = ResponseWithPagination<LayoutResponseResponse>;
|
|
9
|
+
export type GetAllLayoutsV2ErrorResponse = unknown;
|
|
10
|
+
export interface GetAllLayoutsV2Props extends Omit<FetcherOptions<unknown, unknown, GetAllLayoutsV2QueryHeaderParams>, 'url'> {
|
|
11
|
+
}
|
|
12
|
+
export declare function getAllLayoutsV2(props: GetAllLayoutsV2Props): Promise<GetAllLayoutsV2OkResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* List Layouts v2
|
|
15
|
+
*/
|
|
16
|
+
export declare function useGetAllLayoutsV2Query(props: GetAllLayoutsV2Props, options?: Omit<UseQueryOptions<GetAllLayoutsV2OkResponse, GetAllLayoutsV2ErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAllLayoutsV2OkResponse, 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 { useQuery } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function getAllLayoutsV2(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v2/layout`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List Layouts v2
|
|
11
|
+
*/
|
|
12
|
+
export function useGetAllLayoutsV2Query(props, options) {
|
|
13
|
+
return useQuery(['get-all-layouts-v2'], ({ signal }) => getAllLayoutsV2(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type { GetPathParamsType, ResponseWithPagination } from './helpers';
|
|
2
2
|
export type { CdEntitiesCountErrorResponse, CdEntitiesCountOkResponse, CdEntitiesCountProps, } from './hooks/useCdEntitiesCountQuery';
|
|
3
3
|
export { cdEntitiesCount, useCdEntitiesCountQuery } from './hooks/useCdEntitiesCountQuery';
|
|
4
|
-
export type { CdEntitiesFetchErrorResponse,
|
|
5
|
-
export { cdEntitiesFetch,
|
|
4
|
+
export type { CdEntitiesFetchErrorResponse, CdEntitiesFetchOkResponse, CdEntitiesFetchProps, CdEntitiesFetchQueryQueryParams, CdEntitiesFetchRequestBody, } from './hooks/useCdEntitiesFetchQuery';
|
|
5
|
+
export { cdEntitiesFetch, useCdEntitiesFetchQuery } from './hooks/useCdEntitiesFetchQuery';
|
|
6
6
|
export type { CreateBackstageEnvVariablesErrorResponse, CreateBackstageEnvVariablesOkResponse, CreateBackstageEnvVariablesProps, CreateBackstageEnvVariablesRequestBody, } from './hooks/useCreateBackstageEnvVariablesMutation';
|
|
7
7
|
export { createBackstageEnvVariables, useCreateBackstageEnvVariablesMutation, } from './hooks/useCreateBackstageEnvVariablesMutation';
|
|
8
8
|
export type { CreateBackstagePermissionsErrorResponse, CreateBackstagePermissionsOkResponse, CreateBackstagePermissionsProps, CreateBackstagePermissionsRequestBody, } from './hooks/useCreateBackstagePermissionsMutation';
|
|
@@ -27,6 +27,8 @@ export type { GetAllDatasourcesForAccountErrorResponse, GetAllDatasourcesForAcco
|
|
|
27
27
|
export { getAllDatasourcesForAccount, useGetAllDatasourcesForAccountQuery, } from './hooks/useGetAllDatasourcesForAccountQuery';
|
|
28
28
|
export type { GetAllLayoutsErrorResponse, GetAllLayoutsOkResponse, GetAllLayoutsProps, } from './hooks/useGetAllLayoutsQuery';
|
|
29
29
|
export { getAllLayouts, useGetAllLayoutsQuery } from './hooks/useGetAllLayoutsQuery';
|
|
30
|
+
export type { GetAllLayoutsV2ErrorResponse, GetAllLayoutsV2OkResponse, GetAllLayoutsV2Props, } from './hooks/useGetAllLayoutsV2Query';
|
|
31
|
+
export { getAllLayoutsV2, useGetAllLayoutsV2Query } from './hooks/useGetAllLayoutsV2Query';
|
|
30
32
|
export type { GetAllowListErrorResponse, GetAllowListOkResponse, GetAllowListProps, } from './hooks/useGetAllowListQuery';
|
|
31
33
|
export { getAllowList, useGetAllowListQuery } from './hooks/useGetAllowListQuery';
|
|
32
34
|
export type { GetAuthInfoAuthIdErrorResponse, GetAuthInfoAuthIdOkResponse, GetAuthInfoAuthIdProps, GetAuthInfoAuthIdQueryPathParams, } from './hooks/useGetAuthInfoAuthIdQuery';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { cdEntitiesCount, useCdEntitiesCountQuery } from './hooks/useCdEntitiesCountQuery';
|
|
2
|
-
export { cdEntitiesFetch,
|
|
2
|
+
export { cdEntitiesFetch, useCdEntitiesFetchQuery } from './hooks/useCdEntitiesFetchQuery';
|
|
3
3
|
export { createBackstageEnvVariables, useCreateBackstageEnvVariablesMutation, } from './hooks/useCreateBackstageEnvVariablesMutation';
|
|
4
4
|
export { createBackstagePermissions, useCreateBackstagePermissionsMutation, } from './hooks/useCreateBackstagePermissionsMutation';
|
|
5
5
|
export { createCheck, useCreateCheckMutation } from './hooks/useCreateCheckMutation';
|
|
@@ -12,6 +12,7 @@ export { deleteScorecard, useDeleteScorecardMutation } from './hooks/useDeleteSc
|
|
|
12
12
|
export { generateYamlDef, useGenerateYamlDefMutation } from './hooks/useGenerateYamlDefMutation';
|
|
13
13
|
export { getAllDatasourcesForAccount, useGetAllDatasourcesForAccountQuery, } from './hooks/useGetAllDatasourcesForAccountQuery';
|
|
14
14
|
export { getAllLayouts, useGetAllLayoutsQuery } from './hooks/useGetAllLayoutsQuery';
|
|
15
|
+
export { getAllLayoutsV2, useGetAllLayoutsV2Query } from './hooks/useGetAllLayoutsV2Query';
|
|
15
16
|
export { getAllowList, useGetAllowListQuery } from './hooks/useGetAllowListQuery';
|
|
16
17
|
export { getAuthInfoAuthId, useGetAuthInfoAuthIdQuery } from './hooks/useGetAuthInfoAuthIdQuery';
|
|
17
18
|
export { getBackstagePermissions, useGetBackstagePermissionsQuery, } from './hooks/useGetBackstagePermissionsQuery';
|