@harnessio/react-idp-service-client 0.102.0 → 0.103.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/useConvertEntitiesV2Mutation.d.ts +22 -0
- package/dist/idp-service/src/services/hooks/useConvertEntitiesV2Mutation.js +14 -0
- package/dist/idp-service/src/services/hooks/useEntityListV2Query.d.ts +38 -0
- package/dist/idp-service/src/services/hooks/useEntityListV2Query.js +14 -0
- package/dist/idp-service/src/services/index.d.ts +8 -0
- package/dist/idp-service/src/services/index.js +2 -0
- package/dist/idp-service/src/services/requestBodies/EntitiesConvertRequestBodyRequestBody.d.ts +2 -0
- package/dist/idp-service/src/services/requestBodies/EntitiesConvertRequestBodyRequestBody.js +1 -0
- package/dist/idp-service/src/services/responses/EntityConvertResponseBodyListResponse.d.ts +2 -0
- package/dist/idp-service/src/services/responses/EntityConvertResponseBodyListResponse.js +1 -0
- package/dist/idp-service/src/services/schemas/EntitiesConvertRequestBody.d.ts +21 -0
- package/dist/idp-service/src/services/schemas/EntitiesConvertRequestBody.js +4 -0
- package/dist/idp-service/src/services/schemas/EntityConvertV2Response.d.ts +7 -0
- package/dist/idp-service/src/services/schemas/EntityConvertV2Response.js +4 -0
- package/dist/idp-service/src/services/schemas/EntityResponse.d.ts +1 -1
- package/dist/idp-service/src/services/schemas/EntityVersionResponse.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { EntityConvertResponseBodyListResponse } from '../responses/EntityConvertResponseBodyListResponse';
|
|
3
|
+
import type { EntitiesConvertRequestBodyRequestBody } from '../requestBodies/EntitiesConvertRequestBodyRequestBody';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../custom-idp-fetcher/index.js';
|
|
6
|
+
export interface ConvertEntitiesV2MutationPathParams {
|
|
7
|
+
option: 'harness-to-backstage';
|
|
8
|
+
}
|
|
9
|
+
export interface ConvertEntitiesV2MutationHeaderParams {
|
|
10
|
+
'Harness-Account'?: string;
|
|
11
|
+
}
|
|
12
|
+
export type ConvertEntitiesV2RequestBody = EntitiesConvertRequestBodyRequestBody;
|
|
13
|
+
export type ConvertEntitiesV2OkResponse = ResponseWithPagination<EntityConvertResponseBodyListResponse>;
|
|
14
|
+
export type ConvertEntitiesV2ErrorResponse = unknown;
|
|
15
|
+
export interface ConvertEntitiesV2Props extends ConvertEntitiesV2MutationPathParams, Omit<FetcherOptions<unknown, ConvertEntitiesV2RequestBody, ConvertEntitiesV2MutationHeaderParams>, 'url'> {
|
|
16
|
+
body: ConvertEntitiesV2RequestBody;
|
|
17
|
+
}
|
|
18
|
+
export declare function convertEntitiesV2(props: ConvertEntitiesV2Props): Promise<ConvertEntitiesV2OkResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Convert Entities V2.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useConvertEntitiesV2Mutation(options?: Omit<UseMutationOptions<ConvertEntitiesV2OkResponse, ConvertEntitiesV2ErrorResponse, ConvertEntitiesV2Props>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ConvertEntitiesV2OkResponse, unknown, ConvertEntitiesV2Props, 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 { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../custom-idp-fetcher/index.js';
|
|
6
|
+
export function convertEntitiesV2(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v2/entities/convert/${props.option}`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Convert Entities V2.
|
|
11
|
+
*/
|
|
12
|
+
export function useConvertEntitiesV2Mutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => convertEntitiesV2(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 EntityListV2QueryQueryParams {
|
|
6
|
+
page?: number;
|
|
7
|
+
/**
|
|
8
|
+
* @default 10
|
|
9
|
+
*/
|
|
10
|
+
limit?: number;
|
|
11
|
+
sort?: string;
|
|
12
|
+
search_term?: string;
|
|
13
|
+
resolve_placeholders?: boolean;
|
|
14
|
+
scopes?: string;
|
|
15
|
+
entity_refs?: string;
|
|
16
|
+
owned_by_me?: boolean;
|
|
17
|
+
favorites?: boolean;
|
|
18
|
+
kind?: string;
|
|
19
|
+
type?: string;
|
|
20
|
+
owner?: string;
|
|
21
|
+
lifecycle?: string;
|
|
22
|
+
tags?: string;
|
|
23
|
+
filter?: string;
|
|
24
|
+
skip_favorites?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface EntityListV2QueryHeaderParams {
|
|
27
|
+
'Harness-Account'?: string;
|
|
28
|
+
}
|
|
29
|
+
export type EntityListV2OkResponse = ResponseWithPagination<EntityResponseBodyListResponse>;
|
|
30
|
+
export type EntityListV2ErrorResponse = unknown;
|
|
31
|
+
export interface EntityListV2Props extends Omit<FetcherOptions<EntityListV2QueryQueryParams, unknown, EntityListV2QueryHeaderParams>, 'url'> {
|
|
32
|
+
queryParams: EntityListV2QueryQueryParams;
|
|
33
|
+
}
|
|
34
|
+
export declare function entityListV2(props: EntityListV2Props): Promise<EntityListV2OkResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Get Entities using optimized V2 implementation with Redis caching.
|
|
37
|
+
*/
|
|
38
|
+
export declare function useEntityListV2Query(props: EntityListV2Props, options?: Omit<UseQueryOptions<EntityListV2OkResponse, EntityListV2ErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<EntityListV2OkResponse, 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 entityListV2(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v2/entities`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get Entities using optimized V2 implementation with Redis caching.
|
|
11
|
+
*/
|
|
12
|
+
export function useEntityListV2Query(props, options) {
|
|
13
|
+
return useQuery(['entityListV2', props.queryParams], ({ signal }) => entityListV2(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -3,6 +3,8 @@ export type { CdEntitiesCountErrorResponse, CdEntitiesCountOkResponse, CdEntitie
|
|
|
3
3
|
export { cdEntitiesCount, useCdEntitiesCountQuery } from './hooks/useCdEntitiesCountQuery';
|
|
4
4
|
export type { CdEntitiesFetchErrorResponse, CdEntitiesFetchOkResponse, CdEntitiesFetchProps, CdEntitiesFetchQueryQueryParams, CdEntitiesFetchRequestBody, } from './hooks/useCdEntitiesFetchQuery';
|
|
5
5
|
export { cdEntitiesFetch, useCdEntitiesFetchQuery } from './hooks/useCdEntitiesFetchQuery';
|
|
6
|
+
export type { ConvertEntitiesV2ErrorResponse, ConvertEntitiesV2MutationPathParams, ConvertEntitiesV2OkResponse, ConvertEntitiesV2Props, ConvertEntitiesV2RequestBody, } from './hooks/useConvertEntitiesV2Mutation';
|
|
7
|
+
export { convertEntitiesV2, useConvertEntitiesV2Mutation, } from './hooks/useConvertEntitiesV2Mutation';
|
|
6
8
|
export type { ConvertEntityErrorResponse, ConvertEntityMutationPathParams, ConvertEntityMutationQueryParams, ConvertEntityOkResponse, ConvertEntityProps, ConvertEntityRequestBody, } from './hooks/useConvertEntityMutation';
|
|
7
9
|
export { convertEntity, useConvertEntityMutation } from './hooks/useConvertEntityMutation';
|
|
8
10
|
export type { CreateAggregationRuleErrorResponse, CreateAggregationRuleOkResponse, CreateAggregationRuleProps, CreateAggregationRuleRequestBody, } from './hooks/useCreateAggregationRuleMutation';
|
|
@@ -67,6 +69,8 @@ export type { DeleteScorecardErrorResponse, DeleteScorecardMutationPathParams, D
|
|
|
67
69
|
export { deleteScorecard, useDeleteScorecardMutation } from './hooks/useDeleteScorecardMutation';
|
|
68
70
|
export type { DiscoverEntitiesErrorResponse, DiscoverEntitiesOkResponse, DiscoverEntitiesProps, DiscoverEntitiesQueryPathParams, DiscoverEntitiesQueryQueryParams, } from './hooks/useDiscoverEntitiesQuery';
|
|
69
71
|
export { discoverEntities, useDiscoverEntitiesQuery } from './hooks/useDiscoverEntitiesQuery';
|
|
72
|
+
export type { EntityListV2ErrorResponse, EntityListV2OkResponse, EntityListV2Props, EntityListV2QueryQueryParams, } from './hooks/useEntityListV2Query';
|
|
73
|
+
export { entityListV2, useEntityListV2Query } from './hooks/useEntityListV2Query';
|
|
70
74
|
export type { GenerateYamlDefErrorResponse, GenerateYamlDefOkResponse, GenerateYamlDefProps, GenerateYamlDefRequestBody, } from './hooks/useGenerateYamlDefMutation';
|
|
71
75
|
export { generateYamlDef, useGenerateYamlDefMutation } from './hooks/useGenerateYamlDefMutation';
|
|
72
76
|
export type { GetAggregationRuleErrorResponse, GetAggregationRuleOkResponse, GetAggregationRuleProps, GetAggregationRuleQueryPathParams, } from './hooks/useGetAggregationRuleQuery';
|
|
@@ -285,6 +289,7 @@ export type { CustomPluginInfoRequestRequestBody } from './requestBodies/CustomP
|
|
|
285
289
|
export type { CustomPluginV2CreateRequestRequestBody } from './requestBodies/CustomPluginV2CreateRequestRequestBody';
|
|
286
290
|
export type { CustomPluginV2UpdateRequestRequestBody } from './requestBodies/CustomPluginV2UpdateRequestRequestBody';
|
|
287
291
|
export type { EntitesByRefsRequestRequestBody } from './requestBodies/EntitesByRefsRequestRequestBody';
|
|
292
|
+
export type { EntitiesConvertRequestBodyRequestBody } from './requestBodies/EntitiesConvertRequestBodyRequestBody';
|
|
288
293
|
export type { EntityCreateRequestBodyRequestBody } from './requestBodies/EntityCreateRequestBodyRequestBody';
|
|
289
294
|
export type { EntityFilterQueryRequestRequestBody } from './requestBodies/EntityFilterQueryRequestRequestBody';
|
|
290
295
|
export type { EntityMoveRequestBodyRequestBody } from './requestBodies/EntityMoveRequestBodyRequestBody';
|
|
@@ -342,6 +347,7 @@ export type { DatapointResponseResponse } from './responses/DatapointResponseRes
|
|
|
342
347
|
export type { DefaultSaveResponseResponse } from './responses/DefaultSaveResponseResponse';
|
|
343
348
|
export type { DiscoverEntitiesResponseListResponse } from './responses/DiscoverEntitiesResponseListResponse';
|
|
344
349
|
export type { EntitiesGroupsResponseBodyResponse } from './responses/EntitiesGroupsResponseBodyResponse';
|
|
350
|
+
export type { EntityConvertResponseBodyListResponse } from './responses/EntityConvertResponseBodyListResponse';
|
|
345
351
|
export type { EntityConvertResponseBodyResponse } from './responses/EntityConvertResponseBodyResponse';
|
|
346
352
|
export type { EntityFiltersResponseBodyListResponse } from './responses/EntityFiltersResponseBodyListResponse';
|
|
347
353
|
export type { EntityJsonSchemaResponseBodyResponse } from './responses/EntityJsonSchemaResponseBodyResponse';
|
|
@@ -461,11 +467,13 @@ export type { DefaultSaveResponse } from './schemas/DefaultSaveResponse';
|
|
|
461
467
|
export type { DiscoverEntitiesResponse } from './schemas/DiscoverEntitiesResponse';
|
|
462
468
|
export type { DiscoverEntitiesResponseBody } from './schemas/DiscoverEntitiesResponseBody';
|
|
463
469
|
export type { EntitiesByRefsRequest } from './schemas/EntitiesByRefsRequest';
|
|
470
|
+
export type { EntitiesConvertRequestBody } from './schemas/EntitiesConvertRequestBody';
|
|
464
471
|
export type { EntitiesForImport } from './schemas/EntitiesForImport';
|
|
465
472
|
export type { EntitiesGroups } from './schemas/EntitiesGroups';
|
|
466
473
|
export type { EntitiesGroupsResponse } from './schemas/EntitiesGroupsResponse';
|
|
467
474
|
export type { EntityColumnDetails } from './schemas/EntityColumnDetails';
|
|
468
475
|
export type { EntityConvertResponse } from './schemas/EntityConvertResponse';
|
|
476
|
+
export type { EntityConvertV2Response } from './schemas/EntityConvertV2Response';
|
|
469
477
|
export type { EntityCreateRequest } from './schemas/EntityCreateRequest';
|
|
470
478
|
export type { EntityFilterQueryRequest } from './schemas/EntityFilterQueryRequest';
|
|
471
479
|
export type { EntityFiltersResponse } from './schemas/EntityFiltersResponse';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { cdEntitiesCount, useCdEntitiesCountQuery } from './hooks/useCdEntitiesCountQuery';
|
|
2
2
|
export { cdEntitiesFetch, useCdEntitiesFetchQuery } from './hooks/useCdEntitiesFetchQuery';
|
|
3
|
+
export { convertEntitiesV2, useConvertEntitiesV2Mutation, } from './hooks/useConvertEntitiesV2Mutation';
|
|
3
4
|
export { convertEntity, useConvertEntityMutation } from './hooks/useConvertEntityMutation';
|
|
4
5
|
export { createAggregationRule, useCreateAggregationRuleMutation, } from './hooks/useCreateAggregationRuleMutation';
|
|
5
6
|
export { createBackstageEnvVariables, useCreateBackstageEnvVariablesMutation, } from './hooks/useCreateBackstageEnvVariablesMutation';
|
|
@@ -32,6 +33,7 @@ export { deleteLayout, useDeleteLayoutMutation } from './hooks/useDeleteLayoutMu
|
|
|
32
33
|
export { deleteLayoutV3, useDeleteLayoutV3Mutation } from './hooks/useDeleteLayoutV3Mutation';
|
|
33
34
|
export { deleteScorecard, useDeleteScorecardMutation } from './hooks/useDeleteScorecardMutation';
|
|
34
35
|
export { discoverEntities, useDiscoverEntitiesQuery } from './hooks/useDiscoverEntitiesQuery';
|
|
36
|
+
export { entityListV2, useEntityListV2Query } from './hooks/useEntityListV2Query';
|
|
35
37
|
export { generateYamlDef, useGenerateYamlDefMutation } from './hooks/useGenerateYamlDefMutation';
|
|
36
38
|
export { getAggregationRule, useGetAggregationRuleQuery } from './hooks/useGetAggregationRuleQuery';
|
|
37
39
|
export { getAggregationRules, useGetAggregationRulesQuery, } from './hooks/useGetAggregationRulesQuery';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entities Convert Request Body
|
|
3
|
+
*/
|
|
4
|
+
export interface EntitiesConvertRequestBody {
|
|
5
|
+
/**
|
|
6
|
+
* Name of the branch (for Git Experience).
|
|
7
|
+
*/
|
|
8
|
+
branch_name?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Identifier of the Harness Connector used for CRUD operations on the Entity (for Git Experience).
|
|
11
|
+
*/
|
|
12
|
+
connector_ref?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Entity reference of the entity to be converted
|
|
15
|
+
*/
|
|
16
|
+
entity_ref: string;
|
|
17
|
+
/**
|
|
18
|
+
* Name of the repository (for Git Experience).
|
|
19
|
+
*/
|
|
20
|
+
repo_name?: string;
|
|
21
|
+
}
|
|
@@ -35,7 +35,7 @@ export interface EntityResponse {
|
|
|
35
35
|
scope?: 'ACCOUNT' | 'ORGANIZATION' | 'PROJECT';
|
|
36
36
|
}>;
|
|
37
37
|
identifier: string;
|
|
38
|
-
kind: 'aiasset' | '
|
|
38
|
+
kind: 'aiasset' | 'api' | 'component' | 'environment' | 'environmentblueprint' | 'group' | 'hierarchy' | 'resource' | 'system' | 'user' | 'workflow';
|
|
39
39
|
kind_icon?: string;
|
|
40
40
|
kind_identifier?: string;
|
|
41
41
|
lifecycle?: string;
|
|
@@ -19,7 +19,7 @@ export interface EntityVersionResponse {
|
|
|
19
19
|
[key: string]: any;
|
|
20
20
|
};
|
|
21
21
|
identifier: string;
|
|
22
|
-
kind: 'aiasset' | '
|
|
22
|
+
kind: 'aiasset' | 'api' | 'component' | 'environment' | 'environmentblueprint' | 'group' | 'hierarchy' | 'resource' | 'system' | 'user' | 'workflow';
|
|
23
23
|
orgIdentifier?: string;
|
|
24
24
|
org_name?: string;
|
|
25
25
|
projectIdentifier?: string;
|