@wix/himalaya-cli 0.1750.0 → 0.1752.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.
Files changed (185) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +1 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +3 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +3 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +16 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/himi-package.d.ts +478 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/host-compatibility.d.ts +56 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/icon-catalog.generated.d.ts +1 -1
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +4 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +154 -7
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +3 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/index.d.ts +1 -1
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/native-engine.d.ts +49 -3
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/copy.generated.d.ts +16 -1
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/feedback.d.ts +1 -1
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +2 -0
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/podcast-service.d.ts +105 -0
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/podcast.d.ts +116 -0
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/auth.mjs +27 -2
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +326 -13
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +757 -83
  21. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +156 -0
  22. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth/worker.mjs +133 -13
  23. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth.mjs +139 -13
  24. package/dist/browser-plane/assets.json +5 -5
  25. package/dist/browser-plane/preview-deferred/{b40ea5d0d6251898ff5617139fde8be008dd11e99a70b14c1052093685401700.bin → 2671d1cadb15daa5e59440f4c924e30c221ab3d405e8a56a0ab1cdbe4764af3d.bin} +1 -1
  26. package/dist/browser-plane/sw.js +7 -7
  27. package/dist/cli.mjs +37219 -33014
  28. package/dist/preview-assets.generated.bin +0 -0
  29. package/guides/app-config.md +1 -1
  30. package/guides/component-reference.json +1 -1
  31. package/guides/component-reference.md +4 -0
  32. package/guides/designing-himi-screens.md +7 -0
  33. package/guides/getting-started.md +2 -0
  34. package/guides/headless-loop.md +1 -1
  35. package/guides/himi-json-output.md +25 -3
  36. package/guides/himi-skill.md +2 -0
  37. package/guides/index.json +6 -0
  38. package/guides/push-cli-onboarding.md +13 -0
  39. package/guides/qa-builds.md +15 -2
  40. package/guides/recipe-podcast.md +149 -0
  41. package/guides/releasing-with-himi-serve.md +51 -0
  42. package/guides/store-submission.md +46 -1
  43. package/guides/tier-5-add-a-screen.md +16 -2
  44. package/guides/wix-business-context.md +29 -0
  45. package/guides/wix-platform-usage.md +7 -2
  46. package/package.json +10 -10
  47. package/template-icons/fitness-gym.png +0 -0
  48. package/templates/beauty-salon/dev/index.ts +1 -1
  49. package/templates/beauty-salon/l10n/en.json +1 -1
  50. package/templates/beauty-salon/tier5-src/_shared/program-fields.ts +16 -0
  51. package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +5 -8
  52. package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
  53. package/templates/branded-lite/dev/index.ts +101 -1
  54. package/templates/branded-lite/l10n/en.json +22 -1
  55. package/templates/branded-lite/l10n/es.json +22 -0
  56. package/templates/branded-lite/l10n/fr.json +18 -0
  57. package/templates/branded-lite/l10n/he.json +15 -0
  58. package/templates/branded-lite/tier5-src/_shared/program-fields.ts +16 -0
  59. package/templates/branded-lite/tier5-src/_shared/programs-section.ts +5 -8
  60. package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
  61. package/templates/branded-lite/tier5-src/himi-branded-lite-podcasts/index.ts +14 -234
  62. package/templates/brandy/README.md +33 -0
  63. package/templates/brandy/config.ts +51 -7
  64. package/templates/brandy/dev/index.ts +23 -9
  65. package/templates/community-club/l10n/en.json +1 -1
  66. package/templates/community-club/tier5-src/_shared/program-fields.ts +16 -0
  67. package/templates/community-club/tier5-src/_shared/programs-section.ts +5 -8
  68. package/templates/events-meetups/l10n/en.json +1 -1
  69. package/templates/events-meetups/tier5-src/_shared/program-fields.ts +16 -0
  70. package/templates/events-meetups/tier5-src/_shared/programs-section.ts +5 -8
  71. package/templates/fitness-gym/README.md +53 -0
  72. package/templates/fitness-gym/config.ts +560 -0
  73. package/templates/fitness-gym/dev/index.ts +25787 -0
  74. package/templates/fitness-gym/himalaya.content.json +64 -0
  75. package/templates/fitness-gym/himalaya.template.json +15 -0
  76. package/templates/fitness-gym/icon.png +0 -0
  77. package/templates/fitness-gym/platforms.json +1 -0
  78. package/templates/fitness-gym/tier5-src/_shared/app-locale.ts +61 -0
  79. package/templates/fitness-gym/tier5-src/_shared/booking-location.ts +147 -0
  80. package/templates/fitness-gym/tier5-src/_shared/booking-session.ts +224 -0
  81. package/templates/fitness-gym/tier5-src/_shared/branded-lite-hosted.ts +280 -0
  82. package/templates/fitness-gym/tier5-src/_shared/branded-load-state.ts +109 -0
  83. package/templates/fitness-gym/tier5-src/_shared/business-chat-copy.ts +40 -0
  84. package/templates/fitness-gym/tier5-src/_shared/business-chat-history.ts +51 -0
  85. package/templates/fitness-gym/tier5-src/_shared/business-chat-message-model.ts +177 -0
  86. package/templates/fitness-gym/tier5-src/_shared/business-chat-model.ts +56 -0
  87. package/templates/fitness-gym/tier5-src/_shared/business-chat-presenter.ts +576 -0
  88. package/templates/fitness-gym/tier5-src/_shared/business-chat-transport.ts +148 -0
  89. package/templates/fitness-gym/tier5-src/_shared/collection-contract.ts +228 -0
  90. package/templates/fitness-gym/tier5-src/_shared/collection-query.ts +193 -0
  91. package/templates/fitness-gym/tier5-src/_shared/collection-service.ts +400 -0
  92. package/templates/fitness-gym/tier5-src/_shared/detail-presence.ts +51 -0
  93. package/templates/fitness-gym/tier5-src/_shared/engine-intl.ts +523 -0
  94. package/templates/fitness-gym/tier5-src/_shared/himi-account.ts +194 -0
  95. package/templates/fitness-gym/tier5-src/_shared/himi-booking-saved.ts +88 -0
  96. package/templates/fitness-gym/tier5-src/_shared/himi-bookings.ts +318 -0
  97. package/templates/fitness-gym/tier5-src/_shared/himi-copy.ts +116 -0
  98. package/templates/fitness-gym/tier5-src/_shared/himi-media.ts +29 -0
  99. package/templates/fitness-gym/tier5-src/_shared/himi-store.ts +7 -0
  100. package/templates/fitness-gym/tier5-src/_shared/himi-text.ts +24 -0
  101. package/templates/fitness-gym/tier5-src/_shared/host-events.ts +66 -0
  102. package/templates/fitness-gym/tier5-src/_shared/hosted-checkout.ts +70 -0
  103. package/templates/fitness-gym/tier5-src/_shared/iap-attendance-form.ts +106 -0
  104. package/templates/fitness-gym/tier5-src/_shared/iap-attendance-purchase.ts +216 -0
  105. package/templates/fitness-gym/tier5-src/_shared/iap-attendance.ts +38 -0
  106. package/templates/fitness-gym/tier5-src/_shared/iap-worker.ts +127 -0
  107. package/templates/fitness-gym/tier5-src/_shared/inbox-rooms.ts +68 -0
  108. package/templates/fitness-gym/tier5-src/_shared/local-preferences.ts +38 -0
  109. package/templates/fitness-gym/tier5-src/_shared/member-access.ts +63 -0
  110. package/templates/fitness-gym/tier5-src/_shared/member-account-routes.ts +52 -0
  111. package/templates/fitness-gym/tier5-src/_shared/member-bookings.ts +107 -0
  112. package/templates/fitness-gym/tier5-src/_shared/member-screen.ts +99 -0
  113. package/templates/fitness-gym/tier5-src/_shared/notification-target.ts +141 -0
  114. package/templates/fitness-gym/tier5-src/_shared/offset-page.ts +10 -0
  115. package/templates/fitness-gym/tier5-src/_shared/online-actions.ts +76 -0
  116. package/templates/fitness-gym/tier5-src/_shared/owner-load-error.ts +348 -0
  117. package/templates/fitness-gym/tier5-src/_shared/payment-setup.ts +6 -0
  118. package/templates/fitness-gym/tier5-src/_shared/pricing-plan-display.ts +64 -0
  119. package/templates/fitness-gym/tier5-src/_shared/program-description.ts +11 -0
  120. package/templates/fitness-gym/tier5-src/_shared/program-fields.ts +16 -0
  121. package/templates/fitness-gym/tier5-src/_shared/program-standing.ts +46 -0
  122. package/templates/fitness-gym/tier5-src/_shared/rich-body.ts +78 -0
  123. package/templates/fitness-gym/tier5-src/_shared/rich-content-link.ts +34 -0
  124. package/templates/fitness-gym/tier5-src/_shared/sign-in-sheet.ts +18 -0
  125. package/templates/fitness-gym/tier5-src/_shared/staff-name.ts +18 -0
  126. package/templates/fitness-gym/tier5-src/_shared/weekly-goal.ts +107 -0
  127. package/templates/fitness-gym/tier5-src/_shared/wix-bi.ts +85 -0
  128. package/templates/fitness-gym/tier5-src/_shared/wix-member-links.ts +114 -0
  129. package/templates/fitness-gym/tier5-src/_shared/wix-service-price.ts +146 -0
  130. package/templates/fitness-gym/tier5-src/business-chat/index.ts +732 -0
  131. package/templates/fitness-gym/tier5-src/business-contact/index.ts +6 -0
  132. package/templates/fitness-gym/tier5-src/himi-booking-account/index.ts +267 -0
  133. package/templates/fitness-gym/tier5-src/himi-booking-bookings/index.ts +468 -0
  134. package/templates/fitness-gym/tier5-src/himi-booking-service/index.ts +1190 -0
  135. package/templates/fitness-gym/tier5-src/himi-booking-services/index.ts +791 -0
  136. package/templates/fitness-gym/tier5-src/himi-booking-time/index.ts +1729 -0
  137. package/templates/fitness-gym/tier5-src/himi-branded-lite-agenda/index.ts +988 -0
  138. package/templates/fitness-gym/tier5-src/himi-branded-lite-member-programs/index.ts +656 -0
  139. package/templates/fitness-gym/tier5-src/himi-branded-lite-notifications/index.ts +256 -0
  140. package/templates/fitness-gym/tier5-src/himi-branded-lite-plans/index.ts +495 -0
  141. package/templates/fitness-gym/tier5-src/himi-branded-lite-program/facts.ts +52 -0
  142. package/templates/fitness-gym/tier5-src/himi-branded-lite-program/index.ts +845 -0
  143. package/templates/fitness-gym/tier5-src/himi-fitcoach-goal/index.ts +190 -0
  144. package/templates/fitness-gym/tier5-src/himi-fitcoach-home/index.ts +619 -0
  145. package/templates/fitness-gym/tier5-src/himi-store-account/index.ts +1007 -0
  146. package/templates/fitness-gym/tier5-src/wix-spaces-my-subscriptions/index.ts +84 -0
  147. package/templates/fitness-gym/tier5-src/wix-spaces-subscription-detail/index.ts +139 -0
  148. package/templates/fitness-gym/tokens.json +414 -0
  149. package/templates/gym-fitness/dev/index.ts +1 -1
  150. package/templates/gym-fitness/l10n/en.json +1 -1
  151. package/templates/gym-fitness/tier5-src/_shared/program-fields.ts +16 -0
  152. package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +5 -8
  153. package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
  154. package/templates/medical-services/dev/index.ts +2 -1
  155. package/templates/medical-services/tier5-src/himi-booking-account/index.ts +16 -1
  156. package/templates/nonprofit-cause/l10n/en.json +1 -1
  157. package/templates/nonprofit-cause/tier5-src/_shared/program-fields.ts +16 -0
  158. package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +5 -8
  159. package/templates/personal-fitness-trainer/dev/index.ts +2 -2
  160. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
  161. package/templates/podcast-creator/dev/index.ts +100 -0
  162. package/templates/podcast-creator/l10n/en.json +22 -1
  163. package/templates/podcast-creator/l10n/es.json +22 -0
  164. package/templates/podcast-creator/l10n/fr.json +18 -0
  165. package/templates/podcast-creator/l10n/he.json +15 -0
  166. package/templates/podcast-creator/tier5-src/_shared/program-fields.ts +16 -0
  167. package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +5 -8
  168. package/templates/podcast-creator/tier5-src/himi-branded-lite-podcasts/index.ts +14 -234
  169. package/templates/portfolio-creative/l10n/en.json +1 -1
  170. package/templates/portfolio-creative/tier5-src/_shared/program-fields.ts +16 -0
  171. package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +5 -8
  172. package/templates/restaurant/l10n/en.json +1 -1
  173. package/templates/restaurant/tier5-src/_shared/program-fields.ts +16 -0
  174. package/templates/restaurant/tier5-src/_shared/programs-section.ts +5 -8
  175. package/templates/retail-store/l10n/en.json +1 -1
  176. package/templates/retail-store/tier5-src/_shared/program-fields.ts +16 -0
  177. package/templates/retail-store/tier5-src/_shared/programs-section.ts +5 -8
  178. package/templates/salon-spa/dev/index.ts +1 -1
  179. package/templates/salon-spa/tier5-src/himi-booking-account/index.ts +16 -1
  180. package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
  181. package/templates/yoga-studio/dev/index.ts +1 -1
  182. package/templates/yoga-studio/l10n/en.json +1 -1
  183. package/templates/yoga-studio/tier5-src/_shared/program-fields.ts +16 -0
  184. package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +5 -8
  185. package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
@@ -1,5 +1,5 @@
1
- import type { IconName } from "./icon-catalog.generated.js";
2
- import type { Component, DrawerItem, LinkableScreen, NavTabItem, ScreenDescriptor, SiteNavConfig, WebViewConfig } from "./schema.js";
1
+ import { type IconName } from "./icon-catalog.generated.js";
2
+ import type { Component, DrawerItem, LinkableScreen, NavTabItem, ScreenDescriptor, SiteNavConfig, TopBarConfig, WebViewConfig } from "./schema.js";
3
3
  /** Which hosting platform the site runs on. Selects origin allow-lists and the binary-shipped
4
4
  * page adapter:
5
5
  * - `"wix"` — a Wix site: its custom domain's `www.` twin is allowed, the Wix chrome hiders (ads,
@@ -46,6 +46,9 @@ export interface SitePage {
46
46
  placement?: SitePagePlacement;
47
47
  /** Per-page overrides, merged OVER the shell preset. */
48
48
  webView?: Partial<WebViewConfig>;
49
+ /** Whether this page's screen draws its title in the top bar, over {@link SiteShellConfig.pageTitle}:
50
+ * `true` always, `false` never. Absent ⇒ the site's `pageTitle` rule. */
51
+ showTitle?: boolean;
49
52
  }
50
53
  /** What the shell hides from the hosted site so the native chrome is the only chrome.
51
54
  * Every flag defaults to `true` (hidden) for a Wix or Base44 site, and to `false` for a `"web"`
@@ -102,6 +105,92 @@ export interface SiteShellConfig {
102
105
  * page's placement and icon, and stays the chrome until a menu has been read. Served OTA in
103
106
  * `navigation.site.menuSource`. */
104
107
  menuSource?: "contract" | "runtime";
108
+ /** Whether a site page's screen draws its title in the top bar ({@link SitePageTitle}). Absent ⇒
109
+ * `"auto"`. A page's own `showTitle` wins. */
110
+ pageTitle?: SitePageTitle;
111
+ /** The app-wide top bar: up to {@link SITE_TOP_BAR_MAX_ACTIONS} trailing icons, served as
112
+ * `navigation.topBarDefault` ({@link siteTopBarDefault}). Absent ⇒ title and back/menu only. */
113
+ topBar?: SiteTopBar;
114
+ /** The author's own native screens, placed in the chrome beside the site's pages
115
+ * ({@link SiteNativePage}). The screens themselves come from the content package. */
116
+ nativePages?: readonly SiteNativePage[];
117
+ }
118
+ /** When a site page's screen draws its title in the top bar:
119
+ * - `auto` (default): not on a page a tab, rail or drawer row opens, because its nav label already
120
+ * names it. Shown on an `overflow` page and on the {@link SITE_PAGE_SCREEN_ID} screen a link opens,
121
+ * which no nav label names (that screen shows the page's own document title, #5748);
122
+ * - `always`: on every page (the behaviour before this setting);
123
+ * - `never`: on no page.
124
+ * A hidden title is `topBar.titleDisplay: "hidden"`: no title is drawn, and it stays the screen's
125
+ * name for screen readers. */
126
+ export type SitePageTitle = "auto" | "always" | "never";
127
+ export declare const SITE_PAGE_TITLES: readonly SitePageTitle[];
128
+ /** At most three trailing top-bar icons: a phone's bar also holds the title and back/menu. */
129
+ export declare const SITE_TOP_BAR_MAX_ACTIONS = 3;
130
+ /** The native screens a site shell provides itself, beside the author's {@link SiteNativePage}s: the
131
+ * Notifications screen (every site shell) and the Account screen (a Wix or Base44 member binding).
132
+ * A top-bar `{ screen }` target may name these; a shell narrows the list to the ones it actually has
133
+ * with {@link SiteTopBarOptions.nativeScreens}. */
134
+ export declare const SITE_BUILTIN_NATIVE_SCREENS: readonly string[];
135
+ /** Built-in screens that are never a destination of their own — account deletion is reached from the
136
+ * Account screen, never linked. A native page or top-bar target cannot name them. */
137
+ export declare const SITE_PRIVATE_NATIVE_SCREENS: readonly string[];
138
+ /** The `site.topBar` block. */
139
+ export interface SiteTopBar {
140
+ actions?: readonly SiteTopBarAction[];
141
+ }
142
+ /** Where a top-bar icon goes — exactly one of:
143
+ * - `page`: a site page id (any placement, `overflow` included) — opens that page;
144
+ * - `screen`: a native screen — a {@link SiteNativePage.screenId} or a built-in native screen
145
+ * ({@link SITE_BUILTIN_NATIVE_SCREENS});
146
+ * - `url`: an https page OFF the site, opened in the browser after the same "Open in browser?"
147
+ * prompt an off-site link in a site page shows. An on-site URL is refused: declare the page
148
+ * (an `overflow` page if it should have no row) and target it with `page`. */
149
+ export type SiteTopBarTarget = {
150
+ page: string;
151
+ } | {
152
+ screen: string;
153
+ } | {
154
+ url: string;
155
+ };
156
+ /** One trailing top-bar icon. */
157
+ export interface SiteTopBarAction {
158
+ /** Stable id, `[a-z0-9_]+`, unique in the bar — the served action id (telemetry, test id
159
+ * `topbar.action.<id>`, badge key `topBarAction:<id>`). Left out of the bar of the page or screen it opens. */
160
+ id: string;
161
+ /** Design-system icon. Required: the bar draws icons only. */
162
+ icon: IconName;
163
+ /** The accessible name a screen reader speaks for the icon. Copy from the provisioning file. */
164
+ label: string;
165
+ target: SiteTopBarTarget;
166
+ }
167
+ /** One of the author's own native (Tier-5) screens, placed in the site shell's chrome. The contract
168
+ * only PLACES it: the descriptor and its worker come from the content package (`dev/index.ts`). */
169
+ export interface SiteNativePage {
170
+ /** Row id — the tab id, `drawer_<id>` in the drawer. `[a-z0-9_]+`; never a site page's id. */
171
+ id: string;
172
+ /** The content package's screen id. Never `site_*` (the site pages' id space). */
173
+ screenId: string;
174
+ /** Native label (tab / drawer row / rail). */
175
+ title: string;
176
+ /** Absent ⇒ `"grid"`. */
177
+ icon?: IconName;
178
+ /** Absent ⇒ `"tab"`. `overflow`: no row, but linkable (`<scheme>://screen/<screenId>`) and a
179
+ * top-bar target. */
180
+ placement?: SitePagePlacement;
181
+ /** Whether `<scheme>://screen/<screenId>` may open it from OUTSIDE the app (a website link, another
182
+ * app). Absent ⇒ `true` only for a built-in public screen ({@link SITE_BUILTIN_NATIVE_SCREENS}), else
183
+ * `false`: placing a screen never makes it public unless the contract says so. */
184
+ public?: boolean;
185
+ /** An external link while signed out signs the user in first (`requiresAuth`). Implies `public`. Needs a
186
+ * sign-in that gates deep links — today a Wix member binding only: any other shell refuses it
187
+ * ({@link assertSiteNativePagesAuth}), because the link would open the screen signed out. */
188
+ requiresAuth?: boolean;
189
+ /** The site page (or earlier native page) this one follows in the tab bar, drawer and rail.
190
+ * Absent ⇒ after every site page. A native page is never first. Under `menuSource: "runtime"` the
191
+ * device's menu merge regroups the site's rows into one block, so a native page may then sit before
192
+ * or after all of them rather than between two. */
193
+ after?: string;
105
194
  }
106
195
  /** Members Area pages, by what a notification is about. */
107
196
  export interface SiteMemberPages {
@@ -168,6 +257,10 @@ export declare function resolveSiteChrome(chrome: SiteChrome | undefined, kind?:
168
257
  * through a prompt, and in-site history gets a floating back button.
169
258
  */
170
259
  export declare function siteWebViewPreset(site: Pick<SiteShellConfig, "origin" | "kind" | "chrome" | "sessionBridge">): WebViewConfig;
260
+ /** Whether a site page's screen draws its title in the top bar: the page's `showTitle`, else the site's
261
+ * {@link SitePageTitle} rule. `page` absent is the {@link SITE_PAGE_SCREEN_ID} screen, which a link
262
+ * opens and no nav row names. */
263
+ export declare function sitePageShowsTitle(site: Pick<SiteShellConfig, "pageTitle" | "menuSource">, page?: Pick<SitePage, "placement" | "showTitle">): boolean;
171
264
  /** The Tier-3 descriptor for one site page. */
172
265
  export declare function defineSiteTab(site: SiteShellConfig, page: SitePage): ScreenDescriptor;
173
266
  /** The {@link SITE_PAGE_SCREEN_ID} descriptor. Its `url` is the site's home page — what it
@@ -278,8 +371,9 @@ export declare function siteScreens(site: SiteShellConfig, opts?: SiteScreensOpt
278
371
  * `defineApp({ navigation: { site } })`; every platform resolves links against it. */
279
372
  export declare function siteNavConfig(site: SiteShellConfig): SiteNavConfig;
280
373
  /** `navigation.linkableScreens` for a site shell: every page (tab pages carry their `tabId`, so
281
- * a link selects the tab) plus the fallback screen, which lands on the Home tab. */
282
- export declare function siteLinkableScreens(site: SiteShellConfig): LinkableScreen[];
374
+ * a link selects the tab), every native page (so a website link to `<scheme>://screen/<screenId>`
375
+ * opens it — its tab when it has one), plus the fallback screen, which lands on the Home tab. */
376
+ export declare function siteLinkableScreens(site: SiteShellConfig, opts?: SiteShellCheckOptions): LinkableScreen[];
283
377
  /** Where an incoming site link goes. `url` is the link itself, normalized — the page the
284
378
  * screen's WebView loads. */
285
379
  export interface SiteLinkTarget {
@@ -306,13 +400,66 @@ export declare function siteNavKind(site: SiteShellConfig): "responsive" | "sing
306
400
  /** Sidebar-rail items for a site: EVERY page the drawer lists, under its tab id. The native rail
307
401
  * otherwise derives from the (at most four) tabs and suppresses the drawer, so a `drawer`
308
402
  * page would be unreachable on a tablet and under `layout: "sidebar"`. */
309
- export declare function siteSidebar(site: SiteShellConfig): NavTabItem[];
310
- /** Tab-bar and drawer items for a site. Pages beyond {@link SITE_SHELL_MAX_TABS} that
311
- * asked for a tab fall into the drawer rather than disappearing. */
403
+ export declare function siteSidebar(site: SiteShellConfig, opts?: SiteShellCheckOptions): NavTabItem[];
404
+ /** Tab-bar and drawer items for a site — its pages and native pages, in chrome order. Pages beyond
405
+ * {@link SITE_SHELL_MAX_TABS} (site and native counted together) that asked for a tab fall into the
406
+ * drawer rather than disappearing. */
312
407
  export declare function siteNav(site: SiteShellConfig, opts?: SiteShellCheckOptions): {
313
408
  tabs: NavTabItem[];
314
409
  drawer: DrawerItem[];
315
410
  };
411
+ /**
412
+ * Throws unless every `site.nativePages` screen is one the content package builds. The contract only
413
+ * PLACES a native page — its descriptor and worker are the author's — so the check runs where the
414
+ * screens are known: a site shell's dev module (`dev/index.ts`) calls it with the ids of its screen
415
+ * builders, which `himi build`, `validate`, `render`, `push` and the dev-server all load. The shared
416
+ * contract parser and the dist projection cannot see the content and do not check it.
417
+ */
418
+ export declare function assertSiteNativePagesBuilt(site: Pick<SiteShellConfig, "nativePages">, screenIds: Iterable<string>): void;
419
+ /**
420
+ * Throws when a native page asks for `requiresAuth` but the shell's sign-in does not feed the native
421
+ * session gate a `requiresAuth` link waits on. Fails closed: with nothing to wait for, the native link
422
+ * gate applies the link at once, so the screen would open signed out. Today only a Wix member binding
423
+ * (the app's `WixConsumerAuthProvider`) feeds that gate; a Base44 sign-in runs on the Account screen's
424
+ * worker, not the app's auth provider. The shell's contract parser calls it, since only the shell knows
425
+ * its binding.
426
+ */
427
+ export declare function assertSiteNativePagesAuth(site: Pick<SiteShellConfig, "nativePages">, gatedSignIn: boolean): void;
428
+ /**
429
+ * The top bar a native screen needs when a site top-bar icon opens THAT screen: the app-wide icons minus
430
+ * every one whose `{ screen }` target is `screenId`. On the screen itself such an icon would push a
431
+ * second copy of it (or re-select the tab it is on), the same reason a site page's own bar leaves out
432
+ * the icon that opens it. Undefined when no icon targets `screenId`, so the app default still fills the
433
+ * bar. An empty `{}` when that icon was the only one: a screen's bar replaces `topBarDefault`, so the
434
+ * empty bar is what keeps the default's icon off this screen.
435
+ */
436
+ export declare function siteNativeScreenTopBar(site: SiteShellConfig, screenId: string, opts?: SiteTopBarOptions): TopBarConfig | undefined;
437
+ /**
438
+ * A native screen's descriptor with {@link siteNativeScreenTopBar} applied: unchanged when the screen
439
+ * draws a top bar of its own (the author's bar wins) or no icon targets it. A site shell's dev module
440
+ * maps every non-site screen it builds through this.
441
+ */
442
+ export declare function withSiteNativeScreenTopBar<T>(site: SiteShellConfig, descriptor: T, opts?: SiteTopBarOptions): T;
443
+ /**
444
+ * A screen builder wrapped with {@link withSiteNativeScreenTopBar}, for a builder that returns its
445
+ * descriptor directly OR as a promise (a dev module allows both): the result is awaited first, so the rule
446
+ * sees the descriptor, never the promise. `null` stays `null`. A sync builder stays sync.
447
+ */
448
+ export declare function withSiteNativeScreenTopBarBuilder<C, D>(site: SiteShellConfig, build: (ctx: C) => D | null | Promise<D | null>, opts?: SiteTopBarOptions): (ctx: C) => D | null | Promise<D | null>;
449
+ /** Options for {@link siteTopBarDefault}. */
450
+ export interface SiteTopBarOptions extends SiteShellCheckOptions {
451
+ /** The built-in native screens THIS shell serves (Notifications always; Account only with a member
452
+ * binding). A `{ screen }` target must name a native page or one of these. Absent ⇒ any of
453
+ * {@link SITE_BUILTIN_NATIVE_SCREENS}. */
454
+ nativeScreens?: readonly string[];
455
+ }
456
+ /**
457
+ * `navigation.topBarDefault` for a site shell: `site.topBar.actions` as trailing icons on every screen
458
+ * that has no top bar of its own (the server fills it in — `applyTopBarDefault`). Each target maps to
459
+ * an existing Action: a page or native screen that is a tab switches to it, any other opens it, and a
460
+ * `url` asks "Open in browser?" first. Undefined when the site declares no actions.
461
+ */
462
+ export declare function siteTopBarDefault(site: SiteShellConfig, opts?: SiteTopBarOptions): TopBarConfig | undefined;
316
463
  /** Options for {@link assertSiteShellConfig} (and the builders that run it). */
317
464
  export interface SiteShellCheckOptions {
318
465
  /** Absent or `true` ⇒ at least one page must have `placement: "tab"`, as a site shell needs. A
@@ -154,6 +154,9 @@ export declare const screenDescriptorSchema: {
154
154
  readonly tabBarVisibility: {
155
155
  readonly type: "string";
156
156
  };
157
+ readonly stickyFooterPlacement: {
158
+ readonly type: "string";
159
+ };
157
160
  readonly logicBundle: {
158
161
  readonly type: "object";
159
162
  readonly additionalProperties: false;
@@ -1,7 +1,7 @@
1
1
  import type { AuthProvider } from "@wix/himalaya/core";
2
2
  import type { SocialAuthProvider } from "./native-engine.js";
3
3
  export { authorizeParams, authorizeUrl, dualDomainAuthorizeUrls, SESSION_BOUND_ACCESS_SCOPE, WIX_SESSION3_SOFT_INIT_SPEC, OAUTH_AUTHORIZE_ENDPOINT, type WixOAuthDomain, type AuthorizeParamsInput, } from "./oauth-params.js";
4
- export { WixNativeAuthEngine, NativeAuthError, type WixAccountSession, type RegistrationRequest, type SocialAuthProvider, type WixNativeAuthEngineConfig, } from "./native-engine.js";
4
+ export { WixNativeAuthEngine, NativeAuthError, VOICE_CALL_METHOD, twoFactorGateMethods, twoFactorResendForm, twoFactorWireMethod, shapeTwoFactorChallenge, legacyTwoFactorFailure, type TwoFactorChallenge, type WixAccountSession, type RegistrationRequest, type SocialAuthProvider, type WixNativeAuthEngineConfig, } from "./native-engine.js";
5
5
  export { SignedInstanceResolver, SignedInstanceError, InMemorySignedInstanceStorage, type SignedInstanceType, type SignedInstanceServiceResponse, type SignedInstanceRecord, type SignedInstanceFetcher, type SignedInstanceStorage, } from "./signed-instance-resolver.js";
6
6
  export { REDACTED, WIX_SENSITIVE_KEYS, isSensitiveKey, normalizeKey, redactHeaders as redactWixHeaders, redactCookieString, redactJson, redactBody, } from "./redaction.js";
7
7
  export { SessionIDService, InMemorySessionIDStore, bsiShouldRotate, localDayIndex, BSI_ROTATE_INTERVAL_MS, type SessionIDRecord, type SessionIDStore, } from "./session-id.js";
@@ -18,7 +18,15 @@ export interface WixAccountSession {
18
18
  refreshToken: string;
19
19
  signedInstance?: string;
20
20
  }
21
- export type NativeAuthErrorKind = "unsupported" | "invalidCredentials" | "needsTwoFactor" | "recaptchaRequired" | "emailInUse" | "network" | "cancelled" | "unknown";
21
+ export type NativeAuthErrorKind = "unsupported" | "invalidCredentials" | "needsTwoFactor" | "recaptchaRequired" | "emailInUse" | "network" | "cancelled"
22
+ /** Legacy 2FA 8004 — too many codes requested. */
23
+ | "rateLimited"
24
+ /** Legacy 2FA 8034 — the server could not send the code. */
25
+ | "deliveryFailed"
26
+ /** Legacy 2FA 8056 — SMS codes are not offered in the owner's region. */
27
+ | "smsRegionUnsupported"
28
+ /** Legacy 2FA 8002 — the pending verification expired; sign in again. */
29
+ | "verificationExpired" | "unknown";
22
30
  /** Error carrying a stable `kind` so UI maps it the same way on every platform.
23
31
  * `needsTwoFactor` is a control-flow signal (advance to the code screen). */
24
32
  export declare class NativeAuthError extends Error {
@@ -30,12 +38,16 @@ export declare class NativeAuthError extends Error {
30
38
  /** #4309 — the push challenge's id (digits), when the payload carried one: what
31
39
  * `WixAuthModalities.pollPushApproval` polls. */
32
40
  readonly verificationId?: string;
41
+ /** Where the code went (a masked phone or email), when the server named one. */
42
+ readonly twoFAHint?: string;
33
43
  constructor(kind: NativeAuthErrorKind, message: string, twoFAToken?: string, twoFAMethod?: string,
34
44
  /** Every enabled 2FA method (drives the picker when >1). */
35
45
  twoFAMethods?: string[],
36
46
  /** #4309 — the push challenge's id (digits), when the payload carried one: what
37
47
  * `WixAuthModalities.pollPushApproval` polls. */
38
- verificationId?: string);
48
+ verificationId?: string,
49
+ /** Where the code went (a masked phone or email), when the server named one. */
50
+ twoFAHint?: string);
39
51
  }
40
52
  export interface WixNativeAuthEngineConfig {
41
53
  baseURL?: string;
@@ -50,6 +62,33 @@ export interface WixNativeAuthEngineConfig {
50
62
  /** Injectable fetch for tests / non-browser hosts. Defaults to global fetch. */
51
63
  fetchImpl?: typeof fetch;
52
64
  }
65
+ /** The gate's id for "call me with the code". */
66
+ export declare const VOICE_CALL_METHOD = "VoiceCall";
67
+ /** A pending second factor as the gate shows it. */
68
+ export interface TwoFactorChallenge {
69
+ token: string;
70
+ method: string;
71
+ methods: string[];
72
+ hint?: string;
73
+ /** Email was challenged without being listed: re-send it without naming a method. */
74
+ emailUnlisted: boolean;
75
+ /** A push challenge's id (digits) — what `WixAuthModalities.pollPushApproval` polls. */
76
+ verificationId?: string;
77
+ }
78
+ /** The `twoFAMethod` a gate method is sent as: a call is the Phone factor. */
79
+ export declare const twoFactorWireMethod: (m: string) => string;
80
+ /** Every enabled method, plus the current one when the server challenged it without listing it
81
+ * (Email on a new-device login, or a fallback from Phone), plus `VoiceCall` after a phone method. */
82
+ export declare function twoFactorGateMethods(current: string, enabled: string[]): string[];
83
+ /** Shape a challenge payload. `requested` is the gate method that caused it (a call stays
84
+ * `VoiceCall` though the server answers `Phone`); a payload with no method list keeps `previous`'s. */
85
+ export declare function shapeTwoFactorChallenge(payload: Record<string, unknown>, requested: string, previous?: TwoFactorChallenge): TwoFactorChallenge;
86
+ /** The form `resend2facode` gets. An Email code challenged without Email listed is re-sent by the
87
+ * token's own method: the server reads a named `twoFAMethod` as a switch and refuses it. */
88
+ export declare function twoFactorResendForm(token: string, method: string, challenge?: TwoFactorChallenge): Record<string, string>;
89
+ /** What a legacy 2FA error code means, for the codes that are not a wrong code (8001/8005/8006/8008
90
+ * stay `invalidCredentials`). Undefined for any other code. */
91
+ export declare function legacyTwoFactorFailure(errorCode: unknown): NativeAuthError | undefined;
53
92
  export declare class WixNativeAuthEngine {
54
93
  private readonly baseURL;
55
94
  private readonly devMode;
@@ -63,7 +102,14 @@ export declare class WixNativeAuthEngine {
63
102
  signIn(email: string, password: string): Promise<WixAccountSession>;
64
103
  register(req: RegistrationRequest): Promise<WixAccountSession>;
65
104
  submitTwoFactor(token: string, code: string, method: string): Promise<WixAccountSession>;
66
- resendTwoFactor(token: string): Promise<void>;
105
+ private readonly challenges;
106
+ /** The challenge `token` stands for, as the gate shows it. */
107
+ twoFactorChallenge(token: string): TwoFactorChallenge | undefined;
108
+ /** Re-sends the 2FA code via `method` (default: the challenge's current one) — the same call
109
+ * switches to another method; `VoiceCall` asks for the Phone code by a call. Resolves to the
110
+ * new challenge (every send issues a new token), or undefined when the server named none.
111
+ * Rejects when the server refused to send: a failed resend must not read as "a new code was sent". */
112
+ resendTwoFactor(token: string, method?: string): Promise<TwoFactorChallenge | undefined>;
67
113
  sendPasswordReset(email: string): Promise<void>;
68
114
  socialExchange(provider: SocialAuthProvider, credential: Record<string, string>): Promise<WixAccountSession>;
69
115
  /** Owner / Wix-account login (one-app endpoint) — real, no captcha for non-PX
@@ -11,7 +11,6 @@ declare const _default: {
11
11
  readonly "auth.gate.forgotPassword": "Forgot password?";
12
12
  readonly "auth.gate.backToSignIn": "Back to sign in";
13
13
  readonly "auth.gate.continueWith": "Continue with {provider}";
14
- readonly "auth.gate.sendCodeVia": "Send code via";
15
14
  readonly "auth.gate.resendCode": "Didn't get it? Resend code";
16
15
  readonly "auth.gate.field.code": "Verification code";
17
16
  readonly "auth.gate.pushWaiting": "Approve the sign-in on your other device.";
@@ -23,6 +22,19 @@ declare const _default: {
23
22
  readonly "auth.gate.password.hide": "Hide password";
24
23
  readonly "auth.gate.notice.codeResent": "A new code was sent.";
25
24
  readonly "auth.gate.notice.codeSentVia": "Code sent via {method}.";
25
+ readonly "auth.gate.tryAnotherWay": "Try another way";
26
+ readonly "auth.gate.chooseAnotherWay": "Choose another way to verify";
27
+ readonly "auth.gate.method.sms": "SMS";
28
+ readonly "auth.gate.method.voice": "Phone call";
29
+ readonly "auth.gate.method.totp": "Authenticator app";
30
+ readonly "auth.gate.method.push": "Approve on another device";
31
+ readonly "auth.gate.codePrompt.sms": "We sent a code by SMS to {destination}.";
32
+ readonly "auth.gate.codePrompt.smsNoHint": "We sent a code to your phone by SMS.";
33
+ readonly "auth.gate.codePrompt.voice": "We're calling {destination} to read you a code.";
34
+ readonly "auth.gate.codePrompt.voiceNoHint": "We're calling your phone to read you a code.";
35
+ readonly "auth.gate.codePrompt.email": "We sent a code to {destination}.";
36
+ readonly "auth.gate.codePrompt.emailNoHint": "We sent a code to your email.";
37
+ readonly "auth.gate.codePrompt.totp": "Enter the code from your authenticator app.";
26
38
  readonly "auth.gate.notice.resetSent": "If that email is registered, a reset link is on its way.";
27
39
  readonly "auth.biometric.unlockWith": "Unlock with {method}";
28
40
  readonly "auth.biometric.orPassword": "or sign in with your password";
@@ -94,6 +106,9 @@ declare const _default: {
94
106
  readonly "auth.feedback.totp": "That code did not work. Enter the current code from your authenticator app.";
95
107
  readonly "auth.feedback.network": "We could not connect. Check your connection and try again.";
96
108
  readonly "auth.feedback.rate_limited": "Too many attempts. Wait a few minutes and try again.";
109
+ readonly "auth.feedback.delivery_failed": "We couldn't send the code. Try again, or try another way.";
110
+ readonly "auth.feedback.sms_region_unsupported": "SMS codes aren't available in your region. Try another way.";
111
+ readonly "auth.feedback.verification_expired": "This verification has expired. Go back and sign in again.";
97
112
  readonly "auth.feedback.unavailable": "This action is not available here. Use a supported sign-in method or open the app.";
98
113
  readonly "auth.feedback.cancelled": "Sign-in was cancelled. Try again when you are ready.";
99
114
  readonly "auth.feedback.verification_required": "Complete verification to continue, then try again.";
@@ -1,4 +1,4 @@
1
- export type AuthFailureCode = "invalid_input" | "invalid_credentials" | "registration_failed" | "invalid_code" | "expired_code" | "network" | "rate_limited" | "unavailable" | "cancelled" | "verification_required" | "unknown";
1
+ export type AuthFailureCode = "invalid_input" | "invalid_credentials" | "registration_failed" | "invalid_code" | "expired_code" | "network" | "rate_limited" | "unavailable" | "cancelled" | "verification_required" | "delivery_failed" | "sms_region_unsupported" | "verification_expired" | "unknown";
2
2
  export type AuthOperation = "signIn" | "register" | "reset" | "verify";
3
3
  export declare function authMessage(key: string, translate?: (key: string) => string | undefined): string;
4
4
  /** Only structured failure identities cross into UI copy. Never echo server/error text. */
@@ -4,6 +4,8 @@ export * from "./one-app-page.js";
4
4
  export * from "./one-app-visibility.js";
5
5
  export * from "./one-app-section.js";
6
6
  export * from "./invite.js";
7
+ export * from "./podcast.js";
8
+ export * from "./podcast-service.js";
7
9
  import { entitlement } from "@wix/himalaya/checkout";
8
10
  type Node = Record<string, any>;
9
11
  /** An action shown by `detailedHeader`. */
@@ -0,0 +1,105 @@
1
+ import { defineService as defineStateService } from "@wix/himalaya/state";
2
+ import { type MediaPlaybackStatus } from "@wix/himalaya/media-playback";
3
+ import { type PodcastFeedErrorCode } from "./podcast.js";
4
+ /** A small per-user store for the queue and resume positions. The default keeps them for this session only. */
5
+ export interface PodcastPreference<T> {
6
+ read(): T;
7
+ write(value: T): void;
8
+ }
9
+ /** Why playback stopped. Never a feed error, and never a raw player message. */
10
+ export type PodcastPlaybackErrorCode = "no_audio" | "media_failed";
11
+ /** Customer-facing copy the worker computes. Literals; keep developer setup out of them. */
12
+ export interface PodcastMessages {
13
+ notConfigured: string;
14
+ empty: string;
15
+ noPlayable: string;
16
+ feedUnavailable: string;
17
+ invalidFeed: string;
18
+ noAudio: string;
19
+ mediaFailed: string;
20
+ queueEmpty: string;
21
+ play: string;
22
+ pause: string;
23
+ queueOne: string;
24
+ queueMany: string;
25
+ resume: string;
26
+ }
27
+ export interface PodcastServiceOptions {
28
+ /** Service name. Must match `podcastScreen({ service })`. Default "podcast". */
29
+ service?: string;
30
+ /** Episodes to read from the feed (1–100). Default 40. */
31
+ limit?: number;
32
+ /** Override only to decorate the service (Branded Lite's collection chrome). */
33
+ defineService?: typeof defineStateService;
34
+ queue?: PodcastPreference<string[]>;
35
+ progress?: PodcastPreference<Record<string, number>>;
36
+ messages?: Partial<PodcastMessages>;
37
+ /** Resolve worker copy at action time (for hosts that receive a copy pack on load). */
38
+ text?: (key: keyof PodcastMessages, fallback: string) => string;
39
+ /** Excerpt → display text, for a host with its own rich-text normalizer. */
40
+ describe?: (excerpt: unknown) => string;
41
+ }
42
+ interface Row {
43
+ id: string;
44
+ title: string;
45
+ subtitle: string;
46
+ image: string;
47
+ description: string;
48
+ audioUrl: string;
49
+ durationMs: number;
50
+ progressLabel: string;
51
+ }
52
+ export interface PodcastState {
53
+ status: "loading" | "ready" | "error";
54
+ feedState: "unconfigured" | "loading" | "ready" | "empty" | "error";
55
+ feedError: "" | PodcastFeedErrorCode;
56
+ emptyText: string;
57
+ hideFeedRetry: boolean;
58
+ episodes: Row[];
59
+ unplayableCount: number;
60
+ isMock: boolean;
61
+ notMock: boolean;
62
+ mockBanner: string;
63
+ queue: string[];
64
+ queueLabel: string;
65
+ nowId: string;
66
+ nowTitle: string;
67
+ nowSubtitle: string;
68
+ playbackState: string;
69
+ isPlaying: boolean;
70
+ isBuffering: boolean;
71
+ playLabel: string;
72
+ playIcon: string;
73
+ positionMs: number;
74
+ durationMs: number;
75
+ progress: number;
76
+ progressLabel: string;
77
+ hidePlayer: boolean;
78
+ playbackError: "" | PodcastPlaybackErrorCode;
79
+ playbackErrorText: string;
80
+ hidePlaybackError: boolean;
81
+ hidePlaybackRetry: boolean;
82
+ }
83
+ /**
84
+ * The worker half of `podcastScreen`: reads a public feed through the Wix Podcasts gateway and
85
+ * plays episodes in the app with `media_playback` (play/pause, seek, previous/next, queue, live
86
+ * position and errors from the real player). Declare `wix_api` and `media_playback` on the screen
87
+ * and in config.ts `capabilities`. There is no browser fallback and no simulated progress: an
88
+ * install without the media module cannot play; `himi validate` identifies the native rebuild.
89
+ */
90
+ export declare function createPodcastService(opts?: PodcastServiceOptions): import("@wix/himalaya/state", { with: { "resolution-mode": "import" } }).ServiceHandle<PodcastState> & {
91
+ load: (arg?: unknown) => Promise<PodcastState>;
92
+ refresh: () => Promise<PodcastState>;
93
+ retryFeed: () => Promise<PodcastState>;
94
+ playEpisode: (arg?: unknown) => Promise<PodcastState>;
95
+ queueEpisode: (arg?: unknown) => Promise<PodcastState>;
96
+ togglePlay: () => Promise<PodcastState>;
97
+ seek: (arg?: unknown) => Promise<PodcastState>;
98
+ seekBy: (arg?: unknown) => Promise<PodcastState>;
99
+ previousEpisode: () => Promise<PodcastState>;
100
+ nextEpisode: () => Promise<PodcastState>;
101
+ retryPlayback: () => Promise<PodcastState>;
102
+ playbackFailed: (code?: PodcastPlaybackErrorCode) => Promise<PodcastState>;
103
+ mediaStatus: (arg?: Partial<MediaPlaybackStatus>) => Promise<PodcastState>;
104
+ };
105
+ export {};
@@ -0,0 +1,116 @@
1
+ /** The public Wix Podcasts feed gateway. POST only; it takes no member or visitor credential. */
2
+ export declare const PODCAST_FEED_ENDPOINT = "https://podcasts.wix.com/api/feed/graphql";
3
+ export declare const PODCAST_EPISODES_QUERY = "\n query PodcastEpisodes($url: String!, $limit: Int) {\n episodes(url: $url, limit: $limit) {\n id title date duration image descriptionExcerpt(length: 220) playback { url type length }\n }\n }\n";
4
+ /** Why a feed shows no episodes. `feed_not_configured` and `feed_empty` are not failures. */
5
+ export type PodcastFeedErrorCode = "invalid_feed_url" | "feed_unavailable" | "feed_malformed" | "transport_unavailable";
6
+ /** One feed row as the gateway returns it. */
7
+ export interface PodcastFeedEpisode {
8
+ id?: string;
9
+ title?: string;
10
+ date?: string;
11
+ duration?: string;
12
+ image?: string;
13
+ descriptionExcerpt?: string;
14
+ playback?: {
15
+ url?: string;
16
+ type?: string;
17
+ length?: number;
18
+ } | null;
19
+ }
20
+ /** A playable episode. `audioUrl` is always the episode's own enclosure, never the feed URL. */
21
+ export interface PodcastEpisode {
22
+ id: string;
23
+ title: string;
24
+ date: string;
25
+ durationMs: number;
26
+ image: string;
27
+ description: string;
28
+ audioUrl: string;
29
+ mimeType: string;
30
+ }
31
+ export type PodcastFeedResult = {
32
+ ok: true;
33
+ episodes: PodcastEpisode[];
34
+ unplayable: number;
35
+ } | {
36
+ ok: false;
37
+ code: PodcastFeedErrorCode;
38
+ };
39
+ /** Check syntax and literal hosts, not DNS or redirect safety (the gateway owns those). */
40
+ export declare function podcastFeedUrl(raw: unknown): {
41
+ ok: true;
42
+ url: string;
43
+ } | {
44
+ ok: false;
45
+ code: "feed_not_configured" | "invalid_feed_url";
46
+ };
47
+ /** An episode's HTTPS enclosure. Public HTTP audio is blocked by native ATS/network policy. */
48
+ export declare function podcastAudioUrl(raw: unknown): string;
49
+ /** The gateway request body for one feed. */
50
+ export declare function podcastFeedRequest(feedUrl: string, limit?: number): {
51
+ query: string;
52
+ variables: {
53
+ url: string;
54
+ limit: number;
55
+ };
56
+ };
57
+ /** "1200", "20:00" or "1:02:03" → milliseconds. Anything else is unknown (0). */
58
+ export declare function podcastDurationMs(value: unknown): number;
59
+ /** Map the gateway's answer. Episodes without a usable enclosure are counted, never given another URL.
60
+ * `describe` turns the excerpt into display text (default: HTML stripped to plain text). */
61
+ export declare function mapPodcastFeed(response: unknown, describe?: (excerpt: unknown) => string): PodcastFeedResult;
62
+ type Node = {
63
+ id: string;
64
+ body: {
65
+ package: string;
66
+ type: string;
67
+ props: Record<string, unknown>;
68
+ };
69
+ modifiers?: Record<string, unknown>;
70
+ };
71
+ /** Fixed screen copy. Configure dynamic Play/Pause labels through `createPodcastService({ messages })`. */
72
+ export interface PodcastCopy {
73
+ title: string;
74
+ queue: string;
75
+ retry: string;
76
+ previous: string;
77
+ next: string;
78
+ back: string;
79
+ forward: string;
80
+ seek: string;
81
+ }
82
+ export interface PodcastScreenOptions {
83
+ /** Where the built worker bundle is served from. */
84
+ bundleUrl: string;
85
+ /** The creator's public RSS feed. Keep it a runtime setting (`process.env.…`), not a publisher default. */
86
+ feedUrl: string;
87
+ screenId?: string;
88
+ /** Must match `createPodcastService({ service })`. */
89
+ service?: string;
90
+ copy?: Partial<PodcastCopy>;
91
+ }
92
+ export interface PodcastScreenEnvelope {
93
+ screenId: string;
94
+ renderer: string;
95
+ title: string;
96
+ schemaVersion: number;
97
+ cacheControl: {
98
+ maxAge: number;
99
+ staleWhileRevalidate: number;
100
+ };
101
+ logicBundle: {
102
+ url: string;
103
+ integrity: string;
104
+ declaredCapabilities: string[];
105
+ };
106
+ payload: Node;
107
+ stickyFooter: Node;
108
+ }
109
+ /** The capabilities a podcast screen declares. config.ts `capabilities` must list both too:
110
+ * `media_playback` is native, so an app that adds it needs a new binary (`himi dist`). */
111
+ export declare const PODCAST_SCREEN_CAPABILITIES: readonly ["wix_api", "media_playback"];
112
+ /** Normalize a build-time feed setting before it enters a public descriptor. Never echoes credentials. */
113
+ export declare function podcastFeedSetting(raw: unknown): string;
114
+ /** Episode list + a pinned player. All state and every action come from `createPodcastService`. */
115
+ export declare function podcastScreen(opts: PodcastScreenOptions): PodcastScreenEnvelope;
116
+ export {};