@harnessio/react-integration-service-client 0.0.0-stage → 0.0.1
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 +38 -2
- package/dist/fetcher/index.d.ts +17 -0
- package/dist/fetcher/index.js +65 -0
- package/dist/integration-service/src/index.d.ts +6 -0
- package/dist/integration-service/src/index.js +10 -0
- package/dist/integration-service/src/services/helpers.d.ts +14 -0
- package/dist/integration-service/src/services/helpers.js +1 -0
- package/dist/integration-service/src/services/hooks/useCancelIngestionRunMutation.d.ts +16 -0
- package/dist/integration-service/src/services/hooks/useCancelIngestionRunMutation.js +11 -0
- package/dist/integration-service/src/services/hooks/useCheckIntegrationRefMutation.d.ts +42 -0
- package/dist/integration-service/src/services/hooks/useCheckIntegrationRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useClearDefaultIntegrationJobRefMutation.d.ts +41 -0
- package/dist/integration-service/src/services/hooks/useClearDefaultIntegrationJobRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useCreateIntegrationJobRefMutation.d.ts +42 -0
- package/dist/integration-service/src/services/hooks/useCreateIntegrationJobRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useCreateIntegrationRefMutation.d.ts +39 -0
- package/dist/integration-service/src/services/hooks/useCreateIntegrationRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useDeleteIngestionJobSinkMutation.d.ts +12 -0
- package/dist/integration-service/src/services/hooks/useDeleteIngestionJobSinkMutation.js +11 -0
- package/dist/integration-service/src/services/hooks/useDeleteIngestionLimitMutation.d.ts +13 -0
- package/dist/integration-service/src/services/hooks/useDeleteIngestionLimitMutation.js +11 -0
- package/dist/integration-service/src/services/hooks/useDeleteIntegrationJobRefMutation.d.ts +40 -0
- package/dist/integration-service/src/services/hooks/useDeleteIntegrationJobRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useDeleteIntegrationRefMutation.d.ts +37 -0
- package/dist/integration-service/src/services/hooks/useDeleteIntegrationRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useDiscoverIntegrationRefMutation.d.ts +42 -0
- package/dist/integration-service/src/services/hooks/useDiscoverIntegrationRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useGetDefinitionQuery.d.ts +13 -0
- package/dist/integration-service/src/services/hooks/useGetDefinitionQuery.js +11 -0
- package/dist/integration-service/src/services/hooks/useGetIngestionLimitQuery.d.ts +14 -0
- package/dist/integration-service/src/services/hooks/useGetIngestionLimitQuery.js +11 -0
- package/dist/integration-service/src/services/hooks/useGetIngestionRunQuery.d.ts +16 -0
- package/dist/integration-service/src/services/hooks/useGetIngestionRunQuery.js +11 -0
- package/dist/integration-service/src/services/hooks/useGetIntegrationJobRefQuery.d.ts +41 -0
- package/dist/integration-service/src/services/hooks/useGetIntegrationJobRefQuery.js +30 -0
- package/dist/integration-service/src/services/hooks/useGetIntegrationRefQuery.d.ts +38 -0
- package/dist/integration-service/src/services/hooks/useGetIntegrationRefQuery.js +30 -0
- package/dist/integration-service/src/services/hooks/useIngestionRunStdoutMutation.d.ts +16 -0
- package/dist/integration-service/src/services/hooks/useIngestionRunStdoutMutation.js +11 -0
- package/dist/integration-service/src/services/hooks/useListDefinitionsQuery.d.ts +14 -0
- package/dist/integration-service/src/services/hooks/useListDefinitionsQuery.js +11 -0
- package/dist/integration-service/src/services/hooks/useListIngestionJobsQuery.d.ts +26 -0
- package/dist/integration-service/src/services/hooks/useListIngestionJobsQuery.js +11 -0
- package/dist/integration-service/src/services/hooks/useListIngestionLimitsQuery.d.ts +10 -0
- package/dist/integration-service/src/services/hooks/useListIngestionLimitsQuery.js +11 -0
- package/dist/integration-service/src/services/hooks/useListIntegrationJobRunsRefQuery.d.ts +77 -0
- package/dist/integration-service/src/services/hooks/useListIntegrationJobRunsRefQuery.js +30 -0
- package/dist/integration-service/src/services/hooks/useListIntegrationJobsRefQuery.d.ts +38 -0
- package/dist/integration-service/src/services/hooks/useListIntegrationJobsRefQuery.js +30 -0
- package/dist/integration-service/src/services/hooks/useListIntegrationsRefQuery.d.ts +86 -0
- package/dist/integration-service/src/services/hooks/useListIntegrationsRefQuery.js +30 -0
- package/dist/integration-service/src/services/hooks/usePublishLibraryRevisionMutation.d.ts +16 -0
- package/dist/integration-service/src/services/hooks/usePublishLibraryRevisionMutation.js +11 -0
- package/dist/integration-service/src/services/hooks/usePutIngestionJobSinkMutation.d.ts +15 -0
- package/dist/integration-service/src/services/hooks/usePutIngestionJobSinkMutation.js +11 -0
- package/dist/integration-service/src/services/hooks/usePutIngestionLimitMutation.d.ts +16 -0
- package/dist/integration-service/src/services/hooks/usePutIngestionLimitMutation.js +11 -0
- package/dist/integration-service/src/services/hooks/useRepinIntegrationJobRefMutation.d.ts +41 -0
- package/dist/integration-service/src/services/hooks/useRepinIntegrationJobRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useResetIntegrationJobCheckpointsRefMutation.d.ts +49 -0
- package/dist/integration-service/src/services/hooks/useResetIntegrationJobCheckpointsRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useRotateIntegrationJobWebhookTokenRefMutation.d.ts +46 -0
- package/dist/integration-service/src/services/hooks/useRotateIntegrationJobWebhookTokenRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useSetDefaultIntegrationJobRefMutation.d.ts +41 -0
- package/dist/integration-service/src/services/hooks/useSetDefaultIntegrationJobRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useSyncIntegrationJobRefMutation.d.ts +41 -0
- package/dist/integration-service/src/services/hooks/useSyncIntegrationJobRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useUpdateIntegrationJobRefMutation.d.ts +45 -0
- package/dist/integration-service/src/services/hooks/useUpdateIntegrationJobRefMutation.js +30 -0
- package/dist/integration-service/src/services/hooks/useUpdateIntegrationRefMutation.d.ts +42 -0
- package/dist/integration-service/src/services/hooks/useUpdateIntegrationRefMutation.js +30 -0
- package/dist/integration-service/src/services/index.d.ts +89 -0
- package/dist/integration-service/src/services/index.js +32 -0
- package/dist/integration-service/src/services/schemas/CheckpointView.d.ts +7 -0
- package/dist/integration-service/src/services/schemas/CheckpointView.js +4 -0
- package/dist/integration-service/src/services/schemas/Composition.d.ts +6 -0
- package/dist/integration-service/src/services/schemas/Composition.js +4 -0
- package/dist/integration-service/src/services/schemas/Detail.d.ts +11 -0
- package/dist/integration-service/src/services/schemas/Detail.js +1 -0
- package/dist/integration-service/src/services/schemas/Failure.d.ts +4 -0
- package/dist/integration-service/src/services/schemas/Failure.js +4 -0
- package/dist/integration-service/src/services/schemas/Health.d.ts +16 -0
- package/dist/integration-service/src/services/schemas/Health.js +4 -0
- package/dist/integration-service/src/services/schemas/IntegrationRequest.d.ts +17 -0
- package/dist/integration-service/src/services/schemas/IntegrationRequest.js +1 -0
- package/dist/integration-service/src/services/schemas/IntegrationResponse.d.ts +33 -0
- package/dist/integration-service/src/services/schemas/IntegrationResponse.js +1 -0
- package/dist/integration-service/src/services/schemas/JobView.d.ts +41 -0
- package/dist/integration-service/src/services/schemas/JobView.js +1 -0
- package/dist/integration-service/src/services/schemas/JsonNode.d.ts +29 -0
- package/dist/integration-service/src/services/schemas/JsonNode.js +4 -0
- package/dist/integration-service/src/services/schemas/LastRun.d.ts +9 -0
- package/dist/integration-service/src/services/schemas/LastRun.js +4 -0
- package/dist/integration-service/src/services/schemas/Limits.d.ts +35 -0
- package/dist/integration-service/src/services/schemas/Limits.js +4 -0
- package/dist/integration-service/src/services/schemas/LimitsDoc.d.ts +10 -0
- package/dist/integration-service/src/services/schemas/LimitsDoc.js +1 -0
- package/dist/integration-service/src/services/schemas/LoadIssue.d.ts +4 -0
- package/dist/integration-service/src/services/schemas/LoadIssue.js +4 -0
- package/dist/integration-service/src/services/schemas/PublishRequest.d.ts +5 -0
- package/dist/integration-service/src/services/schemas/PublishRequest.js +4 -0
- package/dist/integration-service/src/services/schemas/Result.d.ts +9 -0
- package/dist/integration-service/src/services/schemas/Result.js +1 -0
- package/dist/integration-service/src/services/schemas/Run.d.ts +48 -0
- package/dist/integration-service/src/services/schemas/Run.js +1 -0
- package/dist/integration-service/src/services/schemas/RunnerTarget.d.ts +4 -0
- package/dist/integration-service/src/services/schemas/RunnerTarget.js +4 -0
- package/dist/integration-service/src/services/schemas/SinkRequest.d.ts +3 -0
- package/dist/integration-service/src/services/schemas/SinkRequest.js +4 -0
- package/dist/integration-service/src/services/schemas/State.d.ts +4 -0
- package/dist/integration-service/src/services/schemas/State.js +4 -0
- package/dist/integration-service/src/services/schemas/StreamRun.d.ts +11 -0
- package/dist/integration-service/src/services/schemas/StreamRun.js +4 -0
- package/dist/integration-service/src/services/schemas/StreamSchema.d.ts +6 -0
- package/dist/integration-service/src/services/schemas/StreamSchema.js +4 -0
- package/dist/integration-service/src/services/schemas/Trigger.d.ts +6 -0
- package/dist/integration-service/src/services/schemas/Trigger.js +4 -0
- package/dist/integration-service/src/services/schemas/Use.d.ts +6 -0
- package/dist/integration-service/src/services/schemas/Use.js +4 -0
- package/dist/integration-service/src/services/schemas/WebhookView.d.ts +4 -0
- package/dist/integration-service/src/services/schemas/WebhookView.js +4 -0
- package/package.json +29 -4
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
3
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
4
|
+
export interface DeleteIntegrationRefAccountPathParams {
|
|
5
|
+
integration: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DeleteIntegrationRefAccountHeaderParams {
|
|
8
|
+
'Harness-Account': string;
|
|
9
|
+
}
|
|
10
|
+
export type DeleteIntegrationRefAccountOKResponse = unknown;
|
|
11
|
+
export type DeleteIntegrationRefAccountErrorResponse = unknown;
|
|
12
|
+
export interface DeleteIntegrationRefOrgPathParams {
|
|
13
|
+
org: string;
|
|
14
|
+
integration: string;
|
|
15
|
+
}
|
|
16
|
+
export interface DeleteIntegrationRefOrgHeaderParams {
|
|
17
|
+
'Harness-Account': string;
|
|
18
|
+
}
|
|
19
|
+
export type DeleteIntegrationRefOrgOKResponse = unknown;
|
|
20
|
+
export type DeleteIntegrationRefOrgErrorResponse = unknown;
|
|
21
|
+
export interface DeleteIntegrationRefProjectPathParams {
|
|
22
|
+
org: string;
|
|
23
|
+
project: string;
|
|
24
|
+
integration: string;
|
|
25
|
+
}
|
|
26
|
+
export interface DeleteIntegrationRefProjectHeaderParams {
|
|
27
|
+
'Harness-Account': string;
|
|
28
|
+
}
|
|
29
|
+
export type DeleteIntegrationRefProjectOKResponse = unknown;
|
|
30
|
+
export type DeleteIntegrationRefProjectErrorResponse = unknown;
|
|
31
|
+
export type DeleteIntegrationRefOKResponse<T> = T extends DeleteIntegrationRefProjectPathParams ? ResponseWithPagination<DeleteIntegrationRefProjectOKResponse> : T extends DeleteIntegrationRefOrgPathParams ? ResponseWithPagination<DeleteIntegrationRefOrgOKResponse> : ResponseWithPagination<DeleteIntegrationRefAccountOKResponse>;
|
|
32
|
+
export type DeleteIntegrationRefErrorResponse<T> = T extends DeleteIntegrationRefProjectPathParams ? DeleteIntegrationRefProjectErrorResponse : T extends DeleteIntegrationRefOrgPathParams ? DeleteIntegrationRefOrgErrorResponse : DeleteIntegrationRefAccountErrorResponse;
|
|
33
|
+
export interface DeleteIntegrationRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
34
|
+
pathParams: DeleteIntegrationRefAccountPathParams | DeleteIntegrationRefOrgPathParams | DeleteIntegrationRefProjectPathParams;
|
|
35
|
+
}
|
|
36
|
+
export declare function deleteIntegrationRef<T extends DeleteIntegrationRefProps = DeleteIntegrationRefProps>(props: T): Promise<DeleteIntegrationRefOKResponse<GetPathParamsType<T>>>;
|
|
37
|
+
export declare function useDeleteIntegrationRefMutation(options?: Omit<UseMutationOptions<DeleteIntegrationRefOKResponse<unknown>, DeleteIntegrationRefErrorResponse<unknown>, DeleteIntegrationRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<unknown>, unknown, DeleteIntegrationRefProps, unknown>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
function isProjectPathParams(pathParams) {
|
|
7
|
+
return !!(pathParams.org &&
|
|
8
|
+
pathParams.project);
|
|
9
|
+
}
|
|
10
|
+
function isOrgPathParams(pathParams) {
|
|
11
|
+
return !!(pathParams.org &&
|
|
12
|
+
!pathParams.project);
|
|
13
|
+
}
|
|
14
|
+
export function deleteIntegrationRef(props) {
|
|
15
|
+
let url = `/v1/integrations/${props.pathParams.integration}`;
|
|
16
|
+
let method = 'DELETE';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/integrations/${props.pathParams.integration}`;
|
|
19
|
+
method = 'DELETE';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/integrations/${props.pathParams.integration}`;
|
|
23
|
+
method = 'DELETE';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useDeleteIntegrationRefMutation(options) {
|
|
29
|
+
return useMutation((mutateProps) => deleteIntegrationRef(mutateProps), options);
|
|
30
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { Result } from '../schemas/Result';
|
|
3
|
+
import type { JsonNode } from '../schemas/JsonNode';
|
|
4
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface DiscoverIntegrationRefAccountPathParams {
|
|
7
|
+
integration: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DiscoverIntegrationRefAccountHeaderParams {
|
|
10
|
+
'Harness-Account': string;
|
|
11
|
+
}
|
|
12
|
+
export type DiscoverIntegrationRefAccountRequestBody = JsonNode;
|
|
13
|
+
export type DiscoverIntegrationRefAccountOKResponse = Result;
|
|
14
|
+
export type DiscoverIntegrationRefAccountErrorResponse = unknown;
|
|
15
|
+
export interface DiscoverIntegrationRefOrgPathParams {
|
|
16
|
+
org: string;
|
|
17
|
+
integration: string;
|
|
18
|
+
}
|
|
19
|
+
export interface DiscoverIntegrationRefOrgHeaderParams {
|
|
20
|
+
'Harness-Account': string;
|
|
21
|
+
}
|
|
22
|
+
export type DiscoverIntegrationRefOrgRequestBody = JsonNode;
|
|
23
|
+
export type DiscoverIntegrationRefOrgOKResponse = Result;
|
|
24
|
+
export type DiscoverIntegrationRefOrgErrorResponse = unknown;
|
|
25
|
+
export interface DiscoverIntegrationRefProjectPathParams {
|
|
26
|
+
org: string;
|
|
27
|
+
project: string;
|
|
28
|
+
integration: string;
|
|
29
|
+
}
|
|
30
|
+
export interface DiscoverIntegrationRefProjectHeaderParams {
|
|
31
|
+
'Harness-Account': string;
|
|
32
|
+
}
|
|
33
|
+
export type DiscoverIntegrationRefProjectRequestBody = JsonNode;
|
|
34
|
+
export type DiscoverIntegrationRefProjectOKResponse = Result;
|
|
35
|
+
export type DiscoverIntegrationRefProjectErrorResponse = unknown;
|
|
36
|
+
export type DiscoverIntegrationRefOKResponse<T> = T extends DiscoverIntegrationRefProjectPathParams ? ResponseWithPagination<DiscoverIntegrationRefProjectOKResponse> : T extends DiscoverIntegrationRefOrgPathParams ? ResponseWithPagination<DiscoverIntegrationRefOrgOKResponse> : ResponseWithPagination<DiscoverIntegrationRefAccountOKResponse>;
|
|
37
|
+
export type DiscoverIntegrationRefErrorResponse<T> = T extends DiscoverIntegrationRefProjectPathParams ? DiscoverIntegrationRefProjectErrorResponse : T extends DiscoverIntegrationRefOrgPathParams ? DiscoverIntegrationRefOrgErrorResponse : DiscoverIntegrationRefAccountErrorResponse;
|
|
38
|
+
export interface DiscoverIntegrationRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
39
|
+
pathParams: DiscoverIntegrationRefAccountPathParams | DiscoverIntegrationRefOrgPathParams | DiscoverIntegrationRefProjectPathParams;
|
|
40
|
+
}
|
|
41
|
+
export declare function discoverIntegrationRef<T extends DiscoverIntegrationRefProps = DiscoverIntegrationRefProps>(props: T): Promise<DiscoverIntegrationRefOKResponse<GetPathParamsType<T>>>;
|
|
42
|
+
export declare function useDiscoverIntegrationRefMutation(options?: Omit<UseMutationOptions<DiscoverIntegrationRefOKResponse<unknown>, DiscoverIntegrationRefErrorResponse<unknown>, DiscoverIntegrationRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<Result>, unknown, DiscoverIntegrationRefProps, unknown>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
function isProjectPathParams(pathParams) {
|
|
7
|
+
return !!(pathParams.org &&
|
|
8
|
+
pathParams.project);
|
|
9
|
+
}
|
|
10
|
+
function isOrgPathParams(pathParams) {
|
|
11
|
+
return !!(pathParams.org &&
|
|
12
|
+
!pathParams.project);
|
|
13
|
+
}
|
|
14
|
+
export function discoverIntegrationRef(props) {
|
|
15
|
+
let url = `/v1/integrations/${props.pathParams.integration}/discover`;
|
|
16
|
+
let method = 'POST';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/integrations/${props.pathParams.integration}/discover`;
|
|
19
|
+
method = 'POST';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/integrations/${props.pathParams.integration}/discover`;
|
|
23
|
+
method = 'POST';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useDiscoverIntegrationRefMutation(options) {
|
|
29
|
+
return useMutation((mutateProps) => discoverIntegrationRef(mutateProps), options);
|
|
30
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { Detail } from '../schemas/Detail';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetDefinitionQueryPathParams {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export type GetDefinitionOkResponse = ResponseWithPagination<Detail>;
|
|
9
|
+
export type GetDefinitionErrorResponse = unknown;
|
|
10
|
+
export interface GetDefinitionProps extends GetDefinitionQueryPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
11
|
+
}
|
|
12
|
+
export declare function getDefinition(props: GetDefinitionProps): Promise<GetDefinitionOkResponse>;
|
|
13
|
+
export declare function useGetDefinitionQuery(props: GetDefinitionProps, options?: Omit<UseQueryOptions<GetDefinitionOkResponse, GetDefinitionErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetDefinitionOkResponse, unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 getDefinition(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/definitions/${props.id}`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
export function useGetDefinitionQuery(props, options) {
|
|
10
|
+
return useQuery(['getDefinition', props.id], ({ signal }) => getDefinition(Object.assign(Object.assign({}, props), { signal })), options);
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { Limits } from '../schemas/Limits';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetIngestionLimitQueryPathParams {
|
|
6
|
+
scope: string;
|
|
7
|
+
id: string;
|
|
8
|
+
}
|
|
9
|
+
export type GetIngestionLimitOkResponse = ResponseWithPagination<Limits>;
|
|
10
|
+
export type GetIngestionLimitErrorResponse = unknown;
|
|
11
|
+
export interface GetIngestionLimitProps extends GetIngestionLimitQueryPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
12
|
+
}
|
|
13
|
+
export declare function getIngestionLimit(props: GetIngestionLimitProps): Promise<GetIngestionLimitOkResponse>;
|
|
14
|
+
export declare function useGetIngestionLimitQuery(props: GetIngestionLimitProps, options?: Omit<UseQueryOptions<GetIngestionLimitOkResponse, GetIngestionLimitErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetIngestionLimitOkResponse, unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 getIngestionLimit(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/ingestion/admin/limits/${props.scope}/${props.id}`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
export function useGetIngestionLimitQuery(props, options) {
|
|
10
|
+
return useQuery(['getIngestionLimit', props.scope, props.id], ({ signal }) => getIngestionLimit(Object.assign(Object.assign({}, props), { signal })), options);
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { Run } from '../schemas/Run';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetIngestionRunQueryPathParams {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GetIngestionRunQueryHeaderParams {
|
|
9
|
+
'Harness-Account': string;
|
|
10
|
+
}
|
|
11
|
+
export type GetIngestionRunOkResponse = ResponseWithPagination<Run>;
|
|
12
|
+
export type GetIngestionRunErrorResponse = unknown;
|
|
13
|
+
export interface GetIngestionRunProps extends GetIngestionRunQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetIngestionRunQueryHeaderParams>, 'url'> {
|
|
14
|
+
}
|
|
15
|
+
export declare function getIngestionRun(props: GetIngestionRunProps): Promise<GetIngestionRunOkResponse>;
|
|
16
|
+
export declare function useGetIngestionRunQuery(props: GetIngestionRunProps, options?: Omit<UseQueryOptions<GetIngestionRunOkResponse, GetIngestionRunErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetIngestionRunOkResponse, unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 getIngestionRun(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/ingestion/runs/${props.id}`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
export function useGetIngestionRunQuery(props, options) {
|
|
10
|
+
return useQuery(['getIngestionRun', props.id], ({ signal }) => getIngestionRun(Object.assign(Object.assign({}, props), { signal })), options);
|
|
11
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { JobView } from '../schemas/JobView';
|
|
3
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetIntegrationJobRefAccountPathParams {
|
|
6
|
+
integration: string;
|
|
7
|
+
job: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetIntegrationJobRefAccountHeaderParams {
|
|
10
|
+
'Harness-Account': string;
|
|
11
|
+
}
|
|
12
|
+
export type GetIntegrationJobRefAccountOKResponse = JobView;
|
|
13
|
+
export type GetIntegrationJobRefAccountErrorResponse = unknown;
|
|
14
|
+
export interface GetIntegrationJobRefOrgPathParams {
|
|
15
|
+
org: string;
|
|
16
|
+
integration: string;
|
|
17
|
+
job: string;
|
|
18
|
+
}
|
|
19
|
+
export interface GetIntegrationJobRefOrgHeaderParams {
|
|
20
|
+
'Harness-Account': string;
|
|
21
|
+
}
|
|
22
|
+
export type GetIntegrationJobRefOrgOKResponse = JobView;
|
|
23
|
+
export type GetIntegrationJobRefOrgErrorResponse = unknown;
|
|
24
|
+
export interface GetIntegrationJobRefProjectPathParams {
|
|
25
|
+
org: string;
|
|
26
|
+
project: string;
|
|
27
|
+
integration: string;
|
|
28
|
+
job: string;
|
|
29
|
+
}
|
|
30
|
+
export interface GetIntegrationJobRefProjectHeaderParams {
|
|
31
|
+
'Harness-Account': string;
|
|
32
|
+
}
|
|
33
|
+
export type GetIntegrationJobRefProjectOKResponse = JobView;
|
|
34
|
+
export type GetIntegrationJobRefProjectErrorResponse = unknown;
|
|
35
|
+
export type GetIntegrationJobRefOKResponse<T> = T extends GetIntegrationJobRefProjectPathParams ? ResponseWithPagination<GetIntegrationJobRefProjectOKResponse> : T extends GetIntegrationJobRefOrgPathParams ? ResponseWithPagination<GetIntegrationJobRefOrgOKResponse> : ResponseWithPagination<GetIntegrationJobRefAccountOKResponse>;
|
|
36
|
+
export type GetIntegrationJobRefErrorResponse<T> = T extends GetIntegrationJobRefProjectPathParams ? GetIntegrationJobRefProjectErrorResponse : T extends GetIntegrationJobRefOrgPathParams ? GetIntegrationJobRefOrgErrorResponse : GetIntegrationJobRefAccountErrorResponse;
|
|
37
|
+
export interface GetIntegrationJobRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
38
|
+
pathParams: GetIntegrationJobRefAccountPathParams | GetIntegrationJobRefOrgPathParams | GetIntegrationJobRefProjectPathParams;
|
|
39
|
+
}
|
|
40
|
+
export declare function getIntegrationJobRef<T extends GetIntegrationJobRefProps = GetIntegrationJobRefProps>(props: T): Promise<GetIntegrationJobRefOKResponse<GetPathParamsType<T>>>;
|
|
41
|
+
export declare function useGetIntegrationJobRefQuery<T extends GetIntegrationJobRefProps = GetIntegrationJobRefProps>(props: T, options?: Omit<UseQueryOptions<GetIntegrationJobRefOKResponse<GetPathParamsType<T>>, GetIntegrationJobRefErrorResponse<GetPathParamsType<T>>>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetIntegrationJobRefOKResponse<GetPathParamsType<T>>, GetIntegrationJobRefErrorResponse<GetPathParamsType<T>>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
function isProjectPathParams(pathParams) {
|
|
7
|
+
return !!(pathParams.org &&
|
|
8
|
+
pathParams.project);
|
|
9
|
+
}
|
|
10
|
+
function isOrgPathParams(pathParams) {
|
|
11
|
+
return !!(pathParams.org &&
|
|
12
|
+
!pathParams.project);
|
|
13
|
+
}
|
|
14
|
+
export function getIntegrationJobRef(props) {
|
|
15
|
+
let url = `/v1/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}`;
|
|
16
|
+
let method = 'GET';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}`;
|
|
19
|
+
method = 'GET';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}`;
|
|
23
|
+
method = 'GET';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useGetIntegrationJobRefQuery(props, options) {
|
|
29
|
+
return useQuery(['getIntegrationJobRef'], ({ signal }) => getIntegrationJobRef(Object.assign(Object.assign({}, props), { signal })), options);
|
|
30
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { IntegrationResponse } from '../schemas/IntegrationResponse';
|
|
3
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetIntegrationRefAccountPathParams {
|
|
6
|
+
integration: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GetIntegrationRefAccountHeaderParams {
|
|
9
|
+
'Harness-Account': string;
|
|
10
|
+
}
|
|
11
|
+
export type GetIntegrationRefAccountOKResponse = IntegrationResponse;
|
|
12
|
+
export type GetIntegrationRefAccountErrorResponse = unknown;
|
|
13
|
+
export interface GetIntegrationRefOrgPathParams {
|
|
14
|
+
org: string;
|
|
15
|
+
integration: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetIntegrationRefOrgHeaderParams {
|
|
18
|
+
'Harness-Account': string;
|
|
19
|
+
}
|
|
20
|
+
export type GetIntegrationRefOrgOKResponse = IntegrationResponse;
|
|
21
|
+
export type GetIntegrationRefOrgErrorResponse = unknown;
|
|
22
|
+
export interface GetIntegrationRefProjectPathParams {
|
|
23
|
+
org: string;
|
|
24
|
+
project: string;
|
|
25
|
+
integration: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GetIntegrationRefProjectHeaderParams {
|
|
28
|
+
'Harness-Account': string;
|
|
29
|
+
}
|
|
30
|
+
export type GetIntegrationRefProjectOKResponse = IntegrationResponse;
|
|
31
|
+
export type GetIntegrationRefProjectErrorResponse = unknown;
|
|
32
|
+
export type GetIntegrationRefOKResponse<T> = T extends GetIntegrationRefProjectPathParams ? ResponseWithPagination<GetIntegrationRefProjectOKResponse> : T extends GetIntegrationRefOrgPathParams ? ResponseWithPagination<GetIntegrationRefOrgOKResponse> : ResponseWithPagination<GetIntegrationRefAccountOKResponse>;
|
|
33
|
+
export type GetIntegrationRefErrorResponse<T> = T extends GetIntegrationRefProjectPathParams ? GetIntegrationRefProjectErrorResponse : T extends GetIntegrationRefOrgPathParams ? GetIntegrationRefOrgErrorResponse : GetIntegrationRefAccountErrorResponse;
|
|
34
|
+
export interface GetIntegrationRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
35
|
+
pathParams: GetIntegrationRefAccountPathParams | GetIntegrationRefOrgPathParams | GetIntegrationRefProjectPathParams;
|
|
36
|
+
}
|
|
37
|
+
export declare function getIntegrationRef<T extends GetIntegrationRefProps = GetIntegrationRefProps>(props: T): Promise<GetIntegrationRefOKResponse<GetPathParamsType<T>>>;
|
|
38
|
+
export declare function useGetIntegrationRefQuery<T extends GetIntegrationRefProps = GetIntegrationRefProps>(props: T, options?: Omit<UseQueryOptions<GetIntegrationRefOKResponse<GetPathParamsType<T>>, GetIntegrationRefErrorResponse<GetPathParamsType<T>>>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetIntegrationRefOKResponse<GetPathParamsType<T>>, GetIntegrationRefErrorResponse<GetPathParamsType<T>>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
function isProjectPathParams(pathParams) {
|
|
7
|
+
return !!(pathParams.org &&
|
|
8
|
+
pathParams.project);
|
|
9
|
+
}
|
|
10
|
+
function isOrgPathParams(pathParams) {
|
|
11
|
+
return !!(pathParams.org &&
|
|
12
|
+
!pathParams.project);
|
|
13
|
+
}
|
|
14
|
+
export function getIntegrationRef(props) {
|
|
15
|
+
let url = `/v1/integrations/${props.pathParams.integration}`;
|
|
16
|
+
let method = 'GET';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/integrations/${props.pathParams.integration}`;
|
|
19
|
+
method = 'GET';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/integrations/${props.pathParams.integration}`;
|
|
23
|
+
method = 'GET';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useGetIntegrationRefQuery(props, options) {
|
|
29
|
+
return useQuery(['getIntegrationRef'], ({ signal }) => getIntegrationRef(Object.assign(Object.assign({}, props), { signal })), options);
|
|
30
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
3
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
4
|
+
export interface IngestionRunStdoutMutationPathParams {
|
|
5
|
+
run: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IngestionRunStdoutMutationHeaderParams {
|
|
8
|
+
Authorization?: string;
|
|
9
|
+
'Content-Encoding'?: string;
|
|
10
|
+
}
|
|
11
|
+
export type IngestionRunStdoutOkResponse = ResponseWithPagination<unknown>;
|
|
12
|
+
export type IngestionRunStdoutErrorResponse = unknown;
|
|
13
|
+
export interface IngestionRunStdoutProps extends IngestionRunStdoutMutationPathParams, Omit<FetcherOptions<unknown, unknown, IngestionRunStdoutMutationHeaderParams>, 'url'> {
|
|
14
|
+
}
|
|
15
|
+
export declare function ingestionRunStdout(props: IngestionRunStdoutProps): Promise<IngestionRunStdoutOkResponse>;
|
|
16
|
+
export declare function useIngestionRunStdoutMutation(options?: Omit<UseMutationOptions<IngestionRunStdoutOkResponse, IngestionRunStdoutErrorResponse, IngestionRunStdoutProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<IngestionRunStdoutOkResponse, unknown, IngestionRunStdoutProps, unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 ingestionRunStdout(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/ingestion/runs/${props.run}/stdout`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
export function useIngestionRunStdoutMutation(options) {
|
|
10
|
+
return useMutation((mutateProps) => ingestionRunStdout(mutateProps), options);
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
3
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
4
|
+
export interface ListDefinitionsQueryQueryParams {
|
|
5
|
+
category?: string;
|
|
6
|
+
detail?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type ListDefinitionsOkResponse = ResponseWithPagination<Array<{}>>;
|
|
9
|
+
export type ListDefinitionsErrorResponse = unknown;
|
|
10
|
+
export interface ListDefinitionsProps extends Omit<FetcherOptions<ListDefinitionsQueryQueryParams, unknown>, 'url'> {
|
|
11
|
+
queryParams: ListDefinitionsQueryQueryParams;
|
|
12
|
+
}
|
|
13
|
+
export declare function listDefinitions(props: ListDefinitionsProps): Promise<ListDefinitionsOkResponse>;
|
|
14
|
+
export declare function useListDefinitionsQuery(props: ListDefinitionsProps, options?: Omit<UseQueryOptions<ListDefinitionsOkResponse, ListDefinitionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListDefinitionsOkResponse, unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 listDefinitions(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/definitions`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
export function useListDefinitionsQuery(props, options) {
|
|
10
|
+
return useQuery(['listDefinitions', props.queryParams], ({ signal }) => listDefinitions(Object.assign(Object.assign({}, props), { signal })), options);
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { JobView } from '../schemas/JobView';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface ListIngestionJobsQueryQueryParams {
|
|
6
|
+
/**
|
|
7
|
+
* @format int32
|
|
8
|
+
* @default 0
|
|
9
|
+
*/
|
|
10
|
+
page?: number;
|
|
11
|
+
/**
|
|
12
|
+
* @format int32
|
|
13
|
+
* @default 30
|
|
14
|
+
*/
|
|
15
|
+
limit?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ListIngestionJobsQueryHeaderParams {
|
|
18
|
+
'Harness-Account': string;
|
|
19
|
+
}
|
|
20
|
+
export type ListIngestionJobsOkResponse = ResponseWithPagination<JobView[]>;
|
|
21
|
+
export type ListIngestionJobsErrorResponse = unknown;
|
|
22
|
+
export interface ListIngestionJobsProps extends Omit<FetcherOptions<ListIngestionJobsQueryQueryParams, unknown, ListIngestionJobsQueryHeaderParams>, 'url'> {
|
|
23
|
+
queryParams: ListIngestionJobsQueryQueryParams;
|
|
24
|
+
}
|
|
25
|
+
export declare function listIngestionJobs(props: ListIngestionJobsProps): Promise<ListIngestionJobsOkResponse>;
|
|
26
|
+
export declare function useListIngestionJobsQuery(props: ListIngestionJobsProps, options?: Omit<UseQueryOptions<ListIngestionJobsOkResponse, ListIngestionJobsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListIngestionJobsOkResponse, unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 listIngestionJobs(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/ingestion/jobs`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
export function useListIngestionJobsQuery(props, options) {
|
|
10
|
+
return useQuery(['listIngestionJobs', props.queryParams], ({ signal }) => listIngestionJobs(Object.assign(Object.assign({}, props), { signal })), options);
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { LimitsDoc } from '../schemas/LimitsDoc';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export type ListIngestionLimitsOkResponse = ResponseWithPagination<LimitsDoc[]>;
|
|
6
|
+
export type ListIngestionLimitsErrorResponse = unknown;
|
|
7
|
+
export interface ListIngestionLimitsProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
8
|
+
}
|
|
9
|
+
export declare function listIngestionLimits(props: ListIngestionLimitsProps): Promise<ListIngestionLimitsOkResponse>;
|
|
10
|
+
export declare function useListIngestionLimitsQuery(props: ListIngestionLimitsProps, options?: Omit<UseQueryOptions<ListIngestionLimitsOkResponse, ListIngestionLimitsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListIngestionLimitsOkResponse, unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 listIngestionLimits(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/ingestion/admin/limits`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
export function useListIngestionLimitsQuery(props, options) {
|
|
10
|
+
return useQuery(['listIngestionLimits'], ({ signal }) => listIngestionLimits(Object.assign(Object.assign({}, props), { signal })), options);
|
|
11
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { Run } from '../schemas/Run';
|
|
3
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface ListIntegrationJobRunsRefAccountPathParams {
|
|
6
|
+
integration: string;
|
|
7
|
+
job: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ListIntegrationJobRunsRefAccountQueryParams {
|
|
10
|
+
/**
|
|
11
|
+
* @format int32
|
|
12
|
+
* @default 0
|
|
13
|
+
*/
|
|
14
|
+
page?: number;
|
|
15
|
+
/**
|
|
16
|
+
* @format int32
|
|
17
|
+
* @default 30
|
|
18
|
+
*/
|
|
19
|
+
limit?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface ListIntegrationJobRunsRefAccountHeaderParams {
|
|
22
|
+
'Harness-Account': string;
|
|
23
|
+
}
|
|
24
|
+
export type ListIntegrationJobRunsRefAccountOKResponse = Run[];
|
|
25
|
+
export type ListIntegrationJobRunsRefAccountErrorResponse = unknown;
|
|
26
|
+
export interface ListIntegrationJobRunsRefOrgPathParams {
|
|
27
|
+
org: string;
|
|
28
|
+
integration: string;
|
|
29
|
+
job: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ListIntegrationJobRunsRefOrgQueryParams {
|
|
32
|
+
/**
|
|
33
|
+
* @format int32
|
|
34
|
+
* @default 0
|
|
35
|
+
*/
|
|
36
|
+
page?: number;
|
|
37
|
+
/**
|
|
38
|
+
* @format int32
|
|
39
|
+
* @default 30
|
|
40
|
+
*/
|
|
41
|
+
limit?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface ListIntegrationJobRunsRefOrgHeaderParams {
|
|
44
|
+
'Harness-Account': string;
|
|
45
|
+
}
|
|
46
|
+
export type ListIntegrationJobRunsRefOrgOKResponse = Run[];
|
|
47
|
+
export type ListIntegrationJobRunsRefOrgErrorResponse = unknown;
|
|
48
|
+
export interface ListIntegrationJobRunsRefProjectPathParams {
|
|
49
|
+
org: string;
|
|
50
|
+
project: string;
|
|
51
|
+
integration: string;
|
|
52
|
+
job: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ListIntegrationJobRunsRefProjectQueryParams {
|
|
55
|
+
/**
|
|
56
|
+
* @format int32
|
|
57
|
+
* @default 0
|
|
58
|
+
*/
|
|
59
|
+
page?: number;
|
|
60
|
+
/**
|
|
61
|
+
* @format int32
|
|
62
|
+
* @default 30
|
|
63
|
+
*/
|
|
64
|
+
limit?: number;
|
|
65
|
+
}
|
|
66
|
+
export interface ListIntegrationJobRunsRefProjectHeaderParams {
|
|
67
|
+
'Harness-Account': string;
|
|
68
|
+
}
|
|
69
|
+
export type ListIntegrationJobRunsRefProjectOKResponse = Run[];
|
|
70
|
+
export type ListIntegrationJobRunsRefProjectErrorResponse = unknown;
|
|
71
|
+
export type ListIntegrationJobRunsRefOKResponse<T> = T extends ListIntegrationJobRunsRefProjectPathParams ? ResponseWithPagination<ListIntegrationJobRunsRefProjectOKResponse> : T extends ListIntegrationJobRunsRefOrgPathParams ? ResponseWithPagination<ListIntegrationJobRunsRefOrgOKResponse> : ResponseWithPagination<ListIntegrationJobRunsRefAccountOKResponse>;
|
|
72
|
+
export type ListIntegrationJobRunsRefErrorResponse<T> = T extends ListIntegrationJobRunsRefProjectPathParams ? ListIntegrationJobRunsRefProjectErrorResponse : T extends ListIntegrationJobRunsRefOrgPathParams ? ListIntegrationJobRunsRefOrgErrorResponse : ListIntegrationJobRunsRefAccountErrorResponse;
|
|
73
|
+
export interface ListIntegrationJobRunsRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
74
|
+
pathParams: ListIntegrationJobRunsRefAccountPathParams | ListIntegrationJobRunsRefOrgPathParams | ListIntegrationJobRunsRefProjectPathParams;
|
|
75
|
+
}
|
|
76
|
+
export declare function listIntegrationJobRunsRef<T extends ListIntegrationJobRunsRefProps = ListIntegrationJobRunsRefProps>(props: T): Promise<ListIntegrationJobRunsRefOKResponse<GetPathParamsType<T>>>;
|
|
77
|
+
export declare function useListIntegrationJobRunsRefQuery<T extends ListIntegrationJobRunsRefProps = ListIntegrationJobRunsRefProps>(props: T, options?: Omit<UseQueryOptions<ListIntegrationJobRunsRefOKResponse<GetPathParamsType<T>>, ListIntegrationJobRunsRefErrorResponse<GetPathParamsType<T>>>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListIntegrationJobRunsRefOKResponse<GetPathParamsType<T>>, ListIntegrationJobRunsRefErrorResponse<GetPathParamsType<T>>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
function isProjectPathParams(pathParams) {
|
|
7
|
+
return !!(pathParams.org &&
|
|
8
|
+
pathParams.project);
|
|
9
|
+
}
|
|
10
|
+
function isOrgPathParams(pathParams) {
|
|
11
|
+
return !!(pathParams.org &&
|
|
12
|
+
!pathParams.project);
|
|
13
|
+
}
|
|
14
|
+
export function listIntegrationJobRunsRef(props) {
|
|
15
|
+
let url = `/v1/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/runs`;
|
|
16
|
+
let method = 'GET';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/runs`;
|
|
19
|
+
method = 'GET';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/runs`;
|
|
23
|
+
method = 'GET';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useListIntegrationJobRunsRefQuery(props, options) {
|
|
29
|
+
return useQuery(['listIntegrationJobRunsRef', props.queryParams], ({ signal }) => listIntegrationJobRunsRef(Object.assign(Object.assign({}, props), { signal })), options);
|
|
30
|
+
}
|