@wix/data 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 +4 -0
- package/build/cjs/index.js +27 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/src/data-v1-external-database-connection.http.d.ts +29 -0
- package/build/cjs/src/data-v1-external-database-connection.http.js +397 -0
- package/build/cjs/src/data-v1-external-database-connection.http.js.map +1 -0
- package/build/cjs/src/data-v1-external-database-connection.public.d.ts +11 -0
- package/build/cjs/src/data-v1-external-database-connection.public.js +36 -0
- package/build/cjs/src/data-v1-external-database-connection.public.js.map +1 -0
- package/build/cjs/src/data-v1-external-database-connection.types.d.ts +53 -0
- package/build/cjs/src/data-v1-external-database-connection.types.js +3 -0
- package/build/cjs/src/data-v1-external-database-connection.types.js.map +1 -0
- package/build/cjs/src/data-v1-external-database-connection.universal.d.ts +129 -0
- package/build/cjs/src/data-v1-external-database-connection.universal.js +334 -0
- package/build/cjs/src/data-v1-external-database-connection.universal.js.map +1 -0
- package/build/cjs/src/data-v2-data-collection.http.d.ts +37 -0
- package/build/cjs/src/data-v2-data-collection.http.js +458 -0
- package/build/cjs/src/data-v2-data-collection.http.js.map +1 -0
- package/build/cjs/src/data-v2-data-collection.public.d.ts +12 -0
- package/build/cjs/src/data-v2-data-collection.public.js +48 -0
- package/build/cjs/src/data-v2-data-collection.public.js.map +1 -0
- package/build/cjs/src/data-v2-data-collection.types.d.ts +638 -0
- package/build/cjs/src/data-v2-data-collection.types.js +143 -0
- package/build/cjs/src/data-v2-data-collection.types.js.map +1 -0
- package/build/cjs/src/data-v2-data-collection.universal.d.ts +732 -0
- package/build/cjs/src/data-v2-data-collection.universal.js +532 -0
- package/build/cjs/src/data-v2-data-collection.universal.js.map +1 -0
- package/build/cjs/src/data-v2-data-item.http.d.ts +192 -0
- package/build/cjs/src/data-v2-data-item.http.js +944 -0
- package/build/cjs/src/data-v2-data-item.http.js.map +1 -0
- package/build/cjs/src/data-v2-data-item.public.d.ts +28 -0
- package/build/cjs/src/data-v2-data-item.public.js +137 -0
- package/build/cjs/src/data-v2-data-item.public.js.map +1 -0
- package/build/cjs/src/data-v2-data-item.types.d.ts +656 -0
- package/build/cjs/src/data-v2-data-item.types.js +27 -0
- package/build/cjs/src/data-v2-data-item.types.js.map +1 -0
- package/build/cjs/src/data-v2-data-item.universal.d.ts +1343 -0
- package/build/cjs/src/data-v2-data-item.universal.js +1435 -0
- package/build/cjs/src/data-v2-data-item.universal.js.map +1 -0
- package/build/cjs/src/data-v2-index.http.d.ts +29 -0
- package/build/cjs/src/data-v2-index.http.js +349 -0
- package/build/cjs/src/data-v2-index.http.js.map +1 -0
- package/build/cjs/src/data-v2-index.public.d.ts +10 -0
- package/build/cjs/src/data-v2-index.public.js +28 -0
- package/build/cjs/src/data-v2-index.public.js.map +1 -0
- package/build/cjs/src/data-v2-index.types.d.ts +120 -0
- package/build/cjs/src/data-v2-index.types.js +35 -0
- package/build/cjs/src/data-v2-index.types.js.map +1 -0
- package/build/cjs/src/data-v2-index.universal.d.ts +182 -0
- package/build/cjs/src/data-v2-index.universal.js +261 -0
- package/build/cjs/src/data-v2-index.universal.js.map +1 -0
- package/build/es/index.d.ts +4 -0
- package/build/es/index.js +5 -0
- package/build/es/index.js.map +1 -0
- package/build/es/src/data-v1-external-database-connection.http.d.ts +29 -0
- package/build/es/src/data-v1-external-database-connection.http.js +389 -0
- package/build/es/src/data-v1-external-database-connection.http.js.map +1 -0
- package/build/es/src/data-v1-external-database-connection.public.d.ts +11 -0
- package/build/es/src/data-v1-external-database-connection.public.js +28 -0
- package/build/es/src/data-v1-external-database-connection.public.js.map +1 -0
- package/build/es/src/data-v1-external-database-connection.types.d.ts +53 -0
- package/build/es/src/data-v1-external-database-connection.types.js +2 -0
- package/build/es/src/data-v1-external-database-connection.types.js.map +1 -0
- package/build/es/src/data-v1-external-database-connection.universal.d.ts +129 -0
- package/build/es/src/data-v1-external-database-connection.universal.js +307 -0
- package/build/es/src/data-v1-external-database-connection.universal.js.map +1 -0
- package/build/es/src/data-v2-data-collection.http.d.ts +37 -0
- package/build/es/src/data-v2-data-collection.http.js +450 -0
- package/build/es/src/data-v2-data-collection.http.js.map +1 -0
- package/build/es/src/data-v2-data-collection.public.d.ts +12 -0
- package/build/es/src/data-v2-data-collection.public.js +29 -0
- package/build/es/src/data-v2-data-collection.public.js.map +1 -0
- package/build/es/src/data-v2-data-collection.types.d.ts +638 -0
- package/build/es/src/data-v2-data-collection.types.js +140 -0
- package/build/es/src/data-v2-data-collection.types.js.map +1 -0
- package/build/es/src/data-v2-data-collection.universal.d.ts +732 -0
- package/build/es/src/data-v2-data-collection.universal.js +505 -0
- package/build/es/src/data-v2-data-collection.universal.js.map +1 -0
- package/build/es/src/data-v2-data-item.http.d.ts +192 -0
- package/build/es/src/data-v2-data-item.http.js +920 -0
- package/build/es/src/data-v2-data-item.http.js.map +1 -0
- package/build/es/src/data-v2-data-item.public.d.ts +28 -0
- package/build/es/src/data-v2-data-item.public.js +109 -0
- package/build/es/src/data-v2-data-item.public.js.map +1 -0
- package/build/es/src/data-v2-data-item.types.d.ts +656 -0
- package/build/es/src/data-v2-data-item.types.js +24 -0
- package/build/es/src/data-v2-data-item.types.js.map +1 -0
- package/build/es/src/data-v2-data-item.universal.d.ts +1343 -0
- package/build/es/src/data-v2-data-item.universal.js +1392 -0
- package/build/es/src/data-v2-data-item.universal.js.map +1 -0
- package/build/es/src/data-v2-index.http.d.ts +29 -0
- package/build/es/src/data-v2-index.http.js +343 -0
- package/build/es/src/data-v2-index.http.js.map +1 -0
- package/build/es/src/data-v2-index.public.d.ts +10 -0
- package/build/es/src/data-v2-index.public.js +19 -0
- package/build/es/src/data-v2-index.public.js.map +1 -0
- package/build/es/src/data-v2-index.types.d.ts +120 -0
- package/build/es/src/data-v2-index.types.js +32 -0
- package/build/es/src/data-v2-index.types.js.map +1 -0
- package/build/es/src/data-v2-index.universal.d.ts +182 -0
- package/build/es/src/data-v2-index.universal.js +236 -0
- package/build/es/src/data-v2-index.universal.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
import { toURLSearchParams } from '@wix/metro-runtime';
|
|
2
|
+
import { serializer } from '@wix/metro-runtime/ambassador';
|
|
3
|
+
import { resolveUrl } from '@wix/metro-runtime';
|
|
4
|
+
const _createExternalDatabaseConnectionRequest = {};
|
|
5
|
+
const _createExternalDatabaseConnectionResponse = {};
|
|
6
|
+
const _deleteExternalDatabaseConnectionRequest = {};
|
|
7
|
+
const _deleteExternalDatabaseConnectionResponse = {};
|
|
8
|
+
const _getExternalDatabaseConnectionRequest = {};
|
|
9
|
+
const _getExternalDatabaseConnectionResponse = {};
|
|
10
|
+
const _listExternalDatabaseConnectionsRequest = {};
|
|
11
|
+
const _listExternalDatabaseConnectionsResponse = {};
|
|
12
|
+
const _updateExternalDatabaseConnectionRequest = {};
|
|
13
|
+
const _updateExternalDatabaseConnectionResponse = {};
|
|
14
|
+
function resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl(opts) {
|
|
15
|
+
const domainToMappings = {
|
|
16
|
+
'api._api_base_domain_': [
|
|
17
|
+
{
|
|
18
|
+
srcPath: '/cloud-data',
|
|
19
|
+
destPath: '',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
'code._base_domain_': [
|
|
23
|
+
{
|
|
24
|
+
srcPath: '/_api/cloud-data/v1/data-settings',
|
|
25
|
+
destPath: '/v1/data-settings',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
srcPath: '/_api/cloud-data/v1/schemas',
|
|
29
|
+
destPath: '/v1/schemas',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
srcPath: '/_api/cloud-data/v1/connector',
|
|
33
|
+
destPath: '/v1/connector',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
srcPath: '/_api/data/v1/data-settings',
|
|
37
|
+
destPath: '/v1/data-settings',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
srcPath: '/_api/data/v1/schemas',
|
|
41
|
+
destPath: '/v1/schemas',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
srcPath: '/_api/data/v1/connector',
|
|
45
|
+
destPath: '/v1/connector',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
srcPath: '/_api/cloud-data/v1/wix-data',
|
|
49
|
+
destPath: '/v1/wix-data',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
'cloud-data.wix-code.com': [
|
|
53
|
+
{
|
|
54
|
+
srcPath: '',
|
|
55
|
+
destPath: '',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
_: [
|
|
59
|
+
{
|
|
60
|
+
srcPath: '/_api/cloud-data',
|
|
61
|
+
destPath: '',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
srcPath: '/_api/cloud-data/v1/schemas',
|
|
65
|
+
destPath: '/v1/schemas',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
'www._base_domain_': [
|
|
69
|
+
{
|
|
70
|
+
srcPath: '/_api/cloud-data',
|
|
71
|
+
destPath: '',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
srcPath: '/_api/data',
|
|
75
|
+
destPath: '',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
srcPath: '/[a-z0-9-_/]+/_api/cloud-data',
|
|
79
|
+
destPath: '',
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
'dev._base_domain_': [
|
|
83
|
+
{
|
|
84
|
+
srcPath: '/_api/cloud-data',
|
|
85
|
+
destPath: '',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
'bo._base_domain_': [
|
|
89
|
+
{
|
|
90
|
+
srcPath: '/_api/cloud-data/v1',
|
|
91
|
+
destPath: '/v1',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
srcPath: '/[a-z0-9-_/]+/_api/cloud-data',
|
|
95
|
+
destPath: '',
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
'manage._base_domain_': [
|
|
99
|
+
{
|
|
100
|
+
srcPath: '/_api/cloud-data',
|
|
101
|
+
destPath: '',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
srcPath: '/_api/data',
|
|
105
|
+
destPath: '',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
srcPath: '/[a-z0-9-_/]+/_api/cloud-data',
|
|
109
|
+
destPath: '',
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
'editor._base_domain_': [
|
|
113
|
+
{
|
|
114
|
+
srcPath: '/_api/cloud-data/v1/schemas',
|
|
115
|
+
destPath: '/v1/schemas',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
srcPath: '/_api/cloud-data/dbs/tasks',
|
|
119
|
+
destPath: '/dbs/tasks',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
srcPath: '/_api/data/v1/schemas',
|
|
123
|
+
destPath: '/v1/schemas',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
srcPath: '/_api/data/dbs/tasks',
|
|
127
|
+
destPath: '/dbs/tasks',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
srcPath: '/_api/cloud-data/v1/wix-data',
|
|
131
|
+
destPath: '/v1/wix-data',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
srcPath: '/_api/cloud-data/v1/data-settings',
|
|
135
|
+
destPath: '/v1/data-settings',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
srcPath: '/_api/data/v2/indexes',
|
|
139
|
+
destPath: '/v2/indexes',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
srcPath: '/_api/cloud-data/v1/external-database-connections',
|
|
143
|
+
destPath: '/v1/external-database-connections',
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
'blocks._base_domain_': [
|
|
147
|
+
{
|
|
148
|
+
srcPath: '/_api/cloud-data/v1/schemas',
|
|
149
|
+
destPath: '/v1/schemas',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
srcPath: '/_api/cloud-data/dbs/tasks',
|
|
153
|
+
destPath: '/dbs/tasks',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
srcPath: '/_api/data/v1/schemas',
|
|
157
|
+
destPath: '/v1/schemas',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
srcPath: '/_api/data/dbs/tasks',
|
|
161
|
+
destPath: '/dbs/tasks',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
srcPath: '/_api/cloud-data/v1/wix-data',
|
|
165
|
+
destPath: '/v1/wix-data',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
srcPath: '/_api/cloud-data/v1/data-settings',
|
|
169
|
+
destPath: '/v1/data-settings',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
srcPath: '/_api/data/v2/indexes',
|
|
173
|
+
destPath: '/v2/indexes',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
srcPath: '/_api/cloud-data/v1/external-database-connections',
|
|
177
|
+
destPath: '/v1/external-database-connections',
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
'create.editorx': [
|
|
181
|
+
{
|
|
182
|
+
srcPath: '/_api/cloud-data/v1/schemas',
|
|
183
|
+
destPath: '/v1/schemas',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
srcPath: '/_api/cloud-data/dbs/tasks',
|
|
187
|
+
destPath: '/dbs/tasks',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
srcPath: '/_api/data/v1/schemas',
|
|
191
|
+
destPath: '/v1/schemas',
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
srcPath: '/_api/data/dbs/tasks',
|
|
195
|
+
destPath: '/dbs/tasks',
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
srcPath: '/_api/cloud-data/v1/wix-data',
|
|
199
|
+
destPath: '/v1/wix-data',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
srcPath: '/_api/cloud-data/v1/data-settings',
|
|
203
|
+
destPath: '/v1/data-settings',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
srcPath: '/_api/data/v2/indexes',
|
|
207
|
+
destPath: '/v2/indexes',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
srcPath: '/_api/cloud-data/v1/external-database-connections',
|
|
211
|
+
destPath: '/v1/external-database-connections',
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
'www.wixapis.com': [
|
|
215
|
+
{
|
|
216
|
+
srcPath: '/wix-data/v1/collections',
|
|
217
|
+
destPath: '/v1/wix-data/collections',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
srcPath: '/wix-data/v1/external-database-connections',
|
|
221
|
+
destPath: '/v1/external-database-connections',
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
srcPath: '/wix-data/v2/indexes',
|
|
225
|
+
destPath: '/v2/indexes',
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
srcPath: '/wix-data/v1/items',
|
|
229
|
+
destPath: '/v1/items',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
srcPath: '/wix-data/v1/bulk',
|
|
233
|
+
destPath: '/v1/bulk',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
srcPath: '/wix-data/v1/external-databases',
|
|
237
|
+
destPath: '/v1/external-databases',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
srcPath: '/wix-data/v2',
|
|
241
|
+
destPath: '/v2',
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
'www.wixgateway.com': [
|
|
245
|
+
{
|
|
246
|
+
srcPath: '/wix-data/v1/items',
|
|
247
|
+
destPath: '/v1/items',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
srcPath: '/wix-data/v1/bulk',
|
|
251
|
+
destPath: '/v1/bulk',
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
};
|
|
255
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
256
|
+
}
|
|
257
|
+
/** Retrieves an external database connection by name. */
|
|
258
|
+
export function getExternalDatabaseConnection(payload) {
|
|
259
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_getExternalDatabaseConnectionRequest, {});
|
|
260
|
+
const { fromJSON: fromRes } = serializer(_getExternalDatabaseConnectionResponse, {});
|
|
261
|
+
function __getExternalDatabaseConnection({ host }) {
|
|
262
|
+
const serializedData = toReq(payload);
|
|
263
|
+
const metadata = {
|
|
264
|
+
entityFqdn: 'wix.data.v1.external_database_connection',
|
|
265
|
+
method: 'GET',
|
|
266
|
+
methodFqn: 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.GetExternalDatabaseConnection',
|
|
267
|
+
url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl({
|
|
268
|
+
protoPath: '/v1/external-database-connections/{name}',
|
|
269
|
+
data: serializedData,
|
|
270
|
+
host,
|
|
271
|
+
}),
|
|
272
|
+
params: toURLSearchParams(serializedData),
|
|
273
|
+
transformResponse: fromRes,
|
|
274
|
+
};
|
|
275
|
+
return metadata;
|
|
276
|
+
}
|
|
277
|
+
__getExternalDatabaseConnection.fromReq = fromReq;
|
|
278
|
+
return __getExternalDatabaseConnection;
|
|
279
|
+
}
|
|
280
|
+
/** Retrieves a list of all external database collections associated with the site. */
|
|
281
|
+
export function listExternalDatabaseConnections(payload) {
|
|
282
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_listExternalDatabaseConnectionsRequest, {});
|
|
283
|
+
const { fromJSON: fromRes } = serializer(_listExternalDatabaseConnectionsResponse, {});
|
|
284
|
+
function __listExternalDatabaseConnections({ host }) {
|
|
285
|
+
const serializedData = toReq(payload);
|
|
286
|
+
const metadata = {
|
|
287
|
+
entityFqdn: 'wix.data.v1.external_database_connection',
|
|
288
|
+
method: 'GET',
|
|
289
|
+
methodFqn: 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.ListExternalDatabaseConnections',
|
|
290
|
+
url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl({
|
|
291
|
+
protoPath: '/v1/external-database-connections',
|
|
292
|
+
data: serializedData,
|
|
293
|
+
host,
|
|
294
|
+
}),
|
|
295
|
+
params: toURLSearchParams(serializedData),
|
|
296
|
+
transformResponse: fromRes,
|
|
297
|
+
};
|
|
298
|
+
return metadata;
|
|
299
|
+
}
|
|
300
|
+
__listExternalDatabaseConnections.fromReq = fromReq;
|
|
301
|
+
return __listExternalDatabaseConnections;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Creates a new external database connection.
|
|
305
|
+
*
|
|
306
|
+
* The request body must include a name, base URL, and configuration details for the external database within the `externalDatabaseConnection` body parameter.
|
|
307
|
+
* If any of these are missing, the external database connection isn't created.
|
|
308
|
+
*/
|
|
309
|
+
export function createExternalDatabaseConnection(payload) {
|
|
310
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_createExternalDatabaseConnectionRequest, {});
|
|
311
|
+
const { fromJSON: fromRes } = serializer(_createExternalDatabaseConnectionResponse, {});
|
|
312
|
+
function __createExternalDatabaseConnection({ host }) {
|
|
313
|
+
const serializedData = toReq(payload);
|
|
314
|
+
const metadata = {
|
|
315
|
+
entityFqdn: 'wix.data.v1.external_database_connection',
|
|
316
|
+
method: 'POST',
|
|
317
|
+
methodFqn: 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.CreateExternalDatabaseConnection',
|
|
318
|
+
url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl({
|
|
319
|
+
protoPath: '/v1/external-database-connections',
|
|
320
|
+
data: serializedData,
|
|
321
|
+
host,
|
|
322
|
+
}),
|
|
323
|
+
data: serializedData,
|
|
324
|
+
transformResponse: fromRes,
|
|
325
|
+
};
|
|
326
|
+
return metadata;
|
|
327
|
+
}
|
|
328
|
+
__createExternalDatabaseConnection.fromReq = fromReq;
|
|
329
|
+
return __createExternalDatabaseConnection;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Updates an external database connection.
|
|
333
|
+
*
|
|
334
|
+
* An external database collection name must be submitted as a path parameter.
|
|
335
|
+
* If an existing external database connection is found with the same name, that connection's details are updated.
|
|
336
|
+
* If no external database connection has that name, the request fails.
|
|
337
|
+
*
|
|
338
|
+
* > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.
|
|
339
|
+
*/
|
|
340
|
+
export function updateExternalDatabaseConnection(payload) {
|
|
341
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateExternalDatabaseConnectionRequest, {});
|
|
342
|
+
const { fromJSON: fromRes } = serializer(_updateExternalDatabaseConnectionResponse, {});
|
|
343
|
+
function __updateExternalDatabaseConnection({ host }) {
|
|
344
|
+
const serializedData = toReq(payload);
|
|
345
|
+
const metadata = {
|
|
346
|
+
entityFqdn: 'wix.data.v1.external_database_connection',
|
|
347
|
+
method: 'PUT',
|
|
348
|
+
methodFqn: 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.UpdateExternalDatabaseConnection',
|
|
349
|
+
url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl({
|
|
350
|
+
protoPath: '/v1/external-database-connections/{externalDatabaseConnection.name}',
|
|
351
|
+
data: serializedData,
|
|
352
|
+
host,
|
|
353
|
+
}),
|
|
354
|
+
data: serializedData,
|
|
355
|
+
transformResponse: fromRes,
|
|
356
|
+
};
|
|
357
|
+
return metadata;
|
|
358
|
+
}
|
|
359
|
+
__updateExternalDatabaseConnection.fromReq = fromReq;
|
|
360
|
+
return __updateExternalDatabaseConnection;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Deletes an external database connection.
|
|
364
|
+
*
|
|
365
|
+
* > **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](https://dev.wix.com/api/rest/wix-data/wix-data/external-database-connections/create-external-database-connection).
|
|
366
|
+
*/
|
|
367
|
+
export function deleteExternalDatabaseConnection(payload) {
|
|
368
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteExternalDatabaseConnectionRequest, {});
|
|
369
|
+
const { fromJSON: fromRes } = serializer(_deleteExternalDatabaseConnectionResponse, {});
|
|
370
|
+
function __deleteExternalDatabaseConnection({ host }) {
|
|
371
|
+
const serializedData = toReq(payload);
|
|
372
|
+
const metadata = {
|
|
373
|
+
entityFqdn: 'wix.data.v1.external_database_connection',
|
|
374
|
+
method: 'DELETE',
|
|
375
|
+
methodFqn: 'com.wixpress.cloud.data.api.externaldatabase.ExternalDatabaseConnectionService.DeleteExternalDatabaseConnection',
|
|
376
|
+
url: resolveComWixpressCloudDataApiExternaldatabaseExternalDatabaseConnectionServiceUrl({
|
|
377
|
+
protoPath: '/v1/external-database-connections/{name}',
|
|
378
|
+
data: serializedData,
|
|
379
|
+
host,
|
|
380
|
+
}),
|
|
381
|
+
params: toURLSearchParams(serializedData),
|
|
382
|
+
transformResponse: fromRes,
|
|
383
|
+
};
|
|
384
|
+
return metadata;
|
|
385
|
+
}
|
|
386
|
+
__deleteExternalDatabaseConnection.fromReq = fromReq;
|
|
387
|
+
return __deleteExternalDatabaseConnection;
|
|
388
|
+
}
|
|
389
|
+
//# sourceMappingURL=data-v1-external-database-connection.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-v1-external-database-connection.http.js","sourceRoot":"","sources":["../../../src/data-v1-external-database-connection.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,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AACH,MAAM,UAAU,gCAAgC,CAC9C,OAAgD;IAEhD,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CACrD,wCAAwC,EACxC,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CACtC,yCAAyC,EACzC,EAAE,CACH,CAAC;IAEF,SAAS,kCAAkC,CAAC,EAAE,IAAI,EAAO;QACvD,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,0CAA0C;YACtD,MAAM,EAAE,QAAe;YACvB,SAAS,EACP,iHAAiH;YACnH,GAAG,EAAE,kFAAkF,CACrF;gBACE,SAAS,EAAE,0CAA0C;gBACrD,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CACF;YACD,MAAM,EAAE,iBAAiB,CAAC,cAAc,CAAC;YACzC,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,kCAAkC,CAAC,OAAO,GAAG,OAAO,CAAC;IAErD,OAAO,kCAAkC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { CreateExternalDatabaseConnectionOptions, UpdateExternalDatabaseConnectionOptions } from './data-v1-external-database-connection.universal';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function getExternalDatabaseConnection(httpClient: HttpClient): (name: string) => Promise<import("./data-v1-external-database-connection.universal").GetExternalDatabaseConnectionResponse>;
|
|
7
|
+
export declare function listExternalDatabaseConnections(httpClient: HttpClient): () => Promise<import("./data-v1-external-database-connection.universal").ListExternalDatabaseConnectionsResponse>;
|
|
8
|
+
export declare function createExternalDatabaseConnection(httpClient: HttpClient): (options?: CreateExternalDatabaseConnectionOptions | undefined) => Promise<import("./data-v1-external-database-connection.universal").CreateExternalDatabaseConnectionResponse>;
|
|
9
|
+
export declare function updateExternalDatabaseConnection(httpClient: HttpClient): (name: string, options?: UpdateExternalDatabaseConnectionOptions | undefined) => Promise<import("./data-v1-external-database-connection.universal").UpdateExternalDatabaseConnectionResponse>;
|
|
10
|
+
export declare function deleteExternalDatabaseConnection(httpClient: HttpClient): (name: string) => Promise<void>;
|
|
11
|
+
export { ExternalDatabaseConnection, GetExternalDatabaseConnectionRequest, GetExternalDatabaseConnectionResponse, ListExternalDatabaseConnectionsRequest, ListExternalDatabaseConnectionsResponse, CreateExternalDatabaseConnectionRequest, CreateExternalDatabaseConnectionResponse, UpdateExternalDatabaseConnectionRequest, UpdateExternalDatabaseConnectionResponse, DeleteExternalDatabaseConnectionRequest, DeleteExternalDatabaseConnectionResponse, CreateExternalDatabaseConnectionOptions, UpdateExternalDatabaseConnectionOptions, } from './data-v1-external-database-connection.universal';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getExternalDatabaseConnection as universalGetExternalDatabaseConnection, listExternalDatabaseConnections as universalListExternalDatabaseConnections, createExternalDatabaseConnection as universalCreateExternalDatabaseConnection, updateExternalDatabaseConnection as universalUpdateExternalDatabaseConnection, deleteExternalDatabaseConnection as universalDeleteExternalDatabaseConnection, } from './data-v1-external-database-connection.universal';
|
|
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 () => universalListExternalDatabaseConnections(
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
{ httpClient });
|
|
12
|
+
}
|
|
13
|
+
export function createExternalDatabaseConnection(httpClient) {
|
|
14
|
+
return (options) => universalCreateExternalDatabaseConnection(options,
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
{ httpClient });
|
|
17
|
+
}
|
|
18
|
+
export function updateExternalDatabaseConnection(httpClient) {
|
|
19
|
+
return (name, options) => universalUpdateExternalDatabaseConnection(name, options,
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
{ httpClient });
|
|
22
|
+
}
|
|
23
|
+
export function deleteExternalDatabaseConnection(httpClient) {
|
|
24
|
+
return (name) => universalDeleteExternalDatabaseConnection(name,
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
{ httpClient });
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=data-v1-external-database-connection.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-v1-external-database-connection.public.js","sourceRoot":"","sources":["../../../src/data-v1-external-database-connection.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,6BAA6B,IAAI,sCAAsC,EACvE,+BAA+B,IAAI,wCAAwC,EAC3E,gCAAgC,IAAI,yCAAyC,EAC7E,gCAAgC,IAAI,yCAAyC,EAC7E,gCAAgC,IAAI,yCAAyC,GAG9E,MAAM,kDAAkD,CAAC;AAE1D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AAExD,MAAM,UAAU,6BAA6B,CAAC,UAAsB;IAClE,OAAO,CAAC,IAAY,EAAE,EAAE,CACtB,sCAAsC,CACpC,IAAI;IACJ,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,UAAsB;IACpE,OAAO,GAAG,EAAE,CACV,wCAAwC;IACtC,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,UAAsB;IACrE,OAAO,CAAC,OAAiD,EAAE,EAAE,CAC3D,yCAAyC,CACvC,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,UAAsB;IACrE,OAAO,CAAC,IAAY,EAAE,OAAiD,EAAE,EAAE,CACzE,yCAAyC,CACvC,IAAI,EACJ,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,UAAsB;IACrE,OAAO,CAAC,IAAY,EAAE,EAAE,CACtB,yCAAyC,CACvC,IAAI;IACJ,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
* An external database connection may connect to one or more external data collections or tables.
|
|
6
|
+
* These are represented as `connectionName/dataCollectionId`.
|
|
7
|
+
*/
|
|
8
|
+
name?: string;
|
|
9
|
+
/** Base URL for provisioning and managing data in the external database. For example: `https://example.com/my-external-database`. */
|
|
10
|
+
endpoint?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Settings passed to the external database connection as part of each request.
|
|
13
|
+
* These settings can relate to authentication, tenancy, or provide any other information needed for processing a request.
|
|
14
|
+
* Their content and structure depend on the specific requirements of the external database's API.
|
|
15
|
+
*/
|
|
16
|
+
configuration?: Record<string, any> | null;
|
|
17
|
+
}
|
|
18
|
+
export interface GetExternalDatabaseConnectionRequest {
|
|
19
|
+
/** Name of the external database connection to retrieve. */
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
22
|
+
export interface GetExternalDatabaseConnectionResponse {
|
|
23
|
+
/** Details of the external database connection requested. */
|
|
24
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
25
|
+
}
|
|
26
|
+
export interface ListExternalDatabaseConnectionsRequest {
|
|
27
|
+
}
|
|
28
|
+
export interface ListExternalDatabaseConnectionsResponse {
|
|
29
|
+
/** List of external database connections. */
|
|
30
|
+
externalDatabaseConnections?: ExternalDatabaseConnection[];
|
|
31
|
+
}
|
|
32
|
+
export interface CreateExternalDatabaseConnectionRequest {
|
|
33
|
+
/** External database connection details. */
|
|
34
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
35
|
+
}
|
|
36
|
+
export interface CreateExternalDatabaseConnectionResponse {
|
|
37
|
+
/** Details of external database connection created. */
|
|
38
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
39
|
+
}
|
|
40
|
+
export interface UpdateExternalDatabaseConnectionRequest {
|
|
41
|
+
/** Updated external database connection details. The existing collection is replaced with this version. */
|
|
42
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
43
|
+
}
|
|
44
|
+
export interface UpdateExternalDatabaseConnectionResponse {
|
|
45
|
+
/** Updated external database connection details. */
|
|
46
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
47
|
+
}
|
|
48
|
+
export interface DeleteExternalDatabaseConnectionRequest {
|
|
49
|
+
/** Name of the external database connection to delete. */
|
|
50
|
+
name: string;
|
|
51
|
+
}
|
|
52
|
+
export interface DeleteExternalDatabaseConnectionResponse {
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-v1-external-database-connection.types.js","sourceRoot":"","sources":["../../../src/data-v1-external-database-connection.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
export declare const __debug: {
|
|
2
|
+
verboseLogging: {
|
|
3
|
+
on: () => boolean;
|
|
4
|
+
off: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
/** An external database connection defines a connection between an external database and a Wix site. */
|
|
8
|
+
export interface ExternalDatabaseConnection {
|
|
9
|
+
/**
|
|
10
|
+
* Name of the external database connection.
|
|
11
|
+
* An external database connection may connect to one or more external data collections or tables.
|
|
12
|
+
* These are represented as `connectionName/dataCollectionId`.
|
|
13
|
+
*/
|
|
14
|
+
name?: string;
|
|
15
|
+
/** Base URL for provisioning and managing data in the external database. For example: `https://example.com/my-external-database`. */
|
|
16
|
+
endpoint?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Settings passed to the external database connection as part of each request.
|
|
19
|
+
* These settings can relate to authentication, tenancy, or provide any other information needed for processing a request.
|
|
20
|
+
* Their content and structure depend on the specific requirements of the external database's API.
|
|
21
|
+
*/
|
|
22
|
+
configuration?: Record<string, any> | null;
|
|
23
|
+
}
|
|
24
|
+
export interface GetExternalDatabaseConnectionRequest {
|
|
25
|
+
/** Name of the external database connection to retrieve. */
|
|
26
|
+
name: string;
|
|
27
|
+
}
|
|
28
|
+
export interface GetExternalDatabaseConnectionResponse {
|
|
29
|
+
/** Details of the external database connection requested. */
|
|
30
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
31
|
+
}
|
|
32
|
+
export interface ListExternalDatabaseConnectionsRequest {
|
|
33
|
+
}
|
|
34
|
+
export interface ListExternalDatabaseConnectionsResponse {
|
|
35
|
+
/** List of external database connections. */
|
|
36
|
+
externalDatabaseConnections?: ExternalDatabaseConnection[];
|
|
37
|
+
}
|
|
38
|
+
export interface CreateExternalDatabaseConnectionRequest {
|
|
39
|
+
/** External database connection details. */
|
|
40
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
41
|
+
}
|
|
42
|
+
export interface CreateExternalDatabaseConnectionResponse {
|
|
43
|
+
/** Details of external database connection created. */
|
|
44
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
45
|
+
}
|
|
46
|
+
export interface UpdateExternalDatabaseConnectionRequest {
|
|
47
|
+
/** Updated external database connection details. The existing collection is replaced with this version. */
|
|
48
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
49
|
+
}
|
|
50
|
+
export interface UpdateExternalDatabaseConnectionResponse {
|
|
51
|
+
/** Updated external database connection details. */
|
|
52
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
53
|
+
}
|
|
54
|
+
export interface DeleteExternalDatabaseConnectionRequest {
|
|
55
|
+
/** Name of the external database connection to delete. */
|
|
56
|
+
name: string;
|
|
57
|
+
}
|
|
58
|
+
export interface DeleteExternalDatabaseConnectionResponse {
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Retrieves an external database connection by name.
|
|
62
|
+
* @param name - Name of the external database connection to retrieve.
|
|
63
|
+
* @public
|
|
64
|
+
* @documentationMaturity preview
|
|
65
|
+
* @requiredField name
|
|
66
|
+
*/
|
|
67
|
+
export declare function getExternalDatabaseConnection(name: string): Promise<GetExternalDatabaseConnectionResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Retrieves a list of all external database collections associated with the site.
|
|
70
|
+
* @public
|
|
71
|
+
* @documentationMaturity preview
|
|
72
|
+
*/
|
|
73
|
+
export declare function listExternalDatabaseConnections(): Promise<ListExternalDatabaseConnectionsResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* Creates a new external database connection.
|
|
76
|
+
*
|
|
77
|
+
* The request body must include a name, base URL, and configuration details for the external database within the `externalDatabaseConnection` body parameter.
|
|
78
|
+
* If any of these are missing, the external database connection isn't created.
|
|
79
|
+
* @public
|
|
80
|
+
* @documentationMaturity preview
|
|
81
|
+
* @requiredField options.externalDatabaseConnection.configuration
|
|
82
|
+
* @requiredField options.externalDatabaseConnection.endpoint
|
|
83
|
+
* @requiredField options.externalDatabaseConnection.name
|
|
84
|
+
*/
|
|
85
|
+
export declare function createExternalDatabaseConnection(options?: CreateExternalDatabaseConnectionOptions): Promise<CreateExternalDatabaseConnectionResponse>;
|
|
86
|
+
export interface CreateExternalDatabaseConnectionOptions {
|
|
87
|
+
/** External database connection details. */
|
|
88
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Updates an external database connection.
|
|
92
|
+
*
|
|
93
|
+
* An external database collection name must be submitted as a path parameter.
|
|
94
|
+
* If an existing external database connection is found with the same name, that connection's details are updated.
|
|
95
|
+
* If no external database connection has that name, the request fails.
|
|
96
|
+
*
|
|
97
|
+
* > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.
|
|
98
|
+
* @param name - Name of the external database connection.
|
|
99
|
+
* An external database connection may connect to one or more external data collections or tables.
|
|
100
|
+
* These are represented as `connectionName/dataCollectionId`.
|
|
101
|
+
* @public
|
|
102
|
+
* @documentationMaturity preview
|
|
103
|
+
* @requiredField name
|
|
104
|
+
* @requiredField options.externalDatabaseConnection.configuration
|
|
105
|
+
* @requiredField options.externalDatabaseConnection.endpoint
|
|
106
|
+
*/
|
|
107
|
+
export declare function updateExternalDatabaseConnection(name: string, options?: UpdateExternalDatabaseConnectionOptions): Promise<UpdateExternalDatabaseConnectionResponse>;
|
|
108
|
+
export interface UpdateExternalDatabaseConnectionOptions {
|
|
109
|
+
externalDatabaseConnection: {
|
|
110
|
+
/** Base URL for provisioning and managing data in the external database. For example: `https://example.com/my-external-database`. */
|
|
111
|
+
endpoint?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Settings passed to the external database connection as part of each request.
|
|
114
|
+
* These settings can relate to authentication, tenancy, or provide any other information needed for processing a request.
|
|
115
|
+
* Their content and structure depend on the specific requirements of the external database's API.
|
|
116
|
+
*/
|
|
117
|
+
configuration?: Record<string, any> | null;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Deletes an external database connection.
|
|
122
|
+
*
|
|
123
|
+
* > **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](https://dev.wix.com/api/rest/wix-data/wix-data/external-database-connections/create-external-database-connection).
|
|
124
|
+
* @param name - Name of the external database connection to delete.
|
|
125
|
+
* @public
|
|
126
|
+
* @documentationMaturity preview
|
|
127
|
+
* @requiredField name
|
|
128
|
+
*/
|
|
129
|
+
export declare function deleteExternalDatabaseConnection(name: string): Promise<void>;
|