@lacneu/wix-openclaw 0.5.1 → 0.6.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/CHANGELOG.md +79 -0
- package/README.md +89 -3
- package/dist/config.js +6 -0
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +93 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/analytics.d.ts +124 -0
- package/dist/tools/analytics.js +655 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/types.d.ts +2 -0
- package/openclaw.plugin.json +14 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,85 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.6.0] - 2026-08-30
|
|
11
|
+
|
|
12
|
+
Four analytics tools, off by default behind their own switch. The plugin could
|
|
13
|
+
correct a site's SEO, check it for accessibility issues, and say nothing about
|
|
14
|
+
whether anyone was visiting. This closes that.
|
|
15
|
+
|
|
16
|
+
Two very different surfaces sit behind it: a **discoverable** query surface,
|
|
17
|
+
where the models, measures and dimensions belong to the site and are read at
|
|
18
|
+
runtime rather than assumed, and the legacy site-wide counters with their two
|
|
19
|
+
hard bounds attached.
|
|
20
|
+
|
|
21
|
+
### Added — Analytics: a discoverable query surface, plus one legacy endpoint
|
|
22
|
+
|
|
23
|
+
> Off by default behind **its own** switch, `enableAnalyticsTools`. Nothing here
|
|
24
|
+
> writes to the site. The switch is separate because the family needs a
|
|
25
|
+
> permission of its own — `SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS`
|
|
26
|
+
> ("Site Analytics - read"), named by the reference on all four methods — which
|
|
27
|
+
> neither the SEO nor the accessibility scope grants. Note that
|
|
28
|
+
> `NO_ACCOUNT_IDENTITY` is **not** how a missing scope shows up: the reference
|
|
29
|
+
> classifies it as HTTP 401 / UNAUTHENTICATED, so the refusal sends the operator
|
|
30
|
+
> to the credentials first and names the scope as a separate prerequisite.
|
|
31
|
+
|
|
32
|
+
Four tools: `wix_analytics_list_semantic_models`,
|
|
33
|
+
`wix_analytics_get_semantic_model`, `wix_analytics_query_semantic_model` and
|
|
34
|
+
`wix_analytics_get_data`.
|
|
35
|
+
|
|
36
|
+
### A third kind of danger: the answer is shorter than the question
|
|
37
|
+
|
|
38
|
+
The SEO writes destroyed the previous value of what they wrote. The
|
|
39
|
+
accessibility scans could call an unchecked site clean. Here nothing is
|
|
40
|
+
destroyed and nothing is scanned — what goes wrong is quieter. Wix states it on
|
|
41
|
+
the `fields` parameter itself: a field whose `dependencies` are not also in the
|
|
42
|
+
query is **silently omitted from the results**. No error, no empty column; the
|
|
43
|
+
key is simply absent from the rows. A report can be missing an entire measure
|
|
44
|
+
and look finished.
|
|
45
|
+
|
|
46
|
+
So `wix_analytics_query_semantic_model` compares what was asked for against what
|
|
47
|
+
arrived, names every field that did not come back, and — by re-reading the
|
|
48
|
+
model's schema **only when something is missing** — says which dependency to
|
|
49
|
+
add. It refuses to blame the dependency rule when a dependency *was* present:
|
|
50
|
+
that case is reported as an incomplete result rather than explained away.
|
|
51
|
+
|
|
52
|
+
Two more of the same shape. A query returns at most 1000 rows and Wix's own
|
|
53
|
+
default page size is **50**, so the tool always sends an explicit limit — "did
|
|
54
|
+
this fill the page" is then an exact question rather than one asked against an
|
|
55
|
+
assumed default. It asks for **100** by default rather than Wix's ceiling,
|
|
56
|
+
because the whole response is serialised into the model's context and 1000 rows
|
|
57
|
+
across up to 60 fields would swamp it. A full page is reported as **possibly** truncated: exactly
|
|
58
|
+
`limit` rows may be the whole answer, and nothing in the response settles it, so
|
|
59
|
+
claiming it was cut short would be the same false certainty pointed the other
|
|
60
|
+
way. And an absent `totals` row is reported as "not requested", never as a zero.
|
|
61
|
+
|
|
62
|
+
### What the contract leaves open, the answer leaves open
|
|
63
|
+
|
|
64
|
+
Two conventions are simply not documented, and neither is guessed: whether the
|
|
65
|
+
semantic `interval` end bound is inclusive — Wix's own reference example ends a
|
|
66
|
+
period at `…T23:59:59.000Z` rather than at the next midnight — and what timezone
|
|
67
|
+
applies when none is passed. The query echoes the interval it sent and says the
|
|
68
|
+
day boundaries are unknown when the timezone was left out, instead of naming a
|
|
69
|
+
default nothing states.
|
|
70
|
+
|
|
71
|
+
### What the models expose belongs to the site, not to this plugin
|
|
72
|
+
|
|
73
|
+
Measures, dimensions and parameters are discovered through
|
|
74
|
+
`wix_analytics_get_semantic_model`. That includes the question everyone asks
|
|
75
|
+
first — whether a per-page or per-URL breakdown exists at all. Neither the code
|
|
76
|
+
nor the README answers it in either direction: run the tool against the site.
|
|
77
|
+
|
|
78
|
+
### The legacy counters, with their bounds attached
|
|
79
|
+
|
|
80
|
+
Six site-level measurement types and nothing per page. Wix keeps **62 days**,
|
|
81
|
+
and a `startDate` further back is refused with a *"Do not have data for this
|
|
82
|
+
start date"* message — prose, not an error code, so it is matched and turned
|
|
83
|
+
into a retention answer instead of reaching the caller as a broken query. And
|
|
84
|
+
`endDate` is **exclusive**: `2026-08-01 → 2026-08-08` covers the 1st through the
|
|
85
|
+
7th, so the tool reports the days it actually covered. An unknown measurement
|
|
86
|
+
type is refused with the whole set of six in the message, because a typo would
|
|
87
|
+
otherwise come back as an empty series that reads like "no activity".
|
|
88
|
+
|
|
10
89
|
## [0.5.1] - 2026-08-29
|
|
11
90
|
|
|
12
91
|
Two corrections to the accessibility family, both in the one thing it exists to
|
package/README.md
CHANGED
|
@@ -18,9 +18,10 @@
|
|
|
18
18
|
through the official Wix REST API. It registers **50 tools by default** across a
|
|
19
19
|
dozen Wix products (Blog, CMS Data, Forms, Bookings, Contacts, Events, Reviews,
|
|
20
20
|
FAQ, Multilingual, Sites, Site Media), plus a `wix_design_brief` helper that
|
|
21
|
-
turns loose textual briefs into structured markdown artefacts.
|
|
22
|
-
opt-in and add to that: SEO (`enableSeoTools`, 19 tools)
|
|
23
|
-
(`enableAccessibilityTools`, 6 tools)
|
|
21
|
+
turns loose textual briefs into structured markdown artefacts. Three families
|
|
22
|
+
are opt-in and add to that: SEO (`enableSeoTools`, 19 tools), accessibility
|
|
23
|
+
(`enableAccessibilityTools`, 6 tools) and analytics (`enableAnalyticsTools`,
|
|
24
|
+
4 tools) — **79 with all three**.
|
|
24
25
|
|
|
25
26
|
Every tool funnels through a single authenticated HTTP client that:
|
|
26
27
|
|
|
@@ -204,6 +205,18 @@ the target site:
|
|
|
204
205
|
`403` / `PERMISSION_DENIED` otherwise — which the tools surface as a
|
|
205
206
|
permission problem, never as an empty site.
|
|
206
207
|
|
|
208
|
+
- [ ] **Site Analytics - read** (`SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS`)
|
|
209
|
+
— **only if you set `enableAnalyticsTools: true`**, which registers four
|
|
210
|
+
read-only tools. The reference names this same scope on all four methods
|
|
211
|
+
(`ListSemanticModels`, `GetSemanticModel`, `QuerySemanticModelData` and
|
|
212
|
+
`GetAnalyticsData`), so one permission covers the whole family and grants
|
|
213
|
+
nothing but reading. Note what `NO_ACCOUNT_IDENTITY` does and does not mean:
|
|
214
|
+
the reference classifies it as **HTTP 401 / UNAUTHENTICATED** — "the caller
|
|
215
|
+
isn't authenticated" — so it points at the credentials, not at this scope,
|
|
216
|
+
and it is never evidence of a site with no traffic. The separate
|
|
217
|
+
`SCOPE.DC-ANALYTICS-AND-REPORTS.MANAGE-SESSIONS` scope covers the Sessions
|
|
218
|
+
API, which this plugin deliberately does not expose.
|
|
219
|
+
|
|
207
220
|
- [ ] **Pricing Plans** — if you sell subscription packages
|
|
208
221
|
- [ ] **Wix Stores** + **Wix eCommerce** — if you sell physical/digital
|
|
209
222
|
products. Without these, the `wix_*` tools that touch e-commerce
|
|
@@ -256,6 +269,7 @@ columns and remove the matching tools from your agent's allow-list.
|
|
|
256
269
|
| `wix_multilingual_*` | Multilingual Translation Schema Read | Translation reads |
|
|
257
270
|
| `wix_seo_*` (all nineteen) | Manage SEO (`SCOPE.PROMOTE.MANAGE-SEO`) | SEO audit **and** redirect changes — Wix has no read-only SEO scope, so this one permission covers both |
|
|
258
271
|
| `wix_a11y_*` (all six) | Manage Accessibility Scans (identifier not published — read it off the Wix permissions page) | Starting a scan. Reading collections or stored results does not imply it |
|
|
272
|
+
| `wix_analytics_*` (all four) | Site Analytics - read (`SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS`) | Reading analytics. `NO_ACCOUNT_IDENTITY` is a 401 about the credentials, not about this scope — and never an empty site |
|
|
259
273
|
| `wix_design_brief` | _(none — no API call)_ | Always |
|
|
260
274
|
|
|
261
275
|
### Wix app installation requirements
|
|
@@ -639,6 +653,78 @@ its latest saved version — the opposite way round from the SEO tag reads above
|
|
|
639
653
|
|
|
640
654
|
---
|
|
641
655
|
|
|
656
|
+
### Analytics
|
|
657
|
+
|
|
658
|
+
> **OFF by default, behind its own switch.** Nothing here writes to the site.
|
|
659
|
+
> The switch is separate because the family needs a permission of its own —
|
|
660
|
+
> `SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS`, which the SEO and
|
|
661
|
+
> accessibility scopes do not grant — so an install that opted into either of
|
|
662
|
+
> those has decided nothing here. Set `enableAnalyticsTools: true` to opt in.
|
|
663
|
+
> _Contract read from the public Introductions and from the published SDK
|
|
664
|
+
> packages `@wix/auto_sdk_analytics-semantic-model_analytics-semantic-model`
|
|
665
|
+
> and `@wix/auto_sdk_analytics-data_analytics-data`, whose host mappings give
|
|
666
|
+
> the REST prefixes `/analytics/semantic-model/v3/semantic-models` and
|
|
667
|
+
> `/analytics-ng/v2/site-analytics/data` verbatim — verified 2026-08-29._
|
|
668
|
+
|
|
669
|
+
| Tool | What it does | Approval | Validated |
|
|
670
|
+
|---|---|---|---|
|
|
671
|
+
| `wix_analytics_list_semantic_models` | The analytics subject areas this site exposes | — | schema |
|
|
672
|
+
| `wix_analytics_get_semantic_model` | One model's schema: measures, dimensions, parameters, and each field's `dependencies` | — | schema |
|
|
673
|
+
| `wix_analytics_query_semantic_model` | Query a model over an interval; reports every requested field that did not come back | — | schema |
|
|
674
|
+
| `wix_analytics_get_data` | The six legacy site-wide counters over a date range | — | schema |
|
|
675
|
+
|
|
676
|
+
**The answer can be shorter than the question.** Wix states it on the `fields`
|
|
677
|
+
parameter itself: a field whose `dependencies` are not also in the query is
|
|
678
|
+
**silently omitted from the results**. No error, no empty column — the key is
|
|
679
|
+
simply absent from the rows, so a report can be missing an entire measure and
|
|
680
|
+
look finished. `wix_analytics_query_semantic_model` therefore compares what was
|
|
681
|
+
asked for against what arrived, names every field that did not come back, and —
|
|
682
|
+
by re-reading the model's schema only when something is missing — says which
|
|
683
|
+
dependency to add.
|
|
684
|
+
|
|
685
|
+
**What the models expose is a property of the site, not of this plugin.**
|
|
686
|
+
Measures, dimensions and parameters are discovered through
|
|
687
|
+
`wix_analytics_get_semantic_model`. That includes the question people ask first:
|
|
688
|
+
whether a per-page or per-URL dimension exists at all. This README does not
|
|
689
|
+
answer it in either direction — run the tool against the site and read the
|
|
690
|
+
schema.
|
|
691
|
+
|
|
692
|
+
**The legacy counters are site-level, and short-lived.** Six measurement types
|
|
693
|
+
(`TOTAL_SESSIONS`, `TOTAL_UNIQUE_VISITORS`, `TOTAL_ORDERS`, `TOTAL_SALES`,
|
|
694
|
+
`TOTAL_FORMS_SUBMITTED`, `CLICKS_TO_CONTACT`), no per-page breakdown, and Wix
|
|
695
|
+
keeps **62 days**: a `startDate` more than 61 days back is refused with a
|
|
696
|
+
*"Do not have data for this start date"* message — a retention limit, not an
|
|
697
|
+
empty site. `endDate` is **exclusive**, so the tool reports the days it actually
|
|
698
|
+
covered rather than leaving an off-by-one to be discovered later.
|
|
699
|
+
|
|
700
|
+
**A bound this lot does not resolve.** These calls go out site-scoped, so the
|
|
701
|
+
client sends `wix-site-id` — which is what the site whitelist is enforced on —
|
|
702
|
+
and not `wix-account-id`. The error is named `NO_ACCOUNT_IDENTITY`, so it is
|
|
703
|
+
possible that some of these endpoints want the account header instead; switching
|
|
704
|
+
would remove the whitelist from this family on nothing better than an error
|
|
705
|
+
name, while the reference calls the scope "Site Analytics" and classifies the
|
|
706
|
+
error as a credentials 401. If a live call with a valid, correctly scoped key
|
|
707
|
+
still answers `NO_ACCOUNT_IDENTITY`, that settles it. **That experiment has not
|
|
708
|
+
been run.**
|
|
709
|
+
|
|
710
|
+
**A query returns at most 1000 rows, and Wix's own default page size is 50.**
|
|
711
|
+
The tool always sends an explicit limit, so "did this fill the page" is an exact
|
|
712
|
+
question rather than one asked against an assumed default — and it defaults to
|
|
713
|
+
**100**, not to Wix's ceiling: the whole response is serialised into the model's
|
|
714
|
+
context, where 1000 rows across up to 60 fields would swamp it. Raise `limit`
|
|
715
|
+
deliberately when you need more. A full page is
|
|
716
|
+
reported as **possibly** truncated — exactly `limit` rows may be the whole
|
|
717
|
+
answer, and nothing in the response settles it — so the caveat says to page
|
|
718
|
+
before summing rather than asserting the result was cut short.
|
|
719
|
+
|
|
720
|
+
**Two conventions the contract does not state**, both surfaced rather than
|
|
721
|
+
guessed: whether the semantic `interval` end bound is inclusive (Wix's own
|
|
722
|
+
reference example ends a period at `…T23:59:59.000Z` rather than at the next
|
|
723
|
+
midnight), and what timezone applies when none is passed. The query echoes the
|
|
724
|
+
interval it sent and says plainly when the timezone was left unset.
|
|
725
|
+
|
|
726
|
+
---
|
|
727
|
+
|
|
642
728
|
### Design
|
|
643
729
|
|
|
644
730
|
| Tool | What it does | Approval | Validated |
|
package/dist/config.js
CHANGED
|
@@ -79,6 +79,12 @@ export function resolveConfig(cfg = {}) {
|
|
|
79
79
|
// decided anything about this, and folding the two together would enable a
|
|
80
80
|
// family of calls that would only fail with 403.
|
|
81
81
|
enableAccessibilityTools: cfg.enableAccessibilityTools === true,
|
|
82
|
+
// A THIRD SWITCH, for the same reason as the second: its own permission.
|
|
83
|
+
// All four methods require SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS,
|
|
84
|
+
// which neither the SEO nor the accessibility scope grants — so an install
|
|
85
|
+
// that opted into either has decided nothing here, and would get a family
|
|
86
|
+
// of calls that can only answer NO_ACCOUNT_IDENTITY.
|
|
87
|
+
enableAnalyticsTools: cfg.enableAnalyticsTools === true,
|
|
82
88
|
apiKey,
|
|
83
89
|
accountId,
|
|
84
90
|
allowedSiteIds,
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,EAAE;AACF,2EAA2E;AAC3E,6DAA6D;AAQ7D;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAI,KAAQ;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,IAAY,EAAE,EAAE;QACvD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC,CAAiB,CAAC;AACrB,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,wBAAwB;IACxB,oBAAoB;IACpB,uBAAuB;IACvB,sBAAsB;IACtB,qBAAqB;IACrB,yBAAyB;IACzB,qBAAqB;IACrB,sBAAsB;IACtB,yBAAyB;IACzB,sEAAsE;IACtE,6EAA6E;IAC7E,2EAA2E;IAC3E,6EAA6E;IAC7E,6DAA6D;IAC7D,yBAAyB;IACzB,yBAAyB;IACzB,+BAA+B;IAC/B,+BAA+B;IAC/B,uEAAuE;IACvE,wEAAwE;IACxE,uBAAuB;IACvB,4BAA4B;IAC5B,yBAAyB;IACzB,uBAAuB;IACvB,qBAAqB;IACrB,wBAAwB;IACxB,uBAAuB;CACxB,CAAC;AAEF,MAAM,gBAAgB,GAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,C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,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9E,MAAM,eAAe,GAAG,UAAU,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;IAC5D,MAAM,aAAa,GACjB,eAAe,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAE/C,MAAM,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,IAAI,yBAAyB,CAAC;IAE3E,MAAM,QAAQ,GAAgB,gBAAgB,CAAC,QAAQ,CACrD,GAAG,CAAC,QAAuB,CAC5B;QACC,CAAC,CAAE,GAAG,CAAC,QAAwB;QAC/B,CAAC,CAAC,MAAM,CAAC;IAEX,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,OAAO,KAAK,KAAK;QAC9B,sEAAsE;QACtE,mEAAmE;QACnE,sEAAsE;QACtE,0EAA0E;QAC1E,0EAA0E;QAC1E,cAAc,EAAE,GAAG,CAAC,cAAc,KAAK,IAAI;QAC3C,wEAAwE;QACxE,yEAAyE;QACzE,0EAA0E;QAC1E,2EAA2E;QAC3E,iDAAiD;QACjD,wBAAwB,EAAE,GAAG,CAAC,wBAAwB,KAAK,IAAI;QAC/D,yEAAyE;QACzE,+EAA+E;QAC/E,2EAA2E;QAC3E,0EAA0E;QAC1E,qDAAqD;QACrD,oBAAoB,EAAE,GAAG,CAAC,oBAAoB,KAAK,IAAI;QACvD,MAAM;QACN,SAAS;QACT,cAAc;QACd,aAAa;QACb,gBAAgB,EAAE,IAAI,GAAG,CAAC,gBAAgB,CAAC;QAC3C,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export type { ResolvedWixConfig, WixPluginConfig, WixRequestOptions, } from "./t
|
|
|
19
19
|
export declare function buildAllTools(client: WixClient, options?: {
|
|
20
20
|
seo?: boolean;
|
|
21
21
|
accessibility?: boolean;
|
|
22
|
+
analytics?: boolean;
|
|
22
23
|
}): ({
|
|
23
24
|
name: string;
|
|
24
25
|
description: string;
|
|
@@ -1677,6 +1678,98 @@ export declare function buildAllTools(client: WixClient, options?: {
|
|
|
1677
1678
|
data?: unknown;
|
|
1678
1679
|
error?: string;
|
|
1679
1680
|
}>>;
|
|
1681
|
+
} | {
|
|
1682
|
+
name: string;
|
|
1683
|
+
description: string;
|
|
1684
|
+
label: string;
|
|
1685
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
1686
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1687
|
+
semanticModelId: import("@sinclair/typebox").TString;
|
|
1688
|
+
}>;
|
|
1689
|
+
execute: (toolCallId: string, params: {
|
|
1690
|
+
siteId?: string | undefined;
|
|
1691
|
+
semanticModelId: string;
|
|
1692
|
+
}, signal?: AbortSignal) => Promise<import("./tools/_factory.js").WixToolResult<{
|
|
1693
|
+
status: "ok" | "failed";
|
|
1694
|
+
data?: unknown;
|
|
1695
|
+
error?: string;
|
|
1696
|
+
}>>;
|
|
1697
|
+
} | {
|
|
1698
|
+
name: string;
|
|
1699
|
+
description: string;
|
|
1700
|
+
label: string;
|
|
1701
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
1702
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1703
|
+
semanticModelId: import("@sinclair/typebox").TString;
|
|
1704
|
+
fields: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
1705
|
+
start: import("@sinclair/typebox").TString;
|
|
1706
|
+
end: import("@sinclair/typebox").TString;
|
|
1707
|
+
timezone: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1708
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
1709
|
+
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
1710
|
+
totalsIncluded: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
1711
|
+
sort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
1712
|
+
fieldName: import("@sinclair/typebox").TString;
|
|
1713
|
+
order: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ASC">, import("@sinclair/typebox").TLiteral<"DESC">]>>;
|
|
1714
|
+
nullsLast: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
1715
|
+
}>>;
|
|
1716
|
+
filters: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
1717
|
+
field: import("@sinclair/typebox").TString;
|
|
1718
|
+
values: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
1719
|
+
condition: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"EQUAL">, import("@sinclair/typebox").TLiteral<"GREATER_THAN">, import("@sinclair/typebox").TLiteral<"GREATER_THAN_OR_EQUAL">, import("@sinclair/typebox").TLiteral<"LESS_THAN">, import("@sinclair/typebox").TLiteral<"LESS_THAN_OR_EQUAL">, import("@sinclair/typebox").TLiteral<"NULL">, import("@sinclair/typebox").TLiteral<"EMPTY">, import("@sinclair/typebox").TLiteral<"START_WITH">, import("@sinclair/typebox").TLiteral<"END_WITH">, import("@sinclair/typebox").TLiteral<"CONTAINS_ANY">, import("@sinclair/typebox").TLiteral<"CONTAINS_ALL">, import("@sinclair/typebox").TLiteral<"RANGE_II">, import("@sinclair/typebox").TLiteral<"RANGE_IE">, import("@sinclair/typebox").TLiteral<"RANGE_EI">, import("@sinclair/typebox").TLiteral<"RANGE_EE">]>>;
|
|
1720
|
+
prefix: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"IS">, import("@sinclair/typebox").TLiteral<"NOT">]>>;
|
|
1721
|
+
}>>>;
|
|
1722
|
+
formattingEnabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
1723
|
+
}>;
|
|
1724
|
+
execute: (toolCallId: string, params: {
|
|
1725
|
+
sort?: {
|
|
1726
|
+
order?: "ASC" | "DESC" | undefined;
|
|
1727
|
+
nullsLast?: boolean | undefined;
|
|
1728
|
+
fieldName: string;
|
|
1729
|
+
} | undefined;
|
|
1730
|
+
siteId?: string | undefined;
|
|
1731
|
+
limit?: number | undefined;
|
|
1732
|
+
offset?: number | undefined;
|
|
1733
|
+
timezone?: string | undefined;
|
|
1734
|
+
totalsIncluded?: boolean | undefined;
|
|
1735
|
+
filters?: {
|
|
1736
|
+
condition?: "EQUAL" | "GREATER_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN" | "LESS_THAN_OR_EQUAL" | "NULL" | "EMPTY" | "START_WITH" | "END_WITH" | "CONTAINS_ANY" | "CONTAINS_ALL" | "RANGE_II" | "RANGE_IE" | "RANGE_EI" | "RANGE_EE" | undefined;
|
|
1737
|
+
prefix?: "IS" | "NOT" | undefined;
|
|
1738
|
+
values: string[];
|
|
1739
|
+
field: string;
|
|
1740
|
+
}[] | undefined;
|
|
1741
|
+
formattingEnabled?: boolean | undefined;
|
|
1742
|
+
fields: string[];
|
|
1743
|
+
semanticModelId: string;
|
|
1744
|
+
start: string;
|
|
1745
|
+
end: string;
|
|
1746
|
+
}, signal?: AbortSignal) => Promise<import("./tools/_factory.js").WixToolResult<{
|
|
1747
|
+
status: "ok" | "failed";
|
|
1748
|
+
data?: unknown;
|
|
1749
|
+
error?: string;
|
|
1750
|
+
}>>;
|
|
1751
|
+
} | {
|
|
1752
|
+
name: string;
|
|
1753
|
+
description: string;
|
|
1754
|
+
label: string;
|
|
1755
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
1756
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1757
|
+
startDate: import("@sinclair/typebox").TString;
|
|
1758
|
+
endDate: import("@sinclair/typebox").TString;
|
|
1759
|
+
measurementTypes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
1760
|
+
timeZone: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1761
|
+
}>;
|
|
1762
|
+
execute: (toolCallId: string, params: {
|
|
1763
|
+
siteId?: string | undefined;
|
|
1764
|
+
timeZone?: string | undefined;
|
|
1765
|
+
startDate: string;
|
|
1766
|
+
endDate: string;
|
|
1767
|
+
measurementTypes: string[];
|
|
1768
|
+
}, signal?: AbortSignal) => Promise<import("./tools/_factory.js").WixToolResult<{
|
|
1769
|
+
status: "ok" | "failed";
|
|
1770
|
+
data?: unknown;
|
|
1771
|
+
error?: string;
|
|
1772
|
+
}>>;
|
|
1680
1773
|
} | {
|
|
1681
1774
|
name: string;
|
|
1682
1775
|
description: string;
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ import { buildMultilingualTools } from "./tools/multilingual.js";
|
|
|
31
31
|
import { buildReviewsTools } from "./tools/reviews.js";
|
|
32
32
|
import { buildSeoTools } from "./tools/seo.js";
|
|
33
33
|
import { buildAccessibilityTools } from "./tools/accessibility.js";
|
|
34
|
+
import { buildAnalyticsTools } from "./tools/analytics.js";
|
|
34
35
|
import { buildSiteTools } from "./tools/site.js";
|
|
35
36
|
import { WixClient } from "./wix-client.js";
|
|
36
37
|
// Re-export helpers so tests can pull them without re-importing every
|
|
@@ -70,6 +71,9 @@ export function buildAllTools(client, options = {}) {
|
|
|
70
71
|
// exists because starting a scan needs a permission of its own, and
|
|
71
72
|
// because the endpoints may change without notice.
|
|
72
73
|
...(options.accessibility === true ? buildAccessibilityTools(client) : []),
|
|
74
|
+
// Read-only too, and behind its own switch: these endpoints want an
|
|
75
|
+
// account-level identity, not a site-scoped one.
|
|
76
|
+
...(options.analytics === true ? buildAnalyticsTools(client) : []),
|
|
73
77
|
...buildDesignTools(client),
|
|
74
78
|
];
|
|
75
79
|
}
|
|
@@ -95,6 +99,7 @@ export function registerWixPlugin(api) {
|
|
|
95
99
|
const allTools = buildAllTools(client, {
|
|
96
100
|
seo: config.enableSeoTools,
|
|
97
101
|
accessibility: config.enableAccessibilityTools,
|
|
102
|
+
analytics: config.enableAnalyticsTools,
|
|
98
103
|
});
|
|
99
104
|
if (!config.enableAccessibilityTools) {
|
|
100
105
|
api.logger.info("wix-openclaw: accessibility tools not registered — the Wix Accessibility " +
|
|
@@ -102,6 +107,11 @@ export function registerWixPlugin(api) {
|
|
|
102
107
|
"Wix `Manage Accessibility Scans` permission. Set " +
|
|
103
108
|
"config.enableAccessibilityTools to true to opt in.");
|
|
104
109
|
}
|
|
110
|
+
if (!config.enableAnalyticsTools) {
|
|
111
|
+
api.logger.info("wix-openclaw: analytics tools not registered — these endpoints need an " +
|
|
112
|
+
"account-level Wix identity. Set config.enableAnalyticsTools to true " +
|
|
113
|
+
"to opt in.");
|
|
114
|
+
}
|
|
105
115
|
if (!config.enableSeoTools) {
|
|
106
116
|
api.logger.info("wix-openclaw: SEO tools not registered — the Wix SEO endpoints are in " +
|
|
107
117
|
"Developer Preview and may change without notice. Set " +
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AACF,wEAAwE;AACxE,0EAA0E;AAC1E,6BAA6B;AAC7B,EAAE;AACF,kBAAkB;AAClB,kEAAkE;AAClE,mEAAmE;AACnE,uEAAuE;AACvE,+CAA+C;AAC/C,kEAAkE;AAClE,sEAAsE;AACtE,+CAA+C;AAC/C,kEAAkE;AAClE,sEAAsE;AACtE,8BAA8B;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,O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EAA6E;AAC7E,0EAA0E;AAC1E,kCAAkC;AAClC,MAAM,SAAS,GAAyC,iBAAiB,CAAC;IACxE,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,KAAK;IACX,WAAW,EACT,qLAAqL;IACvL,QAAQ,CAAC,GAAG;QACV,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { type WixClient } from "../wix-client.js";
|
|
2
|
+
export declare function buildAnalyticsTools(client: WixClient): ({
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
label: string;
|
|
6
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
7
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
|
+
}>;
|
|
9
|
+
execute: (toolCallId: string, params: {
|
|
10
|
+
siteId?: string | undefined;
|
|
11
|
+
}, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
|
|
12
|
+
status: "ok" | "failed";
|
|
13
|
+
data?: unknown;
|
|
14
|
+
error
|
|
15
|
+
/** An abort is not a failed read. Swallowed by a general `catch`, a cancelled
|
|
16
|
+
* call carried on and answered `ok` with a generic explanation — the caller
|
|
17
|
+
* had already given up, and got an answer that looked like a result. */
|
|
18
|
+
?: string;
|
|
19
|
+
}>>;
|
|
20
|
+
} | {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
label: string;
|
|
24
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
25
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
26
|
+
semanticModelId: import("@sinclair/typebox").TString;
|
|
27
|
+
}>;
|
|
28
|
+
execute: (toolCallId: string, params: {
|
|
29
|
+
siteId?: string | undefined;
|
|
30
|
+
semanticModelId: string;
|
|
31
|
+
}, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
|
|
32
|
+
status: "ok" | "failed";
|
|
33
|
+
data?: unknown;
|
|
34
|
+
error
|
|
35
|
+
/** An abort is not a failed read. Swallowed by a general `catch`, a cancelled
|
|
36
|
+
* call carried on and answered `ok` with a generic explanation — the caller
|
|
37
|
+
* had already given up, and got an answer that looked like a result. */
|
|
38
|
+
?: string;
|
|
39
|
+
}>>;
|
|
40
|
+
} | {
|
|
41
|
+
name: string;
|
|
42
|
+
description: string;
|
|
43
|
+
label: string;
|
|
44
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
45
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
46
|
+
semanticModelId: import("@sinclair/typebox").TString;
|
|
47
|
+
fields: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
48
|
+
start: import("@sinclair/typebox").TString;
|
|
49
|
+
end: import("@sinclair/typebox").TString;
|
|
50
|
+
timezone: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
51
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
52
|
+
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
53
|
+
totalsIncluded: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
54
|
+
sort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
55
|
+
fieldName: import("@sinclair/typebox").TString;
|
|
56
|
+
order: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ASC">, import("@sinclair/typebox").TLiteral<"DESC">]>>;
|
|
57
|
+
nullsLast: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
58
|
+
}>>;
|
|
59
|
+
filters: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
60
|
+
field: import("@sinclair/typebox").TString;
|
|
61
|
+
values: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
62
|
+
condition: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"EQUAL">, import("@sinclair/typebox").TLiteral<"GREATER_THAN">, import("@sinclair/typebox").TLiteral<"GREATER_THAN_OR_EQUAL">, import("@sinclair/typebox").TLiteral<"LESS_THAN">, import("@sinclair/typebox").TLiteral<"LESS_THAN_OR_EQUAL">, import("@sinclair/typebox").TLiteral<"NULL">, import("@sinclair/typebox").TLiteral<"EMPTY">, import("@sinclair/typebox").TLiteral<"START_WITH">, import("@sinclair/typebox").TLiteral<"END_WITH">, import("@sinclair/typebox").TLiteral<"CONTAINS_ANY">, import("@sinclair/typebox").TLiteral<"CONTAINS_ALL">, import("@sinclair/typebox").TLiteral<"RANGE_II">, import("@sinclair/typebox").TLiteral<"RANGE_IE">, import("@sinclair/typebox").TLiteral<"RANGE_EI">, import("@sinclair/typebox").TLiteral<"RANGE_EE">]>>;
|
|
63
|
+
prefix: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"IS">, import("@sinclair/typebox").TLiteral<"NOT">]>>;
|
|
64
|
+
}>>>;
|
|
65
|
+
formattingEnabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
66
|
+
}>;
|
|
67
|
+
execute: (toolCallId: string, params: {
|
|
68
|
+
sort?: {
|
|
69
|
+
order?: "ASC" | "DESC" | undefined;
|
|
70
|
+
nullsLast?: boolean | undefined;
|
|
71
|
+
fieldName: string;
|
|
72
|
+
} | undefined;
|
|
73
|
+
siteId?: string | undefined;
|
|
74
|
+
limit?: number | undefined;
|
|
75
|
+
offset?: number | undefined;
|
|
76
|
+
timezone?: string | undefined;
|
|
77
|
+
totalsIncluded?: boolean | undefined;
|
|
78
|
+
filters?: {
|
|
79
|
+
condition?: "EQUAL" | "GREATER_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN" | "LESS_THAN_OR_EQUAL" | "NULL" | "EMPTY" | "START_WITH" | "END_WITH" | "CONTAINS_ANY" | "CONTAINS_ALL" | "RANGE_II" | "RANGE_IE" | "RANGE_EI" | "RANGE_EE" | undefined;
|
|
80
|
+
prefix?: "IS" | "NOT" | undefined;
|
|
81
|
+
values: string[];
|
|
82
|
+
field: string;
|
|
83
|
+
}[] | undefined;
|
|
84
|
+
formattingEnabled?: boolean | undefined;
|
|
85
|
+
fields: string[];
|
|
86
|
+
semanticModelId: string;
|
|
87
|
+
start: string;
|
|
88
|
+
end: string;
|
|
89
|
+
}, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
|
|
90
|
+
status: "ok" | "failed";
|
|
91
|
+
data?: unknown;
|
|
92
|
+
error
|
|
93
|
+
/** An abort is not a failed read. Swallowed by a general `catch`, a cancelled
|
|
94
|
+
* call carried on and answered `ok` with a generic explanation — the caller
|
|
95
|
+
* had already given up, and got an answer that looked like a result. */
|
|
96
|
+
?: string;
|
|
97
|
+
}>>;
|
|
98
|
+
} | {
|
|
99
|
+
name: string;
|
|
100
|
+
description: string;
|
|
101
|
+
label: string;
|
|
102
|
+
parameters: import("@sinclair/typebox").TObject<{
|
|
103
|
+
siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
104
|
+
startDate: import("@sinclair/typebox").TString;
|
|
105
|
+
endDate: import("@sinclair/typebox").TString;
|
|
106
|
+
measurementTypes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
107
|
+
timeZone: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
108
|
+
}>;
|
|
109
|
+
execute: (toolCallId: string, params: {
|
|
110
|
+
siteId?: string | undefined;
|
|
111
|
+
timeZone?: string | undefined;
|
|
112
|
+
startDate: string;
|
|
113
|
+
endDate: string;
|
|
114
|
+
measurementTypes: string[];
|
|
115
|
+
}, signal?: AbortSignal) => Promise<import("./_factory.js").WixToolResult<{
|
|
116
|
+
status: "ok" | "failed";
|
|
117
|
+
data?: unknown;
|
|
118
|
+
error
|
|
119
|
+
/** An abort is not a failed read. Swallowed by a general `catch`, a cancelled
|
|
120
|
+
* call carried on and answered `ok` with a generic explanation — the caller
|
|
121
|
+
* had already given up, and got an answer that looked like a result. */
|
|
122
|
+
?: string;
|
|
123
|
+
}>>;
|
|
124
|
+
})[];
|