@wix/himalaya-cli 0.1494.0 → 0.1496.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 -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/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-ecom.mjs +14 -0
- package/dist/cli.mjs +3584 -2541
- 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/sdk-reference.json +11 -256
- package/guides/widgets.md +5 -3
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +2590 -1034
- 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/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 +15 -0
- package/templates/branded-lite/dev/index.ts +2696 -1140
- package/templates/branded-lite/himalaya.content.json +1 -1
- package/templates/branded-lite/tier5-src/_shared/business-chat-model.ts +35 -4
- package/templates/branded-lite/tier5-src/_shared/business-chat-transport.ts +12 -5
- 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/business-chat/index.ts +50 -17
- 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 +8 -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/tokens.json +15 -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/tokens.json +15 -0
- package/templates/gym-fitness/dev/index.ts +2695 -1139
- 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/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 +15 -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/tokens.json +15 -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/tokens.json +15 -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/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 +15 -0
- package/templates/restaurant/dev/index.ts +1 -1
- package/templates/restaurant/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/restaurant/tokens.json +15 -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/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 +15 -0
- package/templates/yoga-studio/dev/index.ts +1 -1
- package/templates/yoga-studio/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/yoga-studio/tokens.json +15 -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;
|
|
@@ -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. */
|
|
@@ -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) {
|
|
@@ -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,
|