@harnessio/react-rmg-service-client 0.19.0 → 0.21.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.
@@ -9,6 +9,7 @@ export interface GetOrchestrationExecutionActivitiesQueryPathParams {
9
9
  }
10
10
  export interface GetOrchestrationExecutionActivitiesQueryQueryParams {
11
11
  orgIdentifier?: string;
12
+ projectIdentifier?: string;
12
13
  }
13
14
  export interface GetOrchestrationExecutionActivitiesQueryHeaderParams {
14
15
  'Harness-Account': string;
@@ -27,6 +28,10 @@ export type GetOrchestrationExecutionActivitiesOkResponse = ResponseWithPaginati
27
28
  * ID of the release
28
29
  */
29
30
  release_id: string;
31
+ /**
32
+ * Total number of currently running activities
33
+ */
34
+ total_running_activities: number;
30
35
  }>;
31
36
  export type GetOrchestrationExecutionActivitiesErrorResponse = ErrorResponseResponse;
32
37
  export interface GetOrchestrationExecutionActivitiesProps extends GetOrchestrationExecutionActivitiesQueryPathParams, Omit<FetcherOptions<GetOrchestrationExecutionActivitiesQueryQueryParams, unknown, GetOrchestrationExecutionActivitiesQueryHeaderParams>, 'url'> {
@@ -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;
@@ -23,9 +24,9 @@ export type GetOrchestrationExecutionPhasesOkResponse = ResponseWithPagination<{
23
24
  */
24
25
  release_id: string;
25
26
  /**
26
- * Total number of running activities across all phases
27
+ * Total number of currently running phases
27
28
  */
28
- total_running_activities: number;
29
+ total_running_phases: number;
29
30
  }>;
30
31
  export type GetOrchestrationExecutionPhasesErrorResponse = ErrorResponseResponse;
31
32
  export interface GetOrchestrationExecutionPhasesProps extends GetOrchestrationExecutionPhasesQueryPathParams, Omit<FetcherOptions<GetOrchestrationExecutionPhasesQueryQueryParams, unknown, GetOrchestrationExecutionPhasesQueryHeaderParams>, 'url'> {
@@ -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,6 +3,10 @@ import type { Status } from '../schemas/Status';
3
3
  * Represents an activity in the orchestration execution
4
4
  */
5
5
  export interface OrchestrationExecutionActivity {
6
+ /**
7
+ * Description of the activity
8
+ */
9
+ description?: string;
6
10
  /**
7
11
  * End timestamp in milliseconds
8
12
  * @format int64
@@ -16,14 +20,6 @@ export interface OrchestrationExecutionActivity {
16
20
  * Name of the activity
17
21
  */
18
22
  name: string;
19
- /**
20
- * Identifier of the phase
21
- */
22
- phase_identifier: string;
23
- /**
24
- * Name of the phase
25
- */
26
- phase_name: string;
27
23
  /**
28
24
  * Start timestamp in milliseconds
29
25
  * @format int64
@@ -3,10 +3,18 @@ import type { Status } from '../schemas/Status';
3
3
  * Represents a phase in the orchestration execution
4
4
  */
5
5
  export interface OrchestrationExecutionPhase {
6
+ /**
7
+ * Number of completed activities in the phase
8
+ */
9
+ completed_activities: number;
6
10
  /**
7
11
  * List of phase identifiers this phase depends on
8
12
  */
9
13
  depends_on?: string[];
14
+ /**
15
+ * Description of the phase
16
+ */
17
+ description?: string;
10
18
  /**
11
19
  * End timestamp in milliseconds
12
20
  * @format int64
@@ -28,10 +36,6 @@ export interface OrchestrationExecutionPhase {
28
36
  * ID of the phase execution
29
37
  */
30
38
  phase_execution_id: string;
31
- /**
32
- * Number of currently running activities in the phase
33
- */
34
- running_activities: number;
35
39
  /**
36
40
  * Start timestamp in milliseconds
37
41
  * @format int64
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-rmg-service-client",
3
- "version": "0.19.0",
3
+ "version": "0.21.0",
4
4
  "description": "Harness Release Management Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",