@harnessio/react-idp-service-client 0.102.1 → 0.103.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.
Files changed (25) hide show
  1. package/dist/idp-service/src/services/hooks/useConvertEntitiesV2Mutation.d.ts +22 -0
  2. package/dist/idp-service/src/services/hooks/useConvertEntitiesV2Mutation.js +14 -0
  3. package/dist/idp-service/src/services/hooks/useTraverseEntityGraphQuery.d.ts +26 -0
  4. package/dist/idp-service/src/services/hooks/useTraverseEntityGraphQuery.js +14 -0
  5. package/dist/idp-service/src/services/index.d.ts +13 -0
  6. package/dist/idp-service/src/services/index.js +2 -0
  7. package/dist/idp-service/src/services/requestBodies/EntitiesConvertRequestBodyRequestBody.d.ts +2 -0
  8. package/dist/idp-service/src/services/requestBodies/EntitiesConvertRequestBodyRequestBody.js +1 -0
  9. package/dist/idp-service/src/services/responses/EntityConvertResponseBodyListResponse.d.ts +2 -0
  10. package/dist/idp-service/src/services/responses/EntityConvertResponseBodyListResponse.js +1 -0
  11. package/dist/idp-service/src/services/responses/GraphTraversalResponseResponse.d.ts +2 -0
  12. package/dist/idp-service/src/services/responses/GraphTraversalResponseResponse.js +1 -0
  13. package/dist/idp-service/src/services/schemas/EntitiesConvertRequestBody.d.ts +21 -0
  14. package/dist/idp-service/src/services/schemas/EntitiesConvertRequestBody.js +4 -0
  15. package/dist/idp-service/src/services/schemas/EntityConvertV2Response.d.ts +7 -0
  16. package/dist/idp-service/src/services/schemas/EntityConvertV2Response.js +4 -0
  17. package/dist/idp-service/src/services/schemas/GraphEdge.d.ts +30 -0
  18. package/dist/idp-service/src/services/schemas/GraphEdge.js +4 -0
  19. package/dist/idp-service/src/services/schemas/GraphMetadata.d.ts +20 -0
  20. package/dist/idp-service/src/services/schemas/GraphMetadata.js +4 -0
  21. package/dist/idp-service/src/services/schemas/GraphNode.d.ts +25 -0
  22. package/dist/idp-service/src/services/schemas/GraphNode.js +4 -0
  23. package/dist/idp-service/src/services/schemas/GraphTraversalResponse.d.ts +17 -0
  24. package/dist/idp-service/src/services/schemas/GraphTraversalResponse.js +1 -0
  25. 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,26 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { GraphTraversalResponseResponse } from '../responses/GraphTraversalResponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../custom-idp-fetcher/index.js';
5
+ export interface TraverseEntityGraphQueryQueryParams {
6
+ entityRef: string;
7
+ relationshipType?: string[];
8
+ kind?: string[];
9
+ /**
10
+ * @default 1
11
+ */
12
+ depth?: number;
13
+ }
14
+ export interface TraverseEntityGraphQueryHeaderParams {
15
+ 'Harness-Account'?: string;
16
+ }
17
+ export type TraverseEntityGraphOkResponse = ResponseWithPagination<GraphTraversalResponseResponse>;
18
+ export type TraverseEntityGraphErrorResponse = unknown;
19
+ export interface TraverseEntityGraphProps extends Omit<FetcherOptions<TraverseEntityGraphQueryQueryParams, unknown, TraverseEntityGraphQueryHeaderParams>, 'url'> {
20
+ queryParams: TraverseEntityGraphQueryQueryParams;
21
+ }
22
+ export declare function traverseEntityGraph(props: TraverseEntityGraphProps): Promise<TraverseEntityGraphOkResponse>;
23
+ /**
24
+ * Traverse the catalog entity graph starting from a given entity, following relationships up to a specified depth. Returns a graph structure with nodes and edges.
25
+ */
26
+ export declare function useTraverseEntityGraphQuery(props: TraverseEntityGraphProps, options?: Omit<UseQueryOptions<TraverseEntityGraphOkResponse, TraverseEntityGraphErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<TraverseEntityGraphOkResponse, 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 traverseEntityGraph(props) {
7
+ return fetcher(Object.assign({ url: `/v1/graph/traverse`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Traverse the catalog entity graph starting from a given entity, following relationships up to a specified depth. Returns a graph structure with nodes and edges.
11
+ */
12
+ export function useTraverseEntityGraphQuery(props, options) {
13
+ return useQuery(['traverse-entity-graph', props.queryParams], ({ signal }) => traverseEntityGraph(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';
@@ -243,6 +245,8 @@ export type { ScorecardRecalibrateErrorResponse, ScorecardRecalibrateOkResponse,
243
245
  export { scorecardRecalibrate, useScorecardRecalibrateMutation, } from './hooks/useScorecardRecalibrateMutation';
244
246
  export type { TogglePluginForAccountErrorResponse, TogglePluginForAccountMutationPathParams, TogglePluginForAccountMutationQueryParams, TogglePluginForAccountOkResponse, TogglePluginForAccountProps, } from './hooks/useTogglePluginForAccountMutation';
245
247
  export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
248
+ export type { TraverseEntityGraphErrorResponse, TraverseEntityGraphOkResponse, TraverseEntityGraphProps, TraverseEntityGraphQueryQueryParams, } from './hooks/useTraverseEntityGraphQuery';
249
+ export { traverseEntityGraph, useTraverseEntityGraphQuery, } from './hooks/useTraverseEntityGraphQuery';
246
250
  export type { TriggerAggregationRuleComputationErrorResponse, TriggerAggregationRuleComputationMutationPathParams, TriggerAggregationRuleComputationOkResponse, TriggerAggregationRuleComputationProps, } from './hooks/useTriggerAggregationRuleComputationMutation';
247
251
  export { triggerAggregationRuleComputation, useTriggerAggregationRuleComputationMutation, } from './hooks/useTriggerAggregationRuleComputationMutation';
248
252
  export type { UnlinkIntegrationEntitiesErrorResponse, UnlinkIntegrationEntitiesMutationPathParams, UnlinkIntegrationEntitiesMutationQueryParams, UnlinkIntegrationEntitiesOkResponse, UnlinkIntegrationEntitiesProps, UnlinkIntegrationEntitiesRequestBody, } from './hooks/useUnlinkIntegrationEntitiesMutation';
@@ -287,6 +291,7 @@ export type { CustomPluginInfoRequestRequestBody } from './requestBodies/CustomP
287
291
  export type { CustomPluginV2CreateRequestRequestBody } from './requestBodies/CustomPluginV2CreateRequestRequestBody';
288
292
  export type { CustomPluginV2UpdateRequestRequestBody } from './requestBodies/CustomPluginV2UpdateRequestRequestBody';
289
293
  export type { EntitesByRefsRequestRequestBody } from './requestBodies/EntitesByRefsRequestRequestBody';
294
+ export type { EntitiesConvertRequestBodyRequestBody } from './requestBodies/EntitiesConvertRequestBodyRequestBody';
290
295
  export type { EntityCreateRequestBodyRequestBody } from './requestBodies/EntityCreateRequestBodyRequestBody';
291
296
  export type { EntityFilterQueryRequestRequestBody } from './requestBodies/EntityFilterQueryRequestRequestBody';
292
297
  export type { EntityMoveRequestBodyRequestBody } from './requestBodies/EntityMoveRequestBodyRequestBody';
@@ -344,6 +349,7 @@ export type { DatapointResponseResponse } from './responses/DatapointResponseRes
344
349
  export type { DefaultSaveResponseResponse } from './responses/DefaultSaveResponseResponse';
345
350
  export type { DiscoverEntitiesResponseListResponse } from './responses/DiscoverEntitiesResponseListResponse';
346
351
  export type { EntitiesGroupsResponseBodyResponse } from './responses/EntitiesGroupsResponseBodyResponse';
352
+ export type { EntityConvertResponseBodyListResponse } from './responses/EntityConvertResponseBodyListResponse';
347
353
  export type { EntityConvertResponseBodyResponse } from './responses/EntityConvertResponseBodyResponse';
348
354
  export type { EntityFiltersResponseBodyListResponse } from './responses/EntityFiltersResponseBodyListResponse';
349
355
  export type { EntityJsonSchemaResponseBodyResponse } from './responses/EntityJsonSchemaResponseBodyResponse';
@@ -357,6 +363,7 @@ export type { EntityVersionResponseBodyListResponse } from './responses/EntityVe
357
363
  export type { EntityVersionResponseBodyResponse } from './responses/EntityVersionResponseBodyResponse';
358
364
  export type { EnvironmentBlueprintInfoResponseResponse } from './responses/EnvironmentBlueprintInfoResponseResponse';
359
365
  export type { GenerateYamlResponseResponse } from './responses/GenerateYamlResponseResponse';
366
+ export type { GraphTraversalResponseResponse } from './responses/GraphTraversalResponseResponse';
360
367
  export type { GroupResponseListResponse } from './responses/GroupResponseListResponse';
361
368
  export type { GroupResponseResponse } from './responses/GroupResponseResponse';
362
369
  export type { HarnessEntitiesCountResponseResponse } from './responses/HarnessEntitiesCountResponseResponse';
@@ -463,11 +470,13 @@ export type { DefaultSaveResponse } from './schemas/DefaultSaveResponse';
463
470
  export type { DiscoverEntitiesResponse } from './schemas/DiscoverEntitiesResponse';
464
471
  export type { DiscoverEntitiesResponseBody } from './schemas/DiscoverEntitiesResponseBody';
465
472
  export type { EntitiesByRefsRequest } from './schemas/EntitiesByRefsRequest';
473
+ export type { EntitiesConvertRequestBody } from './schemas/EntitiesConvertRequestBody';
466
474
  export type { EntitiesForImport } from './schemas/EntitiesForImport';
467
475
  export type { EntitiesGroups } from './schemas/EntitiesGroups';
468
476
  export type { EntitiesGroupsResponse } from './schemas/EntitiesGroupsResponse';
469
477
  export type { EntityColumnDetails } from './schemas/EntityColumnDetails';
470
478
  export type { EntityConvertResponse } from './schemas/EntityConvertResponse';
479
+ export type { EntityConvertV2Response } from './schemas/EntityConvertV2Response';
471
480
  export type { EntityCreateRequest } from './schemas/EntityCreateRequest';
472
481
  export type { EntityFilterQueryRequest } from './schemas/EntityFilterQueryRequest';
473
482
  export type { EntityFiltersResponse } from './schemas/EntityFiltersResponse';
@@ -501,6 +510,10 @@ export type { GitIntegrationRequest } from './schemas/GitIntegrationRequest';
501
510
  export type { GitMetadataUpdateRequest } from './schemas/GitMetadataUpdateRequest';
502
511
  export type { GitMoveDetails } from './schemas/GitMoveDetails';
503
512
  export type { GitUpdateDetails } from './schemas/GitUpdateDetails';
513
+ export type { GraphEdge } from './schemas/GraphEdge';
514
+ export type { GraphMetadata } from './schemas/GraphMetadata';
515
+ export type { GraphNode } from './schemas/GraphNode';
516
+ export type { GraphTraversalResponse } from './schemas/GraphTraversalResponse';
504
517
  export type { Group } from './schemas/Group';
505
518
  export type { GroupRequest } from './schemas/GroupRequest';
506
519
  export type { GroupResponse } from './schemas/GroupResponse';
@@ -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';
@@ -120,6 +121,7 @@ export { saveHomePageLayoutInfo, useSaveHomePageLayoutInfoMutation, } from './ho
120
121
  export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
121
122
  export { scorecardRecalibrate, useScorecardRecalibrateMutation, } from './hooks/useScorecardRecalibrateMutation';
122
123
  export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
124
+ export { traverseEntityGraph, useTraverseEntityGraphQuery, } from './hooks/useTraverseEntityGraphQuery';
123
125
  export { triggerAggregationRuleComputation, useTriggerAggregationRuleComputationMutation, } from './hooks/useTriggerAggregationRuleComputationMutation';
124
126
  export { unlinkIntegrationEntities, useUnlinkIntegrationEntitiesMutation, } from './hooks/useUnlinkIntegrationEntitiesMutation';
125
127
  export { updateAggregationRule, useUpdateAggregationRuleMutation, } from './hooks/useUpdateAggregationRuleMutation';
@@ -0,0 +1,2 @@
1
+ import type { EntitiesConvertRequestBody } from '../schemas/EntitiesConvertRequestBody';
2
+ export type EntitiesConvertRequestBodyRequestBody = EntitiesConvertRequestBody[];
@@ -0,0 +1,2 @@
1
+ import type { EntityConvertV2Response } from '../schemas/EntityConvertV2Response';
2
+ export type EntityConvertResponseBodyListResponse = EntityConvertV2Response[];
@@ -0,0 +1,2 @@
1
+ import type { GraphTraversalResponse } from '../schemas/GraphTraversalResponse';
2
+ export type GraphTraversalResponseResponse = GraphTraversalResponse;
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Entity Convert V2 Body
3
+ */
4
+ export interface EntityConvertV2Response {
5
+ entity_ref: string;
6
+ yaml: string;
7
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Represents a directed edge in the catalog entity graph
3
+ */
4
+ export interface GraphEdge {
5
+ /**
6
+ * BFS traversal depth at which this edge was discovered
7
+ * @example 1
8
+ */
9
+ depth: number;
10
+ /**
11
+ * Relationship type (dependsOn, providesApi, consumesApi, ownedBy, etc.)
12
+ * @example "dependsOn"
13
+ */
14
+ relation: string;
15
+ /**
16
+ * The reverse/inverse of the relation type (e.g., dependsOn → dependencyOf)
17
+ * @example "dependencyOf"
18
+ */
19
+ reverseRelation?: string;
20
+ /**
21
+ * Source entity reference (matches GraphNode.entityRef)
22
+ * @example "component:account/payment-service"
23
+ */
24
+ source: string;
25
+ /**
26
+ * Target entity reference (matches GraphNode.entityRef)
27
+ * @example "component:account/order-service"
28
+ */
29
+ target: string;
30
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Metadata about the graph traversal results
3
+ */
4
+ export interface GraphMetadata {
5
+ /**
6
+ * The starting entity reference for the traversal
7
+ * @example "component:account/payment-service"
8
+ */
9
+ baseEntityRef: string;
10
+ /**
11
+ * Maximum depth reached during traversal
12
+ * @example 2
13
+ */
14
+ maxDepthReached: number;
15
+ /**
16
+ * Total number of edges in the result
17
+ * @example 15
18
+ */
19
+ totalEdges: number;
20
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Represents a node in the catalog entity graph
3
+ */
4
+ export interface GraphNode {
5
+ /**
6
+ * Unique entity reference in format kind:account[.org[.project]]/identifier
7
+ * @example "component:account/payment-service"
8
+ */
9
+ entityRef: string;
10
+ /**
11
+ * Entity kind (component, api, resource, group, etc.)
12
+ * @example "component"
13
+ */
14
+ kind: string;
15
+ /**
16
+ * Human-readable entity name
17
+ * @example "payment-service"
18
+ */
19
+ name: string;
20
+ /**
21
+ * Entity type (service, library, website, openapi, etc.)
22
+ * @example "service"
23
+ */
24
+ type?: string;
25
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { GraphEdge } from '../schemas/GraphEdge';
2
+ import type { GraphMetadata } from '../schemas/GraphMetadata';
3
+ import type { GraphNode } from '../schemas/GraphNode';
4
+ /**
5
+ * Response containing the graph traversal results with a normalized structure of nodes and edges
6
+ */
7
+ export interface GraphTraversalResponse {
8
+ /**
9
+ * List of edges connecting the nodes
10
+ */
11
+ edges: GraphEdge[];
12
+ metadata: GraphMetadata;
13
+ /**
14
+ * List of unique nodes discovered during traversal
15
+ */
16
+ nodes: GraphNode[];
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.102.1",
3
+ "version": "0.103.1",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",