@5ss/ai-tools 3.5.0 → 3.5.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 CHANGED
@@ -4,6 +4,8 @@ All notable changes to `@5ss/ai-tools` are documented here.
4
4
 
5
5
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Releases are cut by [semantic-release](https://semantic-release.gitbook.io/) from [conventional commits](https://www.conventionalcommits.org/).
6
6
 
7
+ ## [3.5.1](https://github.com/five-star-solutions-co/ai-tools/compare/v3.5.0...v3.5.1) (2026-08-27)
8
+
7
9
  ## [3.5.0](https://github.com/five-star-solutions-co/ai-tools/compare/v3.4.0...v3.5.0) (2026-08-27)
8
10
 
9
11
  ### Features
@@ -864,31 +864,31 @@ declare const woocommerceGetProductCategoryOutputSchema: z.ZodObject<{
864
864
  }, z.core.$strip>;
865
865
  declare const woocommerceRawRecordSchema: z.ZodObject<{
866
866
  id: z.ZodNumber;
867
- date_created: z.ZodOptional<z.ZodString>;
868
- date_created_gmt: z.ZodOptional<z.ZodString>;
869
- date_modified: z.ZodOptional<z.ZodString>;
870
- date_modified_gmt: z.ZodOptional<z.ZodString>;
867
+ date_created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
868
+ date_created_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
869
+ date_modified: z.ZodOptional<z.ZodNullable<z.ZodString>>;
870
+ date_modified_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
871
871
  }, z.core.$loose>;
872
872
  declare const woocommerceOrderRawSchema: z.ZodObject<{
873
873
  id: z.ZodNumber;
874
- date_created: z.ZodOptional<z.ZodString>;
875
- date_created_gmt: z.ZodOptional<z.ZodString>;
876
- date_modified: z.ZodOptional<z.ZodString>;
877
- date_modified_gmt: z.ZodOptional<z.ZodString>;
874
+ date_created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
875
+ date_created_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
876
+ date_modified: z.ZodOptional<z.ZodNullable<z.ZodString>>;
877
+ date_modified_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
878
878
  }, z.core.$loose>;
879
879
  declare const woocommerceProductRawSchema: z.ZodObject<{
880
880
  id: z.ZodNumber;
881
- date_created: z.ZodOptional<z.ZodString>;
882
- date_created_gmt: z.ZodOptional<z.ZodString>;
883
- date_modified: z.ZodOptional<z.ZodString>;
884
- date_modified_gmt: z.ZodOptional<z.ZodString>;
881
+ date_created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
882
+ date_created_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
883
+ date_modified: z.ZodOptional<z.ZodNullable<z.ZodString>>;
884
+ date_modified_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
885
885
  }, z.core.$loose>;
886
886
  declare const woocommerceCustomerRawSchema: z.ZodObject<{
887
887
  id: z.ZodNumber;
888
- date_created: z.ZodOptional<z.ZodString>;
889
- date_created_gmt: z.ZodOptional<z.ZodString>;
890
- date_modified: z.ZodOptional<z.ZodString>;
891
- date_modified_gmt: z.ZodOptional<z.ZodString>;
888
+ date_created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
889
+ date_created_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
890
+ date_modified: z.ZodOptional<z.ZodNullable<z.ZodString>>;
891
+ date_modified_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
892
892
  }, z.core.$loose>;
893
893
  declare const woocommercePaginationSchema: z.ZodObject<{
894
894
  page: z.ZodInt;
@@ -924,10 +924,10 @@ declare const woocommerceListOrdersPageOutputSchema: z.ZodObject<{
924
924
  }, z.core.$strip>;
925
925
  items: z.ZodArray<z.ZodObject<{
926
926
  id: z.ZodNumber;
927
- date_created: z.ZodOptional<z.ZodString>;
928
- date_created_gmt: z.ZodOptional<z.ZodString>;
929
- date_modified: z.ZodOptional<z.ZodString>;
930
- date_modified_gmt: z.ZodOptional<z.ZodString>;
927
+ date_created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
928
+ date_created_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
929
+ date_modified: z.ZodOptional<z.ZodNullable<z.ZodString>>;
930
+ date_modified_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
931
931
  }, z.core.$loose>>;
932
932
  }, z.core.$strip>;
933
933
  declare const woocommerceListProductsPageInputSchema: z.ZodObject<{
@@ -960,10 +960,10 @@ declare const woocommerceListProductsPageOutputSchema: z.ZodObject<{
960
960
  }, z.core.$strip>;
961
961
  items: z.ZodArray<z.ZodObject<{
962
962
  id: z.ZodNumber;
963
- date_created: z.ZodOptional<z.ZodString>;
964
- date_created_gmt: z.ZodOptional<z.ZodString>;
965
- date_modified: z.ZodOptional<z.ZodString>;
966
- date_modified_gmt: z.ZodOptional<z.ZodString>;
963
+ date_created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
964
+ date_created_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
965
+ date_modified: z.ZodOptional<z.ZodNullable<z.ZodString>>;
966
+ date_modified_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
967
967
  }, z.core.$loose>>;
968
968
  }, z.core.$strip>;
969
969
  declare const woocommerceListCustomersPageInputSchema: z.ZodObject<{
@@ -993,10 +993,10 @@ declare const woocommerceListCustomersPageOutputSchema: z.ZodObject<{
993
993
  }, z.core.$strip>;
994
994
  items: z.ZodArray<z.ZodObject<{
995
995
  id: z.ZodNumber;
996
- date_created: z.ZodOptional<z.ZodString>;
997
- date_created_gmt: z.ZodOptional<z.ZodString>;
998
- date_modified: z.ZodOptional<z.ZodString>;
999
- date_modified_gmt: z.ZodOptional<z.ZodString>;
996
+ date_created: z.ZodOptional<z.ZodNullable<z.ZodString>>;
997
+ date_created_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
998
+ date_modified: z.ZodOptional<z.ZodNullable<z.ZodString>>;
999
+ date_modified_gmt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1000
1000
  }, z.core.$loose>>;
1001
1001
  }, z.core.$strip>;
1002
1002
  type WoocommerceAddress = z.infer<typeof woocommerceAddressSchema>;
@@ -421,10 +421,10 @@ const woocommerceCollectionTimeFields = {
421
421
  };
422
422
  const woocommerceRawRecordSchema = z.looseObject({
423
423
  id: z.number().int(),
424
- date_created: z.string().optional(),
425
- date_created_gmt: z.string().optional(),
426
- date_modified: z.string().optional(),
427
- date_modified_gmt: z.string().optional()
424
+ date_created: z.string().nullable().optional(),
425
+ date_created_gmt: z.string().nullable().optional(),
426
+ date_modified: z.string().nullable().optional(),
427
+ date_modified_gmt: z.string().nullable().optional()
428
428
  });
429
429
  const woocommerceOrderRawSchema = woocommerceRawRecordSchema;
430
430
  const woocommerceProductRawSchema = woocommerceRawRecordSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["#http","#request"],"sources":["../../../src/vendors/woocommerce/contracts.ts","../../../src/vendors/woocommerce/domain.ts","../../../src/vendors/woocommerce/client.ts","../../../src/vendors/woocommerce/module.ts"],"sourcesContent":["import { z } from 'zod'\n\nfunction isStoreOrigin(value: string): boolean {\n\ttry {\n\t\tconst url = new URL(value)\n\t\treturn (\n\t\t\turl.username === '' &&\n\t\t\turl.password === '' &&\n\t\t\t(url.pathname === '/' || url.pathname === '') &&\n\t\t\turl.search === '' &&\n\t\t\turl.hash === ''\n\t\t)\n\t} catch {\n\t\treturn false\n\t}\n}\n\nexport const woocommerceAuthSchema = z.object({\n\tstore_url: z\n\t\t.url()\n\t\t.refine(isStoreOrigin, { message: 'store_url must be an origin (no path, query, or fragment)' })\n\t\t.describe('WooCommerce store origin, for example https://shop.example.com (no trailing path)'),\n\tconsumer_key: z.string().min(1).describe('WooCommerce REST API consumer key'),\n\tconsumer_secret: z.string().min(1).describe('WooCommerce REST API consumer secret')\n})\n\nexport type WoocommerceAuth = z.infer<typeof woocommerceAuthSchema>\n\n// ── Shared ──────────────────────────────────────────────────────────────────\n\nconst listCursorFields = {\n\tcursor: z.string().min(1).optional().describe('Page number from a prior next_cursor'),\n\tlimit: z.int().min(1).max(100).optional().describe('Page size (1-100, default 10)')\n}\n\nexport const woocommerceAddressSchema = z.object({\n\tfirst_name: z.string().optional().describe('First name'),\n\tlast_name: z.string().optional().describe('Last name'),\n\tcompany: z.string().optional().describe('Company name'),\n\taddress_1: z.string().optional().describe('Address line 1'),\n\taddress_2: z.string().optional().describe('Address line 2'),\n\tcity: z.string().optional().describe('City'),\n\tstate: z.string().optional().describe('State / province code'),\n\tpostcode: z.string().optional().describe('Postal / ZIP code'),\n\tcountry: z.string().optional().describe('ISO country code'),\n\temail: z.string().optional().describe('Email (billing)'),\n\tphone: z.string().optional().describe('Phone')\n})\n\nexport const woocommerceMetaDataSchema = z.object({\n\tkey: z.string().min(1).describe('Meta key'),\n\tvalue: z.string().describe('Meta value as string')\n})\n\nexport const woocommerceLineItemInputSchema = z.object({\n\tid: z.int().positive().optional().describe('Existing line item id (updates)'),\n\tproduct_id: z.int().positive().optional().describe('Product id'),\n\tvariation_id: z.int().positive().optional().describe('Variation id when applicable'),\n\tquantity: z.int().min(0).optional().describe('Quantity'),\n\tname: z.string().min(1).optional().describe('Line item name override'),\n\tsku: z.string().min(1).optional().describe('SKU'),\n\tprice: z.string().min(1).optional().describe('Unit price as string'),\n\ttotal: z.string().min(1).optional().describe('Line total as string')\n})\n\n/** Order line item on read responses (list/get order). */\nexport const woocommerceOrderLineItemSchema = z.object({\n\tid: z.number().describe('Order line item id'),\n\tproduct_id: z.number().optional().describe('Product id'),\n\tvariation_id: z.number().optional().describe('Variation id when applicable'),\n\tquantity: z.number().optional().describe('Quantity'),\n\tname: z.string().optional().describe('Line item name'),\n\tsku: z.string().optional().describe('SKU'),\n\tprice: z.string().optional().describe('Unit price as string'),\n\ttotal: z.string().optional().describe('Line total as string')\n})\n\n/** Nested category on product read responses. */\nexport const woocommerceProductCategoryRefSchema = z.object({\n\tid: z.number().describe('Category id'),\n\tname: z.string().optional().describe('Category name'),\n\tslug: z.string().optional().describe('Category slug')\n})\n\n// ── Orders ──────────────────────────────────────────────────────────────────\n\nexport const woocommerceOrderSchema = z.object({\n\tid: z.number(),\n\tnumber: z.string(),\n\tstatus: z.string(),\n\tcurrency: z.string(),\n\ttotal: z.string(),\n\tdate_created: z.string().optional(),\n\tcustomer_id: z.number().optional(),\n\tpayment_method: z.string().optional(),\n\tpayment_method_title: z.string().optional(),\n\tcustomer_note: z.string().optional(),\n\tline_items: z.array(woocommerceOrderLineItemSchema).optional().describe('Order line items when returned by the store')\n})\n\nexport const woocommerceListOrdersInputSchema = z.object({\n\tstatus: z.string().min(1).optional().describe('Order status filter (e.g. processing, completed)'),\n\tafter: z.string().min(1).optional().describe('ISO 8601 datetime; orders created after this'),\n\tbefore: z.string().min(1).optional().describe('ISO 8601 datetime; orders created before this'),\n\tsearch: z.string().min(1).optional().describe('Search term (order number, customer, …)'),\n\tcustomer_id: z.int().positive().optional().describe('Filter by customer id'),\n\t...listCursorFields\n})\n\nexport const woocommerceListOrdersOutputSchema = z.object({\n\titems: z.array(woocommerceOrderSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetOrderInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id')\n})\n\nexport const woocommerceGetOrderOutputSchema = z.object({\n\torder: woocommerceOrderSchema\n})\n\nexport const woocommerceCreateOrderInputSchema = z.object({\n\tstatus: z.string().min(1).optional().describe('Order status (pending, processing, …)'),\n\tcustomer_id: z.int().positive().optional().describe('Existing customer id'),\n\tpayment_method: z.string().min(1).optional().describe('Payment method id'),\n\tpayment_method_title: z.string().min(1).optional().describe('Payment method title'),\n\tset_paid: z.boolean().optional().describe('Mark order as paid'),\n\tcustomer_note: z.string().optional().describe('Customer note'),\n\tbilling: woocommerceAddressSchema.optional().describe('Billing address'),\n\tshipping: woocommerceAddressSchema.optional().describe('Shipping address'),\n\tline_items: z.array(woocommerceLineItemInputSchema).min(1).optional().describe('Order line items'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Order meta data')\n})\n\nexport const woocommerceCreateOrderOutputSchema = woocommerceGetOrderOutputSchema\n\nexport const woocommerceUpdateOrderInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\tstatus: z.string().min(1).optional().describe('Order status'),\n\tcustomer_id: z.int().nonnegative().optional().describe('Customer id (0 clears guest link)'),\n\tpayment_method: z.string().min(1).optional().describe('Payment method id'),\n\tpayment_method_title: z.string().min(1).optional().describe('Payment method title'),\n\tset_paid: z.boolean().optional().describe('Mark order as paid'),\n\tcustomer_note: z.string().optional().describe('Customer note'),\n\tbilling: woocommerceAddressSchema.optional().describe('Billing address'),\n\tshipping: woocommerceAddressSchema.optional().describe('Shipping address'),\n\tline_items: z.array(woocommerceLineItemInputSchema).optional().describe('Line items (include id to update)'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Order meta data')\n})\n\nexport const woocommerceUpdateOrderOutputSchema = woocommerceGetOrderOutputSchema\n\nexport const woocommerceDeleteOrderInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\tforce: z.boolean().optional().describe('Permanently delete when true (default true)')\n})\n\nexport const woocommerceDeleteOrderOutputSchema = z.object({\n\tdeleted: z.boolean(),\n\tid: z.number()\n})\n\n// ── Order notes ─────────────────────────────────────────────────────────────\n\nexport const woocommerceOrderNoteSchema = z.object({\n\tid: z.number(),\n\tnote: z.string(),\n\tcustomer_note: z.boolean().optional(),\n\tdate_created: z.string().optional(),\n\tadded_by_user: z.boolean().optional()\n})\n\nexport const woocommerceListOrderNotesInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\ttype: z.enum(['any', 'customer', 'internal']).optional().describe('Note type filter (default any)'),\n\t...listCursorFields\n})\n\nexport const woocommerceListOrderNotesOutputSchema = z.object({\n\titems: z.array(woocommerceOrderNoteSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceCreateOrderNoteInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\tnote: z.string().min(1).describe('Note text'),\n\tcustomer_note: z.boolean().optional().describe('When true, note is visible to the customer'),\n\tadded_by_user: z.boolean().optional().describe('When true, note is attributed to a user')\n})\n\nexport const woocommerceCreateOrderNoteOutputSchema = z.object({\n\tnote: woocommerceOrderNoteSchema\n})\n\n// ── Order refunds ───────────────────────────────────────────────────────────\n\nexport const woocommerceOrderRefundSchema = z.object({\n\tid: z.number(),\n\tamount: z.string().optional(),\n\treason: z.string().optional(),\n\tdate_created: z.string().optional(),\n\trefunded_by: z.number().optional()\n})\n\nexport const woocommerceListOrderRefundsInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\t...listCursorFields\n})\n\nexport const woocommerceListOrderRefundsOutputSchema = z.object({\n\titems: z.array(woocommerceOrderRefundSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceCreateOrderRefundInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\tamount: z.string().min(1).optional().describe('Refund amount as string'),\n\treason: z.string().optional().describe('Refund reason'),\n\tapi_refund: z.boolean().optional().describe('When true, attempt payment gateway refund'),\n\tline_items: z\n\t\t.array(\n\t\t\tz.object({\n\t\t\t\tid: z.int().positive().describe('Order line item id to refund'),\n\t\t\t\tquantity: z.int().min(0).optional().describe('Quantity to refund'),\n\t\t\t\trefund_total: z.string().min(1).optional().describe('Amount to refund for this line')\n\t\t\t})\n\t\t)\n\t\t.optional()\n\t\t.describe('Optional per-line refunds')\n})\n\nexport const woocommerceCreateOrderRefundOutputSchema = z.object({\n\trefund: woocommerceOrderRefundSchema\n})\n\n// ── Products ────────────────────────────────────────────────────────────────\n\nexport const woocommerceProductSchema = z.object({\n\tid: z.number(),\n\tname: z.string(),\n\tsku: z.string().optional(),\n\ttype: z.string(),\n\tstatus: z.string(),\n\tprice: z.string().optional(),\n\tregular_price: z.string().optional(),\n\tsale_price: z.string().optional(),\n\tstock_status: z.string().optional(),\n\tstock_quantity: z.number().optional(),\n\tmanage_stock: z.boolean().optional(),\n\tcategories: z\n\t\t.array(woocommerceProductCategoryRefSchema)\n\t\t.optional()\n\t\t.describe('Product categories when returned by the store')\n})\n\nexport const woocommerceListProductsInputSchema = z.object({\n\tstatus: z.string().min(1).optional().describe('Product status (publish, draft, …)'),\n\tsearch: z.string().min(1).optional().describe('Search term'),\n\tsku: z.string().min(1).optional().describe('Exact SKU filter'),\n\tcategory: z.int().positive().optional().describe('Product category id'),\n\ttype: z.string().min(1).optional().describe('Product type (simple, variable, …)'),\n\tinclude: z\n\t\t.array(z.int().positive())\n\t\t.min(1)\n\t\t.max(100)\n\t\t.optional()\n\t\t.describe('Limit results to these product ids (WooCommerce include parameter)'),\n\t...listCursorFields\n})\n\nexport const woocommerceListProductsOutputSchema = z.object({\n\titems: z.array(woocommerceProductSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetProductInputSchema = z.object({\n\tproduct_id: z.int().positive().describe('WooCommerce product id')\n})\n\nexport const woocommerceGetProductOutputSchema = z.object({\n\tproduct: woocommerceProductSchema\n})\n\nexport const woocommerceCreateProductInputSchema = z.object({\n\tname: z.string().min(1).describe('Product name'),\n\ttype: z.string().min(1).optional().describe('Product type (simple, variable, grouped, external)'),\n\tstatus: z.string().min(1).optional().describe('Product status (draft, publish, …)'),\n\tsku: z.string().min(1).optional().describe('SKU'),\n\tregular_price: z.string().min(1).optional().describe('Regular price as string'),\n\tsale_price: z.string().optional().describe('Sale price as string'),\n\tdescription: z.string().optional().describe('Full HTML description'),\n\tshort_description: z.string().optional().describe('Short description'),\n\tmanage_stock: z.boolean().optional().describe('Whether stock is managed'),\n\tstock_quantity: z.int().optional().describe('Stock quantity when manage_stock is true'),\n\tstock_status: z.string().min(1).optional().describe('instock, outofstock, onbackorder'),\n\tcategories: z\n\t\t.array(z.object({ id: z.int().positive().describe('Category id') }))\n\t\t.optional()\n\t\t.describe('Category associations'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Product meta data')\n})\n\nexport const woocommerceCreateProductOutputSchema = woocommerceGetProductOutputSchema\n\nexport const woocommerceUpdateProductInputSchema = z.object({\n\tproduct_id: z.int().positive().describe('WooCommerce product id'),\n\tname: z.string().min(1).optional().describe('Product name'),\n\ttype: z.string().min(1).optional().describe('Product type'),\n\tstatus: z.string().min(1).optional().describe('Product status'),\n\tsku: z.string().optional().describe('SKU (empty string clears)'),\n\tregular_price: z.string().optional().describe('Regular price as string'),\n\tsale_price: z.string().optional().describe('Sale price as string'),\n\tdescription: z.string().optional().describe('Full HTML description'),\n\tshort_description: z.string().optional().describe('Short description'),\n\tmanage_stock: z.boolean().optional().describe('Whether stock is managed'),\n\tstock_quantity: z.int().optional().describe('Stock quantity'),\n\tstock_status: z.string().min(1).optional().describe('instock, outofstock, onbackorder'),\n\tcategories: z\n\t\t.array(z.object({ id: z.int().positive().describe('Category id') }))\n\t\t.optional()\n\t\t.describe('Category associations'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Product meta data')\n})\n\nexport const woocommerceUpdateProductOutputSchema = woocommerceGetProductOutputSchema\n\nexport const woocommerceDeleteProductInputSchema = z.object({\n\tproduct_id: z.int().positive().describe('WooCommerce product id'),\n\tforce: z.boolean().optional().describe('Permanently delete when true (default true)')\n})\n\nexport const woocommerceDeleteProductOutputSchema = z.object({\n\tdeleted: z.boolean(),\n\tid: z.number()\n})\n\n// ── Product variations ──────────────────────────────────────────────────────\n\nexport const woocommerceProductVariationSchema = z.object({\n\tid: z.number(),\n\tsku: z.string().optional(),\n\tprice: z.string().optional(),\n\tregular_price: z.string().optional(),\n\tsale_price: z.string().optional(),\n\tstatus: z.string().optional(),\n\tstock_status: z.string().optional(),\n\tstock_quantity: z.number().optional(),\n\tmanage_stock: z.boolean().optional()\n})\n\nexport const woocommerceListProductVariationsInputSchema = z.object({\n\tproduct_id: z.int().positive().describe('Parent product id'),\n\tstatus: z.string().min(1).optional().describe('Variation status filter'),\n\tsku: z.string().min(1).optional().describe('Exact SKU filter'),\n\t...listCursorFields\n})\n\nexport const woocommerceListProductVariationsOutputSchema = z.object({\n\titems: z.array(woocommerceProductVariationSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetProductVariationInputSchema = z.object({\n\tproduct_id: z.int().positive().describe('Parent product id'),\n\tvariation_id: z.int().positive().describe('Variation id')\n})\n\nexport const woocommerceGetProductVariationOutputSchema = z.object({\n\tvariation: woocommerceProductVariationSchema\n})\n\n// ── Customers ───────────────────────────────────────────────────────────────\n\nexport const woocommerceCustomerSchema = z.object({\n\tid: z.number(),\n\temail: z.string(),\n\tfirst_name: z.string().optional(),\n\tlast_name: z.string().optional(),\n\tusername: z.string().optional(),\n\trole: z.string().optional(),\n\tdate_created: z.string().optional()\n})\n\nexport const woocommerceListCustomersInputSchema = z.object({\n\tsearch: z.string().min(1).optional().describe('Search term (email, name, …)'),\n\temail: z.string().min(1).optional().describe('Exact email filter'),\n\trole: z.string().min(1).optional().describe('Customer role filter'),\n\t...listCursorFields\n})\n\nexport const woocommerceListCustomersOutputSchema = z.object({\n\titems: z.array(woocommerceCustomerSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetCustomerInputSchema = z.object({\n\tcustomer_id: z.int().positive().describe('WooCommerce customer id')\n})\n\nexport const woocommerceGetCustomerOutputSchema = z.object({\n\tcustomer: woocommerceCustomerSchema\n})\n\nexport const woocommerceCreateCustomerInputSchema = z.object({\n\temail: z.string().min(1).describe('Customer email'),\n\tfirst_name: z.string().optional().describe('First name'),\n\tlast_name: z.string().optional().describe('Last name'),\n\tusername: z.string().min(1).optional().describe('Username (auto-generated when omitted)'),\n\tpassword: z.string().min(1).optional().describe('Account password when creating a login'),\n\tbilling: woocommerceAddressSchema.optional().describe('Billing address'),\n\tshipping: woocommerceAddressSchema.optional().describe('Shipping address'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Customer meta data')\n})\n\nexport const woocommerceCreateCustomerOutputSchema = woocommerceGetCustomerOutputSchema\n\nexport const woocommerceUpdateCustomerInputSchema = z.object({\n\tcustomer_id: z.int().positive().describe('WooCommerce customer id'),\n\temail: z.string().min(1).optional().describe('Customer email'),\n\tfirst_name: z.string().optional().describe('First name'),\n\tlast_name: z.string().optional().describe('Last name'),\n\tusername: z.string().min(1).optional().describe('Username'),\n\tpassword: z.string().min(1).optional().describe('New password'),\n\tbilling: woocommerceAddressSchema.optional().describe('Billing address'),\n\tshipping: woocommerceAddressSchema.optional().describe('Shipping address'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Customer meta data')\n})\n\nexport const woocommerceUpdateCustomerOutputSchema = woocommerceGetCustomerOutputSchema\n\n// ── Coupons ─────────────────────────────────────────────────────────────────\n\nexport const woocommerceCouponSchema = z.object({\n\tid: z.number(),\n\tcode: z.string(),\n\tamount: z.string().optional(),\n\tdiscount_type: z.string().optional(),\n\tdescription: z.string().optional(),\n\tdate_expires: z.string().optional(),\n\tusage_count: z.number().optional(),\n\tusage_limit: z.number().optional(),\n\tfree_shipping: z.boolean().optional()\n})\n\nexport const woocommerceListCouponsInputSchema = z.object({\n\tsearch: z.string().min(1).optional().describe('Search term (code, description, …)'),\n\tcode: z.string().min(1).optional().describe('Exact coupon code filter'),\n\t...listCursorFields\n})\n\nexport const woocommerceListCouponsOutputSchema = z.object({\n\titems: z.array(woocommerceCouponSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetCouponInputSchema = z.object({\n\tcoupon_id: z.int().positive().describe('WooCommerce coupon id')\n})\n\nexport const woocommerceGetCouponOutputSchema = z.object({\n\tcoupon: woocommerceCouponSchema\n})\n\nexport const woocommerceCreateCouponInputSchema = z.object({\n\tcode: z.string().min(1).describe('Coupon code'),\n\tdiscount_type: z.string().min(1).optional().describe('percent, fixed_cart, or fixed_product'),\n\tamount: z.string().min(1).optional().describe('Discount amount as string'),\n\tdescription: z.string().optional().describe('Coupon description'),\n\tindividual_use: z.boolean().optional().describe('Cannot combine with other coupons'),\n\texclude_sale_items: z.boolean().optional().describe('Exclude sale items'),\n\tminimum_amount: z.string().min(1).optional().describe('Minimum cart amount'),\n\tmaximum_amount: z.string().min(1).optional().describe('Maximum cart amount'),\n\tusage_limit: z.int().positive().optional().describe('Total usage limit'),\n\tusage_limit_per_user: z.int().positive().optional().describe('Per-user usage limit'),\n\tfree_shipping: z.boolean().optional().describe('Enable free shipping'),\n\tdate_expires: z.string().min(1).optional().describe('ISO 8601 expiry datetime'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Coupon meta data')\n})\n\nexport const woocommerceCreateCouponOutputSchema = woocommerceGetCouponOutputSchema\n\nexport const woocommerceUpdateCouponInputSchema = z.object({\n\tcoupon_id: z.int().positive().describe('WooCommerce coupon id'),\n\tcode: z.string().min(1).optional().describe('Coupon code'),\n\tdiscount_type: z.string().min(1).optional().describe('percent, fixed_cart, or fixed_product'),\n\tamount: z.string().min(1).optional().describe('Discount amount as string'),\n\tdescription: z.string().optional().describe('Coupon description'),\n\tindividual_use: z.boolean().optional().describe('Cannot combine with other coupons'),\n\texclude_sale_items: z.boolean().optional().describe('Exclude sale items'),\n\tminimum_amount: z.string().optional().describe('Minimum cart amount'),\n\tmaximum_amount: z.string().optional().describe('Maximum cart amount'),\n\tusage_limit: z.int().nonnegative().optional().describe('Total usage limit (0 unlimited)'),\n\tusage_limit_per_user: z.int().nonnegative().optional().describe('Per-user usage limit'),\n\tfree_shipping: z.boolean().optional().describe('Enable free shipping'),\n\tdate_expires: z.string().optional().describe('ISO 8601 expiry datetime'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Coupon meta data')\n})\n\nexport const woocommerceUpdateCouponOutputSchema = woocommerceGetCouponOutputSchema\n\n// ── Product categories ──────────────────────────────────────────────────────\n\nexport const woocommerceProductCategorySchema = z.object({\n\tid: z.number(),\n\tname: z.string(),\n\tslug: z.string().optional(),\n\tparent: z.number().optional(),\n\tdescription: z.string().optional(),\n\tcount: z.number().optional()\n})\n\nexport const woocommerceListProductCategoriesInputSchema = z.object({\n\tsearch: z.string().min(1).optional().describe('Search term'),\n\tparent: z.int().nonnegative().optional().describe('Parent category id (0 for top-level)'),\n\thide_empty: z.boolean().optional().describe('Hide categories with no products'),\n\t...listCursorFields\n})\n\nexport const woocommerceListProductCategoriesOutputSchema = z.object({\n\titems: z.array(woocommerceProductCategorySchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetProductCategoryInputSchema = z.object({\n\tcategory_id: z.int().positive().describe('Product category id')\n})\n\nexport const woocommerceGetProductCategoryOutputSchema = z.object({\n\tcategory: woocommerceProductCategorySchema\n})\n\n// ── Raw collection pages (host / warehouse; not agent tools) ────────────────\n\nconst woocommercePageFields = {\n\tpage: z.int().min(1).optional(),\n\tlimit: z.int().min(1).max(100).optional()\n}\n\nconst woocommerceCollectionTimeFields = {\n\tafter: z.string().min(1).optional(),\n\tbefore: z.string().min(1).optional(),\n\tmodified_after: z.string().min(1).optional(),\n\tmodified_before: z.string().min(1).optional(),\n\tdates_are_gmt: z.boolean().optional(),\n\torder: z.enum(['asc', 'desc']).optional(),\n\torderby: z.string().min(1).optional()\n}\n\nexport const woocommerceRawRecordSchema = z.looseObject({\n\tid: z.number().int(),\n\tdate_created: z.string().optional(),\n\tdate_created_gmt: z.string().optional(),\n\tdate_modified: z.string().optional(),\n\tdate_modified_gmt: z.string().optional()\n})\n\nexport const woocommerceOrderRawSchema = woocommerceRawRecordSchema\nexport const woocommerceProductRawSchema = woocommerceRawRecordSchema\nexport const woocommerceCustomerRawSchema = woocommerceRawRecordSchema\n\nexport const woocommercePaginationSchema = z.object({\n\tpage: z.int().min(1),\n\tpage_size: z.int().min(1),\n\ttotal_items: z.int().nonnegative(),\n\ttotal_pages: z.int().nonnegative(),\n\thas_more: z.boolean()\n})\n\nconst woocommercePageOutputMeta = {\n\tpagination: woocommercePaginationSchema\n}\n\nexport const woocommerceListOrdersPageInputSchema = z.strictObject({\n\t...woocommercePageFields,\n\tstatus: z.string().min(1).optional(),\n\tsearch: z.string().min(1).optional(),\n\tcustomer_id: z.int().positive().optional(),\n\t...woocommerceCollectionTimeFields\n})\n\nexport const woocommerceListOrdersPageOutputSchema = z.object({\n\titems: z.array(woocommerceOrderRawSchema),\n\t...woocommercePageOutputMeta\n})\n\nexport const woocommerceListProductsPageInputSchema = z.strictObject({\n\t...woocommercePageFields,\n\tstatus: z.string().min(1).optional(),\n\tsearch: z.string().min(1).optional(),\n\tsku: z.string().min(1).optional(),\n\tcategory: z.int().positive().optional(),\n\ttype: z.string().min(1).optional(),\n\tinclude: z.array(z.int().positive()).min(1).max(100).optional(),\n\t...woocommerceCollectionTimeFields\n})\n\nexport const woocommerceListProductsPageOutputSchema = z.object({\n\titems: z.array(woocommerceProductRawSchema),\n\t...woocommercePageOutputMeta\n})\n\nexport const woocommerceListCustomersPageInputSchema = z.strictObject({\n\t...woocommercePageFields,\n\tsearch: z.string().min(1).optional(),\n\temail: z.string().min(1).optional(),\n\trole: z.string().min(1).optional(),\n\t...woocommerceCollectionTimeFields\n})\n\nexport const woocommerceListCustomersPageOutputSchema = z.object({\n\titems: z.array(woocommerceCustomerRawSchema),\n\t...woocommercePageOutputMeta\n})\n\n// ── Types ───────────────────────────────────────────────────────────────────\n\nexport type WoocommerceAddress = z.infer<typeof woocommerceAddressSchema>\nexport type WoocommerceMetaData = z.infer<typeof woocommerceMetaDataSchema>\nexport type WoocommerceLineItemInput = z.infer<typeof woocommerceLineItemInputSchema>\n\nexport type WoocommerceOrder = z.infer<typeof woocommerceOrderSchema>\nexport type WoocommerceListOrdersInput = z.infer<typeof woocommerceListOrdersInputSchema>\nexport type WoocommerceListOrdersOutput = z.infer<typeof woocommerceListOrdersOutputSchema>\nexport type WoocommerceGetOrderInput = z.infer<typeof woocommerceGetOrderInputSchema>\nexport type WoocommerceGetOrderOutput = z.infer<typeof woocommerceGetOrderOutputSchema>\nexport type WoocommerceCreateOrderInput = z.infer<typeof woocommerceCreateOrderInputSchema>\nexport type WoocommerceCreateOrderOutput = z.infer<typeof woocommerceCreateOrderOutputSchema>\nexport type WoocommerceUpdateOrderInput = z.infer<typeof woocommerceUpdateOrderInputSchema>\nexport type WoocommerceUpdateOrderOutput = z.infer<typeof woocommerceUpdateOrderOutputSchema>\nexport type WoocommerceDeleteOrderInput = z.infer<typeof woocommerceDeleteOrderInputSchema>\nexport type WoocommerceDeleteOrderOutput = z.infer<typeof woocommerceDeleteOrderOutputSchema>\n\nexport type WoocommerceOrderNote = z.infer<typeof woocommerceOrderNoteSchema>\nexport type WoocommerceListOrderNotesInput = z.infer<typeof woocommerceListOrderNotesInputSchema>\nexport type WoocommerceListOrderNotesOutput = z.infer<typeof woocommerceListOrderNotesOutputSchema>\nexport type WoocommerceCreateOrderNoteInput = z.infer<typeof woocommerceCreateOrderNoteInputSchema>\nexport type WoocommerceCreateOrderNoteOutput = z.infer<typeof woocommerceCreateOrderNoteOutputSchema>\n\nexport type WoocommerceOrderRefund = z.infer<typeof woocommerceOrderRefundSchema>\nexport type WoocommerceListOrderRefundsInput = z.infer<typeof woocommerceListOrderRefundsInputSchema>\nexport type WoocommerceListOrderRefundsOutput = z.infer<typeof woocommerceListOrderRefundsOutputSchema>\nexport type WoocommerceCreateOrderRefundInput = z.infer<typeof woocommerceCreateOrderRefundInputSchema>\nexport type WoocommerceCreateOrderRefundOutput = z.infer<typeof woocommerceCreateOrderRefundOutputSchema>\n\nexport type WoocommerceProduct = z.infer<typeof woocommerceProductSchema>\nexport type WoocommerceListProductsInput = z.infer<typeof woocommerceListProductsInputSchema>\nexport type WoocommerceListProductsOutput = z.infer<typeof woocommerceListProductsOutputSchema>\nexport type WoocommerceGetProductInput = z.infer<typeof woocommerceGetProductInputSchema>\nexport type WoocommerceGetProductOutput = z.infer<typeof woocommerceGetProductOutputSchema>\nexport type WoocommerceCreateProductInput = z.infer<typeof woocommerceCreateProductInputSchema>\nexport type WoocommerceCreateProductOutput = z.infer<typeof woocommerceCreateProductOutputSchema>\nexport type WoocommerceUpdateProductInput = z.infer<typeof woocommerceUpdateProductInputSchema>\nexport type WoocommerceUpdateProductOutput = z.infer<typeof woocommerceUpdateProductOutputSchema>\nexport type WoocommerceDeleteProductInput = z.infer<typeof woocommerceDeleteProductInputSchema>\nexport type WoocommerceDeleteProductOutput = z.infer<typeof woocommerceDeleteProductOutputSchema>\n\nexport type WoocommerceProductVariation = z.infer<typeof woocommerceProductVariationSchema>\nexport type WoocommerceListProductVariationsInput = z.infer<typeof woocommerceListProductVariationsInputSchema>\nexport type WoocommerceListProductVariationsOutput = z.infer<typeof woocommerceListProductVariationsOutputSchema>\nexport type WoocommerceGetProductVariationInput = z.infer<typeof woocommerceGetProductVariationInputSchema>\nexport type WoocommerceGetProductVariationOutput = z.infer<typeof woocommerceGetProductVariationOutputSchema>\n\nexport type WoocommerceCustomer = z.infer<typeof woocommerceCustomerSchema>\nexport type WoocommerceListCustomersInput = z.infer<typeof woocommerceListCustomersInputSchema>\nexport type WoocommerceListCustomersOutput = z.infer<typeof woocommerceListCustomersOutputSchema>\nexport type WoocommerceGetCustomerInput = z.infer<typeof woocommerceGetCustomerInputSchema>\nexport type WoocommerceGetCustomerOutput = z.infer<typeof woocommerceGetCustomerOutputSchema>\nexport type WoocommerceCreateCustomerInput = z.infer<typeof woocommerceCreateCustomerInputSchema>\nexport type WoocommerceCreateCustomerOutput = z.infer<typeof woocommerceCreateCustomerOutputSchema>\nexport type WoocommerceUpdateCustomerInput = z.infer<typeof woocommerceUpdateCustomerInputSchema>\nexport type WoocommerceUpdateCustomerOutput = z.infer<typeof woocommerceUpdateCustomerOutputSchema>\n\nexport type WoocommerceCoupon = z.infer<typeof woocommerceCouponSchema>\nexport type WoocommerceListCouponsInput = z.infer<typeof woocommerceListCouponsInputSchema>\nexport type WoocommerceListCouponsOutput = z.infer<typeof woocommerceListCouponsOutputSchema>\nexport type WoocommerceGetCouponInput = z.infer<typeof woocommerceGetCouponInputSchema>\nexport type WoocommerceGetCouponOutput = z.infer<typeof woocommerceGetCouponOutputSchema>\nexport type WoocommerceCreateCouponInput = z.infer<typeof woocommerceCreateCouponInputSchema>\nexport type WoocommerceCreateCouponOutput = z.infer<typeof woocommerceCreateCouponOutputSchema>\nexport type WoocommerceUpdateCouponInput = z.infer<typeof woocommerceUpdateCouponInputSchema>\nexport type WoocommerceUpdateCouponOutput = z.infer<typeof woocommerceUpdateCouponOutputSchema>\n\nexport type WoocommerceProductCategory = z.infer<typeof woocommerceProductCategorySchema>\nexport type WoocommerceListProductCategoriesInput = z.infer<typeof woocommerceListProductCategoriesInputSchema>\nexport type WoocommerceListProductCategoriesOutput = z.infer<typeof woocommerceListProductCategoriesOutputSchema>\nexport type WoocommerceGetProductCategoryInput = z.infer<typeof woocommerceGetProductCategoryInputSchema>\nexport type WoocommerceGetProductCategoryOutput = z.infer<typeof woocommerceGetProductCategoryOutputSchema>\n\nexport type WoocommerceRawRecord = z.infer<typeof woocommerceRawRecordSchema>\nexport type WoocommerceOrderRaw = z.infer<typeof woocommerceOrderRawSchema>\nexport type WoocommerceProductRaw = z.infer<typeof woocommerceProductRawSchema>\nexport type WoocommerceCustomerRaw = z.infer<typeof woocommerceCustomerRawSchema>\nexport type WoocommercePagination = z.infer<typeof woocommercePaginationSchema>\nexport type WoocommerceListOrdersPageInput = z.infer<typeof woocommerceListOrdersPageInputSchema>\nexport type WoocommerceListOrdersPageOutput = z.infer<typeof woocommerceListOrdersPageOutputSchema>\nexport type WoocommerceListProductsPageInput = z.infer<typeof woocommerceListProductsPageInputSchema>\nexport type WoocommerceListProductsPageOutput = z.infer<typeof woocommerceListProductsPageOutputSchema>\nexport type WoocommerceListCustomersPageInput = z.infer<typeof woocommerceListCustomersPageInputSchema>\nexport type WoocommerceListCustomersPageOutput = z.infer<typeof woocommerceListCustomersPageOutputSchema>\n","/**\n * WooCommerce REST payload helpers (no HTTP).\n */\n\nimport { isPlainObject, isString } from 'es-toolkit'\nimport { z } from 'zod'\n\nimport { ToolError } from '../../core/errors'\nimport { bytesToBase64, utf8ToBytes } from '../../shared/bytes'\nimport type {\n\tWoocommerceAddress,\n\tWoocommerceAuth,\n\tWoocommerceCoupon,\n\tWoocommerceCreateCouponInput,\n\tWoocommerceCreateCustomerInput,\n\tWoocommerceCreateOrderInput,\n\tWoocommerceCreateOrderNoteInput,\n\tWoocommerceCreateOrderRefundInput,\n\tWoocommerceCreateProductInput,\n\tWoocommerceCustomer,\n\tWoocommerceDeleteOrderOutput,\n\tWoocommerceDeleteProductOutput,\n\tWoocommerceLineItemInput,\n\tWoocommerceMetaData,\n\tWoocommerceOrder,\n\tWoocommerceOrderNote,\n\tWoocommerceOrderRefund,\n\tWoocommercePagination,\n\tWoocommerceProduct,\n\tWoocommerceProductCategory,\n\tWoocommerceProductVariation,\n\tWoocommerceUpdateCouponInput,\n\tWoocommerceUpdateCustomerInput,\n\tWoocommerceUpdateOrderInput,\n\tWoocommerceUpdateProductInput\n} from './contracts'\n\nexport function storeOrigin(auth: WoocommerceAuth): string {\n\tlet url: URL\n\ttry {\n\t\turl = new URL(auth.store_url)\n\t} catch {\n\t\tthrow new ToolError('Invalid WooCommerce store_url', { code: 'bad_auth' })\n\t}\n\tif (\n\t\turl.username !== '' ||\n\t\turl.password !== '' ||\n\t\t(url.pathname !== '/' && url.pathname !== '') ||\n\t\turl.search !== '' ||\n\t\turl.hash !== ''\n\t) {\n\t\tthrow new ToolError('WooCommerce store_url must be an origin', { code: 'bad_auth' })\n\t}\n\treturn url.origin\n}\n\nexport function apiBaseUrl(auth: WoocommerceAuth): string {\n\treturn `${storeOrigin(auth)}/wp-json/wc/v3`\n}\n\nexport function basicAuthHeader(auth: WoocommerceAuth): string {\n\tconst token = bytesToBase64(utf8ToBytes(`${auth.consumer_key}:${auth.consumer_secret}`))\n\treturn `Basic ${token}`\n}\n\nexport function pageFromCursor(cursor: string | undefined): number {\n\tif (!cursor) return 1\n\tconst n = Number.parseInt(cursor, 10)\n\tif (!Number.isFinite(n) || n < 1) {\n\t\tthrow new ToolError('Invalid list cursor', { code: 'bad_input', details: { cursor } })\n\t}\n\treturn n\n}\n\nexport function listPageMeta(\n\tpage: number,\n\tlimit: number,\n\titemCount: number,\n\ttotalPagesHeader: string | null\n): { next_cursor?: string; truncated: boolean } {\n\tconst totalPages = totalPagesHeader ? Number.parseInt(totalPagesHeader, 10) : undefined\n\tif (typeof totalPages === 'number' && Number.isFinite(totalPages) && totalPages > page) {\n\t\treturn { next_cursor: String(page + 1), truncated: true }\n\t}\n\tif (itemCount >= limit && (totalPages === undefined || !Number.isFinite(totalPages))) {\n\t\treturn { next_cursor: String(page + 1), truncated: true }\n\t}\n\treturn { truncated: false }\n}\n\nexport type WoocommerceCollectionQueryInput = {\n\tpage?: number | undefined\n\tlimit?: number | undefined\n\tafter?: string | undefined\n\tbefore?: string | undefined\n\tmodified_after?: string | undefined\n\tmodified_before?: string | undefined\n\tdates_are_gmt?: boolean | undefined\n\torder?: 'asc' | 'desc' | undefined\n\torderby?: string | undefined\n}\n\nexport function collectionQuery(input: WoocommerceCollectionQueryInput): Record<string, string | number | boolean> {\n\treturn {\n\t\tpage: input.page ?? 1,\n\t\tper_page: input.limit ?? 10,\n\t\t...(input.after && { after: input.after }),\n\t\t...(input.before && { before: input.before }),\n\t\t...(input.modified_after && { modified_after: input.modified_after }),\n\t\t...(input.modified_before && { modified_before: input.modified_before }),\n\t\t...(input.dates_are_gmt !== undefined && { dates_are_gmt: input.dates_are_gmt }),\n\t\t...(input.order && { order: input.order }),\n\t\t...(input.orderby && { orderby: input.orderby })\n\t}\n}\n\nfunction parseWpCountHeader(headers: Headers, name: string): number {\n\tconst raw = headers.get(name)\n\tif (raw === null || raw.length === 0) {\n\t\tthrow new ToolError(`WooCommerce response is missing ${name}`, { code: 'upstream' })\n\t}\n\tconst n = Number.parseInt(raw, 10)\n\tif (!Number.isFinite(n) || n < 0) {\n\t\tthrow new ToolError(`WooCommerce returned invalid ${name}`, { code: 'upstream' })\n\t}\n\treturn n\n}\n\nexport function parseCollectionPage<T>(\n\tdata: unknown,\n\theaders: Headers,\n\titemSchema: z.ZodType<T>,\n\tpage: number,\n\tpageSize: number,\n\tlabel: string\n): { items: T[]; pagination: WoocommercePagination } {\n\tconst parsedItems = z.array(itemSchema).safeParse(data)\n\tif (!parsedItems.success) {\n\t\tthrow new ToolError(`WooCommerce returned an invalid ${label} array`, {\n\t\t\tcode: 'upstream',\n\t\t\tdetails: { issues: parsedItems.error.issues.map((issue) => issue.message) }\n\t\t})\n\t}\n\tconst totalItems = parseWpCountHeader(headers, 'x-wp-total')\n\tconst totalPages = parseWpCountHeader(headers, 'x-wp-totalpages')\n\treturn {\n\t\titems: parsedItems.data,\n\t\tpagination: {\n\t\t\tpage,\n\t\t\tpage_size: pageSize,\n\t\t\ttotal_items: totalItems,\n\t\t\ttotal_pages: totalPages,\n\t\t\thas_more: page < totalPages\n\t\t}\n\t}\n}\n\nfunction looksLikeSecret(value: string): boolean {\n\treturn /ck_|cs_|consumer_key|consumer_secret|authorization/i.test(value)\n}\n\nexport function woocommerceErrorDetails(data: unknown): {\n\twoocommerce_code?: string\n\twoocommerce_message?: string\n} {\n\tif (!isPlainObject(data)) return {}\n\tconst code = data['code']\n\tconst message = data['message']\n\treturn {\n\t\t...(isString(code) && code.length > 0 && !looksLikeSecret(code) && { woocommerce_code: code }),\n\t\t...(isString(message) && message.length > 0 && !looksLikeSecret(message) && { woocommerce_message: message })\n\t}\n}\n\nfunction optionalString(value: unknown): string | undefined {\n\treturn isString(value) ? value : undefined\n}\n\nfunction optionalNonEmptyString(value: unknown): string | undefined {\n\treturn isString(value) && value.length > 0 ? value : undefined\n}\n\nfunction optionalNumber(value: unknown): number | undefined {\n\treturn typeof value === 'number' && Number.isFinite(value) ? value : undefined\n}\n\nfunction optionalBoolean(value: unknown): boolean | undefined {\n\treturn typeof value === 'boolean' ? value : undefined\n}\n\nfunction addressBody(address: WoocommerceAddress): Record<string, string> {\n\treturn {\n\t\t...(address.first_name !== undefined && { first_name: address.first_name }),\n\t\t...(address.last_name !== undefined && { last_name: address.last_name }),\n\t\t...(address.company !== undefined && { company: address.company }),\n\t\t...(address.address_1 !== undefined && { address_1: address.address_1 }),\n\t\t...(address.address_2 !== undefined && { address_2: address.address_2 }),\n\t\t...(address.city !== undefined && { city: address.city }),\n\t\t...(address.state !== undefined && { state: address.state }),\n\t\t...(address.postcode !== undefined && { postcode: address.postcode }),\n\t\t...(address.country !== undefined && { country: address.country }),\n\t\t...(address.email !== undefined && { email: address.email }),\n\t\t...(address.phone !== undefined && { phone: address.phone })\n\t}\n}\n\nfunction metaDataBody(meta: WoocommerceMetaData[]): { key: string; value: string }[] {\n\treturn meta.map((item) => ({ key: item.key, value: item.value }))\n}\n\nfunction lineItemBody(item: WoocommerceLineItemInput): Record<string, string | number> {\n\treturn {\n\t\t...(item.id !== undefined && { id: item.id }),\n\t\t...(item.product_id !== undefined && { product_id: item.product_id }),\n\t\t...(item.variation_id !== undefined && { variation_id: item.variation_id }),\n\t\t...(item.quantity !== undefined && { quantity: item.quantity }),\n\t\t...(item.name && { name: item.name }),\n\t\t...(item.sku && { sku: item.sku }),\n\t\t...(item.price && { price: item.price }),\n\t\t...(item.total && { total: item.total })\n\t}\n}\n\nexport function orderWriteBody(\n\tinput: WoocommerceCreateOrderInput | Omit<WoocommerceUpdateOrderInput, 'order_id'>\n): Record<string, unknown> {\n\treturn {\n\t\t...(input.status && { status: input.status }),\n\t\t...(input.customer_id !== undefined && { customer_id: input.customer_id }),\n\t\t...(input.payment_method && { payment_method: input.payment_method }),\n\t\t...(input.payment_method_title && { payment_method_title: input.payment_method_title }),\n\t\t...(input.set_paid !== undefined && { set_paid: input.set_paid }),\n\t\t...(input.customer_note !== undefined && { customer_note: input.customer_note }),\n\t\t...(input.billing && { billing: addressBody(input.billing) }),\n\t\t...(input.shipping && { shipping: addressBody(input.shipping) }),\n\t\t...(input.line_items &&\n\t\t\tinput.line_items.length > 0 && {\n\t\t\t\tline_items: input.line_items.map(lineItemBody)\n\t\t\t}),\n\t\t...(input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) })\n\t}\n}\n\nexport function productWriteBody(\n\tinput: WoocommerceCreateProductInput | Omit<WoocommerceUpdateProductInput, 'product_id'>\n): Record<string, unknown> {\n\tconst name = 'name' in input ? input.name : undefined\n\treturn {\n\t\t...(name && { name }),\n\t\t...(input.type && { type: input.type }),\n\t\t...(input.status && { status: input.status }),\n\t\t...(input.sku !== undefined && { sku: input.sku }),\n\t\t...(input.regular_price !== undefined && { regular_price: input.regular_price }),\n\t\t...(input.sale_price !== undefined && { sale_price: input.sale_price }),\n\t\t...(input.description !== undefined && { description: input.description }),\n\t\t...(input.short_description !== undefined && { short_description: input.short_description }),\n\t\t...(input.manage_stock !== undefined && { manage_stock: input.manage_stock }),\n\t\t...(input.stock_quantity !== undefined && { stock_quantity: input.stock_quantity }),\n\t\t...(input.stock_status && { stock_status: input.stock_status }),\n\t\t...(input.categories &&\n\t\t\tinput.categories.length > 0 && {\n\t\t\t\tcategories: input.categories.map((c) => ({ id: c.id }))\n\t\t\t}),\n\t\t...(input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) })\n\t}\n}\n\nexport function customerWriteBody(\n\tinput: WoocommerceCreateCustomerInput | Omit<WoocommerceUpdateCustomerInput, 'customer_id'>\n): Record<string, unknown> {\n\tconst email = 'email' in input ? input.email : undefined\n\treturn {\n\t\t...(email && { email }),\n\t\t...(input.first_name !== undefined && { first_name: input.first_name }),\n\t\t...(input.last_name !== undefined && { last_name: input.last_name }),\n\t\t...(input.username && { username: input.username }),\n\t\t...(input.password && { password: input.password }),\n\t\t...(input.billing && { billing: addressBody(input.billing) }),\n\t\t...(input.shipping && { shipping: addressBody(input.shipping) }),\n\t\t...(input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) })\n\t}\n}\n\nexport function couponWriteBody(\n\tinput: WoocommerceCreateCouponInput | Omit<WoocommerceUpdateCouponInput, 'coupon_id'>\n): Record<string, unknown> {\n\tconst code = 'code' in input ? input.code : undefined\n\treturn {\n\t\t...(code && { code }),\n\t\t...(input.discount_type && { discount_type: input.discount_type }),\n\t\t...(input.amount && { amount: input.amount }),\n\t\t...(input.description !== undefined && { description: input.description }),\n\t\t...(input.individual_use !== undefined && { individual_use: input.individual_use }),\n\t\t...(input.exclude_sale_items !== undefined && { exclude_sale_items: input.exclude_sale_items }),\n\t\t...(input.minimum_amount !== undefined && { minimum_amount: input.minimum_amount }),\n\t\t...(input.maximum_amount !== undefined && { maximum_amount: input.maximum_amount }),\n\t\t...(input.usage_limit !== undefined && { usage_limit: input.usage_limit }),\n\t\t...(input.usage_limit_per_user !== undefined && {\n\t\t\tusage_limit_per_user: input.usage_limit_per_user\n\t\t}),\n\t\t...(input.free_shipping !== undefined && { free_shipping: input.free_shipping }),\n\t\t...(input.date_expires !== undefined && { date_expires: input.date_expires }),\n\t\t...(input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) })\n\t}\n}\n\nexport function orderNoteWriteBody(input: Omit<WoocommerceCreateOrderNoteInput, 'order_id'>): Record<string, unknown> {\n\treturn {\n\t\tnote: input.note,\n\t\t...(input.customer_note !== undefined && { customer_note: input.customer_note }),\n\t\t...(input.added_by_user !== undefined && { added_by_user: input.added_by_user })\n\t}\n}\n\nexport function orderRefundWriteBody(\n\tinput: Omit<WoocommerceCreateOrderRefundInput, 'order_id'>\n): Record<string, unknown> {\n\treturn {\n\t\t...(input.amount && { amount: input.amount }),\n\t\t...(input.reason !== undefined && { reason: input.reason }),\n\t\t...(input.api_refund !== undefined && { api_refund: input.api_refund }),\n\t\t...(input.line_items &&\n\t\t\tinput.line_items.length > 0 && {\n\t\t\t\tline_items: input.line_items.map((item) => ({\n\t\t\t\t\tid: item.id,\n\t\t\t\t\t...(item.quantity !== undefined && { quantity: item.quantity }),\n\t\t\t\t\t...(item.refund_total && { refund_total: item.refund_total })\n\t\t\t\t}))\n\t\t\t})\n\t}\n}\n\nfunction parseOrderLineItem(value: unknown): {\n\tid: number\n\tproduct_id?: number\n\tvariation_id?: number\n\tquantity?: number\n\tname?: string\n\tsku?: string\n\tprice?: string\n\ttotal?: string\n} {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number') {\n\t\tthrow new ToolError('WooCommerce returned an invalid order line item', { code: 'upstream' })\n\t}\n\tconst productId = optionalNumber(value['product_id'])\n\tconst variationId = optionalNumber(value['variation_id'])\n\tconst quantity = optionalNumber(value['quantity'])\n\tconst name = optionalNonEmptyString(value['name'])\n\tconst sku = optionalNonEmptyString(value['sku'])\n\t// WC may return price/total as string or number\n\tconst priceRaw = value['price']\n\tconst totalRaw = value['total']\n\tconst price =\n\t\tisString(priceRaw) && priceRaw.length > 0\n\t\t\t? priceRaw\n\t\t\t: typeof priceRaw === 'number' && Number.isFinite(priceRaw)\n\t\t\t\t? String(priceRaw)\n\t\t\t\t: undefined\n\tconst total =\n\t\tisString(totalRaw) && totalRaw.length > 0\n\t\t\t? totalRaw\n\t\t\t: typeof totalRaw === 'number' && Number.isFinite(totalRaw)\n\t\t\t\t? String(totalRaw)\n\t\t\t\t: undefined\n\treturn {\n\t\tid: value['id'],\n\t\t...(productId !== undefined && { product_id: productId }),\n\t\t...(variationId !== undefined && { variation_id: variationId }),\n\t\t...(quantity !== undefined && { quantity }),\n\t\t...(name && { name }),\n\t\t...(sku && { sku }),\n\t\t...(price && { price }),\n\t\t...(total && { total })\n\t}\n}\n\nfunction parseOrderLineItems(value: unknown): ReturnType<typeof parseOrderLineItem>[] | undefined {\n\tif (!Array.isArray(value) || value.length === 0) return undefined\n\treturn value.map(parseOrderLineItem)\n}\n\nexport function parseOrder(value: unknown): WoocommerceOrder {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number') {\n\t\tthrow new ToolError('WooCommerce returned an invalid order', { code: 'upstream' })\n\t}\n\tconst number = value['number']\n\tconst status = value['status']\n\tconst currency = value['currency']\n\tconst total = value['total']\n\tif (!isString(number) || !isString(status) || !isString(currency) || !isString(total)) {\n\t\tthrow new ToolError('WooCommerce order missing required fields', { code: 'upstream' })\n\t}\n\tconst dateCreated = optionalString(value['date_created'])\n\tconst customerId = optionalNumber(value['customer_id'])\n\tconst paymentMethod = optionalNonEmptyString(value['payment_method'])\n\tconst paymentMethodTitle = optionalNonEmptyString(value['payment_method_title'])\n\tconst customerNote = optionalString(value['customer_note'])\n\tconst lineItems = parseOrderLineItems(value['line_items'])\n\treturn {\n\t\tid: value['id'],\n\t\tnumber,\n\t\tstatus,\n\t\tcurrency,\n\t\ttotal,\n\t\t...(dateCreated && { date_created: dateCreated }),\n\t\t...(customerId !== undefined && { customer_id: customerId }),\n\t\t...(paymentMethod && { payment_method: paymentMethod }),\n\t\t...(paymentMethodTitle && { payment_method_title: paymentMethodTitle }),\n\t\t...(customerNote !== undefined && { customer_note: customerNote }),\n\t\t...(lineItems && { line_items: lineItems })\n\t}\n}\n\nexport function parseOrders(value: unknown): WoocommerceOrder[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list orders returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseOrder)\n}\n\nexport function parseOrderNote(value: unknown): WoocommerceOrderNote {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number' || !isString(value['note'])) {\n\t\tthrow new ToolError('WooCommerce returned an invalid order note', { code: 'upstream' })\n\t}\n\tconst customerNote = optionalBoolean(value['customer_note'])\n\tconst dateCreated = optionalString(value['date_created'])\n\tconst addedByUser = optionalBoolean(value['added_by_user'])\n\treturn {\n\t\tid: value['id'],\n\t\tnote: value['note'],\n\t\t...(customerNote !== undefined && { customer_note: customerNote }),\n\t\t...(dateCreated && { date_created: dateCreated }),\n\t\t...(addedByUser !== undefined && { added_by_user: addedByUser })\n\t}\n}\n\nexport function parseOrderNotes(value: unknown): WoocommerceOrderNote[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list order notes returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseOrderNote)\n}\n\nexport function parseOrderRefund(value: unknown): WoocommerceOrderRefund {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number') {\n\t\tthrow new ToolError('WooCommerce returned an invalid order refund', { code: 'upstream' })\n\t}\n\tconst amount = optionalString(value['amount'])\n\tconst reason = optionalString(value['reason'])\n\tconst dateCreated = optionalString(value['date_created'])\n\tconst refundedBy = optionalNumber(value['refunded_by'])\n\treturn {\n\t\tid: value['id'],\n\t\t...(amount && { amount }),\n\t\t...(reason !== undefined && { reason }),\n\t\t...(dateCreated && { date_created: dateCreated }),\n\t\t...(refundedBy !== undefined && { refunded_by: refundedBy })\n\t}\n}\n\nexport function parseOrderRefunds(value: unknown): WoocommerceOrderRefund[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list order refunds returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseOrderRefund)\n}\n\nfunction parseProductCategoryRef(value: unknown): { id: number; name?: string; slug?: string } {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number') {\n\t\tthrow new ToolError('WooCommerce returned an invalid product category ref', { code: 'upstream' })\n\t}\n\tconst name = optionalNonEmptyString(value['name'])\n\tconst slug = optionalNonEmptyString(value['slug'])\n\treturn {\n\t\tid: value['id'],\n\t\t...(name && { name }),\n\t\t...(slug && { slug })\n\t}\n}\n\nfunction parseProductCategoryRefs(value: unknown): ReturnType<typeof parseProductCategoryRef>[] | undefined {\n\tif (!Array.isArray(value) || value.length === 0) return undefined\n\treturn value.map(parseProductCategoryRef)\n}\n\nexport function parseProduct(value: unknown): WoocommerceProduct {\n\tif (\n\t\t!isPlainObject(value) ||\n\t\ttypeof value['id'] !== 'number' ||\n\t\t!isString(value['name']) ||\n\t\t!isString(value['type'])\n\t) {\n\t\tthrow new ToolError('WooCommerce returned an invalid product', { code: 'upstream' })\n\t}\n\tconst status = value['status']\n\tif (!isString(status)) {\n\t\tthrow new ToolError('WooCommerce product missing status', { code: 'upstream' })\n\t}\n\tconst sku = optionalNonEmptyString(value['sku'])\n\tconst price = optionalString(value['price'])\n\tconst regularPrice = optionalString(value['regular_price'])\n\tconst salePrice = optionalString(value['sale_price'])\n\tconst stockStatus = optionalString(value['stock_status'])\n\tconst stockQuantity = optionalNumber(value['stock_quantity'])\n\tconst manageStock = optionalBoolean(value['manage_stock'])\n\tconst categories = parseProductCategoryRefs(value['categories'])\n\treturn {\n\t\tid: value['id'],\n\t\tname: value['name'],\n\t\ttype: value['type'],\n\t\tstatus,\n\t\t...(sku && { sku }),\n\t\t...(price && { price }),\n\t\t...(regularPrice && { regular_price: regularPrice }),\n\t\t...(salePrice && { sale_price: salePrice }),\n\t\t...(stockStatus && { stock_status: stockStatus }),\n\t\t...(stockQuantity !== undefined && { stock_quantity: stockQuantity }),\n\t\t...(manageStock !== undefined && { manage_stock: manageStock }),\n\t\t...(categories && { categories })\n\t}\n}\n\nexport function parseProducts(value: unknown): WoocommerceProduct[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list products returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseProduct)\n}\n\nexport function parseProductVariation(value: unknown): WoocommerceProductVariation {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number') {\n\t\tthrow new ToolError('WooCommerce returned an invalid product variation', { code: 'upstream' })\n\t}\n\tconst sku = optionalNonEmptyString(value['sku'])\n\tconst price = optionalString(value['price'])\n\tconst regularPrice = optionalString(value['regular_price'])\n\tconst salePrice = optionalString(value['sale_price'])\n\tconst status = optionalString(value['status'])\n\tconst stockStatus = optionalString(value['stock_status'])\n\tconst stockQuantity = optionalNumber(value['stock_quantity'])\n\tconst manageStock = optionalBoolean(value['manage_stock'])\n\treturn {\n\t\tid: value['id'],\n\t\t...(sku && { sku }),\n\t\t...(price && { price }),\n\t\t...(regularPrice && { regular_price: regularPrice }),\n\t\t...(salePrice && { sale_price: salePrice }),\n\t\t...(status && { status }),\n\t\t...(stockStatus && { stock_status: stockStatus }),\n\t\t...(stockQuantity !== undefined && { stock_quantity: stockQuantity }),\n\t\t...(manageStock !== undefined && { manage_stock: manageStock })\n\t}\n}\n\nexport function parseProductVariations(value: unknown): WoocommerceProductVariation[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list product variations returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseProductVariation)\n}\n\nexport function parseCustomer(value: unknown): WoocommerceCustomer {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number' || !isString(value['email'])) {\n\t\tthrow new ToolError('WooCommerce returned an invalid customer', { code: 'upstream' })\n\t}\n\tconst firstName = optionalString(value['first_name'])\n\tconst lastName = optionalString(value['last_name'])\n\tconst username = optionalNonEmptyString(value['username'])\n\tconst role = optionalNonEmptyString(value['role'])\n\tconst dateCreated = optionalString(value['date_created'])\n\treturn {\n\t\tid: value['id'],\n\t\temail: value['email'],\n\t\t...(firstName !== undefined && { first_name: firstName }),\n\t\t...(lastName !== undefined && { last_name: lastName }),\n\t\t...(username && { username }),\n\t\t...(role && { role }),\n\t\t...(dateCreated && { date_created: dateCreated })\n\t}\n}\n\nexport function parseCustomers(value: unknown): WoocommerceCustomer[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list customers returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseCustomer)\n}\n\nexport function parseCoupon(value: unknown): WoocommerceCoupon {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number' || !isString(value['code'])) {\n\t\tthrow new ToolError('WooCommerce returned an invalid coupon', { code: 'upstream' })\n\t}\n\tconst amount = optionalString(value['amount'])\n\tconst discountType = optionalNonEmptyString(value['discount_type'])\n\tconst description = optionalString(value['description'])\n\tconst dateExpires = optionalString(value['date_expires'])\n\tconst usageCount = optionalNumber(value['usage_count'])\n\tconst usageLimit = optionalNumber(value['usage_limit'])\n\tconst freeShipping = optionalBoolean(value['free_shipping'])\n\treturn {\n\t\tid: value['id'],\n\t\tcode: value['code'],\n\t\t...(amount && { amount }),\n\t\t...(discountType && { discount_type: discountType }),\n\t\t...(description !== undefined && { description }),\n\t\t...(dateExpires && { date_expires: dateExpires }),\n\t\t...(usageCount !== undefined && { usage_count: usageCount }),\n\t\t...(usageLimit !== undefined && { usage_limit: usageLimit }),\n\t\t...(freeShipping !== undefined && { free_shipping: freeShipping })\n\t}\n}\n\nexport function parseCoupons(value: unknown): WoocommerceCoupon[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list coupons returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseCoupon)\n}\n\nexport function parseProductCategory(value: unknown): WoocommerceProductCategory {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number' || !isString(value['name'])) {\n\t\tthrow new ToolError('WooCommerce returned an invalid product category', { code: 'upstream' })\n\t}\n\tconst slug = optionalNonEmptyString(value['slug'])\n\tconst parent = optionalNumber(value['parent'])\n\tconst description = optionalString(value['description'])\n\tconst count = optionalNumber(value['count'])\n\treturn {\n\t\tid: value['id'],\n\t\tname: value['name'],\n\t\t...(slug && { slug }),\n\t\t...(parent !== undefined && { parent }),\n\t\t...(description !== undefined && { description }),\n\t\t...(count !== undefined && { count })\n\t}\n}\n\nexport function parseProductCategories(value: unknown): WoocommerceProductCategory[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list product categories returned a non-array body', {\n\t\t\tcode: 'upstream'\n\t\t})\n\t}\n\treturn value.map(parseProductCategory)\n}\n\nexport function parseDeleteResult(value: unknown, fallbackId: number): WoocommerceDeleteOrderOutput {\n\tif (isPlainObject(value)) {\n\t\tconst previous = value['previous']\n\t\tif (isPlainObject(previous) && typeof previous['id'] === 'number') {\n\t\t\treturn { deleted: true, id: previous['id'] }\n\t\t}\n\t\tif (typeof value['id'] === 'number') {\n\t\t\treturn { deleted: true, id: value['id'] }\n\t\t}\n\t}\n\treturn { deleted: true, id: fallbackId }\n}\n\nexport function parseProductDeleteResult(value: unknown, fallbackId: number): WoocommerceDeleteProductOutput {\n\treturn parseDeleteResult(value, fallbackId)\n}\n","/**\n * WooCommerce REST API vendor client (wc/v3).\n * Host: `new WoocommerceClient(auth)`. Agent tools: `fromContext(ctx)`.\n */\n\nimport { ToolError } from '../../core/errors'\nimport { requireAuth } from '../../core/provider'\nimport type { ToolContext } from '../../core/types'\nimport { httpErrorCode, retryAfterMsFromHeader } from '../../transport/errors'\nimport { HttpService } from '../../transport/http-service'\nimport type { HttpCallOptions, HttpQueryResult, HttpServiceOptions } from '../../transport/http-service'\nimport type {\n\tWoocommerceAuth,\n\tWoocommerceCreateCouponInput,\n\tWoocommerceCreateCouponOutput,\n\tWoocommerceCreateCustomerInput,\n\tWoocommerceCreateCustomerOutput,\n\tWoocommerceCreateOrderInput,\n\tWoocommerceCreateOrderNoteInput,\n\tWoocommerceCreateOrderNoteOutput,\n\tWoocommerceCreateOrderOutput,\n\tWoocommerceCreateOrderRefundInput,\n\tWoocommerceCreateOrderRefundOutput,\n\tWoocommerceCreateProductInput,\n\tWoocommerceCreateProductOutput,\n\tWoocommerceDeleteOrderInput,\n\tWoocommerceDeleteOrderOutput,\n\tWoocommerceDeleteProductInput,\n\tWoocommerceDeleteProductOutput,\n\tWoocommerceGetCouponInput,\n\tWoocommerceGetCouponOutput,\n\tWoocommerceGetCustomerInput,\n\tWoocommerceGetCustomerOutput,\n\tWoocommerceGetOrderInput,\n\tWoocommerceGetOrderOutput,\n\tWoocommerceGetProductCategoryInput,\n\tWoocommerceGetProductCategoryOutput,\n\tWoocommerceGetProductInput,\n\tWoocommerceGetProductOutput,\n\tWoocommerceGetProductVariationInput,\n\tWoocommerceGetProductVariationOutput,\n\tWoocommerceListCouponsInput,\n\tWoocommerceListCouponsOutput,\n\tWoocommerceListCustomersInput,\n\tWoocommerceListCustomersOutput,\n\tWoocommerceListCustomersPageInput,\n\tWoocommerceListCustomersPageOutput,\n\tWoocommerceListOrderNotesInput,\n\tWoocommerceListOrderNotesOutput,\n\tWoocommerceListOrderRefundsInput,\n\tWoocommerceListOrderRefundsOutput,\n\tWoocommerceListOrdersInput,\n\tWoocommerceListOrdersOutput,\n\tWoocommerceListOrdersPageInput,\n\tWoocommerceListOrdersPageOutput,\n\tWoocommerceListProductCategoriesInput,\n\tWoocommerceListProductCategoriesOutput,\n\tWoocommerceListProductsInput,\n\tWoocommerceListProductsOutput,\n\tWoocommerceListProductsPageInput,\n\tWoocommerceListProductsPageOutput,\n\tWoocommerceListProductVariationsInput,\n\tWoocommerceListProductVariationsOutput,\n\tWoocommerceUpdateCouponInput,\n\tWoocommerceUpdateCouponOutput,\n\tWoocommerceUpdateCustomerInput,\n\tWoocommerceUpdateCustomerOutput,\n\tWoocommerceUpdateOrderInput,\n\tWoocommerceUpdateOrderOutput,\n\tWoocommerceUpdateProductInput,\n\tWoocommerceUpdateProductOutput\n} from './contracts'\nimport {\n\twoocommerceAuthSchema,\n\twoocommerceCustomerRawSchema,\n\twoocommerceListCustomersPageInputSchema,\n\twoocommerceListOrdersPageInputSchema,\n\twoocommerceListProductsPageInputSchema,\n\twoocommerceOrderRawSchema,\n\twoocommerceProductRawSchema\n} from './contracts'\nimport {\n\tapiBaseUrl,\n\tbasicAuthHeader,\n\tcollectionQuery,\n\tcouponWriteBody,\n\tcustomerWriteBody,\n\tlistPageMeta,\n\torderNoteWriteBody,\n\torderRefundWriteBody,\n\torderWriteBody,\n\tpageFromCursor,\n\tparseCoupon,\n\tparseCoupons,\n\tparseCustomer,\n\tparseCustomers,\n\tparseDeleteResult,\n\tparseOrder,\n\tparseOrderNote,\n\tparseOrderNotes,\n\tparseOrderRefund,\n\tparseOrderRefunds,\n\tparseCollectionPage,\n\tparseOrders,\n\tparseProduct,\n\tparseProductCategories,\n\tparseProductCategory,\n\tparseProductDeleteResult,\n\tparseProducts,\n\tparseProductVariation,\n\tparseProductVariations,\n\tproductWriteBody,\n\twoocommerceErrorDetails\n} from './domain'\n\nfunction throwWooCommerceHttpError(operation: string, result: HttpQueryResult): never {\n\tconst status = result.status\n\tconst retryAfterMs = retryAfterMsFromHeader(result.headers.get('retry-after'))\n\tconst provider = woocommerceErrorDetails(result.data)\n\tthrow new ToolError(`${operation} failed with HTTP ${status}`, {\n\t\tcode: httpErrorCode(status),\n\t\tretryable: status >= 500 || status === 429,\n\t\tdetails: {\n\t\t\tstatus,\n\t\t\toperation,\n\t\t\t...(retryAfterMs !== undefined && { retry_after_ms: retryAfterMs }),\n\t\t\t...provider\n\t\t}\n\t})\n}\n\nexport type WoocommerceClientOptions = Pick<HttpServiceOptions, 'fetch' | 'signal'>\n\nexport class WoocommerceClient {\n\treadonly #http: HttpService\n\n\tconstructor(auth: WoocommerceAuth, options: WoocommerceClientOptions = {}) {\n\t\tconst parsed = woocommerceAuthSchema.safeParse(auth)\n\t\tif (!parsed.success) {\n\t\t\tthrow new ToolError('Invalid WooCommerce auth credentials', {\n\t\t\t\tcode: 'bad_auth',\n\t\t\t\tdetails: { issues: parsed.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tthis.#http = new HttpService({\n\t\t\t...options,\n\t\t\tbaseURL: apiBaseUrl(parsed.data),\n\t\t\theaders: {\n\t\t\t\tAuthorization: basicAuthHeader(parsed.data),\n\t\t\t\t'Content-Type': 'application/json'\n\t\t\t},\n\t\t\tlabel: 'WooCommerce'\n\t\t})\n\t}\n\n\tstatic fromContext(ctx: ToolContext): WoocommerceClient {\n\t\tconst auth = requireAuth(ctx, woocommerceAuthSchema)\n\t\treturn new WoocommerceClient(auth, {\n\t\t\t...(ctx.fetch && { fetch: ctx.fetch }),\n\t\t\t...(ctx.signal && { signal: ctx.signal })\n\t\t})\n\t}\n\n\tasync #request(method: string, path: string, options: HttpCallOptions = {}): Promise<HttpQueryResult> {\n\t\tconst label = options.label ?? 'WooCommerce'\n\t\tconst result = await this.#http.query(method, path, { ...options, noThrow: true, label })\n\t\tif (result.status >= 200 && result.status < 300) return result\n\t\tthrowWooCommerceHttpError(label, result)\n\t}\n\n\t// ── Orders ──────────────────────────────────────────────────────────────\n\n\t/** GET /orders */\n\tasync listOrders(input: WoocommerceListOrdersInput = {}): Promise<WoocommerceListOrdersOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get('/orders', {\n\t\t\tlabel: 'WooCommerce listOrders',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.status && { status: input.status }),\n\t\t\t\t...(input.after && { after: input.after }),\n\t\t\t\t...(input.before && { before: input.before }),\n\t\t\t\t...(input.search && { search: input.search }),\n\t\t\t\t...(input.customer_id !== undefined && { customer: input.customer_id })\n\t\t\t}\n\t\t})\n\t\tconst items = parseOrders(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** One GET /orders request with raw records and X-WP-Total pagination. */\n\tasync listOrdersPage(input: WoocommerceListOrdersPageInput = {}): Promise<WoocommerceListOrdersPageOutput> {\n\t\tconst parsedInput = woocommerceListOrdersPageInputSchema.safeParse(input)\n\t\tif (!parsedInput.success) {\n\t\t\tthrow new ToolError('Invalid WooCommerce orders page input', {\n\t\t\t\tcode: 'bad_input',\n\t\t\t\tdetails: { issues: parsedInput.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tconst page = parsedInput.data.page ?? 1\n\t\tconst limit = parsedInput.data.limit ?? 10\n\t\tconst { data, headers } = await this.#request('GET', '/orders', {\n\t\t\tlabel: 'WooCommerce listOrdersPage',\n\t\t\tquery: {\n\t\t\t\t...collectionQuery(parsedInput.data),\n\t\t\t\t...(parsedInput.data.status && { status: parsedInput.data.status }),\n\t\t\t\t...(parsedInput.data.search && { search: parsedInput.data.search }),\n\t\t\t\t...(parsedInput.data.customer_id !== undefined && { customer: parsedInput.data.customer_id })\n\t\t\t}\n\t\t})\n\t\treturn parseCollectionPage(data, headers, woocommerceOrderRawSchema, page, limit, 'orders')\n\t}\n\n\t/** GET /orders/{id} */\n\tasync getOrder(input: WoocommerceGetOrderInput): Promise<WoocommerceGetOrderOutput> {\n\t\tconst { data } = await this.#http.get(`/orders/${input.order_id}`, { label: 'WooCommerce getOrder' })\n\t\treturn { order: parseOrder(data) }\n\t}\n\n\t/** POST /orders */\n\tasync createOrder(input: WoocommerceCreateOrderInput = {}): Promise<WoocommerceCreateOrderOutput> {\n\t\tconst { data } = await this.#http.post('/orders', orderWriteBody(input), {\n\t\t\tlabel: 'WooCommerce createOrder'\n\t\t})\n\t\treturn { order: parseOrder(data) }\n\t}\n\n\t/** PUT /orders/{id} */\n\tasync updateOrder(input: WoocommerceUpdateOrderInput): Promise<WoocommerceUpdateOrderOutput> {\n\t\tconst { order_id, ...fields } = input\n\t\tconst { data } = await this.#http.put(`/orders/${order_id}`, orderWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce updateOrder'\n\t\t})\n\t\treturn { order: parseOrder(data) }\n\t}\n\n\t/** DELETE /orders/{id} */\n\tasync deleteOrder(input: WoocommerceDeleteOrderInput): Promise<WoocommerceDeleteOrderOutput> {\n\t\tconst force = input.force !== false\n\t\tconst { data } = await this.#http.delete(`/orders/${input.order_id}`, {\n\t\t\tlabel: 'WooCommerce deleteOrder',\n\t\t\tquery: { force }\n\t\t})\n\t\treturn parseDeleteResult(data, input.order_id)\n\t}\n\n\t/** GET /orders/{id}/notes */\n\tasync listOrderNotes(input: WoocommerceListOrderNotesInput): Promise<WoocommerceListOrderNotesOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get(`/orders/${input.order_id}/notes`, {\n\t\t\tlabel: 'WooCommerce listOrderNotes',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.type && input.type !== 'any' && { type: input.type })\n\t\t\t}\n\t\t})\n\t\tconst items = parseOrderNotes(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** POST /orders/{id}/notes */\n\tasync createOrderNote(input: WoocommerceCreateOrderNoteInput): Promise<WoocommerceCreateOrderNoteOutput> {\n\t\tconst { order_id, ...fields } = input\n\t\tconst { data } = await this.#http.post(`/orders/${order_id}/notes`, orderNoteWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce createOrderNote'\n\t\t})\n\t\treturn { note: parseOrderNote(data) }\n\t}\n\n\t/** GET /orders/{id}/refunds */\n\tasync listOrderRefunds(input: WoocommerceListOrderRefundsInput): Promise<WoocommerceListOrderRefundsOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get(`/orders/${input.order_id}/refunds`, {\n\t\t\tlabel: 'WooCommerce listOrderRefunds',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit\n\t\t\t}\n\t\t})\n\t\tconst items = parseOrderRefunds(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** POST /orders/{id}/refunds */\n\tasync createOrderRefund(input: WoocommerceCreateOrderRefundInput): Promise<WoocommerceCreateOrderRefundOutput> {\n\t\tconst { order_id, ...fields } = input\n\t\tconst { data } = await this.#http.post(`/orders/${order_id}/refunds`, orderRefundWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce createOrderRefund'\n\t\t})\n\t\treturn { refund: parseOrderRefund(data) }\n\t}\n\n\t// ── Products ────────────────────────────────────────────────────────────\n\n\t/** GET /products */\n\tasync listProducts(input: WoocommerceListProductsInput = {}): Promise<WoocommerceListProductsOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get('/products', {\n\t\t\tlabel: 'WooCommerce listProducts',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.status && { status: input.status }),\n\t\t\t\t...(input.search && { search: input.search }),\n\t\t\t\t...(input.sku && { sku: input.sku }),\n\t\t\t\t...(input.category !== undefined && { category: input.category }),\n\t\t\t\t...(input.type && { type: input.type }),\n\t\t\t\t// WC REST: include is a list of product ids\n\t\t\t\t...(input.include && input.include.length > 0 && { include: input.include.join(',') })\n\t\t\t}\n\t\t})\n\t\tconst items = parseProducts(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** One GET /products request with raw records and X-WP-Total pagination. */\n\tasync listProductsPage(input: WoocommerceListProductsPageInput = {}): Promise<WoocommerceListProductsPageOutput> {\n\t\tconst parsedInput = woocommerceListProductsPageInputSchema.safeParse(input)\n\t\tif (!parsedInput.success) {\n\t\t\tthrow new ToolError('Invalid WooCommerce products page input', {\n\t\t\t\tcode: 'bad_input',\n\t\t\t\tdetails: { issues: parsedInput.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tconst page = parsedInput.data.page ?? 1\n\t\tconst limit = parsedInput.data.limit ?? 10\n\t\tconst { data, headers } = await this.#request('GET', '/products', {\n\t\t\tlabel: 'WooCommerce listProductsPage',\n\t\t\tquery: {\n\t\t\t\t...collectionQuery(parsedInput.data),\n\t\t\t\t...(parsedInput.data.status && { status: parsedInput.data.status }),\n\t\t\t\t...(parsedInput.data.search && { search: parsedInput.data.search }),\n\t\t\t\t...(parsedInput.data.sku && { sku: parsedInput.data.sku }),\n\t\t\t\t...(parsedInput.data.category !== undefined && { category: parsedInput.data.category }),\n\t\t\t\t...(parsedInput.data.type && { type: parsedInput.data.type }),\n\t\t\t\t...(parsedInput.data.include &&\n\t\t\t\t\tparsedInput.data.include.length > 0 && { include: parsedInput.data.include.join(',') })\n\t\t\t}\n\t\t})\n\t\treturn parseCollectionPage(data, headers, woocommerceProductRawSchema, page, limit, 'products')\n\t}\n\n\t/** GET /products/{id} */\n\tasync getProduct(input: WoocommerceGetProductInput): Promise<WoocommerceGetProductOutput> {\n\t\tconst { data } = await this.#http.get(`/products/${input.product_id}`, {\n\t\t\tlabel: 'WooCommerce getProduct'\n\t\t})\n\t\treturn { product: parseProduct(data) }\n\t}\n\n\t/** POST /products */\n\tasync createProduct(input: WoocommerceCreateProductInput): Promise<WoocommerceCreateProductOutput> {\n\t\tconst { data } = await this.#http.post('/products', productWriteBody(input), {\n\t\t\tlabel: 'WooCommerce createProduct'\n\t\t})\n\t\treturn { product: parseProduct(data) }\n\t}\n\n\t/** PUT /products/{id} */\n\tasync updateProduct(input: WoocommerceUpdateProductInput): Promise<WoocommerceUpdateProductOutput> {\n\t\tconst { product_id, ...fields } = input\n\t\tconst { data } = await this.#http.put(`/products/${product_id}`, productWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce updateProduct'\n\t\t})\n\t\treturn { product: parseProduct(data) }\n\t}\n\n\t/** DELETE /products/{id} */\n\tasync deleteProduct(input: WoocommerceDeleteProductInput): Promise<WoocommerceDeleteProductOutput> {\n\t\tconst force = input.force !== false\n\t\tconst { data } = await this.#http.delete(`/products/${input.product_id}`, {\n\t\t\tlabel: 'WooCommerce deleteProduct',\n\t\t\tquery: { force }\n\t\t})\n\t\treturn parseProductDeleteResult(data, input.product_id)\n\t}\n\n\t/** GET /products/{id}/variations */\n\tasync listProductVariations(\n\t\tinput: WoocommerceListProductVariationsInput\n\t): Promise<WoocommerceListProductVariationsOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get(`/products/${input.product_id}/variations`, {\n\t\t\tlabel: 'WooCommerce listProductVariations',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.status && { status: input.status }),\n\t\t\t\t...(input.sku && { sku: input.sku })\n\t\t\t}\n\t\t})\n\t\tconst items = parseProductVariations(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** GET /products/{product_id}/variations/{variation_id} */\n\tasync getProductVariation(input: WoocommerceGetProductVariationInput): Promise<WoocommerceGetProductVariationOutput> {\n\t\tconst { data } = await this.#http.get(`/products/${input.product_id}/variations/${input.variation_id}`, {\n\t\t\tlabel: 'WooCommerce getProductVariation'\n\t\t})\n\t\treturn { variation: parseProductVariation(data) }\n\t}\n\n\t// ── Customers ───────────────────────────────────────────────────────────\n\n\t/** GET /customers */\n\tasync listCustomers(input: WoocommerceListCustomersInput = {}): Promise<WoocommerceListCustomersOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get('/customers', {\n\t\t\tlabel: 'WooCommerce listCustomers',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.search && { search: input.search }),\n\t\t\t\t...(input.email && { email: input.email }),\n\t\t\t\t...(input.role && { role: input.role })\n\t\t\t}\n\t\t})\n\t\tconst items = parseCustomers(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** One GET /customers request with raw records and X-WP-Total pagination. */\n\tasync listCustomersPage(input: WoocommerceListCustomersPageInput = {}): Promise<WoocommerceListCustomersPageOutput> {\n\t\tconst parsedInput = woocommerceListCustomersPageInputSchema.safeParse(input)\n\t\tif (!parsedInput.success) {\n\t\t\tthrow new ToolError('Invalid WooCommerce customers page input', {\n\t\t\t\tcode: 'bad_input',\n\t\t\t\tdetails: { issues: parsedInput.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tconst page = parsedInput.data.page ?? 1\n\t\tconst limit = parsedInput.data.limit ?? 10\n\t\tconst { data, headers } = await this.#request('GET', '/customers', {\n\t\t\tlabel: 'WooCommerce listCustomersPage',\n\t\t\tquery: {\n\t\t\t\t...collectionQuery(parsedInput.data),\n\t\t\t\t...(parsedInput.data.search && { search: parsedInput.data.search }),\n\t\t\t\t...(parsedInput.data.email && { email: parsedInput.data.email }),\n\t\t\t\t...(parsedInput.data.role && { role: parsedInput.data.role })\n\t\t\t}\n\t\t})\n\t\treturn parseCollectionPage(data, headers, woocommerceCustomerRawSchema, page, limit, 'customers')\n\t}\n\n\t/** GET /customers/{id} */\n\tasync getCustomer(input: WoocommerceGetCustomerInput): Promise<WoocommerceGetCustomerOutput> {\n\t\tconst { data } = await this.#http.get(`/customers/${input.customer_id}`, {\n\t\t\tlabel: 'WooCommerce getCustomer'\n\t\t})\n\t\treturn { customer: parseCustomer(data) }\n\t}\n\n\t/** POST /customers */\n\tasync createCustomer(input: WoocommerceCreateCustomerInput): Promise<WoocommerceCreateCustomerOutput> {\n\t\tconst { data } = await this.#http.post('/customers', customerWriteBody(input), {\n\t\t\tlabel: 'WooCommerce createCustomer'\n\t\t})\n\t\treturn { customer: parseCustomer(data) }\n\t}\n\n\t/** PUT /customers/{id} */\n\tasync updateCustomer(input: WoocommerceUpdateCustomerInput): Promise<WoocommerceUpdateCustomerOutput> {\n\t\tconst { customer_id, ...fields } = input\n\t\tconst { data } = await this.#http.put(`/customers/${customer_id}`, customerWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce updateCustomer'\n\t\t})\n\t\treturn { customer: parseCustomer(data) }\n\t}\n\n\t// ── Coupons ─────────────────────────────────────────────────────────────\n\n\t/** GET /coupons */\n\tasync listCoupons(input: WoocommerceListCouponsInput = {}): Promise<WoocommerceListCouponsOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get('/coupons', {\n\t\t\tlabel: 'WooCommerce listCoupons',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.search && { search: input.search }),\n\t\t\t\t...(input.code && { code: input.code })\n\t\t\t}\n\t\t})\n\t\tconst items = parseCoupons(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** GET /coupons/{id} */\n\tasync getCoupon(input: WoocommerceGetCouponInput): Promise<WoocommerceGetCouponOutput> {\n\t\tconst { data } = await this.#http.get(`/coupons/${input.coupon_id}`, {\n\t\t\tlabel: 'WooCommerce getCoupon'\n\t\t})\n\t\treturn { coupon: parseCoupon(data) }\n\t}\n\n\t/** POST /coupons */\n\tasync createCoupon(input: WoocommerceCreateCouponInput): Promise<WoocommerceCreateCouponOutput> {\n\t\tconst { data } = await this.#http.post('/coupons', couponWriteBody(input), {\n\t\t\tlabel: 'WooCommerce createCoupon'\n\t\t})\n\t\treturn { coupon: parseCoupon(data) }\n\t}\n\n\t/** PUT /coupons/{id} */\n\tasync updateCoupon(input: WoocommerceUpdateCouponInput): Promise<WoocommerceUpdateCouponOutput> {\n\t\tconst { coupon_id, ...fields } = input\n\t\tconst { data } = await this.#http.put(`/coupons/${coupon_id}`, couponWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce updateCoupon'\n\t\t})\n\t\treturn { coupon: parseCoupon(data) }\n\t}\n\n\t// ── Product categories ──────────────────────────────────────────────────\n\n\t/** GET /products/categories */\n\tasync listProductCategories(\n\t\tinput: WoocommerceListProductCategoriesInput = {}\n\t): Promise<WoocommerceListProductCategoriesOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get('/products/categories', {\n\t\t\tlabel: 'WooCommerce listProductCategories',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.search && { search: input.search }),\n\t\t\t\t...(input.parent !== undefined && { parent: input.parent }),\n\t\t\t\t...(input.hide_empty !== undefined && { hide_empty: input.hide_empty })\n\t\t\t}\n\t\t})\n\t\tconst items = parseProductCategories(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** GET /products/categories/{id} */\n\tasync getProductCategory(input: WoocommerceGetProductCategoryInput): Promise<WoocommerceGetProductCategoryOutput> {\n\t\tconst { data } = await this.#http.get(`/products/categories/${input.category_id}`, {\n\t\t\tlabel: 'WooCommerce getProductCategory'\n\t\t})\n\t\treturn { category: parseProductCategory(data) }\n\t}\n}\n","import { defineModule, defineTool } from '../../core/define'\nimport { WoocommerceClient } from './client'\nimport {\n\twoocommerceAuthSchema,\n\twoocommerceCreateCouponInputSchema,\n\twoocommerceCreateCouponOutputSchema,\n\twoocommerceCreateCustomerInputSchema,\n\twoocommerceCreateCustomerOutputSchema,\n\twoocommerceCreateOrderInputSchema,\n\twoocommerceCreateOrderNoteInputSchema,\n\twoocommerceCreateOrderNoteOutputSchema,\n\twoocommerceCreateOrderOutputSchema,\n\twoocommerceCreateOrderRefundInputSchema,\n\twoocommerceCreateOrderRefundOutputSchema,\n\twoocommerceCreateProductInputSchema,\n\twoocommerceCreateProductOutputSchema,\n\twoocommerceDeleteOrderInputSchema,\n\twoocommerceDeleteOrderOutputSchema,\n\twoocommerceDeleteProductInputSchema,\n\twoocommerceDeleteProductOutputSchema,\n\twoocommerceGetCouponInputSchema,\n\twoocommerceGetCouponOutputSchema,\n\twoocommerceGetCustomerInputSchema,\n\twoocommerceGetCustomerOutputSchema,\n\twoocommerceGetOrderInputSchema,\n\twoocommerceGetOrderOutputSchema,\n\twoocommerceGetProductCategoryInputSchema,\n\twoocommerceGetProductCategoryOutputSchema,\n\twoocommerceGetProductInputSchema,\n\twoocommerceGetProductOutputSchema,\n\twoocommerceGetProductVariationInputSchema,\n\twoocommerceGetProductVariationOutputSchema,\n\twoocommerceListCouponsInputSchema,\n\twoocommerceListCouponsOutputSchema,\n\twoocommerceListCustomersInputSchema,\n\twoocommerceListCustomersOutputSchema,\n\twoocommerceListOrderNotesInputSchema,\n\twoocommerceListOrderNotesOutputSchema,\n\twoocommerceListOrderRefundsInputSchema,\n\twoocommerceListOrderRefundsOutputSchema,\n\twoocommerceListOrdersInputSchema,\n\twoocommerceListOrdersOutputSchema,\n\twoocommerceListProductCategoriesInputSchema,\n\twoocommerceListProductCategoriesOutputSchema,\n\twoocommerceListProductsInputSchema,\n\twoocommerceListProductsOutputSchema,\n\twoocommerceListProductVariationsInputSchema,\n\twoocommerceListProductVariationsOutputSchema,\n\twoocommerceUpdateCouponInputSchema,\n\twoocommerceUpdateCouponOutputSchema,\n\twoocommerceUpdateCustomerInputSchema,\n\twoocommerceUpdateCustomerOutputSchema,\n\twoocommerceUpdateOrderInputSchema,\n\twoocommerceUpdateOrderOutputSchema,\n\twoocommerceUpdateProductInputSchema,\n\twoocommerceUpdateProductOutputSchema\n} from './contracts'\n\n// ── Orders ──────────────────────────────────────────────────────────────────\n\nexport const woocommerceListOrdersTool = defineTool({\n\tid: 'woocommerce-list-orders',\n\tname: 'woocommerceListOrders',\n\tdescription:\n\t\t'List WooCommerce orders with optional status, date, search, and customer filters. Paginate with cursor (page number).',\n\tinputSchema: woocommerceListOrdersInputSchema,\n\toutputSchema: woocommerceListOrdersOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listOrders(input)\n})\n\nexport const woocommerceGetOrderTool = defineTool({\n\tid: 'woocommerce-get-order',\n\tname: 'woocommerceGetOrder',\n\tdescription: 'Get one WooCommerce order by numeric order id.',\n\tinputSchema: woocommerceGetOrderInputSchema,\n\toutputSchema: woocommerceGetOrderOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getOrder(input)\n})\n\nexport const woocommerceCreateOrderTool = defineTool({\n\tid: 'woocommerce-create-order',\n\tname: 'woocommerceCreateOrder',\n\tdescription:\n\t\t'Create a WooCommerce order with optional line items, billing/shipping, customer, status, and payment fields.',\n\tinputSchema: woocommerceCreateOrderInputSchema,\n\toutputSchema: woocommerceCreateOrderOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createOrder(input)\n})\n\nexport const woocommerceUpdateOrderTool = defineTool({\n\tid: 'woocommerce-update-order',\n\tname: 'woocommerceUpdateOrder',\n\tdescription: 'Update a WooCommerce order by id (status, line items, addresses, payment, notes, and meta).',\n\tinputSchema: woocommerceUpdateOrderInputSchema,\n\toutputSchema: woocommerceUpdateOrderOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateOrder(input)\n})\n\nexport const woocommerceDeleteOrderTool = defineTool({\n\tid: 'woocommerce-delete-order',\n\tname: 'woocommerceDeleteOrder',\n\tdescription: 'Delete a WooCommerce order by id. force defaults to true for permanent delete.',\n\tinputSchema: woocommerceDeleteOrderInputSchema,\n\toutputSchema: woocommerceDeleteOrderOutputSchema,\n\tsideEffect: 'delete',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).deleteOrder(input)\n})\n\nexport const woocommerceListOrderNotesTool = defineTool({\n\tid: 'woocommerce-list-order-notes',\n\tname: 'woocommerceListOrderNotes',\n\tdescription: 'List notes on a WooCommerce order. Optional type filter: any, customer, or internal.',\n\tinputSchema: woocommerceListOrderNotesInputSchema,\n\toutputSchema: woocommerceListOrderNotesOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listOrderNotes(input)\n})\n\nexport const woocommerceCreateOrderNoteTool = defineTool({\n\tid: 'woocommerce-create-order-note',\n\tname: 'woocommerceCreateOrderNote',\n\tdescription: 'Add a note to a WooCommerce order. Optional customer_note makes it visible to the customer.',\n\tinputSchema: woocommerceCreateOrderNoteInputSchema,\n\toutputSchema: woocommerceCreateOrderNoteOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createOrderNote(input)\n})\n\nexport const woocommerceListOrderRefundsTool = defineTool({\n\tid: 'woocommerce-list-order-refunds',\n\tname: 'woocommerceListOrderRefunds',\n\tdescription: 'List refunds for a WooCommerce order. Paginate with cursor.',\n\tinputSchema: woocommerceListOrderRefundsInputSchema,\n\toutputSchema: woocommerceListOrderRefundsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listOrderRefunds(input)\n})\n\nexport const woocommerceCreateOrderRefundTool = defineTool({\n\tid: 'woocommerce-create-order-refund',\n\tname: 'woocommerceCreateOrderRefund',\n\tdescription:\n\t\t'Create a refund on a WooCommerce order. Optional amount, reason, per-line items, and api_refund gateway flag.',\n\tinputSchema: woocommerceCreateOrderRefundInputSchema,\n\toutputSchema: woocommerceCreateOrderRefundOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createOrderRefund(input)\n})\n\n// ── Products ────────────────────────────────────────────────────────────────\n\nexport const woocommerceListProductsTool = defineTool({\n\tid: 'woocommerce-list-products',\n\tname: 'woocommerceListProducts',\n\tdescription:\n\t\t'List WooCommerce products with optional status, search, SKU, category, and type filters. Paginate with cursor.',\n\tinputSchema: woocommerceListProductsInputSchema,\n\toutputSchema: woocommerceListProductsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listProducts(input)\n})\n\nexport const woocommerceGetProductTool = defineTool({\n\tid: 'woocommerce-get-product',\n\tname: 'woocommerceGetProduct',\n\tdescription: 'Get one WooCommerce product by numeric product id.',\n\tinputSchema: woocommerceGetProductInputSchema,\n\toutputSchema: woocommerceGetProductOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getProduct(input)\n})\n\nexport const woocommerceCreateProductTool = defineTool({\n\tid: 'woocommerce-create-product',\n\tname: 'woocommerceCreateProduct',\n\tdescription:\n\t\t'Create a WooCommerce product (name required). Optional type, status, SKU, prices, stock, categories, and meta.',\n\tinputSchema: woocommerceCreateProductInputSchema,\n\toutputSchema: woocommerceCreateProductOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createProduct(input)\n})\n\nexport const woocommerceUpdateProductTool = defineTool({\n\tid: 'woocommerce-update-product',\n\tname: 'woocommerceUpdateProduct',\n\tdescription: 'Update a WooCommerce product by id (name, status, SKU, prices, stock, categories, meta).',\n\tinputSchema: woocommerceUpdateProductInputSchema,\n\toutputSchema: woocommerceUpdateProductOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateProduct(input)\n})\n\nexport const woocommerceDeleteProductTool = defineTool({\n\tid: 'woocommerce-delete-product',\n\tname: 'woocommerceDeleteProduct',\n\tdescription: 'Delete a WooCommerce product by id. force defaults to true for permanent delete.',\n\tinputSchema: woocommerceDeleteProductInputSchema,\n\toutputSchema: woocommerceDeleteProductOutputSchema,\n\tsideEffect: 'delete',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).deleteProduct(input)\n})\n\nexport const woocommerceListProductVariationsTool = defineTool({\n\tid: 'woocommerce-list-product-variations',\n\tname: 'woocommerceListProductVariations',\n\tdescription: 'List variations for a variable WooCommerce product. Paginate with cursor.',\n\tinputSchema: woocommerceListProductVariationsInputSchema,\n\toutputSchema: woocommerceListProductVariationsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listProductVariations(input)\n})\n\nexport const woocommerceGetProductVariationTool = defineTool({\n\tid: 'woocommerce-get-product-variation',\n\tname: 'woocommerceGetProductVariation',\n\tdescription: 'Get one product variation by parent product id and variation id.',\n\tinputSchema: woocommerceGetProductVariationInputSchema,\n\toutputSchema: woocommerceGetProductVariationOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getProductVariation(input)\n})\n\n// ── Customers ───────────────────────────────────────────────────────────────\n\nexport const woocommerceListCustomersTool = defineTool({\n\tid: 'woocommerce-list-customers',\n\tname: 'woocommerceListCustomers',\n\tdescription: 'List WooCommerce customers with optional search, email, and role filters. Paginate with cursor.',\n\tinputSchema: woocommerceListCustomersInputSchema,\n\toutputSchema: woocommerceListCustomersOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listCustomers(input)\n})\n\nexport const woocommerceGetCustomerTool = defineTool({\n\tid: 'woocommerce-get-customer',\n\tname: 'woocommerceGetCustomer',\n\tdescription: 'Get one WooCommerce customer by numeric customer id.',\n\tinputSchema: woocommerceGetCustomerInputSchema,\n\toutputSchema: woocommerceGetCustomerOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getCustomer(input)\n})\n\nexport const woocommerceCreateCustomerTool = defineTool({\n\tid: 'woocommerce-create-customer',\n\tname: 'woocommerceCreateCustomer',\n\tdescription: 'Create a WooCommerce customer (email required). Optional name, username, password, and addresses.',\n\tinputSchema: woocommerceCreateCustomerInputSchema,\n\toutputSchema: woocommerceCreateCustomerOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createCustomer(input)\n})\n\nexport const woocommerceUpdateCustomerTool = defineTool({\n\tid: 'woocommerce-update-customer',\n\tname: 'woocommerceUpdateCustomer',\n\tdescription: 'Update a WooCommerce customer by id (email, name, username, password, addresses, meta).',\n\tinputSchema: woocommerceUpdateCustomerInputSchema,\n\toutputSchema: woocommerceUpdateCustomerOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateCustomer(input)\n})\n\n// ── Coupons ─────────────────────────────────────────────────────────────────\n\nexport const woocommerceListCouponsTool = defineTool({\n\tid: 'woocommerce-list-coupons',\n\tname: 'woocommerceListCoupons',\n\tdescription: 'List WooCommerce coupons with optional search and code filters. Paginate with cursor.',\n\tinputSchema: woocommerceListCouponsInputSchema,\n\toutputSchema: woocommerceListCouponsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listCoupons(input)\n})\n\nexport const woocommerceGetCouponTool = defineTool({\n\tid: 'woocommerce-get-coupon',\n\tname: 'woocommerceGetCoupon',\n\tdescription: 'Get one WooCommerce coupon by numeric coupon id.',\n\tinputSchema: woocommerceGetCouponInputSchema,\n\toutputSchema: woocommerceGetCouponOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getCoupon(input)\n})\n\nexport const woocommerceCreateCouponTool = defineTool({\n\tid: 'woocommerce-create-coupon',\n\tname: 'woocommerceCreateCoupon',\n\tdescription:\n\t\t'Create a WooCommerce coupon (code required). Optional discount type, amount, limits, free shipping, and expiry.',\n\tinputSchema: woocommerceCreateCouponInputSchema,\n\toutputSchema: woocommerceCreateCouponOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createCoupon(input)\n})\n\nexport const woocommerceUpdateCouponTool = defineTool({\n\tid: 'woocommerce-update-coupon',\n\tname: 'woocommerceUpdateCoupon',\n\tdescription: 'Update a WooCommerce coupon by id (code, discount, amount, limits, free shipping, expiry).',\n\tinputSchema: woocommerceUpdateCouponInputSchema,\n\toutputSchema: woocommerceUpdateCouponOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateCoupon(input)\n})\n\n// ── Product categories ──────────────────────────────────────────────────────\n\nexport const woocommerceListProductCategoriesTool = defineTool({\n\tid: 'woocommerce-list-product-categories',\n\tname: 'woocommerceListProductCategories',\n\tdescription: 'List WooCommerce product categories with optional search, parent, and hide_empty filters.',\n\tinputSchema: woocommerceListProductCategoriesInputSchema,\n\toutputSchema: woocommerceListProductCategoriesOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listProductCategories(input)\n})\n\nexport const woocommerceGetProductCategoryTool = defineTool({\n\tid: 'woocommerce-get-product-category',\n\tname: 'woocommerceGetProductCategory',\n\tdescription: 'Get one WooCommerce product category by numeric category id.',\n\tinputSchema: woocommerceGetProductCategoryInputSchema,\n\toutputSchema: woocommerceGetProductCategoryOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getProductCategory(input)\n})\n\nexport const woocommerceModule = defineModule({\n\tid: 'woocommerce',\n\ttitle: 'WooCommerce',\n\tdescription:\n\t\t'WooCommerce REST API vendor pack (wc/v3): orders (CRUD, notes, refunds), products (CRUD, variations), customers, coupons, and product categories.',\n\truntime: 'both',\n\tauth: { type: 'custom', schema: woocommerceAuthSchema },\n\tcategories: ['commerce'],\n\tclassification: 'pii',\n\ttags: ['orders', 'products'],\n\ttools: [\n\t\twoocommerceListOrdersTool,\n\t\twoocommerceGetOrderTool,\n\t\twoocommerceCreateOrderTool,\n\t\twoocommerceUpdateOrderTool,\n\t\twoocommerceDeleteOrderTool,\n\t\twoocommerceListOrderNotesTool,\n\t\twoocommerceCreateOrderNoteTool,\n\t\twoocommerceListOrderRefundsTool,\n\t\twoocommerceCreateOrderRefundTool,\n\t\twoocommerceListProductsTool,\n\t\twoocommerceGetProductTool,\n\t\twoocommerceCreateProductTool,\n\t\twoocommerceUpdateProductTool,\n\t\twoocommerceDeleteProductTool,\n\t\twoocommerceListProductVariationsTool,\n\t\twoocommerceGetProductVariationTool,\n\t\twoocommerceListCustomersTool,\n\t\twoocommerceGetCustomerTool,\n\t\twoocommerceCreateCustomerTool,\n\t\twoocommerceUpdateCustomerTool,\n\t\twoocommerceListCouponsTool,\n\t\twoocommerceGetCouponTool,\n\t\twoocommerceCreateCouponTool,\n\t\twoocommerceUpdateCouponTool,\n\t\twoocommerceListProductCategoriesTool,\n\t\twoocommerceGetProductCategoryTool\n\t]\n})\n"],"mappings":";;;;;;;;AAEA,SAAS,cAAc,OAAwB;CAC9C,IAAI;EACH,MAAM,MAAM,IAAI,IAAI,KAAK;EACzB,OACC,IAAI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CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,kBAAkB,YAAY,GAAG,CAAC,CAAC,sBAAsB,KAAK;AAC9F,CAAC;AAED,MAAa,oCAAoC,WAAW;CAC3D,IAAI;CACJ,MAAM;CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,kBAAkB,YAAY,GAAG,CAAC,CAAC,mBAAmB,KAAK;AAC3F,CAAC;AAED,MAAa,oBAAoB,aAAa;CAC7C,IAAI;CACJ,OAAO;CACP,aACC;CACD,SAAS;CACT,MAAM;EAAE,MAAM;EAAU,QAAQ;CAAsB;CACtD,YAAY,CAAC,UAAU;CACvB,gBAAgB;CAChB,MAAM,CAAC,UAAU,UAAU;CAC3B,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD,CAAC"}
1
+ {"version":3,"file":"index.js","names":["#http","#request"],"sources":["../../../src/vendors/woocommerce/contracts.ts","../../../src/vendors/woocommerce/domain.ts","../../../src/vendors/woocommerce/client.ts","../../../src/vendors/woocommerce/module.ts"],"sourcesContent":["import { z } from 'zod'\n\nfunction isStoreOrigin(value: string): boolean {\n\ttry {\n\t\tconst url = new URL(value)\n\t\treturn (\n\t\t\turl.username === '' &&\n\t\t\turl.password === '' &&\n\t\t\t(url.pathname === '/' || url.pathname === '') &&\n\t\t\turl.search === '' &&\n\t\t\turl.hash === ''\n\t\t)\n\t} catch {\n\t\treturn false\n\t}\n}\n\nexport const woocommerceAuthSchema = z.object({\n\tstore_url: z\n\t\t.url()\n\t\t.refine(isStoreOrigin, { message: 'store_url must be an origin (no path, query, or fragment)' })\n\t\t.describe('WooCommerce store origin, for example https://shop.example.com (no trailing path)'),\n\tconsumer_key: z.string().min(1).describe('WooCommerce REST API consumer key'),\n\tconsumer_secret: z.string().min(1).describe('WooCommerce REST API consumer secret')\n})\n\nexport type WoocommerceAuth = z.infer<typeof woocommerceAuthSchema>\n\n// ── Shared ──────────────────────────────────────────────────────────────────\n\nconst listCursorFields = {\n\tcursor: z.string().min(1).optional().describe('Page number from a prior next_cursor'),\n\tlimit: z.int().min(1).max(100).optional().describe('Page size (1-100, default 10)')\n}\n\nexport const woocommerceAddressSchema = z.object({\n\tfirst_name: z.string().optional().describe('First name'),\n\tlast_name: z.string().optional().describe('Last name'),\n\tcompany: z.string().optional().describe('Company name'),\n\taddress_1: z.string().optional().describe('Address line 1'),\n\taddress_2: z.string().optional().describe('Address line 2'),\n\tcity: z.string().optional().describe('City'),\n\tstate: z.string().optional().describe('State / province code'),\n\tpostcode: z.string().optional().describe('Postal / ZIP code'),\n\tcountry: z.string().optional().describe('ISO country code'),\n\temail: z.string().optional().describe('Email (billing)'),\n\tphone: z.string().optional().describe('Phone')\n})\n\nexport const woocommerceMetaDataSchema = z.object({\n\tkey: z.string().min(1).describe('Meta key'),\n\tvalue: z.string().describe('Meta value as string')\n})\n\nexport const woocommerceLineItemInputSchema = z.object({\n\tid: z.int().positive().optional().describe('Existing line item id (updates)'),\n\tproduct_id: z.int().positive().optional().describe('Product id'),\n\tvariation_id: z.int().positive().optional().describe('Variation id when applicable'),\n\tquantity: z.int().min(0).optional().describe('Quantity'),\n\tname: z.string().min(1).optional().describe('Line item name override'),\n\tsku: z.string().min(1).optional().describe('SKU'),\n\tprice: z.string().min(1).optional().describe('Unit price as string'),\n\ttotal: z.string().min(1).optional().describe('Line total as string')\n})\n\n/** Order line item on read responses (list/get order). */\nexport const woocommerceOrderLineItemSchema = z.object({\n\tid: z.number().describe('Order line item id'),\n\tproduct_id: z.number().optional().describe('Product id'),\n\tvariation_id: z.number().optional().describe('Variation id when applicable'),\n\tquantity: z.number().optional().describe('Quantity'),\n\tname: z.string().optional().describe('Line item name'),\n\tsku: z.string().optional().describe('SKU'),\n\tprice: z.string().optional().describe('Unit price as string'),\n\ttotal: z.string().optional().describe('Line total as string')\n})\n\n/** Nested category on product read responses. */\nexport const woocommerceProductCategoryRefSchema = z.object({\n\tid: z.number().describe('Category id'),\n\tname: z.string().optional().describe('Category name'),\n\tslug: z.string().optional().describe('Category slug')\n})\n\n// ── Orders ──────────────────────────────────────────────────────────────────\n\nexport const woocommerceOrderSchema = z.object({\n\tid: z.number(),\n\tnumber: z.string(),\n\tstatus: z.string(),\n\tcurrency: z.string(),\n\ttotal: z.string(),\n\tdate_created: z.string().optional(),\n\tcustomer_id: z.number().optional(),\n\tpayment_method: z.string().optional(),\n\tpayment_method_title: z.string().optional(),\n\tcustomer_note: z.string().optional(),\n\tline_items: z.array(woocommerceOrderLineItemSchema).optional().describe('Order line items when returned by the store')\n})\n\nexport const woocommerceListOrdersInputSchema = z.object({\n\tstatus: z.string().min(1).optional().describe('Order status filter (e.g. processing, completed)'),\n\tafter: z.string().min(1).optional().describe('ISO 8601 datetime; orders created after this'),\n\tbefore: z.string().min(1).optional().describe('ISO 8601 datetime; orders created before this'),\n\tsearch: z.string().min(1).optional().describe('Search term (order number, customer, …)'),\n\tcustomer_id: z.int().positive().optional().describe('Filter by customer id'),\n\t...listCursorFields\n})\n\nexport const woocommerceListOrdersOutputSchema = z.object({\n\titems: z.array(woocommerceOrderSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetOrderInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id')\n})\n\nexport const woocommerceGetOrderOutputSchema = z.object({\n\torder: woocommerceOrderSchema\n})\n\nexport const woocommerceCreateOrderInputSchema = z.object({\n\tstatus: z.string().min(1).optional().describe('Order status (pending, processing, …)'),\n\tcustomer_id: z.int().positive().optional().describe('Existing customer id'),\n\tpayment_method: z.string().min(1).optional().describe('Payment method id'),\n\tpayment_method_title: z.string().min(1).optional().describe('Payment method title'),\n\tset_paid: z.boolean().optional().describe('Mark order as paid'),\n\tcustomer_note: z.string().optional().describe('Customer note'),\n\tbilling: woocommerceAddressSchema.optional().describe('Billing address'),\n\tshipping: woocommerceAddressSchema.optional().describe('Shipping address'),\n\tline_items: z.array(woocommerceLineItemInputSchema).min(1).optional().describe('Order line items'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Order meta data')\n})\n\nexport const woocommerceCreateOrderOutputSchema = woocommerceGetOrderOutputSchema\n\nexport const woocommerceUpdateOrderInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\tstatus: z.string().min(1).optional().describe('Order status'),\n\tcustomer_id: z.int().nonnegative().optional().describe('Customer id (0 clears guest link)'),\n\tpayment_method: z.string().min(1).optional().describe('Payment method id'),\n\tpayment_method_title: z.string().min(1).optional().describe('Payment method title'),\n\tset_paid: z.boolean().optional().describe('Mark order as paid'),\n\tcustomer_note: z.string().optional().describe('Customer note'),\n\tbilling: woocommerceAddressSchema.optional().describe('Billing address'),\n\tshipping: woocommerceAddressSchema.optional().describe('Shipping address'),\n\tline_items: z.array(woocommerceLineItemInputSchema).optional().describe('Line items (include id to update)'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Order meta data')\n})\n\nexport const woocommerceUpdateOrderOutputSchema = woocommerceGetOrderOutputSchema\n\nexport const woocommerceDeleteOrderInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\tforce: z.boolean().optional().describe('Permanently delete when true (default true)')\n})\n\nexport const woocommerceDeleteOrderOutputSchema = z.object({\n\tdeleted: z.boolean(),\n\tid: z.number()\n})\n\n// ── Order notes ─────────────────────────────────────────────────────────────\n\nexport const woocommerceOrderNoteSchema = z.object({\n\tid: z.number(),\n\tnote: z.string(),\n\tcustomer_note: z.boolean().optional(),\n\tdate_created: z.string().optional(),\n\tadded_by_user: z.boolean().optional()\n})\n\nexport const woocommerceListOrderNotesInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\ttype: z.enum(['any', 'customer', 'internal']).optional().describe('Note type filter (default any)'),\n\t...listCursorFields\n})\n\nexport const woocommerceListOrderNotesOutputSchema = z.object({\n\titems: z.array(woocommerceOrderNoteSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceCreateOrderNoteInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\tnote: z.string().min(1).describe('Note text'),\n\tcustomer_note: z.boolean().optional().describe('When true, note is visible to the customer'),\n\tadded_by_user: z.boolean().optional().describe('When true, note is attributed to a user')\n})\n\nexport const woocommerceCreateOrderNoteOutputSchema = z.object({\n\tnote: woocommerceOrderNoteSchema\n})\n\n// ── Order refunds ───────────────────────────────────────────────────────────\n\nexport const woocommerceOrderRefundSchema = z.object({\n\tid: z.number(),\n\tamount: z.string().optional(),\n\treason: z.string().optional(),\n\tdate_created: z.string().optional(),\n\trefunded_by: z.number().optional()\n})\n\nexport const woocommerceListOrderRefundsInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\t...listCursorFields\n})\n\nexport const woocommerceListOrderRefundsOutputSchema = z.object({\n\titems: z.array(woocommerceOrderRefundSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceCreateOrderRefundInputSchema = z.object({\n\torder_id: z.int().positive().describe('WooCommerce order id'),\n\tamount: z.string().min(1).optional().describe('Refund amount as string'),\n\treason: z.string().optional().describe('Refund reason'),\n\tapi_refund: z.boolean().optional().describe('When true, attempt payment gateway refund'),\n\tline_items: z\n\t\t.array(\n\t\t\tz.object({\n\t\t\t\tid: z.int().positive().describe('Order line item id to refund'),\n\t\t\t\tquantity: z.int().min(0).optional().describe('Quantity to refund'),\n\t\t\t\trefund_total: z.string().min(1).optional().describe('Amount to refund for this line')\n\t\t\t})\n\t\t)\n\t\t.optional()\n\t\t.describe('Optional per-line refunds')\n})\n\nexport const woocommerceCreateOrderRefundOutputSchema = z.object({\n\trefund: woocommerceOrderRefundSchema\n})\n\n// ── Products ────────────────────────────────────────────────────────────────\n\nexport const woocommerceProductSchema = z.object({\n\tid: z.number(),\n\tname: z.string(),\n\tsku: z.string().optional(),\n\ttype: z.string(),\n\tstatus: z.string(),\n\tprice: z.string().optional(),\n\tregular_price: z.string().optional(),\n\tsale_price: z.string().optional(),\n\tstock_status: z.string().optional(),\n\tstock_quantity: z.number().optional(),\n\tmanage_stock: z.boolean().optional(),\n\tcategories: z\n\t\t.array(woocommerceProductCategoryRefSchema)\n\t\t.optional()\n\t\t.describe('Product categories when returned by the store')\n})\n\nexport const woocommerceListProductsInputSchema = z.object({\n\tstatus: z.string().min(1).optional().describe('Product status (publish, draft, …)'),\n\tsearch: z.string().min(1).optional().describe('Search term'),\n\tsku: z.string().min(1).optional().describe('Exact SKU filter'),\n\tcategory: z.int().positive().optional().describe('Product category id'),\n\ttype: z.string().min(1).optional().describe('Product type (simple, variable, …)'),\n\tinclude: z\n\t\t.array(z.int().positive())\n\t\t.min(1)\n\t\t.max(100)\n\t\t.optional()\n\t\t.describe('Limit results to these product ids (WooCommerce include parameter)'),\n\t...listCursorFields\n})\n\nexport const woocommerceListProductsOutputSchema = z.object({\n\titems: z.array(woocommerceProductSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetProductInputSchema = z.object({\n\tproduct_id: z.int().positive().describe('WooCommerce product id')\n})\n\nexport const woocommerceGetProductOutputSchema = z.object({\n\tproduct: woocommerceProductSchema\n})\n\nexport const woocommerceCreateProductInputSchema = z.object({\n\tname: z.string().min(1).describe('Product name'),\n\ttype: z.string().min(1).optional().describe('Product type (simple, variable, grouped, external)'),\n\tstatus: z.string().min(1).optional().describe('Product status (draft, publish, …)'),\n\tsku: z.string().min(1).optional().describe('SKU'),\n\tregular_price: z.string().min(1).optional().describe('Regular price as string'),\n\tsale_price: z.string().optional().describe('Sale price as string'),\n\tdescription: z.string().optional().describe('Full HTML description'),\n\tshort_description: z.string().optional().describe('Short description'),\n\tmanage_stock: z.boolean().optional().describe('Whether stock is managed'),\n\tstock_quantity: z.int().optional().describe('Stock quantity when manage_stock is true'),\n\tstock_status: z.string().min(1).optional().describe('instock, outofstock, onbackorder'),\n\tcategories: z\n\t\t.array(z.object({ id: z.int().positive().describe('Category id') }))\n\t\t.optional()\n\t\t.describe('Category associations'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Product meta data')\n})\n\nexport const woocommerceCreateProductOutputSchema = woocommerceGetProductOutputSchema\n\nexport const woocommerceUpdateProductInputSchema = z.object({\n\tproduct_id: z.int().positive().describe('WooCommerce product id'),\n\tname: z.string().min(1).optional().describe('Product name'),\n\ttype: z.string().min(1).optional().describe('Product type'),\n\tstatus: z.string().min(1).optional().describe('Product status'),\n\tsku: z.string().optional().describe('SKU (empty string clears)'),\n\tregular_price: z.string().optional().describe('Regular price as string'),\n\tsale_price: z.string().optional().describe('Sale price as string'),\n\tdescription: z.string().optional().describe('Full HTML description'),\n\tshort_description: z.string().optional().describe('Short description'),\n\tmanage_stock: z.boolean().optional().describe('Whether stock is managed'),\n\tstock_quantity: z.int().optional().describe('Stock quantity'),\n\tstock_status: z.string().min(1).optional().describe('instock, outofstock, onbackorder'),\n\tcategories: z\n\t\t.array(z.object({ id: z.int().positive().describe('Category id') }))\n\t\t.optional()\n\t\t.describe('Category associations'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Product meta data')\n})\n\nexport const woocommerceUpdateProductOutputSchema = woocommerceGetProductOutputSchema\n\nexport const woocommerceDeleteProductInputSchema = z.object({\n\tproduct_id: z.int().positive().describe('WooCommerce product id'),\n\tforce: z.boolean().optional().describe('Permanently delete when true (default true)')\n})\n\nexport const woocommerceDeleteProductOutputSchema = z.object({\n\tdeleted: z.boolean(),\n\tid: z.number()\n})\n\n// ── Product variations ──────────────────────────────────────────────────────\n\nexport const woocommerceProductVariationSchema = z.object({\n\tid: z.number(),\n\tsku: z.string().optional(),\n\tprice: z.string().optional(),\n\tregular_price: z.string().optional(),\n\tsale_price: z.string().optional(),\n\tstatus: z.string().optional(),\n\tstock_status: z.string().optional(),\n\tstock_quantity: z.number().optional(),\n\tmanage_stock: z.boolean().optional()\n})\n\nexport const woocommerceListProductVariationsInputSchema = z.object({\n\tproduct_id: z.int().positive().describe('Parent product id'),\n\tstatus: z.string().min(1).optional().describe('Variation status filter'),\n\tsku: z.string().min(1).optional().describe('Exact SKU filter'),\n\t...listCursorFields\n})\n\nexport const woocommerceListProductVariationsOutputSchema = z.object({\n\titems: z.array(woocommerceProductVariationSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetProductVariationInputSchema = z.object({\n\tproduct_id: z.int().positive().describe('Parent product id'),\n\tvariation_id: z.int().positive().describe('Variation id')\n})\n\nexport const woocommerceGetProductVariationOutputSchema = z.object({\n\tvariation: woocommerceProductVariationSchema\n})\n\n// ── Customers ───────────────────────────────────────────────────────────────\n\nexport const woocommerceCustomerSchema = z.object({\n\tid: z.number(),\n\temail: z.string(),\n\tfirst_name: z.string().optional(),\n\tlast_name: z.string().optional(),\n\tusername: z.string().optional(),\n\trole: z.string().optional(),\n\tdate_created: z.string().optional()\n})\n\nexport const woocommerceListCustomersInputSchema = z.object({\n\tsearch: z.string().min(1).optional().describe('Search term (email, name, …)'),\n\temail: z.string().min(1).optional().describe('Exact email filter'),\n\trole: z.string().min(1).optional().describe('Customer role filter'),\n\t...listCursorFields\n})\n\nexport const woocommerceListCustomersOutputSchema = z.object({\n\titems: z.array(woocommerceCustomerSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetCustomerInputSchema = z.object({\n\tcustomer_id: z.int().positive().describe('WooCommerce customer id')\n})\n\nexport const woocommerceGetCustomerOutputSchema = z.object({\n\tcustomer: woocommerceCustomerSchema\n})\n\nexport const woocommerceCreateCustomerInputSchema = z.object({\n\temail: z.string().min(1).describe('Customer email'),\n\tfirst_name: z.string().optional().describe('First name'),\n\tlast_name: z.string().optional().describe('Last name'),\n\tusername: z.string().min(1).optional().describe('Username (auto-generated when omitted)'),\n\tpassword: z.string().min(1).optional().describe('Account password when creating a login'),\n\tbilling: woocommerceAddressSchema.optional().describe('Billing address'),\n\tshipping: woocommerceAddressSchema.optional().describe('Shipping address'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Customer meta data')\n})\n\nexport const woocommerceCreateCustomerOutputSchema = woocommerceGetCustomerOutputSchema\n\nexport const woocommerceUpdateCustomerInputSchema = z.object({\n\tcustomer_id: z.int().positive().describe('WooCommerce customer id'),\n\temail: z.string().min(1).optional().describe('Customer email'),\n\tfirst_name: z.string().optional().describe('First name'),\n\tlast_name: z.string().optional().describe('Last name'),\n\tusername: z.string().min(1).optional().describe('Username'),\n\tpassword: z.string().min(1).optional().describe('New password'),\n\tbilling: woocommerceAddressSchema.optional().describe('Billing address'),\n\tshipping: woocommerceAddressSchema.optional().describe('Shipping address'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Customer meta data')\n})\n\nexport const woocommerceUpdateCustomerOutputSchema = woocommerceGetCustomerOutputSchema\n\n// ── Coupons ─────────────────────────────────────────────────────────────────\n\nexport const woocommerceCouponSchema = z.object({\n\tid: z.number(),\n\tcode: z.string(),\n\tamount: z.string().optional(),\n\tdiscount_type: z.string().optional(),\n\tdescription: z.string().optional(),\n\tdate_expires: z.string().optional(),\n\tusage_count: z.number().optional(),\n\tusage_limit: z.number().optional(),\n\tfree_shipping: z.boolean().optional()\n})\n\nexport const woocommerceListCouponsInputSchema = z.object({\n\tsearch: z.string().min(1).optional().describe('Search term (code, description, …)'),\n\tcode: z.string().min(1).optional().describe('Exact coupon code filter'),\n\t...listCursorFields\n})\n\nexport const woocommerceListCouponsOutputSchema = z.object({\n\titems: z.array(woocommerceCouponSchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetCouponInputSchema = z.object({\n\tcoupon_id: z.int().positive().describe('WooCommerce coupon id')\n})\n\nexport const woocommerceGetCouponOutputSchema = z.object({\n\tcoupon: woocommerceCouponSchema\n})\n\nexport const woocommerceCreateCouponInputSchema = z.object({\n\tcode: z.string().min(1).describe('Coupon code'),\n\tdiscount_type: z.string().min(1).optional().describe('percent, fixed_cart, or fixed_product'),\n\tamount: z.string().min(1).optional().describe('Discount amount as string'),\n\tdescription: z.string().optional().describe('Coupon description'),\n\tindividual_use: z.boolean().optional().describe('Cannot combine with other coupons'),\n\texclude_sale_items: z.boolean().optional().describe('Exclude sale items'),\n\tminimum_amount: z.string().min(1).optional().describe('Minimum cart amount'),\n\tmaximum_amount: z.string().min(1).optional().describe('Maximum cart amount'),\n\tusage_limit: z.int().positive().optional().describe('Total usage limit'),\n\tusage_limit_per_user: z.int().positive().optional().describe('Per-user usage limit'),\n\tfree_shipping: z.boolean().optional().describe('Enable free shipping'),\n\tdate_expires: z.string().min(1).optional().describe('ISO 8601 expiry datetime'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Coupon meta data')\n})\n\nexport const woocommerceCreateCouponOutputSchema = woocommerceGetCouponOutputSchema\n\nexport const woocommerceUpdateCouponInputSchema = z.object({\n\tcoupon_id: z.int().positive().describe('WooCommerce coupon id'),\n\tcode: z.string().min(1).optional().describe('Coupon code'),\n\tdiscount_type: z.string().min(1).optional().describe('percent, fixed_cart, or fixed_product'),\n\tamount: z.string().min(1).optional().describe('Discount amount as string'),\n\tdescription: z.string().optional().describe('Coupon description'),\n\tindividual_use: z.boolean().optional().describe('Cannot combine with other coupons'),\n\texclude_sale_items: z.boolean().optional().describe('Exclude sale items'),\n\tminimum_amount: z.string().optional().describe('Minimum cart amount'),\n\tmaximum_amount: z.string().optional().describe('Maximum cart amount'),\n\tusage_limit: z.int().nonnegative().optional().describe('Total usage limit (0 unlimited)'),\n\tusage_limit_per_user: z.int().nonnegative().optional().describe('Per-user usage limit'),\n\tfree_shipping: z.boolean().optional().describe('Enable free shipping'),\n\tdate_expires: z.string().optional().describe('ISO 8601 expiry datetime'),\n\tmeta_data: z.array(woocommerceMetaDataSchema).optional().describe('Coupon meta data')\n})\n\nexport const woocommerceUpdateCouponOutputSchema = woocommerceGetCouponOutputSchema\n\n// ── Product categories ──────────────────────────────────────────────────────\n\nexport const woocommerceProductCategorySchema = z.object({\n\tid: z.number(),\n\tname: z.string(),\n\tslug: z.string().optional(),\n\tparent: z.number().optional(),\n\tdescription: z.string().optional(),\n\tcount: z.number().optional()\n})\n\nexport const woocommerceListProductCategoriesInputSchema = z.object({\n\tsearch: z.string().min(1).optional().describe('Search term'),\n\tparent: z.int().nonnegative().optional().describe('Parent category id (0 for top-level)'),\n\thide_empty: z.boolean().optional().describe('Hide categories with no products'),\n\t...listCursorFields\n})\n\nexport const woocommerceListProductCategoriesOutputSchema = z.object({\n\titems: z.array(woocommerceProductCategorySchema),\n\tnext_cursor: z.string().optional(),\n\ttruncated: z.boolean()\n})\n\nexport const woocommerceGetProductCategoryInputSchema = z.object({\n\tcategory_id: z.int().positive().describe('Product category id')\n})\n\nexport const woocommerceGetProductCategoryOutputSchema = z.object({\n\tcategory: woocommerceProductCategorySchema\n})\n\n// ── Raw collection pages (host / warehouse; not agent tools) ────────────────\n\nconst woocommercePageFields = {\n\tpage: z.int().min(1).optional(),\n\tlimit: z.int().min(1).max(100).optional()\n}\n\nconst woocommerceCollectionTimeFields = {\n\tafter: z.string().min(1).optional(),\n\tbefore: z.string().min(1).optional(),\n\tmodified_after: z.string().min(1).optional(),\n\tmodified_before: z.string().min(1).optional(),\n\tdates_are_gmt: z.boolean().optional(),\n\torder: z.enum(['asc', 'desc']).optional(),\n\torderby: z.string().min(1).optional()\n}\n\nexport const woocommerceRawRecordSchema = z.looseObject({\n\tid: z.number().int(),\n\tdate_created: z.string().nullable().optional(),\n\tdate_created_gmt: z.string().nullable().optional(),\n\tdate_modified: z.string().nullable().optional(),\n\tdate_modified_gmt: z.string().nullable().optional()\n})\n\nexport const woocommerceOrderRawSchema = woocommerceRawRecordSchema\nexport const woocommerceProductRawSchema = woocommerceRawRecordSchema\nexport const woocommerceCustomerRawSchema = woocommerceRawRecordSchema\n\nexport const woocommercePaginationSchema = z.object({\n\tpage: z.int().min(1),\n\tpage_size: z.int().min(1),\n\ttotal_items: z.int().nonnegative(),\n\ttotal_pages: z.int().nonnegative(),\n\thas_more: z.boolean()\n})\n\nconst woocommercePageOutputMeta = {\n\tpagination: woocommercePaginationSchema\n}\n\nexport const woocommerceListOrdersPageInputSchema = z.strictObject({\n\t...woocommercePageFields,\n\tstatus: z.string().min(1).optional(),\n\tsearch: z.string().min(1).optional(),\n\tcustomer_id: z.int().positive().optional(),\n\t...woocommerceCollectionTimeFields\n})\n\nexport const woocommerceListOrdersPageOutputSchema = z.object({\n\titems: z.array(woocommerceOrderRawSchema),\n\t...woocommercePageOutputMeta\n})\n\nexport const woocommerceListProductsPageInputSchema = z.strictObject({\n\t...woocommercePageFields,\n\tstatus: z.string().min(1).optional(),\n\tsearch: z.string().min(1).optional(),\n\tsku: z.string().min(1).optional(),\n\tcategory: z.int().positive().optional(),\n\ttype: z.string().min(1).optional(),\n\tinclude: z.array(z.int().positive()).min(1).max(100).optional(),\n\t...woocommerceCollectionTimeFields\n})\n\nexport const woocommerceListProductsPageOutputSchema = z.object({\n\titems: z.array(woocommerceProductRawSchema),\n\t...woocommercePageOutputMeta\n})\n\nexport const woocommerceListCustomersPageInputSchema = z.strictObject({\n\t...woocommercePageFields,\n\tsearch: z.string().min(1).optional(),\n\temail: z.string().min(1).optional(),\n\trole: z.string().min(1).optional(),\n\t...woocommerceCollectionTimeFields\n})\n\nexport const woocommerceListCustomersPageOutputSchema = z.object({\n\titems: z.array(woocommerceCustomerRawSchema),\n\t...woocommercePageOutputMeta\n})\n\n// ── Types ───────────────────────────────────────────────────────────────────\n\nexport type WoocommerceAddress = z.infer<typeof woocommerceAddressSchema>\nexport type WoocommerceMetaData = z.infer<typeof woocommerceMetaDataSchema>\nexport type WoocommerceLineItemInput = z.infer<typeof woocommerceLineItemInputSchema>\n\nexport type WoocommerceOrder = z.infer<typeof woocommerceOrderSchema>\nexport type WoocommerceListOrdersInput = z.infer<typeof woocommerceListOrdersInputSchema>\nexport type WoocommerceListOrdersOutput = z.infer<typeof woocommerceListOrdersOutputSchema>\nexport type WoocommerceGetOrderInput = z.infer<typeof woocommerceGetOrderInputSchema>\nexport type WoocommerceGetOrderOutput = z.infer<typeof woocommerceGetOrderOutputSchema>\nexport type WoocommerceCreateOrderInput = z.infer<typeof woocommerceCreateOrderInputSchema>\nexport type WoocommerceCreateOrderOutput = z.infer<typeof woocommerceCreateOrderOutputSchema>\nexport type WoocommerceUpdateOrderInput = z.infer<typeof woocommerceUpdateOrderInputSchema>\nexport type WoocommerceUpdateOrderOutput = z.infer<typeof woocommerceUpdateOrderOutputSchema>\nexport type WoocommerceDeleteOrderInput = z.infer<typeof woocommerceDeleteOrderInputSchema>\nexport type WoocommerceDeleteOrderOutput = z.infer<typeof woocommerceDeleteOrderOutputSchema>\n\nexport type WoocommerceOrderNote = z.infer<typeof woocommerceOrderNoteSchema>\nexport type WoocommerceListOrderNotesInput = z.infer<typeof woocommerceListOrderNotesInputSchema>\nexport type WoocommerceListOrderNotesOutput = z.infer<typeof woocommerceListOrderNotesOutputSchema>\nexport type WoocommerceCreateOrderNoteInput = z.infer<typeof woocommerceCreateOrderNoteInputSchema>\nexport type WoocommerceCreateOrderNoteOutput = z.infer<typeof woocommerceCreateOrderNoteOutputSchema>\n\nexport type WoocommerceOrderRefund = z.infer<typeof woocommerceOrderRefundSchema>\nexport type WoocommerceListOrderRefundsInput = z.infer<typeof woocommerceListOrderRefundsInputSchema>\nexport type WoocommerceListOrderRefundsOutput = z.infer<typeof woocommerceListOrderRefundsOutputSchema>\nexport type WoocommerceCreateOrderRefundInput = z.infer<typeof woocommerceCreateOrderRefundInputSchema>\nexport type WoocommerceCreateOrderRefundOutput = z.infer<typeof woocommerceCreateOrderRefundOutputSchema>\n\nexport type WoocommerceProduct = z.infer<typeof woocommerceProductSchema>\nexport type WoocommerceListProductsInput = z.infer<typeof woocommerceListProductsInputSchema>\nexport type WoocommerceListProductsOutput = z.infer<typeof woocommerceListProductsOutputSchema>\nexport type WoocommerceGetProductInput = z.infer<typeof woocommerceGetProductInputSchema>\nexport type WoocommerceGetProductOutput = z.infer<typeof woocommerceGetProductOutputSchema>\nexport type WoocommerceCreateProductInput = z.infer<typeof woocommerceCreateProductInputSchema>\nexport type WoocommerceCreateProductOutput = z.infer<typeof woocommerceCreateProductOutputSchema>\nexport type WoocommerceUpdateProductInput = z.infer<typeof woocommerceUpdateProductInputSchema>\nexport type WoocommerceUpdateProductOutput = z.infer<typeof woocommerceUpdateProductOutputSchema>\nexport type WoocommerceDeleteProductInput = z.infer<typeof woocommerceDeleteProductInputSchema>\nexport type WoocommerceDeleteProductOutput = z.infer<typeof woocommerceDeleteProductOutputSchema>\n\nexport type WoocommerceProductVariation = z.infer<typeof woocommerceProductVariationSchema>\nexport type WoocommerceListProductVariationsInput = z.infer<typeof woocommerceListProductVariationsInputSchema>\nexport type WoocommerceListProductVariationsOutput = z.infer<typeof woocommerceListProductVariationsOutputSchema>\nexport type WoocommerceGetProductVariationInput = z.infer<typeof woocommerceGetProductVariationInputSchema>\nexport type WoocommerceGetProductVariationOutput = z.infer<typeof woocommerceGetProductVariationOutputSchema>\n\nexport type WoocommerceCustomer = z.infer<typeof woocommerceCustomerSchema>\nexport type WoocommerceListCustomersInput = z.infer<typeof woocommerceListCustomersInputSchema>\nexport type WoocommerceListCustomersOutput = z.infer<typeof woocommerceListCustomersOutputSchema>\nexport type WoocommerceGetCustomerInput = z.infer<typeof woocommerceGetCustomerInputSchema>\nexport type WoocommerceGetCustomerOutput = z.infer<typeof woocommerceGetCustomerOutputSchema>\nexport type WoocommerceCreateCustomerInput = z.infer<typeof woocommerceCreateCustomerInputSchema>\nexport type WoocommerceCreateCustomerOutput = z.infer<typeof woocommerceCreateCustomerOutputSchema>\nexport type WoocommerceUpdateCustomerInput = z.infer<typeof woocommerceUpdateCustomerInputSchema>\nexport type WoocommerceUpdateCustomerOutput = z.infer<typeof woocommerceUpdateCustomerOutputSchema>\n\nexport type WoocommerceCoupon = z.infer<typeof woocommerceCouponSchema>\nexport type WoocommerceListCouponsInput = z.infer<typeof woocommerceListCouponsInputSchema>\nexport type WoocommerceListCouponsOutput = z.infer<typeof woocommerceListCouponsOutputSchema>\nexport type WoocommerceGetCouponInput = z.infer<typeof woocommerceGetCouponInputSchema>\nexport type WoocommerceGetCouponOutput = z.infer<typeof woocommerceGetCouponOutputSchema>\nexport type WoocommerceCreateCouponInput = z.infer<typeof woocommerceCreateCouponInputSchema>\nexport type WoocommerceCreateCouponOutput = z.infer<typeof woocommerceCreateCouponOutputSchema>\nexport type WoocommerceUpdateCouponInput = z.infer<typeof woocommerceUpdateCouponInputSchema>\nexport type WoocommerceUpdateCouponOutput = z.infer<typeof woocommerceUpdateCouponOutputSchema>\n\nexport type WoocommerceProductCategory = z.infer<typeof woocommerceProductCategorySchema>\nexport type WoocommerceListProductCategoriesInput = z.infer<typeof woocommerceListProductCategoriesInputSchema>\nexport type WoocommerceListProductCategoriesOutput = z.infer<typeof woocommerceListProductCategoriesOutputSchema>\nexport type WoocommerceGetProductCategoryInput = z.infer<typeof woocommerceGetProductCategoryInputSchema>\nexport type WoocommerceGetProductCategoryOutput = z.infer<typeof woocommerceGetProductCategoryOutputSchema>\n\nexport type WoocommerceRawRecord = z.infer<typeof woocommerceRawRecordSchema>\nexport type WoocommerceOrderRaw = z.infer<typeof woocommerceOrderRawSchema>\nexport type WoocommerceProductRaw = z.infer<typeof woocommerceProductRawSchema>\nexport type WoocommerceCustomerRaw = z.infer<typeof woocommerceCustomerRawSchema>\nexport type WoocommercePagination = z.infer<typeof woocommercePaginationSchema>\nexport type WoocommerceListOrdersPageInput = z.infer<typeof woocommerceListOrdersPageInputSchema>\nexport type WoocommerceListOrdersPageOutput = z.infer<typeof woocommerceListOrdersPageOutputSchema>\nexport type WoocommerceListProductsPageInput = z.infer<typeof woocommerceListProductsPageInputSchema>\nexport type WoocommerceListProductsPageOutput = z.infer<typeof woocommerceListProductsPageOutputSchema>\nexport type WoocommerceListCustomersPageInput = z.infer<typeof woocommerceListCustomersPageInputSchema>\nexport type WoocommerceListCustomersPageOutput = z.infer<typeof woocommerceListCustomersPageOutputSchema>\n","/**\n * WooCommerce REST payload helpers (no HTTP).\n */\n\nimport { isPlainObject, isString } from 'es-toolkit'\nimport { z } from 'zod'\n\nimport { ToolError } from '../../core/errors'\nimport { bytesToBase64, utf8ToBytes } from '../../shared/bytes'\nimport type {\n\tWoocommerceAddress,\n\tWoocommerceAuth,\n\tWoocommerceCoupon,\n\tWoocommerceCreateCouponInput,\n\tWoocommerceCreateCustomerInput,\n\tWoocommerceCreateOrderInput,\n\tWoocommerceCreateOrderNoteInput,\n\tWoocommerceCreateOrderRefundInput,\n\tWoocommerceCreateProductInput,\n\tWoocommerceCustomer,\n\tWoocommerceDeleteOrderOutput,\n\tWoocommerceDeleteProductOutput,\n\tWoocommerceLineItemInput,\n\tWoocommerceMetaData,\n\tWoocommerceOrder,\n\tWoocommerceOrderNote,\n\tWoocommerceOrderRefund,\n\tWoocommercePagination,\n\tWoocommerceProduct,\n\tWoocommerceProductCategory,\n\tWoocommerceProductVariation,\n\tWoocommerceUpdateCouponInput,\n\tWoocommerceUpdateCustomerInput,\n\tWoocommerceUpdateOrderInput,\n\tWoocommerceUpdateProductInput\n} from './contracts'\n\nexport function storeOrigin(auth: WoocommerceAuth): string {\n\tlet url: URL\n\ttry {\n\t\turl = new URL(auth.store_url)\n\t} catch {\n\t\tthrow new ToolError('Invalid WooCommerce store_url', { code: 'bad_auth' })\n\t}\n\tif (\n\t\turl.username !== '' ||\n\t\turl.password !== '' ||\n\t\t(url.pathname !== '/' && url.pathname !== '') ||\n\t\turl.search !== '' ||\n\t\turl.hash !== ''\n\t) {\n\t\tthrow new ToolError('WooCommerce store_url must be an origin', { code: 'bad_auth' })\n\t}\n\treturn url.origin\n}\n\nexport function apiBaseUrl(auth: WoocommerceAuth): string {\n\treturn `${storeOrigin(auth)}/wp-json/wc/v3`\n}\n\nexport function basicAuthHeader(auth: WoocommerceAuth): string {\n\tconst token = bytesToBase64(utf8ToBytes(`${auth.consumer_key}:${auth.consumer_secret}`))\n\treturn `Basic ${token}`\n}\n\nexport function pageFromCursor(cursor: string | undefined): number {\n\tif (!cursor) return 1\n\tconst n = Number.parseInt(cursor, 10)\n\tif (!Number.isFinite(n) || n < 1) {\n\t\tthrow new ToolError('Invalid list cursor', { code: 'bad_input', details: { cursor } })\n\t}\n\treturn n\n}\n\nexport function listPageMeta(\n\tpage: number,\n\tlimit: number,\n\titemCount: number,\n\ttotalPagesHeader: string | null\n): { next_cursor?: string; truncated: boolean } {\n\tconst totalPages = totalPagesHeader ? Number.parseInt(totalPagesHeader, 10) : undefined\n\tif (typeof totalPages === 'number' && Number.isFinite(totalPages) && totalPages > page) {\n\t\treturn { next_cursor: String(page + 1), truncated: true }\n\t}\n\tif (itemCount >= limit && (totalPages === undefined || !Number.isFinite(totalPages))) {\n\t\treturn { next_cursor: String(page + 1), truncated: true }\n\t}\n\treturn { truncated: false }\n}\n\nexport type WoocommerceCollectionQueryInput = {\n\tpage?: number | undefined\n\tlimit?: number | undefined\n\tafter?: string | undefined\n\tbefore?: string | undefined\n\tmodified_after?: string | undefined\n\tmodified_before?: string | undefined\n\tdates_are_gmt?: boolean | undefined\n\torder?: 'asc' | 'desc' | undefined\n\torderby?: string | undefined\n}\n\nexport function collectionQuery(input: WoocommerceCollectionQueryInput): Record<string, string | number | boolean> {\n\treturn {\n\t\tpage: input.page ?? 1,\n\t\tper_page: input.limit ?? 10,\n\t\t...(input.after && { after: input.after }),\n\t\t...(input.before && { before: input.before }),\n\t\t...(input.modified_after && { modified_after: input.modified_after }),\n\t\t...(input.modified_before && { modified_before: input.modified_before }),\n\t\t...(input.dates_are_gmt !== undefined && { dates_are_gmt: input.dates_are_gmt }),\n\t\t...(input.order && { order: input.order }),\n\t\t...(input.orderby && { orderby: input.orderby })\n\t}\n}\n\nfunction parseWpCountHeader(headers: Headers, name: string): number {\n\tconst raw = headers.get(name)\n\tif (raw === null || raw.length === 0) {\n\t\tthrow new ToolError(`WooCommerce response is missing ${name}`, { code: 'upstream' })\n\t}\n\tconst n = Number.parseInt(raw, 10)\n\tif (!Number.isFinite(n) || n < 0) {\n\t\tthrow new ToolError(`WooCommerce returned invalid ${name}`, { code: 'upstream' })\n\t}\n\treturn n\n}\n\nexport function parseCollectionPage<T>(\n\tdata: unknown,\n\theaders: Headers,\n\titemSchema: z.ZodType<T>,\n\tpage: number,\n\tpageSize: number,\n\tlabel: string\n): { items: T[]; pagination: WoocommercePagination } {\n\tconst parsedItems = z.array(itemSchema).safeParse(data)\n\tif (!parsedItems.success) {\n\t\tthrow new ToolError(`WooCommerce returned an invalid ${label} array`, {\n\t\t\tcode: 'upstream',\n\t\t\tdetails: { issues: parsedItems.error.issues.map((issue) => issue.message) }\n\t\t})\n\t}\n\tconst totalItems = parseWpCountHeader(headers, 'x-wp-total')\n\tconst totalPages = parseWpCountHeader(headers, 'x-wp-totalpages')\n\treturn {\n\t\titems: parsedItems.data,\n\t\tpagination: {\n\t\t\tpage,\n\t\t\tpage_size: pageSize,\n\t\t\ttotal_items: totalItems,\n\t\t\ttotal_pages: totalPages,\n\t\t\thas_more: page < totalPages\n\t\t}\n\t}\n}\n\nfunction looksLikeSecret(value: string): boolean {\n\treturn /ck_|cs_|consumer_key|consumer_secret|authorization/i.test(value)\n}\n\nexport function woocommerceErrorDetails(data: unknown): {\n\twoocommerce_code?: string\n\twoocommerce_message?: string\n} {\n\tif (!isPlainObject(data)) return {}\n\tconst code = data['code']\n\tconst message = data['message']\n\treturn {\n\t\t...(isString(code) && code.length > 0 && !looksLikeSecret(code) && { woocommerce_code: code }),\n\t\t...(isString(message) && message.length > 0 && !looksLikeSecret(message) && { woocommerce_message: message })\n\t}\n}\n\nfunction optionalString(value: unknown): string | undefined {\n\treturn isString(value) ? value : undefined\n}\n\nfunction optionalNonEmptyString(value: unknown): string | undefined {\n\treturn isString(value) && value.length > 0 ? value : undefined\n}\n\nfunction optionalNumber(value: unknown): number | undefined {\n\treturn typeof value === 'number' && Number.isFinite(value) ? value : undefined\n}\n\nfunction optionalBoolean(value: unknown): boolean | undefined {\n\treturn typeof value === 'boolean' ? value : undefined\n}\n\nfunction addressBody(address: WoocommerceAddress): Record<string, string> {\n\treturn {\n\t\t...(address.first_name !== undefined && { first_name: address.first_name }),\n\t\t...(address.last_name !== undefined && { last_name: address.last_name }),\n\t\t...(address.company !== undefined && { company: address.company }),\n\t\t...(address.address_1 !== undefined && { address_1: address.address_1 }),\n\t\t...(address.address_2 !== undefined && { address_2: address.address_2 }),\n\t\t...(address.city !== undefined && { city: address.city }),\n\t\t...(address.state !== undefined && { state: address.state }),\n\t\t...(address.postcode !== undefined && { postcode: address.postcode }),\n\t\t...(address.country !== undefined && { country: address.country }),\n\t\t...(address.email !== undefined && { email: address.email }),\n\t\t...(address.phone !== undefined && { phone: address.phone })\n\t}\n}\n\nfunction metaDataBody(meta: WoocommerceMetaData[]): { key: string; value: string }[] {\n\treturn meta.map((item) => ({ key: item.key, value: item.value }))\n}\n\nfunction lineItemBody(item: WoocommerceLineItemInput): Record<string, string | number> {\n\treturn {\n\t\t...(item.id !== undefined && { id: item.id }),\n\t\t...(item.product_id !== undefined && { product_id: item.product_id }),\n\t\t...(item.variation_id !== undefined && { variation_id: item.variation_id }),\n\t\t...(item.quantity !== undefined && { quantity: item.quantity }),\n\t\t...(item.name && { name: item.name }),\n\t\t...(item.sku && { sku: item.sku }),\n\t\t...(item.price && { price: item.price }),\n\t\t...(item.total && { total: item.total })\n\t}\n}\n\nexport function orderWriteBody(\n\tinput: WoocommerceCreateOrderInput | Omit<WoocommerceUpdateOrderInput, 'order_id'>\n): Record<string, unknown> {\n\treturn {\n\t\t...(input.status && { status: input.status }),\n\t\t...(input.customer_id !== undefined && { customer_id: input.customer_id }),\n\t\t...(input.payment_method && { payment_method: input.payment_method }),\n\t\t...(input.payment_method_title && { payment_method_title: input.payment_method_title }),\n\t\t...(input.set_paid !== undefined && { set_paid: input.set_paid }),\n\t\t...(input.customer_note !== undefined && { customer_note: input.customer_note }),\n\t\t...(input.billing && { billing: addressBody(input.billing) }),\n\t\t...(input.shipping && { shipping: addressBody(input.shipping) }),\n\t\t...(input.line_items &&\n\t\t\tinput.line_items.length > 0 && {\n\t\t\t\tline_items: input.line_items.map(lineItemBody)\n\t\t\t}),\n\t\t...(input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) })\n\t}\n}\n\nexport function productWriteBody(\n\tinput: WoocommerceCreateProductInput | Omit<WoocommerceUpdateProductInput, 'product_id'>\n): Record<string, unknown> {\n\tconst name = 'name' in input ? input.name : undefined\n\treturn {\n\t\t...(name && { name }),\n\t\t...(input.type && { type: input.type }),\n\t\t...(input.status && { status: input.status }),\n\t\t...(input.sku !== undefined && { sku: input.sku }),\n\t\t...(input.regular_price !== undefined && { regular_price: input.regular_price }),\n\t\t...(input.sale_price !== undefined && { sale_price: input.sale_price }),\n\t\t...(input.description !== undefined && { description: input.description }),\n\t\t...(input.short_description !== undefined && { short_description: input.short_description }),\n\t\t...(input.manage_stock !== undefined && { manage_stock: input.manage_stock }),\n\t\t...(input.stock_quantity !== undefined && { stock_quantity: input.stock_quantity }),\n\t\t...(input.stock_status && { stock_status: input.stock_status }),\n\t\t...(input.categories &&\n\t\t\tinput.categories.length > 0 && {\n\t\t\t\tcategories: input.categories.map((c) => ({ id: c.id }))\n\t\t\t}),\n\t\t...(input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) })\n\t}\n}\n\nexport function customerWriteBody(\n\tinput: WoocommerceCreateCustomerInput | Omit<WoocommerceUpdateCustomerInput, 'customer_id'>\n): Record<string, unknown> {\n\tconst email = 'email' in input ? input.email : undefined\n\treturn {\n\t\t...(email && { email }),\n\t\t...(input.first_name !== undefined && { first_name: input.first_name }),\n\t\t...(input.last_name !== undefined && { last_name: input.last_name }),\n\t\t...(input.username && { username: input.username }),\n\t\t...(input.password && { password: input.password }),\n\t\t...(input.billing && { billing: addressBody(input.billing) }),\n\t\t...(input.shipping && { shipping: addressBody(input.shipping) }),\n\t\t...(input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) })\n\t}\n}\n\nexport function couponWriteBody(\n\tinput: WoocommerceCreateCouponInput | Omit<WoocommerceUpdateCouponInput, 'coupon_id'>\n): Record<string, unknown> {\n\tconst code = 'code' in input ? input.code : undefined\n\treturn {\n\t\t...(code && { code }),\n\t\t...(input.discount_type && { discount_type: input.discount_type }),\n\t\t...(input.amount && { amount: input.amount }),\n\t\t...(input.description !== undefined && { description: input.description }),\n\t\t...(input.individual_use !== undefined && { individual_use: input.individual_use }),\n\t\t...(input.exclude_sale_items !== undefined && { exclude_sale_items: input.exclude_sale_items }),\n\t\t...(input.minimum_amount !== undefined && { minimum_amount: input.minimum_amount }),\n\t\t...(input.maximum_amount !== undefined && { maximum_amount: input.maximum_amount }),\n\t\t...(input.usage_limit !== undefined && { usage_limit: input.usage_limit }),\n\t\t...(input.usage_limit_per_user !== undefined && {\n\t\t\tusage_limit_per_user: input.usage_limit_per_user\n\t\t}),\n\t\t...(input.free_shipping !== undefined && { free_shipping: input.free_shipping }),\n\t\t...(input.date_expires !== undefined && { date_expires: input.date_expires }),\n\t\t...(input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) })\n\t}\n}\n\nexport function orderNoteWriteBody(input: Omit<WoocommerceCreateOrderNoteInput, 'order_id'>): Record<string, unknown> {\n\treturn {\n\t\tnote: input.note,\n\t\t...(input.customer_note !== undefined && { customer_note: input.customer_note }),\n\t\t...(input.added_by_user !== undefined && { added_by_user: input.added_by_user })\n\t}\n}\n\nexport function orderRefundWriteBody(\n\tinput: Omit<WoocommerceCreateOrderRefundInput, 'order_id'>\n): Record<string, unknown> {\n\treturn {\n\t\t...(input.amount && { amount: input.amount }),\n\t\t...(input.reason !== undefined && { reason: input.reason }),\n\t\t...(input.api_refund !== undefined && { api_refund: input.api_refund }),\n\t\t...(input.line_items &&\n\t\t\tinput.line_items.length > 0 && {\n\t\t\t\tline_items: input.line_items.map((item) => ({\n\t\t\t\t\tid: item.id,\n\t\t\t\t\t...(item.quantity !== undefined && { quantity: item.quantity }),\n\t\t\t\t\t...(item.refund_total && { refund_total: item.refund_total })\n\t\t\t\t}))\n\t\t\t})\n\t}\n}\n\nfunction parseOrderLineItem(value: unknown): {\n\tid: number\n\tproduct_id?: number\n\tvariation_id?: number\n\tquantity?: number\n\tname?: string\n\tsku?: string\n\tprice?: string\n\ttotal?: string\n} {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number') {\n\t\tthrow new ToolError('WooCommerce returned an invalid order line item', { code: 'upstream' })\n\t}\n\tconst productId = optionalNumber(value['product_id'])\n\tconst variationId = optionalNumber(value['variation_id'])\n\tconst quantity = optionalNumber(value['quantity'])\n\tconst name = optionalNonEmptyString(value['name'])\n\tconst sku = optionalNonEmptyString(value['sku'])\n\t// WC may return price/total as string or number\n\tconst priceRaw = value['price']\n\tconst totalRaw = value['total']\n\tconst price =\n\t\tisString(priceRaw) && priceRaw.length > 0\n\t\t\t? priceRaw\n\t\t\t: typeof priceRaw === 'number' && Number.isFinite(priceRaw)\n\t\t\t\t? String(priceRaw)\n\t\t\t\t: undefined\n\tconst total =\n\t\tisString(totalRaw) && totalRaw.length > 0\n\t\t\t? totalRaw\n\t\t\t: typeof totalRaw === 'number' && Number.isFinite(totalRaw)\n\t\t\t\t? String(totalRaw)\n\t\t\t\t: undefined\n\treturn {\n\t\tid: value['id'],\n\t\t...(productId !== undefined && { product_id: productId }),\n\t\t...(variationId !== undefined && { variation_id: variationId }),\n\t\t...(quantity !== undefined && { quantity }),\n\t\t...(name && { name }),\n\t\t...(sku && { sku }),\n\t\t...(price && { price }),\n\t\t...(total && { total })\n\t}\n}\n\nfunction parseOrderLineItems(value: unknown): ReturnType<typeof parseOrderLineItem>[] | undefined {\n\tif (!Array.isArray(value) || value.length === 0) return undefined\n\treturn value.map(parseOrderLineItem)\n}\n\nexport function parseOrder(value: unknown): WoocommerceOrder {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number') {\n\t\tthrow new ToolError('WooCommerce returned an invalid order', { code: 'upstream' })\n\t}\n\tconst number = value['number']\n\tconst status = value['status']\n\tconst currency = value['currency']\n\tconst total = value['total']\n\tif (!isString(number) || !isString(status) || !isString(currency) || !isString(total)) {\n\t\tthrow new ToolError('WooCommerce order missing required fields', { code: 'upstream' })\n\t}\n\tconst dateCreated = optionalString(value['date_created'])\n\tconst customerId = optionalNumber(value['customer_id'])\n\tconst paymentMethod = optionalNonEmptyString(value['payment_method'])\n\tconst paymentMethodTitle = optionalNonEmptyString(value['payment_method_title'])\n\tconst customerNote = optionalString(value['customer_note'])\n\tconst lineItems = parseOrderLineItems(value['line_items'])\n\treturn {\n\t\tid: value['id'],\n\t\tnumber,\n\t\tstatus,\n\t\tcurrency,\n\t\ttotal,\n\t\t...(dateCreated && { date_created: dateCreated }),\n\t\t...(customerId !== undefined && { customer_id: customerId }),\n\t\t...(paymentMethod && { payment_method: paymentMethod }),\n\t\t...(paymentMethodTitle && { payment_method_title: paymentMethodTitle }),\n\t\t...(customerNote !== undefined && { customer_note: customerNote }),\n\t\t...(lineItems && { line_items: lineItems })\n\t}\n}\n\nexport function parseOrders(value: unknown): WoocommerceOrder[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list orders returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseOrder)\n}\n\nexport function parseOrderNote(value: unknown): WoocommerceOrderNote {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number' || !isString(value['note'])) {\n\t\tthrow new ToolError('WooCommerce returned an invalid order note', { code: 'upstream' })\n\t}\n\tconst customerNote = optionalBoolean(value['customer_note'])\n\tconst dateCreated = optionalString(value['date_created'])\n\tconst addedByUser = optionalBoolean(value['added_by_user'])\n\treturn {\n\t\tid: value['id'],\n\t\tnote: value['note'],\n\t\t...(customerNote !== undefined && { customer_note: customerNote }),\n\t\t...(dateCreated && { date_created: dateCreated }),\n\t\t...(addedByUser !== undefined && { added_by_user: addedByUser })\n\t}\n}\n\nexport function parseOrderNotes(value: unknown): WoocommerceOrderNote[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list order notes returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseOrderNote)\n}\n\nexport function parseOrderRefund(value: unknown): WoocommerceOrderRefund {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number') {\n\t\tthrow new ToolError('WooCommerce returned an invalid order refund', { code: 'upstream' })\n\t}\n\tconst amount = optionalString(value['amount'])\n\tconst reason = optionalString(value['reason'])\n\tconst dateCreated = optionalString(value['date_created'])\n\tconst refundedBy = optionalNumber(value['refunded_by'])\n\treturn {\n\t\tid: value['id'],\n\t\t...(amount && { amount }),\n\t\t...(reason !== undefined && { reason }),\n\t\t...(dateCreated && { date_created: dateCreated }),\n\t\t...(refundedBy !== undefined && { refunded_by: refundedBy })\n\t}\n}\n\nexport function parseOrderRefunds(value: unknown): WoocommerceOrderRefund[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list order refunds returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseOrderRefund)\n}\n\nfunction parseProductCategoryRef(value: unknown): { id: number; name?: string; slug?: string } {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number') {\n\t\tthrow new ToolError('WooCommerce returned an invalid product category ref', { code: 'upstream' })\n\t}\n\tconst name = optionalNonEmptyString(value['name'])\n\tconst slug = optionalNonEmptyString(value['slug'])\n\treturn {\n\t\tid: value['id'],\n\t\t...(name && { name }),\n\t\t...(slug && { slug })\n\t}\n}\n\nfunction parseProductCategoryRefs(value: unknown): ReturnType<typeof parseProductCategoryRef>[] | undefined {\n\tif (!Array.isArray(value) || value.length === 0) return undefined\n\treturn value.map(parseProductCategoryRef)\n}\n\nexport function parseProduct(value: unknown): WoocommerceProduct {\n\tif (\n\t\t!isPlainObject(value) ||\n\t\ttypeof value['id'] !== 'number' ||\n\t\t!isString(value['name']) ||\n\t\t!isString(value['type'])\n\t) {\n\t\tthrow new ToolError('WooCommerce returned an invalid product', { code: 'upstream' })\n\t}\n\tconst status = value['status']\n\tif (!isString(status)) {\n\t\tthrow new ToolError('WooCommerce product missing status', { code: 'upstream' })\n\t}\n\tconst sku = optionalNonEmptyString(value['sku'])\n\tconst price = optionalString(value['price'])\n\tconst regularPrice = optionalString(value['regular_price'])\n\tconst salePrice = optionalString(value['sale_price'])\n\tconst stockStatus = optionalString(value['stock_status'])\n\tconst stockQuantity = optionalNumber(value['stock_quantity'])\n\tconst manageStock = optionalBoolean(value['manage_stock'])\n\tconst categories = parseProductCategoryRefs(value['categories'])\n\treturn {\n\t\tid: value['id'],\n\t\tname: value['name'],\n\t\ttype: value['type'],\n\t\tstatus,\n\t\t...(sku && { sku }),\n\t\t...(price && { price }),\n\t\t...(regularPrice && { regular_price: regularPrice }),\n\t\t...(salePrice && { sale_price: salePrice }),\n\t\t...(stockStatus && { stock_status: stockStatus }),\n\t\t...(stockQuantity !== undefined && { stock_quantity: stockQuantity }),\n\t\t...(manageStock !== undefined && { manage_stock: manageStock }),\n\t\t...(categories && { categories })\n\t}\n}\n\nexport function parseProducts(value: unknown): WoocommerceProduct[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list products returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseProduct)\n}\n\nexport function parseProductVariation(value: unknown): WoocommerceProductVariation {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number') {\n\t\tthrow new ToolError('WooCommerce returned an invalid product variation', { code: 'upstream' })\n\t}\n\tconst sku = optionalNonEmptyString(value['sku'])\n\tconst price = optionalString(value['price'])\n\tconst regularPrice = optionalString(value['regular_price'])\n\tconst salePrice = optionalString(value['sale_price'])\n\tconst status = optionalString(value['status'])\n\tconst stockStatus = optionalString(value['stock_status'])\n\tconst stockQuantity = optionalNumber(value['stock_quantity'])\n\tconst manageStock = optionalBoolean(value['manage_stock'])\n\treturn {\n\t\tid: value['id'],\n\t\t...(sku && { sku }),\n\t\t...(price && { price }),\n\t\t...(regularPrice && { regular_price: regularPrice }),\n\t\t...(salePrice && { sale_price: salePrice }),\n\t\t...(status && { status }),\n\t\t...(stockStatus && { stock_status: stockStatus }),\n\t\t...(stockQuantity !== undefined && { stock_quantity: stockQuantity }),\n\t\t...(manageStock !== undefined && { manage_stock: manageStock })\n\t}\n}\n\nexport function parseProductVariations(value: unknown): WoocommerceProductVariation[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list product variations returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseProductVariation)\n}\n\nexport function parseCustomer(value: unknown): WoocommerceCustomer {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number' || !isString(value['email'])) {\n\t\tthrow new ToolError('WooCommerce returned an invalid customer', { code: 'upstream' })\n\t}\n\tconst firstName = optionalString(value['first_name'])\n\tconst lastName = optionalString(value['last_name'])\n\tconst username = optionalNonEmptyString(value['username'])\n\tconst role = optionalNonEmptyString(value['role'])\n\tconst dateCreated = optionalString(value['date_created'])\n\treturn {\n\t\tid: value['id'],\n\t\temail: value['email'],\n\t\t...(firstName !== undefined && { first_name: firstName }),\n\t\t...(lastName !== undefined && { last_name: lastName }),\n\t\t...(username && { username }),\n\t\t...(role && { role }),\n\t\t...(dateCreated && { date_created: dateCreated })\n\t}\n}\n\nexport function parseCustomers(value: unknown): WoocommerceCustomer[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list customers returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseCustomer)\n}\n\nexport function parseCoupon(value: unknown): WoocommerceCoupon {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number' || !isString(value['code'])) {\n\t\tthrow new ToolError('WooCommerce returned an invalid coupon', { code: 'upstream' })\n\t}\n\tconst amount = optionalString(value['amount'])\n\tconst discountType = optionalNonEmptyString(value['discount_type'])\n\tconst description = optionalString(value['description'])\n\tconst dateExpires = optionalString(value['date_expires'])\n\tconst usageCount = optionalNumber(value['usage_count'])\n\tconst usageLimit = optionalNumber(value['usage_limit'])\n\tconst freeShipping = optionalBoolean(value['free_shipping'])\n\treturn {\n\t\tid: value['id'],\n\t\tcode: value['code'],\n\t\t...(amount && { amount }),\n\t\t...(discountType && { discount_type: discountType }),\n\t\t...(description !== undefined && { description }),\n\t\t...(dateExpires && { date_expires: dateExpires }),\n\t\t...(usageCount !== undefined && { usage_count: usageCount }),\n\t\t...(usageLimit !== undefined && { usage_limit: usageLimit }),\n\t\t...(freeShipping !== undefined && { free_shipping: freeShipping })\n\t}\n}\n\nexport function parseCoupons(value: unknown): WoocommerceCoupon[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list coupons returned a non-array body', { code: 'upstream' })\n\t}\n\treturn value.map(parseCoupon)\n}\n\nexport function parseProductCategory(value: unknown): WoocommerceProductCategory {\n\tif (!isPlainObject(value) || typeof value['id'] !== 'number' || !isString(value['name'])) {\n\t\tthrow new ToolError('WooCommerce returned an invalid product category', { code: 'upstream' })\n\t}\n\tconst slug = optionalNonEmptyString(value['slug'])\n\tconst parent = optionalNumber(value['parent'])\n\tconst description = optionalString(value['description'])\n\tconst count = optionalNumber(value['count'])\n\treturn {\n\t\tid: value['id'],\n\t\tname: value['name'],\n\t\t...(slug && { slug }),\n\t\t...(parent !== undefined && { parent }),\n\t\t...(description !== undefined && { description }),\n\t\t...(count !== undefined && { count })\n\t}\n}\n\nexport function parseProductCategories(value: unknown): WoocommerceProductCategory[] {\n\tif (!Array.isArray(value)) {\n\t\tthrow new ToolError('WooCommerce list product categories returned a non-array body', {\n\t\t\tcode: 'upstream'\n\t\t})\n\t}\n\treturn value.map(parseProductCategory)\n}\n\nexport function parseDeleteResult(value: unknown, fallbackId: number): WoocommerceDeleteOrderOutput {\n\tif (isPlainObject(value)) {\n\t\tconst previous = value['previous']\n\t\tif (isPlainObject(previous) && typeof previous['id'] === 'number') {\n\t\t\treturn { deleted: true, id: previous['id'] }\n\t\t}\n\t\tif (typeof value['id'] === 'number') {\n\t\t\treturn { deleted: true, id: value['id'] }\n\t\t}\n\t}\n\treturn { deleted: true, id: fallbackId }\n}\n\nexport function parseProductDeleteResult(value: unknown, fallbackId: number): WoocommerceDeleteProductOutput {\n\treturn parseDeleteResult(value, fallbackId)\n}\n","/**\n * WooCommerce REST API vendor client (wc/v3).\n * Host: `new WoocommerceClient(auth)`. Agent tools: `fromContext(ctx)`.\n */\n\nimport { ToolError } from '../../core/errors'\nimport { requireAuth } from '../../core/provider'\nimport type { ToolContext } from '../../core/types'\nimport { httpErrorCode, retryAfterMsFromHeader } from '../../transport/errors'\nimport { HttpService } from '../../transport/http-service'\nimport type { HttpCallOptions, HttpQueryResult, HttpServiceOptions } from '../../transport/http-service'\nimport type {\n\tWoocommerceAuth,\n\tWoocommerceCreateCouponInput,\n\tWoocommerceCreateCouponOutput,\n\tWoocommerceCreateCustomerInput,\n\tWoocommerceCreateCustomerOutput,\n\tWoocommerceCreateOrderInput,\n\tWoocommerceCreateOrderNoteInput,\n\tWoocommerceCreateOrderNoteOutput,\n\tWoocommerceCreateOrderOutput,\n\tWoocommerceCreateOrderRefundInput,\n\tWoocommerceCreateOrderRefundOutput,\n\tWoocommerceCreateProductInput,\n\tWoocommerceCreateProductOutput,\n\tWoocommerceDeleteOrderInput,\n\tWoocommerceDeleteOrderOutput,\n\tWoocommerceDeleteProductInput,\n\tWoocommerceDeleteProductOutput,\n\tWoocommerceGetCouponInput,\n\tWoocommerceGetCouponOutput,\n\tWoocommerceGetCustomerInput,\n\tWoocommerceGetCustomerOutput,\n\tWoocommerceGetOrderInput,\n\tWoocommerceGetOrderOutput,\n\tWoocommerceGetProductCategoryInput,\n\tWoocommerceGetProductCategoryOutput,\n\tWoocommerceGetProductInput,\n\tWoocommerceGetProductOutput,\n\tWoocommerceGetProductVariationInput,\n\tWoocommerceGetProductVariationOutput,\n\tWoocommerceListCouponsInput,\n\tWoocommerceListCouponsOutput,\n\tWoocommerceListCustomersInput,\n\tWoocommerceListCustomersOutput,\n\tWoocommerceListCustomersPageInput,\n\tWoocommerceListCustomersPageOutput,\n\tWoocommerceListOrderNotesInput,\n\tWoocommerceListOrderNotesOutput,\n\tWoocommerceListOrderRefundsInput,\n\tWoocommerceListOrderRefundsOutput,\n\tWoocommerceListOrdersInput,\n\tWoocommerceListOrdersOutput,\n\tWoocommerceListOrdersPageInput,\n\tWoocommerceListOrdersPageOutput,\n\tWoocommerceListProductCategoriesInput,\n\tWoocommerceListProductCategoriesOutput,\n\tWoocommerceListProductsInput,\n\tWoocommerceListProductsOutput,\n\tWoocommerceListProductsPageInput,\n\tWoocommerceListProductsPageOutput,\n\tWoocommerceListProductVariationsInput,\n\tWoocommerceListProductVariationsOutput,\n\tWoocommerceUpdateCouponInput,\n\tWoocommerceUpdateCouponOutput,\n\tWoocommerceUpdateCustomerInput,\n\tWoocommerceUpdateCustomerOutput,\n\tWoocommerceUpdateOrderInput,\n\tWoocommerceUpdateOrderOutput,\n\tWoocommerceUpdateProductInput,\n\tWoocommerceUpdateProductOutput\n} from './contracts'\nimport {\n\twoocommerceAuthSchema,\n\twoocommerceCustomerRawSchema,\n\twoocommerceListCustomersPageInputSchema,\n\twoocommerceListOrdersPageInputSchema,\n\twoocommerceListProductsPageInputSchema,\n\twoocommerceOrderRawSchema,\n\twoocommerceProductRawSchema\n} from './contracts'\nimport {\n\tapiBaseUrl,\n\tbasicAuthHeader,\n\tcollectionQuery,\n\tcouponWriteBody,\n\tcustomerWriteBody,\n\tlistPageMeta,\n\torderNoteWriteBody,\n\torderRefundWriteBody,\n\torderWriteBody,\n\tpageFromCursor,\n\tparseCoupon,\n\tparseCoupons,\n\tparseCustomer,\n\tparseCustomers,\n\tparseDeleteResult,\n\tparseOrder,\n\tparseOrderNote,\n\tparseOrderNotes,\n\tparseOrderRefund,\n\tparseOrderRefunds,\n\tparseCollectionPage,\n\tparseOrders,\n\tparseProduct,\n\tparseProductCategories,\n\tparseProductCategory,\n\tparseProductDeleteResult,\n\tparseProducts,\n\tparseProductVariation,\n\tparseProductVariations,\n\tproductWriteBody,\n\twoocommerceErrorDetails\n} from './domain'\n\nfunction throwWooCommerceHttpError(operation: string, result: HttpQueryResult): never {\n\tconst status = result.status\n\tconst retryAfterMs = retryAfterMsFromHeader(result.headers.get('retry-after'))\n\tconst provider = woocommerceErrorDetails(result.data)\n\tthrow new ToolError(`${operation} failed with HTTP ${status}`, {\n\t\tcode: httpErrorCode(status),\n\t\tretryable: status >= 500 || status === 429,\n\t\tdetails: {\n\t\t\tstatus,\n\t\t\toperation,\n\t\t\t...(retryAfterMs !== undefined && { retry_after_ms: retryAfterMs }),\n\t\t\t...provider\n\t\t}\n\t})\n}\n\nexport type WoocommerceClientOptions = Pick<HttpServiceOptions, 'fetch' | 'signal'>\n\nexport class WoocommerceClient {\n\treadonly #http: HttpService\n\n\tconstructor(auth: WoocommerceAuth, options: WoocommerceClientOptions = {}) {\n\t\tconst parsed = woocommerceAuthSchema.safeParse(auth)\n\t\tif (!parsed.success) {\n\t\t\tthrow new ToolError('Invalid WooCommerce auth credentials', {\n\t\t\t\tcode: 'bad_auth',\n\t\t\t\tdetails: { issues: parsed.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tthis.#http = new HttpService({\n\t\t\t...options,\n\t\t\tbaseURL: apiBaseUrl(parsed.data),\n\t\t\theaders: {\n\t\t\t\tAuthorization: basicAuthHeader(parsed.data),\n\t\t\t\t'Content-Type': 'application/json'\n\t\t\t},\n\t\t\tlabel: 'WooCommerce'\n\t\t})\n\t}\n\n\tstatic fromContext(ctx: ToolContext): WoocommerceClient {\n\t\tconst auth = requireAuth(ctx, woocommerceAuthSchema)\n\t\treturn new WoocommerceClient(auth, {\n\t\t\t...(ctx.fetch && { fetch: ctx.fetch }),\n\t\t\t...(ctx.signal && { signal: ctx.signal })\n\t\t})\n\t}\n\n\tasync #request(method: string, path: string, options: HttpCallOptions = {}): Promise<HttpQueryResult> {\n\t\tconst label = options.label ?? 'WooCommerce'\n\t\tconst result = await this.#http.query(method, path, { ...options, noThrow: true, label })\n\t\tif (result.status >= 200 && result.status < 300) return result\n\t\tthrowWooCommerceHttpError(label, result)\n\t}\n\n\t// ── Orders ──────────────────────────────────────────────────────────────\n\n\t/** GET /orders */\n\tasync listOrders(input: WoocommerceListOrdersInput = {}): Promise<WoocommerceListOrdersOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get('/orders', {\n\t\t\tlabel: 'WooCommerce listOrders',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.status && { status: input.status }),\n\t\t\t\t...(input.after && { after: input.after }),\n\t\t\t\t...(input.before && { before: input.before }),\n\t\t\t\t...(input.search && { search: input.search }),\n\t\t\t\t...(input.customer_id !== undefined && { customer: input.customer_id })\n\t\t\t}\n\t\t})\n\t\tconst items = parseOrders(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** One GET /orders request with raw records and X-WP-Total pagination. */\n\tasync listOrdersPage(input: WoocommerceListOrdersPageInput = {}): Promise<WoocommerceListOrdersPageOutput> {\n\t\tconst parsedInput = woocommerceListOrdersPageInputSchema.safeParse(input)\n\t\tif (!parsedInput.success) {\n\t\t\tthrow new ToolError('Invalid WooCommerce orders page input', {\n\t\t\t\tcode: 'bad_input',\n\t\t\t\tdetails: { issues: parsedInput.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tconst page = parsedInput.data.page ?? 1\n\t\tconst limit = parsedInput.data.limit ?? 10\n\t\tconst { data, headers } = await this.#request('GET', '/orders', {\n\t\t\tlabel: 'WooCommerce listOrdersPage',\n\t\t\tquery: {\n\t\t\t\t...collectionQuery(parsedInput.data),\n\t\t\t\t...(parsedInput.data.status && { status: parsedInput.data.status }),\n\t\t\t\t...(parsedInput.data.search && { search: parsedInput.data.search }),\n\t\t\t\t...(parsedInput.data.customer_id !== undefined && { customer: parsedInput.data.customer_id })\n\t\t\t}\n\t\t})\n\t\treturn parseCollectionPage(data, headers, woocommerceOrderRawSchema, page, limit, 'orders')\n\t}\n\n\t/** GET /orders/{id} */\n\tasync getOrder(input: WoocommerceGetOrderInput): Promise<WoocommerceGetOrderOutput> {\n\t\tconst { data } = await this.#http.get(`/orders/${input.order_id}`, { label: 'WooCommerce getOrder' })\n\t\treturn { order: parseOrder(data) }\n\t}\n\n\t/** POST /orders */\n\tasync createOrder(input: WoocommerceCreateOrderInput = {}): Promise<WoocommerceCreateOrderOutput> {\n\t\tconst { data } = await this.#http.post('/orders', orderWriteBody(input), {\n\t\t\tlabel: 'WooCommerce createOrder'\n\t\t})\n\t\treturn { order: parseOrder(data) }\n\t}\n\n\t/** PUT /orders/{id} */\n\tasync updateOrder(input: WoocommerceUpdateOrderInput): Promise<WoocommerceUpdateOrderOutput> {\n\t\tconst { order_id, ...fields } = input\n\t\tconst { data } = await this.#http.put(`/orders/${order_id}`, orderWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce updateOrder'\n\t\t})\n\t\treturn { order: parseOrder(data) }\n\t}\n\n\t/** DELETE /orders/{id} */\n\tasync deleteOrder(input: WoocommerceDeleteOrderInput): Promise<WoocommerceDeleteOrderOutput> {\n\t\tconst force = input.force !== false\n\t\tconst { data } = await this.#http.delete(`/orders/${input.order_id}`, {\n\t\t\tlabel: 'WooCommerce deleteOrder',\n\t\t\tquery: { force }\n\t\t})\n\t\treturn parseDeleteResult(data, input.order_id)\n\t}\n\n\t/** GET /orders/{id}/notes */\n\tasync listOrderNotes(input: WoocommerceListOrderNotesInput): Promise<WoocommerceListOrderNotesOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get(`/orders/${input.order_id}/notes`, {\n\t\t\tlabel: 'WooCommerce listOrderNotes',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.type && input.type !== 'any' && { type: input.type })\n\t\t\t}\n\t\t})\n\t\tconst items = parseOrderNotes(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** POST /orders/{id}/notes */\n\tasync createOrderNote(input: WoocommerceCreateOrderNoteInput): Promise<WoocommerceCreateOrderNoteOutput> {\n\t\tconst { order_id, ...fields } = input\n\t\tconst { data } = await this.#http.post(`/orders/${order_id}/notes`, orderNoteWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce createOrderNote'\n\t\t})\n\t\treturn { note: parseOrderNote(data) }\n\t}\n\n\t/** GET /orders/{id}/refunds */\n\tasync listOrderRefunds(input: WoocommerceListOrderRefundsInput): Promise<WoocommerceListOrderRefundsOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get(`/orders/${input.order_id}/refunds`, {\n\t\t\tlabel: 'WooCommerce listOrderRefunds',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit\n\t\t\t}\n\t\t})\n\t\tconst items = parseOrderRefunds(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** POST /orders/{id}/refunds */\n\tasync createOrderRefund(input: WoocommerceCreateOrderRefundInput): Promise<WoocommerceCreateOrderRefundOutput> {\n\t\tconst { order_id, ...fields } = input\n\t\tconst { data } = await this.#http.post(`/orders/${order_id}/refunds`, orderRefundWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce createOrderRefund'\n\t\t})\n\t\treturn { refund: parseOrderRefund(data) }\n\t}\n\n\t// ── Products ────────────────────────────────────────────────────────────\n\n\t/** GET /products */\n\tasync listProducts(input: WoocommerceListProductsInput = {}): Promise<WoocommerceListProductsOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get('/products', {\n\t\t\tlabel: 'WooCommerce listProducts',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.status && { status: input.status }),\n\t\t\t\t...(input.search && { search: input.search }),\n\t\t\t\t...(input.sku && { sku: input.sku }),\n\t\t\t\t...(input.category !== undefined && { category: input.category }),\n\t\t\t\t...(input.type && { type: input.type }),\n\t\t\t\t// WC REST: include is a list of product ids\n\t\t\t\t...(input.include && input.include.length > 0 && { include: input.include.join(',') })\n\t\t\t}\n\t\t})\n\t\tconst items = parseProducts(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** One GET /products request with raw records and X-WP-Total pagination. */\n\tasync listProductsPage(input: WoocommerceListProductsPageInput = {}): Promise<WoocommerceListProductsPageOutput> {\n\t\tconst parsedInput = woocommerceListProductsPageInputSchema.safeParse(input)\n\t\tif (!parsedInput.success) {\n\t\t\tthrow new ToolError('Invalid WooCommerce products page input', {\n\t\t\t\tcode: 'bad_input',\n\t\t\t\tdetails: { issues: parsedInput.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tconst page = parsedInput.data.page ?? 1\n\t\tconst limit = parsedInput.data.limit ?? 10\n\t\tconst { data, headers } = await this.#request('GET', '/products', {\n\t\t\tlabel: 'WooCommerce listProductsPage',\n\t\t\tquery: {\n\t\t\t\t...collectionQuery(parsedInput.data),\n\t\t\t\t...(parsedInput.data.status && { status: parsedInput.data.status }),\n\t\t\t\t...(parsedInput.data.search && { search: parsedInput.data.search }),\n\t\t\t\t...(parsedInput.data.sku && { sku: parsedInput.data.sku }),\n\t\t\t\t...(parsedInput.data.category !== undefined && { category: parsedInput.data.category }),\n\t\t\t\t...(parsedInput.data.type && { type: parsedInput.data.type }),\n\t\t\t\t...(parsedInput.data.include &&\n\t\t\t\t\tparsedInput.data.include.length > 0 && { include: parsedInput.data.include.join(',') })\n\t\t\t}\n\t\t})\n\t\treturn parseCollectionPage(data, headers, woocommerceProductRawSchema, page, limit, 'products')\n\t}\n\n\t/** GET /products/{id} */\n\tasync getProduct(input: WoocommerceGetProductInput): Promise<WoocommerceGetProductOutput> {\n\t\tconst { data } = await this.#http.get(`/products/${input.product_id}`, {\n\t\t\tlabel: 'WooCommerce getProduct'\n\t\t})\n\t\treturn { product: parseProduct(data) }\n\t}\n\n\t/** POST /products */\n\tasync createProduct(input: WoocommerceCreateProductInput): Promise<WoocommerceCreateProductOutput> {\n\t\tconst { data } = await this.#http.post('/products', productWriteBody(input), {\n\t\t\tlabel: 'WooCommerce createProduct'\n\t\t})\n\t\treturn { product: parseProduct(data) }\n\t}\n\n\t/** PUT /products/{id} */\n\tasync updateProduct(input: WoocommerceUpdateProductInput): Promise<WoocommerceUpdateProductOutput> {\n\t\tconst { product_id, ...fields } = input\n\t\tconst { data } = await this.#http.put(`/products/${product_id}`, productWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce updateProduct'\n\t\t})\n\t\treturn { product: parseProduct(data) }\n\t}\n\n\t/** DELETE /products/{id} */\n\tasync deleteProduct(input: WoocommerceDeleteProductInput): Promise<WoocommerceDeleteProductOutput> {\n\t\tconst force = input.force !== false\n\t\tconst { data } = await this.#http.delete(`/products/${input.product_id}`, {\n\t\t\tlabel: 'WooCommerce deleteProduct',\n\t\t\tquery: { force }\n\t\t})\n\t\treturn parseProductDeleteResult(data, input.product_id)\n\t}\n\n\t/** GET /products/{id}/variations */\n\tasync listProductVariations(\n\t\tinput: WoocommerceListProductVariationsInput\n\t): Promise<WoocommerceListProductVariationsOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get(`/products/${input.product_id}/variations`, {\n\t\t\tlabel: 'WooCommerce listProductVariations',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.status && { status: input.status }),\n\t\t\t\t...(input.sku && { sku: input.sku })\n\t\t\t}\n\t\t})\n\t\tconst items = parseProductVariations(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** GET /products/{product_id}/variations/{variation_id} */\n\tasync getProductVariation(input: WoocommerceGetProductVariationInput): Promise<WoocommerceGetProductVariationOutput> {\n\t\tconst { data } = await this.#http.get(`/products/${input.product_id}/variations/${input.variation_id}`, {\n\t\t\tlabel: 'WooCommerce getProductVariation'\n\t\t})\n\t\treturn { variation: parseProductVariation(data) }\n\t}\n\n\t// ── Customers ───────────────────────────────────────────────────────────\n\n\t/** GET /customers */\n\tasync listCustomers(input: WoocommerceListCustomersInput = {}): Promise<WoocommerceListCustomersOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get('/customers', {\n\t\t\tlabel: 'WooCommerce listCustomers',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.search && { search: input.search }),\n\t\t\t\t...(input.email && { email: input.email }),\n\t\t\t\t...(input.role && { role: input.role })\n\t\t\t}\n\t\t})\n\t\tconst items = parseCustomers(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** One GET /customers request with raw records and X-WP-Total pagination. */\n\tasync listCustomersPage(input: WoocommerceListCustomersPageInput = {}): Promise<WoocommerceListCustomersPageOutput> {\n\t\tconst parsedInput = woocommerceListCustomersPageInputSchema.safeParse(input)\n\t\tif (!parsedInput.success) {\n\t\t\tthrow new ToolError('Invalid WooCommerce customers page input', {\n\t\t\t\tcode: 'bad_input',\n\t\t\t\tdetails: { issues: parsedInput.error.issues.map((issue) => issue.message) }\n\t\t\t})\n\t\t}\n\t\tconst page = parsedInput.data.page ?? 1\n\t\tconst limit = parsedInput.data.limit ?? 10\n\t\tconst { data, headers } = await this.#request('GET', '/customers', {\n\t\t\tlabel: 'WooCommerce listCustomersPage',\n\t\t\tquery: {\n\t\t\t\t...collectionQuery(parsedInput.data),\n\t\t\t\t...(parsedInput.data.search && { search: parsedInput.data.search }),\n\t\t\t\t...(parsedInput.data.email && { email: parsedInput.data.email }),\n\t\t\t\t...(parsedInput.data.role && { role: parsedInput.data.role })\n\t\t\t}\n\t\t})\n\t\treturn parseCollectionPage(data, headers, woocommerceCustomerRawSchema, page, limit, 'customers')\n\t}\n\n\t/** GET /customers/{id} */\n\tasync getCustomer(input: WoocommerceGetCustomerInput): Promise<WoocommerceGetCustomerOutput> {\n\t\tconst { data } = await this.#http.get(`/customers/${input.customer_id}`, {\n\t\t\tlabel: 'WooCommerce getCustomer'\n\t\t})\n\t\treturn { customer: parseCustomer(data) }\n\t}\n\n\t/** POST /customers */\n\tasync createCustomer(input: WoocommerceCreateCustomerInput): Promise<WoocommerceCreateCustomerOutput> {\n\t\tconst { data } = await this.#http.post('/customers', customerWriteBody(input), {\n\t\t\tlabel: 'WooCommerce createCustomer'\n\t\t})\n\t\treturn { customer: parseCustomer(data) }\n\t}\n\n\t/** PUT /customers/{id} */\n\tasync updateCustomer(input: WoocommerceUpdateCustomerInput): Promise<WoocommerceUpdateCustomerOutput> {\n\t\tconst { customer_id, ...fields } = input\n\t\tconst { data } = await this.#http.put(`/customers/${customer_id}`, customerWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce updateCustomer'\n\t\t})\n\t\treturn { customer: parseCustomer(data) }\n\t}\n\n\t// ── Coupons ─────────────────────────────────────────────────────────────\n\n\t/** GET /coupons */\n\tasync listCoupons(input: WoocommerceListCouponsInput = {}): Promise<WoocommerceListCouponsOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get('/coupons', {\n\t\t\tlabel: 'WooCommerce listCoupons',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.search && { search: input.search }),\n\t\t\t\t...(input.code && { code: input.code })\n\t\t\t}\n\t\t})\n\t\tconst items = parseCoupons(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** GET /coupons/{id} */\n\tasync getCoupon(input: WoocommerceGetCouponInput): Promise<WoocommerceGetCouponOutput> {\n\t\tconst { data } = await this.#http.get(`/coupons/${input.coupon_id}`, {\n\t\t\tlabel: 'WooCommerce getCoupon'\n\t\t})\n\t\treturn { coupon: parseCoupon(data) }\n\t}\n\n\t/** POST /coupons */\n\tasync createCoupon(input: WoocommerceCreateCouponInput): Promise<WoocommerceCreateCouponOutput> {\n\t\tconst { data } = await this.#http.post('/coupons', couponWriteBody(input), {\n\t\t\tlabel: 'WooCommerce createCoupon'\n\t\t})\n\t\treturn { coupon: parseCoupon(data) }\n\t}\n\n\t/** PUT /coupons/{id} */\n\tasync updateCoupon(input: WoocommerceUpdateCouponInput): Promise<WoocommerceUpdateCouponOutput> {\n\t\tconst { coupon_id, ...fields } = input\n\t\tconst { data } = await this.#http.put(`/coupons/${coupon_id}`, couponWriteBody(fields), {\n\t\t\tlabel: 'WooCommerce updateCoupon'\n\t\t})\n\t\treturn { coupon: parseCoupon(data) }\n\t}\n\n\t// ── Product categories ──────────────────────────────────────────────────\n\n\t/** GET /products/categories */\n\tasync listProductCategories(\n\t\tinput: WoocommerceListProductCategoriesInput = {}\n\t): Promise<WoocommerceListProductCategoriesOutput> {\n\t\tconst page = pageFromCursor(input.cursor)\n\t\tconst limit = input.limit ?? 10\n\t\tconst { data, headers } = await this.#http.get('/products/categories', {\n\t\t\tlabel: 'WooCommerce listProductCategories',\n\t\t\tquery: {\n\t\t\t\tpage,\n\t\t\t\tper_page: limit,\n\t\t\t\t...(input.search && { search: input.search }),\n\t\t\t\t...(input.parent !== undefined && { parent: input.parent }),\n\t\t\t\t...(input.hide_empty !== undefined && { hide_empty: input.hide_empty })\n\t\t\t}\n\t\t})\n\t\tconst items = parseProductCategories(data)\n\t\tconst pageMeta = listPageMeta(page, limit, items.length, headers.get('x-wp-totalpages'))\n\t\treturn {\n\t\t\titems,\n\t\t\ttruncated: pageMeta.truncated,\n\t\t\t...(pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor })\n\t\t}\n\t}\n\n\t/** GET /products/categories/{id} */\n\tasync getProductCategory(input: WoocommerceGetProductCategoryInput): Promise<WoocommerceGetProductCategoryOutput> {\n\t\tconst { data } = await this.#http.get(`/products/categories/${input.category_id}`, {\n\t\t\tlabel: 'WooCommerce getProductCategory'\n\t\t})\n\t\treturn { category: parseProductCategory(data) }\n\t}\n}\n","import { defineModule, defineTool } from '../../core/define'\nimport { WoocommerceClient } from './client'\nimport {\n\twoocommerceAuthSchema,\n\twoocommerceCreateCouponInputSchema,\n\twoocommerceCreateCouponOutputSchema,\n\twoocommerceCreateCustomerInputSchema,\n\twoocommerceCreateCustomerOutputSchema,\n\twoocommerceCreateOrderInputSchema,\n\twoocommerceCreateOrderNoteInputSchema,\n\twoocommerceCreateOrderNoteOutputSchema,\n\twoocommerceCreateOrderOutputSchema,\n\twoocommerceCreateOrderRefundInputSchema,\n\twoocommerceCreateOrderRefundOutputSchema,\n\twoocommerceCreateProductInputSchema,\n\twoocommerceCreateProductOutputSchema,\n\twoocommerceDeleteOrderInputSchema,\n\twoocommerceDeleteOrderOutputSchema,\n\twoocommerceDeleteProductInputSchema,\n\twoocommerceDeleteProductOutputSchema,\n\twoocommerceGetCouponInputSchema,\n\twoocommerceGetCouponOutputSchema,\n\twoocommerceGetCustomerInputSchema,\n\twoocommerceGetCustomerOutputSchema,\n\twoocommerceGetOrderInputSchema,\n\twoocommerceGetOrderOutputSchema,\n\twoocommerceGetProductCategoryInputSchema,\n\twoocommerceGetProductCategoryOutputSchema,\n\twoocommerceGetProductInputSchema,\n\twoocommerceGetProductOutputSchema,\n\twoocommerceGetProductVariationInputSchema,\n\twoocommerceGetProductVariationOutputSchema,\n\twoocommerceListCouponsInputSchema,\n\twoocommerceListCouponsOutputSchema,\n\twoocommerceListCustomersInputSchema,\n\twoocommerceListCustomersOutputSchema,\n\twoocommerceListOrderNotesInputSchema,\n\twoocommerceListOrderNotesOutputSchema,\n\twoocommerceListOrderRefundsInputSchema,\n\twoocommerceListOrderRefundsOutputSchema,\n\twoocommerceListOrdersInputSchema,\n\twoocommerceListOrdersOutputSchema,\n\twoocommerceListProductCategoriesInputSchema,\n\twoocommerceListProductCategoriesOutputSchema,\n\twoocommerceListProductsInputSchema,\n\twoocommerceListProductsOutputSchema,\n\twoocommerceListProductVariationsInputSchema,\n\twoocommerceListProductVariationsOutputSchema,\n\twoocommerceUpdateCouponInputSchema,\n\twoocommerceUpdateCouponOutputSchema,\n\twoocommerceUpdateCustomerInputSchema,\n\twoocommerceUpdateCustomerOutputSchema,\n\twoocommerceUpdateOrderInputSchema,\n\twoocommerceUpdateOrderOutputSchema,\n\twoocommerceUpdateProductInputSchema,\n\twoocommerceUpdateProductOutputSchema\n} from './contracts'\n\n// ── Orders ──────────────────────────────────────────────────────────────────\n\nexport const woocommerceListOrdersTool = defineTool({\n\tid: 'woocommerce-list-orders',\n\tname: 'woocommerceListOrders',\n\tdescription:\n\t\t'List WooCommerce orders with optional status, date, search, and customer filters. Paginate with cursor (page number).',\n\tinputSchema: woocommerceListOrdersInputSchema,\n\toutputSchema: woocommerceListOrdersOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listOrders(input)\n})\n\nexport const woocommerceGetOrderTool = defineTool({\n\tid: 'woocommerce-get-order',\n\tname: 'woocommerceGetOrder',\n\tdescription: 'Get one WooCommerce order by numeric order id.',\n\tinputSchema: woocommerceGetOrderInputSchema,\n\toutputSchema: woocommerceGetOrderOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getOrder(input)\n})\n\nexport const woocommerceCreateOrderTool = defineTool({\n\tid: 'woocommerce-create-order',\n\tname: 'woocommerceCreateOrder',\n\tdescription:\n\t\t'Create a WooCommerce order with optional line items, billing/shipping, customer, status, and payment fields.',\n\tinputSchema: woocommerceCreateOrderInputSchema,\n\toutputSchema: woocommerceCreateOrderOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createOrder(input)\n})\n\nexport const woocommerceUpdateOrderTool = defineTool({\n\tid: 'woocommerce-update-order',\n\tname: 'woocommerceUpdateOrder',\n\tdescription: 'Update a WooCommerce order by id (status, line items, addresses, payment, notes, and meta).',\n\tinputSchema: woocommerceUpdateOrderInputSchema,\n\toutputSchema: woocommerceUpdateOrderOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateOrder(input)\n})\n\nexport const woocommerceDeleteOrderTool = defineTool({\n\tid: 'woocommerce-delete-order',\n\tname: 'woocommerceDeleteOrder',\n\tdescription: 'Delete a WooCommerce order by id. force defaults to true for permanent delete.',\n\tinputSchema: woocommerceDeleteOrderInputSchema,\n\toutputSchema: woocommerceDeleteOrderOutputSchema,\n\tsideEffect: 'delete',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).deleteOrder(input)\n})\n\nexport const woocommerceListOrderNotesTool = defineTool({\n\tid: 'woocommerce-list-order-notes',\n\tname: 'woocommerceListOrderNotes',\n\tdescription: 'List notes on a WooCommerce order. Optional type filter: any, customer, or internal.',\n\tinputSchema: woocommerceListOrderNotesInputSchema,\n\toutputSchema: woocommerceListOrderNotesOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listOrderNotes(input)\n})\n\nexport const woocommerceCreateOrderNoteTool = defineTool({\n\tid: 'woocommerce-create-order-note',\n\tname: 'woocommerceCreateOrderNote',\n\tdescription: 'Add a note to a WooCommerce order. Optional customer_note makes it visible to the customer.',\n\tinputSchema: woocommerceCreateOrderNoteInputSchema,\n\toutputSchema: woocommerceCreateOrderNoteOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createOrderNote(input)\n})\n\nexport const woocommerceListOrderRefundsTool = defineTool({\n\tid: 'woocommerce-list-order-refunds',\n\tname: 'woocommerceListOrderRefunds',\n\tdescription: 'List refunds for a WooCommerce order. Paginate with cursor.',\n\tinputSchema: woocommerceListOrderRefundsInputSchema,\n\toutputSchema: woocommerceListOrderRefundsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listOrderRefunds(input)\n})\n\nexport const woocommerceCreateOrderRefundTool = defineTool({\n\tid: 'woocommerce-create-order-refund',\n\tname: 'woocommerceCreateOrderRefund',\n\tdescription:\n\t\t'Create a refund on a WooCommerce order. Optional amount, reason, per-line items, and api_refund gateway flag.',\n\tinputSchema: woocommerceCreateOrderRefundInputSchema,\n\toutputSchema: woocommerceCreateOrderRefundOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createOrderRefund(input)\n})\n\n// ── Products ────────────────────────────────────────────────────────────────\n\nexport const woocommerceListProductsTool = defineTool({\n\tid: 'woocommerce-list-products',\n\tname: 'woocommerceListProducts',\n\tdescription:\n\t\t'List WooCommerce products with optional status, search, SKU, category, and type filters. Paginate with cursor.',\n\tinputSchema: woocommerceListProductsInputSchema,\n\toutputSchema: woocommerceListProductsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listProducts(input)\n})\n\nexport const woocommerceGetProductTool = defineTool({\n\tid: 'woocommerce-get-product',\n\tname: 'woocommerceGetProduct',\n\tdescription: 'Get one WooCommerce product by numeric product id.',\n\tinputSchema: woocommerceGetProductInputSchema,\n\toutputSchema: woocommerceGetProductOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getProduct(input)\n})\n\nexport const woocommerceCreateProductTool = defineTool({\n\tid: 'woocommerce-create-product',\n\tname: 'woocommerceCreateProduct',\n\tdescription:\n\t\t'Create a WooCommerce product (name required). Optional type, status, SKU, prices, stock, categories, and meta.',\n\tinputSchema: woocommerceCreateProductInputSchema,\n\toutputSchema: woocommerceCreateProductOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createProduct(input)\n})\n\nexport const woocommerceUpdateProductTool = defineTool({\n\tid: 'woocommerce-update-product',\n\tname: 'woocommerceUpdateProduct',\n\tdescription: 'Update a WooCommerce product by id (name, status, SKU, prices, stock, categories, meta).',\n\tinputSchema: woocommerceUpdateProductInputSchema,\n\toutputSchema: woocommerceUpdateProductOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateProduct(input)\n})\n\nexport const woocommerceDeleteProductTool = defineTool({\n\tid: 'woocommerce-delete-product',\n\tname: 'woocommerceDeleteProduct',\n\tdescription: 'Delete a WooCommerce product by id. force defaults to true for permanent delete.',\n\tinputSchema: woocommerceDeleteProductInputSchema,\n\toutputSchema: woocommerceDeleteProductOutputSchema,\n\tsideEffect: 'delete',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).deleteProduct(input)\n})\n\nexport const woocommerceListProductVariationsTool = defineTool({\n\tid: 'woocommerce-list-product-variations',\n\tname: 'woocommerceListProductVariations',\n\tdescription: 'List variations for a variable WooCommerce product. Paginate with cursor.',\n\tinputSchema: woocommerceListProductVariationsInputSchema,\n\toutputSchema: woocommerceListProductVariationsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listProductVariations(input)\n})\n\nexport const woocommerceGetProductVariationTool = defineTool({\n\tid: 'woocommerce-get-product-variation',\n\tname: 'woocommerceGetProductVariation',\n\tdescription: 'Get one product variation by parent product id and variation id.',\n\tinputSchema: woocommerceGetProductVariationInputSchema,\n\toutputSchema: woocommerceGetProductVariationOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getProductVariation(input)\n})\n\n// ── Customers ───────────────────────────────────────────────────────────────\n\nexport const woocommerceListCustomersTool = defineTool({\n\tid: 'woocommerce-list-customers',\n\tname: 'woocommerceListCustomers',\n\tdescription: 'List WooCommerce customers with optional search, email, and role filters. Paginate with cursor.',\n\tinputSchema: woocommerceListCustomersInputSchema,\n\toutputSchema: woocommerceListCustomersOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listCustomers(input)\n})\n\nexport const woocommerceGetCustomerTool = defineTool({\n\tid: 'woocommerce-get-customer',\n\tname: 'woocommerceGetCustomer',\n\tdescription: 'Get one WooCommerce customer by numeric customer id.',\n\tinputSchema: woocommerceGetCustomerInputSchema,\n\toutputSchema: woocommerceGetCustomerOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getCustomer(input)\n})\n\nexport const woocommerceCreateCustomerTool = defineTool({\n\tid: 'woocommerce-create-customer',\n\tname: 'woocommerceCreateCustomer',\n\tdescription: 'Create a WooCommerce customer (email required). Optional name, username, password, and addresses.',\n\tinputSchema: woocommerceCreateCustomerInputSchema,\n\toutputSchema: woocommerceCreateCustomerOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createCustomer(input)\n})\n\nexport const woocommerceUpdateCustomerTool = defineTool({\n\tid: 'woocommerce-update-customer',\n\tname: 'woocommerceUpdateCustomer',\n\tdescription: 'Update a WooCommerce customer by id (email, name, username, password, addresses, meta).',\n\tinputSchema: woocommerceUpdateCustomerInputSchema,\n\toutputSchema: woocommerceUpdateCustomerOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateCustomer(input)\n})\n\n// ── Coupons ─────────────────────────────────────────────────────────────────\n\nexport const woocommerceListCouponsTool = defineTool({\n\tid: 'woocommerce-list-coupons',\n\tname: 'woocommerceListCoupons',\n\tdescription: 'List WooCommerce coupons with optional search and code filters. Paginate with cursor.',\n\tinputSchema: woocommerceListCouponsInputSchema,\n\toutputSchema: woocommerceListCouponsOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listCoupons(input)\n})\n\nexport const woocommerceGetCouponTool = defineTool({\n\tid: 'woocommerce-get-coupon',\n\tname: 'woocommerceGetCoupon',\n\tdescription: 'Get one WooCommerce coupon by numeric coupon id.',\n\tinputSchema: woocommerceGetCouponInputSchema,\n\toutputSchema: woocommerceGetCouponOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getCoupon(input)\n})\n\nexport const woocommerceCreateCouponTool = defineTool({\n\tid: 'woocommerce-create-coupon',\n\tname: 'woocommerceCreateCoupon',\n\tdescription:\n\t\t'Create a WooCommerce coupon (code required). Optional discount type, amount, limits, free shipping, and expiry.',\n\tinputSchema: woocommerceCreateCouponInputSchema,\n\toutputSchema: woocommerceCreateCouponOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createCoupon(input)\n})\n\nexport const woocommerceUpdateCouponTool = defineTool({\n\tid: 'woocommerce-update-coupon',\n\tname: 'woocommerceUpdateCoupon',\n\tdescription: 'Update a WooCommerce coupon by id (code, discount, amount, limits, free shipping, expiry).',\n\tinputSchema: woocommerceUpdateCouponInputSchema,\n\toutputSchema: woocommerceUpdateCouponOutputSchema,\n\tsideEffect: 'write',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateCoupon(input)\n})\n\n// ── Product categories ──────────────────────────────────────────────────────\n\nexport const woocommerceListProductCategoriesTool = defineTool({\n\tid: 'woocommerce-list-product-categories',\n\tname: 'woocommerceListProductCategories',\n\tdescription: 'List WooCommerce product categories with optional search, parent, and hide_empty filters.',\n\tinputSchema: woocommerceListProductCategoriesInputSchema,\n\toutputSchema: woocommerceListProductCategoriesOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listProductCategories(input)\n})\n\nexport const woocommerceGetProductCategoryTool = defineTool({\n\tid: 'woocommerce-get-product-category',\n\tname: 'woocommerceGetProductCategory',\n\tdescription: 'Get one WooCommerce product category by numeric category id.',\n\tinputSchema: woocommerceGetProductCategoryInputSchema,\n\toutputSchema: woocommerceGetProductCategoryOutputSchema,\n\tsideEffect: 'read',\n\truntime: 'both',\n\texecute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getProductCategory(input)\n})\n\nexport const woocommerceModule = defineModule({\n\tid: 'woocommerce',\n\ttitle: 'WooCommerce',\n\tdescription:\n\t\t'WooCommerce REST API vendor pack (wc/v3): orders (CRUD, notes, refunds), products (CRUD, variations), customers, coupons, and product categories.',\n\truntime: 'both',\n\tauth: { type: 'custom', schema: woocommerceAuthSchema },\n\tcategories: ['commerce'],\n\tclassification: 'pii',\n\ttags: ['orders', 'products'],\n\ttools: [\n\t\twoocommerceListOrdersTool,\n\t\twoocommerceGetOrderTool,\n\t\twoocommerceCreateOrderTool,\n\t\twoocommerceUpdateOrderTool,\n\t\twoocommerceDeleteOrderTool,\n\t\twoocommerceListOrderNotesTool,\n\t\twoocommerceCreateOrderNoteTool,\n\t\twoocommerceListOrderRefundsTool,\n\t\twoocommerceCreateOrderRefundTool,\n\t\twoocommerceListProductsTool,\n\t\twoocommerceGetProductTool,\n\t\twoocommerceCreateProductTool,\n\t\twoocommerceUpdateProductTool,\n\t\twoocommerceDeleteProductTool,\n\t\twoocommerceListProductVariationsTool,\n\t\twoocommerceGetProductVariationTool,\n\t\twoocommerceListCustomersTool,\n\t\twoocommerceGetCustomerTool,\n\t\twoocommerceCreateCustomerTool,\n\t\twoocommerceUpdateCustomerTool,\n\t\twoocommerceListCouponsTool,\n\t\twoocommerceGetCouponTool,\n\t\twoocommerceCreateCouponTool,\n\t\twoocomm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KAAK;AACrF,CAAC;AAED,MAAa,8BAA8B,WAAW;CACrD,IAAI;CACJ,MAAM;CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,kBAAkB,YAAY,GAAG,CAAC,CAAC,aAAa,KAAK;AACrF,CAAC;AAID,MAAa,uCAAuC,WAAW;CAC9D,IAAI;CACJ,MAAM;CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,kBAAkB,YAAY,GAAG,CAAC,CAAC,sBAAsB,KAAK;AAC9F,CAAC;AAED,MAAa,oCAAoC,WAAW;CAC3D,IAAI;CACJ,MAAM;CACN,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,SAAS;CACT,SAAS,OAAO,OAAO,QAAQ,kBAAkB,YAAY,GAAG,CAAC,CAAC,mBAAmB,KAAK;AAC3F,CAAC;AAED,MAAa,oBAAoB,aAAa;CAC7C,IAAI;CACJ,OAAO;CACP,aACC;CACD,SAAS;CACT,MAAM;EAAE,MAAM;EAAU,QAAQ;CAAsB;CACtD,YAAY,CAAC,UAAU;CACvB,gBAAgB;CAChB,MAAM,CAAC,UAAU,UAAU;CAC3B,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5ss/ai-tools",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "description": "Reusable AI tools with strict schemas and model-facing contracts. Define once; project to Node, edge, Mastra, AI SDK, TanStack AI, Cloudflare Workers AI, or MCP.",
5
5
  "license": "MIT",
6
6
  "author": "harryy",