@wix/auto_sdk_data_collections 1.0.10 → 1.0.12
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 → data-v2-data-collection-collections.universal-DFG8hhGA.d.mts} +199 -144
- package/build/{cjs/src/data-v2-data-collection-collections.types.d.ts → data-v2-data-collection-collections.universal-DFG8hhGA.d.ts} +199 -144
- package/build/index.d.mts +75 -0
- package/build/index.d.ts +75 -0
- package/build/index.js +1278 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +1227 -0
- package/build/index.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.mts} +230 -144
- package/build/internal/{es/src/data-v2-data-collection-collections.types.d.ts → data-v2-data-collection-collections.universal-DZ3_N2Cv.d.ts} +230 -144
- package/build/internal/index.d.mts +121 -0
- package/build/internal/index.d.ts +121 -0
- package/build/internal/index.js +1278 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +1227 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +882 -0
- package/build/internal/meta.d.ts +882 -0
- package/build/internal/meta.js +883 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +848 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +882 -0
- package/build/meta.d.ts +882 -0
- package/build/meta.js +883 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +848 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- 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/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.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/package.json +0 -3
- 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.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.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/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.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
package/build/meta.d.mts
ADDED
|
@@ -0,0 +1,882 @@
|
|
|
1
|
+
import { ab as CreateDataCollectionRequest$1, ac as CreateDataCollectionResponse$1, ad as GetDataCollectionRequest$1, ae as GetDataCollectionResponse$1, af as ListDataCollectionsRequest$1, a as ListDataCollectionsResponse$1, al as UpdateDataCollectionRequest$1, am as UpdateDataCollectionResponse$1, an as DeleteDataCollectionRequest$1, ao as DeleteDataCollectionResponse$1, ap as RestoreDataCollectionRequest$1, aq as RestoreDataCollectionResponse$1, ar as CreateDataCollectionFieldRequest$1, as as CreateDataCollectionFieldResponse$1, at as UpdateDataCollectionFieldRequest$1, au as UpdateDataCollectionFieldResponse$1, av as DeleteDataCollectionFieldRequest$1, aw as DeleteDataCollectionFieldResponse$1 } from './data-v2-data-collection-collections.universal-DFG8hhGA.mjs';
|
|
2
|
+
|
|
3
|
+
/** A data collection determines the structure of data to be stored in a database. */
|
|
4
|
+
interface DataCollection {
|
|
5
|
+
/**
|
|
6
|
+
* Collection ID. For example, `my-first-collection`. May include a namespace.
|
|
7
|
+
* @immutable
|
|
8
|
+
* @maxLength 256
|
|
9
|
+
*/
|
|
10
|
+
id?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Collection type. Indicates how the collection was created and how it is stored.
|
|
13
|
+
* @readonly
|
|
14
|
+
*/
|
|
15
|
+
collectionType?: CollectionTypeWithLiterals;
|
|
16
|
+
/**
|
|
17
|
+
* ID of the app that defined this collection. For collections defined by Wix users, this value is null.
|
|
18
|
+
* @format GUID
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
ownerAppId?: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Maximum number of items returned in a single query, based on the underlying storage.
|
|
24
|
+
* Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
|
|
25
|
+
* External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
|
|
26
|
+
* @readonly
|
|
27
|
+
*/
|
|
28
|
+
maxPageSize?: number | null;
|
|
29
|
+
/**
|
|
30
|
+
* Collection's display name as shown in the CMS. For example, `My First Collection`.
|
|
31
|
+
* @maxLength 1000
|
|
32
|
+
*/
|
|
33
|
+
displayName?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Default item sorting order when a query doesn't specify one.
|
|
36
|
+
* @readonly
|
|
37
|
+
*/
|
|
38
|
+
defaultDisplayOrder?: Sort;
|
|
39
|
+
/**
|
|
40
|
+
* UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
|
|
41
|
+
* Empty for all data collections not owned by Wix apps.
|
|
42
|
+
* @readonly
|
|
43
|
+
* @maxLength 1000
|
|
44
|
+
*/
|
|
45
|
+
displayNamespace?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Field whose value the CMS displays to represent the collection item when referenced in a different collection.
|
|
48
|
+
* @maxLength 1000
|
|
49
|
+
*/
|
|
50
|
+
displayField?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Capabilities the collection supports.
|
|
53
|
+
* @readonly
|
|
54
|
+
*/
|
|
55
|
+
capabilities?: CollectionCapabilities;
|
|
56
|
+
/**
|
|
57
|
+
* Collection's field structure.
|
|
58
|
+
* @maxSize 1000
|
|
59
|
+
*/
|
|
60
|
+
fields?: Field[];
|
|
61
|
+
/** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
|
|
62
|
+
permissions?: Permissions;
|
|
63
|
+
/**
|
|
64
|
+
* 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.
|
|
65
|
+
* @readonly
|
|
66
|
+
*/
|
|
67
|
+
revision?: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* Plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality.
|
|
70
|
+
* @maxSize 100
|
|
71
|
+
*/
|
|
72
|
+
plugins?: Plugin[];
|
|
73
|
+
/**
|
|
74
|
+
* Paging modes the collection supports. In native collections, offset-based paging is supported by default.
|
|
75
|
+
* @readonly
|
|
76
|
+
* @maxSize 2
|
|
77
|
+
*/
|
|
78
|
+
pagingModes?: PagingModeWithLiterals[];
|
|
79
|
+
/**
|
|
80
|
+
* Date the collection was created.
|
|
81
|
+
* @readonly
|
|
82
|
+
*/
|
|
83
|
+
createdDate?: Date | null;
|
|
84
|
+
/**
|
|
85
|
+
* Date the collection was last updated.
|
|
86
|
+
* @readonly
|
|
87
|
+
*/
|
|
88
|
+
updatedDate?: Date | null;
|
|
89
|
+
}
|
|
90
|
+
declare enum CollectionType {
|
|
91
|
+
/** User-created collection. */
|
|
92
|
+
NATIVE = "NATIVE",
|
|
93
|
+
/** [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). */
|
|
94
|
+
WIX_APP = "WIX_APP",
|
|
95
|
+
/** Collection created by a Wix Blocks app. */
|
|
96
|
+
BLOCKS_APP = "BLOCKS_APP",
|
|
97
|
+
/** Collection located in externally connected storage. */
|
|
98
|
+
EXTERNAL = "EXTERNAL"
|
|
99
|
+
}
|
|
100
|
+
/** @enumType */
|
|
101
|
+
type CollectionTypeWithLiterals = CollectionType | 'NATIVE' | 'WIX_APP' | 'BLOCKS_APP' | 'EXTERNAL';
|
|
102
|
+
interface Sort {
|
|
103
|
+
/**
|
|
104
|
+
* Field to sort by.
|
|
105
|
+
* @maxLength 1000
|
|
106
|
+
*/
|
|
107
|
+
fieldKey?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
110
|
+
*
|
|
111
|
+
* Default: `ASC`
|
|
112
|
+
*/
|
|
113
|
+
direction?: DirectionWithLiterals;
|
|
114
|
+
}
|
|
115
|
+
declare enum Direction {
|
|
116
|
+
ASC = "ASC",
|
|
117
|
+
DESC = "DESC"
|
|
118
|
+
}
|
|
119
|
+
/** @enumType */
|
|
120
|
+
type DirectionWithLiterals = Direction | 'ASC' | 'DESC';
|
|
121
|
+
interface CollectionCapabilities {
|
|
122
|
+
/**
|
|
123
|
+
* Data operations the collection supports. The listed operations can be performed on data the collection contains.
|
|
124
|
+
*
|
|
125
|
+
* > **Note**: The `PATCH` and `BULK_PATCH` oeprations aren't currently supported.
|
|
126
|
+
* @maxSize 100
|
|
127
|
+
*/
|
|
128
|
+
dataOperations?: DataOperationWithLiterals[];
|
|
129
|
+
/**
|
|
130
|
+
* Collection operations supported. The listed operations can be performed on the collection itself.
|
|
131
|
+
* @maxSize 100
|
|
132
|
+
*/
|
|
133
|
+
collectionOperations?: CollectionOperationWithLiterals[];
|
|
134
|
+
/** Maximum number of indexes for the collection. */
|
|
135
|
+
indexLimits?: IndexLimits;
|
|
136
|
+
}
|
|
137
|
+
declare enum DataOperation {
|
|
138
|
+
AGGREGATE = "AGGREGATE",
|
|
139
|
+
BULK_INSERT = "BULK_INSERT",
|
|
140
|
+
BULK_REMOVE = "BULK_REMOVE",
|
|
141
|
+
BULK_SAVE = "BULK_SAVE",
|
|
142
|
+
BULK_UPDATE = "BULK_UPDATE",
|
|
143
|
+
COUNT = "COUNT",
|
|
144
|
+
DISTINCT = "DISTINCT",
|
|
145
|
+
FIND = "FIND",
|
|
146
|
+
GET = "GET",
|
|
147
|
+
INSERT = "INSERT",
|
|
148
|
+
INSERT_REFERENCE = "INSERT_REFERENCE",
|
|
149
|
+
IS_REFERENCED = "IS_REFERENCED",
|
|
150
|
+
QUERY_REFERENCED = "QUERY_REFERENCED",
|
|
151
|
+
REMOVE = "REMOVE",
|
|
152
|
+
REMOVE_REFERENCE = "REMOVE_REFERENCE",
|
|
153
|
+
REPLACE_REFERENCES = "REPLACE_REFERENCES",
|
|
154
|
+
SAVE = "SAVE",
|
|
155
|
+
TRUNCATE = "TRUNCATE",
|
|
156
|
+
UPDATE = "UPDATE",
|
|
157
|
+
PATCH = "PATCH",
|
|
158
|
+
BULK_PATCH = "BULK_PATCH"
|
|
159
|
+
}
|
|
160
|
+
/** @enumType */
|
|
161
|
+
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';
|
|
162
|
+
declare enum CollectionOperation {
|
|
163
|
+
/** Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed. */
|
|
164
|
+
UPDATE = "UPDATE",
|
|
165
|
+
/** Allows deleting the entire collection. If not included, the collection can't be deleted. */
|
|
166
|
+
REMOVE = "REMOVE"
|
|
167
|
+
}
|
|
168
|
+
/** @enumType */
|
|
169
|
+
type CollectionOperationWithLiterals = CollectionOperation | 'UPDATE' | 'REMOVE';
|
|
170
|
+
interface IndexLimits {
|
|
171
|
+
/** Maximum number of regular (non-unique) indexes allowed for this collection. */
|
|
172
|
+
regular?: number;
|
|
173
|
+
/** Maximum number of unique indexes allowed for this collection. */
|
|
174
|
+
unique?: number;
|
|
175
|
+
/** Maximum number of regular and unique indexes allowed for this collection. */
|
|
176
|
+
total?: number;
|
|
177
|
+
}
|
|
178
|
+
interface Field extends FieldRangeValidationsOneOf {
|
|
179
|
+
/** Range of possible values for a numerical field. */
|
|
180
|
+
numberRange?: NumberRange;
|
|
181
|
+
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
182
|
+
stringLengthRange?: StringLengthRange;
|
|
183
|
+
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
184
|
+
arraySizeRange?: ArraySizeRange;
|
|
185
|
+
/**
|
|
186
|
+
* Unique identifier for the field. For example, `firstName`.
|
|
187
|
+
* @maxLength 1000
|
|
188
|
+
*/
|
|
189
|
+
key?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Field's display name when displayed in the CMS. For example, `First Name`.
|
|
192
|
+
* @maxLength 1000
|
|
193
|
+
*/
|
|
194
|
+
displayName?: string | null;
|
|
195
|
+
/**
|
|
196
|
+
* Field's data type.
|
|
197
|
+
*
|
|
198
|
+
* Learn more about data types in Wix Data ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/data-types-in-wix-data) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data)).
|
|
199
|
+
*/
|
|
200
|
+
type?: TypeWithLiterals;
|
|
201
|
+
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
202
|
+
typeMetadata?: TypeMetadata;
|
|
203
|
+
/**
|
|
204
|
+
* Whether the field is a system field.
|
|
205
|
+
* @readonly
|
|
206
|
+
*/
|
|
207
|
+
systemField?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Capabilities the field supports.
|
|
210
|
+
* @readonly
|
|
211
|
+
*/
|
|
212
|
+
capabilities?: FieldCapabilities;
|
|
213
|
+
/** Whether the field is encrypted. */
|
|
214
|
+
encrypted?: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Field description.
|
|
217
|
+
* @maxLength 16000
|
|
218
|
+
*/
|
|
219
|
+
description?: string | null;
|
|
220
|
+
/**
|
|
221
|
+
* Whether the field is read-only. A read-only field can't be changed.
|
|
222
|
+
*
|
|
223
|
+
* Default: `false`
|
|
224
|
+
*/
|
|
225
|
+
readOnly?: boolean | null;
|
|
226
|
+
/**
|
|
227
|
+
* Whether the field is immutable. An immutable field can be set once, but then cannot be updated.
|
|
228
|
+
*
|
|
229
|
+
* Default: `false`
|
|
230
|
+
*/
|
|
231
|
+
immutable?: boolean | null;
|
|
232
|
+
/**
|
|
233
|
+
* Whether the field is required.
|
|
234
|
+
*
|
|
235
|
+
* Default: `false`
|
|
236
|
+
*/
|
|
237
|
+
required?: boolean | null;
|
|
238
|
+
/**
|
|
239
|
+
* Additional optional plugins for the field.
|
|
240
|
+
* @maxSize 100
|
|
241
|
+
*/
|
|
242
|
+
plugins?: FieldPlugin[];
|
|
243
|
+
}
|
|
244
|
+
/** @oneof */
|
|
245
|
+
interface FieldRangeValidationsOneOf {
|
|
246
|
+
/** Range of possible values for a numerical field. */
|
|
247
|
+
numberRange?: NumberRange;
|
|
248
|
+
/** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
|
|
249
|
+
stringLengthRange?: StringLengthRange;
|
|
250
|
+
/** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
|
|
251
|
+
arraySizeRange?: ArraySizeRange;
|
|
252
|
+
}
|
|
253
|
+
declare enum Type {
|
|
254
|
+
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
255
|
+
/** Plain-text string. */
|
|
256
|
+
TEXT = "TEXT",
|
|
257
|
+
/** Number. */
|
|
258
|
+
NUMBER = "NUMBER",
|
|
259
|
+
/** Date string in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`. */
|
|
260
|
+
DATE = "DATE",
|
|
261
|
+
/** [JavaScript Date object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/data-types-in-wix-data)) or an object in the following format: `"someFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}` ([REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data)). */
|
|
262
|
+
DATETIME = "DATETIME",
|
|
263
|
+
/** Web URL or a [Media Manager](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction) URL. */
|
|
264
|
+
IMAGE = "IMAGE",
|
|
265
|
+
/** Boolean `true` or `false` value. */
|
|
266
|
+
BOOLEAN = "BOOLEAN",
|
|
267
|
+
/** Web URL or a [Media Manager](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction) URL. */
|
|
268
|
+
DOCUMENT = "DOCUMENT",
|
|
269
|
+
/** URL in one of the following formats: `http://`, `https://`, `ftp://`, `mailto:`, `sms:`, `tel:`. */
|
|
270
|
+
URL = "URL",
|
|
271
|
+
/** [Rich-text](https://dev.wix.com/docs/rest/articles/getting-started/rich-text) string that may contain a subset of HTML tags. */
|
|
272
|
+
RICH_TEXT = "RICH_TEXT",
|
|
273
|
+
/** Web URL or a [Media Manager](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction) URL. */
|
|
274
|
+
VIDEO = "VIDEO",
|
|
275
|
+
/** Any field type. */
|
|
276
|
+
ANY = "ANY",
|
|
277
|
+
/** Array of strings. */
|
|
278
|
+
ARRAY_STRING = "ARRAY_STRING",
|
|
279
|
+
/** Array of documents: web or [Media Manager](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction) URLs. */
|
|
280
|
+
ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
|
|
281
|
+
/** Web URL or a [Media Manager](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction) URL. */
|
|
282
|
+
AUDIO = "AUDIO",
|
|
283
|
+
/** Time string in `hh:mm:ss.SSS` format. */
|
|
284
|
+
TIME = "TIME",
|
|
285
|
+
/** Language codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format. These may include country codes in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format. */
|
|
286
|
+
LANGUAGE = "LANGUAGE",
|
|
287
|
+
/** [Rich content](https://dev.wix.com/docs/ricos/getting-started/introduction). */
|
|
288
|
+
RICH_CONTENT = "RICH_CONTENT",
|
|
289
|
+
/** Array of web or [Media Manager](https://dev.wix.com/docs/rest/assets/media/media-manager/introduction) URLs. */
|
|
290
|
+
MEDIA_GALLERY = "MEDIA_GALLERY",
|
|
291
|
+
/** Physical address object ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/data-types-in-wix-data#address-object) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data#address-object)). */
|
|
292
|
+
ADDRESS = "ADDRESS",
|
|
293
|
+
/** [Dynamic page link](https://support.wix.com/en/article/cms-linking-to-dynamic-pages). */
|
|
294
|
+
PAGE_LINK = "PAGE_LINK",
|
|
295
|
+
/** Reference to another item in another collection. See Query Referenced Data Items ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/items/query-referenced) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/query-referenced-data-items)) to learn about item references. */
|
|
296
|
+
REFERENCE = "REFERENCE",
|
|
297
|
+
/** References to multiple items in another collection. See Query Referenced Data Items ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/items/query-referenced) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/query-referenced-data-items)) to learn about item references. */
|
|
298
|
+
MULTI_REFERENCE = "MULTI_REFERENCE",
|
|
299
|
+
/** JSON object. */
|
|
300
|
+
OBJECT = "OBJECT",
|
|
301
|
+
/** Array. */
|
|
302
|
+
ARRAY = "ARRAY",
|
|
303
|
+
/** Deprecated type that might appear in legacy collections. */
|
|
304
|
+
LEGACY_TIME = "LEGACY_TIME",
|
|
305
|
+
/** Deprecated type that might appear in legacy collections. */
|
|
306
|
+
LEGACY_BOOK = "LEGACY_BOOK",
|
|
307
|
+
/** Deprecated type that might appear in legacy collections. */
|
|
308
|
+
LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL",
|
|
309
|
+
/** Deprecated type that might appear in legacy collections. */
|
|
310
|
+
LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE",
|
|
311
|
+
/** Deprecated type that might appear in legacy collections. */
|
|
312
|
+
LEGACY_IMAGE = "LEGACY_IMAGE",
|
|
313
|
+
/** Deprecated type that might appear in legacy collections. */
|
|
314
|
+
LEGACY_COLOR = "LEGACY_COLOR",
|
|
315
|
+
/** Deprecated type that might appear in legacy collections. */
|
|
316
|
+
LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
|
|
317
|
+
}
|
|
318
|
+
/** @enumType */
|
|
319
|
+
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';
|
|
320
|
+
interface TypeMetadata extends TypeMetadataMetadataOneOf {
|
|
321
|
+
/** Metadata for a reference field. */
|
|
322
|
+
reference?: Reference;
|
|
323
|
+
/** Metadata for a multi-reference field. */
|
|
324
|
+
multiReference?: MultiReference;
|
|
325
|
+
/** Metadata for an object field. */
|
|
326
|
+
object?: _Object;
|
|
327
|
+
/** Metadata for an array field. */
|
|
328
|
+
array?: _Array;
|
|
329
|
+
/** Metadata for a page link field. */
|
|
330
|
+
pageLink?: PageLink;
|
|
331
|
+
}
|
|
332
|
+
/** @oneof */
|
|
333
|
+
interface TypeMetadataMetadataOneOf {
|
|
334
|
+
/** Metadata for a reference field. */
|
|
335
|
+
reference?: Reference;
|
|
336
|
+
/** Metadata for a multi-reference field. */
|
|
337
|
+
multiReference?: MultiReference;
|
|
338
|
+
/** Metadata for an object field. */
|
|
339
|
+
object?: _Object;
|
|
340
|
+
/** Metadata for an array field. */
|
|
341
|
+
array?: _Array;
|
|
342
|
+
/** Metadata for a page link field. */
|
|
343
|
+
pageLink?: PageLink;
|
|
344
|
+
}
|
|
345
|
+
interface FieldCapabilities {
|
|
346
|
+
/**
|
|
347
|
+
* Whether the collection can be sorted by this field.
|
|
348
|
+
*
|
|
349
|
+
* Default: `false`
|
|
350
|
+
*/
|
|
351
|
+
sortable?: boolean;
|
|
352
|
+
/**
|
|
353
|
+
* Query operators that can be used for this field.
|
|
354
|
+
* @maxSize 100
|
|
355
|
+
*/
|
|
356
|
+
queryOperators?: QueryOperatorWithLiterals[];
|
|
357
|
+
}
|
|
358
|
+
declare enum QueryOperator {
|
|
359
|
+
EQ = "EQ",
|
|
360
|
+
LT = "LT",
|
|
361
|
+
GT = "GT",
|
|
362
|
+
NE = "NE",
|
|
363
|
+
LTE = "LTE",
|
|
364
|
+
GTE = "GTE",
|
|
365
|
+
STARTS_WITH = "STARTS_WITH",
|
|
366
|
+
ENDS_WITH = "ENDS_WITH",
|
|
367
|
+
CONTAINS = "CONTAINS",
|
|
368
|
+
HAS_SOME = "HAS_SOME",
|
|
369
|
+
HAS_ALL = "HAS_ALL",
|
|
370
|
+
EXISTS = "EXISTS",
|
|
371
|
+
URLIZED = "URLIZED"
|
|
372
|
+
}
|
|
373
|
+
/** @enumType */
|
|
374
|
+
type QueryOperatorWithLiterals = QueryOperator | 'EQ' | 'LT' | 'GT' | 'NE' | 'LTE' | 'GTE' | 'STARTS_WITH' | 'ENDS_WITH' | 'CONTAINS' | 'HAS_SOME' | 'HAS_ALL' | 'EXISTS' | 'URLIZED';
|
|
375
|
+
interface ObjectField {
|
|
376
|
+
/**
|
|
377
|
+
* Field ID.
|
|
378
|
+
* @maxLength 1000
|
|
379
|
+
*/
|
|
380
|
+
key?: string;
|
|
381
|
+
/**
|
|
382
|
+
* Display name for the field.
|
|
383
|
+
* @maxLength 1000
|
|
384
|
+
*/
|
|
385
|
+
displayName?: string | null;
|
|
386
|
+
/**
|
|
387
|
+
* Field type.
|
|
388
|
+
*
|
|
389
|
+
* Learn more about data types in Wix Data ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/data-types-in-wix-data) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data)).
|
|
390
|
+
*/
|
|
391
|
+
type?: TypeWithLiterals;
|
|
392
|
+
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
393
|
+
typeMetadata?: TypeMetadata;
|
|
394
|
+
/**
|
|
395
|
+
* Capabilities the object field supports.
|
|
396
|
+
* @readonly
|
|
397
|
+
*/
|
|
398
|
+
capabilities?: FieldCapabilities;
|
|
399
|
+
}
|
|
400
|
+
interface FieldsPattern {
|
|
401
|
+
/** @maxLength 1000 */
|
|
402
|
+
pattern?: string;
|
|
403
|
+
lowercase?: boolean;
|
|
404
|
+
}
|
|
405
|
+
interface UrlizedOnlyPattern {
|
|
406
|
+
/** @maxLength 1000 */
|
|
407
|
+
pattern?: string;
|
|
408
|
+
}
|
|
409
|
+
interface Calculator extends CalculatorPatternOneOf {
|
|
410
|
+
/** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
|
|
411
|
+
fieldsPattern?: FieldsPattern;
|
|
412
|
+
/** Value is only URL encoded. */
|
|
413
|
+
urlizedOnlyPattern?: UrlizedOnlyPattern;
|
|
414
|
+
}
|
|
415
|
+
/** @oneof */
|
|
416
|
+
interface CalculatorPatternOneOf {
|
|
417
|
+
/** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
|
|
418
|
+
fieldsPattern?: FieldsPattern;
|
|
419
|
+
/** Value is only URL encoded. */
|
|
420
|
+
urlizedOnlyPattern?: UrlizedOnlyPattern;
|
|
421
|
+
}
|
|
422
|
+
interface Reference {
|
|
423
|
+
/**
|
|
424
|
+
* Referenced collection ID.
|
|
425
|
+
* @maxLength 256
|
|
426
|
+
*/
|
|
427
|
+
referencedCollectionId?: string;
|
|
428
|
+
}
|
|
429
|
+
interface MultiReference {
|
|
430
|
+
/**
|
|
431
|
+
* Referenced collection ID.
|
|
432
|
+
* @maxLength 256
|
|
433
|
+
*/
|
|
434
|
+
referencedCollectionId?: string;
|
|
435
|
+
/**
|
|
436
|
+
* Referencing field ID.
|
|
437
|
+
* @maxLength 1000
|
|
438
|
+
*/
|
|
439
|
+
referencingFieldKey?: string;
|
|
440
|
+
/**
|
|
441
|
+
* Display name in the CMS for the referenced data.
|
|
442
|
+
* @maxLength 1000
|
|
443
|
+
*/
|
|
444
|
+
referencingDisplayName?: string;
|
|
445
|
+
}
|
|
446
|
+
interface _Object {
|
|
447
|
+
/**
|
|
448
|
+
* Fields within the object.
|
|
449
|
+
* @maxSize 1000
|
|
450
|
+
*/
|
|
451
|
+
fields?: ObjectField[];
|
|
452
|
+
}
|
|
453
|
+
interface _Array {
|
|
454
|
+
/** Element's data type. */
|
|
455
|
+
elementType?: TypeWithLiterals;
|
|
456
|
+
/** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
|
|
457
|
+
typeMetadata?: TypeMetadata;
|
|
458
|
+
}
|
|
459
|
+
interface PageLink {
|
|
460
|
+
calculator?: Calculator;
|
|
461
|
+
/**
|
|
462
|
+
* Defines reference to router pattern in the site document.
|
|
463
|
+
* @maxLength 1000
|
|
464
|
+
*/
|
|
465
|
+
linkedRouterPage?: string | null;
|
|
466
|
+
}
|
|
467
|
+
interface NumberRange {
|
|
468
|
+
/**
|
|
469
|
+
* Minimum permitted value for a numerical field.
|
|
470
|
+
*
|
|
471
|
+
* Default: No validation
|
|
472
|
+
*/
|
|
473
|
+
min?: number | null;
|
|
474
|
+
/**
|
|
475
|
+
* Maximum permitted value for a numerical field.
|
|
476
|
+
*
|
|
477
|
+
* Default: No validation
|
|
478
|
+
*/
|
|
479
|
+
max?: number | null;
|
|
480
|
+
}
|
|
481
|
+
interface StringLengthRange {
|
|
482
|
+
/**
|
|
483
|
+
* Minimum permitted length for a text field.
|
|
484
|
+
*
|
|
485
|
+
* Default: No validation
|
|
486
|
+
*/
|
|
487
|
+
minLength?: number | null;
|
|
488
|
+
/**
|
|
489
|
+
* Maximum permitted length for a text field.
|
|
490
|
+
*
|
|
491
|
+
* Default: No validation
|
|
492
|
+
*/
|
|
493
|
+
maxLength?: number | null;
|
|
494
|
+
}
|
|
495
|
+
interface ArraySizeRange {
|
|
496
|
+
/**
|
|
497
|
+
* 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`.
|
|
498
|
+
*
|
|
499
|
+
* Default: No validation
|
|
500
|
+
*/
|
|
501
|
+
minSize?: number | null;
|
|
502
|
+
/**
|
|
503
|
+
* 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`.
|
|
504
|
+
*
|
|
505
|
+
* Default: No validation
|
|
506
|
+
*/
|
|
507
|
+
maxSize?: number | null;
|
|
508
|
+
}
|
|
509
|
+
/** Optional plug-in aspects for fields */
|
|
510
|
+
interface FieldPlugin extends FieldPluginOptionsOneOf {
|
|
511
|
+
/** Options for the CMS plugin. */
|
|
512
|
+
cmsOptions?: CmsOptions;
|
|
513
|
+
type?: FieldPluginTypeWithLiterals;
|
|
514
|
+
}
|
|
515
|
+
/** @oneof */
|
|
516
|
+
interface FieldPluginOptionsOneOf {
|
|
517
|
+
/** Options for the CMS plugin. */
|
|
518
|
+
cmsOptions?: CmsOptions;
|
|
519
|
+
}
|
|
520
|
+
declare enum FieldPluginType {
|
|
521
|
+
/** Uknown plugin type. */
|
|
522
|
+
UNKNOWN = "UNKNOWN",
|
|
523
|
+
/** CMS-related field attributes */
|
|
524
|
+
CMS = "CMS"
|
|
525
|
+
}
|
|
526
|
+
/** @enumType */
|
|
527
|
+
type FieldPluginTypeWithLiterals = FieldPluginType | 'UNKNOWN' | 'CMS';
|
|
528
|
+
/** Options for the CMS plugin. */
|
|
529
|
+
interface CmsOptions {
|
|
530
|
+
/**
|
|
531
|
+
* Indicates an internal CMS field. The CMS does not display internal fields.
|
|
532
|
+
*
|
|
533
|
+
* Default: `false`
|
|
534
|
+
*/
|
|
535
|
+
internal?: boolean;
|
|
536
|
+
}
|
|
537
|
+
/** Permissions defined by the lowest role needed to perform each action. */
|
|
538
|
+
interface Permissions {
|
|
539
|
+
/** Lowest role needed to add a collection. */
|
|
540
|
+
insert?: RoleWithLiterals;
|
|
541
|
+
/** Lowest role needed to update a collection. */
|
|
542
|
+
update?: RoleWithLiterals;
|
|
543
|
+
/** Lowest role needed to remove a collection. */
|
|
544
|
+
remove?: RoleWithLiterals;
|
|
545
|
+
/** Lowest role needed to read a collection. */
|
|
546
|
+
read?: RoleWithLiterals;
|
|
547
|
+
}
|
|
548
|
+
declare enum Role {
|
|
549
|
+
/** Unknown role. */
|
|
550
|
+
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
551
|
+
/** Site administrator. */
|
|
552
|
+
ADMIN = "ADMIN",
|
|
553
|
+
/** Signed-in user who added content to this collection. */
|
|
554
|
+
SITE_MEMBER_AUTHOR = "SITE_MEMBER_AUTHOR",
|
|
555
|
+
/** Any signed-in user. */
|
|
556
|
+
SITE_MEMBER = "SITE_MEMBER",
|
|
557
|
+
/** Any site visitor. */
|
|
558
|
+
ANYONE = "ANYONE"
|
|
559
|
+
}
|
|
560
|
+
/** @enumType */
|
|
561
|
+
type RoleWithLiterals = Role | 'UNKNOWN_ROLE' | 'ADMIN' | 'SITE_MEMBER_AUTHOR' | 'SITE_MEMBER' | 'ANYONE';
|
|
562
|
+
interface Plugin extends PluginOptionsOneOf {
|
|
563
|
+
/**
|
|
564
|
+
* Options for the Publish plugin.
|
|
565
|
+
* 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.
|
|
566
|
+
*/
|
|
567
|
+
publishOptions?: PublishPluginOptions;
|
|
568
|
+
/** Options for the Single Item plugin. */
|
|
569
|
+
singleItemOptions?: SingleItemPluginOptions;
|
|
570
|
+
/** Options for the Urlized plugin. */
|
|
571
|
+
urlizedOptions?: UrlizedPluginOptions;
|
|
572
|
+
/** Options for the Multilingual plugin. */
|
|
573
|
+
multilingualOptions?: MultilingualOptions;
|
|
574
|
+
/** Options for the PageLink plugin. */
|
|
575
|
+
editablePageLinkOptions?: PageLinkPluginOptions;
|
|
576
|
+
/** Options for the CMS plugin. */
|
|
577
|
+
cmsOptions?: PluginCmsOptions;
|
|
578
|
+
/** Plugin type. */
|
|
579
|
+
type?: PluginTypeWithLiterals;
|
|
580
|
+
}
|
|
581
|
+
/** @oneof */
|
|
582
|
+
interface PluginOptionsOneOf {
|
|
583
|
+
/**
|
|
584
|
+
* Options for the Publish plugin.
|
|
585
|
+
* 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.
|
|
586
|
+
*/
|
|
587
|
+
publishOptions?: PublishPluginOptions;
|
|
588
|
+
/** Options for the Single Item plugin. */
|
|
589
|
+
singleItemOptions?: SingleItemPluginOptions;
|
|
590
|
+
/** Options for the Urlized plugin. */
|
|
591
|
+
urlizedOptions?: UrlizedPluginOptions;
|
|
592
|
+
/** Options for the Multilingual plugin. */
|
|
593
|
+
multilingualOptions?: MultilingualOptions;
|
|
594
|
+
/** Options for the PageLink plugin. */
|
|
595
|
+
editablePageLinkOptions?: PageLinkPluginOptions;
|
|
596
|
+
/** Options for the CMS plugin. */
|
|
597
|
+
cmsOptions?: PluginCmsOptions;
|
|
598
|
+
}
|
|
599
|
+
declare enum Status {
|
|
600
|
+
UNKNOWN_PUBLISH_PLUGIN_STATUS = "UNKNOWN_PUBLISH_PLUGIN_STATUS",
|
|
601
|
+
PUBLISHED = "PUBLISHED",
|
|
602
|
+
DRAFT = "DRAFT"
|
|
603
|
+
}
|
|
604
|
+
/** @enumType */
|
|
605
|
+
type StatusWithLiterals = Status | 'UNKNOWN_PUBLISH_PLUGIN_STATUS' | 'PUBLISHED' | 'DRAFT';
|
|
606
|
+
declare enum Format {
|
|
607
|
+
UNKNOWN_URLIZED_PLUGIN_FORMAT = "UNKNOWN_URLIZED_PLUGIN_FORMAT",
|
|
608
|
+
/** Letters are converted to lower case and spaces are replaced with dashes before generating the encoded URL. */
|
|
609
|
+
ORIGINAL = "ORIGINAL",
|
|
610
|
+
/** No changes are made before generating the encoded URL. */
|
|
611
|
+
PLAIN = "PLAIN"
|
|
612
|
+
}
|
|
613
|
+
/** @enumType */
|
|
614
|
+
type FormatWithLiterals = Format | 'UNKNOWN_URLIZED_PLUGIN_FORMAT' | 'ORIGINAL' | 'PLAIN';
|
|
615
|
+
/** if CMS-defined sort is enabled and should be used in site */
|
|
616
|
+
interface SiteSort {
|
|
617
|
+
/**
|
|
618
|
+
* Field and order for the site sort.
|
|
619
|
+
* @maxSize 100
|
|
620
|
+
*/
|
|
621
|
+
sort?: Sort[];
|
|
622
|
+
}
|
|
623
|
+
declare enum PluginType {
|
|
624
|
+
/** Unknown plugin type. */
|
|
625
|
+
UNKNOWN_PLUGIN_TYPE = "UNKNOWN_PLUGIN_TYPE",
|
|
626
|
+
/** 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. */
|
|
627
|
+
PUBLISH = "PUBLISH",
|
|
628
|
+
/** Ensures the collection can have one item at most. Can only be applied to a new collection. */
|
|
629
|
+
SINGLE_ITEM = "SINGLE_ITEM",
|
|
630
|
+
/** Generates item URLs for collections used by dynamic pages. */
|
|
631
|
+
URLIZED = "URLIZED",
|
|
632
|
+
/** Deprecated. Will be removed in the future. */
|
|
633
|
+
GRIDAPPLESS = "GRIDAPPLESS",
|
|
634
|
+
/** 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). */
|
|
635
|
+
MULTILINGUAL = "MULTILINGUAL",
|
|
636
|
+
/** Indicates that collection is shared with current site. */
|
|
637
|
+
SHARED = "SHARED",
|
|
638
|
+
/** Indicates that page link fields are persisted and can be updated. */
|
|
639
|
+
EDITABLE_PAGE_LINK = "EDITABLE_PAGE_LINK",
|
|
640
|
+
/** CMS-specific collection properties. */
|
|
641
|
+
CMS = "CMS"
|
|
642
|
+
}
|
|
643
|
+
/** @enumType */
|
|
644
|
+
type PluginTypeWithLiterals = PluginType | 'UNKNOWN_PLUGIN_TYPE' | 'PUBLISH' | 'SINGLE_ITEM' | 'URLIZED' | 'GRIDAPPLESS' | 'MULTILINGUAL' | 'SHARED' | 'EDITABLE_PAGE_LINK' | 'CMS';
|
|
645
|
+
interface PublishPluginOptions {
|
|
646
|
+
/** Default status. */
|
|
647
|
+
defaultStatus?: StatusWithLiterals;
|
|
648
|
+
}
|
|
649
|
+
interface SingleItemPluginOptions {
|
|
650
|
+
/**
|
|
651
|
+
* ID of the single item in this collection. If you insert or update an item, its ID value is always changed to this.
|
|
652
|
+
* @maxLength 16000
|
|
653
|
+
*/
|
|
654
|
+
singleItemId?: string;
|
|
655
|
+
}
|
|
656
|
+
interface UrlizedPluginOptions {
|
|
657
|
+
/** Encoding method for generating a URL in ASCII characters. */
|
|
658
|
+
format?: FormatWithLiterals;
|
|
659
|
+
}
|
|
660
|
+
interface MultilingualOptions {
|
|
661
|
+
/**
|
|
662
|
+
* IDs of fields to allow translation.
|
|
663
|
+
* @maxSize 1000
|
|
664
|
+
* @maxLength 1000
|
|
665
|
+
*/
|
|
666
|
+
translatableFieldKeys?: string[];
|
|
667
|
+
}
|
|
668
|
+
interface PageLinkPluginOptions {
|
|
669
|
+
isPersisted?: boolean;
|
|
670
|
+
isMutable?: boolean;
|
|
671
|
+
}
|
|
672
|
+
interface PluginCmsOptions {
|
|
673
|
+
/** CMS sort, applied when a collection is displayed on a site. */
|
|
674
|
+
siteSort?: SiteSort;
|
|
675
|
+
}
|
|
676
|
+
declare enum PagingMode {
|
|
677
|
+
/** Offset-based paging. */
|
|
678
|
+
OFFSET = "OFFSET",
|
|
679
|
+
/** Cursor-based paging. */
|
|
680
|
+
CURSOR = "CURSOR"
|
|
681
|
+
}
|
|
682
|
+
/** @enumType */
|
|
683
|
+
type PagingModeWithLiterals = PagingMode | 'OFFSET' | 'CURSOR';
|
|
684
|
+
interface CreateDataCollectionRequest {
|
|
685
|
+
/** Collection details. */
|
|
686
|
+
collection: DataCollection;
|
|
687
|
+
}
|
|
688
|
+
interface CreateDataCollectionResponse {
|
|
689
|
+
/** Details of collection created. */
|
|
690
|
+
collection?: DataCollection;
|
|
691
|
+
}
|
|
692
|
+
interface GetDataCollectionRequest {
|
|
693
|
+
/**
|
|
694
|
+
* ID of the collection to retrieve.
|
|
695
|
+
* @maxLength 256
|
|
696
|
+
*/
|
|
697
|
+
dataCollectionId: string;
|
|
698
|
+
/**
|
|
699
|
+
* Whether to retrieve data from the primary database instance.
|
|
700
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
701
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
702
|
+
*
|
|
703
|
+
* Default: `false`
|
|
704
|
+
*/
|
|
705
|
+
consistentRead?: boolean;
|
|
706
|
+
/**
|
|
707
|
+
* List of specific field names to return, if empty all fields are returned.
|
|
708
|
+
* Affects all returned collections
|
|
709
|
+
* @maxSize 100
|
|
710
|
+
* @maxLength 1000
|
|
711
|
+
*/
|
|
712
|
+
fields?: string[];
|
|
713
|
+
}
|
|
714
|
+
interface GetDataCollectionResponse {
|
|
715
|
+
/** Details of the collection requested. */
|
|
716
|
+
collection?: DataCollection;
|
|
717
|
+
/**
|
|
718
|
+
* Details of collections referenced by the collection requested.
|
|
719
|
+
* Only populated when `includeReferencedCollections` is `true` in the request.
|
|
720
|
+
*/
|
|
721
|
+
referencedCollections?: DataCollection[];
|
|
722
|
+
}
|
|
723
|
+
interface ListDataCollectionsRequest {
|
|
724
|
+
/**
|
|
725
|
+
* Defines how collections in the response are sorted.
|
|
726
|
+
*
|
|
727
|
+
* Default: Ordered by ID in ascending order.
|
|
728
|
+
*/
|
|
729
|
+
sort?: Sorting;
|
|
730
|
+
/** Pagination information. */
|
|
731
|
+
paging?: Paging;
|
|
732
|
+
/**
|
|
733
|
+
* Whether to retrieve data from the primary database instance.
|
|
734
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
735
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
736
|
+
*
|
|
737
|
+
* Default: `false`
|
|
738
|
+
*/
|
|
739
|
+
consistentRead?: boolean;
|
|
740
|
+
/**
|
|
741
|
+
* List of specific field names to return, if empty all fields are returned.
|
|
742
|
+
* Affects all returned collections
|
|
743
|
+
* @maxSize 100
|
|
744
|
+
* @maxLength 128
|
|
745
|
+
*/
|
|
746
|
+
fields?: string[];
|
|
747
|
+
}
|
|
748
|
+
interface Sorting {
|
|
749
|
+
/**
|
|
750
|
+
* Name of the field to sort by.
|
|
751
|
+
* @maxLength 1000
|
|
752
|
+
*/
|
|
753
|
+
fieldName?: string;
|
|
754
|
+
/** Sort order. */
|
|
755
|
+
order?: SortOrderWithLiterals;
|
|
756
|
+
}
|
|
757
|
+
declare enum SortOrder {
|
|
758
|
+
ASC = "ASC",
|
|
759
|
+
DESC = "DESC"
|
|
760
|
+
}
|
|
761
|
+
/** @enumType */
|
|
762
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
763
|
+
interface Paging {
|
|
764
|
+
/** Number of items to load. */
|
|
765
|
+
limit?: number | null;
|
|
766
|
+
/** Number of items to skip in the current sort order. */
|
|
767
|
+
offset?: number | null;
|
|
768
|
+
}
|
|
769
|
+
interface ListDataCollectionsResponse {
|
|
770
|
+
/** List of collections. */
|
|
771
|
+
collections?: DataCollection[];
|
|
772
|
+
/** Paging information. */
|
|
773
|
+
pagingMetadata?: PagingMetadataV2;
|
|
774
|
+
}
|
|
775
|
+
interface PagingMetadataV2 {
|
|
776
|
+
/** Number of items returned in the response. */
|
|
777
|
+
count?: number | null;
|
|
778
|
+
/** Offset that was requested. */
|
|
779
|
+
offset?: number | null;
|
|
780
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
781
|
+
total?: number | null;
|
|
782
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
783
|
+
tooManyToCount?: boolean | null;
|
|
784
|
+
}
|
|
785
|
+
interface UpdateDataCollectionRequest {
|
|
786
|
+
/** Updated collection details. The existing collection is replaced with this version. */
|
|
787
|
+
collection: DataCollection;
|
|
788
|
+
}
|
|
789
|
+
interface UpdateDataCollectionResponse {
|
|
790
|
+
/** Updated collection details. */
|
|
791
|
+
collection?: DataCollection;
|
|
792
|
+
}
|
|
793
|
+
interface DeleteDataCollectionRequest {
|
|
794
|
+
/**
|
|
795
|
+
* ID of the collection to delete.
|
|
796
|
+
* @maxLength 256
|
|
797
|
+
*/
|
|
798
|
+
dataCollectionId: string;
|
|
799
|
+
}
|
|
800
|
+
interface DeleteDataCollectionResponse {
|
|
801
|
+
}
|
|
802
|
+
interface RestoreDataCollectionRequest {
|
|
803
|
+
/**
|
|
804
|
+
* Data Collection ID to restore
|
|
805
|
+
* @maxLength 256
|
|
806
|
+
*/
|
|
807
|
+
dataCollectionId?: string;
|
|
808
|
+
}
|
|
809
|
+
interface RestoreDataCollectionResponse {
|
|
810
|
+
/** Restored data collection */
|
|
811
|
+
dataCollection?: DataCollection;
|
|
812
|
+
}
|
|
813
|
+
interface CreateDataCollectionFieldRequest {
|
|
814
|
+
/**
|
|
815
|
+
* ID of data collection to update
|
|
816
|
+
* @maxLength 256
|
|
817
|
+
*/
|
|
818
|
+
dataCollectionId: string;
|
|
819
|
+
/** field to create */
|
|
820
|
+
field: Field;
|
|
821
|
+
}
|
|
822
|
+
interface CreateDataCollectionFieldResponse {
|
|
823
|
+
/** updated data collection */
|
|
824
|
+
dataCollection?: DataCollection;
|
|
825
|
+
}
|
|
826
|
+
interface UpdateDataCollectionFieldRequest {
|
|
827
|
+
/**
|
|
828
|
+
* ID of data collection to update
|
|
829
|
+
* @maxLength 256
|
|
830
|
+
*/
|
|
831
|
+
dataCollectionId: string;
|
|
832
|
+
/** Field to update */
|
|
833
|
+
field: Field;
|
|
834
|
+
}
|
|
835
|
+
interface UpdateDataCollectionFieldResponse {
|
|
836
|
+
/** updated data collection */
|
|
837
|
+
dataCollection?: DataCollection;
|
|
838
|
+
}
|
|
839
|
+
interface DeleteDataCollectionFieldRequest {
|
|
840
|
+
/**
|
|
841
|
+
* ID of data collection to update
|
|
842
|
+
* @maxLength 256
|
|
843
|
+
*/
|
|
844
|
+
dataCollectionId: string;
|
|
845
|
+
/**
|
|
846
|
+
* Field ID to delete
|
|
847
|
+
* @maxLength 1000
|
|
848
|
+
*/
|
|
849
|
+
fieldKey: string;
|
|
850
|
+
}
|
|
851
|
+
interface DeleteDataCollectionFieldResponse {
|
|
852
|
+
/** updated data collection */
|
|
853
|
+
dataCollection?: DataCollection;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
857
|
+
getUrl: (context: any) => string;
|
|
858
|
+
httpMethod: K;
|
|
859
|
+
path: string;
|
|
860
|
+
pathParams: M;
|
|
861
|
+
__requestType: T;
|
|
862
|
+
__originalRequestType: S;
|
|
863
|
+
__responseType: Q;
|
|
864
|
+
__originalResponseType: R;
|
|
865
|
+
};
|
|
866
|
+
declare function createDataCollection(): __PublicMethodMetaInfo<'POST', {}, CreateDataCollectionRequest$1, CreateDataCollectionRequest, CreateDataCollectionResponse$1, CreateDataCollectionResponse>;
|
|
867
|
+
declare function getDataCollection(): __PublicMethodMetaInfo<'GET', {
|
|
868
|
+
dataCollectionId: string;
|
|
869
|
+
}, GetDataCollectionRequest$1, GetDataCollectionRequest, GetDataCollectionResponse$1, GetDataCollectionResponse>;
|
|
870
|
+
declare function listDataCollections(): __PublicMethodMetaInfo<'GET', {}, ListDataCollectionsRequest$1, ListDataCollectionsRequest, ListDataCollectionsResponse$1, ListDataCollectionsResponse>;
|
|
871
|
+
declare function updateDataCollection(): __PublicMethodMetaInfo<'PUT', {}, UpdateDataCollectionRequest$1, UpdateDataCollectionRequest, UpdateDataCollectionResponse$1, UpdateDataCollectionResponse>;
|
|
872
|
+
declare function deleteDataCollection(): __PublicMethodMetaInfo<'DELETE', {
|
|
873
|
+
dataCollectionId: string;
|
|
874
|
+
}, DeleteDataCollectionRequest$1, DeleteDataCollectionRequest, DeleteDataCollectionResponse$1, DeleteDataCollectionResponse>;
|
|
875
|
+
declare function restoreDataCollection(): __PublicMethodMetaInfo<'POST', {
|
|
876
|
+
dataCollectionId: string;
|
|
877
|
+
}, RestoreDataCollectionRequest$1, RestoreDataCollectionRequest, RestoreDataCollectionResponse$1, RestoreDataCollectionResponse>;
|
|
878
|
+
declare function createDataCollectionField(): __PublicMethodMetaInfo<'POST', {}, CreateDataCollectionFieldRequest$1, CreateDataCollectionFieldRequest, CreateDataCollectionFieldResponse$1, CreateDataCollectionFieldResponse>;
|
|
879
|
+
declare function updateDataCollectionField(): __PublicMethodMetaInfo<'POST', {}, UpdateDataCollectionFieldRequest$1, UpdateDataCollectionFieldRequest, UpdateDataCollectionFieldResponse$1, UpdateDataCollectionFieldResponse>;
|
|
880
|
+
declare function deleteDataCollectionField(): __PublicMethodMetaInfo<'POST', {}, DeleteDataCollectionFieldRequest$1, DeleteDataCollectionFieldRequest, DeleteDataCollectionFieldResponse$1, DeleteDataCollectionFieldResponse>;
|
|
881
|
+
|
|
882
|
+
export { type __PublicMethodMetaInfo, createDataCollection, createDataCollectionField, deleteDataCollection, deleteDataCollectionField, getDataCollection, listDataCollections, restoreDataCollection, updateDataCollection, updateDataCollectionField };
|