@wix/himalaya-cli 0.1404.0 → 0.1406.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/app-config.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +3 -0
- 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/ts/src/schema.d.ts +88 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +350 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ai-site-chat/src/extensions.d.ts +10 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ai-site-chat/src/index.d.ts +102 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +82 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +83 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ai-site-chat.mjs +70 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +4 -0
- package/dist/cli.mjs +250 -40
- package/dist/preview-assets.generated.bin +0 -0
- package/fixtures/wix-canned.json +3 -0
- package/guides/component-reference.json +3 -2
- package/guides/component-reference.md +7 -1
- package/guides/importable-sdks.md +1 -0
- package/guides/sdk-reference.json +133 -2
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +7 -0
- package/templates/beauty-salon/dev/index.ts +1750 -0
- package/templates/beauty-salon/himalaya.content.json +3 -0
- package/templates/beauty-salon/site-functions/README.md +37 -0
- package/templates/beauty-salon/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/beauty-salon/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
- package/templates/branded-lite/config.ts +7 -0
- package/templates/branded-lite/dev/index.ts +1750 -0
- package/templates/branded-lite/himalaya.content.json +3 -0
- package/templates/branded-lite/site-functions/README.md +37 -0
- package/templates/branded-lite/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/branded-lite/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
- package/templates/community-club/config.ts +7 -0
- package/templates/community-club/dev/index.ts +1750 -0
- package/templates/community-club/himalaya.content.json +3 -0
- package/templates/community-club/site-functions/README.md +37 -0
- package/templates/community-club/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/community-club/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
- package/templates/events-meetups/config.ts +7 -0
- package/templates/events-meetups/dev/index.ts +1750 -0
- package/templates/events-meetups/himalaya.content.json +3 -0
- package/templates/events-meetups/site-functions/README.md +37 -0
- package/templates/events-meetups/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/events-meetups/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
- package/templates/gym-fitness/config.ts +7 -0
- package/templates/gym-fitness/dev/index.ts +1750 -0
- package/templates/gym-fitness/himalaya.content.json +3 -0
- package/templates/gym-fitness/site-functions/README.md +37 -0
- package/templates/gym-fitness/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/gym-fitness/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
- package/templates/nonprofit-cause/config.ts +7 -0
- package/templates/nonprofit-cause/dev/index.ts +1750 -0
- package/templates/nonprofit-cause/himalaya.content.json +3 -0
- package/templates/nonprofit-cause/site-functions/README.md +37 -0
- package/templates/nonprofit-cause/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/nonprofit-cause/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
- package/templates/podcast-creator/config.ts +7 -0
- package/templates/podcast-creator/dev/index.ts +1750 -0
- package/templates/podcast-creator/himalaya.content.json +3 -0
- package/templates/podcast-creator/site-functions/README.md +37 -0
- package/templates/podcast-creator/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/podcast-creator/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
- package/templates/portfolio-creative/config.ts +7 -0
- package/templates/portfolio-creative/dev/index.ts +1750 -0
- package/templates/portfolio-creative/himalaya.content.json +3 -0
- package/templates/portfolio-creative/site-functions/README.md +37 -0
- package/templates/portfolio-creative/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/portfolio-creative/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
- package/templates/restaurant/config.ts +7 -0
- package/templates/restaurant/dev/index.ts +1750 -0
- package/templates/restaurant/himalaya.content.json +3 -0
- package/templates/restaurant/site-functions/README.md +37 -0
- package/templates/restaurant/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/restaurant/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
- package/templates/retail-store/config.ts +7 -0
- package/templates/retail-store/dev/index.ts +1750 -0
- package/templates/retail-store/himalaya.content.json +3 -0
- package/templates/retail-store/site-functions/README.md +37 -0
- package/templates/retail-store/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/retail-store/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
- package/templates/yoga-studio/config.ts +7 -0
- package/templates/yoga-studio/dev/index.ts +1750 -0
- package/templates/yoga-studio/himalaya.content.json +3 -0
- package/templates/yoga-studio/site-functions/README.md +37 -0
- package/templates/yoga-studio/site-functions/himiMemberPhotoUploadUrl.js +90 -0
- package/templates/yoga-studio/tier5-src/_shared/member-account-routes.ts +11 -3
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/index.ts +1091 -0
|
@@ -62,6 +62,7 @@ export interface NavigationConfig {
|
|
|
62
62
|
site?: import("@wix/himalaya/core").SiteNavConfig;
|
|
63
63
|
/** Signed release allowlist for contained browser Tier-5 `_stream` requests. */
|
|
64
64
|
streamPolicy?: StreamPolicy;
|
|
65
|
+
topBarLogo?: import("@wix/himalaya/core").TopBarLogo;
|
|
65
66
|
splash?: SplashConfig;
|
|
66
67
|
locale?: LocaleConfig;
|
|
67
68
|
backAffordance?: BackAffordanceConfig;
|
|
@@ -227,6 +227,9 @@ export interface DerivedAppMeta {
|
|
|
227
227
|
site?: import("@wix/himalaya/core").SiteNavConfig;
|
|
228
228
|
/** Forwarded from AppConfig.navigation.streamPolicy — the signed browser stream allowlist. */
|
|
229
229
|
streamPolicy?: import("@wix/himalaya/core").StreamPolicy;
|
|
230
|
+
/** Forwarded from AppConfig.navigation.topBarLogo — the app-wide logo for tab-stack roots
|
|
231
|
+
* (RFC 0066 amendment "top-bar gap items"). */
|
|
232
|
+
topBarLogo?: import("@wix/himalaya/core").TopBarLogo;
|
|
230
233
|
/** Forwarded from AppConfig.`splash` — the in-app splash surface. NOTE the
|
|
231
234
|
* asymmetry with the fields above: this reads the TOP-LEVEL `config.splash`, not
|
|
232
235
|
* `config.navigation.splash`, because the same block also drives the build-time
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -1656,6 +1656,12 @@ export interface MediaFieldProps {
|
|
|
1656
1656
|
uploadService: string;
|
|
1657
1657
|
/** Empty-well copy (a message key or literal). Default "Add a photo". */
|
|
1658
1658
|
label?: string;
|
|
1659
|
+
/** Set to "avatar" for a circular picker row; omitted preserves the 160pt image well. */
|
|
1660
|
+
presentation?: string;
|
|
1661
|
+
/** `$service:<svc>.<path>` → initials shown in avatar mode when no photo is set. */
|
|
1662
|
+
fallbackTextPath?: string;
|
|
1663
|
+
/** Optional visible heading in avatar mode; label remains the action caption. */
|
|
1664
|
+
heading?: string;
|
|
1659
1665
|
}
|
|
1660
1666
|
/**
|
|
1661
1667
|
* A formatted, multiline editor that writes HTML into an enclosing Form under `id`.
|
|
@@ -2694,6 +2700,8 @@ export interface NavigationConfig {
|
|
|
2694
2700
|
* links resolve as before. Build it with `siteNavConfig()` from
|
|
2695
2701
|
* `@himalaya/core/site-shell`; resolution is `resolveSiteLink()`. */
|
|
2696
2702
|
site?: SiteNavConfig;
|
|
2703
|
+
/** RFC 0066 amendment "top-bar gap items" — app-wide logo for tab-stack roots. */
|
|
2704
|
+
topBarLogo?: TopBarLogo;
|
|
2697
2705
|
scheme: string;
|
|
2698
2706
|
deepLinkPatterns: DeepLinkPattern[];
|
|
2699
2707
|
linkableScreens: LinkableScreen[];
|
|
@@ -2897,6 +2905,86 @@ export interface TopBarConfig {
|
|
|
2897
2905
|
leading?: string;
|
|
2898
2906
|
/** Content-under-bar: "" | "opaque" (default) | "transparent" | "immersive". */
|
|
2899
2907
|
style?: string;
|
|
2908
|
+
/** RFC 0066 §1 — toolbar items (drawn after the legacy `actions`). */
|
|
2909
|
+
items?: ToolbarItem[];
|
|
2910
|
+
/** RFC 0066 §1 — "" / "automatic" (default) | "large" | "inline". */
|
|
2911
|
+
titleDisplay?: string;
|
|
2912
|
+
/** RFC 0066 §1 — the literal subtitle (the fallback for `subtitlePath`). */
|
|
2913
|
+
subtitle?: string;
|
|
2914
|
+
/** RFC 0066 §1 — "" / "visible" (default) | "hidden". */
|
|
2915
|
+
visibility?: string;
|
|
2916
|
+
/** RFC 0066 §1 — bar fill token. iOS 26 keeps the system glass (amendment R12). */
|
|
2917
|
+
background?: TokenRef;
|
|
2918
|
+
/** RFC 0066 amendment — the screen's logo; overrides `NavigationConfig.topBarLogo`. */
|
|
2919
|
+
logo?: TopBarLogo;
|
|
2920
|
+
/** RFC 0066 amendment — the title as a menu. */
|
|
2921
|
+
titleMenu?: TopBarTitleMenu;
|
|
2922
|
+
/** RFC 0066 amendment — live subtitle (`$service:`); `subtitle` is the fallback. */
|
|
2923
|
+
subtitlePath?: string;
|
|
2924
|
+
/** RFC 0066 amendment — "" / "pinned" (default) | "hide_on_scroll". */
|
|
2925
|
+
scrollBehavior?: string;
|
|
2926
|
+
/** RFC 0066 amendment — truthy ⇒ leaving the presentation asks to discard. Unset/unresolved ⇒ false. */
|
|
2927
|
+
dirtyPath?: string;
|
|
2928
|
+
}
|
|
2929
|
+
/** RFC 0066 §1 (+ its "top-bar gap items" amendment) — one top-bar item. Test id `toolbar.<id>`
|
|
2930
|
+
* (`toolbar-<id>` on web and React Native). Every tap carries an existing `Action`
|
|
2931
|
+
* (invariant 15). Bindings are `$service:` sentinels resolved by the screen host. */
|
|
2932
|
+
export interface ToolbarItem {
|
|
2933
|
+
id: string;
|
|
2934
|
+
/** "leading" | "trailing" (default) | "principal" | "bottom" | "keyboard" | "overflow". */
|
|
2935
|
+
placement?: string;
|
|
2936
|
+
/** Text button when there is no icon; the accessible name always. */
|
|
2937
|
+
label?: string;
|
|
2938
|
+
icon?: IconRef;
|
|
2939
|
+
onTap?: Action;
|
|
2940
|
+
/** "" | "cancel" | "confirm" | "destructive". */
|
|
2941
|
+
role?: string;
|
|
2942
|
+
disabled?: boolean;
|
|
2943
|
+
/** OR'd with `disabled`. For Save, bind "nothing to save" (e.g. `cannotSave`), never the dirty flag. */
|
|
2944
|
+
disabledPath?: string;
|
|
2945
|
+
/** Non-empty ⇒ the item opens a menu. */
|
|
2946
|
+
menu?: MenuItem[];
|
|
2947
|
+
/** "principal" only: a custom title view. */
|
|
2948
|
+
content?: Component;
|
|
2949
|
+
/** Truthy ⇒ a progress indicator replaces the item. Unset/unresolved ⇒ false. */
|
|
2950
|
+
loadingPath?: string;
|
|
2951
|
+
/** Set ⇒ the item draws an avatar; `label` stays the accessible name ("Profile" by default). */
|
|
2952
|
+
avatar?: ToolbarAvatar;
|
|
2953
|
+
/** Live label; `label` is the fallback. */
|
|
2954
|
+
labelPath?: string;
|
|
2955
|
+
}
|
|
2956
|
+
/** RFC 0066 amendment — an avatar item. Images are absolute https URLs (resolve a Wix
|
|
2957
|
+
* media id with `wixMediaUrl` before publishing). */
|
|
2958
|
+
export interface ToolbarAvatar {
|
|
2959
|
+
imageUrl?: string;
|
|
2960
|
+
initials?: string;
|
|
2961
|
+
imageUrlPath?: string;
|
|
2962
|
+
initialsPath?: string;
|
|
2963
|
+
}
|
|
2964
|
+
/** RFC 0066 amendment — the bar logo, per screen (`TopBarConfig.logo`) or app-wide
|
|
2965
|
+
* (`NavigationConfig.topBarLogo`). `imageUrlPath` resolves by the parent's context: the
|
|
2966
|
+
* screen host per screen, the nav worker app-wide. */
|
|
2967
|
+
export interface TopBarLogo {
|
|
2968
|
+
imageUrl?: string;
|
|
2969
|
+
imageUrlDark?: string;
|
|
2970
|
+
/** Baked asset name; wins over `imageUrl`. */
|
|
2971
|
+
imageAsset?: string;
|
|
2972
|
+
/** Optional business name beside a mark-only logo. */
|
|
2973
|
+
name?: string;
|
|
2974
|
+
/** "" / "title" (default) | "leading" | "none". */
|
|
2975
|
+
placement?: string;
|
|
2976
|
+
imageUrlPath?: string;
|
|
2977
|
+
/** Default: the app's display name. */
|
|
2978
|
+
accessibilityLabel?: string;
|
|
2979
|
+
}
|
|
2980
|
+
/** RFC 0066 amendment — the title as a menu (switch location or feed). */
|
|
2981
|
+
export interface TopBarTitleMenu {
|
|
2982
|
+
items?: MenuItem[];
|
|
2983
|
+
selectedId?: string;
|
|
2984
|
+
/** `selectedId` is the fallback. */
|
|
2985
|
+
selectedIdPath?: string;
|
|
2986
|
+
/** Default "<title>, switch". */
|
|
2987
|
+
accessibilityLabel?: string;
|
|
2900
2988
|
}
|
|
2901
2989
|
/** RFC 0010 (top-bar amendment) — one trailing top-bar action. Reuses the
|
|
2902
2990
|
* design-system icon name, the `NavBadge` overlay, and the same `Action`
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts
CHANGED
|
@@ -272,6 +272,181 @@ export declare const screenDescriptorSchema: {
|
|
|
272
272
|
readonly style: {
|
|
273
273
|
readonly type: "string";
|
|
274
274
|
};
|
|
275
|
+
readonly items: {
|
|
276
|
+
readonly type: "array";
|
|
277
|
+
readonly items: {
|
|
278
|
+
readonly $ref: "#/$defs/toolbarItem";
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
readonly titleDisplay: {
|
|
282
|
+
readonly type: "string";
|
|
283
|
+
};
|
|
284
|
+
readonly subtitle: {
|
|
285
|
+
readonly type: "string";
|
|
286
|
+
};
|
|
287
|
+
readonly visibility: {
|
|
288
|
+
readonly type: "string";
|
|
289
|
+
};
|
|
290
|
+
readonly background: {
|
|
291
|
+
readonly $ref: "#/$defs/tokenRef";
|
|
292
|
+
};
|
|
293
|
+
readonly logo: {
|
|
294
|
+
readonly $ref: "#/$defs/topBarLogo";
|
|
295
|
+
};
|
|
296
|
+
readonly titleMenu: {
|
|
297
|
+
readonly $ref: "#/$defs/topBarTitleMenu";
|
|
298
|
+
};
|
|
299
|
+
readonly subtitlePath: {
|
|
300
|
+
readonly type: "string";
|
|
301
|
+
};
|
|
302
|
+
readonly scrollBehavior: {
|
|
303
|
+
readonly type: "string";
|
|
304
|
+
};
|
|
305
|
+
readonly dirtyPath: {
|
|
306
|
+
readonly type: "string";
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
readonly toolbarItem: {
|
|
311
|
+
readonly type: "object";
|
|
312
|
+
readonly additionalProperties: false;
|
|
313
|
+
readonly required: readonly ["id"];
|
|
314
|
+
readonly properties: {
|
|
315
|
+
readonly id: {
|
|
316
|
+
readonly type: "string";
|
|
317
|
+
readonly minLength: 1;
|
|
318
|
+
};
|
|
319
|
+
readonly placement: {
|
|
320
|
+
readonly type: "string";
|
|
321
|
+
};
|
|
322
|
+
readonly label: {
|
|
323
|
+
readonly type: "string";
|
|
324
|
+
};
|
|
325
|
+
readonly icon: {
|
|
326
|
+
readonly type: "string";
|
|
327
|
+
};
|
|
328
|
+
readonly onTap: {
|
|
329
|
+
readonly $ref: "#/$defs/action";
|
|
330
|
+
};
|
|
331
|
+
readonly role: {
|
|
332
|
+
readonly type: "string";
|
|
333
|
+
};
|
|
334
|
+
readonly disabled: {
|
|
335
|
+
readonly type: "boolean";
|
|
336
|
+
};
|
|
337
|
+
readonly disabledPath: {
|
|
338
|
+
readonly type: "string";
|
|
339
|
+
};
|
|
340
|
+
readonly menu: {
|
|
341
|
+
readonly type: "array";
|
|
342
|
+
readonly items: {
|
|
343
|
+
readonly $ref: "#/$defs/topBarMenuItem";
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
readonly content: {
|
|
347
|
+
readonly $ref: "#/$defs/component";
|
|
348
|
+
};
|
|
349
|
+
readonly loadingPath: {
|
|
350
|
+
readonly type: "string";
|
|
351
|
+
};
|
|
352
|
+
readonly avatar: {
|
|
353
|
+
readonly $ref: "#/$defs/toolbarAvatar";
|
|
354
|
+
};
|
|
355
|
+
readonly labelPath: {
|
|
356
|
+
readonly type: "string";
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
readonly toolbarAvatar: {
|
|
361
|
+
readonly type: "object";
|
|
362
|
+
readonly additionalProperties: false;
|
|
363
|
+
readonly properties: {
|
|
364
|
+
readonly imageUrl: {
|
|
365
|
+
readonly type: "string";
|
|
366
|
+
};
|
|
367
|
+
readonly initials: {
|
|
368
|
+
readonly type: "string";
|
|
369
|
+
};
|
|
370
|
+
readonly imageUrlPath: {
|
|
371
|
+
readonly type: "string";
|
|
372
|
+
};
|
|
373
|
+
readonly initialsPath: {
|
|
374
|
+
readonly type: "string";
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
readonly topBarLogo: {
|
|
379
|
+
readonly type: "object";
|
|
380
|
+
readonly additionalProperties: false;
|
|
381
|
+
readonly properties: {
|
|
382
|
+
readonly imageUrl: {
|
|
383
|
+
readonly type: "string";
|
|
384
|
+
};
|
|
385
|
+
readonly imageUrlDark: {
|
|
386
|
+
readonly type: "string";
|
|
387
|
+
};
|
|
388
|
+
readonly imageAsset: {
|
|
389
|
+
readonly type: "string";
|
|
390
|
+
};
|
|
391
|
+
readonly name: {
|
|
392
|
+
readonly type: "string";
|
|
393
|
+
};
|
|
394
|
+
readonly placement: {
|
|
395
|
+
readonly type: "string";
|
|
396
|
+
};
|
|
397
|
+
readonly imageUrlPath: {
|
|
398
|
+
readonly type: "string";
|
|
399
|
+
};
|
|
400
|
+
readonly accessibilityLabel: {
|
|
401
|
+
readonly type: "string";
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
readonly topBarTitleMenu: {
|
|
406
|
+
readonly type: "object";
|
|
407
|
+
readonly additionalProperties: false;
|
|
408
|
+
readonly properties: {
|
|
409
|
+
readonly items: {
|
|
410
|
+
readonly type: "array";
|
|
411
|
+
readonly items: {
|
|
412
|
+
readonly $ref: "#/$defs/topBarMenuItem";
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
readonly selectedId: {
|
|
416
|
+
readonly type: "string";
|
|
417
|
+
};
|
|
418
|
+
readonly selectedIdPath: {
|
|
419
|
+
readonly type: "string";
|
|
420
|
+
};
|
|
421
|
+
readonly accessibilityLabel: {
|
|
422
|
+
readonly type: "string";
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
readonly topBarMenuItem: {
|
|
427
|
+
readonly type: "object";
|
|
428
|
+
readonly additionalProperties: false;
|
|
429
|
+
readonly required: readonly ["id", "label"];
|
|
430
|
+
readonly properties: {
|
|
431
|
+
readonly id: {
|
|
432
|
+
readonly type: "string";
|
|
433
|
+
readonly minLength: 1;
|
|
434
|
+
};
|
|
435
|
+
readonly label: {
|
|
436
|
+
readonly type: "string";
|
|
437
|
+
};
|
|
438
|
+
readonly icon: {
|
|
439
|
+
readonly type: "string";
|
|
440
|
+
};
|
|
441
|
+
readonly destructive: {
|
|
442
|
+
readonly type: "boolean";
|
|
443
|
+
};
|
|
444
|
+
readonly disabled: {
|
|
445
|
+
readonly type: "boolean";
|
|
446
|
+
};
|
|
447
|
+
readonly action: {
|
|
448
|
+
readonly $ref: "#/$defs/action";
|
|
449
|
+
};
|
|
275
450
|
};
|
|
276
451
|
};
|
|
277
452
|
readonly topBarAction: {
|
|
@@ -1260,6 +1435,181 @@ export declare const widgetSnapshotSchema: {
|
|
|
1260
1435
|
readonly style: {
|
|
1261
1436
|
readonly type: "string";
|
|
1262
1437
|
};
|
|
1438
|
+
readonly items: {
|
|
1439
|
+
readonly type: "array";
|
|
1440
|
+
readonly items: {
|
|
1441
|
+
readonly $ref: "#/$defs/toolbarItem";
|
|
1442
|
+
};
|
|
1443
|
+
};
|
|
1444
|
+
readonly titleDisplay: {
|
|
1445
|
+
readonly type: "string";
|
|
1446
|
+
};
|
|
1447
|
+
readonly subtitle: {
|
|
1448
|
+
readonly type: "string";
|
|
1449
|
+
};
|
|
1450
|
+
readonly visibility: {
|
|
1451
|
+
readonly type: "string";
|
|
1452
|
+
};
|
|
1453
|
+
readonly background: {
|
|
1454
|
+
readonly $ref: "#/$defs/tokenRef";
|
|
1455
|
+
};
|
|
1456
|
+
readonly logo: {
|
|
1457
|
+
readonly $ref: "#/$defs/topBarLogo";
|
|
1458
|
+
};
|
|
1459
|
+
readonly titleMenu: {
|
|
1460
|
+
readonly $ref: "#/$defs/topBarTitleMenu";
|
|
1461
|
+
};
|
|
1462
|
+
readonly subtitlePath: {
|
|
1463
|
+
readonly type: "string";
|
|
1464
|
+
};
|
|
1465
|
+
readonly scrollBehavior: {
|
|
1466
|
+
readonly type: "string";
|
|
1467
|
+
};
|
|
1468
|
+
readonly dirtyPath: {
|
|
1469
|
+
readonly type: "string";
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
};
|
|
1473
|
+
readonly toolbarItem: {
|
|
1474
|
+
readonly type: "object";
|
|
1475
|
+
readonly additionalProperties: false;
|
|
1476
|
+
readonly required: readonly ["id"];
|
|
1477
|
+
readonly properties: {
|
|
1478
|
+
readonly id: {
|
|
1479
|
+
readonly type: "string";
|
|
1480
|
+
readonly minLength: 1;
|
|
1481
|
+
};
|
|
1482
|
+
readonly placement: {
|
|
1483
|
+
readonly type: "string";
|
|
1484
|
+
};
|
|
1485
|
+
readonly label: {
|
|
1486
|
+
readonly type: "string";
|
|
1487
|
+
};
|
|
1488
|
+
readonly icon: {
|
|
1489
|
+
readonly type: "string";
|
|
1490
|
+
};
|
|
1491
|
+
readonly onTap: {
|
|
1492
|
+
readonly $ref: "#/$defs/action";
|
|
1493
|
+
};
|
|
1494
|
+
readonly role: {
|
|
1495
|
+
readonly type: "string";
|
|
1496
|
+
};
|
|
1497
|
+
readonly disabled: {
|
|
1498
|
+
readonly type: "boolean";
|
|
1499
|
+
};
|
|
1500
|
+
readonly disabledPath: {
|
|
1501
|
+
readonly type: "string";
|
|
1502
|
+
};
|
|
1503
|
+
readonly menu: {
|
|
1504
|
+
readonly type: "array";
|
|
1505
|
+
readonly items: {
|
|
1506
|
+
readonly $ref: "#/$defs/topBarMenuItem";
|
|
1507
|
+
};
|
|
1508
|
+
};
|
|
1509
|
+
readonly content: {
|
|
1510
|
+
readonly $ref: "#/$defs/component";
|
|
1511
|
+
};
|
|
1512
|
+
readonly loadingPath: {
|
|
1513
|
+
readonly type: "string";
|
|
1514
|
+
};
|
|
1515
|
+
readonly avatar: {
|
|
1516
|
+
readonly $ref: "#/$defs/toolbarAvatar";
|
|
1517
|
+
};
|
|
1518
|
+
readonly labelPath: {
|
|
1519
|
+
readonly type: "string";
|
|
1520
|
+
};
|
|
1521
|
+
};
|
|
1522
|
+
};
|
|
1523
|
+
readonly toolbarAvatar: {
|
|
1524
|
+
readonly type: "object";
|
|
1525
|
+
readonly additionalProperties: false;
|
|
1526
|
+
readonly properties: {
|
|
1527
|
+
readonly imageUrl: {
|
|
1528
|
+
readonly type: "string";
|
|
1529
|
+
};
|
|
1530
|
+
readonly initials: {
|
|
1531
|
+
readonly type: "string";
|
|
1532
|
+
};
|
|
1533
|
+
readonly imageUrlPath: {
|
|
1534
|
+
readonly type: "string";
|
|
1535
|
+
};
|
|
1536
|
+
readonly initialsPath: {
|
|
1537
|
+
readonly type: "string";
|
|
1538
|
+
};
|
|
1539
|
+
};
|
|
1540
|
+
};
|
|
1541
|
+
readonly topBarLogo: {
|
|
1542
|
+
readonly type: "object";
|
|
1543
|
+
readonly additionalProperties: false;
|
|
1544
|
+
readonly properties: {
|
|
1545
|
+
readonly imageUrl: {
|
|
1546
|
+
readonly type: "string";
|
|
1547
|
+
};
|
|
1548
|
+
readonly imageUrlDark: {
|
|
1549
|
+
readonly type: "string";
|
|
1550
|
+
};
|
|
1551
|
+
readonly imageAsset: {
|
|
1552
|
+
readonly type: "string";
|
|
1553
|
+
};
|
|
1554
|
+
readonly name: {
|
|
1555
|
+
readonly type: "string";
|
|
1556
|
+
};
|
|
1557
|
+
readonly placement: {
|
|
1558
|
+
readonly type: "string";
|
|
1559
|
+
};
|
|
1560
|
+
readonly imageUrlPath: {
|
|
1561
|
+
readonly type: "string";
|
|
1562
|
+
};
|
|
1563
|
+
readonly accessibilityLabel: {
|
|
1564
|
+
readonly type: "string";
|
|
1565
|
+
};
|
|
1566
|
+
};
|
|
1567
|
+
};
|
|
1568
|
+
readonly topBarTitleMenu: {
|
|
1569
|
+
readonly type: "object";
|
|
1570
|
+
readonly additionalProperties: false;
|
|
1571
|
+
readonly properties: {
|
|
1572
|
+
readonly items: {
|
|
1573
|
+
readonly type: "array";
|
|
1574
|
+
readonly items: {
|
|
1575
|
+
readonly $ref: "#/$defs/topBarMenuItem";
|
|
1576
|
+
};
|
|
1577
|
+
};
|
|
1578
|
+
readonly selectedId: {
|
|
1579
|
+
readonly type: "string";
|
|
1580
|
+
};
|
|
1581
|
+
readonly selectedIdPath: {
|
|
1582
|
+
readonly type: "string";
|
|
1583
|
+
};
|
|
1584
|
+
readonly accessibilityLabel: {
|
|
1585
|
+
readonly type: "string";
|
|
1586
|
+
};
|
|
1587
|
+
};
|
|
1588
|
+
};
|
|
1589
|
+
readonly topBarMenuItem: {
|
|
1590
|
+
readonly type: "object";
|
|
1591
|
+
readonly additionalProperties: false;
|
|
1592
|
+
readonly required: readonly ["id", "label"];
|
|
1593
|
+
readonly properties: {
|
|
1594
|
+
readonly id: {
|
|
1595
|
+
readonly type: "string";
|
|
1596
|
+
readonly minLength: 1;
|
|
1597
|
+
};
|
|
1598
|
+
readonly label: {
|
|
1599
|
+
readonly type: "string";
|
|
1600
|
+
};
|
|
1601
|
+
readonly icon: {
|
|
1602
|
+
readonly type: "string";
|
|
1603
|
+
};
|
|
1604
|
+
readonly destructive: {
|
|
1605
|
+
readonly type: "boolean";
|
|
1606
|
+
};
|
|
1607
|
+
readonly disabled: {
|
|
1608
|
+
readonly type: "boolean";
|
|
1609
|
+
};
|
|
1610
|
+
readonly action: {
|
|
1611
|
+
readonly $ref: "#/$defs/action";
|
|
1612
|
+
};
|
|
1263
1613
|
};
|
|
1264
1614
|
};
|
|
1265
1615
|
readonly topBarAction: {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WixCallOptions, WixStreamMessagesRequest } from "./index.js";
|
|
2
|
+
/** Submits a visitor message (for example a visitor-option selection) to the widget's
|
|
3
|
+
* `messages/stream` endpoint. This is a BUFFERED call, not a stream: the endpoint
|
|
4
|
+
* answers with an SSE body, but the Wix bridge reads the whole body before it resolves,
|
|
5
|
+
* so the promise settles only once the response has ended and the events are not
|
|
6
|
+
* delivered as they arrive. The payload is returned opaque, as the bridge hands it
|
|
7
|
+
* over. Native clients expose the same buffered call as `streamMessages`. The request
|
|
8
|
+
* is sent as the visitor or member session the host supplies; a gateway error rejects.
|
|
9
|
+
* @scope visitor — an anonymous visitor session is enough. */
|
|
10
|
+
export declare function streamMessages(req: WixStreamMessagesRequest, opts?: WixCallOptions): Promise<unknown>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
var himalaya: {
|
|
3
|
+
wixApi?: {
|
|
4
|
+
call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
/** Per-call options. `site` addresses ONE call at a business other than the app's
|
|
9
|
+
* active one, so a cross-site rollup can read several businesses concurrently without
|
|
10
|
+
* `setActiveSite` moving the whole process between them. Omitted ⇒ the active business,
|
|
11
|
+
* byte-identical to a call that never passed options.
|
|
12
|
+
*
|
|
13
|
+
* `site.forSite(msid)` from `@himalaya/wix-platform` returns a value of this shape, so
|
|
14
|
+
* it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
|
|
15
|
+
export interface WixCallOptions {
|
|
16
|
+
site?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
|
|
19
|
+
/** `path` with `req` appended as the query string Wix's RPC gateway reads a GET or
|
|
20
|
+
* DELETE request from. A nested object flattens to dotted field paths
|
|
21
|
+
* (`{ sort: { order: "ASC" } }` → `sort.order=ASC`), an array repeats its key
|
|
22
|
+
* (`{ id: ["a", "b"] }` → `id=a&id=b`), and an absent field contributes nothing —
|
|
23
|
+
* so an empty request yields the bare path. A field whose value is an array of
|
|
24
|
+
* objects has no query-string spelling and is omitted, exactly as Wix's own client
|
|
25
|
+
* omits it; such a field has to be sent through a POST sibling endpoint instead.
|
|
26
|
+
*
|
|
27
|
+
* Built from template literals and `encodeURIComponent`, never `URLSearchParams`:
|
|
28
|
+
* that is a host global the bare Tier-5 worker runtimes (JSCore / Hermes /
|
|
29
|
+
* QuickJS-ng) do not provide, so reaching for it would throw a ReferenceError
|
|
30
|
+
* before the request went out rather than degrade.
|
|
31
|
+
*
|
|
32
|
+
* Exported so the hand-written ./extensions sidecar can build the same URLs. */
|
|
33
|
+
export declare function wixQueryPath(path: string, req: unknown): string;
|
|
34
|
+
export interface WixMessage {
|
|
35
|
+
id?: string;
|
|
36
|
+
createdDate?: string;
|
|
37
|
+
sender?: string;
|
|
38
|
+
conversationId?: string;
|
|
39
|
+
answerTo?: string;
|
|
40
|
+
messageType?: string;
|
|
41
|
+
body?: WixBody;
|
|
42
|
+
inboxId?: string;
|
|
43
|
+
visitorOptions?: string[];
|
|
44
|
+
assistantActions?: string[];
|
|
45
|
+
visitorOptionsFields?: Record<string, unknown>[];
|
|
46
|
+
engineStatus?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface WixBody {
|
|
49
|
+
mainText?: string;
|
|
50
|
+
footerText?: string;
|
|
51
|
+
additionalData?: Record<string, unknown>[];
|
|
52
|
+
}
|
|
53
|
+
export interface WixListMessagesRequest {
|
|
54
|
+
cursorPaging?: WixCursorPaging;
|
|
55
|
+
}
|
|
56
|
+
export interface WixCursorPaging {
|
|
57
|
+
limit?: number;
|
|
58
|
+
cursor?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface WixListMessagesResponse {
|
|
61
|
+
messages?: WixMessage[];
|
|
62
|
+
pagingMetadata?: WixPagingMetadataV2;
|
|
63
|
+
}
|
|
64
|
+
export interface WixPagingMetadataV2 {
|
|
65
|
+
count?: number;
|
|
66
|
+
offset?: number;
|
|
67
|
+
total?: number;
|
|
68
|
+
tooManyToCount?: boolean;
|
|
69
|
+
cursors?: WixCursors;
|
|
70
|
+
hasNext?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface WixCursors {
|
|
73
|
+
next?: string;
|
|
74
|
+
prev?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface WixStreamMessagesRequest {
|
|
77
|
+
message: WixStreamMessage;
|
|
78
|
+
}
|
|
79
|
+
export interface WixStreamMessage {
|
|
80
|
+
sender: "SITE_VISITOR";
|
|
81
|
+
messageType: "VISITOR_OPTION_SELECTED";
|
|
82
|
+
answerTo: string;
|
|
83
|
+
body: WixStreamMessageBody;
|
|
84
|
+
}
|
|
85
|
+
export interface WixStreamMessageBody {
|
|
86
|
+
mainText: string;
|
|
87
|
+
additionalData: WixStreamMessageAdditionalData[];
|
|
88
|
+
}
|
|
89
|
+
export interface WixStreamMessageAdditionalData {
|
|
90
|
+
id: string;
|
|
91
|
+
type: "select_option";
|
|
92
|
+
action: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Lists the messages of the AI Site Chat (Wix Smart Chat) conversation for the active site, paged by cursor via `cursorPaging`. Runs as the site visitor or member session the host supplies; an empty `messages` array means the conversation has no messages yet, and a 4xx/5xx rejects with the gateway error.
|
|
96
|
+
*
|
|
97
|
+
* @scope visitor — an anonymous visitor session is enough.
|
|
98
|
+
*
|
|
99
|
+
* GET /wix-assistant-widget/v1/messages/list
|
|
100
|
+
*/
|
|
101
|
+
export declare function listMessages(req?: WixListMessagesRequest, opts?: WixCallOptions): Promise<WixListMessagesResponse>;
|
|
102
|
+
export * from "./extensions.js";
|