@harnessio/react-rmg-service-client 0.89.0 → 0.91.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.
@@ -17,6 +17,13 @@ export interface GetOrchestrationActivitiesByAcitivityRefsMutationHeaderParams {
17
17
  'Harness-Account': string;
18
18
  }
19
19
  export type GetOrchestrationActivitiesByAcitivityRefsRequestBody = {
20
+ /**
21
+ * Optional map of activityRef to git branch. Keys must be entries from activityRefs. When omitted for a ref, the git_branch query parameter or the activity's default branch is used.
22
+ *
23
+ */
24
+ activityGitBranches?: {
25
+ [key: string]: string;
26
+ };
20
27
  /**
21
28
  * Array of activity references
22
29
  */
@@ -0,0 +1,26 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ResolveOrchestrationActivitiesForProcessResponseResponse } from '../responses/ResolveOrchestrationActivitiesForProcessResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResolveOrchestrationActivitiesForProcessRequest } from '../schemas/ResolveOrchestrationActivitiesForProcessRequest';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface ResolveOrchestrationActivitiesForProcessMutationQueryParams {
8
+ orgIdentifier?: string;
9
+ projectIdentifier?: string;
10
+ }
11
+ export interface ResolveOrchestrationActivitiesForProcessMutationHeaderParams {
12
+ 'Harness-Account': string;
13
+ }
14
+ export type ResolveOrchestrationActivitiesForProcessRequestBody = ResolveOrchestrationActivitiesForProcessRequest;
15
+ export type ResolveOrchestrationActivitiesForProcessOkResponse = ResponseWithPagination<ResolveOrchestrationActivitiesForProcessResponseResponse>;
16
+ export type ResolveOrchestrationActivitiesForProcessErrorResponse = ErrorResponseResponse;
17
+ export interface ResolveOrchestrationActivitiesForProcessProps extends Omit<FetcherOptions<ResolveOrchestrationActivitiesForProcessMutationQueryParams, ResolveOrchestrationActivitiesForProcessRequestBody, ResolveOrchestrationActivitiesForProcessMutationHeaderParams>, 'url'> {
18
+ queryParams: ResolveOrchestrationActivitiesForProcessMutationQueryParams;
19
+ body: ResolveOrchestrationActivitiesForProcessRequestBody;
20
+ }
21
+ export declare function resolveOrchestrationActivitiesForProcess(props: ResolveOrchestrationActivitiesForProcessProps): Promise<ResolveOrchestrationActivitiesForProcessOkResponse>;
22
+ /**
23
+ * Resolve activity YAML for process activity instances in a single phase with correct per-instance git branch resolution (activity pin → same-repo process branch → activity default). phaseIdentifier is required so the response map can be keyed by activity instance id. When activityDetails is omitted, instances are collected from the persisted process YAML for that phase. When activityDetails is provided (e.g. unsaved studio edits), each entry must include identifier and activityRef. If the process is not found and activityDetails is provided, resolution continues using optional processGitRepo/processBranch from the request. If the process exists and processGitRepo is sent, it must match the stored repo.
24
+ *
25
+ */
26
+ export declare function useResolveOrchestrationActivitiesForProcessMutation(options?: Omit<UseMutationOptions<ResolveOrchestrationActivitiesForProcessOkResponse, ResolveOrchestrationActivitiesForProcessErrorResponse, ResolveOrchestrationActivitiesForProcessProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResolveOrchestrationActivitiesForProcessOkResponse, import("..").Error, ResolveOrchestrationActivitiesForProcessProps, unknown>;
@@ -0,0 +1,15 @@
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 resolveOrchestrationActivitiesForProcess(props) {
7
+ return fetcher(Object.assign({ url: `/orchestration/activity/resolve-for-process`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Resolve activity YAML for process activity instances in a single phase with correct per-instance git branch resolution (activity pin → same-repo process branch → activity default). phaseIdentifier is required so the response map can be keyed by activity instance id. When activityDetails is omitted, instances are collected from the persisted process YAML for that phase. When activityDetails is provided (e.g. unsaved studio edits), each entry must include identifier and activityRef. If the process is not found and activityDetails is provided, resolution continues using optional processGitRepo/processBranch from the request. If the process exists and processGitRepo is sent, it must match the stored repo.
11
+ *
12
+ */
13
+ export function useResolveOrchestrationActivitiesForProcessMutation(options) {
14
+ return useMutation((mutateProps) => resolveOrchestrationActivitiesForProcess(mutateProps), options);
15
+ }
@@ -225,6 +225,8 @@ export type { PutReleaseGroupErrorResponse, PutReleaseGroupMutationPathParams, P
225
225
  export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
226
226
  export type { PutReleaseReleaseIdErrorResponse, PutReleaseReleaseIdMutationPathParams, PutReleaseReleaseIdOkResponse, PutReleaseReleaseIdProps, PutReleaseReleaseIdRequestBody, } from './hooks/usePutReleaseReleaseIdMutation';
227
227
  export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
228
+ export type { ResolveOrchestrationActivitiesForProcessErrorResponse, ResolveOrchestrationActivitiesForProcessMutationQueryParams, ResolveOrchestrationActivitiesForProcessOkResponse, ResolveOrchestrationActivitiesForProcessProps, ResolveOrchestrationActivitiesForProcessRequestBody, } from './hooks/useResolveOrchestrationActivitiesForProcessMutation';
229
+ export { resolveOrchestrationActivitiesForProcess, useResolveOrchestrationActivitiesForProcessMutation, } from './hooks/useResolveOrchestrationActivitiesForProcessMutation';
228
230
  export type { RetryChangesetErrorResponse, RetryChangesetMutationPathParams, RetryChangesetMutationQueryParams, RetryChangesetOkResponse, RetryChangesetProps, } from './hooks/useRetryChangesetMutation';
229
231
  export { retryChangeset, useRetryChangesetMutation } from './hooks/useRetryChangesetMutation';
230
232
  export type { ServeUploadErrorResponse, ServeUploadOkResponse, ServeUploadProps, ServeUploadQueryPathParams, } from './hooks/useServeUploadQuery';
@@ -320,6 +322,7 @@ export type { ReleaseSummaryResponseResponse } from './responses/ReleaseSummaryR
320
322
  export type { ReleaseTasksResponseResponse } from './responses/ReleaseTasksResponseResponse';
321
323
  export type { ReportGenerationResponseResponse } from './responses/ReportGenerationResponseResponse';
322
324
  export type { ReportStatusResponseResponse } from './responses/ReportStatusResponseResponse';
325
+ export type { ResolveOrchestrationActivitiesForProcessResponseResponse } from './responses/ResolveOrchestrationActivitiesForProcessResponseResponse';
323
326
  export type { SubprocessTriggerResponseResponse } from './responses/SubprocessTriggerResponseResponse';
324
327
  export type { TaskCommentsListResponseResponse } from './responses/TaskCommentsListResponseResponse';
325
328
  export type { UpdateExecutionTaskMetadataResponseResponse } from './responses/UpdateExecutionTaskMetadataResponseResponse';
@@ -525,6 +528,8 @@ export type { ReportGenerationRequest } from './schemas/ReportGenerationRequest'
525
528
  export type { ReportGenerationResponse } from './schemas/ReportGenerationResponse';
526
529
  export type { ReportStatusResponse } from './schemas/ReportStatusResponse';
527
530
  export type { RerunInfo } from './schemas/RerunInfo';
531
+ export type { ResolveOrchestrationActivitiesForProcessRequest } from './schemas/ResolveOrchestrationActivitiesForProcessRequest';
532
+ export type { ResolveProcessActivityDetail } from './schemas/ResolveProcessActivityDetail';
528
533
  export type { ResponseMessage } from './schemas/ResponseMessage';
529
534
  export type { RetryExecutionMetadata } from './schemas/RetryExecutionMetadata';
530
535
  export type { ScopeFilterDto } from './schemas/ScopeFilterDto';
@@ -111,6 +111,7 @@ export { putOrchestrationProcessInput, usePutOrchestrationProcessInputMutation,
111
111
  export { putOrchestrationProcess, usePutOrchestrationProcessMutation, } from './hooks/usePutOrchestrationProcessMutation';
112
112
  export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
113
113
  export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
114
+ export { resolveOrchestrationActivitiesForProcess, useResolveOrchestrationActivitiesForProcessMutation, } from './hooks/useResolveOrchestrationActivitiesForProcessMutation';
114
115
  export { retryChangeset, useRetryChangesetMutation } from './hooks/useRetryChangesetMutation';
115
116
  export { serveUpload, useServeUploadQuery } from './hooks/useServeUploadQuery';
116
117
  export { startReleaseExecution, useStartReleaseExecutionMutation, } from './hooks/useStartReleaseExecutionMutation';
@@ -0,0 +1,10 @@
1
+ import type { OrchestrationActivityYamlDto } from '../schemas/OrchestrationActivityYamlDto';
2
+ export interface ResolveOrchestrationActivitiesForProcessResponseResponse {
3
+ /**
4
+ * Map keyed by process activity instance identifier (YAML id) within the requested phase.
5
+ *
6
+ */
7
+ activities: {
8
+ [key: string]: OrchestrationActivityYamlDto;
9
+ };
10
+ }
@@ -12,6 +12,11 @@ export interface OrchestrationActivityProcessYaml {
12
12
  * Description of the activity
13
13
  */
14
14
  description?: string;
15
+ /**
16
+ * Optional git branch pin for resolving a remote activity's YAML. Omit to inherit the process branch when the activity is in the same repo, or the activity's default branch when it is in a different repo.
17
+ *
18
+ */
19
+ gitBranch?: string;
15
20
  /**
16
21
  * Unique identifier for the activity
17
22
  */
@@ -1,9 +1,10 @@
1
+ import type { Error } from '../schemas/Error';
1
2
  import type { CreateOrchestrationActivityRequestType } from '../schemas/CreateOrchestrationActivityRequestType';
2
3
  export interface OrchestrationActivityYamlDto {
3
4
  /**
4
- * User-facing error message when the activity content could not be fetched (e.g. remote yaml not found on the selected branch)
5
+ * Structured user-facing error when the activity content could not be fetched (e.g. remote yaml not found on the selected branch). Includes message, explanation, and probable_fixes for ErrorHandler rendering.
5
6
  */
6
- error?: string;
7
+ error?: Error;
7
8
  /**
8
9
  * Identifier of the activity
9
10
  */
@@ -0,0 +1,26 @@
1
+ import type { ResolveProcessActivityDetail } from '../schemas/ResolveProcessActivityDetail';
2
+ export interface ResolveOrchestrationActivitiesForProcessRequest {
3
+ /**
4
+ * Optional process activity instances to resolve. When provided (including an empty array), these instances are used instead of reading persisted process YAML. Each entry requires identifier and activityRef.
5
+ *
6
+ */
7
+ activityDetails?: ResolveProcessActivityDetail[];
8
+ /**
9
+ * Phase whose activity instances are being resolved. Required so response map keys (process activity instance ids) are unique within the phase.
10
+ *
11
+ */
12
+ phaseIdentifier: string;
13
+ /**
14
+ * Branch the process YAML was loaded from; used for same-repo activity branch inherit
15
+ */
16
+ processBranch?: string;
17
+ /**
18
+ * Optional git repository of the process for same-repo activity branch inherit. Use when the process is not yet persisted (e.g. new studio process) or to supply repo context alongside processBranch. When the process exists in the database and this field is set, it must match the process's stored git repo.
19
+ *
20
+ */
21
+ processGitRepo?: string;
22
+ /**
23
+ * Identifier of the process used for git repo context and (when activityDetails is omitted) instance collection
24
+ */
25
+ processIdentifier: string;
26
+ }
@@ -0,0 +1,14 @@
1
+ export interface ResolveProcessActivityDetail {
2
+ /**
3
+ * Optional gitBranch pin from process YAML for this instance
4
+ */
5
+ activityBranch?: string;
6
+ /**
7
+ * Activity entity reference (YAML activity field)
8
+ */
9
+ activityRef: string;
10
+ /**
11
+ * Process activity instance id (YAML id)
12
+ */
13
+ identifier: 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 {};
@@ -11,7 +11,7 @@ export interface UserGroupsInputVariable {
11
11
  */
12
12
  description?: string;
13
13
  /**
14
- * Type of the input variable
14
+ * Input variable for userGroup type
15
15
  */
16
16
  type: 'userGroups';
17
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-rmg-service-client",
3
- "version": "0.89.0",
3
+ "version": "0.91.0",
4
4
  "description": "Harness Release Management Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",