@wix/himalaya-cli 0.1398.0 → 0.1400.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/sdk/sdk-types/src/capabilities.generated.d.ts +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/webview-page/src/capabilities.generated.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-chat/src/index.d.ts +33 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +8 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/icon-catalog.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +66 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-media/src/index.d.ts +8 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +41 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth/worker.mjs +9 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth.mjs +9 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-chat.mjs +56 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +45 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-site-media.mjs +17 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +4 -0
- package/dist/cli.mjs +102 -34
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/app-config.md +1 -1
- package/guides/capabilities.md +5 -0
- package/guides/headless-loop.md +1 -1
- package/guides/importable-sdks.md +1 -0
- package/guides/sdk-reference.json +163 -0
- package/guides/web-page-sdk-reference.md +1 -0
- package/package.json +2 -2
- package/templates/beauty-salon-owner/dev/index.ts +304 -7
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-widget-view.ts +63 -16
- package/templates/community-club-owner/dev/index.ts +304 -7
- package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/community-club-owner/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/community-club-owner/tier5-src/_shared/aria-widget-view.ts +63 -16
- package/templates/events-meetups-owner/dev/index.ts +304 -7
- package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/events-meetups-owner/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/events-meetups-owner/tier5-src/_shared/aria-widget-view.ts +63 -16
- package/templates/gym-fitness-owner/dev/index.ts +304 -7
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-widget-view.ts +63 -16
- package/templates/nonprofit-cause-owner/dev/index.ts +304 -7
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-widget-view.ts +63 -16
- package/templates/owner-lite/dev/index.ts +304 -7
- package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/owner-lite/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/owner-lite/tier5-src/_shared/aria-widget-view.ts +63 -16
- package/templates/podcast-creator-owner/dev/index.ts +304 -7
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-widget-view.ts +63 -16
- package/templates/portfolio-creative-owner/dev/index.ts +304 -7
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-widget-view.ts +63 -16
- package/templates/restaurant-owner/dev/index.ts +304 -7
- package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/restaurant-owner/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/restaurant-owner/tier5-src/_shared/aria-widget-view.ts +63 -16
- package/templates/retail-store-owner/dev/index.ts +304 -7
- package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/retail-store-owner/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/retail-store-owner/tier5-src/_shared/aria-widget-view.ts +63 -16
- package/templates/yoga-studio-owner/dev/index.ts +304 -7
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +39 -33
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-widget-model.ts +26 -4
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-widget-view.ts +63 -16
|
@@ -39,9 +39,10 @@ export declare const CAPABILITY_REGISTRY: {
|
|
|
39
39
|
readonly theme: readonly ["applyOverlay", "clearOverlay", "surfaces"];
|
|
40
40
|
readonly ui: readonly ["alert", "snackbar"];
|
|
41
41
|
readonly wix_cashier: readonly ["isAvailable", "proceedToPayment"];
|
|
42
|
+
readonly wix_chat: readonly ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"];
|
|
42
43
|
};
|
|
43
44
|
/** A capability id backed by an @himalaya/* SDK binding. */
|
|
44
|
-
export type SdkCapability = "app_info" | "audio_record" | "base44" | "biometrics" | "browser_auth" | "calendar" | "calls" | "camera" | "clipboard" | "contacts" | "file_picker" | "files" | "godot" | "haptic" | "health" | "himi_apps" | "iap" | "keyboard" | "live_activity" | "local_database" | "location" | "media_playback" | "motion" | "on_device_ai" | "open_url" | "pdf" | "photos" | "presigned_upload" | "push" | "release_control" | "secure_storage" | "share" | "speaker_diarization" | "speech" | "system_intents" | "tasks" | "theme" | "ui" | "wix_cashier";
|
|
45
|
+
export type SdkCapability = "app_info" | "audio_record" | "base44" | "biometrics" | "browser_auth" | "calendar" | "calls" | "camera" | "clipboard" | "contacts" | "file_picker" | "files" | "godot" | "haptic" | "health" | "himi_apps" | "iap" | "keyboard" | "live_activity" | "local_database" | "location" | "media_playback" | "motion" | "on_device_ai" | "open_url" | "pdf" | "photos" | "presigned_upload" | "push" | "release_control" | "secure_storage" | "share" | "speaker_diarization" | "speech" | "system_intents" | "tasks" | "theme" | "ui" | "wix_cashier" | "wix_chat";
|
|
45
46
|
/** All `capability.<id>.<verb>` action ids, flattened (the worker-bridge wire vocabulary). */
|
|
46
47
|
export declare const CAPABILITY_ACTION_IDS: readonly string[];
|
|
47
48
|
/** Capability id → the @himalaya/* package(s) a worker imports to reach it — every dispatch
|
|
@@ -37,6 +37,7 @@ import type * as TasksSdk from "@wix/himalaya/tasks";
|
|
|
37
37
|
import type * as ThemeSdk from "@wix/himalaya/theme";
|
|
38
38
|
import type * as UiSdk from "@wix/himalaya/ui";
|
|
39
39
|
import type * as WixCashierSdk from "@wix/himalaya/wix-cashier";
|
|
40
|
+
import type * as WixChatSdk from "@wix/himalaya/wix-chat";
|
|
40
41
|
type PageModule<T> = {
|
|
41
42
|
readonly [P in keyof T as T[P] extends (...args: any[]) => any ? P : T[P] extends readonly unknown[] ? never : T[P] extends object ? keyof PageModule<T[P]> extends never ? never : P : never]: T[P] extends (...args: infer A) => infer R ? (...args: A) => R : T[P] extends readonly unknown[] ? never : T[P] extends object ? PageModule<T[P]> : never;
|
|
42
43
|
};
|
|
@@ -83,6 +84,7 @@ export interface HimalayaPageCapabilities {
|
|
|
83
84
|
readonly "theme": PageModule<typeof ThemeSdk>;
|
|
84
85
|
readonly "ui": PageModule<typeof UiSdk>;
|
|
85
86
|
readonly "wix_cashier": PageModule<typeof WixCashierSdk>;
|
|
87
|
+
readonly "wix_chat": PageModule<typeof WixChatSdk>;
|
|
86
88
|
}
|
|
87
89
|
export type HimalayaPageSdk = HimalayaPageCapabilities & {
|
|
88
90
|
readonly version: 1;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type RealtimeState = "connected" | "connecting" | "reconnecting" | "disconnected" | "error" | "unavailable";
|
|
2
|
+
export type RealtimeReason = "chat_setup_scope_unavailable" | "runtime_unavailable" | "invalid_setup_response" | "firebase_auth_failed" | "firebase_connection_failed" | "invalid_event" | "event_overflow";
|
|
3
|
+
export interface RealtimeStatus {
|
|
4
|
+
state: RealtimeState;
|
|
5
|
+
reason?: RealtimeReason;
|
|
6
|
+
}
|
|
7
|
+
export interface RealtimeSubscription extends RealtimeStatus {
|
|
8
|
+
subscriptionId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface RealtimeEventEnvelope {
|
|
11
|
+
/** A normalized Wix Chat server event from Firebase. */
|
|
12
|
+
event: Record<string, unknown>;
|
|
13
|
+
/** Firebase server timestamp sampled when the subscription was established. */
|
|
14
|
+
connectionEstablishedTimestamp: number;
|
|
15
|
+
}
|
|
16
|
+
/** Subscribe this worker to Wix Chat realtime events. Reducers receive one
|
|
17
|
+
* {@link RealtimeEventEnvelope}; status reducers receive {@link RealtimeStatus}.
|
|
18
|
+
* A new subscription replaces the worker's prior subscription, and worker disposal
|
|
19
|
+
* always closes the host stream. The returned identifier is opaque and worker-local. */
|
|
20
|
+
export declare function subscribeRealtime(opts: {
|
|
21
|
+
onEvent: string;
|
|
22
|
+
onStatus?: string;
|
|
23
|
+
}): Promise<RealtimeSubscription>;
|
|
24
|
+
/** Stop this worker's subscription. Returns `ok: false` for an unknown or stale ID. */
|
|
25
|
+
export declare function unsubscribeRealtime(opts: {
|
|
26
|
+
subscriptionId: string;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
ok: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
/** Read the latest host connection status for a worker-local subscription ID. */
|
|
31
|
+
export declare function getRealtimeStatus(opts: {
|
|
32
|
+
subscriptionId: string;
|
|
33
|
+
}): Promise<RealtimeStatus>;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts
CHANGED
|
@@ -515,6 +515,13 @@ export interface NotificationCategoryAction {
|
|
|
515
515
|
/** When true the action opens a text input (reply-style). */
|
|
516
516
|
input?: boolean;
|
|
517
517
|
inputPlaceholder?: string;
|
|
518
|
+
/** When true a press on a LOCKED device asks for unlock (Face ID / passcode / PIN)
|
|
519
|
+
* before it reaches `observerAction` — set it on any action that writes (accept,
|
|
520
|
+
* decline, delete). iOS `UNNotificationActionOptions.authenticationRequired`;
|
|
521
|
+
* Android `setAuthenticationRequired` (API 31+). Android 8–11 (API 26–30) has no
|
|
522
|
+
* per-action gate, so it fails CLOSED there: the flagged button is omitted, while the
|
|
523
|
+
* notification and its tap-to-open stay. */
|
|
524
|
+
authenticationRequired?: boolean;
|
|
518
525
|
}
|
|
519
526
|
/** A notification category — a named set of action buttons. */
|
|
520
527
|
export interface NotificationCategory {
|
|
@@ -747,7 +754,7 @@ export interface OrientationEnvelope {
|
|
|
747
754
|
export declare const DEFAULT_ORIENTATION_ENVELOPE: Required<OrientationEnvelope>;
|
|
748
755
|
/** Fill in the absent families. Total, so callers never branch on `undefined`. */
|
|
749
756
|
export declare function resolveOrientationEnvelope(env?: OrientationEnvelope): Required<OrientationEnvelope>;
|
|
750
|
-
export type Capability = "camera" | "barcode_scanner" | "biometrics" | "secure_storage" | "share" | "push" | "file_picker" | "files" | "open_url" | "pdf" | "clipboard" | "theme" | "photos" | "presigned_upload" | "ui" | "calendar" | "contacts" | "tasks" | "audio_record" | "audio_record_background" | "calls" | "location" | "location_background" | "motion" | "health" | "media_playback" | "webview" | "browser_auth" | "haptic" | "himi_apps" | "iap" | "keyboard" | "wix_cashier" | "live_activity" | "local_database" | "speech" | "speaker_diarization" | "system_intents" | "on_device_ai" | "app_info" | "release_control" | "godot" | "base44" | "animation";
|
|
757
|
+
export type Capability = "camera" | "barcode_scanner" | "biometrics" | "secure_storage" | "share" | "push" | "file_picker" | "files" | "open_url" | "pdf" | "clipboard" | "theme" | "photos" | "presigned_upload" | "ui" | "calendar" | "contacts" | "tasks" | "audio_record" | "audio_record_background" | "calls" | "location" | "location_background" | "motion" | "health" | "media_playback" | "webview" | "browser_auth" | "haptic" | "himi_apps" | "iap" | "keyboard" | "wix_cashier" | "wix_chat" | "live_activity" | "local_database" | "speech" | "speaker_diarization" | "system_intents" | "on_device_ai" | "app_info" | "release_control" | "godot" | "base44" | "animation";
|
|
751
758
|
/** `defineApp({ wixIap })` — the purchases-service app a build binds this app to. */
|
|
752
759
|
export interface WixIapConfig {
|
|
753
760
|
/** The purchases service's app UUID, registered on the app's own auth site. Not a secret. */
|
|
@@ -28,7 +28,7 @@ export declare const ICON_CATALOG: Readonly<Record<string, IconCatalogEntry>>;
|
|
|
28
28
|
/** normalized (lowercased, separators stripped) → canonical key, aliases included. */
|
|
29
29
|
export declare const ICON_NORMALIZED_INDEX: Readonly<Record<string, string>>;
|
|
30
30
|
/** Every authorable name, aliases included. `_unknown` is deliberately absent. */
|
|
31
|
-
export declare const ICON_NAMES: readonly ["ai", "arrow_down", "arrow_left", "arrow_right", "arrow_up", "back", "bag", "bag_fill", "barcode", "bell", "bell_fill", "bell_off", "bell_slash", "book", "bookmark", "bookmark_fill", "boxes", "branch", "calendar", "camera", "cart", "cart_fill", "chart", "chat", "check", "checklist", "checkmark", "chevron_down", "chevron_left", "chevron_right", "chevron_up", "circle", "circle_fill", "clock", "close", "concealed", "cookie", "copy", "dashboard", "doc", "document", "download", "edit", "ellipsis", "error", "expand", "external_link", "eye", "eye_slash", "filter", "folder", "forward", "fullscreen", "gear", "globe", "grid", "grid_fill", "grip", "heart", "heart_fill", "help", "home", "home_fill", "house", "image", "inbox", "info", "layers", "link", "list", "location", "lock", "logout", "mail", "map", "menu", "message", "mic", "mic_fill", "microphone", "microphone_fill", "minus", "moon", "more", "more_vertical", "music", "newspaper", "newspaper_fill", "next", "pause", "pencil", "people", "person", "person_fill", "phone", "photo", "pin", "play", "play_circle", "play_circle_fill", "plus", "plus_circle", "plus_circle_fill", "prev", "question", "refresh", "repeat", "rss", "search", "send", "send_arrow", "settings", "settings_fill", "share", "shuffle", "skip_back", "skip_forward", "skip_next", "skip_previous", "star", "star_fill", "stop", "success", "tag", "ticket", "ticket_fill", "trash", "tray", "undo", "user", "visible", "volume", "warning", "wifi", "xmark"];
|
|
31
|
+
export declare const ICON_NAMES: readonly ["ai", "arrow_down", "arrow_left", "arrow_right", "arrow_up", "back", "bag", "bag_fill", "barcode", "bell", "bell_fill", "bell_off", "bell_slash", "book", "bookmark", "bookmark_fill", "boxes", "branch", "calendar", "camera", "cart", "cart_fill", "chart", "chat", "check", "checklist", "checkmark", "chevron_down", "chevron_left", "chevron_right", "chevron_up", "circle", "circle_fill", "clock", "close", "concealed", "cookie", "copy", "dashboard", "doc", "document", "download", "edit", "ellipsis", "error", "expand", "external_link", "eye", "eye_slash", "filter", "folder", "forward", "fullscreen", "gear", "gift", "globe", "grid", "grid_fill", "grip", "heart", "heart_fill", "help", "home", "home_fill", "house", "image", "inbox", "info", "layers", "link", "list", "location", "lock", "logout", "mail", "map", "menu", "message", "mic", "mic_fill", "microphone", "microphone_fill", "minus", "moon", "more", "more_vertical", "music", "newspaper", "newspaper_fill", "next", "paper_plane", "pause", "pencil", "people", "person", "person_fill", "phone", "photo", "pin", "play", "play_circle", "play_circle_fill", "plus", "plus_circle", "plus_circle_fill", "prev", "question", "refresh", "repeat", "rss", "search", "send", "send_arrow", "settings", "settings_fill", "share", "shuffle", "skip_back", "skip_forward", "skip_next", "skip_previous", "star", "star_fill", "stop", "success", "tag", "ticket", "ticket_fill", "trash", "tray", "undo", "user", "visible", "volume", "warning", "wifi", "xmark"];
|
|
32
32
|
export type IconName = (typeof ICON_NAMES)[number];
|
|
33
33
|
/** Resolve any authored string to a row, falling back to `_unknown`. Never returns undefined. */
|
|
34
34
|
export declare function resolveIcon(name: string): IconCatalogEntry;
|
|
@@ -67,11 +67,77 @@ export interface WixQueryMembersResponse {
|
|
|
67
67
|
export interface WixGetMemberResponse {
|
|
68
68
|
member: WixMember;
|
|
69
69
|
}
|
|
70
|
+
export interface WixGetMyMemberResponse {
|
|
71
|
+
member: WixMember;
|
|
72
|
+
}
|
|
73
|
+
export interface WixUpdateMemberRequest {
|
|
74
|
+
member: Partial<WixMember>;
|
|
75
|
+
}
|
|
76
|
+
export interface WixUpdateMemberResponse {
|
|
77
|
+
member: WixMember;
|
|
78
|
+
}
|
|
79
|
+
export interface WixDeleteMemberPhonesResponse {
|
|
80
|
+
member?: WixMember;
|
|
81
|
+
}
|
|
82
|
+
export interface WixListCurrentMemberBlockingRequest {
|
|
83
|
+
cursorPaging?: {
|
|
84
|
+
limit?: number;
|
|
85
|
+
cursor?: string;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export interface WixListCurrentMemberBlockingResponse {
|
|
89
|
+
blockedMemberIds?: string[];
|
|
90
|
+
pagingMetadata?: {
|
|
91
|
+
cursors?: {
|
|
92
|
+
next?: string;
|
|
93
|
+
prev?: string;
|
|
94
|
+
};
|
|
95
|
+
count?: number;
|
|
96
|
+
total?: number;
|
|
97
|
+
tooManyToCount?: boolean;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
70
100
|
/** List site members — POST /members/v1/members/query. Pass `{ query: { paging: { limit, offset? } } }`
|
|
71
101
|
* (offset paging). Do not pass `cursorPaging` — that is a different Wix envelope and is not on this type. */
|
|
72
102
|
export declare function queryMembers(req?: WixQueryMembersRequest): Promise<WixQueryMembersResponse>;
|
|
73
103
|
/** Fetch a single member by id — GET /members/v1/members/{id}?fieldsets=FULL. */
|
|
74
104
|
export declare function getMember(id: string): Promise<WixGetMemberResponse>;
|
|
105
|
+
/** Fetch the currently authenticated member — member-scoped, unlike the owner roster query.
|
|
106
|
+
* @scope member — requires the signed-in site-member identity; an anonymous visitor cannot read this record.
|
|
107
|
+
*/
|
|
108
|
+
export declare function getMyMember(req?: {
|
|
109
|
+
fieldsets?: string[];
|
|
110
|
+
}): Promise<WixGetMyMemberResponse>;
|
|
111
|
+
/** Update a member record. Callers that serve members must pass the authenticated member's id.
|
|
112
|
+
* @scope member — the id must identify the signed-in member; mismatches are rejected by Wix authorization.
|
|
113
|
+
*/
|
|
114
|
+
export declare function updateMember(id: string, req: WixUpdateMemberRequest): Promise<WixUpdateMemberResponse>;
|
|
115
|
+
/** Change the signed-in member's own public profile slug.
|
|
116
|
+
* @scope member — requires a signed-in site member; the operation applies only to that member's slug.
|
|
117
|
+
*/
|
|
118
|
+
export declare function updateMySlug(req: {
|
|
119
|
+
slug: string;
|
|
120
|
+
}): Promise<WixUpdateMemberResponse>;
|
|
121
|
+
/** List IDs blocked by the authenticated member — member-owned social blocks, not site moderation.
|
|
122
|
+
* @scope member — requires a signed-in site member; an empty list means the member has no blocked members.
|
|
123
|
+
*/
|
|
124
|
+
export declare function listCurrentMemberBlocking(req?: WixListCurrentMemberBlockingRequest): Promise<WixListCurrentMemberBlockingResponse>;
|
|
125
|
+
/** Remove one member from the authenticated member's own block list.
|
|
126
|
+
* @scope member — requires a signed-in site member; Wix applies the change to that member's block list.
|
|
127
|
+
*/
|
|
128
|
+
export declare function unblockCurrentMember(memberId: string): Promise<Record<string, never>>;
|
|
129
|
+
/** Delete every stored contact phone from a member's own profile. The API has no per-phone delete.
|
|
130
|
+
* @scope member — id must be the signed-in member; this endpoint clears all phone numbers on that profile.
|
|
131
|
+
*/
|
|
132
|
+
export declare function deleteMemberPhones(id: string): Promise<WixDeleteMemberPhonesResponse>;
|
|
133
|
+
/** Leave the Wix Members Area community. Wix changes the member to PRIVATE.
|
|
134
|
+
* @scope member — requires a signed-in member; this removes that member from the public Members Area community.
|
|
135
|
+
*/
|
|
136
|
+
export declare function leaveCommunity(): Promise<WixUpdateMemberResponse>;
|
|
137
|
+
/** Join the Wix Members Area community. Wix changes the member to PUBLIC.
|
|
138
|
+
* @scope member — requires a signed-in member; this makes that member's Members Area profile public.
|
|
139
|
+
*/
|
|
140
|
+
export declare function joinCommunity(): Promise<WixUpdateMemberResponse>;
|
|
75
141
|
/** Approve a member — POST /members/v1/members/{id}/approve. Reactivates BOTH a
|
|
76
142
|
* PENDING member and a BLOCKED one (verified live: approve on a blocked member →
|
|
77
143
|
* 200, status APPROVED). There is NO separate `/unblock` endpoint — it 404s; the
|
|
@@ -25,4 +25,12 @@ export interface GenerateUploadUrlResponse {
|
|
|
25
25
|
* POST /site-media/v1/files/generate-upload-url → { uploadUrl, … }.
|
|
26
26
|
* Caller PUTs the bytes to `uploadUrl`, then uses the returned file id. */
|
|
27
27
|
export declare function generateUploadUrl(mimeType: string, fileName: string, parentFolderId?: string): Promise<GenerateUploadUrlResponse>;
|
|
28
|
+
/** Ask a site-owned Velo HTTP function for a member-authorized photo upload URL.
|
|
29
|
+
* The backend function must independently bind the request to its authenticated
|
|
30
|
+
* member and return `{ uploadUrl }`; this helper does not add credentials or
|
|
31
|
+
* bypass the host's current Wix identity.
|
|
32
|
+
* @scope member — requires a signed-in member and a configured site function that verifies the current member;
|
|
33
|
+
* the returned URL is for upload only and does not itself update the member profile.
|
|
34
|
+
*/
|
|
35
|
+
export declare function generateMemberPhotoUploadUrl(functionName: string, mimeType: string, fileName: string): Promise<GenerateUploadUrlResponse>;
|
|
28
36
|
export { wixCall };
|
|
@@ -53,7 +53,8 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
54
54
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
55
55
|
"ui": ["alert", "snackbar"],
|
|
56
|
-
"wix_cashier": ["isAvailable", "proceedToPayment"]
|
|
56
|
+
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
57
|
+
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
57
58
|
};
|
|
58
59
|
var CAPABILITY_ACTION_IDS = Object.freeze(
|
|
59
60
|
Object.entries(CAPABILITY_REGISTRY).flatMap(([id, verbs]) => verbs.map((v) => `capability.${id}.${v}`))
|
|
@@ -53,7 +53,8 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
54
54
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
55
55
|
"ui": ["alert", "snackbar"],
|
|
56
|
-
"wix_cashier": ["isAvailable", "proceedToPayment"]
|
|
56
|
+
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
57
|
+
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
57
58
|
};
|
|
58
59
|
var CAPABILITY_ACTION_IDS = Object.freeze(
|
|
59
60
|
Object.entries(CAPABILITY_REGISTRY).flatMap(([id, verbs]) => verbs.map((v) => `capability.${id}.${v}`))
|
|
@@ -53,7 +53,8 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
54
54
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
55
55
|
"ui": ["alert", "snackbar"],
|
|
56
|
-
"wix_cashier": ["isAvailable", "proceedToPayment"]
|
|
56
|
+
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
57
|
+
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
57
58
|
};
|
|
58
59
|
var CAPABILITY_ACTION_IDS = Object.freeze(
|
|
59
60
|
Object.entries(CAPABILITY_REGISTRY).flatMap(([id, verbs]) => verbs.map((v) => `capability.${id}.${v}`))
|
|
@@ -53,7 +53,8 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
54
54
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
55
55
|
"ui": ["alert", "snackbar"],
|
|
56
|
-
"wix_cashier": ["isAvailable", "proceedToPayment"]
|
|
56
|
+
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
57
|
+
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
57
58
|
};
|
|
58
59
|
var CAPABILITY_ACTION_IDS = Object.freeze(
|
|
59
60
|
Object.entries(CAPABILITY_REGISTRY).flatMap(([id, verbs]) => verbs.map((v) => `capability.${id}.${v}`))
|
|
@@ -11429,6 +11429,24 @@ var ICON_CATALOG = {
|
|
|
11429
11429
|
"license": "Apache-2.0",
|
|
11430
11430
|
"libVersion": "0.45.9"
|
|
11431
11431
|
},
|
|
11432
|
+
"gift": {
|
|
11433
|
+
"category": "commerce",
|
|
11434
|
+
"path": [
|
|
11435
|
+
"M4 22L4 10.875L2 10.875L2 5.125L7.5 5.125C7.367 4.925 7.267 4.713 7.2 4.487C7.133 4.263 7.1 4.033 7.1 3.8C7.1 3.022 7.372 2.361 7.917 1.817C8.461 1.272 9.122 1 9.9 1C10.3 1 10.688 1.083 11.063 1.25C11.438 1.417 11.75 1.658 12 1.975C12.25 1.658 12.563 1.417 12.938 1.25C13.313 1.083 13.7 1 14.1 1C14.878 1 15.539 1.272 16.083 1.817C16.628 2.361 16.9 3.022 16.9 3.8C16.9 4.033 16.867 4.263 16.8 4.487C16.733 4.713 16.633 4.925 16.5 5.125L22 5.125L22 10.875L20 10.875L20 22L4 22ZM13.175 2.873C12.925 3.122 12.8 3.43 12.8 3.798C12.8 4.166 12.924 4.475 13.173 4.725C13.422 4.975 13.73 5.1 14.098 5.1C14.466 5.1 14.775 4.976 15.025 4.727C15.275 4.478 15.4 4.17 15.4 3.802C15.4 3.434 15.276 3.125 15.027 2.875C14.778 2.625 14.47 2.5 14.102 2.5C13.734 2.5 13.425 2.624 13.175 2.873ZM8.6 3.798C8.6 4.166 8.724 4.475 8.973 4.725C9.222 4.975 9.53 5.1 9.898 5.1C10.266 5.1 10.575 4.976 10.825 4.727C11.075 4.478 11.2 4.17 11.2 3.802C11.2 3.434 11.076 3.125 10.827 2.875C10.578 2.625 10.27 2.5 9.902 2.5C9.534 2.5 9.225 2.624 8.975 2.873C8.725 3.122 8.6 3.43 8.6 3.798ZM3.5 6.625L3.5 9.375L11.25 9.375L11.25 6.625L3.5 6.625ZM11.25 20.5L11.25 10.875L5.35 10.875L5.35 20.5L11.25 20.5ZM12.75 20.5L18.65 20.5L18.65 10.875L12.75 10.875L12.75 20.5ZM20.5 9.375L20.5 6.625L12.75 6.625L12.75 9.375L20.5 9.375Z"
|
|
11436
|
+
],
|
|
11437
|
+
"style": "filled",
|
|
11438
|
+
"ios": {
|
|
11439
|
+
"sf": "gift",
|
|
11440
|
+
"match": "exact"
|
|
11441
|
+
},
|
|
11442
|
+
"android": {
|
|
11443
|
+
"material": "CardGiftcard",
|
|
11444
|
+
"match": "exact"
|
|
11445
|
+
},
|
|
11446
|
+
"source": "material-symbols/featured_seasonal_and_gifts",
|
|
11447
|
+
"license": "Apache-2.0",
|
|
11448
|
+
"libVersion": "0.45.9"
|
|
11449
|
+
},
|
|
11432
11450
|
"globe": {
|
|
11433
11451
|
"category": "place",
|
|
11434
11452
|
"path": [
|
|
@@ -11992,6 +12010,25 @@ var ICON_CATALOG = {
|
|
|
11992
12010
|
"license": "Apache-2.0",
|
|
11993
12011
|
"libVersion": "0.45.9"
|
|
11994
12012
|
},
|
|
12013
|
+
"paper_plane": {
|
|
12014
|
+
"category": "communication",
|
|
12015
|
+
"path": [
|
|
12016
|
+
"M3 20L3 4L22 12L3 20ZM4.5 17.675L18.1 12L4.5 6.25L4.5 10.45L10.55 12L4.5 13.5L4.5 17.675ZM4.5 17.675L4.5 6.25L4.5 17.675Z"
|
|
12017
|
+
],
|
|
12018
|
+
"style": "filled",
|
|
12019
|
+
"mirrorsInRTL": true,
|
|
12020
|
+
"ios": {
|
|
12021
|
+
"sf": "paperplane",
|
|
12022
|
+
"match": "exact"
|
|
12023
|
+
},
|
|
12024
|
+
"android": {
|
|
12025
|
+
"material": "Send",
|
|
12026
|
+
"match": "exact"
|
|
12027
|
+
},
|
|
12028
|
+
"source": "material-symbols/send",
|
|
12029
|
+
"license": "Apache-2.0",
|
|
12030
|
+
"libVersion": "0.45.9"
|
|
12031
|
+
},
|
|
11995
12032
|
"pause": {
|
|
11996
12033
|
"category": "media",
|
|
11997
12034
|
"path": [
|
|
@@ -12767,6 +12804,7 @@ var ICON_NORMALIZED_INDEX = {
|
|
|
12767
12804
|
"filter": "filter",
|
|
12768
12805
|
"folder": "folder",
|
|
12769
12806
|
"fullscreen": "fullscreen",
|
|
12807
|
+
"gift": "gift",
|
|
12770
12808
|
"globe": "globe",
|
|
12771
12809
|
"grid": "grid",
|
|
12772
12810
|
"gridfill": "grid_fill",
|
|
@@ -12803,6 +12841,7 @@ var ICON_NORMALIZED_INDEX = {
|
|
|
12803
12841
|
"newspaperfill": "newspaper_fill",
|
|
12804
12842
|
"next": "next",
|
|
12805
12843
|
"skipforward": "next",
|
|
12844
|
+
"paperplane": "paper_plane",
|
|
12806
12845
|
"pause": "pause",
|
|
12807
12846
|
"people": "people",
|
|
12808
12847
|
"person": "person",
|
|
@@ -12902,6 +12941,7 @@ var ICON_NAMES = [
|
|
|
12902
12941
|
"forward",
|
|
12903
12942
|
"fullscreen",
|
|
12904
12943
|
"gear",
|
|
12944
|
+
"gift",
|
|
12905
12945
|
"globe",
|
|
12906
12946
|
"grid",
|
|
12907
12947
|
"grid_fill",
|
|
@@ -12937,6 +12977,7 @@ var ICON_NAMES = [
|
|
|
12937
12977
|
"newspaper",
|
|
12938
12978
|
"newspaper_fill",
|
|
12939
12979
|
"next",
|
|
12980
|
+
"paper_plane",
|
|
12940
12981
|
"pause",
|
|
12941
12982
|
"pencil",
|
|
12942
12983
|
"people",
|
|
@@ -53,7 +53,8 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
54
54
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
55
55
|
"ui": ["alert", "snackbar"],
|
|
56
|
-
"wix_cashier": ["isAvailable", "proceedToPayment"]
|
|
56
|
+
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
57
|
+
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
57
58
|
};
|
|
58
59
|
var CAPABILITY_ACTION_IDS = Object.freeze(
|
|
59
60
|
Object.entries(CAPABILITY_REGISTRY).flatMap(([id, verbs]) => verbs.map((v) => `capability.${id}.${v}`))
|
|
@@ -53,7 +53,8 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
54
54
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
55
55
|
"ui": ["alert", "snackbar"],
|
|
56
|
-
"wix_cashier": ["isAvailable", "proceedToPayment"]
|
|
56
|
+
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
57
|
+
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
57
58
|
};
|
|
58
59
|
var CAPABILITY_ACTION_IDS = Object.freeze(
|
|
59
60
|
Object.entries(CAPABILITY_REGISTRY).flatMap(([id, verbs]) => verbs.map((v) => `capability.${id}.${v}`))
|
|
@@ -53,7 +53,8 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
54
54
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
55
55
|
"ui": ["alert", "snackbar"],
|
|
56
|
-
"wix_cashier": ["isAvailable", "proceedToPayment"]
|
|
56
|
+
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
57
|
+
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
57
58
|
};
|
|
58
59
|
var CAPABILITY_ACTION_IDS = Object.freeze(
|
|
59
60
|
Object.entries(CAPABILITY_REGISTRY).flatMap(([id, verbs]) => verbs.map((v) => `capability.${id}.${v}`))
|
|
@@ -38,7 +38,8 @@ var CAPABILITY_REGISTRY = {
|
|
|
38
38
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
39
39
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
40
40
|
"ui": ["alert", "snackbar"],
|
|
41
|
-
"wix_cashier": ["isAvailable", "proceedToPayment"]
|
|
41
|
+
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
42
|
+
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
42
43
|
};
|
|
43
44
|
var CAPABILITY_ACTION_IDS = Object.freeze(
|
|
44
45
|
Object.entries(CAPABILITY_REGISTRY).flatMap(([id, verbs]) => verbs.map((v) => `capability.${id}.${v}`))
|
|
@@ -53,7 +53,8 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
54
54
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
55
55
|
"ui": ["alert", "snackbar"],
|
|
56
|
-
"wix_cashier": ["isAvailable", "proceedToPayment"]
|
|
56
|
+
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
57
|
+
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
57
58
|
};
|
|
58
59
|
var CAPABILITY_ACTION_IDS = Object.freeze(
|
|
59
60
|
Object.entries(CAPABILITY_REGISTRY).flatMap(([id, verbs]) => verbs.map((v) => `capability.${id}.${v}`))
|
|
@@ -718,6 +718,15 @@ var WIX_SENSITIVE_KEYS = [
|
|
|
718
718
|
"setcookie",
|
|
719
719
|
// captcha / passwords
|
|
720
720
|
"password",
|
|
721
|
+
"currentpassword",
|
|
722
|
+
"newpassword",
|
|
723
|
+
"confirmpassword",
|
|
724
|
+
"oldpassword",
|
|
725
|
+
// T5 account-settings state uses passwordCurrent/passwordNew/passwordConfirm;
|
|
726
|
+
// redact those camel-case state keys too if state snapshots reach the gateway.
|
|
727
|
+
"passwordcurrent",
|
|
728
|
+
"passwordnew",
|
|
729
|
+
"passwordconfirm",
|
|
721
730
|
"recaptcha",
|
|
722
731
|
"recaptcharesponsefield",
|
|
723
732
|
"pxaccesstoken"
|
|
@@ -482,6 +482,15 @@ var WIX_SENSITIVE_KEYS = [
|
|
|
482
482
|
"setcookie",
|
|
483
483
|
// captcha / passwords
|
|
484
484
|
"password",
|
|
485
|
+
"currentpassword",
|
|
486
|
+
"newpassword",
|
|
487
|
+
"confirmpassword",
|
|
488
|
+
"oldpassword",
|
|
489
|
+
// T5 account-settings state uses passwordCurrent/passwordNew/passwordConfirm;
|
|
490
|
+
// redact those camel-case state keys too if state snapshots reach the gateway.
|
|
491
|
+
"passwordcurrent",
|
|
492
|
+
"passwordnew",
|
|
493
|
+
"passwordconfirm",
|
|
485
494
|
"recaptcha",
|
|
486
495
|
"recaptcharesponsefield",
|
|
487
496
|
"pxaccesstoken"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// ../../core/sdk/dispatch/src/index.ts
|
|
2
|
+
function dispatch(handlerId, params, _options) {
|
|
3
|
+
const himalaya = globalThis.himalaya;
|
|
4
|
+
if (!himalaya) {
|
|
5
|
+
return Promise.reject(
|
|
6
|
+
new Error("@himalaya/dispatch: called outside a Himalaya runtime. This bundle must run inside a JSWorker (Tier 5).")
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
const stringParams = {};
|
|
10
|
+
if (params) {
|
|
11
|
+
for (const [k, v] of Object.entries(params)) stringParams[k] = String(v);
|
|
12
|
+
}
|
|
13
|
+
return himalaya.dispatch(handlerId, stringParams);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// ../../core/sdk/wix-chat/src/index.ts
|
|
17
|
+
function validateActionRef(value, name) {
|
|
18
|
+
if (!/^[A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*$/.test(value)) {
|
|
19
|
+
throw new Error(`wix-chat.${name}: expected "<service>.<action>"`);
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
async function subscribeRealtime(opts) {
|
|
24
|
+
const onEvent = validateActionRef(opts.onEvent, "subscribeRealtime onEvent");
|
|
25
|
+
const onStatus = opts.onStatus ? validateActionRef(opts.onStatus, "subscribeRealtime onStatus") : "";
|
|
26
|
+
const result = await dispatch("capability.wix_chat.subscribeRealtime", { onEvent, onStatus });
|
|
27
|
+
return {
|
|
28
|
+
subscriptionId: typeof result?.subscriptionId === "string" ? result.subscriptionId : "",
|
|
29
|
+
state: normalizeState(result?.state),
|
|
30
|
+
...!result ? { reason: "runtime_unavailable" } : {},
|
|
31
|
+
...normalizeReason(result?.reason) ? { reason: normalizeReason(result?.reason) } : {}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
async function unsubscribeRealtime(opts) {
|
|
35
|
+
if (!opts.subscriptionId.trim()) return { ok: false };
|
|
36
|
+
const result = await dispatch("capability.wix_chat.unsubscribeRealtime", { subscriptionId: opts.subscriptionId });
|
|
37
|
+
return { ok: result?.ok === true };
|
|
38
|
+
}
|
|
39
|
+
async function getRealtimeStatus(opts) {
|
|
40
|
+
if (!opts.subscriptionId.trim()) return { state: "unavailable", reason: "runtime_unavailable" };
|
|
41
|
+
const result = await dispatch("capability.wix_chat.getRealtimeStatus", { subscriptionId: opts.subscriptionId });
|
|
42
|
+
const reason = normalizeReason(result?.reason);
|
|
43
|
+
return { state: result ? normalizeState(result.state) : "unavailable", ...!result ? { reason: "runtime_unavailable" } : {}, ...reason ? { reason } : {} };
|
|
44
|
+
}
|
|
45
|
+
function normalizeState(value) {
|
|
46
|
+
return value === "connected" || value === "connecting" || value === "reconnecting" || value === "disconnected" || value === "error" ? value : "unavailable";
|
|
47
|
+
}
|
|
48
|
+
function normalizeReason(value) {
|
|
49
|
+
return value === "chat_setup_scope_unavailable" || value === "runtime_unavailable" || value === "invalid_setup_response" || value === "firebase_auth_failed" || value === "firebase_connection_failed" || value === "invalid_event" || value === "event_overflow" ? value : void 0;
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
getRealtimeStatus,
|
|
53
|
+
subscribeRealtime,
|
|
54
|
+
unsubscribeRealtime
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=wix-chat.mjs.map
|
|
@@ -14,6 +14,42 @@ function getMember(id) {
|
|
|
14
14
|
if (!id) throw new Error("getMember: id is required");
|
|
15
15
|
return wixCall("GET", `/members/v1/members/${encodeURIComponent(id)}?fieldsets=FULL`);
|
|
16
16
|
}
|
|
17
|
+
function getMyMember(req = {}) {
|
|
18
|
+
const fieldsets = req.fieldsets?.length ? req.fieldsets.map((fieldset) => `fieldsets=${encodeURIComponent(fieldset)}`).join("&") : "fieldsets=FULL";
|
|
19
|
+
return wixCall("GET", `/members/v1/members/my?${fieldsets}`);
|
|
20
|
+
}
|
|
21
|
+
function updateMember(id, req) {
|
|
22
|
+
if (!id) throw new Error("updateMember: id is required");
|
|
23
|
+
return wixCall("PATCH", `/members/v1/members/${encodeURIComponent(id)}`, req);
|
|
24
|
+
}
|
|
25
|
+
function updateMySlug(req) {
|
|
26
|
+
return wixCall("POST", "/members/v1/members/my/slug", req);
|
|
27
|
+
}
|
|
28
|
+
function listCurrentMemberBlocking(req = {}) {
|
|
29
|
+
const parts = [];
|
|
30
|
+
const paging = req.cursorPaging;
|
|
31
|
+
if (paging?.limit != null) parts.push(`cursorPaging.limit=${encodeURIComponent(String(paging.limit))}`);
|
|
32
|
+
if (paging?.cursor) parts.push(`cursorPaging.cursor=${encodeURIComponent(paging.cursor)}`);
|
|
33
|
+
const query = parts.length ? `?${parts.join("&")}` : "";
|
|
34
|
+
return wixCall("GET", `/members/v1/member-to-member-blocks/members/my${query}`);
|
|
35
|
+
}
|
|
36
|
+
function unblockCurrentMember(memberId) {
|
|
37
|
+
if (!memberId) throw new Error("unblockCurrentMember: memberId is required");
|
|
38
|
+
return wixCall(
|
|
39
|
+
"DELETE",
|
|
40
|
+
`/members/v1/member-to-member-blocks/members/my/${encodeURIComponent(memberId)}`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
function deleteMemberPhones(id) {
|
|
44
|
+
if (!id) throw new Error("deleteMemberPhones: id is required");
|
|
45
|
+
return wixCall("DELETE", `/members/v1/members/${encodeURIComponent(id)}/phones`);
|
|
46
|
+
}
|
|
47
|
+
function leaveCommunity() {
|
|
48
|
+
return wixCall("POST", "/members/v1/members/leave-community", {});
|
|
49
|
+
}
|
|
50
|
+
function joinCommunity() {
|
|
51
|
+
return wixCall("POST", "/members/v1/members/join-community", {});
|
|
52
|
+
}
|
|
17
53
|
function approveMember(id) {
|
|
18
54
|
return wixCall("POST", `/members/v1/members/${encodeURIComponent(id)}/approve`, {});
|
|
19
55
|
}
|
|
@@ -58,11 +94,19 @@ export {
|
|
|
58
94
|
approveMember,
|
|
59
95
|
blockMember,
|
|
60
96
|
deleteMember,
|
|
97
|
+
deleteMemberPhones,
|
|
61
98
|
followMember,
|
|
62
99
|
getFollowCounts,
|
|
63
100
|
getMember,
|
|
101
|
+
getMyMember,
|
|
64
102
|
isFollowingMember,
|
|
103
|
+
joinCommunity,
|
|
104
|
+
leaveCommunity,
|
|
105
|
+
listCurrentMemberBlocking,
|
|
65
106
|
queryMembers,
|
|
66
|
-
|
|
107
|
+
unblockCurrentMember,
|
|
108
|
+
unfollowMember,
|
|
109
|
+
updateMember,
|
|
110
|
+
updateMySlug
|
|
67
111
|
};
|
|
68
112
|
//# sourceMappingURL=wix-members.mjs.map
|
|
@@ -14,7 +14,24 @@ function generateUploadUrl(mimeType, fileName, parentFolderId) {
|
|
|
14
14
|
if (parentFolderId) body.parentFolderId = parentFolderId;
|
|
15
15
|
return wixCall("POST", "/site-media/v1/files/generate-upload-url", body);
|
|
16
16
|
}
|
|
17
|
+
function generateMemberPhotoUploadUrl(functionName, mimeType, fileName) {
|
|
18
|
+
if (!/^[A-Za-z][A-Za-z0-9_]{0,63}$/.test(functionName)) {
|
|
19
|
+
throw new Error("generateMemberPhotoUploadUrl: invalid function name");
|
|
20
|
+
}
|
|
21
|
+
if (!mimeType || mimeType.length > 127 || /[\r\n]/.test(mimeType)) {
|
|
22
|
+
throw new Error("generateMemberPhotoUploadUrl: invalid MIME type");
|
|
23
|
+
}
|
|
24
|
+
if (!fileName || fileName.length > 255 || /[\u0000-\u001f\u007f]/.test(fileName)) {
|
|
25
|
+
throw new Error("generateMemberPhotoUploadUrl: invalid file name");
|
|
26
|
+
}
|
|
27
|
+
return wixCall(
|
|
28
|
+
"POST",
|
|
29
|
+
`/velo/v1/http/invoke/${encodeURIComponent(functionName)}`,
|
|
30
|
+
{ mimeType, fileName }
|
|
31
|
+
);
|
|
32
|
+
}
|
|
17
33
|
export {
|
|
34
|
+
generateMemberPhotoUploadUrl,
|
|
18
35
|
generateUploadUrl,
|
|
19
36
|
wixCall
|
|
20
37
|
};
|
|
@@ -322,6 +322,10 @@
|
|
|
322
322
|
"types": "./dist/_types/core/sdk/wix-cashier/src/index.d.ts",
|
|
323
323
|
"import": "./dist/wix-cashier.mjs"
|
|
324
324
|
},
|
|
325
|
+
"./wix-chat": {
|
|
326
|
+
"types": "./dist/_types/core/sdk/wix-chat/src/index.d.ts",
|
|
327
|
+
"import": "./dist/wix-chat.mjs"
|
|
328
|
+
},
|
|
325
329
|
"./wix-chat-web": {
|
|
326
330
|
"types": "./dist/_types/stdlib/wix-sdk/chat-web/src/index.d.ts",
|
|
327
331
|
"import": "./dist/wix-chat-web.mjs"
|