@harnessio/react-rmg-service-client 0.7.0 → 0.8.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.
@@ -0,0 +1,23 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { UpdateReleaseResponseResponse } from '../responses/UpdateReleaseResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { UpdateReleaseRequestRequestBody } from '../requestBodies/UpdateReleaseRequestRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface PutReleaseReleaseIdMutationPathParams {
8
+ releaseId: string;
9
+ }
10
+ export interface PutReleaseReleaseIdMutationHeaderParams {
11
+ 'Harness-Account': string;
12
+ }
13
+ export type PutReleaseReleaseIdRequestBody = UpdateReleaseRequestRequestBody;
14
+ export type PutReleaseReleaseIdOkResponse = ResponseWithPagination<UpdateReleaseResponseResponse>;
15
+ export type PutReleaseReleaseIdErrorResponse = ErrorResponseResponse;
16
+ export interface PutReleaseReleaseIdProps extends PutReleaseReleaseIdMutationPathParams, Omit<FetcherOptions<unknown, PutReleaseReleaseIdRequestBody, PutReleaseReleaseIdMutationHeaderParams>, 'url'> {
17
+ body: PutReleaseReleaseIdRequestBody;
18
+ }
19
+ export declare function putReleaseReleaseId(props: PutReleaseReleaseIdProps): Promise<PutReleaseReleaseIdOkResponse>;
20
+ /**
21
+ * Update a single release
22
+ */
23
+ export declare function usePutReleaseReleaseIdMutation(options?: Omit<UseMutationOptions<PutReleaseReleaseIdOkResponse, PutReleaseReleaseIdErrorResponse, PutReleaseReleaseIdProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PutReleaseReleaseIdOkResponse, import("..").Error, PutReleaseReleaseIdProps, 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 putReleaseReleaseId(props) {
7
+ return fetcher(Object.assign({ url: `/release/${props.releaseId}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Update a single release
11
+ */
12
+ export function usePutReleaseReleaseIdMutation(options) {
13
+ return useMutation((mutateProps) => putReleaseReleaseId(mutateProps), options);
14
+ }
@@ -21,9 +21,12 @@ export type { PostReleaseSummaryErrorResponse, PostReleaseSummaryMutationQueryPa
21
21
  export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
22
22
  export type { PutReleaseGroupErrorResponse, PutReleaseGroupMutationPathParams, PutReleaseGroupMutationQueryParams, PutReleaseGroupOkResponse, PutReleaseGroupProps, PutReleaseGroupRequestBody, } from './hooks/usePutReleaseGroupMutation';
23
23
  export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
24
+ export type { PutReleaseReleaseIdErrorResponse, PutReleaseReleaseIdMutationPathParams, PutReleaseReleaseIdOkResponse, PutReleaseReleaseIdProps, PutReleaseReleaseIdRequestBody, } from './hooks/usePutReleaseReleaseIdMutation';
25
+ export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
24
26
  export type { CreateReleaseGroupRequestRequestBody } from './requestBodies/CreateReleaseGroupRequestRequestBody';
25
27
  export type { ReleaseSummaryRequestRequestBody } from './requestBodies/ReleaseSummaryRequestRequestBody';
26
28
  export type { UpdateReleaseGroupRequestRequestBody } from './requestBodies/UpdateReleaseGroupRequestRequestBody';
29
+ export type { UpdateReleaseRequestRequestBody } from './requestBodies/UpdateReleaseRequestRequestBody';
27
30
  export type { CreateReleaseGroupResponseResponse } from './responses/CreateReleaseGroupResponseResponse';
28
31
  export type { DeleteReleaseGroupResponseResponse } from './responses/DeleteReleaseGroupResponseResponse';
29
32
  export type { EnvironmentDashboardResponseResponse } from './responses/EnvironmentDashboardResponseResponse';
@@ -36,6 +39,7 @@ export type { ReleaseGroupComponentResponseResponse } from './responses/ReleaseG
36
39
  export type { ReleaseGroupSummaryResponseResponse } from './responses/ReleaseGroupSummaryResponseResponse';
37
40
  export type { ReleaseSummaryResponseResponse } from './responses/ReleaseSummaryResponseResponse';
38
41
  export type { UpdateReleaseGroupResponseResponse } from './responses/UpdateReleaseGroupResponseResponse';
42
+ export type { UpdateReleaseResponseResponse } from './responses/UpdateReleaseResponseResponse';
39
43
  export type { ActivityType } from './schemas/ActivityType';
40
44
  export type { ApprovalInfoDto } from './schemas/ApprovalInfoDto';
41
45
  export type { ApprovedByDto } from './schemas/ApprovedByDto';
@@ -51,7 +55,7 @@ export type { ReleaseApprovalDto } from './schemas/ReleaseApprovalDto';
51
55
  export type { ReleaseApprovalType } from './schemas/ReleaseApprovalType';
52
56
  export type { ReleaseCadence } from './schemas/ReleaseCadence';
53
57
  export type { ReleaseComponent } from './schemas/ReleaseComponent';
54
- export type { ReleaseEntity } from './schemas/ReleaseEntity';
58
+ export type { ReleaseDto } from './schemas/ReleaseDto';
55
59
  export type { ReleaseFrequency } from './schemas/ReleaseFrequency';
56
60
  export type { ReleaseGroupDto } from './schemas/ReleaseGroupDto';
57
61
  export type { ReleaseGroupYaml } from './schemas/ReleaseGroupYaml';
@@ -65,5 +69,6 @@ export type { Status } from './schemas/Status';
65
69
  export type { StepInfoDetailsDto } from './schemas/StepInfoDetailsDto';
66
70
  export type { StepInfoDto } from './schemas/StepInfoDto';
67
71
  export type { StepInfoType } from './schemas/StepInfoType';
72
+ export type { TimeRangeDto } from './schemas/TimeRangeDto';
68
73
  export type { TriggerType } from './schemas/TriggerType';
69
74
  export type { TriggeredByDto } from './schemas/TriggeredByDto';
@@ -9,3 +9,4 @@ export { getReleaseReleaseIdEnvironmentDashboard, useGetReleaseReleaseIdEnvironm
9
9
  export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostReleaseGroupMutation';
10
10
  export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
11
11
  export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
12
+ export { putReleaseReleaseId, usePutReleaseReleaseIdMutation, } from './hooks/usePutReleaseReleaseIdMutation';
@@ -1,6 +1,4 @@
1
+ import type { TimeRangeDto } from '../schemas/TimeRangeDto';
1
2
  export interface ReleaseSummaryRequestRequestBody {
2
- timeRanges?: Array<{
3
- endTime: number;
4
- startTime: number;
5
- }>;
3
+ timeRanges?: TimeRangeDto[];
6
4
  }
@@ -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,4 @@
1
+ export interface UpdateReleaseRequestRequestBody {
2
+ startTs?: number;
3
+ yaml: string;
4
+ }
@@ -1,5 +1,5 @@
1
- import type { ReleaseEntity } from '../schemas/ReleaseEntity';
1
+ import type { ReleaseDto } from '../schemas/ReleaseDto';
2
2
  export interface ReleaseDetailsResponseResponse {
3
- releaseInfo: ReleaseEntity;
3
+ releaseInfo: ReleaseDto;
4
4
  yaml: string;
5
5
  }
@@ -1,4 +1,7 @@
1
- import type { ReleaseEntity } from '../schemas/ReleaseEntity';
1
+ import type { TimeRangeDto } from '../schemas/TimeRangeDto';
2
+ import type { ReleaseDto } from '../schemas/ReleaseDto';
2
3
  export interface ReleaseSummaryResponseResponse {
3
- releases?: ReleaseEntity[];
4
+ last?: boolean;
5
+ nextRequest: TimeRangeDto[];
6
+ releases: ReleaseDto[];
4
7
  }
@@ -0,0 +1,4 @@
1
+ export interface UpdateReleaseResponseResponse {
2
+ id: string;
3
+ yaml: string;
4
+ }
@@ -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,4 +1,4 @@
1
- export interface ReleaseEntity {
1
+ export interface ReleaseDto {
2
2
  /**
3
3
  * Actual end timestamp in milliseconds
4
4
  */
@@ -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 {};
@@ -4,6 +4,7 @@ export interface ReleaseGroupDto {
4
4
  cadence: ReleaseCadence;
5
5
  color: string;
6
6
  description?: string;
7
+ id: string;
7
8
  identifier: string;
8
9
  lastUpdatedAt: number;
9
10
  lastUpdatedBy: {
@@ -0,0 +1,6 @@
1
+ export interface TimeRangeDto {
2
+ cursor?: string;
3
+ endTime: number;
4
+ limit?: number;
5
+ startTime: number;
6
+ }
@@ -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.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Harness Release Management Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",