@harnessio/react-idp-service-client 0.74.0 → 0.76.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.
Files changed (20) hide show
  1. package/dist/idp-service/src/services/hooks/useCreateEntityVersionMutation.d.ts +24 -0
  2. package/dist/idp-service/src/services/hooks/useCreateEntityVersionMutation.js +14 -0
  3. package/dist/idp-service/src/services/hooks/useGetEntityVersionQuery.d.ts +27 -0
  4. package/dist/idp-service/src/services/hooks/useGetEntityVersionQuery.js +21 -0
  5. package/dist/idp-service/src/services/hooks/useGetEntityVersionsQuery.d.ts +31 -0
  6. package/dist/idp-service/src/services/hooks/useGetEntityVersionsQuery.js +14 -0
  7. package/dist/idp-service/src/services/index.d.ts +11 -0
  8. package/dist/idp-service/src/services/index.js +3 -0
  9. package/dist/idp-service/src/services/requestBodies/EntityVersionCreateRequestBodyRequestBody.d.ts +2 -0
  10. package/dist/idp-service/src/services/requestBodies/EntityVersionCreateRequestBodyRequestBody.js +1 -0
  11. package/dist/idp-service/src/services/responses/EntityVersionResponseBodyListResponse.d.ts +2 -0
  12. package/dist/idp-service/src/services/responses/EntityVersionResponseBodyListResponse.js +1 -0
  13. package/dist/idp-service/src/services/responses/EntityVersionResponseBodyResponse.d.ts +2 -0
  14. package/dist/idp-service/src/services/responses/EntityVersionResponseBodyResponse.js +1 -0
  15. package/dist/idp-service/src/services/schemas/EntityResponse.d.ts +17 -0
  16. package/dist/idp-service/src/services/schemas/EntityVersionCreateRequest.d.ts +13 -0
  17. package/dist/idp-service/src/services/schemas/EntityVersionCreateRequest.js +4 -0
  18. package/dist/idp-service/src/services/schemas/EntityVersionResponse.d.ts +14 -0
  19. package/dist/idp-service/src/services/schemas/EntityVersionResponse.js +4 -0
  20. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { EntityVersionResponseBodyResponse } from '../responses/EntityVersionResponseBodyResponse';
3
+ import type { EntityVersionCreateRequestBodyRequestBody } from '../requestBodies/EntityVersionCreateRequestBodyRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface CreateEntityVersionMutationQueryParams {
7
+ orgIdentifier?: string;
8
+ projectIdentifier?: string;
9
+ }
10
+ export interface CreateEntityVersionMutationHeaderParams {
11
+ 'Harness-Account'?: string;
12
+ }
13
+ export type CreateEntityVersionRequestBody = EntityVersionCreateRequestBodyRequestBody;
14
+ export type CreateEntityVersionOkResponse = ResponseWithPagination<EntityVersionResponseBodyResponse>;
15
+ export type CreateEntityVersionErrorResponse = unknown;
16
+ export interface CreateEntityVersionProps extends Omit<FetcherOptions<CreateEntityVersionMutationQueryParams, CreateEntityVersionRequestBody, CreateEntityVersionMutationHeaderParams>, 'url'> {
17
+ queryParams: CreateEntityVersionMutationQueryParams;
18
+ body: CreateEntityVersionRequestBody;
19
+ }
20
+ export declare function createEntityVersion(props: CreateEntityVersionProps): Promise<CreateEntityVersionOkResponse>;
21
+ /**
22
+ * Create an EntityVersion.
23
+ */
24
+ export declare function useCreateEntityVersionMutation(options?: Omit<UseMutationOptions<CreateEntityVersionOkResponse, CreateEntityVersionErrorResponse, CreateEntityVersionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateEntityVersionOkResponse, unknown, CreateEntityVersionProps, 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 '../../../../fetcher/index.js';
6
+ export function createEntityVersion(props) {
7
+ return fetcher(Object.assign({ url: `/v1/entities/versions`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Create an EntityVersion.
11
+ */
12
+ export function useCreateEntityVersionMutation(options) {
13
+ return useMutation((mutateProps) => createEntityVersion(mutateProps), options);
14
+ }
@@ -0,0 +1,27 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { EntityVersionResponseBodyResponse } from '../responses/EntityVersionResponseBodyResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetEntityVersionQueryPathParams {
6
+ scope: string;
7
+ kind: string;
8
+ identifier: string;
9
+ version: string;
10
+ }
11
+ export interface GetEntityVersionQueryQueryParams {
12
+ orgIdentifier?: string;
13
+ projectIdentifier?: string;
14
+ }
15
+ export interface GetEntityVersionQueryHeaderParams {
16
+ 'Harness-Account'?: string;
17
+ }
18
+ export type GetEntityVersionOkResponse = ResponseWithPagination<EntityVersionResponseBodyResponse>;
19
+ export type GetEntityVersionErrorResponse = unknown;
20
+ export interface GetEntityVersionProps extends GetEntityVersionQueryPathParams, Omit<FetcherOptions<GetEntityVersionQueryQueryParams, unknown, GetEntityVersionQueryHeaderParams>, 'url'> {
21
+ queryParams: GetEntityVersionQueryQueryParams;
22
+ }
23
+ export declare function getEntityVersion(props: GetEntityVersionProps): Promise<GetEntityVersionOkResponse>;
24
+ /**
25
+ * Get Entity Version.
26
+ */
27
+ export declare function useGetEntityVersionQuery(props: GetEntityVersionProps, options?: Omit<UseQueryOptions<GetEntityVersionOkResponse, GetEntityVersionErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetEntityVersionOkResponse, unknown>;
@@ -0,0 +1,21 @@
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 getEntityVersion(props) {
7
+ return fetcher(Object.assign({ url: `/v1/entities/${props.scope}/${props.kind}/${props.identifier}/versions/${props.version}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get Entity Version.
11
+ */
12
+ export function useGetEntityVersionQuery(props, options) {
13
+ return useQuery([
14
+ 'get-entity-version',
15
+ props.scope,
16
+ props.kind,
17
+ props.identifier,
18
+ props.version,
19
+ props.queryParams,
20
+ ], ({ signal }) => getEntityVersion(Object.assign(Object.assign({}, props), { signal })), options);
21
+ }
@@ -0,0 +1,31 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { EntityVersionResponseBodyListResponse } from '../responses/EntityVersionResponseBodyListResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetEntityVersionsQueryPathParams {
6
+ scope: string;
7
+ kind: string;
8
+ identifier: string;
9
+ }
10
+ export interface GetEntityVersionsQueryQueryParams {
11
+ orgIdentifier?: string;
12
+ projectIdentifier?: string;
13
+ page?: number;
14
+ /**
15
+ * @default 10
16
+ */
17
+ limit?: number;
18
+ }
19
+ export interface GetEntityVersionsQueryHeaderParams {
20
+ 'Harness-Account'?: string;
21
+ }
22
+ export type GetEntityVersionsOkResponse = ResponseWithPagination<EntityVersionResponseBodyListResponse>;
23
+ export type GetEntityVersionsErrorResponse = unknown;
24
+ export interface GetEntityVersionsProps extends GetEntityVersionsQueryPathParams, Omit<FetcherOptions<GetEntityVersionsQueryQueryParams, unknown, GetEntityVersionsQueryHeaderParams>, 'url'> {
25
+ queryParams: GetEntityVersionsQueryQueryParams;
26
+ }
27
+ export declare function getEntityVersions(props: GetEntityVersionsProps): Promise<GetEntityVersionsOkResponse>;
28
+ /**
29
+ * Get Entity Versions.
30
+ */
31
+ export declare function useGetEntityVersionsQuery(props: GetEntityVersionsProps, options?: Omit<UseQueryOptions<GetEntityVersionsOkResponse, GetEntityVersionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetEntityVersionsOkResponse, 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 getEntityVersions(props) {
7
+ return fetcher(Object.assign({ url: `/v1/entities/${props.scope}/${props.kind}/${props.identifier}/versions`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get Entity Versions.
11
+ */
12
+ export function useGetEntityVersionsQuery(props, options) {
13
+ return useQuery(['get-entity-versions', props.scope, props.kind, props.identifier, props.queryParams], ({ signal }) => getEntityVersions(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -13,6 +13,8 @@ export type { CreateCheckErrorResponse, CreateCheckOkResponse, CreateCheckProps,
13
13
  export { createCheck, useCreateCheckMutation } from './hooks/useCreateCheckMutation';
14
14
  export type { CreateEntityErrorResponse, CreateEntityMutationQueryParams, CreateEntityOkResponse, CreateEntityProps, CreateEntityRequestBody, } from './hooks/useCreateEntityMutation';
15
15
  export { createEntity, useCreateEntityMutation } from './hooks/useCreateEntityMutation';
16
+ export type { CreateEntityVersionErrorResponse, CreateEntityVersionMutationQueryParams, CreateEntityVersionOkResponse, CreateEntityVersionProps, CreateEntityVersionRequestBody, } from './hooks/useCreateEntityVersionMutation';
17
+ export { createEntityVersion, useCreateEntityVersionMutation, } from './hooks/useCreateEntityVersionMutation';
16
18
  export type { CreateIntegrationErrorResponse, CreateIntegrationMutationPathParams, CreateIntegrationMutationQueryParams, CreateIntegrationOkResponse, CreateIntegrationProps, CreateIntegrationRequestBody, } from './hooks/useCreateIntegrationMutation';
17
19
  export { createIntegration, useCreateIntegrationMutation, } from './hooks/useCreateIntegrationMutation';
18
20
  export type { CreateLayoutErrorResponse, CreateLayoutOkResponse, CreateLayoutProps, CreateLayoutRequestBody, } from './hooks/useCreateLayoutMutation';
@@ -93,6 +95,10 @@ export type { GetEntityErrorResponse, GetEntityOkResponse, GetEntityProps, GetEn
93
95
  export { getEntity, useGetEntityQuery } from './hooks/useGetEntityQuery';
94
96
  export type { GetEntityRefsErrorResponse, GetEntityRefsOkResponse, GetEntityRefsProps, GetEntityRefsQueryQueryParams, } from './hooks/useGetEntityRefsQuery';
95
97
  export { getEntityRefs, useGetEntityRefsQuery } from './hooks/useGetEntityRefsQuery';
98
+ export type { GetEntityVersionErrorResponse, GetEntityVersionOkResponse, GetEntityVersionProps, GetEntityVersionQueryPathParams, GetEntityVersionQueryQueryParams, } from './hooks/useGetEntityVersionQuery';
99
+ export { getEntityVersion, useGetEntityVersionQuery } from './hooks/useGetEntityVersionQuery';
100
+ export type { GetEntityVersionsErrorResponse, GetEntityVersionsOkResponse, GetEntityVersionsProps, GetEntityVersionsQueryPathParams, GetEntityVersionsQueryQueryParams, } from './hooks/useGetEntityVersionsQuery';
101
+ export { getEntityVersions, useGetEntityVersionsQuery } from './hooks/useGetEntityVersionsQuery';
96
102
  export type { GetGroupDetailsErrorResponse, GetGroupDetailsOkResponse, GetGroupDetailsProps, GetGroupDetailsQueryPathParams, GetGroupDetailsQueryQueryParams, } from './hooks/useGetGroupDetailsQuery';
97
103
  export { getGroupDetails, useGetGroupDetailsQuery } from './hooks/useGetGroupDetailsQuery';
98
104
  export type { GetHarnessEntitiesCountErrorResponse, GetHarnessEntitiesCountOkResponse, GetHarnessEntitiesCountProps, } from './hooks/useGetHarnessEntitiesCountQuery';
@@ -198,6 +204,7 @@ export type { EntityFilterQueryRequestRequestBody } from './requestBodies/Entity
198
204
  export type { EntityMoveRequestBodyRequestBody } from './requestBodies/EntityMoveRequestBodyRequestBody';
199
205
  export type { EntityRequestBodyRequestBody } from './requestBodies/EntityRequestBodyRequestBody';
200
206
  export type { EntityUpdateRequestBodyRequestBody } from './requestBodies/EntityUpdateRequestBodyRequestBody';
207
+ export type { EntityVersionCreateRequestBodyRequestBody } from './requestBodies/EntityVersionCreateRequestBodyRequestBody';
201
208
  export type { GenerateYamlRequestRequestBody } from './requestBodies/GenerateYamlRequestRequestBody';
202
209
  export type { GitImportRequestBodyRequestBody } from './requestBodies/GitImportRequestBodyRequestBody';
203
210
  export type { GitMetadataUpdateRequestBodyRequestBody } from './requestBodies/GitMetadataUpdateRequestBodyRequestBody';
@@ -239,6 +246,8 @@ export type { EntityKindsResponseBodyResponse } from './responses/EntityKindsRes
239
246
  export type { EntityRefsResponseResponse } from './responses/EntityRefsResponseResponse';
240
247
  export type { EntityResponseBodyListResponse } from './responses/EntityResponseBodyListResponse';
241
248
  export type { EntityResponseBodyResponse } from './responses/EntityResponseBodyResponse';
249
+ export type { EntityVersionResponseBodyListResponse } from './responses/EntityVersionResponseBodyListResponse';
250
+ export type { EntityVersionResponseBodyResponse } from './responses/EntityVersionResponseBodyResponse';
242
251
  export type { GenerateYamlResponseResponse } from './responses/GenerateYamlResponseResponse';
243
252
  export type { GroupResponseListResponse } from './responses/GroupResponseListResponse';
244
253
  export type { GroupResponseResponse } from './responses/GroupResponseResponse';
@@ -333,6 +342,8 @@ export type { EntityRefs } from './schemas/EntityRefs';
333
342
  export type { EntityRequest } from './schemas/EntityRequest';
334
343
  export type { EntityResponse } from './schemas/EntityResponse';
335
344
  export type { EntityUpdateRequest } from './schemas/EntityUpdateRequest';
345
+ export type { EntityVersionCreateRequest } from './schemas/EntityVersionCreateRequest';
346
+ export type { EntityVersionResponse } from './schemas/EntityVersionResponse';
336
347
  export type { ExportDetails } from './schemas/ExportDetails';
337
348
  export type { Exports } from './schemas/Exports';
338
349
  export type { GenerateYamlRequest } from './schemas/GenerateYamlRequest';
@@ -5,6 +5,7 @@ export { createBackstageEnvVariables, useCreateBackstageEnvVariablesMutation, }
5
5
  export { createBackstagePermissions, useCreateBackstagePermissionsMutation, } from './hooks/useCreateBackstagePermissionsMutation';
6
6
  export { createCheck, useCreateCheckMutation } from './hooks/useCreateCheckMutation';
7
7
  export { createEntity, useCreateEntityMutation } from './hooks/useCreateEntityMutation';
8
+ export { createEntityVersion, useCreateEntityVersionMutation, } from './hooks/useCreateEntityVersionMutation';
8
9
  export { createIntegration, useCreateIntegrationMutation, } from './hooks/useCreateIntegrationMutation';
9
10
  export { createLayout, useCreateLayoutMutation } from './hooks/useCreateLayoutMutation';
10
11
  export { createPluginRequestV2, useCreatePluginRequestV2Mutation, } from './hooks/useCreatePluginRequestV2Mutation';
@@ -45,6 +46,8 @@ export { getEntities, useGetEntitiesQuery } from './hooks/useGetEntitiesQuery';
45
46
  export { getEntityFacets, useGetEntityFacetsQuery } from './hooks/useGetEntityFacetsQuery';
46
47
  export { getEntity, useGetEntityQuery } from './hooks/useGetEntityQuery';
47
48
  export { getEntityRefs, useGetEntityRefsQuery } from './hooks/useGetEntityRefsQuery';
49
+ export { getEntityVersion, useGetEntityVersionQuery } from './hooks/useGetEntityVersionQuery';
50
+ export { getEntityVersions, useGetEntityVersionsQuery } from './hooks/useGetEntityVersionsQuery';
48
51
  export { getGroupDetails, useGetGroupDetailsQuery } from './hooks/useGetGroupDetailsQuery';
49
52
  export { getHarnessEntitiesCount, useGetHarnessEntitiesCountQuery, } from './hooks/useGetHarnessEntitiesCountQuery';
50
53
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
@@ -0,0 +1,2 @@
1
+ import type { EntityVersionCreateRequest } from '../schemas/EntityVersionCreateRequest';
2
+ export type EntityVersionCreateRequestBodyRequestBody = EntityVersionCreateRequest;
@@ -0,0 +1,2 @@
1
+ import type { EntityVersionResponse } from '../schemas/EntityVersionResponse';
2
+ export type EntityVersionResponseBodyListResponse = EntityVersionResponse[];
@@ -0,0 +1,2 @@
1
+ import type { EntityVersionResponse } from '../schemas/EntityVersionResponse';
2
+ export type EntityVersionResponseBodyResponse = EntityVersionResponse;
@@ -5,6 +5,10 @@ import type { GitDetails } from '../schemas/GitDetails';
5
5
  */
6
6
  export interface EntityResponse {
7
7
  cache_response_data?: CacheResponseData;
8
+ /**
9
+ * @format int64
10
+ */
11
+ created?: number;
8
12
  decorator?: string;
9
13
  description?: string;
10
14
  entity_ref: string;
@@ -53,7 +57,20 @@ export interface EntityResponse {
53
57
  message?: string;
54
58
  type?: string;
55
59
  }>;
60
+ sto_details?: {
61
+ test_targets?: Array<{
62
+ name?: string;
63
+ org_name?: string;
64
+ project_name?: string;
65
+ scope?: string;
66
+ variant?: string;
67
+ }>;
68
+ };
56
69
  tags?: string[];
57
70
  type?: string;
71
+ /**
72
+ * @format int64
73
+ */
74
+ updated?: number;
58
75
  yaml: string;
59
76
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Entity Version Create Request Body
3
+ */
4
+ export interface EntityVersionCreateRequest {
5
+ /**
6
+ * Version of the Entity.
7
+ */
8
+ version: string;
9
+ /**
10
+ * Entity YAML (to be passed as a String).
11
+ */
12
+ yaml: string;
13
+ }
@@ -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,14 @@
1
+ /**
2
+ * Entity Version Response Body
3
+ */
4
+ export interface EntityVersionResponse {
5
+ identifier: string;
6
+ kind: 'api' | 'component' | 'environment' | 'environmentblueprint' | 'group' | 'resource' | 'system' | 'user' | 'workflow';
7
+ orgIdentifier?: string;
8
+ org_name?: string;
9
+ projectIdentifier?: string;
10
+ project_name?: string;
11
+ scope?: 'ACCOUNT' | 'ORGANIZATION' | 'PROJECT';
12
+ version: string;
13
+ yaml: string;
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.74.0",
3
+ "version": "0.76.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",