@harnessio/react-rmg-service-client 0.57.0 → 0.59.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.
@@ -3,16 +3,18 @@ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
3
3
  import type { ResponseWithPagination } from '../helpers';
4
4
  import { FetcherOptions } from '../../../../fetcher/index.js';
5
5
  export interface GetYamlSchemaQueryQueryParams {
6
- accountIdentifier: string;
7
6
  orgIdentifier?: string;
8
7
  projectIdentifier?: string;
9
8
  entityType: 'PROCESS';
10
9
  }
10
+ export interface GetYamlSchemaQueryHeaderParams {
11
+ 'Harness-Account': string;
12
+ }
11
13
  export type GetYamlSchemaOkResponse = ResponseWithPagination<{
12
14
  [key: string]: any;
13
15
  }>;
14
16
  export type GetYamlSchemaErrorResponse = ErrorResponseResponse;
15
- export interface GetYamlSchemaProps extends Omit<FetcherOptions<GetYamlSchemaQueryQueryParams, unknown>, 'url'> {
17
+ export interface GetYamlSchemaProps extends Omit<FetcherOptions<GetYamlSchemaQueryQueryParams, unknown, GetYamlSchemaQueryHeaderParams>, 'url'> {
16
18
  queryParams: GetYamlSchemaQueryQueryParams;
17
19
  }
18
20
  export declare function getYamlSchema(props: GetYamlSchemaProps): Promise<GetYamlSchemaOkResponse>;
@@ -5,6 +5,7 @@ import { FetcherOptions } from '../../../../fetcher/index.js';
5
5
  export interface ServeUploadQueryPathParams {
6
6
  accountId: string;
7
7
  releaseId: string;
8
+ activityExecutionId: string;
8
9
  filename: string;
9
10
  }
10
11
  export type ServeUploadOkResponse = ResponseWithPagination<unknown>;
@@ -13,6 +14,6 @@ export interface ServeUploadProps extends ServeUploadQueryPathParams, Omit<Fetch
13
14
  }
14
15
  export declare function serveUpload(props: ServeUploadProps): Promise<ServeUploadOkResponse>;
15
16
  /**
16
- * Serve an uploaded file via a 307 redirect to a signed GCS URL. Performs post-upload size verification and deletes oversized objects.
17
+ * Serve an uploaded file via a 307 redirect to a signed GCS URL.
17
18
  */
18
19
  export declare function useServeUploadQuery(props: ServeUploadProps, options?: Omit<UseQueryOptions<ServeUploadOkResponse, ServeUploadErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ServeUploadOkResponse, unknown>;
@@ -4,11 +4,11 @@
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function serveUpload(props) {
7
- return fetcher(Object.assign({ url: `/v1/uploads/${props.accountId}/${props.releaseId}/${props.filename}`, method: 'GET' }, props));
7
+ return fetcher(Object.assign({ url: `/v1/uploads/${props.accountId}/${props.releaseId}/${props.activityExecutionId}/${props.filename}`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
- * Serve an uploaded file via a 307 redirect to a signed GCS URL. Performs post-upload size verification and deletes oversized objects.
10
+ * Serve an uploaded file via a 307 redirect to a signed GCS URL.
11
11
  */
12
12
  export function useServeUploadQuery(props, options) {
13
- return useQuery(['serveUpload', props.accountId, props.releaseId, props.filename], ({ signal }) => serveUpload(Object.assign(Object.assign({}, props), { signal })), options);
13
+ return useQuery(['serveUpload', props.accountId, props.releaseId, props.activityExecutionId, props.filename], ({ signal }) => serveUpload(Object.assign(Object.assign({}, props), { signal })), options);
14
14
  }
@@ -0,0 +1,25 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { UploadResponse } from '../schemas/UploadResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface StreamUploadMutationQueryParams {
7
+ releaseId: string;
8
+ activityExecutionId: string;
9
+ fileContentType: string;
10
+ }
11
+ export interface StreamUploadMutationHeaderParams {
12
+ 'Harness-Account': string;
13
+ }
14
+ export type StreamUploadRequestBody = string;
15
+ export type StreamUploadOkResponse = ResponseWithPagination<UploadResponse>;
16
+ export type StreamUploadErrorResponse = ErrorResponseResponse;
17
+ export interface StreamUploadProps extends Omit<FetcherOptions<StreamUploadMutationQueryParams, StreamUploadRequestBody, StreamUploadMutationHeaderParams>, 'url'> {
18
+ queryParams: StreamUploadMutationQueryParams;
19
+ body: StreamUploadRequestBody;
20
+ }
21
+ export declare function streamUpload(props: StreamUploadProps): Promise<StreamUploadOkResponse>;
22
+ /**
23
+ * Upload an image or video file by streaming the binary body through the backend to cloud storage. Returns the serve URL for retrieval. Clients must send a valid HTTP `Content-Length` header for the request body (browsers do this automatically when posting a `File` or `Blob`); the server uses it with `fileContentType` to validate size before streaming. The upload is scoped to a MANUAL activity execution.
24
+ */
25
+ export declare function useStreamUploadMutation(options?: Omit<UseMutationOptions<StreamUploadOkResponse, StreamUploadErrorResponse, StreamUploadProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<StreamUploadOkResponse, import("..").Error, StreamUploadProps, 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 streamUpload(props) {
7
+ return fetcher(Object.assign({ url: `/v1/uploads`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Upload an image or video file by streaming the binary body through the backend to cloud storage. Returns the serve URL for retrieval. Clients must send a valid HTTP `Content-Length` header for the request body (browsers do this automatically when posting a `File` or `Blob`); the server uses it with `fileContentType` to validate size before streaming. The upload is scoped to a MANUAL activity execution.
11
+ */
12
+ export function useStreamUploadMutation(options) {
13
+ return useMutation((mutateProps) => streamUpload(mutateProps), options);
14
+ }
@@ -115,8 +115,6 @@ export type { PostReleaseSubprocessTriggerErrorResponse, PostReleaseSubprocessTr
115
115
  export { postReleaseSubprocessTrigger, usePostReleaseSubprocessTriggerMutation, } from './hooks/usePostReleaseSubprocessTriggerMutation';
116
116
  export type { PostReleaseSummaryErrorResponse, PostReleaseSummaryMutationQueryParams, PostReleaseSummaryOkResponse, PostReleaseSummaryProps, PostReleaseSummaryRequestBody, } from './hooks/usePostReleaseSummaryMutation';
117
117
  export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
118
- export type { PresignUploadErrorResponse, PresignUploadMutationQueryParams, PresignUploadOkResponse, PresignUploadProps, PresignUploadRequestBody, } from './hooks/usePresignUploadMutation';
119
- export { presignUpload, usePresignUploadMutation } from './hooks/usePresignUploadMutation';
120
118
  export type { PutOrchestrationActivityErrorResponse, PutOrchestrationActivityMutationPathParams, PutOrchestrationActivityMutationQueryParams, PutOrchestrationActivityOkResponse, PutOrchestrationActivityProps, PutOrchestrationActivityRequestBody, } from './hooks/usePutOrchestrationActivityMutation';
121
119
  export { putOrchestrationActivity, usePutOrchestrationActivityMutation, } from './hooks/usePutOrchestrationActivityMutation';
122
120
  export type { PutOrchestrationProcessInputErrorResponse, PutOrchestrationProcessInputMutationPathParams, PutOrchestrationProcessInputMutationQueryParams, PutOrchestrationProcessInputOkResponse, PutOrchestrationProcessInputProps, PutOrchestrationProcessInputRequestBody, } from './hooks/usePutOrchestrationProcessInputMutation';
@@ -133,6 +131,8 @@ export type { ServeUploadErrorResponse, ServeUploadOkResponse, ServeUploadProps,
133
131
  export { serveUpload, useServeUploadQuery } from './hooks/useServeUploadQuery';
134
132
  export type { StartReleaseExecutionErrorResponse, StartReleaseExecutionMutationPathParams, StartReleaseExecutionMutationQueryParams, StartReleaseExecutionOkResponse, StartReleaseExecutionProps, StartReleaseExecutionRequestBody, } from './hooks/useStartReleaseExecutionMutation';
135
133
  export { startReleaseExecution, useStartReleaseExecutionMutation, } from './hooks/useStartReleaseExecutionMutation';
134
+ export type { StreamUploadErrorResponse, StreamUploadMutationQueryParams, StreamUploadOkResponse, StreamUploadProps, StreamUploadRequestBody, } from './hooks/useStreamUploadMutation';
135
+ export { streamUpload, useStreamUploadMutation } from './hooks/useStreamUploadMutation';
136
136
  export type { UpdateExecutionTaskMetadataErrorResponse, UpdateExecutionTaskMetadataMutationPathParams, UpdateExecutionTaskMetadataMutationQueryParams, UpdateExecutionTaskMetadataOkResponse, UpdateExecutionTaskMetadataProps, UpdateExecutionTaskMetadataRequestBody, } from './hooks/useUpdateExecutionTaskMetadataMutation';
137
137
  export { updateExecutionTaskMetadata, useUpdateExecutionTaskMetadataMutation, } from './hooks/useUpdateExecutionTaskMetadataMutation';
138
138
  export type { UpdateExecutionTaskStatusErrorResponse, UpdateExecutionTaskStatusMutationPathParams, UpdateExecutionTaskStatusMutationQueryParams, UpdateExecutionTaskStatusOkResponse, UpdateExecutionTaskStatusProps, UpdateExecutionTaskStatusRequestBody, } from './hooks/useUpdateExecutionTaskStatusMutation';
@@ -283,13 +283,12 @@ export type { OrchestrationProcessDto } from './schemas/OrchestrationProcessDto'
283
283
  export type { OrchestrationProcessInputYaml } from './schemas/OrchestrationProcessInputYaml';
284
284
  export type { OrchestrationReleaseProcessYaml } from './schemas/OrchestrationReleaseProcessYaml';
285
285
  export type { OrchestrationStatus } from './schemas/OrchestrationStatus';
286
+ export type { OutputVariable } from './schemas/OutputVariable';
286
287
  export type { Pageable } from './schemas/Pageable';
287
288
  export type { PageableSort } from './schemas/PageableSort';
288
289
  export type { PhaseInputYaml } from './schemas/PhaseInputYaml';
289
290
  export type { PhaseReleaseInputYaml } from './schemas/PhaseReleaseInputYaml';
290
291
  export type { PipelineActivityInfo } from './schemas/PipelineActivityInfo';
291
- export type { PresignUploadRequest } from './schemas/PresignUploadRequest';
292
- export type { PresignUploadResponse } from './schemas/PresignUploadResponse';
293
292
  export type { PrimitiveInputVariable } from './schemas/PrimitiveInputVariable';
294
293
  export type { ProcessInputSummaryDto } from './schemas/ProcessInputSummaryDto';
295
294
  export type { ReleaseActionRequest } from './schemas/ReleaseActionRequest';
@@ -333,6 +332,7 @@ export type { TaskCommentsListResponseDto } from './schemas/TaskCommentsListResp
333
332
  export type { TimeRangeDto } from './schemas/TimeRangeDto';
334
333
  export type { TriggerType } from './schemas/TriggerType';
335
334
  export type { TriggeredByDto } from './schemas/TriggeredByDto';
335
+ export type { UploadResponse } from './schemas/UploadResponse';
336
336
  export type { User } from './schemas/User';
337
337
  export type { WebhookPipeline } from './schemas/WebhookPipeline';
338
338
  export type { WebhookSignalRequest } from './schemas/WebhookSignalRequest';
@@ -56,7 +56,6 @@ export { postReleaseGroupReportGenerate, usePostReleaseGroupReportGenerateMutati
56
56
  export { postReleaseReportGenerate, usePostReleaseReportGenerateMutation, } from './hooks/usePostReleaseReportGenerateMutation';
57
57
  export { postReleaseSubprocessTrigger, usePostReleaseSubprocessTriggerMutation, } from './hooks/usePostReleaseSubprocessTriggerMutation';
58
58
  export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
59
- export { presignUpload, usePresignUploadMutation } from './hooks/usePresignUploadMutation';
60
59
  export { putOrchestrationActivity, usePutOrchestrationActivityMutation, } from './hooks/usePutOrchestrationActivityMutation';
61
60
  export { putOrchestrationProcessInput, usePutOrchestrationProcessInputMutation, } from './hooks/usePutOrchestrationProcessInputMutation';
62
61
  export { putOrchestrationProcess, usePutOrchestrationProcessMutation, } from './hooks/usePutOrchestrationProcessMutation';
@@ -65,6 +64,7 @@ export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/us
65
64
  export { receiveWebhookSignal, useReceiveWebhookSignalMutation, } from './hooks/useReceiveWebhookSignalMutation';
66
65
  export { serveUpload, useServeUploadQuery } from './hooks/useServeUploadQuery';
67
66
  export { startReleaseExecution, useStartReleaseExecutionMutation, } from './hooks/useStartReleaseExecutionMutation';
67
+ export { streamUpload, useStreamUploadMutation } from './hooks/useStreamUploadMutation';
68
68
  export { updateExecutionTaskMetadata, useUpdateExecutionTaskMetadataMutation, } from './hooks/useUpdateExecutionTaskMetadataMutation';
69
69
  export { updateExecutionTaskStatus, useUpdateExecutionTaskStatusMutation, } from './hooks/useUpdateExecutionTaskStatusMutation';
70
70
  export { updateReleaseConflict, useUpdateReleaseConflictMutation, } from './hooks/useUpdateReleaseConflictMutation';
@@ -3,6 +3,10 @@ import type { AnyValue } from '../schemas/AnyValue';
3
3
  * Output value for a phase execution
4
4
  */
5
5
  export interface ExecutionOutputDto {
6
+ /**
7
+ * Description of the output parameter
8
+ */
9
+ description?: string;
6
10
  /**
7
11
  * Name of the output parameter
8
12
  */
@@ -1,5 +1,6 @@
1
1
  import type { InputVariable } from '../schemas/InputVariable';
2
2
  import type { OrchestrationActivityManualYaml } from '../schemas/OrchestrationActivityManualYaml';
3
+ import type { OutputVariable } from '../schemas/OutputVariable';
3
4
  import type { OrchestrationActivityPipelineYaml } from '../schemas/OrchestrationActivityPipelineYaml';
4
5
  import type { OrchestrationActivitySubprocessYaml } from '../schemas/OrchestrationActivitySubprocessYaml';
5
6
  export interface OrchestrationActivityYaml {
@@ -27,7 +28,7 @@ export interface OrchestrationActivityYaml {
27
28
  * Outputs for the activity
28
29
  */
29
30
  outputs?: {
30
- [key: string]: string;
31
+ [key: string]: OutputVariable;
31
32
  };
32
33
  pipeline?: OrchestrationActivityPipelineYaml;
33
34
  process?: OrchestrationActivitySubprocessYaml;
@@ -1,4 +1,5 @@
1
1
  import type { OrchestrationActivityProcessYaml } from '../schemas/OrchestrationActivityProcessYaml';
2
+ import type { OutputVariable } from '../schemas/OutputVariable';
2
3
  export interface OrchestrationPhaseYaml {
3
4
  phase: {
4
5
  activities: OrchestrationActivityProcessYaml[];
@@ -26,7 +27,7 @@ export interface OrchestrationPhaseYaml {
26
27
  * Outputs for the phase
27
28
  */
28
29
  outputs?: {
29
- [key: string]: string;
30
+ [key: string]: OutputVariable;
30
31
  };
31
32
  /**
32
33
  * List of owner groups for the phase
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Output variable definition. Accepts either a plain string (legacy format) or an object with a `value` field and an optional `description` (new format).
3
+ *
4
+ */
5
+ export type OutputVariable = string | {
6
+ /**
7
+ * Human-readable description of the output variable.
8
+ */
9
+ description?: string;
10
+ /**
11
+ * The output value expression.
12
+ */
13
+ value: string;
14
+ };
@@ -0,0 +1,6 @@
1
+ export interface UploadResponse {
2
+ /**
3
+ * URL to serve/retrieve the uploaded file
4
+ */
5
+ serveUrl: string;
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-rmg-service-client",
3
- "version": "0.57.0",
3
+ "version": "0.59.0",
4
4
  "description": "Harness Release Management Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1,25 +0,0 @@
1
- import { UseMutationOptions } from '@tanstack/react-query';
2
- import type { PresignUploadResponse } from '../schemas/PresignUploadResponse';
3
- import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
- import type { PresignUploadRequest } from '../schemas/PresignUploadRequest';
5
- import type { ResponseWithPagination } from '../helpers';
6
- import { FetcherOptions } from '../../../../fetcher/index.js';
7
- export interface PresignUploadMutationQueryParams {
8
- orgIdentifier?: string;
9
- projectIdentifier?: string;
10
- }
11
- export interface PresignUploadMutationHeaderParams {
12
- 'Harness-Account': string;
13
- }
14
- export type PresignUploadRequestBody = PresignUploadRequest;
15
- export type PresignUploadOkResponse = ResponseWithPagination<PresignUploadResponse>;
16
- export type PresignUploadErrorResponse = ErrorResponseResponse;
17
- export interface PresignUploadProps extends Omit<FetcherOptions<PresignUploadMutationQueryParams, PresignUploadRequestBody, PresignUploadMutationHeaderParams>, 'url'> {
18
- queryParams: PresignUploadMutationQueryParams;
19
- body: PresignUploadRequestBody;
20
- }
21
- export declare function presignUpload(props: PresignUploadProps): Promise<PresignUploadOkResponse>;
22
- /**
23
- * Generate a presigned GCS URL for uploading an image or video file. Returns both the upload URL (for PUT) and the serve URL (for retrieval).
24
- */
25
- export declare function usePresignUploadMutation(options?: Omit<UseMutationOptions<PresignUploadOkResponse, PresignUploadErrorResponse, PresignUploadProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PresignUploadOkResponse, import("..").Error, PresignUploadProps, unknown>;
@@ -1,14 +0,0 @@
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 presignUpload(props) {
7
- return fetcher(Object.assign({ url: `/v1/uploads/presign`, method: 'POST' }, props));
8
- }
9
- /**
10
- * Generate a presigned GCS URL for uploading an image or video file. Returns both the upload URL (for PUT) and the serve URL (for retrieval).
11
- */
12
- export function usePresignUploadMutation(options) {
13
- return useMutation((mutateProps) => presignUpload(mutateProps), options);
14
- }
@@ -1,15 +0,0 @@
1
- export interface PresignUploadRequest {
2
- /**
3
- * Size of the file in bytes
4
- * @format int64
5
- */
6
- contentLength: number;
7
- /**
8
- * MIME type of the file to upload (e.g., image/png, video/mp4)
9
- */
10
- contentType: string;
11
- /**
12
- * ID of the release this upload is associated with
13
- */
14
- releaseId: string;
15
- }
@@ -1,10 +0,0 @@
1
- export interface PresignUploadResponse {
2
- /**
3
- * URL to serve/retrieve the uploaded file
4
- */
5
- serveUrl: string;
6
- /**
7
- * Presigned GCS URL for uploading the file via HTTP PUT
8
- */
9
- uploadUrl: string;
10
- }