@harnessio/react-rmg-service-client 0.55.0 → 0.56.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/rmg-service/src/services/hooks/useDeleteReleaseMutation.d.ts +25 -0
- package/dist/rmg-service/src/services/hooks/useDeleteReleaseMutation.js +14 -0
- package/dist/rmg-service/src/services/index.d.ts +3 -0
- package/dist/rmg-service/src/services/index.js +1 -0
- package/dist/rmg-service/src/services/responses/DeleteReleaseResponseResponse.d.ts +14 -0
- package/dist/rmg-service/src/services/responses/DeleteReleaseResponseResponse.js +4 -0
- package/dist/rmg-service/src/services/schemas/ReleaseDto.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { DeleteReleaseResponseResponse } from '../responses/DeleteReleaseResponseResponse';
|
|
3
|
+
import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface DeleteReleaseMutationPathParams {
|
|
7
|
+
releaseId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DeleteReleaseMutationQueryParams {
|
|
10
|
+
orgIdentifier?: string;
|
|
11
|
+
projectIdentifier?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DeleteReleaseMutationHeaderParams {
|
|
14
|
+
'Harness-Account': string;
|
|
15
|
+
}
|
|
16
|
+
export type DeleteReleaseOkResponse = ResponseWithPagination<DeleteReleaseResponseResponse>;
|
|
17
|
+
export type DeleteReleaseErrorResponse = ErrorResponseResponse;
|
|
18
|
+
export interface DeleteReleaseProps extends DeleteReleaseMutationPathParams, Omit<FetcherOptions<DeleteReleaseMutationQueryParams, unknown, DeleteReleaseMutationHeaderParams>, 'url'> {
|
|
19
|
+
queryParams: DeleteReleaseMutationQueryParams;
|
|
20
|
+
}
|
|
21
|
+
export declare function deleteRelease(props: DeleteReleaseProps): Promise<DeleteReleaseOkResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Delete a release. For ADHOC releases, deletes both the release and its stub release group. For RECURRING releases, deletes only the release. The identifier can be either the slug_id or UUID of the release. Cannot delete releases in Running, Paused, or InputWaiting states.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useDeleteReleaseMutation(options?: Omit<UseMutationOptions<DeleteReleaseOkResponse, DeleteReleaseErrorResponse, DeleteReleaseProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteReleaseOkResponse, import("..").Error, DeleteReleaseProps, 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 deleteRelease(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/release/${props.releaseId}`, method: 'DELETE' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Delete a release. For ADHOC releases, deletes both the release and its stub release group. For RECURRING releases, deletes only the release. The identifier can be either the slug_id or UUID of the release. Cannot delete releases in Running, Paused, or InputWaiting states.
|
|
11
|
+
*/
|
|
12
|
+
export function useDeleteReleaseMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => deleteRelease(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -9,6 +9,8 @@ export type { DeleteOrchestrationProcessErrorResponse, DeleteOrchestrationProces
|
|
|
9
9
|
export { deleteOrchestrationProcess, useDeleteOrchestrationProcessMutation, } from './hooks/useDeleteOrchestrationProcessMutation';
|
|
10
10
|
export type { DeleteReleaseGroupErrorResponse, DeleteReleaseGroupMutationPathParams, DeleteReleaseGroupMutationQueryParams, DeleteReleaseGroupOkResponse, DeleteReleaseGroupProps, } from './hooks/useDeleteReleaseGroupMutation';
|
|
11
11
|
export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
|
|
12
|
+
export type { DeleteReleaseErrorResponse, DeleteReleaseMutationPathParams, DeleteReleaseMutationQueryParams, DeleteReleaseOkResponse, DeleteReleaseProps, } from './hooks/useDeleteReleaseMutation';
|
|
13
|
+
export { deleteRelease, useDeleteReleaseMutation } from './hooks/useDeleteReleaseMutation';
|
|
12
14
|
export type { DeleteTaskCommentErrorResponse, DeleteTaskCommentMutationPathParams, DeleteTaskCommentMutationQueryParams, DeleteTaskCommentOkResponse, DeleteTaskCommentProps, } from './hooks/useDeleteTaskCommentMutation';
|
|
13
15
|
export { deleteTaskComment, useDeleteTaskCommentMutation, } from './hooks/useDeleteTaskCommentMutation';
|
|
14
16
|
export type { GetActivityRetryHistoryByIdentifiersErrorResponse, GetActivityRetryHistoryByIdentifiersOkResponse, GetActivityRetryHistoryByIdentifiersProps, GetActivityRetryHistoryByIdentifiersQueryPathParams, GetActivityRetryHistoryByIdentifiersQueryQueryParams, } from './hooks/useGetActivityRetryHistoryByIdentifiersQuery';
|
|
@@ -158,6 +160,7 @@ export type { CreateOrchestrationProcessResponseResponse } from './responses/Cre
|
|
|
158
160
|
export type { CreateReleaseGroupResponseResponse } from './responses/CreateReleaseGroupResponseResponse';
|
|
159
161
|
export type { CreateTaskCommentResponseResponse } from './responses/CreateTaskCommentResponseResponse';
|
|
160
162
|
export type { DeleteReleaseGroupResponseResponse } from './responses/DeleteReleaseGroupResponseResponse';
|
|
163
|
+
export type { DeleteReleaseResponseResponse } from './responses/DeleteReleaseResponseResponse';
|
|
161
164
|
export type { EnvironmentDashboardResponseResponse } from './responses/EnvironmentDashboardResponseResponse';
|
|
162
165
|
export type { EnvironmentListPerReleaseResponseResponse } from './responses/EnvironmentListPerReleaseResponseResponse';
|
|
163
166
|
export type { ErrorResponseResponse } from './responses/ErrorResponseResponse';
|
|
@@ -3,6 +3,7 @@ export { deleteOrchestrationActivity, useDeleteOrchestrationActivityMutation, }
|
|
|
3
3
|
export { deleteOrchestrationProcessInput, useDeleteOrchestrationProcessInputMutation, } from './hooks/useDeleteOrchestrationProcessInputMutation';
|
|
4
4
|
export { deleteOrchestrationProcess, useDeleteOrchestrationProcessMutation, } from './hooks/useDeleteOrchestrationProcessMutation';
|
|
5
5
|
export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
|
|
6
|
+
export { deleteRelease, useDeleteReleaseMutation } from './hooks/useDeleteReleaseMutation';
|
|
6
7
|
export { deleteTaskComment, useDeleteTaskCommentMutation, } from './hooks/useDeleteTaskCommentMutation';
|
|
7
8
|
export { getActivityRetryHistoryByIdentifiers, useGetActivityRetryHistoryByIdentifiersQuery, } from './hooks/useGetActivityRetryHistoryByIdentifiersQuery';
|
|
8
9
|
export { getEventsByEntityTypeAndId, useGetEventsByEntityTypeAndIdQuery, } from './hooks/useGetEventsByEntityTypeAndIdQuery';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface DeleteReleaseResponseResponse {
|
|
2
|
+
/**
|
|
3
|
+
* UUID of the deleted release
|
|
4
|
+
*/
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* Source of the deleted release (ADHOC or RECURRING)
|
|
8
|
+
*/
|
|
9
|
+
source: string;
|
|
10
|
+
/**
|
|
11
|
+
* Indicates whether the deletion was successful
|
|
12
|
+
*/
|
|
13
|
+
success: boolean;
|
|
14
|
+
}
|
|
@@ -47,6 +47,10 @@ export interface ReleaseDto {
|
|
|
47
47
|
* Identifier for the release group
|
|
48
48
|
*/
|
|
49
49
|
releaseGroupId: string;
|
|
50
|
+
/**
|
|
51
|
+
* Source of the release (ADHOC for ad hoc releases, RECURRING for scheduled releases)
|
|
52
|
+
*/
|
|
53
|
+
source?: 'ADHOC' | 'RECURRING';
|
|
50
54
|
/**
|
|
51
55
|
* Current status of the release
|
|
52
56
|
*/
|