@harnessio/react-idp-service-client 0.99.1 → 0.100.0
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.
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
3
|
+
import { FetcherOptions } from '../../../../custom-idp-fetcher/index.js';
|
|
4
|
+
export interface GetEntityContentQueryPathParams {
|
|
5
|
+
scope: string;
|
|
6
|
+
kind: string;
|
|
7
|
+
identifier: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetEntityContentQueryQueryParams {
|
|
10
|
+
orgIdentifier?: string;
|
|
11
|
+
projectIdentifier?: string;
|
|
12
|
+
path: string;
|
|
13
|
+
}
|
|
14
|
+
export interface GetEntityContentQueryHeaderParams {
|
|
15
|
+
'Harness-Account'?: string;
|
|
16
|
+
}
|
|
17
|
+
export type GetEntityContentOkResponse = ResponseWithPagination<unknown>;
|
|
18
|
+
export type GetEntityContentErrorResponse = unknown;
|
|
19
|
+
export interface GetEntityContentProps extends GetEntityContentQueryPathParams, Omit<FetcherOptions<GetEntityContentQueryQueryParams, unknown, GetEntityContentQueryHeaderParams>, 'url'> {
|
|
20
|
+
queryParams: GetEntityContentQueryQueryParams;
|
|
21
|
+
}
|
|
22
|
+
export declare function getEntityContent(props: GetEntityContentProps): Promise<GetEntityContentOkResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Get file content associated with a catalog entity from GCS.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useGetEntityContentQuery(props: GetEntityContentProps, options?: Omit<UseQueryOptions<GetEntityContentOkResponse, GetEntityContentErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetEntityContentOkResponse, 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 '../../../../custom-idp-fetcher/index.js';
|
|
6
|
+
export function getEntityContent(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/entities/${props.scope}/${props.kind}/${props.identifier}/content`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get file content associated with a catalog entity from GCS.
|
|
11
|
+
*/
|
|
12
|
+
export function useGetEntityContentQuery(props, options) {
|
|
13
|
+
return useQuery(['get-entity-content', props.scope, props.kind, props.identifier, props.queryParams], ({ signal }) => getEntityContent(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -127,6 +127,8 @@ export type { GetEntitiesErrorResponse, GetEntitiesOkResponse, GetEntitiesProps,
|
|
|
127
127
|
export { getEntities, useGetEntitiesQuery } from './hooks/useGetEntitiesQuery';
|
|
128
128
|
export type { GetEntityAssociationsErrorResponse, GetEntityAssociationsOkResponse, GetEntityAssociationsProps, GetEntityAssociationsQueryPathParams, GetEntityAssociationsQueryQueryParams, } from './hooks/useGetEntityAssociationsQuery';
|
|
129
129
|
export { getEntityAssociations, useGetEntityAssociationsQuery, } from './hooks/useGetEntityAssociationsQuery';
|
|
130
|
+
export type { GetEntityContentErrorResponse, GetEntityContentOkResponse, GetEntityContentProps, GetEntityContentQueryPathParams, GetEntityContentQueryQueryParams, } from './hooks/useGetEntityContentQuery';
|
|
131
|
+
export { getEntityContent, useGetEntityContentQuery } from './hooks/useGetEntityContentQuery';
|
|
130
132
|
export type { GetEntityFacetsErrorResponse, GetEntityFacetsOkResponse, GetEntityFacetsProps, GetEntityFacetsQueryQueryParams, } from './hooks/useGetEntityFacetsQuery';
|
|
131
133
|
export { getEntityFacets, useGetEntityFacetsQuery } from './hooks/useGetEntityFacetsQuery';
|
|
132
134
|
export type { GetEntityErrorResponse, GetEntityOkResponse, GetEntityProps, GetEntityQueryPathParams, GetEntityQueryQueryParams, } from './hooks/useGetEntityQuery';
|
|
@@ -62,6 +62,7 @@ export { getEntitiesGroups, useGetEntitiesGroupsQuery } from './hooks/useGetEnti
|
|
|
62
62
|
export { getEntitiesKinds, useGetEntitiesKindsQuery } from './hooks/useGetEntitiesKindsQuery';
|
|
63
63
|
export { getEntities, useGetEntitiesQuery } from './hooks/useGetEntitiesQuery';
|
|
64
64
|
export { getEntityAssociations, useGetEntityAssociationsQuery, } from './hooks/useGetEntityAssociationsQuery';
|
|
65
|
+
export { getEntityContent, useGetEntityContentQuery } from './hooks/useGetEntityContentQuery';
|
|
65
66
|
export { getEntityFacets, useGetEntityFacetsQuery } from './hooks/useGetEntityFacetsQuery';
|
|
66
67
|
export { getEntity, useGetEntityQuery } from './hooks/useGetEntityQuery';
|
|
67
68
|
export { getEntityRefs, useGetEntityRefsQuery } from './hooks/useGetEntityRefsQuery';
|