@harnessio/react-rmg-service-client 0.0.2

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 (36) hide show
  1. package/README.md +39 -0
  2. package/dist/fetcher/index.d.ts +17 -0
  3. package/dist/fetcher/index.js +65 -0
  4. package/dist/rmg-service/src/index.d.ts +6 -0
  5. package/dist/rmg-service/src/index.js +10 -0
  6. package/dist/rmg-service/src/services/helpers.d.ts +14 -0
  7. package/dist/rmg-service/src/services/helpers.js +1 -0
  8. package/dist/rmg-service/src/services/hooks/useDeleteReleaseGroupMutation.d.ts +24 -0
  9. package/dist/rmg-service/src/services/hooks/useDeleteReleaseGroupMutation.js +14 -0
  10. package/dist/rmg-service/src/services/hooks/useGetReleaseGroupQuery.d.ts +24 -0
  11. package/dist/rmg-service/src/services/hooks/useGetReleaseGroupQuery.js +14 -0
  12. package/dist/rmg-service/src/services/hooks/usePostReleaseGroupMutation.d.ts +24 -0
  13. package/dist/rmg-service/src/services/hooks/usePostReleaseGroupMutation.js +14 -0
  14. package/dist/rmg-service/src/services/hooks/usePutReleaseGroupMutation.d.ts +27 -0
  15. package/dist/rmg-service/src/services/hooks/usePutReleaseGroupMutation.js +14 -0
  16. package/dist/rmg-service/src/services/index.d.ts +18 -0
  17. package/dist/rmg-service/src/services/index.js +4 -0
  18. package/dist/rmg-service/src/services/requestBodies/CreateReleaseGroupRequestRequestBody.d.ts +3 -0
  19. package/dist/rmg-service/src/services/requestBodies/CreateReleaseGroupRequestRequestBody.js +4 -0
  20. package/dist/rmg-service/src/services/requestBodies/UpdateReleaseGroupRequestRequestBody.d.ts +3 -0
  21. package/dist/rmg-service/src/services/requestBodies/UpdateReleaseGroupRequestRequestBody.js +4 -0
  22. package/dist/rmg-service/src/services/responses/CreateReleaseGroupResponseResponse.d.ts +4 -0
  23. package/dist/rmg-service/src/services/responses/CreateReleaseGroupResponseResponse.js +4 -0
  24. package/dist/rmg-service/src/services/responses/DeleteReleaseGroupResponseResponse.d.ts +3 -0
  25. package/dist/rmg-service/src/services/responses/DeleteReleaseGroupResponseResponse.js +4 -0
  26. package/dist/rmg-service/src/services/responses/ErrorResponseResponse.d.ts +2 -0
  27. package/dist/rmg-service/src/services/responses/ErrorResponseResponse.js +1 -0
  28. package/dist/rmg-service/src/services/responses/GetReleaseGroupResponseResponse.d.ts +2 -0
  29. package/dist/rmg-service/src/services/responses/GetReleaseGroupResponseResponse.js +1 -0
  30. package/dist/rmg-service/src/services/responses/UpdateReleaseGroupResponseResponse.d.ts +4 -0
  31. package/dist/rmg-service/src/services/responses/UpdateReleaseGroupResponseResponse.js +4 -0
  32. package/dist/rmg-service/src/services/schemas/Error.d.ts +9 -0
  33. package/dist/rmg-service/src/services/schemas/Error.js +4 -0
  34. package/dist/rmg-service/src/services/schemas/GetReleaseGroupResponse.d.ts +6 -0
  35. package/dist/rmg-service/src/services/schemas/GetReleaseGroupResponse.js +4 -0
  36. package/package.json +34 -0
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # React Release Management Service Client(WIP)
2
+
3
+ **OpenAPI -> OA**
4
+
5
+ **TypeScript -> TS**
6
+
7
+ **OpenAPI + TypeScript -> OATS**
8
+
9
+ This React API client will store a collection of Harness Release Management Service APIs and Interfaces contracts generated from Open API Spec using `OATS CLI` internally.
10
+ APIs are using hooks from `@tanstack/react-query`
11
+
12
+ ## Steps To Generate API Client build as dist folder
13
+
14
+ ```
15
+ yarn build
16
+ ```
17
+
18
+ ## For NextGen UI adoption : RMGServiceAPIClient should be initialized
19
+
20
+ Before using API Client, it must be initilaized with required `ClientCallbacks`.
21
+
22
+ Example:
23
+
24
+ ```
25
+ new RMGServiceAPIClient({
26
+ getHeaders: () => {
27
+ return { token: SessionToken.getToken(), 'Harness-Account': accountId }
28
+ }})
29
+ ```
30
+
31
+ ## Versioning
32
+
33
+ ![@harnessio/react-rmg-service-client](https://img.shields.io/npm/v/@harnessio/react-rmg-service-client.svg?style=flat-square)
34
+
35
+ Once development phase is completed, this repo will have changes and versioning driven by API spec only.
36
+
37
+ ## License
38
+
39
+ [MIT](./LICENSE.md). Copyright(c) [Harness Inc](https://harness.io)
@@ -0,0 +1,17 @@
1
+ import type { IStringifyOptions } from 'qs';
2
+ export interface FetcherOptions<TQueryParams = never, TBody = never, THeaderParams = HeadersInit> extends Omit<RequestInit, 'body' | 'headers'> {
3
+ url: string;
4
+ queryParams?: TQueryParams extends never ? undefined : TQueryParams;
5
+ body?: TBody extends never ? undefined : TBody;
6
+ stringifyQueryParamsOptions?: IStringifyOptions;
7
+ headers?: THeaderParams;
8
+ }
9
+ export interface ClientCallbacks {
10
+ responseInterceptor?: (response: Response) => Response;
11
+ requestInterceptor?: (request: Request) => Request;
12
+ urlInterceptor?: (url: string) => string;
13
+ getRequestHeaders?: () => Record<string, any>;
14
+ }
15
+ export declare function setupClient(callbacks: ClientCallbacks): void;
16
+ export declare const updateClientHeaders: (headers: Record<string, any>) => void;
17
+ export declare function fetcher<TResponse = unknown, TQueryParams = never, TBody = never, THeaderParams = HeadersInit>(options: FetcherOptions<TQueryParams, TBody, THeaderParams>): Promise<TResponse>;
@@ -0,0 +1,65 @@
1
+ import { __awaiter, __rest } from "tslib";
2
+ import { stringify } from 'qs';
3
+ const JSON_CONTENT_TYPES = ['application/json'];
4
+ let APIClientInitialized = false;
5
+ let fetcherCallbacks;
6
+ let customHeaders = {
7
+ 'Content-Type': JSON_CONTENT_TYPES[0],
8
+ };
9
+ export function setupClient(callbacks) {
10
+ fetcherCallbacks = callbacks;
11
+ customHeaders = Object.assign(Object.assign({}, customHeaders), ((fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.getRequestHeaders) ? fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.getRequestHeaders() : {}));
12
+ APIClientInitialized = true;
13
+ }
14
+ export const updateClientHeaders = (headers) => {
15
+ customHeaders = Object.assign(Object.assign({}, customHeaders), headers);
16
+ };
17
+ export function fetcher(options) {
18
+ var _a, _b;
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ // If not initialized throw error even without making request
21
+ if (!APIClientInitialized) {
22
+ throw { reason: 'HarnessReactAPIClient has not been initialized' };
23
+ }
24
+ const { stringifyQueryParamsOptions, headers, body, url, queryParams = { account: customHeaders['Harness-Account'] } } = options, rest = __rest(options, ["stringifyQueryParamsOptions", "headers", "body", "url", "queryParams"]);
25
+ const token = customHeaders.token;
26
+ let finalUrl = url;
27
+ if (queryParams) {
28
+ finalUrl += stringify(queryParams, Object.assign(Object.assign({}, stringifyQueryParamsOptions), { addQueryPrefix: true }));
29
+ }
30
+ if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.urlInterceptor) {
31
+ finalUrl = (_a = fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.urlInterceptor) === null || _a === void 0 ? void 0 : _a.call(fetcherCallbacks, finalUrl);
32
+ }
33
+ let request = new Request(finalUrl, Object.assign({ headers: Object.assign(Object.assign({ Authorization: `Bearer ${token}` }, headers), customHeaders), body: body ? JSON.stringify(body) : undefined }, rest));
34
+ if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.requestInterceptor) {
35
+ request = fetcherCallbacks.requestInterceptor(request.clone());
36
+ }
37
+ let response = yield fetch(request);
38
+ if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.responseInterceptor) {
39
+ response = (_b = fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.responseInterceptor) === null || _b === void 0 ? void 0 : _b.call(fetcherCallbacks, response.clone());
40
+ }
41
+ const contentType = response.headers.get('Content-Type');
42
+ let total, pageSize, pageNumber, pageCount, pagination;
43
+ try {
44
+ total = response.headers.get('x-total-elements');
45
+ pageSize = response.headers.get('x-page-size');
46
+ pageNumber = response.headers.get('x-page-number');
47
+ pagination = total || pageSize || pageNumber;
48
+ if (pagination) {
49
+ total = Number(total);
50
+ pageSize = Number(pageSize);
51
+ pageCount = Math.ceil(total / pageSize);
52
+ pageNumber = Number(pageNumber);
53
+ }
54
+ }
55
+ catch (e) {
56
+ throw new Error('HarnessReactAPIClient: An error occurred while parsing pagination headers. ' + e);
57
+ }
58
+ const asJson = contentType && JSON_CONTENT_TYPES.some((h) => contentType.startsWith(h));
59
+ const data = yield (asJson ? response.json() : response.text());
60
+ if (response.ok) {
61
+ return Object.assign({ content: data }, (pagination ? { pagination: { total, pageCount, pageSize, pageNumber } } : {}));
62
+ }
63
+ throw data;
64
+ });
65
+ }
@@ -0,0 +1,6 @@
1
+ import { ClientCallbacks } from '../../fetcher';
2
+ export * from './services/index';
3
+ export declare class RMGServiceAPIClient {
4
+ updateHeaders: (headers: Record<string, any>) => void;
5
+ constructor(callbacks: ClientCallbacks);
6
+ }
@@ -0,0 +1,10 @@
1
+ import { setupClient, updateClientHeaders } from '../../fetcher';
2
+ export * from './services/index';
3
+ export class RMGServiceAPIClient {
4
+ constructor(callbacks) {
5
+ setupClient(callbacks);
6
+ this.updateHeaders = (headers) => {
7
+ updateClientHeaders(headers);
8
+ };
9
+ }
10
+ }
@@ -0,0 +1,14 @@
1
+ export type GetPathParamsType<T> = T extends {
2
+ pathParams: infer R;
3
+ } ? R : never;
4
+ export interface ResponseWithPagination<T> {
5
+ content: T;
6
+ pagination?: {
7
+ total?: number;
8
+ pageSize?: number;
9
+ pageCount?: number;
10
+ pageNumber?: number;
11
+ };
12
+ }
13
+ export type WithOptional<TInput, Tkeys extends keyof TInput> = Omit<TInput, Tkeys> & Partial<Pick<TInput, Tkeys>>;
14
+ export type PickPartial<TInput, Tkeys extends keyof TInput> = Pick<Partial<TInput>, Tkeys>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { DeleteReleaseGroupResponseResponse } from '../responses/DeleteReleaseGroupResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface DeleteReleaseGroupMutationPathParams {
7
+ releaseGroupId: string;
8
+ }
9
+ export interface DeleteReleaseGroupMutationQueryParams {
10
+ OrgParam?: string;
11
+ }
12
+ export interface DeleteReleaseGroupMutationHeaderParams {
13
+ AccountParam: string;
14
+ }
15
+ export type DeleteReleaseGroupOkResponse = ResponseWithPagination<DeleteReleaseGroupResponseResponse>;
16
+ export type DeleteReleaseGroupErrorResponse = ErrorResponseResponse;
17
+ export interface DeleteReleaseGroupProps extends DeleteReleaseGroupMutationPathParams, Omit<FetcherOptions<DeleteReleaseGroupMutationQueryParams, unknown, DeleteReleaseGroupMutationHeaderParams>, 'url'> {
18
+ queryParams: DeleteReleaseGroupMutationQueryParams;
19
+ }
20
+ export declare function deleteReleaseGroup(props: DeleteReleaseGroupProps): Promise<DeleteReleaseGroupOkResponse>;
21
+ /**
22
+ * Delete a specific Release Group by its ID.
23
+ */
24
+ export declare function useDeleteReleaseGroupMutation(options?: Omit<UseMutationOptions<DeleteReleaseGroupOkResponse, DeleteReleaseGroupErrorResponse, DeleteReleaseGroupProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteReleaseGroupOkResponse, import("..").Error, DeleteReleaseGroupProps, 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 deleteReleaseGroup(props) {
7
+ return fetcher(Object.assign({ url: `/releaseGroup/${props.releaseGroupId}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Delete a specific Release Group by its ID.
11
+ */
12
+ export function useDeleteReleaseGroupMutation(options) {
13
+ return useMutation((mutateProps) => deleteReleaseGroup(mutateProps), options);
14
+ }
@@ -0,0 +1,24 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { GetReleaseGroupResponseResponse } from '../responses/GetReleaseGroupResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetReleaseGroupQueryPathParams {
7
+ releaseGroupId: string;
8
+ }
9
+ export interface GetReleaseGroupQueryQueryParams {
10
+ OrgParam?: string;
11
+ }
12
+ export interface GetReleaseGroupQueryHeaderParams {
13
+ AccountParam: string;
14
+ }
15
+ export type GetReleaseGroupOkResponse = ResponseWithPagination<GetReleaseGroupResponseResponse>;
16
+ export type GetReleaseGroupErrorResponse = ErrorResponseResponse;
17
+ export interface GetReleaseGroupProps extends GetReleaseGroupQueryPathParams, Omit<FetcherOptions<GetReleaseGroupQueryQueryParams, unknown, GetReleaseGroupQueryHeaderParams>, 'url'> {
18
+ queryParams: GetReleaseGroupQueryQueryParams;
19
+ }
20
+ export declare function getReleaseGroup(props: GetReleaseGroupProps): Promise<GetReleaseGroupOkResponse>;
21
+ /**
22
+ * Retrieve details of a specific Release Group.
23
+ */
24
+ export declare function useGetReleaseGroupQuery(props: GetReleaseGroupProps, options?: Omit<UseQueryOptions<GetReleaseGroupOkResponse, GetReleaseGroupErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetReleaseGroupOkResponse, 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 getReleaseGroup(props) {
7
+ return fetcher(Object.assign({ url: `/releaseGroup/${props.releaseGroupId}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Retrieve details of a specific Release Group.
11
+ */
12
+ export function useGetReleaseGroupQuery(props, options) {
13
+ return useQuery(['get-releaseGroup', props.releaseGroupId, props.queryParams], ({ signal }) => getReleaseGroup(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,24 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { CreateReleaseGroupResponseResponse } from '../responses/CreateReleaseGroupResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { CreateReleaseGroupRequestRequestBody } from '../requestBodies/CreateReleaseGroupRequestRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface PostReleaseGroupMutationQueryParams {
8
+ OrgParam?: string;
9
+ }
10
+ export interface PostReleaseGroupMutationHeaderParams {
11
+ AccountParam: string;
12
+ }
13
+ export type PostReleaseGroupRequestBody = CreateReleaseGroupRequestRequestBody;
14
+ export type PostReleaseGroupOkResponse = ResponseWithPagination<CreateReleaseGroupResponseResponse>;
15
+ export type PostReleaseGroupErrorResponse = ErrorResponseResponse;
16
+ export interface PostReleaseGroupProps extends Omit<FetcherOptions<PostReleaseGroupMutationQueryParams, PostReleaseGroupRequestBody, PostReleaseGroupMutationHeaderParams>, 'url'> {
17
+ queryParams: PostReleaseGroupMutationQueryParams;
18
+ body: PostReleaseGroupRequestBody;
19
+ }
20
+ export declare function postReleaseGroup(props: PostReleaseGroupProps): Promise<PostReleaseGroupOkResponse>;
21
+ /**
22
+ * Create a new Release Group.
23
+ */
24
+ export declare function usePostReleaseGroupMutation(options?: Omit<UseMutationOptions<PostReleaseGroupOkResponse, PostReleaseGroupErrorResponse, PostReleaseGroupProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PostReleaseGroupOkResponse, import("..").Error, PostReleaseGroupProps, 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 postReleaseGroup(props) {
7
+ return fetcher(Object.assign({ url: `/releaseGroup`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Create a new Release Group.
11
+ */
12
+ export function usePostReleaseGroupMutation(options) {
13
+ return useMutation((mutateProps) => postReleaseGroup(mutateProps), options);
14
+ }
@@ -0,0 +1,27 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { UpdateReleaseGroupResponseResponse } from '../responses/UpdateReleaseGroupResponseResponse';
3
+ import type { ErrorResponseResponse } from '../responses/ErrorResponseResponse';
4
+ import type { UpdateReleaseGroupRequestRequestBody } from '../requestBodies/UpdateReleaseGroupRequestRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface PutReleaseGroupMutationPathParams {
8
+ releaseGroupId: string;
9
+ }
10
+ export interface PutReleaseGroupMutationQueryParams {
11
+ OrgParam?: string;
12
+ }
13
+ export interface PutReleaseGroupMutationHeaderParams {
14
+ AccountParam: string;
15
+ }
16
+ export type PutReleaseGroupRequestBody = UpdateReleaseGroupRequestRequestBody;
17
+ export type PutReleaseGroupOkResponse = ResponseWithPagination<UpdateReleaseGroupResponseResponse>;
18
+ export type PutReleaseGroupErrorResponse = ErrorResponseResponse;
19
+ export interface PutReleaseGroupProps extends PutReleaseGroupMutationPathParams, Omit<FetcherOptions<PutReleaseGroupMutationQueryParams, PutReleaseGroupRequestBody, PutReleaseGroupMutationHeaderParams>, 'url'> {
20
+ queryParams: PutReleaseGroupMutationQueryParams;
21
+ body: PutReleaseGroupRequestBody;
22
+ }
23
+ export declare function putReleaseGroup(props: PutReleaseGroupProps): Promise<PutReleaseGroupOkResponse>;
24
+ /**
25
+ * Update Release Group
26
+ */
27
+ export declare function usePutReleaseGroupMutation(options?: Omit<UseMutationOptions<PutReleaseGroupOkResponse, PutReleaseGroupErrorResponse, PutReleaseGroupProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PutReleaseGroupOkResponse, import("..").Error, PutReleaseGroupProps, 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 putReleaseGroup(props) {
7
+ return fetcher(Object.assign({ url: `/releaseGroup/${props.releaseGroupId}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Update Release Group
11
+ */
12
+ export function usePutReleaseGroupMutation(options) {
13
+ return useMutation((mutateProps) => putReleaseGroup(mutateProps), options);
14
+ }
@@ -0,0 +1,18 @@
1
+ export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
+ export type { DeleteReleaseGroupErrorResponse, DeleteReleaseGroupMutationPathParams, DeleteReleaseGroupMutationQueryParams, DeleteReleaseGroupOkResponse, DeleteReleaseGroupProps, } from './hooks/useDeleteReleaseGroupMutation';
3
+ export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
4
+ export type { GetReleaseGroupErrorResponse, GetReleaseGroupOkResponse, GetReleaseGroupProps, GetReleaseGroupQueryPathParams, GetReleaseGroupQueryQueryParams, } from './hooks/useGetReleaseGroupQuery';
5
+ export { getReleaseGroup, useGetReleaseGroupQuery } from './hooks/useGetReleaseGroupQuery';
6
+ export type { PostReleaseGroupErrorResponse, PostReleaseGroupMutationQueryParams, PostReleaseGroupOkResponse, PostReleaseGroupProps, PostReleaseGroupRequestBody, } from './hooks/usePostReleaseGroupMutation';
7
+ export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostReleaseGroupMutation';
8
+ export type { PutReleaseGroupErrorResponse, PutReleaseGroupMutationPathParams, PutReleaseGroupMutationQueryParams, PutReleaseGroupOkResponse, PutReleaseGroupProps, PutReleaseGroupRequestBody, } from './hooks/usePutReleaseGroupMutation';
9
+ export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
10
+ export type { CreateReleaseGroupRequestRequestBody } from './requestBodies/CreateReleaseGroupRequestRequestBody';
11
+ export type { UpdateReleaseGroupRequestRequestBody } from './requestBodies/UpdateReleaseGroupRequestRequestBody';
12
+ export type { CreateReleaseGroupResponseResponse } from './responses/CreateReleaseGroupResponseResponse';
13
+ export type { DeleteReleaseGroupResponseResponse } from './responses/DeleteReleaseGroupResponseResponse';
14
+ export type { ErrorResponseResponse } from './responses/ErrorResponseResponse';
15
+ export type { GetReleaseGroupResponseResponse } from './responses/GetReleaseGroupResponseResponse';
16
+ export type { UpdateReleaseGroupResponseResponse } from './responses/UpdateReleaseGroupResponseResponse';
17
+ export type { Error } from './schemas/Error';
18
+ export type { GetReleaseGroupResponse } from './schemas/GetReleaseGroupResponse';
@@ -0,0 +1,4 @@
1
+ export { deleteReleaseGroup, useDeleteReleaseGroupMutation, } from './hooks/useDeleteReleaseGroupMutation';
2
+ export { getReleaseGroup, useGetReleaseGroupQuery } from './hooks/useGetReleaseGroupQuery';
3
+ export { postReleaseGroup, usePostReleaseGroupMutation } from './hooks/usePostReleaseGroupMutation';
4
+ export { putReleaseGroup, usePutReleaseGroupMutation } from './hooks/usePutReleaseGroupMutation';
@@ -0,0 +1,3 @@
1
+ export interface CreateReleaseGroupRequestRequestBody {
2
+ yaml?: string;
3
+ }
@@ -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,3 @@
1
+ export interface UpdateReleaseGroupRequestRequestBody {
2
+ yaml?: string;
3
+ }
@@ -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,4 @@
1
+ export interface CreateReleaseGroupResponseResponse {
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 {};
@@ -0,0 +1,3 @@
1
+ export interface DeleteReleaseGroupResponseResponse {
2
+ data?: boolean;
3
+ }
@@ -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,2 @@
1
+ import type { Error } from '../schemas/Error';
2
+ export type ErrorResponseResponse = Error;
@@ -0,0 +1,2 @@
1
+ import type { GetReleaseGroupResponse } from '../schemas/GetReleaseGroupResponse';
2
+ export type GetReleaseGroupResponseResponse = GetReleaseGroupResponse;
@@ -0,0 +1,4 @@
1
+ export interface UpdateReleaseGroupResponseResponse {
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 {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Error Response
3
+ */
4
+ export interface Error {
5
+ /**
6
+ * error message detail
7
+ */
8
+ message: string;
9
+ }
@@ -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,6 @@
1
+ export interface GetReleaseGroupResponse {
2
+ /**
3
+ * YAML representation of the release group.
4
+ */
5
+ yaml?: string;
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 ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@harnessio/react-rmg-service-client",
3
+ "version": "0.0.2",
4
+ "description": "Harness Release Management Service APIs integrated with react hooks",
5
+ "author": "Harness Inc",
6
+ "license": "MIT",
7
+ "source": "src/index.ts",
8
+ "main": "./dist/rmg-service/src/index.js",
9
+ "exports": {
10
+ ".": "./dist/rmg-service/src/index.js"
11
+ },
12
+ "types": "./dist/rmg-service/src/index.d.ts",
13
+ "files": [
14
+ "dist/*"
15
+ ],
16
+ "homepage": "https://github.com/harness/react-api-client",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/harness/react-api-client.git"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/harness/react-api-client/issues"
23
+ },
24
+ "keywords": [],
25
+ "scripts": {
26
+ "prebuild": "rimraf dist",
27
+ "build": "yarn generate && tsc",
28
+ "generate": "oats import --config='./oats.config.ts'",
29
+ "fmt": "prettier --write ./index.ts"
30
+ },
31
+ "dependencies": {
32
+ "@harnessio/oats-cli": "^3.0.0"
33
+ }
34
+ }