@keystrokehq/payhip 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/action.cjs.map +1 -1
  2. package/dist/action.mjs.map +1 -1
  3. package/dist/actions/create-coupon.cjs +5 -5
  4. package/dist/actions/create-coupon.cjs.map +1 -1
  5. package/dist/actions/create-coupon.d.cts +40 -3
  6. package/dist/actions/create-coupon.d.cts.map +1 -1
  7. package/dist/actions/create-coupon.d.mts +40 -3
  8. package/dist/actions/create-coupon.d.mts.map +1 -1
  9. package/dist/actions/create-coupon.mjs +5 -5
  10. package/dist/actions/create-coupon.mjs.map +1 -1
  11. package/dist/actions/delete-coupon.cjs +2 -2
  12. package/dist/actions/delete-coupon.cjs.map +1 -1
  13. package/dist/actions/delete-coupon.d.cts +17 -3
  14. package/dist/actions/delete-coupon.d.cts.map +1 -1
  15. package/dist/actions/delete-coupon.d.mts +17 -3
  16. package/dist/actions/delete-coupon.d.mts.map +1 -1
  17. package/dist/actions/delete-coupon.mjs +2 -2
  18. package/dist/actions/delete-coupon.mjs.map +1 -1
  19. package/dist/actions/get-coupon.cjs +5 -5
  20. package/dist/actions/get-coupon.cjs.map +1 -1
  21. package/dist/actions/get-coupon.d.cts +22 -3
  22. package/dist/actions/get-coupon.d.cts.map +1 -1
  23. package/dist/actions/get-coupon.d.mts +22 -3
  24. package/dist/actions/get-coupon.d.mts.map +1 -1
  25. package/dist/actions/get-coupon.mjs +5 -5
  26. package/dist/actions/get-coupon.mjs.map +1 -1
  27. package/dist/actions/update-coupon.cjs +2 -2
  28. package/dist/actions/update-coupon.cjs.map +1 -1
  29. package/dist/actions/update-coupon.d.cts +28 -3
  30. package/dist/actions/update-coupon.d.cts.map +1 -1
  31. package/dist/actions/update-coupon.d.mts +28 -3
  32. package/dist/actions/update-coupon.d.mts.map +1 -1
  33. package/dist/actions/update-coupon.mjs +2 -2
  34. package/dist/actions/update-coupon.mjs.map +1 -1
  35. package/dist/actions/verify-coupon.cjs +2 -2
  36. package/dist/actions/verify-coupon.cjs.map +1 -1
  37. package/dist/actions/verify-coupon.d.cts +20 -3
  38. package/dist/actions/verify-coupon.d.cts.map +1 -1
  39. package/dist/actions/verify-coupon.d.mts +20 -3
  40. package/dist/actions/verify-coupon.d.mts.map +1 -1
  41. package/dist/actions/verify-coupon.mjs +2 -2
  42. package/dist/actions/verify-coupon.mjs.map +1 -1
  43. package/dist/actions/webhook-event-paid.cjs +28 -28
  44. package/dist/actions/webhook-event-paid.cjs.map +1 -1
  45. package/dist/actions/webhook-event-paid.d.cts +97 -3
  46. package/dist/actions/webhook-event-paid.d.cts.map +1 -1
  47. package/dist/actions/webhook-event-paid.d.mts +97 -3
  48. package/dist/actions/webhook-event-paid.d.mts.map +1 -1
  49. package/dist/actions/webhook-event-paid.mjs +28 -28
  50. package/dist/actions/webhook-event-paid.mjs.map +1 -1
  51. package/dist/actions/webhook-event-refunded.cjs +31 -31
  52. package/dist/actions/webhook-event-refunded.cjs.map +1 -1
  53. package/dist/actions/webhook-event-refunded.d.cts +97 -3
  54. package/dist/actions/webhook-event-refunded.d.cts.map +1 -1
  55. package/dist/actions/webhook-event-refunded.d.mts +97 -3
  56. package/dist/actions/webhook-event-refunded.d.mts.map +1 -1
  57. package/dist/actions/webhook-event-refunded.mjs +31 -31
  58. package/dist/actions/webhook-event-refunded.mjs.map +1 -1
  59. package/dist/actions/webhook-event-subscription-created.cjs +13 -13
  60. package/dist/actions/webhook-event-subscription-created.cjs.map +1 -1
  61. package/dist/actions/webhook-event-subscription-created.d.cts +51 -3
  62. package/dist/actions/webhook-event-subscription-created.d.cts.map +1 -1
  63. package/dist/actions/webhook-event-subscription-created.d.mts +51 -3
  64. package/dist/actions/webhook-event-subscription-created.d.mts.map +1 -1
  65. package/dist/actions/webhook-event-subscription-created.mjs +13 -13
  66. package/dist/actions/webhook-event-subscription-created.mjs.map +1 -1
  67. package/dist/actions/webhook-event-subscription-deleted.cjs +15 -15
  68. package/dist/actions/webhook-event-subscription-deleted.cjs.map +1 -1
  69. package/dist/actions/webhook-event-subscription-deleted.d.cts +54 -3
  70. package/dist/actions/webhook-event-subscription-deleted.d.cts.map +1 -1
  71. package/dist/actions/webhook-event-subscription-deleted.d.mts +54 -3
  72. package/dist/actions/webhook-event-subscription-deleted.d.mts.map +1 -1
  73. package/dist/actions/webhook-event-subscription-deleted.mjs +15 -15
  74. package/dist/actions/webhook-event-subscription-deleted.mjs.map +1 -1
  75. package/dist/catalog.cjs +7 -1
  76. package/dist/catalog.cjs.map +1 -1
  77. package/dist/catalog.d.cts +8 -0
  78. package/dist/catalog.d.mts +8 -0
  79. package/dist/catalog.mjs +7 -1
  80. package/dist/catalog.mjs.map +1 -1
  81. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"action.cjs","names":["payhip","executePayhipTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhip } from \"./app\";\nimport { executePayhipTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return payhip.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executePayhipTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"action.cjs","names":["payhip","executePayhipTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhip } from \"./app\";\nimport { executePayhipTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\n },\n) {\n return payhip.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output as z.ZodTypeAny,\n async run(input) {\n return def.output.parse(await executePayhipTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhip } from \"./app\";\nimport { executePayhipTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return payhip.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executePayhipTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhip } from \"./app\";\nimport { executePayhipTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\n },\n) {\n return payhip.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output as z.ZodTypeAny,\n async run(input) {\n return def.output.parse(await executePayhipTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
@@ -16,20 +16,20 @@ const PayhipCreateCouponInput = zod.z.object({
16
16
  collection_id: zod.z.string().describe("The unique collection ID. Required if coupon_type is set to 'collection'").optional()
17
17
  }).describe("Request schema for creating a coupon in Payhip.");
18
18
  const PayhipCreateCoupon_CouponDataSchema = zod.z.object({
19
- id: zod.z.number().int().describe("Unique identifier for the coupon object"),
20
- code: zod.z.string().describe("The coupon code"),
19
+ id: zod.z.number().int().describe("Unique identifier for the coupon object").nullable(),
20
+ code: zod.z.string().describe("The coupon code").nullable(),
21
21
  notes: zod.z.string().describe("Admin notes").nullable().optional(),
22
22
  end_date: zod.z.string().describe("RFC 3339 datetime when coupon expires").nullable().optional(),
23
23
  amount_off: zod.z.number().int().describe("Fixed amount discount in cents").nullable().optional(),
24
24
  start_date: zod.z.string().describe("RFC 3339 datetime when coupon becomes valid").nullable().optional(),
25
- coupon_type: zod.z.string().describe("The type of coupon"),
25
+ coupon_type: zod.z.string().describe("The type of coupon").nullable(),
26
26
  percent_off: zod.z.number().describe("Percentage discount").nullable().optional(),
27
27
  product_key: zod.z.string().describe("Product key if single coupon").nullable().optional(),
28
28
  usage_limit: zod.z.number().int().describe("Max redemptions").nullable().optional(),
29
29
  collection_id: zod.z.string().describe("Collection ID if collection coupon").nullable().optional(),
30
30
  minimum_purchase_amount: zod.z.number().int().describe("Minimum cart total in cents").nullable().optional()
31
- }).describe("Coupon data returned after creation.");
32
- const PayhipCreateCouponOutput = zod.z.object({ data: PayhipCreateCoupon_CouponDataSchema.nullable() }).describe("Response schema for coupon creation.");
31
+ }).passthrough().describe("Coupon data returned after creation.");
32
+ const PayhipCreateCouponOutput = zod.z.object({ data: PayhipCreateCoupon_CouponDataSchema.nullable() }).passthrough().describe("Response schema for coupon creation.");
33
33
  const payhipCreateCoupon = require_action.action("PAYHIP_CREATE_COUPON", {
34
34
  slug: "payhip-create-coupon",
35
35
  name: "Create Coupon",
@@ -1 +1 @@
1
- {"version":3,"file":"create-coupon.cjs","names":["z","action"],"sources":["../../src/actions/create-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipCreateCouponInput: z.ZodTypeAny = z.object({\n code: z.string().describe(\"The coupon code the customer is required to enter at checkout\"),\n notes: z.string().describe(\"For administrative purposes you can remind yourself why you created this coupon by adding a note - not visible to customers\").optional(),\n amount_off: z.number().int().describe(\"A positive integer representing the amount to subtract from the cart total in cents. For example $5 off would be 500. Required if percent_off is not provided. Cannot be used together with percent_off.\").optional(),\n coupon_type: z.enum([\"single\", \"multi\", \"collection\"]).describe(\"Specifies if the coupon will be applied for a single product, all your products or a single collection\"),\n percent_off: z.number().describe(\"A positive float larger than 0, and smaller or equal to 100, that represents the discount percentage the coupon will apply. Required if amount_off is not provided. Cannot be used together with amount_off.\").optional(),\n product_key: z.string().describe(\"The unique product key. Required if coupon_type is set to 'single'\").optional(),\n usage_limit: z.number().int().describe(\"The maximum number of times this coupon can be redeemed before it becomes invalid\").optional(),\n collection_id: z.string().describe(\"The unique collection ID. Required if coupon_type is set to 'collection'\").optional(),\n}).describe(\"Request schema for creating a coupon in Payhip.\");\nconst PayhipCreateCoupon_CouponDataSchema: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon object\"),\n code: z.string().describe(\"The coupon code\"),\n notes: z.string().describe(\"Admin notes\").nullable().optional(),\n end_date: z.string().describe(\"RFC 3339 datetime when coupon expires\").nullable().optional(),\n amount_off: z.number().int().describe(\"Fixed amount discount in cents\").nullable().optional(),\n start_date: z.string().describe(\"RFC 3339 datetime when coupon becomes valid\").nullable().optional(),\n coupon_type: z.string().describe(\"The type of coupon\"),\n percent_off: z.number().describe(\"Percentage discount\").nullable().optional(),\n product_key: z.string().describe(\"Product key if single coupon\").nullable().optional(),\n usage_limit: z.number().int().describe(\"Max redemptions\").nullable().optional(),\n collection_id: z.string().describe(\"Collection ID if collection coupon\").nullable().optional(),\n minimum_purchase_amount: z.number().int().describe(\"Minimum cart total in cents\").nullable().optional(),\n}).describe(\"Coupon data returned after creation.\");\nexport const PayhipCreateCouponOutput: z.ZodTypeAny = z.object({\n data: PayhipCreateCoupon_CouponDataSchema.nullable(),\n}).describe(\"Response schema for coupon creation.\");\n\nexport const payhipCreateCoupon = action(\"PAYHIP_CREATE_COUPON\", {\n slug: \"payhip-create-coupon\",\n name: \"Create Coupon\",\n description: \"Tool to create a coupon for discounts in Payhip. Use when you need to create a new coupon code with either percentage or fixed amount discounts. Coupons can apply to single products, all products, or collections.\",\n input: PayhipCreateCouponInput,\n output: PayhipCreateCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwCA,IAAAA,EAAE,OAAO;CAC5D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;CACzF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC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AaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5E,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9E,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7F,yBAAyBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACxG,CAAC,CAAC,CAAC,SAAS,sCAAsC;AAClD,MAAa,2BAAyCA,IAAAA,EAAE,OAAO,EAC7D,MAAM,oCAAoC,SAAS,EACrD,CAAC,CAAC,CAAC,SAAS,sCAAsC;AAElD,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"create-coupon.cjs","names":["z","action"],"sources":["../../src/actions/create-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipCreateCouponInput = z.object({\n code: z.string().describe(\"The coupon code the customer is required to enter at checkout\"),\n notes: z.string().describe(\"For administrative purposes you can remind yourself why you created this coupon by adding a note - not visible to customers\").optional(),\n amount_off: z.number().int().describe(\"A positive integer representing the amount to subtract from the cart total in cents. For example $5 off would be 500. Required if percent_off is not provided. Cannot be used together with percent_off.\").optional(),\n coupon_type: z.enum([\"single\", \"multi\", \"collection\"]).describe(\"Specifies if the coupon will be applied for a single product, all your products or a single collection\"),\n percent_off: z.number().describe(\"A positive float larger than 0, and smaller or equal to 100, that represents the discount percentage the coupon will apply. Required if amount_off is not provided. Cannot be used together with amount_off.\").optional(),\n product_key: z.string().describe(\"The unique product key. Required if coupon_type is set to 'single'\").optional(),\n usage_limit: z.number().int().describe(\"The maximum number of times this coupon can be redeemed before it becomes invalid\").optional(),\n collection_id: z.string().describe(\"The unique collection ID. Required if coupon_type is set to 'collection'\").optional(),\n}).describe(\"Request schema for creating a coupon in Payhip.\");\nconst PayhipCreateCoupon_CouponDataSchema = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon object\").nullable(),\n code: z.string().describe(\"The coupon code\").nullable(),\n notes: z.string().describe(\"Admin notes\").nullable().optional(),\n end_date: z.string().describe(\"RFC 3339 datetime when coupon expires\").nullable().optional(),\n amount_off: z.number().int().describe(\"Fixed amount discount in cents\").nullable().optional(),\n start_date: z.string().describe(\"RFC 3339 datetime when coupon becomes valid\").nullable().optional(),\n coupon_type: z.string().describe(\"The type of coupon\").nullable(),\n percent_off: z.number().describe(\"Percentage discount\").nullable().optional(),\n product_key: z.string().describe(\"Product key if single coupon\").nullable().optional(),\n usage_limit: z.number().int().describe(\"Max redemptions\").nullable().optional(),\n collection_id: z.string().describe(\"Collection ID if collection coupon\").nullable().optional(),\n minimum_purchase_amount: z.number().int().describe(\"Minimum cart total in cents\").nullable().optional(),\n}).passthrough().describe(\"Coupon data returned after creation.\");\nexport const PayhipCreateCouponOutput = z.object({\n data: PayhipCreateCoupon_CouponDataSchema.nullable(),\n}).passthrough().describe(\"Response schema for coupon creation.\");\n\nexport const payhipCreateCoupon = action(\"PAYHIP_CREATE_COUPON\", {\n slug: \"payhip-create-coupon\",\n name: \"Create Coupon\",\n description: \"Tool to create a coupon for discounts in Payhip. Use when you need to create a new coupon code with either percentage or fixed amount discounts. Coupons can apply to single products, all products, or collections.\",\n input: PayhipCreateCouponInput,\n output: PayhipCreateCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,MAAMA,IAAAA,EA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S,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAChE,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5E,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9E,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7F,yBAAyBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACxG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sCAAsC;AAChE,MAAa,2BAA2BA,IAAAA,EAAE,OAAO,EAC/C,MAAM,oCAAoC,SAAS,EACrD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sCAAsC;AAEhE,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,46 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/create-coupon.d.ts
4
- declare const PayhipCreateCouponInput: z.ZodTypeAny;
5
- declare const PayhipCreateCouponOutput: z.ZodTypeAny;
6
- declare const payhipCreateCoupon: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhipCreateCouponInput: z.ZodObject<{
5
+ code: z.ZodString;
6
+ notes: z.ZodOptional<z.ZodString>;
7
+ amount_off: z.ZodOptional<z.ZodNumber>;
8
+ coupon_type: z.ZodEnum<{
9
+ single: "single";
10
+ multi: "multi";
11
+ collection: "collection";
12
+ }>;
13
+ percent_off: z.ZodOptional<z.ZodNumber>;
14
+ product_key: z.ZodOptional<z.ZodString>;
15
+ usage_limit: z.ZodOptional<z.ZodNumber>;
16
+ collection_id: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strip>;
18
+ declare const PayhipCreateCouponOutput: z.ZodObject<{
19
+ data: z.ZodNullable<z.ZodObject<{
20
+ id: z.ZodNullable<z.ZodNumber>;
21
+ code: z.ZodNullable<z.ZodString>;
22
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ end_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ amount_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
25
+ start_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ coupon_type: z.ZodNullable<z.ZodString>;
27
+ percent_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
28
+ product_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ usage_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
30
+ collection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
32
+ }, z.core.$loose>>;
33
+ }, z.core.$loose>;
34
+ declare const payhipCreateCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
35
+ code: string;
36
+ coupon_type: "single" | "multi" | "collection";
37
+ notes?: string | undefined;
38
+ amount_off?: number | undefined;
39
+ percent_off?: number | undefined;
40
+ product_key?: string | undefined;
41
+ usage_limit?: number | undefined;
42
+ collection_id?: string | undefined;
43
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
44
  //#endregion
8
45
  export { payhipCreateCoupon };
9
46
  //# sourceMappingURL=create-coupon.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-coupon.d.cts","names":[],"sources":["../../src/actions/create-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UASsB;AAAA,cAejD,wBAAA,EAA0B,CAAA,CAAE,UAEU;AAAA,cAEtC,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"create-coupon.d.cts","names":[],"sources":["../../src/actions/create-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAwBvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;cAIxB,kBAAA,gCAAkB,wBAAA"}
@@ -1,9 +1,46 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/create-coupon.d.ts
4
- declare const PayhipCreateCouponInput: z.ZodTypeAny;
5
- declare const PayhipCreateCouponOutput: z.ZodTypeAny;
6
- declare const payhipCreateCoupon: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhipCreateCouponInput: z.ZodObject<{
5
+ code: z.ZodString;
6
+ notes: z.ZodOptional<z.ZodString>;
7
+ amount_off: z.ZodOptional<z.ZodNumber>;
8
+ coupon_type: z.ZodEnum<{
9
+ single: "single";
10
+ multi: "multi";
11
+ collection: "collection";
12
+ }>;
13
+ percent_off: z.ZodOptional<z.ZodNumber>;
14
+ product_key: z.ZodOptional<z.ZodString>;
15
+ usage_limit: z.ZodOptional<z.ZodNumber>;
16
+ collection_id: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strip>;
18
+ declare const PayhipCreateCouponOutput: z.ZodObject<{
19
+ data: z.ZodNullable<z.ZodObject<{
20
+ id: z.ZodNullable<z.ZodNumber>;
21
+ code: z.ZodNullable<z.ZodString>;
22
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ end_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ amount_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
25
+ start_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ coupon_type: z.ZodNullable<z.ZodString>;
27
+ percent_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
28
+ product_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ usage_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
30
+ collection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
32
+ }, z.core.$loose>>;
33
+ }, z.core.$loose>;
34
+ declare const payhipCreateCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
35
+ code: string;
36
+ coupon_type: "single" | "multi" | "collection";
37
+ notes?: string | undefined;
38
+ amount_off?: number | undefined;
39
+ percent_off?: number | undefined;
40
+ product_key?: string | undefined;
41
+ usage_limit?: number | undefined;
42
+ collection_id?: string | undefined;
43
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
44
  //#endregion
8
45
  export { payhipCreateCoupon };
9
46
  //# sourceMappingURL=create-coupon.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-coupon.d.mts","names":[],"sources":["../../src/actions/create-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UASsB;AAAA,cAejD,wBAAA,EAA0B,CAAA,CAAE,UAEU;AAAA,cAEtC,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"create-coupon.d.mts","names":[],"sources":["../../src/actions/create-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAwBvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;cAIxB,kBAAA,gCAAkB,wBAAA"}
@@ -16,25 +16,25 @@ const PayhipCreateCouponInput = z.object({
16
16
  collection_id: z.string().describe("The unique collection ID. Required if coupon_type is set to 'collection'").optional()
17
17
  }).describe("Request schema for creating a coupon in Payhip.");
18
18
  const PayhipCreateCoupon_CouponDataSchema = z.object({
19
- id: z.number().int().describe("Unique identifier for the coupon object"),
20
- code: z.string().describe("The coupon code"),
19
+ id: z.number().int().describe("Unique identifier for the coupon object").nullable(),
20
+ code: z.string().describe("The coupon code").nullable(),
21
21
  notes: z.string().describe("Admin notes").nullable().optional(),
22
22
  end_date: z.string().describe("RFC 3339 datetime when coupon expires").nullable().optional(),
23
23
  amount_off: z.number().int().describe("Fixed amount discount in cents").nullable().optional(),
24
24
  start_date: z.string().describe("RFC 3339 datetime when coupon becomes valid").nullable().optional(),
25
- coupon_type: z.string().describe("The type of coupon"),
25
+ coupon_type: z.string().describe("The type of coupon").nullable(),
26
26
  percent_off: z.number().describe("Percentage discount").nullable().optional(),
27
27
  product_key: z.string().describe("Product key if single coupon").nullable().optional(),
28
28
  usage_limit: z.number().int().describe("Max redemptions").nullable().optional(),
29
29
  collection_id: z.string().describe("Collection ID if collection coupon").nullable().optional(),
30
30
  minimum_purchase_amount: z.number().int().describe("Minimum cart total in cents").nullable().optional()
31
- }).describe("Coupon data returned after creation.");
31
+ }).passthrough().describe("Coupon data returned after creation.");
32
32
  const payhipCreateCoupon = action("PAYHIP_CREATE_COUPON", {
33
33
  slug: "payhip-create-coupon",
34
34
  name: "Create Coupon",
35
35
  description: "Tool to create a coupon for discounts in Payhip. Use when you need to create a new coupon code with either percentage or fixed amount discounts. Coupons can apply to single products, all products, or collections.",
36
36
  input: PayhipCreateCouponInput,
37
- output: z.object({ data: PayhipCreateCoupon_CouponDataSchema.nullable() }).describe("Response schema for coupon creation.")
37
+ output: z.object({ data: PayhipCreateCoupon_CouponDataSchema.nullable() }).passthrough().describe("Response schema for coupon creation.")
38
38
  });
39
39
  //#endregion
40
40
  export { payhipCreateCoupon };
@@ -1 +1 @@
1
- {"version":3,"file":"create-coupon.mjs","names":[],"sources":["../../src/actions/create-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipCreateCouponInput: z.ZodTypeAny = z.object({\n code: z.string().describe(\"The coupon code the customer is required to enter at checkout\"),\n notes: z.string().describe(\"For administrative purposes you can remind yourself why you created this coupon by adding a note - not visible to customers\").optional(),\n amount_off: z.number().int().describe(\"A positive integer representing the amount to subtract from the cart total in cents. For example $5 off would be 500. Required if percent_off is not provided. Cannot be used together with percent_off.\").optional(),\n coupon_type: z.enum([\"single\", \"multi\", \"collection\"]).describe(\"Specifies if the coupon will be applied for a single product, all your products or a single collection\"),\n percent_off: z.number().describe(\"A positive float larger than 0, and smaller or equal to 100, that represents the discount percentage the coupon will apply. Required if amount_off is not provided. Cannot be used together with amount_off.\").optional(),\n product_key: z.string().describe(\"The unique product key. Required if coupon_type is set to 'single'\").optional(),\n usage_limit: z.number().int().describe(\"The maximum number of times this coupon can be redeemed before it becomes invalid\").optional(),\n collection_id: z.string().describe(\"The unique collection ID. Required if coupon_type is set to 'collection'\").optional(),\n}).describe(\"Request schema for creating a coupon in Payhip.\");\nconst PayhipCreateCoupon_CouponDataSchema: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon object\"),\n code: z.string().describe(\"The coupon code\"),\n notes: z.string().describe(\"Admin notes\").nullable().optional(),\n end_date: z.string().describe(\"RFC 3339 datetime when coupon expires\").nullable().optional(),\n amount_off: z.number().int().describe(\"Fixed amount discount in cents\").nullable().optional(),\n start_date: z.string().describe(\"RFC 3339 datetime when coupon becomes valid\").nullable().optional(),\n coupon_type: z.string().describe(\"The type of coupon\"),\n percent_off: z.number().describe(\"Percentage discount\").nullable().optional(),\n product_key: z.string().describe(\"Product key if single coupon\").nullable().optional(),\n usage_limit: z.number().int().describe(\"Max redemptions\").nullable().optional(),\n collection_id: z.string().describe(\"Collection ID if collection coupon\").nullable().optional(),\n minimum_purchase_amount: z.number().int().describe(\"Minimum cart total in cents\").nullable().optional(),\n}).describe(\"Coupon data returned after creation.\");\nexport const PayhipCreateCouponOutput: z.ZodTypeAny = z.object({\n data: PayhipCreateCoupon_CouponDataSchema.nullable(),\n}).describe(\"Response schema for coupon creation.\");\n\nexport const payhipCreateCoupon = action(\"PAYHIP_CREATE_COUPON\", {\n slug: \"payhip-create-coupon\",\n name: \"Create Coupon\",\n description: \"Tool to create a coupon for discounts in Payhip. Use when you need to create a new coupon code with either percentage or fixed amount discounts. Coupons can apply to single products, all products, or collections.\",\n input: PayhipCreateCouponInput,\n output: PayhipCreateCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwC,EAAE,OAAO;CAC5D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;CACzF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,6HAA6H,CAAC,CAAC,SAAS;CACnK,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0MAA0M,CAAC,CAAC,SAAS;CAC3P,aAAa,EAAE,KAAK;EAAC;EAAU;EAAS;CAAY,CAAC,CAAC,CAAC,SAAS,wGAAwG;CACxK,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,8MAA8M,CAAC,CAAC,SAAS;CAC1P,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CAChH,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CACrI,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;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7D,MAAM,oCAAoC,SAAS,EACrD,CAAC,CAAC,CAAC,SAAS,sCAOF;AACV,CAAC"}
1
+ {"version":3,"file":"create-coupon.mjs","names":[],"sources":["../../src/actions/create-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipCreateCouponInput = z.object({\n code: z.string().describe(\"The coupon code the customer is required to enter at checkout\"),\n notes: z.string().describe(\"For administrative purposes you can remind yourself why you created this coupon by adding a note - not visible to customers\").optional(),\n amount_off: z.number().int().describe(\"A positive integer representing the amount to subtract from the cart total in cents. For example $5 off would be 500. Required if percent_off is not provided. Cannot be used together with percent_off.\").optional(),\n coupon_type: z.enum([\"single\", \"multi\", \"collection\"]).describe(\"Specifies if the coupon will be applied for a single product, all your products or a single collection\"),\n percent_off: z.number().describe(\"A positive float larger than 0, and smaller or equal to 100, that represents the discount percentage the coupon will apply. Required if amount_off is not provided. Cannot be used together with amount_off.\").optional(),\n product_key: z.string().describe(\"The unique product key. Required if coupon_type is set to 'single'\").optional(),\n usage_limit: z.number().int().describe(\"The maximum number of times this coupon can be redeemed before it becomes invalid\").optional(),\n collection_id: z.string().describe(\"The unique collection ID. Required if coupon_type is set to 'collection'\").optional(),\n}).describe(\"Request schema for creating a coupon in Payhip.\");\nconst PayhipCreateCoupon_CouponDataSchema = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon object\").nullable(),\n code: z.string().describe(\"The coupon code\").nullable(),\n notes: z.string().describe(\"Admin notes\").nullable().optional(),\n end_date: z.string().describe(\"RFC 3339 datetime when coupon expires\").nullable().optional(),\n amount_off: z.number().int().describe(\"Fixed amount discount in cents\").nullable().optional(),\n start_date: z.string().describe(\"RFC 3339 datetime when coupon becomes valid\").nullable().optional(),\n coupon_type: z.string().describe(\"The type of coupon\").nullable(),\n percent_off: z.number().describe(\"Percentage discount\").nullable().optional(),\n product_key: z.string().describe(\"Product key if single coupon\").nullable().optional(),\n usage_limit: z.number().int().describe(\"Max redemptions\").nullable().optional(),\n collection_id: z.string().describe(\"Collection ID if collection coupon\").nullable().optional(),\n minimum_purchase_amount: z.number().int().describe(\"Minimum cart total in cents\").nullable().optional(),\n}).passthrough().describe(\"Coupon data returned after creation.\");\nexport const PayhipCreateCouponOutput = z.object({\n data: PayhipCreateCoupon_CouponDataSchema.nullable(),\n}).passthrough().describe(\"Response schema for coupon creation.\");\n\nexport const payhipCreateCoupon = action(\"PAYHIP_CREATE_COUPON\", {\n slug: \"payhip-create-coupon\",\n name: \"Create Coupon\",\n description: \"Tool to create a coupon for discounts in Payhip. Use when you need to create a new coupon code with either percentage or fixed amount discounts. Coupons can apply to single products, all products, or collections.\",\n input: PayhipCreateCouponInput,\n output: PayhipCreateCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAA0B,EAAE,OAAO;CAC9C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;CACzF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,6HAA6H,CAAC,CAAC,SAAS;CACnK,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0MAA0M,CAAC,CAAC,SAAS;CAC3P,aAAa,EAAE,KAAK;EAAC;EAAU;EAAS;CAAY,CAAC,CAAC,CAAC,SAAS,wGAAwG;CACxK,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,8MAA8M,CAAC,CAAC,SAAS;CAC1P,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CAChH,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CACrI,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;AAC1H,CAAC,CAAC,CAAC,SAAS,iDAAiD;AAC7D,MAAM,sCAAsC,EAAE,OAAO;CACnD,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yCAAyC,CAAC,C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B;AACV,CAAC"}
@@ -10,8 +10,8 @@ const PayhipDeleteCoupon_CouponItemSchema = zod.z.object({
10
10
  coupon_id: zod.z.string().describe("A unique identifier for the coupon.").nullable().optional(),
11
11
  percentage: zod.z.string().describe("The percentage discount.").nullable().optional(),
12
12
  product_id: zod.z.string().describe("The coupon applies to these product IDs.").nullable().optional()
13
- }).describe("Representation of a single coupon in the response.");
14
- const PayhipDeleteCouponOutput = zod.z.object({ coupons: zod.z.array(PayhipDeleteCoupon_CouponItemSchema).describe("List of remaining coupons after the deletion.").nullable().optional() }).describe("Response model for DELETE_COUPON action.\nReturns an array of remaining coupons after deletion.");
13
+ }).passthrough().describe("Representation of a single coupon in the response.");
14
+ const PayhipDeleteCouponOutput = zod.z.object({ coupons: zod.z.array(PayhipDeleteCoupon_CouponItemSchema).describe("List of remaining coupons after the deletion.").nullable().optional() }).passthrough().describe("Response model for DELETE_COUPON action.\nReturns an array of remaining coupons after deletion.");
15
15
  const payhipDeleteCoupon = require_action.action("PAYHIP_DELETE_COUPON", {
16
16
  slug: "payhip-delete-coupon",
17
17
  name: "Delete Coupon",
@@ -1 +1 @@
1
- {"version":3,"file":"delete-coupon.cjs","names":["z","action"],"sources":["../../src/actions/delete-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipDeleteCouponInput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier for the coupon to delete.\"),\n}).describe(\"Request parameters for DELETE_COUPON action.\");\nconst PayhipDeleteCoupon_CouponItemSchema: z.ZodTypeAny = z.object({\n code: z.string().describe(\"The coupon code value.\").nullable().optional(),\n limit: z.number().describe(\"The number of times this coupon can be used.\").nullable().optional(),\n valid: z.string().describe(\"The number of times the coupon has been used.\").nullable().optional(),\n expiry: z.string().describe(\"The expiry date of the coupon.\").nullable().optional(),\n coupon_id: z.string().describe(\"A unique identifier for the coupon.\").nullable().optional(),\n percentage: z.string().describe(\"The percentage discount.\").nullable().optional(),\n product_id: z.string().describe(\"The coupon applies to these product IDs.\").nullable().optional(),\n}).describe(\"Representation of a single coupon in the response.\");\nexport const PayhipDeleteCouponOutput: z.ZodTypeAny = z.object({\n coupons: z.array(PayhipDeleteCoupon_CouponItemSchema).describe(\"List of remaining coupons after the deletion.\").nullable().optional(),\n}).describe(\"Response model for DELETE_COUPON action.\\nReturns an array of remaining coupons after deletion.\");\n\nexport const payhipDeleteCoupon = action(\"PAYHIP_DELETE_COUPON\", {\n slug: \"payhip-delete-coupon\",\n name: \"Delete Coupon\",\n description: \"Tool to delete a coupon by ID. Use when you need to remove a coupon from the Payhip account. Only available in v1 API.\",\n input: PayhipDeleteCouponInput,\n output: PayhipDeleteCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwCA,IAAAA,EAAE,OAAO,EAC5D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,EAC3E,CAAC,CAAC,CAAC,SAAS,8CAA8C;AAC1D,MAAM,sCAAoDA,IAAAA,EAAE,OAAO;CACjE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClF,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAClG,CAAC,CAAC,CAAC,SAAS,oDAAoD;AAChE,MAAa,2BAAyCA,IAAAA,EAAE,OAAO,EAC7D,SAASA,IAAAA,EAAE,MAAM,mCAAmC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EACtI,CAAC,CAAC,CAAC,SAAS,iGAAiG;AAE7G,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"delete-coupon.cjs","names":["z","action"],"sources":["../../src/actions/delete-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipDeleteCouponInput = z.object({\n id: z.string().describe(\"The unique identifier for the coupon to delete.\"),\n}).describe(\"Request parameters for DELETE_COUPON action.\");\nconst PayhipDeleteCoupon_CouponItemSchema = z.object({\n code: z.string().describe(\"The coupon code value.\").nullable().optional(),\n limit: z.number().describe(\"The number of times this coupon can be used.\").nullable().optional(),\n valid: z.string().describe(\"The number of times the coupon has been used.\").nullable().optional(),\n expiry: z.string().describe(\"The expiry date of the coupon.\").nullable().optional(),\n coupon_id: z.string().describe(\"A unique identifier for the coupon.\").nullable().optional(),\n percentage: z.string().describe(\"The percentage discount.\").nullable().optional(),\n product_id: z.string().describe(\"The coupon applies to these product IDs.\").nullable().optional(),\n}).passthrough().describe(\"Representation of a single coupon in the response.\");\nexport const PayhipDeleteCouponOutput = z.object({\n coupons: z.array(PayhipDeleteCoupon_CouponItemSchema).describe(\"List of remaining coupons after the deletion.\").nullable().optional(),\n}).passthrough().describe(\"Response model for DELETE_COUPON action.\\nReturns an array of remaining coupons after deletion.\");\n\nexport const payhipDeleteCoupon = action(\"PAYHIP_DELETE_COUPON\", {\n slug: \"payhip-delete-coupon\",\n name: \"Delete Coupon\",\n description: \"Tool to delete a coupon by ID. Use when you need to remove a coupon from the Payhip account. Only available in v1 API.\",\n input: PayhipDeleteCouponInput,\n output: PayhipDeleteCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAA0BA,IAAAA,EAAE,OAAO,EAC9C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,EAC3E,CAAC,CAAC,CAAC,SAAS,8CAA8C;AAC1D,MAAM,sCAAsCA,IAAAA,EAAE,OAAO;CACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClF,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAClG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oDAAoD;AAC9E,MAAa,2BAA2BA,IAAAA,EAAE,OAAO,EAC/C,SAASA,IAAAA,EAAE,MAAM,mCAAmC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EACtI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iGAAiG;AAE3H,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,23 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/delete-coupon.d.ts
4
- declare const PayhipDeleteCouponInput: z.ZodTypeAny;
5
- declare const PayhipDeleteCouponOutput: z.ZodTypeAny;
6
- declare const payhipDeleteCoupon: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhipDeleteCouponInput: z.ZodObject<{
5
+ id: z.ZodString;
6
+ }, z.core.$strip>;
7
+ declare const PayhipDeleteCouponOutput: z.ZodObject<{
8
+ coupons: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
9
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
11
+ valid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ expiry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ coupon_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ percentage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ }, z.core.$loose>>>>;
17
+ }, z.core.$loose>;
18
+ declare const payhipDeleteCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
19
+ id: string;
20
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
21
  //#endregion
8
22
  export { payhipDeleteCoupon };
9
23
  //# sourceMappingURL=delete-coupon.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-coupon.d.cts","names":[],"sources":["../../src/actions/delete-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UAEmB;AAAA,cAU9C,wBAAA,EAA0B,CAAA,CAAE,UAEqE;AAAA,cAEjG,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"delete-coupon.d.cts","names":[],"sources":["../../src/actions/delete-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;cAYvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;cAIxB,kBAAA,gCAAkB,wBAAA"}
@@ -1,9 +1,23 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/delete-coupon.d.ts
4
- declare const PayhipDeleteCouponInput: z.ZodTypeAny;
5
- declare const PayhipDeleteCouponOutput: z.ZodTypeAny;
6
- declare const payhipDeleteCoupon: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhipDeleteCouponInput: z.ZodObject<{
5
+ id: z.ZodString;
6
+ }, z.core.$strip>;
7
+ declare const PayhipDeleteCouponOutput: z.ZodObject<{
8
+ coupons: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
9
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
11
+ valid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ expiry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ coupon_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ percentage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ }, z.core.$loose>>>>;
17
+ }, z.core.$loose>;
18
+ declare const payhipDeleteCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
19
+ id: string;
20
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
21
  //#endregion
8
22
  export { payhipDeleteCoupon };
9
23
  //# sourceMappingURL=delete-coupon.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-coupon.d.mts","names":[],"sources":["../../src/actions/delete-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UAEmB;AAAA,cAU9C,wBAAA,EAA0B,CAAA,CAAE,UAEqE;AAAA,cAEjG,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"delete-coupon.d.mts","names":[],"sources":["../../src/actions/delete-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;cAYvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;cAIxB,kBAAA,gCAAkB,wBAAA"}
@@ -10,13 +10,13 @@ const PayhipDeleteCoupon_CouponItemSchema = z.object({
10
10
  coupon_id: z.string().describe("A unique identifier for the coupon.").nullable().optional(),
11
11
  percentage: z.string().describe("The percentage discount.").nullable().optional(),
12
12
  product_id: z.string().describe("The coupon applies to these product IDs.").nullable().optional()
13
- }).describe("Representation of a single coupon in the response.");
13
+ }).passthrough().describe("Representation of a single coupon in the response.");
14
14
  const payhipDeleteCoupon = action("PAYHIP_DELETE_COUPON", {
15
15
  slug: "payhip-delete-coupon",
16
16
  name: "Delete Coupon",
17
17
  description: "Tool to delete a coupon by ID. Use when you need to remove a coupon from the Payhip account. Only available in v1 API.",
18
18
  input: PayhipDeleteCouponInput,
19
- output: z.object({ coupons: z.array(PayhipDeleteCoupon_CouponItemSchema).describe("List of remaining coupons after the deletion.").nullable().optional() }).describe("Response model for DELETE_COUPON action.\nReturns an array of remaining coupons after deletion.")
19
+ output: z.object({ coupons: z.array(PayhipDeleteCoupon_CouponItemSchema).describe("List of remaining coupons after the deletion.").nullable().optional() }).passthrough().describe("Response model for DELETE_COUPON action.\nReturns an array of remaining coupons after deletion.")
20
20
  });
21
21
  //#endregion
22
22
  export { payhipDeleteCoupon };
@@ -1 +1 @@
1
- {"version":3,"file":"delete-coupon.mjs","names":[],"sources":["../../src/actions/delete-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipDeleteCouponInput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier for the coupon to delete.\"),\n}).describe(\"Request parameters for DELETE_COUPON action.\");\nconst PayhipDeleteCoupon_CouponItemSchema: z.ZodTypeAny = z.object({\n code: z.string().describe(\"The coupon code value.\").nullable().optional(),\n limit: z.number().describe(\"The number of times this coupon can be used.\").nullable().optional(),\n valid: z.string().describe(\"The number of times the coupon has been used.\").nullable().optional(),\n expiry: z.string().describe(\"The expiry date of the coupon.\").nullable().optional(),\n coupon_id: z.string().describe(\"A unique identifier for the coupon.\").nullable().optional(),\n percentage: z.string().describe(\"The percentage discount.\").nullable().optional(),\n product_id: z.string().describe(\"The coupon applies to these product IDs.\").nullable().optional(),\n}).describe(\"Representation of a single coupon in the response.\");\nexport const PayhipDeleteCouponOutput: z.ZodTypeAny = z.object({\n coupons: z.array(PayhipDeleteCoupon_CouponItemSchema).describe(\"List of remaining coupons after the deletion.\").nullable().optional(),\n}).describe(\"Response model for DELETE_COUPON action.\\nReturns an array of remaining coupons after deletion.\");\n\nexport const payhipDeleteCoupon = action(\"PAYHIP_DELETE_COUPON\", {\n slug: \"payhip-delete-coupon\",\n name: \"Delete Coupon\",\n description: \"Tool to delete a coupon by ID. Use when you need to remove a coupon from the Payhip account. Only available in v1 API.\",\n input: PayhipDeleteCouponInput,\n output: PayhipDeleteCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwC,EAAE,OAAO,EAC5D,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,EAC3E,CAAC,CAAC,CAAC,SAAS,8CAA8C;AAC1D,MAAM,sCAAoD,EAAE,OAAO;CACjE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClF,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAClG,CAAC,CAAC,CAAC,SAAS,oDAAoD;AAKhE,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAToD,EAAE,OAAO,EAC7D,SAAS,EAAE,MAAM,mCAAmC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EACtI,CAAC,CAAC,CAAC,SAAS,iGAOF;AACV,CAAC"}
1
+ {"version":3,"file":"delete-coupon.mjs","names":[],"sources":["../../src/actions/delete-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipDeleteCouponInput = z.object({\n id: z.string().describe(\"The unique identifier for the coupon to delete.\"),\n}).describe(\"Request parameters for DELETE_COUPON action.\");\nconst PayhipDeleteCoupon_CouponItemSchema = z.object({\n code: z.string().describe(\"The coupon code value.\").nullable().optional(),\n limit: z.number().describe(\"The number of times this coupon can be used.\").nullable().optional(),\n valid: z.string().describe(\"The number of times the coupon has been used.\").nullable().optional(),\n expiry: z.string().describe(\"The expiry date of the coupon.\").nullable().optional(),\n coupon_id: z.string().describe(\"A unique identifier for the coupon.\").nullable().optional(),\n percentage: z.string().describe(\"The percentage discount.\").nullable().optional(),\n product_id: z.string().describe(\"The coupon applies to these product IDs.\").nullable().optional(),\n}).passthrough().describe(\"Representation of a single coupon in the response.\");\nexport const PayhipDeleteCouponOutput = z.object({\n coupons: z.array(PayhipDeleteCoupon_CouponItemSchema).describe(\"List of remaining coupons after the deletion.\").nullable().optional(),\n}).passthrough().describe(\"Response model for DELETE_COUPON action.\\nReturns an array of remaining coupons after deletion.\");\n\nexport const payhipDeleteCoupon = action(\"PAYHIP_DELETE_COUPON\", {\n slug: \"payhip-delete-coupon\",\n name: \"Delete Coupon\",\n description: \"Tool to delete a coupon by ID. Use when you need to remove a coupon from the Payhip account. Only available in v1 API.\",\n input: PayhipDeleteCouponInput,\n output: PayhipDeleteCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAA0B,EAAE,OAAO,EAC9C,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,EAC3E,CAAC,CAAC,CAAC,SAAS,8CAA8C;AAC1D,MAAM,sCAAsC,EAAE,OAAO;CACnD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClF,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAClG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oDAAoD;AAK9E,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATsC,EAAE,OAAO,EAC/C,SAAS,EAAE,MAAM,mCAAmC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EACtI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iGAOhB;AACV,CAAC"}
@@ -3,20 +3,20 @@ let zod = require("zod");
3
3
  //#region src/actions/get-coupon.ts
4
4
  const PayhipGetCouponInput = zod.z.object({ id: zod.z.number().int().describe("Unique identifier for the coupon object") }).describe("Request model for retrieving a coupon by its ID.");
5
5
  const PayhipGetCoupon_CouponDataSchema = zod.z.object({
6
- id: zod.z.number().int().describe("Unique identifier for the coupon"),
7
- code: zod.z.string().describe("Coupon code string"),
6
+ id: zod.z.number().int().describe("Unique identifier for the coupon").nullable(),
7
+ code: zod.z.string().describe("Coupon code string").nullable(),
8
8
  notes: zod.z.string().describe("Optional notes about the coupon").nullable().optional(),
9
9
  end_date: zod.z.string().describe("End date for coupon validity (ISO 8601 format)").nullable().optional(),
10
10
  amount_off: zod.z.number().int().describe("Fixed amount off in cents, if applicable").nullable().optional(),
11
11
  start_date: zod.z.string().describe("Start date for coupon validity (ISO 8601 format)").nullable().optional(),
12
- coupon_type: zod.z.string().describe("Type of coupon (e.g., 'percent_off', 'amount_off')"),
12
+ coupon_type: zod.z.string().describe("Type of coupon (e.g., 'percent_off', 'amount_off')").nullable(),
13
13
  percent_off: zod.z.number().describe("Percentage discount, if applicable").nullable().optional(),
14
14
  product_key: zod.z.string().describe("Product key this coupon applies to, if product-specific").nullable().optional(),
15
15
  usage_limit: zod.z.number().int().describe("Maximum number of times this coupon can be used").nullable().optional(),
16
16
  collection_id: zod.z.string().describe("Collection ID this coupon applies to, if collection-specific").nullable().optional(),
17
17
  minimum_purchase_amount: zod.z.number().int().describe("Minimum purchase amount in cents required to use this coupon").nullable().optional()
18
- }).describe("Coupon object with its properties.");
19
- const PayhipGetCouponOutput = zod.z.object({ data: PayhipGetCoupon_CouponDataSchema.nullable() }).describe("Response model containing the coupon data.");
18
+ }).passthrough().describe("Coupon object with its properties.");
19
+ const PayhipGetCouponOutput = zod.z.object({ data: PayhipGetCoupon_CouponDataSchema.nullable() }).passthrough().describe("Response model containing the coupon data.");
20
20
  const payhipGetCoupon = require_action.action("PAYHIP_GET_COUPON", {
21
21
  slug: "payhip-get-coupon",
22
22
  name: "Get Coupon",
@@ -1 +1 @@
1
- {"version":3,"file":"get-coupon.cjs","names":["z","action"],"sources":["../../src/actions/get-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipGetCouponInput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon object\"),\n}).describe(\"Request model for retrieving a coupon by its ID.\");\nconst PayhipGetCoupon_CouponDataSchema: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon\"),\n code: z.string().describe(\"Coupon code string\"),\n notes: z.string().describe(\"Optional notes about the coupon\").nullable().optional(),\n end_date: z.string().describe(\"End date for coupon validity (ISO 8601 format)\").nullable().optional(),\n amount_off: z.number().int().describe(\"Fixed amount off in cents, if applicable\").nullable().optional(),\n start_date: z.string().describe(\"Start date for coupon validity (ISO 8601 format)\").nullable().optional(),\n coupon_type: z.string().describe(\"Type of coupon (e.g., 'percent_off', 'amount_off')\"),\n percent_off: z.number().describe(\"Percentage discount, if applicable\").nullable().optional(),\n product_key: z.string().describe(\"Product key this coupon applies to, if product-specific\").nullable().optional(),\n usage_limit: z.number().int().describe(\"Maximum number of times this coupon can be used\").nullable().optional(),\n collection_id: z.string().describe(\"Collection ID this coupon applies to, if collection-specific\").nullable().optional(),\n minimum_purchase_amount: z.number().int().describe(\"Minimum purchase amount in cents required to use this coupon\").nullable().optional(),\n}).describe(\"Coupon object with its properties.\");\nexport const PayhipGetCouponOutput: z.ZodTypeAny = z.object({\n data: PayhipGetCoupon_CouponDataSchema.nullable(),\n}).describe(\"Response model containing the coupon data.\");\n\nexport const payhipGetCoupon = action(\"PAYHIP_GET_COUPON\", {\n slug: \"payhip-get-coupon\",\n name: \"Get Coupon\",\n description: \"Tool to retrieve a coupon with the given ID. Use when you need to fetch details about a specific coupon from Payhip.\",\n input: PayhipGetCouponInput,\n output: PayhipGetCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uBAAqCA,IAAAA,EAAE,OAAO,EACzD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yCAAyC,EACzE,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAC9D,MAAM,mCAAiDA,IAAAA,EAAE,OAAO;CAC9D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC;CAChE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB;CAC9C,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClF,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpG,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtG,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD;CACrF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3F,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChH,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9G,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvH,yBAAyBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACzI,CAAC,CAAC,CAAC,SAAS,oCAAoC;AAChD,MAAa,wBAAsCA,IAAAA,EAAE,OAAO,EAC1D,MAAM,iCAAiC,SAAS,EAClD,CAAC,CAAC,CAAC,SAAS,4CAA4C;AAExD,MAAa,kBAAkBC,eAAAA,OAAO,qBAAqB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"get-coupon.cjs","names":["z","action"],"sources":["../../src/actions/get-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipGetCouponInput = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon object\"),\n}).describe(\"Request model for retrieving a coupon by its ID.\");\nconst PayhipGetCoupon_CouponDataSchema = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon\").nullable(),\n code: z.string().describe(\"Coupon code string\").nullable(),\n notes: z.string().describe(\"Optional notes about the coupon\").nullable().optional(),\n end_date: z.string().describe(\"End date for coupon validity (ISO 8601 format)\").nullable().optional(),\n amount_off: z.number().int().describe(\"Fixed amount off in cents, if applicable\").nullable().optional(),\n start_date: z.string().describe(\"Start date for coupon validity (ISO 8601 format)\").nullable().optional(),\n coupon_type: z.string().describe(\"Type of coupon (e.g., 'percent_off', 'amount_off')\").nullable(),\n percent_off: z.number().describe(\"Percentage discount, if applicable\").nullable().optional(),\n product_key: z.string().describe(\"Product key this coupon applies to, if product-specific\").nullable().optional(),\n usage_limit: z.number().int().describe(\"Maximum number of times this coupon can be used\").nullable().optional(),\n collection_id: z.string().describe(\"Collection ID this coupon applies to, if collection-specific\").nullable().optional(),\n minimum_purchase_amount: z.number().int().describe(\"Minimum purchase amount in cents required to use this coupon\").nullable().optional(),\n}).passthrough().describe(\"Coupon object with its properties.\");\nexport const PayhipGetCouponOutput = z.object({\n data: PayhipGetCoupon_CouponDataSchema.nullable(),\n}).passthrough().describe(\"Response model containing the coupon data.\");\n\nexport const payhipGetCoupon = action(\"PAYHIP_GET_COUPON\", {\n slug: \"payhip-get-coupon\",\n name: \"Get Coupon\",\n description: \"Tool to retrieve a coupon with the given ID. Use when you need to fetch details about a specific coupon from Payhip.\",\n input: PayhipGetCouponInput,\n output: PayhipGetCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uBAAuBA,IAAAA,EAAE,OAAO,EAC3C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yCAAyC,EACzE,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAC9D,MAAM,mCAAmCA,IAAAA,EAAE,OAAO;CAChD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CAC3E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CACzD,OAAOA,IAAAA,EAAE,OAAO,CAAC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AAQ;AACV,CAAC"}
@@ -1,9 +1,28 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/get-coupon.d.ts
4
- declare const PayhipGetCouponInput: z.ZodTypeAny;
5
- declare const PayhipGetCouponOutput: z.ZodTypeAny;
6
- declare const payhipGetCoupon: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhipGetCouponInput: z.ZodObject<{
5
+ id: z.ZodNumber;
6
+ }, z.core.$strip>;
7
+ declare const PayhipGetCouponOutput: z.ZodObject<{
8
+ data: z.ZodNullable<z.ZodObject<{
9
+ id: z.ZodNullable<z.ZodNumber>;
10
+ code: z.ZodNullable<z.ZodString>;
11
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ end_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ amount_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
14
+ start_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ coupon_type: z.ZodNullable<z.ZodString>;
16
+ percent_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
17
+ product_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ usage_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
19
+ collection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
21
+ }, z.core.$loose>>;
22
+ }, z.core.$loose>;
23
+ declare const payhipGetCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
24
+ id: number;
25
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
26
  //#endregion
8
27
  export { payhipGetCoupon };
9
28
  //# sourceMappingURL=get-coupon.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-coupon.d.cts","names":[],"sources":["../../src/actions/get-coupon.ts"],"mappings":";;;cAIa,oBAAA,EAAsB,CAAA,CAAE,UAE0B;AAAA,cAelD,qBAAA,EAAuB,CAAA,CAAE,UAEmB;AAAA,cAE5C,eAAA,gCAAe,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"get-coupon.d.cts","names":[],"sources":["../../src/actions/get-coupon.ts"],"mappings":";;;cAIa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;cAiBpB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;cAIrB,eAAA,gCAAe,wBAAA"}
@@ -1,9 +1,28 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/get-coupon.d.ts
4
- declare const PayhipGetCouponInput: z.ZodTypeAny;
5
- declare const PayhipGetCouponOutput: z.ZodTypeAny;
6
- declare const payhipGetCoupon: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhipGetCouponInput: z.ZodObject<{
5
+ id: z.ZodNumber;
6
+ }, z.core.$strip>;
7
+ declare const PayhipGetCouponOutput: z.ZodObject<{
8
+ data: z.ZodNullable<z.ZodObject<{
9
+ id: z.ZodNullable<z.ZodNumber>;
10
+ code: z.ZodNullable<z.ZodString>;
11
+ notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ end_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ amount_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
14
+ start_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ coupon_type: z.ZodNullable<z.ZodString>;
16
+ percent_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
17
+ product_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ usage_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
19
+ collection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
21
+ }, z.core.$loose>>;
22
+ }, z.core.$loose>;
23
+ declare const payhipGetCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
24
+ id: number;
25
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
26
  //#endregion
8
27
  export { payhipGetCoupon };
9
28
  //# sourceMappingURL=get-coupon.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-coupon.d.mts","names":[],"sources":["../../src/actions/get-coupon.ts"],"mappings":";;;cAIa,oBAAA,EAAsB,CAAA,CAAE,UAE0B;AAAA,cAelD,qBAAA,EAAuB,CAAA,CAAE,UAEmB;AAAA,cAE5C,eAAA,gCAAe,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"get-coupon.d.mts","names":[],"sources":["../../src/actions/get-coupon.ts"],"mappings":";;;cAIa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;cAiBpB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;cAIrB,eAAA,gCAAe,wBAAA"}
@@ -3,25 +3,25 @@ import { z } from "zod";
3
3
  //#region src/actions/get-coupon.ts
4
4
  const PayhipGetCouponInput = z.object({ id: z.number().int().describe("Unique identifier for the coupon object") }).describe("Request model for retrieving a coupon by its ID.");
5
5
  const PayhipGetCoupon_CouponDataSchema = z.object({
6
- id: z.number().int().describe("Unique identifier for the coupon"),
7
- code: z.string().describe("Coupon code string"),
6
+ id: z.number().int().describe("Unique identifier for the coupon").nullable(),
7
+ code: z.string().describe("Coupon code string").nullable(),
8
8
  notes: z.string().describe("Optional notes about the coupon").nullable().optional(),
9
9
  end_date: z.string().describe("End date for coupon validity (ISO 8601 format)").nullable().optional(),
10
10
  amount_off: z.number().int().describe("Fixed amount off in cents, if applicable").nullable().optional(),
11
11
  start_date: z.string().describe("Start date for coupon validity (ISO 8601 format)").nullable().optional(),
12
- coupon_type: z.string().describe("Type of coupon (e.g., 'percent_off', 'amount_off')"),
12
+ coupon_type: z.string().describe("Type of coupon (e.g., 'percent_off', 'amount_off')").nullable(),
13
13
  percent_off: z.number().describe("Percentage discount, if applicable").nullable().optional(),
14
14
  product_key: z.string().describe("Product key this coupon applies to, if product-specific").nullable().optional(),
15
15
  usage_limit: z.number().int().describe("Maximum number of times this coupon can be used").nullable().optional(),
16
16
  collection_id: z.string().describe("Collection ID this coupon applies to, if collection-specific").nullable().optional(),
17
17
  minimum_purchase_amount: z.number().int().describe("Minimum purchase amount in cents required to use this coupon").nullable().optional()
18
- }).describe("Coupon object with its properties.");
18
+ }).passthrough().describe("Coupon object with its properties.");
19
19
  const payhipGetCoupon = action("PAYHIP_GET_COUPON", {
20
20
  slug: "payhip-get-coupon",
21
21
  name: "Get Coupon",
22
22
  description: "Tool to retrieve a coupon with the given ID. Use when you need to fetch details about a specific coupon from Payhip.",
23
23
  input: PayhipGetCouponInput,
24
- output: z.object({ data: PayhipGetCoupon_CouponDataSchema.nullable() }).describe("Response model containing the coupon data.")
24
+ output: z.object({ data: PayhipGetCoupon_CouponDataSchema.nullable() }).passthrough().describe("Response model containing the coupon data.")
25
25
  });
26
26
  //#endregion
27
27
  export { payhipGetCoupon };
@@ -1 +1 @@
1
- {"version":3,"file":"get-coupon.mjs","names":[],"sources":["../../src/actions/get-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipGetCouponInput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon object\"),\n}).describe(\"Request model for retrieving a coupon by its ID.\");\nconst PayhipGetCoupon_CouponDataSchema: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon\"),\n code: z.string().describe(\"Coupon code string\"),\n notes: z.string().describe(\"Optional notes about the coupon\").nullable().optional(),\n end_date: z.string().describe(\"End date for coupon validity (ISO 8601 format)\").nullable().optional(),\n amount_off: z.number().int().describe(\"Fixed amount off in cents, if applicable\").nullable().optional(),\n start_date: z.string().describe(\"Start date for coupon validity (ISO 8601 format)\").nullable().optional(),\n coupon_type: z.string().describe(\"Type of coupon (e.g., 'percent_off', 'amount_off')\"),\n percent_off: z.number().describe(\"Percentage discount, if applicable\").nullable().optional(),\n product_key: z.string().describe(\"Product key this coupon applies to, if product-specific\").nullable().optional(),\n usage_limit: z.number().int().describe(\"Maximum number of times this coupon can be used\").nullable().optional(),\n collection_id: z.string().describe(\"Collection ID this coupon applies to, if collection-specific\").nullable().optional(),\n minimum_purchase_amount: z.number().int().describe(\"Minimum purchase amount in cents required to use this coupon\").nullable().optional(),\n}).describe(\"Coupon object with its properties.\");\nexport const PayhipGetCouponOutput: z.ZodTypeAny = z.object({\n data: PayhipGetCoupon_CouponDataSchema.nullable(),\n}).describe(\"Response model containing the coupon data.\");\n\nexport const payhipGetCoupon = action(\"PAYHIP_GET_COUPON\", {\n slug: \"payhip-get-coupon\",\n name: \"Get Coupon\",\n description: \"Tool to retrieve a coupon with the given ID. Use when you need to fetch details about a specific coupon from Payhip.\",\n input: PayhipGetCouponInput,\n output: PayhipGetCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uBAAqC,EAAE,OAAO,EACzD,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yCAAyC,EACzE,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAC9D,MAAM,mCAAiD,EAAE,OAAO;CAC9D,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC;CAChE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB;CAC9C,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpG,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtG,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD;CACrF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3F,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChH,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9G,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvH,yBAAyB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACzI,CAAC,CAAC,CAAC,SAAS,oCAAoC;AAKhD,MAAa,kBAAkB,OAAO,qBAAqB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATiD,EAAE,OAAO,EAC1D,MAAM,iCAAiC,SAAS,EAClD,CAAC,CAAC,CAAC,SAAS,4CAOF;AACV,CAAC"}
1
+ {"version":3,"file":"get-coupon.mjs","names":[],"sources":["../../src/actions/get-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipGetCouponInput = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon object\"),\n}).describe(\"Request model for retrieving a coupon by its ID.\");\nconst PayhipGetCoupon_CouponDataSchema = z.object({\n id: z.number().int().describe(\"Unique identifier for the coupon\").nullable(),\n code: z.string().describe(\"Coupon code string\").nullable(),\n notes: z.string().describe(\"Optional notes about the coupon\").nullable().optional(),\n end_date: z.string().describe(\"End date for coupon validity (ISO 8601 format)\").nullable().optional(),\n amount_off: z.number().int().describe(\"Fixed amount off in cents, if applicable\").nullable().optional(),\n start_date: z.string().describe(\"Start date for coupon validity (ISO 8601 format)\").nullable().optional(),\n coupon_type: z.string().describe(\"Type of coupon (e.g., 'percent_off', 'amount_off')\").nullable(),\n percent_off: z.number().describe(\"Percentage discount, if applicable\").nullable().optional(),\n product_key: z.string().describe(\"Product key this coupon applies to, if product-specific\").nullable().optional(),\n usage_limit: z.number().int().describe(\"Maximum number of times this coupon can be used\").nullable().optional(),\n collection_id: z.string().describe(\"Collection ID this coupon applies to, if collection-specific\").nullable().optional(),\n minimum_purchase_amount: z.number().int().describe(\"Minimum purchase amount in cents required to use this coupon\").nullable().optional(),\n}).passthrough().describe(\"Coupon object with its properties.\");\nexport const PayhipGetCouponOutput = z.object({\n data: PayhipGetCoupon_CouponDataSchema.nullable(),\n}).passthrough().describe(\"Response model containing the coupon data.\");\n\nexport const payhipGetCoupon = action(\"PAYHIP_GET_COUPON\", {\n slug: \"payhip-get-coupon\",\n name: \"Get Coupon\",\n description: \"Tool to retrieve a coupon with the given ID. Use when you need to fetch details about a specific coupon from Payhip.\",\n input: PayhipGetCouponInput,\n output: PayhipGetCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uBAAuB,EAAE,OAAO,EAC3C,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yCAAyC,EACzE,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAC9D,MAAM,mCAAmC,EAAE,OAAO;CAChD,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CAC3E,MA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8 +18,8 @@ const PayhipUpdateCoupon_CouponDataSchema = zod.z.object({
18
18
  percentage: zod.z.string().describe("The percentage discount.").nullable().optional(),
19
19
  product_id: zod.z.string().describe("The product id the coupon applies to. Null is returned if it applies to all products.").nullable().optional(),
20
20
  product_name: zod.z.string().describe("The product the coupon applies to. All is returned if it applies to all products.").nullable().optional()
21
- }).describe("Coupon data returned in the response.");
22
- const PayhipUpdateCouponOutput = zod.z.object({ items: zod.z.array(PayhipUpdateCoupon_CouponDataSchema).describe("An array of coupons.").nullable().optional() }).describe("Response model for updating a Payhip coupon.");
21
+ }).passthrough().describe("Coupon data returned in the response.");
22
+ const PayhipUpdateCouponOutput = zod.z.object({ items: zod.z.array(PayhipUpdateCoupon_CouponDataSchema).describe("An array of coupons.").nullable().optional() }).passthrough().describe("Response model for updating a Payhip coupon.");
23
23
  const payhipUpdateCoupon = require_action.action("PAYHIP_UPDATE_COUPON", {
24
24
  slug: "payhip-update-coupon",
25
25
  name: "Update Coupon",