@harnessio/react-rmg-service-client 0.52.0 → 0.54.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/usePostReleaseSummaryMutation.d.ts +2 -2
- package/dist/rmg-service/src/services/hooks/usePresignUploadMutation.d.ts +25 -0
- package/dist/rmg-service/src/services/hooks/usePresignUploadMutation.js +14 -0
- package/dist/rmg-service/src/services/hooks/useServeUploadQuery.d.ts +18 -0
- package/dist/rmg-service/src/services/hooks/useServeUploadQuery.js +14 -0
- package/dist/rmg-service/src/services/index.d.ts +7 -0
- package/dist/rmg-service/src/services/index.js +2 -0
- package/dist/rmg-service/src/services/requestBodies/ReleaseSummaryRequestRequestBody.d.ts +5 -0
- package/dist/rmg-service/src/services/schemas/PresignUploadRequest.d.ts +15 -0
- package/dist/rmg-service/src/services/schemas/PresignUploadRequest.js +4 -0
- package/dist/rmg-service/src/services/schemas/PresignUploadResponse.d.ts +10 -0
- package/dist/rmg-service/src/services/schemas/PresignUploadResponse.js +4 -0
- package/dist/rmg-service/src/services/schemas/ScopeFilterDto.d.ts +13 -0
- package/dist/rmg-service/src/services/schemas/ScopeFilterDto.js +4 -0
- package/package.json +1 -1
|
@@ -5,11 +5,11 @@ import type { ReleaseSummaryRequestRequestBody } from '../requestBodies/ReleaseS
|
|
|
5
5
|
import type { ResponseWithPagination } from '../helpers';
|
|
6
6
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
7
|
export interface PostReleaseSummaryMutationQueryParams {
|
|
8
|
-
orgIdentifier?: string;
|
|
9
|
-
projectIdentifier?: string;
|
|
10
8
|
searchTerm?: string;
|
|
11
9
|
releaseGroupIds?: string[];
|
|
12
10
|
type?: 'Orchestration' | 'Tracking';
|
|
11
|
+
source?: 'ADHOC' | 'RECURRING';
|
|
12
|
+
status?: Array<'Aborted' | 'Failed' | 'InputWaiting' | 'Paused' | 'Running' | 'Scheduled' | 'Success'>;
|
|
13
13
|
}
|
|
14
14
|
export interface PostReleaseSummaryMutationHeaderParams {
|
|
15
15
|
'Harness-Account': string;
|
|
@@ -0,0 +1,25 @@
|
|
|
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>;
|
|
@@ -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 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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UseQueryOptions } 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 ServeUploadQueryPathParams {
|
|
6
|
+
accountId: string;
|
|
7
|
+
releaseId: string;
|
|
8
|
+
filename: string;
|
|
9
|
+
}
|
|
10
|
+
export type ServeUploadOkResponse = ResponseWithPagination<unknown>;
|
|
11
|
+
export type ServeUploadErrorResponse = unknown | ErrorResponseResponse;
|
|
12
|
+
export interface ServeUploadProps extends ServeUploadQueryPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
13
|
+
}
|
|
14
|
+
export declare function serveUpload(props: ServeUploadProps): Promise<ServeUploadOkResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Serve an uploaded file via a 307 redirect to a signed GCS URL. Performs post-upload size verification and deletes oversized objects.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useServeUploadQuery(props: ServeUploadProps, options?: Omit<UseQueryOptions<ServeUploadOkResponse, ServeUploadErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ServeUploadOkResponse, 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 { useQuery } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function serveUpload(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/uploads/${props.accountId}/${props.releaseId}/${props.filename}`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Serve an uploaded file via a 307 redirect to a signed GCS URL. Performs post-upload size verification and deletes oversized objects.
|
|
11
|
+
*/
|
|
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);
|
|
14
|
+
}
|
|
@@ -111,6 +111,8 @@ export type { PostReleaseSubprocessTriggerErrorResponse, PostReleaseSubprocessTr
|
|
|
111
111
|
export { postReleaseSubprocessTrigger, usePostReleaseSubprocessTriggerMutation, } from './hooks/usePostReleaseSubprocessTriggerMutation';
|
|
112
112
|
export type { PostReleaseSummaryErrorResponse, PostReleaseSummaryMutationQueryParams, PostReleaseSummaryOkResponse, PostReleaseSummaryProps, PostReleaseSummaryRequestBody, } from './hooks/usePostReleaseSummaryMutation';
|
|
113
113
|
export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
|
|
114
|
+
export type { PresignUploadErrorResponse, PresignUploadMutationQueryParams, PresignUploadOkResponse, PresignUploadProps, PresignUploadRequestBody, } from './hooks/usePresignUploadMutation';
|
|
115
|
+
export { presignUpload, usePresignUploadMutation } from './hooks/usePresignUploadMutation';
|
|
114
116
|
export type { PutOrchestrationActivityErrorResponse, PutOrchestrationActivityMutationPathParams, PutOrchestrationActivityMutationQueryParams, PutOrchestrationActivityOkResponse, PutOrchestrationActivityProps, PutOrchestrationActivityRequestBody, } from './hooks/usePutOrchestrationActivityMutation';
|
|
115
117
|
export { putOrchestrationActivity, usePutOrchestrationActivityMutation, } from './hooks/usePutOrchestrationActivityMutation';
|
|
116
118
|
export type { PutOrchestrationProcessInputErrorResponse, PutOrchestrationProcessInputMutationPathParams, PutOrchestrationProcessInputMutationQueryParams, PutOrchestrationProcessInputOkResponse, PutOrchestrationProcessInputProps, PutOrchestrationProcessInputRequestBody, } from './hooks/usePutOrchestrationProcessInputMutation';
|
|
@@ -121,6 +123,8 @@ export type { PutReleaseGroupErrorResponse, PutReleaseGroupMutationPathParams, P
|
|
|
121
123
|
export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
|
|
122
124
|
export type { PutReleaseReleaseIdErrorResponse, PutReleaseReleaseIdMutationPathParams, PutReleaseReleaseIdOkResponse, PutReleaseReleaseIdProps, PutReleaseReleaseIdRequestBody, } from './hooks/usePutReleaseReleaseIdMutation';
|
|
123
125
|
export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
|
|
126
|
+
export type { ServeUploadErrorResponse, ServeUploadOkResponse, ServeUploadProps, ServeUploadQueryPathParams, } from './hooks/useServeUploadQuery';
|
|
127
|
+
export { serveUpload, useServeUploadQuery } from './hooks/useServeUploadQuery';
|
|
124
128
|
export type { StartReleaseExecutionErrorResponse, StartReleaseExecutionMutationPathParams, StartReleaseExecutionMutationQueryParams, StartReleaseExecutionOkResponse, StartReleaseExecutionProps, StartReleaseExecutionRequestBody, } from './hooks/useStartReleaseExecutionMutation';
|
|
125
129
|
export { startReleaseExecution, useStartReleaseExecutionMutation, } from './hooks/useStartReleaseExecutionMutation';
|
|
126
130
|
export type { UpdateExecutionTaskMetadataErrorResponse, UpdateExecutionTaskMetadataMutationPathParams, UpdateExecutionTaskMetadataMutationQueryParams, UpdateExecutionTaskMetadataOkResponse, UpdateExecutionTaskMetadataProps, UpdateExecutionTaskMetadataRequestBody, } from './hooks/useUpdateExecutionTaskMetadataMutation';
|
|
@@ -278,6 +282,8 @@ export type { PageableSort } from './schemas/PageableSort';
|
|
|
278
282
|
export type { PhaseInputYaml } from './schemas/PhaseInputYaml';
|
|
279
283
|
export type { PhaseReleaseInputYaml } from './schemas/PhaseReleaseInputYaml';
|
|
280
284
|
export type { PipelineActivityInfo } from './schemas/PipelineActivityInfo';
|
|
285
|
+
export type { PresignUploadRequest } from './schemas/PresignUploadRequest';
|
|
286
|
+
export type { PresignUploadResponse } from './schemas/PresignUploadResponse';
|
|
281
287
|
export type { PrimitiveInputVariable } from './schemas/PrimitiveInputVariable';
|
|
282
288
|
export type { ProcessInputSummaryDto } from './schemas/ProcessInputSummaryDto';
|
|
283
289
|
export type { ReleaseActionRequest } from './schemas/ReleaseActionRequest';
|
|
@@ -299,6 +305,7 @@ export type { RepeatUnit } from './schemas/RepeatUnit';
|
|
|
299
305
|
export type { ReportGenerationRequest } from './schemas/ReportGenerationRequest';
|
|
300
306
|
export type { ReportGenerationResponse } from './schemas/ReportGenerationResponse';
|
|
301
307
|
export type { ReportStatusResponse } from './schemas/ReportStatusResponse';
|
|
308
|
+
export type { ScopeFilterDto } from './schemas/ScopeFilterDto';
|
|
302
309
|
export type { ServiceInfoDto } from './schemas/ServiceInfoDto';
|
|
303
310
|
export type { ServiceInputVariable } from './schemas/ServiceInputVariable';
|
|
304
311
|
export type { ServiceMetadata } from './schemas/ServiceMetadata';
|
|
@@ -54,11 +54,13 @@ export { postReleaseGroupReportGenerate, usePostReleaseGroupReportGenerateMutati
|
|
|
54
54
|
export { postReleaseReportGenerate, usePostReleaseReportGenerateMutation, } from './hooks/usePostReleaseReportGenerateMutation';
|
|
55
55
|
export { postReleaseSubprocessTrigger, usePostReleaseSubprocessTriggerMutation, } from './hooks/usePostReleaseSubprocessTriggerMutation';
|
|
56
56
|
export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
|
|
57
|
+
export { presignUpload, usePresignUploadMutation } from './hooks/usePresignUploadMutation';
|
|
57
58
|
export { putOrchestrationActivity, usePutOrchestrationActivityMutation, } from './hooks/usePutOrchestrationActivityMutation';
|
|
58
59
|
export { putOrchestrationProcessInput, usePutOrchestrationProcessInputMutation, } from './hooks/usePutOrchestrationProcessInputMutation';
|
|
59
60
|
export { putOrchestrationProcess, usePutOrchestrationProcessMutation, } from './hooks/usePutOrchestrationProcessMutation';
|
|
60
61
|
export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
|
|
61
62
|
export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
|
|
63
|
+
export { serveUpload, useServeUploadQuery } from './hooks/useServeUploadQuery';
|
|
62
64
|
export { startReleaseExecution, useStartReleaseExecutionMutation, } from './hooks/useStartReleaseExecutionMutation';
|
|
63
65
|
export { updateExecutionTaskMetadata, useUpdateExecutionTaskMetadataMutation, } from './hooks/useUpdateExecutionTaskMetadataMutation';
|
|
64
66
|
export { updateExecutionTaskStatus, useUpdateExecutionTaskStatusMutation, } from './hooks/useUpdateExecutionTaskStatusMutation';
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import type { ScopeFilterDto } from '../schemas/ScopeFilterDto';
|
|
1
2
|
import type { TimeRangeDto } from '../schemas/TimeRangeDto';
|
|
2
3
|
export interface ReleaseSummaryRequestRequestBody {
|
|
4
|
+
/**
|
|
5
|
+
* Optional array of scope filters for hierarchical filtering (account/org/project levels)
|
|
6
|
+
*/
|
|
7
|
+
scopes?: ScopeFilterDto[];
|
|
3
8
|
timeRanges?: TimeRangeDto[];
|
|
4
9
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hierarchical scope filter for account/org/project levels
|
|
3
|
+
*/
|
|
4
|
+
export interface ScopeFilterDto {
|
|
5
|
+
/**
|
|
6
|
+
* Optional organization identifier. If omitted, filters at account level.
|
|
7
|
+
*/
|
|
8
|
+
orgIdentifier?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional project identifier. If omitted (with org present), filters at org level.
|
|
11
|
+
*/
|
|
12
|
+
projectIdentifier?: string;
|
|
13
|
+
}
|