@wix/data 1.0.129 → 1.0.130

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