@wix/auto_sdk_referral_programs 1.0.295 → 1.0.296
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.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/schemas.js +555 -555
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/schemas.mjs +555 -555
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -0
- package/build/internal/es/index.typings.d.mts +2 -0
- package/package.json +2 -2
- package/build/internal/cjs/index.js +0 -979
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -863
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -815
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.js +0 -1259
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -928
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -813
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -762
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.mjs +0 -1209
- package/build/internal/es/schemas.mjs.map +0 -1
package/build/es/schemas.mjs
CHANGED
|
@@ -2,85 +2,85 @@
|
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
var GetReferralProgramRequest = /* @__PURE__ */ z.object({});
|
|
4
4
|
var GetReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
5
|
-
referralProgram: z.object({
|
|
6
|
-
name: z.string().describe("Referral program name.").min(2).max(50).optional().nullable(),
|
|
7
|
-
status: z.enum(["UNKNOWN", "DRAFT", "ACTIVE", "PAUSED"]).optional(),
|
|
8
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
5
|
+
referralProgram: /* @__PURE__ */ z.object({
|
|
6
|
+
name: /* @__PURE__ */ z.string().describe("Referral program name.").min(2).max(50).optional().nullable(),
|
|
7
|
+
status: /* @__PURE__ */ z.enum(["UNKNOWN", "DRAFT", "ACTIVE", "PAUSED"]).optional(),
|
|
8
|
+
revision: /* @__PURE__ */ z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
9
9
|
"Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current `revision` must be passed when updating the program."
|
|
10
10
|
).optional().nullable(),
|
|
11
|
-
_createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
|
|
12
|
-
_updatedDate: z.date().describe("Date and time the program was last updated.").optional().nullable(),
|
|
13
|
-
referredFriendReward: z.intersection(
|
|
14
|
-
z.object({
|
|
15
|
-
type: z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
11
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the program was created.").optional().nullable(),
|
|
12
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the program was last updated.").optional().nullable(),
|
|
13
|
+
referredFriendReward: /* @__PURE__ */ z.intersection(
|
|
14
|
+
/* @__PURE__ */ z.object({
|
|
15
|
+
type: /* @__PURE__ */ z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
16
16
|
}),
|
|
17
|
-
z.xor([
|
|
18
|
-
z.object({
|
|
19
|
-
couponOptions: z.never().optional(),
|
|
20
|
-
loyaltyPointsOptions: z.never().optional()
|
|
17
|
+
/* @__PURE__ */ z.xor([
|
|
18
|
+
/* @__PURE__ */ z.object({
|
|
19
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
20
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional()
|
|
21
21
|
}),
|
|
22
|
-
z.object({
|
|
23
|
-
loyaltyPointsOptions: z.never().optional(),
|
|
24
|
-
couponOptions: z.intersection(
|
|
25
|
-
z.object({
|
|
26
|
-
name: z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
27
|
-
discountType: z.enum([
|
|
22
|
+
/* @__PURE__ */ z.object({
|
|
23
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional(),
|
|
24
|
+
couponOptions: /* @__PURE__ */ z.intersection(
|
|
25
|
+
/* @__PURE__ */ z.object({
|
|
26
|
+
name: /* @__PURE__ */ z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
27
|
+
discountType: /* @__PURE__ */ z.enum([
|
|
28
28
|
"UNKNOWN",
|
|
29
29
|
"FIXED_AMOUNT",
|
|
30
30
|
"PERCENTAGE",
|
|
31
31
|
"FREE_SHIPPING"
|
|
32
32
|
]).describe("Coupon discount type.").optional(),
|
|
33
|
-
limitedToOneItem: z.boolean().describe(
|
|
33
|
+
limitedToOneItem: /* @__PURE__ */ z.boolean().describe(
|
|
34
34
|
"Whether the coupon is limited to one item.\nIf `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\nCoupons with a bookings `scope.namespace` are always limited to one item."
|
|
35
35
|
).optional().nullable(),
|
|
36
|
-
appliesToSubscriptions: z.boolean().describe(
|
|
36
|
+
appliesToSubscriptions: /* @__PURE__ */ z.boolean().describe(
|
|
37
37
|
"Whether the coupon applies to subscription products."
|
|
38
38
|
).optional().nullable(),
|
|
39
|
-
discountedCycleCount: z.number().int().describe(
|
|
39
|
+
discountedCycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
40
40
|
"Specifies the amount of discounted cycles for a subscription item.\n\n- Can only be set when `scope.namespace = pricingPlans`.\n- If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n- `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n\nMax: `999`"
|
|
41
41
|
).optional().nullable()
|
|
42
42
|
}),
|
|
43
|
-
z.intersection(
|
|
44
|
-
z.xor([
|
|
45
|
-
z.object({
|
|
46
|
-
fixedAmountOptions: z.never().optional(),
|
|
47
|
-
percentageOptions: z.never().optional()
|
|
43
|
+
/* @__PURE__ */ z.intersection(
|
|
44
|
+
/* @__PURE__ */ z.xor([
|
|
45
|
+
/* @__PURE__ */ z.object({
|
|
46
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
47
|
+
percentageOptions: /* @__PURE__ */ z.never().optional()
|
|
48
48
|
}),
|
|
49
|
-
z.object({
|
|
50
|
-
percentageOptions: z.never().optional(),
|
|
51
|
-
fixedAmountOptions: z.object({
|
|
52
|
-
amount: z.number().describe(
|
|
49
|
+
/* @__PURE__ */ z.object({
|
|
50
|
+
percentageOptions: /* @__PURE__ */ z.never().optional(),
|
|
51
|
+
fixedAmountOptions: /* @__PURE__ */ z.object({
|
|
52
|
+
amount: /* @__PURE__ */ z.number().describe(
|
|
53
53
|
"Amount of the discount as a fixed value."
|
|
54
54
|
).min(0.01).optional()
|
|
55
55
|
}).describe("Options for fixed amount discount.")
|
|
56
56
|
}),
|
|
57
|
-
z.object({
|
|
58
|
-
fixedAmountOptions: z.never().optional(),
|
|
59
|
-
percentageOptions: z.object({
|
|
60
|
-
percentage: z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
57
|
+
/* @__PURE__ */ z.object({
|
|
58
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
59
|
+
percentageOptions: /* @__PURE__ */ z.object({
|
|
60
|
+
percentage: /* @__PURE__ */ z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
61
61
|
}).describe("Options for percentage discounts.")
|
|
62
62
|
})
|
|
63
63
|
]),
|
|
64
|
-
z.xor([
|
|
65
|
-
z.object({
|
|
66
|
-
minimumSubtotal: z.never().optional(),
|
|
67
|
-
scope: z.never().optional()
|
|
64
|
+
/* @__PURE__ */ z.xor([
|
|
65
|
+
/* @__PURE__ */ z.object({
|
|
66
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
67
|
+
scope: /* @__PURE__ */ z.never().optional()
|
|
68
68
|
}),
|
|
69
|
-
z.object({
|
|
70
|
-
scope: z.never().optional(),
|
|
71
|
-
minimumSubtotal: z.number().describe(
|
|
69
|
+
/* @__PURE__ */ z.object({
|
|
70
|
+
scope: /* @__PURE__ */ z.never().optional(),
|
|
71
|
+
minimumSubtotal: /* @__PURE__ */ z.number().describe(
|
|
72
72
|
"Limit the coupon to carts with a subtotal above this number."
|
|
73
73
|
)
|
|
74
74
|
}),
|
|
75
|
-
z.object({
|
|
76
|
-
minimumSubtotal: z.never().optional(),
|
|
77
|
-
scope: z.object({
|
|
78
|
-
namespace: z.string().describe(
|
|
75
|
+
/* @__PURE__ */ z.object({
|
|
76
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
77
|
+
scope: /* @__PURE__ */ z.object({
|
|
78
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
79
79
|
"Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)"
|
|
80
80
|
).optional(),
|
|
81
|
-
group: z.object({
|
|
82
|
-
name: z.string().describe("Name of the group.").optional(),
|
|
83
|
-
entityId: z.string().describe("Entity ID of the group.").optional().nullable()
|
|
81
|
+
group: /* @__PURE__ */ z.object({
|
|
82
|
+
name: /* @__PURE__ */ z.string().describe("Name of the group.").optional(),
|
|
83
|
+
entityId: /* @__PURE__ */ z.string().describe("Entity ID of the group.").optional().nullable()
|
|
84
84
|
}).describe(
|
|
85
85
|
"Coupon scope's applied group, for example, Event or ticket in Wix Events."
|
|
86
86
|
).optional()
|
|
@@ -92,87 +92,87 @@ var GetReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
92
92
|
)
|
|
93
93
|
).describe("Options for coupon reward type.")
|
|
94
94
|
}),
|
|
95
|
-
z.object({
|
|
96
|
-
couponOptions: z.never().optional(),
|
|
97
|
-
loyaltyPointsOptions: z.object({
|
|
98
|
-
amount: z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
95
|
+
/* @__PURE__ */ z.object({
|
|
96
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
97
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.object({
|
|
98
|
+
amount: /* @__PURE__ */ z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
99
99
|
}).describe("Options for the Loyalty points reward type.")
|
|
100
100
|
})
|
|
101
101
|
])
|
|
102
102
|
).describe(
|
|
103
103
|
"Reward configuration for the referred friend.\nSpecifies the reward given to a new customer who was referred to the business."
|
|
104
104
|
).optional(),
|
|
105
|
-
referringCustomerReward: z.intersection(
|
|
106
|
-
z.object({
|
|
107
|
-
type: z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
105
|
+
referringCustomerReward: /* @__PURE__ */ z.intersection(
|
|
106
|
+
/* @__PURE__ */ z.object({
|
|
107
|
+
type: /* @__PURE__ */ z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
108
108
|
}),
|
|
109
|
-
z.xor([
|
|
110
|
-
z.object({
|
|
111
|
-
couponOptions: z.never().optional(),
|
|
112
|
-
loyaltyPointsOptions: z.never().optional()
|
|
109
|
+
/* @__PURE__ */ z.xor([
|
|
110
|
+
/* @__PURE__ */ z.object({
|
|
111
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
112
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional()
|
|
113
113
|
}),
|
|
114
|
-
z.object({
|
|
115
|
-
loyaltyPointsOptions: z.never().optional(),
|
|
116
|
-
couponOptions: z.intersection(
|
|
117
|
-
z.object({
|
|
118
|
-
name: z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
119
|
-
discountType: z.enum([
|
|
114
|
+
/* @__PURE__ */ z.object({
|
|
115
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional(),
|
|
116
|
+
couponOptions: /* @__PURE__ */ z.intersection(
|
|
117
|
+
/* @__PURE__ */ z.object({
|
|
118
|
+
name: /* @__PURE__ */ z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
119
|
+
discountType: /* @__PURE__ */ z.enum([
|
|
120
120
|
"UNKNOWN",
|
|
121
121
|
"FIXED_AMOUNT",
|
|
122
122
|
"PERCENTAGE",
|
|
123
123
|
"FREE_SHIPPING"
|
|
124
124
|
]).describe("Coupon discount type.").optional(),
|
|
125
|
-
limitedToOneItem: z.boolean().describe(
|
|
125
|
+
limitedToOneItem: /* @__PURE__ */ z.boolean().describe(
|
|
126
126
|
"Whether the coupon is limited to one item.\nIf `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\nCoupons with a bookings `scope.namespace` are always limited to one item."
|
|
127
127
|
).optional().nullable(),
|
|
128
|
-
appliesToSubscriptions: z.boolean().describe(
|
|
128
|
+
appliesToSubscriptions: /* @__PURE__ */ z.boolean().describe(
|
|
129
129
|
"Whether the coupon applies to subscription products."
|
|
130
130
|
).optional().nullable(),
|
|
131
|
-
discountedCycleCount: z.number().int().describe(
|
|
131
|
+
discountedCycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
132
132
|
"Specifies the amount of discounted cycles for a subscription item.\n\n- Can only be set when `scope.namespace = pricingPlans`.\n- If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n- `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n\nMax: `999`"
|
|
133
133
|
).optional().nullable()
|
|
134
134
|
}),
|
|
135
|
-
z.intersection(
|
|
136
|
-
z.xor([
|
|
137
|
-
z.object({
|
|
138
|
-
fixedAmountOptions: z.never().optional(),
|
|
139
|
-
percentageOptions: z.never().optional()
|
|
135
|
+
/* @__PURE__ */ z.intersection(
|
|
136
|
+
/* @__PURE__ */ z.xor([
|
|
137
|
+
/* @__PURE__ */ z.object({
|
|
138
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
139
|
+
percentageOptions: /* @__PURE__ */ z.never().optional()
|
|
140
140
|
}),
|
|
141
|
-
z.object({
|
|
142
|
-
percentageOptions: z.never().optional(),
|
|
143
|
-
fixedAmountOptions: z.object({
|
|
144
|
-
amount: z.number().describe(
|
|
141
|
+
/* @__PURE__ */ z.object({
|
|
142
|
+
percentageOptions: /* @__PURE__ */ z.never().optional(),
|
|
143
|
+
fixedAmountOptions: /* @__PURE__ */ z.object({
|
|
144
|
+
amount: /* @__PURE__ */ z.number().describe(
|
|
145
145
|
"Amount of the discount as a fixed value."
|
|
146
146
|
).min(0.01).optional()
|
|
147
147
|
}).describe("Options for fixed amount discount.")
|
|
148
148
|
}),
|
|
149
|
-
z.object({
|
|
150
|
-
fixedAmountOptions: z.never().optional(),
|
|
151
|
-
percentageOptions: z.object({
|
|
152
|
-
percentage: z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
149
|
+
/* @__PURE__ */ z.object({
|
|
150
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
151
|
+
percentageOptions: /* @__PURE__ */ z.object({
|
|
152
|
+
percentage: /* @__PURE__ */ z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
153
153
|
}).describe("Options for percentage discounts.")
|
|
154
154
|
})
|
|
155
155
|
]),
|
|
156
|
-
z.xor([
|
|
157
|
-
z.object({
|
|
158
|
-
minimumSubtotal: z.never().optional(),
|
|
159
|
-
scope: z.never().optional()
|
|
156
|
+
/* @__PURE__ */ z.xor([
|
|
157
|
+
/* @__PURE__ */ z.object({
|
|
158
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
159
|
+
scope: /* @__PURE__ */ z.never().optional()
|
|
160
160
|
}),
|
|
161
|
-
z.object({
|
|
162
|
-
scope: z.never().optional(),
|
|
163
|
-
minimumSubtotal: z.number().describe(
|
|
161
|
+
/* @__PURE__ */ z.object({
|
|
162
|
+
scope: /* @__PURE__ */ z.never().optional(),
|
|
163
|
+
minimumSubtotal: /* @__PURE__ */ z.number().describe(
|
|
164
164
|
"Limit the coupon to carts with a subtotal above this number."
|
|
165
165
|
)
|
|
166
166
|
}),
|
|
167
|
-
z.object({
|
|
168
|
-
minimumSubtotal: z.never().optional(),
|
|
169
|
-
scope: z.object({
|
|
170
|
-
namespace: z.string().describe(
|
|
167
|
+
/* @__PURE__ */ z.object({
|
|
168
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
169
|
+
scope: /* @__PURE__ */ z.object({
|
|
170
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
171
171
|
"Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)"
|
|
172
172
|
).optional(),
|
|
173
|
-
group: z.object({
|
|
174
|
-
name: z.string().describe("Name of the group.").optional(),
|
|
175
|
-
entityId: z.string().describe("Entity ID of the group.").optional().nullable()
|
|
173
|
+
group: /* @__PURE__ */ z.object({
|
|
174
|
+
name: /* @__PURE__ */ z.string().describe("Name of the group.").optional(),
|
|
175
|
+
entityId: /* @__PURE__ */ z.string().describe("Entity ID of the group.").optional().nullable()
|
|
176
176
|
}).describe(
|
|
177
177
|
"Coupon scope's applied group, for example, Event or ticket in Wix Events."
|
|
178
178
|
).optional()
|
|
@@ -184,18 +184,18 @@ var GetReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
184
184
|
)
|
|
185
185
|
).describe("Options for coupon reward type.")
|
|
186
186
|
}),
|
|
187
|
-
z.object({
|
|
188
|
-
couponOptions: z.never().optional(),
|
|
189
|
-
loyaltyPointsOptions: z.object({
|
|
190
|
-
amount: z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
187
|
+
/* @__PURE__ */ z.object({
|
|
188
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
189
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.object({
|
|
190
|
+
amount: /* @__PURE__ */ z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
191
191
|
}).describe("Options for the Loyalty points reward type.")
|
|
192
192
|
})
|
|
193
193
|
])
|
|
194
194
|
).describe(
|
|
195
195
|
"Reward configuration for the referring customer.\nSpecifies the reward given to an existing customer who referred a new customer to the business."
|
|
196
196
|
).optional(),
|
|
197
|
-
successfulReferralActions: z.array(
|
|
198
|
-
z.enum([
|
|
197
|
+
successfulReferralActions: /* @__PURE__ */ z.array(
|
|
198
|
+
/* @__PURE__ */ z.enum([
|
|
199
199
|
"UNKNOWN",
|
|
200
200
|
"STORE_ORDER_PLACED",
|
|
201
201
|
"PLAN_ORDERED",
|
|
@@ -205,9 +205,9 @@ var GetReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
205
205
|
"ONLINE_PROGRAM_JOINED"
|
|
206
206
|
])
|
|
207
207
|
).max(100).optional(),
|
|
208
|
-
emails: z.object({
|
|
209
|
-
encourageToReferFriends: z.array(
|
|
210
|
-
z.enum([
|
|
208
|
+
emails: /* @__PURE__ */ z.object({
|
|
209
|
+
encourageToReferFriends: /* @__PURE__ */ z.array(
|
|
210
|
+
/* @__PURE__ */ z.enum([
|
|
211
211
|
"UNKNOWN",
|
|
212
212
|
"STORES",
|
|
213
213
|
"PRICING_PLANS",
|
|
@@ -217,12 +217,12 @@ var GetReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
217
217
|
"ONLINE_PROGRAMS"
|
|
218
218
|
])
|
|
219
219
|
).optional(),
|
|
220
|
-
notifyCustomersAboutReward: z.boolean().describe(
|
|
220
|
+
notifyCustomersAboutReward: /* @__PURE__ */ z.boolean().describe(
|
|
221
221
|
"Whether to send email notifications to referring customers when they receive a referral reward.\nIf true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order)."
|
|
222
222
|
).optional()
|
|
223
223
|
}).describe("Configures email notifications for the referral program.").optional(),
|
|
224
|
-
premiumFeatures: z.object({
|
|
225
|
-
referralProgram: z.boolean().describe(
|
|
224
|
+
premiumFeatures: /* @__PURE__ */ z.object({
|
|
225
|
+
referralProgram: /* @__PURE__ */ z.boolean().describe(
|
|
226
226
|
"Whether the site owner has access to the referral program feature."
|
|
227
227
|
).optional()
|
|
228
228
|
}).describe(
|
|
@@ -231,85 +231,85 @@ var GetReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
231
231
|
}).describe("Retrieved referral program.").optional()
|
|
232
232
|
});
|
|
233
233
|
var UpdateReferralProgramRequest = /* @__PURE__ */ z.object({
|
|
234
|
-
referralProgram: z.object({
|
|
235
|
-
name: z.string().describe("Referral program name.").min(2).max(50).optional().nullable(),
|
|
236
|
-
status: z.enum(["UNKNOWN", "DRAFT", "ACTIVE", "PAUSED"]).optional(),
|
|
237
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
234
|
+
referralProgram: /* @__PURE__ */ z.object({
|
|
235
|
+
name: /* @__PURE__ */ z.string().describe("Referral program name.").min(2).max(50).optional().nullable(),
|
|
236
|
+
status: /* @__PURE__ */ z.enum(["UNKNOWN", "DRAFT", "ACTIVE", "PAUSED"]).optional(),
|
|
237
|
+
revision: /* @__PURE__ */ z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
238
238
|
"Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current `revision` must be passed when updating the program."
|
|
239
239
|
),
|
|
240
|
-
_createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
|
|
241
|
-
_updatedDate: z.date().describe("Date and time the program was last updated.").optional().nullable(),
|
|
242
|
-
referredFriendReward: z.intersection(
|
|
243
|
-
z.object({
|
|
244
|
-
type: z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).optional()
|
|
240
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the program was created.").optional().nullable(),
|
|
241
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the program was last updated.").optional().nullable(),
|
|
242
|
+
referredFriendReward: /* @__PURE__ */ z.intersection(
|
|
243
|
+
/* @__PURE__ */ z.object({
|
|
244
|
+
type: /* @__PURE__ */ z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).optional()
|
|
245
245
|
}),
|
|
246
|
-
z.xor([
|
|
247
|
-
z.object({
|
|
248
|
-
couponOptions: z.never().optional(),
|
|
249
|
-
loyaltyPointsOptions: z.never().optional()
|
|
246
|
+
/* @__PURE__ */ z.xor([
|
|
247
|
+
/* @__PURE__ */ z.object({
|
|
248
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
249
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional()
|
|
250
250
|
}),
|
|
251
|
-
z.object({
|
|
252
|
-
loyaltyPointsOptions: z.never().optional(),
|
|
253
|
-
couponOptions: z.intersection(
|
|
254
|
-
z.object({
|
|
255
|
-
name: z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
256
|
-
discountType: z.enum([
|
|
251
|
+
/* @__PURE__ */ z.object({
|
|
252
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional(),
|
|
253
|
+
couponOptions: /* @__PURE__ */ z.intersection(
|
|
254
|
+
/* @__PURE__ */ z.object({
|
|
255
|
+
name: /* @__PURE__ */ z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
256
|
+
discountType: /* @__PURE__ */ z.enum([
|
|
257
257
|
"UNKNOWN",
|
|
258
258
|
"FIXED_AMOUNT",
|
|
259
259
|
"PERCENTAGE",
|
|
260
260
|
"FREE_SHIPPING"
|
|
261
261
|
]).describe("Coupon discount type.").optional(),
|
|
262
|
-
limitedToOneItem: z.boolean().describe(
|
|
262
|
+
limitedToOneItem: /* @__PURE__ */ z.boolean().describe(
|
|
263
263
|
"Whether the coupon is limited to one item.\nIf `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\nCoupons with a bookings `scope.namespace` are always limited to one item."
|
|
264
264
|
).optional().nullable(),
|
|
265
|
-
appliesToSubscriptions: z.boolean().describe(
|
|
265
|
+
appliesToSubscriptions: /* @__PURE__ */ z.boolean().describe(
|
|
266
266
|
"Whether the coupon applies to subscription products."
|
|
267
267
|
).optional().nullable(),
|
|
268
|
-
discountedCycleCount: z.number().int().describe(
|
|
268
|
+
discountedCycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
269
269
|
"Specifies the amount of discounted cycles for a subscription item.\n\n- Can only be set when `scope.namespace = pricingPlans`.\n- If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n- `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n\nMax: `999`"
|
|
270
270
|
).optional().nullable()
|
|
271
271
|
}),
|
|
272
|
-
z.intersection(
|
|
273
|
-
z.xor([
|
|
274
|
-
z.object({
|
|
275
|
-
fixedAmountOptions: z.never().optional(),
|
|
276
|
-
percentageOptions: z.never().optional()
|
|
272
|
+
/* @__PURE__ */ z.intersection(
|
|
273
|
+
/* @__PURE__ */ z.xor([
|
|
274
|
+
/* @__PURE__ */ z.object({
|
|
275
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
276
|
+
percentageOptions: /* @__PURE__ */ z.never().optional()
|
|
277
277
|
}),
|
|
278
|
-
z.object({
|
|
279
|
-
percentageOptions: z.never().optional(),
|
|
280
|
-
fixedAmountOptions: z.object({
|
|
281
|
-
amount: z.number().describe(
|
|
278
|
+
/* @__PURE__ */ z.object({
|
|
279
|
+
percentageOptions: /* @__PURE__ */ z.never().optional(),
|
|
280
|
+
fixedAmountOptions: /* @__PURE__ */ z.object({
|
|
281
|
+
amount: /* @__PURE__ */ z.number().describe(
|
|
282
282
|
"Amount of the discount as a fixed value."
|
|
283
283
|
).min(0.01).optional()
|
|
284
284
|
}).describe("Options for fixed amount discount.")
|
|
285
285
|
}),
|
|
286
|
-
z.object({
|
|
287
|
-
fixedAmountOptions: z.never().optional(),
|
|
288
|
-
percentageOptions: z.object({
|
|
289
|
-
percentage: z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
286
|
+
/* @__PURE__ */ z.object({
|
|
287
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
288
|
+
percentageOptions: /* @__PURE__ */ z.object({
|
|
289
|
+
percentage: /* @__PURE__ */ z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
290
290
|
}).describe("Options for percentage discounts.")
|
|
291
291
|
})
|
|
292
292
|
]),
|
|
293
|
-
z.xor([
|
|
294
|
-
z.object({
|
|
295
|
-
minimumSubtotal: z.never().optional(),
|
|
296
|
-
scope: z.never().optional()
|
|
293
|
+
/* @__PURE__ */ z.xor([
|
|
294
|
+
/* @__PURE__ */ z.object({
|
|
295
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
296
|
+
scope: /* @__PURE__ */ z.never().optional()
|
|
297
297
|
}),
|
|
298
|
-
z.object({
|
|
299
|
-
scope: z.never().optional(),
|
|
300
|
-
minimumSubtotal: z.number().describe(
|
|
298
|
+
/* @__PURE__ */ z.object({
|
|
299
|
+
scope: /* @__PURE__ */ z.never().optional(),
|
|
300
|
+
minimumSubtotal: /* @__PURE__ */ z.number().describe(
|
|
301
301
|
"Limit the coupon to carts with a subtotal above this number."
|
|
302
302
|
)
|
|
303
303
|
}),
|
|
304
|
-
z.object({
|
|
305
|
-
minimumSubtotal: z.never().optional(),
|
|
306
|
-
scope: z.object({
|
|
307
|
-
namespace: z.string().describe(
|
|
304
|
+
/* @__PURE__ */ z.object({
|
|
305
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
306
|
+
scope: /* @__PURE__ */ z.object({
|
|
307
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
308
308
|
"Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)"
|
|
309
309
|
).optional(),
|
|
310
|
-
group: z.object({
|
|
311
|
-
name: z.string().describe("Name of the group.").optional(),
|
|
312
|
-
entityId: z.string().describe("Entity ID of the group.").optional().nullable()
|
|
310
|
+
group: /* @__PURE__ */ z.object({
|
|
311
|
+
name: /* @__PURE__ */ z.string().describe("Name of the group.").optional(),
|
|
312
|
+
entityId: /* @__PURE__ */ z.string().describe("Entity ID of the group.").optional().nullable()
|
|
313
313
|
}).describe(
|
|
314
314
|
"Coupon scope's applied group, for example, Event or ticket in Wix Events."
|
|
315
315
|
).optional()
|
|
@@ -321,87 +321,87 @@ var UpdateReferralProgramRequest = /* @__PURE__ */ z.object({
|
|
|
321
321
|
)
|
|
322
322
|
).describe("Options for coupon reward type.")
|
|
323
323
|
}),
|
|
324
|
-
z.object({
|
|
325
|
-
couponOptions: z.never().optional(),
|
|
326
|
-
loyaltyPointsOptions: z.object({
|
|
327
|
-
amount: z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
324
|
+
/* @__PURE__ */ z.object({
|
|
325
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
326
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.object({
|
|
327
|
+
amount: /* @__PURE__ */ z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
328
328
|
}).describe("Options for the Loyalty points reward type.")
|
|
329
329
|
})
|
|
330
330
|
])
|
|
331
331
|
).describe(
|
|
332
332
|
"Reward configuration for the referred friend.\nSpecifies the reward given to a new customer who was referred to the business."
|
|
333
333
|
).optional(),
|
|
334
|
-
referringCustomerReward: z.intersection(
|
|
335
|
-
z.object({
|
|
336
|
-
type: z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).optional()
|
|
334
|
+
referringCustomerReward: /* @__PURE__ */ z.intersection(
|
|
335
|
+
/* @__PURE__ */ z.object({
|
|
336
|
+
type: /* @__PURE__ */ z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).optional()
|
|
337
337
|
}),
|
|
338
|
-
z.xor([
|
|
339
|
-
z.object({
|
|
340
|
-
couponOptions: z.never().optional(),
|
|
341
|
-
loyaltyPointsOptions: z.never().optional()
|
|
338
|
+
/* @__PURE__ */ z.xor([
|
|
339
|
+
/* @__PURE__ */ z.object({
|
|
340
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
341
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional()
|
|
342
342
|
}),
|
|
343
|
-
z.object({
|
|
344
|
-
loyaltyPointsOptions: z.never().optional(),
|
|
345
|
-
couponOptions: z.intersection(
|
|
346
|
-
z.object({
|
|
347
|
-
name: z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
348
|
-
discountType: z.enum([
|
|
343
|
+
/* @__PURE__ */ z.object({
|
|
344
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional(),
|
|
345
|
+
couponOptions: /* @__PURE__ */ z.intersection(
|
|
346
|
+
/* @__PURE__ */ z.object({
|
|
347
|
+
name: /* @__PURE__ */ z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
348
|
+
discountType: /* @__PURE__ */ z.enum([
|
|
349
349
|
"UNKNOWN",
|
|
350
350
|
"FIXED_AMOUNT",
|
|
351
351
|
"PERCENTAGE",
|
|
352
352
|
"FREE_SHIPPING"
|
|
353
353
|
]).describe("Coupon discount type.").optional(),
|
|
354
|
-
limitedToOneItem: z.boolean().describe(
|
|
354
|
+
limitedToOneItem: /* @__PURE__ */ z.boolean().describe(
|
|
355
355
|
"Whether the coupon is limited to one item.\nIf `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\nCoupons with a bookings `scope.namespace` are always limited to one item."
|
|
356
356
|
).optional().nullable(),
|
|
357
|
-
appliesToSubscriptions: z.boolean().describe(
|
|
357
|
+
appliesToSubscriptions: /* @__PURE__ */ z.boolean().describe(
|
|
358
358
|
"Whether the coupon applies to subscription products."
|
|
359
359
|
).optional().nullable(),
|
|
360
|
-
discountedCycleCount: z.number().int().describe(
|
|
360
|
+
discountedCycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
361
361
|
"Specifies the amount of discounted cycles for a subscription item.\n\n- Can only be set when `scope.namespace = pricingPlans`.\n- If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n- `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n\nMax: `999`"
|
|
362
362
|
).optional().nullable()
|
|
363
363
|
}),
|
|
364
|
-
z.intersection(
|
|
365
|
-
z.xor([
|
|
366
|
-
z.object({
|
|
367
|
-
fixedAmountOptions: z.never().optional(),
|
|
368
|
-
percentageOptions: z.never().optional()
|
|
364
|
+
/* @__PURE__ */ z.intersection(
|
|
365
|
+
/* @__PURE__ */ z.xor([
|
|
366
|
+
/* @__PURE__ */ z.object({
|
|
367
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
368
|
+
percentageOptions: /* @__PURE__ */ z.never().optional()
|
|
369
369
|
}),
|
|
370
|
-
z.object({
|
|
371
|
-
percentageOptions: z.never().optional(),
|
|
372
|
-
fixedAmountOptions: z.object({
|
|
373
|
-
amount: z.number().describe(
|
|
370
|
+
/* @__PURE__ */ z.object({
|
|
371
|
+
percentageOptions: /* @__PURE__ */ z.never().optional(),
|
|
372
|
+
fixedAmountOptions: /* @__PURE__ */ z.object({
|
|
373
|
+
amount: /* @__PURE__ */ z.number().describe(
|
|
374
374
|
"Amount of the discount as a fixed value."
|
|
375
375
|
).min(0.01).optional()
|
|
376
376
|
}).describe("Options for fixed amount discount.")
|
|
377
377
|
}),
|
|
378
|
-
z.object({
|
|
379
|
-
fixedAmountOptions: z.never().optional(),
|
|
380
|
-
percentageOptions: z.object({
|
|
381
|
-
percentage: z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
378
|
+
/* @__PURE__ */ z.object({
|
|
379
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
380
|
+
percentageOptions: /* @__PURE__ */ z.object({
|
|
381
|
+
percentage: /* @__PURE__ */ z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
382
382
|
}).describe("Options for percentage discounts.")
|
|
383
383
|
})
|
|
384
384
|
]),
|
|
385
|
-
z.xor([
|
|
386
|
-
z.object({
|
|
387
|
-
minimumSubtotal: z.never().optional(),
|
|
388
|
-
scope: z.never().optional()
|
|
385
|
+
/* @__PURE__ */ z.xor([
|
|
386
|
+
/* @__PURE__ */ z.object({
|
|
387
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
388
|
+
scope: /* @__PURE__ */ z.never().optional()
|
|
389
389
|
}),
|
|
390
|
-
z.object({
|
|
391
|
-
scope: z.never().optional(),
|
|
392
|
-
minimumSubtotal: z.number().describe(
|
|
390
|
+
/* @__PURE__ */ z.object({
|
|
391
|
+
scope: /* @__PURE__ */ z.never().optional(),
|
|
392
|
+
minimumSubtotal: /* @__PURE__ */ z.number().describe(
|
|
393
393
|
"Limit the coupon to carts with a subtotal above this number."
|
|
394
394
|
)
|
|
395
395
|
}),
|
|
396
|
-
z.object({
|
|
397
|
-
minimumSubtotal: z.never().optional(),
|
|
398
|
-
scope: z.object({
|
|
399
|
-
namespace: z.string().describe(
|
|
396
|
+
/* @__PURE__ */ z.object({
|
|
397
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
398
|
+
scope: /* @__PURE__ */ z.object({
|
|
399
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
400
400
|
"Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)"
|
|
401
401
|
).optional(),
|
|
402
|
-
group: z.object({
|
|
403
|
-
name: z.string().describe("Name of the group.").optional(),
|
|
404
|
-
entityId: z.string().describe("Entity ID of the group.").optional().nullable()
|
|
402
|
+
group: /* @__PURE__ */ z.object({
|
|
403
|
+
name: /* @__PURE__ */ z.string().describe("Name of the group.").optional(),
|
|
404
|
+
entityId: /* @__PURE__ */ z.string().describe("Entity ID of the group.").optional().nullable()
|
|
405
405
|
}).describe(
|
|
406
406
|
"Coupon scope's applied group, for example, Event or ticket in Wix Events."
|
|
407
407
|
).optional()
|
|
@@ -413,18 +413,18 @@ var UpdateReferralProgramRequest = /* @__PURE__ */ z.object({
|
|
|
413
413
|
)
|
|
414
414
|
).describe("Options for coupon reward type.")
|
|
415
415
|
}),
|
|
416
|
-
z.object({
|
|
417
|
-
couponOptions: z.never().optional(),
|
|
418
|
-
loyaltyPointsOptions: z.object({
|
|
419
|
-
amount: z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
416
|
+
/* @__PURE__ */ z.object({
|
|
417
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
418
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.object({
|
|
419
|
+
amount: /* @__PURE__ */ z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
420
420
|
}).describe("Options for the Loyalty points reward type.")
|
|
421
421
|
})
|
|
422
422
|
])
|
|
423
423
|
).describe(
|
|
424
424
|
"Reward configuration for the referring customer.\nSpecifies the reward given to an existing customer who referred a new customer to the business."
|
|
425
425
|
).optional(),
|
|
426
|
-
successfulReferralActions: z.array(
|
|
427
|
-
z.enum([
|
|
426
|
+
successfulReferralActions: /* @__PURE__ */ z.array(
|
|
427
|
+
/* @__PURE__ */ z.enum([
|
|
428
428
|
"UNKNOWN",
|
|
429
429
|
"STORE_ORDER_PLACED",
|
|
430
430
|
"PLAN_ORDERED",
|
|
@@ -434,9 +434,9 @@ var UpdateReferralProgramRequest = /* @__PURE__ */ z.object({
|
|
|
434
434
|
"ONLINE_PROGRAM_JOINED"
|
|
435
435
|
])
|
|
436
436
|
).max(100).optional(),
|
|
437
|
-
emails: z.object({
|
|
438
|
-
encourageToReferFriends: z.array(
|
|
439
|
-
z.enum([
|
|
437
|
+
emails: /* @__PURE__ */ z.object({
|
|
438
|
+
encourageToReferFriends: /* @__PURE__ */ z.array(
|
|
439
|
+
/* @__PURE__ */ z.enum([
|
|
440
440
|
"UNKNOWN",
|
|
441
441
|
"STORES",
|
|
442
442
|
"PRICING_PLANS",
|
|
@@ -446,12 +446,12 @@ var UpdateReferralProgramRequest = /* @__PURE__ */ z.object({
|
|
|
446
446
|
"ONLINE_PROGRAMS"
|
|
447
447
|
])
|
|
448
448
|
).optional(),
|
|
449
|
-
notifyCustomersAboutReward: z.boolean().describe(
|
|
449
|
+
notifyCustomersAboutReward: /* @__PURE__ */ z.boolean().describe(
|
|
450
450
|
"Whether to send email notifications to referring customers when they receive a referral reward.\nIf true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order)."
|
|
451
451
|
).optional()
|
|
452
452
|
}).describe("Configures email notifications for the referral program.").optional(),
|
|
453
|
-
premiumFeatures: z.object({
|
|
454
|
-
referralProgram: z.boolean().describe(
|
|
453
|
+
premiumFeatures: /* @__PURE__ */ z.object({
|
|
454
|
+
referralProgram: /* @__PURE__ */ z.boolean().describe(
|
|
455
455
|
"Whether the site owner has access to the referral program feature."
|
|
456
456
|
).optional()
|
|
457
457
|
}).describe(
|
|
@@ -462,85 +462,85 @@ var UpdateReferralProgramRequest = /* @__PURE__ */ z.object({
|
|
|
462
462
|
)
|
|
463
463
|
});
|
|
464
464
|
var UpdateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
465
|
-
referralProgram: z.object({
|
|
466
|
-
name: z.string().describe("Referral program name.").min(2).max(50).optional().nullable(),
|
|
467
|
-
status: z.enum(["UNKNOWN", "DRAFT", "ACTIVE", "PAUSED"]).optional(),
|
|
468
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
465
|
+
referralProgram: /* @__PURE__ */ z.object({
|
|
466
|
+
name: /* @__PURE__ */ z.string().describe("Referral program name.").min(2).max(50).optional().nullable(),
|
|
467
|
+
status: /* @__PURE__ */ z.enum(["UNKNOWN", "DRAFT", "ACTIVE", "PAUSED"]).optional(),
|
|
468
|
+
revision: /* @__PURE__ */ z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
469
469
|
"Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current `revision` must be passed when updating the program."
|
|
470
470
|
).optional().nullable(),
|
|
471
|
-
_createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
|
|
472
|
-
_updatedDate: z.date().describe("Date and time the program was last updated.").optional().nullable(),
|
|
473
|
-
referredFriendReward: z.intersection(
|
|
474
|
-
z.object({
|
|
475
|
-
type: z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
471
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the program was created.").optional().nullable(),
|
|
472
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the program was last updated.").optional().nullable(),
|
|
473
|
+
referredFriendReward: /* @__PURE__ */ z.intersection(
|
|
474
|
+
/* @__PURE__ */ z.object({
|
|
475
|
+
type: /* @__PURE__ */ z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
476
476
|
}),
|
|
477
|
-
z.xor([
|
|
478
|
-
z.object({
|
|
479
|
-
couponOptions: z.never().optional(),
|
|
480
|
-
loyaltyPointsOptions: z.never().optional()
|
|
477
|
+
/* @__PURE__ */ z.xor([
|
|
478
|
+
/* @__PURE__ */ z.object({
|
|
479
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
480
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional()
|
|
481
481
|
}),
|
|
482
|
-
z.object({
|
|
483
|
-
loyaltyPointsOptions: z.never().optional(),
|
|
484
|
-
couponOptions: z.intersection(
|
|
485
|
-
z.object({
|
|
486
|
-
name: z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
487
|
-
discountType: z.enum([
|
|
482
|
+
/* @__PURE__ */ z.object({
|
|
483
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional(),
|
|
484
|
+
couponOptions: /* @__PURE__ */ z.intersection(
|
|
485
|
+
/* @__PURE__ */ z.object({
|
|
486
|
+
name: /* @__PURE__ */ z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
487
|
+
discountType: /* @__PURE__ */ z.enum([
|
|
488
488
|
"UNKNOWN",
|
|
489
489
|
"FIXED_AMOUNT",
|
|
490
490
|
"PERCENTAGE",
|
|
491
491
|
"FREE_SHIPPING"
|
|
492
492
|
]).describe("Coupon discount type.").optional(),
|
|
493
|
-
limitedToOneItem: z.boolean().describe(
|
|
493
|
+
limitedToOneItem: /* @__PURE__ */ z.boolean().describe(
|
|
494
494
|
"Whether the coupon is limited to one item.\nIf `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\nCoupons with a bookings `scope.namespace` are always limited to one item."
|
|
495
495
|
).optional().nullable(),
|
|
496
|
-
appliesToSubscriptions: z.boolean().describe(
|
|
496
|
+
appliesToSubscriptions: /* @__PURE__ */ z.boolean().describe(
|
|
497
497
|
"Whether the coupon applies to subscription products."
|
|
498
498
|
).optional().nullable(),
|
|
499
|
-
discountedCycleCount: z.number().int().describe(
|
|
499
|
+
discountedCycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
500
500
|
"Specifies the amount of discounted cycles for a subscription item.\n\n- Can only be set when `scope.namespace = pricingPlans`.\n- If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n- `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n\nMax: `999`"
|
|
501
501
|
).optional().nullable()
|
|
502
502
|
}),
|
|
503
|
-
z.intersection(
|
|
504
|
-
z.xor([
|
|
505
|
-
z.object({
|
|
506
|
-
fixedAmountOptions: z.never().optional(),
|
|
507
|
-
percentageOptions: z.never().optional()
|
|
503
|
+
/* @__PURE__ */ z.intersection(
|
|
504
|
+
/* @__PURE__ */ z.xor([
|
|
505
|
+
/* @__PURE__ */ z.object({
|
|
506
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
507
|
+
percentageOptions: /* @__PURE__ */ z.never().optional()
|
|
508
508
|
}),
|
|
509
|
-
z.object({
|
|
510
|
-
percentageOptions: z.never().optional(),
|
|
511
|
-
fixedAmountOptions: z.object({
|
|
512
|
-
amount: z.number().describe(
|
|
509
|
+
/* @__PURE__ */ z.object({
|
|
510
|
+
percentageOptions: /* @__PURE__ */ z.never().optional(),
|
|
511
|
+
fixedAmountOptions: /* @__PURE__ */ z.object({
|
|
512
|
+
amount: /* @__PURE__ */ z.number().describe(
|
|
513
513
|
"Amount of the discount as a fixed value."
|
|
514
514
|
).min(0.01).optional()
|
|
515
515
|
}).describe("Options for fixed amount discount.")
|
|
516
516
|
}),
|
|
517
|
-
z.object({
|
|
518
|
-
fixedAmountOptions: z.never().optional(),
|
|
519
|
-
percentageOptions: z.object({
|
|
520
|
-
percentage: z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
517
|
+
/* @__PURE__ */ z.object({
|
|
518
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
519
|
+
percentageOptions: /* @__PURE__ */ z.object({
|
|
520
|
+
percentage: /* @__PURE__ */ z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
521
521
|
}).describe("Options for percentage discounts.")
|
|
522
522
|
})
|
|
523
523
|
]),
|
|
524
|
-
z.xor([
|
|
525
|
-
z.object({
|
|
526
|
-
minimumSubtotal: z.never().optional(),
|
|
527
|
-
scope: z.never().optional()
|
|
524
|
+
/* @__PURE__ */ z.xor([
|
|
525
|
+
/* @__PURE__ */ z.object({
|
|
526
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
527
|
+
scope: /* @__PURE__ */ z.never().optional()
|
|
528
528
|
}),
|
|
529
|
-
z.object({
|
|
530
|
-
scope: z.never().optional(),
|
|
531
|
-
minimumSubtotal: z.number().describe(
|
|
529
|
+
/* @__PURE__ */ z.object({
|
|
530
|
+
scope: /* @__PURE__ */ z.never().optional(),
|
|
531
|
+
minimumSubtotal: /* @__PURE__ */ z.number().describe(
|
|
532
532
|
"Limit the coupon to carts with a subtotal above this number."
|
|
533
533
|
)
|
|
534
534
|
}),
|
|
535
|
-
z.object({
|
|
536
|
-
minimumSubtotal: z.never().optional(),
|
|
537
|
-
scope: z.object({
|
|
538
|
-
namespace: z.string().describe(
|
|
535
|
+
/* @__PURE__ */ z.object({
|
|
536
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
537
|
+
scope: /* @__PURE__ */ z.object({
|
|
538
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
539
539
|
"Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)"
|
|
540
540
|
).optional(),
|
|
541
|
-
group: z.object({
|
|
542
|
-
name: z.string().describe("Name of the group.").optional(),
|
|
543
|
-
entityId: z.string().describe("Entity ID of the group.").optional().nullable()
|
|
541
|
+
group: /* @__PURE__ */ z.object({
|
|
542
|
+
name: /* @__PURE__ */ z.string().describe("Name of the group.").optional(),
|
|
543
|
+
entityId: /* @__PURE__ */ z.string().describe("Entity ID of the group.").optional().nullable()
|
|
544
544
|
}).describe(
|
|
545
545
|
"Coupon scope's applied group, for example, Event or ticket in Wix Events."
|
|
546
546
|
).optional()
|
|
@@ -552,87 +552,87 @@ var UpdateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
552
552
|
)
|
|
553
553
|
).describe("Options for coupon reward type.")
|
|
554
554
|
}),
|
|
555
|
-
z.object({
|
|
556
|
-
couponOptions: z.never().optional(),
|
|
557
|
-
loyaltyPointsOptions: z.object({
|
|
558
|
-
amount: z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
555
|
+
/* @__PURE__ */ z.object({
|
|
556
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
557
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.object({
|
|
558
|
+
amount: /* @__PURE__ */ z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
559
559
|
}).describe("Options for the Loyalty points reward type.")
|
|
560
560
|
})
|
|
561
561
|
])
|
|
562
562
|
).describe(
|
|
563
563
|
"Reward configuration for the referred friend.\nSpecifies the reward given to a new customer who was referred to the business."
|
|
564
564
|
).optional(),
|
|
565
|
-
referringCustomerReward: z.intersection(
|
|
566
|
-
z.object({
|
|
567
|
-
type: z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
565
|
+
referringCustomerReward: /* @__PURE__ */ z.intersection(
|
|
566
|
+
/* @__PURE__ */ z.object({
|
|
567
|
+
type: /* @__PURE__ */ z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
568
568
|
}),
|
|
569
|
-
z.xor([
|
|
570
|
-
z.object({
|
|
571
|
-
couponOptions: z.never().optional(),
|
|
572
|
-
loyaltyPointsOptions: z.never().optional()
|
|
569
|
+
/* @__PURE__ */ z.xor([
|
|
570
|
+
/* @__PURE__ */ z.object({
|
|
571
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
572
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional()
|
|
573
573
|
}),
|
|
574
|
-
z.object({
|
|
575
|
-
loyaltyPointsOptions: z.never().optional(),
|
|
576
|
-
couponOptions: z.intersection(
|
|
577
|
-
z.object({
|
|
578
|
-
name: z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
579
|
-
discountType: z.enum([
|
|
574
|
+
/* @__PURE__ */ z.object({
|
|
575
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional(),
|
|
576
|
+
couponOptions: /* @__PURE__ */ z.intersection(
|
|
577
|
+
/* @__PURE__ */ z.object({
|
|
578
|
+
name: /* @__PURE__ */ z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
579
|
+
discountType: /* @__PURE__ */ z.enum([
|
|
580
580
|
"UNKNOWN",
|
|
581
581
|
"FIXED_AMOUNT",
|
|
582
582
|
"PERCENTAGE",
|
|
583
583
|
"FREE_SHIPPING"
|
|
584
584
|
]).describe("Coupon discount type.").optional(),
|
|
585
|
-
limitedToOneItem: z.boolean().describe(
|
|
585
|
+
limitedToOneItem: /* @__PURE__ */ z.boolean().describe(
|
|
586
586
|
"Whether the coupon is limited to one item.\nIf `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\nCoupons with a bookings `scope.namespace` are always limited to one item."
|
|
587
587
|
).optional().nullable(),
|
|
588
|
-
appliesToSubscriptions: z.boolean().describe(
|
|
588
|
+
appliesToSubscriptions: /* @__PURE__ */ z.boolean().describe(
|
|
589
589
|
"Whether the coupon applies to subscription products."
|
|
590
590
|
).optional().nullable(),
|
|
591
|
-
discountedCycleCount: z.number().int().describe(
|
|
591
|
+
discountedCycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
592
592
|
"Specifies the amount of discounted cycles for a subscription item.\n\n- Can only be set when `scope.namespace = pricingPlans`.\n- If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n- `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n\nMax: `999`"
|
|
593
593
|
).optional().nullable()
|
|
594
594
|
}),
|
|
595
|
-
z.intersection(
|
|
596
|
-
z.xor([
|
|
597
|
-
z.object({
|
|
598
|
-
fixedAmountOptions: z.never().optional(),
|
|
599
|
-
percentageOptions: z.never().optional()
|
|
595
|
+
/* @__PURE__ */ z.intersection(
|
|
596
|
+
/* @__PURE__ */ z.xor([
|
|
597
|
+
/* @__PURE__ */ z.object({
|
|
598
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
599
|
+
percentageOptions: /* @__PURE__ */ z.never().optional()
|
|
600
600
|
}),
|
|
601
|
-
z.object({
|
|
602
|
-
percentageOptions: z.never().optional(),
|
|
603
|
-
fixedAmountOptions: z.object({
|
|
604
|
-
amount: z.number().describe(
|
|
601
|
+
/* @__PURE__ */ z.object({
|
|
602
|
+
percentageOptions: /* @__PURE__ */ z.never().optional(),
|
|
603
|
+
fixedAmountOptions: /* @__PURE__ */ z.object({
|
|
604
|
+
amount: /* @__PURE__ */ z.number().describe(
|
|
605
605
|
"Amount of the discount as a fixed value."
|
|
606
606
|
).min(0.01).optional()
|
|
607
607
|
}).describe("Options for fixed amount discount.")
|
|
608
608
|
}),
|
|
609
|
-
z.object({
|
|
610
|
-
fixedAmountOptions: z.never().optional(),
|
|
611
|
-
percentageOptions: z.object({
|
|
612
|
-
percentage: z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
609
|
+
/* @__PURE__ */ z.object({
|
|
610
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
611
|
+
percentageOptions: /* @__PURE__ */ z.object({
|
|
612
|
+
percentage: /* @__PURE__ */ z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
613
613
|
}).describe("Options for percentage discounts.")
|
|
614
614
|
})
|
|
615
615
|
]),
|
|
616
|
-
z.xor([
|
|
617
|
-
z.object({
|
|
618
|
-
minimumSubtotal: z.never().optional(),
|
|
619
|
-
scope: z.never().optional()
|
|
616
|
+
/* @__PURE__ */ z.xor([
|
|
617
|
+
/* @__PURE__ */ z.object({
|
|
618
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
619
|
+
scope: /* @__PURE__ */ z.never().optional()
|
|
620
620
|
}),
|
|
621
|
-
z.object({
|
|
622
|
-
scope: z.never().optional(),
|
|
623
|
-
minimumSubtotal: z.number().describe(
|
|
621
|
+
/* @__PURE__ */ z.object({
|
|
622
|
+
scope: /* @__PURE__ */ z.never().optional(),
|
|
623
|
+
minimumSubtotal: /* @__PURE__ */ z.number().describe(
|
|
624
624
|
"Limit the coupon to carts with a subtotal above this number."
|
|
625
625
|
)
|
|
626
626
|
}),
|
|
627
|
-
z.object({
|
|
628
|
-
minimumSubtotal: z.never().optional(),
|
|
629
|
-
scope: z.object({
|
|
630
|
-
namespace: z.string().describe(
|
|
627
|
+
/* @__PURE__ */ z.object({
|
|
628
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
629
|
+
scope: /* @__PURE__ */ z.object({
|
|
630
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
631
631
|
"Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)"
|
|
632
632
|
).optional(),
|
|
633
|
-
group: z.object({
|
|
634
|
-
name: z.string().describe("Name of the group.").optional(),
|
|
635
|
-
entityId: z.string().describe("Entity ID of the group.").optional().nullable()
|
|
633
|
+
group: /* @__PURE__ */ z.object({
|
|
634
|
+
name: /* @__PURE__ */ z.string().describe("Name of the group.").optional(),
|
|
635
|
+
entityId: /* @__PURE__ */ z.string().describe("Entity ID of the group.").optional().nullable()
|
|
636
636
|
}).describe(
|
|
637
637
|
"Coupon scope's applied group, for example, Event or ticket in Wix Events."
|
|
638
638
|
).optional()
|
|
@@ -644,18 +644,18 @@ var UpdateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
644
644
|
)
|
|
645
645
|
).describe("Options for coupon reward type.")
|
|
646
646
|
}),
|
|
647
|
-
z.object({
|
|
648
|
-
couponOptions: z.never().optional(),
|
|
649
|
-
loyaltyPointsOptions: z.object({
|
|
650
|
-
amount: z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
647
|
+
/* @__PURE__ */ z.object({
|
|
648
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
649
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.object({
|
|
650
|
+
amount: /* @__PURE__ */ z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
651
651
|
}).describe("Options for the Loyalty points reward type.")
|
|
652
652
|
})
|
|
653
653
|
])
|
|
654
654
|
).describe(
|
|
655
655
|
"Reward configuration for the referring customer.\nSpecifies the reward given to an existing customer who referred a new customer to the business."
|
|
656
656
|
).optional(),
|
|
657
|
-
successfulReferralActions: z.array(
|
|
658
|
-
z.enum([
|
|
657
|
+
successfulReferralActions: /* @__PURE__ */ z.array(
|
|
658
|
+
/* @__PURE__ */ z.enum([
|
|
659
659
|
"UNKNOWN",
|
|
660
660
|
"STORE_ORDER_PLACED",
|
|
661
661
|
"PLAN_ORDERED",
|
|
@@ -665,9 +665,9 @@ var UpdateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
665
665
|
"ONLINE_PROGRAM_JOINED"
|
|
666
666
|
])
|
|
667
667
|
).max(100).optional(),
|
|
668
|
-
emails: z.object({
|
|
669
|
-
encourageToReferFriends: z.array(
|
|
670
|
-
z.enum([
|
|
668
|
+
emails: /* @__PURE__ */ z.object({
|
|
669
|
+
encourageToReferFriends: /* @__PURE__ */ z.array(
|
|
670
|
+
/* @__PURE__ */ z.enum([
|
|
671
671
|
"UNKNOWN",
|
|
672
672
|
"STORES",
|
|
673
673
|
"PRICING_PLANS",
|
|
@@ -677,12 +677,12 @@ var UpdateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
677
677
|
"ONLINE_PROGRAMS"
|
|
678
678
|
])
|
|
679
679
|
).optional(),
|
|
680
|
-
notifyCustomersAboutReward: z.boolean().describe(
|
|
680
|
+
notifyCustomersAboutReward: /* @__PURE__ */ z.boolean().describe(
|
|
681
681
|
"Whether to send email notifications to referring customers when they receive a referral reward.\nIf true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order)."
|
|
682
682
|
).optional()
|
|
683
683
|
}).describe("Configures email notifications for the referral program.").optional(),
|
|
684
|
-
premiumFeatures: z.object({
|
|
685
|
-
referralProgram: z.boolean().describe(
|
|
684
|
+
premiumFeatures: /* @__PURE__ */ z.object({
|
|
685
|
+
referralProgram: /* @__PURE__ */ z.boolean().describe(
|
|
686
686
|
"Whether the site owner has access to the referral program feature."
|
|
687
687
|
).optional()
|
|
688
688
|
}).describe(
|
|
@@ -692,85 +692,85 @@ var UpdateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
692
692
|
});
|
|
693
693
|
var ActivateReferralProgramRequest = /* @__PURE__ */ z.object({});
|
|
694
694
|
var ActivateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
695
|
-
referralProgram: z.object({
|
|
696
|
-
name: z.string().describe("Referral program name.").min(2).max(50).optional().nullable(),
|
|
697
|
-
status: z.enum(["UNKNOWN", "DRAFT", "ACTIVE", "PAUSED"]).optional(),
|
|
698
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
695
|
+
referralProgram: /* @__PURE__ */ z.object({
|
|
696
|
+
name: /* @__PURE__ */ z.string().describe("Referral program name.").min(2).max(50).optional().nullable(),
|
|
697
|
+
status: /* @__PURE__ */ z.enum(["UNKNOWN", "DRAFT", "ACTIVE", "PAUSED"]).optional(),
|
|
698
|
+
revision: /* @__PURE__ */ z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
699
699
|
"Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current `revision` must be passed when updating the program."
|
|
700
700
|
).optional().nullable(),
|
|
701
|
-
_createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
|
|
702
|
-
_updatedDate: z.date().describe("Date and time the program was last updated.").optional().nullable(),
|
|
703
|
-
referredFriendReward: z.intersection(
|
|
704
|
-
z.object({
|
|
705
|
-
type: z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
701
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the program was created.").optional().nullable(),
|
|
702
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the program was last updated.").optional().nullable(),
|
|
703
|
+
referredFriendReward: /* @__PURE__ */ z.intersection(
|
|
704
|
+
/* @__PURE__ */ z.object({
|
|
705
|
+
type: /* @__PURE__ */ z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
706
706
|
}),
|
|
707
|
-
z.xor([
|
|
708
|
-
z.object({
|
|
709
|
-
couponOptions: z.never().optional(),
|
|
710
|
-
loyaltyPointsOptions: z.never().optional()
|
|
707
|
+
/* @__PURE__ */ z.xor([
|
|
708
|
+
/* @__PURE__ */ z.object({
|
|
709
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
710
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional()
|
|
711
711
|
}),
|
|
712
|
-
z.object({
|
|
713
|
-
loyaltyPointsOptions: z.never().optional(),
|
|
714
|
-
couponOptions: z.intersection(
|
|
715
|
-
z.object({
|
|
716
|
-
name: z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
717
|
-
discountType: z.enum([
|
|
712
|
+
/* @__PURE__ */ z.object({
|
|
713
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional(),
|
|
714
|
+
couponOptions: /* @__PURE__ */ z.intersection(
|
|
715
|
+
/* @__PURE__ */ z.object({
|
|
716
|
+
name: /* @__PURE__ */ z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
717
|
+
discountType: /* @__PURE__ */ z.enum([
|
|
718
718
|
"UNKNOWN",
|
|
719
719
|
"FIXED_AMOUNT",
|
|
720
720
|
"PERCENTAGE",
|
|
721
721
|
"FREE_SHIPPING"
|
|
722
722
|
]).describe("Coupon discount type.").optional(),
|
|
723
|
-
limitedToOneItem: z.boolean().describe(
|
|
723
|
+
limitedToOneItem: /* @__PURE__ */ z.boolean().describe(
|
|
724
724
|
"Whether the coupon is limited to one item.\nIf `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\nCoupons with a bookings `scope.namespace` are always limited to one item."
|
|
725
725
|
).optional().nullable(),
|
|
726
|
-
appliesToSubscriptions: z.boolean().describe(
|
|
726
|
+
appliesToSubscriptions: /* @__PURE__ */ z.boolean().describe(
|
|
727
727
|
"Whether the coupon applies to subscription products."
|
|
728
728
|
).optional().nullable(),
|
|
729
|
-
discountedCycleCount: z.number().int().describe(
|
|
729
|
+
discountedCycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
730
730
|
"Specifies the amount of discounted cycles for a subscription item.\n\n- Can only be set when `scope.namespace = pricingPlans`.\n- If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n- `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n\nMax: `999`"
|
|
731
731
|
).optional().nullable()
|
|
732
732
|
}),
|
|
733
|
-
z.intersection(
|
|
734
|
-
z.xor([
|
|
735
|
-
z.object({
|
|
736
|
-
fixedAmountOptions: z.never().optional(),
|
|
737
|
-
percentageOptions: z.never().optional()
|
|
733
|
+
/* @__PURE__ */ z.intersection(
|
|
734
|
+
/* @__PURE__ */ z.xor([
|
|
735
|
+
/* @__PURE__ */ z.object({
|
|
736
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
737
|
+
percentageOptions: /* @__PURE__ */ z.never().optional()
|
|
738
738
|
}),
|
|
739
|
-
z.object({
|
|
740
|
-
percentageOptions: z.never().optional(),
|
|
741
|
-
fixedAmountOptions: z.object({
|
|
742
|
-
amount: z.number().describe(
|
|
739
|
+
/* @__PURE__ */ z.object({
|
|
740
|
+
percentageOptions: /* @__PURE__ */ z.never().optional(),
|
|
741
|
+
fixedAmountOptions: /* @__PURE__ */ z.object({
|
|
742
|
+
amount: /* @__PURE__ */ z.number().describe(
|
|
743
743
|
"Amount of the discount as a fixed value."
|
|
744
744
|
).min(0.01).optional()
|
|
745
745
|
}).describe("Options for fixed amount discount.")
|
|
746
746
|
}),
|
|
747
|
-
z.object({
|
|
748
|
-
fixedAmountOptions: z.never().optional(),
|
|
749
|
-
percentageOptions: z.object({
|
|
750
|
-
percentage: z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
747
|
+
/* @__PURE__ */ z.object({
|
|
748
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
749
|
+
percentageOptions: /* @__PURE__ */ z.object({
|
|
750
|
+
percentage: /* @__PURE__ */ z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
751
751
|
}).describe("Options for percentage discounts.")
|
|
752
752
|
})
|
|
753
753
|
]),
|
|
754
|
-
z.xor([
|
|
755
|
-
z.object({
|
|
756
|
-
minimumSubtotal: z.never().optional(),
|
|
757
|
-
scope: z.never().optional()
|
|
754
|
+
/* @__PURE__ */ z.xor([
|
|
755
|
+
/* @__PURE__ */ z.object({
|
|
756
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
757
|
+
scope: /* @__PURE__ */ z.never().optional()
|
|
758
758
|
}),
|
|
759
|
-
z.object({
|
|
760
|
-
scope: z.never().optional(),
|
|
761
|
-
minimumSubtotal: z.number().describe(
|
|
759
|
+
/* @__PURE__ */ z.object({
|
|
760
|
+
scope: /* @__PURE__ */ z.never().optional(),
|
|
761
|
+
minimumSubtotal: /* @__PURE__ */ z.number().describe(
|
|
762
762
|
"Limit the coupon to carts with a subtotal above this number."
|
|
763
763
|
)
|
|
764
764
|
}),
|
|
765
|
-
z.object({
|
|
766
|
-
minimumSubtotal: z.never().optional(),
|
|
767
|
-
scope: z.object({
|
|
768
|
-
namespace: z.string().describe(
|
|
765
|
+
/* @__PURE__ */ z.object({
|
|
766
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
767
|
+
scope: /* @__PURE__ */ z.object({
|
|
768
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
769
769
|
"Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)"
|
|
770
770
|
).optional(),
|
|
771
|
-
group: z.object({
|
|
772
|
-
name: z.string().describe("Name of the group.").optional(),
|
|
773
|
-
entityId: z.string().describe("Entity ID of the group.").optional().nullable()
|
|
771
|
+
group: /* @__PURE__ */ z.object({
|
|
772
|
+
name: /* @__PURE__ */ z.string().describe("Name of the group.").optional(),
|
|
773
|
+
entityId: /* @__PURE__ */ z.string().describe("Entity ID of the group.").optional().nullable()
|
|
774
774
|
}).describe(
|
|
775
775
|
"Coupon scope's applied group, for example, Event or ticket in Wix Events."
|
|
776
776
|
).optional()
|
|
@@ -782,87 +782,87 @@ var ActivateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
782
782
|
)
|
|
783
783
|
).describe("Options for coupon reward type.")
|
|
784
784
|
}),
|
|
785
|
-
z.object({
|
|
786
|
-
couponOptions: z.never().optional(),
|
|
787
|
-
loyaltyPointsOptions: z.object({
|
|
788
|
-
amount: z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
785
|
+
/* @__PURE__ */ z.object({
|
|
786
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
787
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.object({
|
|
788
|
+
amount: /* @__PURE__ */ z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
789
789
|
}).describe("Options for the Loyalty points reward type.")
|
|
790
790
|
})
|
|
791
791
|
])
|
|
792
792
|
).describe(
|
|
793
793
|
"Reward configuration for the referred friend.\nSpecifies the reward given to a new customer who was referred to the business."
|
|
794
794
|
).optional(),
|
|
795
|
-
referringCustomerReward: z.intersection(
|
|
796
|
-
z.object({
|
|
797
|
-
type: z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
795
|
+
referringCustomerReward: /* @__PURE__ */ z.intersection(
|
|
796
|
+
/* @__PURE__ */ z.object({
|
|
797
|
+
type: /* @__PURE__ */ z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
798
798
|
}),
|
|
799
|
-
z.xor([
|
|
800
|
-
z.object({
|
|
801
|
-
couponOptions: z.never().optional(),
|
|
802
|
-
loyaltyPointsOptions: z.never().optional()
|
|
799
|
+
/* @__PURE__ */ z.xor([
|
|
800
|
+
/* @__PURE__ */ z.object({
|
|
801
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
802
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional()
|
|
803
803
|
}),
|
|
804
|
-
z.object({
|
|
805
|
-
loyaltyPointsOptions: z.never().optional(),
|
|
806
|
-
couponOptions: z.intersection(
|
|
807
|
-
z.object({
|
|
808
|
-
name: z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
809
|
-
discountType: z.enum([
|
|
804
|
+
/* @__PURE__ */ z.object({
|
|
805
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional(),
|
|
806
|
+
couponOptions: /* @__PURE__ */ z.intersection(
|
|
807
|
+
/* @__PURE__ */ z.object({
|
|
808
|
+
name: /* @__PURE__ */ z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
809
|
+
discountType: /* @__PURE__ */ z.enum([
|
|
810
810
|
"UNKNOWN",
|
|
811
811
|
"FIXED_AMOUNT",
|
|
812
812
|
"PERCENTAGE",
|
|
813
813
|
"FREE_SHIPPING"
|
|
814
814
|
]).describe("Coupon discount type.").optional(),
|
|
815
|
-
limitedToOneItem: z.boolean().describe(
|
|
815
|
+
limitedToOneItem: /* @__PURE__ */ z.boolean().describe(
|
|
816
816
|
"Whether the coupon is limited to one item.\nIf `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\nCoupons with a bookings `scope.namespace` are always limited to one item."
|
|
817
817
|
).optional().nullable(),
|
|
818
|
-
appliesToSubscriptions: z.boolean().describe(
|
|
818
|
+
appliesToSubscriptions: /* @__PURE__ */ z.boolean().describe(
|
|
819
819
|
"Whether the coupon applies to subscription products."
|
|
820
820
|
).optional().nullable(),
|
|
821
|
-
discountedCycleCount: z.number().int().describe(
|
|
821
|
+
discountedCycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
822
822
|
"Specifies the amount of discounted cycles for a subscription item.\n\n- Can only be set when `scope.namespace = pricingPlans`.\n- If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n- `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n\nMax: `999`"
|
|
823
823
|
).optional().nullable()
|
|
824
824
|
}),
|
|
825
|
-
z.intersection(
|
|
826
|
-
z.xor([
|
|
827
|
-
z.object({
|
|
828
|
-
fixedAmountOptions: z.never().optional(),
|
|
829
|
-
percentageOptions: z.never().optional()
|
|
825
|
+
/* @__PURE__ */ z.intersection(
|
|
826
|
+
/* @__PURE__ */ z.xor([
|
|
827
|
+
/* @__PURE__ */ z.object({
|
|
828
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
829
|
+
percentageOptions: /* @__PURE__ */ z.never().optional()
|
|
830
830
|
}),
|
|
831
|
-
z.object({
|
|
832
|
-
percentageOptions: z.never().optional(),
|
|
833
|
-
fixedAmountOptions: z.object({
|
|
834
|
-
amount: z.number().describe(
|
|
831
|
+
/* @__PURE__ */ z.object({
|
|
832
|
+
percentageOptions: /* @__PURE__ */ z.never().optional(),
|
|
833
|
+
fixedAmountOptions: /* @__PURE__ */ z.object({
|
|
834
|
+
amount: /* @__PURE__ */ z.number().describe(
|
|
835
835
|
"Amount of the discount as a fixed value."
|
|
836
836
|
).min(0.01).optional()
|
|
837
837
|
}).describe("Options for fixed amount discount.")
|
|
838
838
|
}),
|
|
839
|
-
z.object({
|
|
840
|
-
fixedAmountOptions: z.never().optional(),
|
|
841
|
-
percentageOptions: z.object({
|
|
842
|
-
percentage: z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
839
|
+
/* @__PURE__ */ z.object({
|
|
840
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
841
|
+
percentageOptions: /* @__PURE__ */ z.object({
|
|
842
|
+
percentage: /* @__PURE__ */ z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
843
843
|
}).describe("Options for percentage discounts.")
|
|
844
844
|
})
|
|
845
845
|
]),
|
|
846
|
-
z.xor([
|
|
847
|
-
z.object({
|
|
848
|
-
minimumSubtotal: z.never().optional(),
|
|
849
|
-
scope: z.never().optional()
|
|
846
|
+
/* @__PURE__ */ z.xor([
|
|
847
|
+
/* @__PURE__ */ z.object({
|
|
848
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
849
|
+
scope: /* @__PURE__ */ z.never().optional()
|
|
850
850
|
}),
|
|
851
|
-
z.object({
|
|
852
|
-
scope: z.never().optional(),
|
|
853
|
-
minimumSubtotal: z.number().describe(
|
|
851
|
+
/* @__PURE__ */ z.object({
|
|
852
|
+
scope: /* @__PURE__ */ z.never().optional(),
|
|
853
|
+
minimumSubtotal: /* @__PURE__ */ z.number().describe(
|
|
854
854
|
"Limit the coupon to carts with a subtotal above this number."
|
|
855
855
|
)
|
|
856
856
|
}),
|
|
857
|
-
z.object({
|
|
858
|
-
minimumSubtotal: z.never().optional(),
|
|
859
|
-
scope: z.object({
|
|
860
|
-
namespace: z.string().describe(
|
|
857
|
+
/* @__PURE__ */ z.object({
|
|
858
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
859
|
+
scope: /* @__PURE__ */ z.object({
|
|
860
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
861
861
|
"Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)"
|
|
862
862
|
).optional(),
|
|
863
|
-
group: z.object({
|
|
864
|
-
name: z.string().describe("Name of the group.").optional(),
|
|
865
|
-
entityId: z.string().describe("Entity ID of the group.").optional().nullable()
|
|
863
|
+
group: /* @__PURE__ */ z.object({
|
|
864
|
+
name: /* @__PURE__ */ z.string().describe("Name of the group.").optional(),
|
|
865
|
+
entityId: /* @__PURE__ */ z.string().describe("Entity ID of the group.").optional().nullable()
|
|
866
866
|
}).describe(
|
|
867
867
|
"Coupon scope's applied group, for example, Event or ticket in Wix Events."
|
|
868
868
|
).optional()
|
|
@@ -874,18 +874,18 @@ var ActivateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
874
874
|
)
|
|
875
875
|
).describe("Options for coupon reward type.")
|
|
876
876
|
}),
|
|
877
|
-
z.object({
|
|
878
|
-
couponOptions: z.never().optional(),
|
|
879
|
-
loyaltyPointsOptions: z.object({
|
|
880
|
-
amount: z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
877
|
+
/* @__PURE__ */ z.object({
|
|
878
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
879
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.object({
|
|
880
|
+
amount: /* @__PURE__ */ z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
881
881
|
}).describe("Options for the Loyalty points reward type.")
|
|
882
882
|
})
|
|
883
883
|
])
|
|
884
884
|
).describe(
|
|
885
885
|
"Reward configuration for the referring customer.\nSpecifies the reward given to an existing customer who referred a new customer to the business."
|
|
886
886
|
).optional(),
|
|
887
|
-
successfulReferralActions: z.array(
|
|
888
|
-
z.enum([
|
|
887
|
+
successfulReferralActions: /* @__PURE__ */ z.array(
|
|
888
|
+
/* @__PURE__ */ z.enum([
|
|
889
889
|
"UNKNOWN",
|
|
890
890
|
"STORE_ORDER_PLACED",
|
|
891
891
|
"PLAN_ORDERED",
|
|
@@ -895,9 +895,9 @@ var ActivateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
895
895
|
"ONLINE_PROGRAM_JOINED"
|
|
896
896
|
])
|
|
897
897
|
).max(100).optional(),
|
|
898
|
-
emails: z.object({
|
|
899
|
-
encourageToReferFriends: z.array(
|
|
900
|
-
z.enum([
|
|
898
|
+
emails: /* @__PURE__ */ z.object({
|
|
899
|
+
encourageToReferFriends: /* @__PURE__ */ z.array(
|
|
900
|
+
/* @__PURE__ */ z.enum([
|
|
901
901
|
"UNKNOWN",
|
|
902
902
|
"STORES",
|
|
903
903
|
"PRICING_PLANS",
|
|
@@ -907,12 +907,12 @@ var ActivateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
907
907
|
"ONLINE_PROGRAMS"
|
|
908
908
|
])
|
|
909
909
|
).optional(),
|
|
910
|
-
notifyCustomersAboutReward: z.boolean().describe(
|
|
910
|
+
notifyCustomersAboutReward: /* @__PURE__ */ z.boolean().describe(
|
|
911
911
|
"Whether to send email notifications to referring customers when they receive a referral reward.\nIf true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order)."
|
|
912
912
|
).optional()
|
|
913
913
|
}).describe("Configures email notifications for the referral program.").optional(),
|
|
914
|
-
premiumFeatures: z.object({
|
|
915
|
-
referralProgram: z.boolean().describe(
|
|
914
|
+
premiumFeatures: /* @__PURE__ */ z.object({
|
|
915
|
+
referralProgram: /* @__PURE__ */ z.boolean().describe(
|
|
916
916
|
"Whether the site owner has access to the referral program feature."
|
|
917
917
|
).optional()
|
|
918
918
|
}).describe(
|
|
@@ -922,85 +922,85 @@ var ActivateReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
922
922
|
});
|
|
923
923
|
var PauseReferralProgramRequest = /* @__PURE__ */ z.object({});
|
|
924
924
|
var PauseReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
925
|
-
referralProgram: z.object({
|
|
926
|
-
name: z.string().describe("Referral program name.").min(2).max(50).optional().nullable(),
|
|
927
|
-
status: z.enum(["UNKNOWN", "DRAFT", "ACTIVE", "PAUSED"]).optional(),
|
|
928
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
925
|
+
referralProgram: /* @__PURE__ */ z.object({
|
|
926
|
+
name: /* @__PURE__ */ z.string().describe("Referral program name.").min(2).max(50).optional().nullable(),
|
|
927
|
+
status: /* @__PURE__ */ z.enum(["UNKNOWN", "DRAFT", "ACTIVE", "PAUSED"]).optional(),
|
|
928
|
+
revision: /* @__PURE__ */ z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
929
929
|
"Revision number, which increments by 1 each time the program is updated.\nTo prevent conflicting changes, the current `revision` must be passed when updating the program."
|
|
930
930
|
).optional().nullable(),
|
|
931
|
-
_createdDate: z.date().describe("Date and time the program was created.").optional().nullable(),
|
|
932
|
-
_updatedDate: z.date().describe("Date and time the program was last updated.").optional().nullable(),
|
|
933
|
-
referredFriendReward: z.intersection(
|
|
934
|
-
z.object({
|
|
935
|
-
type: z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
931
|
+
_createdDate: /* @__PURE__ */ z.date().describe("Date and time the program was created.").optional().nullable(),
|
|
932
|
+
_updatedDate: /* @__PURE__ */ z.date().describe("Date and time the program was last updated.").optional().nullable(),
|
|
933
|
+
referredFriendReward: /* @__PURE__ */ z.intersection(
|
|
934
|
+
/* @__PURE__ */ z.object({
|
|
935
|
+
type: /* @__PURE__ */ z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
936
936
|
}),
|
|
937
|
-
z.xor([
|
|
938
|
-
z.object({
|
|
939
|
-
couponOptions: z.never().optional(),
|
|
940
|
-
loyaltyPointsOptions: z.never().optional()
|
|
937
|
+
/* @__PURE__ */ z.xor([
|
|
938
|
+
/* @__PURE__ */ z.object({
|
|
939
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
940
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional()
|
|
941
941
|
}),
|
|
942
|
-
z.object({
|
|
943
|
-
loyaltyPointsOptions: z.never().optional(),
|
|
944
|
-
couponOptions: z.intersection(
|
|
945
|
-
z.object({
|
|
946
|
-
name: z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
947
|
-
discountType: z.enum([
|
|
942
|
+
/* @__PURE__ */ z.object({
|
|
943
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional(),
|
|
944
|
+
couponOptions: /* @__PURE__ */ z.intersection(
|
|
945
|
+
/* @__PURE__ */ z.object({
|
|
946
|
+
name: /* @__PURE__ */ z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
947
|
+
discountType: /* @__PURE__ */ z.enum([
|
|
948
948
|
"UNKNOWN",
|
|
949
949
|
"FIXED_AMOUNT",
|
|
950
950
|
"PERCENTAGE",
|
|
951
951
|
"FREE_SHIPPING"
|
|
952
952
|
]).describe("Coupon discount type.").optional(),
|
|
953
|
-
limitedToOneItem: z.boolean().describe(
|
|
953
|
+
limitedToOneItem: /* @__PURE__ */ z.boolean().describe(
|
|
954
954
|
"Whether the coupon is limited to one item.\nIf `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\nCoupons with a bookings `scope.namespace` are always limited to one item."
|
|
955
955
|
).optional().nullable(),
|
|
956
|
-
appliesToSubscriptions: z.boolean().describe(
|
|
956
|
+
appliesToSubscriptions: /* @__PURE__ */ z.boolean().describe(
|
|
957
957
|
"Whether the coupon applies to subscription products."
|
|
958
958
|
).optional().nullable(),
|
|
959
|
-
discountedCycleCount: z.number().int().describe(
|
|
959
|
+
discountedCycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
960
960
|
"Specifies the amount of discounted cycles for a subscription item.\n\n- Can only be set when `scope.namespace = pricingPlans`.\n- If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n- `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n\nMax: `999`"
|
|
961
961
|
).optional().nullable()
|
|
962
962
|
}),
|
|
963
|
-
z.intersection(
|
|
964
|
-
z.xor([
|
|
965
|
-
z.object({
|
|
966
|
-
fixedAmountOptions: z.never().optional(),
|
|
967
|
-
percentageOptions: z.never().optional()
|
|
963
|
+
/* @__PURE__ */ z.intersection(
|
|
964
|
+
/* @__PURE__ */ z.xor([
|
|
965
|
+
/* @__PURE__ */ z.object({
|
|
966
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
967
|
+
percentageOptions: /* @__PURE__ */ z.never().optional()
|
|
968
968
|
}),
|
|
969
|
-
z.object({
|
|
970
|
-
percentageOptions: z.never().optional(),
|
|
971
|
-
fixedAmountOptions: z.object({
|
|
972
|
-
amount: z.number().describe(
|
|
969
|
+
/* @__PURE__ */ z.object({
|
|
970
|
+
percentageOptions: /* @__PURE__ */ z.never().optional(),
|
|
971
|
+
fixedAmountOptions: /* @__PURE__ */ z.object({
|
|
972
|
+
amount: /* @__PURE__ */ z.number().describe(
|
|
973
973
|
"Amount of the discount as a fixed value."
|
|
974
974
|
).min(0.01).optional()
|
|
975
975
|
}).describe("Options for fixed amount discount.")
|
|
976
976
|
}),
|
|
977
|
-
z.object({
|
|
978
|
-
fixedAmountOptions: z.never().optional(),
|
|
979
|
-
percentageOptions: z.object({
|
|
980
|
-
percentage: z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
977
|
+
/* @__PURE__ */ z.object({
|
|
978
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
979
|
+
percentageOptions: /* @__PURE__ */ z.object({
|
|
980
|
+
percentage: /* @__PURE__ */ z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
981
981
|
}).describe("Options for percentage discounts.")
|
|
982
982
|
})
|
|
983
983
|
]),
|
|
984
|
-
z.xor([
|
|
985
|
-
z.object({
|
|
986
|
-
minimumSubtotal: z.never().optional(),
|
|
987
|
-
scope: z.never().optional()
|
|
984
|
+
/* @__PURE__ */ z.xor([
|
|
985
|
+
/* @__PURE__ */ z.object({
|
|
986
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
987
|
+
scope: /* @__PURE__ */ z.never().optional()
|
|
988
988
|
}),
|
|
989
|
-
z.object({
|
|
990
|
-
scope: z.never().optional(),
|
|
991
|
-
minimumSubtotal: z.number().describe(
|
|
989
|
+
/* @__PURE__ */ z.object({
|
|
990
|
+
scope: /* @__PURE__ */ z.never().optional(),
|
|
991
|
+
minimumSubtotal: /* @__PURE__ */ z.number().describe(
|
|
992
992
|
"Limit the coupon to carts with a subtotal above this number."
|
|
993
993
|
)
|
|
994
994
|
}),
|
|
995
|
-
z.object({
|
|
996
|
-
minimumSubtotal: z.never().optional(),
|
|
997
|
-
scope: z.object({
|
|
998
|
-
namespace: z.string().describe(
|
|
995
|
+
/* @__PURE__ */ z.object({
|
|
996
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
997
|
+
scope: /* @__PURE__ */ z.object({
|
|
998
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
999
999
|
"Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)"
|
|
1000
1000
|
).optional(),
|
|
1001
|
-
group: z.object({
|
|
1002
|
-
name: z.string().describe("Name of the group.").optional(),
|
|
1003
|
-
entityId: z.string().describe("Entity ID of the group.").optional().nullable()
|
|
1001
|
+
group: /* @__PURE__ */ z.object({
|
|
1002
|
+
name: /* @__PURE__ */ z.string().describe("Name of the group.").optional(),
|
|
1003
|
+
entityId: /* @__PURE__ */ z.string().describe("Entity ID of the group.").optional().nullable()
|
|
1004
1004
|
}).describe(
|
|
1005
1005
|
"Coupon scope's applied group, for example, Event or ticket in Wix Events."
|
|
1006
1006
|
).optional()
|
|
@@ -1012,87 +1012,87 @@ var PauseReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
1012
1012
|
)
|
|
1013
1013
|
).describe("Options for coupon reward type.")
|
|
1014
1014
|
}),
|
|
1015
|
-
z.object({
|
|
1016
|
-
couponOptions: z.never().optional(),
|
|
1017
|
-
loyaltyPointsOptions: z.object({
|
|
1018
|
-
amount: z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
1015
|
+
/* @__PURE__ */ z.object({
|
|
1016
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
1017
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.object({
|
|
1018
|
+
amount: /* @__PURE__ */ z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
1019
1019
|
}).describe("Options for the Loyalty points reward type.")
|
|
1020
1020
|
})
|
|
1021
1021
|
])
|
|
1022
1022
|
).describe(
|
|
1023
1023
|
"Reward configuration for the referred friend.\nSpecifies the reward given to a new customer who was referred to the business."
|
|
1024
1024
|
).optional(),
|
|
1025
|
-
referringCustomerReward: z.intersection(
|
|
1026
|
-
z.object({
|
|
1027
|
-
type: z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
1025
|
+
referringCustomerReward: /* @__PURE__ */ z.intersection(
|
|
1026
|
+
/* @__PURE__ */ z.object({
|
|
1027
|
+
type: /* @__PURE__ */ z.enum(["UNKNOWN", "COUPON", "LOYALTY_POINTS", "NOTHING"]).describe("Type of the reward.").optional()
|
|
1028
1028
|
}),
|
|
1029
|
-
z.xor([
|
|
1030
|
-
z.object({
|
|
1031
|
-
couponOptions: z.never().optional(),
|
|
1032
|
-
loyaltyPointsOptions: z.never().optional()
|
|
1029
|
+
/* @__PURE__ */ z.xor([
|
|
1030
|
+
/* @__PURE__ */ z.object({
|
|
1031
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
1032
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional()
|
|
1033
1033
|
}),
|
|
1034
|
-
z.object({
|
|
1035
|
-
loyaltyPointsOptions: z.never().optional(),
|
|
1036
|
-
couponOptions: z.intersection(
|
|
1037
|
-
z.object({
|
|
1038
|
-
name: z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
1039
|
-
discountType: z.enum([
|
|
1034
|
+
/* @__PURE__ */ z.object({
|
|
1035
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.never().optional(),
|
|
1036
|
+
couponOptions: /* @__PURE__ */ z.intersection(
|
|
1037
|
+
/* @__PURE__ */ z.object({
|
|
1038
|
+
name: /* @__PURE__ */ z.string().describe("Coupon name.").min(1).max(50).optional(),
|
|
1039
|
+
discountType: /* @__PURE__ */ z.enum([
|
|
1040
1040
|
"UNKNOWN",
|
|
1041
1041
|
"FIXED_AMOUNT",
|
|
1042
1042
|
"PERCENTAGE",
|
|
1043
1043
|
"FREE_SHIPPING"
|
|
1044
1044
|
]).describe("Coupon discount type.").optional(),
|
|
1045
|
-
limitedToOneItem: z.boolean().describe(
|
|
1045
|
+
limitedToOneItem: /* @__PURE__ */ z.boolean().describe(
|
|
1046
1046
|
"Whether the coupon is limited to one item.\nIf `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.\nCoupons with a bookings `scope.namespace` are always limited to one item."
|
|
1047
1047
|
).optional().nullable(),
|
|
1048
|
-
appliesToSubscriptions: z.boolean().describe(
|
|
1048
|
+
appliesToSubscriptions: /* @__PURE__ */ z.boolean().describe(
|
|
1049
1049
|
"Whether the coupon applies to subscription products."
|
|
1050
1050
|
).optional().nullable(),
|
|
1051
|
-
discountedCycleCount: z.number().int().describe(
|
|
1051
|
+
discountedCycleCount: /* @__PURE__ */ z.number().int().describe(
|
|
1052
1052
|
"Specifies the amount of discounted cycles for a subscription item.\n\n- Can only be set when `scope.namespace = pricingPlans`.\n- If `discountedCycleCount` is empty, the coupon applies to all available cycles.\n- `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.\n\nMax: `999`"
|
|
1053
1053
|
).optional().nullable()
|
|
1054
1054
|
}),
|
|
1055
|
-
z.intersection(
|
|
1056
|
-
z.xor([
|
|
1057
|
-
z.object({
|
|
1058
|
-
fixedAmountOptions: z.never().optional(),
|
|
1059
|
-
percentageOptions: z.never().optional()
|
|
1055
|
+
/* @__PURE__ */ z.intersection(
|
|
1056
|
+
/* @__PURE__ */ z.xor([
|
|
1057
|
+
/* @__PURE__ */ z.object({
|
|
1058
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
1059
|
+
percentageOptions: /* @__PURE__ */ z.never().optional()
|
|
1060
1060
|
}),
|
|
1061
|
-
z.object({
|
|
1062
|
-
percentageOptions: z.never().optional(),
|
|
1063
|
-
fixedAmountOptions: z.object({
|
|
1064
|
-
amount: z.number().describe(
|
|
1061
|
+
/* @__PURE__ */ z.object({
|
|
1062
|
+
percentageOptions: /* @__PURE__ */ z.never().optional(),
|
|
1063
|
+
fixedAmountOptions: /* @__PURE__ */ z.object({
|
|
1064
|
+
amount: /* @__PURE__ */ z.number().describe(
|
|
1065
1065
|
"Amount of the discount as a fixed value."
|
|
1066
1066
|
).min(0.01).optional()
|
|
1067
1067
|
}).describe("Options for fixed amount discount.")
|
|
1068
1068
|
}),
|
|
1069
|
-
z.object({
|
|
1070
|
-
fixedAmountOptions: z.never().optional(),
|
|
1071
|
-
percentageOptions: z.object({
|
|
1072
|
-
percentage: z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
1069
|
+
/* @__PURE__ */ z.object({
|
|
1070
|
+
fixedAmountOptions: /* @__PURE__ */ z.never().optional(),
|
|
1071
|
+
percentageOptions: /* @__PURE__ */ z.object({
|
|
1072
|
+
percentage: /* @__PURE__ */ z.number().describe("Percentage of discount.").min(0).max(100).optional()
|
|
1073
1073
|
}).describe("Options for percentage discounts.")
|
|
1074
1074
|
})
|
|
1075
1075
|
]),
|
|
1076
|
-
z.xor([
|
|
1077
|
-
z.object({
|
|
1078
|
-
minimumSubtotal: z.never().optional(),
|
|
1079
|
-
scope: z.never().optional()
|
|
1076
|
+
/* @__PURE__ */ z.xor([
|
|
1077
|
+
/* @__PURE__ */ z.object({
|
|
1078
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
1079
|
+
scope: /* @__PURE__ */ z.never().optional()
|
|
1080
1080
|
}),
|
|
1081
|
-
z.object({
|
|
1082
|
-
scope: z.never().optional(),
|
|
1083
|
-
minimumSubtotal: z.number().describe(
|
|
1081
|
+
/* @__PURE__ */ z.object({
|
|
1082
|
+
scope: /* @__PURE__ */ z.never().optional(),
|
|
1083
|
+
minimumSubtotal: /* @__PURE__ */ z.number().describe(
|
|
1084
1084
|
"Limit the coupon to carts with a subtotal above this number."
|
|
1085
1085
|
)
|
|
1086
1086
|
}),
|
|
1087
|
-
z.object({
|
|
1088
|
-
minimumSubtotal: z.never().optional(),
|
|
1089
|
-
scope: z.object({
|
|
1090
|
-
namespace: z.string().describe(
|
|
1087
|
+
/* @__PURE__ */ z.object({
|
|
1088
|
+
minimumSubtotal: /* @__PURE__ */ z.never().optional(),
|
|
1089
|
+
scope: /* @__PURE__ */ z.object({
|
|
1090
|
+
namespace: /* @__PURE__ */ z.string().describe(
|
|
1091
1091
|
"Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans)"
|
|
1092
1092
|
).optional(),
|
|
1093
|
-
group: z.object({
|
|
1094
|
-
name: z.string().describe("Name of the group.").optional(),
|
|
1095
|
-
entityId: z.string().describe("Entity ID of the group.").optional().nullable()
|
|
1093
|
+
group: /* @__PURE__ */ z.object({
|
|
1094
|
+
name: /* @__PURE__ */ z.string().describe("Name of the group.").optional(),
|
|
1095
|
+
entityId: /* @__PURE__ */ z.string().describe("Entity ID of the group.").optional().nullable()
|
|
1096
1096
|
}).describe(
|
|
1097
1097
|
"Coupon scope's applied group, for example, Event or ticket in Wix Events."
|
|
1098
1098
|
).optional()
|
|
@@ -1104,18 +1104,18 @@ var PauseReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
1104
1104
|
)
|
|
1105
1105
|
).describe("Options for coupon reward type.")
|
|
1106
1106
|
}),
|
|
1107
|
-
z.object({
|
|
1108
|
-
couponOptions: z.never().optional(),
|
|
1109
|
-
loyaltyPointsOptions: z.object({
|
|
1110
|
-
amount: z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
1107
|
+
/* @__PURE__ */ z.object({
|
|
1108
|
+
couponOptions: /* @__PURE__ */ z.never().optional(),
|
|
1109
|
+
loyaltyPointsOptions: /* @__PURE__ */ z.object({
|
|
1110
|
+
amount: /* @__PURE__ */ z.number().int().describe("Number of loyalty points to give.").min(1).max(9999999).optional()
|
|
1111
1111
|
}).describe("Options for the Loyalty points reward type.")
|
|
1112
1112
|
})
|
|
1113
1113
|
])
|
|
1114
1114
|
).describe(
|
|
1115
1115
|
"Reward configuration for the referring customer.\nSpecifies the reward given to an existing customer who referred a new customer to the business."
|
|
1116
1116
|
).optional(),
|
|
1117
|
-
successfulReferralActions: z.array(
|
|
1118
|
-
z.enum([
|
|
1117
|
+
successfulReferralActions: /* @__PURE__ */ z.array(
|
|
1118
|
+
/* @__PURE__ */ z.enum([
|
|
1119
1119
|
"UNKNOWN",
|
|
1120
1120
|
"STORE_ORDER_PLACED",
|
|
1121
1121
|
"PLAN_ORDERED",
|
|
@@ -1125,9 +1125,9 @@ var PauseReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
1125
1125
|
"ONLINE_PROGRAM_JOINED"
|
|
1126
1126
|
])
|
|
1127
1127
|
).max(100).optional(),
|
|
1128
|
-
emails: z.object({
|
|
1129
|
-
encourageToReferFriends: z.array(
|
|
1130
|
-
z.enum([
|
|
1128
|
+
emails: /* @__PURE__ */ z.object({
|
|
1129
|
+
encourageToReferFriends: /* @__PURE__ */ z.array(
|
|
1130
|
+
/* @__PURE__ */ z.enum([
|
|
1131
1131
|
"UNKNOWN",
|
|
1132
1132
|
"STORES",
|
|
1133
1133
|
"PRICING_PLANS",
|
|
@@ -1137,12 +1137,12 @@ var PauseReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
1137
1137
|
"ONLINE_PROGRAMS"
|
|
1138
1138
|
])
|
|
1139
1139
|
).optional(),
|
|
1140
|
-
notifyCustomersAboutReward: z.boolean().describe(
|
|
1140
|
+
notifyCustomersAboutReward: /* @__PURE__ */ z.boolean().describe(
|
|
1141
1141
|
"Whether to send email notifications to referring customers when they receive a referral reward.\nIf true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order)."
|
|
1142
1142
|
).optional()
|
|
1143
1143
|
}).describe("Configures email notifications for the referral program.").optional(),
|
|
1144
|
-
premiumFeatures: z.object({
|
|
1145
|
-
referralProgram: z.boolean().describe(
|
|
1144
|
+
premiumFeatures: /* @__PURE__ */ z.object({
|
|
1145
|
+
referralProgram: /* @__PURE__ */ z.boolean().describe(
|
|
1146
1146
|
"Whether the site owner has access to the referral program feature."
|
|
1147
1147
|
).optional()
|
|
1148
1148
|
}).describe(
|
|
@@ -1151,43 +1151,43 @@ var PauseReferralProgramResponse = /* @__PURE__ */ z.object({
|
|
|
1151
1151
|
}).describe("Paused referral program.").optional()
|
|
1152
1152
|
});
|
|
1153
1153
|
var GetAiSocialMediaPostsSuggestionsRequest = /* @__PURE__ */ z.object({
|
|
1154
|
-
options: z.object({
|
|
1155
|
-
topic: z.string().describe(
|
|
1154
|
+
options: /* @__PURE__ */ z.object({
|
|
1155
|
+
topic: /* @__PURE__ */ z.string().describe(
|
|
1156
1156
|
"Topic to generate social media post suggestions for. For example, fitness, education, or technology."
|
|
1157
1157
|
).max(512).optional()
|
|
1158
1158
|
}).optional()
|
|
1159
1159
|
});
|
|
1160
1160
|
var GetAiSocialMediaPostsSuggestionsResponse = /* @__PURE__ */ z.object({
|
|
1161
|
-
suggestions: z.array(
|
|
1162
|
-
z.object({
|
|
1163
|
-
postContent: z.string().describe("Suggested post content.").max(4096).optional(),
|
|
1164
|
-
hashtags: z.array(z.string()).max(256).optional()
|
|
1161
|
+
suggestions: /* @__PURE__ */ z.array(
|
|
1162
|
+
/* @__PURE__ */ z.object({
|
|
1163
|
+
postContent: /* @__PURE__ */ z.string().describe("Suggested post content.").max(4096).optional(),
|
|
1164
|
+
hashtags: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(256).optional()
|
|
1165
1165
|
})
|
|
1166
1166
|
).max(3).optional(),
|
|
1167
|
-
referFriendsPageUrl: z.string().describe("Referral URL to refer friends.").max(2083).optional().nullable()
|
|
1167
|
+
referFriendsPageUrl: /* @__PURE__ */ z.string().describe("Referral URL to refer friends.").max(2083).optional().nullable()
|
|
1168
1168
|
});
|
|
1169
1169
|
var GenerateAiSocialMediaPostsSuggestionsRequest = /* @__PURE__ */ z.object({
|
|
1170
|
-
options: z.object({
|
|
1171
|
-
topic: z.string().describe(
|
|
1170
|
+
options: /* @__PURE__ */ z.object({
|
|
1171
|
+
topic: /* @__PURE__ */ z.string().describe(
|
|
1172
1172
|
"Topic to generate social media post suggestions for. For example, fitness, education, or technology."
|
|
1173
1173
|
).max(512).optional()
|
|
1174
1174
|
}).optional()
|
|
1175
1175
|
});
|
|
1176
1176
|
var GenerateAiSocialMediaPostsSuggestionsResponse = /* @__PURE__ */ z.object({
|
|
1177
|
-
suggestions: z.array(
|
|
1178
|
-
z.object({
|
|
1179
|
-
postContent: z.string().describe("Suggested post content.").max(4096).optional(),
|
|
1180
|
-
hashtags: z.array(z.string()).max(256).optional()
|
|
1177
|
+
suggestions: /* @__PURE__ */ z.array(
|
|
1178
|
+
/* @__PURE__ */ z.object({
|
|
1179
|
+
postContent: /* @__PURE__ */ z.string().describe("Suggested post content.").max(4096).optional(),
|
|
1180
|
+
hashtags: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).max(256).optional()
|
|
1181
1181
|
})
|
|
1182
1182
|
).max(3).optional(),
|
|
1183
|
-
referFriendsPageUrl: z.string().describe("Referral URL to refer friends.").max(2083).optional().nullable()
|
|
1183
|
+
referFriendsPageUrl: /* @__PURE__ */ z.string().describe("Referral URL to refer friends.").max(2083).optional().nullable()
|
|
1184
1184
|
});
|
|
1185
1185
|
var GetReferralProgramPremiumFeaturesRequest = /* @__PURE__ */ z.object(
|
|
1186
1186
|
{}
|
|
1187
1187
|
);
|
|
1188
1188
|
var GetReferralProgramPremiumFeaturesResponse = /* @__PURE__ */ z.object(
|
|
1189
1189
|
{
|
|
1190
|
-
referralProgram: z.boolean().describe("Whether the site has the referral program feature enabled.").optional()
|
|
1190
|
+
referralProgram: /* @__PURE__ */ z.boolean().describe("Whether the site has the referral program feature enabled.").optional()
|
|
1191
1191
|
}
|
|
1192
1192
|
);
|
|
1193
1193
|
export {
|