@wix/bex-utils 2.77.0 → 2.79.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 (77) hide show
  1. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/builders.impl.d.ts +22 -0
  2. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/builders.impl.js +275 -0
  3. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/builders.impl.js.map +1 -0
  4. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/http.impl.d.ts +50 -0
  5. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/http.impl.js +250 -0
  6. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/http.impl.js.map +1 -0
  7. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/meta.impl.d.ts +16 -0
  8. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/meta.impl.js +81 -0
  9. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/meta.impl.js.map +1 -0
  10. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/client/proto-generated.d.ts +7116 -0
  11. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/client/proto-generated.js +2 -0
  12. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/proto-generated.d.ts +3557 -0
  13. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/proto-generated.js +1 -0
  14. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/server/proto-generated.d.ts +7113 -0
  15. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/server/proto-generated.js +2 -0
  16. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/rpc.impl.d.ts +59 -0
  17. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/rpc.impl.js +109 -0
  18. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/rpc.impl.js.map +1 -0
  19. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/types.impl.d.ts +343 -0
  20. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/types.impl.js +42 -0
  21. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/types.impl.js.map +1 -0
  22. package/@wix/ambassador-dealer-v1-offer-event/build/es/builders.impl.d.ts +22 -0
  23. package/@wix/ambassador-dealer-v1-offer-event/build/es/builders.impl.js +239 -0
  24. package/@wix/ambassador-dealer-v1-offer-event/build/es/builders.impl.js.map +1 -0
  25. package/@wix/ambassador-dealer-v1-offer-event/build/es/http.impl.d.ts +50 -0
  26. package/@wix/ambassador-dealer-v1-offer-event/build/es/http.impl.js +244 -0
  27. package/@wix/ambassador-dealer-v1-offer-event/build/es/http.impl.js.map +1 -0
  28. package/@wix/ambassador-dealer-v1-offer-event/build/es/meta.impl.d.ts +16 -0
  29. package/@wix/ambassador-dealer-v1-offer-event/build/es/meta.impl.js +56 -0
  30. package/@wix/ambassador-dealer-v1-offer-event/build/es/meta.impl.js.map +1 -0
  31. package/@wix/ambassador-dealer-v1-offer-event/build/es/rpc.impl.d.ts +59 -0
  32. package/@wix/ambassador-dealer-v1-offer-event/build/es/rpc.impl.js +84 -0
  33. package/@wix/ambassador-dealer-v1-offer-event/build/es/rpc.impl.js.map +1 -0
  34. package/@wix/ambassador-dealer-v1-offer-event/build/es/types.impl.d.ts +343 -0
  35. package/@wix/ambassador-dealer-v1-offer-event/build/es/types.impl.js +39 -0
  36. package/@wix/ambassador-dealer-v1-offer-event/build/es/types.impl.js.map +1 -0
  37. package/@wix/ambassador-dealer-v1-offer-event/builders/package.json +7 -0
  38. package/@wix/ambassador-dealer-v1-offer-event/http/package.json +7 -0
  39. package/@wix/ambassador-dealer-v1-offer-event/meta/package.json +7 -0
  40. package/@wix/ambassador-dealer-v1-offer-event/package.json +52 -0
  41. package/@wix/ambassador-dealer-v1-offer-event/rpc/package.json +6 -0
  42. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/action_payload.proto +33 -0
  43. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/annotations.proto +451 -0
  44. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/api_errors.proto +142 -0
  45. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/callback.proto +163 -0
  46. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/context.proto +19 -0
  47. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/entity.proto +127 -0
  48. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/errors.proto +127 -0
  49. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/idempotency.proto +25 -0
  50. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/permissions.proto +46 -0
  51. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/sla.proto +24 -0
  52. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/subscription.proto +32 -0
  53. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/validations.proto +142 -0
  54. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/address.proto +148 -0
  55. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/bulk.proto +53 -0
  56. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/identification.proto +40 -0
  57. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/image.proto +8 -0
  58. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/media.proto +280 -0
  59. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/money.proto +32 -0
  60. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/pageurl.proto +32 -0
  61. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/paging.proto +121 -0
  62. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/query.proto +799 -0
  63. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/sorting.proto +36 -0
  64. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/spi.proto +85 -0
  65. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/tags.proto +55 -0
  66. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/wixlink.proto +203 -0
  67. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/dealerOfferEvents/api/v1/dealer-offer-events.proto +211 -0
  68. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/dealerOfferEvents/api/v1/event.proto +131 -0
  69. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/graphql/definitions.proto +13 -0
  70. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/http/field_mask.proto +46 -0
  71. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/sdk/definitions.proto +191 -0
  72. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/spi/definitions.proto +187 -0
  73. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/spi/http_error_status.proto +24 -0
  74. package/@wix/ambassador-dealer-v1-offer-event/types/package.json +7 -0
  75. package/@wix/bex-bundled-mini-essentials/CHANGELOG.md +4 -0
  76. package/@wix/bex-bundled-mini-essentials/package.json +1 -1
  77. package/package.json +5 -4
@@ -0,0 +1,451 @@
1
+ syntax = "proto2";
2
+
3
+ package wix.api;
4
+
5
+ import "google/protobuf/descriptor.proto";
6
+
7
+ option java_multiple_files = true;
8
+ option java_outer_classname = "AnnotationsProto";
9
+ option java_package = "com.wix.api";
10
+
11
+ extend google.protobuf.ServiceOptions {
12
+ optional Maturity service_maturity = 50104;
13
+ optional Exposure service_exposure = 50105;
14
+ optional Deprecated service_deprecated = 50140; // mark a service as deprecated, optionally place replacing asset
15
+ repeated ServiceAppendix appendix_files = 50150; // declare external configuration info
16
+ }
17
+
18
+ extend google.protobuf.MethodOptions {
19
+ optional Exposure exposure = 50101;
20
+ optional Maturity maturity = 50102;
21
+ optional CacheSettings cacheable = 50103; // mark a method as cacheable, optionally pass max cache age
22
+ optional Deprecated deprecated = 50141; // mark a method as deprecated, optionally place replacing asset
23
+ optional Crud crud = 50146; // mark crud method type and describe related information about this method
24
+ optional bool accepts_linguist = 50148; // marks that this method accepts `x-wix-linguist` header, MAY return translated/localized responses. without this option, requests that assign this header will get an error. CRUD annotated methods assumed to have this enabled for read ops and disabled for write ops.
25
+ }
26
+
27
+ extend google.protobuf.MessageOptions {
28
+ optional string decomposite_of = 50120; // mark it a shard of a message to remove fields
29
+ repeated FieldSet decomposition_minimum_fields = 50121; // constrain that sharding at the definition
30
+ optional bool unwrap_array_value = 50122; // mark message as wrapper for arrays
31
+ optional Deprecated message_deprecated = 50142; // mark a message as deprecated, optionally place replacing asset
32
+ repeated Unique unique = 50145; // mark unique identifiers for this message
33
+ }
34
+
35
+ extend google.protobuf.FieldOptions {
36
+ optional Exposure field_exposure = 50106;
37
+ optional Maturity field_maturity = 50107;
38
+ optional bool pii = 50110; // Mark specific field as PII so clients that store the data know it should be encrypted
39
+ optional string referenced_entity = 50111; // FQDN of foreign keys. For example, an Order message that points to Product message can use it like this: `string product_id = 10 [(wix.api.referenced_entity) = "wix.stores.catalog.v1.product"];`
40
+ optional ReferenceEntityField referenced_entity_field = 50112; // FQDN and path of a field that is referenced by `referenced_entity`. Should be located at same level or in a nested message with relation to `wix.api.referenced_entity`.
41
+ optional Deprecated field_deprecated = 50143; // Mark a field as deprecated, optionally place replacing asset
42
+ optional Translatable translatable = 50144; // Mark this field as translatable using MultiLingual services
43
+ optional string sample_data = 50149; // Example of data that may be assigned as a value of this field
44
+ optional Conditional conditional = 50151; // Configure the conditions required for this field to be returned
45
+ optional bool nullable = 50152; // Mark specific field as nullable
46
+ }
47
+
48
+ extend google.protobuf.EnumValueOptions {
49
+ optional Maturity enum_maturity = 50130;
50
+ optional Exposure enum_exposure = 50131;
51
+ }
52
+
53
+ message ReferenceEntityField {
54
+ required string path = 1; // field path from root of a message annotated with `wix.api.entity` annotation. For example 'item.name'.
55
+ }
56
+
57
+ message CacheSettings {
58
+ optional int32 max_age_seconds = 1; // default is 604800 seconds = 1 week
59
+ optional bool manual = 2; // default is false
60
+ }
61
+
62
+ message FieldSet {
63
+ repeated string field = 1;
64
+ }
65
+
66
+ message Deprecated {
67
+ optional string replaced_by = 1; // use relative proto FQN as absolute identifier. e.g. "wix.common.Query"
68
+ optional string target_removal_date = 2; // a human readable sunset date of the deprecated resource YYYY-MM-DD
69
+ }
70
+
71
+ message Unique {
72
+ repeated string field = 1;
73
+ }
74
+
75
+ message Crud {
76
+ enum Method {
77
+ UNKNOWN_METHOD = 0;
78
+ CREATE = 1;
79
+ GET_ITEM = 2;
80
+ UPDATE = 3;
81
+ DELETE = 4;
82
+ UPSERT = 12;
83
+ LIST = 5;
84
+ QUERY = 6;
85
+ SEARCH = 18;
86
+ BULK_CREATE = 7;
87
+ BULK_UPDATE = 8;
88
+ BULK_UPDATE_BY_FILTER = 9;
89
+ BULK_DELETE = 10;
90
+ BULK_DELETE_BY_FILTER = 11;
91
+ BULK_UPSERT = 13;
92
+ LIST_DELETED = 14;
93
+ GET_DELETED = 15;
94
+ RESTORE_FROM_TRASHBIN = 16;
95
+ REMOVE_FROM_TRASHBIN = 17;
96
+ COUNT = 19;
97
+ SEARCH_RELATED = 20;
98
+ UPDATE_EXTENDED_FIELDS = 21;
99
+ BULK_UPDATE_TAGS = 22;
100
+ BULK_UPDATE_TAGS_BY_FILTER = 23;
101
+ CUSTOM_ACTION = 24;
102
+ }
103
+ required Method method = 1; // method type
104
+ oneof method_options {
105
+ CreateMethodOptions create_options = 3;
106
+ GetItemMethodOptions get_options = 4;
107
+ UpdateMethodOptions update_options = 5;
108
+ DeleteMethodOptions delete_options = 6;
109
+ ListMethodOptions list_options = 7;
110
+ QueryMethodOptions query_options = 8;
111
+ SearchMethodOptions search_options = 20;
112
+ BulkCreateMethodOptions bulk_create_options = 9;
113
+ BulkUpdateMethodOptions bulk_update_options = 10;
114
+ BulkUpdateByFilterMethodOptions bulk_update_by_filter_options = 11;
115
+ BulkDeleteMethodOptions bulk_delete_options = 12;
116
+ BulkDeleteByFilterMethodOptions bulk_delete_by_filter_options = 13;
117
+ UpsertMethodOptions upsert_options = 14;
118
+ BulkUpsertMethodOptions bulk_upsert_options = 15;
119
+ ListDeletedMethodOptions list_deleted_options = 16;
120
+ GetDeletedMethodOptions get_deleted_options = 17;
121
+ RestoreFromTrashbinMethodOptions restore_from_trashbin_options = 18;
122
+ RemoveFromTrashbinMethodOptions remove_from_trashbin_options = 19;
123
+ CountOptions count_options = 21;
124
+ SearchRelatedOptions search_related_options = 22;
125
+ UpdateExtendedFieldsOptions update_extended_fields_options = 23;
126
+ CustomActionOptions custom_action_options = 24; // marks that this method is a custom-action, that unfolds a read/write operation
127
+ BulkUpdateTagsMethodOptions bulk_update_tags_options = 25;
128
+ BulkUpdateTagsByFilterMethodOptions bulk_update_tags_by_filter_options = 26;
129
+ }
130
+ }
131
+
132
+ message Paging {
133
+ enum Type {
134
+ UNKNOWN_TYPE = 0;
135
+ OFFSET = 1;
136
+ CURSOR = 2;
137
+ BOTH = 3;
138
+ }
139
+ optional Type type = 1; // paging type
140
+ optional string paging_metadata_field = 2 [deprecated=true]; // paging field name in response object. default is `metadata`, DEPRECATED in commons V2
141
+ optional string cursor_paging_metadata_field = 3; // cursor paging field name in response object. default is `cursor_paging_metadata`
142
+ optional string offset_paging_metadata_field = 4; // offset paging field name in response object. default is `offset_paging_metadata`
143
+ }
144
+
145
+ message CustomActionOptions {
146
+ optional bool read_operation = 1; // the custom-action's operation will do nothing but read data.
147
+ optional WqlOptions wql = 2; // if WQL validation is needed in this method, provide the data needed for the validator
148
+ }
149
+
150
+ message WqlOptions {
151
+ optional string query_options_name = 1; // Name of WQL variant to use
152
+ // The action may use either filter (struct), query (QueryV2) or search (Search) field. Point to the right one
153
+ oneof field {
154
+ string filter_field = 2; // provide path to filter field (struct) in your request message
155
+ string query_field = 3; // provide path to query field (wix.common.QueryV2) in your request message
156
+ string search_field = 4; // provide path to search field (wix.common.Search) in your request message
157
+ }
158
+ }
159
+
160
+ message CreateMethodOptions {
161
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
162
+ }
163
+
164
+ message GetItemMethodOptions {
165
+ optional string item_field = 2; // item field name in response object only. default is `<entity-name>`
166
+ optional string id_field = 1; // id field name in request object. default is `<entity-name>_id`
167
+ }
168
+
169
+ message UpdateMethodOptions {
170
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
171
+ optional string fieldmask_field = 2; // fieldmask field name in request object. default is `fieldmask`, only if it really exists in model
172
+ }
173
+
174
+ message UpsertMethodOptions {
175
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
176
+ optional string fieldmask_field = 2; // fieldmask field name in request object. default is `fieldmask`, only if it really exists in model
177
+ }
178
+
179
+ message DeleteMethodOptions {
180
+ optional string id_field = 1; // id field name in request object. default is `<entity-name>_id`
181
+ }
182
+
183
+ message ListMethodOptions {
184
+ optional string ids_field = 1; // ids field name in request object if such exists. recommended field-name: `<entity-name>_ids`
185
+ required string items_field = 3; // items field name in response object.
186
+ optional Paging paging = 2; // present paging mechanism info, default will be of type=`CURSOR`
187
+ repeated string me_aliasable_field = 4; // collection of FQNs of fields that MAY be aliased with the const `"me"`
188
+ }
189
+
190
+ message QueryMethodOptions {
191
+ optional string query_field = 1 [deprecated=true]; // query field name in request object. default is `query`, DEPRECATED in commons V2
192
+ optional string cursor_query_field = 7; // cursor query field name in request object. default is `cursor_query`
193
+ optional string offset_query_field = 8; // offset query field name in request object. default is `offset_query`
194
+ required string items_field = 3; // items field name in response object.
195
+ optional Paging paging = 2; // present paging mechanism info, default will be of type=`CURSOR`
196
+ oneof wql_options {
197
+ // mark fields that are available for filtering and sorting via WixQueryLanguage
198
+ // Deprecated - use wql annotation on the entity level
199
+ Wql wql = 4 [deprecated = true];
200
+ string query_options_name = 6; // Name of WQL variant to use
201
+ }
202
+ repeated string me_aliasable_field = 5; // collection of FQNs of fields that MAY be aliased with the const `"me"`
203
+ }
204
+
205
+ message SearchMethodOptions {
206
+ optional string search_field = 1 [deprecated=true]; // search field name in request object. default is `search`, DEPRECATED in commons V2
207
+ optional string cursor_search_field = 8; // cursor search field name in request object. default is `cursor_search`
208
+ optional string offset_search_field = 9; // offset search field name in request object. default is `offset_search`
209
+ required string items_field = 3; // items field name in response object.
210
+ optional Paging paging = 2; // present paging mechanism info, default will be of type=`CURSOR`
211
+ oneof wql_options {
212
+ Wql wql = 4; // mark fields that are available for filtering and sorting via WixQueryLanguage
213
+ string query_options_name = 7; // Name of WQL variant to use
214
+ }
215
+ repeated string me_aliasable_field = 5; // collection of FQNs of fields that MAY be aliased with the const `"me"`
216
+ repeated Search search = 6; // mark fields that are available for search
217
+ }
218
+
219
+ message BulkCreateMethodOptions {
220
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
221
+ }
222
+
223
+ message BulkUpdateMethodOptions {
224
+ optional string items_field = 1; // items field name in request and response objects. default is `<entity-name>` in plural. For the request, the field is expected to be a repeated message that includes entity and fieldmask.
225
+ optional string item_field = 2; // item field name under the message used for the repeated field pointed by items_field. default is `<entity-name>`
226
+ optional string fieldmask_field = 3; // fieldmask field name under the message used for the repeated field pointed by items_field. default is `fieldmask`, only if it really exists in model
227
+ }
228
+
229
+ message BulkUpdateByFilterMethodOptions {
230
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
231
+ optional string fieldmask_field = 2; // fieldmask field name in request object. default is `fieldmask`, only if it really exists in model
232
+ optional string filter_field = 3; // filter field name in request object. default is `filter`
233
+ optional string query_options_name = 4; // Name of WQL variant to use
234
+ }
235
+
236
+ message BulkUpdateTagsMethodOptions {
237
+ optional string ids_field = 1; // ids field name in request object. default is `<entity-name>_ids`
238
+ }
239
+
240
+ message BulkUpdateTagsByFilterMethodOptions {
241
+ optional string filter_field = 1; // filter field name in request object. default is `filter`
242
+ optional string query_options_name = 2; // Name of WQL variant to use
243
+ }
244
+
245
+ message BulkUpsertMethodOptions {
246
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
247
+ optional string fieldmask_field = 2; // fieldmask field name in request object. default is `fieldmask`, only if it really exists in model
248
+ }
249
+
250
+ message BulkDeleteMethodOptions {
251
+ optional string ids_field = 1; // ids field name in request object. default is `<entity-name>_ids`
252
+ }
253
+
254
+ message BulkDeleteByFilterMethodOptions {
255
+ optional string filter_field = 1; // filter field name in request object. default is `filter`
256
+ optional string query_options_name = 2; // Name of WQL variant to use
257
+ }
258
+
259
+ message ListDeletedMethodOptions {
260
+ optional string ids_field = 1; // ids field name in request object if such exists. recommended field-name: `<entity-name>_ids`
261
+ required string items_field = 3; // items field name in response object.
262
+ optional Paging paging = 2; // present paging mechanism info, default will be of type=`CURSOR`
263
+ repeated string me_aliasable_field = 4; // collection of FQNs of fields that MAY be aliased with the const `"me"`
264
+ }
265
+
266
+ message GetDeletedMethodOptions {
267
+ optional string item_field = 2; // item field name in response object only. default is `<entity-name>`
268
+ optional string id_field = 1; // id field name in request object. default is `<entity-name>_id`
269
+ }
270
+
271
+ message RestoreFromTrashbinMethodOptions {
272
+ optional string item_field = 2; // item field name in response object only. default is `<entity-name>`
273
+ optional string id_field = 1; // id field name in request object. default is `<entity-name>_id`
274
+ }
275
+
276
+ message RemoveFromTrashbinMethodOptions {
277
+ optional string id_field = 1; // id field name in request object. default is `<entity-name>_id`
278
+ }
279
+
280
+ message CountOptions {
281
+ oneof wql_options {
282
+ // The name of the endpoint that the count "copy" the WQL settings from - e.g inherit_wql_from: 'QueryProducts'
283
+ // Usually, that will be the query endpoint since you want the same filter capabilities for query and count
284
+ string inherit_wql_from = 1 [deprecated = true];
285
+
286
+ string query_options_name = 2; // Name of WQL variant to use
287
+ }
288
+ optional string filter_field = 3; // query field name in request object. default is `filter`
289
+ optional string count_field = 4; // count field name in response object. default is `count`
290
+ }
291
+
292
+ message SearchRelatedOptions {
293
+ oneof wql_options {
294
+ // The name of the endpoint that the related-search "copy" the WQL settings from - e.g inherit_wql_from: 'SearchProducts'
295
+ // Usually, that will be the search endpoint since you want the same filter capabilities for search and related search
296
+ string inherit_wql_from = 1 [deprecated = true];
297
+
298
+ string query_options_name = 2; // Name of WQL variant to use
299
+ }
300
+ }
301
+
302
+ message UpdateExtendedFieldsOptions {
303
+ optional string item_field = 2; // item field name in response object only. default is `<entity-name>`
304
+ }
305
+
306
+ message Wql {
307
+ reserved 7;
308
+ enum Operator {
309
+ option allow_alias = true;
310
+ ALL_APPLICABLE_OPERATORS = 0; // Applicable by type. i.e. if we allow LT/GT for **, it means for numeric fields only.
311
+ EQ = 1; // [Comparison] Matches values that are equal to a specified value.
312
+ GT = 2; // [Comparison] Matches values that are greater than a specified value.
313
+ GTE = 3; // [Comparison] Matches values that are greater than or equal to a specified value.
314
+ IN = 4; // [Comparison] Matches any of the values specified in an array.
315
+ LT = 5; // [Comparison] Matches values that are less than a specified value.
316
+ LTE = 6; // [Comparison] Matches values that are less than or equal to a specified value.
317
+ NE = 7; // [Comparison] Matches all values that are not equal to a specified value.
318
+ NIN = 8; // [Comparison] Matches none of the values specified in an array.
319
+ BEGINS = 9; // [Comparison] Matches strings that begin with a specified value (NOT case sensitive).
320
+ EXISTS = 10; // [Element] Matches documents that have the specified field.
321
+ HAS_ALL = 11; // [Array] Matches arrays that contain all elements specified in the query.
322
+ ALL = 11 [deprecated = true]; // [Array] Matches arrays that contain all elements specified in the query.
323
+ HAS_SOME = 12; // [Array] Matches arrays that contain at least one element specified in the query.
324
+ ANY = 12 [deprecated = true]; // [Array] Matches arrays that contain at least one element specified in the query.
325
+ EMPTY = 13; // [Array] Matches arrays that contain no elements.
326
+ MATCH_ALL = 14; // Matches all items. Intended for expressing intent in selecting everything for ex. destructive operations - bulk deletes, updates, etc.
327
+ MATCH_ITEMS = 16; // [Array] match multiple fields within array with AND operator semantics.
328
+ /* Enhances field, marked as LOCAL_DATE format, with additional subFields to sort and filter on.
329
+ For local date, formatted as yyyy-mm-dd, available subfields are:
330
+ '.dayOfMonth' - sorts/filters on the day of the month (dd), integer
331
+ '.month' - sorts/filters on the month (mm), integer
332
+ '.year' - sorts/filters on the year (yyyy), integer
333
+ Example, there is a local date field named 'clientBirthday', you may use 'clientBirthday.dayOfMonth',
334
+ 'clientBirthday.month', 'clientBirthday.year' for filtering and sorting.
335
+ You may also use the field without the enhanced subfields ('clientBirthday'). Then the usual date sorting/filtering is applied */
336
+ ENHANCED_DATE = 17 [deprecated = true];
337
+ }
338
+ enum Sort {
339
+ NONE = 0; // no sorting enabled
340
+ ASC = 1; // ascending sort is supported
341
+ DESC = 2; // descending sort is supported
342
+ BOTH = 3; // sort is supported in both directions
343
+ }
344
+ message RequiredFields {
345
+ // this field is deprecated because we need sort direction alongside to field path
346
+ repeated string field = 1[(.wix.api.field_deprecated) = {
347
+ replaced_by: "required_field"
348
+ target_removal_date: "2023-03-31"
349
+ }];
350
+ message RequiredField {
351
+ required string path = 1; // a field path that accepts this operator
352
+ optional Sort sort = 2; // sort type enabled for this glob
353
+ }
354
+ repeated RequiredField required_field = 2; // all required field configurations to satisfy composite index
355
+ }
356
+
357
+ enum VirtualSubfields {
358
+ NO_VIRTUAL_SUBFIELDS = 0;
359
+ /* Can be set for a field, marked as LOCAL_DATE format, allows filtering by following subfields:
360
+ - '.dayOfMonth' - sorts/filters on the day of the month (dd), integer
361
+ - '.month' - sorts/filters on the month (mm), integer
362
+ - '.year' - sorts/filters on the year (yyyy), integer
363
+ For example, for a local date field named 'clientBirthday', you may use 'clientBirthday.dayOfMonth',
364
+ 'clientBirthday.month', 'clientBirthday.year' for filtering and sorting. */
365
+ DATE = 1;
366
+ /* Can be set for a field, marked as EMAIL format, allows filtering by following subfields:
367
+ - '.domain' - sorts/filters on the domain of an email (example email: hello@wix.com --> domain: wix.com), string */
368
+ EMAIL = 2;
369
+ }
370
+
371
+ message OperatorFieldSupport {
372
+ repeated Operator operator = 1; // Operators supported for fields that match the glob
373
+ // this field is deprecated because glob is hard to read. moved to a direct field config approach
374
+ optional string glob = 2 [(.wix.api.field_deprecated) = {
375
+ replaced_by: "field"
376
+ target_removal_date: "2023-03-31"
377
+ }, deprecated = true];
378
+ repeated string field = 5; // a collection of field paths that accepts this operator
379
+ optional Sort sort = 3; // sort type enabled for this glob
380
+ repeated RequiredFields required_fields = 4; // fields that match this glob, can be used only if the query is also filtered by required_fields
381
+ optional Maturity maturity = 6;
382
+ optional VirtualSubfields virtual_subfields = 7; // kind of virtual subfields are supported for this field
383
+ }
384
+ // this field is deprecated due to a better and shorter naming
385
+ repeated OperatorFieldSupport operator_field_support = 3 [(.wix.api.field_deprecated) = {
386
+ replaced_by: "pattern"
387
+ target_removal_date: "2023-03-31"
388
+ }, deprecated = true];
389
+ repeated OperatorFieldSupport pattern = 4; // supported operators for subject query method
390
+ optional bool validate_query = 6; // false by default. all new services will have it set to true
391
+ }
392
+
393
+ message Search {
394
+ repeated string field = 1; // a collection of field paths that supports Free Text Search
395
+ optional Maturity maturity = 2;
396
+ }
397
+
398
+ message Translatable {
399
+ enum Type {
400
+ UNDEFINED_TYPE = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
401
+ SHORT_TEXT = 1;
402
+ LONG_TEXT = 2;
403
+ RICH_TEXT = 3;
404
+ RICH_CONTENT_EDITOR = 4;
405
+ SELECTION = 5;
406
+ MULTI_SELECTION = 6;
407
+ DOCUMENT = 7;
408
+ IMAGE = 8;
409
+ VIDEO = 9;
410
+ IMAGE_LINK = 10; // Image URI without metadata
411
+ }
412
+ optional string name = 1; // a human friendly field name
413
+ optional bool hidden = 2; // is this translatable field hidden in Multilingual
414
+ optional string grouping = 3; // fields in schema may be grouped under meaningful topic or category of the source entity
415
+ required Type type = 4; // translation input component type e.g. "freetext", "dropdown", etc..
416
+ optional bool display_only = 5; // is this field for preview and not translatable
417
+ }
418
+
419
+ message Conditional {
420
+ optional string permission = 1; // field will not be returned by the server, unless the client has this permission. If `requested_field` is also set, and a client explicitly requests this field but does not have permission, server will return 403-Forbidden error
421
+ optional string requested_field = 2; // field will not be returned by the server, unless the client explicitly requested it using `fields` parameter in the request, with the enum value specified by this annotation
422
+ }
423
+
424
+ message ServiceAppendix {
425
+ enum Type {
426
+ UNKNOWN_APPENDIX_TYPE = 0;
427
+ NILE = 1; // Nile(tm) FW configuration
428
+ MESSAGE_BUS = 2; // wix message bus / pub-sub configuration
429
+ }
430
+ required Type type = 1; // appendix type
431
+ required string path = 2; // absolute from module root
432
+ }
433
+
434
+ // Defines the target audience of your API
435
+ // @see https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/api-lifecycle/2005-exposure
436
+ enum Exposure {
437
+ // Exposed to the owning team only. No other devs inside or outside Wix can use these APIs.
438
+ PRIVATE = 0;
439
+ // Exposed to internal Wix devs only. APIs that can only accept gRPC traffic and/or HTTP traffic over VPN
440
+ INTERNAL = 1;
441
+ // Exposed (or intended to be) to external devs. APIs that are accessible from the Internet, for example to the dashboard or live-site.
442
+ PUBLIC = 2;
443
+ }
444
+
445
+ enum Maturity {
446
+ ALPHA = 0;
447
+ BETA = 1;
448
+ IA = 2 [deprecated=true];
449
+ GA = 3;
450
+ NOT_IMPLEMENTED = 4;
451
+ }
@@ -0,0 +1,142 @@
1
+ syntax = "proto2";
2
+
3
+ package wix.api;
4
+
5
+ import "google/protobuf/descriptor.proto";
6
+ import "wix/api/annotations.proto";
7
+
8
+ option java_multiple_files = true;
9
+ option java_outer_classname = "ApiErrorsProto";
10
+ option java_package = "com.wix.api";
11
+
12
+ /**
13
+ * Annotation for method returned errors.
14
+ * Example usage:
15
+ **/
16
+ //import "google/protobuf/empty.proto";
17
+ //service FooService {
18
+ // // Definition of a service-level error.
19
+ // // Accepts `markdown` and multiline.
20
+ // option (wix.api.error_def) = {
21
+ // http_code: FAILED_PRECONDITION
22
+ // application_code: "NO_FOO_SUPPLY"
23
+ // };
24
+ //
25
+ // rpc CreateFoo (google.protobuf.Empty) returns (google.protobuf.Empty) {
26
+ // // Reference to a service-level error.
27
+ // option (wix.api.error_ref) = {
28
+ // application_code: "NO_FOO_SUPPLY"
29
+ // };
30
+ // // Definition of a method-level error.
31
+ // // Accepts `markdown` and multiline.
32
+ // option (wix.api.error) = {
33
+ // http_code: FAILED_PRECONDITION
34
+ // application_code: "NO_FOO_SUPPLY"
35
+ // data: "com.wixpress.foo.v1.NoFooSupplyError"
36
+ // };
37
+ // // You can specify multiple errors.
38
+ // option (wix.api.custom_validation_error) = {
39
+ // rule_name: "INVALID_NOTE"
40
+ // data: "com.wixpress.foo.v1.MyRuleViolationError"
41
+ // };
42
+ // // This method MAY throw standard crud errors of BULK_UPDATE method type.
43
+ // option (wix.api.inherit_crud_errors) = {
44
+ // method: BULK_UPDATE
45
+ // };
46
+ // }
47
+ //}
48
+
49
+ extend google.protobuf.ServiceOptions {
50
+ repeated Error error_def = 50600;
51
+ }
52
+
53
+ extend google.protobuf.MethodOptions {
54
+ repeated Error error = 50801;
55
+ repeated CustomValidationError custom_validation_error = 50802;
56
+ repeated InheritCrudErrors inherit_crud_errors = 50803;
57
+ repeated ErrorRef error_ref = 50804;
58
+ }
59
+
60
+ /**
61
+ ApplicationError: named Error for backwards compatibility
62
+ **/
63
+ message Error {
64
+ required StatusCodes.HttpStatusCode http_code = 1;
65
+ optional string application_code = 2;
66
+ optional string data = 3; // FQN path to the message that will be sent as payload for this error
67
+ }
68
+
69
+ /**
70
+ Method-level reference to a service-level error.
71
+ **/
72
+ message ErrorRef {
73
+ // Must match existing service-level error application code.
74
+ required string application_code = 1;
75
+ }
76
+
77
+ /**
78
+ CustomValidationError: field level validation, only declare when you have specific validation in your service that is not coming from infra
79
+ **/
80
+ message CustomValidationError {
81
+ required string rule_name = 1;
82
+ optional string data = 2; // FQN path to the message that will be sent as payload for this error
83
+ }
84
+
85
+ /**
86
+ InheritCrudErrors: does this method throw standard crud errors?
87
+ **/
88
+ message InheritCrudErrors {
89
+ required Crud.Method method = 1; // types of crud methods to inherit default errors from
90
+ }
91
+
92
+ message StatusCodes {
93
+ enum HttpStatusCode {
94
+ OK = 0; // 200
95
+
96
+ //Default error codes (applicable to all endpoints)
97
+
98
+ // 401 - Identity missing (missing, invalid or expired oAuth token,
99
+ // signed instance or cookies)
100
+ UNAUTHENTICATED = 1;
101
+
102
+ // 403 - Identity does not have the permission needed for this method / resource
103
+ PERMISSION_DENIED = 2;
104
+
105
+ // 400 - Bad Request. The client sent malformed body
106
+ // or one of the arguments was invalid
107
+ INVALID_ARGUMENT = 3;
108
+
109
+ // 404 - Resource does not exist
110
+ NOT_FOUND = 4;
111
+
112
+ // 500 - Internal Server Error
113
+ INTERNAL = 5;
114
+
115
+ // 503 - Come back later, server is currently unavailable
116
+ UNAVAILABLE = 6;
117
+
118
+ // 429 - The client has sent too many requests
119
+ // in a given amount of time (rate limit)
120
+ RESOURCE_EXHAUSTED = 7;
121
+
122
+ //Custom error codes - need to be documented
123
+
124
+ // 499 - Request cancelled by the client
125
+ CANCELED = 8;
126
+
127
+ // 409 - Can't recreate same resource or concurrency conflict
128
+ ALREADY_EXISTS = 9; //409
129
+
130
+ // 428 - request cannot be executed in current system state
131
+ // such as deleting a non-empty folder or paying with no funds
132
+ FAILED_PRECONDITION = 10;
133
+
134
+ //DO NOT USE IN WIX
135
+ // ABORTED = 11; // 409
136
+ // OUT_OF_RANGE = 12; // 400
137
+ // DEADLINE_EXEEDED = 13; // 504
138
+ // DATA_LOSS = 14; // 500
139
+ // UNIMPLEMENTED = 15; // 501
140
+ }
141
+ }
142
+