@harnessio/react-idp-service-client 0.91.0 → 0.93.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.
- package/dist/idp-service/src/services/hooks/useGetEntityAssociationsQuery.d.ts +33 -0
- package/dist/idp-service/src/services/hooks/useGetEntityAssociationsQuery.js +14 -0
- package/dist/idp-service/src/services/index.d.ts +2 -0
- package/dist/idp-service/src/services/index.js +1 -0
- package/dist/idp-service/src/services/schemas/ImportedEntityResponse.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { EntityResponseBodyListResponse } from '../responses/EntityResponseBodyListResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../custom-idp-fetcher/index.js';
|
|
5
|
+
export interface GetEntityAssociationsQueryPathParams {
|
|
6
|
+
kind: string;
|
|
7
|
+
identifier: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetEntityAssociationsQueryQueryParams {
|
|
10
|
+
relations?: string;
|
|
11
|
+
orgIdentifier?: string;
|
|
12
|
+
projectIdentifier?: string;
|
|
13
|
+
page?: number;
|
|
14
|
+
/**
|
|
15
|
+
* @default 10
|
|
16
|
+
*/
|
|
17
|
+
limit?: number;
|
|
18
|
+
sort?: string;
|
|
19
|
+
search_term?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface GetEntityAssociationsQueryHeaderParams {
|
|
22
|
+
'Harness-Account'?: string;
|
|
23
|
+
}
|
|
24
|
+
export type GetEntityAssociationsOkResponse = ResponseWithPagination<EntityResponseBodyListResponse>;
|
|
25
|
+
export type GetEntityAssociationsErrorResponse = unknown;
|
|
26
|
+
export interface GetEntityAssociationsProps extends GetEntityAssociationsQueryPathParams, Omit<FetcherOptions<GetEntityAssociationsQueryQueryParams, unknown, GetEntityAssociationsQueryHeaderParams>, 'url'> {
|
|
27
|
+
queryParams: GetEntityAssociationsQueryQueryParams;
|
|
28
|
+
}
|
|
29
|
+
export declare function getEntityAssociations(props: GetEntityAssociationsProps): Promise<GetEntityAssociationsOkResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Returns a paginated list of entities that are associated with the specified entity via the given relation types
|
|
32
|
+
*/
|
|
33
|
+
export declare function useGetEntityAssociationsQuery(props: GetEntityAssociationsProps, options?: Omit<UseQueryOptions<GetEntityAssociationsOkResponse, GetEntityAssociationsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetEntityAssociationsOkResponse, 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 getEntityAssociations(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/entities/${props.kind}/${props.identifier}/associations`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns a paginated list of entities that are associated with the specified entity via the given relation types
|
|
11
|
+
*/
|
|
12
|
+
export function useGetEntityAssociationsQuery(props, options) {
|
|
13
|
+
return useQuery(['get-entity-associations', props.kind, props.identifier, props.queryParams], ({ signal }) => getEntityAssociations(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -117,6 +117,8 @@ export type { GetEntitiesKindsErrorResponse, GetEntitiesKindsOkResponse, GetEnti
|
|
|
117
117
|
export { getEntitiesKinds, useGetEntitiesKindsQuery } from './hooks/useGetEntitiesKindsQuery';
|
|
118
118
|
export type { GetEntitiesErrorResponse, GetEntitiesOkResponse, GetEntitiesProps, GetEntitiesQueryQueryParams, } from './hooks/useGetEntitiesQuery';
|
|
119
119
|
export { getEntities, useGetEntitiesQuery } from './hooks/useGetEntitiesQuery';
|
|
120
|
+
export type { GetEntityAssociationsErrorResponse, GetEntityAssociationsOkResponse, GetEntityAssociationsProps, GetEntityAssociationsQueryPathParams, GetEntityAssociationsQueryQueryParams, } from './hooks/useGetEntityAssociationsQuery';
|
|
121
|
+
export { getEntityAssociations, useGetEntityAssociationsQuery, } from './hooks/useGetEntityAssociationsQuery';
|
|
120
122
|
export type { GetEntityFacetsErrorResponse, GetEntityFacetsOkResponse, GetEntityFacetsProps, GetEntityFacetsQueryQueryParams, } from './hooks/useGetEntityFacetsQuery';
|
|
121
123
|
export { getEntityFacets, useGetEntityFacetsQuery } from './hooks/useGetEntityFacetsQuery';
|
|
122
124
|
export type { GetEntityErrorResponse, GetEntityOkResponse, GetEntityProps, GetEntityQueryPathParams, GetEntityQueryQueryParams, } from './hooks/useGetEntityQuery';
|
|
@@ -57,6 +57,7 @@ export { getEntitiesFilters, useGetEntitiesFiltersQuery } from './hooks/useGetEn
|
|
|
57
57
|
export { getEntitiesGroups, useGetEntitiesGroupsQuery } from './hooks/useGetEntitiesGroupsQuery';
|
|
58
58
|
export { getEntitiesKinds, useGetEntitiesKindsQuery } from './hooks/useGetEntitiesKindsQuery';
|
|
59
59
|
export { getEntities, useGetEntitiesQuery } from './hooks/useGetEntitiesQuery';
|
|
60
|
+
export { getEntityAssociations, useGetEntityAssociationsQuery, } from './hooks/useGetEntityAssociationsQuery';
|
|
60
61
|
export { getEntityFacets, useGetEntityFacetsQuery } from './hooks/useGetEntityFacetsQuery';
|
|
61
62
|
export { getEntity, useGetEntityQuery } from './hooks/useGetEntityQuery';
|
|
62
63
|
export { getEntityRefs, useGetEntityRefsQuery } from './hooks/useGetEntityRefsQuery';
|
|
@@ -3,9 +3,9 @@ export interface ImportedEntityResponse {
|
|
|
3
3
|
entity?: EntityResponse;
|
|
4
4
|
raw_entity_details?: {
|
|
5
5
|
/**
|
|
6
|
-
* The action that was performed during import
|
|
6
|
+
* The action that was performed during import
|
|
7
7
|
*/
|
|
8
|
-
action_performed?:
|
|
8
|
+
action_performed?: 'MERGE' | 'REGISTER';
|
|
9
9
|
identifier?: string;
|
|
10
10
|
/**
|
|
11
11
|
* Timestamp (epoch millis) when the entity was imported
|