@wix/data 1.0.179 → 1.0.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/context.js.map +1 -0
- package/context.ts +4 -0
- package/index.js.map +1 -0
- package/index.ts +6 -0
- package/meta.js.map +1 -0
- package/meta.ts +4 -0
- package/package.json +35 -23
- package/service-plugins-context.js.map +1 -0
- package/service-plugins-context.ts +1 -0
- package/service-plugins.js.map +1 -0
- package/service-plugins.ts +1 -0
- package/build/cjs/context.js.map +0 -1
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/service-plugins-context.js.map +0 -1
- package/build/cjs/service-plugins.js.map +0 -1
- package/context/package.json +0 -7
- package/meta/package.json +0 -7
- package/service-plugins/context/package.json +0 -7
- package/service-plugins/package.json +0 -7
- package/type-bundles/context.bundle.d.ts +0 -5235
- package/type-bundles/index.bundle.d.ts +0 -5235
- package/type-bundles/meta.bundle.d.ts +0 -4623
- package/type-bundles/service-plugins-context.bundle.d.ts +0 -1330
- package/type-bundles/service-plugins.bundle.d.ts +0 -1330
- /package/{build/cjs/context.d.ts → context.d.ts} +0 -0
- /package/{build/cjs/context.js → context.js} +0 -0
- /package/{build/cjs/index.d.ts → index.d.ts} +0 -0
- /package/{build/cjs/index.js → index.js} +0 -0
- /package/{build/cjs/meta.d.ts → meta.d.ts} +0 -0
- /package/{build/cjs/meta.js → meta.js} +0 -0
- /package/{build/cjs/service-plugins-context.d.ts → service-plugins-context.d.ts} +0 -0
- /package/{build/cjs/service-plugins-context.js → service-plugins-context.js} +0 -0
- /package/{build/cjs/service-plugins.d.ts → service-plugins.d.ts} +0 -0
- /package/{build/cjs/service-plugins.js → service-plugins.js} +0 -0
|
@@ -1,4623 +0,0 @@
|
|
|
1
|
-
/** An external database connection defines a connection between an external database and a Wix site or project. */
|
|
2
|
-
interface ExternalDatabaseConnection$1 {
|
|
3
|
-
/**
|
|
4
|
-
* Name of the external database connection.
|
|
5
|
-
* An external database connection may connect to one or more external data collections or tables.
|
|
6
|
-
* These are represented as `connectionName/dataCollectionId`.
|
|
7
|
-
*/
|
|
8
|
-
name?: string;
|
|
9
|
-
/** Base URL for provisioning and managing data in the external database. For example: `https://example.com/my-external-database`. */
|
|
10
|
-
endpoint?: string | null;
|
|
11
|
-
/**
|
|
12
|
-
* Settings passed to the external database connection as part of each request.
|
|
13
|
-
* These settings can relate to authentication, tenancy, or provide any other information needed for processing a request.
|
|
14
|
-
* Their content and structure depend on the specific requirements of the external database's API.
|
|
15
|
-
*/
|
|
16
|
-
configuration?: Record<string, any> | null;
|
|
17
|
-
/**
|
|
18
|
-
* Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure.
|
|
19
|
-
* @readonly
|
|
20
|
-
*/
|
|
21
|
-
connectionStatus?: ConnectionStatus$1;
|
|
22
|
-
/**
|
|
23
|
-
* The external database's capabilities.
|
|
24
|
-
* @readonly
|
|
25
|
-
*/
|
|
26
|
-
capabilities?: Capabilities$1;
|
|
27
|
-
}
|
|
28
|
-
declare enum CauseOfFailure$1 {
|
|
29
|
-
/** No connection failure. */
|
|
30
|
-
NONE = "NONE",
|
|
31
|
-
/** General communication failure. */
|
|
32
|
-
COMMUNICATION_FAILURE = "COMMUNICATION_FAILURE",
|
|
33
|
-
/** External database host is unreachable. */
|
|
34
|
-
DESTINATION_HOST_UNREACHABLE = "DESTINATION_HOST_UNREACHABLE",
|
|
35
|
-
/** Unauthorized to access the external database. */
|
|
36
|
-
UNAUTHORIZED = "UNAUTHORIZED",
|
|
37
|
-
/** `endpoint` is not set. */
|
|
38
|
-
DESTINATION_ENDPOINT_NOT_DEFINED = "DESTINATION_ENDPOINT_NOT_DEFINED"
|
|
39
|
-
}
|
|
40
|
-
declare enum CollectionsFound$1 {
|
|
41
|
-
UNKNOWN = "UNKNOWN",
|
|
42
|
-
YES = "YES",
|
|
43
|
-
NO = "NO"
|
|
44
|
-
}
|
|
45
|
-
declare enum FieldType$1 {
|
|
46
|
-
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
47
|
-
TEXT = "TEXT",
|
|
48
|
-
NUMBER = "NUMBER",
|
|
49
|
-
DATE = "DATE",
|
|
50
|
-
DATETIME = "DATETIME",
|
|
51
|
-
IMAGE = "IMAGE",
|
|
52
|
-
BOOLEAN = "BOOLEAN",
|
|
53
|
-
DOCUMENT = "DOCUMENT",
|
|
54
|
-
URL = "URL",
|
|
55
|
-
RICH_TEXT = "RICH_TEXT",
|
|
56
|
-
VIDEO = "VIDEO",
|
|
57
|
-
ANY = "ANY",
|
|
58
|
-
ARRAY_STRING = "ARRAY_STRING",
|
|
59
|
-
ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
|
|
60
|
-
AUDIO = "AUDIO",
|
|
61
|
-
TIME = "TIME",
|
|
62
|
-
LANGUAGE = "LANGUAGE",
|
|
63
|
-
RICH_CONTENT = "RICH_CONTENT",
|
|
64
|
-
MEDIA_GALLERY = "MEDIA_GALLERY",
|
|
65
|
-
ADDRESS = "ADDRESS",
|
|
66
|
-
PAGE_LINK = "PAGE_LINK",
|
|
67
|
-
REFERENCE = "REFERENCE",
|
|
68
|
-
MULTI_REFERENCE = "MULTI_REFERENCE",
|
|
69
|
-
OBJECT = "OBJECT",
|
|
70
|
-
ARRAY = "ARRAY",
|
|
71
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
72
|
-
LEGACY_TIME = "LEGACY_TIME",
|
|
73
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
74
|
-
LEGACY_BOOK = "LEGACY_BOOK",
|
|
75
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
76
|
-
LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL",
|
|
77
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
78
|
-
LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE",
|
|
79
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
80
|
-
LEGACY_IMAGE = "LEGACY_IMAGE",
|
|
81
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
82
|
-
LEGACY_COLOR = "LEGACY_COLOR",
|
|
83
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
84
|
-
LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
|
|
85
|
-
}
|
|
86
|
-
interface ConnectionStatus$1 {
|
|
87
|
-
/** Whether the connection was established successfully. */
|
|
88
|
-
successful?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* If and why a connection attempt failed.
|
|
91
|
-
* + `NONE`: No connection failure.
|
|
92
|
-
* + `COMMUNICATION_FAILURE`: General communication failure.
|
|
93
|
-
* + `DESTINATION_HOST_UNREACHABLE`: External database host is unreachable.
|
|
94
|
-
* + `UNAUTHORIZED`: Unauthorized to access external database.
|
|
95
|
-
* + `DESTINATION_ENDPOINT_NOT_DEFINED`: `Endpoint` property is not set.
|
|
96
|
-
*/
|
|
97
|
-
causeOfFailure?: CauseOfFailure$1;
|
|
98
|
-
/**
|
|
99
|
-
* Whether the external database has existing collections. Possible values are:
|
|
100
|
-
* + `UNKNOWN`: The attempt to connect to the external database failed, so status is unknown.
|
|
101
|
-
* + `NO`: External database does not have any existing collections.
|
|
102
|
-
* + `YES`: External database has existing collections.
|
|
103
|
-
* @readonly
|
|
104
|
-
*/
|
|
105
|
-
hasCollections?: CollectionsFound$1;
|
|
106
|
-
}
|
|
107
|
-
declare enum ProtocolVersion$1 {
|
|
108
|
-
UNKNOWN_PROTOCOL_VERSION = "UNKNOWN_PROTOCOL_VERSION",
|
|
109
|
-
V1 = "V1",
|
|
110
|
-
V2 = "V2",
|
|
111
|
-
V3 = "V3"
|
|
112
|
-
}
|
|
113
|
-
interface Capabilities$1 {
|
|
114
|
-
/** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */
|
|
115
|
-
collectionModificationsSupported?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Field types the external database supports.
|
|
118
|
-
* This field only applies when `collectionModificationsSupported` is `true`.
|
|
119
|
-
*/
|
|
120
|
-
fieldTypes?: FieldType$1[];
|
|
121
|
-
}
|
|
122
|
-
interface GetExternalDatabaseConnectionRequest$1 {
|
|
123
|
-
/** Name of the external database connection to retrieve. */
|
|
124
|
-
name: string;
|
|
125
|
-
}
|
|
126
|
-
interface GetExternalDatabaseConnectionResponse$1 {
|
|
127
|
-
/** Details of the external database connection requested. */
|
|
128
|
-
externalDatabaseConnection?: ExternalDatabaseConnection$1;
|
|
129
|
-
}
|
|
130
|
-
interface ListExternalDatabaseConnectionsRequest$1 {
|
|
131
|
-
/** Paging */
|
|
132
|
-
paging?: Paging$7;
|
|
133
|
-
}
|
|
134
|
-
interface Paging$7 {
|
|
135
|
-
/** Number of items to load. */
|
|
136
|
-
limit?: number | null;
|
|
137
|
-
/** Number of items to skip in the current sort order. */
|
|
138
|
-
offset?: number | null;
|
|
139
|
-
}
|
|
140
|
-
interface ListExternalDatabaseConnectionsResponse$1 {
|
|
141
|
-
/** List of external database connections. */
|
|
142
|
-
externalDatabaseConnections?: ExternalDatabaseConnection$1[];
|
|
143
|
-
/** Paging metadata */
|
|
144
|
-
pagingMetadata?: PagingMetadata$3;
|
|
145
|
-
}
|
|
146
|
-
interface PagingMetadata$3 {
|
|
147
|
-
/** Number of items returned in the response. */
|
|
148
|
-
count?: number | null;
|
|
149
|
-
/** Offset that was requested. */
|
|
150
|
-
offset?: number | null;
|
|
151
|
-
/** Total number of items that match the query. */
|
|
152
|
-
total?: number | null;
|
|
153
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
154
|
-
tooManyToCount?: boolean | null;
|
|
155
|
-
}
|
|
156
|
-
interface CreateExternalDatabaseConnectionRequest$1 {
|
|
157
|
-
/** External database connection details. */
|
|
158
|
-
externalDatabaseConnection: ExternalDatabaseConnection$1;
|
|
159
|
-
/** Connection type. */
|
|
160
|
-
connectionType: ConnectionType$1;
|
|
161
|
-
}
|
|
162
|
-
declare enum ConnectionType$1 {
|
|
163
|
-
/** Unknown connection type. */
|
|
164
|
-
UNKNOWN_CONNECTION_TYPE = "UNKNOWN_CONNECTION_TYPE",
|
|
165
|
-
/**
|
|
166
|
-
* Connection to database adapter that implements legacy External Database Collections SPI (protocol version 1 or 2)
|
|
167
|
-
* https://www.wix.com/velo/reference/spis/external-database-collections/introduction
|
|
168
|
-
*/
|
|
169
|
-
STANDALONE = "STANDALONE",
|
|
170
|
-
/**
|
|
171
|
-
* Connection to database adapter that implements External Database SPI (protocol version 3)
|
|
172
|
-
* https://dev.wix.com/docs/rest/internal-only/wix-data/external-database-spi/introduction
|
|
173
|
-
* https://dev.wix.com/docs/rest/articles/getting-started/service-provider-interface
|
|
174
|
-
*/
|
|
175
|
-
WIX_SPI = "WIX_SPI"
|
|
176
|
-
}
|
|
177
|
-
interface CreateExternalDatabaseConnectionResponse$1 {
|
|
178
|
-
/** Details of external database connection created. */
|
|
179
|
-
externalDatabaseConnection?: ExternalDatabaseConnection$1;
|
|
180
|
-
}
|
|
181
|
-
interface UpdateExternalDatabaseConnectionRequest$1 {
|
|
182
|
-
/** Updated external database connection details. The existing connection is replaced with this version. */
|
|
183
|
-
externalDatabaseConnection: ExternalDatabaseConnection$1;
|
|
184
|
-
}
|
|
185
|
-
interface UpdateExternalDatabaseConnectionResponse$1 {
|
|
186
|
-
/** Updated external database connection details. */
|
|
187
|
-
externalDatabaseConnection?: ExternalDatabaseConnection$1;
|
|
188
|
-
}
|
|
189
|
-
interface DeleteExternalDatabaseConnectionRequest$1 {
|
|
190
|
-
/** Name of the external database connection to delete. */
|
|
191
|
-
name: string;
|
|
192
|
-
}
|
|
193
|
-
interface DeleteExternalDatabaseConnectionResponse$1 {
|
|
194
|
-
}
|
|
195
|
-
interface ConnectionStatusNonNullableFields$1 {
|
|
196
|
-
successful: boolean;
|
|
197
|
-
causeOfFailure: CauseOfFailure$1;
|
|
198
|
-
hasCollections: CollectionsFound$1;
|
|
199
|
-
}
|
|
200
|
-
interface CapabilitiesNonNullableFields$1 {
|
|
201
|
-
collectionModificationsSupported: boolean;
|
|
202
|
-
fieldTypes: FieldType$1[];
|
|
203
|
-
}
|
|
204
|
-
interface ExternalDatabaseConnectionNonNullableFields$1 {
|
|
205
|
-
name: string;
|
|
206
|
-
connectionStatus?: ConnectionStatusNonNullableFields$1;
|
|
207
|
-
protocolVersion: ProtocolVersion$1;
|
|
208
|
-
capabilities?: CapabilitiesNonNullableFields$1;
|
|
209
|
-
}
|
|
210
|
-
interface GetExternalDatabaseConnectionResponseNonNullableFields$1 {
|
|
211
|
-
externalDatabaseConnection?: ExternalDatabaseConnectionNonNullableFields$1;
|
|
212
|
-
}
|
|
213
|
-
interface ListExternalDatabaseConnectionsResponseNonNullableFields$1 {
|
|
214
|
-
externalDatabaseConnections: ExternalDatabaseConnectionNonNullableFields$1[];
|
|
215
|
-
}
|
|
216
|
-
interface CreateExternalDatabaseConnectionResponseNonNullableFields$1 {
|
|
217
|
-
externalDatabaseConnection?: ExternalDatabaseConnectionNonNullableFields$1;
|
|
218
|
-
}
|
|
219
|
-
interface UpdateExternalDatabaseConnectionResponseNonNullableFields$1 {
|
|
220
|
-
externalDatabaseConnection?: ExternalDatabaseConnectionNonNullableFields$1;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/** An external database connection defines a connection between an external database and a Wix site or project. */
|
|
224
|
-
interface ExternalDatabaseConnection {
|
|
225
|
-
/**
|
|
226
|
-
* Name of the external database connection.
|
|
227
|
-
* An external database connection may connect to one or more external data collections or tables.
|
|
228
|
-
* These are represented as `connectionName/dataCollectionId`.
|
|
229
|
-
*/
|
|
230
|
-
name?: string;
|
|
231
|
-
/** Base URL for provisioning and managing data in the external database. For example: `https://example.com/my-external-database`. */
|
|
232
|
-
endpoint?: string | null;
|
|
233
|
-
/**
|
|
234
|
-
* Settings passed to the external database connection as part of each request.
|
|
235
|
-
* These settings can relate to authentication, tenancy, or provide any other information needed for processing a request.
|
|
236
|
-
* Their content and structure depend on the specific requirements of the external database's API.
|
|
237
|
-
*/
|
|
238
|
-
configuration?: Record<string, any> | null;
|
|
239
|
-
/**
|
|
240
|
-
* Status of the external database connection. Includes whether the connection was established successfully, and if not, the reason for the failure.
|
|
241
|
-
* @readonly
|
|
242
|
-
*/
|
|
243
|
-
connectionStatus?: ConnectionStatus;
|
|
244
|
-
/**
|
|
245
|
-
* The external database's capabilities.
|
|
246
|
-
* @readonly
|
|
247
|
-
*/
|
|
248
|
-
capabilities?: Capabilities;
|
|
249
|
-
}
|
|
250
|
-
declare enum CauseOfFailure {
|
|
251
|
-
/** No connection failure. */
|
|
252
|
-
NONE = "NONE",
|
|
253
|
-
/** General communication failure. */
|
|
254
|
-
COMMUNICATION_FAILURE = "COMMUNICATION_FAILURE",
|
|
255
|
-
/** External database host is unreachable. */
|
|
256
|
-
DESTINATION_HOST_UNREACHABLE = "DESTINATION_HOST_UNREACHABLE",
|
|
257
|
-
/** Unauthorized to access the external database. */
|
|
258
|
-
UNAUTHORIZED = "UNAUTHORIZED",
|
|
259
|
-
/** `endpoint` is not set. */
|
|
260
|
-
DESTINATION_ENDPOINT_NOT_DEFINED = "DESTINATION_ENDPOINT_NOT_DEFINED"
|
|
261
|
-
}
|
|
262
|
-
declare enum CollectionsFound {
|
|
263
|
-
UNKNOWN = "UNKNOWN",
|
|
264
|
-
YES = "YES",
|
|
265
|
-
NO = "NO"
|
|
266
|
-
}
|
|
267
|
-
declare enum FieldType {
|
|
268
|
-
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
269
|
-
TEXT = "TEXT",
|
|
270
|
-
NUMBER = "NUMBER",
|
|
271
|
-
DATE = "DATE",
|
|
272
|
-
DATETIME = "DATETIME",
|
|
273
|
-
IMAGE = "IMAGE",
|
|
274
|
-
BOOLEAN = "BOOLEAN",
|
|
275
|
-
DOCUMENT = "DOCUMENT",
|
|
276
|
-
URL = "URL",
|
|
277
|
-
RICH_TEXT = "RICH_TEXT",
|
|
278
|
-
VIDEO = "VIDEO",
|
|
279
|
-
ANY = "ANY",
|
|
280
|
-
ARRAY_STRING = "ARRAY_STRING",
|
|
281
|
-
ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
|
|
282
|
-
AUDIO = "AUDIO",
|
|
283
|
-
TIME = "TIME",
|
|
284
|
-
LANGUAGE = "LANGUAGE",
|
|
285
|
-
RICH_CONTENT = "RICH_CONTENT",
|
|
286
|
-
MEDIA_GALLERY = "MEDIA_GALLERY",
|
|
287
|
-
ADDRESS = "ADDRESS",
|
|
288
|
-
PAGE_LINK = "PAGE_LINK",
|
|
289
|
-
REFERENCE = "REFERENCE",
|
|
290
|
-
MULTI_REFERENCE = "MULTI_REFERENCE",
|
|
291
|
-
OBJECT = "OBJECT",
|
|
292
|
-
ARRAY = "ARRAY",
|
|
293
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
294
|
-
LEGACY_TIME = "LEGACY_TIME",
|
|
295
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
296
|
-
LEGACY_BOOK = "LEGACY_BOOK",
|
|
297
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
298
|
-
LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL",
|
|
299
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
300
|
-
LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE",
|
|
301
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
302
|
-
LEGACY_IMAGE = "LEGACY_IMAGE",
|
|
303
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
304
|
-
LEGACY_COLOR = "LEGACY_COLOR",
|
|
305
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
306
|
-
LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
|
|
307
|
-
}
|
|
308
|
-
interface ConnectionStatus {
|
|
309
|
-
/** Whether the connection was established successfully. */
|
|
310
|
-
successful?: boolean;
|
|
311
|
-
/**
|
|
312
|
-
* If and why a connection attempt failed.
|
|
313
|
-
* + `NONE`: No connection failure.
|
|
314
|
-
* + `COMMUNICATION_FAILURE`: General communication failure.
|
|
315
|
-
* + `DESTINATION_HOST_UNREACHABLE`: External database host is unreachable.
|
|
316
|
-
* + `UNAUTHORIZED`: Unauthorized to access external database.
|
|
317
|
-
* + `DESTINATION_ENDPOINT_NOT_DEFINED`: `Endpoint` property is not set.
|
|
318
|
-
*/
|
|
319
|
-
causeOfFailure?: CauseOfFailure;
|
|
320
|
-
/**
|
|
321
|
-
* Whether the external database has existing collections. Possible values are:
|
|
322
|
-
* + `UNKNOWN`: The attempt to connect to the external database failed, so status is unknown.
|
|
323
|
-
* + `NO`: External database does not have any existing collections.
|
|
324
|
-
* + `YES`: External database has existing collections.
|
|
325
|
-
* @readonly
|
|
326
|
-
*/
|
|
327
|
-
hasCollections?: CollectionsFound;
|
|
328
|
-
}
|
|
329
|
-
declare enum ProtocolVersion {
|
|
330
|
-
UNKNOWN_PROTOCOL_VERSION = "UNKNOWN_PROTOCOL_VERSION",
|
|
331
|
-
V1 = "V1",
|
|
332
|
-
V2 = "V2",
|
|
333
|
-
V3 = "V3"
|
|
334
|
-
}
|
|
335
|
-
interface Capabilities {
|
|
336
|
-
/** Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them. */
|
|
337
|
-
collectionModificationsSupported?: boolean;
|
|
338
|
-
/**
|
|
339
|
-
* Field types the external database supports.
|
|
340
|
-
* This field only applies when `collectionModificationsSupported` is `true`.
|
|
341
|
-
*/
|
|
342
|
-
fieldTypes?: FieldType[];
|
|
343
|
-
}
|
|
344
|
-
interface GetExternalDatabaseConnectionRequest {
|
|
345
|
-
/** Name of the external database connection to retrieve. */
|
|
346
|
-
name: string;
|
|
347
|
-
}
|
|
348
|
-
interface GetExternalDatabaseConnectionResponse {
|
|
349
|
-
/** Details of the external database connection requested. */
|
|
350
|
-
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
351
|
-
}
|
|
352
|
-
interface ListExternalDatabaseConnectionsRequest {
|
|
353
|
-
/** Paging */
|
|
354
|
-
paging?: Paging$6;
|
|
355
|
-
}
|
|
356
|
-
interface Paging$6 {
|
|
357
|
-
/** Number of items to load. */
|
|
358
|
-
limit?: number | null;
|
|
359
|
-
/** Number of items to skip in the current sort order. */
|
|
360
|
-
offset?: number | null;
|
|
361
|
-
}
|
|
362
|
-
interface ListExternalDatabaseConnectionsResponse {
|
|
363
|
-
/** List of external database connections. */
|
|
364
|
-
externalDatabaseConnections?: ExternalDatabaseConnection[];
|
|
365
|
-
/** Paging metadata */
|
|
366
|
-
pagingMetadata?: PagingMetadata$2;
|
|
367
|
-
}
|
|
368
|
-
interface PagingMetadata$2 {
|
|
369
|
-
/** Number of items returned in the response. */
|
|
370
|
-
count?: number | null;
|
|
371
|
-
/** Offset that was requested. */
|
|
372
|
-
offset?: number | null;
|
|
373
|
-
/** Total number of items that match the query. */
|
|
374
|
-
total?: number | null;
|
|
375
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
376
|
-
tooManyToCount?: boolean | null;
|
|
377
|
-
}
|
|
378
|
-
interface CreateExternalDatabaseConnectionRequest {
|
|
379
|
-
/** External database connection details. */
|
|
380
|
-
externalDatabaseConnection: ExternalDatabaseConnection;
|
|
381
|
-
/** Connection type. */
|
|
382
|
-
connectionType: ConnectionType;
|
|
383
|
-
}
|
|
384
|
-
declare enum ConnectionType {
|
|
385
|
-
/** Unknown connection type. */
|
|
386
|
-
UNKNOWN_CONNECTION_TYPE = "UNKNOWN_CONNECTION_TYPE",
|
|
387
|
-
/**
|
|
388
|
-
* Connection to database adapter that implements legacy External Database Collections SPI (protocol version 1 or 2)
|
|
389
|
-
* https://www.wix.com/velo/reference/spis/external-database-collections/introduction
|
|
390
|
-
*/
|
|
391
|
-
STANDALONE = "STANDALONE",
|
|
392
|
-
/**
|
|
393
|
-
* Connection to database adapter that implements External Database SPI (protocol version 3)
|
|
394
|
-
* https://dev.wix.com/docs/rest/internal-only/wix-data/external-database-spi/introduction
|
|
395
|
-
* https://dev.wix.com/docs/rest/articles/getting-started/service-provider-interface
|
|
396
|
-
*/
|
|
397
|
-
WIX_SPI = "WIX_SPI"
|
|
398
|
-
}
|
|
399
|
-
interface CreateExternalDatabaseConnectionResponse {
|
|
400
|
-
/** Details of external database connection created. */
|
|
401
|
-
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
402
|
-
}
|
|
403
|
-
interface UpdateExternalDatabaseConnectionRequest {
|
|
404
|
-
/** Updated external database connection details. The existing connection is replaced with this version. */
|
|
405
|
-
externalDatabaseConnection: ExternalDatabaseConnection;
|
|
406
|
-
}
|
|
407
|
-
interface UpdateExternalDatabaseConnectionResponse {
|
|
408
|
-
/** Updated external database connection details. */
|
|
409
|
-
externalDatabaseConnection?: ExternalDatabaseConnection;
|
|
410
|
-
}
|
|
411
|
-
interface DeleteExternalDatabaseConnectionRequest {
|
|
412
|
-
/** Name of the external database connection to delete. */
|
|
413
|
-
name: string;
|
|
414
|
-
}
|
|
415
|
-
interface DeleteExternalDatabaseConnectionResponse {
|
|
416
|
-
}
|
|
417
|
-
interface ConnectionStatusNonNullableFields {
|
|
418
|
-
successful: boolean;
|
|
419
|
-
causeOfFailure: CauseOfFailure;
|
|
420
|
-
hasCollections: CollectionsFound;
|
|
421
|
-
}
|
|
422
|
-
interface CapabilitiesNonNullableFields {
|
|
423
|
-
collectionModificationsSupported: boolean;
|
|
424
|
-
fieldTypes: FieldType[];
|
|
425
|
-
}
|
|
426
|
-
interface ExternalDatabaseConnectionNonNullableFields {
|
|
427
|
-
name: string;
|
|
428
|
-
connectionStatus?: ConnectionStatusNonNullableFields;
|
|
429
|
-
protocolVersion: ProtocolVersion;
|
|
430
|
-
capabilities?: CapabilitiesNonNullableFields;
|
|
431
|
-
}
|
|
432
|
-
interface GetExternalDatabaseConnectionResponseNonNullableFields {
|
|
433
|
-
externalDatabaseConnection?: ExternalDatabaseConnectionNonNullableFields;
|
|
434
|
-
}
|
|
435
|
-
interface ListExternalDatabaseConnectionsResponseNonNullableFields {
|
|
436
|
-
externalDatabaseConnections: ExternalDatabaseConnectionNonNullableFields[];
|
|
437
|
-
}
|
|
438
|
-
interface CreateExternalDatabaseConnectionResponseNonNullableFields {
|
|
439
|
-
externalDatabaseConnection?: ExternalDatabaseConnectionNonNullableFields;
|
|
440
|
-
}
|
|
441
|
-
interface UpdateExternalDatabaseConnectionResponseNonNullableFields {
|
|
442
|
-
externalDatabaseConnection?: ExternalDatabaseConnectionNonNullableFields;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
type __PublicMethodMetaInfo$3<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
446
|
-
getUrl: (context: any) => string;
|
|
447
|
-
httpMethod: K;
|
|
448
|
-
path: string;
|
|
449
|
-
pathParams: M;
|
|
450
|
-
__requestType: T;
|
|
451
|
-
__originalRequestType: S;
|
|
452
|
-
__responseType: Q;
|
|
453
|
-
__originalResponseType: R;
|
|
454
|
-
};
|
|
455
|
-
declare function getExternalDatabaseConnection(): __PublicMethodMetaInfo$3<'GET', {
|
|
456
|
-
name: string;
|
|
457
|
-
}, GetExternalDatabaseConnectionRequest, GetExternalDatabaseConnectionRequest$1, GetExternalDatabaseConnectionResponse & GetExternalDatabaseConnectionResponseNonNullableFields, GetExternalDatabaseConnectionResponse$1 & GetExternalDatabaseConnectionResponseNonNullableFields$1>;
|
|
458
|
-
declare function listExternalDatabaseConnections(): __PublicMethodMetaInfo$3<'GET', {}, ListExternalDatabaseConnectionsRequest, ListExternalDatabaseConnectionsRequest$1, ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields, ListExternalDatabaseConnectionsResponse$1 & ListExternalDatabaseConnectionsResponseNonNullableFields$1>;
|
|
459
|
-
declare function createExternalDatabaseConnection(): __PublicMethodMetaInfo$3<'POST', {}, CreateExternalDatabaseConnectionRequest, CreateExternalDatabaseConnectionRequest$1, CreateExternalDatabaseConnectionResponse & CreateExternalDatabaseConnectionResponseNonNullableFields, CreateExternalDatabaseConnectionResponse$1 & CreateExternalDatabaseConnectionResponseNonNullableFields$1>;
|
|
460
|
-
declare function updateExternalDatabaseConnection(): __PublicMethodMetaInfo$3<'PUT', {
|
|
461
|
-
externalDatabaseConnectionName: string;
|
|
462
|
-
}, UpdateExternalDatabaseConnectionRequest, UpdateExternalDatabaseConnectionRequest$1, UpdateExternalDatabaseConnectionResponse & UpdateExternalDatabaseConnectionResponseNonNullableFields, UpdateExternalDatabaseConnectionResponse$1 & UpdateExternalDatabaseConnectionResponseNonNullableFields$1>;
|
|
463
|
-
declare function deleteExternalDatabaseConnection(): __PublicMethodMetaInfo$3<'DELETE', {
|
|
464
|
-
name: string;
|
|
465
|
-
}, DeleteExternalDatabaseConnectionRequest, DeleteExternalDatabaseConnectionRequest$1, DeleteExternalDatabaseConnectionResponse, DeleteExternalDatabaseConnectionResponse$1>;
|
|
466
|
-
|
|
467
|
-
declare const meta$3_createExternalDatabaseConnection: typeof createExternalDatabaseConnection;
|
|
468
|
-
declare const meta$3_deleteExternalDatabaseConnection: typeof deleteExternalDatabaseConnection;
|
|
469
|
-
declare const meta$3_getExternalDatabaseConnection: typeof getExternalDatabaseConnection;
|
|
470
|
-
declare const meta$3_listExternalDatabaseConnections: typeof listExternalDatabaseConnections;
|
|
471
|
-
declare const meta$3_updateExternalDatabaseConnection: typeof updateExternalDatabaseConnection;
|
|
472
|
-
declare namespace meta$3 {
|
|
473
|
-
export { type __PublicMethodMetaInfo$3 as __PublicMethodMetaInfo, meta$3_createExternalDatabaseConnection as createExternalDatabaseConnection, meta$3_deleteExternalDatabaseConnection as deleteExternalDatabaseConnection, meta$3_getExternalDatabaseConnection as getExternalDatabaseConnection, meta$3_listExternalDatabaseConnections as listExternalDatabaseConnections, meta$3_updateExternalDatabaseConnection as updateExternalDatabaseConnection };
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
/** A data collection determines the structure of data to be stored in a database. */
|
|
477
|
-
interface DataCollection$1 {
|
|
478
|
-
/** Collection ID. For example, `my-first-collection`. May include a namespace. */
|
|
479
|
-
id?: string;
|
|
480
|
-
/**
|
|
481
|
-
* Collection type. Indicates how the collection was created and how it is stored.
|
|
482
|
-
* @readonly
|
|
483
|
-
*/
|
|
484
|
-
collectionType?: CollectionType$1;
|
|
485
|
-
/**
|
|
486
|
-
* ID of the app that defined this collection. For collections defined by Wix users, this value is null.
|
|
487
|
-
* @readonly
|
|
488
|
-
*/
|
|
489
|
-
ownerAppId?: string | null;
|
|
490
|
-
/**
|
|
491
|
-
* Maximum number of items returned in a single query, based on the underlying storage.
|
|
492
|
-
* Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
|
|
493
|
-
* External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
|
|
494
|
-
* @readonly
|
|
495
|
-
*/
|
|
496
|
-
maxPageSize?: number | null;
|
|
497
|
-
/** Collection's display name as shown in the CMS. For example, `My First Collection`. */
|
|
498
|
-
displayName?: string | null;
|
|
499
|
-
/**
|
|
500
|
-
* Default item sorting order when a query doesn't specify one.
|
|
501
|
-
* @readonly
|
|
502
|
-
*/
|
|
503
|
-
defaultDisplayOrder?: Sort$1;
|
|
504
|
-
/**
|
|
505
|
-
* UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
|
|
506
|
-
* Empty for all data collections not owned by Wix apps.
|
|
507
|
-
* @readonly
|
|
508
|
-
*/
|
|
509
|
-
displayNamespace?: string | null;
|
|
510
|
-
/** Field whose value the CMS displays to represent the collection item when referenced in a different collection. */
|
|
511
|
-
displayField?: string | null;
|
|
512
|
-
/**
|
|
513
|
-
* Capabilities the collection supports.
|
|
514
|
-
* @readonly
|
|
515
|
-
*/
|
|
516
|
-
capabilities?: CollectionCapabilities$1;
|
|
517
|
-
/** Collection's field structure. */
|
|
518
|
-
fields?: Field$3[];
|
|
519
|
-
/** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
|
|
520
|
-
permissions?: Permissions$1;
|
|
521
|
-
/**
|
|
522
|
-
* Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must specify the latest revision number.
|
|
523
|
-
* @readonly
|
|
524
|
-
*/
|
|
525
|
-
revision?: string | null;
|
|
526
|
-
/** Plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality. */
|
|
527
|
-
plugins?: Plugin$1[];
|
|
528
|
-
/**
|
|
529
|
-
* Paging modes the collection supports. In native collections, offset-based paging is supported by default.
|
|
530
|
-
* @readonly
|
|
531
|
-
*/
|
|
532
|
-
pagingModes?: PagingMode$1[];
|
|
533
|
-
/**
|
|
534
|
-
* Date the collection was created.
|
|
535
|
-
* @readonly
|
|
536
|
-
*/
|
|
537
|
-
createdDate?: Date | null;
|
|
538
|
-
/**
|
|
539
|
-
* Date the collection was last updated.
|
|
540
|
-
* @readonly
|
|
541
|
-
*/
|
|
542
|
-
updatedDate?: Date | null;
|
|
543
|
-
}
|
|
544
|
-
declare enum CollectionType$1 {
|
|
545
|
-
/** User-created collection. */
|
|
546
|
-
NATIVE = "NATIVE",
|
|
547
|
-
/** [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app when it is installed. This type of collection can be modified dynamically by that app (for example, Wix Forms). */
|
|
548
|
-
WIX_APP = "WIX_APP",
|
|
549
|
-
/** Collection created by a Wix Blocks app. */
|
|
550
|
-
BLOCKS_APP = "BLOCKS_APP",
|
|
551
|
-
/** Collection located in externally connected storage. */
|
|
552
|
-
EXTERNAL = "EXTERNAL"
|
|
553
|
-
}
|
|
554
|
-
interface Sort$1 {
|
|
555
|
-
/** Field to sort by. */
|
|
556
|
-
fieldKey?: string;
|
|
557
|
-
/**
|
|
558
|
-
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
559
|
-
*
|
|
560
|
-
* Default: `ASC`
|
|
561
|
-
*/
|
|
562
|
-
direction?: Direction$1;
|
|
563
|
-
}
|
|
564
|
-
declare enum Direction$1 {
|
|
565
|
-
ASC = "ASC",
|
|
566
|
-
DESC = "DESC"
|
|
567
|
-
}
|
|
568
|
-
interface CollectionCapabilities$1 {
|
|
569
|
-
/**
|
|
570
|
-
* Data operations the collection supports. The listed operations can be performed on data the collection contains.
|
|
571
|
-
*
|
|
572
|
-
* > **Note**: The `PATCH` and `BULK_PATCH` oeprations aren't currently supported.
|
|
573
|
-
*/
|
|
574
|
-
dataOperations?: DataOperation$1[];
|
|
575
|
-
/** Collection operations supported. The listed operations can be performed on the collection itself. */
|
|
576
|
-
collectionOperations?: CollectionOperation$1[];
|
|
577
|
-
/** Maximum number of indexes for the collection. */
|
|
578
|
-
indexLimits?: IndexLimits$1;
|
|
579
|
-
}
|
|
580
|
-
declare enum DataOperation$1 {
|
|
581
|
-
AGGREGATE = "AGGREGATE",
|
|
582
|
-
BULK_INSERT = "BULK_INSERT",
|
|
583
|
-
BULK_REMOVE = "BULK_REMOVE",
|
|
584
|
-
BULK_SAVE = "BULK_SAVE",
|
|
585
|
-
BULK_UPDATE = "BULK_UPDATE",
|
|
586
|
-
COUNT = "COUNT",
|
|
587
|
-
DISTINCT = "DISTINCT",
|
|
588
|
-
FIND = "FIND",
|
|
589
|
-
GET = "GET",
|
|
590
|
-
INSERT = "INSERT",
|
|
591
|
-
INSERT_REFERENCE = "INSERT_REFERENCE",
|
|
592
|
-
IS_REFERENCED = "IS_REFERENCED",
|
|
593
|
-
QUERY_REFERENCED = "QUERY_REFERENCED",
|
|
594
|
-
REMOVE = "REMOVE",
|
|
595
|
-
REMOVE_REFERENCE = "REMOVE_REFERENCE",
|
|
596
|
-
REPLACE_REFERENCES = "REPLACE_REFERENCES",
|
|
597
|
-
SAVE = "SAVE",
|
|
598
|
-
TRUNCATE = "TRUNCATE",
|
|
599
|
-
UPDATE = "UPDATE",
|
|
600
|
-
PATCH = "PATCH",
|
|
601
|
-
BULK_PATCH = "BULK_PATCH"
|
|
602
|
-
}
|
|
603
|
-
declare enum CollectionOperation$1 {
|
|
604
|
-
/** Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed. */
|
|
605
|
-
UPDATE = "UPDATE",
|
|
606
|
-
/** Allows deleting the entire collection. If not included, the collection can't be deleted. */
|
|
607
|
-
REMOVE = "REMOVE"
|
|
608
|
-
}
|
|
609
|
-
interface IndexLimits$1 {
|
|
610
|
-
/** Maximum number of regular (non-unique) indexes allowed for this collection. */
|
|
611
|
-
regular?: number;
|
|
612
|
-
/** Maximum number of unique indexes allowed for this collection. */
|
|
613
|
-
unique?: number;
|
|
614
|
-
/** Maximum number of regular and unique indexes allowed for this collection. */
|
|
615
|
-
total?: number;
|
|
616
|
-
}
|
|
617
|
-
interface Field$3 extends FieldRangeValidationsOneOf$1 {
|
|
618
|
-
/** Range of possible values for a numerical field. */
|
|
619
|
-
numberRange?: NumberRange$1;
|
|
620
|
-
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
621
|
-
stringLengthRange?: StringLengthRange$1;
|
|
622
|
-
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
623
|
-
arraySizeRange?: ArraySizeRange$1;
|
|
624
|
-
/** Unique identifier for the field. For example, `firstName`. */
|
|
625
|
-
key?: string;
|
|
626
|
-
/** Field's display name when displayed in the CMS. For example, `First Name`. */
|
|
627
|
-
displayName?: string | null;
|
|
628
|
-
/** Field's data type. */
|
|
629
|
-
type?: Type$1;
|
|
630
|
-
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
631
|
-
typeMetadata?: TypeMetadata$1;
|
|
632
|
-
/**
|
|
633
|
-
* Whether the field is a system field.
|
|
634
|
-
* @readonly
|
|
635
|
-
*/
|
|
636
|
-
systemField?: boolean;
|
|
637
|
-
/**
|
|
638
|
-
* Capabilities the field supports.
|
|
639
|
-
* @readonly
|
|
640
|
-
*/
|
|
641
|
-
capabilities?: FieldCapabilities$1;
|
|
642
|
-
/** Whether the field is encrypted. */
|
|
643
|
-
encrypted?: boolean;
|
|
644
|
-
/** Field description. */
|
|
645
|
-
description?: string | null;
|
|
646
|
-
/**
|
|
647
|
-
* Whether the field is read-only. A read-only field can't be changed.
|
|
648
|
-
*
|
|
649
|
-
* Default: `false`
|
|
650
|
-
*/
|
|
651
|
-
readOnly?: boolean | null;
|
|
652
|
-
/**
|
|
653
|
-
* Whether the field is immutable. An immutable field can be set once, but then cannot be updated.
|
|
654
|
-
*
|
|
655
|
-
* Default: `false`
|
|
656
|
-
*/
|
|
657
|
-
immutable?: boolean | null;
|
|
658
|
-
/**
|
|
659
|
-
* Whether the field is required.
|
|
660
|
-
*
|
|
661
|
-
* Default: `false`
|
|
662
|
-
*/
|
|
663
|
-
required?: boolean | null;
|
|
664
|
-
/** Additional optional plugins for the field. */
|
|
665
|
-
plugins?: FieldPlugin$1[];
|
|
666
|
-
}
|
|
667
|
-
/** @oneof */
|
|
668
|
-
interface FieldRangeValidationsOneOf$1 {
|
|
669
|
-
/** Range of possible values for a numerical field. */
|
|
670
|
-
numberRange?: NumberRange$1;
|
|
671
|
-
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
672
|
-
stringLengthRange?: StringLengthRange$1;
|
|
673
|
-
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
674
|
-
arraySizeRange?: ArraySizeRange$1;
|
|
675
|
-
}
|
|
676
|
-
declare enum Type$1 {
|
|
677
|
-
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
678
|
-
TEXT = "TEXT",
|
|
679
|
-
NUMBER = "NUMBER",
|
|
680
|
-
DATE = "DATE",
|
|
681
|
-
DATETIME = "DATETIME",
|
|
682
|
-
IMAGE = "IMAGE",
|
|
683
|
-
BOOLEAN = "BOOLEAN",
|
|
684
|
-
DOCUMENT = "DOCUMENT",
|
|
685
|
-
URL = "URL",
|
|
686
|
-
RICH_TEXT = "RICH_TEXT",
|
|
687
|
-
VIDEO = "VIDEO",
|
|
688
|
-
ANY = "ANY",
|
|
689
|
-
ARRAY_STRING = "ARRAY_STRING",
|
|
690
|
-
ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
|
|
691
|
-
AUDIO = "AUDIO",
|
|
692
|
-
TIME = "TIME",
|
|
693
|
-
LANGUAGE = "LANGUAGE",
|
|
694
|
-
RICH_CONTENT = "RICH_CONTENT",
|
|
695
|
-
MEDIA_GALLERY = "MEDIA_GALLERY",
|
|
696
|
-
ADDRESS = "ADDRESS",
|
|
697
|
-
PAGE_LINK = "PAGE_LINK",
|
|
698
|
-
REFERENCE = "REFERENCE",
|
|
699
|
-
MULTI_REFERENCE = "MULTI_REFERENCE",
|
|
700
|
-
OBJECT = "OBJECT",
|
|
701
|
-
ARRAY = "ARRAY",
|
|
702
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
703
|
-
LEGACY_TIME = "LEGACY_TIME",
|
|
704
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
705
|
-
LEGACY_BOOK = "LEGACY_BOOK",
|
|
706
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
707
|
-
LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL",
|
|
708
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
709
|
-
LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE",
|
|
710
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
711
|
-
LEGACY_IMAGE = "LEGACY_IMAGE",
|
|
712
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
713
|
-
LEGACY_COLOR = "LEGACY_COLOR",
|
|
714
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
715
|
-
LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
|
|
716
|
-
}
|
|
717
|
-
interface TypeMetadata$1 extends TypeMetadataMetadataOneOf$1 {
|
|
718
|
-
/** Metadata for a reference field. */
|
|
719
|
-
reference?: Reference$1;
|
|
720
|
-
/** Metadata for a multi-reference field. */
|
|
721
|
-
multiReference?: MultiReference$1;
|
|
722
|
-
/** Metadata for an object field. */
|
|
723
|
-
object?: _Object$1;
|
|
724
|
-
/** Metadata for an array field. */
|
|
725
|
-
array?: _Array$1;
|
|
726
|
-
/** Metadata for a page link field. */
|
|
727
|
-
pageLink?: PageLink$1;
|
|
728
|
-
}
|
|
729
|
-
/** @oneof */
|
|
730
|
-
interface TypeMetadataMetadataOneOf$1 {
|
|
731
|
-
/** Metadata for a reference field. */
|
|
732
|
-
reference?: Reference$1;
|
|
733
|
-
/** Metadata for a multi-reference field. */
|
|
734
|
-
multiReference?: MultiReference$1;
|
|
735
|
-
/** Metadata for an object field. */
|
|
736
|
-
object?: _Object$1;
|
|
737
|
-
/** Metadata for an array field. */
|
|
738
|
-
array?: _Array$1;
|
|
739
|
-
/** Metadata for a page link field. */
|
|
740
|
-
pageLink?: PageLink$1;
|
|
741
|
-
}
|
|
742
|
-
interface FieldCapabilities$1 {
|
|
743
|
-
/**
|
|
744
|
-
* Whether the collection can be sorted by this field.
|
|
745
|
-
*
|
|
746
|
-
* Default: `false`
|
|
747
|
-
*/
|
|
748
|
-
sortable?: boolean;
|
|
749
|
-
/** Query operators that can be used for this field. */
|
|
750
|
-
queryOperators?: QueryOperator$1[];
|
|
751
|
-
}
|
|
752
|
-
declare enum QueryOperator$1 {
|
|
753
|
-
EQ = "EQ",
|
|
754
|
-
LT = "LT",
|
|
755
|
-
GT = "GT",
|
|
756
|
-
NE = "NE",
|
|
757
|
-
LTE = "LTE",
|
|
758
|
-
GTE = "GTE",
|
|
759
|
-
STARTS_WITH = "STARTS_WITH",
|
|
760
|
-
ENDS_WITH = "ENDS_WITH",
|
|
761
|
-
CONTAINS = "CONTAINS",
|
|
762
|
-
HAS_SOME = "HAS_SOME",
|
|
763
|
-
HAS_ALL = "HAS_ALL",
|
|
764
|
-
EXISTS = "EXISTS",
|
|
765
|
-
URLIZED = "URLIZED"
|
|
766
|
-
}
|
|
767
|
-
interface ObjectField$1 {
|
|
768
|
-
/** Field ID. */
|
|
769
|
-
key?: string;
|
|
770
|
-
/** Display name for the field. */
|
|
771
|
-
displayName?: string | null;
|
|
772
|
-
/** Field type. */
|
|
773
|
-
type?: Type$1;
|
|
774
|
-
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
775
|
-
typeMetadata?: TypeMetadata$1;
|
|
776
|
-
/**
|
|
777
|
-
* Capabilities the object field supports.
|
|
778
|
-
* @readonly
|
|
779
|
-
*/
|
|
780
|
-
capabilities?: FieldCapabilities$1;
|
|
781
|
-
}
|
|
782
|
-
interface FieldsPattern$1 {
|
|
783
|
-
pattern?: string;
|
|
784
|
-
lowercase?: boolean;
|
|
785
|
-
}
|
|
786
|
-
interface UrlizedOnlyPattern$1 {
|
|
787
|
-
pattern?: string;
|
|
788
|
-
}
|
|
789
|
-
interface Calculator$1 extends CalculatorPatternOneOf$1 {
|
|
790
|
-
/** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
|
|
791
|
-
fieldsPattern?: FieldsPattern$1;
|
|
792
|
-
/** Value is only URL encoded. */
|
|
793
|
-
urlizedOnlyPattern?: UrlizedOnlyPattern$1;
|
|
794
|
-
}
|
|
795
|
-
/** @oneof */
|
|
796
|
-
interface CalculatorPatternOneOf$1 {
|
|
797
|
-
/** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
|
|
798
|
-
fieldsPattern?: FieldsPattern$1;
|
|
799
|
-
/** Value is only URL encoded. */
|
|
800
|
-
urlizedOnlyPattern?: UrlizedOnlyPattern$1;
|
|
801
|
-
}
|
|
802
|
-
interface Reference$1 {
|
|
803
|
-
/** Referenced collection ID. */
|
|
804
|
-
referencedCollectionId?: string;
|
|
805
|
-
}
|
|
806
|
-
interface MultiReference$1 {
|
|
807
|
-
/** Referenced collection ID. */
|
|
808
|
-
referencedCollectionId?: string;
|
|
809
|
-
/** Referencing field ID. */
|
|
810
|
-
referencingFieldKey?: string;
|
|
811
|
-
/** Display name in the CMS for the referenced data. */
|
|
812
|
-
referencingDisplayName?: string;
|
|
813
|
-
}
|
|
814
|
-
interface _Object$1 {
|
|
815
|
-
/** Fields within the object. */
|
|
816
|
-
fields?: ObjectField$1[];
|
|
817
|
-
}
|
|
818
|
-
interface _Array$1 {
|
|
819
|
-
/** Element's data type. */
|
|
820
|
-
elementType?: Type$1;
|
|
821
|
-
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
822
|
-
typeMetadata?: TypeMetadata$1;
|
|
823
|
-
}
|
|
824
|
-
interface PageLink$1 {
|
|
825
|
-
calculator?: Calculator$1;
|
|
826
|
-
/** Defines reference to router pattern in the site document. */
|
|
827
|
-
linkedRouterPage?: string | null;
|
|
828
|
-
}
|
|
829
|
-
interface NumberRange$1 {
|
|
830
|
-
/**
|
|
831
|
-
* Minimum permitted value for a numerical field.
|
|
832
|
-
*
|
|
833
|
-
* Default: No validation
|
|
834
|
-
*/
|
|
835
|
-
min?: number | null;
|
|
836
|
-
/**
|
|
837
|
-
* Maximum permitted value for a numerical field.
|
|
838
|
-
*
|
|
839
|
-
* Default: No validation
|
|
840
|
-
*/
|
|
841
|
-
max?: number | null;
|
|
842
|
-
}
|
|
843
|
-
interface StringLengthRange$1 {
|
|
844
|
-
/**
|
|
845
|
-
* Minimum permitted length for a text field.
|
|
846
|
-
*
|
|
847
|
-
* Default: No validation
|
|
848
|
-
*/
|
|
849
|
-
minLength?: number | null;
|
|
850
|
-
/**
|
|
851
|
-
* Maximum permitted length for a text field.
|
|
852
|
-
*
|
|
853
|
-
* Default: No validation
|
|
854
|
-
*/
|
|
855
|
-
maxLength?: number | null;
|
|
856
|
-
}
|
|
857
|
-
interface ArraySizeRange$1 {
|
|
858
|
-
/**
|
|
859
|
-
* Minimum permitted number of items in an array field. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`.
|
|
860
|
-
*
|
|
861
|
-
* Default: No validation
|
|
862
|
-
*/
|
|
863
|
-
minSize?: number | null;
|
|
864
|
-
/**
|
|
865
|
-
* Maximum permitted number of items in an array field. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`.
|
|
866
|
-
*
|
|
867
|
-
* Default: No validation
|
|
868
|
-
*/
|
|
869
|
-
maxSize?: number | null;
|
|
870
|
-
}
|
|
871
|
-
/** Optional plug-in aspects for fields */
|
|
872
|
-
interface FieldPlugin$1 extends FieldPluginOptionsOneOf$1 {
|
|
873
|
-
/** Options for the CMS plugin. */
|
|
874
|
-
cmsOptions?: CmsOptions$1;
|
|
875
|
-
type?: FieldPluginType$1;
|
|
876
|
-
}
|
|
877
|
-
/** @oneof */
|
|
878
|
-
interface FieldPluginOptionsOneOf$1 {
|
|
879
|
-
/** Options for the CMS plugin. */
|
|
880
|
-
cmsOptions?: CmsOptions$1;
|
|
881
|
-
}
|
|
882
|
-
declare enum FieldPluginType$1 {
|
|
883
|
-
/** Uknown plugin type. */
|
|
884
|
-
UNKNOWN = "UNKNOWN",
|
|
885
|
-
/** CMS-related field attributes */
|
|
886
|
-
CMS = "CMS"
|
|
887
|
-
}
|
|
888
|
-
/** Options for the CMS plugin. */
|
|
889
|
-
interface CmsOptions$1 {
|
|
890
|
-
/**
|
|
891
|
-
* Indicates an internal CMS field. The CMS does not display internal fields.
|
|
892
|
-
*
|
|
893
|
-
* Default: `false`
|
|
894
|
-
*/
|
|
895
|
-
internal?: boolean;
|
|
896
|
-
}
|
|
897
|
-
/** Permissions defined by the lowest role needed to perform each action. */
|
|
898
|
-
interface Permissions$1 {
|
|
899
|
-
/** Lowest role needed to add a collection. */
|
|
900
|
-
insert?: Role$1;
|
|
901
|
-
/** Lowest role needed to update a collection. */
|
|
902
|
-
update?: Role$1;
|
|
903
|
-
/** Lowest role needed to remove a collection. */
|
|
904
|
-
remove?: Role$1;
|
|
905
|
-
/** Lowest role needed to read a collection. */
|
|
906
|
-
read?: Role$1;
|
|
907
|
-
}
|
|
908
|
-
declare enum Role$1 {
|
|
909
|
-
/** Unknown role. */
|
|
910
|
-
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
911
|
-
/** Site administrator. */
|
|
912
|
-
ADMIN = "ADMIN",
|
|
913
|
-
/** Signed-in user who added content to this collection. */
|
|
914
|
-
SITE_MEMBER_AUTHOR = "SITE_MEMBER_AUTHOR",
|
|
915
|
-
/** Any signed-in user. */
|
|
916
|
-
SITE_MEMBER = "SITE_MEMBER",
|
|
917
|
-
/** Any site visitor. */
|
|
918
|
-
ANYONE = "ANYONE"
|
|
919
|
-
}
|
|
920
|
-
interface Plugin$1 extends PluginOptionsOneOf$1 {
|
|
921
|
-
/**
|
|
922
|
-
* Options for the Publish plugin.
|
|
923
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
924
|
-
*/
|
|
925
|
-
publishOptions?: PublishPluginOptions$1;
|
|
926
|
-
/** Options for the Single Item plugin. */
|
|
927
|
-
singleItemOptions?: SingleItemPluginOptions$1;
|
|
928
|
-
/** Options for the Urlized plugin. */
|
|
929
|
-
urlizedOptions?: UrlizedPluginOptions$1;
|
|
930
|
-
/** Options for the Multilingual plugin. */
|
|
931
|
-
multilingualOptions?: MultilingualOptions$1;
|
|
932
|
-
/** Options for the PageLink plugin. */
|
|
933
|
-
editablePageLinkOptions?: PageLinkPluginOptions$1;
|
|
934
|
-
/** Options for the CMS plugin. */
|
|
935
|
-
cmsOptions?: PluginCmsOptions$1;
|
|
936
|
-
/** Plugin types. */
|
|
937
|
-
type?: PluginType$1;
|
|
938
|
-
}
|
|
939
|
-
/** @oneof */
|
|
940
|
-
interface PluginOptionsOneOf$1 {
|
|
941
|
-
/**
|
|
942
|
-
* Options for the Publish plugin.
|
|
943
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
944
|
-
*/
|
|
945
|
-
publishOptions?: PublishPluginOptions$1;
|
|
946
|
-
/** Options for the Single Item plugin. */
|
|
947
|
-
singleItemOptions?: SingleItemPluginOptions$1;
|
|
948
|
-
/** Options for the Urlized plugin. */
|
|
949
|
-
urlizedOptions?: UrlizedPluginOptions$1;
|
|
950
|
-
/** Options for the Multilingual plugin. */
|
|
951
|
-
multilingualOptions?: MultilingualOptions$1;
|
|
952
|
-
/** Options for the PageLink plugin. */
|
|
953
|
-
editablePageLinkOptions?: PageLinkPluginOptions$1;
|
|
954
|
-
/** Options for the CMS plugin. */
|
|
955
|
-
cmsOptions?: PluginCmsOptions$1;
|
|
956
|
-
}
|
|
957
|
-
declare enum Status$3 {
|
|
958
|
-
UNKNOWN_PUBLISH_PLUGIN_STATUS = "UNKNOWN_PUBLISH_PLUGIN_STATUS",
|
|
959
|
-
PUBLISHED = "PUBLISHED",
|
|
960
|
-
DRAFT = "DRAFT"
|
|
961
|
-
}
|
|
962
|
-
declare enum Format$1 {
|
|
963
|
-
UNKNOWN_URLIZED_PLUGIN_FORMAT = "UNKNOWN_URLIZED_PLUGIN_FORMAT",
|
|
964
|
-
/** Letters are converted to lower case and spaces are replaced with dashes before generating the encoded URL. */
|
|
965
|
-
ORIGINAL = "ORIGINAL",
|
|
966
|
-
/** No changes are made before generating the encoded URL. */
|
|
967
|
-
PLAIN = "PLAIN"
|
|
968
|
-
}
|
|
969
|
-
/** if CMS-defined sort is enabled and should be used in site */
|
|
970
|
-
interface SiteSort$1 {
|
|
971
|
-
/** Field and order for the site sort. */
|
|
972
|
-
sort?: Sort$1[];
|
|
973
|
-
}
|
|
974
|
-
declare enum PluginType$1 {
|
|
975
|
-
/** Unknown plugin type. */
|
|
976
|
-
UNKNOWN_PLUGIN_TYPE = "UNKNOWN_PLUGIN_TYPE",
|
|
977
|
-
/** Allows items to be marked as either draft or published. For each item you can set a publishing time when the item will become visible to site visitors. */
|
|
978
|
-
PUBLISH = "PUBLISH",
|
|
979
|
-
/** Ensures the collection can have one item at most. Can only be applied to a new collection. */
|
|
980
|
-
SINGLE_ITEM = "SINGLE_ITEM",
|
|
981
|
-
/** Generates item URLs for collections used by dynamic pages. */
|
|
982
|
-
URLIZED = "URLIZED",
|
|
983
|
-
/** Deprecated. Will be removed in the future. */
|
|
984
|
-
GRIDAPPLESS = "GRIDAPPLESS",
|
|
985
|
-
/** Indicates that the collection is translatable. This allows you to manage translation for selected fields using [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual). */
|
|
986
|
-
MULTILINGUAL = "MULTILINGUAL",
|
|
987
|
-
/** Indicates that collection is shared with current site. */
|
|
988
|
-
SHARED = "SHARED",
|
|
989
|
-
/** Indicates that page link fields are persisted and can be updated. */
|
|
990
|
-
EDITABLE_PAGE_LINK = "EDITABLE_PAGE_LINK",
|
|
991
|
-
/** CMS-specific collection properties. */
|
|
992
|
-
CMS = "CMS"
|
|
993
|
-
}
|
|
994
|
-
interface PublishPluginOptions$1 {
|
|
995
|
-
/** Default status. */
|
|
996
|
-
defaultStatus?: Status$3;
|
|
997
|
-
}
|
|
998
|
-
interface SingleItemPluginOptions$1 {
|
|
999
|
-
/** ID of the single item in this collection. If you insert or update an item, its ID value is always changed to this. */
|
|
1000
|
-
singleItemId?: string;
|
|
1001
|
-
}
|
|
1002
|
-
interface UrlizedPluginOptions$1 {
|
|
1003
|
-
/** Encoding method for generating a URL in ASCII characters. */
|
|
1004
|
-
format?: Format$1;
|
|
1005
|
-
}
|
|
1006
|
-
interface MultilingualOptions$1 {
|
|
1007
|
-
/** IDs of fields to allow translation. */
|
|
1008
|
-
translatableFieldKeys?: string[];
|
|
1009
|
-
}
|
|
1010
|
-
interface PageLinkPluginOptions$1 {
|
|
1011
|
-
isPersisted?: boolean;
|
|
1012
|
-
isMutable?: boolean;
|
|
1013
|
-
}
|
|
1014
|
-
interface PluginCmsOptions$1 {
|
|
1015
|
-
/** CMS sort, applied when a collection is displayed on a site. */
|
|
1016
|
-
siteSort?: SiteSort$1;
|
|
1017
|
-
}
|
|
1018
|
-
declare enum PagingMode$1 {
|
|
1019
|
-
/** Offset-based paging. */
|
|
1020
|
-
OFFSET = "OFFSET",
|
|
1021
|
-
/** Cursor-based paging. */
|
|
1022
|
-
CURSOR = "CURSOR"
|
|
1023
|
-
}
|
|
1024
|
-
/**
|
|
1025
|
-
* Describes who can perform certain action.
|
|
1026
|
-
* Each level includes all levels below it (except UNDEFINED).
|
|
1027
|
-
*/
|
|
1028
|
-
declare enum AccessLevel$1 {
|
|
1029
|
-
/** Not set. */
|
|
1030
|
-
UNDEFINED = "UNDEFINED",
|
|
1031
|
-
/** Any subject, including visitors. */
|
|
1032
|
-
ANYONE = "ANYONE",
|
|
1033
|
-
/** Any signed-in user (both site members and collaborators). */
|
|
1034
|
-
SITE_MEMBER = "SITE_MEMBER",
|
|
1035
|
-
/** Any signed-in user, but site members only have access to own items. */
|
|
1036
|
-
SITE_MEMBER_AUTHOR = "SITE_MEMBER_AUTHOR",
|
|
1037
|
-
/** Site collaborator that has a role with CMS Access permission. */
|
|
1038
|
-
CMS_EDITOR = "CMS_EDITOR",
|
|
1039
|
-
/** CMS administrators and users or roles granted with special access. */
|
|
1040
|
-
PRIVILEGED = "PRIVILEGED"
|
|
1041
|
-
}
|
|
1042
|
-
interface CreateDataCollectionRequest$1 {
|
|
1043
|
-
/** Collection details. */
|
|
1044
|
-
collection: DataCollection$1;
|
|
1045
|
-
}
|
|
1046
|
-
interface CreateDataCollectionResponse$1 {
|
|
1047
|
-
/** Details of collection created. */
|
|
1048
|
-
collection?: DataCollection$1;
|
|
1049
|
-
}
|
|
1050
|
-
interface GetDataCollectionRequest$1 {
|
|
1051
|
-
/** ID of the collection to retrieve. */
|
|
1052
|
-
dataCollectionId: string;
|
|
1053
|
-
/**
|
|
1054
|
-
* Whether to retrieve data from the primary database instance.
|
|
1055
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1056
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
1057
|
-
*
|
|
1058
|
-
* Default: `false`
|
|
1059
|
-
*/
|
|
1060
|
-
consistentRead?: boolean;
|
|
1061
|
-
/**
|
|
1062
|
-
* List of specific field names to return, if empty all fields are returned.
|
|
1063
|
-
* Affects all returned collections
|
|
1064
|
-
*/
|
|
1065
|
-
fields?: string[];
|
|
1066
|
-
}
|
|
1067
|
-
interface GetDataCollectionResponse$1 {
|
|
1068
|
-
/** Details of the collection requested. */
|
|
1069
|
-
collection?: DataCollection$1;
|
|
1070
|
-
/**
|
|
1071
|
-
* Details of collections referenced by the collection requested.
|
|
1072
|
-
* Only populated when `includeReferencedCollections` is `true` in the request.
|
|
1073
|
-
*/
|
|
1074
|
-
referencedCollections?: DataCollection$1[];
|
|
1075
|
-
}
|
|
1076
|
-
interface ListDataCollectionsRequest$1 {
|
|
1077
|
-
/**
|
|
1078
|
-
* Defines how collections in the response are sorted.
|
|
1079
|
-
*
|
|
1080
|
-
* Default: Ordered by ID in ascending order.
|
|
1081
|
-
*/
|
|
1082
|
-
sort?: Sorting$3;
|
|
1083
|
-
/** Pagination information. */
|
|
1084
|
-
paging?: Paging$5;
|
|
1085
|
-
/**
|
|
1086
|
-
* Whether to retrieve data from the primary database instance.
|
|
1087
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1088
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
1089
|
-
*
|
|
1090
|
-
* Default: `false`
|
|
1091
|
-
*/
|
|
1092
|
-
consistentRead?: boolean;
|
|
1093
|
-
/**
|
|
1094
|
-
* List of specific field names to return, if empty all fields are returned.
|
|
1095
|
-
* Affects all returned collections
|
|
1096
|
-
*/
|
|
1097
|
-
fields?: string[];
|
|
1098
|
-
}
|
|
1099
|
-
interface Sorting$3 {
|
|
1100
|
-
/** Name of the field to sort by. */
|
|
1101
|
-
fieldName?: string;
|
|
1102
|
-
/** Sort order. */
|
|
1103
|
-
order?: SortOrder$3;
|
|
1104
|
-
}
|
|
1105
|
-
declare enum SortOrder$3 {
|
|
1106
|
-
ASC = "ASC",
|
|
1107
|
-
DESC = "DESC"
|
|
1108
|
-
}
|
|
1109
|
-
interface Paging$5 {
|
|
1110
|
-
/** Number of items to load. */
|
|
1111
|
-
limit?: number | null;
|
|
1112
|
-
/** Number of items to skip in the current sort order. */
|
|
1113
|
-
offset?: number | null;
|
|
1114
|
-
}
|
|
1115
|
-
interface ListDataCollectionsResponse$1 {
|
|
1116
|
-
/** List of collections. */
|
|
1117
|
-
collections?: DataCollection$1[];
|
|
1118
|
-
/** Paging information. */
|
|
1119
|
-
pagingMetadata?: PagingMetadataV2$3;
|
|
1120
|
-
}
|
|
1121
|
-
interface PagingMetadataV2$3 {
|
|
1122
|
-
/** Number of items returned in the response. */
|
|
1123
|
-
count?: number | null;
|
|
1124
|
-
/** Offset that was requested. */
|
|
1125
|
-
offset?: number | null;
|
|
1126
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
1127
|
-
total?: number | null;
|
|
1128
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
1129
|
-
tooManyToCount?: boolean | null;
|
|
1130
|
-
}
|
|
1131
|
-
interface UpdateDataCollectionRequest$1 {
|
|
1132
|
-
/** Updated collection details. The existing collection is replaced with this version. */
|
|
1133
|
-
collection: DataCollection$1;
|
|
1134
|
-
}
|
|
1135
|
-
interface UpdateDataCollectionResponse$1 {
|
|
1136
|
-
/** Updated collection details. */
|
|
1137
|
-
collection?: DataCollection$1;
|
|
1138
|
-
}
|
|
1139
|
-
interface DeleteDataCollectionRequest$1 {
|
|
1140
|
-
/** ID of the collection to delete. */
|
|
1141
|
-
dataCollectionId: string;
|
|
1142
|
-
}
|
|
1143
|
-
interface DeleteDataCollectionResponse$1 {
|
|
1144
|
-
}
|
|
1145
|
-
interface SortNonNullableFields$1 {
|
|
1146
|
-
fieldKey: string;
|
|
1147
|
-
direction: Direction$1;
|
|
1148
|
-
}
|
|
1149
|
-
interface IndexLimitsNonNullableFields$1 {
|
|
1150
|
-
regular: number;
|
|
1151
|
-
unique: number;
|
|
1152
|
-
total: number;
|
|
1153
|
-
}
|
|
1154
|
-
interface CollectionCapabilitiesNonNullableFields$1 {
|
|
1155
|
-
dataOperations: DataOperation$1[];
|
|
1156
|
-
collectionOperations: CollectionOperation$1[];
|
|
1157
|
-
indexLimits?: IndexLimitsNonNullableFields$1;
|
|
1158
|
-
}
|
|
1159
|
-
interface ReferenceNonNullableFields$1 {
|
|
1160
|
-
referencedCollectionId: string;
|
|
1161
|
-
}
|
|
1162
|
-
interface MultiReferenceNonNullableFields$1 {
|
|
1163
|
-
referencedCollectionId: string;
|
|
1164
|
-
referencingFieldKey: string;
|
|
1165
|
-
referencingDisplayName: string;
|
|
1166
|
-
}
|
|
1167
|
-
interface FieldCapabilitiesNonNullableFields$1 {
|
|
1168
|
-
sortable: boolean;
|
|
1169
|
-
queryOperators: QueryOperator$1[];
|
|
1170
|
-
}
|
|
1171
|
-
interface ObjectFieldNonNullableFields$1 {
|
|
1172
|
-
key: string;
|
|
1173
|
-
type: Type$1;
|
|
1174
|
-
typeMetadata?: TypeMetadataNonNullableFields$1;
|
|
1175
|
-
capabilities?: FieldCapabilitiesNonNullableFields$1;
|
|
1176
|
-
}
|
|
1177
|
-
interface _ObjectNonNullableFields$1 {
|
|
1178
|
-
fields: ObjectFieldNonNullableFields$1[];
|
|
1179
|
-
}
|
|
1180
|
-
interface _ArrayNonNullableFields$1 {
|
|
1181
|
-
elementType: Type$1;
|
|
1182
|
-
typeMetadata?: TypeMetadataNonNullableFields$1;
|
|
1183
|
-
}
|
|
1184
|
-
interface FieldsPatternNonNullableFields$1 {
|
|
1185
|
-
pattern: string;
|
|
1186
|
-
lowercase: boolean;
|
|
1187
|
-
}
|
|
1188
|
-
interface UrlizedOnlyPatternNonNullableFields$1 {
|
|
1189
|
-
pattern: string;
|
|
1190
|
-
}
|
|
1191
|
-
interface CalculatorNonNullableFields$1 {
|
|
1192
|
-
fieldsPattern?: FieldsPatternNonNullableFields$1;
|
|
1193
|
-
urlizedOnlyPattern?: UrlizedOnlyPatternNonNullableFields$1;
|
|
1194
|
-
}
|
|
1195
|
-
interface PageLinkNonNullableFields$1 {
|
|
1196
|
-
calculator?: CalculatorNonNullableFields$1;
|
|
1197
|
-
}
|
|
1198
|
-
interface TypeMetadataNonNullableFields$1 {
|
|
1199
|
-
reference?: ReferenceNonNullableFields$1;
|
|
1200
|
-
multiReference?: MultiReferenceNonNullableFields$1;
|
|
1201
|
-
object?: _ObjectNonNullableFields$1;
|
|
1202
|
-
array?: _ArrayNonNullableFields$1;
|
|
1203
|
-
pageLink?: PageLinkNonNullableFields$1;
|
|
1204
|
-
}
|
|
1205
|
-
interface CmsOptionsNonNullableFields$1 {
|
|
1206
|
-
internal: boolean;
|
|
1207
|
-
}
|
|
1208
|
-
interface FieldPluginNonNullableFields$1 {
|
|
1209
|
-
cmsOptions?: CmsOptionsNonNullableFields$1;
|
|
1210
|
-
type: FieldPluginType$1;
|
|
1211
|
-
}
|
|
1212
|
-
interface FieldNonNullableFields$3 {
|
|
1213
|
-
key: string;
|
|
1214
|
-
type: Type$1;
|
|
1215
|
-
typeMetadata?: TypeMetadataNonNullableFields$1;
|
|
1216
|
-
systemField: boolean;
|
|
1217
|
-
capabilities?: FieldCapabilitiesNonNullableFields$1;
|
|
1218
|
-
encrypted: boolean;
|
|
1219
|
-
plugins: FieldPluginNonNullableFields$1[];
|
|
1220
|
-
}
|
|
1221
|
-
interface PermissionsNonNullableFields$1 {
|
|
1222
|
-
insert: Role$1;
|
|
1223
|
-
update: Role$1;
|
|
1224
|
-
remove: Role$1;
|
|
1225
|
-
read: Role$1;
|
|
1226
|
-
}
|
|
1227
|
-
interface PublishPluginOptionsNonNullableFields$1 {
|
|
1228
|
-
defaultStatus: Status$3;
|
|
1229
|
-
}
|
|
1230
|
-
interface SingleItemPluginOptionsNonNullableFields$1 {
|
|
1231
|
-
singleItemId: string;
|
|
1232
|
-
}
|
|
1233
|
-
interface UrlizedPluginOptionsNonNullableFields$1 {
|
|
1234
|
-
format: Format$1;
|
|
1235
|
-
}
|
|
1236
|
-
interface MultilingualOptionsNonNullableFields$1 {
|
|
1237
|
-
translatableFieldKeys: string[];
|
|
1238
|
-
}
|
|
1239
|
-
interface PageLinkPluginOptionsNonNullableFields$1 {
|
|
1240
|
-
isPersisted: boolean;
|
|
1241
|
-
isMutable: boolean;
|
|
1242
|
-
}
|
|
1243
|
-
interface SiteSortNonNullableFields$1 {
|
|
1244
|
-
sort: SortNonNullableFields$1[];
|
|
1245
|
-
}
|
|
1246
|
-
interface PluginCmsOptionsNonNullableFields$1 {
|
|
1247
|
-
siteSort?: SiteSortNonNullableFields$1;
|
|
1248
|
-
}
|
|
1249
|
-
interface PluginNonNullableFields$1 {
|
|
1250
|
-
publishOptions?: PublishPluginOptionsNonNullableFields$1;
|
|
1251
|
-
singleItemOptions?: SingleItemPluginOptionsNonNullableFields$1;
|
|
1252
|
-
urlizedOptions?: UrlizedPluginOptionsNonNullableFields$1;
|
|
1253
|
-
multilingualOptions?: MultilingualOptionsNonNullableFields$1;
|
|
1254
|
-
editablePageLinkOptions?: PageLinkPluginOptionsNonNullableFields$1;
|
|
1255
|
-
cmsOptions?: PluginCmsOptionsNonNullableFields$1;
|
|
1256
|
-
type: PluginType$1;
|
|
1257
|
-
}
|
|
1258
|
-
interface DataPermissionsNonNullableFields$1 {
|
|
1259
|
-
itemRead: AccessLevel$1;
|
|
1260
|
-
itemInsert: AccessLevel$1;
|
|
1261
|
-
itemUpdate: AccessLevel$1;
|
|
1262
|
-
itemRemove: AccessLevel$1;
|
|
1263
|
-
}
|
|
1264
|
-
interface AllowedDataPermissionsNonNullableFields$1 {
|
|
1265
|
-
itemRead: boolean;
|
|
1266
|
-
itemInsert: boolean;
|
|
1267
|
-
itemUpdate: boolean;
|
|
1268
|
-
itemRemove: boolean;
|
|
1269
|
-
}
|
|
1270
|
-
interface DataCollectionNonNullableFields$1 {
|
|
1271
|
-
id: string;
|
|
1272
|
-
collectionType: CollectionType$1;
|
|
1273
|
-
defaultDisplayOrder?: SortNonNullableFields$1;
|
|
1274
|
-
capabilities?: CollectionCapabilitiesNonNullableFields$1;
|
|
1275
|
-
fields: FieldNonNullableFields$3[];
|
|
1276
|
-
permissions?: PermissionsNonNullableFields$1;
|
|
1277
|
-
plugins: PluginNonNullableFields$1[];
|
|
1278
|
-
pagingModes: PagingMode$1[];
|
|
1279
|
-
dataPermissions?: DataPermissionsNonNullableFields$1;
|
|
1280
|
-
allowedDataPermissions?: AllowedDataPermissionsNonNullableFields$1;
|
|
1281
|
-
}
|
|
1282
|
-
interface CreateDataCollectionResponseNonNullableFields$1 {
|
|
1283
|
-
collection?: DataCollectionNonNullableFields$1;
|
|
1284
|
-
}
|
|
1285
|
-
interface GetDataCollectionResponseNonNullableFields$1 {
|
|
1286
|
-
collection?: DataCollectionNonNullableFields$1;
|
|
1287
|
-
referencedCollections: DataCollectionNonNullableFields$1[];
|
|
1288
|
-
}
|
|
1289
|
-
interface ListDataCollectionsResponseNonNullableFields$1 {
|
|
1290
|
-
collections: DataCollectionNonNullableFields$1[];
|
|
1291
|
-
}
|
|
1292
|
-
interface UpdateDataCollectionResponseNonNullableFields$1 {
|
|
1293
|
-
collection?: DataCollectionNonNullableFields$1;
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
/** A data collection determines the structure of data to be stored in a database. */
|
|
1297
|
-
interface DataCollection {
|
|
1298
|
-
/** Collection ID. For example, `my-first-collection`. May include a namespace. */
|
|
1299
|
-
_id?: string;
|
|
1300
|
-
/**
|
|
1301
|
-
* Collection type. Indicates how the collection was created and how it is stored.
|
|
1302
|
-
* @readonly
|
|
1303
|
-
*/
|
|
1304
|
-
collectionType?: CollectionType;
|
|
1305
|
-
/**
|
|
1306
|
-
* ID of the app that defined this collection. For collections defined by Wix users, this value is null.
|
|
1307
|
-
* @readonly
|
|
1308
|
-
*/
|
|
1309
|
-
ownerAppId?: string | null;
|
|
1310
|
-
/**
|
|
1311
|
-
* Maximum number of items returned in a single query, based on the underlying storage.
|
|
1312
|
-
* Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
|
|
1313
|
-
* External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
|
|
1314
|
-
* @readonly
|
|
1315
|
-
*/
|
|
1316
|
-
maxPageSize?: number | null;
|
|
1317
|
-
/** Collection's display name as shown in the CMS. For example, `My First Collection`. */
|
|
1318
|
-
displayName?: string | null;
|
|
1319
|
-
/**
|
|
1320
|
-
* Default item sorting order when a query doesn't specify one.
|
|
1321
|
-
* @readonly
|
|
1322
|
-
*/
|
|
1323
|
-
defaultDisplayOrder?: Sort;
|
|
1324
|
-
/**
|
|
1325
|
-
* UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
|
|
1326
|
-
* Empty for all data collections not owned by Wix apps.
|
|
1327
|
-
* @readonly
|
|
1328
|
-
*/
|
|
1329
|
-
displayNamespace?: string | null;
|
|
1330
|
-
/** Field whose value the CMS displays to represent the collection item when referenced in a different collection. */
|
|
1331
|
-
displayField?: string | null;
|
|
1332
|
-
/**
|
|
1333
|
-
* Capabilities the collection supports.
|
|
1334
|
-
* @readonly
|
|
1335
|
-
*/
|
|
1336
|
-
capabilities?: CollectionCapabilities;
|
|
1337
|
-
/** Collection's field structure. */
|
|
1338
|
-
fields?: Field$2[];
|
|
1339
|
-
/** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
|
|
1340
|
-
permissions?: Permissions;
|
|
1341
|
-
/**
|
|
1342
|
-
* Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must specify the latest revision number.
|
|
1343
|
-
* @readonly
|
|
1344
|
-
*/
|
|
1345
|
-
revision?: string | null;
|
|
1346
|
-
/** Plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality. */
|
|
1347
|
-
plugins?: Plugin[];
|
|
1348
|
-
/**
|
|
1349
|
-
* Paging modes the collection supports. In native collections, offset-based paging is supported by default.
|
|
1350
|
-
* @readonly
|
|
1351
|
-
*/
|
|
1352
|
-
pagingModes?: PagingMode[];
|
|
1353
|
-
/**
|
|
1354
|
-
* Date the collection was created.
|
|
1355
|
-
* @readonly
|
|
1356
|
-
*/
|
|
1357
|
-
_createdDate?: Date | null;
|
|
1358
|
-
/**
|
|
1359
|
-
* Date the collection was last updated.
|
|
1360
|
-
* @readonly
|
|
1361
|
-
*/
|
|
1362
|
-
_updatedDate?: Date | null;
|
|
1363
|
-
}
|
|
1364
|
-
declare enum CollectionType {
|
|
1365
|
-
/** User-created collection. */
|
|
1366
|
-
NATIVE = "NATIVE",
|
|
1367
|
-
/** [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app when it is installed. This type of collection can be modified dynamically by that app (for example, Wix Forms). */
|
|
1368
|
-
WIX_APP = "WIX_APP",
|
|
1369
|
-
/** Collection created by a Wix Blocks app. */
|
|
1370
|
-
BLOCKS_APP = "BLOCKS_APP",
|
|
1371
|
-
/** Collection located in externally connected storage. */
|
|
1372
|
-
EXTERNAL = "EXTERNAL"
|
|
1373
|
-
}
|
|
1374
|
-
interface Sort {
|
|
1375
|
-
/** Field to sort by. */
|
|
1376
|
-
fieldKey?: string;
|
|
1377
|
-
/**
|
|
1378
|
-
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
1379
|
-
*
|
|
1380
|
-
* Default: `ASC`
|
|
1381
|
-
*/
|
|
1382
|
-
direction?: Direction;
|
|
1383
|
-
}
|
|
1384
|
-
declare enum Direction {
|
|
1385
|
-
ASC = "ASC",
|
|
1386
|
-
DESC = "DESC"
|
|
1387
|
-
}
|
|
1388
|
-
interface CollectionCapabilities {
|
|
1389
|
-
/**
|
|
1390
|
-
* Data operations the collection supports. The listed operations can be performed on data the collection contains.
|
|
1391
|
-
*
|
|
1392
|
-
* > **Note**: The `PATCH` and `BULK_PATCH` oeprations aren't currently supported.
|
|
1393
|
-
*/
|
|
1394
|
-
dataOperations?: DataOperation[];
|
|
1395
|
-
/** Collection operations supported. The listed operations can be performed on the collection itself. */
|
|
1396
|
-
collectionOperations?: CollectionOperation[];
|
|
1397
|
-
/** Maximum number of indexes for the collection. */
|
|
1398
|
-
indexLimits?: IndexLimits;
|
|
1399
|
-
}
|
|
1400
|
-
declare enum DataOperation {
|
|
1401
|
-
AGGREGATE = "AGGREGATE",
|
|
1402
|
-
BULK_INSERT = "BULK_INSERT",
|
|
1403
|
-
BULK_REMOVE = "BULK_REMOVE",
|
|
1404
|
-
BULK_SAVE = "BULK_SAVE",
|
|
1405
|
-
BULK_UPDATE = "BULK_UPDATE",
|
|
1406
|
-
COUNT = "COUNT",
|
|
1407
|
-
DISTINCT = "DISTINCT",
|
|
1408
|
-
FIND = "FIND",
|
|
1409
|
-
GET = "GET",
|
|
1410
|
-
INSERT = "INSERT",
|
|
1411
|
-
INSERT_REFERENCE = "INSERT_REFERENCE",
|
|
1412
|
-
IS_REFERENCED = "IS_REFERENCED",
|
|
1413
|
-
QUERY_REFERENCED = "QUERY_REFERENCED",
|
|
1414
|
-
REMOVE = "REMOVE",
|
|
1415
|
-
REMOVE_REFERENCE = "REMOVE_REFERENCE",
|
|
1416
|
-
REPLACE_REFERENCES = "REPLACE_REFERENCES",
|
|
1417
|
-
SAVE = "SAVE",
|
|
1418
|
-
TRUNCATE = "TRUNCATE",
|
|
1419
|
-
UPDATE = "UPDATE",
|
|
1420
|
-
PATCH = "PATCH",
|
|
1421
|
-
BULK_PATCH = "BULK_PATCH"
|
|
1422
|
-
}
|
|
1423
|
-
declare enum CollectionOperation {
|
|
1424
|
-
/** Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed. */
|
|
1425
|
-
UPDATE = "UPDATE",
|
|
1426
|
-
/** Allows deleting the entire collection. If not included, the collection can't be deleted. */
|
|
1427
|
-
REMOVE = "REMOVE"
|
|
1428
|
-
}
|
|
1429
|
-
interface IndexLimits {
|
|
1430
|
-
/** Maximum number of regular (non-unique) indexes allowed for this collection. */
|
|
1431
|
-
regular?: number;
|
|
1432
|
-
/** Maximum number of unique indexes allowed for this collection. */
|
|
1433
|
-
unique?: number;
|
|
1434
|
-
/** Maximum number of regular and unique indexes allowed for this collection. */
|
|
1435
|
-
total?: number;
|
|
1436
|
-
}
|
|
1437
|
-
interface Field$2 extends FieldRangeValidationsOneOf {
|
|
1438
|
-
/** Range of possible values for a numerical field. */
|
|
1439
|
-
numberRange?: NumberRange;
|
|
1440
|
-
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
1441
|
-
stringLengthRange?: StringLengthRange;
|
|
1442
|
-
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
1443
|
-
arraySizeRange?: ArraySizeRange;
|
|
1444
|
-
/** Unique identifier for the field. For example, `firstName`. */
|
|
1445
|
-
key?: string;
|
|
1446
|
-
/** Field's display name when displayed in the CMS. For example, `First Name`. */
|
|
1447
|
-
displayName?: string | null;
|
|
1448
|
-
/** Field's data type. */
|
|
1449
|
-
type?: Type;
|
|
1450
|
-
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
1451
|
-
typeMetadata?: TypeMetadata;
|
|
1452
|
-
/**
|
|
1453
|
-
* Whether the field is a system field.
|
|
1454
|
-
* @readonly
|
|
1455
|
-
*/
|
|
1456
|
-
systemField?: boolean;
|
|
1457
|
-
/**
|
|
1458
|
-
* Capabilities the field supports.
|
|
1459
|
-
* @readonly
|
|
1460
|
-
*/
|
|
1461
|
-
capabilities?: FieldCapabilities;
|
|
1462
|
-
/** Whether the field is encrypted. */
|
|
1463
|
-
encrypted?: boolean;
|
|
1464
|
-
/** Field description. */
|
|
1465
|
-
description?: string | null;
|
|
1466
|
-
/**
|
|
1467
|
-
* Whether the field is read-only. A read-only field can't be changed.
|
|
1468
|
-
*
|
|
1469
|
-
* Default: `false`
|
|
1470
|
-
*/
|
|
1471
|
-
readOnly?: boolean | null;
|
|
1472
|
-
/**
|
|
1473
|
-
* Whether the field is immutable. An immutable field can be set once, but then cannot be updated.
|
|
1474
|
-
*
|
|
1475
|
-
* Default: `false`
|
|
1476
|
-
*/
|
|
1477
|
-
immutable?: boolean | null;
|
|
1478
|
-
/**
|
|
1479
|
-
* Whether the field is required.
|
|
1480
|
-
*
|
|
1481
|
-
* Default: `false`
|
|
1482
|
-
*/
|
|
1483
|
-
required?: boolean | null;
|
|
1484
|
-
/** Additional optional plugins for the field. */
|
|
1485
|
-
plugins?: FieldPlugin[];
|
|
1486
|
-
}
|
|
1487
|
-
/** @oneof */
|
|
1488
|
-
interface FieldRangeValidationsOneOf {
|
|
1489
|
-
/** Range of possible values for a numerical field. */
|
|
1490
|
-
numberRange?: NumberRange;
|
|
1491
|
-
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
1492
|
-
stringLengthRange?: StringLengthRange;
|
|
1493
|
-
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
1494
|
-
arraySizeRange?: ArraySizeRange;
|
|
1495
|
-
}
|
|
1496
|
-
declare enum Type {
|
|
1497
|
-
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
1498
|
-
TEXT = "TEXT",
|
|
1499
|
-
NUMBER = "NUMBER",
|
|
1500
|
-
DATE = "DATE",
|
|
1501
|
-
DATETIME = "DATETIME",
|
|
1502
|
-
IMAGE = "IMAGE",
|
|
1503
|
-
BOOLEAN = "BOOLEAN",
|
|
1504
|
-
DOCUMENT = "DOCUMENT",
|
|
1505
|
-
URL = "URL",
|
|
1506
|
-
RICH_TEXT = "RICH_TEXT",
|
|
1507
|
-
VIDEO = "VIDEO",
|
|
1508
|
-
ANY = "ANY",
|
|
1509
|
-
ARRAY_STRING = "ARRAY_STRING",
|
|
1510
|
-
ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
|
|
1511
|
-
AUDIO = "AUDIO",
|
|
1512
|
-
TIME = "TIME",
|
|
1513
|
-
LANGUAGE = "LANGUAGE",
|
|
1514
|
-
RICH_CONTENT = "RICH_CONTENT",
|
|
1515
|
-
MEDIA_GALLERY = "MEDIA_GALLERY",
|
|
1516
|
-
ADDRESS = "ADDRESS",
|
|
1517
|
-
PAGE_LINK = "PAGE_LINK",
|
|
1518
|
-
REFERENCE = "REFERENCE",
|
|
1519
|
-
MULTI_REFERENCE = "MULTI_REFERENCE",
|
|
1520
|
-
OBJECT = "OBJECT",
|
|
1521
|
-
ARRAY = "ARRAY",
|
|
1522
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
1523
|
-
LEGACY_TIME = "LEGACY_TIME",
|
|
1524
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
1525
|
-
LEGACY_BOOK = "LEGACY_BOOK",
|
|
1526
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
1527
|
-
LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL",
|
|
1528
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
1529
|
-
LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE",
|
|
1530
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
1531
|
-
LEGACY_IMAGE = "LEGACY_IMAGE",
|
|
1532
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
1533
|
-
LEGACY_COLOR = "LEGACY_COLOR",
|
|
1534
|
-
/** Deprecated - can’t be added to collections. Can only appear in older collections. */
|
|
1535
|
-
LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
|
|
1536
|
-
}
|
|
1537
|
-
interface TypeMetadata extends TypeMetadataMetadataOneOf {
|
|
1538
|
-
/** Metadata for a reference field. */
|
|
1539
|
-
reference?: Reference;
|
|
1540
|
-
/** Metadata for a multi-reference field. */
|
|
1541
|
-
multiReference?: MultiReference;
|
|
1542
|
-
/** Metadata for an object field. */
|
|
1543
|
-
object?: _Object;
|
|
1544
|
-
/** Metadata for an array field. */
|
|
1545
|
-
array?: _Array;
|
|
1546
|
-
/** Metadata for a page link field. */
|
|
1547
|
-
pageLink?: PageLink;
|
|
1548
|
-
}
|
|
1549
|
-
/** @oneof */
|
|
1550
|
-
interface TypeMetadataMetadataOneOf {
|
|
1551
|
-
/** Metadata for a reference field. */
|
|
1552
|
-
reference?: Reference;
|
|
1553
|
-
/** Metadata for a multi-reference field. */
|
|
1554
|
-
multiReference?: MultiReference;
|
|
1555
|
-
/** Metadata for an object field. */
|
|
1556
|
-
object?: _Object;
|
|
1557
|
-
/** Metadata for an array field. */
|
|
1558
|
-
array?: _Array;
|
|
1559
|
-
/** Metadata for a page link field. */
|
|
1560
|
-
pageLink?: PageLink;
|
|
1561
|
-
}
|
|
1562
|
-
interface FieldCapabilities {
|
|
1563
|
-
/**
|
|
1564
|
-
* Whether the collection can be sorted by this field.
|
|
1565
|
-
*
|
|
1566
|
-
* Default: `false`
|
|
1567
|
-
*/
|
|
1568
|
-
sortable?: boolean;
|
|
1569
|
-
/** Query operators that can be used for this field. */
|
|
1570
|
-
queryOperators?: QueryOperator[];
|
|
1571
|
-
}
|
|
1572
|
-
declare enum QueryOperator {
|
|
1573
|
-
EQ = "EQ",
|
|
1574
|
-
LT = "LT",
|
|
1575
|
-
GT = "GT",
|
|
1576
|
-
NE = "NE",
|
|
1577
|
-
LTE = "LTE",
|
|
1578
|
-
GTE = "GTE",
|
|
1579
|
-
STARTS_WITH = "STARTS_WITH",
|
|
1580
|
-
ENDS_WITH = "ENDS_WITH",
|
|
1581
|
-
CONTAINS = "CONTAINS",
|
|
1582
|
-
HAS_SOME = "HAS_SOME",
|
|
1583
|
-
HAS_ALL = "HAS_ALL",
|
|
1584
|
-
EXISTS = "EXISTS",
|
|
1585
|
-
URLIZED = "URLIZED"
|
|
1586
|
-
}
|
|
1587
|
-
interface ObjectField {
|
|
1588
|
-
/** Field ID. */
|
|
1589
|
-
key?: string;
|
|
1590
|
-
/** Display name for the field. */
|
|
1591
|
-
displayName?: string | null;
|
|
1592
|
-
/** Field type. */
|
|
1593
|
-
type?: Type;
|
|
1594
|
-
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
1595
|
-
typeMetadata?: TypeMetadata;
|
|
1596
|
-
/**
|
|
1597
|
-
* Capabilities the object field supports.
|
|
1598
|
-
* @readonly
|
|
1599
|
-
*/
|
|
1600
|
-
capabilities?: FieldCapabilities;
|
|
1601
|
-
}
|
|
1602
|
-
interface FieldsPattern {
|
|
1603
|
-
pattern?: string;
|
|
1604
|
-
lowercase?: boolean;
|
|
1605
|
-
}
|
|
1606
|
-
interface UrlizedOnlyPattern {
|
|
1607
|
-
pattern?: string;
|
|
1608
|
-
}
|
|
1609
|
-
interface Calculator extends CalculatorPatternOneOf {
|
|
1610
|
-
/** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
|
|
1611
|
-
fieldsPattern?: FieldsPattern;
|
|
1612
|
-
/** Value is only URL encoded. */
|
|
1613
|
-
urlizedOnlyPattern?: UrlizedOnlyPattern;
|
|
1614
|
-
}
|
|
1615
|
-
/** @oneof */
|
|
1616
|
-
interface CalculatorPatternOneOf {
|
|
1617
|
-
/** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
|
|
1618
|
-
fieldsPattern?: FieldsPattern;
|
|
1619
|
-
/** Value is only URL encoded. */
|
|
1620
|
-
urlizedOnlyPattern?: UrlizedOnlyPattern;
|
|
1621
|
-
}
|
|
1622
|
-
interface Reference {
|
|
1623
|
-
/** Referenced collection ID. */
|
|
1624
|
-
referencedCollectionId?: string;
|
|
1625
|
-
}
|
|
1626
|
-
interface MultiReference {
|
|
1627
|
-
/** Referenced collection ID. */
|
|
1628
|
-
referencedCollectionId?: string;
|
|
1629
|
-
/** Referencing field ID. */
|
|
1630
|
-
referencingFieldKey?: string;
|
|
1631
|
-
/** Display name in the CMS for the referenced data. */
|
|
1632
|
-
referencingDisplayName?: string;
|
|
1633
|
-
}
|
|
1634
|
-
interface _Object {
|
|
1635
|
-
/** Fields within the object. */
|
|
1636
|
-
fields?: ObjectField[];
|
|
1637
|
-
}
|
|
1638
|
-
interface _Array {
|
|
1639
|
-
/** Element's data type. */
|
|
1640
|
-
elementType?: Type;
|
|
1641
|
-
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
1642
|
-
typeMetadata?: TypeMetadata;
|
|
1643
|
-
}
|
|
1644
|
-
interface PageLink {
|
|
1645
|
-
calculator?: Calculator;
|
|
1646
|
-
/** Defines reference to router pattern in the site document. */
|
|
1647
|
-
linkedRouterPage?: string | null;
|
|
1648
|
-
}
|
|
1649
|
-
interface NumberRange {
|
|
1650
|
-
/**
|
|
1651
|
-
* Minimum permitted value for a numerical field.
|
|
1652
|
-
*
|
|
1653
|
-
* Default: No validation
|
|
1654
|
-
*/
|
|
1655
|
-
min?: number | null;
|
|
1656
|
-
/**
|
|
1657
|
-
* Maximum permitted value for a numerical field.
|
|
1658
|
-
*
|
|
1659
|
-
* Default: No validation
|
|
1660
|
-
*/
|
|
1661
|
-
max?: number | null;
|
|
1662
|
-
}
|
|
1663
|
-
interface StringLengthRange {
|
|
1664
|
-
/**
|
|
1665
|
-
* Minimum permitted length for a text field.
|
|
1666
|
-
*
|
|
1667
|
-
* Default: No validation
|
|
1668
|
-
*/
|
|
1669
|
-
minLength?: number | null;
|
|
1670
|
-
/**
|
|
1671
|
-
* Maximum permitted length for a text field.
|
|
1672
|
-
*
|
|
1673
|
-
* Default: No validation
|
|
1674
|
-
*/
|
|
1675
|
-
maxLength?: number | null;
|
|
1676
|
-
}
|
|
1677
|
-
interface ArraySizeRange {
|
|
1678
|
-
/**
|
|
1679
|
-
* Minimum permitted number of items in an array field. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`.
|
|
1680
|
-
*
|
|
1681
|
-
* Default: No validation
|
|
1682
|
-
*/
|
|
1683
|
-
minSize?: number | null;
|
|
1684
|
-
/**
|
|
1685
|
-
* Maximum permitted number of items in an array field. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`.
|
|
1686
|
-
*
|
|
1687
|
-
* Default: No validation
|
|
1688
|
-
*/
|
|
1689
|
-
maxSize?: number | null;
|
|
1690
|
-
}
|
|
1691
|
-
/** Optional plug-in aspects for fields */
|
|
1692
|
-
interface FieldPlugin extends FieldPluginOptionsOneOf {
|
|
1693
|
-
/** Options for the CMS plugin. */
|
|
1694
|
-
cmsOptions?: CmsOptions;
|
|
1695
|
-
type?: FieldPluginType;
|
|
1696
|
-
}
|
|
1697
|
-
/** @oneof */
|
|
1698
|
-
interface FieldPluginOptionsOneOf {
|
|
1699
|
-
/** Options for the CMS plugin. */
|
|
1700
|
-
cmsOptions?: CmsOptions;
|
|
1701
|
-
}
|
|
1702
|
-
declare enum FieldPluginType {
|
|
1703
|
-
/** Uknown plugin type. */
|
|
1704
|
-
UNKNOWN = "UNKNOWN",
|
|
1705
|
-
/** CMS-related field attributes */
|
|
1706
|
-
CMS = "CMS"
|
|
1707
|
-
}
|
|
1708
|
-
/** Options for the CMS plugin. */
|
|
1709
|
-
interface CmsOptions {
|
|
1710
|
-
/**
|
|
1711
|
-
* Indicates an internal CMS field. The CMS does not display internal fields.
|
|
1712
|
-
*
|
|
1713
|
-
* Default: `false`
|
|
1714
|
-
*/
|
|
1715
|
-
internal?: boolean;
|
|
1716
|
-
}
|
|
1717
|
-
/** Permissions defined by the lowest role needed to perform each action. */
|
|
1718
|
-
interface Permissions {
|
|
1719
|
-
/** Lowest role needed to add a collection. */
|
|
1720
|
-
insert?: Role;
|
|
1721
|
-
/** Lowest role needed to update a collection. */
|
|
1722
|
-
update?: Role;
|
|
1723
|
-
/** Lowest role needed to remove a collection. */
|
|
1724
|
-
remove?: Role;
|
|
1725
|
-
/** Lowest role needed to read a collection. */
|
|
1726
|
-
read?: Role;
|
|
1727
|
-
}
|
|
1728
|
-
declare enum Role {
|
|
1729
|
-
/** Unknown role. */
|
|
1730
|
-
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
1731
|
-
/** Site administrator. */
|
|
1732
|
-
ADMIN = "ADMIN",
|
|
1733
|
-
/** Signed-in user who added content to this collection. */
|
|
1734
|
-
SITE_MEMBER_AUTHOR = "SITE_MEMBER_AUTHOR",
|
|
1735
|
-
/** Any signed-in user. */
|
|
1736
|
-
SITE_MEMBER = "SITE_MEMBER",
|
|
1737
|
-
/** Any site visitor. */
|
|
1738
|
-
ANYONE = "ANYONE"
|
|
1739
|
-
}
|
|
1740
|
-
interface Plugin extends PluginOptionsOneOf {
|
|
1741
|
-
/**
|
|
1742
|
-
* Options for the Publish plugin.
|
|
1743
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
1744
|
-
*/
|
|
1745
|
-
publishOptions?: PublishPluginOptions;
|
|
1746
|
-
/** Options for the Single Item plugin. */
|
|
1747
|
-
singleItemOptions?: SingleItemPluginOptions;
|
|
1748
|
-
/** Options for the Urlized plugin. */
|
|
1749
|
-
urlizedOptions?: UrlizedPluginOptions;
|
|
1750
|
-
/** Options for the Multilingual plugin. */
|
|
1751
|
-
multilingualOptions?: MultilingualOptions;
|
|
1752
|
-
/** Options for the PageLink plugin. */
|
|
1753
|
-
editablePageLinkOptions?: PageLinkPluginOptions;
|
|
1754
|
-
/** Options for the CMS plugin. */
|
|
1755
|
-
cmsOptions?: PluginCmsOptions;
|
|
1756
|
-
/** Plugin types. */
|
|
1757
|
-
type?: PluginType;
|
|
1758
|
-
}
|
|
1759
|
-
/** @oneof */
|
|
1760
|
-
interface PluginOptionsOneOf {
|
|
1761
|
-
/**
|
|
1762
|
-
* Options for the Publish plugin.
|
|
1763
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
1764
|
-
*/
|
|
1765
|
-
publishOptions?: PublishPluginOptions;
|
|
1766
|
-
/** Options for the Single Item plugin. */
|
|
1767
|
-
singleItemOptions?: SingleItemPluginOptions;
|
|
1768
|
-
/** Options for the Urlized plugin. */
|
|
1769
|
-
urlizedOptions?: UrlizedPluginOptions;
|
|
1770
|
-
/** Options for the Multilingual plugin. */
|
|
1771
|
-
multilingualOptions?: MultilingualOptions;
|
|
1772
|
-
/** Options for the PageLink plugin. */
|
|
1773
|
-
editablePageLinkOptions?: PageLinkPluginOptions;
|
|
1774
|
-
/** Options for the CMS plugin. */
|
|
1775
|
-
cmsOptions?: PluginCmsOptions;
|
|
1776
|
-
}
|
|
1777
|
-
declare enum Status$2 {
|
|
1778
|
-
UNKNOWN_PUBLISH_PLUGIN_STATUS = "UNKNOWN_PUBLISH_PLUGIN_STATUS",
|
|
1779
|
-
PUBLISHED = "PUBLISHED",
|
|
1780
|
-
DRAFT = "DRAFT"
|
|
1781
|
-
}
|
|
1782
|
-
declare enum Format {
|
|
1783
|
-
UNKNOWN_URLIZED_PLUGIN_FORMAT = "UNKNOWN_URLIZED_PLUGIN_FORMAT",
|
|
1784
|
-
/** Letters are converted to lower case and spaces are replaced with dashes before generating the encoded URL. */
|
|
1785
|
-
ORIGINAL = "ORIGINAL",
|
|
1786
|
-
/** No changes are made before generating the encoded URL. */
|
|
1787
|
-
PLAIN = "PLAIN"
|
|
1788
|
-
}
|
|
1789
|
-
/** if CMS-defined sort is enabled and should be used in site */
|
|
1790
|
-
interface SiteSort {
|
|
1791
|
-
/** Field and order for the site sort. */
|
|
1792
|
-
sort?: Sort[];
|
|
1793
|
-
}
|
|
1794
|
-
declare enum PluginType {
|
|
1795
|
-
/** Unknown plugin type. */
|
|
1796
|
-
UNKNOWN_PLUGIN_TYPE = "UNKNOWN_PLUGIN_TYPE",
|
|
1797
|
-
/** Allows items to be marked as either draft or published. For each item you can set a publishing time when the item will become visible to site visitors. */
|
|
1798
|
-
PUBLISH = "PUBLISH",
|
|
1799
|
-
/** Ensures the collection can have one item at most. Can only be applied to a new collection. */
|
|
1800
|
-
SINGLE_ITEM = "SINGLE_ITEM",
|
|
1801
|
-
/** Generates item URLs for collections used by dynamic pages. */
|
|
1802
|
-
URLIZED = "URLIZED",
|
|
1803
|
-
/** Deprecated. Will be removed in the future. */
|
|
1804
|
-
GRIDAPPLESS = "GRIDAPPLESS",
|
|
1805
|
-
/** Indicates that the collection is translatable. This allows you to manage translation for selected fields using [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual). */
|
|
1806
|
-
MULTILINGUAL = "MULTILINGUAL",
|
|
1807
|
-
/** Indicates that collection is shared with current site. */
|
|
1808
|
-
SHARED = "SHARED",
|
|
1809
|
-
/** Indicates that page link fields are persisted and can be updated. */
|
|
1810
|
-
EDITABLE_PAGE_LINK = "EDITABLE_PAGE_LINK",
|
|
1811
|
-
/** CMS-specific collection properties. */
|
|
1812
|
-
CMS = "CMS"
|
|
1813
|
-
}
|
|
1814
|
-
interface PublishPluginOptions {
|
|
1815
|
-
/** Default status. */
|
|
1816
|
-
defaultStatus?: Status$2;
|
|
1817
|
-
}
|
|
1818
|
-
interface SingleItemPluginOptions {
|
|
1819
|
-
/** ID of the single item in this collection. If you insert or update an item, its ID value is always changed to this. */
|
|
1820
|
-
singleItemId?: string;
|
|
1821
|
-
}
|
|
1822
|
-
interface UrlizedPluginOptions {
|
|
1823
|
-
/** Encoding method for generating a URL in ASCII characters. */
|
|
1824
|
-
format?: Format;
|
|
1825
|
-
}
|
|
1826
|
-
interface MultilingualOptions {
|
|
1827
|
-
/** IDs of fields to allow translation. */
|
|
1828
|
-
translatableFieldKeys?: string[];
|
|
1829
|
-
}
|
|
1830
|
-
interface PageLinkPluginOptions {
|
|
1831
|
-
isPersisted?: boolean;
|
|
1832
|
-
isMutable?: boolean;
|
|
1833
|
-
}
|
|
1834
|
-
interface PluginCmsOptions {
|
|
1835
|
-
/** CMS sort, applied when a collection is displayed on a site. */
|
|
1836
|
-
siteSort?: SiteSort;
|
|
1837
|
-
}
|
|
1838
|
-
declare enum PagingMode {
|
|
1839
|
-
/** Offset-based paging. */
|
|
1840
|
-
OFFSET = "OFFSET",
|
|
1841
|
-
/** Cursor-based paging. */
|
|
1842
|
-
CURSOR = "CURSOR"
|
|
1843
|
-
}
|
|
1844
|
-
/**
|
|
1845
|
-
* Describes who can perform certain action.
|
|
1846
|
-
* Each level includes all levels below it (except UNDEFINED).
|
|
1847
|
-
*/
|
|
1848
|
-
declare enum AccessLevel {
|
|
1849
|
-
/** Not set. */
|
|
1850
|
-
UNDEFINED = "UNDEFINED",
|
|
1851
|
-
/** Any subject, including visitors. */
|
|
1852
|
-
ANYONE = "ANYONE",
|
|
1853
|
-
/** Any signed-in user (both site members and collaborators). */
|
|
1854
|
-
SITE_MEMBER = "SITE_MEMBER",
|
|
1855
|
-
/** Any signed-in user, but site members only have access to own items. */
|
|
1856
|
-
SITE_MEMBER_AUTHOR = "SITE_MEMBER_AUTHOR",
|
|
1857
|
-
/** Site collaborator that has a role with CMS Access permission. */
|
|
1858
|
-
CMS_EDITOR = "CMS_EDITOR",
|
|
1859
|
-
/** CMS administrators and users or roles granted with special access. */
|
|
1860
|
-
PRIVILEGED = "PRIVILEGED"
|
|
1861
|
-
}
|
|
1862
|
-
interface CreateDataCollectionRequest {
|
|
1863
|
-
/** Collection details. */
|
|
1864
|
-
collection: DataCollection;
|
|
1865
|
-
}
|
|
1866
|
-
interface CreateDataCollectionResponse {
|
|
1867
|
-
/** Details of collection created. */
|
|
1868
|
-
collection?: DataCollection;
|
|
1869
|
-
}
|
|
1870
|
-
interface GetDataCollectionRequest {
|
|
1871
|
-
/** ID of the collection to retrieve. */
|
|
1872
|
-
dataCollectionId: string;
|
|
1873
|
-
/**
|
|
1874
|
-
* Whether to retrieve data from the primary database instance.
|
|
1875
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1876
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
1877
|
-
*
|
|
1878
|
-
* Default: `false`
|
|
1879
|
-
*/
|
|
1880
|
-
consistentRead?: boolean;
|
|
1881
|
-
/**
|
|
1882
|
-
* List of specific field names to return, if empty all fields are returned.
|
|
1883
|
-
* Affects all returned collections
|
|
1884
|
-
*/
|
|
1885
|
-
fields?: string[];
|
|
1886
|
-
}
|
|
1887
|
-
interface GetDataCollectionResponse {
|
|
1888
|
-
/** Details of the collection requested. */
|
|
1889
|
-
collection?: DataCollection;
|
|
1890
|
-
/**
|
|
1891
|
-
* Details of collections referenced by the collection requested.
|
|
1892
|
-
* Only populated when `includeReferencedCollections` is `true` in the request.
|
|
1893
|
-
*/
|
|
1894
|
-
referencedCollections?: DataCollection[];
|
|
1895
|
-
}
|
|
1896
|
-
interface ListDataCollectionsRequest {
|
|
1897
|
-
/**
|
|
1898
|
-
* Defines how collections in the response are sorted.
|
|
1899
|
-
*
|
|
1900
|
-
* Default: Ordered by ID in ascending order.
|
|
1901
|
-
*/
|
|
1902
|
-
sort?: Sorting$2;
|
|
1903
|
-
/** Pagination information. */
|
|
1904
|
-
paging?: Paging$4;
|
|
1905
|
-
/**
|
|
1906
|
-
* Whether to retrieve data from the primary database instance.
|
|
1907
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1908
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
1909
|
-
*
|
|
1910
|
-
* Default: `false`
|
|
1911
|
-
*/
|
|
1912
|
-
consistentRead?: boolean;
|
|
1913
|
-
/**
|
|
1914
|
-
* List of specific field names to return, if empty all fields are returned.
|
|
1915
|
-
* Affects all returned collections
|
|
1916
|
-
*/
|
|
1917
|
-
fields?: string[];
|
|
1918
|
-
}
|
|
1919
|
-
interface Sorting$2 {
|
|
1920
|
-
/** Name of the field to sort by. */
|
|
1921
|
-
fieldName?: string;
|
|
1922
|
-
/** Sort order. */
|
|
1923
|
-
order?: SortOrder$2;
|
|
1924
|
-
}
|
|
1925
|
-
declare enum SortOrder$2 {
|
|
1926
|
-
ASC = "ASC",
|
|
1927
|
-
DESC = "DESC"
|
|
1928
|
-
}
|
|
1929
|
-
interface Paging$4 {
|
|
1930
|
-
/** Number of items to load. */
|
|
1931
|
-
limit?: number | null;
|
|
1932
|
-
/** Number of items to skip in the current sort order. */
|
|
1933
|
-
offset?: number | null;
|
|
1934
|
-
}
|
|
1935
|
-
interface ListDataCollectionsResponse {
|
|
1936
|
-
/** List of collections. */
|
|
1937
|
-
collections?: DataCollection[];
|
|
1938
|
-
/** Paging information. */
|
|
1939
|
-
pagingMetadata?: PagingMetadataV2$2;
|
|
1940
|
-
}
|
|
1941
|
-
interface PagingMetadataV2$2 {
|
|
1942
|
-
/** Number of items returned in the response. */
|
|
1943
|
-
count?: number | null;
|
|
1944
|
-
/** Offset that was requested. */
|
|
1945
|
-
offset?: number | null;
|
|
1946
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
1947
|
-
total?: number | null;
|
|
1948
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
1949
|
-
tooManyToCount?: boolean | null;
|
|
1950
|
-
}
|
|
1951
|
-
interface UpdateDataCollectionRequest {
|
|
1952
|
-
/** Updated collection details. The existing collection is replaced with this version. */
|
|
1953
|
-
collection: DataCollection;
|
|
1954
|
-
}
|
|
1955
|
-
interface UpdateDataCollectionResponse {
|
|
1956
|
-
/** Updated collection details. */
|
|
1957
|
-
collection?: DataCollection;
|
|
1958
|
-
}
|
|
1959
|
-
interface DeleteDataCollectionRequest {
|
|
1960
|
-
/** ID of the collection to delete. */
|
|
1961
|
-
dataCollectionId: string;
|
|
1962
|
-
}
|
|
1963
|
-
interface DeleteDataCollectionResponse {
|
|
1964
|
-
}
|
|
1965
|
-
interface SortNonNullableFields {
|
|
1966
|
-
fieldKey: string;
|
|
1967
|
-
direction: Direction;
|
|
1968
|
-
}
|
|
1969
|
-
interface IndexLimitsNonNullableFields {
|
|
1970
|
-
regular: number;
|
|
1971
|
-
unique: number;
|
|
1972
|
-
total: number;
|
|
1973
|
-
}
|
|
1974
|
-
interface CollectionCapabilitiesNonNullableFields {
|
|
1975
|
-
dataOperations: DataOperation[];
|
|
1976
|
-
collectionOperations: CollectionOperation[];
|
|
1977
|
-
indexLimits?: IndexLimitsNonNullableFields;
|
|
1978
|
-
}
|
|
1979
|
-
interface ReferenceNonNullableFields {
|
|
1980
|
-
referencedCollectionId: string;
|
|
1981
|
-
}
|
|
1982
|
-
interface MultiReferenceNonNullableFields {
|
|
1983
|
-
referencedCollectionId: string;
|
|
1984
|
-
referencingFieldKey: string;
|
|
1985
|
-
referencingDisplayName: string;
|
|
1986
|
-
}
|
|
1987
|
-
interface FieldCapabilitiesNonNullableFields {
|
|
1988
|
-
sortable: boolean;
|
|
1989
|
-
queryOperators: QueryOperator[];
|
|
1990
|
-
}
|
|
1991
|
-
interface ObjectFieldNonNullableFields {
|
|
1992
|
-
key: string;
|
|
1993
|
-
type: Type;
|
|
1994
|
-
typeMetadata?: TypeMetadataNonNullableFields;
|
|
1995
|
-
capabilities?: FieldCapabilitiesNonNullableFields;
|
|
1996
|
-
}
|
|
1997
|
-
interface _ObjectNonNullableFields {
|
|
1998
|
-
fields: ObjectFieldNonNullableFields[];
|
|
1999
|
-
}
|
|
2000
|
-
interface _ArrayNonNullableFields {
|
|
2001
|
-
elementType: Type;
|
|
2002
|
-
typeMetadata?: TypeMetadataNonNullableFields;
|
|
2003
|
-
}
|
|
2004
|
-
interface FieldsPatternNonNullableFields {
|
|
2005
|
-
pattern: string;
|
|
2006
|
-
lowercase: boolean;
|
|
2007
|
-
}
|
|
2008
|
-
interface UrlizedOnlyPatternNonNullableFields {
|
|
2009
|
-
pattern: string;
|
|
2010
|
-
}
|
|
2011
|
-
interface CalculatorNonNullableFields {
|
|
2012
|
-
fieldsPattern?: FieldsPatternNonNullableFields;
|
|
2013
|
-
urlizedOnlyPattern?: UrlizedOnlyPatternNonNullableFields;
|
|
2014
|
-
}
|
|
2015
|
-
interface PageLinkNonNullableFields {
|
|
2016
|
-
calculator?: CalculatorNonNullableFields;
|
|
2017
|
-
}
|
|
2018
|
-
interface TypeMetadataNonNullableFields {
|
|
2019
|
-
reference?: ReferenceNonNullableFields;
|
|
2020
|
-
multiReference?: MultiReferenceNonNullableFields;
|
|
2021
|
-
object?: _ObjectNonNullableFields;
|
|
2022
|
-
array?: _ArrayNonNullableFields;
|
|
2023
|
-
pageLink?: PageLinkNonNullableFields;
|
|
2024
|
-
}
|
|
2025
|
-
interface CmsOptionsNonNullableFields {
|
|
2026
|
-
internal: boolean;
|
|
2027
|
-
}
|
|
2028
|
-
interface FieldPluginNonNullableFields {
|
|
2029
|
-
cmsOptions?: CmsOptionsNonNullableFields;
|
|
2030
|
-
type: FieldPluginType;
|
|
2031
|
-
}
|
|
2032
|
-
interface FieldNonNullableFields$2 {
|
|
2033
|
-
key: string;
|
|
2034
|
-
type: Type;
|
|
2035
|
-
typeMetadata?: TypeMetadataNonNullableFields;
|
|
2036
|
-
systemField: boolean;
|
|
2037
|
-
capabilities?: FieldCapabilitiesNonNullableFields;
|
|
2038
|
-
encrypted: boolean;
|
|
2039
|
-
plugins: FieldPluginNonNullableFields[];
|
|
2040
|
-
}
|
|
2041
|
-
interface PermissionsNonNullableFields {
|
|
2042
|
-
insert: Role;
|
|
2043
|
-
update: Role;
|
|
2044
|
-
remove: Role;
|
|
2045
|
-
read: Role;
|
|
2046
|
-
}
|
|
2047
|
-
interface PublishPluginOptionsNonNullableFields {
|
|
2048
|
-
defaultStatus: Status$2;
|
|
2049
|
-
}
|
|
2050
|
-
interface SingleItemPluginOptionsNonNullableFields {
|
|
2051
|
-
singleItemId: string;
|
|
2052
|
-
}
|
|
2053
|
-
interface UrlizedPluginOptionsNonNullableFields {
|
|
2054
|
-
format: Format;
|
|
2055
|
-
}
|
|
2056
|
-
interface MultilingualOptionsNonNullableFields {
|
|
2057
|
-
translatableFieldKeys: string[];
|
|
2058
|
-
}
|
|
2059
|
-
interface PageLinkPluginOptionsNonNullableFields {
|
|
2060
|
-
isPersisted: boolean;
|
|
2061
|
-
isMutable: boolean;
|
|
2062
|
-
}
|
|
2063
|
-
interface SiteSortNonNullableFields {
|
|
2064
|
-
sort: SortNonNullableFields[];
|
|
2065
|
-
}
|
|
2066
|
-
interface PluginCmsOptionsNonNullableFields {
|
|
2067
|
-
siteSort?: SiteSortNonNullableFields;
|
|
2068
|
-
}
|
|
2069
|
-
interface PluginNonNullableFields {
|
|
2070
|
-
publishOptions?: PublishPluginOptionsNonNullableFields;
|
|
2071
|
-
singleItemOptions?: SingleItemPluginOptionsNonNullableFields;
|
|
2072
|
-
urlizedOptions?: UrlizedPluginOptionsNonNullableFields;
|
|
2073
|
-
multilingualOptions?: MultilingualOptionsNonNullableFields;
|
|
2074
|
-
editablePageLinkOptions?: PageLinkPluginOptionsNonNullableFields;
|
|
2075
|
-
cmsOptions?: PluginCmsOptionsNonNullableFields;
|
|
2076
|
-
type: PluginType;
|
|
2077
|
-
}
|
|
2078
|
-
interface DataPermissionsNonNullableFields {
|
|
2079
|
-
itemRead: AccessLevel;
|
|
2080
|
-
itemInsert: AccessLevel;
|
|
2081
|
-
itemUpdate: AccessLevel;
|
|
2082
|
-
itemRemove: AccessLevel;
|
|
2083
|
-
}
|
|
2084
|
-
interface AllowedDataPermissionsNonNullableFields {
|
|
2085
|
-
itemRead: boolean;
|
|
2086
|
-
itemInsert: boolean;
|
|
2087
|
-
itemUpdate: boolean;
|
|
2088
|
-
itemRemove: boolean;
|
|
2089
|
-
}
|
|
2090
|
-
interface DataCollectionNonNullableFields {
|
|
2091
|
-
_id: string;
|
|
2092
|
-
collectionType: CollectionType;
|
|
2093
|
-
defaultDisplayOrder?: SortNonNullableFields;
|
|
2094
|
-
capabilities?: CollectionCapabilitiesNonNullableFields;
|
|
2095
|
-
fields: FieldNonNullableFields$2[];
|
|
2096
|
-
permissions?: PermissionsNonNullableFields;
|
|
2097
|
-
plugins: PluginNonNullableFields[];
|
|
2098
|
-
pagingModes: PagingMode[];
|
|
2099
|
-
dataPermissions?: DataPermissionsNonNullableFields;
|
|
2100
|
-
allowedDataPermissions?: AllowedDataPermissionsNonNullableFields;
|
|
2101
|
-
}
|
|
2102
|
-
interface CreateDataCollectionResponseNonNullableFields {
|
|
2103
|
-
collection?: DataCollectionNonNullableFields;
|
|
2104
|
-
}
|
|
2105
|
-
interface GetDataCollectionResponseNonNullableFields {
|
|
2106
|
-
collection?: DataCollectionNonNullableFields;
|
|
2107
|
-
referencedCollections: DataCollectionNonNullableFields[];
|
|
2108
|
-
}
|
|
2109
|
-
interface ListDataCollectionsResponseNonNullableFields {
|
|
2110
|
-
collections: DataCollectionNonNullableFields[];
|
|
2111
|
-
}
|
|
2112
|
-
interface UpdateDataCollectionResponseNonNullableFields {
|
|
2113
|
-
collection?: DataCollectionNonNullableFields;
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
2117
|
-
getUrl: (context: any) => string;
|
|
2118
|
-
httpMethod: K;
|
|
2119
|
-
path: string;
|
|
2120
|
-
pathParams: M;
|
|
2121
|
-
__requestType: T;
|
|
2122
|
-
__originalRequestType: S;
|
|
2123
|
-
__responseType: Q;
|
|
2124
|
-
__originalResponseType: R;
|
|
2125
|
-
};
|
|
2126
|
-
declare function createDataCollection(): __PublicMethodMetaInfo$2<'POST', {}, CreateDataCollectionRequest, CreateDataCollectionRequest$1, CreateDataCollectionResponse & CreateDataCollectionResponseNonNullableFields, CreateDataCollectionResponse$1 & CreateDataCollectionResponseNonNullableFields$1>;
|
|
2127
|
-
declare function getDataCollection(): __PublicMethodMetaInfo$2<'GET', {
|
|
2128
|
-
dataCollectionId: string;
|
|
2129
|
-
}, GetDataCollectionRequest, GetDataCollectionRequest$1, GetDataCollectionResponse & GetDataCollectionResponseNonNullableFields, GetDataCollectionResponse$1 & GetDataCollectionResponseNonNullableFields$1>;
|
|
2130
|
-
declare function listDataCollections(): __PublicMethodMetaInfo$2<'GET', {}, ListDataCollectionsRequest, ListDataCollectionsRequest$1, ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields, ListDataCollectionsResponse$1 & ListDataCollectionsResponseNonNullableFields$1>;
|
|
2131
|
-
declare function updateDataCollection(): __PublicMethodMetaInfo$2<'PUT', {}, UpdateDataCollectionRequest, UpdateDataCollectionRequest$1, UpdateDataCollectionResponse & UpdateDataCollectionResponseNonNullableFields, UpdateDataCollectionResponse$1 & UpdateDataCollectionResponseNonNullableFields$1>;
|
|
2132
|
-
declare function deleteDataCollection(): __PublicMethodMetaInfo$2<'DELETE', {
|
|
2133
|
-
dataCollectionId: string;
|
|
2134
|
-
}, DeleteDataCollectionRequest, DeleteDataCollectionRequest$1, DeleteDataCollectionResponse, DeleteDataCollectionResponse$1>;
|
|
2135
|
-
|
|
2136
|
-
declare const meta$2_createDataCollection: typeof createDataCollection;
|
|
2137
|
-
declare const meta$2_deleteDataCollection: typeof deleteDataCollection;
|
|
2138
|
-
declare const meta$2_getDataCollection: typeof getDataCollection;
|
|
2139
|
-
declare const meta$2_listDataCollections: typeof listDataCollections;
|
|
2140
|
-
declare const meta$2_updateDataCollection: typeof updateDataCollection;
|
|
2141
|
-
declare namespace meta$2 {
|
|
2142
|
-
export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$2_createDataCollection as createDataCollection, meta$2_deleteDataCollection as deleteDataCollection, meta$2_getDataCollection as getDataCollection, meta$2_listDataCollections as listDataCollections, meta$2_updateDataCollection as updateDataCollection };
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
|
-
interface DataItem$1 {
|
|
2146
|
-
/** Data item ID. */
|
|
2147
|
-
id?: string;
|
|
2148
|
-
/**
|
|
2149
|
-
* ID of the collection this item belongs to
|
|
2150
|
-
* @readonly
|
|
2151
|
-
*/
|
|
2152
|
-
dataCollectionId?: string;
|
|
2153
|
-
/**
|
|
2154
|
-
* Data item contents.
|
|
2155
|
-
*
|
|
2156
|
-
* Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:
|
|
2157
|
-
*
|
|
2158
|
-
* + `_id`: Item ID.
|
|
2159
|
-
* + `_createdDate`: Date and time the item was added to the collection.
|
|
2160
|
-
* + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
|
|
2161
|
-
* + `_ownerId`: ID of the user who created the item. Can be modified with site owner permissions.
|
|
2162
|
-
*/
|
|
2163
|
-
data?: Record<string, any> | null;
|
|
2164
|
-
}
|
|
2165
|
-
interface InsertDataItemRequest$1 {
|
|
2166
|
-
/** ID of the collection in which to insert the item. */
|
|
2167
|
-
dataCollectionId: string;
|
|
2168
|
-
/** Item to insert. */
|
|
2169
|
-
dataItem: DataItem$1;
|
|
2170
|
-
/**
|
|
2171
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2172
|
-
*
|
|
2173
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2174
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2175
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2176
|
-
*/
|
|
2177
|
-
appOptions?: Record<string, any> | null;
|
|
2178
|
-
}
|
|
2179
|
-
interface InsertDataItemResponse$1 {
|
|
2180
|
-
/** Inserted data item. */
|
|
2181
|
-
dataItem?: DataItem$1;
|
|
2182
|
-
}
|
|
2183
|
-
interface DataPublishPluginOptions$1 {
|
|
2184
|
-
/**
|
|
2185
|
-
* Whether to include draft items.
|
|
2186
|
-
* When `true`, the response includes both published and draft items. Default: `false`.
|
|
2187
|
-
*/
|
|
2188
|
-
includeDraftItems?: boolean;
|
|
2189
|
-
}
|
|
2190
|
-
interface BulkDataItemResult$1 {
|
|
2191
|
-
/** The action attempted for the data item. */
|
|
2192
|
-
action?: BulkActionType$1;
|
|
2193
|
-
/** Metadata related to the data item for which the action was attempted. */
|
|
2194
|
-
itemMetadata?: ItemMetadata$1;
|
|
2195
|
-
/** The data item for which the action was attempted. Only returned if `returnEntity` is `true` in the request and the action is successful. */
|
|
2196
|
-
dataItem?: DataItem$1;
|
|
2197
|
-
}
|
|
2198
|
-
declare enum BulkActionType$1 {
|
|
2199
|
-
UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
|
|
2200
|
-
INSERT = "INSERT",
|
|
2201
|
-
UPDATE = "UPDATE",
|
|
2202
|
-
DELETE = "DELETE",
|
|
2203
|
-
PATCH = "PATCH"
|
|
2204
|
-
}
|
|
2205
|
-
interface ItemMetadata$1 {
|
|
2206
|
-
/** Item ID. This field doesn't appear if there is no item ID, for example, when item creation fails. */
|
|
2207
|
-
id?: string | null;
|
|
2208
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
2209
|
-
originalIndex?: number;
|
|
2210
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
2211
|
-
success?: boolean;
|
|
2212
|
-
/** Details about the error in case of failure. */
|
|
2213
|
-
error?: ApplicationError$1;
|
|
2214
|
-
}
|
|
2215
|
-
interface ApplicationError$1 {
|
|
2216
|
-
/** Error code. */
|
|
2217
|
-
code?: string;
|
|
2218
|
-
/** Description of the error. */
|
|
2219
|
-
description?: string;
|
|
2220
|
-
/** Data related to the error. */
|
|
2221
|
-
data?: Record<string, any> | null;
|
|
2222
|
-
}
|
|
2223
|
-
interface BulkActionMetadata$1 {
|
|
2224
|
-
/** Number of items successfully processed. */
|
|
2225
|
-
totalSuccesses?: number;
|
|
2226
|
-
/** Number of items that couldn't be processed. */
|
|
2227
|
-
totalFailures?: number;
|
|
2228
|
-
}
|
|
2229
|
-
interface UpdateDataItemRequest$1 {
|
|
2230
|
-
/** ID of the collection containing the existing item. */
|
|
2231
|
-
dataCollectionId: string;
|
|
2232
|
-
/** Updated data item content. The existing data item's content is replaced entirely. */
|
|
2233
|
-
dataItem: DataItem$1;
|
|
2234
|
-
/**
|
|
2235
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2236
|
-
*
|
|
2237
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2238
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2239
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2240
|
-
*/
|
|
2241
|
-
appOptions?: Record<string, any> | null;
|
|
2242
|
-
/**
|
|
2243
|
-
* Options for the Publish plugin.
|
|
2244
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2245
|
-
*/
|
|
2246
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2247
|
-
}
|
|
2248
|
-
interface UpdateDataItemResponse$1 {
|
|
2249
|
-
/** Updated data item. */
|
|
2250
|
-
dataItem?: DataItem$1;
|
|
2251
|
-
}
|
|
2252
|
-
interface SaveDataItemRequest$1 {
|
|
2253
|
-
/** ID of the collection in which to insert or update the item. */
|
|
2254
|
-
dataCollectionId: string;
|
|
2255
|
-
/** Data item to insert or update. */
|
|
2256
|
-
dataItem: DataItem$1;
|
|
2257
|
-
/**
|
|
2258
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2259
|
-
*
|
|
2260
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2261
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2262
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2263
|
-
*/
|
|
2264
|
-
appOptions?: Record<string, any> | null;
|
|
2265
|
-
/**
|
|
2266
|
-
* Options for the Publish plugin.
|
|
2267
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2268
|
-
*/
|
|
2269
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2270
|
-
}
|
|
2271
|
-
interface SaveDataItemResponse$1 {
|
|
2272
|
-
/** The action carried out for the item. */
|
|
2273
|
-
action?: Action$1;
|
|
2274
|
-
/** Inserted or updated data item. */
|
|
2275
|
-
dataItem?: DataItem$1;
|
|
2276
|
-
}
|
|
2277
|
-
declare enum Action$1 {
|
|
2278
|
-
/** Undefined action. */
|
|
2279
|
-
UNKNOWN_ACTION = "UNKNOWN_ACTION",
|
|
2280
|
-
/** A new item was added to the collection. */
|
|
2281
|
-
INSERTED = "INSERTED",
|
|
2282
|
-
/** An existing item in the collection was updated. */
|
|
2283
|
-
UPDATED = "UPDATED"
|
|
2284
|
-
}
|
|
2285
|
-
interface GetDataItemRequest$1 {
|
|
2286
|
-
/** ID of the collection from which to retrieve the data item. */
|
|
2287
|
-
dataCollectionId: string;
|
|
2288
|
-
/** ID of the data item to retrieve. */
|
|
2289
|
-
dataItemId: string;
|
|
2290
|
-
/**
|
|
2291
|
-
* Whether to retrieve data from the primary database instance.
|
|
2292
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2293
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2294
|
-
*
|
|
2295
|
-
* Default: `false`
|
|
2296
|
-
*/
|
|
2297
|
-
consistentRead?: boolean;
|
|
2298
|
-
/**
|
|
2299
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
2300
|
-
* If provided, the result text is returned in the specified language.
|
|
2301
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
2302
|
-
*
|
|
2303
|
-
* If not provided, result text is not translated.
|
|
2304
|
-
*/
|
|
2305
|
-
language?: string | null;
|
|
2306
|
-
/**
|
|
2307
|
-
* Fields to return for the item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
2308
|
-
* **Note:** The `_id` system field is always returned.
|
|
2309
|
-
*/
|
|
2310
|
-
fields?: string[];
|
|
2311
|
-
/**
|
|
2312
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2313
|
-
*
|
|
2314
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2315
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2316
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2317
|
-
*/
|
|
2318
|
-
appOptions?: Record<string, any> | null;
|
|
2319
|
-
/**
|
|
2320
|
-
* Options for the Publish plugin.
|
|
2321
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2322
|
-
*/
|
|
2323
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2324
|
-
}
|
|
2325
|
-
interface GetDataItemResponse$1 {
|
|
2326
|
-
/** Retrieved item. */
|
|
2327
|
-
dataItem?: DataItem$1;
|
|
2328
|
-
}
|
|
2329
|
-
interface RemoveDataItemRequest$1 {
|
|
2330
|
-
/** ID of the collection from which to remove the item. */
|
|
2331
|
-
dataCollectionId: string;
|
|
2332
|
-
/** ID of the item to remove. */
|
|
2333
|
-
dataItemId: string;
|
|
2334
|
-
/**
|
|
2335
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2336
|
-
*
|
|
2337
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2338
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2339
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2340
|
-
*/
|
|
2341
|
-
appOptions?: Record<string, any> | null;
|
|
2342
|
-
/**
|
|
2343
|
-
* Options for the Publish plugin.
|
|
2344
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2345
|
-
*/
|
|
2346
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2347
|
-
}
|
|
2348
|
-
interface RemoveDataItemResponse$1 {
|
|
2349
|
-
/** Removed item. */
|
|
2350
|
-
dataItem?: DataItem$1;
|
|
2351
|
-
}
|
|
2352
|
-
interface TruncateDataItemsRequest$1 {
|
|
2353
|
-
/** ID of the collection to truncate. */
|
|
2354
|
-
dataCollectionId: string;
|
|
2355
|
-
}
|
|
2356
|
-
interface TruncateDataItemsResponse$1 {
|
|
2357
|
-
}
|
|
2358
|
-
interface QueryDataItemsRequest$1 {
|
|
2359
|
-
/** ID of the collection to query. */
|
|
2360
|
-
dataCollectionId: string;
|
|
2361
|
-
/** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
|
|
2362
|
-
query?: QueryV2$1;
|
|
2363
|
-
/**
|
|
2364
|
-
* Whether to return the total count in the response for a query with offset paging.
|
|
2365
|
-
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
2366
|
-
*
|
|
2367
|
-
* Default: `false`
|
|
2368
|
-
*/
|
|
2369
|
-
returnTotalCount?: boolean;
|
|
2370
|
-
/**
|
|
2371
|
-
* Properties for which to include referenced items in the query's results.
|
|
2372
|
-
* Up to 50 referenced items can be included for each item that matches the query.
|
|
2373
|
-
* @deprecated
|
|
2374
|
-
* @replacedBy referenced_item_options
|
|
2375
|
-
* @targetRemovalDate 2025-08-01
|
|
2376
|
-
*/
|
|
2377
|
-
includeReferencedItems?: string[];
|
|
2378
|
-
/**
|
|
2379
|
-
* Whether to retrieve data from the primary database instance.
|
|
2380
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2381
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2382
|
-
*
|
|
2383
|
-
* Default: `false`
|
|
2384
|
-
*/
|
|
2385
|
-
consistentRead?: boolean;
|
|
2386
|
-
/**
|
|
2387
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
2388
|
-
* If provided, the result text is returned in the specified language.
|
|
2389
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
2390
|
-
*
|
|
2391
|
-
* If not provided, result text is not translated.
|
|
2392
|
-
*/
|
|
2393
|
-
language?: string | null;
|
|
2394
|
-
/**
|
|
2395
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2396
|
-
*
|
|
2397
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2398
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2399
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2400
|
-
*/
|
|
2401
|
-
appOptions?: Record<string, any> | null;
|
|
2402
|
-
/**
|
|
2403
|
-
* Options for the Publish plugin.
|
|
2404
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2405
|
-
*/
|
|
2406
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2407
|
-
/** Options for retrieving referenced items. */
|
|
2408
|
-
referencedItemOptions?: ReferencedItemOptions$1[];
|
|
2409
|
-
}
|
|
2410
|
-
interface QueryV2$1 extends QueryV2PagingMethodOneOf$1 {
|
|
2411
|
-
/** Paging options to limit and skip the number of items. */
|
|
2412
|
-
paging?: Paging$3;
|
|
2413
|
-
/** 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`. */
|
|
2414
|
-
cursorPaging?: CursorPaging$1;
|
|
2415
|
-
/**
|
|
2416
|
-
* Filter object in the following format:
|
|
2417
|
-
*
|
|
2418
|
-
* `"filter" : {
|
|
2419
|
-
* "fieldName1": "value1",
|
|
2420
|
-
* "fieldName2":{"$operator":"value2"}
|
|
2421
|
-
* }`
|
|
2422
|
-
*
|
|
2423
|
-
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
2424
|
-
*
|
|
2425
|
-
* **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `"someDateAndTimeFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).
|
|
2426
|
-
*/
|
|
2427
|
-
filter?: Record<string, any> | null;
|
|
2428
|
-
/**
|
|
2429
|
-
* Sort object in the following format:
|
|
2430
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
2431
|
-
*/
|
|
2432
|
-
sort?: Sorting$1[];
|
|
2433
|
-
/**
|
|
2434
|
-
* Fields to return for each item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
2435
|
-
* **Note:** The `_id` system field is always returned.
|
|
2436
|
-
*/
|
|
2437
|
-
fields?: string[];
|
|
2438
|
-
}
|
|
2439
|
-
/** @oneof */
|
|
2440
|
-
interface QueryV2PagingMethodOneOf$1 {
|
|
2441
|
-
/** Paging options to limit and skip the number of items. */
|
|
2442
|
-
paging?: Paging$3;
|
|
2443
|
-
/** 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`. */
|
|
2444
|
-
cursorPaging?: CursorPaging$1;
|
|
2445
|
-
}
|
|
2446
|
-
interface Sorting$1 {
|
|
2447
|
-
/** Name of the field to sort by. */
|
|
2448
|
-
fieldName?: string;
|
|
2449
|
-
/** Sort order. */
|
|
2450
|
-
order?: SortOrder$1;
|
|
2451
|
-
}
|
|
2452
|
-
declare enum SortOrder$1 {
|
|
2453
|
-
ASC = "ASC",
|
|
2454
|
-
DESC = "DESC"
|
|
2455
|
-
}
|
|
2456
|
-
interface Paging$3 {
|
|
2457
|
-
/** Number of items to load. */
|
|
2458
|
-
limit?: number | null;
|
|
2459
|
-
/** Number of items to skip in the current sort order. */
|
|
2460
|
-
offset?: number | null;
|
|
2461
|
-
}
|
|
2462
|
-
interface CursorPaging$1 {
|
|
2463
|
-
/** Number of items to load. */
|
|
2464
|
-
limit?: number | null;
|
|
2465
|
-
/**
|
|
2466
|
-
* Pointer to the next or previous page in the list of results.
|
|
2467
|
-
*
|
|
2468
|
-
* You can get the relevant cursor token
|
|
2469
|
-
* from the `pagingMetadata` object in the previous call's response.
|
|
2470
|
-
* Not relevant for the first request.
|
|
2471
|
-
*/
|
|
2472
|
-
cursor?: string | null;
|
|
2473
|
-
}
|
|
2474
|
-
interface ReferencedItemOptions$1 {
|
|
2475
|
-
/** Field containing references in the queried item. */
|
|
2476
|
-
fieldName?: string;
|
|
2477
|
-
/** Maximum number of referenced items to include for each queried item. */
|
|
2478
|
-
limit?: number | null;
|
|
2479
|
-
}
|
|
2480
|
-
interface QueryDataItemsResponse$1 {
|
|
2481
|
-
/** Retrieved items. */
|
|
2482
|
-
dataItems?: DataItem$1[];
|
|
2483
|
-
/** Paging information. */
|
|
2484
|
-
pagingMetadata?: PagingMetadataV2$1;
|
|
2485
|
-
}
|
|
2486
|
-
interface PagingMetadataV2$1 {
|
|
2487
|
-
/** Number of items returned in the response. */
|
|
2488
|
-
count?: number | null;
|
|
2489
|
-
/** Offset that was requested. */
|
|
2490
|
-
offset?: number | null;
|
|
2491
|
-
/** Total number of items that match the query. Returned if offset paging is used, `returnTotalCount` is `true` in the request, and `tooManyToCount` is false. */
|
|
2492
|
-
total?: number | null;
|
|
2493
|
-
/** Whether the server failed to calculate the `total` field. */
|
|
2494
|
-
tooManyToCount?: boolean | null;
|
|
2495
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
2496
|
-
cursors?: Cursors$1;
|
|
2497
|
-
}
|
|
2498
|
-
interface Cursors$1 {
|
|
2499
|
-
/** Cursor pointing to next page in the list of results. */
|
|
2500
|
-
next?: string | null;
|
|
2501
|
-
/** Cursor pointing to previous page in the list of results. */
|
|
2502
|
-
prev?: string | null;
|
|
2503
|
-
}
|
|
2504
|
-
interface AggregateDataItemsRequest$1 extends AggregateDataItemsRequestPagingMethodOneOf$1 {
|
|
2505
|
-
/** Paging options to limit and skip the number of items. */
|
|
2506
|
-
paging?: Paging$3;
|
|
2507
|
-
/** 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`. */
|
|
2508
|
-
cursorPaging?: CursorPaging$1;
|
|
2509
|
-
/** ID of the collection on which to run the aggregation. */
|
|
2510
|
-
dataCollectionId: string;
|
|
2511
|
-
/**
|
|
2512
|
-
* 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.
|
|
2513
|
-
*
|
|
2514
|
-
* **Note:** The values you provide for each filter field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `"someDateAndTimeFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).
|
|
2515
|
-
*/
|
|
2516
|
-
initialFilter?: Record<string, any> | null;
|
|
2517
|
-
/** Aggregation applied to the data. */
|
|
2518
|
-
aggregation?: Aggregation$1;
|
|
2519
|
-
/**
|
|
2520
|
-
* 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.
|
|
2521
|
-
* **Note:** The values you provide for each filter field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `"someDateAndTimeFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).
|
|
2522
|
-
*/
|
|
2523
|
-
finalFilter?: Record<string, any> | null;
|
|
2524
|
-
/**
|
|
2525
|
-
* Sort object in the following format:
|
|
2526
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
2527
|
-
*/
|
|
2528
|
-
sort?: Sorting$1[];
|
|
2529
|
-
/**
|
|
2530
|
-
* Whether to return the total count in the response for a query with offset paging.
|
|
2531
|
-
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
2532
|
-
*
|
|
2533
|
-
* Default: `false`
|
|
2534
|
-
*/
|
|
2535
|
-
returnTotalCount?: boolean;
|
|
2536
|
-
/**
|
|
2537
|
-
* Whether to retrieve data from the primary database instance.
|
|
2538
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2539
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2540
|
-
*
|
|
2541
|
-
* Default: `false`
|
|
2542
|
-
*/
|
|
2543
|
-
consistentRead?: boolean;
|
|
2544
|
-
/**
|
|
2545
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
2546
|
-
* If provided, the result text is returned in the specified language.
|
|
2547
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
2548
|
-
*
|
|
2549
|
-
* If not provided, result text is not translated.
|
|
2550
|
-
*/
|
|
2551
|
-
language?: string | null;
|
|
2552
|
-
/**
|
|
2553
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2554
|
-
*
|
|
2555
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2556
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2557
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2558
|
-
*/
|
|
2559
|
-
appOptions?: Record<string, any> | null;
|
|
2560
|
-
/**
|
|
2561
|
-
* Options for the Publish plugin.
|
|
2562
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2563
|
-
*/
|
|
2564
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2565
|
-
}
|
|
2566
|
-
/** @oneof */
|
|
2567
|
-
interface AggregateDataItemsRequestPagingMethodOneOf$1 {
|
|
2568
|
-
/** Paging options to limit and skip the number of items. */
|
|
2569
|
-
paging?: Paging$3;
|
|
2570
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
2571
|
-
cursorPaging?: CursorPaging$1;
|
|
2572
|
-
}
|
|
2573
|
-
interface Average$1 {
|
|
2574
|
-
/** Name of the field for which to calculate the average value. */
|
|
2575
|
-
itemFieldName?: string;
|
|
2576
|
-
}
|
|
2577
|
-
interface Min$1 {
|
|
2578
|
-
/** Name of the field for which to calculate the minimum value. */
|
|
2579
|
-
itemFieldName?: string;
|
|
2580
|
-
}
|
|
2581
|
-
interface Max$1 {
|
|
2582
|
-
/** Name of the field for which to calculate the maximum value. */
|
|
2583
|
-
itemFieldName?: string;
|
|
2584
|
-
}
|
|
2585
|
-
interface Sum$1 {
|
|
2586
|
-
/** Name of the field for which to calculate the sum. */
|
|
2587
|
-
itemFieldName?: string;
|
|
2588
|
-
}
|
|
2589
|
-
interface Count$1 {
|
|
2590
|
-
}
|
|
2591
|
-
interface Operation$1 extends OperationCalculateOneOf$1 {
|
|
2592
|
-
/** Calculate the average value of a specified field for all items in the grouping. */
|
|
2593
|
-
average?: Average$1;
|
|
2594
|
-
/** Calculate the minimum value of a specified field for all items in the grouping. */
|
|
2595
|
-
min?: Min$1;
|
|
2596
|
-
/** Calculate the maximum value of a specified field for all items in the grouping. */
|
|
2597
|
-
max?: Max$1;
|
|
2598
|
-
/** Calculate the sum of values of a specified field for all items in the grouping. */
|
|
2599
|
-
sum?: Sum$1;
|
|
2600
|
-
/** Calculate the number of items in the grouping. */
|
|
2601
|
-
itemCount?: Count$1;
|
|
2602
|
-
/** Name of the field containing results of the operation. */
|
|
2603
|
-
resultFieldName?: string;
|
|
2604
|
-
}
|
|
2605
|
-
/** @oneof */
|
|
2606
|
-
interface OperationCalculateOneOf$1 {
|
|
2607
|
-
/** Calculate the average value of a specified field for all items in the grouping. */
|
|
2608
|
-
average?: Average$1;
|
|
2609
|
-
/** Calculate the minimum value of a specified field for all items in the grouping. */
|
|
2610
|
-
min?: Min$1;
|
|
2611
|
-
/** Calculate the maximum value of a specified field for all items in the grouping. */
|
|
2612
|
-
max?: Max$1;
|
|
2613
|
-
/** Calculate the sum of values of a specified field for all items in the grouping. */
|
|
2614
|
-
sum?: Sum$1;
|
|
2615
|
-
/** Calculate the number of items in the grouping. */
|
|
2616
|
-
itemCount?: Count$1;
|
|
2617
|
-
}
|
|
2618
|
-
interface Aggregation$1 {
|
|
2619
|
-
/** Fields by which to group items for the aggregation. If empty, the aggregation is carried out on all items in the collection. */
|
|
2620
|
-
groupingFields?: string[];
|
|
2621
|
-
/** Operations to carry out on the data in each grouping. */
|
|
2622
|
-
operations?: Operation$1[];
|
|
2623
|
-
}
|
|
2624
|
-
interface AggregateDataItemsResponse$1 {
|
|
2625
|
-
/** Aggregation results. */
|
|
2626
|
-
results?: Record<string, any>[] | null;
|
|
2627
|
-
/** Paging information. */
|
|
2628
|
-
pagingMetadata?: PagingMetadataV2$1;
|
|
2629
|
-
}
|
|
2630
|
-
interface CountDataItemsRequest$1 {
|
|
2631
|
-
/** ID of the collection for which to count query results. */
|
|
2632
|
-
dataCollectionId: string;
|
|
2633
|
-
/**
|
|
2634
|
-
* Filter object in the following format:
|
|
2635
|
-
*
|
|
2636
|
-
* `"filter" : {
|
|
2637
|
-
* "fieldName1": "value1",
|
|
2638
|
-
* "fieldName2":{"$operator":"value2"}
|
|
2639
|
-
* }`.
|
|
2640
|
-
*
|
|
2641
|
-
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
2642
|
-
*
|
|
2643
|
-
* **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `"someDateAndTimeFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).
|
|
2644
|
-
*/
|
|
2645
|
-
filter?: Record<string, any> | null;
|
|
2646
|
-
/**
|
|
2647
|
-
* Whether to retrieve data from the primary database instance.
|
|
2648
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2649
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2650
|
-
*
|
|
2651
|
-
* Default: `false`
|
|
2652
|
-
*/
|
|
2653
|
-
consistentRead?: boolean;
|
|
2654
|
-
/**
|
|
2655
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
2656
|
-
* If provided, the result text is returned in the specified language.
|
|
2657
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
2658
|
-
*
|
|
2659
|
-
* If not provided, result text is not translated.
|
|
2660
|
-
*/
|
|
2661
|
-
language?: string | null;
|
|
2662
|
-
/**
|
|
2663
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2664
|
-
*
|
|
2665
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2666
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2667
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2668
|
-
*/
|
|
2669
|
-
appOptions?: Record<string, any> | null;
|
|
2670
|
-
/**
|
|
2671
|
-
* Options for the Publish plugin.
|
|
2672
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2673
|
-
*/
|
|
2674
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2675
|
-
}
|
|
2676
|
-
interface CountDataItemsResponse$1 {
|
|
2677
|
-
/** Number of items matching the query. */
|
|
2678
|
-
totalCount?: number;
|
|
2679
|
-
}
|
|
2680
|
-
interface QueryDistinctValuesRequest$1 extends QueryDistinctValuesRequestPagingMethodOneOf$1 {
|
|
2681
|
-
/** Paging options to limit and skip the number of items. */
|
|
2682
|
-
paging?: Paging$3;
|
|
2683
|
-
/** 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`. */
|
|
2684
|
-
cursorPaging?: CursorPaging$1;
|
|
2685
|
-
/** ID of the collection to query. */
|
|
2686
|
-
dataCollectionId: string;
|
|
2687
|
-
/** Item field name for which to return all distinct values. */
|
|
2688
|
-
fieldName?: string;
|
|
2689
|
-
/**
|
|
2690
|
-
* Filter object in the following format:
|
|
2691
|
-
*
|
|
2692
|
-
* `"filter" : {
|
|
2693
|
-
* "fieldName1": "value1",
|
|
2694
|
-
* "fieldName2":{"$operator":"value2"}
|
|
2695
|
-
* }`.
|
|
2696
|
-
*
|
|
2697
|
-
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
2698
|
-
*
|
|
2699
|
-
* **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `"someDateAndTimeFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).
|
|
2700
|
-
*/
|
|
2701
|
-
filter?: Record<string, any> | null;
|
|
2702
|
-
/** Sort order. */
|
|
2703
|
-
order?: SortOrder$1;
|
|
2704
|
-
/**
|
|
2705
|
-
* Whether to return the total count in the response for a query with offset paging.
|
|
2706
|
-
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
2707
|
-
*
|
|
2708
|
-
* Default: `false`
|
|
2709
|
-
*/
|
|
2710
|
-
returnTotalCount?: boolean;
|
|
2711
|
-
/**
|
|
2712
|
-
* Whether to retrieve data from the primary database instance.
|
|
2713
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2714
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2715
|
-
*
|
|
2716
|
-
* Default: `false`
|
|
2717
|
-
*/
|
|
2718
|
-
consistentRead?: boolean;
|
|
2719
|
-
/**
|
|
2720
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
2721
|
-
* If provided, the result text is returned in the specified language.
|
|
2722
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
2723
|
-
*
|
|
2724
|
-
* If not provided, result text is not translated.
|
|
2725
|
-
*/
|
|
2726
|
-
language?: string | null;
|
|
2727
|
-
/**
|
|
2728
|
-
* Options for the Publish plugin.
|
|
2729
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2730
|
-
*/
|
|
2731
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2732
|
-
}
|
|
2733
|
-
/** @oneof */
|
|
2734
|
-
interface QueryDistinctValuesRequestPagingMethodOneOf$1 {
|
|
2735
|
-
/** Paging options to limit and skip the number of items. */
|
|
2736
|
-
paging?: Paging$3;
|
|
2737
|
-
/** 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`. */
|
|
2738
|
-
cursorPaging?: CursorPaging$1;
|
|
2739
|
-
}
|
|
2740
|
-
interface QueryDistinctValuesResponse$1 {
|
|
2741
|
-
/** List of distinct values contained in the field specified in `fieldName`. */
|
|
2742
|
-
distinctValues?: any[];
|
|
2743
|
-
/** Paging information. */
|
|
2744
|
-
pagingMetadata?: PagingMetadataV2$1;
|
|
2745
|
-
}
|
|
2746
|
-
interface BulkInsertDataItemsRequest$1 {
|
|
2747
|
-
/** ID of the collection in which to insert the items. */
|
|
2748
|
-
dataCollectionId: string;
|
|
2749
|
-
/** Data items to insert. */
|
|
2750
|
-
dataItems: DataItem$1[];
|
|
2751
|
-
/**
|
|
2752
|
-
* Whether to return the inserted data items.
|
|
2753
|
-
* When `true`, the `results` objects contain a `dataItem` field.
|
|
2754
|
-
*
|
|
2755
|
-
* Default: `false`
|
|
2756
|
-
*/
|
|
2757
|
-
returnEntity?: boolean;
|
|
2758
|
-
/**
|
|
2759
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2760
|
-
*
|
|
2761
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2762
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2763
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2764
|
-
*/
|
|
2765
|
-
appOptions?: Record<string, any> | null;
|
|
2766
|
-
}
|
|
2767
|
-
interface BulkInsertDataItemsResponse$1 {
|
|
2768
|
-
/** Information about the inserted items. */
|
|
2769
|
-
results?: BulkDataItemResult$1[];
|
|
2770
|
-
/** Bulk action metadata. */
|
|
2771
|
-
bulkActionMetadata?: BulkActionMetadata$1;
|
|
2772
|
-
}
|
|
2773
|
-
interface BulkUpdateDataItemsRequest$1 {
|
|
2774
|
-
/** ID of the collection in which to update items. */
|
|
2775
|
-
dataCollectionId: string;
|
|
2776
|
-
/** Data items to update. */
|
|
2777
|
-
dataItems: DataItem$1[];
|
|
2778
|
-
/**
|
|
2779
|
-
* Whether to return the updated data items.
|
|
2780
|
-
* When `true`, the `results` objects contain a `dataItem` field.
|
|
2781
|
-
*
|
|
2782
|
-
* Default: `false`
|
|
2783
|
-
*/
|
|
2784
|
-
returnEntity?: boolean;
|
|
2785
|
-
/**
|
|
2786
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2787
|
-
*
|
|
2788
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2789
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2790
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2791
|
-
*/
|
|
2792
|
-
appOptions?: Record<string, any> | null;
|
|
2793
|
-
/**
|
|
2794
|
-
* Options for the Publish plugin.
|
|
2795
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2796
|
-
*/
|
|
2797
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2798
|
-
}
|
|
2799
|
-
interface BulkUpdateDataItemsResponse$1 {
|
|
2800
|
-
/** Information about the updated items. */
|
|
2801
|
-
results?: BulkDataItemResult$1[];
|
|
2802
|
-
/** Bulk action metadata. */
|
|
2803
|
-
bulkActionMetadata?: BulkActionMetadata$1;
|
|
2804
|
-
}
|
|
2805
|
-
interface BulkSaveDataItemsRequest$1 {
|
|
2806
|
-
/** ID of the collection in which to insert or update the items. */
|
|
2807
|
-
dataCollectionId: string;
|
|
2808
|
-
/** Data items to insert or update. */
|
|
2809
|
-
dataItems: DataItem$1[];
|
|
2810
|
-
/**
|
|
2811
|
-
* Whether to return the saved data item.
|
|
2812
|
-
* When `true`, the `results` objects contain a `dataItem` field.
|
|
2813
|
-
*
|
|
2814
|
-
* Default: `false`
|
|
2815
|
-
*/
|
|
2816
|
-
returnEntity?: boolean;
|
|
2817
|
-
/**
|
|
2818
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2819
|
-
*
|
|
2820
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2821
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2822
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2823
|
-
*/
|
|
2824
|
-
appOptions?: Record<string, any> | null;
|
|
2825
|
-
/**
|
|
2826
|
-
* Options for the Publish plugin.
|
|
2827
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2828
|
-
*/
|
|
2829
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2830
|
-
}
|
|
2831
|
-
interface BulkSaveDataItemsResponse$1 {
|
|
2832
|
-
/** Information about the saved items. */
|
|
2833
|
-
results?: BulkDataItemResult$1[];
|
|
2834
|
-
/** Bulk action metadata. */
|
|
2835
|
-
bulkActionMetadata?: BulkActionMetadata$1;
|
|
2836
|
-
}
|
|
2837
|
-
interface BulkRemoveDataItemsRequest$1 {
|
|
2838
|
-
/** ID of the collection from which to remove the item. */
|
|
2839
|
-
dataCollectionId: string;
|
|
2840
|
-
/** IDs of data items to remove. */
|
|
2841
|
-
dataItemIds: string[];
|
|
2842
|
-
/**
|
|
2843
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2844
|
-
*
|
|
2845
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2846
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2847
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2848
|
-
*/
|
|
2849
|
-
appOptions?: Record<string, any> | null;
|
|
2850
|
-
/**
|
|
2851
|
-
* Options for the Publish plugin.
|
|
2852
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2853
|
-
*/
|
|
2854
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2855
|
-
}
|
|
2856
|
-
interface BulkRemoveDataItemsResponse$1 {
|
|
2857
|
-
/** Information about the removed data items. */
|
|
2858
|
-
results?: BulkDataItemResult$1[];
|
|
2859
|
-
/** Bulk action metadata. */
|
|
2860
|
-
bulkActionMetadata?: BulkActionMetadata$1;
|
|
2861
|
-
}
|
|
2862
|
-
interface QueryReferencedDataItemsRequest$1 extends QueryReferencedDataItemsRequestPagingMethodOneOf$1 {
|
|
2863
|
-
/** Paging options to limit and skip the number of items. */
|
|
2864
|
-
paging?: Paging$3;
|
|
2865
|
-
/** 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`. */
|
|
2866
|
-
cursorPaging?: CursorPaging$1;
|
|
2867
|
-
/** ID of the collection containing the referring item. */
|
|
2868
|
-
dataCollectionId: string;
|
|
2869
|
-
/** ID of the referring item. */
|
|
2870
|
-
referringItemId?: string;
|
|
2871
|
-
/** Field containing references in the referring item. */
|
|
2872
|
-
referringItemFieldName?: string;
|
|
2873
|
-
/** Order of the returned referenced items. Sorted by the date each item was referenced. */
|
|
2874
|
-
order?: SortOrder$1;
|
|
2875
|
-
/**
|
|
2876
|
-
* Whether to return the total count in the response.
|
|
2877
|
-
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
2878
|
-
*
|
|
2879
|
-
* Default: `false`
|
|
2880
|
-
*/
|
|
2881
|
-
returnTotalCount?: boolean;
|
|
2882
|
-
/**
|
|
2883
|
-
* Whether to retrieve data from the primary database instance.
|
|
2884
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2885
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2886
|
-
*
|
|
2887
|
-
* Default: `false`
|
|
2888
|
-
*/
|
|
2889
|
-
consistentRead?: boolean;
|
|
2890
|
-
/**
|
|
2891
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
2892
|
-
* If provided, the result text is returned in the specified language.
|
|
2893
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
2894
|
-
*
|
|
2895
|
-
* If not provided, result text is not translated.
|
|
2896
|
-
*/
|
|
2897
|
-
language?: string | null;
|
|
2898
|
-
/**
|
|
2899
|
-
* Fields to return for each referenced item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
2900
|
-
* **Note:** The `_id` system field is always returned.
|
|
2901
|
-
*/
|
|
2902
|
-
fields?: string[];
|
|
2903
|
-
/**
|
|
2904
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
|
|
2905
|
-
*
|
|
2906
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2907
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2908
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2909
|
-
*/
|
|
2910
|
-
appOptions?: Record<string, any> | null;
|
|
2911
|
-
/**
|
|
2912
|
-
* Options for the Publish plugin.
|
|
2913
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
2914
|
-
*/
|
|
2915
|
-
publishPluginOptions?: DataPublishPluginOptions$1;
|
|
2916
|
-
}
|
|
2917
|
-
/** @oneof */
|
|
2918
|
-
interface QueryReferencedDataItemsRequestPagingMethodOneOf$1 {
|
|
2919
|
-
/** Paging options to limit and skip the number of items. */
|
|
2920
|
-
paging?: Paging$3;
|
|
2921
|
-
/** 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`. */
|
|
2922
|
-
cursorPaging?: CursorPaging$1;
|
|
2923
|
-
}
|
|
2924
|
-
interface QueryReferencedDataItemsResponse$1 {
|
|
2925
|
-
/** Referenced items and/or IDs. For successfully resolved references, the referenced data item is returned. For references that can't be resolved, the ID is returned. */
|
|
2926
|
-
results?: ReferencedResult$1[];
|
|
2927
|
-
/** Paging information. */
|
|
2928
|
-
pagingMetadata?: PagingMetadataV2$1;
|
|
2929
|
-
}
|
|
2930
|
-
interface UnresolvedReference$1 {
|
|
2931
|
-
/**
|
|
2932
|
-
* ID of the referring item.
|
|
2933
|
-
* @deprecated
|
|
2934
|
-
* @targetRemovalDate 2025-03-01
|
|
2935
|
-
*/
|
|
2936
|
-
referringItemId?: string;
|
|
2937
|
-
/**
|
|
2938
|
-
* Field specified to query for references.
|
|
2939
|
-
* @deprecated
|
|
2940
|
-
* @targetRemovalDate 2025-03-01
|
|
2941
|
-
*/
|
|
2942
|
-
referringItemFieldName?: string;
|
|
2943
|
-
/** ID of unresolved referenced item */
|
|
2944
|
-
referencedItemId?: string;
|
|
2945
|
-
/** Flag is set if item exists, but user is not authorized to read it */
|
|
2946
|
-
unauthorized?: boolean;
|
|
2947
|
-
}
|
|
2948
|
-
interface ReferencedResult$1 extends ReferencedResultEntityOneOf$1 {
|
|
2949
|
-
/** Data item referenced. */
|
|
2950
|
-
dataItem?: DataItem$1;
|
|
2951
|
-
/** Unresolved reference. Appears instead of the data item when the reference doesn't resolve, for example, when an ID isn't found or if an item is in draft state. */
|
|
2952
|
-
unresolvedReference?: UnresolvedReference$1;
|
|
2953
|
-
/** ID of the referring item. */
|
|
2954
|
-
referringItemId?: string;
|
|
2955
|
-
}
|
|
2956
|
-
/** @oneof */
|
|
2957
|
-
interface ReferencedResultEntityOneOf$1 {
|
|
2958
|
-
/** Data item referenced. */
|
|
2959
|
-
dataItem?: DataItem$1;
|
|
2960
|
-
/** Unresolved reference. Appears instead of the data item when the reference doesn't resolve, for example, when an ID isn't found or if an item is in draft state. */
|
|
2961
|
-
unresolvedReference?: UnresolvedReference$1;
|
|
2962
|
-
}
|
|
2963
|
-
interface IsReferencedDataItemRequest$1 {
|
|
2964
|
-
/** ID of the collection containing the referring data item. */
|
|
2965
|
-
dataCollectionId: string;
|
|
2966
|
-
/** Field to check for a reference to the item that may be referenced. */
|
|
2967
|
-
referringItemFieldName: string;
|
|
2968
|
-
/** ID of the referring item. */
|
|
2969
|
-
referringItemId: string;
|
|
2970
|
-
/** ID of the item that may be referenced. */
|
|
2971
|
-
referencedItemId: string;
|
|
2972
|
-
/**
|
|
2973
|
-
* Whether to retrieve data from the primary database instance.
|
|
2974
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2975
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2976
|
-
*
|
|
2977
|
-
* Default: `false`
|
|
2978
|
-
*/
|
|
2979
|
-
consistentRead?: boolean;
|
|
2980
|
-
}
|
|
2981
|
-
interface IsReferencedDataItemResponse$1 {
|
|
2982
|
-
/** Whether the specified reference exists. */
|
|
2983
|
-
isReferenced?: boolean;
|
|
2984
|
-
}
|
|
2985
|
-
interface InsertDataItemReferenceRequest$1 {
|
|
2986
|
-
/** ID of the collection in which to insert the reference. */
|
|
2987
|
-
dataCollectionId: string;
|
|
2988
|
-
/** Reference to insert */
|
|
2989
|
-
dataItemReference?: DataItemReference$1;
|
|
2990
|
-
/**
|
|
2991
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2992
|
-
*
|
|
2993
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2994
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2995
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2996
|
-
*/
|
|
2997
|
-
appOptions?: Record<string, any> | null;
|
|
2998
|
-
}
|
|
2999
|
-
interface DataItemReference$1 {
|
|
3000
|
-
/** Referring item field containing the references to the referenced items. */
|
|
3001
|
-
referringItemFieldName?: string;
|
|
3002
|
-
/** ID of the referring item. */
|
|
3003
|
-
referringItemId?: string;
|
|
3004
|
-
/** ID of the referenced item. */
|
|
3005
|
-
referencedItemId?: string;
|
|
3006
|
-
}
|
|
3007
|
-
interface InsertDataItemReferenceResponse$1 {
|
|
3008
|
-
/** Inserted reference. */
|
|
3009
|
-
dataItemReference?: DataItemReference$1;
|
|
3010
|
-
}
|
|
3011
|
-
interface RemoveDataItemReferenceRequest$1 {
|
|
3012
|
-
/** ID of the collection containing the referring item. */
|
|
3013
|
-
dataCollectionId: string;
|
|
3014
|
-
/** Reference to remove. */
|
|
3015
|
-
dataItemReference: DataItemReference$1;
|
|
3016
|
-
}
|
|
3017
|
-
interface RemoveDataItemReferenceResponse$1 {
|
|
3018
|
-
/** Removed reference. */
|
|
3019
|
-
dataItemReference?: DataItemReference$1;
|
|
3020
|
-
}
|
|
3021
|
-
interface BulkInsertDataItemReferencesRequest$1 {
|
|
3022
|
-
/** ID of the collection containing the referring items. */
|
|
3023
|
-
dataCollectionId: string;
|
|
3024
|
-
/** References to insert. */
|
|
3025
|
-
dataItemReferences: DataItemReference$1[];
|
|
3026
|
-
/**
|
|
3027
|
-
* Whether to return the inserted data item references.
|
|
3028
|
-
* When `true`, the `results` objects contain a `dataItemReference` field.
|
|
3029
|
-
*
|
|
3030
|
-
* Default: `false`
|
|
3031
|
-
*/
|
|
3032
|
-
returnEntity?: boolean;
|
|
3033
|
-
}
|
|
3034
|
-
interface BulkInsertDataItemReferencesResponse$1 {
|
|
3035
|
-
/** Information about the inserted references. */
|
|
3036
|
-
results?: BulkDataItemReferenceResult$1[];
|
|
3037
|
-
/** Bulk action metadata. */
|
|
3038
|
-
bulkActionMetadata?: BulkActionMetadata$1;
|
|
3039
|
-
}
|
|
3040
|
-
interface BulkDataItemReferenceResult$1 {
|
|
3041
|
-
/** The action attempted for the reference. */
|
|
3042
|
-
action?: BulkActionType$1;
|
|
3043
|
-
/** Metadata related to the reference for which the action was attempted. */
|
|
3044
|
-
referenceMetadata?: ItemMetadata$1;
|
|
3045
|
-
/** The reference for which the action was attempted. Only returned if `returnEntity` is `true` in the request and the action is successful. */
|
|
3046
|
-
dataItemReference?: DataItemReference$1;
|
|
3047
|
-
}
|
|
3048
|
-
interface BulkRemoveDataItemReferencesRequest$1 {
|
|
3049
|
-
/** ID of the collection containing the referring items. */
|
|
3050
|
-
dataCollectionId: string;
|
|
3051
|
-
/** References to remove. */
|
|
3052
|
-
dataItemReferences: DataItemReference$1[];
|
|
3053
|
-
}
|
|
3054
|
-
interface BulkRemoveDataItemReferencesResponse$1 {
|
|
3055
|
-
/** Information about the removed references. */
|
|
3056
|
-
results?: BulkDataItemReferenceResult$1[];
|
|
3057
|
-
/** Bulk action metadata. */
|
|
3058
|
-
bulkActionMetadata?: BulkActionMetadata$1;
|
|
3059
|
-
}
|
|
3060
|
-
interface ReplaceDataItemReferencesRequest$1 {
|
|
3061
|
-
/** ID of the collection containing the referring item. */
|
|
3062
|
-
dataCollectionId: string;
|
|
3063
|
-
/** Field containing references in the referring item. */
|
|
3064
|
-
referringItemFieldName: string;
|
|
3065
|
-
/** ID of the referring item. */
|
|
3066
|
-
referringItemId: string;
|
|
3067
|
-
/** List of new referenced item IDs to replace the existing ones. */
|
|
3068
|
-
newReferencedItemIds?: string[];
|
|
3069
|
-
}
|
|
3070
|
-
interface ReplaceDataItemReferencesResponse$1 {
|
|
3071
|
-
/** Updated references. */
|
|
3072
|
-
dataItemReferences?: DataItemReference$1[];
|
|
3073
|
-
}
|
|
3074
|
-
interface DataItemNonNullableFields$1 {
|
|
3075
|
-
id: string;
|
|
3076
|
-
dataCollectionId: string;
|
|
3077
|
-
}
|
|
3078
|
-
interface InsertDataItemResponseNonNullableFields$1 {
|
|
3079
|
-
dataItem?: DataItemNonNullableFields$1;
|
|
3080
|
-
}
|
|
3081
|
-
interface UpdateDataItemResponseNonNullableFields$1 {
|
|
3082
|
-
dataItem?: DataItemNonNullableFields$1;
|
|
3083
|
-
}
|
|
3084
|
-
interface SaveDataItemResponseNonNullableFields$1 {
|
|
3085
|
-
action: Action$1;
|
|
3086
|
-
dataItem?: DataItemNonNullableFields$1;
|
|
3087
|
-
}
|
|
3088
|
-
interface GetDataItemResponseNonNullableFields$1 {
|
|
3089
|
-
dataItem?: DataItemNonNullableFields$1;
|
|
3090
|
-
}
|
|
3091
|
-
interface RemoveDataItemResponseNonNullableFields$1 {
|
|
3092
|
-
dataItem?: DataItemNonNullableFields$1;
|
|
3093
|
-
}
|
|
3094
|
-
interface CachingInfoNonNullableFields$1 {
|
|
3095
|
-
tags: string[];
|
|
3096
|
-
}
|
|
3097
|
-
interface QueryDataItemsResponseNonNullableFields$1 {
|
|
3098
|
-
dataItems: DataItemNonNullableFields$1[];
|
|
3099
|
-
cachingInfo?: CachingInfoNonNullableFields$1;
|
|
3100
|
-
}
|
|
3101
|
-
interface CountDataItemsResponseNonNullableFields$1 {
|
|
3102
|
-
totalCount: number;
|
|
3103
|
-
}
|
|
3104
|
-
interface ApplicationErrorNonNullableFields$1 {
|
|
3105
|
-
code: string;
|
|
3106
|
-
description: string;
|
|
3107
|
-
}
|
|
3108
|
-
interface ItemMetadataNonNullableFields$1 {
|
|
3109
|
-
originalIndex: number;
|
|
3110
|
-
success: boolean;
|
|
3111
|
-
error?: ApplicationErrorNonNullableFields$1;
|
|
3112
|
-
}
|
|
3113
|
-
interface BulkDataItemResultNonNullableFields$1 {
|
|
3114
|
-
action: BulkActionType$1;
|
|
3115
|
-
itemMetadata?: ItemMetadataNonNullableFields$1;
|
|
3116
|
-
dataItem?: DataItemNonNullableFields$1;
|
|
3117
|
-
}
|
|
3118
|
-
interface BulkActionMetadataNonNullableFields$1 {
|
|
3119
|
-
totalSuccesses: number;
|
|
3120
|
-
totalFailures: number;
|
|
3121
|
-
}
|
|
3122
|
-
interface BulkInsertDataItemsResponseNonNullableFields$1 {
|
|
3123
|
-
results: BulkDataItemResultNonNullableFields$1[];
|
|
3124
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields$1;
|
|
3125
|
-
}
|
|
3126
|
-
interface BulkUpdateDataItemsResponseNonNullableFields$1 {
|
|
3127
|
-
results: BulkDataItemResultNonNullableFields$1[];
|
|
3128
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields$1;
|
|
3129
|
-
}
|
|
3130
|
-
interface BulkSaveDataItemsResponseNonNullableFields$1 {
|
|
3131
|
-
results: BulkDataItemResultNonNullableFields$1[];
|
|
3132
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields$1;
|
|
3133
|
-
}
|
|
3134
|
-
interface BulkRemoveDataItemsResponseNonNullableFields$1 {
|
|
3135
|
-
results: BulkDataItemResultNonNullableFields$1[];
|
|
3136
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields$1;
|
|
3137
|
-
}
|
|
3138
|
-
interface UnresolvedReferenceNonNullableFields$1 {
|
|
3139
|
-
referringItemId: string;
|
|
3140
|
-
referringItemFieldName: string;
|
|
3141
|
-
referencedItemId: string;
|
|
3142
|
-
unauthorized: boolean;
|
|
3143
|
-
}
|
|
3144
|
-
interface ReferencedResultNonNullableFields$1 {
|
|
3145
|
-
dataItem?: DataItemNonNullableFields$1;
|
|
3146
|
-
unresolvedReference?: UnresolvedReferenceNonNullableFields$1;
|
|
3147
|
-
referringItemId: string;
|
|
3148
|
-
}
|
|
3149
|
-
interface QueryReferencedDataItemsResponseNonNullableFields$1 {
|
|
3150
|
-
results: ReferencedResultNonNullableFields$1[];
|
|
3151
|
-
}
|
|
3152
|
-
interface IsReferencedDataItemResponseNonNullableFields$1 {
|
|
3153
|
-
isReferenced: boolean;
|
|
3154
|
-
}
|
|
3155
|
-
interface DataItemReferenceNonNullableFields$1 {
|
|
3156
|
-
referringItemFieldName: string;
|
|
3157
|
-
referringItemId: string;
|
|
3158
|
-
referencedItemId: string;
|
|
3159
|
-
}
|
|
3160
|
-
interface InsertDataItemReferenceResponseNonNullableFields$1 {
|
|
3161
|
-
dataItemReference?: DataItemReferenceNonNullableFields$1;
|
|
3162
|
-
}
|
|
3163
|
-
interface RemoveDataItemReferenceResponseNonNullableFields$1 {
|
|
3164
|
-
dataItemReference?: DataItemReferenceNonNullableFields$1;
|
|
3165
|
-
}
|
|
3166
|
-
interface BulkDataItemReferenceResultNonNullableFields$1 {
|
|
3167
|
-
action: BulkActionType$1;
|
|
3168
|
-
referenceMetadata?: ItemMetadataNonNullableFields$1;
|
|
3169
|
-
dataItemReference?: DataItemReferenceNonNullableFields$1;
|
|
3170
|
-
}
|
|
3171
|
-
interface BulkInsertDataItemReferencesResponseNonNullableFields$1 {
|
|
3172
|
-
results: BulkDataItemReferenceResultNonNullableFields$1[];
|
|
3173
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields$1;
|
|
3174
|
-
}
|
|
3175
|
-
interface BulkRemoveDataItemReferencesResponseNonNullableFields$1 {
|
|
3176
|
-
results: BulkDataItemReferenceResultNonNullableFields$1[];
|
|
3177
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields$1;
|
|
3178
|
-
}
|
|
3179
|
-
interface ReplaceDataItemReferencesResponseNonNullableFields$1 {
|
|
3180
|
-
dataItemReferences: DataItemReferenceNonNullableFields$1[];
|
|
3181
|
-
}
|
|
3182
|
-
|
|
3183
|
-
interface DataItem {
|
|
3184
|
-
/** Data item ID. */
|
|
3185
|
-
_id?: string;
|
|
3186
|
-
/**
|
|
3187
|
-
* ID of the collection this item belongs to
|
|
3188
|
-
* @readonly
|
|
3189
|
-
*/
|
|
3190
|
-
dataCollectionId?: string;
|
|
3191
|
-
/**
|
|
3192
|
-
* Data item contents.
|
|
3193
|
-
*
|
|
3194
|
-
* Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:
|
|
3195
|
-
*
|
|
3196
|
-
* + `_id`: Item ID.
|
|
3197
|
-
* + `_createdDate`: Date and time the item was added to the collection.
|
|
3198
|
-
* + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
|
|
3199
|
-
* + `_ownerId`: ID of the user who created the item. Can be modified with site owner permissions.
|
|
3200
|
-
*/
|
|
3201
|
-
data?: Record<string, any> | null;
|
|
3202
|
-
}
|
|
3203
|
-
interface InsertDataItemRequest {
|
|
3204
|
-
/** ID of the collection in which to insert the item. */
|
|
3205
|
-
dataCollectionId: string;
|
|
3206
|
-
/** Item to insert. */
|
|
3207
|
-
dataItem: DataItem;
|
|
3208
|
-
/**
|
|
3209
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3210
|
-
*
|
|
3211
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3212
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3213
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3214
|
-
*/
|
|
3215
|
-
appOptions?: Record<string, any> | null;
|
|
3216
|
-
}
|
|
3217
|
-
interface InsertDataItemResponse {
|
|
3218
|
-
/** Inserted data item. */
|
|
3219
|
-
dataItem?: DataItem;
|
|
3220
|
-
}
|
|
3221
|
-
interface DataPublishPluginOptions {
|
|
3222
|
-
/**
|
|
3223
|
-
* Whether to include draft items.
|
|
3224
|
-
* When `true`, the response includes both published and draft items. Default: `false`.
|
|
3225
|
-
*/
|
|
3226
|
-
includeDraftItems?: boolean;
|
|
3227
|
-
}
|
|
3228
|
-
interface BulkDataItemResult {
|
|
3229
|
-
/**
|
|
3230
|
-
* The action attempted for the data item.
|
|
3231
|
-
*
|
|
3232
|
-
* Supported values: `UNKNOWN_ACTION_TYPE`, `INSERT`, `UPDATE`, `DELETE`.
|
|
3233
|
-
*/
|
|
3234
|
-
action?: BulkActionType;
|
|
3235
|
-
/** Metadata related to the data item for which the action was attempted. */
|
|
3236
|
-
itemMetadata?: ItemMetadata;
|
|
3237
|
-
/** The data item for which the action was attempted. Only returned if `returnEntity` is `true` in the request and the action is successful. */
|
|
3238
|
-
dataItem?: DataItem;
|
|
3239
|
-
}
|
|
3240
|
-
declare enum BulkActionType {
|
|
3241
|
-
UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE",
|
|
3242
|
-
INSERT = "INSERT",
|
|
3243
|
-
UPDATE = "UPDATE",
|
|
3244
|
-
DELETE = "DELETE",
|
|
3245
|
-
PATCH = "PATCH"
|
|
3246
|
-
}
|
|
3247
|
-
interface ItemMetadata {
|
|
3248
|
-
/** Item ID. This field doesn't appear if there is no item ID, for example, when item creation fails. */
|
|
3249
|
-
_id?: string | null;
|
|
3250
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
3251
|
-
originalIndex?: number;
|
|
3252
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
3253
|
-
success?: boolean;
|
|
3254
|
-
/** Details about the error in case of failure. */
|
|
3255
|
-
error?: ApplicationError;
|
|
3256
|
-
}
|
|
3257
|
-
interface ApplicationError {
|
|
3258
|
-
/** Error code. */
|
|
3259
|
-
code?: string;
|
|
3260
|
-
/** Description of the error. */
|
|
3261
|
-
description?: string;
|
|
3262
|
-
/** Data related to the error. */
|
|
3263
|
-
data?: Record<string, any> | null;
|
|
3264
|
-
}
|
|
3265
|
-
interface BulkActionMetadata {
|
|
3266
|
-
/** Number of items successfully processed. */
|
|
3267
|
-
totalSuccesses?: number;
|
|
3268
|
-
/** Number of items that couldn't be processed. */
|
|
3269
|
-
totalFailures?: number;
|
|
3270
|
-
}
|
|
3271
|
-
interface UpdateDataItemRequest {
|
|
3272
|
-
/** ID of the collection containing the existing item. */
|
|
3273
|
-
dataCollectionId: string;
|
|
3274
|
-
/** Updated data item content. The existing data item's content is replaced entirely. */
|
|
3275
|
-
dataItem: DataItem;
|
|
3276
|
-
/**
|
|
3277
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3278
|
-
*
|
|
3279
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3280
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3281
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3282
|
-
*/
|
|
3283
|
-
appOptions?: Record<string, any> | null;
|
|
3284
|
-
/**
|
|
3285
|
-
* Options for the Publish plugin.
|
|
3286
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3287
|
-
*/
|
|
3288
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3289
|
-
}
|
|
3290
|
-
interface UpdateDataItemResponse {
|
|
3291
|
-
/** Updated data item. */
|
|
3292
|
-
dataItem?: DataItem;
|
|
3293
|
-
}
|
|
3294
|
-
interface SaveDataItemRequest {
|
|
3295
|
-
/** ID of the collection in which to insert or update the item. */
|
|
3296
|
-
dataCollectionId: string;
|
|
3297
|
-
/** Data item to insert or update. */
|
|
3298
|
-
dataItem: DataItem;
|
|
3299
|
-
/**
|
|
3300
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3301
|
-
*
|
|
3302
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3303
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3304
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3305
|
-
*/
|
|
3306
|
-
appOptions?: Record<string, any> | null;
|
|
3307
|
-
/**
|
|
3308
|
-
* Options for the Publish plugin.
|
|
3309
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3310
|
-
*/
|
|
3311
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3312
|
-
}
|
|
3313
|
-
interface SaveDataItemResponse {
|
|
3314
|
-
/** The action carried out for the item. */
|
|
3315
|
-
action?: Action;
|
|
3316
|
-
/** Inserted or updated data item. */
|
|
3317
|
-
dataItem?: DataItem;
|
|
3318
|
-
}
|
|
3319
|
-
declare enum Action {
|
|
3320
|
-
/** Undefined action. */
|
|
3321
|
-
UNKNOWN_ACTION = "UNKNOWN_ACTION",
|
|
3322
|
-
/** A new item was added to the collection. */
|
|
3323
|
-
INSERTED = "INSERTED",
|
|
3324
|
-
/** An existing item in the collection was updated. */
|
|
3325
|
-
UPDATED = "UPDATED"
|
|
3326
|
-
}
|
|
3327
|
-
interface GetDataItemRequest {
|
|
3328
|
-
/** ID of the collection from which to retrieve the data item. */
|
|
3329
|
-
dataCollectionId: string;
|
|
3330
|
-
/** ID of the data item to retrieve. */
|
|
3331
|
-
dataItemId: string;
|
|
3332
|
-
/**
|
|
3333
|
-
* Whether to retrieve data from the primary database instance.
|
|
3334
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3335
|
-
*
|
|
3336
|
-
* Default: `false`
|
|
3337
|
-
*/
|
|
3338
|
-
consistentRead?: boolean;
|
|
3339
|
-
/**
|
|
3340
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3341
|
-
* If provided, the result text is returned in the specified language.
|
|
3342
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3343
|
-
*
|
|
3344
|
-
* If not provided, result text is not translated.
|
|
3345
|
-
*/
|
|
3346
|
-
language?: string | null;
|
|
3347
|
-
/**
|
|
3348
|
-
* Fields to return for the item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
3349
|
-
* **Note:** The `_id` system field is always returned.
|
|
3350
|
-
*/
|
|
3351
|
-
fields?: string[];
|
|
3352
|
-
/**
|
|
3353
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3354
|
-
*
|
|
3355
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3356
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3357
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3358
|
-
*/
|
|
3359
|
-
appOptions?: Record<string, any> | null;
|
|
3360
|
-
/**
|
|
3361
|
-
* Options for the Publish plugin.
|
|
3362
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3363
|
-
*/
|
|
3364
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3365
|
-
}
|
|
3366
|
-
interface GetDataItemResponse {
|
|
3367
|
-
/** Retrieved item. */
|
|
3368
|
-
dataItem?: DataItem;
|
|
3369
|
-
}
|
|
3370
|
-
interface RemoveDataItemRequest {
|
|
3371
|
-
/** ID of the collection from which to remove the item. */
|
|
3372
|
-
dataCollectionId: string;
|
|
3373
|
-
/** ID of the item to remove. */
|
|
3374
|
-
dataItemId: string;
|
|
3375
|
-
/**
|
|
3376
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3377
|
-
*
|
|
3378
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3379
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3380
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3381
|
-
*/
|
|
3382
|
-
appOptions?: Record<string, any> | null;
|
|
3383
|
-
/**
|
|
3384
|
-
* Options for the Publish plugin.
|
|
3385
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3386
|
-
*/
|
|
3387
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3388
|
-
}
|
|
3389
|
-
interface RemoveDataItemResponse {
|
|
3390
|
-
/** Removed item. */
|
|
3391
|
-
dataItem?: DataItem;
|
|
3392
|
-
}
|
|
3393
|
-
interface TruncateDataItemsRequest {
|
|
3394
|
-
/** ID of the collection to truncate. */
|
|
3395
|
-
dataCollectionId: string;
|
|
3396
|
-
}
|
|
3397
|
-
interface TruncateDataItemsResponse {
|
|
3398
|
-
}
|
|
3399
|
-
interface QueryDataItemsRequest {
|
|
3400
|
-
/** ID of the collection to query. */
|
|
3401
|
-
dataCollectionId: string;
|
|
3402
|
-
/** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */
|
|
3403
|
-
query?: QueryV2;
|
|
3404
|
-
/**
|
|
3405
|
-
* Whether to return the total count in the response for a query with offset paging.
|
|
3406
|
-
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
3407
|
-
*
|
|
3408
|
-
* Default: `false`
|
|
3409
|
-
*/
|
|
3410
|
-
returnTotalCount?: boolean;
|
|
3411
|
-
/**
|
|
3412
|
-
* Properties for which to include referenced items in the query's results.
|
|
3413
|
-
* Up to 50 referenced items can be included for each item that matches the query.
|
|
3414
|
-
* @deprecated
|
|
3415
|
-
* @replacedBy referenced_item_options
|
|
3416
|
-
* @targetRemovalDate 2025-08-01
|
|
3417
|
-
*/
|
|
3418
|
-
includeReferencedItems?: string[];
|
|
3419
|
-
/**
|
|
3420
|
-
* Whether to retrieve data from the primary database instance.
|
|
3421
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3422
|
-
*
|
|
3423
|
-
* Default: `false`
|
|
3424
|
-
*/
|
|
3425
|
-
consistentRead?: boolean;
|
|
3426
|
-
/**
|
|
3427
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3428
|
-
* If provided, the result text is returned in the specified language.
|
|
3429
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3430
|
-
*
|
|
3431
|
-
* If not provided, result text is not translated.
|
|
3432
|
-
*/
|
|
3433
|
-
language?: string | null;
|
|
3434
|
-
/**
|
|
3435
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3436
|
-
*
|
|
3437
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3438
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3439
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3440
|
-
*/
|
|
3441
|
-
appOptions?: Record<string, any> | null;
|
|
3442
|
-
/**
|
|
3443
|
-
* Options for the Publish plugin.
|
|
3444
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3445
|
-
*/
|
|
3446
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3447
|
-
/** Options for retrieving referenced items. */
|
|
3448
|
-
referencedItemOptions?: ReferencedItemOptions[];
|
|
3449
|
-
}
|
|
3450
|
-
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
3451
|
-
/** Paging options to limit and skip the number of items. */
|
|
3452
|
-
paging?: Paging$2;
|
|
3453
|
-
/** 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`. */
|
|
3454
|
-
cursorPaging?: CursorPaging;
|
|
3455
|
-
/**
|
|
3456
|
-
* Filter object in the following format:
|
|
3457
|
-
*
|
|
3458
|
-
* `"filter" : {
|
|
3459
|
-
* "fieldName1": "value1",
|
|
3460
|
-
* "fieldName2":{"$operator":"value2"}
|
|
3461
|
-
* }`
|
|
3462
|
-
*
|
|
3463
|
-
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
3464
|
-
*
|
|
3465
|
-
* **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `"someDateAndTimeFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).
|
|
3466
|
-
*/
|
|
3467
|
-
filter?: Record<string, any> | null;
|
|
3468
|
-
/**
|
|
3469
|
-
* Sort object in the following format:
|
|
3470
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
3471
|
-
*/
|
|
3472
|
-
sort?: Sorting[];
|
|
3473
|
-
/**
|
|
3474
|
-
* Fields to return for each item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
3475
|
-
* **Note:** The `_id` system field is always returned.
|
|
3476
|
-
*/
|
|
3477
|
-
fields?: string[];
|
|
3478
|
-
}
|
|
3479
|
-
/** @oneof */
|
|
3480
|
-
interface QueryV2PagingMethodOneOf {
|
|
3481
|
-
/** Paging options to limit and skip the number of items. */
|
|
3482
|
-
paging?: Paging$2;
|
|
3483
|
-
/** 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`. */
|
|
3484
|
-
cursorPaging?: CursorPaging;
|
|
3485
|
-
}
|
|
3486
|
-
interface Sorting {
|
|
3487
|
-
/** Name of the field to sort by. */
|
|
3488
|
-
fieldName?: string;
|
|
3489
|
-
/**
|
|
3490
|
-
* Sort order.
|
|
3491
|
-
*
|
|
3492
|
-
* Supported values: `ASC`, `DESC`.
|
|
3493
|
-
*/
|
|
3494
|
-
order?: SortOrder;
|
|
3495
|
-
}
|
|
3496
|
-
declare enum SortOrder {
|
|
3497
|
-
ASC = "ASC",
|
|
3498
|
-
DESC = "DESC"
|
|
3499
|
-
}
|
|
3500
|
-
interface Paging$2 {
|
|
3501
|
-
/** Number of items to load. */
|
|
3502
|
-
limit?: number | null;
|
|
3503
|
-
/** Number of items to skip in the current sort order. */
|
|
3504
|
-
offset?: number | null;
|
|
3505
|
-
}
|
|
3506
|
-
interface CursorPaging {
|
|
3507
|
-
/** Number of items to load. */
|
|
3508
|
-
limit?: number | null;
|
|
3509
|
-
/**
|
|
3510
|
-
* Pointer to the next or previous page in the list of results.
|
|
3511
|
-
*
|
|
3512
|
-
* You can get the relevant cursor token
|
|
3513
|
-
* from the `pagingMetadata` object in the previous call's response.
|
|
3514
|
-
* Not relevant for the first request.
|
|
3515
|
-
*/
|
|
3516
|
-
cursor?: string | null;
|
|
3517
|
-
}
|
|
3518
|
-
interface ReferencedItemOptions {
|
|
3519
|
-
/** Field containing references in the queried item. */
|
|
3520
|
-
fieldName?: string;
|
|
3521
|
-
/** Maximum number of referenced items to include for each queried item. */
|
|
3522
|
-
limit?: number | null;
|
|
3523
|
-
}
|
|
3524
|
-
interface QueryDataItemsResponse {
|
|
3525
|
-
/** Retrieved items. */
|
|
3526
|
-
dataItems?: DataItem[];
|
|
3527
|
-
/** Paging information. */
|
|
3528
|
-
pagingMetadata?: PagingMetadataV2;
|
|
3529
|
-
}
|
|
3530
|
-
interface PagingMetadataV2 {
|
|
3531
|
-
/** Number of items returned in the response. */
|
|
3532
|
-
count?: number | null;
|
|
3533
|
-
/** Offset that was requested. */
|
|
3534
|
-
offset?: number | null;
|
|
3535
|
-
/** Total number of items that match the query. Returned if offset paging is used, `returnTotalCount` is `true` in the request, and `tooManyToCount` is false. */
|
|
3536
|
-
total?: number | null;
|
|
3537
|
-
/** Whether the server failed to calculate the `total` field. */
|
|
3538
|
-
tooManyToCount?: boolean | null;
|
|
3539
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
3540
|
-
cursors?: Cursors;
|
|
3541
|
-
}
|
|
3542
|
-
interface Cursors {
|
|
3543
|
-
/** Cursor pointing to next page in the list of results. */
|
|
3544
|
-
next?: string | null;
|
|
3545
|
-
/** Cursor pointing to previous page in the list of results. */
|
|
3546
|
-
prev?: string | null;
|
|
3547
|
-
}
|
|
3548
|
-
interface AggregateDataItemsRequest extends AggregateDataItemsRequestPagingMethodOneOf {
|
|
3549
|
-
/** Paging options to limit and skip the number of items. */
|
|
3550
|
-
paging?: Paging$2;
|
|
3551
|
-
/** 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`. */
|
|
3552
|
-
cursorPaging?: CursorPaging;
|
|
3553
|
-
/** ID of the collection on which to run the aggregation. */
|
|
3554
|
-
dataCollectionId: string;
|
|
3555
|
-
/**
|
|
3556
|
-
* 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.
|
|
3557
|
-
*
|
|
3558
|
-
* **Note:** The values you provide for each filter field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `"someDateAndTimeFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).
|
|
3559
|
-
*/
|
|
3560
|
-
initialFilter?: Record<string, any> | null;
|
|
3561
|
-
/** Aggregation applied to the data. */
|
|
3562
|
-
aggregation?: Aggregation;
|
|
3563
|
-
/**
|
|
3564
|
-
* 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.
|
|
3565
|
-
* **Note:** The values you provide for each filter field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `"someDateAndTimeFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).
|
|
3566
|
-
*/
|
|
3567
|
-
finalFilter?: Record<string, any> | null;
|
|
3568
|
-
/**
|
|
3569
|
-
* Sort object in the following format:
|
|
3570
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
3571
|
-
*/
|
|
3572
|
-
sort?: Sorting[];
|
|
3573
|
-
/**
|
|
3574
|
-
* Whether to return the total count in the response for a query with offset paging.
|
|
3575
|
-
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
3576
|
-
*
|
|
3577
|
-
* Default: `false`
|
|
3578
|
-
*/
|
|
3579
|
-
returnTotalCount?: boolean;
|
|
3580
|
-
/**
|
|
3581
|
-
* Whether to retrieve data from the primary database instance.
|
|
3582
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3583
|
-
*
|
|
3584
|
-
* Default: `false`
|
|
3585
|
-
*/
|
|
3586
|
-
consistentRead?: boolean;
|
|
3587
|
-
/**
|
|
3588
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3589
|
-
* If provided, the result text is returned in the specified language.
|
|
3590
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3591
|
-
*
|
|
3592
|
-
* If not provided, result text is not translated.
|
|
3593
|
-
*/
|
|
3594
|
-
language?: string | null;
|
|
3595
|
-
/**
|
|
3596
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3597
|
-
*
|
|
3598
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3599
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3600
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3601
|
-
*/
|
|
3602
|
-
appOptions?: Record<string, any> | null;
|
|
3603
|
-
/**
|
|
3604
|
-
* Options for the Publish plugin.
|
|
3605
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3606
|
-
*/
|
|
3607
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3608
|
-
}
|
|
3609
|
-
/** @oneof */
|
|
3610
|
-
interface AggregateDataItemsRequestPagingMethodOneOf {
|
|
3611
|
-
/** Paging options to limit and skip the number of items. */
|
|
3612
|
-
paging?: Paging$2;
|
|
3613
|
-
/** 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`. */
|
|
3614
|
-
cursorPaging?: CursorPaging;
|
|
3615
|
-
}
|
|
3616
|
-
interface Average {
|
|
3617
|
-
/** Name of the field for which to calculate the average value. */
|
|
3618
|
-
itemFieldName?: string;
|
|
3619
|
-
}
|
|
3620
|
-
interface Min {
|
|
3621
|
-
/** Name of the field for which to calculate the minimum value. */
|
|
3622
|
-
itemFieldName?: string;
|
|
3623
|
-
}
|
|
3624
|
-
interface Max {
|
|
3625
|
-
/** Name of the field for which to calculate the maximum value. */
|
|
3626
|
-
itemFieldName?: string;
|
|
3627
|
-
}
|
|
3628
|
-
interface Sum {
|
|
3629
|
-
/** Name of the field for which to calculate the sum. */
|
|
3630
|
-
itemFieldName?: string;
|
|
3631
|
-
}
|
|
3632
|
-
interface Count {
|
|
3633
|
-
}
|
|
3634
|
-
interface Operation extends OperationCalculateOneOf {
|
|
3635
|
-
/** Calculate the average value of a specified field for all items in the grouping. */
|
|
3636
|
-
average?: Average;
|
|
3637
|
-
/** Calculate the minimum value of a specified field for all items in the grouping. */
|
|
3638
|
-
min?: Min;
|
|
3639
|
-
/** Calculate the maximum value of a specified field for all items in the grouping. */
|
|
3640
|
-
max?: Max;
|
|
3641
|
-
/** Calculate the sum of values of a specified field for all items in the grouping. */
|
|
3642
|
-
sum?: Sum;
|
|
3643
|
-
/** Calculate the number of items in the grouping. */
|
|
3644
|
-
itemCount?: Count;
|
|
3645
|
-
/** Name of the field containing results of the operation. */
|
|
3646
|
-
resultFieldName?: string;
|
|
3647
|
-
}
|
|
3648
|
-
/** @oneof */
|
|
3649
|
-
interface OperationCalculateOneOf {
|
|
3650
|
-
/** Calculate the average value of a specified field for all items in the grouping. */
|
|
3651
|
-
average?: Average;
|
|
3652
|
-
/** Calculate the minimum value of a specified field for all items in the grouping. */
|
|
3653
|
-
min?: Min;
|
|
3654
|
-
/** Calculate the maximum value of a specified field for all items in the grouping. */
|
|
3655
|
-
max?: Max;
|
|
3656
|
-
/** Calculate the sum of values of a specified field for all items in the grouping. */
|
|
3657
|
-
sum?: Sum;
|
|
3658
|
-
/** Calculate the number of items in the grouping. */
|
|
3659
|
-
itemCount?: Count;
|
|
3660
|
-
}
|
|
3661
|
-
interface Aggregation {
|
|
3662
|
-
/** Fields by which to group items for the aggregation. If empty, the aggregation is carried out on all items in the collection. */
|
|
3663
|
-
groupingFields?: string[];
|
|
3664
|
-
/** Operations to carry out on the data in each grouping. */
|
|
3665
|
-
operations?: Operation[];
|
|
3666
|
-
}
|
|
3667
|
-
interface AggregateDataItemsResponse {
|
|
3668
|
-
/** Aggregation results. */
|
|
3669
|
-
results?: Record<string, any>[] | null;
|
|
3670
|
-
/** Paging information. */
|
|
3671
|
-
pagingMetadata?: PagingMetadataV2;
|
|
3672
|
-
}
|
|
3673
|
-
interface CountDataItemsRequest {
|
|
3674
|
-
/** ID of the collection for which to count query results. */
|
|
3675
|
-
dataCollectionId: string;
|
|
3676
|
-
/**
|
|
3677
|
-
* Filter object in the following format:
|
|
3678
|
-
*
|
|
3679
|
-
* `"filter" : {
|
|
3680
|
-
* "fieldName1": "value1",
|
|
3681
|
-
* "fieldName2":{"$operator":"value2"}
|
|
3682
|
-
* }`.
|
|
3683
|
-
*
|
|
3684
|
-
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
3685
|
-
*
|
|
3686
|
-
* **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `"someDateAndTimeFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).
|
|
3687
|
-
*/
|
|
3688
|
-
filter?: Record<string, any> | null;
|
|
3689
|
-
/**
|
|
3690
|
-
* Whether to retrieve data from the primary database instance.
|
|
3691
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3692
|
-
*
|
|
3693
|
-
* Default: `false`
|
|
3694
|
-
*/
|
|
3695
|
-
consistentRead?: boolean;
|
|
3696
|
-
/**
|
|
3697
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3698
|
-
* If provided, the result text is returned in the specified language.
|
|
3699
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3700
|
-
*
|
|
3701
|
-
* If not provided, result text is not translated.
|
|
3702
|
-
*/
|
|
3703
|
-
language?: string | null;
|
|
3704
|
-
/**
|
|
3705
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3706
|
-
*
|
|
3707
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3708
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3709
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3710
|
-
*/
|
|
3711
|
-
appOptions?: Record<string, any> | null;
|
|
3712
|
-
/**
|
|
3713
|
-
* Options for the Publish plugin.
|
|
3714
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3715
|
-
*/
|
|
3716
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3717
|
-
}
|
|
3718
|
-
interface CountDataItemsResponse {
|
|
3719
|
-
/** Number of items matching the query. */
|
|
3720
|
-
totalCount?: number;
|
|
3721
|
-
}
|
|
3722
|
-
interface QueryDistinctValuesRequest extends QueryDistinctValuesRequestPagingMethodOneOf {
|
|
3723
|
-
/** Paging options to limit and skip the number of items. */
|
|
3724
|
-
paging?: Paging$2;
|
|
3725
|
-
/** 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`. */
|
|
3726
|
-
cursorPaging?: CursorPaging;
|
|
3727
|
-
/** ID of the collection to query. */
|
|
3728
|
-
dataCollectionId: string;
|
|
3729
|
-
/** Item field name for which to return all distinct values. */
|
|
3730
|
-
fieldName?: string;
|
|
3731
|
-
/**
|
|
3732
|
-
* Filter object in the following format:
|
|
3733
|
-
*
|
|
3734
|
-
* `"filter" : {
|
|
3735
|
-
* "fieldName1": "value1",
|
|
3736
|
-
* "fieldName2":{"$operator":"value2"}
|
|
3737
|
-
* }`.
|
|
3738
|
-
*
|
|
3739
|
-
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
3740
|
-
*
|
|
3741
|
-
* **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `"someDateAndTimeFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).
|
|
3742
|
-
*/
|
|
3743
|
-
filter?: Record<string, any> | null;
|
|
3744
|
-
/**
|
|
3745
|
-
* Sort order.
|
|
3746
|
-
*
|
|
3747
|
-
* Supported values: `ASC`, `DESC`.
|
|
3748
|
-
*/
|
|
3749
|
-
order?: SortOrder;
|
|
3750
|
-
/**
|
|
3751
|
-
* Whether to return the total count in the response for a query with offset paging.
|
|
3752
|
-
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
3753
|
-
*
|
|
3754
|
-
* Default: `false`
|
|
3755
|
-
*/
|
|
3756
|
-
returnTotalCount?: boolean;
|
|
3757
|
-
/**
|
|
3758
|
-
* Whether to retrieve data from the primary database instance.
|
|
3759
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3760
|
-
*
|
|
3761
|
-
* Default: `false`
|
|
3762
|
-
*/
|
|
3763
|
-
consistentRead?: boolean;
|
|
3764
|
-
/**
|
|
3765
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3766
|
-
* If provided, the result text is returned in the specified language.
|
|
3767
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3768
|
-
*
|
|
3769
|
-
* If not provided, result text is not translated.
|
|
3770
|
-
*/
|
|
3771
|
-
language?: string | null;
|
|
3772
|
-
/**
|
|
3773
|
-
* Options for the Publish plugin.
|
|
3774
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3775
|
-
*/
|
|
3776
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3777
|
-
}
|
|
3778
|
-
/** @oneof */
|
|
3779
|
-
interface QueryDistinctValuesRequestPagingMethodOneOf {
|
|
3780
|
-
/** Paging options to limit and skip the number of items. */
|
|
3781
|
-
paging?: Paging$2;
|
|
3782
|
-
/** 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`. */
|
|
3783
|
-
cursorPaging?: CursorPaging;
|
|
3784
|
-
}
|
|
3785
|
-
interface QueryDistinctValuesResponse {
|
|
3786
|
-
/** List of distinct values contained in the field specified in `fieldName`. */
|
|
3787
|
-
distinctValues?: any[];
|
|
3788
|
-
/** Paging information. */
|
|
3789
|
-
pagingMetadata?: PagingMetadataV2;
|
|
3790
|
-
}
|
|
3791
|
-
interface BulkInsertDataItemsRequest {
|
|
3792
|
-
/** ID of the collection in which to insert the items. */
|
|
3793
|
-
dataCollectionId: string;
|
|
3794
|
-
/** Data items to insert. */
|
|
3795
|
-
dataItems: DataItem[];
|
|
3796
|
-
/**
|
|
3797
|
-
* Whether to return the inserted data items.
|
|
3798
|
-
* When `true`, the `results` objects contain a `dataItem` field.
|
|
3799
|
-
*
|
|
3800
|
-
* Default: `false`
|
|
3801
|
-
*/
|
|
3802
|
-
returnEntity?: boolean;
|
|
3803
|
-
/**
|
|
3804
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3805
|
-
*
|
|
3806
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3807
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3808
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3809
|
-
*/
|
|
3810
|
-
appOptions?: Record<string, any> | null;
|
|
3811
|
-
}
|
|
3812
|
-
interface BulkInsertDataItemsResponse {
|
|
3813
|
-
/** Information about the inserted items. */
|
|
3814
|
-
results?: BulkDataItemResult[];
|
|
3815
|
-
/** Bulk action metadata. */
|
|
3816
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
3817
|
-
}
|
|
3818
|
-
interface BulkUpdateDataItemsRequest {
|
|
3819
|
-
/** ID of the collection in which to update items. */
|
|
3820
|
-
dataCollectionId: string;
|
|
3821
|
-
/** Data items to update. */
|
|
3822
|
-
dataItems: DataItem[];
|
|
3823
|
-
/**
|
|
3824
|
-
* Whether to return the updated data items.
|
|
3825
|
-
* When `true`, the `results` objects contain a `dataItem` field.
|
|
3826
|
-
*
|
|
3827
|
-
* Default: `false`
|
|
3828
|
-
*/
|
|
3829
|
-
returnEntity?: boolean;
|
|
3830
|
-
/**
|
|
3831
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3832
|
-
*
|
|
3833
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3834
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3835
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3836
|
-
*/
|
|
3837
|
-
appOptions?: Record<string, any> | null;
|
|
3838
|
-
/**
|
|
3839
|
-
* Options for the Publish plugin.
|
|
3840
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3841
|
-
*/
|
|
3842
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3843
|
-
}
|
|
3844
|
-
interface BulkUpdateDataItemsResponse {
|
|
3845
|
-
/** Information about the updated items. */
|
|
3846
|
-
results?: BulkDataItemResult[];
|
|
3847
|
-
/** Bulk action metadata. */
|
|
3848
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
3849
|
-
}
|
|
3850
|
-
interface BulkSaveDataItemsRequest {
|
|
3851
|
-
/** ID of the collection in which to insert or update the items. */
|
|
3852
|
-
dataCollectionId: string;
|
|
3853
|
-
/** Data items to insert or update. */
|
|
3854
|
-
dataItems: DataItem[];
|
|
3855
|
-
/**
|
|
3856
|
-
* Whether to return the saved data item.
|
|
3857
|
-
* When `true`, the `results` objects contain a `dataItem` field.
|
|
3858
|
-
*
|
|
3859
|
-
* Default: `false`
|
|
3860
|
-
*/
|
|
3861
|
-
returnEntity?: boolean;
|
|
3862
|
-
/**
|
|
3863
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3864
|
-
*
|
|
3865
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3866
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3867
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3868
|
-
*/
|
|
3869
|
-
appOptions?: Record<string, any> | null;
|
|
3870
|
-
/**
|
|
3871
|
-
* Options for the Publish plugin.
|
|
3872
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3873
|
-
*/
|
|
3874
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3875
|
-
}
|
|
3876
|
-
interface BulkSaveDataItemsResponse {
|
|
3877
|
-
/** Information about the saved items. */
|
|
3878
|
-
results?: BulkDataItemResult[];
|
|
3879
|
-
/** Bulk action metadata. */
|
|
3880
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
3881
|
-
}
|
|
3882
|
-
interface BulkRemoveDataItemsRequest {
|
|
3883
|
-
/** ID of the collection from which to remove the item. */
|
|
3884
|
-
dataCollectionId: string;
|
|
3885
|
-
/** IDs of data items to remove. */
|
|
3886
|
-
dataItemIds: string[];
|
|
3887
|
-
/**
|
|
3888
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3889
|
-
*
|
|
3890
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3891
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3892
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3893
|
-
*/
|
|
3894
|
-
appOptions?: Record<string, any> | null;
|
|
3895
|
-
/**
|
|
3896
|
-
* Options for the Publish plugin.
|
|
3897
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3898
|
-
*/
|
|
3899
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3900
|
-
}
|
|
3901
|
-
interface BulkRemoveDataItemsResponse {
|
|
3902
|
-
/** Information about the removed data items. */
|
|
3903
|
-
results?: BulkDataItemResult[];
|
|
3904
|
-
/** Bulk action metadata. */
|
|
3905
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
3906
|
-
}
|
|
3907
|
-
interface QueryReferencedDataItemsRequest extends QueryReferencedDataItemsRequestPagingMethodOneOf {
|
|
3908
|
-
/** Paging options to limit and skip the number of items. */
|
|
3909
|
-
paging?: Paging$2;
|
|
3910
|
-
/** 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`. */
|
|
3911
|
-
cursorPaging?: CursorPaging;
|
|
3912
|
-
/** ID of the collection containing the referring item. */
|
|
3913
|
-
dataCollectionId: string;
|
|
3914
|
-
/** ID of the referring item. */
|
|
3915
|
-
referringItemId?: string;
|
|
3916
|
-
/** Field containing references in the referring item. */
|
|
3917
|
-
referringItemFieldName?: string;
|
|
3918
|
-
/** Order of the returned referenced items. Sorted by the date each item was referenced. */
|
|
3919
|
-
order?: SortOrder;
|
|
3920
|
-
/**
|
|
3921
|
-
* Whether to return the total count in the response.
|
|
3922
|
-
* When `true`, the `pagingMetadata` object in the response contains a `total` field.
|
|
3923
|
-
*
|
|
3924
|
-
* Default: `false`
|
|
3925
|
-
*/
|
|
3926
|
-
returnTotalCount?: boolean;
|
|
3927
|
-
/**
|
|
3928
|
-
* Whether to retrieve data from the primary database instance.
|
|
3929
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
3930
|
-
*
|
|
3931
|
-
* Default: `false`
|
|
3932
|
-
*/
|
|
3933
|
-
consistentRead?: boolean;
|
|
3934
|
-
/**
|
|
3935
|
-
* Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
|
|
3936
|
-
* If provided, the result text is returned in the specified language.
|
|
3937
|
-
* **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).
|
|
3938
|
-
*
|
|
3939
|
-
* If not provided, result text is not translated.
|
|
3940
|
-
*/
|
|
3941
|
-
language?: string | null;
|
|
3942
|
-
/**
|
|
3943
|
-
* Fields to return for each referenced item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.
|
|
3944
|
-
* **Note:** The `_id` system field is always returned.
|
|
3945
|
-
*/
|
|
3946
|
-
fields?: string[];
|
|
3947
|
-
/**
|
|
3948
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
|
|
3949
|
-
*
|
|
3950
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3951
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3952
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3953
|
-
*/
|
|
3954
|
-
appOptions?: Record<string, any> | null;
|
|
3955
|
-
/**
|
|
3956
|
-
* Options for the Publish plugin.
|
|
3957
|
-
* This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
|
|
3958
|
-
*/
|
|
3959
|
-
publishPluginOptions?: DataPublishPluginOptions;
|
|
3960
|
-
}
|
|
3961
|
-
/** @oneof */
|
|
3962
|
-
interface QueryReferencedDataItemsRequestPagingMethodOneOf {
|
|
3963
|
-
/** Paging options to limit and skip the number of items. */
|
|
3964
|
-
paging?: Paging$2;
|
|
3965
|
-
/** 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`. */
|
|
3966
|
-
cursorPaging?: CursorPaging;
|
|
3967
|
-
}
|
|
3968
|
-
interface QueryReferencedDataItemsResponse {
|
|
3969
|
-
/** Referenced items and/or IDs. For successfully resolved references, the referenced data item is returned. For references that can't be resolved, the ID is returned. */
|
|
3970
|
-
results?: ReferencedResult[];
|
|
3971
|
-
/** Paging information. */
|
|
3972
|
-
pagingMetadata?: PagingMetadataV2;
|
|
3973
|
-
}
|
|
3974
|
-
interface UnresolvedReference {
|
|
3975
|
-
/**
|
|
3976
|
-
* ID of the referring item.
|
|
3977
|
-
* @deprecated
|
|
3978
|
-
* @targetRemovalDate 2025-03-01
|
|
3979
|
-
*/
|
|
3980
|
-
referringItemId?: string;
|
|
3981
|
-
/**
|
|
3982
|
-
* Field specified to query for references.
|
|
3983
|
-
* @deprecated
|
|
3984
|
-
* @targetRemovalDate 2025-03-01
|
|
3985
|
-
*/
|
|
3986
|
-
referringItemFieldName?: string;
|
|
3987
|
-
/** ID of unresolved referenced item */
|
|
3988
|
-
referencedItemId?: string;
|
|
3989
|
-
/** Flag is set if item exists, but user is not authorized to read it */
|
|
3990
|
-
unauthorized?: boolean;
|
|
3991
|
-
}
|
|
3992
|
-
interface ReferencedResult extends ReferencedResultEntityOneOf {
|
|
3993
|
-
/** Data item referenced. */
|
|
3994
|
-
dataItem?: DataItem;
|
|
3995
|
-
/** Unresolved reference. Appears instead of the data item when the reference doesn't resolve, for example, when an ID isn't found or if an item is in draft state. */
|
|
3996
|
-
unresolvedReference?: UnresolvedReference;
|
|
3997
|
-
/** ID of the referring item. */
|
|
3998
|
-
referringItemId?: string;
|
|
3999
|
-
}
|
|
4000
|
-
/** @oneof */
|
|
4001
|
-
interface ReferencedResultEntityOneOf {
|
|
4002
|
-
/** Data item referenced. */
|
|
4003
|
-
dataItem?: DataItem;
|
|
4004
|
-
/** Unresolved reference. Appears instead of the data item when the reference doesn't resolve, for example, when an ID isn't found or if an item is in draft state. */
|
|
4005
|
-
unresolvedReference?: UnresolvedReference;
|
|
4006
|
-
}
|
|
4007
|
-
interface IsReferencedDataItemRequest {
|
|
4008
|
-
/** ID of the collection containing the referring data item. */
|
|
4009
|
-
dataCollectionId: string;
|
|
4010
|
-
/** Field to check for a reference to the item that may be referenced. */
|
|
4011
|
-
referringItemFieldName: string;
|
|
4012
|
-
/** ID of the referring item. */
|
|
4013
|
-
referringItemId: string;
|
|
4014
|
-
/** ID of the item that may be referenced. */
|
|
4015
|
-
referencedItemId: string;
|
|
4016
|
-
/**
|
|
4017
|
-
* Whether to retrieve data from the primary database instance.
|
|
4018
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
4019
|
-
*
|
|
4020
|
-
* Default: `false`
|
|
4021
|
-
*/
|
|
4022
|
-
consistentRead?: boolean;
|
|
4023
|
-
}
|
|
4024
|
-
interface IsReferencedDataItemResponse {
|
|
4025
|
-
/** Whether the specified reference exists. */
|
|
4026
|
-
isReferenced?: boolean;
|
|
4027
|
-
}
|
|
4028
|
-
interface InsertDataItemReferenceRequest {
|
|
4029
|
-
/** ID of the collection in which to insert the reference. */
|
|
4030
|
-
dataCollectionId: string;
|
|
4031
|
-
/** Reference to insert */
|
|
4032
|
-
dataItemReference?: DataItemReference;
|
|
4033
|
-
/**
|
|
4034
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
4035
|
-
*
|
|
4036
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
4037
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
4038
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
4039
|
-
*/
|
|
4040
|
-
appOptions?: Record<string, any> | null;
|
|
4041
|
-
}
|
|
4042
|
-
interface DataItemReference {
|
|
4043
|
-
/** Referring item field containing the references to the referenced items. */
|
|
4044
|
-
referringItemFieldName?: string;
|
|
4045
|
-
/** ID of the referring item. */
|
|
4046
|
-
referringItemId?: string;
|
|
4047
|
-
/** ID of the referenced item. */
|
|
4048
|
-
referencedItemId?: string;
|
|
4049
|
-
}
|
|
4050
|
-
interface InsertDataItemReferenceResponse {
|
|
4051
|
-
/** Inserted reference. */
|
|
4052
|
-
dataItemReference?: DataItemReference;
|
|
4053
|
-
}
|
|
4054
|
-
interface RemoveDataItemReferenceRequest {
|
|
4055
|
-
/** ID of the collection containing the referring item. */
|
|
4056
|
-
dataCollectionId: string;
|
|
4057
|
-
/** Reference to remove. */
|
|
4058
|
-
dataItemReference: DataItemReference;
|
|
4059
|
-
}
|
|
4060
|
-
interface RemoveDataItemReferenceResponse {
|
|
4061
|
-
/** Removed reference. */
|
|
4062
|
-
dataItemReference?: DataItemReference;
|
|
4063
|
-
}
|
|
4064
|
-
interface BulkInsertDataItemReferencesRequest {
|
|
4065
|
-
/** ID of the collection containing the referring items. */
|
|
4066
|
-
dataCollectionId: string;
|
|
4067
|
-
/** References to insert. */
|
|
4068
|
-
dataItemReferences: DataItemReference[];
|
|
4069
|
-
/**
|
|
4070
|
-
* Whether to return the inserted data item references.
|
|
4071
|
-
* When `true`, the `results` objects contain a `dataItemReference` field.
|
|
4072
|
-
*
|
|
4073
|
-
* Default: `false`
|
|
4074
|
-
*/
|
|
4075
|
-
returnEntity?: boolean;
|
|
4076
|
-
}
|
|
4077
|
-
interface BulkInsertDataItemReferencesResponse {
|
|
4078
|
-
/** Information about the inserted references. */
|
|
4079
|
-
results?: BulkDataItemReferenceResult[];
|
|
4080
|
-
/** Bulk action metadata. */
|
|
4081
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
4082
|
-
}
|
|
4083
|
-
interface BulkDataItemReferenceResult {
|
|
4084
|
-
/**
|
|
4085
|
-
* The action attempted for the reference.
|
|
4086
|
-
*
|
|
4087
|
-
* Supported values: `UNKNOWN_ACTION_TYPE`, `INSERT`, `UPDATE`, `DELETE`.
|
|
4088
|
-
*/
|
|
4089
|
-
action?: BulkActionType;
|
|
4090
|
-
/** Metadata related to the reference for which the action was attempted. */
|
|
4091
|
-
referenceMetadata?: ItemMetadata;
|
|
4092
|
-
/** The reference for which the action was attempted. Only returned if `returnEntity` is `true` in the request and the action is successful. */
|
|
4093
|
-
dataItemReference?: DataItemReference;
|
|
4094
|
-
}
|
|
4095
|
-
interface BulkRemoveDataItemReferencesRequest {
|
|
4096
|
-
/** ID of the collection containing the referring items. */
|
|
4097
|
-
dataCollectionId: string;
|
|
4098
|
-
/** References to remove. */
|
|
4099
|
-
dataItemReferences: DataItemReference[];
|
|
4100
|
-
}
|
|
4101
|
-
interface BulkRemoveDataItemReferencesResponse {
|
|
4102
|
-
/** Information about the removed references. */
|
|
4103
|
-
results?: BulkDataItemReferenceResult[];
|
|
4104
|
-
/** Bulk action metadata. */
|
|
4105
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
4106
|
-
}
|
|
4107
|
-
interface ReplaceDataItemReferencesRequest {
|
|
4108
|
-
/** ID of the collection containing the referring item. */
|
|
4109
|
-
dataCollectionId: string;
|
|
4110
|
-
/** Field containing references in the referring item. */
|
|
4111
|
-
referringItemFieldName: string;
|
|
4112
|
-
/** ID of the referring item. */
|
|
4113
|
-
referringItemId: string;
|
|
4114
|
-
/** List of new referenced item IDs to replace the existing ones. */
|
|
4115
|
-
newReferencedItemIds?: string[];
|
|
4116
|
-
}
|
|
4117
|
-
interface ReplaceDataItemReferencesResponse {
|
|
4118
|
-
/** Updated references. */
|
|
4119
|
-
dataItemReferences?: DataItemReference[];
|
|
4120
|
-
}
|
|
4121
|
-
interface DataItemNonNullableFields {
|
|
4122
|
-
_id: string;
|
|
4123
|
-
dataCollectionId: string;
|
|
4124
|
-
}
|
|
4125
|
-
interface InsertDataItemResponseNonNullableFields {
|
|
4126
|
-
dataItem?: DataItemNonNullableFields;
|
|
4127
|
-
}
|
|
4128
|
-
interface UpdateDataItemResponseNonNullableFields {
|
|
4129
|
-
dataItem?: DataItemNonNullableFields;
|
|
4130
|
-
}
|
|
4131
|
-
interface SaveDataItemResponseNonNullableFields {
|
|
4132
|
-
action: Action;
|
|
4133
|
-
dataItem?: DataItemNonNullableFields;
|
|
4134
|
-
}
|
|
4135
|
-
interface GetDataItemResponseNonNullableFields {
|
|
4136
|
-
dataItem?: DataItemNonNullableFields;
|
|
4137
|
-
}
|
|
4138
|
-
interface RemoveDataItemResponseNonNullableFields {
|
|
4139
|
-
dataItem?: DataItemNonNullableFields;
|
|
4140
|
-
}
|
|
4141
|
-
interface CachingInfoNonNullableFields {
|
|
4142
|
-
tags: string[];
|
|
4143
|
-
}
|
|
4144
|
-
interface QueryDataItemsResponseNonNullableFields {
|
|
4145
|
-
dataItems: DataItemNonNullableFields[];
|
|
4146
|
-
cachingInfo?: CachingInfoNonNullableFields;
|
|
4147
|
-
}
|
|
4148
|
-
interface CountDataItemsResponseNonNullableFields {
|
|
4149
|
-
totalCount: number;
|
|
4150
|
-
}
|
|
4151
|
-
interface ApplicationErrorNonNullableFields {
|
|
4152
|
-
code: string;
|
|
4153
|
-
description: string;
|
|
4154
|
-
}
|
|
4155
|
-
interface ItemMetadataNonNullableFields {
|
|
4156
|
-
originalIndex: number;
|
|
4157
|
-
success: boolean;
|
|
4158
|
-
error?: ApplicationErrorNonNullableFields;
|
|
4159
|
-
}
|
|
4160
|
-
interface BulkDataItemResultNonNullableFields {
|
|
4161
|
-
action: BulkActionType;
|
|
4162
|
-
itemMetadata?: ItemMetadataNonNullableFields;
|
|
4163
|
-
dataItem?: DataItemNonNullableFields;
|
|
4164
|
-
}
|
|
4165
|
-
interface BulkActionMetadataNonNullableFields {
|
|
4166
|
-
totalSuccesses: number;
|
|
4167
|
-
totalFailures: number;
|
|
4168
|
-
}
|
|
4169
|
-
interface BulkInsertDataItemsResponseNonNullableFields {
|
|
4170
|
-
results: BulkDataItemResultNonNullableFields[];
|
|
4171
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
4172
|
-
}
|
|
4173
|
-
interface BulkUpdateDataItemsResponseNonNullableFields {
|
|
4174
|
-
results: BulkDataItemResultNonNullableFields[];
|
|
4175
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
4176
|
-
}
|
|
4177
|
-
interface BulkSaveDataItemsResponseNonNullableFields {
|
|
4178
|
-
results: BulkDataItemResultNonNullableFields[];
|
|
4179
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
4180
|
-
}
|
|
4181
|
-
interface BulkRemoveDataItemsResponseNonNullableFields {
|
|
4182
|
-
results: BulkDataItemResultNonNullableFields[];
|
|
4183
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
4184
|
-
}
|
|
4185
|
-
interface UnresolvedReferenceNonNullableFields {
|
|
4186
|
-
referringItemId: string;
|
|
4187
|
-
referringItemFieldName: string;
|
|
4188
|
-
referencedItemId: string;
|
|
4189
|
-
unauthorized: boolean;
|
|
4190
|
-
}
|
|
4191
|
-
interface ReferencedResultNonNullableFields {
|
|
4192
|
-
dataItem?: DataItemNonNullableFields;
|
|
4193
|
-
unresolvedReference?: UnresolvedReferenceNonNullableFields;
|
|
4194
|
-
referringItemId: string;
|
|
4195
|
-
}
|
|
4196
|
-
interface QueryReferencedDataItemsResponseNonNullableFields {
|
|
4197
|
-
results: ReferencedResultNonNullableFields[];
|
|
4198
|
-
}
|
|
4199
|
-
interface IsReferencedDataItemResponseNonNullableFields {
|
|
4200
|
-
isReferenced: boolean;
|
|
4201
|
-
}
|
|
4202
|
-
interface DataItemReferenceNonNullableFields {
|
|
4203
|
-
referringItemFieldName: string;
|
|
4204
|
-
referringItemId: string;
|
|
4205
|
-
referencedItemId: string;
|
|
4206
|
-
}
|
|
4207
|
-
interface InsertDataItemReferenceResponseNonNullableFields {
|
|
4208
|
-
dataItemReference?: DataItemReferenceNonNullableFields;
|
|
4209
|
-
}
|
|
4210
|
-
interface RemoveDataItemReferenceResponseNonNullableFields {
|
|
4211
|
-
dataItemReference?: DataItemReferenceNonNullableFields;
|
|
4212
|
-
}
|
|
4213
|
-
interface BulkDataItemReferenceResultNonNullableFields {
|
|
4214
|
-
action: BulkActionType;
|
|
4215
|
-
referenceMetadata?: ItemMetadataNonNullableFields;
|
|
4216
|
-
dataItemReference?: DataItemReferenceNonNullableFields;
|
|
4217
|
-
}
|
|
4218
|
-
interface BulkInsertDataItemReferencesResponseNonNullableFields {
|
|
4219
|
-
results: BulkDataItemReferenceResultNonNullableFields[];
|
|
4220
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
4221
|
-
}
|
|
4222
|
-
interface BulkRemoveDataItemReferencesResponseNonNullableFields {
|
|
4223
|
-
results: BulkDataItemReferenceResultNonNullableFields[];
|
|
4224
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
4225
|
-
}
|
|
4226
|
-
interface ReplaceDataItemReferencesResponseNonNullableFields {
|
|
4227
|
-
dataItemReferences: DataItemReferenceNonNullableFields[];
|
|
4228
|
-
}
|
|
4229
|
-
|
|
4230
|
-
type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4231
|
-
getUrl: (context: any) => string;
|
|
4232
|
-
httpMethod: K;
|
|
4233
|
-
path: string;
|
|
4234
|
-
pathParams: M;
|
|
4235
|
-
__requestType: T;
|
|
4236
|
-
__originalRequestType: S;
|
|
4237
|
-
__responseType: Q;
|
|
4238
|
-
__originalResponseType: R;
|
|
4239
|
-
};
|
|
4240
|
-
declare function insertDataItem(): __PublicMethodMetaInfo$1<'POST', {}, InsertDataItemRequest, InsertDataItemRequest$1, InsertDataItemResponse & InsertDataItemResponseNonNullableFields, InsertDataItemResponse$1 & InsertDataItemResponseNonNullableFields$1>;
|
|
4241
|
-
declare function updateDataItem(): __PublicMethodMetaInfo$1<'PUT', {
|
|
4242
|
-
dataItemId: string;
|
|
4243
|
-
}, UpdateDataItemRequest, UpdateDataItemRequest$1, UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields, UpdateDataItemResponse$1 & UpdateDataItemResponseNonNullableFields$1>;
|
|
4244
|
-
declare function saveDataItem(): __PublicMethodMetaInfo$1<'POST', {}, SaveDataItemRequest, SaveDataItemRequest$1, SaveDataItemResponse & SaveDataItemResponseNonNullableFields, SaveDataItemResponse$1 & SaveDataItemResponseNonNullableFields$1>;
|
|
4245
|
-
declare function getDataItem(): __PublicMethodMetaInfo$1<'GET', {
|
|
4246
|
-
dataItemId: string;
|
|
4247
|
-
}, GetDataItemRequest, GetDataItemRequest$1, GetDataItemResponse & GetDataItemResponseNonNullableFields, GetDataItemResponse$1 & GetDataItemResponseNonNullableFields$1>;
|
|
4248
|
-
declare function removeDataItem(): __PublicMethodMetaInfo$1<'DELETE', {
|
|
4249
|
-
dataItemId: string;
|
|
4250
|
-
}, RemoveDataItemRequest, RemoveDataItemRequest$1, RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields, RemoveDataItemResponse$1 & RemoveDataItemResponseNonNullableFields$1>;
|
|
4251
|
-
declare function truncateDataItems(): __PublicMethodMetaInfo$1<'POST', {}, TruncateDataItemsRequest, TruncateDataItemsRequest$1, TruncateDataItemsResponse, TruncateDataItemsResponse$1>;
|
|
4252
|
-
declare function queryDataItems(): __PublicMethodMetaInfo$1<'GET', {}, QueryDataItemsRequest, QueryDataItemsRequest$1, QueryDataItemsResponse & QueryDataItemsResponseNonNullableFields, QueryDataItemsResponse$1 & QueryDataItemsResponseNonNullableFields$1>;
|
|
4253
|
-
declare function aggregateDataItems(): __PublicMethodMetaInfo$1<'GET', {}, AggregateDataItemsRequest, AggregateDataItemsRequest$1, AggregateDataItemsResponse, AggregateDataItemsResponse$1>;
|
|
4254
|
-
declare function countDataItems(): __PublicMethodMetaInfo$1<'GET', {}, CountDataItemsRequest, CountDataItemsRequest$1, CountDataItemsResponse & CountDataItemsResponseNonNullableFields, CountDataItemsResponse$1 & CountDataItemsResponseNonNullableFields$1>;
|
|
4255
|
-
declare function queryDistinctValues(): __PublicMethodMetaInfo$1<'GET', {}, QueryDistinctValuesRequest, QueryDistinctValuesRequest$1, QueryDistinctValuesResponse, QueryDistinctValuesResponse$1>;
|
|
4256
|
-
declare function bulkInsertDataItems(): __PublicMethodMetaInfo$1<'POST', {}, BulkInsertDataItemsRequest, BulkInsertDataItemsRequest$1, BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields, BulkInsertDataItemsResponse$1 & BulkInsertDataItemsResponseNonNullableFields$1>;
|
|
4257
|
-
declare function bulkUpdateDataItems(): __PublicMethodMetaInfo$1<'POST', {}, BulkUpdateDataItemsRequest, BulkUpdateDataItemsRequest$1, BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields, BulkUpdateDataItemsResponse$1 & BulkUpdateDataItemsResponseNonNullableFields$1>;
|
|
4258
|
-
declare function bulkSaveDataItems(): __PublicMethodMetaInfo$1<'POST', {}, BulkSaveDataItemsRequest, BulkSaveDataItemsRequest$1, BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields, BulkSaveDataItemsResponse$1 & BulkSaveDataItemsResponseNonNullableFields$1>;
|
|
4259
|
-
declare function bulkRemoveDataItems(): __PublicMethodMetaInfo$1<'POST', {}, BulkRemoveDataItemsRequest, BulkRemoveDataItemsRequest$1, BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields, BulkRemoveDataItemsResponse$1 & BulkRemoveDataItemsResponseNonNullableFields$1>;
|
|
4260
|
-
declare function queryReferencedDataItems(): __PublicMethodMetaInfo$1<'GET', {}, QueryReferencedDataItemsRequest, QueryReferencedDataItemsRequest$1, QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields, QueryReferencedDataItemsResponse$1 & QueryReferencedDataItemsResponseNonNullableFields$1>;
|
|
4261
|
-
declare function isReferencedDataItem(): __PublicMethodMetaInfo$1<'GET', {}, IsReferencedDataItemRequest, IsReferencedDataItemRequest$1, IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields, IsReferencedDataItemResponse$1 & IsReferencedDataItemResponseNonNullableFields$1>;
|
|
4262
|
-
declare function insertDataItemReference(): __PublicMethodMetaInfo$1<'POST', {}, InsertDataItemReferenceRequest, InsertDataItemReferenceRequest$1, InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields, InsertDataItemReferenceResponse$1 & InsertDataItemReferenceResponseNonNullableFields$1>;
|
|
4263
|
-
declare function removeDataItemReference(): __PublicMethodMetaInfo$1<'POST', {}, RemoveDataItemReferenceRequest, RemoveDataItemReferenceRequest$1, RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields, RemoveDataItemReferenceResponse$1 & RemoveDataItemReferenceResponseNonNullableFields$1>;
|
|
4264
|
-
declare function bulkInsertDataItemReferences(): __PublicMethodMetaInfo$1<'POST', {}, BulkInsertDataItemReferencesRequest, BulkInsertDataItemReferencesRequest$1, BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields, BulkInsertDataItemReferencesResponse$1 & BulkInsertDataItemReferencesResponseNonNullableFields$1>;
|
|
4265
|
-
declare function bulkRemoveDataItemReferences(): __PublicMethodMetaInfo$1<'POST', {}, BulkRemoveDataItemReferencesRequest, BulkRemoveDataItemReferencesRequest$1, BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields, BulkRemoveDataItemReferencesResponse$1 & BulkRemoveDataItemReferencesResponseNonNullableFields$1>;
|
|
4266
|
-
declare function replaceDataItemReferences(): __PublicMethodMetaInfo$1<'POST', {}, ReplaceDataItemReferencesRequest, ReplaceDataItemReferencesRequest$1, ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields, ReplaceDataItemReferencesResponse$1 & ReplaceDataItemReferencesResponseNonNullableFields$1>;
|
|
4267
|
-
|
|
4268
|
-
declare const meta$1_aggregateDataItems: typeof aggregateDataItems;
|
|
4269
|
-
declare const meta$1_bulkInsertDataItemReferences: typeof bulkInsertDataItemReferences;
|
|
4270
|
-
declare const meta$1_bulkInsertDataItems: typeof bulkInsertDataItems;
|
|
4271
|
-
declare const meta$1_bulkRemoveDataItemReferences: typeof bulkRemoveDataItemReferences;
|
|
4272
|
-
declare const meta$1_bulkRemoveDataItems: typeof bulkRemoveDataItems;
|
|
4273
|
-
declare const meta$1_bulkSaveDataItems: typeof bulkSaveDataItems;
|
|
4274
|
-
declare const meta$1_bulkUpdateDataItems: typeof bulkUpdateDataItems;
|
|
4275
|
-
declare const meta$1_countDataItems: typeof countDataItems;
|
|
4276
|
-
declare const meta$1_getDataItem: typeof getDataItem;
|
|
4277
|
-
declare const meta$1_insertDataItem: typeof insertDataItem;
|
|
4278
|
-
declare const meta$1_insertDataItemReference: typeof insertDataItemReference;
|
|
4279
|
-
declare const meta$1_isReferencedDataItem: typeof isReferencedDataItem;
|
|
4280
|
-
declare const meta$1_queryDataItems: typeof queryDataItems;
|
|
4281
|
-
declare const meta$1_queryDistinctValues: typeof queryDistinctValues;
|
|
4282
|
-
declare const meta$1_queryReferencedDataItems: typeof queryReferencedDataItems;
|
|
4283
|
-
declare const meta$1_removeDataItem: typeof removeDataItem;
|
|
4284
|
-
declare const meta$1_removeDataItemReference: typeof removeDataItemReference;
|
|
4285
|
-
declare const meta$1_replaceDataItemReferences: typeof replaceDataItemReferences;
|
|
4286
|
-
declare const meta$1_saveDataItem: typeof saveDataItem;
|
|
4287
|
-
declare const meta$1_truncateDataItems: typeof truncateDataItems;
|
|
4288
|
-
declare const meta$1_updateDataItem: typeof updateDataItem;
|
|
4289
|
-
declare namespace meta$1 {
|
|
4290
|
-
export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_aggregateDataItems as aggregateDataItems, meta$1_bulkInsertDataItemReferences as bulkInsertDataItemReferences, meta$1_bulkInsertDataItems as bulkInsertDataItems, meta$1_bulkRemoveDataItemReferences as bulkRemoveDataItemReferences, meta$1_bulkRemoveDataItems as bulkRemoveDataItems, meta$1_bulkSaveDataItems as bulkSaveDataItems, meta$1_bulkUpdateDataItems as bulkUpdateDataItems, meta$1_countDataItems as countDataItems, meta$1_getDataItem as getDataItem, meta$1_insertDataItem as insertDataItem, meta$1_insertDataItemReference as insertDataItemReference, meta$1_isReferencedDataItem as isReferencedDataItem, meta$1_queryDataItems as queryDataItems, meta$1_queryDistinctValues as queryDistinctValues, meta$1_queryReferencedDataItems as queryReferencedDataItems, meta$1_removeDataItem as removeDataItem, meta$1_removeDataItemReference as removeDataItemReference, meta$1_replaceDataItemReferences as replaceDataItemReferences, meta$1_saveDataItem as saveDataItem, meta$1_truncateDataItems as truncateDataItems, meta$1_updateDataItem as updateDataItem };
|
|
4291
|
-
}
|
|
4292
|
-
|
|
4293
|
-
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
4294
|
-
interface Index$1 {
|
|
4295
|
-
/** Name of the index. */
|
|
4296
|
-
name?: string;
|
|
4297
|
-
/**
|
|
4298
|
-
* Fields for which the index is defined.
|
|
4299
|
-
*
|
|
4300
|
-
* Max: 3 fields (for a unique index: 1 field)
|
|
4301
|
-
*/
|
|
4302
|
-
fields?: Field$1[];
|
|
4303
|
-
/**
|
|
4304
|
-
* Current status of the index.
|
|
4305
|
-
* @readonly
|
|
4306
|
-
*/
|
|
4307
|
-
status?: Status$1;
|
|
4308
|
-
/**
|
|
4309
|
-
* Contains details about the reasons for failure when `status` is `FAILED`.
|
|
4310
|
-
* @readonly
|
|
4311
|
-
*/
|
|
4312
|
-
failure?: Failure$1;
|
|
4313
|
-
/**
|
|
4314
|
-
* Whether the index enforces uniqueness of values in the field for which it is defined.
|
|
4315
|
-
* If `true`, the index can have only one field.
|
|
4316
|
-
*
|
|
4317
|
-
* Default: `false`
|
|
4318
|
-
*/
|
|
4319
|
-
unique?: boolean;
|
|
4320
|
-
/**
|
|
4321
|
-
* Whether the index ignores case.
|
|
4322
|
-
*
|
|
4323
|
-
* Default: `false`
|
|
4324
|
-
*/
|
|
4325
|
-
caseInsensitive?: boolean;
|
|
4326
|
-
}
|
|
4327
|
-
/**
|
|
4328
|
-
* Order determines how values are ordered in the index. This is important when
|
|
4329
|
-
* ordering and/or range querying by indexed fields.
|
|
4330
|
-
*/
|
|
4331
|
-
declare enum Order$1 {
|
|
4332
|
-
ASC = "ASC",
|
|
4333
|
-
DESC = "DESC"
|
|
4334
|
-
}
|
|
4335
|
-
interface Field$1 {
|
|
4336
|
-
/** Path of the field to index. For example: `title` or `options.price`. */
|
|
4337
|
-
path?: string;
|
|
4338
|
-
/**
|
|
4339
|
-
* Sort order for the index. Base on how the data is regularly queried.
|
|
4340
|
-
*
|
|
4341
|
-
* Default: `ASC`
|
|
4342
|
-
*/
|
|
4343
|
-
order?: Order$1;
|
|
4344
|
-
}
|
|
4345
|
-
declare enum Status$1 {
|
|
4346
|
-
/** Place holder. Never returned by the service. */
|
|
4347
|
-
UNKNOWN = "UNKNOWN",
|
|
4348
|
-
/** Index creation is in progress. */
|
|
4349
|
-
BUILDING = "BUILDING",
|
|
4350
|
-
/** Index has been successfully created and can be used in queries. */
|
|
4351
|
-
ACTIVE = "ACTIVE",
|
|
4352
|
-
/** Index is in the process of being dropped. */
|
|
4353
|
-
DROPPING = "DROPPING",
|
|
4354
|
-
/** Index has been dropped successfully. */
|
|
4355
|
-
DROPPED = "DROPPED",
|
|
4356
|
-
/** Index creation has failed. */
|
|
4357
|
-
FAILED = "FAILED",
|
|
4358
|
-
/** Index contains incorrectly indexed data. */
|
|
4359
|
-
INVALID = "INVALID"
|
|
4360
|
-
}
|
|
4361
|
-
interface Failure$1 {
|
|
4362
|
-
/**
|
|
4363
|
-
* Error code.
|
|
4364
|
-
* - `WDE0112`: Unknown error while building collection index.
|
|
4365
|
-
* - `WDE0113`: Duplicate key error while building collection index.
|
|
4366
|
-
* - `WDE0114`: Document too large while building collection index.
|
|
4367
|
-
*/
|
|
4368
|
-
code?: string;
|
|
4369
|
-
/** Description of the failure. */
|
|
4370
|
-
description?: string;
|
|
4371
|
-
/**
|
|
4372
|
-
* ID of the data item that caused the failure.
|
|
4373
|
-
* For example, if `unique` is `true`, the ID of an item containing a duplicate value.
|
|
4374
|
-
*/
|
|
4375
|
-
itemId?: string | null;
|
|
4376
|
-
}
|
|
4377
|
-
interface CreateIndexRequest$1 {
|
|
4378
|
-
/** Details of the index to be created. */
|
|
4379
|
-
index: Index$1;
|
|
4380
|
-
/** ID of the data collection for which to generate the index. */
|
|
4381
|
-
dataCollectionId: string;
|
|
4382
|
-
}
|
|
4383
|
-
interface CreateIndexResponse$1 {
|
|
4384
|
-
/** Details of the index being generated. */
|
|
4385
|
-
index?: Index$1;
|
|
4386
|
-
}
|
|
4387
|
-
interface DropIndexRequest$1 {
|
|
4388
|
-
/** Name of the index to drop. */
|
|
4389
|
-
indexName: string;
|
|
4390
|
-
/** ID of the data collection for which the index to be dropped is defined. */
|
|
4391
|
-
dataCollectionId: string;
|
|
4392
|
-
}
|
|
4393
|
-
interface DropIndexResponse$1 {
|
|
4394
|
-
}
|
|
4395
|
-
interface ListIndexesRequest$1 {
|
|
4396
|
-
/** ID of the data collection for which to list indexes. */
|
|
4397
|
-
dataCollectionId: string;
|
|
4398
|
-
/** Paging options to limit and skip the number of items. */
|
|
4399
|
-
paging?: Paging$1;
|
|
4400
|
-
}
|
|
4401
|
-
interface Paging$1 {
|
|
4402
|
-
/** Number of items to load. */
|
|
4403
|
-
limit?: number | null;
|
|
4404
|
-
/** Number of items to skip in the current sort order. */
|
|
4405
|
-
offset?: number | null;
|
|
4406
|
-
}
|
|
4407
|
-
interface ListIndexesResponse$1 {
|
|
4408
|
-
/** List of all indexes for the requested data collection. */
|
|
4409
|
-
indexes?: Index$1[];
|
|
4410
|
-
/** Paging metadata. */
|
|
4411
|
-
pagingMetadata?: PagingMetadata$1;
|
|
4412
|
-
}
|
|
4413
|
-
interface PagingMetadata$1 {
|
|
4414
|
-
/** Number of items returned in the response. */
|
|
4415
|
-
count?: number | null;
|
|
4416
|
-
/** Offset that was requested. */
|
|
4417
|
-
offset?: number | null;
|
|
4418
|
-
/** Total number of items that match the query. */
|
|
4419
|
-
total?: number | null;
|
|
4420
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
4421
|
-
tooManyToCount?: boolean | null;
|
|
4422
|
-
}
|
|
4423
|
-
interface FieldNonNullableFields$1 {
|
|
4424
|
-
path: string;
|
|
4425
|
-
order: Order$1;
|
|
4426
|
-
}
|
|
4427
|
-
interface FailureNonNullableFields$1 {
|
|
4428
|
-
code: string;
|
|
4429
|
-
broadCode: string;
|
|
4430
|
-
description: string;
|
|
4431
|
-
}
|
|
4432
|
-
interface IndexNonNullableFields$1 {
|
|
4433
|
-
name: string;
|
|
4434
|
-
fields: FieldNonNullableFields$1[];
|
|
4435
|
-
status: Status$1;
|
|
4436
|
-
failure?: FailureNonNullableFields$1;
|
|
4437
|
-
unique: boolean;
|
|
4438
|
-
caseInsensitive: boolean;
|
|
4439
|
-
}
|
|
4440
|
-
interface CreateIndexResponseNonNullableFields$1 {
|
|
4441
|
-
index?: IndexNonNullableFields$1;
|
|
4442
|
-
}
|
|
4443
|
-
interface ListIndexesResponseNonNullableFields$1 {
|
|
4444
|
-
indexes: IndexNonNullableFields$1[];
|
|
4445
|
-
}
|
|
4446
|
-
|
|
4447
|
-
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
4448
|
-
interface Index {
|
|
4449
|
-
/** Name of the index. */
|
|
4450
|
-
name?: string;
|
|
4451
|
-
/**
|
|
4452
|
-
* Fields for which the index is defined.
|
|
4453
|
-
*
|
|
4454
|
-
* Max: 3 fields (for a unique index: 1 field)
|
|
4455
|
-
*/
|
|
4456
|
-
fields?: Field[];
|
|
4457
|
-
/**
|
|
4458
|
-
* Current status of the index.
|
|
4459
|
-
* @readonly
|
|
4460
|
-
*/
|
|
4461
|
-
status?: Status;
|
|
4462
|
-
/**
|
|
4463
|
-
* Contains details about the reasons for failure when `status` is `FAILED`.
|
|
4464
|
-
* @readonly
|
|
4465
|
-
*/
|
|
4466
|
-
failure?: Failure;
|
|
4467
|
-
/**
|
|
4468
|
-
* Whether the index enforces uniqueness of values in the field for which it is defined.
|
|
4469
|
-
* If `true`, the index can have only one field.
|
|
4470
|
-
*
|
|
4471
|
-
* Default: `false`
|
|
4472
|
-
*/
|
|
4473
|
-
unique?: boolean;
|
|
4474
|
-
/**
|
|
4475
|
-
* Whether the index ignores case.
|
|
4476
|
-
*
|
|
4477
|
-
* Default: `false`
|
|
4478
|
-
*/
|
|
4479
|
-
caseInsensitive?: boolean;
|
|
4480
|
-
}
|
|
4481
|
-
/**
|
|
4482
|
-
* Order determines how values are ordered in the index. This is important when
|
|
4483
|
-
* ordering and/or range querying by indexed fields.
|
|
4484
|
-
*/
|
|
4485
|
-
declare enum Order {
|
|
4486
|
-
ASC = "ASC",
|
|
4487
|
-
DESC = "DESC"
|
|
4488
|
-
}
|
|
4489
|
-
interface Field {
|
|
4490
|
-
/** Path of the field to index. For example: `title` or `options.price`. */
|
|
4491
|
-
path?: string;
|
|
4492
|
-
/**
|
|
4493
|
-
* Sort order for the index. Base on how the data is regularly queried.
|
|
4494
|
-
*
|
|
4495
|
-
* Default: `ASC`
|
|
4496
|
-
*/
|
|
4497
|
-
order?: Order;
|
|
4498
|
-
}
|
|
4499
|
-
declare enum Status {
|
|
4500
|
-
/** Place holder. Never returned by the service. */
|
|
4501
|
-
UNKNOWN = "UNKNOWN",
|
|
4502
|
-
/** Index creation is in progress. */
|
|
4503
|
-
BUILDING = "BUILDING",
|
|
4504
|
-
/** Index has been successfully created and can be used in queries. */
|
|
4505
|
-
ACTIVE = "ACTIVE",
|
|
4506
|
-
/** Index is in the process of being dropped. */
|
|
4507
|
-
DROPPING = "DROPPING",
|
|
4508
|
-
/** Index has been dropped successfully. */
|
|
4509
|
-
DROPPED = "DROPPED",
|
|
4510
|
-
/** Index creation has failed. */
|
|
4511
|
-
FAILED = "FAILED",
|
|
4512
|
-
/** Index contains incorrectly indexed data. */
|
|
4513
|
-
INVALID = "INVALID"
|
|
4514
|
-
}
|
|
4515
|
-
interface Failure {
|
|
4516
|
-
/**
|
|
4517
|
-
* Error code.
|
|
4518
|
-
* - `WDE0112`: Unknown error while building collection index.
|
|
4519
|
-
* - `WDE0113`: Duplicate key error while building collection index.
|
|
4520
|
-
* - `WDE0114`: Document too large while building collection index.
|
|
4521
|
-
*/
|
|
4522
|
-
code?: string;
|
|
4523
|
-
/** Description of the failure. */
|
|
4524
|
-
description?: string;
|
|
4525
|
-
/**
|
|
4526
|
-
* ID of the data item that caused the failure.
|
|
4527
|
-
* For example, if `unique` is `true`, the ID of an item containing a duplicate value.
|
|
4528
|
-
*/
|
|
4529
|
-
itemId?: string | null;
|
|
4530
|
-
}
|
|
4531
|
-
interface CreateIndexRequest {
|
|
4532
|
-
/** Details of the index to be created. */
|
|
4533
|
-
index: Index;
|
|
4534
|
-
/** ID of the data collection for which to generate the index. */
|
|
4535
|
-
dataCollectionId: string;
|
|
4536
|
-
}
|
|
4537
|
-
interface CreateIndexResponse {
|
|
4538
|
-
/** Details of the index being generated. */
|
|
4539
|
-
index?: Index;
|
|
4540
|
-
}
|
|
4541
|
-
interface DropIndexRequest {
|
|
4542
|
-
/** Name of the index to drop. */
|
|
4543
|
-
indexName: string;
|
|
4544
|
-
/** ID of the data collection for which the index to be dropped is defined. */
|
|
4545
|
-
dataCollectionId: string;
|
|
4546
|
-
}
|
|
4547
|
-
interface DropIndexResponse {
|
|
4548
|
-
}
|
|
4549
|
-
interface ListIndexesRequest {
|
|
4550
|
-
/** ID of the data collection for which to list indexes. */
|
|
4551
|
-
dataCollectionId: string;
|
|
4552
|
-
/** Paging options to limit and skip the number of items. */
|
|
4553
|
-
paging?: Paging;
|
|
4554
|
-
}
|
|
4555
|
-
interface Paging {
|
|
4556
|
-
/** Number of items to load. */
|
|
4557
|
-
limit?: number | null;
|
|
4558
|
-
/** Number of items to skip in the current sort order. */
|
|
4559
|
-
offset?: number | null;
|
|
4560
|
-
}
|
|
4561
|
-
interface ListIndexesResponse {
|
|
4562
|
-
/** List of all indexes for the requested data collection. */
|
|
4563
|
-
indexes?: Index[];
|
|
4564
|
-
/** Paging metadata. */
|
|
4565
|
-
pagingMetadata?: PagingMetadata;
|
|
4566
|
-
}
|
|
4567
|
-
interface PagingMetadata {
|
|
4568
|
-
/** Number of items returned in the response. */
|
|
4569
|
-
count?: number | null;
|
|
4570
|
-
/** Offset that was requested. */
|
|
4571
|
-
offset?: number | null;
|
|
4572
|
-
/** Total number of items that match the query. */
|
|
4573
|
-
total?: number | null;
|
|
4574
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
4575
|
-
tooManyToCount?: boolean | null;
|
|
4576
|
-
}
|
|
4577
|
-
interface FieldNonNullableFields {
|
|
4578
|
-
path: string;
|
|
4579
|
-
order: Order;
|
|
4580
|
-
}
|
|
4581
|
-
interface FailureNonNullableFields {
|
|
4582
|
-
code: string;
|
|
4583
|
-
broadCode: string;
|
|
4584
|
-
description: string;
|
|
4585
|
-
}
|
|
4586
|
-
interface IndexNonNullableFields {
|
|
4587
|
-
name: string;
|
|
4588
|
-
fields: FieldNonNullableFields[];
|
|
4589
|
-
status: Status;
|
|
4590
|
-
failure?: FailureNonNullableFields;
|
|
4591
|
-
unique: boolean;
|
|
4592
|
-
caseInsensitive: boolean;
|
|
4593
|
-
}
|
|
4594
|
-
interface CreateIndexResponseNonNullableFields {
|
|
4595
|
-
index?: IndexNonNullableFields;
|
|
4596
|
-
}
|
|
4597
|
-
interface ListIndexesResponseNonNullableFields {
|
|
4598
|
-
indexes: IndexNonNullableFields[];
|
|
4599
|
-
}
|
|
4600
|
-
|
|
4601
|
-
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4602
|
-
getUrl: (context: any) => string;
|
|
4603
|
-
httpMethod: K;
|
|
4604
|
-
path: string;
|
|
4605
|
-
pathParams: M;
|
|
4606
|
-
__requestType: T;
|
|
4607
|
-
__originalRequestType: S;
|
|
4608
|
-
__responseType: Q;
|
|
4609
|
-
__originalResponseType: R;
|
|
4610
|
-
};
|
|
4611
|
-
declare function createIndex(): __PublicMethodMetaInfo<'POST', {}, CreateIndexRequest, CreateIndexRequest$1, CreateIndexResponse & CreateIndexResponseNonNullableFields, CreateIndexResponse$1 & CreateIndexResponseNonNullableFields$1>;
|
|
4612
|
-
declare function dropIndex(): __PublicMethodMetaInfo<'DELETE', {}, DropIndexRequest, DropIndexRequest$1, DropIndexResponse, DropIndexResponse$1>;
|
|
4613
|
-
declare function listIndexes(): __PublicMethodMetaInfo<'GET', {}, ListIndexesRequest, ListIndexesRequest$1, ListIndexesResponse & ListIndexesResponseNonNullableFields, ListIndexesResponse$1 & ListIndexesResponseNonNullableFields$1>;
|
|
4614
|
-
|
|
4615
|
-
type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
|
|
4616
|
-
declare const meta_createIndex: typeof createIndex;
|
|
4617
|
-
declare const meta_dropIndex: typeof dropIndex;
|
|
4618
|
-
declare const meta_listIndexes: typeof listIndexes;
|
|
4619
|
-
declare namespace meta {
|
|
4620
|
-
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_createIndex as createIndex, meta_dropIndex as dropIndex, meta_listIndexes as listIndexes };
|
|
4621
|
-
}
|
|
4622
|
-
|
|
4623
|
-
export { meta$2 as collections, meta$3 as externalDatabaseConnections, meta as indexes, meta$1 as items };
|