@keystrokehq/moonclerk 0.1.0

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 (74) hide show
  1. package/README.md +17 -0
  2. package/dist/action.cjs +21 -0
  3. package/dist/action.cjs.map +1 -0
  4. package/dist/action.mjs +21 -0
  5. package/dist/action.mjs.map +1 -0
  6. package/dist/actions/index.cjs +11 -0
  7. package/dist/actions/index.d.cts +6 -0
  8. package/dist/actions/index.d.mts +6 -0
  9. package/dist/actions/index.mjs +6 -0
  10. package/dist/actions/list-customers.cjs +99 -0
  11. package/dist/actions/list-customers.cjs.map +1 -0
  12. package/dist/actions/list-customers.d.cts +9 -0
  13. package/dist/actions/list-customers.d.cts.map +1 -0
  14. package/dist/actions/list-customers.d.mts +9 -0
  15. package/dist/actions/list-customers.d.mts.map +1 -0
  16. package/dist/actions/list-customers.mjs +96 -0
  17. package/dist/actions/list-customers.mjs.map +1 -0
  18. package/dist/actions/list-discounts.cjs +44 -0
  19. package/dist/actions/list-discounts.cjs.map +1 -0
  20. package/dist/actions/list-discounts.d.cts +9 -0
  21. package/dist/actions/list-discounts.d.cts.map +1 -0
  22. package/dist/actions/list-discounts.d.mts +9 -0
  23. package/dist/actions/list-discounts.d.mts.map +1 -0
  24. package/dist/actions/list-discounts.mjs +41 -0
  25. package/dist/actions/list-discounts.mjs.map +1 -0
  26. package/dist/actions/list-forms.cjs +32 -0
  27. package/dist/actions/list-forms.cjs.map +1 -0
  28. package/dist/actions/list-forms.d.cts +9 -0
  29. package/dist/actions/list-forms.d.cts.map +1 -0
  30. package/dist/actions/list-forms.d.mts +9 -0
  31. package/dist/actions/list-forms.d.mts.map +1 -0
  32. package/dist/actions/list-forms.mjs +29 -0
  33. package/dist/actions/list-forms.mjs.map +1 -0
  34. package/dist/actions/list-payments.cjs +75 -0
  35. package/dist/actions/list-payments.cjs.map +1 -0
  36. package/dist/actions/list-payments.d.cts +9 -0
  37. package/dist/actions/list-payments.d.cts.map +1 -0
  38. package/dist/actions/list-payments.d.mts +9 -0
  39. package/dist/actions/list-payments.d.mts.map +1 -0
  40. package/dist/actions/list-payments.mjs +72 -0
  41. package/dist/actions/list-payments.mjs.map +1 -0
  42. package/dist/actions/list-subscriptions.cjs +52 -0
  43. package/dist/actions/list-subscriptions.cjs.map +1 -0
  44. package/dist/actions/list-subscriptions.d.cts +9 -0
  45. package/dist/actions/list-subscriptions.d.cts.map +1 -0
  46. package/dist/actions/list-subscriptions.d.mts +9 -0
  47. package/dist/actions/list-subscriptions.d.mts.map +1 -0
  48. package/dist/actions/list-subscriptions.mjs +49 -0
  49. package/dist/actions/list-subscriptions.mjs.map +1 -0
  50. package/dist/app.cjs +9 -0
  51. package/dist/app.cjs.map +1 -0
  52. package/dist/app.d.cts +5 -0
  53. package/dist/app.d.cts.map +1 -0
  54. package/dist/app.d.mts +5 -0
  55. package/dist/app.d.mts.map +1 -0
  56. package/dist/app.mjs +10 -0
  57. package/dist/app.mjs.map +1 -0
  58. package/dist/catalog.cjs +15 -0
  59. package/dist/catalog.cjs.map +1 -0
  60. package/dist/catalog.d.cts +14 -0
  61. package/dist/catalog.d.cts.map +1 -0
  62. package/dist/catalog.d.mts +14 -0
  63. package/dist/catalog.d.mts.map +1 -0
  64. package/dist/catalog.mjs +15 -0
  65. package/dist/catalog.mjs.map +1 -0
  66. package/dist/execute.cjs +18 -0
  67. package/dist/execute.cjs.map +1 -0
  68. package/dist/execute.mjs +18 -0
  69. package/dist/execute.mjs.map +1 -0
  70. package/dist/index.cjs +16 -0
  71. package/dist/index.d.cts +8 -0
  72. package/dist/index.d.mts +8 -0
  73. package/dist/index.mjs +9 -0
  74. package/package.json +49 -0
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @keystrokehq/moonclerk
2
+
3
+ Keystroke-managed integration.
4
+
5
+ **App:** `moonclerk`
6
+ **Version:** `20260227_00`
7
+ **Actions:** 5
8
+
9
+ ```ts
10
+ import { defineAgent } from "@keystrokehq/keystroke/agent";
11
+ import { moonclerkListCustomers } from "@keystrokehq/moonclerk/actions";
12
+
13
+ export default defineAgent({
14
+ key: "moonclerk-agent",
15
+ tools: [moonclerkListCustomers],
16
+ });
17
+ ```
@@ -0,0 +1,21 @@
1
+ const require_app = require("./app.cjs");
2
+ const require_execute = require("./execute.cjs");
3
+ require("zod");
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return require_app.moonclerk.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await require_execute.executeMoonclerkTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ exports.action = action;
20
+
21
+ //# sourceMappingURL=action.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.cjs","names":["moonclerk","executeMoonclerkTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { moonclerk } from \"./app\";\nimport { executeMoonclerkTool } 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 moonclerk.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 executeMoonclerkTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,UAAU,OAAO;EACtB,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,qBAAqB,MAAM,KAAgC,CAAC;EAC5F;CACF,CAAC;AACH"}
@@ -0,0 +1,21 @@
1
+ import { moonclerk } from "./app.mjs";
2
+ import { executeMoonclerkTool } from "./execute.mjs";
3
+ import "zod";
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return moonclerk.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await executeMoonclerkTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ export { action };
20
+
21
+ //# sourceMappingURL=action.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { moonclerk } from \"./app\";\nimport { executeMoonclerkTool } 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 moonclerk.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 executeMoonclerkTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,UAAU,OAAO;EACtB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,qBAAqB,MAAM,KAAgC,CAAC;EAC5F;CACF,CAAC;AACH"}
@@ -0,0 +1,11 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_list_customers = require("./list-customers.cjs");
3
+ const require_list_discounts = require("./list-discounts.cjs");
4
+ const require_list_forms = require("./list-forms.cjs");
5
+ const require_list_payments = require("./list-payments.cjs");
6
+ const require_list_subscriptions = require("./list-subscriptions.cjs");
7
+ exports.moonclerkListCustomers = require_list_customers.moonclerkListCustomers;
8
+ exports.moonclerkListDiscounts = require_list_discounts.moonclerkListDiscounts;
9
+ exports.moonclerkListForms = require_list_forms.moonclerkListForms;
10
+ exports.moonclerkListPayments = require_list_payments.moonclerkListPayments;
11
+ exports.moonclerkListSubscriptions = require_list_subscriptions.moonclerkListSubscriptions;
@@ -0,0 +1,6 @@
1
+ import { moonclerkListCustomers } from "./list-customers.cjs";
2
+ import { moonclerkListDiscounts } from "./list-discounts.cjs";
3
+ import { moonclerkListForms } from "./list-forms.cjs";
4
+ import { moonclerkListPayments } from "./list-payments.cjs";
5
+ import { moonclerkListSubscriptions } from "./list-subscriptions.cjs";
6
+ export { moonclerkListCustomers, moonclerkListDiscounts, moonclerkListForms, moonclerkListPayments, moonclerkListSubscriptions };
@@ -0,0 +1,6 @@
1
+ import { moonclerkListCustomers } from "./list-customers.mjs";
2
+ import { moonclerkListDiscounts } from "./list-discounts.mjs";
3
+ import { moonclerkListForms } from "./list-forms.mjs";
4
+ import { moonclerkListPayments } from "./list-payments.mjs";
5
+ import { moonclerkListSubscriptions } from "./list-subscriptions.mjs";
6
+ export { moonclerkListCustomers, moonclerkListDiscounts, moonclerkListForms, moonclerkListPayments, moonclerkListSubscriptions };
@@ -0,0 +1,6 @@
1
+ import { moonclerkListCustomers } from "./list-customers.mjs";
2
+ import { moonclerkListDiscounts } from "./list-discounts.mjs";
3
+ import { moonclerkListForms } from "./list-forms.mjs";
4
+ import { moonclerkListPayments } from "./list-payments.mjs";
5
+ import { moonclerkListSubscriptions } from "./list-subscriptions.mjs";
6
+ export { moonclerkListCustomers, moonclerkListDiscounts, moonclerkListForms, moonclerkListPayments, moonclerkListSubscriptions };
@@ -0,0 +1,99 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/list-customers.ts
4
+ const MoonclerkListCustomersInput = zod.z.object({
5
+ status: zod.z.enum([
6
+ "active",
7
+ "canceled",
8
+ "expired",
9
+ "past_due",
10
+ "pending",
11
+ "unpaid"
12
+ ]).describe("Filter by subscription status.").optional(),
13
+ form_id: zod.z.number().int().describe("The associated MoonClerk form ID to filter customers.").optional(),
14
+ checkout_to: zod.z.string().describe("Customers created on or before this date (YYYY-MM-DD).").optional(),
15
+ checkout_from: zod.z.string().describe("Customers created on or after this date (YYYY-MM-DD).").optional(),
16
+ next_payment_to: zod.z.string().describe("Subscriptions due to bill on or before this date (YYYY-MM-DD).").optional(),
17
+ next_payment_from: zod.z.string().describe("Subscriptions due to bill on or after this date (YYYY-MM-DD).").optional()
18
+ }).describe("Request parameters for listing customers with optional filters.");
19
+ const MoonclerkListCustomersOutput = zod.z.object({ customers: zod.z.array(zod.z.object({
20
+ id: zod.z.number().int().describe("Customer ID."),
21
+ name: zod.z.string().describe("Customer name."),
22
+ email: zod.z.string().describe("Customer email address."),
23
+ form_id: zod.z.number().int().describe("Associated form ID."),
24
+ checkout: zod.z.object({
25
+ fee: zod.z.number().int().describe("Fee amount in cents."),
26
+ date: zod.z.string().describe("Checkout timestamp (ISO 8601)."),
27
+ token: zod.z.string().describe("Checkout token."),
28
+ total: zod.z.number().int().describe("Total amount in cents."),
29
+ subtotal: zod.z.number().int().describe("Subtotal in cents."),
30
+ amount_due: zod.z.number().int().describe("Amount due in cents."),
31
+ coupon_code: zod.z.string().describe("Applied coupon code.").nullable().optional(),
32
+ coupon_amount: zod.z.number().int().describe("Coupon amount in cents."),
33
+ upfront_amount: zod.z.number().int().describe("Upfront amount charged in cents.").nullable().optional(),
34
+ trial_period_days: zod.z.number().int().describe("Trial period days if trial is applied.").nullable().optional()
35
+ }).describe("Checkout details for the customer."),
36
+ discount: zod.z.object({
37
+ coupon: zod.z.object({
38
+ code: zod.z.string().describe("Coupon code."),
39
+ currency: zod.z.string().describe("Currency for the amount_off, e.g., 'USD'.").nullable().optional(),
40
+ duration: zod.z.string().describe("Duration of the coupon, e.g., 'once'."),
41
+ redeem_by: zod.z.string().describe("ISO 8601 date when the coupon expires.").nullable().optional(),
42
+ amount_off: zod.z.number().int().describe("Amount off in cents.").nullable().optional(),
43
+ percent_off: zod.z.number().int().describe("Percent off for the coupon.").nullable().optional(),
44
+ max_redemptions: zod.z.number().int().describe("Maximum number of redemptions allowed by the coupon.").nullable().optional(),
45
+ duration_in_months: zod.z.number().int().describe("Number of months the coupon is valid for (if applicable).").nullable().optional()
46
+ }).describe("Coupon applied to the customer."),
47
+ ends_at: zod.z.string().describe("Discount end date (ISO 8601).").nullable().optional(),
48
+ starts_at: zod.z.string().describe("Discount start date (ISO 8601).").nullable().optional()
49
+ }).describe("Discount details including coupon and validity.").optional(),
50
+ custom_id: zod.z.string().describe("Custom ID set via integration.").nullable().optional(),
51
+ delinquent: zod.z.boolean().describe("Whether the customer is delinquent."),
52
+ subscription: zod.z.object({
53
+ id: zod.z.number().int().describe("Subscription ID."),
54
+ plan: zod.z.object({
55
+ id: zod.z.number().int().describe("Plan ID."),
56
+ amount: zod.z.number().int().describe("Amount in cents."),
57
+ currency: zod.z.string().describe("Currency code, e.g., 'USD'."),
58
+ interval: zod.z.string().describe("Billing interval, e.g., 'month'."),
59
+ interval_count: zod.z.number().int().describe("Interval count, e.g., 1 for monthly."),
60
+ plan_reference: zod.z.string().describe("Plan reference ID."),
61
+ amount_description: zod.z.string().describe("Description of the amount option.")
62
+ }).describe("Associated plan details."),
63
+ start: zod.z.string().describe("Subscription start timestamp (ISO 8601)."),
64
+ status: zod.z.string().describe("Subscription status."),
65
+ ended_at: zod.z.string().describe("End timestamp if subscription ended.").nullable().optional(),
66
+ trial_end: zod.z.string().describe("Trial end timestamp if applicable.").nullable().optional(),
67
+ expires_at: zod.z.string().describe("Expiration timestamp if set.").nullable().optional(),
68
+ canceled_at: zod.z.string().describe("Cancellation timestamp if applicable.").nullable().optional(),
69
+ trial_start: zod.z.string().describe("Trial start timestamp if applicable.").nullable().optional(),
70
+ trial_period_days: zod.z.number().int().describe("Number of trial days if applicable.").nullable().optional(),
71
+ current_period_end: zod.z.string().describe("End of current period (ISO 8601)."),
72
+ current_period_start: zod.z.string().describe("Start of current period (ISO 8601)."),
73
+ next_payment_attempt: zod.z.string().describe("Next payment attempt timestamp (ISO 8601).").nullable().optional(),
74
+ first_payment_attempt: zod.z.string().describe("First payment attempt timestamp (ISO 8601)."),
75
+ subscription_reference: zod.z.string().describe("Subscription reference ID.")
76
+ }).describe("Subscription details for the customer.").optional(),
77
+ custom_fields: zod.z.object({}).describe("Custom field responses keyed by field name.").nullable().optional(),
78
+ management_url: zod.z.string().describe("URL for managing the subscription in MoonClerk UI.").nullable().optional(),
79
+ payment_method: zod.z.object({
80
+ type: zod.z.string().describe("Payment method type, e.g., 'card'."),
81
+ brand: zod.z.string().describe("Card brand, e.g., 'Visa'."),
82
+ last4: zod.z.string().describe("Last 4 digits of the card."),
83
+ exp_year: zod.z.number().int().describe("Card expiration year."),
84
+ exp_month: zod.z.number().int().describe("Card expiration month.")
85
+ }).describe("Payment method details.").nullable().optional(),
86
+ account_balance: zod.z.number().int().describe("Account balance in cents."),
87
+ customer_reference: zod.z.string().describe("Stripe customer ID reference.").nullable().optional()
88
+ }).describe("Customer object representing a MoonClerk customer (Plan in UI).")).describe("List of customer objects.") }).describe("Data from the action execution");
89
+ const moonclerkListCustomers = require_action.action("MOONCLERK_LIST_CUSTOMERS", {
90
+ slug: "moonclerk-list-customers",
91
+ name: "List Customers",
92
+ description: "Tool to list customers (plans) from MoonClerk. Use when you need to retrieve customer data with optional filters. Use after authenticating API credentials.",
93
+ input: MoonclerkListCustomersInput,
94
+ output: MoonclerkListCustomersOutput
95
+ });
96
+ //#endregion
97
+ exports.moonclerkListCustomers = moonclerkListCustomers;
98
+
99
+ //# sourceMappingURL=list-customers.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-customers.cjs","names":["z","action"],"sources":["../../src/actions/list-customers.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const MoonclerkListCustomersInput: z.ZodTypeAny = z.object({\n status: z.enum([\"active\", \"canceled\", \"expired\", \"past_due\", \"pending\", \"unpaid\"]).describe(\"Filter by subscription status.\").optional(),\n form_id: z.number().int().describe(\"The associated MoonClerk form ID to filter customers.\").optional(),\n checkout_to: z.string().describe(\"Customers created on or before this date (YYYY-MM-DD).\").optional(),\n checkout_from: z.string().describe(\"Customers created on or after this date (YYYY-MM-DD).\").optional(),\n next_payment_to: z.string().describe(\"Subscriptions due to bill on or before this date (YYYY-MM-DD).\").optional(),\n next_payment_from: z.string().describe(\"Subscriptions due to bill on or after this date (YYYY-MM-DD).\").optional(),\n}).describe(\"Request parameters for listing customers with optional filters.\");\nexport const MoonclerkListCustomersOutput: z.ZodTypeAny = z.object({\n customers: z.array(z.object({\n id: z.number().int().describe(\"Customer ID.\"),\n name: z.string().describe(\"Customer name.\"),\n email: z.string().describe(\"Customer email address.\"),\n form_id: z.number().int().describe(\"Associated form ID.\"),\n checkout: z.object({\n fee: z.number().int().describe(\"Fee amount in cents.\"),\n date: z.string().describe(\"Checkout timestamp (ISO 8601).\"),\n token: z.string().describe(\"Checkout token.\"),\n total: z.number().int().describe(\"Total amount in cents.\"),\n subtotal: z.number().int().describe(\"Subtotal in cents.\"),\n amount_due: z.number().int().describe(\"Amount due in cents.\"),\n coupon_code: z.string().describe(\"Applied coupon code.\").nullable().optional(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents.\"),\n upfront_amount: z.number().int().describe(\"Upfront amount charged in cents.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period days if trial is applied.\").nullable().optional(),\n}).describe(\"Checkout details for the customer.\"),\n discount: z.object({\n coupon: z.object({\n code: z.string().describe(\"Coupon code.\"),\n currency: z.string().describe(\"Currency for the amount_off, e.g., 'USD'.\").nullable().optional(),\n duration: z.string().describe(\"Duration of the coupon, e.g., 'once'.\"),\n redeem_by: z.string().describe(\"ISO 8601 date when the coupon expires.\").nullable().optional(),\n amount_off: z.number().int().describe(\"Amount off in cents.\").nullable().optional(),\n percent_off: z.number().int().describe(\"Percent off for the coupon.\").nullable().optional(),\n max_redemptions: z.number().int().describe(\"Maximum number of redemptions allowed by the coupon.\").nullable().optional(),\n duration_in_months: z.number().int().describe(\"Number of months the coupon is valid for (if applicable).\").nullable().optional(),\n}).describe(\"Coupon applied to the customer.\"),\n ends_at: z.string().describe(\"Discount end date (ISO 8601).\").nullable().optional(),\n starts_at: z.string().describe(\"Discount start date (ISO 8601).\").nullable().optional(),\n}).describe(\"Discount details including coupon and validity.\").optional(),\n custom_id: z.string().describe(\"Custom ID set via integration.\").nullable().optional(),\n delinquent: z.boolean().describe(\"Whether the customer is delinquent.\"),\n subscription: z.object({\n id: z.number().int().describe(\"Subscription ID.\"),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\"),\n amount: z.number().int().describe(\"Amount in cents.\"),\n currency: z.string().describe(\"Currency code, e.g., 'USD'.\"),\n interval: z.string().describe(\"Billing interval, e.g., 'month'.\"),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\"),\n plan_reference: z.string().describe(\"Plan reference ID.\"),\n amount_description: z.string().describe(\"Description of the amount option.\"),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\"),\n status: z.string().describe(\"Subscription status.\"),\n ended_at: z.string().describe(\"End timestamp if subscription ended.\").nullable().optional(),\n trial_end: z.string().describe(\"Trial end timestamp if applicable.\").nullable().optional(),\n expires_at: z.string().describe(\"Expiration timestamp if set.\").nullable().optional(),\n canceled_at: z.string().describe(\"Cancellation timestamp if applicable.\").nullable().optional(),\n trial_start: z.string().describe(\"Trial start timestamp if applicable.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Number of trial days if applicable.\").nullable().optional(),\n current_period_end: z.string().describe(\"End of current period (ISO 8601).\"),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\"),\n next_payment_attempt: z.string().describe(\"Next payment attempt timestamp (ISO 8601).\").nullable().optional(),\n first_payment_attempt: z.string().describe(\"First payment attempt timestamp (ISO 8601).\"),\n subscription_reference: z.string().describe(\"Subscription reference ID.\"),\n}).describe(\"Subscription details for the customer.\").optional(),\n custom_fields: z.object({}).describe(\"Custom field responses keyed by field name.\").nullable().optional(),\n management_url: z.string().describe(\"URL for managing the subscription in MoonClerk UI.\").nullable().optional(),\n payment_method: z.object({\n type: z.string().describe(\"Payment method type, e.g., 'card'.\"),\n brand: z.string().describe(\"Card brand, e.g., 'Visa'.\"),\n last4: z.string().describe(\"Last 4 digits of the card.\"),\n exp_year: z.number().int().describe(\"Card expiration year.\"),\n exp_month: z.number().int().describe(\"Card expiration month.\"),\n}).describe(\"Payment method details.\").nullable().optional(),\n account_balance: z.number().int().describe(\"Account balance in cents.\"),\n customer_reference: z.string().describe(\"Stripe customer ID reference.\").nullable().optional(),\n}).describe(\"Customer object representing a MoonClerk customer (Plan in UI).\")).describe(\"List of customer objects.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListCustomers = action(\"MOONCLERK_LIST_CUSTOMERS\", {\n slug: \"moonclerk-list-customers\",\n name: \"List Customers\",\n description: \"Tool to list customers (plans) from MoonClerk. Use when you need to retrieve customer data with optional filters. Use after authenticating API credentials.\",\n input: MoonclerkListCustomersInput,\n output: MoonclerkListCustomersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4CA,IAAAA,EAAE,OAAO;CAChE,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAY;EAAW;EAAY;EAAW;CAAQ,CAAC,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;CACvI,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACrG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;CACpG,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,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AAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;EACvD,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uBAAuB;EAC3D,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wBAAwB;CAC/D,CAAC,CAAC,CAAC,SAAS,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzD,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2BAA2B;CACtE,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC/F,CAAC,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,CAAC,SAAS,2BAA2B,EACpH,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,yBAAyBC,eAAAA,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/list-customers.d.ts
4
+ declare const MoonclerkListCustomersInput: z.ZodTypeAny;
5
+ declare const MoonclerkListCustomersOutput: z.ZodTypeAny;
6
+ declare const moonclerkListCustomers: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { moonclerkListCustomers };
9
+ //# sourceMappingURL=list-customers.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-customers.d.cts","names":[],"sources":["../../src/actions/list-customers.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAOkC;AAAA,cACjE,4BAAA,EAA8B,CAAA,CAAE,UAuEA;AAAA,cAEhC,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/list-customers.d.ts
4
+ declare const MoonclerkListCustomersInput: z.ZodTypeAny;
5
+ declare const MoonclerkListCustomersOutput: z.ZodTypeAny;
6
+ declare const moonclerkListCustomers: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { moonclerkListCustomers };
9
+ //# sourceMappingURL=list-customers.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-customers.d.mts","names":[],"sources":["../../src/actions/list-customers.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAOkC;AAAA,cACjE,4BAAA,EAA8B,CAAA,CAAE,UAuEA;AAAA,cAEhC,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,96 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const moonclerkListCustomers = action("MOONCLERK_LIST_CUSTOMERS", {
4
+ slug: "moonclerk-list-customers",
5
+ name: "List Customers",
6
+ description: "Tool to list customers (plans) from MoonClerk. Use when you need to retrieve customer data with optional filters. Use after authenticating API credentials.",
7
+ input: z.object({
8
+ status: z.enum([
9
+ "active",
10
+ "canceled",
11
+ "expired",
12
+ "past_due",
13
+ "pending",
14
+ "unpaid"
15
+ ]).describe("Filter by subscription status.").optional(),
16
+ form_id: z.number().int().describe("The associated MoonClerk form ID to filter customers.").optional(),
17
+ checkout_to: z.string().describe("Customers created on or before this date (YYYY-MM-DD).").optional(),
18
+ checkout_from: z.string().describe("Customers created on or after this date (YYYY-MM-DD).").optional(),
19
+ next_payment_to: z.string().describe("Subscriptions due to bill on or before this date (YYYY-MM-DD).").optional(),
20
+ next_payment_from: z.string().describe("Subscriptions due to bill on or after this date (YYYY-MM-DD).").optional()
21
+ }).describe("Request parameters for listing customers with optional filters."),
22
+ output: z.object({ customers: z.array(z.object({
23
+ id: z.number().int().describe("Customer ID."),
24
+ name: z.string().describe("Customer name."),
25
+ email: z.string().describe("Customer email address."),
26
+ form_id: z.number().int().describe("Associated form ID."),
27
+ checkout: z.object({
28
+ fee: z.number().int().describe("Fee amount in cents."),
29
+ date: z.string().describe("Checkout timestamp (ISO 8601)."),
30
+ token: z.string().describe("Checkout token."),
31
+ total: z.number().int().describe("Total amount in cents."),
32
+ subtotal: z.number().int().describe("Subtotal in cents."),
33
+ amount_due: z.number().int().describe("Amount due in cents."),
34
+ coupon_code: z.string().describe("Applied coupon code.").nullable().optional(),
35
+ coupon_amount: z.number().int().describe("Coupon amount in cents."),
36
+ upfront_amount: z.number().int().describe("Upfront amount charged in cents.").nullable().optional(),
37
+ trial_period_days: z.number().int().describe("Trial period days if trial is applied.").nullable().optional()
38
+ }).describe("Checkout details for the customer."),
39
+ discount: z.object({
40
+ coupon: z.object({
41
+ code: z.string().describe("Coupon code."),
42
+ currency: z.string().describe("Currency for the amount_off, e.g., 'USD'.").nullable().optional(),
43
+ duration: z.string().describe("Duration of the coupon, e.g., 'once'."),
44
+ redeem_by: z.string().describe("ISO 8601 date when the coupon expires.").nullable().optional(),
45
+ amount_off: z.number().int().describe("Amount off in cents.").nullable().optional(),
46
+ percent_off: z.number().int().describe("Percent off for the coupon.").nullable().optional(),
47
+ max_redemptions: z.number().int().describe("Maximum number of redemptions allowed by the coupon.").nullable().optional(),
48
+ duration_in_months: z.number().int().describe("Number of months the coupon is valid for (if applicable).").nullable().optional()
49
+ }).describe("Coupon applied to the customer."),
50
+ ends_at: z.string().describe("Discount end date (ISO 8601).").nullable().optional(),
51
+ starts_at: z.string().describe("Discount start date (ISO 8601).").nullable().optional()
52
+ }).describe("Discount details including coupon and validity.").optional(),
53
+ custom_id: z.string().describe("Custom ID set via integration.").nullable().optional(),
54
+ delinquent: z.boolean().describe("Whether the customer is delinquent."),
55
+ subscription: z.object({
56
+ id: z.number().int().describe("Subscription ID."),
57
+ plan: z.object({
58
+ id: z.number().int().describe("Plan ID."),
59
+ amount: z.number().int().describe("Amount in cents."),
60
+ currency: z.string().describe("Currency code, e.g., 'USD'."),
61
+ interval: z.string().describe("Billing interval, e.g., 'month'."),
62
+ interval_count: z.number().int().describe("Interval count, e.g., 1 for monthly."),
63
+ plan_reference: z.string().describe("Plan reference ID."),
64
+ amount_description: z.string().describe("Description of the amount option.")
65
+ }).describe("Associated plan details."),
66
+ start: z.string().describe("Subscription start timestamp (ISO 8601)."),
67
+ status: z.string().describe("Subscription status."),
68
+ ended_at: z.string().describe("End timestamp if subscription ended.").nullable().optional(),
69
+ trial_end: z.string().describe("Trial end timestamp if applicable.").nullable().optional(),
70
+ expires_at: z.string().describe("Expiration timestamp if set.").nullable().optional(),
71
+ canceled_at: z.string().describe("Cancellation timestamp if applicable.").nullable().optional(),
72
+ trial_start: z.string().describe("Trial start timestamp if applicable.").nullable().optional(),
73
+ trial_period_days: z.number().int().describe("Number of trial days if applicable.").nullable().optional(),
74
+ current_period_end: z.string().describe("End of current period (ISO 8601)."),
75
+ current_period_start: z.string().describe("Start of current period (ISO 8601)."),
76
+ next_payment_attempt: z.string().describe("Next payment attempt timestamp (ISO 8601).").nullable().optional(),
77
+ first_payment_attempt: z.string().describe("First payment attempt timestamp (ISO 8601)."),
78
+ subscription_reference: z.string().describe("Subscription reference ID.")
79
+ }).describe("Subscription details for the customer.").optional(),
80
+ custom_fields: z.object({}).describe("Custom field responses keyed by field name.").nullable().optional(),
81
+ management_url: z.string().describe("URL for managing the subscription in MoonClerk UI.").nullable().optional(),
82
+ payment_method: z.object({
83
+ type: z.string().describe("Payment method type, e.g., 'card'."),
84
+ brand: z.string().describe("Card brand, e.g., 'Visa'."),
85
+ last4: z.string().describe("Last 4 digits of the card."),
86
+ exp_year: z.number().int().describe("Card expiration year."),
87
+ exp_month: z.number().int().describe("Card expiration month.")
88
+ }).describe("Payment method details.").nullable().optional(),
89
+ account_balance: z.number().int().describe("Account balance in cents."),
90
+ customer_reference: z.string().describe("Stripe customer ID reference.").nullable().optional()
91
+ }).describe("Customer object representing a MoonClerk customer (Plan in UI).")).describe("List of customer objects.") }).describe("Data from the action execution")
92
+ });
93
+ //#endregion
94
+ export { moonclerkListCustomers };
95
+
96
+ //# sourceMappingURL=list-customers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-customers.mjs","names":[],"sources":["../../src/actions/list-customers.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const MoonclerkListCustomersInput: z.ZodTypeAny = z.object({\n status: z.enum([\"active\", \"canceled\", \"expired\", \"past_due\", \"pending\", \"unpaid\"]).describe(\"Filter by subscription status.\").optional(),\n form_id: z.number().int().describe(\"The associated MoonClerk form ID to filter customers.\").optional(),\n checkout_to: z.string().describe(\"Customers created on or before this date (YYYY-MM-DD).\").optional(),\n checkout_from: z.string().describe(\"Customers created on or after this date (YYYY-MM-DD).\").optional(),\n next_payment_to: z.string().describe(\"Subscriptions due to bill on or before this date (YYYY-MM-DD).\").optional(),\n next_payment_from: z.string().describe(\"Subscriptions due to bill on or after this date (YYYY-MM-DD).\").optional(),\n}).describe(\"Request parameters for listing customers with optional filters.\");\nexport const MoonclerkListCustomersOutput: z.ZodTypeAny = z.object({\n customers: z.array(z.object({\n id: z.number().int().describe(\"Customer ID.\"),\n name: z.string().describe(\"Customer name.\"),\n email: z.string().describe(\"Customer email address.\"),\n form_id: z.number().int().describe(\"Associated form ID.\"),\n checkout: z.object({\n fee: z.number().int().describe(\"Fee amount in cents.\"),\n date: z.string().describe(\"Checkout timestamp (ISO 8601).\"),\n token: z.string().describe(\"Checkout token.\"),\n total: z.number().int().describe(\"Total amount in cents.\"),\n subtotal: z.number().int().describe(\"Subtotal in cents.\"),\n amount_due: z.number().int().describe(\"Amount due in cents.\"),\n coupon_code: z.string().describe(\"Applied coupon code.\").nullable().optional(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents.\"),\n upfront_amount: z.number().int().describe(\"Upfront amount charged in cents.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period days if trial is applied.\").nullable().optional(),\n}).describe(\"Checkout details for the customer.\"),\n discount: z.object({\n coupon: z.object({\n code: z.string().describe(\"Coupon code.\"),\n currency: z.string().describe(\"Currency for the amount_off, e.g., 'USD'.\").nullable().optional(),\n duration: z.string().describe(\"Duration of the coupon, e.g., 'once'.\"),\n redeem_by: z.string().describe(\"ISO 8601 date when the coupon expires.\").nullable().optional(),\n amount_off: z.number().int().describe(\"Amount off in cents.\").nullable().optional(),\n percent_off: z.number().int().describe(\"Percent off for the coupon.\").nullable().optional(),\n max_redemptions: z.number().int().describe(\"Maximum number of redemptions allowed by the coupon.\").nullable().optional(),\n duration_in_months: z.number().int().describe(\"Number of months the coupon is valid for (if applicable).\").nullable().optional(),\n}).describe(\"Coupon applied to the customer.\"),\n ends_at: z.string().describe(\"Discount end date (ISO 8601).\").nullable().optional(),\n starts_at: z.string().describe(\"Discount start date (ISO 8601).\").nullable().optional(),\n}).describe(\"Discount details including coupon and validity.\").optional(),\n custom_id: z.string().describe(\"Custom ID set via integration.\").nullable().optional(),\n delinquent: z.boolean().describe(\"Whether the customer is delinquent.\"),\n subscription: z.object({\n id: z.number().int().describe(\"Subscription ID.\"),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\"),\n amount: z.number().int().describe(\"Amount in cents.\"),\n currency: z.string().describe(\"Currency code, e.g., 'USD'.\"),\n interval: z.string().describe(\"Billing interval, e.g., 'month'.\"),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\"),\n plan_reference: z.string().describe(\"Plan reference ID.\"),\n amount_description: z.string().describe(\"Description of the amount option.\"),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\"),\n status: z.string().describe(\"Subscription status.\"),\n ended_at: z.string().describe(\"End timestamp if subscription ended.\").nullable().optional(),\n trial_end: z.string().describe(\"Trial end timestamp if applicable.\").nullable().optional(),\n expires_at: z.string().describe(\"Expiration timestamp if set.\").nullable().optional(),\n canceled_at: z.string().describe(\"Cancellation timestamp if applicable.\").nullable().optional(),\n trial_start: z.string().describe(\"Trial start timestamp if applicable.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Number of trial days if applicable.\").nullable().optional(),\n current_period_end: z.string().describe(\"End of current period (ISO 8601).\"),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\"),\n next_payment_attempt: z.string().describe(\"Next payment attempt timestamp (ISO 8601).\").nullable().optional(),\n first_payment_attempt: z.string().describe(\"First payment attempt timestamp (ISO 8601).\"),\n subscription_reference: z.string().describe(\"Subscription reference ID.\"),\n}).describe(\"Subscription details for the customer.\").optional(),\n custom_fields: z.object({}).describe(\"Custom field responses keyed by field name.\").nullable().optional(),\n management_url: z.string().describe(\"URL for managing the subscription in MoonClerk UI.\").nullable().optional(),\n payment_method: z.object({\n type: z.string().describe(\"Payment method type, e.g., 'card'.\"),\n brand: z.string().describe(\"Card brand, e.g., 'Visa'.\"),\n last4: z.string().describe(\"Last 4 digits of the card.\"),\n exp_year: z.number().int().describe(\"Card expiration year.\"),\n exp_month: z.number().int().describe(\"Card expiration month.\"),\n}).describe(\"Payment method details.\").nullable().optional(),\n account_balance: z.number().int().describe(\"Account balance in cents.\"),\n customer_reference: z.string().describe(\"Stripe customer ID reference.\").nullable().optional(),\n}).describe(\"Customer object representing a MoonClerk customer (Plan in UI).\")).describe(\"List of customer objects.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListCustomers = action(\"MOONCLERK_LIST_CUSTOMERS\", {\n slug: \"moonclerk-list-customers\",\n name: \"List Customers\",\n description: \"Tool to list customers (plans) from MoonClerk. Use when you need to retrieve customer data with optional filters. Use after authenticating API credentials.\",\n input: MoonclerkListCustomersInput,\n output: MoonclerkListCustomersOutput,\n});\n"],"mappings":";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AO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wBAAwB;EAC/D,CAAC,CAAC,CAAC,SAAS,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzD,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2BAA2B;EACtE,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,CAAC,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,CAAC,SAAS,2BAA2B,EACpH,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
@@ -0,0 +1,44 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/list-discounts.ts
4
+ const MoonclerkListDiscountsInput = zod.z.object({
5
+ status: zod.z.enum([
6
+ "active",
7
+ "canceled",
8
+ "expired",
9
+ "past_due",
10
+ "pending",
11
+ "unpaid"
12
+ ]).describe("Filter by subscription status.").optional(),
13
+ form_id: zod.z.number().int().describe("Filter discounts by associated MoonClerk form ID.").optional(),
14
+ checkout_to: zod.z.string().describe("Filter customers created on or before this date (YYYY-MM-DD).").optional(),
15
+ checkout_from: zod.z.string().describe("Filter customers created on or after this date (YYYY-MM-DD).").optional(),
16
+ next_payment_to: zod.z.string().describe("Filter subscriptions due to bill on or before this date (YYYY-MM-DD).").optional(),
17
+ next_payment_from: zod.z.string().describe("Filter subscriptions due to bill on or after this date (YYYY-MM-DD).").optional()
18
+ }).describe("Optional filters for listing discounts via customers endpoint.");
19
+ const MoonclerkListDiscountsOutput = zod.z.object({ discounts: zod.z.array(zod.z.object({
20
+ coupon: zod.z.object({
21
+ code: zod.z.string().describe("Coupon code."),
22
+ currency: zod.z.string().describe("Currency code for amount_off, e.g., 'USD'.").nullable().optional(),
23
+ duration: zod.z.string().describe("Duration of the coupon, e.g., 'once' or 'repeating'."),
24
+ redeem_by: zod.z.string().describe("ISO 8601 date by which the coupon must be redeemed.").nullable().optional(),
25
+ amount_off: zod.z.number().int().describe("Amount off in cents (nullable if percent_off is used).").nullable().optional(),
26
+ percent_off: zod.z.number().int().describe("Percentage off for the coupon (nullable if amount_off is used).").nullable().optional(),
27
+ max_redemptions: zod.z.number().int().describe("Maximum number of redemptions allowed by the coupon.").nullable().optional(),
28
+ duration_in_months: zod.z.number().int().describe("Number of months the coupon is valid for (for repeating coupons).").nullable().optional()
29
+ }).describe("Details of the coupon applied."),
30
+ ends_at: zod.z.string().describe("ISO 8601 timestamp when the discount ends.").nullable().optional(),
31
+ starts_at: zod.z.string().describe("ISO 8601 timestamp when the discount starts.").nullable().optional(),
32
+ customer_id: zod.z.number().int().describe("ID of the customer with this discount.")
33
+ }).describe("Represents a discount applied to a customer.")).describe("List of discount entries.") }).describe("Data from the action execution");
34
+ const moonclerkListDiscounts = require_action.action("MOONCLERK_LIST_DISCOUNTS", {
35
+ slug: "moonclerk-list-discounts",
36
+ name: "List Discounts",
37
+ description: "Tool to retrieve a list of all discounts applied to customers. Use after authenticating API credentials.",
38
+ input: MoonclerkListDiscountsInput,
39
+ output: MoonclerkListDiscountsOutput
40
+ });
41
+ //#endregion
42
+ exports.moonclerkListDiscounts = moonclerkListDiscounts;
43
+
44
+ //# sourceMappingURL=list-discounts.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-discounts.cjs","names":["z","action"],"sources":["../../src/actions/list-discounts.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const MoonclerkListDiscountsInput: z.ZodTypeAny = z.object({\n status: z.enum([\"active\", \"canceled\", \"expired\", \"past_due\", \"pending\", \"unpaid\"]).describe(\"Filter by subscription status.\").optional(),\n form_id: z.number().int().describe(\"Filter discounts by associated MoonClerk form ID.\").optional(),\n checkout_to: z.string().describe(\"Filter customers created on or before this date (YYYY-MM-DD).\").optional(),\n checkout_from: z.string().describe(\"Filter customers created on or after this date (YYYY-MM-DD).\").optional(),\n next_payment_to: z.string().describe(\"Filter subscriptions due to bill on or before this date (YYYY-MM-DD).\").optional(),\n next_payment_from: z.string().describe(\"Filter subscriptions due to bill on or after this date (YYYY-MM-DD).\").optional(),\n}).describe(\"Optional filters for listing discounts via customers endpoint.\");\nexport const MoonclerkListDiscountsOutput: z.ZodTypeAny = z.object({\n discounts: z.array(z.object({\n coupon: z.object({\n code: z.string().describe(\"Coupon code.\"),\n currency: z.string().describe(\"Currency code for amount_off, e.g., 'USD'.\").nullable().optional(),\n duration: z.string().describe(\"Duration of the coupon, e.g., 'once' or 'repeating'.\"),\n redeem_by: z.string().describe(\"ISO 8601 date by which the coupon must be redeemed.\").nullable().optional(),\n amount_off: z.number().int().describe(\"Amount off in cents (nullable if percent_off is used).\").nullable().optional(),\n percent_off: z.number().int().describe(\"Percentage off for the coupon (nullable if amount_off is used).\").nullable().optional(),\n max_redemptions: z.number().int().describe(\"Maximum number of redemptions allowed by the coupon.\").nullable().optional(),\n duration_in_months: z.number().int().describe(\"Number of months the coupon is valid for (for repeating coupons).\").nullable().optional(),\n}).describe(\"Details of the coupon applied.\"),\n ends_at: z.string().describe(\"ISO 8601 timestamp when the discount ends.\").nullable().optional(),\n starts_at: z.string().describe(\"ISO 8601 timestamp when the discount starts.\").nullable().optional(),\n customer_id: z.number().int().describe(\"ID of the customer with this discount.\"),\n}).describe(\"Represents a discount applied to a customer.\")).describe(\"List of discount entries.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListDiscounts = action(\"MOONCLERK_LIST_DISCOUNTS\", {\n slug: \"moonclerk-list-discounts\",\n name: \"List Discounts\",\n description: \"Tool to retrieve a list of all discounts applied to customers. Use after authenticating API credentials.\",\n input: MoonclerkListDiscountsInput,\n output: MoonclerkListDiscountsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4CA,IAAAA,EAAE,OAAO;CAChE,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAY;EAAW;EAAY;EAAW;CAAQ,CAAC,CAA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CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACvH,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzI,CAAC,CAAC,CAAC,SAAS,gCAAgC;CAC1C,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC;AACjF,CAAC,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,CAAC,SAAS,2BAA2B,EACjG,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,yBAAyBC,eAAAA,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/list-discounts.d.ts
4
+ declare const MoonclerkListDiscountsInput: z.ZodTypeAny;
5
+ declare const MoonclerkListDiscountsOutput: z.ZodTypeAny;
6
+ declare const moonclerkListDiscounts: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { moonclerkListDiscounts };
9
+ //# sourceMappingURL=list-discounts.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-discounts.d.cts","names":[],"sources":["../../src/actions/list-discounts.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAOiC;AAAA,cAChE,4BAAA,EAA8B,CAAA,CAAE,UAgBA;AAAA,cAEhC,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/list-discounts.d.ts
4
+ declare const MoonclerkListDiscountsInput: z.ZodTypeAny;
5
+ declare const MoonclerkListDiscountsOutput: z.ZodTypeAny;
6
+ declare const moonclerkListDiscounts: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { moonclerkListDiscounts };
9
+ //# sourceMappingURL=list-discounts.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-discounts.d.mts","names":[],"sources":["../../src/actions/list-discounts.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAOiC;AAAA,cAChE,4BAAA,EAA8B,CAAA,CAAE,UAgBA;AAAA,cAEhC,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,41 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const moonclerkListDiscounts = action("MOONCLERK_LIST_DISCOUNTS", {
4
+ slug: "moonclerk-list-discounts",
5
+ name: "List Discounts",
6
+ description: "Tool to retrieve a list of all discounts applied to customers. Use after authenticating API credentials.",
7
+ input: z.object({
8
+ status: z.enum([
9
+ "active",
10
+ "canceled",
11
+ "expired",
12
+ "past_due",
13
+ "pending",
14
+ "unpaid"
15
+ ]).describe("Filter by subscription status.").optional(),
16
+ form_id: z.number().int().describe("Filter discounts by associated MoonClerk form ID.").optional(),
17
+ checkout_to: z.string().describe("Filter customers created on or before this date (YYYY-MM-DD).").optional(),
18
+ checkout_from: z.string().describe("Filter customers created on or after this date (YYYY-MM-DD).").optional(),
19
+ next_payment_to: z.string().describe("Filter subscriptions due to bill on or before this date (YYYY-MM-DD).").optional(),
20
+ next_payment_from: z.string().describe("Filter subscriptions due to bill on or after this date (YYYY-MM-DD).").optional()
21
+ }).describe("Optional filters for listing discounts via customers endpoint."),
22
+ output: z.object({ discounts: z.array(z.object({
23
+ coupon: z.object({
24
+ code: z.string().describe("Coupon code."),
25
+ currency: z.string().describe("Currency code for amount_off, e.g., 'USD'.").nullable().optional(),
26
+ duration: z.string().describe("Duration of the coupon, e.g., 'once' or 'repeating'."),
27
+ redeem_by: z.string().describe("ISO 8601 date by which the coupon must be redeemed.").nullable().optional(),
28
+ amount_off: z.number().int().describe("Amount off in cents (nullable if percent_off is used).").nullable().optional(),
29
+ percent_off: z.number().int().describe("Percentage off for the coupon (nullable if amount_off is used).").nullable().optional(),
30
+ max_redemptions: z.number().int().describe("Maximum number of redemptions allowed by the coupon.").nullable().optional(),
31
+ duration_in_months: z.number().int().describe("Number of months the coupon is valid for (for repeating coupons).").nullable().optional()
32
+ }).describe("Details of the coupon applied."),
33
+ ends_at: z.string().describe("ISO 8601 timestamp when the discount ends.").nullable().optional(),
34
+ starts_at: z.string().describe("ISO 8601 timestamp when the discount starts.").nullable().optional(),
35
+ customer_id: z.number().int().describe("ID of the customer with this discount.")
36
+ }).describe("Represents a discount applied to a customer.")).describe("List of discount entries.") }).describe("Data from the action execution")
37
+ });
38
+ //#endregion
39
+ export { moonclerkListDiscounts };
40
+
41
+ //# sourceMappingURL=list-discounts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-discounts.mjs","names":[],"sources":["../../src/actions/list-discounts.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const MoonclerkListDiscountsInput: z.ZodTypeAny = z.object({\n status: z.enum([\"active\", \"canceled\", \"expired\", \"past_due\", \"pending\", \"unpaid\"]).describe(\"Filter by subscription status.\").optional(),\n form_id: z.number().int().describe(\"Filter discounts by associated MoonClerk form ID.\").optional(),\n checkout_to: z.string().describe(\"Filter customers created on or before this date (YYYY-MM-DD).\").optional(),\n checkout_from: z.string().describe(\"Filter customers created on or after this date (YYYY-MM-DD).\").optional(),\n next_payment_to: z.string().describe(\"Filter subscriptions due to bill on or before this date (YYYY-MM-DD).\").optional(),\n next_payment_from: z.string().describe(\"Filter subscriptions due to bill on or after this date (YYYY-MM-DD).\").optional(),\n}).describe(\"Optional filters for listing discounts via customers endpoint.\");\nexport const MoonclerkListDiscountsOutput: z.ZodTypeAny = z.object({\n discounts: z.array(z.object({\n coupon: z.object({\n code: z.string().describe(\"Coupon code.\"),\n currency: z.string().describe(\"Currency code for amount_off, e.g., 'USD'.\").nullable().optional(),\n duration: z.string().describe(\"Duration of the coupon, e.g., 'once' or 'repeating'.\"),\n redeem_by: z.string().describe(\"ISO 8601 date by which the coupon must be redeemed.\").nullable().optional(),\n amount_off: z.number().int().describe(\"Amount off in cents (nullable if percent_off is used).\").nullable().optional(),\n percent_off: z.number().int().describe(\"Percentage off for the coupon (nullable if amount_off is used).\").nullable().optional(),\n max_redemptions: z.number().int().describe(\"Maximum number of redemptions allowed by the coupon.\").nullable().optional(),\n duration_in_months: z.number().int().describe(\"Number of months the coupon is valid for (for repeating coupons).\").nullable().optional(),\n}).describe(\"Details of the coupon applied.\"),\n ends_at: z.string().describe(\"ISO 8601 timestamp when the discount ends.\").nullable().optional(),\n starts_at: z.string().describe(\"ISO 8601 timestamp when the discount starts.\").nullable().optional(),\n customer_id: z.number().int().describe(\"ID of the customer with this discount.\"),\n}).describe(\"Represents a discount applied to a customer.\")).describe(\"List of discount entries.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListDiscounts = action(\"MOONCLERK_LIST_DISCOUNTS\", {\n slug: \"moonclerk-list-discounts\",\n name: \"List Discounts\",\n description: \"Tool to retrieve a list of all discounts applied to customers. Use after authenticating API credentials.\",\n input: MoonclerkListDiscountsInput,\n output: MoonclerkListDiscountsOutput,\n});\n"],"mappings":";;AA8BA,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aA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S;GACvH,oBAAoB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzI,CAAC,CAAC,CAAC,SAAS,gCAAgC;EAC1C,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/F,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACnG,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC;CACjF,CAAC,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,CAAC,SAAS,2BAA2B,EACjG,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
@@ -0,0 +1,32 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/list-forms.ts
4
+ const MoonclerkListFormsInput = zod.z.object({
5
+ page: zod.z.number().int().describe("Page number to retrieve, starting at 1").optional(),
6
+ per_page: zod.z.number().int().describe("Number of forms per page").optional()
7
+ }).describe("Request parameters for listing payment forms.");
8
+ const MoonclerkListFormsOutput = zod.z.object({
9
+ meta: zod.z.object({
10
+ per_page: zod.z.number().int().describe("Number of forms returned per page"),
11
+ total_count: zod.z.number().int().describe("Total number of forms available"),
12
+ total_pages: zod.z.number().int().describe("Total number of pages"),
13
+ current_page: zod.z.number().int().describe("Current page number")
14
+ }).describe("Pagination details for a paged list response.").nullable().optional(),
15
+ forms: zod.z.array(zod.z.object({
16
+ id: zod.z.string().describe("Unique identifier for the form"),
17
+ name: zod.z.string().describe("Name of the form"),
18
+ created_at: zod.z.string().describe("Timestamp when the form was created"),
19
+ updated_at: zod.z.string().describe("Timestamp when the form was last updated")
20
+ }).describe("A representation of a MoonClerk payment form.")).describe("List of payment forms returned from MoonClerk API")
21
+ }).describe("Data from the action execution");
22
+ const moonclerkListForms = require_action.action("MOONCLERK_LIST_FORMS", {
23
+ slug: "moonclerk-list-forms",
24
+ name: "List Payment Forms",
25
+ description: "Tool to retrieve a list of all payment forms. Use after authenticating to inspect available payment forms.",
26
+ input: MoonclerkListFormsInput,
27
+ output: MoonclerkListFormsOutput
28
+ });
29
+ //#endregion
30
+ exports.moonclerkListForms = moonclerkListForms;
31
+
32
+ //# sourceMappingURL=list-forms.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-forms.cjs","names":["z","action"],"sources":["../../src/actions/list-forms.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const MoonclerkListFormsInput: z.ZodTypeAny = z.object({\n page: z.number().int().describe(\"Page number to retrieve, starting at 1\").optional(),\n per_page: z.number().int().describe(\"Number of forms per page\").optional(),\n}).describe(\"Request parameters for listing payment forms.\");\nexport const MoonclerkListFormsOutput: z.ZodTypeAny = z.object({\n meta: z.object({\n per_page: z.number().int().describe(\"Number of forms returned per page\"),\n total_count: z.number().int().describe(\"Total number of forms available\"),\n total_pages: z.number().int().describe(\"Total number of pages\"),\n current_page: z.number().int().describe(\"Current page number\"),\n}).describe(\"Pagination details for a paged list response.\").nullable().optional(),\n forms: z.array(z.object({\n id: z.string().describe(\"Unique identifier for the form\"),\n name: z.string().describe(\"Name of the form\"),\n created_at: z.string().describe(\"Timestamp when the form was created\"),\n updated_at: z.string().describe(\"Timestamp when the form was last updated\"),\n}).describe(\"A representation of a MoonClerk payment form.\")).describe(\"List of payment forms returned from MoonClerk API\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListForms = action(\"MOONCLERK_LIST_FORMS\", {\n slug: \"moonclerk-list-forms\",\n name: \"List Payment Forms\",\n description: \"Tool to retrieve a list of all payment forms. Use after authenticating to inspect available payment forms.\",\n input: MoonclerkListFormsInput,\n output: MoonclerkListFormsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwCA,IAAAA,EAAE,OAAO;CAC5D,MAAMA,IAA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3
+ //#region src/actions/list-forms.d.ts
4
+ declare const MoonclerkListFormsInput: z.ZodTypeAny;
5
+ declare const MoonclerkListFormsOutput: z.ZodTypeAny;
6
+ declare const moonclerkListForms: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { moonclerkListForms };
9
+ //# sourceMappingURL=list-forms.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-forms.d.cts","names":[],"sources":["../../src/actions/list-forms.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UAGoB;AAAA,cAC/C,wBAAA,EAA0B,CAAA,CAAE,UAaI;AAAA,cAEhC,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/list-forms.d.ts
4
+ declare const MoonclerkListFormsInput: z.ZodTypeAny;
5
+ declare const MoonclerkListFormsOutput: z.ZodTypeAny;
6
+ declare const moonclerkListForms: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { moonclerkListForms };
9
+ //# sourceMappingURL=list-forms.d.mts.map