@harnessio/react-idp-service-client 0.60.0 → 0.62.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.
@@ -6,7 +6,7 @@ import { FetcherOptions } from '../../../../fetcher/index.js';
6
6
  export interface CreateEntityMutationQueryParams {
7
7
  orgIdentifier?: string;
8
8
  projectIdentifier?: string;
9
- force_convert?: boolean;
9
+ convert?: boolean;
10
10
  dry_run?: boolean;
11
11
  }
12
12
  export interface CreateEntityMutationHeaderParams {
@@ -4,7 +4,7 @@
4
4
  import { useMutation } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function deleteEntity(props) {
7
- return fetcher(Object.assign({ url: `/v1/entities/${props.kind}/${props.scope}/${props.identifier}`, method: 'DELETE' }, props));
7
+ return fetcher(Object.assign({ url: `/v1/entities/${props.scope}/${props.kind}/${props.identifier}`, method: 'DELETE' }, props));
8
8
  }
9
9
  /**
10
10
  * Delete an Entity.
@@ -4,9 +4,8 @@ import type { ResponseWithPagination } from '../helpers';
4
4
  import { FetcherOptions } from '../../../../fetcher/index.js';
5
5
  export interface GetEntitiesFiltersQueryQueryParams {
6
6
  accountIdentifier: string;
7
- orgIdentifier?: string;
8
- projectIdentifier?: string;
9
7
  kind?: string;
8
+ scopes?: string;
10
9
  }
11
10
  export interface GetEntitiesFiltersQueryHeaderParams {
12
11
  'Harness-Account'?: string;
@@ -0,0 +1,29 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { EntitiesGroupsResponseBodyResponse } from '../responses/EntitiesGroupsResponseBodyResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetEntitiesGroupsQueryQueryParams {
6
+ search_on_entities?: string;
7
+ search_on_groups?: string;
8
+ scopes?: string;
9
+ kind?: string;
10
+ owned_by_me?: boolean;
11
+ favorites?: boolean;
12
+ type?: string;
13
+ owner?: string;
14
+ lifecycle?: string;
15
+ tags?: string;
16
+ }
17
+ export interface GetEntitiesGroupsQueryHeaderParams {
18
+ 'Harness-Account'?: string;
19
+ }
20
+ export type GetEntitiesGroupsOkResponse = ResponseWithPagination<EntitiesGroupsResponseBodyResponse>;
21
+ export type GetEntitiesGroupsErrorResponse = unknown;
22
+ export interface GetEntitiesGroupsProps extends Omit<FetcherOptions<GetEntitiesGroupsQueryQueryParams, unknown, GetEntitiesGroupsQueryHeaderParams>, 'url'> {
23
+ queryParams: GetEntitiesGroupsQueryQueryParams;
24
+ }
25
+ export declare function getEntitiesGroups(props: GetEntitiesGroupsProps): Promise<GetEntitiesGroupsOkResponse>;
26
+ /**
27
+ * Get Entities Groups.
28
+ */
29
+ export declare function useGetEntitiesGroupsQuery(props: GetEntitiesGroupsProps, options?: Omit<UseQueryOptions<GetEntitiesGroupsOkResponse, GetEntitiesGroupsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetEntitiesGroupsOkResponse, 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 getEntitiesGroups(props) {
7
+ return fetcher(Object.assign({ url: `/v1/entities/groups`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get Entities Groups.
11
+ */
12
+ export function useGetEntitiesGroupsQuery(props, options) {
13
+ return useQuery(['get-entities-groups', props.queryParams], ({ signal }) => getEntitiesGroups(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -12,6 +12,7 @@ export interface GetEntitiesQueryQueryParams {
12
12
  limit?: number;
13
13
  sort?: string;
14
14
  search_term?: string;
15
+ scopes?: string;
15
16
  entity_refs?: string;
16
17
  owned_by_me?: boolean;
17
18
  favorites?: boolean;
@@ -4,7 +4,7 @@
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function getEntity(props) {
7
- return fetcher(Object.assign({ url: `/v1/entities/${props.kind}/${props.scope}/${props.identifier}`, method: 'GET' }, props));
7
+ return fetcher(Object.assign({ url: `/v1/entities/${props.scope}/${props.kind}/${props.identifier}`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
10
  * Get Entity.
@@ -4,7 +4,7 @@
4
4
  import { useMutation } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function updateEntity(props) {
7
- return fetcher(Object.assign({ url: `/v1/entities/${props.kind}/${props.scope}/${props.identifier}`, method: 'PUT' }, props));
7
+ return fetcher(Object.assign({ url: `/v1/entities/${props.scope}/${props.kind}/${props.identifier}`, method: 'PUT' }, props));
8
8
  }
9
9
  /**
10
10
  * Update an Entity.
@@ -77,6 +77,8 @@ export type { GetDataSourcesDataPointsMapErrorResponse, GetDataSourcesDataPoints
77
77
  export { getDataSourcesDataPointsMap, useGetDataSourcesDataPointsMapQuery, } from './hooks/useGetDataSourcesDataPointsMapQuery';
78
78
  export type { GetEntitiesFiltersErrorResponse, GetEntitiesFiltersOkResponse, GetEntitiesFiltersProps, GetEntitiesFiltersQueryQueryParams, } from './hooks/useGetEntitiesFiltersQuery';
79
79
  export { getEntitiesFilters, useGetEntitiesFiltersQuery } from './hooks/useGetEntitiesFiltersQuery';
80
+ export type { GetEntitiesGroupsErrorResponse, GetEntitiesGroupsOkResponse, GetEntitiesGroupsProps, GetEntitiesGroupsQueryQueryParams, } from './hooks/useGetEntitiesGroupsQuery';
81
+ export { getEntitiesGroups, useGetEntitiesGroupsQuery } from './hooks/useGetEntitiesGroupsQuery';
80
82
  export type { GetEntitiesKindsErrorResponse, GetEntitiesKindsOkResponse, GetEntitiesKindsProps, GetEntitiesKindsQueryQueryParams, } from './hooks/useGetEntitiesKindsQuery';
81
83
  export { getEntitiesKinds, useGetEntitiesKindsQuery } from './hooks/useGetEntitiesKindsQuery';
82
84
  export type { GetEntitiesErrorResponse, GetEntitiesOkResponse, GetEntitiesProps, GetEntitiesQueryQueryParams, } from './hooks/useGetEntitiesQuery';
@@ -212,6 +214,7 @@ export type { DataSourceDataPointsMapResponseResponse } from './responses/DataSo
212
214
  export type { DataSourcesResponseResponse } from './responses/DataSourcesResponseResponse';
213
215
  export type { DatapointResponseResponse } from './responses/DatapointResponseResponse';
214
216
  export type { DefaultSaveResponseResponse } from './responses/DefaultSaveResponseResponse';
217
+ export type { EntitiesGroupsResponseBodyResponse } from './responses/EntitiesGroupsResponseBodyResponse';
215
218
  export type { EntityConvertResponseBodyResponse } from './responses/EntityConvertResponseBodyResponse';
216
219
  export type { EntityFiltersResponseBodyListResponse } from './responses/EntityFiltersResponseBodyListResponse';
217
220
  export type { EntityKindsResponseBodyResponse } from './responses/EntityKindsResponseBodyResponse';
@@ -297,6 +300,8 @@ export type { DataSourceDataPointsMapResponse } from './schemas/DataSourceDataPo
297
300
  export type { DataSourcesResponse } from './schemas/DataSourcesResponse';
298
301
  export type { DefaultSaveResponse } from './schemas/DefaultSaveResponse';
299
302
  export type { EntitiesForImport } from './schemas/EntitiesForImport';
303
+ export type { EntitiesGroups } from './schemas/EntitiesGroups';
304
+ export type { EntitiesGroupsResponse } from './schemas/EntitiesGroupsResponse';
300
305
  export type { EntityConvertResponse } from './schemas/EntityConvertResponse';
301
306
  export type { EntityFiltersResponse } from './schemas/EntityFiltersResponse';
302
307
  export type { EntityKindsResponse } from './schemas/EntityKindsResponse';
@@ -37,6 +37,7 @@ export { getCustomPluginStatusPluginId, useGetCustomPluginStatusPluginIdQuery, }
37
37
  export { getDataPointsForDataSource, useGetDataPointsForDataSourceQuery, } from './hooks/useGetDataPointsForDataSourceQuery';
38
38
  export { getDataSourcesDataPointsMap, useGetDataSourcesDataPointsMapQuery, } from './hooks/useGetDataSourcesDataPointsMapQuery';
39
39
  export { getEntitiesFilters, useGetEntitiesFiltersQuery } from './hooks/useGetEntitiesFiltersQuery';
40
+ export { getEntitiesGroups, useGetEntitiesGroupsQuery } from './hooks/useGetEntitiesGroupsQuery';
40
41
  export { getEntitiesKinds, useGetEntitiesKindsQuery } from './hooks/useGetEntitiesKindsQuery';
41
42
  export { getEntities, useGetEntitiesQuery } from './hooks/useGetEntitiesQuery';
42
43
  export { getEntityFacets, useGetEntityFacetsQuery } from './hooks/useGetEntityFacetsQuery';
@@ -0,0 +1,2 @@
1
+ import type { EntitiesGroupsResponse } from '../schemas/EntitiesGroupsResponse';
2
+ export type EntitiesGroupsResponseBodyResponse = EntitiesGroupsResponse;
@@ -0,0 +1,16 @@
1
+ import type { EntityResponse } from '../schemas/EntityResponse';
2
+ /**
3
+ * Entities Groups
4
+ */
5
+ export interface EntitiesGroups {
6
+ entities?: EntityResponse[];
7
+ group_description?: string;
8
+ group_icon?: string;
9
+ group_identifier?: string;
10
+ group_name?: string;
11
+ org_identifier?: string;
12
+ org_name?: string;
13
+ project_identifier?: string;
14
+ project_name?: string;
15
+ total?: number;
16
+ }
@@ -0,0 +1,37 @@
1
+ import type { EntitiesGroups } from '../schemas/EntitiesGroups';
2
+ import type { EntityResponse } from '../schemas/EntityResponse';
3
+ /**
4
+ * Entity Groups Response Body
5
+ */
6
+ export interface EntitiesGroupsResponse {
7
+ count?: {
8
+ account?: EntitiesGroups[];
9
+ org?: Array<{
10
+ groups?: EntitiesGroups[];
11
+ org_identifier?: string;
12
+ org_name?: string;
13
+ }>;
14
+ project?: Array<{
15
+ groups?: EntitiesGroups[];
16
+ org_identifier?: string;
17
+ org_name?: string;
18
+ project_identifier?: string;
19
+ project_name?: string;
20
+ }>;
21
+ total?: number;
22
+ };
23
+ data?: {
24
+ account?: {
25
+ with_group?: EntitiesGroups[];
26
+ without_group?: EntityResponse[];
27
+ };
28
+ org?: {
29
+ with_group?: EntitiesGroups[];
30
+ without_group?: EntityResponse[];
31
+ };
32
+ project?: {
33
+ with_group?: EntitiesGroups[];
34
+ without_group?: EntityResponse[];
35
+ };
36
+ };
37
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.60.0",
3
+ "version": "0.62.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",