@wix/himalaya-cli 0.1399.0 → 0.1401.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 (36) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +2 -1
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/webview-page/src/capabilities.generated.d.ts +2 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-chat/src/index.d.ts +33 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +8 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/auth-modalities.d.ts +13 -2
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/index.d.ts +11 -1
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/native-engine.d.ts +7 -1
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/auth/src/copy.generated.d.ts +5 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +66 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-media/src/index.d.ts +8 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +2 -1
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/auth.mjs +5 -0
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +2 -1
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +2 -1
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +2 -1
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +2 -1
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +2 -1
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +2 -1
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +5 -0
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +2 -1
  21. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +2 -1
  22. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth/worker.mjs +62 -12
  23. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth.mjs +69 -12
  24. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-chat.mjs +56 -0
  25. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +45 -1
  26. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-site-media.mjs +17 -0
  27. package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +4 -0
  28. package/dist/cli.mjs +58 -34
  29. package/dist/preview-assets.generated.bin +0 -0
  30. package/guides/app-config.md +1 -1
  31. package/guides/capabilities.md +5 -0
  32. package/guides/importable-sdks.md +1 -0
  33. package/guides/sdk-reference.json +163 -0
  34. package/guides/web-page-sdk-reference.md +1 -0
  35. package/guides/wix-login-integration.md +42 -0
  36. package/package.json +2 -2
@@ -4964,6 +4964,61 @@
4964
4964
  }
4965
4965
  ]
4966
4966
  },
4967
+ {
4968
+ "name": "@himalaya/wix-chat",
4969
+ "source": "core/sdk/wix-chat/src/index.ts",
4970
+ "description": "host-owned realtime Chat event subscriptions.",
4971
+ "api": [
4972
+ {
4973
+ "name": "RealtimeState",
4974
+ "kind": "type",
4975
+ "jsdoc": "",
4976
+ "decl": "export type RealtimeState = \"connected\" | \"connecting\" | \"reconnecting\" | \"disconnected\" | \"error\" | \"unavailable\";"
4977
+ },
4978
+ {
4979
+ "name": "RealtimeReason",
4980
+ "kind": "type",
4981
+ "jsdoc": "",
4982
+ "decl": "export type RealtimeReason =\n | \"chat_setup_scope_unavailable\"\n | \"runtime_unavailable\"\n | \"invalid_setup_response\"\n | \"firebase_auth_failed\"\n | \"firebase_connection_failed\"\n | \"invalid_event\"\n | \"event_overflow\";"
4983
+ },
4984
+ {
4985
+ "name": "RealtimeStatus",
4986
+ "kind": "interface",
4987
+ "jsdoc": "",
4988
+ "decl": "export interface RealtimeStatus {\n state: RealtimeState;\n reason?: RealtimeReason;\n}"
4989
+ },
4990
+ {
4991
+ "name": "RealtimeSubscription",
4992
+ "kind": "interface",
4993
+ "jsdoc": "",
4994
+ "decl": "export interface RealtimeSubscription extends RealtimeStatus {\n subscriptionId: string;\n}"
4995
+ },
4996
+ {
4997
+ "name": "RealtimeEventEnvelope",
4998
+ "kind": "interface",
4999
+ "jsdoc": "",
5000
+ "decl": "export interface RealtimeEventEnvelope {\n /** A normalized Wix Chat server event from Firebase. */\n event: Record<string, unknown>;\n /** Firebase server timestamp sampled when the subscription was established. */\n connectionEstablishedTimestamp: number;\n}"
5001
+ },
5002
+ {
5003
+ "name": "subscribeRealtime",
5004
+ "kind": "function",
5005
+ "jsdoc": "/** Subscribe this worker to Wix Chat realtime events. Reducers receive one\n * {@link RealtimeEventEnvelope}; status reducers receive {@link RealtimeStatus}.\n * A new subscription replaces the worker's prior subscription, and worker disposal\n * always closes the host stream. The returned identifier is opaque and worker-local. */",
5006
+ "decl": "export async function subscribeRealtime(opts: {\n onEvent: string;\n onStatus?: string;\n}): Promise<RealtimeSubscription>;"
5007
+ },
5008
+ {
5009
+ "name": "unsubscribeRealtime",
5010
+ "kind": "function",
5011
+ "jsdoc": "/** Stop this worker's subscription. Returns `ok: false` for an unknown or stale ID. */",
5012
+ "decl": "export async function unsubscribeRealtime(opts: { subscriptionId: string }): Promise<{ ok: boolean }>;"
5013
+ },
5014
+ {
5015
+ "name": "getRealtimeStatus",
5016
+ "kind": "function",
5017
+ "jsdoc": "/** Read the latest host connection status for a worker-local subscription ID. */",
5018
+ "decl": "export async function getRealtimeStatus(opts: { subscriptionId: string }): Promise<RealtimeStatus>;"
5019
+ }
5020
+ ]
5021
+ },
4967
5022
  {
4968
5023
  "name": "@himalaya/wix-llm",
4969
5024
  "source": "core/sdk/wix-llm/src/index.ts",
@@ -21995,6 +22050,42 @@
21995
22050
  "jsdoc": "",
21996
22051
  "decl": "export interface WixGetMemberResponse {\n member: WixMember;\n}"
21997
22052
  },
22053
+ {
22054
+ "name": "WixGetMyMemberResponse",
22055
+ "kind": "interface",
22056
+ "jsdoc": "",
22057
+ "decl": "export interface WixGetMyMemberResponse {\n member: WixMember;\n}"
22058
+ },
22059
+ {
22060
+ "name": "WixUpdateMemberRequest",
22061
+ "kind": "interface",
22062
+ "jsdoc": "",
22063
+ "decl": "export interface WixUpdateMemberRequest {\n member: Partial<WixMember>;\n}"
22064
+ },
22065
+ {
22066
+ "name": "WixUpdateMemberResponse",
22067
+ "kind": "interface",
22068
+ "jsdoc": "",
22069
+ "decl": "export interface WixUpdateMemberResponse {\n member: WixMember;\n}"
22070
+ },
22071
+ {
22072
+ "name": "WixDeleteMemberPhonesResponse",
22073
+ "kind": "interface",
22074
+ "jsdoc": "",
22075
+ "decl": "export interface WixDeleteMemberPhonesResponse {\n member?: WixMember;\n}"
22076
+ },
22077
+ {
22078
+ "name": "WixListCurrentMemberBlockingRequest",
22079
+ "kind": "interface",
22080
+ "jsdoc": "",
22081
+ "decl": "export interface WixListCurrentMemberBlockingRequest {\n cursorPaging?: { limit?: number; cursor?: string };\n}"
22082
+ },
22083
+ {
22084
+ "name": "WixListCurrentMemberBlockingResponse",
22085
+ "kind": "interface",
22086
+ "jsdoc": "",
22087
+ "decl": "export interface WixListCurrentMemberBlockingResponse {\n blockedMemberIds?: string[];\n pagingMetadata?: { cursors?: { next?: string; prev?: string }; count?: number; total?: number; tooManyToCount?: boolean };\n}"
22088
+ },
21998
22089
  {
21999
22090
  "name": "queryMembers",
22000
22091
  "kind": "function",
@@ -22009,6 +22100,70 @@
22009
22100
  "decl": "export function getMember(id: string): Promise<WixGetMemberResponse>;",
22010
22101
  "http": "GET /members/v1/members/{…}?fieldsets=FULL"
22011
22102
  },
22103
+ {
22104
+ "name": "getMyMember",
22105
+ "kind": "function",
22106
+ "jsdoc": "/** Fetch the currently authenticated member — member-scoped, unlike the owner roster query.\n * @scope member — requires the signed-in site-member identity; an anonymous visitor cannot read this record.\n */",
22107
+ "decl": "export function getMyMember(req: { fieldsets?: string[] } = {}): Promise<WixGetMyMemberResponse>;",
22108
+ "http": "GET /members/v1/members/my?{…}",
22109
+ "scope": "member"
22110
+ },
22111
+ {
22112
+ "name": "updateMember",
22113
+ "kind": "function",
22114
+ "jsdoc": "/** Update a member record. Callers that serve members must pass the authenticated member's id.\n * @scope member — the id must identify the signed-in member; mismatches are rejected by Wix authorization.\n */",
22115
+ "decl": "export function updateMember(id: string, req: WixUpdateMemberRequest): Promise<WixUpdateMemberResponse>;",
22116
+ "http": "PATCH /members/v1/members/{…}",
22117
+ "scope": "member"
22118
+ },
22119
+ {
22120
+ "name": "updateMySlug",
22121
+ "kind": "function",
22122
+ "jsdoc": "/** Change the signed-in member's own public profile slug.\n * @scope member — requires a signed-in site member; the operation applies only to that member's slug.\n */",
22123
+ "decl": "export function updateMySlug(req: { slug: string }): Promise<WixUpdateMemberResponse>;",
22124
+ "http": "POST /members/v1/members/my/slug",
22125
+ "scope": "member"
22126
+ },
22127
+ {
22128
+ "name": "listCurrentMemberBlocking",
22129
+ "kind": "function",
22130
+ "jsdoc": "/** List IDs blocked by the authenticated member — member-owned social blocks, not site moderation.\n * @scope member — requires a signed-in site member; an empty list means the member has no blocked members.\n */",
22131
+ "decl": "export function listCurrentMemberBlocking(req: WixListCurrentMemberBlockingRequest = {}): Promise<WixListCurrentMemberBlockingResponse>;",
22132
+ "http": "GET /members/v1/member-to-member-blocks/members/my{…}",
22133
+ "scope": "member"
22134
+ },
22135
+ {
22136
+ "name": "unblockCurrentMember",
22137
+ "kind": "function",
22138
+ "jsdoc": "/** Remove one member from the authenticated member's own block list.\n * @scope member — requires a signed-in site member; Wix applies the change to that member's block list.\n */",
22139
+ "decl": "export function unblockCurrentMember(memberId: string): Promise<Record<string, never>>;",
22140
+ "http": "DELETE /members/v1/member-to-member-blocks/members/my/{…}",
22141
+ "scope": "member"
22142
+ },
22143
+ {
22144
+ "name": "deleteMemberPhones",
22145
+ "kind": "function",
22146
+ "jsdoc": "/** Delete every stored contact phone from a member's own profile. The API has no per-phone delete.\n * @scope member — id must be the signed-in member; this endpoint clears all phone numbers on that profile.\n */",
22147
+ "decl": "export function deleteMemberPhones(id: string): Promise<WixDeleteMemberPhonesResponse>;",
22148
+ "http": "DELETE /members/v1/members/{…}/phones",
22149
+ "scope": "member"
22150
+ },
22151
+ {
22152
+ "name": "leaveCommunity",
22153
+ "kind": "function",
22154
+ "jsdoc": "/** Leave the Wix Members Area community. Wix changes the member to PRIVATE.\n * @scope member — requires a signed-in member; this removes that member from the public Members Area community.\n */",
22155
+ "decl": "export function leaveCommunity(): Promise<WixUpdateMemberResponse>;",
22156
+ "http": "POST /members/v1/members/leave-community",
22157
+ "scope": "member"
22158
+ },
22159
+ {
22160
+ "name": "joinCommunity",
22161
+ "kind": "function",
22162
+ "jsdoc": "/** Join the Wix Members Area community. Wix changes the member to PUBLIC.\n * @scope member — requires a signed-in member; this makes that member's Members Area profile public.\n */",
22163
+ "decl": "export function joinCommunity(): Promise<WixUpdateMemberResponse>;",
22164
+ "http": "POST /members/v1/members/join-community",
22165
+ "scope": "member"
22166
+ },
22012
22167
  {
22013
22168
  "name": "approveMember",
22014
22169
  "kind": "function",
@@ -23918,6 +24073,14 @@
23918
24073
  "decl": "export function generateUploadUrl(\n mimeType: string,\n fileName: string,\n parentFolderId?: string,\n): Promise<GenerateUploadUrlResponse>;",
23919
24074
  "http": "POST /site-media/v1/files/generate-upload-url"
23920
24075
  },
24076
+ {
24077
+ "name": "generateMemberPhotoUploadUrl",
24078
+ "kind": "function",
24079
+ "jsdoc": "/** Ask a site-owned Velo HTTP function for a member-authorized photo upload URL.\n * The backend function must independently bind the request to its authenticated\n * member and return `{ uploadUrl }`; this helper does not add credentials or\n * bypass the host's current Wix identity.\n * @scope member — requires a signed-in member and a configured site function that verifies the current member;\n * the returned URL is for upload only and does not itself update the member profile.\n */",
24080
+ "decl": "export function generateMemberPhotoUploadUrl(\n functionName: string,\n mimeType: string,\n fileName: string,\n): Promise<GenerateUploadUrlResponse>;",
24081
+ "http": "POST /velo/v1/http/invoke/{…}",
24082
+ "scope": "member"
24083
+ },
23921
24084
  {
23922
24085
  "name": "(reexport)",
23923
24086
  "kind": "reexport",
@@ -53,4 +53,5 @@ the SDK sources, so it matches the shipped SDKs.
53
53
  - [`theme`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Ftheme?format=md) — Runtime brand overlay. 2 methods.
54
54
  - [`ui`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fui?format=md) — Imperative popup capability. 2 methods · not in Brandy.
55
55
  - [`wix_cashier`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fwix_cashier?format=md) — Native cashier. 2 methods.
56
+ - [`wix_chat`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fwix_chat?format=md) — Host-owned realtime Chat event subscriptions. 2 methods.
56
57
  - [`wix_platform`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fwix_platform?format=md) — Wix Platform SDK, worker-facing bindings. 30 methods · not in Brandy.
@@ -112,6 +112,48 @@ browser-direct to wixapis instead). See `core/web-host/src/App.tsx`. There is no
112
112
  > **rejects with `sign_in_unavailable`** unless the `__webwix` bridge already holds a member. Catch that and
113
113
  > show a real error state — it is the difference between "sign-in isn't available here" and a dead button.
114
114
 
115
+ ## Social sign-in (Google, Apple) and push-approval 2FA
116
+
117
+ `social: ["google", "apple"]` on `WixNativeAuthProvider` lists the buttons the app *may* show. The
118
+ native gate shows only the ones that can actually run on that platform, so a button never fails with
119
+ "This sign-in method isn't available":
120
+
121
+ | Provider | iOS | Android |
122
+ |---|---|---|
123
+ | Apple | always (Sign in with Apple, needs the entitlement) | never (no native path) |
124
+ | Google | when `HimalayaWixAuthGoogle` is linked **and** an iOS client id is configured | when `:himalaya-wix-auth-google` is linked **and** a server client id is configured |
125
+
126
+ Enable Google in four steps:
127
+
128
+ 1. Configure the client ids (from a Google Cloud project whose tokens Wix's
129
+ `/oneapp/social/sign-in/google` accepts):
130
+ ```ts
131
+ WixNativeAuthProvider({ mode: "owner", social: ["google", "apple"],
132
+ google: { iosClientId: "<ios>.apps.googleusercontent.com", serverClientId: "<web>.apps.googleusercontent.com" } })
133
+ ```
134
+ An id left out hides Google on that platform: `iosClientId` for iOS, `serverClientId` (the WEB
135
+ client) for Android.
136
+ 2. **iOS** — add the `HimalayaWixAuthGoogle` package to the app (it pulls GoogleSignIn-iOS), add the
137
+ reversed iOS client id as a URL scheme (`CFBundleURLTypes`), and call
138
+ `HimalayaWixAuthGoogle.register(clientId:serverClientId:)` at boot, before the gate's provider list
139
+ is built.
140
+ 3. **Android** — include `:himalaya-wix-auth-google` (androidx.credentials + Google identity) and call
141
+ `CredentialManagerGoogleAdapter.register(context, serverClientId)` at boot.
142
+ 4. Filter the baked `social` list before handing it to the gate:
143
+ `SocialSignInCoordinator.shared.availableProviders(requested, devMode:)` (iOS) /
144
+ `SocialSignInAdapters.available(requested, devMode)` (Android). The dev seam (`devMode`) shows every
145
+ provider and answers with a dev credential.
146
+
147
+ Only a real cancel reads as "cancelled"; a misconfigured client id surfaces Google's own message.
148
+
149
+ **Push-approval 2FA (owner/account).** When a Wix account's second factor is push approval, the gate
150
+ shows "Approve the sign-in on your other device." instead of a code field and waits on its own: the
151
+ provider polls Wix's Verification API with the challenge's `verificationId` (every 5s, at most 5
152
+ minutes) and, once approved, completes the login with an empty code. Declined and expired requests show
153
+ their own message; the primary button sends a new request, and the method picker switches to a code
154
+ factor at any time. Dev seam accounts: `2fa-push@himalaya.dev` (approves) and
155
+ `2fa-push-deny@himalaya.dev` (declines), password `Passw0rd!`.
156
+
115
157
  ## Fail-closed (`required: true`)
116
158
 
117
159
  If a required-auth app can't build its provider (unknown `providerId`, missing config key), boot sets a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1399.0",
3
+ "version": "0.1401.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "himalaya-cli"
72
72
  }
73
73
  },
74
- "falconPackageHash": "5602cafea0f9e92feb51eb02932446cafa4658b6e7397be9ae1377cb"
74
+ "falconPackageHash": "bbec74b2d9de8eb6130af034add9f1970a354b15303a6d85d5ff7b6b"
75
75
  }