@keystrokehq/payhere 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/action.cjs.map +1 -1
  2. package/dist/action.mjs.map +1 -1
  3. package/dist/actions/create-hook.cjs +10 -10
  4. package/dist/actions/create-hook.cjs.map +1 -1
  5. package/dist/actions/create-hook.d.cts +26 -3
  6. package/dist/actions/create-hook.d.cts.map +1 -1
  7. package/dist/actions/create-hook.d.mts +26 -3
  8. package/dist/actions/create-hook.d.mts.map +1 -1
  9. package/dist/actions/create-hook.mjs +10 -10
  10. package/dist/actions/create-hook.mjs.map +1 -1
  11. package/dist/actions/create-plan.cjs +2 -2
  12. package/dist/actions/create-plan.cjs.map +1 -1
  13. package/dist/actions/create-plan.d.cts +80 -3
  14. package/dist/actions/create-plan.d.cts.map +1 -1
  15. package/dist/actions/create-plan.d.mts +80 -3
  16. package/dist/actions/create-plan.d.mts.map +1 -1
  17. package/dist/actions/create-plan.mjs +2 -2
  18. package/dist/actions/create-plan.mjs.map +1 -1
  19. package/dist/actions/delete-hook.cjs +3 -3
  20. package/dist/actions/delete-hook.cjs.map +1 -1
  21. package/dist/actions/delete-hook.d.cts +10 -3
  22. package/dist/actions/delete-hook.d.cts.map +1 -1
  23. package/dist/actions/delete-hook.d.mts +10 -3
  24. package/dist/actions/delete-hook.d.mts.map +1 -1
  25. package/dist/actions/delete-hook.mjs +3 -3
  26. package/dist/actions/delete-hook.mjs.map +1 -1
  27. package/dist/actions/get-current-company-stats.cjs +7 -7
  28. package/dist/actions/get-current-company-stats.cjs.map +1 -1
  29. package/dist/actions/get-current-company-stats.d.cts +10 -3
  30. package/dist/actions/get-current-company-stats.d.cts.map +1 -1
  31. package/dist/actions/get-current-company-stats.d.mts +10 -3
  32. package/dist/actions/get-current-company-stats.d.mts.map +1 -1
  33. package/dist/actions/get-current-company-stats.mjs +7 -7
  34. package/dist/actions/get-current-company-stats.mjs.map +1 -1
  35. package/dist/actions/get-current-company.cjs +2 -2
  36. package/dist/actions/get-current-company.cjs.map +1 -1
  37. package/dist/actions/get-current-company.d.cts +26 -3
  38. package/dist/actions/get-current-company.d.cts.map +1 -1
  39. package/dist/actions/get-current-company.d.mts +26 -3
  40. package/dist/actions/get-current-company.d.mts.map +1 -1
  41. package/dist/actions/get-current-company.mjs +2 -2
  42. package/dist/actions/get-current-company.mjs.map +1 -1
  43. package/dist/actions/get-user.cjs +7 -7
  44. package/dist/actions/get-user.cjs.map +1 -1
  45. package/dist/actions/get-user.d.cts +10 -3
  46. package/dist/actions/get-user.d.cts.map +1 -1
  47. package/dist/actions/get-user.d.mts +10 -3
  48. package/dist/actions/get-user.d.mts.map +1 -1
  49. package/dist/actions/get-user.mjs +7 -7
  50. package/dist/actions/get-user.mjs.map +1 -1
  51. package/dist/actions/list-customers.cjs +13 -13
  52. package/dist/actions/list-customers.cjs.map +1 -1
  53. package/dist/actions/list-customers.d.cts +27 -3
  54. package/dist/actions/list-customers.d.cts.map +1 -1
  55. package/dist/actions/list-customers.d.mts +27 -3
  56. package/dist/actions/list-customers.d.mts.map +1 -1
  57. package/dist/actions/list-customers.mjs +13 -13
  58. package/dist/actions/list-customers.mjs.map +1 -1
  59. package/dist/actions/list-hooks.cjs +10 -10
  60. package/dist/actions/list-hooks.cjs.map +1 -1
  61. package/dist/actions/list-hooks.d.cts +14 -3
  62. package/dist/actions/list-hooks.d.cts.map +1 -1
  63. package/dist/actions/list-hooks.d.mts +14 -3
  64. package/dist/actions/list-hooks.d.mts.map +1 -1
  65. package/dist/actions/list-hooks.mjs +10 -10
  66. package/dist/actions/list-hooks.mjs.map +1 -1
  67. package/dist/actions/list-payments.cjs +23 -23
  68. package/dist/actions/list-payments.cjs.map +1 -1
  69. package/dist/actions/list-payments.d.cts +36 -3
  70. package/dist/actions/list-payments.d.cts.map +1 -1
  71. package/dist/actions/list-payments.d.mts +36 -3
  72. package/dist/actions/list-payments.d.mts.map +1 -1
  73. package/dist/actions/list-payments.mjs +23 -23
  74. package/dist/actions/list-payments.mjs.map +1 -1
  75. package/dist/actions/list-plans.cjs +22 -22
  76. package/dist/actions/list-plans.cjs.map +1 -1
  77. package/dist/actions/list-plans.d.cts +48 -3
  78. package/dist/actions/list-plans.d.cts.map +1 -1
  79. package/dist/actions/list-plans.d.mts +48 -3
  80. package/dist/actions/list-plans.d.mts.map +1 -1
  81. package/dist/actions/list-plans.mjs +22 -22
  82. package/dist/actions/list-plans.mjs.map +1 -1
  83. package/dist/actions/list-subscriptions.cjs +20 -20
  84. package/dist/actions/list-subscriptions.cjs.map +1 -1
  85. package/dist/actions/list-subscriptions.d.cts +44 -3
  86. package/dist/actions/list-subscriptions.d.cts.map +1 -1
  87. package/dist/actions/list-subscriptions.d.mts +44 -3
  88. package/dist/actions/list-subscriptions.d.mts.map +1 -1
  89. package/dist/actions/list-subscriptions.mjs +20 -20
  90. package/dist/actions/list-subscriptions.mjs.map +1 -1
  91. package/dist/actions/update-current-company.cjs +2 -2
  92. package/dist/actions/update-current-company.cjs.map +1 -1
  93. package/dist/actions/update-current-company.d.cts +52 -3
  94. package/dist/actions/update-current-company.d.cts.map +1 -1
  95. package/dist/actions/update-current-company.d.mts +52 -3
  96. package/dist/actions/update-current-company.d.mts.map +1 -1
  97. package/dist/actions/update-current-company.mjs +2 -2
  98. package/dist/actions/update-current-company.mjs.map +1 -1
  99. package/dist/actions/update-plan.cjs +1 -1
  100. package/dist/actions/update-plan.cjs.map +1 -1
  101. package/dist/actions/update-plan.d.cts +54 -3
  102. package/dist/actions/update-plan.d.cts.map +1 -1
  103. package/dist/actions/update-plan.d.mts +54 -3
  104. package/dist/actions/update-plan.d.mts.map +1 -1
  105. package/dist/actions/update-plan.mjs +1 -1
  106. package/dist/actions/update-plan.mjs.map +1 -1
  107. package/dist/catalog.cjs +14 -1
  108. package/dist/catalog.cjs.map +1 -1
  109. package/dist/catalog.d.cts +13 -0
  110. package/dist/catalog.d.mts +13 -0
  111. package/dist/catalog.mjs +14 -1
  112. package/dist/catalog.mjs.map +1 -1
  113. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"action.cjs","names":["payhere","executePayhereTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhere } from \"./app\";\nimport { executePayhereTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return payhere.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 executePayhereTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,QAAQ,OAAO;EACpB,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,mBAAmB,MAAM,KAAgC,CAAC;EAC1F;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"action.cjs","names":["payhere","executePayhereTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhere } from \"./app\";\nimport { executePayhereTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\n },\n) {\n return payhere.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output as z.ZodTypeAny,\n async run(input) {\n return def.output.parse(await executePayhereTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,QAAQ,OAAO;EACpB,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,mBAAmB,MAAM,KAAgC,CAAC;EAC1F;CACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhere } from \"./app\";\nimport { executePayhereTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return payhere.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 executePayhereTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,QAAQ,OAAO;EACpB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,mBAAmB,MAAM,KAAgC,CAAC;EAC1F;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { payhere } from \"./app\";\nimport { executePayhereTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\n },\n) {\n return payhere.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output as z.ZodTypeAny,\n async run(input) {\n return def.output.parse(await executePayhereTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,QAAQ,OAAO;EACpB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,mBAAmB,MAAM,KAAgC,CAAC;EAC1F;CACF,CAAC;AACH"}
@@ -11,16 +11,16 @@ const PayhereCreateHookInput = zod.z.object({
11
11
  integration: zod.z.string().describe("Friendly name of your platform. Helps with metrics and debugging.")
12
12
  }).describe("Request model for creating a webhook subscription to receive real-time events from PayHere.");
13
13
  const PayhereCreateHook_HookDataSchema = zod.z.object({
14
- id: zod.z.number().int().describe("Unique identifier for the hook."),
15
- type: zod.z.string().describe("Hook type, always 'rest_hooks'."),
16
- post_url: zod.z.string().describe("The registered webhook URL."),
17
- resource: zod.z.string().describe("The event type being monitored."),
18
- company_id: zod.z.number().int().describe("Associated company identifier."),
19
- created_at: zod.z.string().describe("Hook creation timestamp in ISO 8601 format."),
20
- updated_at: zod.z.string().describe("Last update timestamp in ISO 8601 format."),
21
- integration: zod.z.string().describe("The integration name.")
22
- }).describe("Schema for the hook data returned in the response.");
23
- const PayhereCreateHookOutput = zod.z.object({ data: PayhereCreateHook_HookDataSchema.nullable() }).describe("Response schema for creating a webhook subscription.");
14
+ id: zod.z.number().int().describe("Unique identifier for the hook.").nullable(),
15
+ type: zod.z.string().describe("Hook type, always 'rest_hooks'.").nullable(),
16
+ post_url: zod.z.string().describe("The registered webhook URL.").nullable(),
17
+ resource: zod.z.string().describe("The event type being monitored.").nullable(),
18
+ company_id: zod.z.number().int().describe("Associated company identifier.").nullable(),
19
+ created_at: zod.z.string().describe("Hook creation timestamp in ISO 8601 format.").nullable(),
20
+ updated_at: zod.z.string().describe("Last update timestamp in ISO 8601 format.").nullable(),
21
+ integration: zod.z.string().describe("The integration name.").nullable()
22
+ }).passthrough().describe("Schema for the hook data returned in the response.");
23
+ const PayhereCreateHookOutput = zod.z.object({ data: PayhereCreateHook_HookDataSchema.nullable() }).passthrough().describe("Response schema for creating a webhook subscription.");
24
24
  const payhereCreateHook = require_action.action("PAYHERE_CREATE_HOOK", {
25
25
  slug: "payhere-create-hook",
26
26
  name: "Create Hook",
@@ -1 +1 @@
1
- {"version":3,"file":"create-hook.cjs","names":["z","action"],"sources":["../../src/actions/create-hook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreateHookInput: z.ZodTypeAny = z.object({\n post_url: z.string().describe(\"Your platform's endpoint URL that will receive POST requests when events trigger.\"),\n resource: z.enum([\"payment_received\", \"subscription_cancelled\", \"subscription_created\"]).describe(\"Event type to monitor. Must be one of: 'payment_received', 'subscription_cancelled', or 'subscription_created'.\"),\n integration: z.string().describe(\"Friendly name of your platform. Helps with metrics and debugging.\"),\n}).describe(\"Request model for creating a webhook subscription to receive real-time events from PayHere.\");\nconst PayhereCreateHook_HookDataSchema: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier for the hook.\"),\n type: z.string().describe(\"Hook type, always 'rest_hooks'.\"),\n post_url: z.string().describe(\"The registered webhook URL.\"),\n resource: z.string().describe(\"The event type being monitored.\"),\n company_id: z.number().int().describe(\"Associated company identifier.\"),\n created_at: z.string().describe(\"Hook creation timestamp in ISO 8601 format.\"),\n updated_at: z.string().describe(\"Last update timestamp in ISO 8601 format.\"),\n integration: z.string().describe(\"The integration name.\"),\n}).describe(\"Schema for the hook data returned in the response.\");\nexport const PayhereCreateHookOutput: z.ZodTypeAny = z.object({\n data: PayhereCreateHook_HookDataSchema.nullable(),\n}).describe(\"Response schema for creating a webhook subscription.\");\n\nexport const payhereCreateHook = action(\"PAYHERE_CREATE_HOOK\", {\n slug: \"payhere-create-hook\",\n name: \"Create Hook\",\n description: \"Tool to subscribe to a REST hook for receiving webhook events. Use when you need to register a webhook endpoint to receive real-time notifications for payment_received, subscription_cancelled, or subscription_created events.\",\n input: PayhereCreateHookInput,\n output: PayhereCreateHookOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAuCA,IAAAA,EAAE,OAAO;CAC3D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CACjH,UAAUA,IAAAA,EAAE,KAAK;EAAC;EAAoB;EAA0B;CAAsB,CAAC,CAAC,CAAC,SAAS,iHAAiH;CACnN,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE;AACtG,CAAC,CAAC,CAAC,SAAS,6FAA6F;AACzG,MAAM,mCAAiDA,IAAAA,EAAE,OAAO;CAC9D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC;CAC/D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC;CAC3D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CAC3D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC;CAC/D,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gCAAgC;CACtE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C;CAC7E,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;CAC3E,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;AAC1D,CAAC,CAAC,CAAC,SAAS,oDAAoD;AAChE,MAAa,0BAAwCA,IAAAA,EAAE,OAAO,EAC5D,MAAM,iCAAiC,SAAS,EAClD,CAAC,CAAC,CAAC,SAAS,sDAAsD;AAElE,MAAa,oBAAoBC,eAAAA,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"create-hook.cjs","names":["z","action"],"sources":["../../src/actions/create-hook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreateHookInput = z.object({\n post_url: z.string().describe(\"Your platform's endpoint URL that will receive POST requests when events trigger.\"),\n resource: z.enum([\"payment_received\", \"subscription_cancelled\", \"subscription_created\"]).describe(\"Event type to monitor. Must be one of: 'payment_received', 'subscription_cancelled', or 'subscription_created'.\"),\n integration: z.string().describe(\"Friendly name of your platform. Helps with metrics and debugging.\"),\n}).describe(\"Request model for creating a webhook subscription to receive real-time events from PayHere.\");\nconst PayhereCreateHook_HookDataSchema = z.object({\n id: z.number().int().describe(\"Unique identifier for the hook.\").nullable(),\n type: z.string().describe(\"Hook type, always 'rest_hooks'.\").nullable(),\n post_url: z.string().describe(\"The registered webhook URL.\").nullable(),\n resource: z.string().describe(\"The event type being monitored.\").nullable(),\n company_id: z.number().int().describe(\"Associated company identifier.\").nullable(),\n created_at: z.string().describe(\"Hook creation timestamp in ISO 8601 format.\").nullable(),\n updated_at: z.string().describe(\"Last update timestamp in ISO 8601 format.\").nullable(),\n integration: z.string().describe(\"The integration name.\").nullable(),\n}).passthrough().describe(\"Schema for the hook data returned in the response.\");\nexport const PayhereCreateHookOutput = z.object({\n data: PayhereCreateHook_HookDataSchema.nullable(),\n}).passthrough().describe(\"Response schema for creating a webhook subscription.\");\n\nexport const payhereCreateHook = action(\"PAYHERE_CREATE_HOOK\", {\n slug: \"payhere-create-hook\",\n name: \"Create Hook\",\n description: \"Tool to subscribe to a REST hook for receiving webhook events. Use when you need to register a webhook endpoint to receive real-time notifications for payment_received, subscription_cancelled, or subscription_created events.\",\n input: PayhereCreateHookInput,\n output: PayhereCreateHookOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAyBA,IAAAA,EAAE,OAAO;CAC7C,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CACjH,UAAUA,IAAAA,EAAE,KAAK;EAAC;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ateHookInput: z.ZodTypeAny;
5
- declare const PayhereCreateHookOutput: z.ZodTypeAny;
6
- declare const payhereCreateHook: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhereCreateHookInput: z.ZodObject<{
5
+ post_url: z.ZodString;
6
+ resource: z.ZodEnum<{
7
+ payment_received: "payment_received";
8
+ subscription_cancelled: "subscription_cancelled";
9
+ subscription_created: "subscription_created";
10
+ }>;
11
+ integration: z.ZodString;
12
+ }, z.core.$strip>;
13
+ declare const PayhereCreateHookOutput: z.ZodObject<{
14
+ data: z.ZodNullable<z.ZodObject<{
15
+ id: z.ZodNullable<z.ZodNumber>;
16
+ type: z.ZodNullable<z.ZodString>;
17
+ post_url: z.ZodNullable<z.ZodString>;
18
+ resource: z.ZodNullable<z.ZodString>;
19
+ company_id: z.ZodNullable<z.ZodNumber>;
20
+ created_at: z.ZodNullable<z.ZodString>;
21
+ updated_at: z.ZodNullable<z.ZodString>;
22
+ integration: z.ZodNullable<z.ZodString>;
23
+ }, z.core.$loose>>;
24
+ }, z.core.$loose>;
25
+ declare const payhereCreateHook: import("@keystrokehq/action").WorkflowActionDefinition<{
26
+ post_url: string;
27
+ resource: "payment_received" | "subscription_cancelled" | "subscription_created";
28
+ integration: string;
29
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
30
  //#endregion
8
31
  export { payhereCreateHook };
9
32
  //# sourceMappingURL=create-hook.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-hook.d.cts","names":[],"sources":["../../src/actions/create-hook.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAImE;AAAA,cAW7F,uBAAA,EAAyB,CAAA,CAAE,UAE2B;AAAA,cAEtD,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"create-hook.d.cts","names":[],"sources":["../../src/actions/create-hook.ts"],"mappings":";;;cAIa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;cAetB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;cAIvB,iBAAA,gCAAiB,wBAAA"}
@@ -1,9 +1,32 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/create-hook.d.ts
4
- declare const PayhereCreateHookInput: z.ZodTypeAny;
5
- declare const PayhereCreateHookOutput: z.ZodTypeAny;
6
- declare const payhereCreateHook: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhereCreateHookInput: z.ZodObject<{
5
+ post_url: z.ZodString;
6
+ resource: z.ZodEnum<{
7
+ payment_received: "payment_received";
8
+ subscription_cancelled: "subscription_cancelled";
9
+ subscription_created: "subscription_created";
10
+ }>;
11
+ integration: z.ZodString;
12
+ }, z.core.$strip>;
13
+ declare const PayhereCreateHookOutput: z.ZodObject<{
14
+ data: z.ZodNullable<z.ZodObject<{
15
+ id: z.ZodNullable<z.ZodNumber>;
16
+ type: z.ZodNullable<z.ZodString>;
17
+ post_url: z.ZodNullable<z.ZodString>;
18
+ resource: z.ZodNullable<z.ZodString>;
19
+ company_id: z.ZodNullable<z.ZodNumber>;
20
+ created_at: z.ZodNullable<z.ZodString>;
21
+ updated_at: z.ZodNullable<z.ZodString>;
22
+ integration: z.ZodNullable<z.ZodString>;
23
+ }, z.core.$loose>>;
24
+ }, z.core.$loose>;
25
+ declare const payhereCreateHook: import("@keystrokehq/action").WorkflowActionDefinition<{
26
+ post_url: string;
27
+ resource: "payment_received" | "subscription_cancelled" | "subscription_created";
28
+ integration: string;
29
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
30
  //#endregion
8
31
  export { payhereCreateHook };
9
32
  //# sourceMappingURL=create-hook.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-hook.d.mts","names":[],"sources":["../../src/actions/create-hook.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAImE;AAAA,cAW7F,uBAAA,EAAyB,CAAA,CAAE,UAE2B;AAAA,cAEtD,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"create-hook.d.mts","names":[],"sources":["../../src/actions/create-hook.ts"],"mappings":";;;cAIa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;cAetB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;cAIvB,iBAAA,gCAAiB,wBAAA"}
@@ -11,21 +11,21 @@ const PayhereCreateHookInput = z.object({
11
11
  integration: z.string().describe("Friendly name of your platform. Helps with metrics and debugging.")
12
12
  }).describe("Request model for creating a webhook subscription to receive real-time events from PayHere.");
13
13
  const PayhereCreateHook_HookDataSchema = z.object({
14
- id: z.number().int().describe("Unique identifier for the hook."),
15
- type: z.string().describe("Hook type, always 'rest_hooks'."),
16
- post_url: z.string().describe("The registered webhook URL."),
17
- resource: z.string().describe("The event type being monitored."),
18
- company_id: z.number().int().describe("Associated company identifier."),
19
- created_at: z.string().describe("Hook creation timestamp in ISO 8601 format."),
20
- updated_at: z.string().describe("Last update timestamp in ISO 8601 format."),
21
- integration: z.string().describe("The integration name.")
22
- }).describe("Schema for the hook data returned in the response.");
14
+ id: z.number().int().describe("Unique identifier for the hook.").nullable(),
15
+ type: z.string().describe("Hook type, always 'rest_hooks'.").nullable(),
16
+ post_url: z.string().describe("The registered webhook URL.").nullable(),
17
+ resource: z.string().describe("The event type being monitored.").nullable(),
18
+ company_id: z.number().int().describe("Associated company identifier.").nullable(),
19
+ created_at: z.string().describe("Hook creation timestamp in ISO 8601 format.").nullable(),
20
+ updated_at: z.string().describe("Last update timestamp in ISO 8601 format.").nullable(),
21
+ integration: z.string().describe("The integration name.").nullable()
22
+ }).passthrough().describe("Schema for the hook data returned in the response.");
23
23
  const payhereCreateHook = action("PAYHERE_CREATE_HOOK", {
24
24
  slug: "payhere-create-hook",
25
25
  name: "Create Hook",
26
26
  description: "Tool to subscribe to a REST hook for receiving webhook events. Use when you need to register a webhook endpoint to receive real-time notifications for payment_received, subscription_cancelled, or subscription_created events.",
27
27
  input: PayhereCreateHookInput,
28
- output: z.object({ data: PayhereCreateHook_HookDataSchema.nullable() }).describe("Response schema for creating a webhook subscription.")
28
+ output: z.object({ data: PayhereCreateHook_HookDataSchema.nullable() }).passthrough().describe("Response schema for creating a webhook subscription.")
29
29
  });
30
30
  //#endregion
31
31
  export { payhereCreateHook };
@@ -1 +1 @@
1
- {"version":3,"file":"create-hook.mjs","names":[],"sources":["../../src/actions/create-hook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreateHookInput: z.ZodTypeAny = z.object({\n post_url: z.string().describe(\"Your platform's endpoint URL that will receive POST requests when events trigger.\"),\n resource: z.enum([\"payment_received\", \"subscription_cancelled\", \"subscription_created\"]).describe(\"Event type to monitor. Must be one of: 'payment_received', 'subscription_cancelled', or 'subscription_created'.\"),\n integration: z.string().describe(\"Friendly name of your platform. Helps with metrics and debugging.\"),\n}).describe(\"Request model for creating a webhook subscription to receive real-time events from PayHere.\");\nconst PayhereCreateHook_HookDataSchema: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique identifier for the hook.\"),\n type: z.string().describe(\"Hook type, always 'rest_hooks'.\"),\n post_url: z.string().describe(\"The registered webhook URL.\"),\n resource: z.string().describe(\"The event type being monitored.\"),\n company_id: z.number().int().describe(\"Associated company identifier.\"),\n created_at: z.string().describe(\"Hook creation timestamp in ISO 8601 format.\"),\n updated_at: z.string().describe(\"Last update timestamp in ISO 8601 format.\"),\n integration: z.string().describe(\"The integration name.\"),\n}).describe(\"Schema for the hook data returned in the response.\");\nexport const PayhereCreateHookOutput: z.ZodTypeAny = z.object({\n data: PayhereCreateHook_HookDataSchema.nullable(),\n}).describe(\"Response schema for creating a webhook subscription.\");\n\nexport const payhereCreateHook = action(\"PAYHERE_CREATE_HOOK\", {\n slug: \"payhere-create-hook\",\n name: \"Create Hook\",\n description: \"Tool to subscribe to a REST hook for receiving webhook events. Use when you need to register a webhook endpoint to receive real-time notifications for payment_received, subscription_cancelled, or subscription_created events.\",\n input: PayhereCreateHookInput,\n output: PayhereCreateHookOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAuC,EAAE,OAAO;CAC3D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CACjH,UAAU,EAAE,KAAK;EAAC;EAAoB;EAA0B;CAAsB,CAAC,CAAC,CAAC,SAAS,iHAAiH;CACnN,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE;AACtG,CAAC,CAAC,CAAC,SAAS,6FAA6F;AACzG,MAAM,mCAAiD,EAAE,OAAO;CAC9D,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC;CAC/D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC;CAC3D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CAC3D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC;CAC/D,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gCAAgC;CACtE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C;CAC7E,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;CAC3E,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB;AAC1D,CAAC,CAAC,CAAC,SAAS,oDAAoD;AAKhE,MAAa,oBAAoB,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATmD,EAAE,OAAO,EAC5D,MAAM,iCAAiC,SAAS,EAClD,CAAC,CAAC,CAAC,SAAS,sDAOF;AACV,CAAC"}
1
+ {"version":3,"file":"create-hook.mjs","names":[],"sources":["../../src/actions/create-hook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreateHookInput = z.object({\n post_url: z.string().describe(\"Your platform's endpoint URL that will receive POST requests when events trigger.\"),\n resource: z.enum([\"payment_received\", \"subscription_cancelled\", \"subscription_created\"]).describe(\"Event type to monitor. Must be one of: 'payment_received', 'subscription_cancelled', or 'subscription_created'.\"),\n integration: z.string().describe(\"Friendly name of your platform. Helps with metrics and debugging.\"),\n}).describe(\"Request model for creating a webhook subscription to receive real-time events from PayHere.\");\nconst PayhereCreateHook_HookDataSchema = z.object({\n id: z.number().int().describe(\"Unique identifier for the hook.\").nullable(),\n type: z.string().describe(\"Hook type, always 'rest_hooks'.\").nullable(),\n post_url: z.string().describe(\"The registered webhook URL.\").nullable(),\n resource: z.string().describe(\"The event type being monitored.\").nullable(),\n company_id: z.number().int().describe(\"Associated company identifier.\").nullable(),\n created_at: z.string().describe(\"Hook creation timestamp in ISO 8601 format.\").nullable(),\n updated_at: z.string().describe(\"Last update timestamp in ISO 8601 format.\").nullable(),\n integration: z.string().describe(\"The integration name.\").nullable(),\n}).passthrough().describe(\"Schema for the hook data returned in the response.\");\nexport const PayhereCreateHookOutput = z.object({\n data: PayhereCreateHook_HookDataSchema.nullable(),\n}).passthrough().describe(\"Response schema for creating a webhook subscription.\");\n\nexport const payhereCreateHook = action(\"PAYHERE_CREATE_HOOK\", {\n slug: \"payhere-create-hook\",\n name: \"Create Hook\",\n description: \"Tool to subscribe to a REST hook for receiving webhook events. Use when you need to register a webhook endpoint to receive real-time notifications for payment_received, subscription_cancelled, or subscription_created events.\",\n input: PayhereCreateHookInput,\n output: PayhereCreateHookOutput,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of the custom field.").nullable().optional(),
29
29
  required: zod.z.boolean().describe("Whether the field is required.").nullable().optional(),
30
30
  field_type: zod.z.string().describe("Type of the custom field.").nullable().optional()
31
- }).describe("Custom form field definition.");
31
+ }).passthrough().describe("Custom form field definition.");
32
32
  const PayhereCreatePlanOutput = zod.z.object({
33
33
  id: zod.z.number().int().describe("Unique plan identifier.").nullable().optional(),
34
34
  qty: zod.z.number().int().describe("Available quantity.").nullable().optional(),
@@ -59,7 +59,7 @@ const PayhereCreatePlanOutput = zod.z.object({
59
59
  min_billing_cycles: zod.z.number().int().describe("Minimum billing cycles before cancellation allowed.").nullable().optional(),
60
60
  user_selects_amount: zod.z.boolean().describe("Whether user selects the payment amount.").nullable().optional(),
61
61
  billing_interval_count: zod.z.number().int().describe("Number of intervals between billings.").nullable().optional()
62
- }).describe("Response schema for creating a new plan.");
62
+ }).passthrough().describe("Response schema for creating a new plan.");
63
63
  const payhereCreatePlan = require_action.action("PAYHERE_CREATE_PLAN", {
64
64
  slug: "payhere-create-plan",
65
65
  name: "Create Plan",
@@ -1 +1 @@
1
- {"version":3,"file":"create-plan.cjs","names":["z","action"],"sources":["../../src/actions/create-plan.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreatePlanInput: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Display name for the plan shown to customers.\"),\n price: z.number().describe(\"Plan pricing. Omit for donation plans where user_selects_amount is true.\").optional(),\n hidden: z.boolean().describe(\"Hide plan from landing page if true.\").optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp', 'eur').\"),\n show_qty: z.boolean().describe(\"Enable quantity selection field. Only applies to one-off plans.\").optional(),\n setup_fee: z.number().describe(\"Initial one-time charge amount for recurring plans.\").optional(),\n billing_day: z.number().int().describe(\"Day of month for monthly charges (1-31) for recurring plans.\").optional(),\n description: z.string().describe(\"Product or service description shown to customers.\").optional(),\n success_url: z.string().describe(\"URL to redirect customers after successful payment.\").optional(),\n webhook_url: z.string().describe(\"Endpoint URL for receiving payment status notifications.\").optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel subscription after N payments for recurring plans.\").optional(),\n payment_type: z.enum([\"recurring\", \"one_off\"]).describe(\"Type of plan: \\\"recurring\\\" for subscriptions or \\\"one_off\\\" for one-time payments.\"),\n receipt_text: z.string().describe(\"Custom message displayed on payment receipts.\").optional(),\n pay_button_text: z.string().describe(\"Custom label for payment button. Defaults to \\\"Pay\\\".\").optional(),\n billing_interval: z.enum([\"week\", \"month\", \"year\"]).describe(\"Billing frequency for recurring plans: \\\"week\\\", \\\"month\\\", or \\\"year\\\". Required for recurring plans.\").optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation is allowed for recurring plans.\").optional(),\n user_selects_amount: z.boolean().describe(\"Enable donation functionality where users choose the payment amount. When true, omit the price field.\").optional(),\n}).describe(\"Request model for creating a new plan in PayHere.\\n\\nRequired fields vary by plan type:\\n- For one_off plans: name, price, currency, payment_type\\n- For recurring plans: name, price, currency, payment_type, billing_interval\\n- For donation plans: name, currency, payment_type, user_selects_amount=true (price should be omitted)\\n\\nThe payment_type determines whether this is a recurring subscription or one-time payment.\");\nconst PayhereCreatePlan_CustomFieldSchema: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Name of the custom field.\").nullable().optional(),\n required: z.boolean().describe(\"Whether the field is required.\").nullable().optional(),\n field_type: z.string().describe(\"Type of the custom field.\").nullable().optional(),\n}).describe(\"Custom form field definition.\");\nexport const PayhereCreatePlanOutput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique plan identifier.\").nullable().optional(),\n qty: z.number().int().describe(\"Available quantity.\").nullable().optional(),\n name: z.string().describe(\"Plan name.\").nullable().optional(),\n slug: z.string().describe(\"URL-friendly plan identifier.\").nullable().optional(),\n type: z.string().describe(\"Plan type.\").nullable().optional(),\n price: z.number().describe(\"Plan price.\").nullable().optional(),\n hidden: z.boolean().describe(\"Whether plan is hidden from landing page.\").nullable().optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp').\").nullable().optional(),\n show_qty: z.boolean().describe(\"Whether to show quantity selector.\").nullable().optional(),\n setup_fee: z.number().describe(\"Setup fee amount.\").nullable().optional(),\n created_at: z.string().describe(\"Creation timestamp.\").nullable().optional(),\n updated_at: z.string().describe(\"Last update timestamp.\").nullable().optional(),\n billing_day: z.number().int().describe(\"Day of month for billing.\").nullable().optional(),\n description: z.string().describe(\"Plan description.\").nullable().optional(),\n limited_qty: z.boolean().describe(\"Whether quantity is limited.\").nullable().optional(),\n success_url: z.string().describe(\"Success redirect URL.\").nullable().optional(),\n webhook_url: z.string().describe(\"Webhook URL.\").nullable().optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel after N payments.\").nullable().optional(),\n payment_type: z.string().describe(\"Type of plan: \\\"recurring\\\" or \\\"one_off\\\".\").nullable().optional(),\n receipt_text: z.string().describe(\"Receipt text.\").nullable().optional(),\n custom_fields: z.array(PayhereCreatePlan_CustomFieldSchema).describe(\"Custom form fields.\").nullable().optional(),\n has_setup_fee: z.boolean().describe(\"Whether plan has setup fee.\").nullable().optional(),\n price_in_cents: z.number().int().describe(\"Price in smallest currency unit (e.g., cents).\").nullable().optional(),\n pay_button_text: z.string().describe(\"Payment button text.\").nullable().optional(),\n billing_interval: z.string().describe(\"Billing frequency for recurring plans.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period length in days.\").nullable().optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation allowed.\").nullable().optional(),\n user_selects_amount: z.boolean().describe(\"Whether user selects the payment amount.\").nullable().optional(),\n billing_interval_count: z.number().int().describe(\"Number of intervals between billings.\").nullable().optional(),\n}).describe(\"Response schema for creating a new plan.\");\n\nexport const payhereCreatePlan = action(\"PAYHERE_CREATE_PLAN\", {\n slug: \"payhere-create-plan\",\n name: \"Create Plan\",\n description: \"Tool to create a new payment plan in PayHere. Use when you need to set up either a recurring subscription or one-off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tD,MAAa,oBAAoBC,eAAAA,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"create-plan.cjs","names":["z","action"],"sources":["../../src/actions/create-plan.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreatePlanInput = z.object({\n name: z.string().describe(\"Display name for the plan shown to customers.\"),\n price: z.number().describe(\"Plan pricing. Omit for donation plans where user_selects_amount is true.\").optional(),\n hidden: z.boolean().describe(\"Hide plan from landing page if true.\").optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp', 'eur').\"),\n show_qty: z.boolean().describe(\"Enable quantity selection field. Only applies to one-off plans.\").optional(),\n setup_fee: z.number().describe(\"Initial one-time charge amount for recurring plans.\").optional(),\n billing_day: z.number().int().describe(\"Day of month for monthly charges (1-31) for recurring plans.\").optional(),\n description: z.string().describe(\"Product or service description shown to customers.\").optional(),\n success_url: z.string().describe(\"URL to redirect customers after successful payment.\").optional(),\n webhook_url: z.string().describe(\"Endpoint URL for receiving payment status notifications.\").optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel subscription after N payments for recurring plans.\").optional(),\n payment_type: z.enum([\"recurring\", \"one_off\"]).describe(\"Type of plan: \\\"recurring\\\" for subscriptions or \\\"one_off\\\" for one-time payments.\"),\n receipt_text: z.string().describe(\"Custom message displayed on payment receipts.\").optional(),\n pay_button_text: z.string().describe(\"Custom label for payment button. Defaults to \\\"Pay\\\".\").optional(),\n billing_interval: z.enum([\"week\", \"month\", \"year\"]).describe(\"Billing frequency for recurring plans: \\\"week\\\", \\\"month\\\", or \\\"year\\\". Required for recurring plans.\").optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation is allowed for recurring plans.\").optional(),\n user_selects_amount: z.boolean().describe(\"Enable donation functionality where users choose the payment amount. When true, omit the price field.\").optional(),\n}).describe(\"Request model for creating a new plan in PayHere.\\n\\nRequired fields vary by plan type:\\n- For one_off plans: name, price, currency, payment_type\\n- For recurring plans: name, price, currency, payment_type, billing_interval\\n- For donation plans: name, currency, payment_type, user_selects_amount=true (price should be omitted)\\n\\nThe payment_type determines whether this is a recurring subscription or one-time payment.\");\nconst PayhereCreatePlan_CustomFieldSchema = z.object({\n name: z.string().describe(\"Name of the custom field.\").nullable().optional(),\n required: z.boolean().describe(\"Whether the field is required.\").nullable().optional(),\n field_type: z.string().describe(\"Type of the custom field.\").nullable().optional(),\n}).passthrough().describe(\"Custom form field definition.\");\nexport const PayhereCreatePlanOutput = z.object({\n id: z.number().int().describe(\"Unique plan identifier.\").nullable().optional(),\n qty: z.number().int().describe(\"Available quantity.\").nullable().optional(),\n name: z.string().describe(\"Plan name.\").nullable().optional(),\n slug: z.string().describe(\"URL-friendly plan identifier.\").nullable().optional(),\n type: z.string().describe(\"Plan type.\").nullable().optional(),\n price: z.number().describe(\"Plan price.\").nullable().optional(),\n hidden: z.boolean().describe(\"Whether plan is hidden from landing page.\").nullable().optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp').\").nullable().optional(),\n show_qty: z.boolean().describe(\"Whether to show quantity selector.\").nullable().optional(),\n setup_fee: z.number().describe(\"Setup fee amount.\").nullable().optional(),\n created_at: z.string().describe(\"Creation timestamp.\").nullable().optional(),\n updated_at: z.string().describe(\"Last update timestamp.\").nullable().optional(),\n billing_day: z.number().int().describe(\"Day of month for billing.\").nullable().optional(),\n description: z.string().describe(\"Plan description.\").nullable().optional(),\n limited_qty: z.boolean().describe(\"Whether quantity is limited.\").nullable().optional(),\n success_url: z.string().describe(\"Success redirect URL.\").nullable().optional(),\n webhook_url: z.string().describe(\"Webhook URL.\").nullable().optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel after N payments.\").nullable().optional(),\n payment_type: z.string().describe(\"Type of plan: \\\"recurring\\\" or \\\"one_off\\\".\").nullable().optional(),\n receipt_text: z.string().describe(\"Receipt text.\").nullable().optional(),\n custom_fields: z.array(PayhereCreatePlan_CustomFieldSchema).describe(\"Custom form fields.\").nullable().optional(),\n has_setup_fee: z.boolean().describe(\"Whether plan has setup fee.\").nullable().optional(),\n price_in_cents: z.number().int().describe(\"Price in smallest currency unit (e.g., cents).\").nullable().optional(),\n pay_button_text: z.string().describe(\"Payment button text.\").nullable().optional(),\n billing_interval: z.string().describe(\"Billing frequency for recurring plans.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period length in days.\").nullable().optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation allowed.\").nullable().optional(),\n user_selects_amount: z.boolean().describe(\"Whether user selects the payment amount.\").nullable().optional(),\n billing_interval_count: z.number().int().describe(\"Number of intervals between billings.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for creating a new plan.\");\n\nexport const payhereCreatePlan = action(\"PAYHERE_CREATE_PLAN\", {\n slug: \"payhere-create-plan\",\n name: \"Create Plan\",\n description: \"Tool to create a new payment plan in PayHere. Use when you need to set up either a recurring subscription or one-off payment plan for accepting payments.\",\n input: PayhereCreatePlanInput,\n output: PayhereCreatePlanOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAyBA,IAAAA,EAAE,OAAO;CAC7C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CACzE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAChH,QAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CAC9E,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD;CACvF,UAAUA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC3G,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CAC/F,aAAaA,IAAAA,EAAE,OAAO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IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjF,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpG,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjG,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzH,qBAAqBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1G,wBAAwBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACjH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,0CAA0C;AAEpE,MAAa,oBAAoBC,eAAAA,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,86 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/create-plan.d.ts
4
- declare const PayhereCreatePlanInput: z.ZodTypeAny;
5
- declare const PayhereCreatePlanOutput: z.ZodTypeAny;
6
- declare const payhereCreatePlan: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhereCreatePlanInput: z.ZodObject<{
5
+ name: z.ZodString;
6
+ price: z.ZodOptional<z.ZodNumber>;
7
+ hidden: z.ZodOptional<z.ZodBoolean>;
8
+ currency: z.ZodString;
9
+ show_qty: z.ZodOptional<z.ZodBoolean>;
10
+ setup_fee: z.ZodOptional<z.ZodNumber>;
11
+ billing_day: z.ZodOptional<z.ZodNumber>;
12
+ description: z.ZodOptional<z.ZodString>;
13
+ success_url: z.ZodOptional<z.ZodString>;
14
+ webhook_url: z.ZodOptional<z.ZodString>;
15
+ cancel_after: z.ZodOptional<z.ZodNumber>;
16
+ payment_type: z.ZodEnum<{
17
+ recurring: "recurring";
18
+ one_off: "one_off";
19
+ }>;
20
+ receipt_text: z.ZodOptional<z.ZodString>;
21
+ pay_button_text: z.ZodOptional<z.ZodString>;
22
+ billing_interval: z.ZodOptional<z.ZodEnum<{
23
+ week: "week";
24
+ month: "month";
25
+ year: "year";
26
+ }>>;
27
+ min_billing_cycles: z.ZodOptional<z.ZodNumber>;
28
+ user_selects_amount: z.ZodOptional<z.ZodBoolean>;
29
+ }, z.core.$strip>;
30
+ declare const PayhereCreatePlanOutput: z.ZodObject<{
31
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
32
+ qty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
37
+ hidden: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
38
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
+ show_qty: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
40
+ setup_fee: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
41
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ billing_day: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
44
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
45
+ limited_qty: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
46
+ success_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ webhook_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ cancel_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
49
+ payment_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ receipt_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
+ custom_fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
52
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ required: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
54
+ field_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
+ }, z.core.$loose>>>>;
56
+ has_setup_fee: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
57
+ price_in_cents: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
58
+ pay_button_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ billing_interval: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ trial_period_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
61
+ min_billing_cycles: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
62
+ user_selects_amount: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
63
+ billing_interval_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
64
+ }, z.core.$loose>;
65
+ declare const payhereCreatePlan: import("@keystrokehq/action").WorkflowActionDefinition<{
66
+ name: string;
67
+ currency: string;
68
+ payment_type: "recurring" | "one_off";
69
+ price?: number | undefined;
70
+ hidden?: boolean | undefined;
71
+ show_qty?: boolean | undefined;
72
+ setup_fee?: number | undefined;
73
+ billing_day?: number | undefined;
74
+ description?: string | undefined;
75
+ success_url?: string | undefined;
76
+ webhook_url?: string | undefined;
77
+ cancel_after?: number | undefined;
78
+ receipt_text?: string | undefined;
79
+ pay_button_text?: string | undefined;
80
+ billing_interval?: "week" | "month" | "year" | undefined;
81
+ min_billing_cycles?: number | undefined;
82
+ user_selects_amount?: boolean | undefined;
83
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
84
  //#endregion
8
85
  export { payhereCreatePlan };
9
86
  //# sourceMappingURL=create-plan.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-plan.d.cts","names":[],"sources":["../../src/actions/create-plan.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAkB4Y;AAAA,cAMta,uBAAA,EAAyB,CAAA,CAAE,UA8Be;AAAA,cAE1C,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"create-plan.d.cts","names":[],"sources":["../../src/actions/create-plan.ts"],"mappings":";;;cAIa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAwBtB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgCvB,iBAAA,gCAAiB,wBAAA"}
@@ -1,9 +1,86 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/create-plan.d.ts
4
- declare const PayhereCreatePlanInput: z.ZodTypeAny;
5
- declare const PayhereCreatePlanOutput: z.ZodTypeAny;
6
- declare const payhereCreatePlan: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhereCreatePlanInput: z.ZodObject<{
5
+ name: z.ZodString;
6
+ price: z.ZodOptional<z.ZodNumber>;
7
+ hidden: z.ZodOptional<z.ZodBoolean>;
8
+ currency: z.ZodString;
9
+ show_qty: z.ZodOptional<z.ZodBoolean>;
10
+ setup_fee: z.ZodOptional<z.ZodNumber>;
11
+ billing_day: z.ZodOptional<z.ZodNumber>;
12
+ description: z.ZodOptional<z.ZodString>;
13
+ success_url: z.ZodOptional<z.ZodString>;
14
+ webhook_url: z.ZodOptional<z.ZodString>;
15
+ cancel_after: z.ZodOptional<z.ZodNumber>;
16
+ payment_type: z.ZodEnum<{
17
+ recurring: "recurring";
18
+ one_off: "one_off";
19
+ }>;
20
+ receipt_text: z.ZodOptional<z.ZodString>;
21
+ pay_button_text: z.ZodOptional<z.ZodString>;
22
+ billing_interval: z.ZodOptional<z.ZodEnum<{
23
+ week: "week";
24
+ month: "month";
25
+ year: "year";
26
+ }>>;
27
+ min_billing_cycles: z.ZodOptional<z.ZodNumber>;
28
+ user_selects_amount: z.ZodOptional<z.ZodBoolean>;
29
+ }, z.core.$strip>;
30
+ declare const PayhereCreatePlanOutput: z.ZodObject<{
31
+ id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
32
+ qty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
37
+ hidden: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
38
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
+ show_qty: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
40
+ setup_fee: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
41
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ billing_day: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
44
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
45
+ limited_qty: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
46
+ success_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ webhook_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ cancel_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
49
+ payment_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ receipt_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
+ custom_fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
52
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ required: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
54
+ field_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
+ }, z.core.$loose>>>>;
56
+ has_setup_fee: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
57
+ price_in_cents: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
58
+ pay_button_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ billing_interval: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ trial_period_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
61
+ min_billing_cycles: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
62
+ user_selects_amount: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
63
+ billing_interval_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
64
+ }, z.core.$loose>;
65
+ declare const payhereCreatePlan: import("@keystrokehq/action").WorkflowActionDefinition<{
66
+ name: string;
67
+ currency: string;
68
+ payment_type: "recurring" | "one_off";
69
+ price?: number | undefined;
70
+ hidden?: boolean | undefined;
71
+ show_qty?: boolean | undefined;
72
+ setup_fee?: number | undefined;
73
+ billing_day?: number | undefined;
74
+ description?: string | undefined;
75
+ success_url?: string | undefined;
76
+ webhook_url?: string | undefined;
77
+ cancel_after?: number | undefined;
78
+ receipt_text?: string | undefined;
79
+ pay_button_text?: string | undefined;
80
+ billing_interval?: "week" | "month" | "year" | undefined;
81
+ min_billing_cycles?: number | undefined;
82
+ user_selects_amount?: boolean | undefined;
83
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
84
  //#endregion
8
85
  export { payhereCreatePlan };
9
86
  //# sourceMappingURL=create-plan.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-plan.d.mts","names":[],"sources":["../../src/actions/create-plan.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAkB4Y;AAAA,cAMta,uBAAA,EAAyB,CAAA,CAAE,UA8Be;AAAA,cAE1C,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"create-plan.d.mts","names":[],"sources":["../../src/actions/create-plan.ts"],"mappings":";;;cAIa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAwBtB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgCvB,iBAAA,gCAAiB,wBAAA"}
@@ -28,7 +28,7 @@ const PayhereCreatePlan_CustomFieldSchema = z.object({
28
28
  name: z.string().describe("Name of the custom field.").nullable().optional(),
29
29
  required: z.boolean().describe("Whether the field is required.").nullable().optional(),
30
30
  field_type: z.string().describe("Type of the custom field.").nullable().optional()
31
- }).describe("Custom form field definition.");
31
+ }).passthrough().describe("Custom form field definition.");
32
32
  const payhereCreatePlan = action("PAYHERE_CREATE_PLAN", {
33
33
  slug: "payhere-create-plan",
34
34
  name: "Create Plan",
@@ -64,7 +64,7 @@ const payhereCreatePlan = action("PAYHERE_CREATE_PLAN", {
64
64
  min_billing_cycles: z.number().int().describe("Minimum billing cycles before cancellation allowed.").nullable().optional(),
65
65
  user_selects_amount: z.boolean().describe("Whether user selects the payment amount.").nullable().optional(),
66
66
  billing_interval_count: z.number().int().describe("Number of intervals between billings.").nullable().optional()
67
- }).describe("Response schema for creating a new plan.")
67
+ }).passthrough().describe("Response schema for creating a new plan.")
68
68
  });
69
69
  //#endregion
70
70
  export { payhereCreatePlan };
@@ -1 +1 @@
1
- {"version":3,"file":"create-plan.mjs","names":[],"sources":["../../src/actions/create-plan.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreatePlanInput: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Display name for the plan shown to customers.\"),\n price: z.number().describe(\"Plan pricing. Omit for donation plans where user_selects_amount is true.\").optional(),\n hidden: z.boolean().describe(\"Hide plan from landing page if true.\").optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp', 'eur').\"),\n show_qty: z.boolean().describe(\"Enable quantity selection field. Only applies to one-off plans.\").optional(),\n setup_fee: z.number().describe(\"Initial one-time charge amount for recurring plans.\").optional(),\n billing_day: z.number().int().describe(\"Day of month for monthly charges (1-31) for recurring plans.\").optional(),\n description: z.string().describe(\"Product or service description shown to customers.\").optional(),\n success_url: z.string().describe(\"URL to redirect customers after successful payment.\").optional(),\n webhook_url: z.string().describe(\"Endpoint URL for receiving payment status notifications.\").optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel subscription after N payments for recurring plans.\").optional(),\n payment_type: z.enum([\"recurring\", \"one_off\"]).describe(\"Type of plan: \\\"recurring\\\" for subscriptions or \\\"one_off\\\" for one-time payments.\"),\n receipt_text: z.string().describe(\"Custom message displayed on payment receipts.\").optional(),\n pay_button_text: z.string().describe(\"Custom label for payment button. Defaults to \\\"Pay\\\".\").optional(),\n billing_interval: z.enum([\"week\", \"month\", \"year\"]).describe(\"Billing frequency for recurring plans: \\\"week\\\", \\\"month\\\", or \\\"year\\\". Required for recurring plans.\").optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation is allowed for recurring plans.\").optional(),\n user_selects_amount: z.boolean().describe(\"Enable donation functionality where users choose the payment amount. When true, omit the price field.\").optional(),\n}).describe(\"Request model for creating a new plan in PayHere.\\n\\nRequired fields vary by plan type:\\n- For one_off plans: name, price, currency, payment_type\\n- For recurring plans: name, price, currency, payment_type, billing_interval\\n- For donation plans: name, currency, payment_type, user_selects_amount=true (price should be omitted)\\n\\nThe payment_type determines whether this is a recurring subscription or one-time payment.\");\nconst PayhereCreatePlan_CustomFieldSchema: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Name of the custom field.\").nullable().optional(),\n required: z.boolean().describe(\"Whether the field is required.\").nullable().optional(),\n field_type: z.string().describe(\"Type of the custom field.\").nullable().optional(),\n}).describe(\"Custom form field definition.\");\nexport const PayhereCreatePlanOutput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Unique plan identifier.\").nullable().optional(),\n qty: z.number().int().describe(\"Available quantity.\").nullable().optional(),\n name: z.string().describe(\"Plan name.\").nullable().optional(),\n slug: z.string().describe(\"URL-friendly plan identifier.\").nullable().optional(),\n type: z.string().describe(\"Plan type.\").nullable().optional(),\n price: z.number().describe(\"Plan price.\").nullable().optional(),\n hidden: z.boolean().describe(\"Whether plan is hidden from landing page.\").nullable().optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp').\").nullable().optional(),\n show_qty: z.boolean().describe(\"Whether to show quantity selector.\").nullable().optional(),\n setup_fee: z.number().describe(\"Setup fee amount.\").nullable().optional(),\n created_at: z.string().describe(\"Creation timestamp.\").nullable().optional(),\n updated_at: z.string().describe(\"Last update timestamp.\").nullable().optional(),\n billing_day: z.number().int().describe(\"Day of month for billing.\").nullable().optional(),\n description: z.string().describe(\"Plan description.\").nullable().optional(),\n limited_qty: z.boolean().describe(\"Whether quantity is limited.\").nullable().optional(),\n success_url: z.string().describe(\"Success redirect URL.\").nullable().optional(),\n webhook_url: z.string().describe(\"Webhook URL.\").nullable().optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel after N payments.\").nullable().optional(),\n payment_type: z.string().describe(\"Type of plan: \\\"recurring\\\" or \\\"one_off\\\".\").nullable().optional(),\n receipt_text: z.string().describe(\"Receipt text.\").nullable().optional(),\n custom_fields: z.array(PayhereCreatePlan_CustomFieldSchema).describe(\"Custom form fields.\").nullable().optional(),\n has_setup_fee: z.boolean().describe(\"Whether plan has setup fee.\").nullable().optional(),\n price_in_cents: z.number().int().describe(\"Price in smallest currency unit (e.g., cents).\").nullable().optional(),\n pay_button_text: z.string().describe(\"Payment button text.\").nullable().optional(),\n billing_interval: z.string().describe(\"Billing frequency for recurring plans.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period length in days.\").nullable().optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation allowed.\").nullable().optional(),\n user_selects_amount: z.boolean().describe(\"Whether user selects the payment amount.\").nullable().optional(),\n billing_interval_count: z.number().int().describe(\"Number of intervals between billings.\").nullable().optional(),\n}).describe(\"Response schema for creating a new plan.\");\n\nexport const payhereCreatePlan = action(\"PAYHERE_CREATE_PLAN\", {\n slug: \"payhere-create-plan\",\n name: \"Create Plan\",\n description: \"Tool to create a new payment plan in PayHere. Use when you need to set up either a recurring subscription or one-off payment plan for accepting payments.\",\n input: PayhereCreatePlanInput,\n output: PayhereCreatePlanOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAuC,EAAE,OAAO;CAC3D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAChH,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CAC9E,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD;CACvF,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC3G,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS;CAC/F,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CAChH,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oD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SAAS;EACzH,qBAAqB,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1G,wBAAwB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjH,CAAC,CAAC,CAAC,SAAS,0CAOF;AACV,CAAC"}
1
+ {"version":3,"file":"create-plan.mjs","names":[],"sources":["../../src/actions/create-plan.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereCreatePlanInput = z.object({\n name: z.string().describe(\"Display name for the plan shown to customers.\"),\n price: z.number().describe(\"Plan pricing. Omit for donation plans where user_selects_amount is true.\").optional(),\n hidden: z.boolean().describe(\"Hide plan from landing page if true.\").optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp', 'eur').\"),\n show_qty: z.boolean().describe(\"Enable quantity selection field. Only applies to one-off plans.\").optional(),\n setup_fee: z.number().describe(\"Initial one-time charge amount for recurring plans.\").optional(),\n billing_day: z.number().int().describe(\"Day of month for monthly charges (1-31) for recurring plans.\").optional(),\n description: z.string().describe(\"Product or service description shown to customers.\").optional(),\n success_url: z.string().describe(\"URL to redirect customers after successful payment.\").optional(),\n webhook_url: z.string().describe(\"Endpoint URL for receiving payment status notifications.\").optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel subscription after N payments for recurring plans.\").optional(),\n payment_type: z.enum([\"recurring\", \"one_off\"]).describe(\"Type of plan: \\\"recurring\\\" for subscriptions or \\\"one_off\\\" for one-time payments.\"),\n receipt_text: z.string().describe(\"Custom message displayed on payment receipts.\").optional(),\n pay_button_text: z.string().describe(\"Custom label for payment button. Defaults to \\\"Pay\\\".\").optional(),\n billing_interval: z.enum([\"week\", \"month\", \"year\"]).describe(\"Billing frequency for recurring plans: \\\"week\\\", \\\"month\\\", or \\\"year\\\". Required for recurring plans.\").optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation is allowed for recurring plans.\").optional(),\n user_selects_amount: z.boolean().describe(\"Enable donation functionality where users choose the payment amount. When true, omit the price field.\").optional(),\n}).describe(\"Request model for creating a new plan in PayHere.\\n\\nRequired fields vary by plan type:\\n- For one_off plans: name, price, currency, payment_type\\n- For recurring plans: name, price, currency, payment_type, billing_interval\\n- For donation plans: name, currency, payment_type, user_selects_amount=true (price should be omitted)\\n\\nThe payment_type determines whether this is a recurring subscription or one-time payment.\");\nconst PayhereCreatePlan_CustomFieldSchema = z.object({\n name: z.string().describe(\"Name of the custom field.\").nullable().optional(),\n required: z.boolean().describe(\"Whether the field is required.\").nullable().optional(),\n field_type: z.string().describe(\"Type of the custom field.\").nullable().optional(),\n}).passthrough().describe(\"Custom form field definition.\");\nexport const PayhereCreatePlanOutput = z.object({\n id: z.number().int().describe(\"Unique plan identifier.\").nullable().optional(),\n qty: z.number().int().describe(\"Available quantity.\").nullable().optional(),\n name: z.string().describe(\"Plan name.\").nullable().optional(),\n slug: z.string().describe(\"URL-friendly plan identifier.\").nullable().optional(),\n type: z.string().describe(\"Plan type.\").nullable().optional(),\n price: z.number().describe(\"Plan price.\").nullable().optional(),\n hidden: z.boolean().describe(\"Whether plan is hidden from landing page.\").nullable().optional(),\n currency: z.string().describe(\"Three-letter currency code (e.g., 'usd', 'gbp').\").nullable().optional(),\n show_qty: z.boolean().describe(\"Whether to show quantity selector.\").nullable().optional(),\n setup_fee: z.number().describe(\"Setup fee amount.\").nullable().optional(),\n created_at: z.string().describe(\"Creation timestamp.\").nullable().optional(),\n updated_at: z.string().describe(\"Last update timestamp.\").nullable().optional(),\n billing_day: z.number().int().describe(\"Day of month for billing.\").nullable().optional(),\n description: z.string().describe(\"Plan description.\").nullable().optional(),\n limited_qty: z.boolean().describe(\"Whether quantity is limited.\").nullable().optional(),\n success_url: z.string().describe(\"Success redirect URL.\").nullable().optional(),\n webhook_url: z.string().describe(\"Webhook URL.\").nullable().optional(),\n cancel_after: z.number().int().describe(\"Auto-cancel after N payments.\").nullable().optional(),\n payment_type: z.string().describe(\"Type of plan: \\\"recurring\\\" or \\\"one_off\\\".\").nullable().optional(),\n receipt_text: z.string().describe(\"Receipt text.\").nullable().optional(),\n custom_fields: z.array(PayhereCreatePlan_CustomFieldSchema).describe(\"Custom form fields.\").nullable().optional(),\n has_setup_fee: z.boolean().describe(\"Whether plan has setup fee.\").nullable().optional(),\n price_in_cents: z.number().int().describe(\"Price in smallest currency unit (e.g., cents).\").nullable().optional(),\n pay_button_text: z.string().describe(\"Payment button text.\").nullable().optional(),\n billing_interval: z.string().describe(\"Billing frequency for recurring plans.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period length in days.\").nullable().optional(),\n min_billing_cycles: z.number().int().describe(\"Minimum billing cycles before cancellation allowed.\").nullable().optional(),\n user_selects_amount: z.boolean().describe(\"Whether user selects the payment amount.\").nullable().optional(),\n billing_interval_count: z.number().int().describe(\"Number of intervals between billings.\").nullable().optional(),\n}).passthrough().describe(\"Response schema for creating a new plan.\");\n\nexport const payhereCreatePlan = action(\"PAYHERE_CREATE_PLAN\", {\n slug: \"payhere-create-plan\",\n name: \"Create Plan\",\n description: \"Tool to create a new payment plan in PayHere. Use when you need to set up either a recurring subscription or one-off payment plan for accepting payments.\",\n input: PayhereCreatePlanInput,\n output: PayhereCreatePlanOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAyB,EAAE,OAAO;CAC7C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAChH,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CAC9E,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD;CACvF,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC3G,WAAW,EAAE,OA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AmB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjG,oBAAoB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzH,qBAAqB,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1G,wBAAwB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,0CAOhB;AACV,CAAC"}
@@ -3,9 +3,9 @@ let zod = require("zod");
3
3
  //#region src/actions/delete-hook.ts
4
4
  const PayhereDeleteHookInput = zod.z.object({ id: zod.z.number().int().describe("The unique identifier of the REST hook to delete") }).describe("Request parameters for deleting a REST hook listener.");
5
5
  const PayhereDeleteHookOutput = zod.z.object({
6
- id: zod.z.number().int().describe("The identifier of the REST hook that was deleted"),
7
- message: zod.z.string().describe("Confirmation message indicating the hook was successfully deleted")
8
- }).describe("Response schema for deleting a REST hook.");
6
+ id: zod.z.number().int().describe("The identifier of the REST hook that was deleted").nullable(),
7
+ message: zod.z.string().describe("Confirmation message indicating the hook was successfully deleted").nullable()
8
+ }).passthrough().describe("Response schema for deleting a REST hook.");
9
9
  const payhereDeleteHook = require_action.action("PAYHERE_DELETE_HOOK", {
10
10
  slug: "payhere-delete-hook",
11
11
  name: "Delete Hook",
@@ -1 +1 @@
1
- {"version":3,"file":"delete-hook.cjs","names":["z","action"],"sources":["../../src/actions/delete-hook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereDeleteHookInput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"The unique identifier of the REST hook to delete\"),\n}).describe(\"Request parameters for deleting a REST hook listener.\");\nexport const PayhereDeleteHookOutput: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"The identifier of the REST hook that was deleted\"),\n message: z.string().describe(\"Confirmation message indicating the hook was successfully deleted\"),\n}).describe(\"Response schema for deleting a REST hook.\");\n\nexport const payhereDeleteHook = action(\"PAYHERE_DELETE_HOOK\", {\n slug: \"payhere-delete-hook\",\n name: \"Delete Hook\",\n description: \"Tool to remove a REST hook listener subscription. Use when you need to stop receiving webhook events for a specific hook.\",\n input: PayhereDeleteHookInput,\n output: PayhereDeleteHookOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAuCA,IAAAA,EAAE,OAAO,EAC3D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,EAClF,CAAC,CAAC,CAAC,SAAS,uDAAuD;AACnE,MAAa,0BAAwCA,IAAAA,EAAE,OAAO;CAC5D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD;CAChF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE;AAClG,CAAC,CAAC,CAAC,SAAS,2CAA2C;AAEvD,MAAa,oBAAoBC,eAAAA,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"delete-hook.cjs","names":["z","action"],"sources":["../../src/actions/delete-hook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PayhereDeleteHookInput = z.object({\n id: z.number().int().describe(\"The unique identifier of the REST hook to delete\"),\n}).describe(\"Request parameters for deleting a REST hook listener.\");\nexport const PayhereDeleteHookOutput = z.object({\n id: z.number().int().describe(\"The identifier of the REST hook that was deleted\").nullable(),\n message: z.string().describe(\"Confirmation message indicating the hook was successfully deleted\").nullable(),\n}).passthrough().describe(\"Response schema for deleting a REST hook.\");\n\nexport const payhereDeleteHook = action(\"PAYHERE_DELETE_HOOK\", {\n slug: \"payhere-delete-hook\",\n name: \"Delete Hook\",\n description: \"Tool to remove a REST hook listener subscription. Use when you need to stop receiving webhook events for a specific hook.\",\n input: PayhereDeleteHookInput,\n output: PayhereDeleteHookOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAyBA,IAAAA,EAAE,OAAO,EAC7C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,EAClF,CAAC,CAAC,CAAC,SAAS,uDAAuD;AACnE,MAAa,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC3F,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;AAC7G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,2CAA2C;AAErE,MAAa,oBAAoBC,eAAAA,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,9 +1,16 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/actions/delete-hook.d.ts
4
- declare const PayhereDeleteHookInput: z.ZodTypeAny;
5
- declare const PayhereDeleteHookOutput: z.ZodTypeAny;
6
- declare const payhereDeleteHook: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
4
+ declare const PayhereDeleteHookInput: z.ZodObject<{
5
+ id: z.ZodNumber;
6
+ }, z.core.$strip>;
7
+ declare const PayhereDeleteHookOutput: z.ZodObject<{
8
+ id: z.ZodNullable<z.ZodNumber>;
9
+ message: z.ZodNullable<z.ZodString>;
10
+ }, z.core.$loose>;
11
+ declare const payhereDeleteHook: import("@keystrokehq/action").WorkflowActionDefinition<{
12
+ id: number;
13
+ }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
14
  //#endregion
8
15
  export { payhereDeleteHook };
9
16
  //# sourceMappingURL=delete-hook.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-hook.d.cts","names":[],"sources":["../../src/actions/delete-hook.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAE6B;AAAA,cACvD,uBAAA,EAAyB,CAAA,CAAE,UAGgB;AAAA,cAE3C,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
1
+ {"version":3,"file":"delete-hook.d.cts","names":[],"sources":["../../src/actions/delete-hook.ts"],"mappings":";;;cAIa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;cAGtB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;cAKvB,iBAAA,gCAAiB,wBAAA"}