import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, OperationResponse } from 'openapi-client-axios'; /* Auto-copied from integration-toolkit-client */ declare namespace Components { namespace Responses { export type BadRequest = Schemas.ErrorResponseBase; export interface ERPUpdatesResponse { results?: { /** * ID of the processed event */ event_id: string; /** * Processing status for the event (skipped indicates duplicate deduplication_id, ignored indicates unconfigured event) */ status: "success" | "error" | "skipped" | "ignored"; message?: string; }[]; } export type Forbidden = Schemas.ErrorResponseBase; export interface GetAssociatedMonitoringEventsResponse { /** * All monitoring events sharing this event_id, ordered by created_at ASC */ monitoring_events?: Schemas.MonitoringEventV2[]; /** * The original inbound event payload from erp_incoming_events, if available */ inbound_event?: { [name: string]: any; } | null; } export type GetMonitoringStatsResponse = Schemas.MonitoringStats; export type GetMonitoringStatsV2Response = Schemas.MonitoringStatsV2; export interface GetMonitoringTimeSeriesResponse { /** * The time bucket interval used for aggregation */ interval: "5m" | "10m" | "30m" | "1h" | "3h" | "1d"; /** * Start date of the time series */ from_date: string; // date-time /** * End date of the time series */ to_date: string; // date-time /** * List of time-series buckets with event counts */ buckets: Schemas.TimeSeriesBucket[]; } export interface GetMonitoringTimeSeriesV2Response { /** * The bucket interval */ interval?: "5m" | "10m" | "30m" | "1h" | "3h" | "1d"; from_date?: string; // date-time to_date?: string; // date-time buckets?: Schemas.TimeSeriesBucketV2[]; } export type InternalServerError = Schemas.ErrorResponseBase; export type NotFound = Schemas.ErrorResponseBase; export interface QueryAccessLogsResponse { /** * List of access log entries */ data?: Schemas.AccessLogEntry[]; /** * Cursor to fetch the next page. Null if no more results. */ next_cursor?: { timestamp?: string; // date-time request_id?: string; } | null; /** * Indicates if more results are available */ has_more?: boolean; } export interface QueryEventsResponse { /** * List of erp events */ data?: Schemas.ErpEvent[]; /** * Cursor to fetch the next page. Null if no more results. */ next_cursor?: { /** * example: * 2025-10-31T12:34:56Z */ event_time?: string; // date-time /** * example: * evt_1234567890abcdef */ event_id?: string; } | null; /** * Indicates if more results are available * example: * true */ has_more?: boolean; } export interface QueryInboundMonitoringEventsResponse { /** * List of inbound monitoring events */ data?: Schemas.InboundMonitoringEvent[]; /** * Cursor to fetch the next page. Null if no more results. */ next_cursor?: { completed_at?: string; // date-time event_id?: string; } | null; /** * Indicates if more results are available */ has_more?: boolean; } export interface QueryMonitoringEventsV2Response { /** * List of monitoring events */ data?: Schemas.MonitoringEventV2[]; /** * Cursor to fetch the next page. Null if no more results. */ next_cursor?: { created_at?: string; // date-time id?: string; // uuid } | null; /** * Indicates if more results are available */ has_more?: boolean; } export interface QueryOutboundMonitoringEventsResponse { /** * List of outbound monitoring events */ data?: Schemas.OutboundMonitoringEvent[]; /** * Cursor to fetch the next page. Null if no more results. */ next_cursor?: { created_at?: string; // date-time event_id?: string; } | null; /** * Indicates if more results are available */ has_more?: boolean; } export interface ReplayEventsResponse { /** * List of event IDs for which replay was requested */ event_ids?: string[]; } export type TriggerWebhookResponse = Schemas.TriggerWebhookResp; export type Unauthorized = Schemas.ErrorResponseBase; } namespace Schemas { export interface AccessLogEntry { /** * When the request was made */ timestamp?: string; // date-time /** * Environment (e.g., 'dev', 'prod') */ environment?: string; /** * Service name (e.g., 'entity', 'metering') */ service?: string; /** * Unique request identifier */ request_id?: string; /** * HTTP method */ method?: string; /** * Request path */ path?: string; /** * HTTP status code */ status?: number; /** * Response latency in milliseconds */ response_latency_ms?: number; /** * Response body length in bytes */ response_length?: number; /** * Access token identifier */ token_id?: string; /** * Organization ID */ org_id?: string; /** * Request origin header */ origin?: string; /** * Client IP address */ source_ip?: string; } export interface AckOutboundMessagesRequest { acks: [ { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }?, { /** * The message id (msg_…) to acknowledge */ id: string; /** * The lease token (lt_…) returned by the poll that leased this message */ lease_token: string; }? ]; } export interface AckOutboundMessagesResponse { /** * Per-id acknowledgement outcome */ results: AckResult[]; } export interface AckResult { /** * The acknowledged message id */ id: string; status: "accepted" | "rejected"; /** * Rejection reason — present only when status is rejected */ reason?: "stale_lease" | "out_of_order" | "not_found"; } /** * Auto-refresh settings for keeping integration data fresh */ export interface AutoRefreshSettings { /** * Whether auto-refresh is enabled */ enabled?: boolean; /** * Maximum age (in minutes) of data before it is considered stale and eligible for refresh */ freshnessThresholdMinutes?: number; } export interface CommitTypesRequest { /** * npm package name * example: * @epilot/hems-cleverpv */ package_name: string; /** * Package version * example: * 1.0.0 */ version: string; /** * Type annotations per use case slug */ annotations?: { [name: string]: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations; }; } export interface CommitTypesResponse { committed: boolean; warnings?: string[]; } /** * Shared configuration for connector-type integrations */ export interface ConnectorConfig { /** * Base URL for the partner API */ base_url?: string; auth?: /* Authentication configuration for managed call requests */ ManagedCallAuth; /** * History of generated type package versions */ types_versions?: { version: string; package_name: string; generated_at: string; // date-time generated_by: string; status: "active" | "deprecated"; }[]; /** * Latest active types package version */ latest_types_version?: string; /** * Latest active types package name */ latest_types_package_name?: string; } export interface CreateFileProxyUseCaseRequest { /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Required for explicit creates so every use case has a portable cross-environment identifier. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Use case type */ type: "file_proxy"; configuration?: /** * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems. * * The file proxy download URL always requires `orgId`, `integrationId`, and either `useCaseSlug` (recommended) or `useCaseId` (legacy UUID) as query parameters. * The `orgId` is included in the signed URL to establish organization context without requiring authentication. * Additional use-case-specific parameters are declared in the `params` array. * */ FileProxyUseCaseConfiguration; } export interface CreateInboundUseCaseRequest { /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Required for explicit creates so every use case has a portable cross-environment identifier. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Use case type */ type: "inbound"; configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration; } export interface CreateIntegrationRequest { /** * Integration name */ name: string; /** * Optional description of the integration */ description?: string; /** * List of access token IDs associated with this integration */ access_token_ids?: string[]; /** * List of app IDs associated with this integration */ app_ids?: string[]; /** * Configuration defining environment variables needed by this integration. Values are stored in the Environments API. */ environment_config?: EnvironmentFieldConfig[]; settings?: /* Settings for the integration */ IntegrationSettings; /** * Type of integration. "erp" is the ERP integration with inbound/outbound use cases. "connector" is for complex proxy integrations with external APIs. * */ integration_type?: "erp" | "connector"; connector_config?: /* Shared configuration for connector-type integrations */ ConnectorConfig; /** * If true, integration is displayed in read-only mode in the UI to discourage changes */ protected?: boolean; /** * The manifest IDs associated with this integration */ _manifest?: string[]; } export interface CreateManagedCallUseCaseRequest { /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Required for explicit creates so every use case has a portable cross-environment identifier. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Use case type for managed API calls */ type: "managed_call"; configuration?: /* Configuration for managed_call use cases. Defines a single API operation with JSONata mapping. */ ManagedCallOperationConfig; } export interface CreateOutboundUseCaseRequest { /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Required for explicit creates so every use case has a portable cross-environment identifier. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Use case type */ type: "outbound"; configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration; } export interface CreateSecureProxyUseCaseRequest { /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Required for explicit creates so every use case has a portable cross-environment identifier. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Use case type */ type: "secure_proxy"; configuration?: /** * Configuration for secure_proxy use cases. Defines how to route requests through a secure VPC. * */ SecureProxyUseCaseConfiguration; } export type CreateUseCaseRequest = CreateInboundUseCaseRequest | CreateOutboundUseCaseRequest | CreateFileProxyUseCaseRequest | CreateManagedCallUseCaseRequest | CreateSecureProxyUseCaseRequest; export interface CreateUseCaseRequestBase { /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Required for explicit creates so every use case has a portable cross-environment identifier. Must be unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; } export interface DeleteIntegrationAppMappingRequest { /** * UUID of the integration app instance */ app_id: string; // uuid /** * UUID of the integration app component instance */ component_id: string; // uuid } /** * Configuration for how the event should be delivered. webhook = push delivery via svc-webhooks (JSONata-transformed payload); poll = pull-based queue delivery where the consumer fetches items via the poll API (raw event payload) */ export type DeliveryConfig = /* Configuration for how the event should be delivered. webhook = push delivery via svc-webhooks (JSONata-transformed payload); poll = pull-based queue delivery where the consumer fetches items via the poll API (raw event payload) */ /* Push delivery of the transformed event to a webhook via svc-webhooks */ WebhookDeliveryConfig | /* Pull-based queue delivery. Items carry the raw standardized event-catalog payload; no JSONata mapping is applied in poll mode. Consumers fetch and acknowledge items via the poll API. */ PollDeliveryConfig; export interface EmbeddedFileProxyUseCaseRequest { /** * Optional use case ID for update matching. * - If provided and matches an existing use case, that use case is updated * - If provided but no match, a new use case with this ID is created * - If omitted, a new use case with auto-generated ID is created * */ id?: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Optional on this upsert/sync endpoint — when omitted, the server derives one from the name and ensures uniqueness within the integration. Immutable after creation. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; /** * Use case type */ type: "file_proxy"; configuration?: /** * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems. * * The file proxy download URL always requires `orgId`, `integrationId`, and either `useCaseSlug` (recommended) or `useCaseId` (legacy UUID) as query parameters. * The `orgId` is included in the signed URL to establish organization context without requiring authentication. * Additional use-case-specific parameters are declared in the `params` array. * */ FileProxyUseCaseConfiguration; } export interface EmbeddedInboundUseCaseRequest { /** * Optional use case ID for update matching. * - If provided and matches an existing use case, that use case is updated * - If provided but no match, a new use case with this ID is created * - If omitted, a new use case with auto-generated ID is created * */ id?: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Optional on this upsert/sync endpoint — when omitted, the server derives one from the name and ensures uniqueness within the integration. Immutable after creation. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; /** * Use case type */ type: "inbound"; configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration; } export interface EmbeddedManagedCallUseCaseRequest { /** * Optional use case ID for update matching. * - If provided and matches an existing use case, that use case is updated * - If provided but no match, a new use case with this ID is created * - If omitted, a new use case with auto-generated ID is created * */ id?: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Optional on this upsert/sync endpoint — when omitted, the server derives one from the name and ensures uniqueness within the integration. Immutable after creation. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; /** * Use case type for managed API calls */ type: "managed_call"; configuration?: /* Configuration for managed_call use cases. Defines a single API operation with JSONata mapping. */ ManagedCallOperationConfig; } export interface EmbeddedOutboundUseCaseRequest { /** * Optional use case ID for update matching. * - If provided and matches an existing use case, that use case is updated * - If provided but no match, a new use case with this ID is created * - If omitted, a new use case with auto-generated ID is created * */ id?: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Optional on this upsert/sync endpoint — when omitted, the server derives one from the name and ensures uniqueness within the integration. Immutable after creation. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; /** * Use case type */ type: "outbound"; configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration; } export interface EmbeddedSecureProxyUseCaseRequest { /** * Optional use case ID for update matching. * - If provided and matches an existing use case, that use case is updated * - If provided but no match, a new use case with this ID is created * - If omitted, a new use case with auto-generated ID is created * */ id?: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Optional on this upsert/sync endpoint — when omitted, the server derives one from the name and ensures uniqueness within the integration. Immutable after creation. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; /** * Use case type */ type: "secure_proxy"; configuration?: /** * Configuration for secure_proxy use cases. Defines how to route requests through a secure VPC. * */ SecureProxyUseCaseConfiguration; } export type EmbeddedUseCaseRequest = EmbeddedInboundUseCaseRequest | EmbeddedOutboundUseCaseRequest | EmbeddedFileProxyUseCaseRequest | EmbeddedManagedCallUseCaseRequest | EmbeddedSecureProxyUseCaseRequest; export interface EmbeddedUseCaseRequestBase { /** * Optional use case ID for update matching. * - If provided and matches an existing use case, that use case is updated * - If provided but no match, a new use case with this ID is created * - If omitted, a new use case with auto-generated ID is created * */ id?: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Optional on this upsert/sync endpoint — when omitted, the server derives one from the name and ensures uniqueness within the integration. Immutable after creation. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; } export interface EntityUpdate { /** * The entity type slug */ entity_slug: string; /** * Unique identifier mappings for this entity */ unique_identifiers: { [name: string]: any; }; /** * Mapped attribute values */ attributes: { [name: string]: any; }; } /** * Resolves to an org-scoped environment variable from the epilot environments-api service at runtime, replacing hard-coded environment-specific values (URLs, prefixes, identifiers) in inbound mappings. Secrets (`SecretString` values) are never exposed; the runtime treats both "missing key" and "secret-typed key" as identical `undefined` outcomes (no info disclosure via error code). For secret-resolving contexts (e.g. authorization headers in managed-call or file-proxy step configurations), use the templated `{{ env. }}` syntax instead — that mechanism does decrypt secrets. * */ export type EnvVarRefConfig = /** * Resolves to an org-scoped environment variable from the epilot environments-api service at runtime, replacing hard-coded environment-specific values (URLs, prefixes, identifiers) in inbound mappings. Secrets (`SecretString` values) are never exposed; the runtime treats both "missing key" and "secret-typed key" as identical `undefined` outcomes (no info disclosure via error code). For secret-resolving contexts (e.g. authorization headers in managed-call or file-proxy step configurations), use the templated `{{ env. }}` syntax instead — that mechanism does decrypt secrets. * */ { /** * Environment variable key. Must match the environments-api key contract (lowercase, digits, `_`, `.`, `-`; max 128 chars; starts with a lowercase letter or digit). Supports dot-namespaced keys like `erp_api.base_url`. * */ key: string; // ^[a-z0-9][a-z0-9_.-]{0,127}$ /** * Literal string returned when the key is missing (or is a secret). When provided, the `ENV_VAR_REF_NOT_FOUND` warning is suppressed because the author signalled the absence is expected. * */ default?: string; /** * `value` returns the resolved env-var string as-is. * */ return?: "value"; } | { key: string; // ^[a-z0-9][a-z0-9_.-]{0,127}$ default?: string; /** * Evaluate the sibling `jsonataExpression` against the resolved env-var value (the input `$` is the string value). * */ return: "jsonata"; /** * JSONata expression evaluated against the resolved env-var value. */ jsonataExpression: string; }; export interface EnvironmentFieldConfig { /** * Environment variable key, used to look up the value in the Environments API. */ key: string; // ^[a-z0-9][a-z0-9_.\-]{0,127}$ /** * Display label for the field in the UI */ label: string; /** * Whether the value is a plain string or an encrypted secret */ type: "String" | "SecretString"; /** * Help text shown below the field */ description?: string; /** * Whether this field must be filled before the integration can be used */ required?: boolean; /** * Sort order for display and drag-to-reorder */ order?: number; } export interface ErpEvent { /** * Type of event (create, update, delete) */ event_type: "CREATE" | "UPDATE" | "DELETE"; /** * Type of the object being updated (business_partner, contract_account, etc.). Corresponds to "Event Name" from the integration UI. */ object_type: string; /** * Timestamp when the event occurred */ timestamp: string; // date-time /** * Format of the payload data */ format: "json" | "xml"; /** * The object data payload - can be either a serialized string or a direct JSON object */ payload: /* The object data payload - can be either a serialized string or a direct JSON object */ string | { [name: string]: any; }; /** * Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores. * * example: * evt-2025-05-01-12345-create-bp */ deduplication_id?: string; // ^[a-zA-Z0-9_-]+$ /** * Resolved use case ID for the inbound event. Null when no use case matched or for events ingested before this field was introduced. Server-populated only — ignored if supplied on inbound requests. * */ use_case_id?: string | null; } export type ErpEventV3 = { /** * Event name from integration mapping (e.g., business_partner, contract_account). Required when use_case_slug is not provided. * * example: * business_partner */ event_name: string; /** * Timestamp when the event occurred * example: * 2025-05-01T08:30:00Z */ timestamp: string; // date-time /** * Format of the payload data * example: * json */ format: "json" | "xml"; /** * The object data payload - can be either a serialized string or a direct JSON object * example: * {"id":"BP10001","name":"Acme Corporation","type":"organization","tax_id":"DE123456789","status":"active"} */ payload: /** * The object data payload - can be either a serialized string or a direct JSON object * example: * {"id":"BP10001","name":"Acme Corporation","type":"organization","tax_id":"DE123456789","status":"active"} */ string | { [name: string]: any; }; /** * Recommended. Use case slug for routing this event to the correct use case configuration. If provided, takes precedence over event_name for use case lookup. Preferred over event_name-based routing as slugs are portable across environments. * * example: * business_partner */ use_case_slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores. * * example: * evt-2025-05-01-12345-bp */ deduplication_id?: string; // ^[a-zA-Z0-9_-]+$ } | { /** * Event name from integration mapping (e.g., business_partner, contract_account). Required when use_case_slug is not provided. * * example: * business_partner */ event_name?: string; /** * Timestamp when the event occurred * example: * 2025-05-01T08:30:00Z */ timestamp: string; // date-time /** * Format of the payload data * example: * json */ format: "json" | "xml"; /** * The object data payload - can be either a serialized string or a direct JSON object * example: * {"id":"BP10001","name":"Acme Corporation","type":"organization","tax_id":"DE123456789","status":"active"} */ payload: /** * The object data payload - can be either a serialized string or a direct JSON object * example: * {"id":"BP10001","name":"Acme Corporation","type":"organization","tax_id":"DE123456789","status":"active"} */ string | { [name: string]: any; }; /** * Recommended. Use case slug for routing this event to the correct use case configuration. If provided, takes precedence over event_name for use case lookup. Preferred over event_name-based routing as slugs are portable across environments. * * example: * business_partner */ use_case_slug: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores. * * example: * evt-2025-05-01-12345-bp */ deduplication_id?: string; // ^[a-zA-Z0-9_-]+$ }; export interface ErpUpdatesEventsV2Request { /** * UUID that identifies the integration configuration to use */ integration_id: string; // uuid /** * Optional ID that identifies the specific request for debugging purposes */ correlation_id?: string; /** * List of ERP events to process */ events: ErpEvent[]; } export interface ErpUpdatesEventsV3Request { /** * UUID that identifies the integration configuration to use */ integration_id: string; // uuid /** * Optional ID that identifies the specific request for debugging purposes */ correlation_id?: string; /** * Controls ordering and parallelism for this request's events. * * By default, all events for a given `integration_id` are processed * **strictly in order, one at a time**. For high-volume integrations this * can become a throughput bottleneck. * * Set `group_id` to opt into **parallel processing**: * - Events sharing the same `group_id` are processed in the order received. * - Events with different `group_id` values are processed in parallel. * * Typical usage is to derive `group_id` from a logical partition key in * your payload — for example the customer ID, contract ID, or meter ID — * so updates to the same business object remain ordered while unrelated * objects are processed concurrently. * * Notes: * - Up to 20 groups per integration are processed concurrently. Using * more distinct values than that yields no additional parallelism. * - Omit this field if strict per-integration ordering is required. * * example: * customer-42 */ group_id?: string; /** * List of ERP events to process */ events: ErpEventV3[]; } export interface ErrorResponseBase { /** * Computer-readable error code */ code?: string; /** * Error message */ message?: string; } export interface FileProxyAuth { /** * Authentication type */ type: "oauth2_client_credentials" | "oauth2_password"; /** * Handlebars template for the OAuth2 token endpoint URL */ token_url: string; /** * Handlebars template for the OAuth2 client ID */ client_id: string; /** * Handlebars template for the OAuth2 client secret */ client_secret: string; /** * Optional OAuth2 scope */ scope?: string; /** * Handlebars template for the OAuth2 audience parameter */ audience?: string; /** * Handlebars template for the OAuth2 resource parameter */ resource?: string; /** * Handlebars template for the OAuth2 resource owner username. Required when type is oauth2_password. */ username?: string; /** * Handlebars template for the OAuth2 resource owner password. Required when type is oauth2_password. */ password?: string; /** * Additional key-value pairs to include in the token request body. Values support Handlebars templates. */ body_params?: { [name: string]: string; }; /** * Additional headers to include in the token request. Values support Handlebars templates. */ headers?: { [name: string]: string; }; /** * Additional query parameters to append to the token URL. Values support Handlebars templates. */ query_params?: { [name: string]: string; }; } export interface FileProxyParam { /** * Parameter name as it appears in the query string */ name: string; /** * Whether this parameter is required */ required: boolean; /** * Human-readable description of the parameter */ description?: string; } export interface FileProxyResponseConfig { /** * JSONata expression to extract file content from step results */ body: string; /** * Encoding of the extracted body */ encoding: "base64" | "binary"; /** * JSONata expression to extract the filename */ filename?: string; /** * JSONata expression to extract the content type */ content_type?: string; } export interface FileProxySecureProxyAttachment { /** * Slug of the secure_proxy use case in the same integration. */ use_case_slug: string; } export interface FileProxyStep { /** * Handlebars template for the request URL */ url: string; /** * HTTP method */ method: "GET" | "POST"; /** * Handlebars templates for request headers */ headers?: { [name: string]: string; }; /** * Handlebars template for the request body (POST only) */ body?: string; /** * Expected response type */ response_type: "json" | "binary"; } /** * Auto-constructs a file proxy download URL. orgId and integrationId are injected from context. Exactly one of use_case_id or use_case_slug must be provided. Using use_case_slug is recommended as it is portable across environments. * */ export type FileProxyUrlConfig = /** * Auto-constructs a file proxy download URL. orgId and integrationId are injected from context. Exactly one of use_case_id or use_case_slug must be provided. Using use_case_slug is recommended as it is portable across environments. * */ { /** * Recommended. Slug of the file_proxy use case. Maps to useCaseSlug query parameter. Portable across environments. * */ use_case_slug: string; // ^[a-z0-9][a-z0-9_-]*$ params?: /* Custom query parameters. Keys become URL param names, values resolved from payload. */ FileProxyUrlParams; } | { /** * Legacy. UUID of the file_proxy use case. Maps to useCaseId query parameter. Prefer use_case_slug for portable configuration. * */ use_case_id: string; params?: /* Custom query parameters. Keys become URL param names, values resolved from payload. */ FileProxyUrlParams; }; /** * Parameter for file proxy URL. Exactly one of field, constant, or jsonataExpression must be set. */ export type FileProxyUrlParam = /* Parameter for file proxy URL. Exactly one of field, constant, or jsonataExpression must be set. */ { /** * Source field name or JSONPath expression (if starts with $) */ field: string; } | { /** * Constant value (any type, stringified for URL) */ constant: any; } | { /** * JSONata expression for transformation */ jsonataExpression: string; }; /** * Custom query parameters. Keys become URL param names, values resolved from payload. */ export interface FileProxyUrlParams { [name: string]: /* Parameter for file proxy URL. Exactly one of field, constant, or jsonataExpression must be set. */ FileProxyUrlParam; } export interface FileProxyUseCase { /** * Unique identifier for the use case */ id: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Use case type */ type: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy" | "file_proxy"; enabled: boolean; /** * Description of the last change made to this use case */ change_description?: string; /** * ISO-8601 timestamp when the use case was created */ created_at: string; // date-time /** * ISO-8601 timestamp when the use case was last updated */ updated_at: string; // date-time configuration?: /** * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems. * * The file proxy download URL always requires `orgId`, `integrationId`, and either `useCaseSlug` (recommended) or `useCaseId` (legacy UUID) as query parameters. * The `orgId` is included in the signed URL to establish organization context without requiring authentication. * Additional use-case-specific parameters are declared in the `params` array. * */ FileProxyUseCaseConfiguration; } /** * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems. * * The file proxy download URL always requires `orgId`, `integrationId`, and either `useCaseSlug` (recommended) or `useCaseId` (legacy UUID) as query parameters. * The `orgId` is included in the signed URL to establish organization context without requiring authentication. * Additional use-case-specific parameters are declared in the `params` array. * */ export interface FileProxyUseCaseConfiguration { /** * Optional secure proxy attachment for routing all outbound file proxy requests. * Only `use_case_slug` is supported and the referenced secure_proxy use case * must belong to the same integration. * */ secure_proxy?: { /** * Slug of the secure_proxy use case in the same integration. */ use_case_slug: string; }; auth?: FileProxyAuth; /** * Additional use-case-specific parameters expected in the download URL query string (beyond the required orgId, integrationId, and useCaseSlug or useCaseId) */ params?: FileProxyParam[]; /** * Additional origins permitted to call /download for this use case (CORS, exact match). Portal origins are always allowed. */ allowed_origins?: string /* uri ^https?:// */[]; /** * Ordered list of HTTP steps to execute to retrieve the file */ steps: [ FileProxyStep, ...FileProxyStep[] ]; response: FileProxyResponseConfig; } export interface FileProxyUseCaseHistoryEntry { /** * Unique identifier for this history entry */ id: string; // uuid /** * Reference to the parent use case */ useCaseId: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name at this point in history */ name: string; /** * Use case slug at this point in history */ slug?: string; /** * Whether the use case was enabled at this point in history */ enabled: boolean; /** * Description of the change that was made at this point in history */ change_description?: string; /** * User ID of the user who made the change that produced this history entry */ changed_by?: string; /** * ISO-8601 timestamp when the use case was originally created */ created_at: string; // date-time /** * ISO-8601 timestamp of this historical snapshot (before the update) */ updated_at: string; // date-time /** * ISO-8601 timestamp when this history entry was created */ history_created_at: string; // date-time /** * Use case type */ type: "file_proxy"; configuration?: /** * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems. * * The file proxy download URL always requires `orgId`, `integrationId`, and either `useCaseSlug` (recommended) or `useCaseId` (legacy UUID) as query parameters. * The `orgId` is included in the signed URL to establish organization context without requiring authentication. * Additional use-case-specific parameters are declared in the `params` array. * */ FileProxyUseCaseConfiguration; } export interface GenerateTypesPreviewResponse { integration_name?: string; use_cases: /* Scaffolded type descriptors for a single use case */ UseCaseTypePreview[]; /** * Previously generated version, if any */ previous_version?: string; /** * Suggested next version based on detected changes */ suggested_version?: string; suggested_bump?: "major" | "minor"; detected_changes?: { slug: string; field: string; type: "breaking" | "non-breaking"; description: string; }[]; } export interface GenerateTypesRequest { /** * npm package name * example: * @epilot/hems-cleverpv */ package_name: string; /** * Package version * example: * 1.0.0 */ version: string; description?: string; /** * Domain standard package to extend * example: * @epilot/hems */ domain_package?: string; /** * Name of the domain UseCaseMap to extend * example: * HemsUseCaseMap */ domain_map_name?: string; /** * Type annotations per use case slug */ annotations?: { [name: string]: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations; }; } export interface GenerateTypesResponse { package_name: string; version: string; /** * Generated file contents keyed by file path */ files: { [name: string]: string; }; warnings?: string[]; } export interface GetMonitoringStatsRequest { /** * Start date for statistics period (inclusive) * example: * 2025-01-01T00:00:00Z */ from_date?: string; // date-time /** * End date for statistics period (inclusive) * example: * 2025-01-31T23:59:59Z */ to_date?: string; // date-time /** * Fields to group inbound statistics by * example: * [ * "use_case_id", * "status" * ] */ inbound_group_by?: ("use_case_id" | "sync_type" | "status" | "error_category" | "object_type" | "event_name" | "date")[]; /** * Fields to group outbound statistics by * example: * [ * "event_name", * "status" * ] */ outbound_group_by?: ("event_name" | "status" | "webhook_config_id" | "date")[]; } export interface GetMonitoringStatsV2Request { /** * Start of the time range * example: * 2025-01-01T00:00:00Z */ from_date?: string; // date-time /** * End of the time range * example: * 2025-01-31T23:59:59Z */ to_date?: string; // date-time /** * Filter stats by use case type */ use_case_type?: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy"; /** * Field to group the breakdown by */ group_by?: "use_case_id" | "use_case_type" | "level" | "code" | "date"; /** * Data source for the stats. "monitoring" (default) aggregates processed events from erp_monitoring_v2 — this counts every event produced throughout the processing tree (fan-out children, post-actions, relation resolutions, etc.). "incoming" counts only the initial inbound events actually received (distinct event_id from erp_incoming_events); only group_by=use_case_id is supported and status/level breakdown is not available for this source (success/error/warning/skipped counts are returned as 0). * */ source?: "monitoring" | "incoming"; } export interface GetMonitoringTimeSeriesRequest { /** * Start date for the time series (inclusive) * example: * 2025-01-01T00:00:00Z */ from_date: string; // date-time /** * End date for the time series (inclusive). Defaults to current time if not specified. * example: * 2025-01-31T23:59:59Z */ to_date?: string; // date-time /** * The time bucket interval for aggregation * example: * 1h */ interval: "5m" | "10m" | "30m" | "1h" | "3h" | "1d"; /** * Filter by event direction. Defaults to both. * example: * both */ direction?: "inbound" | "outbound" | "both"; } export interface GetMonitoringTimeSeriesV2Request { /** * Start of the time range (required) * example: * 2025-01-01T00:00:00Z */ from_date: string; // date-time /** * End of the time range (defaults to now) * example: * 2025-01-31T23:59:59Z */ to_date?: string; // date-time /** * Time bucket interval */ interval: "5m" | "10m" | "30m" | "1h" | "3h" | "1d"; /** * Filter by use case type */ use_case_type?: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy"; /** * Field to group the bucket breakdown by */ group_by?: "use_case_type" | "use_case"; } /** * Configuration for inbound use cases (ERP to epilot) */ export interface InboundIntegrationEventConfiguration { /** * Array of entity configurations for this event */ entities?: IntegrationEntity[]; /** * Array of meter reading configurations for this event */ meter_readings?: IntegrationMeterReading[]; } export interface InboundMonitoringEvent { /** * Organization ID */ org_id: string; /** * Unique event identifier */ event_id: string; /** * Correlation ID for tracing related events */ correlation_id?: string | null; /** * Integration ID */ integration_id?: string | null; /** * Use case ID */ use_case_id?: string | null; /** * Type of event (optional for V3 events) */ event_type?: "CREATE" | "UPDATE" | "DELETE" | "TRIGGER"; /** * Type of object being synced (e.g., 'contract', 'meter') */ object_type: string; /** * Type of sync operation */ sync_type: "entity" | "meter_reading" | "webhook" | "api_deprecation"; /** * Processing status */ status: "success" | "error" | "skipped" | "warning"; /** * Error code (when status=error) */ error_code?: string | null; /** * Error message (when status=error) */ error_message?: string | null; /** * Error category (when status=error) */ error_category?: "validation" | "configuration" | "downstream_api" | "timeout" | "system"; /** * Processing duration in milliseconds */ processing_duration_ms?: number | null; /** * When the event was received */ received_at: string; // date-time /** * When processing completed */ completed_at: string; // date-time } export interface InboundUseCase { /** * Unique identifier for the use case */ id: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Use case type */ type: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy" | "inbound"; enabled: boolean; /** * Description of the last change made to this use case */ change_description?: string; /** * ISO-8601 timestamp when the use case was created */ created_at: string; // date-time /** * ISO-8601 timestamp when the use case was last updated */ updated_at: string; // date-time configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration; } export interface InboundUseCaseHistoryEntry { /** * Unique identifier for this history entry */ id: string; // uuid /** * Reference to the parent use case */ useCaseId: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name at this point in history */ name: string; /** * Use case slug at this point in history */ slug?: string; /** * Whether the use case was enabled at this point in history */ enabled: boolean; /** * Description of the change that was made at this point in history */ change_description?: string; /** * User ID of the user who made the change that produced this history entry */ changed_by?: string; /** * ISO-8601 timestamp when the use case was originally created */ created_at: string; // date-time /** * ISO-8601 timestamp of this historical snapshot (before the update) */ updated_at: string; // date-time /** * ISO-8601 timestamp when this history entry was created */ history_created_at: string; // date-time /** * Use case type */ type: "inbound"; configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration; } export interface Integration { /** * Unique identifier for the integration */ id: string; // uuid /** * Organization ID */ orgId: string; /** * ISO-8601 timestamp when the integration was created */ created_at: string; // date-time /** * ISO-8601 timestamp when the integration was last updated */ updated_at: string; // date-time /** * Integration name */ name: string; /** * Optional description of the integration */ description?: string; /** * List of access token IDs associated with this integration */ access_token_ids?: string[]; /** * List of app IDs associated with this integration */ app_ids?: string[]; /** * Configuration defining environment variables needed by this integration. Values are stored in the Environments API. */ environment_config?: EnvironmentFieldConfig[]; settings?: /* Settings for the integration */ IntegrationSettings; /** * Type of integration. "erp" is the ERP integration with inbound/outbound use cases. "connector" is for complex proxy integrations with external APIs. * */ integration_type?: "erp" | "connector"; connector_config?: /* Shared configuration for connector-type integrations */ ConnectorConfig; /** * If true, integration is displayed in read-only mode in the UI to discourage changes */ protected?: boolean; /** * The manifest IDs associated with this integration */ _manifest?: string[]; } export interface IntegrationAppMapping { /** * The integration ID this app/component is mapped to */ integration_id: string; // uuid } export interface IntegrationConfigurationV1 { /** * Mapping specification version */ version?: "1.0"; mapping: { /** * [v1.0] Object type mappings */ objects: { [name: string]: IntegrationObjectV1; }; }; } export interface IntegrationConfigurationV2 { /** * Mapping specification version */ version: "2.0"; mapping: { /** * [v2.0] Event type mappings */ events: { [name: string]: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration; }; }; } export interface IntegrationEditableFields { /** * Integration name */ name?: string; /** * Optional description of the integration */ description?: string; /** * List of access token IDs associated with this integration */ access_token_ids?: string[]; /** * List of app IDs associated with this integration */ app_ids?: string[]; /** * Configuration defining environment variables needed by this integration. Values are stored in the Environments API. */ environment_config?: EnvironmentFieldConfig[]; settings?: /* Settings for the integration */ IntegrationSettings; /** * Type of integration. "erp" is the ERP integration with inbound/outbound use cases. "connector" is for complex proxy integrations with external APIs. * */ integration_type?: "erp" | "connector"; connector_config?: /* Shared configuration for connector-type integrations */ ConnectorConfig; /** * If true, integration is displayed in read-only mode in the UI to discourage changes */ protected?: boolean; /** * The manifest IDs associated with this integration */ _manifest?: string[]; } export interface IntegrationEntity { /** * Target entity schema (e.g., 'contact', 'contract') */ entity_schema: string; /** * Array of attribute names that uniquely identify this entity. * The _type hint for repeatable fields (e.g., email, phone) should be specified * on the corresponding field definition in the fields array. * */ unique_ids: string[]; /** * Optional JSONata expression to pre-process the event data before field mapping */ jsonataExpression?: string; /** * Controls whether this entity mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. */ enabled?: /* Controls whether this entity mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. */ boolean | string; /** * Operation mode for entity mapping: * - 'upsert': Create or update the entity (default) * - 'delete': Soft delete the entity (marks as deleted) * - 'purge': Hard delete the entity (permanent removal) * - 'upsert-prune-scope-purge': Upsert entities from array, then purge entities in scope that weren't upserted * - 'upsert-prune-scope-delete': Upsert entities from array, then soft delete entities in scope that weren't upserted * */ mode?: "upsert" | "delete" | "purge" | "upsert-prune-scope-purge" | "upsert-prune-scope-delete"; scope?: /** * Scope configuration for upsert-prune-scope modes. * Defines how to find entities that should be pruned if not in the upsert payload. * The scope is resolved against the original event payload (not individual array items). * */ PruneScopeConfig; /** * Field mapping definitions */ fields: IntegrationEntityField[]; } export interface IntegrationEntityField { /** * Target attribute name */ attribute: string; /** * Source field name or JSONPath expression (if starts with $) */ field?: string; /** * JSONata expression for transformation */ jsonataExpression?: string; /** * Constant value to assign (any type) */ constant?: any; _type?: /** * Type hint for repeatable fields that require special search handling. * These fields are stored as arrays of objects (e.g., email: [{ email: "value" }]). * */ RepeatableFieldType; /** * Controls whether this field mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. Defaults to true if omitted. */ enabled?: /* Controls whether this field mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. Defaults to true if omitted. */ boolean | string; relations?: RelationConfig; relation_refs?: /** * Configuration for relation references ($relation_ref). * Relation references link to a specific item within a repeatable attribute on a related entity. * Common use case: referencing a specific address within a contact's address list. * */ RelationRefsConfig; file_proxy_url?: /** * Auto-constructs a file proxy download URL. orgId and integrationId are injected from context. Exactly one of use_case_id or use_case_slug must be provided. Using use_case_slug is recommended as it is portable across environments. * */ FileProxyUrlConfig; portal_ref?: /** * Resolves to a property of one of the calling organization's epilot portal configurations at runtime, replacing hard-coded environment-specific portal UUIDs in inbound mappings. Matched portals are sorted ascending by `(_created_at, portal_id)`; portals without `_created_at` sort first (treated as oldest). When `select: "single"` matches more than one portal, the resolver still returns the oldest match and emits a `PORTAL_REF_AMBIGUOUS` warning. * */ PortalRefConfig; env_var_ref?: /** * Resolves to an org-scoped environment variable from the epilot environments-api service at runtime, replacing hard-coded environment-specific values (URLs, prefixes, identifiers) in inbound mappings. Secrets (`SecretString` values) are never exposed; the runtime treats both "missing key" and "secret-typed key" as identical `undefined` outcomes (no info disclosure via error code). For secret-resolving contexts (e.g. authorization headers in managed-call or file-proxy step configurations), use the templated `{{ env. }}` syntax instead — that mechanism does decrypt secrets. * */ EnvVarRefConfig; } export interface IntegrationFieldV1 { /** * Target entity slug */ entity: string; /** * Target attribute name */ attribute: string; /** * Source field name (mutually exclusive with jsonataExpression) */ field?: string; /** * JSONata expression for transformation (mutually exclusive with field) */ jsonataExpression?: string; } export interface IntegrationMeterReading { /** * Optional JSONata expression to extract meter reading items from the event data. * If not provided, the entire payload is used as the reading data. * Useful when you need to extract an array of readings from a nested structure (e.g., "$.readings"). * */ jsonataExpression?: string; /** * Strategy for matching incoming readings against existing readings. * - 'external_id': Match readings by external_id attribute (default behavior) * - 'strict-date': Match by meter_id + counter_id + direction + date (German timezone). * Useful when readings originate from ECP and are echoed back by the ERP with truncated timestamps. * */ reading_matching?: "external_id" | "strict-date"; /** * Operation mode for meter reading mapping: * - 'upsert': Create or update meter readings (default) * - 'delete': Delete the meter reading * - 'upsert-prune-scope': Upsert readings from array, then delete all other readings for the same meter+counter that weren't upserted * */ mode?: "upsert" | "delete" | "upsert-prune-scope"; scope?: /** * Scope configuration for meter reading upsert-prune-scope mode. * The scope is all readings for the same meter + counter. * */ MeterReadingPruneScopeConfig; meter: MeterUniqueIdsConfig; meter_counter?: MeterUniqueIdsConfig; /** * Field mapping definitions for meter reading attributes */ fields: IntegrationEntityField[]; } /** * Integration monitoring notification configuration. Rides Integration.settings.notifications (camelCase) and surfaces on both v1 and v2 GET/PUT. Unknown keys are stripped server-side to stay forward-compatible with deferred (V2) rule types. */ export interface IntegrationNotificationConfig { /** * Master switch for this integration's notifications. */ enabled: boolean; /** * epilot user ids notified for this integration. Same-org membership and per-user notification preferences are enforced at send time (Phases 3–5), not at config-write time. */ recipients: /* A configured recipient. Only the epilot user_id is stored. */ NotificationRecipient[]; defaultChannels: /* Delivery channel toggles. New channels added in svc-notification-api inherit here. */ NotificationChannelSet; /** * Integration-level use-case include-filter; absent/empty means all use cases. */ monitoredUseCases?: string[]; /** * Integration-level code scope; absent/empty resolves to ['_error_']. Accepts concrete monitoring error codes or group sentinels (_error_, _warning_, _success_, _info_, _any_, _parent_). */ monitoredCodes?: string[]; /** * Enabled triggers and their params. A type MAY repeat; capped at 20 rules (enforced at the write boundary). */ rules: /* A single notification rule. Only the params relevant to a given type are set. The id is a server-minted ULID, preserved across edits. */ NotificationRule[]; digest: /* Digest schedule and content configuration. */ NotificationDigestConfig; /** * ISO instant; snooze all non-digest alerts until this time. `null` means not muted. */ muteUntil?: string | null; // date-time } export interface IntegrationObjectV1 { /** * Mapping of entity types to their unique identifier field mappings */ unique_ids: { [name: string]: string[] | { [name: string]: string; }; }; /** * Field mapping definitions */ fields: IntegrationFieldV1[]; } /** * Settings for the integration */ export interface IntegrationSettings { autoRefresh?: /* Auto-refresh settings for keeping integration data fresh */ AutoRefreshSettings; notifications?: /* Integration monitoring notification configuration. Rides Integration.settings.notifications (camelCase) and surfaces on both v1 and v2 GET/PUT. Unknown keys are stripped server-side to stay forward-compatible with deferred (V2) rule types. */ IntegrationNotificationConfig; } /** * Integration with embedded use cases for atomic CRUD operations */ export interface IntegrationWithUseCases { /** * Unique identifier for the integration */ id: string; // uuid /** * Organization ID */ orgId: string; /** * ISO-8601 timestamp when the integration was created */ created_at: string; // date-time /** * ISO-8601 timestamp when the integration was last updated */ updated_at: string; // date-time /** * Integration name */ name: string; /** * Optional description of the integration */ description?: string; /** * List of access token IDs associated with this integration */ access_token_ids?: string[]; /** * List of app IDs associated with this integration */ app_ids?: string[]; /** * Configuration defining environment variables needed by this integration. Values are stored in the Environments API. */ environment_config?: EnvironmentFieldConfig[]; settings?: /* Settings for the integration */ IntegrationSettings; /** * Type of integration. "erp" is the ERP integration with inbound/outbound use cases. "connector" is for complex proxy integrations with external APIs. * */ integration_type?: "erp" | "connector"; connector_config?: /* Shared configuration for connector-type integrations */ ConnectorConfig; /** * If true, integration is displayed in read-only mode in the UI to discourage changes */ protected?: boolean; /** * The manifest IDs associated with this integration */ _manifest?: string[]; /** * All use cases belonging to this integration */ use_cases: UseCase[]; } /** * Authentication configuration for managed call requests */ export interface ManagedCallAuth { /** * Authentication type */ type?: "oauth2_client_credentials" | "api_key" | "bearer"; /** * OAuth2 token URL. Can be plain text or {{env.key}} reference. */ token_url?: string; /** * OAuth2 client ID. Can be plain text or {{env.key}} reference. */ client_id?: string; /** * OAuth2 client secret. Must be an {{env.key}} reference (secret). */ client_secret?: string; /** * OAuth2 scope */ scope?: string; /** * OAuth2 audience parameter (e.g. for Auth0, Azure AD). Can be plain text or {{env.key}} reference. */ audience?: string; /** * OAuth2 resource parameter (e.g. for Azure AD). Can be plain text or {{env.key}} reference. */ resource?: string; /** * Additional key-value pairs for the OAuth2 token request body. Values can be {{env.key}} references. */ body_params?: { [name: string]: string; }; /** * Additional headers for the OAuth2 token request. Values can be {{env.key}} references. */ headers?: { [name: string]: string; }; /** * Additional query parameters for the OAuth2 token URL. Values can be {{env.key}} references. */ query_params?: { [name: string]: string; }; /** * Header name for API key auth (default X-API-Key) */ api_key_header?: string; /** * API key value. Must be an {{env.key}} reference (secret). */ api_key?: string; /** * Bearer token value. Must be an {{env.key}} reference (secret). */ token?: string; } export interface ManagedCallErrorResponse { error: { /** * Error code (e.g., EXTERNAL_API_ERROR, SSRF_BLOCKED, MANAGED_CALL_EXECUTION_ERROR) */ code: string; /** * Human-readable error message */ message: string; /** * Additional error details (e.g., status code and body for external API errors) */ details?: { [name: string]: any; }; }; } export interface ManagedCallExecuteRequest { /** * Integration ID */ integration_id: string; // uuid /** * Request payload for the managed call operation */ payload?: { [name: string]: any; }; /** * Correlation ID for tracing related events (auto-generated if not provided) */ correlation_id?: string; } /** * The response from a managed call execution. * On success, returns the JSONata-mapped response data directly (no wrapper). * The shape is entirely defined by your response_mapping JSONata expression. * If no response_mapping is configured, returns the raw external API response. * Check the X-Inbound-Event-Id header for inbound pipeline tracking when inbound routing is configured. * */ export interface ManagedCallExecuteResponse { [name: string]: any; } /** * HTTP operation configuration for managed calls */ export interface ManagedCallOperation { method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; /** * URL path template with {{variable}} interpolation */ path: string; /** * Custom HTTP headers for the request. Values support {{variable}} interpolation from the request payload and {{env.VAR}} references for environment variables. */ headers?: { [name: string]: string; }; /** * Query parameters for the request. Values support {{variable}} interpolation from the request payload. */ query_params?: { [name: string]: string; }; } /** * Configuration for managed_call use cases. Defines a single API operation with JSONata mapping. */ export interface ManagedCallOperationConfig { operation: /* HTTP operation configuration for managed calls */ ManagedCallOperation; /** * JSONata expression for outbound body transformation */ request_mapping?: string; /** * JSONata expression for inbound response transformation */ response_mapping?: string; /** * Slug of the inbound use case to route responses to for async entity processing. * When set, the managed call response is queued to the inbound pipeline and processed * using the referenced inbound use case's mapping configuration. * */ inbound_use_case_slug?: string; } export interface ManagedCallUseCase { /** * Unique identifier for the use case */ id: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Use case type for managed API calls */ type: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy" | "managed_call"; enabled: boolean; /** * Description of the last change made to this use case */ change_description?: string; /** * ISO-8601 timestamp when the use case was created */ created_at: string; // date-time /** * ISO-8601 timestamp when the use case was last updated */ updated_at: string; // date-time configuration?: /* Configuration for managed_call use cases. Defines a single API operation with JSONata mapping. */ ManagedCallOperationConfig; type_annotations?: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations; /** * Whether types have been generated for this use case */ types_locked?: boolean; } export interface ManagedCallUseCaseHistoryEntry { /** * Unique identifier for this history entry */ id: string; // uuid /** * Reference to the parent use case */ useCaseId: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name at this point in history */ name: string; /** * Use case slug at this point in history */ slug?: string; /** * Whether the use case was enabled at this point in history */ enabled: boolean; /** * Description of the change that was made at this point in history */ change_description?: string; /** * User ID of the user who made the change that produced this history entry */ changed_by?: string; /** * ISO-8601 timestamp when the use case was originally created */ created_at: string; // date-time /** * ISO-8601 timestamp of this historical snapshot (before the update) */ updated_at: string; // date-time /** * ISO-8601 timestamp when this history entry was created */ history_created_at: string; // date-time /** * Use case type for managed API calls */ type: "managed_call"; configuration?: /* Configuration for managed_call use cases. Defines a single API operation with JSONata mapping. */ ManagedCallOperationConfig; type_annotations?: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations; /** * Whether types have been generated for this use case */ types_locked?: boolean; } export interface MappingSimulationRequest { mapping_configuration: IntegrationConfigurationV1 | IntegrationConfigurationV2; /** * Type of the object/event being mapped. * For v1.0: must match a key in mapping_configuration.mapping.objects * For v2.0: must match a key in mapping_configuration.mapping.events * */ object_type: string; /** * Format of the payload data */ format: "json" | "xml"; /** * The object data payload - can be either a serialized string or a direct JSON object */ payload: /* The object data payload - can be either a serialized string or a direct JSON object */ string | { [name: string]: any; }; } export interface MappingSimulationResponse { entity_updates: EntityUpdate[]; meter_readings_updates?: MeterReadingUpdate[]; /** * Validation warnings about the configuration (e.g., unique_ids referencing non-indexed fields) */ warnings?: MappingSimulationWarning[]; } /** * Request for v2 mapping simulation. Uses the same configuration format stored in integration use case resources, * making it easier to test configurations before saving them. * */ export interface MappingSimulationV2Request { event_configuration: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration; /** * Format of the payload data */ format: "json" | "xml"; /** * The event data payload - can be either a serialized string or a direct JSON object */ payload: /* The event data payload - can be either a serialized string or a direct JSON object */ string | { [name: string]: any; }; } export interface MappingSimulationWarning { /** * The entity schema slug where the issue was found */ entity_schema: string; /** * The field name that caused the warning */ field: string; /** * Description of the validation issue */ message: string; } /** * Scope configuration for meter reading upsert-prune-scope mode. * The scope is all readings for the same meter + counter. * */ export interface MeterReadingPruneScopeConfig { /** * Optional source filter. When set, only readings with this source * are eligible for pruning (e.g., 'ERP' to only prune ERP-synced readings). * */ source?: string; } export interface MeterReadingUpdate { meter: { /** * Unique identifiers for the meter */ $entity_unique_ids: { [name: string]: any; }; }; meter_counter?: { /** * Unique identifiers for the meter counter */ $entity_unique_ids?: { [name: string]: any; }; }; /** * Meter reading attributes. Required: external_id, timestamp, source, value. `timestamp` must be ISO 8601 — either `YYYY-MM-DD` or `YYYY-MM-DDTHH:mm:ss` (with optional fractional seconds and optional `Z` / `±HH:mm` timezone offset); non-ISO formats (e.g. `DD.MM.YYYY` or epoch numbers) are rejected and must be converted upstream via a `jsonataExpression` (e.g. `$fromMillis(...)`). Date-only values are normalized to midnight UTC and offset-less date-times are anchored to UTC before being forwarded to the metering API. `source` must be one of: ECP, ERP, 360, journey-submission. `reason` (optional) must be one of: regular, irregular, last, first, meter_change, contract_change, meter_adjustment (or empty/null). */ attributes: { [name: string]: any; }; } export interface MeterUniqueIdsConfig { /** * Array of unique identifier field mappings */ unique_ids: [ RelationUniqueIdField, ...RelationUniqueIdField[] ]; } export interface MonitoringEventV2 { /** * Unique monitoring event ID */ id: string; // uuid /** * Organization ID */ org_id: string; /** * Integration ID */ integration_id: string; /** * Trigger/inbound event ID (groups related monitoring events) */ event_id: string; /** * Correlation ID for tracing. Empty when unavailable. */ correlation_id?: string; /** * Use case ID. Empty for system-level events ("General"). */ use_case_id?: string; /** * Use case type. Empty for system-level events. */ use_case_type: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy" | ""; /** * Event outcome level */ level: "success" | "error" | "skipped" | "warning"; /** * Taxonomy code (e.g. OAUTH2_TOKEN_FAILURE, HTTP_502). Empty for success. */ code?: string; /** * Human-readable message. Empty when not applicable. */ message?: string; /** * Event-specific JSON data. Structure determined by `code`. */ detail?: { [name: string]: any; } | null; /** * When the monitoring event was created */ created_at: string; // date-time } export interface MonitoringStats { /** * Statistics for inbound (ERP sync) events */ inbound: { /** * Total number of inbound events in the period */ total_events: number; /** * Total number of unique correlation IDs */ total_correlations?: number; /** * Number of successful events */ success_count: number; /** * Number of failed events */ error_count: number; /** * Number of skipped events */ skipped_count: number; /** * Number of warning events */ warning_count?: number; /** * Success rate as percentage (0-100) */ success_rate?: number; // float /** * Timestamp of the most recent error */ last_error_at?: string | null; // date-time /** * Statistics breakdown by requested inbound_group_by fields */ breakdown?: { [name: string]: any; }[]; }; /** * Statistics for outbound (webhook delivery) events */ outbound: { /** * Total number of outbound events in the period */ total_events: number; /** * Number of successful deliveries */ success_count: number; /** * Number of failed deliveries */ error_count: number; /** * Number of pending deliveries */ pending_count?: number; /** * Success rate as percentage (0-100) */ success_rate?: number; // float /** * Timestamp of the most recent error */ last_error_at?: string | null; // date-time /** * Statistics breakdown by requested outbound_group_by fields */ breakdown?: { [name: string]: any; }[]; }; } export interface MonitoringStatsV2 { /** * Total number of events in the period */ total_events: number; /** * Number of successful events */ success_count: number; /** * Number of error events */ error_count: number; /** * Number of warning events */ warning_count: number; /** * Number of skipped events */ skipped_count: number; /** * Number of ACK_TIMEOUT events (acknowledgement timed out) */ ack_timeout_count?: number; /** * Success rate as percentage (0-100) */ success_rate?: number; // float /** * Timestamp of the most recent error */ last_error_at?: string | null; // date-time /** * Statistics breakdown by requested group_by field */ breakdown?: { [name: string]: any; }[]; } /** * Delivery channel toggles. New channels added in svc-notification-api inherit here. */ export interface NotificationChannelSet { email: boolean; in_app: boolean; } /** * Digest schedule and content configuration. */ export interface NotificationDigestConfig { enabled: boolean; frequency: "daily" | "weekly"; /** * Weekly only. 0 = Sunday … 6 = Saturday. */ dayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6; /** * HH:mm */ timeOfDay: string; /** * IANA timezone, e.g. 'Europe/Berlin'. */ timezone: string; channels: /* Delivery channel toggles. New channels added in svc-notification-api inherit here. */ NotificationChannelSet; /** * List all integrations vs. only ones with issues. */ includeHealthy: boolean; /** * Suppress the digest when nothing happened. */ skipIfEmpty: boolean; } /** * A single notification-history row (one real notification decision). */ export interface NotificationHistoryItem { /** * Stable history row id (ULID). */ id: string; /** * The notification/rule type (e.g. critical_error, error_threshold, integration_digest). */ type: string; /** * The state transition that produced this decision (e.g. OK->ALERTING), when applicable. */ state_transition?: string | null; /** * Severity of the decision. */ severity: "error" | "warning" | "info"; /** * Human-readable title at decision time. */ title: string; /** * When the decision occurred (newest-first ordering key). */ occurred_at: string; // date-time /** * Whether the notification was actually sent (true) or suppressed (false). */ notified: boolean; /** * Why the notification was suppressed (only set when notified is false). */ suppressed_reason?: "muted" | "debounced" | "recipient_opt_out"; /** * epilot user ids the notification was (or would have been) delivered to. */ recipients: string[]; /** * Type-specific context captured at decision time. */ context: { [name: string]: any; }; /** * When the history row was written. */ created_at: string; // date-time } export interface NotificationHistoryResponse { /** * Notification-history rows, newest first. */ history: /* A single notification-history row (one real notification decision). */ NotificationHistoryItem[]; /** * Opaque base64 cursor for the next page, or null when there are no more rows. */ next_cursor?: string | null; } /** * A configured recipient. Only the epilot user_id is stored. */ export interface NotificationRecipient { /** * epilot user id. Same-org membership is enforced at send time (Phases 3–5), which re-validates each recipient against the integration's org before fanning out — it is not enforced at config-write time. */ user_id: string; } /** * A single notification rule. Only the params relevant to a given type are set. The id is a server-minted ULID, preserved across edits. */ export interface NotificationRule { /** * Stable server-minted ULID. AlertState + baseline key. */ id: string; /** * Optional human label disambiguating two rules of the same type. */ name?: string; /** * Rule trigger type. V1 produces the first six; the remaining values are deferred (V2) catalog types accepted by the data model but not produced by any V1 producer. */ type: "critical_error" | "error_threshold" | "warning_threshold" | "success_rate_drop" | "recovery" | "silence" | "consecutive_failures" | "first_error" | "new_error_code" | "auth_expiry" | "ack_timeout" | "validation_surge"; enabled: boolean; channels?: /* Delivery channel toggles. New channels added in svc-notification-api inherit here. */ NotificationChannelSet; /** * Per-rule code scope. Event-matching rules default to ['_parent_']; silence defaults to ['_any_']. success_rate_drop and recovery take no codes. */ codes?: string[]; /** * Count or percentage; 'auto' selects anomaly-baseline mode. */ threshold?: /* Count or percentage; 'auto' selects anomaly-baseline mode. */ number | ("auto"); /** * Band width for 'auto' mode. */ sensitivity?: "low" | "medium" | "high"; /** * Static value used while the 'auto' baseline is immature (cold start). */ fallbackThreshold?: number; /** * Evaluation window, e.g. '15m', '1h', '24h'. */ window?: string; /** * success_rate_drop minimum sample size guard. */ minSampleSize?: number; /** * consecutive_failures count. */ consecutive?: number; /** * silence quiet period, e.g. '12h'. */ quietPeriod?: string; } export interface NotificationRuleStatus { /** * The rule's stable id (matches the configured rule id). */ rule_id: string; /** * The rule's live AlertState (defaults to `ok` when never evaluated). */ state: "ok" | "alerting" | "recovered"; /** * ISO instant the rule last entered ALERTING. */ last_fired_at?: string | null; // date-time /** * ISO instant the rule last cleared back to OK. */ last_cleared_at?: string | null; // date-time /** * Present only for enabled 'auto'-threshold rules; null otherwise. */ baseline?: { /** * False during cold start; the sweeper uses the static fallbackThreshold until the baseline's history span is mature. * */ is_mature: boolean; /** * ISO instant the baseline was last computed. */ computed_at?: string | null; // date-time /** * Typical in-scope event volume for the current hour-of-week bucket. */ median?: number | null; /** * Median absolute deviation for the current hour-of-week bucket. */ mad?: number | null; /** * Dynamic alert threshold (median + k·MAD, k by sensitivity) for the current hour-of-week, or null when the bucket is uncovered. * */ upper?: number | null; /** * Full 168-bucket series; only present when ?include=baseline_series. */ buckets?: RuleBaselineBucket[] | null; } | null; } export interface NotificationStatusResponse { /** * Rolled-up live status: `muted` when muteUntil is in the future; else `alerting` if any rule is currently ALERTING; else `healthy`. * */ health: "healthy" | "alerting" | "muted"; /** * Most recent per-rule evaluation instant (max lastEvaluatedAt), or null when no rule has been evaluated. Updates on the 5-minute sweep tick. * */ evaluated_at?: string | null; // date-time /** * Per-rule status, one entry per configured rule. */ rules: NotificationRuleStatus[]; } export interface OutboundConflict { /** * Type of conflict: * - 'event_disabled': Event catalog event is disabled while use case is enabled * - 'all_webhooks_disabled': All webhooks are disabled while use case is enabled * - 'event_enabled_while_disabled': Event is enabled while use case is disabled * - 'webhook_enabled_while_disabled': A webhook is enabled while use case is disabled * - 'stream_blocked': The outbound stream is halted by a poison message awaiting operator action or consumer ack (poll mode) * - 'dlq_items_present': Dead-lettered messages await redrive or expiry (poll mode) * */ type: "event_disabled" | "all_webhooks_disabled" | "event_enabled_while_disabled" | "webhook_enabled_while_disabled" | "stream_blocked" | "dlq_items_present"; /** * Webhook ID (only present for webhook_enabled_while_disabled conflicts) */ webhookId?: string; /** * Human-readable description of the conflict */ message: string; } export interface OutboundDlqListResponse { /** * Dead-lettered messages, oldest first */ items: OutboundDlqMessage[]; /** * Opaque pagination token — present when more entries exist */ next_token?: string; } export interface OutboundDlqMessage { /** * Opaque message id (msg_…) of the dead-lettered message */ id: string; /** * The poll-mode use case that produced this message */ use_case_id: string; /** * Standardized event name (e.g. contract.updated) */ event_name: string; /** * Unique id of the originating event */ event_id: string; /** * When the message was originally enqueued */ enqueued_at?: string; // date-time /** * When the message was dead-lettered */ dead_lettered_at: string; // date-time /** * Delivery attempts at the moment the message was dead-lettered */ delivery_attempts: number; /** * Why the message was dead-lettered (policy or operator reason) */ reason?: string; /** * When the DLQ entry expires (retention window re-armed at dead-letter time) */ expires_at?: string; // date-time } /** * Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ export interface OutboundIntegrationEventConfiguration { /** * The Event Catalog event name that triggers this outbound flow * example: * contract.created */ event_catalog_event: string; /** * List of mappings that transform and deliver the event */ mappings: [ /* A mapping that delivers an event to an external system — either pushed to a webhook (with a JSONata payload transformation) or made available on the pull-based poll queue (raw event payload, no transformation) */ OutboundMapping, .../* A mapping that delivers an event to an external system — either pushed to a webhook (with a JSONata payload transformation) or made available on the pull-based poll queue (raw event payload, no transformation) */ OutboundMapping[] ]; } /** * A mapping that delivers an event to an external system — either pushed to a webhook (with a JSONata payload transformation) or made available on the pull-based poll queue (raw event payload, no transformation) */ export interface OutboundMapping { /** * Unique identifier for this mapping */ id?: string; // uuid /** * Human-readable name for this mapping * example: * ERP Contract Sync */ name: string; /** * JSONata expression to transform the event payload. Required for webhook delivery; ignored for poll delivery. * example: * { "id": entity._id, "customer": entity.customer_name } */ jsonata_expression?: string; /** * Whether this mapping is active */ enabled: boolean; delivery: /* Configuration for how the event should be delivered. webhook = push delivery via svc-webhooks (JSONata-transformed payload); poll = pull-based queue delivery where the consumer fetches items via the poll API (raw event payload) */ DeliveryConfig; /** * Timestamp when the mapping was created */ created_at?: string; // date-time /** * Timestamp when the mapping was last updated */ updated_at?: string; // date-time } export interface OutboundMessage { /** * Opaque message id (msg_…) — stable per message across leases */ id: string; /** * Opaque lease token (lt_…) — echo back on ack */ lease_token: string; /** * The poll-mode use case that produced this message */ use_case_id: string; /** * Standardized event name (e.g. contract.updated) */ event_name: string; /** * Unique id of the originating event */ event_id: string; /** * Ordering group — messages sharing a group are strictly ordered, * distinct groups are independent. Constant "0" in v1. * */ group: string; /** * The raw standardized event-catalog event, always inlined as-is */ payload: { [name: string]: any; }; /** * When the message was enqueued */ enqueued_at: string; // date-time } export interface OutboundMonitoringEvent { /** * Organization ID */ org_id: string; /** * Unique event identifier */ event_id: string; /** * Event name (event_catalog_event) */ event_name: string; /** * Delivery status */ status: "succeeded" | "failed" | "pending"; /** * Target URL */ url?: string; /** * HTTP method used (e.g., POST) */ http_method?: string; /** * HTTP response details (status_code, message, headers) */ http_response?: { [name: string]: any; }; /** * Webhook configuration ID */ webhook_config_id?: string; /** * Additional metadata (webhook_id, organization details, correlation_id, etc.) */ metadata?: { [name: string]: any; }; /** * Execution context (execution_arn, state_machine_arn, etc.) */ execution_context?: { [name: string]: any; }; /** * Payload that was sent */ payload?: { [name: string]: any; }; /** * When the event was created */ created_at: string; // date-time /** * When the event was last updated */ updated_at?: string; // date-time } /** * Queue/consumer health for a poll-mode use case. Present only on use * cases with a poll delivery mapping — webhook-only use cases are * unaffected. Depth/age/DLQ numbers are first-page approximations. * */ export interface OutboundPollStatus { /** * Unconsumed messages attributable to this use case (first-page approximation) */ queue_depth: number; /** * Age of the oldest unconsumed message in seconds — null when the queue is empty */ oldest_unconsumed_age_seconds: number | null; /** * Timestamp of the last successful poll lease — null before the first poll */ last_poll_at: string | null; // date-time /** * Timestamp of the last committed acknowledgment — null before the first ack */ last_ack_at: string | null; // date-time /** * Whether the integration's outbound stream is currently halted by a * blocked head message (poison_policy 'block'). Stream-level flag — * the same value is reported on every poll use case of the * integration, because the stream spans them. * */ blocked: boolean; /** * Dead-lettered messages of this use case awaiting redrive or expiry (first-page approximation) */ dlq_count: number; } export interface OutboundStatusResponse { useCases: OutboundUseCaseStatus[]; } export interface OutboundUseCase { /** * Unique identifier for the use case */ id: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Use case type */ type: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy" | "outbound"; enabled: boolean; /** * Description of the last change made to this use case */ change_description?: string; /** * ISO-8601 timestamp when the use case was created */ created_at: string; // date-time /** * ISO-8601 timestamp when the use case was last updated */ updated_at: string; // date-time configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration; } export interface OutboundUseCaseHistoryEntry { /** * Unique identifier for this history entry */ id: string; // uuid /** * Reference to the parent use case */ useCaseId: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name at this point in history */ name: string; /** * Use case slug at this point in history */ slug?: string; /** * Whether the use case was enabled at this point in history */ enabled: boolean; /** * Description of the change that was made at this point in history */ change_description?: string; /** * User ID of the user who made the change that produced this history entry */ changed_by?: string; /** * ISO-8601 timestamp when the use case was originally created */ created_at: string; // date-time /** * ISO-8601 timestamp of this historical snapshot (before the update) */ updated_at: string; // date-time /** * ISO-8601 timestamp when this history entry was created */ history_created_at: string; // date-time /** * Use case type */ type: "outbound"; configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration; } export interface OutboundUseCaseStatus { /** * Unique identifier for the use case */ useCaseId: string; // uuid /** * Human-readable name of the use case */ name: string; /** * Whether the use case is enabled */ useCaseEnabled: boolean; /** * The Event Catalog event name that triggers this outbound flow * example: * contract.created */ eventCatalogEvent?: string; /** * Whether the event is enabled in Event Catalog. Null if the API is unreachable. */ eventEnabled?: boolean | null; webhooks?: WebhookStatus[]; /** * Overall status of the use case: * - 'ok': Use case is enabled and all dependencies are properly configured * - 'conflict': Use case has configuration issues (disabled events/webhooks while enabled) * - 'disabled': Use case is disabled * */ status: "ok" | "conflict" | "disabled"; /** * List of detected conflicts, if any */ conflicts?: OutboundConflict[]; poll?: /** * Queue/consumer health for a poll-mode use case. Present only on use * cases with a poll delivery mapping — webhook-only use cases are * unaffected. Depth/age/DLQ numbers are first-page approximations. * */ OutboundPollStatus; } /** * Pull-based queue delivery. Items carry the raw standardized event-catalog payload; no JSONata mapping is applied in poll mode. Consumers fetch and acknowledge items via the poll API. */ export interface PollDeliveryConfig { /** * Delivery mechanism type */ type: "poll"; /** * How long undelivered queue items are retained before expiry */ retention_days?: number; /** * What happens when an item exhausts max_delivery_attempts: dead_letter routes the exhausted item to the dead-letter queue and advances past it so the stream keeps flowing; block halts the queue at that item until operator/consumer action removes it. */ poison_policy?: "dead_letter" | "block"; /** * Maximum delivery attempts before the poison_policy is applied */ max_delivery_attempts?: number; } export interface PollOutboundMessagesRequest { /** * Maximum number of messages to lease in this batch. The ~5.5 MB * response cap may truncate the batch earlier when payloads are * large — the leased run shrinks accordingly. * */ limit?: number; } export interface PollOutboundMessagesResponse { /** * The leased batch in strict stream order (empty when contended or drained) */ messages: OutboundMessage[]; /** * Effective visibility timeout for this lease — a per-integration * server-side setting (default 300 seconds) * */ visibility_timeout_seconds: number; /** * Whether more messages are available beyond this batch */ has_more: boolean; } /** * Origin/type of an epilot portal configuration. */ export type PortalOrigin = "END_CUSTOMER_PORTAL" | "INSTALLER_PORTAL" | "B2B_PORTAL" | "ADDITIONAL_PORTAL"; /** * Resolves to a property of one of the calling organization's epilot portal configurations at runtime, replacing hard-coded environment-specific portal UUIDs in inbound mappings. Matched portals are sorted ascending by `(_created_at, portal_id)`; portals without `_created_at` sort first (treated as oldest). When `select: "single"` matches more than one portal, the resolver still returns the oldest match and emits a `PORTAL_REF_AMBIGUOUS` warning. * */ export type PortalRefConfig = /** * Resolves to a property of one of the calling organization's epilot portal configurations at runtime, replacing hard-coded environment-specific portal UUIDs in inbound mappings. Matched portals are sorted ascending by `(_created_at, portal_id)`; portals without `_created_at` sort first (treated as oldest). When `select: "single"` matches more than one portal, the resolver still returns the oldest match and emits a `PORTAL_REF_AMBIGUOUS` warning. * */ { filter?: /** * Filter applied to the org's portal configurations before selection. All filters default to "match any" except `enabled` (default `true`) and `is_dummy` (default `false`). Set `enabled` or `is_dummy` to `null` to opt out of the default. * */ PortalRefFilter; /** * `single` returns one literal value (the oldest matching portal); `all` returns an array of literal values (0, 1, or many). * */ select?: "single" | "all"; /** * Which portal field to emit. */ return?: "portal_id" | "origin" | "domain" | "name"; } | { filter?: /** * Filter applied to the org's portal configurations before selection. All filters default to "match any" except `enabled` (default `true`) and `is_dummy` (default `false`). Set `enabled` or `is_dummy` to `null` to opt out of the default. * */ PortalRefFilter; select?: "single" | "all"; /** * Evaluate the sibling `jsonataExpression` against the matched portal(s). With `select: "single"` the input is the matched PortalConfig object; with `select: "all"` it is the full filtered+sorted array. * */ return: "jsonata"; /** * JSONata expression evaluated against the matched portal(s). */ jsonataExpression: string; }; /** * Filter applied to the org's portal configurations before selection. All filters default to "match any" except `enabled` (default `true`) and `is_dummy` (default `false`). Set `enabled` or `is_dummy` to `null` to opt out of the default. * */ export interface PortalRefFilter { /** * Single origin or array of origins (matches if origin is in the array). */ origin?: /* Single origin or array of origins (matches if origin is in the array). */ /* Origin/type of an epilot portal configuration. */ PortalOrigin | /* Origin/type of an epilot portal configuration. */ PortalOrigin[]; /** * Match portals with this `enabled` value. Default `true`. Set to `null` to ignore. */ enabled?: boolean | null; /** * Match portals with this `is_dummy` value. Default `false`. Set to `null` to ignore. */ is_dummy?: boolean | null; /** * Optional restriction on `is_epilot_domain`. */ is_epilot_domain?: boolean; /** * Exact match on the portal's `name`. */ name?: string; /** * Exact match on the portal's `domain`. */ domain?: string; } /** * Scope configuration for upsert-prune-scope modes. * Defines how to find entities that should be pruned if not in the upsert payload. * The scope is resolved against the original event payload (not individual array items). * */ export interface PruneScopeConfig { /** * Scope mode for finding entities to prune: * - 'relations': Find scope by looking at all entities related to a specific entity (both direct and reverse relations) * - 'query': Find scope entities directly via query parameters * */ scope_mode: "relations" | "query"; /** * For 'relations' mode: The schema of the entity to find (e.g., 'billing_account'). * Not used for 'query' mode. * */ schema?: string; /** * For 'relations' mode: How to identify the scope entity from the payload. * Not used for 'query' mode. * */ unique_ids?: RelationUniqueIdField[]; /** * For 'query' mode: Direct query parameters to find scope entities. * Not used for 'relations' or 'reverse-relations' modes. * */ query?: RelationUniqueIdField[]; } export interface QueryAccessLogsRequest { /** * Filter by a specific access token ID (e.g., 'api_5ZugdRXasLfWBypHi93Fk'). * Must be one of the access_token_ids linked to the integration. * If omitted, returns logs for all access tokens linked to the integration. * * example: * api_5ZugdRXasLfWBypHi93Fk */ token_id?: string; /** * Filter by service name (e.g., 'entity', 'metering', 'submission-api') * example: * entity */ service?: string; /** * Filter by HTTP method */ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"; /** * Filter by request path (partial match) * example: * /v1/entity */ path?: string; /** * Filter by HTTP status code * example: * 200 */ status?: number; /** * Filter logs from this date (inclusive) * example: * 2025-01-01T00:00:00Z */ from_date?: string; // date-time /** * Filter logs until this date (inclusive) * example: * 2025-01-31T23:59:59Z */ to_date?: string; // date-time /** * Maximum number of results to return * example: * 50 */ limit?: number; /** * Cursor for pagination (infinite scroll) */ cursor?: { /** * Timestamp from the last log entry in the previous page */ timestamp?: string; // date-time /** * Request ID from the last log entry in the previous page */ request_id?: string; }; } export interface QueryEventsRequest { /** * Filter by event ID */ event_id?: string; /** * Filter by event type */ event_type?: "CREATE" | "UPDATE" | "DELETE"; /** * Filter by correlation ID */ correlation_id?: string; /** * Filter by object type */ object_type?: string; /** * Filter by event name (alias for object_type) */ event_name?: string; /** * Filter by use case ID */ use_case_id?: string; /** * Maximum number of results to return * example: * 25 */ limit?: number; /** * Cursor for pagination. Use the next_cursor from the previous response to get the next page. */ cursor?: { /** * Timestamp from the last event in the previous page * example: * 2025-10-31T12:34:56Z */ event_time?: string; // date-time /** * Event ID from the last event in the previous page * example: * evt_1234567890abcdef */ event_id?: string; }; } export interface QueryInboundMonitoringEventsRequest { /** * Filter by use case ID */ use_case_id?: string; // uuid /** * Filter by event type */ event_type?: "CREATE" | "UPDATE" | "DELETE" | "TRIGGER"; /** * Filter by sync type */ sync_type?: "entity" | "meter_reading" | "webhook" | "api_deprecation"; /** * Filter by processing status */ status?: "success" | "error" | "skipped" | "warning"; /** * Filter by error category (only applicable when status=error) */ error_category?: "validation" | "configuration" | "downstream_api" | "timeout" | "system"; /** * Filter by correlation ID */ correlation_id?: string; /** * Filter by object type (e.g., 'contract', 'meter') */ object_type?: string; /** * Filter by event name (alias for object_type) */ event_name?: string; /** * Filter by event ID to find a specific event */ event_id?: string; /** * Filter events from this date (inclusive) * example: * 2025-01-01T00:00:00Z */ from_date?: string; // date-time /** * Filter events until this date (inclusive) * example: * 2025-01-31T23:59:59Z */ to_date?: string; // date-time /** * Maximum number of results to return * example: * 50 */ limit?: number; /** * Cursor for pagination */ cursor?: { /** * Timestamp from the last event in the previous page */ completed_at?: string; // date-time /** * Event ID from the last event in the previous page */ event_id?: string; }; } export interface QueryMonitoringEventsV2Request { /** * Filter by use case ID (UUID). Empty string matches "General" events. Special value "__unknown__" matches events whose use_case_id does not belong to any currently configured use case for this integration (excludes "General" events). * */ use_case_id?: string; /** * Filter by use case type (replaces direction) */ use_case_type?: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy"; /** * Filter by event level */ level?: "success" | "error" | "skipped" | "warning"; /** * Filter by taxonomy code (e.g. OAUTH2_TOKEN_FAILURE, HTTP_502) */ code?: string; /** * Filter by trigger/inbound event ID */ event_id?: string; /** * Filter by correlation ID for tracing */ correlation_id?: string; /** * Filter events from this date (inclusive) * example: * 2025-01-01T00:00:00Z */ from_date?: string; // date-time /** * Filter events until this date (inclusive) * example: * 2025-01-31T23:59:59Z */ to_date?: string; // date-time /** * Maximum number of results to return * example: * 50 */ limit?: number; /** * Cursor for pagination (from previous response's next_cursor) */ cursor?: { created_at?: string; // date-time id?: string; // uuid }; } export interface QueryOutboundMonitoringEventsRequest { /** * Filter by event name (event_catalog_event). If not specified, returns events for all linked event names in the integration's outbound use cases. * example: * automation_flow_target */ event_name?: string; /** * Filter by delivery status */ status?: "succeeded" | "failed" | "pending"; /** * Filter by webhook configuration ID */ webhook_config_id?: string; /** * Filter events from this date (inclusive) * example: * 2025-01-01T00:00:00Z */ from_date?: string; // date-time /** * Filter events until this date (inclusive) * example: * 2025-01-31T23:59:59Z */ to_date?: string; // date-time /** * Maximum number of results to return * example: * 50 */ limit?: number; /** * Cursor for pagination */ cursor?: { /** * Timestamp from the last event in the previous page */ created_at?: string; // date-time /** * Event ID from the last event in the previous page */ event_id?: string; }; } export interface RedriveOutboundDlqRequest { /** * Message ids (msg_…) of the DLQ entries to redrive */ ids: [ string, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string? ]; } export interface RedriveOutboundDlqResponse { /** * Per-id redrive outcome, input order preserved */ results: RedriveOutboundDlqResult[]; } export interface RedriveOutboundDlqResult { /** * The requested message id */ id: string; /** * Outcome — `redriven` re-enqueued at the tail; `not_found` for * unknown ids or entries concurrently redriven/expired * */ status: "redriven" | "not_found"; } export interface RelationConfig { /** * Relation operation: * - '_set': Replace all existing relations with the specified items * - '_append': Add new unique items to existing relations (deduplicates by entity_id) * - '_append_all': Add all items to existing relations (no deduplication, allows duplicates) * */ operation: "_set" | "_append" | "_append_all"; /** * Array of relation item configurations */ items?: RelationItemConfig[]; /** * JSONata expression that returns relation items array (alternative to 'items') */ jsonataExpression?: string; } export interface RelationItemConfig { /** * Related entity schema */ entity_schema: string; /** * Optional tags for this relation */ _tags?: string[]; /** * Unique identifier mappings for the related entity */ unique_ids: RelationUniqueIdField[]; } /** * Configuration for a single relation reference item */ export interface RelationRefItemConfig { /** * Schema of the related entity (e.g., "contact") */ entity_schema: string; /** * Unique identifier mappings for the related entity */ unique_ids: RelationUniqueIdField[]; /** * Attribute path on the related entity (e.g., "address") */ path: string; value: /* Configuration for the value to set on the related entity's attribute */ RelationRefValueConfig; } /** * Configuration for the value to set on the related entity's attribute */ export interface RelationRefValueConfig { /** * Target attribute name on the related entity */ attribute: string; /** * Operation for the attribute value: * - '_set': Replace the attribute value * - '_append': Add new unique items (deduplicates) * - '_append_all': Add all items (no deduplication) * */ operation?: "_set" | "_append" | "_append_all"; /** * Source field name from the event data */ field?: string; /** * JSONata expression to compute the value */ jsonataExpression?: string; /** * Constant value (any type) */ constant?: any; } /** * Configuration for relation references ($relation_ref). * Relation references link to a specific item within a repeatable attribute on a related entity. * Common use case: referencing a specific address within a contact's address list. * */ export interface RelationRefsConfig { /** * Relation reference operation: * - '_set': Replace all existing relation_refs with the specified items * - '_append': Add new unique items to existing relation_refs (deduplicates by entity_id + _id) * - '_append_all': Add all items to existing relation_refs (no deduplication, allows duplicates) * */ operation: "_set" | "_append" | "_append_all"; /** * Array of relation reference item configurations */ items?: /* Configuration for a single relation reference item */ RelationRefItemConfig[]; /** * JSONata expression that returns relation_ref items array (alternative to 'items') */ jsonataExpression?: string; } export interface RelationUniqueIdField { /** * Target attribute name in the related entity */ attribute: string; _type?: /** * Type hint for repeatable fields that require special search handling. * These fields are stored as arrays of objects (e.g., email: [{ email: "value" }]). * */ RepeatableFieldType; /** * Source field name from the event data */ field?: string; /** * JSONata expression to compute the value */ jsonataExpression?: string; /** * Constant value (any type) */ constant?: any; } /** * Type hint for repeatable fields that require special search handling. * These fields are stored as arrays of objects (e.g., email: [{ email: "value" }]). * */ export type RepeatableFieldType = "email" | "phone"; export interface ReplayEventsRequest { /** * List of event IDs to replay. Maximum 100 events per request. */ event_ids: [ string, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string?, string? ]; } export interface RuleBaselineBucket { /** * Day of week, 1=Monday … 7=Sunday. */ dow: number; /** * Hour of day, 0 … 23 (UTC). */ hour: number; median: number; mad: number; } export interface RuleBaselineStatus { /** * False during cold start; the sweeper uses the static fallbackThreshold until the baseline's history span is mature. * */ is_mature: boolean; /** * ISO instant the baseline was last computed. */ computed_at?: string | null; // date-time /** * Typical in-scope event volume for the current hour-of-week bucket. */ median?: number | null; /** * Median absolute deviation for the current hour-of-week bucket. */ mad?: number | null; /** * Dynamic alert threshold (median + k·MAD, k by sensitivity) for the current hour-of-week, or null when the bucket is uncovered. * */ upper?: number | null; /** * Full 168-bucket series; only present when ?include=baseline_series. */ buckets?: RuleBaselineBucket[] | null; } export interface SecureProxyRequest { /** * Integration ID that owns the secure_proxy use case */ integration_id: string; // uuid /** * Use case ID (provide either use_case_id or use_case_slug) */ use_case_id?: string; // uuid /** * Use case slug (provide either use_case_id or use_case_slug) */ use_case_slug?: string; /** * Target URL to proxy the request to */ url: string; // uri /** * HTTP method */ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; /** * Request headers to forward */ headers?: { [name: string]: string; }; /** * Request body (string or JSON) */ body?: any; /** * Expected response type */ response_type?: "json" | "binary"; } export interface SecureProxyResponse { /** * HTTP status code from the upstream response */ status_code?: number; /** * Response headers from upstream */ headers?: { [name: string]: string; }; /** * Response body from upstream. When `status_code` is 502 and the target never produced an HTTP response (TLS/connection/DNS failure or timeout), this is a `SecureProxyUpstreamError` describing the underlying cause. */ body?: any; } export interface SecureProxySummary { id: string; // uuid name: string; slug?: string; enabled: boolean; vpc_mode: "static_ip" | "secure_link"; allowed_domains?: string[]; allowed_ips?: string[]; integration_id: string; // uuid integration_name: string; } /** * Error payload returned when epilot could not obtain an HTTP response from the proxied target. The failure is epilot-generated (HTTP 502) but the cause is usually remote-side; `code`/`reason` make that attributable. */ export interface SecureProxyUpstreamError { /** * Short error category. */ message: "Upstream network error" | "Upstream error"; /** * Underlying Node.js/axios error code when available (e.g. `UNABLE_TO_VERIFY_LEAF_SIGNATURE`, `ECONNREFUSED`, `ETIMEDOUT`, `ENOTFOUND`). */ code?: string; /** * Human-readable explanation, present only for well-known codes (TLS/certificate, DNS and connection failures). */ reason?: string; } export interface SecureProxyUseCase { /** * Unique identifier for the use case */ id: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Use case type */ type: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy" | "secure_proxy"; enabled: boolean; /** * Description of the last change made to this use case */ change_description?: string; /** * ISO-8601 timestamp when the use case was created */ created_at: string; // date-time /** * ISO-8601 timestamp when the use case was last updated */ updated_at: string; // date-time configuration?: /** * Configuration for secure_proxy use cases. Defines how to route requests through a secure VPC. * */ SecureProxyUseCaseConfiguration; } /** * Configuration for secure_proxy use cases. Defines how to route requests through a secure VPC. * */ export interface SecureProxyUseCaseConfiguration { /** * VPC routing mode. Read-only after creation. * - static_ip: Routes through a VPC with static outbound IP (NAT Gateway) for IP-allowlisted external APIs. * - secure_link: Routes through a VPN VPC for accessing private customer networks. * */ vpc_mode: "static_ip" | "secure_link"; /** * Domain whitelist for secure_link mode. Admin-only — can only be modified directly in DynamoDB via admin script. * Supports exact match (e.g., "api.wemag.com") and wildcard prefix (e.g., "*.wemag.com"). * */ allowed_domains?: string[]; /** * IP allowlist (CIDR notation) for secure_link mode. Admin-only — can only be modified directly in DynamoDB via admin script. * Required for secure_link mode. All DNS-resolved IPs must match at least one range. * Example: ["10.0.1.0/24", "192.168.1.0/24"] * */ allowed_ips?: string[]; } export interface SecureProxyUseCaseHistoryEntry { /** * Unique identifier for this history entry */ id: string; // uuid /** * Reference to the parent use case */ useCaseId: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name at this point in history */ name: string; /** * Use case slug at this point in history */ slug?: string; /** * Whether the use case was enabled at this point in history */ enabled: boolean; /** * Description of the change that was made at this point in history */ change_description?: string; /** * User ID of the user who made the change that produced this history entry */ changed_by?: string; /** * ISO-8601 timestamp when the use case was originally created */ created_at: string; // date-time /** * ISO-8601 timestamp of this historical snapshot (before the update) */ updated_at: string; // date-time /** * ISO-8601 timestamp when this history entry was created */ history_created_at: string; // date-time /** * Use case type */ type: "secure_proxy"; configuration?: /** * Configuration for secure_proxy use cases. Defines how to route requests through a secure VPC. * */ SecureProxyUseCaseConfiguration; } /** * Current whitelist state for a secure_proxy use case. vpc_mode is read-only * context so the UI can show the user what mode the pool is in. * */ export interface SecureProxyWhitelist { /** * VPC routing mode (read-only). `null` if not yet set. */ vpc_mode: "static_ip" | "secure_link"; /** * Exact domain ("api.example.com") or wildcard prefix ("*.example.com"). * Wildcards must have at least 2 labels in the suffix. * */ allowed_domains: string[]; /** * CIDR-notation IP ranges, e.g. "10.0.0.0/24". */ allowed_ips: string[]; } /** * Partial update for a secure_proxy whitelist. At least one of * `allowed_domains` or `allowed_ips` must be provided. * * Per-field semantics: * - **omitted** — the field is not modified; the stored value is preserved. * - **non-empty array** — the stored value is replaced with the supplied list. * - **empty array (`[]`)** — the list is cleared (stored as `[]`). This is the * canonical way to remove all entries from a list. `null` is not accepted. * */ export interface SecureProxyWhitelistUpdate { /** * Exact domain ("api.example.com") or wildcard prefix ("*.example.com"). * Wildcards must have at least 2 labels in the suffix. * Pass `[]` to clear all allowed domains. * */ allowed_domains?: string[]; /** * CIDR-notation IP ranges, e.g. "10.0.0.0/24". * Pass `[]` to clear all allowed IPs. * */ allowed_ips?: string[]; } export interface SetIntegrationAppMappingRequest { /** * UUID of the integration app instance */ app_id: string; // uuid /** * UUID of the integration app component instance */ component_id: string; // uuid /** * If true, overwrites existing mapping. If false and mapping exists, returns 409 Conflict. */ overwrite?: boolean; } export interface TestNotificationRequest { /** * The kind of notification to render and send. */ kind: "alert" | "digest"; /** * The alert type to render when kind=alert (e.g. critical_error, error_threshold). */ type?: string; /** * Delivery channels to use; defaults to the integration's configured channels. */ channels?: ("email" | "in_app")[]; } export interface TestNotificationResponse { /** * Whether the test notification was accepted for delivery. */ sent: boolean; /** * The calling user id the test was sent to (the only recipient). */ recipient: string; /** * The channels the test was delivered on. */ channels: string[]; /** * The svc-notification-api message id, or null when not returned. */ notification_id?: string | null; } export interface TimeSeriesBreakdownItemV2 { /** * Present when grouping by use_case_type */ use_case_type?: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy"; /** * Present when grouping by use_case. Unknown historical IDs are collapsed into "__unknown__" */ use_case_id?: string; /** * Number of successful events in the breakdown item */ success_count: number; /** * Number of error events in the breakdown item */ error_count: number; /** * Number of warning events in the breakdown item */ warning_count: number; /** * Number of skipped events in the breakdown item */ skipped_count: number; /** * Total events in the breakdown item */ total_count: number; } export interface TimeSeriesBucket { /** * The start timestamp of the bucket */ timestamp: string; // date-time /** * Inbound event counts for this bucket. Null when direction is outbound. */ inbound?: { success_count?: number; error_count?: number; warning_count?: number; skipped_count?: number; total_count?: number; } | null; /** * Outbound event counts for this bucket. Null when direction is inbound. */ outbound?: { success_count?: number; error_count?: number; pending_count?: number; total_count?: number; } | null; } export interface TimeSeriesBucketV2 { /** * Bucket start timestamp */ timestamp: string; // date-time /** * Number of successful events in the bucket */ success_count?: number; /** * Number of error events in the bucket */ error_count?: number; /** * Number of warning events in the bucket */ warning_count?: number; /** * Number of skipped events in the bucket */ skipped_count?: number; /** * Total events in the bucket */ total_count: number; /** * Statistics breakdown by the requested group_by field for this bucket */ breakdown?: TimeSeriesBreakdownItemV2[]; } export interface TriggerErpActionRequest { /** * Unique identifier of the current automation execution */ execution_id: string; /** * Identifier of the organization where the automation is executed */ org_id: string; /** * Identifier of the self-service webhook configuration */ webhook_id: string; /** * Identifier of the automation flow that triggered the action */ flow_id: string; /** * ISO-8601 timestamp when the webhook event was created */ created_at: string; // date-time /** * Identifier of the automation action being executed */ action_id: string; /** * Identifier of the specific automation flow action instance */ flow_action_id: string; /** * Human readable name of the automation flow */ flow_name: string; /** * Identifier of the entity activity related to this trigger */ activity_id: string; /** * Identifier of the entity referenced by the activity */ entity_id: string; } export interface TriggerWebhookResp { status_code?: string; message?: string; body?: { [key: string]: any; }; code?: string; status?: "succeeded" | "failed"; start_date?: string; end_date?: string; event_id?: string; } /** * Developer-provided type annotations for a use case's request and response fields */ export interface TypeAnnotations { /** * Type annotations for request fields, keyed by dot-path (e.g., "vendors[].id" -> "string") */ request?: { [name: string]: string; }; /** * Type annotations for response fields */ response?: { [name: string]: string; }; } /** * Describes the inferred type shape of a JSONata expression */ export interface TypeDescriptor { kind: "object" | "array" | "string" | "number" | "boolean" | "null" | "unknown" | "union"; /** * For kind=object, the properties and their type descriptors */ properties?: { [name: string]: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor; }; /** * For kind=array, the type of array items */ items?: { kind: "object" | "array" | "string" | "number" | "boolean" | "null" | "unknown" | "union"; /** * For kind=object, the properties and their type descriptors */ properties?: { [name: string]: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor; }; /** * For kind=array, the type of array items */ items?: any; /** * For kind=unknown, the JSONata path that produced this value */ source?: string; /** * For kind=union, the variant types */ variants?: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor[]; }; /** * For kind=unknown, the JSONata path that produced this value */ source?: string; /** * For kind=union, the variant types */ variants?: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor[]; } export interface UnblockOutboundStreamRequest { /** * Operator reason recorded on the dead-lettered head */ reason?: string; } export interface UnblockOutboundStreamResponse { /** * Whether a blocked head was skipped (false = no-op, stream was not blocked) */ unblocked: boolean; /** * Message id of the skipped head — present only when unblocked is true */ dead_lettered_id?: string; } export interface UpdateFileProxyUseCaseRequest { /** * Use case name */ name?: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Can only be set once on use cases that don't have a slug yet. Immutable after being set. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled?: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; /** * Use case type */ type?: "file_proxy"; configuration?: /** * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems. * * The file proxy download URL always requires `orgId`, `integrationId`, and either `useCaseSlug` (recommended) or `useCaseId` (legacy UUID) as query parameters. * The `orgId` is included in the signed URL to establish organization context without requiring authentication. * Additional use-case-specific parameters are declared in the `params` array. * */ FileProxyUseCaseConfiguration; } export interface UpdateInboundUseCaseRequest { /** * Use case name */ name?: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Can only be set once on use cases that don't have a slug yet. Immutable after being set. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled?: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; /** * Use case type */ type?: "inbound"; configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration; } export type UpdateIntegrationRequest = IntegrationEditableFields; export interface UpdateManagedCallUseCaseRequest { /** * Use case name */ name?: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Can only be set once on use cases that don't have a slug yet. Immutable after being set. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled?: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; /** * Use case type for managed API calls */ type?: "managed_call"; configuration?: /* Configuration for managed_call use cases. Defines a single API operation with JSONata mapping. */ ManagedCallOperationConfig; type_annotations?: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations; } export interface UpdateOutboundUseCaseRequest { /** * Use case name */ name?: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Can only be set once on use cases that don't have a slug yet. Immutable after being set. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled?: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; /** * Use case type */ type?: "outbound"; configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration; } export interface UpdateSecureProxyUseCaseRequest { /** * Use case name */ name?: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Can only be set once on use cases that don't have a slug yet. Immutable after being set. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled?: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; /** * Use case type */ type?: "secure_proxy"; configuration?: /** * Configuration for secure_proxy use cases. Defines how to route requests through a secure VPC. * */ SecureProxyUseCaseConfiguration; } export type UpdateUseCaseRequest = UpdateInboundUseCaseRequest | UpdateOutboundUseCaseRequest | UpdateFileProxyUseCaseRequest | UpdateManagedCallUseCaseRequest | UpdateSecureProxyUseCaseRequest; export interface UpdateUseCaseRequestBase { /** * Use case name */ name?: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Can only be set once on use cases that don't have a slug yet. Immutable after being set. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Whether the use case is enabled */ enabled?: boolean; /** * Optional description of this change (like a commit message) */ change_description?: string; } /** * Request to create or update an integration with embedded use cases (upsert). * This is a declarative operation - the request represents the desired state. * */ export interface UpsertIntegrationWithUseCasesRequest { /** * Integration name */ name: string; /** * Optional description of the integration */ description?: string; /** * List of access token IDs associated with this integration */ access_token_ids?: string[]; /** * List of app IDs associated with this integration */ app_ids?: string[]; /** * Configuration defining environment variables needed by this integration. Values are stored in the Environments API. */ environment_config?: EnvironmentFieldConfig[]; settings?: /* Settings for the integration */ IntegrationSettings; /** * Type of integration. "erp" is the ERP integration with inbound/outbound use cases. "connector" is for complex proxy integrations with external APIs. * */ integration_type?: "erp" | "connector"; connector_config?: /* Shared configuration for connector-type integrations */ ConnectorConfig; /** * If true, integration is displayed in read-only mode in the UI to discourage changes */ protected?: boolean; /** * The manifest IDs associated with this integration */ _manifest?: string[]; /** * Full list of use cases (declarative). This replaces ALL existing use cases. * - Use cases with an `id` field matching an existing use case will be updated * - Use cases without an `id` or with a non-matching `id` will be created * - Existing use cases not in this list will be deleted * */ use_cases?: EmbeddedUseCaseRequest[]; } export type UseCase = InboundUseCase | OutboundUseCase | FileProxyUseCase | ManagedCallUseCase | SecureProxyUseCase; export interface UseCaseBase { /** * Unique identifier for the use case */ id: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name */ name: string; /** * URL-safe identifier for the use case. Recommended for portable cross-environment referencing. Unique per integration. Immutable after creation. Lowercase alphanumeric, hyphens, and underscores only. * */ slug?: string; // ^[a-z0-9][a-z0-9_-]*$ /** * Use case type */ type: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy"; enabled: boolean; /** * Description of the last change made to this use case */ change_description?: string; /** * ISO-8601 timestamp when the use case was created */ created_at: string; // date-time /** * ISO-8601 timestamp when the use case was last updated */ updated_at: string; // date-time } export type UseCaseHistoryEntry = InboundUseCaseHistoryEntry | OutboundUseCaseHistoryEntry | FileProxyUseCaseHistoryEntry | ManagedCallUseCaseHistoryEntry | SecureProxyUseCaseHistoryEntry; export interface UseCaseHistoryEntryBase { /** * Unique identifier for this history entry */ id: string; // uuid /** * Reference to the parent use case */ useCaseId: string; // uuid /** * Parent integration ID */ integrationId: string; // uuid /** * Use case name at this point in history */ name: string; /** * Use case slug at this point in history */ slug?: string; /** * Whether the use case was enabled at this point in history */ enabled: boolean; /** * Description of the change that was made at this point in history */ change_description?: string; /** * User ID of the user who made the change that produced this history entry */ changed_by?: string; /** * ISO-8601 timestamp when the use case was originally created */ created_at: string; // date-time /** * ISO-8601 timestamp of this historical snapshot (before the update) */ updated_at: string; // date-time /** * ISO-8601 timestamp when this history entry was created */ history_created_at: string; // date-time } /** * Scaffolded type descriptors for a single use case */ export interface UseCaseTypePreview { slug: string; name?: string; request_shape: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor; response_shape: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor; existing_annotations?: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations; } /** * Push delivery of the transformed event to a webhook via svc-webhooks */ export interface WebhookDeliveryConfig { /** * Delivery mechanism type */ type: "webhook"; /** * Reference to the webhook configuration in svc-webhooks */ webhook_id: string; /** * Cached webhook name for display purposes */ webhook_name?: string; /** * Cached webhook URL for display purposes */ webhook_url?: string; } export interface WebhookStatus { /** * Unique identifier for the webhook */ webhookId: string; /** * Human-readable name of the webhook */ webhookName?: string; /** * Whether the webhook is enabled. Null if the API is unreachable. */ enabled?: boolean | null; } } } declare namespace Paths { namespace AckOutboundMessages { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.AckOutboundMessagesRequest; namespace Responses { export type $200 = Components.Schemas.AckOutboundMessagesResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace AcknowledgeTracking { export interface RequestBody { /** * Unique identifier of the ERP tracking record to acknowledge */ ack_id: string; } namespace Responses { export interface $200 { message?: string; } export interface $400 { } export interface $401 { } export interface $404 { } export interface $500 { } } } namespace CommitTypes { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.CommitTypesRequest; namespace Responses { export type $200 = Components.Schemas.CommitTypesResponse; export type $400 = Components.Responses.BadRequest; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace CreateIntegration { export type RequestBody = Components.Schemas.CreateIntegrationRequest; namespace Responses { export type $201 = Components.Schemas.Integration; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $500 = Components.Responses.InternalServerError; } } namespace CreateIntegrationV2 { export type RequestBody = /** * Request to create or update an integration with embedded use cases (upsert). * This is a declarative operation - the request represents the desired state. * */ Components.Schemas.UpsertIntegrationWithUseCasesRequest; namespace Responses { export type $201 = /* Integration with embedded use cases for atomic CRUD operations */ Components.Schemas.IntegrationWithUseCases; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $500 = Components.Responses.InternalServerError; } } namespace CreateUseCase { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.CreateUseCaseRequest; namespace Responses { export type $201 = Components.Schemas.UseCase; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace DeleteIntegration { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } namespace Responses { export interface $200 { message?: string; } export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace DeleteIntegrationAppMapping { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.DeleteIntegrationAppMappingRequest; namespace Responses { export interface $200 { message?: string; } export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace DeleteIntegrationV2 { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } namespace Responses { export interface $200 { message?: string; } export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace DeleteUseCase { namespace Parameters { export type IntegrationId = string; // uuid export type UseCaseId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; useCaseId: Parameters.UseCaseId /* uuid */; } namespace Responses { export interface $200 { message?: string; } export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace GenerateTypes { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.GenerateTypesRequest; namespace Responses { export type $200 = Components.Schemas.GenerateTypesResponse; export type $400 = Components.Responses.BadRequest; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace GenerateTypesPreview { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } namespace Responses { export type $200 = Components.Schemas.GenerateTypesPreviewResponse; export type $400 = Components.Responses.BadRequest; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace GetAssociatedMonitoringEvents { namespace Parameters { export type EventId = string; export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; eventId: Parameters.EventId; } namespace Responses { export type $200 = Components.Responses.GetAssociatedMonitoringEventsResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $500 = Components.Responses.InternalServerError; } } namespace GetIntegration { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } namespace Responses { export type $200 = Components.Schemas.Integration; export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace GetIntegrationV2 { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } namespace Responses { export type $200 = /* Integration with embedded use cases for atomic CRUD operations */ Components.Schemas.IntegrationWithUseCases; export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace GetMonitoringStats { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.GetMonitoringStatsRequest; namespace Responses { export type $200 = Components.Responses.GetMonitoringStatsResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace GetMonitoringStatsV2 { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.GetMonitoringStatsV2Request; namespace Responses { export type $200 = Components.Responses.GetMonitoringStatsV2Response; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace GetMonitoringTimeSeries { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.GetMonitoringTimeSeriesRequest; namespace Responses { export type $200 = Components.Responses.GetMonitoringTimeSeriesResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace GetMonitoringTimeSeriesV2 { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.GetMonitoringTimeSeriesV2Request; namespace Responses { export type $200 = Components.Responses.GetMonitoringTimeSeriesV2Response; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace GetNotificationStatus { namespace Parameters { export type Include = "baseline_series"; export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export interface QueryParameters { include?: Parameters.Include; } namespace Responses { export type $200 = Components.Schemas.NotificationStatusResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace GetOutboundStatus { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } namespace Responses { export type $200 = Components.Schemas.OutboundStatusResponse; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace GetSecureProxyWhitelist { namespace Parameters { export type IntegrationId = string; // uuid export type UseCaseId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; useCaseId: Parameters.UseCaseId /* uuid */; } namespace Responses { export type $200 = /** * Current whitelist state for a secure_proxy use case. vpc_mode is read-only * context so the UI can show the user what mode the pool is in. * */ Components.Schemas.SecureProxyWhitelist; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export interface $404 { } } } namespace GetUseCase { namespace Parameters { export type IntegrationId = string; // uuid export type UseCaseId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; useCaseId: Parameters.UseCaseId /* uuid */; } namespace Responses { export type $200 = Components.Schemas.UseCase; export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace ListIntegrations { namespace Responses { export interface $200 { integrations: Components.Schemas.Integration[]; } export type $401 = Components.Responses.Unauthorized; export type $500 = Components.Responses.InternalServerError; } } namespace ListIntegrationsV2 { namespace Responses { export interface $200 { integrations: /* Integration with embedded use cases for atomic CRUD operations */ Components.Schemas.IntegrationWithUseCases[]; } export type $401 = Components.Responses.Unauthorized; export type $500 = Components.Responses.InternalServerError; } } namespace ListNotificationHistory { namespace Parameters { export type Cursor = string; export type IntegrationId = string; // uuid export type Limit = number; export type Type = string; } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export interface QueryParameters { cursor?: Parameters.Cursor; limit?: Parameters.Limit; type?: Parameters.Type; } namespace Responses { export type $200 = Components.Schemas.NotificationHistoryResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace ListOutboundDlqMessages { namespace Parameters { export type IntegrationId = string; // uuid export type Limit = number; export type NextToken = string; } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export interface QueryParameters { limit?: Parameters.Limit; next_token?: Parameters.NextToken; } namespace Responses { export type $200 = Components.Schemas.OutboundDlqListResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace ListSecureProxies { namespace Responses { export interface $200 { secure_proxies: Components.Schemas.SecureProxySummary[]; } export type $401 = Components.Responses.Unauthorized; export type $500 = Components.Responses.InternalServerError; } } namespace ListSecureProxyWhitelistHistory { namespace Parameters { export type IntegrationId = string; // uuid export type Limit = number; export type UseCaseId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; useCaseId: Parameters.UseCaseId /* uuid */; } export interface QueryParameters { limit?: Parameters.Limit; } namespace Responses { export interface $200 { /** * Entries are `SecureProxyUseCaseHistoryEntry` in reverse * chronological order (newest first). Entries older than the * requested `limit` are not returned. * */ history: Components.Schemas.SecureProxyUseCaseHistoryEntry[]; } export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace ListUseCaseHistory { namespace Parameters { export type Cursor = string; export type IntegrationId = string; // uuid export type UseCaseId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; useCaseId: Parameters.UseCaseId /* uuid */; } export interface QueryParameters { cursor?: Parameters.Cursor; } namespace Responses { export interface $200 { /** * History entries in reverse chronological order (newest first) */ history: Components.Schemas.UseCaseHistoryEntry[]; /** * Opaque cursor for fetching the next page. Absent if no more pages. */ next_cursor?: string; } export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace ListUseCases { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } namespace Responses { export interface $200 { use_cases: Components.Schemas.UseCase[]; } export type $401 = Components.Responses.Unauthorized; export type $500 = Components.Responses.InternalServerError; } } namespace ManagedCallExecute { namespace Parameters { export type Slug = string; // ^[a-z0-9][a-z0-9_-]*$ } export interface PathParameters { slug: Parameters.Slug /* ^[a-z0-9][a-z0-9_-]*$ */; } export type RequestBody = Components.Schemas.ManagedCallExecuteRequest; namespace Responses { export type $200 = /** * The response from a managed call execution. * On success, returns the JSONata-mapped response data directly (no wrapper). * The shape is entirely defined by your response_mapping JSONata expression. * If no response_mapping is configured, returns the raw external API response. * Check the X-Inbound-Event-Id header for inbound pipeline tracking when inbound routing is configured. * */ Components.Schemas.ManagedCallExecuteResponse; export type $400 = Components.Schemas.ManagedCallErrorResponse; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; export type $502 = Components.Schemas.ManagedCallErrorResponse; } } namespace PollOutboundMessages { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.PollOutboundMessagesRequest; namespace Responses { export type $200 = Components.Schemas.PollOutboundMessagesResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace ProcessErpUpdatesEvents { export interface RequestBody { /** * UUID that identifies the specific integration app instance */ app_id: string; // uuid /** * UUID that identifies the specific integration app component instance */ component_id: string; // uuid /** * Metadata to be passed along with the events */ meta: { [name: string]: any; /** * ID that identifies the specific request for debugging purposes */ correlation_id?: string; }; /** * List of ERP events to process */ events: Components.Schemas.ErpEvent[]; } namespace Responses { export type $200 = Components.Responses.ERPUpdatesResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $500 = Components.Responses.InternalServerError; } } namespace ProcessErpUpdatesEventsV2 { export type RequestBody = Components.Schemas.ErpUpdatesEventsV2Request; namespace Responses { export type $200 = Components.Responses.ERPUpdatesResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $500 = Components.Responses.InternalServerError; } } namespace ProcessErpUpdatesEventsV3 { export type RequestBody = Components.Schemas.ErpUpdatesEventsV3Request; namespace Responses { export type $200 = Components.Responses.ERPUpdatesResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $500 = Components.Responses.InternalServerError; } } namespace QueryAccessLogs { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.QueryAccessLogsRequest; namespace Responses { export type $200 = Components.Responses.QueryAccessLogsResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace QueryEvents { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.QueryEventsRequest; namespace Responses { export type $200 = Components.Responses.QueryEventsResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace QueryInboundMonitoringEvents { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.QueryInboundMonitoringEventsRequest; namespace Responses { export type $200 = Components.Responses.QueryInboundMonitoringEventsResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace QueryMonitoringEventsV2 { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.QueryMonitoringEventsV2Request; namespace Responses { export type $200 = Components.Responses.QueryMonitoringEventsV2Response; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace QueryOutboundMonitoringEvents { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.QueryOutboundMonitoringEventsRequest; namespace Responses { export type $200 = Components.Responses.QueryOutboundMonitoringEventsResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace RedriveOutboundDlqMessages { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.RedriveOutboundDlqRequest; namespace Responses { export type $200 = Components.Schemas.RedriveOutboundDlqResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace ReplayEvents { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.ReplayEventsRequest; namespace Responses { export type $200 = Components.Responses.ReplayEventsResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace SecureProxy { export type RequestBody = Components.Schemas.SecureProxyRequest; namespace Responses { export type $200 = Components.Schemas.SecureProxyResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Schemas.ErrorResponseBase; export type $502 = /* Error payload returned when epilot could not obtain an HTTP response from the proxied target. The failure is epilot-generated (HTTP 502) but the cause is usually remote-side; `code`/`reason` make that attributable. */ Components.Schemas.SecureProxyUpstreamError; export type $503 = Components.Schemas.ErrorResponseBase; export type $504 = Components.Schemas.ErrorResponseBase; } } namespace SetIntegrationAppMapping { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.SetIntegrationAppMappingRequest; namespace Responses { export type $200 = Components.Schemas.IntegrationAppMapping; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $409 = Components.Schemas.ErrorResponseBase; export type $500 = Components.Responses.InternalServerError; } } namespace SimulateMapping { export type RequestBody = Components.Schemas.MappingSimulationRequest; namespace Responses { export type $200 = Components.Schemas.MappingSimulationResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $422 = Components.Schemas.ErrorResponseBase; export type $500 = Components.Responses.InternalServerError; } } namespace SimulateMappingV2 { export type RequestBody = /** * Request for v2 mapping simulation. Uses the same configuration format stored in integration use case resources, * making it easier to test configurations before saving them. * */ Components.Schemas.MappingSimulationV2Request; namespace Responses { export type $200 = Components.Schemas.MappingSimulationResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $422 = Components.Schemas.ErrorResponseBase; export type $500 = Components.Responses.InternalServerError; } } namespace TestSendNotification { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.TestNotificationRequest; namespace Responses { export type $202 = Components.Schemas.TestNotificationResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; export type $502 = Components.Schemas.TestNotificationResponse; } } namespace TriggerErp { export type RequestBody = Components.Schemas.TriggerErpActionRequest; namespace Responses { export type $200 = Components.Responses.TriggerWebhookResponse; export interface $400 { } export interface $401 { } export interface $500 { } } } namespace UnblockOutboundStream { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.UnblockOutboundStreamRequest; namespace Responses { export type $200 = Components.Schemas.UnblockOutboundStreamResponse; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export type $404 = Components.Responses.NotFound; export type $500 = Components.Responses.InternalServerError; } } namespace UpdateIntegration { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = Components.Schemas.UpdateIntegrationRequest; namespace Responses { export type $200 = Components.Schemas.Integration; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace UpdateIntegrationV2 { namespace Parameters { export type IntegrationId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; } export type RequestBody = /** * Request to create or update an integration with embedded use cases (upsert). * This is a declarative operation - the request represents the desired state. * */ Components.Schemas.UpsertIntegrationWithUseCasesRequest; namespace Responses { export type $200 = /* Integration with embedded use cases for atomic CRUD operations */ Components.Schemas.IntegrationWithUseCases; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } namespace UpdateSecureProxyWhitelist { namespace Parameters { export type IntegrationId = string; // uuid export type UseCaseId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; useCaseId: Parameters.UseCaseId /* uuid */; } export type RequestBody = /** * Partial update for a secure_proxy whitelist. At least one of * `allowed_domains` or `allowed_ips` must be provided. * * Per-field semantics: * - **omitted** — the field is not modified; the stored value is preserved. * - **non-empty array** — the stored value is replaced with the supplied list. * - **empty array (`[]`)** — the list is cleared (stored as `[]`). This is the * canonical way to remove all entries from a list. `null` is not accepted. * */ Components.Schemas.SecureProxyWhitelistUpdate; namespace Responses { export type $200 = /** * Current whitelist state for a secure_proxy use case. vpc_mode is read-only * context so the UI can show the user what mode the pool is in. * */ Components.Schemas.SecureProxyWhitelist; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export type $403 = Components.Responses.Forbidden; export interface $404 { } } } namespace UpdateUseCase { namespace Parameters { export type IntegrationId = string; // uuid export type UseCaseId = string; // uuid } export interface PathParameters { integrationId: Parameters.IntegrationId /* uuid */; useCaseId: Parameters.UseCaseId /* uuid */; } export type RequestBody = Components.Schemas.UpdateUseCaseRequest; namespace Responses { export type $200 = Components.Schemas.UseCase; export type $400 = Components.Responses.BadRequest; export type $401 = Components.Responses.Unauthorized; export interface $404 { } export type $500 = Components.Responses.InternalServerError; } } } interface OperationMethods { /** * acknowledgeTracking - acknowledgeTracking * * Acknowledges an ERP tracking record by removing it from the tracking table, requires public authentication */ 'acknowledgeTracking'( parameters?: Parameters | null, data?: Paths.AcknowledgeTracking.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * triggerErp - triggerErp * * Triggers the ERP integration process */ 'triggerErp'( parameters?: Parameters | null, data?: Paths.TriggerErp.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * processErpUpdatesEvents - processErpUpdatesEvents * * Handles updates from ERP systems and tracks them appropriately */ 'processErpUpdatesEvents'( parameters?: Parameters | null, data?: Paths.ProcessErpUpdatesEvents.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * processErpUpdatesEventsV2 - processErpUpdatesEventsV2 * * Handles updates from ERP systems using integration_id directly. * This is the v2 version that simplifies the API by accepting integration_id * instead of app_id and component_id. * */ 'processErpUpdatesEventsV2'( parameters?: Parameters | null, data?: Paths.ProcessErpUpdatesEventsV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * processErpUpdatesEventsV3 - processErpUpdatesEventsV3 * * Handles updates from ERP systems using integration_id directly. * This is the v3 version that removes the unused event_type field and renames object_type to event_name * to align with the integration UI naming. * */ 'processErpUpdatesEventsV3'( parameters?: Parameters | null, data?: Paths.ProcessErpUpdatesEventsV3.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * simulateMappingV2 - simulateMappingV2 * * Test v2.0 mapping configuration by transforming a payload using the provided mapping rules without persisting data. * * This endpoint accepts the same configuration format that is stored in the integration use case resource, * making it easier to test configurations before saving them to a use case. * * See documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification. * */ 'simulateMappingV2'( parameters?: Parameters | null, data?: Paths.SimulateMappingV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * simulateMapping - simulateMapping * * Test mapping configuration by transforming a payload using the provided mapping rules without persisting data. * * Supports both v1.0 (object-based) and v2.0 (event-based) mapping formats. * See documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification. * */ 'simulateMapping'( parameters?: Parameters | null, data?: Paths.SimulateMapping.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * listIntegrations - listIntegrations * * Retrieve all integrations for the authenticated organization */ 'listIntegrations'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createIntegration - createIntegration * * Create a new integration configuration */ 'createIntegration'( parameters?: Parameters | null, data?: Paths.CreateIntegration.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getIntegration - getIntegration * * Retrieve a specific integration by its ID */ 'getIntegration'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateIntegration - updateIntegration * * Update an existing integration configuration */ 'updateIntegration'( parameters?: Parameters | null, data?: Paths.UpdateIntegration.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteIntegration - deleteIntegration * * Delete an integration and all its use cases */ 'deleteIntegration'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * queryEvents - queryEvents * * Query events for a specific integration */ 'queryEvents'( parameters?: Parameters | null, data?: Paths.QueryEvents.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * replayEvents - replayEvents * * Replay one or more events for a specific integration. Events will be re-processed with their original payloads but with a new correlation ID for traceability. */ 'replayEvents'( parameters?: Parameters | null, data?: Paths.ReplayEvents.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * listUseCases - listUseCases * * Retrieve all use cases for a specific integration */ 'listUseCases'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createUseCase - createUseCase * * Create a new use case for an integration */ 'createUseCase'( parameters?: Parameters | null, data?: Paths.CreateUseCase.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getUseCase - getUseCase * * Retrieve a specific use case by its ID */ 'getUseCase'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateUseCase - updateUseCase * * Update an existing use case configuration */ 'updateUseCase'( parameters?: Parameters | null, data?: Paths.UpdateUseCase.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteUseCase - deleteUseCase * * Delete a use case from an integration */ 'deleteUseCase'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * listUseCaseHistory - listUseCaseHistory * * Retrieve historical versions of a use case's configuration. * History entries are returned in reverse chronological order (newest first). * Use the 'cursor' parameter for pagination to fetch additional entries. * */ 'listUseCaseHistory'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * listIntegrationsV2 - listIntegrationsV2 * * Retrieve all integrations with embedded use cases for the authenticated organization */ 'listIntegrationsV2'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createIntegrationV2 - createIntegrationV2 * * Create a new integration with embedded use cases. * */ 'createIntegrationV2'( parameters?: Parameters | null, data?: Paths.CreateIntegrationV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getIntegrationV2 - getIntegrationV2 * * Retrieve a specific integration with all its embedded use cases */ 'getIntegrationV2'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateIntegrationV2 - updateIntegrationV2 * * Update an existing integration with embedded use cases. * The integration must already exist. * Use cases are updated declaratively: * - Use cases in the request with matching IDs are updated * - Use cases in the request without matching IDs are created * - Existing use cases not in the request are deleted * */ 'updateIntegrationV2'( parameters?: Parameters | null, data?: Paths.UpdateIntegrationV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteIntegrationV2 - deleteIntegrationV2 * * Delete an integration and all its use cases */ 'deleteIntegrationV2'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * listNotificationHistory - listNotificationHistory * * Returns the cursor-paginated, newest-first notification history for an * integration (every real notification decision — both fired and suppressed). * Requires the `integration:view` permission on the integration's organization. * */ 'listNotificationHistory'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * testSendNotification - testSendNotification * * Renders and sends ONE representative notification of the requested kind/type to * the CALLING USER ONLY (never any other recipient), so an operator can preview how * a notification looks. A test send does NOT write to the notification history. * Requires the `integration:manage` permission on the integration's organization. * */ 'testSendNotification'( parameters?: Parameters | null, data?: Paths.TestSendNotification.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getNotificationStatus - getNotificationStatus * * Returns the live per-rule alert state and (for 'auto' rules) the current * hour-of-week baseline band for an integration's notification monitoring. * Reflects the latest 5-minute sweep — near-real-time, not live. * Requires the `integration:view` permission on the integration's organization. * */ 'getNotificationStatus'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * getSecureProxyWhitelist - Get secure_proxy whitelist (admin portal only) * * Returns the current allowed_domains, allowed_ips, and vpc_mode for a secure_proxy use case. * Staff-only — gated by internal-auth issuer AND admin-portal Cognito user pool membership. * Rejects Login-As tokens. * */ 'getSecureProxyWhitelist'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateSecureProxyWhitelist - Update secure_proxy whitelist (admin portal only) * * Replaces allowed_domains and/or allowed_ips on a secure_proxy use case. * At least one of the two fields is required. Validation mirrors the CLI's * `validateDomainPatterns` / `validateCidrs`. Writes a USECASE_HISTORY row * with the admin user's email as `changed_by`. * * Update semantics per field: * - **omitted** — field is not modified; the stored value is preserved. * - **non-empty array** — the stored value is replaced with the supplied list. * - **empty array (`[]`)** — the list is cleared (stored as `[]`). This is * the canonical way to remove all entries. `null` is not accepted. * * Staff-only — same auth gates as GET. * */ 'updateSecureProxyWhitelist'( parameters?: Parameters | null, data?: Paths.UpdateSecureProxyWhitelist.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * listSecureProxyWhitelistHistory - List secure_proxy whitelist change history (admin portal only) * * Returns the most recent USECASE_HISTORY entries for a secure_proxy use case, * in reverse chronological order (newest first). Each entry includes the * actor email (`changed_by`), the ISO-8601 timestamp (`history_created_at`), * the `change_description` (free-text action), and the full `configuration` * snapshot — from which UI-08 computes a before/after diff between consecutive * entries. * * Staff-only — gated by internal-auth issuer AND admin-portal Cognito user pool * membership. Rejects Login-As tokens (same auth gate as the GET / PUT * secure-proxy-whitelist operations). * * Thin wrapper over the service-layer `listUseCaseHistory` that powers * `GET /v1/integrations/{integrationId}/use-cases/{useCaseId}/history` — the * separate path exists because the /v1 variant is tenant-gated and admin-portal * internal-auth tokens do not carry tenant permissions. * */ 'listSecureProxyWhitelistHistory'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * setIntegrationAppMapping - setIntegrationAppMapping * * Creates or updates a mapping from an app/component to an integration. * This allows ERP updates sent via app_id and component_id to be associated * with a specific integration configuration. * */ 'setIntegrationAppMapping'( parameters?: Parameters | null, data?: Paths.SetIntegrationAppMapping.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteIntegrationAppMapping - deleteIntegrationAppMapping * * Removes a mapping from an app/component to an integration. * */ 'deleteIntegrationAppMapping'( parameters?: Parameters | null, data?: Paths.DeleteIntegrationAppMapping.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * queryInboundMonitoringEvents - queryInboundMonitoringEvents * * Query inbound monitoring events for a specific integration. * Returns detailed information about inbound sync events from ERP systems, * including success rates, error breakdowns, and processing metrics. * */ 'queryInboundMonitoringEvents'( parameters?: Parameters | null, data?: Paths.QueryInboundMonitoringEvents.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getMonitoringStats - getMonitoringStats * * Get aggregated statistics for both inbound and outbound monitoring events for a specific integration. * Returns summary metrics for inbound (ERP sync) and outbound (webhook delivery) events, * including success/error counts and optional breakdowns. * */ 'getMonitoringStats'( parameters?: Parameters | null, data?: Paths.GetMonitoringStats.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getMonitoringTimeSeries - getMonitoringTimeSeries * * Get time-series aggregated event counts for monitoring charts. * Returns pre-bucketed counts at configurable intervals for both inbound and outbound events. * Maximum of 200 buckets per request. Returns 400 if the time range and interval would exceed this limit. * */ 'getMonitoringTimeSeries'( parameters?: Parameters | null, data?: Paths.GetMonitoringTimeSeries.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getOutboundStatus - getOutboundStatus * * Get the status of all outbound use cases for a specific integration. * Returns conflict information when events or webhooks are disabled but the use case is enabled. * */ 'getOutboundStatus'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * pollOutboundMessages - pollOutboundMessages * * Poll outbound messages for an integration's poll-mode use cases. * Takes a lease on the head-of-line batch of the integration's FIFO stream: * the returned messages stay invisible to subsequent polls until they are * acknowledged or the visibility timeout elapses. POST because taking a * lease mutates server state — auto-retrying middleware must not burn * leases. One in-flight batch per stream: while a lease is active (or * another poll wins the race), the response is an empty batch * (`messages: []`), not an error. Requires the `integration:consume` grant. * */ 'pollOutboundMessages'( parameters?: Parameters | null, data?: Paths.PollOutboundMessages.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * ackOutboundMessages - ackOutboundMessages * * Acknowledge polled outbound messages. Acks are validated against the * active lease and committed as a prefix-contiguous cursor advance: * messages must be acknowledged in stream order. Out-of-order acks past * the first gap are rejected per id (`out_of_order`), acks with an * outdated lease token are rejected (`stale_lease`), and unknown ids are * rejected (`not_found`). Acknowledged messages are never delivered * again. Requires the `integration:consume` grant. * */ 'ackOutboundMessages'( parameters?: Parameters | null, data?: Paths.AckOutboundMessages.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * listOutboundDlqMessages - listOutboundDlqMessages * * List an integration's dead-lettered outbound queue messages * (poison_policy enforcement and operator skips move messages here). * Operator endpoint — requires the `integration:manage` grant. Message * payloads are NOT included in listings: entries are keyed by the * opaque message id and carry delivery metadata only. Paginated via an * opaque `next_token`. * */ 'listOutboundDlqMessages'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * redriveOutboundDlqMessages - redriveOutboundDlqMessages * * Redrive selected dead-lettered messages back into the live stream. * Operator endpoint — requires the `integration:manage` grant. * A redriven message is re-enqueued at the tail with a new id and * sequence — it is delivered out of its original per-entity order (the * stream has moved on); this is inherent to redrive and matches SQS DLQ * semantics. The redriven copy starts with zero delivery attempts and a * fresh retention window; the original DLQ entry is removed. Per-id * results report `redriven` or `not_found` (unknown ids, or entries * concurrently redriven/expired). * */ 'redriveOutboundDlqMessages'( parameters?: Parameters | null, data?: Paths.RedriveOutboundDlqMessages.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * unblockOutboundStream - unblockOutboundStream * * Unblock an integration's outbound stream halted by the `block` * poison policy: skips (dead-letters) the current blocked head message, * emitting MSG_DEAD_LETTERED and letting the next message become the * head. Operator endpoint — requires the `integration:manage` grant. * Returns `unblocked: false` as a no-op when the stream is not * currently blocked (or the state moved concurrently) — safe to retry. * */ 'unblockOutboundStream'( parameters?: Parameters | null, data?: Paths.UnblockOutboundStream.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * queryAccessLogs - queryAccessLogs * * Query API access logs for a specific integration's organization. * Returns access token usage analytics filtered by user_id (access token). * Supports infinite scroll pagination with cursor-based navigation. * */ 'queryAccessLogs'( parameters?: Parameters | null, data?: Paths.QueryAccessLogs.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * queryOutboundMonitoringEvents - queryOutboundMonitoringEvents * * Query outbound monitoring events for a specific integration. * Returns detailed information about outbound event deliveries, * filtered by event_name (event_catalog_event) linked to the integration's outbound use cases. * */ 'queryOutboundMonitoringEvents'( parameters?: Parameters | null, data?: Paths.QueryOutboundMonitoringEvents.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * queryMonitoringEventsV2 - queryMonitoringEventsV2 * * Query monitoring events from the unified erp_monitoring_v2 table. * Returns all event types (inbound, outbound, file_proxy, etc.) in a single list. * Replaces the separate v1 inbound-events and outbound-events endpoints. * */ 'queryMonitoringEventsV2'( parameters?: Parameters | null, data?: Paths.QueryMonitoringEventsV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getMonitoringStatsV2 - getMonitoringStatsV2 * * Get aggregated statistics from the unified erp_monitoring_v2 table. * Returns combined metrics for all event types with optional breakdowns. * */ 'getMonitoringStatsV2'( parameters?: Parameters | null, data?: Paths.GetMonitoringStatsV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getMonitoringTimeSeriesV2 - getMonitoringTimeSeriesV2 * * Get time-series aggregated event counts from the unified erp_monitoring_v2 table. * Returns bucketed counts for chart rendering. * */ 'getMonitoringTimeSeriesV2'( parameters?: Parameters | null, data?: Paths.GetMonitoringTimeSeriesV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * getAssociatedMonitoringEvents - getAssociatedMonitoringEvents * * Returns all monitoring events sharing the same event_id, ordered chronologically. * Also includes the original inbound event payload from erp_incoming_events if available. * Used to display a full event trace/timeline. * */ 'getAssociatedMonitoringEvents'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * listSecureProxies - List all secure proxy use cases * * Lists all secure_proxy use cases across all integrations for the authenticated organization. * Returns minimal data suitable for dropdowns and selection UIs. * */ 'listSecureProxies'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * secureProxy - Proxy HTTP request through secure VPC * * Routes an HTTP request through a VPC with either static IP egress or VPN secure link access. * The VPC mode is determined by the referenced secure_proxy use case configuration. * For secure_link mode, the target URL must match the use case's allowed_domains whitelist. * */ 'secureProxy'( parameters?: Parameters | null, data?: Paths.SecureProxy.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * managedCallExecute - Execute a managed call operation * * Execute a managed call operation synchronously. The slug in the path acts as the RPC method name. * Calls an external partner API with JSONata mapping on both request and response. * */ 'managedCallExecute'( parameters?: Parameters | null, data?: Paths.ManagedCallExecute.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * generateTypesPreview - Preview scaffolded types for a connector integration * * Analyses the JSONata mappings of all managed-call use cases in the integration and returns scaffolded type descriptors. The frontend uses these to show the type editor modal where developers fill in leaf types. * */ 'generateTypesPreview'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * generateTypes - Generate a TypeScript npm package for a connector integration * * Generates a complete TypeScript npm package with typed interfaces for all managed-call use cases. This is a stateless operation that does not persist any changes. Use the commit-types endpoint to lock configurations after review. * */ 'generateTypes'( parameters?: Parameters | null, data?: Paths.GenerateTypes.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * commitTypes - Commit generated types and lock use case configurations * * Commits the generated types by locking use case configurations and updating version tracking. Should be called after the user reviews and downloads the generated package. * */ 'commitTypes'( parameters?: Parameters | null, data?: Paths.CommitTypes.RequestBody, config?: AxiosRequestConfig ): OperationResponse } interface PathsDictionary { ['/v1/erp/tracking/acknowledgement']: { /** * acknowledgeTracking - acknowledgeTracking * * Acknowledges an ERP tracking record by removing it from the tracking table, requires public authentication */ 'post'( parameters?: Parameters | null, data?: Paths.AcknowledgeTracking.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/erp/trigger']: { /** * triggerErp - triggerErp * * Triggers the ERP integration process */ 'post'( parameters?: Parameters | null, data?: Paths.TriggerErp.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/erp/updates/events']: { /** * processErpUpdatesEvents - processErpUpdatesEvents * * Handles updates from ERP systems and tracks them appropriately */ 'post'( parameters?: Parameters | null, data?: Paths.ProcessErpUpdatesEvents.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/erp/updates/events']: { /** * processErpUpdatesEventsV2 - processErpUpdatesEventsV2 * * Handles updates from ERP systems using integration_id directly. * This is the v2 version that simplifies the API by accepting integration_id * instead of app_id and component_id. * */ 'post'( parameters?: Parameters | null, data?: Paths.ProcessErpUpdatesEventsV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v3/erp/updates/events']: { /** * processErpUpdatesEventsV3 - processErpUpdatesEventsV3 * * Handles updates from ERP systems using integration_id directly. * This is the v3 version that removes the unused event_type field and renames object_type to event_name * to align with the integration UI naming. * */ 'post'( parameters?: Parameters | null, data?: Paths.ProcessErpUpdatesEventsV3.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/erp/updates/mapping_simulation']: { /** * simulateMappingV2 - simulateMappingV2 * * Test v2.0 mapping configuration by transforming a payload using the provided mapping rules without persisting data. * * This endpoint accepts the same configuration format that is stored in the integration use case resource, * making it easier to test configurations before saving them to a use case. * * See documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification. * */ 'post'( parameters?: Parameters | null, data?: Paths.SimulateMappingV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/erp/updates/mapping_simulation']: { /** * simulateMapping - simulateMapping * * Test mapping configuration by transforming a payload using the provided mapping rules without persisting data. * * Supports both v1.0 (object-based) and v2.0 (event-based) mapping formats. * See documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification. * */ 'post'( parameters?: Parameters | null, data?: Paths.SimulateMapping.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations']: { /** * listIntegrations - listIntegrations * * Retrieve all integrations for the authenticated organization */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createIntegration - createIntegration * * Create a new integration configuration */ 'post'( parameters?: Parameters | null, data?: Paths.CreateIntegration.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}']: { /** * getIntegration - getIntegration * * Retrieve a specific integration by its ID */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateIntegration - updateIntegration * * Update an existing integration configuration */ 'put'( parameters?: Parameters | null, data?: Paths.UpdateIntegration.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteIntegration - deleteIntegration * * Delete an integration and all its use cases */ 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/events']: { /** * queryEvents - queryEvents * * Query events for a specific integration */ 'post'( parameters?: Parameters | null, data?: Paths.QueryEvents.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/events/replay']: { /** * replayEvents - replayEvents * * Replay one or more events for a specific integration. Events will be re-processed with their original payloads but with a new correlation ID for traceability. */ 'post'( parameters?: Parameters | null, data?: Paths.ReplayEvents.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/use-cases']: { /** * listUseCases - listUseCases * * Retrieve all use cases for a specific integration */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createUseCase - createUseCase * * Create a new use case for an integration */ 'post'( parameters?: Parameters | null, data?: Paths.CreateUseCase.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/use-cases/{useCaseId}']: { /** * getUseCase - getUseCase * * Retrieve a specific use case by its ID */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateUseCase - updateUseCase * * Update an existing use case configuration */ 'put'( parameters?: Parameters | null, data?: Paths.UpdateUseCase.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteUseCase - deleteUseCase * * Delete a use case from an integration */ 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/use-cases/{useCaseId}/history']: { /** * listUseCaseHistory - listUseCaseHistory * * Retrieve historical versions of a use case's configuration. * History entries are returned in reverse chronological order (newest first). * Use the 'cursor' parameter for pagination to fetch additional entries. * */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations']: { /** * listIntegrationsV2 - listIntegrationsV2 * * Retrieve all integrations with embedded use cases for the authenticated organization */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * createIntegrationV2 - createIntegrationV2 * * Create a new integration with embedded use cases. * */ 'post'( parameters?: Parameters | null, data?: Paths.CreateIntegrationV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations/{integrationId}']: { /** * getIntegrationV2 - getIntegrationV2 * * Retrieve a specific integration with all its embedded use cases */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateIntegrationV2 - updateIntegrationV2 * * Update an existing integration with embedded use cases. * The integration must already exist. * Use cases are updated declaratively: * - Use cases in the request with matching IDs are updated * - Use cases in the request without matching IDs are created * - Existing use cases not in the request are deleted * */ 'put'( parameters?: Parameters | null, data?: Paths.UpdateIntegrationV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteIntegrationV2 - deleteIntegrationV2 * * Delete an integration and all its use cases */ 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations/{integrationId}/notifications/history']: { /** * listNotificationHistory - listNotificationHistory * * Returns the cursor-paginated, newest-first notification history for an * integration (every real notification decision — both fired and suppressed). * Requires the `integration:view` permission on the integration's organization. * */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations/{integrationId}/notifications/test']: { /** * testSendNotification - testSendNotification * * Renders and sends ONE representative notification of the requested kind/type to * the CALLING USER ONLY (never any other recipient), so an operator can preview how * a notification looks. A test send does NOT write to the notification history. * Requires the `integration:manage` permission on the integration's organization. * */ 'post'( parameters?: Parameters | null, data?: Paths.TestSendNotification.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations/{integrationId}/notifications/status']: { /** * getNotificationStatus - getNotificationStatus * * Returns the live per-rule alert state and (for 'auto' rules) the current * hour-of-week baseline band for an integration's notification monitoring. * Reflects the latest 5-minute sweep — near-real-time, not live. * Requires the `integration:view` permission on the integration's organization. * */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations/{integrationId}/use-cases/{useCaseId}/secure-proxy-whitelist']: { /** * getSecureProxyWhitelist - Get secure_proxy whitelist (admin portal only) * * Returns the current allowed_domains, allowed_ips, and vpc_mode for a secure_proxy use case. * Staff-only — gated by internal-auth issuer AND admin-portal Cognito user pool membership. * Rejects Login-As tokens. * */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse /** * updateSecureProxyWhitelist - Update secure_proxy whitelist (admin portal only) * * Replaces allowed_domains and/or allowed_ips on a secure_proxy use case. * At least one of the two fields is required. Validation mirrors the CLI's * `validateDomainPatterns` / `validateCidrs`. Writes a USECASE_HISTORY row * with the admin user's email as `changed_by`. * * Update semantics per field: * - **omitted** — field is not modified; the stored value is preserved. * - **non-empty array** — the stored value is replaced with the supplied list. * - **empty array (`[]`)** — the list is cleared (stored as `[]`). This is * the canonical way to remove all entries. `null` is not accepted. * * Staff-only — same auth gates as GET. * */ 'put'( parameters?: Parameters | null, data?: Paths.UpdateSecureProxyWhitelist.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations/{integrationId}/use-cases/{useCaseId}/secure-proxy-whitelist/history']: { /** * listSecureProxyWhitelistHistory - List secure_proxy whitelist change history (admin portal only) * * Returns the most recent USECASE_HISTORY entries for a secure_proxy use case, * in reverse chronological order (newest first). Each entry includes the * actor email (`changed_by`), the ISO-8601 timestamp (`history_created_at`), * the `change_description` (free-text action), and the full `configuration` * snapshot — from which UI-08 computes a before/after diff between consecutive * entries. * * Staff-only — gated by internal-auth issuer AND admin-portal Cognito user pool * membership. Rejects Login-As tokens (same auth gate as the GET / PUT * secure-proxy-whitelist operations). * * Thin wrapper over the service-layer `listUseCaseHistory` that powers * `GET /v1/integrations/{integrationId}/use-cases/{useCaseId}/history` — the * separate path exists because the /v1 variant is tenant-gated and admin-portal * internal-auth tokens do not carry tenant permissions. * */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/app-mapping']: { /** * setIntegrationAppMapping - setIntegrationAppMapping * * Creates or updates a mapping from an app/component to an integration. * This allows ERP updates sent via app_id and component_id to be associated * with a specific integration configuration. * */ 'put'( parameters?: Parameters | null, data?: Paths.SetIntegrationAppMapping.RequestBody, config?: AxiosRequestConfig ): OperationResponse /** * deleteIntegrationAppMapping - deleteIntegrationAppMapping * * Removes a mapping from an app/component to an integration. * */ 'delete'( parameters?: Parameters | null, data?: Paths.DeleteIntegrationAppMapping.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/monitoring/inbound-events']: { /** * queryInboundMonitoringEvents - queryInboundMonitoringEvents * * Query inbound monitoring events for a specific integration. * Returns detailed information about inbound sync events from ERP systems, * including success rates, error breakdowns, and processing metrics. * */ 'post'( parameters?: Parameters | null, data?: Paths.QueryInboundMonitoringEvents.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/monitoring/stats']: { /** * getMonitoringStats - getMonitoringStats * * Get aggregated statistics for both inbound and outbound monitoring events for a specific integration. * Returns summary metrics for inbound (ERP sync) and outbound (webhook delivery) events, * including success/error counts and optional breakdowns. * */ 'post'( parameters?: Parameters | null, data?: Paths.GetMonitoringStats.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/monitoring/timeseries']: { /** * getMonitoringTimeSeries - getMonitoringTimeSeries * * Get time-series aggregated event counts for monitoring charts. * Returns pre-bucketed counts at configurable intervals for both inbound and outbound events. * Maximum of 200 buckets per request. Returns 400 if the time range and interval would exceed this limit. * */ 'post'( parameters?: Parameters | null, data?: Paths.GetMonitoringTimeSeries.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/outbound-status']: { /** * getOutboundStatus - getOutboundStatus * * Get the status of all outbound use cases for a specific integration. * Returns conflict information when events or webhooks are disabled but the use case is enabled. * */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/outbound/messages/poll']: { /** * pollOutboundMessages - pollOutboundMessages * * Poll outbound messages for an integration's poll-mode use cases. * Takes a lease on the head-of-line batch of the integration's FIFO stream: * the returned messages stay invisible to subsequent polls until they are * acknowledged or the visibility timeout elapses. POST because taking a * lease mutates server state — auto-retrying middleware must not burn * leases. One in-flight batch per stream: while a lease is active (or * another poll wins the race), the response is an empty batch * (`messages: []`), not an error. Requires the `integration:consume` grant. * */ 'post'( parameters?: Parameters | null, data?: Paths.PollOutboundMessages.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/outbound/messages/ack']: { /** * ackOutboundMessages - ackOutboundMessages * * Acknowledge polled outbound messages. Acks are validated against the * active lease and committed as a prefix-contiguous cursor advance: * messages must be acknowledged in stream order. Out-of-order acks past * the first gap are rejected per id (`out_of_order`), acks with an * outdated lease token are rejected (`stale_lease`), and unknown ids are * rejected (`not_found`). Acknowledged messages are never delivered * again. Requires the `integration:consume` grant. * */ 'post'( parameters?: Parameters | null, data?: Paths.AckOutboundMessages.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/outbound/messages/dlq']: { /** * listOutboundDlqMessages - listOutboundDlqMessages * * List an integration's dead-lettered outbound queue messages * (poison_policy enforcement and operator skips move messages here). * Operator endpoint — requires the `integration:manage` grant. Message * payloads are NOT included in listings: entries are keyed by the * opaque message id and carry delivery metadata only. Paginated via an * opaque `next_token`. * */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/outbound/messages/dlq/redrive']: { /** * redriveOutboundDlqMessages - redriveOutboundDlqMessages * * Redrive selected dead-lettered messages back into the live stream. * Operator endpoint — requires the `integration:manage` grant. * A redriven message is re-enqueued at the tail with a new id and * sequence — it is delivered out of its original per-entity order (the * stream has moved on); this is inherent to redrive and matches SQS DLQ * semantics. The redriven copy starts with zero delivery attempts and a * fresh retention window; the original DLQ entry is removed. Per-id * results report `redriven` or `not_found` (unknown ids, or entries * concurrently redriven/expired). * */ 'post'( parameters?: Parameters | null, data?: Paths.RedriveOutboundDlqMessages.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/outbound/messages/unblock']: { /** * unblockOutboundStream - unblockOutboundStream * * Unblock an integration's outbound stream halted by the `block` * poison policy: skips (dead-letters) the current blocked head message, * emitting MSG_DEAD_LETTERED and letting the next message become the * head. Operator endpoint — requires the `integration:manage` grant. * Returns `unblocked: false` as a no-op when the stream is not * currently blocked (or the state moved concurrently) — safe to retry. * */ 'post'( parameters?: Parameters | null, data?: Paths.UnblockOutboundStream.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/monitoring/access-logs']: { /** * queryAccessLogs - queryAccessLogs * * Query API access logs for a specific integration's organization. * Returns access token usage analytics filtered by user_id (access token). * Supports infinite scroll pagination with cursor-based navigation. * */ 'post'( parameters?: Parameters | null, data?: Paths.QueryAccessLogs.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/monitoring/outbound-events']: { /** * queryOutboundMonitoringEvents - queryOutboundMonitoringEvents * * Query outbound monitoring events for a specific integration. * Returns detailed information about outbound event deliveries, * filtered by event_name (event_catalog_event) linked to the integration's outbound use cases. * */ 'post'( parameters?: Parameters | null, data?: Paths.QueryOutboundMonitoringEvents.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations/{integrationId}/monitoring/events']: { /** * queryMonitoringEventsV2 - queryMonitoringEventsV2 * * Query monitoring events from the unified erp_monitoring_v2 table. * Returns all event types (inbound, outbound, file_proxy, etc.) in a single list. * Replaces the separate v1 inbound-events and outbound-events endpoints. * */ 'post'( parameters?: Parameters | null, data?: Paths.QueryMonitoringEventsV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations/{integrationId}/monitoring/stats']: { /** * getMonitoringStatsV2 - getMonitoringStatsV2 * * Get aggregated statistics from the unified erp_monitoring_v2 table. * Returns combined metrics for all event types with optional breakdowns. * */ 'post'( parameters?: Parameters | null, data?: Paths.GetMonitoringStatsV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations/{integrationId}/monitoring/time-series']: { /** * getMonitoringTimeSeriesV2 - getMonitoringTimeSeriesV2 * * Get time-series aggregated event counts from the unified erp_monitoring_v2 table. * Returns bucketed counts for chart rendering. * */ 'post'( parameters?: Parameters | null, data?: Paths.GetMonitoringTimeSeriesV2.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v2/integrations/{integrationId}/monitoring/events/{eventId}/associated']: { /** * getAssociatedMonitoringEvents - getAssociatedMonitoringEvents * * Returns all monitoring events sharing the same event_id, ordered chronologically. * Also includes the original inbound event payload from erp_incoming_events if available. * Used to display a full event trace/timeline. * */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/secure-proxies']: { /** * listSecureProxies - List all secure proxy use cases * * Lists all secure_proxy use cases across all integrations for the authenticated organization. * Returns minimal data suitable for dropdowns and selection UIs. * */ 'get'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/secure-proxy']: { /** * secureProxy - Proxy HTTP request through secure VPC * * Routes an HTTP request through a VPC with either static IP egress or VPN secure link access. * The VPC mode is determined by the referenced secure_proxy use case configuration. * For secure_link mode, the target URL must match the use case's allowed_domains whitelist. * */ 'post'( parameters?: Parameters | null, data?: Paths.SecureProxy.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/managed-call/{slug}/execute']: { /** * managedCallExecute - Execute a managed call operation * * Execute a managed call operation synchronously. The slug in the path acts as the RPC method name. * Calls an external partner API with JSONata mapping on both request and response. * */ 'post'( parameters?: Parameters | null, data?: Paths.ManagedCallExecute.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/generate-types-preview']: { /** * generateTypesPreview - Preview scaffolded types for a connector integration * * Analyses the JSONata mappings of all managed-call use cases in the integration and returns scaffolded type descriptors. The frontend uses these to show the type editor modal where developers fill in leaf types. * */ 'post'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/generate-types']: { /** * generateTypes - Generate a TypeScript npm package for a connector integration * * Generates a complete TypeScript npm package with typed interfaces for all managed-call use cases. This is a stateless operation that does not persist any changes. Use the commit-types endpoint to lock configurations after review. * */ 'post'( parameters?: Parameters | null, data?: Paths.GenerateTypes.RequestBody, config?: AxiosRequestConfig ): OperationResponse } ['/v1/integrations/{integrationId}/commit-types']: { /** * commitTypes - Commit generated types and lock use case configurations * * Commits the generated types by locking use case configurations and updating version tracking. Should be called after the user reviews and downloads the generated package. * */ 'post'( parameters?: Parameters | null, data?: Paths.CommitTypes.RequestBody, config?: AxiosRequestConfig ): OperationResponse } } type Client = OpenAPIClient type AccessLogEntry = Components.Schemas.AccessLogEntry; type AckOutboundMessagesRequest = Components.Schemas.AckOutboundMessagesRequest; type AckOutboundMessagesResponse = Components.Schemas.AckOutboundMessagesResponse; type AckResult = Components.Schemas.AckResult; type AutoRefreshSettings = Components.Schemas.AutoRefreshSettings; type CommitTypesRequest = Components.Schemas.CommitTypesRequest; type CommitTypesResponse = Components.Schemas.CommitTypesResponse; type ConnectorConfig = Components.Schemas.ConnectorConfig; type CreateFileProxyUseCaseRequest = Components.Schemas.CreateFileProxyUseCaseRequest; type CreateInboundUseCaseRequest = Components.Schemas.CreateInboundUseCaseRequest; type CreateIntegrationRequest = Components.Schemas.CreateIntegrationRequest; type CreateManagedCallUseCaseRequest = Components.Schemas.CreateManagedCallUseCaseRequest; type CreateOutboundUseCaseRequest = Components.Schemas.CreateOutboundUseCaseRequest; type CreateSecureProxyUseCaseRequest = Components.Schemas.CreateSecureProxyUseCaseRequest; type CreateUseCaseRequest = Components.Schemas.CreateUseCaseRequest; type CreateUseCaseRequestBase = Components.Schemas.CreateUseCaseRequestBase; type DeleteIntegrationAppMappingRequest = Components.Schemas.DeleteIntegrationAppMappingRequest; type DeliveryConfig = Components.Schemas.DeliveryConfig; type EmbeddedFileProxyUseCaseRequest = Components.Schemas.EmbeddedFileProxyUseCaseRequest; type EmbeddedInboundUseCaseRequest = Components.Schemas.EmbeddedInboundUseCaseRequest; type EmbeddedManagedCallUseCaseRequest = Components.Schemas.EmbeddedManagedCallUseCaseRequest; type EmbeddedOutboundUseCaseRequest = Components.Schemas.EmbeddedOutboundUseCaseRequest; type EmbeddedSecureProxyUseCaseRequest = Components.Schemas.EmbeddedSecureProxyUseCaseRequest; type EmbeddedUseCaseRequest = Components.Schemas.EmbeddedUseCaseRequest; type EmbeddedUseCaseRequestBase = Components.Schemas.EmbeddedUseCaseRequestBase; type EntityUpdate = Components.Schemas.EntityUpdate; type EnvVarRefConfig = Components.Schemas.EnvVarRefConfig; type EnvironmentFieldConfig = Components.Schemas.EnvironmentFieldConfig; type ErpEvent = Components.Schemas.ErpEvent; type ErpEventV3 = Components.Schemas.ErpEventV3; type ErpUpdatesEventsV2Request = Components.Schemas.ErpUpdatesEventsV2Request; type ErpUpdatesEventsV3Request = Components.Schemas.ErpUpdatesEventsV3Request; type ErrorResponseBase = Components.Schemas.ErrorResponseBase; type FileProxyAuth = Components.Schemas.FileProxyAuth; type FileProxyParam = Components.Schemas.FileProxyParam; type FileProxyResponseConfig = Components.Schemas.FileProxyResponseConfig; type FileProxySecureProxyAttachment = Components.Schemas.FileProxySecureProxyAttachment; type FileProxyStep = Components.Schemas.FileProxyStep; type FileProxyUrlConfig = Components.Schemas.FileProxyUrlConfig; type FileProxyUrlParam = Components.Schemas.FileProxyUrlParam; type FileProxyUrlParams = Components.Schemas.FileProxyUrlParams; type FileProxyUseCase = Components.Schemas.FileProxyUseCase; type FileProxyUseCaseConfiguration = Components.Schemas.FileProxyUseCaseConfiguration; type FileProxyUseCaseHistoryEntry = Components.Schemas.FileProxyUseCaseHistoryEntry; type GenerateTypesPreviewResponse = Components.Schemas.GenerateTypesPreviewResponse; type GenerateTypesRequest = Components.Schemas.GenerateTypesRequest; type GenerateTypesResponse = Components.Schemas.GenerateTypesResponse; type GetMonitoringStatsRequest = Components.Schemas.GetMonitoringStatsRequest; type GetMonitoringStatsV2Request = Components.Schemas.GetMonitoringStatsV2Request; type GetMonitoringTimeSeriesRequest = Components.Schemas.GetMonitoringTimeSeriesRequest; type GetMonitoringTimeSeriesV2Request = Components.Schemas.GetMonitoringTimeSeriesV2Request; type InboundIntegrationEventConfiguration = Components.Schemas.InboundIntegrationEventConfiguration; type InboundMonitoringEvent = Components.Schemas.InboundMonitoringEvent; type InboundUseCase = Components.Schemas.InboundUseCase; type InboundUseCaseHistoryEntry = Components.Schemas.InboundUseCaseHistoryEntry; type Integration = Components.Schemas.Integration; type IntegrationAppMapping = Components.Schemas.IntegrationAppMapping; type IntegrationConfigurationV1 = Components.Schemas.IntegrationConfigurationV1; type IntegrationConfigurationV2 = Components.Schemas.IntegrationConfigurationV2; type IntegrationEditableFields = Components.Schemas.IntegrationEditableFields; type IntegrationEntity = Components.Schemas.IntegrationEntity; type IntegrationEntityField = Components.Schemas.IntegrationEntityField; type IntegrationFieldV1 = Components.Schemas.IntegrationFieldV1; type IntegrationMeterReading = Components.Schemas.IntegrationMeterReading; type IntegrationNotificationConfig = Components.Schemas.IntegrationNotificationConfig; type IntegrationObjectV1 = Components.Schemas.IntegrationObjectV1; type IntegrationSettings = Components.Schemas.IntegrationSettings; type IntegrationWithUseCases = Components.Schemas.IntegrationWithUseCases; type ManagedCallAuth = Components.Schemas.ManagedCallAuth; type ManagedCallErrorResponse = Components.Schemas.ManagedCallErrorResponse; type ManagedCallExecuteRequest = Components.Schemas.ManagedCallExecuteRequest; type ManagedCallExecuteResponse = Components.Schemas.ManagedCallExecuteResponse; type ManagedCallOperation = Components.Schemas.ManagedCallOperation; type ManagedCallOperationConfig = Components.Schemas.ManagedCallOperationConfig; type ManagedCallUseCase = Components.Schemas.ManagedCallUseCase; type ManagedCallUseCaseHistoryEntry = Components.Schemas.ManagedCallUseCaseHistoryEntry; type MappingSimulationRequest = Components.Schemas.MappingSimulationRequest; type MappingSimulationResponse = Components.Schemas.MappingSimulationResponse; type MappingSimulationV2Request = Components.Schemas.MappingSimulationV2Request; type MappingSimulationWarning = Components.Schemas.MappingSimulationWarning; type MeterReadingPruneScopeConfig = Components.Schemas.MeterReadingPruneScopeConfig; type MeterReadingUpdate = Components.Schemas.MeterReadingUpdate; type MeterUniqueIdsConfig = Components.Schemas.MeterUniqueIdsConfig; type MonitoringEventV2 = Components.Schemas.MonitoringEventV2; type MonitoringStats = Components.Schemas.MonitoringStats; type MonitoringStatsV2 = Components.Schemas.MonitoringStatsV2; type NotificationChannelSet = Components.Schemas.NotificationChannelSet; type NotificationDigestConfig = Components.Schemas.NotificationDigestConfig; type NotificationHistoryItem = Components.Schemas.NotificationHistoryItem; type NotificationHistoryResponse = Components.Schemas.NotificationHistoryResponse; type NotificationRecipient = Components.Schemas.NotificationRecipient; type NotificationRule = Components.Schemas.NotificationRule; type NotificationRuleStatus = Components.Schemas.NotificationRuleStatus; type NotificationStatusResponse = Components.Schemas.NotificationStatusResponse; type OutboundConflict = Components.Schemas.OutboundConflict; type OutboundDlqListResponse = Components.Schemas.OutboundDlqListResponse; type OutboundDlqMessage = Components.Schemas.OutboundDlqMessage; type OutboundIntegrationEventConfiguration = Components.Schemas.OutboundIntegrationEventConfiguration; type OutboundMapping = Components.Schemas.OutboundMapping; type OutboundMessage = Components.Schemas.OutboundMessage; type OutboundMonitoringEvent = Components.Schemas.OutboundMonitoringEvent; type OutboundPollStatus = Components.Schemas.OutboundPollStatus; type OutboundStatusResponse = Components.Schemas.OutboundStatusResponse; type OutboundUseCase = Components.Schemas.OutboundUseCase; type OutboundUseCaseHistoryEntry = Components.Schemas.OutboundUseCaseHistoryEntry; type OutboundUseCaseStatus = Components.Schemas.OutboundUseCaseStatus; type PollDeliveryConfig = Components.Schemas.PollDeliveryConfig; type PollOutboundMessagesRequest = Components.Schemas.PollOutboundMessagesRequest; type PollOutboundMessagesResponse = Components.Schemas.PollOutboundMessagesResponse; type PortalOrigin = Components.Schemas.PortalOrigin; type PortalRefConfig = Components.Schemas.PortalRefConfig; type PortalRefFilter = Components.Schemas.PortalRefFilter; type PruneScopeConfig = Components.Schemas.PruneScopeConfig; type QueryAccessLogsRequest = Components.Schemas.QueryAccessLogsRequest; type QueryEventsRequest = Components.Schemas.QueryEventsRequest; type QueryInboundMonitoringEventsRequest = Components.Schemas.QueryInboundMonitoringEventsRequest; type QueryMonitoringEventsV2Request = Components.Schemas.QueryMonitoringEventsV2Request; type QueryOutboundMonitoringEventsRequest = Components.Schemas.QueryOutboundMonitoringEventsRequest; type RedriveOutboundDlqRequest = Components.Schemas.RedriveOutboundDlqRequest; type RedriveOutboundDlqResponse = Components.Schemas.RedriveOutboundDlqResponse; type RedriveOutboundDlqResult = Components.Schemas.RedriveOutboundDlqResult; type RelationConfig = Components.Schemas.RelationConfig; type RelationItemConfig = Components.Schemas.RelationItemConfig; type RelationRefItemConfig = Components.Schemas.RelationRefItemConfig; type RelationRefValueConfig = Components.Schemas.RelationRefValueConfig; type RelationRefsConfig = Components.Schemas.RelationRefsConfig; type RelationUniqueIdField = Components.Schemas.RelationUniqueIdField; type RepeatableFieldType = Components.Schemas.RepeatableFieldType; type ReplayEventsRequest = Components.Schemas.ReplayEventsRequest; type RuleBaselineBucket = Components.Schemas.RuleBaselineBucket; type RuleBaselineStatus = Components.Schemas.RuleBaselineStatus; type SecureProxyRequest = Components.Schemas.SecureProxyRequest; type SecureProxyResponse = Components.Schemas.SecureProxyResponse; type SecureProxySummary = Components.Schemas.SecureProxySummary; type SecureProxyUpstreamError = Components.Schemas.SecureProxyUpstreamError; type SecureProxyUseCase = Components.Schemas.SecureProxyUseCase; type SecureProxyUseCaseConfiguration = Components.Schemas.SecureProxyUseCaseConfiguration; type SecureProxyUseCaseHistoryEntry = Components.Schemas.SecureProxyUseCaseHistoryEntry; type SecureProxyWhitelist = Components.Schemas.SecureProxyWhitelist; type SecureProxyWhitelistUpdate = Components.Schemas.SecureProxyWhitelistUpdate; type SetIntegrationAppMappingRequest = Components.Schemas.SetIntegrationAppMappingRequest; type TestNotificationRequest = Components.Schemas.TestNotificationRequest; type TestNotificationResponse = Components.Schemas.TestNotificationResponse; type TimeSeriesBreakdownItemV2 = Components.Schemas.TimeSeriesBreakdownItemV2; type TimeSeriesBucket = Components.Schemas.TimeSeriesBucket; type TimeSeriesBucketV2 = Components.Schemas.TimeSeriesBucketV2; type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest; type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp; type TypeAnnotations = Components.Schemas.TypeAnnotations; type TypeDescriptor = Components.Schemas.TypeDescriptor; type UnblockOutboundStreamRequest = Components.Schemas.UnblockOutboundStreamRequest; type UnblockOutboundStreamResponse = Components.Schemas.UnblockOutboundStreamResponse; type UpdateFileProxyUseCaseRequest = Components.Schemas.UpdateFileProxyUseCaseRequest; type UpdateInboundUseCaseRequest = Components.Schemas.UpdateInboundUseCaseRequest; type UpdateIntegrationRequest = Components.Schemas.UpdateIntegrationRequest; type UpdateManagedCallUseCaseRequest = Components.Schemas.UpdateManagedCallUseCaseRequest; type UpdateOutboundUseCaseRequest = Components.Schemas.UpdateOutboundUseCaseRequest; type UpdateSecureProxyUseCaseRequest = Components.Schemas.UpdateSecureProxyUseCaseRequest; type UpdateUseCaseRequest = Components.Schemas.UpdateUseCaseRequest; type UpdateUseCaseRequestBase = Components.Schemas.UpdateUseCaseRequestBase; type UpsertIntegrationWithUseCasesRequest = Components.Schemas.UpsertIntegrationWithUseCasesRequest; type UseCase = Components.Schemas.UseCase; type UseCaseBase = Components.Schemas.UseCaseBase; type UseCaseHistoryEntry = Components.Schemas.UseCaseHistoryEntry; type UseCaseHistoryEntryBase = Components.Schemas.UseCaseHistoryEntryBase; type UseCaseTypePreview = Components.Schemas.UseCaseTypePreview; type WebhookDeliveryConfig = Components.Schemas.WebhookDeliveryConfig; type WebhookStatus = Components.Schemas.WebhookStatus; export { type GetMonitoringStatsV2Request as $, type AccessLogEntry as A, type EnvironmentFieldConfig as B, type Client as C, type DeleteIntegrationAppMappingRequest as D, type EmbeddedFileProxyUseCaseRequest as E, type ErpEvent as F, type ErpEventV3 as G, type ErpUpdatesEventsV2Request as H, type ErpUpdatesEventsV3Request as I, type ErrorResponseBase as J, type FileProxyAuth as K, type FileProxyParam as L, type FileProxyResponseConfig as M, type FileProxySecureProxyAttachment as N, type OperationMethods as O, Paths as P, type FileProxyStep as Q, type FileProxyUrlConfig as R, type FileProxyUrlParam as S, type FileProxyUrlParams as T, type FileProxyUseCase as U, type FileProxyUseCaseConfiguration as V, type FileProxyUseCaseHistoryEntry as W, type GenerateTypesPreviewResponse as X, type GenerateTypesRequest as Y, type GenerateTypesResponse as Z, type GetMonitoringStatsRequest as _, Components as a, type PruneScopeConfig as a$, type GetMonitoringTimeSeriesRequest as a0, type GetMonitoringTimeSeriesV2Request as a1, type InboundIntegrationEventConfiguration as a2, type InboundMonitoringEvent as a3, type InboundUseCase as a4, type InboundUseCaseHistoryEntry as a5, type Integration as a6, type IntegrationAppMapping as a7, type IntegrationConfigurationV1 as a8, type IntegrationConfigurationV2 as a9, type MonitoringStatsV2 as aA, type NotificationChannelSet as aB, type NotificationDigestConfig as aC, type NotificationHistoryItem as aD, type NotificationHistoryResponse as aE, type NotificationRecipient as aF, type NotificationRule as aG, type NotificationRuleStatus as aH, type NotificationStatusResponse as aI, type OutboundConflict as aJ, type OutboundDlqListResponse as aK, type OutboundDlqMessage as aL, type OutboundIntegrationEventConfiguration as aM, type OutboundMapping as aN, type OutboundMessage as aO, type OutboundMonitoringEvent as aP, type OutboundPollStatus as aQ, type OutboundStatusResponse as aR, type OutboundUseCase as aS, type OutboundUseCaseHistoryEntry as aT, type OutboundUseCaseStatus as aU, type PollDeliveryConfig as aV, type PollOutboundMessagesRequest as aW, type PollOutboundMessagesResponse as aX, type PortalOrigin as aY, type PortalRefConfig as aZ, type PortalRefFilter as a_, type IntegrationEditableFields as aa, type IntegrationEntity as ab, type IntegrationEntityField as ac, type IntegrationFieldV1 as ad, type IntegrationMeterReading as ae, type IntegrationNotificationConfig as af, type IntegrationObjectV1 as ag, type IntegrationSettings as ah, type IntegrationWithUseCases as ai, type ManagedCallAuth as aj, type ManagedCallErrorResponse as ak, type ManagedCallExecuteRequest as al, type ManagedCallExecuteResponse as am, type ManagedCallOperation as an, type ManagedCallOperationConfig as ao, type ManagedCallUseCase as ap, type ManagedCallUseCaseHistoryEntry as aq, type MappingSimulationRequest as ar, type MappingSimulationResponse as as, type MappingSimulationV2Request as at, type MappingSimulationWarning as au, type MeterReadingPruneScopeConfig as av, type MeterReadingUpdate as aw, type MeterUniqueIdsConfig as ax, type MonitoringEventV2 as ay, type MonitoringStats as az, type PathsDictionary as b, type QueryAccessLogsRequest as b0, type QueryEventsRequest as b1, type QueryInboundMonitoringEventsRequest as b2, type QueryMonitoringEventsV2Request as b3, type QueryOutboundMonitoringEventsRequest as b4, type RedriveOutboundDlqRequest as b5, type RedriveOutboundDlqResponse as b6, type RedriveOutboundDlqResult as b7, type RelationConfig as b8, type RelationItemConfig as b9, type TypeDescriptor as bA, type UnblockOutboundStreamRequest as bB, type UnblockOutboundStreamResponse as bC, type UpdateFileProxyUseCaseRequest as bD, type UpdateInboundUseCaseRequest as bE, type UpdateIntegrationRequest as bF, type UpdateManagedCallUseCaseRequest as bG, type UpdateOutboundUseCaseRequest as bH, type UpdateSecureProxyUseCaseRequest as bI, type UpdateUseCaseRequest as bJ, type UpdateUseCaseRequestBase as bK, type UpsertIntegrationWithUseCasesRequest as bL, type UseCase as bM, type UseCaseBase as bN, type UseCaseHistoryEntry as bO, type UseCaseHistoryEntryBase as bP, type UseCaseTypePreview as bQ, type WebhookDeliveryConfig as bR, type WebhookStatus as bS, type RelationRefItemConfig as ba, type RelationRefValueConfig as bb, type RelationRefsConfig as bc, type RelationUniqueIdField as bd, type RepeatableFieldType as be, type ReplayEventsRequest as bf, type RuleBaselineBucket as bg, type RuleBaselineStatus as bh, type SecureProxyRequest as bi, type SecureProxyResponse as bj, type SecureProxySummary as bk, type SecureProxyUpstreamError as bl, type SecureProxyUseCase as bm, type SecureProxyUseCaseConfiguration as bn, type SecureProxyUseCaseHistoryEntry as bo, type SecureProxyWhitelist as bp, type SecureProxyWhitelistUpdate as bq, type SetIntegrationAppMappingRequest as br, type TestNotificationRequest as bs, type TestNotificationResponse as bt, type TimeSeriesBreakdownItemV2 as bu, type TimeSeriesBucket as bv, type TimeSeriesBucketV2 as bw, type TriggerErpActionRequest as bx, type TriggerWebhookResp as by, type TypeAnnotations as bz, type AckOutboundMessagesRequest as c, type AckOutboundMessagesResponse as d, type AckResult as e, type AutoRefreshSettings as f, type CommitTypesRequest as g, type CommitTypesResponse as h, type ConnectorConfig as i, type CreateFileProxyUseCaseRequest as j, type CreateInboundUseCaseRequest as k, type CreateIntegrationRequest as l, type CreateManagedCallUseCaseRequest as m, type CreateOutboundUseCaseRequest as n, type CreateSecureProxyUseCaseRequest as o, type CreateUseCaseRequest as p, type CreateUseCaseRequestBase as q, type DeliveryConfig as r, type EmbeddedInboundUseCaseRequest as s, type EmbeddedManagedCallUseCaseRequest as t, type EmbeddedOutboundUseCaseRequest as u, type EmbeddedSecureProxyUseCaseRequest as v, type EmbeddedUseCaseRequest as w, type EmbeddedUseCaseRequestBase as x, type EntityUpdate as y, type EnvVarRefConfig as z };