@flexprice/mcp-server 2.1.30 → 2.1.31
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/bin/mcp-server.js +808 -548
- package/bin/mcp-server.js.map +47 -45
- package/bun.lock +8 -8
- package/esm/funcs/invoicesCreateInvoice.d.ts +1 -0
- package/esm/funcs/invoicesCreateInvoice.d.ts.map +1 -1
- package/esm/funcs/invoicesCreateInvoice.js +1 -0
- package/esm/funcs/invoicesCreateInvoice.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/mcp-server/tools/invoicesCreateInvoice.d.ts.map +1 -1
- package/esm/mcp-server/tools/invoicesCreateInvoice.js +2 -1
- package/esm/mcp-server/tools/invoicesCreateInvoice.js.map +1 -1
- package/esm/models/checkoutaction.d.ts +2 -0
- package/esm/models/checkoutaction.d.ts.map +1 -1
- package/esm/models/checkoutaction.js +2 -0
- package/esm/models/checkoutaction.js.map +1 -1
- package/esm/models/createinvoicerequest.d.ts +2 -0
- package/esm/models/createinvoicerequest.d.ts.map +1 -1
- package/esm/models/createinvoicerequest.js +2 -0
- package/esm/models/createinvoicerequest.js.map +1 -1
- package/esm/models/createsubscriptionrequest.d.ts +2 -0
- package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionrequest.js +2 -0
- package/esm/models/createsubscriptionrequest.js.map +1 -1
- package/esm/models/event.d.ts +1 -0
- package/esm/models/event.d.ts.map +1 -1
- package/esm/models/event.js +1 -0
- package/esm/models/event.js.map +1 -1
- package/esm/models/geteventbyidresponse.d.ts +1 -0
- package/esm/models/geteventbyidresponse.d.ts.map +1 -1
- package/esm/models/geteventbyidresponse.js +1 -0
- package/esm/models/geteventbyidresponse.js.map +1 -1
- package/esm/models/invoiceresponse.d.ts +4 -0
- package/esm/models/invoiceresponse.d.ts.map +1 -1
- package/esm/models/invoiceresponse.js +4 -0
- package/esm/models/invoiceresponse.js.map +1 -1
- package/esm/models/invoicesourcetype.d.ts +10 -0
- package/esm/models/invoicesourcetype.d.ts.map +1 -0
- package/esm/models/invoicesourcetype.js +11 -0
- package/esm/models/invoicesourcetype.js.map +1 -0
- package/esm/models/lineitemgrouping.d.ts +12 -0
- package/esm/models/lineitemgrouping.d.ts.map +1 -0
- package/esm/models/lineitemgrouping.js +13 -0
- package/esm/models/lineitemgrouping.js.map +1 -0
- package/esm/models/subscriptionresponse.d.ts +2 -0
- package/esm/models/subscriptionresponse.d.ts.map +1 -1
- package/esm/models/subscriptionresponse.js +2 -0
- package/esm/models/subscriptionresponse.js.map +1 -1
- package/esm/models/subscriptionresponsev2.d.ts +2 -0
- package/esm/models/subscriptionresponsev2.d.ts.map +1 -1
- package/esm/models/subscriptionresponsev2.js +2 -0
- package/esm/models/subscriptionresponsev2.js.map +1 -1
- package/esm/models/subscriptionscheduleresponse.d.ts +6 -12
- package/esm/models/subscriptionscheduleresponse.d.ts.map +1 -1
- package/esm/models/subscriptionscheduleresponse.js +2 -5
- package/esm/models/subscriptionscheduleresponse.js.map +1 -1
- package/esm/tool-names.js +1 -1
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/manifest.json +2 -2
- package/package.json +1 -1
- package/src/funcs/invoicesCreateInvoice.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/invoicesCreateInvoice.ts +2 -1
- package/src/models/checkoutaction.ts +2 -0
- package/src/models/createinvoicerequest.ts +3 -0
- package/src/models/createsubscriptionrequest.ts +6 -0
- package/src/models/event.ts +2 -0
- package/src/models/geteventbyidresponse.ts +2 -0
- package/src/models/invoiceresponse.ts +12 -0
- package/src/models/invoicesourcetype.ts +15 -0
- package/src/models/lineitemgrouping.ts +17 -0
- package/src/models/subscriptionresponse.ts +6 -0
- package/src/models/subscriptionresponsev2.ts +6 -0
- package/src/models/subscriptionscheduleresponse.ts +4 -23
- package/src/tool-names.ts +1 -1
package/manifest.json
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"sensitive": true
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
"version": "2.1.
|
|
51
|
+
"version": "2.1.31",
|
|
52
52
|
"tools": [
|
|
53
53
|
{
|
|
54
54
|
"name": "update-customer",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"name": "create-invoice",
|
|
103
|
-
"description": "Create one-off invoice\n\nUse when creating a manual or one-off invoice (e.g. custom charge or non-recurring billing). Invoice is created in draft; finalize when ready."
|
|
103
|
+
"description": "Create one-off invoice\n\nUse when creating a manual or one-off invoice (e.g. custom charge or non-recurring billing). Invoice is created in draft; finalize when ready.\nPass a `checkout` object to gate the invoice behind a hosted payment session: the invoice stays DRAFT with no invoice number, and the response carries `checkout_session.payment_action.url` for the customer to pay. It finalizes only when the payment webhook lands; if the session expires the invoice is voided and archived. Poll `GET /checkout/sessions/{id}` until `terminal` is true. One-off invoices only."
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
"name": "get-invoice-preview",
|
package/package.json
CHANGED
|
@@ -30,6 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Use when creating a manual or one-off invoice (e.g. custom charge or non-recurring billing). Invoice is created in draft; finalize when ready.
|
|
33
|
+
* Pass a `checkout` object to gate the invoice behind a hosted payment session: the invoice stays DRAFT with no invoice number, and the response carries `checkout_session.payment_action.url` for the customer to pay. It finalizes only when the payment webhook lands; if the session expires the invoice is voided and archived. Poll `GET /checkout/sessions/{id}` until `terminal` is true. One-off invoices only.
|
|
33
34
|
*/
|
|
34
35
|
export function invoicesCreateInvoice(
|
|
35
36
|
client$: FlexpriceCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -69,8 +69,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
69
69
|
export const SDK_METADATA = {
|
|
70
70
|
language: "typescript",
|
|
71
71
|
openapiDocVersion: "1.0",
|
|
72
|
-
sdkVersion: "2.1.
|
|
73
|
-
genVersion: "2.
|
|
72
|
+
sdkVersion: "2.1.31",
|
|
73
|
+
genVersion: "2.938.0",
|
|
74
74
|
userAgent:
|
|
75
|
-
"speakeasy-sdk/mcp-typescript 2.1.
|
|
75
|
+
"speakeasy-sdk/mcp-typescript 2.1.31 2.938.0 1.0 @flexprice/mcp-server",
|
|
76
76
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -14,7 +14,8 @@ export const tool$invoicesCreateInvoice: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "create-invoice",
|
|
15
15
|
description: `Create one-off invoice
|
|
16
16
|
|
|
17
|
-
Use when creating a manual or one-off invoice (e.g. custom charge or non-recurring billing). Invoice is created in draft; finalize when ready
|
|
17
|
+
Use when creating a manual or one-off invoice (e.g. custom charge or non-recurring billing). Invoice is created in draft; finalize when ready.
|
|
18
|
+
Pass a \`checkout\` object to gate the invoice behind a hosted payment session: the invoice stays DRAFT with no invoice number, and the response carries \`checkout_session.payment_action.url\` for the customer to pay. It finalizes only when the payment webhook lands; if the session expires the invoice is voided and archived. Poll \`GET /checkout/sessions/{id}\` until \`terminal\` is true. One-off invoices only.`,
|
|
18
19
|
scopes: ["write"],
|
|
19
20
|
annotations: {
|
|
20
21
|
"title": "",
|
|
@@ -10,6 +10,7 @@ export const CheckoutAction = {
|
|
|
10
10
|
ModifySubscription: "modify_subscription",
|
|
11
11
|
WalletTopup: "wallet_topup",
|
|
12
12
|
AddAddon: "add_addon",
|
|
13
|
+
PayInvoice: "pay_invoice",
|
|
13
14
|
} as const;
|
|
14
15
|
export type CheckoutAction = ClosedEnum<typeof CheckoutAction>;
|
|
15
16
|
|
|
@@ -18,4 +19,5 @@ export const CheckoutAction$zodSchema = z.enum([
|
|
|
18
19
|
"modify_subscription",
|
|
19
20
|
"wallet_topup",
|
|
20
21
|
"add_addon",
|
|
22
|
+
"pay_invoice",
|
|
21
23
|
]);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { CheckoutParams, CheckoutParams$zodSchema } from "./checkoutparams.js";
|
|
6
7
|
import {
|
|
7
8
|
CreateInvoiceLineItemRequest,
|
|
8
9
|
CreateInvoiceLineItemRequest$zodSchema,
|
|
@@ -29,6 +30,7 @@ export type CreateInvoiceRequest = {
|
|
|
29
30
|
amount_paid?: string | undefined;
|
|
30
31
|
billing_period?: string | undefined;
|
|
31
32
|
billing_reason?: InvoiceBillingReason | undefined;
|
|
33
|
+
checkout?: CheckoutParams | undefined;
|
|
32
34
|
coupons?: Array<string> | undefined;
|
|
33
35
|
currency: string;
|
|
34
36
|
customer_id: string;
|
|
@@ -68,6 +70,7 @@ export const CreateInvoiceRequest$zodSchema: z.ZodType<CreateInvoiceRequest> = z
|
|
|
68
70
|
"billing_period is the period this invoice covers (e.g., \"monthly\", \"yearly\")",
|
|
69
71
|
),
|
|
70
72
|
billing_reason: InvoiceBillingReason$zodSchema.optional(),
|
|
73
|
+
checkout: CheckoutParams$zodSchema.optional(),
|
|
71
74
|
coupons: z.array(z.string()).optional().describe("coupons"),
|
|
72
75
|
currency: z.string().describe(
|
|
73
76
|
"currency is the three-letter ISO currency code (e.g., USD, EUR) for the invoice",
|
|
@@ -26,6 +26,10 @@ import {
|
|
|
26
26
|
LineItemCommitmentConfig,
|
|
27
27
|
LineItemCommitmentConfig$zodSchema,
|
|
28
28
|
} from "./lineitemcommitmentconfig.js";
|
|
29
|
+
import {
|
|
30
|
+
LineItemGrouping,
|
|
31
|
+
LineItemGrouping$zodSchema,
|
|
32
|
+
} from "./lineitemgrouping.js";
|
|
29
33
|
import {
|
|
30
34
|
OverrideEntitlementRequest,
|
|
31
35
|
OverrideEntitlementRequest$zodSchema,
|
|
@@ -87,6 +91,7 @@ export type CreateSubscriptionRequest = {
|
|
|
87
91
|
inheritance?: SubscriptionInheritanceConfig | undefined;
|
|
88
92
|
line_item_commitments?: { [k: string]: LineItemCommitmentConfig } | undefined;
|
|
89
93
|
line_item_coupons?: { [k: string]: Array<string> } | undefined;
|
|
94
|
+
line_item_grouping?: LineItemGrouping | undefined;
|
|
90
95
|
line_items?: Array<CreateSubscriptionLineItemRequest> | undefined;
|
|
91
96
|
lookup_key?: string | undefined;
|
|
92
97
|
metadata?: { [k: string]: string } | undefined;
|
|
@@ -147,6 +152,7 @@ export const CreateSubscriptionRequest$zodSchema: z.ZodType<
|
|
|
147
152
|
),
|
|
148
153
|
line_item_coupons: z.record(z.string(), z.array(z.string())).optional()
|
|
149
154
|
.describe("Deprecated: use SubscriptionCoupons instead."),
|
|
155
|
+
line_item_grouping: LineItemGrouping$zodSchema.optional(),
|
|
150
156
|
line_items: z.array(CreateSubscriptionLineItemRequest$zodSchema).optional()
|
|
151
157
|
.describe("LineItems are extra (non-plan) line items added at creation."),
|
|
152
158
|
lookup_key: z.string().optional(),
|
package/src/models/event.ts
CHANGED
|
@@ -10,6 +10,7 @@ export type Event = {
|
|
|
10
10
|
event_name?: string | undefined;
|
|
11
11
|
external_customer_id?: string | undefined;
|
|
12
12
|
id?: string | undefined;
|
|
13
|
+
ingested_at?: string | undefined;
|
|
13
14
|
properties?: { [k: string]: any } | undefined;
|
|
14
15
|
source?: string | undefined;
|
|
15
16
|
timestamp?: string | undefined;
|
|
@@ -21,6 +22,7 @@ export const Event$zodSchema: z.ZodType<Event> = z.object({
|
|
|
21
22
|
event_name: z.string().optional(),
|
|
22
23
|
external_customer_id: z.string().optional(),
|
|
23
24
|
id: z.string().optional(),
|
|
25
|
+
ingested_at: z.iso.datetime({ offset: true }).optional(),
|
|
24
26
|
properties: z.record(z.string(), z.any()).optional(),
|
|
25
27
|
source: z.string().optional(),
|
|
26
28
|
timestamp: z.string().optional(),
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
export type GetEventByIDResponse = {
|
|
18
18
|
debug_tracker?: DebugTracker | undefined;
|
|
19
19
|
event?: Event | undefined;
|
|
20
|
+
events?: Array<Event> | undefined;
|
|
20
21
|
processed_events?: Array<FeatureUsageInfo> | undefined;
|
|
21
22
|
status?: EventProcessingStatusType | undefined;
|
|
22
23
|
};
|
|
@@ -25,6 +26,7 @@ export const GetEventByIDResponse$zodSchema: z.ZodType<GetEventByIDResponse> = z
|
|
|
25
26
|
.object({
|
|
26
27
|
debug_tracker: DebugTracker$zodSchema.optional(),
|
|
27
28
|
event: Event$zodSchema.optional(),
|
|
29
|
+
events: z.array(Event$zodSchema).optional(),
|
|
28
30
|
processed_events: z.array(FeatureUsageInfo$zodSchema).optional(),
|
|
29
31
|
status: EventProcessingStatusType$zodSchema.optional(),
|
|
30
32
|
});
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
CheckoutSessionResponse,
|
|
8
|
+
CheckoutSessionResponse$zodSchema,
|
|
9
|
+
} from "./checkoutsessionresponse.js";
|
|
6
10
|
import {
|
|
7
11
|
CouponApplicationResponse,
|
|
8
12
|
CouponApplicationResponse$zodSchema,
|
|
@@ -16,6 +20,10 @@ import {
|
|
|
16
20
|
InvoiceLineItemResponse,
|
|
17
21
|
InvoiceLineItemResponse$zodSchema,
|
|
18
22
|
} from "./invoicelineitemresponse.js";
|
|
23
|
+
import {
|
|
24
|
+
InvoiceSourceType,
|
|
25
|
+
InvoiceSourceType$zodSchema,
|
|
26
|
+
} from "./invoicesourcetype.js";
|
|
19
27
|
import { InvoiceStatus, InvoiceStatus$zodSchema } from "./invoicestatus.js";
|
|
20
28
|
import { InvoiceType, InvoiceType$zodSchema } from "./invoicetype.js";
|
|
21
29
|
import { PaymentStatus, PaymentStatus$zodSchema } from "./paymentstatus.js";
|
|
@@ -42,6 +50,7 @@ export type InvoiceResponse = {
|
|
|
42
50
|
billing_period?: string | undefined;
|
|
43
51
|
billing_reason?: string | undefined;
|
|
44
52
|
billing_sequence?: number | undefined;
|
|
53
|
+
checkout_session?: CheckoutSessionResponse | undefined;
|
|
45
54
|
coupon_applications?: Array<CouponApplicationResponse> | undefined;
|
|
46
55
|
created_at?: string | undefined;
|
|
47
56
|
created_by?: string | undefined;
|
|
@@ -71,6 +80,7 @@ export type InvoiceResponse = {
|
|
|
71
80
|
period_start?: string | undefined;
|
|
72
81
|
recalculated_invoice_id?: string | undefined;
|
|
73
82
|
refunded_amount?: string | undefined;
|
|
83
|
+
source_type?: InvoiceSourceType | undefined;
|
|
74
84
|
status?: Status | undefined;
|
|
75
85
|
subscription?: SubscriptionResponse | undefined;
|
|
76
86
|
subscription_customer_id?: string | undefined;
|
|
@@ -112,6 +122,7 @@ export const InvoiceResponse$zodSchema: z.ZodType<InvoiceResponse> = z.object({
|
|
|
112
122
|
billing_sequence: z.int().optional().describe(
|
|
113
123
|
"billing_sequence is the sequential number indicating the billing cycle for subscription invoices",
|
|
114
124
|
),
|
|
125
|
+
checkout_session: CheckoutSessionResponse$zodSchema.optional(),
|
|
115
126
|
coupon_applications: z.array(CouponApplicationResponse$zodSchema).optional()
|
|
116
127
|
.describe(
|
|
117
128
|
"coupon_applications contains the coupon applications associated with this invoice (overrides embedded field)",
|
|
@@ -186,6 +197,7 @@ export const InvoiceResponse$zodSchema: z.ZodType<InvoiceResponse> = z.object({
|
|
|
186
197
|
refunded_amount: z.string().optional().describe(
|
|
187
198
|
"refunded_amount is the total sum of credit notes of type \"refund\".\nThese are actual refunds issued to the customer.",
|
|
188
199
|
),
|
|
200
|
+
source_type: InvoiceSourceType$zodSchema.optional(),
|
|
189
201
|
status: Status$zodSchema.optional(),
|
|
190
202
|
subscription: z.lazy(() => SubscriptionResponse$zodSchema).optional(),
|
|
191
203
|
subscription_customer_id: z.string().optional().describe(
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const InvoiceSourceType = {
|
|
9
|
+
Checkout: "checkout",
|
|
10
|
+
} as const;
|
|
11
|
+
export type InvoiceSourceType = ClosedEnum<typeof InvoiceSourceType>;
|
|
12
|
+
|
|
13
|
+
export const InvoiceSourceType$zodSchema = z.enum([
|
|
14
|
+
"checkout",
|
|
15
|
+
]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const LineItemGrouping = {
|
|
9
|
+
PerChargePeriod: "per_charge_period",
|
|
10
|
+
PerBillingPeriod: "per_billing_period",
|
|
11
|
+
} as const;
|
|
12
|
+
export type LineItemGrouping = ClosedEnum<typeof LineItemGrouping>;
|
|
13
|
+
|
|
14
|
+
export const LineItemGrouping$zodSchema = z.enum([
|
|
15
|
+
"per_charge_period",
|
|
16
|
+
"per_billing_period",
|
|
17
|
+
]);
|
|
@@ -30,6 +30,10 @@ import {
|
|
|
30
30
|
InvoiceResponse,
|
|
31
31
|
InvoiceResponse$zodSchema,
|
|
32
32
|
} from "./invoiceresponse.js";
|
|
33
|
+
import {
|
|
34
|
+
LineItemGrouping,
|
|
35
|
+
LineItemGrouping$zodSchema,
|
|
36
|
+
} from "./lineitemgrouping.js";
|
|
33
37
|
import { PauseStatus, PauseStatus$zodSchema } from "./pausestatus.js";
|
|
34
38
|
import { PaymentTerms, PaymentTerms$zodSchema } from "./paymentterms.js";
|
|
35
39
|
import { PlanResponse, PlanResponse$zodSchema } from "./planresponse.js";
|
|
@@ -91,6 +95,7 @@ export type SubscriptionResponse = {
|
|
|
91
95
|
id?: string | undefined;
|
|
92
96
|
invoicing_customer_id?: string | undefined;
|
|
93
97
|
latest_invoice?: InvoiceResponse | undefined;
|
|
98
|
+
line_item_grouping?: LineItemGrouping | undefined;
|
|
94
99
|
line_items?: Array<SubscriptionSubscriptionLineItem> | undefined;
|
|
95
100
|
lookup_key?: string | undefined;
|
|
96
101
|
metadata?: { [k: string]: string } | undefined;
|
|
@@ -196,6 +201,7 @@ export const SubscriptionResponse$zodSchema: z.ZodType<SubscriptionResponse> = z
|
|
|
196
201
|
"InvoicingCustomerID is the customer ID to use for invoicing\nThis can differ from the subscription customer (e.g., parent company invoicing for child company)",
|
|
197
202
|
),
|
|
198
203
|
latest_invoice: z.lazy(() => InvoiceResponse$zodSchema).optional(),
|
|
204
|
+
line_item_grouping: LineItemGrouping$zodSchema.optional(),
|
|
199
205
|
line_items: z.array(SubscriptionSubscriptionLineItem$zodSchema).optional(),
|
|
200
206
|
lookup_key: z.string().optional().describe(
|
|
201
207
|
"LookupKey is the key used to lookup the subscription in our system",
|
|
@@ -18,6 +18,10 @@ import {
|
|
|
18
18
|
CustomerResponse,
|
|
19
19
|
CustomerResponse$zodSchema,
|
|
20
20
|
} from "./customerresponse.js";
|
|
21
|
+
import {
|
|
22
|
+
LineItemGrouping,
|
|
23
|
+
LineItemGrouping$zodSchema,
|
|
24
|
+
} from "./lineitemgrouping.js";
|
|
21
25
|
import { PauseStatus, PauseStatus$zodSchema } from "./pausestatus.js";
|
|
22
26
|
import { PaymentTerms, PaymentTerms$zodSchema } from "./paymentterms.js";
|
|
23
27
|
import { PlanResponse, PlanResponse$zodSchema } from "./planresponse.js";
|
|
@@ -76,6 +80,7 @@ export type SubscriptionResponseV2 = {
|
|
|
76
80
|
gateway_payment_method_id?: string | undefined;
|
|
77
81
|
id?: string | undefined;
|
|
78
82
|
invoicing_customer_id?: string | undefined;
|
|
83
|
+
line_item_grouping?: LineItemGrouping | undefined;
|
|
79
84
|
line_items?: Array<SubscriptionLineItemResponse> | undefined;
|
|
80
85
|
lookup_key?: string | undefined;
|
|
81
86
|
metadata?: { [k: string]: string } | undefined;
|
|
@@ -178,6 +183,7 @@ export const SubscriptionResponseV2$zodSchema: z.ZodType<
|
|
|
178
183
|
invoicing_customer_id: z.string().optional().describe(
|
|
179
184
|
"InvoicingCustomerID is the customer ID to use for invoicing\nThis can differ from the subscription customer (e.g., parent company invoicing for child company)",
|
|
180
185
|
),
|
|
186
|
+
line_item_grouping: LineItemGrouping$zodSchema.optional(),
|
|
181
187
|
line_items: z.array(SubscriptionLineItemResponse$zodSchema).optional()
|
|
182
188
|
.describe(
|
|
183
189
|
"LineItems is expanded only if \"subscription_line_items\" is in expand parameter\nEach line item can optionally include expanded price data",
|
|
@@ -9,37 +9,18 @@ import {
|
|
|
9
9
|
SubscriptionScheduleChangeType$zodSchema,
|
|
10
10
|
} from "./subscriptionschedulechangetype.js";
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* configuration contains type-specific configuration (e.g., target_plan_id for plan changes)
|
|
14
|
-
*/
|
|
15
|
-
export type Configuration = {};
|
|
16
|
-
|
|
17
|
-
export const Configuration$zodSchema: z.ZodType<Configuration> = z.object({})
|
|
18
|
-
.describe(
|
|
19
|
-
"configuration contains type-specific configuration (e.g., target_plan_id for plan changes)",
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* execution_result contains type-specific execution result
|
|
24
|
-
*/
|
|
25
|
-
export type ExecutionResult = {};
|
|
26
|
-
|
|
27
|
-
export const ExecutionResult$zodSchema: z.ZodType<ExecutionResult> = z.object(
|
|
28
|
-
{},
|
|
29
|
-
).describe("execution_result contains type-specific execution result");
|
|
30
|
-
|
|
31
12
|
/**
|
|
32
13
|
* Full details of a subscription schedule
|
|
33
14
|
*/
|
|
34
15
|
export type SubscriptionScheduleResponse = {
|
|
35
16
|
can_be_cancelled?: boolean | undefined;
|
|
36
17
|
cancelled_at?: string | undefined;
|
|
37
|
-
configuration?:
|
|
18
|
+
configuration?: { [k: string]: any } | undefined;
|
|
38
19
|
created_at?: string | undefined;
|
|
39
20
|
days_until_execution?: number | undefined;
|
|
40
21
|
error_message?: string | undefined;
|
|
41
22
|
executed_at?: string | undefined;
|
|
42
|
-
execution_result?:
|
|
23
|
+
execution_result?: { [k: string]: any } | undefined;
|
|
43
24
|
id?: string | undefined;
|
|
44
25
|
metadata?: { [k: string]: string } | undefined;
|
|
45
26
|
schedule_type?: SubscriptionScheduleChangeType | undefined;
|
|
@@ -58,7 +39,7 @@ export const SubscriptionScheduleResponse$zodSchema: z.ZodType<
|
|
|
58
39
|
cancelled_at: z.iso.datetime({ offset: true }).optional().describe(
|
|
59
40
|
"cancelled_at is when the schedule was cancelled",
|
|
60
41
|
),
|
|
61
|
-
configuration: z.
|
|
42
|
+
configuration: z.record(z.string(), z.any()).optional().describe(
|
|
62
43
|
"configuration contains type-specific configuration (e.g., target_plan_id for plan changes)",
|
|
63
44
|
),
|
|
64
45
|
created_at: z.iso.datetime({ offset: true }).optional().describe(
|
|
@@ -73,7 +54,7 @@ export const SubscriptionScheduleResponse$zodSchema: z.ZodType<
|
|
|
73
54
|
executed_at: z.iso.datetime({ offset: true }).optional().describe(
|
|
74
55
|
"executed_at is when the schedule was executed",
|
|
75
56
|
),
|
|
76
|
-
execution_result: z.
|
|
57
|
+
execution_result: z.record(z.string(), z.any()).optional().describe(
|
|
77
58
|
"execution_result contains type-specific execution result",
|
|
78
59
|
),
|
|
79
60
|
id: z.string().optional().describe("id of the schedule"),
|
package/src/tool-names.ts
CHANGED
|
@@ -50,7 +50,7 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"name": "create-invoice",
|
|
53
|
-
"description": "Create one-off invoice\n\nUse when creating a manual or one-off invoice (e.g. custom charge or non-recurring billing). Invoice is created in draft; finalize when ready."
|
|
53
|
+
"description": "Create one-off invoice\n\nUse when creating a manual or one-off invoice (e.g. custom charge or non-recurring billing). Invoice is created in draft; finalize when ready.\nPass a `checkout` object to gate the invoice behind a hosted payment session: the invoice stays DRAFT with no invoice number, and the response carries `checkout_session.payment_action.url` for the customer to pay. It finalizes only when the payment webhook lands; if the session expires the invoice is voided and archived. Poll `GET /checkout/sessions/{id}` until `terminal` is true. One-off invoices only."
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"name": "get-invoice-preview",
|