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

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 (130) hide show
  1. package/build/{cjs/src/data-v1-data-service-data.universal.d.ts → data-v1-data-service-data.universal-DwJ77xKF.d.mts} +91 -104
  2. package/build/{es/src/data-v1-data-service-data.universal.d.ts → data-v1-data-service-data.universal-DwJ77xKF.d.ts} +91 -104
  3. package/build/index.d.mts +18 -0
  4. package/build/index.d.ts +18 -0
  5. package/build/index.js +1509 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +1464 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/data-v1-data-service-data.universal-B0E_2MN6.d.mts +789 -0
  10. package/build/internal/data-v1-data-service-data.universal-B0E_2MN6.d.ts +789 -0
  11. package/build/internal/{cjs/src/data-v1-data-service-data.public.d.ts → index.d.mts} +63 -25
  12. package/build/internal/{es/src/data-v1-data-service-data.public.d.ts → index.d.ts} +63 -25
  13. package/build/internal/index.js +1509 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +1464 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/{es/src/data-v1-data-service-data.types.d.ts → internal/meta.d.mts} +94 -167
  18. package/build/internal/{es/src/data-v1-data-service-data.types.d.ts → meta.d.ts} +94 -167
  19. package/build/internal/meta.js +1093 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +1048 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/{cjs/src/data-v1-data-service-data.types.d.ts → meta.d.mts} +94 -167
  24. package/build/{internal/cjs/src/data-v1-data-service-data.types.d.ts → meta.d.ts} +94 -167
  25. package/build/meta.js +1093 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +1048 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/data-v1-data-service-data.context.d.ts +0 -5
  40. package/build/cjs/src/data-v1-data-service-data.context.js +0 -47
  41. package/build/cjs/src/data-v1-data-service-data.context.js.map +0 -1
  42. package/build/cjs/src/data-v1-data-service-data.http.d.ts +0 -188
  43. package/build/cjs/src/data-v1-data-service-data.http.js +0 -872
  44. package/build/cjs/src/data-v1-data-service-data.http.js.map +0 -1
  45. package/build/cjs/src/data-v1-data-service-data.meta.d.ts +0 -37
  46. package/build/cjs/src/data-v1-data-service-data.meta.js +0 -389
  47. package/build/cjs/src/data-v1-data-service-data.meta.js.map +0 -1
  48. package/build/cjs/src/data-v1-data-service-data.public.d.ts +0 -16
  49. package/build/cjs/src/data-v1-data-service-data.public.js +0 -142
  50. package/build/cjs/src/data-v1-data-service-data.public.js.map +0 -1
  51. package/build/cjs/src/data-v1-data-service-data.types.js +0 -23
  52. package/build/cjs/src/data-v1-data-service-data.types.js.map +0 -1
  53. package/build/cjs/src/data-v1-data-service-data.universal.js +0 -930
  54. package/build/cjs/src/data-v1-data-service-data.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/package.json +0 -3
  65. package/build/es/src/data-v1-data-service-data.context.d.ts +0 -5
  66. package/build/es/src/data-v1-data-service-data.context.js +0 -41
  67. package/build/es/src/data-v1-data-service-data.context.js.map +0 -1
  68. package/build/es/src/data-v1-data-service-data.http.d.ts +0 -188
  69. package/build/es/src/data-v1-data-service-data.http.js +0 -850
  70. package/build/es/src/data-v1-data-service-data.http.js.map +0 -1
  71. package/build/es/src/data-v1-data-service-data.meta.d.ts +0 -37
  72. package/build/es/src/data-v1-data-service-data.meta.js +0 -344
  73. package/build/es/src/data-v1-data-service-data.meta.js.map +0 -1
  74. package/build/es/src/data-v1-data-service-data.public.d.ts +0 -16
  75. package/build/es/src/data-v1-data-service-data.public.js +0 -117
  76. package/build/es/src/data-v1-data-service-data.public.js.map +0 -1
  77. package/build/es/src/data-v1-data-service-data.types.js +0 -20
  78. package/build/es/src/data-v1-data-service-data.types.js.map +0 -1
  79. package/build/es/src/data-v1-data-service-data.universal.js +0 -885
  80. package/build/es/src/data-v1-data-service-data.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -1
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/data-v1-data-service-data.context.d.ts +0 -41
  91. package/build/internal/cjs/src/data-v1-data-service-data.context.js +0 -47
  92. package/build/internal/cjs/src/data-v1-data-service-data.context.js.map +0 -1
  93. package/build/internal/cjs/src/data-v1-data-service-data.http.d.ts +0 -188
  94. package/build/internal/cjs/src/data-v1-data-service-data.http.js +0 -872
  95. package/build/internal/cjs/src/data-v1-data-service-data.http.js.map +0 -1
  96. package/build/internal/cjs/src/data-v1-data-service-data.meta.d.ts +0 -37
  97. package/build/internal/cjs/src/data-v1-data-service-data.meta.js +0 -389
  98. package/build/internal/cjs/src/data-v1-data-service-data.meta.js.map +0 -1
  99. package/build/internal/cjs/src/data-v1-data-service-data.public.js +0 -142
  100. package/build/internal/cjs/src/data-v1-data-service-data.public.js.map +0 -1
  101. package/build/internal/cjs/src/data-v1-data-service-data.types.js +0 -23
  102. package/build/internal/cjs/src/data-v1-data-service-data.types.js.map +0 -1
  103. package/build/internal/cjs/src/data-v1-data-service-data.universal.d.ts +0 -1136
  104. package/build/internal/cjs/src/data-v1-data-service-data.universal.js +0 -930
  105. package/build/internal/cjs/src/data-v1-data-service-data.universal.js.map +0 -1
  106. package/build/internal/es/index.d.ts +0 -1
  107. package/build/internal/es/index.js +0 -2
  108. package/build/internal/es/index.js.map +0 -1
  109. package/build/internal/es/index.typings.d.ts +0 -1
  110. package/build/internal/es/index.typings.js +0 -2
  111. package/build/internal/es/index.typings.js.map +0 -1
  112. package/build/internal/es/meta.d.ts +0 -1
  113. package/build/internal/es/meta.js +0 -2
  114. package/build/internal/es/meta.js.map +0 -1
  115. package/build/internal/es/src/data-v1-data-service-data.context.d.ts +0 -41
  116. package/build/internal/es/src/data-v1-data-service-data.context.js +0 -41
  117. package/build/internal/es/src/data-v1-data-service-data.context.js.map +0 -1
  118. package/build/internal/es/src/data-v1-data-service-data.http.d.ts +0 -188
  119. package/build/internal/es/src/data-v1-data-service-data.http.js +0 -850
  120. package/build/internal/es/src/data-v1-data-service-data.http.js.map +0 -1
  121. package/build/internal/es/src/data-v1-data-service-data.meta.d.ts +0 -37
  122. package/build/internal/es/src/data-v1-data-service-data.meta.js +0 -344
  123. package/build/internal/es/src/data-v1-data-service-data.meta.js.map +0 -1
  124. package/build/internal/es/src/data-v1-data-service-data.public.js +0 -117
  125. package/build/internal/es/src/data-v1-data-service-data.public.js.map +0 -1
  126. package/build/internal/es/src/data-v1-data-service-data.types.js +0 -20
  127. package/build/internal/es/src/data-v1-data-service-data.types.js.map +0 -1
  128. package/build/internal/es/src/data-v1-data-service-data.universal.d.ts +0 -1136
  129. package/build/internal/es/src/data-v1-data-service-data.universal.js +0 -885
  130. package/build/internal/es/src/data-v1-data-service-data.universal.js.map +0 -1
@@ -1,1136 +0,0 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- export interface Item {
3
- item?: Record<string, any> | null;
4
- }
5
- export interface InsertRequest {
6
- /** Item to insert. */
7
- item?: Record<string, any> | null;
8
- /** ID of the collection in which to insert the item. */
9
- dataCollectionId?: string;
10
- }
11
- export declare enum Segment {
12
- /** Access database used in the Live site. */
13
- LIVE = "LIVE",
14
- /** Access staging (sandbox) database used in the editor. */
15
- SANDBOX = "SANDBOX",
16
- /** Access deleted database used in the Live site. */
17
- TRASH_LIVE = "TRASH_LIVE"
18
- }
19
- /** @enumType */
20
- export type SegmentWithLiterals = Segment | 'LIVE' | 'SANDBOX' | 'TRASH_LIVE';
21
- export interface Options {
22
- }
23
- export interface InsertResponse {
24
- /** Inserted item. */
25
- item?: Record<string, any> | null;
26
- }
27
- export interface UpdateRequest {
28
- /** Item to update. The existing item is replaced with this version. */
29
- item: Record<string, any> | null;
30
- /** ID of the collection containing the existing item. */
31
- dataCollectionId?: string;
32
- }
33
- export interface UpdateResponse {
34
- /** Updated item */
35
- item?: Record<string, any> | null;
36
- }
37
- export interface SaveRequest {
38
- /** Item to insert or update. */
39
- item?: Record<string, any> | null;
40
- /** ID of the collection in which to insert or update the item. */
41
- dataCollectionId?: string;
42
- }
43
- export interface SaveResponse {
44
- /** Inserted or updated item. */
45
- item?: Record<string, any> | null;
46
- }
47
- export interface PatchRequest {
48
- /** item id to patch */
49
- itemId?: string;
50
- /** Patch data */
51
- patch?: Record<string, any> | null;
52
- /** Data access options */
53
- options?: Options;
54
- /** ID of the collection */
55
- dataCollectionId?: string;
56
- }
57
- export interface PatchResponse {
58
- /** Patched item */
59
- item?: Record<string, any> | null;
60
- }
61
- export interface PatchWhereRequest {
62
- /** Data segment */
63
- segment?: SegmentWithLiterals;
64
- /** filter items to patch */
65
- filter?: any;
66
- /** Patch data */
67
- patch?: Record<string, any> | null;
68
- /** Data access options */
69
- options?: Options;
70
- /** ID of the collection */
71
- dataCollectionId?: string;
72
- }
73
- export interface PatchWhereResponse {
74
- /** Number of patched items */
75
- totalCount?: number;
76
- totalAffectedValues?: number;
77
- }
78
- export interface GetRequest {
79
- /** ID of the item to retrieve. */
80
- itemId: string;
81
- /** ID of the collection from which to retrieve the item. */
82
- dataCollectionId?: string;
83
- }
84
- export interface ReadOptions {
85
- }
86
- export interface GetResponse {
87
- /** Retrieved item. */
88
- item?: Record<string, any> | null;
89
- }
90
- export interface RemoveRequest {
91
- /** ID of the item to remove. */
92
- itemId: string;
93
- /** ID of the collection from which to remove the item. */
94
- dataCollectionId?: string;
95
- }
96
- export interface RemoveResponse {
97
- /** Removed item. */
98
- item?: Record<string, any> | null;
99
- }
100
- export interface TruncateRequest {
101
- /** ID of the collection to truncate. */
102
- dataCollectionId?: string;
103
- }
104
- export interface TruncateResponse {
105
- }
106
- export interface QueryRequest {
107
- /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
108
- dataQuery?: QueryV2;
109
- /**
110
- * Whether to omit the total count in the response.
111
- * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
112
- *
113
- * Default: `false`
114
- */
115
- omitTotalCount?: boolean;
116
- /**
117
- * Properties for which to include referenced items in the query's results.
118
- * Up to 50 referenced items can be included for each item that matches the query.
119
- * If more than 50 items are referenced, `partialIncludes` in the response is `true`.
120
- */
121
- includeReferencedItems?: string[];
122
- /** ID of the collection to query. */
123
- dataCollectionId?: string;
124
- }
125
- export interface Query {
126
- /**
127
- * Filter object in the following format:
128
- * `"filter" : {
129
- * "fieldName1": "value1",
130
- * "fieldName2":{"$operator":"value2"}
131
- * }`
132
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
133
- */
134
- filter?: any;
135
- /**
136
- * Sort object in the following format:
137
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
138
- */
139
- sort?: Sorting[];
140
- /** Paging options to limit and skip the number of items. */
141
- paging?: Paging;
142
- /** Array of projected fields. A list of specific field names to return. */
143
- fields?: string[];
144
- }
145
- export interface Sorting {
146
- /** Name of the field to sort by. */
147
- fieldName?: string;
148
- /** Sort order. */
149
- order?: SortOrderWithLiterals;
150
- }
151
- export declare enum SortOrder {
152
- ASC = "ASC",
153
- DESC = "DESC"
154
- }
155
- /** @enumType */
156
- export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
157
- export interface Paging {
158
- /**
159
- * Number of items to load.
160
- * @max 1000
161
- */
162
- limit?: number | null;
163
- /** Number of items to skip in the current sort order. */
164
- offset?: number | null;
165
- }
166
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
167
- /** Paging options to limit and skip the number of items. */
168
- paging?: Paging;
169
- /** 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`. */
170
- cursorPaging?: CursorPaging;
171
- /**
172
- * Filter object in the following format:
173
- * `"filter" : {
174
- * "fieldName1": "value1",
175
- * "fieldName2":{"$operator":"value2"}
176
- * }`
177
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
178
- */
179
- filter?: Record<string, any> | null;
180
- /**
181
- * Sort object in the following format:
182
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
183
- */
184
- sort?: Sorting[];
185
- /** Array of projected fields. A list of specific field names to return. */
186
- fields?: string[];
187
- }
188
- /** @oneof */
189
- export interface QueryV2PagingMethodOneOf {
190
- /** Paging options to limit and skip the number of items. */
191
- paging?: Paging;
192
- /** 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`. */
193
- cursorPaging?: CursorPaging;
194
- }
195
- export interface CursorPaging {
196
- /**
197
- * Number of items to load.
198
- * @max 1000
199
- */
200
- limit?: number | null;
201
- /**
202
- * Pointer to the next or previous page in the list of results.
203
- *
204
- * You can get the relevant cursor token
205
- * from the `pagingMetadata` object in the previous call's response.
206
- * Not relevant for the first request.
207
- */
208
- cursor?: string | null;
209
- }
210
- export interface QueryResponse {
211
- /** Retrieved items. */
212
- items?: Record<string, any>[] | null;
213
- /**
214
- * *Deprecated.** Refer to 'pagingMetadata' instead. Total number of items satisfying the query.
215
- * @deprecated
216
- */
217
- totalCount?: number;
218
- /**
219
- * *Deprecated.** Refer to 'pagingMetadata' instead. Total number of items satisfying the query.
220
- * @deprecated
221
- */
222
- totalResults?: number;
223
- /** Whether referenced items are trimmed from the results. This occurs when there are more than 50 referenced items. */
224
- partialIncludes?: boolean;
225
- /** Paging information. */
226
- pagingMetadata?: PagingMetadataV2;
227
- }
228
- export interface PagingMetadataV2 {
229
- /** Number of items returned in the response. */
230
- count?: number | null;
231
- /** Offset that was requested. */
232
- offset?: number | null;
233
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
234
- total?: number | null;
235
- /** Flag that indicates the server failed to calculate the `total` field. */
236
- tooManyToCount?: boolean | null;
237
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
238
- cursors?: Cursors;
239
- }
240
- export interface Cursors {
241
- /** Cursor pointing to next page in the list of results. */
242
- next?: string | null;
243
- /** Cursor pointing to previous page in the list of results. */
244
- prev?: string | null;
245
- }
246
- export interface AggregationRequest {
247
- /** Paging preferences. */
248
- paging?: Paging;
249
- /** 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. */
250
- initialFilter?: Record<string, any> | null;
251
- /**
252
- * Object defining the steps of the aggregation to be This is an object defining aggregation itself.
253
- *
254
- * * Grouping rule is defined as _id field. It takes a form of:
255
- * {
256
- * "_id": "$field"
257
- * }
258
- *
259
- * If multiple fields are used for grouping, Group takes a form of:
260
- * {
261
- * "_id": {
262
- * "field1": "$field1"
263
- * "field2": "$field2"
264
- * }
265
- * }
266
- *
267
- * * Aggregation functions are defined as special field definitions.
268
- *
269
- * Average:
270
- * {
271
- * "_id": "$field"
272
- * "my_avg": {
273
- * "$avg": "$other_field"
274
- * }
275
- * }
276
- *
277
- * Max:
278
- * {
279
- * "_id": "$field"
280
- * "my_max": {
281
- * "$max": "$other_field"
282
- * }
283
- * }
284
- *
285
- * Min:
286
- * {
287
- * "_id": "$field"
288
- * "my_min": {
289
- * "$min": "$other_field"
290
- * }
291
- * }
292
- *
293
- * Sum:
294
- * {
295
- * "_id": "$field"
296
- * "my_sum": {
297
- * "$sum": "$other_field"
298
- * }
299
- * }
300
- */
301
- aggregation?: Record<string, any> | null;
302
- /** 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. */
303
- finalFilter?: Record<string, any> | null;
304
- /** Sorting preferences. */
305
- sort?: Sorting[];
306
- /** ID of the collection on which to run the aggregation. */
307
- dataCollectionId?: string;
308
- }
309
- export interface AggregationResponse {
310
- /** Aggregation results. */
311
- items?: Record<string, any>[] | null;
312
- /** Paging information. */
313
- pagingMetadata?: PagingMetadataV2;
314
- }
315
- export interface CountRequest {
316
- /** 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). */
317
- filter?: Record<string, any> | null;
318
- /** ID of the collection for which to count query results. */
319
- dataCollectionId?: string;
320
- }
321
- export interface CountResponse {
322
- /** Count of items matching the query. */
323
- totalCount?: number;
324
- /**
325
- * *Deprecated.** Refer to `totalCount` instead.
326
- * @deprecated
327
- */
328
- totalResults?: number;
329
- }
330
- export interface DistinctRequest {
331
- /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
332
- dataQuery?: QueryV2;
333
- /** Property name for which to return all distinct values. */
334
- propertyName: string;
335
- /** ID of the collection to query. */
336
- dataCollectionId?: string;
337
- /**
338
- * Whether to omit the total count in the response.
339
- * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
340
- *
341
- * Default: `false`
342
- */
343
- omitTotalCount?: boolean;
344
- }
345
- export interface DistinctResponse {
346
- /** List of distinct values contained in the property specified in `propertyName`. */
347
- items?: any[];
348
- /** Paging information. */
349
- pagingMetadata?: PagingMetadataV2;
350
- }
351
- export interface BulkInsertRequest {
352
- /** Items to insert. */
353
- items: Record<string, any>[] | null;
354
- /** ID of the collection in which to insert the items. */
355
- dataCollectionId?: string;
356
- }
357
- export interface BulkInsertResponse {
358
- /** IDs of items inserted. */
359
- insertedItemIds?: string[];
360
- /** Error details for items that couldn't be inserted. */
361
- errors?: BulkError[];
362
- }
363
- export interface BulkError {
364
- /** ID of the item that couldn't be inserted. */
365
- itemId?: string | null;
366
- /** Error message. */
367
- message?: string;
368
- /** Error details. */
369
- details?: Details;
370
- /** Index of the failed item in the `items` paramater of the request. */
371
- originalIndex?: number;
372
- }
373
- export interface ApplicationError {
374
- /** Error code. */
375
- code?: string;
376
- /** Error description. */
377
- description?: string;
378
- /** Error data. */
379
- data?: Record<string, any> | null;
380
- }
381
- export interface Details {
382
- /** Application error. */
383
- applicationError?: ApplicationError;
384
- }
385
- export interface BulkSaveRequest {
386
- /** Items to insert or update. */
387
- items: Record<string, any>[] | null;
388
- /** ID of the collection in which to insert or update the items. */
389
- dataCollectionId?: string;
390
- }
391
- export interface BulkSaveResponse {
392
- /** IDs of items inserted. */
393
- insertedItemIds?: string[];
394
- /** IDs of items updated. */
395
- updatedItemIds?: string[];
396
- /** Errors for items that couldn't be inserted or updated. */
397
- errors?: BulkError[];
398
- }
399
- export interface BulkUpdateRequest {
400
- /** Items to update. */
401
- items: Record<string, any>[] | null;
402
- /** ID of the collection in which to update items. */
403
- dataCollectionId?: string;
404
- }
405
- export interface BulkUpdateResponse {
406
- /** IDs of items updated. */
407
- updatedItemIds?: string[];
408
- /** Errors for items that couldn't be updated. */
409
- errors?: BulkError[];
410
- }
411
- export interface BulkPatchRequest {
412
- /** List of items and their patches */
413
- entries?: Entry[];
414
- /** Data access options */
415
- options?: Options;
416
- /** ID of the collection */
417
- dataCollectionId?: string;
418
- }
419
- export interface Entry {
420
- /** item id to patch */
421
- itemId?: string;
422
- /** Patch data */
423
- patch?: Record<string, any> | null;
424
- }
425
- export interface BulkPatchResponse {
426
- /** Patched item ids */
427
- patchedItemIds?: string[];
428
- /** Errors */
429
- errors?: BulkError[];
430
- }
431
- export interface BulkRemoveRequest {
432
- /** IDs of items to remove. */
433
- entries?: BulkRemoveRequestEntry[];
434
- /** ID of the collection from which to remove the items. */
435
- dataCollectionId?: string;
436
- }
437
- export interface BulkRemoveRequestEntry {
438
- /** ID of item to remove. */
439
- itemId?: string;
440
- }
441
- export interface BulkRemoveResponse {
442
- /** IDs of items removed. */
443
- removedItemIds?: string[];
444
- /** Errors for items that couldn't be removed. */
445
- errors?: BulkError[];
446
- }
447
- export interface QueryReferencedRequest {
448
- /** ID of the referring item. */
449
- referringItemId: string;
450
- /** Property containing the references to the referenced items. */
451
- propertyName: string;
452
- /** Paging preferences. */
453
- paging?: Paging;
454
- /** ID of the collection containing the referring item. */
455
- dataCollectionId?: string;
456
- /**
457
- * Whether to omit the total count in the response.
458
- * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
459
- *
460
- * Default: `false`
461
- */
462
- omitTotalCount?: boolean;
463
- }
464
- export declare enum Order {
465
- ASC = "ASC",
466
- DESC = "DESC"
467
- }
468
- /** @enumType */
469
- export type OrderWithLiterals = Order | 'ASC' | 'DESC';
470
- export interface QueryReferencedResponse {
471
- /**
472
- * *Deprecated.** Refer to `entities` instead. List of referenced items.
473
- * @deprecated
474
- */
475
- items?: Record<string, any>[] | null;
476
- /**
477
- * *Deprecated**. Refer to 'pagingMetadata' instead. Total number of referenced items satisfying the query.
478
- * @deprecated
479
- */
480
- totalCount?: number;
481
- /**
482
- * *Deprecated**. Refer to 'pagingMetadata' instead. Total number of referenced items satisfying the query.
483
- * @deprecated
484
- */
485
- totalResults?: number;
486
- /** List of referenced items and/or IDs. For successfully resolved references, the referenced data item appears. For references that can't be resolved, the ID appears. */
487
- entities?: ReferencedEntity[];
488
- /** Paging information. */
489
- pagingMetadata?: PagingMetadataV2;
490
- }
491
- export interface ReferencedEntity extends ReferencedEntityEntityOneOf {
492
- /** Data item referenced. */
493
- item?: Record<string, any> | null;
494
- /** 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. */
495
- referenceId?: string;
496
- }
497
- /** @oneof */
498
- export interface ReferencedEntityEntityOneOf {
499
- /** Data item referenced. */
500
- item?: Record<string, any> | null;
501
- /** 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. */
502
- referenceId?: string;
503
- }
504
- export interface BulkInsertReferencesRequest {
505
- /**
506
- * References to insert.
507
- * @minSize 1
508
- */
509
- references: Reference[];
510
- /** ID of the collection containing the referring item. */
511
- dataCollectionId?: string;
512
- }
513
- export interface Reference {
514
- /** Property containing the references to the referenced items. */
515
- propertyName?: string;
516
- /** ID of the referring item. */
517
- referringItemId?: string;
518
- /** ID of the referenced item. */
519
- referencedItemId?: string;
520
- }
521
- export interface BulkInsertReferencesResponse {
522
- }
523
- export interface BulkReplaceReferencesRequest {
524
- /** Property containing the references to the referenced items. */
525
- propertyName: string;
526
- /** ID of the referring item. */
527
- referringItemId: string;
528
- /** List of new referenced item IDs to replace the existing ones. */
529
- newReferencedItemIds?: string[];
530
- /** ID of the collection containing the referring item. */
531
- dataCollectionId?: string;
532
- }
533
- export interface BulkReplaceReferencesResponse {
534
- }
535
- export interface BulkRemoveReferencesRequest {
536
- /**
537
- * References to be removed.
538
- * @minSize 1
539
- */
540
- references: Reference[];
541
- /** ID of the collection containing the referring item. */
542
- dataCollectionId?: string;
543
- }
544
- export interface BulkRemoveReferencesResponse {
545
- }
546
- export interface IsReferencedRequest {
547
- /** Property that may contain a reference to the specified item. */
548
- propertyName: string;
549
- /** ID of the referring item. */
550
- referringItemId: string;
551
- /** ID of the item that may be referenced. */
552
- referencedItemId: string;
553
- /** ID of the collection containing the referring item. */
554
- dataCollectionId?: string;
555
- }
556
- export interface IsReferencedResponse {
557
- /** Whether the specified property of the referring item contains a reference to the specified referenced item. */
558
- isReferenced?: boolean;
559
- }
560
- export interface RestoreFromTrashBinRequest {
561
- /**
562
- * Deprecated, use dataCollectionId instead.
563
- * Collection name
564
- * @deprecated Deprecated, use dataCollectionId instead.
565
- * Collection name
566
- * @replacedBy data_collection_id
567
- */
568
- collectionName?: string;
569
- /** Item id */
570
- itemId?: string;
571
- /** Data access options */
572
- options?: Options;
573
- /** ID of the collection */
574
- dataCollectionId?: string;
575
- }
576
- export interface RestoreFromTrashBinResponse {
577
- item?: Record<string, any> | null;
578
- }
579
- /**
580
- * Adds an item to a collection.
581
- *
582
- * When an item is inserted into a collection, the following properties and values are added to it:
583
- * * `_id`: A unique identifier for an item in a collection. You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.
584
- * * `_createdDate`: The date the item was added to the collection.
585
- * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
586
- * @internal
587
- * @documentationMaturity preview
588
- * @permissionId WIX_DATA.INSERT
589
- * @permissionScope Write Data Items
590
- * @permissionScopeId SCOPE.DC-DATA.WRITE
591
- * @applicableIdentity APP
592
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Insert
593
- * @deprecated
594
- * @targetRemovalDate 2025-06-01
595
- */
596
- export declare function insert(options?: InsertOptions): Promise<InsertResponse>;
597
- export interface InsertOptions {
598
- /** Item to insert. */
599
- item?: Record<string, any> | null;
600
- /** ID of the collection in which to insert the item. */
601
- dataCollectionId?: string;
602
- }
603
- /**
604
- * Updates an item in a collection.
605
- *
606
- * An item ID must be submitted as part of the request, either as a path parameter or within the `item` body parameter. If an item is found in the specified collection with
607
- * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the request fails.
608
- *
609
- * When an item is updated, its `_updatedDate` property is changed to the current date.
610
- *
611
- * **Note:**
612
- * After an item is updated, it only contains the properties included in the Update Data Item request. If the existing item has properties with values and those properties
613
- * aren't included in the updated item, their values are lost.
614
- * @internal
615
- * @documentationMaturity preview
616
- * @requiredField options.item
617
- * @permissionId WIX_DATA.UPDATE
618
- * @permissionScope Write Data Items
619
- * @permissionScopeId SCOPE.DC-DATA.WRITE
620
- * @applicableIdentity APP
621
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Update
622
- * @deprecated
623
- * @targetRemovalDate 2025-06-01
624
- */
625
- export declare function update(options?: NonNullablePaths<UpdateOptions, `item`>): Promise<UpdateResponse>;
626
- export interface UpdateOptions {
627
- /** Item to update. The existing item is replaced with this version. */
628
- item: Record<string, any> | null;
629
- /** ID of the collection containing the existing item. */
630
- dataCollectionId?: string;
631
- }
632
- /**
633
- * Inserts or updates an item in a collection.
634
- *
635
- * The Save Data Item endpoint inserts or updates the specified item, depending on whether it already exists in the collection.
636
- *
637
- * * If you don't provide an ID, a new item is created.
638
- *
639
- * * If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
640
- *
641
- * * If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `_updatedDate` property is changed to the current date.
642
- *
643
- * ***Note:*** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID.
644
- * This means that all of the item's previous properties and values are lost.
645
- * @internal
646
- * @documentationMaturity preview
647
- * @permissionId WIX_DATA.UPDATE
648
- * @permissionScope Write Data Items
649
- * @permissionScopeId SCOPE.DC-DATA.WRITE
650
- * @applicableIdentity APP
651
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Save
652
- * @deprecated
653
- * @targetRemovalDate 2025-06-01
654
- */
655
- export declare function save(options?: SaveOptions): Promise<SaveResponse>;
656
- export interface SaveOptions {
657
- /** Item to insert or update. */
658
- item?: Record<string, any> | null;
659
- /** ID of the collection in which to insert or update the item. */
660
- dataCollectionId?: string;
661
- }
662
- /**
663
- * Retrieves an item from a collection.
664
- * @param itemId - ID of the item to retrieve.
665
- * @internal
666
- * @documentationMaturity preview
667
- * @requiredField itemId
668
- * @permissionId WIX_DATA.FIND
669
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Get
670
- * @deprecated
671
- * @targetRemovalDate 2025-06-01
672
- */
673
- export declare function get(itemId: string, options?: GetOptions): Promise<GetResponse>;
674
- export interface GetOptions {
675
- /** ID of the collection from which to retrieve the item. */
676
- dataCollectionId?: string;
677
- }
678
- /**
679
- * Removes an item from a collection.
680
- *
681
- * If any items in other collections reference the removed item in a reference or multi-reference field, the field is cleared.
682
- *
683
- * **Note:**
684
- * Once an item has been removed from a collection, it can't be restored.
685
- * @param itemId - ID of the item to remove.
686
- * @internal
687
- * @documentationMaturity preview
688
- * @requiredField itemId
689
- * @permissionId WIX_DATA.REMOVE
690
- * @permissionScope Write Data Items
691
- * @permissionScopeId SCOPE.DC-DATA.WRITE
692
- * @applicableIdentity APP
693
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Remove
694
- * @deprecated
695
- * @targetRemovalDate 2025-06-01
696
- */
697
- export declare function remove(itemId: string, options?: RemoveOptions): Promise<RemoveResponse>;
698
- export interface RemoveOptions {
699
- /** ID of the collection from which to remove the item. */
700
- dataCollectionId?: string;
701
- }
702
- /**
703
- * Removes all items from a collection. Site owner (`ADMIN`) permissions are required in order to invoke this operation.
704
- *
705
- * If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
706
- *
707
- * **Note:**
708
- * Once items have been removed from a collection, they can't be restored.
709
- * @internal
710
- * @documentationMaturity preview
711
- * @permissionId WIX_DATA.TRUNCATE
712
- * @permissionScope Write Data Items
713
- * @permissionScopeId SCOPE.DC-DATA.WRITE
714
- * @applicableIdentity APP
715
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Truncate
716
- * @deprecated
717
- * @targetRemovalDate 2025-06-01
718
- */
719
- export declare function truncate(options?: TruncateOptions): Promise<void>;
720
- export interface TruncateOptions {
721
- /** ID of the collection to truncate. */
722
- dataCollectionId?: string;
723
- }
724
- /**
725
- * Retrieves a list of items, on the basis of the filtering, sorting, and paging preferences you provide.
726
- *
727
- * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
728
- * @public
729
- * @documentationMaturity preview
730
- * @permissionId WIX_DATA.FIND
731
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Query
732
- * @deprecated
733
- * @targetRemovalDate 2025-06-01
734
- */
735
- export declare function query(options?: QueryOptions): Promise<NonNullablePaths<QueryResponse, `items` | `totalCount` | `totalResults` | `partialIncludes`>>;
736
- export interface QueryOptions {
737
- /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
738
- dataQuery?: QueryV2;
739
- /**
740
- * Whether to omit the total count in the response.
741
- * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
742
- *
743
- * Default: `false`
744
- */
745
- omitTotalCount?: boolean;
746
- /**
747
- * Properties for which to include referenced items in the query's results.
748
- * Up to 50 referenced items can be included for each item that matches the query.
749
- * If more than 50 items are referenced, `partialIncludes` in the response is `true`.
750
- */
751
- includeReferencedItems?: string[];
752
- /** ID of the collection to query. */
753
- dataCollectionId?: string;
754
- }
755
- /** @internal
756
- * @documentationMaturity preview
757
- * @permissionId WIX_DATA.AGGREGATE
758
- * @permissionScope Read Data Items
759
- * @permissionScopeId SCOPE.DC-DATA.READ
760
- * @permissionScope Manage Data Items
761
- * @permissionScopeId SCOPE.DC-DATA.MANAGE-DATA
762
- * @applicableIdentity APP
763
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Aggregate
764
- * @deprecated
765
- * @targetRemovalDate 2025-06-01
766
- */
767
- export declare function aggregate(options?: AggregateOptions): Promise<NonNullablePaths<AggregationResponse, `items`>>;
768
- export interface AggregateOptions {
769
- /** Paging preferences. */
770
- paging?: Paging;
771
- /** 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. */
772
- initialFilter?: Record<string, any> | null;
773
- /**
774
- * Object defining the steps of the aggregation to be This is an object defining aggregation itself.
775
- *
776
- * * Grouping rule is defined as _id field. It takes a form of:
777
- * {
778
- * "_id": "$field"
779
- * }
780
- *
781
- * If multiple fields are used for grouping, Group takes a form of:
782
- * {
783
- * "_id": {
784
- * "field1": "$field1"
785
- * "field2": "$field2"
786
- * }
787
- * }
788
- *
789
- * * Aggregation functions are defined as special field definitions.
790
- *
791
- * Average:
792
- * {
793
- * "_id": "$field"
794
- * "my_avg": {
795
- * "$avg": "$other_field"
796
- * }
797
- * }
798
- *
799
- * Max:
800
- * {
801
- * "_id": "$field"
802
- * "my_max": {
803
- * "$max": "$other_field"
804
- * }
805
- * }
806
- *
807
- * Min:
808
- * {
809
- * "_id": "$field"
810
- * "my_min": {
811
- * "$min": "$other_field"
812
- * }
813
- * }
814
- *
815
- * Sum:
816
- * {
817
- * "_id": "$field"
818
- * "my_sum": {
819
- * "$sum": "$other_field"
820
- * }
821
- * }
822
- */
823
- aggregation?: Record<string, any> | null;
824
- /** 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. */
825
- finalFilter?: Record<string, any> | null;
826
- /** Sorting preferences. */
827
- sort?: Sorting[];
828
- /** ID of the collection on which to run the aggregation. */
829
- dataCollectionId?: string;
830
- }
831
- /**
832
- * Returns the number of items in a collection that match a query.
833
- * @internal
834
- * @documentationMaturity preview
835
- * @permissionId WIX_DATA.FIND
836
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Count
837
- * @deprecated
838
- * @targetRemovalDate 2025-06-01
839
- */
840
- export declare function count(options?: CountOptions): Promise<NonNullablePaths<CountResponse, `totalCount` | `totalResults`>>;
841
- export interface CountOptions {
842
- /** 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). */
843
- filter?: Record<string, any> | null;
844
- /** ID of the collection for which to count query results. */
845
- dataCollectionId?: string;
846
- }
847
- /**
848
- * Retrieves a list of distinct values for a given property in all items that match a query, without duplicates.
849
- *
850
- * As with the [Query Data Items]() endpoint, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
851
- * However, the Query Distinct Values endpoint doesn't return all of the full items that match the query.
852
- * Rather, it returns all unique values of the property you specify in `propertyName` for items that match the query.
853
- * If more than one item has the same value for that property, that value appears only once.
854
- *
855
- * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
856
- * @internal
857
- * @documentationMaturity preview
858
- * @requiredField options.propertyName
859
- * @permissionId WIX_DATA.FIND
860
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Distinct
861
- * @deprecated
862
- * @targetRemovalDate 2025-06-01
863
- */
864
- export declare function distinct(options?: NonNullablePaths<DistinctOptions, `propertyName`>): Promise<NonNullablePaths<DistinctResponse, `items`>>;
865
- export interface DistinctOptions {
866
- /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
867
- dataQuery?: QueryV2;
868
- /** Property name for which to return all distinct values. */
869
- propertyName: string;
870
- /** ID of the collection to query. */
871
- dataCollectionId?: string;
872
- /**
873
- * Whether to omit the total count in the response.
874
- * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
875
- *
876
- * Default: `false`
877
- */
878
- omitTotalCount?: boolean;
879
- }
880
- /**
881
- * Adds multiple items to a collection.
882
- *
883
- * When each item is inserted into a collection, the following properties and values are added to it:
884
- * * `_id`: A unique identifier for an item in a collection. You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.
885
- * * `_createdDate`: The date the item was added to the collection.
886
- * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
887
- *
888
- * The endpoint returns a list of the IDs of items successfully inserted in `insertedItemIds`.
889
- * When any items can't be inserted, error details are provided for each failed item in `errors`.
890
- * @internal
891
- * @documentationMaturity preview
892
- * @requiredField options.items
893
- * @permissionId WIX_DATA.INSERT
894
- * @permissionScope Write Data Items
895
- * @permissionScopeId SCOPE.DC-DATA.WRITE
896
- * @applicableIdentity APP
897
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsert
898
- * @deprecated
899
- * @targetRemovalDate 2025-06-01
900
- */
901
- export declare function bulkInsert(options?: NonNullablePaths<BulkInsertOptions, `items`>): Promise<NonNullablePaths<BulkInsertResponse, `insertedItemIds` | `errors` | `errors.${number}.message` | `errors.${number}.details.applicationError.code` | `errors.${number}.details.applicationError.description` | `errors.${number}.originalIndex`>>;
902
- export interface BulkInsertOptions {
903
- /** Items to insert. */
904
- items: Record<string, any>[] | null;
905
- /** ID of the collection in which to insert the items. */
906
- dataCollectionId?: string;
907
- }
908
- /**
909
- * Inserts or updates multiple items in a collection.
910
- *
911
- * The Bulk Save Data Items endpoint inserts or updates each item, depending on whether it already exists in the collection. For each item:
912
- *
913
- * * If you don't provide an ID, a new item is created.
914
- *
915
- * * If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
916
- *
917
- * * If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `_updatedDate` property is changed to the current date.
918
- *
919
- * The endpoint returns a list of the IDs of items successfully inserted in `insertedItemIds` and a list of the IDs of items successfully updated in `updatedItemIds`.
920
- * When any items can't be inserted or updated, error details are provided for each failed item in `errors`.
921
- *
922
- * ***Note:*** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID.
923
- * This means that all of the item's previous properties and values are lost.
924
- * @internal
925
- * @documentationMaturity preview
926
- * @requiredField options.items
927
- * @permissionId WIX_DATA.UPDATE
928
- * @permissionScope Write Data Items
929
- * @permissionScopeId SCOPE.DC-DATA.WRITE
930
- * @applicableIdentity APP
931
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkSave
932
- * @deprecated
933
- * @targetRemovalDate 2025-06-01
934
- */
935
- export declare function bulkSave(options?: NonNullablePaths<BulkSaveOptions, `items`>): Promise<NonNullablePaths<BulkSaveResponse, `insertedItemIds` | `updatedItemIds` | `errors` | `errors.${number}.message` | `errors.${number}.details.applicationError.code` | `errors.${number}.details.applicationError.description` | `errors.${number}.originalIndex`>>;
936
- export interface BulkSaveOptions {
937
- /** Items to insert or update. */
938
- items: Record<string, any>[] | null;
939
- /** ID of the collection in which to insert or update the items. */
940
- dataCollectionId?: string;
941
- }
942
- /**
943
- * Updates multiple items in a collection.
944
- *
945
- * Each item in the request must include an ID. If an item is found in the specified collection with
946
- * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.
947
- *
948
- * When an item is updated, its `_updatedDate` property is changed to the current date.
949
- *
950
- * The endpoint returns a list of the IDs of items successfully updated in `updatedItemIds`.
951
- * When any items can't be inserted, error details are provided for each failed item in `errors`.
952
- *
953
- * **Note:**
954
- * After each item is updated, it only contains the properties included in the Update Data Item request. If the existing item has properties with values and those properties
955
- * aren't included in the updated item, their values are lost.
956
- * @internal
957
- * @documentationMaturity preview
958
- * @requiredField options.items
959
- * @permissionId WIX_DATA.UPDATE
960
- * @permissionScope Write Data Items
961
- * @permissionScopeId SCOPE.DC-DATA.WRITE
962
- * @applicableIdentity APP
963
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkUpdate
964
- * @deprecated
965
- * @targetRemovalDate 2025-06-01
966
- */
967
- export declare function bulkUpdate(options?: NonNullablePaths<BulkUpdateOptions, `items`>): Promise<NonNullablePaths<BulkUpdateResponse, `updatedItemIds` | `errors` | `errors.${number}.message` | `errors.${number}.details.applicationError.code` | `errors.${number}.details.applicationError.description` | `errors.${number}.originalIndex`>>;
968
- export interface BulkUpdateOptions {
969
- /** Items to update. */
970
- items: Record<string, any>[] | null;
971
- /** ID of the collection in which to update items. */
972
- dataCollectionId?: string;
973
- }
974
- /**
975
- * Removes multiple items from a collection.
976
- *
977
- * If any items in other collections reference the removed items in reference or multi-reference fields, the fields are cleared.
978
- *
979
- * The endpoint returns a list of the IDs of items successfully removed in `removedItemIds`.
980
- * When any items can't be removed, error details are provided for each failed item in `errors`.
981
- *
982
- * **Note:** Once an item has been removed from a collection, it can't be restored.
983
- * @internal
984
- * @documentationMaturity preview
985
- * @permissionId WIX_DATA.REMOVE
986
- * @permissionScope Write Data Items
987
- * @permissionScopeId SCOPE.DC-DATA.WRITE
988
- * @applicableIdentity APP
989
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemove
990
- * @deprecated
991
- * @targetRemovalDate 2025-06-01
992
- */
993
- export declare function bulkRemove(options?: BulkRemoveOptions): Promise<NonNullablePaths<BulkRemoveResponse, `removedItemIds` | `errors` | `errors.${number}.message` | `errors.${number}.details.applicationError.code` | `errors.${number}.details.applicationError.description` | `errors.${number}.originalIndex`>>;
994
- export interface BulkRemoveOptions {
995
- /** IDs of items to remove. */
996
- entries?: BulkRemoveRequestEntry[];
997
- /** ID of the collection from which to remove the items. */
998
- dataCollectionId?: string;
999
- }
1000
- /**
1001
- * Gets the full items referenced in the specified property of an item.
1002
- *
1003
- * For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.
1004
- * Querying the **Movies** collection using the Query Referenced Data Items endpoint returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
1005
- * This gives you information from the **People** collection about each of the actors in the specified movie.
1006
- * @internal
1007
- * @documentationMaturity preview
1008
- * @requiredField options.propertyName
1009
- * @requiredField options.referringItemId
1010
- * @permissionId WIX_DATA.FIND
1011
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.QueryReferenced
1012
- * @deprecated
1013
- * @targetRemovalDate 2025-06-01
1014
- */
1015
- export declare function queryReferenced(options?: NonNullablePaths<QueryReferencedOptions, `propertyName` | `referringItemId`>): Promise<NonNullablePaths<QueryReferencedResponse, `items` | `totalCount` | `totalResults` | `entities` | `entities.${number}.referenceId`>>;
1016
- export interface QueryReferencedOptions {
1017
- /** ID of the referring item. */
1018
- referringItemId: string;
1019
- /** Property containing the references to the referenced items. */
1020
- propertyName: string;
1021
- /** Paging preferences. */
1022
- paging?: Paging;
1023
- /** ID of the collection containing the referring item. */
1024
- dataCollectionId?: string;
1025
- /**
1026
- * Whether to omit the total count in the response.
1027
- * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
1028
- *
1029
- * Default: `false`
1030
- */
1031
- omitTotalCount?: boolean;
1032
- }
1033
- /**
1034
- * Inserts one or more references in the specified properties of items in a collection.
1035
- *
1036
- * The Bulk Insert References endpoint adds one or more references to a collection.
1037
- * Each new reference in the `references` field specifies a referring item's ID, the property in which to insert the reference, and the ID of the referenced item.
1038
- * @internal
1039
- * @documentationMaturity preview
1040
- * @requiredField options.references
1041
- * @requiredField options.references.propertyName
1042
- * @requiredField options.references.referencedItemId
1043
- * @requiredField options.references.referringItemId
1044
- * @permissionId WIX_DATA.INSERT
1045
- * @permissionScope Write Data Items
1046
- * @permissionScopeId SCOPE.DC-DATA.WRITE
1047
- * @applicableIdentity APP
1048
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsertReferences
1049
- * @deprecated
1050
- * @targetRemovalDate 2025-06-01
1051
- */
1052
- export declare function bulkInsertReferences(options?: NonNullablePaths<BulkInsertReferencesOptions, `references` | `references.${number}.propertyName` | `references.${number}.referencedItemId` | `references.${number}.referringItemId`>): Promise<void>;
1053
- export interface BulkInsertReferencesOptions {
1054
- /**
1055
- * References to insert.
1056
- * @minSize 1
1057
- */
1058
- references: Reference[];
1059
- /** ID of the collection containing the referring item. */
1060
- dataCollectionId?: string;
1061
- }
1062
- /**
1063
- * Replaces references in a specified property of a specified data item.
1064
- *
1065
- * The Bulk Replace References endpoint replaces the existing reference or references contained in the property specified in `propertyName` within the data item specified in `referringItemId`.
1066
- * The endpoint removes existing references and in their place it adds references to the items specified in `newReferencedItemIds`.
1067
- * @internal
1068
- * @documentationMaturity preview
1069
- * @requiredField options.propertyName
1070
- * @requiredField options.referringItemId
1071
- * @permissionId WIX_DATA.UPDATE
1072
- * @permissionScope Write Data Items
1073
- * @permissionScopeId SCOPE.DC-DATA.WRITE
1074
- * @applicableIdentity APP
1075
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkReplaceReferences
1076
- * @deprecated
1077
- * @targetRemovalDate 2025-06-01
1078
- */
1079
- export declare function bulkReplaceReferences(options?: NonNullablePaths<BulkReplaceReferencesOptions, `propertyName` | `referringItemId`>): Promise<void>;
1080
- export interface BulkReplaceReferencesOptions {
1081
- /** Property containing the references to the referenced items. */
1082
- propertyName: string;
1083
- /** ID of the referring item. */
1084
- referringItemId: string;
1085
- /** List of new referenced item IDs to replace the existing ones. */
1086
- newReferencedItemIds?: string[];
1087
- /** ID of the collection containing the referring item. */
1088
- dataCollectionId?: string;
1089
- }
1090
- /**
1091
- * Removes one or more references.
1092
- * @internal
1093
- * @documentationMaturity preview
1094
- * @requiredField options.references
1095
- * @requiredField options.references.propertyName
1096
- * @permissionId WIX_DATA.REMOVE
1097
- * @permissionScope Write Data Items
1098
- * @permissionScopeId SCOPE.DC-DATA.WRITE
1099
- * @applicableIdentity APP
1100
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemoveReferences
1101
- * @deprecated
1102
- * @targetRemovalDate 2025-06-01
1103
- */
1104
- export declare function bulkRemoveReferences(options?: NonNullablePaths<BulkRemoveReferencesOptions, `references` | `references.${number}.propertyName`>): Promise<void>;
1105
- export interface BulkRemoveReferencesOptions {
1106
- /**
1107
- * References to be removed.
1108
- * @minSize 1
1109
- */
1110
- references: Reference[];
1111
- /** ID of the collection containing the referring item. */
1112
- dataCollectionId?: string;
1113
- }
1114
- /**
1115
- * Checks if a specific property of a referring item contains a reference to another specific item.
1116
- * @internal
1117
- * @documentationMaturity preview
1118
- * @requiredField options.propertyName
1119
- * @requiredField options.referencedItemId
1120
- * @requiredField options.referringItemId
1121
- * @permissionId WIX_DATA.FIND
1122
- * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.IsReferenced
1123
- * @deprecated
1124
- * @targetRemovalDate 2025-06-01
1125
- */
1126
- export declare function isReferenced(options?: NonNullablePaths<IsReferencedOptions, `propertyName` | `referencedItemId` | `referringItemId`>): Promise<NonNullablePaths<IsReferencedResponse, `isReferenced`>>;
1127
- export interface IsReferencedOptions {
1128
- /** Property that may contain a reference to the specified item. */
1129
- propertyName: string;
1130
- /** ID of the referring item. */
1131
- referringItemId: string;
1132
- /** ID of the item that may be referenced. */
1133
- referencedItemId: string;
1134
- /** ID of the collection containing the referring item. */
1135
- dataCollectionId?: string;
1136
- }