@harnessio/react-integration-manager-client 0.3.10 → 0.3.11
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/dist/integration-manager/src/services/hooks/useSyncNowMutation.d.ts +18 -0
- package/dist/integration-manager/src/services/hooks/useSyncNowMutation.js +14 -0
- package/dist/integration-manager/src/services/index.d.ts +4 -0
- package/dist/integration-manager/src/services/index.js +1 -0
- package/dist/integration-manager/src/services/schemas/TypesAirbyteConnector.d.ts +0 -5
- package/dist/integration-manager/src/services/schemas/TypesSyncNowError.d.ts +4 -0
- package/dist/integration-manager/src/services/schemas/TypesSyncNowError.js +4 -0
- package/dist/integration-manager/src/services/schemas/TypesSyncNowResult.d.ts +7 -0
- package/dist/integration-manager/src/services/schemas/TypesSyncNowResult.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { TypesSyncNowResult } from '../schemas/TypesSyncNowResult';
|
|
3
|
+
import type { ApierrorsErrorResponse } from '../schemas/ApierrorsErrorResponse';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface SyncNowMutationPathParams {
|
|
7
|
+
accountIdentifier: string;
|
|
8
|
+
integrationconfig_identifier: string;
|
|
9
|
+
}
|
|
10
|
+
export type SyncNowOkResponse = ResponseWithPagination<TypesSyncNowResult>;
|
|
11
|
+
export type SyncNowErrorResponse = ApierrorsErrorResponse;
|
|
12
|
+
export interface SyncNowProps extends SyncNowMutationPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
13
|
+
}
|
|
14
|
+
export declare function syncNow(props: SyncNowProps): Promise<SyncNowOkResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Triggers an immediate sync for the integration. Supported for Airbyte-mode integrations (e.g. ServiceNow); calls the k8s-agent sync-now API via the delegate flow. Returns the sync result including success status, logs, and any error details.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useSyncNowMutation(options?: Omit<UseMutationOptions<SyncNowOkResponse, SyncNowErrorResponse, SyncNowProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SyncNowOkResponse, ApierrorsErrorResponse, SyncNowProps, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function syncNow(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/api/v1/accounts/${props.accountIdentifier}/integration-configs/${props.integrationconfig_identifier}/sync-now`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Triggers an immediate sync for the integration. Supported for Airbyte-mode integrations (e.g. ServiceNow); calls the k8s-agent sync-now API via the delegate flow. Returns the sync result including success status, logs, and any error details.
|
|
11
|
+
*/
|
|
12
|
+
export function useSyncNowMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => syncNow(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -47,6 +47,8 @@ export type { ListIntegrationConfigsProjectErrorResponse, ListIntegrationConfigs
|
|
|
47
47
|
export { listIntegrationConfigsProject, useListIntegrationConfigsProjectQuery, } from './hooks/useListIntegrationConfigsProjectQuery';
|
|
48
48
|
export type { ListIntegrationConfigsErrorResponse, ListIntegrationConfigsOkResponse, ListIntegrationConfigsProps, ListIntegrationConfigsQueryPathParams, } from './hooks/useListIntegrationConfigsQuery';
|
|
49
49
|
export { listIntegrationConfigs, useListIntegrationConfigsQuery, } from './hooks/useListIntegrationConfigsQuery';
|
|
50
|
+
export type { SyncNowErrorResponse, SyncNowMutationPathParams, SyncNowOkResponse, SyncNowProps, } from './hooks/useSyncNowMutation';
|
|
51
|
+
export { syncNow, useSyncNowMutation } from './hooks/useSyncNowMutation';
|
|
50
52
|
export type { TriggerSyncErrorResponse, TriggerSyncMutationPathParams, TriggerSyncOkResponse, TriggerSyncProps, } from './hooks/useTriggerSyncMutation';
|
|
51
53
|
export { triggerSync, useTriggerSyncMutation } from './hooks/useTriggerSyncMutation';
|
|
52
54
|
export type { TriggerSyncOrgErrorResponse, TriggerSyncOrgMutationPathParams, TriggerSyncOrgOkResponse, TriggerSyncOrgProps, } from './hooks/useTriggerSyncOrgMutation';
|
|
@@ -123,4 +125,6 @@ export type { TypesMappingSpec } from './schemas/TypesMappingSpec';
|
|
|
123
125
|
export type { TypesSchemaMapping } from './schemas/TypesSchemaMapping';
|
|
124
126
|
export type { TypesScope } from './schemas/TypesScope';
|
|
125
127
|
export type { TypesScopeConfig } from './schemas/TypesScopeConfig';
|
|
128
|
+
export type { TypesSyncNowError } from './schemas/TypesSyncNowError';
|
|
129
|
+
export type { TypesSyncNowResult } from './schemas/TypesSyncNowResult';
|
|
126
130
|
export type { TypesSyncState } from './schemas/TypesSyncState';
|
|
@@ -22,6 +22,7 @@ export { listDefaultSchemas, useListDefaultSchemasQuery } from './hooks/useListD
|
|
|
22
22
|
export { listIntegrationConfigsOrg, useListIntegrationConfigsOrgQuery, } from './hooks/useListIntegrationConfigsOrgQuery';
|
|
23
23
|
export { listIntegrationConfigsProject, useListIntegrationConfigsProjectQuery, } from './hooks/useListIntegrationConfigsProjectQuery';
|
|
24
24
|
export { listIntegrationConfigs, useListIntegrationConfigsQuery, } from './hooks/useListIntegrationConfigsQuery';
|
|
25
|
+
export { syncNow, useSyncNowMutation } from './hooks/useSyncNowMutation';
|
|
25
26
|
export { triggerSync, useTriggerSyncMutation } from './hooks/useTriggerSyncMutation';
|
|
26
27
|
export { triggerSyncOrg, useTriggerSyncOrgMutation } from './hooks/useTriggerSyncOrgMutation';
|
|
27
28
|
export { triggerSyncProject, useTriggerSyncProjectMutation, } from './hooks/useTriggerSyncProjectMutation';
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { TypesAirbyteCatalogConfigured } from '../schemas/TypesAirbyteCatalogConfigured';
|
|
2
|
-
import type { TypesAirbyteCatalogDiscovered } from '../schemas/TypesAirbyteCatalogDiscovered';
|
|
3
2
|
export type TypesAirbyteConnector = {
|
|
4
|
-
config_schema?: {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
};
|
|
7
3
|
configured_catalog?: TypesAirbyteCatalogConfigured;
|
|
8
4
|
connector_image?: string;
|
|
9
5
|
connector_tag?: string;
|
|
@@ -12,7 +8,6 @@ export type TypesAirbyteConnector = {
|
|
|
12
8
|
*/
|
|
13
9
|
created?: string;
|
|
14
10
|
delegate_selectors?: string[];
|
|
15
|
-
discovered_catalog?: TypesAirbyteCatalogDiscovered;
|
|
16
11
|
id?: string;
|
|
17
12
|
integration_id?: string;
|
|
18
13
|
k8s_connector_ref?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED