@wix/auto_sdk_data_external-database-connections 1.0.0
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 +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.context.d.ts +9 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.context.js +18 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.context.js.map +1 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.http.d.ts +32 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.http.js +445 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.http.js.map +1 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.meta.d.ts +23 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.meta.js +127 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.meta.js.map +1 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.public.d.ts +69 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.public.js +43 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.public.js.map +1 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.types.d.ts +326 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.types.js +92 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.types.js.map +1 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.universal.d.ts +448 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.universal.js +330 -0
- package/build/cjs/src/data-v1-external-database-connection-external-database-connections.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.context.d.ts +9 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.context.js +9 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.context.js.map +1 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.http.d.ts +32 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.http.js +437 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.http.js.map +1 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.meta.d.ts +23 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.meta.js +96 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.meta.js.map +1 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.public.d.ts +69 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.public.js +29 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.public.js.map +1 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.types.d.ts +326 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.types.js +89 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.types.js.map +1 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.universal.d.ts +448 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.universal.js +299 -0
- package/build/es/src/data-v1-external-database-connection-external-database-connections.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.context.d.ts +9 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.context.js +18 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.context.js.map +1 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.http.d.ts +32 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.http.js +445 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.http.js.map +1 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.meta.d.ts +23 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.meta.js +127 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.meta.js.map +1 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.public.d.ts +69 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.public.js +43 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.public.js.map +1 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.types.d.ts +326 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.types.js +92 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.types.js.map +1 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.universal.d.ts +448 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.universal.js +330 -0
- package/build/internal/cjs/src/data-v1-external-database-connection-external-database-connections.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.context.d.ts +9 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.context.js +9 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.context.js.map +1 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.http.d.ts +32 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.http.js +437 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.http.js.map +1 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.meta.d.ts +23 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.meta.js +96 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.meta.js.map +1 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.public.d.ts +69 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.public.js +29 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.public.js.map +1 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.types.d.ts +326 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.types.js +89 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.types.js.map +1 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.universal.d.ts +448 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.universal.js +299 -0
- package/build/internal/es/src/data-v1-external-database-connection-external-database-connections.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
package/build/es/src/data-v1-external-database-connection-external-database-connections.public.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createExternalDatabaseConnection as universalCreateExternalDatabaseConnection, deleteExternalDatabaseConnection as universalDeleteExternalDatabaseConnection, getExternalDatabaseConnection as universalGetExternalDatabaseConnection, listExternalDatabaseConnections as universalListExternalDatabaseConnections, updateExternalDatabaseConnection as universalUpdateExternalDatabaseConnection, } from './data-v1-external-database-connection-external-database-connections.universal.js';
|
|
2
|
+
export const __metadata = { PACKAGE_NAME: '@wix/data' };
|
|
3
|
+
export function getExternalDatabaseConnection(httpClient) {
|
|
4
|
+
return (name) => universalGetExternalDatabaseConnection(name,
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
{ httpClient });
|
|
7
|
+
}
|
|
8
|
+
export function listExternalDatabaseConnections(httpClient) {
|
|
9
|
+
return (options) => universalListExternalDatabaseConnections(options,
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
{ httpClient });
|
|
12
|
+
}
|
|
13
|
+
export function createExternalDatabaseConnection(httpClient) {
|
|
14
|
+
return (externalDatabaseConnection, connectionType) => universalCreateExternalDatabaseConnection(externalDatabaseConnection, connectionType,
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
{ httpClient });
|
|
17
|
+
}
|
|
18
|
+
export function updateExternalDatabaseConnection(httpClient) {
|
|
19
|
+
return (name, externalDatabaseConnection) => universalUpdateExternalDatabaseConnection(name, externalDatabaseConnection,
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
{ httpClient });
|
|
22
|
+
}
|
|
23
|
+
export function deleteExternalDatabaseConnection(httpClient) {
|
|
24
|
+
return (name) => universalDeleteExternalDatabaseConnection(name,
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
{ httpClient });
|
|
27
|
+
}
|
|
28
|
+
export { CauseOfFailure, CollectionsFound, ConnectionType, FieldType, ProtocolVersion, WebhookIdentityType, } from './data-v1-external-database-connection-external-database-connections.universal.js';
|
|
29
|
+
//# sourceMappingURL=data-v1-external-database-connection-external-database-connections.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-v1-external-database-connection-external-database-connections.public.js","sourceRoot":"","sources":["../../../src/data-v1-external-database-connection-external-database-connections.public.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,gCAAgC,IAAI,yCAAyC,EAC7E,gCAAgC,IAAI,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|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
/** An external database connection defines a connection between an external database and a Wix site. */
|
|
2
|
+
export interface ExternalDatabaseConnection {
|
|
3
|
+
/**
|
|
4
|
+
* Name of the external database connection.
|
|
5
|
+
*
|
|
6
|
+
* An external database connection can connect to one or more external data collections or tables. These appear as `connectionName/dataCollectionId`.
|
|
7
|
+
*/
|
|
8
|
+
name?: string;
|
|
9
|
+
/** Base URL for accessing and managing data in the external database. For example: `https://example.com/my-external-database`. */
|
|
10
|
+
endpoint?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Settings specified to the external database connection as part of each request.
|
|
13
|
+
*
|
|
14
|
+
* 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.
|
|
15
|
+
*/
|
|
16
|
+
configuration?: Record<string, any> | null;
|
|
17
|
+
/**
|
|
18
|
+
* Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
connectionStatus?: ConnectionStatus;
|
|
22
|
+
/**
|
|
23
|
+
* Public key used to validate requests to the external database.
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
26
|
+
publicKey?: string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Capabilities of the external database.
|
|
29
|
+
* @readonly
|
|
30
|
+
*/
|
|
31
|
+
capabilities?: Capabilities;
|
|
32
|
+
}
|
|
33
|
+
export declare enum CauseOfFailure {
|
|
34
|
+
/** No connection failure. */
|
|
35
|
+
NONE = "NONE",
|
|
36
|
+
/** General communication failure. */
|
|
37
|
+
COMMUNICATION_FAILURE = "COMMUNICATION_FAILURE",
|
|
38
|
+
/** External database host is unreachable. */
|
|
39
|
+
DESTINATION_HOST_UNREACHABLE = "DESTINATION_HOST_UNREACHABLE",
|
|
40
|
+
/** Unauthorized to access the external database. */
|
|
41
|
+
UNAUTHORIZED = "UNAUTHORIZED",
|
|
42
|
+
/** `endpoint` is not set. */
|
|
43
|
+
DESTINATION_ENDPOINT_NOT_DEFINED = "DESTINATION_ENDPOINT_NOT_DEFINED"
|
|
44
|
+
}
|
|
45
|
+
export declare enum CollectionsFound {
|
|
46
|
+
/** Attempt to connect to the external database failed, so status is unknown. */
|
|
47
|
+
UNKNOWN = "UNKNOWN",
|
|
48
|
+
/** External database has collections. */
|
|
49
|
+
YES = "YES",
|
|
50
|
+
/** External database does not have any collections. */
|
|
51
|
+
NO = "NO"
|
|
52
|
+
}
|
|
53
|
+
export declare enum FieldType {
|
|
54
|
+
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
55
|
+
TEXT = "TEXT",
|
|
56
|
+
NUMBER = "NUMBER",
|
|
57
|
+
DATE = "DATE",
|
|
58
|
+
DATETIME = "DATETIME",
|
|
59
|
+
IMAGE = "IMAGE",
|
|
60
|
+
BOOLEAN = "BOOLEAN",
|
|
61
|
+
DOCUMENT = "DOCUMENT",
|
|
62
|
+
URL = "URL",
|
|
63
|
+
RICH_TEXT = "RICH_TEXT",
|
|
64
|
+
VIDEO = "VIDEO",
|
|
65
|
+
ANY = "ANY",
|
|
66
|
+
ARRAY_STRING = "ARRAY_STRING",
|
|
67
|
+
ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
|
|
68
|
+
AUDIO = "AUDIO",
|
|
69
|
+
TIME = "TIME",
|
|
70
|
+
LANGUAGE = "LANGUAGE",
|
|
71
|
+
RICH_CONTENT = "RICH_CONTENT",
|
|
72
|
+
MEDIA_GALLERY = "MEDIA_GALLERY",
|
|
73
|
+
ADDRESS = "ADDRESS",
|
|
74
|
+
PAGE_LINK = "PAGE_LINK",
|
|
75
|
+
REFERENCE = "REFERENCE",
|
|
76
|
+
MULTI_REFERENCE = "MULTI_REFERENCE",
|
|
77
|
+
OBJECT = "OBJECT",
|
|
78
|
+
ARRAY = "ARRAY",
|
|
79
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
80
|
+
LEGACY_TIME = "LEGACY_TIME",
|
|
81
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
82
|
+
LEGACY_BOOK = "LEGACY_BOOK",
|
|
83
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
84
|
+
LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL",
|
|
85
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
86
|
+
LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE",
|
|
87
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
88
|
+
LEGACY_IMAGE = "LEGACY_IMAGE",
|
|
89
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
90
|
+
LEGACY_COLOR = "LEGACY_COLOR",
|
|
91
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
92
|
+
LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
|
|
93
|
+
}
|
|
94
|
+
export interface ConnectionStatus {
|
|
95
|
+
/** Whether the connection was established successfully. */
|
|
96
|
+
successful?: boolean;
|
|
97
|
+
/** Whether and why the connection attempt failed. */
|
|
98
|
+
causeOfFailure?: CauseOfFailure;
|
|
99
|
+
/**
|
|
100
|
+
* Whether the external database has collections.
|
|
101
|
+
* @readonly
|
|
102
|
+
*/
|
|
103
|
+
hasCollections?: CollectionsFound;
|
|
104
|
+
}
|
|
105
|
+
export declare enum ProtocolVersion {
|
|
106
|
+
UNKNOWN_PROTOCOL_VERSION = "UNKNOWN_PROTOCOL_VERSION",
|
|
107
|
+
V1 = "V1",
|
|
108
|
+
V2 = "V2",
|
|
109
|
+
V3 = "V3"
|
|
110
|
+
}
|
|
111
|
+
export interface Capabilities {
|
|
112
|
+
/** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */
|
|
113
|
+
collectionModificationsSupported?: boolean;
|
|
114
|
+
/** Field types the external database supports. Applies only when `collectionModificationsSupported` is set to `true`. */
|
|
115
|
+
fieldTypes?: FieldType[];
|
|
116
|
+
}
|
|
117
|
+
export interface GetExternalDatabaseConnectionRequest {
|
|
118
|
+
/** Name of the external database connection to retrieve. */
|
|
119
|
+
name: string;
|
|
120
|
+
}
|
|
121
|
+
export interface GetExternalDatabaseConnectionResponse {
|
|
122
|
+
/** Details of the retrieved external database connection. */
|
|
123
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
124
|
+
}
|
|
125
|
+
export interface ListExternalDatabaseConnectionsRequest {
|
|
126
|
+
/** Paging metadata. */
|
|
127
|
+
paging?: Paging;
|
|
128
|
+
}
|
|
129
|
+
export interface Paging {
|
|
130
|
+
/** Number of items to load. */
|
|
131
|
+
limit?: number | null;
|
|
132
|
+
/** Number of items to skip in the current sort order. */
|
|
133
|
+
offset?: number | null;
|
|
134
|
+
}
|
|
135
|
+
export interface ListExternalDatabaseConnectionsResponse {
|
|
136
|
+
/** List of external database connections. */
|
|
137
|
+
externalDatabaseConnections?: ExternalDatabaseConnection[];
|
|
138
|
+
/** Paging metadata. */
|
|
139
|
+
pagingMetadata?: PagingMetadata;
|
|
140
|
+
}
|
|
141
|
+
export interface PagingMetadata {
|
|
142
|
+
/** Number of items returned in the response. */
|
|
143
|
+
count?: number | null;
|
|
144
|
+
/** Offset that was requested. */
|
|
145
|
+
offset?: number | null;
|
|
146
|
+
/** Total number of items that match the query. */
|
|
147
|
+
total?: number | null;
|
|
148
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
149
|
+
tooManyToCount?: boolean | null;
|
|
150
|
+
}
|
|
151
|
+
export interface CreateExternalDatabaseConnectionRequest {
|
|
152
|
+
/** External database connection details. */
|
|
153
|
+
externalDatabaseConnection: ExternalDatabaseConnection;
|
|
154
|
+
/**
|
|
155
|
+
* Connection type. The connection type determines the type of adaptor by which the external collection is integrated with the site.
|
|
156
|
+
*
|
|
157
|
+
* Learn more about [external database adaptors](https://dev.wix.com/docs/rest/business-solutions/cms/external-database-connection/introduction#about-external-database-adaptors).
|
|
158
|
+
*/
|
|
159
|
+
connectionType: ConnectionType;
|
|
160
|
+
}
|
|
161
|
+
export declare enum ConnectionType {
|
|
162
|
+
/** Unknown connection type. */
|
|
163
|
+
UNKNOWN_CONNECTION_TYPE = "UNKNOWN_CONNECTION_TYPE",
|
|
164
|
+
/** 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). */
|
|
165
|
+
STANDALONE = "STANDALONE",
|
|
166
|
+
/** 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). */
|
|
167
|
+
WIX_SERVICE_PLUGIN = "WIX_SERVICE_PLUGIN"
|
|
168
|
+
}
|
|
169
|
+
export interface CreateExternalDatabaseConnectionResponse {
|
|
170
|
+
/** Details of the created external database connection. */
|
|
171
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
172
|
+
}
|
|
173
|
+
export interface UpdateExternalDatabaseConnectionRequest {
|
|
174
|
+
/** Updated external database connection. The existing connection is replaced with this version. */
|
|
175
|
+
externalDatabaseConnection: ExternalDatabaseConnection;
|
|
176
|
+
}
|
|
177
|
+
export interface UpdateExternalDatabaseConnectionResponse {
|
|
178
|
+
/** Details of the updated external database connection. */
|
|
179
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
180
|
+
}
|
|
181
|
+
export interface DeleteExternalDatabaseConnectionRequest {
|
|
182
|
+
/** Name of the external database connection to delete. */
|
|
183
|
+
name: string;
|
|
184
|
+
}
|
|
185
|
+
export interface DeleteExternalDatabaseConnectionResponse {
|
|
186
|
+
}
|
|
187
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
188
|
+
createdEvent?: EntityCreatedEvent;
|
|
189
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
190
|
+
deletedEvent?: EntityDeletedEvent;
|
|
191
|
+
actionEvent?: ActionEvent;
|
|
192
|
+
/**
|
|
193
|
+
* Unique event ID.
|
|
194
|
+
* Allows clients to ignore duplicate webhooks.
|
|
195
|
+
*/
|
|
196
|
+
id?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Assumes actions are also always typed to an entity_type
|
|
199
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
200
|
+
*/
|
|
201
|
+
entityFqdn?: string;
|
|
202
|
+
/**
|
|
203
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
204
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
205
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
206
|
+
*/
|
|
207
|
+
slug?: string;
|
|
208
|
+
/** ID of the entity associated with the event. */
|
|
209
|
+
entityId?: string;
|
|
210
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
211
|
+
eventTime?: Date | null;
|
|
212
|
+
/**
|
|
213
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
214
|
+
* (for example, GDPR).
|
|
215
|
+
*/
|
|
216
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
217
|
+
/** If present, indicates the action that triggered the event. */
|
|
218
|
+
originatedFrom?: string | null;
|
|
219
|
+
/**
|
|
220
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
221
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
222
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
223
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
224
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
225
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
226
|
+
*/
|
|
227
|
+
entityEventSequence?: string | null;
|
|
228
|
+
}
|
|
229
|
+
/** @oneof */
|
|
230
|
+
export interface DomainEventBodyOneOf {
|
|
231
|
+
createdEvent?: EntityCreatedEvent;
|
|
232
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
233
|
+
deletedEvent?: EntityDeletedEvent;
|
|
234
|
+
actionEvent?: ActionEvent;
|
|
235
|
+
}
|
|
236
|
+
export interface EntityCreatedEvent {
|
|
237
|
+
entityAsJson?: string;
|
|
238
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
239
|
+
restoreInfo?: RestoreInfo;
|
|
240
|
+
}
|
|
241
|
+
export interface RestoreInfo {
|
|
242
|
+
deletedDate?: Date | null;
|
|
243
|
+
}
|
|
244
|
+
export interface EntityUpdatedEvent {
|
|
245
|
+
/**
|
|
246
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
247
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
248
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
249
|
+
*/
|
|
250
|
+
currentEntityAsJson?: string;
|
|
251
|
+
}
|
|
252
|
+
export interface EntityDeletedEvent {
|
|
253
|
+
/** Entity that was deleted */
|
|
254
|
+
deletedEntityAsJson?: string | null;
|
|
255
|
+
}
|
|
256
|
+
export interface ActionEvent {
|
|
257
|
+
bodyAsJson?: string;
|
|
258
|
+
}
|
|
259
|
+
export interface MessageEnvelope {
|
|
260
|
+
/** App instance ID. */
|
|
261
|
+
instanceId?: string | null;
|
|
262
|
+
/** Event type. */
|
|
263
|
+
eventType?: string;
|
|
264
|
+
/** The identification type and identity data. */
|
|
265
|
+
identity?: IdentificationData;
|
|
266
|
+
/** Stringify payload. */
|
|
267
|
+
data?: string;
|
|
268
|
+
}
|
|
269
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
270
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
271
|
+
anonymousVisitorId?: string;
|
|
272
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
273
|
+
memberId?: string;
|
|
274
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
275
|
+
wixUserId?: string;
|
|
276
|
+
/** ID of an app. */
|
|
277
|
+
appId?: string;
|
|
278
|
+
/** @readonly */
|
|
279
|
+
identityType?: WebhookIdentityType;
|
|
280
|
+
}
|
|
281
|
+
/** @oneof */
|
|
282
|
+
export interface IdentificationDataIdOneOf {
|
|
283
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
284
|
+
anonymousVisitorId?: string;
|
|
285
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
286
|
+
memberId?: string;
|
|
287
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
288
|
+
wixUserId?: string;
|
|
289
|
+
/** ID of an app. */
|
|
290
|
+
appId?: string;
|
|
291
|
+
}
|
|
292
|
+
export declare enum WebhookIdentityType {
|
|
293
|
+
UNKNOWN = "UNKNOWN",
|
|
294
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
295
|
+
MEMBER = "MEMBER",
|
|
296
|
+
WIX_USER = "WIX_USER",
|
|
297
|
+
APP = "APP"
|
|
298
|
+
}
|
|
299
|
+
interface ConnectionStatusNonNullableFields {
|
|
300
|
+
successful: boolean;
|
|
301
|
+
causeOfFailure: CauseOfFailure;
|
|
302
|
+
hasCollections: CollectionsFound;
|
|
303
|
+
}
|
|
304
|
+
interface CapabilitiesNonNullableFields {
|
|
305
|
+
collectionModificationsSupported: boolean;
|
|
306
|
+
fieldTypes: FieldType[];
|
|
307
|
+
}
|
|
308
|
+
interface ExternalDatabaseConnectionNonNullableFields {
|
|
309
|
+
name: string;
|
|
310
|
+
connectionStatus?: ConnectionStatusNonNullableFields;
|
|
311
|
+
protocolVersion: ProtocolVersion;
|
|
312
|
+
capabilities?: CapabilitiesNonNullableFields;
|
|
313
|
+
}
|
|
314
|
+
export interface GetExternalDatabaseConnectionResponseNonNullableFields {
|
|
315
|
+
externalDatabaseConnection?: ExternalDatabaseConnectionNonNullableFields;
|
|
316
|
+
}
|
|
317
|
+
export interface ListExternalDatabaseConnectionsResponseNonNullableFields {
|
|
318
|
+
externalDatabaseConnections: ExternalDatabaseConnectionNonNullableFields[];
|
|
319
|
+
}
|
|
320
|
+
export interface CreateExternalDatabaseConnectionResponseNonNullableFields {
|
|
321
|
+
externalDatabaseConnection?: ExternalDatabaseConnectionNonNullableFields;
|
|
322
|
+
}
|
|
323
|
+
export interface UpdateExternalDatabaseConnectionResponseNonNullableFields {
|
|
324
|
+
externalDatabaseConnection?: ExternalDatabaseConnectionNonNullableFields;
|
|
325
|
+
}
|
|
326
|
+
export {};
|
package/build/es/src/data-v1-external-database-connection-external-database-connections.types.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export var CauseOfFailure;
|
|
2
|
+
(function (CauseOfFailure) {
|
|
3
|
+
/** No connection failure. */
|
|
4
|
+
CauseOfFailure["NONE"] = "NONE";
|
|
5
|
+
/** General communication failure. */
|
|
6
|
+
CauseOfFailure["COMMUNICATION_FAILURE"] = "COMMUNICATION_FAILURE";
|
|
7
|
+
/** External database host is unreachable. */
|
|
8
|
+
CauseOfFailure["DESTINATION_HOST_UNREACHABLE"] = "DESTINATION_HOST_UNREACHABLE";
|
|
9
|
+
/** Unauthorized to access the external database. */
|
|
10
|
+
CauseOfFailure["UNAUTHORIZED"] = "UNAUTHORIZED";
|
|
11
|
+
/** `endpoint` is not set. */
|
|
12
|
+
CauseOfFailure["DESTINATION_ENDPOINT_NOT_DEFINED"] = "DESTINATION_ENDPOINT_NOT_DEFINED";
|
|
13
|
+
})(CauseOfFailure || (CauseOfFailure = {}));
|
|
14
|
+
export var CollectionsFound;
|
|
15
|
+
(function (CollectionsFound) {
|
|
16
|
+
/** Attempt to connect to the external database failed, so status is unknown. */
|
|
17
|
+
CollectionsFound["UNKNOWN"] = "UNKNOWN";
|
|
18
|
+
/** External database has collections. */
|
|
19
|
+
CollectionsFound["YES"] = "YES";
|
|
20
|
+
/** External database does not have any collections. */
|
|
21
|
+
CollectionsFound["NO"] = "NO";
|
|
22
|
+
})(CollectionsFound || (CollectionsFound = {}));
|
|
23
|
+
export var FieldType;
|
|
24
|
+
(function (FieldType) {
|
|
25
|
+
FieldType["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
|
|
26
|
+
FieldType["TEXT"] = "TEXT";
|
|
27
|
+
FieldType["NUMBER"] = "NUMBER";
|
|
28
|
+
FieldType["DATE"] = "DATE";
|
|
29
|
+
FieldType["DATETIME"] = "DATETIME";
|
|
30
|
+
FieldType["IMAGE"] = "IMAGE";
|
|
31
|
+
FieldType["BOOLEAN"] = "BOOLEAN";
|
|
32
|
+
FieldType["DOCUMENT"] = "DOCUMENT";
|
|
33
|
+
FieldType["URL"] = "URL";
|
|
34
|
+
FieldType["RICH_TEXT"] = "RICH_TEXT";
|
|
35
|
+
FieldType["VIDEO"] = "VIDEO";
|
|
36
|
+
FieldType["ANY"] = "ANY";
|
|
37
|
+
FieldType["ARRAY_STRING"] = "ARRAY_STRING";
|
|
38
|
+
FieldType["ARRAY_DOCUMENT"] = "ARRAY_DOCUMENT";
|
|
39
|
+
FieldType["AUDIO"] = "AUDIO";
|
|
40
|
+
FieldType["TIME"] = "TIME";
|
|
41
|
+
FieldType["LANGUAGE"] = "LANGUAGE";
|
|
42
|
+
FieldType["RICH_CONTENT"] = "RICH_CONTENT";
|
|
43
|
+
FieldType["MEDIA_GALLERY"] = "MEDIA_GALLERY";
|
|
44
|
+
FieldType["ADDRESS"] = "ADDRESS";
|
|
45
|
+
FieldType["PAGE_LINK"] = "PAGE_LINK";
|
|
46
|
+
FieldType["REFERENCE"] = "REFERENCE";
|
|
47
|
+
FieldType["MULTI_REFERENCE"] = "MULTI_REFERENCE";
|
|
48
|
+
FieldType["OBJECT"] = "OBJECT";
|
|
49
|
+
FieldType["ARRAY"] = "ARRAY";
|
|
50
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
51
|
+
FieldType["LEGACY_TIME"] = "LEGACY_TIME";
|
|
52
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
53
|
+
FieldType["LEGACY_BOOK"] = "LEGACY_BOOK";
|
|
54
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
55
|
+
FieldType["LEGACY_EXTERNAL_URL"] = "LEGACY_EXTERNAL_URL";
|
|
56
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
57
|
+
FieldType["LEGACY_BROKEN_REFERENCE"] = "LEGACY_BROKEN_REFERENCE";
|
|
58
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
59
|
+
FieldType["LEGACY_IMAGE"] = "LEGACY_IMAGE";
|
|
60
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
61
|
+
FieldType["LEGACY_COLOR"] = "LEGACY_COLOR";
|
|
62
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
63
|
+
FieldType["LEGACY_EXTERNAL_VIDEO"] = "LEGACY_EXTERNAL_VIDEO";
|
|
64
|
+
})(FieldType || (FieldType = {}));
|
|
65
|
+
export var ProtocolVersion;
|
|
66
|
+
(function (ProtocolVersion) {
|
|
67
|
+
ProtocolVersion["UNKNOWN_PROTOCOL_VERSION"] = "UNKNOWN_PROTOCOL_VERSION";
|
|
68
|
+
ProtocolVersion["V1"] = "V1";
|
|
69
|
+
ProtocolVersion["V2"] = "V2";
|
|
70
|
+
ProtocolVersion["V3"] = "V3";
|
|
71
|
+
})(ProtocolVersion || (ProtocolVersion = {}));
|
|
72
|
+
export var ConnectionType;
|
|
73
|
+
(function (ConnectionType) {
|
|
74
|
+
/** Unknown connection type. */
|
|
75
|
+
ConnectionType["UNKNOWN_CONNECTION_TYPE"] = "UNKNOWN_CONNECTION_TYPE";
|
|
76
|
+
/** 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). */
|
|
77
|
+
ConnectionType["STANDALONE"] = "STANDALONE";
|
|
78
|
+
/** 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). */
|
|
79
|
+
ConnectionType["WIX_SERVICE_PLUGIN"] = "WIX_SERVICE_PLUGIN";
|
|
80
|
+
})(ConnectionType || (ConnectionType = {}));
|
|
81
|
+
export var WebhookIdentityType;
|
|
82
|
+
(function (WebhookIdentityType) {
|
|
83
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
84
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
85
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
86
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
87
|
+
WebhookIdentityType["APP"] = "APP";
|
|
88
|
+
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
89
|
+
//# sourceMappingURL=data-v1-external-database-connection-external-database-connections.types.js.map
|
package/build/es/src/data-v1-external-database-connection-external-database-connections.types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-v1-external-database-connection-external-database-connections.types.js","sourceRoot":"","sources":["../../../src/data-v1-external-database-connection-external-database-connections.types.ts"],"names":[],"mappings":"AAiCA,MAAM,CAAN,IAAY,cAWX;AAXD,WAAY,cAAc;IACxB,6BAA6B;IAC7B,+BAAa,CAAA;IACb,qCAAqC;IACrC,iEAA+C,CAAA;IAC/C,6CAA6C;IAC7C,+EAA6D,CAAA;IAC7D,oDAAoD;IACpD,+CAA6B,CAAA;IAC7B,6BAA6B;IAC7B,uFAAqE,CAAA;AACvE,CAAC,EAXW,cAAc,KAAd,cAAc,QAWzB;AAED,MAAM,CAAN,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,gFAAgF;IAChF,uCAAmB,CAAA;IACnB,yCAAyC;IACzC,+BAAW,CAAA;IACX,uDAAuD;IACvD,6BAAS,CAAA;AACX,CAAC,EAPW,gBAAgB,KAAhB,gBAAgB,QAO3B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