@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.
Files changed (122) hide show
  1. package/README.md +38 -2
  2. package/dist/fetcher/index.d.ts +17 -0
  3. package/dist/fetcher/index.js +65 -0
  4. package/dist/integration-service/src/index.d.ts +6 -0
  5. package/dist/integration-service/src/index.js +10 -0
  6. package/dist/integration-service/src/services/helpers.d.ts +14 -0
  7. package/dist/integration-service/src/services/helpers.js +1 -0
  8. package/dist/integration-service/src/services/hooks/useCancelIngestionRunMutation.d.ts +16 -0
  9. package/dist/integration-service/src/services/hooks/useCancelIngestionRunMutation.js +11 -0
  10. package/dist/integration-service/src/services/hooks/useCheckIntegrationRefMutation.d.ts +42 -0
  11. package/dist/integration-service/src/services/hooks/useCheckIntegrationRefMutation.js +30 -0
  12. package/dist/integration-service/src/services/hooks/useClearDefaultIntegrationJobRefMutation.d.ts +41 -0
  13. package/dist/integration-service/src/services/hooks/useClearDefaultIntegrationJobRefMutation.js +30 -0
  14. package/dist/integration-service/src/services/hooks/useCreateIntegrationJobRefMutation.d.ts +42 -0
  15. package/dist/integration-service/src/services/hooks/useCreateIntegrationJobRefMutation.js +30 -0
  16. package/dist/integration-service/src/services/hooks/useCreateIntegrationRefMutation.d.ts +39 -0
  17. package/dist/integration-service/src/services/hooks/useCreateIntegrationRefMutation.js +30 -0
  18. package/dist/integration-service/src/services/hooks/useDeleteIngestionJobSinkMutation.d.ts +12 -0
  19. package/dist/integration-service/src/services/hooks/useDeleteIngestionJobSinkMutation.js +11 -0
  20. package/dist/integration-service/src/services/hooks/useDeleteIngestionLimitMutation.d.ts +13 -0
  21. package/dist/integration-service/src/services/hooks/useDeleteIngestionLimitMutation.js +11 -0
  22. package/dist/integration-service/src/services/hooks/useDeleteIntegrationJobRefMutation.d.ts +40 -0
  23. package/dist/integration-service/src/services/hooks/useDeleteIntegrationJobRefMutation.js +30 -0
  24. package/dist/integration-service/src/services/hooks/useDeleteIntegrationRefMutation.d.ts +37 -0
  25. package/dist/integration-service/src/services/hooks/useDeleteIntegrationRefMutation.js +30 -0
  26. package/dist/integration-service/src/services/hooks/useDiscoverIntegrationRefMutation.d.ts +42 -0
  27. package/dist/integration-service/src/services/hooks/useDiscoverIntegrationRefMutation.js +30 -0
  28. package/dist/integration-service/src/services/hooks/useGetDefinitionQuery.d.ts +13 -0
  29. package/dist/integration-service/src/services/hooks/useGetDefinitionQuery.js +11 -0
  30. package/dist/integration-service/src/services/hooks/useGetIngestionLimitQuery.d.ts +14 -0
  31. package/dist/integration-service/src/services/hooks/useGetIngestionLimitQuery.js +11 -0
  32. package/dist/integration-service/src/services/hooks/useGetIngestionRunQuery.d.ts +16 -0
  33. package/dist/integration-service/src/services/hooks/useGetIngestionRunQuery.js +11 -0
  34. package/dist/integration-service/src/services/hooks/useGetIntegrationJobRefQuery.d.ts +41 -0
  35. package/dist/integration-service/src/services/hooks/useGetIntegrationJobRefQuery.js +30 -0
  36. package/dist/integration-service/src/services/hooks/useGetIntegrationRefQuery.d.ts +38 -0
  37. package/dist/integration-service/src/services/hooks/useGetIntegrationRefQuery.js +30 -0
  38. package/dist/integration-service/src/services/hooks/useIngestionRunStdoutMutation.d.ts +16 -0
  39. package/dist/integration-service/src/services/hooks/useIngestionRunStdoutMutation.js +11 -0
  40. package/dist/integration-service/src/services/hooks/useListDefinitionsQuery.d.ts +14 -0
  41. package/dist/integration-service/src/services/hooks/useListDefinitionsQuery.js +11 -0
  42. package/dist/integration-service/src/services/hooks/useListIngestionJobsQuery.d.ts +26 -0
  43. package/dist/integration-service/src/services/hooks/useListIngestionJobsQuery.js +11 -0
  44. package/dist/integration-service/src/services/hooks/useListIngestionLimitsQuery.d.ts +10 -0
  45. package/dist/integration-service/src/services/hooks/useListIngestionLimitsQuery.js +11 -0
  46. package/dist/integration-service/src/services/hooks/useListIntegrationJobRunsRefQuery.d.ts +77 -0
  47. package/dist/integration-service/src/services/hooks/useListIntegrationJobRunsRefQuery.js +30 -0
  48. package/dist/integration-service/src/services/hooks/useListIntegrationJobsRefQuery.d.ts +38 -0
  49. package/dist/integration-service/src/services/hooks/useListIntegrationJobsRefQuery.js +30 -0
  50. package/dist/integration-service/src/services/hooks/useListIntegrationsRefQuery.d.ts +86 -0
  51. package/dist/integration-service/src/services/hooks/useListIntegrationsRefQuery.js +30 -0
  52. package/dist/integration-service/src/services/hooks/usePublishLibraryRevisionMutation.d.ts +16 -0
  53. package/dist/integration-service/src/services/hooks/usePublishLibraryRevisionMutation.js +11 -0
  54. package/dist/integration-service/src/services/hooks/usePutIngestionJobSinkMutation.d.ts +15 -0
  55. package/dist/integration-service/src/services/hooks/usePutIngestionJobSinkMutation.js +11 -0
  56. package/dist/integration-service/src/services/hooks/usePutIngestionLimitMutation.d.ts +16 -0
  57. package/dist/integration-service/src/services/hooks/usePutIngestionLimitMutation.js +11 -0
  58. package/dist/integration-service/src/services/hooks/useRepinIntegrationJobRefMutation.d.ts +41 -0
  59. package/dist/integration-service/src/services/hooks/useRepinIntegrationJobRefMutation.js +30 -0
  60. package/dist/integration-service/src/services/hooks/useResetIntegrationJobCheckpointsRefMutation.d.ts +49 -0
  61. package/dist/integration-service/src/services/hooks/useResetIntegrationJobCheckpointsRefMutation.js +30 -0
  62. package/dist/integration-service/src/services/hooks/useRotateIntegrationJobWebhookTokenRefMutation.d.ts +46 -0
  63. package/dist/integration-service/src/services/hooks/useRotateIntegrationJobWebhookTokenRefMutation.js +30 -0
  64. package/dist/integration-service/src/services/hooks/useSetDefaultIntegrationJobRefMutation.d.ts +41 -0
  65. package/dist/integration-service/src/services/hooks/useSetDefaultIntegrationJobRefMutation.js +30 -0
  66. package/dist/integration-service/src/services/hooks/useSyncIntegrationJobRefMutation.d.ts +41 -0
  67. package/dist/integration-service/src/services/hooks/useSyncIntegrationJobRefMutation.js +30 -0
  68. package/dist/integration-service/src/services/hooks/useUpdateIntegrationJobRefMutation.d.ts +45 -0
  69. package/dist/integration-service/src/services/hooks/useUpdateIntegrationJobRefMutation.js +30 -0
  70. package/dist/integration-service/src/services/hooks/useUpdateIntegrationRefMutation.d.ts +42 -0
  71. package/dist/integration-service/src/services/hooks/useUpdateIntegrationRefMutation.js +30 -0
  72. package/dist/integration-service/src/services/index.d.ts +89 -0
  73. package/dist/integration-service/src/services/index.js +32 -0
  74. package/dist/integration-service/src/services/schemas/CheckpointView.d.ts +7 -0
  75. package/dist/integration-service/src/services/schemas/CheckpointView.js +4 -0
  76. package/dist/integration-service/src/services/schemas/Composition.d.ts +6 -0
  77. package/dist/integration-service/src/services/schemas/Composition.js +4 -0
  78. package/dist/integration-service/src/services/schemas/Detail.d.ts +11 -0
  79. package/dist/integration-service/src/services/schemas/Detail.js +1 -0
  80. package/dist/integration-service/src/services/schemas/Failure.d.ts +4 -0
  81. package/dist/integration-service/src/services/schemas/Failure.js +4 -0
  82. package/dist/integration-service/src/services/schemas/Health.d.ts +16 -0
  83. package/dist/integration-service/src/services/schemas/Health.js +4 -0
  84. package/dist/integration-service/src/services/schemas/IntegrationRequest.d.ts +17 -0
  85. package/dist/integration-service/src/services/schemas/IntegrationRequest.js +1 -0
  86. package/dist/integration-service/src/services/schemas/IntegrationResponse.d.ts +33 -0
  87. package/dist/integration-service/src/services/schemas/IntegrationResponse.js +1 -0
  88. package/dist/integration-service/src/services/schemas/JobView.d.ts +41 -0
  89. package/dist/integration-service/src/services/schemas/JobView.js +1 -0
  90. package/dist/integration-service/src/services/schemas/JsonNode.d.ts +29 -0
  91. package/dist/integration-service/src/services/schemas/JsonNode.js +4 -0
  92. package/dist/integration-service/src/services/schemas/LastRun.d.ts +9 -0
  93. package/dist/integration-service/src/services/schemas/LastRun.js +4 -0
  94. package/dist/integration-service/src/services/schemas/Limits.d.ts +35 -0
  95. package/dist/integration-service/src/services/schemas/Limits.js +4 -0
  96. package/dist/integration-service/src/services/schemas/LimitsDoc.d.ts +10 -0
  97. package/dist/integration-service/src/services/schemas/LimitsDoc.js +1 -0
  98. package/dist/integration-service/src/services/schemas/LoadIssue.d.ts +4 -0
  99. package/dist/integration-service/src/services/schemas/LoadIssue.js +4 -0
  100. package/dist/integration-service/src/services/schemas/PublishRequest.d.ts +5 -0
  101. package/dist/integration-service/src/services/schemas/PublishRequest.js +4 -0
  102. package/dist/integration-service/src/services/schemas/Result.d.ts +9 -0
  103. package/dist/integration-service/src/services/schemas/Result.js +1 -0
  104. package/dist/integration-service/src/services/schemas/Run.d.ts +48 -0
  105. package/dist/integration-service/src/services/schemas/Run.js +1 -0
  106. package/dist/integration-service/src/services/schemas/RunnerTarget.d.ts +4 -0
  107. package/dist/integration-service/src/services/schemas/RunnerTarget.js +4 -0
  108. package/dist/integration-service/src/services/schemas/SinkRequest.d.ts +3 -0
  109. package/dist/integration-service/src/services/schemas/SinkRequest.js +4 -0
  110. package/dist/integration-service/src/services/schemas/State.d.ts +4 -0
  111. package/dist/integration-service/src/services/schemas/State.js +4 -0
  112. package/dist/integration-service/src/services/schemas/StreamRun.d.ts +11 -0
  113. package/dist/integration-service/src/services/schemas/StreamRun.js +4 -0
  114. package/dist/integration-service/src/services/schemas/StreamSchema.d.ts +6 -0
  115. package/dist/integration-service/src/services/schemas/StreamSchema.js +4 -0
  116. package/dist/integration-service/src/services/schemas/Trigger.d.ts +6 -0
  117. package/dist/integration-service/src/services/schemas/Trigger.js +4 -0
  118. package/dist/integration-service/src/services/schemas/Use.d.ts +6 -0
  119. package/dist/integration-service/src/services/schemas/Use.js +4 -0
  120. package/dist/integration-service/src/services/schemas/WebhookView.d.ts +4 -0
  121. package/dist/integration-service/src/services/schemas/WebhookView.js +4 -0
  122. package/package.json +29 -4
@@ -0,0 +1,38 @@
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 ListIntegrationJobsRefAccountPathParams {
6
+ integration: string;
7
+ }
8
+ export interface ListIntegrationJobsRefAccountHeaderParams {
9
+ 'Harness-Account': string;
10
+ }
11
+ export type ListIntegrationJobsRefAccountOKResponse = JobView[];
12
+ export type ListIntegrationJobsRefAccountErrorResponse = unknown;
13
+ export interface ListIntegrationJobsRefOrgPathParams {
14
+ org: string;
15
+ integration: string;
16
+ }
17
+ export interface ListIntegrationJobsRefOrgHeaderParams {
18
+ 'Harness-Account': string;
19
+ }
20
+ export type ListIntegrationJobsRefOrgOKResponse = JobView[];
21
+ export type ListIntegrationJobsRefOrgErrorResponse = unknown;
22
+ export interface ListIntegrationJobsRefProjectPathParams {
23
+ org: string;
24
+ project: string;
25
+ integration: string;
26
+ }
27
+ export interface ListIntegrationJobsRefProjectHeaderParams {
28
+ 'Harness-Account': string;
29
+ }
30
+ export type ListIntegrationJobsRefProjectOKResponse = JobView[];
31
+ export type ListIntegrationJobsRefProjectErrorResponse = unknown;
32
+ export type ListIntegrationJobsRefOKResponse<T> = T extends ListIntegrationJobsRefProjectPathParams ? ResponseWithPagination<ListIntegrationJobsRefProjectOKResponse> : T extends ListIntegrationJobsRefOrgPathParams ? ResponseWithPagination<ListIntegrationJobsRefOrgOKResponse> : ResponseWithPagination<ListIntegrationJobsRefAccountOKResponse>;
33
+ export type ListIntegrationJobsRefErrorResponse<T> = T extends ListIntegrationJobsRefProjectPathParams ? ListIntegrationJobsRefProjectErrorResponse : T extends ListIntegrationJobsRefOrgPathParams ? ListIntegrationJobsRefOrgErrorResponse : ListIntegrationJobsRefAccountErrorResponse;
34
+ export interface ListIntegrationJobsRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
35
+ pathParams: ListIntegrationJobsRefAccountPathParams | ListIntegrationJobsRefOrgPathParams | ListIntegrationJobsRefProjectPathParams;
36
+ }
37
+ export declare function listIntegrationJobsRef<T extends ListIntegrationJobsRefProps = ListIntegrationJobsRefProps>(props: T): Promise<ListIntegrationJobsRefOKResponse<GetPathParamsType<T>>>;
38
+ export declare function useListIntegrationJobsRefQuery<T extends ListIntegrationJobsRefProps = ListIntegrationJobsRefProps>(props: T, options?: Omit<UseQueryOptions<ListIntegrationJobsRefOKResponse<GetPathParamsType<T>>, ListIntegrationJobsRefErrorResponse<GetPathParamsType<T>>>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListIntegrationJobsRefOKResponse<GetPathParamsType<T>>, ListIntegrationJobsRefErrorResponse<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 listIntegrationJobsRef(props) {
15
+ let url = `/v1/integrations/${props.pathParams.integration}/jobs`;
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`;
19
+ method = 'GET';
20
+ }
21
+ else if (isOrgPathParams(props.pathParams)) {
22
+ url = `/v1/orgs/${props.pathParams.org}/integrations/${props.pathParams.integration}/jobs`;
23
+ method = 'GET';
24
+ }
25
+ return fetcher(Object.assign({ url,
26
+ method }, props));
27
+ }
28
+ export function useListIntegrationJobsRefQuery(props, options) {
29
+ return useQuery(['listIntegrationJobsRef'], ({ signal }) => listIntegrationJobsRef(Object.assign(Object.assign({}, props), { signal })), options);
30
+ }
@@ -0,0 +1,86 @@
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 ListIntegrationsRefAccountPathParams {
6
+ }
7
+ export interface ListIntegrationsRefAccountQueryParams {
8
+ /**
9
+ * @format int32
10
+ * @default 0
11
+ */
12
+ page?: number;
13
+ /**
14
+ * @format int32
15
+ * @default 30
16
+ */
17
+ limit?: number;
18
+ search_term?: string;
19
+ /**
20
+ * @default "updated,desc"
21
+ */
22
+ sort?: string;
23
+ }
24
+ export interface ListIntegrationsRefAccountHeaderParams {
25
+ 'Harness-Account': string;
26
+ }
27
+ export type ListIntegrationsRefAccountOKResponse = IntegrationResponse[];
28
+ export type ListIntegrationsRefAccountErrorResponse = unknown;
29
+ export interface ListIntegrationsRefOrgPathParams {
30
+ org: string;
31
+ }
32
+ export interface ListIntegrationsRefOrgQueryParams {
33
+ /**
34
+ * @format int32
35
+ * @default 0
36
+ */
37
+ page?: number;
38
+ /**
39
+ * @format int32
40
+ * @default 30
41
+ */
42
+ limit?: number;
43
+ search_term?: string;
44
+ /**
45
+ * @default "updated,desc"
46
+ */
47
+ sort?: string;
48
+ }
49
+ export interface ListIntegrationsRefOrgHeaderParams {
50
+ 'Harness-Account': string;
51
+ }
52
+ export type ListIntegrationsRefOrgOKResponse = IntegrationResponse[];
53
+ export type ListIntegrationsRefOrgErrorResponse = unknown;
54
+ export interface ListIntegrationsRefProjectPathParams {
55
+ org: string;
56
+ project: string;
57
+ }
58
+ export interface ListIntegrationsRefProjectQueryParams {
59
+ /**
60
+ * @format int32
61
+ * @default 0
62
+ */
63
+ page?: number;
64
+ /**
65
+ * @format int32
66
+ * @default 30
67
+ */
68
+ limit?: number;
69
+ search_term?: string;
70
+ /**
71
+ * @default "updated,desc"
72
+ */
73
+ sort?: string;
74
+ }
75
+ export interface ListIntegrationsRefProjectHeaderParams {
76
+ 'Harness-Account': string;
77
+ }
78
+ export type ListIntegrationsRefProjectOKResponse = IntegrationResponse[];
79
+ export type ListIntegrationsRefProjectErrorResponse = unknown;
80
+ export type ListIntegrationsRefOKResponse<T> = T extends ListIntegrationsRefProjectPathParams ? ResponseWithPagination<ListIntegrationsRefProjectOKResponse> : T extends ListIntegrationsRefOrgPathParams ? ResponseWithPagination<ListIntegrationsRefOrgOKResponse> : ResponseWithPagination<ListIntegrationsRefAccountOKResponse>;
81
+ export type ListIntegrationsRefErrorResponse<T> = T extends ListIntegrationsRefProjectPathParams ? ListIntegrationsRefProjectErrorResponse : T extends ListIntegrationsRefOrgPathParams ? ListIntegrationsRefOrgErrorResponse : ListIntegrationsRefAccountErrorResponse;
82
+ export interface ListIntegrationsRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
83
+ pathParams: ListIntegrationsRefAccountPathParams | ListIntegrationsRefOrgPathParams | ListIntegrationsRefProjectPathParams;
84
+ }
85
+ export declare function listIntegrationsRef<T extends ListIntegrationsRefProps = ListIntegrationsRefProps>(props: T): Promise<ListIntegrationsRefOKResponse<GetPathParamsType<T>>>;
86
+ export declare function useListIntegrationsRefQuery<T extends ListIntegrationsRefProps = ListIntegrationsRefProps>(props: T, options?: Omit<UseQueryOptions<ListIntegrationsRefOKResponse<GetPathParamsType<T>>, ListIntegrationsRefErrorResponse<GetPathParamsType<T>>>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListIntegrationsRefOKResponse<GetPathParamsType<T>>, ListIntegrationsRefErrorResponse<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 listIntegrationsRef(props) {
15
+ let url = `/v1/integrations`;
16
+ let method = 'GET';
17
+ if (isProjectPathParams(props.pathParams)) {
18
+ url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/integrations`;
19
+ method = 'GET';
20
+ }
21
+ else if (isOrgPathParams(props.pathParams)) {
22
+ url = `/v1/orgs/${props.pathParams.org}/integrations`;
23
+ method = 'GET';
24
+ }
25
+ return fetcher(Object.assign({ url,
26
+ method }, props));
27
+ }
28
+ export function useListIntegrationsRefQuery(props, options) {
29
+ return useQuery(['listIntegrationsRef', props.queryParams], ({ signal }) => listIntegrationsRef(Object.assign(Object.assign({}, props), { signal })), options);
30
+ }
@@ -0,0 +1,16 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { Result } from '../schemas/Result';
3
+ import type { PublishRequest } from '../schemas/PublishRequest';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface PublishLibraryRevisionMutationPathParams {
7
+ revision: string;
8
+ }
9
+ export type PublishLibraryRevisionRequestBody = PublishRequest;
10
+ export type PublishLibraryRevisionOkResponse = ResponseWithPagination<Result>;
11
+ export type PublishLibraryRevisionErrorResponse = unknown;
12
+ export interface PublishLibraryRevisionProps extends PublishLibraryRevisionMutationPathParams, Omit<FetcherOptions<unknown, PublishLibraryRevisionRequestBody>, 'url'> {
13
+ body: PublishLibraryRevisionRequestBody;
14
+ }
15
+ export declare function publishLibraryRevision(props: PublishLibraryRevisionProps): Promise<PublishLibraryRevisionOkResponse>;
16
+ export declare function usePublishLibraryRevisionMutation(options?: Omit<UseMutationOptions<PublishLibraryRevisionOkResponse, PublishLibraryRevisionErrorResponse, PublishLibraryRevisionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PublishLibraryRevisionOkResponse, unknown, PublishLibraryRevisionProps, 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 publishLibraryRevision(props) {
7
+ return fetcher(Object.assign({ url: `/v1/admin/library/revisions/${props.revision}`, method: 'PUT' }, props));
8
+ }
9
+ export function usePublishLibraryRevisionMutation(options) {
10
+ return useMutation((mutateProps) => publishLibraryRevision(mutateProps), options);
11
+ }
@@ -0,0 +1,15 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SinkRequest } from '../schemas/SinkRequest';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface PutIngestionJobSinkMutationPathParams {
6
+ jobId: string;
7
+ }
8
+ export type PutIngestionJobSinkRequestBody = SinkRequest;
9
+ export type PutIngestionJobSinkOkResponse = ResponseWithPagination<unknown>;
10
+ export type PutIngestionJobSinkErrorResponse = unknown;
11
+ export interface PutIngestionJobSinkProps extends PutIngestionJobSinkMutationPathParams, Omit<FetcherOptions<unknown, PutIngestionJobSinkRequestBody>, 'url'> {
12
+ body: PutIngestionJobSinkRequestBody;
13
+ }
14
+ export declare function putIngestionJobSink(props: PutIngestionJobSinkProps): Promise<PutIngestionJobSinkOkResponse>;
15
+ export declare function usePutIngestionJobSinkMutation(options?: Omit<UseMutationOptions<PutIngestionJobSinkOkResponse, PutIngestionJobSinkErrorResponse, PutIngestionJobSinkProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PutIngestionJobSinkOkResponse, unknown, PutIngestionJobSinkProps, 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 putIngestionJobSink(props) {
7
+ return fetcher(Object.assign({ url: `/v1/ingestion/admin/jobs/${props.jobId}/sink`, method: 'PUT' }, props));
8
+ }
9
+ export function usePutIngestionJobSinkMutation(options) {
10
+ return useMutation((mutateProps) => putIngestionJobSink(mutateProps), options);
11
+ }
@@ -0,0 +1,16 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { JsonNode } from '../schemas/JsonNode';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface PutIngestionLimitMutationPathParams {
6
+ scope: string;
7
+ id: string;
8
+ }
9
+ export type PutIngestionLimitRequestBody = JsonNode;
10
+ export type PutIngestionLimitOkResponse = ResponseWithPagination<unknown>;
11
+ export type PutIngestionLimitErrorResponse = unknown;
12
+ export interface PutIngestionLimitProps extends PutIngestionLimitMutationPathParams, Omit<FetcherOptions<unknown, PutIngestionLimitRequestBody>, 'url'> {
13
+ body: PutIngestionLimitRequestBody;
14
+ }
15
+ export declare function putIngestionLimit(props: PutIngestionLimitProps): Promise<PutIngestionLimitOkResponse>;
16
+ export declare function usePutIngestionLimitMutation(options?: Omit<UseMutationOptions<PutIngestionLimitOkResponse, PutIngestionLimitErrorResponse, PutIngestionLimitProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PutIngestionLimitOkResponse, unknown, PutIngestionLimitProps, 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 putIngestionLimit(props) {
7
+ return fetcher(Object.assign({ url: `/v1/ingestion/admin/limits/${props.scope}/${props.id}`, method: 'PUT' }, props));
8
+ }
9
+ export function usePutIngestionLimitMutation(options) {
10
+ return useMutation((mutateProps) => putIngestionLimit(mutateProps), options);
11
+ }
@@ -0,0 +1,41 @@
1
+ import { UseMutationOptions } 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 RepinIntegrationJobRefAccountPathParams {
6
+ integration: string;
7
+ job: string;
8
+ }
9
+ export interface RepinIntegrationJobRefAccountHeaderParams {
10
+ 'Harness-Account': string;
11
+ }
12
+ export type RepinIntegrationJobRefAccountOKResponse = JobView;
13
+ export type RepinIntegrationJobRefAccountErrorResponse = unknown;
14
+ export interface RepinIntegrationJobRefOrgPathParams {
15
+ org: string;
16
+ integration: string;
17
+ job: string;
18
+ }
19
+ export interface RepinIntegrationJobRefOrgHeaderParams {
20
+ 'Harness-Account': string;
21
+ }
22
+ export type RepinIntegrationJobRefOrgOKResponse = JobView;
23
+ export type RepinIntegrationJobRefOrgErrorResponse = unknown;
24
+ export interface RepinIntegrationJobRefProjectPathParams {
25
+ org: string;
26
+ project: string;
27
+ integration: string;
28
+ job: string;
29
+ }
30
+ export interface RepinIntegrationJobRefProjectHeaderParams {
31
+ 'Harness-Account': string;
32
+ }
33
+ export type RepinIntegrationJobRefProjectOKResponse = JobView;
34
+ export type RepinIntegrationJobRefProjectErrorResponse = unknown;
35
+ export type RepinIntegrationJobRefOKResponse<T> = T extends RepinIntegrationJobRefProjectPathParams ? ResponseWithPagination<RepinIntegrationJobRefProjectOKResponse> : T extends RepinIntegrationJobRefOrgPathParams ? ResponseWithPagination<RepinIntegrationJobRefOrgOKResponse> : ResponseWithPagination<RepinIntegrationJobRefAccountOKResponse>;
36
+ export type RepinIntegrationJobRefErrorResponse<T> = T extends RepinIntegrationJobRefProjectPathParams ? RepinIntegrationJobRefProjectErrorResponse : T extends RepinIntegrationJobRefOrgPathParams ? RepinIntegrationJobRefOrgErrorResponse : RepinIntegrationJobRefAccountErrorResponse;
37
+ export interface RepinIntegrationJobRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
38
+ pathParams: RepinIntegrationJobRefAccountPathParams | RepinIntegrationJobRefOrgPathParams | RepinIntegrationJobRefProjectPathParams;
39
+ }
40
+ export declare function repinIntegrationJobRef<T extends RepinIntegrationJobRefProps = RepinIntegrationJobRefProps>(props: T): Promise<RepinIntegrationJobRefOKResponse<GetPathParamsType<T>>>;
41
+ export declare function useRepinIntegrationJobRefMutation(options?: Omit<UseMutationOptions<RepinIntegrationJobRefOKResponse<unknown>, RepinIntegrationJobRefErrorResponse<unknown>, RepinIntegrationJobRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<JobView>, unknown, RepinIntegrationJobRefProps, 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 repinIntegrationJobRef(props) {
15
+ let url = `/v1/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/repin`;
16
+ let method = 'POST';
17
+ if (isProjectPathParams(props.pathParams)) {
18
+ url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/repin`;
19
+ method = 'POST';
20
+ }
21
+ else if (isOrgPathParams(props.pathParams)) {
22
+ url = `/v1/orgs/${props.pathParams.org}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/repin`;
23
+ method = 'POST';
24
+ }
25
+ return fetcher(Object.assign({ url,
26
+ method }, props));
27
+ }
28
+ export function useRepinIntegrationJobRefMutation(options) {
29
+ return useMutation((mutateProps) => repinIntegrationJobRef(mutateProps), options);
30
+ }
@@ -0,0 +1,49 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
3
+ import { FetcherOptions } from '../../../../fetcher/index.js';
4
+ export interface ResetIntegrationJobCheckpointsRefAccountPathParams {
5
+ integration: string;
6
+ job: string;
7
+ }
8
+ export interface ResetIntegrationJobCheckpointsRefAccountQueryParams {
9
+ stream?: string;
10
+ }
11
+ export interface ResetIntegrationJobCheckpointsRefAccountHeaderParams {
12
+ 'Harness-Account': string;
13
+ }
14
+ export type ResetIntegrationJobCheckpointsRefAccountOKResponse = unknown;
15
+ export type ResetIntegrationJobCheckpointsRefAccountErrorResponse = unknown;
16
+ export interface ResetIntegrationJobCheckpointsRefOrgPathParams {
17
+ org: string;
18
+ integration: string;
19
+ job: string;
20
+ }
21
+ export interface ResetIntegrationJobCheckpointsRefOrgQueryParams {
22
+ stream?: string;
23
+ }
24
+ export interface ResetIntegrationJobCheckpointsRefOrgHeaderParams {
25
+ 'Harness-Account': string;
26
+ }
27
+ export type ResetIntegrationJobCheckpointsRefOrgOKResponse = unknown;
28
+ export type ResetIntegrationJobCheckpointsRefOrgErrorResponse = unknown;
29
+ export interface ResetIntegrationJobCheckpointsRefProjectPathParams {
30
+ org: string;
31
+ project: string;
32
+ integration: string;
33
+ job: string;
34
+ }
35
+ export interface ResetIntegrationJobCheckpointsRefProjectQueryParams {
36
+ stream?: string;
37
+ }
38
+ export interface ResetIntegrationJobCheckpointsRefProjectHeaderParams {
39
+ 'Harness-Account': string;
40
+ }
41
+ export type ResetIntegrationJobCheckpointsRefProjectOKResponse = unknown;
42
+ export type ResetIntegrationJobCheckpointsRefProjectErrorResponse = unknown;
43
+ export type ResetIntegrationJobCheckpointsRefOKResponse<T> = T extends ResetIntegrationJobCheckpointsRefProjectPathParams ? ResponseWithPagination<ResetIntegrationJobCheckpointsRefProjectOKResponse> : T extends ResetIntegrationJobCheckpointsRefOrgPathParams ? ResponseWithPagination<ResetIntegrationJobCheckpointsRefOrgOKResponse> : ResponseWithPagination<ResetIntegrationJobCheckpointsRefAccountOKResponse>;
44
+ export type ResetIntegrationJobCheckpointsRefErrorResponse<T> = T extends ResetIntegrationJobCheckpointsRefProjectPathParams ? ResetIntegrationJobCheckpointsRefProjectErrorResponse : T extends ResetIntegrationJobCheckpointsRefOrgPathParams ? ResetIntegrationJobCheckpointsRefOrgErrorResponse : ResetIntegrationJobCheckpointsRefAccountErrorResponse;
45
+ export interface ResetIntegrationJobCheckpointsRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
46
+ pathParams: ResetIntegrationJobCheckpointsRefAccountPathParams | ResetIntegrationJobCheckpointsRefOrgPathParams | ResetIntegrationJobCheckpointsRefProjectPathParams;
47
+ }
48
+ export declare function resetIntegrationJobCheckpointsRef<T extends ResetIntegrationJobCheckpointsRefProps = ResetIntegrationJobCheckpointsRefProps>(props: T): Promise<ResetIntegrationJobCheckpointsRefOKResponse<GetPathParamsType<T>>>;
49
+ export declare function useResetIntegrationJobCheckpointsRefMutation(options?: Omit<UseMutationOptions<ResetIntegrationJobCheckpointsRefOKResponse<unknown>, ResetIntegrationJobCheckpointsRefErrorResponse<unknown>, ResetIntegrationJobCheckpointsRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<unknown>, unknown, ResetIntegrationJobCheckpointsRefProps, 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 resetIntegrationJobCheckpointsRef(props) {
15
+ let url = `/v1/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/checkpoints`;
16
+ let method = 'DELETE';
17
+ if (isProjectPathParams(props.pathParams)) {
18
+ url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/checkpoints`;
19
+ method = 'DELETE';
20
+ }
21
+ else if (isOrgPathParams(props.pathParams)) {
22
+ url = `/v1/orgs/${props.pathParams.org}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/checkpoints`;
23
+ method = 'DELETE';
24
+ }
25
+ return fetcher(Object.assign({ url,
26
+ method }, props));
27
+ }
28
+ export function useResetIntegrationJobCheckpointsRefMutation(options) {
29
+ return useMutation((mutateProps) => resetIntegrationJobCheckpointsRef(mutateProps), options);
30
+ }
@@ -0,0 +1,46 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
3
+ import { FetcherOptions } from '../../../../fetcher/index.js';
4
+ export interface RotateIntegrationJobWebhookTokenRefAccountPathParams {
5
+ integration: string;
6
+ job: string;
7
+ }
8
+ export interface RotateIntegrationJobWebhookTokenRefAccountHeaderParams {
9
+ 'Harness-Account': string;
10
+ }
11
+ export type RotateIntegrationJobWebhookTokenRefAccountOKResponse = {
12
+ [key: string]: string;
13
+ };
14
+ export type RotateIntegrationJobWebhookTokenRefAccountErrorResponse = unknown;
15
+ export interface RotateIntegrationJobWebhookTokenRefOrgPathParams {
16
+ org: string;
17
+ integration: string;
18
+ job: string;
19
+ }
20
+ export interface RotateIntegrationJobWebhookTokenRefOrgHeaderParams {
21
+ 'Harness-Account': string;
22
+ }
23
+ export type RotateIntegrationJobWebhookTokenRefOrgOKResponse = {
24
+ [key: string]: string;
25
+ };
26
+ export type RotateIntegrationJobWebhookTokenRefOrgErrorResponse = unknown;
27
+ export interface RotateIntegrationJobWebhookTokenRefProjectPathParams {
28
+ org: string;
29
+ project: string;
30
+ integration: string;
31
+ job: string;
32
+ }
33
+ export interface RotateIntegrationJobWebhookTokenRefProjectHeaderParams {
34
+ 'Harness-Account': string;
35
+ }
36
+ export type RotateIntegrationJobWebhookTokenRefProjectOKResponse = {
37
+ [key: string]: string;
38
+ };
39
+ export type RotateIntegrationJobWebhookTokenRefProjectErrorResponse = unknown;
40
+ export type RotateIntegrationJobWebhookTokenRefOKResponse<T> = T extends RotateIntegrationJobWebhookTokenRefProjectPathParams ? ResponseWithPagination<RotateIntegrationJobWebhookTokenRefProjectOKResponse> : T extends RotateIntegrationJobWebhookTokenRefOrgPathParams ? ResponseWithPagination<RotateIntegrationJobWebhookTokenRefOrgOKResponse> : ResponseWithPagination<RotateIntegrationJobWebhookTokenRefAccountOKResponse>;
41
+ export type RotateIntegrationJobWebhookTokenRefErrorResponse<T> = T extends RotateIntegrationJobWebhookTokenRefProjectPathParams ? RotateIntegrationJobWebhookTokenRefProjectErrorResponse : T extends RotateIntegrationJobWebhookTokenRefOrgPathParams ? RotateIntegrationJobWebhookTokenRefOrgErrorResponse : RotateIntegrationJobWebhookTokenRefAccountErrorResponse;
42
+ export interface RotateIntegrationJobWebhookTokenRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
43
+ pathParams: RotateIntegrationJobWebhookTokenRefAccountPathParams | RotateIntegrationJobWebhookTokenRefOrgPathParams | RotateIntegrationJobWebhookTokenRefProjectPathParams;
44
+ }
45
+ export declare function rotateIntegrationJobWebhookTokenRef<T extends RotateIntegrationJobWebhookTokenRefProps = RotateIntegrationJobWebhookTokenRefProps>(props: T): Promise<RotateIntegrationJobWebhookTokenRefOKResponse<GetPathParamsType<T>>>;
46
+ export declare function useRotateIntegrationJobWebhookTokenRefMutation(options?: Omit<UseMutationOptions<RotateIntegrationJobWebhookTokenRefOKResponse<unknown>, RotateIntegrationJobWebhookTokenRefErrorResponse<unknown>, RotateIntegrationJobWebhookTokenRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<RotateIntegrationJobWebhookTokenRefAccountOKResponse>, unknown, RotateIntegrationJobWebhookTokenRefProps, 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 rotateIntegrationJobWebhookTokenRef(props) {
15
+ let url = `/v1/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/webhook-token`;
16
+ let method = 'POST';
17
+ if (isProjectPathParams(props.pathParams)) {
18
+ url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/webhook-token`;
19
+ method = 'POST';
20
+ }
21
+ else if (isOrgPathParams(props.pathParams)) {
22
+ url = `/v1/orgs/${props.pathParams.org}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/webhook-token`;
23
+ method = 'POST';
24
+ }
25
+ return fetcher(Object.assign({ url,
26
+ method }, props));
27
+ }
28
+ export function useRotateIntegrationJobWebhookTokenRefMutation(options) {
29
+ return useMutation((mutateProps) => rotateIntegrationJobWebhookTokenRef(mutateProps), options);
30
+ }
@@ -0,0 +1,41 @@
1
+ import { UseMutationOptions } 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 SetDefaultIntegrationJobRefAccountPathParams {
6
+ integration: string;
7
+ job: string;
8
+ }
9
+ export interface SetDefaultIntegrationJobRefAccountHeaderParams {
10
+ 'Harness-Account': string;
11
+ }
12
+ export type SetDefaultIntegrationJobRefAccountOKResponse = JobView;
13
+ export type SetDefaultIntegrationJobRefAccountErrorResponse = unknown;
14
+ export interface SetDefaultIntegrationJobRefOrgPathParams {
15
+ org: string;
16
+ integration: string;
17
+ job: string;
18
+ }
19
+ export interface SetDefaultIntegrationJobRefOrgHeaderParams {
20
+ 'Harness-Account': string;
21
+ }
22
+ export type SetDefaultIntegrationJobRefOrgOKResponse = JobView;
23
+ export type SetDefaultIntegrationJobRefOrgErrorResponse = unknown;
24
+ export interface SetDefaultIntegrationJobRefProjectPathParams {
25
+ org: string;
26
+ project: string;
27
+ integration: string;
28
+ job: string;
29
+ }
30
+ export interface SetDefaultIntegrationJobRefProjectHeaderParams {
31
+ 'Harness-Account': string;
32
+ }
33
+ export type SetDefaultIntegrationJobRefProjectOKResponse = JobView;
34
+ export type SetDefaultIntegrationJobRefProjectErrorResponse = unknown;
35
+ export type SetDefaultIntegrationJobRefOKResponse<T> = T extends SetDefaultIntegrationJobRefProjectPathParams ? ResponseWithPagination<SetDefaultIntegrationJobRefProjectOKResponse> : T extends SetDefaultIntegrationJobRefOrgPathParams ? ResponseWithPagination<SetDefaultIntegrationJobRefOrgOKResponse> : ResponseWithPagination<SetDefaultIntegrationJobRefAccountOKResponse>;
36
+ export type SetDefaultIntegrationJobRefErrorResponse<T> = T extends SetDefaultIntegrationJobRefProjectPathParams ? SetDefaultIntegrationJobRefProjectErrorResponse : T extends SetDefaultIntegrationJobRefOrgPathParams ? SetDefaultIntegrationJobRefOrgErrorResponse : SetDefaultIntegrationJobRefAccountErrorResponse;
37
+ export interface SetDefaultIntegrationJobRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
38
+ pathParams: SetDefaultIntegrationJobRefAccountPathParams | SetDefaultIntegrationJobRefOrgPathParams | SetDefaultIntegrationJobRefProjectPathParams;
39
+ }
40
+ export declare function setDefaultIntegrationJobRef<T extends SetDefaultIntegrationJobRefProps = SetDefaultIntegrationJobRefProps>(props: T): Promise<SetDefaultIntegrationJobRefOKResponse<GetPathParamsType<T>>>;
41
+ export declare function useSetDefaultIntegrationJobRefMutation(options?: Omit<UseMutationOptions<SetDefaultIntegrationJobRefOKResponse<unknown>, SetDefaultIntegrationJobRefErrorResponse<unknown>, SetDefaultIntegrationJobRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<JobView>, unknown, SetDefaultIntegrationJobRefProps, 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 setDefaultIntegrationJobRef(props) {
15
+ let url = `/v1/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/default`;
16
+ let method = 'POST';
17
+ if (isProjectPathParams(props.pathParams)) {
18
+ url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/default`;
19
+ method = 'POST';
20
+ }
21
+ else if (isOrgPathParams(props.pathParams)) {
22
+ url = `/v1/orgs/${props.pathParams.org}/integrations/${props.pathParams.integration}/jobs/${props.pathParams.job}/default`;
23
+ method = 'POST';
24
+ }
25
+ return fetcher(Object.assign({ url,
26
+ method }, props));
27
+ }
28
+ export function useSetDefaultIntegrationJobRefMutation(options) {
29
+ return useMutation((mutateProps) => setDefaultIntegrationJobRef(mutateProps), options);
30
+ }
@@ -0,0 +1,41 @@
1
+ import { UseMutationOptions } 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 SyncIntegrationJobRefAccountPathParams {
6
+ integration: string;
7
+ job: string;
8
+ }
9
+ export interface SyncIntegrationJobRefAccountHeaderParams {
10
+ 'Harness-Account': string;
11
+ }
12
+ export type SyncIntegrationJobRefAccountOKResponse = Run;
13
+ export type SyncIntegrationJobRefAccountErrorResponse = unknown;
14
+ export interface SyncIntegrationJobRefOrgPathParams {
15
+ org: string;
16
+ integration: string;
17
+ job: string;
18
+ }
19
+ export interface SyncIntegrationJobRefOrgHeaderParams {
20
+ 'Harness-Account': string;
21
+ }
22
+ export type SyncIntegrationJobRefOrgOKResponse = Run;
23
+ export type SyncIntegrationJobRefOrgErrorResponse = unknown;
24
+ export interface SyncIntegrationJobRefProjectPathParams {
25
+ org: string;
26
+ project: string;
27
+ integration: string;
28
+ job: string;
29
+ }
30
+ export interface SyncIntegrationJobRefProjectHeaderParams {
31
+ 'Harness-Account': string;
32
+ }
33
+ export type SyncIntegrationJobRefProjectOKResponse = Run;
34
+ export type SyncIntegrationJobRefProjectErrorResponse = unknown;
35
+ export type SyncIntegrationJobRefOKResponse<T> = T extends SyncIntegrationJobRefProjectPathParams ? ResponseWithPagination<SyncIntegrationJobRefProjectOKResponse> : T extends SyncIntegrationJobRefOrgPathParams ? ResponseWithPagination<SyncIntegrationJobRefOrgOKResponse> : ResponseWithPagination<SyncIntegrationJobRefAccountOKResponse>;
36
+ export type SyncIntegrationJobRefErrorResponse<T> = T extends SyncIntegrationJobRefProjectPathParams ? SyncIntegrationJobRefProjectErrorResponse : T extends SyncIntegrationJobRefOrgPathParams ? SyncIntegrationJobRefOrgErrorResponse : SyncIntegrationJobRefAccountErrorResponse;
37
+ export interface SyncIntegrationJobRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
38
+ pathParams: SyncIntegrationJobRefAccountPathParams | SyncIntegrationJobRefOrgPathParams | SyncIntegrationJobRefProjectPathParams;
39
+ }
40
+ export declare function syncIntegrationJobRef<T extends SyncIntegrationJobRefProps = SyncIntegrationJobRefProps>(props: T): Promise<SyncIntegrationJobRefOKResponse<GetPathParamsType<T>>>;
41
+ export declare function useSyncIntegrationJobRefMutation(options?: Omit<UseMutationOptions<SyncIntegrationJobRefOKResponse<unknown>, SyncIntegrationJobRefErrorResponse<unknown>, SyncIntegrationJobRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<Run>, unknown, SyncIntegrationJobRefProps, unknown>;