@wix/himalaya-cli 0.1493.0 → 0.1494.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 +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/wix-bookings.mjs +4 -2
- package/dist/cli.mjs +30 -29
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/qa-builds.md +2 -2
- package/guides/sdk-reference.json +256 -11
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +1624 -270
- 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/tokens.json +6 -0
- package/templates/branded-lite/dev/index.ts +1621 -260
- 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/tokens.json +1 -0
- package/templates/community-club/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/community-club/tokens.json +6 -0
- package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/events-meetups/tokens.json +6 -0
- package/templates/gym-fitness/dev/index.ts +1623 -269
- 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/tokens.json +6 -0
- package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/nonprofit-cause/tokens.json +6 -0
- package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/podcast-creator/tokens.json +6 -0
- package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/portfolio-creative/tokens.json +6 -0
- package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/restaurant/tokens.json +6 -0
- package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/retail-store/tokens.json +6 -0
- package/templates/yoga-studio/dev/index.ts +1617 -263
- 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 +6 -0
|
@@ -1593,6 +1593,8 @@ export declare function banner(props: {
|
|
|
1593
1593
|
title: string;
|
|
1594
1594
|
message?: string;
|
|
1595
1595
|
action?: ActionShape;
|
|
1596
|
+
/** #1059 — the action's label; the renderers default it to "Take action". */
|
|
1597
|
+
actionLabel?: string;
|
|
1596
1598
|
dismissible?: boolean;
|
|
1597
1599
|
}, opts?: {
|
|
1598
1600
|
id?: string;
|
|
@@ -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;
|
|
@@ -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) {
|