@keystrokehq/payhip 0.1.4 → 0.1.6
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/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/create-coupon.cjs +1 -0
- package/dist/actions/create-coupon.cjs.map +1 -1
- package/dist/actions/create-coupon.d.cts +3 -10
- package/dist/actions/create-coupon.d.cts.map +1 -1
- package/dist/actions/create-coupon.d.mts +3 -10
- package/dist/actions/create-coupon.d.mts.map +1 -1
- package/dist/actions/create-coupon.mjs +1 -0
- package/dist/actions/create-coupon.mjs.map +1 -1
- package/dist/actions/delete-coupon.cjs +1 -0
- package/dist/actions/delete-coupon.cjs.map +1 -1
- package/dist/actions/delete-coupon.d.cts +3 -3
- package/dist/actions/delete-coupon.d.cts.map +1 -1
- package/dist/actions/delete-coupon.d.mts +3 -3
- package/dist/actions/delete-coupon.d.mts.map +1 -1
- package/dist/actions/delete-coupon.mjs +1 -0
- package/dist/actions/delete-coupon.mjs.map +1 -1
- package/dist/actions/get-coupon.cjs +1 -0
- package/dist/actions/get-coupon.cjs.map +1 -1
- package/dist/actions/get-coupon.d.cts +3 -3
- package/dist/actions/get-coupon.d.cts.map +1 -1
- package/dist/actions/get-coupon.d.mts +3 -3
- package/dist/actions/get-coupon.d.mts.map +1 -1
- package/dist/actions/get-coupon.mjs +1 -0
- package/dist/actions/get-coupon.mjs.map +1 -1
- package/dist/actions/update-coupon.cjs +1 -0
- package/dist/actions/update-coupon.cjs.map +1 -1
- package/dist/actions/update-coupon.d.cts +3 -8
- package/dist/actions/update-coupon.d.cts.map +1 -1
- package/dist/actions/update-coupon.d.mts +3 -8
- package/dist/actions/update-coupon.d.mts.map +1 -1
- package/dist/actions/update-coupon.mjs +1 -0
- package/dist/actions/update-coupon.mjs.map +1 -1
- package/dist/actions/verify-coupon.cjs +1 -0
- package/dist/actions/verify-coupon.cjs.map +1 -1
- package/dist/actions/verify-coupon.d.cts +3 -3
- package/dist/actions/verify-coupon.d.cts.map +1 -1
- package/dist/actions/verify-coupon.d.mts +3 -3
- package/dist/actions/verify-coupon.d.mts.map +1 -1
- package/dist/actions/verify-coupon.mjs +1 -0
- package/dist/actions/verify-coupon.mjs.map +1 -1
- package/dist/actions/webhook-event-paid.cjs +1 -0
- package/dist/actions/webhook-event-paid.cjs.map +1 -1
- package/dist/actions/webhook-event-paid.d.cts +3 -31
- package/dist/actions/webhook-event-paid.d.cts.map +1 -1
- package/dist/actions/webhook-event-paid.d.mts +3 -31
- package/dist/actions/webhook-event-paid.d.mts.map +1 -1
- package/dist/actions/webhook-event-paid.mjs +1 -0
- package/dist/actions/webhook-event-paid.mjs.map +1 -1
- package/dist/actions/webhook-event-refunded.cjs +1 -0
- package/dist/actions/webhook-event-refunded.cjs.map +1 -1
- package/dist/actions/webhook-event-refunded.d.cts +3 -33
- package/dist/actions/webhook-event-refunded.d.cts.map +1 -1
- package/dist/actions/webhook-event-refunded.d.mts +3 -33
- package/dist/actions/webhook-event-refunded.d.mts.map +1 -1
- package/dist/actions/webhook-event-refunded.mjs +1 -0
- package/dist/actions/webhook-event-refunded.mjs.map +1 -1
- package/dist/actions/webhook-event-subscription-created.cjs +1 -0
- package/dist/actions/webhook-event-subscription-created.cjs.map +1 -1
- package/dist/actions/webhook-event-subscription-created.d.cts +3 -15
- package/dist/actions/webhook-event-subscription-created.d.cts.map +1 -1
- package/dist/actions/webhook-event-subscription-created.d.mts +3 -15
- package/dist/actions/webhook-event-subscription-created.d.mts.map +1 -1
- package/dist/actions/webhook-event-subscription-created.mjs +1 -0
- package/dist/actions/webhook-event-subscription-created.mjs.map +1 -1
- package/dist/actions/webhook-event-subscription-deleted.cjs +1 -0
- package/dist/actions/webhook-event-subscription-deleted.cjs.map +1 -1
- package/dist/actions/webhook-event-subscription-deleted.d.cts +3 -16
- package/dist/actions/webhook-event-subscription-deleted.d.cts.map +1 -1
- package/dist/actions/webhook-event-subscription-deleted.d.mts +3 -16
- package/dist/actions/webhook-event-subscription-deleted.d.mts.map +1 -1
- package/dist/actions/webhook-event-subscription-deleted.mjs +1 -0
- package/dist/actions/webhook-event-subscription-deleted.mjs.map +1 -1
- package/dist/app.cjs +5 -2
- package/dist/app.cjs.map +1 -1
- package/dist/app.d.cts +7 -1
- package/dist/app.d.cts.map +1 -1
- package/dist/app.d.mts +7 -1
- package/dist/app.d.mts.map +1 -1
- package/dist/app.mjs +3 -2
- package/dist/app.mjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/package.json +2 -2
package/dist/action.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.cjs","names":["payhip","executePayhipTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhip } from \"./app\";\nimport { executePayhipTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output:
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["payhip","executePayhipTool"],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { payhip } from \"./app\";\nimport { executePayhipTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof payhip.credential> {\n return payhip.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executePayhipTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAOA,SAAgB,OACd,MACA,KAOsD;CACtD,OAAOA,YAAAA,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
|
package/dist/action.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhip } from \"./app\";\nimport { executePayhipTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output:
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { payhip } from \"./app\";\nimport { executePayhipTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof payhip.credential> {\n return payhip.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executePayhipTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAOA,SAAgB,OACd,MACA,KAOsD;CACtD,OAAO,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
|
|
@@ -1 +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}).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":"
|
|
1
|
+
{"version":3,"file":"create-coupon.cjs","names":["z","action"],"sources":["../../src/actions/create-coupon.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhip } from \"../app\";\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: AppAction<\n typeof PayhipCreateCouponInput,\n typeof PayhipCreateCouponOutput,\n typeof payhip.credential\n> = 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":";;;;AAMA,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,aAAa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AC5E,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9E,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7F,yBAAyBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACxG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sCAAsC;AAChE,MAAa,2BAA2BA,IAAAA,EAAE,OAAO,EAC/C,MAAM,oCAAoC,SAAS,EACrD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sCAAsC;AAEhE,MAAa,qBAITC,eAAAA,OAAO,wBAAwB;CACjC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhip } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-coupon.d.ts
|
|
@@ -31,16 +33,7 @@ declare const PayhipCreateCouponOutput: z.ZodObject<{
|
|
|
31
33
|
minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
32
34
|
}, z.core.$loose>>;
|
|
33
35
|
}, z.core.$loose>;
|
|
34
|
-
declare const payhipCreateCoupon:
|
|
35
|
-
code: string;
|
|
36
|
-
coupon_type: "single" | "multi" | "collection";
|
|
37
|
-
notes?: string | undefined;
|
|
38
|
-
amount_off?: number | undefined;
|
|
39
|
-
percent_off?: number | undefined;
|
|
40
|
-
product_key?: string | undefined;
|
|
41
|
-
usage_limit?: number | undefined;
|
|
42
|
-
collection_id?: string | undefined;
|
|
43
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
36
|
+
declare const payhipCreateCoupon: AppAction<typeof PayhipCreateCouponInput, typeof PayhipCreateCouponOutput, typeof payhip.credential>;
|
|
44
37
|
//#endregion
|
|
45
38
|
export { payhipCreateCoupon };
|
|
46
39
|
//# sourceMappingURL=create-coupon.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-coupon.d.cts","names":[],"sources":["../../src/actions/create-coupon.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-coupon.d.cts","names":[],"sources":["../../src/actions/create-coupon.ts"],"mappings":";;;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAwBvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;cAIxB,kBAAA,EAAoB,SAAA,QACxB,uBAAA,SACA,wBAAA,SACA,MAAA,CAAO,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhip } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-coupon.d.ts
|
|
@@ -31,16 +33,7 @@ declare const PayhipCreateCouponOutput: z.ZodObject<{
|
|
|
31
33
|
minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
32
34
|
}, z.core.$loose>>;
|
|
33
35
|
}, z.core.$loose>;
|
|
34
|
-
declare const payhipCreateCoupon:
|
|
35
|
-
code: string;
|
|
36
|
-
coupon_type: "single" | "multi" | "collection";
|
|
37
|
-
notes?: string | undefined;
|
|
38
|
-
amount_off?: number | undefined;
|
|
39
|
-
percent_off?: number | undefined;
|
|
40
|
-
product_key?: string | undefined;
|
|
41
|
-
usage_limit?: number | undefined;
|
|
42
|
-
collection_id?: string | undefined;
|
|
43
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
36
|
+
declare const payhipCreateCoupon: AppAction<typeof PayhipCreateCouponInput, typeof PayhipCreateCouponOutput, typeof payhip.credential>;
|
|
44
37
|
//#endregion
|
|
45
38
|
export { payhipCreateCoupon };
|
|
46
39
|
//# sourceMappingURL=create-coupon.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-coupon.d.mts","names":[],"sources":["../../src/actions/create-coupon.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-coupon.d.mts","names":[],"sources":["../../src/actions/create-coupon.ts"],"mappings":";;;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAwBvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;cAIxB,kBAAA,EAAoB,SAAA,QACxB,uBAAA,SACA,wBAAA,SACA,MAAA,CAAO,UAAA"}
|
|
@@ -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}).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":"
|
|
1
|
+
{"version":3,"file":"create-coupon.mjs","names":[],"sources":["../../src/actions/create-coupon.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhip } from \"../app\";\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: AppAction<\n typeof PayhipCreateCouponInput,\n typeof PayhipCreateCouponOutput,\n typeof payhip.credential\n> = 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":";;;;AAMA,MAAa,0BAA0B,EAAE,OAAO;CAC9C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D;CACzF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,6HAA6H,CAAC,CAAC,SAAS;CACnK,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0MAA0M,CAAC,CAAC,SAAS;CAC3P,aAAa,EAAE,KAAK;EAAC;EAAU;EAAS;CAAY,CAAC,CAAC,CAAC,SAAS,wGAAwG;CACxK,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,8MAA8M,CAAC,CAAC,SAAS;CAC1P,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CAChH,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CACrI,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;AAC1H,CAAC,CAAC,CAAC,SAAS,iDAAiD;AAC7D,MAAM,sCAAsC,EAAE,OAAO;CACnD,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;C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}
|
|
@@ -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}).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":"
|
|
1
|
+
{"version":3,"file":"delete-coupon.cjs","names":["z","action"],"sources":["../../src/actions/delete-coupon.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhip } from \"../app\";\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: AppAction<\n typeof PayhipDeleteCouponInput,\n typeof PayhipDeleteCouponOutput,\n typeof payhip.credential\n> = 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":";;;;AAMA,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,qBAITC,eAAAA,OAAO,wBAAwB;CACjC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhip } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/delete-coupon.d.ts
|
|
@@ -15,9 +17,7 @@ declare const PayhipDeleteCouponOutput: z.ZodObject<{
|
|
|
15
17
|
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
18
|
}, z.core.$loose>>>>;
|
|
17
19
|
}, z.core.$loose>;
|
|
18
|
-
declare const payhipDeleteCoupon:
|
|
19
|
-
id: string;
|
|
20
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
20
|
+
declare const payhipDeleteCoupon: AppAction<typeof PayhipDeleteCouponInput, typeof PayhipDeleteCouponOutput, typeof payhip.credential>;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { payhipDeleteCoupon };
|
|
23
23
|
//# sourceMappingURL=delete-coupon.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-coupon.d.cts","names":[],"sources":["../../src/actions/delete-coupon.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-coupon.d.cts","names":[],"sources":["../../src/actions/delete-coupon.ts"],"mappings":";;;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;cAYvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;cAIxB,kBAAA,EAAoB,SAAA,QACxB,uBAAA,SACA,wBAAA,SACA,MAAA,CAAO,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhip } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/delete-coupon.d.ts
|
|
@@ -15,9 +17,7 @@ declare const PayhipDeleteCouponOutput: z.ZodObject<{
|
|
|
15
17
|
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
18
|
}, z.core.$loose>>>>;
|
|
17
19
|
}, z.core.$loose>;
|
|
18
|
-
declare const payhipDeleteCoupon:
|
|
19
|
-
id: string;
|
|
20
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
20
|
+
declare const payhipDeleteCoupon: AppAction<typeof PayhipDeleteCouponInput, typeof PayhipDeleteCouponOutput, typeof payhip.credential>;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { payhipDeleteCoupon };
|
|
23
23
|
//# sourceMappingURL=delete-coupon.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-coupon.d.mts","names":[],"sources":["../../src/actions/delete-coupon.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-coupon.d.mts","names":[],"sources":["../../src/actions/delete-coupon.ts"],"mappings":";;;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;cAYvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;cAIxB,kBAAA,EAAoB,SAAA,QACxB,uBAAA,SACA,wBAAA,SACA,MAAA,CAAO,UAAA"}
|
|
@@ -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}).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":"
|
|
1
|
+
{"version":3,"file":"delete-coupon.mjs","names":[],"sources":["../../src/actions/delete-coupon.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhip } from \"../app\";\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: AppAction<\n typeof PayhipDeleteCouponInput,\n typeof PayhipDeleteCouponOutput,\n typeof payhip.credential\n> = 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: PayhipDeleteCouponIn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"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":"
|
|
1
|
+
{"version":3,"file":"get-coupon.cjs","names":["z","action"],"sources":["../../src/actions/get-coupon.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhip } from \"../app\";\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: AppAction<\n typeof PayhipGetCouponInput,\n typeof PayhipGetCouponOutput,\n typeof payhip.credential\n> = 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":";;;;AAMA,MAAa,uBAAuBA,IAAAA,EAAE,OAAO,EAC3C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,I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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,kBAITC,eAAAA,OAAO,qBAAqB;CAC9B,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhip } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-coupon.d.ts
|
|
@@ -20,9 +22,7 @@ declare const PayhipGetCouponOutput: z.ZodObject<{
|
|
|
20
22
|
minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
21
23
|
}, z.core.$loose>>;
|
|
22
24
|
}, z.core.$loose>;
|
|
23
|
-
declare const payhipGetCoupon:
|
|
24
|
-
id: number;
|
|
25
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
25
|
+
declare const payhipGetCoupon: AppAction<typeof PayhipGetCouponInput, typeof PayhipGetCouponOutput, typeof payhip.credential>;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { payhipGetCoupon };
|
|
28
28
|
//# sourceMappingURL=get-coupon.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-coupon.d.cts","names":[],"sources":["../../src/actions/get-coupon.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-coupon.d.cts","names":[],"sources":["../../src/actions/get-coupon.ts"],"mappings":";;;;;cAMa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;cAiBpB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;cAIrB,eAAA,EAAiB,SAAA,QACrB,oBAAA,SACA,qBAAA,SACA,MAAA,CAAO,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhip } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/get-coupon.d.ts
|
|
@@ -20,9 +22,7 @@ declare const PayhipGetCouponOutput: z.ZodObject<{
|
|
|
20
22
|
minimum_purchase_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
21
23
|
}, z.core.$loose>>;
|
|
22
24
|
}, z.core.$loose>;
|
|
23
|
-
declare const payhipGetCoupon:
|
|
24
|
-
id: number;
|
|
25
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
25
|
+
declare const payhipGetCoupon: AppAction<typeof PayhipGetCouponInput, typeof PayhipGetCouponOutput, typeof payhip.credential>;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { payhipGetCoupon };
|
|
28
28
|
//# sourceMappingURL=get-coupon.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-coupon.d.mts","names":[],"sources":["../../src/actions/get-coupon.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-coupon.d.mts","names":[],"sources":["../../src/actions/get-coupon.ts"],"mappings":";;;;;cAMa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;cAiBpB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;cAIrB,eAAA,EAAiB,SAAA,QACrB,oBAAA,SACA,qBAAA,SACA,MAAA,CAAO,UAAA"}
|
|
@@ -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}).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":"
|
|
1
|
+
{"version":3,"file":"get-coupon.mjs","names":[],"sources":["../../src/actions/get-coupon.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhip } from \"../app\";\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: AppAction<\n typeof PayhipGetCouponInput,\n typeof PayhipGetCouponOutput,\n typeof payhip.credential\n> = 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":";;;;AAMA,MAAa,uBAAuB,EAAE,OAAO,EAC3C,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAA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IT,OAAO,qBAAqB;CAC9B,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAbmC,EAAE,OAAO,EAC5C,MAAM,iCAAiC,SAAS,EAClD,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAWhB;AACV,CAAC"}
|
|
@@ -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}).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":"
|
|
1
|
+
{"version":3,"file":"update-coupon.cjs","names":["z","action"],"sources":["../../src/actions/update-coupon.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhip } from \"../app\";\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: AppAction<\n typeof PayhipUpdateCouponInput,\n typeof PayhipUpdateCouponOutput,\n typeof payhip.credential\n> = 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":";;;;AAMA,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,YAAY,CAAC,CAAC,SAAS,uCAAuC;AACjE,MAAa,2BAA2BA,IAAAA,EAAE,OAAO,EAC/C,OAAOA,IAAAA,EAAE,MAAM,mCAAmC,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EAC3G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8CAA8C;AAExE,MAAa,qBAITC,eAAAA,OAAO,wBAAwB;CACjC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhip } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/update-coupon.d.ts
|
|
@@ -21,14 +23,7 @@ declare const PayhipUpdateCouponOutput: z.ZodObject<{
|
|
|
21
23
|
product_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
24
|
}, z.core.$loose>>>>;
|
|
23
25
|
}, z.core.$loose>;
|
|
24
|
-
declare const payhipUpdateCoupon:
|
|
25
|
-
id: string;
|
|
26
|
-
code?: string | undefined;
|
|
27
|
-
limit?: string | undefined;
|
|
28
|
-
expiry?: string | undefined;
|
|
29
|
-
percentage?: string | undefined;
|
|
30
|
-
product_id?: string | undefined;
|
|
31
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
26
|
+
declare const payhipUpdateCoupon: AppAction<typeof PayhipUpdateCouponInput, typeof PayhipUpdateCouponOutput, typeof payhip.credential>;
|
|
32
27
|
//#endregion
|
|
33
28
|
export { payhipUpdateCoupon };
|
|
34
29
|
//# sourceMappingURL=update-coupon.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-coupon.d.cts","names":[],"sources":["../../src/actions/update-coupon.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-coupon.d.cts","names":[],"sources":["../../src/actions/update-coupon.ts"],"mappings":";;;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;cAkBvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;cAIxB,kBAAA,EAAoB,SAAA,QACxB,uBAAA,SACA,wBAAA,SACA,MAAA,CAAO,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhip } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/update-coupon.d.ts
|
|
@@ -21,14 +23,7 @@ declare const PayhipUpdateCouponOutput: z.ZodObject<{
|
|
|
21
23
|
product_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
24
|
}, z.core.$loose>>>>;
|
|
23
25
|
}, z.core.$loose>;
|
|
24
|
-
declare const payhipUpdateCoupon:
|
|
25
|
-
id: string;
|
|
26
|
-
code?: string | undefined;
|
|
27
|
-
limit?: string | undefined;
|
|
28
|
-
expiry?: string | undefined;
|
|
29
|
-
percentage?: string | undefined;
|
|
30
|
-
product_id?: string | undefined;
|
|
31
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
26
|
+
declare const payhipUpdateCoupon: AppAction<typeof PayhipUpdateCouponInput, typeof PayhipUpdateCouponOutput, typeof payhip.credential>;
|
|
32
27
|
//#endregion
|
|
33
28
|
export { payhipUpdateCoupon };
|
|
34
29
|
//# sourceMappingURL=update-coupon.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-coupon.d.mts","names":[],"sources":["../../src/actions/update-coupon.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-coupon.d.mts","names":[],"sources":["../../src/actions/update-coupon.ts"],"mappings":";;;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;cAkBvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;cAIxB,kBAAA,EAAoB,SAAA,QACxB,uBAAA,SACA,wBAAA,SACA,MAAA,CAAO,UAAA"}
|
|
@@ -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}).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":"
|
|
1
|
+
{"version":3,"file":"update-coupon.mjs","names":[],"sources":["../../src/actions/update-coupon.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhip } from \"../app\";\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: AppAction<\n typeof PayhipUpdateCouponInput,\n typeof PayhipUpdateCouponOutput,\n typeof payhip.credential\n> = 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":";;;;AAMA,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,qBAIT,OAAO,wBAAwB;CACjC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAbsC,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,8CAWhB;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-coupon.cjs","names":["z","action"],"sources":["../../src/actions/verify-coupon.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhipVerifyCouponInput = z.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":"
|
|
1
|
+
{"version":3,"file":"verify-coupon.cjs","names":["z","action"],"sources":["../../src/actions/verify-coupon.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhip } from \"../app\";\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: AppAction<\n typeof PayhipVerifyCouponInput,\n typeof PayhipVerifyCouponOutput,\n typeof payhip.credential\n> = 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":";;;;AAMA,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,CAA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;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhip } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/verify-coupon.d.ts
|
|
@@ -18,9 +20,7 @@ declare const PayhipVerifyCouponOutput: z.ZodObject<{
|
|
|
18
20
|
product_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
21
|
}, z.core.$loose>>;
|
|
20
22
|
}, z.core.$loose>;
|
|
21
|
-
declare const payhipVerifyCoupon:
|
|
22
|
-
code: string;
|
|
23
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
23
|
+
declare const payhipVerifyCoupon: AppAction<typeof PayhipVerifyCouponInput, typeof PayhipVerifyCouponOutput, typeof payhip.credential>;
|
|
24
24
|
//#endregion
|
|
25
25
|
export { payhipVerifyCoupon };
|
|
26
26
|
//# sourceMappingURL=verify-coupon.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-coupon.d.cts","names":[],"sources":["../../src/actions/verify-coupon.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify-coupon.d.cts","names":[],"sources":["../../src/actions/verify-coupon.ts"],"mappings":";;;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;cAevB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAIxB,kBAAA,EAAoB,SAAA,QACxB,uBAAA,SACA,wBAAA,SACA,MAAA,CAAO,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { payhip } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/verify-coupon.d.ts
|
|
@@ -18,9 +20,7 @@ declare const PayhipVerifyCouponOutput: z.ZodObject<{
|
|
|
18
20
|
product_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
21
|
}, z.core.$loose>>;
|
|
20
22
|
}, z.core.$loose>;
|
|
21
|
-
declare const payhipVerifyCoupon:
|
|
22
|
-
code: string;
|
|
23
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
23
|
+
declare const payhipVerifyCoupon: AppAction<typeof PayhipVerifyCouponInput, typeof PayhipVerifyCouponOutput, typeof payhip.credential>;
|
|
24
24
|
//#endregion
|
|
25
25
|
export { payhipVerifyCoupon };
|
|
26
26
|
//# sourceMappingURL=verify-coupon.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-coupon.d.mts","names":[],"sources":["../../src/actions/verify-coupon.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify-coupon.d.mts","names":[],"sources":["../../src/actions/verify-coupon.ts"],"mappings":";;;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;cAevB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAIxB,kBAAA,EAAoB,SAAA,QACxB,uBAAA,SACA,wBAAA,SACA,MAAA,CAAO,UAAA"}
|
|
@@ -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}).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":"
|
|
1
|
+
{"version":3,"file":"verify-coupon.mjs","names":[],"sources":["../../src/actions/verify-coupon.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { payhip } from \"../app\";\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: AppAction<\n typeof PayhipVerifyCouponInput,\n typeof PayhipVerifyCouponOutput,\n typeof payhip.credential\n> = 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":";;;;AAMA,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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