@wix/auto_sdk_loyalty_earning-rules 1.0.7 → 1.0.9
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/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +28 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +39 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +48 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +353 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +28 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +180 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +93 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +97 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +942 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +151 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +1280 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +514 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +28 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +28 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +1 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +48 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +342 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +1 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +28 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +146 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +1 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +93 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +78 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +1 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +942 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +148 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +1280 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +480 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +28 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +39 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +48 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +353 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +28 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +180 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +93 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +97 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +942 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +151 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +1285 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +514 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +28 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +28 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +48 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +342 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +28 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +146 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +93 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +78 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +942 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +148 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +1285 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +480 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -0
- package/package.json +13 -14
- package/build/index.d.mts +0 -112
- package/build/index.d.ts +0 -112
- package/build/index.js +0 -732
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -694
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -112
- package/build/internal/index.d.ts +0 -112
- package/build/internal/index.js +0 -732
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -694
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/loyalty-v1-loyalty-earning-rule-earning-rules.universal-DOjaPKYu.d.mts +0 -643
- package/build/internal/loyalty-v1-loyalty-earning-rule-earning-rules.universal-DOjaPKYu.d.ts +0 -643
- package/build/internal/meta.d.mts +0 -322
- package/build/internal/meta.d.ts +0 -322
- package/build/internal/meta.js +0 -500
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -466
- package/build/internal/meta.mjs.map +0 -1
- package/build/loyalty-v1-loyalty-earning-rule-earning-rules.universal-ByA9SEhi.d.mts +0 -638
- package/build/loyalty-v1-loyalty-earning-rule-earning-rules.universal-ByA9SEhi.d.ts +0 -638
- package/build/meta.d.mts +0 -322
- package/build/meta.d.ts +0 -322
- package/build/meta.js +0 -500
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -466
- package/build/meta.mjs.map +0 -1
|
@@ -0,0 +1,1285 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
/**
|
|
3
|
+
* A loyalty earning rule defines how customers earn points in a loyalty program.
|
|
4
|
+
* You can create rules for different activities, such as making purchases.
|
|
5
|
+
*/
|
|
6
|
+
export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
7
|
+
/** Fixed amount of points awarded for each qualifying activity. */
|
|
8
|
+
fixedAmount?: FixedAmount;
|
|
9
|
+
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
10
|
+
conversionRate?: ConversionRate;
|
|
11
|
+
/**
|
|
12
|
+
* Loyalty earning rule ID.
|
|
13
|
+
* @format GUID
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
16
|
+
_id?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
|
|
19
|
+
* @format GUID
|
|
20
|
+
*/
|
|
21
|
+
sourceAppId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
|
|
24
|
+
* @minLength 1
|
|
25
|
+
* @maxLength 80
|
|
26
|
+
*/
|
|
27
|
+
triggerAppId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
|
|
30
|
+
* @minLength 1
|
|
31
|
+
* @maxLength 80
|
|
32
|
+
*/
|
|
33
|
+
triggerActivityType?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Name of the earning rule.
|
|
36
|
+
* @minLength 1
|
|
37
|
+
* @maxLength 50
|
|
38
|
+
*/
|
|
39
|
+
title?: string;
|
|
40
|
+
/** Current status of the earning rule. */
|
|
41
|
+
status?: Status;
|
|
42
|
+
/**
|
|
43
|
+
* Revision number, incremented by 1 each time the earning rule is updated.
|
|
44
|
+
* Pass the latest revision when updating to prevent conflicting changes.
|
|
45
|
+
*/
|
|
46
|
+
revision?: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* Date and time the earning rule was created.
|
|
49
|
+
* @readonly
|
|
50
|
+
*/
|
|
51
|
+
_createdDate?: Date | null;
|
|
52
|
+
/**
|
|
53
|
+
* Date and time the earning rule was last updated.
|
|
54
|
+
* @readonly
|
|
55
|
+
*/
|
|
56
|
+
_updatedDate?: Date | null;
|
|
57
|
+
/**
|
|
58
|
+
* Additional metadata about the earning rule.
|
|
59
|
+
* @readonly
|
|
60
|
+
*/
|
|
61
|
+
metadata?: Metadata;
|
|
62
|
+
}
|
|
63
|
+
/** @oneof */
|
|
64
|
+
export interface LoyaltyEarningRuleTypeOneOf {
|
|
65
|
+
/** Fixed amount of points awarded for each qualifying activity. */
|
|
66
|
+
fixedAmount?: FixedAmount;
|
|
67
|
+
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
68
|
+
conversionRate?: ConversionRate;
|
|
69
|
+
}
|
|
70
|
+
/** Fixed amount type of earning rule. */
|
|
71
|
+
export interface FixedAmount {
|
|
72
|
+
/**
|
|
73
|
+
* Fixed amount configurations for each tier.
|
|
74
|
+
* @maxSize 21
|
|
75
|
+
*/
|
|
76
|
+
configs?: FixedAmountConfig[];
|
|
77
|
+
}
|
|
78
|
+
export interface FixedAmountConfig {
|
|
79
|
+
/**
|
|
80
|
+
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction#terminology) is used.
|
|
81
|
+
* @format GUID
|
|
82
|
+
* @readonly
|
|
83
|
+
*/
|
|
84
|
+
tierId?: string | null;
|
|
85
|
+
/** Number of points to award. */
|
|
86
|
+
points?: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Conversion rate type of earning rule.
|
|
90
|
+
* Customers earn points based on the amount spent.
|
|
91
|
+
* For example, for every $10 spent, a customer might earn 1 point.
|
|
92
|
+
*/
|
|
93
|
+
export interface ConversionRate {
|
|
94
|
+
/**
|
|
95
|
+
* Conversion rate configurations for each tier.
|
|
96
|
+
*
|
|
97
|
+
* Points are awarded proportionally to the amount spent.
|
|
98
|
+
*
|
|
99
|
+
* Formula: `(amount spent) / (money_amount * points)`.
|
|
100
|
+
* @maxSize 21
|
|
101
|
+
*/
|
|
102
|
+
configs?: ConversionRateConfig[];
|
|
103
|
+
/**
|
|
104
|
+
* Specifies which field in the Wix automations trigger payload [REST](https://dev.wix.com/docs/rest/business-management/automations/introduction#how-do-automations-work)|[SDK](https://dev.wix.com/docs/sdk/backend-modules/automations/triggered-events/reporting-and-canceling-events) to use for calculating points in conversion rate rules.
|
|
105
|
+
* For example, if set to "priceSummary.totalAmount", the rule uses the total order amount to calculate loyalty points to be awarded.
|
|
106
|
+
* This field is only applicable for automated earning rules.
|
|
107
|
+
*/
|
|
108
|
+
field?: string | null;
|
|
109
|
+
}
|
|
110
|
+
export interface ConversionRateConfig {
|
|
111
|
+
/**
|
|
112
|
+
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction) is used.
|
|
113
|
+
* @format GUID
|
|
114
|
+
* @readonly
|
|
115
|
+
*/
|
|
116
|
+
tierId?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* The amount of money used as a reference for point calculation.
|
|
119
|
+
* Points are awarded proportionally to the amount spent.
|
|
120
|
+
*
|
|
121
|
+
* For example, if set to 10, 1 point is awarded for every 10 units of currency spent (assuming `points` is set to 1).
|
|
122
|
+
*
|
|
123
|
+
* Formula for points is: `(amount spent) / (money_amount * points)`.
|
|
124
|
+
*/
|
|
125
|
+
moneyAmount?: number;
|
|
126
|
+
/**
|
|
127
|
+
* Points given for the specified `money_amount`.
|
|
128
|
+
* Works in conjunction with `money_amount` to define the earning rule.
|
|
129
|
+
*
|
|
130
|
+
* For example: If `money_amount` is 20 and `points` is 10:
|
|
131
|
+
* - Spending 10 units of currency earns 5 points
|
|
132
|
+
* - Spending 20 units of currency earns 10 points
|
|
133
|
+
* - Spending 30 units of currency earns 15 points
|
|
134
|
+
*/
|
|
135
|
+
points?: number;
|
|
136
|
+
}
|
|
137
|
+
export declare enum Status {
|
|
138
|
+
/** Status is unknown or not specified. */
|
|
139
|
+
UNKNOWN = "UNKNOWN",
|
|
140
|
+
/** Earning rule is active and can assign points. */
|
|
141
|
+
ACTIVE = "ACTIVE",
|
|
142
|
+
/** Earning rule is paused and can't assign points. */
|
|
143
|
+
PAUSED = "PAUSED"
|
|
144
|
+
}
|
|
145
|
+
export interface Metadata {
|
|
146
|
+
/** Whether the earning rule can be deleted. */
|
|
147
|
+
canBeDeleted?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Information about the type of custom earning rule.
|
|
150
|
+
* @internal
|
|
151
|
+
*/
|
|
152
|
+
ruleTypeTag?: LoyaltyEarningRuleTypeTag;
|
|
153
|
+
}
|
|
154
|
+
export interface LoyaltyEarningRuleTypeTag {
|
|
155
|
+
/** Type of custom earning rule. */
|
|
156
|
+
ruleType?: LoyaltyEarningRuleTypeTagType;
|
|
157
|
+
}
|
|
158
|
+
export declare enum LoyaltyEarningRuleTypeTagType {
|
|
159
|
+
/** Type is unknown or not specified. */
|
|
160
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
161
|
+
/** Earning rule for a customer's birthday. */
|
|
162
|
+
BIRTHDAY = "BIRTHDAY"
|
|
163
|
+
}
|
|
164
|
+
export interface CacheInvalidated {
|
|
165
|
+
}
|
|
166
|
+
export interface EarningRuleDisabled {
|
|
167
|
+
}
|
|
168
|
+
export interface CreateLoyaltyEarningRuleRequest {
|
|
169
|
+
/** Earning rule to create. */
|
|
170
|
+
earningRule: LoyaltyEarningRule;
|
|
171
|
+
}
|
|
172
|
+
export interface CreateLoyaltyEarningRuleResponse {
|
|
173
|
+
/** Created earning rule. */
|
|
174
|
+
earningRule?: LoyaltyEarningRule;
|
|
175
|
+
}
|
|
176
|
+
export interface BulkCreateLoyaltyEarningRulesRequest {
|
|
177
|
+
/**
|
|
178
|
+
* Earning rules to create.
|
|
179
|
+
* @minSize 1
|
|
180
|
+
* @maxSize 100
|
|
181
|
+
*/
|
|
182
|
+
earningRules: LoyaltyEarningRule[];
|
|
183
|
+
}
|
|
184
|
+
export interface BulkCreateLoyaltyEarningRulesResponse {
|
|
185
|
+
/** Created earning rules. */
|
|
186
|
+
results?: BulkLoyaltyEarningRuleResult[];
|
|
187
|
+
/** Additional metadata for the created earning rules. */
|
|
188
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
189
|
+
}
|
|
190
|
+
export interface BulkLoyaltyEarningRuleResult {
|
|
191
|
+
/** Additional metadata for the created earning rules. */
|
|
192
|
+
itemMetadata?: ItemMetadata;
|
|
193
|
+
/** Created earning rule. */
|
|
194
|
+
item?: LoyaltyEarningRule;
|
|
195
|
+
}
|
|
196
|
+
export interface ItemMetadata {
|
|
197
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
198
|
+
_id?: string | null;
|
|
199
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
200
|
+
originalIndex?: number;
|
|
201
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
202
|
+
success?: boolean;
|
|
203
|
+
/** Details about the error in case of failure. */
|
|
204
|
+
error?: ApplicationError;
|
|
205
|
+
}
|
|
206
|
+
export interface ApplicationError {
|
|
207
|
+
/** Error code. */
|
|
208
|
+
code?: string;
|
|
209
|
+
/** Description of the error. */
|
|
210
|
+
description?: string;
|
|
211
|
+
/** Data related to the error. */
|
|
212
|
+
data?: Record<string, any> | null;
|
|
213
|
+
}
|
|
214
|
+
export interface BulkActionMetadata {
|
|
215
|
+
/** Number of items that were successfully processed. */
|
|
216
|
+
totalSuccesses?: number;
|
|
217
|
+
/** Number of items that couldn't be processed. */
|
|
218
|
+
totalFailures?: number;
|
|
219
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
220
|
+
undetailedFailures?: number;
|
|
221
|
+
}
|
|
222
|
+
export interface CreateCustomLoyaltyEarningRuleRequest {
|
|
223
|
+
/** Type of the custom earning rule. */
|
|
224
|
+
type: Type;
|
|
225
|
+
/** Custom earning rule to create. */
|
|
226
|
+
earningRule?: CustomLoyaltyEarningRule;
|
|
227
|
+
}
|
|
228
|
+
export declare enum Type {
|
|
229
|
+
/** Unknown type. This value is not used. */
|
|
230
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
231
|
+
/** Earning rule for social media. */
|
|
232
|
+
SOCIAL_MEDIA = "SOCIAL_MEDIA",
|
|
233
|
+
/** Earning rule for birthdays. */
|
|
234
|
+
BIRTHDAY = "BIRTHDAY"
|
|
235
|
+
}
|
|
236
|
+
/** Used in CreateCustomLoyaltyEarningRuleRequest */
|
|
237
|
+
export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
|
|
238
|
+
/** Fixed amount of points awarded for each qualifying activity. */
|
|
239
|
+
fixedAmount?: FixedAmount;
|
|
240
|
+
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
241
|
+
conversionRate?: ConversionRate;
|
|
242
|
+
/**
|
|
243
|
+
* Name of the earning rule.
|
|
244
|
+
* @minLength 1
|
|
245
|
+
* @maxLength 50
|
|
246
|
+
*/
|
|
247
|
+
title?: string;
|
|
248
|
+
}
|
|
249
|
+
/** @oneof */
|
|
250
|
+
export interface CustomLoyaltyEarningRuleTypeOneOf {
|
|
251
|
+
/** Fixed amount of points awarded for each qualifying activity. */
|
|
252
|
+
fixedAmount?: FixedAmount;
|
|
253
|
+
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
254
|
+
conversionRate?: ConversionRate;
|
|
255
|
+
}
|
|
256
|
+
export interface CreateCustomLoyaltyEarningRuleResponse {
|
|
257
|
+
/** Created earning rule. */
|
|
258
|
+
earningRule?: LoyaltyEarningRule;
|
|
259
|
+
}
|
|
260
|
+
export interface GetLoyaltyEarningRuleRequest {
|
|
261
|
+
/**
|
|
262
|
+
* ID of the earning rule to retrieve.
|
|
263
|
+
* @format GUID
|
|
264
|
+
*/
|
|
265
|
+
_id: string;
|
|
266
|
+
}
|
|
267
|
+
export interface GetLoyaltyEarningRuleResponse {
|
|
268
|
+
/** Retrieved earning rule. */
|
|
269
|
+
earningRule?: LoyaltyEarningRule;
|
|
270
|
+
}
|
|
271
|
+
export interface UpdateLoyaltyEarningRuleRequest {
|
|
272
|
+
/** Earning rule to update. */
|
|
273
|
+
earningRule: LoyaltyEarningRule;
|
|
274
|
+
}
|
|
275
|
+
export interface UpdateLoyaltyEarningRuleResponse {
|
|
276
|
+
/** The updated earning rule. */
|
|
277
|
+
earningRule?: LoyaltyEarningRule;
|
|
278
|
+
}
|
|
279
|
+
export interface DeleteLoyaltyEarningRuleRequest {
|
|
280
|
+
/**
|
|
281
|
+
* ID of the earning rule to delete.
|
|
282
|
+
* @format GUID
|
|
283
|
+
*/
|
|
284
|
+
_id: string;
|
|
285
|
+
/**
|
|
286
|
+
* Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
|
|
287
|
+
* Pass the latest revision when updating to prevent conflicting changes.
|
|
288
|
+
*/
|
|
289
|
+
revision?: string;
|
|
290
|
+
}
|
|
291
|
+
export interface DeleteLoyaltyEarningRuleResponse {
|
|
292
|
+
}
|
|
293
|
+
export interface DeleteAutomationEarningRuleRequest {
|
|
294
|
+
/**
|
|
295
|
+
* ID of the earning rule to delete.
|
|
296
|
+
* @format GUID
|
|
297
|
+
*/
|
|
298
|
+
_id: string;
|
|
299
|
+
}
|
|
300
|
+
export interface DeleteAutomationEarningRuleResponse {
|
|
301
|
+
}
|
|
302
|
+
export interface ListEarningRulesRequest {
|
|
303
|
+
/** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
|
|
304
|
+
triggerAppId?: string | null;
|
|
305
|
+
/** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
|
|
306
|
+
triggerActivityType?: string | null;
|
|
307
|
+
}
|
|
308
|
+
export interface ListEarningRulesResponse {
|
|
309
|
+
/** Retrieved earning rules. */
|
|
310
|
+
earningRules?: LoyaltyEarningRule[];
|
|
311
|
+
}
|
|
312
|
+
export interface ListEarningRulesInTierRequest {
|
|
313
|
+
/**
|
|
314
|
+
* ID of the tier for which the earning rules will be returned.
|
|
315
|
+
* @format GUID
|
|
316
|
+
*/
|
|
317
|
+
tierId?: string | null;
|
|
318
|
+
/** Pagination options. */
|
|
319
|
+
paging?: CursorPaging;
|
|
320
|
+
}
|
|
321
|
+
export interface CursorPaging {
|
|
322
|
+
/**
|
|
323
|
+
* Maximum number of items to return in the results.
|
|
324
|
+
* @max 100
|
|
325
|
+
*/
|
|
326
|
+
limit?: number | null;
|
|
327
|
+
/**
|
|
328
|
+
* Pointer to the next or previous page in the list of results.
|
|
329
|
+
*
|
|
330
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
331
|
+
* Not relevant for the first request.
|
|
332
|
+
* @maxLength 16000
|
|
333
|
+
*/
|
|
334
|
+
cursor?: string | null;
|
|
335
|
+
}
|
|
336
|
+
export interface ListEarningRulesInTierResponse {
|
|
337
|
+
/** Retrieved earning rules. */
|
|
338
|
+
earningRules?: LoyaltyEarningRule[];
|
|
339
|
+
/** Details on the paged set of results returned. */
|
|
340
|
+
pagingMetadata?: PagingMetadataV2;
|
|
341
|
+
}
|
|
342
|
+
export interface PagingMetadataV2 {
|
|
343
|
+
/** Number of items returned in the response. */
|
|
344
|
+
count?: number | null;
|
|
345
|
+
/** Offset that was requested. */
|
|
346
|
+
offset?: number | null;
|
|
347
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
348
|
+
total?: number | null;
|
|
349
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
350
|
+
tooManyToCount?: boolean | null;
|
|
351
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
352
|
+
cursors?: Cursors;
|
|
353
|
+
}
|
|
354
|
+
export interface Cursors {
|
|
355
|
+
/**
|
|
356
|
+
* Cursor string pointing to the next page in the list of results.
|
|
357
|
+
* @maxLength 16000
|
|
358
|
+
*/
|
|
359
|
+
next?: string | null;
|
|
360
|
+
/**
|
|
361
|
+
* Cursor pointing to the previous page in the list of results.
|
|
362
|
+
* @maxLength 16000
|
|
363
|
+
*/
|
|
364
|
+
prev?: string | null;
|
|
365
|
+
}
|
|
366
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
367
|
+
createdEvent?: EntityCreatedEvent;
|
|
368
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
369
|
+
deletedEvent?: EntityDeletedEvent;
|
|
370
|
+
actionEvent?: ActionEvent;
|
|
371
|
+
/**
|
|
372
|
+
* Unique event ID.
|
|
373
|
+
* Allows clients to ignore duplicate webhooks.
|
|
374
|
+
*/
|
|
375
|
+
_id?: string;
|
|
376
|
+
/**
|
|
377
|
+
* Assumes actions are also always typed to an entity_type
|
|
378
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
379
|
+
*/
|
|
380
|
+
entityFqdn?: string;
|
|
381
|
+
/**
|
|
382
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
383
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
384
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
385
|
+
*/
|
|
386
|
+
slug?: string;
|
|
387
|
+
/** ID of the entity associated with the event. */
|
|
388
|
+
entityId?: string;
|
|
389
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
390
|
+
eventTime?: Date | null;
|
|
391
|
+
/**
|
|
392
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
393
|
+
* (for example, GDPR).
|
|
394
|
+
*/
|
|
395
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
396
|
+
/** If present, indicates the action that triggered the event. */
|
|
397
|
+
originatedFrom?: string | null;
|
|
398
|
+
/**
|
|
399
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
400
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
401
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
402
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
403
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
404
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
405
|
+
*/
|
|
406
|
+
entityEventSequence?: string | null;
|
|
407
|
+
}
|
|
408
|
+
/** @oneof */
|
|
409
|
+
export interface DomainEventBodyOneOf {
|
|
410
|
+
createdEvent?: EntityCreatedEvent;
|
|
411
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
412
|
+
deletedEvent?: EntityDeletedEvent;
|
|
413
|
+
actionEvent?: ActionEvent;
|
|
414
|
+
}
|
|
415
|
+
export interface EntityCreatedEvent {
|
|
416
|
+
entity?: string;
|
|
417
|
+
}
|
|
418
|
+
export interface RestoreInfo {
|
|
419
|
+
deletedDate?: Date | null;
|
|
420
|
+
}
|
|
421
|
+
export interface EntityUpdatedEvent {
|
|
422
|
+
/**
|
|
423
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
424
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
425
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
426
|
+
*/
|
|
427
|
+
currentEntity?: string;
|
|
428
|
+
}
|
|
429
|
+
export interface EntityDeletedEvent {
|
|
430
|
+
/** Entity that was deleted */
|
|
431
|
+
deletedEntity?: string | null;
|
|
432
|
+
}
|
|
433
|
+
export interface ActionEvent {
|
|
434
|
+
body?: string;
|
|
435
|
+
}
|
|
436
|
+
export interface Empty {
|
|
437
|
+
}
|
|
438
|
+
export interface InvalidateEarningRuleCacheRequest {
|
|
439
|
+
}
|
|
440
|
+
export interface InvalidateEarningRuleCacheResponse {
|
|
441
|
+
}
|
|
442
|
+
export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
443
|
+
/** Emitted on a meta site creation. */
|
|
444
|
+
siteCreated?: SiteCreated;
|
|
445
|
+
/** Emitted on a meta site transfer completion. */
|
|
446
|
+
siteTransferred?: SiteTransferred;
|
|
447
|
+
/** Emitted on a meta site deletion. */
|
|
448
|
+
siteDeleted?: SiteDeleted;
|
|
449
|
+
/** Emitted on a meta site restoration. */
|
|
450
|
+
siteUndeleted?: SiteUndeleted;
|
|
451
|
+
/** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
|
|
452
|
+
sitePublished?: SitePublished;
|
|
453
|
+
/** Emitted on a meta site unpublish. */
|
|
454
|
+
siteUnpublished?: SiteUnpublished;
|
|
455
|
+
/** Emitted when meta site is marked as template. */
|
|
456
|
+
siteMarkedAsTemplate?: SiteMarkedAsTemplate;
|
|
457
|
+
/** Emitted when meta site is marked as a WixSite. */
|
|
458
|
+
siteMarkedAsWixSite?: SiteMarkedAsWixSite;
|
|
459
|
+
/** Emitted when an application is provisioned (installed). */
|
|
460
|
+
serviceProvisioned?: ServiceProvisioned;
|
|
461
|
+
/** Emitted when an application is removed (uninstalled). */
|
|
462
|
+
serviceRemoved?: ServiceRemoved;
|
|
463
|
+
/** Emitted when meta site name (URL slug) is changed. */
|
|
464
|
+
siteRenamedPayload?: SiteRenamed;
|
|
465
|
+
/** Emitted when meta site was permanently deleted. */
|
|
466
|
+
hardDeleted?: SiteHardDeleted;
|
|
467
|
+
/** Emitted on a namespace change. */
|
|
468
|
+
namespaceChanged?: NamespaceChanged;
|
|
469
|
+
/** Emitted when Studio is attached. */
|
|
470
|
+
studioAssigned?: StudioAssigned;
|
|
471
|
+
/** Emitted when Studio is detached. */
|
|
472
|
+
studioUnassigned?: StudioUnassigned;
|
|
473
|
+
/**
|
|
474
|
+
* Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch
|
|
475
|
+
* the actual URL.
|
|
476
|
+
*
|
|
477
|
+
* See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT
|
|
478
|
+
* See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459
|
|
479
|
+
*/
|
|
480
|
+
urlChanged?: SiteUrlChanged;
|
|
481
|
+
/** Site is marked as PurgedExternally */
|
|
482
|
+
sitePurgedExternally?: SitePurgedExternally;
|
|
483
|
+
/** Emitted when Odeditor is attached. */
|
|
484
|
+
odeditorAssigned?: OdeditorAssigned;
|
|
485
|
+
/** Emitted when Odeditor is detached. */
|
|
486
|
+
odeditorUnassigned?: OdeditorUnassigned;
|
|
487
|
+
/**
|
|
488
|
+
* A meta site id.
|
|
489
|
+
* @format GUID
|
|
490
|
+
*/
|
|
491
|
+
metaSiteId?: string;
|
|
492
|
+
/** A meta site version. Monotonically increasing. */
|
|
493
|
+
version?: string;
|
|
494
|
+
/** A timestamp of the event. */
|
|
495
|
+
timestamp?: string;
|
|
496
|
+
/**
|
|
497
|
+
* TODO(meta-site): Change validation once validations are disabled for consumers
|
|
498
|
+
* More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659
|
|
499
|
+
* @maxSize 4000
|
|
500
|
+
*/
|
|
501
|
+
assets?: Asset[];
|
|
502
|
+
}
|
|
503
|
+
/** @oneof */
|
|
504
|
+
export interface MetaSiteSpecialEventPayloadOneOf {
|
|
505
|
+
/** Emitted on a meta site creation. */
|
|
506
|
+
siteCreated?: SiteCreated;
|
|
507
|
+
/** Emitted on a meta site transfer completion. */
|
|
508
|
+
siteTransferred?: SiteTransferred;
|
|
509
|
+
/** Emitted on a meta site deletion. */
|
|
510
|
+
siteDeleted?: SiteDeleted;
|
|
511
|
+
/** Emitted on a meta site restoration. */
|
|
512
|
+
siteUndeleted?: SiteUndeleted;
|
|
513
|
+
/** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
|
|
514
|
+
sitePublished?: SitePublished;
|
|
515
|
+
/** Emitted on a meta site unpublish. */
|
|
516
|
+
siteUnpublished?: SiteUnpublished;
|
|
517
|
+
/** Emitted when meta site is marked as template. */
|
|
518
|
+
siteMarkedAsTemplate?: SiteMarkedAsTemplate;
|
|
519
|
+
/** Emitted when meta site is marked as a WixSite. */
|
|
520
|
+
siteMarkedAsWixSite?: SiteMarkedAsWixSite;
|
|
521
|
+
/** Emitted when an application is provisioned (installed). */
|
|
522
|
+
serviceProvisioned?: ServiceProvisioned;
|
|
523
|
+
/** Emitted when an application is removed (uninstalled). */
|
|
524
|
+
serviceRemoved?: ServiceRemoved;
|
|
525
|
+
/** Emitted when meta site name (URL slug) is changed. */
|
|
526
|
+
siteRenamedPayload?: SiteRenamed;
|
|
527
|
+
/** Emitted when meta site was permanently deleted. */
|
|
528
|
+
hardDeleted?: SiteHardDeleted;
|
|
529
|
+
/** Emitted on a namespace change. */
|
|
530
|
+
namespaceChanged?: NamespaceChanged;
|
|
531
|
+
/** Emitted when Studio is attached. */
|
|
532
|
+
studioAssigned?: StudioAssigned;
|
|
533
|
+
/** Emitted when Studio is detached. */
|
|
534
|
+
studioUnassigned?: StudioUnassigned;
|
|
535
|
+
/**
|
|
536
|
+
* Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch
|
|
537
|
+
* the actual URL.
|
|
538
|
+
*
|
|
539
|
+
* See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT
|
|
540
|
+
* See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459
|
|
541
|
+
*/
|
|
542
|
+
urlChanged?: SiteUrlChanged;
|
|
543
|
+
/** Site is marked as PurgedExternally */
|
|
544
|
+
sitePurgedExternally?: SitePurgedExternally;
|
|
545
|
+
/** Emitted when Odeditor is attached. */
|
|
546
|
+
odeditorAssigned?: OdeditorAssigned;
|
|
547
|
+
/** Emitted when Odeditor is detached. */
|
|
548
|
+
odeditorUnassigned?: OdeditorUnassigned;
|
|
549
|
+
}
|
|
550
|
+
export interface Asset {
|
|
551
|
+
/**
|
|
552
|
+
* An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).
|
|
553
|
+
* @maxLength 36
|
|
554
|
+
*/
|
|
555
|
+
appDefId?: string;
|
|
556
|
+
/**
|
|
557
|
+
* An instance id. For legacy reasons may be UUID or a string.
|
|
558
|
+
* @maxLength 200
|
|
559
|
+
*/
|
|
560
|
+
instanceId?: string;
|
|
561
|
+
/** An application state. */
|
|
562
|
+
state?: State;
|
|
563
|
+
}
|
|
564
|
+
export declare enum State {
|
|
565
|
+
UNKNOWN = "UNKNOWN",
|
|
566
|
+
ENABLED = "ENABLED",
|
|
567
|
+
DISABLED = "DISABLED",
|
|
568
|
+
PENDING = "PENDING",
|
|
569
|
+
DEMO = "DEMO"
|
|
570
|
+
}
|
|
571
|
+
export interface SiteCreated {
|
|
572
|
+
/**
|
|
573
|
+
* A template identifier (empty if not created from a template).
|
|
574
|
+
* @maxLength 36
|
|
575
|
+
*/
|
|
576
|
+
originTemplateId?: string;
|
|
577
|
+
/**
|
|
578
|
+
* An account id of the owner.
|
|
579
|
+
* @format GUID
|
|
580
|
+
*/
|
|
581
|
+
ownerId?: string;
|
|
582
|
+
/** A context in which meta site was created. */
|
|
583
|
+
context?: SiteCreatedContext;
|
|
584
|
+
/**
|
|
585
|
+
* A meta site id from which this site was created.
|
|
586
|
+
*
|
|
587
|
+
* In case of a creation from a template it's a template id.
|
|
588
|
+
* In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site.
|
|
589
|
+
* @format GUID
|
|
590
|
+
*/
|
|
591
|
+
originMetaSiteId?: string | null;
|
|
592
|
+
/**
|
|
593
|
+
* A meta site name (URL slug).
|
|
594
|
+
* @maxLength 20
|
|
595
|
+
*/
|
|
596
|
+
siteName?: string;
|
|
597
|
+
/** A namespace. */
|
|
598
|
+
namespace?: Namespace;
|
|
599
|
+
}
|
|
600
|
+
export declare enum SiteCreatedContext {
|
|
601
|
+
/** A valid option, we don't expose all reasons why site might be created. */
|
|
602
|
+
OTHER = "OTHER",
|
|
603
|
+
/** A meta site was created from template. */
|
|
604
|
+
FROM_TEMPLATE = "FROM_TEMPLATE",
|
|
605
|
+
/** A meta site was created by copying of the transfferred meta site. */
|
|
606
|
+
DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER",
|
|
607
|
+
/** A copy of existing meta site. */
|
|
608
|
+
DUPLICATE = "DUPLICATE",
|
|
609
|
+
/** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
|
|
610
|
+
OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER",
|
|
611
|
+
/** deprecated A meta site was created for Flash editor. */
|
|
612
|
+
FLASH = "FLASH"
|
|
613
|
+
}
|
|
614
|
+
export declare enum Namespace {
|
|
615
|
+
UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
|
|
616
|
+
/** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
|
|
617
|
+
WIX = "WIX",
|
|
618
|
+
/** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
619
|
+
SHOUT_OUT = "SHOUT_OUT",
|
|
620
|
+
/** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
621
|
+
ALBUMS = "ALBUMS",
|
|
622
|
+
/** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
623
|
+
WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE",
|
|
624
|
+
/** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
625
|
+
HOTELS = "HOTELS",
|
|
626
|
+
/** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
627
|
+
CLUBS = "CLUBS",
|
|
628
|
+
/** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
629
|
+
ONBOARDING_DRAFT = "ONBOARDING_DRAFT",
|
|
630
|
+
/** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
631
|
+
DEV_SITE = "DEV_SITE",
|
|
632
|
+
/** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
633
|
+
LOGOS = "LOGOS",
|
|
634
|
+
/** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
635
|
+
VIDEO_MAKER = "VIDEO_MAKER",
|
|
636
|
+
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
637
|
+
PARTNER_DASHBOARD = "PARTNER_DASHBOARD",
|
|
638
|
+
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
639
|
+
DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY",
|
|
640
|
+
/**
|
|
641
|
+
* A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
|
|
642
|
+
*
|
|
643
|
+
* Meta site with this namespace will *not* be shown in a user's site list by default.
|
|
644
|
+
*/
|
|
645
|
+
HTML_DRAFT = "HTML_DRAFT",
|
|
646
|
+
/**
|
|
647
|
+
* the user-journey for Fitness users who want to start from managing their business instead of designing their website.
|
|
648
|
+
* Will be accessible from Site List and will not have a website app.
|
|
649
|
+
* Once the user attaches a site, the site will become a regular wixsite.
|
|
650
|
+
*/
|
|
651
|
+
SITELESS_BUSINESS = "SITELESS_BUSINESS",
|
|
652
|
+
/** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
|
|
653
|
+
CREATOR_ECONOMY = "CREATOR_ECONOMY",
|
|
654
|
+
/** It is to be used in the Business First efforts. */
|
|
655
|
+
DASHBOARD_FIRST = "DASHBOARD_FIRST",
|
|
656
|
+
/** Bookings business flow with no site. */
|
|
657
|
+
ANYWHERE = "ANYWHERE",
|
|
658
|
+
/** Namespace for Headless Backoffice with no editor */
|
|
659
|
+
HEADLESS = "HEADLESS",
|
|
660
|
+
/**
|
|
661
|
+
* Namespace for master site that will exist in parent account that will be referenced by subaccounts
|
|
662
|
+
* The site will be used for account level CSM feature for enterprise
|
|
663
|
+
*/
|
|
664
|
+
ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS",
|
|
665
|
+
/** Rise.ai Siteless account management for Gift Cards and Store Credit. */
|
|
666
|
+
RISE = "RISE",
|
|
667
|
+
/**
|
|
668
|
+
* As part of the branded app new funnel, users now can create a meta site that will be branded app first.
|
|
669
|
+
* There's a blank site behind the scene but it's blank).
|
|
670
|
+
* The Mobile company will be the owner of this namespace.
|
|
671
|
+
*/
|
|
672
|
+
BRANDED_FIRST = "BRANDED_FIRST",
|
|
673
|
+
/** Nownia.com Siteless account management for Ai Scheduling Assistant. */
|
|
674
|
+
NOWNIA = "NOWNIA",
|
|
675
|
+
/**
|
|
676
|
+
* UGC Templates are templates that are created by users for personal use and to sale to other users.
|
|
677
|
+
* The Partners company owns this namespace.
|
|
678
|
+
*/
|
|
679
|
+
UGC_TEMPLATE = "UGC_TEMPLATE",
|
|
680
|
+
/** Codux Headless Sites */
|
|
681
|
+
CODUX = "CODUX",
|
|
682
|
+
/** Bobb - AI Design Creator. */
|
|
683
|
+
MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR",
|
|
684
|
+
/**
|
|
685
|
+
* Shared Blog Site is a unique single site across Enterprise account,
|
|
686
|
+
* This site will hold all Blog posts related to the Marketing product.
|
|
687
|
+
*/
|
|
688
|
+
SHARED_BLOG_ENTERPRISE = "SHARED_BLOG_ENTERPRISE",
|
|
689
|
+
/** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
690
|
+
STANDALONE_FORMS = "STANDALONE_FORMS",
|
|
691
|
+
/** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
692
|
+
STANDALONE_EVENTS = "STANDALONE_EVENTS",
|
|
693
|
+
/** MIMIR - Siteless account for MIMIR Ai Job runner. */
|
|
694
|
+
MIMIR = "MIMIR"
|
|
695
|
+
}
|
|
696
|
+
/** Site transferred to another user. */
|
|
697
|
+
export interface SiteTransferred {
|
|
698
|
+
/**
|
|
699
|
+
* A previous owner id (user that transfers meta site).
|
|
700
|
+
* @format GUID
|
|
701
|
+
*/
|
|
702
|
+
oldOwnerId?: string;
|
|
703
|
+
/**
|
|
704
|
+
* A new owner id (user that accepts meta site).
|
|
705
|
+
* @format GUID
|
|
706
|
+
*/
|
|
707
|
+
newOwnerId?: string;
|
|
708
|
+
}
|
|
709
|
+
/** Soft deletion of the meta site. Could be restored. */
|
|
710
|
+
export interface SiteDeleted {
|
|
711
|
+
/** A deletion context. */
|
|
712
|
+
deleteContext?: DeleteContext;
|
|
713
|
+
}
|
|
714
|
+
export interface DeleteContext {
|
|
715
|
+
/** When the meta site was deleted. */
|
|
716
|
+
dateDeleted?: Date | null;
|
|
717
|
+
/** A status. */
|
|
718
|
+
deleteStatus?: DeleteStatus;
|
|
719
|
+
/**
|
|
720
|
+
* A reason (flow).
|
|
721
|
+
* @maxLength 255
|
|
722
|
+
*/
|
|
723
|
+
deleteOrigin?: string;
|
|
724
|
+
/**
|
|
725
|
+
* A service that deleted it.
|
|
726
|
+
* @maxLength 255
|
|
727
|
+
*/
|
|
728
|
+
initiatorId?: string | null;
|
|
729
|
+
}
|
|
730
|
+
export declare enum DeleteStatus {
|
|
731
|
+
UNKNOWN = "UNKNOWN",
|
|
732
|
+
TRASH = "TRASH",
|
|
733
|
+
DELETED = "DELETED",
|
|
734
|
+
PENDING_PURGE = "PENDING_PURGE",
|
|
735
|
+
PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
|
|
736
|
+
}
|
|
737
|
+
/** Restoration of the meta site. */
|
|
738
|
+
export interface SiteUndeleted {
|
|
739
|
+
}
|
|
740
|
+
/** First publish of a meta site. Or subsequent publish after unpublish. */
|
|
741
|
+
export interface SitePublished {
|
|
742
|
+
}
|
|
743
|
+
export interface SiteUnpublished {
|
|
744
|
+
/**
|
|
745
|
+
* A list of URLs previously associated with the meta site.
|
|
746
|
+
* @maxLength 4000
|
|
747
|
+
* @maxSize 10000
|
|
748
|
+
*/
|
|
749
|
+
urls?: string[];
|
|
750
|
+
}
|
|
751
|
+
export interface SiteMarkedAsTemplate {
|
|
752
|
+
}
|
|
753
|
+
export interface SiteMarkedAsWixSite {
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Represents a service provisioned a site.
|
|
757
|
+
*
|
|
758
|
+
* Note on `origin_instance_id`:
|
|
759
|
+
* There is no guarantee that you will be able to find a meta site using `origin_instance_id`.
|
|
760
|
+
* This is because of the following scenario:
|
|
761
|
+
*
|
|
762
|
+
* Imagine you have a template where a third-party application (TPA) includes some stub data,
|
|
763
|
+
* such as a product catalog. When you create a site from this template, you inherit this
|
|
764
|
+
* default product catalog. However, if the template's product catalog is modified,
|
|
765
|
+
* your site will retain the catalog as it was at the time of site creation. This ensures that
|
|
766
|
+
* your site remains consistent with what you initially received and does not include any
|
|
767
|
+
* changes made to the original template afterward.
|
|
768
|
+
* To ensure this, the TPA on the template gets a new instance_id.
|
|
769
|
+
*/
|
|
770
|
+
export interface ServiceProvisioned {
|
|
771
|
+
/**
|
|
772
|
+
* Either UUID or EmbeddedServiceType.
|
|
773
|
+
* @maxLength 36
|
|
774
|
+
*/
|
|
775
|
+
appDefId?: string;
|
|
776
|
+
/**
|
|
777
|
+
* Not only UUID. Something here could be something weird.
|
|
778
|
+
* @maxLength 36
|
|
779
|
+
*/
|
|
780
|
+
instanceId?: string;
|
|
781
|
+
/**
|
|
782
|
+
* An instance id from which this instance is originated.
|
|
783
|
+
* @maxLength 36
|
|
784
|
+
*/
|
|
785
|
+
originInstanceId?: string;
|
|
786
|
+
/**
|
|
787
|
+
* A version.
|
|
788
|
+
* @maxLength 500
|
|
789
|
+
*/
|
|
790
|
+
version?: string | null;
|
|
791
|
+
/**
|
|
792
|
+
* The origin meta site id
|
|
793
|
+
* @format GUID
|
|
794
|
+
*/
|
|
795
|
+
originMetaSiteId?: string | null;
|
|
796
|
+
}
|
|
797
|
+
export interface ServiceRemoved {
|
|
798
|
+
/**
|
|
799
|
+
* Either UUID or EmbeddedServiceType.
|
|
800
|
+
* @maxLength 36
|
|
801
|
+
*/
|
|
802
|
+
appDefId?: string;
|
|
803
|
+
/**
|
|
804
|
+
* Not only UUID. Something here could be something weird.
|
|
805
|
+
* @maxLength 36
|
|
806
|
+
*/
|
|
807
|
+
instanceId?: string;
|
|
808
|
+
/**
|
|
809
|
+
* A version.
|
|
810
|
+
* @maxLength 500
|
|
811
|
+
*/
|
|
812
|
+
version?: string | null;
|
|
813
|
+
}
|
|
814
|
+
/** Rename of the site. Meaning, free public url has been changed as well. */
|
|
815
|
+
export interface SiteRenamed {
|
|
816
|
+
/**
|
|
817
|
+
* A new meta site name (URL slug).
|
|
818
|
+
* @maxLength 20
|
|
819
|
+
*/
|
|
820
|
+
newSiteName?: string;
|
|
821
|
+
/**
|
|
822
|
+
* A previous meta site name (URL slug).
|
|
823
|
+
* @maxLength 255
|
|
824
|
+
*/
|
|
825
|
+
oldSiteName?: string;
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Hard deletion of the meta site.
|
|
829
|
+
*
|
|
830
|
+
* Could not be restored. Therefore it's desirable to cleanup data.
|
|
831
|
+
*/
|
|
832
|
+
export interface SiteHardDeleted {
|
|
833
|
+
/** A deletion context. */
|
|
834
|
+
deleteContext?: DeleteContext;
|
|
835
|
+
}
|
|
836
|
+
export interface NamespaceChanged {
|
|
837
|
+
/** A previous namespace. */
|
|
838
|
+
oldNamespace?: Namespace;
|
|
839
|
+
/** A new namespace. */
|
|
840
|
+
newNamespace?: Namespace;
|
|
841
|
+
}
|
|
842
|
+
/** Assigned Studio editor */
|
|
843
|
+
export interface StudioAssigned {
|
|
844
|
+
}
|
|
845
|
+
/** Unassigned Studio editor */
|
|
846
|
+
export interface StudioUnassigned {
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.
|
|
850
|
+
*
|
|
851
|
+
* This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up
|
|
852
|
+
* with sites and its urls, you need to listen to another topic/event. Read about it:
|
|
853
|
+
*
|
|
854
|
+
* https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service
|
|
855
|
+
*/
|
|
856
|
+
export interface SiteUrlChanged {
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* Used at the end of the deletion flow for both draft sites and when a user deletes a site.
|
|
860
|
+
* Consumed by other teams to remove relevant data.
|
|
861
|
+
*/
|
|
862
|
+
export interface SitePurgedExternally {
|
|
863
|
+
/**
|
|
864
|
+
* @maxLength 2048
|
|
865
|
+
* @maxSize 100
|
|
866
|
+
* @deprecated
|
|
867
|
+
* @targetRemovalDate 2025-04-15
|
|
868
|
+
*/
|
|
869
|
+
appDefId?: string[];
|
|
870
|
+
}
|
|
871
|
+
/** Assigned Odeditor */
|
|
872
|
+
export interface OdeditorAssigned {
|
|
873
|
+
}
|
|
874
|
+
/** Unassigned Odeditor */
|
|
875
|
+
export interface OdeditorUnassigned {
|
|
876
|
+
}
|
|
877
|
+
export interface MessageEnvelope {
|
|
878
|
+
/**
|
|
879
|
+
* App instance ID.
|
|
880
|
+
* @format GUID
|
|
881
|
+
*/
|
|
882
|
+
instanceId?: string | null;
|
|
883
|
+
/**
|
|
884
|
+
* Event type.
|
|
885
|
+
* @maxLength 150
|
|
886
|
+
*/
|
|
887
|
+
eventType?: string;
|
|
888
|
+
/** The identification type and identity data. */
|
|
889
|
+
identity?: IdentificationData;
|
|
890
|
+
/** Stringify payload. */
|
|
891
|
+
data?: string;
|
|
892
|
+
}
|
|
893
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
894
|
+
/**
|
|
895
|
+
* ID of a site visitor that has not logged in to the site.
|
|
896
|
+
* @format GUID
|
|
897
|
+
*/
|
|
898
|
+
anonymousVisitorId?: string;
|
|
899
|
+
/**
|
|
900
|
+
* ID of a site visitor that has logged in to the site.
|
|
901
|
+
* @format GUID
|
|
902
|
+
*/
|
|
903
|
+
memberId?: string;
|
|
904
|
+
/**
|
|
905
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
906
|
+
* @format GUID
|
|
907
|
+
*/
|
|
908
|
+
wixUserId?: string;
|
|
909
|
+
/**
|
|
910
|
+
* ID of an app.
|
|
911
|
+
* @format GUID
|
|
912
|
+
*/
|
|
913
|
+
appId?: string;
|
|
914
|
+
/** @readonly */
|
|
915
|
+
identityType?: WebhookIdentityType;
|
|
916
|
+
}
|
|
917
|
+
/** @oneof */
|
|
918
|
+
export interface IdentificationDataIdOneOf {
|
|
919
|
+
/**
|
|
920
|
+
* ID of a site visitor that has not logged in to the site.
|
|
921
|
+
* @format GUID
|
|
922
|
+
*/
|
|
923
|
+
anonymousVisitorId?: string;
|
|
924
|
+
/**
|
|
925
|
+
* ID of a site visitor that has logged in to the site.
|
|
926
|
+
* @format GUID
|
|
927
|
+
*/
|
|
928
|
+
memberId?: string;
|
|
929
|
+
/**
|
|
930
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
931
|
+
* @format GUID
|
|
932
|
+
*/
|
|
933
|
+
wixUserId?: string;
|
|
934
|
+
/**
|
|
935
|
+
* ID of an app.
|
|
936
|
+
* @format GUID
|
|
937
|
+
*/
|
|
938
|
+
appId?: string;
|
|
939
|
+
}
|
|
940
|
+
export declare enum WebhookIdentityType {
|
|
941
|
+
UNKNOWN = "UNKNOWN",
|
|
942
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
943
|
+
MEMBER = "MEMBER",
|
|
944
|
+
WIX_USER = "WIX_USER",
|
|
945
|
+
APP = "APP"
|
|
946
|
+
}
|
|
947
|
+
export interface BaseEventMetadata {
|
|
948
|
+
/**
|
|
949
|
+
* App instance ID.
|
|
950
|
+
* @format GUID
|
|
951
|
+
*/
|
|
952
|
+
instanceId?: string | null;
|
|
953
|
+
/**
|
|
954
|
+
* Event type.
|
|
955
|
+
* @maxLength 150
|
|
956
|
+
*/
|
|
957
|
+
eventType?: string;
|
|
958
|
+
/** The identification type and identity data. */
|
|
959
|
+
identity?: IdentificationData;
|
|
960
|
+
}
|
|
961
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
962
|
+
/**
|
|
963
|
+
* Unique event ID.
|
|
964
|
+
* Allows clients to ignore duplicate webhooks.
|
|
965
|
+
*/
|
|
966
|
+
_id?: string;
|
|
967
|
+
/**
|
|
968
|
+
* Assumes actions are also always typed to an entity_type
|
|
969
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
970
|
+
*/
|
|
971
|
+
entityFqdn?: string;
|
|
972
|
+
/**
|
|
973
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
974
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
975
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
976
|
+
*/
|
|
977
|
+
slug?: string;
|
|
978
|
+
/** ID of the entity associated with the event. */
|
|
979
|
+
entityId?: string;
|
|
980
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
981
|
+
eventTime?: Date | null;
|
|
982
|
+
/**
|
|
983
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
984
|
+
* (for example, GDPR).
|
|
985
|
+
*/
|
|
986
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
987
|
+
/** If present, indicates the action that triggered the event. */
|
|
988
|
+
originatedFrom?: string | null;
|
|
989
|
+
/**
|
|
990
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
991
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
992
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
993
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
994
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
995
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
996
|
+
*/
|
|
997
|
+
entityEventSequence?: string | null;
|
|
998
|
+
}
|
|
999
|
+
export interface LoyaltyEarningRuleCreatedEnvelope {
|
|
1000
|
+
entity: LoyaltyEarningRule;
|
|
1001
|
+
metadata: EventMetadata;
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* Triggered when an earning rule is created.
|
|
1005
|
+
* @permissionScope Read Loyalty
|
|
1006
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
1007
|
+
* @permissionScope Manage Loyalty
|
|
1008
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1009
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1010
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1011
|
+
* @permissionId LOYALTY.READ_EARNING_RULES
|
|
1012
|
+
* @webhook
|
|
1013
|
+
* @eventType wix.loyalty.v1.loyalty_earning_rule_created
|
|
1014
|
+
* @slug created
|
|
1015
|
+
*/
|
|
1016
|
+
export declare function onLoyaltyEarningRuleCreated(handler: (event: LoyaltyEarningRuleCreatedEnvelope) => void | Promise<void>): void;
|
|
1017
|
+
export interface LoyaltyEarningRuleDeletedEnvelope {
|
|
1018
|
+
metadata: EventMetadata;
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Triggered when an earning rule is deleted.
|
|
1022
|
+
* @permissionScope Read Loyalty
|
|
1023
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
1024
|
+
* @permissionScope Manage Loyalty
|
|
1025
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1026
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1027
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1028
|
+
* @permissionId LOYALTY.READ_EARNING_RULES
|
|
1029
|
+
* @webhook
|
|
1030
|
+
* @eventType wix.loyalty.v1.loyalty_earning_rule_deleted
|
|
1031
|
+
* @slug deleted
|
|
1032
|
+
*/
|
|
1033
|
+
export declare function onLoyaltyEarningRuleDeleted(handler: (event: LoyaltyEarningRuleDeletedEnvelope) => void | Promise<void>): void;
|
|
1034
|
+
export interface LoyaltyEarningRuleUpdatedEnvelope {
|
|
1035
|
+
entity: LoyaltyEarningRule;
|
|
1036
|
+
metadata: EventMetadata;
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* Triggered when an earning rule is updated.
|
|
1040
|
+
* @permissionScope Read Loyalty
|
|
1041
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
1042
|
+
* @permissionScope Manage Loyalty
|
|
1043
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1044
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1045
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1046
|
+
* @permissionId LOYALTY.READ_EARNING_RULES
|
|
1047
|
+
* @webhook
|
|
1048
|
+
* @eventType wix.loyalty.v1.loyalty_earning_rule_updated
|
|
1049
|
+
* @slug updated
|
|
1050
|
+
*/
|
|
1051
|
+
export declare function onLoyaltyEarningRuleUpdated(handler: (event: LoyaltyEarningRuleUpdatedEnvelope) => void | Promise<void>): void;
|
|
1052
|
+
type LoyaltyEarningRuleNonNullablePaths = `fixedAmount.configs` | `fixedAmount.configs.${number}.points` | `conversionRate.configs` | `conversionRate.configs.${number}.moneyAmount` | `conversionRate.configs.${number}.points` | `sourceAppId` | `triggerAppId` | `triggerActivityType` | `title` | `status` | `metadata.canBeDeleted`;
|
|
1053
|
+
/**
|
|
1054
|
+
* Creates a non-automated earning rule.
|
|
1055
|
+
*
|
|
1056
|
+
* >**Note**: You can only create non-automated earning rules from a supported list.
|
|
1057
|
+
* For the supported list of services, see the introduction.
|
|
1058
|
+
* @param earningRule - Earning rule to create.
|
|
1059
|
+
* @public
|
|
1060
|
+
* @requiredField earningRule
|
|
1061
|
+
* @requiredField earningRule.sourceAppId
|
|
1062
|
+
* @requiredField earningRule.status
|
|
1063
|
+
* @requiredField earningRule.title
|
|
1064
|
+
* @requiredField earningRule.triggerActivityType
|
|
1065
|
+
* @requiredField earningRule.triggerAppId
|
|
1066
|
+
* @requiredField earningRule.type
|
|
1067
|
+
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
1068
|
+
* @permissionScope Manage Loyalty
|
|
1069
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1070
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1071
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1072
|
+
* @applicableIdentity APP
|
|
1073
|
+
* @returns Created earning rule.
|
|
1074
|
+
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule
|
|
1075
|
+
*/
|
|
1076
|
+
export declare function createLoyaltyEarningRule(earningRule: NonNullablePaths<LoyaltyEarningRule, `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`>): Promise<NonNullablePaths<LoyaltyEarningRule, LoyaltyEarningRuleNonNullablePaths>>;
|
|
1077
|
+
/**
|
|
1078
|
+
* Creates multiple non-automated earning rules.
|
|
1079
|
+
*
|
|
1080
|
+
* >**Note**: You can only create non-automated earning rules from a supported list.
|
|
1081
|
+
* For the supported list of services, see the introduction.
|
|
1082
|
+
* @param earningRules - Earning rules to create.
|
|
1083
|
+
* @public
|
|
1084
|
+
* @requiredField earningRules
|
|
1085
|
+
* @requiredField earningRules.sourceAppId
|
|
1086
|
+
* @requiredField earningRules.status
|
|
1087
|
+
* @requiredField earningRules.title
|
|
1088
|
+
* @requiredField earningRules.triggerActivityType
|
|
1089
|
+
* @requiredField earningRules.triggerAppId
|
|
1090
|
+
* @requiredField earningRules.type
|
|
1091
|
+
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
1092
|
+
* @permissionScope Manage Loyalty
|
|
1093
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1094
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1095
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1096
|
+
* @applicableIdentity APP
|
|
1097
|
+
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules
|
|
1098
|
+
*/
|
|
1099
|
+
export declare function bulkCreateLoyaltyEarningRules(earningRules: NonNullablePaths<LoyaltyEarningRule, `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`>[]): Promise<NonNullablePaths<BulkCreateLoyaltyEarningRulesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
1100
|
+
[P in LoyaltyEarningRuleNonNullablePaths]: `results.${number}.item.${P}`;
|
|
1101
|
+
}[LoyaltyEarningRuleNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
1102
|
+
/**
|
|
1103
|
+
* Creates a custom automated earning rule.
|
|
1104
|
+
*
|
|
1105
|
+
* To learn more about the automated rules, read the introduction.
|
|
1106
|
+
* @param type - Type of the custom earning rule.
|
|
1107
|
+
* @public
|
|
1108
|
+
* @requiredField type
|
|
1109
|
+
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
1110
|
+
* @permissionScope Manage Loyalty
|
|
1111
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1112
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1113
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1114
|
+
* @applicableIdentity APP
|
|
1115
|
+
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule
|
|
1116
|
+
*/
|
|
1117
|
+
export declare function createCustomLoyaltyEarningRule(type: Type, options?: CreateCustomLoyaltyEarningRuleOptions): Promise<NonNullablePaths<CreateCustomLoyaltyEarningRuleResponse, {
|
|
1118
|
+
[P in LoyaltyEarningRuleNonNullablePaths]: `earningRule.${P}`;
|
|
1119
|
+
}[LoyaltyEarningRuleNonNullablePaths]>>;
|
|
1120
|
+
export interface CreateCustomLoyaltyEarningRuleOptions {
|
|
1121
|
+
/** Custom earning rule to create. */
|
|
1122
|
+
earningRule?: CustomLoyaltyEarningRule;
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* Retrieves a specified non-automated earning rule.
|
|
1126
|
+
* @param _id - ID of the earning rule to retrieve.
|
|
1127
|
+
* @public
|
|
1128
|
+
* @requiredField _id
|
|
1129
|
+
* @permissionId LOYALTY.READ_EARNING_RULES
|
|
1130
|
+
* @permissionScope Read Loyalty
|
|
1131
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
1132
|
+
* @permissionScope Manage Loyalty
|
|
1133
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1134
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1135
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1136
|
+
* @applicableIdentity APP
|
|
1137
|
+
* @applicableIdentity VISITOR
|
|
1138
|
+
* @returns Retrieved earning rule.
|
|
1139
|
+
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule
|
|
1140
|
+
*/
|
|
1141
|
+
export declare function getLoyaltyEarningRule(_id: string): Promise<NonNullablePaths<LoyaltyEarningRule, LoyaltyEarningRuleNonNullablePaths>>;
|
|
1142
|
+
/**
|
|
1143
|
+
* Updates an earning rule.
|
|
1144
|
+
*
|
|
1145
|
+
* Supports partial updates.
|
|
1146
|
+
*
|
|
1147
|
+
* Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,
|
|
1148
|
+
* the current revision must be passed when updating the earning rule.
|
|
1149
|
+
* @param _id - Loyalty earning rule ID.
|
|
1150
|
+
* @public
|
|
1151
|
+
* @requiredField _id
|
|
1152
|
+
* @requiredField earningRule
|
|
1153
|
+
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
1154
|
+
* @permissionScope Manage Loyalty
|
|
1155
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1156
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1157
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1158
|
+
* @applicableIdentity APP
|
|
1159
|
+
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule
|
|
1160
|
+
*/
|
|
1161
|
+
export declare function updateLoyaltyEarningRule(_id: string, earningRule: UpdateLoyaltyEarningRule): Promise<NonNullablePaths<UpdateLoyaltyEarningRuleResponse, {
|
|
1162
|
+
[P in LoyaltyEarningRuleNonNullablePaths]: `earningRule.${P}`;
|
|
1163
|
+
}[LoyaltyEarningRuleNonNullablePaths]>>;
|
|
1164
|
+
export interface UpdateLoyaltyEarningRule {
|
|
1165
|
+
/** Fixed amount of points awarded for each qualifying activity. */
|
|
1166
|
+
fixedAmount?: FixedAmount;
|
|
1167
|
+
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
1168
|
+
conversionRate?: ConversionRate;
|
|
1169
|
+
/**
|
|
1170
|
+
* Loyalty earning rule ID.
|
|
1171
|
+
* @format GUID
|
|
1172
|
+
* @readonly
|
|
1173
|
+
*/
|
|
1174
|
+
_id?: string | null;
|
|
1175
|
+
/**
|
|
1176
|
+
* ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
|
|
1177
|
+
* @format GUID
|
|
1178
|
+
*/
|
|
1179
|
+
sourceAppId?: string;
|
|
1180
|
+
/**
|
|
1181
|
+
* ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
|
|
1182
|
+
* @minLength 1
|
|
1183
|
+
* @maxLength 80
|
|
1184
|
+
*/
|
|
1185
|
+
triggerAppId?: string;
|
|
1186
|
+
/**
|
|
1187
|
+
* Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
|
|
1188
|
+
* @minLength 1
|
|
1189
|
+
* @maxLength 80
|
|
1190
|
+
*/
|
|
1191
|
+
triggerActivityType?: string;
|
|
1192
|
+
/**
|
|
1193
|
+
* Name of the earning rule.
|
|
1194
|
+
* @minLength 1
|
|
1195
|
+
* @maxLength 50
|
|
1196
|
+
*/
|
|
1197
|
+
title?: string;
|
|
1198
|
+
/** Current status of the earning rule. */
|
|
1199
|
+
status?: Status;
|
|
1200
|
+
/**
|
|
1201
|
+
* Revision number, incremented by 1 each time the earning rule is updated.
|
|
1202
|
+
* Pass the latest revision when updating to prevent conflicting changes.
|
|
1203
|
+
*/
|
|
1204
|
+
revision?: string | null;
|
|
1205
|
+
/**
|
|
1206
|
+
* Date and time the earning rule was created.
|
|
1207
|
+
* @readonly
|
|
1208
|
+
*/
|
|
1209
|
+
_createdDate?: Date | null;
|
|
1210
|
+
/**
|
|
1211
|
+
* Date and time the earning rule was last updated.
|
|
1212
|
+
* @readonly
|
|
1213
|
+
*/
|
|
1214
|
+
_updatedDate?: Date | null;
|
|
1215
|
+
/**
|
|
1216
|
+
* Additional metadata about the earning rule.
|
|
1217
|
+
* @readonly
|
|
1218
|
+
*/
|
|
1219
|
+
metadata?: Metadata;
|
|
1220
|
+
}
|
|
1221
|
+
/**
|
|
1222
|
+
* Deletes a non-automated earning rule.
|
|
1223
|
+
* @param _id - ID of the earning rule to delete.
|
|
1224
|
+
* @public
|
|
1225
|
+
* @requiredField _id
|
|
1226
|
+
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
1227
|
+
* @permissionScope Manage Loyalty
|
|
1228
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1229
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1230
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1231
|
+
* @applicableIdentity APP
|
|
1232
|
+
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule
|
|
1233
|
+
*/
|
|
1234
|
+
export declare function deleteLoyaltyEarningRule(_id: string, options?: DeleteLoyaltyEarningRuleOptions): Promise<void>;
|
|
1235
|
+
export interface DeleteLoyaltyEarningRuleOptions {
|
|
1236
|
+
/**
|
|
1237
|
+
* Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
|
|
1238
|
+
* Pass the latest revision when updating to prevent conflicting changes.
|
|
1239
|
+
*/
|
|
1240
|
+
revision?: string;
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* Deletes a custom automated earning rule.
|
|
1244
|
+
*
|
|
1245
|
+
* > **Note:** Pre-installed automated rules can only be paused, not deleted.
|
|
1246
|
+
* @param _id - ID of the earning rule to delete.
|
|
1247
|
+
* @public
|
|
1248
|
+
* @requiredField _id
|
|
1249
|
+
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
1250
|
+
* @permissionScope Manage Loyalty
|
|
1251
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1252
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1253
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1254
|
+
* @applicableIdentity APP
|
|
1255
|
+
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule
|
|
1256
|
+
*/
|
|
1257
|
+
export declare function deleteAutomationEarningRule(_id: string): Promise<void>;
|
|
1258
|
+
/**
|
|
1259
|
+
* Retrieves a list of earning rules.
|
|
1260
|
+
*
|
|
1261
|
+
* Returns both automated and non-automated earning rules.
|
|
1262
|
+
*
|
|
1263
|
+
* You can filter the results by `triggerAppId` or `triggerActivityType`.
|
|
1264
|
+
* @public
|
|
1265
|
+
* @permissionId LOYALTY.READ_EARNING_RULES
|
|
1266
|
+
* @permissionScope Read Loyalty
|
|
1267
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
1268
|
+
* @permissionScope Manage Loyalty
|
|
1269
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1270
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1271
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1272
|
+
* @applicableIdentity APP
|
|
1273
|
+
* @applicableIdentity VISITOR
|
|
1274
|
+
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules
|
|
1275
|
+
*/
|
|
1276
|
+
export declare function listEarningRules(options?: ListEarningRulesOptions): Promise<NonNullablePaths<ListEarningRulesResponse, {
|
|
1277
|
+
[P in LoyaltyEarningRuleNonNullablePaths]: `earningRules.${number}.${P}`;
|
|
1278
|
+
}[LoyaltyEarningRuleNonNullablePaths]>>;
|
|
1279
|
+
export interface ListEarningRulesOptions {
|
|
1280
|
+
/** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
|
|
1281
|
+
triggerAppId?: string | null;
|
|
1282
|
+
/** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
|
|
1283
|
+
triggerActivityType?: string | null;
|
|
1284
|
+
}
|
|
1285
|
+
export {};
|