@wix/auto_sdk_data_collections 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{es/src/data-v2-data-collection-collections.types.d.ts → cjs/data-v2-data-collection-collections.universal-DFG8hhGA.d.ts} +199 -144
- package/build/cjs/index.d.ts +75 -1
- package/build/cjs/index.js +1275 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +882 -1
- package/build/cjs/meta.js +880 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/{cjs/src/data-v2-data-collection-collections.types.d.ts → es/data-v2-data-collection-collections.universal-DFG8hhGA.d.mts} +199 -144
- package/build/es/index.d.mts +75 -0
- package/build/es/index.mjs +1227 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/meta.d.mts +882 -0
- package/build/es/meta.mjs +848 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/{src/data-v2-data-collection-collections.types.d.ts → data-v2-data-collection-collections.universal-DZ3_N2Cv.d.ts} +230 -144
- package/build/internal/cjs/index.d.ts +121 -1
- package/build/internal/cjs/index.js +1275 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +882 -1
- package/build/internal/cjs/meta.js +880 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/{src/data-v2-data-collection-collections.types.d.ts → data-v2-data-collection-collections.universal-DZ3_N2Cv.d.mts} +230 -144
- package/build/internal/es/index.d.mts +121 -0
- package/build/internal/es/index.mjs +1227 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +882 -0
- package/build/internal/es/meta.mjs +848 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +9 -8
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection-collections.context.d.ts +0 -9
- package/build/cjs/src/data-v2-data-collection-collections.context.js +0 -39
- package/build/cjs/src/data-v2-data-collection-collections.context.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection-collections.http.d.ts +0 -48
- package/build/cjs/src/data-v2-data-collection-collections.http.js +0 -704
- package/build/cjs/src/data-v2-data-collection-collections.http.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection-collections.meta.d.ts +0 -27
- package/build/cjs/src/data-v2-data-collection-collections.meta.js +0 -199
- package/build/cjs/src/data-v2-data-collection-collections.meta.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection-collections.public.d.ts +0 -69
- package/build/cjs/src/data-v2-data-collection-collections.public.js +0 -84
- package/build/cjs/src/data-v2-data-collection-collections.public.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection-collections.types.js +0 -270
- package/build/cjs/src/data-v2-data-collection-collections.types.js.map +0 -1
- package/build/cjs/src/data-v2-data-collection-collections.universal.d.ts +0 -1572
- package/build/cjs/src/data-v2-data-collection-collections.universal.js +0 -704
- package/build/cjs/src/data-v2-data-collection-collections.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/data-v2-data-collection-collections.context.d.ts +0 -9
- package/build/es/src/data-v2-data-collection-collections.context.js +0 -17
- package/build/es/src/data-v2-data-collection-collections.context.js.map +0 -1
- package/build/es/src/data-v2-data-collection-collections.http.d.ts +0 -48
- package/build/es/src/data-v2-data-collection-collections.http.js +0 -692
- package/build/es/src/data-v2-data-collection-collections.http.js.map +0 -1
- package/build/es/src/data-v2-data-collection-collections.meta.d.ts +0 -27
- package/build/es/src/data-v2-data-collection-collections.meta.js +0 -164
- package/build/es/src/data-v2-data-collection-collections.meta.js.map +0 -1
- package/build/es/src/data-v2-data-collection-collections.public.d.ts +0 -69
- package/build/es/src/data-v2-data-collection-collections.public.js +0 -53
- package/build/es/src/data-v2-data-collection-collections.public.js.map +0 -1
- package/build/es/src/data-v2-data-collection-collections.types.js +0 -267
- package/build/es/src/data-v2-data-collection-collections.types.js.map +0 -1
- package/build/es/src/data-v2-data-collection-collections.universal.d.ts +0 -1572
- package/build/es/src/data-v2-data-collection-collections.universal.js +0 -669
- package/build/es/src/data-v2-data-collection-collections.universal.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/src/data-v2-data-collection-collections.context.d.ts +0 -17
- package/build/internal/cjs/src/data-v2-data-collection-collections.context.js +0 -39
- package/build/internal/cjs/src/data-v2-data-collection-collections.context.js.map +0 -1
- package/build/internal/cjs/src/data-v2-data-collection-collections.http.d.ts +0 -48
- package/build/internal/cjs/src/data-v2-data-collection-collections.http.js +0 -704
- package/build/internal/cjs/src/data-v2-data-collection-collections.http.js.map +0 -1
- package/build/internal/cjs/src/data-v2-data-collection-collections.meta.d.ts +0 -27
- package/build/internal/cjs/src/data-v2-data-collection-collections.meta.js +0 -199
- package/build/internal/cjs/src/data-v2-data-collection-collections.meta.js.map +0 -1
- package/build/internal/cjs/src/data-v2-data-collection-collections.public.d.ts +0 -107
- package/build/internal/cjs/src/data-v2-data-collection-collections.public.js +0 -84
- package/build/internal/cjs/src/data-v2-data-collection-collections.public.js.map +0 -1
- package/build/internal/cjs/src/data-v2-data-collection-collections.types.js +0 -270
- package/build/internal/cjs/src/data-v2-data-collection-collections.types.js.map +0 -1
- package/build/internal/cjs/src/data-v2-data-collection-collections.universal.d.ts +0 -1679
- package/build/internal/cjs/src/data-v2-data-collection-collections.universal.js +0 -704
- package/build/internal/cjs/src/data-v2-data-collection-collections.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/data-v2-data-collection-collections.context.d.ts +0 -17
- package/build/internal/es/src/data-v2-data-collection-collections.context.js +0 -17
- package/build/internal/es/src/data-v2-data-collection-collections.context.js.map +0 -1
- package/build/internal/es/src/data-v2-data-collection-collections.http.d.ts +0 -48
- package/build/internal/es/src/data-v2-data-collection-collections.http.js +0 -692
- package/build/internal/es/src/data-v2-data-collection-collections.http.js.map +0 -1
- package/build/internal/es/src/data-v2-data-collection-collections.meta.d.ts +0 -27
- package/build/internal/es/src/data-v2-data-collection-collections.meta.js +0 -164
- package/build/internal/es/src/data-v2-data-collection-collections.meta.js.map +0 -1
- package/build/internal/es/src/data-v2-data-collection-collections.public.d.ts +0 -107
- package/build/internal/es/src/data-v2-data-collection-collections.public.js +0 -53
- package/build/internal/es/src/data-v2-data-collection-collections.public.js.map +0 -1
- package/build/internal/es/src/data-v2-data-collection-collections.types.js +0 -267
- package/build/internal/es/src/data-v2-data-collection-collections.types.js.map +0 -1
- package/build/internal/es/src/data-v2-data-collection-collections.universal.d.ts +0 -1679
- package/build/internal/es/src/data-v2-data-collection-collections.universal.js +0 -669
- package/build/internal/es/src/data-v2-data-collection-collections.universal.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** A data collection determines the structure of data to be stored in a database. */
|
|
2
|
-
|
|
2
|
+
interface DataCollection {
|
|
3
3
|
/**
|
|
4
4
|
* Collection ID. For example, `my-first-collection`. May include a namespace.
|
|
5
5
|
* @immutable
|
|
6
6
|
* @maxLength 256
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
_id?: string;
|
|
9
9
|
/**
|
|
10
10
|
* Collection type. Indicates how the collection was created and how it is stored.
|
|
11
11
|
* @readonly
|
|
@@ -78,14 +78,14 @@ export interface DataCollection {
|
|
|
78
78
|
* Date the collection was created.
|
|
79
79
|
* @readonly
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
_createdDate?: Date | null;
|
|
82
82
|
/**
|
|
83
83
|
* Date the collection was last updated.
|
|
84
84
|
* @readonly
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
_updatedDate?: Date | null;
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
declare enum CollectionType {
|
|
89
89
|
/** User-created collection. */
|
|
90
90
|
NATIVE = "NATIVE",
|
|
91
91
|
/** [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). */
|
|
@@ -96,8 +96,8 @@ export declare enum CollectionType {
|
|
|
96
96
|
EXTERNAL = "EXTERNAL"
|
|
97
97
|
}
|
|
98
98
|
/** @enumType */
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
type CollectionTypeWithLiterals = CollectionType | 'NATIVE' | 'WIX_APP' | 'BLOCKS_APP' | 'EXTERNAL';
|
|
100
|
+
interface Sort {
|
|
101
101
|
/**
|
|
102
102
|
* Field to sort by.
|
|
103
103
|
* @maxLength 1000
|
|
@@ -110,13 +110,13 @@ export interface Sort {
|
|
|
110
110
|
*/
|
|
111
111
|
direction?: DirectionWithLiterals;
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
declare enum Direction {
|
|
114
114
|
ASC = "ASC",
|
|
115
115
|
DESC = "DESC"
|
|
116
116
|
}
|
|
117
117
|
/** @enumType */
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
type DirectionWithLiterals = Direction | 'ASC' | 'DESC';
|
|
119
|
+
interface CollectionCapabilities {
|
|
120
120
|
/**
|
|
121
121
|
* Data operations the collection supports. The listed operations can be performed on data the collection contains.
|
|
122
122
|
*
|
|
@@ -132,7 +132,7 @@ export interface CollectionCapabilities {
|
|
|
132
132
|
/** Maximum number of indexes for the collection. */
|
|
133
133
|
indexLimits?: IndexLimits;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
declare enum DataOperation {
|
|
136
136
|
AGGREGATE = "AGGREGATE",
|
|
137
137
|
BULK_INSERT = "BULK_INSERT",
|
|
138
138
|
BULK_REMOVE = "BULK_REMOVE",
|
|
@@ -156,16 +156,16 @@ export declare enum DataOperation {
|
|
|
156
156
|
BULK_PATCH = "BULK_PATCH"
|
|
157
157
|
}
|
|
158
158
|
/** @enumType */
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
type DataOperationWithLiterals = DataOperation | 'AGGREGATE' | 'BULK_INSERT' | 'BULK_REMOVE' | 'BULK_SAVE' | 'BULK_UPDATE' | 'COUNT' | 'DISTINCT' | 'FIND' | 'GET' | 'INSERT' | 'INSERT_REFERENCE' | 'IS_REFERENCED' | 'QUERY_REFERENCED' | 'REMOVE' | 'REMOVE_REFERENCE' | 'REPLACE_REFERENCES' | 'SAVE' | 'TRUNCATE' | 'UPDATE' | 'PATCH' | 'BULK_PATCH';
|
|
160
|
+
declare enum CollectionOperation {
|
|
161
161
|
/** Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed. */
|
|
162
162
|
UPDATE = "UPDATE",
|
|
163
163
|
/** Allows deleting the entire collection. If not included, the collection can't be deleted. */
|
|
164
164
|
REMOVE = "REMOVE"
|
|
165
165
|
}
|
|
166
166
|
/** @enumType */
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
type CollectionOperationWithLiterals = CollectionOperation | 'UPDATE' | 'REMOVE';
|
|
168
|
+
interface IndexLimits {
|
|
169
169
|
/** Maximum number of regular (non-unique) indexes allowed for this collection. */
|
|
170
170
|
regular?: number;
|
|
171
171
|
/** Maximum number of unique indexes allowed for this collection. */
|
|
@@ -173,7 +173,7 @@ export interface IndexLimits {
|
|
|
173
173
|
/** Maximum number of regular and unique indexes allowed for this collection. */
|
|
174
174
|
total?: number;
|
|
175
175
|
}
|
|
176
|
-
|
|
176
|
+
interface IndexQuotaLimits {
|
|
177
177
|
/**
|
|
178
178
|
* limit of regular single-field indexes, even if 0 1-field indices may be created using
|
|
179
179
|
* 3-field quota (if available)
|
|
@@ -186,7 +186,7 @@ export interface IndexQuotaLimits {
|
|
|
186
186
|
/** Maximum number of regular and unique indexes allowed for this collection. */
|
|
187
187
|
total?: number;
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
interface Field extends FieldRangeValidationsOneOf {
|
|
190
190
|
/** Range of possible values for a numerical field. */
|
|
191
191
|
numberRange?: NumberRange;
|
|
192
192
|
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
@@ -253,7 +253,7 @@ export interface Field extends FieldRangeValidationsOneOf {
|
|
|
253
253
|
plugins?: FieldPlugin[];
|
|
254
254
|
}
|
|
255
255
|
/** @oneof */
|
|
256
|
-
|
|
256
|
+
interface FieldRangeValidationsOneOf {
|
|
257
257
|
/** Range of possible values for a numerical field. */
|
|
258
258
|
numberRange?: NumberRange;
|
|
259
259
|
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
@@ -261,7 +261,7 @@ export interface FieldRangeValidationsOneOf {
|
|
|
261
261
|
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
262
262
|
arraySizeRange?: ArraySizeRange;
|
|
263
263
|
}
|
|
264
|
-
|
|
264
|
+
declare enum Type {
|
|
265
265
|
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
266
266
|
/** Plain-text string. */
|
|
267
267
|
TEXT = "TEXT",
|
|
@@ -327,8 +327,8 @@ export declare enum Type {
|
|
|
327
327
|
LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
|
|
328
328
|
}
|
|
329
329
|
/** @enumType */
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
type TypeWithLiterals = Type | 'UNKNOWN_FIELD_TYPE' | 'TEXT' | 'NUMBER' | 'DATE' | 'DATETIME' | 'IMAGE' | 'BOOLEAN' | 'DOCUMENT' | 'URL' | 'RICH_TEXT' | 'VIDEO' | 'ANY' | 'ARRAY_STRING' | 'ARRAY_DOCUMENT' | 'AUDIO' | 'TIME' | 'LANGUAGE' | 'RICH_CONTENT' | 'MEDIA_GALLERY' | 'ADDRESS' | 'PAGE_LINK' | 'REFERENCE' | 'MULTI_REFERENCE' | 'OBJECT' | 'ARRAY' | 'LEGACY_TIME' | 'LEGACY_BOOK' | 'LEGACY_EXTERNAL_URL' | 'LEGACY_BROKEN_REFERENCE' | 'LEGACY_IMAGE' | 'LEGACY_COLOR' | 'LEGACY_EXTERNAL_VIDEO';
|
|
331
|
+
interface TypeMetadata extends TypeMetadataMetadataOneOf {
|
|
332
332
|
/** Metadata for a reference field. */
|
|
333
333
|
reference?: Reference;
|
|
334
334
|
/** Metadata for a multi-reference field. */
|
|
@@ -341,7 +341,7 @@ export interface TypeMetadata extends TypeMetadataMetadataOneOf {
|
|
|
341
341
|
pageLink?: PageLink;
|
|
342
342
|
}
|
|
343
343
|
/** @oneof */
|
|
344
|
-
|
|
344
|
+
interface TypeMetadataMetadataOneOf {
|
|
345
345
|
/** Metadata for a reference field. */
|
|
346
346
|
reference?: Reference;
|
|
347
347
|
/** Metadata for a multi-reference field. */
|
|
@@ -353,7 +353,7 @@ export interface TypeMetadataMetadataOneOf {
|
|
|
353
353
|
/** Metadata for a page link field. */
|
|
354
354
|
pageLink?: PageLink;
|
|
355
355
|
}
|
|
356
|
-
|
|
356
|
+
interface FieldCapabilities {
|
|
357
357
|
/**
|
|
358
358
|
* Whether the collection can be sorted by this field.
|
|
359
359
|
*
|
|
@@ -366,7 +366,7 @@ export interface FieldCapabilities {
|
|
|
366
366
|
*/
|
|
367
367
|
queryOperators?: QueryOperatorWithLiterals[];
|
|
368
368
|
}
|
|
369
|
-
|
|
369
|
+
declare enum QueryOperator {
|
|
370
370
|
EQ = "EQ",
|
|
371
371
|
LT = "LT",
|
|
372
372
|
GT = "GT",
|
|
@@ -382,8 +382,8 @@ export declare enum QueryOperator {
|
|
|
382
382
|
URLIZED = "URLIZED"
|
|
383
383
|
}
|
|
384
384
|
/** @enumType */
|
|
385
|
-
|
|
386
|
-
|
|
385
|
+
type QueryOperatorWithLiterals = QueryOperator | 'EQ' | 'LT' | 'GT' | 'NE' | 'LTE' | 'GTE' | 'STARTS_WITH' | 'ENDS_WITH' | 'CONTAINS' | 'HAS_SOME' | 'HAS_ALL' | 'EXISTS' | 'URLIZED';
|
|
386
|
+
interface ObjectField {
|
|
387
387
|
/**
|
|
388
388
|
* Field ID.
|
|
389
389
|
* @maxLength 1000
|
|
@@ -408,36 +408,36 @@ export interface ObjectField {
|
|
|
408
408
|
*/
|
|
409
409
|
capabilities?: FieldCapabilities;
|
|
410
410
|
}
|
|
411
|
-
|
|
411
|
+
interface FieldsPattern {
|
|
412
412
|
/** @maxLength 1000 */
|
|
413
413
|
pattern?: string;
|
|
414
414
|
lowercase?: boolean;
|
|
415
415
|
}
|
|
416
|
-
|
|
416
|
+
interface UrlizedOnlyPattern {
|
|
417
417
|
/** @maxLength 1000 */
|
|
418
418
|
pattern?: string;
|
|
419
419
|
}
|
|
420
|
-
|
|
420
|
+
interface Calculator extends CalculatorPatternOneOf {
|
|
421
421
|
/** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
|
|
422
422
|
fieldsPattern?: FieldsPattern;
|
|
423
423
|
/** Value is only URL encoded. */
|
|
424
424
|
urlizedOnlyPattern?: UrlizedOnlyPattern;
|
|
425
425
|
}
|
|
426
426
|
/** @oneof */
|
|
427
|
-
|
|
427
|
+
interface CalculatorPatternOneOf {
|
|
428
428
|
/** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
|
|
429
429
|
fieldsPattern?: FieldsPattern;
|
|
430
430
|
/** Value is only URL encoded. */
|
|
431
431
|
urlizedOnlyPattern?: UrlizedOnlyPattern;
|
|
432
432
|
}
|
|
433
|
-
|
|
433
|
+
interface Reference {
|
|
434
434
|
/**
|
|
435
435
|
* Referenced collection ID.
|
|
436
436
|
* @maxLength 256
|
|
437
437
|
*/
|
|
438
438
|
referencedCollectionId?: string;
|
|
439
439
|
}
|
|
440
|
-
|
|
440
|
+
interface MultiReference {
|
|
441
441
|
/**
|
|
442
442
|
* Referenced collection ID.
|
|
443
443
|
* @maxLength 256
|
|
@@ -454,20 +454,20 @@ export interface MultiReference {
|
|
|
454
454
|
*/
|
|
455
455
|
referencingDisplayName?: string;
|
|
456
456
|
}
|
|
457
|
-
|
|
457
|
+
interface _Object {
|
|
458
458
|
/**
|
|
459
459
|
* Fields within the object.
|
|
460
460
|
* @maxSize 1000
|
|
461
461
|
*/
|
|
462
462
|
fields?: ObjectField[];
|
|
463
463
|
}
|
|
464
|
-
|
|
464
|
+
interface _Array {
|
|
465
465
|
/** Element's data type. */
|
|
466
466
|
elementType?: TypeWithLiterals;
|
|
467
467
|
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
468
468
|
typeMetadata?: TypeMetadata;
|
|
469
469
|
}
|
|
470
|
-
|
|
470
|
+
interface PageLink {
|
|
471
471
|
calculator?: Calculator;
|
|
472
472
|
/**
|
|
473
473
|
* Defines reference to router pattern in the site document.
|
|
@@ -475,7 +475,7 @@ export interface PageLink {
|
|
|
475
475
|
*/
|
|
476
476
|
linkedRouterPage?: string | null;
|
|
477
477
|
}
|
|
478
|
-
|
|
478
|
+
interface NumberRange {
|
|
479
479
|
/**
|
|
480
480
|
* Minimum permitted value for a numerical field.
|
|
481
481
|
*
|
|
@@ -489,7 +489,7 @@ export interface NumberRange {
|
|
|
489
489
|
*/
|
|
490
490
|
max?: number | null;
|
|
491
491
|
}
|
|
492
|
-
|
|
492
|
+
interface StringLengthRange {
|
|
493
493
|
/**
|
|
494
494
|
* Minimum permitted length for a text field.
|
|
495
495
|
*
|
|
@@ -503,7 +503,7 @@ export interface StringLengthRange {
|
|
|
503
503
|
*/
|
|
504
504
|
maxLength?: number | null;
|
|
505
505
|
}
|
|
506
|
-
|
|
506
|
+
interface ArraySizeRange {
|
|
507
507
|
/**
|
|
508
508
|
* 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`.
|
|
509
509
|
*
|
|
@@ -518,26 +518,26 @@ export interface ArraySizeRange {
|
|
|
518
518
|
maxSize?: number | null;
|
|
519
519
|
}
|
|
520
520
|
/** Optional plug-in aspects for fields */
|
|
521
|
-
|
|
521
|
+
interface FieldPlugin extends FieldPluginOptionsOneOf {
|
|
522
522
|
/** Options for the CMS plugin. */
|
|
523
523
|
cmsOptions?: CmsOptions;
|
|
524
524
|
type?: FieldPluginTypeWithLiterals;
|
|
525
525
|
}
|
|
526
526
|
/** @oneof */
|
|
527
|
-
|
|
527
|
+
interface FieldPluginOptionsOneOf {
|
|
528
528
|
/** Options for the CMS plugin. */
|
|
529
529
|
cmsOptions?: CmsOptions;
|
|
530
530
|
}
|
|
531
|
-
|
|
531
|
+
declare enum FieldPluginType {
|
|
532
532
|
/** Uknown plugin type. */
|
|
533
533
|
UNKNOWN = "UNKNOWN",
|
|
534
534
|
/** CMS-related field attributes */
|
|
535
535
|
CMS = "CMS"
|
|
536
536
|
}
|
|
537
537
|
/** @enumType */
|
|
538
|
-
|
|
538
|
+
type FieldPluginTypeWithLiterals = FieldPluginType | 'UNKNOWN' | 'CMS';
|
|
539
539
|
/** Options for the CMS plugin. */
|
|
540
|
-
|
|
540
|
+
interface CmsOptions {
|
|
541
541
|
/**
|
|
542
542
|
* Indicates an internal CMS field. The CMS does not display internal fields.
|
|
543
543
|
*
|
|
@@ -546,7 +546,7 @@ export interface CmsOptions {
|
|
|
546
546
|
internal?: boolean;
|
|
547
547
|
}
|
|
548
548
|
/** Permissions defined by the lowest role needed to perform each action. */
|
|
549
|
-
|
|
549
|
+
interface Permissions {
|
|
550
550
|
/** Lowest role needed to add a collection. */
|
|
551
551
|
insert?: RoleWithLiterals;
|
|
552
552
|
/** Lowest role needed to update a collection. */
|
|
@@ -556,7 +556,7 @@ export interface Permissions {
|
|
|
556
556
|
/** Lowest role needed to read a collection. */
|
|
557
557
|
read?: RoleWithLiterals;
|
|
558
558
|
}
|
|
559
|
-
|
|
559
|
+
declare enum Role {
|
|
560
560
|
/** Unknown role. */
|
|
561
561
|
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
562
562
|
/** Site administrator. */
|
|
@@ -569,8 +569,8 @@ export declare enum Role {
|
|
|
569
569
|
ANYONE = "ANYONE"
|
|
570
570
|
}
|
|
571
571
|
/** @enumType */
|
|
572
|
-
|
|
573
|
-
|
|
572
|
+
type RoleWithLiterals = Role | 'UNKNOWN_ROLE' | 'ADMIN' | 'SITE_MEMBER_AUTHOR' | 'SITE_MEMBER' | 'ANYONE';
|
|
573
|
+
interface Plugin extends PluginOptionsOneOf {
|
|
574
574
|
/**
|
|
575
575
|
* Options for the Publish plugin.
|
|
576
576
|
* 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.
|
|
@@ -590,7 +590,7 @@ export interface Plugin extends PluginOptionsOneOf {
|
|
|
590
590
|
type?: PluginTypeWithLiterals;
|
|
591
591
|
}
|
|
592
592
|
/** @oneof */
|
|
593
|
-
|
|
593
|
+
interface PluginOptionsOneOf {
|
|
594
594
|
/**
|
|
595
595
|
* Options for the Publish plugin.
|
|
596
596
|
* 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.
|
|
@@ -607,14 +607,14 @@ export interface PluginOptionsOneOf {
|
|
|
607
607
|
/** Options for the CMS plugin. */
|
|
608
608
|
cmsOptions?: PluginCmsOptions;
|
|
609
609
|
}
|
|
610
|
-
|
|
610
|
+
declare enum Status {
|
|
611
611
|
UNKNOWN_PUBLISH_PLUGIN_STATUS = "UNKNOWN_PUBLISH_PLUGIN_STATUS",
|
|
612
612
|
PUBLISHED = "PUBLISHED",
|
|
613
613
|
DRAFT = "DRAFT"
|
|
614
614
|
}
|
|
615
615
|
/** @enumType */
|
|
616
|
-
|
|
617
|
-
|
|
616
|
+
type StatusWithLiterals = Status | 'UNKNOWN_PUBLISH_PLUGIN_STATUS' | 'PUBLISHED' | 'DRAFT';
|
|
617
|
+
declare enum Format {
|
|
618
618
|
UNKNOWN_URLIZED_PLUGIN_FORMAT = "UNKNOWN_URLIZED_PLUGIN_FORMAT",
|
|
619
619
|
/** Letters are converted to lower case and spaces are replaced with dashes before generating the encoded URL. */
|
|
620
620
|
ORIGINAL = "ORIGINAL",
|
|
@@ -622,16 +622,16 @@ export declare enum Format {
|
|
|
622
622
|
PLAIN = "PLAIN"
|
|
623
623
|
}
|
|
624
624
|
/** @enumType */
|
|
625
|
-
|
|
625
|
+
type FormatWithLiterals = Format | 'UNKNOWN_URLIZED_PLUGIN_FORMAT' | 'ORIGINAL' | 'PLAIN';
|
|
626
626
|
/** if CMS-defined sort is enabled and should be used in site */
|
|
627
|
-
|
|
627
|
+
interface SiteSort {
|
|
628
628
|
/**
|
|
629
629
|
* Field and order for the site sort.
|
|
630
630
|
* @maxSize 100
|
|
631
631
|
*/
|
|
632
632
|
sort?: Sort[];
|
|
633
633
|
}
|
|
634
|
-
|
|
634
|
+
declare enum PluginType {
|
|
635
635
|
/** Unknown plugin type. */
|
|
636
636
|
UNKNOWN_PLUGIN_TYPE = "UNKNOWN_PLUGIN_TYPE",
|
|
637
637
|
/** 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. */
|
|
@@ -652,23 +652,23 @@ export declare enum PluginType {
|
|
|
652
652
|
CMS = "CMS"
|
|
653
653
|
}
|
|
654
654
|
/** @enumType */
|
|
655
|
-
|
|
656
|
-
|
|
655
|
+
type PluginTypeWithLiterals = PluginType | 'UNKNOWN_PLUGIN_TYPE' | 'PUBLISH' | 'SINGLE_ITEM' | 'URLIZED' | 'GRIDAPPLESS' | 'MULTILINGUAL' | 'SHARED' | 'EDITABLE_PAGE_LINK' | 'CMS';
|
|
656
|
+
interface PublishPluginOptions {
|
|
657
657
|
/** Default status. */
|
|
658
658
|
defaultStatus?: StatusWithLiterals;
|
|
659
659
|
}
|
|
660
|
-
|
|
660
|
+
interface SingleItemPluginOptions {
|
|
661
661
|
/**
|
|
662
662
|
* ID of the single item in this collection. If you insert or update an item, its ID value is always changed to this.
|
|
663
663
|
* @maxLength 16000
|
|
664
664
|
*/
|
|
665
665
|
singleItemId?: string;
|
|
666
666
|
}
|
|
667
|
-
|
|
667
|
+
interface UrlizedPluginOptions {
|
|
668
668
|
/** Encoding method for generating a URL in ASCII characters. */
|
|
669
669
|
format?: FormatWithLiterals;
|
|
670
670
|
}
|
|
671
|
-
|
|
671
|
+
interface MultilingualOptions {
|
|
672
672
|
/**
|
|
673
673
|
* IDs of fields to allow translation.
|
|
674
674
|
* @maxSize 1000
|
|
@@ -676,24 +676,24 @@ export interface MultilingualOptions {
|
|
|
676
676
|
*/
|
|
677
677
|
translatableFieldKeys?: string[];
|
|
678
678
|
}
|
|
679
|
-
|
|
679
|
+
interface PageLinkPluginOptions {
|
|
680
680
|
isPersisted?: boolean;
|
|
681
681
|
isMutable?: boolean;
|
|
682
682
|
}
|
|
683
|
-
|
|
683
|
+
interface PluginCmsOptions {
|
|
684
684
|
/** CMS sort, applied when a collection is displayed on a site. */
|
|
685
685
|
siteSort?: SiteSort;
|
|
686
686
|
}
|
|
687
|
-
|
|
687
|
+
declare enum PagingMode {
|
|
688
688
|
/** Offset-based paging. */
|
|
689
689
|
OFFSET = "OFFSET",
|
|
690
690
|
/** Cursor-based paging. */
|
|
691
691
|
CURSOR = "CURSOR"
|
|
692
692
|
}
|
|
693
693
|
/** @enumType */
|
|
694
|
-
|
|
694
|
+
type PagingModeWithLiterals = PagingMode | 'OFFSET' | 'CURSOR';
|
|
695
695
|
/** Data permissions defined by access level for each action. */
|
|
696
|
-
|
|
696
|
+
interface DataPermissions {
|
|
697
697
|
/** Access level for data items read */
|
|
698
698
|
itemRead?: AccessLevelWithLiterals;
|
|
699
699
|
/** Access level for data items insert */
|
|
@@ -707,7 +707,7 @@ export interface DataPermissions {
|
|
|
707
707
|
* Describes who can perform certain action.
|
|
708
708
|
* Each level includes all levels below it (except UNDEFINED).
|
|
709
709
|
*/
|
|
710
|
-
|
|
710
|
+
declare enum AccessLevel {
|
|
711
711
|
/** Not set. */
|
|
712
712
|
UNDEFINED = "UNDEFINED",
|
|
713
713
|
/** Any subject, including visitors. */
|
|
@@ -722,8 +722,8 @@ export declare enum AccessLevel {
|
|
|
722
722
|
PRIVILEGED = "PRIVILEGED"
|
|
723
723
|
}
|
|
724
724
|
/** @enumType */
|
|
725
|
-
|
|
726
|
-
|
|
725
|
+
type AccessLevelWithLiterals = AccessLevel | 'UNDEFINED' | 'ANYONE' | 'SITE_MEMBER' | 'SITE_MEMBER_AUTHOR' | 'CMS_EDITOR' | 'PRIVILEGED';
|
|
726
|
+
interface AllowedDataPermissions {
|
|
727
727
|
/** If data items read permitted */
|
|
728
728
|
itemRead?: boolean;
|
|
729
729
|
/** If for data items insert permitted */
|
|
@@ -733,7 +733,7 @@ export interface AllowedDataPermissions {
|
|
|
733
733
|
/** If data items removal permitted */
|
|
734
734
|
itemRemove?: boolean;
|
|
735
735
|
}
|
|
736
|
-
|
|
736
|
+
interface DataCollectionClonedEvent {
|
|
737
737
|
/**
|
|
738
738
|
* Instance ID of the collection from which the data is cloned.
|
|
739
739
|
* @format GUID
|
|
@@ -745,7 +745,7 @@ export interface DataCollectionClonedEvent {
|
|
|
745
745
|
*/
|
|
746
746
|
originId?: string;
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
interface DataCollectionChangedEvent {
|
|
749
749
|
/**
|
|
750
750
|
* list of new fields
|
|
751
751
|
* @maxSize 1000
|
|
@@ -777,35 +777,35 @@ export interface DataCollectionChangedEvent {
|
|
|
777
777
|
*/
|
|
778
778
|
pluginsRemoved?: Plugin[];
|
|
779
779
|
}
|
|
780
|
-
|
|
780
|
+
interface FieldUpdate {
|
|
781
781
|
/** previous state of the field */
|
|
782
782
|
previous?: Field;
|
|
783
783
|
/** current state of the field */
|
|
784
784
|
current?: Field;
|
|
785
785
|
}
|
|
786
|
-
|
|
786
|
+
interface PluginUpdate {
|
|
787
787
|
/** previous state of the plugin */
|
|
788
788
|
previous?: Plugin;
|
|
789
789
|
/** current state of the plugin */
|
|
790
790
|
current?: Plugin;
|
|
791
791
|
}
|
|
792
|
-
|
|
792
|
+
interface DataCollectionEvictedEvent {
|
|
793
793
|
/**
|
|
794
794
|
* ID of the collection that was permanently deleted.
|
|
795
795
|
* @minLength 1
|
|
796
796
|
* @maxLength 1000
|
|
797
797
|
*/
|
|
798
|
-
|
|
798
|
+
_id?: string;
|
|
799
799
|
}
|
|
800
|
-
|
|
800
|
+
interface CreateDataCollectionRequest {
|
|
801
801
|
/** Collection details. */
|
|
802
802
|
collection: DataCollection;
|
|
803
803
|
}
|
|
804
|
-
|
|
804
|
+
interface CreateDataCollectionResponse {
|
|
805
805
|
/** Details of collection created. */
|
|
806
806
|
collection?: DataCollection;
|
|
807
807
|
}
|
|
808
|
-
|
|
808
|
+
interface GetDataCollectionRequest {
|
|
809
809
|
/**
|
|
810
810
|
* ID of the collection to retrieve.
|
|
811
811
|
* @maxLength 256
|
|
@@ -827,14 +827,12 @@ export interface GetDataCollectionRequest {
|
|
|
827
827
|
*/
|
|
828
828
|
fields?: string[];
|
|
829
829
|
}
|
|
830
|
-
|
|
830
|
+
declare enum Segment {
|
|
831
831
|
UNKNOWN_SEGMENT = "UNKNOWN_SEGMENT",
|
|
832
832
|
PUBLIC = "PUBLIC",
|
|
833
833
|
DEV = "DEV"
|
|
834
834
|
}
|
|
835
|
-
|
|
836
|
-
export type SegmentWithLiterals = Segment | 'UNKNOWN_SEGMENT' | 'PUBLIC' | 'DEV';
|
|
837
|
-
export interface GetDataCollectionResponse {
|
|
835
|
+
interface GetDataCollectionResponse {
|
|
838
836
|
/** Details of the collection requested. */
|
|
839
837
|
collection?: DataCollection;
|
|
840
838
|
/**
|
|
@@ -843,7 +841,7 @@ export interface GetDataCollectionResponse {
|
|
|
843
841
|
*/
|
|
844
842
|
referencedCollections?: DataCollection[];
|
|
845
843
|
}
|
|
846
|
-
|
|
844
|
+
interface ListDataCollectionsRequest {
|
|
847
845
|
/**
|
|
848
846
|
* Defines how collections in the response are sorted.
|
|
849
847
|
*
|
|
@@ -868,7 +866,7 @@ export interface ListDataCollectionsRequest {
|
|
|
868
866
|
*/
|
|
869
867
|
fields?: string[];
|
|
870
868
|
}
|
|
871
|
-
|
|
869
|
+
interface Sorting {
|
|
872
870
|
/**
|
|
873
871
|
* Name of the field to sort by.
|
|
874
872
|
* @maxLength 1000
|
|
@@ -877,25 +875,25 @@ export interface Sorting {
|
|
|
877
875
|
/** Sort order. */
|
|
878
876
|
order?: SortOrderWithLiterals;
|
|
879
877
|
}
|
|
880
|
-
|
|
878
|
+
declare enum SortOrder {
|
|
881
879
|
ASC = "ASC",
|
|
882
880
|
DESC = "DESC"
|
|
883
881
|
}
|
|
884
882
|
/** @enumType */
|
|
885
|
-
|
|
886
|
-
|
|
883
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
884
|
+
interface Paging {
|
|
887
885
|
/** Number of items to load. */
|
|
888
886
|
limit?: number | null;
|
|
889
887
|
/** Number of items to skip in the current sort order. */
|
|
890
888
|
offset?: number | null;
|
|
891
889
|
}
|
|
892
|
-
|
|
890
|
+
interface ListDataCollectionsResponse {
|
|
893
891
|
/** List of collections. */
|
|
894
892
|
collections?: DataCollection[];
|
|
895
893
|
/** Paging information. */
|
|
896
894
|
pagingMetadata?: PagingMetadataV2;
|
|
897
895
|
}
|
|
898
|
-
|
|
896
|
+
interface PagingMetadataV2 {
|
|
899
897
|
/** Number of items returned in the response. */
|
|
900
898
|
count?: number | null;
|
|
901
899
|
/** Offset that was requested. */
|
|
@@ -905,7 +903,7 @@ export interface PagingMetadataV2 {
|
|
|
905
903
|
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
906
904
|
tooManyToCount?: boolean | null;
|
|
907
905
|
}
|
|
908
|
-
|
|
906
|
+
interface BulkGetDataCollectionsRequest {
|
|
909
907
|
/**
|
|
910
908
|
* IDs of the collections to retrieve.
|
|
911
909
|
* @minSize 1
|
|
@@ -943,7 +941,7 @@ export interface BulkGetDataCollectionsRequest {
|
|
|
943
941
|
*/
|
|
944
942
|
fields?: string[];
|
|
945
943
|
}
|
|
946
|
-
|
|
944
|
+
interface BulkGetDataCollectionsResponse {
|
|
947
945
|
/**
|
|
948
946
|
* List of requested collections.
|
|
949
947
|
* When `include_referenced_collections` is `true` in the request, referenced collections are included here.
|
|
@@ -952,35 +950,35 @@ export interface BulkGetDataCollectionsResponse {
|
|
|
952
950
|
/** List of requested deleted collections. Only populated when `showDeletedCollections` is true in the request. */
|
|
953
951
|
deletedCollections?: DataCollection[];
|
|
954
952
|
}
|
|
955
|
-
|
|
953
|
+
interface UpdateDataCollectionRequest {
|
|
956
954
|
/** Updated collection details. The existing collection is replaced with this version. */
|
|
957
955
|
collection: DataCollection;
|
|
958
956
|
}
|
|
959
|
-
|
|
957
|
+
interface UpdateDataCollectionResponse {
|
|
960
958
|
/** Updated collection details. */
|
|
961
959
|
collection?: DataCollection;
|
|
962
960
|
}
|
|
963
|
-
|
|
961
|
+
interface DeleteDataCollectionRequest {
|
|
964
962
|
/**
|
|
965
963
|
* ID of the collection to delete.
|
|
966
964
|
* @maxLength 256
|
|
967
965
|
*/
|
|
968
966
|
dataCollectionId: string;
|
|
969
967
|
}
|
|
970
|
-
|
|
968
|
+
interface DeleteDataCollectionResponse {
|
|
971
969
|
}
|
|
972
|
-
|
|
970
|
+
interface RestoreDataCollectionRequest {
|
|
973
971
|
/**
|
|
974
972
|
* Data Collection ID to restore
|
|
975
973
|
* @maxLength 256
|
|
976
974
|
*/
|
|
977
975
|
dataCollectionId?: string;
|
|
978
976
|
}
|
|
979
|
-
|
|
977
|
+
interface RestoreDataCollectionResponse {
|
|
980
978
|
/** Restored data collection */
|
|
981
979
|
dataCollection?: DataCollection;
|
|
982
980
|
}
|
|
983
|
-
|
|
981
|
+
interface CreateDataCollectionFieldRequest {
|
|
984
982
|
/**
|
|
985
983
|
* ID of data collection to update
|
|
986
984
|
* @maxLength 256
|
|
@@ -989,11 +987,11 @@ export interface CreateDataCollectionFieldRequest {
|
|
|
989
987
|
/** field to create */
|
|
990
988
|
field: Field;
|
|
991
989
|
}
|
|
992
|
-
|
|
990
|
+
interface CreateDataCollectionFieldResponse {
|
|
993
991
|
/** updated data collection */
|
|
994
992
|
dataCollection?: DataCollection;
|
|
995
993
|
}
|
|
996
|
-
|
|
994
|
+
interface UpdateDataCollectionFieldRequest {
|
|
997
995
|
/**
|
|
998
996
|
* ID of data collection to update
|
|
999
997
|
* @maxLength 256
|
|
@@ -1002,11 +1000,11 @@ export interface UpdateDataCollectionFieldRequest {
|
|
|
1002
1000
|
/** Field to update */
|
|
1003
1001
|
field: Field;
|
|
1004
1002
|
}
|
|
1005
|
-
|
|
1003
|
+
interface UpdateDataCollectionFieldResponse {
|
|
1006
1004
|
/** updated data collection */
|
|
1007
1005
|
dataCollection?: DataCollection;
|
|
1008
1006
|
}
|
|
1009
|
-
|
|
1007
|
+
interface DeleteDataCollectionFieldRequest {
|
|
1010
1008
|
/**
|
|
1011
1009
|
* ID of data collection to update
|
|
1012
1010
|
* @maxLength 256
|
|
@@ -1018,11 +1016,11 @@ export interface DeleteDataCollectionFieldRequest {
|
|
|
1018
1016
|
*/
|
|
1019
1017
|
fieldKey: string;
|
|
1020
1018
|
}
|
|
1021
|
-
|
|
1019
|
+
interface DeleteDataCollectionFieldResponse {
|
|
1022
1020
|
/** updated data collection */
|
|
1023
1021
|
dataCollection?: DataCollection;
|
|
1024
1022
|
}
|
|
1025
|
-
|
|
1023
|
+
interface UpdateDataPermissionsRequest {
|
|
1026
1024
|
/**
|
|
1027
1025
|
* ID of data collections to update
|
|
1028
1026
|
* @maxLength 256
|
|
@@ -1031,11 +1029,11 @@ export interface UpdateDataPermissionsRequest {
|
|
|
1031
1029
|
/** Data permissions to set */
|
|
1032
1030
|
dataPermissions?: DataPermissions;
|
|
1033
1031
|
}
|
|
1034
|
-
|
|
1032
|
+
interface UpdateDataPermissionsResponse {
|
|
1035
1033
|
/** Updated data collection */
|
|
1036
1034
|
dataCollection?: DataCollection;
|
|
1037
1035
|
}
|
|
1038
|
-
|
|
1036
|
+
interface BulkGetDataCollectionsPageBySnapshotsRequest {
|
|
1039
1037
|
/**
|
|
1040
1038
|
* Ids of schema snapshot
|
|
1041
1039
|
* @format GUID
|
|
@@ -1046,13 +1044,13 @@ export interface BulkGetDataCollectionsPageBySnapshotsRequest {
|
|
|
1046
1044
|
/** Pagination information. */
|
|
1047
1045
|
paging?: Paging;
|
|
1048
1046
|
}
|
|
1049
|
-
|
|
1047
|
+
interface BulkGetDataCollectionsPageBySnapshotsResponse {
|
|
1050
1048
|
/** List of snapshot collection map */
|
|
1051
1049
|
snapshotCollections?: SnapshotCollection[];
|
|
1052
1050
|
/** Paging information. */
|
|
1053
1051
|
pagingMetadata?: PagingMetadataV2;
|
|
1054
1052
|
}
|
|
1055
|
-
|
|
1053
|
+
interface SnapshotCollection {
|
|
1056
1054
|
/**
|
|
1057
1055
|
* snapshot to which collection belongs
|
|
1058
1056
|
* @format GUID
|
|
@@ -1067,7 +1065,7 @@ export interface SnapshotCollection {
|
|
|
1067
1065
|
indexes?: Index[];
|
|
1068
1066
|
}
|
|
1069
1067
|
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
1070
|
-
|
|
1068
|
+
interface Index {
|
|
1071
1069
|
/**
|
|
1072
1070
|
* Name of the index.
|
|
1073
1071
|
* @minLength 1
|
|
@@ -1112,13 +1110,13 @@ export interface Index {
|
|
|
1112
1110
|
* Order determines how values are ordered in the index. This is important when
|
|
1113
1111
|
* ordering and/or range querying by indexed fields.
|
|
1114
1112
|
*/
|
|
1115
|
-
|
|
1113
|
+
declare enum Order {
|
|
1116
1114
|
ASC = "ASC",
|
|
1117
1115
|
DESC = "DESC"
|
|
1118
1116
|
}
|
|
1119
1117
|
/** @enumType */
|
|
1120
|
-
|
|
1121
|
-
|
|
1118
|
+
type OrderWithLiterals = Order | 'ASC' | 'DESC';
|
|
1119
|
+
interface IndexField {
|
|
1122
1120
|
/**
|
|
1123
1121
|
* Path of the field to index. For example: `title` or `options.price`.
|
|
1124
1122
|
* @minLength 1
|
|
@@ -1132,7 +1130,7 @@ export interface IndexField {
|
|
|
1132
1130
|
*/
|
|
1133
1131
|
order?: OrderWithLiterals;
|
|
1134
1132
|
}
|
|
1135
|
-
|
|
1133
|
+
declare enum IndexStatus {
|
|
1136
1134
|
/** Place holder. Never returned by the service. */
|
|
1137
1135
|
UNKNOWN = "UNKNOWN",
|
|
1138
1136
|
/** Index creation is in progress. */
|
|
@@ -1149,8 +1147,8 @@ export declare enum IndexStatus {
|
|
|
1149
1147
|
INVALID = "INVALID"
|
|
1150
1148
|
}
|
|
1151
1149
|
/** @enumType */
|
|
1152
|
-
|
|
1153
|
-
|
|
1150
|
+
type IndexStatusWithLiterals = IndexStatus | 'UNKNOWN' | 'BUILDING' | 'ACTIVE' | 'DROPPING' | 'DROPPED' | 'FAILED' | 'INVALID';
|
|
1151
|
+
interface Failure {
|
|
1154
1152
|
/**
|
|
1155
1153
|
* Error code.
|
|
1156
1154
|
* - `WDE0112`: Unknown error while building collection index.
|
|
@@ -1171,7 +1169,7 @@ export interface Failure {
|
|
|
1171
1169
|
*/
|
|
1172
1170
|
itemId?: string | null;
|
|
1173
1171
|
}
|
|
1174
|
-
|
|
1172
|
+
declare enum IndexSource {
|
|
1175
1173
|
/** Place holder. Never returned by the service. */
|
|
1176
1174
|
UNKNOWN_INDEX_SOURCE = "UNKNOWN_INDEX_SOURCE",
|
|
1177
1175
|
/** Index is created by the system, present for all collections. */
|
|
@@ -1182,10 +1180,10 @@ export declare enum IndexSource {
|
|
|
1182
1180
|
AUTO = "AUTO"
|
|
1183
1181
|
}
|
|
1184
1182
|
/** @enumType */
|
|
1185
|
-
|
|
1186
|
-
|
|
1183
|
+
type IndexSourceWithLiterals = IndexSource | 'UNKNOWN_INDEX_SOURCE' | 'SYSTEM' | 'USER' | 'AUTO';
|
|
1184
|
+
interface CreateDataCollectionsSnapshotRequest {
|
|
1187
1185
|
}
|
|
1188
|
-
|
|
1186
|
+
interface CreateDataCollectionsSnapshotResponse {
|
|
1189
1187
|
/**
|
|
1190
1188
|
* created snapshot ID
|
|
1191
1189
|
* @format GUID
|
|
@@ -1194,7 +1192,7 @@ export interface CreateDataCollectionsSnapshotResponse {
|
|
|
1194
1192
|
/** data collections in snapshot */
|
|
1195
1193
|
snapshotCollections?: DataCollection[];
|
|
1196
1194
|
}
|
|
1197
|
-
|
|
1195
|
+
interface RestoreDataCollectionsFromSnapshotRequest {
|
|
1198
1196
|
/**
|
|
1199
1197
|
* snapshot ID to restore
|
|
1200
1198
|
* @format GUID
|
|
@@ -1215,7 +1213,7 @@ export interface RestoreDataCollectionsFromSnapshotRequest {
|
|
|
1215
1213
|
*/
|
|
1216
1214
|
restorationCollections?: RestorationCollection[];
|
|
1217
1215
|
}
|
|
1218
|
-
|
|
1216
|
+
interface Destination {
|
|
1219
1217
|
/**
|
|
1220
1218
|
* Collection id.
|
|
1221
1219
|
* @minLength 1
|
|
@@ -1228,7 +1226,7 @@ export interface Destination {
|
|
|
1228
1226
|
*/
|
|
1229
1227
|
displayName?: string | null;
|
|
1230
1228
|
}
|
|
1231
|
-
|
|
1229
|
+
interface RestorationCollection {
|
|
1232
1230
|
/**
|
|
1233
1231
|
* Collection ID to restore
|
|
1234
1232
|
* @minLength 1
|
|
@@ -1241,20 +1239,20 @@ export interface RestorationCollection {
|
|
|
1241
1239
|
*/
|
|
1242
1240
|
destination?: Destination;
|
|
1243
1241
|
}
|
|
1244
|
-
|
|
1242
|
+
interface RestoreDataCollectionsFromSnapshotResponse {
|
|
1245
1243
|
/** restored collections */
|
|
1246
1244
|
restoredCollections?: DataCollection[];
|
|
1247
1245
|
}
|
|
1248
|
-
|
|
1246
|
+
interface DeleteDataCollectionsSnapshotRequest {
|
|
1249
1247
|
/**
|
|
1250
1248
|
* snapshot ID to delete
|
|
1251
1249
|
* @format GUID
|
|
1252
1250
|
*/
|
|
1253
1251
|
snapshotId?: string;
|
|
1254
1252
|
}
|
|
1255
|
-
|
|
1253
|
+
interface DeleteDataCollectionsSnapshotResponse {
|
|
1256
1254
|
}
|
|
1257
|
-
|
|
1255
|
+
interface CreateMigratedCollectionsSnapshotRequest {
|
|
1258
1256
|
/** @format GUID */
|
|
1259
1257
|
existingSnapshotId?: string;
|
|
1260
1258
|
/** @maxLength 255 */
|
|
@@ -1262,17 +1260,17 @@ export interface CreateMigratedCollectionsSnapshotRequest {
|
|
|
1262
1260
|
/** @maxLength 255 */
|
|
1263
1261
|
existingNamespace?: string;
|
|
1264
1262
|
}
|
|
1265
|
-
|
|
1263
|
+
interface CreateMigratedCollectionsSnapshotResponse {
|
|
1266
1264
|
/** @format GUID */
|
|
1267
1265
|
snapshotId?: string;
|
|
1268
1266
|
}
|
|
1269
|
-
|
|
1267
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1270
1268
|
createdEvent?: EntityCreatedEvent;
|
|
1271
1269
|
updatedEvent?: EntityUpdatedEvent;
|
|
1272
1270
|
deletedEvent?: EntityDeletedEvent;
|
|
1273
1271
|
actionEvent?: ActionEvent;
|
|
1274
1272
|
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
1275
|
-
|
|
1273
|
+
_id?: string;
|
|
1276
1274
|
/**
|
|
1277
1275
|
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
1278
1276
|
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
@@ -1301,36 +1299,34 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
1301
1299
|
entityEventSequence?: string | null;
|
|
1302
1300
|
}
|
|
1303
1301
|
/** @oneof */
|
|
1304
|
-
|
|
1302
|
+
interface DomainEventBodyOneOf {
|
|
1305
1303
|
createdEvent?: EntityCreatedEvent;
|
|
1306
1304
|
updatedEvent?: EntityUpdatedEvent;
|
|
1307
1305
|
deletedEvent?: EntityDeletedEvent;
|
|
1308
1306
|
actionEvent?: ActionEvent;
|
|
1309
1307
|
}
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
1313
|
-
restoreInfo?: RestoreInfo;
|
|
1308
|
+
interface EntityCreatedEvent {
|
|
1309
|
+
entity?: string;
|
|
1314
1310
|
}
|
|
1315
|
-
|
|
1311
|
+
interface RestoreInfo {
|
|
1316
1312
|
deletedDate?: Date | null;
|
|
1317
1313
|
}
|
|
1318
|
-
|
|
1314
|
+
interface EntityUpdatedEvent {
|
|
1319
1315
|
/**
|
|
1320
1316
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1321
1317
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1322
1318
|
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1323
1319
|
*/
|
|
1324
|
-
|
|
1320
|
+
currentEntity?: string;
|
|
1325
1321
|
}
|
|
1326
|
-
|
|
1322
|
+
interface EntityDeletedEvent {
|
|
1327
1323
|
/** Entity that was deleted. */
|
|
1328
|
-
|
|
1324
|
+
deletedEntity?: string | null;
|
|
1329
1325
|
}
|
|
1330
|
-
|
|
1331
|
-
|
|
1326
|
+
interface ActionEvent {
|
|
1327
|
+
body?: string;
|
|
1332
1328
|
}
|
|
1333
|
-
|
|
1329
|
+
interface MessageEnvelope {
|
|
1334
1330
|
/**
|
|
1335
1331
|
* App instance ID.
|
|
1336
1332
|
* @format GUID
|
|
@@ -1346,7 +1342,7 @@ export interface MessageEnvelope {
|
|
|
1346
1342
|
/** Stringify payload. */
|
|
1347
1343
|
data?: string;
|
|
1348
1344
|
}
|
|
1349
|
-
|
|
1345
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1350
1346
|
/**
|
|
1351
1347
|
* ID of a site visitor that has not logged in to the site.
|
|
1352
1348
|
* @format GUID
|
|
@@ -1371,7 +1367,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
1371
1367
|
identityType?: WebhookIdentityTypeWithLiterals;
|
|
1372
1368
|
}
|
|
1373
1369
|
/** @oneof */
|
|
1374
|
-
|
|
1370
|
+
interface IdentificationDataIdOneOf {
|
|
1375
1371
|
/**
|
|
1376
1372
|
* ID of a site visitor that has not logged in to the site.
|
|
1377
1373
|
* @format GUID
|
|
@@ -1393,7 +1389,7 @@ export interface IdentificationDataIdOneOf {
|
|
|
1393
1389
|
*/
|
|
1394
1390
|
appId?: string;
|
|
1395
1391
|
}
|
|
1396
|
-
|
|
1392
|
+
declare enum WebhookIdentityType {
|
|
1397
1393
|
UNKNOWN = "UNKNOWN",
|
|
1398
1394
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1399
1395
|
MEMBER = "MEMBER",
|
|
@@ -1401,4 +1397,63 @@ export declare enum WebhookIdentityType {
|
|
|
1401
1397
|
APP = "APP"
|
|
1402
1398
|
}
|
|
1403
1399
|
/** @enumType */
|
|
1404
|
-
|
|
1400
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
1401
|
+
interface GetDataCollectionOptions {
|
|
1402
|
+
/**
|
|
1403
|
+
* Whether to retrieve data from the primary database instance.
|
|
1404
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1405
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
1406
|
+
*
|
|
1407
|
+
* Default: `false`
|
|
1408
|
+
*/
|
|
1409
|
+
consistentRead?: boolean;
|
|
1410
|
+
/**
|
|
1411
|
+
* List of specific field names to return, if empty all fields are returned.
|
|
1412
|
+
* Affects all returned collections
|
|
1413
|
+
* @maxSize 100
|
|
1414
|
+
* @maxLength 1000
|
|
1415
|
+
*/
|
|
1416
|
+
fields?: string[];
|
|
1417
|
+
}
|
|
1418
|
+
interface ListDataCollectionsOptions {
|
|
1419
|
+
/**
|
|
1420
|
+
* Defines how collections in the response are sorted.
|
|
1421
|
+
*
|
|
1422
|
+
* Default: Ordered by ID in ascending order.
|
|
1423
|
+
*/
|
|
1424
|
+
sort?: Sorting;
|
|
1425
|
+
/** Pagination information. */
|
|
1426
|
+
paging?: Paging;
|
|
1427
|
+
/**
|
|
1428
|
+
* Whether to retrieve data from the primary database instance.
|
|
1429
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1430
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
1431
|
+
*
|
|
1432
|
+
* Default: `false`
|
|
1433
|
+
*/
|
|
1434
|
+
consistentRead?: boolean;
|
|
1435
|
+
/**
|
|
1436
|
+
* List of specific field names to return, if empty all fields are returned.
|
|
1437
|
+
* Affects all returned collections
|
|
1438
|
+
* @maxSize 100
|
|
1439
|
+
* @maxLength 128
|
|
1440
|
+
*/
|
|
1441
|
+
fields?: string[];
|
|
1442
|
+
}
|
|
1443
|
+
interface CreateDataCollectionFieldOptions {
|
|
1444
|
+
/** field to create */
|
|
1445
|
+
field: Field;
|
|
1446
|
+
}
|
|
1447
|
+
interface UpdateDataCollectionFieldOptions {
|
|
1448
|
+
/** Field to update */
|
|
1449
|
+
field: Field;
|
|
1450
|
+
}
|
|
1451
|
+
interface DeleteDataCollectionFieldOptions {
|
|
1452
|
+
/**
|
|
1453
|
+
* Field ID to delete
|
|
1454
|
+
* @maxLength 1000
|
|
1455
|
+
*/
|
|
1456
|
+
fieldKey: string;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
export { type SingleItemPluginOptions as $, AccessLevel as A, type ArraySizeRange as B, CollectionType as C, type DataCollection as D, type FieldPlugin as E, FieldPluginType as F, type GetDataCollectionOptions as G, type FieldPluginOptionsOneOf as H, IndexStatus as I, type CmsOptions as J, type Permissions as K, type ListDataCollectionsOptions as L, type MultiReference as M, type NumberRange as N, Order as O, PluginType as P, QueryOperator as Q, Role as R, Status as S, Type as T, type UrlizedOnlyPattern as U, type Plugin as V, WebhookIdentityType as W, type PluginOptionsOneOf as X, type SiteSort as Y, type PublishPluginOptions as Z, type _Object as _, type ListDataCollectionsResponse as a, type DeleteDataCollectionFieldOptions as a$, type UrlizedPluginOptions as a0, type MultilingualOptions as a1, type PageLinkPluginOptions as a2, type PluginCmsOptions as a3, type DataPermissions as a4, type AllowedDataPermissions as a5, type DataCollectionClonedEvent as a6, type DataCollectionChangedEvent as a7, type FieldUpdate as a8, type PluginUpdate as a9, type BulkGetDataCollectionsPageBySnapshotsResponse as aA, type SnapshotCollection as aB, type Index as aC, type IndexField as aD, type Failure as aE, type CreateDataCollectionsSnapshotRequest as aF, type CreateDataCollectionsSnapshotResponse as aG, type RestoreDataCollectionsFromSnapshotRequest as aH, type Destination as aI, type RestorationCollection as aJ, type RestoreDataCollectionsFromSnapshotResponse as aK, type DeleteDataCollectionsSnapshotRequest as aL, type DeleteDataCollectionsSnapshotResponse as aM, type CreateMigratedCollectionsSnapshotRequest as aN, type CreateMigratedCollectionsSnapshotResponse as aO, type DomainEvent as aP, type DomainEventBodyOneOf as aQ, type EntityCreatedEvent as aR, type RestoreInfo as aS, type EntityUpdatedEvent as aT, type EntityDeletedEvent as aU, type ActionEvent as aV, type MessageEnvelope as aW, type IdentificationData as aX, type IdentificationDataIdOneOf as aY, type CreateDataCollectionFieldOptions as aZ, type UpdateDataCollectionFieldOptions as a_, type DataCollectionEvictedEvent as aa, type CreateDataCollectionRequest as ab, type CreateDataCollectionResponse as ac, type GetDataCollectionRequest as ad, type GetDataCollectionResponse as ae, type ListDataCollectionsRequest as af, type Sorting as ag, type Paging as ah, type PagingMetadataV2 as ai, type BulkGetDataCollectionsRequest as aj, type BulkGetDataCollectionsResponse as ak, type UpdateDataCollectionRequest as al, type UpdateDataCollectionResponse as am, type DeleteDataCollectionRequest as an, type DeleteDataCollectionResponse as ao, type RestoreDataCollectionRequest as ap, type RestoreDataCollectionResponse as aq, type CreateDataCollectionFieldRequest as ar, type CreateDataCollectionFieldResponse as as, type UpdateDataCollectionFieldRequest as at, type UpdateDataCollectionFieldResponse as au, type DeleteDataCollectionFieldRequest as av, type DeleteDataCollectionFieldResponse as aw, type UpdateDataPermissionsRequest as ax, type UpdateDataPermissionsResponse as ay, type BulkGetDataCollectionsPageBySnapshotsRequest as az, Direction as b, DataOperation as c, CollectionOperation as d, Format as e, PagingMode as f, Segment as g, SortOrder as h, IndexSource as i, type Sort as j, type CollectionCapabilities as k, type IndexLimits as l, type IndexQuotaLimits as m, type Field as n, type FieldRangeValidationsOneOf as o, type TypeMetadata as p, type TypeMetadataMetadataOneOf as q, type FieldCapabilities as r, type ObjectField as s, type FieldsPattern as t, type Calculator as u, type CalculatorPatternOneOf as v, type Reference as w, type _Array as x, type PageLink as y, type StringLengthRange as z };
|