@harnessio/react-ti-service-client 0.1.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/README.md +40 -0
- package/dist/fetcher/index.d.ts +17 -0
- package/dist/fetcher/index.js +65 -0
- package/dist/ti-service/src/helpers.d.ts +14 -0
- package/dist/ti-service/src/helpers.js +1 -0
- package/dist/ti-service/src/index.d.ts +6 -0
- package/dist/ti-service/src/index.js +10 -0
- package/dist/ti-service/src/services/helpers.d.ts +14 -0
- package/dist/ti-service/src/services/helpers.js +1 -0
- package/dist/ti-service/src/services/hooks/useGetExecutionCoverageReportQuery.d.ts +29 -0
- package/dist/ti-service/src/services/hooks/useGetExecutionCoverageReportQuery.js +20 -0
- package/dist/ti-service/src/services/hooks/useSearchCoverageFilesQuery.d.ts +28 -0
- package/dist/ti-service/src/services/hooks/useSearchCoverageFilesQuery.js +14 -0
- package/dist/ti-service/src/services/index.d.ts +14 -0
- package/dist/ti-service/src/services/index.js +2 -0
- package/dist/ti-service/src/services/responses/BadRequestResponse.d.ts +2 -0
- package/dist/ti-service/src/services/responses/BadRequestResponse.js +1 -0
- package/dist/ti-service/src/services/responses/InternalErrorResponse.d.ts +2 -0
- package/dist/ti-service/src/services/responses/InternalErrorResponse.js +1 -0
- package/dist/ti-service/src/services/responses/UnauthenticatedResponse.d.ts +2 -0
- package/dist/ti-service/src/services/responses/UnauthenticatedResponse.js +1 -0
- package/dist/ti-service/src/services/responses/UnauthorizedResponse.d.ts +2 -0
- package/dist/ti-service/src/services/responses/UnauthorizedResponse.js +1 -0
- package/dist/ti-service/src/services/schemas/CoverageSummary.d.ts +8 -0
- package/dist/ti-service/src/services/schemas/CoverageSummary.js +4 -0
- package/dist/ti-service/src/services/schemas/Error.d.ts +6 -0
- package/dist/ti-service/src/services/schemas/Error.js +4 -0
- package/dist/ti-service/src/services/schemas/FileSummary.d.ts +5 -0
- package/dist/ti-service/src/services/schemas/FileSummary.js +1 -0
- package/dist/ti-service/src/services/schemas/ReportPipelineExecutionOutput.d.ts +11 -0
- package/dist/ti-service/src/services/schemas/ReportPipelineExecutionOutput.js +1 -0
- package/dist/ti-service/src/services/schemas/SearchResults.d.ts +3 -0
- package/dist/ti-service/src/services/schemas/SearchResults.js +4 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# React TI 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 TI 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 : HarnessReactAPIClient should be initialized
|
|
19
|
+
|
|
20
|
+
Before using API Client, it must be initilaized with required `ClientCallbacks`.
|
|
21
|
+
|
|
22
|
+
Example:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
new TIServiceAPIClient({
|
|
26
|
+
getHeaders: () => {
|
|
27
|
+
return { token: SessionToken.getToken(), 'Harness-Account': accountId }
|
|
28
|
+
}}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Versioning
|
|
32
|
+
|
|
33
|
+

|
|
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)
|
|
40
|
+
|
|
@@ -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(Object.assign({}, (token ? { 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,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,10 @@
|
|
|
1
|
+
import { setupClient, updateClientHeaders } from '../../fetcher';
|
|
2
|
+
export * from './services/index';
|
|
3
|
+
export class TIServiceAPIClient {
|
|
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,29 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ReportPipelineExecutionOutput } from '../schemas/ReportPipelineExecutionOutput';
|
|
3
|
+
import type { BadRequestResponse } from '../responses/BadRequestResponse';
|
|
4
|
+
import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
|
|
5
|
+
import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
|
|
6
|
+
import type { InternalErrorResponse } from '../responses/InternalErrorResponse';
|
|
7
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
8
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
9
|
+
export interface GetExecutionCoverageReportQueryPathParams {
|
|
10
|
+
account_identifier: string;
|
|
11
|
+
execution_id: string;
|
|
12
|
+
tree_path: string;
|
|
13
|
+
}
|
|
14
|
+
export interface GetExecutionCoverageReportQueryQueryParams {
|
|
15
|
+
tag?: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface GetExecutionCoverageReportQueryHeaderParams {
|
|
18
|
+
'harness-account'?: string;
|
|
19
|
+
}
|
|
20
|
+
export type GetExecutionCoverageReportOkResponse = ResponseWithPagination<ReportPipelineExecutionOutput>;
|
|
21
|
+
export type GetExecutionCoverageReportErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | InternalErrorResponse;
|
|
22
|
+
export interface GetExecutionCoverageReportProps extends GetExecutionCoverageReportQueryPathParams, Omit<FetcherOptions<GetExecutionCoverageReportQueryQueryParams, unknown, GetExecutionCoverageReportQueryHeaderParams>, 'url'> {
|
|
23
|
+
queryParams: GetExecutionCoverageReportQueryQueryParams;
|
|
24
|
+
}
|
|
25
|
+
export declare function getExecutionCoverageReport(props: GetExecutionCoverageReportProps): Promise<GetExecutionCoverageReportOkResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve pipeline execution coverage data for a specific file path or directory tree
|
|
28
|
+
*/
|
|
29
|
+
export declare function useGetExecutionCoverageReportQuery(props: GetExecutionCoverageReportProps, options?: Omit<UseQueryOptions<GetExecutionCoverageReportOkResponse, GetExecutionCoverageReportErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetExecutionCoverageReportOkResponse, import("..").Error>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 getExecutionCoverageReport(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/coverage/api/v1/accounts/${props.account_identifier}/executions/${props.execution_id}/tree/${props.tree_path}`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve pipeline execution coverage data for a specific file path or directory tree
|
|
11
|
+
*/
|
|
12
|
+
export function useGetExecutionCoverageReportQuery(props, options) {
|
|
13
|
+
return useQuery([
|
|
14
|
+
'getExecutionCoverageReport',
|
|
15
|
+
props.account_identifier,
|
|
16
|
+
props.execution_id,
|
|
17
|
+
props.tree_path,
|
|
18
|
+
props.queryParams,
|
|
19
|
+
], ({ signal }) => getExecutionCoverageReport(Object.assign(Object.assign({}, props), { signal })), options);
|
|
20
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { SearchResults } from '../schemas/SearchResults';
|
|
3
|
+
import type { BadRequestResponse } from '../responses/BadRequestResponse';
|
|
4
|
+
import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
|
|
5
|
+
import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
|
|
6
|
+
import type { InternalErrorResponse } from '../responses/InternalErrorResponse';
|
|
7
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
8
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
9
|
+
export interface SearchCoverageFilesQueryPathParams {
|
|
10
|
+
account_identifier: string;
|
|
11
|
+
execution_id: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SearchCoverageFilesQueryQueryParams {
|
|
14
|
+
query: string;
|
|
15
|
+
}
|
|
16
|
+
export interface SearchCoverageFilesQueryHeaderParams {
|
|
17
|
+
'harness-account'?: string;
|
|
18
|
+
}
|
|
19
|
+
export type SearchCoverageFilesOkResponse = ResponseWithPagination<SearchResults>;
|
|
20
|
+
export type SearchCoverageFilesErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | InternalErrorResponse;
|
|
21
|
+
export interface SearchCoverageFilesProps extends SearchCoverageFilesQueryPathParams, Omit<FetcherOptions<SearchCoverageFilesQueryQueryParams, unknown, SearchCoverageFilesQueryHeaderParams>, 'url'> {
|
|
22
|
+
queryParams: SearchCoverageFilesQueryQueryParams;
|
|
23
|
+
}
|
|
24
|
+
export declare function searchCoverageFiles(props: SearchCoverageFilesProps): Promise<SearchCoverageFilesOkResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Search for files in a pipeline execution
|
|
27
|
+
*/
|
|
28
|
+
export declare function useSearchCoverageFilesQuery(props: SearchCoverageFilesProps, options?: Omit<UseQueryOptions<SearchCoverageFilesOkResponse, SearchCoverageFilesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<SearchCoverageFilesOkResponse, 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 searchCoverageFiles(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/coverage/api/v1/accounts/${props.account_identifier}/executions/${props.execution_id}/search`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Search for files in a pipeline execution
|
|
11
|
+
*/
|
|
12
|
+
export function useSearchCoverageFilesQuery(props, options) {
|
|
13
|
+
return useQuery(['searchCoverageFiles', props.account_identifier, props.execution_id, props.queryParams], ({ signal }) => searchCoverageFiles(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type { GetPathParamsType, ResponseWithPagination } from './helpers';
|
|
2
|
+
export type { GetExecutionCoverageReportErrorResponse, GetExecutionCoverageReportOkResponse, GetExecutionCoverageReportProps, GetExecutionCoverageReportQueryPathParams, GetExecutionCoverageReportQueryQueryParams, } from './hooks/useGetExecutionCoverageReportQuery';
|
|
3
|
+
export { getExecutionCoverageReport, useGetExecutionCoverageReportQuery, } from './hooks/useGetExecutionCoverageReportQuery';
|
|
4
|
+
export type { SearchCoverageFilesErrorResponse, SearchCoverageFilesOkResponse, SearchCoverageFilesProps, SearchCoverageFilesQueryPathParams, SearchCoverageFilesQueryQueryParams, } from './hooks/useSearchCoverageFilesQuery';
|
|
5
|
+
export { searchCoverageFiles, useSearchCoverageFilesQuery, } from './hooks/useSearchCoverageFilesQuery';
|
|
6
|
+
export type { BadRequestResponse } from './responses/BadRequestResponse';
|
|
7
|
+
export type { InternalErrorResponse } from './responses/InternalErrorResponse';
|
|
8
|
+
export type { UnauthenticatedResponse } from './responses/UnauthenticatedResponse';
|
|
9
|
+
export type { UnauthorizedResponse } from './responses/UnauthorizedResponse';
|
|
10
|
+
export type { CoverageSummary } from './schemas/CoverageSummary';
|
|
11
|
+
export type { Error } from './schemas/Error';
|
|
12
|
+
export type { FileSummary } from './schemas/FileSummary';
|
|
13
|
+
export type { ReportPipelineExecutionOutput } from './schemas/ReportPipelineExecutionOutput';
|
|
14
|
+
export type { SearchResults } from './schemas/SearchResults';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FileSummary } from '../schemas/FileSummary';
|
|
2
|
+
import type { CoverageSummary } from '../schemas/CoverageSummary';
|
|
3
|
+
export interface ReportPipelineExecutionOutput {
|
|
4
|
+
files: FileSummary[];
|
|
5
|
+
lines?: Array<number[]>;
|
|
6
|
+
path?: string;
|
|
7
|
+
summary: CoverageSummary | {
|
|
8
|
+
report_count?: number;
|
|
9
|
+
};
|
|
10
|
+
type?: 'dir' | 'file' | 'repo';
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@harnessio/react-ti-service-client",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Harness React TI service client - TI APIs integrated with react hooks",
|
|
5
|
+
"author": "Harness Inc",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"source": "src/index.ts",
|
|
8
|
+
"main": "./dist/ti-service/src/index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./dist/ti-service/src/index.js"
|
|
11
|
+
},
|
|
12
|
+
"types": "./dist/ti-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
|
+
}
|