@harnessio/react-integration-manager-client 0.4.9 → 0.4.10
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/useListIntegrationEventsQuery.d.ts +29 -20
- package/dist/integration-manager/src/services/hooks/useListIntegrationEventsQuery.js +12 -8
- package/dist/integration-manager/src/services/index.d.ts +1 -0
- package/dist/integration-manager/src/services/schemas/IntegrationeventIntegrationEventResponse.d.ts +27 -9
- package/dist/integration-manager/src/services/schemas/IntegrationeventPrincipalInfo.d.ts +17 -0
- package/dist/integration-manager/src/services/schemas/IntegrationeventPrincipalInfo.js +4 -0
- package/dist/integration-manager/src/services/schemas/IntegrationeventUiStatus.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { IntegrationeventIntegrationEventResponse } from '../schemas/IntegrationeventIntegrationEventResponse';
|
|
3
|
+
import type { ApierrorsErrorResponse } from '../schemas/ApierrorsErrorResponse';
|
|
3
4
|
import type { ResponseWithPagination } from '../helpers';
|
|
4
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
6
|
export interface ListIntegrationEventsQueryPathParams {
|
|
@@ -8,52 +9,60 @@ export interface ListIntegrationEventsQueryPathParams {
|
|
|
8
9
|
}
|
|
9
10
|
export interface ListIntegrationEventsQueryQueryParams {
|
|
10
11
|
/**
|
|
11
|
-
* Filter by event
|
|
12
|
+
* Filter by one or more event types (repeatable)
|
|
12
13
|
*/
|
|
13
|
-
event_type?:
|
|
14
|
+
event_type?: Array<'entity_auto_import' | 'entity_manual_import' | 'entity_unlinked' | 'integration_created' | 'integration_disabled' | 'integration_enabled' | 'integration_updated' | 'sync_run'>;
|
|
14
15
|
/**
|
|
15
|
-
* Filter by
|
|
16
|
+
* Filter by one or more UI status values (repeatable)
|
|
16
17
|
*/
|
|
17
|
-
status?:
|
|
18
|
+
status?: Array<'FAILED' | 'PARTIAL_SUCCESS' | 'RUNNING' | 'SUCCESS'>;
|
|
18
19
|
/**
|
|
19
|
-
* Sort field
|
|
20
|
+
* Sort field (default: updated_at)
|
|
21
|
+
* @default "updated_at"
|
|
20
22
|
*/
|
|
21
|
-
sort?:
|
|
23
|
+
sort?: 'created_at' | 'updated_at';
|
|
22
24
|
/**
|
|
23
|
-
* Sort order
|
|
25
|
+
* Sort order (default: desc)
|
|
26
|
+
* @default "desc"
|
|
24
27
|
*/
|
|
25
|
-
order?:
|
|
28
|
+
order?: 'asc' | 'desc';
|
|
26
29
|
/**
|
|
27
|
-
* Page number (default:
|
|
30
|
+
* Page number, 0-based (default: 0)
|
|
31
|
+
* @default 0
|
|
28
32
|
*/
|
|
29
33
|
page?: number;
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
35
|
+
* Number of items per page (default: 20, max: 100)
|
|
36
|
+
* @default 20
|
|
32
37
|
*/
|
|
33
38
|
limit?: number;
|
|
34
39
|
}
|
|
35
40
|
export type ListIntegrationEventsOkResponse = ResponseWithPagination<IntegrationeventIntegrationEventResponse[]>;
|
|
36
|
-
export type ListIntegrationEventsErrorResponse =
|
|
41
|
+
export type ListIntegrationEventsErrorResponse = ApierrorsErrorResponse;
|
|
37
42
|
export interface ListIntegrationEventsProps extends ListIntegrationEventsQueryPathParams, Omit<FetcherOptions<ListIntegrationEventsQueryQueryParams, unknown>, 'url'> {
|
|
38
43
|
queryParams: ListIntegrationEventsQueryQueryParams;
|
|
39
44
|
}
|
|
40
45
|
export declare function listIntegrationEvents(props: ListIntegrationEventsProps): Promise<ListIntegrationEventsOkResponse>;
|
|
41
46
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* Results are sorted by updated_at descending by default.
|
|
47
|
-
* Pagination metadata is included in response headers (x-page, x-per-page, x-total, x-total-pages).
|
|
47
|
+
* Retrieves a paginated list of integration lifecycle events for a specific integration.
|
|
48
|
+
* Supports filtering by event_type and status (both repeatable query params), with
|
|
49
|
+
* customizable sorting and pagination. Pagination metadata is included in response
|
|
50
|
+
* headers (x-total-elements, x-page-number, x-page-size, x-total-pages).
|
|
48
51
|
*
|
|
49
52
|
* Event types:
|
|
50
|
-
* - sync_run: Sync execution lifecycle (SCHEDULED -> SUBMITTED -> RUNNING -> COMPLETED/FAILED)
|
|
51
53
|
* - integration_created: Integration was created
|
|
52
54
|
* - integration_updated: Integration configuration was modified
|
|
53
55
|
* - integration_enabled: Integration was enabled
|
|
54
56
|
* - integration_disabled: Integration was disabled
|
|
57
|
+
* - sync_run: Sync execution lifecycle (SCHEDULED -> SUBMITTED -> RUNNING -> COMPLETED/FAILED)
|
|
58
|
+
* - entity_auto_import: Entities were auto-imported during sync
|
|
55
59
|
* - entity_manual_import: Entities were manually imported (subscribed)
|
|
56
60
|
* - entity_unlinked: Entities were unlinked (unsubscribed)
|
|
57
|
-
*
|
|
61
|
+
*
|
|
62
|
+
* UI Status values:
|
|
63
|
+
* - SUCCESS: Operation completed successfully (maps to COMPLETED, SUCCESS)
|
|
64
|
+
* - FAILED: Operation failed (maps to FAILED, STALE, SUPERSEDED)
|
|
65
|
+
* - RUNNING: Operation in progress (maps to SCHEDULED, SUBMITTED, RUNNING)
|
|
66
|
+
* - PARTIAL_SUCCESS: Operation completed with partial success
|
|
58
67
|
*/
|
|
59
|
-
export declare function useListIntegrationEventsQuery(props: ListIntegrationEventsProps, options?: Omit<UseQueryOptions<ListIntegrationEventsOkResponse, ListIntegrationEventsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListIntegrationEventsOkResponse,
|
|
68
|
+
export declare function useListIntegrationEventsQuery(props: ListIntegrationEventsProps, options?: Omit<UseQueryOptions<ListIntegrationEventsOkResponse, ListIntegrationEventsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListIntegrationEventsOkResponse, ApierrorsErrorResponse>;
|
|
@@ -7,22 +7,26 @@ export function listIntegrationEvents(props) {
|
|
|
7
7
|
return fetcher(Object.assign({ url: `/api/v1/accounts/${props.accountIdentifier}/integration-configs/${props.integrationconfig_identifier}/events`, method: 'GET' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Results are sorted by updated_at descending by default.
|
|
15
|
-
* Pagination metadata is included in response headers (x-page, x-per-page, x-total, x-total-pages).
|
|
10
|
+
* Retrieves a paginated list of integration lifecycle events for a specific integration.
|
|
11
|
+
* Supports filtering by event_type and status (both repeatable query params), with
|
|
12
|
+
* customizable sorting and pagination. Pagination metadata is included in response
|
|
13
|
+
* headers (x-total-elements, x-page-number, x-page-size, x-total-pages).
|
|
16
14
|
*
|
|
17
15
|
* Event types:
|
|
18
|
-
* - sync_run: Sync execution lifecycle (SCHEDULED -> SUBMITTED -> RUNNING -> COMPLETED/FAILED)
|
|
19
16
|
* - integration_created: Integration was created
|
|
20
17
|
* - integration_updated: Integration configuration was modified
|
|
21
18
|
* - integration_enabled: Integration was enabled
|
|
22
19
|
* - integration_disabled: Integration was disabled
|
|
20
|
+
* - sync_run: Sync execution lifecycle (SCHEDULED -> SUBMITTED -> RUNNING -> COMPLETED/FAILED)
|
|
21
|
+
* - entity_auto_import: Entities were auto-imported during sync
|
|
23
22
|
* - entity_manual_import: Entities were manually imported (subscribed)
|
|
24
23
|
* - entity_unlinked: Entities were unlinked (unsubscribed)
|
|
25
|
-
*
|
|
24
|
+
*
|
|
25
|
+
* UI Status values:
|
|
26
|
+
* - SUCCESS: Operation completed successfully (maps to COMPLETED, SUCCESS)
|
|
27
|
+
* - FAILED: Operation failed (maps to FAILED, STALE, SUPERSEDED)
|
|
28
|
+
* - RUNNING: Operation in progress (maps to SCHEDULED, SUBMITTED, RUNNING)
|
|
29
|
+
* - PARTIAL_SUCCESS: Operation completed with partial success
|
|
26
30
|
*/
|
|
27
31
|
export function useListIntegrationEventsQuery(props, options) {
|
|
28
32
|
return useQuery([
|
|
@@ -126,6 +126,7 @@ export type { EnumSyncResponseStatus } from './schemas/EnumSyncResponseStatus';
|
|
|
126
126
|
export type { EnumSyncStatus } from './schemas/EnumSyncStatus';
|
|
127
127
|
export type { IntegrationconfigAirbyteIntegrationResponse } from './schemas/IntegrationconfigAirbyteIntegrationResponse';
|
|
128
128
|
export type { IntegrationeventIntegrationEventResponse } from './schemas/IntegrationeventIntegrationEventResponse';
|
|
129
|
+
export type { IntegrationeventPrincipalInfo } from './schemas/IntegrationeventPrincipalInfo';
|
|
129
130
|
export type { IntegrationeventUiStatus } from './schemas/IntegrationeventUiStatus';
|
|
130
131
|
export type { OpenapiCreateAgentRequest } from './schemas/OpenapiCreateAgentRequest';
|
|
131
132
|
export type { OpenapiCreateAirbyteIntegrationConfigOrgRequest } from './schemas/OpenapiCreateAirbyteIntegrationConfigOrgRequest';
|
package/dist/integration-manager/src/services/schemas/IntegrationeventIntegrationEventResponse.d.ts
CHANGED
|
@@ -1,21 +1,39 @@
|
|
|
1
1
|
import type { EnumIntegrationEventType } from '../schemas/EnumIntegrationEventType';
|
|
2
2
|
import type { IntegrationeventUiStatus } from '../schemas/IntegrationeventUiStatus';
|
|
3
|
+
import type { IntegrationeventPrincipalInfo } from '../schemas/IntegrationeventPrincipalInfo';
|
|
4
|
+
/**
|
|
5
|
+
* Integration event with UI-friendly status mapping
|
|
6
|
+
*/
|
|
3
7
|
export interface IntegrationeventIntegrationEventResponse {
|
|
4
8
|
/**
|
|
9
|
+
* Timestamp when the event was created
|
|
5
10
|
* @format date-time
|
|
6
11
|
*/
|
|
7
|
-
created_at
|
|
8
|
-
event_type
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
created_at: string;
|
|
13
|
+
event_type: EnumIntegrationEventType;
|
|
14
|
+
/**
|
|
15
|
+
* Unique identifier for the event
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* Identifier of the integration configuration
|
|
20
|
+
*/
|
|
21
|
+
integration_id: string;
|
|
22
|
+
/**
|
|
23
|
+
* Additional event-specific metadata
|
|
24
|
+
*/
|
|
11
25
|
metadata?: {
|
|
12
26
|
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
|
|
27
|
+
} | null;
|
|
28
|
+
/**
|
|
29
|
+
* Hierarchical path to the space (account/org/project)
|
|
30
|
+
*/
|
|
31
|
+
space_path: string;
|
|
32
|
+
status: IntegrationeventUiStatus;
|
|
16
33
|
/**
|
|
34
|
+
* Timestamp when the event was last updated
|
|
17
35
|
* @format date-time
|
|
18
36
|
*/
|
|
19
|
-
updated_at
|
|
20
|
-
|
|
37
|
+
updated_at: string;
|
|
38
|
+
updated_by: IntegrationeventPrincipalInfo;
|
|
21
39
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Information about the user or system that updated the event
|
|
3
|
+
*/
|
|
4
|
+
export interface IntegrationeventPrincipalInfo {
|
|
5
|
+
/**
|
|
6
|
+
* Display name of the principal
|
|
7
|
+
*/
|
|
8
|
+
display_name: string;
|
|
9
|
+
/**
|
|
10
|
+
* Email address of the principal (empty for system principals)
|
|
11
|
+
*/
|
|
12
|
+
email?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Unique identifier of the principal
|
|
15
|
+
*/
|
|
16
|
+
uid: string;
|
|
17
|
+
}
|
package/package.json
CHANGED