@wix/himalaya-cli 0.1928.0 → 0.1930.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/dev-server/src/builder.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/chat-web/src/index.d.ts +12 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-chat-web.mjs +19 -9
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{95a3ae045bad903e458ea7a5800e60e1044f0f754a65d7127de66ba62e897068.bin → 7656e5effbeaee2ab20810b9903e7e785d9dffb0a0563f25c2746011cf4e23e9.bin} +1 -1
- package/dist/browser-plane/sw.js +10 -10
- package/dist/cli.mjs +256 -70
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-index.md +1 -1
- package/guides/component-reference.json +1 -1
- package/guides/component-reference.md +7 -0
- package/guides/sdk-reference.json +2 -2
- package/package.json +2 -2
- package/templates/bare-fashion/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/beauty-salon/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/beauty-salon-owner/dev/index.ts +169 -139
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/beauty-salon-owner/tier5-src/wix-owner-booking/index.ts +4 -1
- package/templates/branded-lite/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/brandy/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/community-club/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/community-club-owner/dev/index.ts +167 -132
- package/templates/community-club-owner/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/community-club-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/community-club-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/community-club-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/community-club-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/community-club-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/community-club-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/community-club-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/community-club-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/community-club-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
- package/templates/community-club-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/conference/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/events-meetups/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/events-meetups-owner/dev/index.ts +165 -125
- package/templates/events-meetups-owner/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/events-meetups-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/events-meetups-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/events-meetups-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/events-meetups-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/fitness-gym/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/gym-fitness/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/gym-fitness-owner/dev/index.ts +169 -139
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/gym-fitness-owner/tier5-src/wix-owner-booking/index.ts +4 -1
- package/templates/himi-chat/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/medical-services/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/nonprofit-cause-owner/dev/index.ts +167 -132
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/nonprofit-cause-owner/tier5-src/wix-owner-booking/index.ts +4 -1
- package/templates/owner-lite/dev/index.ts +171 -141
- package/templates/owner-lite/himalaya.content.json +1 -1
- package/templates/owner-lite/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/owner-lite/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/owner-lite/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/owner-lite/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/owner-lite/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/owner-lite/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/owner-lite/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/owner-lite/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/owner-lite/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/owner-lite/tier5-src/himi-owner-lite-order/index.ts +4 -1
- package/templates/owner-lite/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/owner-lite/tier5-src/wix-owner-booking/index.ts +4 -1
- package/templates/personal-fitness-trainer/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/podcast-creator/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/podcast-creator-owner/dev/index.ts +167 -132
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/portfolio-creative/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/portfolio-creative-owner/dev/index.ts +169 -139
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/portfolio-creative-owner/tier5-src/wix-owner-booking/index.ts +4 -1
- package/templates/professional-services/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/restaurant/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/restaurant-owner/dev/index.ts +169 -139
- package/templates/restaurant-owner/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/restaurant-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/restaurant-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/restaurant-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/restaurant-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/restaurant-owner/tier5-src/wix-owner-booking/index.ts +4 -1
- package/templates/retail-store/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/retail-store-owner/dev/index.ts +167 -132
- package/templates/retail-store-owner/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/retail-store-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/retail-store-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/retail-store-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/retail-store-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/salon-spa/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/wholesale-store/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/yoga-studio/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/yoga-studio-owner/dev/index.ts +167 -132
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-load-error.ts +1 -1
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
- package/templates/yoga-studio-owner/tier5-src/wix-owner-booking/index.ts +4 -1
|
@@ -1464,6 +1464,8 @@ export declare function pageControl(props: {
|
|
|
1464
1464
|
countPath?: string;
|
|
1465
1465
|
/** `$service:` path to the current page; wins over `currentIndex`. A tap fires `onChange`, the worker writes it back. */
|
|
1466
1466
|
currentIndexPath?: string;
|
|
1467
|
+
/** "pill" (default): a dot per page, the current one a wide pill. "dots": round dots, at most seven, tapering. */
|
|
1468
|
+
style?: "pill" | "dots";
|
|
1467
1469
|
}, opts?: {
|
|
1468
1470
|
id?: string;
|
|
1469
1471
|
}): Component;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -2216,6 +2216,13 @@ export interface PageControlProps {
|
|
|
2216
2216
|
* back; the web and React Native dots are display-only.
|
|
2217
2217
|
*/
|
|
2218
2218
|
currentIndexPath?: string;
|
|
2219
|
+
/**
|
|
2220
|
+
* How the dots are drawn. `"pill"` (default): every page a dot, the current one a wide accent pill.
|
|
2221
|
+
* `"dots"`: round dots, the current one accent, at most seven shown — a window that follows the
|
|
2222
|
+
* current page, its outer dots tapering where more pages lie beyond (a long carousel's indicator).
|
|
2223
|
+
* An older binary draws the pill.
|
|
2224
|
+
*/
|
|
2225
|
+
style?: "pill" | "dots";
|
|
2219
2226
|
}
|
|
2220
2227
|
export interface WheelPickerProps {
|
|
2221
2228
|
options?: PickerOption[];
|
|
@@ -47,6 +47,11 @@ export interface ChatOptions extends WixCallOptions {
|
|
|
47
47
|
role?: ChatRole;
|
|
48
48
|
/** A caller-supplied chatToken; skips the mint. Never stored by this module. */
|
|
49
49
|
chatToken?: string;
|
|
50
|
+
/** The business (metaSiteId) every call is addressed to, sent as `wix-site-id`. Unset = the
|
|
51
|
+
* business the worker's Wix connection was opened for. An owner app with several businesses
|
|
52
|
+
* sets it: a screen kept alive across a business switch keeps the connection it started
|
|
53
|
+
* with, and would go on reading the business it was first opened for. */
|
|
54
|
+
siteId?: string;
|
|
50
55
|
}
|
|
51
56
|
/** Opaque server cursor. `0` is a valid cursor, so test for null/undefined only. */
|
|
52
57
|
export type ChatCursor = number | string;
|
|
@@ -138,6 +143,13 @@ export interface Chatroom {
|
|
|
138
143
|
};
|
|
139
144
|
};
|
|
140
145
|
lastMessage?: ChatMessagePreview;
|
|
146
|
+
/** The business the conversation belongs to. An owner's unified list holds the conversations
|
|
147
|
+
* of every business of the account, whichever site the call names (measured live 2026-11-28).
|
|
148
|
+
* `id` is not a metaSiteId. */
|
|
149
|
+
businessContext?: {
|
|
150
|
+
id?: string;
|
|
151
|
+
name?: string;
|
|
152
|
+
};
|
|
141
153
|
}
|
|
142
154
|
/** Mint a chatToken (required by every chat-web call). Tries the mint exactly
|
|
143
155
|
* `TOKEN_MINT_ATTEMPTS` times: the token endpoint occasionally returns a
|
|
@@ -31,6 +31,10 @@ function chatWebError(code, message, cause) {
|
|
|
31
31
|
function isChatWebError(e) {
|
|
32
32
|
return !!e && typeof e === "object" && e.name === "ChatWebError";
|
|
33
33
|
}
|
|
34
|
+
function forSite(options, headers) {
|
|
35
|
+
const site = typeof options?.siteId === "string" ? options.siteId.trim() : "";
|
|
36
|
+
return site ? { ...headers ?? {}, "wix-site-id": site } : headers;
|
|
37
|
+
}
|
|
34
38
|
var BASE = "https://manage.wix.com";
|
|
35
39
|
var TOKEN_MINT_ATTEMPTS = 2;
|
|
36
40
|
function pathSegment(value, what) {
|
|
@@ -110,7 +114,7 @@ async function getMessagesPage(chatroomId, params = {}) {
|
|
|
110
114
|
"GET",
|
|
111
115
|
`${BASE}/_api/chat-web/v1/chatrooms/${room}/messages?${query}`,
|
|
112
116
|
void 0,
|
|
113
|
-
|
|
117
|
+
forSite(params),
|
|
114
118
|
params
|
|
115
119
|
);
|
|
116
120
|
if (!res || typeof res !== "object") throw chatWebError("invalid_response", "history response is not an object");
|
|
@@ -134,7 +138,7 @@ async function sendChatMessage(chatroomId, text, options = {}) {
|
|
|
134
138
|
"POST",
|
|
135
139
|
`${BASE}/_api/chat-web/v2/chatrooms/${room}/messages`,
|
|
136
140
|
{ sendMessageBody: { id, messageType: "message", messageTypeVersion: 1, summary: text, data: [{ mimeType: "text/plain", data: { text } }] } },
|
|
137
|
-
{ ChatToken: chatToken }
|
|
141
|
+
forSite(options, { ChatToken: chatToken })
|
|
138
142
|
);
|
|
139
143
|
}
|
|
140
144
|
async function archiveChatroom(chatroomId, archived = true, options = {}) {
|
|
@@ -144,7 +148,8 @@ async function archiveChatroom(chatroomId, archived = true, options = {}) {
|
|
|
144
148
|
await wixCall(
|
|
145
149
|
"PUT",
|
|
146
150
|
`${BASE}/_api/chat-web/v1/chatrooms/${room}/${verb}?chatToken=${encodeURIComponent(chatToken)}`,
|
|
147
|
-
{}
|
|
151
|
+
{},
|
|
152
|
+
forSite(options)
|
|
148
153
|
);
|
|
149
154
|
}
|
|
150
155
|
async function getChatToken(options = {}) {
|
|
@@ -168,7 +173,8 @@ async function getChatToken(options = {}) {
|
|
|
168
173
|
const r = await wixCall(
|
|
169
174
|
"POST",
|
|
170
175
|
`${BASE}/_api/wix-chat-tokens-server/v1/chat-tokens?isForUnifiedList=${unified}`,
|
|
171
|
-
{}
|
|
176
|
+
{},
|
|
177
|
+
forSite(options)
|
|
172
178
|
);
|
|
173
179
|
if (typeof r?.chatToken === "string" && r.chatToken) return { chatToken: r.chatToken };
|
|
174
180
|
} catch (e) {
|
|
@@ -184,7 +190,7 @@ async function listChatrooms(pageSize = 20, options = {}) {
|
|
|
184
190
|
"GET",
|
|
185
191
|
`${BASE}/_api/chat-web/v2/chatrooms?chatToken=${encodeURIComponent(chatToken)}&pageSize=${pageSize}`,
|
|
186
192
|
void 0,
|
|
187
|
-
|
|
193
|
+
forSite(options),
|
|
188
194
|
options
|
|
189
195
|
);
|
|
190
196
|
return res.chatrooms?.items ?? [];
|
|
@@ -219,7 +225,7 @@ async function listChatroomsPage(params = {}) {
|
|
|
219
225
|
lastMessageLimit: LAST_MESSAGE_LIMIT,
|
|
220
226
|
unreadChatroomLimit: unreadLimit
|
|
221
227
|
});
|
|
222
|
-
const res = await wixCall("POST", `${BASE}/_api/chat-web/v1/chatrooms-for-list-view${type}?${query}`, { participantIds, labelIds: [] },
|
|
228
|
+
const res = await wixCall("POST", `${BASE}/_api/chat-web/v1/chatrooms-for-list-view${type}?${query}`, { participantIds, labelIds: [] }, forSite(params), params);
|
|
223
229
|
if (!res || typeof res !== "object" || !res.chatrooms || typeof res.chatrooms !== "object") {
|
|
224
230
|
throw chatWebError("invalid_response", "list response has no chatrooms");
|
|
225
231
|
}
|
|
@@ -245,7 +251,8 @@ async function markChatroomRead(chatroomId, lastReadMessageSequence, options = {
|
|
|
245
251
|
const res = await wixCall(
|
|
246
252
|
"PUT",
|
|
247
253
|
`${BASE}/_api/chat-web/v1/chatrooms/${room}/users?chatToken=${encodeURIComponent(chatToken)}`,
|
|
248
|
-
body
|
|
254
|
+
body,
|
|
255
|
+
forSite(options)
|
|
249
256
|
);
|
|
250
257
|
return { lastReadMessageSequence: res?.lastReadMessageSequence };
|
|
251
258
|
}
|
|
@@ -256,7 +263,8 @@ async function markChatroomUnread(chatroomId, lastReadMessageSequence, options =
|
|
|
256
263
|
await wixCall(
|
|
257
264
|
"PUT",
|
|
258
265
|
`${BASE}/_api/chat-web/v1/chatrooms/${room}/unread?chatToken=${encodeURIComponent(chatToken)}`,
|
|
259
|
-
body
|
|
266
|
+
body,
|
|
267
|
+
forSite(options)
|
|
260
268
|
);
|
|
261
269
|
}
|
|
262
270
|
async function deleteChatroom(chatroomId, options = {}) {
|
|
@@ -264,7 +272,9 @@ async function deleteChatroom(chatroomId, options = {}) {
|
|
|
264
272
|
const { chatToken } = await getChatToken(options);
|
|
265
273
|
await wixCall(
|
|
266
274
|
"DELETE",
|
|
267
|
-
`${BASE}/_api/chat-web/v1/chatrooms/${room}?chatToken=${encodeURIComponent(chatToken)}
|
|
275
|
+
`${BASE}/_api/chat-web/v1/chatrooms/${room}?chatToken=${encodeURIComponent(chatToken)}`,
|
|
276
|
+
void 0,
|
|
277
|
+
forSite(options)
|
|
268
278
|
);
|
|
269
279
|
}
|
|
270
280
|
async function getOrCreateDirectChatroom(memberId) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"files": [
|
|
3
3
|
{
|
|
4
4
|
"name": "sw.js",
|
|
5
|
-
"bytes":
|
|
5
|
+
"bytes": 2815793
|
|
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/
|
|
24
|
+
"name": "preview-deferred/7656e5effbeaee2ab20810b9903e7e785d9dffb0a0563f25c2746011cf4e23e9.bin",
|
|
25
25
|
"bytes": 488215
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
],
|
|
80
80
|
"deferred": [
|
|
81
81
|
{
|
|
82
|
-
"key": "assets/pdf-
|
|
82
|
+
"key": "assets/pdf-D4tw-DPw.js",
|
|
83
83
|
"contentType": "application/javascript; charset=utf-8",
|
|
84
|
-
"sha256": "
|
|
85
|
-
"file": "preview-deferred/
|
|
84
|
+
"sha256": "7656e5effbeaee2ab20810b9903e7e785d9dffb0a0563f25c2746011cf4e23e9",
|
|
85
|
+
"file": "preview-deferred/7656e5effbeaee2ab20810b9903e7e785d9dffb0a0563f25c2746011cf4e23e9.bin"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"key": "assets/pdf.worker.min-BGnVRhRG.js",
|