@lacneu/wix-openclaw 0.5.1 → 0.6.1
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 +136 -0
- package/README.md +109 -11
- 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 +652 -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,142 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.6.1] - 2026-08-30
|
|
11
|
+
|
|
12
|
+
**No tool behaviour changes.** What changes is what an operator is told to do,
|
|
13
|
+
plus two probes added to the smoke test. The compiled output is not byte-identical
|
|
14
|
+
— `tsc` keeps comments here, so the edited comments and their source maps differ —
|
|
15
|
+
but the executable code is unchanged, checked by comparing every emitted file with
|
|
16
|
+
comments and whitespace stripped.
|
|
17
|
+
|
|
18
|
+
### Fixed — the permission this README told you to grant is not on the page
|
|
19
|
+
|
|
20
|
+
`0.6.0` named the analytics scope as the API reference does,
|
|
21
|
+
`SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS`. That string does not
|
|
22
|
+
appear on the Wix API-key permissions page: searching for it there finds
|
|
23
|
+
nothing. The checkbox to tick is **Wix Analytics** — *"Can view all site
|
|
24
|
+
analytics and statistics."* — carrying the identifier
|
|
25
|
+
`SCOPE.MEDIA.VIEW-SITE-ANALYTICS`. Verified against a permissions page holding
|
|
26
|
+
166 scopes, and against live calls that started working once it was ticked.
|
|
27
|
+
|
|
28
|
+
Both names are now recorded, with the UI one first, because that is the one an
|
|
29
|
+
operator can actually find — in the README, in the smoke test's skip message,
|
|
30
|
+
and in the tool's own refusal, which previously named only the unfindable one.
|
|
31
|
+
The same caution applies to the accessibility family: the reference name and the
|
|
32
|
+
checkbox name are not guaranteed to match.
|
|
33
|
+
|
|
34
|
+
### Fixed — the accessibility permission, stated as what it is
|
|
35
|
+
|
|
36
|
+
`Manage Accessibility Scans` is the name Wix uses in its own agent
|
|
37
|
+
documentation, and it is the only name available: the scope identifier is
|
|
38
|
+
unpublished, the six method reference pages return 404, and the full docs dump
|
|
39
|
+
contains no accessibility scope. On the permissions page inspected on
|
|
40
|
+
2026-08-30 there was **no accessibility permission at all** — so there may be
|
|
41
|
+
nothing to grant yet, this API being in Developer Preview. The README now says
|
|
42
|
+
that rather than implying a checkbox exists.
|
|
43
|
+
|
|
44
|
+
### Validated against a live site
|
|
45
|
+
|
|
46
|
+
All four tools answered `200` against a real site with a key holding
|
|
47
|
+
`SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS` (2026-08-30), and the two
|
|
48
|
+
smoke-test probes are wired behind `WIX_SMOKE_ANALYTICS=1`. That run settled a
|
|
49
|
+
question this lot had deliberately left open in code: the calls are **site-scoped**
|
|
50
|
+
and Wix accepts them that way, so the site whitelist stays on this family.
|
|
51
|
+
|
|
52
|
+
It also showed what "discoverable" is worth in practice. The site exposed **83
|
|
53
|
+
models**, including a `traffic` model with `traffic.page_url`,
|
|
54
|
+
`traffic.landing_page_flag` and per-page bounce and time measures, and a
|
|
55
|
+
`google-search-page` model carrying Search Console clicks, impressions and
|
|
56
|
+
average position **per page URL**. Per-page analytics is therefore reachable —
|
|
57
|
+
through the semantic models, never through the legacy counters below.
|
|
58
|
+
|
|
59
|
+
### Added — the analytics family is validated against a live site
|
|
60
|
+
|
|
61
|
+
The four tools are marked `live` in the tool table, and two probes are wired
|
|
62
|
+
into the smoke test behind `WIX_SMOKE_ANALYTICS=1`. Their date range is computed
|
|
63
|
+
at run time: a fixed one would have become a guaranteed red once it passed the
|
|
64
|
+
62-day retention window — a failing smoke test on a working endpoint, which is
|
|
65
|
+
the worst kind of red.
|
|
66
|
+
|
|
67
|
+
## [0.6.0] - 2026-08-30
|
|
68
|
+
|
|
69
|
+
Four analytics tools, off by default behind their own switch. The plugin could
|
|
70
|
+
correct a site's SEO, check it for accessibility issues, and say nothing about
|
|
71
|
+
whether anyone was visiting. This closes that.
|
|
72
|
+
|
|
73
|
+
Two very different surfaces sit behind it: a **discoverable** query surface,
|
|
74
|
+
where the models, measures and dimensions belong to the site and are read at
|
|
75
|
+
runtime rather than assumed, and the legacy site-wide counters with their two
|
|
76
|
+
hard bounds attached.
|
|
77
|
+
|
|
78
|
+
### Added — Analytics: a discoverable query surface, plus one legacy endpoint
|
|
79
|
+
|
|
80
|
+
> Off by default behind **its own** switch, `enableAnalyticsTools`. Nothing here
|
|
81
|
+
> writes to the site. The switch is separate because the family needs a
|
|
82
|
+
> permission of its own — `SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS`
|
|
83
|
+
> ("Site Analytics - read"), named by the reference on all four methods — which
|
|
84
|
+
> neither the SEO nor the accessibility scope grants. Note that
|
|
85
|
+
> `NO_ACCOUNT_IDENTITY` is **not** how a missing scope shows up: the reference
|
|
86
|
+
> classifies it as HTTP 401 / UNAUTHENTICATED, so the refusal sends the operator
|
|
87
|
+
> to the credentials first and names the scope as a separate prerequisite.
|
|
88
|
+
|
|
89
|
+
Four tools: `wix_analytics_list_semantic_models`,
|
|
90
|
+
`wix_analytics_get_semantic_model`, `wix_analytics_query_semantic_model` and
|
|
91
|
+
`wix_analytics_get_data`.
|
|
92
|
+
|
|
93
|
+
### A third kind of danger: the answer is shorter than the question
|
|
94
|
+
|
|
95
|
+
The SEO writes destroyed the previous value of what they wrote. The
|
|
96
|
+
accessibility scans could call an unchecked site clean. Here nothing is
|
|
97
|
+
destroyed and nothing is scanned — what goes wrong is quieter. Wix states it on
|
|
98
|
+
the `fields` parameter itself: a field whose `dependencies` are not also in the
|
|
99
|
+
query is **silently omitted from the results**. No error, no empty column; the
|
|
100
|
+
key is simply absent from the rows. A report can be missing an entire measure
|
|
101
|
+
and look finished.
|
|
102
|
+
|
|
103
|
+
So `wix_analytics_query_semantic_model` compares what was asked for against what
|
|
104
|
+
arrived, names every field that did not come back, and — by re-reading the
|
|
105
|
+
model's schema **only when something is missing** — says which dependency to
|
|
106
|
+
add. It refuses to blame the dependency rule when a dependency *was* present:
|
|
107
|
+
that case is reported as an incomplete result rather than explained away.
|
|
108
|
+
|
|
109
|
+
Two more of the same shape. A query returns at most 1000 rows and Wix's own
|
|
110
|
+
default page size is **50**, so the tool always sends an explicit limit — "did
|
|
111
|
+
this fill the page" is then an exact question rather than one asked against an
|
|
112
|
+
assumed default. It asks for **100** by default rather than Wix's ceiling,
|
|
113
|
+
because the whole response is serialised into the model's context and 1000 rows
|
|
114
|
+
across up to 60 fields would swamp it. A full page is reported as **possibly** truncated: exactly
|
|
115
|
+
`limit` rows may be the whole answer, and nothing in the response settles it, so
|
|
116
|
+
claiming it was cut short would be the same false certainty pointed the other
|
|
117
|
+
way. And an absent `totals` row is reported as "not requested", never as a zero.
|
|
118
|
+
|
|
119
|
+
### What the contract leaves open, the answer leaves open
|
|
120
|
+
|
|
121
|
+
Two conventions are simply not documented, and neither is guessed: whether the
|
|
122
|
+
semantic `interval` end bound is inclusive — Wix's own reference example ends a
|
|
123
|
+
period at `…T23:59:59.000Z` rather than at the next midnight — and what timezone
|
|
124
|
+
applies when none is passed. The query echoes the interval it sent and says the
|
|
125
|
+
day boundaries are unknown when the timezone was left out, instead of naming a
|
|
126
|
+
default nothing states.
|
|
127
|
+
|
|
128
|
+
### What the models expose belongs to the site, not to this plugin
|
|
129
|
+
|
|
130
|
+
Measures, dimensions and parameters are discovered through
|
|
131
|
+
`wix_analytics_get_semantic_model`. That includes the question everyone asks
|
|
132
|
+
first — whether a per-page or per-URL breakdown exists at all. Neither the code
|
|
133
|
+
nor the README answers it in either direction: run the tool against the site.
|
|
134
|
+
|
|
135
|
+
### The legacy counters, with their bounds attached
|
|
136
|
+
|
|
137
|
+
Six site-level measurement types and nothing per page. Wix keeps **62 days**,
|
|
138
|
+
and a `startDate` further back is refused with a *"Do not have data for this
|
|
139
|
+
start date"* message — prose, not an error code, so it is matched and turned
|
|
140
|
+
into a retention answer instead of reaching the caller as a broken query. And
|
|
141
|
+
`endDate` is **exclusive**: `2026-08-01 → 2026-08-08` covers the 1st through the
|
|
142
|
+
7th, so the tool reports the days it actually covered. An unknown measurement
|
|
143
|
+
type is refused with the whole set of six in the message, because a typo would
|
|
144
|
+
otherwise come back as an empty series that reads like "no activity".
|
|
145
|
+
|
|
10
146
|
## [0.5.1] - 2026-08-29
|
|
11
147
|
|
|
12
148
|
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
|
|
|
@@ -192,18 +193,38 @@ the target site:
|
|
|
192
193
|
each of the eleven writing tools refuses until what it would destroy, be it a
|
|
193
194
|
redirect, a tag or a template, has been named and acknowledged.
|
|
194
195
|
|
|
195
|
-
- [ ] **Manage Accessibility Scans** —
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
196
|
+
- [ ] **Manage Accessibility Scans** — the name Wix uses in its own agent
|
|
197
|
+
documentation, and **the only name available**: the scope identifier is not
|
|
198
|
+
published, the method reference pages return 404, and the whole docs dump
|
|
199
|
+
contains no accessibility scope. On a permissions page inspected on
|
|
200
|
+
2026-08-30 (166 scopes) **there was no accessibility permission at all** — so
|
|
201
|
+
there may be nothing to tick yet, this API being in Developer Preview. Needed
|
|
202
|
+
**only if you set `enableAccessibilityTools: true`**, which registers six
|
|
203
|
+
tools. None of them writes to the site: Wix runs the scan, the plugin reads
|
|
204
|
+
the result. Note that reading
|
|
202
205
|
page collections or past results does **not** prove the key may start a scan:
|
|
203
206
|
Wix states that starting one needs this permission specifically, and answers
|
|
204
207
|
`403` / `PERMISSION_DENIED` otherwise — which the tools surface as a
|
|
205
208
|
permission problem, never as an empty site.
|
|
206
209
|
|
|
210
|
+
- [ ] **Wix Analytics** — *"Can view all site analytics and statistics."* That
|
|
211
|
+
is the checkbox to tick; in the permissions UI it carries the identifier
|
|
212
|
+
`SCOPE.MEDIA.VIEW-SITE-ANALYTICS`. **Note the mismatch**: the API reference
|
|
213
|
+
names the scope `SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS`, which
|
|
214
|
+
does not appear on the permissions page — searching for it there finds
|
|
215
|
+
nothing. Ticking **Wix Analytics** is what makes the calls work; verified
|
|
216
|
+
against a live site on 2026-08-30.
|
|
217
|
+
Grant it **only if you set `enableAnalyticsTools: true`**, which registers four
|
|
218
|
+
read-only tools. The reference names its own scope on all four methods
|
|
219
|
+
(`ListSemanticModels`, `GetSemanticModel`, `QuerySemanticModelData` and
|
|
220
|
+
`GetAnalyticsData`), so one permission covers the whole family and grants
|
|
221
|
+
nothing but reading. Note what `NO_ACCOUNT_IDENTITY` does and does not mean:
|
|
222
|
+
the reference classifies it as **HTTP 401 / UNAUTHENTICATED** — "the caller
|
|
223
|
+
isn't authenticated" — so it points at the credentials, not at this scope,
|
|
224
|
+
and it is never evidence of a site with no traffic. The separate
|
|
225
|
+
`SCOPE.DC-ANALYTICS-AND-REPORTS.MANAGE-SESSIONS` scope covers the Sessions
|
|
226
|
+
API, which this plugin deliberately does not expose.
|
|
227
|
+
|
|
207
228
|
- [ ] **Pricing Plans** — if you sell subscription packages
|
|
208
229
|
- [ ] **Wix Stores** + **Wix eCommerce** — if you sell physical/digital
|
|
209
230
|
products. Without these, the `wix_*` tools that touch e-commerce
|
|
@@ -255,7 +276,8 @@ columns and remove the matching tools from your agent's allow-list.
|
|
|
255
276
|
| `wix_faq_*` | Manage FAQ | FAQ tooling |
|
|
256
277
|
| `wix_multilingual_*` | Multilingual Translation Schema Read | Translation reads |
|
|
257
278
|
| `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
|
-
| `wix_a11y_*` (all six) | Manage Accessibility Scans
|
|
279
|
+
| `wix_a11y_*` (all six) | Manage Accessibility Scans — **not offered on the permissions page as of 2026-08-30**, and no identifier is published | Starting a scan. Until Wix exposes the grant, this family cannot be enabled |
|
|
280
|
+
| `wix_analytics_*` (all four) | **Wix Analytics** in the UI (`SCOPE.MEDIA.VIEW-SITE-ANALYTICS`); the reference calls it `SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS`, which is not what the permissions page shows | Reading analytics. `NO_ACCOUNT_IDENTITY` is a 401 about the credentials, not about this scope — and never an empty site |
|
|
259
281
|
| `wix_design_brief` | _(none — no API call)_ | Always |
|
|
260
282
|
|
|
261
283
|
### Wix app installation requirements
|
|
@@ -639,6 +661,82 @@ its latest saved version — the opposite way round from the SEO tag reads above
|
|
|
639
661
|
|
|
640
662
|
---
|
|
641
663
|
|
|
664
|
+
### Analytics
|
|
665
|
+
|
|
666
|
+
> **OFF by default, behind its own switch.** Nothing here writes to the site.
|
|
667
|
+
> The switch is separate because the family needs a permission of its own —
|
|
668
|
+
> `SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS`, which the SEO and
|
|
669
|
+
> accessibility scopes do not grant — so an install that opted into either of
|
|
670
|
+
> those has decided nothing here. Set `enableAnalyticsTools: true` to opt in.
|
|
671
|
+
> _Contract read from the public Introductions and from the published SDK
|
|
672
|
+
> packages `@wix/auto_sdk_analytics-semantic-model_analytics-semantic-model`
|
|
673
|
+
> and `@wix/auto_sdk_analytics-data_analytics-data`, whose host mappings give
|
|
674
|
+
> the REST prefixes `/analytics/semantic-model/v3/semantic-models` and
|
|
675
|
+
> `/analytics-ng/v2/site-analytics/data` verbatim — verified 2026-08-29._
|
|
676
|
+
|
|
677
|
+
| Tool | What it does | Approval | Validated |
|
|
678
|
+
|---|---|---|---|
|
|
679
|
+
| `wix_analytics_list_semantic_models` | The analytics subject areas this site exposes | — | live |
|
|
680
|
+
| `wix_analytics_get_semantic_model` | One model's schema: measures, dimensions, parameters, and each field's `dependencies` | — | live |
|
|
681
|
+
| `wix_analytics_query_semantic_model` | Query a model over an interval; reports every requested field that did not come back | — | live |
|
|
682
|
+
| `wix_analytics_get_data` | The six legacy site-wide counters over a date range | — | live |
|
|
683
|
+
|
|
684
|
+
**The answer can be shorter than the question.** Wix states it on the `fields`
|
|
685
|
+
parameter itself: a field whose `dependencies` are not also in the query is
|
|
686
|
+
**silently omitted from the results**. No error, no empty column — the key is
|
|
687
|
+
simply absent from the rows, so a report can be missing an entire measure and
|
|
688
|
+
look finished. `wix_analytics_query_semantic_model` therefore compares what was
|
|
689
|
+
asked for against what arrived, names every field that did not come back, and —
|
|
690
|
+
by re-reading the model's schema only when something is missing — says which
|
|
691
|
+
dependency to add.
|
|
692
|
+
|
|
693
|
+
**What the models expose is a property of the site, not of this plugin.**
|
|
694
|
+
Measures, dimensions and parameters are discovered through
|
|
695
|
+
`wix_analytics_get_semantic_model` — this README states no fixed list, because
|
|
696
|
+
there is none to state.
|
|
697
|
+
|
|
698
|
+
What that looked like on one real site (2026-08-30) is worth recording as a
|
|
699
|
+
sense of scale rather than as a contract: **83 models**, and a per-page
|
|
700
|
+
breakdown does exist there — `traffic` carries `traffic.page_url`,
|
|
701
|
+
`traffic.landing_page_flag`, `traffic.prev_page_url` and per-page bounce and
|
|
702
|
+
time measures, while `google-search-page` carries Search Console clicks,
|
|
703
|
+
impressions and average position **per page URL**. Whether the same holds on
|
|
704
|
+
another site depends on that site and its installed apps: read the schema.
|
|
705
|
+
|
|
706
|
+
**The legacy counters are site-level, and short-lived.** Six measurement types
|
|
707
|
+
(`TOTAL_SESSIONS`, `TOTAL_UNIQUE_VISITORS`, `TOTAL_ORDERS`, `TOTAL_SALES`,
|
|
708
|
+
`TOTAL_FORMS_SUBMITTED`, `CLICKS_TO_CONTACT`), no per-page breakdown, and Wix
|
|
709
|
+
keeps **62 days**: a `startDate` more than 61 days back is refused with a
|
|
710
|
+
*"Do not have data for this start date"* message — a retention limit, not an
|
|
711
|
+
empty site. `endDate` is **exclusive**, so the tool reports the days it actually
|
|
712
|
+
covered rather than leaving an off-by-one to be discovered later.
|
|
713
|
+
|
|
714
|
+
**Site-scoped, confirmed against a live site.** These calls send `wix-site-id`,
|
|
715
|
+
which is what the site whitelist is enforced on, and not `wix-account-id`.
|
|
716
|
+
Because the error is named `NO_ACCOUNT_IDENTITY` it was an open question whether
|
|
717
|
+
the account header was needed instead — switching would have removed the
|
|
718
|
+
whitelist from this family. A live call with a correctly scoped key answered
|
|
719
|
+
**200 site-scoped** on 2026-08-30, so the question is closed and the whitelist
|
|
720
|
+
stays.
|
|
721
|
+
|
|
722
|
+
**A query returns at most 1000 rows, and Wix's own default page size is 50.**
|
|
723
|
+
The tool always sends an explicit limit, so "did this fill the page" is an exact
|
|
724
|
+
question rather than one asked against an assumed default — and it defaults to
|
|
725
|
+
**100**, not to Wix's ceiling: the whole response is serialised into the model's
|
|
726
|
+
context, where 1000 rows across up to 60 fields would swamp it. Raise `limit`
|
|
727
|
+
deliberately when you need more. A full page is
|
|
728
|
+
reported as **possibly** truncated — exactly `limit` rows may be the whole
|
|
729
|
+
answer, and nothing in the response settles it — so the caveat says to page
|
|
730
|
+
before summing rather than asserting the result was cut short.
|
|
731
|
+
|
|
732
|
+
**Two conventions the contract does not state**, both surfaced rather than
|
|
733
|
+
guessed: whether the semantic `interval` end bound is inclusive (Wix's own
|
|
734
|
+
reference example ends a period at `…T23:59:59.000Z` rather than at the next
|
|
735
|
+
midnight), and what timezone applies when none is passed. The query echoes the
|
|
736
|
+
interval it sent and says plainly when the timezone was left unset.
|
|
737
|
+
|
|
738
|
+
---
|
|
739
|
+
|
|
642
740
|
### Design
|
|
643
741
|
|
|
644
742
|
| 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,OAA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,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,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OA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AAI,CACb,yBAAyB,QAAQ,CAAC,MAAM,sBAAsB,MAAM,CAAC,gBAAgB,CAAC,IAAI,oBAAoB,MAAM,CAAC,cAAc,CAAC,MAAM,kBAAkB,CAC7J,CAAC;IAEF,gEAAgE;IAChE,wEAAwE;IACxE,sEAAsE;IACtE,2EAA2E;IAC3E,4EAA4E;IAC5E,0EAA0E;IAC1E,MAAM,OAAO,GAAG,QAAQ;SACrB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;SAClB,MAAM,CACL,CAAC,IAAI,EAAE,EAAE,CACP,yBAAyB,CAAC,QAAQ,CAAC,IAAI,CAAC;QACxC,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CACrC,CAAC;IACJ,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,GAAG,CAAC,MAAM,CAAC,IAAI,CACb,iBAAiB,OAAO,CAAC,MAAM,qDAAqD;YAClF,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,+CAA+C;YACpE,wCAAwC,CAC3C,CAAC;IACJ,CAAC;AACH,CAAC;AAED,4EAA4E;AAC5E,gFAAgF;AAChF,6EAA6E;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
|
+
})[];
|