@harnessio/react-rmg-service-client 0.34.0 → 0.36.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/useGetReleaseGroupSummaryQuery.d.ts +1 -0
- package/dist/rmg-service/src/services/hooks/useGetReleaseTasksQuery.d.ts +30 -0
- package/dist/rmg-service/src/services/hooks/useGetReleaseTasksQuery.js +14 -0
- package/dist/rmg-service/src/services/hooks/usePostActivityExecutionOutputMutation.d.ts +29 -0
- package/dist/rmg-service/src/services/hooks/usePostActivityExecutionOutputMutation.js +14 -0
- package/dist/rmg-service/src/services/index.d.ts +5 -0
- package/dist/rmg-service/src/services/index.js +2 -0
- package/dist/rmg-service/src/services/responses/ReleaseTasksResponseResponse.d.ts +13 -0
- package/dist/rmg-service/src/services/responses/ReleaseTasksResponseResponse.js +1 -0
- package/dist/rmg-service/src/services/schemas/CreateOrchestrationActivityRequestType.d.ts +1 -1
- package/dist/rmg-service/src/services/schemas/ExecutionTaskDto.d.ts +0 -4
- package/dist/rmg-service/src/services/schemas/InputVariable.d.ts +1 -1
- package/dist/rmg-service/src/services/schemas/ReleaseDto.d.ts +1 -1
- package/dist/rmg-service/src/services/schemas/Status.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ReleaseTasksResponseResponse } from '../responses/ReleaseTasksResponseResponse';
|
|
3
|
+
import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface GetReleaseTasksQueryPathParams {
|
|
7
|
+
releaseId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetReleaseTasksQueryQueryParams {
|
|
10
|
+
orgIdentifier?: string;
|
|
11
|
+
cursor?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @default 500
|
|
14
|
+
*/
|
|
15
|
+
limit?: number;
|
|
16
|
+
status?: Array<'BLOCKED' | 'FAILED' | 'IN_PROGRESS' | 'SUCCEEDED' | 'TODO'>;
|
|
17
|
+
}
|
|
18
|
+
export interface GetReleaseTasksQueryHeaderParams {
|
|
19
|
+
'Harness-Account': string;
|
|
20
|
+
}
|
|
21
|
+
export type GetReleaseTasksOkResponse = ResponseWithPagination<ReleaseTasksResponseResponse>;
|
|
22
|
+
export type GetReleaseTasksErrorResponse = ErrorResponseResponse;
|
|
23
|
+
export interface GetReleaseTasksProps extends GetReleaseTasksQueryPathParams, Omit<FetcherOptions<GetReleaseTasksQueryQueryParams, unknown, GetReleaseTasksQueryHeaderParams>, 'url'> {
|
|
24
|
+
queryParams: GetReleaseTasksQueryQueryParams;
|
|
25
|
+
}
|
|
26
|
+
export declare function getReleaseTasks(props: GetReleaseTasksProps): Promise<GetReleaseTasksOkResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Fetch a paginated list of tasks from Manual Activities for a release with cursor-based pagination and optional status filtering.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useGetReleaseTasksQuery(props: GetReleaseTasksProps, options?: Omit<UseQueryOptions<GetReleaseTasksOkResponse, GetReleaseTasksErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetReleaseTasksOkResponse, import("..").Error>;
|
|
@@ -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 getReleaseTasks(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/release/${props.releaseId}/tasks`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Fetch a paginated list of tasks from Manual Activities for a release with cursor-based pagination and optional status filtering.
|
|
11
|
+
*/
|
|
12
|
+
export function useGetReleaseTasksQuery(props, options) {
|
|
13
|
+
return useQuery(['getReleaseTasks', props.releaseId, props.queryParams], ({ signal }) => getReleaseTasks(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
|
|
3
|
+
import type { ExecutionOutputDto } from '../schemas/ExecutionOutputDto';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface PostActivityExecutionOutputMutationPathParams {
|
|
7
|
+
activityId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface PostActivityExecutionOutputMutationQueryParams {
|
|
10
|
+
orgIdentifier?: string;
|
|
11
|
+
projectIdentifier?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PostActivityExecutionOutputMutationHeaderParams {
|
|
14
|
+
'Harness-Account': string;
|
|
15
|
+
}
|
|
16
|
+
export type PostActivityExecutionOutputRequestBody = {
|
|
17
|
+
outputs: ExecutionOutputDto[];
|
|
18
|
+
};
|
|
19
|
+
export type PostActivityExecutionOutputOkResponse = ResponseWithPagination<unknown>;
|
|
20
|
+
export type PostActivityExecutionOutputErrorResponse = ErrorResponseResponse;
|
|
21
|
+
export interface PostActivityExecutionOutputProps extends PostActivityExecutionOutputMutationPathParams, Omit<FetcherOptions<PostActivityExecutionOutputMutationQueryParams, PostActivityExecutionOutputRequestBody, PostActivityExecutionOutputMutationHeaderParams>, 'url'> {
|
|
22
|
+
queryParams: PostActivityExecutionOutputMutationQueryParams;
|
|
23
|
+
body: PostActivityExecutionOutputRequestBody;
|
|
24
|
+
}
|
|
25
|
+
export declare function postActivityExecutionOutput(props: PostActivityExecutionOutputProps): Promise<PostActivityExecutionOutputOkResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Submit outputs for a manual activity execution that is waiting for outputs
|
|
28
|
+
*/
|
|
29
|
+
export declare function usePostActivityExecutionOutputMutation(options?: Omit<UseMutationOptions<PostActivityExecutionOutputOkResponse, PostActivityExecutionOutputErrorResponse, PostActivityExecutionOutputProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PostActivityExecutionOutputOkResponse, import("..").Error, PostActivityExecutionOutputProps, 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 postActivityExecutionOutput(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/orchestration/execution/activity/${props.activityId}/output`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Submit outputs for a manual activity execution that is waiting for outputs
|
|
11
|
+
*/
|
|
12
|
+
export function usePostActivityExecutionOutputMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => postActivityExecutionOutput(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -67,8 +67,12 @@ export type { GetReleaseReleaseIdEnvironmentDashboardErrorResponse, GetReleaseRe
|
|
|
67
67
|
export { getReleaseReleaseIdEnvironmentDashboard, useGetReleaseReleaseIdEnvironmentDashboardQuery, } from './hooks/useGetReleaseReleaseIdEnvironmentDashboardQuery';
|
|
68
68
|
export type { GetReleaseReleaseIdEnvironmentsErrorResponse, GetReleaseReleaseIdEnvironmentsOkResponse, GetReleaseReleaseIdEnvironmentsProps, GetReleaseReleaseIdEnvironmentsQueryPathParams, GetReleaseReleaseIdEnvironmentsQueryQueryParams, } from './hooks/useGetReleaseReleaseIdEnvironmentsQuery';
|
|
69
69
|
export { getReleaseReleaseIdEnvironments, useGetReleaseReleaseIdEnvironmentsQuery, } from './hooks/useGetReleaseReleaseIdEnvironmentsQuery';
|
|
70
|
+
export type { GetReleaseTasksErrorResponse, GetReleaseTasksOkResponse, GetReleaseTasksProps, GetReleaseTasksQueryPathParams, GetReleaseTasksQueryQueryParams, } from './hooks/useGetReleaseTasksQuery';
|
|
71
|
+
export { getReleaseTasks, useGetReleaseTasksQuery } from './hooks/useGetReleaseTasksQuery';
|
|
70
72
|
export type { GetTaskCommentsSummaryErrorResponse, GetTaskCommentsSummaryOkResponse, GetTaskCommentsSummaryProps, GetTaskCommentsSummaryQueryPathParams, GetTaskCommentsSummaryQueryQueryParams, } from './hooks/useGetTaskCommentsSummaryQuery';
|
|
71
73
|
export { getTaskCommentsSummary, useGetTaskCommentsSummaryQuery, } from './hooks/useGetTaskCommentsSummaryQuery';
|
|
74
|
+
export type { PostActivityExecutionOutputErrorResponse, PostActivityExecutionOutputMutationPathParams, PostActivityExecutionOutputMutationQueryParams, PostActivityExecutionOutputOkResponse, PostActivityExecutionOutputProps, PostActivityExecutionOutputRequestBody, } from './hooks/usePostActivityExecutionOutputMutation';
|
|
75
|
+
export { postActivityExecutionOutput, usePostActivityExecutionOutputMutation, } from './hooks/usePostActivityExecutionOutputMutation';
|
|
72
76
|
export type { PostOnHoldActivityActionErrorResponse, PostOnHoldActivityActionMutationPathParams, PostOnHoldActivityActionMutationQueryParams, PostOnHoldActivityActionOkResponse, PostOnHoldActivityActionProps, PostOnHoldActivityActionRequestBody, } from './hooks/usePostOnHoldActivityActionMutation';
|
|
73
77
|
export { postOnHoldActivityAction, usePostOnHoldActivityActionMutation, } from './hooks/usePostOnHoldActivityActionMutation';
|
|
74
78
|
export type { PostOrchestrationActivityErrorResponse, PostOrchestrationActivityMutationQueryParams, PostOrchestrationActivityOkResponse, PostOrchestrationActivityProps, PostOrchestrationActivityRequestBody, } from './hooks/usePostOrchestrationActivityMutation';
|
|
@@ -150,6 +154,7 @@ export type { ReleaseDetailsResponseResponse } from './responses/ReleaseDetailsR
|
|
|
150
154
|
export type { ReleaseGroupComponentResponseResponse } from './responses/ReleaseGroupComponentResponseResponse';
|
|
151
155
|
export type { ReleaseGroupSummaryResponseResponse } from './responses/ReleaseGroupSummaryResponseResponse';
|
|
152
156
|
export type { ReleaseSummaryResponseResponse } from './responses/ReleaseSummaryResponseResponse';
|
|
157
|
+
export type { ReleaseTasksResponseResponse } from './responses/ReleaseTasksResponseResponse';
|
|
153
158
|
export type { TaskCommentsListResponseResponse } from './responses/TaskCommentsListResponseResponse';
|
|
154
159
|
export type { UpdateExecutionTaskMetadataResponseResponse } from './responses/UpdateExecutionTaskMetadataResponseResponse';
|
|
155
160
|
export type { UpdateExecutionTaskStatusResponseResponse } from './responses/UpdateExecutionTaskStatusResponseResponse';
|
|
@@ -32,7 +32,9 @@ export { getRelease, useGetReleaseQuery } from './hooks/useGetReleaseQuery';
|
|
|
32
32
|
export { getReleaseReleaseIdApprovals, useGetReleaseReleaseIdApprovalsQuery, } from './hooks/useGetReleaseReleaseIdApprovalsQuery';
|
|
33
33
|
export { getReleaseReleaseIdEnvironmentDashboard, useGetReleaseReleaseIdEnvironmentDashboardQuery, } from './hooks/useGetReleaseReleaseIdEnvironmentDashboardQuery';
|
|
34
34
|
export { getReleaseReleaseIdEnvironments, useGetReleaseReleaseIdEnvironmentsQuery, } from './hooks/useGetReleaseReleaseIdEnvironmentsQuery';
|
|
35
|
+
export { getReleaseTasks, useGetReleaseTasksQuery } from './hooks/useGetReleaseTasksQuery';
|
|
35
36
|
export { getTaskCommentsSummary, useGetTaskCommentsSummaryQuery, } from './hooks/useGetTaskCommentsSummaryQuery';
|
|
37
|
+
export { postActivityExecutionOutput, usePostActivityExecutionOutputMutation, } from './hooks/usePostActivityExecutionOutputMutation';
|
|
36
38
|
export { postOnHoldActivityAction, usePostOnHoldActivityActionMutation, } from './hooks/usePostOnHoldActivityActionMutation';
|
|
37
39
|
export { postOrchestrationActivity, usePostOrchestrationActivityMutation, } from './hooks/usePostOrchestrationActivityMutation';
|
|
38
40
|
export { postOrchestrationProcessAttachedReleaseGroups, usePostOrchestrationProcessAttachedReleaseGroupsMutation, } from './hooks/usePostOrchestrationProcessAttachedReleaseGroupsMutation';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NextRequest } from '../schemas/NextRequest';
|
|
2
|
+
import type { ExecutionTaskDto } from '../schemas/ExecutionTaskDto';
|
|
3
|
+
export interface ReleaseTasksResponseResponse {
|
|
4
|
+
/**
|
|
5
|
+
* Whether this is the last page of results
|
|
6
|
+
*/
|
|
7
|
+
last: boolean;
|
|
8
|
+
nextRequest: NextRequest;
|
|
9
|
+
/**
|
|
10
|
+
* List of tasks from manual activities.
|
|
11
|
+
*/
|
|
12
|
+
tasks: ExecutionTaskDto[];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -50,7 +50,7 @@ export interface ReleaseDto {
|
|
|
50
50
|
/**
|
|
51
51
|
* Current status of the release
|
|
52
52
|
*/
|
|
53
|
-
status: 'Aborted' | 'Failed' | 'Paused' | 'Running' | 'Scheduled' | 'Success';
|
|
53
|
+
status: 'Aborted' | 'Failed' | 'InputWaiting' | 'Paused' | 'Running' | 'Scheduled' | 'Success';
|
|
54
54
|
/**
|
|
55
55
|
* Version of the release
|
|
56
56
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Status of the stage.
|
|
3
3
|
*/
|
|
4
|
-
export type Status = 'ABORTED' | 'APPROVAL_REJECTED' | 'APPROVAL_WAITING' | 'ASYNC_WAITING' | 'DISCONTINUING' | 'ERROR' | 'ERRORED' | 'EXPIRED' | 'FAILED' | 'FREEZE_FAILED' | 'IGNORE_FAILED' | 'INPUT_WAITING' | 'INTERVENTION_WAITING' | 'ON_HOLD' | 'QUEUED' | 'REJECTED' | 'RESUMED' | 'RUNNING' | 'SCHEDULED' | 'SKIPPED' | 'STARTING' | 'STARTING_QUEUED_STEP' | 'SUCCEEDED' | 'SUCCESS' | 'SUSPENDED' | 'TASK_WAITING' | 'TIMED_WAITING' | 'UPLOAD_WAITING' | 'WAITING' | 'WAIT_STEP_RUNNING';
|
|
4
|
+
export type Status = 'ABORTED' | 'APPROVAL_REJECTED' | 'APPROVAL_WAITING' | 'ASYNC_WAITING' | 'DISCONTINUING' | 'ERROR' | 'ERRORED' | 'EXPIRED' | 'FAILED' | 'FREEZE_FAILED' | 'IGNORE_FAILED' | 'INPUT_WAITING' | 'INTERVENTION_WAITING' | 'ON_HOLD' | 'OUTPUT_WAITING' | 'QUEUED' | 'REJECTED' | 'RESUMED' | 'RUNNING' | 'SCHEDULED' | 'SKIPPED' | 'STARTING' | 'STARTING_QUEUED_STEP' | 'SUCCEEDED' | 'SUCCESS' | 'SUSPENDED' | 'TASK_WAITING' | 'TIMED_WAITING' | 'UPLOAD_WAITING' | 'WAITING' | 'WAIT_STEP_RUNNING';
|