@harnessio/react-rmg-service-client 0.1.0 → 0.2.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 (27) hide show
  1. package/dist/rmg-service/src/services/hooks/useGetReleaseGroupSummaryQuery.d.ts +26 -0
  2. package/dist/rmg-service/src/services/hooks/useGetReleaseGroupSummaryQuery.js +14 -0
  3. package/dist/rmg-service/src/services/hooks/useGetReleaseQuery.d.ts +20 -0
  4. package/dist/rmg-service/src/services/hooks/useGetReleaseQuery.js +14 -0
  5. package/dist/rmg-service/src/services/hooks/useGetReleaseReleaseIdEnvironmentDashboardQuery.d.ts +25 -0
  6. package/dist/rmg-service/src/services/hooks/useGetReleaseReleaseIdEnvironmentDashboardQuery.js +14 -0
  7. package/dist/rmg-service/src/services/index.d.ts +15 -0
  8. package/dist/rmg-service/src/services/index.js +3 -0
  9. package/dist/rmg-service/src/services/responses/EnvironmentDashboardResponseResponse.d.ts +4 -0
  10. package/dist/rmg-service/src/services/responses/EnvironmentDashboardResponseResponse.js +1 -0
  11. package/dist/rmg-service/src/services/responses/ReleaseDetailsResponseResponse.d.ts +5 -0
  12. package/dist/rmg-service/src/services/responses/ReleaseDetailsResponseResponse.js +1 -0
  13. package/dist/rmg-service/src/services/responses/ReleaseGroupSummaryResponseResponse.d.ts +16 -0
  14. package/dist/rmg-service/src/services/responses/ReleaseGroupSummaryResponseResponse.js +1 -0
  15. package/dist/rmg-service/src/services/schemas/EnvironmentDashboardDto.d.ts +8 -0
  16. package/dist/rmg-service/src/services/schemas/EnvironmentDashboardDto.js +1 -0
  17. package/dist/rmg-service/src/services/schemas/EnvironmentType.d.ts +1 -0
  18. package/dist/rmg-service/src/services/schemas/EnvironmentType.js +4 -0
  19. package/dist/rmg-service/src/services/schemas/Pageable.d.ts +9 -0
  20. package/dist/rmg-service/src/services/schemas/Pageable.js +1 -0
  21. package/dist/rmg-service/src/services/schemas/PageableSort.d.ts +5 -0
  22. package/dist/rmg-service/src/services/schemas/PageableSort.js +4 -0
  23. package/dist/rmg-service/src/services/schemas/ReleaseGroupDto.d.ts +10 -0
  24. package/dist/rmg-service/src/services/schemas/ReleaseGroupDto.js +1 -0
  25. package/dist/rmg-service/src/services/schemas/ServiceInfoDto.d.ts +8 -0
  26. package/dist/rmg-service/src/services/schemas/ServiceInfoDto.js +4 -0
  27. package/package.json +1 -1
@@ -0,0 +1,26 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ReleaseGroupSummaryResponseResponse } from '../responses/ReleaseGroupSummaryResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetReleaseGroupSummaryQueryQueryParams {
7
+ orgIdentifier?: string;
8
+ searchTerm?: string;
9
+ status?: string[];
10
+ page?: number;
11
+ size?: number;
12
+ sort?: string[];
13
+ }
14
+ export interface GetReleaseGroupSummaryQueryHeaderParams {
15
+ 'Harness-Account': string;
16
+ }
17
+ export type GetReleaseGroupSummaryOkResponse = ResponseWithPagination<ReleaseGroupSummaryResponseResponse>;
18
+ export type GetReleaseGroupSummaryErrorResponse = ErrorResponseResponse;
19
+ export interface GetReleaseGroupSummaryProps extends Omit<FetcherOptions<GetReleaseGroupSummaryQueryQueryParams, unknown, GetReleaseGroupSummaryQueryHeaderParams>, 'url'> {
20
+ queryParams: GetReleaseGroupSummaryQueryQueryParams;
21
+ }
22
+ export declare function getReleaseGroupSummary(props: GetReleaseGroupSummaryProps): Promise<GetReleaseGroupSummaryOkResponse>;
23
+ /**
24
+ * Fetch List of Release Group
25
+ */
26
+ export declare function useGetReleaseGroupSummaryQuery(props: GetReleaseGroupSummaryProps, options?: Omit<UseQueryOptions<GetReleaseGroupSummaryOkResponse, GetReleaseGroupSummaryErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetReleaseGroupSummaryOkResponse, 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 getReleaseGroupSummary(props) {
7
+ return fetcher(Object.assign({ url: `/releaseGroup/summary`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Fetch List of Release Group
11
+ */
12
+ export function useGetReleaseGroupSummaryQuery(props, options) {
13
+ return useQuery(['get-releaseGroup-summary', props.queryParams], ({ signal }) => getReleaseGroupSummary(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,20 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ReleaseDetailsResponseResponse } from '../responses/ReleaseDetailsResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetReleaseQueryPathParams {
7
+ releaseId: string;
8
+ }
9
+ export interface GetReleaseQueryHeaderParams {
10
+ 'Harness-Account': string;
11
+ }
12
+ export type GetReleaseOkResponse = ResponseWithPagination<ReleaseDetailsResponseResponse>;
13
+ export type GetReleaseErrorResponse = ErrorResponseResponse;
14
+ export interface GetReleaseProps extends GetReleaseQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetReleaseQueryHeaderParams>, 'url'> {
15
+ }
16
+ export declare function getRelease(props: GetReleaseProps): Promise<GetReleaseOkResponse>;
17
+ /**
18
+ * Gets the release information for a given release
19
+ */
20
+ export declare function useGetReleaseQuery(props: GetReleaseProps, options?: Omit<UseQueryOptions<GetReleaseOkResponse, GetReleaseErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetReleaseOkResponse, 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 getRelease(props) {
7
+ return fetcher(Object.assign({ url: `/release/${props.releaseId}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Gets the release information for a given release
11
+ */
12
+ export function useGetReleaseQuery(props, options) {
13
+ return useQuery(['get-release', props.releaseId], ({ signal }) => getRelease(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,25 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { EnvironmentDashboardResponseResponse } from '../responses/EnvironmentDashboardResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetReleaseReleaseIdEnvironmentDashboardQueryPathParams {
7
+ releaseId: string;
8
+ }
9
+ export interface GetReleaseReleaseIdEnvironmentDashboardQueryQueryParams {
10
+ searchTerm?: string;
11
+ environmentIdentifiers?: string[];
12
+ }
13
+ export interface GetReleaseReleaseIdEnvironmentDashboardQueryHeaderParams {
14
+ 'Harness-Account': string;
15
+ }
16
+ export type GetReleaseReleaseIdEnvironmentDashboardOkResponse = ResponseWithPagination<EnvironmentDashboardResponseResponse>;
17
+ export type GetReleaseReleaseIdEnvironmentDashboardErrorResponse = ErrorResponseResponse;
18
+ export interface GetReleaseReleaseIdEnvironmentDashboardProps extends GetReleaseReleaseIdEnvironmentDashboardQueryPathParams, Omit<FetcherOptions<GetReleaseReleaseIdEnvironmentDashboardQueryQueryParams, unknown, GetReleaseReleaseIdEnvironmentDashboardQueryHeaderParams>, 'url'> {
19
+ queryParams: GetReleaseReleaseIdEnvironmentDashboardQueryQueryParams;
20
+ }
21
+ export declare function getReleaseReleaseIdEnvironmentDashboard(props: GetReleaseReleaseIdEnvironmentDashboardProps): Promise<GetReleaseReleaseIdEnvironmentDashboardOkResponse>;
22
+ /**
23
+ * Gets the environment dashboard for the given release
24
+ */
25
+ export declare function useGetReleaseReleaseIdEnvironmentDashboardQuery(props: GetReleaseReleaseIdEnvironmentDashboardProps, options?: Omit<UseQueryOptions<GetReleaseReleaseIdEnvironmentDashboardOkResponse, GetReleaseReleaseIdEnvironmentDashboardErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetReleaseReleaseIdEnvironmentDashboardOkResponse, 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 getReleaseReleaseIdEnvironmentDashboard(props) {
7
+ return fetcher(Object.assign({ url: `/release/${props.releaseId}/environmentDashboard`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Gets the environment dashboard for the given release
11
+ */
12
+ export function useGetReleaseReleaseIdEnvironmentDashboardQuery(props, options) {
13
+ return useQuery(['get-release-releaseId-environmentDashboard', props.releaseId, props.queryParams], ({ signal }) => getReleaseReleaseIdEnvironmentDashboard(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -5,6 +5,12 @@ 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 { GetReleaseGroupSummaryErrorResponse, GetReleaseGroupSummaryOkResponse, GetReleaseGroupSummaryProps, GetReleaseGroupSummaryQueryQueryParams, } from './hooks/useGetReleaseGroupSummaryQuery';
9
+ export { getReleaseGroupSummary, useGetReleaseGroupSummaryQuery, } from './hooks/useGetReleaseGroupSummaryQuery';
10
+ export type { GetReleaseErrorResponse, GetReleaseOkResponse, GetReleaseProps, GetReleaseQueryPathParams, } from './hooks/useGetReleaseQuery';
11
+ export { getRelease, useGetReleaseQuery } from './hooks/useGetReleaseQuery';
12
+ export type { GetReleaseReleaseIdEnvironmentDashboardErrorResponse, GetReleaseReleaseIdEnvironmentDashboardOkResponse, GetReleaseReleaseIdEnvironmentDashboardProps, GetReleaseReleaseIdEnvironmentDashboardQueryPathParams, GetReleaseReleaseIdEnvironmentDashboardQueryQueryParams, } from './hooks/useGetReleaseReleaseIdEnvironmentDashboardQuery';
13
+ export { getReleaseReleaseIdEnvironmentDashboard, useGetReleaseReleaseIdEnvironmentDashboardQuery, } from './hooks/useGetReleaseReleaseIdEnvironmentDashboardQuery';
8
14
  export type { PostReleaseGroupErrorResponse, PostReleaseGroupMutationQueryParams, PostReleaseGroupOkResponse, PostReleaseGroupProps, PostReleaseGroupRequestBody, } from './hooks/usePostReleaseGroupMutation';
9
15
  export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostReleaseGroupMutation';
10
16
  export type { PostReleaseSummaryErrorResponse, PostReleaseSummaryMutationQueryParams, PostReleaseSummaryOkResponse, PostReleaseSummaryProps, PostReleaseSummaryRequestBody, } from './hooks/usePostReleaseSummaryMutation';
@@ -16,23 +22,32 @@ export type { ReleaseSummaryRequestRequestBody } from './requestBodies/ReleaseSu
16
22
  export type { UpdateReleaseGroupRequestRequestBody } from './requestBodies/UpdateReleaseGroupRequestRequestBody';
17
23
  export type { CreateReleaseGroupResponseResponse } from './responses/CreateReleaseGroupResponseResponse';
18
24
  export type { DeleteReleaseGroupResponseResponse } from './responses/DeleteReleaseGroupResponseResponse';
25
+ export type { EnvironmentDashboardResponseResponse } from './responses/EnvironmentDashboardResponseResponse';
19
26
  export type { ErrorResponseResponse } from './responses/ErrorResponseResponse';
20
27
  export type { GetReleaseGroupResponseResponse } from './responses/GetReleaseGroupResponseResponse';
21
28
  export type { ReleaseActivitiesResponseResponse } from './responses/ReleaseActivitiesResponseResponse';
29
+ export type { ReleaseDetailsResponseResponse } from './responses/ReleaseDetailsResponseResponse';
30
+ export type { ReleaseGroupSummaryResponseResponse } from './responses/ReleaseGroupSummaryResponseResponse';
22
31
  export type { ReleaseSummaryResponseResponse } from './responses/ReleaseSummaryResponseResponse';
23
32
  export type { UpdateReleaseGroupResponseResponse } from './responses/UpdateReleaseGroupResponseResponse';
24
33
  export type { ActivityType } from './schemas/ActivityType';
34
+ export type { EnvironmentDashboardDto } from './schemas/EnvironmentDashboardDto';
35
+ export type { EnvironmentType } from './schemas/EnvironmentType';
25
36
  export type { Error } from './schemas/Error';
26
37
  export type { Freq } from './schemas/Freq';
27
38
  export type { GetReleaseGroupResponse } from './schemas/GetReleaseGroupResponse';
39
+ export type { Pageable } from './schemas/Pageable';
40
+ export type { PageableSort } from './schemas/PageableSort';
28
41
  export type { ReleaseActivity } from './schemas/ReleaseActivity';
29
42
  export type { ReleaseCadence } from './schemas/ReleaseCadence';
30
43
  export type { ReleaseComponent } from './schemas/ReleaseComponent';
31
44
  export type { ReleaseEntity } from './schemas/ReleaseEntity';
32
45
  export type { ReleaseFrequency } from './schemas/ReleaseFrequency';
46
+ export type { ReleaseGroupDto } from './schemas/ReleaseGroupDto';
33
47
  export type { ReleaseGroupYaml } from './schemas/ReleaseGroupYaml';
34
48
  export type { ReleaseType } from './schemas/ReleaseType';
35
49
  export type { RepeatUnit } from './schemas/RepeatUnit';
50
+ export type { ServiceInfoDto } from './schemas/ServiceInfoDto';
36
51
  export type { StageInfoType } from './schemas/StageInfoType';
37
52
  export type { Status } from './schemas/Status';
38
53
  export type { StepInfoType } from './schemas/StepInfoType';
@@ -1,6 +1,9 @@
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 { getReleaseGroupSummary, useGetReleaseGroupSummaryQuery, } from './hooks/useGetReleaseGroupSummaryQuery';
5
+ export { getRelease, useGetReleaseQuery } from './hooks/useGetReleaseQuery';
6
+ export { getReleaseReleaseIdEnvironmentDashboard, useGetReleaseReleaseIdEnvironmentDashboardQuery, } from './hooks/useGetReleaseReleaseIdEnvironmentDashboardQuery';
4
7
  export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostReleaseGroupMutation';
5
8
  export { postReleaseSummary, usePostReleaseSummaryMutation, } from './hooks/usePostReleaseSummaryMutation';
6
9
  export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
@@ -0,0 +1,4 @@
1
+ import type { EnvironmentDashboardDto } from '../schemas/EnvironmentDashboardDto';
2
+ export interface EnvironmentDashboardResponseResponse {
3
+ environments: EnvironmentDashboardDto[];
4
+ }
@@ -0,0 +1,5 @@
1
+ import type { ReleaseEntity } from '../schemas/ReleaseEntity';
2
+ export interface ReleaseDetailsResponseResponse {
3
+ releaseInfo: ReleaseEntity;
4
+ yaml: string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import type { ReleaseGroupDto } from '../schemas/ReleaseGroupDto';
2
+ import type { Pageable } from '../schemas/Pageable';
3
+ import type { PageableSort } from '../schemas/PageableSort';
4
+ export interface ReleaseGroupSummaryResponseResponse {
5
+ content: ReleaseGroupDto[];
6
+ empty: boolean;
7
+ first: boolean;
8
+ last: boolean;
9
+ number: number;
10
+ numberOfElements: number;
11
+ pageable: Pageable;
12
+ size: number;
13
+ sort: PageableSort;
14
+ totalElements: number;
15
+ totalPages: number;
16
+ }
@@ -0,0 +1,8 @@
1
+ import type { ServiceInfoDto } from '../schemas/ServiceInfoDto';
2
+ import type { EnvironmentType } from '../schemas/EnvironmentType';
3
+ export interface EnvironmentDashboardDto {
4
+ identifier: string;
5
+ name: string;
6
+ serviceInfo: ServiceInfoDto[];
7
+ type: EnvironmentType;
8
+ }
@@ -0,0 +1 @@
1
+ export type EnvironmentType = 'PreProduction' | 'Production';
@@ -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 {};
@@ -0,0 +1,9 @@
1
+ import type { PageableSort } from '../schemas/PageableSort';
2
+ export interface Pageable {
3
+ offset?: number;
4
+ pageNumber?: number;
5
+ pageSize?: number;
6
+ paged?: boolean;
7
+ sort?: PageableSort;
8
+ unpaged?: boolean;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface PageableSort {
2
+ empty?: boolean;
3
+ sorted?: boolean;
4
+ unsorted?: boolean;
5
+ }
@@ -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 {};
@@ -0,0 +1,10 @@
1
+ import type { ReleaseGroupYaml } from '../schemas/ReleaseGroupYaml';
2
+ export interface ReleaseGroupDto {
3
+ lastUpdatedAt: number;
4
+ lastUpdatedBy: {
5
+ email?: string;
6
+ identifier: string;
7
+ name?: string;
8
+ };
9
+ yaml: ReleaseGroupYaml;
10
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Holds the information of a given service along with its artifact version
3
+ */
4
+ export interface ServiceInfoDto {
5
+ artifactVersion?: string;
6
+ identifier: string;
7
+ name: string;
8
+ }
@@ -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.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Harness Release Management Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",