@wix/auto_sdk_data-backend-public-sdk-poc_data 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/data-v1-data-service-data.context.d.ts +5 -0
- package/build/cjs/src/data-v1-data-service-data.context.js +47 -0
- package/build/cjs/src/data-v1-data-service-data.context.js.map +1 -0
- package/build/cjs/src/data-v1-data-service-data.http.d.ts +161 -0
- package/build/cjs/src/data-v1-data-service-data.http.js +845 -0
- package/build/cjs/src/data-v1-data-service-data.http.js.map +1 -0
- package/build/cjs/src/data-v1-data-service-data.meta.d.ts +37 -0
- package/build/cjs/src/data-v1-data-service-data.meta.js +389 -0
- package/build/cjs/src/data-v1-data-service-data.meta.js.map +1 -0
- package/build/cjs/src/data-v1-data-service-data.public.d.ts +15 -0
- package/build/cjs/src/data-v1-data-service-data.public.js +142 -0
- package/build/cjs/src/data-v1-data-service-data.public.js.map +1 -0
- package/build/cjs/src/data-v1-data-service-data.types.d.ts +609 -0
- package/build/cjs/src/data-v1-data-service-data.types.js +23 -0
- package/build/cjs/src/data-v1-data-service-data.types.js.map +1 -0
- package/build/cjs/src/data-v1-data-service-data.universal.d.ts +828 -0
- package/build/cjs/src/data-v1-data-service-data.universal.js +908 -0
- package/build/cjs/src/data-v1-data-service-data.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/data-v1-data-service-data.context.d.ts +5 -0
- package/build/es/src/data-v1-data-service-data.context.js +41 -0
- package/build/es/src/data-v1-data-service-data.context.js.map +1 -0
- package/build/es/src/data-v1-data-service-data.http.d.ts +161 -0
- package/build/es/src/data-v1-data-service-data.http.js +823 -0
- package/build/es/src/data-v1-data-service-data.http.js.map +1 -0
- package/build/es/src/data-v1-data-service-data.meta.d.ts +37 -0
- package/build/es/src/data-v1-data-service-data.meta.js +344 -0
- package/build/es/src/data-v1-data-service-data.meta.js.map +1 -0
- package/build/es/src/data-v1-data-service-data.public.d.ts +15 -0
- package/build/es/src/data-v1-data-service-data.public.js +117 -0
- package/build/es/src/data-v1-data-service-data.public.js.map +1 -0
- package/build/es/src/data-v1-data-service-data.types.d.ts +609 -0
- package/build/es/src/data-v1-data-service-data.types.js +20 -0
- package/build/es/src/data-v1-data-service-data.types.js.map +1 -0
- package/build/es/src/data-v1-data-service-data.universal.d.ts +828 -0
- package/build/es/src/data-v1-data-service-data.universal.js +863 -0
- package/build/es/src/data-v1-data-service-data.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/data-v1-data-service-data.context.d.ts +41 -0
- package/build/internal/cjs/src/data-v1-data-service-data.context.js +47 -0
- package/build/internal/cjs/src/data-v1-data-service-data.context.js.map +1 -0
- package/build/internal/cjs/src/data-v1-data-service-data.http.d.ts +161 -0
- package/build/internal/cjs/src/data-v1-data-service-data.http.js +845 -0
- package/build/internal/cjs/src/data-v1-data-service-data.http.js.map +1 -0
- package/build/internal/cjs/src/data-v1-data-service-data.meta.d.ts +37 -0
- package/build/internal/cjs/src/data-v1-data-service-data.meta.js +389 -0
- package/build/internal/cjs/src/data-v1-data-service-data.meta.js.map +1 -0
- package/build/internal/cjs/src/data-v1-data-service-data.public.d.ts +252 -0
- package/build/internal/cjs/src/data-v1-data-service-data.public.js +142 -0
- package/build/internal/cjs/src/data-v1-data-service-data.public.js.map +1 -0
- package/build/internal/cjs/src/data-v1-data-service-data.types.d.ts +609 -0
- package/build/internal/cjs/src/data-v1-data-service-data.types.js +23 -0
- package/build/internal/cjs/src/data-v1-data-service-data.types.js.map +1 -0
- package/build/internal/cjs/src/data-v1-data-service-data.universal.d.ts +1139 -0
- package/build/internal/cjs/src/data-v1-data-service-data.universal.js +908 -0
- package/build/internal/cjs/src/data-v1-data-service-data.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/data-v1-data-service-data.context.d.ts +41 -0
- package/build/internal/es/src/data-v1-data-service-data.context.js +41 -0
- package/build/internal/es/src/data-v1-data-service-data.context.js.map +1 -0
- package/build/internal/es/src/data-v1-data-service-data.http.d.ts +161 -0
- package/build/internal/es/src/data-v1-data-service-data.http.js +823 -0
- package/build/internal/es/src/data-v1-data-service-data.http.js.map +1 -0
- package/build/internal/es/src/data-v1-data-service-data.meta.d.ts +37 -0
- package/build/internal/es/src/data-v1-data-service-data.meta.js +344 -0
- package/build/internal/es/src/data-v1-data-service-data.meta.js.map +1 -0
- package/build/internal/es/src/data-v1-data-service-data.public.d.ts +252 -0
- package/build/internal/es/src/data-v1-data-service-data.public.js +117 -0
- package/build/internal/es/src/data-v1-data-service-data.public.js.map +1 -0
- package/build/internal/es/src/data-v1-data-service-data.types.d.ts +609 -0
- package/build/internal/es/src/data-v1-data-service-data.types.js +20 -0
- package/build/internal/es/src/data-v1-data-service-data.types.js.map +1 -0
- package/build/internal/es/src/data-v1-data-service-data.universal.d.ts +1139 -0
- package/build/internal/es/src/data-v1-data-service-data.universal.js +863 -0
- package/build/internal/es/src/data-v1-data-service-data.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,828 @@
|
|
|
1
|
+
export interface Item {
|
|
2
|
+
item?: Record<string, any> | null;
|
|
3
|
+
}
|
|
4
|
+
export interface InsertRequest {
|
|
5
|
+
/** Item to insert. */
|
|
6
|
+
item?: Record<string, any> | null;
|
|
7
|
+
/** ID of the collection in which to insert the item. */
|
|
8
|
+
dataCollectionId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare enum Segment {
|
|
11
|
+
/** Access database used in the Live site. */
|
|
12
|
+
LIVE = "LIVE",
|
|
13
|
+
/** Access staging (sandbox) database used in the editor. */
|
|
14
|
+
SANDBOX = "SANDBOX",
|
|
15
|
+
/** Access deleted database used in the Live site. */
|
|
16
|
+
TRASH_LIVE = "TRASH_LIVE"
|
|
17
|
+
}
|
|
18
|
+
export interface Options {
|
|
19
|
+
}
|
|
20
|
+
export interface InsertResponse {
|
|
21
|
+
/** Inserted item. */
|
|
22
|
+
item?: Record<string, any> | null;
|
|
23
|
+
}
|
|
24
|
+
export interface UpdateRequest {
|
|
25
|
+
/** Item to update. The existing item is replaced with this version. */
|
|
26
|
+
item: Record<string, any> | null;
|
|
27
|
+
/** ID of the collection containing the existing item. */
|
|
28
|
+
dataCollectionId?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface UpdateResponse {
|
|
31
|
+
/** Updated item */
|
|
32
|
+
item?: Record<string, any> | null;
|
|
33
|
+
}
|
|
34
|
+
export interface SaveRequest {
|
|
35
|
+
/** Item to insert or update. */
|
|
36
|
+
item?: Record<string, any> | null;
|
|
37
|
+
/** ID of the collection in which to insert or update the item. */
|
|
38
|
+
dataCollectionId?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface SaveResponse {
|
|
41
|
+
/** Inserted or updated item. */
|
|
42
|
+
item?: Record<string, any> | null;
|
|
43
|
+
}
|
|
44
|
+
export interface PatchRequest {
|
|
45
|
+
/** item id to patch */
|
|
46
|
+
itemId?: string;
|
|
47
|
+
/** Patch data */
|
|
48
|
+
patch?: Record<string, any> | null;
|
|
49
|
+
/** Data access options */
|
|
50
|
+
options?: Options;
|
|
51
|
+
/** ID of the collection */
|
|
52
|
+
dataCollectionId?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface PatchResponse {
|
|
55
|
+
/** Patched item */
|
|
56
|
+
item?: Record<string, any> | null;
|
|
57
|
+
}
|
|
58
|
+
export interface PatchWhereRequest {
|
|
59
|
+
/** Data segment */
|
|
60
|
+
segment?: Segment;
|
|
61
|
+
/** filter items to patch */
|
|
62
|
+
filter?: any;
|
|
63
|
+
/** Patch data */
|
|
64
|
+
patch?: Record<string, any> | null;
|
|
65
|
+
/** Data access options */
|
|
66
|
+
options?: Options;
|
|
67
|
+
/** ID of the collection */
|
|
68
|
+
dataCollectionId?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface PatchWhereResponse {
|
|
71
|
+
/** Number of patched items */
|
|
72
|
+
totalCount?: number;
|
|
73
|
+
totalAffectedValues?: number;
|
|
74
|
+
}
|
|
75
|
+
export interface GetRequest {
|
|
76
|
+
/** ID of the item to retrieve. */
|
|
77
|
+
itemId: string;
|
|
78
|
+
/** ID of the collection from which to retrieve the item. */
|
|
79
|
+
dataCollectionId?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface ReadOptions {
|
|
82
|
+
}
|
|
83
|
+
export interface GetResponse {
|
|
84
|
+
/** Retrieved item. */
|
|
85
|
+
item?: Record<string, any> | null;
|
|
86
|
+
}
|
|
87
|
+
export interface RemoveRequest {
|
|
88
|
+
/** ID of the item to remove. */
|
|
89
|
+
itemId: string;
|
|
90
|
+
/** ID of the collection from which to remove the item. */
|
|
91
|
+
dataCollectionId?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface RemoveResponse {
|
|
94
|
+
/** Removed item. */
|
|
95
|
+
item?: Record<string, any> | null;
|
|
96
|
+
}
|
|
97
|
+
export interface TruncateRequest {
|
|
98
|
+
/** ID of the collection to truncate. */
|
|
99
|
+
dataCollectionId?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface TruncateResponse {
|
|
102
|
+
}
|
|
103
|
+
export interface QueryRequest {
|
|
104
|
+
/** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
|
|
105
|
+
dataQuery?: QueryV2;
|
|
106
|
+
/**
|
|
107
|
+
* Whether to omit the total count in the response.
|
|
108
|
+
* When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
|
|
109
|
+
*
|
|
110
|
+
* Default: `false`
|
|
111
|
+
*/
|
|
112
|
+
omitTotalCount?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Properties for which to include referenced items in the query's results.
|
|
115
|
+
* Up to 50 referenced items can be included for each item that matches the query.
|
|
116
|
+
* If more than 50 items are referenced, `partialIncludes` in the response is `true`.
|
|
117
|
+
*/
|
|
118
|
+
includeReferencedItems?: string[];
|
|
119
|
+
/** ID of the collection to query. */
|
|
120
|
+
dataCollectionId?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface Query {
|
|
123
|
+
/**
|
|
124
|
+
* Filter object in the following format:
|
|
125
|
+
* `"filter" : {
|
|
126
|
+
* "fieldName1": "value1",
|
|
127
|
+
* "fieldName2":{"$operator":"value2"}
|
|
128
|
+
* }`
|
|
129
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
130
|
+
*/
|
|
131
|
+
filter?: any;
|
|
132
|
+
/**
|
|
133
|
+
* Sort object in the following format:
|
|
134
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
135
|
+
*/
|
|
136
|
+
sort?: Sorting[];
|
|
137
|
+
/** Paging options to limit and skip the number of items. */
|
|
138
|
+
paging?: Paging;
|
|
139
|
+
/** Array of projected fields. A list of specific field names to return. */
|
|
140
|
+
fields?: string[];
|
|
141
|
+
}
|
|
142
|
+
export interface Sorting {
|
|
143
|
+
/** Name of the field to sort by. */
|
|
144
|
+
fieldName?: string;
|
|
145
|
+
/** Sort order. */
|
|
146
|
+
order?: SortOrder;
|
|
147
|
+
}
|
|
148
|
+
export declare enum SortOrder {
|
|
149
|
+
ASC = "ASC",
|
|
150
|
+
DESC = "DESC"
|
|
151
|
+
}
|
|
152
|
+
export interface Paging {
|
|
153
|
+
/** Number of items to load. */
|
|
154
|
+
limit?: number | null;
|
|
155
|
+
/** Number of items to skip in the current sort order. */
|
|
156
|
+
offset?: number | null;
|
|
157
|
+
}
|
|
158
|
+
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
159
|
+
/** Paging options to limit and skip the number of items. */
|
|
160
|
+
paging?: Paging;
|
|
161
|
+
/** 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`. */
|
|
162
|
+
cursorPaging?: CursorPaging;
|
|
163
|
+
/**
|
|
164
|
+
* Filter object in the following format:
|
|
165
|
+
* `"filter" : {
|
|
166
|
+
* "fieldName1": "value1",
|
|
167
|
+
* "fieldName2":{"$operator":"value2"}
|
|
168
|
+
* }`
|
|
169
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
170
|
+
*/
|
|
171
|
+
filter?: Record<string, any> | null;
|
|
172
|
+
/**
|
|
173
|
+
* Sort object in the following format:
|
|
174
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
175
|
+
*/
|
|
176
|
+
sort?: Sorting[];
|
|
177
|
+
/** Array of projected fields. A list of specific field names to return. */
|
|
178
|
+
fields?: string[];
|
|
179
|
+
}
|
|
180
|
+
/** @oneof */
|
|
181
|
+
export interface QueryV2PagingMethodOneOf {
|
|
182
|
+
/** Paging options to limit and skip the number of items. */
|
|
183
|
+
paging?: Paging;
|
|
184
|
+
/** 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
|
+
cursorPaging?: CursorPaging;
|
|
186
|
+
}
|
|
187
|
+
export interface CursorPaging {
|
|
188
|
+
/** Number of items to load. */
|
|
189
|
+
limit?: number | null;
|
|
190
|
+
/**
|
|
191
|
+
* Pointer to the next or previous page in the list of results.
|
|
192
|
+
*
|
|
193
|
+
* You can get the relevant cursor token
|
|
194
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
195
|
+
* Not relevant for the first request.
|
|
196
|
+
*/
|
|
197
|
+
cursor?: string | null;
|
|
198
|
+
}
|
|
199
|
+
export interface QueryResponse {
|
|
200
|
+
/** Retrieved items. */
|
|
201
|
+
items?: Record<string, any>[] | null;
|
|
202
|
+
/**
|
|
203
|
+
* *Deprecated.** Refer to 'pagingMetadata' instead. Total number of items satisfying the query.
|
|
204
|
+
* @deprecated
|
|
205
|
+
*/
|
|
206
|
+
totalCount?: number;
|
|
207
|
+
/**
|
|
208
|
+
* *Deprecated.** Refer to 'pagingMetadata' instead. Total number of items satisfying the query.
|
|
209
|
+
* @deprecated
|
|
210
|
+
*/
|
|
211
|
+
totalResults?: number;
|
|
212
|
+
/** Whether referenced items are trimmed from the results. This occurs when there are more than 50 referenced items. */
|
|
213
|
+
partialIncludes?: boolean;
|
|
214
|
+
/** Paging information. */
|
|
215
|
+
pagingMetadata?: PagingMetadataV2;
|
|
216
|
+
}
|
|
217
|
+
export interface PagingMetadataV2 {
|
|
218
|
+
/** Number of items returned in the response. */
|
|
219
|
+
count?: number | null;
|
|
220
|
+
/** Offset that was requested. */
|
|
221
|
+
offset?: number | null;
|
|
222
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
223
|
+
total?: number | null;
|
|
224
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
225
|
+
tooManyToCount?: boolean | null;
|
|
226
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
227
|
+
cursors?: Cursors;
|
|
228
|
+
}
|
|
229
|
+
export interface Cursors {
|
|
230
|
+
/** Cursor pointing to next page in the list of results. */
|
|
231
|
+
next?: string | null;
|
|
232
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
233
|
+
prev?: string | null;
|
|
234
|
+
}
|
|
235
|
+
export interface AggregationRequest {
|
|
236
|
+
/** Paging preferences. */
|
|
237
|
+
paging?: Paging;
|
|
238
|
+
/** 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. */
|
|
239
|
+
initialFilter?: Record<string, any> | null;
|
|
240
|
+
/**
|
|
241
|
+
* Object defining the steps of the aggregation to be This is an object defining aggregation itself.
|
|
242
|
+
*
|
|
243
|
+
* * Grouping rule is defined as _id field. It takes a form of:
|
|
244
|
+
* {
|
|
245
|
+
* "_id": "$field"
|
|
246
|
+
* }
|
|
247
|
+
*
|
|
248
|
+
* If multiple fields are used for grouping, Group takes a form of:
|
|
249
|
+
* {
|
|
250
|
+
* "_id": {
|
|
251
|
+
* "field1": "$field1"
|
|
252
|
+
* "field2": "$field2"
|
|
253
|
+
* }
|
|
254
|
+
* }
|
|
255
|
+
*
|
|
256
|
+
* * Aggregation functions are defined as special field definitions.
|
|
257
|
+
*
|
|
258
|
+
* Average:
|
|
259
|
+
* {
|
|
260
|
+
* "_id": "$field"
|
|
261
|
+
* "my_avg": {
|
|
262
|
+
* "$avg": "$other_field"
|
|
263
|
+
* }
|
|
264
|
+
* }
|
|
265
|
+
*
|
|
266
|
+
* Max:
|
|
267
|
+
* {
|
|
268
|
+
* "_id": "$field"
|
|
269
|
+
* "my_max": {
|
|
270
|
+
* "$max": "$other_field"
|
|
271
|
+
* }
|
|
272
|
+
* }
|
|
273
|
+
*
|
|
274
|
+
* Min:
|
|
275
|
+
* {
|
|
276
|
+
* "_id": "$field"
|
|
277
|
+
* "my_min": {
|
|
278
|
+
* "$min": "$other_field"
|
|
279
|
+
* }
|
|
280
|
+
* }
|
|
281
|
+
*
|
|
282
|
+
* Sum:
|
|
283
|
+
* {
|
|
284
|
+
* "_id": "$field"
|
|
285
|
+
* "my_sum": {
|
|
286
|
+
* "$sum": "$other_field"
|
|
287
|
+
* }
|
|
288
|
+
* }
|
|
289
|
+
*/
|
|
290
|
+
aggregation?: Record<string, any> | null;
|
|
291
|
+
/** 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. */
|
|
292
|
+
finalFilter?: Record<string, any> | null;
|
|
293
|
+
/** Sorting preferences. */
|
|
294
|
+
sort?: Sorting[];
|
|
295
|
+
/** ID of the collection on which to run the aggregation. */
|
|
296
|
+
dataCollectionId?: string;
|
|
297
|
+
}
|
|
298
|
+
export interface AggregationResponse {
|
|
299
|
+
/** Aggregation results. */
|
|
300
|
+
items?: Record<string, any>[] | null;
|
|
301
|
+
/** Paging information. */
|
|
302
|
+
pagingMetadata?: PagingMetadataV2;
|
|
303
|
+
}
|
|
304
|
+
export interface CountRequest {
|
|
305
|
+
/** 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). */
|
|
306
|
+
filter?: Record<string, any> | null;
|
|
307
|
+
/** ID of the collection for which to count query results. */
|
|
308
|
+
dataCollectionId?: string;
|
|
309
|
+
}
|
|
310
|
+
export interface CountResponse {
|
|
311
|
+
/** Count of items matching the query. */
|
|
312
|
+
totalCount?: number;
|
|
313
|
+
/**
|
|
314
|
+
* *Deprecated.** Refer to `totalCount` instead.
|
|
315
|
+
* @deprecated
|
|
316
|
+
*/
|
|
317
|
+
totalResults?: number;
|
|
318
|
+
}
|
|
319
|
+
export interface DistinctRequest {
|
|
320
|
+
/** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
|
|
321
|
+
dataQuery?: QueryV2;
|
|
322
|
+
/** Property name for which to return all distinct values. */
|
|
323
|
+
propertyName: string;
|
|
324
|
+
/** ID of the collection to query. */
|
|
325
|
+
dataCollectionId?: string;
|
|
326
|
+
/**
|
|
327
|
+
* Whether to omit the total count in the response.
|
|
328
|
+
* When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
|
|
329
|
+
*
|
|
330
|
+
* Default: `false`
|
|
331
|
+
*/
|
|
332
|
+
omitTotalCount?: boolean;
|
|
333
|
+
}
|
|
334
|
+
export interface DistinctResponse {
|
|
335
|
+
/** List of distinct values contained in the property specified in `propertyName`. */
|
|
336
|
+
items?: any[];
|
|
337
|
+
/** Paging information. */
|
|
338
|
+
pagingMetadata?: PagingMetadataV2;
|
|
339
|
+
}
|
|
340
|
+
export interface BulkInsertRequest {
|
|
341
|
+
/** Items to insert. */
|
|
342
|
+
items: Record<string, any>[] | null;
|
|
343
|
+
/** ID of the collection in which to insert the items. */
|
|
344
|
+
dataCollectionId?: string;
|
|
345
|
+
}
|
|
346
|
+
export interface BulkInsertResponse {
|
|
347
|
+
/** IDs of items inserted. */
|
|
348
|
+
insertedItemIds?: string[];
|
|
349
|
+
/** Error details for items that couldn't be inserted. */
|
|
350
|
+
errors?: BulkError[];
|
|
351
|
+
}
|
|
352
|
+
export interface BulkError {
|
|
353
|
+
/** ID of the item that couldn't be inserted. */
|
|
354
|
+
itemId?: string | null;
|
|
355
|
+
/** Error message. */
|
|
356
|
+
message?: string;
|
|
357
|
+
/** Error details. */
|
|
358
|
+
details?: Details;
|
|
359
|
+
/** Index of the failed item in the `items` paramater of the request. */
|
|
360
|
+
originalIndex?: number;
|
|
361
|
+
}
|
|
362
|
+
export interface ApplicationError {
|
|
363
|
+
/** Error code. */
|
|
364
|
+
code?: string;
|
|
365
|
+
/** Error description. */
|
|
366
|
+
description?: string;
|
|
367
|
+
/** Error data. */
|
|
368
|
+
data?: Record<string, any> | null;
|
|
369
|
+
}
|
|
370
|
+
export interface Details {
|
|
371
|
+
/** Application error. */
|
|
372
|
+
applicationError?: ApplicationError;
|
|
373
|
+
}
|
|
374
|
+
export interface BulkSaveRequest {
|
|
375
|
+
/** Items to insert or update. */
|
|
376
|
+
items: Record<string, any>[] | null;
|
|
377
|
+
/** ID of the collection in which to insert or update the items. */
|
|
378
|
+
dataCollectionId?: string;
|
|
379
|
+
}
|
|
380
|
+
export interface BulkSaveResponse {
|
|
381
|
+
/** IDs of items inserted. */
|
|
382
|
+
insertedItemIds?: string[];
|
|
383
|
+
/** IDs of items updated. */
|
|
384
|
+
updatedItemIds?: string[];
|
|
385
|
+
/** Errors for items that couldn't be inserted or updated. */
|
|
386
|
+
errors?: BulkError[];
|
|
387
|
+
}
|
|
388
|
+
export interface BulkUpdateRequest {
|
|
389
|
+
/** Items to update. */
|
|
390
|
+
items: Record<string, any>[] | null;
|
|
391
|
+
/** ID of the collection in which to update items. */
|
|
392
|
+
dataCollectionId?: string;
|
|
393
|
+
}
|
|
394
|
+
export interface BulkUpdateResponse {
|
|
395
|
+
/** IDs of items updated. */
|
|
396
|
+
updatedItemIds?: string[];
|
|
397
|
+
/** Errors for items that couldn't be updated. */
|
|
398
|
+
errors?: BulkError[];
|
|
399
|
+
}
|
|
400
|
+
export interface BulkPatchRequest {
|
|
401
|
+
/** List of items and their patches */
|
|
402
|
+
entries?: Entry[];
|
|
403
|
+
/** Data access options */
|
|
404
|
+
options?: Options;
|
|
405
|
+
/** ID of the collection */
|
|
406
|
+
dataCollectionId?: string;
|
|
407
|
+
}
|
|
408
|
+
export interface Entry {
|
|
409
|
+
/** item id to patch */
|
|
410
|
+
itemId?: string;
|
|
411
|
+
/** Patch data */
|
|
412
|
+
patch?: Record<string, any> | null;
|
|
413
|
+
}
|
|
414
|
+
export interface BulkPatchResponse {
|
|
415
|
+
/** Patched item ids */
|
|
416
|
+
patchedItemIds?: string[];
|
|
417
|
+
/** Errors */
|
|
418
|
+
errors?: BulkError[];
|
|
419
|
+
}
|
|
420
|
+
export interface BulkRemoveRequest {
|
|
421
|
+
/** IDs of items to remove. */
|
|
422
|
+
entries?: BulkRemoveRequestEntry[];
|
|
423
|
+
/** ID of the collection from which to remove the items. */
|
|
424
|
+
dataCollectionId?: string;
|
|
425
|
+
}
|
|
426
|
+
export interface BulkRemoveRequestEntry {
|
|
427
|
+
/** ID of item to remove. */
|
|
428
|
+
itemId?: string;
|
|
429
|
+
}
|
|
430
|
+
export interface BulkRemoveResponse {
|
|
431
|
+
/** IDs of items removed. */
|
|
432
|
+
removedItemIds?: string[];
|
|
433
|
+
/** Errors for items that couldn't be removed. */
|
|
434
|
+
errors?: BulkError[];
|
|
435
|
+
}
|
|
436
|
+
export interface QueryReferencedRequest {
|
|
437
|
+
/** ID of the referring item. */
|
|
438
|
+
referringItemId: string;
|
|
439
|
+
/** Property containing the references to the referenced items. */
|
|
440
|
+
propertyName: string;
|
|
441
|
+
/** Paging preferences. */
|
|
442
|
+
paging?: Paging;
|
|
443
|
+
/** ID of the collection containing the referring item. */
|
|
444
|
+
dataCollectionId?: string;
|
|
445
|
+
/**
|
|
446
|
+
* Whether to omit the total count in the response.
|
|
447
|
+
* When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
|
|
448
|
+
*
|
|
449
|
+
* Default: `false`
|
|
450
|
+
*/
|
|
451
|
+
omitTotalCount?: boolean;
|
|
452
|
+
}
|
|
453
|
+
export declare enum Order {
|
|
454
|
+
ASC = "ASC",
|
|
455
|
+
DESC = "DESC"
|
|
456
|
+
}
|
|
457
|
+
export interface QueryReferencedResponse {
|
|
458
|
+
/**
|
|
459
|
+
* *Deprecated.** Refer to `entities` instead. List of referenced items.
|
|
460
|
+
* @deprecated
|
|
461
|
+
*/
|
|
462
|
+
items?: Record<string, any>[] | null;
|
|
463
|
+
/**
|
|
464
|
+
* *Deprecated**. Refer to 'pagingMetadata' instead. Total number of referenced items satisfying the query.
|
|
465
|
+
* @deprecated
|
|
466
|
+
*/
|
|
467
|
+
totalCount?: number;
|
|
468
|
+
/**
|
|
469
|
+
* *Deprecated**. Refer to 'pagingMetadata' instead. Total number of referenced items satisfying the query.
|
|
470
|
+
* @deprecated
|
|
471
|
+
*/
|
|
472
|
+
totalResults?: number;
|
|
473
|
+
/** 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. */
|
|
474
|
+
entities?: ReferencedEntity[];
|
|
475
|
+
/** Paging information. */
|
|
476
|
+
pagingMetadata?: PagingMetadataV2;
|
|
477
|
+
}
|
|
478
|
+
export interface ReferencedEntity extends ReferencedEntityEntityOneOf {
|
|
479
|
+
/** Data item referenced. */
|
|
480
|
+
item?: Record<string, any> | null;
|
|
481
|
+
/** 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. */
|
|
482
|
+
referenceId?: string;
|
|
483
|
+
}
|
|
484
|
+
/** @oneof */
|
|
485
|
+
export interface ReferencedEntityEntityOneOf {
|
|
486
|
+
/** Data item referenced. */
|
|
487
|
+
item?: Record<string, any> | null;
|
|
488
|
+
/** 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. */
|
|
489
|
+
referenceId?: string;
|
|
490
|
+
}
|
|
491
|
+
export interface BulkInsertReferencesRequest {
|
|
492
|
+
/** References to insert. */
|
|
493
|
+
references: Reference[];
|
|
494
|
+
/** ID of the collection containing the referring item. */
|
|
495
|
+
dataCollectionId?: string;
|
|
496
|
+
}
|
|
497
|
+
export interface Reference {
|
|
498
|
+
/** Property containing the references to the referenced items. */
|
|
499
|
+
propertyName?: string;
|
|
500
|
+
/** ID of the referring item. */
|
|
501
|
+
referringItemId?: string;
|
|
502
|
+
/** ID of the referenced item. */
|
|
503
|
+
referencedItemId?: string;
|
|
504
|
+
}
|
|
505
|
+
export interface BulkInsertReferencesResponse {
|
|
506
|
+
}
|
|
507
|
+
export interface BulkReplaceReferencesRequest {
|
|
508
|
+
/** Property containing the references to the referenced items. */
|
|
509
|
+
propertyName: string;
|
|
510
|
+
/** ID of the referring item. */
|
|
511
|
+
referringItemId: string;
|
|
512
|
+
/** List of new referenced item IDs to replace the existing ones. */
|
|
513
|
+
newReferencedItemIds?: string[];
|
|
514
|
+
/** ID of the collection containing the referring item. */
|
|
515
|
+
dataCollectionId?: string;
|
|
516
|
+
}
|
|
517
|
+
export interface BulkReplaceReferencesResponse {
|
|
518
|
+
}
|
|
519
|
+
export interface BulkRemoveReferencesRequest {
|
|
520
|
+
/** References to be removed. */
|
|
521
|
+
references: Reference[];
|
|
522
|
+
/** ID of the collection containing the referring item. */
|
|
523
|
+
dataCollectionId?: string;
|
|
524
|
+
}
|
|
525
|
+
export interface BulkRemoveReferencesResponse {
|
|
526
|
+
}
|
|
527
|
+
export interface IsReferencedRequest {
|
|
528
|
+
/** Property that may contain a reference to the specified item. */
|
|
529
|
+
propertyName: string;
|
|
530
|
+
/** ID of the referring item. */
|
|
531
|
+
referringItemId: string;
|
|
532
|
+
/** ID of the item that may be referenced. */
|
|
533
|
+
referencedItemId: string;
|
|
534
|
+
/** ID of the collection containing the referring item. */
|
|
535
|
+
dataCollectionId?: string;
|
|
536
|
+
}
|
|
537
|
+
export interface IsReferencedResponse {
|
|
538
|
+
/** Whether the specified property of the referring item contains a reference to the specified referenced item. */
|
|
539
|
+
isReferenced?: boolean;
|
|
540
|
+
}
|
|
541
|
+
export interface RestoreFromTrashBinRequest {
|
|
542
|
+
/**
|
|
543
|
+
* Deprecated, use dataCollectionId instead.
|
|
544
|
+
* Collection name
|
|
545
|
+
* @deprecated Deprecated, use dataCollectionId instead.
|
|
546
|
+
* Collection name
|
|
547
|
+
* @replacedBy data_collection_id
|
|
548
|
+
*/
|
|
549
|
+
collectionName?: string;
|
|
550
|
+
/** Item id */
|
|
551
|
+
itemId?: string;
|
|
552
|
+
/** Data access options */
|
|
553
|
+
options?: Options;
|
|
554
|
+
/** ID of the collection */
|
|
555
|
+
dataCollectionId?: string;
|
|
556
|
+
}
|
|
557
|
+
export interface RestoreFromTrashBinResponse {
|
|
558
|
+
item?: Record<string, any> | null;
|
|
559
|
+
}
|
|
560
|
+
export interface QueryResponseNonNullableFields {
|
|
561
|
+
totalCount: number;
|
|
562
|
+
totalResults: number;
|
|
563
|
+
partialIncludes: boolean;
|
|
564
|
+
}
|
|
565
|
+
export interface CountResponseNonNullableFields {
|
|
566
|
+
totalCount: number;
|
|
567
|
+
totalResults: number;
|
|
568
|
+
}
|
|
569
|
+
interface ApplicationErrorNonNullableFields {
|
|
570
|
+
code: string;
|
|
571
|
+
description: string;
|
|
572
|
+
}
|
|
573
|
+
interface DetailsNonNullableFields {
|
|
574
|
+
applicationError?: ApplicationErrorNonNullableFields;
|
|
575
|
+
}
|
|
576
|
+
interface BulkErrorNonNullableFields {
|
|
577
|
+
message: string;
|
|
578
|
+
details?: DetailsNonNullableFields;
|
|
579
|
+
originalIndex: number;
|
|
580
|
+
}
|
|
581
|
+
export interface BulkInsertResponseNonNullableFields {
|
|
582
|
+
insertedItemIds: string[];
|
|
583
|
+
errors: BulkErrorNonNullableFields[];
|
|
584
|
+
}
|
|
585
|
+
export interface BulkSaveResponseNonNullableFields {
|
|
586
|
+
insertedItemIds: string[];
|
|
587
|
+
updatedItemIds: string[];
|
|
588
|
+
errors: BulkErrorNonNullableFields[];
|
|
589
|
+
}
|
|
590
|
+
export interface BulkUpdateResponseNonNullableFields {
|
|
591
|
+
updatedItemIds: string[];
|
|
592
|
+
errors: BulkErrorNonNullableFields[];
|
|
593
|
+
}
|
|
594
|
+
export interface BulkRemoveResponseNonNullableFields {
|
|
595
|
+
removedItemIds: string[];
|
|
596
|
+
errors: BulkErrorNonNullableFields[];
|
|
597
|
+
}
|
|
598
|
+
interface ReferencedEntityNonNullableFields {
|
|
599
|
+
referenceId: string;
|
|
600
|
+
}
|
|
601
|
+
export interface QueryReferencedResponseNonNullableFields {
|
|
602
|
+
totalCount: number;
|
|
603
|
+
totalResults: number;
|
|
604
|
+
entities: ReferencedEntityNonNullableFields[];
|
|
605
|
+
}
|
|
606
|
+
export interface IsReferencedResponseNonNullableFields {
|
|
607
|
+
isReferenced: boolean;
|
|
608
|
+
}
|
|
609
|
+
export interface InsertOptions {
|
|
610
|
+
/** Item to insert. */
|
|
611
|
+
item?: Record<string, any> | null;
|
|
612
|
+
/** ID of the collection in which to insert the item. */
|
|
613
|
+
dataCollectionId?: string;
|
|
614
|
+
}
|
|
615
|
+
export interface UpdateOptions {
|
|
616
|
+
/** Item to update. The existing item is replaced with this version. */
|
|
617
|
+
item: Record<string, any> | null;
|
|
618
|
+
/** ID of the collection containing the existing item. */
|
|
619
|
+
dataCollectionId?: string;
|
|
620
|
+
}
|
|
621
|
+
export interface SaveOptions {
|
|
622
|
+
/** Item to insert or update. */
|
|
623
|
+
item?: Record<string, any> | null;
|
|
624
|
+
/** ID of the collection in which to insert or update the item. */
|
|
625
|
+
dataCollectionId?: string;
|
|
626
|
+
}
|
|
627
|
+
export interface GetOptions {
|
|
628
|
+
/** ID of the collection from which to retrieve the item. */
|
|
629
|
+
dataCollectionId?: string;
|
|
630
|
+
}
|
|
631
|
+
export interface RemoveOptions {
|
|
632
|
+
/** ID of the collection from which to remove the item. */
|
|
633
|
+
dataCollectionId?: string;
|
|
634
|
+
}
|
|
635
|
+
export interface TruncateOptions {
|
|
636
|
+
/** ID of the collection to truncate. */
|
|
637
|
+
dataCollectionId?: string;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Retrieves a list of items, on the basis of the filtering, sorting, and paging preferences you provide.
|
|
641
|
+
*
|
|
642
|
+
* For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
643
|
+
* @public
|
|
644
|
+
* @documentationMaturity preview
|
|
645
|
+
* @permissionId WIX_DATA.FIND
|
|
646
|
+
* @permissionScope Read Data Items
|
|
647
|
+
* @permissionScopeId SCOPE.DC-DATA.READ
|
|
648
|
+
* @applicableIdentity APP
|
|
649
|
+
* @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Query
|
|
650
|
+
*/
|
|
651
|
+
export declare function query(options?: QueryOptions): Promise<QueryResponse & QueryResponseNonNullableFields>;
|
|
652
|
+
export interface QueryOptions {
|
|
653
|
+
/** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
|
|
654
|
+
dataQuery?: QueryV2;
|
|
655
|
+
/**
|
|
656
|
+
* Whether to omit the total count in the response.
|
|
657
|
+
* When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
|
|
658
|
+
*
|
|
659
|
+
* Default: `false`
|
|
660
|
+
*/
|
|
661
|
+
omitTotalCount?: boolean;
|
|
662
|
+
/**
|
|
663
|
+
* Properties for which to include referenced items in the query's results.
|
|
664
|
+
* Up to 50 referenced items can be included for each item that matches the query.
|
|
665
|
+
* If more than 50 items are referenced, `partialIncludes` in the response is `true`.
|
|
666
|
+
*/
|
|
667
|
+
includeReferencedItems?: string[];
|
|
668
|
+
/** ID of the collection to query. */
|
|
669
|
+
dataCollectionId?: string;
|
|
670
|
+
}
|
|
671
|
+
export interface AggregateOptions {
|
|
672
|
+
/** Paging preferences. */
|
|
673
|
+
paging?: Paging;
|
|
674
|
+
/** 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. */
|
|
675
|
+
initialFilter?: Record<string, any> | null;
|
|
676
|
+
/**
|
|
677
|
+
* Object defining the steps of the aggregation to be This is an object defining aggregation itself.
|
|
678
|
+
*
|
|
679
|
+
* * Grouping rule is defined as _id field. It takes a form of:
|
|
680
|
+
* {
|
|
681
|
+
* "_id": "$field"
|
|
682
|
+
* }
|
|
683
|
+
*
|
|
684
|
+
* If multiple fields are used for grouping, Group takes a form of:
|
|
685
|
+
* {
|
|
686
|
+
* "_id": {
|
|
687
|
+
* "field1": "$field1"
|
|
688
|
+
* "field2": "$field2"
|
|
689
|
+
* }
|
|
690
|
+
* }
|
|
691
|
+
*
|
|
692
|
+
* * Aggregation functions are defined as special field definitions.
|
|
693
|
+
*
|
|
694
|
+
* Average:
|
|
695
|
+
* {
|
|
696
|
+
* "_id": "$field"
|
|
697
|
+
* "my_avg": {
|
|
698
|
+
* "$avg": "$other_field"
|
|
699
|
+
* }
|
|
700
|
+
* }
|
|
701
|
+
*
|
|
702
|
+
* Max:
|
|
703
|
+
* {
|
|
704
|
+
* "_id": "$field"
|
|
705
|
+
* "my_max": {
|
|
706
|
+
* "$max": "$other_field"
|
|
707
|
+
* }
|
|
708
|
+
* }
|
|
709
|
+
*
|
|
710
|
+
* Min:
|
|
711
|
+
* {
|
|
712
|
+
* "_id": "$field"
|
|
713
|
+
* "my_min": {
|
|
714
|
+
* "$min": "$other_field"
|
|
715
|
+
* }
|
|
716
|
+
* }
|
|
717
|
+
*
|
|
718
|
+
* Sum:
|
|
719
|
+
* {
|
|
720
|
+
* "_id": "$field"
|
|
721
|
+
* "my_sum": {
|
|
722
|
+
* "$sum": "$other_field"
|
|
723
|
+
* }
|
|
724
|
+
* }
|
|
725
|
+
*/
|
|
726
|
+
aggregation?: Record<string, any> | null;
|
|
727
|
+
/** 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. */
|
|
728
|
+
finalFilter?: Record<string, any> | null;
|
|
729
|
+
/** Sorting preferences. */
|
|
730
|
+
sort?: Sorting[];
|
|
731
|
+
/** ID of the collection on which to run the aggregation. */
|
|
732
|
+
dataCollectionId?: string;
|
|
733
|
+
}
|
|
734
|
+
export interface CountOptions {
|
|
735
|
+
/** 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). */
|
|
736
|
+
filter?: Record<string, any> | null;
|
|
737
|
+
/** ID of the collection for which to count query results. */
|
|
738
|
+
dataCollectionId?: string;
|
|
739
|
+
}
|
|
740
|
+
export interface DistinctOptions {
|
|
741
|
+
/** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
|
|
742
|
+
dataQuery?: QueryV2;
|
|
743
|
+
/** Property name for which to return all distinct values. */
|
|
744
|
+
propertyName: string;
|
|
745
|
+
/** ID of the collection to query. */
|
|
746
|
+
dataCollectionId?: string;
|
|
747
|
+
/**
|
|
748
|
+
* Whether to omit the total count in the response.
|
|
749
|
+
* When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
|
|
750
|
+
*
|
|
751
|
+
* Default: `false`
|
|
752
|
+
*/
|
|
753
|
+
omitTotalCount?: boolean;
|
|
754
|
+
}
|
|
755
|
+
export interface BulkInsertOptions {
|
|
756
|
+
/** Items to insert. */
|
|
757
|
+
items: Record<string, any>[] | null;
|
|
758
|
+
/** ID of the collection in which to insert the items. */
|
|
759
|
+
dataCollectionId?: string;
|
|
760
|
+
}
|
|
761
|
+
export interface BulkSaveOptions {
|
|
762
|
+
/** Items to insert or update. */
|
|
763
|
+
items: Record<string, any>[] | null;
|
|
764
|
+
/** ID of the collection in which to insert or update the items. */
|
|
765
|
+
dataCollectionId?: string;
|
|
766
|
+
}
|
|
767
|
+
export interface BulkUpdateOptions {
|
|
768
|
+
/** Items to update. */
|
|
769
|
+
items: Record<string, any>[] | null;
|
|
770
|
+
/** ID of the collection in which to update items. */
|
|
771
|
+
dataCollectionId?: string;
|
|
772
|
+
}
|
|
773
|
+
export interface BulkRemoveOptions {
|
|
774
|
+
/** IDs of items to remove. */
|
|
775
|
+
entries?: BulkRemoveRequestEntry[];
|
|
776
|
+
/** ID of the collection from which to remove the items. */
|
|
777
|
+
dataCollectionId?: string;
|
|
778
|
+
}
|
|
779
|
+
export interface QueryReferencedOptions {
|
|
780
|
+
/** ID of the referring item. */
|
|
781
|
+
referringItemId: string;
|
|
782
|
+
/** Property containing the references to the referenced items. */
|
|
783
|
+
propertyName: string;
|
|
784
|
+
/** Paging preferences. */
|
|
785
|
+
paging?: Paging;
|
|
786
|
+
/** ID of the collection containing the referring item. */
|
|
787
|
+
dataCollectionId?: string;
|
|
788
|
+
/**
|
|
789
|
+
* Whether to omit the total count in the response.
|
|
790
|
+
* When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.
|
|
791
|
+
*
|
|
792
|
+
* Default: `false`
|
|
793
|
+
*/
|
|
794
|
+
omitTotalCount?: boolean;
|
|
795
|
+
}
|
|
796
|
+
export interface BulkInsertReferencesOptions {
|
|
797
|
+
/** References to insert. */
|
|
798
|
+
references: Reference[];
|
|
799
|
+
/** ID of the collection containing the referring item. */
|
|
800
|
+
dataCollectionId?: string;
|
|
801
|
+
}
|
|
802
|
+
export interface BulkReplaceReferencesOptions {
|
|
803
|
+
/** Property containing the references to the referenced items. */
|
|
804
|
+
propertyName: string;
|
|
805
|
+
/** ID of the referring item. */
|
|
806
|
+
referringItemId: string;
|
|
807
|
+
/** List of new referenced item IDs to replace the existing ones. */
|
|
808
|
+
newReferencedItemIds?: string[];
|
|
809
|
+
/** ID of the collection containing the referring item. */
|
|
810
|
+
dataCollectionId?: string;
|
|
811
|
+
}
|
|
812
|
+
export interface BulkRemoveReferencesOptions {
|
|
813
|
+
/** References to be removed. */
|
|
814
|
+
references: Reference[];
|
|
815
|
+
/** ID of the collection containing the referring item. */
|
|
816
|
+
dataCollectionId?: string;
|
|
817
|
+
}
|
|
818
|
+
export interface IsReferencedOptions {
|
|
819
|
+
/** Property that may contain a reference to the specified item. */
|
|
820
|
+
propertyName: string;
|
|
821
|
+
/** ID of the referring item. */
|
|
822
|
+
referringItemId: string;
|
|
823
|
+
/** ID of the item that may be referenced. */
|
|
824
|
+
referencedItemId: string;
|
|
825
|
+
/** ID of the collection containing the referring item. */
|
|
826
|
+
dataCollectionId?: string;
|
|
827
|
+
}
|
|
828
|
+
export {};
|