@lacneu/wix-openclaw 0.1.1 → 0.2.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +186 -74
  3. package/dist/tools/_query.d.ts +117 -0
  4. package/dist/tools/_query.js +240 -0
  5. package/dist/tools/_query.js.map +1 -0
  6. package/dist/tools/blog.d.ts +92 -0
  7. package/dist/tools/blog.js +122 -20
  8. package/dist/tools/blog.js.map +1 -1
  9. package/dist/tools/bookings.d.ts +18 -22
  10. package/dist/tools/bookings.js +28 -19
  11. package/dist/tools/bookings.js.map +1 -1
  12. package/dist/tools/contacts.d.ts +20 -2
  13. package/dist/tools/contacts.js +27 -16
  14. package/dist/tools/contacts.js.map +1 -1
  15. package/dist/tools/data.d.ts +14 -2
  16. package/dist/tools/data.js +22 -35
  17. package/dist/tools/data.js.map +1 -1
  18. package/dist/tools/events.d.ts +44 -4
  19. package/dist/tools/events.js +29 -28
  20. package/dist/tools/events.js.map +1 -1
  21. package/dist/tools/faq.d.ts +12 -0
  22. package/dist/tools/faq.js +15 -9
  23. package/dist/tools/faq.js.map +1 -1
  24. package/dist/tools/forms.d.ts +24 -4
  25. package/dist/tools/forms.js +38 -25
  26. package/dist/tools/forms.js.map +1 -1
  27. package/dist/tools/media.d.ts +4 -0
  28. package/dist/tools/media.js +32 -23
  29. package/dist/tools/media.js.map +1 -1
  30. package/dist/tools/multilingual.d.ts +21 -1
  31. package/dist/tools/multilingual.js +16 -18
  32. package/dist/tools/multilingual.js.map +1 -1
  33. package/dist/tools/reviews.d.ts +22 -2
  34. package/dist/tools/reviews.js +18 -16
  35. package/dist/tools/reviews.js.map +1 -1
  36. package/dist/tools/site.d.ts +20 -0
  37. package/dist/tools/site.js +17 -25
  38. package/dist/tools/site.js.map +1 -1
  39. package/examples/recommended-skill.md +188 -0
  40. package/openclaw.plugin.json +1 -1
  41. package/package.json +2 -1
@@ -4,19 +4,39 @@ export declare function buildReviewsTools(client: WixClient): ({
4
4
  description: string;
5
5
  label: string;
6
6
  parameters: import("@sinclair/typebox").TObject<{
7
- siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
8
- moderationStatus: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"PENDING">, import("@sinclair/typebox").TLiteral<"APPROVED">, import("@sinclair/typebox").TLiteral<"REJECTED">]>>;
7
+ filter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
8
+ sort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
9
+ fieldName: import("@sinclair/typebox").TString;
10
+ order: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ASC">, import("@sinclair/typebox").TLiteral<"DESC">]>>;
11
+ }>>>;
9
12
  paging: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
10
13
  limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
11
14
  offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
12
15
  }>>;
16
+ cursorPaging: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
17
+ limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
18
+ cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
19
+ }>>;
20
+ fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
21
+ siteId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
22
+ moderationStatus: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"PENDING">, import("@sinclair/typebox").TLiteral<"APPROVED">, import("@sinclair/typebox").TLiteral<"REJECTED">]>>;
13
23
  }>;
14
24
  execute: (toolCallId: string, params: {
25
+ sort?: {
26
+ order?: "ASC" | "DESC" | undefined;
27
+ fieldName: string;
28
+ }[] | undefined;
29
+ filter?: unknown;
15
30
  siteId?: string | undefined;
16
31
  paging?: {
17
32
  limit?: number | undefined;
18
33
  offset?: number | undefined;
19
34
  } | undefined;
35
+ cursorPaging?: {
36
+ limit?: number | undefined;
37
+ cursor?: string | undefined;
38
+ } | undefined;
39
+ fields?: string[] | undefined;
20
40
  moderationStatus?: "PENDING" | "APPROVED" | "REJECTED" | undefined;
21
41
  }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
22
42
  status: "ok" | "failed";
@@ -4,14 +4,20 @@
4
4
  // Without it, calls return HTTP 428 `APP_NOT_INSTALLED`. Endpoint paths
5
5
  // pattern-validated against the public docs; untested live (app not
6
6
  // installed on the smoke-test site).
7
+ //
8
+ // `wix_reviews_list` is a POST `/query` and accepts the standard Wix
9
+ // query envelope.
7
10
  import { Type } from "@sinclair/typebox";
8
11
  import { defineWixTool } from "./_factory.js";
12
+ import { WixQueryBodyEnvelopeSchema, buildQueryBody, } from "./_query.js";
9
13
  const SiteIdParam = Type.Optional(Type.String());
10
14
  export function buildReviewsTools(client) {
11
15
  return [
12
16
  defineWixTool({
13
17
  name: "wix_reviews_list",
14
- description: "List reviews. Filter by moderation status if needed.",
18
+ description: "List reviews. Pass `moderationStatus` for the common case or " +
19
+ "`filter` for finer queries (rating ranges, productId, " +
20
+ "createdDate, ...). Accepts the standard Wix query envelope.",
15
21
  parameters: Type.Object({
16
22
  siteId: SiteIdParam,
17
23
  moderationStatus: Type.Optional(Type.Union([
@@ -19,22 +25,18 @@ export function buildReviewsTools(client) {
19
25
  Type.Literal("APPROVED"),
20
26
  Type.Literal("REJECTED"),
21
27
  ])),
22
- paging: Type.Optional(Type.Object({
23
- limit: Type.Optional(Type.Number({ minimum: 1, maximum: 100 })),
24
- offset: Type.Optional(Type.Number({ minimum: 0 })),
25
- })),
26
- }),
27
- run: (params) => client.request("POST", "/reviews/v1/reviews/query", {
28
- siteId: params.siteId,
29
- body: {
30
- query: {
31
- filter: params.moderationStatus
32
- ? { moderationStatus: params.moderationStatus }
33
- : undefined,
34
- paging: params.paging,
35
- },
36
- },
28
+ ...WixQueryBodyEnvelopeSchema.properties,
37
29
  }),
30
+ run: (params) => {
31
+ const { siteId, moderationStatus, ...envelope } = params;
32
+ const extra = moderationStatus
33
+ ? { moderationStatus: { $eq: moderationStatus } }
34
+ : undefined;
35
+ return client.request("POST", "/reviews/v1/reviews/query", {
36
+ siteId,
37
+ body: buildQueryBody(envelope, extra),
38
+ });
39
+ },
38
40
  }, client),
39
41
  defineWixTool({
40
42
  name: "wix_reviews_get",
@@ -1 +1 @@
1
- {"version":3,"file":"reviews.js","sourceRoot":"","sources":["../../src/tools/reviews.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,EAAE;AACF,mEAAmE;AACnE,wEAAwE;AACxE,oEAAoE;AACpE,qCAAqC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AAEjD,MAAM,UAAU,iBAAiB,CAAC,MAAiB;IACjD,OAAO;QACL,aAAa,CACX;YACE,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,sDAAsD;YACnE,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;gBACtB,MAAM,EAAE,WAAW;gBACnB,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAC7B,IAAI,CAAC,KAAK,CAAC;oBACT,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;oBACvB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;oBACxB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;iBACzB,CAAC,CACH;gBACD,MAAM,EAAE,IAAI,CAAC,QAAQ,CACnB,IAAI,CAAC,MA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,MAAM,CAAC,QAAQ,CAAC,EAAE,EAC5D,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAC1B;SACJ,EACD,MAAM,CACP;QAED,aAAa,CACX;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EACT,qDAAqD;YACvD,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;gBACtB,MAAM,EAAE,WAAW;gBACnB,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;gBACvB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC;oBACnB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;oBACxB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;iBACzB,CAAC;gBACF,MAAM,EAAE,IAAI,CAAC,QAAQ,CACnB,IAAI,CAAC,MAAM,CAAC;oBACV,WAAW,EACT,2DAA2D;iBAC9D,CAAC,CACH;aACF,CAAC;YACF,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE;gBACd,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;gBACnE,OAAO,MAAM,CAAC,OAAO,CACnB,MAAM,EACN,uBAAuB,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,EACpE;oBACE,MAAM,EAAE,MAAM,CAAC,MAAM;oBACrB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE;iBACrD,CACF,CAAC;YACJ,CAAC;SACF,EACD,MAAM,CACP;KACF,CAAC;AACJ,CAAC"}
@@ -4,16 +4,36 @@ export declare function buildSiteTools(client: WixClient): ({
4
4
  description: string;
5
5
  label: string;
6
6
  parameters: import("@sinclair/typebox").TObject<{
7
+ filter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
8
+ sort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
9
+ fieldName: import("@sinclair/typebox").TString;
10
+ order: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ASC">, import("@sinclair/typebox").TLiteral<"DESC">]>>;
11
+ }>>>;
7
12
  paging: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
8
13
  limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
9
14
  offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
10
15
  }>>;
16
+ cursorPaging: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
17
+ limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
18
+ cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
19
+ }>>;
20
+ fields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
11
21
  }>;
12
22
  execute: (toolCallId: string, params: {
23
+ sort?: {
24
+ order?: "ASC" | "DESC" | undefined;
25
+ fieldName: string;
26
+ }[] | undefined;
27
+ filter?: unknown;
13
28
  paging?: {
14
29
  limit?: number | undefined;
15
30
  offset?: number | undefined;
16
31
  } | undefined;
32
+ cursorPaging?: {
33
+ limit?: number | undefined;
34
+ cursor?: string | undefined;
35
+ } | undefined;
36
+ fields?: string[] | undefined;
17
37
  }, signal?: AbortSignal) => Promise<import("@mariozechner/pi-agent-core").AgentToolResult<{
18
38
  status: "ok" | "failed";
19
39
  data?: unknown;
@@ -1,40 +1,34 @@
1
1
  // Wix Sites + Site Properties tools (read-only).
2
2
  //
3
3
  // `wix_sites_list` and `wix_site_url_get` are account-scoped — they hit
4
- // the Site List API and Published Site URLs API and require the
5
- // `wix-account-id` header (siteScoped: false).
4
+ // the Site List API and require the `wix-account-id` header
5
+ // (siteScoped: false). The query endpoint accepts the full Wix query
6
+ // envelope (filter on `metaSiteId`, `displayName`, `published`, ...).
7
+ //
6
8
  // `wix_business_info_get` reads from the Site Properties API and is
7
- // site-scoped.
9
+ // site-scoped (flat GET, no filter envelope).
8
10
  //
9
11
  // Verified against:
10
12
  // - https://dev.wix.com/docs/rest/account-level/sites/sites/query-sites
11
- // - https://dev.wix.com/docs/api-reference/business-management/site-urls/published-site-urls/list-published-site-urls
12
13
  // - https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties
13
14
  import { Type } from "@sinclair/typebox";
14
15
  import { defineWixTool } from "./_factory.js";
16
+ import { WixQueryBodyEnvelopeSchema, buildQueryBody, } from "./_query.js";
15
17
  export function buildSiteTools(client) {
16
18
  return [
17
19
  defineWixTool({
18
20
  name: "wix_sites_list",
19
- description: "Query Wix sites under the configured account. Account-scoped no site id required. Returns up to 1,000 sites.",
21
+ description: "Query Wix sites under the configured account. Account-scoped " +
22
+ "— no site id required. Accepts the standard Wix query envelope" +
23
+ "(filter on `metaSiteId`, `displayName`, `published`, " +
24
+ "`domainConnected`; sort; offset paging up to 1,000 sites; " +
25
+ "field projection).",
20
26
  parameters: Type.Object({
21
- paging: Type.Optional(Type.Object({
22
- limit: Type.Optional(Type.Number({ minimum: 1, maximum: 1000 })),
23
- offset: Type.Optional(Type.Number({ minimum: 0 })),
24
- })),
27
+ ...WixQueryBodyEnvelopeSchema.properties,
25
28
  }),
26
29
  run: (params) => client.request("POST", "/site-list/v2/sites/query", {
27
30
  siteScoped: false,
28
- body: {
29
- query: {
30
- paging: params.paging
31
- ? {
32
- limit: params.paging.limit,
33
- offset: params.paging.offset,
34
- }
35
- : undefined,
36
- },
37
- },
31
+ body: buildQueryBody(params),
38
32
  }),
39
33
  }, client),
40
34
  defineWixTool({
@@ -57,12 +51,10 @@ export function buildSiteTools(client) {
57
51
  }
58
52
  const resp = await client.request("POST", "/site-list/v2/sites/query", {
59
53
  siteScoped: false,
60
- body: {
61
- query: {
62
- filter: { metaSiteId: targetId },
63
- paging: { limit: 1 },
64
- },
65
- },
54
+ body: buildQueryBody({
55
+ filter: { metaSiteId: { $eq: targetId } },
56
+ paging: { limit: 1 },
57
+ }),
66
58
  });
67
59
  const site = resp?.sites?.[0];
68
60
  if (!site) {
@@ -1 +1 @@
1
- {"version":3,"file":"site.js","sourceRoot":"","sources":["../../src/tools/site.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,wEAAwE;AACxE,gEAAgE;AAChE,+CAA+C;AAC/C,oEAAoE;AACpE,eAAe;AACf,EAAE;AACF,oBAAoB;AACpB,0EAA0E;AAC1E,wHAAwH;AACxH,uGAAuG;AAEvG,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,UAAU,cAAc,CAAC,MAAiB;IAC9C,OAAO;QACL,aAAa,CACX;YACE,IAAI,EAAE,gBAAgB;YACtB,WAAW,EACT,gHAAgH;YAClH,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;gBACtB,MAAM,EAAE,IAAI,CAAC,QAAQ,CACnB,IAAI,CAAC,MAAM,CAAC;oBACV,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;oBAChE,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;iBACnD,CAAC,CACH;aACF,CAAC;YACF,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,CACd,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,2BAA2B,EAAE;gBAClD,UAAU,EAAE,KAAK;gBACjB,IAAI,EAAE;oBACJ,KAAK,EAAE;wBACL,MAAM,EAAE,MAAM,CAAC,MAAM;4BACnB,CAAC,CAAC;gCACE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC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AAQ,6BAA6B,EAAE,CAAC;gBAClE,CAAC;gBACD,OAAO;oBACL,MAAM,EAAE,IAAI,CAAC,EAAE;oBACf,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,OAAO,EAAE,IAAI,CAAC,OAAO;oBACrB,SAAS,EAAE,IAAI,CAAC,SAAS;oBACzB,eAAe,EAAE,IAAI,CAAC,eAAe;oBACrC,OAAO,EAAE,IAAI,CAAC,OAAO;iBACtB,CAAC;YACJ,CAAC;SACF,EACD,MAAM,CACP;QAED,aAAa,CACX;YACE,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EACT,sHAAsH;YACxH,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;gBACtB,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;aACrC,CAAC;YACF,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,CACd,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,gCAAgC,EAAE;gBACtD,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC;SACL,EACD,MAAM,CACP;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,188 @@
1
+ ---
2
+ name: wix
3
+ description: Site officiel <YOUR_SITE_NAME> (<your-site.com>) sur Wix — articles de blog, brouillons, médias, formulaires/leads, RDV, services, FAQ, avis. Utilise ce skill quand l'utilisateur dit "publier un article", "brouillon de blog", "ajouter une image au site", "voir les leads", "soumissions de formulaire", "modifier les services", "répondre à un avis", "FAQ", "<your-site.com>", "site officiel".
4
+ user-invocable: true
5
+ ---
6
+
7
+ # Wix — Recommended skill template
8
+
9
+ > **This is a template** — copy it to your workspace
10
+ > (`~/.openclaw/workspace-<agent>/skills/wix/SKILL.md`), then replace every
11
+ > `<PLACEHOLDER>` with values specific to your site and organisation.
12
+ > Skills are loaded per workspace, so duplicate the file for each agent
13
+ > that should benefit from it.
14
+
15
+ This skill gives an OpenClaw agent the business context, recipes and
16
+ behavioural guardrails it needs to operate the
17
+ [`@lacneu/wix-openclaw`](https://www.npmjs.com/package/@lacneu/wix-openclaw)
18
+ plugin correctly. The plugin itself ships generic tools; this skill wraps
19
+ them into your specific site, voice and audience.
20
+
21
+ ## Business context (replace with yours)
22
+
23
+ `<ORGANIZATION>` is `<short pitch — what you do, who you serve>`. The
24
+ public site `<your-site.com>` runs on **Wix Editor classic** (the plugin
25
+ also targets Wix Studio sites — adjust if relevant). It is locked at the
26
+ plugin level to a single `siteId` (set in `allowedSiteIds`).
27
+
28
+ **Tone for site content** — `<sober / playful / formal / informal>`,
29
+ `<language>`, `<audience>`. Preserve the voice of the human contributors
30
+ when they dictate or proofread; do not normalize their phrasing.
31
+
32
+ **Site language** — `<fr / en / ...>`.
33
+
34
+ **Human contributors / collaborators** — list them with their role:
35
+
36
+ - `<Name 1>` — `<role>`
37
+ - `<Name 2>` — `<role>`
38
+ - `<...>`
39
+
40
+ ## Conversational triggers (when this skill is relevant)
41
+
42
+ - "Publish an article about X" / "Publier un article sur X"
43
+ - "Prepare a draft about Y" / "Prépare un brouillon sur Y"
44
+ - "Add this image to the site" / "Ajoute cette image au site"
45
+ - "How many leads this week?" / "Combien de leads cette semaine ?"
46
+ - "Update this service" / "Mets à jour ce service"
47
+ - "What appointments today?" / "Quels RDV aujourd'hui ?"
48
+ - "Reply to this review" / "Réponds à cet avis"
49
+ - "Add this FAQ entry" / "Ajoute cette question à la FAQ"
50
+ - Any mention of `<your-site.com>`, "Wix", "official site", "site officiel"
51
+
52
+ ## When this skill does NOT apply
53
+
54
+ The plugin **cannot** modify the site's design (Wix Editor classic does
55
+ not expose this through any public API):
56
+
57
+ - Colours, typography, page layout
58
+ - Individual graphic components (buttons, sections, backgrounds)
59
+ - Page structure (navigation, header, footer)
60
+
61
+ Pure-design requests should be redirected to the **(e) Design request**
62
+ recipe below.
63
+
64
+ ## Usage patterns
65
+
66
+ ### (a) Draft and publish a blog article
67
+
68
+ 1. **Cover image** — if the user provides a URL (or asks for an
69
+ AI-generated image): use `wix_media_upload` to push it into Wix Media
70
+ Manager. Capture the returned `id` for step 2.
71
+ 2. **Create draft** — `wix_blog_create_draft` with:
72
+ - `title`
73
+ - `richContent` (Wix Ricos format — Wix Blog's native rich-text)
74
+ - `coverMedia.imageId` from step 1
75
+ - `tagIds`, `categoryIds` if appropriate (look them up first via
76
+ `wix_blog_list_tags` / `wix_blog_list_categories`)
77
+ 3. **User-facing recap** — show this in plain business language, NEVER
78
+ mention tool names or HTTP details:
79
+
80
+ > Draft ready:
81
+ > **Title**: <title>
82
+ > **Lead paragraph**: <first ~80 words>
83
+ > **Cover image**: <displayName or short description>
84
+ > **Tags**: <readable list>
85
+ >
86
+ > Reply `publish` to go live, or tell me what to adjust.
87
+
88
+ 4. **Publish on explicit confirmation only** — `wix_blog_publish_draft`
89
+ with the draft id. OpenClaw approval-gates this call; the recap above
90
+ helps the human decide knowingly.
91
+
92
+ ### (b) List actual drafts (not the published-post snapshots)
93
+
94
+ Wix Blog v3 quirk: `wix_blog_list_drafts` without filter returns mirror
95
+ drafts for already-published posts (auto-snapshots).
96
+
97
+ To see only **drafts being actively written**: pass `status: "UNPUBLISHED"`.
98
+ Other useful values: `IN_REVIEW`, `SCHEDULED`.
99
+
100
+ If the user asks "how many drafts do I have?" and the unfiltered count
101
+ looks unexpectedly large, explain in plain words ("some are mirror
102
+ copies of published articles") and re-query with `status: "UNPUBLISHED"`.
103
+
104
+ ### (c) Read form submissions / leads
105
+
106
+ - `wix_forms_list_submissions` with:
107
+ - `namespace: "wix.form_app.form"` (default — keep unless using a
108
+ custom forms app)
109
+ - `paging.limit: 20` (or more)
110
+ - `sort` to put recent first when supported
111
+
112
+ Present leads in business language (name, email, message, date). Do not
113
+ expose technical `id`s.
114
+
115
+ ### (d) Manage bookings
116
+
117
+ - `wix_bookings_services_list` — list bookable services
118
+ - `wix_bookings_query_bookings` with a `startDate` filter (e.g.
119
+ `$gt: "2026-01-01T00:00:00Z"`) for upcoming bookings
120
+ - `wix_bookings_cancel` / `wix_bookings_reschedule` — both gated; ask for
121
+ explicit confirmation before invoking.
122
+
123
+ ### (e) Design request (assumed limitation)
124
+
125
+ If the user asks for a visual change (colour, layout, styled button…),
126
+ respond along these lines:
127
+
128
+ > I can't change the site's visual components directly (Wix Editor
129
+ > classic doesn't expose that via API). I can however prepare a design
130
+ > brief (palette, typography, suggested copy) and generate a mockup
131
+ > image — you'll then apply it manually in the Wix editor. Want to go
132
+ > that route?
133
+
134
+ If yes: use `wix_design_brief` to structure the brief, then
135
+ `image_generate` (or your preferred image-gen tool) for the mockup.
136
+
137
+ ## Behavioural guardrails
138
+
139
+ 1. **Before any publication** (`wix_blog_publish_draft`, modifying
140
+ `wix_bookings_*`, public review replies) — always show a business
141
+ recap and wait for explicit confirmation. OpenClaw gates the HTTP
142
+ call already; the recap helps the human decide.
143
+ 2. **"App not installed" / `428` / `404` / "Wix Code not enabled"** — do
144
+ not insist or retry. Explain in plain terms that the relevant Wix app
145
+ must be activated in the
146
+ [Wix App Market](https://www.wix.com/app-market). Apps concerned: Wix
147
+ Events, Wix Reviews, Wix FAQ, Wix Multilingual, Velo (for
148
+ `wix_data_*`).
149
+ 3. **Site whitelist** — the plugin is locked to `<your_site_id>`. Any
150
+ other `siteId` is rejected before reaching Wix. Do not try to bypass.
151
+ 4. **PII / sensitive data** — form submissions and contacts contain
152
+ names, emails, phone numbers, sometimes confidential messages. **Do
153
+ not log, do not embed in long-term knowledge stores** (vector DB,
154
+ shared memory) without explicit user consent. Surface only what is
155
+ asked.
156
+
157
+ ## Available tools (short mapping)
158
+
159
+ - **Blog** — drafts (create, list, update, publish), posts, categories,
160
+ tags
161
+ - **Media** — upload, list
162
+ - **Site** — `sites_list`, `url_get`, `business_info`
163
+ - **CMS / Wix Data** — collections, items CRUD (requires Velo enabled)
164
+ - **Forms** — `submissions` (list, get)
165
+ - **Contacts** — CRUD + labels + search
166
+ - **Bookings** — services, bookings (CRUD, cancel, reschedule)
167
+ - **Events** (requires Wix Events app)
168
+ - **Reviews** (requires Wix Reviews app) — moderation, replies
169
+ - **FAQ** (requires Wix FAQ app)
170
+ - **Multilingual** (requires Wix Multilingual app)
171
+ - **Design** — `wix_design_brief`
172
+
173
+ Full reference and live signatures:
174
+ <https://github.com/OlivierNeu/wix-openclaw-plugin#tools>
175
+
176
+ ## Operating rules
177
+
178
+ 1. **Voice of `<ORGANIZATION>` first** — preserve phrasings dictated by
179
+ `<contributors>`, do not normalize them.
180
+ 2. **No technical jargon to end-users** — never expose tool names
181
+ (`wix_*`), Wix object ids, or HTTP error codes. Rephrase in business
182
+ terms.
183
+ 3. **Explicit confirmation** before any public-facing publication or
184
+ modification.
185
+ 4. **Single source of truth** — the official site at `<your-site.com>`.
186
+ Do not attempt other `siteId`s.
187
+ 5. **Unexpected behaviour** — escalate to the operator (admin agent /
188
+ maintainer) in a separate session, not in the user-facing channel.
@@ -2,7 +2,7 @@
2
2
  "id": "wix-openclaw",
3
3
  "name": "Wix",
4
4
  "description": "Wix REST API plugin for OpenClaw — manage blog, CMS data, forms, bookings, contacts, events, FAQ on a single Wix site with site_id whitelist and approval gating on destructive ops",
5
- "version": "0.1.1",
5
+ "version": "0.2.1",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lacneu/wix-openclaw",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "Wix REST API plugin for OpenClaw — manage blog, CMS data, forms, bookings, contacts, events, FAQ on a single Wix site with site_id whitelist and approval gating on destructive ops",
6
6
  "license": "MIT",
@@ -29,6 +29,7 @@
29
29
  "types": "./dist/index.d.ts",
30
30
  "files": [
31
31
  "dist",
32
+ "examples",
32
33
  "openclaw.plugin.json",
33
34
  "README.md",
34
35
  "CHANGELOG.md",