@keystrokehq/moonclerk 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/list-customers.cjs +38 -38
- package/dist/actions/list-customers.cjs.map +1 -1
- package/dist/actions/list-customers.d.cts +95 -3
- package/dist/actions/list-customers.d.cts.map +1 -1
- package/dist/actions/list-customers.d.mts +95 -3
- package/dist/actions/list-customers.d.mts.map +1 -1
- package/dist/actions/list-customers.mjs +38 -38
- package/dist/actions/list-customers.mjs.map +1 -1
- package/dist/actions/list-discounts.cjs +4 -4
- package/dist/actions/list-discounts.cjs.map +1 -1
- package/dist/actions/list-discounts.d.cts +40 -3
- package/dist/actions/list-discounts.d.cts.map +1 -1
- package/dist/actions/list-discounts.d.mts +40 -3
- package/dist/actions/list-discounts.d.mts.map +1 -1
- package/dist/actions/list-discounts.mjs +4 -4
- package/dist/actions/list-discounts.mjs.map +1 -1
- package/dist/actions/list-forms.cjs +9 -9
- package/dist/actions/list-forms.cjs.map +1 -1
- package/dist/actions/list-forms.d.cts +22 -3
- package/dist/actions/list-forms.d.cts.map +1 -1
- package/dist/actions/list-forms.d.mts +22 -3
- package/dist/actions/list-forms.d.mts.map +1 -1
- package/dist/actions/list-forms.mjs +9 -9
- package/dist/actions/list-forms.mjs.map +1 -1
- package/dist/actions/list-payments.cjs +31 -31
- package/dist/actions/list-payments.cjs.map +1 -1
- package/dist/actions/list-payments.d.cts +70 -3
- package/dist/actions/list-payments.d.cts.map +1 -1
- package/dist/actions/list-payments.d.mts +70 -3
- package/dist/actions/list-payments.d.mts.map +1 -1
- package/dist/actions/list-payments.mjs +31 -31
- package/dist/actions/list-payments.mjs.map +1 -1
- package/dist/actions/list-subscriptions.cjs +15 -15
- package/dist/actions/list-subscriptions.cjs.map +1 -1
- package/dist/actions/list-subscriptions.d.cts +46 -3
- package/dist/actions/list-subscriptions.d.cts.map +1 -1
- package/dist/actions/list-subscriptions.d.mts +46 -3
- package/dist/actions/list-subscriptions.d.mts.map +1 -1
- package/dist/actions/list-subscriptions.mjs +15 -15
- package/dist/actions/list-subscriptions.mjs.map +1 -1
- package/dist/catalog.cjs +7 -1
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +8 -0
- package/dist/catalog.d.mts +8 -0
- package/dist/catalog.mjs +7 -1
- package/dist/catalog.mjs.map +1 -1
- package/package.json +2 -2
package/dist/action.cjs.map
CHANGED
|
@@ -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(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input:
|
|
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"}
|
package/dist/action.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { moonclerk } from \"./app\";\nimport { executeMoonclerkTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input:
|
|
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"}
|
|
@@ -17,27 +17,27 @@ const MoonclerkListCustomersInput = zod.z.object({
|
|
|
17
17
|
next_payment_from: zod.z.string().describe("Subscriptions due to bill on or after this date (YYYY-MM-DD).").optional()
|
|
18
18
|
}).describe("Request parameters for listing customers with optional filters.");
|
|
19
19
|
const MoonclerkListCustomersOutput = zod.z.object({ customers: zod.z.array(zod.z.object({
|
|
20
|
-
id: zod.z.number().int().describe("Customer ID."),
|
|
21
|
-
name: zod.z.string().describe("Customer name."),
|
|
22
|
-
email: zod.z.string().describe("Customer email address."),
|
|
23
|
-
form_id: zod.z.number().int().describe("Associated form ID."),
|
|
20
|
+
id: zod.z.number().int().describe("Customer ID.").nullable(),
|
|
21
|
+
name: zod.z.string().describe("Customer name.").nullable(),
|
|
22
|
+
email: zod.z.string().describe("Customer email address.").nullable(),
|
|
23
|
+
form_id: zod.z.number().int().describe("Associated form ID.").nullable(),
|
|
24
24
|
checkout: zod.z.object({
|
|
25
|
-
fee: zod.z.number().int().describe("Fee amount in cents."),
|
|
26
|
-
date: zod.z.string().describe("Checkout timestamp (ISO 8601)."),
|
|
27
|
-
token: zod.z.string().describe("Checkout token."),
|
|
28
|
-
total: zod.z.number().int().describe("Total amount in cents."),
|
|
29
|
-
subtotal: zod.z.number().int().describe("Subtotal in cents."),
|
|
30
|
-
amount_due: zod.z.number().int().describe("Amount due in cents."),
|
|
25
|
+
fee: zod.z.number().int().describe("Fee amount in cents.").nullable(),
|
|
26
|
+
date: zod.z.string().describe("Checkout timestamp (ISO 8601).").nullable(),
|
|
27
|
+
token: zod.z.string().describe("Checkout token.").nullable(),
|
|
28
|
+
total: zod.z.number().int().describe("Total amount in cents.").nullable(),
|
|
29
|
+
subtotal: zod.z.number().int().describe("Subtotal in cents.").nullable(),
|
|
30
|
+
amount_due: zod.z.number().int().describe("Amount due in cents.").nullable(),
|
|
31
31
|
coupon_code: zod.z.string().describe("Applied coupon code.").nullable().optional(),
|
|
32
|
-
coupon_amount: zod.z.number().int().describe("Coupon amount in cents."),
|
|
32
|
+
coupon_amount: zod.z.number().int().describe("Coupon amount in cents.").nullable(),
|
|
33
33
|
upfront_amount: zod.z.number().int().describe("Upfront amount charged in cents.").nullable().optional(),
|
|
34
34
|
trial_period_days: zod.z.number().int().describe("Trial period days if trial is applied.").nullable().optional()
|
|
35
35
|
}).describe("Checkout details for the customer."),
|
|
36
36
|
discount: zod.z.object({
|
|
37
37
|
coupon: zod.z.object({
|
|
38
|
-
code: zod.z.string().describe("Coupon code."),
|
|
38
|
+
code: zod.z.string().describe("Coupon code.").nullable(),
|
|
39
39
|
currency: zod.z.string().describe("Currency for the amount_off, e.g., 'USD'.").nullable().optional(),
|
|
40
|
-
duration: zod.z.string().describe("Duration of the coupon, e.g., 'once'."),
|
|
40
|
+
duration: zod.z.string().describe("Duration of the coupon, e.g., 'once'.").nullable(),
|
|
41
41
|
redeem_by: zod.z.string().describe("ISO 8601 date when the coupon expires.").nullable().optional(),
|
|
42
42
|
amount_off: zod.z.number().int().describe("Amount off in cents.").nullable().optional(),
|
|
43
43
|
percent_off: zod.z.number().int().describe("Percent off for the coupon.").nullable().optional(),
|
|
@@ -46,46 +46,46 @@ const MoonclerkListCustomersOutput = zod.z.object({ customers: zod.z.array(zod.z
|
|
|
46
46
|
}).describe("Coupon applied to the customer."),
|
|
47
47
|
ends_at: zod.z.string().describe("Discount end date (ISO 8601).").nullable().optional(),
|
|
48
48
|
starts_at: zod.z.string().describe("Discount start date (ISO 8601).").nullable().optional()
|
|
49
|
-
}).describe("Discount details including coupon and validity.").optional(),
|
|
49
|
+
}).describe("Discount details including coupon and validity.").nullable().optional(),
|
|
50
50
|
custom_id: zod.z.string().describe("Custom ID set via integration.").nullable().optional(),
|
|
51
|
-
delinquent: zod.z.boolean().describe("Whether the customer is delinquent."),
|
|
51
|
+
delinquent: zod.z.boolean().describe("Whether the customer is delinquent.").nullable(),
|
|
52
52
|
subscription: zod.z.object({
|
|
53
|
-
id: zod.z.number().int().describe("Subscription ID."),
|
|
53
|
+
id: zod.z.number().int().describe("Subscription ID.").nullable(),
|
|
54
54
|
plan: zod.z.object({
|
|
55
|
-
id: zod.z.number().int().describe("Plan ID."),
|
|
56
|
-
amount: zod.z.number().int().describe("Amount in cents."),
|
|
57
|
-
currency: zod.z.string().describe("Currency code, e.g., 'USD'."),
|
|
58
|
-
interval: zod.z.string().describe("Billing interval, e.g., 'month'."),
|
|
59
|
-
interval_count: zod.z.number().int().describe("Interval count, e.g., 1 for monthly."),
|
|
60
|
-
plan_reference: zod.z.string().describe("Plan reference ID."),
|
|
61
|
-
amount_description: zod.z.string().describe("Description of the amount option.")
|
|
55
|
+
id: zod.z.number().int().describe("Plan ID.").nullable(),
|
|
56
|
+
amount: zod.z.number().int().describe("Amount in cents.").nullable(),
|
|
57
|
+
currency: zod.z.string().describe("Currency code, e.g., 'USD'.").nullable(),
|
|
58
|
+
interval: zod.z.string().describe("Billing interval, e.g., 'month'.").nullable(),
|
|
59
|
+
interval_count: zod.z.number().int().describe("Interval count, e.g., 1 for monthly.").nullable(),
|
|
60
|
+
plan_reference: zod.z.string().describe("Plan reference ID.").nullable(),
|
|
61
|
+
amount_description: zod.z.string().describe("Description of the amount option.").nullable()
|
|
62
62
|
}).describe("Associated plan details."),
|
|
63
|
-
start: zod.z.string().describe("Subscription start timestamp (ISO 8601)."),
|
|
64
|
-
status: zod.z.string().describe("Subscription status."),
|
|
63
|
+
start: zod.z.string().describe("Subscription start timestamp (ISO 8601).").nullable(),
|
|
64
|
+
status: zod.z.string().describe("Subscription status.").nullable(),
|
|
65
65
|
ended_at: zod.z.string().describe("End timestamp if subscription ended.").nullable().optional(),
|
|
66
66
|
trial_end: zod.z.string().describe("Trial end timestamp if applicable.").nullable().optional(),
|
|
67
67
|
expires_at: zod.z.string().describe("Expiration timestamp if set.").nullable().optional(),
|
|
68
68
|
canceled_at: zod.z.string().describe("Cancellation timestamp if applicable.").nullable().optional(),
|
|
69
69
|
trial_start: zod.z.string().describe("Trial start timestamp if applicable.").nullable().optional(),
|
|
70
70
|
trial_period_days: zod.z.number().int().describe("Number of trial days if applicable.").nullable().optional(),
|
|
71
|
-
current_period_end: zod.z.string().describe("End of current period (ISO 8601)."),
|
|
72
|
-
current_period_start: zod.z.string().describe("Start of current period (ISO 8601)."),
|
|
71
|
+
current_period_end: zod.z.string().describe("End of current period (ISO 8601).").nullable(),
|
|
72
|
+
current_period_start: zod.z.string().describe("Start of current period (ISO 8601).").nullable(),
|
|
73
73
|
next_payment_attempt: zod.z.string().describe("Next payment attempt timestamp (ISO 8601).").nullable().optional(),
|
|
74
|
-
first_payment_attempt: zod.z.string().describe("First payment attempt timestamp (ISO 8601)."),
|
|
75
|
-
subscription_reference: zod.z.string().describe("Subscription reference ID.")
|
|
76
|
-
}).describe("Subscription details for the customer.").optional(),
|
|
77
|
-
custom_fields: zod.z.
|
|
74
|
+
first_payment_attempt: zod.z.string().describe("First payment attempt timestamp (ISO 8601).").nullable(),
|
|
75
|
+
subscription_reference: zod.z.string().describe("Subscription reference ID.").nullable()
|
|
76
|
+
}).describe("Subscription details for the customer.").nullable().optional(),
|
|
77
|
+
custom_fields: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Custom field responses keyed by field name.").nullable().optional(),
|
|
78
78
|
management_url: zod.z.string().describe("URL for managing the subscription in MoonClerk UI.").nullable().optional(),
|
|
79
79
|
payment_method: zod.z.object({
|
|
80
|
-
type: zod.z.string().describe("Payment method type, e.g., 'card'."),
|
|
81
|
-
brand: zod.z.string().describe("Card brand, e.g., 'Visa'."),
|
|
82
|
-
last4: zod.z.string().describe("Last 4 digits of the card."),
|
|
83
|
-
exp_year: zod.z.number().int().describe("Card expiration year."),
|
|
84
|
-
exp_month: zod.z.number().int().describe("Card expiration month.")
|
|
80
|
+
type: zod.z.string().describe("Payment method type, e.g., 'card'.").nullable(),
|
|
81
|
+
brand: zod.z.string().describe("Card brand, e.g., 'Visa'.").nullable(),
|
|
82
|
+
last4: zod.z.string().describe("Last 4 digits of the card.").nullable(),
|
|
83
|
+
exp_year: zod.z.number().int().describe("Card expiration year.").nullable(),
|
|
84
|
+
exp_month: zod.z.number().int().describe("Card expiration month.").nullable()
|
|
85
85
|
}).describe("Payment method details.").nullable().optional(),
|
|
86
|
-
account_balance: zod.z.number().int().describe("Account balance in cents."),
|
|
86
|
+
account_balance: zod.z.number().int().describe("Account balance in cents.").nullable(),
|
|
87
87
|
customer_reference: zod.z.string().describe("Stripe customer ID reference.").nullable().optional()
|
|
88
|
-
}).describe("Customer object representing a MoonClerk customer (Plan in UI).")).describe("List of customer objects.") }).describe("Data from the action execution");
|
|
88
|
+
}).passthrough().describe("Customer object representing a MoonClerk customer (Plan in UI).")).describe("List of customer objects.") }).describe("Data from the action execution");
|
|
89
89
|
const moonclerkListCustomers = require_action.action("MOONCLERK_LIST_CUSTOMERS", {
|
|
90
90
|
slug: "moonclerk-list-customers",
|
|
91
91
|
name: "List Customers",
|
|
@@ -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.ZodTypeAny = z.object({\n status: z.enum([\"active\", \"canceled\", \"expired\", \"past_due\", \"pending\", \"unpaid\"]).describe(\"Filter by subscription status.\").optional(),\n form_id: z.number().int().describe(\"The associated MoonClerk form ID to filter customers.\").optional(),\n checkout_to: z.string().describe(\"Customers created on or before this date (YYYY-MM-DD).\").optional(),\n checkout_from: z.string().describe(\"Customers created on or after this date (YYYY-MM-DD).\").optional(),\n next_payment_to: z.string().describe(\"Subscriptions due to bill on or before this date (YYYY-MM-DD).\").optional(),\n next_payment_from: z.string().describe(\"Subscriptions due to bill on or after this date (YYYY-MM-DD).\").optional(),\n}).describe(\"Request parameters for listing customers with optional filters.\");\nexport const MoonclerkListCustomersOutput: z.ZodTypeAny = z.object({\n customers: z.array(z.object({\n id: z.number().int().describe(\"Customer ID.\"),\n name: z.string().describe(\"Customer name.\"),\n email: z.string().describe(\"Customer email address.\"),\n form_id: z.number().int().describe(\"Associated form ID.\"),\n checkout: z.object({\n fee: z.number().int().describe(\"Fee amount in cents.\"),\n date: z.string().describe(\"Checkout timestamp (ISO 8601).\"),\n token: z.string().describe(\"Checkout token.\"),\n total: z.number().int().describe(\"Total amount in cents.\"),\n subtotal: z.number().int().describe(\"Subtotal in cents.\"),\n amount_due: z.number().int().describe(\"Amount due in cents.\"),\n coupon_code: z.string().describe(\"Applied coupon code.\").nullable().optional(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents.\"),\n upfront_amount: z.number().int().describe(\"Upfront amount charged in cents.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period days if trial is applied.\").nullable().optional(),\n}).describe(\"Checkout details for the customer.\"),\n discount: z.object({\n coupon: z.object({\n code: z.string().describe(\"Coupon code.\"),\n currency: z.string().describe(\"Currency for the amount_off, e.g., 'USD'.\").nullable().optional(),\n duration: z.string().describe(\"Duration of the coupon, e.g., 'once'.\"),\n redeem_by: z.string().describe(\"ISO 8601 date when the coupon expires.\").nullable().optional(),\n amount_off: z.number().int().describe(\"Amount off in cents.\").nullable().optional(),\n percent_off: z.number().int().describe(\"Percent off for the coupon.\").nullable().optional(),\n max_redemptions: z.number().int().describe(\"Maximum number of redemptions allowed by the coupon.\").nullable().optional(),\n duration_in_months: z.number().int().describe(\"Number of months the coupon is valid for (if applicable).\").nullable().optional(),\n}).describe(\"Coupon applied to the customer.\"),\n ends_at: z.string().describe(\"Discount end date (ISO 8601).\").nullable().optional(),\n starts_at: z.string().describe(\"Discount start date (ISO 8601).\").nullable().optional(),\n}).describe(\"Discount details including coupon and validity.\").optional(),\n custom_id: z.string().describe(\"Custom ID set via integration.\").nullable().optional(),\n delinquent: z.boolean().describe(\"Whether the customer is delinquent.\"),\n subscription: z.object({\n id: z.number().int().describe(\"Subscription ID.\"),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\"),\n amount: z.number().int().describe(\"Amount in cents.\"),\n currency: z.string().describe(\"Currency code, e.g., 'USD'.\"),\n interval: z.string().describe(\"Billing interval, e.g., 'month'.\"),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\"),\n plan_reference: z.string().describe(\"Plan reference ID.\"),\n amount_description: z.string().describe(\"Description of the amount option.\"),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\"),\n status: z.string().describe(\"Subscription status.\"),\n ended_at: z.string().describe(\"End timestamp if subscription ended.\").nullable().optional(),\n trial_end: z.string().describe(\"Trial end timestamp if applicable.\").nullable().optional(),\n expires_at: z.string().describe(\"Expiration timestamp if set.\").nullable().optional(),\n canceled_at: z.string().describe(\"Cancellation timestamp if applicable.\").nullable().optional(),\n trial_start: z.string().describe(\"Trial start timestamp if applicable.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Number of trial days if applicable.\").nullable().optional(),\n current_period_end: z.string().describe(\"End of current period (ISO 8601).\"),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\"),\n next_payment_attempt: z.string().describe(\"Next payment attempt timestamp (ISO 8601).\").nullable().optional(),\n first_payment_attempt: z.string().describe(\"First payment attempt timestamp (ISO 8601).\"),\n subscription_reference: z.string().describe(\"Subscription reference ID.\"),\n}).describe(\"Subscription details for the customer.\").optional(),\n custom_fields: z.object({}).describe(\"Custom field responses keyed by field name.\").nullable().optional(),\n management_url: z.string().describe(\"URL for managing the subscription in MoonClerk UI.\").nullable().optional(),\n payment_method: z.object({\n type: z.string().describe(\"Payment method type, e.g., 'card'.\"),\n brand: z.string().describe(\"Card brand, e.g., 'Visa'.\"),\n last4: z.string().describe(\"Last 4 digits of the card.\"),\n exp_year: z.number().int().describe(\"Card expiration year.\"),\n exp_month: z.number().int().describe(\"Card expiration month.\"),\n}).describe(\"Payment method details.\").nullable().optional(),\n account_balance: z.number().int().describe(\"Account balance in cents.\"),\n customer_reference: z.string().describe(\"Stripe customer ID reference.\").nullable().optional(),\n}).describe(\"Customer object representing a MoonClerk customer (Plan in UI).\")).describe(\"List of customer objects.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListCustomers = action(\"MOONCLERK_LIST_CUSTOMERS\", {\n slug: \"moonclerk-list-customers\",\n name: \"List Customers\",\n description: \"Tool to list customers (plans) from MoonClerk. Use when you need to retrieve customer data with optional filters. Use after authenticating API credentials.\",\n input: MoonclerkListCustomersInput,\n output: MoonclerkListCustomersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4CA,IAAAA,EAAE,OAAO;CAChE,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAY;EAAW;EAAY;EAAW;CAAQ,CAAC,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;CACvI,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACrG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;CACpG,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,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,+BAA6CA,IAAAA,EAAE,OAAO,EACjE,WAAWA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;CAC5B,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,cAAc;CAC5C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gBAAgB;CAC1C,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;CACpD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qBAAqB;CACxD,UAAUA,IAAAA,EAAE,OAAO;EACnB,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sBAAsB;EACrD,MAAMA,IAAAA,EAAE,OAAO,CAAC,C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Content":["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,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ACjF,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,yBAAyBC,eAAAA,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,101 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/list-customers.d.ts
|
|
4
|
-
declare const MoonclerkListCustomersInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const MoonclerkListCustomersInput: z.ZodObject<{
|
|
5
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
active: "active";
|
|
7
|
+
canceled: "canceled";
|
|
8
|
+
expired: "expired";
|
|
9
|
+
past_due: "past_due";
|
|
10
|
+
pending: "pending";
|
|
11
|
+
unpaid: "unpaid";
|
|
12
|
+
}>>;
|
|
13
|
+
form_id: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
checkout_to: z.ZodOptional<z.ZodString>;
|
|
15
|
+
checkout_from: z.ZodOptional<z.ZodString>;
|
|
16
|
+
next_payment_to: z.ZodOptional<z.ZodString>;
|
|
17
|
+
next_payment_from: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
declare const MoonclerkListCustomersOutput: z.ZodObject<{
|
|
20
|
+
customers: z.ZodArray<z.ZodObject<{
|
|
21
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
22
|
+
name: z.ZodNullable<z.ZodString>;
|
|
23
|
+
email: z.ZodNullable<z.ZodString>;
|
|
24
|
+
form_id: z.ZodNullable<z.ZodNumber>;
|
|
25
|
+
checkout: z.ZodObject<{
|
|
26
|
+
fee: z.ZodNullable<z.ZodNumber>;
|
|
27
|
+
date: z.ZodNullable<z.ZodString>;
|
|
28
|
+
token: z.ZodNullable<z.ZodString>;
|
|
29
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
30
|
+
subtotal: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
amount_due: z.ZodNullable<z.ZodNumber>;
|
|
32
|
+
coupon_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
coupon_amount: z.ZodNullable<z.ZodNumber>;
|
|
34
|
+
upfront_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
35
|
+
trial_period_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
discount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
38
|
+
coupon: z.ZodObject<{
|
|
39
|
+
code: z.ZodNullable<z.ZodString>;
|
|
40
|
+
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
+
duration: z.ZodNullable<z.ZodString>;
|
|
42
|
+
redeem_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
|
+
amount_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
44
|
+
percent_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
45
|
+
max_redemptions: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
46
|
+
duration_in_months: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
+
starts_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
+
}, z.core.$strip>>>;
|
|
51
|
+
custom_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
delinquent: z.ZodNullable<z.ZodBoolean>;
|
|
53
|
+
subscription: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
54
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
55
|
+
plan: z.ZodObject<{
|
|
56
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
57
|
+
amount: z.ZodNullable<z.ZodNumber>;
|
|
58
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
59
|
+
interval: z.ZodNullable<z.ZodString>;
|
|
60
|
+
interval_count: z.ZodNullable<z.ZodNumber>;
|
|
61
|
+
plan_reference: z.ZodNullable<z.ZodString>;
|
|
62
|
+
amount_description: z.ZodNullable<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
start: z.ZodNullable<z.ZodString>;
|
|
65
|
+
status: z.ZodNullable<z.ZodString>;
|
|
66
|
+
ended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
+
trial_end: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
+
canceled_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
+
trial_start: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
trial_period_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
72
|
+
current_period_end: z.ZodNullable<z.ZodString>;
|
|
73
|
+
current_period_start: z.ZodNullable<z.ZodString>;
|
|
74
|
+
next_payment_attempt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
first_payment_attempt: z.ZodNullable<z.ZodString>;
|
|
76
|
+
subscription_reference: z.ZodNullable<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>>>;
|
|
78
|
+
custom_fields: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
79
|
+
management_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
payment_method: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
81
|
+
type: z.ZodNullable<z.ZodString>;
|
|
82
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
83
|
+
last4: z.ZodNullable<z.ZodString>;
|
|
84
|
+
exp_year: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
exp_month: z.ZodNullable<z.ZodNumber>;
|
|
86
|
+
}, z.core.$strip>>>;
|
|
87
|
+
account_balance: z.ZodNullable<z.ZodNumber>;
|
|
88
|
+
customer_reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
89
|
+
}, z.core.$loose>>;
|
|
90
|
+
}, 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]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
99
|
//#endregion
|
|
8
100
|
export { moonclerkListCustomers };
|
|
9
101
|
//# 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,
|
|
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,9 +1,101 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/list-customers.d.ts
|
|
4
|
-
declare const MoonclerkListCustomersInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const MoonclerkListCustomersInput: z.ZodObject<{
|
|
5
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
active: "active";
|
|
7
|
+
canceled: "canceled";
|
|
8
|
+
expired: "expired";
|
|
9
|
+
past_due: "past_due";
|
|
10
|
+
pending: "pending";
|
|
11
|
+
unpaid: "unpaid";
|
|
12
|
+
}>>;
|
|
13
|
+
form_id: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
checkout_to: z.ZodOptional<z.ZodString>;
|
|
15
|
+
checkout_from: z.ZodOptional<z.ZodString>;
|
|
16
|
+
next_payment_to: z.ZodOptional<z.ZodString>;
|
|
17
|
+
next_payment_from: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
declare const MoonclerkListCustomersOutput: z.ZodObject<{
|
|
20
|
+
customers: z.ZodArray<z.ZodObject<{
|
|
21
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
22
|
+
name: z.ZodNullable<z.ZodString>;
|
|
23
|
+
email: z.ZodNullable<z.ZodString>;
|
|
24
|
+
form_id: z.ZodNullable<z.ZodNumber>;
|
|
25
|
+
checkout: z.ZodObject<{
|
|
26
|
+
fee: z.ZodNullable<z.ZodNumber>;
|
|
27
|
+
date: z.ZodNullable<z.ZodString>;
|
|
28
|
+
token: z.ZodNullable<z.ZodString>;
|
|
29
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
30
|
+
subtotal: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
amount_due: z.ZodNullable<z.ZodNumber>;
|
|
32
|
+
coupon_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
coupon_amount: z.ZodNullable<z.ZodNumber>;
|
|
34
|
+
upfront_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
35
|
+
trial_period_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
discount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
38
|
+
coupon: z.ZodObject<{
|
|
39
|
+
code: z.ZodNullable<z.ZodString>;
|
|
40
|
+
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
+
duration: z.ZodNullable<z.ZodString>;
|
|
42
|
+
redeem_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
|
+
amount_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
44
|
+
percent_off: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
45
|
+
max_redemptions: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
46
|
+
duration_in_months: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
+
starts_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
+
}, z.core.$strip>>>;
|
|
51
|
+
custom_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
delinquent: z.ZodNullable<z.ZodBoolean>;
|
|
53
|
+
subscription: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
54
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
55
|
+
plan: z.ZodObject<{
|
|
56
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
57
|
+
amount: z.ZodNullable<z.ZodNumber>;
|
|
58
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
59
|
+
interval: z.ZodNullable<z.ZodString>;
|
|
60
|
+
interval_count: z.ZodNullable<z.ZodNumber>;
|
|
61
|
+
plan_reference: z.ZodNullable<z.ZodString>;
|
|
62
|
+
amount_description: z.ZodNullable<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
start: z.ZodNullable<z.ZodString>;
|
|
65
|
+
status: z.ZodNullable<z.ZodString>;
|
|
66
|
+
ended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
+
trial_end: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
+
canceled_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
+
trial_start: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
trial_period_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
72
|
+
current_period_end: z.ZodNullable<z.ZodString>;
|
|
73
|
+
current_period_start: z.ZodNullable<z.ZodString>;
|
|
74
|
+
next_payment_attempt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
first_payment_attempt: z.ZodNullable<z.ZodString>;
|
|
76
|
+
subscription_reference: z.ZodNullable<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>>>;
|
|
78
|
+
custom_fields: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
79
|
+
management_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
payment_method: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
81
|
+
type: z.ZodNullable<z.ZodString>;
|
|
82
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
83
|
+
last4: z.ZodNullable<z.ZodString>;
|
|
84
|
+
exp_year: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
exp_month: z.ZodNullable<z.ZodNumber>;
|
|
86
|
+
}, z.core.$strip>>>;
|
|
87
|
+
account_balance: z.ZodNullable<z.ZodNumber>;
|
|
88
|
+
customer_reference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
89
|
+
}, z.core.$loose>>;
|
|
90
|
+
}, 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]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
99
|
//#endregion
|
|
8
100
|
export { moonclerkListCustomers };
|
|
9
101
|
//# 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,
|
|
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"}
|
|
@@ -20,27 +20,27 @@ const moonclerkListCustomers = action("MOONCLERK_LIST_CUSTOMERS", {
|
|
|
20
20
|
next_payment_from: z.string().describe("Subscriptions due to bill on or after this date (YYYY-MM-DD).").optional()
|
|
21
21
|
}).describe("Request parameters for listing customers with optional filters."),
|
|
22
22
|
output: z.object({ customers: z.array(z.object({
|
|
23
|
-
id: z.number().int().describe("Customer ID."),
|
|
24
|
-
name: z.string().describe("Customer name."),
|
|
25
|
-
email: z.string().describe("Customer email address."),
|
|
26
|
-
form_id: z.number().int().describe("Associated form ID."),
|
|
23
|
+
id: z.number().int().describe("Customer ID.").nullable(),
|
|
24
|
+
name: z.string().describe("Customer name.").nullable(),
|
|
25
|
+
email: z.string().describe("Customer email address.").nullable(),
|
|
26
|
+
form_id: z.number().int().describe("Associated form ID.").nullable(),
|
|
27
27
|
checkout: z.object({
|
|
28
|
-
fee: z.number().int().describe("Fee amount in cents."),
|
|
29
|
-
date: z.string().describe("Checkout timestamp (ISO 8601)."),
|
|
30
|
-
token: z.string().describe("Checkout token."),
|
|
31
|
-
total: z.number().int().describe("Total amount in cents."),
|
|
32
|
-
subtotal: z.number().int().describe("Subtotal in cents."),
|
|
33
|
-
amount_due: z.number().int().describe("Amount due in cents."),
|
|
28
|
+
fee: z.number().int().describe("Fee amount in cents.").nullable(),
|
|
29
|
+
date: z.string().describe("Checkout timestamp (ISO 8601).").nullable(),
|
|
30
|
+
token: z.string().describe("Checkout token.").nullable(),
|
|
31
|
+
total: z.number().int().describe("Total amount in cents.").nullable(),
|
|
32
|
+
subtotal: z.number().int().describe("Subtotal in cents.").nullable(),
|
|
33
|
+
amount_due: z.number().int().describe("Amount due in cents.").nullable(),
|
|
34
34
|
coupon_code: z.string().describe("Applied coupon code.").nullable().optional(),
|
|
35
|
-
coupon_amount: z.number().int().describe("Coupon amount in cents."),
|
|
35
|
+
coupon_amount: z.number().int().describe("Coupon amount in cents.").nullable(),
|
|
36
36
|
upfront_amount: z.number().int().describe("Upfront amount charged in cents.").nullable().optional(),
|
|
37
37
|
trial_period_days: z.number().int().describe("Trial period days if trial is applied.").nullable().optional()
|
|
38
38
|
}).describe("Checkout details for the customer."),
|
|
39
39
|
discount: z.object({
|
|
40
40
|
coupon: z.object({
|
|
41
|
-
code: z.string().describe("Coupon code."),
|
|
41
|
+
code: z.string().describe("Coupon code.").nullable(),
|
|
42
42
|
currency: z.string().describe("Currency for the amount_off, e.g., 'USD'.").nullable().optional(),
|
|
43
|
-
duration: z.string().describe("Duration of the coupon, e.g., 'once'."),
|
|
43
|
+
duration: z.string().describe("Duration of the coupon, e.g., 'once'.").nullable(),
|
|
44
44
|
redeem_by: z.string().describe("ISO 8601 date when the coupon expires.").nullable().optional(),
|
|
45
45
|
amount_off: z.number().int().describe("Amount off in cents.").nullable().optional(),
|
|
46
46
|
percent_off: z.number().int().describe("Percent off for the coupon.").nullable().optional(),
|
|
@@ -49,46 +49,46 @@ const moonclerkListCustomers = action("MOONCLERK_LIST_CUSTOMERS", {
|
|
|
49
49
|
}).describe("Coupon applied to the customer."),
|
|
50
50
|
ends_at: z.string().describe("Discount end date (ISO 8601).").nullable().optional(),
|
|
51
51
|
starts_at: z.string().describe("Discount start date (ISO 8601).").nullable().optional()
|
|
52
|
-
}).describe("Discount details including coupon and validity.").optional(),
|
|
52
|
+
}).describe("Discount details including coupon and validity.").nullable().optional(),
|
|
53
53
|
custom_id: z.string().describe("Custom ID set via integration.").nullable().optional(),
|
|
54
|
-
delinquent: z.boolean().describe("Whether the customer is delinquent."),
|
|
54
|
+
delinquent: z.boolean().describe("Whether the customer is delinquent.").nullable(),
|
|
55
55
|
subscription: z.object({
|
|
56
|
-
id: z.number().int().describe("Subscription ID."),
|
|
56
|
+
id: z.number().int().describe("Subscription ID.").nullable(),
|
|
57
57
|
plan: z.object({
|
|
58
|
-
id: z.number().int().describe("Plan ID."),
|
|
59
|
-
amount: z.number().int().describe("Amount in cents."),
|
|
60
|
-
currency: z.string().describe("Currency code, e.g., 'USD'."),
|
|
61
|
-
interval: z.string().describe("Billing interval, e.g., 'month'."),
|
|
62
|
-
interval_count: z.number().int().describe("Interval count, e.g., 1 for monthly."),
|
|
63
|
-
plan_reference: z.string().describe("Plan reference ID."),
|
|
64
|
-
amount_description: z.string().describe("Description of the amount option.")
|
|
58
|
+
id: z.number().int().describe("Plan ID.").nullable(),
|
|
59
|
+
amount: z.number().int().describe("Amount in cents.").nullable(),
|
|
60
|
+
currency: z.string().describe("Currency code, e.g., 'USD'.").nullable(),
|
|
61
|
+
interval: z.string().describe("Billing interval, e.g., 'month'.").nullable(),
|
|
62
|
+
interval_count: z.number().int().describe("Interval count, e.g., 1 for monthly.").nullable(),
|
|
63
|
+
plan_reference: z.string().describe("Plan reference ID.").nullable(),
|
|
64
|
+
amount_description: z.string().describe("Description of the amount option.").nullable()
|
|
65
65
|
}).describe("Associated plan details."),
|
|
66
|
-
start: z.string().describe("Subscription start timestamp (ISO 8601)."),
|
|
67
|
-
status: z.string().describe("Subscription status."),
|
|
66
|
+
start: z.string().describe("Subscription start timestamp (ISO 8601).").nullable(),
|
|
67
|
+
status: z.string().describe("Subscription status.").nullable(),
|
|
68
68
|
ended_at: z.string().describe("End timestamp if subscription ended.").nullable().optional(),
|
|
69
69
|
trial_end: z.string().describe("Trial end timestamp if applicable.").nullable().optional(),
|
|
70
70
|
expires_at: z.string().describe("Expiration timestamp if set.").nullable().optional(),
|
|
71
71
|
canceled_at: z.string().describe("Cancellation timestamp if applicable.").nullable().optional(),
|
|
72
72
|
trial_start: z.string().describe("Trial start timestamp if applicable.").nullable().optional(),
|
|
73
73
|
trial_period_days: z.number().int().describe("Number of trial days if applicable.").nullable().optional(),
|
|
74
|
-
current_period_end: z.string().describe("End of current period (ISO 8601)."),
|
|
75
|
-
current_period_start: z.string().describe("Start of current period (ISO 8601)."),
|
|
74
|
+
current_period_end: z.string().describe("End of current period (ISO 8601).").nullable(),
|
|
75
|
+
current_period_start: z.string().describe("Start of current period (ISO 8601).").nullable(),
|
|
76
76
|
next_payment_attempt: z.string().describe("Next payment attempt timestamp (ISO 8601).").nullable().optional(),
|
|
77
|
-
first_payment_attempt: z.string().describe("First payment attempt timestamp (ISO 8601)."),
|
|
78
|
-
subscription_reference: z.string().describe("Subscription reference ID.")
|
|
79
|
-
}).describe("Subscription details for the customer.").optional(),
|
|
80
|
-
custom_fields: z.
|
|
77
|
+
first_payment_attempt: z.string().describe("First payment attempt timestamp (ISO 8601).").nullable(),
|
|
78
|
+
subscription_reference: z.string().describe("Subscription reference ID.").nullable()
|
|
79
|
+
}).describe("Subscription details for the customer.").nullable().optional(),
|
|
80
|
+
custom_fields: z.record(z.string(), z.unknown()).describe("Custom field responses keyed by field name.").nullable().optional(),
|
|
81
81
|
management_url: z.string().describe("URL for managing the subscription in MoonClerk UI.").nullable().optional(),
|
|
82
82
|
payment_method: z.object({
|
|
83
|
-
type: z.string().describe("Payment method type, e.g., 'card'."),
|
|
84
|
-
brand: z.string().describe("Card brand, e.g., 'Visa'."),
|
|
85
|
-
last4: z.string().describe("Last 4 digits of the card."),
|
|
86
|
-
exp_year: z.number().int().describe("Card expiration year."),
|
|
87
|
-
exp_month: z.number().int().describe("Card expiration month.")
|
|
83
|
+
type: z.string().describe("Payment method type, e.g., 'card'.").nullable(),
|
|
84
|
+
brand: z.string().describe("Card brand, e.g., 'Visa'.").nullable(),
|
|
85
|
+
last4: z.string().describe("Last 4 digits of the card.").nullable(),
|
|
86
|
+
exp_year: z.number().int().describe("Card expiration year.").nullable(),
|
|
87
|
+
exp_month: z.number().int().describe("Card expiration month.").nullable()
|
|
88
88
|
}).describe("Payment method details.").nullable().optional(),
|
|
89
|
-
account_balance: z.number().int().describe("Account balance in cents."),
|
|
89
|
+
account_balance: z.number().int().describe("Account balance in cents.").nullable(),
|
|
90
90
|
customer_reference: z.string().describe("Stripe customer ID reference.").nullable().optional()
|
|
91
|
-
}).describe("Customer object representing a MoonClerk customer (Plan in UI).")).describe("List of customer objects.") }).describe("Data from the action execution")
|
|
91
|
+
}).passthrough().describe("Customer object representing a MoonClerk customer (Plan in UI).")).describe("List of customer objects.") }).describe("Data from the action execution")
|
|
92
92
|
});
|
|
93
93
|
//#endregion
|
|
94
94
|
export { moonclerkListCustomers };
|
|
@@ -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.ZodTypeAny = z.object({\n status: z.enum([\"active\", \"canceled\", \"expired\", \"past_due\", \"pending\", \"unpaid\"]).describe(\"Filter by subscription status.\").optional(),\n form_id: z.number().int().describe(\"The associated MoonClerk form ID to filter customers.\").optional(),\n checkout_to: z.string().describe(\"Customers created on or before this date (YYYY-MM-DD).\").optional(),\n checkout_from: z.string().describe(\"Customers created on or after this date (YYYY-MM-DD).\").optional(),\n next_payment_to: z.string().describe(\"Subscriptions due to bill on or before this date (YYYY-MM-DD).\").optional(),\n next_payment_from: z.string().describe(\"Subscriptions due to bill on or after this date (YYYY-MM-DD).\").optional(),\n}).describe(\"Request parameters for listing customers with optional filters.\");\nexport const MoonclerkListCustomersOutput: z.ZodTypeAny = z.object({\n customers: z.array(z.object({\n id: z.number().int().describe(\"Customer ID.\"),\n name: z.string().describe(\"Customer name.\"),\n email: z.string().describe(\"Customer email address.\"),\n form_id: z.number().int().describe(\"Associated form ID.\"),\n checkout: z.object({\n fee: z.number().int().describe(\"Fee amount in cents.\"),\n date: z.string().describe(\"Checkout timestamp (ISO 8601).\"),\n token: z.string().describe(\"Checkout token.\"),\n total: z.number().int().describe(\"Total amount in cents.\"),\n subtotal: z.number().int().describe(\"Subtotal in cents.\"),\n amount_due: z.number().int().describe(\"Amount due in cents.\"),\n coupon_code: z.string().describe(\"Applied coupon code.\").nullable().optional(),\n coupon_amount: z.number().int().describe(\"Coupon amount in cents.\"),\n upfront_amount: z.number().int().describe(\"Upfront amount charged in cents.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Trial period days if trial is applied.\").nullable().optional(),\n}).describe(\"Checkout details for the customer.\"),\n discount: z.object({\n coupon: z.object({\n code: z.string().describe(\"Coupon code.\"),\n currency: z.string().describe(\"Currency for the amount_off, e.g., 'USD'.\").nullable().optional(),\n duration: z.string().describe(\"Duration of the coupon, e.g., 'once'.\"),\n redeem_by: z.string().describe(\"ISO 8601 date when the coupon expires.\").nullable().optional(),\n amount_off: z.number().int().describe(\"Amount off in cents.\").nullable().optional(),\n percent_off: z.number().int().describe(\"Percent off for the coupon.\").nullable().optional(),\n max_redemptions: z.number().int().describe(\"Maximum number of redemptions allowed by the coupon.\").nullable().optional(),\n duration_in_months: z.number().int().describe(\"Number of months the coupon is valid for (if applicable).\").nullable().optional(),\n}).describe(\"Coupon applied to the customer.\"),\n ends_at: z.string().describe(\"Discount end date (ISO 8601).\").nullable().optional(),\n starts_at: z.string().describe(\"Discount start date (ISO 8601).\").nullable().optional(),\n}).describe(\"Discount details including coupon and validity.\").optional(),\n custom_id: z.string().describe(\"Custom ID set via integration.\").nullable().optional(),\n delinquent: z.boolean().describe(\"Whether the customer is delinquent.\"),\n subscription: z.object({\n id: z.number().int().describe(\"Subscription ID.\"),\n plan: z.object({\n id: z.number().int().describe(\"Plan ID.\"),\n amount: z.number().int().describe(\"Amount in cents.\"),\n currency: z.string().describe(\"Currency code, e.g., 'USD'.\"),\n interval: z.string().describe(\"Billing interval, e.g., 'month'.\"),\n interval_count: z.number().int().describe(\"Interval count, e.g., 1 for monthly.\"),\n plan_reference: z.string().describe(\"Plan reference ID.\"),\n amount_description: z.string().describe(\"Description of the amount option.\"),\n}).describe(\"Associated plan details.\"),\n start: z.string().describe(\"Subscription start timestamp (ISO 8601).\"),\n status: z.string().describe(\"Subscription status.\"),\n ended_at: z.string().describe(\"End timestamp if subscription ended.\").nullable().optional(),\n trial_end: z.string().describe(\"Trial end timestamp if applicable.\").nullable().optional(),\n expires_at: z.string().describe(\"Expiration timestamp if set.\").nullable().optional(),\n canceled_at: z.string().describe(\"Cancellation timestamp if applicable.\").nullable().optional(),\n trial_start: z.string().describe(\"Trial start timestamp if applicable.\").nullable().optional(),\n trial_period_days: z.number().int().describe(\"Number of trial days if applicable.\").nullable().optional(),\n current_period_end: z.string().describe(\"End of current period (ISO 8601).\"),\n current_period_start: z.string().describe(\"Start of current period (ISO 8601).\"),\n next_payment_attempt: z.string().describe(\"Next payment attempt timestamp (ISO 8601).\").nullable().optional(),\n first_payment_attempt: z.string().describe(\"First payment attempt timestamp (ISO 8601).\"),\n subscription_reference: z.string().describe(\"Subscription reference ID.\"),\n}).describe(\"Subscription details for the customer.\").optional(),\n custom_fields: z.object({}).describe(\"Custom field responses keyed by field name.\").nullable().optional(),\n management_url: z.string().describe(\"URL for managing the subscription in MoonClerk UI.\").nullable().optional(),\n payment_method: z.object({\n type: z.string().describe(\"Payment method type, e.g., 'card'.\"),\n brand: z.string().describe(\"Card brand, e.g., 'Visa'.\"),\n last4: z.string().describe(\"Last 4 digits of the card.\"),\n exp_year: z.number().int().describe(\"Card expiration year.\"),\n exp_month: z.number().int().describe(\"Card expiration month.\"),\n}).describe(\"Payment method details.\").nullable().optional(),\n account_balance: z.number().int().describe(\"Account balance in cents.\"),\n customer_reference: z.string().describe(\"Stripe customer ID reference.\").nullable().optional(),\n}).describe(\"Customer object representing a MoonClerk customer (Plan in UI).\")).describe(\"List of customer objects.\"),\n}).describe(\"Data from the action execution\");\n\nexport const moonclerkListCustomers = action(\"MOONCLERK_LIST_CUSTOMERS\", {\n slug: \"moonclerk-list-customers\",\n name: \"List Customers\",\n description: \"Tool to list customers (plans) from MoonClerk. Use when you need to retrieve customer data with optional filters. Use after authenticating API credentials.\",\n input: MoonclerkListCustomersInput,\n output: MoonclerkListCustomersOutput,\n});\n"],"mappings":";;AAqFA,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OArFuD,EAAE,OAAO;EAChE,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;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qCAAqC;GAC/E,sBAAsB,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;GAC5G,uBAAuB,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C;GACxF,wBAAwB,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;EAC1E,CAAC,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;EAC7D,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACxG,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC9G,gBAAgB,EAAE,OAAO;GACzB,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC;GAC9D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B;GACtD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B;GACvD,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uBAAuB;GAC3D,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wBAAwB;EAC/D,CAAC,CAAC,CAAC,SAAS,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzD,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2BAA2B;EACtE,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/F,CAAC,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,CAAC,SAAS,2BAA2B,EACpH,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
|
|
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,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