@usethrottle/mcp 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mcp.js CHANGED
@@ -175,6 +175,7 @@ function add(group, resource, actions, labels, opts = {}) {
175
175
  }
176
176
  add("Orders", "orders", ["read", "write"], { read: "View orders", write: "Manage orders" });
177
177
  add("Quotes", "quotes", ["read", "write"], { read: "View quotes", write: "Manage quotes" });
178
+ add("Forms", "forms", ["read", "write"], { read: "View site forms and their submissions", write: "Manage site forms" }, { sensitive: true });
178
179
  add("Orders", "order_cancellations", ["write"], { write: "Cancel orders" });
179
180
  add("Orders", "order_returns", ["read", "write"], { read: "View returns", write: "Process returns" });
180
181
  add("Orders", "order_comps", ["write"], { write: "Comp orders (write off the balance)" }, { sensitive: true });
@@ -343,6 +344,7 @@ var PREFIX_RULES = [
343
344
  ["cart.", "carts:read"],
344
345
  ["order.", "orders:read"],
345
346
  ["quote.", "quotes:read"],
347
+ ["form.", "forms:read"],
346
348
  ["return.", "order_returns:read"],
347
349
  ["payment.", "payments:read"],
348
350
  ["customer_group.", "customer_groups:read"],
@@ -1616,7 +1618,9 @@ var ACTIONS = [
1616
1618
  { name: "name", type: "string", required: true, description: "Group name, 1 to 100 characters." },
1617
1619
  { name: "kind", type: "string", required: true, description: "fixed or percent." },
1618
1620
  { name: "percentBps", type: "number", required: false, description: "Percent rate in basis points, 1-10000. Required for percent groups." },
1619
- { name: "enabled", type: "boolean", required: false, description: "Whether the group is active.", default: true }
1621
+ { name: "enabled", type: "boolean", required: false, description: "Whether the group is active.", default: true },
1622
+ { name: "taxExempt", type: "boolean", required: false, description: "Members are exempt from tax. Needs taxExemptReason.", default: false },
1623
+ { name: "taxExemptReason", type: "string", required: false, description: "Avalara entity-use code (A-R) that explains the exemption. Required when taxExempt is true." }
1620
1624
  ],
1621
1625
  requests: [{ method: "POST", path: "/api/v1/customer-groups" }],
1622
1626
  channels: ["mcp"],
@@ -1633,7 +1637,9 @@ var ACTIONS = [
1633
1637
  { name: "name", type: "string", required: false, description: "Group name, 1 to 100 characters." },
1634
1638
  { name: "kind", type: "string", required: false, description: "fixed or percent." },
1635
1639
  { name: "percentBps", type: "number", required: false, description: "Percent rate in basis points, 1-10000. To make the group fixed, set kind to fixed (the rate is cleared)." },
1636
- { name: "enabled", type: "boolean", required: false, description: "Whether the group is active." }
1640
+ { name: "enabled", type: "boolean", required: false, description: "Whether the group is active." },
1641
+ { name: "taxExempt", type: "boolean", required: false, description: "Members are exempt from tax. Needs taxExemptReason." },
1642
+ { name: "taxExemptReason", type: "string", required: false, description: "Avalara entity-use code (A-R). Set null to clear when taxExempt is false." }
1637
1643
  ],
1638
1644
  requests: [{ method: "PATCH", path: "/api/v1/customer-groups/:id" }],
1639
1645
  channels: ["mcp"],
@@ -2530,13 +2536,27 @@ var HANDLERS = {
2530
2536
  list_customer_groups: async (ctx) => ctx.client.get("/api/v1/customer-groups"),
2531
2537
  get_customer_group: async (ctx, args) => ctx.client.get(`/api/v1/customer-groups/${String(args.id)}`),
2532
2538
  create_customer_group: async (ctx, args) => ctx.client.post("/api/v1/customer-groups", {
2533
- body: { name: args.name, kind: args.kind, percentBps: args.percentBps, enabled: args.enabled },
2539
+ body: {
2540
+ name: args.name,
2541
+ kind: args.kind,
2542
+ percentBps: args.percentBps,
2543
+ enabled: args.enabled,
2544
+ taxExempt: args.taxExempt,
2545
+ taxExemptReason: args.taxExemptReason
2546
+ },
2534
2547
  // Never put the merchant-written name in a header: non-Latin-1 chars make fetch throw.
2535
2548
  idempotencyKey: `mcp-create-customer-group-${Date.now()}-${randomUUID()}`
2536
2549
  }),
2537
2550
  // A null percentBps is meaningful (fixed group), so only `undefined` is dropped.
2538
2551
  update_customer_group: async (ctx, args) => ctx.client.patch(`/api/v1/customer-groups/${String(args.id)}`, {
2539
- body: { name: args.name, kind: args.kind, percentBps: args.percentBps, enabled: args.enabled }
2552
+ body: {
2553
+ name: args.name,
2554
+ kind: args.kind,
2555
+ percentBps: args.percentBps,
2556
+ enabled: args.enabled,
2557
+ taxExempt: args.taxExempt,
2558
+ taxExemptReason: args.taxExemptReason
2559
+ }
2540
2560
  }),
2541
2561
  delete_customer_group: async (ctx, args) => ctx.client.delete(`/api/v1/customer-groups/${String(args.id)}`),
2542
2562
  add_customer_group_members: async (ctx, args) => ctx.client.post(`/api/v1/customer-groups/${String(args.id)}/members`, {
@@ -3550,6 +3570,8 @@ var CUSTOMER_GROUP = {
3550
3570
  kind: S,
3551
3571
  percentBps: S,
3552
3572
  enabled: S,
3573
+ taxExempt: S,
3574
+ taxExemptReason: T,
3553
3575
  version: S,
3554
3576
  memberCount: S,
3555
3577
  discountCount: S,
@@ -4024,7 +4046,7 @@ var OAUTH_PROJECTIONS = {
4024
4046
  };
4025
4047
 
4026
4048
  // src/server.ts
4027
- var VERSION = true ? "0.7.0" : "0.0.0-dev";
4049
+ var VERSION = true ? "0.8.0" : "0.0.0-dev";
4028
4050
  function registerableActions(policy) {
4029
4051
  const isProduction = policy.identity.environment.providerEnvironment === "production";
4030
4052
  return actionsForChannel("mcp").filter((action) => {