@wix/agent-skills 1.20.1 → 1.21.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.
Files changed (49) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +14 -112
  3. package/skills/wix-app/references/APP_TOOLS.md +2 -1
  4. package/skills/wix-app/references/BACKEND_EVENT.md +3 -3
  5. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +41 -152
  6. package/skills/wix-app/references/DASHBOARD_MODAL.md +4 -4
  7. package/skills/wix-app/references/SDK_MODULE_MAP.md +44 -0
  8. package/skills/wix-app/references/SITE_PLUGIN.md +36 -190
  9. package/skills/wix-app/references/app-tools/TOOLS.md +3 -1
  10. package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +21 -0
  11. package/skills/wix-app/references/dashboard-page/ECOM_NAVIGATION.md +17 -0
  12. package/skills/wix-app/references/dashboard-plugin/SLOTS.md +4 -18
  13. package/skills/wix-app/references/site-plugin/EXAMPLES.md +1 -1
  14. package/skills/wix-headless-fast/SKILL.md +134 -49
  15. package/skills/wix-headless-fast/entry/skill.md +4 -3
  16. package/skills/wix-headless-fast/install/AGENTS.md +32 -0
  17. package/skills/wix-headless-fast/install/agents-md.mjs +39 -0
  18. package/skills/wix-headless-fast/install/attach.mjs +149 -42
  19. package/skills/wix-headless-fast/install/setup.mjs +239 -0
  20. package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +2 -0
  21. package/skills/wix-headless-fast/references/blog/seed/read-site.mjs +22 -0
  22. package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +2 -0
  23. package/skills/wix-headless-fast/references/bookings/seed/read-site.mjs +28 -0
  24. package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +2 -0
  25. package/skills/wix-headless-fast/references/cms/seed/read-site.mjs +20 -0
  26. package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +2 -0
  27. package/skills/wix-headless-fast/references/events/seed/read-site.mjs +26 -0
  28. package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +2 -0
  29. package/skills/wix-headless-fast/references/forms/seed/read-site.mjs +20 -0
  30. package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +2 -0
  31. package/skills/wix-headless-fast/references/members/seed/read-site.mjs +15 -0
  32. package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +2 -0
  33. package/skills/wix-headless-fast/references/portfolio/seed/read-site.mjs +20 -0
  34. package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +19 -21
  35. package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +2 -0
  36. package/skills/wix-headless-fast/references/pricing-plans/seed/read-site.mjs +21 -0
  37. package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +2 -0
  38. package/skills/wix-headless-fast/references/restaurants/seed/read-site.mjs +25 -0
  39. package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +25 -5
  40. package/skills/wix-headless-fast/references/shared/seed/read-site.mjs +99 -0
  41. package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +4 -0
  42. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +7 -2
  43. package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +2 -0
  44. package/skills/wix-headless-fast/references/storefront/seed/SEED.md +7 -1
  45. package/skills/wix-headless-fast/references/storefront/seed/read-site.mjs +38 -0
  46. package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +52 -16
  47. package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-coupon.md +10 -19
  48. package/skills/wix-manage/references/events/create-wix-event.md +5 -1
  49. package/skills/wix-headless-fast/install/fast-path.mjs +0 -181
@@ -5,7 +5,7 @@ Site plugins are custom elements that integrate into predefined **slots** within
5
5
 
6
6
  ## Scaffold
7
7
 
8
- Use `wix generate --params` with `extensionType: SITE_PLUGIN`. `slotId` is `<componentId>:<slotId>` — the colon-joined widget component ID and slot ID. Run `wix schema generate --type SITE_PLUGIN` to list the available `slotId` values (each `anyOf` entry has the slot's human-readable title). The CLI generates the folder, the plugin `.tsx`, the settings panel `.tsx`, the builder file, the UUID, the logo SVG, and the `src/extensions.ts` registration.
8
+ Use `wix generate --params` with `extensionType: SITE_PLUGIN`. `slotId` is `<componentId>:<slotId>` — the colon-joined widget component ID and slot ID. Run `wix schema generate --type SITE_PLUGIN` to list the available `slotId` values. The CLI generates the folder, the plugin `.tsx`, the settings panel `.tsx`, the builder file, the UUID, the logo SVG, and the `src/extensions.ts` registration.
9
9
 
10
10
  ## Architecture
11
11
 
@@ -43,49 +43,21 @@ Site plugins use native `HTMLElement` custom elements:
43
43
  ```typescript
44
44
  // my-site-plugin.tsx
45
45
  class MyElement extends HTMLElement {
46
- static get observedAttributes() {
47
- return ['display-name'];
48
- }
49
-
50
- constructor() {
51
- super();
52
- }
53
-
54
- connectedCallback() {
55
- this.render();
56
- }
57
-
58
- attributeChangedCallback() {
59
- this.render();
60
- }
46
+ static get observedAttributes() { return ['display-name']; }
47
+ connectedCallback() { this.render(); }
48
+ attributeChangedCallback() { this.render(); }
61
49
 
62
50
  render() {
63
51
  const displayName = this.getAttribute('display-name') || "Your Plugin's Title";
64
-
65
- this.innerHTML = `
66
- <div style="font-size: 16px; padding: 16px; border: 1px solid #ccc; border-radius: 8px; margin: 16px;">
67
- <h2>${displayName}</h2>
68
- <hr />
69
- <p>
70
- This is a Site Plugin generated by Wix CLI.<br />
71
- Edit your element's code to change this text.
72
- </p>
73
- </div>
74
- `;
52
+ this.innerHTML = `<div style="padding: 16px;"><h2>${displayName}</h2></div>`;
75
53
  }
76
54
  }
77
55
 
78
56
  export default MyElement;
79
57
  ```
80
58
 
81
- **Key Points:**
59
+ **Key Points** (beyond the structure already listed under [Architecture](#architecture)):
82
60
 
83
- - Extend `HTMLElement` class directly
84
- - Define `observedAttributes` static getter to list reactive attributes
85
- - Attributes use **kebab-case** (e.g., `display-name`, `bg-color`)
86
- - Implement `connectedCallback()` for initial render
87
- - Implement `attributeChangedCallback()` to re-render when attributes change
88
- - Use inline styles via template strings
89
61
  - Use `this.getAttribute('attribute-name')` to read attribute values
90
62
  - Wix handles `define()` for you — do NOT call `customElements.define()` in your code
91
63
 
@@ -93,30 +65,22 @@ export default MyElement;
93
65
 
94
66
  ```typescript
95
67
  // my-site-plugin.panel.tsx
96
- import React, { type FC, useState, useEffect, useCallback } from 'react';
68
+ import { type FC, useState, useEffect, useCallback, type ChangeEvent } from 'react';
97
69
  import { widget } from '@wix/editor';
98
- import {
99
- SidePanel,
100
- WixDesignSystemProvider,
101
- Input,
102
- FormField,
103
- } from '@wix/design-system';
70
+ import { SidePanel, WixDesignSystemProvider, Input, FormField } from '@wix/design-system';
104
71
  import '@wix/design-system/styles.global.css';
105
72
 
106
73
  const Panel: FC = () => {
107
- const [displayName, setDisplayName] = useState<string>('');
74
+ const [displayName, setDisplayName] = useState('');
108
75
 
109
76
  useEffect(() => {
110
- widget.getProp('display-name')
111
- .then(displayName => setDisplayName(displayName || "Your Plugin's Title"))
112
- .catch(error => console.error('Failed to fetch display-name:', error));
113
- }, [setDisplayName]);
77
+ widget.getProp('display-name').then(v => setDisplayName(v || "Your Plugin's Title"));
78
+ }, []);
114
79
 
115
- const handleDisplayNameChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
116
- const newDisplayName = event.target.value;
117
- setDisplayName(newDisplayName);
118
- widget.setProp('display-name', newDisplayName);
119
- }, [setDisplayName]);
80
+ const handleDisplayNameChange = useCallback((e: ChangeEvent<HTMLInputElement>) => {
81
+ setDisplayName(e.target.value);
82
+ widget.setProp('display-name', e.target.value);
83
+ }, []);
120
84
 
121
85
  return (
122
86
  <WixDesignSystemProvider>
@@ -124,12 +88,7 @@ const Panel: FC = () => {
124
88
  <SidePanel.Content noPadding stretchVertically>
125
89
  <SidePanel.Field>
126
90
  <FormField label="Display Name">
127
- <Input
128
- type="text"
129
- value={displayName}
130
- onChange={handleDisplayNameChange}
131
- aria-label="Display Name"
132
- />
91
+ <Input type="text" value={displayName} onChange={handleDisplayNameChange} aria-label="Display Name" />
133
92
  </FormField>
134
93
  </SidePanel.Field>
135
94
  </SidePanel.Content>
@@ -141,13 +100,9 @@ const Panel: FC = () => {
141
100
  export default Panel;
142
101
  ```
143
102
 
144
- **Key Points:**
103
+ **Key Points** (beyond the structure already listed under [Architecture](#architecture)):
145
104
 
146
- - Prop names in `widget.getProp()` and `widget.setProp()` use **kebab-case** (e.g., `"display-name"`)
147
- - Always update both local state AND widget prop in onChange handlers
148
- - Widget properties are bound to custom element attributes — changes automatically update the corresponding attribute
149
- - Wrap content in `WixDesignSystemProvider > SidePanel > SidePanel.Content`
150
- - Use WDS components from `@wix/design-system`
105
+ - Always update both local state AND widget prop in the same onChange handler
151
106
  - Import `@wix/design-system/styles.global.css` for styles
152
107
  - Include `aria-label` for accessibility
153
108
 
@@ -160,28 +115,17 @@ Site plugin settings panels can use `inputs.selectColor()` and `inputs.selectFon
160
115
  Opens the Wix color picker with theme colors, gradients, and more — **NOT** a basic HTML `<input type="color">`.
161
116
 
162
117
  ```typescript
163
- import React, { type FC } from 'react';
118
+ import { type FC } from 'react';
164
119
  import { inputs } from '@wix/editor';
165
120
  import { FormField, Box, FillPreview, SidePanel } from '@wix/design-system';
166
121
 
167
- interface ColorPickerFieldProps {
168
- label: string;
169
- value: string;
170
- onChange: (value: string) => void;
171
- }
122
+ interface ColorPickerFieldProps { label: string; value: string; onChange: (value: string) => void; }
172
123
 
173
- export const ColorPickerField: FC<ColorPickerFieldProps> = ({
174
- label,
175
- value,
176
- onChange,
177
- }) => (
124
+ export const ColorPickerField: FC<ColorPickerFieldProps> = ({ label, value, onChange }) => (
178
125
  <SidePanel.Field>
179
126
  <FormField label={label}>
180
127
  <Box width="30px" height="30px">
181
- <FillPreview
182
- fill={value}
183
- onClick={() => inputs.selectColor(value, { onChange: (val) => { if (val) onChange(val); } })}
184
- />
128
+ <FillPreview fill={value} onClick={() => inputs.selectColor(value, { onChange: (val) => val && onChange(val) })} />
185
129
  </Box>
186
130
  </FormField>
187
131
  </SidePanel.Field>
@@ -190,78 +134,21 @@ export const ColorPickerField: FC<ColorPickerFieldProps> = ({
190
134
 
191
135
  ### FontPickerField
192
136
 
193
- Opens the Wix font picker with font family, size, bold, italic, and other typography features.
137
+ Opens the Wix font picker (family, size, bold, italic). Same shape as `ColorPickerField` above, with a `Button`+`Text` trigger instead of `FillPreview`, calling `inputs.selectFont(value, { onChange })` instead of `selectColor`. Value type: `{ font: string; textDecoration: string }`.
194
138
 
195
- ```typescript
196
- import React, { type FC } from 'react';
197
- import { inputs } from '@wix/editor';
198
- import { FormField, Button, Text, SidePanel } from '@wix/design-system';
199
-
200
- interface FontValue {
201
- font: string;
202
- textDecoration: string;
203
- }
204
-
205
- interface FontPickerFieldProps {
206
- label: string;
207
- value: FontValue;
208
- onChange: (value: FontValue) => void;
209
- }
210
-
211
- export const FontPickerField: FC<FontPickerFieldProps> = ({
212
- label,
213
- value,
214
- onChange,
215
- }) => (
216
- <SidePanel.Field>
217
- <FormField label={label}>
218
- <Button
219
- size="small"
220
- priority="secondary"
221
- onClick={() => inputs.selectFont(value, { onChange: (val) => onChange({ font: val.font, textDecoration: val.textDecoration || "" }) })}
222
- fullWidth
223
- >
224
- <Text size="small" ellipsis>Change Font</Text>
225
- </Button>
226
- </FormField>
227
- </SidePanel.Field>
228
- );
229
- ```
230
-
231
- **Important:**
232
- - Always use `inputs.selectColor()` from `@wix/editor` with `FillPreview` — do NOT use `<Input type="color">`
233
- - Always use `inputs.selectFont()` from `@wix/editor` with the callback pattern `inputs.selectFont(value, { onChange })`
234
- - Import `inputs` from `@wix/editor` (not from `@wix/sdk`)
235
-
236
- ## Attribute Naming Convention
237
-
238
- Site plugins use **kebab-case** consistently for HTML attributes:
239
-
240
- | File | Convention | Example |
241
- | --------------------------------- | ---------- | ---------------------------------- |
242
- | `<plugin>.tsx` (getAttribute) | kebab-case | `this.getAttribute('display-name')` |
243
- | `<plugin>.tsx` (observedAttributes) | kebab-case | `['display-name', 'bg-color']` |
244
- | `<plugin>.panel.tsx` (widget API) | kebab-case | `widget.getProp('display-name')` |
139
+ **Important:** always go through `inputs` from `@wix/editor` (never `<Input type="color">`, never `@wix/sdk`) with the `{ onChange }` callback pattern shown above.
245
140
 
246
141
  ## References
247
142
 
248
143
  | Topic | Reference |
249
144
  | --- | --- |
250
145
  | Complete Examples | [EXAMPLES.md](site-plugin/EXAMPLES.md) |
251
- | Slots (App IDs, runtime APIs, design guidelines, multiple placements) | [SLOTS.md](site-plugin/SLOTS.md) — run `wix schema generate --type SITE_PLUGIN` for the authoritative `slotId` enum |
146
+ | Slots (App IDs, runtime APIs, design guidelines, multiple placements) | [SLOTS.md](site-plugin/SLOTS.md) |
252
147
  | WDS Components | the `wix-design-system` skill |
253
148
 
254
149
  ## Available Slots
255
150
 
256
- Site plugins integrate into predefined slots in Wix business solutions. Each slot is identified by:
257
-
258
- - **appDefinitionId**: The ID of the Wix app (e.g., Stores, Bookings)
259
- - **widgetId**: The ID of the page containing the slot
260
- - **slotId**: The specific slot identifier
261
-
262
- Common placement areas include product pages (Wix Stores), checkout and side cart (Wix eCommerce), booking pages (Wix Bookings), service pages, event pages, and blog post pages.
263
-
264
- For App Definition IDs, per-slot runtime APIs, design guidelines, and placement constraints, see [SLOTS.md](site-plugin/SLOTS.md). Run `wix schema generate --type SITE_PLUGIN` for the authoritative `slotId` enum.
151
+ Site plugins integrate into predefined slots — product pages (Wix Stores), checkout and side cart (Wix eCommerce), booking pages (Wix Bookings), service pages, event pages, and blog post pages. See [SLOTS.md](site-plugin/SLOTS.md) for the App Definition IDs, per-slot runtime APIs, and design guidelines.
265
152
 
266
153
  ## Checkout Plugins
267
154
 
@@ -269,52 +156,27 @@ If you are building a plugin for the **checkout page**, it may not support autom
269
156
 
270
157
  ## Examples
271
158
 
272
- For complete examples with all three required files (plugin component, settings panel, extension configuration), see [EXAMPLES.md](site-plugin/EXAMPLES.md).
273
-
274
- **Example use cases:**
275
-
276
- - **Best Seller Badge** - Customizable badge on product pages with text and color settings
277
- - **Booking Confirmation** - Custom confirmation message for booking pages
278
- - **Product Reviews Summary** - Star rating and review count display
279
- - **Data-Driven Plugin** - Plugin with Wix Data API integration and editor environment handling
159
+ For complete examples with all three required files (plugin component, settings panel, extension configuration) — including a product-page badge, a booking confirmation message, a review-count display, and a Wix Data-driven plugin — see [EXAMPLES.md](site-plugin/EXAMPLES.md).
280
160
 
281
161
  ## Best Practices
282
162
 
283
163
  ### Implementation Guidelines
284
164
 
285
- - **Use inline styles** - CSS imports are not supported in custom elements
286
- - **Handle editor environment** - Show placeholders when in editor mode for data-dependent plugins
287
- - **Do not call `define()`** - Wix handles `customElements.define()` for you automatically
288
- - **Validate all input** - Check required props are present
289
- - **Follow naming conventions** - kebab-case for all attributes and widget API
290
- - **Keep plugins focused** - Each plugin should do one thing well
291
- - **Test in multiple slots** - If supporting multiple placements, test each one
292
- - **Support both Stores versions** - Include placements for both old and new Wix Stores product pages for maximum compatibility
165
+ - **Handle the editor environment** - show placeholders when in editor mode for data-dependent plugins (see [Editor Sandboxing](#editor-sandboxing) below)
166
+ - **Support both Stores versions** - include placements for both old and new Wix Stores product pages for maximum compatibility
293
167
 
294
168
  ### Editor Sandboxing
295
169
 
296
- Site plugins are sandboxed when rendered in the editor. This means they're treated as if they come from a different domain, which impacts access to browser storage APIs.
297
-
298
- **Restricted APIs in the editor:**
299
- - `localStorage` and `sessionStorage` (Web Storage API)
300
- - `document.cookie` (Cookie Store API)
301
- - IndexedDB API
302
- - Cache API
170
+ Site plugins are sandboxed when rendered in the editor — treated as if from a different domain, which blocks `localStorage`/`sessionStorage`, `document.cookie`, IndexedDB, and the Cache API.
303
171
 
304
- **How to handle sandboxing:**
305
-
306
- Use the `viewMode()` function from `@wix/site-window` to check the current mode before accessing restricted APIs:
172
+ Check the mode with `viewMode()` from `@wix/site-window` before touching any of those. That package isn't part of the CLI's default scaffolded `package.json` — install it first (`npm install @wix/site-window`), or the build fails with `Rollup failed to resolve import "@wix/site-window"`:
307
173
 
308
174
  ```typescript
309
175
  import { window as wixWindow } from '@wix/site-window';
310
176
 
311
- const viewMode = await wixWindow.viewMode();
312
-
313
- if (viewMode === 'Site') {
177
+ if ((await wixWindow.viewMode()) === 'Site') {
314
178
  const item = localStorage.getItem('myKey');
315
- } else {
316
- // Mock storage or modify API usage for editor mode
317
- }
179
+ } // else: mock storage or skip, in editor mode
318
180
  ```
319
181
 
320
182
  ### Using Wix SDK Modules in Site Plugins
@@ -322,33 +184,23 @@ if (viewMode === 'Site') {
322
184
  Site plugins can import and use Wix SDK modules directly — you do NOT need `createClient()`. The Wix runtime provides the client context automatically.
323
185
 
324
186
  ```typescript
325
- // ✅ CORRECT — Import SDK modules directly
187
+ // ✅ CORRECT — import directly, no createClient needed
326
188
  import { items } from "@wix/data";
327
- import { currentCartV2 } from "@wix/ecom";
328
- import { products } from "@wix/stores";
329
189
 
330
190
  class MyPlugin extends HTMLElement {
331
191
  async loadData() {
332
- // Call SDK methods directly — no createClient needed
333
192
  const result = await items.query("MyCollection").find();
334
- const { cart } = await currentCartV2.getCurrentCart();
335
- const productList = await products.queryProducts().limit(10).find();
336
193
  }
337
194
  }
338
195
  ```
339
196
 
340
- ```typescript
341
- // ❌ WRONG — Do NOT use createClient in site plugins
342
- import { createClient } from "@wix/sdk";
343
- const wixClient = createClient({ modules: { items, products } });
344
- await wixClient.items.query(...); // Wrong — API surface differs through client
345
- ```
197
+ The same applies to any other Wix SDK module (`@wix/ecom`, `@wix/stores`, etc. — see the table below for three specific calls). Do **not** wrap them in `createClient({ modules: {...} })` from `@wix/sdk` — that API surface differs from the direct-import one shown above, and site plugins don't need it.
346
198
 
347
199
  ### Identity of SDK Calls in Site Plugins
348
200
 
349
201
  A plugin runs as the **site visitor or member**, never as the app — see [Identity and Elevation Requirement](../SKILL.md#identity-and-elevation-requirement) before routing any SDK call out to a backend endpoint.
350
202
 
351
- The three calls above are correct exactly as written, and each for a different reason:
203
+ Each of these three calls is correct to call directly, exactly as written, and each for a different reason:
352
204
 
353
205
  | Call | Why it works directly |
354
206
  | --- | --- |
@@ -356,9 +208,3 @@ The three calls above are correct exactly as written, and each for a different r
356
208
  | `currentCartV2.getCurrentCart()` | Resolves the cart from the caller's session. Elevating it would return the app's cart, not the visitor's |
357
209
  | `products.queryProducts()` | Catalog base fields are public. `MERCHANT_DATA` and non-visible products are withheld unless the app holds `SCOPE.STORES.PRODUCT_READ_ADMIN` — don't request them from a plugin |
358
210
 
359
- ### Performance Considerations
360
-
361
- - Keep bundle size small - plugins load on user-facing pages
362
- - Avoid heavy computations on initial render
363
- - Lazy load data when possible
364
- - Use efficient re-rendering patterns
@@ -25,6 +25,7 @@ export default extensions.appTools({
25
25
  tools: [
26
26
  {
27
27
  methodName: 'get-order-status',
28
+ displayName: 'Get Order Status',
28
29
  description: 'Returns the current fulfillment status, shipping carrier, and tracking number for a customer order. Use this tool when a collaborator or customer asks where their order is, whether it has shipped, when it will arrive, or needs a tracking number. Requires a valid orderId.',
29
30
  requestSchema: {
30
31
  type: 'object',
@@ -52,9 +53,10 @@ export default extensions.appTools({
52
53
  | --- | --- | --- | --- |
53
54
  | `methodName` | `string` | Yes | Unique word identifying the tool. Used to route calls in the service plugin handler. 1–30 characters. |
54
55
  | `description` | `string` | Yes | Natural-language description the AI assistant uses to decide when to invoke this tool. Write it like a prompt: state what the tool does, list the user intents or trigger phrases that should activate it, and describe what it returns. A narrow one-liner reduces relevance matching — prefer 2–4 sentences covering intent, triggers, and output. 10–1000 characters. |
56
+ | `displayName` | `string` | No | Human-readable name for the tool, shown in AI agent UIs. 2–50 characters. The CLI's generated stub always fills this in — keep it when you replace the stub tool. |
55
57
  | `requestSchema` | `Record<string, any>` | No | JSON Schema describing the tool's request payload. The AI assistant uses this for context — it is NOT validated by Wix at call time. |
56
58
  | `responseSchema` | `Record<string, any>` | No | JSON Schema describing the tool's response payload. |
57
- | `activated` | `boolean` | Yes | Only tools with `activated: true` are called by the AI assistant. |
59
+ | `activated` | `boolean` | No | Only tools with `activated: true` are called by the AI assistant. **Defaults to `false` if omitted** — there's no build-time or generate-time error for leaving it out, so a forgotten `activated` silently produces a tool the assistant will never call. Always set it explicitly. |
58
60
 
59
61
  ## Important Constraints
60
62
 
@@ -32,3 +32,24 @@ Wrap each picker in the standard `<SidePanel.Field><FormField label={label}>…<
32
32
  </Button>
33
33
  ```
34
34
 
35
+ ## Date & Time Fields
36
+
37
+ Use WDS `DatePicker` and `TimeInput` directly (no `@wix/editor` picker dialog involved) — but their `onChange` shapes differ, verified against the installed package's own types:
38
+
39
+ | Field | Value type | `onChange` signature |
40
+ |---|---|---|
41
+ | `DatePicker` | `Date` | `(date: Date) => void` — receives the date directly |
42
+ | `TimeInput` | `Date \| null` | `({ date }: { date: Date \| null }) => void` — receives a **destructured object**, not the date directly |
43
+
44
+ ```typescript
45
+ import { FormField, DatePicker, TimeInput } from '@wix/design-system';
46
+
47
+ <FormField label="Target date">
48
+ <DatePicker value={targetDate} onChange={(date) => onDateChange(date)} />
49
+ </FormField>
50
+
51
+ <FormField label="Target time">
52
+ <TimeInput value={targetTime} onChange={({ date }) => onTimeChange(date)} />
53
+ </FormField>
54
+ ```
55
+
@@ -141,6 +141,23 @@ dashboard.navigate(
141
141
  );
142
142
  ```
143
143
 
144
+ ## taxSettings()
145
+
146
+ Ecom Extensions Dashboard Pages 'taxSettings()' destination builder for navigating to the Tax Settings dashboard page.
147
+
148
+ **Request:**
149
+ This method does not take any parameters.
150
+
151
+ **Example:**
152
+ ```typescript
153
+ import { dashboard } from "@wix/dashboard";
154
+ import { pages } from "@wix/ecom/dashboard";
155
+
156
+ dashboard.navigate(
157
+ pages.taxSettings(),
158
+ );
159
+ ```
160
+
144
161
  ## orderRefund()
145
162
 
146
163
  Ecom Extensions Dashboard Pages 'orderRefund()' destination builder for navigating to the Order Refund dashboard page.
@@ -66,8 +66,7 @@ Slots are UI placeholders on dashboard pages of Wix first-party business apps. E
66
66
  | Name | Type | Description |
67
67
  |------|------|-------------|
68
68
  | `staffResourceId` | String | Staff resource ID |
69
- | `scheduleId` | String | Schedule ID |
70
- | `timezone` | String | Time zone |
69
+ | `staffId` | String | Staff member ID |
71
70
  - **Multi-plugin:** Vertical, newest at top
72
71
  - **Use case:** Display staff availability analytics or performance metrics.
73
72
 
@@ -108,12 +107,12 @@ Slots are UI placeholders on dashboard pages of Wix first-party business apps. E
108
107
  | `onSuccess()` | `() => Promise<void>` | Progresses to the next modal after successful order update |
109
108
  | `onCancel()` | `() => void` | Progresses to the next modal without changes |
110
109
  | `menuOption` | Object | Data for the selected menu item |
111
- | `menuOption.key` | String | `CHARGE_WITH_CREDIT_CARD`, `RECORD_ORDER_MANUAL_PAYMENT`, `CHARGE_WITH_INVOICE`, or `EXTENSION` |
110
+ | `menuOption.key` | String | `CHARGE_WITH_CREDIT_CARD`, `RECORD_ORDER_MANUAL_PAYMENT`, `CHARGE_WITH_INVOICE`, `CAPTURE_AUTHORIZED_PAYMENT`, `CREATE_AUTHORIZED_PAYMENT`, or `EXTENSION` |
112
111
  | `menuOption.componentId` | String | Component ID when `EXTENSION` key is triggered |
113
112
  - **Multi-plugin:** Sequential modals, each appearing before the default modal
114
113
  - **Use case:** Add items to an order such as additional services, notes, or booking fees like insurance.
115
114
 
116
- > **Note:** This slot also appears on the Wix eCommerce Order Page.
115
+ > **Note:** This slot also appears on the [Wix eCommerce Order Page](#order-page--pre-collect-payment-modal).
117
116
 
118
117
  ### Booking List Page
119
118
 
@@ -145,24 +144,11 @@ Slots are UI placeholders on dashboard pages of Wix first-party business apps. E
145
144
 
146
145
  ### Order Page — Pre-Collect Payment Modal
147
146
 
148
- **Slot ID:** `b92f0e25-535f-4bef-b130-8e5abc85b2fe`
147
+ **Slot ID:** `b92f0e25-535f-4bef-b130-8e5abc85b2fe` — the same slot as [Bookings Calendar Page — Pre-Collect Payment Modal](#calendar-page--pre-collect-payment-modal) above (same parameters, multi-plugin behavior, and modal mechanics).
149
148
 
150
149
  - **Dashboard path:** Sales > Orders > Order > Collect Payment
151
- - **Location:** Custom modal displayed before the default Collect Payment modal
152
- - **Parameters:**
153
- | Name | Type | Description |
154
- |------|------|-------------|
155
- | `orderId` | String | Order ID |
156
- | `onSuccess()` | `() => Promise<void>` | Progresses to the next modal after successful order update |
157
- | `onCancel()` | `() => void` | Progresses to the next modal without changes |
158
- | `menuOption` | Object | Data for the selected menu item |
159
- | `menuOption.key` | String | `CHARGE_WITH_CREDIT_CARD`, `RECORD_ORDER_MANUAL_PAYMENT`, `CHARGE_WITH_INVOICE`, or `EXTENSION` |
160
- | `menuOption.componentId` | String | Component ID when `EXTENSION` key is triggered |
161
- - **Multi-plugin:** Sequential modals, each appearing before the default modal
162
150
  - **Use case:** Add items to an order such as additional items, notes, or extra fees.
163
151
 
164
- > **Note:** This slot also appears on the Wix Bookings Calendar Page.
165
-
166
152
  ---
167
153
 
168
154
  ## Wix Events
@@ -221,7 +221,7 @@ export default function PluginSettingsPage() {
221
221
 
222
222
  ## Wix Data API Integration
223
223
 
224
- When using Wix Data API in plugins, handle the Wix Editor environment:
224
+ When using Wix Data API in plugins, handle the Wix Editor environment. This example imports `@wix/site-window` — install it first (`npm install @wix/site-window`), since it's not part of the CLI's default scaffolded `package.json`:
225
225
 
226
226
  ```typescript
227
227
  import { items } from "@wix/data";