@wix/auto_sdk_data_external-database-connections 1.0.16 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/{data-v1-external-database-connection-external-database-connections.universal-DDx0w2iE.d.ts → index.typings.d.ts} +74 -1
- package/build/cjs/index.typings.js +682 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/{data-v1-external-database-connection-external-database-connections.universal-DDx0w2iE.d.mts → index.typings.d.mts} +74 -1
- package/build/es/index.typings.mjs +648 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/{data-v1-external-database-connection-external-database-connections.universal-DDx0w2iE.d.ts → index.typings.d.ts} +74 -1
- package/build/internal/cjs/index.typings.js +682 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/{data-v1-external-database-connection-external-database-connections.universal-DDx0w2iE.d.mts → index.typings.d.mts} +74 -1
- package/build/internal/es/index.typings.mjs +648 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { ExternalDatabaseConnection, ListExternalDatabaseConnectionsOptions, ListExternalDatabaseConnectionsResponse, ConnectionTypeWithLiterals, UpdateExternalDatabaseConnection } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, Capabilities, CauseOfFailure, CollectionsFound, ConnectionStatus, ConnectionType, CreateExternalDatabaseConnectionRequest, CreateExternalDatabaseConnectionResponse, DeleteExternalDatabaseConnectionRequest, DeleteExternalDatabaseConnectionResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FieldType, GetExternalDatabaseConnectionRequest, GetExternalDatabaseConnectionResponse, IdentificationData, IdentificationDataIdOneOf, ListExternalDatabaseConnectionsRequest, MessageEnvelope, Paging, PagingMetadata, ProtocolVersion, RestoreInfo, UpdateExternalDatabaseConnectionRequest, UpdateExternalDatabaseConnectionResponse, WebhookIdentityType } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function getExternalDatabaseConnection$1(httpClient: HttpClient): GetExternalDatabaseConnectionSignature;
|
|
6
6
|
interface GetExternalDatabaseConnectionSignature {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
1
3
|
/** An external database connection defines a connection between an external database and a Wix site. */
|
|
2
4
|
interface ExternalDatabaseConnection {
|
|
3
5
|
/**
|
|
@@ -121,6 +123,8 @@ declare enum ProtocolVersion {
|
|
|
121
123
|
V2 = "V2",
|
|
122
124
|
V3 = "V3"
|
|
123
125
|
}
|
|
126
|
+
/** @enumType */
|
|
127
|
+
type ProtocolVersionWithLiterals = ProtocolVersion | 'UNKNOWN_PROTOCOL_VERSION' | 'V1' | 'V2' | 'V3';
|
|
124
128
|
interface Capabilities {
|
|
125
129
|
/** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */
|
|
126
130
|
collectionModificationsSupported?: boolean;
|
|
@@ -338,10 +342,67 @@ declare enum WebhookIdentityType {
|
|
|
338
342
|
}
|
|
339
343
|
/** @enumType */
|
|
340
344
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
345
|
+
type ExternalDatabaseConnectionNonNullablePaths = `name` | `connectionStatus.successful` | `connectionStatus.causeOfFailure` | `connectionStatus.hasCollections` | `capabilities.collectionModificationsSupported` | `capabilities.fieldTypes`;
|
|
346
|
+
/**
|
|
347
|
+
* Retrieves the specified external database connection.
|
|
348
|
+
* @param name - Name of the external database connection to retrieve.
|
|
349
|
+
* @public
|
|
350
|
+
* @requiredField name
|
|
351
|
+
* @permissionId WIX_DATA.GET_EXTERNAL_DATABASE_CONNECTION
|
|
352
|
+
* @applicableIdentity APP
|
|
353
|
+
* @returns Details of the retrieved external database connection.
|
|
354
|
+
* @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.GetExternalDatabaseConnection
|
|
355
|
+
*/
|
|
356
|
+
declare function getExternalDatabaseConnection(name: string): Promise<NonNullablePaths<ExternalDatabaseConnection, ExternalDatabaseConnectionNonNullablePaths>>;
|
|
357
|
+
/**
|
|
358
|
+
* Lists all of the site's external database connections of all adaptor types.
|
|
359
|
+
* @public
|
|
360
|
+
* @permissionId WIX_DATA.LIST_EXTERNAL_DATABASE_CONNECTIONS
|
|
361
|
+
* @applicableIdentity APP
|
|
362
|
+
* @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.ListExternalDatabaseConnections
|
|
363
|
+
*/
|
|
364
|
+
declare function listExternalDatabaseConnections(options?: ListExternalDatabaseConnectionsOptions): Promise<NonNullablePaths<ListExternalDatabaseConnectionsResponse, {
|
|
365
|
+
[P in ExternalDatabaseConnectionNonNullablePaths]: `externalDatabaseConnections.${number}.${P}`;
|
|
366
|
+
}[ExternalDatabaseConnectionNonNullablePaths]>>;
|
|
341
367
|
interface ListExternalDatabaseConnectionsOptions {
|
|
342
368
|
/** Paging metadata. */
|
|
343
369
|
paging?: Paging;
|
|
344
370
|
}
|
|
371
|
+
/**
|
|
372
|
+
* Creates a new external database connection.
|
|
373
|
+
*
|
|
374
|
+
* Before you can establish a connection between a site and an external database, you must prepare an external database adaptor.
|
|
375
|
+
* @param externalDatabaseConnection - External database connection details.
|
|
376
|
+
* @param connectionType - Connection type. The connection type specifies the type of adaptor by which the external collection is integrated with the site.
|
|
377
|
+
* @public
|
|
378
|
+
* @requiredField connectionType
|
|
379
|
+
* @requiredField externalDatabaseConnection
|
|
380
|
+
* @requiredField externalDatabaseConnection.name
|
|
381
|
+
* @param options - Options for creating an external database connection.
|
|
382
|
+
* @permissionId WIX_DATA.CREATE_EXTERNAL_DATABASE_CONNECTION
|
|
383
|
+
* @applicableIdentity APP
|
|
384
|
+
* @returns Details of the created external database connection.
|
|
385
|
+
* @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.CreateExternalDatabaseConnection
|
|
386
|
+
*/
|
|
387
|
+
declare function createExternalDatabaseConnection(externalDatabaseConnection: NonNullablePaths<ExternalDatabaseConnection, `name`>, connectionType: ConnectionTypeWithLiterals): Promise<NonNullablePaths<ExternalDatabaseConnection, ExternalDatabaseConnectionNonNullablePaths>>;
|
|
388
|
+
/**
|
|
389
|
+
* Updates an external database connection.
|
|
390
|
+
*
|
|
391
|
+
* > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.
|
|
392
|
+
* @param name - Name of the external database connection.
|
|
393
|
+
*
|
|
394
|
+
* An external database connection can connect to one or more external data collections or tables. These appear as `connectionName/dataCollectionId`.
|
|
395
|
+
* @public
|
|
396
|
+
* @requiredField externalDatabaseConnection
|
|
397
|
+
* @requiredField name
|
|
398
|
+
* @param options - Options for updating an external database connection.
|
|
399
|
+
* @param externalDatabaseConnection - Updated external database connection details. The existing connection is replaced with this version.
|
|
400
|
+
* @permissionId WIX_DATA.UPDATE_EXTERNAL_DATABASE_CONNECTION
|
|
401
|
+
* @applicableIdentity APP
|
|
402
|
+
* @returns Details of the updated external database connection.
|
|
403
|
+
* @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.UpdateExternalDatabaseConnection
|
|
404
|
+
*/
|
|
405
|
+
declare function updateExternalDatabaseConnection(name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection): Promise<NonNullablePaths<ExternalDatabaseConnection, ExternalDatabaseConnectionNonNullablePaths>>;
|
|
345
406
|
interface UpdateExternalDatabaseConnection {
|
|
346
407
|
/**
|
|
347
408
|
* Base URL for accessing and managing data in the external database. For example: `https://example.com/my-external-database`.
|
|
@@ -371,5 +432,17 @@ interface UpdateExternalDatabaseConnection {
|
|
|
371
432
|
*/
|
|
372
433
|
capabilities?: Capabilities;
|
|
373
434
|
}
|
|
435
|
+
/**
|
|
436
|
+
* Deletes an external database connection.
|
|
437
|
+
*
|
|
438
|
+
* > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database, create a new external database connection.
|
|
439
|
+
* @param name - Name of the external database connection to delete.
|
|
440
|
+
* @public
|
|
441
|
+
* @requiredField name
|
|
442
|
+
* @permissionId WIX_DATA.DELETE_EXTERNAL_DATABASE_CONNECTION
|
|
443
|
+
* @applicableIdentity APP
|
|
444
|
+
* @fqn com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.DeleteExternalDatabaseConnection
|
|
445
|
+
*/
|
|
446
|
+
declare function deleteExternalDatabaseConnection(name: string): Promise<void>;
|
|
374
447
|
|
|
375
|
-
export { type ActionEvent
|
|
448
|
+
export { type ActionEvent, type Capabilities, CauseOfFailure, type CauseOfFailureWithLiterals, CollectionsFound, type CollectionsFoundWithLiterals, type ConnectionStatus, ConnectionType, type ConnectionTypeWithLiterals, type CreateExternalDatabaseConnectionRequest, type CreateExternalDatabaseConnectionResponse, type DeleteExternalDatabaseConnectionRequest, type DeleteExternalDatabaseConnectionResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExternalDatabaseConnection, FieldType, type FieldTypeWithLiterals, type GetExternalDatabaseConnectionRequest, type GetExternalDatabaseConnectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListExternalDatabaseConnectionsOptions, type ListExternalDatabaseConnectionsRequest, type ListExternalDatabaseConnectionsResponse, type MessageEnvelope, type Paging, type PagingMetadata, ProtocolVersion, type ProtocolVersionWithLiterals, type RestoreInfo, type UpdateExternalDatabaseConnection, type UpdateExternalDatabaseConnectionRequest, type UpdateExternalDatabaseConnectionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createExternalDatabaseConnection, deleteExternalDatabaseConnection, getExternalDatabaseConnection, listExternalDatabaseConnections, updateExternalDatabaseConnection };
|