@wix/data 1.0.89 → 1.0.91

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