@harnessio/react-rmg-service-client 0.31.0 → 0.33.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.
Files changed (24) hide show
  1. package/dist/rmg-service/src/services/hooks/usePostReleaseActionMutation.d.ts +28 -0
  2. package/dist/rmg-service/src/services/hooks/usePostReleaseActionMutation.js +14 -0
  3. package/dist/rmg-service/src/services/hooks/usePostReleaseSummaryMutation.d.ts +1 -0
  4. package/dist/rmg-service/src/services/index.d.ts +8 -0
  5. package/dist/rmg-service/src/services/index.js +1 -0
  6. package/dist/rmg-service/src/services/responses/ReleaseActionResponseResponse.d.ts +2 -0
  7. package/dist/rmg-service/src/services/responses/ReleaseActionResponseResponse.js +1 -0
  8. package/dist/rmg-service/src/services/schemas/ActivityInputYaml.d.ts +4 -2
  9. package/dist/rmg-service/src/services/schemas/ActivityInputYaml.js +0 -3
  10. package/dist/rmg-service/src/services/schemas/OnHoldActivityActionRequest.d.ts +10 -1
  11. package/dist/rmg-service/src/services/schemas/OnHoldActivityActionRequest.js +0 -3
  12. package/dist/rmg-service/src/services/schemas/OrchestrationActivitySubprocessYaml.d.ts +9 -0
  13. package/dist/rmg-service/src/services/schemas/OrchestrationActivitySubprocessYaml.js +4 -0
  14. package/dist/rmg-service/src/services/schemas/OrchestrationActivityYaml.d.ts +2 -0
  15. package/dist/rmg-service/src/services/schemas/OrchestrationExecutionActivity.d.ts +8 -0
  16. package/dist/rmg-service/src/services/schemas/ReleaseActionRequest.d.ts +11 -0
  17. package/dist/rmg-service/src/services/schemas/ReleaseActionRequest.js +4 -0
  18. package/dist/rmg-service/src/services/schemas/ReleaseActionResponse.d.ts +14 -0
  19. package/dist/rmg-service/src/services/schemas/ReleaseActionResponse.js +4 -0
  20. package/dist/rmg-service/src/services/schemas/SubprocessActivityInfo.d.ts +9 -0
  21. package/dist/rmg-service/src/services/schemas/SubprocessActivityInfo.js +4 -0
  22. package/dist/rmg-service/src/services/schemas/SubprocessInfo.d.ts +20 -0
  23. package/dist/rmg-service/src/services/schemas/SubprocessInfo.js +4 -0
  24. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ReleaseActionResponseResponse } from '../responses/ReleaseActionResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ReleaseActionRequest } from '../schemas/ReleaseActionRequest';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface PostReleaseActionMutationPathParams {
8
+ releaseId: string;
9
+ }
10
+ export interface PostReleaseActionMutationQueryParams {
11
+ orgIdentifier?: string;
12
+ projectIdentifier?: string;
13
+ }
14
+ export interface PostReleaseActionMutationHeaderParams {
15
+ 'Harness-Account': string;
16
+ }
17
+ export type PostReleaseActionRequestBody = ReleaseActionRequest;
18
+ export type PostReleaseActionOkResponse = ResponseWithPagination<ReleaseActionResponseResponse>;
19
+ export type PostReleaseActionErrorResponse = ErrorResponseResponse;
20
+ export interface PostReleaseActionProps extends PostReleaseActionMutationPathParams, Omit<FetcherOptions<PostReleaseActionMutationQueryParams, PostReleaseActionRequestBody, PostReleaseActionMutationHeaderParams>, 'url'> {
21
+ queryParams: PostReleaseActionMutationQueryParams;
22
+ body: PostReleaseActionRequestBody;
23
+ }
24
+ export declare function postReleaseAction(props: PostReleaseActionProps): Promise<PostReleaseActionOkResponse>;
25
+ /**
26
+ * Executes an action on a release (e.g., abort)
27
+ */
28
+ export declare function usePostReleaseActionMutation(options?: Omit<UseMutationOptions<PostReleaseActionOkResponse, PostReleaseActionErrorResponse, PostReleaseActionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PostReleaseActionOkResponse, import("..").Error, PostReleaseActionProps, 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 postReleaseAction(props) {
7
+ return fetcher(Object.assign({ url: `/release/${props.releaseId}/action`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Executes an action on a release (e.g., abort)
11
+ */
12
+ export function usePostReleaseActionMutation(options) {
13
+ return useMutation((mutateProps) => postReleaseAction(mutateProps), options);
14
+ }
@@ -8,6 +8,7 @@ export interface PostReleaseSummaryMutationQueryParams {
8
8
  orgIdentifier?: string;
9
9
  searchTerm?: string;
10
10
  releaseGroupIds?: string[];
11
+ type?: 'Orchestration' | 'Tracking';
11
12
  }
12
13
  export interface PostReleaseSummaryMutationHeaderParams {
13
14
  'Harness-Account': string;
@@ -73,6 +73,8 @@ export type { PostOrchestrationProcessInputErrorResponse, PostOrchestrationProce
73
73
  export { postOrchestrationProcessInput, usePostOrchestrationProcessInputMutation, } from './hooks/usePostOrchestrationProcessInputMutation';
74
74
  export type { PostOrchestrationProcessErrorResponse, PostOrchestrationProcessMutationQueryParams, PostOrchestrationProcessOkResponse, PostOrchestrationProcessProps, PostOrchestrationProcessRequestBody, } from './hooks/usePostOrchestrationProcessMutation';
75
75
  export { postOrchestrationProcess, usePostOrchestrationProcessMutation, } from './hooks/usePostOrchestrationProcessMutation';
76
+ export type { PostReleaseActionErrorResponse, PostReleaseActionMutationPathParams, PostReleaseActionMutationQueryParams, PostReleaseActionOkResponse, PostReleaseActionProps, PostReleaseActionRequestBody, } from './hooks/usePostReleaseActionMutation';
77
+ export { postReleaseAction, usePostReleaseActionMutation, } from './hooks/usePostReleaseActionMutation';
76
78
  export type { PostReleaseGroupErrorResponse, PostReleaseGroupMutationQueryParams, PostReleaseGroupOkResponse, PostReleaseGroupProps, PostReleaseGroupRequestBody, } from './hooks/usePostReleaseGroupMutation';
77
79
  export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostReleaseGroupMutation';
78
80
  export type { PostReleaseSummaryErrorResponse, PostReleaseSummaryMutationQueryParams, PostReleaseSummaryOkResponse, PostReleaseSummaryProps, PostReleaseSummaryRequestBody, } from './hooks/usePostReleaseSummaryMutation';
@@ -134,6 +136,7 @@ export type { OrchestrationActivitySummaryResponseResponse } from './responses/O
134
136
  export type { OrchestrationProcessAttachedReleaseGroupsResponseResponse } from './responses/OrchestrationProcessAttachedReleaseGroupsResponseResponse';
135
137
  export type { OrchestrationProcessInputSummaryResponseResponse } from './responses/OrchestrationProcessInputSummaryResponseResponse';
136
138
  export type { OrchestrationProcessSummaryResponseResponse } from './responses/OrchestrationProcessSummaryResponseResponse';
139
+ export type { ReleaseActionResponseResponse } from './responses/ReleaseActionResponseResponse';
137
140
  export type { ReleaseActivitiesResponseResponse } from './responses/ReleaseActivitiesResponseResponse';
138
141
  export type { ReleaseApprovalsResponseResponse } from './responses/ReleaseApprovalsResponseResponse';
139
142
  export type { ReleaseConflictListResponseResponse } from './responses/ReleaseConflictListResponseResponse';
@@ -190,6 +193,7 @@ export type { OnHoldActivityActionResponse } from './schemas/OnHoldActivityActio
190
193
  export type { OrchestrationActivityManualYaml } from './schemas/OrchestrationActivityManualYaml';
191
194
  export type { OrchestrationActivityPipelineYaml } from './schemas/OrchestrationActivityPipelineYaml';
192
195
  export type { OrchestrationActivityProcessYaml } from './schemas/OrchestrationActivityProcessYaml';
196
+ export type { OrchestrationActivitySubprocessYaml } from './schemas/OrchestrationActivitySubprocessYaml';
193
197
  export type { OrchestrationActivitySummaryDto } from './schemas/OrchestrationActivitySummaryDto';
194
198
  export type { OrchestrationActivityYaml } from './schemas/OrchestrationActivityYaml';
195
199
  export type { OrchestrationActivityYamlDto } from './schemas/OrchestrationActivityYamlDto';
@@ -205,6 +209,8 @@ export type { PhaseInputYaml } from './schemas/PhaseInputYaml';
205
209
  export type { PhaseReleaseInputYaml } from './schemas/PhaseReleaseInputYaml';
206
210
  export type { PipelineActivityInfo } from './schemas/PipelineActivityInfo';
207
211
  export type { ProcessInputSummaryDto } from './schemas/ProcessInputSummaryDto';
212
+ export type { ReleaseActionRequest } from './schemas/ReleaseActionRequest';
213
+ export type { ReleaseActionResponse } from './schemas/ReleaseActionResponse';
208
214
  export type { ReleaseActivity } from './schemas/ReleaseActivity';
209
215
  export type { ReleaseApprovalDto } from './schemas/ReleaseApprovalDto';
210
216
  export type { ReleaseApprovalType } from './schemas/ReleaseApprovalType';
@@ -228,6 +234,8 @@ export type { StepInfoDto } from './schemas/StepInfoDto';
228
234
  export type { StepInfoType } from './schemas/StepInfoType';
229
235
  export type { StringOrBool } from './schemas/StringOrBool';
230
236
  export type { StringOrStringArray } from './schemas/StringOrStringArray';
237
+ export type { SubprocessActivityInfo } from './schemas/SubprocessActivityInfo';
238
+ export type { SubprocessInfo } from './schemas/SubprocessInfo';
231
239
  export type { TaskCommentDto } from './schemas/TaskCommentDto';
232
240
  export type { TaskCommentsListResponseDto } from './schemas/TaskCommentsListResponseDto';
233
241
  export type { TimeRangeDto } from './schemas/TimeRangeDto';
@@ -35,6 +35,7 @@ export { postOrchestrationActivity, usePostOrchestrationActivityMutation, } from
35
35
  export { postOrchestrationProcessAttachedReleaseGroups, usePostOrchestrationProcessAttachedReleaseGroupsMutation, } from './hooks/usePostOrchestrationProcessAttachedReleaseGroupsMutation';
36
36
  export { postOrchestrationProcessInput, usePostOrchestrationProcessInputMutation, } from './hooks/usePostOrchestrationProcessInputMutation';
37
37
  export { postOrchestrationProcess, usePostOrchestrationProcessMutation, } from './hooks/usePostOrchestrationProcessMutation';
38
+ export { postReleaseAction, usePostReleaseActionMutation, } from './hooks/usePostReleaseActionMutation';
38
39
  export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostReleaseGroupMutation';
39
40
  export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
40
41
  export { putOrchestrationActivity, usePutOrchestrationActivityMutation, } from './hooks/usePutOrchestrationActivityMutation';
@@ -0,0 +1,2 @@
1
+ import type { ReleaseActionResponse } from '../schemas/ReleaseActionResponse';
2
+ export type ReleaseActionResponseResponse = ReleaseActionResponse;
@@ -1,12 +1,14 @@
1
+ import type { ReleaseInputYaml } from '../schemas/ReleaseInputYaml';
1
2
  export interface ActivityInputYaml {
2
3
  /**
3
4
  * Unique identifier for the activity
4
5
  */
5
6
  id: string;
6
7
  /**
7
- * Configuration parameters for the activity
8
+ * process input identifier for the subprocess
8
9
  */
10
+ input?: string;
9
11
  with?: {
10
12
  [key: string]: string;
11
- };
13
+ } | ReleaseInputYaml;
12
14
  }
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -1,6 +1,15 @@
1
+ import type { SubprocessInfo } from '../schemas/SubprocessInfo';
1
2
  export interface OnHoldActivityActionRequest {
2
3
  /**
3
- * The action to perform on the on-hold activity
4
+ * The action to perform on the on-hold activity. Must be 'retry' if retryWith is present.
4
5
  */
5
6
  action: 'ignore' | 'retry';
7
+ /**
8
+ * Specifies the retry mechanism. If present, action must be 'retry'. Currently only SUBPROCESS is supported.
9
+ */
10
+ retryWith?: 'SUBPROCESS';
11
+ /**
12
+ * Subprocess information. Required when retryWith is SUBPROCESS.
13
+ */
14
+ subprocessInfo?: SubprocessInfo;
6
15
  }
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Subprocess configuration for orchestration activities
3
+ */
4
+ export interface OrchestrationActivitySubprocessYaml {
5
+ /**
6
+ * Identifier for the subprocess to be run as part of the activity
7
+ */
8
+ id: string;
9
+ }
@@ -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 {};
@@ -1,6 +1,7 @@
1
1
  import type { InputVariable } from '../schemas/InputVariable';
2
2
  import type { OrchestrationActivityManualYaml } from '../schemas/OrchestrationActivityManualYaml';
3
3
  import type { OrchestrationActivityPipelineYaml } from '../schemas/OrchestrationActivityPipelineYaml';
4
+ import type { OrchestrationActivitySubprocessYaml } from '../schemas/OrchestrationActivitySubprocessYaml';
4
5
  export interface OrchestrationActivityYaml {
5
6
  activity: {
6
7
  /**
@@ -29,5 +30,6 @@ export interface OrchestrationActivityYaml {
29
30
  [key: string]: string;
30
31
  };
31
32
  pipeline?: OrchestrationActivityPipelineYaml;
33
+ process?: OrchestrationActivitySubprocessYaml;
32
34
  };
33
35
  }
@@ -1,6 +1,7 @@
1
1
  import type { FailureInfo } from '../schemas/FailureInfo';
2
2
  import type { PipelineActivityInfo } from '../schemas/PipelineActivityInfo';
3
3
  import type { Status } from '../schemas/Status';
4
+ import type { SubprocessActivityInfo } from '../schemas/SubprocessActivityInfo';
4
5
  /**
5
6
  * Represents an activity in the orchestration execution
6
7
  */
@@ -31,6 +32,9 @@ export interface OrchestrationExecutionActivity {
31
32
  * Name of the activity
32
33
  */
33
34
  name: string;
35
+ /**
36
+ * Pipeline execution information for activities
37
+ */
34
38
  pipeline?: PipelineActivityInfo;
35
39
  /**
36
40
  * Retry index of the activity execution
@@ -43,6 +47,10 @@ export interface OrchestrationExecutionActivity {
43
47
  */
44
48
  start_ts?: number;
45
49
  status: Status;
50
+ /**
51
+ * Subprocess execution information for activities
52
+ */
53
+ subprocess?: SubprocessActivityInfo;
46
54
  /**
47
55
  * YAML configuration of the activity
48
56
  */
@@ -0,0 +1,11 @@
1
+ export interface ReleaseActionRequest {
2
+ /**
3
+ * Action to perform on the release
4
+ */
5
+ action: 'Abort';
6
+ /**
7
+ * Message explaining the reason for the action (e.g., why the release is being aborted)
8
+ * @example "Production issue detected - rolling back due to memory leak"
9
+ */
10
+ message: string;
11
+ }
@@ -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,14 @@
1
+ export interface ReleaseActionResponse {
2
+ /**
3
+ * ID of the release
4
+ */
5
+ id: string;
6
+ /**
7
+ * ID of the execution that was interrupted
8
+ */
9
+ interruptedExecutionId?: string;
10
+ /**
11
+ * New status of the release
12
+ */
13
+ status: string;
14
+ }
@@ -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
+ /**
2
+ * Subprocess execution information for activities
3
+ */
4
+ export interface SubprocessActivityInfo {
5
+ /**
6
+ * ID of the subprocess release
7
+ */
8
+ releaseId: string;
9
+ }
@@ -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,20 @@
1
+ export interface SubprocessInfo {
2
+ /**
3
+ * Output map with key-value pairs.
4
+ */
5
+ output: {
6
+ [key: string]: string;
7
+ };
8
+ /**
9
+ * Process identifier. Required when retryWith is SUBPROCESS.
10
+ */
11
+ processIdentifier: string;
12
+ /**
13
+ * Process input identifier. Required when retryWith is SUBPROCESS.
14
+ */
15
+ processInputIdentifier: string;
16
+ /**
17
+ * Release input YAML. Required when retryWith is SUBPROCESS.
18
+ */
19
+ releaseInput: string;
20
+ }
@@ -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-rmg-service-client",
3
- "version": "0.31.0",
3
+ "version": "0.33.0",
4
4
  "description": "Harness Release Management Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",