@harnessio/react-rmg-service-client 0.6.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.
Files changed (22) hide show
  1. package/dist/rmg-service/src/services/hooks/useGetReleaseGroupReleaseGroupIdComponentsQuery.d.ts +20 -0
  2. package/dist/rmg-service/src/services/hooks/useGetReleaseGroupReleaseGroupIdComponentsQuery.js +14 -0
  3. package/dist/rmg-service/src/services/hooks/usePutReleaseReleaseIdMutation.d.ts +23 -0
  4. package/dist/rmg-service/src/services/hooks/usePutReleaseReleaseIdMutation.js +14 -0
  5. package/dist/rmg-service/src/services/index.d.ts +9 -1
  6. package/dist/rmg-service/src/services/index.js +2 -0
  7. package/dist/rmg-service/src/services/requestBodies/ReleaseSummaryRequestRequestBody.d.ts +2 -4
  8. package/dist/rmg-service/src/services/requestBodies/ReleaseSummaryRequestRequestBody.js +0 -3
  9. package/dist/rmg-service/src/services/requestBodies/UpdateReleaseRequestRequestBody.d.ts +4 -0
  10. package/dist/rmg-service/src/services/responses/ReleaseDetailsResponseResponse.d.ts +2 -2
  11. package/dist/rmg-service/src/services/responses/ReleaseGroupComponentResponseResponse.d.ts +4 -0
  12. package/dist/rmg-service/src/services/responses/ReleaseGroupComponentResponseResponse.js +1 -0
  13. package/dist/rmg-service/src/services/responses/ReleaseSummaryResponseResponse.d.ts +5 -2
  14. package/dist/rmg-service/src/services/responses/UpdateReleaseResponseResponse.d.ts +4 -0
  15. package/dist/rmg-service/src/services/responses/UpdateReleaseResponseResponse.js +4 -0
  16. package/dist/rmg-service/src/services/schemas/{ReleaseEntity.d.ts → ReleaseDto.d.ts} +1 -1
  17. package/dist/rmg-service/src/services/schemas/ReleaseDto.js +4 -0
  18. package/dist/rmg-service/src/services/schemas/ReleaseGroupDto.d.ts +13 -2
  19. package/dist/rmg-service/src/services/schemas/TimeRangeDto.d.ts +6 -0
  20. package/dist/rmg-service/src/services/schemas/TimeRangeDto.js +4 -0
  21. package/package.json +1 -1
  22. /package/dist/rmg-service/src/services/{schemas/ReleaseEntity.js → requestBodies/UpdateReleaseRequestRequestBody.js} +0 -0
@@ -0,0 +1,20 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ReleaseGroupComponentResponseResponse } from '../responses/ReleaseGroupComponentResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetReleaseGroupReleaseGroupIdComponentsQueryPathParams {
7
+ releaseGroupId: string;
8
+ }
9
+ export interface GetReleaseGroupReleaseGroupIdComponentsQueryHeaderParams {
10
+ 'Harness-Account': string;
11
+ }
12
+ export type GetReleaseGroupReleaseGroupIdComponentsOkResponse = ResponseWithPagination<ReleaseGroupComponentResponseResponse>;
13
+ export type GetReleaseGroupReleaseGroupIdComponentsErrorResponse = ErrorResponseResponse;
14
+ export interface GetReleaseGroupReleaseGroupIdComponentsProps extends GetReleaseGroupReleaseGroupIdComponentsQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetReleaseGroupReleaseGroupIdComponentsQueryHeaderParams>, 'url'> {
15
+ }
16
+ export declare function getReleaseGroupReleaseGroupIdComponents(props: GetReleaseGroupReleaseGroupIdComponentsProps): Promise<GetReleaseGroupReleaseGroupIdComponentsOkResponse>;
17
+ /**
18
+ * Get Component Details for a given releaseGroupId
19
+ */
20
+ export declare function useGetReleaseGroupReleaseGroupIdComponentsQuery(props: GetReleaseGroupReleaseGroupIdComponentsProps, options?: Omit<UseQueryOptions<GetReleaseGroupReleaseGroupIdComponentsOkResponse, GetReleaseGroupReleaseGroupIdComponentsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetReleaseGroupReleaseGroupIdComponentsOkResponse, import("..").Error>;
@@ -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 getReleaseGroupReleaseGroupIdComponents(props) {
7
+ return fetcher(Object.assign({ url: `/releaseGroup/${props.releaseGroupId}/components`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get Component Details for a given releaseGroupId
11
+ */
12
+ export function useGetReleaseGroupReleaseGroupIdComponentsQuery(props, options) {
13
+ return useQuery(['get-releaseGroup-releaseGroupId-components', props.releaseGroupId], ({ signal }) => getReleaseGroupReleaseGroupIdComponents(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -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
+ }
@@ -5,6 +5,8 @@ export type { GetReleaseActivitiesErrorResponse, GetReleaseActivitiesOkResponse,
5
5
  export { getReleaseActivities, useGetReleaseActivitiesQuery, } from './hooks/useGetReleaseActivitiesQuery';
6
6
  export type { GetReleaseGroupErrorResponse, GetReleaseGroupOkResponse, GetReleaseGroupProps, GetReleaseGroupQueryPathParams, GetReleaseGroupQueryQueryParams, } from './hooks/useGetReleaseGroupQuery';
7
7
  export { getReleaseGroup, useGetReleaseGroupQuery } from './hooks/useGetReleaseGroupQuery';
8
+ export type { GetReleaseGroupReleaseGroupIdComponentsErrorResponse, GetReleaseGroupReleaseGroupIdComponentsOkResponse, GetReleaseGroupReleaseGroupIdComponentsProps, GetReleaseGroupReleaseGroupIdComponentsQueryPathParams, } from './hooks/useGetReleaseGroupReleaseGroupIdComponentsQuery';
9
+ export { getReleaseGroupReleaseGroupIdComponents, useGetReleaseGroupReleaseGroupIdComponentsQuery, } from './hooks/useGetReleaseGroupReleaseGroupIdComponentsQuery';
8
10
  export type { GetReleaseGroupSummaryErrorResponse, GetReleaseGroupSummaryOkResponse, GetReleaseGroupSummaryProps, GetReleaseGroupSummaryQueryQueryParams, } from './hooks/useGetReleaseGroupSummaryQuery';
9
11
  export { getReleaseGroupSummary, useGetReleaseGroupSummaryQuery, } from './hooks/useGetReleaseGroupSummaryQuery';
10
12
  export type { GetReleaseErrorResponse, GetReleaseOkResponse, GetReleaseProps, GetReleaseQueryPathParams, } from './hooks/useGetReleaseQuery';
@@ -19,9 +21,12 @@ export type { PostReleaseSummaryErrorResponse, PostReleaseSummaryMutationQueryPa
19
21
  export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
20
22
  export type { PutReleaseGroupErrorResponse, PutReleaseGroupMutationPathParams, PutReleaseGroupMutationQueryParams, PutReleaseGroupOkResponse, PutReleaseGroupProps, PutReleaseGroupRequestBody, } from './hooks/usePutReleaseGroupMutation';
21
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';
22
26
  export type { CreateReleaseGroupRequestRequestBody } from './requestBodies/CreateReleaseGroupRequestRequestBody';
23
27
  export type { ReleaseSummaryRequestRequestBody } from './requestBodies/ReleaseSummaryRequestRequestBody';
24
28
  export type { UpdateReleaseGroupRequestRequestBody } from './requestBodies/UpdateReleaseGroupRequestRequestBody';
29
+ export type { UpdateReleaseRequestRequestBody } from './requestBodies/UpdateReleaseRequestRequestBody';
25
30
  export type { CreateReleaseGroupResponseResponse } from './responses/CreateReleaseGroupResponseResponse';
26
31
  export type { DeleteReleaseGroupResponseResponse } from './responses/DeleteReleaseGroupResponseResponse';
27
32
  export type { EnvironmentDashboardResponseResponse } from './responses/EnvironmentDashboardResponseResponse';
@@ -30,9 +35,11 @@ export type { GetReleaseGroupResponseResponse } from './responses/GetReleaseGrou
30
35
  export type { ReleaseActivitiesResponseResponse } from './responses/ReleaseActivitiesResponseResponse';
31
36
  export type { ReleaseApprovalsResponseResponse } from './responses/ReleaseApprovalsResponseResponse';
32
37
  export type { ReleaseDetailsResponseResponse } from './responses/ReleaseDetailsResponseResponse';
38
+ export type { ReleaseGroupComponentResponseResponse } from './responses/ReleaseGroupComponentResponseResponse';
33
39
  export type { ReleaseGroupSummaryResponseResponse } from './responses/ReleaseGroupSummaryResponseResponse';
34
40
  export type { ReleaseSummaryResponseResponse } from './responses/ReleaseSummaryResponseResponse';
35
41
  export type { UpdateReleaseGroupResponseResponse } from './responses/UpdateReleaseGroupResponseResponse';
42
+ export type { UpdateReleaseResponseResponse } from './responses/UpdateReleaseResponseResponse';
36
43
  export type { ActivityType } from './schemas/ActivityType';
37
44
  export type { ApprovalInfoDto } from './schemas/ApprovalInfoDto';
38
45
  export type { ApprovedByDto } from './schemas/ApprovedByDto';
@@ -48,7 +55,7 @@ export type { ReleaseApprovalDto } from './schemas/ReleaseApprovalDto';
48
55
  export type { ReleaseApprovalType } from './schemas/ReleaseApprovalType';
49
56
  export type { ReleaseCadence } from './schemas/ReleaseCadence';
50
57
  export type { ReleaseComponent } from './schemas/ReleaseComponent';
51
- export type { ReleaseEntity } from './schemas/ReleaseEntity';
58
+ export type { ReleaseDto } from './schemas/ReleaseDto';
52
59
  export type { ReleaseFrequency } from './schemas/ReleaseFrequency';
53
60
  export type { ReleaseGroupDto } from './schemas/ReleaseGroupDto';
54
61
  export type { ReleaseGroupYaml } from './schemas/ReleaseGroupYaml';
@@ -62,5 +69,6 @@ export type { Status } from './schemas/Status';
62
69
  export type { StepInfoDetailsDto } from './schemas/StepInfoDetailsDto';
63
70
  export type { StepInfoDto } from './schemas/StepInfoDto';
64
71
  export type { StepInfoType } from './schemas/StepInfoType';
72
+ export type { TimeRangeDto } from './schemas/TimeRangeDto';
65
73
  export type { TriggerType } from './schemas/TriggerType';
66
74
  export type { TriggeredByDto } from './schemas/TriggeredByDto';
@@ -1,6 +1,7 @@
1
1
  export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
2
2
  export { getReleaseActivities, useGetReleaseActivitiesQuery, } from './hooks/useGetReleaseActivitiesQuery';
3
3
  export { getReleaseGroup, useGetReleaseGroupQuery } from './hooks/useGetReleaseGroupQuery';
4
+ export { getReleaseGroupReleaseGroupIdComponents, useGetReleaseGroupReleaseGroupIdComponentsQuery, } from './hooks/useGetReleaseGroupReleaseGroupIdComponentsQuery';
4
5
  export { getReleaseGroupSummary, useGetReleaseGroupSummaryQuery, } from './hooks/useGetReleaseGroupSummaryQuery';
5
6
  export { getRelease, useGetReleaseQuery } from './hooks/useGetReleaseQuery';
6
7
  export { getReleaseReleaseIdApprovals, useGetReleaseReleaseIdApprovalsQuery, } from './hooks/useGetReleaseReleaseIdApprovalsQuery';
@@ -8,3 +9,4 @@ export { getReleaseReleaseIdEnvironmentDashboard, useGetReleaseReleaseIdEnvironm
8
9
  export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostReleaseGroupMutation';
9
10
  export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
10
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
  }
@@ -0,0 +1,4 @@
1
+ import type { ReleaseComponent } from '../schemas/ReleaseComponent';
2
+ export interface ReleaseGroupComponentResponseResponse {
3
+ components: ReleaseComponent[];
4
+ }
@@ -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 {};
@@ -1,10 +1,21 @@
1
- import type { ReleaseGroupYaml } from '../schemas/ReleaseGroupYaml';
1
+ import type { ReleaseCadence } from '../schemas/ReleaseCadence';
2
+ import type { ReleaseType } from '../schemas/ReleaseType';
2
3
  export interface ReleaseGroupDto {
4
+ cadence: ReleaseCadence;
5
+ color: string;
6
+ description?: string;
7
+ id: string;
8
+ identifier: string;
3
9
  lastUpdatedAt: number;
4
10
  lastUpdatedBy: {
5
11
  email?: string;
6
12
  identifier: string;
7
13
  name?: string;
8
14
  };
9
- yaml: ReleaseGroupYaml;
15
+ name: string;
16
+ releaseType: ReleaseType;
17
+ releaseVersion: string;
18
+ tags?: {
19
+ [key: string]: string;
20
+ };
10
21
  }
@@ -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.6.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",