@harnessio/react-integration-manager-client 0.4.9 → 0.4.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.
@@ -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 type (repeatable)
12
+ * Filter by one or more event types (repeatable)
12
13
  */
13
- event_type?: string[];
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 UI status: SUCCESS, FAILED, RUNNING, PARTIAL_SUCCESS (repeatable)
16
+ * Filter by one or more UI status values (repeatable)
16
17
  */
17
- status?: string[];
18
+ status?: Array<'FAILED' | 'PARTIAL_SUCCESS' | 'RUNNING' | 'SUCCESS'>;
18
19
  /**
19
- * Sort field: created_at or updated_at (default: updated_at)
20
+ * Sort field (default: updated_at)
21
+ * @default "updated_at"
20
22
  */
21
- sort?: string;
23
+ sort?: 'created_at' | 'updated_at';
22
24
  /**
23
- * Sort order: asc or desc (default: desc)
25
+ * Sort order (default: desc)
26
+ * @default "desc"
24
27
  */
25
- order?: string;
28
+ order?: 'asc' | 'desc';
26
29
  /**
27
- * Page number (default: 1)
30
+ * Page number, 0-based (default: 0)
31
+ * @default 0
28
32
  */
29
33
  page?: number;
30
34
  /**
31
- * Page size (default: 30, max: 100)
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 = unknown;
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
- * List lifecycle and sync events for an integration.
43
- *
44
- * Supports filtering by event_type and status (both repeatable query params).
45
- * Status values are UI-simplified: SUCCESS, FAILED, RUNNING, PARTIAL_SUCCESS.
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
- * - entity_auto_import: Entities were auto-imported during sync
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, unknown>;
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
- * List lifecycle and sync events for an integration.
11
- *
12
- * Supports filtering by event_type and status (both repeatable query params).
13
- * Status values are UI-simplified: SUCCESS, FAILED, RUNNING, PARTIAL_SUCCESS.
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
- * - entity_auto_import: Entities were auto-imported during sync
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';
@@ -1 +1 @@
1
- export type EnumSyncStatus = 'ENQUEUED' | 'STARTED';
1
+ export type EnumSyncStatus = 'COMPLETED' | 'DATA_INGESTION_COMPLETE' | 'ENQUEUED' | 'FAILED' | 'STARTED';
@@ -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?: string;
8
- event_type?: EnumIntegrationEventType;
9
- id?: string;
10
- integration_id?: string;
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
- space_path?: string;
15
- status?: IntegrationeventUiStatus;
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?: string;
20
- updated_by_uid?: string;
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
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -1 +1,4 @@
1
- export type IntegrationeventUiStatus = string;
1
+ /**
2
+ * Simplified UI status of an integration event
3
+ */
4
+ export type IntegrationeventUiStatus = 'FAILED' | 'PARTIAL_SUCCESS' | 'RUNNING' | 'SUCCESS';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-integration-manager-client",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
4
4
  "description": "Harness React integration manager client - Integration Manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",