@harnessio/react-idp-service-client 0.99.0 → 0.100.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.
@@ -1,4 +1,5 @@
1
1
  import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { EnvironmentProxyResponse } from '../schemas/EnvironmentProxyResponse';
2
3
  import type { EnvironmentProxyCreateRequest } from '../schemas/EnvironmentProxyCreateRequest';
3
4
  import type { ResponseWithPagination } from '../helpers';
4
5
  import { FetcherOptions } from '../../../../custom-idp-fetcher/index.js';
@@ -11,7 +12,7 @@ export interface CreateCompileAndExecuteEnvironmentMutationHeaderParams {
11
12
  'Harness-Account'?: string;
12
13
  }
13
14
  export type CreateCompileAndExecuteEnvironmentRequestBody = EnvironmentProxyCreateRequest;
14
- export type CreateCompileAndExecuteEnvironmentOkResponse = ResponseWithPagination<unknown>;
15
+ export type CreateCompileAndExecuteEnvironmentOkResponse = ResponseWithPagination<EnvironmentProxyResponse>;
15
16
  export type CreateCompileAndExecuteEnvironmentErrorResponse = unknown;
16
17
  export interface CreateCompileAndExecuteEnvironmentProps extends Omit<FetcherOptions<CreateCompileAndExecuteEnvironmentMutationQueryParams, CreateCompileAndExecuteEnvironmentRequestBody, CreateCompileAndExecuteEnvironmentMutationHeaderParams>, 'url'> {
17
18
  queryParams: CreateCompileAndExecuteEnvironmentMutationQueryParams;
@@ -0,0 +1,26 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ResponseWithPagination } from '../helpers';
3
+ import { FetcherOptions } from '../../../../custom-idp-fetcher/index.js';
4
+ export interface GetEntityContentQueryPathParams {
5
+ scope: string;
6
+ kind: string;
7
+ identifier: string;
8
+ }
9
+ export interface GetEntityContentQueryQueryParams {
10
+ orgIdentifier?: string;
11
+ projectIdentifier?: string;
12
+ path: string;
13
+ }
14
+ export interface GetEntityContentQueryHeaderParams {
15
+ 'Harness-Account'?: string;
16
+ }
17
+ export type GetEntityContentOkResponse = ResponseWithPagination<unknown>;
18
+ export type GetEntityContentErrorResponse = unknown;
19
+ export interface GetEntityContentProps extends GetEntityContentQueryPathParams, Omit<FetcherOptions<GetEntityContentQueryQueryParams, unknown, GetEntityContentQueryHeaderParams>, 'url'> {
20
+ queryParams: GetEntityContentQueryQueryParams;
21
+ }
22
+ export declare function getEntityContent(props: GetEntityContentProps): Promise<GetEntityContentOkResponse>;
23
+ /**
24
+ * Get file content associated with a catalog entity from GCS.
25
+ */
26
+ export declare function useGetEntityContentQuery(props: GetEntityContentProps, options?: Omit<UseQueryOptions<GetEntityContentOkResponse, GetEntityContentErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetEntityContentOkResponse, 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 getEntityContent(props) {
7
+ return fetcher(Object.assign({ url: `/v1/entities/${props.scope}/${props.kind}/${props.identifier}/content`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get file content associated with a catalog entity from GCS.
11
+ */
12
+ export function useGetEntityContentQuery(props, options) {
13
+ return useQuery(['get-entity-content', props.scope, props.kind, props.identifier, props.queryParams], ({ signal }) => getEntityContent(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -127,6 +127,8 @@ export type { GetEntitiesErrorResponse, GetEntitiesOkResponse, GetEntitiesProps,
127
127
  export { getEntities, useGetEntitiesQuery } from './hooks/useGetEntitiesQuery';
128
128
  export type { GetEntityAssociationsErrorResponse, GetEntityAssociationsOkResponse, GetEntityAssociationsProps, GetEntityAssociationsQueryPathParams, GetEntityAssociationsQueryQueryParams, } from './hooks/useGetEntityAssociationsQuery';
129
129
  export { getEntityAssociations, useGetEntityAssociationsQuery, } from './hooks/useGetEntityAssociationsQuery';
130
+ export type { GetEntityContentErrorResponse, GetEntityContentOkResponse, GetEntityContentProps, GetEntityContentQueryPathParams, GetEntityContentQueryQueryParams, } from './hooks/useGetEntityContentQuery';
131
+ export { getEntityContent, useGetEntityContentQuery } from './hooks/useGetEntityContentQuery';
130
132
  export type { GetEntityFacetsErrorResponse, GetEntityFacetsOkResponse, GetEntityFacetsProps, GetEntityFacetsQueryQueryParams, } from './hooks/useGetEntityFacetsQuery';
131
133
  export { getEntityFacets, useGetEntityFacetsQuery } from './hooks/useGetEntityFacetsQuery';
132
134
  export type { GetEntityErrorResponse, GetEntityOkResponse, GetEntityProps, GetEntityQueryPathParams, GetEntityQueryQueryParams, } from './hooks/useGetEntityQuery';
@@ -484,6 +486,7 @@ export type { EnvironmentBluePrintInfoResponse } from './schemas/EnvironmentBlue
484
486
  export type { EnvironmentBluePrintVersionInfo } from './schemas/EnvironmentBluePrintVersionInfo';
485
487
  export type { EnvironmentBlueprintInfoRequest } from './schemas/EnvironmentBlueprintInfoRequest';
486
488
  export type { EnvironmentProxyCreateRequest } from './schemas/EnvironmentProxyCreateRequest';
489
+ export type { EnvironmentProxyResponse } from './schemas/EnvironmentProxyResponse';
487
490
  export type { EvaluationData } from './schemas/EvaluationData';
488
491
  export type { ExportDetails } from './schemas/ExportDetails';
489
492
  export type { Exports } from './schemas/Exports';
@@ -62,6 +62,7 @@ export { getEntitiesGroups, useGetEntitiesGroupsQuery } from './hooks/useGetEnti
62
62
  export { getEntitiesKinds, useGetEntitiesKindsQuery } from './hooks/useGetEntitiesKindsQuery';
63
63
  export { getEntities, useGetEntitiesQuery } from './hooks/useGetEntitiesQuery';
64
64
  export { getEntityAssociations, useGetEntityAssociationsQuery, } from './hooks/useGetEntityAssociationsQuery';
65
+ export { getEntityContent, useGetEntityContentQuery } from './hooks/useGetEntityContentQuery';
65
66
  export { getEntityFacets, useGetEntityFacetsQuery } from './hooks/useGetEntityFacetsQuery';
66
67
  export { getEntity, useGetEntityQuery } from './hooks/useGetEntityQuery';
67
68
  export { getEntityRefs, useGetEntityRefsQuery } from './hooks/useGetEntityRefsQuery';
@@ -17,6 +17,12 @@ export interface EntityResponse {
17
17
  is_valid?: boolean;
18
18
  };
19
19
  git_details?: GitDetails;
20
+ /**
21
+ * OPA policy evaluation metadata. Present only when OPA governance is enabled for IDP catalog entities.
22
+ */
23
+ governance_metadata?: {
24
+ [key: string]: any;
25
+ };
20
26
  groups?: Array<{
21
27
  group_description?: string;
22
28
  group_icon?: string;
@@ -12,6 +12,12 @@ export interface EntityVersionResponse {
12
12
  */
13
13
  deprecatedAt?: number;
14
14
  description?: string;
15
+ /**
16
+ * OPA policy evaluation metadata. Present only when OPA governance is enabled for IDP catalog entities.
17
+ */
18
+ governance_metadata?: {
19
+ [key: string]: any;
20
+ };
15
21
  identifier: string;
16
22
  kind: 'aiasset' | 'aidependency' | 'api' | 'component' | 'environment' | 'environmentblueprint' | 'group' | 'hierarchy' | 'resource' | 'system' | 'user' | 'workflow';
17
23
  orgIdentifier?: string;
@@ -0,0 +1,14 @@
1
+ export interface EnvironmentProxyResponse {
2
+ /**
3
+ * OPA policy evaluation metadata. Present only when OPA governance is enabled for IDP catalog entities.
4
+ */
5
+ governance_metadata?: {
6
+ [key: string]: any;
7
+ };
8
+ /**
9
+ * The compile/execute response from the environment orchestrator.
10
+ */
11
+ response?: {
12
+ [key: string]: any;
13
+ };
14
+ }
@@ -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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.99.0",
3
+ "version": "0.100.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",