@wix/himalaya-cli 0.1810.0 → 0.1812.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.
@@ -22,9 +22,21 @@ export interface ListOptions {
22
22
  skip?: number;
23
23
  fields?: string[];
24
24
  }
25
+ /** The Wix member a signed-in Base44 user maps to (native hosts only). Ids, never tokens. */
26
+ export interface WixMember {
27
+ memberId: string;
28
+ siteId: string;
29
+ }
25
30
  export interface AuthStatus {
26
31
  signedIn: boolean;
27
32
  user: Base44User | null;
33
+ /**
34
+ * The Wix member session native minted for this user (the Branded44 shell's
35
+ * `wix-member-session` exchange), or null: signed out, the web host (which has no exchange),
36
+ * an app with no Wix member behind it, or the exchange has not succeeded. The Wix tokens stay
37
+ * native; push registration and the native Wix client use them.
38
+ */
39
+ wixMember: WixMember | null;
28
40
  }
29
41
  export interface LoginResult {
30
42
  user: Base44User;
@@ -56,6 +56,11 @@ function unwrap(reply) {
56
56
  return env.data ?? null;
57
57
  }
58
58
  var json = (value) => JSON.stringify(value ?? {});
59
+ function wixMember(raw) {
60
+ if (!raw || typeof raw !== "object") return null;
61
+ const { memberId, siteId } = raw;
62
+ return typeof memberId === "string" && memberId && typeof siteId === "string" && siteId ? { memberId, siteId } : null;
63
+ }
59
64
  function listParams(entity, opts) {
60
65
  if (!entity) throw new Error("@himalaya/base44: entity name is required");
61
66
  return { entity, opts: json(opts ?? {}) };
@@ -103,7 +108,7 @@ var auth = {
103
108
  /** Whether a user is signed in, and who. Never rejects for a signed-out user. */
104
109
  async status() {
105
110
  const s = unwrap(await dispatch2("capability.base44.authStatus"));
106
- return { signedIn: s?.signedIn === true, user: s?.user ?? null };
111
+ return { signedIn: s?.signedIn === true, user: s?.user ?? null, wixMember: wixMember(s?.wixMember) };
107
112
  },
108
113
  /** Drop the stored token. Later entity calls run anonymously (public data only). */
109
114
  async logout() {
@@ -2,7 +2,7 @@
2
2
  "files": [
3
3
  {
4
4
  "name": "sw.js",
5
- "bytes": 2610196
5
+ "bytes": 2611116
6
6
  },
7
7
  {
8
8
  "name": "host.html",
@@ -21,7 +21,7 @@
21
21
  "bytes": 24320
22
22
  },
23
23
  {
24
- "name": "preview-deferred/09e39aeb032cda05611bd7c888d3ae818f2fa89fc69705221b2dfcdf5ce5d704.bin",
24
+ "name": "preview-deferred/b01b55d664ce9b920b5074a3f660141e38190a446fb008677740736d22b5d759.bin",
25
25
  "bytes": 488215
26
26
  },
27
27
  {
@@ -79,10 +79,10 @@
79
79
  ],
80
80
  "deferred": [
81
81
  {
82
- "key": "assets/pdf-7xBOEFOJ.js",
82
+ "key": "assets/pdf-DTjvN06u.js",
83
83
  "contentType": "application/javascript; charset=utf-8",
84
- "sha256": "09e39aeb032cda05611bd7c888d3ae818f2fa89fc69705221b2dfcdf5ce5d704",
85
- "file": "preview-deferred/09e39aeb032cda05611bd7c888d3ae818f2fa89fc69705221b2dfcdf5ce5d704.bin"
84
+ "sha256": "b01b55d664ce9b920b5074a3f660141e38190a446fb008677740736d22b5d759",
85
+ "file": "preview-deferred/b01b55d664ce9b920b5074a3f660141e38190a446fb008677740736d22b5d759.bin"
86
86
  },
87
87
  {
88
88
  "key": "assets/pdf.worker.min-BGnVRhRG.js",