@harnessio/react-idp-service-client 0.71.0 → 0.72.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.
@@ -0,0 +1,29 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { DefaultSaveResponseResponse } from '../responses/DefaultSaveResponseResponse';
3
+ import type { EntityMoveRequestBodyRequestBody } from '../requestBodies/EntityMoveRequestBodyRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface MoveEntityMutationPathParams {
7
+ scope: string;
8
+ kind: string;
9
+ identifier: string;
10
+ }
11
+ export interface MoveEntityMutationQueryParams {
12
+ orgIdentifier?: string;
13
+ projectIdentifier?: string;
14
+ }
15
+ export interface MoveEntityMutationHeaderParams {
16
+ 'Harness-Account'?: string;
17
+ }
18
+ export type MoveEntityRequestBody = EntityMoveRequestBodyRequestBody;
19
+ export type MoveEntityOkResponse = ResponseWithPagination<DefaultSaveResponseResponse>;
20
+ export type MoveEntityErrorResponse = unknown;
21
+ export interface MoveEntityProps extends MoveEntityMutationPathParams, Omit<FetcherOptions<MoveEntityMutationQueryParams, MoveEntityRequestBody, MoveEntityMutationHeaderParams>, 'url'> {
22
+ queryParams: MoveEntityMutationQueryParams;
23
+ body: MoveEntityRequestBody;
24
+ }
25
+ export declare function moveEntity(props: MoveEntityProps): Promise<MoveEntityOkResponse>;
26
+ /**
27
+ * Move an Entity.
28
+ */
29
+ export declare function useMoveEntityMutation(options?: Omit<UseMutationOptions<MoveEntityOkResponse, MoveEntityErrorResponse, MoveEntityProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<MoveEntityOkResponse, unknown, MoveEntityProps, 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 moveEntity(props) {
7
+ return fetcher(Object.assign({ url: `/v1/entities/move/${props.scope}/${props.kind}/${props.identifier}`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Move an Entity.
11
+ */
12
+ export function useMoveEntityMutation(options) {
13
+ return useMutation((mutateProps) => moveEntity(mutateProps), options);
14
+ }
@@ -135,6 +135,8 @@ export type { ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesOkRespons
135
135
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
136
136
  export type { LayoutIngestErrorResponse, LayoutIngestOkResponse, LayoutIngestProps, LayoutIngestRequestBody, } from './hooks/useLayoutIngestMutation';
137
137
  export { layoutIngest, useLayoutIngestMutation } from './hooks/useLayoutIngestMutation';
138
+ export type { MoveEntityErrorResponse, MoveEntityMutationPathParams, MoveEntityMutationQueryParams, MoveEntityOkResponse, MoveEntityProps, MoveEntityRequestBody, } from './hooks/useMoveEntityMutation';
139
+ export { moveEntity, useMoveEntityMutation } from './hooks/useMoveEntityMutation';
138
140
  export type { OnboardingGenerateYamlErrorResponse, OnboardingGenerateYamlOkResponse, OnboardingGenerateYamlProps, OnboardingGenerateYamlRequestBody, } from './hooks/useOnboardingGenerateYamlMutation';
139
141
  export { onboardingGenerateYaml, useOnboardingGenerateYamlMutation, } from './hooks/useOnboardingGenerateYamlMutation';
140
142
  export type { PostOnboardingSkipErrorResponse, PostOnboardingSkipOkResponse, PostOnboardingSkipProps, PostOnboardingSkipRequestBody, } from './hooks/usePostOnboardingSkipMutation';
@@ -187,6 +189,7 @@ export type { ConnectorInfoRequestRequestBody } from './requestBodies/ConnectorI
187
189
  export type { CustomPluginCreateRequestRequestBody } from './requestBodies/CustomPluginCreateRequestRequestBody';
188
190
  export type { CustomPluginInfoRequestRequestBody } from './requestBodies/CustomPluginInfoRequestRequestBody';
189
191
  export type { EntityCreateRequestBodyRequestBody } from './requestBodies/EntityCreateRequestBodyRequestBody';
192
+ export type { EntityMoveRequestBodyRequestBody } from './requestBodies/EntityMoveRequestBodyRequestBody';
190
193
  export type { EntityRequestBodyRequestBody } from './requestBodies/EntityRequestBodyRequestBody';
191
194
  export type { EntityUpdateRequestBodyRequestBody } from './requestBodies/EntityUpdateRequestBodyRequestBody';
192
195
  export type { GenerateYamlRequestRequestBody } from './requestBodies/GenerateYamlRequestRequestBody';
@@ -316,6 +319,8 @@ export type { EntityCreateRequest } from './schemas/EntityCreateRequest';
316
319
  export type { EntityFiltersResponse } from './schemas/EntityFiltersResponse';
317
320
  export type { EntityJsonSchemaResponse } from './schemas/EntityJsonSchemaResponse';
318
321
  export type { EntityKindsResponse } from './schemas/EntityKindsResponse';
322
+ export type { EntityMoveOperationType } from './schemas/EntityMoveOperationType';
323
+ export type { EntityMoveRequest } from './schemas/EntityMoveRequest';
319
324
  export type { EntityRefs } from './schemas/EntityRefs';
320
325
  export type { EntityRequest } from './schemas/EntityRequest';
321
326
  export type { EntityResponse } from './schemas/EntityResponse';
@@ -329,6 +334,7 @@ export type { GitDetails } from './schemas/GitDetails';
329
334
  export type { GitImportDetails } from './schemas/GitImportDetails';
330
335
  export type { GitIntegrationRequest } from './schemas/GitIntegrationRequest';
331
336
  export type { GitMetadataUpdateRequest } from './schemas/GitMetadataUpdateRequest';
337
+ export type { GitMoveDetails } from './schemas/GitMoveDetails';
332
338
  export type { GitUpdateDetails } from './schemas/GitUpdateDetails';
333
339
  export type { Group } from './schemas/Group';
334
340
  export type { GroupRequest } from './schemas/GroupRequest';
@@ -66,6 +66,7 @@ export { importCdEntities, useImportCdEntitiesMutation } from './hooks/useImport
66
66
  export { importEntity, useImportEntityMutation } from './hooks/useImportEntityMutation';
67
67
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
68
68
  export { layoutIngest, useLayoutIngestMutation } from './hooks/useLayoutIngestMutation';
69
+ export { moveEntity, useMoveEntityMutation } from './hooks/useMoveEntityMutation';
69
70
  export { onboardingGenerateYaml, useOnboardingGenerateYamlMutation, } from './hooks/useOnboardingGenerateYamlMutation';
70
71
  export { postOnboardingSkip, usePostOnboardingSkipMutation, } from './hooks/usePostOnboardingSkipMutation';
71
72
  export { postPluginRequest, usePostPluginRequestMutation, } from './hooks/usePostPluginRequestMutation';
@@ -0,0 +1,2 @@
1
+ import type { EntityMoveRequest } from '../schemas/EntityMoveRequest';
2
+ export type EntityMoveRequestBodyRequestBody = EntityMoveRequest;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Operation type to move the entity
3
+ */
4
+ export type EntityMoveOperationType = 'INLINE_TO_REMOTE' | 'REMOTE_TO_INLINE';
@@ -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,9 @@
1
+ import type { EntityMoveOperationType } from '../schemas/EntityMoveOperationType';
2
+ import type { GitMoveDetails } from '../schemas/GitMoveDetails';
3
+ /**
4
+ * Request body for moving an entity
5
+ */
6
+ export interface EntityMoveRequest {
7
+ entity_move_operation_type: EntityMoveOperationType;
8
+ git_details?: GitMoveDetails;
9
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Parameters related to moving an entity for Git Experience.
3
+ */
4
+ export interface GitMoveDetails {
5
+ /**
6
+ * Default branch name. This checks out the branch titled branch_name
7
+ */
8
+ base_branch?: string;
9
+ /**
10
+ * Name of the branch. When moving an inline pipeline or a remote pipeline, this branch is where the remote entity is created or fetched.
11
+ */
12
+ branch_name?: string;
13
+ /**
14
+ * Merge commit message.
15
+ */
16
+ commit_message?: string;
17
+ /**
18
+ * Harness connector id used for entity CRUD operations
19
+ */
20
+ connector_ref?: string;
21
+ /**
22
+ * File path of the entity in the repository.
23
+ */
24
+ file_path?: string;
25
+ /**
26
+ * Is Git Experience repo harness code.
27
+ */
28
+ is_harness_code_repo?: boolean;
29
+ /**
30
+ * Name of the repository.
31
+ */
32
+ repo_name?: string;
33
+ }
@@ -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.71.0",
3
+ "version": "0.72.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",