@wix/auto_sdk_data_collections 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/data-v2-data-collection-collections.context.d.ts +9 -0
  11. package/build/cjs/src/data-v2-data-collection-collections.context.js +38 -0
  12. package/build/cjs/src/data-v2-data-collection-collections.context.js.map +1 -0
  13. package/build/cjs/src/data-v2-data-collection-collections.http.d.ts +48 -0
  14. package/build/cjs/src/data-v2-data-collection-collections.http.js +704 -0
  15. package/build/cjs/src/data-v2-data-collection-collections.http.js.map +1 -0
  16. package/build/cjs/src/data-v2-data-collection-collections.meta.d.ts +27 -0
  17. package/build/cjs/src/data-v2-data-collection-collections.meta.js +199 -0
  18. package/build/cjs/src/data-v2-data-collection-collections.meta.js.map +1 -0
  19. package/build/cjs/src/data-v2-data-collection-collections.public.d.ts +69 -0
  20. package/build/cjs/src/data-v2-data-collection-collections.public.js +83 -0
  21. package/build/cjs/src/data-v2-data-collection-collections.public.js.map +1 -0
  22. package/build/cjs/src/data-v2-data-collection-collections.types.d.ts +1238 -0
  23. package/build/cjs/src/data-v2-data-collection-collections.types.js +235 -0
  24. package/build/cjs/src/data-v2-data-collection-collections.types.js.map +1 -0
  25. package/build/cjs/src/data-v2-data-collection-collections.universal.d.ts +1394 -0
  26. package/build/cjs/src/data-v2-data-collection-collections.universal.js +669 -0
  27. package/build/cjs/src/data-v2-data-collection-collections.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/data-v2-data-collection-collections.context.d.ts +9 -0
  39. package/build/es/src/data-v2-data-collection-collections.context.js +17 -0
  40. package/build/es/src/data-v2-data-collection-collections.context.js.map +1 -0
  41. package/build/es/src/data-v2-data-collection-collections.http.d.ts +48 -0
  42. package/build/es/src/data-v2-data-collection-collections.http.js +692 -0
  43. package/build/es/src/data-v2-data-collection-collections.http.js.map +1 -0
  44. package/build/es/src/data-v2-data-collection-collections.meta.d.ts +27 -0
  45. package/build/es/src/data-v2-data-collection-collections.meta.js +164 -0
  46. package/build/es/src/data-v2-data-collection-collections.meta.js.map +1 -0
  47. package/build/es/src/data-v2-data-collection-collections.public.d.ts +69 -0
  48. package/build/es/src/data-v2-data-collection-collections.public.js +53 -0
  49. package/build/es/src/data-v2-data-collection-collections.public.js.map +1 -0
  50. package/build/es/src/data-v2-data-collection-collections.types.d.ts +1238 -0
  51. package/build/es/src/data-v2-data-collection-collections.types.js +232 -0
  52. package/build/es/src/data-v2-data-collection-collections.types.js.map +1 -0
  53. package/build/es/src/data-v2-data-collection-collections.universal.d.ts +1394 -0
  54. package/build/es/src/data-v2-data-collection-collections.universal.js +634 -0
  55. package/build/es/src/data-v2-data-collection-collections.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/data-v2-data-collection-collections.context.d.ts +17 -0
  66. package/build/internal/cjs/src/data-v2-data-collection-collections.context.js +38 -0
  67. package/build/internal/cjs/src/data-v2-data-collection-collections.context.js.map +1 -0
  68. package/build/internal/cjs/src/data-v2-data-collection-collections.http.d.ts +48 -0
  69. package/build/internal/cjs/src/data-v2-data-collection-collections.http.js +704 -0
  70. package/build/internal/cjs/src/data-v2-data-collection-collections.http.js.map +1 -0
  71. package/build/internal/cjs/src/data-v2-data-collection-collections.meta.d.ts +27 -0
  72. package/build/internal/cjs/src/data-v2-data-collection-collections.meta.js +199 -0
  73. package/build/internal/cjs/src/data-v2-data-collection-collections.meta.js.map +1 -0
  74. package/build/internal/cjs/src/data-v2-data-collection-collections.public.d.ts +107 -0
  75. package/build/internal/cjs/src/data-v2-data-collection-collections.public.js +83 -0
  76. package/build/internal/cjs/src/data-v2-data-collection-collections.public.js.map +1 -0
  77. package/build/internal/cjs/src/data-v2-data-collection-collections.types.d.ts +1254 -0
  78. package/build/internal/cjs/src/data-v2-data-collection-collections.types.js +235 -0
  79. package/build/internal/cjs/src/data-v2-data-collection-collections.types.js.map +1 -0
  80. package/build/internal/cjs/src/data-v2-data-collection-collections.universal.d.ts +1504 -0
  81. package/build/internal/cjs/src/data-v2-data-collection-collections.universal.js +669 -0
  82. package/build/internal/cjs/src/data-v2-data-collection-collections.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/data-v2-data-collection-collections.context.d.ts +17 -0
  93. package/build/internal/es/src/data-v2-data-collection-collections.context.js +17 -0
  94. package/build/internal/es/src/data-v2-data-collection-collections.context.js.map +1 -0
  95. package/build/internal/es/src/data-v2-data-collection-collections.http.d.ts +48 -0
  96. package/build/internal/es/src/data-v2-data-collection-collections.http.js +692 -0
  97. package/build/internal/es/src/data-v2-data-collection-collections.http.js.map +1 -0
  98. package/build/internal/es/src/data-v2-data-collection-collections.meta.d.ts +27 -0
  99. package/build/internal/es/src/data-v2-data-collection-collections.meta.js +164 -0
  100. package/build/internal/es/src/data-v2-data-collection-collections.meta.js.map +1 -0
  101. package/build/internal/es/src/data-v2-data-collection-collections.public.d.ts +107 -0
  102. package/build/internal/es/src/data-v2-data-collection-collections.public.js +53 -0
  103. package/build/internal/es/src/data-v2-data-collection-collections.public.js.map +1 -0
  104. package/build/internal/es/src/data-v2-data-collection-collections.types.d.ts +1254 -0
  105. package/build/internal/es/src/data-v2-data-collection-collections.types.js +232 -0
  106. package/build/internal/es/src/data-v2-data-collection-collections.types.js.map +1 -0
  107. package/build/internal/es/src/data-v2-data-collection-collections.universal.d.ts +1504 -0
  108. package/build/internal/es/src/data-v2-data-collection-collections.universal.js +634 -0
  109. package/build/internal/es/src/data-v2-data-collection-collections.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1254 @@
1
+ /** A data collection determines the structure of data to be stored in a database. */
2
+ export interface DataCollection {
3
+ /** Collection ID. For example, `my-first-collection`. May include a namespace. */
4
+ id?: string;
5
+ /**
6
+ * Collection type. Indicates how the collection was created and how it is stored.
7
+ * @readonly
8
+ */
9
+ collectionType?: CollectionType;
10
+ /**
11
+ * ID of the app that defined this collection. For collections defined by Wix users, this value is null.
12
+ * @readonly
13
+ */
14
+ ownerAppId?: string | null;
15
+ /**
16
+ * Maximum number of items returned in a single query, based on the underlying storage.
17
+ * Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
18
+ * External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
19
+ * @readonly
20
+ */
21
+ maxPageSize?: number | null;
22
+ /** Collection's display name as shown in the CMS. For example, `My First Collection`. */
23
+ displayName?: string | null;
24
+ /**
25
+ * Default item sorting order when a query doesn't specify one.
26
+ * @readonly
27
+ */
28
+ defaultDisplayOrder?: Sort;
29
+ /**
30
+ * UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
31
+ * Empty for all data collections not owned by Wix apps.
32
+ * @readonly
33
+ */
34
+ displayNamespace?: string | null;
35
+ /** Field whose value the CMS displays to represent the collection item when referenced in a different collection. */
36
+ displayField?: string | null;
37
+ /**
38
+ * Capabilities the collection supports.
39
+ * @readonly
40
+ */
41
+ capabilities?: CollectionCapabilities;
42
+ /** Collection's field structure. */
43
+ fields?: Field[];
44
+ /** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
45
+ permissions?: Permissions;
46
+ /**
47
+ * 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.
48
+ * @readonly
49
+ */
50
+ revision?: string | null;
51
+ /** Plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality. */
52
+ plugins?: Plugin[];
53
+ /**
54
+ * Paging modes the collection supports. In native collections, offset-based paging is supported by default.
55
+ * @readonly
56
+ */
57
+ pagingModes?: PagingMode[];
58
+ /**
59
+ * Date the collection was created.
60
+ * @readonly
61
+ */
62
+ createdDate?: Date | null;
63
+ /**
64
+ * Date the collection was last updated.
65
+ * @readonly
66
+ */
67
+ updatedDate?: Date | null;
68
+ }
69
+ export declare enum CollectionType {
70
+ /** User-created collection. */
71
+ NATIVE = "NATIVE",
72
+ /** [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). */
73
+ WIX_APP = "WIX_APP",
74
+ /** Collection created by a Wix Blocks app. */
75
+ BLOCKS_APP = "BLOCKS_APP",
76
+ /** Collection located in externally connected storage. */
77
+ EXTERNAL = "EXTERNAL"
78
+ }
79
+ export interface Sort {
80
+ /** Field to sort by. */
81
+ fieldKey?: string;
82
+ /**
83
+ * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
84
+ *
85
+ * Default: `ASC`
86
+ */
87
+ direction?: Direction;
88
+ }
89
+ export declare enum Direction {
90
+ ASC = "ASC",
91
+ DESC = "DESC"
92
+ }
93
+ export interface CollectionCapabilities {
94
+ /**
95
+ * Data operations the collection supports. The listed operations can be performed on data the collection contains.
96
+ *
97
+ * > **Note**: The `PATCH` and `BULK_PATCH` oeprations aren't currently supported.
98
+ */
99
+ dataOperations?: DataOperation[];
100
+ /** Collection operations supported. The listed operations can be performed on the collection itself. */
101
+ collectionOperations?: CollectionOperation[];
102
+ /** Maximum number of indexes for the collection. */
103
+ indexLimits?: IndexLimits;
104
+ }
105
+ export declare enum DataOperation {
106
+ AGGREGATE = "AGGREGATE",
107
+ BULK_INSERT = "BULK_INSERT",
108
+ BULK_REMOVE = "BULK_REMOVE",
109
+ BULK_SAVE = "BULK_SAVE",
110
+ BULK_UPDATE = "BULK_UPDATE",
111
+ COUNT = "COUNT",
112
+ DISTINCT = "DISTINCT",
113
+ FIND = "FIND",
114
+ GET = "GET",
115
+ INSERT = "INSERT",
116
+ INSERT_REFERENCE = "INSERT_REFERENCE",
117
+ IS_REFERENCED = "IS_REFERENCED",
118
+ QUERY_REFERENCED = "QUERY_REFERENCED",
119
+ REMOVE = "REMOVE",
120
+ REMOVE_REFERENCE = "REMOVE_REFERENCE",
121
+ REPLACE_REFERENCES = "REPLACE_REFERENCES",
122
+ SAVE = "SAVE",
123
+ TRUNCATE = "TRUNCATE",
124
+ UPDATE = "UPDATE",
125
+ PATCH = "PATCH",
126
+ BULK_PATCH = "BULK_PATCH"
127
+ }
128
+ export declare enum CollectionOperation {
129
+ /** Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed. */
130
+ UPDATE = "UPDATE",
131
+ /** Allows deleting the entire collection. If not included, the collection can't be deleted. */
132
+ REMOVE = "REMOVE"
133
+ }
134
+ export interface IndexLimits {
135
+ /** Maximum number of regular (non-unique) indexes allowed for this collection. */
136
+ regular?: number;
137
+ /** Maximum number of unique indexes allowed for this collection. */
138
+ unique?: number;
139
+ /** Maximum number of regular and unique indexes allowed for this collection. */
140
+ total?: number;
141
+ }
142
+ export interface Field extends FieldRangeValidationsOneOf {
143
+ /** Range of possible values for a numerical field. */
144
+ numberRange?: NumberRange;
145
+ /** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
146
+ stringLengthRange?: StringLengthRange;
147
+ /** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
148
+ arraySizeRange?: ArraySizeRange;
149
+ /** Unique identifier for the field. For example, `firstName`. */
150
+ key?: string;
151
+ /** Field's display name when displayed in the CMS. For example, `First Name`. */
152
+ displayName?: string | null;
153
+ /** Field's data type. */
154
+ type?: Type;
155
+ /** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
156
+ typeMetadata?: TypeMetadata;
157
+ /**
158
+ * Whether the field is a system field.
159
+ * @readonly
160
+ */
161
+ systemField?: boolean;
162
+ /**
163
+ * Capabilities the field supports.
164
+ * @readonly
165
+ */
166
+ capabilities?: FieldCapabilities;
167
+ /** Whether the field is encrypted. */
168
+ encrypted?: boolean;
169
+ /** Field description. */
170
+ description?: string | null;
171
+ /**
172
+ * Whether the field is read-only. A read-only field can't be changed.
173
+ *
174
+ * Default: `false`
175
+ */
176
+ readOnly?: boolean | null;
177
+ /**
178
+ * Whether the field is immutable. An immutable field can be set once, but then cannot be updated.
179
+ *
180
+ * Default: `false`
181
+ */
182
+ immutable?: boolean | null;
183
+ /**
184
+ * Whether the field is required.
185
+ *
186
+ * Default: `false`
187
+ */
188
+ required?: boolean | null;
189
+ /** Additional optional plugins for the field. */
190
+ plugins?: FieldPlugin[];
191
+ }
192
+ /** @oneof */
193
+ export interface FieldRangeValidationsOneOf {
194
+ /** Range of possible values for a numerical field. */
195
+ numberRange?: NumberRange;
196
+ /** Length range permitted for a text field. Relevant for fields that hold strings, such as those of type `TEXT` or `RICH_TEXT`. */
197
+ stringLengthRange?: StringLengthRange;
198
+ /** Array size range permitted. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`. */
199
+ arraySizeRange?: ArraySizeRange;
200
+ }
201
+ export declare enum Type {
202
+ UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
203
+ TEXT = "TEXT",
204
+ NUMBER = "NUMBER",
205
+ DATE = "DATE",
206
+ DATETIME = "DATETIME",
207
+ IMAGE = "IMAGE",
208
+ BOOLEAN = "BOOLEAN",
209
+ DOCUMENT = "DOCUMENT",
210
+ URL = "URL",
211
+ RICH_TEXT = "RICH_TEXT",
212
+ VIDEO = "VIDEO",
213
+ ANY = "ANY",
214
+ ARRAY_STRING = "ARRAY_STRING",
215
+ ARRAY_DOCUMENT = "ARRAY_DOCUMENT",
216
+ AUDIO = "AUDIO",
217
+ TIME = "TIME",
218
+ LANGUAGE = "LANGUAGE",
219
+ RICH_CONTENT = "RICH_CONTENT",
220
+ MEDIA_GALLERY = "MEDIA_GALLERY",
221
+ ADDRESS = "ADDRESS",
222
+ PAGE_LINK = "PAGE_LINK",
223
+ REFERENCE = "REFERENCE",
224
+ MULTI_REFERENCE = "MULTI_REFERENCE",
225
+ OBJECT = "OBJECT",
226
+ ARRAY = "ARRAY",
227
+ /** Deprecated - can’t be added to collections. Can only appear in older collections. */
228
+ LEGACY_TIME = "LEGACY_TIME",
229
+ /** Deprecated - can’t be added to collections. Can only appear in older collections. */
230
+ LEGACY_BOOK = "LEGACY_BOOK",
231
+ /** Deprecated - can’t be added to collections. Can only appear in older collections. */
232
+ LEGACY_EXTERNAL_URL = "LEGACY_EXTERNAL_URL",
233
+ /** Deprecated - can’t be added to collections. Can only appear in older collections. */
234
+ LEGACY_BROKEN_REFERENCE = "LEGACY_BROKEN_REFERENCE",
235
+ /** Deprecated - can’t be added to collections. Can only appear in older collections. */
236
+ LEGACY_IMAGE = "LEGACY_IMAGE",
237
+ /** Deprecated - can’t be added to collections. Can only appear in older collections. */
238
+ LEGACY_COLOR = "LEGACY_COLOR",
239
+ /** Deprecated - can’t be added to collections. Can only appear in older collections. */
240
+ LEGACY_EXTERNAL_VIDEO = "LEGACY_EXTERNAL_VIDEO"
241
+ }
242
+ export interface TypeMetadata extends TypeMetadataMetadataOneOf {
243
+ /** Metadata for a reference field. */
244
+ reference?: Reference;
245
+ /** Metadata for a multi-reference field. */
246
+ multiReference?: MultiReference;
247
+ /** Metadata for an object field. */
248
+ object?: _Object;
249
+ /** Metadata for an array field. */
250
+ array?: _Array;
251
+ /** Metadata for a page link field. */
252
+ pageLink?: PageLink;
253
+ }
254
+ /** @oneof */
255
+ export interface TypeMetadataMetadataOneOf {
256
+ /** Metadata for a reference field. */
257
+ reference?: Reference;
258
+ /** Metadata for a multi-reference field. */
259
+ multiReference?: MultiReference;
260
+ /** Metadata for an object field. */
261
+ object?: _Object;
262
+ /** Metadata for an array field. */
263
+ array?: _Array;
264
+ /** Metadata for a page link field. */
265
+ pageLink?: PageLink;
266
+ }
267
+ export interface FieldCapabilities {
268
+ /**
269
+ * Whether the collection can be sorted by this field.
270
+ *
271
+ * Default: `false`
272
+ */
273
+ sortable?: boolean;
274
+ /** Query operators that can be used for this field. */
275
+ queryOperators?: QueryOperator[];
276
+ }
277
+ export declare enum QueryOperator {
278
+ EQ = "EQ",
279
+ LT = "LT",
280
+ GT = "GT",
281
+ NE = "NE",
282
+ LTE = "LTE",
283
+ GTE = "GTE",
284
+ STARTS_WITH = "STARTS_WITH",
285
+ ENDS_WITH = "ENDS_WITH",
286
+ CONTAINS = "CONTAINS",
287
+ HAS_SOME = "HAS_SOME",
288
+ HAS_ALL = "HAS_ALL",
289
+ EXISTS = "EXISTS",
290
+ URLIZED = "URLIZED"
291
+ }
292
+ export interface ObjectField {
293
+ /** Field ID. */
294
+ key?: string;
295
+ /** Display name for the field. */
296
+ displayName?: string | null;
297
+ /** Field type. */
298
+ type?: Type;
299
+ /** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
300
+ typeMetadata?: TypeMetadata;
301
+ /**
302
+ * Capabilities the object field supports.
303
+ * @readonly
304
+ */
305
+ capabilities?: FieldCapabilities;
306
+ }
307
+ export interface FieldsPattern {
308
+ pattern?: string;
309
+ lowercase?: boolean;
310
+ }
311
+ export interface UrlizedOnlyPattern {
312
+ pattern?: string;
313
+ }
314
+ export interface Calculator extends CalculatorPatternOneOf {
315
+ /** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
316
+ fieldsPattern?: FieldsPattern;
317
+ /** Value is only URL encoded. */
318
+ urlizedOnlyPattern?: UrlizedOnlyPattern;
319
+ }
320
+ /** @oneof */
321
+ export interface CalculatorPatternOneOf {
322
+ /** Value is calculated according to pattern, whitespaces are replaced with dash [-]. */
323
+ fieldsPattern?: FieldsPattern;
324
+ /** Value is only URL encoded. */
325
+ urlizedOnlyPattern?: UrlizedOnlyPattern;
326
+ }
327
+ export interface Reference {
328
+ /** Referenced collection ID. */
329
+ referencedCollectionId?: string;
330
+ }
331
+ export interface MultiReference {
332
+ /** Referenced collection ID. */
333
+ referencedCollectionId?: string;
334
+ /** Referencing field ID. */
335
+ referencingFieldKey?: string;
336
+ /** Display name in the CMS for the referenced data. */
337
+ referencingDisplayName?: string;
338
+ }
339
+ export interface _Object {
340
+ /** Fields within the object. */
341
+ fields?: ObjectField[];
342
+ }
343
+ export interface _Array {
344
+ /** Element's data type. */
345
+ elementType?: Type;
346
+ /** Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. */
347
+ typeMetadata?: TypeMetadata;
348
+ }
349
+ export interface PageLink {
350
+ calculator?: Calculator;
351
+ /** Defines reference to router pattern in the site document. */
352
+ linkedRouterPage?: string | null;
353
+ }
354
+ export interface NumberRange {
355
+ /**
356
+ * Minimum permitted value for a numerical field.
357
+ *
358
+ * Default: No validation
359
+ */
360
+ min?: number | null;
361
+ /**
362
+ * Maximum permitted value for a numerical field.
363
+ *
364
+ * Default: No validation
365
+ */
366
+ max?: number | null;
367
+ }
368
+ export interface StringLengthRange {
369
+ /**
370
+ * Minimum permitted length for a text field.
371
+ *
372
+ * Default: No validation
373
+ */
374
+ minLength?: number | null;
375
+ /**
376
+ * Maximum permitted length for a text field.
377
+ *
378
+ * Default: No validation
379
+ */
380
+ maxLength?: number | null;
381
+ }
382
+ export interface ArraySizeRange {
383
+ /**
384
+ * 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`.
385
+ *
386
+ * Default: No validation
387
+ */
388
+ minSize?: number | null;
389
+ /**
390
+ * 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`.
391
+ *
392
+ * Default: No validation
393
+ */
394
+ maxSize?: number | null;
395
+ }
396
+ /** Optional plug-in aspects for fields */
397
+ export interface FieldPlugin extends FieldPluginOptionsOneOf {
398
+ /** Options for the CMS plugin. */
399
+ cmsOptions?: CmsOptions;
400
+ type?: FieldPluginType;
401
+ }
402
+ /** @oneof */
403
+ export interface FieldPluginOptionsOneOf {
404
+ /** Options for the CMS plugin. */
405
+ cmsOptions?: CmsOptions;
406
+ }
407
+ export declare enum FieldPluginType {
408
+ /** Uknown plugin type. */
409
+ UNKNOWN = "UNKNOWN",
410
+ /** CMS-related field attributes */
411
+ CMS = "CMS"
412
+ }
413
+ /** Options for the CMS plugin. */
414
+ export interface CmsOptions {
415
+ /**
416
+ * Indicates an internal CMS field. The CMS does not display internal fields.
417
+ *
418
+ * Default: `false`
419
+ */
420
+ internal?: boolean;
421
+ }
422
+ /** Permissions defined by the lowest role needed to perform each action. */
423
+ export interface Permissions {
424
+ /** Lowest role needed to add a collection. */
425
+ insert?: Role;
426
+ /** Lowest role needed to update a collection. */
427
+ update?: Role;
428
+ /** Lowest role needed to remove a collection. */
429
+ remove?: Role;
430
+ /** Lowest role needed to read a collection. */
431
+ read?: Role;
432
+ }
433
+ export declare enum Role {
434
+ /** Unknown role. */
435
+ UNKNOWN_ROLE = "UNKNOWN_ROLE",
436
+ /** Site administrator. */
437
+ ADMIN = "ADMIN",
438
+ /** Signed-in user who added content to this collection. */
439
+ SITE_MEMBER_AUTHOR = "SITE_MEMBER_AUTHOR",
440
+ /** Any signed-in user. */
441
+ SITE_MEMBER = "SITE_MEMBER",
442
+ /** Any site visitor. */
443
+ ANYONE = "ANYONE"
444
+ }
445
+ export interface Plugin extends PluginOptionsOneOf {
446
+ /**
447
+ * Options for the Publish plugin.
448
+ * 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.
449
+ */
450
+ publishOptions?: PublishPluginOptions;
451
+ /** Options for the Single Item plugin. */
452
+ singleItemOptions?: SingleItemPluginOptions;
453
+ /** Options for the Urlized plugin. */
454
+ urlizedOptions?: UrlizedPluginOptions;
455
+ /** Options for the Multilingual plugin. */
456
+ multilingualOptions?: MultilingualOptions;
457
+ /** Options for the PageLink plugin. */
458
+ editablePageLinkOptions?: PageLinkPluginOptions;
459
+ /** Options for the CMS plugin. */
460
+ cmsOptions?: PluginCmsOptions;
461
+ /** Plugin types. */
462
+ type?: PluginType;
463
+ }
464
+ /** @oneof */
465
+ export interface PluginOptionsOneOf {
466
+ /**
467
+ * Options for the Publish plugin.
468
+ * 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.
469
+ */
470
+ publishOptions?: PublishPluginOptions;
471
+ /** Options for the Single Item plugin. */
472
+ singleItemOptions?: SingleItemPluginOptions;
473
+ /** Options for the Urlized plugin. */
474
+ urlizedOptions?: UrlizedPluginOptions;
475
+ /** Options for the Multilingual plugin. */
476
+ multilingualOptions?: MultilingualOptions;
477
+ /** Options for the PageLink plugin. */
478
+ editablePageLinkOptions?: PageLinkPluginOptions;
479
+ /** Options for the CMS plugin. */
480
+ cmsOptions?: PluginCmsOptions;
481
+ }
482
+ export declare enum Status {
483
+ UNKNOWN_PUBLISH_PLUGIN_STATUS = "UNKNOWN_PUBLISH_PLUGIN_STATUS",
484
+ PUBLISHED = "PUBLISHED",
485
+ DRAFT = "DRAFT"
486
+ }
487
+ export declare enum Format {
488
+ UNKNOWN_URLIZED_PLUGIN_FORMAT = "UNKNOWN_URLIZED_PLUGIN_FORMAT",
489
+ /** Letters are converted to lower case and spaces are replaced with dashes before generating the encoded URL. */
490
+ ORIGINAL = "ORIGINAL",
491
+ /** No changes are made before generating the encoded URL. */
492
+ PLAIN = "PLAIN"
493
+ }
494
+ /** if CMS-defined sort is enabled and should be used in site */
495
+ export interface SiteSort {
496
+ /** Field and order for the site sort. */
497
+ sort?: Sort[];
498
+ }
499
+ export declare enum PluginType {
500
+ /** Unknown plugin type. */
501
+ UNKNOWN_PLUGIN_TYPE = "UNKNOWN_PLUGIN_TYPE",
502
+ /** 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. */
503
+ PUBLISH = "PUBLISH",
504
+ /** Ensures the collection can have one item at most. Can only be applied to a new collection. */
505
+ SINGLE_ITEM = "SINGLE_ITEM",
506
+ /** Generates item URLs for collections used by dynamic pages. */
507
+ URLIZED = "URLIZED",
508
+ /** Deprecated. Will be removed in the future. */
509
+ GRIDAPPLESS = "GRIDAPPLESS",
510
+ /** 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). */
511
+ MULTILINGUAL = "MULTILINGUAL",
512
+ /** Indicates that collection is shared with current site. */
513
+ SHARED = "SHARED",
514
+ /** Indicates that page link fields are persisted and can be updated. */
515
+ EDITABLE_PAGE_LINK = "EDITABLE_PAGE_LINK",
516
+ /** CMS-specific collection properties. */
517
+ CMS = "CMS"
518
+ }
519
+ export interface PublishPluginOptions {
520
+ /** Default status. */
521
+ defaultStatus?: Status;
522
+ }
523
+ export interface SingleItemPluginOptions {
524
+ /** ID of the single item in this collection. If you insert or update an item, its ID value is always changed to this. */
525
+ singleItemId?: string;
526
+ }
527
+ export interface UrlizedPluginOptions {
528
+ /** Encoding method for generating a URL in ASCII characters. */
529
+ format?: Format;
530
+ }
531
+ export interface MultilingualOptions {
532
+ /** IDs of fields to allow translation. */
533
+ translatableFieldKeys?: string[];
534
+ }
535
+ export interface PageLinkPluginOptions {
536
+ isPersisted?: boolean;
537
+ isMutable?: boolean;
538
+ }
539
+ export interface PluginCmsOptions {
540
+ /** CMS sort, applied when a collection is displayed on a site. */
541
+ siteSort?: SiteSort;
542
+ }
543
+ export declare enum PagingMode {
544
+ /** Offset-based paging. */
545
+ OFFSET = "OFFSET",
546
+ /** Cursor-based paging. */
547
+ CURSOR = "CURSOR"
548
+ }
549
+ /** Data permissions defined by access level for each action. */
550
+ export interface DataPermissions {
551
+ /** Access level for data items read */
552
+ itemRead?: AccessLevel;
553
+ /** Access level for data items insert */
554
+ itemInsert?: AccessLevel;
555
+ /** Access level for data items update */
556
+ itemUpdate?: AccessLevel;
557
+ /** Access level for data items removal */
558
+ itemRemove?: AccessLevel;
559
+ }
560
+ /**
561
+ * Describes who can perform certain action.
562
+ * Each level includes all levels below it (except UNDEFINED).
563
+ */
564
+ export declare enum AccessLevel {
565
+ /** Not set. */
566
+ UNDEFINED = "UNDEFINED",
567
+ /** Any subject, including visitors. */
568
+ ANYONE = "ANYONE",
569
+ /** Any signed-in user (both site members and collaborators). */
570
+ SITE_MEMBER = "SITE_MEMBER",
571
+ /** Any signed-in user, but site members only have access to own items. */
572
+ SITE_MEMBER_AUTHOR = "SITE_MEMBER_AUTHOR",
573
+ /** Site collaborator that has a role with CMS Access permission. */
574
+ CMS_EDITOR = "CMS_EDITOR",
575
+ /** CMS administrators and users or roles granted with special access. */
576
+ PRIVILEGED = "PRIVILEGED"
577
+ }
578
+ export interface AllowedDataPermissions {
579
+ /** If data items read permitted */
580
+ itemRead?: boolean;
581
+ /** If for data items insert permitted */
582
+ itemInsert?: boolean;
583
+ /** If data items update permitted */
584
+ itemUpdate?: boolean;
585
+ /** If data items removal permitted */
586
+ itemRemove?: boolean;
587
+ }
588
+ export interface DataCollectionClonedEvent {
589
+ /** Instance ID of the collection from which the data is cloned. */
590
+ originInstanceId?: string;
591
+ /** ID of the collection from which the data is cloned. */
592
+ originId?: string;
593
+ }
594
+ export interface DataCollectionChangedEvent {
595
+ /** list of new fields */
596
+ fieldsAdded?: Field[];
597
+ /** list of changed fields */
598
+ fieldsUpdated?: FieldUpdate[];
599
+ /** list of removed fields */
600
+ fieldsRemoved?: Field[];
601
+ /** list of new plugins */
602
+ pluginsAdded?: Plugin[];
603
+ /** list of changed plugins */
604
+ pluginsUpdated?: PluginUpdate[];
605
+ /** list of removed plugins */
606
+ pluginsRemoved?: Plugin[];
607
+ }
608
+ export interface FieldUpdate {
609
+ /** previous state of the field */
610
+ previous?: Field;
611
+ /** current state of the field */
612
+ current?: Field;
613
+ }
614
+ export interface PluginUpdate {
615
+ /** previous state of the plugin */
616
+ previous?: Plugin;
617
+ /** current state of the plugin */
618
+ current?: Plugin;
619
+ }
620
+ export interface DataCollectionEvictedEvent {
621
+ /** ID of the collection that was permanently deleted. */
622
+ id?: string;
623
+ }
624
+ export interface CreateDataCollectionRequest {
625
+ /** Collection details. */
626
+ collection: DataCollection;
627
+ }
628
+ export interface CreateDataCollectionResponse {
629
+ /** Details of collection created. */
630
+ collection?: DataCollection;
631
+ }
632
+ export interface GetDataCollectionRequest {
633
+ /** ID of the collection to retrieve. */
634
+ dataCollectionId: string;
635
+ /**
636
+ * Whether to retrieve data from the primary database instance.
637
+ * This decreases performance but ensures data retrieved is up to date even immediately after an update.
638
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
639
+ *
640
+ * Default: `false`
641
+ */
642
+ consistentRead?: boolean;
643
+ /**
644
+ * List of specific field names to return, if empty all fields are returned.
645
+ * Affects all returned collections
646
+ */
647
+ fields?: string[];
648
+ }
649
+ export declare enum Segment {
650
+ UNKNOWN_SEGMENT = "UNKNOWN_SEGMENT",
651
+ PUBLIC = "PUBLIC",
652
+ DEV = "DEV"
653
+ }
654
+ export interface GetDataCollectionResponse {
655
+ /** Details of the collection requested. */
656
+ collection?: DataCollection;
657
+ /**
658
+ * Details of collections referenced by the collection requested.
659
+ * Only populated when `includeReferencedCollections` is `true` in the request.
660
+ */
661
+ referencedCollections?: DataCollection[];
662
+ }
663
+ export interface ListDataCollectionsRequest {
664
+ /**
665
+ * Defines how collections in the response are sorted.
666
+ *
667
+ * Default: Ordered by ID in ascending order.
668
+ */
669
+ sort?: Sorting;
670
+ /** Pagination information. */
671
+ paging?: Paging;
672
+ /**
673
+ * Whether to retrieve data from the primary database instance.
674
+ * This decreases performance but ensures data retrieved is up to date even immediately after an update.
675
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
676
+ *
677
+ * Default: `false`
678
+ */
679
+ consistentRead?: boolean;
680
+ /**
681
+ * List of specific field names to return, if empty all fields are returned.
682
+ * Affects all returned collections
683
+ */
684
+ fields?: string[];
685
+ }
686
+ export interface Sorting {
687
+ /** Name of the field to sort by. */
688
+ fieldName?: string;
689
+ /** Sort order. */
690
+ order?: SortOrder;
691
+ }
692
+ export declare enum SortOrder {
693
+ ASC = "ASC",
694
+ DESC = "DESC"
695
+ }
696
+ export interface Paging {
697
+ /** Number of items to load. */
698
+ limit?: number | null;
699
+ /** Number of items to skip in the current sort order. */
700
+ offset?: number | null;
701
+ }
702
+ export interface ListDataCollectionsResponse {
703
+ /** List of collections. */
704
+ collections?: DataCollection[];
705
+ /** Paging information. */
706
+ pagingMetadata?: PagingMetadataV2;
707
+ }
708
+ export interface PagingMetadataV2 {
709
+ /** Number of items returned in the response. */
710
+ count?: number | null;
711
+ /** Offset that was requested. */
712
+ offset?: number | null;
713
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
714
+ total?: number | null;
715
+ /** Flag that indicates the server failed to calculate the `total` field. */
716
+ tooManyToCount?: boolean | null;
717
+ }
718
+ export interface BulkGetDataCollectionsRequest {
719
+ /** IDs of the collections to retrieve. */
720
+ dataCollectionIds?: string[];
721
+ /**
722
+ * Whether to include deleted collections.
723
+ *
724
+ * Default: `false`
725
+ */
726
+ showDeletedCollections?: boolean;
727
+ /**
728
+ * Whether the returned collection list should include referenced collections.
729
+ *
730
+ * Default: `false`
731
+ */
732
+ includeReferencedCollections?: boolean;
733
+ /** Sorting preferences. */
734
+ sort?: Sorting;
735
+ /**
736
+ * Whether to retrieve data from the primary database instance.
737
+ * This decreases performance but ensures data retrieved is up to date even immediately after an update.
738
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
739
+ *
740
+ * Default: `false`
741
+ */
742
+ consistentRead?: boolean;
743
+ /**
744
+ * List of specific field names to return, if empty all fields are returned.
745
+ * Affects all returned collections
746
+ */
747
+ fields?: string[];
748
+ }
749
+ export interface BulkGetDataCollectionsResponse {
750
+ /**
751
+ * List of requested collections.
752
+ * When `include_referenced_collections` is `true` in the request, referenced collections are included here.
753
+ */
754
+ activeCollections?: DataCollection[];
755
+ /** List of requested deleted collections. Only populated when `showDeletedCollections` is true in the request. */
756
+ deletedCollections?: DataCollection[];
757
+ }
758
+ export interface UpdateDataCollectionRequest {
759
+ /** Updated collection details. The existing collection is replaced with this version. */
760
+ collection: DataCollection;
761
+ }
762
+ export interface UpdateDataCollectionResponse {
763
+ /** Updated collection details. */
764
+ collection?: DataCollection;
765
+ }
766
+ export interface DeleteDataCollectionRequest {
767
+ /** ID of the collection to delete. */
768
+ dataCollectionId: string;
769
+ }
770
+ export interface DeleteDataCollectionResponse {
771
+ }
772
+ export interface RestoreDataCollectionRequest {
773
+ /** Data Collection ID to restore */
774
+ dataCollectionId?: string;
775
+ }
776
+ export interface RestoreDataCollectionResponse {
777
+ /** Restored data collection */
778
+ dataCollection?: DataCollection;
779
+ }
780
+ export interface CreateDataCollectionFieldRequest {
781
+ /** ID of data collection to update */
782
+ dataCollectionId: string;
783
+ /** field to create */
784
+ field: Field;
785
+ }
786
+ export interface CreateDataCollectionFieldResponse {
787
+ /** updated data collection */
788
+ dataCollection?: DataCollection;
789
+ }
790
+ export interface UpdateDataCollectionFieldRequest {
791
+ /** ID of data collection to update */
792
+ dataCollectionId: string;
793
+ /** Field to update */
794
+ field: Field;
795
+ }
796
+ export interface UpdateDataCollectionFieldResponse {
797
+ /** updated data collection */
798
+ dataCollection?: DataCollection;
799
+ }
800
+ export interface DeleteDataCollectionFieldRequest {
801
+ /** ID of data collection to update */
802
+ dataCollectionId: string;
803
+ /** Field ID to delete */
804
+ fieldKey: string;
805
+ }
806
+ export interface DeleteDataCollectionFieldResponse {
807
+ /** updated data collection */
808
+ dataCollection?: DataCollection;
809
+ }
810
+ export interface UpdateDataPermissionsRequest {
811
+ /** ID of data collections to update */
812
+ dataCollectionId?: string;
813
+ /** Data permissions to set */
814
+ dataPermissions?: DataPermissions;
815
+ }
816
+ export interface UpdateDataPermissionsResponse {
817
+ /** Updated data collection */
818
+ dataCollection?: DataCollection;
819
+ }
820
+ export interface BulkGetDataCollectionsPageBySnapshotsRequest {
821
+ /** Ids of schema snapshot */
822
+ snapshotIds?: string[];
823
+ /** Pagination information. */
824
+ paging?: Paging;
825
+ }
826
+ export interface BulkGetDataCollectionsPageBySnapshotsResponse {
827
+ /** List of snapshot collection map */
828
+ snapshotCollections?: SnapshotCollection[];
829
+ /** Paging information. */
830
+ pagingMetadata?: PagingMetadataV2;
831
+ }
832
+ export interface SnapshotCollection {
833
+ /** snapshot to which collection belongs */
834
+ snapshotId?: string;
835
+ /** snapshot collection */
836
+ collection?: DataCollection;
837
+ /** snapshot of collection indexes */
838
+ indexes?: Index[];
839
+ }
840
+ /** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
841
+ export interface Index {
842
+ /** Name of the index. */
843
+ name?: string;
844
+ /**
845
+ * Fields for which the index is defined.
846
+ *
847
+ * Max: 3 fields (for a unique index: 1 field)
848
+ */
849
+ fields?: IndexField[];
850
+ /**
851
+ * Current status of the index.
852
+ * @readonly
853
+ */
854
+ status?: IndexStatus;
855
+ /**
856
+ * Contains details about the reasons for failure when `status` is `FAILED`.
857
+ * @readonly
858
+ */
859
+ failure?: Failure;
860
+ /**
861
+ * Whether the index enforces uniqueness of values in the field for which it is defined.
862
+ * If `true`, the index can have only one field.
863
+ *
864
+ * Default: `false`
865
+ */
866
+ unique?: boolean;
867
+ /**
868
+ * Whether the index ignores case.
869
+ *
870
+ * Default: `false`
871
+ */
872
+ caseInsensitive?: boolean;
873
+ }
874
+ /**
875
+ * Order determines how values are ordered in the index. This is important when
876
+ * ordering and/or range querying by indexed fields.
877
+ */
878
+ export declare enum Order {
879
+ ASC = "ASC",
880
+ DESC = "DESC"
881
+ }
882
+ export interface IndexField {
883
+ /** Path of the field to index. For example: `title` or `options.price`. */
884
+ path?: string;
885
+ /**
886
+ * Sort order for the index. Base on how the data is regularly queried.
887
+ *
888
+ * Default: `ASC`
889
+ */
890
+ order?: Order;
891
+ }
892
+ export declare enum IndexStatus {
893
+ /** Place holder. Never returned by the service. */
894
+ UNKNOWN = "UNKNOWN",
895
+ /** Index creation is in progress. */
896
+ BUILDING = "BUILDING",
897
+ /** Index has been successfully created and can be used in queries. */
898
+ ACTIVE = "ACTIVE",
899
+ /** Index is in the process of being dropped. */
900
+ DROPPING = "DROPPING",
901
+ /** Index has been dropped successfully. */
902
+ DROPPED = "DROPPED",
903
+ /** Index creation has failed. */
904
+ FAILED = "FAILED",
905
+ /** Index contains incorrectly indexed data. */
906
+ INVALID = "INVALID"
907
+ }
908
+ export interface Failure {
909
+ /**
910
+ * Error code.
911
+ * - `WDE0112`: Unknown error while building collection index.
912
+ * - `WDE0113`: Duplicate key error while building collection index.
913
+ * - `WDE0114`: Document too large while building collection index.
914
+ */
915
+ code?: string;
916
+ /** Description of the failure. */
917
+ description?: string;
918
+ /**
919
+ * ID of the data item that caused the failure.
920
+ * For example, if `unique` is `true`, the ID of an item containing a duplicate value.
921
+ */
922
+ itemId?: string | null;
923
+ }
924
+ export interface CreateDataCollectionsSnapshotRequest {
925
+ }
926
+ export interface CreateDataCollectionsSnapshotResponse {
927
+ /** created snapshot ID */
928
+ snapshotId?: string;
929
+ /** data collections in snapshot */
930
+ snapshotCollections?: DataCollection[];
931
+ }
932
+ export interface RestoreDataCollectionsFromSnapshotRequest {
933
+ /** snapshot ID to restore */
934
+ snapshotId?: string;
935
+ /**
936
+ * collection IDs to restore, if empty – all collections would be restored
937
+ * @deprecated
938
+ * @replacedBy restoration_collections
939
+ * @targetRemovalDate 2025-12-31
940
+ */
941
+ dataCollectionIds?: string[];
942
+ /** collection to restore, if empty – all collections would be restored */
943
+ restorationCollections?: RestorationCollection[];
944
+ }
945
+ export interface Destination {
946
+ /** Collection id. */
947
+ dataCollectionId?: string;
948
+ /** Display name. When not specified value is taken from the snapshot. */
949
+ displayName?: string | null;
950
+ }
951
+ export interface RestorationCollection {
952
+ /** Collection ID to restore */
953
+ dataCollectionId?: string;
954
+ /**
955
+ * Destination where to restore the collection.
956
+ * When not specified destination is taken from snapshot.
957
+ */
958
+ destination?: Destination;
959
+ }
960
+ export interface RestoreDataCollectionsFromSnapshotResponse {
961
+ /** restored collections */
962
+ restoredCollections?: DataCollection[];
963
+ }
964
+ export interface DeleteDataCollectionsSnapshotRequest {
965
+ /** snapshot ID to delete */
966
+ snapshotId?: string;
967
+ }
968
+ export interface DeleteDataCollectionsSnapshotResponse {
969
+ }
970
+ export interface CreateMigratedCollectionsSnapshotRequest {
971
+ existingSnapshotId?: string;
972
+ newNamespace?: string;
973
+ existingNamespace?: string;
974
+ }
975
+ export interface CreateMigratedCollectionsSnapshotResponse {
976
+ snapshotId?: string;
977
+ }
978
+ export interface DomainEvent extends DomainEventBodyOneOf {
979
+ createdEvent?: EntityCreatedEvent;
980
+ updatedEvent?: EntityUpdatedEvent;
981
+ deletedEvent?: EntityDeletedEvent;
982
+ actionEvent?: ActionEvent;
983
+ /**
984
+ * Unique event ID.
985
+ * Allows clients to ignore duplicate webhooks.
986
+ */
987
+ id?: string;
988
+ /**
989
+ * Assumes actions are also always typed to an entity_type
990
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
991
+ */
992
+ entityFqdn?: string;
993
+ /**
994
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
995
+ * This is although the created/updated/deleted notion is duplication of the oneof types
996
+ * Example: created/updated/deleted/started/completed/email_opened
997
+ */
998
+ slug?: string;
999
+ /** ID of the entity associated with the event. */
1000
+ entityId?: string;
1001
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1002
+ eventTime?: Date | null;
1003
+ /**
1004
+ * Whether the event was triggered as a result of a privacy regulation application
1005
+ * (for example, GDPR).
1006
+ */
1007
+ triggeredByAnonymizeRequest?: boolean | null;
1008
+ /** If present, indicates the action that triggered the event. */
1009
+ originatedFrom?: string | null;
1010
+ /**
1011
+ * A sequence number defining the order of updates to the underlying entity.
1012
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1013
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1014
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1015
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1016
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1017
+ */
1018
+ entityEventSequence?: string | null;
1019
+ }
1020
+ /** @oneof */
1021
+ export interface DomainEventBodyOneOf {
1022
+ createdEvent?: EntityCreatedEvent;
1023
+ updatedEvent?: EntityUpdatedEvent;
1024
+ deletedEvent?: EntityDeletedEvent;
1025
+ actionEvent?: ActionEvent;
1026
+ }
1027
+ export interface EntityCreatedEvent {
1028
+ entityAsJson?: string;
1029
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
1030
+ restoreInfo?: RestoreInfo;
1031
+ }
1032
+ export interface RestoreInfo {
1033
+ deletedDate?: Date | null;
1034
+ }
1035
+ export interface EntityUpdatedEvent {
1036
+ /**
1037
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1038
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1039
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1040
+ */
1041
+ currentEntityAsJson?: string;
1042
+ }
1043
+ export interface EntityDeletedEvent {
1044
+ /** Entity that was deleted */
1045
+ deletedEntityAsJson?: string | null;
1046
+ }
1047
+ export interface ActionEvent {
1048
+ bodyAsJson?: string;
1049
+ }
1050
+ export interface MessageEnvelope {
1051
+ /** App instance ID. */
1052
+ instanceId?: string | null;
1053
+ /** Event type. */
1054
+ eventType?: string;
1055
+ /** The identification type and identity data. */
1056
+ identity?: IdentificationData;
1057
+ /** Stringify payload. */
1058
+ data?: string;
1059
+ }
1060
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1061
+ /** ID of a site visitor that has not logged in to the site. */
1062
+ anonymousVisitorId?: string;
1063
+ /** ID of a site visitor that has logged in to the site. */
1064
+ memberId?: string;
1065
+ /** ID of a Wix user (site owner, contributor, etc.). */
1066
+ wixUserId?: string;
1067
+ /** ID of an app. */
1068
+ appId?: string;
1069
+ /** @readonly */
1070
+ identityType?: WebhookIdentityType;
1071
+ }
1072
+ /** @oneof */
1073
+ export interface IdentificationDataIdOneOf {
1074
+ /** ID of a site visitor that has not logged in to the site. */
1075
+ anonymousVisitorId?: string;
1076
+ /** ID of a site visitor that has logged in to the site. */
1077
+ memberId?: string;
1078
+ /** ID of a Wix user (site owner, contributor, etc.). */
1079
+ wixUserId?: string;
1080
+ /** ID of an app. */
1081
+ appId?: string;
1082
+ }
1083
+ export declare enum WebhookIdentityType {
1084
+ UNKNOWN = "UNKNOWN",
1085
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1086
+ MEMBER = "MEMBER",
1087
+ WIX_USER = "WIX_USER",
1088
+ APP = "APP"
1089
+ }
1090
+ interface SortNonNullableFields {
1091
+ fieldKey: string;
1092
+ direction: Direction;
1093
+ }
1094
+ interface IndexLimitsNonNullableFields {
1095
+ regular: number;
1096
+ unique: number;
1097
+ total: number;
1098
+ }
1099
+ interface CollectionCapabilitiesNonNullableFields {
1100
+ dataOperations: DataOperation[];
1101
+ collectionOperations: CollectionOperation[];
1102
+ indexLimits?: IndexLimitsNonNullableFields;
1103
+ }
1104
+ interface ReferenceNonNullableFields {
1105
+ referencedCollectionId: string;
1106
+ }
1107
+ interface MultiReferenceNonNullableFields {
1108
+ referencedCollectionId: string;
1109
+ referencingFieldKey: string;
1110
+ referencingDisplayName: string;
1111
+ }
1112
+ interface FieldCapabilitiesNonNullableFields {
1113
+ sortable: boolean;
1114
+ queryOperators: QueryOperator[];
1115
+ }
1116
+ interface ObjectFieldNonNullableFields {
1117
+ key: string;
1118
+ type: Type;
1119
+ typeMetadata?: TypeMetadataNonNullableFields;
1120
+ capabilities?: FieldCapabilitiesNonNullableFields;
1121
+ }
1122
+ interface _ObjectNonNullableFields {
1123
+ fields: ObjectFieldNonNullableFields[];
1124
+ }
1125
+ interface _ArrayNonNullableFields {
1126
+ elementType: Type;
1127
+ typeMetadata?: TypeMetadataNonNullableFields;
1128
+ }
1129
+ interface FieldsPatternNonNullableFields {
1130
+ pattern: string;
1131
+ lowercase: boolean;
1132
+ }
1133
+ interface UrlizedOnlyPatternNonNullableFields {
1134
+ pattern: string;
1135
+ }
1136
+ interface CalculatorNonNullableFields {
1137
+ fieldsPattern?: FieldsPatternNonNullableFields;
1138
+ urlizedOnlyPattern?: UrlizedOnlyPatternNonNullableFields;
1139
+ }
1140
+ interface PageLinkNonNullableFields {
1141
+ calculator?: CalculatorNonNullableFields;
1142
+ }
1143
+ interface TypeMetadataNonNullableFields {
1144
+ reference?: ReferenceNonNullableFields;
1145
+ multiReference?: MultiReferenceNonNullableFields;
1146
+ object?: _ObjectNonNullableFields;
1147
+ array?: _ArrayNonNullableFields;
1148
+ pageLink?: PageLinkNonNullableFields;
1149
+ }
1150
+ interface CmsOptionsNonNullableFields {
1151
+ internal: boolean;
1152
+ }
1153
+ interface FieldPluginNonNullableFields {
1154
+ cmsOptions?: CmsOptionsNonNullableFields;
1155
+ type: FieldPluginType;
1156
+ }
1157
+ interface FieldNonNullableFields {
1158
+ key: string;
1159
+ type: Type;
1160
+ typeMetadata?: TypeMetadataNonNullableFields;
1161
+ systemField: boolean;
1162
+ capabilities?: FieldCapabilitiesNonNullableFields;
1163
+ encrypted: boolean;
1164
+ plugins: FieldPluginNonNullableFields[];
1165
+ }
1166
+ interface PermissionsNonNullableFields {
1167
+ insert: Role;
1168
+ update: Role;
1169
+ remove: Role;
1170
+ read: Role;
1171
+ }
1172
+ interface PublishPluginOptionsNonNullableFields {
1173
+ defaultStatus: Status;
1174
+ }
1175
+ interface SingleItemPluginOptionsNonNullableFields {
1176
+ singleItemId: string;
1177
+ }
1178
+ interface UrlizedPluginOptionsNonNullableFields {
1179
+ format: Format;
1180
+ }
1181
+ interface MultilingualOptionsNonNullableFields {
1182
+ translatableFieldKeys: string[];
1183
+ }
1184
+ interface PageLinkPluginOptionsNonNullableFields {
1185
+ isPersisted: boolean;
1186
+ isMutable: boolean;
1187
+ }
1188
+ interface SiteSortNonNullableFields {
1189
+ sort: SortNonNullableFields[];
1190
+ }
1191
+ interface PluginCmsOptionsNonNullableFields {
1192
+ siteSort?: SiteSortNonNullableFields;
1193
+ }
1194
+ interface PluginNonNullableFields {
1195
+ publishOptions?: PublishPluginOptionsNonNullableFields;
1196
+ singleItemOptions?: SingleItemPluginOptionsNonNullableFields;
1197
+ urlizedOptions?: UrlizedPluginOptionsNonNullableFields;
1198
+ multilingualOptions?: MultilingualOptionsNonNullableFields;
1199
+ editablePageLinkOptions?: PageLinkPluginOptionsNonNullableFields;
1200
+ cmsOptions?: PluginCmsOptionsNonNullableFields;
1201
+ type: PluginType;
1202
+ }
1203
+ interface DataPermissionsNonNullableFields {
1204
+ itemRead: AccessLevel;
1205
+ itemInsert: AccessLevel;
1206
+ itemUpdate: AccessLevel;
1207
+ itemRemove: AccessLevel;
1208
+ }
1209
+ interface AllowedDataPermissionsNonNullableFields {
1210
+ itemRead: boolean;
1211
+ itemInsert: boolean;
1212
+ itemUpdate: boolean;
1213
+ itemRemove: boolean;
1214
+ }
1215
+ interface DataCollectionNonNullableFields {
1216
+ id: string;
1217
+ collectionType: CollectionType;
1218
+ defaultDisplayOrder?: SortNonNullableFields;
1219
+ capabilities?: CollectionCapabilitiesNonNullableFields;
1220
+ fields: FieldNonNullableFields[];
1221
+ permissions?: PermissionsNonNullableFields;
1222
+ plugins: PluginNonNullableFields[];
1223
+ pagingModes: PagingMode[];
1224
+ /** @internal */
1225
+ dataPermissions?: DataPermissionsNonNullableFields;
1226
+ /** @internal */
1227
+ allowedDataPermissions?: AllowedDataPermissionsNonNullableFields;
1228
+ }
1229
+ export interface CreateDataCollectionResponseNonNullableFields {
1230
+ collection?: DataCollectionNonNullableFields;
1231
+ }
1232
+ export interface GetDataCollectionResponseNonNullableFields {
1233
+ collection?: DataCollectionNonNullableFields;
1234
+ referencedCollections: DataCollectionNonNullableFields[];
1235
+ }
1236
+ export interface ListDataCollectionsResponseNonNullableFields {
1237
+ collections: DataCollectionNonNullableFields[];
1238
+ }
1239
+ export interface UpdateDataCollectionResponseNonNullableFields {
1240
+ collection?: DataCollectionNonNullableFields;
1241
+ }
1242
+ export interface RestoreDataCollectionResponseNonNullableFields {
1243
+ dataCollection?: DataCollectionNonNullableFields;
1244
+ }
1245
+ export interface CreateDataCollectionFieldResponseNonNullableFields {
1246
+ dataCollection?: DataCollectionNonNullableFields;
1247
+ }
1248
+ export interface UpdateDataCollectionFieldResponseNonNullableFields {
1249
+ dataCollection?: DataCollectionNonNullableFields;
1250
+ }
1251
+ export interface DeleteDataCollectionFieldResponseNonNullableFields {
1252
+ dataCollection?: DataCollectionNonNullableFields;
1253
+ }
1254
+ export {};