@wix/bex-utils 2.34.0 → 2.36.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 (115) hide show
  1. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/builders.impl.d.ts +40 -0
  2. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/builders.impl.js +561 -0
  3. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/builders.impl.js.map +1 -0
  4. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/http.impl.d.ts +16 -0
  5. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/http.impl.js +120 -0
  6. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/http.impl.js.map +1 -0
  7. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/meta.impl.d.ts +16 -0
  8. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/meta.impl.js +81 -0
  9. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/meta.impl.js.map +1 -0
  10. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/proto/client/proto-generated.d.ts +7332 -0
  11. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/proto/client/proto-generated.js +2 -0
  12. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/proto/proto-generated.d.ts +3666 -0
  13. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/proto/proto-generated.js +59840 -0
  14. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/proto/server/proto-generated.d.ts +7328 -0
  15. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/proto/server/proto-generated.js +2 -0
  16. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/rpc.impl.d.ts +23 -0
  17. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/rpc.impl.js +73 -0
  18. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/rpc.impl.js.map +1 -0
  19. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/types.impl.d.ts +363 -0
  20. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/types.impl.js +56 -0
  21. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/cjs/types.impl.js.map +1 -0
  22. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/builders.impl.d.ts +40 -0
  23. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/builders.impl.js +507 -0
  24. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/builders.impl.js.map +1 -0
  25. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/http.impl.d.ts +16 -0
  26. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/http.impl.js +114 -0
  27. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/http.impl.js.map +1 -0
  28. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/meta.impl.d.ts +16 -0
  29. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/meta.impl.js +56 -0
  30. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/meta.impl.js.map +1 -0
  31. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/rpc.impl.d.ts +23 -0
  32. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/rpc.impl.js +48 -0
  33. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/rpc.impl.js.map +1 -0
  34. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/types.impl.d.ts +363 -0
  35. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/types.impl.js +53 -0
  36. package/@wix/ambassador-items-selection-spi-host-v1-provider/build/es/types.impl.js.map +1 -0
  37. package/@wix/ambassador-items-selection-spi-host-v1-provider/builders/package.json +7 -0
  38. package/@wix/ambassador-items-selection-spi-host-v1-provider/http/package.json +7 -0
  39. package/@wix/ambassador-items-selection-spi-host-v1-provider/meta/package.json +7 -0
  40. package/@wix/ambassador-items-selection-spi-host-v1-provider/package.json +52 -0
  41. package/@wix/ambassador-items-selection-spi-host-v1-provider/rpc/package.json +6 -0
  42. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/src/main/proto/com/wixpress/items_selection/spi/v1/additional_data/ecom_catalog_data.proto +20 -0
  43. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/src/main/proto/com/wixpress/items_selection/spi/v1/additional_data/inbox_data.proto +17 -0
  44. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/src/main/proto/com/wixpress/items_selection/spi/v1/additional_data.proto +16 -0
  45. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/src/main/proto/com/wixpress/items_selection/spi/v1/image.proto +11 -0
  46. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/src/main/proto/com/wixpress/items_selection/spi/v1/items_selection_config.proto +246 -0
  47. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/src/main/proto/com/wixpress/items_selection/spi/v1/items_selection_spi.proto +145 -0
  48. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/action_payload.proto +33 -0
  49. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/annotations.proto +393 -0
  50. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/api_errors.proto +117 -0
  51. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/callback.proto +156 -0
  52. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/context.proto +19 -0
  53. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/entity.proto +122 -0
  54. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/errors.proto +119 -0
  55. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/idempotency.proto +25 -0
  56. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/permissions.proto +40 -0
  57. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/sla.proto +24 -0
  58. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/subscription.proto +32 -0
  59. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/api/validations.proto +137 -0
  60. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/address.proto +148 -0
  61. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/bulk.proto +53 -0
  62. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/identification.proto +40 -0
  63. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/image.proto +8 -0
  64. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/media.proto +236 -0
  65. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/money.proto +32 -0
  66. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/pageurl.proto +32 -0
  67. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/paging.proto +121 -0
  68. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/query.proto +795 -0
  69. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/sorting.proto +36 -0
  70. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/spi.proto +85 -0
  71. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/tags.proto +55 -0
  72. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/common/wixlink.proto +201 -0
  73. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/graphql/definitions.proto +13 -0
  74. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/http/field_mask.proto +46 -0
  75. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/items_selection/spi_host/v1/items_selection_service.proto +136 -0
  76. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/sdk/definitions.proto +191 -0
  77. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/spi/definitions.proto +186 -0
  78. package/@wix/ambassador-items-selection-spi-host-v1-provider/src/main/proto/wix/spi/http_error_status.proto +24 -0
  79. package/@wix/ambassador-items-selection-spi-host-v1-provider/types/package.json +7 -0
  80. package/@wix/bex-bundled-mini-essentials/CHANGELOG.md +4 -0
  81. package/@wix/bex-bundled-mini-essentials/dist/tsconfig.tsbuildinfo +1 -1
  82. package/@wix/bex-bundled-mini-essentials/package.json +1 -1
  83. package/@wix/bi-logger-os-data/dist/cjs/index.js +4 -1
  84. package/@wix/bi-logger-os-data/dist/cjs/index.js.map +1 -1
  85. package/@wix/bi-logger-os-data/dist/cjs/testkit/client-testkit.js +4 -1
  86. package/@wix/bi-logger-os-data/dist/cjs/testkit/client-testkit.js.map +1 -1
  87. package/@wix/bi-logger-os-data/dist/cjs/testkit/common.js +101 -5
  88. package/@wix/bi-logger-os-data/dist/cjs/testkit/common.js.map +1 -1
  89. package/@wix/bi-logger-os-data/dist/cjs/testkit/node-testkit.js +4 -1
  90. package/@wix/bi-logger-os-data/dist/cjs/testkit/node-testkit.js.map +1 -1
  91. package/@wix/bi-logger-os-data/dist/cjs/v2/index.js +53 -23
  92. package/@wix/bi-logger-os-data/dist/cjs/v2/index.js.map +1 -1
  93. package/@wix/bi-logger-os-data/dist/esm/index.js +4 -1
  94. package/@wix/bi-logger-os-data/dist/esm/index.js.map +1 -1
  95. package/@wix/bi-logger-os-data/dist/esm/testkit/client-testkit.js +4 -1
  96. package/@wix/bi-logger-os-data/dist/esm/testkit/client-testkit.js.map +1 -1
  97. package/@wix/bi-logger-os-data/dist/esm/testkit/common.js +101 -5
  98. package/@wix/bi-logger-os-data/dist/esm/testkit/common.js.map +1 -1
  99. package/@wix/bi-logger-os-data/dist/esm/testkit/node-testkit.js +4 -1
  100. package/@wix/bi-logger-os-data/dist/esm/testkit/node-testkit.js.map +1 -1
  101. package/@wix/bi-logger-os-data/dist/esm/v2/index.js +35 -6
  102. package/@wix/bi-logger-os-data/dist/esm/v2/index.js.map +1 -1
  103. package/@wix/bi-logger-os-data/dist/types/index.d.ts +4 -3
  104. package/@wix/bi-logger-os-data/dist/types/testkit/client-testkit.d.ts +22 -2
  105. package/@wix/bi-logger-os-data/dist/types/testkit/node-testkit.d.ts +22 -2
  106. package/@wix/bi-logger-os-data/dist/types/types.d.ts +22 -2
  107. package/@wix/bi-logger-os-data/dist/types/v2/index.d.ts +34 -7
  108. package/@wix/bi-logger-os-data/package.json +2 -2
  109. package/@wix/bi-logger-os-data/src/index.ts +7 -3
  110. package/@wix/bi-logger-os-data/src/testkit/client-testkit.ts +25 -2
  111. package/@wix/bi-logger-os-data/src/testkit/common.ts +119 -6
  112. package/@wix/bi-logger-os-data/src/testkit/node-testkit.ts +25 -2
  113. package/@wix/bi-logger-os-data/src/types.ts +42 -4
  114. package/@wix/bi-logger-os-data/src/v2/index.ts +37 -7
  115. package/package.json +5 -4
@@ -0,0 +1,393 @@
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
+ }
128
+ }
129
+
130
+ message Paging {
131
+ enum Type {
132
+ UNKNOWN_TYPE = 0;
133
+ OFFSET = 1;
134
+ CURSOR = 2;
135
+ }
136
+ optional Type type = 1; // paging type
137
+ optional string paging_metadata_field = 2; // paging field name in response object. default is `metadata`
138
+ }
139
+
140
+ message CustomActionOptions {
141
+ optional bool read_operation = 1; // the custom-action's operation will do nothing but read data.
142
+ }
143
+
144
+ message CreateMethodOptions {
145
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
146
+ }
147
+
148
+ message GetItemMethodOptions {
149
+ optional string item_field = 2; // item field name in response object only. default is `<entity-name>`
150
+ optional string id_field = 1; // id field name in request object. default is `<entity-name>_id`
151
+ }
152
+
153
+ message UpdateMethodOptions {
154
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
155
+ optional string fieldmask_field = 2; // fieldmask field name in request object. default is `fieldmask`, only if it really exists in model
156
+ }
157
+
158
+ message UpsertMethodOptions {
159
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
160
+ optional string fieldmask_field = 2; // fieldmask field name in request object. default is `fieldmask`, only if it really exists in model
161
+ }
162
+
163
+ message DeleteMethodOptions {
164
+ optional string id_field = 1; // id field name in request object. default is `<entity-name>_id`
165
+ }
166
+
167
+ message ListMethodOptions {
168
+ optional string ids_field = 1; // ids field name in request object if such exists. recommended field-name: `<entity-name>_ids`
169
+ required string items_field = 3; // items field name in response object.
170
+ optional Paging paging = 2; // present paging mechanism info, default will be of type=`CURSOR`
171
+ repeated string me_aliasable_field = 4; // collection of FQNs of fields that MAY be aliased with the const `"me"`
172
+ }
173
+
174
+ message QueryMethodOptions {
175
+ optional string query_field = 1; // query field name in request object. default is `query`
176
+ required string items_field = 3; // items field name in response object.
177
+ optional Paging paging = 2; // present paging mechanism info, default will be of type=`CURSOR`
178
+ oneof wql_options {
179
+ // mark fields that are available for filtering and sorting via WixQueryLanguage
180
+ // Deprecated - use wql annotation on the entity level
181
+ Wql wql = 4 [deprecated = true];
182
+ string query_options_name = 6; //Name of WQL variant to use
183
+ }
184
+ repeated string me_aliasable_field = 5; // collection of FQNs of fields that MAY be aliased with the const `"me"`
185
+ }
186
+
187
+ message SearchMethodOptions {
188
+ optional string search_field = 1; // search field name in request object. default is `search`
189
+ required string items_field = 3; // items field name in response object.
190
+ optional Paging paging = 2; // present paging mechanism info, default will be of type=`CURSOR`
191
+ oneof wql_options {
192
+ Wql wql = 4; // mark fields that are available for filtering and sorting via WixQueryLanguage
193
+ string query_options_name = 7; //Name of WQL variant to use
194
+ }
195
+ repeated string me_aliasable_field = 5; // collection of FQNs of fields that MAY be aliased with the const `"me"`
196
+ repeated Search search = 6; // mark fields that are available for search
197
+ }
198
+
199
+ message BulkCreateMethodOptions {
200
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
201
+ }
202
+
203
+ message BulkUpdateMethodOptions {
204
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
205
+ optional string fieldmask_field = 2; // fieldmask field name in request object. default is `fieldmask`, only if it really exists in model
206
+ }
207
+
208
+ message BulkUpdateByFilterMethodOptions {
209
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
210
+ optional string fieldmask_field = 2; // fieldmask field name in request object. default is `fieldmask`, only if it really exists in model
211
+ optional string filter_field = 3; // filter field name in request object. default is `filter`
212
+ optional string query_options_name = 4; //Name of WQL variant to use
213
+ }
214
+
215
+ message BulkUpsertMethodOptions {
216
+ optional string item_field = 1; // item field name in request and response objects. default is `<entity-name>`
217
+ optional string fieldmask_field = 2; // fieldmask field name in request object. default is `fieldmask`, only if it really exists in model
218
+ }
219
+
220
+ message BulkDeleteMethodOptions {
221
+ optional string ids_field = 1; // ids field name in request object. default is `<entity-name>_ids`
222
+ }
223
+
224
+ message BulkDeleteByFilterMethodOptions {
225
+ optional string filter_field = 1; // filter field name in request object. default is `filter`
226
+ optional string query_options_name = 2; //Name of WQL variant to use
227
+ }
228
+
229
+ message ListDeletedMethodOptions {
230
+ optional string ids_field = 1; // ids field name in request object if such exists. recommended field-name: `<entity-name>_ids`
231
+ required string items_field = 3; // items field name in response object.
232
+ optional Paging paging = 2; // present paging mechanism info, default will be of type=`CURSOR`
233
+ repeated string me_aliasable_field = 4; // collection of FQNs of fields that MAY be aliased with the const `"me"`
234
+ }
235
+
236
+ message GetDeletedMethodOptions {
237
+ optional string item_field = 2; // item field name in response object only. default is `<entity-name>`
238
+ optional string id_field = 1; // id field name in request object. default is `<entity-name>_id`
239
+ }
240
+
241
+ message RestoreFromTrashbinMethodOptions {
242
+ optional string item_field = 2; // item field name in response object only. default is `<entity-name>`
243
+ optional string id_field = 1; // id field name in request object. default is `<entity-name>_id`
244
+ }
245
+
246
+ message RemoveFromTrashbinMethodOptions {
247
+ optional string id_field = 1; // id field name in request object. default is `<entity-name>_id`
248
+ }
249
+
250
+ message CountOptions {
251
+ oneof wql_options {
252
+ // The name of the endpoint that the count "copy" the WQL settings from - e.g inherit_wql_from: 'QueryProducts'
253
+ // Usually, that will be the query endpoint since you want the same filter capabilities for query and count
254
+ string inherit_wql_from = 1 [deprecated = true];
255
+
256
+ string query_options_name = 2; //Name of WQL variant to use
257
+ }
258
+ }
259
+
260
+ message SearchRelatedOptions {
261
+ oneof wql_options {
262
+ // The name of the endpoint that the related-search "copy" the WQL settings from - e.g inherit_wql_from: 'SearchProducts'
263
+ // Usually, that will be the search endpoint since you want the same filter capabilities for search and related search
264
+ string inherit_wql_from = 1 [deprecated = true];
265
+
266
+ string query_options_name = 2; //Name of WQL variant to use
267
+ }
268
+ }
269
+
270
+ message UpdateExtendedFieldsOptions {
271
+ optional string item_field = 2; // item field name in response object only. default is `<entity-name>`
272
+ }
273
+
274
+ message Wql {
275
+ enum Operator {
276
+ option allow_alias = true;
277
+ ALL_APPLICABLE_OPERATORS = 0; // Applicable by type. i.e. if we allow LT/GT for **, it means for numeric fields only.
278
+ EQ = 1; // [Comparison] Matches values that are equal to a specified value.
279
+ GT = 2; // [Comparison] Matches values that are greater than a specified value.
280
+ GTE = 3; // [Comparison] Matches values that are greater than or equal to a specified value.
281
+ IN = 4; // [Comparison] Matches any of the values specified in an array.
282
+ LT = 5; // [Comparison] Matches values that are less than a specified value.
283
+ LTE = 6; // [Comparison] Matches values that are less than or equal to a specified value.
284
+ NE = 7; // [Comparison] Matches all values that are not equal to a specified value.
285
+ NIN = 8; // [Comparison] Matches none of the values specified in an array.
286
+ BEGINS = 9; // [Comparison] Matches strings that begin with a specified value (NOT case sensitive).
287
+ EXISTS = 10; // [Element] Matches documents that have the specified field.
288
+ HAS_ALL = 11; // [Array] Matches arrays that contain all elements specified in the query.
289
+ ALL = 11 [deprecated = true]; // [Array] Matches arrays that contain all elements specified in the query.
290
+ HAS_SOME = 12; // [Array] Matches arrays that contain at least one element specified in the query.
291
+ ANY = 12 [deprecated = true]; // [Array] Matches arrays that contain at least one element specified in the query.
292
+ EMPTY = 13; // [Array] Matches arrays that contain no elements.
293
+ MATCH_ALL = 14; // Matches all items. Intended for expressing intent in selecting everything for ex. destructive operations - bulk deletes, updates, etc.
294
+ MATCH_ITEMS = 16; // [Array] match multiple fields within array with AND operator semantics.
295
+ }
296
+ enum Sort {
297
+ NONE = 0; // no sorting enabled
298
+ ASC = 1; // ascending sort is supported
299
+ DESC = 2; // descending sort is supported
300
+ BOTH = 3; // sort is supported in both directions
301
+ }
302
+ message RequiredFields {
303
+ // this field is deprecated because we need sort direction alongside to field path
304
+ repeated string field = 1[(.wix.api.field_deprecated) = {
305
+ replaced_by: "required_field"
306
+ target_removal_date: "2023-03-31"
307
+ }];
308
+ message RequiredField {
309
+ required string path = 1; // a field path that that accepts this operator
310
+ optional Sort sort = 2; // sort type enabled for this glob
311
+ }
312
+ repeated RequiredField required_field = 2; // all required field configurations to satisfy composite index
313
+ }
314
+ message OperatorFieldSupport {
315
+ repeated Operator operator = 1; // Operators supported for fields that match the glob
316
+ // this field is deprecated because glob is hard to read. moved to a direct field config approach
317
+ optional string glob = 2 [(.wix.api.field_deprecated) = {
318
+ replaced_by: "field"
319
+ target_removal_date: "2023-03-31"
320
+ }, deprecated = true];
321
+ repeated string field = 5; // a collection of field paths that that accepts this operator
322
+ optional Sort sort = 3; // sort type enabled for this glob
323
+ repeated RequiredFields required_fields = 4; // fields that match this glob, can be used only if the query is also filtered by required_fields
324
+ optional Maturity maturity = 6;
325
+ }
326
+ // this field is deprecated due to a better and shorter naming
327
+ repeated OperatorFieldSupport operator_field_support = 3 [(.wix.api.field_deprecated) = {
328
+ replaced_by: "pattern"
329
+ target_removal_date: "2023-03-31"
330
+ }, deprecated = true];
331
+ repeated OperatorFieldSupport pattern = 4; // supported operators for subject query method
332
+ optional bool validate_query = 6; // false by default. all new services will have it set to true
333
+ }
334
+
335
+ message Search {
336
+ repeated string field = 1; // a collection of field paths that supports Free Text Search
337
+ optional Maturity maturity = 2;
338
+ }
339
+
340
+ message Translatable {
341
+ enum Type {
342
+ UNDEFINED_TYPE = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
343
+ SHORT_TEXT = 1;
344
+ LONG_TEXT = 2;
345
+ RICH_TEXT = 3;
346
+ RICH_CONTENT_EDITOR = 4;
347
+ SELECTION = 5;
348
+ MULTI_SELECTION = 6;
349
+ DOCUMENT = 7;
350
+ IMAGE = 8;
351
+ VIDEO = 9;
352
+ IMAGE_LINK = 10; // Image URI without metadata
353
+ }
354
+ optional string name = 1; // a human friendly field name
355
+ optional bool hidden = 2; // is this translatable field hidden in Multilingual
356
+ optional string grouping = 3; // fields in schema may be grouped under meaningful topic or category of the source entity
357
+ required Type type = 4; // translation input component type e.g. "freetext", "dropdown", etc..
358
+ optional bool display_only = 5; // is this field for preview and not translatable
359
+ }
360
+
361
+ message Conditional {
362
+ 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
363
+ 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
364
+ }
365
+
366
+ message ServiceAppendix {
367
+ enum Type {
368
+ UNKNOWN_APPENDIX_TYPE = 0;
369
+ NILE = 1; // Nile(tm) FW configuration
370
+ MESSAGE_BUS = 2; // wix message bus / pub-sub configuration
371
+ }
372
+ required Type type = 1; // appendix type
373
+ required string path = 2; // absolute from module root
374
+ }
375
+
376
+ // Defines the target audience of your API
377
+ // @see https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/api-lifecycle/2005-exposure
378
+ enum Exposure {
379
+ // Exposed to the owning team only. No other devs inside or outside Wix can use these APIs.
380
+ PRIVATE = 0;
381
+ // Exposed to internal Wix devs only. APIs that can only accept gRPC traffic and/or HTTP traffic over VPN
382
+ INTERNAL = 1;
383
+ // Exposed (or intended to be) to external devs. APIs that are accessible from the Internet, for example to the dashboard or live-site.
384
+ PUBLIC = 2;
385
+ }
386
+
387
+ enum Maturity {
388
+ ALPHA = 0;
389
+ BETA = 1;
390
+ IA = 2 [deprecated=true];
391
+ GA = 3;
392
+ NOT_IMPLEMENTED = 4;
393
+ }
@@ -0,0 +1,117 @@
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
+ * import "wix/api/api_errors.proto";
16
+ * service FooService {
17
+ * rpc CreateFoo (CreateFooRequest) returns (CreateFooResponse) {
18
+ * // Description of the error. Accepts `markdown`
19
+ * // and multiline
20
+ * option (wix.api.error) = {
21
+ * http_code: FAILED_PRECONDITION
22
+ * application_code: "NO_FOO_SUPPLY"
23
+ * data: "com.wixpress.foo.v1.NoFooSupplyError"
24
+ * }
25
+ * //and you can specify multiple errors
26
+ * option (wix.api.custom_validation_error) = {
27
+ * rule_name: "INVALID_NOTE"
28
+ * data: "com.wixpress.foo.v1.MyRuleViolationError"
29
+ * }
30
+ * // this method MAY throw standard crud errors of BULK_UPDATE method type
31
+ * option (wix.api.inherit_crud_errors) = {
32
+ * method: BULK_UPDATE
33
+ * }
34
+ * }
35
+ * }
36
+ **/
37
+ extend google.protobuf.MethodOptions {
38
+ repeated Error error = 50801;
39
+ repeated CustomValidationError custom_validation_error = 50802;
40
+ repeated InheritCrudErrors inherit_crud_errors = 50803;
41
+ }
42
+
43
+ /**
44
+ ApplicationError: named Error for backwards compatibility
45
+ **/
46
+ message Error {
47
+ required StatusCodes.HttpStatusCode http_code = 1;
48
+ optional string application_code = 2;
49
+ optional string data = 3; // FQN path to the message that will be sent as payload for this error
50
+ }
51
+
52
+ /**
53
+ CustomValidationError: field level validation, only declare when you have specific validation in your service that is not coming from infra
54
+ **/
55
+ message CustomValidationError {
56
+ required string rule_name = 1;
57
+ optional string data = 2; // FQN path to the message that will be sent as payload for this error
58
+ }
59
+
60
+ /**
61
+ InheritCrudErrors: does this method throw standard crud errors?
62
+ **/
63
+ message InheritCrudErrors {
64
+ required Crud.Method method = 1; // types of crud methods to inherit default errors from
65
+ }
66
+
67
+ message StatusCodes {
68
+ enum HttpStatusCode {
69
+ OK = 0; // 200
70
+
71
+ //Default error codes (applicable to all endpoints)
72
+
73
+ // 401 - Identity missing (missing, invalid or expired oAuth token,
74
+ // signed instance or cookies)
75
+ UNAUTHENTICATED = 1;
76
+
77
+ // 403 - Identity does not have the permission needed for this method / resource
78
+ PERMISSION_DENIED = 2;
79
+
80
+ // 400 - Bad Request. The client sent malformed body
81
+ // or one of the arguments was invalid
82
+ INVALID_ARGUMENT = 3;
83
+
84
+ // 404 - Resource does not exist
85
+ NOT_FOUND = 4;
86
+
87
+ // 500 - Internal Server Error
88
+ INTERNAL = 5;
89
+
90
+ // 503 - Come back later, server is currently unavailable
91
+ UNAVAILABLE = 6;
92
+
93
+ // 429 - The client has sent too many requests
94
+ // in a given amount of time (rate limit)
95
+ RESOURCE_EXHAUSTED = 7;
96
+
97
+ //Custom error codes - need to be documented
98
+
99
+ // 499 - Request cancelled by the client
100
+ CANCELED = 8;
101
+
102
+ // 409 - Can't recreate same resource or concurrency conflict
103
+ ALREADY_EXISTS = 9; //409
104
+
105
+ // 428 - request cannot be executed in current system state
106
+ // such as deleting a non-empty folder or paying with no funds
107
+ FAILED_PRECONDITION = 10;
108
+
109
+ //DO NOT USE IN WIX
110
+ // ABORTED = 11; // 409
111
+ // OUT_OF_RANGE = 12; // 400
112
+ // DEADLINE_EXEEDED = 13; // 504
113
+ // DATA_LOSS = 14; // 500
114
+ // UNIMPLEMENTED = 15; // 501
115
+ }
116
+ }
117
+
@@ -0,0 +1,156 @@
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 = "CallbackProto";
10
+ option java_package = "com.wix.api";
11
+
12
+ /*
13
+ callback option is used to denote two separate concepts:
14
+ 1. DomainEvents- these are events your service sends on all activities in your entity. Emitted as a result of this method.
15
+ service BlooperService {
16
+ option (wix.api.service_entity).message = "com.wixpress.examples.Blooper"; //the "main" entity
17
+ rpc CreateBlooper (CreateBlooperRequest) returns (CreateBlooperResponse) {
18
+ option (wix.api.callback) = {
19
+ event_type: CREATED
20
+ };
21
+ };
22
+ rpc MissedBlooper (MissedBlooperRequest) returns (MissedBlooperResponse) {
23
+ option (wix.api.callback) = {
24
+ event_type: Action
25
+ payload: "com.wixpress.examples.BlooperWasMissed"
26
+ };
27
+ };
28
+ }
29
+ message Blooper {
30
+ option (wix.api.entity) = {
31
+ fqdn: "wix.examples.Blooper"
32
+ };
33
+ }
34
+ message BlooperWasMissed {
35
+ int32 how_funny_it_could_have_been = 1;
36
+ }
37
+
38
+
39
+ 2. Kafka events that are internal to your domain and that are not related to a specific entity. Emitted as a result of this method.
40
+ service BlooperService {
41
+ rpc Update (Request) returns (Response) {
42
+ option (wix.api.callback) = {
43
+ segment: USERS
44
+ topic: "Blooper.Update"
45
+ payload: "BlooperUpdateNotification" //name of the Message that is sent as event
46
+ permission: "Some.Permission" //permission required to consume this event as a webhook
47
+ };
48
+ };
49
+ }
50
+ */
51
+ extend google.protobuf.MethodOptions {
52
+ repeated Callback callback = 50000;
53
+ repeated Emits emits = 50001;
54
+ }
55
+
56
+ /*
57
+ event option is used to denote two separate concepts:
58
+ 1. DomainEvents- these are events your service sends on all activities in your entity (see examples above)
59
+ 2. Kafka events that are internal to your domain and that are not related to a specific entity
60
+ Both are emitted by the service, not necessarily as a result of a method call (some internal process of the service)
61
+ Internal to domain event example:
62
+ service BlooperService {
63
+ option (wix.api.event) = {
64
+ segment: PUBLIC
65
+ topic: "Blooper.Update"
66
+ payload: "BlooperUpdateNotification" //name of the Message that is sent as event
67
+ permission: "Some.Permission" //permission required to consume this event as a webhook
68
+ };
69
+ rpc Update (Request) returns (Response) {
70
+ //...
71
+ };
72
+ }
73
+ */
74
+ extend google.protobuf.ServiceOptions {
75
+ repeated Callback event = 50000;
76
+ repeated CallbackDeprecation event_deprecated = 50001;
77
+ // reserved 50002; TODO(aplus, 2024-08-13) remove when all artifact sync/GA
78
+ }
79
+
80
+ message Callback {
81
+ enum EventType {
82
+ UNKNOWN = 0;
83
+ CREATED = 1;
84
+ UPDATED = 2;
85
+ DELETED = 3;
86
+ ACTION = 4;
87
+ }
88
+
89
+ optional string topic = 1;
90
+ optional Segment.SegmentName segment = 8; // currently defaults to "legacy", will be `required` when legacy cluster is removed
91
+ optional string payload = 2;
92
+ optional string permission = 3;
93
+ optional EventType event_type = 4;
94
+ optional Exposure exposure = 6;
95
+ optional Maturity maturity = 7;
96
+ }
97
+
98
+ message DomainEvent {
99
+ enum EventType {
100
+ UNKNOWN = 0;
101
+ CREATED = 1;
102
+ UPDATED = 2;
103
+ DELETED = 3;
104
+ ACTION = 4;
105
+ }
106
+ optional string action_message_fqn = 2; // Required when event_type == ACTION, otherwise must not be set
107
+ optional string webhook_permission_override = 3;
108
+ optional EventType event_type = 4;
109
+ optional Exposure exposure = 6;
110
+ optional Maturity maturity = 7;
111
+ }
112
+
113
+ message Emits {
114
+ required DomainEvent.EventType event_type = 1;
115
+ optional string action_message_fqn = 2; // Required when event_type == ACTION, otherwise must not be set
116
+ }
117
+
118
+ message CallbackDeprecation {
119
+ optional string replaced_by = 1;
120
+ optional string target_removal_date = 2;
121
+ optional Callback.EventType event_type = 3;
122
+ optional string custom_slug = 4; // required when event_type=action
123
+ optional string payload = 5;
124
+ }
125
+
126
+ message Segment {
127
+
128
+ /**
129
+ * [Segment] annotation registers to Confluent clusters.
130
+ * Existing topics might have a hard-coded segment in Greyhound, so this option is not required in proto.
131
+ * However, new topics must provide a segment, or greyhound will throw an exception.
132
+ * @see https://bo.wix.com/wix-docs/rnd/p13n-guidelines---aips/guidance-aips/design-patterns/[7016]-events#p13n-guidelines---aips_guidance-aips_design-patterns_[7016]-events_12-choose-the-right-segment
133
+ */
134
+ enum SegmentName {
135
+ UNSPECIFIED = 0; // currently means "auto-resolved for old topics", will be forbidden when legacy cluster is removed
136
+
137
+ /**
138
+ * For events that are consumed in 42 and uw2 only.
139
+ * This also includes a case where an event is produced from 84/AE1 via toMainDC
140
+ */
141
+ USERS = 1;
142
+
143
+ /**
144
+ * For events that are consumed in all DCs.
145
+ * This includes both cases where an event is published from 84/AE1 and cases where it's published from 42/uw2 and replicated via Raven to 84/AE1
146
+ */
147
+ PUBLIC = 2;
148
+
149
+ /**
150
+ * For DevEx services/migrations.
151
+ * Deployed on 42, uw2.
152
+ */
153
+ OTHERS = 3;
154
+ }
155
+ }
156
+
@@ -0,0 +1,19 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.api;
4
+
5
+ option java_multiple_files = true;
6
+ option java_outer_classname = "ContextProto";
7
+ option java_package = "com.wix.api";
8
+
9
+ message RequestContext {
10
+ map<string, string> aspects = 1;
11
+ }
12
+
13
+ message ResponseContext {
14
+ repeated ResponseContextEntry aspects = 1;
15
+ }
16
+
17
+ message ResponseContextEntry {
18
+ map<string, string> aspectEntry = 1;
19
+ }