@flexprice/mcp-server 2.1.5 → 2.1.9
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 +1020 -923
- package/bin/mcp-server.js.map +47 -55
- package/bun.lock +49 -41
- package/esm/funcs/subscriptionsQuerySubscriptionLineItems.d.ts +16 -0
- package/esm/funcs/subscriptionsQuerySubscriptionLineItems.d.ts.map +1 -0
- package/esm/funcs/{subscriptionsResumeSubscription.js → subscriptionsQuerySubscriptionLineItems.js} +10 -16
- package/esm/funcs/subscriptionsQuerySubscriptionLineItems.js.map +1 -0
- package/esm/landing-page.d.ts.map +1 -1
- package/esm/landing-page.js +8 -2
- package/esm/landing-page.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/mcp-server/cli/serve/impl.js +1 -1
- package/esm/mcp-server/cli/serve/impl.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +3 -7
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.d.ts +7 -0
- package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.d.ts.map +1 -0
- package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.js +35 -0
- package/esm/mcp-server/tools/subscriptionsQuerySubscriptionLineItems.js.map +1 -0
- package/esm/models/createpricerequest.d.ts +1 -1
- package/esm/models/createpricerequest.d.ts.map +1 -1
- package/esm/models/createpricerequest.js +1 -1
- package/esm/models/createpricerequest.js.map +1 -1
- package/esm/models/createsubscriptionrequest.d.ts +1 -2
- package/esm/models/createsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionrequest.js +1 -2
- package/esm/models/createsubscriptionrequest.js.map +1 -1
- package/esm/models/customerfilter.d.ts +3 -0
- package/esm/models/customerfilter.d.ts.map +1 -1
- package/esm/models/customerfilter.js +1 -0
- package/esm/models/customerfilter.js.map +1 -1
- package/esm/models/executesubscriptionmodifyrequest.d.ts +2 -0
- package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
- package/esm/models/executesubscriptionmodifyrequest.js +3 -0
- package/esm/models/executesubscriptionmodifyrequest.js.map +1 -1
- package/esm/models/groupedinvoicingaction.d.ts +12 -0
- package/esm/models/groupedinvoicingaction.d.ts.map +1 -0
- package/esm/models/groupedinvoicingaction.js +13 -0
- package/esm/models/groupedinvoicingaction.js.map +1 -0
- package/esm/models/invoicebillingreason.d.ts +4 -0
- package/esm/models/invoicebillingreason.d.ts.map +1 -1
- package/esm/models/invoicebillingreason.js +4 -0
- package/esm/models/invoicebillingreason.js.map +1 -1
- package/esm/models/listsubscriptionlineitemsresponse.d.ts +9 -0
- package/esm/models/listsubscriptionlineitemsresponse.d.ts.map +1 -0
- package/esm/models/listsubscriptionlineitemsresponse.js +11 -0
- package/esm/models/listsubscriptionlineitemsresponse.js.map +1 -0
- package/esm/models/planfilter.d.ts +3 -0
- package/esm/models/planfilter.d.ts.map +1 -1
- package/esm/models/planfilter.js +1 -0
- package/esm/models/planfilter.js.map +1 -1
- package/esm/models/priceprice.d.ts +1 -1
- package/esm/models/priceprice.d.ts.map +1 -1
- package/esm/models/priceprice.js +1 -1
- package/esm/models/priceprice.js.map +1 -1
- package/esm/models/priceresponse.d.ts +1 -1
- package/esm/models/priceresponse.d.ts.map +1 -1
- package/esm/models/priceresponse.js +1 -1
- package/esm/models/priceresponse.js.map +1 -1
- package/esm/models/querysubscriptionlineitemsop.d.ts +6 -0
- package/esm/models/querysubscriptionlineitemsop.d.ts.map +1 -0
- package/esm/models/querysubscriptionlineitemsop.js +11 -0
- package/esm/models/querysubscriptionlineitemsop.js.map +1 -0
- package/esm/models/submodifygroupedinvoicingparams.d.ts +9 -0
- package/esm/models/submodifygroupedinvoicingparams.d.ts.map +1 -0
- package/esm/models/submodifygroupedinvoicingparams.js +11 -0
- package/esm/models/submodifygroupedinvoicingparams.js.map +1 -0
- package/esm/models/subscriptionfilter.d.ts +1 -0
- package/esm/models/subscriptionfilter.d.ts.map +1 -1
- package/esm/models/subscriptionfilter.js +1 -0
- package/esm/models/subscriptionfilter.js.map +1 -1
- package/esm/models/subscriptioninheritanceconfig.d.ts +1 -0
- package/esm/models/subscriptioninheritanceconfig.d.ts.map +1 -1
- package/esm/models/subscriptioninheritanceconfig.js +6 -3
- package/esm/models/subscriptioninheritanceconfig.js.map +1 -1
- package/esm/models/subscriptionlineitemfilter.d.ts +39 -0
- package/esm/models/subscriptionlineitemfilter.d.ts.map +1 -0
- package/esm/models/subscriptionlineitemfilter.js +39 -0
- package/esm/models/subscriptionlineitemfilter.js.map +1 -0
- package/esm/models/subscriptionlineitemresponse.d.ts +0 -1
- package/esm/models/subscriptionlineitemresponse.d.ts.map +1 -1
- package/esm/models/subscriptionlineitemresponse.js +0 -1
- package/esm/models/subscriptionlineitemresponse.js.map +1 -1
- package/esm/models/subscriptionmodifytype.d.ts +2 -0
- package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
- package/esm/models/subscriptionmodifytype.js +2 -0
- package/esm/models/subscriptionmodifytype.js.map +1 -1
- package/esm/models/subscriptionpricecreaterequest.d.ts +1 -1
- package/esm/models/subscriptionpricecreaterequest.d.ts.map +1 -1
- package/esm/models/subscriptionpricecreaterequest.js +1 -1
- package/esm/models/subscriptionpricecreaterequest.js.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.d.ts +0 -1
- package/esm/models/subscriptionsubscriptionlineitem.d.ts.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.js +0 -1
- package/esm/models/subscriptionsubscriptionlineitem.js.map +1 -1
- package/esm/models/subscriptiontype.d.ts +4 -0
- package/esm/models/subscriptiontype.d.ts.map +1 -1
- package/esm/models/subscriptiontype.js +4 -0
- package/esm/models/subscriptiontype.js.map +1 -1
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +4 -12
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types/bigint.d.ts.map +1 -1
- package/esm/types/bigint.js +4 -3
- package/esm/types/bigint.js.map +1 -1
- package/manifest.json +5 -13
- package/package.json +1 -1
- package/src/funcs/{subscriptionsListSubscriptionPauses.ts → subscriptionsQuerySubscriptionLineItems.ts} +15 -23
- package/src/landing-page.ts +8 -2
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/cli/serve/impl.ts +1 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -7
- package/src/mcp-server/tools/{subscriptionsListSubscriptionPauses.ts → subscriptionsQuerySubscriptionLineItems.ts} +8 -8
- package/src/models/createpricerequest.ts +2 -2
- package/src/models/createsubscriptionrequest.ts +4 -4
- package/src/models/customerfilter.ts +2 -0
- package/src/models/executesubscriptionmodifyrequest.ts +7 -0
- package/src/models/groupedinvoicingaction.ts +17 -0
- package/src/models/invoicebillingreason.ts +4 -0
- package/src/models/listsubscriptionlineitemsresponse.ts +25 -0
- package/src/models/planfilter.ts +2 -0
- package/src/models/priceprice.ts +3 -3
- package/src/models/priceresponse.ts +3 -3
- package/src/models/querysubscriptionlineitemsop.ts +21 -0
- package/src/models/submodifygroupedinvoicingparams.ts +25 -0
- package/src/models/subscriptionfilter.ts +4 -0
- package/src/models/subscriptioninheritanceconfig.ts +15 -3
- package/src/models/subscriptionlineitemfilter.ts +77 -0
- package/src/models/subscriptionlineitemresponse.ts +0 -2
- package/src/models/subscriptionmodifytype.ts +2 -0
- package/src/models/subscriptionpricecreaterequest.ts +2 -2
- package/src/models/subscriptionsubscriptionlineitem.ts +0 -2
- package/src/models/subscriptiontype.ts +4 -0
- package/src/tool-names.ts +4 -12
- package/src/types/bigint.ts +18 -17
- package/esm/funcs/subscriptionsListSubscriptionPauses.d.ts +0 -16
- package/esm/funcs/subscriptionsListSubscriptionPauses.d.ts.map +0 -1
- package/esm/funcs/subscriptionsListSubscriptionPauses.js +0 -87
- package/esm/funcs/subscriptionsListSubscriptionPauses.js.map +0 -1
- package/esm/funcs/subscriptionsPauseSubscription.d.ts +0 -16
- package/esm/funcs/subscriptionsPauseSubscription.d.ts.map +0 -1
- package/esm/funcs/subscriptionsPauseSubscription.js +0 -88
- package/esm/funcs/subscriptionsPauseSubscription.js.map +0 -1
- package/esm/funcs/subscriptionsResumeSubscription.d.ts +0 -16
- package/esm/funcs/subscriptionsResumeSubscription.d.ts.map +0 -1
- package/esm/funcs/subscriptionsResumeSubscription.js.map +0 -1
- package/esm/mcp-server/tools/subscriptionsListSubscriptionPauses.d.ts +0 -7
- package/esm/mcp-server/tools/subscriptionsListSubscriptionPauses.d.ts.map +0 -1
- package/esm/mcp-server/tools/subscriptionsListSubscriptionPauses.js +0 -35
- package/esm/mcp-server/tools/subscriptionsListSubscriptionPauses.js.map +0 -1
- package/esm/mcp-server/tools/subscriptionsPauseSubscription.d.ts +0 -7
- package/esm/mcp-server/tools/subscriptionsPauseSubscription.d.ts.map +0 -1
- package/esm/mcp-server/tools/subscriptionsPauseSubscription.js +0 -35
- package/esm/mcp-server/tools/subscriptionsPauseSubscription.js.map +0 -1
- package/esm/mcp-server/tools/subscriptionsResumeSubscription.d.ts +0 -7
- package/esm/mcp-server/tools/subscriptionsResumeSubscription.d.ts.map +0 -1
- package/esm/mcp-server/tools/subscriptionsResumeSubscription.js +0 -35
- package/esm/mcp-server/tools/subscriptionsResumeSubscription.js.map +0 -1
- package/esm/models/listsubscriptionpausesop.d.ts +0 -10
- package/esm/models/listsubscriptionpausesop.d.ts.map +0 -1
- package/esm/models/listsubscriptionpausesop.js +0 -14
- package/esm/models/listsubscriptionpausesop.js.map +0 -1
- package/esm/models/listsubscriptionpausesresponse.d.ts +0 -11
- package/esm/models/listsubscriptionpausesresponse.d.ts.map +0 -1
- package/esm/models/listsubscriptionpausesresponse.js +0 -10
- package/esm/models/listsubscriptionpausesresponse.js.map +0 -1
- package/esm/models/pausesubscriptionop.d.ts +0 -12
- package/esm/models/pausesubscriptionop.d.ts.map +0 -1
- package/esm/models/pausesubscriptionop.js +0 -16
- package/esm/models/pausesubscriptionop.js.map +0 -1
- package/esm/models/pausesubscriptionrequest.d.ts +0 -18
- package/esm/models/pausesubscriptionrequest.d.ts.map +0 -1
- package/esm/models/pausesubscriptionrequest.js +0 -15
- package/esm/models/pausesubscriptionrequest.js.map +0 -1
- package/esm/models/resumesubscriptionop.d.ts +0 -12
- package/esm/models/resumesubscriptionop.d.ts.map +0 -1
- package/esm/models/resumesubscriptionop.js +0 -16
- package/esm/models/resumesubscriptionop.js.map +0 -1
- package/esm/models/resumesubscriptionrequest.d.ts +0 -14
- package/esm/models/resumesubscriptionrequest.d.ts.map +0 -1
- package/esm/models/resumesubscriptionrequest.js +0 -11
- package/esm/models/resumesubscriptionrequest.js.map +0 -1
- package/esm/models/subscriptionpauseresponse.d.ts +0 -33
- package/esm/models/subscriptionpauseresponse.d.ts.map +0 -1
- package/esm/models/subscriptionpauseresponse.js +0 -30
- package/esm/models/subscriptionpauseresponse.js.map +0 -1
- package/src/funcs/subscriptionsPauseSubscription.ts +0 -153
- package/src/funcs/subscriptionsResumeSubscription.ts +0 -153
- package/src/mcp-server/tools/subscriptionsPauseSubscription.ts +0 -44
- package/src/mcp-server/tools/subscriptionsResumeSubscription.ts +0 -44
- package/src/models/listsubscriptionpausesop.ts +0 -29
- package/src/models/listsubscriptionpausesresponse.ts +0 -28
- package/src/models/pausesubscriptionop.ts +0 -39
- package/src/models/pausesubscriptionrequest.ts +0 -45
- package/src/models/resumesubscriptionop.ts +0 -39
- package/src/models/resumesubscriptionrequest.ts +0 -27
- package/src/models/subscriptionpauseresponse.ts +0 -74
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigint.d.ts","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,wBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAiBnD;AAED,wBAAgB,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"bigint.d.ts","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,wBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAiBnD;AAED,wBAAgB,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAmBvE;AAED,wBAAgB,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAkBlE;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAqBpE"}
|
package/esm/types/bigint.js
CHANGED
|
@@ -22,7 +22,8 @@ export function bigint() {
|
|
|
22
22
|
]);
|
|
23
23
|
}
|
|
24
24
|
export function bigintOptional() {
|
|
25
|
-
return z
|
|
25
|
+
return z
|
|
26
|
+
.union([
|
|
26
27
|
z.bigint().transform((v) => String(v)),
|
|
27
28
|
z.string().transform((v, ctx) => {
|
|
28
29
|
try {
|
|
@@ -37,9 +38,9 @@ export function bigintOptional() {
|
|
|
37
38
|
}
|
|
38
39
|
}),
|
|
39
40
|
z.number().transform((v) => BigInt(Math.trunc(v))),
|
|
40
|
-
z.undefined(),
|
|
41
41
|
z.null().transform(() => undefined),
|
|
42
|
-
])
|
|
42
|
+
])
|
|
43
|
+
.optional();
|
|
43
44
|
}
|
|
44
45
|
export function bigintNullable() {
|
|
45
46
|
return z.union([
|
package/esm/types/bigint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigint.js","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,UAAU,MAAM;IACpB,OAAO,CAAC,CAAC,KAAK,CAAC;QACb,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;YAC9B,IAAI,CAAC;gBACH,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;YAAC,MAAM,CAAC;gBACP,GAAG,CAAC,QAAQ,CAAC;oBACX,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;oBAC3B,OAAO,EAAE,sBAAsB;iBAChC,CAAC,CAAC;gBACH,OAAO,CAAC,CAAC,KAAK,CAAC;YACjB,CAAC;QACH,CAAC,CAAC;QACF,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC9D,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"bigint.js","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"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"}
|
package/manifest.json
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"sensitive": true
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
"version": "2.1.
|
|
51
|
+
"version": "2.1.9",
|
|
52
52
|
"tools": [
|
|
53
53
|
{
|
|
54
54
|
"name": "update-customer",
|
|
@@ -246,6 +246,10 @@
|
|
|
246
246
|
"name": "remove-subscription-addon",
|
|
247
247
|
"description": "Remove addon from subscription\n\nUse when removing an add-on from a subscription (e.g. downgrade or opt-out)."
|
|
248
248
|
},
|
|
249
|
+
{
|
|
250
|
+
"name": "query-subscription-line-items",
|
|
251
|
+
"description": "Search subscription line items\n\nList subscription line items with a JSON filter (subscription, customer, price, pagination, expand=prices, etc.)."
|
|
252
|
+
},
|
|
249
253
|
{
|
|
250
254
|
"name": "update-subscription-line-item",
|
|
251
255
|
"description": "Update subscription line item\n\nUse when changing a subscription line item (e.g. quantity or price). Implemented by ending the current line and creating a new one for clean billing."
|
|
@@ -310,18 +314,6 @@
|
|
|
310
314
|
"name": "preview-subscription-modify",
|
|
311
315
|
"description": "Preview subscription modification\n\nPreview the impact of a mid-cycle subscription modification without committing changes."
|
|
312
316
|
},
|
|
313
|
-
{
|
|
314
|
-
"name": "pause-subscription",
|
|
315
|
-
"description": "Pause a subscription\n\nUse when temporarily stopping a subscription (e.g. customer hold or seasonal pause). Billing and access pause; resume when ready."
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
"name": "list-subscription-pauses",
|
|
319
|
-
"description": "List all pauses for a subscription\n\nUse when showing pause history for a subscription (e.g. support or audit). Returns all past and future pauses."
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
"name": "resume-subscription",
|
|
323
|
-
"description": "Resume a paused subscription\n\nUse when reactivating a paused subscription (e.g. end of hold). Billing and access resume from the resume date."
|
|
324
|
-
},
|
|
325
317
|
{
|
|
326
318
|
"name": "get-subscription-v2",
|
|
327
319
|
"description": "Get subscription (V2)\n\nUse when you need a subscription with related data (line items, prices, plan). Supports expand for detailed payloads without extra round-trips."
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { FlexpriceCore } from "../core.js";
|
|
6
|
-
import {
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
7
|
import { compactMap } from "../lib/primitives.js";
|
|
8
8
|
import { safeParse } from "../lib/schemas.js";
|
|
9
9
|
import { RequestOptions } from "../lib/sdks.js";
|
|
@@ -19,21 +19,21 @@ import {
|
|
|
19
19
|
} from "../models/errors/httpclienterrors.js";
|
|
20
20
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
21
21
|
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} from "../models/
|
|
22
|
+
SubscriptionLineItemFilter,
|
|
23
|
+
SubscriptionLineItemFilter$zodSchema,
|
|
24
|
+
} from "../models/subscriptionlineitemfilter.js";
|
|
25
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Search subscription line items
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
*
|
|
32
|
+
* List subscription line items with a JSON filter (subscription, customer, price, pagination, expand=prices, etc.).
|
|
33
33
|
*/
|
|
34
|
-
export function
|
|
34
|
+
export function subscriptionsQuerySubscriptionLineItems(
|
|
35
35
|
client$: FlexpriceCore,
|
|
36
|
-
request:
|
|
36
|
+
request: SubscriptionLineItemFilter,
|
|
37
37
|
options?: RequestOptions,
|
|
38
38
|
): APIPromise<
|
|
39
39
|
Result<
|
|
@@ -56,7 +56,7 @@ export function subscriptionsListSubscriptionPauses(
|
|
|
56
56
|
|
|
57
57
|
async function $do(
|
|
58
58
|
client$: FlexpriceCore,
|
|
59
|
-
request:
|
|
59
|
+
request: SubscriptionLineItemFilter,
|
|
60
60
|
options?: RequestOptions,
|
|
61
61
|
): Promise<
|
|
62
62
|
[
|
|
@@ -75,26 +75,18 @@ async function $do(
|
|
|
75
75
|
> {
|
|
76
76
|
const parsed$ = safeParse(
|
|
77
77
|
request,
|
|
78
|
-
(value$) =>
|
|
78
|
+
(value$) => SubscriptionLineItemFilter$zodSchema.parse(value$),
|
|
79
79
|
"Input validation failed",
|
|
80
80
|
);
|
|
81
81
|
if (!parsed$.ok) {
|
|
82
82
|
return [parsed$, { status: "invalid" }];
|
|
83
83
|
}
|
|
84
84
|
const payload$ = parsed$.value;
|
|
85
|
-
const body$ =
|
|
86
|
-
|
|
87
|
-
const pathParams$ = {
|
|
88
|
-
id: encodeSimple("id", payload$.id, {
|
|
89
|
-
explode: false,
|
|
90
|
-
charEncoding: "percent",
|
|
91
|
-
}),
|
|
92
|
-
};
|
|
93
|
-
const path$ = pathToFunc("/subscriptions/{id}/pauses")(
|
|
94
|
-
pathParams$,
|
|
95
|
-
);
|
|
85
|
+
const body$ = encodeJSON("body", payload$, { explode: true });
|
|
86
|
+
const path$ = pathToFunc("/subscriptions/lineitems/search")();
|
|
96
87
|
|
|
97
88
|
const headers$ = new Headers(compactMap({
|
|
89
|
+
"Content-Type": "application/json",
|
|
98
90
|
Accept: "application/json",
|
|
99
91
|
}));
|
|
100
92
|
const securityInput = await extractSecurity(client$._options.security);
|
|
@@ -103,7 +95,7 @@ async function $do(
|
|
|
103
95
|
const context = {
|
|
104
96
|
options: client$._options,
|
|
105
97
|
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
106
|
-
operationID: "
|
|
98
|
+
operationID: "querySubscriptionLineItems",
|
|
107
99
|
oAuth2Scopes: null,
|
|
108
100
|
resolvedSecurity: requestSecurity,
|
|
109
101
|
securitySource: client$._options.security,
|
|
@@ -121,7 +113,7 @@ async function $do(
|
|
|
121
113
|
|
|
122
114
|
const requestRes = client$._createRequest(context, {
|
|
123
115
|
security: requestSecurity,
|
|
124
|
-
method: "
|
|
116
|
+
method: "POST",
|
|
125
117
|
baseURL: options?.serverURL,
|
|
126
118
|
path: path$,
|
|
127
119
|
headers: headers$,
|
package/src/landing-page.ts
CHANGED
|
@@ -18,8 +18,14 @@ export function landingPage(req: Request): Response {
|
|
|
18
18
|
|
|
19
19
|
// express wrapper
|
|
20
20
|
export function landingPageExpress(req: ExpressRequest, res: ExpressResponse) {
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const proto = req.get("x-forwarded-proto")?.split(",")[0]?.trim()
|
|
22
|
+
|| req.protocol;
|
|
23
|
+
const host = req.get("host");
|
|
24
|
+
if (!host) {
|
|
25
|
+
res.status(400).send("Missing Host header");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
res.type("html").send(landingPageHTML(`${proto}://${host}`));
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
export function landingPageHTML(origin: string): string {
|
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.9",
|
|
73
|
+
genVersion: "2.882.0",
|
|
74
74
|
userAgent:
|
|
75
|
-
"speakeasy-sdk/mcp-typescript 2.1.
|
|
75
|
+
"speakeasy-sdk/mcp-typescript 2.1.9 2.882.0 1.0 @flexprice/mcp-server",
|
|
76
76
|
} as const;
|
|
@@ -40,7 +40,7 @@ async function startStreamableHTTP(cliFlags: ServeCommandFlags) {
|
|
|
40
40
|
app.use((req, res, next) => {
|
|
41
41
|
res.header("Access-Control-Allow-Origin", "*");
|
|
42
42
|
res.header("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
|
|
43
|
-
res.header("Access-Control-Allow-Headers", "
|
|
43
|
+
res.header("Access-Control-Allow-Headers", "*");
|
|
44
44
|
if (req.method === "OPTIONS") {
|
|
45
45
|
res.sendStatus(204);
|
|
46
46
|
return;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -80,14 +80,12 @@ import { tool$subscriptionsGetSubscriptionUpcomingGrants } from "./tools/subscri
|
|
|
80
80
|
import { tool$subscriptionsGetSubscriptionUsage } from "./tools/subscriptionsGetSubscriptionUsage.js";
|
|
81
81
|
import { tool$subscriptionsGetSubscriptionV2 } from "./tools/subscriptionsGetSubscriptionV2.js";
|
|
82
82
|
import { tool$subscriptionsListAllSubscriptionSchedules } from "./tools/subscriptionsListAllSubscriptionSchedules.js";
|
|
83
|
-
import { tool$subscriptionsListSubscriptionPauses } from "./tools/subscriptionsListSubscriptionPauses.js";
|
|
84
83
|
import { tool$subscriptionsListSubscriptionSchedules } from "./tools/subscriptionsListSubscriptionSchedules.js";
|
|
85
|
-
import { tool$subscriptionsPauseSubscription } from "./tools/subscriptionsPauseSubscription.js";
|
|
86
84
|
import { tool$subscriptionsPreviewSubscriptionChange } from "./tools/subscriptionsPreviewSubscriptionChange.js";
|
|
87
85
|
import { tool$subscriptionsPreviewSubscriptionModify } from "./tools/subscriptionsPreviewSubscriptionModify.js";
|
|
88
86
|
import { tool$subscriptionsQuerySubscription } from "./tools/subscriptionsQuerySubscription.js";
|
|
87
|
+
import { tool$subscriptionsQuerySubscriptionLineItems } from "./tools/subscriptionsQuerySubscriptionLineItems.js";
|
|
89
88
|
import { tool$subscriptionsRemoveSubscriptionAddon } from "./tools/subscriptionsRemoveSubscriptionAddon.js";
|
|
90
|
-
import { tool$subscriptionsResumeSubscription } from "./tools/subscriptionsResumeSubscription.js";
|
|
91
89
|
import { tool$subscriptionsUpdateSubscription } from "./tools/subscriptionsUpdateSubscription.js";
|
|
92
90
|
import { tool$subscriptionsUpdateSubscriptionLineItem } from "./tools/subscriptionsUpdateSubscriptionLineItem.js";
|
|
93
91
|
|
|
@@ -104,7 +102,7 @@ export function createMCPServer(deps: {
|
|
|
104
102
|
}) {
|
|
105
103
|
const server = new McpServer({
|
|
106
104
|
name: "Flexprice",
|
|
107
|
-
version: "2.1.
|
|
105
|
+
version: "2.1.9",
|
|
108
106
|
});
|
|
109
107
|
|
|
110
108
|
const getClient = deps.getSDK || (() =>
|
|
@@ -198,6 +196,7 @@ export function createMCPServer(deps: {
|
|
|
198
196
|
tool(tool$subscriptionsCreateSubscription);
|
|
199
197
|
tool(tool$subscriptionsAddSubscriptionAddon);
|
|
200
198
|
tool(tool$subscriptionsRemoveSubscriptionAddon);
|
|
199
|
+
tool(tool$subscriptionsQuerySubscriptionLineItems);
|
|
201
200
|
tool(tool$subscriptionsUpdateSubscriptionLineItem);
|
|
202
201
|
tool(tool$subscriptionsDeleteSubscriptionLineItem);
|
|
203
202
|
tool(tool$subscriptionsQuerySubscription);
|
|
@@ -214,9 +213,6 @@ export function createMCPServer(deps: {
|
|
|
214
213
|
tool(tool$subscriptionsCreateSubscriptionLineItem);
|
|
215
214
|
tool(tool$subscriptionsExecuteSubscriptionModify);
|
|
216
215
|
tool(tool$subscriptionsPreviewSubscriptionModify);
|
|
217
|
-
tool(tool$subscriptionsPauseSubscription);
|
|
218
|
-
tool(tool$subscriptionsListSubscriptionPauses);
|
|
219
|
-
tool(tool$subscriptionsResumeSubscription);
|
|
220
216
|
tool(tool$subscriptionsGetSubscriptionV2);
|
|
221
217
|
tool(tool$subscriptionsListAllSubscriptionSchedules);
|
|
222
218
|
tool(tool$subscriptionsGetSubscriptionSchedule);
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { subscriptionsQuerySubscriptionLineItems } from "../../funcs/subscriptionsQuerySubscriptionLineItems.js";
|
|
6
|
+
import { SubscriptionLineItemFilter$zodSchema } from "../../models/subscriptionlineitemfilter.js";
|
|
7
7
|
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
8
|
|
|
9
9
|
const args = {
|
|
10
|
-
request:
|
|
10
|
+
request: SubscriptionLineItemFilter$zodSchema.describe(`Filter`),
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export const tool$
|
|
13
|
+
export const tool$subscriptionsQuerySubscriptionLineItems: ToolDefinition<
|
|
14
14
|
typeof args
|
|
15
15
|
> = {
|
|
16
|
-
name: "
|
|
17
|
-
description: `
|
|
16
|
+
name: "query-subscription-line-items",
|
|
17
|
+
description: `Search subscription line items
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
List subscription line items with a JSON filter (subscription, customer, price, pagination, expand=prices, etc.).`,
|
|
20
20
|
scopes: ["read"],
|
|
21
21
|
annotations: {
|
|
22
22
|
"title": "",
|
|
@@ -27,7 +27,7 @@ Use when showing pause history for a subscription (e.g. support or audit). Retur
|
|
|
27
27
|
},
|
|
28
28
|
args,
|
|
29
29
|
tool: async (client, args, ctx) => {
|
|
30
|
-
const [result] = await
|
|
30
|
+
const [result] = await subscriptionsQuerySubscriptionLineItems(
|
|
31
31
|
client,
|
|
32
32
|
args.request,
|
|
33
33
|
{ fetchOptions: { signal: ctx.signal } },
|
|
@@ -50,7 +50,7 @@ export type CreatePriceRequest = {
|
|
|
50
50
|
tier_mode?: BillingTier | undefined;
|
|
51
51
|
tiers?: Array<CreatePriceTier> | undefined;
|
|
52
52
|
transform_quantity?: PriceTransformQuantity | undefined;
|
|
53
|
-
|
|
53
|
+
trial_period_days?: number | undefined;
|
|
54
54
|
type: PriceType;
|
|
55
55
|
};
|
|
56
56
|
|
|
@@ -83,6 +83,6 @@ export const CreatePriceRequest$zodSchema: z.ZodType<CreatePriceRequest> = z
|
|
|
83
83
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
84
84
|
tiers: z.array(CreatePriceTier$zodSchema).optional(),
|
|
85
85
|
transform_quantity: PriceTransformQuantity$zodSchema.optional(),
|
|
86
|
-
|
|
86
|
+
trial_period_days: z.int().optional(),
|
|
87
87
|
type: PriceType$zodSchema,
|
|
88
88
|
});
|
|
@@ -94,8 +94,7 @@ export type CreateSubscriptionRequest = {
|
|
|
94
94
|
start_date?: string | undefined;
|
|
95
95
|
subscription_status?: SubscriptionStatus | undefined;
|
|
96
96
|
tax_rate_overrides?: Array<TaxRateOverride> | undefined;
|
|
97
|
-
|
|
98
|
-
trial_start?: string | undefined;
|
|
97
|
+
trial_period_days?: number | undefined;
|
|
99
98
|
};
|
|
100
99
|
|
|
101
100
|
export const CreateSubscriptionRequest$zodSchema: z.ZodType<
|
|
@@ -170,6 +169,7 @@ export const CreateSubscriptionRequest$zodSchema: z.ZodType<
|
|
|
170
169
|
tax_rate_overrides: z.array(TaxRateOverride$zodSchema).optional().describe(
|
|
171
170
|
"tax_rate_overrides is the tax rate overrides\tto be applied to the subscription",
|
|
172
171
|
),
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
trial_period_days: z.int().optional().describe(
|
|
173
|
+
"TrialPeriodDays: nil = inherit trial length from plan recurring-fixed prices (must be uniform).\n0 = explicitly no trial (overrides catalog). >0 = override duration in days.",
|
|
174
|
+
),
|
|
175
175
|
});
|
|
@@ -31,6 +31,7 @@ export type CustomerFilter = {
|
|
|
31
31
|
external_ids?: Array<string> | undefined;
|
|
32
32
|
filters?: Array<FilterCondition> | undefined;
|
|
33
33
|
limit?: number | undefined;
|
|
34
|
+
metadata?: { [k: string]: string } | undefined;
|
|
34
35
|
offset?: number | undefined;
|
|
35
36
|
order?: CustomerFilterOrder | undefined;
|
|
36
37
|
sort?: Array<SortCondition> | undefined;
|
|
@@ -47,6 +48,7 @@ export const CustomerFilter$zodSchema: z.ZodType<CustomerFilter> = z.object({
|
|
|
47
48
|
external_ids: z.array(z.string()).optional(),
|
|
48
49
|
filters: z.array(FilterCondition$zodSchema).optional(),
|
|
49
50
|
limit: z.int().optional(),
|
|
51
|
+
metadata: z.record(z.string(), z.string()).optional(),
|
|
50
52
|
offset: z.int().optional(),
|
|
51
53
|
order: CustomerFilterOrder$zodSchema.optional(),
|
|
52
54
|
sort: z.array(SortCondition$zodSchema).optional(),
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
SubModifyGroupedInvoicingParams,
|
|
8
|
+
SubModifyGroupedInvoicingParams$zodSchema,
|
|
9
|
+
} from "./submodifygroupedinvoicingparams.js";
|
|
6
10
|
import {
|
|
7
11
|
SubModifyInheritanceRequest,
|
|
8
12
|
SubModifyInheritanceRequest$zodSchema,
|
|
@@ -17,6 +21,7 @@ import {
|
|
|
17
21
|
} from "./subscriptionmodifytype.js";
|
|
18
22
|
|
|
19
23
|
export type ExecuteSubscriptionModifyRequest = {
|
|
24
|
+
grouped_invoicing_params?: SubModifyGroupedInvoicingParams | undefined;
|
|
20
25
|
inheritance_params?: SubModifyInheritanceRequest | undefined;
|
|
21
26
|
quantity_change_params?: SubModifyQuantityChangeRequest | undefined;
|
|
22
27
|
type: SubscriptionModifyType;
|
|
@@ -25,6 +30,8 @@ export type ExecuteSubscriptionModifyRequest = {
|
|
|
25
30
|
export const ExecuteSubscriptionModifyRequest$zodSchema: z.ZodType<
|
|
26
31
|
ExecuteSubscriptionModifyRequest
|
|
27
32
|
> = z.object({
|
|
33
|
+
grouped_invoicing_params: SubModifyGroupedInvoicingParams$zodSchema
|
|
34
|
+
.optional(),
|
|
28
35
|
inheritance_params: SubModifyInheritanceRequest$zodSchema.optional(),
|
|
29
36
|
quantity_change_params: SubModifyQuantityChangeRequest$zodSchema.optional(),
|
|
30
37
|
type: SubscriptionModifyType$zodSchema,
|
|
@@ -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 GroupedInvoicingAction = {
|
|
9
|
+
Add: "add",
|
|
10
|
+
Remove: "remove",
|
|
11
|
+
} as const;
|
|
12
|
+
export type GroupedInvoicingAction = ClosedEnum<typeof GroupedInvoicingAction>;
|
|
13
|
+
|
|
14
|
+
export const GroupedInvoicingAction$zodSchema = z.enum([
|
|
15
|
+
"add",
|
|
16
|
+
"remove",
|
|
17
|
+
]);
|
|
@@ -9,6 +9,8 @@ export const InvoiceBillingReason = {
|
|
|
9
9
|
SubscriptionCreate: "SUBSCRIPTION_CREATE",
|
|
10
10
|
SubscriptionCycle: "SUBSCRIPTION_CYCLE",
|
|
11
11
|
SubscriptionUpdate: "SUBSCRIPTION_UPDATE",
|
|
12
|
+
SubscriptionTrialEnd: "SUBSCRIPTION_TRIAL_END",
|
|
13
|
+
SubscriptionTrialStart: "SUBSCRIPTION_TRIAL_START",
|
|
12
14
|
Proration: "PRORATION",
|
|
13
15
|
Manual: "MANUAL",
|
|
14
16
|
} as const;
|
|
@@ -18,6 +20,8 @@ export const InvoiceBillingReason$zodSchema = z.enum([
|
|
|
18
20
|
"SUBSCRIPTION_CREATE",
|
|
19
21
|
"SUBSCRIPTION_CYCLE",
|
|
20
22
|
"SUBSCRIPTION_UPDATE",
|
|
23
|
+
"SUBSCRIPTION_TRIAL_END",
|
|
24
|
+
"SUBSCRIPTION_TRIAL_START",
|
|
21
25
|
"PRORATION",
|
|
22
26
|
"MANUAL",
|
|
23
27
|
]);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
PaginationResponse,
|
|
8
|
+
PaginationResponse$zodSchema,
|
|
9
|
+
} from "./paginationresponse.js";
|
|
10
|
+
import {
|
|
11
|
+
SubscriptionLineItemResponse,
|
|
12
|
+
SubscriptionLineItemResponse$zodSchema,
|
|
13
|
+
} from "./subscriptionlineitemresponse.js";
|
|
14
|
+
|
|
15
|
+
export type ListSubscriptionLineItemsResponse = {
|
|
16
|
+
items?: Array<SubscriptionLineItemResponse> | undefined;
|
|
17
|
+
pagination?: PaginationResponse | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const ListSubscriptionLineItemsResponse$zodSchema: z.ZodType<
|
|
21
|
+
ListSubscriptionLineItemsResponse
|
|
22
|
+
> = z.object({
|
|
23
|
+
items: z.array(SubscriptionLineItemResponse$zodSchema).optional(),
|
|
24
|
+
pagination: PaginationResponse$zodSchema.optional(),
|
|
25
|
+
});
|
package/src/models/planfilter.ts
CHANGED
|
@@ -28,6 +28,7 @@ export type PlanFilter = {
|
|
|
28
28
|
filters?: Array<FilterCondition> | undefined;
|
|
29
29
|
limit?: number | undefined;
|
|
30
30
|
lookup_key?: string | undefined;
|
|
31
|
+
metadata?: { [k: string]: string } | undefined;
|
|
31
32
|
offset?: number | undefined;
|
|
32
33
|
order?: PlanFilterOrder | undefined;
|
|
33
34
|
plan_ids?: Array<string> | undefined;
|
|
@@ -44,6 +45,7 @@ export const PlanFilter$zodSchema: z.ZodType<PlanFilter> = z.object({
|
|
|
44
45
|
),
|
|
45
46
|
limit: z.int().optional(),
|
|
46
47
|
lookup_key: z.string().optional(),
|
|
48
|
+
metadata: z.record(z.string(), z.string()).optional(),
|
|
47
49
|
offset: z.int().optional(),
|
|
48
50
|
order: PlanFilterOrder$zodSchema.optional(),
|
|
49
51
|
plan_ids: z.array(z.string()).optional(),
|
package/src/models/priceprice.ts
CHANGED
|
@@ -58,7 +58,7 @@ export type PricePrice = {
|
|
|
58
58
|
tier_mode?: BillingTier | undefined;
|
|
59
59
|
tiers?: Array<PricePriceTier> | undefined;
|
|
60
60
|
transform_quantity?: PriceJSONBTransformQuantity | undefined;
|
|
61
|
-
|
|
61
|
+
trial_period_days?: number | undefined;
|
|
62
62
|
type?: PriceType | undefined;
|
|
63
63
|
updated_at?: string | undefined;
|
|
64
64
|
updated_by?: string | undefined;
|
|
@@ -141,8 +141,8 @@ export const PricePrice$zodSchema: z.ZodType<PricePrice> = z.object({
|
|
|
141
141
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
142
142
|
tiers: z.array(PricePriceTier$zodSchema).optional(),
|
|
143
143
|
transform_quantity: PriceJSONBTransformQuantity$zodSchema.optional(),
|
|
144
|
-
|
|
145
|
-
"
|
|
144
|
+
trial_period_days: z.int().optional().describe(
|
|
145
|
+
"TrialPeriodDays is the number of days for the trial period\nNote: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)",
|
|
146
146
|
),
|
|
147
147
|
type: PriceType$zodSchema.optional(),
|
|
148
148
|
updated_at: z.iso.datetime({ offset: true }).optional(),
|
|
@@ -71,7 +71,7 @@ export type PriceResponse = {
|
|
|
71
71
|
tier_mode?: BillingTier | undefined;
|
|
72
72
|
tiers?: Array<PricePriceTier> | undefined;
|
|
73
73
|
transform_quantity?: PriceJSONBTransformQuantity | undefined;
|
|
74
|
-
|
|
74
|
+
trial_period_days?: number | undefined;
|
|
75
75
|
type?: PriceType | undefined;
|
|
76
76
|
updated_at?: string | undefined;
|
|
77
77
|
updated_by?: string | undefined;
|
|
@@ -159,8 +159,8 @@ export const PriceResponse$zodSchema: z.ZodType<PriceResponse> = z.object({
|
|
|
159
159
|
tier_mode: BillingTier$zodSchema.optional(),
|
|
160
160
|
tiers: z.array(PricePriceTier$zodSchema).optional(),
|
|
161
161
|
transform_quantity: PriceJSONBTransformQuantity$zodSchema.optional(),
|
|
162
|
-
|
|
163
|
-
"
|
|
162
|
+
trial_period_days: z.int().optional().describe(
|
|
163
|
+
"TrialPeriodDays is the number of days for the trial period\nNote: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)",
|
|
164
164
|
),
|
|
165
165
|
type: PriceType$zodSchema.optional(),
|
|
166
166
|
updated_at: z.iso.datetime({ offset: true }).optional(),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ErrorResponse, ErrorResponse$zodSchema } from "./errorresponse.js";
|
|
7
|
+
import {
|
|
8
|
+
ListSubscriptionLineItemsResponse,
|
|
9
|
+
ListSubscriptionLineItemsResponse$zodSchema,
|
|
10
|
+
} from "./listsubscriptionlineitemsresponse.js";
|
|
11
|
+
|
|
12
|
+
export type QuerySubscriptionLineItemsResponse =
|
|
13
|
+
| ListSubscriptionLineItemsResponse
|
|
14
|
+
| ErrorResponse;
|
|
15
|
+
|
|
16
|
+
export const QuerySubscriptionLineItemsResponse$zodSchema: z.ZodType<
|
|
17
|
+
QuerySubscriptionLineItemsResponse
|
|
18
|
+
> = z.union([
|
|
19
|
+
ListSubscriptionLineItemsResponse$zodSchema,
|
|
20
|
+
ErrorResponse$zodSchema,
|
|
21
|
+
]);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
GroupedInvoicingAction,
|
|
8
|
+
GroupedInvoicingAction$zodSchema,
|
|
9
|
+
} from "./groupedinvoicingaction.js";
|
|
10
|
+
|
|
11
|
+
export type SubModifyGroupedInvoicingParams = {
|
|
12
|
+
action: GroupedInvoicingAction;
|
|
13
|
+
child_subscription_ids?: Array<string> | undefined;
|
|
14
|
+
parent_subscription_id?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const SubModifyGroupedInvoicingParams$zodSchema: z.ZodType<
|
|
18
|
+
SubModifyGroupedInvoicingParams
|
|
19
|
+
> = z.object({
|
|
20
|
+
action: GroupedInvoicingAction$zodSchema,
|
|
21
|
+
child_subscription_ids: z.array(z.string()).optional(),
|
|
22
|
+
parent_subscription_id: z.string().optional().describe(
|
|
23
|
+
"ParentSubscriptionID is required for action 'add'.",
|
|
24
|
+
),
|
|
25
|
+
});
|
|
@@ -57,6 +57,7 @@ export type SubscriptionFilter = {
|
|
|
57
57
|
subscription_ids?: Array<string> | undefined;
|
|
58
58
|
subscription_status?: Array<SubscriptionStatus> | undefined;
|
|
59
59
|
subscription_type?: Array<SubscriptionType> | undefined;
|
|
60
|
+
trial_end_due_lte?: string | undefined;
|
|
60
61
|
with_line_items?: boolean | undefined;
|
|
61
62
|
};
|
|
62
63
|
|
|
@@ -105,6 +106,9 @@ export const SubscriptionFilter$zodSchema: z.ZodType<SubscriptionFilter> = z
|
|
|
105
106
|
subscription_type: z.array(SubscriptionType$zodSchema).optional().describe(
|
|
106
107
|
"SubscriptionType filters by subscription type",
|
|
107
108
|
),
|
|
109
|
+
trial_end_due_lte: z.iso.datetime({ offset: true }).optional().describe(
|
|
110
|
+
"TrialEndDueLTE, when set, restricts to subscriptions with trial_end not nil and trial_end <= trial_end_due_lte.\nUse with subscription_status trialing for trial-end cron processing.",
|
|
111
|
+
),
|
|
108
112
|
with_line_items: z.boolean().optional().describe(
|
|
109
113
|
"WithLineItems includes line items in the response",
|
|
110
114
|
),
|
|
@@ -8,12 +8,24 @@ export type SubscriptionInheritanceConfig = {
|
|
|
8
8
|
external_customer_ids_to_inherit_subscription?: Array<string> | undefined;
|
|
9
9
|
invoicing_customer_external_id?: string | undefined;
|
|
10
10
|
parent_subscription_id?: string | undefined;
|
|
11
|
+
subscriptions_ids_for_grouped_invoicing?: Array<string> | undefined;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export const SubscriptionInheritanceConfig$zodSchema: z.ZodType<
|
|
14
15
|
SubscriptionInheritanceConfig
|
|
15
16
|
> = z.object({
|
|
16
|
-
external_customer_ids_to_inherit_subscription: z.array(z.string()).optional()
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
external_customer_ids_to_inherit_subscription: z.array(z.string()).optional()
|
|
18
|
+
.describe(
|
|
19
|
+
"ExternalCustomerIDsToInheritSubscription: child customer external IDs for which\ninherited skeleton subscriptions will be created. Only valid for parent behavior.",
|
|
20
|
+
),
|
|
21
|
+
invoicing_customer_external_id: z.string().optional().describe(
|
|
22
|
+
"InvoicingCustomerExternalID sets a different billing recipient (external ID).\nRequired for delegated; rejected for inherited; optional for others.",
|
|
23
|
+
),
|
|
24
|
+
parent_subscription_id: z.string().optional().describe(
|
|
25
|
+
"ParentSubscriptionID links this subscription to an existing parent.\nRequired for inherited and grouped_invoicing; rejected for standalone, delegated, parent.",
|
|
26
|
+
),
|
|
27
|
+
subscriptions_ids_for_grouped_invoicing: z.array(z.string()).optional()
|
|
28
|
+
.describe(
|
|
29
|
+
"SubscriptionsIDsForGroupedInvoicing: existing standalone subscription IDs to convert to\ngrouped_invoicing under this parent at creation time. Only valid for parent behavior.",
|
|
30
|
+
),
|
|
19
31
|
});
|