@keystrokehq/moonclerk 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/action.cjs.map +1 -1
  2. package/dist/action.mjs.map +1 -1
  3. package/dist/actions/list-customers.cjs +1 -0
  4. package/dist/actions/list-customers.cjs.map +1 -1
  5. package/dist/actions/list-customers.d.cts +3 -20
  6. package/dist/actions/list-customers.d.cts.map +1 -1
  7. package/dist/actions/list-customers.d.mts +3 -20
  8. package/dist/actions/list-customers.d.mts.map +1 -1
  9. package/dist/actions/list-customers.mjs +1 -0
  10. package/dist/actions/list-customers.mjs.map +1 -1
  11. package/dist/actions/list-discounts.cjs +1 -0
  12. package/dist/actions/list-discounts.cjs.map +1 -1
  13. package/dist/actions/list-discounts.d.cts +3 -20
  14. package/dist/actions/list-discounts.d.cts.map +1 -1
  15. package/dist/actions/list-discounts.d.mts +3 -20
  16. package/dist/actions/list-discounts.d.mts.map +1 -1
  17. package/dist/actions/list-discounts.mjs +1 -0
  18. package/dist/actions/list-discounts.mjs.map +1 -1
  19. package/dist/actions/list-forms.cjs +1 -0
  20. package/dist/actions/list-forms.cjs.map +1 -1
  21. package/dist/actions/list-forms.d.cts +3 -16
  22. package/dist/actions/list-forms.d.cts.map +1 -1
  23. package/dist/actions/list-forms.d.mts +3 -16
  24. package/dist/actions/list-forms.d.mts.map +1 -1
  25. package/dist/actions/list-forms.mjs +1 -0
  26. package/dist/actions/list-forms.mjs.map +1 -1
  27. package/dist/actions/list-payments.cjs +1 -0
  28. package/dist/actions/list-payments.cjs.map +1 -1
  29. package/dist/actions/list-payments.d.cts +3 -19
  30. package/dist/actions/list-payments.d.cts.map +1 -1
  31. package/dist/actions/list-payments.d.mts +3 -19
  32. package/dist/actions/list-payments.d.mts.map +1 -1
  33. package/dist/actions/list-payments.mjs +1 -0
  34. package/dist/actions/list-payments.mjs.map +1 -1
  35. package/dist/actions/list-subscriptions.cjs +1 -0
  36. package/dist/actions/list-subscriptions.cjs.map +1 -1
  37. package/dist/actions/list-subscriptions.d.cts +3 -18
  38. package/dist/actions/list-subscriptions.d.cts.map +1 -1
  39. package/dist/actions/list-subscriptions.d.mts +3 -18
  40. package/dist/actions/list-subscriptions.d.mts.map +1 -1
  41. package/dist/actions/list-subscriptions.mjs +1 -0
  42. package/dist/actions/list-subscriptions.mjs.map +1 -1
  43. package/dist/app.cjs +2 -2
  44. package/dist/app.cjs.map +1 -1
  45. package/dist/app.d.cts +4 -6
  46. package/dist/app.d.cts.map +1 -1
  47. package/dist/app.d.mts +4 -6
  48. package/dist/app.d.mts.map +1 -1
  49. package/dist/app.mjs +0 -1
  50. package/dist/app.mjs.map +1 -1
  51. package/dist/index.d.cts +1 -1
  52. package/dist/index.d.mts +1 -1
  53. package/package.json +2 -2
@@ -1 +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<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 moonclerk.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 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"}
1
+ {"version":3,"file":"action.cjs","names":["moonclerk","executeMoonclerkTool"],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { 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<TInput extends z.ZodType, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof moonclerk.credential> {\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":";;;;;AAOA,SAAgB,OACd,MACA,KAOyD;CACzD,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"}
@@ -1 +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<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 moonclerk.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 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"}
1
+ {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { 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<TInput extends z.ZodType, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof moonclerk.credential> {\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":";;;;;AAOA,SAAgB,OACd,MACA,KAOyD;CACzD,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"}
@@ -1,3 +1,4 @@
1
+ require("../app.cjs");
1
2
  const require_action = require("../action.cjs");
2
3
  let zod = require("zod");
3
4
  //#region src/actions/list-customers.ts
@@ -1 +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.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.object({\n customers: z.array(z.object({\n id: z.number().int().describe(\"Customer ID.\").nullable(),\n name: z.string().describe(\"Customer name.\").nullable(),\n email: z.string().describe(\"Customer email address.\").nullable(),\n form_id: z.number().int().describe(\"Associated form ID.\").nullable(),\n checkout: z.object({\n fee: z.number().int().describe(\"Fee amount in cents.\").nullable(),\n date: z.string().describe(\"Checkout timestamp (ISO 8601).\").nullable(),\n token: z.string().describe(\"Checkout token.\").nullable(),\n total: z.number().int().describe(\"Total amount in cents.\").nullable(),\n subtotal: z.number().int().describe(\"Subtotal in cents.\").nullable(),\n amount_due: z.number().int().describe(\"Amount due in cents.\").nullable(),\n coupon_code: z.string().describe(\"Applied coupon code.\").nullable().optional(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents.\").nullable(),\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.\").nullable(),\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'.\").nullable(),\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.\").nullable().optional(),\n custom_id: z.string().describe(\"Custom ID set via integration.\").nullable().optional(),\n delinquent: z.boolean().describe(\"Whether the customer is delinquent.\").nullable(),\n subscription: z.object({\n id: z.number().int().describe(\"Subscription ID.\").nullable(),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\").nullable(),\n amount: z.number().int().describe(\"Amount in cents.\").nullable(),\n currency: z.string().describe(\"Currency code, e.g., 'USD'.\").nullable(),\n interval: z.string().describe(\"Billing interval, e.g., 'month'.\").nullable(),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\").nullable(),\n plan_reference: z.string().describe(\"Plan reference ID.\").nullable(),\n amount_description: z.string().describe(\"Description of the amount option.\").nullable(),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\").nullable(),\n status: z.string().describe(\"Subscription status.\").nullable(),\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).\").nullable(),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\").nullable(),\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).\").nullable(),\n subscription_reference: z.string().describe(\"Subscription reference ID.\").nullable(),\n}).describe(\"Subscription details for the customer.\").nullable().optional(),\n custom_fields: z.record(z.string(), z.unknown()).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'.\").nullable(),\n brand: z.string().describe(\"Card brand, e.g., 'Visa'.\").nullable(),\n last4: z.string().describe(\"Last 4 digits of the card.\").nullable(),\n exp_year: z.number().int().describe(\"Card expiration year.\").nullable(),\n exp_month: z.number().int().describe(\"Card expiration month.\").nullable(),\n}).describe(\"Payment method details.\").nullable().optional(),\n account_balance: z.number().int().describe(\"Account balance in cents.\").nullable(),\n customer_reference: z.string().describe(\"Stripe customer ID reference.\").nullable().optional(),\n}).passthrough().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,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,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,C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B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC/F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,CAAC,SAAS,2BAA2B,EAClI,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,yBAAyBC,eAAAA,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"list-customers.cjs","names":["z","action"],"sources":["../../src/actions/list-customers.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { moonclerk } from \"../app\";\n\nexport const MoonclerkListCustomersInput = 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.object({\n customers: z.array(z.object({\n id: z.number().int().describe(\"Customer ID.\").nullable(),\n name: z.string().describe(\"Customer name.\").nullable(),\n email: z.string().describe(\"Customer email address.\").nullable(),\n form_id: z.number().int().describe(\"Associated form ID.\").nullable(),\n checkout: z.object({\n fee: z.number().int().describe(\"Fee amount in cents.\").nullable(),\n date: z.string().describe(\"Checkout timestamp (ISO 8601).\").nullable(),\n token: z.string().describe(\"Checkout token.\").nullable(),\n total: z.number().int().describe(\"Total amount in cents.\").nullable(),\n subtotal: z.number().int().describe(\"Subtotal in cents.\").nullable(),\n amount_due: z.number().int().describe(\"Amount due in cents.\").nullable(),\n coupon_code: z.string().describe(\"Applied coupon code.\").nullable().optional(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents.\").nullable(),\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.\").nullable(),\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'.\").nullable(),\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.\").nullable().optional(),\n custom_id: z.string().describe(\"Custom ID set via integration.\").nullable().optional(),\n delinquent: z.boolean().describe(\"Whether the customer is delinquent.\").nullable(),\n subscription: z.object({\n id: z.number().int().describe(\"Subscription ID.\").nullable(),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\").nullable(),\n amount: z.number().int().describe(\"Amount in cents.\").nullable(),\n currency: z.string().describe(\"Currency code, e.g., 'USD'.\").nullable(),\n interval: z.string().describe(\"Billing interval, e.g., 'month'.\").nullable(),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\").nullable(),\n plan_reference: z.string().describe(\"Plan reference ID.\").nullable(),\n amount_description: z.string().describe(\"Description of the amount option.\").nullable(),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\").nullable(),\n status: z.string().describe(\"Subscription status.\").nullable(),\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).\").nullable(),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\").nullable(),\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).\").nullable(),\n subscription_reference: z.string().describe(\"Subscription reference ID.\").nullable(),\n}).describe(\"Subscription details for the customer.\").nullable().optional(),\n custom_fields: z.record(z.string(), z.unknown()).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'.\").nullable(),\n brand: z.string().describe(\"Card brand, e.g., 'Visa'.\").nullable(),\n last4: z.string().describe(\"Last 4 digits of the card.\").nullable(),\n exp_year: z.number().int().describe(\"Card expiration year.\").nullable(),\n exp_month: z.number().int().describe(\"Card expiration month.\").nullable(),\n}).describe(\"Payment method details.\").nullable().optional(),\n account_balance: z.number().int().describe(\"Account balance in cents.\").nullable(),\n customer_reference: z.string().describe(\"Stripe customer ID reference.\").nullable().optional(),\n}).passthrough().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: AppAction<\n typeof MoonclerkListCustomersInput,\n typeof MoonclerkListCustomersOutput,\n typeof moonclerk.credential\n> = 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":";;;;AAMA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,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,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACrG,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CAChH,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;AACnH,CAAC,CAAC,CAAC,SAAS,iEAAiE;AAC7E,MAAa,+BAA+BA,IAAAA,EAAE,OAAO,EACnD,WAAWA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;CAC5B,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,cAAc,CAAC,CAAC,SAAS;CACvD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gBAAgB,CAAC,CAAC,SAAS;CACrD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB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C,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;EACjE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;EAClE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;EACtE,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;CAC1E,CAAC,CAAC,CAAC,SAAS,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzD,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CACjF,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC/F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,CAAC,SAAS,2BAA2B,EAClI,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,yBAITC,eAAAA,OAAO,4BAA4B;CACrC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { moonclerk } from "../app.cjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/list-customers.d.ts
@@ -88,26 +90,7 @@ declare const MoonclerkListCustomersOutput: z.ZodObject<{
88
90
  customer_reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
91
  }, z.core.$loose>>;
90
92
  }, z.core.$strip>;
91
- declare const moonclerkListCustomers: import("@keystrokehq/action").WorkflowActionDefinition<{
92
- status?: "active" | "canceled" | "expired" | "past_due" | "pending" | "unpaid" | undefined;
93
- form_id?: number | undefined;
94
- checkout_to?: string | undefined;
95
- checkout_from?: string | undefined;
96
- next_payment_to?: string | undefined;
97
- next_payment_from?: string | undefined;
98
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
99
- connectionId: z.ZodString;
100
- entityId: z.ZodString;
101
- instanceId: z.ZodString;
102
- }, z.core.$strip>, z.ZodObject<{
103
- generic_api_key: z.ZodString;
104
- }, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
105
- connectionId: z.ZodString;
106
- entityId: z.ZodString;
107
- instanceId: z.ZodString;
108
- }, z.core.$strip>, z.ZodObject<{
109
- generic_api_key: z.ZodString;
110
- }, z.core.$strip>>]>;
93
+ declare const moonclerkListCustomers: AppAction<typeof MoonclerkListCustomersInput, typeof MoonclerkListCustomersOutput, typeof moonclerk.credential>;
111
94
  //#endregion
112
95
  export { moonclerkListCustomers };
113
96
  //# sourceMappingURL=list-customers.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-customers.d.cts","names":[],"sources":["../../src/actions/list-customers.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAQ3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyE5B,sBAAA,gCAAsB,wBAAA"}
1
+ {"version":3,"file":"list-customers.d.cts","names":[],"sources":["../../src/actions/list-customers.ts"],"mappings":";;;;;cAMa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAQ3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyE5B,sBAAA,EAAwB,SAAA,QAC5B,2BAAA,SACA,4BAAA,SACA,SAAA,CAAU,UAAA"}
@@ -1,3 +1,5 @@
1
+ import { moonclerk } from "../app.mjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/list-customers.d.ts
@@ -88,26 +90,7 @@ declare const MoonclerkListCustomersOutput: z.ZodObject<{
88
90
  customer_reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
91
  }, z.core.$loose>>;
90
92
  }, z.core.$strip>;
91
- declare const moonclerkListCustomers: import("@keystrokehq/action").WorkflowActionDefinition<{
92
- status?: "active" | "canceled" | "expired" | "past_due" | "pending" | "unpaid" | undefined;
93
- form_id?: number | undefined;
94
- checkout_to?: string | undefined;
95
- checkout_from?: string | undefined;
96
- next_payment_to?: string | undefined;
97
- next_payment_from?: string | undefined;
98
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
99
- connectionId: z.ZodString;
100
- entityId: z.ZodString;
101
- instanceId: z.ZodString;
102
- }, z.core.$strip>, z.ZodObject<{
103
- generic_api_key: z.ZodString;
104
- }, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
105
- connectionId: z.ZodString;
106
- entityId: z.ZodString;
107
- instanceId: z.ZodString;
108
- }, z.core.$strip>, z.ZodObject<{
109
- generic_api_key: z.ZodString;
110
- }, z.core.$strip>>]>;
93
+ declare const moonclerkListCustomers: AppAction<typeof MoonclerkListCustomersInput, typeof MoonclerkListCustomersOutput, typeof moonclerk.credential>;
111
94
  //#endregion
112
95
  export { moonclerkListCustomers };
113
96
  //# sourceMappingURL=list-customers.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-customers.d.mts","names":[],"sources":["../../src/actions/list-customers.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAQ3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyE5B,sBAAA,gCAAsB,wBAAA"}
1
+ {"version":3,"file":"list-customers.d.mts","names":[],"sources":["../../src/actions/list-customers.ts"],"mappings":";;;;;cAMa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAQ3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyE5B,sBAAA,EAAwB,SAAA,QAC5B,2BAAA,SACA,4BAAA,SACA,SAAA,CAAU,UAAA"}
@@ -1,3 +1,4 @@
1
+ import "../app.mjs";
1
2
  import { action } from "../action.mjs";
2
3
  import { z } from "zod";
3
4
  const moonclerkListCustomers = action("MOONCLERK_LIST_CUSTOMERS", {
@@ -1 +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.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.object({\n customers: z.array(z.object({\n id: z.number().int().describe(\"Customer ID.\").nullable(),\n name: z.string().describe(\"Customer name.\").nullable(),\n email: z.string().describe(\"Customer email address.\").nullable(),\n form_id: z.number().int().describe(\"Associated form ID.\").nullable(),\n checkout: z.object({\n fee: z.number().int().describe(\"Fee amount in cents.\").nullable(),\n date: z.string().describe(\"Checkout timestamp (ISO 8601).\").nullable(),\n token: z.string().describe(\"Checkout token.\").nullable(),\n total: z.number().int().describe(\"Total amount in cents.\").nullable(),\n subtotal: z.number().int().describe(\"Subtotal in cents.\").nullable(),\n amount_due: z.number().int().describe(\"Amount due in cents.\").nullable(),\n coupon_code: z.string().describe(\"Applied coupon code.\").nullable().optional(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents.\").nullable(),\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.\").nullable(),\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'.\").nullable(),\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.\").nullable().optional(),\n custom_id: z.string().describe(\"Custom ID set via integration.\").nullable().optional(),\n delinquent: z.boolean().describe(\"Whether the customer is delinquent.\").nullable(),\n subscription: z.object({\n id: z.number().int().describe(\"Subscription ID.\").nullable(),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\").nullable(),\n amount: z.number().int().describe(\"Amount in cents.\").nullable(),\n currency: z.string().describe(\"Currency code, e.g., 'USD'.\").nullable(),\n interval: z.string().describe(\"Billing interval, e.g., 'month'.\").nullable(),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\").nullable(),\n plan_reference: z.string().describe(\"Plan reference ID.\").nullable(),\n amount_description: z.string().describe(\"Description of the amount option.\").nullable(),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\").nullable(),\n status: z.string().describe(\"Subscription status.\").nullable(),\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).\").nullable(),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\").nullable(),\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).\").nullable(),\n subscription_reference: z.string().describe(\"Subscription reference ID.\").nullable(),\n}).describe(\"Subscription details for the customer.\").nullable().optional(),\n custom_fields: z.record(z.string(), z.unknown()).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'.\").nullable(),\n brand: z.string().describe(\"Card brand, e.g., 'Visa'.\").nullable(),\n last4: z.string().describe(\"Last 4 digits of the card.\").nullable(),\n exp_year: z.number().int().describe(\"Card expiration year.\").nullable(),\n exp_month: z.number().int().describe(\"Card expiration month.\").nullable(),\n}).describe(\"Payment method details.\").nullable().optional(),\n account_balance: z.number().int().describe(\"Account balance in cents.\").nullable(),\n customer_reference: z.string().describe(\"Stripe customer ID reference.\").nullable().optional(),\n}).passthrough().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":";;AAqFA,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OArFyC,EAAE,OAAO;EAClD,QAAQ,EAAE,KAAK;GAAC;GAAU;GAAY;GAAW;GAAY;GAAW;EAAQ,CAAC,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;EACvI,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;EACrG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;EACpG,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;EACrG,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;EAChH,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CACnH,CAAC,CAAC,CAAC,SAAS,iEA8EH;CACP,QA9E0C,EAAE,OAAO,EACnD,WAAW,EAAE,MAAM,EAAE,OAAO;EAC5B,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,cAAc,CAAC,CAAC,SAAS;EACvD,MAAM,EAAE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iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;EACjF,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,CAAC,SAAS,2BAA2B,EAClI,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
1
+ {"version":3,"file":"list-customers.mjs","names":[],"sources":["../../src/actions/list-customers.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { moonclerk } from \"../app\";\n\nexport const MoonclerkListCustomersInput = 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.object({\n customers: z.array(z.object({\n id: z.number().int().describe(\"Customer ID.\").nullable(),\n name: z.string().describe(\"Customer name.\").nullable(),\n email: z.string().describe(\"Customer email address.\").nullable(),\n form_id: z.number().int().describe(\"Associated form ID.\").nullable(),\n checkout: z.object({\n fee: z.number().int().describe(\"Fee amount in cents.\").nullable(),\n date: z.string().describe(\"Checkout timestamp (ISO 8601).\").nullable(),\n token: z.string().describe(\"Checkout token.\").nullable(),\n total: z.number().int().describe(\"Total amount in cents.\").nullable(),\n subtotal: z.number().int().describe(\"Subtotal in cents.\").nullable(),\n amount_due: z.number().int().describe(\"Amount due in cents.\").nullable(),\n coupon_code: z.string().describe(\"Applied coupon code.\").nullable().optional(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents.\").nullable(),\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.\").nullable(),\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'.\").nullable(),\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.\").nullable().optional(),\n custom_id: z.string().describe(\"Custom ID set via integration.\").nullable().optional(),\n delinquent: z.boolean().describe(\"Whether the customer is delinquent.\").nullable(),\n subscription: z.object({\n id: z.number().int().describe(\"Subscription ID.\").nullable(),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\").nullable(),\n amount: z.number().int().describe(\"Amount in cents.\").nullable(),\n currency: z.string().describe(\"Currency code, e.g., 'USD'.\").nullable(),\n interval: z.string().describe(\"Billing interval, e.g., 'month'.\").nullable(),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\").nullable(),\n plan_reference: z.string().describe(\"Plan reference ID.\").nullable(),\n amount_description: z.string().describe(\"Description of the amount option.\").nullable(),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\").nullable(),\n status: z.string().describe(\"Subscription status.\").nullable(),\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).\").nullable(),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\").nullable(),\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).\").nullable(),\n subscription_reference: z.string().describe(\"Subscription reference ID.\").nullable(),\n}).describe(\"Subscription details for the customer.\").nullable().optional(),\n custom_fields: z.record(z.string(), z.unknown()).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'.\").nullable(),\n brand: z.string().describe(\"Card brand, e.g., 'Visa'.\").nullable(),\n last4: z.string().describe(\"Last 4 digits of the card.\").nullable(),\n exp_year: z.number().int().describe(\"Card expiration year.\").nullable(),\n exp_month: z.number().int().describe(\"Card expiration month.\").nullable(),\n}).describe(\"Payment method details.\").nullable().optional(),\n account_balance: z.number().int().describe(\"Account balance in cents.\").nullable(),\n customer_reference: z.string().describe(\"Stripe customer ID reference.\").nullable().optional(),\n}).passthrough().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: AppAction<\n typeof MoonclerkListCustomersInput,\n typeof MoonclerkListCustomersOutput,\n typeof moonclerk.credential\n> = 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":";;;AAuFA,MAAa,yBAIT,OAAO,4BAA4B;CACrC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAzFyC,EAAE,OAAO;EAClD,QAAQ,EAAE,KAAK;GAAC;GAAU;GAAY;GAAW;GAAY;GAAW;EAAQ,CAAC,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;EACvI,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;EACrG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;EACpG,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;EACrG,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;EAChH,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CACnH,CAAC,CAAC,CAAC,SAAS,iEAkFH;CACP,QAlF0C,EAAE,OAAO,EACnD,WAAW,EAAE,MAAM,EAAE,OAAO;EAC5B,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,cAAc,CAAC,CAAC,SAAS;EACvD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,gBAAgB,CAAC,CAAC,SAAS;EACrD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB,CAAC,CAAC,SAAS;EAC/D,SA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AA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,CAAC,SAAS,2BAA2B,EAClI,CAAC,CAAC,CAAC,SAAS,gCAWF;AACV,CAAC"}
@@ -1,3 +1,4 @@
1
+ require("../app.cjs");
1
2
  const require_action = require("../action.cjs");
2
3
  let zod = require("zod");
3
4
  //#region src/actions/list-discounts.ts
@@ -1 +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.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.object({\n discounts: z.array(z.object({\n coupon: z.object({\n code: z.string().describe(\"Coupon code.\").nullable(),\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'.\").nullable(),\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.\").nullable(),\n}).passthrough().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,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,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,mDAAmD,CAAC,CAAC,SAAS;CACjG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CAC3G,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CAC5G,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CACvH,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sEAAsE,CAAC,CAAC,SAAS;AAC1H,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAC5E,MAAa,+BAA+BA,IAAAA,EAAE,OAAO,EAC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AAC,YAAY,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,CAAC,SAAS,2BAA2B,EAC/G,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,yBAAyBC,eAAAA,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"list-discounts.cjs","names":["z","action"],"sources":["../../src/actions/list-discounts.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { moonclerk } from \"../app\";\n\nexport const MoonclerkListDiscountsInput = 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.object({\n discounts: z.array(z.object({\n coupon: z.object({\n code: z.string().describe(\"Coupon code.\").nullable(),\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'.\").nullable(),\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.\").nullable(),\n}).passthrough().describe(\"Represents a discount applied to a customer.\")).describe(\"List of discount entries.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListDiscounts: AppAction<\n typeof MoonclerkListDiscountsInput,\n typeof MoonclerkListDiscountsOutput,\n typeof moonclerk.credential\n> = 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":";;;;AAMA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,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,mDAAmD,CAAC,CAAC,SAAS;CACjG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CAC3G,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CAC5G,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CACvH,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sEAAsE,CAAC,CAAC,SAAS;AAC1H,CAAC,CAAC,CAAC,S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AAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;AAC5F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,CAAC,SAAS,2BAA2B,EAC/G,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,yBAITC,eAAAA,OAAO,4BAA4B;CACrC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { moonclerk } from "../app.cjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/list-discounts.d.ts
@@ -33,26 +35,7 @@ declare const MoonclerkListDiscountsOutput: z.ZodObject<{
33
35
  customer_id: z.ZodNullable<z.ZodNumber>;
34
36
  }, z.core.$loose>>;
35
37
  }, z.core.$strip>;
36
- declare const moonclerkListDiscounts: import("@keystrokehq/action").WorkflowActionDefinition<{
37
- status?: "active" | "canceled" | "expired" | "past_due" | "pending" | "unpaid" | undefined;
38
- form_id?: number | undefined;
39
- checkout_to?: string | undefined;
40
- checkout_from?: string | undefined;
41
- next_payment_to?: string | undefined;
42
- next_payment_from?: string | undefined;
43
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
44
- connectionId: z.ZodString;
45
- entityId: z.ZodString;
46
- instanceId: z.ZodString;
47
- }, z.core.$strip>, z.ZodObject<{
48
- generic_api_key: z.ZodString;
49
- }, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
50
- connectionId: z.ZodString;
51
- entityId: z.ZodString;
52
- instanceId: z.ZodString;
53
- }, z.core.$strip>, z.ZodObject<{
54
- generic_api_key: z.ZodString;
55
- }, z.core.$strip>>]>;
38
+ declare const moonclerkListDiscounts: AppAction<typeof MoonclerkListDiscountsInput, typeof MoonclerkListDiscountsOutput, typeof moonclerk.credential>;
56
39
  //#endregion
57
40
  export { moonclerkListDiscounts };
58
41
  //# sourceMappingURL=list-discounts.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-discounts.d.cts","names":[],"sources":["../../src/actions/list-discounts.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAQ3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAkB5B,sBAAA,gCAAsB,wBAAA"}
1
+ {"version":3,"file":"list-discounts.d.cts","names":[],"sources":["../../src/actions/list-discounts.ts"],"mappings":";;;;;cAMa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAQ3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAkB5B,sBAAA,EAAwB,SAAA,QAC5B,2BAAA,SACA,4BAAA,SACA,SAAA,CAAU,UAAA"}
@@ -1,3 +1,5 @@
1
+ import { moonclerk } from "../app.mjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/list-discounts.d.ts
@@ -33,26 +35,7 @@ declare const MoonclerkListDiscountsOutput: z.ZodObject<{
33
35
  customer_id: z.ZodNullable<z.ZodNumber>;
34
36
  }, z.core.$loose>>;
35
37
  }, z.core.$strip>;
36
- declare const moonclerkListDiscounts: import("@keystrokehq/action").WorkflowActionDefinition<{
37
- status?: "active" | "canceled" | "expired" | "past_due" | "pending" | "unpaid" | undefined;
38
- form_id?: number | undefined;
39
- checkout_to?: string | undefined;
40
- checkout_from?: string | undefined;
41
- next_payment_to?: string | undefined;
42
- next_payment_from?: string | undefined;
43
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
44
- connectionId: z.ZodString;
45
- entityId: z.ZodString;
46
- instanceId: z.ZodString;
47
- }, z.core.$strip>, z.ZodObject<{
48
- generic_api_key: z.ZodString;
49
- }, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
50
- connectionId: z.ZodString;
51
- entityId: z.ZodString;
52
- instanceId: z.ZodString;
53
- }, z.core.$strip>, z.ZodObject<{
54
- generic_api_key: z.ZodString;
55
- }, z.core.$strip>>]>;
38
+ declare const moonclerkListDiscounts: AppAction<typeof MoonclerkListDiscountsInput, typeof MoonclerkListDiscountsOutput, typeof moonclerk.credential>;
56
39
  //#endregion
57
40
  export { moonclerkListDiscounts };
58
41
  //# sourceMappingURL=list-discounts.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-discounts.d.mts","names":[],"sources":["../../src/actions/list-discounts.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAQ3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAkB5B,sBAAA,gCAAsB,wBAAA"}
1
+ {"version":3,"file":"list-discounts.d.mts","names":[],"sources":["../../src/actions/list-discounts.ts"],"mappings":";;;;;cAMa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAQ3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAkB5B,sBAAA,EAAwB,SAAA,QAC5B,2BAAA,SACA,4BAAA,SACA,SAAA,CAAU,UAAA"}
@@ -1,3 +1,4 @@
1
+ import "../app.mjs";
1
2
  import { action } from "../action.mjs";
2
3
  import { z } from "zod";
3
4
  const moonclerkListDiscounts = action("MOONCLERK_LIST_DISCOUNTS", {
@@ -1 +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.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.object({\n discounts: z.array(z.object({\n coupon: z.object({\n code: z.string().describe(\"Coupon code.\").nullable(),\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'.\").nullable(),\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.\").nullable(),\n}).passthrough().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: MoonclerkListDiscountsIn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AiE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;GAC9H,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;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,CAAC,CAAC,SAAS;CAC5F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,CAAC,SAAS,2BAA2B,EAC/G,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
1
+ {"version":3,"file":"list-discounts.mjs","names":[],"sources":["../../src/actions/list-discounts.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { moonclerk } from \"../app\";\n\nexport const MoonclerkListDiscountsInput = 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.object({\n discounts: z.array(z.object({\n coupon: z.object({\n code: z.string().describe(\"Coupon code.\").nullable(),\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'.\").nullable(),\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.\").nullable(),\n}).passthrough().describe(\"Represents a discount applied to a customer.\")).describe(\"List of discount entries.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListDiscounts: AppAction<\n typeof MoonclerkListDiscountsInput,\n typeof MoonclerkListDiscountsOutput,\n typeof moonclerk.credential\n> = 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":";;;AAgCA,MAAa,yBAIT,OAAO,4BAA4B;CACrC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAlCyC,EAAE,OAAO;EAClD,QAAQ,EAAE,KAAK;GAAC;GAAU;GA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AC,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,CAAC,CAAC,SAAS;CAC5F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,CAAC,SAAS,2BAA2B,EAC/G,CAAC,CAAC,CAAC,SAAS,gCAWF;AACV,CAAC"}
@@ -1,3 +1,4 @@
1
+ require("../app.cjs");
1
2
  const require_action = require("../action.cjs");
2
3
  let zod = require("zod");
3
4
  //#region src/actions/list-forms.ts
@@ -1 +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.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.object({\n meta: z.object({\n per_page: z.number().int().describe(\"Number of forms returned per page\").nullable(),\n total_count: z.number().int().describe(\"Total number of forms available\").nullable(),\n total_pages: z.number().int().describe(\"Total number of pages\").nullable(),\n current_page: z.number().int().describe(\"Current page number\").nullable(),\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\").nullable(),\n name: z.string().describe(\"Name of the form\").nullable(),\n created_at: z.string().describe(\"Timestamp when the form was created\").nullable(),\n updated_at: z.string().describe(\"Timestamp when the form was last updated\").nullable(),\n}).passthrough().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,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CACnF,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;AAC3E,CAAC,CAAC,CAAC,SAAS,+CAA+C;AAC3D,MAAa,2BAA2BA,IAAAA,EAAE,OAAO;CAC/C,MAAMA,IAAAA,EAAE,OAAO;EACf,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;EAClF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;EACnF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;EACzE,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS;CAC1E,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/E,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACxB,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;EACnE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;EACvD,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;EAChF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CACvF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,CAAC,SAAS,mDAAmD;AACxI,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"list-forms.cjs","names":["z","action"],"sources":["../../src/actions/list-forms.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { moonclerk } from \"../app\";\n\nexport const MoonclerkListFormsInput = 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.object({\n meta: z.object({\n per_page: z.number().int().describe(\"Number of forms returned per page\").nullable(),\n total_count: z.number().int().describe(\"Total number of forms available\").nullable(),\n total_pages: z.number().int().describe(\"Total number of pages\").nullable(),\n current_page: z.number().int().describe(\"Current page number\").nullable(),\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\").nullable(),\n name: z.string().describe(\"Name of the form\").nullable(),\n created_at: z.string().describe(\"Timestamp when the form was created\").nullable(),\n updated_at: z.string().describe(\"Timestamp when the form was last updated\").nullable(),\n}).passthrough().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: AppAction<\n typeof MoonclerkListFormsInput,\n typeof MoonclerkListFormsOutput,\n typeof moonclerk.credential\n> = 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":";;;;AAMA,MAAa,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CACnF,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;AAC3E,CAAC,CAAC,CAAC,SAAS,+CAA+C;AAC3D,MAAa,2BAA2BA,IAAAA,EAAE,OAAO;CAC/C,MAAMA,IAAAA,EAAE,OAAO;EACf,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;EAClF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;EACnF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;EACzE,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS;CAC1E,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/E,OAAOA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACxB,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;EACnE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;EACvD,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;EAChF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CACvF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,CAAC,SAAS,mDAAmD;AACxI,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,qBAITC,eAAAA,OAAO,wBAAwB;CACjC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { moonclerk } from "../app.cjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/list-forms.d.ts
@@ -19,22 +21,7 @@ declare const MoonclerkListFormsOutput: z.ZodObject<{
19
21
  updated_at: z.ZodNullable<z.ZodString>;
20
22
  }, z.core.$loose>>;
21
23
  }, z.core.$strip>;
22
- declare const moonclerkListForms: import("@keystrokehq/action").WorkflowActionDefinition<{
23
- page?: number | undefined;
24
- per_page?: number | undefined;
25
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
26
- connectionId: z.ZodString;
27
- entityId: z.ZodString;
28
- instanceId: z.ZodString;
29
- }, z.core.$strip>, z.ZodObject<{
30
- generic_api_key: z.ZodString;
31
- }, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
32
- connectionId: z.ZodString;
33
- entityId: z.ZodString;
34
- instanceId: z.ZodString;
35
- }, z.core.$strip>, z.ZodObject<{
36
- generic_api_key: z.ZodString;
37
- }, z.core.$strip>>]>;
24
+ declare const moonclerkListForms: AppAction<typeof MoonclerkListFormsInput, typeof MoonclerkListFormsOutput, typeof moonclerk.credential>;
38
25
  //#endregion
39
26
  export { moonclerkListForms };
40
27
  //# sourceMappingURL=list-forms.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-forms.d.cts","names":[],"sources":["../../src/actions/list-forms.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;cAIvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAexB,kBAAA,gCAAkB,wBAAA"}
1
+ {"version":3,"file":"list-forms.d.cts","names":[],"sources":["../../src/actions/list-forms.ts"],"mappings":";;;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;cAIvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAexB,kBAAA,EAAoB,SAAA,QACxB,uBAAA,SACA,wBAAA,SACA,SAAA,CAAU,UAAA"}
@@ -1,3 +1,5 @@
1
+ import { moonclerk } from "../app.mjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/list-forms.d.ts
@@ -19,22 +21,7 @@ declare const MoonclerkListFormsOutput: z.ZodObject<{
19
21
  updated_at: z.ZodNullable<z.ZodString>;
20
22
  }, z.core.$loose>>;
21
23
  }, z.core.$strip>;
22
- declare const moonclerkListForms: import("@keystrokehq/action").WorkflowActionDefinition<{
23
- page?: number | undefined;
24
- per_page?: number | undefined;
25
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
26
- connectionId: z.ZodString;
27
- entityId: z.ZodString;
28
- instanceId: z.ZodString;
29
- }, z.core.$strip>, z.ZodObject<{
30
- generic_api_key: z.ZodString;
31
- }, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
32
- connectionId: z.ZodString;
33
- entityId: z.ZodString;
34
- instanceId: z.ZodString;
35
- }, z.core.$strip>, z.ZodObject<{
36
- generic_api_key: z.ZodString;
37
- }, z.core.$strip>>]>;
24
+ declare const moonclerkListForms: AppAction<typeof MoonclerkListFormsInput, typeof MoonclerkListFormsOutput, typeof moonclerk.credential>;
38
25
  //#endregion
39
26
  export { moonclerkListForms };
40
27
  //# sourceMappingURL=list-forms.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-forms.d.mts","names":[],"sources":["../../src/actions/list-forms.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;cAIvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAexB,kBAAA,gCAAkB,wBAAA"}
1
+ {"version":3,"file":"list-forms.d.mts","names":[],"sources":["../../src/actions/list-forms.ts"],"mappings":";;;;;cAMa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;cAIvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAexB,kBAAA,EAAoB,SAAA,QACxB,uBAAA,SACA,wBAAA,SACA,SAAA,CAAU,UAAA"}
@@ -1,3 +1,4 @@
1
+ import "../app.mjs";
1
2
  import { action } from "../action.mjs";
2
3
  import { z } from "zod";
3
4
  const moonclerkListForms = action("MOONCLERK_LIST_FORMS", {
@@ -1 +1 @@
1
- {"version":3,"file":"list-forms.mjs","names":[],"sources":["../../src/actions/list-forms.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const MoonclerkListFormsInput = 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.object({\n meta: z.object({\n per_page: z.number().int().describe(\"Number of forms returned per page\").nullable(),\n total_count: z.number().int().describe(\"Total number of forms available\").nullable(),\n total_pages: z.number().int().describe(\"Total number of pages\").nullable(),\n current_page: z.number().int().describe(\"Current page number\").nullable(),\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\").nullable(),\n name: z.string().describe(\"Name of the form\").nullable(),\n created_at: z.string().describe(\"Timestamp when the form was created\").nullable(),\n updated_at: z.string().describe(\"Timestamp when the form was last updated\").nullable(),\n}).passthrough().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":";;AAuBA,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAvBqC,EAAE,OAAO;EAC9C,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;EACnF,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC3E,CAAC,CAAC,CAAC,SAAS,+CAoBH;CACP,QApBsC,EAAE,OAAO;EAC/C,MAAM,EAAE,OAAO;GACf,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;GAClF,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;GACnF,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;GACzE,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS;EAC1E,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/E,OAAO,EAAE,MAAM,EAAE,OAAO;GACxB,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;GACnE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;GACvD,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;GAChF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;EACvF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,CAAC,SAAS,mDAAmD;CACxI,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
1
+ {"version":3,"file":"list-forms.mjs","names":[],"sources":["../../src/actions/list-forms.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { moonclerk } from \"../app\";\n\nexport const MoonclerkListFormsInput = 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.object({\n meta: z.object({\n per_page: z.number().int().describe(\"Number of forms returned per page\").nullable(),\n total_count: z.number().int().describe(\"Total number of forms available\").nullable(),\n total_pages: z.number().int().describe(\"Total number of pages\").nullable(),\n current_page: z.number().int().describe(\"Current page number\").nullable(),\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\").nullable(),\n name: z.string().describe(\"Name of the form\").nullable(),\n created_at: z.string().describe(\"Timestamp when the form was created\").nullable(),\n updated_at: z.string().describe(\"Timestamp when the form was last updated\").nullable(),\n}).passthrough().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: AppAction<\n typeof MoonclerkListFormsInput,\n typeof MoonclerkListFormsOutput,\n typeof moonclerk.credential\n> = 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":";;;AAyBA,MAAa,qBAIT,OAAO,wBAAwB;CACjC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA3BqC,EAAE,OAAO;EAC9C,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;EACnF,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CAC3E,CAAC,CAAC,CAAC,SAAS,+CAwBH;CACP,QAxBsC,EAAE,OAAO;EAC/C,MAAM,EAAE,OAAO;GACf,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;GAClF,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;GACnF,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;GACzE,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS;EAC1E,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/E,OAAO,EAAE,MAAM,EAAE,OAAO;GACxB,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;GACnE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;GACvD,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;GAChF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;EACvF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,CAAC,SAAS,mDAAmD;CACxI,CAAC,CAAC,CAAC,SAAS,gCAWF;AACV,CAAC"}
@@ -1,3 +1,4 @@
1
+ require("../app.cjs");
1
2
  const require_action = require("../action.cjs");
2
3
  let zod = require("zod");
3
4
  //#region src/actions/list-payments.ts
@@ -1 +1 @@
1
- {"version":3,"file":"list-payments.cjs","names":["z","action"],"sources":["../../src/actions/list-payments.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const MoonclerkListPaymentsInput = z.object({\n status: z.enum([\"successful\", \"refunded\", \"failed\"]).describe(\"Filter payments by status. Valid values: successful, refunded, failed\").optional(),\n date_to: z.string().describe(\"Include payments charged on or before this date (YYYY-MM-DD)\").optional(),\n form_id: z.number().int().describe(\"MoonClerk form ID to filter payments (e.g., 5346)\").optional(),\n date_from: z.string().describe(\"Include payments charged on or after this date (YYYY-MM-DD)\").optional(),\n customer_id: z.number().int().describe(\"MoonClerk customer ID to filter payments (e.g., 12742)\").optional(),\n}).describe(\"Parameters to filter the payments list.\");\nexport const MoonclerkListPaymentsOutput = z.object({\n payments: z.array(z.object({\n id: z.number().int().describe(\"Unique payment identifier\").nullable(),\n fee: z.number().int().describe(\"Stripe fee in cents\").nullable(),\n date: z.string().describe(\"Payment date in UTC ISO 8601 format\").nullable(),\n name: z.string().describe(\"Payer's name\").nullable(),\n email: z.string().describe(\"Payer's email address\").nullable(),\n amount: z.number().int().describe(\"Payment amount in cents\").nullable(),\n coupon: z.object({\n code: z.string().describe(\"Coupon code\").nullable(),\n currency: z.string().describe(\"Currency of the coupon\").nullable(),\n duration: z.string().describe(\"Duration of the coupon, e.g., once\").nullable(),\n redeem_by: z.string().describe(\"Coupon redemption deadline (UTC date)\").nullable().optional(),\n amount_off: z.number().int().describe(\"Amount off in cents\").nullable(),\n percent_off: z.number().int().describe(\"Percentage off if applicable\").nullable().optional(),\n max_redemptions: z.number().int().describe(\"Maximum number of redemptions allowed\").nullable().optional(),\n duration_in_months: z.number().int().describe(\"Duration in months if applicable\").nullable().optional(),\n}).describe(\"Applied coupon details if any\").nullable().optional(),\n status: z.enum([\"successful\", \"refunded\", \"failed\"]).describe(\"Payment status\").nullable(),\n form_id: z.number().int().describe(\"MoonClerk form ID that generated the payment\").nullable(),\n checkout: z.object({\n fee: z.number().int().describe(\"Stripe fee in cents\").nullable(),\n date: z.string().describe(\"Checkout date in UTC ISO 8601 format\").nullable(),\n token: z.string().describe(\"Checkout token\").nullable(),\n total: z.number().int().describe(\"Total amount in cents\").nullable(),\n subtotal: z.number().int().describe(\"Subtotal in cents before fees and coupons\").nullable(),\n amount_due: z.number().int().describe(\"Amount due in cents\").nullable(),\n coupon_code: z.string().describe(\"Applied coupon code\").nullable(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents\").nullable(),\n upfront_amount: z.number().int().describe(\"Upfront amount in cents\").nullable(),\n trial_period_days: z.number().int().describe(\"Number of trial days if applicable\").nullable().optional(),\n}).describe(\"Checkout details for one-time checkouts\").nullable().optional(),\n currency: z.string().describe(\"Currency code, e.g., USD\").nullable(),\n custom_id: z.string().describe(\"Custom identifier passed during integration\").nullable().optional(),\n customer_id: z.number().int().describe(\"MoonClerk customer ID if part of recurring checkout\").nullable().optional(),\n custom_fields: z.record(z.string(), z.unknown()).describe(\"Mapping of custom field keys to values\").nullable().optional(),\n payment_method: z.object({\n type: z.string().describe(\"Payment method type, e.g., card\").nullable(),\n brand: z.string().describe(\"Brand of the card, e.g., Visa\").nullable(),\n last4: z.string().describe(\"Last 4 digits of the card\").nullable(),\n}).describe(\"Payment method details\"),\n amount_refunded: z.number().int().describe(\"Total refunded amount in cents\").nullable(),\n charge_reference: z.string().describe(\"Stripe charge reference\").nullable(),\n invoice_reference: z.string().describe(\"Stripe invoice reference if applicable\").nullable().optional(),\n amount_description: z.string().describe(\"Description of the payment amount option\").nullable().optional(),\n customer_reference: z.string().describe(\"Stripe customer reference if applicable\").nullable().optional(),\n}).passthrough()).describe(\"List of payments matching the filters\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListPayments = action(\"MOONCLERK_LIST_PAYMENTS\", {\n slug: \"moonclerk-list-payments\",\n name: \"List Payments\",\n description: \"Tool to list payments. Use when you need to retrieve all payments or filter by form, customer, date range, or status after authenticating.\",\n input: MoonclerkListPaymentsInput,\n output: MoonclerkListPaymentsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA6BA,IAAAA,EAAE,OAAO;CACjD,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAc;EAAY;CAAQ,CAAC,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CAChJ,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CACtG,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CACjG,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CACvG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;AAC5G,CAAC,CAAC,CAAC,SAAS,yCAAyC;AACrD,MAAa,8BAA8BA,IAAAA,EAAE,OAAO,EAClD,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;CAC3B,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CACpE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAA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zG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,uCAAuC,EAClE,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,wBAAwBC,eAAAA,OAAO,2BAA2B;CACrE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"list-payments.cjs","names":["z","action"],"sources":["../../src/actions/list-payments.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { moonclerk } from \"../app\";\n\nexport const MoonclerkListPaymentsInput = z.object({\n status: z.enum([\"successful\", \"refunded\", \"failed\"]).describe(\"Filter payments by status. Valid values: successful, refunded, failed\").optional(),\n date_to: z.string().describe(\"Include payments charged on or before this date (YYYY-MM-DD)\").optional(),\n form_id: z.number().int().describe(\"MoonClerk form ID to filter payments (e.g., 5346)\").optional(),\n date_from: z.string().describe(\"Include payments charged on or after this date (YYYY-MM-DD)\").optional(),\n customer_id: z.number().int().describe(\"MoonClerk customer ID to filter payments (e.g., 12742)\").optional(),\n}).describe(\"Parameters to filter the payments list.\");\nexport const MoonclerkListPaymentsOutput = z.object({\n payments: z.array(z.object({\n id: z.number().int().describe(\"Unique payment identifier\").nullable(),\n fee: z.number().int().describe(\"Stripe fee in cents\").nullable(),\n date: z.string().describe(\"Payment date in UTC ISO 8601 format\").nullable(),\n name: z.string().describe(\"Payer's name\").nullable(),\n email: z.string().describe(\"Payer's email address\").nullable(),\n amount: z.number().int().describe(\"Payment amount in cents\").nullable(),\n coupon: z.object({\n code: z.string().describe(\"Coupon code\").nullable(),\n currency: z.string().describe(\"Currency of the coupon\").nullable(),\n duration: z.string().describe(\"Duration of the coupon, e.g., once\").nullable(),\n redeem_by: z.string().describe(\"Coupon redemption deadline (UTC date)\").nullable().optional(),\n amount_off: z.number().int().describe(\"Amount off in cents\").nullable(),\n percent_off: z.number().int().describe(\"Percentage off if applicable\").nullable().optional(),\n max_redemptions: z.number().int().describe(\"Maximum number of redemptions allowed\").nullable().optional(),\n duration_in_months: z.number().int().describe(\"Duration in months if applicable\").nullable().optional(),\n}).describe(\"Applied coupon details if any\").nullable().optional(),\n status: z.enum([\"successful\", \"refunded\", \"failed\"]).describe(\"Payment status\").nullable(),\n form_id: z.number().int().describe(\"MoonClerk form ID that generated the payment\").nullable(),\n checkout: z.object({\n fee: z.number().int().describe(\"Stripe fee in cents\").nullable(),\n date: z.string().describe(\"Checkout date in UTC ISO 8601 format\").nullable(),\n token: z.string().describe(\"Checkout token\").nullable(),\n total: z.number().int().describe(\"Total amount in cents\").nullable(),\n subtotal: z.number().int().describe(\"Subtotal in cents before fees and coupons\").nullable(),\n amount_due: z.number().int().describe(\"Amount due in cents\").nullable(),\n coupon_code: z.string().describe(\"Applied coupon code\").nullable(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents\").nullable(),\n upfront_amount: z.number().int().describe(\"Upfront amount in cents\").nullable(),\n trial_period_days: z.number().int().describe(\"Number of trial days if applicable\").nullable().optional(),\n}).describe(\"Checkout details for one-time checkouts\").nullable().optional(),\n currency: z.string().describe(\"Currency code, e.g., USD\").nullable(),\n custom_id: z.string().describe(\"Custom identifier passed during integration\").nullable().optional(),\n customer_id: z.number().int().describe(\"MoonClerk customer ID if part of recurring checkout\").nullable().optional(),\n custom_fields: z.record(z.string(), z.unknown()).describe(\"Mapping of custom field keys to values\").nullable().optional(),\n payment_method: z.object({\n type: z.string().describe(\"Payment method type, e.g., card\").nullable(),\n brand: z.string().describe(\"Brand of the card, e.g., Visa\").nullable(),\n last4: z.string().describe(\"Last 4 digits of the card\").nullable(),\n}).describe(\"Payment method details\"),\n amount_refunded: z.number().int().describe(\"Total refunded amount in cents\").nullable(),\n charge_reference: z.string().describe(\"Stripe charge reference\").nullable(),\n invoice_reference: z.string().describe(\"Stripe invoice reference if applicable\").nullable().optional(),\n amount_description: z.string().describe(\"Description of the payment amount option\").nullable().optional(),\n customer_reference: z.string().describe(\"Stripe customer reference if applicable\").nullable().optional(),\n}).passthrough()).describe(\"List of payments matching the filters\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListPayments: AppAction<\n typeof MoonclerkListPaymentsInput,\n typeof MoonclerkListPaymentsOutput,\n typeof moonclerk.credential\n> = action(\"MOONCLERK_LIST_PAYMENTS\", {\n slug: \"moonclerk-list-payments\",\n name: \"List Payments\",\n description: \"Tool to list payments. Use when you need to retrieve all payments or filter by form, customer, date range, or status after authenticating.\",\n input: MoonclerkListPaymentsInput,\n output: MoonclerkListPaymentsOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,6BAA6BA,IAAAA,EAAE,OAAO;CACjD,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAc;EAAY;CAAQ,CAAC,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CAChJ,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CACtG,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CACjG,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CACvG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;AAC5G,CAAC,CAAC,CAAC,SAAS,yCAAyC;AACrD,MAAa,8BAA8BA,IAAAA,EAAE,OAAO,EAClD,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;CAC3B,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CACpE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS;CAC/D,MAAMA,IAAAA,EA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,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,wBAITC,eAAAA,OAAO,2BAA2B;CACpC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { moonclerk } from "../app.cjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/list-payments.d.ts
@@ -64,25 +66,7 @@ declare const MoonclerkListPaymentsOutput: z.ZodObject<{
64
66
  customer_reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
67
  }, z.core.$loose>>;
66
68
  }, z.core.$strip>;
67
- declare const moonclerkListPayments: import("@keystrokehq/action").WorkflowActionDefinition<{
68
- status?: "successful" | "refunded" | "failed" | undefined;
69
- date_to?: string | undefined;
70
- form_id?: number | undefined;
71
- date_from?: string | undefined;
72
- customer_id?: number | undefined;
73
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
74
- connectionId: z.ZodString;
75
- entityId: z.ZodString;
76
- instanceId: z.ZodString;
77
- }, z.core.$strip>, z.ZodObject<{
78
- generic_api_key: z.ZodString;
79
- }, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
80
- connectionId: z.ZodString;
81
- entityId: z.ZodString;
82
- instanceId: z.ZodString;
83
- }, z.core.$strip>, z.ZodObject<{
84
- generic_api_key: z.ZodString;
85
- }, z.core.$strip>>]>;
69
+ declare const moonclerkListPayments: AppAction<typeof MoonclerkListPaymentsInput, typeof MoonclerkListPaymentsOutput, typeof moonclerk.credential>;
86
70
  //#endregion
87
71
  export { moonclerkListPayments };
88
72
  //# sourceMappingURL=list-payments.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-payments.d.cts","names":[],"sources":["../../src/actions/list-payments.ts"],"mappings":";;;cAIa,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;cAO1B,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiD3B,qBAAA,gCAAqB,wBAAA"}
1
+ {"version":3,"file":"list-payments.d.cts","names":[],"sources":["../../src/actions/list-payments.ts"],"mappings":";;;;;cAMa,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;cAO1B,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiD3B,qBAAA,EAAuB,SAAA,QAC3B,0BAAA,SACA,2BAAA,SACA,SAAA,CAAU,UAAA"}
@@ -1,3 +1,5 @@
1
+ import { moonclerk } from "../app.mjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/list-payments.d.ts
@@ -64,25 +66,7 @@ declare const MoonclerkListPaymentsOutput: z.ZodObject<{
64
66
  customer_reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
67
  }, z.core.$loose>>;
66
68
  }, z.core.$strip>;
67
- declare const moonclerkListPayments: import("@keystrokehq/action").WorkflowActionDefinition<{
68
- status?: "successful" | "refunded" | "failed" | undefined;
69
- date_to?: string | undefined;
70
- form_id?: number | undefined;
71
- date_from?: string | undefined;
72
- customer_id?: number | undefined;
73
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
74
- connectionId: z.ZodString;
75
- entityId: z.ZodString;
76
- instanceId: z.ZodString;
77
- }, z.core.$strip>, z.ZodObject<{
78
- generic_api_key: z.ZodString;
79
- }, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
80
- connectionId: z.ZodString;
81
- entityId: z.ZodString;
82
- instanceId: z.ZodString;
83
- }, z.core.$strip>, z.ZodObject<{
84
- generic_api_key: z.ZodString;
85
- }, z.core.$strip>>]>;
69
+ declare const moonclerkListPayments: AppAction<typeof MoonclerkListPaymentsInput, typeof MoonclerkListPaymentsOutput, typeof moonclerk.credential>;
86
70
  //#endregion
87
71
  export { moonclerkListPayments };
88
72
  //# sourceMappingURL=list-payments.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-payments.d.mts","names":[],"sources":["../../src/actions/list-payments.ts"],"mappings":";;;cAIa,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;cAO1B,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiD3B,qBAAA,gCAAqB,wBAAA"}
1
+ {"version":3,"file":"list-payments.d.mts","names":[],"sources":["../../src/actions/list-payments.ts"],"mappings":";;;;;cAMa,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;cAO1B,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiD3B,qBAAA,EAAuB,SAAA,QAC3B,0BAAA,SACA,2BAAA,SACA,SAAA,CAAU,UAAA"}
@@ -1,3 +1,4 @@
1
+ import "../app.mjs";
1
2
  import { action } from "../action.mjs";
2
3
  import { z } from "zod";
3
4
  const moonclerkListPayments = action("MOONCLERK_LIST_PAYMENTS", {
@@ -1 +1 @@
1
- {"version":3,"file":"list-payments.mjs","names":[],"sources":["../../src/actions/list-payments.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const MoonclerkListPaymentsInput = z.object({\n status: z.enum([\"successful\", \"refunded\", \"failed\"]).describe(\"Filter payments by status. Valid values: successful, refunded, failed\").optional(),\n date_to: z.string().describe(\"Include payments charged on or before this date (YYYY-MM-DD)\").optional(),\n form_id: z.number().int().describe(\"MoonClerk form ID to filter payments (e.g., 5346)\").optional(),\n date_from: z.string().describe(\"Include payments charged on or after this date (YYYY-MM-DD)\").optional(),\n customer_id: z.number().int().describe(\"MoonClerk customer ID to filter payments (e.g., 12742)\").optional(),\n}).describe(\"Parameters to filter the payments list.\");\nexport const MoonclerkListPaymentsOutput = z.object({\n payments: z.array(z.object({\n id: z.number().int().describe(\"Unique payment identifier\").nullable(),\n fee: z.number().int().describe(\"Stripe fee in cents\").nullable(),\n date: z.string().describe(\"Payment date in UTC ISO 8601 format\").nullable(),\n name: z.string().describe(\"Payer's name\").nullable(),\n email: z.string().describe(\"Payer's email address\").nullable(),\n amount: z.number().int().describe(\"Payment amount in cents\").nullable(),\n coupon: z.object({\n code: z.string().describe(\"Coupon code\").nullable(),\n currency: z.string().describe(\"Currency of the coupon\").nullable(),\n duration: z.string().describe(\"Duration of the coupon, e.g., once\").nullable(),\n redeem_by: z.string().describe(\"Coupon redemption deadline (UTC date)\").nullable().optional(),\n amount_off: z.number().int().describe(\"Amount off in cents\").nullable(),\n percent_off: z.number().int().describe(\"Percentage off if applicable\").nullable().optional(),\n max_redemptions: z.number().int().describe(\"Maximum number of redemptions allowed\").nullable().optional(),\n duration_in_months: z.number().int().describe(\"Duration in months if applicable\").nullable().optional(),\n}).describe(\"Applied coupon details if any\").nullable().optional(),\n status: z.enum([\"successful\", \"refunded\", \"failed\"]).describe(\"Payment status\").nullable(),\n form_id: z.number().int().describe(\"MoonClerk form ID that generated the payment\").nullable(),\n checkout: z.object({\n fee: z.number().int().describe(\"Stripe fee in cents\").nullable(),\n date: z.string().describe(\"Checkout date in UTC ISO 8601 format\").nullable(),\n token: z.string().describe(\"Checkout token\").nullable(),\n total: z.number().int().describe(\"Total amount in cents\").nullable(),\n subtotal: z.number().int().describe(\"Subtotal in cents before fees and coupons\").nullable(),\n amount_due: z.number().int().describe(\"Amount due in cents\").nullable(),\n coupon_code: z.string().describe(\"Applied coupon code\").nullable(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents\").nullable(),\n upfront_amount: z.number().int().describe(\"Upfront amount in cents\").nullable(),\n trial_period_days: z.number().int().describe(\"Number of trial days if applicable\").nullable().optional(),\n}).describe(\"Checkout details for one-time checkouts\").nullable().optional(),\n currency: z.string().describe(\"Currency code, e.g., USD\").nullable(),\n custom_id: z.string().describe(\"Custom identifier passed during integration\").nullable().optional(),\n customer_id: z.number().int().describe(\"MoonClerk customer ID if part of recurring checkout\").nullable().optional(),\n custom_fields: z.record(z.string(), z.unknown()).describe(\"Mapping of custom field keys to values\").nullable().optional(),\n payment_method: z.object({\n type: z.string().describe(\"Payment method type, e.g., card\").nullable(),\n brand: z.string().describe(\"Brand of the card, e.g., Visa\").nullable(),\n last4: z.string().describe(\"Last 4 digits of the card\").nullable(),\n}).describe(\"Payment method details\"),\n amount_refunded: z.number().int().describe(\"Total refunded amount in cents\").nullable(),\n charge_reference: z.string().describe(\"Stripe charge reference\").nullable(),\n invoice_reference: z.string().describe(\"Stripe invoice reference if applicable\").nullable().optional(),\n amount_description: z.string().describe(\"Description of the payment amount option\").nullable().optional(),\n customer_reference: z.string().describe(\"Stripe customer reference if applicable\").nullable().optional(),\n}).passthrough()).describe(\"List of payments matching the filters\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListPayments = action(\"MOONCLERK_LIST_PAYMENTS\", {\n slug: \"moonclerk-list-payments\",\n name: \"List Payments\",\n description: \"Tool to list payments. Use when you need to retrieve all payments or filter by form, customer, date range, or status after authenticating.\",\n input: MoonclerkListPaymentsInput,\n output: MoonclerkListPaymentsOutput,\n});\n"],"mappings":";;AA4DA,MAAa,wBAAwB,OAAO,2BAA2B;CACrE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA5DwC,EAAE,OAAO;EACjD,QAAQ,EAAE,KAAK;GAAC;GAAc;GAAY;EAAQ,CAAC,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;EAChJ,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;EACtG,SAAS,EAAE,OAAO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AC,CAAC,SAAS;EACxG,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,uCAAuC,EAClE,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
1
+ {"version":3,"file":"list-payments.mjs","names":[],"sources":["../../src/actions/list-payments.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { moonclerk } from \"../app\";\n\nexport const MoonclerkListPaymentsInput = z.object({\n status: z.enum([\"successful\", \"refunded\", \"failed\"]).describe(\"Filter payments by status. Valid values: successful, refunded, failed\").optional(),\n date_to: z.string().describe(\"Include payments charged on or before this date (YYYY-MM-DD)\").optional(),\n form_id: z.number().int().describe(\"MoonClerk form ID to filter payments (e.g., 5346)\").optional(),\n date_from: z.string().describe(\"Include payments charged on or after this date (YYYY-MM-DD)\").optional(),\n customer_id: z.number().int().describe(\"MoonClerk customer ID to filter payments (e.g., 12742)\").optional(),\n}).describe(\"Parameters to filter the payments list.\");\nexport const MoonclerkListPaymentsOutput = z.object({\n payments: z.array(z.object({\n id: z.number().int().describe(\"Unique payment identifier\").nullable(),\n fee: z.number().int().describe(\"Stripe fee in cents\").nullable(),\n date: z.string().describe(\"Payment date in UTC ISO 8601 format\").nullable(),\n name: z.string().describe(\"Payer's name\").nullable(),\n email: z.string().describe(\"Payer's email address\").nullable(),\n amount: z.number().int().describe(\"Payment amount in cents\").nullable(),\n coupon: z.object({\n code: z.string().describe(\"Coupon code\").nullable(),\n currency: z.string().describe(\"Currency of the coupon\").nullable(),\n duration: z.string().describe(\"Duration of the coupon, e.g., once\").nullable(),\n redeem_by: z.string().describe(\"Coupon redemption deadline (UTC date)\").nullable().optional(),\n amount_off: z.number().int().describe(\"Amount off in cents\").nullable(),\n percent_off: z.number().int().describe(\"Percentage off if applicable\").nullable().optional(),\n max_redemptions: z.number().int().describe(\"Maximum number of redemptions allowed\").nullable().optional(),\n duration_in_months: z.number().int().describe(\"Duration in months if applicable\").nullable().optional(),\n}).describe(\"Applied coupon details if any\").nullable().optional(),\n status: z.enum([\"successful\", \"refunded\", \"failed\"]).describe(\"Payment status\").nullable(),\n form_id: z.number().int().describe(\"MoonClerk form ID that generated the payment\").nullable(),\n checkout: z.object({\n fee: z.number().int().describe(\"Stripe fee in cents\").nullable(),\n date: z.string().describe(\"Checkout date in UTC ISO 8601 format\").nullable(),\n token: z.string().describe(\"Checkout token\").nullable(),\n total: z.number().int().describe(\"Total amount in cents\").nullable(),\n subtotal: z.number().int().describe(\"Subtotal in cents before fees and coupons\").nullable(),\n amount_due: z.number().int().describe(\"Amount due in cents\").nullable(),\n coupon_code: z.string().describe(\"Applied coupon code\").nullable(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents\").nullable(),\n upfront_amount: z.number().int().describe(\"Upfront amount in cents\").nullable(),\n trial_period_days: z.number().int().describe(\"Number of trial days if applicable\").nullable().optional(),\n}).describe(\"Checkout details for one-time checkouts\").nullable().optional(),\n currency: z.string().describe(\"Currency code, e.g., USD\").nullable(),\n custom_id: z.string().describe(\"Custom identifier passed during integration\").nullable().optional(),\n customer_id: z.number().int().describe(\"MoonClerk customer ID if part of recurring checkout\").nullable().optional(),\n custom_fields: z.record(z.string(), z.unknown()).describe(\"Mapping of custom field keys to values\").nullable().optional(),\n payment_method: z.object({\n type: z.string().describe(\"Payment method type, e.g., card\").nullable(),\n brand: z.string().describe(\"Brand of the card, e.g., Visa\").nullable(),\n last4: z.string().describe(\"Last 4 digits of the card\").nullable(),\n}).describe(\"Payment method details\"),\n amount_refunded: z.number().int().describe(\"Total refunded amount in cents\").nullable(),\n charge_reference: z.string().describe(\"Stripe charge reference\").nullable(),\n invoice_reference: z.string().describe(\"Stripe invoice reference if applicable\").nullable().optional(),\n amount_description: z.string().describe(\"Description of the payment amount option\").nullable().optional(),\n customer_reference: z.string().describe(\"Stripe customer reference if applicable\").nullable().optional(),\n}).passthrough()).describe(\"List of payments matching the filters\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListPayments: AppAction<\n typeof MoonclerkListPaymentsInput,\n typeof MoonclerkListPaymentsOutput,\n typeof moonclerk.credential\n> = action(\"MOONCLERK_LIST_PAYMENTS\", {\n slug: \"moonclerk-list-payments\",\n name: \"List Payments\",\n description: \"Tool to list payments. Use when you need to retrieve all payments or filter by form, customer, date range, or status after authenticating.\",\n input: MoonclerkListPaymentsInput,\n output: MoonclerkListPaymentsOutput,\n});\n"],"mappings":";;;AA8DA,MAAa,wBAIT,OAAO,2BAA2B;CACpC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAhEwC,EAAE,OAAO;EACjD,QAAQ,EAAE,KAAK;GAAC;GAAc;GAAY;EAAQ,CAAC,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;EAChJ,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;EACtG,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;EACjG,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;EACvG,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;CAC5G,CAAC,CAAC,CAAC,SAAS,yCA0DH;CACP,QA1DyC,EAAE,OAAO,EAClD,UAAU,EAAE,MAAM,EAAE,OAAO;EAC3B,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;EACpE,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS;EAC/D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CA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,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACxH,gBAAgB,EAAE,OAAO;GACzB,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;GACtE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;GACrE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;EACnE,CAAC,CAAC,CAAC,SAAS,wBAAwB;EAClC,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;EACtF,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB,CAAC,CAAC,SAAS;EAC1E,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACrG,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACxG,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,uCAAuC,EAClE,CAAC,CAAC,CAAC,SAAS,gCAWF;AACV,CAAC"}
@@ -1,3 +1,4 @@
1
+ require("../app.cjs");
1
2
  const require_action = require("../action.cjs");
2
3
  let zod = require("zod");
3
4
  //#region src/actions/list-subscriptions.ts
@@ -1 +1 @@
1
- {"version":3,"file":"list-subscriptions.cjs","names":["z","action"],"sources":["../../src/actions/list-subscriptions.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const MoonclerkListSubscriptionsInput = z.object({\n status: z.enum([\"active\", \"canceled\", \"expired\", \"past_due\", \"pending\", \"unpaid\"]).describe(\"Filter subscriptions by status. Valid options: active, canceled, expired, past_due, pending, unpaid\").optional(),\n form_id: z.string().describe(\"Filter subscriptions by the associated MoonClerk form ID (e.g., 5346)\").optional(),\n next_payment_to: z.string().describe(\"Include subscriptions due to bill on or before this date (YYYY-MM-DD)\").optional(),\n next_payment_from: z.string().describe(\"Include subscriptions due to bill on or after this date (YYYY-MM-DD)\").optional(),\n}).describe(\"Request parameters for listing subscriptions with optional filters.\");\nexport const MoonclerkListSubscriptionsOutput = z.object({\n subscriptions: z.array(z.object({\n id: z.number().int().describe(\"Subscription ID.\").nullable(),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\").nullable(),\n amount: z.number().int().describe(\"Amount in cents.\").nullable(),\n currency: z.string().describe(\"Currency code, e.g., USD.\").nullable(),\n interval: z.string().describe(\"Billing interval, e.g., month.\").nullable(),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\").nullable(),\n plan_reference: z.string().describe(\"Plan reference ID.\").nullable(),\n amount_description: z.string().describe(\"Description of the amount option.\").nullable(),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\").nullable(),\n status: z.string().describe(\"Subscription status.\").nullable(),\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).\").nullable(),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\").nullable(),\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).\").nullable(),\n subscription_reference: z.string().describe(\"Subscription reference ID.\").nullable(),\n}).passthrough().describe(\"Subscription details.\")).describe(\"List of subscription objects.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListSubscriptions = action(\"MOONCLERK_LIST_SUBSCRIPTIONS\", {\n slug: \"moonclerk-list-subscriptions\",\n name: \"List Subscriptions\",\n description: \"Tool to list subscriptions. Use when you need to retrieve all subscriptions after authenticating.\",\n input: MoonclerkListSubscriptionsInput,\n output: MoonclerkListSubscriptionsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkCA,IAAAA,EAAE,OAAO;CACtD,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAY;EAAW;EAAY;EAAW;CAAQ,CAAC,CAAC,CAAC,SAAS,qGAAqG,CAAC,CAAC,SAAS;CAC5M,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CAC/G,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CACvH,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sEAAsE,CAAC,CAAC,SAAS;AAC1H,CAAC,CAAC,CAAC,SAAS,qEAAqE;AACjF,MAAa,mCAAmCA,IAAAA,EAAE,OAAO,EACvD,eAAeA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;CAChC,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;CAC3D,MAAMA,IAAAA,EAAE,OAAO;EACf,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,UAAU,CAAC,CAAC,SAAS;EACnD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;EAC/D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,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F,sBAAsBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;CAC1F,sBAAsBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5G,uBAAuBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;CACnG,wBAAwBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;AACrF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,CAAC,SAAS,+BAA+B,EAC5F,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,6BAA6BC,eAAAA,OAAO,gCAAgC;CAC/E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"list-subscriptions.cjs","names":["z","action"],"sources":["../../src/actions/list-subscriptions.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { moonclerk } from \"../app\";\n\nexport const MoonclerkListSubscriptionsInput = z.object({\n status: z.enum([\"active\", \"canceled\", \"expired\", \"past_due\", \"pending\", \"unpaid\"]).describe(\"Filter subscriptions by status. Valid options: active, canceled, expired, past_due, pending, unpaid\").optional(),\n form_id: z.string().describe(\"Filter subscriptions by the associated MoonClerk form ID (e.g., 5346)\").optional(),\n next_payment_to: z.string().describe(\"Include subscriptions due to bill on or before this date (YYYY-MM-DD)\").optional(),\n next_payment_from: z.string().describe(\"Include subscriptions due to bill on or after this date (YYYY-MM-DD)\").optional(),\n}).describe(\"Request parameters for listing subscriptions with optional filters.\");\nexport const MoonclerkListSubscriptionsOutput = z.object({\n subscriptions: z.array(z.object({\n id: z.number().int().describe(\"Subscription ID.\").nullable(),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\").nullable(),\n amount: z.number().int().describe(\"Amount in cents.\").nullable(),\n currency: z.string().describe(\"Currency code, e.g., USD.\").nullable(),\n interval: z.string().describe(\"Billing interval, e.g., month.\").nullable(),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\").nullable(),\n plan_reference: z.string().describe(\"Plan reference ID.\").nullable(),\n amount_description: z.string().describe(\"Description of the amount option.\").nullable(),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\").nullable(),\n status: z.string().describe(\"Subscription status.\").nullable(),\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).\").nullable(),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\").nullable(),\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).\").nullable(),\n subscription_reference: z.string().describe(\"Subscription reference ID.\").nullable(),\n}).passthrough().describe(\"Subscription details.\")).describe(\"List of subscription objects.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListSubscriptions: AppAction<\n typeof MoonclerkListSubscriptionsInput,\n typeof MoonclerkListSubscriptionsOutput,\n typeof moonclerk.credential\n> = action(\"MOONCLERK_LIST_SUBSCRIPTIONS\", {\n slug: \"moonclerk-list-subscriptions\",\n name: \"List Subscriptions\",\n description: \"Tool to list subscriptions. Use when you need to retrieve all subscriptions after authenticating.\",\n input: MoonclerkListSubscriptionsInput,\n output: MoonclerkListSub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AAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;AACrF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,CAAC,SAAS,+BAA+B,EAC5F,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,6BAITC,eAAAA,OAAO,gCAAgC;CACzC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { moonclerk } from "../app.cjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/list-subscriptions.d.ts
@@ -41,24 +43,7 @@ declare const MoonclerkListSubscriptionsOutput: z.ZodObject<{
41
43
  subscription_reference: z.ZodNullable<z.ZodString>;
42
44
  }, z.core.$loose>>;
43
45
  }, z.core.$strip>;
44
- declare const moonclerkListSubscriptions: import("@keystrokehq/action").WorkflowActionDefinition<{
45
- status?: "active" | "canceled" | "expired" | "past_due" | "pending" | "unpaid" | undefined;
46
- form_id?: string | undefined;
47
- next_payment_to?: string | undefined;
48
- next_payment_from?: string | undefined;
49
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
50
- connectionId: z.ZodString;
51
- entityId: z.ZodString;
52
- instanceId: z.ZodString;
53
- }, z.core.$strip>, z.ZodObject<{
54
- generic_api_key: z.ZodString;
55
- }, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
56
- connectionId: z.ZodString;
57
- entityId: z.ZodString;
58
- instanceId: z.ZodString;
59
- }, z.core.$strip>, z.ZodObject<{
60
- generic_api_key: z.ZodString;
61
- }, z.core.$strip>>]>;
46
+ declare const moonclerkListSubscriptions: AppAction<typeof MoonclerkListSubscriptionsInput, typeof MoonclerkListSubscriptionsOutput, typeof moonclerk.credential>;
62
47
  //#endregion
63
48
  export { moonclerkListSubscriptions };
64
49
  //# sourceMappingURL=list-subscriptions.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-subscriptions.d.cts","names":[],"sources":["../../src/actions/list-subscriptions.ts"],"mappings":";;;cAIa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAM/B,gCAAA,EAAgC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BhC,0BAAA,gCAA0B,wBAAA"}
1
+ {"version":3,"file":"list-subscriptions.d.cts","names":[],"sources":["../../src/actions/list-subscriptions.ts"],"mappings":";;;;;cAMa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAM/B,gCAAA,EAAgC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BhC,0BAAA,EAA4B,SAAA,QAChC,+BAAA,SACA,gCAAA,SACA,SAAA,CAAU,UAAA"}
@@ -1,3 +1,5 @@
1
+ import { moonclerk } from "../app.mjs";
2
+ import { AppAction } from "@keystrokehq/keystroke/app";
1
3
  import { z } from "zod";
2
4
 
3
5
  //#region src/actions/list-subscriptions.d.ts
@@ -41,24 +43,7 @@ declare const MoonclerkListSubscriptionsOutput: z.ZodObject<{
41
43
  subscription_reference: z.ZodNullable<z.ZodString>;
42
44
  }, z.core.$loose>>;
43
45
  }, z.core.$strip>;
44
- declare const moonclerkListSubscriptions: import("@keystrokehq/action").WorkflowActionDefinition<{
45
- status?: "active" | "canceled" | "expired" | "past_due" | "pending" | "unpaid" | undefined;
46
- form_id?: string | undefined;
47
- next_payment_to?: string | undefined;
48
- next_payment_from?: string | undefined;
49
- }, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
50
- connectionId: z.ZodString;
51
- entityId: z.ZodString;
52
- instanceId: z.ZodString;
53
- }, z.core.$strip>, z.ZodObject<{
54
- generic_api_key: z.ZodString;
55
- }, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
56
- connectionId: z.ZodString;
57
- entityId: z.ZodString;
58
- instanceId: z.ZodString;
59
- }, z.core.$strip>, z.ZodObject<{
60
- generic_api_key: z.ZodString;
61
- }, z.core.$strip>>]>;
46
+ declare const moonclerkListSubscriptions: AppAction<typeof MoonclerkListSubscriptionsInput, typeof MoonclerkListSubscriptionsOutput, typeof moonclerk.credential>;
62
47
  //#endregion
63
48
  export { moonclerkListSubscriptions };
64
49
  //# sourceMappingURL=list-subscriptions.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-subscriptions.d.mts","names":[],"sources":["../../src/actions/list-subscriptions.ts"],"mappings":";;;cAIa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAM/B,gCAAA,EAAgC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BhC,0BAAA,gCAA0B,wBAAA"}
1
+ {"version":3,"file":"list-subscriptions.d.mts","names":[],"sources":["../../src/actions/list-subscriptions.ts"],"mappings":";;;;;cAMa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAM/B,gCAAA,EAAgC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BhC,0BAAA,EAA4B,SAAA,QAChC,+BAAA,SACA,gCAAA,SACA,SAAA,CAAU,UAAA"}
@@ -1,3 +1,4 @@
1
+ import "../app.mjs";
1
2
  import { action } from "../action.mjs";
2
3
  import { z } from "zod";
3
4
  const moonclerkListSubscriptions = action("MOONCLERK_LIST_SUBSCRIPTIONS", {
@@ -1 +1 @@
1
- {"version":3,"file":"list-subscriptions.mjs","names":[],"sources":["../../src/actions/list-subscriptions.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const MoonclerkListSubscriptionsInput = z.object({\n status: z.enum([\"active\", \"canceled\", \"expired\", \"past_due\", \"pending\", \"unpaid\"]).describe(\"Filter subscriptions by status. Valid options: active, canceled, expired, past_due, pending, unpaid\").optional(),\n form_id: z.string().describe(\"Filter subscriptions by the associated MoonClerk form ID (e.g., 5346)\").optional(),\n next_payment_to: z.string().describe(\"Include subscriptions due to bill on or before this date (YYYY-MM-DD)\").optional(),\n next_payment_from: z.string().describe(\"Include subscriptions due to bill on or after this date (YYYY-MM-DD)\").optional(),\n}).describe(\"Request parameters for listing subscriptions with optional filters.\");\nexport const MoonclerkListSubscriptionsOutput = z.object({\n subscriptions: z.array(z.object({\n id: z.number().int().describe(\"Subscription ID.\").nullable(),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\").nullable(),\n amount: z.number().int().describe(\"Amount in cents.\").nullable(),\n currency: z.string().describe(\"Currency code, e.g., USD.\").nullable(),\n interval: z.string().describe(\"Billing interval, e.g., month.\").nullable(),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\").nullable(),\n plan_reference: z.string().describe(\"Plan reference ID.\").nullable(),\n amount_description: z.string().describe(\"Description of the amount option.\").nullable(),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\").nullable(),\n status: z.string().describe(\"Subscription status.\").nullable(),\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).\").nullable(),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\").nullable(),\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).\").nullable(),\n subscription_reference: z.string().describe(\"Subscription reference ID.\").nullable(),\n}).passthrough().describe(\"Subscription details.\")).describe(\"List of subscription objects.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListSubscriptions = action(\"MOONCLERK_LIST_SUBSCRIPTIONS\", {\n slug: \"moonclerk-list-subscriptions\",\n name: \"List Subscriptions\",\n description: \"Tool to list subscriptions. Use when you need to retrieve all subscriptions after authenticating.\",\n input: MoonclerkListSubscriptionsInput,\n output: MoonclerkListSubscriptionsOutput,\n});\n"],"mappings":";;AAsCA,MAAa,6BAA6B,OAAO,gCAAgC;CAC/E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAtC6C,EAAE,OAAO;EACtD,QAAQ,EAAE,KAAK;GAAC;GAAU;GAAY;GAAW;GAAY;GAAW;EAAQ,CAAC,CAAC,CAAC,SAAS,qGAAqG,CAAC,CAAC,SAAS;EAC5M,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;EAC/G,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;EACvH,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,sEAAsE,CAAC,CAAC,SAAS;CAC1H,CAAC,CAAC,CAAC,SAAS,qEAiCH;CACP,QAjC8C,EAAE,OAAO,EACvD,eAAe,EAAE,MAAM,EAAE,OAAO;EAChC,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;EAC3D,MAAM,EAAE,OAAO;GACf,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,UAAU,CAAC,CAAC,SAAS;GACnD,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;GAC/D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;GACpE,UAAU,EAAE,OAAO,CAAC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,uBAAuB,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;EACnG,wBAAwB,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;CACrF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,CAAC,SAAS,+BAA+B,EAC5F,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
1
+ {"version":3,"file":"list-subscriptions.mjs","names":[],"sources":["../../src/actions/list-subscriptions.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { moonclerk } from \"../app\";\n\nexport const MoonclerkListSubscriptionsInput = z.object({\n status: z.enum([\"active\", \"canceled\", \"expired\", \"past_due\", \"pending\", \"unpaid\"]).describe(\"Filter subscriptions by status. Valid options: active, canceled, expired, past_due, pending, unpaid\").optional(),\n form_id: z.string().describe(\"Filter subscriptions by the associated MoonClerk form ID (e.g., 5346)\").optional(),\n next_payment_to: z.string().describe(\"Include subscriptions due to bill on or before this date (YYYY-MM-DD)\").optional(),\n next_payment_from: z.string().describe(\"Include subscriptions due to bill on or after this date (YYYY-MM-DD)\").optional(),\n}).describe(\"Request parameters for listing subscriptions with optional filters.\");\nexport const MoonclerkListSubscriptionsOutput = z.object({\n subscriptions: z.array(z.object({\n id: z.number().int().describe(\"Subscription ID.\").nullable(),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\").nullable(),\n amount: z.number().int().describe(\"Amount in cents.\").nullable(),\n currency: z.string().describe(\"Currency code, e.g., USD.\").nullable(),\n interval: z.string().describe(\"Billing interval, e.g., month.\").nullable(),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\").nullable(),\n plan_reference: z.string().describe(\"Plan reference ID.\").nullable(),\n amount_description: z.string().describe(\"Description of the amount option.\").nullable(),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\").nullable(),\n status: z.string().describe(\"Subscription status.\").nullable(),\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).\").nullable(),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\").nullable(),\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).\").nullable(),\n subscription_reference: z.string().describe(\"Subscription reference ID.\").nullable(),\n}).passthrough().describe(\"Subscription details.\")).describe(\"List of subscription objects.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListSubscriptions: AppAction<\n typeof MoonclerkListSubscriptionsInput,\n typeof MoonclerkListSubscriptionsOutput,\n typeof moonclerk.credential\n> = action(\"MOONCLERK_LIST_SUBSCRIPTIONS\", {\n slug: \"moonclerk-list-subscriptions\",\n name: \"List Subscriptions\",\n description: \"Tool to list subscriptions. Use when you need to retrieve all subscriptions after authenticating.\",\n input: MoonclerkListSubscriptionsInput,\n output: MoonclerkListSubscriptionsOutput,\n});\n"],"mappings":";;;AAwCA,MAAa,6BAIT,OAAO,gCAAgC;CACzC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA1C6C,EAAE,OAAO;EACtD,QAAQ,EAAE,KAAK;GAAC;GAAU;GAAY;GAAW;GAAY;GAAW;EAAQ,CAAC,CAAC,CAAC,SAAS,qGAAqG,CAAC,CAAC,SAAS;EAC5M,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,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AAS,CAAC,CAAC,SAAS;EACzF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC9F,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7F,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACxG,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;EACtF,sBAAsB,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;EAC1F,sBAAsB,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC5G,uBAAuB,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;EACnG,wBAAwB,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;CACrF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,CAAC,SAAS,+BAA+B,EAC5F,CAAC,CAAC,CAAC,SAAS,gCAWF;AACV,CAAC"}
package/dist/app.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  let _keystrokehq_keystroke_app = require("@keystrokehq/keystroke/app");
2
- let zod = require("zod");
3
2
  //#region src/app.ts
3
+ const credential = { generic_api_key: require("zod").z.string() };
4
4
  const moonclerk = (0, _keystrokehq_keystroke_app.defineApp)({
5
5
  slug: "moonclerk",
6
6
  auth: "keystroke",
7
- credential: { generic_api_key: zod.z.string() }
7
+ credential
8
8
  });
9
9
  //#endregion
10
10
  exports.moonclerk = moonclerk;
package/dist/app.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.cjs","names":["z"],"sources":["../src/app.ts"],"sourcesContent":["import { defineApp } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nexport const moonclerk = defineApp({\n slug: \"moonclerk\",\n auth: \"keystroke\",\n credential: {\n generic_api_key: z.string(),\n },\n});\n"],"mappings":";;;AAGA,MAAa,aAAA,GAAA,2BAAA,UAAA,CAAsB;CACjC,MAAM;CACN,MAAM;CACN,YAAY,EACV,iBAAiBA,IAAAA,EAAE,OAAO,EAC5B;AACF,CAAC"}
1
+ {"version":3,"file":"app.cjs","names":["z"],"sources":["../src/app.ts"],"sourcesContent":["import { defineApp, type KeystrokeApp } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nconst credential = {\n generic_api_key: z.string(),\n};\n\nexport const moonclerk: KeystrokeApp<\"moonclerk\", typeof credential> = defineApp({\n slug: \"moonclerk\",\n auth: \"keystroke\",\n credential,\n});\n"],"mappings":";;AAGA,MAAM,aAAa,EACjB,8BAAiBA,CAAAA,CAAAA,EAAE,OAAO,EAC5B;AAEA,MAAa,aAAA,GAAA,2BAAA,UAAA,CAAoE;CAC/E,MAAM;CACN,MAAM;CACN;AACF,CAAC"}
package/dist/app.d.cts CHANGED
@@ -1,13 +1,11 @@
1
+ import { KeystrokeApp } from "@keystrokehq/keystroke/app";
1
2
  import { z } from "zod";
2
3
 
3
4
  //#region src/app.d.ts
4
- declare const moonclerk: import("@keystrokehq/app").App<import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
5
- connectionId: z.ZodString;
6
- entityId: z.ZodString;
7
- instanceId: z.ZodString;
8
- }, z.core.$strip>, z.ZodObject<{
5
+ declare const credential: {
9
6
  generic_api_key: z.ZodString;
10
- }, z.core.$strip>>>;
7
+ };
8
+ declare const moonclerk: KeystrokeApp<"moonclerk", typeof credential>;
11
9
  //#endregion
12
10
  export { moonclerk };
13
11
  //# sourceMappingURL=app.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.cts","names":[],"sources":["../src/app.ts"],"mappings":";;;cAGa,SAAA,6BAAS,GAAA,+BAAA,UAAA,cAAA,CAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"app.d.cts","names":[],"sources":["../src/app.ts"],"mappings":";;;;cAGM,UAAA;mBAEL,CAAA,CAAA,SAAA;AAAA;AAAA,cAEY,SAAA,EAAW,YAAY,qBAAqB,UAAA"}
package/dist/app.d.mts CHANGED
@@ -1,13 +1,11 @@
1
+ import { KeystrokeApp } from "@keystrokehq/keystroke/app";
1
2
  import { z } from "zod";
2
3
 
3
4
  //#region src/app.d.ts
4
- declare const moonclerk: import("@keystrokehq/app").App<import("@keystrokehq/shared").Credential<"moonclerk", z.ZodObject<{
5
- connectionId: z.ZodString;
6
- entityId: z.ZodString;
7
- instanceId: z.ZodString;
8
- }, z.core.$strip>, z.ZodObject<{
5
+ declare const credential: {
9
6
  generic_api_key: z.ZodString;
10
- }, z.core.$strip>>>;
7
+ };
8
+ declare const moonclerk: KeystrokeApp<"moonclerk", typeof credential>;
11
9
  //#endregion
12
10
  export { moonclerk };
13
11
  //# sourceMappingURL=app.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.mts","names":[],"sources":["../src/app.ts"],"mappings":";;;cAGa,SAAA,6BAAS,GAAA,+BAAA,UAAA,cAAA,CAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"app.d.mts","names":[],"sources":["../src/app.ts"],"mappings":";;;;cAGM,UAAA;mBAEL,CAAA,CAAA,SAAA;AAAA;AAAA,cAEY,SAAA,EAAW,YAAY,qBAAqB,UAAA"}
package/dist/app.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  import { defineApp } from "@keystrokehq/keystroke/app";
2
2
  import { z } from "zod";
3
- //#region src/app.ts
4
3
  const moonclerk = defineApp({
5
4
  slug: "moonclerk",
6
5
  auth: "keystroke",
package/dist/app.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.mjs","names":[],"sources":["../src/app.ts"],"sourcesContent":["import { defineApp } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nexport const moonclerk = defineApp({\n slug: \"moonclerk\",\n auth: \"keystroke\",\n credential: {\n generic_api_key: z.string(),\n },\n});\n"],"mappings":";;;AAGA,MAAa,YAAY,UAAU;CACjC,MAAM;CACN,MAAM;CACN,YAAY,EACV,iBAAiB,EAAE,OAAO,EAC5B;AACF,CAAC"}
1
+ {"version":3,"file":"app.mjs","names":[],"sources":["../src/app.ts"],"sourcesContent":["import { defineApp, type KeystrokeApp } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nconst credential = {\n generic_api_key: z.string(),\n};\n\nexport const moonclerk: KeystrokeApp<\"moonclerk\", typeof credential> = defineApp({\n slug: \"moonclerk\",\n auth: \"keystroke\",\n credential,\n});\n"],"mappings":";;AAOA,MAAa,YAA0D,UAAU;CAC/E,MAAM;CACN,MAAM;CACN,cANA,iBAAiB,EAAE,OAAO,EAM1B;AACF,CAAC"}
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
+ import { moonclerk } from "./app.cjs";
1
2
  import { moonclerkListCustomers } from "./actions/list-customers.cjs";
2
3
  import { moonclerkListDiscounts } from "./actions/list-discounts.cjs";
3
4
  import { moonclerkListForms } from "./actions/list-forms.cjs";
4
5
  import { moonclerkListPayments } from "./actions/list-payments.cjs";
5
6
  import { moonclerkListSubscriptions } from "./actions/list-subscriptions.cjs";
6
- import { moonclerk } from "./app.cjs";
7
7
  import { moonclerkCatalog } from "./catalog.cjs";
8
8
  export { moonclerk, moonclerkCatalog, moonclerkListCustomers, moonclerkListDiscounts, moonclerkListForms, moonclerkListPayments, moonclerkListSubscriptions };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
+ import { moonclerk } from "./app.mjs";
1
2
  import { moonclerkListCustomers } from "./actions/list-customers.mjs";
2
3
  import { moonclerkListDiscounts } from "./actions/list-discounts.mjs";
3
4
  import { moonclerkListForms } from "./actions/list-forms.mjs";
4
5
  import { moonclerkListPayments } from "./actions/list-payments.mjs";
5
6
  import { moonclerkListSubscriptions } from "./actions/list-subscriptions.mjs";
6
- import { moonclerk } from "./app.mjs";
7
7
  import { moonclerkCatalog } from "./catalog.mjs";
8
8
  export { moonclerk, moonclerkCatalog, moonclerkListCustomers, moonclerkListDiscounts, moonclerkListForms, moonclerkListPayments, moonclerkListSubscriptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/moonclerk",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -31,7 +31,7 @@
31
31
  }
32
32
  },
33
33
  "peerDependencies": {
34
- "@keystrokehq/keystroke": ">=0.1.4",
34
+ "@keystrokehq/keystroke": ">=0.1.104",
35
35
  "zod": "^4.4.3"
36
36
  },
37
37
  "devDependencies": {