@wix/data 1.0.115 → 1.0.116
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/context/package.json +2 -1
- package/meta/package.json +2 -1
- package/package.json +14 -8
- package/type-bundles/context.bundle.d.ts +2840 -0
- package/type-bundles/index.bundle.d.ts +4634 -0
- package/type-bundles/meta.bundle.d.ts +5177 -0
|
@@ -0,0 +1,4634 @@
|
|
|
1
|
+
/** An external database connection defines a connection between an external database and a Wix site or project. */
|
|
2
|
+
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 | null;
|
|
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
|
+
* 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
|
+
* The external database's capabilities.
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
26
|
+
capabilities?: Capabilities;
|
|
27
|
+
}
|
|
28
|
+
declare enum CauseOfFailure {
|
|
29
|
+
/** No connection failure. */
|
|
30
|
+
NONE = "NONE",
|
|
31
|
+
/** General communication failure. */
|
|
32
|
+
COMMUNICATION_FAILURE = "COMMUNICATION_FAILURE",
|
|
33
|
+
/** External database host is unreachable. */
|
|
34
|
+
DESTINATION_HOST_UNREACHABLE = "DESTINATION_HOST_UNREACHABLE",
|
|
35
|
+
/** Unauthorized to access the external database. */
|
|
36
|
+
UNAUTHORIZED = "UNAUTHORIZED",
|
|
37
|
+
/** `endpoint` is not set. */
|
|
38
|
+
DESTINATION_ENDPOINT_NOT_DEFINED = "DESTINATION_ENDPOINT_NOT_DEFINED"
|
|
39
|
+
}
|
|
40
|
+
declare enum CollectionsFound {
|
|
41
|
+
UNKNOWN = "UNKNOWN",
|
|
42
|
+
YES = "YES",
|
|
43
|
+
NO = "NO"
|
|
44
|
+
}
|
|
45
|
+
declare enum FieldType {
|
|
46
|
+
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
47
|
+
TEXT = "TEXT",
|
|
48
|
+
NUMBER = "NUMBER",
|
|
49
|
+
DATE = "DATE",
|
|
50
|
+
DATETIME = "DATETIME",
|
|
51
|
+
IMAGE = "IMAGE",
|
|
52
|
+
BOOLEAN = "BOOLEAN",
|
|
53
|
+
DOCUMENT = "DOCUMENT",
|
|
54
|
+
URL = "URL",
|
|
55
|
+
RICH_TEXT = "RICH_TEXT",
|
|
56
|
+
VIDEO = "VIDEO",
|
|
57
|
+
ANY = "ANY",
|
|
58
|
+
ARRAY_STRING = "ARRAY_STRING",
|
|
59
|
+
ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
|
|
60
|
+
AUDIO = "AUDIO",
|
|
61
|
+
TIME = "TIME",
|
|
62
|
+
LANGUAGE = "LANGUAGE",
|
|
63
|
+
RICH_CONTENT = "RICH_CONTENT",
|
|
64
|
+
MEDIA_GALLERY = "MEDIA_GALLERY",
|
|
65
|
+
ADDRESS = "ADDRESS",
|
|
66
|
+
PAGE_LINK = "PAGE_LINK",
|
|
67
|
+
REFERENCE = "REFERENCE",
|
|
68
|
+
MULTI_REFERENCE = "MULTI_REFERENCE",
|
|
69
|
+
OBJECT = "OBJECT",
|
|
70
|
+
ARRAY = "ARRAY",
|
|
71
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
72
|
+
LEGACY_TIME = "LEGACY_TIME",
|
|
73
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
74
|
+
LEGACY_BOOK = "LEGACY_BOOK",
|
|
75
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
76
|
+
LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL",
|
|
77
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
78
|
+
LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE",
|
|
79
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
80
|
+
LEGACY_IMAGE = "LEGACY_IMAGE",
|
|
81
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
82
|
+
LEGACY_COLOR = "LEGACY_COLOR",
|
|
83
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
84
|
+
LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
|
|
85
|
+
}
|
|
86
|
+
interface ConnectionStatus {
|
|
87
|
+
/** Whether the connection was established successfully. */
|
|
88
|
+
successful?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* If and why a connection attempt failed.
|
|
91
|
+
* + `NONE`: No connection failure.
|
|
92
|
+
* + `COMMUNICATION_FAILURE`: General communication failure.
|
|
93
|
+
* + `DESTINATION_HOST_UNREACHABLE`: External database host is unreachable.
|
|
94
|
+
* + `UNAUTHORIZED`: Unauthorized to access external database.
|
|
95
|
+
* + `DESTINATION_ENDPOINT_NOT_DEFINED`: `Endpoint` property is not set.
|
|
96
|
+
*/
|
|
97
|
+
causeOfFailure?: CauseOfFailure;
|
|
98
|
+
/**
|
|
99
|
+
* Whether the external database has existing collections. Possible values are:
|
|
100
|
+
* + `UNKNOWN`: The attempt to connect to the external database failed, so status is unknown.
|
|
101
|
+
* + `NO`: External database does not have any existing collections.
|
|
102
|
+
* + `YES`: External database has existing collections.
|
|
103
|
+
* @readonly
|
|
104
|
+
*/
|
|
105
|
+
hasCollections?: CollectionsFound;
|
|
106
|
+
}
|
|
107
|
+
declare enum ProtocolVersion {
|
|
108
|
+
UNKNOWN_PROTOCOL_VERSION = "UNKNOWN_PROTOCOL_VERSION",
|
|
109
|
+
V1 = "V1",
|
|
110
|
+
V2 = "V2",
|
|
111
|
+
V3 = "V3"
|
|
112
|
+
}
|
|
113
|
+
interface Capabilities {
|
|
114
|
+
/** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */
|
|
115
|
+
collectionModificationsSupported?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Field types the external database supports.
|
|
118
|
+
* This field only applies when `collectionModificationsSupported` is `true`.
|
|
119
|
+
*/
|
|
120
|
+
fieldTypes?: FieldType[];
|
|
121
|
+
}
|
|
122
|
+
interface GetExternalDatabaseConnectionRequest {
|
|
123
|
+
/** Name of the external database connection to retrieve. */
|
|
124
|
+
name: string;
|
|
125
|
+
}
|
|
126
|
+
interface GetExternalDatabaseConnectionResponse {
|
|
127
|
+
/** Details of the external database connection requested. */
|
|
128
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
129
|
+
}
|
|
130
|
+
interface ListExternalDatabaseConnectionsRequest {
|
|
131
|
+
/** Paging */
|
|
132
|
+
paging?: Paging$3;
|
|
133
|
+
}
|
|
134
|
+
interface Paging$3 {
|
|
135
|
+
/** Number of items to load. */
|
|
136
|
+
limit?: number | null;
|
|
137
|
+
/** Number of items to skip in the current sort order. */
|
|
138
|
+
offset?: number | null;
|
|
139
|
+
}
|
|
140
|
+
interface ListExternalDatabaseConnectionsResponse {
|
|
141
|
+
/** List of external database connections. */
|
|
142
|
+
externalDatabaseConnections?: ExternalDatabaseConnection[];
|
|
143
|
+
/** Paging metadata */
|
|
144
|
+
pagingMetadata?: PagingMetadata$1;
|
|
145
|
+
}
|
|
146
|
+
interface PagingMetadata$1 {
|
|
147
|
+
/** Number of items returned in the response. */
|
|
148
|
+
count?: number | null;
|
|
149
|
+
/** Offset that was requested. */
|
|
150
|
+
offset?: number | null;
|
|
151
|
+
/** Total number of items that match the query. */
|
|
152
|
+
total?: number | null;
|
|
153
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
154
|
+
tooManyToCount?: boolean | null;
|
|
155
|
+
}
|
|
156
|
+
interface CreateExternalDatabaseConnectionRequest {
|
|
157
|
+
/** External database connection details. */
|
|
158
|
+
externalDatabaseConnection: ExternalDatabaseConnection;
|
|
159
|
+
/** Connection type. */
|
|
160
|
+
connectionType: ConnectionType;
|
|
161
|
+
}
|
|
162
|
+
declare enum ConnectionType {
|
|
163
|
+
/** Unknown connection type. */
|
|
164
|
+
UNKNOWN_CONNECTION_TYPE = "UNKNOWN_CONNECTION_TYPE",
|
|
165
|
+
/**
|
|
166
|
+
* Connection to database adapter that implements legacy External Database Collections SPI (protocol version 1 or 2)
|
|
167
|
+
* https://www.wix.com/velo/reference/spis/external-database-collections/introduction
|
|
168
|
+
*/
|
|
169
|
+
STANDALONE = "STANDALONE",
|
|
170
|
+
/**
|
|
171
|
+
* Connection to database adapter that implements External Database SPI (protocol version 3)
|
|
172
|
+
* https://dev.wix.com/docs/rest/internal-only/wix-data/external-database-spi/introduction
|
|
173
|
+
* https://dev.wix.com/docs/rest/articles/getting-started/service-provider-interface
|
|
174
|
+
*/
|
|
175
|
+
WIX_SPI = "WIX_SPI"
|
|
176
|
+
}
|
|
177
|
+
interface CreateExternalDatabaseConnectionResponse {
|
|
178
|
+
/** Details of external database connection created. */
|
|
179
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
180
|
+
}
|
|
181
|
+
interface UpdateExternalDatabaseConnectionRequest {
|
|
182
|
+
/** Updated external database connection details. The existing connection is replaced with this version. */
|
|
183
|
+
externalDatabaseConnection: ExternalDatabaseConnection;
|
|
184
|
+
}
|
|
185
|
+
interface UpdateExternalDatabaseConnectionResponse {
|
|
186
|
+
/** Updated external database connection details. */
|
|
187
|
+
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
188
|
+
}
|
|
189
|
+
interface DeleteExternalDatabaseConnectionRequest {
|
|
190
|
+
/** Name of the external database connection to delete. */
|
|
191
|
+
name: string;
|
|
192
|
+
}
|
|
193
|
+
interface DeleteExternalDatabaseConnectionResponse {
|
|
194
|
+
}
|
|
195
|
+
interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
|
|
196
|
+
createdEvent?: EntityCreatedEvent$2;
|
|
197
|
+
updatedEvent?: EntityUpdatedEvent$2;
|
|
198
|
+
deletedEvent?: EntityDeletedEvent$2;
|
|
199
|
+
actionEvent?: ActionEvent$2;
|
|
200
|
+
/**
|
|
201
|
+
* Unique event ID.
|
|
202
|
+
* Allows clients to ignore duplicate webhooks.
|
|
203
|
+
*/
|
|
204
|
+
_id?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Assumes actions are also always typed to an entity_type
|
|
207
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
208
|
+
*/
|
|
209
|
+
entityFqdn?: string;
|
|
210
|
+
/**
|
|
211
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
212
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
213
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
214
|
+
*/
|
|
215
|
+
slug?: string;
|
|
216
|
+
/** ID of the entity associated with the event. */
|
|
217
|
+
entityId?: string;
|
|
218
|
+
/** Event timestamp. */
|
|
219
|
+
eventTime?: Date;
|
|
220
|
+
/**
|
|
221
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
222
|
+
* (for example, GDPR).
|
|
223
|
+
*/
|
|
224
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
225
|
+
/** If present, indicates the action that triggered the event. */
|
|
226
|
+
originatedFrom?: string | null;
|
|
227
|
+
/**
|
|
228
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
229
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
230
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
231
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
232
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
233
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
234
|
+
*/
|
|
235
|
+
entityEventSequence?: string | null;
|
|
236
|
+
}
|
|
237
|
+
/** @oneof */
|
|
238
|
+
interface DomainEventBodyOneOf$2 {
|
|
239
|
+
createdEvent?: EntityCreatedEvent$2;
|
|
240
|
+
updatedEvent?: EntityUpdatedEvent$2;
|
|
241
|
+
deletedEvent?: EntityDeletedEvent$2;
|
|
242
|
+
actionEvent?: ActionEvent$2;
|
|
243
|
+
}
|
|
244
|
+
interface EntityCreatedEvent$2 {
|
|
245
|
+
entity?: string;
|
|
246
|
+
}
|
|
247
|
+
interface EntityUpdatedEvent$2 {
|
|
248
|
+
/**
|
|
249
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
250
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
251
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
252
|
+
*/
|
|
253
|
+
currentEntity?: string;
|
|
254
|
+
}
|
|
255
|
+
interface EntityDeletedEvent$2 {
|
|
256
|
+
/** Entity that was deleted */
|
|
257
|
+
deletedEntity?: string | null;
|
|
258
|
+
}
|
|
259
|
+
interface ActionEvent$2 {
|
|
260
|
+
body?: string;
|
|
261
|
+
}
|
|
262
|
+
interface MessageEnvelope$2 {
|
|
263
|
+
/** App instance ID. */
|
|
264
|
+
instanceId?: string | null;
|
|
265
|
+
/** Event type. */
|
|
266
|
+
eventType?: string;
|
|
267
|
+
/** The identification type and identity data. */
|
|
268
|
+
identity?: IdentificationData$2;
|
|
269
|
+
/** Stringify payload. */
|
|
270
|
+
data?: string;
|
|
271
|
+
}
|
|
272
|
+
interface IdentificationData$2 extends IdentificationDataIdOneOf$2 {
|
|
273
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
274
|
+
anonymousVisitorId?: string;
|
|
275
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
276
|
+
memberId?: string;
|
|
277
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
278
|
+
wixUserId?: string;
|
|
279
|
+
/** ID of an app. */
|
|
280
|
+
appId?: string;
|
|
281
|
+
/** @readonly */
|
|
282
|
+
identityType?: WebhookIdentityType$2;
|
|
283
|
+
}
|
|
284
|
+
/** @oneof */
|
|
285
|
+
interface IdentificationDataIdOneOf$2 {
|
|
286
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
287
|
+
anonymousVisitorId?: string;
|
|
288
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
289
|
+
memberId?: string;
|
|
290
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
291
|
+
wixUserId?: string;
|
|
292
|
+
/** ID of an app. */
|
|
293
|
+
appId?: string;
|
|
294
|
+
}
|
|
295
|
+
declare enum WebhookIdentityType$2 {
|
|
296
|
+
UNKNOWN = "UNKNOWN",
|
|
297
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
298
|
+
MEMBER = "MEMBER",
|
|
299
|
+
WIX_USER = "WIX_USER",
|
|
300
|
+
APP = "APP"
|
|
301
|
+
}
|
|
302
|
+
interface GetExternalDatabaseConnectionResponseNonNullableFields {
|
|
303
|
+
externalDatabaseConnection?: {
|
|
304
|
+
name: string;
|
|
305
|
+
connectionStatus?: {
|
|
306
|
+
successful: boolean;
|
|
307
|
+
causeOfFailure: CauseOfFailure;
|
|
308
|
+
hasCollections: CollectionsFound;
|
|
309
|
+
};
|
|
310
|
+
capabilities?: {
|
|
311
|
+
collectionModificationsSupported: boolean;
|
|
312
|
+
fieldTypes: FieldType[];
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
interface ListExternalDatabaseConnectionsResponseNonNullableFields {
|
|
317
|
+
externalDatabaseConnections: {
|
|
318
|
+
name: string;
|
|
319
|
+
connectionStatus?: {
|
|
320
|
+
successful: boolean;
|
|
321
|
+
causeOfFailure: CauseOfFailure;
|
|
322
|
+
hasCollections: CollectionsFound;
|
|
323
|
+
};
|
|
324
|
+
capabilities?: {
|
|
325
|
+
collectionModificationsSupported: boolean;
|
|
326
|
+
fieldTypes: FieldType[];
|
|
327
|
+
};
|
|
328
|
+
}[];
|
|
329
|
+
}
|
|
330
|
+
interface CreateExternalDatabaseConnectionResponseNonNullableFields {
|
|
331
|
+
externalDatabaseConnection?: {
|
|
332
|
+
name: string;
|
|
333
|
+
connectionStatus?: {
|
|
334
|
+
successful: boolean;
|
|
335
|
+
causeOfFailure: CauseOfFailure;
|
|
336
|
+
hasCollections: CollectionsFound;
|
|
337
|
+
};
|
|
338
|
+
capabilities?: {
|
|
339
|
+
collectionModificationsSupported: boolean;
|
|
340
|
+
fieldTypes: FieldType[];
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
interface UpdateExternalDatabaseConnectionResponseNonNullableFields {
|
|
345
|
+
externalDatabaseConnection?: {
|
|
346
|
+
name: string;
|
|
347
|
+
connectionStatus?: {
|
|
348
|
+
successful: boolean;
|
|
349
|
+
causeOfFailure: CauseOfFailure;
|
|
350
|
+
hasCollections: CollectionsFound;
|
|
351
|
+
};
|
|
352
|
+
capabilities?: {
|
|
353
|
+
collectionModificationsSupported: boolean;
|
|
354
|
+
fieldTypes: FieldType[];
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
interface BaseEventMetadata$2 {
|
|
359
|
+
/** App instance ID. */
|
|
360
|
+
instanceId?: string | null;
|
|
361
|
+
/** Event type. */
|
|
362
|
+
eventType?: string;
|
|
363
|
+
/** The identification type and identity data. */
|
|
364
|
+
identity?: IdentificationData$2;
|
|
365
|
+
}
|
|
366
|
+
interface EventMetadata$2 extends BaseEventMetadata$2 {
|
|
367
|
+
/**
|
|
368
|
+
* Unique event ID.
|
|
369
|
+
* Allows clients to ignore duplicate webhooks.
|
|
370
|
+
*/
|
|
371
|
+
_id?: string;
|
|
372
|
+
/**
|
|
373
|
+
* Assumes actions are also always typed to an entity_type
|
|
374
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
375
|
+
*/
|
|
376
|
+
entityFqdn?: string;
|
|
377
|
+
/**
|
|
378
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
379
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
380
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
381
|
+
*/
|
|
382
|
+
slug?: string;
|
|
383
|
+
/** ID of the entity associated with the event. */
|
|
384
|
+
entityId?: string;
|
|
385
|
+
/** Event timestamp. */
|
|
386
|
+
eventTime?: Date;
|
|
387
|
+
/**
|
|
388
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
389
|
+
* (for example, GDPR).
|
|
390
|
+
*/
|
|
391
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
392
|
+
/** If present, indicates the action that triggered the event. */
|
|
393
|
+
originatedFrom?: string | null;
|
|
394
|
+
/**
|
|
395
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
396
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
397
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
398
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
399
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
400
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
401
|
+
*/
|
|
402
|
+
entityEventSequence?: string | null;
|
|
403
|
+
}
|
|
404
|
+
interface ExternalDatabaseConnectionCreatedEnvelope {
|
|
405
|
+
entity: ExternalDatabaseConnection;
|
|
406
|
+
metadata: EventMetadata$2;
|
|
407
|
+
}
|
|
408
|
+
interface ExternalDatabaseConnectionUpdatedEnvelope {
|
|
409
|
+
entity: ExternalDatabaseConnection;
|
|
410
|
+
metadata: EventMetadata$2;
|
|
411
|
+
}
|
|
412
|
+
interface ExternalDatabaseConnectionDeletedEnvelope {
|
|
413
|
+
metadata: EventMetadata$2;
|
|
414
|
+
}
|
|
415
|
+
interface ListExternalDatabaseConnectionsOptions {
|
|
416
|
+
/** Paging */
|
|
417
|
+
paging?: Paging$3;
|
|
418
|
+
}
|
|
419
|
+
interface CreateExternalDatabaseConnectionOptions {
|
|
420
|
+
/** Connection type. */
|
|
421
|
+
connectionType: ConnectionType;
|
|
422
|
+
}
|
|
423
|
+
interface UpdateExternalDatabaseConnection {
|
|
424
|
+
/** Base URL for provisioning and managing data in the external database. For example: `https://example.com/my-external-database`. */
|
|
425
|
+
endpoint?: string | null;
|
|
426
|
+
/**
|
|
427
|
+
* Settings passed to the external database connection as part of each request.
|
|
428
|
+
* These settings can relate to authentication, tenancy, or provide any other information needed for processing a request.
|
|
429
|
+
* Their content and structure depend on the specific requirements of the external database's API.
|
|
430
|
+
*/
|
|
431
|
+
configuration?: Record<string, any> | null;
|
|
432
|
+
/**
|
|
433
|
+
* Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure.
|
|
434
|
+
* @readonly
|
|
435
|
+
*/
|
|
436
|
+
connectionStatus?: ConnectionStatus;
|
|
437
|
+
/**
|
|
438
|
+
* The external database's capabilities.
|
|
439
|
+
* @readonly
|
|
440
|
+
*/
|
|
441
|
+
capabilities?: Capabilities;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
interface HttpClient {
|
|
445
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
446
|
+
}
|
|
447
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
448
|
+
type HttpResponse<T = any> = {
|
|
449
|
+
data: T;
|
|
450
|
+
status: number;
|
|
451
|
+
statusText: string;
|
|
452
|
+
headers: any;
|
|
453
|
+
request?: any;
|
|
454
|
+
};
|
|
455
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
456
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
457
|
+
url: string;
|
|
458
|
+
data?: Data;
|
|
459
|
+
params?: URLSearchParams;
|
|
460
|
+
} & APIMetadata;
|
|
461
|
+
type APIMetadata = {
|
|
462
|
+
methodFqn?: string;
|
|
463
|
+
entityFqdn?: string;
|
|
464
|
+
packageName?: string;
|
|
465
|
+
};
|
|
466
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
467
|
+
__type: 'event-definition';
|
|
468
|
+
type: Type;
|
|
469
|
+
isDomainEvent?: boolean;
|
|
470
|
+
transformations?: unknown;
|
|
471
|
+
__payload: Payload;
|
|
472
|
+
};
|
|
473
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
474
|
+
|
|
475
|
+
declare const __metadata$3: {
|
|
476
|
+
PACKAGE_NAME: string;
|
|
477
|
+
};
|
|
478
|
+
declare function getExternalDatabaseConnection(httpClient: HttpClient): (name: string) => Promise<ExternalDatabaseConnection & {
|
|
479
|
+
name: string;
|
|
480
|
+
connectionStatus?: {
|
|
481
|
+
successful: boolean;
|
|
482
|
+
causeOfFailure: CauseOfFailure;
|
|
483
|
+
hasCollections: CollectionsFound;
|
|
484
|
+
} | undefined;
|
|
485
|
+
capabilities?: {
|
|
486
|
+
collectionModificationsSupported: boolean;
|
|
487
|
+
fieldTypes: FieldType[];
|
|
488
|
+
} | undefined;
|
|
489
|
+
}>;
|
|
490
|
+
declare function listExternalDatabaseConnections(httpClient: HttpClient): (options?: ListExternalDatabaseConnectionsOptions) => Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
491
|
+
declare function createExternalDatabaseConnection(httpClient: HttpClient): (externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions) => Promise<ExternalDatabaseConnection & {
|
|
492
|
+
name: string;
|
|
493
|
+
connectionStatus?: {
|
|
494
|
+
successful: boolean;
|
|
495
|
+
causeOfFailure: CauseOfFailure;
|
|
496
|
+
hasCollections: CollectionsFound;
|
|
497
|
+
} | undefined;
|
|
498
|
+
capabilities?: {
|
|
499
|
+
collectionModificationsSupported: boolean;
|
|
500
|
+
fieldTypes: FieldType[];
|
|
501
|
+
} | undefined;
|
|
502
|
+
}>;
|
|
503
|
+
declare function updateExternalDatabaseConnection(httpClient: HttpClient): (name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection) => Promise<ExternalDatabaseConnection & {
|
|
504
|
+
name: string;
|
|
505
|
+
connectionStatus?: {
|
|
506
|
+
successful: boolean;
|
|
507
|
+
causeOfFailure: CauseOfFailure;
|
|
508
|
+
hasCollections: CollectionsFound;
|
|
509
|
+
} | undefined;
|
|
510
|
+
capabilities?: {
|
|
511
|
+
collectionModificationsSupported: boolean;
|
|
512
|
+
fieldTypes: FieldType[];
|
|
513
|
+
} | undefined;
|
|
514
|
+
}>;
|
|
515
|
+
declare function deleteExternalDatabaseConnection(httpClient: HttpClient): (name: string) => Promise<void>;
|
|
516
|
+
declare const onExternalDatabaseConnectionCreated: EventDefinition<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
|
|
517
|
+
declare const onExternalDatabaseConnectionUpdated: EventDefinition<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
518
|
+
declare const onExternalDatabaseConnectionDeleted: EventDefinition<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
519
|
+
|
|
520
|
+
type index_d$3_Capabilities = Capabilities;
|
|
521
|
+
type index_d$3_CauseOfFailure = CauseOfFailure;
|
|
522
|
+
declare const index_d$3_CauseOfFailure: typeof CauseOfFailure;
|
|
523
|
+
type index_d$3_CollectionsFound = CollectionsFound;
|
|
524
|
+
declare const index_d$3_CollectionsFound: typeof CollectionsFound;
|
|
525
|
+
type index_d$3_ConnectionStatus = ConnectionStatus;
|
|
526
|
+
type index_d$3_ConnectionType = ConnectionType;
|
|
527
|
+
declare const index_d$3_ConnectionType: typeof ConnectionType;
|
|
528
|
+
type index_d$3_CreateExternalDatabaseConnectionOptions = CreateExternalDatabaseConnectionOptions;
|
|
529
|
+
type index_d$3_CreateExternalDatabaseConnectionRequest = CreateExternalDatabaseConnectionRequest;
|
|
530
|
+
type index_d$3_CreateExternalDatabaseConnectionResponse = CreateExternalDatabaseConnectionResponse;
|
|
531
|
+
type index_d$3_CreateExternalDatabaseConnectionResponseNonNullableFields = CreateExternalDatabaseConnectionResponseNonNullableFields;
|
|
532
|
+
type index_d$3_DeleteExternalDatabaseConnectionRequest = DeleteExternalDatabaseConnectionRequest;
|
|
533
|
+
type index_d$3_DeleteExternalDatabaseConnectionResponse = DeleteExternalDatabaseConnectionResponse;
|
|
534
|
+
type index_d$3_ExternalDatabaseConnection = ExternalDatabaseConnection;
|
|
535
|
+
type index_d$3_ExternalDatabaseConnectionCreatedEnvelope = ExternalDatabaseConnectionCreatedEnvelope;
|
|
536
|
+
type index_d$3_ExternalDatabaseConnectionDeletedEnvelope = ExternalDatabaseConnectionDeletedEnvelope;
|
|
537
|
+
type index_d$3_ExternalDatabaseConnectionUpdatedEnvelope = ExternalDatabaseConnectionUpdatedEnvelope;
|
|
538
|
+
type index_d$3_FieldType = FieldType;
|
|
539
|
+
declare const index_d$3_FieldType: typeof FieldType;
|
|
540
|
+
type index_d$3_GetExternalDatabaseConnectionRequest = GetExternalDatabaseConnectionRequest;
|
|
541
|
+
type index_d$3_GetExternalDatabaseConnectionResponse = GetExternalDatabaseConnectionResponse;
|
|
542
|
+
type index_d$3_GetExternalDatabaseConnectionResponseNonNullableFields = GetExternalDatabaseConnectionResponseNonNullableFields;
|
|
543
|
+
type index_d$3_ListExternalDatabaseConnectionsOptions = ListExternalDatabaseConnectionsOptions;
|
|
544
|
+
type index_d$3_ListExternalDatabaseConnectionsRequest = ListExternalDatabaseConnectionsRequest;
|
|
545
|
+
type index_d$3_ListExternalDatabaseConnectionsResponse = ListExternalDatabaseConnectionsResponse;
|
|
546
|
+
type index_d$3_ListExternalDatabaseConnectionsResponseNonNullableFields = ListExternalDatabaseConnectionsResponseNonNullableFields;
|
|
547
|
+
type index_d$3_ProtocolVersion = ProtocolVersion;
|
|
548
|
+
declare const index_d$3_ProtocolVersion: typeof ProtocolVersion;
|
|
549
|
+
type index_d$3_UpdateExternalDatabaseConnection = UpdateExternalDatabaseConnection;
|
|
550
|
+
type index_d$3_UpdateExternalDatabaseConnectionRequest = UpdateExternalDatabaseConnectionRequest;
|
|
551
|
+
type index_d$3_UpdateExternalDatabaseConnectionResponse = UpdateExternalDatabaseConnectionResponse;
|
|
552
|
+
type index_d$3_UpdateExternalDatabaseConnectionResponseNonNullableFields = UpdateExternalDatabaseConnectionResponseNonNullableFields;
|
|
553
|
+
declare const index_d$3_createExternalDatabaseConnection: typeof createExternalDatabaseConnection;
|
|
554
|
+
declare const index_d$3_deleteExternalDatabaseConnection: typeof deleteExternalDatabaseConnection;
|
|
555
|
+
declare const index_d$3_getExternalDatabaseConnection: typeof getExternalDatabaseConnection;
|
|
556
|
+
declare const index_d$3_listExternalDatabaseConnections: typeof listExternalDatabaseConnections;
|
|
557
|
+
declare const index_d$3_onExternalDatabaseConnectionCreated: typeof onExternalDatabaseConnectionCreated;
|
|
558
|
+
declare const index_d$3_onExternalDatabaseConnectionDeleted: typeof onExternalDatabaseConnectionDeleted;
|
|
559
|
+
declare const index_d$3_onExternalDatabaseConnectionUpdated: typeof onExternalDatabaseConnectionUpdated;
|
|
560
|
+
declare const index_d$3_updateExternalDatabaseConnection: typeof updateExternalDatabaseConnection;
|
|
561
|
+
declare namespace index_d$3 {
|
|
562
|
+
export { type ActionEvent$2 as ActionEvent, type BaseEventMetadata$2 as BaseEventMetadata, type index_d$3_Capabilities as Capabilities, index_d$3_CauseOfFailure as CauseOfFailure, index_d$3_CollectionsFound as CollectionsFound, type index_d$3_ConnectionStatus as ConnectionStatus, index_d$3_ConnectionType as ConnectionType, type index_d$3_CreateExternalDatabaseConnectionOptions as CreateExternalDatabaseConnectionOptions, type index_d$3_CreateExternalDatabaseConnectionRequest as CreateExternalDatabaseConnectionRequest, type index_d$3_CreateExternalDatabaseConnectionResponse as CreateExternalDatabaseConnectionResponse, type index_d$3_CreateExternalDatabaseConnectionResponseNonNullableFields as CreateExternalDatabaseConnectionResponseNonNullableFields, type index_d$3_DeleteExternalDatabaseConnectionRequest as DeleteExternalDatabaseConnectionRequest, type index_d$3_DeleteExternalDatabaseConnectionResponse as DeleteExternalDatabaseConnectionResponse, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type EventMetadata$2 as EventMetadata, type index_d$3_ExternalDatabaseConnection as ExternalDatabaseConnection, type index_d$3_ExternalDatabaseConnectionCreatedEnvelope as ExternalDatabaseConnectionCreatedEnvelope, type index_d$3_ExternalDatabaseConnectionDeletedEnvelope as ExternalDatabaseConnectionDeletedEnvelope, type index_d$3_ExternalDatabaseConnectionUpdatedEnvelope as ExternalDatabaseConnectionUpdatedEnvelope, index_d$3_FieldType as FieldType, type index_d$3_GetExternalDatabaseConnectionRequest as GetExternalDatabaseConnectionRequest, type index_d$3_GetExternalDatabaseConnectionResponse as GetExternalDatabaseConnectionResponse, type index_d$3_GetExternalDatabaseConnectionResponseNonNullableFields as GetExternalDatabaseConnectionResponseNonNullableFields, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type index_d$3_ListExternalDatabaseConnectionsOptions as ListExternalDatabaseConnectionsOptions, type index_d$3_ListExternalDatabaseConnectionsRequest as ListExternalDatabaseConnectionsRequest, type index_d$3_ListExternalDatabaseConnectionsResponse as ListExternalDatabaseConnectionsResponse, type index_d$3_ListExternalDatabaseConnectionsResponseNonNullableFields as ListExternalDatabaseConnectionsResponseNonNullableFields, type MessageEnvelope$2 as MessageEnvelope, type Paging$3 as Paging, type PagingMetadata$1 as PagingMetadata, index_d$3_ProtocolVersion as ProtocolVersion, type index_d$3_UpdateExternalDatabaseConnection as UpdateExternalDatabaseConnection, type index_d$3_UpdateExternalDatabaseConnectionRequest as UpdateExternalDatabaseConnectionRequest, type index_d$3_UpdateExternalDatabaseConnectionResponse as UpdateExternalDatabaseConnectionResponse, type index_d$3_UpdateExternalDatabaseConnectionResponseNonNullableFields as UpdateExternalDatabaseConnectionResponseNonNullableFields, WebhookIdentityType$2 as WebhookIdentityType, __metadata$3 as __metadata, index_d$3_createExternalDatabaseConnection as createExternalDatabaseConnection, index_d$3_deleteExternalDatabaseConnection as deleteExternalDatabaseConnection, index_d$3_getExternalDatabaseConnection as getExternalDatabaseConnection, index_d$3_listExternalDatabaseConnections as listExternalDatabaseConnections, index_d$3_onExternalDatabaseConnectionCreated as onExternalDatabaseConnectionCreated, index_d$3_onExternalDatabaseConnectionDeleted as onExternalDatabaseConnectionDeleted, index_d$3_onExternalDatabaseConnectionUpdated as onExternalDatabaseConnectionUpdated, index_d$3_updateExternalDatabaseConnection as updateExternalDatabaseConnection };
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/** A data collection determines the structure of data to be stored in a database. */
|
|
566
|
+
interface DataCollection {
|
|
567
|
+
/** Collection ID. For example, `my-first-collection`. May include a namespace. */
|
|
568
|
+
_id?: string;
|
|
569
|
+
/**
|
|
570
|
+
* Collection type. Indicates how the collection was created and is stored.
|
|
571
|
+
*
|
|
572
|
+
* * `NATIVE`: User-created collection.
|
|
573
|
+
* * `WIX_APP`: [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app, including [starter collections](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-starter-collections) created when a Wix app is installed.
|
|
574
|
+
* * `BLOCKS_APP`: Collection created by a Wix Blocks app.
|
|
575
|
+
* * `EXTERNAL`: Collection located in externally connected storage.
|
|
576
|
+
* @readonly
|
|
577
|
+
*/
|
|
578
|
+
collectionType?: CollectionType;
|
|
579
|
+
/**
|
|
580
|
+
* ID of the app that defined this collection. For user-defined collections, this value is null.
|
|
581
|
+
* @readonly
|
|
582
|
+
*/
|
|
583
|
+
ownerAppId?: string | null;
|
|
584
|
+
/**
|
|
585
|
+
* Maximum number of items returned in a single query, based on the underlying storage.
|
|
586
|
+
* Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
|
|
587
|
+
* External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
|
|
588
|
+
* @readonly
|
|
589
|
+
*/
|
|
590
|
+
maxPageSize?: number | null;
|
|
591
|
+
/** Collection's display name as shown in the CMS. For example, `My First Collection`. */
|
|
592
|
+
displayName?: string | null;
|
|
593
|
+
/**
|
|
594
|
+
* Indicates how the collection's items are sorted by default when a query doesn't specify an order.
|
|
595
|
+
* @readonly
|
|
596
|
+
*/
|
|
597
|
+
defaultDisplayOrder?: Sort;
|
|
598
|
+
/**
|
|
599
|
+
* UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
|
|
600
|
+
* Empty for all data collections not owned by internal Wix apps.
|
|
601
|
+
* @readonly
|
|
602
|
+
*/
|
|
603
|
+
displayNamespace?: string | null;
|
|
604
|
+
/** The field whose value the CMS displays to represent the collection item when referenced in a different collection. */
|
|
605
|
+
displayField?: string | null;
|
|
606
|
+
/**
|
|
607
|
+
* Capabilities the collection supports.
|
|
608
|
+
* @readonly
|
|
609
|
+
*/
|
|
610
|
+
capabilities?: CollectionCapabilities;
|
|
611
|
+
/** Collection's field structure. */
|
|
612
|
+
fields?: Field$1[];
|
|
613
|
+
/** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
|
|
614
|
+
permissions?: Permissions;
|
|
615
|
+
/**
|
|
616
|
+
* Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must pass the latest revision number.
|
|
617
|
+
* @readonly
|
|
618
|
+
*/
|
|
619
|
+
revision?: string | null;
|
|
620
|
+
/** All plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality. */
|
|
621
|
+
plugins?: Plugin[];
|
|
622
|
+
/**
|
|
623
|
+
* All paging modes the collection supports. In native collections, offset-based paging is supported by default.
|
|
624
|
+
* @readonly
|
|
625
|
+
*/
|
|
626
|
+
pagingModes?: PagingMode[];
|
|
627
|
+
/**
|
|
628
|
+
* Date the collection was created.
|
|
629
|
+
* @readonly
|
|
630
|
+
*/
|
|
631
|
+
_createdDate?: Date;
|
|
632
|
+
/**
|
|
633
|
+
* Date the collection was last updated.
|
|
634
|
+
* @readonly
|
|
635
|
+
*/
|
|
636
|
+
_updatedDate?: Date;
|
|
637
|
+
}
|
|
638
|
+
declare enum CollectionType {
|
|
639
|
+
/** User-created collection. */
|
|
640
|
+
NATIVE = "NATIVE",
|
|
641
|
+
/** [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app when it is installed. This type of collection can be modified dynamically by that app (for example, Wix Forms). */
|
|
642
|
+
WIX_APP = "WIX_APP",
|
|
643
|
+
/** Collection created by a Wix Blocks app. */
|
|
644
|
+
BLOCKS_APP = "BLOCKS_APP",
|
|
645
|
+
/** Collection located in externally connected storage. */
|
|
646
|
+
EXTERNAL = "EXTERNAL"
|
|
647
|
+
}
|
|
648
|
+
interface Sort {
|
|
649
|
+
/** Field to sort by. */
|
|
650
|
+
fieldKey?: string;
|
|
651
|
+
/**
|
|
652
|
+
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
653
|
+
*
|
|
654
|
+
* Default: `ASC`
|
|
655
|
+
*/
|
|
656
|
+
direction?: Direction;
|
|
657
|
+
}
|
|
658
|
+
declare enum Direction {
|
|
659
|
+
ASC = "ASC",
|
|
660
|
+
DESC = "DESC"
|
|
661
|
+
}
|
|
662
|
+
interface CollectionCapabilities {
|
|
663
|
+
/**
|
|
664
|
+
* Data operations the collection supports. The listed operations can be performed on data the collection contains.
|
|
665
|
+
*
|
|
666
|
+
* Supported values: `AGGREGATE`, `BULK_INSERT`, `BULK_REMOVE`, `BULK_SAVE`, `BULK_UPDATE`, `COUNT`, `DISTINCT`, `FIND`, `GET`, `INSERT`, `INSERT_REFERENCE`, `IS_REFERENCED`, `QUERY_REFERENCED`, `REMOVE`, `REMOVE_REFERENCE`, `REPLACE_REFERENCES`, `SAVE`, `TRUNCATE`, `UPDATE`.
|
|
667
|
+
*/
|
|
668
|
+
dataOperations?: DataOperation[];
|
|
669
|
+
/**
|
|
670
|
+
* Collection operations supported. The listed operations can be performed on the collection itself.
|
|
671
|
+
* + `UPDATE`: Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed.
|
|
672
|
+
* + `REMOVE`: Allows deleting the entire collection. If not included, the collection can't be deleted.
|
|
673
|
+
*/
|
|
674
|
+
collectionOperations?: CollectionOperation[];
|
|
675
|
+
/** Maximum number of indexes for the collection. */
|
|
676
|
+
indexLimits?: IndexLimits;
|
|
677
|
+
}
|
|
678
|
+
declare enum DataOperation {
|
|
679
|
+
AGGREGATE = "AGGREGATE",
|
|
680
|
+
BULK_INSERT = "BULK_INSERT",
|
|
681
|
+
BULK_REMOVE = "BULK_REMOVE",
|
|
682
|
+
BULK_SAVE = "BULK_SAVE",
|
|
683
|
+
BULK_UPDATE = "BULK_UPDATE",
|
|
684
|
+
COUNT = "COUNT",
|
|
685
|
+
DISTINCT = "DISTINCT",
|
|
686
|
+
FIND = "FIND",
|
|
687
|
+
GET = "GET",
|
|
688
|
+
INSERT = "INSERT",
|
|
689
|
+
INSERT_REFERENCE = "INSERT_REFERENCE",
|
|
690
|
+
IS_REFERENCED = "IS_REFERENCED",
|
|
691
|
+
QUERY_REFERENCED = "QUERY_REFERENCED",
|
|
692
|
+
REMOVE = "REMOVE",
|
|
693
|
+
REMOVE_REFERENCE = "REMOVE_REFERENCE",
|
|
694
|
+
REPLACE_REFERENCES = "REPLACE_REFERENCES",
|
|
695
|
+
SAVE = "SAVE",
|
|
696
|
+
TRUNCATE = "TRUNCATE",
|
|
697
|
+
UPDATE = "UPDATE",
|
|
698
|
+
PATCH = "PATCH",
|
|
699
|
+
BULK_PATCH = "BULK_PATCH"
|
|
700
|
+
}
|
|
701
|
+
declare enum CollectionOperation {
|
|
702
|
+
/** Supports updating this collection. */
|
|
703
|
+
UPDATE = "UPDATE",
|
|
704
|
+
/** Supports removing this collections. */
|
|
705
|
+
REMOVE = "REMOVE"
|
|
706
|
+
}
|
|
707
|
+
interface IndexLimits {
|
|
708
|
+
/** Maximum number of regular (non-unique) indexes allowed for this collection. */
|
|
709
|
+
regular?: number;
|
|
710
|
+
/** Maximum number of unique indexes allowed for this collection. */
|
|
711
|
+
unique?: number;
|
|
712
|
+
/** Maximum number of regular and unique indexes allowed for this collection. */
|
|
713
|
+
total?: number;
|
|
714
|
+
}
|
|
715
|
+
interface Field$1 extends FieldRangeValidationsOneOf {
|
|
716
|
+
/** Range of possible values for a numerical field. */
|
|
717
|
+
numberRange?: NumberRange;
|
|
718
|
+
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
719
|
+
stringLengthRange?: StringLengthRange;
|
|
720
|
+
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
721
|
+
arraySizeRange?: ArraySizeRange;
|
|
722
|
+
/** Unique identifier for the field. For example, `firstName`. */
|
|
723
|
+
key?: string;
|
|
724
|
+
/** Field's display name when shown in the CMS. For example, `First Name`. */
|
|
725
|
+
displayName?: string | null;
|
|
726
|
+
/** Field's data type. */
|
|
727
|
+
type?: Type;
|
|
728
|
+
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
729
|
+
typeMetadata?: TypeMetadata;
|
|
730
|
+
/**
|
|
731
|
+
* Whether the field is a system field (created automatically).
|
|
732
|
+
* @readonly
|
|
733
|
+
*/
|
|
734
|
+
systemField?: boolean;
|
|
735
|
+
/**
|
|
736
|
+
* Capabilities the field supports.
|
|
737
|
+
* @readonly
|
|
738
|
+
*/
|
|
739
|
+
capabilities?: FieldCapabilities;
|
|
740
|
+
/** Indicates if field is encrypted. */
|
|
741
|
+
encrypted?: boolean;
|
|
742
|
+
/** Description of the field. */
|
|
743
|
+
description?: string | null;
|
|
744
|
+
plugin?: string | null;
|
|
745
|
+
/**
|
|
746
|
+
* Whether the field is read-only. A read-only field can't be changed.
|
|
747
|
+
*
|
|
748
|
+
* Default: `false`
|
|
749
|
+
*/
|
|
750
|
+
readOnly?: boolean | null;
|
|
751
|
+
/**
|
|
752
|
+
* Whether the field is immutable. An immutable field can be set once, but then cannot be updated.
|
|
753
|
+
*
|
|
754
|
+
* Default: `false`
|
|
755
|
+
*/
|
|
756
|
+
immutable?: boolean | null;
|
|
757
|
+
/**
|
|
758
|
+
* Whether the field is required.
|
|
759
|
+
*
|
|
760
|
+
* Default: `false`
|
|
761
|
+
*/
|
|
762
|
+
required?: boolean | null;
|
|
763
|
+
/** Additional optional plugins for the field. */
|
|
764
|
+
plugins?: FieldPlugin[];
|
|
765
|
+
}
|
|
766
|
+
/** @oneof */
|
|
767
|
+
interface FieldRangeValidationsOneOf {
|
|
768
|
+
/** Range of possible values for a numerical field. */
|
|
769
|
+
numberRange?: NumberRange;
|
|
770
|
+
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
771
|
+
stringLengthRange?: StringLengthRange;
|
|
772
|
+
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
773
|
+
arraySizeRange?: ArraySizeRange;
|
|
774
|
+
}
|
|
775
|
+
declare enum Type {
|
|
776
|
+
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
777
|
+
TEXT = "TEXT",
|
|
778
|
+
NUMBER = "NUMBER",
|
|
779
|
+
DATE = "DATE",
|
|
780
|
+
DATETIME = "DATETIME",
|
|
781
|
+
IMAGE = "IMAGE",
|
|
782
|
+
BOOLEAN = "BOOLEAN",
|
|
783
|
+
DOCUMENT = "DOCUMENT",
|
|
784
|
+
URL = "URL",
|
|
785
|
+
RICH_TEXT = "RICH_TEXT",
|
|
786
|
+
VIDEO = "VIDEO",
|
|
787
|
+
ANY = "ANY",
|
|
788
|
+
ARRAY_STRING = "ARRAY_STRING",
|
|
789
|
+
ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
|
|
790
|
+
AUDIO = "AUDIO",
|
|
791
|
+
TIME = "TIME",
|
|
792
|
+
LANGUAGE = "LANGUAGE",
|
|
793
|
+
RICH_CONTENT = "RICH_CONTENT",
|
|
794
|
+
MEDIA_GALLERY = "MEDIA_GALLERY",
|
|
795
|
+
ADDRESS = "ADDRESS",
|
|
796
|
+
PAGE_LINK = "PAGE_LINK",
|
|
797
|
+
REFERENCE = "REFERENCE",
|
|
798
|
+
MULTI_REFERENCE = "MULTI_REFERENCE",
|
|
799
|
+
OBJECT = "OBJECT",
|
|
800
|
+
ARRAY = "ARRAY",
|
|
801
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
802
|
+
LEGACY_TIME = "LEGACY_TIME",
|
|
803
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
804
|
+
LEGACY_BOOK = "LEGACY_BOOK",
|
|
805
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
806
|
+
LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL",
|
|
807
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
808
|
+
LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE",
|
|
809
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
810
|
+
LEGACY_IMAGE = "LEGACY_IMAGE",
|
|
811
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
812
|
+
LEGACY_COLOR = "LEGACY_COLOR",
|
|
813
|
+
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
814
|
+
LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
|
|
815
|
+
}
|
|
816
|
+
interface TypeMetadata extends TypeMetadataMetadataOneOf {
|
|
817
|
+
/** Metadata for a reference field. */
|
|
818
|
+
reference?: Reference;
|
|
819
|
+
/** Metadata for a multi-reference field. */
|
|
820
|
+
multiReference?: MultiReference;
|
|
821
|
+
/** Metadata for an object field. */
|
|
822
|
+
object?: _Object;
|
|
823
|
+
/** Metadata for an array field. */
|
|
824
|
+
array?: _Array;
|
|
825
|
+
/** Metadata for a page link field. */
|
|
826
|
+
pageLink?: PageLink;
|
|
827
|
+
}
|
|
828
|
+
/** @oneof */
|
|
829
|
+
interface TypeMetadataMetadataOneOf {
|
|
830
|
+
/** Metadata for a reference field. */
|
|
831
|
+
reference?: Reference;
|
|
832
|
+
/** Metadata for a multi-reference field. */
|
|
833
|
+
multiReference?: MultiReference;
|
|
834
|
+
/** Metadata for an object field. */
|
|
835
|
+
object?: _Object;
|
|
836
|
+
/** Metadata for an array field. */
|
|
837
|
+
array?: _Array;
|
|
838
|
+
/** Metadata for a page link field. */
|
|
839
|
+
pageLink?: PageLink;
|
|
840
|
+
}
|
|
841
|
+
interface FieldCapabilities {
|
|
842
|
+
/**
|
|
843
|
+
* Whether the collection can be sorted by this field.
|
|
844
|
+
*
|
|
845
|
+
* Default: `false`
|
|
846
|
+
*/
|
|
847
|
+
sortable?: boolean;
|
|
848
|
+
/**
|
|
849
|
+
* Query operators that can be used for this field.
|
|
850
|
+
*
|
|
851
|
+
* Supported values: `EQ`, `LT`, `GT`, `NE`, `LTE`, `GTE`, `STARTS_WITH`, `ENDS_WITH`, `CONTAINS`, `HAS_SOME`, `HAS_ALL`, `EXISTS`, `URLIZED`.
|
|
852
|
+
*/
|
|
853
|
+
queryOperators?: QueryOperator[];
|
|
854
|
+
}
|
|
855
|
+
declare enum QueryOperator {
|
|
856
|
+
EQ = "EQ",
|
|
857
|
+
LT = "LT",
|
|
858
|
+
GT = "GT",
|
|
859
|
+
NE = "NE",
|
|
860
|
+
LTE = "LTE",
|
|
861
|
+
GTE = "GTE",
|
|
862
|
+
STARTS_WITH = "STARTS_WITH",
|
|
863
|
+
ENDS_WITH = "ENDS_WITH",
|
|
864
|
+
CONTAINS = "CONTAINS",
|
|
865
|
+
HAS_SOME = "HAS_SOME",
|
|
866
|
+
HAS_ALL = "HAS_ALL",
|
|
867
|
+
EXISTS = "EXISTS",
|
|
868
|
+
URLIZED = "URLIZED"
|
|
869
|
+
}
|
|
870
|
+
interface ObjectField {
|
|
871
|
+
/** Field key. */
|
|
872
|
+
key?: string;
|
|
873
|
+
/** Display name for the field. */
|
|
874
|
+
displayName?: string | null;
|
|
875
|
+
/** Field type. */
|
|
876
|
+
type?: Type;
|
|
877
|
+
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
878
|
+
typeMetadata?: TypeMetadata;
|
|
879
|
+
/**
|
|
880
|
+
* Capabilities the object field supports.
|
|
881
|
+
* @readonly
|
|
882
|
+
*/
|
|
883
|
+
capabilities?: FieldCapabilities;
|
|
884
|
+
}
|
|
885
|
+
interface FieldsPattern {
|
|
886
|
+
pattern?: string;
|
|
887
|
+
lowercase?: boolean;
|
|
888
|
+
}
|
|
889
|
+
interface UrlizedOnlyPattern {
|
|
890
|
+
pattern?: string;
|
|
891
|
+
}
|
|
892
|
+
interface Calculator extends CalculatorPatternOneOf {
|
|
893
|
+
/** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
|
|
894
|
+
fieldsPattern?: FieldsPattern;
|
|
895
|
+
/** Value is only URL encoded. */
|
|
896
|
+
urlizedOnlyPattern?: UrlizedOnlyPattern;
|
|
897
|
+
}
|
|
898
|
+
/** @oneof */
|
|
899
|
+
interface CalculatorPatternOneOf {
|
|
900
|
+
/** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
|
|
901
|
+
fieldsPattern?: FieldsPattern;
|
|
902
|
+
/** Value is only URL encoded. */
|
|
903
|
+
urlizedOnlyPattern?: UrlizedOnlyPattern;
|
|
904
|
+
}
|
|
905
|
+
interface Reference {
|
|
906
|
+
/** Referenced collection ID. */
|
|
907
|
+
referencedCollectionId?: string;
|
|
908
|
+
}
|
|
909
|
+
interface MultiReference {
|
|
910
|
+
/** Referenced collection ID. */
|
|
911
|
+
referencedCollectionId?: string;
|
|
912
|
+
/** Referencing field key. */
|
|
913
|
+
referencingFieldKey?: string;
|
|
914
|
+
/** Display name in the CMS for the referenced data. */
|
|
915
|
+
referencingDisplayName?: string;
|
|
916
|
+
}
|
|
917
|
+
interface _Object {
|
|
918
|
+
/** Fields within the object. */
|
|
919
|
+
fields?: ObjectField[];
|
|
920
|
+
}
|
|
921
|
+
interface _Array {
|
|
922
|
+
/** Element's data type. */
|
|
923
|
+
elementType?: Type;
|
|
924
|
+
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
925
|
+
typeMetadata?: TypeMetadata;
|
|
926
|
+
}
|
|
927
|
+
interface PageLink {
|
|
928
|
+
calculator?: Calculator;
|
|
929
|
+
/** Defines reference to router pattern in the site document. */
|
|
930
|
+
linkedRouterPage?: string | null;
|
|
931
|
+
}
|
|
932
|
+
interface NumberRange {
|
|
933
|
+
/**
|
|
934
|
+
* Minimum permitted value for a numerical field.
|
|
935
|
+
*
|
|
936
|
+
* Default: No validation
|
|
937
|
+
*/
|
|
938
|
+
min?: number | null;
|
|
939
|
+
/**
|
|
940
|
+
* Maximum permitted value for a numerical field.
|
|
941
|
+
*
|
|
942
|
+
* Default: No validation
|
|
943
|
+
*/
|
|
944
|
+
max?: number | null;
|
|
945
|
+
}
|
|
946
|
+
interface StringLengthRange {
|
|
947
|
+
/**
|
|
948
|
+
* Minimum permitted length for a text field.
|
|
949
|
+
*
|
|
950
|
+
* Default: No validation
|
|
951
|
+
*/
|
|
952
|
+
minLength?: number | null;
|
|
953
|
+
/**
|
|
954
|
+
* Maximum permitted length for a text field.
|
|
955
|
+
*
|
|
956
|
+
* Default: No validation
|
|
957
|
+
*/
|
|
958
|
+
maxLength?: number | null;
|
|
959
|
+
}
|
|
960
|
+
interface ArraySizeRange {
|
|
961
|
+
/**
|
|
962
|
+
* Minimum permitted number of items in an array field. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`.
|
|
963
|
+
*
|
|
964
|
+
* Default: No validation
|
|
965
|
+
*/
|
|
966
|
+
minSize?: number | null;
|
|
967
|
+
/**
|
|
968
|
+
* Maximum permitted number of items in an array field. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`.
|
|
969
|
+
*
|
|
970
|
+
* Default: No validation
|
|
971
|
+
*/
|
|
972
|
+
maxSize?: number | null;
|
|
973
|
+
}
|
|
974
|
+
/** Optional plug-in aspects for fields */
|
|
975
|
+
interface FieldPlugin extends FieldPluginOptionsOneOf {
|
|
976
|
+
/** Options for the CMS plugin. */
|
|
977
|
+
cmsOptions?: CmsOptions;
|
|
978
|
+
type?: FieldPluginType;
|
|
979
|
+
}
|
|
980
|
+
/** @oneof */
|
|
981
|
+
interface FieldPluginOptionsOneOf {
|
|
982
|
+
/** Options for the CMS plugin. */
|
|
983
|
+
cmsOptions?: CmsOptions;
|
|
984
|
+
}
|
|
985
|
+
declare enum FieldPluginType {
|
|
986
|
+
UNKNOWN = "UNKNOWN",
|
|
987
|
+
/** CMS-related field attributes */
|
|
988
|
+
CMS = "CMS"
|
|
989
|
+
}
|
|
990
|
+
/** Options for the CMS plugin. */
|
|
991
|
+
interface CmsOptions {
|
|
992
|
+
/**
|
|
993
|
+
* Indicates an internal CMS field. The CMS does not display internal fields.
|
|
994
|
+
*
|
|
995
|
+
* Default: `false`
|
|
996
|
+
*/
|
|
997
|
+
internal?: boolean;
|
|
998
|
+
}
|
|
999
|
+
/** Permissions defined by the lowest role needed to perform each action. */
|
|
1000
|
+
interface Permissions {
|
|
1001
|
+
/** Lowest role needed to add a collection. */
|
|
1002
|
+
insert?: Role;
|
|
1003
|
+
/** Lowest role needed to update a collection. */
|
|
1004
|
+
update?: Role;
|
|
1005
|
+
/** Lowest role needed to remove a collection. */
|
|
1006
|
+
remove?: Role;
|
|
1007
|
+
/** Lowest role needed to read a collection. */
|
|
1008
|
+
read?: Role;
|
|
1009
|
+
}
|
|
1010
|
+
declare enum Role {
|
|
1011
|
+
/** Unknown. */
|
|
1012
|
+
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
1013
|
+
/** Site administrator. */
|
|
1014
|
+
ADMIN = "ADMIN",
|
|
1015
|
+
/** Signed-in user who added content to this collection. */
|
|
1016
|
+
SITE_MEMBER_AUTHOR = "SITE_MEMBER_AUTHOR",
|
|
1017
|
+
/** Any signed-in user. */
|
|
1018
|
+
SITE_MEMBER = "SITE_MEMBER",
|
|
1019
|
+
/** Any site visitor. */
|
|
1020
|
+
ANYONE = "ANYONE"
|
|
1021
|
+
}
|
|
1022
|
+
interface Plugin extends PluginOptionsOneOf {
|
|
1023
|
+
/** Options for the Publish plugin. */
|
|
1024
|
+
publishOptions?: PublishPluginOptions$1;
|
|
1025
|
+
/** Options for the Single Item plugin. */
|
|
1026
|
+
singleItemOptions?: SingleItemPluginOptions;
|
|
1027
|
+
/** Options for the Urlized plugin. */
|
|
1028
|
+
urlizedOptions?: UrlizedPluginOptions;
|
|
1029
|
+
/** Options for the Multilingual plugin. */
|
|
1030
|
+
multilingualOptions?: MultilingualOptions;
|
|
1031
|
+
/** Options for the PageLink plugin. */
|
|
1032
|
+
editablePageLinkOptions?: PageLinkPluginOptions;
|
|
1033
|
+
/** Options for the CMS plugin. */
|
|
1034
|
+
cmsOptions?: PluginCmsOptions;
|
|
1035
|
+
/**
|
|
1036
|
+
* Plugin types. The following plugins are supported:
|
|
1037
|
+
*
|
|
1038
|
+
* * `PUBLISH`: Allows items to be marked as either draft or published. For each item you can set a publishing time when the item will become visible to site visitors.
|
|
1039
|
+
* * `SINGLE_ITEM`: Ensures the collection can have one item at most. Can only be applied to a new collection.
|
|
1040
|
+
* * `URLIZED`: Generates item URLs for collections used by dynamic pages.
|
|
1041
|
+
* * `MULTILINGUAL`: Indicates that the collection is translatable. This allows you to manage translation for selected fields using [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
1042
|
+
* * `CMS`: Contains CMS-related collection attributes
|
|
1043
|
+
*/
|
|
1044
|
+
type?: PluginType;
|
|
1045
|
+
}
|
|
1046
|
+
/** @oneof */
|
|
1047
|
+
interface PluginOptionsOneOf {
|
|
1048
|
+
/** Options for the Publish plugin. */
|
|
1049
|
+
publishOptions?: PublishPluginOptions$1;
|
|
1050
|
+
/** Options for the Single Item plugin. */
|
|
1051
|
+
singleItemOptions?: SingleItemPluginOptions;
|
|
1052
|
+
/** Options for the Urlized plugin. */
|
|
1053
|
+
urlizedOptions?: UrlizedPluginOptions;
|
|
1054
|
+
/** Options for the Multilingual plugin. */
|
|
1055
|
+
multilingualOptions?: MultilingualOptions;
|
|
1056
|
+
/** Options for the PageLink plugin. */
|
|
1057
|
+
editablePageLinkOptions?: PageLinkPluginOptions;
|
|
1058
|
+
/** Options for the CMS plugin. */
|
|
1059
|
+
cmsOptions?: PluginCmsOptions;
|
|
1060
|
+
}
|
|
1061
|
+
declare enum Status$1 {
|
|
1062
|
+
UNKNOWN_PUBLISH_PLUGIN_STATUS = "UNKNOWN_PUBLISH_PLUGIN_STATUS",
|
|
1063
|
+
PUBLISHED = "PUBLISHED",
|
|
1064
|
+
DRAFT = "DRAFT"
|
|
1065
|
+
}
|
|
1066
|
+
declare enum Format {
|
|
1067
|
+
UNKNOWN_URLIZED_PLUGIN_FORMAT = "UNKNOWN_URLIZED_PLUGIN_FORMAT",
|
|
1068
|
+
ORIGINAL = "ORIGINAL",
|
|
1069
|
+
PLAIN = "PLAIN"
|
|
1070
|
+
}
|
|
1071
|
+
/** if CMS-defined sort is enabled and should be used in site */
|
|
1072
|
+
interface SiteSort {
|
|
1073
|
+
/** Field and order for the site sort. */
|
|
1074
|
+
sort?: Sort[];
|
|
1075
|
+
}
|
|
1076
|
+
declare enum PluginType {
|
|
1077
|
+
/** Unknown plugin type. */
|
|
1078
|
+
UNKNOWN_PLUGIN_TYPE = "UNKNOWN_PLUGIN_TYPE",
|
|
1079
|
+
/** Allows items to be marked as either draft or published. For each item you can set a publishing time when the item will become visible to site visitors. */
|
|
1080
|
+
PUBLISH = "PUBLISH",
|
|
1081
|
+
/** Ensures the collection can have one item at most. Can only be applied to a new collection. */
|
|
1082
|
+
SINGLE_ITEM = "SINGLE_ITEM",
|
|
1083
|
+
/** Generates item URLs for collections used by dynamic pages. */
|
|
1084
|
+
URLIZED = "URLIZED",
|
|
1085
|
+
/** Deprecated. Will be removed in the future. */
|
|
1086
|
+
GRIDAPPLESS = "GRIDAPPLESS",
|
|
1087
|
+
/** Indicates that the collection is translatable. This allows you to manage translation for selected fields using [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual). */
|
|
1088
|
+
MULTILINGUAL = "MULTILINGUAL",
|
|
1089
|
+
/** Indicates that collection is shared with current site */
|
|
1090
|
+
SHARED = "SHARED",
|
|
1091
|
+
/** Indicates that page link fields are persisted and can be updated */
|
|
1092
|
+
EDITABLE_PAGE_LINK = "EDITABLE_PAGE_LINK",
|
|
1093
|
+
/** CMS-specific collection properties */
|
|
1094
|
+
CMS = "CMS"
|
|
1095
|
+
}
|
|
1096
|
+
interface PublishPluginOptions$1 {
|
|
1097
|
+
/** Default status. */
|
|
1098
|
+
defaultStatus?: Status$1;
|
|
1099
|
+
}
|
|
1100
|
+
interface SingleItemPluginOptions {
|
|
1101
|
+
/** ID of the single item in this collection. If you insert or update an item, its ID value is always changed to this. */
|
|
1102
|
+
singleItemId?: string;
|
|
1103
|
+
}
|
|
1104
|
+
interface UrlizedPluginOptions {
|
|
1105
|
+
/**
|
|
1106
|
+
* Encoding method for generating a URL in ASCII characters.
|
|
1107
|
+
*
|
|
1108
|
+
* * `ORIGINAL`: Letters are converted to lower case and spaces are replaced with dashes before generating the encoded URL.
|
|
1109
|
+
* * `PLAIN`: No changes are made before generating the encoded URL.
|
|
1110
|
+
*/
|
|
1111
|
+
format?: Format;
|
|
1112
|
+
}
|
|
1113
|
+
interface MultilingualOptions {
|
|
1114
|
+
/** IDs of fields to allow translation. */
|
|
1115
|
+
translatableFieldKeys?: string[];
|
|
1116
|
+
}
|
|
1117
|
+
interface PageLinkPluginOptions {
|
|
1118
|
+
isPersisted?: boolean;
|
|
1119
|
+
isMutable?: boolean;
|
|
1120
|
+
}
|
|
1121
|
+
interface PluginCmsOptions {
|
|
1122
|
+
/** CMS sort, applied when a collection is displayed on a site. */
|
|
1123
|
+
siteSort?: SiteSort;
|
|
1124
|
+
}
|
|
1125
|
+
declare enum PagingMode {
|
|
1126
|
+
/** Offset-based paging. */
|
|
1127
|
+
OFFSET = "OFFSET",
|
|
1128
|
+
/** Cursor-based paging. */
|
|
1129
|
+
CURSOR = "CURSOR"
|
|
1130
|
+
}
|
|
1131
|
+
interface DataCollectionClonedEvent {
|
|
1132
|
+
/** original instance collection is cloned from */
|
|
1133
|
+
originInstanceId?: string;
|
|
1134
|
+
/** original collection ID, may be same as current one */
|
|
1135
|
+
originId?: string;
|
|
1136
|
+
}
|
|
1137
|
+
interface DataCollectionChangedEvent {
|
|
1138
|
+
/** list of new fields */
|
|
1139
|
+
fieldsAdded?: Field$1[];
|
|
1140
|
+
/** list of changed fields */
|
|
1141
|
+
fieldsUpdated?: FieldUpdate$1[];
|
|
1142
|
+
/** list of removed fields */
|
|
1143
|
+
fieldsRemoved?: Field$1[];
|
|
1144
|
+
/** list of new plugins */
|
|
1145
|
+
pluginsAdded?: Plugin[];
|
|
1146
|
+
/** list of changed plugins */
|
|
1147
|
+
pluginsUpdated?: PluginUpdate[];
|
|
1148
|
+
/** list of removed plugins */
|
|
1149
|
+
pluginsRemoved?: Plugin[];
|
|
1150
|
+
}
|
|
1151
|
+
interface FieldUpdate$1 {
|
|
1152
|
+
/** previous state of the field */
|
|
1153
|
+
previous?: Field$1;
|
|
1154
|
+
/** current state of the field */
|
|
1155
|
+
current?: Field$1;
|
|
1156
|
+
}
|
|
1157
|
+
interface PluginUpdate {
|
|
1158
|
+
/** previous state of the plugin */
|
|
1159
|
+
previous?: Plugin;
|
|
1160
|
+
/** current state of the plugin */
|
|
1161
|
+
current?: Plugin;
|
|
1162
|
+
}
|
|
1163
|
+
interface CreateDataCollectionRequest {
|
|
1164
|
+
/** Collection details. */
|
|
1165
|
+
collection: DataCollection;
|
|
1166
|
+
}
|
|
1167
|
+
interface CreateDataCollectionResponse {
|
|
1168
|
+
/** Details of collection created. */
|
|
1169
|
+
collection?: DataCollection;
|
|
1170
|
+
}
|
|
1171
|
+
interface GetDataCollectionRequest {
|
|
1172
|
+
/** ID of the collection to retrieve. */
|
|
1173
|
+
dataCollectionId: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* Whether to retrieve data from the primary database instance.
|
|
1176
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1177
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
1178
|
+
*
|
|
1179
|
+
* Default: `false`
|
|
1180
|
+
*/
|
|
1181
|
+
consistentRead?: boolean;
|
|
1182
|
+
}
|
|
1183
|
+
interface GetDataCollectionResponse {
|
|
1184
|
+
/** Details of the collection requested. */
|
|
1185
|
+
collection?: DataCollection;
|
|
1186
|
+
/**
|
|
1187
|
+
* Details of collections referenced by the collection requested.
|
|
1188
|
+
* Only populated when `includeReferencedCollections` is `true` in the request.
|
|
1189
|
+
*/
|
|
1190
|
+
referencedCollections?: DataCollection[];
|
|
1191
|
+
}
|
|
1192
|
+
interface ListDataCollectionsRequest {
|
|
1193
|
+
/**
|
|
1194
|
+
* Defines how collections in the response are sorted.
|
|
1195
|
+
*
|
|
1196
|
+
* Default: Ordered by ID in ascending order.
|
|
1197
|
+
*/
|
|
1198
|
+
sort?: Sorting$1;
|
|
1199
|
+
/** Pagination information. */
|
|
1200
|
+
paging?: Paging$2;
|
|
1201
|
+
/**
|
|
1202
|
+
* Whether to retrieve data from the primary database instance.
|
|
1203
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1204
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
1205
|
+
*
|
|
1206
|
+
* Default: `false`
|
|
1207
|
+
*/
|
|
1208
|
+
consistentRead?: boolean;
|
|
1209
|
+
}
|
|
1210
|
+
interface Sorting$1 {
|
|
1211
|
+
/** Name of the field to sort by. */
|
|
1212
|
+
fieldName?: string;
|
|
1213
|
+
/** Sort order. */
|
|
1214
|
+
order?: SortOrder$1;
|
|
1215
|
+
}
|
|
1216
|
+
declare enum SortOrder$1 {
|
|
1217
|
+
ASC = "ASC",
|
|
1218
|
+
DESC = "DESC"
|
|
1219
|
+
}
|
|
1220
|
+
interface Paging$2 {
|
|
1221
|
+
/** Number of items to load. */
|
|
1222
|
+
limit?: number | null;
|
|
1223
|
+
/** Number of items to skip in the current sort order. */
|
|
1224
|
+
offset?: number | null;
|
|
1225
|
+
}
|
|
1226
|
+
interface ListDataCollectionsResponse {
|
|
1227
|
+
/** List of collections. */
|
|
1228
|
+
collections?: DataCollection[];
|
|
1229
|
+
/** Paging information. */
|
|
1230
|
+
pagingMetadata?: PagingMetadataV2$1;
|
|
1231
|
+
}
|
|
1232
|
+
interface PagingMetadataV2$1 {
|
|
1233
|
+
/** Number of items returned in the response. */
|
|
1234
|
+
count?: number | null;
|
|
1235
|
+
/** Offset that was requested. */
|
|
1236
|
+
offset?: number | null;
|
|
1237
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
1238
|
+
total?: number | null;
|
|
1239
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
1240
|
+
tooManyToCount?: boolean | null;
|
|
1241
|
+
}
|
|
1242
|
+
interface BulkGetDataCollectionsRequest {
|
|
1243
|
+
/** IDs of the collections to retrieve. */
|
|
1244
|
+
dataCollectionIds?: string[];
|
|
1245
|
+
/**
|
|
1246
|
+
* Whether to include deleted collections.
|
|
1247
|
+
*
|
|
1248
|
+
* Default: `false`
|
|
1249
|
+
*/
|
|
1250
|
+
showDeletedCollections?: boolean;
|
|
1251
|
+
/**
|
|
1252
|
+
* Whether the returned collection list should include referenced collections.
|
|
1253
|
+
*
|
|
1254
|
+
* Default: `false`
|
|
1255
|
+
*/
|
|
1256
|
+
includeReferencedCollections?: boolean;
|
|
1257
|
+
/** Sorting preferences. */
|
|
1258
|
+
sort?: Sorting$1;
|
|
1259
|
+
/**
|
|
1260
|
+
* Whether to retrieve data from the primary database instance.
|
|
1261
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1262
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
1263
|
+
*
|
|
1264
|
+
* Default: `false`
|
|
1265
|
+
*/
|
|
1266
|
+
consistentRead?: boolean;
|
|
1267
|
+
}
|
|
1268
|
+
interface BulkGetDataCollectionsResponse {
|
|
1269
|
+
/**
|
|
1270
|
+
* List of requested collections.
|
|
1271
|
+
* When `include_referenced_collections` is `true` in the request, referenced collections are included here.
|
|
1272
|
+
*/
|
|
1273
|
+
activeCollections?: DataCollection[];
|
|
1274
|
+
/** List of requested deleted collections. Only populated when `showDeletedCollections` is true in the request. */
|
|
1275
|
+
deletedCollections?: DataCollection[];
|
|
1276
|
+
}
|
|
1277
|
+
interface UpdateDataCollectionRequest {
|
|
1278
|
+
/** Updated collection details. The existing collection is replaced with this version. */
|
|
1279
|
+
collection: DataCollection;
|
|
1280
|
+
}
|
|
1281
|
+
interface UpdateDataCollectionResponse {
|
|
1282
|
+
/** Updated collection details. */
|
|
1283
|
+
collection?: DataCollection;
|
|
1284
|
+
}
|
|
1285
|
+
interface DeleteDataCollectionRequest {
|
|
1286
|
+
/** ID of the collection to delete. */
|
|
1287
|
+
dataCollectionId: string;
|
|
1288
|
+
}
|
|
1289
|
+
interface DeleteDataCollectionResponse {
|
|
1290
|
+
}
|
|
1291
|
+
interface CreateDataCollectionFieldRequest {
|
|
1292
|
+
/** ID of data collection to update */
|
|
1293
|
+
dataCollectionId?: string;
|
|
1294
|
+
/** field to create */
|
|
1295
|
+
field?: Field$1;
|
|
1296
|
+
}
|
|
1297
|
+
interface CreateDataCollectionFieldResponse {
|
|
1298
|
+
/** updated data collection */
|
|
1299
|
+
dataCollection?: DataCollection;
|
|
1300
|
+
}
|
|
1301
|
+
interface UpdateDataCollectionFieldRequest {
|
|
1302
|
+
/** ID of data collection to update */
|
|
1303
|
+
dataCollectionId?: string;
|
|
1304
|
+
/** Field to update */
|
|
1305
|
+
field?: Field$1;
|
|
1306
|
+
}
|
|
1307
|
+
interface UpdateDataCollectionFieldResponse {
|
|
1308
|
+
/** updated data collection */
|
|
1309
|
+
dataCollection?: DataCollection;
|
|
1310
|
+
}
|
|
1311
|
+
interface DeleteDataCollectionFieldRequest {
|
|
1312
|
+
/** ID of data collection to update */
|
|
1313
|
+
dataCollectionId?: string;
|
|
1314
|
+
/** Field key to delete */
|
|
1315
|
+
fieldKey?: string;
|
|
1316
|
+
}
|
|
1317
|
+
interface DeleteDataCollectionFieldResponse {
|
|
1318
|
+
/** updated data collection */
|
|
1319
|
+
dataCollection?: DataCollection;
|
|
1320
|
+
}
|
|
1321
|
+
interface BulkGetDataCollectionsPageBySnapshotsRequest {
|
|
1322
|
+
/** Ids of schema snapshot */
|
|
1323
|
+
snapshotIds?: string[];
|
|
1324
|
+
/** Pagination information. */
|
|
1325
|
+
paging?: Paging$2;
|
|
1326
|
+
}
|
|
1327
|
+
interface BulkGetDataCollectionsPageBySnapshotsResponse {
|
|
1328
|
+
/** List of snapshot collection map */
|
|
1329
|
+
snapshotCollections?: SnapshotCollection[];
|
|
1330
|
+
/** Paging information. */
|
|
1331
|
+
pagingMetadata?: PagingMetadataV2$1;
|
|
1332
|
+
}
|
|
1333
|
+
interface SnapshotCollection {
|
|
1334
|
+
/** snapshot to which collection belongs */
|
|
1335
|
+
snapshotId?: string;
|
|
1336
|
+
/** snapshot collection */
|
|
1337
|
+
collection?: DataCollection;
|
|
1338
|
+
/** snapshot of collection indexes */
|
|
1339
|
+
indexes?: Index$1[];
|
|
1340
|
+
}
|
|
1341
|
+
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
1342
|
+
interface Index$1 {
|
|
1343
|
+
/** Name of the index. */
|
|
1344
|
+
name?: string;
|
|
1345
|
+
/**
|
|
1346
|
+
* Fields for which the index is defined.
|
|
1347
|
+
*
|
|
1348
|
+
* Max: 3 fields (for a unique index: 1 field)
|
|
1349
|
+
*/
|
|
1350
|
+
fields?: IndexField[];
|
|
1351
|
+
/**
|
|
1352
|
+
* Current status of the index.
|
|
1353
|
+
* - `BUILDING`: Index creation is in progress.
|
|
1354
|
+
* - `ACTIVE`: Index has been successfully created and can be used in queries.
|
|
1355
|
+
* - `DROPPING`: Index is in the process of being dropped.
|
|
1356
|
+
* - `DROPPED`: Index has been dropped successfully.
|
|
1357
|
+
* - `FAILED`: Index creation has failed.
|
|
1358
|
+
* - `INVALID`: Index contains incorrectly indexed data.
|
|
1359
|
+
* @readonly
|
|
1360
|
+
*/
|
|
1361
|
+
status?: IndexStatus;
|
|
1362
|
+
/**
|
|
1363
|
+
* Contains details about the reasons for failure when `status` is `FAILED`.
|
|
1364
|
+
* @readonly
|
|
1365
|
+
*/
|
|
1366
|
+
failure?: Failure$1;
|
|
1367
|
+
/**
|
|
1368
|
+
* Whether the index enforces uniqueness of values in the field for which it is defined.
|
|
1369
|
+
* If `true`, the index can have only one field.
|
|
1370
|
+
*
|
|
1371
|
+
* Default: `false`
|
|
1372
|
+
*/
|
|
1373
|
+
unique?: boolean;
|
|
1374
|
+
/**
|
|
1375
|
+
* Whether the index ignores case.
|
|
1376
|
+
*
|
|
1377
|
+
* Default: `false`
|
|
1378
|
+
*/
|
|
1379
|
+
caseInsensitive?: boolean;
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* Order determines how values are ordered in the index. This is important when
|
|
1383
|
+
* ordering and/or range querying by indexed fields.
|
|
1384
|
+
*/
|
|
1385
|
+
declare enum Order$1 {
|
|
1386
|
+
ASC = "ASC",
|
|
1387
|
+
DESC = "DESC"
|
|
1388
|
+
}
|
|
1389
|
+
interface IndexField {
|
|
1390
|
+
/** Path of the field to index. For example: `title` or `options.price`. */
|
|
1391
|
+
path?: string;
|
|
1392
|
+
/**
|
|
1393
|
+
* Sort order for the index. Base on how the data is regularly queried.
|
|
1394
|
+
*
|
|
1395
|
+
* Default: `ASC`
|
|
1396
|
+
*/
|
|
1397
|
+
order?: Order$1;
|
|
1398
|
+
}
|
|
1399
|
+
declare enum IndexStatus {
|
|
1400
|
+
/** Place holder. Never returned by the service. */
|
|
1401
|
+
UNKNOWN = "UNKNOWN",
|
|
1402
|
+
/** Index creation is in progress. */
|
|
1403
|
+
BUILDING = "BUILDING",
|
|
1404
|
+
/** Index has been successfully created and can be used in queries. */
|
|
1405
|
+
ACTIVE = "ACTIVE",
|
|
1406
|
+
/** Index is in the process of being dropped. */
|
|
1407
|
+
DROPPING = "DROPPING",
|
|
1408
|
+
/** Index has been dropped successfully. */
|
|
1409
|
+
DROPPED = "DROPPED",
|
|
1410
|
+
/** Index creation has failed. */
|
|
1411
|
+
FAILED = "FAILED",
|
|
1412
|
+
/** Index contains incorrectly indexed data. */
|
|
1413
|
+
INVALID = "INVALID"
|
|
1414
|
+
}
|
|
1415
|
+
interface Failure$1 {
|
|
1416
|
+
/**
|
|
1417
|
+
* Error code.
|
|
1418
|
+
* - `WDE0112`: Unknown error while building collection index.
|
|
1419
|
+
* - `WDE0113`: Duplicate key error while building collection index.
|
|
1420
|
+
* - `WDE0114`: Document too large while building collection index.
|
|
1421
|
+
*/
|
|
1422
|
+
code?: string;
|
|
1423
|
+
/** Description of the failure. */
|
|
1424
|
+
description?: string;
|
|
1425
|
+
/**
|
|
1426
|
+
* ID of the data item that caused the failure.
|
|
1427
|
+
* For example, if `unique` is `true`, the ID of an item containing a duplicate value.
|
|
1428
|
+
*/
|
|
1429
|
+
itemId?: string | null;
|
|
1430
|
+
}
|
|
1431
|
+
interface CreateDataCollectionsSnapshotRequest {
|
|
1432
|
+
}
|
|
1433
|
+
interface CreateDataCollectionsSnapshotResponse {
|
|
1434
|
+
/** created snapshot ID */
|
|
1435
|
+
snapshotId?: string;
|
|
1436
|
+
/** data collections in snapshot */
|
|
1437
|
+
snapshotCollections?: DataCollection[];
|
|
1438
|
+
}
|
|
1439
|
+
interface RestoreDataCollectionsFromSnapshotRequest {
|
|
1440
|
+
/** snapshot ID to restore */
|
|
1441
|
+
snapshotId?: string;
|
|
1442
|
+
/** collection IDs to restore, if empty – all collections would be restored */
|
|
1443
|
+
dataCollectionIds?: string[];
|
|
1444
|
+
}
|
|
1445
|
+
interface RestoreDataCollectionsFromSnapshotResponse {
|
|
1446
|
+
/** restored collections */
|
|
1447
|
+
restoredCollections?: DataCollection[];
|
|
1448
|
+
}
|
|
1449
|
+
interface DeleteDataCollectionsSnapshotRequest {
|
|
1450
|
+
/** snapshot ID to delete */
|
|
1451
|
+
snapshotId?: string;
|
|
1452
|
+
}
|
|
1453
|
+
interface DeleteDataCollectionsSnapshotResponse {
|
|
1454
|
+
}
|
|
1455
|
+
interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
|
|
1456
|
+
createdEvent?: EntityCreatedEvent$1;
|
|
1457
|
+
updatedEvent?: EntityUpdatedEvent$1;
|
|
1458
|
+
deletedEvent?: EntityDeletedEvent$1;
|
|
1459
|
+
actionEvent?: ActionEvent$1;
|
|
1460
|
+
/**
|
|
1461
|
+
* Unique event ID.
|
|
1462
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1463
|
+
*/
|
|
1464
|
+
_id?: string;
|
|
1465
|
+
/**
|
|
1466
|
+
* Assumes actions are also always typed to an entity_type
|
|
1467
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1468
|
+
*/
|
|
1469
|
+
entityFqdn?: string;
|
|
1470
|
+
/**
|
|
1471
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1472
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1473
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1474
|
+
*/
|
|
1475
|
+
slug?: string;
|
|
1476
|
+
/** ID of the entity associated with the event. */
|
|
1477
|
+
entityId?: string;
|
|
1478
|
+
/** Event timestamp. */
|
|
1479
|
+
eventTime?: Date;
|
|
1480
|
+
/**
|
|
1481
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1482
|
+
* (for example, GDPR).
|
|
1483
|
+
*/
|
|
1484
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1485
|
+
/** If present, indicates the action that triggered the event. */
|
|
1486
|
+
originatedFrom?: string | null;
|
|
1487
|
+
/**
|
|
1488
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1489
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1490
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1491
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1492
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1493
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1494
|
+
*/
|
|
1495
|
+
entityEventSequence?: string | null;
|
|
1496
|
+
}
|
|
1497
|
+
/** @oneof */
|
|
1498
|
+
interface DomainEventBodyOneOf$1 {
|
|
1499
|
+
createdEvent?: EntityCreatedEvent$1;
|
|
1500
|
+
updatedEvent?: EntityUpdatedEvent$1;
|
|
1501
|
+
deletedEvent?: EntityDeletedEvent$1;
|
|
1502
|
+
actionEvent?: ActionEvent$1;
|
|
1503
|
+
}
|
|
1504
|
+
interface EntityCreatedEvent$1 {
|
|
1505
|
+
entity?: string;
|
|
1506
|
+
}
|
|
1507
|
+
interface EntityUpdatedEvent$1 {
|
|
1508
|
+
/**
|
|
1509
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1510
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1511
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1512
|
+
*/
|
|
1513
|
+
currentEntity?: string;
|
|
1514
|
+
}
|
|
1515
|
+
interface EntityDeletedEvent$1 {
|
|
1516
|
+
/** Entity that was deleted */
|
|
1517
|
+
deletedEntity?: string | null;
|
|
1518
|
+
}
|
|
1519
|
+
interface ActionEvent$1 {
|
|
1520
|
+
body?: string;
|
|
1521
|
+
}
|
|
1522
|
+
interface MessageEnvelope$1 {
|
|
1523
|
+
/** App instance ID. */
|
|
1524
|
+
instanceId?: string | null;
|
|
1525
|
+
/** Event type. */
|
|
1526
|
+
eventType?: string;
|
|
1527
|
+
/** The identification type and identity data. */
|
|
1528
|
+
identity?: IdentificationData$1;
|
|
1529
|
+
/** Stringify payload. */
|
|
1530
|
+
data?: string;
|
|
1531
|
+
}
|
|
1532
|
+
interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
|
|
1533
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1534
|
+
anonymousVisitorId?: string;
|
|
1535
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1536
|
+
memberId?: string;
|
|
1537
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1538
|
+
wixUserId?: string;
|
|
1539
|
+
/** ID of an app. */
|
|
1540
|
+
appId?: string;
|
|
1541
|
+
/** @readonly */
|
|
1542
|
+
identityType?: WebhookIdentityType$1;
|
|
1543
|
+
}
|
|
1544
|
+
/** @oneof */
|
|
1545
|
+
interface IdentificationDataIdOneOf$1 {
|
|
1546
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1547
|
+
anonymousVisitorId?: string;
|
|
1548
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1549
|
+
memberId?: string;
|
|
1550
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1551
|
+
wixUserId?: string;
|
|
1552
|
+
/** ID of an app. */
|
|
1553
|
+
appId?: string;
|
|
1554
|
+
}
|
|
1555
|
+
declare enum WebhookIdentityType$1 {
|
|
1556
|
+
UNKNOWN = "UNKNOWN",
|
|
1557
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1558
|
+
MEMBER = "MEMBER",
|
|
1559
|
+
WIX_USER = "WIX_USER",
|
|
1560
|
+
APP = "APP"
|
|
1561
|
+
}
|
|
1562
|
+
interface CreateDataCollectionResponseNonNullableFields {
|
|
1563
|
+
collection?: {
|
|
1564
|
+
_id: string;
|
|
1565
|
+
collectionType: CollectionType;
|
|
1566
|
+
defaultDisplayOrder?: {
|
|
1567
|
+
fieldKey: string;
|
|
1568
|
+
direction: Direction;
|
|
1569
|
+
};
|
|
1570
|
+
capabilities?: {
|
|
1571
|
+
dataOperations: DataOperation[];
|
|
1572
|
+
collectionOperations: CollectionOperation[];
|
|
1573
|
+
indexLimits?: {
|
|
1574
|
+
regular: number;
|
|
1575
|
+
unique: number;
|
|
1576
|
+
total: number;
|
|
1577
|
+
};
|
|
1578
|
+
};
|
|
1579
|
+
fields: {
|
|
1580
|
+
key: string;
|
|
1581
|
+
type: Type;
|
|
1582
|
+
typeMetadata?: {
|
|
1583
|
+
reference?: {
|
|
1584
|
+
referencedCollectionId: string;
|
|
1585
|
+
};
|
|
1586
|
+
multiReference?: {
|
|
1587
|
+
referencedCollectionId: string;
|
|
1588
|
+
referencingFieldKey: string;
|
|
1589
|
+
referencingDisplayName: string;
|
|
1590
|
+
};
|
|
1591
|
+
object?: {
|
|
1592
|
+
fields: {
|
|
1593
|
+
key: string;
|
|
1594
|
+
type: Type;
|
|
1595
|
+
capabilities?: {
|
|
1596
|
+
sortable: boolean;
|
|
1597
|
+
queryOperators: QueryOperator[];
|
|
1598
|
+
};
|
|
1599
|
+
}[];
|
|
1600
|
+
};
|
|
1601
|
+
array?: {
|
|
1602
|
+
elementType: Type;
|
|
1603
|
+
};
|
|
1604
|
+
pageLink?: {
|
|
1605
|
+
calculator?: {
|
|
1606
|
+
fieldsPattern?: {
|
|
1607
|
+
pattern: string;
|
|
1608
|
+
lowercase: boolean;
|
|
1609
|
+
};
|
|
1610
|
+
urlizedOnlyPattern?: {
|
|
1611
|
+
pattern: string;
|
|
1612
|
+
};
|
|
1613
|
+
};
|
|
1614
|
+
};
|
|
1615
|
+
};
|
|
1616
|
+
systemField: boolean;
|
|
1617
|
+
capabilities?: {
|
|
1618
|
+
sortable: boolean;
|
|
1619
|
+
queryOperators: QueryOperator[];
|
|
1620
|
+
};
|
|
1621
|
+
encrypted: boolean;
|
|
1622
|
+
plugins: {
|
|
1623
|
+
cmsOptions?: {
|
|
1624
|
+
internal: boolean;
|
|
1625
|
+
};
|
|
1626
|
+
type: FieldPluginType;
|
|
1627
|
+
}[];
|
|
1628
|
+
}[];
|
|
1629
|
+
permissions?: {
|
|
1630
|
+
insert: Role;
|
|
1631
|
+
update: Role;
|
|
1632
|
+
remove: Role;
|
|
1633
|
+
read: Role;
|
|
1634
|
+
};
|
|
1635
|
+
plugins: {
|
|
1636
|
+
publishOptions?: {
|
|
1637
|
+
defaultStatus: Status$1;
|
|
1638
|
+
};
|
|
1639
|
+
singleItemOptions?: {
|
|
1640
|
+
singleItemId: string;
|
|
1641
|
+
};
|
|
1642
|
+
urlizedOptions?: {
|
|
1643
|
+
format: Format;
|
|
1644
|
+
};
|
|
1645
|
+
multilingualOptions?: {
|
|
1646
|
+
translatableFieldKeys: string[];
|
|
1647
|
+
};
|
|
1648
|
+
editablePageLinkOptions?: {
|
|
1649
|
+
isPersisted: boolean;
|
|
1650
|
+
isMutable: boolean;
|
|
1651
|
+
};
|
|
1652
|
+
cmsOptions?: {
|
|
1653
|
+
siteSort?: {
|
|
1654
|
+
sort: {
|
|
1655
|
+
fieldKey: string;
|
|
1656
|
+
direction: Direction;
|
|
1657
|
+
}[];
|
|
1658
|
+
};
|
|
1659
|
+
};
|
|
1660
|
+
type: PluginType;
|
|
1661
|
+
}[];
|
|
1662
|
+
pagingModes: PagingMode[];
|
|
1663
|
+
};
|
|
1664
|
+
}
|
|
1665
|
+
interface GetDataCollectionResponseNonNullableFields {
|
|
1666
|
+
collection?: {
|
|
1667
|
+
_id: string;
|
|
1668
|
+
collectionType: CollectionType;
|
|
1669
|
+
defaultDisplayOrder?: {
|
|
1670
|
+
fieldKey: string;
|
|
1671
|
+
direction: Direction;
|
|
1672
|
+
};
|
|
1673
|
+
capabilities?: {
|
|
1674
|
+
dataOperations: DataOperation[];
|
|
1675
|
+
collectionOperations: CollectionOperation[];
|
|
1676
|
+
indexLimits?: {
|
|
1677
|
+
regular: number;
|
|
1678
|
+
unique: number;
|
|
1679
|
+
total: number;
|
|
1680
|
+
};
|
|
1681
|
+
};
|
|
1682
|
+
fields: {
|
|
1683
|
+
key: string;
|
|
1684
|
+
type: Type;
|
|
1685
|
+
typeMetadata?: {
|
|
1686
|
+
reference?: {
|
|
1687
|
+
referencedCollectionId: string;
|
|
1688
|
+
};
|
|
1689
|
+
multiReference?: {
|
|
1690
|
+
referencedCollectionId: string;
|
|
1691
|
+
referencingFieldKey: string;
|
|
1692
|
+
referencingDisplayName: string;
|
|
1693
|
+
};
|
|
1694
|
+
object?: {
|
|
1695
|
+
fields: {
|
|
1696
|
+
key: string;
|
|
1697
|
+
type: Type;
|
|
1698
|
+
capabilities?: {
|
|
1699
|
+
sortable: boolean;
|
|
1700
|
+
queryOperators: QueryOperator[];
|
|
1701
|
+
};
|
|
1702
|
+
}[];
|
|
1703
|
+
};
|
|
1704
|
+
array?: {
|
|
1705
|
+
elementType: Type;
|
|
1706
|
+
};
|
|
1707
|
+
pageLink?: {
|
|
1708
|
+
calculator?: {
|
|
1709
|
+
fieldsPattern?: {
|
|
1710
|
+
pattern: string;
|
|
1711
|
+
lowercase: boolean;
|
|
1712
|
+
};
|
|
1713
|
+
urlizedOnlyPattern?: {
|
|
1714
|
+
pattern: string;
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
};
|
|
1718
|
+
};
|
|
1719
|
+
systemField: boolean;
|
|
1720
|
+
capabilities?: {
|
|
1721
|
+
sortable: boolean;
|
|
1722
|
+
queryOperators: QueryOperator[];
|
|
1723
|
+
};
|
|
1724
|
+
encrypted: boolean;
|
|
1725
|
+
plugins: {
|
|
1726
|
+
cmsOptions?: {
|
|
1727
|
+
internal: boolean;
|
|
1728
|
+
};
|
|
1729
|
+
type: FieldPluginType;
|
|
1730
|
+
}[];
|
|
1731
|
+
}[];
|
|
1732
|
+
permissions?: {
|
|
1733
|
+
insert: Role;
|
|
1734
|
+
update: Role;
|
|
1735
|
+
remove: Role;
|
|
1736
|
+
read: Role;
|
|
1737
|
+
};
|
|
1738
|
+
plugins: {
|
|
1739
|
+
publishOptions?: {
|
|
1740
|
+
defaultStatus: Status$1;
|
|
1741
|
+
};
|
|
1742
|
+
singleItemOptions?: {
|
|
1743
|
+
singleItemId: string;
|
|
1744
|
+
};
|
|
1745
|
+
urlizedOptions?: {
|
|
1746
|
+
format: Format;
|
|
1747
|
+
};
|
|
1748
|
+
multilingualOptions?: {
|
|
1749
|
+
translatableFieldKeys: string[];
|
|
1750
|
+
};
|
|
1751
|
+
editablePageLinkOptions?: {
|
|
1752
|
+
isPersisted: boolean;
|
|
1753
|
+
isMutable: boolean;
|
|
1754
|
+
};
|
|
1755
|
+
cmsOptions?: {
|
|
1756
|
+
siteSort?: {
|
|
1757
|
+
sort: {
|
|
1758
|
+
fieldKey: string;
|
|
1759
|
+
direction: Direction;
|
|
1760
|
+
}[];
|
|
1761
|
+
};
|
|
1762
|
+
};
|
|
1763
|
+
type: PluginType;
|
|
1764
|
+
}[];
|
|
1765
|
+
pagingModes: PagingMode[];
|
|
1766
|
+
};
|
|
1767
|
+
referencedCollections: {
|
|
1768
|
+
_id: string;
|
|
1769
|
+
collectionType: CollectionType;
|
|
1770
|
+
defaultDisplayOrder?: {
|
|
1771
|
+
fieldKey: string;
|
|
1772
|
+
direction: Direction;
|
|
1773
|
+
};
|
|
1774
|
+
capabilities?: {
|
|
1775
|
+
dataOperations: DataOperation[];
|
|
1776
|
+
collectionOperations: CollectionOperation[];
|
|
1777
|
+
indexLimits?: {
|
|
1778
|
+
regular: number;
|
|
1779
|
+
unique: number;
|
|
1780
|
+
total: number;
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
fields: {
|
|
1784
|
+
key: string;
|
|
1785
|
+
type: Type;
|
|
1786
|
+
typeMetadata?: {
|
|
1787
|
+
reference?: {
|
|
1788
|
+
referencedCollectionId: string;
|
|
1789
|
+
};
|
|
1790
|
+
multiReference?: {
|
|
1791
|
+
referencedCollectionId: string;
|
|
1792
|
+
referencingFieldKey: string;
|
|
1793
|
+
referencingDisplayName: string;
|
|
1794
|
+
};
|
|
1795
|
+
object?: {
|
|
1796
|
+
fields: {
|
|
1797
|
+
key: string;
|
|
1798
|
+
type: Type;
|
|
1799
|
+
capabilities?: {
|
|
1800
|
+
sortable: boolean;
|
|
1801
|
+
queryOperators: QueryOperator[];
|
|
1802
|
+
};
|
|
1803
|
+
}[];
|
|
1804
|
+
};
|
|
1805
|
+
array?: {
|
|
1806
|
+
elementType: Type;
|
|
1807
|
+
};
|
|
1808
|
+
pageLink?: {
|
|
1809
|
+
calculator?: {
|
|
1810
|
+
fieldsPattern?: {
|
|
1811
|
+
pattern: string;
|
|
1812
|
+
lowercase: boolean;
|
|
1813
|
+
};
|
|
1814
|
+
urlizedOnlyPattern?: {
|
|
1815
|
+
pattern: string;
|
|
1816
|
+
};
|
|
1817
|
+
};
|
|
1818
|
+
};
|
|
1819
|
+
};
|
|
1820
|
+
systemField: boolean;
|
|
1821
|
+
capabilities?: {
|
|
1822
|
+
sortable: boolean;
|
|
1823
|
+
queryOperators: QueryOperator[];
|
|
1824
|
+
};
|
|
1825
|
+
encrypted: boolean;
|
|
1826
|
+
plugins: {
|
|
1827
|
+
cmsOptions?: {
|
|
1828
|
+
internal: boolean;
|
|
1829
|
+
};
|
|
1830
|
+
type: FieldPluginType;
|
|
1831
|
+
}[];
|
|
1832
|
+
}[];
|
|
1833
|
+
permissions?: {
|
|
1834
|
+
insert: Role;
|
|
1835
|
+
update: Role;
|
|
1836
|
+
remove: Role;
|
|
1837
|
+
read: Role;
|
|
1838
|
+
};
|
|
1839
|
+
plugins: {
|
|
1840
|
+
publishOptions?: {
|
|
1841
|
+
defaultStatus: Status$1;
|
|
1842
|
+
};
|
|
1843
|
+
singleItemOptions?: {
|
|
1844
|
+
singleItemId: string;
|
|
1845
|
+
};
|
|
1846
|
+
urlizedOptions?: {
|
|
1847
|
+
format: Format;
|
|
1848
|
+
};
|
|
1849
|
+
multilingualOptions?: {
|
|
1850
|
+
translatableFieldKeys: string[];
|
|
1851
|
+
};
|
|
1852
|
+
editablePageLinkOptions?: {
|
|
1853
|
+
isPersisted: boolean;
|
|
1854
|
+
isMutable: boolean;
|
|
1855
|
+
};
|
|
1856
|
+
cmsOptions?: {
|
|
1857
|
+
siteSort?: {
|
|
1858
|
+
sort: {
|
|
1859
|
+
fieldKey: string;
|
|
1860
|
+
direction: Direction;
|
|
1861
|
+
}[];
|
|
1862
|
+
};
|
|
1863
|
+
};
|
|
1864
|
+
type: PluginType;
|
|
1865
|
+
}[];
|
|
1866
|
+
pagingModes: PagingMode[];
|
|
1867
|
+
}[];
|
|
1868
|
+
}
|
|
1869
|
+
interface ListDataCollectionsResponseNonNullableFields {
|
|
1870
|
+
collections: {
|
|
1871
|
+
_id: string;
|
|
1872
|
+
collectionType: CollectionType;
|
|
1873
|
+
defaultDisplayOrder?: {
|
|
1874
|
+
fieldKey: string;
|
|
1875
|
+
direction: Direction;
|
|
1876
|
+
};
|
|
1877
|
+
capabilities?: {
|
|
1878
|
+
dataOperations: DataOperation[];
|
|
1879
|
+
collectionOperations: CollectionOperation[];
|
|
1880
|
+
indexLimits?: {
|
|
1881
|
+
regular: number;
|
|
1882
|
+
unique: number;
|
|
1883
|
+
total: number;
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1886
|
+
fields: {
|
|
1887
|
+
key: string;
|
|
1888
|
+
type: Type;
|
|
1889
|
+
typeMetadata?: {
|
|
1890
|
+
reference?: {
|
|
1891
|
+
referencedCollectionId: string;
|
|
1892
|
+
};
|
|
1893
|
+
multiReference?: {
|
|
1894
|
+
referencedCollectionId: string;
|
|
1895
|
+
referencingFieldKey: string;
|
|
1896
|
+
referencingDisplayName: string;
|
|
1897
|
+
};
|
|
1898
|
+
object?: {
|
|
1899
|
+
fields: {
|
|
1900
|
+
key: string;
|
|
1901
|
+
type: Type;
|
|
1902
|
+
capabilities?: {
|
|
1903
|
+
sortable: boolean;
|
|
1904
|
+
queryOperators: QueryOperator[];
|
|
1905
|
+
};
|
|
1906
|
+
}[];
|
|
1907
|
+
};
|
|
1908
|
+
array?: {
|
|
1909
|
+
elementType: Type;
|
|
1910
|
+
};
|
|
1911
|
+
pageLink?: {
|
|
1912
|
+
calculator?: {
|
|
1913
|
+
fieldsPattern?: {
|
|
1914
|
+
pattern: string;
|
|
1915
|
+
lowercase: boolean;
|
|
1916
|
+
};
|
|
1917
|
+
urlizedOnlyPattern?: {
|
|
1918
|
+
pattern: string;
|
|
1919
|
+
};
|
|
1920
|
+
};
|
|
1921
|
+
};
|
|
1922
|
+
};
|
|
1923
|
+
systemField: boolean;
|
|
1924
|
+
capabilities?: {
|
|
1925
|
+
sortable: boolean;
|
|
1926
|
+
queryOperators: QueryOperator[];
|
|
1927
|
+
};
|
|
1928
|
+
encrypted: boolean;
|
|
1929
|
+
plugins: {
|
|
1930
|
+
cmsOptions?: {
|
|
1931
|
+
internal: boolean;
|
|
1932
|
+
};
|
|
1933
|
+
type: FieldPluginType;
|
|
1934
|
+
}[];
|
|
1935
|
+
}[];
|
|
1936
|
+
permissions?: {
|
|
1937
|
+
insert: Role;
|
|
1938
|
+
update: Role;
|
|
1939
|
+
remove: Role;
|
|
1940
|
+
read: Role;
|
|
1941
|
+
};
|
|
1942
|
+
plugins: {
|
|
1943
|
+
publishOptions?: {
|
|
1944
|
+
defaultStatus: Status$1;
|
|
1945
|
+
};
|
|
1946
|
+
singleItemOptions?: {
|
|
1947
|
+
singleItemId: string;
|
|
1948
|
+
};
|
|
1949
|
+
urlizedOptions?: {
|
|
1950
|
+
format: Format;
|
|
1951
|
+
};
|
|
1952
|
+
multilingualOptions?: {
|
|
1953
|
+
translatableFieldKeys: string[];
|
|
1954
|
+
};
|
|
1955
|
+
editablePageLinkOptions?: {
|
|
1956
|
+
isPersisted: boolean;
|
|
1957
|
+
isMutable: boolean;
|
|
1958
|
+
};
|
|
1959
|
+
cmsOptions?: {
|
|
1960
|
+
siteSort?: {
|
|
1961
|
+
sort: {
|
|
1962
|
+
fieldKey: string;
|
|
1963
|
+
direction: Direction;
|
|
1964
|
+
}[];
|
|
1965
|
+
};
|
|
1966
|
+
};
|
|
1967
|
+
type: PluginType;
|
|
1968
|
+
}[];
|
|
1969
|
+
pagingModes: PagingMode[];
|
|
1970
|
+
}[];
|
|
1971
|
+
}
|
|
1972
|
+
interface UpdateDataCollectionResponseNonNullableFields {
|
|
1973
|
+
collection?: {
|
|
1974
|
+
_id: string;
|
|
1975
|
+
collectionType: CollectionType;
|
|
1976
|
+
defaultDisplayOrder?: {
|
|
1977
|
+
fieldKey: string;
|
|
1978
|
+
direction: Direction;
|
|
1979
|
+
};
|
|
1980
|
+
capabilities?: {
|
|
1981
|
+
dataOperations: DataOperation[];
|
|
1982
|
+
collectionOperations: CollectionOperation[];
|
|
1983
|
+
indexLimits?: {
|
|
1984
|
+
regular: number;
|
|
1985
|
+
unique: number;
|
|
1986
|
+
total: number;
|
|
1987
|
+
};
|
|
1988
|
+
};
|
|
1989
|
+
fields: {
|
|
1990
|
+
key: string;
|
|
1991
|
+
type: Type;
|
|
1992
|
+
typeMetadata?: {
|
|
1993
|
+
reference?: {
|
|
1994
|
+
referencedCollectionId: string;
|
|
1995
|
+
};
|
|
1996
|
+
multiReference?: {
|
|
1997
|
+
referencedCollectionId: string;
|
|
1998
|
+
referencingFieldKey: string;
|
|
1999
|
+
referencingDisplayName: string;
|
|
2000
|
+
};
|
|
2001
|
+
object?: {
|
|
2002
|
+
fields: {
|
|
2003
|
+
key: string;
|
|
2004
|
+
type: Type;
|
|
2005
|
+
capabilities?: {
|
|
2006
|
+
sortable: boolean;
|
|
2007
|
+
queryOperators: QueryOperator[];
|
|
2008
|
+
};
|
|
2009
|
+
}[];
|
|
2010
|
+
};
|
|
2011
|
+
array?: {
|
|
2012
|
+
elementType: Type;
|
|
2013
|
+
};
|
|
2014
|
+
pageLink?: {
|
|
2015
|
+
calculator?: {
|
|
2016
|
+
fieldsPattern?: {
|
|
2017
|
+
pattern: string;
|
|
2018
|
+
lowercase: boolean;
|
|
2019
|
+
};
|
|
2020
|
+
urlizedOnlyPattern?: {
|
|
2021
|
+
pattern: string;
|
|
2022
|
+
};
|
|
2023
|
+
};
|
|
2024
|
+
};
|
|
2025
|
+
};
|
|
2026
|
+
systemField: boolean;
|
|
2027
|
+
capabilities?: {
|
|
2028
|
+
sortable: boolean;
|
|
2029
|
+
queryOperators: QueryOperator[];
|
|
2030
|
+
};
|
|
2031
|
+
encrypted: boolean;
|
|
2032
|
+
plugins: {
|
|
2033
|
+
cmsOptions?: {
|
|
2034
|
+
internal: boolean;
|
|
2035
|
+
};
|
|
2036
|
+
type: FieldPluginType;
|
|
2037
|
+
}[];
|
|
2038
|
+
}[];
|
|
2039
|
+
permissions?: {
|
|
2040
|
+
insert: Role;
|
|
2041
|
+
update: Role;
|
|
2042
|
+
remove: Role;
|
|
2043
|
+
read: Role;
|
|
2044
|
+
};
|
|
2045
|
+
plugins: {
|
|
2046
|
+
publishOptions?: {
|
|
2047
|
+
defaultStatus: Status$1;
|
|
2048
|
+
};
|
|
2049
|
+
singleItemOptions?: {
|
|
2050
|
+
singleItemId: string;
|
|
2051
|
+
};
|
|
2052
|
+
urlizedOptions?: {
|
|
2053
|
+
format: Format;
|
|
2054
|
+
};
|
|
2055
|
+
multilingualOptions?: {
|
|
2056
|
+
translatableFieldKeys: string[];
|
|
2057
|
+
};
|
|
2058
|
+
editablePageLinkOptions?: {
|
|
2059
|
+
isPersisted: boolean;
|
|
2060
|
+
isMutable: boolean;
|
|
2061
|
+
};
|
|
2062
|
+
cmsOptions?: {
|
|
2063
|
+
siteSort?: {
|
|
2064
|
+
sort: {
|
|
2065
|
+
fieldKey: string;
|
|
2066
|
+
direction: Direction;
|
|
2067
|
+
}[];
|
|
2068
|
+
};
|
|
2069
|
+
};
|
|
2070
|
+
type: PluginType;
|
|
2071
|
+
}[];
|
|
2072
|
+
pagingModes: PagingMode[];
|
|
2073
|
+
};
|
|
2074
|
+
}
|
|
2075
|
+
interface BaseEventMetadata$1 {
|
|
2076
|
+
/** App instance ID. */
|
|
2077
|
+
instanceId?: string | null;
|
|
2078
|
+
/** Event type. */
|
|
2079
|
+
eventType?: string;
|
|
2080
|
+
/** The identification type and identity data. */
|
|
2081
|
+
identity?: IdentificationData$1;
|
|
2082
|
+
}
|
|
2083
|
+
interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
2084
|
+
/**
|
|
2085
|
+
* Unique event ID.
|
|
2086
|
+
* Allows clients to ignore duplicate webhooks.
|
|
2087
|
+
*/
|
|
2088
|
+
_id?: string;
|
|
2089
|
+
/**
|
|
2090
|
+
* Assumes actions are also always typed to an entity_type
|
|
2091
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2092
|
+
*/
|
|
2093
|
+
entityFqdn?: string;
|
|
2094
|
+
/**
|
|
2095
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2096
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2097
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
2098
|
+
*/
|
|
2099
|
+
slug?: string;
|
|
2100
|
+
/** ID of the entity associated with the event. */
|
|
2101
|
+
entityId?: string;
|
|
2102
|
+
/** Event timestamp. */
|
|
2103
|
+
eventTime?: Date;
|
|
2104
|
+
/**
|
|
2105
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
2106
|
+
* (for example, GDPR).
|
|
2107
|
+
*/
|
|
2108
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
2109
|
+
/** If present, indicates the action that triggered the event. */
|
|
2110
|
+
originatedFrom?: string | null;
|
|
2111
|
+
/**
|
|
2112
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
2113
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2114
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2115
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2116
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2117
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2118
|
+
*/
|
|
2119
|
+
entityEventSequence?: string | null;
|
|
2120
|
+
}
|
|
2121
|
+
interface DataCollectionClonedEnvelope {
|
|
2122
|
+
data: DataCollectionClonedEvent;
|
|
2123
|
+
metadata: EventMetadata$1;
|
|
2124
|
+
}
|
|
2125
|
+
interface DataCollectionChangedEnvelope {
|
|
2126
|
+
data: DataCollectionChangedEvent;
|
|
2127
|
+
metadata: EventMetadata$1;
|
|
2128
|
+
}
|
|
2129
|
+
interface DataCollectionCreatedEnvelope {
|
|
2130
|
+
entity: DataCollection;
|
|
2131
|
+
metadata: EventMetadata$1;
|
|
2132
|
+
}
|
|
2133
|
+
interface DataCollectionUpdatedEnvelope {
|
|
2134
|
+
entity: DataCollection;
|
|
2135
|
+
metadata: EventMetadata$1;
|
|
2136
|
+
}
|
|
2137
|
+
interface DataCollectionDeletedEnvelope {
|
|
2138
|
+
metadata: EventMetadata$1;
|
|
2139
|
+
}
|
|
2140
|
+
interface GetDataCollectionOptions {
|
|
2141
|
+
/**
|
|
2142
|
+
* Whether to retrieve data from the primary database instance.
|
|
2143
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2144
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2145
|
+
*
|
|
2146
|
+
* Default: `false`
|
|
2147
|
+
*/
|
|
2148
|
+
consistentRead?: boolean;
|
|
2149
|
+
}
|
|
2150
|
+
interface ListDataCollectionsOptions {
|
|
2151
|
+
/**
|
|
2152
|
+
* Defines how collections in the response are sorted.
|
|
2153
|
+
*
|
|
2154
|
+
* Default: Ordered by ID in ascending order.
|
|
2155
|
+
*/
|
|
2156
|
+
sort?: Sorting$1;
|
|
2157
|
+
/** Pagination information. */
|
|
2158
|
+
paging?: Paging$2;
|
|
2159
|
+
/**
|
|
2160
|
+
* Whether to retrieve data from the primary database instance.
|
|
2161
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2162
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2163
|
+
*
|
|
2164
|
+
* Default: `false`
|
|
2165
|
+
*/
|
|
2166
|
+
consistentRead?: boolean;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
declare const __metadata$2: {
|
|
2170
|
+
PACKAGE_NAME: string;
|
|
2171
|
+
};
|
|
2172
|
+
declare function createDataCollection(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
2173
|
+
_id: string;
|
|
2174
|
+
collectionType: CollectionType;
|
|
2175
|
+
defaultDisplayOrder?: {
|
|
2176
|
+
fieldKey: string;
|
|
2177
|
+
direction: Direction;
|
|
2178
|
+
} | undefined;
|
|
2179
|
+
capabilities?: {
|
|
2180
|
+
dataOperations: DataOperation[];
|
|
2181
|
+
collectionOperations: CollectionOperation[];
|
|
2182
|
+
indexLimits?: {
|
|
2183
|
+
regular: number;
|
|
2184
|
+
unique: number;
|
|
2185
|
+
total: number;
|
|
2186
|
+
} | undefined;
|
|
2187
|
+
} | undefined;
|
|
2188
|
+
fields: {
|
|
2189
|
+
key: string;
|
|
2190
|
+
type: Type;
|
|
2191
|
+
typeMetadata?: {
|
|
2192
|
+
reference?: {
|
|
2193
|
+
referencedCollectionId: string;
|
|
2194
|
+
} | undefined;
|
|
2195
|
+
multiReference?: {
|
|
2196
|
+
referencedCollectionId: string;
|
|
2197
|
+
referencingFieldKey: string;
|
|
2198
|
+
referencingDisplayName: string;
|
|
2199
|
+
} | undefined;
|
|
2200
|
+
object?: {
|
|
2201
|
+
fields: {
|
|
2202
|
+
key: string;
|
|
2203
|
+
type: Type;
|
|
2204
|
+
capabilities?: {
|
|
2205
|
+
sortable: boolean;
|
|
2206
|
+
queryOperators: QueryOperator[];
|
|
2207
|
+
} | undefined;
|
|
2208
|
+
}[];
|
|
2209
|
+
} | undefined;
|
|
2210
|
+
array?: {
|
|
2211
|
+
elementType: Type;
|
|
2212
|
+
} | undefined;
|
|
2213
|
+
pageLink?: {
|
|
2214
|
+
calculator?: {
|
|
2215
|
+
fieldsPattern?: {
|
|
2216
|
+
pattern: string;
|
|
2217
|
+
lowercase: boolean;
|
|
2218
|
+
} | undefined;
|
|
2219
|
+
urlizedOnlyPattern?: {
|
|
2220
|
+
pattern: string;
|
|
2221
|
+
} | undefined;
|
|
2222
|
+
} | undefined;
|
|
2223
|
+
} | undefined;
|
|
2224
|
+
} | undefined;
|
|
2225
|
+
systemField: boolean;
|
|
2226
|
+
capabilities?: {
|
|
2227
|
+
sortable: boolean;
|
|
2228
|
+
queryOperators: QueryOperator[];
|
|
2229
|
+
} | undefined;
|
|
2230
|
+
encrypted: boolean;
|
|
2231
|
+
plugins: {
|
|
2232
|
+
cmsOptions?: {
|
|
2233
|
+
internal: boolean;
|
|
2234
|
+
} | undefined;
|
|
2235
|
+
type: FieldPluginType;
|
|
2236
|
+
}[];
|
|
2237
|
+
}[];
|
|
2238
|
+
permissions?: {
|
|
2239
|
+
insert: Role;
|
|
2240
|
+
update: Role;
|
|
2241
|
+
remove: Role;
|
|
2242
|
+
read: Role;
|
|
2243
|
+
} | undefined;
|
|
2244
|
+
plugins: {
|
|
2245
|
+
publishOptions?: {
|
|
2246
|
+
defaultStatus: Status$1;
|
|
2247
|
+
} | undefined;
|
|
2248
|
+
singleItemOptions?: {
|
|
2249
|
+
singleItemId: string;
|
|
2250
|
+
} | undefined;
|
|
2251
|
+
urlizedOptions?: {
|
|
2252
|
+
format: Format;
|
|
2253
|
+
} | undefined;
|
|
2254
|
+
multilingualOptions?: {
|
|
2255
|
+
translatableFieldKeys: string[];
|
|
2256
|
+
} | undefined;
|
|
2257
|
+
editablePageLinkOptions?: {
|
|
2258
|
+
isPersisted: boolean;
|
|
2259
|
+
isMutable: boolean;
|
|
2260
|
+
} | undefined;
|
|
2261
|
+
cmsOptions?: {
|
|
2262
|
+
siteSort?: {
|
|
2263
|
+
sort: {
|
|
2264
|
+
fieldKey: string;
|
|
2265
|
+
direction: Direction;
|
|
2266
|
+
}[];
|
|
2267
|
+
} | undefined;
|
|
2268
|
+
} | undefined;
|
|
2269
|
+
type: PluginType;
|
|
2270
|
+
}[];
|
|
2271
|
+
pagingModes: PagingMode[];
|
|
2272
|
+
}>;
|
|
2273
|
+
declare function getDataCollection(httpClient: HttpClient): (dataCollectionId: string, options?: GetDataCollectionOptions) => Promise<DataCollection & {
|
|
2274
|
+
_id: string;
|
|
2275
|
+
collectionType: CollectionType;
|
|
2276
|
+
defaultDisplayOrder?: {
|
|
2277
|
+
fieldKey: string;
|
|
2278
|
+
direction: Direction;
|
|
2279
|
+
} | undefined;
|
|
2280
|
+
capabilities?: {
|
|
2281
|
+
dataOperations: DataOperation[];
|
|
2282
|
+
collectionOperations: CollectionOperation[];
|
|
2283
|
+
indexLimits?: {
|
|
2284
|
+
regular: number;
|
|
2285
|
+
unique: number;
|
|
2286
|
+
total: number;
|
|
2287
|
+
} | undefined;
|
|
2288
|
+
} | undefined;
|
|
2289
|
+
fields: {
|
|
2290
|
+
key: string;
|
|
2291
|
+
type: Type;
|
|
2292
|
+
typeMetadata?: {
|
|
2293
|
+
reference?: {
|
|
2294
|
+
referencedCollectionId: string;
|
|
2295
|
+
} | undefined;
|
|
2296
|
+
multiReference?: {
|
|
2297
|
+
referencedCollectionId: string;
|
|
2298
|
+
referencingFieldKey: string;
|
|
2299
|
+
referencingDisplayName: string;
|
|
2300
|
+
} | undefined;
|
|
2301
|
+
object?: {
|
|
2302
|
+
fields: {
|
|
2303
|
+
key: string;
|
|
2304
|
+
type: Type;
|
|
2305
|
+
capabilities?: {
|
|
2306
|
+
sortable: boolean;
|
|
2307
|
+
queryOperators: QueryOperator[];
|
|
2308
|
+
} | undefined;
|
|
2309
|
+
}[];
|
|
2310
|
+
} | undefined;
|
|
2311
|
+
array?: {
|
|
2312
|
+
elementType: Type;
|
|
2313
|
+
} | undefined;
|
|
2314
|
+
pageLink?: {
|
|
2315
|
+
calculator?: {
|
|
2316
|
+
fieldsPattern?: {
|
|
2317
|
+
pattern: string;
|
|
2318
|
+
lowercase: boolean;
|
|
2319
|
+
} | undefined;
|
|
2320
|
+
urlizedOnlyPattern?: {
|
|
2321
|
+
pattern: string;
|
|
2322
|
+
} | undefined;
|
|
2323
|
+
} | undefined;
|
|
2324
|
+
} | undefined;
|
|
2325
|
+
} | undefined;
|
|
2326
|
+
systemField: boolean;
|
|
2327
|
+
capabilities?: {
|
|
2328
|
+
sortable: boolean;
|
|
2329
|
+
queryOperators: QueryOperator[];
|
|
2330
|
+
} | undefined;
|
|
2331
|
+
encrypted: boolean;
|
|
2332
|
+
plugins: {
|
|
2333
|
+
cmsOptions?: {
|
|
2334
|
+
internal: boolean;
|
|
2335
|
+
} | undefined;
|
|
2336
|
+
type: FieldPluginType;
|
|
2337
|
+
}[];
|
|
2338
|
+
}[];
|
|
2339
|
+
permissions?: {
|
|
2340
|
+
insert: Role;
|
|
2341
|
+
update: Role;
|
|
2342
|
+
remove: Role;
|
|
2343
|
+
read: Role;
|
|
2344
|
+
} | undefined;
|
|
2345
|
+
plugins: {
|
|
2346
|
+
publishOptions?: {
|
|
2347
|
+
defaultStatus: Status$1;
|
|
2348
|
+
} | undefined;
|
|
2349
|
+
singleItemOptions?: {
|
|
2350
|
+
singleItemId: string;
|
|
2351
|
+
} | undefined;
|
|
2352
|
+
urlizedOptions?: {
|
|
2353
|
+
format: Format;
|
|
2354
|
+
} | undefined;
|
|
2355
|
+
multilingualOptions?: {
|
|
2356
|
+
translatableFieldKeys: string[];
|
|
2357
|
+
} | undefined;
|
|
2358
|
+
editablePageLinkOptions?: {
|
|
2359
|
+
isPersisted: boolean;
|
|
2360
|
+
isMutable: boolean;
|
|
2361
|
+
} | undefined;
|
|
2362
|
+
cmsOptions?: {
|
|
2363
|
+
siteSort?: {
|
|
2364
|
+
sort: {
|
|
2365
|
+
fieldKey: string;
|
|
2366
|
+
direction: Direction;
|
|
2367
|
+
}[];
|
|
2368
|
+
} | undefined;
|
|
2369
|
+
} | undefined;
|
|
2370
|
+
type: PluginType;
|
|
2371
|
+
}[];
|
|
2372
|
+
pagingModes: PagingMode[];
|
|
2373
|
+
}>;
|
|
2374
|
+
declare function listDataCollections(httpClient: HttpClient): (options?: ListDataCollectionsOptions) => Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
2375
|
+
declare function updateDataCollection(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & {
|
|
2376
|
+
_id: string;
|
|
2377
|
+
collectionType: CollectionType;
|
|
2378
|
+
defaultDisplayOrder?: {
|
|
2379
|
+
fieldKey: string;
|
|
2380
|
+
direction: Direction;
|
|
2381
|
+
} | undefined;
|
|
2382
|
+
capabilities?: {
|
|
2383
|
+
dataOperations: DataOperation[];
|
|
2384
|
+
collectionOperations: CollectionOperation[];
|
|
2385
|
+
indexLimits?: {
|
|
2386
|
+
regular: number;
|
|
2387
|
+
unique: number;
|
|
2388
|
+
total: number;
|
|
2389
|
+
} | undefined;
|
|
2390
|
+
} | undefined;
|
|
2391
|
+
fields: {
|
|
2392
|
+
key: string;
|
|
2393
|
+
type: Type;
|
|
2394
|
+
typeMetadata?: {
|
|
2395
|
+
reference?: {
|
|
2396
|
+
referencedCollectionId: string;
|
|
2397
|
+
} | undefined;
|
|
2398
|
+
multiReference?: {
|
|
2399
|
+
referencedCollectionId: string;
|
|
2400
|
+
referencingFieldKey: string;
|
|
2401
|
+
referencingDisplayName: string;
|
|
2402
|
+
} | undefined;
|
|
2403
|
+
object?: {
|
|
2404
|
+
fields: {
|
|
2405
|
+
key: string;
|
|
2406
|
+
type: Type;
|
|
2407
|
+
capabilities?: {
|
|
2408
|
+
sortable: boolean;
|
|
2409
|
+
queryOperators: QueryOperator[];
|
|
2410
|
+
} | undefined;
|
|
2411
|
+
}[];
|
|
2412
|
+
} | undefined;
|
|
2413
|
+
array?: {
|
|
2414
|
+
elementType: Type;
|
|
2415
|
+
} | undefined;
|
|
2416
|
+
pageLink?: {
|
|
2417
|
+
calculator?: {
|
|
2418
|
+
fieldsPattern?: {
|
|
2419
|
+
pattern: string;
|
|
2420
|
+
lowercase: boolean;
|
|
2421
|
+
} | undefined;
|
|
2422
|
+
urlizedOnlyPattern?: {
|
|
2423
|
+
pattern: string;
|
|
2424
|
+
} | undefined;
|
|
2425
|
+
} | undefined;
|
|
2426
|
+
} | undefined;
|
|
2427
|
+
} | undefined;
|
|
2428
|
+
systemField: boolean;
|
|
2429
|
+
capabilities?: {
|
|
2430
|
+
sortable: boolean;
|
|
2431
|
+
queryOperators: QueryOperator[];
|
|
2432
|
+
} | undefined;
|
|
2433
|
+
encrypted: boolean;
|
|
2434
|
+
plugins: {
|
|
2435
|
+
cmsOptions?: {
|
|
2436
|
+
internal: boolean;
|
|
2437
|
+
} | undefined;
|
|
2438
|
+
type: FieldPluginType;
|
|
2439
|
+
}[];
|
|
2440
|
+
}[];
|
|
2441
|
+
permissions?: {
|
|
2442
|
+
insert: Role;
|
|
2443
|
+
update: Role;
|
|
2444
|
+
remove: Role;
|
|
2445
|
+
read: Role;
|
|
2446
|
+
} | undefined;
|
|
2447
|
+
plugins: {
|
|
2448
|
+
publishOptions?: {
|
|
2449
|
+
defaultStatus: Status$1;
|
|
2450
|
+
} | undefined;
|
|
2451
|
+
singleItemOptions?: {
|
|
2452
|
+
singleItemId: string;
|
|
2453
|
+
} | undefined;
|
|
2454
|
+
urlizedOptions?: {
|
|
2455
|
+
format: Format;
|
|
2456
|
+
} | undefined;
|
|
2457
|
+
multilingualOptions?: {
|
|
2458
|
+
translatableFieldKeys: string[];
|
|
2459
|
+
} | undefined;
|
|
2460
|
+
editablePageLinkOptions?: {
|
|
2461
|
+
isPersisted: boolean;
|
|
2462
|
+
isMutable: boolean;
|
|
2463
|
+
} | undefined;
|
|
2464
|
+
cmsOptions?: {
|
|
2465
|
+
siteSort?: {
|
|
2466
|
+
sort: {
|
|
2467
|
+
fieldKey: string;
|
|
2468
|
+
direction: Direction;
|
|
2469
|
+
}[];
|
|
2470
|
+
} | undefined;
|
|
2471
|
+
} | undefined;
|
|
2472
|
+
type: PluginType;
|
|
2473
|
+
}[];
|
|
2474
|
+
pagingModes: PagingMode[];
|
|
2475
|
+
}>;
|
|
2476
|
+
declare function deleteDataCollection(httpClient: HttpClient): (dataCollectionId: string) => Promise<void>;
|
|
2477
|
+
declare const onDataCollectionClonedEvent: EventDefinition<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
2478
|
+
declare const onDataCollectionChangedEvent: EventDefinition<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
2479
|
+
declare const onDataCollectionCreated: EventDefinition<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
2480
|
+
declare const onDataCollectionUpdated: EventDefinition<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
2481
|
+
declare const onDataCollectionDeleted: EventDefinition<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
2482
|
+
|
|
2483
|
+
type index_d$2_ArraySizeRange = ArraySizeRange;
|
|
2484
|
+
type index_d$2_BulkGetDataCollectionsPageBySnapshotsRequest = BulkGetDataCollectionsPageBySnapshotsRequest;
|
|
2485
|
+
type index_d$2_BulkGetDataCollectionsPageBySnapshotsResponse = BulkGetDataCollectionsPageBySnapshotsResponse;
|
|
2486
|
+
type index_d$2_BulkGetDataCollectionsRequest = BulkGetDataCollectionsRequest;
|
|
2487
|
+
type index_d$2_BulkGetDataCollectionsResponse = BulkGetDataCollectionsResponse;
|
|
2488
|
+
type index_d$2_Calculator = Calculator;
|
|
2489
|
+
type index_d$2_CalculatorPatternOneOf = CalculatorPatternOneOf;
|
|
2490
|
+
type index_d$2_CmsOptions = CmsOptions;
|
|
2491
|
+
type index_d$2_CollectionCapabilities = CollectionCapabilities;
|
|
2492
|
+
type index_d$2_CollectionOperation = CollectionOperation;
|
|
2493
|
+
declare const index_d$2_CollectionOperation: typeof CollectionOperation;
|
|
2494
|
+
type index_d$2_CollectionType = CollectionType;
|
|
2495
|
+
declare const index_d$2_CollectionType: typeof CollectionType;
|
|
2496
|
+
type index_d$2_CreateDataCollectionFieldRequest = CreateDataCollectionFieldRequest;
|
|
2497
|
+
type index_d$2_CreateDataCollectionFieldResponse = CreateDataCollectionFieldResponse;
|
|
2498
|
+
type index_d$2_CreateDataCollectionRequest = CreateDataCollectionRequest;
|
|
2499
|
+
type index_d$2_CreateDataCollectionResponse = CreateDataCollectionResponse;
|
|
2500
|
+
type index_d$2_CreateDataCollectionResponseNonNullableFields = CreateDataCollectionResponseNonNullableFields;
|
|
2501
|
+
type index_d$2_CreateDataCollectionsSnapshotRequest = CreateDataCollectionsSnapshotRequest;
|
|
2502
|
+
type index_d$2_CreateDataCollectionsSnapshotResponse = CreateDataCollectionsSnapshotResponse;
|
|
2503
|
+
type index_d$2_DataCollection = DataCollection;
|
|
2504
|
+
type index_d$2_DataCollectionChangedEnvelope = DataCollectionChangedEnvelope;
|
|
2505
|
+
type index_d$2_DataCollectionChangedEvent = DataCollectionChangedEvent;
|
|
2506
|
+
type index_d$2_DataCollectionClonedEnvelope = DataCollectionClonedEnvelope;
|
|
2507
|
+
type index_d$2_DataCollectionClonedEvent = DataCollectionClonedEvent;
|
|
2508
|
+
type index_d$2_DataCollectionCreatedEnvelope = DataCollectionCreatedEnvelope;
|
|
2509
|
+
type index_d$2_DataCollectionDeletedEnvelope = DataCollectionDeletedEnvelope;
|
|
2510
|
+
type index_d$2_DataCollectionUpdatedEnvelope = DataCollectionUpdatedEnvelope;
|
|
2511
|
+
type index_d$2_DataOperation = DataOperation;
|
|
2512
|
+
declare const index_d$2_DataOperation: typeof DataOperation;
|
|
2513
|
+
type index_d$2_DeleteDataCollectionFieldRequest = DeleteDataCollectionFieldRequest;
|
|
2514
|
+
type index_d$2_DeleteDataCollectionFieldResponse = DeleteDataCollectionFieldResponse;
|
|
2515
|
+
type index_d$2_DeleteDataCollectionRequest = DeleteDataCollectionRequest;
|
|
2516
|
+
type index_d$2_DeleteDataCollectionResponse = DeleteDataCollectionResponse;
|
|
2517
|
+
type index_d$2_DeleteDataCollectionsSnapshotRequest = DeleteDataCollectionsSnapshotRequest;
|
|
2518
|
+
type index_d$2_DeleteDataCollectionsSnapshotResponse = DeleteDataCollectionsSnapshotResponse;
|
|
2519
|
+
type index_d$2_Direction = Direction;
|
|
2520
|
+
declare const index_d$2_Direction: typeof Direction;
|
|
2521
|
+
type index_d$2_FieldCapabilities = FieldCapabilities;
|
|
2522
|
+
type index_d$2_FieldPlugin = FieldPlugin;
|
|
2523
|
+
type index_d$2_FieldPluginOptionsOneOf = FieldPluginOptionsOneOf;
|
|
2524
|
+
type index_d$2_FieldPluginType = FieldPluginType;
|
|
2525
|
+
declare const index_d$2_FieldPluginType: typeof FieldPluginType;
|
|
2526
|
+
type index_d$2_FieldRangeValidationsOneOf = FieldRangeValidationsOneOf;
|
|
2527
|
+
type index_d$2_FieldsPattern = FieldsPattern;
|
|
2528
|
+
type index_d$2_Format = Format;
|
|
2529
|
+
declare const index_d$2_Format: typeof Format;
|
|
2530
|
+
type index_d$2_GetDataCollectionOptions = GetDataCollectionOptions;
|
|
2531
|
+
type index_d$2_GetDataCollectionRequest = GetDataCollectionRequest;
|
|
2532
|
+
type index_d$2_GetDataCollectionResponse = GetDataCollectionResponse;
|
|
2533
|
+
type index_d$2_GetDataCollectionResponseNonNullableFields = GetDataCollectionResponseNonNullableFields;
|
|
2534
|
+
type index_d$2_IndexField = IndexField;
|
|
2535
|
+
type index_d$2_IndexLimits = IndexLimits;
|
|
2536
|
+
type index_d$2_IndexStatus = IndexStatus;
|
|
2537
|
+
declare const index_d$2_IndexStatus: typeof IndexStatus;
|
|
2538
|
+
type index_d$2_ListDataCollectionsOptions = ListDataCollectionsOptions;
|
|
2539
|
+
type index_d$2_ListDataCollectionsRequest = ListDataCollectionsRequest;
|
|
2540
|
+
type index_d$2_ListDataCollectionsResponse = ListDataCollectionsResponse;
|
|
2541
|
+
type index_d$2_ListDataCollectionsResponseNonNullableFields = ListDataCollectionsResponseNonNullableFields;
|
|
2542
|
+
type index_d$2_MultiReference = MultiReference;
|
|
2543
|
+
type index_d$2_MultilingualOptions = MultilingualOptions;
|
|
2544
|
+
type index_d$2_NumberRange = NumberRange;
|
|
2545
|
+
type index_d$2_ObjectField = ObjectField;
|
|
2546
|
+
type index_d$2_PageLink = PageLink;
|
|
2547
|
+
type index_d$2_PageLinkPluginOptions = PageLinkPluginOptions;
|
|
2548
|
+
type index_d$2_PagingMode = PagingMode;
|
|
2549
|
+
declare const index_d$2_PagingMode: typeof PagingMode;
|
|
2550
|
+
type index_d$2_Permissions = Permissions;
|
|
2551
|
+
type index_d$2_Plugin = Plugin;
|
|
2552
|
+
type index_d$2_PluginCmsOptions = PluginCmsOptions;
|
|
2553
|
+
type index_d$2_PluginOptionsOneOf = PluginOptionsOneOf;
|
|
2554
|
+
type index_d$2_PluginType = PluginType;
|
|
2555
|
+
declare const index_d$2_PluginType: typeof PluginType;
|
|
2556
|
+
type index_d$2_PluginUpdate = PluginUpdate;
|
|
2557
|
+
type index_d$2_QueryOperator = QueryOperator;
|
|
2558
|
+
declare const index_d$2_QueryOperator: typeof QueryOperator;
|
|
2559
|
+
type index_d$2_Reference = Reference;
|
|
2560
|
+
type index_d$2_RestoreDataCollectionsFromSnapshotRequest = RestoreDataCollectionsFromSnapshotRequest;
|
|
2561
|
+
type index_d$2_RestoreDataCollectionsFromSnapshotResponse = RestoreDataCollectionsFromSnapshotResponse;
|
|
2562
|
+
type index_d$2_Role = Role;
|
|
2563
|
+
declare const index_d$2_Role: typeof Role;
|
|
2564
|
+
type index_d$2_SingleItemPluginOptions = SingleItemPluginOptions;
|
|
2565
|
+
type index_d$2_SiteSort = SiteSort;
|
|
2566
|
+
type index_d$2_SnapshotCollection = SnapshotCollection;
|
|
2567
|
+
type index_d$2_Sort = Sort;
|
|
2568
|
+
type index_d$2_StringLengthRange = StringLengthRange;
|
|
2569
|
+
type index_d$2_Type = Type;
|
|
2570
|
+
declare const index_d$2_Type: typeof Type;
|
|
2571
|
+
type index_d$2_TypeMetadata = TypeMetadata;
|
|
2572
|
+
type index_d$2_TypeMetadataMetadataOneOf = TypeMetadataMetadataOneOf;
|
|
2573
|
+
type index_d$2_UpdateDataCollectionFieldRequest = UpdateDataCollectionFieldRequest;
|
|
2574
|
+
type index_d$2_UpdateDataCollectionFieldResponse = UpdateDataCollectionFieldResponse;
|
|
2575
|
+
type index_d$2_UpdateDataCollectionRequest = UpdateDataCollectionRequest;
|
|
2576
|
+
type index_d$2_UpdateDataCollectionResponse = UpdateDataCollectionResponse;
|
|
2577
|
+
type index_d$2_UpdateDataCollectionResponseNonNullableFields = UpdateDataCollectionResponseNonNullableFields;
|
|
2578
|
+
type index_d$2_UrlizedOnlyPattern = UrlizedOnlyPattern;
|
|
2579
|
+
type index_d$2_UrlizedPluginOptions = UrlizedPluginOptions;
|
|
2580
|
+
type index_d$2__Array = _Array;
|
|
2581
|
+
type index_d$2__Object = _Object;
|
|
2582
|
+
declare const index_d$2_createDataCollection: typeof createDataCollection;
|
|
2583
|
+
declare const index_d$2_deleteDataCollection: typeof deleteDataCollection;
|
|
2584
|
+
declare const index_d$2_getDataCollection: typeof getDataCollection;
|
|
2585
|
+
declare const index_d$2_listDataCollections: typeof listDataCollections;
|
|
2586
|
+
declare const index_d$2_onDataCollectionChangedEvent: typeof onDataCollectionChangedEvent;
|
|
2587
|
+
declare const index_d$2_onDataCollectionClonedEvent: typeof onDataCollectionClonedEvent;
|
|
2588
|
+
declare const index_d$2_onDataCollectionCreated: typeof onDataCollectionCreated;
|
|
2589
|
+
declare const index_d$2_onDataCollectionDeleted: typeof onDataCollectionDeleted;
|
|
2590
|
+
declare const index_d$2_onDataCollectionUpdated: typeof onDataCollectionUpdated;
|
|
2591
|
+
declare const index_d$2_updateDataCollection: typeof updateDataCollection;
|
|
2592
|
+
declare namespace index_d$2 {
|
|
2593
|
+
export { type ActionEvent$1 as ActionEvent, type index_d$2_ArraySizeRange as ArraySizeRange, type BaseEventMetadata$1 as BaseEventMetadata, type index_d$2_BulkGetDataCollectionsPageBySnapshotsRequest as BulkGetDataCollectionsPageBySnapshotsRequest, type index_d$2_BulkGetDataCollectionsPageBySnapshotsResponse as BulkGetDataCollectionsPageBySnapshotsResponse, type index_d$2_BulkGetDataCollectionsRequest as BulkGetDataCollectionsRequest, type index_d$2_BulkGetDataCollectionsResponse as BulkGetDataCollectionsResponse, type index_d$2_Calculator as Calculator, type index_d$2_CalculatorPatternOneOf as CalculatorPatternOneOf, type index_d$2_CmsOptions as CmsOptions, type index_d$2_CollectionCapabilities as CollectionCapabilities, index_d$2_CollectionOperation as CollectionOperation, index_d$2_CollectionType as CollectionType, type index_d$2_CreateDataCollectionFieldRequest as CreateDataCollectionFieldRequest, type index_d$2_CreateDataCollectionFieldResponse as CreateDataCollectionFieldResponse, type index_d$2_CreateDataCollectionRequest as CreateDataCollectionRequest, type index_d$2_CreateDataCollectionResponse as CreateDataCollectionResponse, type index_d$2_CreateDataCollectionResponseNonNullableFields as CreateDataCollectionResponseNonNullableFields, type index_d$2_CreateDataCollectionsSnapshotRequest as CreateDataCollectionsSnapshotRequest, type index_d$2_CreateDataCollectionsSnapshotResponse as CreateDataCollectionsSnapshotResponse, type index_d$2_DataCollection as DataCollection, type index_d$2_DataCollectionChangedEnvelope as DataCollectionChangedEnvelope, type index_d$2_DataCollectionChangedEvent as DataCollectionChangedEvent, type index_d$2_DataCollectionClonedEnvelope as DataCollectionClonedEnvelope, type index_d$2_DataCollectionClonedEvent as DataCollectionClonedEvent, type index_d$2_DataCollectionCreatedEnvelope as DataCollectionCreatedEnvelope, type index_d$2_DataCollectionDeletedEnvelope as DataCollectionDeletedEnvelope, type index_d$2_DataCollectionUpdatedEnvelope as DataCollectionUpdatedEnvelope, index_d$2_DataOperation as DataOperation, type index_d$2_DeleteDataCollectionFieldRequest as DeleteDataCollectionFieldRequest, type index_d$2_DeleteDataCollectionFieldResponse as DeleteDataCollectionFieldResponse, type index_d$2_DeleteDataCollectionRequest as DeleteDataCollectionRequest, type index_d$2_DeleteDataCollectionResponse as DeleteDataCollectionResponse, type index_d$2_DeleteDataCollectionsSnapshotRequest as DeleteDataCollectionsSnapshotRequest, type index_d$2_DeleteDataCollectionsSnapshotResponse as DeleteDataCollectionsSnapshotResponse, index_d$2_Direction as Direction, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type Failure$1 as Failure, type Field$1 as Field, type index_d$2_FieldCapabilities as FieldCapabilities, type index_d$2_FieldPlugin as FieldPlugin, type index_d$2_FieldPluginOptionsOneOf as FieldPluginOptionsOneOf, index_d$2_FieldPluginType as FieldPluginType, type index_d$2_FieldRangeValidationsOneOf as FieldRangeValidationsOneOf, type FieldUpdate$1 as FieldUpdate, type index_d$2_FieldsPattern as FieldsPattern, index_d$2_Format as Format, type index_d$2_GetDataCollectionOptions as GetDataCollectionOptions, type index_d$2_GetDataCollectionRequest as GetDataCollectionRequest, type index_d$2_GetDataCollectionResponse as GetDataCollectionResponse, type index_d$2_GetDataCollectionResponseNonNullableFields as GetDataCollectionResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type Index$1 as Index, type index_d$2_IndexField as IndexField, type index_d$2_IndexLimits as IndexLimits, index_d$2_IndexStatus as IndexStatus, type index_d$2_ListDataCollectionsOptions as ListDataCollectionsOptions, type index_d$2_ListDataCollectionsRequest as ListDataCollectionsRequest, type index_d$2_ListDataCollectionsResponse as ListDataCollectionsResponse, type index_d$2_ListDataCollectionsResponseNonNullableFields as ListDataCollectionsResponseNonNullableFields, type MessageEnvelope$1 as MessageEnvelope, type index_d$2_MultiReference as MultiReference, type index_d$2_MultilingualOptions as MultilingualOptions, type index_d$2_NumberRange as NumberRange, type index_d$2_ObjectField as ObjectField, Order$1 as Order, type index_d$2_PageLink as PageLink, type index_d$2_PageLinkPluginOptions as PageLinkPluginOptions, type Paging$2 as Paging, type PagingMetadataV2$1 as PagingMetadataV2, index_d$2_PagingMode as PagingMode, type index_d$2_Permissions as Permissions, type index_d$2_Plugin as Plugin, type index_d$2_PluginCmsOptions as PluginCmsOptions, type index_d$2_PluginOptionsOneOf as PluginOptionsOneOf, index_d$2_PluginType as PluginType, type index_d$2_PluginUpdate as PluginUpdate, type PublishPluginOptions$1 as PublishPluginOptions, index_d$2_QueryOperator as QueryOperator, type index_d$2_Reference as Reference, type index_d$2_RestoreDataCollectionsFromSnapshotRequest as RestoreDataCollectionsFromSnapshotRequest, type index_d$2_RestoreDataCollectionsFromSnapshotResponse as RestoreDataCollectionsFromSnapshotResponse, index_d$2_Role as Role, type index_d$2_SingleItemPluginOptions as SingleItemPluginOptions, type index_d$2_SiteSort as SiteSort, type index_d$2_SnapshotCollection as SnapshotCollection, type index_d$2_Sort as Sort, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, Status$1 as Status, type index_d$2_StringLengthRange as StringLengthRange, index_d$2_Type as Type, type index_d$2_TypeMetadata as TypeMetadata, type index_d$2_TypeMetadataMetadataOneOf as TypeMetadataMetadataOneOf, type index_d$2_UpdateDataCollectionFieldRequest as UpdateDataCollectionFieldRequest, type index_d$2_UpdateDataCollectionFieldResponse as UpdateDataCollectionFieldResponse, type index_d$2_UpdateDataCollectionRequest as UpdateDataCollectionRequest, type index_d$2_UpdateDataCollectionResponse as UpdateDataCollectionResponse, type index_d$2_UpdateDataCollectionResponseNonNullableFields as UpdateDataCollectionResponseNonNullableFields, type index_d$2_UrlizedOnlyPattern as UrlizedOnlyPattern, type index_d$2_UrlizedPluginOptions as UrlizedPluginOptions, WebhookIdentityType$1 as WebhookIdentityType, type index_d$2__Array as _Array, type index_d$2__Object as _Object, __metadata$2 as __metadata, index_d$2_createDataCollection as createDataCollection, index_d$2_deleteDataCollection as deleteDataCollection, index_d$2_getDataCollection as getDataCollection, index_d$2_listDataCollections as listDataCollections, index_d$2_onDataCollectionChangedEvent as onDataCollectionChangedEvent, index_d$2_onDataCollectionClonedEvent as onDataCollectionClonedEvent, index_d$2_onDataCollectionCreated as onDataCollectionCreated, index_d$2_onDataCollectionDeleted as onDataCollectionDeleted, index_d$2_onDataCollectionUpdated as onDataCollectionUpdated, index_d$2_updateDataCollection as updateDataCollection };
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2596
|
+
interface DataItem {
|
|
2597
|
+
/** Data item ID. */
|
|
2598
|
+
_id?: string;
|
|
2599
|
+
/**
|
|
2600
|
+
* ID of the collection this item belongs to
|
|
2601
|
+
* @readonly
|
|
2602
|
+
*/
|
|
2603
|
+
dataCollectionId?: string;
|
|
2604
|
+
/**
|
|
2605
|
+
* Data item contents.
|
|
2606
|
+
*
|
|
2607
|
+
* Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:
|
|
2608
|
+
*
|
|
2609
|
+
* + `_id`: Item ID.
|
|
2610
|
+
* + `_createdDate`: Date and time the item was added to the collection.
|
|
2611
|
+
* + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
|
|
2612
|
+
* + `_ownerId`: ID of the user who created the item. Can be modified with site owner permissions.
|
|
2613
|
+
*/
|
|
2614
|
+
data?: Record<string, any> | null;
|
|
2615
|
+
}
|
|
2616
|
+
interface InsertDataItemRequest {
|
|
2617
|
+
/** ID of the collection in which to insert the item. */
|
|
2618
|
+
dataCollectionId: string;
|
|
2619
|
+
/** Item to insert. */
|
|
2620
|
+
dataItem: DataItem;
|
|
2621
|
+
}
|
|
2622
|
+
declare enum Environment$1 {
|
|
2623
|
+
LIVE = "LIVE",
|
|
2624
|
+
SANDBOX = "SANDBOX",
|
|
2625
|
+
SANDBOX_PREFERRED = "SANDBOX_PREFERRED"
|
|
2626
|
+
}
|
|
2627
|
+
interface Options {
|
|
2628
|
+
}
|
|
2629
|
+
interface PublishPluginOptions {
|
|
2630
|
+
showDraftItems?: boolean;
|
|
2631
|
+
}
|
|
2632
|
+
interface InsertDataItemResponse {
|
|
2633
|
+
/** Inserted data item. */
|
|
2634
|
+
dataItem?: DataItem;
|
|
2635
|
+
}
|
|
2636
|
+
interface PatchDataItemRequest {
|
|
2637
|
+
/** ID of the collection containing the existing item. */
|
|
2638
|
+
dataCollectionId?: string;
|
|
2639
|
+
/** Patch set applied during item update. */
|
|
2640
|
+
patchSet?: PatchSet;
|
|
2641
|
+
}
|
|
2642
|
+
interface PatchSet {
|
|
2643
|
+
/** Data item ID. */
|
|
2644
|
+
dataItemId?: string;
|
|
2645
|
+
/** Set of field updates to be applied */
|
|
2646
|
+
fieldUpdates?: FieldUpdate[];
|
|
2647
|
+
}
|
|
2648
|
+
interface FieldUpdate extends FieldUpdateActionOptionsOneOf {
|
|
2649
|
+
setField?: SetField;
|
|
2650
|
+
incrementField?: IncrementField;
|
|
2651
|
+
appendToArray?: AppendToArray;
|
|
2652
|
+
removeFromArray?: RemoveFromArray;
|
|
2653
|
+
/** Field key to be patched. For ex "title", "address.street" */
|
|
2654
|
+
fieldPath?: string;
|
|
2655
|
+
/** Action to be applied */
|
|
2656
|
+
action?: ACTION;
|
|
2657
|
+
}
|
|
2658
|
+
/** @oneof */
|
|
2659
|
+
interface FieldUpdateActionOptionsOneOf {
|
|
2660
|
+
setField?: SetField;
|
|
2661
|
+
incrementField?: IncrementField;
|
|
2662
|
+
appendToArray?: AppendToArray;
|
|
2663
|
+
removeFromArray?: RemoveFromArray;
|
|
2664
|
+
}
|
|
2665
|
+
declare enum ACTION {
|
|
2666
|
+
UNKNOWN_ACTION = "UNKNOWN_ACTION",
|
|
2667
|
+
SET_FIELD = "SET_FIELD",
|
|
2668
|
+
REMOVE_FIELD = "REMOVE_FIELD",
|
|
2669
|
+
INCREMENT_FIELD = "INCREMENT_FIELD",
|
|
2670
|
+
APPEND_TO_ARRAY = "APPEND_TO_ARRAY",
|
|
2671
|
+
REMOVE_FROM_ARRAY = "REMOVE_FROM_ARRAY"
|
|
2672
|
+
}
|
|
2673
|
+
interface SetField {
|
|
2674
|
+
value?: any;
|
|
2675
|
+
}
|
|
2676
|
+
interface IncrementField {
|
|
2677
|
+
value?: number;
|
|
2678
|
+
}
|
|
2679
|
+
interface AppendToArray {
|
|
2680
|
+
value?: any;
|
|
2681
|
+
}
|
|
2682
|
+
interface RemoveFromArray {
|
|
2683
|
+
value?: any;
|
|
2684
|
+
}
|
|
2685
|
+
interface DataPublishPluginOptions {
|
|
2686
|
+
includeDraftItems?: boolean;
|
|
2687
|
+
}
|
|
2688
|
+
interface PatchDataItemResponse {
|
|
2689
|
+
/** Updated data item. */
|
|
2690
|
+
dataItem?: DataItem;
|
|
2691
|
+
}
|
|
2692
|
+
interface BulkPatchDataItemsRequest {
|
|
2693
|
+
/** ID of the collection in which to update items. */
|
|
2694
|
+
dataCollectionId?: string;
|
|
2695
|
+
/** Patch sets to apply. */
|
|
2696
|
+
patchSets?: PatchSet[];
|
|
2697
|
+
/**
|
|
2698
|
+
* Whether to return the updated data items.
|
|
2699
|
+
* When `true`, the `results` objects contain a `dataItem` field.
|
|
2700
|
+
*
|
|
2701
|
+
* Default: `false`
|
|
2702
|
+
*/
|
|
2703
|
+
returnEntity?: boolean;
|
|
2704
|
+
}
|
|
2705
|
+
interface BulkPatchDataItemsResponse {
|
|
2706
|
+
/** Information about the updated items. */
|
|
2707
|
+
results?: BulkDataItemResult[];
|
|
2708
|
+
/** Bulk action metadata. */
|
|
2709
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
2710
|
+
}
|
|
2711
|
+
interface BulkDataItemResult {
|
|
2712
|
+
/**
|
|
2713
|
+
* The action attempted for the data item.
|
|
2714
|
+
*
|
|
2715
|
+
* Supported values: `UNKNOWN_ACTION_TYPE`, `INSERT`, `UPDATE`, `DELETE`.
|
|
2716
|
+
*/
|
|
2717
|
+
action?: BulkActionType;
|
|
2718
|
+
/** Metadata related to the data item for which the action was attempted. */
|
|
2719
|
+
itemMetadata?: ItemMetadata;
|
|
2720
|
+
/** The data item for which the action was attempted. Only returned if `returnEntity` is `true` in the request and the action is successful. */
|
|
2721
|
+
dataItem?: DataItem;
|
|
2722
|
+
}
|
|
2723
|
+
declare enum BulkActionType {
|
|
2724
|
+
UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
|
|
2725
|
+
INSERT = "INSERT",
|
|
2726
|
+
UPDATE = "UPDATE",
|
|
2727
|
+
DELETE = "DELETE",
|
|
2728
|
+
PATCH = "PATCH"
|
|
2729
|
+
}
|
|
2730
|
+
interface ItemMetadata {
|
|
2731
|
+
/** Item ID. This field doesn't appear if there is no item ID, for example, when item creation fails. */
|
|
2732
|
+
_id?: string | null;
|
|
2733
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
2734
|
+
originalIndex?: number;
|
|
2735
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
2736
|
+
success?: boolean;
|
|
2737
|
+
/** Details about the error in case of failure. */
|
|
2738
|
+
error?: ApplicationError;
|
|
2739
|
+
}
|
|
2740
|
+
interface ApplicationError {
|
|
2741
|
+
/** Error code. */
|
|
2742
|
+
code?: string;
|
|
2743
|
+
/** Description of the error. */
|
|
2744
|
+
description?: string;
|
|
2745
|
+
/** Data related to the error. */
|
|
2746
|
+
data?: Record<string, any> | null;
|
|
2747
|
+
}
|
|
2748
|
+
interface BulkActionMetadata {
|
|
2749
|
+
/** Number of items successfully processed. */
|
|
2750
|
+
totalSuccesses?: number;
|
|
2751
|
+
/** Number of items that couldn't be processed. */
|
|
2752
|
+
totalFailures?: number;
|
|
2753
|
+
}
|
|
2754
|
+
interface UpdateDataItemRequest {
|
|
2755
|
+
/** ID of the collection containing the existing item. */
|
|
2756
|
+
dataCollectionId: string;
|
|
2757
|
+
/** Updated data item content. The existing data item's content is replaced entirely. */
|
|
2758
|
+
dataItem: DataItem;
|
|
2759
|
+
}
|
|
2760
|
+
interface UpdateDataItemResponse {
|
|
2761
|
+
/** Updated data item. */
|
|
2762
|
+
dataItem?: DataItem;
|
|
2763
|
+
}
|
|
2764
|
+
interface SaveDataItemRequest {
|
|
2765
|
+
/** ID of the collection in which to insert or update the item. */
|
|
2766
|
+
dataCollectionId: string;
|
|
2767
|
+
/** Data item to insert or update. */
|
|
2768
|
+
dataItem: DataItem;
|
|
2769
|
+
}
|
|
2770
|
+
interface SaveDataItemResponse {
|
|
2771
|
+
/**
|
|
2772
|
+
* The action carried out for the item.
|
|
2773
|
+
*
|
|
2774
|
+
* + `INSERTED`: A new item was added to the collection.
|
|
2775
|
+
* + `UPDATED`: An existing item in the collection was updated.
|
|
2776
|
+
*/
|
|
2777
|
+
action?: Action;
|
|
2778
|
+
/** Inserted or updated data item. */
|
|
2779
|
+
dataItem?: DataItem;
|
|
2780
|
+
}
|
|
2781
|
+
declare enum Action {
|
|
2782
|
+
UNKNOWN_ACTION = "UNKNOWN_ACTION",
|
|
2783
|
+
INSERTED = "INSERTED",
|
|
2784
|
+
UPDATED = "UPDATED"
|
|
2785
|
+
}
|
|
2786
|
+
interface GetDataItemRequest {
|
|
2787
|
+
/** ID of the collection from which to retrieve the data item. */
|
|
2788
|
+
dataCollectionId: string;
|
|
2789
|
+
/** ID of the data item to retrieve. */
|
|
2790
|
+
dataItemId: string;
|
|
2791
|
+
/**
|
|
2792
|
+
* Whether to retrieve data from the primary database instance.
|
|
2793
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2794
|
+
*
|
|
2795
|
+
* Default: `false`
|
|
2796
|
+
*/
|
|
2797
|
+
consistentRead?: boolean;
|
|
2798
|
+
/**
|
|
2799
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
2800
|
+
* If provided, the result text is returned in the specified language.
|
|
2801
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
2802
|
+
*
|
|
2803
|
+
* If not provided, result text is not translated.
|
|
2804
|
+
*/
|
|
2805
|
+
language?: string | null;
|
|
2806
|
+
/**
|
|
2807
|
+
* Fields to return for the item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
2808
|
+
* **Note:** The `_id` system field is always returned.
|
|
2809
|
+
*/
|
|
2810
|
+
fields?: string[];
|
|
2811
|
+
}
|
|
2812
|
+
interface GetDataItemResponse {
|
|
2813
|
+
/** Retrieved item. */
|
|
2814
|
+
dataItem?: DataItem;
|
|
2815
|
+
}
|
|
2816
|
+
interface RemoveDataItemRequest {
|
|
2817
|
+
/** ID of the collection from which to remove the item. */
|
|
2818
|
+
dataCollectionId: string;
|
|
2819
|
+
/** ID of the item to remove. */
|
|
2820
|
+
dataItemId: string;
|
|
2821
|
+
}
|
|
2822
|
+
interface RemoveDataItemResponse {
|
|
2823
|
+
/** Removed item. */
|
|
2824
|
+
dataItem?: DataItem;
|
|
2825
|
+
}
|
|
2826
|
+
interface TruncateDataItemsRequest {
|
|
2827
|
+
/** ID of the collection to truncate. */
|
|
2828
|
+
dataCollectionId: string;
|
|
2829
|
+
}
|
|
2830
|
+
interface TruncateDataItemsResponse {
|
|
2831
|
+
}
|
|
2832
|
+
interface QueryDataItemsRequest {
|
|
2833
|
+
/** ID of the collection to query. */
|
|
2834
|
+
dataCollectionId: string;
|
|
2835
|
+
/** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
|
|
2836
|
+
query?: QueryV2;
|
|
2837
|
+
/**
|
|
2838
|
+
* Whether to return the total count in the response for a query with offset paging.
|
|
2839
|
+
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
2840
|
+
*
|
|
2841
|
+
* Default: `false`
|
|
2842
|
+
*/
|
|
2843
|
+
returnTotalCount?: boolean;
|
|
2844
|
+
/**
|
|
2845
|
+
* Properties for which to include referenced items in the query's results.
|
|
2846
|
+
* Up to 50 referenced items can be included for each item that matches the query.
|
|
2847
|
+
*/
|
|
2848
|
+
includeReferencedItems?: string[];
|
|
2849
|
+
/**
|
|
2850
|
+
* Whether to retrieve data from the primary database instance.
|
|
2851
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2852
|
+
*
|
|
2853
|
+
* Default: `false`
|
|
2854
|
+
*/
|
|
2855
|
+
consistentRead?: boolean;
|
|
2856
|
+
/**
|
|
2857
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
2858
|
+
* If provided, the result text is returned in the specified language.
|
|
2859
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
2860
|
+
*
|
|
2861
|
+
* If not provided, result text is not translated.
|
|
2862
|
+
*/
|
|
2863
|
+
language?: string | null;
|
|
2864
|
+
}
|
|
2865
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
2866
|
+
/** Paging options to limit and skip the number of items. */
|
|
2867
|
+
paging?: Paging$1;
|
|
2868
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
2869
|
+
cursorPaging?: CursorPaging;
|
|
2870
|
+
/**
|
|
2871
|
+
* Filter object in the following format:
|
|
2872
|
+
*
|
|
2873
|
+
* `"filter" : {
|
|
2874
|
+
* "fieldName1": "value1",
|
|
2875
|
+
* "fieldName2":{"$operator":"value2"}
|
|
2876
|
+
* }`
|
|
2877
|
+
*
|
|
2878
|
+
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
2879
|
+
*/
|
|
2880
|
+
filter?: Record<string, any> | null;
|
|
2881
|
+
/**
|
|
2882
|
+
* Sort object in the following format:
|
|
2883
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
2884
|
+
*/
|
|
2885
|
+
sort?: Sorting[];
|
|
2886
|
+
/**
|
|
2887
|
+
* Fields to return for each item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
2888
|
+
* **Note:** The `_id` system field is always returned.
|
|
2889
|
+
*/
|
|
2890
|
+
fields?: string[];
|
|
2891
|
+
}
|
|
2892
|
+
/** @oneof */
|
|
2893
|
+
interface QueryV2PagingMethodOneOf {
|
|
2894
|
+
/** Paging options to limit and skip the number of items. */
|
|
2895
|
+
paging?: Paging$1;
|
|
2896
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
2897
|
+
cursorPaging?: CursorPaging;
|
|
2898
|
+
}
|
|
2899
|
+
interface Sorting {
|
|
2900
|
+
/** Name of the field to sort by. */
|
|
2901
|
+
fieldName?: string;
|
|
2902
|
+
/**
|
|
2903
|
+
* Sort order.
|
|
2904
|
+
*
|
|
2905
|
+
* Supported values: `ASC`, `DESC`.
|
|
2906
|
+
*/
|
|
2907
|
+
order?: SortOrder;
|
|
2908
|
+
}
|
|
2909
|
+
declare enum SortOrder {
|
|
2910
|
+
ASC = "ASC",
|
|
2911
|
+
DESC = "DESC"
|
|
2912
|
+
}
|
|
2913
|
+
interface Paging$1 {
|
|
2914
|
+
/** Number of items to load. */
|
|
2915
|
+
limit?: number | null;
|
|
2916
|
+
/** Number of items to skip in the current sort order. */
|
|
2917
|
+
offset?: number | null;
|
|
2918
|
+
}
|
|
2919
|
+
interface CursorPaging {
|
|
2920
|
+
/** Number of items to load. */
|
|
2921
|
+
limit?: number | null;
|
|
2922
|
+
/**
|
|
2923
|
+
* Pointer to the next or previous page in the list of results.
|
|
2924
|
+
*
|
|
2925
|
+
* You can get the relevant cursor token
|
|
2926
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
2927
|
+
* Not relevant for the first request.
|
|
2928
|
+
*/
|
|
2929
|
+
cursor?: string | null;
|
|
2930
|
+
}
|
|
2931
|
+
interface QueryDataItemsResponse {
|
|
2932
|
+
/** Retrieved items. */
|
|
2933
|
+
dataItems?: DataItem[];
|
|
2934
|
+
/** Paging information. */
|
|
2935
|
+
pagingMetadata?: PagingMetadataV2;
|
|
2936
|
+
}
|
|
2937
|
+
interface CachingInfo {
|
|
2938
|
+
/** Caching tags for this collection */
|
|
2939
|
+
tags?: string[];
|
|
2940
|
+
/** max caching time if set */
|
|
2941
|
+
maxAge?: number | null;
|
|
2942
|
+
}
|
|
2943
|
+
interface PagingMetadataV2 {
|
|
2944
|
+
/** Number of items returned in the response. */
|
|
2945
|
+
count?: number | null;
|
|
2946
|
+
/** Offset that was requested. */
|
|
2947
|
+
offset?: number | null;
|
|
2948
|
+
/** Total number of items that match the query. Returned if offset paging is used, `returnTotalCount` is `true` in the request, and `tooManyToCount` is false. */
|
|
2949
|
+
total?: number | null;
|
|
2950
|
+
/** Whether the server failed to calculate the `total` field. */
|
|
2951
|
+
tooManyToCount?: boolean | null;
|
|
2952
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
2953
|
+
cursors?: Cursors;
|
|
2954
|
+
}
|
|
2955
|
+
interface Cursors {
|
|
2956
|
+
/** Cursor pointing to next page in the list of results. */
|
|
2957
|
+
next?: string | null;
|
|
2958
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
2959
|
+
prev?: string | null;
|
|
2960
|
+
}
|
|
2961
|
+
interface AggregateDataItemsRequest extends AggregateDataItemsRequestPagingMethodOneOf {
|
|
2962
|
+
/** Paging options to limit and skip the number of items. */
|
|
2963
|
+
paging?: Paging$1;
|
|
2964
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
2965
|
+
cursorPaging?: CursorPaging;
|
|
2966
|
+
/** ID of the collection on which to run the aggregation. */
|
|
2967
|
+
dataCollectionId: string;
|
|
2968
|
+
/** Filter applied to the collection's data prior to running the aggregation. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section) for information on how to structure a filter object. */
|
|
2969
|
+
initialFilter?: Record<string, any> | null;
|
|
2970
|
+
/** Aggregation applied to the data. */
|
|
2971
|
+
aggregation?: Aggregation;
|
|
2972
|
+
/** Filter applied to the processed data following the aggregation. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section) for information on how to structure a filter object. */
|
|
2973
|
+
finalFilter?: Record<string, any> | null;
|
|
2974
|
+
/**
|
|
2975
|
+
* Sort object in the following format:
|
|
2976
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
2977
|
+
*/
|
|
2978
|
+
sort?: Sorting[];
|
|
2979
|
+
/**
|
|
2980
|
+
* Whether to return the total count in the response for a query with offset paging.
|
|
2981
|
+
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
2982
|
+
*
|
|
2983
|
+
* Default: `false`
|
|
2984
|
+
*/
|
|
2985
|
+
returnTotalCount?: boolean;
|
|
2986
|
+
/**
|
|
2987
|
+
* Whether to retrieve data from the primary database instance.
|
|
2988
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2989
|
+
*
|
|
2990
|
+
* Default: `false`
|
|
2991
|
+
*/
|
|
2992
|
+
consistentRead?: boolean;
|
|
2993
|
+
/**
|
|
2994
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
2995
|
+
* If provided, the result text is returned in the specified language.
|
|
2996
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
2997
|
+
*
|
|
2998
|
+
* If not provided, result text is not translated.
|
|
2999
|
+
*/
|
|
3000
|
+
language?: string | null;
|
|
3001
|
+
}
|
|
3002
|
+
/** @oneof */
|
|
3003
|
+
interface AggregateDataItemsRequestPagingMethodOneOf {
|
|
3004
|
+
/** Paging options to limit and skip the number of items. */
|
|
3005
|
+
paging?: Paging$1;
|
|
3006
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
3007
|
+
cursorPaging?: CursorPaging;
|
|
3008
|
+
}
|
|
3009
|
+
interface Average {
|
|
3010
|
+
/** Name of the field for which to calculate the average value. */
|
|
3011
|
+
itemFieldName?: string;
|
|
3012
|
+
}
|
|
3013
|
+
interface Min {
|
|
3014
|
+
/** Name of the field for which to calculate the minimum value. */
|
|
3015
|
+
itemFieldName?: string;
|
|
3016
|
+
}
|
|
3017
|
+
interface Max {
|
|
3018
|
+
/** Name of the field for which to calculate the maximum value. */
|
|
3019
|
+
itemFieldName?: string;
|
|
3020
|
+
}
|
|
3021
|
+
interface Sum {
|
|
3022
|
+
/** Name of the field for which to calculate the sum. */
|
|
3023
|
+
itemFieldName?: string;
|
|
3024
|
+
}
|
|
3025
|
+
interface Count {
|
|
3026
|
+
}
|
|
3027
|
+
interface Operation extends OperationCalculateOneOf {
|
|
3028
|
+
/** Calculate the average value of a specified field for all items in the grouping. */
|
|
3029
|
+
average?: Average;
|
|
3030
|
+
/** Calculate the minimum value of a specified field for all items in the grouping. */
|
|
3031
|
+
min?: Min;
|
|
3032
|
+
/** Calculate the maximum value of a specified field for all items in the grouping. */
|
|
3033
|
+
max?: Max;
|
|
3034
|
+
/** Calculate the sum of values of a specified field for all items in the grouping. */
|
|
3035
|
+
sum?: Sum;
|
|
3036
|
+
/** Calculate the number of items in the grouping. */
|
|
3037
|
+
itemCount?: Count;
|
|
3038
|
+
/** Name of the field containing results of the operation. */
|
|
3039
|
+
resultFieldName?: string;
|
|
3040
|
+
}
|
|
3041
|
+
/** @oneof */
|
|
3042
|
+
interface OperationCalculateOneOf {
|
|
3043
|
+
/** Calculate the average value of a specified field for all items in the grouping. */
|
|
3044
|
+
average?: Average;
|
|
3045
|
+
/** Calculate the minimum value of a specified field for all items in the grouping. */
|
|
3046
|
+
min?: Min;
|
|
3047
|
+
/** Calculate the maximum value of a specified field for all items in the grouping. */
|
|
3048
|
+
max?: Max;
|
|
3049
|
+
/** Calculate the sum of values of a specified field for all items in the grouping. */
|
|
3050
|
+
sum?: Sum;
|
|
3051
|
+
/** Calculate the number of items in the grouping. */
|
|
3052
|
+
itemCount?: Count;
|
|
3053
|
+
}
|
|
3054
|
+
interface Aggregation {
|
|
3055
|
+
/** Fields by which to group items for the aggregation. If empty, the aggregation is carried out on all items in the collection. */
|
|
3056
|
+
groupingFields?: string[];
|
|
3057
|
+
/** Operations to carry out on the data in each grouping. */
|
|
3058
|
+
operations?: Operation[];
|
|
3059
|
+
}
|
|
3060
|
+
interface AggregateDataItemsResponse {
|
|
3061
|
+
/** Aggregation results. */
|
|
3062
|
+
results?: Record<string, any>[] | null;
|
|
3063
|
+
/** Paging information. */
|
|
3064
|
+
pagingMetadata?: PagingMetadataV2;
|
|
3065
|
+
}
|
|
3066
|
+
interface CountDataItemsRequest {
|
|
3067
|
+
/** ID of the collection for which to count query results. */
|
|
3068
|
+
dataCollectionId: string;
|
|
3069
|
+
/**
|
|
3070
|
+
* Filter object in the following format:
|
|
3071
|
+
*
|
|
3072
|
+
* `"filter" : {
|
|
3073
|
+
* "fieldName1": "value1",
|
|
3074
|
+
* "fieldName2":{"$operator":"value2"}
|
|
3075
|
+
* }`.
|
|
3076
|
+
*
|
|
3077
|
+
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
3078
|
+
*/
|
|
3079
|
+
filter?: Record<string, any> | null;
|
|
3080
|
+
/**
|
|
3081
|
+
* Whether to retrieve data from the primary database instance.
|
|
3082
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3083
|
+
*
|
|
3084
|
+
* Default: `false`
|
|
3085
|
+
*/
|
|
3086
|
+
consistentRead?: boolean;
|
|
3087
|
+
/**
|
|
3088
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3089
|
+
* If provided, the result text is returned in the specified language.
|
|
3090
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3091
|
+
*
|
|
3092
|
+
* If not provided, result text is not translated.
|
|
3093
|
+
*/
|
|
3094
|
+
language?: string | null;
|
|
3095
|
+
}
|
|
3096
|
+
interface CountDataItemsResponse {
|
|
3097
|
+
/** Number of items matching the query. */
|
|
3098
|
+
totalCount?: number;
|
|
3099
|
+
}
|
|
3100
|
+
interface QueryDistinctValuesRequest extends QueryDistinctValuesRequestPagingMethodOneOf {
|
|
3101
|
+
/** Paging options to limit and skip the number of items. */
|
|
3102
|
+
paging?: Paging$1;
|
|
3103
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
3104
|
+
cursorPaging?: CursorPaging;
|
|
3105
|
+
/** ID of the collection to query. */
|
|
3106
|
+
dataCollectionId: string;
|
|
3107
|
+
/** Item field name for which to return all distinct values. */
|
|
3108
|
+
fieldName?: string;
|
|
3109
|
+
/**
|
|
3110
|
+
* Filter object in the following format:
|
|
3111
|
+
*
|
|
3112
|
+
* `"filter" : {
|
|
3113
|
+
* "fieldName1": "value1",
|
|
3114
|
+
* "fieldName2":{"$operator":"value2"}
|
|
3115
|
+
* }`.
|
|
3116
|
+
*
|
|
3117
|
+
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
3118
|
+
*/
|
|
3119
|
+
filter?: Record<string, any> | null;
|
|
3120
|
+
/**
|
|
3121
|
+
* Sort order.
|
|
3122
|
+
*
|
|
3123
|
+
* Supported values: `ASC`, `DESC`.
|
|
3124
|
+
*/
|
|
3125
|
+
order?: SortOrder;
|
|
3126
|
+
/**
|
|
3127
|
+
* Whether to return the total count in the response for a query with offset paging.
|
|
3128
|
+
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
3129
|
+
*
|
|
3130
|
+
* Default: `false`
|
|
3131
|
+
*/
|
|
3132
|
+
returnTotalCount?: boolean;
|
|
3133
|
+
/**
|
|
3134
|
+
* Whether to retrieve data from the primary database instance.
|
|
3135
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3136
|
+
*
|
|
3137
|
+
* Default: `false`
|
|
3138
|
+
*/
|
|
3139
|
+
consistentRead?: boolean;
|
|
3140
|
+
/**
|
|
3141
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3142
|
+
* If provided, the result text is returned in the specified language.
|
|
3143
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3144
|
+
*
|
|
3145
|
+
* If not provided, result text is not translated.
|
|
3146
|
+
*/
|
|
3147
|
+
language?: string | null;
|
|
3148
|
+
}
|
|
3149
|
+
/** @oneof */
|
|
3150
|
+
interface QueryDistinctValuesRequestPagingMethodOneOf {
|
|
3151
|
+
/** Paging options to limit and skip the number of items. */
|
|
3152
|
+
paging?: Paging$1;
|
|
3153
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
3154
|
+
cursorPaging?: CursorPaging;
|
|
3155
|
+
}
|
|
3156
|
+
interface QueryDistinctValuesResponse {
|
|
3157
|
+
/** List of distinct values contained in the field specified in `fieldName`. */
|
|
3158
|
+
distinctValues?: any[];
|
|
3159
|
+
/** Paging information. */
|
|
3160
|
+
pagingMetadata?: PagingMetadataV2;
|
|
3161
|
+
}
|
|
3162
|
+
interface BulkInsertDataItemsRequest {
|
|
3163
|
+
/** ID of the collection in which to insert the items. */
|
|
3164
|
+
dataCollectionId: string;
|
|
3165
|
+
/** Data items to insert. */
|
|
3166
|
+
dataItems: DataItem[];
|
|
3167
|
+
/**
|
|
3168
|
+
* Whether to return the inserted data items.
|
|
3169
|
+
* When `true`, the `results` objects contain a `dataItem` field.
|
|
3170
|
+
*
|
|
3171
|
+
* Default: `false`
|
|
3172
|
+
*/
|
|
3173
|
+
returnEntity?: boolean;
|
|
3174
|
+
}
|
|
3175
|
+
interface BulkInsertDataItemsResponse {
|
|
3176
|
+
/** Information about the inserted items. */
|
|
3177
|
+
results?: BulkDataItemResult[];
|
|
3178
|
+
/** Bulk action metadata. */
|
|
3179
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
3180
|
+
}
|
|
3181
|
+
interface BulkUpdateDataItemsRequest {
|
|
3182
|
+
/** ID of the collection in which to update items. */
|
|
3183
|
+
dataCollectionId: string;
|
|
3184
|
+
/** Data items to update. */
|
|
3185
|
+
dataItems: DataItem[];
|
|
3186
|
+
/**
|
|
3187
|
+
* Whether to return the updated data items.
|
|
3188
|
+
* When `true`, the `results` objects contain a `dataItem` field.
|
|
3189
|
+
*
|
|
3190
|
+
* Default: `false`
|
|
3191
|
+
*/
|
|
3192
|
+
returnEntity?: boolean;
|
|
3193
|
+
}
|
|
3194
|
+
interface BulkUpdateDataItemsResponse {
|
|
3195
|
+
/** Information about the updated items. */
|
|
3196
|
+
results?: BulkDataItemResult[];
|
|
3197
|
+
/** Bulk action metadata. */
|
|
3198
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
3199
|
+
}
|
|
3200
|
+
interface BulkSaveDataItemsRequest {
|
|
3201
|
+
/** ID of the collection in which to insert or update the items. */
|
|
3202
|
+
dataCollectionId: string;
|
|
3203
|
+
/** Data items to insert or update. */
|
|
3204
|
+
dataItems: DataItem[];
|
|
3205
|
+
/**
|
|
3206
|
+
* Whether to return the saved data item.
|
|
3207
|
+
* When `true`, the `results` objects contain a `dataItem` field.
|
|
3208
|
+
*
|
|
3209
|
+
* Default: `false`
|
|
3210
|
+
*/
|
|
3211
|
+
returnEntity?: boolean;
|
|
3212
|
+
}
|
|
3213
|
+
interface BulkSaveDataItemsResponse {
|
|
3214
|
+
/** Information about the saved items. */
|
|
3215
|
+
results?: BulkDataItemResult[];
|
|
3216
|
+
/** Bulk action metadata. */
|
|
3217
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
3218
|
+
}
|
|
3219
|
+
interface BulkRemoveDataItemsRequest {
|
|
3220
|
+
/** ID of the collection from which to remove the item. */
|
|
3221
|
+
dataCollectionId: string;
|
|
3222
|
+
/** IDs of data items to remove. */
|
|
3223
|
+
dataItemIds: string[];
|
|
3224
|
+
}
|
|
3225
|
+
interface BulkRemoveDataItemsResponse {
|
|
3226
|
+
/** Information about the removed data items. */
|
|
3227
|
+
results?: BulkDataItemResult[];
|
|
3228
|
+
/** Bulk action metadata. */
|
|
3229
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
3230
|
+
}
|
|
3231
|
+
interface QueryReferencedDataItemsRequest extends QueryReferencedDataItemsRequestPagingMethodOneOf {
|
|
3232
|
+
/** Paging options to limit and skip the number of items. */
|
|
3233
|
+
paging?: Paging$1;
|
|
3234
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
3235
|
+
cursorPaging?: CursorPaging;
|
|
3236
|
+
/** ID of the collection containing the referring item. */
|
|
3237
|
+
dataCollectionId: string;
|
|
3238
|
+
/** ID of the referring item. */
|
|
3239
|
+
referringItemId?: string;
|
|
3240
|
+
/** Field containing references in the referring item. */
|
|
3241
|
+
referringItemFieldName?: string;
|
|
3242
|
+
/** Order of the returned referenced items. Sorted by the date each item was referenced. */
|
|
3243
|
+
order?: SortOrder;
|
|
3244
|
+
/**
|
|
3245
|
+
* Whether to return the total count in the response.
|
|
3246
|
+
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
3247
|
+
*
|
|
3248
|
+
* Default: `false`
|
|
3249
|
+
*/
|
|
3250
|
+
returnTotalCount?: boolean;
|
|
3251
|
+
/**
|
|
3252
|
+
* Whether to retrieve data from the primary database instance.
|
|
3253
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3254
|
+
*
|
|
3255
|
+
* Default: `false`
|
|
3256
|
+
*/
|
|
3257
|
+
consistentRead?: boolean;
|
|
3258
|
+
/**
|
|
3259
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3260
|
+
* If provided, the result text is returned in the specified language.
|
|
3261
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3262
|
+
*
|
|
3263
|
+
* If not provided, result text is not translated.
|
|
3264
|
+
*/
|
|
3265
|
+
language?: string | null;
|
|
3266
|
+
/**
|
|
3267
|
+
* Fields to return for each referenced item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
3268
|
+
* **Note:** The `_id` system field is always returned.
|
|
3269
|
+
*/
|
|
3270
|
+
fields?: string[];
|
|
3271
|
+
}
|
|
3272
|
+
/** @oneof */
|
|
3273
|
+
interface QueryReferencedDataItemsRequestPagingMethodOneOf {
|
|
3274
|
+
/** Paging options to limit and skip the number of items. */
|
|
3275
|
+
paging?: Paging$1;
|
|
3276
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
3277
|
+
cursorPaging?: CursorPaging;
|
|
3278
|
+
}
|
|
3279
|
+
interface QueryReferencedDataItemsResponse {
|
|
3280
|
+
/** Referenced items and/or IDs. For successfully resolved references, the referenced data item is returned. For references that can't be resolved, the ID is returned. */
|
|
3281
|
+
results?: ReferencedResult[];
|
|
3282
|
+
/** Paging information. */
|
|
3283
|
+
pagingMetadata?: PagingMetadataV2;
|
|
3284
|
+
}
|
|
3285
|
+
interface UnresolvedReference {
|
|
3286
|
+
/** ID of the referring item. */
|
|
3287
|
+
referringItemId?: string;
|
|
3288
|
+
/** Field specified to query for references. */
|
|
3289
|
+
referringItemFieldName?: string;
|
|
3290
|
+
}
|
|
3291
|
+
interface ReferencedResult extends ReferencedResultEntityOneOf {
|
|
3292
|
+
/** Data item referenced. */
|
|
3293
|
+
dataItem?: DataItem;
|
|
3294
|
+
/** Unresolved reference. Appears instead of the data item when the reference doesn't resolve, for example, when an ID isn't found or if an item is in draft state. */
|
|
3295
|
+
unresolvedReference?: UnresolvedReference;
|
|
3296
|
+
}
|
|
3297
|
+
/** @oneof */
|
|
3298
|
+
interface ReferencedResultEntityOneOf {
|
|
3299
|
+
/** Data item referenced. */
|
|
3300
|
+
dataItem?: DataItem;
|
|
3301
|
+
/** Unresolved reference. Appears instead of the data item when the reference doesn't resolve, for example, when an ID isn't found or if an item is in draft state. */
|
|
3302
|
+
unresolvedReference?: UnresolvedReference;
|
|
3303
|
+
}
|
|
3304
|
+
interface IsReferencedDataItemRequest {
|
|
3305
|
+
/** ID of the collection containing the referring data item. */
|
|
3306
|
+
dataCollectionId: string;
|
|
3307
|
+
/** Field to check for a reference to the item that may be referenced. */
|
|
3308
|
+
referringItemFieldName: string;
|
|
3309
|
+
/** ID of the referring item. */
|
|
3310
|
+
referringItemId: string;
|
|
3311
|
+
/** ID of the item that may be referenced. */
|
|
3312
|
+
referencedItemId: string;
|
|
3313
|
+
/**
|
|
3314
|
+
* Whether to retrieve data from the primary database instance.
|
|
3315
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3316
|
+
*
|
|
3317
|
+
* Default: `false`
|
|
3318
|
+
*/
|
|
3319
|
+
consistentRead?: boolean;
|
|
3320
|
+
}
|
|
3321
|
+
interface IsReferencedDataItemResponse {
|
|
3322
|
+
/** Whether the specified reference exists. */
|
|
3323
|
+
isReferenced?: boolean;
|
|
3324
|
+
}
|
|
3325
|
+
interface InsertDataItemReferenceRequest {
|
|
3326
|
+
/** ID of the collection in which to insert the reference. */
|
|
3327
|
+
dataCollectionId: string;
|
|
3328
|
+
/** Reference to insert */
|
|
3329
|
+
dataItemReference?: DataItemReference;
|
|
3330
|
+
}
|
|
3331
|
+
interface DataItemReference {
|
|
3332
|
+
/** Referring item field containing the references to the referenced items. */
|
|
3333
|
+
referringItemFieldName?: string;
|
|
3334
|
+
/** ID of the referring item. */
|
|
3335
|
+
referringItemId?: string;
|
|
3336
|
+
/** ID of the referenced item. */
|
|
3337
|
+
referencedItemId?: string;
|
|
3338
|
+
}
|
|
3339
|
+
interface InsertDataItemReferenceResponse {
|
|
3340
|
+
/** Inserted reference. */
|
|
3341
|
+
dataItemReference?: DataItemReference;
|
|
3342
|
+
}
|
|
3343
|
+
interface RemoveDataItemReferenceRequest {
|
|
3344
|
+
/** ID of the collection containing the referring item. */
|
|
3345
|
+
dataCollectionId: string;
|
|
3346
|
+
/** Reference to remove. */
|
|
3347
|
+
dataItemReference: DataItemReference;
|
|
3348
|
+
}
|
|
3349
|
+
interface RemoveDataItemReferenceResponse {
|
|
3350
|
+
/** Removed reference. */
|
|
3351
|
+
dataItemReference?: DataItemReference;
|
|
3352
|
+
}
|
|
3353
|
+
interface BulkInsertDataItemReferencesRequest {
|
|
3354
|
+
/** ID of the collection containing the referring items. */
|
|
3355
|
+
dataCollectionId: string;
|
|
3356
|
+
/** References to insert. */
|
|
3357
|
+
dataItemReferences: DataItemReference[];
|
|
3358
|
+
/**
|
|
3359
|
+
* Whether to return the inserted data item references.
|
|
3360
|
+
* When `true`, the `results` objects contain a `dataItemReference` field.
|
|
3361
|
+
*
|
|
3362
|
+
* Default: `false`
|
|
3363
|
+
*/
|
|
3364
|
+
returnEntity?: boolean;
|
|
3365
|
+
}
|
|
3366
|
+
interface BulkInsertDataItemReferencesResponse {
|
|
3367
|
+
/** Information about the inserted references. */
|
|
3368
|
+
results?: BulkDataItemReferenceResult[];
|
|
3369
|
+
/** Bulk action metadata. */
|
|
3370
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
3371
|
+
}
|
|
3372
|
+
interface BulkDataItemReferenceResult {
|
|
3373
|
+
/**
|
|
3374
|
+
* The action attempted for the reference.
|
|
3375
|
+
*
|
|
3376
|
+
* Supported values: `UNKNOWN_ACTION_TYPE`, `INSERT`, `UPDATE`, `DELETE`.
|
|
3377
|
+
*/
|
|
3378
|
+
action?: BulkActionType;
|
|
3379
|
+
/** Metadata related to the reference for which the action was attempted. */
|
|
3380
|
+
referenceMetadata?: ItemMetadata;
|
|
3381
|
+
/** The reference for which the action was attempted. Only returned if `returnEntity` is `true` in the request and the action is successful. */
|
|
3382
|
+
dataItemReference?: DataItemReference;
|
|
3383
|
+
}
|
|
3384
|
+
interface BulkRemoveDataItemReferencesRequest {
|
|
3385
|
+
/** ID of the collection containing the referring items. */
|
|
3386
|
+
dataCollectionId: string;
|
|
3387
|
+
/** References to remove. */
|
|
3388
|
+
dataItemReferences: DataItemReference[];
|
|
3389
|
+
}
|
|
3390
|
+
interface BulkRemoveDataItemReferencesResponse {
|
|
3391
|
+
/** Information about the removed references. */
|
|
3392
|
+
results?: BulkDataItemReferenceResult[];
|
|
3393
|
+
/** Bulk action metadata. */
|
|
3394
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
3395
|
+
}
|
|
3396
|
+
interface ReplaceDataItemReferencesRequest {
|
|
3397
|
+
/** ID of the collection containing the referring item. */
|
|
3398
|
+
dataCollectionId: string;
|
|
3399
|
+
/** Field containing references in the referring item. */
|
|
3400
|
+
referringItemFieldName: string;
|
|
3401
|
+
/** ID of the referring item. */
|
|
3402
|
+
referringItemId: string;
|
|
3403
|
+
/** List of new referenced item IDs to replace the existing ones. */
|
|
3404
|
+
newReferencedItemIds?: string[];
|
|
3405
|
+
}
|
|
3406
|
+
interface ReplaceDataItemReferencesResponse {
|
|
3407
|
+
/** Updated references. */
|
|
3408
|
+
dataItemReferences?: DataItemReference[];
|
|
3409
|
+
}
|
|
3410
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
3411
|
+
createdEvent?: EntityCreatedEvent;
|
|
3412
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
3413
|
+
deletedEvent?: EntityDeletedEvent;
|
|
3414
|
+
actionEvent?: ActionEvent;
|
|
3415
|
+
/**
|
|
3416
|
+
* Unique event ID.
|
|
3417
|
+
* Allows clients to ignore duplicate webhooks.
|
|
3418
|
+
*/
|
|
3419
|
+
_id?: string;
|
|
3420
|
+
/**
|
|
3421
|
+
* Assumes actions are also always typed to an entity_type
|
|
3422
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
3423
|
+
*/
|
|
3424
|
+
entityFqdn?: string;
|
|
3425
|
+
/**
|
|
3426
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
3427
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
3428
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
3429
|
+
*/
|
|
3430
|
+
slug?: string;
|
|
3431
|
+
/** ID of the entity associated with the event. */
|
|
3432
|
+
entityId?: string;
|
|
3433
|
+
/** Event timestamp. */
|
|
3434
|
+
eventTime?: Date;
|
|
3435
|
+
/**
|
|
3436
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
3437
|
+
* (for example, GDPR).
|
|
3438
|
+
*/
|
|
3439
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
3440
|
+
/** If present, indicates the action that triggered the event. */
|
|
3441
|
+
originatedFrom?: string | null;
|
|
3442
|
+
/**
|
|
3443
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
3444
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
3445
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
3446
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
3447
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
3448
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
3449
|
+
*/
|
|
3450
|
+
entityEventSequence?: string | null;
|
|
3451
|
+
}
|
|
3452
|
+
/** @oneof */
|
|
3453
|
+
interface DomainEventBodyOneOf {
|
|
3454
|
+
createdEvent?: EntityCreatedEvent;
|
|
3455
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
3456
|
+
deletedEvent?: EntityDeletedEvent;
|
|
3457
|
+
actionEvent?: ActionEvent;
|
|
3458
|
+
}
|
|
3459
|
+
interface EntityCreatedEvent {
|
|
3460
|
+
entity?: string;
|
|
3461
|
+
}
|
|
3462
|
+
interface EntityUpdatedEvent {
|
|
3463
|
+
/**
|
|
3464
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
3465
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
3466
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
3467
|
+
*/
|
|
3468
|
+
currentEntity?: string;
|
|
3469
|
+
}
|
|
3470
|
+
interface EntityDeletedEvent {
|
|
3471
|
+
/** Entity that was deleted */
|
|
3472
|
+
deletedEntity?: string | null;
|
|
3473
|
+
}
|
|
3474
|
+
interface ActionEvent {
|
|
3475
|
+
body?: string;
|
|
3476
|
+
}
|
|
3477
|
+
interface MessageEnvelope {
|
|
3478
|
+
/** App instance ID. */
|
|
3479
|
+
instanceId?: string | null;
|
|
3480
|
+
/** Event type. */
|
|
3481
|
+
eventType?: string;
|
|
3482
|
+
/** The identification type and identity data. */
|
|
3483
|
+
identity?: IdentificationData;
|
|
3484
|
+
/** Stringify payload. */
|
|
3485
|
+
data?: string;
|
|
3486
|
+
}
|
|
3487
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
3488
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
3489
|
+
anonymousVisitorId?: string;
|
|
3490
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
3491
|
+
memberId?: string;
|
|
3492
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
3493
|
+
wixUserId?: string;
|
|
3494
|
+
/** ID of an app. */
|
|
3495
|
+
appId?: string;
|
|
3496
|
+
/** @readonly */
|
|
3497
|
+
identityType?: WebhookIdentityType;
|
|
3498
|
+
}
|
|
3499
|
+
/** @oneof */
|
|
3500
|
+
interface IdentificationDataIdOneOf {
|
|
3501
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
3502
|
+
anonymousVisitorId?: string;
|
|
3503
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
3504
|
+
memberId?: string;
|
|
3505
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
3506
|
+
wixUserId?: string;
|
|
3507
|
+
/** ID of an app. */
|
|
3508
|
+
appId?: string;
|
|
3509
|
+
}
|
|
3510
|
+
declare enum WebhookIdentityType {
|
|
3511
|
+
UNKNOWN = "UNKNOWN",
|
|
3512
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
3513
|
+
MEMBER = "MEMBER",
|
|
3514
|
+
WIX_USER = "WIX_USER",
|
|
3515
|
+
APP = "APP"
|
|
3516
|
+
}
|
|
3517
|
+
interface InsertDataItemResponseNonNullableFields {
|
|
3518
|
+
dataItem?: {
|
|
3519
|
+
_id: string;
|
|
3520
|
+
dataCollectionId: string;
|
|
3521
|
+
};
|
|
3522
|
+
}
|
|
3523
|
+
interface UpdateDataItemResponseNonNullableFields {
|
|
3524
|
+
dataItem?: {
|
|
3525
|
+
_id: string;
|
|
3526
|
+
dataCollectionId: string;
|
|
3527
|
+
};
|
|
3528
|
+
}
|
|
3529
|
+
interface SaveDataItemResponseNonNullableFields {
|
|
3530
|
+
action: Action;
|
|
3531
|
+
dataItem?: {
|
|
3532
|
+
_id: string;
|
|
3533
|
+
dataCollectionId: string;
|
|
3534
|
+
};
|
|
3535
|
+
}
|
|
3536
|
+
interface GetDataItemResponseNonNullableFields {
|
|
3537
|
+
dataItem?: {
|
|
3538
|
+
_id: string;
|
|
3539
|
+
dataCollectionId: string;
|
|
3540
|
+
};
|
|
3541
|
+
}
|
|
3542
|
+
interface RemoveDataItemResponseNonNullableFields {
|
|
3543
|
+
dataItem?: {
|
|
3544
|
+
_id: string;
|
|
3545
|
+
dataCollectionId: string;
|
|
3546
|
+
};
|
|
3547
|
+
}
|
|
3548
|
+
interface QueryDataItemsResponseNonNullableFields {
|
|
3549
|
+
dataItems: {
|
|
3550
|
+
_id: string;
|
|
3551
|
+
dataCollectionId: string;
|
|
3552
|
+
}[];
|
|
3553
|
+
}
|
|
3554
|
+
interface CountDataItemsResponseNonNullableFields {
|
|
3555
|
+
totalCount: number;
|
|
3556
|
+
}
|
|
3557
|
+
interface BulkInsertDataItemsResponseNonNullableFields {
|
|
3558
|
+
results: {
|
|
3559
|
+
action: BulkActionType;
|
|
3560
|
+
itemMetadata?: {
|
|
3561
|
+
originalIndex: number;
|
|
3562
|
+
success: boolean;
|
|
3563
|
+
error?: {
|
|
3564
|
+
code: string;
|
|
3565
|
+
description: string;
|
|
3566
|
+
};
|
|
3567
|
+
};
|
|
3568
|
+
dataItem?: {
|
|
3569
|
+
_id: string;
|
|
3570
|
+
dataCollectionId: string;
|
|
3571
|
+
};
|
|
3572
|
+
}[];
|
|
3573
|
+
bulkActionMetadata?: {
|
|
3574
|
+
totalSuccesses: number;
|
|
3575
|
+
totalFailures: number;
|
|
3576
|
+
};
|
|
3577
|
+
}
|
|
3578
|
+
interface BulkUpdateDataItemsResponseNonNullableFields {
|
|
3579
|
+
results: {
|
|
3580
|
+
action: BulkActionType;
|
|
3581
|
+
itemMetadata?: {
|
|
3582
|
+
originalIndex: number;
|
|
3583
|
+
success: boolean;
|
|
3584
|
+
error?: {
|
|
3585
|
+
code: string;
|
|
3586
|
+
description: string;
|
|
3587
|
+
};
|
|
3588
|
+
};
|
|
3589
|
+
dataItem?: {
|
|
3590
|
+
_id: string;
|
|
3591
|
+
dataCollectionId: string;
|
|
3592
|
+
};
|
|
3593
|
+
}[];
|
|
3594
|
+
bulkActionMetadata?: {
|
|
3595
|
+
totalSuccesses: number;
|
|
3596
|
+
totalFailures: number;
|
|
3597
|
+
};
|
|
3598
|
+
}
|
|
3599
|
+
interface BulkSaveDataItemsResponseNonNullableFields {
|
|
3600
|
+
results: {
|
|
3601
|
+
action: BulkActionType;
|
|
3602
|
+
itemMetadata?: {
|
|
3603
|
+
originalIndex: number;
|
|
3604
|
+
success: boolean;
|
|
3605
|
+
error?: {
|
|
3606
|
+
code: string;
|
|
3607
|
+
description: string;
|
|
3608
|
+
};
|
|
3609
|
+
};
|
|
3610
|
+
dataItem?: {
|
|
3611
|
+
_id: string;
|
|
3612
|
+
dataCollectionId: string;
|
|
3613
|
+
};
|
|
3614
|
+
}[];
|
|
3615
|
+
bulkActionMetadata?: {
|
|
3616
|
+
totalSuccesses: number;
|
|
3617
|
+
totalFailures: number;
|
|
3618
|
+
};
|
|
3619
|
+
}
|
|
3620
|
+
interface BulkRemoveDataItemsResponseNonNullableFields {
|
|
3621
|
+
results: {
|
|
3622
|
+
action: BulkActionType;
|
|
3623
|
+
itemMetadata?: {
|
|
3624
|
+
originalIndex: number;
|
|
3625
|
+
success: boolean;
|
|
3626
|
+
error?: {
|
|
3627
|
+
code: string;
|
|
3628
|
+
description: string;
|
|
3629
|
+
};
|
|
3630
|
+
};
|
|
3631
|
+
dataItem?: {
|
|
3632
|
+
_id: string;
|
|
3633
|
+
dataCollectionId: string;
|
|
3634
|
+
};
|
|
3635
|
+
}[];
|
|
3636
|
+
bulkActionMetadata?: {
|
|
3637
|
+
totalSuccesses: number;
|
|
3638
|
+
totalFailures: number;
|
|
3639
|
+
};
|
|
3640
|
+
}
|
|
3641
|
+
interface QueryReferencedDataItemsResponseNonNullableFields {
|
|
3642
|
+
results: {
|
|
3643
|
+
dataItem?: {
|
|
3644
|
+
_id: string;
|
|
3645
|
+
dataCollectionId: string;
|
|
3646
|
+
};
|
|
3647
|
+
unresolvedReference?: {
|
|
3648
|
+
referringItemId: string;
|
|
3649
|
+
referringItemFieldName: string;
|
|
3650
|
+
};
|
|
3651
|
+
}[];
|
|
3652
|
+
}
|
|
3653
|
+
interface IsReferencedDataItemResponseNonNullableFields {
|
|
3654
|
+
isReferenced: boolean;
|
|
3655
|
+
}
|
|
3656
|
+
interface InsertDataItemReferenceResponseNonNullableFields {
|
|
3657
|
+
dataItemReference?: {
|
|
3658
|
+
referringItemFieldName: string;
|
|
3659
|
+
referringItemId: string;
|
|
3660
|
+
referencedItemId: string;
|
|
3661
|
+
};
|
|
3662
|
+
}
|
|
3663
|
+
interface RemoveDataItemReferenceResponseNonNullableFields {
|
|
3664
|
+
dataItemReference?: {
|
|
3665
|
+
referringItemFieldName: string;
|
|
3666
|
+
referringItemId: string;
|
|
3667
|
+
referencedItemId: string;
|
|
3668
|
+
};
|
|
3669
|
+
}
|
|
3670
|
+
interface BulkInsertDataItemReferencesResponseNonNullableFields {
|
|
3671
|
+
results: {
|
|
3672
|
+
action: BulkActionType;
|
|
3673
|
+
referenceMetadata?: {
|
|
3674
|
+
originalIndex: number;
|
|
3675
|
+
success: boolean;
|
|
3676
|
+
error?: {
|
|
3677
|
+
code: string;
|
|
3678
|
+
description: string;
|
|
3679
|
+
};
|
|
3680
|
+
};
|
|
3681
|
+
dataItemReference?: {
|
|
3682
|
+
referringItemFieldName: string;
|
|
3683
|
+
referringItemId: string;
|
|
3684
|
+
referencedItemId: string;
|
|
3685
|
+
};
|
|
3686
|
+
}[];
|
|
3687
|
+
bulkActionMetadata?: {
|
|
3688
|
+
totalSuccesses: number;
|
|
3689
|
+
totalFailures: number;
|
|
3690
|
+
};
|
|
3691
|
+
}
|
|
3692
|
+
interface BulkRemoveDataItemReferencesResponseNonNullableFields {
|
|
3693
|
+
results: {
|
|
3694
|
+
action: BulkActionType;
|
|
3695
|
+
referenceMetadata?: {
|
|
3696
|
+
originalIndex: number;
|
|
3697
|
+
success: boolean;
|
|
3698
|
+
error?: {
|
|
3699
|
+
code: string;
|
|
3700
|
+
description: string;
|
|
3701
|
+
};
|
|
3702
|
+
};
|
|
3703
|
+
dataItemReference?: {
|
|
3704
|
+
referringItemFieldName: string;
|
|
3705
|
+
referringItemId: string;
|
|
3706
|
+
referencedItemId: string;
|
|
3707
|
+
};
|
|
3708
|
+
}[];
|
|
3709
|
+
bulkActionMetadata?: {
|
|
3710
|
+
totalSuccesses: number;
|
|
3711
|
+
totalFailures: number;
|
|
3712
|
+
};
|
|
3713
|
+
}
|
|
3714
|
+
interface ReplaceDataItemReferencesResponseNonNullableFields {
|
|
3715
|
+
dataItemReferences: {
|
|
3716
|
+
referringItemFieldName: string;
|
|
3717
|
+
referringItemId: string;
|
|
3718
|
+
referencedItemId: string;
|
|
3719
|
+
}[];
|
|
3720
|
+
}
|
|
3721
|
+
interface BaseEventMetadata {
|
|
3722
|
+
/** App instance ID. */
|
|
3723
|
+
instanceId?: string | null;
|
|
3724
|
+
/** Event type. */
|
|
3725
|
+
eventType?: string;
|
|
3726
|
+
/** The identification type and identity data. */
|
|
3727
|
+
identity?: IdentificationData;
|
|
3728
|
+
}
|
|
3729
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
3730
|
+
/**
|
|
3731
|
+
* Unique event ID.
|
|
3732
|
+
* Allows clients to ignore duplicate webhooks.
|
|
3733
|
+
*/
|
|
3734
|
+
_id?: string;
|
|
3735
|
+
/**
|
|
3736
|
+
* Assumes actions are also always typed to an entity_type
|
|
3737
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
3738
|
+
*/
|
|
3739
|
+
entityFqdn?: string;
|
|
3740
|
+
/**
|
|
3741
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
3742
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
3743
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
3744
|
+
*/
|
|
3745
|
+
slug?: string;
|
|
3746
|
+
/** ID of the entity associated with the event. */
|
|
3747
|
+
entityId?: string;
|
|
3748
|
+
/** Event timestamp. */
|
|
3749
|
+
eventTime?: Date;
|
|
3750
|
+
/**
|
|
3751
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
3752
|
+
* (for example, GDPR).
|
|
3753
|
+
*/
|
|
3754
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
3755
|
+
/** If present, indicates the action that triggered the event. */
|
|
3756
|
+
originatedFrom?: string | null;
|
|
3757
|
+
/**
|
|
3758
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
3759
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
3760
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
3761
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
3762
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
3763
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
3764
|
+
*/
|
|
3765
|
+
entityEventSequence?: string | null;
|
|
3766
|
+
}
|
|
3767
|
+
interface DataItemCreatedEnvelope {
|
|
3768
|
+
entity: DataItem;
|
|
3769
|
+
metadata: EventMetadata;
|
|
3770
|
+
}
|
|
3771
|
+
interface DataItemUpdatedEnvelope {
|
|
3772
|
+
entity: DataItem;
|
|
3773
|
+
metadata: EventMetadata;
|
|
3774
|
+
}
|
|
3775
|
+
interface DataItemDeletedEnvelope {
|
|
3776
|
+
metadata: EventMetadata;
|
|
3777
|
+
}
|
|
3778
|
+
interface InsertDataItemOptions {
|
|
3779
|
+
/** ID of the collection in which to insert the item. */
|
|
3780
|
+
dataCollectionId: string;
|
|
3781
|
+
/** Item to insert. */
|
|
3782
|
+
dataItem: DataItem;
|
|
3783
|
+
}
|
|
3784
|
+
interface UpdateDataItemOptions {
|
|
3785
|
+
/** Updated data item content. The existing data item's content is replaced entirely. */
|
|
3786
|
+
dataItem: {
|
|
3787
|
+
/** Data item ID. */
|
|
3788
|
+
_id?: string;
|
|
3789
|
+
/**
|
|
3790
|
+
* ID of the collection this item belongs to
|
|
3791
|
+
* @readonly
|
|
3792
|
+
*/
|
|
3793
|
+
dataCollectionId?: string;
|
|
3794
|
+
/**
|
|
3795
|
+
* Data item contents.
|
|
3796
|
+
*
|
|
3797
|
+
* Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:
|
|
3798
|
+
*
|
|
3799
|
+
* + `_id`: Item ID.
|
|
3800
|
+
* + `_createdDate`: Date and time the item was added to the collection.
|
|
3801
|
+
* + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
|
|
3802
|
+
* + `_ownerId`: ID of the user who created the item. Can be modified with site owner permissions.
|
|
3803
|
+
*/
|
|
3804
|
+
data?: Record<string, any> | null;
|
|
3805
|
+
};
|
|
3806
|
+
/** ID of the collection containing the existing item. */
|
|
3807
|
+
dataCollectionId: string;
|
|
3808
|
+
}
|
|
3809
|
+
interface SaveDataItemOptions {
|
|
3810
|
+
/** ID of the collection in which to insert or update the item. */
|
|
3811
|
+
dataCollectionId: string;
|
|
3812
|
+
/** Data item to insert or update. */
|
|
3813
|
+
dataItem: DataItem;
|
|
3814
|
+
}
|
|
3815
|
+
interface GetDataItemOptions {
|
|
3816
|
+
/** ID of the collection from which to retrieve the data item. */
|
|
3817
|
+
dataCollectionId: string;
|
|
3818
|
+
/**
|
|
3819
|
+
* Whether to retrieve data from the primary database instance.
|
|
3820
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3821
|
+
*
|
|
3822
|
+
* Default: `false`
|
|
3823
|
+
*/
|
|
3824
|
+
consistentRead?: boolean;
|
|
3825
|
+
/**
|
|
3826
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3827
|
+
* If provided, the result text is returned in the specified language.
|
|
3828
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3829
|
+
*
|
|
3830
|
+
* If not provided, result text is not translated.
|
|
3831
|
+
*/
|
|
3832
|
+
language?: string | null;
|
|
3833
|
+
/**
|
|
3834
|
+
* Fields to return for the item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
3835
|
+
* **Note:** The `_id` system field is always returned.
|
|
3836
|
+
*/
|
|
3837
|
+
fields?: string[];
|
|
3838
|
+
}
|
|
3839
|
+
interface RemoveDataItemOptions {
|
|
3840
|
+
/** ID of the collection from which to remove the item. */
|
|
3841
|
+
dataCollectionId: string;
|
|
3842
|
+
}
|
|
3843
|
+
interface TruncateDataItemsOptions {
|
|
3844
|
+
/** ID of the collection to truncate. */
|
|
3845
|
+
dataCollectionId: string;
|
|
3846
|
+
}
|
|
3847
|
+
interface QueryDataItemsOptions {
|
|
3848
|
+
/** ID of the collection to query. */
|
|
3849
|
+
dataCollectionId: string;
|
|
3850
|
+
/**
|
|
3851
|
+
* Whether to return the total count in the response for a query with offset paging.
|
|
3852
|
+
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
3853
|
+
*
|
|
3854
|
+
* Default: `false`
|
|
3855
|
+
*/
|
|
3856
|
+
returnTotalCount?: boolean | undefined;
|
|
3857
|
+
/**
|
|
3858
|
+
* Properties for which to include referenced items in the query's results.
|
|
3859
|
+
* Up to 50 referenced items can be included for each item that matches the query.
|
|
3860
|
+
*/
|
|
3861
|
+
includeReferencedItems?: string[] | undefined;
|
|
3862
|
+
/**
|
|
3863
|
+
* Whether to retrieve data from the primary database instance.
|
|
3864
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3865
|
+
*
|
|
3866
|
+
* Default: `false`
|
|
3867
|
+
*/
|
|
3868
|
+
consistentRead?: boolean | undefined;
|
|
3869
|
+
/**
|
|
3870
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3871
|
+
* If provided, the result text is returned in the specified language.
|
|
3872
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3873
|
+
*
|
|
3874
|
+
* If not provided, result text is not translated.
|
|
3875
|
+
*/
|
|
3876
|
+
language?: string | null | undefined;
|
|
3877
|
+
}
|
|
3878
|
+
interface QueryOffsetResult {
|
|
3879
|
+
currentPage: number | undefined;
|
|
3880
|
+
totalPages: number | undefined;
|
|
3881
|
+
totalCount: number | undefined;
|
|
3882
|
+
hasNext: () => boolean;
|
|
3883
|
+
hasPrev: () => boolean;
|
|
3884
|
+
length: number;
|
|
3885
|
+
pageSize: number;
|
|
3886
|
+
}
|
|
3887
|
+
interface DataItemsQueryResult extends QueryOffsetResult {
|
|
3888
|
+
items: DataItem[];
|
|
3889
|
+
query: DataItemsQueryBuilder;
|
|
3890
|
+
next: () => Promise<DataItemsQueryResult>;
|
|
3891
|
+
prev: () => Promise<DataItemsQueryResult>;
|
|
3892
|
+
}
|
|
3893
|
+
interface DataItemsQueryBuilder {
|
|
3894
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
3895
|
+
* @param value - Value to compare against.
|
|
3896
|
+
* @documentationMaturity preview
|
|
3897
|
+
*/
|
|
3898
|
+
eq: (propertyName: '_id' | 'dataCollectionId' | 'data' | string, value: any) => DataItemsQueryBuilder;
|
|
3899
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
3900
|
+
* @param value - Value to compare against.
|
|
3901
|
+
* @documentationMaturity preview
|
|
3902
|
+
*/
|
|
3903
|
+
ne: (propertyName: '_id' | 'dataCollectionId' | 'data' | string, value: any) => DataItemsQueryBuilder;
|
|
3904
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
3905
|
+
* @param string - String to compare against. Case-insensitive.
|
|
3906
|
+
* @documentationMaturity preview
|
|
3907
|
+
*/
|
|
3908
|
+
startsWith: (propertyName: '_id' | 'dataCollectionId' | string, value: string) => DataItemsQueryBuilder;
|
|
3909
|
+
/** @documentationMaturity preview */
|
|
3910
|
+
in: (propertyName: '_id' | 'dataCollectionId' | 'data' | string, value: any) => DataItemsQueryBuilder;
|
|
3911
|
+
/** @documentationMaturity preview */
|
|
3912
|
+
exists: (propertyName: '_id' | 'dataCollectionId' | 'data' | string, value: boolean) => DataItemsQueryBuilder;
|
|
3913
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
3914
|
+
* @documentationMaturity preview
|
|
3915
|
+
*/
|
|
3916
|
+
ascending: (...propertyNames: Array<'_id' | 'dataCollectionId' | 'data' | string>) => DataItemsQueryBuilder;
|
|
3917
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
3918
|
+
* @documentationMaturity preview
|
|
3919
|
+
*/
|
|
3920
|
+
descending: (...propertyNames: Array<'_id' | 'dataCollectionId' | 'data' | string>) => DataItemsQueryBuilder;
|
|
3921
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
3922
|
+
* @documentationMaturity preview
|
|
3923
|
+
*/
|
|
3924
|
+
limit: (limit: number) => DataItemsQueryBuilder;
|
|
3925
|
+
/** @param skip - Number of items to skip in the query results before returning the results.
|
|
3926
|
+
* @documentationMaturity preview
|
|
3927
|
+
*/
|
|
3928
|
+
skip: (skip: number) => DataItemsQueryBuilder;
|
|
3929
|
+
/** @documentationMaturity preview */
|
|
3930
|
+
find: () => Promise<DataItemsQueryResult>;
|
|
3931
|
+
}
|
|
3932
|
+
interface AggregateDataItemsOptions extends AggregateDataItemsRequestPagingMethodOneOf {
|
|
3933
|
+
/** ID of the collection on which to run the aggregation. */
|
|
3934
|
+
dataCollectionId: string;
|
|
3935
|
+
/** Filter applied to the collection's data prior to running the aggregation. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section) for information on how to structure a filter object. */
|
|
3936
|
+
initialFilter?: Record<string, any> | null;
|
|
3937
|
+
/** Aggregation applied to the data. */
|
|
3938
|
+
aggregation?: Aggregation;
|
|
3939
|
+
/** Filter applied to the processed data following the aggregation. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section) for information on how to structure a filter object. */
|
|
3940
|
+
finalFilter?: Record<string, any> | null;
|
|
3941
|
+
/** Paging options to limit and skip the number of items. */
|
|
3942
|
+
paging?: Paging$1;
|
|
3943
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
3944
|
+
cursorPaging?: CursorPaging;
|
|
3945
|
+
/**
|
|
3946
|
+
* Sort object in the following format:
|
|
3947
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
3948
|
+
*/
|
|
3949
|
+
sort?: Sorting[];
|
|
3950
|
+
/**
|
|
3951
|
+
* Whether to return the total count in the response for a query with offset paging.
|
|
3952
|
+
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
3953
|
+
*
|
|
3954
|
+
* Default: `false`
|
|
3955
|
+
*/
|
|
3956
|
+
returnTotalCount?: boolean;
|
|
3957
|
+
/**
|
|
3958
|
+
* Whether to retrieve data from the primary database instance.
|
|
3959
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3960
|
+
*
|
|
3961
|
+
* Default: `false`
|
|
3962
|
+
*/
|
|
3963
|
+
consistentRead?: boolean;
|
|
3964
|
+
/**
|
|
3965
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3966
|
+
* If provided, the result text is returned in the specified language.
|
|
3967
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3968
|
+
*
|
|
3969
|
+
* If not provided, result text is not translated.
|
|
3970
|
+
*/
|
|
3971
|
+
language?: string | null;
|
|
3972
|
+
}
|
|
3973
|
+
interface CountDataItemsOptions {
|
|
3974
|
+
/** ID of the collection for which to count query results. */
|
|
3975
|
+
dataCollectionId: string;
|
|
3976
|
+
/**
|
|
3977
|
+
* Filter object in the following format:
|
|
3978
|
+
*
|
|
3979
|
+
* `"filter" : {
|
|
3980
|
+
* "fieldName1": "value1",
|
|
3981
|
+
* "fieldName2":{"$operator":"value2"}
|
|
3982
|
+
* }`.
|
|
3983
|
+
*
|
|
3984
|
+
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
3985
|
+
*/
|
|
3986
|
+
filter?: Record<string, any> | null;
|
|
3987
|
+
/**
|
|
3988
|
+
* Whether to retrieve data from the primary database instance.
|
|
3989
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3990
|
+
*
|
|
3991
|
+
* Default: `false`
|
|
3992
|
+
*/
|
|
3993
|
+
consistentRead?: boolean;
|
|
3994
|
+
/**
|
|
3995
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3996
|
+
* If provided, the result text is returned in the specified language.
|
|
3997
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3998
|
+
*
|
|
3999
|
+
* If not provided, result text is not translated.
|
|
4000
|
+
*/
|
|
4001
|
+
language?: string | null;
|
|
4002
|
+
}
|
|
4003
|
+
interface QueryDistinctValuesOptions extends QueryDistinctValuesRequestPagingMethodOneOf {
|
|
4004
|
+
/** ID of the collection to query. */
|
|
4005
|
+
dataCollectionId: string;
|
|
4006
|
+
/** Item field name for which to return all distinct values. */
|
|
4007
|
+
fieldName?: string;
|
|
4008
|
+
/**
|
|
4009
|
+
* Filter object in the following format:
|
|
4010
|
+
*
|
|
4011
|
+
* `"filter" : {
|
|
4012
|
+
* "fieldName1": "value1",
|
|
4013
|
+
* "fieldName2":{"$operator":"value2"}
|
|
4014
|
+
* }`.
|
|
4015
|
+
*
|
|
4016
|
+
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
4017
|
+
*/
|
|
4018
|
+
filter?: Record<string, any> | null;
|
|
4019
|
+
/**
|
|
4020
|
+
* Sort order.
|
|
4021
|
+
*
|
|
4022
|
+
* Supported values: `ASC`, `DESC`.
|
|
4023
|
+
*/
|
|
4024
|
+
order?: SortOrder;
|
|
4025
|
+
/** Paging options to limit and skip the number of items. */
|
|
4026
|
+
paging?: Paging$1;
|
|
4027
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
4028
|
+
cursorPaging?: CursorPaging;
|
|
4029
|
+
/**
|
|
4030
|
+
* Whether to return the total count in the response for a query with offset paging.
|
|
4031
|
+
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
4032
|
+
*
|
|
4033
|
+
* Default: `false`
|
|
4034
|
+
*/
|
|
4035
|
+
returnTotalCount?: boolean;
|
|
4036
|
+
/**
|
|
4037
|
+
* Whether to retrieve data from the primary database instance.
|
|
4038
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
4039
|
+
*
|
|
4040
|
+
* Default: `false`
|
|
4041
|
+
*/
|
|
4042
|
+
consistentRead?: boolean;
|
|
4043
|
+
/**
|
|
4044
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
4045
|
+
* If provided, the result text is returned in the specified language.
|
|
4046
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
4047
|
+
*
|
|
4048
|
+
* If not provided, result text is not translated.
|
|
4049
|
+
*/
|
|
4050
|
+
language?: string | null;
|
|
4051
|
+
}
|
|
4052
|
+
interface BulkInsertDataItemsOptions {
|
|
4053
|
+
/** ID of the collection in which to insert the items. */
|
|
4054
|
+
dataCollectionId: string;
|
|
4055
|
+
/** Data items to insert. */
|
|
4056
|
+
dataItems: DataItem[];
|
|
4057
|
+
/**
|
|
4058
|
+
* Whether to return the inserted data items.
|
|
4059
|
+
* When `true`, the `results` objects contain a `dataItem` field.
|
|
4060
|
+
*
|
|
4061
|
+
* Default: `false`
|
|
4062
|
+
*/
|
|
4063
|
+
returnEntity?: boolean;
|
|
4064
|
+
}
|
|
4065
|
+
interface BulkUpdateDataItemsOptions {
|
|
4066
|
+
/** ID of the collection in which to update items. */
|
|
4067
|
+
dataCollectionId: string;
|
|
4068
|
+
/** Data items to update. */
|
|
4069
|
+
dataItems: DataItem[];
|
|
4070
|
+
/**
|
|
4071
|
+
* Whether to return the updated data items.
|
|
4072
|
+
* When `true`, the `results` objects contain a `dataItem` field.
|
|
4073
|
+
*
|
|
4074
|
+
* Default: `false`
|
|
4075
|
+
*/
|
|
4076
|
+
returnEntity?: boolean;
|
|
4077
|
+
}
|
|
4078
|
+
interface BulkSaveDataItemsOptions {
|
|
4079
|
+
/** ID of the collection in which to insert or update the items. */
|
|
4080
|
+
dataCollectionId: string;
|
|
4081
|
+
/** Data items to insert or update. */
|
|
4082
|
+
dataItems: DataItem[];
|
|
4083
|
+
/**
|
|
4084
|
+
* Whether to return the saved data item.
|
|
4085
|
+
* When `true`, the `results` objects contain a `dataItem` field.
|
|
4086
|
+
*
|
|
4087
|
+
* Default: `false`
|
|
4088
|
+
*/
|
|
4089
|
+
returnEntity?: boolean;
|
|
4090
|
+
}
|
|
4091
|
+
interface BulkRemoveDataItemsOptions {
|
|
4092
|
+
/** ID of the collection from which to remove the item. */
|
|
4093
|
+
dataCollectionId: string;
|
|
4094
|
+
/** IDs of data items to remove. */
|
|
4095
|
+
dataItemIds: string[];
|
|
4096
|
+
}
|
|
4097
|
+
interface QueryReferencedDataItemsOptions extends QueryReferencedDataItemsRequestPagingMethodOneOf {
|
|
4098
|
+
/** ID of the collection containing the referring item. */
|
|
4099
|
+
dataCollectionId: string;
|
|
4100
|
+
/** ID of the referring item. */
|
|
4101
|
+
referringItemId?: string;
|
|
4102
|
+
/** Field containing references in the referring item. */
|
|
4103
|
+
referringItemFieldName?: string;
|
|
4104
|
+
/** Order of the returned referenced items. Sorted by the date each item was referenced. */
|
|
4105
|
+
order?: SortOrder;
|
|
4106
|
+
/** Paging options to limit and skip the number of items. */
|
|
4107
|
+
paging?: Paging$1;
|
|
4108
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
4109
|
+
cursorPaging?: CursorPaging;
|
|
4110
|
+
/**
|
|
4111
|
+
* Whether to return the total count in the response.
|
|
4112
|
+
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
4113
|
+
*
|
|
4114
|
+
* Default: `false`
|
|
4115
|
+
*/
|
|
4116
|
+
returnTotalCount?: boolean;
|
|
4117
|
+
/**
|
|
4118
|
+
* Whether to retrieve data from the primary database instance.
|
|
4119
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
4120
|
+
*
|
|
4121
|
+
* Default: `false`
|
|
4122
|
+
*/
|
|
4123
|
+
consistentRead?: boolean;
|
|
4124
|
+
/**
|
|
4125
|
+
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
4126
|
+
* If provided, the result text is returned in the specified language.
|
|
4127
|
+
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
4128
|
+
*
|
|
4129
|
+
* If not provided, result text is not translated.
|
|
4130
|
+
*/
|
|
4131
|
+
language?: string | null;
|
|
4132
|
+
/**
|
|
4133
|
+
* Fields to return for each referenced item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
4134
|
+
* **Note:** The `_id` system field is always returned.
|
|
4135
|
+
*/
|
|
4136
|
+
fields?: string[];
|
|
4137
|
+
}
|
|
4138
|
+
interface IsReferencedDataItemOptions {
|
|
4139
|
+
/** ID of the collection containing the referring data item. */
|
|
4140
|
+
dataCollectionId: string;
|
|
4141
|
+
/** Field to check for a reference to the item that may be referenced. */
|
|
4142
|
+
referringItemFieldName: string;
|
|
4143
|
+
/** ID of the referring item. */
|
|
4144
|
+
referringItemId: string;
|
|
4145
|
+
/** ID of the item that may be referenced. */
|
|
4146
|
+
referencedItemId: string;
|
|
4147
|
+
/**
|
|
4148
|
+
* Whether to retrieve data from the primary database instance.
|
|
4149
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
4150
|
+
*
|
|
4151
|
+
* Default: `false`
|
|
4152
|
+
*/
|
|
4153
|
+
consistentRead?: boolean;
|
|
4154
|
+
}
|
|
4155
|
+
interface InsertDataItemReferenceOptions {
|
|
4156
|
+
/** ID of the collection in which to insert the reference. */
|
|
4157
|
+
dataCollectionId: string;
|
|
4158
|
+
/** Reference to insert */
|
|
4159
|
+
dataItemReference?: DataItemReference;
|
|
4160
|
+
}
|
|
4161
|
+
interface RemoveDataItemReferenceOptions {
|
|
4162
|
+
/** ID of the collection containing the referring item. */
|
|
4163
|
+
dataCollectionId: string;
|
|
4164
|
+
/** Reference to remove. */
|
|
4165
|
+
dataItemReference: DataItemReference;
|
|
4166
|
+
}
|
|
4167
|
+
interface BulkInsertDataItemReferencesOptions {
|
|
4168
|
+
/** ID of the collection containing the referring items. */
|
|
4169
|
+
dataCollectionId: string;
|
|
4170
|
+
/** References to insert. */
|
|
4171
|
+
dataItemReferences: DataItemReference[];
|
|
4172
|
+
/**
|
|
4173
|
+
* Whether to return the inserted data item references.
|
|
4174
|
+
* When `true`, the `results` objects contain a `dataItemReference` field.
|
|
4175
|
+
*
|
|
4176
|
+
* Default: `false`
|
|
4177
|
+
*/
|
|
4178
|
+
returnEntity?: boolean;
|
|
4179
|
+
}
|
|
4180
|
+
interface BulkRemoveDataItemReferencesOptions {
|
|
4181
|
+
/** ID of the collection containing the referring items. */
|
|
4182
|
+
dataCollectionId: string;
|
|
4183
|
+
/** References to remove. */
|
|
4184
|
+
dataItemReferences: DataItemReference[];
|
|
4185
|
+
}
|
|
4186
|
+
interface ReplaceDataItemReferencesOptions {
|
|
4187
|
+
/** ID of the collection containing the referring item. */
|
|
4188
|
+
dataCollectionId: string;
|
|
4189
|
+
/** Field containing references in the referring item. */
|
|
4190
|
+
referringItemFieldName: string;
|
|
4191
|
+
/** ID of the referring item. */
|
|
4192
|
+
referringItemId: string;
|
|
4193
|
+
/** List of new referenced item IDs to replace the existing ones. */
|
|
4194
|
+
newReferencedItemIds?: string[];
|
|
4195
|
+
}
|
|
4196
|
+
|
|
4197
|
+
declare const __metadata$1: {
|
|
4198
|
+
PACKAGE_NAME: string;
|
|
4199
|
+
};
|
|
4200
|
+
declare function insertDataItem(httpClient: HttpClient): (options: InsertDataItemOptions) => Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
4201
|
+
declare function updateDataItem(httpClient: HttpClient): (_id: string, options: UpdateDataItemOptions) => Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
4202
|
+
declare function saveDataItem(httpClient: HttpClient): (options: SaveDataItemOptions) => Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
4203
|
+
declare function getDataItem(httpClient: HttpClient): (dataItemId: string, options?: GetDataItemOptions) => Promise<DataItem & {
|
|
4204
|
+
_id: string;
|
|
4205
|
+
dataCollectionId: string;
|
|
4206
|
+
}>;
|
|
4207
|
+
declare function removeDataItem(httpClient: HttpClient): (dataItemId: string, options: RemoveDataItemOptions) => Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
4208
|
+
declare function truncateDataItems(httpClient: HttpClient): (options: TruncateDataItemsOptions) => Promise<void>;
|
|
4209
|
+
declare function queryDataItems(httpClient: HttpClient): (options: QueryDataItemsOptions) => DataItemsQueryBuilder;
|
|
4210
|
+
declare function aggregateDataItems(httpClient: HttpClient): (options?: AggregateDataItemsOptions) => Promise<AggregateDataItemsResponse>;
|
|
4211
|
+
declare function countDataItems(httpClient: HttpClient): (options?: CountDataItemsOptions) => Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
4212
|
+
declare function queryDistinctValues(httpClient: HttpClient): (options?: QueryDistinctValuesOptions) => Promise<QueryDistinctValuesResponse>;
|
|
4213
|
+
declare function bulkInsertDataItems(httpClient: HttpClient): (options?: BulkInsertDataItemsOptions) => Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
4214
|
+
declare function bulkUpdateDataItems(httpClient: HttpClient): (options?: BulkUpdateDataItemsOptions) => Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
4215
|
+
declare function bulkSaveDataItems(httpClient: HttpClient): (options?: BulkSaveDataItemsOptions) => Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
4216
|
+
declare function bulkRemoveDataItems(httpClient: HttpClient): (options: BulkRemoveDataItemsOptions) => Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
4217
|
+
declare function queryReferencedDataItems(httpClient: HttpClient): (options?: QueryReferencedDataItemsOptions) => Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
4218
|
+
declare function isReferencedDataItem(httpClient: HttpClient): (options?: IsReferencedDataItemOptions) => Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
4219
|
+
declare function insertDataItemReference(httpClient: HttpClient): (options?: InsertDataItemReferenceOptions) => Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
4220
|
+
declare function removeDataItemReference(httpClient: HttpClient): (options: RemoveDataItemReferenceOptions) => Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
4221
|
+
declare function bulkInsertDataItemReferences(httpClient: HttpClient): (options?: BulkInsertDataItemReferencesOptions) => Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
4222
|
+
declare function bulkRemoveDataItemReferences(httpClient: HttpClient): (options: BulkRemoveDataItemReferencesOptions) => Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
4223
|
+
declare function replaceDataItemReferences(httpClient: HttpClient): (options?: ReplaceDataItemReferencesOptions) => Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
4224
|
+
declare const onDataItemCreated: EventDefinition<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
4225
|
+
declare const onDataItemUpdated: EventDefinition<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
4226
|
+
declare const onDataItemDeleted: EventDefinition<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
4227
|
+
|
|
4228
|
+
type index_d$1_ACTION = ACTION;
|
|
4229
|
+
declare const index_d$1_ACTION: typeof ACTION;
|
|
4230
|
+
type index_d$1_Action = Action;
|
|
4231
|
+
declare const index_d$1_Action: typeof Action;
|
|
4232
|
+
type index_d$1_ActionEvent = ActionEvent;
|
|
4233
|
+
type index_d$1_AggregateDataItemsOptions = AggregateDataItemsOptions;
|
|
4234
|
+
type index_d$1_AggregateDataItemsRequest = AggregateDataItemsRequest;
|
|
4235
|
+
type index_d$1_AggregateDataItemsRequestPagingMethodOneOf = AggregateDataItemsRequestPagingMethodOneOf;
|
|
4236
|
+
type index_d$1_AggregateDataItemsResponse = AggregateDataItemsResponse;
|
|
4237
|
+
type index_d$1_Aggregation = Aggregation;
|
|
4238
|
+
type index_d$1_AppendToArray = AppendToArray;
|
|
4239
|
+
type index_d$1_ApplicationError = ApplicationError;
|
|
4240
|
+
type index_d$1_Average = Average;
|
|
4241
|
+
type index_d$1_BaseEventMetadata = BaseEventMetadata;
|
|
4242
|
+
type index_d$1_BulkActionMetadata = BulkActionMetadata;
|
|
4243
|
+
type index_d$1_BulkActionType = BulkActionType;
|
|
4244
|
+
declare const index_d$1_BulkActionType: typeof BulkActionType;
|
|
4245
|
+
type index_d$1_BulkDataItemReferenceResult = BulkDataItemReferenceResult;
|
|
4246
|
+
type index_d$1_BulkDataItemResult = BulkDataItemResult;
|
|
4247
|
+
type index_d$1_BulkInsertDataItemReferencesOptions = BulkInsertDataItemReferencesOptions;
|
|
4248
|
+
type index_d$1_BulkInsertDataItemReferencesRequest = BulkInsertDataItemReferencesRequest;
|
|
4249
|
+
type index_d$1_BulkInsertDataItemReferencesResponse = BulkInsertDataItemReferencesResponse;
|
|
4250
|
+
type index_d$1_BulkInsertDataItemReferencesResponseNonNullableFields = BulkInsertDataItemReferencesResponseNonNullableFields;
|
|
4251
|
+
type index_d$1_BulkInsertDataItemsOptions = BulkInsertDataItemsOptions;
|
|
4252
|
+
type index_d$1_BulkInsertDataItemsRequest = BulkInsertDataItemsRequest;
|
|
4253
|
+
type index_d$1_BulkInsertDataItemsResponse = BulkInsertDataItemsResponse;
|
|
4254
|
+
type index_d$1_BulkInsertDataItemsResponseNonNullableFields = BulkInsertDataItemsResponseNonNullableFields;
|
|
4255
|
+
type index_d$1_BulkPatchDataItemsRequest = BulkPatchDataItemsRequest;
|
|
4256
|
+
type index_d$1_BulkPatchDataItemsResponse = BulkPatchDataItemsResponse;
|
|
4257
|
+
type index_d$1_BulkRemoveDataItemReferencesOptions = BulkRemoveDataItemReferencesOptions;
|
|
4258
|
+
type index_d$1_BulkRemoveDataItemReferencesRequest = BulkRemoveDataItemReferencesRequest;
|
|
4259
|
+
type index_d$1_BulkRemoveDataItemReferencesResponse = BulkRemoveDataItemReferencesResponse;
|
|
4260
|
+
type index_d$1_BulkRemoveDataItemReferencesResponseNonNullableFields = BulkRemoveDataItemReferencesResponseNonNullableFields;
|
|
4261
|
+
type index_d$1_BulkRemoveDataItemsOptions = BulkRemoveDataItemsOptions;
|
|
4262
|
+
type index_d$1_BulkRemoveDataItemsRequest = BulkRemoveDataItemsRequest;
|
|
4263
|
+
type index_d$1_BulkRemoveDataItemsResponse = BulkRemoveDataItemsResponse;
|
|
4264
|
+
type index_d$1_BulkRemoveDataItemsResponseNonNullableFields = BulkRemoveDataItemsResponseNonNullableFields;
|
|
4265
|
+
type index_d$1_BulkSaveDataItemsOptions = BulkSaveDataItemsOptions;
|
|
4266
|
+
type index_d$1_BulkSaveDataItemsRequest = BulkSaveDataItemsRequest;
|
|
4267
|
+
type index_d$1_BulkSaveDataItemsResponse = BulkSaveDataItemsResponse;
|
|
4268
|
+
type index_d$1_BulkSaveDataItemsResponseNonNullableFields = BulkSaveDataItemsResponseNonNullableFields;
|
|
4269
|
+
type index_d$1_BulkUpdateDataItemsOptions = BulkUpdateDataItemsOptions;
|
|
4270
|
+
type index_d$1_BulkUpdateDataItemsRequest = BulkUpdateDataItemsRequest;
|
|
4271
|
+
type index_d$1_BulkUpdateDataItemsResponse = BulkUpdateDataItemsResponse;
|
|
4272
|
+
type index_d$1_BulkUpdateDataItemsResponseNonNullableFields = BulkUpdateDataItemsResponseNonNullableFields;
|
|
4273
|
+
type index_d$1_CachingInfo = CachingInfo;
|
|
4274
|
+
type index_d$1_Count = Count;
|
|
4275
|
+
type index_d$1_CountDataItemsOptions = CountDataItemsOptions;
|
|
4276
|
+
type index_d$1_CountDataItemsRequest = CountDataItemsRequest;
|
|
4277
|
+
type index_d$1_CountDataItemsResponse = CountDataItemsResponse;
|
|
4278
|
+
type index_d$1_CountDataItemsResponseNonNullableFields = CountDataItemsResponseNonNullableFields;
|
|
4279
|
+
type index_d$1_CursorPaging = CursorPaging;
|
|
4280
|
+
type index_d$1_Cursors = Cursors;
|
|
4281
|
+
type index_d$1_DataItem = DataItem;
|
|
4282
|
+
type index_d$1_DataItemCreatedEnvelope = DataItemCreatedEnvelope;
|
|
4283
|
+
type index_d$1_DataItemDeletedEnvelope = DataItemDeletedEnvelope;
|
|
4284
|
+
type index_d$1_DataItemReference = DataItemReference;
|
|
4285
|
+
type index_d$1_DataItemUpdatedEnvelope = DataItemUpdatedEnvelope;
|
|
4286
|
+
type index_d$1_DataItemsQueryBuilder = DataItemsQueryBuilder;
|
|
4287
|
+
type index_d$1_DataItemsQueryResult = DataItemsQueryResult;
|
|
4288
|
+
type index_d$1_DataPublishPluginOptions = DataPublishPluginOptions;
|
|
4289
|
+
type index_d$1_DomainEvent = DomainEvent;
|
|
4290
|
+
type index_d$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
4291
|
+
type index_d$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
4292
|
+
type index_d$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
4293
|
+
type index_d$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
4294
|
+
type index_d$1_EventMetadata = EventMetadata;
|
|
4295
|
+
type index_d$1_FieldUpdate = FieldUpdate;
|
|
4296
|
+
type index_d$1_FieldUpdateActionOptionsOneOf = FieldUpdateActionOptionsOneOf;
|
|
4297
|
+
type index_d$1_GetDataItemOptions = GetDataItemOptions;
|
|
4298
|
+
type index_d$1_GetDataItemRequest = GetDataItemRequest;
|
|
4299
|
+
type index_d$1_GetDataItemResponse = GetDataItemResponse;
|
|
4300
|
+
type index_d$1_GetDataItemResponseNonNullableFields = GetDataItemResponseNonNullableFields;
|
|
4301
|
+
type index_d$1_IdentificationData = IdentificationData;
|
|
4302
|
+
type index_d$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
4303
|
+
type index_d$1_IncrementField = IncrementField;
|
|
4304
|
+
type index_d$1_InsertDataItemOptions = InsertDataItemOptions;
|
|
4305
|
+
type index_d$1_InsertDataItemReferenceOptions = InsertDataItemReferenceOptions;
|
|
4306
|
+
type index_d$1_InsertDataItemReferenceRequest = InsertDataItemReferenceRequest;
|
|
4307
|
+
type index_d$1_InsertDataItemReferenceResponse = InsertDataItemReferenceResponse;
|
|
4308
|
+
type index_d$1_InsertDataItemReferenceResponseNonNullableFields = InsertDataItemReferenceResponseNonNullableFields;
|
|
4309
|
+
type index_d$1_InsertDataItemRequest = InsertDataItemRequest;
|
|
4310
|
+
type index_d$1_InsertDataItemResponse = InsertDataItemResponse;
|
|
4311
|
+
type index_d$1_InsertDataItemResponseNonNullableFields = InsertDataItemResponseNonNullableFields;
|
|
4312
|
+
type index_d$1_IsReferencedDataItemOptions = IsReferencedDataItemOptions;
|
|
4313
|
+
type index_d$1_IsReferencedDataItemRequest = IsReferencedDataItemRequest;
|
|
4314
|
+
type index_d$1_IsReferencedDataItemResponse = IsReferencedDataItemResponse;
|
|
4315
|
+
type index_d$1_IsReferencedDataItemResponseNonNullableFields = IsReferencedDataItemResponseNonNullableFields;
|
|
4316
|
+
type index_d$1_ItemMetadata = ItemMetadata;
|
|
4317
|
+
type index_d$1_Max = Max;
|
|
4318
|
+
type index_d$1_MessageEnvelope = MessageEnvelope;
|
|
4319
|
+
type index_d$1_Min = Min;
|
|
4320
|
+
type index_d$1_Operation = Operation;
|
|
4321
|
+
type index_d$1_OperationCalculateOneOf = OperationCalculateOneOf;
|
|
4322
|
+
type index_d$1_Options = Options;
|
|
4323
|
+
type index_d$1_PagingMetadataV2 = PagingMetadataV2;
|
|
4324
|
+
type index_d$1_PatchDataItemRequest = PatchDataItemRequest;
|
|
4325
|
+
type index_d$1_PatchDataItemResponse = PatchDataItemResponse;
|
|
4326
|
+
type index_d$1_PatchSet = PatchSet;
|
|
4327
|
+
type index_d$1_PublishPluginOptions = PublishPluginOptions;
|
|
4328
|
+
type index_d$1_QueryDataItemsOptions = QueryDataItemsOptions;
|
|
4329
|
+
type index_d$1_QueryDataItemsRequest = QueryDataItemsRequest;
|
|
4330
|
+
type index_d$1_QueryDataItemsResponse = QueryDataItemsResponse;
|
|
4331
|
+
type index_d$1_QueryDataItemsResponseNonNullableFields = QueryDataItemsResponseNonNullableFields;
|
|
4332
|
+
type index_d$1_QueryDistinctValuesOptions = QueryDistinctValuesOptions;
|
|
4333
|
+
type index_d$1_QueryDistinctValuesRequest = QueryDistinctValuesRequest;
|
|
4334
|
+
type index_d$1_QueryDistinctValuesRequestPagingMethodOneOf = QueryDistinctValuesRequestPagingMethodOneOf;
|
|
4335
|
+
type index_d$1_QueryDistinctValuesResponse = QueryDistinctValuesResponse;
|
|
4336
|
+
type index_d$1_QueryReferencedDataItemsOptions = QueryReferencedDataItemsOptions;
|
|
4337
|
+
type index_d$1_QueryReferencedDataItemsRequest = QueryReferencedDataItemsRequest;
|
|
4338
|
+
type index_d$1_QueryReferencedDataItemsRequestPagingMethodOneOf = QueryReferencedDataItemsRequestPagingMethodOneOf;
|
|
4339
|
+
type index_d$1_QueryReferencedDataItemsResponse = QueryReferencedDataItemsResponse;
|
|
4340
|
+
type index_d$1_QueryReferencedDataItemsResponseNonNullableFields = QueryReferencedDataItemsResponseNonNullableFields;
|
|
4341
|
+
type index_d$1_QueryV2 = QueryV2;
|
|
4342
|
+
type index_d$1_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
4343
|
+
type index_d$1_ReferencedResult = ReferencedResult;
|
|
4344
|
+
type index_d$1_ReferencedResultEntityOneOf = ReferencedResultEntityOneOf;
|
|
4345
|
+
type index_d$1_RemoveDataItemOptions = RemoveDataItemOptions;
|
|
4346
|
+
type index_d$1_RemoveDataItemReferenceOptions = RemoveDataItemReferenceOptions;
|
|
4347
|
+
type index_d$1_RemoveDataItemReferenceRequest = RemoveDataItemReferenceRequest;
|
|
4348
|
+
type index_d$1_RemoveDataItemReferenceResponse = RemoveDataItemReferenceResponse;
|
|
4349
|
+
type index_d$1_RemoveDataItemReferenceResponseNonNullableFields = RemoveDataItemReferenceResponseNonNullableFields;
|
|
4350
|
+
type index_d$1_RemoveDataItemRequest = RemoveDataItemRequest;
|
|
4351
|
+
type index_d$1_RemoveDataItemResponse = RemoveDataItemResponse;
|
|
4352
|
+
type index_d$1_RemoveDataItemResponseNonNullableFields = RemoveDataItemResponseNonNullableFields;
|
|
4353
|
+
type index_d$1_RemoveFromArray = RemoveFromArray;
|
|
4354
|
+
type index_d$1_ReplaceDataItemReferencesOptions = ReplaceDataItemReferencesOptions;
|
|
4355
|
+
type index_d$1_ReplaceDataItemReferencesRequest = ReplaceDataItemReferencesRequest;
|
|
4356
|
+
type index_d$1_ReplaceDataItemReferencesResponse = ReplaceDataItemReferencesResponse;
|
|
4357
|
+
type index_d$1_ReplaceDataItemReferencesResponseNonNullableFields = ReplaceDataItemReferencesResponseNonNullableFields;
|
|
4358
|
+
type index_d$1_SaveDataItemOptions = SaveDataItemOptions;
|
|
4359
|
+
type index_d$1_SaveDataItemRequest = SaveDataItemRequest;
|
|
4360
|
+
type index_d$1_SaveDataItemResponse = SaveDataItemResponse;
|
|
4361
|
+
type index_d$1_SaveDataItemResponseNonNullableFields = SaveDataItemResponseNonNullableFields;
|
|
4362
|
+
type index_d$1_SetField = SetField;
|
|
4363
|
+
type index_d$1_SortOrder = SortOrder;
|
|
4364
|
+
declare const index_d$1_SortOrder: typeof SortOrder;
|
|
4365
|
+
type index_d$1_Sorting = Sorting;
|
|
4366
|
+
type index_d$1_Sum = Sum;
|
|
4367
|
+
type index_d$1_TruncateDataItemsOptions = TruncateDataItemsOptions;
|
|
4368
|
+
type index_d$1_TruncateDataItemsRequest = TruncateDataItemsRequest;
|
|
4369
|
+
type index_d$1_TruncateDataItemsResponse = TruncateDataItemsResponse;
|
|
4370
|
+
type index_d$1_UnresolvedReference = UnresolvedReference;
|
|
4371
|
+
type index_d$1_UpdateDataItemOptions = UpdateDataItemOptions;
|
|
4372
|
+
type index_d$1_UpdateDataItemRequest = UpdateDataItemRequest;
|
|
4373
|
+
type index_d$1_UpdateDataItemResponse = UpdateDataItemResponse;
|
|
4374
|
+
type index_d$1_UpdateDataItemResponseNonNullableFields = UpdateDataItemResponseNonNullableFields;
|
|
4375
|
+
type index_d$1_WebhookIdentityType = WebhookIdentityType;
|
|
4376
|
+
declare const index_d$1_WebhookIdentityType: typeof WebhookIdentityType;
|
|
4377
|
+
declare const index_d$1_aggregateDataItems: typeof aggregateDataItems;
|
|
4378
|
+
declare const index_d$1_bulkInsertDataItemReferences: typeof bulkInsertDataItemReferences;
|
|
4379
|
+
declare const index_d$1_bulkInsertDataItems: typeof bulkInsertDataItems;
|
|
4380
|
+
declare const index_d$1_bulkRemoveDataItemReferences: typeof bulkRemoveDataItemReferences;
|
|
4381
|
+
declare const index_d$1_bulkRemoveDataItems: typeof bulkRemoveDataItems;
|
|
4382
|
+
declare const index_d$1_bulkSaveDataItems: typeof bulkSaveDataItems;
|
|
4383
|
+
declare const index_d$1_bulkUpdateDataItems: typeof bulkUpdateDataItems;
|
|
4384
|
+
declare const index_d$1_countDataItems: typeof countDataItems;
|
|
4385
|
+
declare const index_d$1_getDataItem: typeof getDataItem;
|
|
4386
|
+
declare const index_d$1_insertDataItem: typeof insertDataItem;
|
|
4387
|
+
declare const index_d$1_insertDataItemReference: typeof insertDataItemReference;
|
|
4388
|
+
declare const index_d$1_isReferencedDataItem: typeof isReferencedDataItem;
|
|
4389
|
+
declare const index_d$1_onDataItemCreated: typeof onDataItemCreated;
|
|
4390
|
+
declare const index_d$1_onDataItemDeleted: typeof onDataItemDeleted;
|
|
4391
|
+
declare const index_d$1_onDataItemUpdated: typeof onDataItemUpdated;
|
|
4392
|
+
declare const index_d$1_queryDataItems: typeof queryDataItems;
|
|
4393
|
+
declare const index_d$1_queryDistinctValues: typeof queryDistinctValues;
|
|
4394
|
+
declare const index_d$1_queryReferencedDataItems: typeof queryReferencedDataItems;
|
|
4395
|
+
declare const index_d$1_removeDataItem: typeof removeDataItem;
|
|
4396
|
+
declare const index_d$1_removeDataItemReference: typeof removeDataItemReference;
|
|
4397
|
+
declare const index_d$1_replaceDataItemReferences: typeof replaceDataItemReferences;
|
|
4398
|
+
declare const index_d$1_saveDataItem: typeof saveDataItem;
|
|
4399
|
+
declare const index_d$1_truncateDataItems: typeof truncateDataItems;
|
|
4400
|
+
declare const index_d$1_updateDataItem: typeof updateDataItem;
|
|
4401
|
+
declare namespace index_d$1 {
|
|
4402
|
+
export { index_d$1_ACTION as ACTION, index_d$1_Action as Action, type index_d$1_ActionEvent as ActionEvent, type index_d$1_AggregateDataItemsOptions as AggregateDataItemsOptions, type index_d$1_AggregateDataItemsRequest as AggregateDataItemsRequest, type index_d$1_AggregateDataItemsRequestPagingMethodOneOf as AggregateDataItemsRequestPagingMethodOneOf, type index_d$1_AggregateDataItemsResponse as AggregateDataItemsResponse, type index_d$1_Aggregation as Aggregation, type index_d$1_AppendToArray as AppendToArray, type index_d$1_ApplicationError as ApplicationError, type index_d$1_Average as Average, type index_d$1_BaseEventMetadata as BaseEventMetadata, type index_d$1_BulkActionMetadata as BulkActionMetadata, index_d$1_BulkActionType as BulkActionType, type index_d$1_BulkDataItemReferenceResult as BulkDataItemReferenceResult, type index_d$1_BulkDataItemResult as BulkDataItemResult, type index_d$1_BulkInsertDataItemReferencesOptions as BulkInsertDataItemReferencesOptions, type index_d$1_BulkInsertDataItemReferencesRequest as BulkInsertDataItemReferencesRequest, type index_d$1_BulkInsertDataItemReferencesResponse as BulkInsertDataItemReferencesResponse, type index_d$1_BulkInsertDataItemReferencesResponseNonNullableFields as BulkInsertDataItemReferencesResponseNonNullableFields, type index_d$1_BulkInsertDataItemsOptions as BulkInsertDataItemsOptions, type index_d$1_BulkInsertDataItemsRequest as BulkInsertDataItemsRequest, type index_d$1_BulkInsertDataItemsResponse as BulkInsertDataItemsResponse, type index_d$1_BulkInsertDataItemsResponseNonNullableFields as BulkInsertDataItemsResponseNonNullableFields, type index_d$1_BulkPatchDataItemsRequest as BulkPatchDataItemsRequest, type index_d$1_BulkPatchDataItemsResponse as BulkPatchDataItemsResponse, type index_d$1_BulkRemoveDataItemReferencesOptions as BulkRemoveDataItemReferencesOptions, type index_d$1_BulkRemoveDataItemReferencesRequest as BulkRemoveDataItemReferencesRequest, type index_d$1_BulkRemoveDataItemReferencesResponse as BulkRemoveDataItemReferencesResponse, type index_d$1_BulkRemoveDataItemReferencesResponseNonNullableFields as BulkRemoveDataItemReferencesResponseNonNullableFields, type index_d$1_BulkRemoveDataItemsOptions as BulkRemoveDataItemsOptions, type index_d$1_BulkRemoveDataItemsRequest as BulkRemoveDataItemsRequest, type index_d$1_BulkRemoveDataItemsResponse as BulkRemoveDataItemsResponse, type index_d$1_BulkRemoveDataItemsResponseNonNullableFields as BulkRemoveDataItemsResponseNonNullableFields, type index_d$1_BulkSaveDataItemsOptions as BulkSaveDataItemsOptions, type index_d$1_BulkSaveDataItemsRequest as BulkSaveDataItemsRequest, type index_d$1_BulkSaveDataItemsResponse as BulkSaveDataItemsResponse, type index_d$1_BulkSaveDataItemsResponseNonNullableFields as BulkSaveDataItemsResponseNonNullableFields, type index_d$1_BulkUpdateDataItemsOptions as BulkUpdateDataItemsOptions, type index_d$1_BulkUpdateDataItemsRequest as BulkUpdateDataItemsRequest, type index_d$1_BulkUpdateDataItemsResponse as BulkUpdateDataItemsResponse, type index_d$1_BulkUpdateDataItemsResponseNonNullableFields as BulkUpdateDataItemsResponseNonNullableFields, type index_d$1_CachingInfo as CachingInfo, type index_d$1_Count as Count, type index_d$1_CountDataItemsOptions as CountDataItemsOptions, type index_d$1_CountDataItemsRequest as CountDataItemsRequest, type index_d$1_CountDataItemsResponse as CountDataItemsResponse, type index_d$1_CountDataItemsResponseNonNullableFields as CountDataItemsResponseNonNullableFields, type index_d$1_CursorPaging as CursorPaging, type index_d$1_Cursors as Cursors, type index_d$1_DataItem as DataItem, type index_d$1_DataItemCreatedEnvelope as DataItemCreatedEnvelope, type index_d$1_DataItemDeletedEnvelope as DataItemDeletedEnvelope, type index_d$1_DataItemReference as DataItemReference, type index_d$1_DataItemUpdatedEnvelope as DataItemUpdatedEnvelope, type index_d$1_DataItemsQueryBuilder as DataItemsQueryBuilder, type index_d$1_DataItemsQueryResult as DataItemsQueryResult, type index_d$1_DataPublishPluginOptions as DataPublishPluginOptions, type index_d$1_DomainEvent as DomainEvent, type index_d$1_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d$1_EntityCreatedEvent as EntityCreatedEvent, type index_d$1_EntityDeletedEvent as EntityDeletedEvent, type index_d$1_EntityUpdatedEvent as EntityUpdatedEvent, Environment$1 as Environment, type index_d$1_EventMetadata as EventMetadata, type index_d$1_FieldUpdate as FieldUpdate, type index_d$1_FieldUpdateActionOptionsOneOf as FieldUpdateActionOptionsOneOf, type index_d$1_GetDataItemOptions as GetDataItemOptions, type index_d$1_GetDataItemRequest as GetDataItemRequest, type index_d$1_GetDataItemResponse as GetDataItemResponse, type index_d$1_GetDataItemResponseNonNullableFields as GetDataItemResponseNonNullableFields, type index_d$1_IdentificationData as IdentificationData, type index_d$1_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d$1_IncrementField as IncrementField, type index_d$1_InsertDataItemOptions as InsertDataItemOptions, type index_d$1_InsertDataItemReferenceOptions as InsertDataItemReferenceOptions, type index_d$1_InsertDataItemReferenceRequest as InsertDataItemReferenceRequest, type index_d$1_InsertDataItemReferenceResponse as InsertDataItemReferenceResponse, type index_d$1_InsertDataItemReferenceResponseNonNullableFields as InsertDataItemReferenceResponseNonNullableFields, type index_d$1_InsertDataItemRequest as InsertDataItemRequest, type index_d$1_InsertDataItemResponse as InsertDataItemResponse, type index_d$1_InsertDataItemResponseNonNullableFields as InsertDataItemResponseNonNullableFields, type index_d$1_IsReferencedDataItemOptions as IsReferencedDataItemOptions, type index_d$1_IsReferencedDataItemRequest as IsReferencedDataItemRequest, type index_d$1_IsReferencedDataItemResponse as IsReferencedDataItemResponse, type index_d$1_IsReferencedDataItemResponseNonNullableFields as IsReferencedDataItemResponseNonNullableFields, type index_d$1_ItemMetadata as ItemMetadata, type index_d$1_Max as Max, type index_d$1_MessageEnvelope as MessageEnvelope, type index_d$1_Min as Min, type index_d$1_Operation as Operation, type index_d$1_OperationCalculateOneOf as OperationCalculateOneOf, type index_d$1_Options as Options, type Paging$1 as Paging, type index_d$1_PagingMetadataV2 as PagingMetadataV2, type index_d$1_PatchDataItemRequest as PatchDataItemRequest, type index_d$1_PatchDataItemResponse as PatchDataItemResponse, type index_d$1_PatchSet as PatchSet, type index_d$1_PublishPluginOptions as PublishPluginOptions, type index_d$1_QueryDataItemsOptions as QueryDataItemsOptions, type index_d$1_QueryDataItemsRequest as QueryDataItemsRequest, type index_d$1_QueryDataItemsResponse as QueryDataItemsResponse, type index_d$1_QueryDataItemsResponseNonNullableFields as QueryDataItemsResponseNonNullableFields, type index_d$1_QueryDistinctValuesOptions as QueryDistinctValuesOptions, type index_d$1_QueryDistinctValuesRequest as QueryDistinctValuesRequest, type index_d$1_QueryDistinctValuesRequestPagingMethodOneOf as QueryDistinctValuesRequestPagingMethodOneOf, type index_d$1_QueryDistinctValuesResponse as QueryDistinctValuesResponse, type index_d$1_QueryReferencedDataItemsOptions as QueryReferencedDataItemsOptions, type index_d$1_QueryReferencedDataItemsRequest as QueryReferencedDataItemsRequest, type index_d$1_QueryReferencedDataItemsRequestPagingMethodOneOf as QueryReferencedDataItemsRequestPagingMethodOneOf, type index_d$1_QueryReferencedDataItemsResponse as QueryReferencedDataItemsResponse, type index_d$1_QueryReferencedDataItemsResponseNonNullableFields as QueryReferencedDataItemsResponseNonNullableFields, type index_d$1_QueryV2 as QueryV2, type index_d$1_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d$1_ReferencedResult as ReferencedResult, type index_d$1_ReferencedResultEntityOneOf as ReferencedResultEntityOneOf, type index_d$1_RemoveDataItemOptions as RemoveDataItemOptions, type index_d$1_RemoveDataItemReferenceOptions as RemoveDataItemReferenceOptions, type index_d$1_RemoveDataItemReferenceRequest as RemoveDataItemReferenceRequest, type index_d$1_RemoveDataItemReferenceResponse as RemoveDataItemReferenceResponse, type index_d$1_RemoveDataItemReferenceResponseNonNullableFields as RemoveDataItemReferenceResponseNonNullableFields, type index_d$1_RemoveDataItemRequest as RemoveDataItemRequest, type index_d$1_RemoveDataItemResponse as RemoveDataItemResponse, type index_d$1_RemoveDataItemResponseNonNullableFields as RemoveDataItemResponseNonNullableFields, type index_d$1_RemoveFromArray as RemoveFromArray, type index_d$1_ReplaceDataItemReferencesOptions as ReplaceDataItemReferencesOptions, type index_d$1_ReplaceDataItemReferencesRequest as ReplaceDataItemReferencesRequest, type index_d$1_ReplaceDataItemReferencesResponse as ReplaceDataItemReferencesResponse, type index_d$1_ReplaceDataItemReferencesResponseNonNullableFields as ReplaceDataItemReferencesResponseNonNullableFields, type index_d$1_SaveDataItemOptions as SaveDataItemOptions, type index_d$1_SaveDataItemRequest as SaveDataItemRequest, type index_d$1_SaveDataItemResponse as SaveDataItemResponse, type index_d$1_SaveDataItemResponseNonNullableFields as SaveDataItemResponseNonNullableFields, type index_d$1_SetField as SetField, index_d$1_SortOrder as SortOrder, type index_d$1_Sorting as Sorting, type index_d$1_Sum as Sum, type index_d$1_TruncateDataItemsOptions as TruncateDataItemsOptions, type index_d$1_TruncateDataItemsRequest as TruncateDataItemsRequest, type index_d$1_TruncateDataItemsResponse as TruncateDataItemsResponse, type index_d$1_UnresolvedReference as UnresolvedReference, type index_d$1_UpdateDataItemOptions as UpdateDataItemOptions, type index_d$1_UpdateDataItemRequest as UpdateDataItemRequest, type index_d$1_UpdateDataItemResponse as UpdateDataItemResponse, type index_d$1_UpdateDataItemResponseNonNullableFields as UpdateDataItemResponseNonNullableFields, index_d$1_WebhookIdentityType as WebhookIdentityType, __metadata$1 as __metadata, index_d$1_aggregateDataItems as aggregateDataItems, index_d$1_bulkInsertDataItemReferences as bulkInsertDataItemReferences, index_d$1_bulkInsertDataItems as bulkInsertDataItems, index_d$1_bulkRemoveDataItemReferences as bulkRemoveDataItemReferences, index_d$1_bulkRemoveDataItems as bulkRemoveDataItems, index_d$1_bulkSaveDataItems as bulkSaveDataItems, index_d$1_bulkUpdateDataItems as bulkUpdateDataItems, index_d$1_countDataItems as countDataItems, index_d$1_getDataItem as getDataItem, index_d$1_insertDataItem as insertDataItem, index_d$1_insertDataItemReference as insertDataItemReference, index_d$1_isReferencedDataItem as isReferencedDataItem, index_d$1_onDataItemCreated as onDataItemCreated, index_d$1_onDataItemDeleted as onDataItemDeleted, index_d$1_onDataItemUpdated as onDataItemUpdated, index_d$1_queryDataItems as queryDataItems, index_d$1_queryDistinctValues as queryDistinctValues, index_d$1_queryReferencedDataItems as queryReferencedDataItems, index_d$1_removeDataItem as removeDataItem, index_d$1_removeDataItemReference as removeDataItemReference, index_d$1_replaceDataItemReferences as replaceDataItemReferences, index_d$1_saveDataItem as saveDataItem, index_d$1_truncateDataItems as truncateDataItems, index_d$1_updateDataItem as updateDataItem };
|
|
4403
|
+
}
|
|
4404
|
+
|
|
4405
|
+
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
4406
|
+
interface Index {
|
|
4407
|
+
/** Name of the index. */
|
|
4408
|
+
name?: string;
|
|
4409
|
+
/**
|
|
4410
|
+
* Fields for which the index is defined.
|
|
4411
|
+
*
|
|
4412
|
+
* Max: 3 fields (for a unique index: 1 field)
|
|
4413
|
+
*/
|
|
4414
|
+
fields?: Field[];
|
|
4415
|
+
/**
|
|
4416
|
+
* Current status of the index.
|
|
4417
|
+
* - `BUILDING`: Index creation is in progress.
|
|
4418
|
+
* - `ACTIVE`: Index has been successfully created and can be used in queries.
|
|
4419
|
+
* - `DROPPING`: Index is in the process of being dropped.
|
|
4420
|
+
* - `DROPPED`: Index has been dropped successfully.
|
|
4421
|
+
* - `FAILED`: Index creation has failed.
|
|
4422
|
+
* - `INVALID`: Index contains incorrectly indexed data.
|
|
4423
|
+
* @readonly
|
|
4424
|
+
*/
|
|
4425
|
+
status?: Status;
|
|
4426
|
+
/**
|
|
4427
|
+
* Contains details about the reasons for failure when `status` is `FAILED`.
|
|
4428
|
+
* @readonly
|
|
4429
|
+
*/
|
|
4430
|
+
failure?: Failure;
|
|
4431
|
+
/**
|
|
4432
|
+
* Whether the index enforces uniqueness of values in the field for which it is defined.
|
|
4433
|
+
* If `true`, the index can have only one field.
|
|
4434
|
+
*
|
|
4435
|
+
* Default: `false`
|
|
4436
|
+
*/
|
|
4437
|
+
unique?: boolean;
|
|
4438
|
+
/**
|
|
4439
|
+
* Whether the index ignores case.
|
|
4440
|
+
*
|
|
4441
|
+
* Default: `false`
|
|
4442
|
+
*/
|
|
4443
|
+
caseInsensitive?: boolean;
|
|
4444
|
+
}
|
|
4445
|
+
/**
|
|
4446
|
+
* Order determines how values are ordered in the index. This is important when
|
|
4447
|
+
* ordering and/or range querying by indexed fields.
|
|
4448
|
+
*/
|
|
4449
|
+
declare enum Order {
|
|
4450
|
+
ASC = "ASC",
|
|
4451
|
+
DESC = "DESC"
|
|
4452
|
+
}
|
|
4453
|
+
interface Field {
|
|
4454
|
+
/** Path of the field to index. For example: `title` or `options.price`. */
|
|
4455
|
+
path?: string;
|
|
4456
|
+
/**
|
|
4457
|
+
* Sort order for the index. Base on how the data is regularly queried.
|
|
4458
|
+
*
|
|
4459
|
+
* Default: `ASC`
|
|
4460
|
+
*/
|
|
4461
|
+
order?: Order;
|
|
4462
|
+
}
|
|
4463
|
+
declare enum Status {
|
|
4464
|
+
/** Place holder. Never returned by the service. */
|
|
4465
|
+
UNKNOWN = "UNKNOWN",
|
|
4466
|
+
/** Index creation is in progress. */
|
|
4467
|
+
BUILDING = "BUILDING",
|
|
4468
|
+
/** Index has been successfully created and can be used in queries. */
|
|
4469
|
+
ACTIVE = "ACTIVE",
|
|
4470
|
+
/** Index is in the process of being dropped. */
|
|
4471
|
+
DROPPING = "DROPPING",
|
|
4472
|
+
/** Index has been dropped successfully. */
|
|
4473
|
+
DROPPED = "DROPPED",
|
|
4474
|
+
/** Index creation has failed. */
|
|
4475
|
+
FAILED = "FAILED",
|
|
4476
|
+
/** Index contains incorrectly indexed data. */
|
|
4477
|
+
INVALID = "INVALID"
|
|
4478
|
+
}
|
|
4479
|
+
interface Failure {
|
|
4480
|
+
/**
|
|
4481
|
+
* Error code.
|
|
4482
|
+
* - `WDE0112`: Unknown error while building collection index.
|
|
4483
|
+
* - `WDE0113`: Duplicate key error while building collection index.
|
|
4484
|
+
* - `WDE0114`: Document too large while building collection index.
|
|
4485
|
+
*/
|
|
4486
|
+
code?: string;
|
|
4487
|
+
/** Description of the failure. */
|
|
4488
|
+
description?: string;
|
|
4489
|
+
/**
|
|
4490
|
+
* ID of the data item that caused the failure.
|
|
4491
|
+
* For example, if `unique` is `true`, the ID of an item containing a duplicate value.
|
|
4492
|
+
*/
|
|
4493
|
+
itemId?: string | null;
|
|
4494
|
+
}
|
|
4495
|
+
interface CreateIndexRequest {
|
|
4496
|
+
/** Details of the index to be created. */
|
|
4497
|
+
index: Index;
|
|
4498
|
+
/** ID of the data collection for which to generate the index. */
|
|
4499
|
+
dataCollectionId: string;
|
|
4500
|
+
}
|
|
4501
|
+
declare enum Environment {
|
|
4502
|
+
LIVE = "LIVE",
|
|
4503
|
+
SANDBOX = "SANDBOX",
|
|
4504
|
+
SANDBOX_PREFERRED = "SANDBOX_PREFERRED"
|
|
4505
|
+
}
|
|
4506
|
+
interface CreateIndexResponse {
|
|
4507
|
+
/** Details of the index being generated. */
|
|
4508
|
+
index?: Index;
|
|
4509
|
+
}
|
|
4510
|
+
interface DropIndexRequest {
|
|
4511
|
+
/** Name of the index to drop. */
|
|
4512
|
+
indexName: string;
|
|
4513
|
+
/** ID of the data collection for which the index to be dropped is defined. */
|
|
4514
|
+
dataCollectionId: string;
|
|
4515
|
+
}
|
|
4516
|
+
interface DropIndexResponse {
|
|
4517
|
+
}
|
|
4518
|
+
interface ListIndexesRequest {
|
|
4519
|
+
/**
|
|
4520
|
+
* ID of the data collection for which to list indexes.
|
|
4521
|
+
*
|
|
4522
|
+
*/
|
|
4523
|
+
dataCollectionId: string;
|
|
4524
|
+
/** paging */
|
|
4525
|
+
paging?: Paging;
|
|
4526
|
+
}
|
|
4527
|
+
interface Paging {
|
|
4528
|
+
/** Number of items to load. */
|
|
4529
|
+
limit?: number | null;
|
|
4530
|
+
/** Number of items to skip in the current sort order. */
|
|
4531
|
+
offset?: number | null;
|
|
4532
|
+
}
|
|
4533
|
+
interface ListIndexesResponse {
|
|
4534
|
+
/** List of all indexes for the requested data collection. */
|
|
4535
|
+
indexes?: Index[];
|
|
4536
|
+
/** Paging metadata */
|
|
4537
|
+
pagingMetadata?: PagingMetadata;
|
|
4538
|
+
}
|
|
4539
|
+
interface PagingMetadata {
|
|
4540
|
+
/** Number of items returned in the response. */
|
|
4541
|
+
count?: number | null;
|
|
4542
|
+
/** Offset that was requested. */
|
|
4543
|
+
offset?: number | null;
|
|
4544
|
+
/** Total number of items that match the query. */
|
|
4545
|
+
total?: number | null;
|
|
4546
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
4547
|
+
tooManyToCount?: boolean | null;
|
|
4548
|
+
}
|
|
4549
|
+
interface CreateIndexResponseNonNullableFields {
|
|
4550
|
+
index?: {
|
|
4551
|
+
name: string;
|
|
4552
|
+
fields: {
|
|
4553
|
+
path: string;
|
|
4554
|
+
order: Order;
|
|
4555
|
+
}[];
|
|
4556
|
+
status: Status;
|
|
4557
|
+
failure?: {
|
|
4558
|
+
code: string;
|
|
4559
|
+
description: string;
|
|
4560
|
+
};
|
|
4561
|
+
unique: boolean;
|
|
4562
|
+
caseInsensitive: boolean;
|
|
4563
|
+
};
|
|
4564
|
+
}
|
|
4565
|
+
interface ListIndexesResponseNonNullableFields {
|
|
4566
|
+
indexes: {
|
|
4567
|
+
name: string;
|
|
4568
|
+
fields: {
|
|
4569
|
+
path: string;
|
|
4570
|
+
order: Order;
|
|
4571
|
+
}[];
|
|
4572
|
+
status: Status;
|
|
4573
|
+
failure?: {
|
|
4574
|
+
code: string;
|
|
4575
|
+
description: string;
|
|
4576
|
+
};
|
|
4577
|
+
unique: boolean;
|
|
4578
|
+
caseInsensitive: boolean;
|
|
4579
|
+
}[];
|
|
4580
|
+
}
|
|
4581
|
+
interface ListIndexesOptions {
|
|
4582
|
+
/** paging */
|
|
4583
|
+
paging?: Paging;
|
|
4584
|
+
}
|
|
4585
|
+
|
|
4586
|
+
declare const __metadata: {
|
|
4587
|
+
PACKAGE_NAME: string;
|
|
4588
|
+
};
|
|
4589
|
+
declare function createIndex(httpClient: HttpClient): (dataCollectionId: string, index: Index) => Promise<Index & {
|
|
4590
|
+
name: string;
|
|
4591
|
+
fields: {
|
|
4592
|
+
path: string;
|
|
4593
|
+
order: Order;
|
|
4594
|
+
}[];
|
|
4595
|
+
status: Status;
|
|
4596
|
+
failure?: {
|
|
4597
|
+
code: string;
|
|
4598
|
+
description: string;
|
|
4599
|
+
} | undefined;
|
|
4600
|
+
unique: boolean;
|
|
4601
|
+
caseInsensitive: boolean;
|
|
4602
|
+
}>;
|
|
4603
|
+
declare function dropIndex(httpClient: HttpClient): (dataCollectionId: string, indexName: string) => Promise<void>;
|
|
4604
|
+
declare function listIndexes(httpClient: HttpClient): (dataCollectionId: string, options?: ListIndexesOptions) => Promise<ListIndexesResponse & ListIndexesResponseNonNullableFields>;
|
|
4605
|
+
|
|
4606
|
+
type index_d_CreateIndexRequest = CreateIndexRequest;
|
|
4607
|
+
type index_d_CreateIndexResponse = CreateIndexResponse;
|
|
4608
|
+
type index_d_CreateIndexResponseNonNullableFields = CreateIndexResponseNonNullableFields;
|
|
4609
|
+
type index_d_DropIndexRequest = DropIndexRequest;
|
|
4610
|
+
type index_d_DropIndexResponse = DropIndexResponse;
|
|
4611
|
+
type index_d_Environment = Environment;
|
|
4612
|
+
declare const index_d_Environment: typeof Environment;
|
|
4613
|
+
type index_d_Failure = Failure;
|
|
4614
|
+
type index_d_Field = Field;
|
|
4615
|
+
type index_d_Index = Index;
|
|
4616
|
+
type index_d_ListIndexesOptions = ListIndexesOptions;
|
|
4617
|
+
type index_d_ListIndexesRequest = ListIndexesRequest;
|
|
4618
|
+
type index_d_ListIndexesResponse = ListIndexesResponse;
|
|
4619
|
+
type index_d_ListIndexesResponseNonNullableFields = ListIndexesResponseNonNullableFields;
|
|
4620
|
+
type index_d_Order = Order;
|
|
4621
|
+
declare const index_d_Order: typeof Order;
|
|
4622
|
+
type index_d_Paging = Paging;
|
|
4623
|
+
type index_d_PagingMetadata = PagingMetadata;
|
|
4624
|
+
type index_d_Status = Status;
|
|
4625
|
+
declare const index_d_Status: typeof Status;
|
|
4626
|
+
declare const index_d___metadata: typeof __metadata;
|
|
4627
|
+
declare const index_d_createIndex: typeof createIndex;
|
|
4628
|
+
declare const index_d_dropIndex: typeof dropIndex;
|
|
4629
|
+
declare const index_d_listIndexes: typeof listIndexes;
|
|
4630
|
+
declare namespace index_d {
|
|
4631
|
+
export { type index_d_CreateIndexRequest as CreateIndexRequest, type index_d_CreateIndexResponse as CreateIndexResponse, type index_d_CreateIndexResponseNonNullableFields as CreateIndexResponseNonNullableFields, type index_d_DropIndexRequest as DropIndexRequest, type index_d_DropIndexResponse as DropIndexResponse, index_d_Environment as Environment, type index_d_Failure as Failure, type index_d_Field as Field, type index_d_Index as Index, type index_d_ListIndexesOptions as ListIndexesOptions, type index_d_ListIndexesRequest as ListIndexesRequest, type index_d_ListIndexesResponse as ListIndexesResponse, type index_d_ListIndexesResponseNonNullableFields as ListIndexesResponseNonNullableFields, index_d_Order as Order, type index_d_Paging as Paging, type index_d_PagingMetadata as PagingMetadata, index_d_Status as Status, index_d___metadata as __metadata, index_d_createIndex as createIndex, index_d_dropIndex as dropIndex, index_d_listIndexes as listIndexes };
|
|
4632
|
+
}
|
|
4633
|
+
|
|
4634
|
+
export { index_d$2 as collections, index_d$3 as externalDatabaseConnections, index_d as indexes, index_d$1 as items };
|