import { GetExternalDatabaseConnectionRequest as GetExternalDatabaseConnectionRequest$1, GetExternalDatabaseConnectionResponse as GetExternalDatabaseConnectionResponse$1, ListExternalDatabaseConnectionsRequest as ListExternalDatabaseConnectionsRequest$1, ListExternalDatabaseConnectionsResponse as ListExternalDatabaseConnectionsResponse$1, CreateExternalDatabaseConnectionRequest as CreateExternalDatabaseConnectionRequest$1, CreateExternalDatabaseConnectionResponse as CreateExternalDatabaseConnectionResponse$1, UpdateExternalDatabaseConnectionRequest as UpdateExternalDatabaseConnectionRequest$1, UpdateExternalDatabaseConnectionResponse as UpdateExternalDatabaseConnectionResponse$1, DeleteExternalDatabaseConnectionRequest as DeleteExternalDatabaseConnectionRequest$1, DeleteExternalDatabaseConnectionResponse as DeleteExternalDatabaseConnectionResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** An external database connection defines a connection between an external database and a Wix site. */ interface ExternalDatabaseConnection { /** * Name of the external database connection. * * An external database connection can connect to one or more external data collections or tables. These appear as `connectionName/dataCollectionId`. * @immutable * @minLength 1 * @maxLength 255 */ name?: string; /** * Base URL for accessing and managing data in the external database. For example: `https://example.com/my-external-database`. * Required for STANDALONE connection type. * @format WEB_URL */ endpoint?: string | null; /** * Settings specified to the external database connection as part of each request. * * These settings can relate to authentication, tenancy, or provide any other information necessary for processing a request. Their content and structure depend on the specific requirements of the external database's API. */ configuration?: Record | null; /** * Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure. * @readonly */ connectionStatus?: ConnectionStatus; /** * Public key used to validate requests to the external database. * @readonly * @maxLength 128 */ publicKey?: string | null; /** * Capabilities of the external database. * @readonly */ capabilities?: Capabilities; } declare enum CauseOfFailure { /** No connection failure. */ NONE = "NONE", /** General communication failure. */ COMMUNICATION_FAILURE = "COMMUNICATION_FAILURE", /** External database host is unreachable. */ DESTINATION_HOST_UNREACHABLE = "DESTINATION_HOST_UNREACHABLE", /** Unauthorized to access the external database. */ UNAUTHORIZED = "UNAUTHORIZED", /** `endpoint` is not set. */ DESTINATION_ENDPOINT_NOT_DEFINED = "DESTINATION_ENDPOINT_NOT_DEFINED" } /** @enumType */ type CauseOfFailureWithLiterals = CauseOfFailure | 'NONE' | 'COMMUNICATION_FAILURE' | 'DESTINATION_HOST_UNREACHABLE' | 'UNAUTHORIZED' | 'DESTINATION_ENDPOINT_NOT_DEFINED'; declare enum CollectionsFound { /** Attempt to connect to the external database failed, so status is unknown. */ UNKNOWN = "UNKNOWN", /** External database has collections. */ YES = "YES", /** External database does not have any collections. */ NO = "NO" } /** @enumType */ type CollectionsFoundWithLiterals = CollectionsFound | 'UNKNOWN' | 'YES' | 'NO'; declare enum FieldType { TEXT = "TEXT", NUMBER = "NUMBER", DATE = "DATE", DATETIME = "DATETIME", IMAGE = "IMAGE", BOOLEAN = "BOOLEAN", DOCUMENT = "DOCUMENT", URL = "URL", RICH_TEXT = "RICH_TEXT", VIDEO = "VIDEO", ANY = "ANY", ARRAY_STRING = "ARRAY_STRING", ARRAY_DOCUMENT = "ARRAY_DOCUMENT", AUDIO = "AUDIO", TIME = "TIME", LANGUAGE = "LANGUAGE", RICH_CONTENT = "RICH_CONTENT", MEDIA_GALLERY = "MEDIA_GALLERY", ADDRESS = "ADDRESS", PAGE_LINK = "PAGE_LINK", REFERENCE = "REFERENCE", MULTI_REFERENCE = "MULTI_REFERENCE", OBJECT = "OBJECT", ARRAY = "ARRAY", /** Deprecated - can’t be added to collections. Can only appear in older collections. */ LEGACY_TIME = "LEGACY_TIME", /** Deprecated - can’t be added to collections. Can only appear in older collections. */ LEGACY_BOOK = "LEGACY_BOOK", /** Deprecated - can’t be added to collections. Can only appear in older collections. */ LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL", /** Deprecated - can’t be added to collections. Can only appear in older collections. */ LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE", /** Deprecated - can’t be added to collections. Can only appear in older collections. */ LEGACY_IMAGE = "LEGACY_IMAGE", /** Deprecated - can’t be added to collections. Can only appear in older collections. */ LEGACY_COLOR = "LEGACY_COLOR", /** Deprecated - can’t be added to collections. Can only appear in older collections. */ LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO" } /** @enumType */ type FieldTypeWithLiterals = FieldType | 'TEXT' | 'NUMBER' | 'DATE' | 'DATETIME' | 'IMAGE' | 'BOOLEAN' | 'DOCUMENT' | 'URL' | 'RICH_TEXT' | 'VIDEO' | 'ANY' | 'ARRAY_STRING' | 'ARRAY_DOCUMENT' | 'AUDIO' | 'TIME' | 'LANGUAGE' | 'RICH_CONTENT' | 'MEDIA_GALLERY' | 'ADDRESS' | 'PAGE_LINK' | 'REFERENCE' | 'MULTI_REFERENCE' | 'OBJECT' | 'ARRAY' | 'LEGACY_TIME' | 'LEGACY_BOOK' | 'LEGACY_EXTERNAL_URL' | 'LEGACY_BROKEN_REFERENCE' | 'LEGACY_IMAGE' | 'LEGACY_COLOR' | 'LEGACY_EXTERNAL_VIDEO'; interface ConnectionStatus { /** Whether the connection was established successfully. */ successful?: boolean; /** Whether and why the connection attempt failed. */ causeOfFailure?: CauseOfFailureWithLiterals; /** * Whether the external database has collections. * @readonly */ hasCollections?: CollectionsFoundWithLiterals; } declare enum ProtocolVersion { V1 = "V1", V2 = "V2", V3 = "V3" } /** @enumType */ type ProtocolVersionWithLiterals = ProtocolVersion | 'V1' | 'V2' | 'V3'; interface Capabilities { /** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */ collectionModificationsSupported?: boolean; /** * Field types the external database supports. Applies only when `collectionModificationsSupported` is set to `true`. * @maxSize 255 */ fieldTypes?: FieldTypeWithLiterals[]; } interface GetExternalDatabaseConnectionRequest { /** * Name of the external database connection to retrieve. * @maxLength 255 */ name: string; } interface GetExternalDatabaseConnectionResponse { /** Details of the retrieved external database connection. */ externalDatabaseConnection?: ExternalDatabaseConnection; } interface ListExternalDatabaseConnectionsRequest { /** Paging metadata. */ paging?: Paging; } interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface ListExternalDatabaseConnectionsResponse { /** List of external database connections. */ externalDatabaseConnections?: ExternalDatabaseConnection[]; /** Paging metadata. */ pagingMetadata?: PagingMetadata; } interface PagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; } interface CreateExternalDatabaseConnectionRequest { /** External database connection details. */ externalDatabaseConnection: ExternalDatabaseConnection; /** Connection type. The connection type specifies the type of adaptor by which the external collection is integrated with the site. */ connectionType: ConnectionTypeWithLiterals; } declare enum ConnectionType { /** External database connection based on the legacy [external database collection service plugin](https://dev.wix.com/docs/velo/api-reference/wix-data-v2/service-plugins-spis/external-database-collection-legacy/introduction). */ STANDALONE = "STANDALONE", /** External database connection based on the [external database service plugin](https://dev.wix.com/docs/rest/business-solutions/cms/service-plugins/external-database-service-plugin/introduction). */ WIX_SERVICE_PLUGIN = "WIX_SERVICE_PLUGIN" } /** @enumType */ type ConnectionTypeWithLiterals = ConnectionType | 'STANDALONE' | 'WIX_SERVICE_PLUGIN'; interface CreateExternalDatabaseConnectionResponse { /** Details of the created external database connection. */ externalDatabaseConnection?: ExternalDatabaseConnection; } interface UpdateExternalDatabaseConnectionRequest { /** Updated external database connection. The existing connection is replaced with this version. */ externalDatabaseConnection: ExternalDatabaseConnection; } interface UpdateExternalDatabaseConnectionResponse { /** Details of the updated external database connection. */ externalDatabaseConnection?: ExternalDatabaseConnection; } interface DeleteExternalDatabaseConnectionRequest { /** * Name of the external database connection to delete. * @maxLength 255 */ name: string; } interface DeleteExternalDatabaseConnectionResponse { } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function getExternalDatabaseConnection(): __PublicMethodMetaInfo<'GET', { name: string; }, GetExternalDatabaseConnectionRequest$1, GetExternalDatabaseConnectionRequest, GetExternalDatabaseConnectionResponse$1, GetExternalDatabaseConnectionResponse>; declare function listExternalDatabaseConnections(): __PublicMethodMetaInfo<'GET', {}, ListExternalDatabaseConnectionsRequest$1, ListExternalDatabaseConnectionsRequest, ListExternalDatabaseConnectionsResponse$1, ListExternalDatabaseConnectionsResponse>; declare function createExternalDatabaseConnection(): __PublicMethodMetaInfo<'POST', {}, CreateExternalDatabaseConnectionRequest$1, CreateExternalDatabaseConnectionRequest, CreateExternalDatabaseConnectionResponse$1, CreateExternalDatabaseConnectionResponse>; declare function updateExternalDatabaseConnection(): __PublicMethodMetaInfo<'PUT', { externalDatabaseConnectionName: string; }, UpdateExternalDatabaseConnectionRequest$1, UpdateExternalDatabaseConnectionRequest, UpdateExternalDatabaseConnectionResponse$1, UpdateExternalDatabaseConnectionResponse>; declare function deleteExternalDatabaseConnection(): __PublicMethodMetaInfo<'DELETE', { name: string; }, DeleteExternalDatabaseConnectionRequest$1, DeleteExternalDatabaseConnectionRequest, DeleteExternalDatabaseConnectionResponse$1, DeleteExternalDatabaseConnectionResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type Capabilities as CapabilitiesOriginal, CauseOfFailure as CauseOfFailureOriginal, type CauseOfFailureWithLiterals as CauseOfFailureWithLiteralsOriginal, CollectionsFound as CollectionsFoundOriginal, type CollectionsFoundWithLiterals as CollectionsFoundWithLiteralsOriginal, type ConnectionStatus as ConnectionStatusOriginal, ConnectionType as ConnectionTypeOriginal, type ConnectionTypeWithLiterals as ConnectionTypeWithLiteralsOriginal, type CreateExternalDatabaseConnectionRequest as CreateExternalDatabaseConnectionRequestOriginal, type CreateExternalDatabaseConnectionResponse as CreateExternalDatabaseConnectionResponseOriginal, type DeleteExternalDatabaseConnectionRequest as DeleteExternalDatabaseConnectionRequestOriginal, type DeleteExternalDatabaseConnectionResponse as DeleteExternalDatabaseConnectionResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExternalDatabaseConnection as ExternalDatabaseConnectionOriginal, FieldType as FieldTypeOriginal, type FieldTypeWithLiterals as FieldTypeWithLiteralsOriginal, type GetExternalDatabaseConnectionRequest as GetExternalDatabaseConnectionRequestOriginal, type GetExternalDatabaseConnectionResponse as GetExternalDatabaseConnectionResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListExternalDatabaseConnectionsRequest as ListExternalDatabaseConnectionsRequestOriginal, type ListExternalDatabaseConnectionsResponse as ListExternalDatabaseConnectionsResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PagingMetadata as PagingMetadataOriginal, type Paging as PagingOriginal, ProtocolVersion as ProtocolVersionOriginal, type ProtocolVersionWithLiterals as ProtocolVersionWithLiteralsOriginal, type RestoreInfo as RestoreInfoOriginal, type UpdateExternalDatabaseConnectionRequest as UpdateExternalDatabaseConnectionRequestOriginal, type UpdateExternalDatabaseConnectionResponse as UpdateExternalDatabaseConnectionResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createExternalDatabaseConnection, deleteExternalDatabaseConnection, getExternalDatabaseConnection, listExternalDatabaseConnections, updateExternalDatabaseConnection };