@keystrokehq/payhip 0.1.2 → 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.
- package/dist/actions/create-coupon.cjs +2 -2
- package/dist/actions/create-coupon.cjs.map +1 -1
- package/dist/actions/create-coupon.d.cts +2 -2
- package/dist/actions/create-coupon.d.mts +2 -2
- package/dist/actions/create-coupon.mjs +2 -2
- package/dist/actions/create-coupon.mjs.map +1 -1
- package/dist/actions/delete-coupon.cjs +2 -2
- package/dist/actions/delete-coupon.cjs.map +1 -1
- package/dist/actions/delete-coupon.d.cts +2 -2
- package/dist/actions/delete-coupon.d.mts +2 -2
- package/dist/actions/delete-coupon.mjs +2 -2
- package/dist/actions/delete-coupon.mjs.map +1 -1
- package/dist/actions/get-coupon.cjs +2 -2
- package/dist/actions/get-coupon.cjs.map +1 -1
- package/dist/actions/get-coupon.d.cts +2 -2
- package/dist/actions/get-coupon.d.mts +2 -2
- package/dist/actions/get-coupon.mjs +2 -2
- package/dist/actions/get-coupon.mjs.map +1 -1
- package/dist/actions/update-coupon.cjs +2 -2
- package/dist/actions/update-coupon.cjs.map +1 -1
- package/dist/actions/update-coupon.d.cts +2 -2
- package/dist/actions/update-coupon.d.mts +2 -2
- package/dist/actions/update-coupon.mjs +2 -2
- package/dist/actions/update-coupon.mjs.map +1 -1
- package/dist/actions/verify-coupon.cjs +2 -2
- package/dist/actions/verify-coupon.cjs.map +1 -1
- package/dist/actions/verify-coupon.d.cts +2 -2
- package/dist/actions/verify-coupon.d.mts +2 -2
- package/dist/actions/verify-coupon.mjs +2 -2
- package/dist/actions/verify-coupon.mjs.map +1 -1
- package/dist/actions/webhook-event-paid.cjs +3 -3
- package/dist/actions/webhook-event-paid.cjs.map +1 -1
- package/dist/actions/webhook-event-paid.d.cts +4 -3
- package/dist/actions/webhook-event-paid.d.mts +4 -3
- package/dist/actions/webhook-event-paid.mjs +3 -3
- package/dist/actions/webhook-event-paid.mjs.map +1 -1
- package/dist/actions/webhook-event-refunded.cjs +3 -3
- package/dist/actions/webhook-event-refunded.cjs.map +1 -1
- package/dist/actions/webhook-event-refunded.d.cts +4 -3
- package/dist/actions/webhook-event-refunded.d.mts +4 -3
- package/dist/actions/webhook-event-refunded.mjs +3 -3
- package/dist/actions/webhook-event-refunded.mjs.map +1 -1
- package/dist/actions/webhook-event-subscription-created.cjs +1 -1
- package/dist/actions/webhook-event-subscription-created.cjs.map +1 -1
- package/dist/actions/webhook-event-subscription-created.d.cts +1 -1
- package/dist/actions/webhook-event-subscription-created.d.mts +1 -1
- package/dist/actions/webhook-event-subscription-created.mjs +1 -1
- package/dist/actions/webhook-event-subscription-created.mjs.map +1 -1
- package/dist/actions/webhook-event-subscription-deleted.cjs +1 -1
- package/dist/actions/webhook-event-subscription-deleted.cjs.map +1 -1
- package/dist/actions/webhook-event-subscription-deleted.d.cts +1 -1
- package/dist/actions/webhook-event-subscription-deleted.d.mts +1 -1
- package/dist/actions/webhook-event-subscription-deleted.mjs +1 -1
- package/dist/actions/webhook-event-subscription-deleted.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -28,8 +28,8 @@ const PayhipCreateCoupon_CouponDataSchema = zod.z.object({
|
|
|
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.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}).describe(\"Coupon data returned after creation.\");\nexport const PayhipCreateCouponOutput = 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,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;CACzF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6HAA6H,CAAC,CAAC,SAAS;CACnK,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0MAA0M,CAAC,CAAC,SAAS;CAC3P,aAAaA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAS;CAAY,CAAC,CAAC,CAAC,SAAS,wGAAwG;CACxK,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8MAA8M,CAAC,CAAC,SAAS;CAC1P,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CAChH,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CACrI,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;AAC1H,CAAC,CAAC,CAAC,SAAS,iDAAiD;AAC7D,MAAM,sCAAsCA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
|
+
{"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,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;CACzF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6HAA6H,CAAC,CAAC,SAAS;CACnK,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0MAA0M,CAAC,CAAC,SAAS;CAC3P,aAAaA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAS;CAAY,CAAC,CAAC,CAAC,SAAS,wGAAwG;CACxK,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8MAA8M,CAAC,CAAC,SAAS;CAC1P,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CAChH,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CACrI,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;AAC1H,CAAC,CAAC,CAAC,SAAS,iDAAiD;AAC7D,MAAM,sCAAsCA,IAAAA,EAAE,OAAO;CACnD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAA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ACrD,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"}
|
|
@@ -29,8 +29,8 @@ declare const PayhipCreateCouponOutput: z.ZodObject<{
|
|
|
29
29
|
usage_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
30
30
|
collection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
31
|
minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
32
|
-
}, z.core.$
|
|
33
|
-
}, z.core.$
|
|
32
|
+
}, z.core.$loose>>;
|
|
33
|
+
}, z.core.$loose>;
|
|
34
34
|
declare const payhipCreateCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
35
35
|
code: string;
|
|
36
36
|
coupon_type: "single" | "multi" | "collection";
|
|
@@ -29,8 +29,8 @@ declare const PayhipCreateCouponOutput: z.ZodObject<{
|
|
|
29
29
|
usage_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
30
30
|
collection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
31
|
minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
32
|
-
}, z.core.$
|
|
33
|
-
}, z.core.$
|
|
32
|
+
}, z.core.$loose>>;
|
|
33
|
+
}, z.core.$loose>;
|
|
34
34
|
declare const payhipCreateCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
35
35
|
code: string;
|
|
36
36
|
coupon_type: "single" | "multi" | "collection";
|
|
@@ -28,13 +28,13 @@ const PayhipCreateCoupon_CouponDataSchema = z.object({
|
|
|
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.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}).describe(\"Coupon data returned after creation.\");\nexport const PayhipCreateCouponOutput = 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,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,K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I,CAAC,CAAC,SAAS,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9E,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7F,yBAAyB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACxG,CAAC,CAAC,CAAC,SAAS,sCAAsC;
|
|
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,CA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C,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sCAAsC;AAKhE,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATsC,EAAE,OAAO,EAC/C,MAAM,oCAAoC,SAAS,EACrD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sCAOhB;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.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}).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}).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,SAAS,oDAAoD;
|
|
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"}
|
|
@@ -13,8 +13,8 @@ declare const PayhipDeleteCouponOutput: z.ZodObject<{
|
|
|
13
13
|
coupon_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
14
|
percentage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
15
|
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
-
}, z.core.$
|
|
17
|
-
}, z.core.$
|
|
16
|
+
}, z.core.$loose>>>>;
|
|
17
|
+
}, z.core.$loose>;
|
|
18
18
|
declare const payhipDeleteCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
19
19
|
id: string;
|
|
20
20
|
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
@@ -13,8 +13,8 @@ declare const PayhipDeleteCouponOutput: z.ZodObject<{
|
|
|
13
13
|
coupon_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
14
|
percentage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
15
|
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
-
}, z.core.$
|
|
17
|
-
}, z.core.$
|
|
16
|
+
}, z.core.$loose>>>>;
|
|
17
|
+
}, z.core.$loose>;
|
|
18
18
|
declare const payhipDeleteCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
19
19
|
id: string;
|
|
20
20
|
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
@@ -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.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}).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}).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,SAAS,oDAAoD;
|
|
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"}
|
|
@@ -15,8 +15,8 @@ const PayhipGetCoupon_CouponDataSchema = zod.z.object({
|
|
|
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.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}).describe(\"Coupon object with its properties.\");\nexport const PayhipGetCouponOutput = 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,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,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,CAAC,CAAC,SAAS;CAChG,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;
|
|
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,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,CAAC,CAAC,SAAS;CAChG,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,YAAY,CAAC,CAAC,SAAS,oCAAoC;AAC9D,MAAa,wBAAwBA,IAAAA,EAAE,OAAO,EAC5C,MAAM,iCAAiC,SAAS,EAClD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAA4C;AAEtE,MAAa,kBAAkBC,eAAAA,OAAO,qBAAqB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -18,8 +18,8 @@ declare const PayhipGetCouponOutput: z.ZodObject<{
|
|
|
18
18
|
usage_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
19
19
|
collection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
20
|
minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
21
|
-
}, z.core.$
|
|
22
|
-
}, z.core.$
|
|
21
|
+
}, z.core.$loose>>;
|
|
22
|
+
}, z.core.$loose>;
|
|
23
23
|
declare const payhipGetCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
24
24
|
id: number;
|
|
25
25
|
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
@@ -18,8 +18,8 @@ declare const PayhipGetCouponOutput: z.ZodObject<{
|
|
|
18
18
|
usage_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
19
19
|
collection_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
20
|
minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
21
|
-
}, z.core.$
|
|
22
|
-
}, z.core.$
|
|
21
|
+
}, z.core.$loose>>;
|
|
22
|
+
}, z.core.$loose>;
|
|
23
23
|
declare const payhipGetCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
24
24
|
id: number;
|
|
25
25
|
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
@@ -15,13 +15,13 @@ const PayhipGetCoupon_CouponDataSchema = z.object({
|
|
|
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.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}).describe(\"Coupon object with its properties.\");\nexport const PayhipGetCouponOutput = 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,uBAAuB,EAAE,OAAO,EAC3C,IAAI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
|
|
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,IA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Aa,kBAAkB,OAAO,qBAAqB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATmC,EAAE,OAAO,EAC5C,MAAM,iCAAiC,SAAS,EAClD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAOhB;AACV,CAAC"}
|
|
@@ -18,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",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-coupon.cjs","names":["z","action"],"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,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;CAC/D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC/D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;CACxF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CACpF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;AACjG,CAAC,CAAC,CAAC,SAAS,6CAA6C;AACzD,MAAM,sCAAsCA,IAAAA,EAAE,OAAO;CACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnE,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,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,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,uCAAuC;
|
|
1
|
+
{"version":3,"file":"update-coupon.cjs","names":["z","action"],"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}).passthrough().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}).passthrough().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,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;CAC/D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC/D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;C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,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EAC3G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8CAA8C;AAExE,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -19,8 +19,8 @@ declare const PayhipUpdateCouponOutput: z.ZodObject<{
|
|
|
19
19
|
percentage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
20
|
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
21
|
product_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
-
}, z.core.$
|
|
23
|
-
}, z.core.$
|
|
22
|
+
}, z.core.$loose>>>>;
|
|
23
|
+
}, z.core.$loose>;
|
|
24
24
|
declare const payhipUpdateCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
25
25
|
id: string;
|
|
26
26
|
code?: string | undefined;
|
|
@@ -19,8 +19,8 @@ declare const PayhipUpdateCouponOutput: z.ZodObject<{
|
|
|
19
19
|
percentage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
20
|
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
21
|
product_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
-
}, z.core.$
|
|
23
|
-
}, z.core.$
|
|
22
|
+
}, z.core.$loose>>>>;
|
|
23
|
+
}, z.core.$loose>;
|
|
24
24
|
declare const payhipUpdateCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
25
25
|
id: string;
|
|
26
26
|
code?: string | undefined;
|
|
@@ -18,13 +18,13 @@ const PayhipUpdateCoupon_CouponDataSchema = z.object({
|
|
|
18
18
|
percentage: z.string().describe("The percentage discount.").nullable().optional(),
|
|
19
19
|
product_id: 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: 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.");
|
|
21
|
+
}).passthrough().describe("Coupon data returned in the response.");
|
|
22
22
|
const payhipUpdateCoupon = action("PAYHIP_UPDATE_COUPON", {
|
|
23
23
|
slug: "payhip-update-coupon",
|
|
24
24
|
name: "Update Coupon",
|
|
25
25
|
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.",
|
|
26
26
|
input: PayhipUpdateCouponInput,
|
|
27
|
-
output: z.object({ items: z.array(PayhipUpdateCoupon_CouponDataSchema).describe("An array of coupons.").nullable().optional() }).describe("Response model for updating a Payhip coupon.")
|
|
27
|
+
output: z.object({ items: z.array(PayhipUpdateCoupon_CouponDataSchema).describe("An array of coupons.").nullable().optional() }).passthrough().describe("Response model for updating a Payhip coupon.")
|
|
28
28
|
});
|
|
29
29
|
//#endregion
|
|
30
30
|
export { payhipUpdateCoupon };
|
|
@@ -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.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;
|
|
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}).passthrough().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}).passthrough().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,YAAY,CAAC,CAAC,SAAS,uCAAuC;AAKjE,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,YAAY,CAAC,CAAC,SAAS,8CAOhB;AACV,CAAC"}
|
|
@@ -21,8 +21,8 @@ const PayhipVerifyCoupon_CouponDetailsSchema = zod.z.object({
|
|
|
21
21
|
]).nullable().optional(),
|
|
22
22
|
product_id: zod.z.string().describe("The product id the coupon applies to. Null is returned if it applies to all products.").nullable().optional(),
|
|
23
23
|
product_name: zod.z.string().describe("The product the coupon applies to. All is returned if it applies to all products.").nullable().optional()
|
|
24
|
-
}).describe("Details of a verified coupon.");
|
|
25
|
-
const PayhipVerifyCouponOutput = zod.z.object({ coupons: zod.z.array(PayhipVerifyCoupon_CouponDetailsSchema).describe("An array of verified coupon details.") }).describe("Response model for verifying a Payhip coupon code.");
|
|
24
|
+
}).passthrough().describe("Details of a verified coupon.");
|
|
25
|
+
const PayhipVerifyCouponOutput = zod.z.object({ coupons: zod.z.array(PayhipVerifyCoupon_CouponDetailsSchema).describe("An array of verified coupon details.") }).passthrough().describe("Response model for verifying a Payhip coupon code.");
|
|
26
26
|
const payhipVerifyCoupon = require_action.action("PAYHIP_VERIFY_COUPON", {
|
|
27
27
|
slug: "payhip-verify-coupon",
|
|
28
28
|
name: "Verify Coupon",
|
|
@@ -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.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,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;
|
|
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}).passthrough().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}).passthrough().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,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,YAAY,CAAC,CAAC,SAAS,+BAA+B;AACzD,MAAa,2BAA2BA,IAAAA,EAAE,OAAO,EAC/C,SAASA,IAAAA,EAAE,MAAM,sCAAsC,CAAC,CAAC,SAAS,sCAAsC,EAC1G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oDAAoD;AAE9E,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -16,8 +16,8 @@ declare const PayhipVerifyCouponOutput: z.ZodObject<{
|
|
|
16
16
|
percentage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodNumber, z.ZodString]>>>;
|
|
17
17
|
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
18
|
product_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
-
}, z.core.$
|
|
20
|
-
}, z.core.$
|
|
19
|
+
}, z.core.$loose>>;
|
|
20
|
+
}, z.core.$loose>;
|
|
21
21
|
declare const payhipVerifyCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
22
22
|
code: string;
|
|
23
23
|
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
@@ -16,8 +16,8 @@ declare const PayhipVerifyCouponOutput: z.ZodObject<{
|
|
|
16
16
|
percentage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodNumber, z.ZodString]>>>;
|
|
17
17
|
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
18
|
product_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
-
}, z.core.$
|
|
20
|
-
}, z.core.$
|
|
19
|
+
}, z.core.$loose>>;
|
|
20
|
+
}, z.core.$loose>;
|
|
21
21
|
declare const payhipVerifyCoupon: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
22
22
|
code: string;
|
|
23
23
|
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
@@ -21,13 +21,13 @@ const PayhipVerifyCoupon_CouponDetailsSchema = z.object({
|
|
|
21
21
|
]).nullable().optional(),
|
|
22
22
|
product_id: z.string().describe("The product id the coupon applies to. Null is returned if it applies to all products.").nullable().optional(),
|
|
23
23
|
product_name: z.string().describe("The product the coupon applies to. All is returned if it applies to all products.").nullable().optional()
|
|
24
|
-
}).describe("Details of a verified coupon.");
|
|
24
|
+
}).passthrough().describe("Details of a verified coupon.");
|
|
25
25
|
const payhipVerifyCoupon = action("PAYHIP_VERIFY_COUPON", {
|
|
26
26
|
slug: "payhip-verify-coupon",
|
|
27
27
|
name: "Verify Coupon",
|
|
28
28
|
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.",
|
|
29
29
|
input: PayhipVerifyCouponInput,
|
|
30
|
-
output: z.object({ coupons: z.array(PayhipVerifyCoupon_CouponDetailsSchema).describe("An array of verified coupon details.") }).describe("Response model for verifying a Payhip coupon code.")
|
|
30
|
+
output: z.object({ coupons: z.array(PayhipVerifyCoupon_CouponDetailsSchema).describe("An array of verified coupon details.") }).passthrough().describe("Response model for verifying a Payhip coupon code.")
|
|
31
31
|
});
|
|
32
32
|
//#endregion
|
|
33
33
|
export { payhipVerifyCoupon };
|
|
@@ -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.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;
|
|
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}).passthrough().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}).passthrough().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,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describe("Whether an affiliate promotion was applied"),
|
|
20
20
|
used_upgrade_discount: zod.z.boolean().describe("Whether an upgrade discount was used"),
|
|
21
21
|
used_cross_sell_discount: zod.z.boolean().describe("Whether a cross-sell discount was used")
|
|
22
|
-
})).describe("List of items in the order"),
|
|
22
|
+
}).passthrough()).describe("List of items in the order"),
|
|
23
23
|
price: zod.z.number().int().describe("Total price in cents"),
|
|
24
24
|
is_gift: zod.z.boolean().describe("Whether the purchase was a gift"),
|
|
25
25
|
currency: zod.z.string().describe("Three-letter currency code"),
|
|
@@ -44,7 +44,7 @@ const PayhipWebhookEventPaid_PayhipWebhookItemSchema = zod.z.object({
|
|
|
44
44
|
promoted_by_affiliate: zod.z.boolean().describe("Whether an affiliate promotion was applied").nullable(),
|
|
45
45
|
used_upgrade_discount: zod.z.boolean().describe("Whether an upgrade discount was used").nullable(),
|
|
46
46
|
used_cross_sell_discount: zod.z.boolean().describe("Whether a cross-sell discount was used").nullable()
|
|
47
|
-
});
|
|
47
|
+
}).passthrough();
|
|
48
48
|
const PayhipWebhookEventPaidOutput = zod.z.object({
|
|
49
49
|
id: zod.z.string().nullable(),
|
|
50
50
|
date: zod.z.number().int().nullable(),
|
|
@@ -61,7 +61,7 @@ const PayhipWebhookEventPaidOutput = zod.z.object({
|
|
|
61
61
|
vat_applied: zod.z.boolean().nullable(),
|
|
62
62
|
payment_type: zod.z.enum(["card", "paypal"]).nullable(),
|
|
63
63
|
unconsented_from_emails: zod.z.boolean().nullable()
|
|
64
|
-
}).describe("Response model for Payhip 'paid' webhook event.");
|
|
64
|
+
}).passthrough().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",
|
|
67
67
|
name: "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.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,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,sBAAsBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,oCAAoC;EAC/E,uBAAuBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,4CAA4C;EACxF,uBAAuBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC;EAClF,0BAA0BA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,wCAAwC;CACzF,CAAC,CAAC,CAAC,CAAC,SAAS,4BAA4B;
|
|
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}).passthrough()).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}).passthrough();\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}).passthrough().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,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,YAA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AC,SAAS;CACxB,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CAChC,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC1B,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC3B,OAAOA,IAAAA,EAAE,MAAM,8CAA8C;CAC7D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACjC,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC9B,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAChC,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACtC,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACtC,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS;CAClC,cAAcA,IAAAA,EAAE,KAAK,CAAC,QAAQ,QAAQ,CAAC,CAAC,CAAC,SAAS;CAClD,yBAAyBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS;AAChD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iDAAiD;AAE3E,MAAa,yBAAyBC,eAAAA,OAAO,6BAA6B;CACxE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -19,7 +19,7 @@ declare const PayhipWebhookEventPaidInput: z.ZodObject<{
|
|
|
19
19
|
promoted_by_affiliate: z.ZodBoolean;
|
|
20
20
|
used_upgrade_discount: z.ZodBoolean;
|
|
21
21
|
used_cross_sell_discount: z.ZodBoolean;
|
|
22
|
-
}, z.core.$
|
|
22
|
+
}, z.core.$loose>>;
|
|
23
23
|
price: z.ZodNumber;
|
|
24
24
|
is_gift: z.ZodBoolean;
|
|
25
25
|
currency: z.ZodString;
|
|
@@ -52,7 +52,7 @@ declare const PayhipWebhookEventPaidOutput: z.ZodObject<{
|
|
|
52
52
|
promoted_by_affiliate: z.ZodNullable<z.ZodBoolean>;
|
|
53
53
|
used_upgrade_discount: z.ZodNullable<z.ZodBoolean>;
|
|
54
54
|
used_cross_sell_discount: z.ZodNullable<z.ZodBoolean>;
|
|
55
|
-
}, z.core.$
|
|
55
|
+
}, z.core.$loose>>;
|
|
56
56
|
price: z.ZodNullable<z.ZodNumber>;
|
|
57
57
|
is_gift: z.ZodNullable<z.ZodBoolean>;
|
|
58
58
|
currency: z.ZodNullable<z.ZodString>;
|
|
@@ -66,13 +66,14 @@ declare const PayhipWebhookEventPaidOutput: z.ZodObject<{
|
|
|
66
66
|
paypal: "paypal";
|
|
67
67
|
}>>;
|
|
68
68
|
unconsented_from_emails: z.ZodNullable<z.ZodBoolean>;
|
|
69
|
-
}, z.core.$
|
|
69
|
+
}, z.core.$loose>;
|
|
70
70
|
declare const payhipWebhookEventPaid: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
71
71
|
id: string;
|
|
72
72
|
date: number;
|
|
73
73
|
type: string;
|
|
74
74
|
email: string | null;
|
|
75
75
|
items: {
|
|
76
|
+
[x: string]: unknown;
|
|
76
77
|
on_sale: boolean;
|
|
77
78
|
quantity: number;
|
|
78
79
|
product_id: string;
|
|
@@ -19,7 +19,7 @@ declare const PayhipWebhookEventPaidInput: z.ZodObject<{
|
|
|
19
19
|
promoted_by_affiliate: z.ZodBoolean;
|
|
20
20
|
used_upgrade_discount: z.ZodBoolean;
|
|
21
21
|
used_cross_sell_discount: z.ZodBoolean;
|
|
22
|
-
}, z.core.$
|
|
22
|
+
}, z.core.$loose>>;
|
|
23
23
|
price: z.ZodNumber;
|
|
24
24
|
is_gift: z.ZodBoolean;
|
|
25
25
|
currency: z.ZodString;
|
|
@@ -52,7 +52,7 @@ declare const PayhipWebhookEventPaidOutput: z.ZodObject<{
|
|
|
52
52
|
promoted_by_affiliate: z.ZodNullable<z.ZodBoolean>;
|
|
53
53
|
used_upgrade_discount: z.ZodNullable<z.ZodBoolean>;
|
|
54
54
|
used_cross_sell_discount: z.ZodNullable<z.ZodBoolean>;
|
|
55
|
-
}, z.core.$
|
|
55
|
+
}, z.core.$loose>>;
|
|
56
56
|
price: z.ZodNullable<z.ZodNumber>;
|
|
57
57
|
is_gift: z.ZodNullable<z.ZodBoolean>;
|
|
58
58
|
currency: z.ZodNullable<z.ZodString>;
|
|
@@ -66,13 +66,14 @@ declare const PayhipWebhookEventPaidOutput: z.ZodObject<{
|
|
|
66
66
|
paypal: "paypal";
|
|
67
67
|
}>>;
|
|
68
68
|
unconsented_from_emails: z.ZodNullable<z.ZodBoolean>;
|
|
69
|
-
}, z.core.$
|
|
69
|
+
}, z.core.$loose>;
|
|
70
70
|
declare const payhipWebhookEventPaid: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
71
71
|
id: string;
|
|
72
72
|
date: number;
|
|
73
73
|
type: string;
|
|
74
74
|
email: string | null;
|
|
75
75
|
items: {
|
|
76
|
+
[x: string]: unknown;
|
|
76
77
|
on_sale: boolean;
|
|
77
78
|
quantity: number;
|
|
78
79
|
product_id: string;
|
|
@@ -19,7 +19,7 @@ const PayhipWebhookEventPaidInput = z.object({
|
|
|
19
19
|
promoted_by_affiliate: z.boolean().describe("Whether an affiliate promotion was applied"),
|
|
20
20
|
used_upgrade_discount: z.boolean().describe("Whether an upgrade discount was used"),
|
|
21
21
|
used_cross_sell_discount: z.boolean().describe("Whether a cross-sell discount was used")
|
|
22
|
-
})).describe("List of items in the order"),
|
|
22
|
+
}).passthrough()).describe("List of items in the order"),
|
|
23
23
|
price: z.number().int().describe("Total price in cents"),
|
|
24
24
|
is_gift: z.boolean().describe("Whether the purchase was a gift"),
|
|
25
25
|
currency: z.string().describe("Three-letter currency code"),
|
|
@@ -44,7 +44,7 @@ const PayhipWebhookEventPaid_PayhipWebhookItemSchema = z.object({
|
|
|
44
44
|
promoted_by_affiliate: z.boolean().describe("Whether an affiliate promotion was applied").nullable(),
|
|
45
45
|
used_upgrade_discount: z.boolean().describe("Whether an upgrade discount was used").nullable(),
|
|
46
46
|
used_cross_sell_discount: z.boolean().describe("Whether a cross-sell discount was used").nullable()
|
|
47
|
-
});
|
|
47
|
+
}).passthrough();
|
|
48
48
|
const payhipWebhookEventPaid = action("PAYHIP_WEBHOOK_EVENT_PAID", {
|
|
49
49
|
slug: "payhip-webhook-event-paid",
|
|
50
50
|
name: "Webhook Event - Paid",
|
|
@@ -66,7 +66,7 @@ const payhipWebhookEventPaid = action("PAYHIP_WEBHOOK_EVENT_PAID", {
|
|
|
66
66
|
vat_applied: z.boolean().nullable(),
|
|
67
67
|
payment_type: z.enum(["card", "paypal"]).nullable(),
|
|
68
68
|
unconsented_from_emails: z.boolean().nullable()
|
|
69
|
-
}).describe("Response model for Payhip 'paid' webhook event.")
|
|
69
|
+
}).passthrough().describe("Response model for Payhip 'paid' webhook event.")
|
|
70
70
|
});
|
|
71
71
|
//#endregion
|
|
72
72
|
export { payhipWebhookEventPaid };
|
|
@@ -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.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;
|
|
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}).passthrough()).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}).passthrough();\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}).passthrough().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,YAAY,CAAC,CAAC,CAAC,SAAS,4BAA4B;CACrD,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sBAAsB;CACvD,SAAS,EAAE,QAA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by an affiliate"),
|
|
19
19
|
used_upgrade_discount: zod.z.boolean().describe("Whether upgrade discount was used"),
|
|
20
20
|
used_cross_sell_discount: zod.z.boolean().describe("Whether cross-sell discount was used")
|
|
21
|
-
}).describe("Details of an item in the refunded event")).describe("List of items included in the transaction"),
|
|
21
|
+
}).passthrough().describe("Details of an item in the refunded event")).describe("List of items included in the transaction"),
|
|
22
22
|
price: zod.z.number().int().describe("Original price in cents or pennies"),
|
|
23
23
|
is_gift: zod.z.boolean().describe("Whether purchase was a gift"),
|
|
24
24
|
currency: zod.z.string().describe("ISO 4217 currency code, e.g., USD"),
|
|
@@ -46,7 +46,7 @@ const PayhipWebhookEventRefunded_PayhipWebhookEventRefundedItemSchema = zod.z.ob
|
|
|
46
46
|
promoted_by_affiliate: zod.z.boolean().describe("Whether purchase was promoted by an affiliate").nullable(),
|
|
47
47
|
used_upgrade_discount: zod.z.boolean().describe("Whether upgrade discount was used").nullable(),
|
|
48
48
|
used_cross_sell_discount: zod.z.boolean().describe("Whether cross-sell discount was used").nullable()
|
|
49
|
-
}).describe("Details of an item in the refunded event");
|
|
49
|
+
}).passthrough().describe("Details of an item in the refunded event");
|
|
50
50
|
const PayhipWebhookEventRefundedOutput = zod.z.object({
|
|
51
51
|
id: zod.z.string().nullable(),
|
|
52
52
|
type: zod.z.string().nullable(),
|
|
@@ -65,7 +65,7 @@ const PayhipWebhookEventRefundedOutput = zod.z.object({
|
|
|
65
65
|
date_refunded: zod.z.number().int().nullable(),
|
|
66
66
|
amount_refunded: zod.z.number().int().nullable(),
|
|
67
67
|
unconsented_from_emails: zod.z.boolean().nullable()
|
|
68
|
-
}).describe("Response model for Payhip refunded webhook event.");
|
|
68
|
+
}).passthrough().describe("Response model for Payhip refunded webhook event.");
|
|
69
69
|
const payhipWebhookEventRefunded = require_action.action("PAYHIP_WEBHOOK_EVENT_REFUNDED", {
|
|
70
70
|
slug: "payhip-webhook-event-refunded",
|
|
71
71
|
name: "Webhook Event - Refunded Payment",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-event-refunded.cjs","names":["z","action"],"sources":["../../src/actions/webhook-event-refunded.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventRefundedInput = z.object({\n id: z.string().describe(\"Transaction ID\"),\n type: z.string().describe(\"Event type identifier\"),\n email: z.string().describe(\"Buyer email address\"),\n items: z.array(z.object({\n on_sale: z.boolean().describe(\"Whether product was on sale\"),\n quantity: z.string().describe(\"Quantity purchased\"),\n product_id: z.string().describe(\"Unique identifier for the product\"),\n has_variant: z.boolean().describe(\"Whether product has a variant\"),\n product_key: z.string().describe(\"Product key\"),\n used_coupon: z.boolean().describe(\"Whether coupon was used\"),\n product_name: z.string().describe(\"Name of the product\"),\n product_permalink: z.string().describe(\"Product permalink URL\"),\n used_social_discount: z.boolean().describe(\"Whether social discount was used\"),\n promoted_by_affiliate: z.boolean().describe(\"Whether purchase was promoted by an affiliate\"),\n used_upgrade_discount: z.boolean().describe(\"Whether upgrade discount was used\"),\n used_cross_sell_discount: z.boolean().describe(\"Whether cross-sell discount was used\"),\n}).describe(\"Details of an item in the refunded event\")).describe(\"List of items included in the transaction\"),\n price: z.number().int().describe(\"Original price in cents or pennies\"),\n is_gift: z.boolean().describe(\"Whether purchase was a gift\"),\n currency: z.string().describe(\"ISO 4217 currency code, e.g., USD\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n ip_address: z.string().describe(\"IP address of the buyer\"),\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\"),\n date_created: z.number().int().describe(\"Unix timestamp when transaction was created\"),\n payment_type: z.string().describe(\"Payment method used, e.g., card\"),\n date_refunded: z.number().int().describe(\"Unix timestamp when refund occurred\"),\n amount_refunded: z.number().int().describe(\"Amount refunded in cents or pennies\"),\n unconsented_from_emails: z.boolean().describe(\"Whether buyer did not consent to marketing emails\"),\n}).describe(\"Request model for Payhip refunded webhook event.\");\nconst PayhipWebhookEventRefunded_PayhipWebhookEventRefundedItemSchema = z.object({\n on_sale: z.boolean().describe(\"Whether product was on sale\").nullable(),\n quantity: z.string().describe(\"Quantity purchased\").nullable(),\n product_id: z.string().describe(\"Unique identifier for the product\").nullable(),\n has_variant: z.boolean().describe(\"Whether product has a variant\").nullable(),\n product_key: z.string().describe(\"Product key\").nullable(),\n used_coupon: z.boolean().describe(\"Whether coupon was used\").nullable(),\n product_name: z.string().describe(\"Name of the product\").nullable(),\n product_permalink: z.string().describe(\"Product permalink URL\").nullable(),\n used_social_discount: z.boolean().describe(\"Whether social discount was used\").nullable(),\n promoted_by_affiliate: z.boolean().describe(\"Whether purchase was promoted by an affiliate\").nullable(),\n used_upgrade_discount: z.boolean().describe(\"Whether upgrade discount was used\").nullable(),\n used_cross_sell_discount: z.boolean().describe(\"Whether cross-sell discount was used\").nullable(),\n}).describe(\"Details of an item in the refunded event\");\nexport const PayhipWebhookEventRefundedOutput = z.object({\n id: z.string().nullable(),\n type: z.string().nullable(),\n email: z.string().nullable(),\n items: z.array(PayhipWebhookEventRefunded_PayhipWebhookEventRefundedItemSchema),\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 date_created: z.number().int().nullable(),\n payment_type: z.string().nullable(),\n date_refunded: z.number().int().nullable(),\n amount_refunded: z.number().int().nullable(),\n unconsented_from_emails: z.boolean().nullable(),\n}).describe(\"Response model for Payhip refunded webhook event.\");\n\nexport const payhipWebhookEventRefunded = action(\"PAYHIP_WEBHOOK_EVENT_REFUNDED\", {\n slug: \"payhip-webhook-event-refunded\",\n name: \"Webhook Event - Refunded Payment\",\n description: \"Tool to process Payhip's refunded webhook event. Use when handling a payment refund event from Payhip.\",\n input: PayhipWebhookEventRefundedInput,\n output: PayhipWebhookEventRefundedOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkCA,IAAAA,EAAE,OAAO;CACtD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gBAAgB;CACxC,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CACjD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CAChD,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACxB,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,6BAA6B;EAC3D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB;EAClD,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;EACnE,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,+BAA+B;EACjE,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa;EAC9C,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,yBAAyB;EAC3D,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;EACvD,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;EAC9D,sBAAsBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,kCAAkC;EAC7E,uBAAuBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,+CAA+C;EAC3F,uBAAuBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC;EAC/E,0BAA0BA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC;CACvF,CAAC,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,CAAC,SAAS,2CAA2C;
|
|
1
|
+
{"version":3,"file":"webhook-event-refunded.cjs","names":["z","action"],"sources":["../../src/actions/webhook-event-refunded.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventRefundedInput = z.object({\n id: z.string().describe(\"Transaction ID\"),\n type: z.string().describe(\"Event type identifier\"),\n email: z.string().describe(\"Buyer email address\"),\n items: z.array(z.object({\n on_sale: z.boolean().describe(\"Whether product was on sale\"),\n quantity: z.string().describe(\"Quantity purchased\"),\n product_id: z.string().describe(\"Unique identifier for the product\"),\n has_variant: z.boolean().describe(\"Whether product has a variant\"),\n product_key: z.string().describe(\"Product key\"),\n used_coupon: z.boolean().describe(\"Whether coupon was used\"),\n product_name: z.string().describe(\"Name of the product\"),\n product_permalink: z.string().describe(\"Product permalink URL\"),\n used_social_discount: z.boolean().describe(\"Whether social discount was used\"),\n promoted_by_affiliate: z.boolean().describe(\"Whether purchase was promoted by an affiliate\"),\n used_upgrade_discount: z.boolean().describe(\"Whether upgrade discount was used\"),\n used_cross_sell_discount: z.boolean().describe(\"Whether cross-sell discount was used\"),\n}).passthrough().describe(\"Details of an item in the refunded event\")).describe(\"List of items included in the transaction\"),\n price: z.number().int().describe(\"Original price in cents or pennies\"),\n is_gift: z.boolean().describe(\"Whether purchase was a gift\"),\n currency: z.string().describe(\"ISO 4217 currency code, e.g., USD\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n ip_address: z.string().describe(\"IP address of the buyer\"),\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\"),\n date_created: z.number().int().describe(\"Unix timestamp when transaction was created\"),\n payment_type: z.string().describe(\"Payment method used, e.g., card\"),\n date_refunded: z.number().int().describe(\"Unix timestamp when refund occurred\"),\n amount_refunded: z.number().int().describe(\"Amount refunded in cents or pennies\"),\n unconsented_from_emails: z.boolean().describe(\"Whether buyer did not consent to marketing emails\"),\n}).describe(\"Request model for Payhip refunded webhook event.\");\nconst PayhipWebhookEventRefunded_PayhipWebhookEventRefundedItemSchema = z.object({\n on_sale: z.boolean().describe(\"Whether product was on sale\").nullable(),\n quantity: z.string().describe(\"Quantity purchased\").nullable(),\n product_id: z.string().describe(\"Unique identifier for the product\").nullable(),\n has_variant: z.boolean().describe(\"Whether product has a variant\").nullable(),\n product_key: z.string().describe(\"Product key\").nullable(),\n used_coupon: z.boolean().describe(\"Whether coupon was used\").nullable(),\n product_name: z.string().describe(\"Name of the product\").nullable(),\n product_permalink: z.string().describe(\"Product permalink URL\").nullable(),\n used_social_discount: z.boolean().describe(\"Whether social discount was used\").nullable(),\n promoted_by_affiliate: z.boolean().describe(\"Whether purchase was promoted by an affiliate\").nullable(),\n used_upgrade_discount: z.boolean().describe(\"Whether upgrade discount was used\").nullable(),\n used_cross_sell_discount: z.boolean().describe(\"Whether cross-sell discount was used\").nullable(),\n}).passthrough().describe(\"Details of an item in the refunded event\");\nexport const PayhipWebhookEventRefundedOutput = z.object({\n id: z.string().nullable(),\n type: z.string().nullable(),\n email: z.string().nullable(),\n items: z.array(PayhipWebhookEventRefunded_PayhipWebhookEventRefundedItemSchema),\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 date_created: z.number().int().nullable(),\n payment_type: z.string().nullable(),\n date_refunded: z.number().int().nullable(),\n amount_refunded: z.number().int().nullable(),\n unconsented_from_emails: z.boolean().nullable(),\n}).passthrough().describe(\"Response model for Payhip refunded webhook event.\");\n\nexport const payhipWebhookEventRefunded = action(\"PAYHIP_WEBHOOK_EVENT_REFUNDED\", {\n slug: \"payhip-webhook-event-refunded\",\n name: \"Webhook Event - Refunded Payment\",\n description: \"Tool to process Payhip's refunded webhook event. Use when handling a payment refund event from Payhip.\",\n input: PayhipWebhookEventRefundedInput,\n output: PayhipWebhookEventRefundedOutput,\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AC,CAAC,IAAI,CAAC,CAAC,SAAS;CACtC,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS;CAClC,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACxC,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACzC,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CAC3C,yBAAyBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS;AAChD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,mDAAmD;AAE7E,MAAa,6BAA6BC,eAAAA,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -18,7 +18,7 @@ declare const PayhipWebhookEventRefundedInput: z.ZodObject<{
|
|
|
18
18
|
promoted_by_affiliate: z.ZodBoolean;
|
|
19
19
|
used_upgrade_discount: z.ZodBoolean;
|
|
20
20
|
used_cross_sell_discount: z.ZodBoolean;
|
|
21
|
-
}, z.core.$
|
|
21
|
+
}, z.core.$loose>>;
|
|
22
22
|
price: z.ZodNumber;
|
|
23
23
|
is_gift: z.ZodBoolean;
|
|
24
24
|
currency: z.ZodString;
|
|
@@ -50,7 +50,7 @@ declare const PayhipWebhookEventRefundedOutput: z.ZodObject<{
|
|
|
50
50
|
promoted_by_affiliate: z.ZodNullable<z.ZodBoolean>;
|
|
51
51
|
used_upgrade_discount: z.ZodNullable<z.ZodBoolean>;
|
|
52
52
|
used_cross_sell_discount: z.ZodNullable<z.ZodBoolean>;
|
|
53
|
-
}, z.core.$
|
|
53
|
+
}, z.core.$loose>>;
|
|
54
54
|
price: z.ZodNullable<z.ZodNumber>;
|
|
55
55
|
is_gift: z.ZodNullable<z.ZodBoolean>;
|
|
56
56
|
currency: z.ZodNullable<z.ZodString>;
|
|
@@ -64,12 +64,13 @@ declare const PayhipWebhookEventRefundedOutput: z.ZodObject<{
|
|
|
64
64
|
date_refunded: z.ZodNullable<z.ZodNumber>;
|
|
65
65
|
amount_refunded: z.ZodNullable<z.ZodNumber>;
|
|
66
66
|
unconsented_from_emails: z.ZodNullable<z.ZodBoolean>;
|
|
67
|
-
}, z.core.$
|
|
67
|
+
}, z.core.$loose>;
|
|
68
68
|
declare const payhipWebhookEventRefunded: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
69
69
|
id: string;
|
|
70
70
|
type: string;
|
|
71
71
|
email: string;
|
|
72
72
|
items: {
|
|
73
|
+
[x: string]: unknown;
|
|
73
74
|
on_sale: boolean;
|
|
74
75
|
quantity: string;
|
|
75
76
|
product_id: string;
|
|
@@ -18,7 +18,7 @@ declare const PayhipWebhookEventRefundedInput: z.ZodObject<{
|
|
|
18
18
|
promoted_by_affiliate: z.ZodBoolean;
|
|
19
19
|
used_upgrade_discount: z.ZodBoolean;
|
|
20
20
|
used_cross_sell_discount: z.ZodBoolean;
|
|
21
|
-
}, z.core.$
|
|
21
|
+
}, z.core.$loose>>;
|
|
22
22
|
price: z.ZodNumber;
|
|
23
23
|
is_gift: z.ZodBoolean;
|
|
24
24
|
currency: z.ZodString;
|
|
@@ -50,7 +50,7 @@ declare const PayhipWebhookEventRefundedOutput: z.ZodObject<{
|
|
|
50
50
|
promoted_by_affiliate: z.ZodNullable<z.ZodBoolean>;
|
|
51
51
|
used_upgrade_discount: z.ZodNullable<z.ZodBoolean>;
|
|
52
52
|
used_cross_sell_discount: z.ZodNullable<z.ZodBoolean>;
|
|
53
|
-
}, z.core.$
|
|
53
|
+
}, z.core.$loose>>;
|
|
54
54
|
price: z.ZodNullable<z.ZodNumber>;
|
|
55
55
|
is_gift: z.ZodNullable<z.ZodBoolean>;
|
|
56
56
|
currency: z.ZodNullable<z.ZodString>;
|
|
@@ -64,12 +64,13 @@ declare const PayhipWebhookEventRefundedOutput: z.ZodObject<{
|
|
|
64
64
|
date_refunded: z.ZodNullable<z.ZodNumber>;
|
|
65
65
|
amount_refunded: z.ZodNullable<z.ZodNumber>;
|
|
66
66
|
unconsented_from_emails: z.ZodNullable<z.ZodBoolean>;
|
|
67
|
-
}, z.core.$
|
|
67
|
+
}, z.core.$loose>;
|
|
68
68
|
declare const payhipWebhookEventRefunded: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
69
69
|
id: string;
|
|
70
70
|
type: string;
|
|
71
71
|
email: string;
|
|
72
72
|
items: {
|
|
73
|
+
[x: string]: unknown;
|
|
73
74
|
on_sale: boolean;
|
|
74
75
|
quantity: string;
|
|
75
76
|
product_id: string;
|
|
@@ -18,7 +18,7 @@ const PayhipWebhookEventRefundedInput = z.object({
|
|
|
18
18
|
promoted_by_affiliate: z.boolean().describe("Whether purchase was promoted by an affiliate"),
|
|
19
19
|
used_upgrade_discount: z.boolean().describe("Whether upgrade discount was used"),
|
|
20
20
|
used_cross_sell_discount: z.boolean().describe("Whether cross-sell discount was used")
|
|
21
|
-
}).describe("Details of an item in the refunded event")).describe("List of items included in the transaction"),
|
|
21
|
+
}).passthrough().describe("Details of an item in the refunded event")).describe("List of items included in the transaction"),
|
|
22
22
|
price: z.number().int().describe("Original price in cents or pennies"),
|
|
23
23
|
is_gift: z.boolean().describe("Whether purchase was a gift"),
|
|
24
24
|
currency: z.string().describe("ISO 4217 currency code, e.g., USD"),
|
|
@@ -46,7 +46,7 @@ const PayhipWebhookEventRefunded_PayhipWebhookEventRefundedItemSchema = z.object
|
|
|
46
46
|
promoted_by_affiliate: z.boolean().describe("Whether purchase was promoted by an affiliate").nullable(),
|
|
47
47
|
used_upgrade_discount: z.boolean().describe("Whether upgrade discount was used").nullable(),
|
|
48
48
|
used_cross_sell_discount: z.boolean().describe("Whether cross-sell discount was used").nullable()
|
|
49
|
-
}).describe("Details of an item in the refunded event");
|
|
49
|
+
}).passthrough().describe("Details of an item in the refunded event");
|
|
50
50
|
const payhipWebhookEventRefunded = action("PAYHIP_WEBHOOK_EVENT_REFUNDED", {
|
|
51
51
|
slug: "payhip-webhook-event-refunded",
|
|
52
52
|
name: "Webhook Event - Refunded Payment",
|
|
@@ -70,7 +70,7 @@ const payhipWebhookEventRefunded = action("PAYHIP_WEBHOOK_EVENT_REFUNDED", {
|
|
|
70
70
|
date_refunded: z.number().int().nullable(),
|
|
71
71
|
amount_refunded: z.number().int().nullable(),
|
|
72
72
|
unconsented_from_emails: z.boolean().nullable()
|
|
73
|
-
}).describe("Response model for Payhip refunded webhook event.")
|
|
73
|
+
}).passthrough().describe("Response model for Payhip refunded webhook event.")
|
|
74
74
|
});
|
|
75
75
|
//#endregion
|
|
76
76
|
export { payhipWebhookEventRefunded };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-event-refunded.mjs","names":[],"sources":["../../src/actions/webhook-event-refunded.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventRefundedInput = z.object({\n id: z.string().describe(\"Transaction ID\"),\n type: z.string().describe(\"Event type identifier\"),\n email: z.string().describe(\"Buyer email address\"),\n items: z.array(z.object({\n on_sale: z.boolean().describe(\"Whether product was on sale\"),\n quantity: z.string().describe(\"Quantity purchased\"),\n product_id: z.string().describe(\"Unique identifier for the product\"),\n has_variant: z.boolean().describe(\"Whether product has a variant\"),\n product_key: z.string().describe(\"Product key\"),\n used_coupon: z.boolean().describe(\"Whether coupon was used\"),\n product_name: z.string().describe(\"Name of the product\"),\n product_permalink: z.string().describe(\"Product permalink URL\"),\n used_social_discount: z.boolean().describe(\"Whether social discount was used\"),\n promoted_by_affiliate: z.boolean().describe(\"Whether purchase was promoted by an affiliate\"),\n used_upgrade_discount: z.boolean().describe(\"Whether upgrade discount was used\"),\n used_cross_sell_discount: z.boolean().describe(\"Whether cross-sell discount was used\"),\n}).describe(\"Details of an item in the refunded event\")).describe(\"List of items included in the transaction\"),\n price: z.number().int().describe(\"Original price in cents or pennies\"),\n is_gift: z.boolean().describe(\"Whether purchase was a gift\"),\n currency: z.string().describe(\"ISO 4217 currency code, e.g., USD\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n ip_address: z.string().describe(\"IP address of the buyer\"),\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\"),\n date_created: z.number().int().describe(\"Unix timestamp when transaction was created\"),\n payment_type: z.string().describe(\"Payment method used, e.g., card\"),\n date_refunded: z.number().int().describe(\"Unix timestamp when refund occurred\"),\n amount_refunded: z.number().int().describe(\"Amount refunded in cents or pennies\"),\n unconsented_from_emails: z.boolean().describe(\"Whether buyer did not consent to marketing emails\"),\n}).describe(\"Request model for Payhip refunded webhook event.\");\nconst PayhipWebhookEventRefunded_PayhipWebhookEventRefundedItemSchema = z.object({\n on_sale: z.boolean().describe(\"Whether product was on sale\").nullable(),\n quantity: z.string().describe(\"Quantity purchased\").nullable(),\n product_id: z.string().describe(\"Unique identifier for the product\").nullable(),\n has_variant: z.boolean().describe(\"Whether product has a variant\").nullable(),\n product_key: z.string().describe(\"Product key\").nullable(),\n used_coupon: z.boolean().describe(\"Whether coupon was used\").nullable(),\n product_name: z.string().describe(\"Name of the product\").nullable(),\n product_permalink: z.string().describe(\"Product permalink URL\").nullable(),\n used_social_discount: z.boolean().describe(\"Whether social discount was used\").nullable(),\n promoted_by_affiliate: z.boolean().describe(\"Whether purchase was promoted by an affiliate\").nullable(),\n used_upgrade_discount: z.boolean().describe(\"Whether upgrade discount was used\").nullable(),\n used_cross_sell_discount: z.boolean().describe(\"Whether cross-sell discount was used\").nullable(),\n}).describe(\"Details of an item in the refunded event\");\nexport const PayhipWebhookEventRefundedOutput = z.object({\n id: z.string().nullable(),\n type: z.string().nullable(),\n email: z.string().nullable(),\n items: z.array(PayhipWebhookEventRefunded_PayhipWebhookEventRefundedItemSchema),\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 date_created: z.number().int().nullable(),\n payment_type: z.string().nullable(),\n date_refunded: z.number().int().nullable(),\n amount_refunded: z.number().int().nullable(),\n unconsented_from_emails: z.boolean().nullable(),\n}).describe(\"Response model for Payhip refunded webhook event.\");\n\nexport const payhipWebhookEventRefunded = action(\"PAYHIP_WEBHOOK_EVENT_REFUNDED\", {\n slug: \"payhip-webhook-event-refunded\",\n name: \"Webhook Event - Refunded Payment\",\n description: \"Tool to process Payhip's refunded webhook event. Use when handling a payment refund event from Payhip.\",\n input: PayhipWebhookEventRefundedInput,\n output: PayhipWebhookEventRefundedOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkC,EAAE,OAAO;CACtD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,gBAAgB;CACxC,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CACjD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CAChD,OAAO,EAAE,MAAM,EAAE,OAAO;EACxB,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,6BAA6B;EAC3D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB;EAClD,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;EACnE,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,+BAA+B;EACjE,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa;EAC9C,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,yBAAyB;EAC3D,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;EACvD,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;EAC9D,sBAAsB,EAAE,QAAQ,CAAC,CAAC,SAAS,kCAAkC;EAC7E,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,+CAA+C;EAC3F,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC;EAC/E,0BAA0B,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC;CACvF,CAAC,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,CAAC,SAAS,2CAA2C;
|
|
1
|
+
{"version":3,"file":"webhook-event-refunded.mjs","names":[],"sources":["../../src/actions/webhook-event-refunded.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventRefundedInput = z.object({\n id: z.string().describe(\"Transaction ID\"),\n type: z.string().describe(\"Event type identifier\"),\n email: z.string().describe(\"Buyer email address\"),\n items: z.array(z.object({\n on_sale: z.boolean().describe(\"Whether product was on sale\"),\n quantity: z.string().describe(\"Quantity purchased\"),\n product_id: z.string().describe(\"Unique identifier for the product\"),\n has_variant: z.boolean().describe(\"Whether product has a variant\"),\n product_key: z.string().describe(\"Product key\"),\n used_coupon: z.boolean().describe(\"Whether coupon was used\"),\n product_name: z.string().describe(\"Name of the product\"),\n product_permalink: z.string().describe(\"Product permalink URL\"),\n used_social_discount: z.boolean().describe(\"Whether social discount was used\"),\n promoted_by_affiliate: z.boolean().describe(\"Whether purchase was promoted by an affiliate\"),\n used_upgrade_discount: z.boolean().describe(\"Whether upgrade discount was used\"),\n used_cross_sell_discount: z.boolean().describe(\"Whether cross-sell discount was used\"),\n}).passthrough().describe(\"Details of an item in the refunded event\")).describe(\"List of items included in the transaction\"),\n price: z.number().int().describe(\"Original price in cents or pennies\"),\n is_gift: z.boolean().describe(\"Whether purchase was a gift\"),\n currency: z.string().describe(\"ISO 4217 currency code, e.g., USD\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n ip_address: z.string().describe(\"IP address of the buyer\"),\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\"),\n date_created: z.number().int().describe(\"Unix timestamp when transaction was created\"),\n payment_type: z.string().describe(\"Payment method used, e.g., card\"),\n date_refunded: z.number().int().describe(\"Unix timestamp when refund occurred\"),\n amount_refunded: z.number().int().describe(\"Amount refunded in cents or pennies\"),\n unconsented_from_emails: z.boolean().describe(\"Whether buyer did not consent to marketing emails\"),\n}).describe(\"Request model for Payhip refunded webhook event.\");\nconst PayhipWebhookEventRefunded_PayhipWebhookEventRefundedItemSchema = z.object({\n on_sale: z.boolean().describe(\"Whether product was on sale\").nullable(),\n quantity: z.string().describe(\"Quantity purchased\").nullable(),\n product_id: z.string().describe(\"Unique identifier for the product\").nullable(),\n has_variant: z.boolean().describe(\"Whether product has a variant\").nullable(),\n product_key: z.string().describe(\"Product key\").nullable(),\n used_coupon: z.boolean().describe(\"Whether coupon was used\").nullable(),\n product_name: z.string().describe(\"Name of the product\").nullable(),\n product_permalink: z.string().describe(\"Product permalink URL\").nullable(),\n used_social_discount: z.boolean().describe(\"Whether social discount was used\").nullable(),\n promoted_by_affiliate: z.boolean().describe(\"Whether purchase was promoted by an affiliate\").nullable(),\n used_upgrade_discount: z.boolean().describe(\"Whether upgrade discount was used\").nullable(),\n used_cross_sell_discount: z.boolean().describe(\"Whether cross-sell discount was used\").nullable(),\n}).passthrough().describe(\"Details of an item in the refunded event\");\nexport const PayhipWebhookEventRefundedOutput = z.object({\n id: z.string().nullable(),\n type: z.string().nullable(),\n email: z.string().nullable(),\n items: z.array(PayhipWebhookEventRefunded_PayhipWebhookEventRefundedItemSchema),\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 date_created: z.number().int().nullable(),\n payment_type: z.string().nullable(),\n date_refunded: z.number().int().nullable(),\n amount_refunded: z.number().int().nullable(),\n unconsented_from_emails: z.boolean().nullable(),\n}).passthrough().describe(\"Response model for Payhip refunded webhook event.\");\n\nexport const payhipWebhookEventRefunded = action(\"PAYHIP_WEBHOOK_EVENT_REFUNDED\", {\n slug: \"payhip-webhook-event-refunded\",\n name: \"Webhook Event - Refunded Payment\",\n description: \"Tool to process Payhip's refunded webhook event. Use when handling a payment refund event from Payhip.\",\n input: PayhipWebhookEventRefundedInput,\n output: PayhipWebhookEventRefundedOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkC,EAAE,OAAO;CACtD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,gBAAgB;CACxC,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CACjD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CAChD,OAAO,EAAE,MAAM,EAAE,OAAO;EACxB,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,6BAA6B;EAC3D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB;EAClD,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;EACnE,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,+BAA+B;EACjE,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa;EAC9C,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,yBAAyB;EAC3D,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;EACvD,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;EAC9D,sBAAsB,EAAE,QAAQ,CAAC,CAAC,SAAS,kCAAkC;EAC7E,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,+CAA+C;EAC3F,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC;EAC/E,0BAA0B,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC;CACvF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS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EAClC,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;EACxC,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS;EAClC,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;EACzC,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;EAC3C,yBAAyB,EAAE,QAAQ,CAAC,CAAC,SAAS;CAChD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,mDAOhB;AACV,CAAC"}
|
|
@@ -30,7 +30,7 @@ const PayhipWebhookEventSubscriptionCreatedOutput = zod.z.object({
|
|
|
30
30
|
customer_last_name: zod.z.string().nullable(),
|
|
31
31
|
customer_first_name: zod.z.string().nullable(),
|
|
32
32
|
date_subscription_started: zod.z.number().int().nullable()
|
|
33
|
-
}).describe("Response model for Payhip subscription.created webhook event.");
|
|
33
|
+
}).passthrough().describe("Response model for Payhip subscription.created webhook event.");
|
|
34
34
|
const payhipWebhookEventSubscriptionCreated = require_action.action("PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_CREATED", {
|
|
35
35
|
slug: "payhip-webhook-event-subscription-created",
|
|
36
36
|
name: "Webhook Event - Subscription Created",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-event-subscription-created.cjs","names":["z","action"],"sources":["../../src/actions/webhook-event-subscription-created.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventSubscriptionCreatedInput = z.object({\n type: z.string().describe(\"Event type identifier\"),\n status: z.string().describe(\"Subscription status at creation; always 'active' for this event\"),\n plan_name: z.string().describe(\"Name of the subscription plan\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n customer_id: z.string().describe(\"Unique identifier for the customer\"),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).describe(\"Customer's GDPR consent status\"),\n product_link: z.string().describe(\"Payhip product link identifier\"),\n product_name: z.string().describe(\"Name of the product\"),\n customer_email: z.string().nullable(),\n subscription_id: z.string().describe(\"Unique identifier for the subscription\"),\n customer_last_name: z.string().describe(\"Customer's last name\"),\n customer_first_name: z.string().describe(\"Customer's first name\"),\n date_subscription_started: z.number().int().describe(\"Unix timestamp when the subscription started\"),\n}).describe(\"Request model for Payhip subscription.created webhook event.\");\nexport const PayhipWebhookEventSubscriptionCreatedOutput = z.object({\n type: z.string().nullable(),\n status: z.string().nullable(),\n plan_name: z.string().nullable(),\n signature: z.string().nullable(),\n customer_id: z.string().nullable(),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).nullable(),\n product_link: z.string().nullable(),\n product_name: z.string().nullable(),\n customer_email: z.string().nullable(),\n subscription_id: z.string().nullable(),\n customer_last_name: z.string().nullable(),\n customer_first_name: z.string().nullable(),\n date_subscription_started: z.number().int().nullable(),\n}).describe(\"Response model for Payhip subscription.created webhook event.\");\n\nexport const payhipWebhookEventSubscriptionCreated = action(\"PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_CREATED\", {\n slug: \"payhip-webhook-event-subscription-created\",\n name: \"Webhook Event - Subscription Created\",\n description: \"Tool to process Payhip's subscription.created webhook event. Use when handling a subscription start event from Payhip.\",\n input: PayhipWebhookEventSubscriptionCreatedInput,\n output: PayhipWebhookEventSubscriptionCreatedOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6CAA6CA,IAAAA,EAAE,OAAO;CACjE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CACjD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE;CAC7F,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;CAC9D,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D;CACzF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC;CACrE,cAAcA,IAAAA,EAAE,KAAK,CAAC,OAAO,I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AAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;AACvD,CAAC,CAAC,CAAC,SAAS,+DAA+D;
|
|
1
|
+
{"version":3,"file":"webhook-event-subscription-created.cjs","names":["z","action"],"sources":["../../src/actions/webhook-event-subscription-created.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventSubscriptionCreatedInput = z.object({\n type: z.string().describe(\"Event type identifier\"),\n status: z.string().describe(\"Subscription status at creation; always 'active' for this event\"),\n plan_name: z.string().describe(\"Name of the subscription plan\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n customer_id: z.string().describe(\"Unique identifier for the customer\"),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).describe(\"Customer's GDPR consent status\"),\n product_link: z.string().describe(\"Payhip product link identifier\"),\n product_name: z.string().describe(\"Name of the product\"),\n customer_email: z.string().nullable(),\n subscription_id: z.string().describe(\"Unique identifier for the subscription\"),\n customer_last_name: z.string().describe(\"Customer's last name\"),\n customer_first_name: z.string().describe(\"Customer's first name\"),\n date_subscription_started: z.number().int().describe(\"Unix timestamp when the subscription started\"),\n}).describe(\"Request model for Payhip subscription.created webhook event.\");\nexport const PayhipWebhookEventSubscriptionCreatedOutput = z.object({\n type: z.string().nullable(),\n status: z.string().nullable(),\n plan_name: z.string().nullable(),\n signature: z.string().nullable(),\n customer_id: z.string().nullable(),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).nullable(),\n product_link: z.string().nullable(),\n product_name: z.string().nullable(),\n customer_email: z.string().nullable(),\n subscription_id: z.string().nullable(),\n customer_last_name: z.string().nullable(),\n customer_first_name: z.string().nullable(),\n date_subscription_started: z.number().int().nullable(),\n}).passthrough().describe(\"Response model for Payhip subscription.created webhook event.\");\n\nexport const payhipWebhookEventSubscriptionCreated = action(\"PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_CREATED\", {\n slug: \"payhip-webhook-event-subscription-created\",\n name: \"Webhook Event - Subscription Created\",\n description: \"Tool to process Payhip's subscription.created webhook event. Use when handling a subscription start event from Payhip.\",\n input: PayhipWebhookEventSubscriptionCreatedInput,\n output: PayhipWebhookEventSubscriptionCreatedOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6CAA6CA,IAAAA,EAAE,OAAO;CACjE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CACjD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE;CAC7F,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;CAC9D,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D;CACzF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC;CACrE,cAAcA,IAAAA,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,gCAAgC;CAC7E,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAClE,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CACvD,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACpC,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;CAC7E,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB;CAC9D,qBAAqBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CAChE,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8CAA8C;AACrG,CAAC,CAAC,CAAC,SAAS,8DAA8D;AAC1E,MAAa,8CAA8CA,IAAAA,EAAE,OAAO;CAClE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC1B,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACjC,cAAcA,IAAAA,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS;CAC7C,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACpC,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACrC,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACxC,qBAAqBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACzC,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;AACvD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+DAA+D;AAEzF,MAAa,wCAAwCC,eAAAA,OAAO,6CAA6C;CACvG,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -36,7 +36,7 @@ declare const PayhipWebhookEventSubscriptionCreatedOutput: z.ZodObject<{
|
|
|
36
36
|
customer_last_name: z.ZodNullable<z.ZodString>;
|
|
37
37
|
customer_first_name: z.ZodNullable<z.ZodString>;
|
|
38
38
|
date_subscription_started: z.ZodNullable<z.ZodNumber>;
|
|
39
|
-
}, z.core.$
|
|
39
|
+
}, z.core.$loose>;
|
|
40
40
|
declare const payhipWebhookEventSubscriptionCreated: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
41
41
|
type: string;
|
|
42
42
|
status: string;
|
|
@@ -36,7 +36,7 @@ declare const PayhipWebhookEventSubscriptionCreatedOutput: z.ZodObject<{
|
|
|
36
36
|
customer_last_name: z.ZodNullable<z.ZodString>;
|
|
37
37
|
customer_first_name: z.ZodNullable<z.ZodString>;
|
|
38
38
|
date_subscription_started: z.ZodNullable<z.ZodNumber>;
|
|
39
|
-
}, z.core.$
|
|
39
|
+
}, z.core.$loose>;
|
|
40
40
|
declare const payhipWebhookEventSubscriptionCreated: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
41
41
|
type: string;
|
|
42
42
|
status: string;
|
|
@@ -33,7 +33,7 @@ const payhipWebhookEventSubscriptionCreated = action("PAYHIP_WEBHOOK_EVENT_SUBSC
|
|
|
33
33
|
customer_last_name: z.string().nullable(),
|
|
34
34
|
customer_first_name: z.string().nullable(),
|
|
35
35
|
date_subscription_started: z.number().int().nullable()
|
|
36
|
-
}).describe("Response model for Payhip subscription.created webhook event.")
|
|
36
|
+
}).passthrough().describe("Response model for Payhip subscription.created webhook event.")
|
|
37
37
|
});
|
|
38
38
|
//#endregion
|
|
39
39
|
export { payhipWebhookEventSubscriptionCreated };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-event-subscription-created.mjs","names":[],"sources":["../../src/actions/webhook-event-subscription-created.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventSubscriptionCreatedInput = z.object({\n type: z.string().describe(\"Event type identifier\"),\n status: z.string().describe(\"Subscription status at creation; always 'active' for this event\"),\n plan_name: z.string().describe(\"Name of the subscription plan\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n customer_id: z.string().describe(\"Unique identifier for the customer\"),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).describe(\"Customer's GDPR consent status\"),\n product_link: z.string().describe(\"Payhip product link identifier\"),\n product_name: z.string().describe(\"Name of the product\"),\n customer_email: z.string().nullable(),\n subscription_id: z.string().describe(\"Unique identifier for the subscription\"),\n customer_last_name: z.string().describe(\"Customer's last name\"),\n customer_first_name: z.string().describe(\"Customer's first name\"),\n date_subscription_started: z.number().int().describe(\"Unix timestamp when the subscription started\"),\n}).describe(\"Request model for Payhip subscription.created webhook event.\");\nexport const PayhipWebhookEventSubscriptionCreatedOutput = z.object({\n type: z.string().nullable(),\n status: z.string().nullable(),\n plan_name: z.string().nullable(),\n signature: z.string().nullable(),\n customer_id: z.string().nullable(),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).nullable(),\n product_link: z.string().nullable(),\n product_name: z.string().nullable(),\n customer_email: z.string().nullable(),\n subscription_id: z.string().nullable(),\n customer_last_name: z.string().nullable(),\n customer_first_name: z.string().nullable(),\n date_subscription_started: z.number().int().nullable(),\n}).describe(\"Response model for Payhip subscription.created webhook event.\");\n\nexport const payhipWebhookEventSubscriptionCreated = action(\"PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_CREATED\", {\n slug: \"payhip-webhook-event-subscription-created\",\n name: \"Webhook Event - Subscription Created\",\n description: \"Tool to process Payhip's subscription.created webhook event. Use when handling a subscription start event from Payhip.\",\n input: PayhipWebhookEventSubscriptionCreatedInput,\n output: PayhipWebhookEventSubscriptionCreatedOutput,\n});\n"],"mappings":";;AAmCA,MAAa,wCAAwC,OAAO,6CAA6C;CACvG,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAnCwD,EAAE,OAAO;EACjE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;EACjD,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE;EAC7F,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;EAC9D,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D;EACzF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC;EACrE,cAAc,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,gCAAgC;EAC7E,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;EAClE,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;EACvD,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS;EACpC,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;EAC7E,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB;EAC9D,qBAAqB,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;EAChE,2BAA2B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8CAA8C;CACrG,CAAC,CAAC,CAAC,SAAS,8DAqBH;CACP,QArByD,EAAE,OAAO;EAClE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;EAC1B,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;EAC5B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;EAC/B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;EAC/B,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;EACjC,cAAc,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS;EAC7C,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS;EAClC,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS;EAClC,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS;EACpC,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS;EACrC,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS;EACxC,qBAAqB,EAAE,OAAO,CAAC,CAAC,SAAS;EACzC,2BAA2B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACvD,CAAC,CAAC,CAAC,SAAS,+
|
|
1
|
+
{"version":3,"file":"webhook-event-subscription-created.mjs","names":[],"sources":["../../src/actions/webhook-event-subscription-created.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventSubscriptionCreatedInput = z.object({\n type: z.string().describe(\"Event type identifier\"),\n status: z.string().describe(\"Subscription status at creation; always 'active' for this event\"),\n plan_name: z.string().describe(\"Name of the subscription plan\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n customer_id: z.string().describe(\"Unique identifier for the customer\"),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).describe(\"Customer's GDPR consent status\"),\n product_link: z.string().describe(\"Payhip product link identifier\"),\n product_name: z.string().describe(\"Name of the product\"),\n customer_email: z.string().nullable(),\n subscription_id: z.string().describe(\"Unique identifier for the subscription\"),\n customer_last_name: z.string().describe(\"Customer's last name\"),\n customer_first_name: z.string().describe(\"Customer's first name\"),\n date_subscription_started: z.number().int().describe(\"Unix timestamp when the subscription started\"),\n}).describe(\"Request model for Payhip subscription.created webhook event.\");\nexport const PayhipWebhookEventSubscriptionCreatedOutput = z.object({\n type: z.string().nullable(),\n status: z.string().nullable(),\n plan_name: z.string().nullable(),\n signature: z.string().nullable(),\n customer_id: z.string().nullable(),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).nullable(),\n product_link: z.string().nullable(),\n product_name: z.string().nullable(),\n customer_email: z.string().nullable(),\n subscription_id: z.string().nullable(),\n customer_last_name: z.string().nullable(),\n customer_first_name: z.string().nullable(),\n date_subscription_started: z.number().int().nullable(),\n}).passthrough().describe(\"Response model for Payhip subscription.created webhook event.\");\n\nexport const payhipWebhookEventSubscriptionCreated = action(\"PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_CREATED\", {\n slug: \"payhip-webhook-event-subscription-created\",\n name: \"Webhook Event - Subscription Created\",\n description: \"Tool to process Payhip's subscription.created webhook event. Use when handling a subscription start event from Payhip.\",\n input: PayhipWebhookEventSubscriptionCreatedInput,\n output: PayhipWebhookEventSubscriptionCreatedOutput,\n});\n"],"mappings":";;AAmCA,MAAa,wCAAwC,OAAO,6CAA6C;CACvG,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAnCwD,EAAE,OAAO;EACjE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;EACjD,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE;EAC7F,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;EAC9D,WAAW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CAAC,YAAY,CAAC,CAAC,SAAS,+DAOhB;AACV,CAAC"}
|
|
@@ -32,7 +32,7 @@ const PayhipWebhookEventSubscriptionDeletedOutput = zod.z.object({
|
|
|
32
32
|
customer_first_name: zod.z.string().nullable(),
|
|
33
33
|
date_subscription_deleted: zod.z.number().int().nullable(),
|
|
34
34
|
date_subscription_started: zod.z.number().int().nullable()
|
|
35
|
-
}).describe("Response model for Payhip 'subscription.deleted' webhook event.");
|
|
35
|
+
}).passthrough().describe("Response model for Payhip 'subscription.deleted' webhook event.");
|
|
36
36
|
const payhipWebhookEventSubscriptionDeleted = require_action.action("PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_DELETED", {
|
|
37
37
|
slug: "payhip-webhook-event-subscription-deleted",
|
|
38
38
|
name: "Webhook Event - Subscription Deleted",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-event-subscription-deleted.cjs","names":["z","action"],"sources":["../../src/actions/webhook-event-subscription-deleted.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventSubscriptionDeletedInput = z.object({\n type: z.string().describe(\"Event type identifier\"),\n status: z.string().describe(\"Current subscription status; always 'canceled' for this event\"),\n plan_name: z.string().describe(\"Name of the subscription plan\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n customer_id: z.string().describe(\"Unique identifier for the customer\"),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).describe(\"Whether the customer gave GDPR consent ('Yes' or 'No')\"),\n product_link: z.string().describe(\"Payhip product link identifier\"),\n product_name: z.string().describe(\"Name of the product\"),\n customer_email: z.string().describe(\"Customer's email address\"),\n subscription_id: z.string().describe(\"Unique identifier for the subscription\"),\n customer_last_name: z.string().describe(\"Customer's last name\"),\n customer_first_name: z.string().describe(\"Customer's first name\"),\n date_subscription_deleted: z.number().int().describe(\"Unix timestamp when subscription was canceled\"),\n date_subscription_started: z.number().int().describe(\"Unix timestamp when subscription started\"),\n}).describe(\"Request model for Payhip 'subscription.deleted' webhook event.\");\nexport const PayhipWebhookEventSubscriptionDeletedOutput = z.object({\n type: z.string().nullable(),\n status: z.string().nullable(),\n plan_name: z.string().nullable(),\n signature: z.string().nullable(),\n customer_id: z.string().nullable(),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).nullable(),\n product_link: z.string().nullable(),\n product_name: z.string().nullable(),\n customer_email: z.string().nullable(),\n subscription_id: z.string().nullable(),\n customer_last_name: z.string().nullable(),\n customer_first_name: z.string().nullable(),\n date_subscription_deleted: z.number().int().nullable(),\n date_subscription_started: z.number().int().nullable(),\n}).describe(\"Response model for Payhip 'subscription.deleted' webhook event.\");\n\nexport const payhipWebhookEventSubscriptionDeleted = action(\"PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_DELETED\", {\n slug: \"payhip-webhook-event-subscription-deleted\",\n name: \"Webhook Event - Subscription Deleted\",\n description: \"Tool to process Payhip's 'subscription.deleted' webhook event. Use when handling a subscription cancellation event from Payhip.\",\n input: PayhipWebhookEventSubscriptionDeletedInput,\n output: PayhipWebhookEventSubscriptionDeletedOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6CAA6CA,IAAAA,EAAE,OAAO;CACjE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CACjD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;CAC3F,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;CAC9D,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D;CACzF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC;CACrE,cAAcA,IAAAA,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,wDAAwD;CACrG,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAClE,cAAcA,IAAAA,EAAE,OAAO,C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ACrD,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;AACvD,CAAC,CAAC,CAAC,SAAS,iEAAiE;
|
|
1
|
+
{"version":3,"file":"webhook-event-subscription-deleted.cjs","names":["z","action"],"sources":["../../src/actions/webhook-event-subscription-deleted.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventSubscriptionDeletedInput = z.object({\n type: z.string().describe(\"Event type identifier\"),\n status: z.string().describe(\"Current subscription status; always 'canceled' for this event\"),\n plan_name: z.string().describe(\"Name of the subscription plan\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n customer_id: z.string().describe(\"Unique identifier for the customer\"),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).describe(\"Whether the customer gave GDPR consent ('Yes' or 'No')\"),\n product_link: z.string().describe(\"Payhip product link identifier\"),\n product_name: z.string().describe(\"Name of the product\"),\n customer_email: z.string().describe(\"Customer's email address\"),\n subscription_id: z.string().describe(\"Unique identifier for the subscription\"),\n customer_last_name: z.string().describe(\"Customer's last name\"),\n customer_first_name: z.string().describe(\"Customer's first name\"),\n date_subscription_deleted: z.number().int().describe(\"Unix timestamp when subscription was canceled\"),\n date_subscription_started: z.number().int().describe(\"Unix timestamp when subscription started\"),\n}).describe(\"Request model for Payhip 'subscription.deleted' webhook event.\");\nexport const PayhipWebhookEventSubscriptionDeletedOutput = z.object({\n type: z.string().nullable(),\n status: z.string().nullable(),\n plan_name: z.string().nullable(),\n signature: z.string().nullable(),\n customer_id: z.string().nullable(),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).nullable(),\n product_link: z.string().nullable(),\n product_name: z.string().nullable(),\n customer_email: z.string().nullable(),\n subscription_id: z.string().nullable(),\n customer_last_name: z.string().nullable(),\n customer_first_name: z.string().nullable(),\n date_subscription_deleted: z.number().int().nullable(),\n date_subscription_started: z.number().int().nullable(),\n}).passthrough().describe(\"Response model for Payhip 'subscription.deleted' webhook event.\");\n\nexport const payhipWebhookEventSubscriptionDeleted = action(\"PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_DELETED\", {\n slug: \"payhip-webhook-event-subscription-deleted\",\n name: \"Webhook Event - Subscription Deleted\",\n description: \"Tool to process Payhip's 'subscription.deleted' webhook event. Use when handling a subscription cancellation event from Payhip.\",\n input: PayhipWebhookEventSubscriptionDeletedInput,\n output: PayhipWebhookEventSubscriptionDeletedOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6CAA6CA,IAAAA,EAAE,OAAO;CACjE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CACjD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;CAC3F,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;CAC9D,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D;CACzF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC;CACrE,cAAcA,IAAAA,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,wDAAwD;CACrG,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAClE,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CACvD,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;CAC9D,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;CAC7E,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB;CAC9D,qBAAqBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;CAChE,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+CAA+C;CACpG,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0CAA0C;AACjG,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAC5E,MAAa,8CAA8CA,IAAAA,EAAE,OAAO;CAClE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC1B,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACjC,cAAcA,IAAAA,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS;CAC7C,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACpC,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACrC,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACxC,qBAAqBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACzC,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACrD,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;AACvD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iEAAiE;AAE3F,MAAa,wCAAwCC,eAAAA,OAAO,6CAA6C;CACvG,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -38,7 +38,7 @@ declare const PayhipWebhookEventSubscriptionDeletedOutput: z.ZodObject<{
|
|
|
38
38
|
customer_first_name: z.ZodNullable<z.ZodString>;
|
|
39
39
|
date_subscription_deleted: z.ZodNullable<z.ZodNumber>;
|
|
40
40
|
date_subscription_started: z.ZodNullable<z.ZodNumber>;
|
|
41
|
-
}, z.core.$
|
|
41
|
+
}, z.core.$loose>;
|
|
42
42
|
declare const payhipWebhookEventSubscriptionDeleted: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
43
43
|
type: string;
|
|
44
44
|
status: string;
|
|
@@ -38,7 +38,7 @@ declare const PayhipWebhookEventSubscriptionDeletedOutput: z.ZodObject<{
|
|
|
38
38
|
customer_first_name: z.ZodNullable<z.ZodString>;
|
|
39
39
|
date_subscription_deleted: z.ZodNullable<z.ZodNumber>;
|
|
40
40
|
date_subscription_started: z.ZodNullable<z.ZodNumber>;
|
|
41
|
-
}, z.core.$
|
|
41
|
+
}, z.core.$loose>;
|
|
42
42
|
declare const payhipWebhookEventSubscriptionDeleted: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
43
43
|
type: string;
|
|
44
44
|
status: string;
|
|
@@ -35,7 +35,7 @@ const payhipWebhookEventSubscriptionDeleted = action("PAYHIP_WEBHOOK_EVENT_SUBSC
|
|
|
35
35
|
customer_first_name: z.string().nullable(),
|
|
36
36
|
date_subscription_deleted: z.number().int().nullable(),
|
|
37
37
|
date_subscription_started: z.number().int().nullable()
|
|
38
|
-
}).describe("Response model for Payhip 'subscription.deleted' webhook event.")
|
|
38
|
+
}).passthrough().describe("Response model for Payhip 'subscription.deleted' webhook event.")
|
|
39
39
|
});
|
|
40
40
|
//#endregion
|
|
41
41
|
export { payhipWebhookEventSubscriptionDeleted };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-event-subscription-deleted.mjs","names":[],"sources":["../../src/actions/webhook-event-subscription-deleted.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventSubscriptionDeletedInput = z.object({\n type: z.string().describe(\"Event type identifier\"),\n status: z.string().describe(\"Current subscription status; always 'canceled' for this event\"),\n plan_name: z.string().describe(\"Name of the subscription plan\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n customer_id: z.string().describe(\"Unique identifier for the customer\"),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).describe(\"Whether the customer gave GDPR consent ('Yes' or 'No')\"),\n product_link: z.string().describe(\"Payhip product link identifier\"),\n product_name: z.string().describe(\"Name of the product\"),\n customer_email: z.string().describe(\"Customer's email address\"),\n subscription_id: z.string().describe(\"Unique identifier for the subscription\"),\n customer_last_name: z.string().describe(\"Customer's last name\"),\n customer_first_name: z.string().describe(\"Customer's first name\"),\n date_subscription_deleted: z.number().int().describe(\"Unix timestamp when subscription was canceled\"),\n date_subscription_started: z.number().int().describe(\"Unix timestamp when subscription started\"),\n}).describe(\"Request model for Payhip 'subscription.deleted' webhook event.\");\nexport const PayhipWebhookEventSubscriptionDeletedOutput = z.object({\n type: z.string().nullable(),\n status: z.string().nullable(),\n plan_name: z.string().nullable(),\n signature: z.string().nullable(),\n customer_id: z.string().nullable(),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).nullable(),\n product_link: z.string().nullable(),\n product_name: z.string().nullable(),\n customer_email: z.string().nullable(),\n subscription_id: z.string().nullable(),\n customer_last_name: z.string().nullable(),\n customer_first_name: z.string().nullable(),\n date_subscription_deleted: z.number().int().nullable(),\n date_subscription_started: z.number().int().nullable(),\n}).describe(\"Response model for Payhip 'subscription.deleted' webhook event.\");\n\nexport const payhipWebhookEventSubscriptionDeleted = action(\"PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_DELETED\", {\n slug: \"payhip-webhook-event-subscription-deleted\",\n name: \"Webhook Event - Subscription Deleted\",\n description: \"Tool to process Payhip's 'subscription.deleted' webhook event. Use when handling a subscription cancellation event from Payhip.\",\n input: PayhipWebhookEventSubscriptionDeletedInput,\n output: PayhipWebhookEventSubscriptionDeletedOutput,\n});\n"],"mappings":";;AAqCA,MAAa,wCAAwC,OAAO,6CAA6C;CACvG,MAAM;CACN,MAAM;CACN,aAAa;CACb,OArCwD,EAAE,OAAO;EACjE,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E,OAAO,CAAC,CAAC,SAAS;EACpC,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS;EACrC,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS;EACxC,qBAAqB,EAAE,OAAO,CAAC,CAAC,SAAS;EACzC,2BAA2B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;EACrD,2BAA2B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;CACvD,CAAC,CAAC,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"webhook-event-subscription-deleted.mjs","names":[],"sources":["../../src/actions/webhook-event-subscription-deleted.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipWebhookEventSubscriptionDeletedInput = z.object({\n type: z.string().describe(\"Event type identifier\"),\n status: z.string().describe(\"Current subscription status; always 'canceled' for this event\"),\n plan_name: z.string().describe(\"Name of the subscription plan\"),\n signature: z.string().describe(\"HMAC SHA-256 signature of the payload using your API key\"),\n customer_id: z.string().describe(\"Unique identifier for the customer\"),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).describe(\"Whether the customer gave GDPR consent ('Yes' or 'No')\"),\n product_link: z.string().describe(\"Payhip product link identifier\"),\n product_name: z.string().describe(\"Name of the product\"),\n customer_email: z.string().describe(\"Customer's email address\"),\n subscription_id: z.string().describe(\"Unique identifier for the subscription\"),\n customer_last_name: z.string().describe(\"Customer's last name\"),\n customer_first_name: z.string().describe(\"Customer's first name\"),\n date_subscription_deleted: z.number().int().describe(\"Unix timestamp when subscription was canceled\"),\n date_subscription_started: z.number().int().describe(\"Unix timestamp when subscription started\"),\n}).describe(\"Request model for Payhip 'subscription.deleted' webhook event.\");\nexport const PayhipWebhookEventSubscriptionDeletedOutput = z.object({\n type: z.string().nullable(),\n status: z.string().nullable(),\n plan_name: z.string().nullable(),\n signature: z.string().nullable(),\n customer_id: z.string().nullable(),\n gdpr_consent: z.enum([\"Yes\", \"No\"]).nullable(),\n product_link: z.string().nullable(),\n product_name: z.string().nullable(),\n customer_email: z.string().nullable(),\n subscription_id: z.string().nullable(),\n customer_last_name: z.string().nullable(),\n customer_first_name: z.string().nullable(),\n date_subscription_deleted: z.number().int().nullable(),\n date_subscription_started: z.number().int().nullable(),\n}).passthrough().describe(\"Response model for Payhip 'subscription.deleted' webhook event.\");\n\nexport const payhipWebhookEventSubscriptionDeleted = action(\"PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_DELETED\", {\n slug: \"payhip-webhook-event-subscription-deleted\",\n name: \"Webhook Event - Subscription Deleted\",\n description: \"Tool to process Payhip's 'subscription.deleted' webhook event. Use when handling a subscription cancellation event from Payhip.\",\n input: PayhipWebhookEventSubscriptionDeletedInput,\n output: PayhipWebhookEventSubscriptionDeletedOutput,\n});\n"],"mappings":";;AAqCA,MAAa,wCAAwC,OAAO,6CAA6C;CACvG,MAAM;CACN,MAAM;CACN,aAAa;CACb,OArCwD,EAAE,OAAO;EACjE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;EACjD,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;EAC3F,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;EAC9D,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D;EACzF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC;EACrE,cAAc,EAAE,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,wDAAwD;EACrG,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;EAClE,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;EACvD,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;EAC9D,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;EAC7E,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB;EAC9D,qBAAqB,EAAE,OAAO,CAAC,C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