@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.
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/builders.impl.d.ts +115 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/builders.impl.js +1340 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/builders.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/http.impl.d.ts +29 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/http.impl.js +524 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/http.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/meta.impl.d.ts +20 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/meta.impl.js +119 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/meta.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/client/proto-generated.d.ts +18874 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/client/proto-generated.js +2 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/proto-generated.d.ts +9468 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/proto-generated.js +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/server/proto-generated.d.ts +18788 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/proto/server/proto-generated.js +2 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/rpc.impl.d.ts +39 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/rpc.impl.js +113 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/rpc.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/types.impl.d.ts +1248 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/types.impl.js +371 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/cjs/types.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/builders.impl.d.ts +115 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/builders.impl.js +1209 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/builders.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/http.impl.d.ts +29 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/http.impl.js +516 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/http.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/meta.impl.d.ts +20 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/meta.impl.js +92 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/meta.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/rpc.impl.d.ts +39 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/rpc.impl.js +86 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/rpc.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/types.impl.d.ts +1248 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/types.impl.js +368 -0
- package/@wix/ambassador-dealer-v1-serving-offer/build/es/types.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-serving-offer/builders/package.json +7 -0
- package/@wix/ambassador-dealer-v1-serving-offer/http/package.json +7 -0
- package/@wix/ambassador-dealer-v1-serving-offer/meta/package.json +7 -0
- package/@wix/ambassador-dealer-v1-serving-offer/package.json +52 -0
- package/@wix/ambassador-dealer-v1-serving-offer/rpc/package.json +6 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiment_properties.proto +46 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiment_results.proto +39 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiment_support_kpis.proto +29 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/experiments_properties_thin.proto +31 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/abtest/v2/wixab_service.proto +81 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/action_payload.proto +33 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/annotations.proto +451 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/api_errors.proto +142 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/callback.proto +163 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/context.proto +19 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/entity.proto +127 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/errors.proto +127 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/idempotency.proto +25 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/permissions.proto +46 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/sla.proto +24 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/subscription.proto +32 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/api/validations.proto +142 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/address.proto +148 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/bulk.proto +53 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/data/dataextensions/extended-fields.proto +20 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/data/dataextensions/update-extended-fields-messages.proto +15 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/data/errors.proto +435 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/identification.proto +40 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/image.proto +8 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/media.proto +280 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/money.proto +32 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/pageurl.proto +32 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/paging.proto +121 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/query.proto +812 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/sorting.proto +36 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/spi.proto +85 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/tags.proto +55 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/common/wixlink.proto +203 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/audiences.proto +226 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/campaigns.proto +270 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/frequency-caps.proto +74 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/localization-managers.proto +11 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/managers.proto +11 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/offer-test.proto +338 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/offer.proto +298 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/offers-service.proto +696 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/placements.proto +423 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/schemas-service.proto +142 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/targeting.proto +378 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/upstream/wix/common/paging.proto +126 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/upstream/wix/common/query.proto +840 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerBackoffice/api/v1/upstream/wix/common/sorting.proto +37 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerOffersServing/api/v1/dealer-offers-debug.proto +188 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerOffersServing/api/v1/dealer-offers-serving.proto +177 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerOffersServing/api/v1/offer.proto +87 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerPriority/api/v1/priority-service.proto +57 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/dealerPriority/api/v1/priority.proto +132 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/graphql/definitions.proto +13 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/http/field_mask.proto +46 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/optimization_tester_service.proto +284 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/test.proto +170 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/bulk.proto +56 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/paging.proto +121 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/query.proto +741 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/optimization_test/v1/upstream/wix/common/sorting.proto +26 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/targeting/v1/targeting.proto +406 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/targeting/v1/targeting_service.proto +247 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/variants_generator/v1/variant.proto +92 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/personalize/variants_generator/v1/variants_generator_service.proto +73 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/sdk/definitions.proto +191 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/spi/definitions.proto +187 -0
- package/@wix/ambassador-dealer-v1-serving-offer/src/main/proto/wix/spi/http_error_status.proto +24 -0
- package/@wix/ambassador-dealer-v1-serving-offer/types/package.json +7 -0
- package/@wix/bex-bundled-mini-essentials/CHANGELOG.md +4 -0
- package/@wix/bex-bundled-mini-essentials/package.json +1 -1
- package/package.json +6 -5
|
@@ -0,0 +1,1248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main dealer runtime entity. Always belongs to some placement (real estate) and represents specific set of data
|
|
3
|
+
* intended to be returned conditionally from dealer runtime for given input (user, aspects, time etc.).
|
|
4
|
+
* Main source of the conditions is targeting property, which holds the rules.
|
|
5
|
+
*/
|
|
6
|
+
export interface Offer {
|
|
7
|
+
/**
|
|
8
|
+
* Unique offer id
|
|
9
|
+
* @format GUID
|
|
10
|
+
*/
|
|
11
|
+
offerGuid?: string;
|
|
12
|
+
/** Dealer real estate (placement) id */
|
|
13
|
+
realEstateId?: string;
|
|
14
|
+
/** Backoffice name of offer (not needed for users, but needed for PMMs to distinguish one offer from another in BO UI) */
|
|
15
|
+
offerName?: string;
|
|
16
|
+
/** Offer data payload (actual things clients show to user in some form) */
|
|
17
|
+
asset?: Asset;
|
|
18
|
+
/** Dealer campaign this offer belongs to (optional) */
|
|
19
|
+
campaignId?: string | null;
|
|
20
|
+
/** The date the offer was created or scheduled to — not related to date of activation */
|
|
21
|
+
startDate?: Date | null;
|
|
22
|
+
/** The date this offers is intended to stop at */
|
|
23
|
+
endDate?: Date | null;
|
|
24
|
+
/** Prioritziation metadata */
|
|
25
|
+
priorityMetadata?: Record<string, any> | null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Actual offer content to show to user or use by dealer clients. For example strings to show to user in some widget,
|
|
29
|
+
* banner id to show, etc.
|
|
30
|
+
*/
|
|
31
|
+
export interface Asset {
|
|
32
|
+
/**
|
|
33
|
+
* DEPRECATED - The personlized content for the user - json string
|
|
34
|
+
* The field wont be avilable for new placements that were created after 8.11
|
|
35
|
+
*/
|
|
36
|
+
payloadJson?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Key<->Value dynamic params defined in BO
|
|
39
|
+
* the key is the interpolation key and the value is stringify json
|
|
40
|
+
* for example {myKeyWithMail:"'menir@wix.com'", keyWithNumberValue:"55", keyWithBool:"false"}
|
|
41
|
+
* in client side you will need to json parse in order to get correct data types.
|
|
42
|
+
* Returns only dynamic params that has some value
|
|
43
|
+
*/
|
|
44
|
+
dynamicParams?: Record<string, string>;
|
|
45
|
+
/**
|
|
46
|
+
* The personlized and localized content for the user - json object mataching the placement schema.
|
|
47
|
+
* Avilable only on new placements that were created after 8.11 or on placement that were migrated to use new creative infra
|
|
48
|
+
*/
|
|
49
|
+
creative?: Record<string, any> | null;
|
|
50
|
+
}
|
|
51
|
+
/** Input params for evaluating an offer. */
|
|
52
|
+
export interface DebugOfferRequest {
|
|
53
|
+
/** Offer guid to debug */
|
|
54
|
+
offerId: string;
|
|
55
|
+
/** Explicit request params. Required. */
|
|
56
|
+
context?: RequestContext;
|
|
57
|
+
/** List of custom param's values, some offers are targeted by those values. Optional. */
|
|
58
|
+
customParams?: CustomParam[];
|
|
59
|
+
}
|
|
60
|
+
/** Explicit context to simulate real user requests to runtime. */
|
|
61
|
+
export interface RequestContext {
|
|
62
|
+
/**
|
|
63
|
+
* User guid. Optional.
|
|
64
|
+
* @format GUID
|
|
65
|
+
*/
|
|
66
|
+
userId?: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* Target account. Optional.
|
|
69
|
+
* @format GUID
|
|
70
|
+
*/
|
|
71
|
+
targetAccountId?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Logged in account. Optional.
|
|
74
|
+
* @format GUID
|
|
75
|
+
*/
|
|
76
|
+
loggedInAccountId?: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* Metasite id. Optional.
|
|
79
|
+
* @format GUID
|
|
80
|
+
*/
|
|
81
|
+
siteId?: string | null;
|
|
82
|
+
/** User's two letters geo ("il", "us") */
|
|
83
|
+
geo?: string | null;
|
|
84
|
+
/** User's two letters language ("en", "fr") */
|
|
85
|
+
language?: string | null;
|
|
86
|
+
/** Nile targeting brand */
|
|
87
|
+
brandValue?: BrandsCriteriaBrand;
|
|
88
|
+
}
|
|
89
|
+
export declare enum BrandsCriteriaBrand {
|
|
90
|
+
UNKNOWN_BRAND = "UNKNOWN_BRAND",
|
|
91
|
+
WIX = "WIX",
|
|
92
|
+
EDITORX = "EDITORX",
|
|
93
|
+
DAYFUL = "DAYFUL",
|
|
94
|
+
STUDIO = "STUDIO",
|
|
95
|
+
WIXEL = "WIXEL",
|
|
96
|
+
RISE = "RISE",
|
|
97
|
+
WIXVIBE = "WIXVIBE"
|
|
98
|
+
}
|
|
99
|
+
/** Custom params object used as additional data input for runtime/debug endpoint calls. */
|
|
100
|
+
export interface CustomParam {
|
|
101
|
+
/** unique key for custom param */
|
|
102
|
+
key?: string | null;
|
|
103
|
+
/** current request value or values for given key */
|
|
104
|
+
values?: string[] | null;
|
|
105
|
+
}
|
|
106
|
+
export interface DebugOfferResponse {
|
|
107
|
+
/** Offer being inspected */
|
|
108
|
+
offer?: Offer;
|
|
109
|
+
/**
|
|
110
|
+
* Offer targeting tree inflated with execution results
|
|
111
|
+
* @deprecated Offer targeting tree inflated with execution results
|
|
112
|
+
* @replacedBy targeting_tree
|
|
113
|
+
* @targetRemovalDate 2024-09-01
|
|
114
|
+
*/
|
|
115
|
+
targeting?: Targeting;
|
|
116
|
+
/** General release rules results such as experiment and offer status */
|
|
117
|
+
releaseAudience?: ReleaseAudience;
|
|
118
|
+
/** Debug results for this offer frequency caps (null if no FC applicable) */
|
|
119
|
+
frequencyCapsExecutionResult?: FrequencyCapsExecutionResult;
|
|
120
|
+
/** Nile targeting tree with execution results */
|
|
121
|
+
targetingTree?: TargetingTree;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Entity, holding criteria(s) (rules or filters) for dealer runtime rule engine.
|
|
125
|
+
* The rule engine decides if each offer is available to a user or not based on executing these rules
|
|
126
|
+
* in real time.
|
|
127
|
+
*
|
|
128
|
+
* Generally it's a rule engine rules tree structure referencing itself. Actual structure depends on UI constraints.
|
|
129
|
+
*
|
|
130
|
+
* Optional execution_result field for each filter in the tree holds current rule execution results.
|
|
131
|
+
* It's not empty only for offers coming from debug endpoints.
|
|
132
|
+
*/
|
|
133
|
+
export interface Targeting extends TargetingCriteriaOneOf {
|
|
134
|
+
compound?: CompoundCriteria;
|
|
135
|
+
customFilter?: CustomFilterCriteria;
|
|
136
|
+
geo?: ListCriteria;
|
|
137
|
+
language?: ListCriteria;
|
|
138
|
+
userRole?: UserRoleCriteria;
|
|
139
|
+
/** deprecated */
|
|
140
|
+
userStatus?: UserStatusCriteria;
|
|
141
|
+
/** deprecated */
|
|
142
|
+
userColors?: ListCriteria;
|
|
143
|
+
userGuids?: ListCriteria;
|
|
144
|
+
/** deprecated */
|
|
145
|
+
templateGuids?: ListCriteria;
|
|
146
|
+
/** deprecated */
|
|
147
|
+
postReg?: ListCriteria;
|
|
148
|
+
connectedDomain?: ConnectedDomainCriteria;
|
|
149
|
+
premiumPlan?: PremiumPlanCriteria;
|
|
150
|
+
/** deprecated */
|
|
151
|
+
excludeInSale?: boolean | null;
|
|
152
|
+
mailbox?: MailboxCriteria;
|
|
153
|
+
connectedOfferingGroup?: ListCriteria;
|
|
154
|
+
installedApps?: ListCriteria;
|
|
155
|
+
productGroups?: ListCriteria;
|
|
156
|
+
/** deprecated */
|
|
157
|
+
domainLength?: DomainLengthCriteria;
|
|
158
|
+
mailboxSale?: ListCriteria;
|
|
159
|
+
vouchers?: ListCriteria;
|
|
160
|
+
/** deprecated */
|
|
161
|
+
freeSite?: FreeSiteCriteria;
|
|
162
|
+
brand?: BrandsCriteria;
|
|
163
|
+
/**
|
|
164
|
+
* petri spec conducted on runtime and determines if the offer will be retuned to the end user
|
|
165
|
+
* the spec is conducted only after the user was eligable for all targeting rules
|
|
166
|
+
*/
|
|
167
|
+
experiment?: ExperimentCriteria;
|
|
168
|
+
customParam?: CustomParamCriteria;
|
|
169
|
+
audience?: ListCriteria;
|
|
170
|
+
premiumLandingTab?: PremiumLandingTabCriteria;
|
|
171
|
+
premiumAccount?: PremiumAccountCriteria;
|
|
172
|
+
eligibleForSale?: EligibleForSaleCriteria;
|
|
173
|
+
externalCriteria?: ExternalCriteria;
|
|
174
|
+
siteType?: SiteTypeCriteria;
|
|
175
|
+
/** optional current targeting filter execution result (may be set in debug response) */
|
|
176
|
+
executionResult?: ExecutionResult;
|
|
177
|
+
/** Type of the criteria (criteria filter) */
|
|
178
|
+
type?: CriteriaType;
|
|
179
|
+
/**
|
|
180
|
+
* Client usecase specific current targeting filter label. For example "v2" for root level targeting of
|
|
181
|
+
* V2 targeting offers. Or "basic.geo" for V2 targeting GEO filter.
|
|
182
|
+
*/
|
|
183
|
+
label?: string | null;
|
|
184
|
+
/** If `true` this targeting result is NOT(criteria result) */
|
|
185
|
+
negate?: boolean | null;
|
|
186
|
+
}
|
|
187
|
+
/** @oneof */
|
|
188
|
+
export interface TargetingCriteriaOneOf {
|
|
189
|
+
compound?: CompoundCriteria;
|
|
190
|
+
customFilter?: CustomFilterCriteria;
|
|
191
|
+
geo?: ListCriteria;
|
|
192
|
+
language?: ListCriteria;
|
|
193
|
+
userRole?: UserRoleCriteria;
|
|
194
|
+
/** deprecated */
|
|
195
|
+
userStatus?: UserStatusCriteria;
|
|
196
|
+
/** deprecated */
|
|
197
|
+
userColors?: ListCriteria;
|
|
198
|
+
userGuids?: ListCriteria;
|
|
199
|
+
/** deprecated */
|
|
200
|
+
templateGuids?: ListCriteria;
|
|
201
|
+
/** deprecated */
|
|
202
|
+
postReg?: ListCriteria;
|
|
203
|
+
connectedDomain?: ConnectedDomainCriteria;
|
|
204
|
+
premiumPlan?: PremiumPlanCriteria;
|
|
205
|
+
/** deprecated */
|
|
206
|
+
excludeInSale?: boolean | null;
|
|
207
|
+
mailbox?: MailboxCriteria;
|
|
208
|
+
connectedOfferingGroup?: ListCriteria;
|
|
209
|
+
installedApps?: ListCriteria;
|
|
210
|
+
productGroups?: ListCriteria;
|
|
211
|
+
/** deprecated */
|
|
212
|
+
domainLength?: DomainLengthCriteria;
|
|
213
|
+
mailboxSale?: ListCriteria;
|
|
214
|
+
vouchers?: ListCriteria;
|
|
215
|
+
/** deprecated */
|
|
216
|
+
freeSite?: FreeSiteCriteria;
|
|
217
|
+
brand?: BrandsCriteria;
|
|
218
|
+
/**
|
|
219
|
+
* petri spec conducted on runtime and determines if the offer will be retuned to the end user
|
|
220
|
+
* the spec is conducted only after the user was eligable for all targeting rules
|
|
221
|
+
*/
|
|
222
|
+
experiment?: ExperimentCriteria;
|
|
223
|
+
customParam?: CustomParamCriteria;
|
|
224
|
+
audience?: ListCriteria;
|
|
225
|
+
premiumLandingTab?: PremiumLandingTabCriteria;
|
|
226
|
+
premiumAccount?: PremiumAccountCriteria;
|
|
227
|
+
eligibleForSale?: EligibleForSaleCriteria;
|
|
228
|
+
externalCriteria?: ExternalCriteria;
|
|
229
|
+
siteType?: SiteTypeCriteria;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Generic message for debug execution results.
|
|
233
|
+
* Used for specific targeting criteria
|
|
234
|
+
*/
|
|
235
|
+
export interface ExecutionResult {
|
|
236
|
+
/** if current criteria is applicable/eligible/valid */
|
|
237
|
+
success?: boolean;
|
|
238
|
+
/**
|
|
239
|
+
* if set - it's JSON with either string, date utc string, boolean, array or object
|
|
240
|
+
* depends on specific filter/criteria the result is calculated
|
|
241
|
+
*/
|
|
242
|
+
currentValue?: string | null;
|
|
243
|
+
}
|
|
244
|
+
export declare enum CriteriaType {
|
|
245
|
+
UNKNOWN = "UNKNOWN",
|
|
246
|
+
COMPOUND = "COMPOUND",
|
|
247
|
+
CUSTOM = "CUSTOM",
|
|
248
|
+
GEO = "GEO",
|
|
249
|
+
LANGUAGE = "LANGUAGE",
|
|
250
|
+
USER_ROLE = "USER_ROLE",
|
|
251
|
+
USER_STATUS = "USER_STATUS",
|
|
252
|
+
USER_COLORS = "USER_COLORS",
|
|
253
|
+
USER_GUIDS = "USER_GUIDS",
|
|
254
|
+
TEMPLATE_GUIDS = "TEMPLATE_GUIDS",
|
|
255
|
+
POST_REG = "POST_REG",
|
|
256
|
+
CONNECTED_DOMAIN = "CONNECTED_DOMAIN",
|
|
257
|
+
PREMIUM_PLAN = "PREMIUM_PLAN",
|
|
258
|
+
EXCLUDE_IN_SALE = "EXCLUDE_IN_SALE",
|
|
259
|
+
MAILBOX = "MAILBOX",
|
|
260
|
+
CONNECTED_OFFERING_GROUP = "CONNECTED_OFFERING_GROUP",
|
|
261
|
+
INSTALLED_APPS = "INSTALLED_APPS",
|
|
262
|
+
PRODUCT_GROUPS = "PRODUCT_GROUPS",
|
|
263
|
+
DOMAIN_LENGTH = "DOMAIN_LENGTH",
|
|
264
|
+
MAILBOX_SALE = "MAILBOX_SALE",
|
|
265
|
+
VOUCHERS = "VOUCHERS",
|
|
266
|
+
FREE_SITE = "FREE_SITE",
|
|
267
|
+
BRAND = "BRAND",
|
|
268
|
+
EXPERIMENT = "EXPERIMENT",
|
|
269
|
+
CUSTOM_PARAM = "CUSTOM_PARAM",
|
|
270
|
+
AUDIENCE = "AUDIENCE",
|
|
271
|
+
PREMIUM_LANDING_TAB = "PREMIUM_LANDING_TAB",
|
|
272
|
+
PREMIUM_ACCOUNT = "PREMIUM_ACCOUNT",
|
|
273
|
+
ELIGIBLE_FOR_SALE = "ELIGIBLE_FOR_SALE",
|
|
274
|
+
EXTERNAL_CRITERIA = "EXTERNAL_CRITERIA",
|
|
275
|
+
SITE_TYPE_CRITERIA = "SITE_TYPE_CRITERIA"
|
|
276
|
+
}
|
|
277
|
+
/** Aggregate criteria for AND/OR tree like structures */
|
|
278
|
+
export interface CompoundCriteria {
|
|
279
|
+
operator?: Operator;
|
|
280
|
+
children?: Targeting[];
|
|
281
|
+
}
|
|
282
|
+
export declare enum Operator {
|
|
283
|
+
UNKNOWN = "UNKNOWN",
|
|
284
|
+
OR = "OR",
|
|
285
|
+
AND = "AND"
|
|
286
|
+
}
|
|
287
|
+
/** Criteria for targeting rules based on profile service data */
|
|
288
|
+
export interface CustomFilterCriteria {
|
|
289
|
+
fieldId?: string;
|
|
290
|
+
dataSource?: CustomFilterDataSource;
|
|
291
|
+
operator?: CustomFilterOperator;
|
|
292
|
+
listRestriction?: CustomFilterOperator;
|
|
293
|
+
}
|
|
294
|
+
export declare enum CustomFilterDataSource {
|
|
295
|
+
UNKNOWN = "UNKNOWN",
|
|
296
|
+
USER_PROFILE = "USER_PROFILE",
|
|
297
|
+
SITE_PROFILE = "SITE_PROFILE",
|
|
298
|
+
ACCOUNT_PROFILE = "ACCOUNT_PROFILE"
|
|
299
|
+
}
|
|
300
|
+
/** BI profile filter operator */
|
|
301
|
+
export interface CustomFilterOperator {
|
|
302
|
+
/** BI field data type */
|
|
303
|
+
valueType?: OperatorValueTypeEnum;
|
|
304
|
+
/**
|
|
305
|
+
* Expected value to be found in BI profile
|
|
306
|
+
* @maxLength 2000
|
|
307
|
+
*/
|
|
308
|
+
expectedValue?: string | null;
|
|
309
|
+
/** Comparator to apply to value (i.e. if BI value EQUALS, LESS, GREATER than expected value etc.) */
|
|
310
|
+
comparator?: ComparatorTypeEnum;
|
|
311
|
+
}
|
|
312
|
+
export declare enum OperatorValueTypeEnum {
|
|
313
|
+
UNKNOWN = "UNKNOWN",
|
|
314
|
+
NUMBER = "NUMBER",
|
|
315
|
+
STRING = "STRING",
|
|
316
|
+
LIST = "LIST",
|
|
317
|
+
TIMESTAMP = "TIMESTAMP",
|
|
318
|
+
BOOLEAN = "BOOLEAN"
|
|
319
|
+
}
|
|
320
|
+
export declare enum ComparatorTypeEnum {
|
|
321
|
+
UNKNOWN = "UNKNOWN",
|
|
322
|
+
EQUAL = "EQUAL",
|
|
323
|
+
CONTAINED_IN = "CONTAINED_IN",
|
|
324
|
+
CONTAINS_SOME = "CONTAINS_SOME",
|
|
325
|
+
CONTAINS_NONE = "CONTAINS_NONE",
|
|
326
|
+
NOT_CONTAINS = "NOT_CONTAINS",
|
|
327
|
+
NOT_CONTAINED_IN = "NOT_CONTAINED_IN",
|
|
328
|
+
BE_NOTHING = "BE_NOTHING",
|
|
329
|
+
EXISTS = "EXISTS",
|
|
330
|
+
MORE_THAN_DAYS = "MORE_THAN_DAYS",
|
|
331
|
+
WITHIN_DAYS = "WITHIN_DAYS",
|
|
332
|
+
LESS = "LESS",
|
|
333
|
+
LESS_EQUAL = "LESS_EQUAL",
|
|
334
|
+
GREATER = "GREATER",
|
|
335
|
+
GREATER_EQUAL = "GREATER_EQUAL",
|
|
336
|
+
SIZE_LESS_EQUAL = "SIZE_LESS_EQUAL",
|
|
337
|
+
SIZE_GREATER_EQUAL = "SIZE_GREATER_EQUAL",
|
|
338
|
+
NOT_EQUAL = "NOT_EQUAL"
|
|
339
|
+
}
|
|
340
|
+
/** Generic filter for list of included/excluded values */
|
|
341
|
+
export interface ListCriteria {
|
|
342
|
+
values?: string[];
|
|
343
|
+
included?: boolean;
|
|
344
|
+
}
|
|
345
|
+
/** Filter for metasite ownership rules */
|
|
346
|
+
export interface UserRoleCriteria {
|
|
347
|
+
value?: UserRoleCriteriaEnum;
|
|
348
|
+
}
|
|
349
|
+
export declare enum UserRoleCriteriaEnum {
|
|
350
|
+
UNKNOWN = "UNKNOWN",
|
|
351
|
+
OWNER = "OWNER",
|
|
352
|
+
NOT_OWNER = "NOT_OWNER"
|
|
353
|
+
}
|
|
354
|
+
export interface UserStatusCriteria {
|
|
355
|
+
value?: UserStatusCriteriaEnum;
|
|
356
|
+
}
|
|
357
|
+
export declare enum UserStatusCriteriaEnum {
|
|
358
|
+
UNKNOWN = "UNKNOWN",
|
|
359
|
+
NEW = "NEW"
|
|
360
|
+
}
|
|
361
|
+
/** Filter for metasite domain validations */
|
|
362
|
+
export interface ConnectedDomainCriteria {
|
|
363
|
+
value?: Enum;
|
|
364
|
+
}
|
|
365
|
+
export declare enum Enum {
|
|
366
|
+
UNKNOWN = "UNKNOWN",
|
|
367
|
+
CONNECTED = "CONNECTED",
|
|
368
|
+
NOT_CONNECTED = "NOT_CONNECTED"
|
|
369
|
+
}
|
|
370
|
+
/** Filter for targeting based on premium plan eligibility */
|
|
371
|
+
export interface PremiumPlanCriteria {
|
|
372
|
+
products?: number[];
|
|
373
|
+
plan?: Plan;
|
|
374
|
+
}
|
|
375
|
+
export declare enum Plan {
|
|
376
|
+
UNKNOWN = "UNKNOWN",
|
|
377
|
+
PREMIUM = "PREMIUM",
|
|
378
|
+
NONE = "NONE"
|
|
379
|
+
}
|
|
380
|
+
export interface MailboxCriteria {
|
|
381
|
+
value?: MailboxCriteriaEnum;
|
|
382
|
+
}
|
|
383
|
+
export declare enum MailboxCriteriaEnum {
|
|
384
|
+
UNKNOWN = "UNKNOWN",
|
|
385
|
+
HAS_MAILBOX = "HAS_MAILBOX",
|
|
386
|
+
NO_MAILBOX = "NO_MAILBOX"
|
|
387
|
+
}
|
|
388
|
+
export interface DomainLengthCriteria {
|
|
389
|
+
/**
|
|
390
|
+
* WARNING: bad naming for JS context => hidden bugs
|
|
391
|
+
* For example lodash considers objects with `length` property ArrayLike
|
|
392
|
+
*/
|
|
393
|
+
length?: number;
|
|
394
|
+
shorterOrEqual?: boolean;
|
|
395
|
+
}
|
|
396
|
+
export interface FreeSiteCriteria {
|
|
397
|
+
value?: FreeSiteCriteriaEnum;
|
|
398
|
+
}
|
|
399
|
+
export declare enum FreeSiteCriteriaEnum {
|
|
400
|
+
UNKNOWN = "UNKNOWN",
|
|
401
|
+
HAS_FREE = "HAS_FREE",
|
|
402
|
+
NO_FREE = "NO_FREE"
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Filter for list of brands
|
|
406
|
+
* (i.e. if given offer must be shown to user for "only [wix]",
|
|
407
|
+
* of "only [wix, editorx]", or "except [editorx]" etc.)
|
|
408
|
+
*/
|
|
409
|
+
export interface BrandsCriteria {
|
|
410
|
+
values?: Brand[];
|
|
411
|
+
included?: boolean;
|
|
412
|
+
}
|
|
413
|
+
export declare enum Brand {
|
|
414
|
+
UNKNOWN = "UNKNOWN",
|
|
415
|
+
WIX = "WIX",
|
|
416
|
+
EDITORX = "EDITORX",
|
|
417
|
+
DAYFUL = "DAYFUL",
|
|
418
|
+
STUDIO = "STUDIO"
|
|
419
|
+
}
|
|
420
|
+
export interface ExperimentCriteria {
|
|
421
|
+
spec?: string | null;
|
|
422
|
+
value?: string | null;
|
|
423
|
+
}
|
|
424
|
+
export interface CustomParamCriteria {
|
|
425
|
+
operator?: CustomParamOperator;
|
|
426
|
+
key?: string | null;
|
|
427
|
+
values?: string[] | null;
|
|
428
|
+
criteriaMetaData?: CriteriaMetaData;
|
|
429
|
+
}
|
|
430
|
+
export declare enum CustomParamOperator {
|
|
431
|
+
UNKNOWN = "UNKNOWN",
|
|
432
|
+
EQUALS = "EQUALS",
|
|
433
|
+
NOT_EQUALS = "NOT_EQUALS",
|
|
434
|
+
CONTAINS_ALL = "CONTAINS_ALL",
|
|
435
|
+
NOT_CONTAINS_ALL = "NOT_CONTAINS_ALL",
|
|
436
|
+
CONTAINS_ANY = "CONTAINS_ANY",
|
|
437
|
+
NOT_CONTAINS_ANY = "NOT_CONTAINS_ANY",
|
|
438
|
+
EXISTS = "EXISTS",
|
|
439
|
+
NOT_EXISTS = "NOT_EXISTS"
|
|
440
|
+
}
|
|
441
|
+
/** DEPRECATED, use Targeting.label instead */
|
|
442
|
+
export interface CriteriaMetaData {
|
|
443
|
+
label?: string;
|
|
444
|
+
}
|
|
445
|
+
export interface PremiumLandingTabCriteria {
|
|
446
|
+
value?: PremiumLandingTabCriteriaEnum;
|
|
447
|
+
}
|
|
448
|
+
export declare enum PremiumLandingTabCriteriaEnum {
|
|
449
|
+
UNKNOWN = "UNKNOWN",
|
|
450
|
+
WEBSITE = "WEBSITE",
|
|
451
|
+
BUSINESS = "BUSINESS"
|
|
452
|
+
}
|
|
453
|
+
export interface PremiumAccountCriteria {
|
|
454
|
+
value?: PremiumAccountCriteriaEnum;
|
|
455
|
+
}
|
|
456
|
+
export declare enum PremiumAccountCriteriaEnum {
|
|
457
|
+
UNKNOWN = "UNKNOWN",
|
|
458
|
+
IS_PREMIUM = "IS_PREMIUM",
|
|
459
|
+
IS_NOT_PREMIUM = "IS_NOT_PREMIUM"
|
|
460
|
+
}
|
|
461
|
+
export interface EligibleForSaleCriteria {
|
|
462
|
+
value?: EligibleForSaleCriteriaEnum;
|
|
463
|
+
customSale?: string | null;
|
|
464
|
+
/** @format GUID */
|
|
465
|
+
productTypeId?: string;
|
|
466
|
+
}
|
|
467
|
+
export declare enum EligibleForSaleCriteriaEnum {
|
|
468
|
+
UNKNOWN = "UNKNOWN",
|
|
469
|
+
NONE = "NONE",
|
|
470
|
+
SEASONAL = "SEASONAL",
|
|
471
|
+
PERSONAL = "PERSONAL",
|
|
472
|
+
CUSTOM = "CUSTOM"
|
|
473
|
+
}
|
|
474
|
+
export interface ExternalCriteria {
|
|
475
|
+
artifactName?: string | null;
|
|
476
|
+
conditionType?: ConditionTypeEnum;
|
|
477
|
+
/** This should be validated against ResponseType and ConditionType */
|
|
478
|
+
expectedValue?: any;
|
|
479
|
+
additionalParams?: Record<string, any> | null;
|
|
480
|
+
}
|
|
481
|
+
export declare enum ConditionTypeEnum {
|
|
482
|
+
UNKNOWN = "UNKNOWN",
|
|
483
|
+
EQUAL = "EQUAL",
|
|
484
|
+
GREATER_THAN = "GREATER_THAN",
|
|
485
|
+
SMALLER_THAN = "SMALLER_THAN"
|
|
486
|
+
}
|
|
487
|
+
export interface SiteTypeCriteria {
|
|
488
|
+
/**
|
|
489
|
+
* @minSize 1
|
|
490
|
+
* @maxSize 10000
|
|
491
|
+
*/
|
|
492
|
+
values?: SiteType[];
|
|
493
|
+
included?: boolean;
|
|
494
|
+
}
|
|
495
|
+
export declare enum SiteType {
|
|
496
|
+
UNKNOWN = "UNKNOWN",
|
|
497
|
+
REGULAR = "REGULAR",
|
|
498
|
+
HEADLESS = "HEADLESS"
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Current offer eligibility status related data:
|
|
502
|
+
* - offer's availability for all users or employees only
|
|
503
|
+
* - current timeframe eligibility
|
|
504
|
+
* - offer's petri experiment based eligibility
|
|
505
|
+
*/
|
|
506
|
+
export interface ReleaseAudience {
|
|
507
|
+
/** Who can see the offer (wix staff vs all users) */
|
|
508
|
+
releaseStatus?: Status;
|
|
509
|
+
/** Execution result of release_status filter (if current audience match offer's one) */
|
|
510
|
+
releaseExecutionResult?: ExecutionResult;
|
|
511
|
+
/** The offer is active from this timestamp */
|
|
512
|
+
timeStart?: Date | null;
|
|
513
|
+
/** The offer is inactive after this timestamp */
|
|
514
|
+
timeStop?: Date | null;
|
|
515
|
+
/** If current time is inside the offer timeframe */
|
|
516
|
+
timeExecutionResult?: ExecutionResult;
|
|
517
|
+
/** If offer is active only for some petri experiment - here is its key */
|
|
518
|
+
experimentKey?: string | null;
|
|
519
|
+
/** If offer is active only for some petri experiment - here is its required value */
|
|
520
|
+
experimentValue?: string | null;
|
|
521
|
+
/** If given user petri experiment matches offer's value */
|
|
522
|
+
experimentExecutionResult?: ExecutionResult;
|
|
523
|
+
}
|
|
524
|
+
/** Target release audience scope of the offer */
|
|
525
|
+
export declare enum Status {
|
|
526
|
+
UNKNOWN = "UNKNOWN",
|
|
527
|
+
ALL = "ALL",
|
|
528
|
+
WIX_EMPLOYEE = "WIX_EMPLOYEE"
|
|
529
|
+
}
|
|
530
|
+
/** Results of an offer frequency caps evaluation. */
|
|
531
|
+
export interface FrequencyCapsExecutionResult {
|
|
532
|
+
/**
|
|
533
|
+
* true — the offer is eligible based on frequency caps limits
|
|
534
|
+
* false — the offer is limited (not returned from runtime) by frequency caps conditions
|
|
535
|
+
*/
|
|
536
|
+
offerEligible?: boolean;
|
|
537
|
+
/** The offer's frequency caps config being applied (either placement level FC or the offer's) */
|
|
538
|
+
frequencyCaps?: FrequencyCaps;
|
|
539
|
+
/** Frequency caps conditions with values set to current offer+user+metasite+events data */
|
|
540
|
+
conditionsExecutionResult?: FrequencyCapsConditionsResult;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* FrequencyCaps is an entity containing some criterias (rules) for offer eligibility based on
|
|
544
|
+
* past interactions of a user with the offer (or related offers).
|
|
545
|
+
* By "interactions" we mean views, clicks, etc. Anything that is collected by deler-events API.
|
|
546
|
+
*
|
|
547
|
+
* FrequencyCaps can be set per offer or per placement. If set on placement level - it's like a default
|
|
548
|
+
* value for all offers in the placement. While offer level FrequencyCaps is like specific value for the
|
|
549
|
+
* offer only.
|
|
550
|
+
*/
|
|
551
|
+
export interface FrequencyCaps {
|
|
552
|
+
/**
|
|
553
|
+
* If this flag is set & true — an offer frequency caps are calculated not separately but together with
|
|
554
|
+
* other offers belonging to same campaign & placement.
|
|
555
|
+
*
|
|
556
|
+
* For example frequencyCaps.views.limit = 5 with `count_with_related_offers` == false
|
|
557
|
+
* means "stop this offer when it was viewed 5 times by this user".
|
|
558
|
+
* While frequencyCaps.views.limit = 5 with `count_with_related_offers` == true
|
|
559
|
+
* means "stop this offer when any of the offers within same campaign & placement
|
|
560
|
+
* were together viewed 5 times by this user".
|
|
561
|
+
*/
|
|
562
|
+
countWithRelatedOffers?: boolean | null;
|
|
563
|
+
/** Actual limits imposed on the offer. Null if no limits. */
|
|
564
|
+
conditions?: Conditions;
|
|
565
|
+
}
|
|
566
|
+
export declare enum CountType {
|
|
567
|
+
UNKNOWN = "UNKNOWN",
|
|
568
|
+
TOTAL = "TOTAL",
|
|
569
|
+
DAYS = "DAYS"
|
|
570
|
+
}
|
|
571
|
+
/** Limit supporting number count or days aggregation count */
|
|
572
|
+
export interface EventsCountLimit {
|
|
573
|
+
limit?: number;
|
|
574
|
+
type?: CountType;
|
|
575
|
+
}
|
|
576
|
+
/** Simple number limit */
|
|
577
|
+
export interface LastEventLimit {
|
|
578
|
+
limit?: number;
|
|
579
|
+
}
|
|
580
|
+
export interface Conditions {
|
|
581
|
+
/** Max number of total offer VIEW events. */
|
|
582
|
+
views?: EventsCountLimit;
|
|
583
|
+
/** Max number of total offer MAIN_CTA clicks. */
|
|
584
|
+
mainCtaClicks?: EventsCountLimit;
|
|
585
|
+
/** Max number of total offer SKIP events. */
|
|
586
|
+
skips?: EventsCountLimit;
|
|
587
|
+
/** Max number of total offer CLOSE events. */
|
|
588
|
+
closes?: EventsCountLimit;
|
|
589
|
+
/** Max number of total offer SHOW_LATER events. */
|
|
590
|
+
showLater?: LastEventLimit;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Execution result per each FC limit type, currentValue is human readable representation of actual data
|
|
594
|
+
* success = true means limit has not been reached (offer is eligible according to this limit)
|
|
595
|
+
*/
|
|
596
|
+
export interface FrequencyCapsConditionsResult {
|
|
597
|
+
/** Number of total VIEW events */
|
|
598
|
+
views?: ExecutionResult;
|
|
599
|
+
/** Number of total MAIN_CTA events */
|
|
600
|
+
mainCtaClicks?: ExecutionResult;
|
|
601
|
+
/** Number of total SKIP events */
|
|
602
|
+
skips?: ExecutionResult;
|
|
603
|
+
/** Number of total CLOSE events */
|
|
604
|
+
closes?: ExecutionResult;
|
|
605
|
+
/** Number of total SHOW_LATER events */
|
|
606
|
+
showLater?: ExecutionResult;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Entity, holding criteria(s) (rules or filters) for dealer runtime rule engine
|
|
610
|
+
* The rule engine decides if targeting eligible to a user or not based on executing these rules
|
|
611
|
+
*/
|
|
612
|
+
export interface TargetingTree extends TargetingTreeCriteriaOneOf {
|
|
613
|
+
/** The compound of a user */
|
|
614
|
+
compoundCriteria?: V1CompoundCriteria;
|
|
615
|
+
/** A custom filter for targeting */
|
|
616
|
+
customCriteria?: CustomCriteria;
|
|
617
|
+
/** Country of the user */
|
|
618
|
+
geoCriteria?: V1ListCriteria;
|
|
619
|
+
/** Language of the user */
|
|
620
|
+
languageCriteria?: V1ListCriteria;
|
|
621
|
+
/** Filter based on "owner" vs "contributor" */
|
|
622
|
+
userRoleCriteria?: V1UserRoleCriteria;
|
|
623
|
+
/** User color */
|
|
624
|
+
userColorsCriteria?: V1ListCriteria;
|
|
625
|
+
/** List of user guids */
|
|
626
|
+
userGuidsCriteria?: V1ListCriteria;
|
|
627
|
+
/** List of connected domains */
|
|
628
|
+
connectedDomainCriteria?: V1ConnectedDomainCriteria;
|
|
629
|
+
/** Premium plan status of the user */
|
|
630
|
+
premiumPlanCriteria?: V1PremiumPlanCriteria;
|
|
631
|
+
/** Whether this site has added a mailbox */
|
|
632
|
+
mailboxCriteria?: V1MailboxCriteria;
|
|
633
|
+
/** Whether a specific app is currently installed on this site */
|
|
634
|
+
installedAppsCriteria?: V1ListCriteria;
|
|
635
|
+
/** Sites connected to a family of products such as combo, VIP, or unlimited */
|
|
636
|
+
productGroupsCriteria?: V1ListCriteria;
|
|
637
|
+
/** Users eligible for mailbox discounts */
|
|
638
|
+
mailboxSaleCriteria?: V1ListCriteria;
|
|
639
|
+
/** Users who have 1 or more sites that are not connected to a premium plan */
|
|
640
|
+
freeSiteCriteria?: V1FreeSiteCriteria;
|
|
641
|
+
/** Criteria brand */
|
|
642
|
+
brandCriteria?: V1BrandsCriteria;
|
|
643
|
+
/** Criteria custom params */
|
|
644
|
+
customParamCriteria?: V1CustomParamCriteria;
|
|
645
|
+
/** List of criteria audiences */
|
|
646
|
+
audienceCriteria?: V1ListCriteria;
|
|
647
|
+
/** Whether the default Package Picker tab is "Business" or "Website" */
|
|
648
|
+
premiumLandingTabCriteria?: V1PremiumLandingTabCriteria;
|
|
649
|
+
/** Users who have 1 or more sites that are connected to premium */
|
|
650
|
+
premiumAccountCriteria?: V1PremiumAccountCriteria;
|
|
651
|
+
/** Eligible for sale */
|
|
652
|
+
eligibleForSaleCriteria?: V1EligibleForSaleCriteria;
|
|
653
|
+
/** External_criteria */
|
|
654
|
+
externalCriteria?: V1ExternalCriteria;
|
|
655
|
+
/** SiteType criteria */
|
|
656
|
+
siteTypeCriteria?: V1SiteTypeCriteria;
|
|
657
|
+
/** optional current targeting filter execution result (may be set in debug response) */
|
|
658
|
+
executionResult?: V1ExecutionResult;
|
|
659
|
+
/** Type of the criteria (criteria filter) */
|
|
660
|
+
type?: V1CriteriaType;
|
|
661
|
+
/**
|
|
662
|
+
* Client use case specific current targeting filter label. For example "v2" for root level targeting of
|
|
663
|
+
* V2 targeting offers. Or "basic.geo" for V2 targeting GEO filter
|
|
664
|
+
* @maxLength 100
|
|
665
|
+
*/
|
|
666
|
+
label?: string | null;
|
|
667
|
+
/** If `true` this targeting result is NOT(criteria result) */
|
|
668
|
+
negate?: boolean | null;
|
|
669
|
+
}
|
|
670
|
+
/** @oneof */
|
|
671
|
+
export interface TargetingTreeCriteriaOneOf {
|
|
672
|
+
/** The compound of a user */
|
|
673
|
+
compoundCriteria?: V1CompoundCriteria;
|
|
674
|
+
/** A custom filter for targeting */
|
|
675
|
+
customCriteria?: CustomCriteria;
|
|
676
|
+
/** Country of the user */
|
|
677
|
+
geoCriteria?: V1ListCriteria;
|
|
678
|
+
/** Language of the user */
|
|
679
|
+
languageCriteria?: V1ListCriteria;
|
|
680
|
+
/** Filter based on "owner" vs "contributor" */
|
|
681
|
+
userRoleCriteria?: V1UserRoleCriteria;
|
|
682
|
+
/** User color */
|
|
683
|
+
userColorsCriteria?: V1ListCriteria;
|
|
684
|
+
/** List of user guids */
|
|
685
|
+
userGuidsCriteria?: V1ListCriteria;
|
|
686
|
+
/** List of connected domains */
|
|
687
|
+
connectedDomainCriteria?: V1ConnectedDomainCriteria;
|
|
688
|
+
/** Premium plan status of the user */
|
|
689
|
+
premiumPlanCriteria?: V1PremiumPlanCriteria;
|
|
690
|
+
/** Whether this site has added a mailbox */
|
|
691
|
+
mailboxCriteria?: V1MailboxCriteria;
|
|
692
|
+
/** Whether a specific app is currently installed on this site */
|
|
693
|
+
installedAppsCriteria?: V1ListCriteria;
|
|
694
|
+
/** Sites connected to a family of products such as combo, VIP, or unlimited */
|
|
695
|
+
productGroupsCriteria?: V1ListCriteria;
|
|
696
|
+
/** Users eligible for mailbox discounts */
|
|
697
|
+
mailboxSaleCriteria?: V1ListCriteria;
|
|
698
|
+
/** Users who have 1 or more sites that are not connected to a premium plan */
|
|
699
|
+
freeSiteCriteria?: V1FreeSiteCriteria;
|
|
700
|
+
/** Criteria brand */
|
|
701
|
+
brandCriteria?: V1BrandsCriteria;
|
|
702
|
+
/** Criteria custom params */
|
|
703
|
+
customParamCriteria?: V1CustomParamCriteria;
|
|
704
|
+
/** List of criteria audiences */
|
|
705
|
+
audienceCriteria?: V1ListCriteria;
|
|
706
|
+
/** Whether the default Package Picker tab is "Business" or "Website" */
|
|
707
|
+
premiumLandingTabCriteria?: V1PremiumLandingTabCriteria;
|
|
708
|
+
/** Users who have 1 or more sites that are connected to premium */
|
|
709
|
+
premiumAccountCriteria?: V1PremiumAccountCriteria;
|
|
710
|
+
/** Eligible for sale */
|
|
711
|
+
eligibleForSaleCriteria?: V1EligibleForSaleCriteria;
|
|
712
|
+
/** External_criteria */
|
|
713
|
+
externalCriteria?: V1ExternalCriteria;
|
|
714
|
+
/** SiteType criteria */
|
|
715
|
+
siteTypeCriteria?: V1SiteTypeCriteria;
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Generic message for debug execution results.
|
|
719
|
+
* Used for specific targeting criteria
|
|
720
|
+
*/
|
|
721
|
+
export interface V1ExecutionResult {
|
|
722
|
+
/** if current criteria is applicable/eligible/valid */
|
|
723
|
+
success?: boolean;
|
|
724
|
+
/**
|
|
725
|
+
* if set - it's JSON with either string, date utc string, boolean, array or object
|
|
726
|
+
* depends on specific filter/criteria the result is calculated
|
|
727
|
+
* @maxLength 100
|
|
728
|
+
*/
|
|
729
|
+
currentValue?: string | null;
|
|
730
|
+
}
|
|
731
|
+
/** CriteriaType - the type of criteria. */
|
|
732
|
+
export declare enum V1CriteriaType {
|
|
733
|
+
/** Unknown criteria type. */
|
|
734
|
+
UNKNOWN_CRITERIA_TYPE = "UNKNOWN_CRITERIA_TYPE",
|
|
735
|
+
/** Compound criteria type - contain criteria array in children property. */
|
|
736
|
+
COMPOUND = "COMPOUND",
|
|
737
|
+
/** Custom criteria type - Used for comparing user/site BI Profile values. */
|
|
738
|
+
CUSTOM = "CUSTOM",
|
|
739
|
+
/** Geo criteria type - Used for geo targeting. */
|
|
740
|
+
GEO = "GEO",
|
|
741
|
+
/** User language criteria type - Used for language targeting. */
|
|
742
|
+
LANGUAGE = "LANGUAGE",
|
|
743
|
+
/** User role criteria type - Used for role targeting. */
|
|
744
|
+
USER_ROLE = "USER_ROLE",
|
|
745
|
+
USER_COLORS = "USER_COLORS",
|
|
746
|
+
USER_GUIDS = "USER_GUIDS",
|
|
747
|
+
CONNECTED_DOMAIN = "CONNECTED_DOMAIN",
|
|
748
|
+
PREMIUM_PLAN = "PREMIUM_PLAN",
|
|
749
|
+
MAILBOX = "MAILBOX",
|
|
750
|
+
INSTALLED_APPS = "INSTALLED_APPS",
|
|
751
|
+
PRODUCT_GROUPS = "PRODUCT_GROUPS",
|
|
752
|
+
MAILBOX_SALE = "MAILBOX_SALE",
|
|
753
|
+
FREE_SITE = "FREE_SITE",
|
|
754
|
+
BRAND = "BRAND",
|
|
755
|
+
CUSTOM_PARAM = "CUSTOM_PARAM",
|
|
756
|
+
AUDIENCE = "AUDIENCE",
|
|
757
|
+
PREMIUM_LANDING_TAB = "PREMIUM_LANDING_TAB",
|
|
758
|
+
PREMIUM_ACCOUNT = "PREMIUM_ACCOUNT",
|
|
759
|
+
ELIGIBLE_FOR_SALE = "ELIGIBLE_FOR_SALE",
|
|
760
|
+
EXTERNAL = "EXTERNAL",
|
|
761
|
+
SITE_TYPE = "SITE_TYPE"
|
|
762
|
+
}
|
|
763
|
+
/** Aggregate criteria for AND/OR tree like structures */
|
|
764
|
+
export interface V1CompoundCriteria {
|
|
765
|
+
/** Operator */
|
|
766
|
+
operator?: CompoundCriteriaOperator;
|
|
767
|
+
/**
|
|
768
|
+
* List of targeting
|
|
769
|
+
* @maxSize 10000
|
|
770
|
+
*/
|
|
771
|
+
children?: TargetingTree[];
|
|
772
|
+
}
|
|
773
|
+
export declare enum CompoundCriteriaOperator {
|
|
774
|
+
UNKNOWN_OPERATOR = "UNKNOWN_OPERATOR",
|
|
775
|
+
OR = "OR",
|
|
776
|
+
AND = "AND"
|
|
777
|
+
}
|
|
778
|
+
/** Criteria for targeting rules based on profile service data */
|
|
779
|
+
export interface CustomCriteria {
|
|
780
|
+
/**
|
|
781
|
+
* Id field - string
|
|
782
|
+
* @maxLength 100
|
|
783
|
+
*/
|
|
784
|
+
fieldId?: string;
|
|
785
|
+
/** Data_source */
|
|
786
|
+
dataSource?: CustomDataSource;
|
|
787
|
+
/** Operator */
|
|
788
|
+
operator?: CustomOperator;
|
|
789
|
+
/** List of restrictions */
|
|
790
|
+
listRestriction?: CustomOperator;
|
|
791
|
+
}
|
|
792
|
+
export declare enum FieldType {
|
|
793
|
+
UNKNOWN_FIELD_TYPE = "UNKNOWN_FIELD_TYPE",
|
|
794
|
+
NUMBER = "NUMBER",
|
|
795
|
+
STRING = "STRING",
|
|
796
|
+
LIST = "LIST",
|
|
797
|
+
TIMESTAMP = "TIMESTAMP",
|
|
798
|
+
BOOLEAN = "BOOLEAN"
|
|
799
|
+
}
|
|
800
|
+
export declare enum Comparator {
|
|
801
|
+
UNKNOWN_COMPARATOR = "UNKNOWN_COMPARATOR",
|
|
802
|
+
EQUAL = "EQUAL",
|
|
803
|
+
CONTAINED_IN = "CONTAINED_IN",
|
|
804
|
+
CONTAINS_SOME = "CONTAINS_SOME",
|
|
805
|
+
CONTAINS_NONE = "CONTAINS_NONE",
|
|
806
|
+
NOT_CONTAINS = "NOT_CONTAINS",
|
|
807
|
+
NOT_CONTAINED_IN = "NOT_CONTAINED_IN",
|
|
808
|
+
BE_NOTHING = "BE_NOTHING",
|
|
809
|
+
EXISTS = "EXISTS",
|
|
810
|
+
MORE_THAN_DAYS = "MORE_THAN_DAYS",
|
|
811
|
+
WITHIN_DAYS = "WITHIN_DAYS",
|
|
812
|
+
LESS = "LESS",
|
|
813
|
+
LESS_EQUAL = "LESS_EQUAL",
|
|
814
|
+
GREATER = "GREATER",
|
|
815
|
+
GREATER_EQUAL = "GREATER_EQUAL",
|
|
816
|
+
SIZE_LESS_EQUAL = "SIZE_LESS_EQUAL",
|
|
817
|
+
SIZE_GREATER_EQUAL = "SIZE_GREATER_EQUAL",
|
|
818
|
+
NOT_EQUAL = "NOT_EQUAL"
|
|
819
|
+
}
|
|
820
|
+
export declare enum CustomDataSource {
|
|
821
|
+
UNKNOWN_CUSTOM_DATA_SOURCE = "UNKNOWN_CUSTOM_DATA_SOURCE",
|
|
822
|
+
USER_PROFILE = "USER_PROFILE",
|
|
823
|
+
SITE_PROFILE = "SITE_PROFILE",
|
|
824
|
+
ACCOUNT_PROFILE = "ACCOUNT_PROFILE"
|
|
825
|
+
}
|
|
826
|
+
/** BI profile filter operator */
|
|
827
|
+
export interface CustomOperator {
|
|
828
|
+
/** BI field data type */
|
|
829
|
+
fieldType?: FieldType;
|
|
830
|
+
/**
|
|
831
|
+
* Expected value to be found in BI profile
|
|
832
|
+
* @maxLength 2000
|
|
833
|
+
*/
|
|
834
|
+
expectedValue?: string | null;
|
|
835
|
+
/** Comparator to apply to value (i.e. if BI value EQUALS, LESS, GREATER than expected value etc.) */
|
|
836
|
+
comparator?: Comparator;
|
|
837
|
+
}
|
|
838
|
+
/** Generic filter for list of included/excluded values */
|
|
839
|
+
export interface V1ListCriteria {
|
|
840
|
+
/**
|
|
841
|
+
* List of criteria values
|
|
842
|
+
* @maxSize 1000
|
|
843
|
+
* @maxLength 100
|
|
844
|
+
*/
|
|
845
|
+
values?: string[];
|
|
846
|
+
/** Is included - boolean */
|
|
847
|
+
included?: boolean;
|
|
848
|
+
}
|
|
849
|
+
/** Filter for MetaSite ownership rules */
|
|
850
|
+
export interface V1UserRoleCriteria {
|
|
851
|
+
/** User role criteria */
|
|
852
|
+
value?: UserRoleCriteriaValue;
|
|
853
|
+
}
|
|
854
|
+
export declare enum UserRoleCriteriaValue {
|
|
855
|
+
UNKNOWN_VALUE = "UNKNOWN_VALUE",
|
|
856
|
+
OWNER = "OWNER",
|
|
857
|
+
NOT_OWNER = "NOT_OWNER"
|
|
858
|
+
}
|
|
859
|
+
/** Filter for MetaSite domain validations */
|
|
860
|
+
export interface V1ConnectedDomainCriteria {
|
|
861
|
+
/** Connected domain criteria */
|
|
862
|
+
value?: Value;
|
|
863
|
+
}
|
|
864
|
+
export declare enum Value {
|
|
865
|
+
UNKNOWN_VALUE = "UNKNOWN_VALUE",
|
|
866
|
+
CONNECTED = "CONNECTED",
|
|
867
|
+
NOT_CONNECTED = "NOT_CONNECTED"
|
|
868
|
+
}
|
|
869
|
+
/** Filter for targeting based on premium plan eligibility */
|
|
870
|
+
export interface V1PremiumPlanCriteria {
|
|
871
|
+
/**
|
|
872
|
+
* List of products number
|
|
873
|
+
* @maxSize 10000
|
|
874
|
+
*/
|
|
875
|
+
products?: number[];
|
|
876
|
+
/** The user plan */
|
|
877
|
+
plan?: PremiumPlanCriteriaPlan;
|
|
878
|
+
}
|
|
879
|
+
export declare enum PremiumPlanCriteriaPlan {
|
|
880
|
+
UNKNOWN_PLAN = "UNKNOWN_PLAN",
|
|
881
|
+
PREMIUM = "PREMIUM",
|
|
882
|
+
NONE = "NONE"
|
|
883
|
+
}
|
|
884
|
+
/** Filter for MetaSite mailbox validations */
|
|
885
|
+
export interface V1MailboxCriteria {
|
|
886
|
+
/** Mailbox criteria */
|
|
887
|
+
value?: MailboxCriteriaValue;
|
|
888
|
+
}
|
|
889
|
+
export declare enum MailboxCriteriaValue {
|
|
890
|
+
UNKNOWN_VALUE = "UNKNOWN_VALUE",
|
|
891
|
+
HAS_MAILBOX = "HAS_MAILBOX",
|
|
892
|
+
NO_MAILBOX = "NO_MAILBOX"
|
|
893
|
+
}
|
|
894
|
+
/** Site level filter - is free site or not */
|
|
895
|
+
export interface V1FreeSiteCriteria {
|
|
896
|
+
/** FreeSite criteria */
|
|
897
|
+
value?: FreeSiteCriteriaValue;
|
|
898
|
+
}
|
|
899
|
+
export declare enum FreeSiteCriteriaValue {
|
|
900
|
+
UNKNOWN_VALUE = "UNKNOWN_VALUE",
|
|
901
|
+
HAS_FREE = "HAS_FREE",
|
|
902
|
+
NO_FREE = "NO_FREE"
|
|
903
|
+
}
|
|
904
|
+
/** Filter for list of brands */
|
|
905
|
+
export interface V1BrandsCriteria {
|
|
906
|
+
/**
|
|
907
|
+
* List of brands
|
|
908
|
+
* @maxSize 10
|
|
909
|
+
*/
|
|
910
|
+
values?: BrandsCriteriaBrand[];
|
|
911
|
+
/** Brand included status */
|
|
912
|
+
included?: boolean;
|
|
913
|
+
}
|
|
914
|
+
/** Filter for list of custom params - comes from the request. */
|
|
915
|
+
export interface V1CustomParamCriteria {
|
|
916
|
+
/** Custom param operator */
|
|
917
|
+
operator?: CustomParamCriteriaCustomParamOperator;
|
|
918
|
+
/**
|
|
919
|
+
* Key of criteria
|
|
920
|
+
* @maxLength 100
|
|
921
|
+
*/
|
|
922
|
+
key?: string | null;
|
|
923
|
+
/**
|
|
924
|
+
* List of criteria values
|
|
925
|
+
* @maxSize 100
|
|
926
|
+
* @maxLength 100
|
|
927
|
+
*/
|
|
928
|
+
values?: string[] | null;
|
|
929
|
+
}
|
|
930
|
+
export declare enum CustomParamCriteriaCustomParamOperator {
|
|
931
|
+
UNKNOWN_CUSTOM_PARAM_OPERATOR = "UNKNOWN_CUSTOM_PARAM_OPERATOR",
|
|
932
|
+
EQUALS = "EQUALS",
|
|
933
|
+
CONTAINS_ALL = "CONTAINS_ALL",
|
|
934
|
+
CONTAINS_ANY = "CONTAINS_ANY",
|
|
935
|
+
EXISTS = "EXISTS"
|
|
936
|
+
}
|
|
937
|
+
/** Filter for Premium Landing Tab types */
|
|
938
|
+
export interface V1PremiumLandingTabCriteria {
|
|
939
|
+
/** Landing tab criteria */
|
|
940
|
+
value?: PremiumLandingTabCriteriaValue;
|
|
941
|
+
}
|
|
942
|
+
export declare enum PremiumLandingTabCriteriaValue {
|
|
943
|
+
UNKNOWN_VALUE = "UNKNOWN_VALUE",
|
|
944
|
+
WEBSITE = "WEBSITE",
|
|
945
|
+
BUSINESS = "BUSINESS"
|
|
946
|
+
}
|
|
947
|
+
export interface V1PremiumAccountCriteria {
|
|
948
|
+
/** Premium account criteria */
|
|
949
|
+
value?: PremiumAccountCriteriaValue;
|
|
950
|
+
}
|
|
951
|
+
export declare enum PremiumAccountCriteriaValue {
|
|
952
|
+
UNKNOWN_VALUE = "UNKNOWN_VALUE",
|
|
953
|
+
IS_PREMIUM = "IS_PREMIUM",
|
|
954
|
+
IS_NOT_PREMIUM = "IS_NOT_PREMIUM"
|
|
955
|
+
}
|
|
956
|
+
/** Filter for targeting based on product groups */
|
|
957
|
+
export interface V1EligibleForSaleCriteria {
|
|
958
|
+
/** EligibleForSale criteria value */
|
|
959
|
+
value?: EligibleForSaleCriteriaValue;
|
|
960
|
+
/**
|
|
961
|
+
* CustomSale value
|
|
962
|
+
* @maxLength 100
|
|
963
|
+
*/
|
|
964
|
+
customSale?: string | null;
|
|
965
|
+
/**
|
|
966
|
+
* Product id - guid
|
|
967
|
+
* @format GUID
|
|
968
|
+
*/
|
|
969
|
+
productTypeId?: string;
|
|
970
|
+
}
|
|
971
|
+
export declare enum EligibleForSaleCriteriaValue {
|
|
972
|
+
UNKNOWN_VALUE = "UNKNOWN_VALUE",
|
|
973
|
+
NONE = "NONE",
|
|
974
|
+
SEASONAL = "SEASONAL",
|
|
975
|
+
PERSONAL = "PERSONAL",
|
|
976
|
+
CUSTOM = "CUSTOM"
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Filter for external criteria
|
|
980
|
+
* implemented by external services
|
|
981
|
+
*/
|
|
982
|
+
export interface V1ExternalCriteria {
|
|
983
|
+
/**
|
|
984
|
+
* Artifact name
|
|
985
|
+
* @maxLength 100
|
|
986
|
+
*/
|
|
987
|
+
artifactName?: string | null;
|
|
988
|
+
/** External criteria - condition type */
|
|
989
|
+
conditionType?: ConditionType;
|
|
990
|
+
/** External criteria - expected value */
|
|
991
|
+
expectedValue?: any;
|
|
992
|
+
/** External criteria - additional params */
|
|
993
|
+
additionalParams?: Record<string, any> | null;
|
|
994
|
+
}
|
|
995
|
+
export declare enum ConditionType {
|
|
996
|
+
UNKNOWN_CONDITION_TYPE = "UNKNOWN_CONDITION_TYPE",
|
|
997
|
+
EQUAL = "EQUAL",
|
|
998
|
+
GREATER_THAN = "GREATER_THAN",
|
|
999
|
+
SMALLER_THAN = "SMALLER_THAN"
|
|
1000
|
+
}
|
|
1001
|
+
/** Filter for list of site types. */
|
|
1002
|
+
export interface V1SiteTypeCriteria {
|
|
1003
|
+
/**
|
|
1004
|
+
* Array of siteType options
|
|
1005
|
+
* @minSize 1
|
|
1006
|
+
* @maxSize 10
|
|
1007
|
+
*/
|
|
1008
|
+
values?: SiteTypeCriteriaSiteType[];
|
|
1009
|
+
/** isIncluded bool */
|
|
1010
|
+
included?: boolean;
|
|
1011
|
+
}
|
|
1012
|
+
/** SiteType options */
|
|
1013
|
+
export declare enum SiteTypeCriteriaSiteType {
|
|
1014
|
+
UNKNOWN_SITE_TYPE = "UNKNOWN_SITE_TYPE",
|
|
1015
|
+
REGULAR = "REGULAR",
|
|
1016
|
+
HEADLESS = "HEADLESS"
|
|
1017
|
+
}
|
|
1018
|
+
/** Input params for evaluating the offer's creative. */
|
|
1019
|
+
export interface GetOfferRequest {
|
|
1020
|
+
/** Offer guid to evaluate */
|
|
1021
|
+
offerId: string;
|
|
1022
|
+
/** Explicit request context params. Optional. */
|
|
1023
|
+
context?: RequestContext;
|
|
1024
|
+
}
|
|
1025
|
+
/** Return the requested offer with personalized content for given request params & aspects. */
|
|
1026
|
+
export interface GetOfferResponse {
|
|
1027
|
+
/** Offer being inspected */
|
|
1028
|
+
offer?: Offer;
|
|
1029
|
+
}
|
|
1030
|
+
/** Params required to list offers for given placement (real estate). */
|
|
1031
|
+
export interface ListOffersRequest {
|
|
1032
|
+
/** Dealer placement guid (product location). Required. */
|
|
1033
|
+
realEstateId: string;
|
|
1034
|
+
/** Only <= limit number of offers returned if more are applicable. Optional, default limit is 30 offers */
|
|
1035
|
+
limit?: number | null;
|
|
1036
|
+
/**
|
|
1037
|
+
* Which offers to exclude from results. Optional.
|
|
1038
|
+
* @format GUID
|
|
1039
|
+
*/
|
|
1040
|
+
excludeOfferIds?: string[];
|
|
1041
|
+
/**
|
|
1042
|
+
* DEPRECATED - plz use server signer.
|
|
1043
|
+
* Optional - override specific fields that by default coming from aspects
|
|
1044
|
+
* if not set will be taken implicitly from request
|
|
1045
|
+
*/
|
|
1046
|
+
extensions?: RequestExtensions;
|
|
1047
|
+
/** Deviant Art specific use-case: signed jwt token with uuid of deviant art user in wix bi infra */
|
|
1048
|
+
deviantArtUserId?: string | null;
|
|
1049
|
+
/** List of custom param's values, some offers are targeted by those values. Optional */
|
|
1050
|
+
customParams?: CustomParam[];
|
|
1051
|
+
/**
|
|
1052
|
+
* Optional - Enable to override or abort frequency caps configuration
|
|
1053
|
+
* if not set, the default offer or placement frequency caps hierarchy will be used (if configured)
|
|
1054
|
+
*/
|
|
1055
|
+
frequencyCapsOverrides?: FrequencyCapsRequestOverrides;
|
|
1056
|
+
/** SkipTargeting flag allows bypassing the targeting validation and retrieving all live offers, regardless of user/site eligibility. Optional. */
|
|
1057
|
+
skipTargeting?: boolean | null;
|
|
1058
|
+
/** Optional - Enable to override the placement default prioritization strategy configuration */
|
|
1059
|
+
prioritizationStrategyOverrides?: PrioritizationStrategyOverrides;
|
|
1060
|
+
}
|
|
1061
|
+
export declare enum FrequencyCapsOverridesType {
|
|
1062
|
+
UNKNOWN = "UNKNOWN",
|
|
1063
|
+
PLACEMENT_LEVEL = "PLACEMENT_LEVEL",
|
|
1064
|
+
OFFER_LEVEL = "OFFER_LEVEL"
|
|
1065
|
+
}
|
|
1066
|
+
export interface PrioritizationStrategyConfig extends PrioritizationStrategyConfigStrategyParamsOneOf {
|
|
1067
|
+
defaultParams?: PrioritizationStrategyParams;
|
|
1068
|
+
abTestStrategies?: PrioritizationABTestStrategies;
|
|
1069
|
+
shadowedStrategy?: ShadowedStrategy;
|
|
1070
|
+
}
|
|
1071
|
+
/** @oneof */
|
|
1072
|
+
export interface PrioritizationStrategyConfigStrategyParamsOneOf {
|
|
1073
|
+
defaultParams?: PrioritizationStrategyParams;
|
|
1074
|
+
abTestStrategies?: PrioritizationABTestStrategies;
|
|
1075
|
+
shadowedStrategy?: ShadowedStrategy;
|
|
1076
|
+
}
|
|
1077
|
+
export interface PrioritizationStrategyParams extends PrioritizationStrategyParamsConfigurationOneOf {
|
|
1078
|
+
abCtrConfig?: ABCTRConfig;
|
|
1079
|
+
whatsNextConfig?: WHATSNEXTConfig;
|
|
1080
|
+
advicesConfig?: AdvicesConfig;
|
|
1081
|
+
strategy?: PrioritizationStrategy;
|
|
1082
|
+
/**
|
|
1083
|
+
* Learning rate for the supporting strategy
|
|
1084
|
+
* should be between 0 and 1
|
|
1085
|
+
* @decimalValue options { gte:0.000, lte:1, maxScale:3 }
|
|
1086
|
+
*/
|
|
1087
|
+
learningAllocation?: string | null;
|
|
1088
|
+
/** @maxSize 20 */
|
|
1089
|
+
fixedItems?: FixedItem[];
|
|
1090
|
+
}
|
|
1091
|
+
/** @oneof */
|
|
1092
|
+
export interface PrioritizationStrategyParamsConfigurationOneOf {
|
|
1093
|
+
abCtrConfig?: ABCTRConfig;
|
|
1094
|
+
whatsNextConfig?: WHATSNEXTConfig;
|
|
1095
|
+
advicesConfig?: AdvicesConfig;
|
|
1096
|
+
}
|
|
1097
|
+
export declare enum PrioritizationStrategy {
|
|
1098
|
+
UNKNOWN = "UNKNOWN",
|
|
1099
|
+
/**
|
|
1100
|
+
* Manual - Prioritize by weight of the items.
|
|
1101
|
+
* - The items with the largest weight will have the highest priority
|
|
1102
|
+
* - Undefined weights will have the lowest priority
|
|
1103
|
+
*/
|
|
1104
|
+
MANUAL = "MANUAL",
|
|
1105
|
+
/** CTR based, item prioritized from highest CTR to the lowest */
|
|
1106
|
+
CTR = "CTR",
|
|
1107
|
+
/** Random based item prioritization */
|
|
1108
|
+
RANDOM = "RANDOM",
|
|
1109
|
+
/** AB test based item prioritization */
|
|
1110
|
+
ABCTR = "ABCTR",
|
|
1111
|
+
/** Premium based item prioritization */
|
|
1112
|
+
PremiumCTR = "PremiumCTR",
|
|
1113
|
+
/** ML Model item prioritization */
|
|
1114
|
+
MLModel = "MLModel",
|
|
1115
|
+
/** Advices item prioritization */
|
|
1116
|
+
ADVICES = "ADVICES",
|
|
1117
|
+
/** Collections based item prioritization */
|
|
1118
|
+
COLLECTIONS = "COLLECTIONS"
|
|
1119
|
+
}
|
|
1120
|
+
export interface WhatsNextConfiguration {
|
|
1121
|
+
/** customParams - Custom parameters to be used for the WhatsNext Completion. */
|
|
1122
|
+
customParams?: Record<string, any> | null;
|
|
1123
|
+
/**
|
|
1124
|
+
* The fixed number of advices to be returned.
|
|
1125
|
+
* Default: 5
|
|
1126
|
+
*/
|
|
1127
|
+
totalAdvices?: number | null;
|
|
1128
|
+
/**
|
|
1129
|
+
* llmTimeout - The maximum time to wait for the WhatsNext Completion.
|
|
1130
|
+
* Maximum 10 seconds, WIX Cancels requests after 10 seconds.
|
|
1131
|
+
* Represented in milliseconds.
|
|
1132
|
+
* @max 10000
|
|
1133
|
+
*/
|
|
1134
|
+
llmTimeoutInMs?: number;
|
|
1135
|
+
}
|
|
1136
|
+
export interface Advices {
|
|
1137
|
+
/** @maxSize 20 */
|
|
1138
|
+
advices?: string[];
|
|
1139
|
+
}
|
|
1140
|
+
export interface FixedItem {
|
|
1141
|
+
/** @format GUID */
|
|
1142
|
+
itemId?: string;
|
|
1143
|
+
priority?: number;
|
|
1144
|
+
}
|
|
1145
|
+
export interface ABCTRConfig {
|
|
1146
|
+
specName?: string | null;
|
|
1147
|
+
}
|
|
1148
|
+
export interface WHATSNEXTConfig {
|
|
1149
|
+
customParams?: Record<string, any> | null;
|
|
1150
|
+
}
|
|
1151
|
+
export interface AdvicesConfig extends AdvicesConfigAdvicesCustomConfigOneOf {
|
|
1152
|
+
whatsNextCustomParams?: WhatsNextConfiguration;
|
|
1153
|
+
advices?: Advices;
|
|
1154
|
+
/** @decimalValue options { gte:0.000, lte:1, maxScale:3 } */
|
|
1155
|
+
vespaThreshold?: string | null;
|
|
1156
|
+
fallbackStrategy?: PrioritizationStrategy;
|
|
1157
|
+
}
|
|
1158
|
+
/** @oneof */
|
|
1159
|
+
export interface AdvicesConfigAdvicesCustomConfigOneOf {
|
|
1160
|
+
whatsNextCustomParams?: WhatsNextConfiguration;
|
|
1161
|
+
advices?: Advices;
|
|
1162
|
+
}
|
|
1163
|
+
export interface PrioritizationABTestStrategies {
|
|
1164
|
+
/**
|
|
1165
|
+
* the spec name of the test
|
|
1166
|
+
* @minLength 1
|
|
1167
|
+
* @maxLength 100
|
|
1168
|
+
*/
|
|
1169
|
+
specName?: string;
|
|
1170
|
+
paramsA?: PrioritizationStrategyParams;
|
|
1171
|
+
paramsB?: PrioritizationStrategyParams;
|
|
1172
|
+
}
|
|
1173
|
+
export interface ShadowedStrategy {
|
|
1174
|
+
mainStrategy?: PrioritizationStrategyParams;
|
|
1175
|
+
shadowedStrategy?: PrioritizationStrategyParams;
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* DEPRECATED
|
|
1179
|
+
* Explicit metasite id request option.
|
|
1180
|
+
*/
|
|
1181
|
+
export interface RequestExtensions {
|
|
1182
|
+
/**
|
|
1183
|
+
* User needs permission DEALER.OFFERS_SERVING_SITE_TARGETING to pass it. Optional.
|
|
1184
|
+
* @format GUID
|
|
1185
|
+
*/
|
|
1186
|
+
siteId?: string | null;
|
|
1187
|
+
}
|
|
1188
|
+
export interface FrequencyCapsRequestOverrides {
|
|
1189
|
+
/**
|
|
1190
|
+
* Set of frequency caps conditions to use in the request
|
|
1191
|
+
* Set as null if you want to abort the frequency caps for this request (this will also follow the override type behaviour)
|
|
1192
|
+
*/
|
|
1193
|
+
conditions?: Conditions;
|
|
1194
|
+
/**
|
|
1195
|
+
* Mandatory - this controls the conditions overrides behaviour and must be one of those 2 types:
|
|
1196
|
+
* PLACEMENT_LEVEL - Will only be applied for offers without frequency caps
|
|
1197
|
+
* OFFER_LEVEL - Will be applied to all offers with or without frequency caps
|
|
1198
|
+
*/
|
|
1199
|
+
type?: FrequencyCapsOverridesType;
|
|
1200
|
+
}
|
|
1201
|
+
export interface PrioritizationStrategyOverrides {
|
|
1202
|
+
/** Set of prioritization strategy conditions to use in the request */
|
|
1203
|
+
prioritizationStrategyConfig?: PrioritizationStrategyConfig;
|
|
1204
|
+
}
|
|
1205
|
+
/** All eligible offers with personalized content for given request params & aspects. */
|
|
1206
|
+
export interface ListOffersResponse {
|
|
1207
|
+
/** Offers eligible for correspondent request at the moment of the call */
|
|
1208
|
+
offers?: Offer[];
|
|
1209
|
+
}
|
|
1210
|
+
/** Input params for evaluating the offer. */
|
|
1211
|
+
export interface ResolveOfferRequest {
|
|
1212
|
+
/** Offer guid to evaluate */
|
|
1213
|
+
offerId: string;
|
|
1214
|
+
/** List of custom param's values, some offers are targeted by those values. Optional */
|
|
1215
|
+
customParams?: CustomParam[];
|
|
1216
|
+
}
|
|
1217
|
+
/** Return the requested offer (if eligible) with personalized content for given request params & aspects. */
|
|
1218
|
+
export interface ResolveOfferResponse {
|
|
1219
|
+
/** Offer being inspected */
|
|
1220
|
+
offer?: Offer;
|
|
1221
|
+
}
|
|
1222
|
+
/** Params required to list offers for multiple placements (real estates) in a single call. */
|
|
1223
|
+
export interface ListOffersBulkRequest {
|
|
1224
|
+
/**
|
|
1225
|
+
* List of dealer real estates (placements). Required.
|
|
1226
|
+
* @minSize 1
|
|
1227
|
+
*/
|
|
1228
|
+
realEstateIds: string[];
|
|
1229
|
+
/**
|
|
1230
|
+
* Excluded offer ids will never be returend to the user. Optional
|
|
1231
|
+
* @format GUID
|
|
1232
|
+
*/
|
|
1233
|
+
excludeOfferIds?: string[];
|
|
1234
|
+
/**
|
|
1235
|
+
* DEPRECATED
|
|
1236
|
+
* This data overrides specific fields coming from aspects if not set will be taken implicitly from request.
|
|
1237
|
+
* Optional.
|
|
1238
|
+
*/
|
|
1239
|
+
extensions?: RequestExtensions;
|
|
1240
|
+
/** List of custom param's values, some offers are targeted by those values. Optional. */
|
|
1241
|
+
customParams?: CustomParam[];
|
|
1242
|
+
/** SkipTargeting flag allows bypassing the targeting validation and retrieving all live offers, regardless of user/site eligibility. Optional. */
|
|
1243
|
+
skipTargeting?: boolean | null;
|
|
1244
|
+
}
|
|
1245
|
+
export interface ListOffersBulkResponse {
|
|
1246
|
+
/** a map from realEstate(placement) id to list of offers */
|
|
1247
|
+
realEstates?: Record<string, ListOffersResponse>;
|
|
1248
|
+
}
|