@wix/mcp 1.0.88 → 1.0.90
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/build/bin-standalone.js +207 -34
- package/build/cjs/index.cjs +214 -40
- package/build/cjs/toolkit.cjs +212 -38
- package/build/dts/code-mode/index.js +5 -4
- package/build/dts/config/default-config.js +113 -30
- package/build/dts/config/param-descriptions.js +2 -1
- package/build/dts/docs/deploy-website.d.ts +13 -0
- package/build/dts/docs/deploy-website.js +45 -0
- package/build/dts/docs/docs.d.ts +2 -0
- package/build/dts/docs/docs.js +21 -7
- package/build/dts/docs/fetch-article.d.ts +1 -0
- package/build/dts/docs/fetch-article.js +40 -2
- package/build/dts/import-claude-design-tool/index.js +2 -2
- package/build/dts/toolkit-entry.d.cts +2 -0
- package/build/dts/toolkit-entry.d.ts +2 -0
- package/build/esm/index.js +214 -40
- package/build/esm/toolkit.js +212 -38
- package/package.json +2 -2
package/build/cjs/index.cjs
CHANGED
|
@@ -36739,6 +36739,31 @@ async function fetchArticle(articleUrl) {
|
|
|
36739
36739
|
return fetchArticleContent(httpClient6, articleUrl, "article", false);
|
|
36740
36740
|
}
|
|
36741
36741
|
var DOCS_URL_PREFIX = "https://dev.wix.com/docs/";
|
|
36742
|
+
var SKILLS_REGISTRY_URL = new RegExp(
|
|
36743
|
+
"^https://(?:dev\\.wix\\.com(?:/docs)?|www\\.wix\\.com(?:/velo/reference)?)/skills(?:[/.?#]|$)"
|
|
36744
|
+
);
|
|
36745
|
+
function isSkillsRegistryUrl(url) {
|
|
36746
|
+
return SKILLS_REGISTRY_URL.test(url.trim());
|
|
36747
|
+
}
|
|
36748
|
+
async function fetchSkillsRegistryPage(httpClient6, url) {
|
|
36749
|
+
let data;
|
|
36750
|
+
try {
|
|
36751
|
+
({ data } = await httpClient6.get(url, {
|
|
36752
|
+
headers: { accept: "text/markdown, text/plain;q=0.9, */*;q=0.1" }
|
|
36753
|
+
}));
|
|
36754
|
+
} catch (error2) {
|
|
36755
|
+
const { message, status } = getHttpErrorDetails(error2);
|
|
36756
|
+
const statusSuffix = status ? ` (status ${status})` : "";
|
|
36757
|
+
throw new Error(`${message}${statusSuffix}`);
|
|
36758
|
+
}
|
|
36759
|
+
if (typeof data !== "string") {
|
|
36760
|
+
return JSON.stringify(data, null, 2);
|
|
36761
|
+
}
|
|
36762
|
+
if (!data.trim()) {
|
|
36763
|
+
throw new Error("Article content is empty");
|
|
36764
|
+
}
|
|
36765
|
+
return data;
|
|
36766
|
+
}
|
|
36742
36767
|
function getResponseErrorMessage(data) {
|
|
36743
36768
|
if (!data) {
|
|
36744
36769
|
return void 0;
|
|
@@ -36829,13 +36854,15 @@ async function fetchArticleContent(httpClient6, articleUrl, mode, stripHeader =
|
|
|
36829
36854
|
`[fetch] Override failed for ${effectiveUrl}, falling back to ${articleUrl}:`,
|
|
36830
36855
|
error2 instanceof Error ? error2.message : error2
|
|
36831
36856
|
);
|
|
36832
|
-
content = await fetchArticleContentFromDigor(
|
|
36857
|
+
content = isSkillsRegistryUrl(articleUrl) ? await fetchSkillsRegistryPage(httpClient6, articleUrl) : await fetchArticleContentFromDigor(
|
|
36833
36858
|
httpClient6,
|
|
36834
36859
|
articleUrl,
|
|
36835
36860
|
mode,
|
|
36836
36861
|
stripHeader
|
|
36837
36862
|
);
|
|
36838
36863
|
}
|
|
36864
|
+
} else if (isSkillsRegistryUrl(articleUrl)) {
|
|
36865
|
+
content = await fetchSkillsRegistryPage(httpClient6, articleUrl);
|
|
36839
36866
|
} else if (mode === "raw") {
|
|
36840
36867
|
let parsedUrl;
|
|
36841
36868
|
try {
|
|
@@ -37188,6 +37215,7 @@ function buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance
|
|
|
37188
37215
|
"if the WixREADME tool is available to you, YOU MUST USE IT AT THE BEGINNING OF ANY CONVERSATION and then continue with calling the other tools and calling the Wix APIs until the task is completed.",
|
|
37189
37216
|
"**Exception \u2014 creating a new Wix site/website:** For a normal creation request \u2014 and only then \u2014 skip WixREADME and the docs search, and route straight to the Wix site-creation tools available to you; their descriptions carry the routing rules. Everything else starts with WixREADME as usual.",
|
|
37190
37217
|
"If the user explicitly asks for a headless site, Wix Classic Editor site, or manual account/API-based site creation, call CreateWixBusinessGuide right away \u2014 these don't need the site's purpose first.",
|
|
37218
|
+
"If the user \u2014 or you, earlier in this conversation \u2014 already have a finished page or site in any form (HTML/CSS/JS files, a static build, a zip, another builder's export, a design you can export to HTML) and want it live on Wix, call DeployWebsite right away \u2014 not a site-creation tool, not the docs.",
|
|
37191
37219
|
"Never default to AI or search templates unless the user explicitly requests it. When the user named no creation method - let the user make that choice as the site-creation tools' descriptions direct. Never route normal site creation through ManageWixSite, CallWixSiteAPI, or ExecuteWixAPI."
|
|
37192
37220
|
);
|
|
37193
37221
|
}
|
|
@@ -37269,7 +37297,7 @@ var SITE_CREATION_COPY = {
|
|
|
37269
37297
|
var SITE_GUIDANCE = dedent_default`
|
|
37270
37298
|
A new-site request has two things to settle: what the site is for, and how to build it. The how is AI generation vs. starting from a template, so naming templates, a template id or Wix Studio (Wix Studio is also the template side) already settles it.
|
|
37271
37299
|
|
|
37272
|
-
One case skips all of this:
|
|
37300
|
+
One case skips all of this: a finished page or site ALREADY EXISTS, in any form — hand-written HTML/CSS/JS, a static build, a zip, another AI builder's export, or a page you made earlier in this conversation. There is nothing to build, so don't offer AI or templates and don't call any site-creation tool: call DeployWebsite, which returns the recipe to publish the files yourself (the drop page is only its fallback).
|
|
37273
37301
|
|
|
37274
37302
|
Settle what the site is for first: its purpose, topic, business type, audience, or main visitor action. Naming a method is not a description of the site, and neither is the business or industry on its own.
|
|
37275
37303
|
If you can't tell yet, ask the preferred question below and nothing else — one question, no creation-method question in the same reply, and no internal tool names.
|
|
@@ -37353,32 +37381,49 @@ var ACCOUNT_SITE_EXECUTE_SCOPE = dedent_default`
|
|
|
37353
37381
|
request<T = unknown>(options: WixRequestOptions): Promise<WixResponse<T>>;
|
|
37354
37382
|
// Build a multipart/form-data body from files (defaults to the \`files\`
|
|
37355
37383
|
// global). Each file becomes a part named fieldName (default "files") with
|
|
37356
|
-
// its path as the filename
|
|
37384
|
+
// its path as the filename; \`body\` is bytes so binary parts stay intact.
|
|
37385
|
+
// Pass a base64 entry for binary (an image/font): { path, base64 }, or a
|
|
37386
|
+
// \`files\`-param entry tagged \`base64\`.
|
|
37357
37387
|
multipart(
|
|
37358
|
-
files?: Array<{ path: string; content
|
|
37388
|
+
files?: Array<{ path: string; content?: string; base64?: string; bytes?: Uint8Array; contentType?: string }>,
|
|
37359
37389
|
options?: { fieldName?: string }
|
|
37360
|
-
): { body:
|
|
37390
|
+
): { body: Uint8Array; contentType: string };
|
|
37391
|
+
// Unzip a downloaded site archive (base64 string or bytes) into entries with
|
|
37392
|
+
// RAW bytes (binary-safe); entry.text() decodes a text file. Entries can be
|
|
37393
|
+
// passed straight back to wix.multipart() for a re-upload.
|
|
37394
|
+
unzip(input: string | Uint8Array): Promise<Array<{ path: string; bytes: Uint8Array; text(): string }>>;
|
|
37361
37395
|
};
|
|
37362
37396
|
declare const siteId: string | undefined;
|
|
37363
|
-
// Files from the ExecuteWixAPI \`files\` param
|
|
37364
|
-
|
|
37397
|
+
// Files from the ExecuteWixAPI \`files\` param. Text entries have \`content\`;
|
|
37398
|
+
// an entry tagged \`=== FILE: <path> base64 ===\` has encoding:'base64' and
|
|
37399
|
+
// base64 \`content\` (a binary file — image, font).
|
|
37400
|
+
declare const files: Array<{ path: string; content: string; encoding?: "base64" }>;
|
|
37365
37401
|
\`\`\`
|
|
37366
37402
|
|
|
37367
|
-
FILE UPLOADS:
|
|
37403
|
+
FILE UPLOADS: put every file in the \`files\` param (never inline in \`code\`). Text goes raw; a small binary (icon, logo, font) rides as a \`base64\`-tagged entry — large images/video are referenced by URL (\`<img src="https://...">\`), not bundled. \`wix.multipart()\` turns the whole set into one upload body (bytes, so binary is safe):
|
|
37368
37404
|
\`\`\`javascript
|
|
37369
|
-
// files param:
|
|
37405
|
+
// files param:
|
|
37406
|
+
// === FILE: index.html ===
|
|
37407
|
+
// <!doctype html><img src="logo.png">...
|
|
37408
|
+
// === FILE: logo.png base64 ===
|
|
37409
|
+
// iVBORw0KGgoAAA...
|
|
37370
37410
|
async () => {
|
|
37371
|
-
const mp = wix.multipart(); //
|
|
37372
|
-
const res = await wix.request({
|
|
37373
|
-
|
|
37374
|
-
|
|
37375
|
-
url: "https://www.wixapis.com/.../upload",
|
|
37376
|
-
headers: { "Content-Type": mp.contentType },
|
|
37377
|
-
body: mp.body
|
|
37378
|
-
});
|
|
37411
|
+
const mp = wix.multipart(); // all entries from the files param; base64 ones decoded to raw bytes
|
|
37412
|
+
const res = await wix.request({ scope: "account", method: "POST",
|
|
37413
|
+
url: "https://www.wixapis.com/.../drop",
|
|
37414
|
+
headers: { "Content-Type": mp.contentType }, body: mp.body });
|
|
37379
37415
|
return res.data;
|
|
37380
37416
|
}
|
|
37381
37417
|
\`\`\`
|
|
37418
|
+
DOWNLOAD + EDIT + RE-UPLOAD: fetch the zip as base64, \`wix.unzip()\` it, edit text via \`entry.text()\`, keep binary as bytes, and hand the entries back to \`wix.multipart()\`:
|
|
37419
|
+
\`\`\`javascript
|
|
37420
|
+
const r = await wix.request({ scope: "account", method: "GET", responseType: "base64", url: zipUrl });
|
|
37421
|
+
const entries = await wix.unzip(r.data); // [{ path, bytes, text() }]
|
|
37422
|
+
const edited = entries.map(e => e.path === "index.html"
|
|
37423
|
+
? { path: e.path, content: e.text().replace("Old title", "New title") }
|
|
37424
|
+
: e); // images etc. pass through untouched as bytes
|
|
37425
|
+
const mp = wix.multipart(edited);
|
|
37426
|
+
\`\`\`
|
|
37382
37427
|
`;
|
|
37383
37428
|
var EXECUTE_WIX_API_WQL = dedent_default`
|
|
37384
37429
|
For query and search endpoints: each endpoint declares which fields it can filter and sort by, and with which operators. That list is closed for fields and their operators and covers that endpoint only, and a field's presence in the response is no evidence it can be filtered on. It lives in the method's declared capabilities, and some resources also publish it as a "Supported Filters and Sorting" page. Logical operators are WQL syntax rather than field capabilities and never appear in it. Anything else errors or silently returns the wrong rows; fetch a bounded page and filter it in your own code instead.
|
|
@@ -37510,6 +37555,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37510
37555
|
ReadFullDocsArticle: dedent_default`
|
|
37511
37556
|
Fetches the full Wix docs article or method article with code examples for using the method.
|
|
37512
37557
|
Docs articles looks like this: https://dev.wix.com/docs/... and they can either be general docs articles or method articles.
|
|
37558
|
+
Also reads Wix skills pages — https://www.wix.com/skills/<skill>, https://dev.wix.com/docs/skills/<skill>, and the files they link (e.g. .../<skill>/references/<file>.md) — exactly as served.
|
|
37513
37559
|
Take the URL from the user's message or an earlier tool result. To reach an article you have no URL for, search or browse the docs first.
|
|
37514
37560
|
For REST docs, use the URL as-is. For SDK docs, the URL SHOULD include ?apiView=SDK.
|
|
37515
37561
|
${reminder}
|
|
@@ -37517,7 +37563,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37517
37563
|
ReadFullDocsMethodSchema: dedent_default`
|
|
37518
37564
|
Fetches the full method schema for a given method.
|
|
37519
37565
|
This will give you the entire request/response schema with all the fields and their descriptions.
|
|
37520
|
-
For REST API methods, prefer SearchWixAPISpec when it is available: it can fetch and inspect the exact method schema by docs URL, return the request/response shape, and inspect selected nested component schemas without dumping unrelated fields. Use ReadFullDocsMethodSchema
|
|
37566
|
+
For REST and SDK API-reference methods, prefer SearchWixAPISpec when it is available: it can fetch and inspect the exact method schema by docs URL, return the request/response shape, the JavaScript SDK call (\`method.sdk\`: package, namespace, method, positional parameters, examples), and inspect selected nested component schemas without dumping unrelated fields. Use ReadFullDocsMethodSchema only when SearchWixAPISpec is unavailable or did not provide the needed detail.
|
|
37521
37567
|
For REST docs, use the URL as-is. For SDK docs, the URL SHOULD include ?apiView=SDK.
|
|
37522
37568
|
${reminder}
|
|
37523
37569
|
`,
|
|
@@ -37643,7 +37689,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37643
37689
|
`,
|
|
37644
37690
|
"import-claude-design-from-url": dedent_default`
|
|
37645
37691
|
Import a design created in Claude's design tool into Wix. Takes the signed claudeusercontent.com URL Claude Design produces for its self-contained HTML bundle (all images, fonts, and styles inlined); any other host is rejected. Creates a live Wix-hosted site and returns its URL.
|
|
37646
|
-
NOT for site
|
|
37692
|
+
NOT for a page or site that exists in any other form (the user's own HTML/CSS/JS, a static build, a zip, another builder's export, a page you made in this conversation) — for those call DeployWebsite instead; it returns the recipe to publish the files yourself.
|
|
37647
37693
|
`,
|
|
37648
37694
|
RunWixCliCommand: dedent_default`
|
|
37649
37695
|
Executes Wix CLI commands for Wix app development and management.
|
|
@@ -37672,6 +37718,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37672
37718
|
`,
|
|
37673
37719
|
SearchWixSDKDocumentation: dedent_default`
|
|
37674
37720
|
Searches the Wix JavaScript SDK documentation.
|
|
37721
|
+
Next step for an API-reference method it returns: pass its docs URL (with or without \`?apiView=SDK\`) to \`SearchWixAPISpec\`'s \`getResourceSchemaByUrl\` when available, and read \`method.sdk\` for the exact import, call signature, typed parameters, return type, and examples.
|
|
37675
37722
|
`,
|
|
37676
37723
|
SearchBuildAppsDocumentation: dedent_default`
|
|
37677
37724
|
Searches the Wix Build Apps documentation.
|
|
@@ -37684,18 +37731,18 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37684
37731
|
SearchWixHeadlessDocumentation: dedent_default`
|
|
37685
37732
|
Searches the Wix Headless documentation.
|
|
37686
37733
|
`,
|
|
37687
|
-
// Note:
|
|
37688
|
-
//
|
|
37689
|
-
//
|
|
37690
|
-
//
|
|
37734
|
+
// Note: each method also carries its JavaScript SDK facet (`method.sdk`: package,
|
|
37735
|
+
// namespace, method name, positional signature, parameter schema, JS examples),
|
|
37736
|
+
// merged at spec-sync time from the docs' SDK view. REST fields are unchanged;
|
|
37737
|
+
// `sdk` is simply absent on methods the SDK docs don't list.
|
|
37691
37738
|
SearchWixAPISpec: dedent_default`
|
|
37692
|
-
Inspect the Wix REST API spec by writing JavaScript code that runs in a sandboxed read-only environment.
|
|
37693
|
-
**Precondition:** you already have a method \`docsUrl\` — from \`SearchWixRESTDocumentation\`, \`BrowseWixRESTDocsMenu\`, \`ReadFullDocsArticle\`, ${includeReadme ? "a `WixREADME` recipe, " : ""}or a prior tool result / the user's message in this conversation. If you don't have one yet, call \`SearchWixRESTDocumentation\` FIRST to discover it; do not use this tool to search for or choose an endpoint.
|
|
37739
|
+
Inspect the Wix REST API spec, and the JavaScript SDK call for each method, by writing JavaScript code that runs in a sandboxed read-only environment.
|
|
37740
|
+
**Precondition:** you already have a method \`docsUrl\` — from \`SearchWixRESTDocumentation\`, \`SearchWixSDKDocumentation\` (its \`?apiView=SDK\` URLs work here as-is), \`BrowseWixRESTDocsMenu\`, \`ReadFullDocsArticle\`, ${includeReadme ? "a `WixREADME` recipe, " : ""}or a prior tool result / the user's message in this conversation. If you don't have one yet, call \`SearchWixRESTDocumentation\` (or \`SearchWixSDKDocumentation\` when writing SDK code) FIRST to discover it; do not use this tool to search for or choose an endpoint.
|
|
37694
37741
|
**Never pass a \`docsUrl\` you produced from memory.** If the exact URL you are about to pass to \`getResourceSchemaByUrl\` did not appear verbatim in an earlier tool result (or the user's message), it is a guess — call \`SearchWixRESTDocumentation\` first and use a URL from its ranked results. A guessed URL that merely looks plausible routinely resolves to the WRONG sibling method (e.g. \`.../products-v3/create-product\` when the task needs \`.../products-v3/create-product-with-inventory\`), sending the whole turn down a dead end. When in doubt, discover — don't guess.
|
|
37695
|
-
**This tool's job is to INSPECT the exact schema of a method you have ALREADY located — its request/response shape, nested types, and enums. It is NOT a discovery tool for choosing which method to use.**
|
|
37742
|
+
**This tool's job is to INSPECT the exact schema of a method you have ALREADY located — its request/response shape, nested types, and enums, and its SDK call (\`method.sdk\`). It is NOT a discovery tool for choosing which method to use.**
|
|
37696
37743
|
With a method \`docsUrl\` in hand, call \`getResourceSchemaByUrl(methodDocsUrl)\` to get the resource schema, then read the target method from \`schema.methods\` and resolve any nested \`{ $circular: name }\` types via \`schema.components.schemas[name]\`.
|
|
37697
37744
|
**If you don't already have a \`docsUrl\` in context, your FIRST action MUST be \`SearchWixRESTDocumentation\` (ranked semantic search) — not this tool.** Then pass the resulting \`docsUrl\` to \`getResourceSchemaByUrl\` here. Do NOT discover endpoints by hand-filtering or scanning \`lightIndex\` (e.g. \`lightIndex.filter(...)\` / \`lightIndex.flatMap(...)\` on a substring): it has no relevance ranking, matches only at resource-name granularity, and misses composite or method-level operations whose parent resource is named after a different noun than your intent. \`lightIndex\` is for resolving a \`docsUrl\` you already have, not for finding one.
|
|
37698
|
-
Prefer \`SearchWixAPISpec\` over \`ReadFullDocsMethodSchema\` for REST method schemas when it is available, especially once you already have a docs URL from semantic search, menu browsing, or conversation context.
|
|
37745
|
+
Prefer \`SearchWixAPISpec\` over \`ReadFullDocsMethodSchema\` for REST and SDK method schemas when it is available, especially once you already have a docs URL from semantic search, menu browsing, or conversation context.
|
|
37699
37746
|
|
|
37700
37747
|
Prefer URL-first results:
|
|
37701
37748
|
- If you have a docs URL or partial docs URL, search \`resource.docsUrl\` and \`method.docsUrl\` first.
|
|
@@ -37703,7 +37750,7 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37703
37750
|
- For API execution, return and use \`method.publicUrl\` when available. It is the preferred executable \`https://www.wixapis.com/...\` URL.
|
|
37704
37751
|
- Return \`docsUrl\` for relevant resources/methods when the next step needs an article or API call source URL; do not hand off to \`ReadFullDocsMethodSchema\` just to inspect a REST method schema.
|
|
37705
37752
|
- Use \`resourceId\` only as the internal handle for low-level loaders; prefer URL helpers when you have a docs URL.
|
|
37706
|
-
- \`getResourceSchemaByUrl\` resolves only **API resource/method** docs (e.g. \`.../bookings/services/services-v2/create-service\`). It does NOT work on **skill** pages (\`.../skills/...\`) or **article** pages — those have no schema. For an article, use \`getArticleContentByUrl(docsUrl)\`. Never pass a \`.../skills/...\` URL (skill recipes often cross-link sibling skill pages) — use \`SearchWixRESTDocumentation\` to find the real API method
|
|
37753
|
+
- \`getResourceSchemaByUrl\` resolves only **API resource/method** docs (e.g. \`.../bookings/services/services-v2/create-service\`). It does NOT work on **skill** pages (\`.../skills/...\`) or **article** pages — those have no schema. For an article, use \`getArticleContentByUrl(docsUrl)\`. Never pass a \`.../skills/...\` URL (skill recipes often cross-link sibling skill pages) — read the skill page with \`ReadFullDocsArticle\`, and use \`SearchWixRESTDocumentation\` to find the real API method. If a lookup misses, don't retry the same URL; rediscover it with \`SearchWixRESTDocumentation\`.
|
|
37707
37754
|
|
|
37708
37755
|
Your code has access to these globals:
|
|
37709
37756
|
|
|
@@ -37718,6 +37765,8 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37718
37765
|
resourceId: string; // internal handle for getResourceSchema()
|
|
37719
37766
|
docsUrl: string; // e.g. "https://dev.wix.com/docs/api-reference/.../<resource>"
|
|
37720
37767
|
menuPath: string[]; // e.g. ["business-solutions", "<vertical>", "<resource>"]
|
|
37768
|
+
sdkPackage?: string; // JS SDK npm package shared by the resource's methods, e.g. "@wix/<vertical>"
|
|
37769
|
+
sdkNamespace?: string; // module exported by that package, e.g. "<resources>" — absent when the methods differ (then each method carries its own)
|
|
37721
37770
|
methods: Array<{
|
|
37722
37771
|
operationId: string; // e.g. "wix.<vertical>.v3.<Api>.<Operation>"
|
|
37723
37772
|
summary: string; // human-readable method name
|
|
@@ -37727,6 +37776,9 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37727
37776
|
publicUrl?: string; // preferred executable URL for ExecuteWixAPI, when available after spec sync
|
|
37728
37777
|
publicBaseUrl?: string;
|
|
37729
37778
|
description: string; // truncated to 200 chars
|
|
37779
|
+
sdk?: string; // the JS SDK call as the SDK docs show it, e.g. "query<Resources>(query, options)"; absent when the SDK docs don't list the method
|
|
37780
|
+
sdkPackage?: string; // only when the resource-level value is absent
|
|
37781
|
+
sdkNamespace?: string;
|
|
37730
37782
|
}>;
|
|
37731
37783
|
}
|
|
37732
37784
|
\`\`\`
|
|
@@ -37755,8 +37807,17 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37755
37807
|
legacyExamples: Array<{ // Curl examples
|
|
37756
37808
|
content: { title: string; request: string; response: string };
|
|
37757
37809
|
}>;
|
|
37810
|
+
sdk?: { // JavaScript SDK facet; absent when the SDK docs don't list the method
|
|
37811
|
+
package: string; // npm package, e.g. "@wix/<vertical>" → import { <namespace> } from "<package>"
|
|
37812
|
+
namespace: string; // module exported by the package, e.g. "<resources>"
|
|
37813
|
+
method: string; // SDK method name; NOT always the operation name (e.g. Data Items' InsertDataItem is "insert")
|
|
37814
|
+
signature: string[]; // positional parameter names in call order, e.g. ["query", "options"]
|
|
37815
|
+
requestBody: object | null; // same envelope as the REST requestBody; its properties ARE the parameters in \`signature\`, each typed
|
|
37816
|
+
responses?: object; // only when the SDK returns something other than the REST response (e.g. the created entity instead of a Create<X>Response wrapper)
|
|
37817
|
+
examples: Array<{ title: string; description?: string; code: string }>; // JavaScript examples from the SDK docs
|
|
37818
|
+
};
|
|
37758
37819
|
}>;
|
|
37759
|
-
components: { schemas: object };
|
|
37820
|
+
components: { schemas: object }; // REST types plus the SDK's own types; \`$circular\` names from either body resolve here, exactly as written (SDK-shaped copies of shared types are keyed "sdk:<TypeName>")
|
|
37760
37821
|
}
|
|
37761
37822
|
\`\`\`
|
|
37762
37823
|
|
|
@@ -37818,6 +37879,16 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37818
37879
|
- When inspecting a specific method schema (i.e. you have found a single method and are returning its details), always include \`responses: method.responses\` alongside \`requestBody\`. Knowing the response shape up front prevents speculative re-runs of mutations just to see what the API returned.
|
|
37819
37880
|
- Query/search methods: the declared map is \`method.queryMethodData.queryFieldsCapabilitiesMap\`, or \`method.searchMethodData.searchFieldsCapabilitiesMap\` on search methods. Each entry declares one field's allowed \`operators\` and \`sort\` directions — a closed list, valid for that method alone, so another endpoint's map or a field's presence in the response proves nothing here. Each listed operator is valid on its own — a field takes one — so combine conditions with the logical operators instead: \`$and\` and \`$or\` take an array of expressions, \`$not\` takes one, and they can nest. They are WQL syntax rather than a field capability, so they never appear in the map, and its silence about them is no restriction. An undeclared field or unlisted operator are rejected; some endpoints instead ignore the filter or sort and return the wrong rows. \`sort: []\` means not sortable; no map means nothing is declared, so try what you need and filter in code if it isn't supported.
|
|
37820
37881
|
|
|
37882
|
+
JavaScript SDK (writing code with \`@wix/sdk\` and the \`@wix/*\` packages, in Wix Headless, Velo, CLI apps, or any Node/browser project):
|
|
37883
|
+
- Read \`method.sdk\`, not the REST fields. The REST \`requestBody\` is the wire shape; the SDK wraps it differently — fields become positional arguments, and secondary fields move into an \`options\` object — so never derive an SDK call from the REST body. \`sdk.requestBody.properties\` are the parameters, in the order given by \`sdk.signature\`; \`sdk.requestBody.required\` says which are mandatory.
|
|
37884
|
+
- The call is \`<namespace>.<method>(<signature>)\` after \`import { <namespace> } from "<package>"\` (e.g. \`import { services } from "@wix/bookings"\`), or \`wixClient.<namespace>.<method>(...)\` on a client created with \`createClient({ modules: { <namespace> } })\`. \`sdk.method\` is the only reliable method name — it is not always the camelCased operation name.
|
|
37885
|
+
- Return value: \`await\` resolves to \`sdk.responses\` when present, otherwise to the same shape as \`method.responses\`. Resolve \`$circular\` names from either body against \`schema.components.schemas\` exactly as written: an SDK body may point at an SDK-shaped copy of a type, keyed \`"sdk:<TypeName>"\` (e.g. \`sdk:wix.bookings.services.v2.Service\`), which sits in the same dictionary.
|
|
37886
|
+
- Field names differ from REST on entity system fields: the SDK reads and writes \`_id\`, \`_createdDate\`, \`_updatedDate\` where REST has \`id\`, \`createdDate\`, \`updatedDate\`. The SDK-shaped types already use the SDK names — take field names from them, never from the REST body or a REST-keyed type.
|
|
37887
|
+
- Timestamps: where a REST field is a \`date-time\` string, the SDK takes and returns a JavaScript \`Date\` object (the SDK types spell this \`type: "Date"\`).
|
|
37888
|
+
- \`sdk.examples[].code\` are the SDK docs' JavaScript examples; prefer adapting one over composing a call from the schema. Query methods use the same WQL \`filter\`/\`sort\` rules and the same \`queryMethodData\` map as REST.
|
|
37889
|
+
- No \`method.sdk\` means the SDK docs don't list that method: say so and offer the REST call instead of guessing an SDK signature. Where the method is listed, \`lightIndex\` carries the same call compactly as \`method.sdk\` (a string), with the package and namespace on the resource.
|
|
37890
|
+
- For ExecuteWixAPI, keep using \`method.publicUrl\` and the REST \`requestBody\`; the SDK facet is for code the user will run, not for calls made through this MCP.
|
|
37891
|
+
|
|
37821
37892
|
Examples:
|
|
37822
37893
|
|
|
37823
37894
|
Inspect one method schema by exact docs URL:
|
|
@@ -37862,6 +37933,39 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
37862
37933
|
}
|
|
37863
37934
|
\`\`\`
|
|
37864
37935
|
|
|
37936
|
+
Get the JavaScript SDK call for a method — import, signature, typed parameters, return type, and a docs example (the docs URL may come from \`SearchWixSDKDocumentation\`, with or without \`?apiView=SDK\`):
|
|
37937
|
+
\`\`\`javascript
|
|
37938
|
+
async function() {
|
|
37939
|
+
const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products?apiView=SDK";
|
|
37940
|
+
|
|
37941
|
+
const schema = await getResourceSchemaByUrl(methodUrl);
|
|
37942
|
+
const method = schema.methods.find(method => method.docsUrl === methodUrl.replace(/\\?.*$/, ""));
|
|
37943
|
+
if (!method) return { message: "No exact method URL match", methods: schema.methods.map(m => ({ title: m.summary, docsUrl: m.docsUrl, sdk: m.sdk && m.sdk.method })) };
|
|
37944
|
+
if (!method.sdk) return { message: "The SDK docs do not list this method; use the REST call.", publicUrl: method.publicUrl, requestBody: method.requestBody };
|
|
37945
|
+
|
|
37946
|
+
const { sdk } = method;
|
|
37947
|
+
const types = schema.components.schemas;
|
|
37948
|
+
// Each positional parameter, typed. The parameters body is pre-expanded for a method URL;
|
|
37949
|
+
// any remaining { $circular: name } resolves against types[name].
|
|
37950
|
+
const paramsSchema = sdk.requestBody?.content?.["application/json"]?.schema ?? {};
|
|
37951
|
+
const parameters = sdk.signature.map(name => ({
|
|
37952
|
+
name,
|
|
37953
|
+
required: (paramsSchema.required ?? []).includes(name),
|
|
37954
|
+
schema: paramsSchema.properties?.[name]
|
|
37955
|
+
}));
|
|
37956
|
+
|
|
37957
|
+
return {
|
|
37958
|
+
import: \`import { \${sdk.namespace} } from "\${sdk.package}";\`,
|
|
37959
|
+
call: \`\${sdk.namespace}.\${sdk.method}(\${sdk.signature.join(", ")})\`,
|
|
37960
|
+
parameters,
|
|
37961
|
+
returns: sdk.responses ?? method.responses,
|
|
37962
|
+
// Query methods: the same closed list of filterable/sortable fields applies to the SDK call.
|
|
37963
|
+
queryFieldsCapabilities: method.queryMethodData?.queryFieldsCapabilitiesMap,
|
|
37964
|
+
example: sdk.examples[0]
|
|
37965
|
+
};
|
|
37966
|
+
}
|
|
37967
|
+
\`\`\`
|
|
37968
|
+
|
|
37865
37969
|
Inspect one resource by resource docs URL:
|
|
37866
37970
|
\`\`\`javascript
|
|
37867
37971
|
async function() {
|
|
@@ -38066,11 +38170,18 @@ function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true)
|
|
|
38066
38170
|
Compose: put independent reads in one document as several root fields, and use related-entity fields (e.g. \`inventoryItems\`, \`collections\`, \`fulfillments\`) instead of extra round-trips. Select only the fields you need; every object field needs a selection set. Variables: use them for \`JSON\` scalars (filter, sort) and plain scalars (String, Int, ID), declared in the document (e.g. \`query Q($f: JSON) { ... filter: $f ... }\`). Write mutation inputs and any object that contains an enum INLINE as GraphQL literals with enum values unquoted (e.g. \`input: { product: { name: "Mug", productType: PHYSICAL } }\`) — this endpoint fails with 503 when an enum value arrives inside an object-typed variable. For lists page with \`cursorPaging\` or \`paging\` exactly as the input type declares (never the other one), and request \`pageInfo { hasNext total }\`; \`total\` is only populated with offset \`paging\`, so for a cursor-paged list count by walking pages or use a count operation.
|
|
38067
38171
|
Results: each root field fails independently — \`errors[].path\` names the failing field and \`errors[].extensions.message\` the cause (e.g. PERMISSION_DENIED); \`data\` still holds the fields that succeeded. Mutations return the created/updated entity — read the IDs from it and do not re-query to verify. Large results are truncated: narrow the selection or page size instead of re-running.
|
|
38068
38172
|
Set \`hasMutations: true\` for any document containing a mutation root field.
|
|
38173
|
+
`,
|
|
38174
|
+
DeployWebsite: dedent_default`
|
|
38175
|
+
The user — or you, earlier in this conversation — ALREADY HAVE a finished page or site, in any form, and it should be live on Wix: HTML/CSS/JS files, a static build (dist/, out/), a zip, another AI builder's export, or a page/design you created in this conversation (export it to HTML first — a finished design IS a finished page). Call this when the user says deploy, host, publish, put online, make it live, get a URL, or upload my site / index.html.
|
|
38176
|
+
Also for updating a site deployed this way (replace its files; same site, same URL) and for implementing a backend on one (stores, bookings, CMS, members) as a Wix Headless project — same site, same URL. Works with or without a Wix login (anonymous deploy with a save link), through the Wix MCP alone or from a shell.
|
|
38177
|
+
Missing real functionality — a fake checkout, a form that goes nowhere, bookings — is NOT a reason to rebuild the site with a site-creation tool: deploy the page as is, then add the backend afterwards (the recipe covers it).
|
|
38178
|
+
Returns the full recipe; follow it and run the flow yourself. The drop page is only the fallback when you can't.
|
|
38179
|
+
NOT for: a screenshot, mockup or reference image of a site the user WANTS (nothing exists to deploy yet — that is site creation: WixSiteBuilder / templates); a Claude Design share URL (import-claude-design-from-url); migrating a live site by URL or CSV exports; adding HTML or code into an existing Wix site; uploading images or documents to a site's media (UploadImageToWixSite).
|
|
38069
38180
|
`,
|
|
38070
38181
|
CreateWixBusinessGuide: dedent_default`
|
|
38071
38182
|
Provides comprehensive documentation for creating a new Wix business (site, app, etc.).
|
|
38072
38183
|
Call this ONLY when the user explicitly asks for a headless site, a Wix Classic Editor site, or manual/advanced account/API-based site creation — these don't need the site's purpose first. For normal site-creation ${SITE_CREATION_COPY.normalCreationRoute.nonWidget}; for a specific template id, call \`CreateSiteFromTemplate\`.
|
|
38073
|
-
Exception, even when the user says "headless": if
|
|
38184
|
+
Exception, even when the user says "headless": if a finished page or site already exists in any form (their own HTML/CSS/JS, a static build, a zip, an AI-builder export, a page you made in this conversation) and they want it hosted, don't call this tool — call DeployWebsite, which returns the recipe to publish the files yourself. This guide's CLI flow is for BUILDING a headless frontend, not for hosting ready-made files.
|
|
38074
38185
|
|
|
38075
38186
|
## What This Tool Contains
|
|
38076
38187
|
|
|
@@ -38798,7 +38909,7 @@ var paramDescriptions = {
|
|
|
38798
38909
|
reason: "One sentence describing the original user request and the task you are trying to accomplish with this search."
|
|
38799
38910
|
},
|
|
38800
38911
|
ReadFullDocsArticle: {
|
|
38801
|
-
articleUrl: "The URL of the docs article or method article to fetch. Should be something like https://dev.wix.com/docs/.../... For REST docs, use the URL as-is. For SDK docs, the URL SHOULD include the query param ?apiView=SDK (e.g. https://dev.wix.com/docs/...?apiView=SDK)."
|
|
38912
|
+
articleUrl: "The URL of the docs article or method article to fetch. Should be something like https://dev.wix.com/docs/.../... For REST docs, use the URL as-is. For SDK docs, the URL SHOULD include the query param ?apiView=SDK (e.g. https://dev.wix.com/docs/...?apiView=SDK). Wix skills pages (https://www.wix.com/skills/..., https://dev.wix.com/docs/skills/...) are read as-is, including their referenced files."
|
|
38802
38913
|
},
|
|
38803
38914
|
ReadFullDocsMethodSchema: {
|
|
38804
38915
|
articleUrl: "The URL of the documentation to fetch. Should be something like https://dev.wix.com/docs/.../... For REST docs, use the URL as-is. For SDK docs, the URL SHOULD include the query param ?apiView=SDK (e.g. https://dev.wix.com/docs/...?apiView=SDK).",
|
|
@@ -39217,6 +39328,59 @@ ${articleContent}${nextSteps}`;
|
|
|
39217
39328
|
);
|
|
39218
39329
|
}
|
|
39219
39330
|
|
|
39331
|
+
// src/docs/deploy-website.ts
|
|
39332
|
+
var DEPLOY_WEBSITE_TOOL_NAME = "DeployWebsite";
|
|
39333
|
+
var DEPLOY_WEBSITE_RECIPE_URL = "https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md";
|
|
39334
|
+
var DROP_PAGE_URL = "https://www.wix.com/headless/drop?utm_campaign=mcp";
|
|
39335
|
+
var FALLBACK_LINE = `Only if you cannot run it (you can't reach the file bytes, or a step fails and you can't fix it): send the user to ${DROP_PAGE_URL} \u2014 give that URL exactly as written, keeping the utm_campaign=mcp parameter.`;
|
|
39336
|
+
function deployWebsiteResponse(recipe) {
|
|
39337
|
+
return [
|
|
39338
|
+
`The following is the content of ${DEPLOY_WEBSITE_RECIPE_URL}. Follow it end to end and do the publishing yourself \u2014 do not hand the user instructions.`,
|
|
39339
|
+
FALLBACK_LINE,
|
|
39340
|
+
"---",
|
|
39341
|
+
recipe.trim()
|
|
39342
|
+
].join("\n\n");
|
|
39343
|
+
}
|
|
39344
|
+
var DEPLOY_WEBSITE_POINTER_RESPONSE = [
|
|
39345
|
+
`Read and follow this recipe end to end: ${DEPLOY_WEBSITE_RECIPE_URL}`,
|
|
39346
|
+
"It covers creating the site and uploading the files (with or without a Wix login), updating a site deployed this way, and implementing a backend on it (stores, bookings, CMS, members) as a Wix Headless project. Do the publishing yourself \u2014 do not hand the user instructions.",
|
|
39347
|
+
FALLBACK_LINE
|
|
39348
|
+
].join("\n\n");
|
|
39349
|
+
function addDeployWebsiteTool(server, disableTools = [], toolDescriptions, fetchOptions = {}) {
|
|
39350
|
+
if (disableTools.includes(DEPLOY_WEBSITE_TOOL_NAME)) {
|
|
39351
|
+
return;
|
|
39352
|
+
}
|
|
39353
|
+
server.tool(
|
|
39354
|
+
DEPLOY_WEBSITE_TOOL_NAME,
|
|
39355
|
+
toolDescriptions?.[DEPLOY_WEBSITE_TOOL_NAME] ?? defaultToolDescriptions[DEPLOY_WEBSITE_TOOL_NAME],
|
|
39356
|
+
{},
|
|
39357
|
+
{ readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
39358
|
+
async (_args, { httpClient: httpClient6 }) => {
|
|
39359
|
+
let text = DEPLOY_WEBSITE_POINTER_RESPONSE;
|
|
39360
|
+
try {
|
|
39361
|
+
const recipe = await fetchArticleContent(
|
|
39362
|
+
httpClient6,
|
|
39363
|
+
DEPLOY_WEBSITE_RECIPE_URL.replace(/\.md$/, ""),
|
|
39364
|
+
"article",
|
|
39365
|
+
true,
|
|
39366
|
+
fetchOptions.skillsPortalUrl,
|
|
39367
|
+
fetchOptions.repo,
|
|
39368
|
+
fetchOptions.commitHash
|
|
39369
|
+
);
|
|
39370
|
+
if (recipe && recipe.trim()) {
|
|
39371
|
+
text = deployWebsiteResponse(recipe);
|
|
39372
|
+
}
|
|
39373
|
+
} catch (error2) {
|
|
39374
|
+
console.warn(
|
|
39375
|
+
`[DeployWebsite] recipe fetch failed, returning the pointer:`,
|
|
39376
|
+
error2 instanceof Error ? error2.message : error2
|
|
39377
|
+
);
|
|
39378
|
+
}
|
|
39379
|
+
return { content: [{ type: "text", text }] };
|
|
39380
|
+
}
|
|
39381
|
+
);
|
|
39382
|
+
}
|
|
39383
|
+
|
|
39220
39384
|
// src/docs/docs.ts
|
|
39221
39385
|
var VALID_DOCS_TOOLS = [
|
|
39222
39386
|
"WDS",
|
|
@@ -39276,6 +39440,7 @@ var addDocsTools = (server, allowedTools = [
|
|
|
39276
39440
|
const {
|
|
39277
39441
|
getToKnowWixEnabled = false,
|
|
39278
39442
|
createWixBusinessGuideEnabled = true,
|
|
39443
|
+
deployWebsiteEnabled = true,
|
|
39279
39444
|
disableTools,
|
|
39280
39445
|
toolDescriptions,
|
|
39281
39446
|
readmeDocs,
|
|
@@ -39341,6 +39506,13 @@ var addDocsTools = (server, allowedTools = [
|
|
|
39341
39506
|
cliEnabled
|
|
39342
39507
|
);
|
|
39343
39508
|
}
|
|
39509
|
+
if (deployWebsiteEnabled) {
|
|
39510
|
+
addDeployWebsiteTool(server, disableTools || [], toolDescriptions, {
|
|
39511
|
+
skillsPortalUrl,
|
|
39512
|
+
repo: effectiveRepo,
|
|
39513
|
+
commitHash: effectiveCommitHash
|
|
39514
|
+
});
|
|
39515
|
+
}
|
|
39344
39516
|
if (allowedTools.includes("WDS") && !disableTools?.includes("SearchWixWDSDocumentation")) {
|
|
39345
39517
|
server.tool(
|
|
39346
39518
|
"SearchWixWDSDocumentation",
|
|
@@ -39857,18 +40029,19 @@ var addDocsTools = (server, allowedTools = [
|
|
|
39857
40029
|
async ({ articleUrl }, { httpClient: httpClient6 }) => {
|
|
39858
40030
|
const validPrefixes = ["https://dev.wix.com/docs/"];
|
|
39859
40031
|
if (skillsPortalUrl) validPrefixes.push(skillsPortalUrl);
|
|
39860
|
-
|
|
40032
|
+
const isSkillsPage = isSkillsRegistryUrl(articleUrl);
|
|
40033
|
+
if (!isSkillsPage && !validPrefixes.some((p2) => articleUrl.startsWith(p2))) {
|
|
39861
40034
|
return {
|
|
39862
40035
|
isError: true,
|
|
39863
40036
|
content: [
|
|
39864
40037
|
{
|
|
39865
40038
|
type: "text",
|
|
39866
|
-
text: `Invalid article URL: must start with https://dev.wix.com/docs
|
|
40039
|
+
text: `Invalid article URL: must start with https://dev.wix.com/docs/, or be a Wix skills page (https://www.wix.com/skills/...). Got: "${articleUrl}"`
|
|
39867
40040
|
}
|
|
39868
40041
|
]
|
|
39869
40042
|
};
|
|
39870
40043
|
}
|
|
39871
|
-
if (articleUrl.startsWith("https://dev.wix.com/docs/")) {
|
|
40044
|
+
if (!isSkillsPage && articleUrl.startsWith("https://dev.wix.com/docs/")) {
|
|
39872
40045
|
articleUrl = articleUrl.replace(/\.md$/, "");
|
|
39873
40046
|
}
|
|
39874
40047
|
try {
|
|
@@ -52062,12 +52235,12 @@ function addImportClaudeDesignTool(server, authStrategy, options) {
|
|
|
52062
52235
|
designUrl = new URL(args.url);
|
|
52063
52236
|
} catch {
|
|
52064
52237
|
return errorResult(
|
|
52065
|
-
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For site
|
|
52238
|
+
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool \u2014 call DeployWebsite, which returns the recipe to publish the files yourself. If that tool isn't available: read https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md and publish them yourself, or send the user to https://www.wix.com/headless/drop?utm_campaign=mcp."
|
|
52066
52239
|
);
|
|
52067
52240
|
}
|
|
52068
52241
|
if (designUrl.protocol !== "https:" || !designUrl.hostname.endsWith(CLAUDE_USER_CONTENT_HOST_SUFFIX)) {
|
|
52069
52242
|
return errorResult(
|
|
52070
|
-
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For site
|
|
52243
|
+
"Invalid design URL \u2014 this tool only accepts the claudeusercontent.com URL produced by Claude Design. For a page or site that exists in any other form (the user's files, a build, a zip, another builder's export, a page you made), do not retry this tool \u2014 call DeployWebsite, which returns the recipe to publish the files yourself. If that tool isn't available: read https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md and publish them yourself, or send the user to https://www.wix.com/headless/drop?utm_campaign=mcp."
|
|
52071
52244
|
);
|
|
52072
52245
|
}
|
|
52073
52246
|
const accountHeaders = await authStrategy.getAccountAuthHeaders();
|
|
@@ -53183,10 +53356,11 @@ function addExecuteTool(server, options) {
|
|
|
53183
53356
|
sourceDocUrls: external_exports.array(external_exports.string()).describe(d2.sourceDocUrls),
|
|
53184
53357
|
files: external_exports.string().optional().describe(
|
|
53185
53358
|
[
|
|
53186
|
-
"Optional bundle of raw file contents for uploads, so file bytes never go through the `code` JavaScript (no escaping, no string-literal/`${}`/backtick pitfalls).",
|
|
53187
|
-
"Format:
|
|
53188
|
-
'
|
|
53189
|
-
|
|
53359
|
+
"Optional bundle of raw file contents for uploads, so file bytes never go through the `code` JavaScript (no escaping, no string-literal/`${}`/backtick pitfalls). Never inline file contents in `code`.",
|
|
53360
|
+
"Format: sections delimited by a line `=== FILE: <path> ===` (text, raw) or `=== FILE: <path> base64 ===` (binary, base64); `<path>` is relative to the site root. Example:",
|
|
53361
|
+
'`=== FILE: index.html ===\\n<!doctype html><img src="logo.png">\\n=== FILE: assets/app.js ===\\nconsole.log(1)\\n=== FILE: logo.png base64 ===\\niVBORw0KGgo...`',
|
|
53362
|
+
'In `code` they are the `files` global (`{ path, content, encoding?: "base64" }[]`); `wix.multipart()` turns them into one binary-safe `multipart/form-data` body: `const mp = wix.multipart(); await wix.request({ scope: "account", method: "POST", url, headers: { "Content-Type": mp.contentType }, body: mp.body });`.',
|
|
53363
|
+
'Use base64 entries for small assets (icons, logos, fonts) and for files you downloaded and are re-uploading; large images/video go in by URL (`<img src="https://...">`), not in the bundle. A file containing a line exactly like the delimiter is not supported.'
|
|
53190
53364
|
].join(" ")
|
|
53191
53365
|
),
|
|
53192
53366
|
// Visitor mode takes an agent-supplied token and pins the site; account/site
|