@wix/himalaya-cli 0.1565.0 → 0.1567.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 (29) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/app-info/src/index.d.ts +4 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-platform/src/business-address.d.ts +24 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-platform/src/index.d.ts +7 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/app-info.mjs +2 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +2 -1
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +2 -1
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-platform.mjs +17 -8
  8. package/dist/cli.mjs +232 -68
  9. package/dist/preview-assets.generated.bin +0 -0
  10. package/guides/himi-json-output.md +2 -0
  11. package/guides/iap-screen-adoption.md +6 -3
  12. package/guides/one-app-to-himi-app.md +40 -1
  13. package/guides/qa-builds.md +5 -1
  14. package/guides/sdk-reference.json +2 -2
  15. package/guides/wix-business-context.md +18 -0
  16. package/package.json +2 -2
  17. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +6 -3
  18. package/templates/branded-lite/dev/index.ts +3 -0
  19. package/templates/branded-lite/tier5-src/himi-branded-lite-notifications/index.ts +78 -14
  20. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +6 -3
  21. package/templates/community-club/tier5-src/himi-store-account/index.ts +6 -3
  22. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +6 -3
  23. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +6 -3
  24. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +6 -3
  25. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +6 -3
  26. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +6 -3
  27. package/templates/restaurant/tier5-src/himi-store-account/index.ts +6 -3
  28. package/templates/retail-store/tier5-src/himi-store-account/index.ts +6 -3
  29. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +6 -3
@@ -27,6 +27,10 @@ export interface AppInfo {
27
27
  * Wix serves saved payment methods (My Wallet). False on web, in a multi-app host (Himi
28
28
  * Player, Spaces) and on binaries older than HimalayaCore 1.4.0. */
29
29
  memberSiteBound: boolean;
30
+ /** Native transport supports the exact login-gated One App create-invite route.
31
+ * False on older binaries and web. Does not grant member access or guarantee
32
+ * the site's invitation permission; the server still authorizes each request. */
33
+ oneAppInviteAvailable?: boolean;
30
34
  }
31
35
  /**
32
36
  * Read this app's build + OTA metadata from the host.
@@ -0,0 +1,24 @@
1
+ export interface SiteAddress {
2
+ googleFormattedAddress?: string;
3
+ street?: string;
4
+ streetNumber?: string;
5
+ city?: string;
6
+ state?: string;
7
+ zip?: string;
8
+ country?: string;
9
+ isPhysical?: boolean;
10
+ coordinates?: {
11
+ latitude?: number;
12
+ longitude?: number;
13
+ };
14
+ }
15
+ /** Keep the public business address and its usable map point together. A virtual,
16
+ * incomplete or invalid point must never turn into a map at a guessed location. */
17
+ export declare function businessAddress(address?: SiteAddress): {
18
+ address: string;
19
+ isPhysical?: boolean;
20
+ coordinates?: {
21
+ latitude: number;
22
+ longitude: number;
23
+ };
24
+ };
@@ -149,6 +149,13 @@ export interface WixBusinessInfo {
149
149
  address: string;
150
150
  email: string;
151
151
  phone: string;
152
+ /** Explicit false means the business has no physical contact location. */
153
+ isPhysical?: boolean;
154
+ /** A complete, valid site-properties point, omitted for virtual addresses. */
155
+ coordinates?: {
156
+ latitude: number;
157
+ longitude: number;
158
+ };
152
159
  };
153
160
  }
154
161
  export declare const site: {
@@ -35,7 +35,8 @@ async function get() {
35
35
  environment: str(r?.environment) === "prod" ? "prod" : serveBaseUrl ? "prod" : "dev",
36
36
  serveBaseUrl: serveBaseUrl || null,
37
37
  platform: PLATFORMS.includes(platform) ? platform : "unknown",
38
- memberSiteBound: r?.memberSiteBound === true
38
+ memberSiteBound: r?.memberSiteBound === true,
39
+ oneAppInviteAvailable: r?.oneAppInviteAvailable === true
39
40
  };
40
41
  }
41
42
  async function displayVersion() {
@@ -35,7 +35,8 @@ async function get() {
35
35
  environment: str(r?.environment) === "prod" ? "prod" : serveBaseUrl ? "prod" : "dev",
36
36
  serveBaseUrl: serveBaseUrl || null,
37
37
  platform: PLATFORMS.includes(platform) ? platform : "unknown",
38
- memberSiteBound: r?.memberSiteBound === true
38
+ memberSiteBound: r?.memberSiteBound === true,
39
+ oneAppInviteAvailable: r?.oneAppInviteAvailable === true
39
40
  };
40
41
  }
41
42
 
@@ -588,7 +588,8 @@ async function get() {
588
588
  environment: str(r?.environment) === "prod" ? "prod" : serveBaseUrl ? "prod" : "dev",
589
589
  serveBaseUrl: serveBaseUrl || null,
590
590
  platform: PLATFORMS.includes(platform) ? platform : "unknown",
591
- memberSiteBound: r?.memberSiteBound === true
591
+ memberSiteBound: r?.memberSiteBound === true,
592
+ oneAppInviteAvailable: r?.oneAppInviteAvailable === true
592
593
  };
593
594
  }
594
595
 
@@ -1,3 +1,19 @@
1
+ // ../../core/sdk/wix-platform/src/business-address.ts
2
+ function businessAddress(address) {
3
+ const line = address?.googleFormattedAddress?.trim() || [
4
+ [address?.streetNumber, address?.street].filter(Boolean).join(" ").trim(),
5
+ [address?.city, [address?.state, address?.zip].filter(Boolean).join(" ").trim(), address?.country].filter(Boolean).join(", ")
6
+ ].filter(Boolean).join(", ").trim();
7
+ const latitude = address?.coordinates?.latitude;
8
+ const longitude = address?.coordinates?.longitude;
9
+ const validPoint = address?.isPhysical !== false && typeof latitude === "number" && Number.isFinite(latitude) && Math.abs(latitude) <= 90 && typeof longitude === "number" && Number.isFinite(longitude) && Math.abs(longitude) <= 180;
10
+ return {
11
+ address: line,
12
+ ...typeof address?.isPhysical === "boolean" ? { isPhysical: address.isPhysical } : {},
13
+ ...validPoint ? { coordinates: { latitude, longitude } } : {}
14
+ };
15
+ }
16
+
1
17
  // ../../core/sdk/dispatch/src/index.ts
2
18
  function dispatch(handlerId, params, _options) {
3
19
  const himalaya = globalThis.himalaya;
@@ -279,13 +295,6 @@ var auth = {
279
295
  return r?.signedInstance && r.signedInstance.length > 0 ? r.signedInstance : null;
280
296
  }
281
297
  };
282
- function formatSiteAddress(a) {
283
- if (!a) return "";
284
- if (a.googleFormattedAddress) return a.googleFormattedAddress.trim();
285
- const line1 = [a.streetNumber, a.street].filter(Boolean).join(" ").trim();
286
- const cityLine = [a.city, [a.state, a.zip].filter(Boolean).join(" ").trim(), a.country].filter(Boolean).join(", ");
287
- return [line1, cityLine].filter(Boolean).join(", ").trim();
288
- }
289
298
  function parseBusinessInfo(res) {
290
299
  const p = res?.properties ?? res ?? {};
291
300
  return {
@@ -301,7 +310,7 @@ function parseBusinessInfo(res) {
301
310
  timeZone: (p.timeZone ?? "").trim()
302
311
  },
303
312
  contact: {
304
- address: formatSiteAddress(p.address),
313
+ ...businessAddress(p.address),
305
314
  email: (p.email ?? "").trim(),
306
315
  phone: (p.phone ?? "").trim()
307
316
  }