@keystrokehq/payhip 0.1.0 → 0.1.2

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 (75) 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 +3 -3
  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 +3 -3
  10. package/dist/actions/create-coupon.mjs.map +1 -1
  11. package/dist/actions/delete-coupon.cjs.map +1 -1
  12. package/dist/actions/delete-coupon.d.cts +17 -3
  13. package/dist/actions/delete-coupon.d.cts.map +1 -1
  14. package/dist/actions/delete-coupon.d.mts +17 -3
  15. package/dist/actions/delete-coupon.d.mts.map +1 -1
  16. package/dist/actions/delete-coupon.mjs.map +1 -1
  17. package/dist/actions/get-coupon.cjs +3 -3
  18. package/dist/actions/get-coupon.cjs.map +1 -1
  19. package/dist/actions/get-coupon.d.cts +22 -3
  20. package/dist/actions/get-coupon.d.cts.map +1 -1
  21. package/dist/actions/get-coupon.d.mts +22 -3
  22. package/dist/actions/get-coupon.d.mts.map +1 -1
  23. package/dist/actions/get-coupon.mjs +3 -3
  24. package/dist/actions/get-coupon.mjs.map +1 -1
  25. package/dist/actions/update-coupon.cjs.map +1 -1
  26. package/dist/actions/update-coupon.d.cts +28 -3
  27. package/dist/actions/update-coupon.d.cts.map +1 -1
  28. package/dist/actions/update-coupon.d.mts +28 -3
  29. package/dist/actions/update-coupon.d.mts.map +1 -1
  30. package/dist/actions/update-coupon.mjs.map +1 -1
  31. package/dist/actions/verify-coupon.cjs.map +1 -1
  32. package/dist/actions/verify-coupon.d.cts +20 -3
  33. package/dist/actions/verify-coupon.d.cts.map +1 -1
  34. package/dist/actions/verify-coupon.d.mts +20 -3
  35. package/dist/actions/verify-coupon.d.mts.map +1 -1
  36. package/dist/actions/verify-coupon.mjs.map +1 -1
  37. package/dist/actions/webhook-event-paid.cjs +25 -25
  38. package/dist/actions/webhook-event-paid.cjs.map +1 -1
  39. package/dist/actions/webhook-event-paid.d.cts +96 -3
  40. package/dist/actions/webhook-event-paid.d.cts.map +1 -1
  41. package/dist/actions/webhook-event-paid.d.mts +96 -3
  42. package/dist/actions/webhook-event-paid.d.mts.map +1 -1
  43. package/dist/actions/webhook-event-paid.mjs +25 -25
  44. package/dist/actions/webhook-event-paid.mjs.map +1 -1
  45. package/dist/actions/webhook-event-refunded.cjs +28 -28
  46. package/dist/actions/webhook-event-refunded.cjs.map +1 -1
  47. package/dist/actions/webhook-event-refunded.d.cts +96 -3
  48. package/dist/actions/webhook-event-refunded.d.cts.map +1 -1
  49. package/dist/actions/webhook-event-refunded.d.mts +96 -3
  50. package/dist/actions/webhook-event-refunded.d.mts.map +1 -1
  51. package/dist/actions/webhook-event-refunded.mjs +28 -28
  52. package/dist/actions/webhook-event-refunded.mjs.map +1 -1
  53. package/dist/actions/webhook-event-subscription-created.cjs +12 -12
  54. package/dist/actions/webhook-event-subscription-created.cjs.map +1 -1
  55. package/dist/actions/webhook-event-subscription-created.d.cts +51 -3
  56. package/dist/actions/webhook-event-subscription-created.d.cts.map +1 -1
  57. package/dist/actions/webhook-event-subscription-created.d.mts +51 -3
  58. package/dist/actions/webhook-event-subscription-created.d.mts.map +1 -1
  59. package/dist/actions/webhook-event-subscription-created.mjs +12 -12
  60. package/dist/actions/webhook-event-subscription-created.mjs.map +1 -1
  61. package/dist/actions/webhook-event-subscription-deleted.cjs +14 -14
  62. package/dist/actions/webhook-event-subscription-deleted.cjs.map +1 -1
  63. package/dist/actions/webhook-event-subscription-deleted.d.cts +54 -3
  64. package/dist/actions/webhook-event-subscription-deleted.d.cts.map +1 -1
  65. package/dist/actions/webhook-event-subscription-deleted.d.mts +54 -3
  66. package/dist/actions/webhook-event-subscription-deleted.d.mts.map +1 -1
  67. package/dist/actions/webhook-event-subscription-deleted.mjs +14 -14
  68. package/dist/actions/webhook-event-subscription-deleted.mjs.map +1 -1
  69. package/dist/catalog.cjs +7 -1
  70. package/dist/catalog.cjs.map +1 -1
  71. package/dist/catalog.d.cts +8 -0
  72. package/dist/catalog.d.mts +8 -0
  73. package/dist/catalog.mjs +7 -1
  74. package/dist/catalog.mjs.map +1 -1
  75. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"update-coupon.mjs","names":[],"sources":["../../src/actions/update-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipUpdateCouponInput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier for the coupon.\"),\n code: z.string().describe(\"The code for the coupon.\").optional(),\n limit: z.string().describe(\"The maximum limit for the coupon usage.\").optional(),\n expiry: z.string().describe(\"The expiry of the coupon in a timestamp format.\").optional(),\n percentage: z.string().describe(\"The percentage discount for the coupon.\").optional(),\n product_id: z.string().describe(\"The product ID if coupon is specific to a product.\").optional(),\n}).describe(\"Request model for updating a Payhip coupon.\");\nconst PayhipUpdateCoupon_CouponDataSchema: z.ZodTypeAny = z.object({\n code: z.string().describe(\"The coupon value.\").nullable().optional(),\n limit: z.number().describe(\"The number of times this coupon can be used.\").nullable().optional(),\n usage: z.string().describe(\"The number of times the coupon has been used.\").nullable().optional(),\n expiry: z.string().describe(\"The date of the order.\").nullable().optional(),\n coupon_id: z.string().describe(\"A unique identifier for a coupon.\").nullable().optional(),\n percentage: z.string().describe(\"The percentage discount.\").nullable().optional(),\n product_id: z.string().describe(\"The product id the coupon applies to. Null is returned if it applies to all products.\").nullable().optional(),\n product_name: z.string().describe(\"The product the coupon applies to. All is returned if it applies to all products.\").nullable().optional(),\n}).describe(\"Coupon data returned in the response.\");\nexport const PayhipUpdateCouponOutput: z.ZodTypeAny = z.object({\n items: z.array(PayhipUpdateCoupon_CouponDataSchema).describe(\"An array of coupons.\").nullable().optional(),\n}).describe(\"Response model for updating a Payhip coupon.\");\n\nexport const payhipUpdateCoupon = action(\"PAYHIP_UPDATE_COUPON\", {\n slug: \"payhip-update-coupon\",\n name: \"Update Coupon\",\n description: \"Tool to edit an existing coupon in Payhip. Use when you need to modify coupon details like code, percentage, expiry, or usage limit. Only available in v1 API.\",\n input: PayhipUpdateCouponInput,\n output: PayhipUpdateCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwC,EAAE,OAAO;CAC5D,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;CAC/D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC/D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;CACxF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CACpF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;AACjG,CAAC,CAAC,CAAC,SAAS,6CAA6C;AACzD,MAAM,sCAAoD,EAAE,OAAO;CACjE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnE,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,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7I,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7I,CAAC,CAAC,CAAC,SAAS,uCAAuC;AAKnD,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAToD,EAAE,OAAO,EAC7D,OAAO,EAAE,MAAM,mCAAmC,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EAC3G,CAAC,CAAC,CAAC,SAAS,8CAOF;AACV,CAAC"}
1
+ {"version":3,"file":"update-coupon.mjs","names":[],"sources":["../../src/actions/update-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipUpdateCouponInput = z.object({\n id: z.string().describe(\"The unique identifier for the coupon.\"),\n code: z.string().describe(\"The code for the coupon.\").optional(),\n limit: z.string().describe(\"The maximum limit for the coupon usage.\").optional(),\n expiry: z.string().describe(\"The expiry of the coupon in a timestamp format.\").optional(),\n percentage: z.string().describe(\"The percentage discount for the coupon.\").optional(),\n product_id: z.string().describe(\"The product ID if coupon is specific to a product.\").optional(),\n}).describe(\"Request model for updating a Payhip coupon.\");\nconst PayhipUpdateCoupon_CouponDataSchema = z.object({\n code: z.string().describe(\"The coupon value.\").nullable().optional(),\n limit: z.number().describe(\"The number of times this coupon can be used.\").nullable().optional(),\n usage: z.string().describe(\"The number of times the coupon has been used.\").nullable().optional(),\n expiry: z.string().describe(\"The date of the order.\").nullable().optional(),\n coupon_id: z.string().describe(\"A unique identifier for a coupon.\").nullable().optional(),\n percentage: z.string().describe(\"The percentage discount.\").nullable().optional(),\n product_id: z.string().describe(\"The product id the coupon applies to. Null is returned if it applies to all products.\").nullable().optional(),\n product_name: z.string().describe(\"The product the coupon applies to. All is returned if it applies to all products.\").nullable().optional(),\n}).describe(\"Coupon data returned in the response.\");\nexport const PayhipUpdateCouponOutput = z.object({\n items: z.array(PayhipUpdateCoupon_CouponDataSchema).describe(\"An array of coupons.\").nullable().optional(),\n}).describe(\"Response model for updating a Payhip coupon.\");\n\nexport const payhipUpdateCoupon = action(\"PAYHIP_UPDATE_COUPON\", {\n slug: \"payhip-update-coupon\",\n name: \"Update Coupon\",\n description: \"Tool to edit an existing coupon in Payhip. Use when you need to modify coupon details like code, percentage, expiry, or usage limit. Only available in v1 API.\",\n input: PayhipUpdateCouponInput,\n output: PayhipUpdateCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAA0B,EAAE,OAAO;CAC9C,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;CAC/D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC/D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;CACxF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CACpF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;AACjG,CAAC,CAAC,CAAC,SAAS,6CAA6C;AACzD,MAAM,sCAAsC,EAAE,OAAO;CACnD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnE,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,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7I,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7I,CAAC,CAAC,CAAC,SAAS,uCAAuC;AAKnD,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATsC,EAAE,OAAO,EAC/C,OAAO,EAAE,MAAM,mCAAmC,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EAC3G,CAAC,CAAC,CAAC,SAAS,8CAOF;AACV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"verify-coupon.cjs","names":["z","action"],"sources":["../../src/actions/verify-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipVerifyCouponInput: z.ZodTypeAny = z.object({\n code: z.string().describe(\"The coupon code to verify.\"),\n}).describe(\"Request model for verifying a Payhip coupon code.\");\nconst PayhipVerifyCoupon_CouponDetailsSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"A unique identifier for a coupon.\").nullable().optional(),\n code: z.string().describe(\"The coupon code.\").nullable().optional(),\n type: z.string().describe(\"The type of coupon (e.g., 'multi', 'single', 'collection').\").nullable().optional(),\n limit: z.union([z.number().int(), z.number(), z.string()]).nullable().optional(),\n usage: 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 has_expiry: z.boolean().describe(\"Whether the coupon has an expiry date.\").nullable().optional(),\n percentage: z.union([z.number().int(), z.number(), z.string()]).nullable().optional(),\n product_id: z.string().describe(\"The product id the coupon applies to. Null is returned if it applies to all products.\").nullable().optional(),\n product_name: z.string().describe(\"The product the coupon applies to. All is returned if it applies to all products.\").nullable().optional(),\n}).describe(\"Details of a verified coupon.\");\nexport const PayhipVerifyCouponOutput: z.ZodTypeAny = z.object({\n coupons: z.array(PayhipVerifyCoupon_CouponDetailsSchema).describe(\"An array of verified coupon details.\"),\n}).describe(\"Response model for verifying a Payhip coupon code.\");\n\nexport const payhipVerifyCoupon = action(\"PAYHIP_VERIFY_COUPON\", {\n slug: \"payhip-verify-coupon\",\n name: \"Verify Coupon\",\n description: \"Tool to verify a Payhip coupon code. Use when you need to check if a coupon code is valid and retrieve its details. Only available in v1 API.\",\n input: PayhipVerifyCouponInput,\n output: PayhipVerifyCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwCA,IAAAA,EAAE,OAAO,EAC5D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,EACxD,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAC/D,MAAM,yCAAuDA,IAAAA,EAAE,OAAO;CACpE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7G,OAAOA,IAAAA,EAAE,MAAM;EAACA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI;EAAGA,IAAAA,EAAE,OAAO;EAAGA,IAAAA,EAAE,OAAO;CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/E,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,YAAYA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,YAAYA,IAAAA,EAAE,MAAM;EAACA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI;EAAGA,IAAAA,EAAE,OAAO;EAAGA,IAAAA,EAAE,OAAO;CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7I,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7I,CAAC,CAAC,CAAC,SAAS,+BAA+B;AAC3C,MAAa,2BAAyCA,IAAAA,EAAE,OAAO,EAC7D,SAASA,IAAAA,EAAE,MAAM,sCAAsC,CAAC,CAAC,SAAS,sCAAsC,EAC1G,CAAC,CAAC,CAAC,SAAS,oDAAoD;AAEhE,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"verify-coupon.cjs","names":["z","action"],"sources":["../../src/actions/verify-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipVerifyCouponInput = z.object({\n code: z.string().describe(\"The coupon code to verify.\"),\n}).describe(\"Request model for verifying a Payhip coupon code.\");\nconst PayhipVerifyCoupon_CouponDetailsSchema = z.object({\n id: z.string().describe(\"A unique identifier for a coupon.\").nullable().optional(),\n code: z.string().describe(\"The coupon code.\").nullable().optional(),\n type: z.string().describe(\"The type of coupon (e.g., 'multi', 'single', 'collection').\").nullable().optional(),\n limit: z.union([z.number().int(), z.number(), z.string()]).nullable().optional(),\n usage: 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 has_expiry: z.boolean().describe(\"Whether the coupon has an expiry date.\").nullable().optional(),\n percentage: z.union([z.number().int(), z.number(), z.string()]).nullable().optional(),\n product_id: z.string().describe(\"The product id the coupon applies to. Null is returned if it applies to all products.\").nullable().optional(),\n product_name: z.string().describe(\"The product the coupon applies to. All is returned if it applies to all products.\").nullable().optional(),\n}).describe(\"Details of a verified coupon.\");\nexport const PayhipVerifyCouponOutput = z.object({\n coupons: z.array(PayhipVerifyCoupon_CouponDetailsSchema).describe(\"An array of verified coupon details.\"),\n}).describe(\"Response model for verifying a Payhip coupon code.\");\n\nexport const payhipVerifyCoupon = action(\"PAYHIP_VERIFY_COUPON\", {\n slug: \"payhip-verify-coupon\",\n name: \"Verify Coupon\",\n description: \"Tool to verify a Payhip coupon code. Use when you need to check if a coupon code is valid and retrieve its details. Only available in v1 API.\",\n input: PayhipVerifyCouponInput,\n output: PayhipVerifyCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAA0BA,IAAAA,EAAE,OAAO,EAC9C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,EACxD,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAC/D,MAAM,yCAAyCA,IAAAA,EAAE,OAAO;CACtD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SA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AM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,26 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/verify-coupon.d.ts
4
- declare const PayhipVerifyCouponInput: z.ZodTypeAny;
5
- declare const PayhipVerifyCouponOutput: z.ZodTypeAny;
6
- declare const payhipVerifyCoupon: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhipVerifyCouponInput: z.ZodObject<{
5
+ code: z.ZodString;
6
+ }, z.core.$strip>;
7
+ declare const PayhipVerifyCouponOutput: z.ZodObject<{
8
+ coupons: z.ZodArray<z.ZodObject<{
9
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ limit: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodNumber, z.ZodString]>>>;
13
+ usage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ expiry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ has_expiry: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
16
+ percentage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodNumber, z.ZodString]>>>;
17
+ product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ product_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ }, z.core.$strip>>;
20
+ }, z.core.$strip>;
21
+ declare const payhipVerifyCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
22
+ code: string;
23
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
24
  //#endregion
8
25
  export { payhipVerifyCoupon };
9
26
  //# sourceMappingURL=verify-coupon.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify-coupon.d.cts","names":[],"sources":["../../src/actions/verify-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UAEwB;AAAA,cAanD,wBAAA,EAA0B,CAAA,CAAE,UAEwB;AAAA,cAEpD,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"verify-coupon.d.cts","names":[],"sources":["../../src/actions/verify-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;cAevB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAIxB,kBAAA,gCAAkB,wBAAA"}
@@ -1,9 +1,26 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/verify-coupon.d.ts
4
- declare const PayhipVerifyCouponInput: z.ZodTypeAny;
5
- declare const PayhipVerifyCouponOutput: z.ZodTypeAny;
6
- declare const payhipVerifyCoupon: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhipVerifyCouponInput: z.ZodObject<{
5
+ code: z.ZodString;
6
+ }, z.core.$strip>;
7
+ declare const PayhipVerifyCouponOutput: z.ZodObject<{
8
+ coupons: z.ZodArray<z.ZodObject<{
9
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ limit: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodNumber, z.ZodString]>>>;
13
+ usage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ expiry: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ has_expiry: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
16
+ percentage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodNumber, z.ZodString]>>>;
17
+ product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ product_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ }, z.core.$strip>>;
20
+ }, z.core.$strip>;
21
+ declare const payhipVerifyCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
22
+ code: string;
23
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
24
  //#endregion
8
25
  export { payhipVerifyCoupon };
9
26
  //# sourceMappingURL=verify-coupon.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify-coupon.d.mts","names":[],"sources":["../../src/actions/verify-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UAEwB;AAAA,cAanD,wBAAA,EAA0B,CAAA,CAAE,UAEwB;AAAA,cAEpD,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"verify-coupon.d.mts","names":[],"sources":["../../src/actions/verify-coupon.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;cAevB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAIxB,kBAAA,gCAAkB,wBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"verify-coupon.mjs","names":[],"sources":["../../src/actions/verify-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipVerifyCouponInput: z.ZodTypeAny = z.object({\n code: z.string().describe(\"The coupon code to verify.\"),\n}).describe(\"Request model for verifying a Payhip coupon code.\");\nconst PayhipVerifyCoupon_CouponDetailsSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"A unique identifier for a coupon.\").nullable().optional(),\n code: z.string().describe(\"The coupon code.\").nullable().optional(),\n type: z.string().describe(\"The type of coupon (e.g., 'multi', 'single', 'collection').\").nullable().optional(),\n limit: z.union([z.number().int(), z.number(), z.string()]).nullable().optional(),\n usage: 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 has_expiry: z.boolean().describe(\"Whether the coupon has an expiry date.\").nullable().optional(),\n percentage: z.union([z.number().int(), z.number(), z.string()]).nullable().optional(),\n product_id: z.string().describe(\"The product id the coupon applies to. Null is returned if it applies to all products.\").nullable().optional(),\n product_name: z.string().describe(\"The product the coupon applies to. All is returned if it applies to all products.\").nullable().optional(),\n}).describe(\"Details of a verified coupon.\");\nexport const PayhipVerifyCouponOutput: z.ZodTypeAny = z.object({\n coupons: z.array(PayhipVerifyCoupon_CouponDetailsSchema).describe(\"An array of verified coupon details.\"),\n}).describe(\"Response model for verifying a Payhip coupon code.\");\n\nexport const payhipVerifyCoupon = action(\"PAYHIP_VERIFY_COUPON\", {\n slug: \"payhip-verify-coupon\",\n name: \"Verify Coupon\",\n description: \"Tool to verify a Payhip coupon code. Use when you need to check if a coupon code is valid and retrieve its details. Only available in v1 API.\",\n input: PayhipVerifyCouponInput,\n output: PayhipVerifyCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwC,EAAE,OAAO,EAC5D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,EACxD,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAC/D,MAAM,yCAAuD,EAAE,OAAO;CACpE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjF,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7G,OAAO,EAAE,MAAM;EAAC,EAAE,OAAO,CAAC,CAAC,IAAI;EAAG,EAAE,OAAO;EAAG,EAAE,OAAO;CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/E,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,YAAY,EAAE,QAAQ,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,YAAY,EAAE,MAAM;EAAC,EAAE,OAAO,CAAC,CAAC,IAAI;EAAG,EAAE,OAAO;EAAG,EAAE,OAAO;CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7I,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7I,CAAC,CAAC,CAAC,SAAS,+BAA+B;AAK3C,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAToD,EAAE,OAAO,EAC7D,SAAS,EAAE,MAAM,sCAAsC,CAAC,CAAC,SAAS,sCAAsC,EAC1G,CAAC,CAAC,CAAC,SAAS,oDAOF;AACV,CAAC"}
1
+ {"version":3,"file":"verify-coupon.mjs","names":[],"sources":["../../src/actions/verify-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipVerifyCouponInput = z.object({\n code: z.string().describe(\"The coupon code to verify.\"),\n}).describe(\"Request model for verifying a Payhip coupon code.\");\nconst PayhipVerifyCoupon_CouponDetailsSchema = z.object({\n id: z.string().describe(\"A unique identifier for a coupon.\").nullable().optional(),\n code: z.string().describe(\"The coupon code.\").nullable().optional(),\n type: z.string().describe(\"The type of coupon (e.g., 'multi', 'single', 'collection').\").nullable().optional(),\n limit: z.union([z.number().int(), z.number(), z.string()]).nullable().optional(),\n usage: 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 has_expiry: z.boolean().describe(\"Whether the coupon has an expiry date.\").nullable().optional(),\n percentage: z.union([z.number().int(), z.number(), z.string()]).nullable().optional(),\n product_id: z.string().describe(\"The product id the coupon applies to. Null is returned if it applies to all products.\").nullable().optional(),\n product_name: z.string().describe(\"The product the coupon applies to. All is returned if it applies to all products.\").nullable().optional(),\n}).describe(\"Details of a verified coupon.\");\nexport const PayhipVerifyCouponOutput = z.object({\n coupons: z.array(PayhipVerifyCoupon_CouponDetailsSchema).describe(\"An array of verified coupon details.\"),\n}).describe(\"Response model for verifying a Payhip coupon code.\");\n\nexport const payhipVerifyCoupon = action(\"PAYHIP_VERIFY_COUPON\", {\n slug: \"payhip-verify-coupon\",\n name: \"Verify Coupon\",\n description: \"Tool to verify a Payhip coupon code. Use when you need to check if a coupon code is valid and retrieve its details. Only available in v1 API.\",\n input: PayhipVerifyCouponInput,\n output: PayhipVerifyCouponOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAA0B,EAAE,OAAO,EAC9C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,EACxD,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAC/D,MAAM,yCAAyC,EAAE,OAAO;CACtD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjF,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7G,OAAO,EAAE,MAAM;EAAC,EAAE,OAAO,CAAC,CAAC,IAAI;EAAG,EAAE,OAAO;EAAG,EAAE,OAAO;CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/E,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,YAAY,EAAE,QAAQ,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,YAAY,EAAE,MAAM;EAAC,EAAE,OAAO,CAAC,CAAC,IAAI;EAAG,EAAE,OAAO;EAAG,EAAE,OAAO;CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7I,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7I,CAAC,CAAC,CAAC,SAAS,+BAA+B;AAK3C,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATsC,EAAE,OAAO,EAC/C,SAAS,EAAE,MAAM,sCAAsC,CAAC,CAAC,SAAS,sCAAsC,EAC1G,CAAC,CAAC,CAAC,SAAS,oDAOF;AACV,CAAC"}
@@ -32,35 +32,35 @@ const PayhipWebhookEventPaidInput = zod.z.object({
32
32
  unconsented_from_emails: zod.z.boolean().describe("Whether customer has opted out of emails")
33
33
  }).describe("Request model for Payhip 'paid' webhook event.");
34
34
  const PayhipWebhookEventPaid_PayhipWebhookItemSchema = zod.z.object({
35
- on_sale: zod.z.boolean().describe("Whether the product was on sale"),
36
- quantity: zod.z.number().int().describe("Quantity purchased"),
37
- product_id: zod.z.string().describe("ID of the product"),
38
- has_variant: zod.z.boolean().describe("Whether the product has variants"),
39
- product_key: zod.z.string().describe("Link key for the product"),
40
- used_coupon: zod.z.boolean().describe("Whether a coupon was used"),
41
- product_name: zod.z.string().describe("Name of the product"),
35
+ on_sale: zod.z.boolean().describe("Whether the product was on sale").nullable(),
36
+ quantity: zod.z.number().int().describe("Quantity purchased").nullable(),
37
+ product_id: zod.z.string().describe("ID of the product").nullable(),
38
+ has_variant: zod.z.boolean().describe("Whether the product has variants").nullable(),
39
+ product_key: zod.z.string().describe("Link key for the product").nullable(),
40
+ used_coupon: zod.z.boolean().describe("Whether a coupon was used").nullable(),
41
+ product_name: zod.z.string().describe("Name of the product").nullable(),
42
42
  product_permalink: zod.z.string().nullable(),
43
- used_social_discount: zod.z.boolean().describe("Whether a social discount was used"),
44
- promoted_by_affiliate: zod.z.boolean().describe("Whether an affiliate promotion was applied"),
45
- used_upgrade_discount: zod.z.boolean().describe("Whether an upgrade discount was used"),
46
- used_cross_sell_discount: zod.z.boolean().describe("Whether a cross-sell discount was used")
43
+ used_social_discount: zod.z.boolean().describe("Whether a social discount was used").nullable(),
44
+ promoted_by_affiliate: zod.z.boolean().describe("Whether an affiliate promotion was applied").nullable(),
45
+ used_upgrade_discount: zod.z.boolean().describe("Whether an upgrade discount was used").nullable(),
46
+ used_cross_sell_discount: zod.z.boolean().describe("Whether a cross-sell discount was used").nullable()
47
47
  });
48
48
  const PayhipWebhookEventPaidOutput = zod.z.object({
49
- id: zod.z.string(),
50
- date: zod.z.number().int(),
51
- type: zod.z.string(),
52
- email: zod.z.string(),
49
+ id: zod.z.string().nullable(),
50
+ date: zod.z.number().int().nullable(),
51
+ type: zod.z.string().nullable(),
52
+ email: zod.z.string().nullable(),
53
53
  items: zod.z.array(PayhipWebhookEventPaid_PayhipWebhookItemSchema),
54
- price: zod.z.number().int(),
55
- is_gift: zod.z.boolean(),
56
- currency: zod.z.string(),
57
- signature: zod.z.string(),
58
- ip_address: zod.z.string(),
59
- payhip_fee: zod.z.number().int(),
60
- stripe_fee: zod.z.number().int(),
61
- vat_applied: zod.z.boolean(),
62
- payment_type: zod.z.enum(["card", "paypal"]),
63
- unconsented_from_emails: zod.z.boolean()
54
+ price: zod.z.number().int().nullable(),
55
+ is_gift: zod.z.boolean().nullable(),
56
+ currency: zod.z.string().nullable(),
57
+ signature: zod.z.string().nullable(),
58
+ ip_address: zod.z.string().nullable(),
59
+ payhip_fee: zod.z.number().int().nullable(),
60
+ stripe_fee: zod.z.number().int().nullable(),
61
+ vat_applied: zod.z.boolean().nullable(),
62
+ payment_type: zod.z.enum(["card", "paypal"]).nullable(),
63
+ unconsented_from_emails: zod.z.boolean().nullable()
64
64
  }).describe("Response model for Payhip 'paid' webhook event.");
65
65
  const payhipWebhookEventPaid = require_action.action("PAYHIP_WEBHOOK_EVENT_PAID", {
66
66
  slug: "payhip-webhook-event-paid",
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-event-paid.cjs","names":["z","action"],"sources":["../../src/actions/webhook-event-paid.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventPaidInput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique ID of the transaction\"),\n date: z.number().int().describe(\"Unix timestamp when purchase occurred\"),\n type: z.string().describe(\"Event type identifier\"),\n email: z.string().nullable(),\n items: z.array(z.object({\n on_sale: z.boolean().describe(\"Whether the product was on sale\"),\n quantity: z.number().int().describe(\"Quantity purchased\"),\n product_id: z.string().describe(\"ID of the product\"),\n has_variant: z.boolean().describe(\"Whether the product has variants\"),\n product_key: z.string().describe(\"Link key for the product\"),\n used_coupon: z.boolean().describe(\"Whether a coupon was used\"),\n product_name: z.string().describe(\"Name of the product\"),\n product_permalink: z.string().nullable(),\n used_social_discount: z.boolean().describe(\"Whether a social discount was used\"),\n promoted_by_affiliate: z.boolean().describe(\"Whether an affiliate promotion was applied\"),\n used_upgrade_discount: z.boolean().describe(\"Whether an upgrade discount was used\"),\n used_cross_sell_discount: z.boolean().describe(\"Whether a cross-sell discount was used\"),\n})).describe(\"List of items in the order\"),\n price: z.number().int().describe(\"Total price in cents\"),\n is_gift: z.boolean().describe(\"Whether the purchase was a gift\"),\n currency: z.string().describe(\"Three-letter currency code\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n ip_address: z.string().nullable(),\n payhip_fee: z.number().int().describe(\"Payhip fee in cents\"),\n stripe_fee: z.number().int().describe(\"Stripe fee in cents\"),\n vat_applied: z.boolean().describe(\"Whether VAT was applied to the purchase\"),\n payment_type: z.enum([\"card\", \"paypal\"]).describe(\"Payment method used\"),\n unconsented_from_emails: z.boolean().describe(\"Whether customer has opted out of emails\"),\n}).describe(\"Request model for Payhip 'paid' webhook event.\");\nconst PayhipWebhookEventPaid_PayhipWebhookItemSchema: z.ZodTypeAny = z.object({\n on_sale: z.boolean().describe(\"Whether the product was on sale\"),\n quantity: z.number().int().describe(\"Quantity purchased\"),\n product_id: z.string().describe(\"ID of the product\"),\n has_variant: z.boolean().describe(\"Whether the product has variants\"),\n product_key: z.string().describe(\"Link key for the product\"),\n used_coupon: z.boolean().describe(\"Whether a coupon was used\"),\n product_name: z.string().describe(\"Name of the product\"),\n product_permalink: z.string().nullable(),\n used_social_discount: z.boolean().describe(\"Whether a social discount was used\"),\n promoted_by_affiliate: z.boolean().describe(\"Whether an affiliate promotion was applied\"),\n used_upgrade_discount: z.boolean().describe(\"Whether an upgrade discount was used\"),\n used_cross_sell_discount: z.boolean().describe(\"Whether a cross-sell discount was used\"),\n});\nexport const PayhipWebhookEventPaidOutput: z.ZodTypeAny = z.object({\n id: z.string(),\n date: z.number().int(),\n type: z.string(),\n email: z.string(),\n items: z.array(PayhipWebhookEventPaid_PayhipWebhookItemSchema),\n price: z.number().int(),\n is_gift: z.boolean(),\n currency: z.string(),\n signature: z.string(),\n ip_address: z.string(),\n payhip_fee: z.number().int(),\n stripe_fee: z.number().int(),\n vat_applied: z.boolean(),\n payment_type: z.enum([\"card\", \"paypal\"]),\n unconsented_from_emails: z.boolean(),\n}).describe(\"Response model for Payhip 'paid' webhook event.\");\n\nexport const payhipWebhookEventPaid = action(\"PAYHIP_WEBHOOK_EVENT_PAID\", {\n slug: \"payhip-webhook-event-paid\",\n name: \"Webhook Event - Paid\",\n description: \"Tool to process Payhip's paid webhook event. Use when handling a purchase completion webhook from Payhip.\",\n input: PayhipWebhookEventPaidInput,\n output: PayhipWebhookEventPaidOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4CA,IAAAA,EAAE,OAAO;CAChE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CACtD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC;CACvE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CACjD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACxB,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,iCAAiC;EAC/D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oBAAoB;EACxD,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB;EACnD,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,kCAAkC;EACpE,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;EAC3D,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,2BAA2B;EAC7D,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;EACvD,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;EACvC,sBA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,iDAAiD;AAE7D,MAAa,yBAAyBC,eAAAA,OAAO,6BAA6B;CACxE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"webhook-event-paid.cjs","names":["z","action"],"sources":["../../src/actions/webhook-event-paid.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventPaidInput = z.object({\n id: z.string().describe(\"Unique ID of the transaction\"),\n date: z.number().int().describe(\"Unix timestamp when purchase occurred\"),\n type: z.string().describe(\"Event type identifier\"),\n email: z.string().nullable(),\n items: z.array(z.object({\n on_sale: z.boolean().describe(\"Whether the product was on sale\"),\n quantity: z.number().int().describe(\"Quantity purchased\"),\n product_id: z.string().describe(\"ID of the product\"),\n has_variant: z.boolean().describe(\"Whether the product has variants\"),\n product_key: z.string().describe(\"Link key for the product\"),\n used_coupon: z.boolean().describe(\"Whether a coupon was used\"),\n product_name: z.string().describe(\"Name of the product\"),\n product_permalink: z.string().nullable(),\n used_social_discount: z.boolean().describe(\"Whether a social discount was used\"),\n promoted_by_affiliate: z.boolean().describe(\"Whether an affiliate promotion was applied\"),\n used_upgrade_discount: z.boolean().describe(\"Whether an upgrade discount was used\"),\n used_cross_sell_discount: z.boolean().describe(\"Whether a cross-sell discount was used\"),\n})).describe(\"List of items in the order\"),\n price: z.number().int().describe(\"Total price in cents\"),\n is_gift: z.boolean().describe(\"Whether the purchase was a gift\"),\n currency: z.string().describe(\"Three-letter currency code\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n ip_address: z.string().nullable(),\n payhip_fee: z.number().int().describe(\"Payhip fee in cents\"),\n stripe_fee: z.number().int().describe(\"Stripe fee in cents\"),\n vat_applied: z.boolean().describe(\"Whether VAT was applied to the purchase\"),\n payment_type: z.enum([\"card\", \"paypal\"]).describe(\"Payment method used\"),\n unconsented_from_emails: z.boolean().describe(\"Whether customer has opted out of emails\"),\n}).describe(\"Request model for Payhip 'paid' webhook event.\");\nconst PayhipWebhookEventPaid_PayhipWebhookItemSchema = z.object({\n on_sale: z.boolean().describe(\"Whether the product was on sale\").nullable(),\n quantity: z.number().int().describe(\"Quantity purchased\").nullable(),\n product_id: z.string().describe(\"ID of the product\").nullable(),\n has_variant: z.boolean().describe(\"Whether the product has variants\").nullable(),\n product_key: z.string().describe(\"Link key for the product\").nullable(),\n used_coupon: z.boolean().describe(\"Whether a coupon was used\").nullable(),\n product_name: z.string().describe(\"Name of the product\").nullable(),\n product_permalink: z.string().nullable(),\n used_social_discount: z.boolean().describe(\"Whether a social discount was used\").nullable(),\n promoted_by_affiliate: z.boolean().describe(\"Whether an affiliate promotion was applied\").nullable(),\n used_upgrade_discount: z.boolean().describe(\"Whether an upgrade discount was used\").nullable(),\n used_cross_sell_discount: z.boolean().describe(\"Whether a cross-sell discount was used\").nullable(),\n});\nexport const PayhipWebhookEventPaidOutput = z.object({\n id: z.string().nullable(),\n date: z.number().int().nullable(),\n type: z.string().nullable(),\n email: z.string().nullable(),\n items: z.array(PayhipWebhookEventPaid_PayhipWebhookItemSchema),\n price: z.number().int().nullable(),\n is_gift: z.boolean().nullable(),\n currency: z.string().nullable(),\n signature: z.string().nullable(),\n ip_address: z.string().nullable(),\n payhip_fee: z.number().int().nullable(),\n stripe_fee: z.number().int().nullable(),\n vat_applied: z.boolean().nullable(),\n payment_type: z.enum([\"card\", \"paypal\"]).nullable(),\n unconsented_from_emails: z.boolean().nullable(),\n}).describe(\"Response model for Payhip 'paid' webhook event.\");\n\nexport const payhipWebhookEventPaid = action(\"PAYHIP_WEBHOOK_EVENT_PAID\", {\n slug: \"payhip-webhook-event-paid\",\n name: \"Webhook Event - Paid\",\n description: \"Tool to process Payhip's paid webhook event. Use when handling a purchase completion webhook from Payhip.\",\n input: PayhipWebhookEventPaidInput,\n output: PayhipWebhookEventPaidOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,IA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CAAC,CAAC,SAAS,iDAAiD;AAE7D,MAAa,yBAAyBC,eAAAA,OAAO,6BAA6B;CACxE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,102 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/webhook-event-paid.d.ts
4
- declare const PayhipWebhookEventPaidInput: z.ZodTypeAny;
5
- declare const PayhipWebhookEventPaidOutput: z.ZodTypeAny;
6
- declare const payhipWebhookEventPaid: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhipWebhookEventPaidInput: z.ZodObject<{
5
+ id: z.ZodString;
6
+ date: z.ZodNumber;
7
+ type: z.ZodString;
8
+ email: z.ZodNullable<z.ZodString>;
9
+ items: z.ZodArray<z.ZodObject<{
10
+ on_sale: z.ZodBoolean;
11
+ quantity: z.ZodNumber;
12
+ product_id: z.ZodString;
13
+ has_variant: z.ZodBoolean;
14
+ product_key: z.ZodString;
15
+ used_coupon: z.ZodBoolean;
16
+ product_name: z.ZodString;
17
+ product_permalink: z.ZodNullable<z.ZodString>;
18
+ used_social_discount: z.ZodBoolean;
19
+ promoted_by_affiliate: z.ZodBoolean;
20
+ used_upgrade_discount: z.ZodBoolean;
21
+ used_cross_sell_discount: z.ZodBoolean;
22
+ }, z.core.$strip>>;
23
+ price: z.ZodNumber;
24
+ is_gift: z.ZodBoolean;
25
+ currency: z.ZodString;
26
+ signature: z.ZodString;
27
+ ip_address: z.ZodNullable<z.ZodString>;
28
+ payhip_fee: z.ZodNumber;
29
+ stripe_fee: z.ZodNumber;
30
+ vat_applied: z.ZodBoolean;
31
+ payment_type: z.ZodEnum<{
32
+ card: "card";
33
+ paypal: "paypal";
34
+ }>;
35
+ unconsented_from_emails: z.ZodBoolean;
36
+ }, z.core.$strip>;
37
+ declare const PayhipWebhookEventPaidOutput: z.ZodObject<{
38
+ id: z.ZodNullable<z.ZodString>;
39
+ date: z.ZodNullable<z.ZodNumber>;
40
+ type: z.ZodNullable<z.ZodString>;
41
+ email: z.ZodNullable<z.ZodString>;
42
+ items: z.ZodArray<z.ZodObject<{
43
+ on_sale: z.ZodNullable<z.ZodBoolean>;
44
+ quantity: z.ZodNullable<z.ZodNumber>;
45
+ product_id: z.ZodNullable<z.ZodString>;
46
+ has_variant: z.ZodNullable<z.ZodBoolean>;
47
+ product_key: z.ZodNullable<z.ZodString>;
48
+ used_coupon: z.ZodNullable<z.ZodBoolean>;
49
+ product_name: z.ZodNullable<z.ZodString>;
50
+ product_permalink: z.ZodNullable<z.ZodString>;
51
+ used_social_discount: z.ZodNullable<z.ZodBoolean>;
52
+ promoted_by_affiliate: z.ZodNullable<z.ZodBoolean>;
53
+ used_upgrade_discount: z.ZodNullable<z.ZodBoolean>;
54
+ used_cross_sell_discount: z.ZodNullable<z.ZodBoolean>;
55
+ }, z.core.$strip>>;
56
+ price: z.ZodNullable<z.ZodNumber>;
57
+ is_gift: z.ZodNullable<z.ZodBoolean>;
58
+ currency: z.ZodNullable<z.ZodString>;
59
+ signature: z.ZodNullable<z.ZodString>;
60
+ ip_address: z.ZodNullable<z.ZodString>;
61
+ payhip_fee: z.ZodNullable<z.ZodNumber>;
62
+ stripe_fee: z.ZodNullable<z.ZodNumber>;
63
+ vat_applied: z.ZodNullable<z.ZodBoolean>;
64
+ payment_type: z.ZodNullable<z.ZodEnum<{
65
+ card: "card";
66
+ paypal: "paypal";
67
+ }>>;
68
+ unconsented_from_emails: z.ZodNullable<z.ZodBoolean>;
69
+ }, z.core.$strip>;
70
+ declare const payhipWebhookEventPaid: import("@keystrokehq/action").WorkflowActionDefinition<{
71
+ id: string;
72
+ date: number;
73
+ type: string;
74
+ email: string | null;
75
+ items: {
76
+ on_sale: boolean;
77
+ quantity: number;
78
+ product_id: string;
79
+ has_variant: boolean;
80
+ product_key: string;
81
+ used_coupon: boolean;
82
+ product_name: string;
83
+ product_permalink: string | null;
84
+ used_social_discount: boolean;
85
+ promoted_by_affiliate: boolean;
86
+ used_upgrade_discount: boolean;
87
+ used_cross_sell_discount: boolean;
88
+ }[];
89
+ price: number;
90
+ is_gift: boolean;
91
+ currency: string;
92
+ signature: string;
93
+ ip_address: string | null;
94
+ payhip_fee: number;
95
+ stripe_fee: number;
96
+ vat_applied: boolean;
97
+ payment_type: "card" | "paypal";
98
+ unconsented_from_emails: boolean;
99
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
100
  //#endregion
8
101
  export { payhipWebhookEventPaid };
9
102
  //# sourceMappingURL=webhook-event-paid.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-event-paid.d.cts","names":[],"sources":["../../src/actions/webhook-event-paid.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UA6BiB;AAAA,cAehD,4BAAA,EAA8B,CAAA,CAAE,UAgBiB;AAAA,cAEjD,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"webhook-event-paid.d.cts","names":[],"sources":["../../src/actions/webhook-event-paid.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4C3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkB5B,sBAAA,gCAAsB,wBAAA"}
@@ -1,9 +1,102 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/webhook-event-paid.d.ts
4
- declare const PayhipWebhookEventPaidInput: z.ZodTypeAny;
5
- declare const PayhipWebhookEventPaidOutput: z.ZodTypeAny;
6
- declare const payhipWebhookEventPaid: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhipWebhookEventPaidInput: z.ZodObject<{
5
+ id: z.ZodString;
6
+ date: z.ZodNumber;
7
+ type: z.ZodString;
8
+ email: z.ZodNullable<z.ZodString>;
9
+ items: z.ZodArray<z.ZodObject<{
10
+ on_sale: z.ZodBoolean;
11
+ quantity: z.ZodNumber;
12
+ product_id: z.ZodString;
13
+ has_variant: z.ZodBoolean;
14
+ product_key: z.ZodString;
15
+ used_coupon: z.ZodBoolean;
16
+ product_name: z.ZodString;
17
+ product_permalink: z.ZodNullable<z.ZodString>;
18
+ used_social_discount: z.ZodBoolean;
19
+ promoted_by_affiliate: z.ZodBoolean;
20
+ used_upgrade_discount: z.ZodBoolean;
21
+ used_cross_sell_discount: z.ZodBoolean;
22
+ }, z.core.$strip>>;
23
+ price: z.ZodNumber;
24
+ is_gift: z.ZodBoolean;
25
+ currency: z.ZodString;
26
+ signature: z.ZodString;
27
+ ip_address: z.ZodNullable<z.ZodString>;
28
+ payhip_fee: z.ZodNumber;
29
+ stripe_fee: z.ZodNumber;
30
+ vat_applied: z.ZodBoolean;
31
+ payment_type: z.ZodEnum<{
32
+ card: "card";
33
+ paypal: "paypal";
34
+ }>;
35
+ unconsented_from_emails: z.ZodBoolean;
36
+ }, z.core.$strip>;
37
+ declare const PayhipWebhookEventPaidOutput: z.ZodObject<{
38
+ id: z.ZodNullable<z.ZodString>;
39
+ date: z.ZodNullable<z.ZodNumber>;
40
+ type: z.ZodNullable<z.ZodString>;
41
+ email: z.ZodNullable<z.ZodString>;
42
+ items: z.ZodArray<z.ZodObject<{
43
+ on_sale: z.ZodNullable<z.ZodBoolean>;
44
+ quantity: z.ZodNullable<z.ZodNumber>;
45
+ product_id: z.ZodNullable<z.ZodString>;
46
+ has_variant: z.ZodNullable<z.ZodBoolean>;
47
+ product_key: z.ZodNullable<z.ZodString>;
48
+ used_coupon: z.ZodNullable<z.ZodBoolean>;
49
+ product_name: z.ZodNullable<z.ZodString>;
50
+ product_permalink: z.ZodNullable<z.ZodString>;
51
+ used_social_discount: z.ZodNullable<z.ZodBoolean>;
52
+ promoted_by_affiliate: z.ZodNullable<z.ZodBoolean>;
53
+ used_upgrade_discount: z.ZodNullable<z.ZodBoolean>;
54
+ used_cross_sell_discount: z.ZodNullable<z.ZodBoolean>;
55
+ }, z.core.$strip>>;
56
+ price: z.ZodNullable<z.ZodNumber>;
57
+ is_gift: z.ZodNullable<z.ZodBoolean>;
58
+ currency: z.ZodNullable<z.ZodString>;
59
+ signature: z.ZodNullable<z.ZodString>;
60
+ ip_address: z.ZodNullable<z.ZodString>;
61
+ payhip_fee: z.ZodNullable<z.ZodNumber>;
62
+ stripe_fee: z.ZodNullable<z.ZodNumber>;
63
+ vat_applied: z.ZodNullable<z.ZodBoolean>;
64
+ payment_type: z.ZodNullable<z.ZodEnum<{
65
+ card: "card";
66
+ paypal: "paypal";
67
+ }>>;
68
+ unconsented_from_emails: z.ZodNullable<z.ZodBoolean>;
69
+ }, z.core.$strip>;
70
+ declare const payhipWebhookEventPaid: import("@keystrokehq/action").WorkflowActionDefinition<{
71
+ id: string;
72
+ date: number;
73
+ type: string;
74
+ email: string | null;
75
+ items: {
76
+ on_sale: boolean;
77
+ quantity: number;
78
+ product_id: string;
79
+ has_variant: boolean;
80
+ product_key: string;
81
+ used_coupon: boolean;
82
+ product_name: string;
83
+ product_permalink: string | null;
84
+ used_social_discount: boolean;
85
+ promoted_by_affiliate: boolean;
86
+ used_upgrade_discount: boolean;
87
+ used_cross_sell_discount: boolean;
88
+ }[];
89
+ price: number;
90
+ is_gift: boolean;
91
+ currency: string;
92
+ signature: string;
93
+ ip_address: string | null;
94
+ payhip_fee: number;
95
+ stripe_fee: number;
96
+ vat_applied: boolean;
97
+ payment_type: "card" | "paypal";
98
+ unconsented_from_emails: boolean;
99
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
100
  //#endregion
8
101
  export { payhipWebhookEventPaid };
9
102
  //# sourceMappingURL=webhook-event-paid.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-event-paid.d.mts","names":[],"sources":["../../src/actions/webhook-event-paid.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UA6BiB;AAAA,cAehD,4BAAA,EAA8B,CAAA,CAAE,UAgBiB;AAAA,cAEjD,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"webhook-event-paid.d.mts","names":[],"sources":["../../src/actions/webhook-event-paid.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4C3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkB5B,sBAAA,gCAAsB,wBAAA"}
@@ -32,18 +32,18 @@ const PayhipWebhookEventPaidInput = z.object({
32
32
  unconsented_from_emails: z.boolean().describe("Whether customer has opted out of emails")
33
33
  }).describe("Request model for Payhip 'paid' webhook event.");
34
34
  const PayhipWebhookEventPaid_PayhipWebhookItemSchema = z.object({
35
- on_sale: z.boolean().describe("Whether the product was on sale"),
36
- quantity: z.number().int().describe("Quantity purchased"),
37
- product_id: z.string().describe("ID of the product"),
38
- has_variant: z.boolean().describe("Whether the product has variants"),
39
- product_key: z.string().describe("Link key for the product"),
40
- used_coupon: z.boolean().describe("Whether a coupon was used"),
41
- product_name: z.string().describe("Name of the product"),
35
+ on_sale: z.boolean().describe("Whether the product was on sale").nullable(),
36
+ quantity: z.number().int().describe("Quantity purchased").nullable(),
37
+ product_id: z.string().describe("ID of the product").nullable(),
38
+ has_variant: z.boolean().describe("Whether the product has variants").nullable(),
39
+ product_key: z.string().describe("Link key for the product").nullable(),
40
+ used_coupon: z.boolean().describe("Whether a coupon was used").nullable(),
41
+ product_name: z.string().describe("Name of the product").nullable(),
42
42
  product_permalink: z.string().nullable(),
43
- used_social_discount: z.boolean().describe("Whether a social discount was used"),
44
- promoted_by_affiliate: z.boolean().describe("Whether an affiliate promotion was applied"),
45
- used_upgrade_discount: z.boolean().describe("Whether an upgrade discount was used"),
46
- used_cross_sell_discount: z.boolean().describe("Whether a cross-sell discount was used")
43
+ used_social_discount: z.boolean().describe("Whether a social discount was used").nullable(),
44
+ promoted_by_affiliate: z.boolean().describe("Whether an affiliate promotion was applied").nullable(),
45
+ used_upgrade_discount: z.boolean().describe("Whether an upgrade discount was used").nullable(),
46
+ used_cross_sell_discount: z.boolean().describe("Whether a cross-sell discount was used").nullable()
47
47
  });
48
48
  const payhipWebhookEventPaid = action("PAYHIP_WEBHOOK_EVENT_PAID", {
49
49
  slug: "payhip-webhook-event-paid",
@@ -51,21 +51,21 @@ const payhipWebhookEventPaid = action("PAYHIP_WEBHOOK_EVENT_PAID", {
51
51
  description: "Tool to process Payhip's paid webhook event. Use when handling a purchase completion webhook from Payhip.",
52
52
  input: PayhipWebhookEventPaidInput,
53
53
  output: z.object({
54
- id: z.string(),
55
- date: z.number().int(),
56
- type: z.string(),
57
- email: z.string(),
54
+ id: z.string().nullable(),
55
+ date: z.number().int().nullable(),
56
+ type: z.string().nullable(),
57
+ email: z.string().nullable(),
58
58
  items: z.array(PayhipWebhookEventPaid_PayhipWebhookItemSchema),
59
- price: z.number().int(),
60
- is_gift: z.boolean(),
61
- currency: z.string(),
62
- signature: z.string(),
63
- ip_address: z.string(),
64
- payhip_fee: z.number().int(),
65
- stripe_fee: z.number().int(),
66
- vat_applied: z.boolean(),
67
- payment_type: z.enum(["card", "paypal"]),
68
- unconsented_from_emails: z.boolean()
59
+ price: z.number().int().nullable(),
60
+ is_gift: z.boolean().nullable(),
61
+ currency: z.string().nullable(),
62
+ signature: z.string().nullable(),
63
+ ip_address: z.string().nullable(),
64
+ payhip_fee: z.number().int().nullable(),
65
+ stripe_fee: z.number().int().nullable(),
66
+ vat_applied: z.boolean().nullable(),
67
+ payment_type: z.enum(["card", "paypal"]).nullable(),
68
+ unconsented_from_emails: z.boolean().nullable()
69
69
  }).describe("Response model for Payhip 'paid' webhook event.")
70
70
  });
71
71
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-event-paid.mjs","names":[],"sources":["../../src/actions/webhook-event-paid.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventPaidInput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique ID of the transaction\"),\n date: z.number().int().describe(\"Unix timestamp when purchase occurred\"),\n type: z.string().describe(\"Event type identifier\"),\n email: z.string().nullable(),\n items: z.array(z.object({\n on_sale: z.boolean().describe(\"Whether the product was on sale\"),\n quantity: z.number().int().describe(\"Quantity purchased\"),\n product_id: z.string().describe(\"ID of the product\"),\n has_variant: z.boolean().describe(\"Whether the product has variants\"),\n product_key: z.string().describe(\"Link key for the product\"),\n used_coupon: z.boolean().describe(\"Whether a coupon was used\"),\n product_name: z.string().describe(\"Name of the product\"),\n product_permalink: z.string().nullable(),\n used_social_discount: z.boolean().describe(\"Whether a social discount was used\"),\n promoted_by_affiliate: z.boolean().describe(\"Whether an affiliate promotion was applied\"),\n used_upgrade_discount: z.boolean().describe(\"Whether an upgrade discount was used\"),\n used_cross_sell_discount: z.boolean().describe(\"Whether a cross-sell discount was used\"),\n})).describe(\"List of items in the order\"),\n price: z.number().int().describe(\"Total price in cents\"),\n is_gift: z.boolean().describe(\"Whether the purchase was a gift\"),\n currency: z.string().describe(\"Three-letter currency code\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n ip_address: z.string().nullable(),\n payhip_fee: z.number().int().describe(\"Payhip fee in cents\"),\n stripe_fee: z.number().int().describe(\"Stripe fee in cents\"),\n vat_applied: z.boolean().describe(\"Whether VAT was applied to the purchase\"),\n payment_type: z.enum([\"card\", \"paypal\"]).describe(\"Payment method used\"),\n unconsented_from_emails: z.boolean().describe(\"Whether customer has opted out of emails\"),\n}).describe(\"Request model for Payhip 'paid' webhook event.\");\nconst PayhipWebhookEventPaid_PayhipWebhookItemSchema: z.ZodTypeAny = z.object({\n on_sale: z.boolean().describe(\"Whether the product was on sale\"),\n quantity: z.number().int().describe(\"Quantity purchased\"),\n product_id: z.string().describe(\"ID of the product\"),\n has_variant: z.boolean().describe(\"Whether the product has variants\"),\n product_key: z.string().describe(\"Link key for the product\"),\n used_coupon: z.boolean().describe(\"Whether a coupon was used\"),\n product_name: z.string().describe(\"Name of the product\"),\n product_permalink: z.string().nullable(),\n used_social_discount: z.boolean().describe(\"Whether a social discount was used\"),\n promoted_by_affiliate: z.boolean().describe(\"Whether an affiliate promotion was applied\"),\n used_upgrade_discount: z.boolean().describe(\"Whether an upgrade discount was used\"),\n used_cross_sell_discount: z.boolean().describe(\"Whether a cross-sell discount was used\"),\n});\nexport const PayhipWebhookEventPaidOutput: z.ZodTypeAny = z.object({\n id: z.string(),\n date: z.number().int(),\n type: z.string(),\n email: z.string(),\n items: z.array(PayhipWebhookEventPaid_PayhipWebhookItemSchema),\n price: z.number().int(),\n is_gift: z.boolean(),\n currency: z.string(),\n signature: z.string(),\n ip_address: z.string(),\n payhip_fee: z.number().int(),\n stripe_fee: z.number().int(),\n vat_applied: z.boolean(),\n payment_type: z.enum([\"card\", \"paypal\"]),\n unconsented_from_emails: z.boolean(),\n}).describe(\"Response model for Payhip 'paid' webhook event.\");\n\nexport const payhipWebhookEventPaid = action(\"PAYHIP_WEBHOOK_EVENT_PAID\", {\n slug: \"payhip-webhook-event-paid\",\n name: \"Webhook Event - Paid\",\n description: \"Tool to process Payhip's paid webhook event. Use when handling a purchase completion webhook from Payhip.\",\n input: PayhipWebhookEventPaidInput,\n output: PayhipWebhookEventPaidOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4C,EAAE,OAAO;CAChE,IAAI,EAAE,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EAAE,MAAM,8CAA8C;EAC7D,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI;EACtB,SAAS,EAAE,QAAQ;EACnB,UAAU,EAAE,OAAO;EACnB,WAAW,EAAE,OAAO;EACpB,YAAY,EAAE,OAAO;EACrB,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI;EAC3B,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI;EAC3B,aAAa,EAAE,QAAQ;EACvB,cAAc,EAAE,KAAK,CAAC,QAAQ,QAAQ,CAAC;EACvC,yBAAyB,EAAE,QAAQ;CACrC,CAAC,CAAC,CAAC,SAAS,iDAOF;AACV,CAAC"}
1
+ {"version":3,"file":"webhook-event-paid.mjs","names":[],"sources":["../../src/actions/webhook-event-paid.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventPaidInput = z.object({\n id: z.string().describe(\"Unique ID of the transaction\"),\n date: z.number().int().describe(\"Unix timestamp when purchase occurred\"),\n type: z.string().describe(\"Event type identifier\"),\n email: z.string().nullable(),\n items: z.array(z.object({\n on_sale: z.boolean().describe(\"Whether the product was on sale\"),\n quantity: z.number().int().describe(\"Quantity purchased\"),\n product_id: z.string().describe(\"ID of the product\"),\n has_variant: z.boolean().describe(\"Whether the product has variants\"),\n product_key: z.string().describe(\"Link key for the product\"),\n used_coupon: z.boolean().describe(\"Whether a coupon was used\"),\n product_name: z.string().describe(\"Name of the product\"),\n product_permalink: z.string().nullable(),\n used_social_discount: z.boolean().describe(\"Whether a social discount was used\"),\n promoted_by_affiliate: z.boolean().describe(\"Whether an affiliate promotion was applied\"),\n used_upgrade_discount: z.boolean().describe(\"Whether an upgrade discount was used\"),\n used_cross_sell_discount: z.boolean().describe(\"Whether a cross-sell discount was used\"),\n})).describe(\"List of items in the order\"),\n price: z.number().int().describe(\"Total price in cents\"),\n is_gift: z.boolean().describe(\"Whether the purchase was a gift\"),\n currency: z.string().describe(\"Three-letter currency code\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n ip_address: z.string().nullable(),\n payhip_fee: z.number().int().describe(\"Payhip fee in cents\"),\n stripe_fee: z.number().int().describe(\"Stripe fee in cents\"),\n vat_applied: z.boolean().describe(\"Whether VAT was applied to the purchase\"),\n payment_type: z.enum([\"card\", \"paypal\"]).describe(\"Payment method used\"),\n unconsented_from_emails: z.boolean().describe(\"Whether customer has opted out of emails\"),\n}).describe(\"Request model for Payhip 'paid' webhook event.\");\nconst PayhipWebhookEventPaid_PayhipWebhookItemSchema = z.object({\n on_sale: z.boolean().describe(\"Whether the product was on sale\").nullable(),\n quantity: z.number().int().describe(\"Quantity purchased\").nullable(),\n product_id: z.string().describe(\"ID of the product\").nullable(),\n has_variant: z.boolean().describe(\"Whether the product has variants\").nullable(),\n product_key: z.string().describe(\"Link key for the product\").nullable(),\n used_coupon: z.boolean().describe(\"Whether a coupon was used\").nullable(),\n product_name: z.string().describe(\"Name of the product\").nullable(),\n product_permalink: z.string().nullable(),\n used_social_discount: z.boolean().describe(\"Whether a social discount was used\").nullable(),\n promoted_by_affiliate: z.boolean().describe(\"Whether an affiliate promotion was applied\").nullable(),\n used_upgrade_discount: z.boolean().describe(\"Whether an upgrade discount was used\").nullable(),\n used_cross_sell_discount: z.boolean().describe(\"Whether a cross-sell discount was used\").nullable(),\n});\nexport const PayhipWebhookEventPaidOutput = z.object({\n id: z.string().nullable(),\n date: z.number().int().nullable(),\n type: z.string().nullable(),\n email: z.string().nullable(),\n items: z.array(PayhipWebhookEventPaid_PayhipWebhookItemSchema),\n price: z.number().int().nullable(),\n is_gift: z.boolean().nullable(),\n currency: z.string().nullable(),\n signature: z.string().nullable(),\n ip_address: z.string().nullable(),\n payhip_fee: z.number().int().nullable(),\n stripe_fee: z.number().int().nullable(),\n vat_applied: z.boolean().nullable(),\n payment_type: z.enum([\"card\", \"paypal\"]).nullable(),\n unconsented_from_emails: z.boolean().nullable(),\n}).describe(\"Response model for Payhip 'paid' webhook event.\");\n\nexport const payhipWebhookEventPaid = action(\"PAYHIP_WEBHOOK_EVENT_PAID\", {\n slug: \"payhip-webhook-event-paid\",\n name: \"Webhook Event - Paid\",\n description: \"Tool to process Payhip's paid webhook event. Use when handling a purchase completion webhook from Payhip.\",\n input: PayhipWebhookEventPaidInput,\n output: PayhipWebhookEventPaidOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8B,EAAE,OAAO;CAClD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CACtD,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC;CACvE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CACjD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,OAAO,EAAE,MAAM,EAAE,OAAO;EACxB,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,iCAAiC;EAC/D,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oBAAoB;EACxD,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB;EACnD,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,kCAAkC;EACpE,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;EAC3D,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,2BAA2B;EAC7D,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;EACvD,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS;EACvC,sBAAsB,EAAE,QAAQ,CAAC,CAAC,SAAS,oCAAoC;EAC/E,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,4CAA4C;EACxF,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC;EAClF,0BAA0B,EAAE,QAAQ,CAAC,CAAC,SAAS,wCAAwC;CACzF,CAAC,CAAC,CAAC,CAAC,SAAS,4BAA4B;CACvC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI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