@wix/himalaya-cli 0.1493.0 → 0.1495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +5 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/live-activity/src/index.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +52 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/index.d.ts +180 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/extensions.d.ts +16 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +24 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/live-activity.mjs +3 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +4 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +14 -0
- package/dist/cli.mjs +3585 -2540
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/himi-json-output.md +46 -4
- package/guides/iap-products.md +68 -9
- package/guides/one-app-to-himi-app.md +80 -5
- package/guides/qa-builds.md +2 -2
- package/guides/widgets.md +5 -3
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +4442 -1532
- package/templates/beauty-salon/himalaya.content.json +1 -1
- package/templates/beauty-salon/tier5-src/_shared/himi-store-collection.ts +6 -3
- package/templates/beauty-salon/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/beauty-salon/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +514 -117
- package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +256 -19
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +196 -34
- package/templates/beauty-salon/tier5-src/himi-store-saved/index.ts +21 -5
- package/templates/beauty-salon/tier5-src/himi-store-shop/index.ts +14 -2
- package/templates/beauty-salon/tokens.json +21 -0
- package/templates/branded-lite/dev/index.ts +4427 -1510
- package/templates/branded-lite/himalaya.content.json +1 -1
- package/templates/branded-lite/tier5-src/_shared/himi-store-collection.ts +6 -3
- package/templates/branded-lite/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/branded-lite/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +514 -117
- package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +256 -19
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +196 -34
- package/templates/branded-lite/tier5-src/himi-store-saved/index.ts +21 -5
- package/templates/branded-lite/tier5-src/himi-store-shop/index.ts +14 -2
- package/templates/branded-lite/tokens.json +9 -0
- package/templates/community-club/dev/index.ts +1 -1
- package/templates/community-club/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/community-club/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/community-club/tokens.json +21 -0
- package/templates/events-meetups/dev/index.ts +1 -1
- package/templates/events-meetups/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/events-meetups/tokens.json +21 -0
- package/templates/gym-fitness/dev/index.ts +4439 -1529
- package/templates/gym-fitness/himalaya.content.json +1 -1
- package/templates/gym-fitness/tier5-src/_shared/himi-store-collection.ts +6 -3
- package/templates/gym-fitness/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/gym-fitness/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +514 -117
- package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +256 -19
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +196 -34
- package/templates/gym-fitness/tier5-src/himi-store-saved/index.ts +21 -5
- package/templates/gym-fitness/tier5-src/himi-store-shop/index.ts +14 -2
- package/templates/gym-fitness/tokens.json +21 -0
- package/templates/nonprofit-cause/dev/index.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/nonprofit-cause/tokens.json +21 -0
- package/templates/podcast-creator/dev/index.ts +1 -1
- package/templates/podcast-creator/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/podcast-creator/tokens.json +21 -0
- package/templates/portfolio-creative/dev/index.ts +2569 -1013
- package/templates/portfolio-creative/himalaya.content.json +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-collection.ts +6 -3
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +256 -19
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +196 -34
- package/templates/portfolio-creative/tier5-src/himi-store-saved/index.ts +21 -5
- package/templates/portfolio-creative/tier5-src/himi-store-shop/index.ts +14 -2
- package/templates/portfolio-creative/tokens.json +21 -0
- package/templates/restaurant/dev/index.ts +1 -1
- package/templates/restaurant/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/restaurant/tokens.json +21 -0
- package/templates/retail-store/dev/index.ts +2541 -985
- package/templates/retail-store/himalaya.content.json +1 -1
- package/templates/retail-store/tier5-src/_shared/himi-store-collection.ts +6 -3
- package/templates/retail-store/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +256 -19
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +196 -34
- package/templates/retail-store/tier5-src/himi-store-saved/index.ts +21 -5
- package/templates/retail-store/tier5-src/himi-store-shop/index.ts +14 -2
- package/templates/retail-store/tokens.json +21 -0
- package/templates/yoga-studio/dev/index.ts +1618 -264
- package/templates/yoga-studio/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/yoga-studio/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +514 -117
- package/templates/yoga-studio/tokens.json +21 -0
|
@@ -185,7 +185,9 @@ export declare function text(text: string, style?: string, opts?: {
|
|
|
185
185
|
animateValue?: boolean;
|
|
186
186
|
animateReveal?: boolean;
|
|
187
187
|
markdown?: boolean;
|
|
188
|
+
textAlign?: "leading" | "center" | "trailing" | "justify";
|
|
188
189
|
textDirection?: "auto" | "ltr" | "rtl";
|
|
190
|
+
decoration?: "underline" | "strikethrough";
|
|
189
191
|
minimumScaleFactor?: number;
|
|
190
192
|
monospacedDigits?: boolean;
|
|
191
193
|
truncation?: "tail" | "head" | "middle";
|
|
@@ -749,6 +751,7 @@ export declare function stepper(props: {
|
|
|
749
751
|
max?: number;
|
|
750
752
|
onChange?: ActionShape; /** `$service:` path the count follows (worker is the source of truth). */
|
|
751
753
|
valuePath?: string;
|
|
754
|
+
presentation?: "plain";
|
|
752
755
|
}, opts?: {
|
|
753
756
|
id?: string;
|
|
754
757
|
}): Component;
|
|
@@ -1593,6 +1596,8 @@ export declare function banner(props: {
|
|
|
1593
1596
|
title: string;
|
|
1594
1597
|
message?: string;
|
|
1595
1598
|
action?: ActionShape;
|
|
1599
|
+
/** #1059 — the action's label; the renderers default it to "Take action". */
|
|
1600
|
+
actionLabel?: string;
|
|
1596
1601
|
dismissible?: boolean;
|
|
1597
1602
|
}, opts?: {
|
|
1598
1603
|
id?: string;
|
|
@@ -78,6 +78,10 @@ export interface StartOptions {
|
|
|
78
78
|
/** Android promotion is opt-in for a user-followed, bounded, time-sensitive
|
|
79
79
|
* activity. The system may still keep it as an ordinary notification. */
|
|
80
80
|
promoted?: boolean;
|
|
81
|
+
/** In an app embedded in another (`HimalayaEmbedSurfaces`): the push topic whose pushes
|
|
82
|
+
* repaint this activity while the app is closed, e.g. `bookings.<siteId>`. Ignored
|
|
83
|
+
* elsewhere. */
|
|
84
|
+
pushTopic?: string;
|
|
81
85
|
}
|
|
82
86
|
export interface UpdateOptions {
|
|
83
87
|
/** The token returned by `start`. An empty id is a no-op. */
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -864,6 +864,8 @@ export interface StepperProps {
|
|
|
864
864
|
min?: number;
|
|
865
865
|
max?: number;
|
|
866
866
|
onChange?: Action;
|
|
867
|
+
/** "plain" draws exposed minus/value/plus controls; absent uses the default capsule. */
|
|
868
|
+
presentation?: "plain";
|
|
867
869
|
}
|
|
868
870
|
export type AvatarSource = {
|
|
869
871
|
/** Literal URL, or binding-aware `$service:`/`$item.` image URL. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { WixBooking, WixBookingsPagingMetadata, WixCallOptions } from "./index.js";
|
|
2
|
+
import type { WixGetServiceOptions, WixServiceBookingPolicy, WixServiceDurationRange, WixServiceLocation, WixServiceMedia, WixServiceStaffMemberDetails, WixServiceUrls } from "./index.js";
|
|
2
3
|
export interface WixServiceMoney {
|
|
3
4
|
/** Decimal string returned by Bookings v2, e.g. "50.00". */
|
|
4
5
|
value?: string;
|
|
@@ -7,8 +8,28 @@ export interface WixServiceMoney {
|
|
|
7
8
|
amount?: string;
|
|
8
9
|
}
|
|
9
10
|
export interface WixServicePayment {
|
|
11
|
+
/** "FIXED" | "CUSTOM" | "VARIED" | "NO_FEE". */
|
|
12
|
+
rateType?: string;
|
|
10
13
|
fixed?: {
|
|
11
14
|
price?: WixServiceMoney;
|
|
15
|
+
deposit?: WixServiceMoney;
|
|
16
|
+
fullUpfrontPaymentAllowed?: boolean;
|
|
17
|
+
};
|
|
18
|
+
varied?: {
|
|
19
|
+
defaultPrice?: WixServiceMoney;
|
|
20
|
+
deposit?: WixServiceMoney;
|
|
21
|
+
minPrice?: WixServiceMoney;
|
|
22
|
+
maxPrice?: WixServiceMoney;
|
|
23
|
+
};
|
|
24
|
+
custom?: {
|
|
25
|
+
description?: string;
|
|
26
|
+
};
|
|
27
|
+
/** How the customer may pay. A service offers at least one of these. */
|
|
28
|
+
options?: {
|
|
29
|
+
online?: boolean;
|
|
30
|
+
inPerson?: boolean;
|
|
31
|
+
deposit?: boolean;
|
|
32
|
+
pricingPlan?: boolean;
|
|
12
33
|
};
|
|
13
34
|
rateLabel?: {
|
|
14
35
|
amount?: string;
|
|
@@ -25,15 +46,40 @@ export interface WixService {
|
|
|
25
46
|
revision?: string;
|
|
26
47
|
name?: string;
|
|
27
48
|
description?: string;
|
|
49
|
+
/** "APPOINTMENT" | "CLASS" | "COURSE". */
|
|
50
|
+
type?: string;
|
|
51
|
+
tagLine?: string;
|
|
52
|
+
defaultCapacity?: number;
|
|
53
|
+
media?: WixServiceMedia;
|
|
28
54
|
/** Session length in minutes. */
|
|
29
55
|
duration?: number;
|
|
30
56
|
/** Raw Bookings v2 response shape. */
|
|
31
57
|
payment?: WixServicePayment;
|
|
58
|
+
onlineBooking?: {
|
|
59
|
+
enabled?: boolean;
|
|
60
|
+
requireManualApproval?: boolean;
|
|
61
|
+
allowMultipleRequests?: boolean;
|
|
62
|
+
};
|
|
63
|
+
conferencing?: {
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
};
|
|
66
|
+
locations?: WixServiceLocation[];
|
|
67
|
+
bookingPolicy?: WixServiceBookingPolicy;
|
|
32
68
|
schedule?: {
|
|
69
|
+
id?: string;
|
|
70
|
+
firstSessionStart?: string;
|
|
71
|
+
lastSessionEnd?: string;
|
|
33
72
|
availabilityConstraints?: {
|
|
73
|
+
durations?: Array<{
|
|
74
|
+
minutes?: number;
|
|
75
|
+
}>;
|
|
34
76
|
sessionDurations?: number[];
|
|
77
|
+
durationRange?: WixServiceDurationRange;
|
|
35
78
|
};
|
|
36
79
|
};
|
|
80
|
+
/** Returned only when the request asks for `STAFF_MEMBER_DETAILS` (see `getService`). */
|
|
81
|
+
staffMemberDetails?: WixServiceStaffMemberDetails;
|
|
82
|
+
urls?: WixServiceUrls;
|
|
37
83
|
/** @deprecated Compatibility projection populated by `decodeService`. */
|
|
38
84
|
price?: number;
|
|
39
85
|
/** @deprecated Legacy v1 compatibility field. */
|
|
@@ -84,8 +130,12 @@ export interface WixGetServiceResponse {
|
|
|
84
130
|
service: WixService;
|
|
85
131
|
}
|
|
86
132
|
/** Fetch a single service by id — GET /bookings/v2/services/{id}. Visitor-readable
|
|
87
|
-
* (public GA route, not the owner `_api/` gateway). The detail/edit-prefill source.
|
|
88
|
-
|
|
133
|
+
* (public GA route, not the owner `_api/` gateway). The detail/edit-prefill source.
|
|
134
|
+
* `options.conditionalFields` asks for fields Wix returns only on request
|
|
135
|
+
* ("STAFF_MEMBER_DETAILS", "DISCOUNT_INFO_DETAILS"), each sent as a repeated
|
|
136
|
+
* `conditionalFields` query parameter. Without `options` the request is the one this
|
|
137
|
+
* function always sent. */
|
|
138
|
+
export declare function getService(serviceId: string, options?: WixGetServiceOptions): Promise<WixGetServiceResponse>;
|
|
89
139
|
/** Writable service fields for create/update, in the ERGONOMIC shape a form has. The helpers
|
|
90
140
|
* below encode it onto the Bookings v2 entity — they never send these flat fields as-is,
|
|
91
141
|
* because v2 silently ignores a flat `price`/`duration` (HTTP 200, revision bumps, nothing
|
|
@@ -91,30 +91,207 @@ export interface WixServiceMoney {
|
|
|
91
91
|
}
|
|
92
92
|
export interface WixServiceFixedPayment {
|
|
93
93
|
price?: WixServiceMoney;
|
|
94
|
+
deposit?: WixServiceMoney;
|
|
95
|
+
fullUpfrontPaymentAllowed?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export interface WixServiceVariedPayment {
|
|
98
|
+
defaultPrice?: WixServiceMoney;
|
|
99
|
+
deposit?: WixServiceMoney;
|
|
100
|
+
minPrice?: WixServiceMoney;
|
|
101
|
+
maxPrice?: WixServiceMoney;
|
|
102
|
+
}
|
|
103
|
+
export interface WixServiceCustomPayment {
|
|
104
|
+
description?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface WixServicePaymentOptions {
|
|
107
|
+
online?: boolean;
|
|
108
|
+
inPerson?: boolean;
|
|
109
|
+
deposit?: boolean;
|
|
110
|
+
pricingPlan?: boolean;
|
|
94
111
|
}
|
|
95
112
|
export interface WixServiceRateLabel {
|
|
96
113
|
amount?: string;
|
|
97
114
|
currency?: string;
|
|
98
115
|
}
|
|
99
116
|
export interface WixServicePayment {
|
|
117
|
+
rateType?: string;
|
|
100
118
|
fixed?: WixServiceFixedPayment;
|
|
119
|
+
varied?: WixServiceVariedPayment;
|
|
120
|
+
custom?: WixServiceCustomPayment;
|
|
121
|
+
options?: WixServicePaymentOptions;
|
|
101
122
|
rateLabel?: WixServiceRateLabel;
|
|
102
123
|
price?: number;
|
|
103
124
|
currency?: string;
|
|
104
125
|
}
|
|
126
|
+
export interface WixServiceDuration {
|
|
127
|
+
minutes?: number;
|
|
128
|
+
}
|
|
129
|
+
export interface WixServiceHourlyConfig {
|
|
130
|
+
minDurationInMinutes?: number;
|
|
131
|
+
maxDurationInMinutes?: number;
|
|
132
|
+
}
|
|
133
|
+
export interface WixServiceDailyConfig {
|
|
134
|
+
minDurationInDays?: number;
|
|
135
|
+
maxDurationInDays?: number;
|
|
136
|
+
}
|
|
137
|
+
export interface WixServiceDurationRange {
|
|
138
|
+
hourOptions?: WixServiceHourlyConfig;
|
|
139
|
+
dayOptions?: WixServiceDailyConfig;
|
|
140
|
+
unitType?: string;
|
|
141
|
+
}
|
|
105
142
|
export interface WixServiceAvailabilityConstraints {
|
|
143
|
+
durations?: WixServiceDuration[];
|
|
106
144
|
sessionDurations?: number[];
|
|
145
|
+
durationRange?: WixServiceDurationRange;
|
|
107
146
|
}
|
|
108
147
|
export interface WixServiceSchedule {
|
|
148
|
+
id?: string;
|
|
149
|
+
firstSessionStart?: string;
|
|
150
|
+
lastSessionEnd?: string;
|
|
109
151
|
availabilityConstraints?: WixServiceAvailabilityConstraints;
|
|
110
152
|
}
|
|
153
|
+
export interface WixServiceImage {
|
|
154
|
+
id?: string;
|
|
155
|
+
url?: string;
|
|
156
|
+
height?: number;
|
|
157
|
+
width?: number;
|
|
158
|
+
altText?: string;
|
|
159
|
+
}
|
|
160
|
+
export interface WixServiceMediaItem {
|
|
161
|
+
image?: WixServiceImage;
|
|
162
|
+
}
|
|
163
|
+
export interface WixServiceMedia {
|
|
164
|
+
items?: WixServiceMediaItem[];
|
|
165
|
+
mainMedia?: WixServiceMediaItem;
|
|
166
|
+
coverMedia?: WixServiceMediaItem;
|
|
167
|
+
}
|
|
168
|
+
export interface WixServiceStreetAddress {
|
|
169
|
+
number?: string;
|
|
170
|
+
name?: string;
|
|
171
|
+
apt?: string;
|
|
172
|
+
}
|
|
173
|
+
export interface WixServiceAddress {
|
|
174
|
+
streetAddress?: WixServiceStreetAddress;
|
|
175
|
+
addressLine?: string;
|
|
176
|
+
country?: string;
|
|
177
|
+
subdivision?: string;
|
|
178
|
+
city?: string;
|
|
179
|
+
postalCode?: string;
|
|
180
|
+
formattedAddress?: string;
|
|
181
|
+
}
|
|
182
|
+
export interface WixServiceBusinessLocation {
|
|
183
|
+
id?: string;
|
|
184
|
+
name?: string;
|
|
185
|
+
default?: boolean;
|
|
186
|
+
address?: WixServiceAddress;
|
|
187
|
+
}
|
|
188
|
+
export interface WixServiceCustomLocation {
|
|
189
|
+
id?: string;
|
|
190
|
+
address?: WixServiceAddress;
|
|
191
|
+
}
|
|
192
|
+
export interface WixServiceLocation {
|
|
193
|
+
id?: string;
|
|
194
|
+
type?: string;
|
|
195
|
+
business?: WixServiceBusinessLocation;
|
|
196
|
+
custom?: WixServiceCustomLocation;
|
|
197
|
+
calculatedAddress?: WixServiceAddress;
|
|
198
|
+
}
|
|
199
|
+
export interface WixServiceOnlineBooking {
|
|
200
|
+
enabled?: boolean;
|
|
201
|
+
requireManualApproval?: boolean;
|
|
202
|
+
allowMultipleRequests?: boolean;
|
|
203
|
+
}
|
|
204
|
+
export interface WixServiceConferencing {
|
|
205
|
+
enabled?: boolean;
|
|
206
|
+
}
|
|
207
|
+
export interface WixServicePolicyDescription {
|
|
208
|
+
enabled?: boolean;
|
|
209
|
+
description?: string;
|
|
210
|
+
}
|
|
211
|
+
export interface WixServiceLimitEarlyBookingPolicy {
|
|
212
|
+
enabled?: boolean;
|
|
213
|
+
earliestBookingInMinutes?: number;
|
|
214
|
+
}
|
|
215
|
+
export interface WixServiceLimitLateBookingPolicy {
|
|
216
|
+
enabled?: boolean;
|
|
217
|
+
latestBookingInMinutes?: number;
|
|
218
|
+
}
|
|
219
|
+
export interface WixServiceBookAfterStartPolicy {
|
|
220
|
+
enabled?: boolean;
|
|
221
|
+
}
|
|
222
|
+
export interface WixServiceCancellationPolicy {
|
|
223
|
+
enabled?: boolean;
|
|
224
|
+
limitLatestCancellation?: boolean;
|
|
225
|
+
latestCancellationInMinutes?: number;
|
|
226
|
+
}
|
|
227
|
+
export interface WixServiceReschedulePolicy {
|
|
228
|
+
enabled?: boolean;
|
|
229
|
+
limitLatestReschedule?: boolean;
|
|
230
|
+
latestRescheduleInMinutes?: number;
|
|
231
|
+
}
|
|
232
|
+
export interface WixServiceWaitlistPolicy {
|
|
233
|
+
enabled?: boolean;
|
|
234
|
+
capacity?: number;
|
|
235
|
+
reservationTimeInMinutes?: number;
|
|
236
|
+
}
|
|
237
|
+
export interface WixServiceParticipantsPolicy {
|
|
238
|
+
maxParticipantsPerBooking?: number;
|
|
239
|
+
}
|
|
240
|
+
export interface WixServiceCancellationWindow {
|
|
241
|
+
amount?: WixServiceMoney;
|
|
242
|
+
percentage?: string;
|
|
243
|
+
startInMinutes?: number;
|
|
244
|
+
}
|
|
245
|
+
export interface WixServiceCancellationFeePolicy {
|
|
246
|
+
enabled?: boolean;
|
|
247
|
+
cancellationWindows?: WixServiceCancellationWindow[];
|
|
248
|
+
}
|
|
249
|
+
export interface WixServiceBookingPolicy {
|
|
250
|
+
id?: string;
|
|
251
|
+
name?: string;
|
|
252
|
+
customPolicyDescription?: WixServicePolicyDescription;
|
|
253
|
+
limitEarlyBookingPolicy?: WixServiceLimitEarlyBookingPolicy;
|
|
254
|
+
limitLateBookingPolicy?: WixServiceLimitLateBookingPolicy;
|
|
255
|
+
bookAfterStartPolicy?: WixServiceBookAfterStartPolicy;
|
|
256
|
+
cancellationPolicy?: WixServiceCancellationPolicy;
|
|
257
|
+
reschedulePolicy?: WixServiceReschedulePolicy;
|
|
258
|
+
waitlistPolicy?: WixServiceWaitlistPolicy;
|
|
259
|
+
participantsPolicy?: WixServiceParticipantsPolicy;
|
|
260
|
+
cancellationFeePolicy?: WixServiceCancellationFeePolicy;
|
|
261
|
+
}
|
|
262
|
+
export interface WixServiceStaffMember {
|
|
263
|
+
staffMemberId?: string;
|
|
264
|
+
name?: string;
|
|
265
|
+
mainMedia?: WixServiceMediaItem;
|
|
266
|
+
}
|
|
267
|
+
export interface WixServiceStaffMemberDetails {
|
|
268
|
+
staffMembers?: WixServiceStaffMember[];
|
|
269
|
+
}
|
|
270
|
+
export interface WixServicePageUrl {
|
|
271
|
+
relativePath?: string;
|
|
272
|
+
url?: string;
|
|
273
|
+
}
|
|
274
|
+
export interface WixServiceUrls {
|
|
275
|
+
servicePage?: WixServicePageUrl;
|
|
276
|
+
bookingPage?: WixServicePageUrl;
|
|
277
|
+
}
|
|
111
278
|
export interface WixService {
|
|
112
279
|
id: string;
|
|
113
280
|
name?: string;
|
|
114
281
|
description?: string;
|
|
282
|
+
type?: string;
|
|
283
|
+
tagLine?: string;
|
|
284
|
+
defaultCapacity?: number;
|
|
285
|
+
media?: WixServiceMedia;
|
|
115
286
|
duration?: number;
|
|
116
287
|
payment?: WixServicePayment;
|
|
288
|
+
onlineBooking?: WixServiceOnlineBooking;
|
|
289
|
+
conferencing?: WixServiceConferencing;
|
|
290
|
+
locations?: WixServiceLocation[];
|
|
291
|
+
bookingPolicy?: WixServiceBookingPolicy;
|
|
117
292
|
schedule?: WixServiceSchedule;
|
|
293
|
+
staffMemberDetails?: WixServiceStaffMemberDetails;
|
|
294
|
+
urls?: WixServiceUrls;
|
|
118
295
|
price?: number;
|
|
119
296
|
category?: string;
|
|
120
297
|
}
|
|
@@ -136,6 +313,9 @@ export interface WixSearchServicesResponse {
|
|
|
136
313
|
export interface WixGetServiceResponse {
|
|
137
314
|
service: WixService;
|
|
138
315
|
}
|
|
316
|
+
export interface WixGetServiceOptions {
|
|
317
|
+
conditionalFields?: string[];
|
|
318
|
+
}
|
|
139
319
|
export interface WixServiceWrite {
|
|
140
320
|
name?: string;
|
|
141
321
|
description?: string;
|
|
@@ -117,6 +117,22 @@ export declare function isOrdersForbiddenError(error: unknown): boolean;
|
|
|
117
117
|
* `cart.subtotal?.formattedAmount ?? ""` and `(await getCurrentCart()).id || ""` —
|
|
118
118
|
* all three degrade to empty/0 on an absent field, so no caller special-cases it. */
|
|
119
119
|
export declare function getCurrentCart(): Promise<WixCartDetail>;
|
|
120
|
+
/** Add a coupon to the visitor/member's current cart — POST
|
|
121
|
+
* /ecom/v2/carts/current/add-coupon. Wix validates it against the current cart.
|
|
122
|
+
* @scope visitor — uses the active shopper's cart; Wix rejects an invalid coupon. */
|
|
123
|
+
export declare function addCouponToCurrentCart(code: string): Promise<{
|
|
124
|
+
cart?: WixCartDetail;
|
|
125
|
+
}>;
|
|
126
|
+
/** Remove a coupon from the current cart — POST /ecom/v2/carts/current/remove-coupon.
|
|
127
|
+
* @scope visitor — uses the active shopper's cart; a missing coupon ID is rejected. */
|
|
128
|
+
export declare function removeCouponFromCurrentCart(couponId: string): Promise<{
|
|
129
|
+
cart?: WixCartDetail;
|
|
130
|
+
}>;
|
|
131
|
+
/** Recalculate the current cart after a coupon change.
|
|
132
|
+
* @scope visitor — uses the active shopper's cart and returns its updated totals. */
|
|
133
|
+
export declare function calculateCurrentCart(): Promise<{
|
|
134
|
+
cart?: WixCartDetail;
|
|
135
|
+
}>;
|
|
120
136
|
export interface WixRemoveLineItemsResponse {
|
|
121
137
|
cart?: WixCartDetail;
|
|
122
138
|
}
|
|
@@ -67,6 +67,19 @@ export interface StoreProduct {
|
|
|
67
67
|
currency?: string;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
+
/** Catalog V3 original price, when the actual price is discounted. */
|
|
71
|
+
compareAtPriceRange?: {
|
|
72
|
+
minValue?: {
|
|
73
|
+
amount?: string;
|
|
74
|
+
formattedAmount?: string;
|
|
75
|
+
currency?: string;
|
|
76
|
+
};
|
|
77
|
+
maxValue?: {
|
|
78
|
+
amount?: string;
|
|
79
|
+
formattedAmount?: string;
|
|
80
|
+
currency?: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
70
83
|
/** Option groups, both spellings: V1 `productOptions`, V3 `options`. Declared
|
|
71
84
|
* because the wire carries them on BOTH catalogs and this type denying them is
|
|
72
85
|
* what let every template product screen drop the colour/size picker. Shapes
|
|
@@ -78,6 +91,17 @@ export interface StoreProduct {
|
|
|
78
91
|
variantsInfo?: {
|
|
79
92
|
variants?: unknown[];
|
|
80
93
|
};
|
|
94
|
+
/** Merchant-authored product details: V1 and V3 use different field names. */
|
|
95
|
+
additionalInfoSections?: {
|
|
96
|
+
title?: string;
|
|
97
|
+
description?: string;
|
|
98
|
+
}[];
|
|
99
|
+
infoSections?: {
|
|
100
|
+
title?: string;
|
|
101
|
+
uniqueName?: string;
|
|
102
|
+
plainDescription?: string;
|
|
103
|
+
description?: unknown;
|
|
104
|
+
}[];
|
|
81
105
|
}
|
|
82
106
|
export interface StoreProductsResponse {
|
|
83
107
|
products?: StoreProduct[];
|
|
@@ -30,7 +30,9 @@ async function start(options) {
|
|
|
30
30
|
// reads as "foreground-only, record no mapping".
|
|
31
31
|
entityType: options.session?.entityType ?? "",
|
|
32
32
|
entityId: options.session?.entityId ?? "",
|
|
33
|
-
expiresAt: options.session?.expiresAt ?? 0
|
|
33
|
+
expiresAt: options.session?.expiresAt ?? 0,
|
|
34
|
+
// Only when set, so an app that names none sends exactly what it sent before.
|
|
35
|
+
...options.pushTopic ? { pushTopic: options.pushTopic } : {}
|
|
34
36
|
});
|
|
35
37
|
if (!r || !r.activityId) return { activityId: "", started: false };
|
|
36
38
|
return { activityId: r.activityId, started: r.started ?? true };
|
|
@@ -8716,7 +8716,7 @@ function zstack(props) {
|
|
|
8716
8716
|
function text(text2, style, opts) {
|
|
8717
8717
|
return {
|
|
8718
8718
|
id: opts?.id ?? auto("text"),
|
|
8719
|
-
body: { package: "himalaya", type: "Text", props: { text: text2, style, color: opts?.color, maxLines: opts?.maxLines, collapseWhenEmpty: opts?.collapseWhenEmpty, animateValue: opts?.animateValue, animateReveal: opts?.animateReveal, markdown: opts?.markdown, textDirection: opts?.textDirection, minimumScaleFactor: opts?.minimumScaleFactor, monospacedDigits: opts?.monospacedDigits, truncation: opts?.truncation } }
|
|
8719
|
+
body: { package: "himalaya", type: "Text", props: { text: text2, style, color: opts?.color, maxLines: opts?.maxLines, collapseWhenEmpty: opts?.collapseWhenEmpty, animateValue: opts?.animateValue, animateReveal: opts?.animateReveal, markdown: opts?.markdown, textAlign: opts?.textAlign, textDirection: opts?.textDirection, decoration: opts?.decoration, minimumScaleFactor: opts?.minimumScaleFactor, monospacedDigits: opts?.monospacedDigits, truncation: opts?.truncation } }
|
|
8720
8720
|
};
|
|
8721
8721
|
}
|
|
8722
8722
|
function card2(children, opts) {
|
|
@@ -19,8 +19,10 @@ async function queryServices(req = {}) {
|
|
|
19
19
|
const res = await wixCall("POST", "/bookings/v2/services/query", req);
|
|
20
20
|
return { ...res, services: (res.services ?? []).map(decodeService) };
|
|
21
21
|
}
|
|
22
|
-
async function getService(serviceId) {
|
|
23
|
-
const
|
|
22
|
+
async function getService(serviceId, options) {
|
|
23
|
+
const path = `/bookings/v2/services/${serviceId}`;
|
|
24
|
+
const conditionalFields = options?.conditionalFields ?? [];
|
|
25
|
+
const res = await wixCall("GET", conditionalFields.length ? wixQueryPath(path, { conditionalFields }) : path);
|
|
24
26
|
return { ...res, service: decodeService(res.service) };
|
|
25
27
|
}
|
|
26
28
|
function encodeServiceWrite(write, existing) {
|
|
@@ -76,6 +76,17 @@ async function getCurrentCart() {
|
|
|
76
76
|
throw e;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
function addCouponToCurrentCart(code) {
|
|
80
|
+
if (!code.trim()) throw new Error("addCouponToCurrentCart: code is required");
|
|
81
|
+
return wixCall("POST", "/ecom/v2/carts/current/add-coupon", { coupon: { code: code.trim() } });
|
|
82
|
+
}
|
|
83
|
+
function removeCouponFromCurrentCart(couponId) {
|
|
84
|
+
if (!couponId) throw new Error("removeCouponFromCurrentCart: couponId is required");
|
|
85
|
+
return wixCall("POST", "/ecom/v2/carts/current/remove-coupon", { couponId });
|
|
86
|
+
}
|
|
87
|
+
function calculateCurrentCart() {
|
|
88
|
+
return wixCall("POST", "/ecom/v2/carts/current/calculate", { refreshCart: true });
|
|
89
|
+
}
|
|
79
90
|
function removeLineItemsFromCurrentCart(lineItemIds) {
|
|
80
91
|
return wixCall("POST", "/ecom/v1/carts/current/remove-line-items", { lineItemIds });
|
|
81
92
|
}
|
|
@@ -201,8 +212,10 @@ function searchOrders(req = {}, opts) {
|
|
|
201
212
|
);
|
|
202
213
|
}
|
|
203
214
|
export {
|
|
215
|
+
addCouponToCurrentCart,
|
|
204
216
|
addToCurrentCart,
|
|
205
217
|
archiveOrder,
|
|
218
|
+
calculateCurrentCart,
|
|
206
219
|
cancelOrder,
|
|
207
220
|
createCheckout,
|
|
208
221
|
createCheckoutFromCurrentCart,
|
|
@@ -224,6 +237,7 @@ export {
|
|
|
224
237
|
markSavedPaymentMethodPrimary,
|
|
225
238
|
memberAddressFieldMask,
|
|
226
239
|
refundPayments,
|
|
240
|
+
removeCouponFromCurrentCart,
|
|
227
241
|
removeLineItemsFromCurrentCart,
|
|
228
242
|
searchOrders,
|
|
229
243
|
setDefaultMemberAddress,
|