@wix/himalaya-cli 0.1560.0 → 0.1562.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 +3 -1
- 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/events/src/index.d.ts +60 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +11 -5
- package/dist/cli.mjs +51 -42
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +3 -2
- package/guides/component-reference.md +3 -1
- package/guides/sdk-reference.json +7 -7
- package/package.json +3 -3
- package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/beauty-salon/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/branded-lite/dev/index.ts +2390 -851
- package/templates/branded-lite/himalaya.content.json +1 -1
- package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/branded-lite/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/community-club/dev/index.ts +2387 -848
- package/templates/community-club/himalaya.content.json +1 -1
- package/templates/community-club/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/community-club/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/community-club/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/community-club-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/events-meetups/dev/index.ts +2387 -848
- package/templates/events-meetups/himalaya.content.json +1 -1
- package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/events-meetups/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/events-meetups-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/gym-fitness/dev/index.ts +2392 -853
- package/templates/gym-fitness/himalaya.content.json +1 -1
- package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/nonprofit-cause/dev/index.ts +2387 -848
- package/templates/nonprofit-cause/himalaya.content.json +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/nonprofit-cause/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/owner-lite/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/podcast-creator/dev/index.ts +2388 -849
- package/templates/podcast-creator/himalaya.content.json +1 -1
- package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/podcast-creator/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/portfolio-creative/dev/index.ts +2375 -836
- package/templates/portfolio-creative/himalaya.content.json +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/portfolio-creative/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/restaurant/dev/index.ts +2388 -849
- package/templates/restaurant/himalaya.content.json +1 -1
- package/templates/restaurant/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/restaurant/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/restaurant/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/restaurant-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/retail-store/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/retail-store/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/retail-store-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/yoga-studio/dev/index.ts +2403 -864
- package/templates/yoga-studio/himalaya.content.json +1 -1
- package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/yoga-studio/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/himi-events.ts +7 -0
|
@@ -606,6 +606,7 @@ export type FormFieldVariant = {
|
|
|
606
606
|
value: number;
|
|
607
607
|
min?: number;
|
|
608
608
|
max?: number;
|
|
609
|
+
maxPath?: string;
|
|
609
610
|
onChange?: ActionShape;
|
|
610
611
|
};
|
|
611
612
|
} | {
|
|
@@ -768,7 +769,8 @@ export declare function picker(props: {
|
|
|
768
769
|
export declare function stepper(props: {
|
|
769
770
|
value: number;
|
|
770
771
|
min?: number;
|
|
771
|
-
max?: number;
|
|
772
|
+
max?: number; /** `$service:`/`$item.` path the upper bound follows. */
|
|
773
|
+
maxPath?: string;
|
|
772
774
|
onChange?: ActionShape; /** `$service:` path the count follows (worker is the source of truth). */
|
|
773
775
|
valuePath?: string;
|
|
774
776
|
presentation?: "plain";
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -903,6 +903,8 @@ export interface StepperProps {
|
|
|
903
903
|
valuePath?: string;
|
|
904
904
|
min?: number;
|
|
905
905
|
max?: number;
|
|
906
|
+
/** `$service:`/`$item.` binding → integer maximum, overrides `max`. */
|
|
907
|
+
maxPath?: string;
|
|
906
908
|
onChange?: Action;
|
|
907
909
|
/** "plain" draws exposed minus/value/plus controls; absent uses the default capsule. */
|
|
908
910
|
presentation?: "plain";
|
|
@@ -160,7 +160,7 @@ export declare function queryEvents(opts?: WixQueryEventsOptions, readOptions?:
|
|
|
160
160
|
* each value adds fields: `DETAILS` → `shortDescription`, `mainImage`, `calendarUrls`;
|
|
161
161
|
* `TEXTS` → the Ricos `description`; `REGISTRATION` → `registration`; `URLS` → `eventPageUrl`;
|
|
162
162
|
* `FORM` → `form`, the published registration controls and inputs. */
|
|
163
|
-
export type WixEventFieldset = "DETAILS" | "TEXTS" | "REGISTRATION" | "URLS" | "FORM";
|
|
163
|
+
export type WixEventFieldset = "DETAILS" | "TEXTS" | "REGISTRATION" | "URLS" | "FORM" | "AGENDA";
|
|
164
164
|
/** A Ricos document (Events v3 `description`). Opaque here: read it with a Ricos walker, and
|
|
165
165
|
* write it back whole — a PATCH replaces the entire description. */
|
|
166
166
|
export interface WixEventRichContent {
|
|
@@ -169,11 +169,10 @@ export interface WixEventRichContent {
|
|
|
169
169
|
documentStyle?: unknown;
|
|
170
170
|
}
|
|
171
171
|
/** Get one event — GET /events/v3/events/{eventId}. Response wraps as `{ event }`.
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* `opts.fields` requests extra v3 fieldsets; `["TEXTS"]` returns `description`. */
|
|
172
|
+
* This GET returns the Events v3 BASE fieldset, which is slimmer than `queryEvents`;
|
|
173
|
+
* fields such as `registration` and `calendarUrls` are absent from a bare `getEvent`.
|
|
174
|
+
* Use `opts.fields` to request fieldsets such as `DETAILS`, `TEXTS`, `REGISTRATION`,
|
|
175
|
+
* `URLS`, `FORM`, and `AGENDA` when a one-event read needs them. */
|
|
177
176
|
export declare function getEvent(eventId: string, opts?: {
|
|
178
177
|
fields?: WixEventFieldset[];
|
|
179
178
|
}, readOptions?: WixCallOptions): Promise<WixGetEventResponse>;
|
|
@@ -277,11 +276,61 @@ export interface WixAvailableTicket {
|
|
|
277
276
|
limitPerCheckout?: number;
|
|
278
277
|
orderIndex?: number;
|
|
279
278
|
saleStatus?: string;
|
|
279
|
+
salesDetails?: {
|
|
280
|
+
unsoldCount?: number;
|
|
281
|
+
soldCount?: number;
|
|
282
|
+
reservedCount?: number;
|
|
283
|
+
soldOut?: boolean;
|
|
284
|
+
};
|
|
285
|
+
salePeriod?: {
|
|
286
|
+
startDate?: string;
|
|
287
|
+
endDate?: string;
|
|
288
|
+
};
|
|
280
289
|
state?: string[];
|
|
281
290
|
pricing?: {
|
|
282
291
|
pricingType?: string;
|
|
283
292
|
fixedPrice?: WixTicketPrice;
|
|
284
293
|
};
|
|
294
|
+
pricingOptions?: Array<{
|
|
295
|
+
id?: string;
|
|
296
|
+
optionId?: string;
|
|
297
|
+
name?: string;
|
|
298
|
+
price?: {
|
|
299
|
+
amount?: string;
|
|
300
|
+
value?: string;
|
|
301
|
+
currency?: string;
|
|
302
|
+
};
|
|
303
|
+
}>;
|
|
304
|
+
pricingMethod?: {
|
|
305
|
+
type?: string;
|
|
306
|
+
pricingType?: string;
|
|
307
|
+
free?: boolean;
|
|
308
|
+
fixedPrice?: {
|
|
309
|
+
value?: string;
|
|
310
|
+
currency?: string;
|
|
311
|
+
};
|
|
312
|
+
guestPrice?: {
|
|
313
|
+
value?: string;
|
|
314
|
+
currency?: string;
|
|
315
|
+
};
|
|
316
|
+
pricingOptions?: {
|
|
317
|
+
optionDetails?: Array<{
|
|
318
|
+
id?: string;
|
|
319
|
+
optionId?: string;
|
|
320
|
+
name?: string;
|
|
321
|
+
price?: {
|
|
322
|
+
amount?: string;
|
|
323
|
+
value?: string;
|
|
324
|
+
currency?: string;
|
|
325
|
+
};
|
|
326
|
+
}>;
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
policy?: string;
|
|
330
|
+
policyText?: string;
|
|
331
|
+
wixFeeConfig?: {
|
|
332
|
+
type?: string;
|
|
333
|
+
};
|
|
285
334
|
dashboard?: {
|
|
286
335
|
hidden?: boolean;
|
|
287
336
|
};
|
|
@@ -314,6 +363,10 @@ export declare function getTicketDefinition(id: string): Promise<{
|
|
|
314
363
|
export interface WixTicketQuantity {
|
|
315
364
|
ticketDefinitionId: string;
|
|
316
365
|
quantity: number;
|
|
366
|
+
priceOverride?: string;
|
|
367
|
+
ticketDetails?: Array<{
|
|
368
|
+
pricingOptionId?: string;
|
|
369
|
+
}>;
|
|
317
370
|
}
|
|
318
371
|
export interface WixReservationInvoice {
|
|
319
372
|
grandTotal?: WixTicketPrice;
|
|
@@ -346,7 +399,7 @@ export interface WixEventsCheckoutResponse {
|
|
|
346
399
|
expires?: string;
|
|
347
400
|
orderPageUrl?: string;
|
|
348
401
|
}
|
|
349
|
-
/** Buyer-visible ticket tiers for an event —
|
|
402
|
+
/** Buyer-visible ticket tiers for an event — visitor-readable Events ticket definitions v3. */
|
|
350
403
|
export declare function queryAvailableTickets(eventId: string, limit?: number): Promise<WixQueryAvailableTicketsResponse>;
|
|
351
404
|
/** Hold inventory — POST /events/v1/checkout/reservations. */
|
|
352
405
|
export declare function createTicketReservation(eventId: string, ticketQuantities: WixTicketQuantity[]): Promise<WixCreateReservationResponse>;
|
|
@@ -105,6 +105,7 @@ function addressText(value) {
|
|
|
105
105
|
if (typeof value === "string") return value;
|
|
106
106
|
const a = value;
|
|
107
107
|
if (!a) return "";
|
|
108
|
+
if (a.formattedAddress) return a.formattedAddress;
|
|
108
109
|
if (a.formatted) return a.formatted;
|
|
109
110
|
const street = [a.streetAddress?.number, a.streetAddress?.name].filter(Boolean).join(" ");
|
|
110
111
|
return [a.addressLine, street, a.city, a.subdivision, a.country, a.postalCode].filter((part) => typeof part === "string" && part.trim().length > 0).join(", ");
|
|
@@ -352,13 +353,18 @@ function getTicketDefinition(id) {
|
|
|
352
353
|
if (!id) throw new Error("getTicketDefinition: id is required");
|
|
353
354
|
return wixCall("GET", `/events/v3/ticket-definitions/${encodeURIComponent(id)}`);
|
|
354
355
|
}
|
|
355
|
-
function queryAvailableTickets(eventId, limit = 100) {
|
|
356
|
+
async function queryAvailableTickets(eventId, limit = 100) {
|
|
356
357
|
if (!eventId) throw new Error("queryAvailableTickets: eventId is required");
|
|
357
|
-
|
|
358
|
-
filter: { eventId },
|
|
359
|
-
limit,
|
|
360
|
-
offset: 0
|
|
358
|
+
const response = await wixCall("POST", "/events-ticket-definitions/v3/ticket-definitions/available/query", {
|
|
359
|
+
query: { filter: { eventId: { $eq: eventId } }, paging: { limit, offset: 0 } }
|
|
361
360
|
});
|
|
361
|
+
return { definitions: (response.ticketDefinitions ?? []).map((ticket) => ({
|
|
362
|
+
...ticket,
|
|
363
|
+
price: ticket.price ?? (ticket.pricingMethod?.fixedPrice ? { amount: ticket.pricingMethod.fixedPrice.value, currency: ticket.pricingMethod.fixedPrice.currency } : ticket.pricingMethod?.guestPrice ? { amount: ticket.pricingMethod.guestPrice.value, currency: ticket.pricingMethod.guestPrice.currency } : ticket.pricingMethod?.pricingOptions?.optionDetails?.[0]?.price ? { amount: ticket.pricingMethod.pricingOptions.optionDetails[0].price.amount ?? ticket.pricingMethod.pricingOptions.optionDetails[0].price.value, currency: ticket.pricingMethod.pricingOptions.optionDetails[0].price.currency } : void 0),
|
|
364
|
+
free: ticket.free ?? ticket.pricingMethod?.free ?? /free/i.test(ticket.pricingMethod?.pricingType ?? ""),
|
|
365
|
+
pricingOptions: ticket.pricingMethod?.pricingOptions?.optionDetails,
|
|
366
|
+
policy: ticket.policy ?? ticket.policyText
|
|
367
|
+
})) };
|
|
362
368
|
}
|
|
363
369
|
function createTicketReservation(eventId, ticketQuantities) {
|
|
364
370
|
if (!eventId) throw new Error("createTicketReservation: eventId is required");
|