@wix/auto_sdk_data-backend-public-sdk-poc_data 1.0.30 → 1.0.32

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 (119) hide show
  1. package/build/cjs/{src/data-v1-data-service-data.universal.d.ts → data-v1-data-service-data.universal-DwJ77xKF.d.ts} +91 -104
  2. package/build/cjs/index.d.ts +18 -1
  3. package/build/cjs/index.js +1506 -15
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/meta.d.ts +504 -1
  6. package/build/cjs/meta.js +1090 -15
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/es/{src/data-v1-data-service-data.universal.d.ts → data-v1-data-service-data.universal-DwJ77xKF.d.mts} +91 -104
  9. package/build/es/index.d.mts +18 -0
  10. package/build/es/index.mjs +1464 -0
  11. package/build/es/index.mjs.map +1 -0
  12. package/build/{cjs/src/data-v1-data-service-data.types.d.ts → es/meta.d.mts} +94 -167
  13. package/build/es/meta.mjs +1048 -0
  14. package/build/es/meta.mjs.map +1 -0
  15. package/build/{es/src/data-v1-data-service-data.types.d.ts → internal/cjs/data-v1-data-service-data.universal-B0E_2MN6.d.ts} +284 -72
  16. package/build/internal/cjs/index.d.ts +308 -1
  17. package/build/internal/cjs/index.js +1506 -15
  18. package/build/internal/cjs/index.js.map +1 -1
  19. package/build/internal/cjs/meta.d.ts +504 -1
  20. package/build/internal/cjs/meta.js +1090 -15
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/internal/es/data-v1-data-service-data.universal-B0E_2MN6.d.mts +789 -0
  23. package/build/internal/es/{src/data-v1-data-service-data.public.d.ts → index.d.mts} +63 -25
  24. package/build/internal/es/index.mjs +1464 -0
  25. package/build/internal/es/index.mjs.map +1 -0
  26. package/build/internal/{cjs/src/data-v1-data-service-data.types.d.ts → es/meta.d.mts} +94 -167
  27. package/build/internal/es/meta.mjs +1048 -0
  28. package/build/internal/es/meta.mjs.map +1 -0
  29. package/package.json +9 -8
  30. package/build/cjs/index.typings.d.ts +0 -1
  31. package/build/cjs/index.typings.js +0 -18
  32. package/build/cjs/index.typings.js.map +0 -1
  33. package/build/cjs/src/data-v1-data-service-data.context.d.ts +0 -5
  34. package/build/cjs/src/data-v1-data-service-data.context.js +0 -47
  35. package/build/cjs/src/data-v1-data-service-data.context.js.map +0 -1
  36. package/build/cjs/src/data-v1-data-service-data.http.d.ts +0 -188
  37. package/build/cjs/src/data-v1-data-service-data.http.js +0 -872
  38. package/build/cjs/src/data-v1-data-service-data.http.js.map +0 -1
  39. package/build/cjs/src/data-v1-data-service-data.meta.d.ts +0 -37
  40. package/build/cjs/src/data-v1-data-service-data.meta.js +0 -389
  41. package/build/cjs/src/data-v1-data-service-data.meta.js.map +0 -1
  42. package/build/cjs/src/data-v1-data-service-data.public.d.ts +0 -16
  43. package/build/cjs/src/data-v1-data-service-data.public.js +0 -142
  44. package/build/cjs/src/data-v1-data-service-data.public.js.map +0 -1
  45. package/build/cjs/src/data-v1-data-service-data.types.js +0 -23
  46. package/build/cjs/src/data-v1-data-service-data.types.js.map +0 -1
  47. package/build/cjs/src/data-v1-data-service-data.universal.js +0 -930
  48. package/build/cjs/src/data-v1-data-service-data.universal.js.map +0 -1
  49. package/build/es/index.d.ts +0 -1
  50. package/build/es/index.js +0 -2
  51. package/build/es/index.js.map +0 -1
  52. package/build/es/index.typings.d.ts +0 -1
  53. package/build/es/index.typings.js +0 -2
  54. package/build/es/index.typings.js.map +0 -1
  55. package/build/es/meta.d.ts +0 -1
  56. package/build/es/meta.js +0 -2
  57. package/build/es/meta.js.map +0 -1
  58. package/build/es/src/data-v1-data-service-data.context.d.ts +0 -5
  59. package/build/es/src/data-v1-data-service-data.context.js +0 -41
  60. package/build/es/src/data-v1-data-service-data.context.js.map +0 -1
  61. package/build/es/src/data-v1-data-service-data.http.d.ts +0 -188
  62. package/build/es/src/data-v1-data-service-data.http.js +0 -850
  63. package/build/es/src/data-v1-data-service-data.http.js.map +0 -1
  64. package/build/es/src/data-v1-data-service-data.meta.d.ts +0 -37
  65. package/build/es/src/data-v1-data-service-data.meta.js +0 -344
  66. package/build/es/src/data-v1-data-service-data.meta.js.map +0 -1
  67. package/build/es/src/data-v1-data-service-data.public.d.ts +0 -16
  68. package/build/es/src/data-v1-data-service-data.public.js +0 -117
  69. package/build/es/src/data-v1-data-service-data.public.js.map +0 -1
  70. package/build/es/src/data-v1-data-service-data.types.js +0 -20
  71. package/build/es/src/data-v1-data-service-data.types.js.map +0 -1
  72. package/build/es/src/data-v1-data-service-data.universal.js +0 -885
  73. package/build/es/src/data-v1-data-service-data.universal.js.map +0 -1
  74. package/build/internal/cjs/index.typings.d.ts +0 -1
  75. package/build/internal/cjs/index.typings.js +0 -18
  76. package/build/internal/cjs/index.typings.js.map +0 -1
  77. package/build/internal/cjs/src/data-v1-data-service-data.context.d.ts +0 -41
  78. package/build/internal/cjs/src/data-v1-data-service-data.context.js +0 -47
  79. package/build/internal/cjs/src/data-v1-data-service-data.context.js.map +0 -1
  80. package/build/internal/cjs/src/data-v1-data-service-data.http.d.ts +0 -188
  81. package/build/internal/cjs/src/data-v1-data-service-data.http.js +0 -872
  82. package/build/internal/cjs/src/data-v1-data-service-data.http.js.map +0 -1
  83. package/build/internal/cjs/src/data-v1-data-service-data.meta.d.ts +0 -37
  84. package/build/internal/cjs/src/data-v1-data-service-data.meta.js +0 -389
  85. package/build/internal/cjs/src/data-v1-data-service-data.meta.js.map +0 -1
  86. package/build/internal/cjs/src/data-v1-data-service-data.public.d.ts +0 -270
  87. package/build/internal/cjs/src/data-v1-data-service-data.public.js +0 -142
  88. package/build/internal/cjs/src/data-v1-data-service-data.public.js.map +0 -1
  89. package/build/internal/cjs/src/data-v1-data-service-data.types.js +0 -23
  90. package/build/internal/cjs/src/data-v1-data-service-data.types.js.map +0 -1
  91. package/build/internal/cjs/src/data-v1-data-service-data.universal.d.ts +0 -1136
  92. package/build/internal/cjs/src/data-v1-data-service-data.universal.js +0 -930
  93. package/build/internal/cjs/src/data-v1-data-service-data.universal.js.map +0 -1
  94. package/build/internal/es/index.d.ts +0 -1
  95. package/build/internal/es/index.js +0 -2
  96. package/build/internal/es/index.js.map +0 -1
  97. package/build/internal/es/index.typings.d.ts +0 -1
  98. package/build/internal/es/index.typings.js +0 -2
  99. package/build/internal/es/index.typings.js.map +0 -1
  100. package/build/internal/es/meta.d.ts +0 -1
  101. package/build/internal/es/meta.js +0 -2
  102. package/build/internal/es/meta.js.map +0 -1
  103. package/build/internal/es/src/data-v1-data-service-data.context.d.ts +0 -41
  104. package/build/internal/es/src/data-v1-data-service-data.context.js +0 -41
  105. package/build/internal/es/src/data-v1-data-service-data.context.js.map +0 -1
  106. package/build/internal/es/src/data-v1-data-service-data.http.d.ts +0 -188
  107. package/build/internal/es/src/data-v1-data-service-data.http.js +0 -850
  108. package/build/internal/es/src/data-v1-data-service-data.http.js.map +0 -1
  109. package/build/internal/es/src/data-v1-data-service-data.meta.d.ts +0 -37
  110. package/build/internal/es/src/data-v1-data-service-data.meta.js +0 -344
  111. package/build/internal/es/src/data-v1-data-service-data.meta.js.map +0 -1
  112. package/build/internal/es/src/data-v1-data-service-data.public.js +0 -117
  113. package/build/internal/es/src/data-v1-data-service-data.public.js.map +0 -1
  114. package/build/internal/es/src/data-v1-data-service-data.types.d.ts +0 -577
  115. package/build/internal/es/src/data-v1-data-service-data.types.js +0 -20
  116. package/build/internal/es/src/data-v1-data-service-data.types.js.map +0 -1
  117. package/build/internal/es/src/data-v1-data-service-data.universal.d.ts +0 -1136
  118. package/build/internal/es/src/data-v1-data-service-data.universal.js +0 -885
  119. package/build/internal/es/src/data-v1-data-service-data.universal.js.map +0 -1
@@ -1,13 +1,13 @@
1
- export interface Item {
1
+ interface Item {
2
2
  item?: Record<string, any> | null;
3
3
  }
4
- export interface InsertRequest {
4
+ interface InsertRequest {
5
5
  /** Item to insert. */
6
6
  item?: Record<string, any> | null;
7
7
  /** ID of the collection in which to insert the item. */
8
8
  dataCollectionId?: string;
9
9
  }
10
- export declare enum Segment {
10
+ declare enum Segment {
11
11
  /** Access database used in the Live site. */
12
12
  LIVE = "LIVE",
13
13
  /** Access staging (sandbox) database used in the editor. */
@@ -16,34 +16,34 @@ export declare enum Segment {
16
16
  TRASH_LIVE = "TRASH_LIVE"
17
17
  }
18
18
  /** @enumType */
19
- export type SegmentWithLiterals = Segment | 'LIVE' | 'SANDBOX' | 'TRASH_LIVE';
20
- export interface Options {
19
+ type SegmentWithLiterals = Segment | 'LIVE' | 'SANDBOX' | 'TRASH_LIVE';
20
+ interface Options {
21
21
  }
22
- export interface InsertResponse {
22
+ interface InsertResponse {
23
23
  /** Inserted item. */
24
24
  item?: Record<string, any> | null;
25
25
  }
26
- export interface UpdateRequest {
26
+ interface UpdateRequest {
27
27
  /** Item to update. The existing item is replaced with this version. */
28
28
  item: Record<string, any> | null;
29
29
  /** ID of the collection containing the existing item. */
30
30
  dataCollectionId?: string;
31
31
  }
32
- export interface UpdateResponse {
32
+ interface UpdateResponse {
33
33
  /** Updated item */
34
34
  item?: Record<string, any> | null;
35
35
  }
36
- export interface SaveRequest {
36
+ interface SaveRequest {
37
37
  /** Item to insert or update. */
38
38
  item?: Record<string, any> | null;
39
39
  /** ID of the collection in which to insert or update the item. */
40
40
  dataCollectionId?: string;
41
41
  }
42
- export interface SaveResponse {
42
+ interface SaveResponse {
43
43
  /** Inserted or updated item. */
44
44
  item?: Record<string, any> | null;
45
45
  }
46
- export interface PatchRequest {
46
+ interface PatchRequest {
47
47
  /** item id to patch */
48
48
  itemId?: string;
49
49
  /** Patch data */
@@ -53,11 +53,11 @@ export interface PatchRequest {
53
53
  /** ID of the collection */
54
54
  dataCollectionId?: string;
55
55
  }
56
- export interface PatchResponse {
56
+ interface PatchResponse {
57
57
  /** Patched item */
58
58
  item?: Record<string, any> | null;
59
59
  }
60
- export interface PatchWhereRequest {
60
+ interface PatchWhereRequest {
61
61
  /** Data segment */
62
62
  segment?: SegmentWithLiterals;
63
63
  /** filter items to patch */
@@ -69,40 +69,40 @@ export interface PatchWhereRequest {
69
69
  /** ID of the collection */
70
70
  dataCollectionId?: string;
71
71
  }
72
- export interface PatchWhereResponse {
72
+ interface PatchWhereResponse {
73
73
  /** Number of patched items */
74
74
  totalCount?: number;
75
75
  totalAffectedValues?: number;
76
76
  }
77
- export interface GetRequest {
77
+ interface GetRequest {
78
78
  /** ID of the item to retrieve. */
79
79
  itemId: string;
80
80
  /** ID of the collection from which to retrieve the item. */
81
81
  dataCollectionId?: string;
82
82
  }
83
- export interface ReadOptions {
83
+ interface ReadOptions {
84
84
  }
85
- export interface GetResponse {
85
+ interface GetResponse {
86
86
  /** Retrieved item. */
87
87
  item?: Record<string, any> | null;
88
88
  }
89
- export interface RemoveRequest {
89
+ interface RemoveRequest {
90
90
  /** ID of the item to remove. */
91
91
  itemId: string;
92
92
  /** ID of the collection from which to remove the item. */
93
93
  dataCollectionId?: string;
94
94
  }
95
- export interface RemoveResponse {
95
+ interface RemoveResponse {
96
96
  /** Removed item. */
97
97
  item?: Record<string, any> | null;
98
98
  }
99
- export interface TruncateRequest {
99
+ interface TruncateRequest {
100
100
  /** ID of the collection to truncate. */
101
101
  dataCollectionId?: string;
102
102
  }
103
- export interface TruncateResponse {
103
+ interface TruncateResponse {
104
104
  }
105
- export interface QueryRequest {
105
+ interface QueryRequest {
106
106
  /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
107
107
  dataQuery?: QueryV2;
108
108
  /**
@@ -121,7 +121,7 @@ export interface QueryRequest {
121
121
  /** ID of the collection to query. */
122
122
  dataCollectionId?: string;
123
123
  }
124
- export interface Query {
124
+ interface Query {
125
125
  /**
126
126
  * Filter object in the following format:
127
127
  * `"filter" : {
@@ -141,19 +141,19 @@ export interface Query {
141
141
  /** Array of projected fields. A list of specific field names to return. */
142
142
  fields?: string[];
143
143
  }
144
- export interface Sorting {
144
+ interface Sorting {
145
145
  /** Name of the field to sort by. */
146
146
  fieldName?: string;
147
147
  /** Sort order. */
148
148
  order?: SortOrderWithLiterals;
149
149
  }
150
- export declare enum SortOrder {
150
+ declare enum SortOrder {
151
151
  ASC = "ASC",
152
152
  DESC = "DESC"
153
153
  }
154
154
  /** @enumType */
155
- export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
156
- export interface Paging {
155
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
156
+ interface Paging {
157
157
  /**
158
158
  * Number of items to load.
159
159
  * @max 1000
@@ -162,7 +162,7 @@ export interface Paging {
162
162
  /** Number of items to skip in the current sort order. */
163
163
  offset?: number | null;
164
164
  }
165
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
165
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
166
166
  /** Paging options to limit and skip the number of items. */
167
167
  paging?: Paging;
168
168
  /** 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`. */
@@ -185,13 +185,13 @@ export interface QueryV2 extends QueryV2PagingMethodOneOf {
185
185
  fields?: string[];
186
186
  }
187
187
  /** @oneof */
188
- export interface QueryV2PagingMethodOneOf {
188
+ interface QueryV2PagingMethodOneOf {
189
189
  /** Paging options to limit and skip the number of items. */
190
190
  paging?: Paging;
191
191
  /** 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`. */
192
192
  cursorPaging?: CursorPaging;
193
193
  }
194
- export interface CursorPaging {
194
+ interface CursorPaging {
195
195
  /**
196
196
  * Number of items to load.
197
197
  * @max 1000
@@ -206,7 +206,7 @@ export interface CursorPaging {
206
206
  */
207
207
  cursor?: string | null;
208
208
  }
209
- export interface QueryResponse {
209
+ interface QueryResponse {
210
210
  /** Retrieved items. */
211
211
  items?: Record<string, any>[] | null;
212
212
  /**
@@ -224,7 +224,7 @@ export interface QueryResponse {
224
224
  /** Paging information. */
225
225
  pagingMetadata?: PagingMetadataV2;
226
226
  }
227
- export interface PagingMetadataV2 {
227
+ interface PagingMetadataV2 {
228
228
  /** Number of items returned in the response. */
229
229
  count?: number | null;
230
230
  /** Offset that was requested. */
@@ -236,13 +236,13 @@ export interface PagingMetadataV2 {
236
236
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
237
237
  cursors?: Cursors;
238
238
  }
239
- export interface Cursors {
239
+ interface Cursors {
240
240
  /** Cursor pointing to next page in the list of results. */
241
241
  next?: string | null;
242
242
  /** Cursor pointing to previous page in the list of results. */
243
243
  prev?: string | null;
244
244
  }
245
- export interface AggregationRequest {
245
+ interface AggregationRequest {
246
246
  /** Paging preferences. */
247
247
  paging?: Paging;
248
248
  /** 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. */
@@ -305,19 +305,19 @@ export interface AggregationRequest {
305
305
  /** ID of the collection on which to run the aggregation. */
306
306
  dataCollectionId?: string;
307
307
  }
308
- export interface AggregationResponse {
308
+ interface AggregationResponse {
309
309
  /** Aggregation results. */
310
310
  items?: Record<string, any>[] | null;
311
311
  /** Paging information. */
312
312
  pagingMetadata?: PagingMetadataV2;
313
313
  }
314
- export interface CountRequest {
314
+ interface CountRequest {
315
315
  /** Filter preferences defining the query. For more information on how to structure a filter object, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section). */
316
316
  filter?: Record<string, any> | null;
317
317
  /** ID of the collection for which to count query results. */
318
318
  dataCollectionId?: string;
319
319
  }
320
- export interface CountResponse {
320
+ interface CountResponse {
321
321
  /** Count of items matching the query. */
322
322
  totalCount?: number;
323
323
  /**
@@ -326,7 +326,7 @@ export interface CountResponse {
326
326
  */
327
327
  totalResults?: number;
328
328
  }
329
- export interface DistinctRequest {
329
+ interface DistinctRequest {
330
330
  /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
331
331
  dataQuery?: QueryV2;
332
332
  /** Property name for which to return all distinct values. */
@@ -341,25 +341,25 @@ export interface DistinctRequest {
341
341
  */
342
342
  omitTotalCount?: boolean;
343
343
  }
344
- export interface DistinctResponse {
344
+ interface DistinctResponse {
345
345
  /** List of distinct values contained in the property specified in `propertyName`. */
346
346
  items?: any[];
347
347
  /** Paging information. */
348
348
  pagingMetadata?: PagingMetadataV2;
349
349
  }
350
- export interface BulkInsertRequest {
350
+ interface BulkInsertRequest {
351
351
  /** Items to insert. */
352
352
  items: Record<string, any>[] | null;
353
353
  /** ID of the collection in which to insert the items. */
354
354
  dataCollectionId?: string;
355
355
  }
356
- export interface BulkInsertResponse {
356
+ interface BulkInsertResponse {
357
357
  /** IDs of items inserted. */
358
358
  insertedItemIds?: string[];
359
359
  /** Error details for items that couldn't be inserted. */
360
360
  errors?: BulkError[];
361
361
  }
362
- export interface BulkError {
362
+ interface BulkError {
363
363
  /** ID of the item that couldn't be inserted. */
364
364
  itemId?: string | null;
365
365
  /** Error message. */
@@ -369,7 +369,7 @@ export interface BulkError {
369
369
  /** Index of the failed item in the `items` paramater of the request. */
370
370
  originalIndex?: number;
371
371
  }
372
- export interface ApplicationError {
372
+ interface ApplicationError {
373
373
  /** Error code. */
374
374
  code?: string;
375
375
  /** Error description. */
@@ -377,17 +377,17 @@ export interface ApplicationError {
377
377
  /** Error data. */
378
378
  data?: Record<string, any> | null;
379
379
  }
380
- export interface Details {
380
+ interface Details {
381
381
  /** Application error. */
382
382
  applicationError?: ApplicationError;
383
383
  }
384
- export interface BulkSaveRequest {
384
+ interface BulkSaveRequest {
385
385
  /** Items to insert or update. */
386
386
  items: Record<string, any>[] | null;
387
387
  /** ID of the collection in which to insert or update the items. */
388
388
  dataCollectionId?: string;
389
389
  }
390
- export interface BulkSaveResponse {
390
+ interface BulkSaveResponse {
391
391
  /** IDs of items inserted. */
392
392
  insertedItemIds?: string[];
393
393
  /** IDs of items updated. */
@@ -395,19 +395,19 @@ export interface BulkSaveResponse {
395
395
  /** Errors for items that couldn't be inserted or updated. */
396
396
  errors?: BulkError[];
397
397
  }
398
- export interface BulkUpdateRequest {
398
+ interface BulkUpdateRequest {
399
399
  /** Items to update. */
400
400
  items: Record<string, any>[] | null;
401
401
  /** ID of the collection in which to update items. */
402
402
  dataCollectionId?: string;
403
403
  }
404
- export interface BulkUpdateResponse {
404
+ interface BulkUpdateResponse {
405
405
  /** IDs of items updated. */
406
406
  updatedItemIds?: string[];
407
407
  /** Errors for items that couldn't be updated. */
408
408
  errors?: BulkError[];
409
409
  }
410
- export interface BulkPatchRequest {
410
+ interface BulkPatchRequest {
411
411
  /** List of items and their patches */
412
412
  entries?: Entry[];
413
413
  /** Data access options */
@@ -415,35 +415,35 @@ export interface BulkPatchRequest {
415
415
  /** ID of the collection */
416
416
  dataCollectionId?: string;
417
417
  }
418
- export interface Entry {
418
+ interface Entry {
419
419
  /** item id to patch */
420
420
  itemId?: string;
421
421
  /** Patch data */
422
422
  patch?: Record<string, any> | null;
423
423
  }
424
- export interface BulkPatchResponse {
424
+ interface BulkPatchResponse {
425
425
  /** Patched item ids */
426
426
  patchedItemIds?: string[];
427
427
  /** Errors */
428
428
  errors?: BulkError[];
429
429
  }
430
- export interface BulkRemoveRequest {
430
+ interface BulkRemoveRequest {
431
431
  /** IDs of items to remove. */
432
432
  entries?: BulkRemoveRequestEntry[];
433
433
  /** ID of the collection from which to remove the items. */
434
434
  dataCollectionId?: string;
435
435
  }
436
- export interface BulkRemoveRequestEntry {
436
+ interface BulkRemoveRequestEntry {
437
437
  /** ID of item to remove. */
438
438
  itemId?: string;
439
439
  }
440
- export interface BulkRemoveResponse {
440
+ interface BulkRemoveResponse {
441
441
  /** IDs of items removed. */
442
442
  removedItemIds?: string[];
443
443
  /** Errors for items that couldn't be removed. */
444
444
  errors?: BulkError[];
445
445
  }
446
- export interface QueryReferencedRequest {
446
+ interface QueryReferencedRequest {
447
447
  /** ID of the referring item. */
448
448
  referringItemId: string;
449
449
  /** Property containing the references to the referenced items. */
@@ -460,13 +460,11 @@ export interface QueryReferencedRequest {
460
460
  */
461
461
  omitTotalCount?: boolean;
462
462
  }
463
- export declare enum Order {
463
+ declare enum Order {
464
464
  ASC = "ASC",
465
465
  DESC = "DESC"
466
466
  }
467
- /** @enumType */
468
- export type OrderWithLiterals = Order | 'ASC' | 'DESC';
469
- export interface QueryReferencedResponse {
467
+ interface QueryReferencedResponse {
470
468
  /**
471
469
  * *Deprecated.** Refer to `entities` instead. List of referenced items.
472
470
  * @deprecated
@@ -487,20 +485,20 @@ export interface QueryReferencedResponse {
487
485
  /** Paging information. */
488
486
  pagingMetadata?: PagingMetadataV2;
489
487
  }
490
- export interface ReferencedEntity extends ReferencedEntityEntityOneOf {
488
+ interface ReferencedEntity extends ReferencedEntityEntityOneOf {
491
489
  /** Data item referenced. */
492
490
  item?: Record<string, any> | null;
493
491
  /** Unresolved ID. 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. */
494
492
  referenceId?: string;
495
493
  }
496
494
  /** @oneof */
497
- export interface ReferencedEntityEntityOneOf {
495
+ interface ReferencedEntityEntityOneOf {
498
496
  /** Data item referenced. */
499
497
  item?: Record<string, any> | null;
500
498
  /** Unresolved ID. 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. */
501
499
  referenceId?: string;
502
500
  }
503
- export interface BulkInsertReferencesRequest {
501
+ interface BulkInsertReferencesRequest {
504
502
  /**
505
503
  * References to insert.
506
504
  * @minSize 1
@@ -509,7 +507,7 @@ export interface BulkInsertReferencesRequest {
509
507
  /** ID of the collection containing the referring item. */
510
508
  dataCollectionId?: string;
511
509
  }
512
- export interface Reference {
510
+ interface Reference {
513
511
  /** Property containing the references to the referenced items. */
514
512
  propertyName?: string;
515
513
  /** ID of the referring item. */
@@ -517,9 +515,9 @@ export interface Reference {
517
515
  /** ID of the referenced item. */
518
516
  referencedItemId?: string;
519
517
  }
520
- export interface BulkInsertReferencesResponse {
518
+ interface BulkInsertReferencesResponse {
521
519
  }
522
- export interface BulkReplaceReferencesRequest {
520
+ interface BulkReplaceReferencesRequest {
523
521
  /** Property containing the references to the referenced items. */
524
522
  propertyName: string;
525
523
  /** ID of the referring item. */
@@ -529,9 +527,9 @@ export interface BulkReplaceReferencesRequest {
529
527
  /** ID of the collection containing the referring item. */
530
528
  dataCollectionId?: string;
531
529
  }
532
- export interface BulkReplaceReferencesResponse {
530
+ interface BulkReplaceReferencesResponse {
533
531
  }
534
- export interface BulkRemoveReferencesRequest {
532
+ interface BulkRemoveReferencesRequest {
535
533
  /**
536
534
  * References to be removed.
537
535
  * @minSize 1
@@ -540,9 +538,9 @@ export interface BulkRemoveReferencesRequest {
540
538
  /** ID of the collection containing the referring item. */
541
539
  dataCollectionId?: string;
542
540
  }
543
- export interface BulkRemoveReferencesResponse {
541
+ interface BulkRemoveReferencesResponse {
544
542
  }
545
- export interface IsReferencedRequest {
543
+ interface IsReferencedRequest {
546
544
  /** Property that may contain a reference to the specified item. */
547
545
  propertyName: string;
548
546
  /** ID of the referring item. */
@@ -552,11 +550,11 @@ export interface IsReferencedRequest {
552
550
  /** ID of the collection containing the referring item. */
553
551
  dataCollectionId?: string;
554
552
  }
555
- export interface IsReferencedResponse {
553
+ interface IsReferencedResponse {
556
554
  /** Whether the specified property of the referring item contains a reference to the specified referenced item. */
557
555
  isReferenced?: boolean;
558
556
  }
559
- export interface RestoreFromTrashBinRequest {
557
+ interface RestoreFromTrashBinRequest {
560
558
  /**
561
559
  * Deprecated, use dataCollectionId instead.
562
560
  * Collection name
@@ -572,6 +570,220 @@ export interface RestoreFromTrashBinRequest {
572
570
  /** ID of the collection */
573
571
  dataCollectionId?: string;
574
572
  }
575
- export interface RestoreFromTrashBinResponse {
573
+ interface RestoreFromTrashBinResponse {
574
+ item?: Record<string, any> | null;
575
+ }
576
+ interface InsertOptions {
577
+ /** Item to insert. */
576
578
  item?: Record<string, any> | null;
579
+ /** ID of the collection in which to insert the item. */
580
+ dataCollectionId?: string;
581
+ }
582
+ interface UpdateOptions {
583
+ /** Item to update. The existing item is replaced with this version. */
584
+ item: Record<string, any> | null;
585
+ /** ID of the collection containing the existing item. */
586
+ dataCollectionId?: string;
587
+ }
588
+ interface SaveOptions {
589
+ /** Item to insert or update. */
590
+ item?: Record<string, any> | null;
591
+ /** ID of the collection in which to insert or update the item. */
592
+ dataCollectionId?: string;
593
+ }
594
+ interface GetOptions {
595
+ /** ID of the collection from which to retrieve the item. */
596
+ dataCollectionId?: string;
597
+ }
598
+ interface RemoveOptions {
599
+ /** ID of the collection from which to remove the item. */
600
+ dataCollectionId?: string;
601
+ }
602
+ interface TruncateOptions {
603
+ /** ID of the collection to truncate. */
604
+ dataCollectionId?: string;
605
+ }
606
+ interface QueryOptions {
607
+ /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
608
+ dataQuery?: QueryV2;
609
+ /**
610
+ * Whether to omit the total count in the response.
611
+ * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
612
+ *
613
+ * Default: `false`
614
+ */
615
+ omitTotalCount?: boolean;
616
+ /**
617
+ * Properties for which to include referenced items in the query's results.
618
+ * Up to 50 referenced items can be included for each item that matches the query.
619
+ * If more than 50 items are referenced, `partialIncludes` in the response is `true`.
620
+ */
621
+ includeReferencedItems?: string[];
622
+ /** ID of the collection to query. */
623
+ dataCollectionId?: string;
624
+ }
625
+ interface AggregateOptions {
626
+ /** Paging preferences. */
627
+ paging?: Paging;
628
+ /** 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. */
629
+ initialFilter?: Record<string, any> | null;
630
+ /**
631
+ * Object defining the steps of the aggregation to be This is an object defining aggregation itself.
632
+ *
633
+ * * Grouping rule is defined as _id field. It takes a form of:
634
+ * {
635
+ * "_id": "$field"
636
+ * }
637
+ *
638
+ * If multiple fields are used for grouping, Group takes a form of:
639
+ * {
640
+ * "_id": {
641
+ * "field1": "$field1"
642
+ * "field2": "$field2"
643
+ * }
644
+ * }
645
+ *
646
+ * * Aggregation functions are defined as special field definitions.
647
+ *
648
+ * Average:
649
+ * {
650
+ * "_id": "$field"
651
+ * "my_avg": {
652
+ * "$avg": "$other_field"
653
+ * }
654
+ * }
655
+ *
656
+ * Max:
657
+ * {
658
+ * "_id": "$field"
659
+ * "my_max": {
660
+ * "$max": "$other_field"
661
+ * }
662
+ * }
663
+ *
664
+ * Min:
665
+ * {
666
+ * "_id": "$field"
667
+ * "my_min": {
668
+ * "$min": "$other_field"
669
+ * }
670
+ * }
671
+ *
672
+ * Sum:
673
+ * {
674
+ * "_id": "$field"
675
+ * "my_sum": {
676
+ * "$sum": "$other_field"
677
+ * }
678
+ * }
679
+ */
680
+ aggregation?: Record<string, any> | null;
681
+ /** 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. */
682
+ finalFilter?: Record<string, any> | null;
683
+ /** Sorting preferences. */
684
+ sort?: Sorting[];
685
+ /** ID of the collection on which to run the aggregation. */
686
+ dataCollectionId?: string;
687
+ }
688
+ interface CountOptions {
689
+ /** Filter preferences defining the query. For more information on how to structure a filter object, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section). */
690
+ filter?: Record<string, any> | null;
691
+ /** ID of the collection for which to count query results. */
692
+ dataCollectionId?: string;
693
+ }
694
+ interface DistinctOptions {
695
+ /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
696
+ dataQuery?: QueryV2;
697
+ /** Property name for which to return all distinct values. */
698
+ propertyName: string;
699
+ /** ID of the collection to query. */
700
+ dataCollectionId?: string;
701
+ /**
702
+ * Whether to omit the total count in the response.
703
+ * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
704
+ *
705
+ * Default: `false`
706
+ */
707
+ omitTotalCount?: boolean;
708
+ }
709
+ interface BulkInsertOptions {
710
+ /** Items to insert. */
711
+ items: Record<string, any>[] | null;
712
+ /** ID of the collection in which to insert the items. */
713
+ dataCollectionId?: string;
714
+ }
715
+ interface BulkSaveOptions {
716
+ /** Items to insert or update. */
717
+ items: Record<string, any>[] | null;
718
+ /** ID of the collection in which to insert or update the items. */
719
+ dataCollectionId?: string;
720
+ }
721
+ interface BulkUpdateOptions {
722
+ /** Items to update. */
723
+ items: Record<string, any>[] | null;
724
+ /** ID of the collection in which to update items. */
725
+ dataCollectionId?: string;
726
+ }
727
+ interface BulkRemoveOptions {
728
+ /** IDs of items to remove. */
729
+ entries?: BulkRemoveRequestEntry[];
730
+ /** ID of the collection from which to remove the items. */
731
+ dataCollectionId?: string;
732
+ }
733
+ interface QueryReferencedOptions {
734
+ /** ID of the referring item. */
735
+ referringItemId: string;
736
+ /** Property containing the references to the referenced items. */
737
+ propertyName: string;
738
+ /** Paging preferences. */
739
+ paging?: Paging;
740
+ /** ID of the collection containing the referring item. */
741
+ dataCollectionId?: string;
742
+ /**
743
+ * Whether to omit the total count in the response.
744
+ * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
745
+ *
746
+ * Default: `false`
747
+ */
748
+ omitTotalCount?: boolean;
749
+ }
750
+ interface BulkInsertReferencesOptions {
751
+ /**
752
+ * References to insert.
753
+ * @minSize 1
754
+ */
755
+ references: Reference[];
756
+ /** ID of the collection containing the referring item. */
757
+ dataCollectionId?: string;
758
+ }
759
+ interface BulkReplaceReferencesOptions {
760
+ /** Property containing the references to the referenced items. */
761
+ propertyName: string;
762
+ /** ID of the referring item. */
763
+ referringItemId: string;
764
+ /** List of new referenced item IDs to replace the existing ones. */
765
+ newReferencedItemIds?: string[];
766
+ /** ID of the collection containing the referring item. */
767
+ dataCollectionId?: string;
768
+ }
769
+ interface BulkRemoveReferencesOptions {
770
+ /**
771
+ * References to be removed.
772
+ * @minSize 1
773
+ */
774
+ references: Reference[];
775
+ /** ID of the collection containing the referring item. */
776
+ dataCollectionId?: string;
777
+ }
778
+ interface IsReferencedOptions {
779
+ /** Property that may contain a reference to the specified item. */
780
+ propertyName: string;
781
+ /** ID of the referring item. */
782
+ referringItemId: string;
783
+ /** ID of the item that may be referenced. */
784
+ referencedItemId: string;
785
+ /** ID of the collection containing the referring item. */
786
+ dataCollectionId?: string;
577
787
  }
788
+
789
+ export { type Sorting as $, type AggregateOptions as A, type BulkInsertOptions as B, type CountOptions as C, type DistinctOptions as D, type InsertRequest as E, type Options as F, type GetOptions as G, type UpdateRequest as H, type InsertOptions as I, type SaveRequest as J, type PatchResponse as K, type PatchWhereRequest as L, type PatchWhereResponse as M, type GetRequest as N, Order as O, type PatchRequest as P, type QueryOptions as Q, type RemoveOptions as R, type SaveOptions as S, type TruncateOptions as T, type UpdateOptions as U, type ReadOptions as V, type RemoveRequest as W, type TruncateRequest as X, type TruncateResponse as Y, type QueryRequest as Z, type Query as _, type InsertResponse as a, type Paging as a0, type QueryV2 as a1, type QueryV2PagingMethodOneOf as a2, type CursorPaging as a3, type PagingMetadataV2 as a4, type Cursors as a5, type AggregationRequest as a6, type CountRequest as a7, type DistinctRequest as a8, type BulkInsertRequest as a9, type BulkError as aa, type ApplicationError as ab, type Details as ac, type BulkSaveRequest as ad, type BulkUpdateRequest as ae, type BulkPatchRequest as af, type Entry as ag, type BulkPatchResponse as ah, type BulkRemoveRequest as ai, type BulkRemoveRequestEntry as aj, type QueryReferencedRequest as ak, type ReferencedEntity as al, type ReferencedEntityEntityOneOf as am, type BulkInsertReferencesRequest as an, type Reference as ao, type BulkInsertReferencesResponse as ap, type BulkReplaceReferencesRequest as aq, type BulkReplaceReferencesResponse as ar, type BulkRemoveReferencesRequest as as, type BulkRemoveReferencesResponse as at, type IsReferencedRequest as au, type RestoreFromTrashBinRequest as av, type RestoreFromTrashBinResponse as aw, type UpdateResponse as b, type SaveResponse as c, type GetResponse as d, type RemoveResponse as e, type QueryResponse as f, type AggregationResponse as g, type CountResponse as h, type DistinctResponse as i, type BulkInsertResponse as j, type BulkSaveOptions as k, type BulkSaveResponse as l, type BulkUpdateOptions as m, type BulkUpdateResponse as n, type BulkRemoveOptions as o, type BulkRemoveResponse as p, type QueryReferencedOptions as q, type QueryReferencedResponse as r, type BulkInsertReferencesOptions as s, type BulkReplaceReferencesOptions as t, type BulkRemoveReferencesOptions as u, type IsReferencedOptions as v, type IsReferencedResponse as w, Segment as x, SortOrder as y, type Item as z };