@harnessio/react-idp-service-client 0.90.0 → 0.90.1

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,28 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ImportedEntitiesResponseListResponse } from '../responses/ImportedEntitiesResponseListResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../custom-idp-fetcher/index.js';
5
+ export interface GetImportedEntitiesQueryPathParams {
6
+ 'integration-id': string;
7
+ }
8
+ export interface GetImportedEntitiesQueryQueryParams {
9
+ org_id?: string;
10
+ project_id?: string;
11
+ page?: number;
12
+ limit?: number;
13
+ sort?: string;
14
+ search_term?: string;
15
+ }
16
+ export interface GetImportedEntitiesQueryHeaderParams {
17
+ 'Harness-Account'?: string;
18
+ }
19
+ export type GetImportedEntitiesOkResponse = ResponseWithPagination<ImportedEntitiesResponseListResponse>;
20
+ export type GetImportedEntitiesErrorResponse = unknown;
21
+ export interface GetImportedEntitiesProps extends GetImportedEntitiesQueryPathParams, Omit<FetcherOptions<GetImportedEntitiesQueryQueryParams, unknown, GetImportedEntitiesQueryHeaderParams>, 'url'> {
22
+ queryParams: GetImportedEntitiesQueryQueryParams;
23
+ }
24
+ export declare function getImportedEntities(props: GetImportedEntitiesProps): Promise<GetImportedEntitiesOkResponse>;
25
+ /**
26
+ * Get catalog entities that were imported by a specific integration
27
+ */
28
+ export declare function useGetImportedEntitiesQuery(props: GetImportedEntitiesProps, options?: Omit<UseQueryOptions<GetImportedEntitiesOkResponse, GetImportedEntitiesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetImportedEntitiesOkResponse, 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 getImportedEntities(props) {
7
+ return fetcher(Object.assign({ url: `/v1/integrations/${props['integration-id']}/imported/entities`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get catalog entities that were imported by a specific integration
11
+ */
12
+ export function useGetImportedEntitiesQuery(props, options) {
13
+ return useQuery(['get-imported-entities', props['integration-id'], props.queryParams], ({ signal }) => getImportedEntities(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -131,6 +131,8 @@ export type { GetHarnessEntitiesErrorResponse, GetHarnessEntitiesOkResponse, Get
131
131
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
132
132
  export type { GetHomePageLayoutInfoErrorResponse, GetHomePageLayoutInfoOkResponse, GetHomePageLayoutInfoProps, } from './hooks/useGetHomePageLayoutInfoQuery';
133
133
  export { getHomePageLayoutInfo, useGetHomePageLayoutInfoQuery, } from './hooks/useGetHomePageLayoutInfoQuery';
134
+ export type { GetImportedEntitiesErrorResponse, GetImportedEntitiesOkResponse, GetImportedEntitiesProps, GetImportedEntitiesQueryPathParams, GetImportedEntitiesQueryQueryParams, } from './hooks/useGetImportedEntitiesQuery';
135
+ export { getImportedEntities, useGetImportedEntitiesQuery, } from './hooks/useGetImportedEntitiesQuery';
134
136
  export type { GetIntegrationErrorResponse, GetIntegrationOkResponse, GetIntegrationProps, GetIntegrationQueryPathParams, } from './hooks/useGetIntegrationQuery';
135
137
  export { getIntegration, useGetIntegrationQuery } from './hooks/useGetIntegrationQuery';
136
138
  export type { GetIntegrationsErrorResponse, GetIntegrationsOkResponse, GetIntegrationsProps, GetIntegrationsQueryPathParams, GetIntegrationsQueryQueryParams, } from './hooks/useGetIntegrationsQuery';
@@ -307,6 +309,7 @@ export type { HarnessEntitiesCountResponseResponse } from './responses/HarnessEn
307
309
  export type { HarnessEntitiesResponseResponse } from './responses/HarnessEntitiesResponseResponse';
308
310
  export type { HomePageLayoutResponseResponse } from './responses/HomePageLayoutResponseResponse';
309
311
  export type { ImportEntitiesResponseResponse } from './responses/ImportEntitiesResponseResponse';
312
+ export type { ImportedEntitiesResponseListResponse } from './responses/ImportedEntitiesResponseListResponse';
310
313
  export type { IntegrationResponseListResponse } from './responses/IntegrationResponseListResponse';
311
314
  export type { IntegrationResponseResponse } from './responses/IntegrationResponseResponse';
312
315
  export type { LayoutResponseResponse } from './responses/LayoutResponseResponse';
@@ -447,6 +450,7 @@ export type { HomePageLayoutResponse } from './schemas/HomePageLayoutResponse';
447
450
  export type { HostInfo } from './schemas/HostInfo';
448
451
  export type { ImportEntitiesBase } from './schemas/ImportEntitiesBase';
449
452
  export type { ImportEntitiesResponse } from './schemas/ImportEntitiesResponse';
453
+ export type { ImportedEntityResponse } from './schemas/ImportedEntityResponse';
450
454
  export type { InputDetails } from './schemas/InputDetails';
451
455
  export type { InputValue } from './schemas/InputValue';
452
456
  export type { LayoutIngestRequest } from './schemas/LayoutIngestRequest';
@@ -64,6 +64,7 @@ export { getGroupDetails, useGetGroupDetailsQuery } from './hooks/useGetGroupDet
64
64
  export { getHarnessEntitiesCount, useGetHarnessEntitiesCountQuery, } from './hooks/useGetHarnessEntitiesCountQuery';
65
65
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
66
66
  export { getHomePageLayoutInfo, useGetHomePageLayoutInfoQuery, } from './hooks/useGetHomePageLayoutInfoQuery';
67
+ export { getImportedEntities, useGetImportedEntitiesQuery, } from './hooks/useGetImportedEntitiesQuery';
67
68
  export { getIntegration, useGetIntegrationQuery } from './hooks/useGetIntegrationQuery';
68
69
  export { getIntegrations, useGetIntegrationsQuery } from './hooks/useGetIntegrationsQuery';
69
70
  export { getJsonSchema, useGetJsonSchemaQuery } from './hooks/useGetJsonSchemaQuery';
@@ -0,0 +1,2 @@
1
+ import type { ImportedEntityResponse } from '../schemas/ImportedEntityResponse';
2
+ export type ImportedEntitiesResponseListResponse = ImportedEntityResponse[];
@@ -0,0 +1,17 @@
1
+ import type { EntityResponse } from '../schemas/EntityResponse';
2
+ export interface ImportedEntityResponse {
3
+ entity?: EntityResponse;
4
+ raw_entity_details?: {
5
+ /**
6
+ * The action that was performed during import
7
+ */
8
+ action_performed?: 'MERGE' | 'REGISTER';
9
+ identifier?: string;
10
+ /**
11
+ * Timestamp (epoch millis) when the entity was imported
12
+ * @format int64
13
+ */
14
+ imported_at?: number;
15
+ name?: string;
16
+ };
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.90.0",
3
+ "version": "0.90.1",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",