@wix/bex-utils 2.71.0 → 2.73.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 (112) hide show
  1. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/builders.impl.d.ts +115 -0
  2. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/builders.impl.js +1340 -0
  3. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/builders.impl.js.map +1 -0
  4. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/http.impl.d.ts +29 -0
  5. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/http.impl.js +524 -0
  6. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/http.impl.js.map +1 -0
  7. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/meta.impl.d.ts +20 -0
  8. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/meta.impl.js +119 -0
  9. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/meta.impl.js.map +1 -0
  10. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/client/proto-generated.d.ts +18874 -0
  11. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/client/proto-generated.js +2 -0
  12. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/proto-generated.d.ts +9468 -0
  13. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/proto-generated.js +1 -0
  14. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/server/proto-generated.d.ts +18788 -0
  15. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/server/proto-generated.js +2 -0
  16. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/rpc.impl.d.ts +39 -0
  17. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/rpc.impl.js +113 -0
  18. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/rpc.impl.js.map +1 -0
  19. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/types.impl.d.ts +1248 -0
  20. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/types.impl.js +371 -0
  21. package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/types.impl.js.map +1 -0
  22. package/@wix/ambassador-dealer-v1-serving-offer/build/es/builders.impl.d.ts +115 -0
  23. package/@wix/ambassador-dealer-v1-serving-offer/build/es/builders.impl.js +1209 -0
  24. package/@wix/ambassador-dealer-v1-serving-offer/build/es/builders.impl.js.map +1 -0
  25. package/@wix/ambassador-dealer-v1-serving-offer/build/es/http.impl.d.ts +29 -0
  26. package/@wix/ambassador-dealer-v1-serving-offer/build/es/http.impl.js +516 -0
  27. package/@wix/ambassador-dealer-v1-serving-offer/build/es/http.impl.js.map +1 -0
  28. package/@wix/ambassador-dealer-v1-serving-offer/build/es/meta.impl.d.ts +20 -0
  29. package/@wix/ambassador-dealer-v1-serving-offer/build/es/meta.impl.js +92 -0
  30. package/@wix/ambassador-dealer-v1-serving-offer/build/es/meta.impl.js.map +1 -0
  31. package/@wix/ambassador-dealer-v1-serving-offer/build/es/rpc.impl.d.ts +39 -0
  32. package/@wix/ambassador-dealer-v1-serving-offer/build/es/rpc.impl.js +86 -0
  33. package/@wix/ambassador-dealer-v1-serving-offer/build/es/rpc.impl.js.map +1 -0
  34. package/@wix/ambassador-dealer-v1-serving-offer/build/es/types.impl.d.ts +1248 -0
  35. package/@wix/ambassador-dealer-v1-serving-offer/build/es/types.impl.js +368 -0
  36. package/@wix/ambassador-dealer-v1-serving-offer/build/es/types.impl.js.map +1 -0
  37. package/@wix/ambassador-dealer-v1-serving-offer/builders/package.json +7 -0
  38. package/@wix/ambassador-dealer-v1-serving-offer/http/package.json +7 -0
  39. package/@wix/ambassador-dealer-v1-serving-offer/meta/package.json +7 -0
  40. package/@wix/ambassador-dealer-v1-serving-offer/package.json +52 -0
  41. package/@wix/ambassador-dealer-v1-serving-offer/rpc/package.json +6 -0
  42. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiment_properties.proto +46 -0
  43. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiment_results.proto +39 -0
  44. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiment_support_kpis.proto +29 -0
  45. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiments_properties_thin.proto +31 -0
  46. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/wixab_service.proto +81 -0
  47. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/action_payload.proto +33 -0
  48. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/annotations.proto +451 -0
  49. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/api_errors.proto +142 -0
  50. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/callback.proto +163 -0
  51. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/context.proto +19 -0
  52. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/entity.proto +127 -0
  53. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/errors.proto +127 -0
  54. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/idempotency.proto +25 -0
  55. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/permissions.proto +46 -0
  56. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/sla.proto +24 -0
  57. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/subscription.proto +32 -0
  58. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/validations.proto +142 -0
  59. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/address.proto +148 -0
  60. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/bulk.proto +53 -0
  61. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/data/dataextensions/extended-fields.proto +20 -0
  62. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/data/dataextensions/update-extended-fields-messages.proto +15 -0
  63. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/data/errors.proto +435 -0
  64. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/identification.proto +40 -0
  65. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/image.proto +8 -0
  66. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/media.proto +280 -0
  67. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/money.proto +32 -0
  68. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/pageurl.proto +32 -0
  69. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/paging.proto +121 -0
  70. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/query.proto +812 -0
  71. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/sorting.proto +36 -0
  72. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/spi.proto +85 -0
  73. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/tags.proto +55 -0
  74. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/wixlink.proto +203 -0
  75. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/audiences.proto +226 -0
  76. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/campaigns.proto +270 -0
  77. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/frequency-caps.proto +74 -0
  78. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/localization-managers.proto +11 -0
  79. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/managers.proto +11 -0
  80. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/offer-test.proto +338 -0
  81. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/offer.proto +298 -0
  82. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/offers-service.proto +696 -0
  83. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/placements.proto +423 -0
  84. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/schemas-service.proto +142 -0
  85. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/targeting.proto +378 -0
  86. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/upstream/wix/common/paging.proto +126 -0
  87. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/upstream/wix/common/query.proto +840 -0
  88. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/upstream/wix/common/sorting.proto +37 -0
  89. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerOffersServing/api/v1/dealer-offers-debug.proto +188 -0
  90. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerOffersServing/api/v1/dealer-offers-serving.proto +177 -0
  91. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerOffersServing/api/v1/offer.proto +87 -0
  92. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerPriority/api/v1/priority-service.proto +57 -0
  93. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerPriority/api/v1/priority.proto +132 -0
  94. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/graphql/definitions.proto +13 -0
  95. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/http/field_mask.proto +46 -0
  96. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/optimization_tester_service.proto +284 -0
  97. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/test.proto +170 -0
  98. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/bulk.proto +56 -0
  99. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/paging.proto +121 -0
  100. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/query.proto +741 -0
  101. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/sorting.proto +26 -0
  102. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/targeting/v1/targeting.proto +406 -0
  103. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/targeting/v1/targeting_service.proto +247 -0
  104. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/variants_generator/v1/variant.proto +92 -0
  105. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/variants_generator/v1/variants_generator_service.proto +73 -0
  106. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/sdk/definitions.proto +191 -0
  107. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/spi/definitions.proto +187 -0
  108. package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/spi/http_error_status.proto +24 -0
  109. package/@wix/ambassador-dealer-v1-serving-offer/types/package.json +7 -0
  110. package/@wix/bex-bundled-mini-essentials/CHANGELOG.md +4 -0
  111. package/@wix/bex-bundled-mini-essentials/package.json +1 -1
  112. package/package.json +6 -5
@@ -0,0 +1,26 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.personalize.optimization_test.v1.upstream.wix.common;
4
+
5
+ import "wix/api/annotations.proto";
6
+ import "wix/api/validations.proto";
7
+
8
+ option java_multiple_files = true;
9
+ option java_package = "com.wix.personalize.optimization.test.v1.upstream.wix.common";
10
+
11
+ message Sorting {
12
+ option (.wix.api.decomposite_of) = "wix.common.Sorting";
13
+ option (.wix.api.decomposition_minimum_fields) = {
14
+ field: "field_name"
15
+ field: "order"
16
+ };
17
+ // Name of the field to sort by.
18
+ string field_name = 1 [(.wix.api.maxLength) = 512];
19
+ // Sort order.
20
+ SortOrder order = 2;
21
+ }
22
+
23
+ enum SortOrder {
24
+ ASC = 0;
25
+ DESC = 1;
26
+ }
@@ -0,0 +1,406 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.personalize.targeting.v1;
4
+ option java_package = "com.wixpress.personalize.targeting.v1";
5
+
6
+ import "wix/api/validations.proto";
7
+ import "wix/api/entity.proto";
8
+ import "google/protobuf/wrappers.proto";
9
+ import "google/protobuf/struct.proto";
10
+
11
+ /**
12
+ A Targeting represents a decision tree of conditions.
13
+ It uses to decide for each user if he eligible to a targeting.
14
+ Read more about Targeting
15
+ in this [Backoffice Offer Object](https://dev.wix.com/docs/rest/internal-only/internal-tools/dealer-backoffice/offer/backoffice-offer-object).
16
+ */
17
+ message Targeting {
18
+ // flynt-disable missing-extensible
19
+ option (wix.api.entity) = {
20
+ fqdn: "wix.personalize.targeting.v1.targeting"
21
+ appendix_files: {
22
+ type: DOCS_CONF
23
+ path: "appendices/docs"
24
+ }
25
+ segment: USERS
26
+ // The app in dev-center that owns this entity
27
+ app_def_id: "1b0474db-8624-4c90-a853-c624cbcfa118"
28
+ };
29
+
30
+ // Targeting Id
31
+ google.protobuf.StringValue id = 1 [(wix.api.format) = GUID, (wix.api.readOnly) = true];
32
+
33
+ /**
34
+ Revision number, which increments by 1 each time the Targeting is updated.
35
+ To prevent conflicting changes, the current revision must be passed when updating the Targeting.
36
+ Ignored when creating a Targeting.
37
+ */
38
+ google.protobuf.Int64Value revision = 2 [(wix.api.readOnly) = true];
39
+
40
+ // Targeting Tree - holds all targeting criteria
41
+ TargetingTree targeting_tree = 3;
42
+ }
43
+
44
+ // Entity, holding criteria(s) (rules or filters) for dealer runtime rule engine
45
+ // The rule engine decides if targeting eligible to a user or not based on executing these rules
46
+ message TargetingTree {
47
+ // optional current targeting filter execution result (may be set in debug response)
48
+ ExecutionResult execution_result = 1;
49
+
50
+ // Type of the criteria (criteria filter)
51
+ CriteriaType type = 2;
52
+
53
+ // Client use case specific current targeting filter label. For example "v2" for root level targeting of
54
+ // V2 targeting offers. Or "basic.geo" for V2 targeting GEO filter
55
+ google.protobuf.StringValue label = 3 [(wix.api.maxLength) = 100];
56
+
57
+ // If `true` this targeting result is NOT(criteria result)
58
+ google.protobuf.BoolValue negate = 4;
59
+
60
+ // Specific criteria message, according to CriteriaType.
61
+ // Each criteria including top level criteria is a rule for dealer rule engine
62
+ // to execute and get result (true — request does satisfy the criteria, false — does not).
63
+ //
64
+ // Different criteria types represent different kind of rules.
65
+ // For example UserRoleCriteria checks if user is owner of metasite or not,
66
+ // geo criteria checks user location geo etc.
67
+ oneof criteria {
68
+ option (.wix.api.aligned_with_enum) = {
69
+ field: "type";
70
+ suffix: "criteria";
71
+ };
72
+ // The compound of a user
73
+ CompoundCriteria compound_criteria = 11;
74
+ // A custom filter for targeting
75
+ CustomCriteria custom_criteria = 12;
76
+ // Country of the user
77
+ ListCriteria geo_criteria = 13;
78
+ // Language of the user
79
+ ListCriteria language_criteria = 14;
80
+ // Filter based on "owner" vs "contributor"
81
+ UserRoleCriteria user_role_criteria = 15;
82
+ // User color
83
+ ListCriteria user_colors_criteria = 16;
84
+ // List of user guids
85
+ ListCriteria user_guids_criteria = 17;
86
+ // List of connected domains
87
+ ConnectedDomainCriteria connected_domain_criteria = 18;
88
+ // Premium plan status of the user
89
+ PremiumPlanCriteria premium_plan_criteria = 19;
90
+ // Whether this site has added a mailbox
91
+ MailboxCriteria mailbox_criteria = 20;
92
+ // Whether a specific app is currently installed on this site
93
+ ListCriteria installed_apps_criteria = 21;
94
+ // Sites connected to a family of products such as combo, VIP, or unlimited
95
+ ListCriteria product_groups_criteria = 22;
96
+ // Users eligible for mailbox discounts
97
+ ListCriteria mailbox_sale_criteria = 23;
98
+ // Users who have 1 or more sites that are not connected to a premium plan
99
+ FreeSiteCriteria free_site_criteria = 24;
100
+ // Criteria brand
101
+ BrandsCriteria brand_criteria = 25;
102
+ // Criteria custom params
103
+ CustomParamCriteria custom_param_criteria = 26;
104
+ // List of criteria audiences
105
+ ListCriteria audience_criteria = 27;
106
+ // Whether the default Package Picker tab is "Business" or "Website"
107
+ PremiumLandingTabCriteria premium_landing_tab_criteria = 28;
108
+ // Users who have 1 or more sites that are connected to premium
109
+ PremiumAccountCriteria premium_account_criteria = 29;
110
+ // Eligible for sale
111
+ EligibleForSaleCriteria eligible_for_sale_criteria = 30;
112
+ // External_criteria
113
+ ExternalCriteria external_criteria = 31;
114
+ // SiteType criteria
115
+ SiteTypeCriteria site_type_criteria = 32;
116
+ }
117
+ }
118
+
119
+ // CriteriaType - the type of criteria.
120
+ enum CriteriaType {
121
+ // Unknown criteria type.
122
+ UNKNOWN_CRITERIA_TYPE = 0;
123
+ // Compound criteria type - contain criteria array in children property.
124
+ COMPOUND = 1;
125
+ // Custom criteria type - Used for comparing user/site BI Profile values.
126
+ CUSTOM = 2;
127
+ // Geo criteria type - Used for geo targeting.
128
+ GEO = 3;
129
+ // User language criteria type - Used for language targeting.
130
+ LANGUAGE = 4;
131
+ // User role criteria type - Used for role targeting.
132
+ USER_ROLE = 5;
133
+ USER_COLORS = 6;
134
+ USER_GUIDS = 7;
135
+ CONNECTED_DOMAIN = 8;
136
+ PREMIUM_PLAN = 9;
137
+ MAILBOX = 10;
138
+ INSTALLED_APPS = 11;
139
+ PRODUCT_GROUPS = 12;
140
+ MAILBOX_SALE = 13;
141
+ FREE_SITE = 14;
142
+ BRAND = 15;
143
+ CUSTOM_PARAM = 16;
144
+ AUDIENCE = 17;
145
+ PREMIUM_LANDING_TAB = 18;
146
+ PREMIUM_ACCOUNT = 19;
147
+ ELIGIBLE_FOR_SALE = 20;
148
+ EXTERNAL = 21;
149
+ SITE_TYPE = 22;
150
+ }
151
+
152
+ // Generic message for debug execution results.
153
+ // Used for specific targeting criteria
154
+ message ExecutionResult {
155
+ // if current criteria is applicable/eligible/valid
156
+ bool success = 1;
157
+ // if set - it's JSON with either string, date utc string, boolean, array or object
158
+ // depends on specific filter/criteria the result is calculated
159
+ google.protobuf.StringValue current_value = 2 [(wix.api.maxLength) = 100];
160
+ }
161
+
162
+ // Aggregate criteria for AND/OR tree like structures
163
+ message CompoundCriteria {
164
+ enum Operator {
165
+ UNKNOWN_OPERATOR = 0;
166
+ OR = 1;
167
+ AND = 2;
168
+ }
169
+ // Operator
170
+ Operator operator = 1;
171
+ // List of targeting
172
+ repeated TargetingTree children = 2 [(.wix.api.maxSize) = 10000];
173
+ }
174
+
175
+ // Criteria for targeting rules based on profile service data
176
+ message CustomCriteria {
177
+ enum CustomDataSource {
178
+ UNKNOWN_CUSTOM_DATA_SOURCE = 0;
179
+ USER_PROFILE = 1;
180
+ SITE_PROFILE = 2;
181
+ ACCOUNT_PROFILE = 3;
182
+ }
183
+
184
+ // BI profile filter operator
185
+ message CustomOperator {
186
+ enum FieldType {
187
+ UNKNOWN_FIELD_TYPE = 0;
188
+ NUMBER = 1;
189
+ STRING = 2;
190
+ LIST = 3;
191
+ TIMESTAMP = 4;
192
+ BOOLEAN = 5;
193
+ }
194
+
195
+ enum Comparator {
196
+ UNKNOWN_COMPARATOR = 0;
197
+ EQUAL = 1;
198
+ CONTAINED_IN = 2;
199
+ CONTAINS_SOME = 3;
200
+ CONTAINS_NONE = 4;
201
+ NOT_CONTAINS = 5;
202
+ NOT_CONTAINED_IN = 6;
203
+ BE_NOTHING = 7;
204
+ EXISTS = 8;
205
+ MORE_THAN_DAYS = 9;
206
+ WITHIN_DAYS = 10;
207
+ LESS = 11;
208
+ LESS_EQUAL = 12;
209
+ GREATER = 13;
210
+ GREATER_EQUAL = 14;
211
+ SIZE_LESS_EQUAL = 15;
212
+ SIZE_GREATER_EQUAL = 16;
213
+ NOT_EQUAL = 17;
214
+ }
215
+
216
+ // BI field data type
217
+ FieldType field_type = 1;
218
+
219
+ // Expected value to be found in BI profile
220
+ google.protobuf.StringValue expected_value = 2 [(wix.api.maxLength) = 2000];
221
+
222
+ // Comparator to apply to value (i.e. if BI value EQUALS, LESS, GREATER than expected value etc.)
223
+ Comparator comparator = 3;
224
+ }
225
+
226
+ // Id field - string
227
+ string field_id = 1 [(wix.api.maxLength) = 100];
228
+ // Data_source
229
+ CustomDataSource data_source = 2;
230
+ // Operator
231
+ CustomOperator operator = 3;
232
+ // List of restrictions
233
+ CustomOperator list_restriction = 4;
234
+ }
235
+
236
+ // Generic filter for list of included/excluded values
237
+ message ListCriteria {
238
+ // List of criteria values
239
+ repeated string values = 1 [(.wix.api.maxSize) = 1000, (wix.api.maxLength) = 100];
240
+ // Is included - boolean
241
+ bool included = 2;
242
+ }
243
+
244
+ // Filter for targeting based on premium plan eligibility
245
+ message PremiumPlanCriteria {
246
+ enum Plan {
247
+ UNKNOWN_PLAN = 0;
248
+ PREMIUM = 1;
249
+ NONE = 2;
250
+ }
251
+ // List of products number
252
+ repeated int32 products = 1 [(.wix.api.maxSize) = 10000];
253
+ // The user plan
254
+ Plan plan = 2;
255
+ }
256
+
257
+ // Filter for MetaSite ownership rules
258
+ message UserRoleCriteria {
259
+ enum Value {
260
+ UNKNOWN_VALUE = 0;
261
+ OWNER = 1;
262
+ NOT_OWNER = 2;
263
+ }
264
+ // User role criteria
265
+ Value value = 1;
266
+ }
267
+
268
+ // Filter for Premium Landing Tab types
269
+ message PremiumLandingTabCriteria {
270
+ enum Value {
271
+ UNKNOWN_VALUE = 0;
272
+ WEBSITE = 1;
273
+ BUSINESS = 2;
274
+ }
275
+ // Landing tab criteria
276
+ Value value = 1;
277
+ }
278
+
279
+ // Filter for MetaSite domain validations
280
+ message ConnectedDomainCriteria {
281
+ enum Value {
282
+ UNKNOWN_VALUE = 0;
283
+ CONNECTED = 1;
284
+ NOT_CONNECTED = 2;
285
+ }
286
+ // Connected domain criteria
287
+ Value value = 1;
288
+ }
289
+
290
+ // Filter for MetaSite mailbox validations
291
+ message MailboxCriteria {
292
+ enum Value {
293
+ UNKNOWN_VALUE = 0;
294
+ HAS_MAILBOX = 1;
295
+ NO_MAILBOX = 2;
296
+ }
297
+ // Mailbox criteria
298
+ Value value = 1;
299
+ }
300
+
301
+ // Site level filter - is free site or not
302
+ message FreeSiteCriteria {
303
+ enum Value {
304
+ UNKNOWN_VALUE = 0;
305
+ HAS_FREE = 1;
306
+ NO_FREE = 2;
307
+ }
308
+ // FreeSite criteria
309
+ Value value = 1;
310
+ }
311
+
312
+ // Filter for list of brands
313
+ message BrandsCriteria {
314
+ enum Brand {
315
+ UNKNOWN_BRAND = 0;
316
+ WIX = 1;
317
+ EDITORX = 2;
318
+ DAYFUL = 3;
319
+ STUDIO = 4;
320
+ WIXEL = 5;
321
+ RISE = 6;
322
+ WIXVIBE = 7;
323
+ }
324
+ // List of brands
325
+ repeated Brand values = 1 [(.wix.api.maxSize) = 10];
326
+ // Brand included status
327
+ bool included = 2;
328
+ }
329
+
330
+ // Filter for list of site types.
331
+ message SiteTypeCriteria {
332
+ // SiteType options
333
+ enum SiteType {
334
+ UNKNOWN_SITE_TYPE = 0;
335
+ REGULAR = 1;
336
+ HEADLESS = 2;
337
+ }
338
+ // Array of siteType options
339
+ repeated SiteType values = 1 [(.wix.api.minSize) = 1, (.wix.api.maxSize) = 10];
340
+ // isIncluded bool
341
+ bool included = 2;
342
+ }
343
+
344
+ // Filter for list of custom params - comes from the request.
345
+ message CustomParamCriteria {
346
+ enum CustomParamOperator {
347
+ UNKNOWN_CUSTOM_PARAM_OPERATOR = 0;
348
+ EQUALS = 1;
349
+ CONTAINS_ALL = 2;
350
+ CONTAINS_ANY = 3;
351
+ EXISTS = 4;
352
+ }
353
+ // Custom param operator
354
+ CustomParamOperator operator = 1;
355
+ // Key of criteria
356
+ google.protobuf.StringValue key = 2 [(wix.api.maxLength) = 100];
357
+ // List of criteria values
358
+ repeated google.protobuf.StringValue values = 3 [(.wix.api.maxSize) = 100, (wix.api.maxLength) = 100];
359
+ }
360
+
361
+ message PremiumAccountCriteria {
362
+ enum Value {
363
+ UNKNOWN_VALUE = 0;
364
+ IS_PREMIUM = 1;
365
+ IS_NOT_PREMIUM = 2;
366
+ }
367
+ // Premium account criteria
368
+ Value value = 1;
369
+ }
370
+
371
+ // Filter for external criteria
372
+ // implemented by external services
373
+ message ExternalCriteria {
374
+ enum ConditionType {
375
+ UNKNOWN_CONDITION_TYPE = 0;
376
+ EQUAL = 1;
377
+ GREATER_THAN = 2;
378
+ SMALLER_THAN = 3;
379
+ }
380
+ // Artifact name
381
+ google.protobuf.StringValue artifact_name = 1 [(wix.api.maxLength) = 100];
382
+ // External criteria - condition type
383
+ ConditionType condition_type = 2;
384
+ // External criteria - expected value
385
+ google.protobuf.Value expected_value = 3; // This should be validated against ResponseType and ConditionType
386
+ // External criteria - additional params
387
+ google.protobuf.Struct additional_params = 4;
388
+ }
389
+
390
+ // Filter for targeting based on product groups
391
+ message EligibleForSaleCriteria {
392
+ enum Value {
393
+ UNKNOWN_VALUE = 0;
394
+ NONE = 1;
395
+ SEASONAL = 2;
396
+ PERSONAL = 3;
397
+ CUSTOM = 4;
398
+ }
399
+ // EligibleForSale criteria value
400
+ Value value = 1;
401
+ // CustomSale value
402
+ google.protobuf.StringValue custom_sale = 2 [(wix.api.maxLength) = 100];
403
+ // Product id - guid
404
+ string product_type_id = 3 [(.wix.api.format) = GUID];
405
+ }
406
+ ;
@@ -0,0 +1,247 @@
1
+ syntax = "proto3";
2
+
3
+ package wix.personalize.targeting.v1;
4
+ option java_package = "com.wixpress.personalize.targeting.v1";
5
+
6
+ import "google/api/annotations.proto";
7
+ import "google/protobuf/wrappers.proto";
8
+ import "wix/api/annotations.proto";
9
+ import "wix/api/callback.proto";
10
+ import "wix/api/entity.proto";
11
+ import "wix/api/permissions.proto";
12
+ import "wix/api/validations.proto";
13
+ import "wix/personalize/targeting/v1/targeting.proto";
14
+
15
+ service TargetingService {
16
+ option (wix.api.service_maturity) = ALPHA;
17
+ option (wix.api.service_exposure) = INTERNAL;
18
+ option (wix.api.service_entity).message = "wix.personalize.targeting.v1.Targeting";
19
+
20
+ /**
21
+ Creates a Targeting.
22
+
23
+ The request body must include targetingTree.
24
+ */
25
+ rpc CreateTargeting (CreateTargetingRequest) returns (CreateTargetingResponse) {
26
+ option (google.api.http).post = "/v1/targetings";
27
+ option (wix.api.permission).name = "DEALER.TARGETING_CREATE";
28
+ option (wix.api.required) = "CreateTargetingRequest.targeting";
29
+ option (wix.api.required) = "CreateTargetingRequest.targeting.targeting_tree";
30
+ option (wix.api.crud) = {
31
+ method: CREATE
32
+ create_options: {
33
+ item_field: "targeting"
34
+ }
35
+ };
36
+ option (wix.api.callback) = {
37
+ event_type: CREATED
38
+ };
39
+ }
40
+
41
+ /**
42
+ Retrieves a Targeting.
43
+ */
44
+ rpc GetTargeting (GetTargetingRequest) returns (GetTargetingResponse) {
45
+ option (google.api.http).get = "/v1/targetings/{targeting_id}";
46
+ option (wix.api.permission).name = "DEALER.TARGETING_READ";
47
+ option (wix.api.required) = "GetTargetingRequest.targeting_id";
48
+ option (wix.api.crud) = {
49
+ method: GET_ITEM
50
+ get_options: {
51
+ id_field: "targeting_id"
52
+ }
53
+ };
54
+ }
55
+
56
+ /**
57
+ Updates a Targeting.
58
+
59
+ Replace the targeting tree of the targeting with the given id.
60
+ Each time the Targeting is updated, `revision` increments by 1.
61
+ The current `revision` must be passed when updating the Targeting.
62
+ This ensures you're working with the latest Targeting
63
+ and prevents unintended overwrites.
64
+ */
65
+ // flynt-disable update-missing-inferred-fieldmask
66
+ rpc UpdateTargeting (UpdateTargetingRequest) returns (UpdateTargetingResponse) {
67
+ option (google.api.http).patch = "/v1/targetings/{targeting.id}";
68
+ option (wix.api.permission).name = "DEALER.TARGETING_UPDATE";
69
+ option (wix.api.required) = "UpdateTargetingRequest.targeting";
70
+ option (wix.api.required) = "UpdateTargetingRequest.targeting.id";
71
+ option (wix.api.required) = "UpdateTargetingRequest.targeting.revision";
72
+ option (wix.api.required) = "UpdateTargetingRequest.targeting.targeting_tree";
73
+ option (wix.api.callback) = {
74
+ event_type: UPDATED
75
+ };
76
+ option (wix.api.crud) = {
77
+ method: UPDATE,
78
+ update_options: {
79
+ item_field: "targeting"
80
+ }
81
+ };
82
+ }
83
+
84
+ /**
85
+ Deletes a Targeting.
86
+
87
+ Deleting a Targeting permanently removes them from the Targeting List.
88
+ */
89
+ rpc DeleteTargeting (DeleteTargetingRequest) returns (DeleteTargetingResponse) {
90
+ option (google.api.http).delete = "/v1/targetings/{targeting_id}";
91
+ // TODO: create this new permission in permission catalog
92
+ option (wix.api.permission).name = "DEALER.TARGETING_DELETE";
93
+ option (wix.api.required) = "DeleteTargetingRequest.targeting_id";
94
+ option (wix.api.callback) = {
95
+ event_type: DELETED
96
+ };
97
+ option (wix.api.crud) = {
98
+ method: DELETE
99
+ delete_options: {
100
+ id_field: "targeting_id"
101
+ }
102
+ };
103
+ }
104
+
105
+ /**
106
+ Retrieves a list of Targetings.
107
+
108
+ Up to 100 Targetings can be returned per request.
109
+ */
110
+ rpc ListTargetings (ListTargetingsRequest) returns (ListTargetingsResponse) {
111
+ option (google.api.http).get = "/v1/targetings";
112
+ option (wix.api.permission).name = "DEALER.TARGETING_READ";
113
+ option (wix.api.crud) = {
114
+ method: LIST,
115
+ list_options: {
116
+ ids_field: "targeting_ids",
117
+ items_field: "targetings"
118
+ }
119
+ };
120
+ }
121
+
122
+ /**
123
+ Apply a valid targeting.
124
+ */
125
+ rpc ApplyTargetings (ApplyTargetingsRequest) returns (ApplyTargetingsResponse) {
126
+ option (google.api.http).post = "/v1/targetings/apply";
127
+ option (wix.api.required) = "ApplyTargetingsRequest.targeting_ids";
128
+ option (wix.api.permission).name = "DEALER.TARGETING_APPLY";
129
+ }
130
+
131
+ /**
132
+ Debug a targeting.
133
+ */
134
+ // flynt-disable missing-permission
135
+ rpc DebugTargeting (DebugTargetingRequest) returns (DebugTargetingResponse) {
136
+ option (google.api.http).post = "/v1/targetings/{targeting_id}/debug";
137
+ option (wix.api.required) = "DebugTargetingRequest.targeting_id";
138
+ // option (wix.api.permission).name = "DEALER.TARGETING_DEBUG";
139
+ }
140
+ }
141
+
142
+ message CreateTargetingRequest {
143
+ // Targeting to be created.
144
+ Targeting targeting = 1;
145
+ }
146
+
147
+ message CreateTargetingResponse {
148
+ // The created Targeting.
149
+ Targeting targeting = 1;
150
+ }
151
+
152
+ message GetTargetingRequest {
153
+ // ID of the Targeting to retrieve.
154
+ string targeting_id = 1 [(wix.api.format) = GUID];
155
+ }
156
+
157
+ message GetTargetingResponse {
158
+ // The requested Targeting
159
+ Targeting targeting = 1;
160
+ }
161
+
162
+ message UpdateTargetingRequest {
163
+ // Targeting with the current id and the updated targeting tree
164
+ Targeting targeting = 1;
165
+ }
166
+
167
+ message UpdateTargetingResponse {
168
+ // Updated Targeting
169
+ Targeting targeting = 1;
170
+ }
171
+
172
+ message DeleteTargetingRequest {
173
+ // Id of the Targeting to delete
174
+ string targeting_id = 1 [(wix.api.format) = GUID];
175
+ }
176
+
177
+ message DeleteTargetingResponse {
178
+ }
179
+
180
+ message ListTargetingsRequest {
181
+ // List of targeting IDs to query
182
+ repeated string targeting_ids = 1 [(wix.api.format) = GUID, (.wix.api.minSize) = 1, (.wix.api.maxSize) = 100];
183
+ }
184
+
185
+ message ListTargetingsResponse {
186
+ // List of targeting based on the query
187
+ repeated Targeting targetings = 1 [(.wix.api.maxSize) = 100];
188
+ }
189
+
190
+ message UpdateExtendedFieldsResponse {
191
+ // Updated Targeting
192
+ Targeting targeting = 1;
193
+ }
194
+
195
+ // Custom params object used as additional data input for runtime/debug endpoint calls.
196
+ message RequestCustomParam {
197
+ // unique key for custom param
198
+ google.protobuf.StringValue key = 1 [(wix.api.maxLength) = 1000];
199
+
200
+ // current request value or values for given key
201
+ repeated google.protobuf.StringValue values = 2 [(wix.api.maxSize) = 1000, (wix.api.maxLength) = 1000];
202
+ }
203
+
204
+ message IsApplicable {
205
+ // unique targeting id
206
+ string targeting_id = 1 [(wix.api.format) = GUID];
207
+ // indicating whether targeting is applicable
208
+ bool applicable = 2;
209
+ }
210
+
211
+ message ApplyTargetingsRequest {
212
+ // A list of targeting ids
213
+ repeated string targeting_ids = 1 [(wix.api.format) = GUID, (wix.api.minSize) = 1, (wix.api.maxSize) = 1000];
214
+
215
+ // List of custom param's values, some offers are targeted by those values. Optional
216
+ repeated RequestCustomParam request_custom_params = 2 [(wix.api.maxSize) = 1000];
217
+ }
218
+
219
+ message ApplyTargetingsResponse {
220
+ // Return a list of boolean values indicating whether targeting is applicable or not.
221
+ repeated IsApplicable is_applicable = 1 [(wix.api.maxSize) = 1000];
222
+ }
223
+
224
+ // Impersonation info for debugTargeting - language, geo
225
+ message UserContextOverride {
226
+ // User geo
227
+ google.protobuf.StringValue geo = 1 [(wix.api.format) = COUNTRY];
228
+
229
+ // User language
230
+ google.protobuf.StringValue language = 2 [(wix.api.format) = LANGUAGE];
231
+ }
232
+
233
+ message DebugTargetingRequest {
234
+ // Targeting_id of a specific targeting
235
+ string targeting_id = 1 [(wix.api.format) = GUID];
236
+
237
+ // List of custom param's values, some offers are targeted by those values. Optional
238
+ repeated RequestCustomParam request_custom_params = 2 [(wix.api.maxSize) = 1000];
239
+
240
+ // Impersonation info of the user - language, geo
241
+ UserContextOverride user_context_override = 3;
242
+ }
243
+
244
+ message DebugTargetingResponse {
245
+ // Return the targeting to debug
246
+ Targeting targeting = 1;
247
+ }