@wix/data 1.0.179 → 1.0.181

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.
Files changed (35) hide show
  1. package/context.js.map +1 -0
  2. package/context.ts +4 -0
  3. package/index.js.map +1 -0
  4. package/index.ts +6 -0
  5. package/meta.js.map +1 -0
  6. package/meta.ts +4 -0
  7. package/package.json +35 -23
  8. package/service-plugins-context.js.map +1 -0
  9. package/service-plugins-context.ts +1 -0
  10. package/service-plugins.js.map +1 -0
  11. package/service-plugins.ts +1 -0
  12. package/build/cjs/context.js.map +0 -1
  13. package/build/cjs/index.js.map +0 -1
  14. package/build/cjs/meta.js.map +0 -1
  15. package/build/cjs/service-plugins-context.js.map +0 -1
  16. package/build/cjs/service-plugins.js.map +0 -1
  17. package/context/package.json +0 -7
  18. package/meta/package.json +0 -7
  19. package/service-plugins/context/package.json +0 -7
  20. package/service-plugins/package.json +0 -7
  21. package/type-bundles/context.bundle.d.ts +0 -5235
  22. package/type-bundles/index.bundle.d.ts +0 -5235
  23. package/type-bundles/meta.bundle.d.ts +0 -4623
  24. package/type-bundles/service-plugins-context.bundle.d.ts +0 -1330
  25. package/type-bundles/service-plugins.bundle.d.ts +0 -1330
  26. /package/{build/cjs/context.d.ts → context.d.ts} +0 -0
  27. /package/{build/cjs/context.js → context.js} +0 -0
  28. /package/{build/cjs/index.d.ts → index.d.ts} +0 -0
  29. /package/{build/cjs/index.js → index.js} +0 -0
  30. /package/{build/cjs/meta.d.ts → meta.d.ts} +0 -0
  31. /package/{build/cjs/meta.js → meta.js} +0 -0
  32. /package/{build/cjs/service-plugins-context.d.ts → service-plugins-context.d.ts} +0 -0
  33. /package/{build/cjs/service-plugins-context.js → service-plugins-context.js} +0 -0
  34. /package/{build/cjs/service-plugins.d.ts → service-plugins.d.ts} +0 -0
  35. /package/{build/cjs/service-plugins.js → service-plugins.js} +0 -0
@@ -1,1330 +0,0 @@
1
- /** Dummy entity. */
2
- interface MainEntity {
3
- /**
4
- * Dummy ID.
5
- * @readonly
6
- */
7
- _id?: string;
8
- }
9
- interface QueryDataItemsRequest {
10
- /** ID of the collection to query. */
11
- collectionId: string;
12
- /** Query preferences. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for information about handling data queries. */
13
- query: QueryV2;
14
- /**
15
- * Fields for which to include the full referenced items in the query's results, rather than just their IDs.
16
- * Returned items are sorted in ascending order by the creation date of the reference.
17
- * If the field being querried is a multi-reference field and the array is empty, the response does not return any items.
18
- */
19
- includeReferencedItems?: ReferencedItemToInclude[];
20
- /** Whether to retrieve data from the primary database instance. This decreases performance but ensures data retrieved is up-to-date even immediately after an update. Applicable if the external database is eventually consistent. */
21
- consistentRead: boolean;
22
- /** When `true`, the query response must include the total number of items that match the query. */
23
- returnTotalCount: boolean;
24
- }
25
- interface QueryV2 extends QueryV2PagingMethodOneOf {
26
- /** Paging options to limit and skip the number of items. Paging mode is defined when the collection is created. */
27
- paging?: Paging;
28
- /** 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`. Paging mode is defined when the collection is created. */
29
- cursorPaging?: CursorPaging;
30
- /**
31
- * Filter object in the following format:
32
- * `"filter" : {
33
- * "fieldName1": "value1",
34
- * "fieldName2":{"$operator":"value2"}
35
- * }`
36
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
37
- *
38
- * **Note:** Your endpoint must properly handle requests with filtering preferences that adhere to Wix Data data types. For example, a query request that includes filtering by a field whose type is Date and Time would contain 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).
39
- */
40
- filter?: Record<string, any> | null;
41
- /**
42
- * Sort object in the following format:
43
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
44
- */
45
- sort?: Sorting[];
46
- /** Array of projected fields. A list of specific field names to return. */
47
- fields?: string[];
48
- }
49
- /** @oneof */
50
- interface QueryV2PagingMethodOneOf {
51
- /** Paging options to limit and skip the number of items. Paging mode is defined when the collection is created. */
52
- paging?: Paging;
53
- /** 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`. Paging mode is defined when the collection is created. */
54
- cursorPaging?: CursorPaging;
55
- }
56
- interface Sorting {
57
- /** Name of the field to sort by. */
58
- fieldName?: string;
59
- /** Sort order. */
60
- order?: SortOrder;
61
- }
62
- declare enum SortOrder {
63
- ASC = "ASC",
64
- DESC = "DESC"
65
- }
66
- interface Paging {
67
- /** Number of items to load. */
68
- limit?: number | null;
69
- /** Number of items to skip in the current sort order. */
70
- offset?: number | null;
71
- }
72
- interface CursorPaging {
73
- /** Number of items to load. */
74
- limit?: number | null;
75
- /**
76
- * Pointer to the next or previous page in the list of results.
77
- *
78
- * You can get the relevant cursor token
79
- * from the `pagingMetadata` object in the previous call's response.
80
- * Not relevant for the first request.
81
- */
82
- cursor?: string | null;
83
- }
84
- interface ReferencedItemToInclude {
85
- /** Field name in the referencing collection. */
86
- fieldKey?: string;
87
- /** Maximum number of referenced items to return. */
88
- limit?: number;
89
- /** Filter criteria to specify which items to include in the response. */
90
- filter?: Record<string, any> | null;
91
- }
92
- interface QueryDataItemsResponse {
93
- /** Retrieved items. */
94
- items?: Record<string, any>[] | null;
95
- /** Pagination information. */
96
- pagingMetadata?: PagingMetadataV2;
97
- }
98
- interface PagingMetadataV2 {
99
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
100
- total?: number | null;
101
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
102
- cursors?: Cursors;
103
- }
104
- interface Cursors {
105
- /** Cursor pointing to next page in the list of results. */
106
- next?: string | null;
107
- /** Cursor pointing to previous page in the list of results. */
108
- prev?: string | null;
109
- }
110
- interface ItemAlreadyExistsError {
111
- /** ID of the item that already exists. */
112
- itemId?: string;
113
- }
114
- interface ItemNotFoundError {
115
- /** ID of the item that was not found. */
116
- itemId?: string;
117
- }
118
- interface CollectionAlreadyExistsError {
119
- /** ID of the collection that already exists. */
120
- collectionId?: string;
121
- }
122
- interface CollectionNotFoundError {
123
- /** ID of the collection that was not found. */
124
- collectionId?: string;
125
- }
126
- interface ReferenceAlreadyExistsError {
127
- /** ID of the referring item. */
128
- referringItemId?: string;
129
- /** ID of the referenced item. */
130
- referencedItemId?: string;
131
- }
132
- interface ReferenceNotFoundError {
133
- /** ID of the referring item. */
134
- referringItemId?: string;
135
- /** ID of the referenced item. */
136
- referencedItemId?: string;
137
- }
138
- interface ValidationError {
139
- /** Violations that caused the validation to fail. */
140
- violations?: ValidationViolation[];
141
- }
142
- interface ValidationViolation {
143
- /** Path to the invalid field that caused the violation. */
144
- fieldPath?: string | null;
145
- /** The rejected value. */
146
- rejectedValue?: string | null;
147
- /** Error message that describes the violation. */
148
- message?: string;
149
- }
150
- interface CollectionChangeNotSupported {
151
- /** Errors that caused the change to fail. Learn more about [errors](data/cloud-data-spi/proto-spi/docs/errors.md) in the External Database Connections service plugin. */
152
- errors?: CollectionChangeNotSupportedError[];
153
- }
154
- interface CollectionChangeNotSupportedError {
155
- /** Key of collection field that can't be changed. */
156
- fieldKey?: string | null;
157
- /** Error message with additional details. */
158
- message?: string;
159
- }
160
- interface CountDataItemsRequest {
161
- /** ID of the collection to query. */
162
- collectionId: string;
163
- /** Filter to specify which items to count. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section) for more information about handling data queries. */
164
- filter: Record<string, any> | null;
165
- /** Whether to retrieve data from the primary database instance. This decreases performance but ensures data retrieved is up-to-date even immediately after an update. Applicable if the external database is eventually consistent. */
166
- consistentRead: boolean;
167
- }
168
- interface CountDataItemsResponse {
169
- /** Number of items that match the query. */
170
- totalCount?: number;
171
- }
172
- interface AggregateDataItemsRequest extends AggregateDataItemsRequestPagingMethodOneOf {
173
- paging?: Paging;
174
- cursorPaging?: CursorPaging;
175
- /** ID of the collection on which to run the aggregation. */
176
- collectionId: string;
177
- /** Filter to apply to the collection's data before aggregation. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section) for more information about handling data queries. */
178
- initialFilter?: Record<string, any> | null;
179
- /** Aggregation to apply to the data. */
180
- aggregation?: Aggregation;
181
- /** Filter to apply to the processed data after aggregation. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section) for more information about handling data queries. */
182
- finalFilter?: Record<string, any> | null;
183
- /** Sorting configuration. */
184
- sort?: Sorting[];
185
- /** Whether to retrieve data from the primary database instance. This decreases performance but ensures data retrieved is up-to-date even immediately after an update. Applicable if the external database is eventually consistent. */
186
- consistentRead: boolean;
187
- /** When `true`, the query response must include the total number of items that match the query. */
188
- returnTotalCount: boolean;
189
- }
190
- /** @oneof */
191
- interface AggregateDataItemsRequestPagingMethodOneOf {
192
- paging?: Paging;
193
- cursorPaging?: CursorPaging;
194
- }
195
- interface Operation extends OperationCalculateOneOf {
196
- /** Calculate the average value of a specified field for all items in the grouping. */
197
- average?: Average;
198
- /** Calculate the minimum value of a specified field for all items in the grouping. */
199
- min?: Min;
200
- /** Calculate the maximum value of a specified field for all items in the grouping. */
201
- max?: Max;
202
- /** Calculate the sum of values of a specified field for all items in the grouping. */
203
- sum?: Sum;
204
- /** Calculate the number of items in the grouping. */
205
- itemCount?: Count;
206
- /** Name of the field that contains the results of the operation. */
207
- resultFieldName?: string;
208
- }
209
- /** @oneof */
210
- interface OperationCalculateOneOf {
211
- /** Calculate the average value of a specified field for all items in the grouping. */
212
- average?: Average;
213
- /** Calculate the minimum value of a specified field for all items in the grouping. */
214
- min?: Min;
215
- /** Calculate the maximum value of a specified field for all items in the grouping. */
216
- max?: Max;
217
- /** Calculate the sum of values of a specified field for all items in the grouping. */
218
- sum?: Sum;
219
- /** Calculate the number of items in the grouping. */
220
- itemCount?: Count;
221
- }
222
- interface Average {
223
- /** Name of the field for which to calculate the average value. */
224
- itemFieldName?: string;
225
- }
226
- interface Min {
227
- /** Name of the field for which to calculate the minimum value. */
228
- itemFieldName?: string;
229
- }
230
- interface Max {
231
- /** Name of the field for which to calculate the maximum value. */
232
- itemFieldName?: string;
233
- }
234
- interface Sum {
235
- /** Name of the field for which to calculate the sum. */
236
- itemFieldName?: string;
237
- }
238
- interface Count {
239
- }
240
- interface Aggregation {
241
- /** Fields by which to group items for the aggregation, in the order they appear in the array. If empty, the aggregation must be applied to the entire collection. */
242
- groupingFields?: string[];
243
- /** Operations to carry out on the data in each grouping. */
244
- operations?: Operation[];
245
- }
246
- interface AggregateDataItemsResponse {
247
- /** Aggregation results. Each result must contain a field for each `groupingFields` value, and a field for each `operations.resultFieldName` value. */
248
- items?: Record<string, any>[] | null;
249
- /** Paging information. */
250
- pagingMetadata?: PagingMetadataV2;
251
- }
252
- interface QueryDistinctValuesRequest extends QueryDistinctValuesRequestPagingMethodOneOf {
253
- paging?: Paging;
254
- cursorPaging?: CursorPaging;
255
- /** ID of the collection to query. */
256
- collectionId: string;
257
- /** Filter to apply to the collection's data before aggregation. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section) for more information about handling data queries. */
258
- filter?: Record<string, any> | null;
259
- /** Item field name for which to return all distinct values. */
260
- fieldName: string;
261
- /** Order to by which to sort the results. Valid values are `ASC` and `DESC`. */
262
- order?: SortOrder;
263
- /** Whether to retrieve data from the primary database instance. This decreases performance but ensures data retrieved is up-to-date even immediately after an update. Applicable if the external database is eventually consistent. */
264
- consistentRead: boolean;
265
- /** When `true`, the query response must include the total number of items that match the query. */
266
- returnTotalCount: boolean;
267
- }
268
- /** @oneof */
269
- interface QueryDistinctValuesRequestPagingMethodOneOf {
270
- paging?: Paging;
271
- cursorPaging?: CursorPaging;
272
- }
273
- interface QueryDistinctValuesResponse {
274
- /**
275
- * List of distinct values contained in the field specified in `fieldName`. Values can be of any JSON type.
276
- * If the field is an array, values must be unwound, independent values. For example, if the field name contains `["a", "b", "c"]`, the result must contain `"a"`, `"b"` and `"c"` as separate values.
277
- */
278
- distinctValues?: any[];
279
- /** Paging information. */
280
- pagingMetadata?: PagingMetadataV2;
281
- }
282
- interface InsertDataItemsRequest {
283
- /** ID of the collection in which to insert the items. */
284
- collectionId: string;
285
- /** Items to insert. */
286
- items: Record<string, any>[] | null;
287
- }
288
- interface InsertDataItemsResponse {
289
- /** Response must include either the inserted item or an error. */
290
- results?: DataItemModificationResult[];
291
- }
292
- interface DataItemModificationResult extends DataItemModificationResultResultOneOf {
293
- /** Item that was inserted, updated or removed. */
294
- item?: Record<string, any> | null;
295
- /** Error indicating why the operation failed for a particular item. Learn more about [error types](https://dev.wix.com/docs/rest/assets/data/external-database-spi/understanding-error-types-in-the-external-database-connections-spi) in the External Database Connections service plugin. */
296
- error?: Error$1;
297
- }
298
- /** @oneof */
299
- interface DataItemModificationResultResultOneOf {
300
- /** Item that was inserted, updated or removed. */
301
- item?: Record<string, any> | null;
302
- /** Error indicating why the operation failed for a particular item. Learn more about [error types](https://dev.wix.com/docs/rest/assets/data/external-database-spi/understanding-error-types-in-the-external-database-connections-spi) in the External Database Connections service plugin. */
303
- error?: Error$1;
304
- }
305
- interface Error$1 {
306
- /** Error code. */
307
- errorCode?: string;
308
- /** Error description. */
309
- errorMessage?: string | null;
310
- /** Additional error data specific to the error code. */
311
- data?: Record<string, any> | null;
312
- }
313
- interface UpdateDataItemsRequest {
314
- /** ID of the collection in which to update the items. */
315
- collectionId: string;
316
- /** Items to update. */
317
- items: Record<string, any>[] | null;
318
- }
319
- interface UpdateDataItemsResponse {
320
- /** Response must include either the updated item or an error. */
321
- results?: DataItemModificationResult[];
322
- }
323
- interface RemoveDataItemsRequest {
324
- /** ID of the collection from which to remove items. */
325
- collectionId: string;
326
- /** IDs of items to remove. */
327
- itemIds: string[];
328
- }
329
- interface RemoveDataItemsResponse {
330
- /** Response must include either the removed item or an error. */
331
- results?: DataItemModificationResult[];
332
- }
333
- interface TruncateDataItemsRequest {
334
- /** ID of the collection from which to remove all items. */
335
- collectionId: string;
336
- }
337
- interface TruncateDataItemsResponse {
338
- }
339
- interface QueryReferencedDataItemsRequest extends QueryReferencedDataItemsRequestPagingMethodOneOf {
340
- /** Offset-based paging */
341
- paging?: Paging;
342
- /** Cursor-based paging */
343
- cursorPaging?: CursorPaging;
344
- /** ID of the collection to query. */
345
- collectionId: string;
346
- /** IDs of the referring items. If the array is empty, return results for all referring items. */
347
- referringItemIds?: string[];
348
- /** IDs of the referenced items. If the array is empty, return all referenced items for the referring items. */
349
- referencedItemIds?: string[];
350
- /** Order to by which to sort the results. Valid values are `ASC` and `DESC`. */
351
- order?: SortOrder;
352
- /** Field ID to query in the referring collection. */
353
- referringFieldKey: string;
354
- /** Whether to retrieve data from the primary database instance. This decreases performance but ensures data retrieved is up-to-date even immediately after an update. Applicable if the external database is eventually consistent. */
355
- consistentRead: boolean;
356
- /** Fields to return in the referenced item. If the array is empty or not provided, all fields in the referenced item are returned. */
357
- fieldsToReturn?: string[];
358
- /** When `true`, the response includes the total number of the items that match the query. */
359
- returnTotalCount: boolean;
360
- /** When `true`, the response includes the full referenced items. When `false`, only the IDs of referenced items be returned. */
361
- includeReferencedItems: boolean;
362
- }
363
- /** @oneof */
364
- interface QueryReferencedDataItemsRequestPagingMethodOneOf {
365
- /** Offset-based paging */
366
- paging?: Paging;
367
- /** Cursor-based paging */
368
- cursorPaging?: CursorPaging;
369
- }
370
- interface QueryReferencedDataItemsResponse {
371
- /** Retrieved references. */
372
- items?: ReferencedItem[];
373
- /** Paging information. */
374
- pagingMetadata?: PagingMetadataV2;
375
- }
376
- interface ReferencedItem {
377
- /** ID of the item in the referring collection. */
378
- referringItemId?: string;
379
- /** ID of the item in the referenced collection. */
380
- referencedItemId?: string;
381
- /** Item in the referenced collection. If the external database does not support returning referenced items, this field can remain empty. */
382
- referencedItem?: Record<string, any> | null;
383
- }
384
- interface InsertDataItemReferencesRequest {
385
- /** ID of the referring collection. */
386
- collectionId: string;
387
- /** Field ID of the field in the referring collection to insert references into. */
388
- referringFieldKey: string;
389
- /** References to insert. */
390
- references: ReferenceId[];
391
- }
392
- interface ReferenceId {
393
- /** ID of the item in the referring collection. */
394
- referringItemId?: string;
395
- /** ID of the item in the referenced collection. */
396
- referencedItemId?: string;
397
- }
398
- interface InsertDataItemReferencesResponse {
399
- /** Response must include either the inserted reference or an error. */
400
- results?: ReferenceModificationResult[];
401
- }
402
- interface ReferenceModificationResult extends ReferenceModificationResultResultOneOf {
403
- /** Reference that was inserted or removed. */
404
- reference?: ReferenceId;
405
- /** Error indicating why the operation failed for a particular item. Learn more about [error types](https://dev.wix.com/docs/rest/assets/data/external-database-spi/understanding-error-types-in-the-external-database-connections-spi) in the External Database Connections service plugin. */
406
- error?: Error$1;
407
- }
408
- /** @oneof */
409
- interface ReferenceModificationResultResultOneOf {
410
- /** Reference that was inserted or removed. */
411
- reference?: ReferenceId;
412
- /** Error indicating why the operation failed for a particular item. Learn more about [error types](https://dev.wix.com/docs/rest/assets/data/external-database-spi/understanding-error-types-in-the-external-database-connections-spi) in the External Database Connections service plugin. */
413
- error?: Error$1;
414
- }
415
- interface RemoveDataItemReferencesRequest {
416
- /** ID of the referring collection. */
417
- collectionId: string;
418
- /** Field ID of the field in the referring collection to remove references from. */
419
- referringFieldKey: string;
420
- /** References to remove. */
421
- references: ReferenceId[];
422
- }
423
- interface RemoveDataItemReferencesResponse {
424
- /** Response must include either the removed reference or an error. */
425
- results?: ReferenceModificationResult[];
426
- }
427
- interface ListCollectionsRequest {
428
- /** IDs of collections to retrieve. If empty, all available collections are retrieved. */
429
- collectionIds?: string[];
430
- }
431
- interface ListCollectionsResponse {
432
- /** List of the retrieved collections. */
433
- collections?: Collection[];
434
- }
435
- interface Collection {
436
- /** ID of the collection. */
437
- _id?: string;
438
- /** Collection display name as it appears in the CMS. For example, `My First Collection`. */
439
- displayName?: string | null;
440
- /** Collection fields. */
441
- fields?: Field[];
442
- /**
443
- * Capabilities the collection supports. This is set by the external database, and is ignored in the body of the request.
444
- * @readonly
445
- */
446
- capabilities?: CollectionCapabilities;
447
- /** Levels of permission for accessing and modifying data. These are defined by the lowest role needed to perform each action. */
448
- permissions?: Permissions;
449
- /**
450
- * Whether the collection supports cursor- or offset-based paging. Each paging mode requires different configuration parameters.
451
- * @readonly
452
- */
453
- pagingMode?: PagingMode;
454
- }
455
- interface Field extends FieldTypeOptionsOneOf {
456
- singleReferenceOptions?: SingleReferenceOptions;
457
- multiReferenceOptions?: MultiReferenceOptions;
458
- arrayOptions?: ArrayOptions;
459
- objectOptions?: ObjectOptions;
460
- /** Field identifier. */
461
- key?: string;
462
- /** Field display name as it appears in the CMS. For example, `First Name`. */
463
- displayName?: string | null;
464
- /** Field description. */
465
- description?: string | null;
466
- /** Field type. */
467
- type?: FieldType;
468
- /**
469
- * Capabilities the collection supports. This is set by the external database and is ignored in the body of the request.
470
- * @readonly
471
- */
472
- capabilities?: FieldCapabilities;
473
- /** Whether the field value is encrypted and sent as an object. Encryption and decryption are handled by Wix. Default: `false`. */
474
- encrypted?: boolean;
475
- }
476
- /** @oneof */
477
- interface FieldTypeOptionsOneOf {
478
- singleReferenceOptions?: SingleReferenceOptions;
479
- multiReferenceOptions?: MultiReferenceOptions;
480
- arrayOptions?: ArrayOptions;
481
- objectOptions?: ObjectOptions;
482
- }
483
- declare enum FieldType {
484
- UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
485
- TEXT = "TEXT",
486
- NUMBER = "NUMBER",
487
- DATE = "DATE",
488
- DATETIME = "DATETIME",
489
- IMAGE = "IMAGE",
490
- BOOLEAN = "BOOLEAN",
491
- DOCUMENT = "DOCUMENT",
492
- URL = "URL",
493
- RICH_TEXT = "RICH_TEXT",
494
- VIDEO = "VIDEO",
495
- ANY = "ANY",
496
- ARRAY_STRING = "ARRAY_STRING",
497
- ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
498
- AUDIO = "AUDIO",
499
- TIME = "TIME",
500
- LANGUAGE = "LANGUAGE",
501
- RICH_CONTENT = "RICH_CONTENT",
502
- MEDIA_GALLERY = "MEDIA_GALLERY",
503
- ADDRESS = "ADDRESS",
504
- REFERENCE = "REFERENCE",
505
- MULTI_REFERENCE = "MULTI_REFERENCE",
506
- OBJECT = "OBJECT",
507
- ARRAY = "ARRAY"
508
- }
509
- interface FieldCapabilities {
510
- /** Whether the field can be used to sort the items in a collection. Default: `false`. */
511
- sortable?: boolean;
512
- /** Query operators that can be used for this field. */
513
- queryOperators?: QueryOperator[];
514
- }
515
- declare enum QueryOperator {
516
- EQ = "EQ",
517
- LT = "LT",
518
- GT = "GT",
519
- NE = "NE",
520
- LTE = "LTE",
521
- GTE = "GTE",
522
- STARTS_WITH = "STARTS_WITH",
523
- ENDS_WITH = "ENDS_WITH",
524
- CONTAINS = "CONTAINS",
525
- HAS_SOME = "HAS_SOME",
526
- HAS_ALL = "HAS_ALL",
527
- EXISTS = "EXISTS",
528
- URLIZED = "URLIZED"
529
- }
530
- interface SingleReferenceOptions {
531
- /**
532
- * ID of the referenced collection.
533
- *
534
- * When the referring field is a single-reference field, it refers to the `_id` field of the referenced collection.
535
- */
536
- referencedCollectionId?: string;
537
- }
538
- interface MultiReferenceOptions {
539
- /** ID of the referenced collection. */
540
- referencedCollectionId?: string;
541
- /** Field ID of the referenced field in the referenced collection. */
542
- referencedCollectionFieldKey?: string | null;
543
- /** Field display name of the referenced field in the referenced collection. */
544
- referencedCollectionFieldDisplayName?: string | null;
545
- }
546
- interface ArrayOptions extends ArrayOptionsTypeOptionsOneOf {
547
- singleReferenceOptions?: SingleReferenceOptions;
548
- multiReferenceOptions?: MultiReferenceOptions;
549
- arrayOptions?: ArrayOptions;
550
- objectOptions?: ObjectOptions;
551
- /** Element data type. */
552
- elementType?: FieldType;
553
- }
554
- /** @oneof */
555
- interface ArrayOptionsTypeOptionsOneOf {
556
- singleReferenceOptions?: SingleReferenceOptions;
557
- multiReferenceOptions?: MultiReferenceOptions;
558
- arrayOptions?: ArrayOptions;
559
- objectOptions?: ObjectOptions;
560
- }
561
- interface ObjectOptions {
562
- /** Fields within the object. */
563
- fields?: ObjectField[];
564
- }
565
- interface ObjectField extends ObjectFieldTypeOptionsOneOf {
566
- singleReferenceOptions?: SingleReferenceOptions;
567
- multiReferenceOptions?: MultiReferenceOptions;
568
- arrayOptions?: ArrayOptions;
569
- objectOptions?: ObjectOptions;
570
- /** Field ID. */
571
- key?: string;
572
- /** Field display name. */
573
- displayName?: string | null;
574
- /** Field type. */
575
- type?: FieldType;
576
- /**
577
- * Capabilities the object field supports.
578
- * @readonly
579
- */
580
- capabilities?: FieldCapabilities;
581
- }
582
- /** @oneof */
583
- interface ObjectFieldTypeOptionsOneOf {
584
- singleReferenceOptions?: SingleReferenceOptions;
585
- multiReferenceOptions?: MultiReferenceOptions;
586
- arrayOptions?: ArrayOptions;
587
- objectOptions?: ObjectOptions;
588
- }
589
- interface CollectionCapabilities {
590
- /** Data operations that can be performed on items in the collection. */
591
- dataOperations?: DataOperation[];
592
- }
593
- declare enum DataOperation {
594
- QUERY = "QUERY",
595
- COUNT = "COUNT",
596
- QUERY_REFERENCED = "QUERY_REFERENCED",
597
- AGGREGATE = "AGGREGATE",
598
- DISTINCT = "DISTINCT",
599
- INSERT = "INSERT",
600
- UPDATE = "UPDATE",
601
- REMOVE = "REMOVE",
602
- TRUNCATE = "TRUNCATE",
603
- INSERT_REFERENCES = "INSERT_REFERENCES",
604
- REMOVE_REFERENCES = "REMOVE_REFERENCES"
605
- }
606
- interface Permissions {
607
- /** Lowest role required to add a collection. */
608
- insert?: Role;
609
- /** Lowest role required to update a collection. */
610
- update?: Role;
611
- /** Lowest role required to remove a collection. */
612
- remove?: Role;
613
- /** Lowest role required to read a collection. */
614
- read?: Role;
615
- }
616
- declare enum Role {
617
- /** Site administrator. */
618
- ADMIN = "ADMIN",
619
- /** A signed-in user who inserted content to this collection. */
620
- SITE_MEMBER_AUTHOR = "SITE_MEMBER_AUTHOR",
621
- /** Any signed-in user. */
622
- SITE_MEMBER = "SITE_MEMBER",
623
- /** Any site visitor. */
624
- ANYONE = "ANYONE"
625
- }
626
- declare enum PagingMode {
627
- UNKNOWN_PAGING_MODE = "UNKNOWN_PAGING_MODE",
628
- /** Offset-based paging. */
629
- OFFSET = "OFFSET",
630
- /** Cursor-based paging. */
631
- CURSOR = "CURSOR"
632
- }
633
- interface CreateCollectionRequest {
634
- /** Details of the collection to create. */
635
- collection?: Collection;
636
- }
637
- interface CreateCollectionResponse {
638
- /** Details of the created collection. */
639
- collection?: Collection;
640
- }
641
- interface UpdateCollectionRequest {
642
- /** Updated structure details for the specified collection. */
643
- collection?: Collection;
644
- }
645
- interface UpdateCollectionResponse {
646
- /** Updated collection details. */
647
- collection?: Collection;
648
- }
649
- interface DeleteCollectionRequest {
650
- /** ID of the collection to delete. */
651
- collectionId: string;
652
- }
653
- interface DeleteCollectionResponse {
654
- }
655
- interface GetCapabilitiesRequest {
656
- }
657
- interface GetCapabilitiesResponse {
658
- /** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */
659
- supportsCollectionModifications?: boolean;
660
- /** Field types the external database supports. This field only applies when `supportsCollectionModifications` is true. */
661
- supportedFieldTypes?: FieldType[];
662
- }
663
- interface IndexOptions {
664
- /** Whether the external database supports creating, listing and removing indexes. */
665
- supportsIndexes?: boolean;
666
- /** Maximum number of regular (non-unique) indexes allowed for this collection. */
667
- maxNumberOfRegularIndexesPerCollection?: number;
668
- /** Maximum number of unique indexes allowed for this collection. */
669
- maxNumberOfUniqueIndexesPerCollection?: number;
670
- /** Maximum number of regular and unique indexes allowed for this collection. */
671
- maxNumberOfIndexesPerCollection?: number;
672
- }
673
- interface ListIndexesRequest {
674
- /** collection to list indexes from */
675
- collectionId: string;
676
- }
677
- interface ListIndexesResponse {
678
- /** list of indexes */
679
- indexes?: Index[];
680
- }
681
- interface Index {
682
- /** Index name */
683
- name?: string;
684
- /** Fields over which the index is defined */
685
- fields?: IndexField[];
686
- /**
687
- * Indicates current status of index
688
- * @readonly
689
- */
690
- status?: Status;
691
- /** If true index will enforce that values in the field are unique in scope of a collection. Default is false. */
692
- unique?: boolean;
693
- /** If true index will be case-insensitive. Default is false. */
694
- caseInsensitive?: boolean;
695
- /**
696
- * Contains details about failure reason when index is in *FAILED* status
697
- * @readonly
698
- */
699
- failure?: Error$1;
700
- }
701
- /**
702
- * Order determines how values are ordered in the index. This is important when
703
- * ordering and/or range querying by indexed fields.
704
- */
705
- declare enum Order {
706
- ASC = "ASC",
707
- DESC = "DESC"
708
- }
709
- interface IndexField {
710
- /** Field to index. For example: title, options.price */
711
- path?: string;
712
- /** Order in which to keep the values. Default is ASC. */
713
- order?: Order;
714
- }
715
- declare enum Status {
716
- /** Place holder. Never returned by the service. */
717
- UNKNOWN = "UNKNOWN",
718
- /** Index creation is in progress. */
719
- BUILDING = "BUILDING",
720
- /** Index has been successfully created. It can be used in queries. */
721
- ACTIVE = "ACTIVE",
722
- /** Index is being dropped. */
723
- DROPPING = "DROPPING",
724
- /** Index is successfully dropped. */
725
- DROPPED = "DROPPED",
726
- /** Index creation has failed. */
727
- FAILED = "FAILED",
728
- /** Index contains incorrectly indexed data. */
729
- INVALID = "INVALID"
730
- }
731
- interface CreateIndexRequest {
732
- /** collection to list indexes from */
733
- collectionId: string;
734
- /** index definition */
735
- index: Index;
736
- }
737
- interface CreateIndexResponse {
738
- /** created index and its status */
739
- index?: Index;
740
- }
741
- interface RemoveIndexRequest {
742
- /** collection to delete index from */
743
- collectionId: string;
744
- /** index name */
745
- indexName: string;
746
- }
747
- interface RemoveIndexResponse {
748
- }
749
- interface ExternalDatabaseSpiConfig {
750
- /** The URI where the service provider is deployed. */
751
- uriConfig?: SpiBaseUri;
752
- /** The namespace of the external database. This can be used to access collections within the database, for example `namespace/collectionId`. */
753
- namespace?: string;
754
- }
755
- interface SpiBaseUri {
756
- /**
757
- * Base URI where the methods are called. Wix appends the path to the `baseUri`.
758
- * For example, to call the Get Shipping Rates method at `https://my-shipping-provider.com/v1/getRates`, the base URI you provide here is `https://my-shipping-provider.com/`.
759
- */
760
- baseUri?: string;
761
- /** Alternate, custom URIs to replace the default URIs for specific service plugin methods. */
762
- alternativeUris?: AlternativeUri[];
763
- }
764
- interface AlternativeUri {
765
- /**
766
- * Name of the method to create a custom URI for.
767
- *
768
- * For `methodName`, use the name of the method in PascalCase.
769
- * For example, for Get Shipping Rates use `GetShippingRates`.
770
- */
771
- methodName?: string;
772
- /**
773
- * Custom URI that Wix uses to call your server for this method. The path-suffix documented in the method will not be appended to this URI.
774
- * Must be a secured endpoint beginning with `https://`. For example, `https://www.my-shipping-provider.com/my-shipping-rates`.
775
- */
776
- absoluteUri?: string;
777
- }
778
- /**
779
- * this message is not directly used by any service,
780
- * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.
781
- * e.g. SPIs, event-handlers, etc..
782
- * NOTE: this context object MUST be provided as the last argument in each Velo method signature.
783
- *
784
- * Example:
785
- * ```typescript
786
- * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {
787
- * ...
788
- * }
789
- * ```
790
- */
791
- interface Context {
792
- /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
793
- requestId?: string | null;
794
- /** [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code. */
795
- currency?: string | null;
796
- /** An object that describes the identity that triggered this request. */
797
- identity?: IdentificationData;
798
- /** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
799
- languages?: string[];
800
- /** The service provider app's instance ID. */
801
- instanceId?: string | null;
802
- }
803
- declare enum IdentityType {
804
- UNKNOWN = "UNKNOWN",
805
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
806
- MEMBER = "MEMBER",
807
- WIX_USER = "WIX_USER",
808
- APP = "APP"
809
- }
810
- interface IdentificationData extends IdentificationDataIdOneOf {
811
- /** ID of a site visitor that has not logged in to the site. */
812
- anonymousVisitorId?: string;
813
- /** ID of a site visitor that has logged in to the site. */
814
- memberId?: string;
815
- /** ID of a Wix user (site owner, contributor, etc.). */
816
- wixUserId?: string;
817
- /** ID of an app. */
818
- appId?: string;
819
- /** @readonly */
820
- identityType?: IdentityType;
821
- }
822
- /** @oneof */
823
- interface IdentificationDataIdOneOf {
824
- /** ID of a site visitor that has not logged in to the site. */
825
- anonymousVisitorId?: string;
826
- /** ID of a site visitor that has logged in to the site. */
827
- memberId?: string;
828
- /** ID of a Wix user (site owner, contributor, etc.). */
829
- wixUserId?: string;
830
- /** ID of an app. */
831
- appId?: string;
832
- }
833
-
834
- type ServicePluginMethodInput = {
835
- request: any;
836
- metadata: any;
837
- };
838
- type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
839
- type ServicePluginMethodMetadata = {
840
- name: string;
841
- primaryHttpMappingPath: string;
842
- transformations: {
843
- fromREST: (...args: unknown[]) => ServicePluginMethodInput;
844
- toREST: (...args: unknown[]) => unknown;
845
- };
846
- };
847
- type ServicePluginDefinition<Contract extends ServicePluginContract> = {
848
- __type: 'service-plugin-definition';
849
- componentType: string;
850
- methods: ServicePluginMethodMetadata[];
851
- __contract: Contract;
852
- };
853
- declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
854
- type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
855
-
856
- declare global {
857
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
858
- interface SymbolConstructor {
859
- readonly observable: symbol;
860
- }
861
- }
862
-
863
- declare global {
864
- interface ContextualClient {
865
- }
866
- }
867
-
868
- interface QueryDataItemsEnvelope {
869
- request: QueryDataItemsRequest;
870
- metadata: Context;
871
- }
872
- interface CountDataItemsEnvelope {
873
- request: CountDataItemsRequest;
874
- metadata: Context;
875
- }
876
- interface AggregateDataItemsEnvelope {
877
- request: AggregateDataItemsRequest;
878
- metadata: Context;
879
- }
880
- interface QueryDistinctValuesEnvelope {
881
- request: QueryDistinctValuesRequest;
882
- metadata: Context;
883
- }
884
- interface InsertDataItemsEnvelope {
885
- request: InsertDataItemsRequest;
886
- metadata: Context;
887
- }
888
- interface UpdateDataItemsEnvelope {
889
- request: UpdateDataItemsRequest;
890
- metadata: Context;
891
- }
892
- interface RemoveDataItemsEnvelope {
893
- request: RemoveDataItemsRequest;
894
- metadata: Context;
895
- }
896
- interface TruncateDataItemsEnvelope {
897
- request: TruncateDataItemsRequest;
898
- metadata: Context;
899
- }
900
- interface QueryReferencedDataItemsEnvelope {
901
- request: QueryReferencedDataItemsRequest;
902
- metadata: Context;
903
- }
904
- interface InsertDataItemReferencesEnvelope {
905
- request: InsertDataItemReferencesRequest;
906
- metadata: Context;
907
- }
908
- interface RemoveDataItemReferencesEnvelope {
909
- request: RemoveDataItemReferencesRequest;
910
- metadata: Context;
911
- }
912
- interface ListCollectionsEnvelope {
913
- request: ListCollectionsRequest;
914
- metadata: Context;
915
- }
916
- interface CreateCollectionEnvelope {
917
- request: CreateCollectionRequest;
918
- metadata: Context;
919
- }
920
- interface UpdateCollectionEnvelope {
921
- request: UpdateCollectionRequest;
922
- metadata: Context;
923
- }
924
- interface DeleteCollectionEnvelope {
925
- request: DeleteCollectionRequest;
926
- metadata: Context;
927
- }
928
- interface GetCapabilitiesEnvelope {
929
- request: GetCapabilitiesRequest;
930
- metadata: Context;
931
- }
932
- declare const provideHandlers$1: ServicePluginDefinition<{
933
- /**
934
- *
935
- * Retrieves a list of items based on the provided filtering, sorting, and paging preferences. */
936
- queryDataItems(payload: QueryDataItemsEnvelope): QueryDataItemsResponse | Promise<QueryDataItemsResponse>;
937
- /**
938
- * Counts the number of items in the specified data collection that match the filtering preferences. */
939
- countDataItems(payload: CountDataItemsEnvelope): CountDataItemsResponse | Promise<CountDataItemsResponse>;
940
- /**
941
- * Runs an aggregation query on the specified data collection and returns the resulting list of items. */
942
- aggregateDataItems(payload: AggregateDataItemsEnvelope): AggregateDataItemsResponse | Promise<AggregateDataItemsResponse>;
943
- /**
944
- *
945
- * Retrieves a list of distinct values for a given field for all items that match the query, without duplicates.
946
- *
947
- * As with [`queryDataItems()`](/external-database/query-data-items), this function retrieves items based on the filtering, sorting, and paging preferences provided. However, this function does not return the full items that match the query. Rather, for items that match the query, it returns all unique values in the field specified in `fieldName`. If more than one item has the same value in that field, that value appears only once. */
948
- queryDistinctValues(payload: QueryDistinctValuesEnvelope): QueryDistinctValuesResponse | Promise<QueryDistinctValuesResponse>;
949
- /**
950
- *
951
- * Adds one or more items to a collection.
952
- *
953
- * A data item object contains the `_id` and `_owner` fields. The response array must include the same items that were inserted, and each returned item must be added the `_createdDate` and `_updatedDate` fields.
954
- *
955
- * However, data items can also be inserted without an `_id` field. In that case, it is the service provider's responsibility to generate a unique ID for each item. */
956
- insertDataItems(payload: InsertDataItemsEnvelope): InsertDataItemsResponse | Promise<InsertDataItemsResponse>;
957
- /**
958
- *
959
- * Updates one or more items in a collection. Items must be completely replaced.
960
- *
961
- * The response array must include the same items that were updated, and each returned item must be added the `_createdDate` and `_updatedDate` fields. */
962
- updateDataItems(payload: UpdateDataItemsEnvelope): UpdateDataItemsResponse | Promise<UpdateDataItemsResponse>;
963
- /**
964
- * Removes one or more items from a collection. The response object must contain the removed item. */
965
- removeDataItems(payload: RemoveDataItemsEnvelope): RemoveDataItemsResponse | Promise<RemoveDataItemsResponse>;
966
- /**
967
- * Removes all items from a collection. */
968
- truncateDataItems(payload: TruncateDataItemsEnvelope): TruncateDataItemsResponse | Promise<TruncateDataItemsResponse>;
969
- /**
970
- *
971
- * Retrieves the items referenced in the specified field of a referring item. Reference fields refer to items that exist in different collections. Implement this function so callers can retrieve the full details of the referenced items.
972
- *
973
- * This service plugin supports item multi-references, which means that data collections can have many-to-many relationships with other collections. For example, consider a scenario where a **Movies** collection includes a multi-reference **Actors** field, which might refer to several **Actor** items in an **Actors** collection. Users can therefore query the **Movies** collection to retrieve the **Actor** items referenced in each **Movie** item.
974
- *
975
- * > **Notes:**
976
- * > - This function does not retrieve the full referenced items of referenced items. For example, the referenced **Actors** collection might itself contain a multi-reference field with references to **Award** items in an **Awards** collection. When calling this function to retrieve the referenced items of any **Movie** item, the response contains the referenced **Actor** items, but only the IDs of the **Award** items. To retrieve the full **Award** items, the user must either call this function for the **Actors** collection, or the [`queryDataItems()`](/external-database/query-data-items) function for the **Awards** collection.
977
- * > - This function might also be called when a user calls the [`isReferenced()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/is-referenced-data-item) function of the Data API. */
978
- queryReferencedDataItems(payload: QueryReferencedDataItemsEnvelope): QueryReferencedDataItemsResponse | Promise<QueryReferencedDataItemsResponse>;
979
- /**
980
- * Inserts one or more item references into a referring field of the specified item. */
981
- insertDataItemReferences(payload: InsertDataItemReferencesEnvelope): InsertDataItemReferencesResponse | Promise<InsertDataItemReferencesResponse>;
982
- /**
983
- * Removes one or more item references from a referring field of the specified item. */
984
- removeDataItemReferences(payload: RemoveDataItemReferencesEnvelope): RemoveDataItemReferencesResponse | Promise<RemoveDataItemReferencesResponse>;
985
- /**
986
- *
987
- * Retrieves a list of data collections and their details.
988
- *
989
- * When `collectionIds` is empty, all existing collections are returned.
990
- * If a specified collection does not exist, that collection can be ignored. */
991
- listCollections(payload: ListCollectionsEnvelope): ListCollectionsResponse | Promise<ListCollectionsResponse>;
992
- /**
993
- * Creates a new data collection. */
994
- createCollection(payload: CreateCollectionEnvelope): CreateCollectionResponse | Promise<CreateCollectionResponse>;
995
- /**
996
- *
997
- * Updates the structure of an existing data collection.
998
- *
999
- * Some parameters, such as `capabilities` and `pagingMode`, are determined by the service provider. If the collection passed in the request contains these parameters, their values must be ignored. However, these fields must be included in the response collection with relevant values. */
1000
- updateCollection(payload: UpdateCollectionEnvelope): UpdateCollectionResponse | Promise<UpdateCollectionResponse>;
1001
- /**
1002
- * Deletes a data collection. */
1003
- deleteCollection(payload: DeleteCollectionEnvelope): DeleteCollectionResponse | Promise<DeleteCollectionResponse>;
1004
- /**
1005
- * Lists the global capabilities the external database supports. */
1006
- getCapabilities(payload: GetCapabilitiesEnvelope): GetCapabilitiesResponse | Promise<GetCapabilitiesResponse>;
1007
- }>;
1008
-
1009
- declare function createServicePluginModule<T extends ServicePluginDefinition<any>>(servicePluginDefinition: T): BuildServicePluginDefinition<T> & T;
1010
-
1011
- type _publicProvideHandlersType = typeof provideHandlers$1;
1012
- declare const provideHandlers: ReturnType<typeof createServicePluginModule<_publicProvideHandlersType>>;
1013
-
1014
- declare class ItemAlreadyExistsWixError extends Error {
1015
- /** @hidden */
1016
- httpCode: number;
1017
- /** @hidden */
1018
- statusCode: string;
1019
- /** @hidden */
1020
- applicationCode: string;
1021
- /** @hidden */
1022
- name: string;
1023
- /** @hidden */
1024
- errorSchemaName: string;
1025
- /** @hidden */
1026
- errorType: string;
1027
- /** @hidden */
1028
- spiErrorData: object;
1029
- data: ItemAlreadyExistsError;
1030
- constructor(data?: ItemAlreadyExistsError);
1031
- /** @hidden */
1032
- static readonly __type = "wix_spi_error";
1033
- }
1034
- declare class ItemNotFoundWixError extends Error {
1035
- /** @hidden */
1036
- httpCode: number;
1037
- /** @hidden */
1038
- statusCode: string;
1039
- /** @hidden */
1040
- applicationCode: string;
1041
- /** @hidden */
1042
- name: string;
1043
- /** @hidden */
1044
- errorSchemaName: string;
1045
- /** @hidden */
1046
- errorType: string;
1047
- /** @hidden */
1048
- spiErrorData: object;
1049
- data: ItemNotFoundError;
1050
- constructor(data?: ItemNotFoundError);
1051
- /** @hidden */
1052
- static readonly __type = "wix_spi_error";
1053
- }
1054
- declare class CollectionAlreadyExistsWixError extends Error {
1055
- /** @hidden */
1056
- httpCode: number;
1057
- /** @hidden */
1058
- statusCode: string;
1059
- /** @hidden */
1060
- applicationCode: string;
1061
- /** @hidden */
1062
- name: string;
1063
- /** @hidden */
1064
- errorSchemaName: string;
1065
- /** @hidden */
1066
- errorType: string;
1067
- /** @hidden */
1068
- spiErrorData: object;
1069
- data: CollectionAlreadyExistsError;
1070
- constructor(data?: CollectionAlreadyExistsError);
1071
- /** @hidden */
1072
- static readonly __type = "wix_spi_error";
1073
- }
1074
- declare class CollectionNotFoundWixError extends Error {
1075
- /** @hidden */
1076
- httpCode: number;
1077
- /** @hidden */
1078
- statusCode: string;
1079
- /** @hidden */
1080
- applicationCode: string;
1081
- /** @hidden */
1082
- name: string;
1083
- /** @hidden */
1084
- errorSchemaName: string;
1085
- /** @hidden */
1086
- errorType: string;
1087
- /** @hidden */
1088
- spiErrorData: object;
1089
- data: CollectionNotFoundError;
1090
- constructor(data?: CollectionNotFoundError);
1091
- /** @hidden */
1092
- static readonly __type = "wix_spi_error";
1093
- }
1094
- declare class ReferenceAlreadyExistsWixError extends Error {
1095
- /** @hidden */
1096
- httpCode: number;
1097
- /** @hidden */
1098
- statusCode: string;
1099
- /** @hidden */
1100
- applicationCode: string;
1101
- /** @hidden */
1102
- name: string;
1103
- /** @hidden */
1104
- errorSchemaName: string;
1105
- /** @hidden */
1106
- errorType: string;
1107
- /** @hidden */
1108
- spiErrorData: object;
1109
- data: ReferenceAlreadyExistsError;
1110
- constructor(data?: ReferenceAlreadyExistsError);
1111
- /** @hidden */
1112
- static readonly __type = "wix_spi_error";
1113
- }
1114
- declare class ReferenceNotFoundWixError extends Error {
1115
- /** @hidden */
1116
- httpCode: number;
1117
- /** @hidden */
1118
- statusCode: string;
1119
- /** @hidden */
1120
- applicationCode: string;
1121
- /** @hidden */
1122
- name: string;
1123
- /** @hidden */
1124
- errorSchemaName: string;
1125
- /** @hidden */
1126
- errorType: string;
1127
- /** @hidden */
1128
- spiErrorData: object;
1129
- data: ReferenceNotFoundError;
1130
- constructor(data?: ReferenceNotFoundError);
1131
- /** @hidden */
1132
- static readonly __type = "wix_spi_error";
1133
- }
1134
- declare class ValidationWixError extends Error {
1135
- /** @hidden */
1136
- httpCode: number;
1137
- /** @hidden */
1138
- statusCode: string;
1139
- /** @hidden */
1140
- applicationCode: string;
1141
- /** @hidden */
1142
- name: string;
1143
- /** @hidden */
1144
- errorSchemaName: string;
1145
- /** @hidden */
1146
- errorType: string;
1147
- /** @hidden */
1148
- spiErrorData: object;
1149
- data: ValidationError;
1150
- constructor(data?: ValidationError);
1151
- /** @hidden */
1152
- static readonly __type = "wix_spi_error";
1153
- }
1154
- declare class CollectionChangeNotSupportedWixError extends Error {
1155
- /** @hidden */
1156
- httpCode: number;
1157
- /** @hidden */
1158
- statusCode: string;
1159
- /** @hidden */
1160
- applicationCode: string;
1161
- /** @hidden */
1162
- name: string;
1163
- /** @hidden */
1164
- errorSchemaName: string;
1165
- /** @hidden */
1166
- errorType: string;
1167
- /** @hidden */
1168
- spiErrorData: object;
1169
- data: CollectionChangeNotSupported;
1170
- constructor(data?: CollectionChangeNotSupported);
1171
- /** @hidden */
1172
- static readonly __type = "wix_spi_error";
1173
- }
1174
- declare class BadRequestWixError extends Error {
1175
- /** @hidden */
1176
- httpCode: number;
1177
- /** @hidden */
1178
- statusCode: string;
1179
- /** @hidden */
1180
- applicationCode: string;
1181
- /** @hidden */
1182
- name: string;
1183
- /** @hidden */
1184
- errorType: string;
1185
- /** @hidden */
1186
- spiErrorData: object;
1187
- constructor();
1188
- /** @hidden */
1189
- static readonly __type = "wix_spi_error";
1190
- }
1191
-
1192
- type index_d_AggregateDataItemsRequest = AggregateDataItemsRequest;
1193
- type index_d_AggregateDataItemsRequestPagingMethodOneOf = AggregateDataItemsRequestPagingMethodOneOf;
1194
- type index_d_AggregateDataItemsResponse = AggregateDataItemsResponse;
1195
- type index_d_Aggregation = Aggregation;
1196
- type index_d_AlternativeUri = AlternativeUri;
1197
- type index_d_ArrayOptions = ArrayOptions;
1198
- type index_d_ArrayOptionsTypeOptionsOneOf = ArrayOptionsTypeOptionsOneOf;
1199
- type index_d_Average = Average;
1200
- type index_d_BadRequestWixError = BadRequestWixError;
1201
- declare const index_d_BadRequestWixError: typeof BadRequestWixError;
1202
- type index_d_Collection = Collection;
1203
- type index_d_CollectionAlreadyExistsError = CollectionAlreadyExistsError;
1204
- type index_d_CollectionAlreadyExistsWixError = CollectionAlreadyExistsWixError;
1205
- declare const index_d_CollectionAlreadyExistsWixError: typeof CollectionAlreadyExistsWixError;
1206
- type index_d_CollectionCapabilities = CollectionCapabilities;
1207
- type index_d_CollectionChangeNotSupported = CollectionChangeNotSupported;
1208
- type index_d_CollectionChangeNotSupportedError = CollectionChangeNotSupportedError;
1209
- type index_d_CollectionChangeNotSupportedWixError = CollectionChangeNotSupportedWixError;
1210
- declare const index_d_CollectionChangeNotSupportedWixError: typeof CollectionChangeNotSupportedWixError;
1211
- type index_d_CollectionNotFoundError = CollectionNotFoundError;
1212
- type index_d_CollectionNotFoundWixError = CollectionNotFoundWixError;
1213
- declare const index_d_CollectionNotFoundWixError: typeof CollectionNotFoundWixError;
1214
- type index_d_Context = Context;
1215
- type index_d_Count = Count;
1216
- type index_d_CountDataItemsRequest = CountDataItemsRequest;
1217
- type index_d_CountDataItemsResponse = CountDataItemsResponse;
1218
- type index_d_CreateCollectionRequest = CreateCollectionRequest;
1219
- type index_d_CreateCollectionResponse = CreateCollectionResponse;
1220
- type index_d_CreateIndexRequest = CreateIndexRequest;
1221
- type index_d_CreateIndexResponse = CreateIndexResponse;
1222
- type index_d_CursorPaging = CursorPaging;
1223
- type index_d_Cursors = Cursors;
1224
- type index_d_DataItemModificationResult = DataItemModificationResult;
1225
- type index_d_DataItemModificationResultResultOneOf = DataItemModificationResultResultOneOf;
1226
- type index_d_DataOperation = DataOperation;
1227
- declare const index_d_DataOperation: typeof DataOperation;
1228
- type index_d_DeleteCollectionRequest = DeleteCollectionRequest;
1229
- type index_d_DeleteCollectionResponse = DeleteCollectionResponse;
1230
- type index_d_ExternalDatabaseSpiConfig = ExternalDatabaseSpiConfig;
1231
- type index_d_Field = Field;
1232
- type index_d_FieldCapabilities = FieldCapabilities;
1233
- type index_d_FieldType = FieldType;
1234
- declare const index_d_FieldType: typeof FieldType;
1235
- type index_d_FieldTypeOptionsOneOf = FieldTypeOptionsOneOf;
1236
- type index_d_GetCapabilitiesRequest = GetCapabilitiesRequest;
1237
- type index_d_GetCapabilitiesResponse = GetCapabilitiesResponse;
1238
- type index_d_IdentificationData = IdentificationData;
1239
- type index_d_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
1240
- type index_d_IdentityType = IdentityType;
1241
- declare const index_d_IdentityType: typeof IdentityType;
1242
- type index_d_Index = Index;
1243
- type index_d_IndexField = IndexField;
1244
- type index_d_IndexOptions = IndexOptions;
1245
- type index_d_InsertDataItemReferencesRequest = InsertDataItemReferencesRequest;
1246
- type index_d_InsertDataItemReferencesResponse = InsertDataItemReferencesResponse;
1247
- type index_d_InsertDataItemsRequest = InsertDataItemsRequest;
1248
- type index_d_InsertDataItemsResponse = InsertDataItemsResponse;
1249
- type index_d_ItemAlreadyExistsError = ItemAlreadyExistsError;
1250
- type index_d_ItemAlreadyExistsWixError = ItemAlreadyExistsWixError;
1251
- declare const index_d_ItemAlreadyExistsWixError: typeof ItemAlreadyExistsWixError;
1252
- type index_d_ItemNotFoundError = ItemNotFoundError;
1253
- type index_d_ItemNotFoundWixError = ItemNotFoundWixError;
1254
- declare const index_d_ItemNotFoundWixError: typeof ItemNotFoundWixError;
1255
- type index_d_ListCollectionsRequest = ListCollectionsRequest;
1256
- type index_d_ListCollectionsResponse = ListCollectionsResponse;
1257
- type index_d_ListIndexesRequest = ListIndexesRequest;
1258
- type index_d_ListIndexesResponse = ListIndexesResponse;
1259
- type index_d_MainEntity = MainEntity;
1260
- type index_d_Max = Max;
1261
- type index_d_Min = Min;
1262
- type index_d_MultiReferenceOptions = MultiReferenceOptions;
1263
- type index_d_ObjectField = ObjectField;
1264
- type index_d_ObjectFieldTypeOptionsOneOf = ObjectFieldTypeOptionsOneOf;
1265
- type index_d_ObjectOptions = ObjectOptions;
1266
- type index_d_Operation = Operation;
1267
- type index_d_OperationCalculateOneOf = OperationCalculateOneOf;
1268
- type index_d_Order = Order;
1269
- declare const index_d_Order: typeof Order;
1270
- type index_d_Paging = Paging;
1271
- type index_d_PagingMetadataV2 = PagingMetadataV2;
1272
- type index_d_PagingMode = PagingMode;
1273
- declare const index_d_PagingMode: typeof PagingMode;
1274
- type index_d_Permissions = Permissions;
1275
- type index_d_QueryDataItemsRequest = QueryDataItemsRequest;
1276
- type index_d_QueryDataItemsResponse = QueryDataItemsResponse;
1277
- type index_d_QueryDistinctValuesRequest = QueryDistinctValuesRequest;
1278
- type index_d_QueryDistinctValuesRequestPagingMethodOneOf = QueryDistinctValuesRequestPagingMethodOneOf;
1279
- type index_d_QueryDistinctValuesResponse = QueryDistinctValuesResponse;
1280
- type index_d_QueryOperator = QueryOperator;
1281
- declare const index_d_QueryOperator: typeof QueryOperator;
1282
- type index_d_QueryReferencedDataItemsRequest = QueryReferencedDataItemsRequest;
1283
- type index_d_QueryReferencedDataItemsRequestPagingMethodOneOf = QueryReferencedDataItemsRequestPagingMethodOneOf;
1284
- type index_d_QueryReferencedDataItemsResponse = QueryReferencedDataItemsResponse;
1285
- type index_d_QueryV2 = QueryV2;
1286
- type index_d_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
1287
- type index_d_ReferenceAlreadyExistsError = ReferenceAlreadyExistsError;
1288
- type index_d_ReferenceAlreadyExistsWixError = ReferenceAlreadyExistsWixError;
1289
- declare const index_d_ReferenceAlreadyExistsWixError: typeof ReferenceAlreadyExistsWixError;
1290
- type index_d_ReferenceId = ReferenceId;
1291
- type index_d_ReferenceModificationResult = ReferenceModificationResult;
1292
- type index_d_ReferenceModificationResultResultOneOf = ReferenceModificationResultResultOneOf;
1293
- type index_d_ReferenceNotFoundError = ReferenceNotFoundError;
1294
- type index_d_ReferenceNotFoundWixError = ReferenceNotFoundWixError;
1295
- declare const index_d_ReferenceNotFoundWixError: typeof ReferenceNotFoundWixError;
1296
- type index_d_ReferencedItem = ReferencedItem;
1297
- type index_d_ReferencedItemToInclude = ReferencedItemToInclude;
1298
- type index_d_RemoveDataItemReferencesRequest = RemoveDataItemReferencesRequest;
1299
- type index_d_RemoveDataItemReferencesResponse = RemoveDataItemReferencesResponse;
1300
- type index_d_RemoveDataItemsRequest = RemoveDataItemsRequest;
1301
- type index_d_RemoveDataItemsResponse = RemoveDataItemsResponse;
1302
- type index_d_RemoveIndexRequest = RemoveIndexRequest;
1303
- type index_d_RemoveIndexResponse = RemoveIndexResponse;
1304
- type index_d_Role = Role;
1305
- declare const index_d_Role: typeof Role;
1306
- type index_d_SingleReferenceOptions = SingleReferenceOptions;
1307
- type index_d_SortOrder = SortOrder;
1308
- declare const index_d_SortOrder: typeof SortOrder;
1309
- type index_d_Sorting = Sorting;
1310
- type index_d_SpiBaseUri = SpiBaseUri;
1311
- type index_d_Status = Status;
1312
- declare const index_d_Status: typeof Status;
1313
- type index_d_Sum = Sum;
1314
- type index_d_TruncateDataItemsRequest = TruncateDataItemsRequest;
1315
- type index_d_TruncateDataItemsResponse = TruncateDataItemsResponse;
1316
- type index_d_UpdateCollectionRequest = UpdateCollectionRequest;
1317
- type index_d_UpdateCollectionResponse = UpdateCollectionResponse;
1318
- type index_d_UpdateDataItemsRequest = UpdateDataItemsRequest;
1319
- type index_d_UpdateDataItemsResponse = UpdateDataItemsResponse;
1320
- type index_d_ValidationError = ValidationError;
1321
- type index_d_ValidationViolation = ValidationViolation;
1322
- type index_d_ValidationWixError = ValidationWixError;
1323
- declare const index_d_ValidationWixError: typeof ValidationWixError;
1324
- type index_d__publicProvideHandlersType = _publicProvideHandlersType;
1325
- declare const index_d_provideHandlers: typeof provideHandlers;
1326
- declare namespace index_d {
1327
- export { type index_d_AggregateDataItemsRequest as AggregateDataItemsRequest, type index_d_AggregateDataItemsRequestPagingMethodOneOf as AggregateDataItemsRequestPagingMethodOneOf, type index_d_AggregateDataItemsResponse as AggregateDataItemsResponse, type index_d_Aggregation as Aggregation, type index_d_AlternativeUri as AlternativeUri, type index_d_ArrayOptions as ArrayOptions, type index_d_ArrayOptionsTypeOptionsOneOf as ArrayOptionsTypeOptionsOneOf, type index_d_Average as Average, index_d_BadRequestWixError as BadRequestWixError, type index_d_Collection as Collection, type index_d_CollectionAlreadyExistsError as CollectionAlreadyExistsError, index_d_CollectionAlreadyExistsWixError as CollectionAlreadyExistsWixError, type index_d_CollectionCapabilities as CollectionCapabilities, type index_d_CollectionChangeNotSupported as CollectionChangeNotSupported, type index_d_CollectionChangeNotSupportedError as CollectionChangeNotSupportedError, index_d_CollectionChangeNotSupportedWixError as CollectionChangeNotSupportedWixError, type index_d_CollectionNotFoundError as CollectionNotFoundError, index_d_CollectionNotFoundWixError as CollectionNotFoundWixError, type index_d_Context as Context, type index_d_Count as Count, type index_d_CountDataItemsRequest as CountDataItemsRequest, type index_d_CountDataItemsResponse as CountDataItemsResponse, type index_d_CreateCollectionRequest as CreateCollectionRequest, type index_d_CreateCollectionResponse as CreateCollectionResponse, type index_d_CreateIndexRequest as CreateIndexRequest, type index_d_CreateIndexResponse as CreateIndexResponse, type index_d_CursorPaging as CursorPaging, type index_d_Cursors as Cursors, type index_d_DataItemModificationResult as DataItemModificationResult, type index_d_DataItemModificationResultResultOneOf as DataItemModificationResultResultOneOf, index_d_DataOperation as DataOperation, type index_d_DeleteCollectionRequest as DeleteCollectionRequest, type index_d_DeleteCollectionResponse as DeleteCollectionResponse, type Error$1 as Error, type index_d_ExternalDatabaseSpiConfig as ExternalDatabaseSpiConfig, type index_d_Field as Field, type index_d_FieldCapabilities as FieldCapabilities, index_d_FieldType as FieldType, type index_d_FieldTypeOptionsOneOf as FieldTypeOptionsOneOf, type index_d_GetCapabilitiesRequest as GetCapabilitiesRequest, type index_d_GetCapabilitiesResponse as GetCapabilitiesResponse, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, index_d_IdentityType as IdentityType, type index_d_Index as Index, type index_d_IndexField as IndexField, type index_d_IndexOptions as IndexOptions, type index_d_InsertDataItemReferencesRequest as InsertDataItemReferencesRequest, type index_d_InsertDataItemReferencesResponse as InsertDataItemReferencesResponse, type index_d_InsertDataItemsRequest as InsertDataItemsRequest, type index_d_InsertDataItemsResponse as InsertDataItemsResponse, type index_d_ItemAlreadyExistsError as ItemAlreadyExistsError, index_d_ItemAlreadyExistsWixError as ItemAlreadyExistsWixError, type index_d_ItemNotFoundError as ItemNotFoundError, index_d_ItemNotFoundWixError as ItemNotFoundWixError, type index_d_ListCollectionsRequest as ListCollectionsRequest, type index_d_ListCollectionsResponse as ListCollectionsResponse, type index_d_ListIndexesRequest as ListIndexesRequest, type index_d_ListIndexesResponse as ListIndexesResponse, type index_d_MainEntity as MainEntity, type index_d_Max as Max, type index_d_Min as Min, type index_d_MultiReferenceOptions as MultiReferenceOptions, type index_d_ObjectField as ObjectField, type index_d_ObjectFieldTypeOptionsOneOf as ObjectFieldTypeOptionsOneOf, type index_d_ObjectOptions as ObjectOptions, type index_d_Operation as Operation, type index_d_OperationCalculateOneOf as OperationCalculateOneOf, index_d_Order as Order, type index_d_Paging as Paging, type index_d_PagingMetadataV2 as PagingMetadataV2, index_d_PagingMode as PagingMode, type index_d_Permissions as Permissions, type index_d_QueryDataItemsRequest as QueryDataItemsRequest, type index_d_QueryDataItemsResponse as QueryDataItemsResponse, type index_d_QueryDistinctValuesRequest as QueryDistinctValuesRequest, type index_d_QueryDistinctValuesRequestPagingMethodOneOf as QueryDistinctValuesRequestPagingMethodOneOf, type index_d_QueryDistinctValuesResponse as QueryDistinctValuesResponse, index_d_QueryOperator as QueryOperator, type index_d_QueryReferencedDataItemsRequest as QueryReferencedDataItemsRequest, type index_d_QueryReferencedDataItemsRequestPagingMethodOneOf as QueryReferencedDataItemsRequestPagingMethodOneOf, type index_d_QueryReferencedDataItemsResponse as QueryReferencedDataItemsResponse, type index_d_QueryV2 as QueryV2, type index_d_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d_ReferenceAlreadyExistsError as ReferenceAlreadyExistsError, index_d_ReferenceAlreadyExistsWixError as ReferenceAlreadyExistsWixError, type index_d_ReferenceId as ReferenceId, type index_d_ReferenceModificationResult as ReferenceModificationResult, type index_d_ReferenceModificationResultResultOneOf as ReferenceModificationResultResultOneOf, type index_d_ReferenceNotFoundError as ReferenceNotFoundError, index_d_ReferenceNotFoundWixError as ReferenceNotFoundWixError, type index_d_ReferencedItem as ReferencedItem, type index_d_ReferencedItemToInclude as ReferencedItemToInclude, type index_d_RemoveDataItemReferencesRequest as RemoveDataItemReferencesRequest, type index_d_RemoveDataItemReferencesResponse as RemoveDataItemReferencesResponse, type index_d_RemoveDataItemsRequest as RemoveDataItemsRequest, type index_d_RemoveDataItemsResponse as RemoveDataItemsResponse, type index_d_RemoveIndexRequest as RemoveIndexRequest, type index_d_RemoveIndexResponse as RemoveIndexResponse, index_d_Role as Role, type index_d_SingleReferenceOptions as SingleReferenceOptions, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, type index_d_SpiBaseUri as SpiBaseUri, index_d_Status as Status, type index_d_Sum as Sum, type index_d_TruncateDataItemsRequest as TruncateDataItemsRequest, type index_d_TruncateDataItemsResponse as TruncateDataItemsResponse, type index_d_UpdateCollectionRequest as UpdateCollectionRequest, type index_d_UpdateCollectionResponse as UpdateCollectionResponse, type index_d_UpdateDataItemsRequest as UpdateDataItemsRequest, type index_d_UpdateDataItemsResponse as UpdateDataItemsResponse, type index_d_ValidationError as ValidationError, type index_d_ValidationViolation as ValidationViolation, index_d_ValidationWixError as ValidationWixError, type index_d__publicProvideHandlersType as _publicProvideHandlersType, index_d_provideHandlers as provideHandlers, provideHandlers$1 as publicProvideHandlers };
1328
- }
1329
-
1330
- export { index_d as externalDatabase };