@wix/auto_sdk_data_external-database-connections 1.0.40 → 1.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -523,7 +523,6 @@ var CollectionsFound = /* @__PURE__ */ ((CollectionsFound2) => {
523
523
  return CollectionsFound2;
524
524
  })(CollectionsFound || {});
525
525
  var FieldType = /* @__PURE__ */ ((FieldType2) => {
526
- FieldType2["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
527
526
  FieldType2["TEXT"] = "TEXT";
528
527
  FieldType2["NUMBER"] = "NUMBER";
529
528
  FieldType2["DATE"] = "DATE";
@@ -558,14 +557,12 @@ var FieldType = /* @__PURE__ */ ((FieldType2) => {
558
557
  return FieldType2;
559
558
  })(FieldType || {});
560
559
  var ProtocolVersion = /* @__PURE__ */ ((ProtocolVersion2) => {
561
- ProtocolVersion2["UNKNOWN_PROTOCOL_VERSION"] = "UNKNOWN_PROTOCOL_VERSION";
562
560
  ProtocolVersion2["V1"] = "V1";
563
561
  ProtocolVersion2["V2"] = "V2";
564
562
  ProtocolVersion2["V3"] = "V3";
565
563
  return ProtocolVersion2;
566
564
  })(ProtocolVersion || {});
567
565
  var ConnectionType = /* @__PURE__ */ ((ConnectionType2) => {
568
- ConnectionType2["UNKNOWN_CONNECTION_TYPE"] = "UNKNOWN_CONNECTION_TYPE";
569
566
  ConnectionType2["STANDALONE"] = "STANDALONE";
570
567
  ConnectionType2["WIX_SERVICE_PLUGIN"] = "WIX_SERVICE_PLUGIN";
571
568
  return ConnectionType2;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/data-v1-external-database-connection-external-database-connections.universal.ts","../../src/data-v1-external-database-connection-external-database-connections.http.ts","../../src/data-v1-external-database-connection-external-database-connections.public.ts","../../src/data-v1-external-database-connection-external-database-connections.context.ts"],"sourcesContent":["export * from './src/data-v1-external-database-connection-external-database-connections.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDataV1ExternalDatabaseConnection from './data-v1-external-database-connection-external-database-connections.http.js';\n\n/** An external database connection defines a connection between an external database and a Wix site. */\nexport interface ExternalDatabaseConnection {\n /**\n * Name of the external database connection.\n *\n * An external database connection can connect to one or more external data collections or tables. These appear as `connectionName/dataCollectionId`.\n * @immutable\n * @minLength 1\n * @maxLength 255\n */\n name?: string;\n /**\n * Base URL for accessing and managing data in the external database. For example: `https://example.com/my-external-database`.\n * Required for STANDALONE connection type.\n * @format WEB_URL\n */\n endpoint?: string | null;\n /**\n * Settings specified to the external database connection as part of each request.\n *\n * 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.\n */\n configuration?: Record<string, any> | null;\n /**\n * Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure.\n * @readonly\n */\n connectionStatus?: ConnectionStatus;\n /**\n * Public key used to validate requests to the external database.\n * @readonly\n * @maxLength 128\n */\n publicKey?: string | null;\n /**\n * Capabilities of the external database.\n * @readonly\n */\n capabilities?: Capabilities;\n}\n\nexport enum CauseOfFailure {\n /** No connection failure. */\n NONE = 'NONE',\n /** General communication failure. */\n COMMUNICATION_FAILURE = 'COMMUNICATION_FAILURE',\n /** External database host is unreachable. */\n DESTINATION_HOST_UNREACHABLE = 'DESTINATION_HOST_UNREACHABLE',\n /** Unauthorized to access the external database. */\n UNAUTHORIZED = 'UNAUTHORIZED',\n /** `endpoint` is not set. */\n DESTINATION_ENDPOINT_NOT_DEFINED = 'DESTINATION_ENDPOINT_NOT_DEFINED',\n}\n\n/** @enumType */\nexport type CauseOfFailureWithLiterals =\n | CauseOfFailure\n | 'NONE'\n | 'COMMUNICATION_FAILURE'\n | 'DESTINATION_HOST_UNREACHABLE'\n | 'UNAUTHORIZED'\n | 'DESTINATION_ENDPOINT_NOT_DEFINED';\n\nexport enum CollectionsFound {\n /** Attempt to connect to the external database failed, so status is unknown. */\n UNKNOWN = 'UNKNOWN',\n /** External database has collections. */\n YES = 'YES',\n /** External database does not have any collections. */\n NO = 'NO',\n}\n\n/** @enumType */\nexport type CollectionsFoundWithLiterals =\n | CollectionsFound\n | 'UNKNOWN'\n | 'YES'\n | 'NO';\n\nexport enum FieldType {\n UNKNOWN_FIELD_TYPE = 'UNKNOWN_FIELD_TYPE',\n TEXT = 'TEXT',\n NUMBER = 'NUMBER',\n DATE = 'DATE',\n DATETIME = 'DATETIME',\n IMAGE = 'IMAGE',\n BOOLEAN = 'BOOLEAN',\n DOCUMENT = 'DOCUMENT',\n URL = 'URL',\n RICH_TEXT = 'RICH_TEXT',\n VIDEO = 'VIDEO',\n ANY = 'ANY',\n ARRAY_STRING = 'ARRAY_STRING',\n ARRAY_DOCUMENT = 'ARRAY_DOCUMENT',\n AUDIO = 'AUDIO',\n TIME = 'TIME',\n LANGUAGE = 'LANGUAGE',\n RICH_CONTENT = 'RICH_CONTENT',\n MEDIA_GALLERY = 'MEDIA_GALLERY',\n ADDRESS = 'ADDRESS',\n PAGE_LINK = 'PAGE_LINK',\n REFERENCE = 'REFERENCE',\n MULTI_REFERENCE = 'MULTI_REFERENCE',\n OBJECT = 'OBJECT',\n ARRAY = 'ARRAY',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_TIME = 'LEGACY_TIME',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_BOOK = 'LEGACY_BOOK',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_EXTERNAL_URL = 'LEGACY_EXTERNAL_URL',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_BROKEN_REFERENCE = 'LEGACY_BROKEN_REFERENCE',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_IMAGE = 'LEGACY_IMAGE',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_COLOR = 'LEGACY_COLOR',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_EXTERNAL_VIDEO = 'LEGACY_EXTERNAL_VIDEO',\n}\n\n/** @enumType */\nexport type FieldTypeWithLiterals =\n | FieldType\n | 'UNKNOWN_FIELD_TYPE'\n | 'TEXT'\n | 'NUMBER'\n | 'DATE'\n | 'DATETIME'\n | 'IMAGE'\n | 'BOOLEAN'\n | 'DOCUMENT'\n | 'URL'\n | 'RICH_TEXT'\n | 'VIDEO'\n | 'ANY'\n | 'ARRAY_STRING'\n | 'ARRAY_DOCUMENT'\n | 'AUDIO'\n | 'TIME'\n | 'LANGUAGE'\n | 'RICH_CONTENT'\n | 'MEDIA_GALLERY'\n | 'ADDRESS'\n | 'PAGE_LINK'\n | 'REFERENCE'\n | 'MULTI_REFERENCE'\n | 'OBJECT'\n | 'ARRAY'\n | 'LEGACY_TIME'\n | 'LEGACY_BOOK'\n | 'LEGACY_EXTERNAL_URL'\n | 'LEGACY_BROKEN_REFERENCE'\n | 'LEGACY_IMAGE'\n | 'LEGACY_COLOR'\n | 'LEGACY_EXTERNAL_VIDEO';\n\nexport interface ConnectionStatus {\n /** Whether the connection was established successfully. */\n successful?: boolean;\n /** Whether and why the connection attempt failed. */\n causeOfFailure?: CauseOfFailureWithLiterals;\n /**\n * Whether the external database has collections.\n * @readonly\n */\n hasCollections?: CollectionsFoundWithLiterals;\n}\n\nexport enum ProtocolVersion {\n UNKNOWN_PROTOCOL_VERSION = 'UNKNOWN_PROTOCOL_VERSION',\n V1 = 'V1',\n V2 = 'V2',\n V3 = 'V3',\n}\n\n/** @enumType */\nexport type ProtocolVersionWithLiterals =\n | ProtocolVersion\n | 'UNKNOWN_PROTOCOL_VERSION'\n | 'V1'\n | 'V2'\n | 'V3';\n\nexport interface Capabilities {\n /** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */\n collectionModificationsSupported?: boolean;\n /**\n * Field types the external database supports. Applies only when `collectionModificationsSupported` is set to `true`.\n * @maxSize 255\n */\n fieldTypes?: FieldTypeWithLiterals[];\n}\n\nexport interface GetExternalDatabaseConnectionRequest {\n /**\n * Name of the external database connection to retrieve.\n * @maxLength 255\n */\n name: string;\n}\n\nexport interface GetExternalDatabaseConnectionResponse {\n /** Details of the retrieved external database connection. */\n externalDatabaseConnection?: ExternalDatabaseConnection;\n}\n\nexport interface ListExternalDatabaseConnectionsRequest {\n /** Paging metadata. */\n paging?: Paging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListExternalDatabaseConnectionsResponse {\n /** List of external database connections. */\n externalDatabaseConnections?: ExternalDatabaseConnection[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface CreateExternalDatabaseConnectionRequest {\n /** External database connection details. */\n externalDatabaseConnection: ExternalDatabaseConnection;\n /** Connection type. The connection type specifies the type of adaptor by which the external collection is integrated with the site. */\n connectionType: ConnectionTypeWithLiterals;\n}\n\nexport enum ConnectionType {\n /** Unknown connection type. */\n UNKNOWN_CONNECTION_TYPE = 'UNKNOWN_CONNECTION_TYPE',\n /** 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). */\n STANDALONE = 'STANDALONE',\n /** 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). */\n WIX_SERVICE_PLUGIN = 'WIX_SERVICE_PLUGIN',\n}\n\n/** @enumType */\nexport type ConnectionTypeWithLiterals =\n | ConnectionType\n | 'UNKNOWN_CONNECTION_TYPE'\n | 'STANDALONE'\n | 'WIX_SERVICE_PLUGIN';\n\nexport interface CreateExternalDatabaseConnectionResponse {\n /** Details of the created external database connection. */\n externalDatabaseConnection?: ExternalDatabaseConnection;\n}\n\nexport interface UpdateExternalDatabaseConnectionRequest {\n /** Updated external database connection. The existing connection is replaced with this version. */\n externalDatabaseConnection: ExternalDatabaseConnection;\n}\n\nexport interface UpdateExternalDatabaseConnectionResponse {\n /** Details of the updated external database connection. */\n externalDatabaseConnection?: ExternalDatabaseConnection;\n}\n\nexport interface DeleteExternalDatabaseConnectionRequest {\n /**\n * Name of the external database connection to delete.\n * @maxLength 255\n */\n name: string;\n}\n\nexport interface DeleteExternalDatabaseConnectionResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Retrieves the specified external database connection.\n * @param name - Name of the external database connection to retrieve.\n * @public\n * @requiredField name\n * @permissionId WIX_DATA.GET_EXTERNAL_DATABASE_CONNECTION\n * @applicableIdentity APP\n * @returns Details of the retrieved external database connection.\n * @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.GetExternalDatabaseConnection\n */\nexport async function getExternalDatabaseConnection(\n name: string\n): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ name: name });\n\n const reqOpts =\n ambassadorWixDataV1ExternalDatabaseConnection.getExternalDatabaseConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.externalDatabaseConnection!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { name: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['name']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists all of the site's external database connections of all adaptor types.\n * @public\n * @permissionId WIX_DATA.LIST_EXTERNAL_DATABASE_CONNECTIONS\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.ListExternalDatabaseConnections\n */\nexport async function listExternalDatabaseConnections(\n options?: ListExternalDatabaseConnectionsOptions\n): Promise<\n NonNullablePaths<\n ListExternalDatabaseConnectionsResponse,\n | `externalDatabaseConnections`\n | `externalDatabaseConnections.${number}.name`\n | `externalDatabaseConnections.${number}.connectionStatus.successful`\n | `externalDatabaseConnections.${number}.connectionStatus.causeOfFailure`\n | `externalDatabaseConnections.${number}.connectionStatus.hasCollections`\n | `externalDatabaseConnections.${number}.capabilities.collectionModificationsSupported`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixDataV1ExternalDatabaseConnection.listExternalDatabaseConnections(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { paging: '$[0].paging' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListExternalDatabaseConnectionsOptions {\n /** Paging metadata. */\n paging?: Paging;\n}\n\n/**\n * Creates a new external database connection.\n *\n * Before you can establish a connection between a site and an external database, you must prepare an external database adaptor.\n * @param externalDatabaseConnection - External database connection details.\n * @param connectionType - Connection type. The connection type specifies the type of adaptor by which the external collection is integrated with the site.\n * @public\n * @requiredField connectionType\n * @requiredField externalDatabaseConnection\n * @requiredField externalDatabaseConnection.name\n * @param options - Options for creating an external database connection.\n * @permissionId WIX_DATA.CREATE_EXTERNAL_DATABASE_CONNECTION\n * @applicableIdentity APP\n * @returns Details of the created external database connection.\n * @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.CreateExternalDatabaseConnection\n */\nexport async function createExternalDatabaseConnection(\n externalDatabaseConnection: NonNullablePaths<\n ExternalDatabaseConnection,\n `name`,\n 2\n >,\n connectionType: ConnectionTypeWithLiterals\n): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n externalDatabaseConnection: externalDatabaseConnection,\n connectionType: connectionType,\n });\n\n const reqOpts =\n ambassadorWixDataV1ExternalDatabaseConnection.createExternalDatabaseConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.externalDatabaseConnection!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n externalDatabaseConnection: '$[0]',\n connectionType: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['externalDatabaseConnection', 'connectionType']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates an external database connection.\n *\n * > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.\n * @param name - Name of the external database connection.\n *\n * An external database connection can connect to one or more external data collections or tables. These appear as `connectionName/dataCollectionId`.\n * @public\n * @requiredField externalDatabaseConnection\n * @requiredField name\n * @param options - Options for updating an external database connection.\n * @param externalDatabaseConnection - Updated external database connection details. The existing connection is replaced with this version.\n * @permissionId WIX_DATA.UPDATE_EXTERNAL_DATABASE_CONNECTION\n * @applicableIdentity APP\n * @returns Details of the updated external database connection.\n * @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.UpdateExternalDatabaseConnection\n */\nexport async function updateExternalDatabaseConnection(\n name: string,\n externalDatabaseConnection: UpdateExternalDatabaseConnection\n): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n externalDatabaseConnection: { ...externalDatabaseConnection, name: name },\n });\n\n const reqOpts =\n ambassadorWixDataV1ExternalDatabaseConnection.updateExternalDatabaseConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.externalDatabaseConnection!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { externalDatabaseConnection: '$[1]' },\n explicitPathsToArguments: { 'externalDatabaseConnection.name': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['name', 'externalDatabaseConnection']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateExternalDatabaseConnection {\n /**\n * Base URL for accessing and managing data in the external database. For example: `https://example.com/my-external-database`.\n * Required for STANDALONE connection type.\n * @format WEB_URL\n */\n endpoint?: string | null;\n /**\n * Settings specified to the external database connection as part of each request.\n *\n * 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.\n */\n configuration?: Record<string, any> | null;\n /**\n * Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure.\n * @readonly\n */\n connectionStatus?: ConnectionStatus;\n /**\n * Public key used to validate requests to the external database.\n * @readonly\n * @maxLength 128\n */\n publicKey?: string | null;\n /**\n * Capabilities of the external database.\n * @readonly\n */\n capabilities?: Capabilities;\n}\n\n/**\n * Deletes an external database connection.\n *\n * > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database, create a new external database connection.\n * @param name - Name of the external database connection to delete.\n * @public\n * @requiredField name\n * @permissionId WIX_DATA.DELETE_EXTERNAL_DATABASE_CONNECTION\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.DeleteExternalDatabaseConnection\n */\nexport async function deleteExternalDatabaseConnection(\n name: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ name: name });\n\n const reqOpts =\n ambassadorWixDataV1ExternalDatabaseConnection.deleteExternalDatabaseConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { name: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['name']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/cloud-data',\n destPath: '',\n },\n ],\n 'code._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n ],\n 'cloud-data.wix-code.com': [\n {\n srcPath: '',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-data/v1/collections',\n destPath: '/v1/wix-data/collections',\n },\n {\n srcPath: '/wix-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/wix-data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n {\n srcPath: '/wix-data/v1/external-databases',\n destPath: '/v1/external-databases',\n },\n {\n srcPath: '/wix-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/data/v2/bulk/items',\n destPath: '/v2/bulk/items',\n },\n {\n srcPath: '/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data_external-database-connections';\n\n/** Retrieves the specified external database connection. */\nexport function getExternalDatabaseConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __getExternalDatabaseConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.external_database_connection',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.GetExternalDatabaseConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n {\n protoPath: '/v1/external-database-connections/{name}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getExternalDatabaseConnection;\n}\n\n/** Lists all of the site's external database connections of all adaptor types. */\nexport function listExternalDatabaseConnections(\n payload: object\n): RequestOptionsFactory<any> {\n function __listExternalDatabaseConnections({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.external_database_connection',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.ListExternalDatabaseConnections',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n { protoPath: '/v1/external-database-connections', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listExternalDatabaseConnections;\n}\n\n/**\n * Creates a new external database connection.\n *\n * Before you can establish a connection between a site and an external database, you must prepare an external database adaptor.\n */\nexport function createExternalDatabaseConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __createExternalDatabaseConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.external_database_connection',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.CreateExternalDatabaseConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n { protoPath: '/v1/external-database-connections', data: payload, host }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __createExternalDatabaseConnection;\n}\n\n/**\n * Updates an external database connection.\n *\n * > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.\n */\nexport function updateExternalDatabaseConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateExternalDatabaseConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.external_database_connection',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.UpdateExternalDatabaseConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n {\n protoPath:\n '/v1/external-database-connections/{externalDatabaseConnection.name}',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updateExternalDatabaseConnection;\n}\n\n/**\n * Deletes an external database connection.\n *\n * > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database, create a new external database connection.\n */\nexport function deleteExternalDatabaseConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteExternalDatabaseConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.external_database_connection',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.DeleteExternalDatabaseConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n {\n protoPath: '/v1/external-database-connections/{name}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteExternalDatabaseConnection;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ConnectionTypeWithLiterals,\n ExternalDatabaseConnection,\n ListExternalDatabaseConnectionsOptions,\n ListExternalDatabaseConnectionsResponse,\n UpdateExternalDatabaseConnection,\n createExternalDatabaseConnection as universalCreateExternalDatabaseConnection,\n deleteExternalDatabaseConnection as universalDeleteExternalDatabaseConnection,\n getExternalDatabaseConnection as universalGetExternalDatabaseConnection,\n listExternalDatabaseConnections as universalListExternalDatabaseConnections,\n updateExternalDatabaseConnection as universalUpdateExternalDatabaseConnection,\n} from './data-v1-external-database-connection-external-database-connections.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/data' };\n\nexport function getExternalDatabaseConnection(\n httpClient: HttpClient\n): GetExternalDatabaseConnectionSignature {\n return (name: string) =>\n universalGetExternalDatabaseConnection(\n name,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetExternalDatabaseConnectionSignature {\n /**\n * Retrieves the specified external database connection.\n * @param - Name of the external database connection to retrieve.\n * @returns Details of the retrieved external database connection.\n */\n (name: string): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n >;\n}\n\nexport function listExternalDatabaseConnections(\n httpClient: HttpClient\n): ListExternalDatabaseConnectionsSignature {\n return (options?: ListExternalDatabaseConnectionsOptions) =>\n universalListExternalDatabaseConnections(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListExternalDatabaseConnectionsSignature {\n /**\n * Lists all of the site's external database connections of all adaptor types.\n */\n (options?: ListExternalDatabaseConnectionsOptions): Promise<\n NonNullablePaths<\n ListExternalDatabaseConnectionsResponse,\n | `externalDatabaseConnections`\n | `externalDatabaseConnections.${number}.name`\n | `externalDatabaseConnections.${number}.connectionStatus.successful`\n | `externalDatabaseConnections.${number}.connectionStatus.causeOfFailure`\n | `externalDatabaseConnections.${number}.connectionStatus.hasCollections`\n | `externalDatabaseConnections.${number}.capabilities.collectionModificationsSupported`,\n 5\n >\n >;\n}\n\nexport function createExternalDatabaseConnection(\n httpClient: HttpClient\n): CreateExternalDatabaseConnectionSignature {\n return (\n externalDatabaseConnection: NonNullablePaths<\n ExternalDatabaseConnection,\n `name`,\n 2\n >,\n connectionType: ConnectionTypeWithLiterals\n ) =>\n universalCreateExternalDatabaseConnection(\n externalDatabaseConnection,\n connectionType,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateExternalDatabaseConnectionSignature {\n /**\n * Creates a new external database connection.\n *\n * Before you can establish a connection between a site and an external database, you must prepare an external database adaptor.\n * @param - External database connection details.\n * @param - Connection type. The connection type specifies the type of adaptor by which the external collection is integrated with the site.\n * @param - Options for creating an external database connection.\n * @returns Details of the created external database connection.\n */\n (\n externalDatabaseConnection: NonNullablePaths<\n ExternalDatabaseConnection,\n `name`,\n 2\n >,\n connectionType: ConnectionTypeWithLiterals\n ): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n >;\n}\n\nexport function updateExternalDatabaseConnection(\n httpClient: HttpClient\n): UpdateExternalDatabaseConnectionSignature {\n return (\n name: string,\n externalDatabaseConnection: UpdateExternalDatabaseConnection\n ) =>\n universalUpdateExternalDatabaseConnection(\n name,\n externalDatabaseConnection,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateExternalDatabaseConnectionSignature {\n /**\n * Updates an external database connection.\n *\n * > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.\n * @param - Name of the external database connection.\n *\n * An external database connection can connect to one or more external data collections or tables. These appear as `connectionName/dataCollectionId`.\n * @param - Options for updating an external database connection.\n * @param - Updated external database connection details. The existing connection is replaced with this version.\n * @returns Details of the updated external database connection.\n */\n (\n name: string,\n externalDatabaseConnection: UpdateExternalDatabaseConnection\n ): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n >;\n}\n\nexport function deleteExternalDatabaseConnection(\n httpClient: HttpClient\n): DeleteExternalDatabaseConnectionSignature {\n return (name: string) =>\n universalDeleteExternalDatabaseConnection(\n name,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteExternalDatabaseConnectionSignature {\n /**\n * Deletes an external database connection.\n *\n * > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database, create a new external database connection.\n * @param - Name of the external database connection to delete.\n */\n (name: string): Promise<void>;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n Capabilities,\n CauseOfFailure,\n CollectionsFound,\n ConnectionStatus,\n ConnectionType,\n CreateExternalDatabaseConnectionRequest,\n CreateExternalDatabaseConnectionResponse,\n DeleteExternalDatabaseConnectionRequest,\n DeleteExternalDatabaseConnectionResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExternalDatabaseConnection,\n FieldType,\n GetExternalDatabaseConnectionRequest,\n GetExternalDatabaseConnectionResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListExternalDatabaseConnectionsOptions,\n ListExternalDatabaseConnectionsRequest,\n ListExternalDatabaseConnectionsResponse,\n MessageEnvelope,\n Paging,\n PagingMetadata,\n ProtocolVersion,\n RestoreInfo,\n UpdateExternalDatabaseConnection,\n UpdateExternalDatabaseConnectionRequest,\n UpdateExternalDatabaseConnectionResponse,\n WebhookIdentityType,\n} from './data-v1-external-database-connection-external-database-connections.universal.js';\n","import {\n getExternalDatabaseConnection as publicGetExternalDatabaseConnection,\n listExternalDatabaseConnections as publicListExternalDatabaseConnections,\n createExternalDatabaseConnection as publicCreateExternalDatabaseConnection,\n updateExternalDatabaseConnection as publicUpdateExternalDatabaseConnection,\n deleteExternalDatabaseConnection as publicDeleteExternalDatabaseConnection,\n} from './data-v1-external-database-connection-external-database-connections.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getExternalDatabaseConnection: MaybeContext<\n BuildRESTFunction<typeof publicGetExternalDatabaseConnection> &\n typeof publicGetExternalDatabaseConnection\n> = /*#__PURE__*/ createRESTModule(publicGetExternalDatabaseConnection);\nexport const listExternalDatabaseConnections: MaybeContext<\n BuildRESTFunction<typeof publicListExternalDatabaseConnections> &\n typeof publicListExternalDatabaseConnections\n> = /*#__PURE__*/ createRESTModule(publicListExternalDatabaseConnections);\nexport const createExternalDatabaseConnection: MaybeContext<\n BuildRESTFunction<typeof publicCreateExternalDatabaseConnection> &\n typeof publicCreateExternalDatabaseConnection\n> = /*#__PURE__*/ createRESTModule(publicCreateExternalDatabaseConnection);\nexport const updateExternalDatabaseConnection: MaybeContext<\n BuildRESTFunction<typeof publicUpdateExternalDatabaseConnection> &\n typeof publicUpdateExternalDatabaseConnection\n> = /*#__PURE__*/ createRESTModule(publicUpdateExternalDatabaseConnection);\nexport const deleteExternalDatabaseConnection: MaybeContext<\n BuildRESTFunction<typeof publicDeleteExternalDatabaseConnection> &\n typeof publicDeleteExternalDatabaseConnection\n> = /*#__PURE__*/ createRESTModule(publicDeleteExternalDatabaseConnection);\n\nexport {\n CauseOfFailure,\n CollectionsFound,\n FieldType,\n ProtocolVersion,\n ConnectionType,\n WebhookIdentityType,\n} from './data-v1-external-database-connection-external-database-connections.universal.js';\nexport {\n ExternalDatabaseConnection,\n ConnectionStatus,\n Capabilities,\n GetExternalDatabaseConnectionRequest,\n GetExternalDatabaseConnectionResponse,\n ListExternalDatabaseConnectionsRequest,\n Paging,\n ListExternalDatabaseConnectionsResponse,\n PagingMetadata,\n CreateExternalDatabaseConnectionRequest,\n CreateExternalDatabaseConnectionResponse,\n UpdateExternalDatabaseConnectionRequest,\n UpdateExternalDatabaseConnectionResponse,\n DeleteExternalDatabaseConnectionRequest,\n DeleteExternalDatabaseConnectionResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n ListExternalDatabaseConnectionsOptions,\n UpdateExternalDatabaseConnection,\n} from './data-v1-external-database-connection-external-database-connections.universal.js';\nexport {\n CauseOfFailureWithLiterals,\n CollectionsFoundWithLiterals,\n FieldTypeWithLiterals,\n ProtocolVersionWithLiterals,\n ConnectionTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './data-v1-external-database-connection-external-database-connections.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0CAAAA;AAAA,EAAA,wCAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,uCAAAC;AAAA,EAAA,wCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,mFACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,QACE,SAAS;A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R;AACF;;;AE3xBO,SAASK,+BACd,YACwC;AACxC,SAAO,CAAC,SACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAsBO,SAASC,iCACd,YAC0C;AAC1C,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoBO,SAASC,kCACd,YAC2C;AAC3C,SAAO,CACL,4BAKA,mBAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiCO,SAASC,kCACd,YAC2C;AAC3C,SAAO,CACL,MACA,+BAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA+BO,SAASC,kCACd,YAC2C;AAC3C,SAAO,CAAC,SACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC5KA,IAAAC,uBAAiC;AAG1B,IAAMC,iCAGK,2DAAiBA,8BAAmC;AAC/D,IAAMC,mCAGK,2DAAiBA,gCAAqC;AACjE,IAAMC,oCAGK,2DAAiBA,iCAAsC;AAClE,IAAMC,oCAGK,2DAAiBA,iCAAsC;AAClE,IAAMC,oCAGK,2DAAiBA,iCAAsC;","names":["createExternalDatabaseConnection","deleteExternalDatabaseConnection","getExternalDatabaseConnection","listExternalDatabaseConnections","updateExternalDatabaseConnection","import_rest_modules","CauseOfFailure","CollectionsFound","FieldType","ProtocolVersion","ConnectionType","WebhookIdentityType","getExternalDatabaseConnection","sdkTransformError","listExternalDatabaseConnections","createExternalDatabaseConnection","updateExternalDatabaseConnection","deleteExternalDatabaseConnection","getExternalDatabaseConnection","listExternalDatabaseConnections","createExternalDatabaseConnection","updateExternalDatabaseConnection","deleteExternalDatabaseConnection","import_rest_modules","getExternalDatabaseConnection","listExternalDatabaseConnections","createExternalDatabaseConnection","updateExternalDatabaseConnection","deleteExternalDatabaseConnection"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/data-v1-external-database-connection-external-database-connections.universal.ts","../../src/data-v1-external-database-connection-external-database-connections.http.ts","../../src/data-v1-external-database-connection-external-database-connections.public.ts","../../src/data-v1-external-database-connection-external-database-connections.context.ts"],"sourcesContent":["export * from './src/data-v1-external-database-connection-external-database-connections.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDataV1ExternalDatabaseConnection from './data-v1-external-database-connection-external-database-connections.http.js';\n\n/** An external database connection defines a connection between an external database and a Wix site. */\nexport interface ExternalDatabaseConnection {\n /**\n * Name of the external database connection.\n *\n * An external database connection can connect to one or more external data collections or tables. These appear as `connectionName/dataCollectionId`.\n * @immutable\n * @minLength 1\n * @maxLength 255\n */\n name?: string;\n /**\n * Base URL for accessing and managing data in the external database. For example: `https://example.com/my-external-database`.\n * Required for STANDALONE connection type.\n * @format WEB_URL\n */\n endpoint?: string | null;\n /**\n * Settings specified to the external database connection as part of each request.\n *\n * 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.\n */\n configuration?: Record<string, any> | null;\n /**\n * Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure.\n * @readonly\n */\n connectionStatus?: ConnectionStatus;\n /**\n * Public key used to validate requests to the external database.\n * @readonly\n * @maxLength 128\n */\n publicKey?: string | null;\n /**\n * Capabilities of the external database.\n * @readonly\n */\n capabilities?: Capabilities;\n}\n\nexport enum CauseOfFailure {\n /** No connection failure. */\n NONE = 'NONE',\n /** General communication failure. */\n COMMUNICATION_FAILURE = 'COMMUNICATION_FAILURE',\n /** External database host is unreachable. */\n DESTINATION_HOST_UNREACHABLE = 'DESTINATION_HOST_UNREACHABLE',\n /** Unauthorized to access the external database. */\n UNAUTHORIZED = 'UNAUTHORIZED',\n /** `endpoint` is not set. */\n DESTINATION_ENDPOINT_NOT_DEFINED = 'DESTINATION_ENDPOINT_NOT_DEFINED',\n}\n\n/** @enumType */\nexport type CauseOfFailureWithLiterals =\n | CauseOfFailure\n | 'NONE'\n | 'COMMUNICATION_FAILURE'\n | 'DESTINATION_HOST_UNREACHABLE'\n | 'UNAUTHORIZED'\n | 'DESTINATION_ENDPOINT_NOT_DEFINED';\n\nexport enum CollectionsFound {\n /** Attempt to connect to the external database failed, so status is unknown. */\n UNKNOWN = 'UNKNOWN',\n /** External database has collections. */\n YES = 'YES',\n /** External database does not have any collections. */\n NO = 'NO',\n}\n\n/** @enumType */\nexport type CollectionsFoundWithLiterals =\n | CollectionsFound\n | 'UNKNOWN'\n | 'YES'\n | 'NO';\n\nexport enum FieldType {\n TEXT = 'TEXT',\n NUMBER = 'NUMBER',\n DATE = 'DATE',\n DATETIME = 'DATETIME',\n IMAGE = 'IMAGE',\n BOOLEAN = 'BOOLEAN',\n DOCUMENT = 'DOCUMENT',\n URL = 'URL',\n RICH_TEXT = 'RICH_TEXT',\n VIDEO = 'VIDEO',\n ANY = 'ANY',\n ARRAY_STRING = 'ARRAY_STRING',\n ARRAY_DOCUMENT = 'ARRAY_DOCUMENT',\n AUDIO = 'AUDIO',\n TIME = 'TIME',\n LANGUAGE = 'LANGUAGE',\n RICH_CONTENT = 'RICH_CONTENT',\n MEDIA_GALLERY = 'MEDIA_GALLERY',\n ADDRESS = 'ADDRESS',\n PAGE_LINK = 'PAGE_LINK',\n REFERENCE = 'REFERENCE',\n MULTI_REFERENCE = 'MULTI_REFERENCE',\n OBJECT = 'OBJECT',\n ARRAY = 'ARRAY',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_TIME = 'LEGACY_TIME',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_BOOK = 'LEGACY_BOOK',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_EXTERNAL_URL = 'LEGACY_EXTERNAL_URL',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_BROKEN_REFERENCE = 'LEGACY_BROKEN_REFERENCE',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_IMAGE = 'LEGACY_IMAGE',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_COLOR = 'LEGACY_COLOR',\n /** Deprecated - can’t be added to collections. Can only appear in older collections. */\n LEGACY_EXTERNAL_VIDEO = 'LEGACY_EXTERNAL_VIDEO',\n}\n\n/** @enumType */\nexport type FieldTypeWithLiterals =\n | FieldType\n | 'TEXT'\n | 'NUMBER'\n | 'DATE'\n | 'DATETIME'\n | 'IMAGE'\n | 'BOOLEAN'\n | 'DOCUMENT'\n | 'URL'\n | 'RICH_TEXT'\n | 'VIDEO'\n | 'ANY'\n | 'ARRAY_STRING'\n | 'ARRAY_DOCUMENT'\n | 'AUDIO'\n | 'TIME'\n | 'LANGUAGE'\n | 'RICH_CONTENT'\n | 'MEDIA_GALLERY'\n | 'ADDRESS'\n | 'PAGE_LINK'\n | 'REFERENCE'\n | 'MULTI_REFERENCE'\n | 'OBJECT'\n | 'ARRAY'\n | 'LEGACY_TIME'\n | 'LEGACY_BOOK'\n | 'LEGACY_EXTERNAL_URL'\n | 'LEGACY_BROKEN_REFERENCE'\n | 'LEGACY_IMAGE'\n | 'LEGACY_COLOR'\n | 'LEGACY_EXTERNAL_VIDEO';\n\nexport interface ConnectionStatus {\n /** Whether the connection was established successfully. */\n successful?: boolean;\n /** Whether and why the connection attempt failed. */\n causeOfFailure?: CauseOfFailureWithLiterals;\n /**\n * Whether the external database has collections.\n * @readonly\n */\n hasCollections?: CollectionsFoundWithLiterals;\n}\n\nexport enum ProtocolVersion {\n V1 = 'V1',\n V2 = 'V2',\n V3 = 'V3',\n}\n\n/** @enumType */\nexport type ProtocolVersionWithLiterals = ProtocolVersion | 'V1' | 'V2' | 'V3';\n\nexport interface Capabilities {\n /** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */\n collectionModificationsSupported?: boolean;\n /**\n * Field types the external database supports. Applies only when `collectionModificationsSupported` is set to `true`.\n * @maxSize 255\n */\n fieldTypes?: FieldTypeWithLiterals[];\n}\n\nexport interface GetExternalDatabaseConnectionRequest {\n /**\n * Name of the external database connection to retrieve.\n * @maxLength 255\n */\n name: string;\n}\n\nexport interface GetExternalDatabaseConnectionResponse {\n /** Details of the retrieved external database connection. */\n externalDatabaseConnection?: ExternalDatabaseConnection;\n}\n\nexport interface ListExternalDatabaseConnectionsRequest {\n /** Paging metadata. */\n paging?: Paging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListExternalDatabaseConnectionsResponse {\n /** List of external database connections. */\n externalDatabaseConnections?: ExternalDatabaseConnection[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface CreateExternalDatabaseConnectionRequest {\n /** External database connection details. */\n externalDatabaseConnection: ExternalDatabaseConnection;\n /** Connection type. The connection type specifies the type of adaptor by which the external collection is integrated with the site. */\n connectionType: ConnectionTypeWithLiterals;\n}\n\nexport enum ConnectionType {\n /** 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). */\n STANDALONE = 'STANDALONE',\n /** 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). */\n WIX_SERVICE_PLUGIN = 'WIX_SERVICE_PLUGIN',\n}\n\n/** @enumType */\nexport type ConnectionTypeWithLiterals =\n | ConnectionType\n | 'STANDALONE'\n | 'WIX_SERVICE_PLUGIN';\n\nexport interface CreateExternalDatabaseConnectionResponse {\n /** Details of the created external database connection. */\n externalDatabaseConnection?: ExternalDatabaseConnection;\n}\n\nexport interface UpdateExternalDatabaseConnectionRequest {\n /** Updated external database connection. The existing connection is replaced with this version. */\n externalDatabaseConnection: ExternalDatabaseConnection;\n}\n\nexport interface UpdateExternalDatabaseConnectionResponse {\n /** Details of the updated external database connection. */\n externalDatabaseConnection?: ExternalDatabaseConnection;\n}\n\nexport interface DeleteExternalDatabaseConnectionRequest {\n /**\n * Name of the external database connection to delete.\n * @maxLength 255\n */\n name: string;\n}\n\nexport interface DeleteExternalDatabaseConnectionResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Retrieves the specified external database connection.\n * @param name - Name of the external database connection to retrieve.\n * @public\n * @requiredField name\n * @permissionId WIX_DATA.GET_EXTERNAL_DATABASE_CONNECTION\n * @applicableIdentity APP\n * @returns Details of the retrieved external database connection.\n * @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.GetExternalDatabaseConnection\n */\nexport async function getExternalDatabaseConnection(\n name: string\n): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ name: name });\n\n const reqOpts =\n ambassadorWixDataV1ExternalDatabaseConnection.getExternalDatabaseConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.externalDatabaseConnection!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { name: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['name']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists all of the site's external database connections of all adaptor types.\n * @public\n * @permissionId WIX_DATA.LIST_EXTERNAL_DATABASE_CONNECTIONS\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.ListExternalDatabaseConnections\n */\nexport async function listExternalDatabaseConnections(\n options?: ListExternalDatabaseConnectionsOptions\n): Promise<\n NonNullablePaths<\n ListExternalDatabaseConnectionsResponse,\n | `externalDatabaseConnections`\n | `externalDatabaseConnections.${number}.name`\n | `externalDatabaseConnections.${number}.connectionStatus.successful`\n | `externalDatabaseConnections.${number}.connectionStatus.causeOfFailure`\n | `externalDatabaseConnections.${number}.connectionStatus.hasCollections`\n | `externalDatabaseConnections.${number}.capabilities.collectionModificationsSupported`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paging: options?.paging,\n });\n\n const reqOpts =\n ambassadorWixDataV1ExternalDatabaseConnection.listExternalDatabaseConnections(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { paging: '$[0].paging' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListExternalDatabaseConnectionsOptions {\n /** Paging metadata. */\n paging?: Paging;\n}\n\n/**\n * Creates a new external database connection.\n *\n * Before you can establish a connection between a site and an external database, you must prepare an external database adaptor.\n * @param externalDatabaseConnection - External database connection details.\n * @param connectionType - Connection type. The connection type specifies the type of adaptor by which the external collection is integrated with the site.\n * @public\n * @requiredField connectionType\n * @requiredField externalDatabaseConnection\n * @requiredField externalDatabaseConnection.name\n * @param options - Options for creating an external database connection.\n * @permissionId WIX_DATA.CREATE_EXTERNAL_DATABASE_CONNECTION\n * @applicableIdentity APP\n * @returns Details of the created external database connection.\n * @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.CreateExternalDatabaseConnection\n */\nexport async function createExternalDatabaseConnection(\n externalDatabaseConnection: NonNullablePaths<\n ExternalDatabaseConnection,\n `name`,\n 2\n >,\n connectionType: ConnectionTypeWithLiterals\n): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n externalDatabaseConnection: externalDatabaseConnection,\n connectionType: connectionType,\n });\n\n const reqOpts =\n ambassadorWixDataV1ExternalDatabaseConnection.createExternalDatabaseConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.externalDatabaseConnection!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n externalDatabaseConnection: '$[0]',\n connectionType: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['externalDatabaseConnection', 'connectionType']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates an external database connection.\n *\n * > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.\n * @param name - Name of the external database connection.\n *\n * An external database connection can connect to one or more external data collections or tables. These appear as `connectionName/dataCollectionId`.\n * @public\n * @requiredField externalDatabaseConnection\n * @requiredField name\n * @param options - Options for updating an external database connection.\n * @param externalDatabaseConnection - Updated external database connection details. The existing connection is replaced with this version.\n * @permissionId WIX_DATA.UPDATE_EXTERNAL_DATABASE_CONNECTION\n * @applicableIdentity APP\n * @returns Details of the updated external database connection.\n * @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.UpdateExternalDatabaseConnection\n */\nexport async function updateExternalDatabaseConnection(\n name: string,\n externalDatabaseConnection: UpdateExternalDatabaseConnection\n): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n externalDatabaseConnection: { ...externalDatabaseConnection, name: name },\n });\n\n const reqOpts =\n ambassadorWixDataV1ExternalDatabaseConnection.updateExternalDatabaseConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.externalDatabaseConnection!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { externalDatabaseConnection: '$[1]' },\n explicitPathsToArguments: { 'externalDatabaseConnection.name': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['name', 'externalDatabaseConnection']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateExternalDatabaseConnection {\n /**\n * Base URL for accessing and managing data in the external database. For example: `https://example.com/my-external-database`.\n * Required for STANDALONE connection type.\n * @format WEB_URL\n */\n endpoint?: string | null;\n /**\n * Settings specified to the external database connection as part of each request.\n *\n * 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.\n */\n configuration?: Record<string, any> | null;\n /**\n * Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure.\n * @readonly\n */\n connectionStatus?: ConnectionStatus;\n /**\n * Public key used to validate requests to the external database.\n * @readonly\n * @maxLength 128\n */\n publicKey?: string | null;\n /**\n * Capabilities of the external database.\n * @readonly\n */\n capabilities?: Capabilities;\n}\n\n/**\n * Deletes an external database connection.\n *\n * > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database, create a new external database connection.\n * @param name - Name of the external database connection to delete.\n * @public\n * @requiredField name\n * @permissionId WIX_DATA.DELETE_EXTERNAL_DATABASE_CONNECTION\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.DeleteExternalDatabaseConnection\n */\nexport async function deleteExternalDatabaseConnection(\n name: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ name: name });\n\n const reqOpts =\n ambassadorWixDataV1ExternalDatabaseConnection.deleteExternalDatabaseConnection(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { name: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['name']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/cloud-data',\n destPath: '',\n },\n ],\n 'code._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n ],\n 'cloud-data.wix-code.com': [\n {\n srcPath: '',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-data/v1/collections',\n destPath: '/v1/wix-data/collections',\n },\n {\n srcPath: '/wix-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/wix-data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n {\n srcPath: '/wix-data/v1/external-databases',\n destPath: '/v1/external-databases',\n },\n {\n srcPath: '/wix-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/data/v2/bulk/items',\n destPath: '/v2/bulk/items',\n },\n {\n srcPath: '/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data_external-database-connections';\n\n/** Retrieves the specified external database connection. */\nexport function getExternalDatabaseConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __getExternalDatabaseConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.external_database_connection',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.GetExternalDatabaseConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n {\n protoPath: '/v1/external-database-connections/{name}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getExternalDatabaseConnection;\n}\n\n/** Lists all of the site's external database connections of all adaptor types. */\nexport function listExternalDatabaseConnections(\n payload: object\n): RequestOptionsFactory<any> {\n function __listExternalDatabaseConnections({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.external_database_connection',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.ListExternalDatabaseConnections',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n { protoPath: '/v1/external-database-connections', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listExternalDatabaseConnections;\n}\n\n/**\n * Creates a new external database connection.\n *\n * Before you can establish a connection between a site and an external database, you must prepare an external database adaptor.\n */\nexport function createExternalDatabaseConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __createExternalDatabaseConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.external_database_connection',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.CreateExternalDatabaseConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n { protoPath: '/v1/external-database-connections', data: payload, host }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __createExternalDatabaseConnection;\n}\n\n/**\n * Updates an external database connection.\n *\n * > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.\n */\nexport function updateExternalDatabaseConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateExternalDatabaseConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.external_database_connection',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.UpdateExternalDatabaseConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n {\n protoPath:\n '/v1/external-database-connections/{externalDatabaseConnection.name}',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updateExternalDatabaseConnection;\n}\n\n/**\n * Deletes an external database connection.\n *\n * > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database, create a new external database connection.\n */\nexport function deleteExternalDatabaseConnection(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteExternalDatabaseConnection({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v1.external_database_connection',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.DeleteExternalDatabaseConnection',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(\n {\n protoPath: '/v1/external-database-connections/{name}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteExternalDatabaseConnection;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ConnectionTypeWithLiterals,\n ExternalDatabaseConnection,\n ListExternalDatabaseConnectionsOptions,\n ListExternalDatabaseConnectionsResponse,\n UpdateExternalDatabaseConnection,\n createExternalDatabaseConnection as universalCreateExternalDatabaseConnection,\n deleteExternalDatabaseConnection as universalDeleteExternalDatabaseConnection,\n getExternalDatabaseConnection as universalGetExternalDatabaseConnection,\n listExternalDatabaseConnections as universalListExternalDatabaseConnections,\n updateExternalDatabaseConnection as universalUpdateExternalDatabaseConnection,\n} from './data-v1-external-database-connection-external-database-connections.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/data' };\n\nexport function getExternalDatabaseConnection(\n httpClient: HttpClient\n): GetExternalDatabaseConnectionSignature {\n return (name: string) =>\n universalGetExternalDatabaseConnection(\n name,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetExternalDatabaseConnectionSignature {\n /**\n * Retrieves the specified external database connection.\n * @param - Name of the external database connection to retrieve.\n * @returns Details of the retrieved external database connection.\n */\n (name: string): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n >;\n}\n\nexport function listExternalDatabaseConnections(\n httpClient: HttpClient\n): ListExternalDatabaseConnectionsSignature {\n return (options?: ListExternalDatabaseConnectionsOptions) =>\n universalListExternalDatabaseConnections(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListExternalDatabaseConnectionsSignature {\n /**\n * Lists all of the site's external database connections of all adaptor types.\n */\n (options?: ListExternalDatabaseConnectionsOptions): Promise<\n NonNullablePaths<\n ListExternalDatabaseConnectionsResponse,\n | `externalDatabaseConnections`\n | `externalDatabaseConnections.${number}.name`\n | `externalDatabaseConnections.${number}.connectionStatus.successful`\n | `externalDatabaseConnections.${number}.connectionStatus.causeOfFailure`\n | `externalDatabaseConnections.${number}.connectionStatus.hasCollections`\n | `externalDatabaseConnections.${number}.capabilities.collectionModificationsSupported`,\n 5\n >\n >;\n}\n\nexport function createExternalDatabaseConnection(\n httpClient: HttpClient\n): CreateExternalDatabaseConnectionSignature {\n return (\n externalDatabaseConnection: NonNullablePaths<\n ExternalDatabaseConnection,\n `name`,\n 2\n >,\n connectionType: ConnectionTypeWithLiterals\n ) =>\n universalCreateExternalDatabaseConnection(\n externalDatabaseConnection,\n connectionType,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateExternalDatabaseConnectionSignature {\n /**\n * Creates a new external database connection.\n *\n * Before you can establish a connection between a site and an external database, you must prepare an external database adaptor.\n * @param - External database connection details.\n * @param - Connection type. The connection type specifies the type of adaptor by which the external collection is integrated with the site.\n * @param - Options for creating an external database connection.\n * @returns Details of the created external database connection.\n */\n (\n externalDatabaseConnection: NonNullablePaths<\n ExternalDatabaseConnection,\n `name`,\n 2\n >,\n connectionType: ConnectionTypeWithLiterals\n ): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n >;\n}\n\nexport function updateExternalDatabaseConnection(\n httpClient: HttpClient\n): UpdateExternalDatabaseConnectionSignature {\n return (\n name: string,\n externalDatabaseConnection: UpdateExternalDatabaseConnection\n ) =>\n universalUpdateExternalDatabaseConnection(\n name,\n externalDatabaseConnection,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateExternalDatabaseConnectionSignature {\n /**\n * Updates an external database connection.\n *\n * > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.\n * @param - Name of the external database connection.\n *\n * An external database connection can connect to one or more external data collections or tables. These appear as `connectionName/dataCollectionId`.\n * @param - Options for updating an external database connection.\n * @param - Updated external database connection details. The existing connection is replaced with this version.\n * @returns Details of the updated external database connection.\n */\n (\n name: string,\n externalDatabaseConnection: UpdateExternalDatabaseConnection\n ): Promise<\n NonNullablePaths<\n ExternalDatabaseConnection,\n | `name`\n | `connectionStatus.successful`\n | `connectionStatus.causeOfFailure`\n | `connectionStatus.hasCollections`\n | `capabilities.collectionModificationsSupported`\n | `capabilities.fieldTypes`,\n 3\n >\n >;\n}\n\nexport function deleteExternalDatabaseConnection(\n httpClient: HttpClient\n): DeleteExternalDatabaseConnectionSignature {\n return (name: string) =>\n universalDeleteExternalDatabaseConnection(\n name,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteExternalDatabaseConnectionSignature {\n /**\n * Deletes an external database connection.\n *\n * > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database, create a new external database connection.\n * @param - Name of the external database connection to delete.\n */\n (name: string): Promise<void>;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n Capabilities,\n CauseOfFailure,\n CollectionsFound,\n ConnectionStatus,\n ConnectionType,\n CreateExternalDatabaseConnectionRequest,\n CreateExternalDatabaseConnectionResponse,\n DeleteExternalDatabaseConnectionRequest,\n DeleteExternalDatabaseConnectionResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExternalDatabaseConnection,\n FieldType,\n GetExternalDatabaseConnectionRequest,\n GetExternalDatabaseConnectionResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListExternalDatabaseConnectionsOptions,\n ListExternalDatabaseConnectionsRequest,\n ListExternalDatabaseConnectionsResponse,\n MessageEnvelope,\n Paging,\n PagingMetadata,\n ProtocolVersion,\n RestoreInfo,\n UpdateExternalDatabaseConnection,\n UpdateExternalDatabaseConnectionRequest,\n UpdateExternalDatabaseConnectionResponse,\n WebhookIdentityType,\n} from './data-v1-external-database-connection-external-database-connections.universal.js';\n","import {\n getExternalDatabaseConnection as publicGetExternalDatabaseConnection,\n listExternalDatabaseConnections as publicListExternalDatabaseConnections,\n createExternalDatabaseConnection as publicCreateExternalDatabaseConnection,\n updateExternalDatabaseConnection as publicUpdateExternalDatabaseConnection,\n deleteExternalDatabaseConnection as publicDeleteExternalDatabaseConnection,\n} from './data-v1-external-database-connection-external-database-connections.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getExternalDatabaseConnection: MaybeContext<\n BuildRESTFunction<typeof publicGetExternalDatabaseConnection> &\n typeof publicGetExternalDatabaseConnection\n> = /*#__PURE__*/ createRESTModule(publicGetExternalDatabaseConnection);\nexport const listExternalDatabaseConnections: MaybeContext<\n BuildRESTFunction<typeof publicListExternalDatabaseConnections> &\n typeof publicListExternalDatabaseConnections\n> = /*#__PURE__*/ createRESTModule(publicListExternalDatabaseConnections);\nexport const createExternalDatabaseConnection: MaybeContext<\n BuildRESTFunction<typeof publicCreateExternalDatabaseConnection> &\n typeof publicCreateExternalDatabaseConnection\n> = /*#__PURE__*/ createRESTModule(publicCreateExternalDatabaseConnection);\nexport const updateExternalDatabaseConnection: MaybeContext<\n BuildRESTFunction<typeof publicUpdateExternalDatabaseConnection> &\n typeof publicUpdateExternalDatabaseConnection\n> = /*#__PURE__*/ createRESTModule(publicUpdateExternalDatabaseConnection);\nexport const deleteExternalDatabaseConnection: MaybeContext<\n BuildRESTFunction<typeof publicDeleteExternalDatabaseConnection> &\n typeof publicDeleteExternalDatabaseConnection\n> = /*#__PURE__*/ createRESTModule(publicDeleteExternalDatabaseConnection);\n\nexport {\n CauseOfFailure,\n CollectionsFound,\n FieldType,\n ProtocolVersion,\n ConnectionType,\n WebhookIdentityType,\n} from './data-v1-external-database-connection-external-database-connections.universal.js';\nexport {\n ExternalDatabaseConnection,\n ConnectionStatus,\n Capabilities,\n GetExternalDatabaseConnectionRequest,\n GetExternalDatabaseConnectionResponse,\n ListExternalDatabaseConnectionsRequest,\n Paging,\n ListExternalDatabaseConnectionsResponse,\n PagingMetadata,\n CreateExternalDatabaseConnectionRequest,\n CreateExternalDatabaseConnectionResponse,\n UpdateExternalDatabaseConnectionRequest,\n UpdateExternalDatabaseConnectionResponse,\n DeleteExternalDatabaseConnectionRequest,\n DeleteExternalDatabaseConnectionResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n ListExternalDatabaseConnectionsOptions,\n UpdateExternalDatabaseConnection,\n} from './data-v1-external-database-connection-external-database-connections.universal.js';\nexport {\n CauseOfFailureWithLiterals,\n CollectionsFoundWithLiterals,\n FieldTypeWithLiterals,\n ProtocolVersionWithLiterals,\n ConnectionTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './data-v1-external-database-connection-external-database-connections.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0CAAAA;AAAA,EAAA,wCAAAC;AAAA,EAAA,qCAAAC;AAAA,EAAA,uCAAAC;AAAA,EAAA,wCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,mFACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA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AsBO,SAASC,iCACd,YAC0C;AAC1C,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoBO,SAASC,kCACd,YAC2C;AAC3C,SAAO,CACL,4BAKA,mBAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiCO,SAASC,kCACd,YAC2C;AAC3C,SAAO,CACL,MACA,+BAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA+BO,SAASC,kCACd,YAC2C;AAC3C,SAAO,CAAC,SACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC5KA,IAAAC,uBAAiC;AAG1B,IAAMC,iCAGK,2DAAiBA,8BAAmC;AAC/D,IAAMC,mCAGK,2DAAiBA,gCAAqC;AACjE,IAAMC,oCAGK,2DAAiBA,iCAAsC;AAClE,IAAMC,oCAGK,2DAAiBA,iCAAsC;AAClE,IAAMC,oCAGK,2DAAiBA,iCAAsC;","names":["createExternalDatabaseConnection","deleteExternalDatabaseConnection","getExternalDatabaseConnection","listExternalDatabaseConnections","updateExternalDatabaseConnection","import_rest_modules","CauseOfFailure","CollectionsFound","FieldType","ProtocolVersion","ConnectionType","WebhookIdentityType","getExternalDatabaseConnection","sdkTransformError","listExternalDatabaseConnections","createExternalDatabaseConnection","updateExternalDatabaseConnection","deleteExternalDatabaseConnection","getExternalDatabaseConnection","listExternalDatabaseConnections","createExternalDatabaseConnection","updateExternalDatabaseConnection","deleteExternalDatabaseConnection","import_rest_modules","getExternalDatabaseConnection","listExternalDatabaseConnections","createExternalDatabaseConnection","updateExternalDatabaseConnection","deleteExternalDatabaseConnection"]}
@@ -65,7 +65,6 @@ declare enum CollectionsFound {
65
65
  /** @enumType */
66
66
  type CollectionsFoundWithLiterals = CollectionsFound | 'UNKNOWN' | 'YES' | 'NO';
67
67
  declare enum FieldType {
68
- UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
69
68
  TEXT = "TEXT",
70
69
  NUMBER = "NUMBER",
71
70
  DATE = "DATE",
@@ -106,7 +105,7 @@ declare enum FieldType {
106
105
  LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
107
106
  }
108
107
  /** @enumType */
109
- type FieldTypeWithLiterals = FieldType | 'UNKNOWN_FIELD_TYPE' | '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';
108
+ 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';
110
109
  interface ConnectionStatus {
111
110
  /** Whether the connection was established successfully. */
112
111
  successful?: boolean;
@@ -119,13 +118,12 @@ interface ConnectionStatus {
119
118
  hasCollections?: CollectionsFoundWithLiterals;
120
119
  }
121
120
  declare enum ProtocolVersion {
122
- UNKNOWN_PROTOCOL_VERSION = "UNKNOWN_PROTOCOL_VERSION",
123
121
  V1 = "V1",
124
122
  V2 = "V2",
125
123
  V3 = "V3"
126
124
  }
127
125
  /** @enumType */
128
- type ProtocolVersionWithLiterals = ProtocolVersion | 'UNKNOWN_PROTOCOL_VERSION' | 'V1' | 'V2' | 'V3';
126
+ type ProtocolVersionWithLiterals = ProtocolVersion | 'V1' | 'V2' | 'V3';
129
127
  interface Capabilities {
130
128
  /** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */
131
129
  collectionModificationsSupported?: boolean;
@@ -179,15 +177,13 @@ interface CreateExternalDatabaseConnectionRequest {
179
177
  connectionType: ConnectionTypeWithLiterals;
180
178
  }
181
179
  declare enum ConnectionType {
182
- /** Unknown connection type. */
183
- UNKNOWN_CONNECTION_TYPE = "UNKNOWN_CONNECTION_TYPE",
184
180
  /** 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). */
185
181
  STANDALONE = "STANDALONE",
186
182
  /** 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). */
187
183
  WIX_SERVICE_PLUGIN = "WIX_SERVICE_PLUGIN"
188
184
  }
189
185
  /** @enumType */
190
- type ConnectionTypeWithLiterals = ConnectionType | 'UNKNOWN_CONNECTION_TYPE' | 'STANDALONE' | 'WIX_SERVICE_PLUGIN';
186
+ type ConnectionTypeWithLiterals = ConnectionType | 'STANDALONE' | 'WIX_SERVICE_PLUGIN';
191
187
  interface CreateExternalDatabaseConnectionResponse {
192
188
  /** Details of the created external database connection. */
193
189
  externalDatabaseConnection?: ExternalDatabaseConnection;
@@ -523,7 +523,6 @@ var CollectionsFound = /* @__PURE__ */ ((CollectionsFound2) => {
523
523
  return CollectionsFound2;
524
524
  })(CollectionsFound || {});
525
525
  var FieldType = /* @__PURE__ */ ((FieldType2) => {
526
- FieldType2["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
527
526
  FieldType2["TEXT"] = "TEXT";
528
527
  FieldType2["NUMBER"] = "NUMBER";
529
528
  FieldType2["DATE"] = "DATE";
@@ -558,14 +557,12 @@ var FieldType = /* @__PURE__ */ ((FieldType2) => {
558
557
  return FieldType2;
559
558
  })(FieldType || {});
560
559
  var ProtocolVersion = /* @__PURE__ */ ((ProtocolVersion2) => {
561
- ProtocolVersion2["UNKNOWN_PROTOCOL_VERSION"] = "UNKNOWN_PROTOCOL_VERSION";
562
560
  ProtocolVersion2["V1"] = "V1";
563
561
  ProtocolVersion2["V2"] = "V2";
564
562
  ProtocolVersion2["V3"] = "V3";
565
563
  return ProtocolVersion2;
566
564
  })(ProtocolVersion || {});
567
565
  var ConnectionType = /* @__PURE__ */ ((ConnectionType2) => {
568
- ConnectionType2["UNKNOWN_CONNECTION_TYPE"] = "UNKNOWN_CONNECTION_TYPE";
569
566
  ConnectionType2["STANDALONE"] = "STANDALONE";
570
567
  ConnectionType2["WIX_SERVICE_PLUGIN"] = "WIX_SERVICE_PLUGIN";
571
568
  return ConnectionType2;