@wix/data 1.0.89 → 1.0.91
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/context.d.ts +4 -4
- package/build/cjs/context.js +4 -4
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +4 -4
- package/build/cjs/index.js +4 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +4 -4
- package/build/cjs/meta.js +4 -4
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +4 -4
- package/build/es/context.js +4 -4
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +4 -4
- package/build/es/index.js +4 -4
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +4 -4
- package/build/es/meta.js +4 -4
- package/build/es/meta.js.map +1 -1
- package/package.json +14 -9
- package/build/cjs/index.typings.d.ts +0 -4
- package/build/cjs/index.typings.js +0 -31
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/data-v1-external-database-connection.context.d.ts +0 -7
- package/build/cjs/src/data-v1-external-database-connection.context.js +0 -90
- package/build/cjs/src/data-v1-external-database-connection.context.js.map +0 -1
- package/build/cjs/src/data-v1-external-database-connection.http.d.ts +0 -28
- package/build/cjs/src/data-v1-external-database-connection.http.js +0 -393
- package/build/cjs/src/data-v1-external-database-connection.http.js.map +0 -1
- package/build/cjs/src/data-v1-external-database-connection.meta.d.ts +0 -23
- package/build/cjs/src/data-v1-external-database-connection.meta.js +0 -127
- package/build/cjs/src/data-v1-external-database-connection.meta.js.map +0 -1
- package/build/cjs/src/data-v1-external-database-connection.public.d.ts +0 -46
- package/build/cjs/src/data-v1-external-database-connection.public.js +0 -46
- package/build/cjs/src/data-v1-external-database-connection.public.js.map +0 -1
- package/build/cjs/src/data-v1-external-database-connection.types.d.ts +0 -321
- package/build/cjs/src/data-v1-external-database-connection.types.js +0 -88
- package/build/cjs/src/data-v1-external-database-connection.types.js.map +0 -1
- package/build/cjs/src/data-v1-external-database-connection.universal.d.ts +0 -433
- package/build/cjs/src/data-v1-external-database-connection.universal.js +0 -442
- package/build/cjs/src/data-v1-external-database-connection.universal.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection.context.d.ts +0 -7
- package/build/cjs/src/data-v2-data-collection.context.js +0 -90
- package/build/cjs/src/data-v2-data-collection.context.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection.http.d.ts +0 -36
- package/build/cjs/src/data-v2-data-collection.http.js +0 -494
- package/build/cjs/src/data-v2-data-collection.http.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection.meta.d.ts +0 -21
- package/build/cjs/src/data-v2-data-collection.meta.js +0 -123
- package/build/cjs/src/data-v2-data-collection.meta.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection.public.d.ts +0 -313
- package/build/cjs/src/data-v2-data-collection.public.js +0 -58
- package/build/cjs/src/data-v2-data-collection.public.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection.types.d.ts +0 -1460
- package/build/cjs/src/data-v2-data-collection.types.js +0 -197
- package/build/cjs/src/data-v2-data-collection.types.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection.universal.d.ts +0 -1626
- package/build/cjs/src/data-v2-data-collection.universal.js +0 -622
- package/build/cjs/src/data-v2-data-collection.universal.js.map +0 -1
- package/build/cjs/src/data-v2-data-item.context.d.ts +0 -23
- package/build/cjs/src/data-v2-data-item.context.js +0 -362
- package/build/cjs/src/data-v2-data-item.context.js.map +0 -1
- package/build/cjs/src/data-v2-data-item.http.d.ts +0 -225
- package/build/cjs/src/data-v2-data-item.http.js +0 -936
- package/build/cjs/src/data-v2-data-item.http.js.map +0 -1
- package/build/cjs/src/data-v2-data-item.meta.d.ts +0 -39
- package/build/cjs/src/data-v2-data-item.meta.js +0 -427
- package/build/cjs/src/data-v2-data-item.meta.js.map +0 -1
- package/build/cjs/src/data-v2-data-item.public.d.ts +0 -31
- package/build/cjs/src/data-v2-data-item.public.js +0 -137
- package/build/cjs/src/data-v2-data-item.public.js.map +0 -1
- package/build/cjs/src/data-v2-data-item.types.d.ts +0 -913
- package/build/cjs/src/data-v2-data-item.types.js +0 -27
- package/build/cjs/src/data-v2-data-item.types.js.map +0 -1
- package/build/cjs/src/data-v2-data-item.universal.d.ts +0 -1748
- package/build/cjs/src/data-v2-data-item.universal.js +0 -1639
- package/build/cjs/src/data-v2-data-item.universal.js.map +0 -1
- package/build/cjs/src/data-v2-index.context.d.ts +0 -5
- package/build/cjs/src/data-v2-index.context.js +0 -56
- package/build/cjs/src/data-v2-index.context.js.map +0 -1
- package/build/cjs/src/data-v2-index.http.d.ts +0 -28
- package/build/cjs/src/data-v2-index.http.js +0 -367
- package/build/cjs/src/data-v2-index.http.js.map +0 -1
- package/build/cjs/src/data-v2-index.meta.d.ts +0 -15
- package/build/cjs/src/data-v2-index.meta.js +0 -85
- package/build/cjs/src/data-v2-index.meta.js.map +0 -1
- package/build/cjs/src/data-v2-index.public.d.ts +0 -23
- package/build/cjs/src/data-v2-index.public.js +0 -28
- package/build/cjs/src/data-v2-index.public.js.map +0 -1
- package/build/cjs/src/data-v2-index.types.d.ts +0 -174
- package/build/cjs/src/data-v2-index.types.js +0 -35
- package/build/cjs/src/data-v2-index.types.js.map +0 -1
- package/build/cjs/src/data-v2-index.universal.d.ts +0 -237
- package/build/cjs/src/data-v2-index.universal.js +0 -274
- package/build/cjs/src/data-v2-index.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -4
- package/build/es/index.typings.js +0 -5
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/data-v1-external-database-connection.context.d.ts +0 -7
- package/build/es/src/data-v1-external-database-connection.context.js +0 -82
- package/build/es/src/data-v1-external-database-connection.context.js.map +0 -1
- package/build/es/src/data-v1-external-database-connection.http.d.ts +0 -28
- package/build/es/src/data-v1-external-database-connection.http.js +0 -385
- package/build/es/src/data-v1-external-database-connection.http.js.map +0 -1
- package/build/es/src/data-v1-external-database-connection.meta.d.ts +0 -23
- package/build/es/src/data-v1-external-database-connection.meta.js +0 -96
- package/build/es/src/data-v1-external-database-connection.meta.js.map +0 -1
- package/build/es/src/data-v1-external-database-connection.public.d.ts +0 -46
- package/build/es/src/data-v1-external-database-connection.public.js +0 -30
- package/build/es/src/data-v1-external-database-connection.public.js.map +0 -1
- package/build/es/src/data-v1-external-database-connection.types.d.ts +0 -321
- package/build/es/src/data-v1-external-database-connection.types.js +0 -85
- package/build/es/src/data-v1-external-database-connection.types.js.map +0 -1
- package/build/es/src/data-v1-external-database-connection.universal.d.ts +0 -433
- package/build/es/src/data-v1-external-database-connection.universal.js +0 -411
- package/build/es/src/data-v1-external-database-connection.universal.js.map +0 -1
- package/build/es/src/data-v2-data-collection.context.d.ts +0 -7
- package/build/es/src/data-v2-data-collection.context.js +0 -82
- package/build/es/src/data-v2-data-collection.context.js.map +0 -1
- package/build/es/src/data-v2-data-collection.http.d.ts +0 -36
- package/build/es/src/data-v2-data-collection.http.js +0 -486
- package/build/es/src/data-v2-data-collection.http.js.map +0 -1
- package/build/es/src/data-v2-data-collection.meta.d.ts +0 -21
- package/build/es/src/data-v2-data-collection.meta.js +0 -92
- package/build/es/src/data-v2-data-collection.meta.js.map +0 -1
- package/build/es/src/data-v2-data-collection.public.d.ts +0 -313
- package/build/es/src/data-v2-data-collection.public.js +0 -30
- package/build/es/src/data-v2-data-collection.public.js.map +0 -1
- package/build/es/src/data-v2-data-collection.types.d.ts +0 -1460
- package/build/es/src/data-v2-data-collection.types.js +0 -194
- package/build/es/src/data-v2-data-collection.types.js.map +0 -1
- package/build/es/src/data-v2-data-collection.universal.d.ts +0 -1626
- package/build/es/src/data-v2-data-collection.universal.js +0 -591
- package/build/es/src/data-v2-data-collection.universal.js.map +0 -1
- package/build/es/src/data-v2-data-item.context.d.ts +0 -23
- package/build/es/src/data-v2-data-item.context.js +0 -338
- package/build/es/src/data-v2-data-item.context.js.map +0 -1
- package/build/es/src/data-v2-data-item.http.d.ts +0 -225
- package/build/es/src/data-v2-data-item.http.js +0 -912
- package/build/es/src/data-v2-data-item.http.js.map +0 -1
- package/build/es/src/data-v2-data-item.meta.d.ts +0 -39
- package/build/es/src/data-v2-data-item.meta.js +0 -380
- package/build/es/src/data-v2-data-item.meta.js.map +0 -1
- package/build/es/src/data-v2-data-item.public.d.ts +0 -31
- package/build/es/src/data-v2-data-item.public.js +0 -109
- package/build/es/src/data-v2-data-item.public.js.map +0 -1
- package/build/es/src/data-v2-data-item.types.d.ts +0 -913
- package/build/es/src/data-v2-data-item.types.js +0 -24
- package/build/es/src/data-v2-data-item.types.js.map +0 -1
- package/build/es/src/data-v2-data-item.universal.d.ts +0 -1748
- package/build/es/src/data-v2-data-item.universal.js +0 -1592
- package/build/es/src/data-v2-data-item.universal.js.map +0 -1
- package/build/es/src/data-v2-index.context.d.ts +0 -5
- package/build/es/src/data-v2-index.context.js +0 -50
- package/build/es/src/data-v2-index.context.js.map +0 -1
- package/build/es/src/data-v2-index.http.d.ts +0 -28
- package/build/es/src/data-v2-index.http.js +0 -361
- package/build/es/src/data-v2-index.http.js.map +0 -1
- package/build/es/src/data-v2-index.meta.d.ts +0 -15
- package/build/es/src/data-v2-index.meta.js +0 -56
- package/build/es/src/data-v2-index.meta.js.map +0 -1
- package/build/es/src/data-v2-index.public.d.ts +0 -23
- package/build/es/src/data-v2-index.public.js +0 -19
- package/build/es/src/data-v2-index.public.js.map +0 -1
- package/build/es/src/data-v2-index.types.d.ts +0 -174
- package/build/es/src/data-v2-index.types.js +0 -32
- package/build/es/src/data-v2-index.types.js.map +0 -1
- package/build/es/src/data-v2-index.universal.d.ts +0 -237
- package/build/es/src/data-v2-index.universal.js +0 -245
- package/build/es/src/data-v2-index.universal.js.map +0 -1
|
@@ -1,433 +0,0 @@
|
|
|
1
|
-
import { EventDefinition } from '@wix/sdk-types';
|
|
2
|
-
/** An external database connection defines a connection between an external database and a Wix site or project. */
|
|
3
|
-
export interface ExternalDatabaseConnection {
|
|
4
|
-
/**
|
|
5
|
-
* Name of the external database connection.
|
|
6
|
-
* An external database connection may connect to one or more external data collections or tables.
|
|
7
|
-
* These are represented as `connectionName/dataCollectionId`.
|
|
8
|
-
*/
|
|
9
|
-
name?: string;
|
|
10
|
-
/** Base URL for provisioning and managing data in the external database. For example: `https://example.com/my-external-database`. */
|
|
11
|
-
endpoint?: string | null;
|
|
12
|
-
/**
|
|
13
|
-
* Settings passed to the external database connection as part of each request.
|
|
14
|
-
* These settings can relate to authentication, tenancy, or provide any other information needed for processing a request.
|
|
15
|
-
* Their content and structure depend on the specific requirements of the external database's API.
|
|
16
|
-
*/
|
|
17
|
-
configuration?: Record<string, any> | null;
|
|
18
|
-
/**
|
|
19
|
-
* Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure.
|
|
20
|
-
* @readonly
|
|
21
|
-
*/
|
|
22
|
-
connectionStatus?: ConnectionStatus;
|
|
23
|
-
/**
|
|
24
|
-
* The external database's capabilities.
|
|
25
|
-
* @readonly
|
|
26
|
-
*/
|
|
27
|
-
capabilities?: Capabilities;
|
|
28
|
-
}
|
|
29
|
-
export declare enum CauseOfFailure {
|
|
30
|
-
/** No connection failure. */
|
|
31
|
-
NONE = "NONE",
|
|
32
|
-
/** General communication failure. */
|
|
33
|
-
COMMUNICATION_FAILURE = "COMMUNICATION_FAILURE",
|
|
34
|
-
/** External database host is unreachable. */
|
|
35
|
-
DESTINATION_HOST_UNREACHABLE = "DESTINATION_HOST_UNREACHABLE",
|
|
36
|
-
/** Unauthorized to access the external database. */
|
|
37
|
-
UNAUTHORIZED = "UNAUTHORIZED",
|
|
38
|
-
/** `endpoint` is not set. */
|
|
39
|
-
DESTINATION_ENDPOINT_NOT_DEFINED = "DESTINATION_ENDPOINT_NOT_DEFINED"
|
|
40
|
-
}
|
|
41
|
-
export declare enum CollectionsFound {
|
|
42
|
-
UNKNOWN = "UNKNOWN",
|
|
43
|
-
YES = "YES",
|
|
44
|
-
NO = "NO"
|
|
45
|
-
}
|
|
46
|
-
export declare enum FieldType {
|
|
47
|
-
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
48
|
-
TEXT = "TEXT",
|
|
49
|
-
NUMBER = "NUMBER",
|
|
50
|
-
DATE = "DATE",
|
|
51
|
-
DATETIME = "DATETIME",
|
|
52
|
-
IMAGE = "IMAGE",
|
|
53
|
-
BOOLEAN = "BOOLEAN",
|
|
54
|
-
DOCUMENT = "DOCUMENT",
|
|
55
|
-
URL = "URL",
|
|
56
|
-
RICH_TEXT = "RICH_TEXT",
|
|
57
|
-
VIDEO = "VIDEO",
|
|
58
|
-
ANY = "ANY",
|
|
59
|
-
ARRAY_STRING = "ARRAY_STRING",
|
|
60
|
-
ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
|
|
61
|
-
AUDIO = "AUDIO",
|
|
62
|
-
TIME = "TIME",
|
|
63
|
-
LANGUAGE = "LANGUAGE",
|
|
64
|
-
RICH_CONTENT = "RICH_CONTENT",
|
|
65
|
-
MEDIA_GALLERY = "MEDIA_GALLERY",
|
|
66
|
-
ADDRESS = "ADDRESS",
|
|
67
|
-
PAGE_LINK = "PAGE_LINK",
|
|
68
|
-
REFERENCE = "REFERENCE",
|
|
69
|
-
MULTI_REFERENCE = "MULTI_REFERENCE",
|
|
70
|
-
OBJECT = "OBJECT",
|
|
71
|
-
ARRAY = "ARRAY",
|
|
72
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
73
|
-
LEGACY_TIME = "LEGACY_TIME",
|
|
74
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
75
|
-
LEGACY_BOOK = "LEGACY_BOOK",
|
|
76
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
77
|
-
LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL",
|
|
78
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
79
|
-
LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE",
|
|
80
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
81
|
-
LEGACY_IMAGE = "LEGACY_IMAGE",
|
|
82
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
83
|
-
LEGACY_COLOR = "LEGACY_COLOR",
|
|
84
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
85
|
-
LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
|
|
86
|
-
}
|
|
87
|
-
export interface ConnectionStatus {
|
|
88
|
-
/** Whether the connection was established successfully. */
|
|
89
|
-
successful?: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* If and why a connection attempt failed.
|
|
92
|
-
* + `NONE`: No connection failure.
|
|
93
|
-
* + `COMMUNICATION_FAILURE`: General communication failure.
|
|
94
|
-
* + `DESTINATION_HOST_UNREACHABLE`: External database host is unreachable.
|
|
95
|
-
* + `UNAUTHORIZED`: Unauthorized to access external database.
|
|
96
|
-
* + `DESTINATION_ENDPOINT_NOT_DEFINED`: `Endpoint` property is not set.
|
|
97
|
-
*/
|
|
98
|
-
causeOfFailure?: CauseOfFailure;
|
|
99
|
-
/**
|
|
100
|
-
* Whether the external database has existing collections. Possible values are:
|
|
101
|
-
* + `UNKNOWN`: The attempt to connect to the external database failed, so status is unknown.
|
|
102
|
-
* + `NO`: External database does not have any existing collections.
|
|
103
|
-
* + `YES`: External database has existing collections.
|
|
104
|
-
* @readonly
|
|
105
|
-
*/
|
|
106
|
-
hasCollections?: CollectionsFound;
|
|
107
|
-
}
|
|
108
|
-
export declare enum ProtocolVersion {
|
|
109
|
-
UNKNOWN_PROTOCOL_VERSION = "UNKNOWN_PROTOCOL_VERSION",
|
|
110
|
-
V1 = "V1",
|
|
111
|
-
V2 = "V2",
|
|
112
|
-
V3 = "V3"
|
|
113
|
-
}
|
|
114
|
-
export interface Capabilities {
|
|
115
|
-
/** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */
|
|
116
|
-
collectionModificationsSupported?: boolean;
|
|
117
|
-
/**
|
|
118
|
-
* Field types the external database supports.
|
|
119
|
-
* This field only applies when `collectionModificationsSupported` is `true`.
|
|
120
|
-
*/
|
|
121
|
-
fieldTypes?: FieldType[];
|
|
122
|
-
}
|
|
123
|
-
export interface GetExternalDatabaseConnectionRequest {
|
|
124
|
-
/** Name of the external database connection to retrieve. */
|
|
125
|
-
name: string;
|
|
126
|
-
}
|
|
127
|
-
export interface GetExternalDatabaseConnectionResponse {
|
|
128
|
-
/** Details of the external database connection requested. */
|
|
129
|
-
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
130
|
-
}
|
|
131
|
-
export interface ListExternalDatabaseConnectionsRequest {
|
|
132
|
-
/** Paging */
|
|
133
|
-
paging?: Paging;
|
|
134
|
-
}
|
|
135
|
-
export interface Paging {
|
|
136
|
-
/** Number of items to load. */
|
|
137
|
-
limit?: number | null;
|
|
138
|
-
/** Number of items to skip in the current sort order. */
|
|
139
|
-
offset?: number | null;
|
|
140
|
-
}
|
|
141
|
-
export interface ListExternalDatabaseConnectionsResponse {
|
|
142
|
-
/** List of external database connections. */
|
|
143
|
-
externalDatabaseConnections?: ExternalDatabaseConnection[];
|
|
144
|
-
/** Paging metadata */
|
|
145
|
-
pagingMetadata?: PagingMetadata;
|
|
146
|
-
}
|
|
147
|
-
export interface PagingMetadata {
|
|
148
|
-
/** Number of items returned in the response. */
|
|
149
|
-
count?: number | null;
|
|
150
|
-
/** Offset that was requested. */
|
|
151
|
-
offset?: number | null;
|
|
152
|
-
/** Total number of items that match the query. */
|
|
153
|
-
total?: number | null;
|
|
154
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
155
|
-
tooManyToCount?: boolean | null;
|
|
156
|
-
}
|
|
157
|
-
export interface CreateExternalDatabaseConnectionRequest {
|
|
158
|
-
/** External database connection details. */
|
|
159
|
-
externalDatabaseConnection: ExternalDatabaseConnection;
|
|
160
|
-
/** Connection type. */
|
|
161
|
-
connectionType: ConnectionType;
|
|
162
|
-
}
|
|
163
|
-
export declare enum ConnectionType {
|
|
164
|
-
/** Unknown connection type. */
|
|
165
|
-
UNKNOWN_CONNECTION_TYPE = "UNKNOWN_CONNECTION_TYPE",
|
|
166
|
-
/**
|
|
167
|
-
* Connection to database adapter that implements legacy External Database Collections SPI (protocol version 1 or 2)
|
|
168
|
-
* https://www.wix.com/velo/reference/spis/external-database-collections/introduction
|
|
169
|
-
*/
|
|
170
|
-
STANDALONE = "STANDALONE",
|
|
171
|
-
/**
|
|
172
|
-
* Connection to database adapter that implements External Database SPI (protocol version 3)
|
|
173
|
-
* https://dev.wix.com/docs/rest/internal-only/wix-data/external-database-spi/introduction
|
|
174
|
-
* https://dev.wix.com/docs/rest/articles/getting-started/service-provider-interface
|
|
175
|
-
*/
|
|
176
|
-
WIX_SPI = "WIX_SPI"
|
|
177
|
-
}
|
|
178
|
-
export interface CreateExternalDatabaseConnectionResponse {
|
|
179
|
-
/** Details of external database connection created. */
|
|
180
|
-
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
181
|
-
}
|
|
182
|
-
export interface UpdateExternalDatabaseConnectionRequest {
|
|
183
|
-
/** Updated external database connection details. The existing connection is replaced with this version. */
|
|
184
|
-
externalDatabaseConnection: ExternalDatabaseConnection;
|
|
185
|
-
}
|
|
186
|
-
export interface UpdateExternalDatabaseConnectionResponse {
|
|
187
|
-
/** Updated external database connection details. */
|
|
188
|
-
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
189
|
-
}
|
|
190
|
-
export interface DeleteExternalDatabaseConnectionRequest {
|
|
191
|
-
/** Name of the external database connection to delete. */
|
|
192
|
-
name: string;
|
|
193
|
-
}
|
|
194
|
-
export interface DeleteExternalDatabaseConnectionResponse {
|
|
195
|
-
}
|
|
196
|
-
export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
|
|
197
|
-
createdEvent?: EntityCreatedEvent<T>;
|
|
198
|
-
updatedEvent?: EntityUpdatedEvent<T>;
|
|
199
|
-
deletedEvent?: EntityDeletedEvent<T>;
|
|
200
|
-
actionEvent?: ActionEvent<T>;
|
|
201
|
-
/**
|
|
202
|
-
* Unique event ID.
|
|
203
|
-
* Allows clients to ignore duplicate webhooks.
|
|
204
|
-
*/
|
|
205
|
-
_id?: string;
|
|
206
|
-
/**
|
|
207
|
-
* Assumes actions are also always typed to an entity_type
|
|
208
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
209
|
-
*/
|
|
210
|
-
entityFqdn?: string;
|
|
211
|
-
/**
|
|
212
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
213
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
214
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
215
|
-
*/
|
|
216
|
-
slug?: string;
|
|
217
|
-
/** ID of the entity associated with the event. */
|
|
218
|
-
entityId?: string;
|
|
219
|
-
/** Event timestamp. */
|
|
220
|
-
eventTime?: Date;
|
|
221
|
-
/**
|
|
222
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
223
|
-
* (for example, GDPR).
|
|
224
|
-
*/
|
|
225
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
226
|
-
/** If present, indicates the action that triggered the event. */
|
|
227
|
-
originatedFrom?: string | null;
|
|
228
|
-
/**
|
|
229
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
230
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
231
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
232
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
233
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
234
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
235
|
-
*/
|
|
236
|
-
entityEventSequence?: string | null;
|
|
237
|
-
}
|
|
238
|
-
export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
239
|
-
}
|
|
240
|
-
export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
241
|
-
}
|
|
242
|
-
export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
|
|
243
|
-
}
|
|
244
|
-
export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
|
|
245
|
-
}
|
|
246
|
-
/** @oneof */
|
|
247
|
-
export interface DomainEventBodyOneOf<T> {
|
|
248
|
-
createdEvent?: EntityCreatedEvent<T>;
|
|
249
|
-
updatedEvent?: EntityUpdatedEvent<T>;
|
|
250
|
-
deletedEvent?: EntityDeletedEvent<T>;
|
|
251
|
-
actionEvent?: ActionEvent<T>;
|
|
252
|
-
}
|
|
253
|
-
export interface EntityCreatedEvent<T> {
|
|
254
|
-
entity?: T;
|
|
255
|
-
}
|
|
256
|
-
export interface EntityUpdatedEvent<T> {
|
|
257
|
-
/**
|
|
258
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
259
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
260
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
261
|
-
*/
|
|
262
|
-
currentEntity?: T;
|
|
263
|
-
}
|
|
264
|
-
export interface EntityDeletedEvent<T> {
|
|
265
|
-
/** Entity that was deleted */
|
|
266
|
-
deletedEntity?: T | null;
|
|
267
|
-
}
|
|
268
|
-
export interface ActionEvent<T> {
|
|
269
|
-
body?: T;
|
|
270
|
-
}
|
|
271
|
-
export interface GetExternalDatabaseConnectionResponseNonNullableFields {
|
|
272
|
-
externalDatabaseConnection?: {
|
|
273
|
-
name: string;
|
|
274
|
-
connectionStatus?: {
|
|
275
|
-
successful: boolean;
|
|
276
|
-
causeOfFailure: CauseOfFailure;
|
|
277
|
-
hasCollections: CollectionsFound;
|
|
278
|
-
};
|
|
279
|
-
capabilities?: {
|
|
280
|
-
collectionModificationsSupported: boolean;
|
|
281
|
-
fieldTypes: FieldType[];
|
|
282
|
-
};
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
export interface ListExternalDatabaseConnectionsResponseNonNullableFields {
|
|
286
|
-
externalDatabaseConnections: {
|
|
287
|
-
name: string;
|
|
288
|
-
connectionStatus?: {
|
|
289
|
-
successful: boolean;
|
|
290
|
-
causeOfFailure: CauseOfFailure;
|
|
291
|
-
hasCollections: CollectionsFound;
|
|
292
|
-
};
|
|
293
|
-
capabilities?: {
|
|
294
|
-
collectionModificationsSupported: boolean;
|
|
295
|
-
fieldTypes: FieldType[];
|
|
296
|
-
};
|
|
297
|
-
}[];
|
|
298
|
-
}
|
|
299
|
-
export interface CreateExternalDatabaseConnectionResponseNonNullableFields {
|
|
300
|
-
externalDatabaseConnection?: {
|
|
301
|
-
name: string;
|
|
302
|
-
connectionStatus?: {
|
|
303
|
-
successful: boolean;
|
|
304
|
-
causeOfFailure: CauseOfFailure;
|
|
305
|
-
hasCollections: CollectionsFound;
|
|
306
|
-
};
|
|
307
|
-
capabilities?: {
|
|
308
|
-
collectionModificationsSupported: boolean;
|
|
309
|
-
fieldTypes: FieldType[];
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
export interface UpdateExternalDatabaseConnectionResponseNonNullableFields {
|
|
314
|
-
externalDatabaseConnection?: {
|
|
315
|
-
name: string;
|
|
316
|
-
connectionStatus?: {
|
|
317
|
-
successful: boolean;
|
|
318
|
-
causeOfFailure: CauseOfFailure;
|
|
319
|
-
hasCollections: CollectionsFound;
|
|
320
|
-
};
|
|
321
|
-
capabilities?: {
|
|
322
|
-
collectionModificationsSupported: boolean;
|
|
323
|
-
fieldTypes: FieldType[];
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
export declare const onExternalDatabaseConnectionCreated: EventDefinition<DomainCreatedEvent<ExternalDatabaseConnection>, "wix.data.v1.external_database_connection_created">;
|
|
328
|
-
export declare const onExternalDatabaseConnectionUpdated: EventDefinition<DomainUpdatedEvent<ExternalDatabaseConnection>, "wix.data.v1.external_database_connection_updated">;
|
|
329
|
-
export declare const onExternalDatabaseConnectionDeleted: EventDefinition<DomainDeletedEvent<ExternalDatabaseConnection>, "wix.data.v1.external_database_connection_deleted">;
|
|
330
|
-
/**
|
|
331
|
-
* Retrieves an external database connection by name.
|
|
332
|
-
* @param name - Name of the external database connection to retrieve.
|
|
333
|
-
* @public
|
|
334
|
-
* @documentationMaturity preview
|
|
335
|
-
* @requiredField name
|
|
336
|
-
* @permissionScope Manage External Database Connections
|
|
337
|
-
* @permissionScopeId SCOPE.DC-DATA.EXTERNAL-DATABASE-CONNECTIONS-MANAGE
|
|
338
|
-
* @applicableIdentity APP
|
|
339
|
-
* @returns Details of the external database connection requested.
|
|
340
|
-
*/
|
|
341
|
-
export declare function getExternalDatabaseConnection(name: string): Promise<ExternalDatabaseConnection & NonNullable<GetExternalDatabaseConnectionResponseNonNullableFields>['externalDatabaseConnection']>;
|
|
342
|
-
/**
|
|
343
|
-
* Retrieves a list of all external database collections associated with the site or project.
|
|
344
|
-
* @public
|
|
345
|
-
* @documentationMaturity preview
|
|
346
|
-
* @permissionScope Manage External Database Connections
|
|
347
|
-
* @permissionScopeId SCOPE.DC-DATA.EXTERNAL-DATABASE-CONNECTIONS-MANAGE
|
|
348
|
-
* @applicableIdentity APP
|
|
349
|
-
*/
|
|
350
|
-
export declare function listExternalDatabaseConnections(options?: ListExternalDatabaseConnectionsOptions): Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
351
|
-
export interface ListExternalDatabaseConnectionsOptions {
|
|
352
|
-
/** Paging */
|
|
353
|
-
paging?: Paging;
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Creates a new external database connection.
|
|
357
|
-
*
|
|
358
|
-
* The `externalDatabaseConnection` parameter must include a `name`, `endpoint`, and `configuration` details for the external database.
|
|
359
|
-
* If any of these are missing, the external database connection isn't created.
|
|
360
|
-
* @param externalDatabaseConnection - External database connection details.
|
|
361
|
-
* @public
|
|
362
|
-
* @documentationMaturity preview
|
|
363
|
-
* @requiredField externalDatabaseConnection
|
|
364
|
-
* @requiredField externalDatabaseConnection.name
|
|
365
|
-
* @requiredField options
|
|
366
|
-
* @requiredField options.connectionType
|
|
367
|
-
* @param options - Options for creating an external database connection.
|
|
368
|
-
* @permissionScope Manage External Database Connections
|
|
369
|
-
* @permissionScopeId SCOPE.DC-DATA.EXTERNAL-DATABASE-CONNECTIONS-MANAGE
|
|
370
|
-
* @applicableIdentity APP
|
|
371
|
-
* @returns Details of external database connection created.
|
|
372
|
-
*/
|
|
373
|
-
export declare function createExternalDatabaseConnection(externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions): Promise<ExternalDatabaseConnection & NonNullable<CreateExternalDatabaseConnectionResponseNonNullableFields>['externalDatabaseConnection']>;
|
|
374
|
-
export interface CreateExternalDatabaseConnectionOptions {
|
|
375
|
-
/** Connection type. */
|
|
376
|
-
connectionType: ConnectionType;
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Updates an external database connection.
|
|
380
|
-
*
|
|
381
|
-
* An external database collection name must be provided in `name`.
|
|
382
|
-
* If an existing external database connection is found with the same name, that connection's details are updated.
|
|
383
|
-
* If no external database connection has that name, the request fails.
|
|
384
|
-
*
|
|
385
|
-
* > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.
|
|
386
|
-
* @param name - Name of the external database connection.
|
|
387
|
-
* An external database connection may connect to one or more external data collections or tables.
|
|
388
|
-
* These are represented as `connectionName/dataCollectionId`.
|
|
389
|
-
* @public
|
|
390
|
-
* @documentationMaturity preview
|
|
391
|
-
* @requiredField externalDatabaseConnection
|
|
392
|
-
* @requiredField name
|
|
393
|
-
* @param options - Options for updating an external database connection.
|
|
394
|
-
* @param externalDatabaseConnection - Updated external database connection details. The existing connection is replaced with this version.
|
|
395
|
-
* @permissionScope Manage External Database Connections
|
|
396
|
-
* @permissionScopeId SCOPE.DC-DATA.EXTERNAL-DATABASE-CONNECTIONS-MANAGE
|
|
397
|
-
* @applicableIdentity APP
|
|
398
|
-
* @returns Updated external database connection details.
|
|
399
|
-
*/
|
|
400
|
-
export declare function updateExternalDatabaseConnection(name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection): Promise<ExternalDatabaseConnection & NonNullable<UpdateExternalDatabaseConnectionResponseNonNullableFields>['externalDatabaseConnection']>;
|
|
401
|
-
export interface UpdateExternalDatabaseConnection {
|
|
402
|
-
/** Base URL for provisioning and managing data in the external database. For example: `https://example.com/my-external-database`. */
|
|
403
|
-
endpoint?: string | null;
|
|
404
|
-
/**
|
|
405
|
-
* Settings passed to the external database connection as part of each request.
|
|
406
|
-
* These settings can relate to authentication, tenancy, or provide any other information needed for processing a request.
|
|
407
|
-
* Their content and structure depend on the specific requirements of the external database's API.
|
|
408
|
-
*/
|
|
409
|
-
configuration?: Record<string, any> | null;
|
|
410
|
-
/**
|
|
411
|
-
* Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure.
|
|
412
|
-
* @readonly
|
|
413
|
-
*/
|
|
414
|
-
connectionStatus?: ConnectionStatus;
|
|
415
|
-
/**
|
|
416
|
-
* The external database's capabilities.
|
|
417
|
-
* @readonly
|
|
418
|
-
*/
|
|
419
|
-
capabilities?: Capabilities;
|
|
420
|
-
}
|
|
421
|
-
/**
|
|
422
|
-
* Deletes an external database connection.
|
|
423
|
-
*
|
|
424
|
-
* > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database you need to create a new external database connection.
|
|
425
|
-
* @param name - Name of the external database connection to delete.
|
|
426
|
-
* @public
|
|
427
|
-
* @documentationMaturity preview
|
|
428
|
-
* @requiredField name
|
|
429
|
-
* @permissionScope Manage External Database Connections
|
|
430
|
-
* @permissionScopeId SCOPE.DC-DATA.EXTERNAL-DATABASE-CONNECTIONS-MANAGE
|
|
431
|
-
* @applicableIdentity APP
|
|
432
|
-
*/
|
|
433
|
-
export declare function deleteExternalDatabaseConnection(name: string): Promise<void>;
|