@harnessio/react-rmg-service-client 0.20.0 → 0.22.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/useGetOrchestrationExecutionActivitiesQuery.d.ts +7 -1
- package/dist/rmg-service/src/services/hooks/useGetOrchestrationExecutionActivitiesQuery.js +2 -2
- package/dist/rmg-service/src/services/hooks/useGetOrchestrationExecutionPhasesQuery.d.ts +3 -2
- package/dist/rmg-service/src/services/hooks/useStartReleaseExecutionMutation.d.ts +33 -0
- package/dist/rmg-service/src/services/hooks/useStartReleaseExecutionMutation.js +14 -0
- package/dist/rmg-service/src/services/index.d.ts +2 -0
- package/dist/rmg-service/src/services/index.js +1 -0
- package/dist/rmg-service/src/services/schemas/OrchestrationExecutionActivity.d.ts +14 -2
- package/dist/rmg-service/src/services/schemas/OrchestrationExecutionPhase.d.ts +7 -3
- package/dist/rmg-service/src/services/schemas/Status.d.ts +1 -1
- package/package.json +1 -1
package/dist/rmg-service/src/services/hooks/useGetOrchestrationExecutionActivitiesQuery.d.ts
CHANGED
|
@@ -5,10 +5,12 @@ import type { ResponseWithPagination } from '../helpers';
|
|
|
5
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
6
|
export interface GetOrchestrationExecutionActivitiesQueryPathParams {
|
|
7
7
|
releaseId: string;
|
|
8
|
-
|
|
8
|
+
phaseIdentifier: string;
|
|
9
9
|
}
|
|
10
10
|
export interface GetOrchestrationExecutionActivitiesQueryQueryParams {
|
|
11
|
+
phaseExecutionId?: string;
|
|
11
12
|
orgIdentifier?: string;
|
|
13
|
+
projectIdentifier?: string;
|
|
12
14
|
}
|
|
13
15
|
export interface GetOrchestrationExecutionActivitiesQueryHeaderParams {
|
|
14
16
|
'Harness-Account': string;
|
|
@@ -27,6 +29,10 @@ export type GetOrchestrationExecutionActivitiesOkResponse = ResponseWithPaginati
|
|
|
27
29
|
* ID of the release
|
|
28
30
|
*/
|
|
29
31
|
release_id: string;
|
|
32
|
+
/**
|
|
33
|
+
* Total number of currently running activities
|
|
34
|
+
*/
|
|
35
|
+
total_running_activities: number;
|
|
30
36
|
}>;
|
|
31
37
|
export type GetOrchestrationExecutionActivitiesErrorResponse = ErrorResponseResponse;
|
|
32
38
|
export interface GetOrchestrationExecutionActivitiesProps extends GetOrchestrationExecutionActivitiesQueryPathParams, Omit<FetcherOptions<GetOrchestrationExecutionActivitiesQueryQueryParams, unknown, GetOrchestrationExecutionActivitiesQueryHeaderParams>, 'url'> {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useQuery } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function getOrchestrationExecutionActivities(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/orchestration/execution/${props.releaseId}/phase/${props.
|
|
7
|
+
return fetcher(Object.assign({ url: `/orchestration/execution/${props.releaseId}/phase/${props.phaseIdentifier}/activities`, method: 'GET' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Retrieve all activities for a specific release and phase execution. If no activities exist in the database, it will fetch them from the phase YAML configuration.
|
|
@@ -13,7 +13,7 @@ export function useGetOrchestrationExecutionActivitiesQuery(props, options) {
|
|
|
13
13
|
return useQuery([
|
|
14
14
|
'get-orchestration-execution-activities',
|
|
15
15
|
props.releaseId,
|
|
16
|
-
props.
|
|
16
|
+
props.phaseIdentifier,
|
|
17
17
|
props.queryParams,
|
|
18
18
|
], ({ signal }) => getOrchestrationExecutionActivities(Object.assign(Object.assign({}, props), { signal })), options);
|
|
19
19
|
}
|
|
@@ -8,6 +8,7 @@ export interface GetOrchestrationExecutionPhasesQueryPathParams {
|
|
|
8
8
|
}
|
|
9
9
|
export interface GetOrchestrationExecutionPhasesQueryQueryParams {
|
|
10
10
|
orgIdentifier?: string;
|
|
11
|
+
projectIdentifier?: string;
|
|
11
12
|
}
|
|
12
13
|
export interface GetOrchestrationExecutionPhasesQueryHeaderParams {
|
|
13
14
|
'Harness-Account': string;
|
|
@@ -17,13 +18,13 @@ export type GetOrchestrationExecutionPhasesOkResponse = ResponseWithPagination<{
|
|
|
17
18
|
/**
|
|
18
19
|
* ID of the process execution
|
|
19
20
|
*/
|
|
20
|
-
process_execution_id
|
|
21
|
+
process_execution_id?: string;
|
|
21
22
|
/**
|
|
22
23
|
* ID of the release
|
|
23
24
|
*/
|
|
24
25
|
release_id: string;
|
|
25
26
|
/**
|
|
26
|
-
* Total number of running phases
|
|
27
|
+
* Total number of currently running phases
|
|
27
28
|
*/
|
|
28
29
|
total_running_phases: number;
|
|
29
30
|
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface StartReleaseExecutionMutationPathParams {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface StartReleaseExecutionMutationQueryParams {
|
|
9
|
+
orgIdentifier?: string;
|
|
10
|
+
projectIdentifier?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface StartReleaseExecutionMutationHeaderParams {
|
|
13
|
+
'Harness-Account': string;
|
|
14
|
+
}
|
|
15
|
+
export type StartReleaseExecutionOkResponse = ResponseWithPagination<{
|
|
16
|
+
/**
|
|
17
|
+
* Identifier of the started execution
|
|
18
|
+
*/
|
|
19
|
+
identifier: string;
|
|
20
|
+
/**
|
|
21
|
+
* YAML content of the release
|
|
22
|
+
*/
|
|
23
|
+
yaml: string;
|
|
24
|
+
}>;
|
|
25
|
+
export type StartReleaseExecutionErrorResponse = ErrorResponseResponse;
|
|
26
|
+
export interface StartReleaseExecutionProps extends StartReleaseExecutionMutationPathParams, Omit<FetcherOptions<StartReleaseExecutionMutationQueryParams, unknown, StartReleaseExecutionMutationHeaderParams>, 'url'> {
|
|
27
|
+
queryParams: StartReleaseExecutionMutationQueryParams;
|
|
28
|
+
}
|
|
29
|
+
export declare function startReleaseExecution(props: StartReleaseExecutionProps): Promise<StartReleaseExecutionOkResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Start a new release execution for the given identifier
|
|
32
|
+
*/
|
|
33
|
+
export declare function useStartReleaseExecutionMutation(options?: Omit<UseMutationOptions<StartReleaseExecutionOkResponse, StartReleaseExecutionErrorResponse, StartReleaseExecutionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<StartReleaseExecutionOkResponse, import("..").Error, StartReleaseExecutionProps, 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 startReleaseExecution(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/orchestration/execution/startRelease/${props.id}`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Start a new release execution for the given identifier
|
|
11
|
+
*/
|
|
12
|
+
export function useStartReleaseExecutionMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => startReleaseExecution(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -65,6 +65,8 @@ export type { PutReleaseGroupErrorResponse, PutReleaseGroupMutationPathParams, P
|
|
|
65
65
|
export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
|
|
66
66
|
export type { PutReleaseReleaseIdErrorResponse, PutReleaseReleaseIdMutationPathParams, PutReleaseReleaseIdOkResponse, PutReleaseReleaseIdProps, PutReleaseReleaseIdRequestBody, } from './hooks/usePutReleaseReleaseIdMutation';
|
|
67
67
|
export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
|
|
68
|
+
export type { StartReleaseExecutionErrorResponse, StartReleaseExecutionMutationPathParams, StartReleaseExecutionMutationQueryParams, StartReleaseExecutionOkResponse, StartReleaseExecutionProps, } from './hooks/useStartReleaseExecutionMutation';
|
|
69
|
+
export { startReleaseExecution, useStartReleaseExecutionMutation, } from './hooks/useStartReleaseExecutionMutation';
|
|
68
70
|
export type { UpdateReleaseConflictErrorResponse, UpdateReleaseConflictMutationPathParams, UpdateReleaseConflictOkResponse, UpdateReleaseConflictProps, UpdateReleaseConflictRequestBody, } from './hooks/useUpdateReleaseConflictMutation';
|
|
69
71
|
export { updateReleaseConflict, useUpdateReleaseConflictMutation, } from './hooks/useUpdateReleaseConflictMutation';
|
|
70
72
|
export type { CreateOrchestrationActivityInputStoreRequestRequestBody } from './requestBodies/CreateOrchestrationActivityInputStoreRequestRequestBody';
|
|
@@ -31,4 +31,5 @@ export { putOrchestrationProcessInputStore, usePutOrchestrationProcessInputStore
|
|
|
31
31
|
export { putOrchestrationProcess, usePutOrchestrationProcessMutation, } from './hooks/usePutOrchestrationProcessMutation';
|
|
32
32
|
export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
|
|
33
33
|
export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
|
|
34
|
+
export { startReleaseExecution, useStartReleaseExecutionMutation, } from './hooks/useStartReleaseExecutionMutation';
|
|
34
35
|
export { updateReleaseConflict, useUpdateReleaseConflictMutation, } from './hooks/useUpdateReleaseConflictMutation';
|
|
@@ -3,11 +3,19 @@ import type { Status } from '../schemas/Status';
|
|
|
3
3
|
* Represents an activity in the orchestration execution
|
|
4
4
|
*/
|
|
5
5
|
export interface OrchestrationExecutionActivity {
|
|
6
|
+
/**
|
|
7
|
+
* List of activity identifiers this activity depends on
|
|
8
|
+
*/
|
|
9
|
+
depends_on: string[];
|
|
10
|
+
/**
|
|
11
|
+
* Description of the activity
|
|
12
|
+
*/
|
|
13
|
+
description?: string;
|
|
6
14
|
/**
|
|
7
15
|
* End timestamp in milliseconds
|
|
8
16
|
* @format int64
|
|
9
17
|
*/
|
|
10
|
-
end_ts
|
|
18
|
+
end_ts?: number;
|
|
11
19
|
/**
|
|
12
20
|
* Identifier of the activity
|
|
13
21
|
*/
|
|
@@ -20,6 +28,10 @@ export interface OrchestrationExecutionActivity {
|
|
|
20
28
|
* Start timestamp in milliseconds
|
|
21
29
|
* @format int64
|
|
22
30
|
*/
|
|
23
|
-
start_ts
|
|
31
|
+
start_ts?: number;
|
|
24
32
|
status: Status;
|
|
33
|
+
/**
|
|
34
|
+
* YAML configuration of the activity
|
|
35
|
+
*/
|
|
36
|
+
yaml: string;
|
|
25
37
|
}
|
|
@@ -11,11 +11,15 @@ export interface OrchestrationExecutionPhase {
|
|
|
11
11
|
* List of phase identifiers this phase depends on
|
|
12
12
|
*/
|
|
13
13
|
depends_on?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Description of the phase
|
|
16
|
+
*/
|
|
17
|
+
description?: string;
|
|
14
18
|
/**
|
|
15
19
|
* End timestamp in milliseconds
|
|
16
20
|
* @format int64
|
|
17
21
|
*/
|
|
18
|
-
end_ts
|
|
22
|
+
end_ts?: number;
|
|
19
23
|
/**
|
|
20
24
|
* Unique identifier of the phase
|
|
21
25
|
*/
|
|
@@ -31,12 +35,12 @@ export interface OrchestrationExecutionPhase {
|
|
|
31
35
|
/**
|
|
32
36
|
* ID of the phase execution
|
|
33
37
|
*/
|
|
34
|
-
phase_execution_id
|
|
38
|
+
phase_execution_id?: string;
|
|
35
39
|
/**
|
|
36
40
|
* Start timestamp in milliseconds
|
|
37
41
|
* @format int64
|
|
38
42
|
*/
|
|
39
|
-
start_ts
|
|
43
|
+
start_ts?: number;
|
|
40
44
|
status: Status;
|
|
41
45
|
/**
|
|
42
46
|
* Total number of activities in the phase
|
|
@@ -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' | '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' | 'QUEUED' | 'REJECTED' | 'RESUMED' | 'RUNNING' | 'SCHEDULED' | 'SKIPPED' | 'STARTING' | 'STARTING_QUEUED_STEP' | 'SUCCEEDED' | 'SUCCESS' | 'SUSPENDED' | 'TASK_WAITING' | 'TIMED_WAITING' | 'UPLOAD_WAITING' | 'WAITING' | 'WAIT_STEP_RUNNING';
|