@flexprice/mcp-server 2.1.11 → 2.1.18
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 +604 -213
- package/bin/mcp-server.js.map +66 -53
- package/bun.lock +25 -23
- package/esm/funcs/subscriptionsExecuteSubscriptionModify.d.ts +1 -1
- package/esm/funcs/subscriptionsExecuteSubscriptionModify.js +1 -1
- package/esm/funcs/subscriptionsPreviewSubscriptionModify.d.ts +1 -1
- package/esm/funcs/subscriptionsPreviewSubscriptionModify.js +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.js +1 -1
- package/esm/lib/encodings.js.map +1 -1
- package/esm/lib/primitives.d.ts +1 -0
- package/esm/lib/primitives.d.ts.map +1 -1
- package/esm/lib/primitives.js +17 -0
- package/esm/lib/primitives.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js +1 -1
- package/esm/mcp-server/tools/subscriptionsExecuteSubscriptionModify.js.map +1 -1
- package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js +1 -1
- package/esm/mcp-server/tools/subscriptionsPreviewSubscriptionModify.js.map +1 -1
- package/esm/models/attributedtocustomerresult.d.ts +11 -0
- package/esm/models/attributedtocustomerresult.d.ts.map +1 -0
- package/esm/models/attributedtocustomerresult.js +13 -0
- package/esm/models/attributedtocustomerresult.js.map +1 -0
- package/esm/models/bucket.d.ts +7 -0
- package/esm/models/bucket.d.ts.map +1 -0
- package/esm/models/bucket.js +9 -0
- package/esm/models/bucket.js.map +1 -0
- package/esm/models/bucketsummary.d.ts +18 -0
- package/esm/models/bucketsummary.d.ts.map +1 -0
- package/esm/models/bucketsummary.js +20 -0
- package/esm/models/bucketsummary.js.map +1 -0
- package/esm/models/cancelsubscriptionrequest.d.ts.map +1 -1
- package/esm/models/cancelsubscriptionrequest.js +1 -1
- package/esm/models/cancelsubscriptionrequest.js.map +1 -1
- package/esm/models/changedsubscription.d.ts +2 -0
- package/esm/models/changedsubscription.d.ts.map +1 -1
- package/esm/models/changedsubscription.js +2 -0
- package/esm/models/changedsubscription.js.map +1 -1
- package/esm/models/commitmentbucketrequest.d.ts +16 -0
- package/esm/models/commitmentbucketrequest.d.ts.map +1 -0
- package/esm/models/commitmentbucketrequest.js +18 -0
- package/esm/models/commitmentbucketrequest.js.map +1 -0
- package/esm/models/coupon.d.ts +1 -0
- package/esm/models/coupon.d.ts.map +1 -1
- package/esm/models/coupon.js +1 -0
- package/esm/models/coupon.js.map +1 -1
- package/esm/models/createinvoicelineitemrequest.d.ts +3 -0
- package/esm/models/createinvoicelineitemrequest.d.ts.map +1 -1
- package/esm/models/createinvoicelineitemrequest.js +3 -0
- package/esm/models/createinvoicelineitemrequest.js.map +1 -1
- package/esm/models/createsubscriptionlineitemrequest.d.ts +2 -0
- package/esm/models/createsubscriptionlineitemrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionlineitemrequest.js +3 -0
- package/esm/models/createsubscriptionlineitemrequest.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 +6 -2
- package/esm/models/createsubscriptionrequest.js.map +1 -1
- package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
- package/esm/models/debugtracker.d.ts +2 -0
- package/esm/models/debugtracker.d.ts.map +1 -1
- package/esm/models/debugtracker.js +2 -0
- package/esm/models/debugtracker.js.map +1 -1
- package/esm/models/debugtrackerstatus.d.ts +4 -0
- package/esm/models/debugtrackerstatus.d.ts.map +1 -1
- package/esm/models/debugtrackerstatus.js +4 -0
- package/esm/models/debugtrackerstatus.js.map +1 -1
- package/esm/models/entityintegrationmappingresponse.d.ts +3 -0
- package/esm/models/entityintegrationmappingresponse.d.ts.map +1 -1
- package/esm/models/entityintegrationmappingresponse.js +1 -0
- package/esm/models/entityintegrationmappingresponse.js.map +1 -1
- package/esm/models/eventprocessingstatustype.d.ts +1 -1
- package/esm/models/executesubscriptionmodifyrequest.d.ts +6 -0
- package/esm/models/executesubscriptionmodifyrequest.d.ts.map +1 -1
- package/esm/models/executesubscriptionmodifyrequest.js +6 -0
- package/esm/models/executesubscriptionmodifyrequest.js.map +1 -1
- package/esm/models/failurepointtype.d.ts +2 -0
- package/esm/models/failurepointtype.d.ts.map +1 -1
- package/esm/models/failurepointtype.js +2 -0
- package/esm/models/failurepointtype.js.map +1 -1
- package/esm/models/getusageanalyticsrequest.d.ts +1 -0
- package/esm/models/getusageanalyticsrequest.d.ts.map +1 -1
- package/esm/models/getusageanalyticsrequest.js +1 -0
- package/esm/models/getusageanalyticsrequest.js.map +1 -1
- package/esm/models/inheritanceaction.d.ts +12 -0
- package/esm/models/inheritanceaction.d.ts.map +1 -0
- package/esm/models/inheritanceaction.js +13 -0
- package/esm/models/inheritanceaction.js.map +1 -0
- package/esm/models/invoicebillingreason.d.ts +2 -0
- package/esm/models/invoicebillingreason.d.ts.map +1 -1
- package/esm/models/invoicebillingreason.js +2 -0
- package/esm/models/invoicebillingreason.js.map +1 -1
- package/esm/models/invoicefilter.d.ts +3 -0
- package/esm/models/invoicefilter.d.ts.map +1 -1
- package/esm/models/invoicefilter.js +3 -0
- package/esm/models/invoicefilter.js.map +1 -1
- package/esm/models/invoicelineitemresponse.d.ts +2 -0
- package/esm/models/invoicelineitemresponse.d.ts.map +1 -1
- package/esm/models/invoicelineitemresponse.js +2 -0
- package/esm/models/invoicelineitemresponse.js.map +1 -1
- package/esm/models/lineitemcommitmentconfig.d.ts +2 -0
- package/esm/models/lineitemcommitmentconfig.d.ts.map +1 -1
- package/esm/models/lineitemcommitmentconfig.js +3 -0
- package/esm/models/lineitemcommitmentconfig.js.map +1 -1
- package/esm/models/meterusageattribution.d.ts +8 -0
- package/esm/models/meterusageattribution.d.ts.map +1 -0
- package/esm/models/meterusageattribution.js +10 -0
- package/esm/models/meterusageattribution.js.map +1 -0
- package/esm/models/pricefilter.d.ts +2 -0
- package/esm/models/pricefilter.d.ts.map +1 -1
- package/esm/models/pricefilter.js +2 -0
- package/esm/models/pricefilter.js.map +1 -1
- package/esm/models/priceprice.d.ts +1 -0
- package/esm/models/priceprice.d.ts.map +1 -1
- package/esm/models/priceprice.js +1 -0
- package/esm/models/priceprice.js.map +1 -1
- package/esm/models/priceresponse.d.ts +1 -0
- package/esm/models/priceresponse.d.ts.map +1 -1
- package/esm/models/priceresponse.js +1 -0
- package/esm/models/priceresponse.js.map +1 -1
- package/esm/models/submodifycouponaction.d.ts +12 -0
- package/esm/models/submodifycouponaction.d.ts.map +1 -0
- package/esm/models/submodifycouponaction.js +13 -0
- package/esm/models/submodifycouponaction.js.map +1 -0
- package/esm/models/submodifycouponparams.d.ts +14 -0
- package/esm/models/submodifycouponparams.d.ts.map +1 -0
- package/esm/models/submodifycouponparams.js +16 -0
- package/esm/models/submodifycouponparams.js.map +1 -0
- package/esm/models/submodifyinheritancerequest.d.ts +3 -0
- package/esm/models/submodifyinheritancerequest.d.ts.map +1 -1
- package/esm/models/submodifyinheritancerequest.js +5 -1
- package/esm/models/submodifyinheritancerequest.js.map +1 -1
- package/esm/models/submodifytaxaction.d.ts +12 -0
- package/esm/models/submodifytaxaction.d.ts.map +1 -0
- package/esm/models/submodifytaxaction.js +13 -0
- package/esm/models/submodifytaxaction.js.map +1 -0
- package/esm/models/submodifytaxparams.d.ts +10 -0
- package/esm/models/submodifytaxparams.d.ts.map +1 -0
- package/esm/models/submodifytaxparams.js +13 -0
- package/esm/models/submodifytaxparams.js.map +1 -0
- package/esm/models/submodifytrialendrequest.d.ts +8 -0
- package/esm/models/submodifytrialendrequest.d.ts.map +1 -0
- package/esm/models/submodifytrialendrequest.js +10 -0
- package/esm/models/submodifytrialendrequest.js.map +1 -0
- package/esm/models/subscriptioncouponinput.d.ts +9 -0
- package/esm/models/subscriptioncouponinput.d.ts.map +1 -0
- package/esm/models/subscriptioncouponinput.js +11 -0
- package/esm/models/subscriptioncouponinput.js.map +1 -0
- package/esm/models/subscriptionlineitemresponse.d.ts +2 -0
- package/esm/models/subscriptionlineitemresponse.d.ts.map +1 -1
- package/esm/models/subscriptionlineitemresponse.js +2 -0
- package/esm/models/subscriptionlineitemresponse.js.map +1 -1
- package/esm/models/subscriptionmodifytype.d.ts +6 -0
- package/esm/models/subscriptionmodifytype.d.ts.map +1 -1
- package/esm/models/subscriptionmodifytype.js +6 -0
- package/esm/models/subscriptionmodifytype.js.map +1 -1
- package/esm/models/subscriptionphasecreaterequest.d.ts +2 -0
- package/esm/models/subscriptionphasecreaterequest.d.ts.map +1 -1
- package/esm/models/subscriptionphasecreaterequest.js +5 -2
- package/esm/models/subscriptionphasecreaterequest.js.map +1 -1
- package/esm/models/subscriptionresponse.d.ts +1 -0
- package/esm/models/subscriptionresponse.d.ts.map +1 -1
- package/esm/models/subscriptionresponse.js +1 -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/subscriptionsubscriptionlineitem.d.ts +2 -0
- package/esm/models/subscriptionsubscriptionlineitem.d.ts.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.js +2 -0
- package/esm/models/subscriptionsubscriptionlineitem.js.map +1 -1
- package/esm/models/timeofdaybucket.d.ts +15 -0
- package/esm/models/timeofdaybucket.d.ts.map +1 -0
- package/esm/models/timeofdaybucket.js +17 -0
- package/esm/models/timeofdaybucket.js.map +1 -0
- package/esm/models/trialendaction.d.ts +12 -0
- package/esm/models/trialendaction.d.ts.map +1 -0
- package/esm/models/trialendaction.js +13 -0
- package/esm/models/trialendaction.js.map +1 -0
- package/esm/models/updatesubscriptionlineitemrequest.d.ts +2 -0
- package/esm/models/updatesubscriptionlineitemrequest.d.ts.map +1 -1
- package/esm/models/updatesubscriptionlineitemrequest.js +3 -0
- package/esm/models/updatesubscriptionlineitemrequest.js.map +1 -1
- package/esm/models/usageanalyticitem.d.ts +2 -0
- package/esm/models/usageanalyticitem.d.ts.map +1 -1
- package/esm/models/usageanalyticitem.js +2 -0
- package/esm/models/usageanalyticitem.js.map +1 -1
- package/esm/models/usageanalyticpoint.d.ts +2 -0
- package/esm/models/usageanalyticpoint.d.ts.map +1 -1
- package/esm/models/usageanalyticpoint.js +2 -0
- package/esm/models/usageanalyticpoint.js.map +1 -1
- package/esm/models/userresponse.d.ts +4 -0
- package/esm/models/userresponse.d.ts.map +1 -1
- package/esm/models/userresponse.js +2 -0
- package/esm/models/userresponse.js.map +1 -1
- package/esm/models/windowsize.d.ts +2 -2
- package/esm/models/windowsize.js +2 -2
- package/esm/models/windowsize.js.map +1 -1
- package/esm/tool-names.js +2 -2
- package/esm/tool-names.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types/async.d.ts.map +1 -1
- package/esm/types/async.js +6 -6
- package/esm/types/async.js.map +1 -1
- package/manifest.json +3 -3
- package/package.json +1 -1
- package/src/funcs/subscriptionsExecuteSubscriptionModify.ts +1 -1
- package/src/funcs/subscriptionsPreviewSubscriptionModify.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +1 -1
- package/src/lib/primitives.ts +16 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/subscriptionsExecuteSubscriptionModify.ts +1 -1
- package/src/mcp-server/tools/subscriptionsPreviewSubscriptionModify.ts +1 -1
- package/src/models/attributedtocustomerresult.ts +28 -0
- package/src/models/bucket.ts +12 -0
- package/src/models/bucketsummary.ts +40 -0
- package/src/models/cancelsubscriptionrequest.ts +3 -1
- package/src/models/changedsubscription.ts +4 -0
- package/src/models/commitmentbucketrequest.ts +35 -0
- package/src/models/coupon.ts +2 -0
- package/src/models/createinvoicelineitemrequest.ts +12 -0
- package/src/models/createsubscriptionlineitemrequest.ts +7 -0
- package/src/models/createsubscriptionrequest.ts +14 -2
- package/src/models/debugtracker.ts +6 -0
- package/src/models/debugtrackerstatus.ts +4 -0
- package/src/models/entityintegrationmappingresponse.ts +2 -0
- package/src/models/executesubscriptionmodifyrequest.ts +18 -0
- package/src/models/failurepointtype.ts +2 -0
- package/src/models/getusageanalyticsrequest.ts +4 -0
- package/src/models/inheritanceaction.ts +17 -0
- package/src/models/invoicebillingreason.ts +2 -0
- package/src/models/invoicefilter.ts +10 -0
- package/src/models/invoicelineitemresponse.ts +8 -0
- package/src/models/lineitemcommitmentconfig.ts +9 -0
- package/src/models/meterusageattribution.ts +18 -0
- package/src/models/pricefilter.ts +3 -0
- package/src/models/priceprice.ts +4 -0
- package/src/models/priceresponse.ts +4 -0
- package/src/models/submodifycouponaction.ts +17 -0
- package/src/models/submodifycouponparams.ts +46 -0
- package/src/models/submodifyinheritancerequest.ts +14 -1
- package/src/models/submodifytaxaction.ts +17 -0
- package/src/models/submodifytaxparams.ts +30 -0
- package/src/models/submodifytrialendrequest.ts +20 -0
- package/src/models/subscriptioncouponinput.ts +29 -0
- package/src/models/subscriptionlineitemresponse.ts +6 -0
- package/src/models/subscriptionmodifytype.ts +6 -0
- package/src/models/subscriptionphasecreaterequest.ts +11 -4
- package/src/models/subscriptionresponse.ts +4 -0
- package/src/models/subscriptionresponsev2.ts +8 -0
- package/src/models/subscriptionsubscriptionlineitem.ts +6 -0
- package/src/models/timeofdaybucket.ts +33 -0
- package/src/models/trialendaction.ts +17 -0
- package/src/models/updatesubscriptionlineitemrequest.ts +9 -0
- package/src/models/usageanalyticitem.ts +5 -0
- package/src/models/usageanalyticpoint.ts +6 -0
- package/src/models/userresponse.ts +4 -0
- package/src/models/windowsize.ts +2 -2
- package/src/tool-names.ts +2 -2
- package/src/types/async.ts +8 -7
- package/esm/lib/dlv.d.ts +0 -14
- package/esm/lib/dlv.d.ts.map +0 -1
- package/esm/lib/dlv.js +0 -46
- package/esm/lib/dlv.js.map +0 -1
- package/esm/lib/is-plain-object.d.ts +0 -2
- package/esm/lib/is-plain-object.d.ts.map +0 -1
- package/esm/lib/is-plain-object.js +0 -38
- package/esm/lib/is-plain-object.js.map +0 -1
- package/src/lib/dlv.ts +0 -53
- package/src/lib/is-plain-object.ts +0 -43
package/esm/types/async.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../src/types/async.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GACf;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GACD;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEN,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,OAAO,CAAC,CAAC,CAAC;;IAI9C,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB;gBAEjC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../src/types/async.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GACf;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GACD;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEN,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,OAAO,CAAC,CAAC,CAAC;;IAI9C,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB;gBAEjC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IASnD,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,EACjC,WAAW,CAAC,EACR,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAChD,IAAI,GACJ,SAAS,EACb,UAAU,CAAC,EACP,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GACnD,IAAI,GACJ,SAAS,GACZ,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAO/B,KAAK,CAAC,OAAO,GAAG,KAAK,EACnB,UAAU,CAAC,EACP,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GACjD,IAAI,GACJ,SAAS,GACZ,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC;IAIvB,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhE,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;CAGlC"}
|
package/esm/types/async.js
CHANGED
|
@@ -7,19 +7,19 @@ export class APIPromise {
|
|
|
7
7
|
[Symbol.toStringTag] = "APIPromise";
|
|
8
8
|
constructor(p) {
|
|
9
9
|
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
10
|
-
this.#unwrapped =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
this.#unwrapped = p instanceof Promise ? null : Promise.resolve(p[0]);
|
|
11
|
+
}
|
|
12
|
+
#getUnwrapped() {
|
|
13
|
+
return (this.#unwrapped ??= this.#promise.then(([value]) => value));
|
|
14
14
|
}
|
|
15
15
|
then(onfulfilled, onrejected) {
|
|
16
16
|
return this.#promise.then(onfulfilled ? ([value]) => onfulfilled(value) : void 0, onrejected);
|
|
17
17
|
}
|
|
18
18
|
catch(onrejected) {
|
|
19
|
-
return this.#
|
|
19
|
+
return this.#getUnwrapped().catch(onrejected);
|
|
20
20
|
}
|
|
21
21
|
finally(onfinally) {
|
|
22
|
-
return this.#
|
|
22
|
+
return this.#getUnwrapped().finally(onfinally);
|
|
23
23
|
}
|
|
24
24
|
$inspect() {
|
|
25
25
|
return this.#promise;
|
package/esm/types/async.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../src/types/async.ts"],"names":[],"mappings":"AAAA;;GAEG;AAmBH,MAAM,OAAO,UAAU;IACZ,QAAQ,CAAwB;
|
|
1
|
+
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../src/types/async.ts"],"names":[],"mappings":"AAAA;;GAEG;AAmBH,MAAM,OAAO,UAAU;IACZ,QAAQ,CAAwB;IACzC,UAAU,CAAoB;IAErB,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,YAAY,CAAC;IAE7C,YAAY,CAAuC;QACjD,IAAI,CAAC,QAAQ,GAAG,CAAC,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,UAAU,GAAG,CAAC,YAAY,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,aAAa;QACX,OAAO,CAAC,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,IAAI,CACF,WAGa,EACb,UAGa;QAEb,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CACvB,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EACtD,UAAU,CACX,CAAC;IACJ,CAAC;IAED,KAAK,CACH,UAGa;QAEb,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,CAAC,SAA2C;QACjD,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjD,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF"}
|
package/manifest.json
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"sensitive": true
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
"version": "2.1.
|
|
51
|
+
"version": "2.1.18",
|
|
52
52
|
"tools": [
|
|
53
53
|
{
|
|
54
54
|
"name": "update-customer",
|
|
@@ -304,11 +304,11 @@
|
|
|
304
304
|
},
|
|
305
305
|
{
|
|
306
306
|
"name": "execute-subscription-modify",
|
|
307
|
-
"description": "Execute subscription modification\n\nExecute a mid-cycle subscription modification (inheritance
|
|
307
|
+
"description": "Execute subscription modification\n\nExecute a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax)."
|
|
308
308
|
},
|
|
309
309
|
{
|
|
310
310
|
"name": "preview-subscription-modify",
|
|
311
|
-
"description": "Preview subscription modification\n\nPreview the impact of a mid-cycle subscription modification without committing changes."
|
|
311
|
+
"description": "Preview subscription modification\n\nPreview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax) without committing changes."
|
|
312
312
|
},
|
|
313
313
|
{
|
|
314
314
|
"name": "get-subscription-v2",
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Execute subscription modification
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Execute a mid-cycle subscription modification (inheritance
|
|
32
|
+
* Execute a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax).
|
|
33
33
|
*/
|
|
34
34
|
export function subscriptionsExecuteSubscriptionModify(
|
|
35
35
|
client$: FlexpriceCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Preview subscription modification
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Preview the impact of a mid-cycle subscription modification without committing changes.
|
|
32
|
+
* Preview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax) without committing changes.
|
|
33
33
|
*/
|
|
34
34
|
export function subscriptionsPreviewSubscriptionModify(
|
|
35
35
|
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.18",
|
|
73
|
+
genVersion: "2.904.2",
|
|
74
74
|
userAgent:
|
|
75
|
-
"speakeasy-sdk/mcp-typescript 2.1.
|
|
75
|
+
"speakeasy-sdk/mcp-typescript 2.1.18 2.904.2 1.0 @flexprice/mcp-server",
|
|
76
76
|
} as const;
|
package/src/lib/encodings.ts
CHANGED
package/src/lib/primitives.ts
CHANGED
|
@@ -111,3 +111,19 @@ export function invariant(
|
|
|
111
111
|
throw new InvariantError(message);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
+
|
|
115
|
+
export function isPlainObject(
|
|
116
|
+
value: unknown,
|
|
117
|
+
): value is Record<string, unknown> {
|
|
118
|
+
if (value === null || typeof value !== "object") return false;
|
|
119
|
+
if (Object.prototype.toString.call(value) !== "[object Object]") return false;
|
|
120
|
+
const proto = Object.getPrototypeOf(value);
|
|
121
|
+
if (proto === null || proto === Object.prototype) return true;
|
|
122
|
+
// cross-realm plain objects (vm contexts, iframes) inherit from a
|
|
123
|
+
// different realm's Object.prototype, which itself has a null prototype
|
|
124
|
+
try {
|
|
125
|
+
return Object.getPrototypeOf(proto) === null;
|
|
126
|
+
} catch {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
}
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -16,7 +16,7 @@ export const tool$subscriptionsExecuteSubscriptionModify: ToolDefinition<
|
|
|
16
16
|
name: "execute-subscription-modify",
|
|
17
17
|
description: `Execute subscription modification
|
|
18
18
|
|
|
19
|
-
Execute a mid-cycle subscription modification (inheritance
|
|
19
|
+
Execute a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax).`,
|
|
20
20
|
scopes: ["write"],
|
|
21
21
|
annotations: {
|
|
22
22
|
"title": "",
|
|
@@ -16,7 +16,7 @@ export const tool$subscriptionsPreviewSubscriptionModify: ToolDefinition<
|
|
|
16
16
|
name: "preview-subscription-modify",
|
|
17
17
|
description: `Preview subscription modification
|
|
18
18
|
|
|
19
|
-
Preview the impact of a mid-cycle subscription modification without committing changes.`,
|
|
19
|
+
Preview the impact of a mid-cycle subscription modification (inheritance, quantity change, grouped invoicing, trial end, coupon, or tax) without committing changes.`,
|
|
20
20
|
scopes: ["read"],
|
|
21
21
|
annotations: {
|
|
22
22
|
"title": "",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
DebugTrackerStatus,
|
|
8
|
+
DebugTrackerStatus$zodSchema,
|
|
9
|
+
} from "./debugtrackerstatus.js";
|
|
10
|
+
import { ErrorResponse, ErrorResponse$zodSchema } from "./errorresponse.js";
|
|
11
|
+
import {
|
|
12
|
+
MeterUsageAttribution,
|
|
13
|
+
MeterUsageAttribution$zodSchema,
|
|
14
|
+
} from "./meterusageattribution.js";
|
|
15
|
+
|
|
16
|
+
export type AttributedToCustomerResult = {
|
|
17
|
+
error?: ErrorResponse | undefined;
|
|
18
|
+
meter_usage?: MeterUsageAttribution | undefined;
|
|
19
|
+
status?: DebugTrackerStatus | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const AttributedToCustomerResult$zodSchema: z.ZodType<
|
|
23
|
+
AttributedToCustomerResult
|
|
24
|
+
> = z.object({
|
|
25
|
+
error: ErrorResponse$zodSchema.optional(),
|
|
26
|
+
meter_usage: MeterUsageAttribution$zodSchema.optional(),
|
|
27
|
+
status: DebugTrackerStatus$zodSchema.optional(),
|
|
28
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type Bucket = { hour?: number | undefined; minute?: number | undefined };
|
|
8
|
+
|
|
9
|
+
export const Bucket$zodSchema: z.ZodType<Bucket> = z.object({
|
|
10
|
+
hour: z.int().optional(),
|
|
11
|
+
minute: z.int().optional(),
|
|
12
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { Bucket, Bucket$zodSchema } from "./bucket.js";
|
|
7
|
+
|
|
8
|
+
export type BucketSummary = {
|
|
9
|
+
base_charge?: string | undefined;
|
|
10
|
+
bucket_id?: string | undefined;
|
|
11
|
+
commitment_type?: string | undefined;
|
|
12
|
+
commitment_value?: string | undefined;
|
|
13
|
+
computed_overage?: string | undefined;
|
|
14
|
+
computed_true_up?: string | undefined;
|
|
15
|
+
computed_utilized?: string | undefined;
|
|
16
|
+
end?: Bucket | undefined;
|
|
17
|
+
price_id?: string | undefined;
|
|
18
|
+
start?: Bucket | undefined;
|
|
19
|
+
subscription_line_item_id?: string | undefined;
|
|
20
|
+
total_usage?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const BucketSummary$zodSchema: z.ZodType<BucketSummary> = z.object({
|
|
24
|
+
base_charge: z.string().optional(),
|
|
25
|
+
bucket_id: z.string().optional(),
|
|
26
|
+
commitment_type: z.string().optional(),
|
|
27
|
+
commitment_value: z.string().optional(),
|
|
28
|
+
computed_overage: z.string().optional(),
|
|
29
|
+
computed_true_up: z.string().optional(),
|
|
30
|
+
computed_utilized: z.string().optional(),
|
|
31
|
+
end: Bucket$zodSchema.optional(),
|
|
32
|
+
price_id: z.string().optional().describe(
|
|
33
|
+
"PriceID is the bucket's own price (the line item's price for the\nout-of-bucket row).",
|
|
34
|
+
),
|
|
35
|
+
start: Bucket$zodSchema.optional(),
|
|
36
|
+
subscription_line_item_id: z.string().optional().describe(
|
|
37
|
+
"SubscriptionLineItemID is the line item this bucket is configured on.",
|
|
38
|
+
),
|
|
39
|
+
total_usage: z.string().optional(),
|
|
40
|
+
});
|
|
@@ -29,7 +29,9 @@ export type CancelSubscriptionRequest = {
|
|
|
29
29
|
export const CancelSubscriptionRequest$zodSchema: z.ZodType<
|
|
30
30
|
CancelSubscriptionRequest
|
|
31
31
|
> = z.object({
|
|
32
|
-
cancel_at: z.iso.datetime({ offset: true }).optional()
|
|
32
|
+
cancel_at: z.iso.datetime({ offset: true }).optional().describe(
|
|
33
|
+
"CancelAt is the exact date/time when the subscription should be cancelled.\nRequired for cancellation_type \"scheduled_date\"; optional for \"immediate\" (past dates only — backdated cancellation).\nFor \"scheduled_date\", accepts both future dates (deferred cancellation) and past dates (backdated cancellation).\nFor \"immediate\", accepts past/current dates only; use \"scheduled_date\" for future dates.",
|
|
34
|
+
),
|
|
33
35
|
cancel_immediately_inovice_policy: CancelImmediatelyInvoicePolicy$zodSchema
|
|
34
36
|
.optional(),
|
|
35
37
|
cancellation_type: CancellationType$zodSchema,
|
|
@@ -14,8 +14,10 @@ import {
|
|
|
14
14
|
|
|
15
15
|
export type ChangedSubscription = {
|
|
16
16
|
action?: ChangedSubscriptionAction | undefined;
|
|
17
|
+
current_period_end?: string | undefined;
|
|
17
18
|
id?: string | undefined;
|
|
18
19
|
status?: SubscriptionStatus | undefined;
|
|
20
|
+
trial_end?: string | undefined;
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
export const ChangedSubscription$zodSchema: z.ZodType<ChangedSubscription> = z
|
|
@@ -23,6 +25,8 @@ export const ChangedSubscription$zodSchema: z.ZodType<ChangedSubscription> = z
|
|
|
23
25
|
action: ChangedSubscriptionAction$zodSchema.optional().describe(
|
|
24
26
|
"created | updated",
|
|
25
27
|
),
|
|
28
|
+
current_period_end: z.iso.datetime({ offset: true }).optional(),
|
|
26
29
|
id: z.string().optional(),
|
|
27
30
|
status: SubscriptionStatus$zodSchema.optional(),
|
|
31
|
+
trial_end: z.iso.datetime({ offset: true }).optional(),
|
|
28
32
|
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { Bucket, Bucket$zodSchema } from "./bucket.js";
|
|
7
|
+
import { CommitmentType, CommitmentType$zodSchema } from "./commitmenttype.js";
|
|
8
|
+
import {
|
|
9
|
+
CreatePriceRequest,
|
|
10
|
+
CreatePriceRequest$zodSchema,
|
|
11
|
+
} from "./createpricerequest.js";
|
|
12
|
+
|
|
13
|
+
export type CommitmentBucketRequest = {
|
|
14
|
+
commitment_type?: CommitmentType | undefined;
|
|
15
|
+
commitment_value?: string | undefined;
|
|
16
|
+
end?: Bucket | undefined;
|
|
17
|
+
id?: string | undefined;
|
|
18
|
+
overage_factor?: string | undefined;
|
|
19
|
+
price?: CreatePriceRequest | undefined;
|
|
20
|
+
start?: Bucket | undefined;
|
|
21
|
+
true_up_enabled?: boolean | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const CommitmentBucketRequest$zodSchema: z.ZodType<
|
|
25
|
+
CommitmentBucketRequest
|
|
26
|
+
> = z.object({
|
|
27
|
+
commitment_type: CommitmentType$zodSchema.optional(),
|
|
28
|
+
commitment_value: z.string().optional(),
|
|
29
|
+
end: Bucket$zodSchema.optional(),
|
|
30
|
+
id: z.string().optional(),
|
|
31
|
+
overage_factor: z.string().optional(),
|
|
32
|
+
price: CreatePriceRequest$zodSchema.optional(),
|
|
33
|
+
start: Bucket$zodSchema.optional(),
|
|
34
|
+
true_up_enabled: z.boolean().optional(),
|
|
35
|
+
});
|
package/src/models/coupon.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { Status, Status$zodSchema } from "./status.js";
|
|
|
10
10
|
export type Coupon = {
|
|
11
11
|
amount_off?: string | undefined;
|
|
12
12
|
cadence?: CouponCadence | undefined;
|
|
13
|
+
coupon_code?: string | undefined;
|
|
13
14
|
created_at?: string | undefined;
|
|
14
15
|
created_by?: string | undefined;
|
|
15
16
|
currency?: string | undefined;
|
|
@@ -34,6 +35,7 @@ export type Coupon = {
|
|
|
34
35
|
export const Coupon$zodSchema: z.ZodType<Coupon> = z.object({
|
|
35
36
|
amount_off: z.string().optional(),
|
|
36
37
|
cadence: CouponCadence$zodSchema.optional(),
|
|
38
|
+
coupon_code: z.string().optional(),
|
|
37
39
|
created_at: z.iso.datetime({ offset: true }).optional(),
|
|
38
40
|
created_by: z.string().optional(),
|
|
39
41
|
currency: z.string().optional(),
|
|
@@ -6,6 +6,7 @@ import * as z from "zod";
|
|
|
6
6
|
import { CommitmentInfo, CommitmentInfo$zodSchema } from "./commitmentinfo.js";
|
|
7
7
|
|
|
8
8
|
export type CreateInvoiceLineItemRequest = {
|
|
9
|
+
adjusted_entitlement_quantity?: string | undefined;
|
|
9
10
|
amount: string;
|
|
10
11
|
commitment_info?: CommitmentInfo | undefined;
|
|
11
12
|
display_name?: string | undefined;
|
|
@@ -26,11 +27,16 @@ export type CreateInvoiceLineItemRequest = {
|
|
|
26
27
|
price_unit?: string | undefined;
|
|
27
28
|
price_unit_amount?: string | undefined;
|
|
28
29
|
quantity: string;
|
|
30
|
+
subscription_id?: string | undefined;
|
|
31
|
+
subscription_line_item_id?: string | undefined;
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
export const CreateInvoiceLineItemRequest$zodSchema: z.ZodType<
|
|
32
35
|
CreateInvoiceLineItemRequest
|
|
33
36
|
> = z.object({
|
|
37
|
+
adjusted_entitlement_quantity: z.string().optional().describe(
|
|
38
|
+
"adjusted_entitlement_quantity is the entitlement-covered units deducted from raw usage.",
|
|
39
|
+
),
|
|
34
40
|
amount: z.string().describe(
|
|
35
41
|
"amount is the monetary amount for this line item",
|
|
36
42
|
),
|
|
@@ -87,4 +93,10 @@ export const CreateInvoiceLineItemRequest$zodSchema: z.ZodType<
|
|
|
87
93
|
quantity: z.string().describe(
|
|
88
94
|
"quantity is the quantity of units for this line item",
|
|
89
95
|
),
|
|
96
|
+
subscription_id: z.string().optional().describe(
|
|
97
|
+
"subscription_id overrides the invoice's subscription_id for this specific line item.\nUsed for grouped invoicing where child line items belong to child subscriptions.",
|
|
98
|
+
),
|
|
99
|
+
subscription_line_item_id: z.string().optional().describe(
|
|
100
|
+
"sub_line_item_id links this line item to the subscription_line_item that generated it.",
|
|
101
|
+
),
|
|
90
102
|
});
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { BillingPeriod, BillingPeriod$zodSchema } from "./billingperiod.js";
|
|
7
|
+
import {
|
|
8
|
+
CommitmentBucketRequest,
|
|
9
|
+
CommitmentBucketRequest$zodSchema,
|
|
10
|
+
} from "./commitmentbucketrequest.js";
|
|
7
11
|
import { CommitmentType, CommitmentType$zodSchema } from "./commitmenttype.js";
|
|
8
12
|
import {
|
|
9
13
|
ProrationBehavior,
|
|
@@ -19,6 +23,7 @@ export type CreateSubscriptionLineItemRequest = {
|
|
|
19
23
|
commitment_duration?: BillingPeriod | undefined;
|
|
20
24
|
commitment_overage_factor?: number | undefined;
|
|
21
25
|
commitment_quantity?: number | undefined;
|
|
26
|
+
commitment_time_buckets?: Array<CommitmentBucketRequest> | undefined;
|
|
22
27
|
commitment_true_up_enabled?: boolean | undefined;
|
|
23
28
|
commitment_type?: CommitmentType | undefined;
|
|
24
29
|
commitment_windowed?: boolean | undefined;
|
|
@@ -40,6 +45,8 @@ export const CreateSubscriptionLineItemRequest$zodSchema: z.ZodType<
|
|
|
40
45
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
41
46
|
commitment_overage_factor: z.number().optional(),
|
|
42
47
|
commitment_quantity: z.number().optional(),
|
|
48
|
+
commitment_time_buckets: z.array(CommitmentBucketRequest$zodSchema)
|
|
49
|
+
.optional(),
|
|
43
50
|
commitment_true_up_enabled: z.boolean().optional(),
|
|
44
51
|
commitment_type: CommitmentType$zodSchema.optional(),
|
|
45
52
|
commitment_windowed: z.boolean().optional(),
|
|
@@ -42,6 +42,10 @@ import {
|
|
|
42
42
|
ProrationBehavior,
|
|
43
43
|
ProrationBehavior$zodSchema,
|
|
44
44
|
} from "./prorationbehavior.js";
|
|
45
|
+
import {
|
|
46
|
+
SubscriptionCouponInput,
|
|
47
|
+
SubscriptionCouponInput$zodSchema,
|
|
48
|
+
} from "./subscriptioncouponinput.js";
|
|
45
49
|
import {
|
|
46
50
|
SubscriptionInheritanceConfig,
|
|
47
51
|
SubscriptionInheritanceConfig$zodSchema,
|
|
@@ -93,6 +97,7 @@ export type CreateSubscriptionRequest = {
|
|
|
93
97
|
plan_id: string;
|
|
94
98
|
proration_behavior?: ProrationBehavior | undefined;
|
|
95
99
|
start_date?: string | undefined;
|
|
100
|
+
subscription_coupons?: Array<SubscriptionCouponInput> | undefined;
|
|
96
101
|
subscription_status?: SubscriptionStatus | undefined;
|
|
97
102
|
tax_rate_overrides?: Array<TaxRateOverride> | undefined;
|
|
98
103
|
trial_period_days?: number | undefined;
|
|
@@ -118,7 +123,9 @@ export const CreateSubscriptionRequest$zodSchema: z.ZodType<
|
|
|
118
123
|
"CommitmentAmount is the minimum amount a customer commits to paying for a billing period",
|
|
119
124
|
),
|
|
120
125
|
commitment_duration: BillingPeriod$zodSchema.optional(),
|
|
121
|
-
coupons: z.array(z.string()).optional()
|
|
126
|
+
coupons: z.array(z.string()).optional().describe(
|
|
127
|
+
"Deprecated: use SubscriptionCoupons instead.",
|
|
128
|
+
),
|
|
122
129
|
credit_grants: z.array(CreateCreditGrantRequest$zodSchema).optional()
|
|
123
130
|
.describe("Credit grants to be applied when subscription is created"),
|
|
124
131
|
currency: z.string(),
|
|
@@ -143,7 +150,8 @@ export const CreateSubscriptionRequest$zodSchema: z.ZodType<
|
|
|
143
150
|
).optional().describe(
|
|
144
151
|
"LineItemCommitments allows setting commitment configuration per line item (keyed by price_id)",
|
|
145
152
|
),
|
|
146
|
-
line_item_coupons: z.record(z.string(), z.array(z.string())).optional()
|
|
153
|
+
line_item_coupons: z.record(z.string(), z.array(z.string())).optional()
|
|
154
|
+
.describe("Deprecated: use SubscriptionCoupons instead."),
|
|
147
155
|
line_items: z.array(CreateSubscriptionLineItemRequest$zodSchema).optional()
|
|
148
156
|
.describe(
|
|
149
157
|
"LineItems are extra line items to add at creation (each with price_id or price), in addition to plan prices",
|
|
@@ -169,6 +177,10 @@ export const CreateSubscriptionRequest$zodSchema: z.ZodType<
|
|
|
169
177
|
plan_id: z.string(),
|
|
170
178
|
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
171
179
|
start_date: z.iso.datetime({ offset: true }).optional(),
|
|
180
|
+
subscription_coupons: z.array(SubscriptionCouponInput$zodSchema).optional()
|
|
181
|
+
.describe(
|
|
182
|
+
"SubscriptionCoupons is the preferred way to attach coupons at creation.\nAccepts coupon_code; optionally targets a line item via price_id.",
|
|
183
|
+
),
|
|
172
184
|
subscription_status: SubscriptionStatus$zodSchema.optional(),
|
|
173
185
|
tax_rate_overrides: z.array(TaxRateOverride$zodSchema).optional().describe(
|
|
174
186
|
"tax_rate_overrides is the tax rate overrides\tto be applied to the subscription",
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
AttributedToCustomerResult,
|
|
8
|
+
AttributedToCustomerResult$zodSchema,
|
|
9
|
+
} from "./attributedtocustomerresult.js";
|
|
6
10
|
import {
|
|
7
11
|
CustomerLookupResult,
|
|
8
12
|
CustomerLookupResult$zodSchema,
|
|
@@ -22,6 +26,7 @@ import {
|
|
|
22
26
|
} from "./subscriptionlineitemlookupresult.js";
|
|
23
27
|
|
|
24
28
|
export type DebugTracker = {
|
|
29
|
+
attributed_to_customer?: AttributedToCustomerResult | undefined;
|
|
25
30
|
customer_lookup?: CustomerLookupResult | undefined;
|
|
26
31
|
failure_point?: FailurePoint | undefined;
|
|
27
32
|
meter_matching?: MeterMatchingResult | undefined;
|
|
@@ -30,6 +35,7 @@ export type DebugTracker = {
|
|
|
30
35
|
};
|
|
31
36
|
|
|
32
37
|
export const DebugTracker$zodSchema: z.ZodType<DebugTracker> = z.object({
|
|
38
|
+
attributed_to_customer: AttributedToCustomerResult$zodSchema.optional(),
|
|
33
39
|
customer_lookup: CustomerLookupResult$zodSchema.optional(),
|
|
34
40
|
failure_point: FailurePoint$zodSchema.optional(),
|
|
35
41
|
meter_matching: MeterMatchingResult$zodSchema.optional(),
|
|
@@ -10,6 +10,8 @@ export const DebugTrackerStatus = {
|
|
|
10
10
|
NotFound: "not_found",
|
|
11
11
|
Found: "found",
|
|
12
12
|
Error: "error",
|
|
13
|
+
Processing: "processing",
|
|
14
|
+
Attributed: "attributed",
|
|
13
15
|
} as const;
|
|
14
16
|
export type DebugTrackerStatus = ClosedEnum<typeof DebugTrackerStatus>;
|
|
15
17
|
|
|
@@ -18,4 +20,6 @@ export const DebugTrackerStatus$zodSchema = z.enum([
|
|
|
18
20
|
"not_found",
|
|
19
21
|
"found",
|
|
20
22
|
"error",
|
|
23
|
+
"processing",
|
|
24
|
+
"attributed",
|
|
21
25
|
]);
|
|
@@ -16,6 +16,7 @@ export type EntityIntegrationMappingResponse = {
|
|
|
16
16
|
entity_type?: IntegrationEntityType | undefined;
|
|
17
17
|
environment_id?: string | undefined;
|
|
18
18
|
id?: string | undefined;
|
|
19
|
+
metadata?: { [k: string]: any } | undefined;
|
|
19
20
|
provider_entity_id?: string | undefined;
|
|
20
21
|
provider_type?: string | undefined;
|
|
21
22
|
status?: Status | undefined;
|
|
@@ -33,6 +34,7 @@ export const EntityIntegrationMappingResponse$zodSchema: z.ZodType<
|
|
|
33
34
|
entity_type: IntegrationEntityType$zodSchema.optional(),
|
|
34
35
|
environment_id: z.string().optional(),
|
|
35
36
|
id: z.string().optional(),
|
|
37
|
+
metadata: z.record(z.string(), z.any()).optional(),
|
|
36
38
|
provider_entity_id: z.string().optional(),
|
|
37
39
|
provider_type: z.string().optional(),
|
|
38
40
|
status: Status$zodSchema.optional(),
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
SubModifyCouponParams,
|
|
8
|
+
SubModifyCouponParams$zodSchema,
|
|
9
|
+
} from "./submodifycouponparams.js";
|
|
6
10
|
import {
|
|
7
11
|
SubModifyGroupedInvoicingParams,
|
|
8
12
|
SubModifyGroupedInvoicingParams$zodSchema,
|
|
@@ -15,24 +19,38 @@ import {
|
|
|
15
19
|
SubModifyQuantityChangeRequest,
|
|
16
20
|
SubModifyQuantityChangeRequest$zodSchema,
|
|
17
21
|
} from "./submodifyquantitychangerequest.js";
|
|
22
|
+
import {
|
|
23
|
+
SubModifyTaxParams,
|
|
24
|
+
SubModifyTaxParams$zodSchema,
|
|
25
|
+
} from "./submodifytaxparams.js";
|
|
26
|
+
import {
|
|
27
|
+
SubModifyTrialEndRequest,
|
|
28
|
+
SubModifyTrialEndRequest$zodSchema,
|
|
29
|
+
} from "./submodifytrialendrequest.js";
|
|
18
30
|
import {
|
|
19
31
|
SubscriptionModifyType,
|
|
20
32
|
SubscriptionModifyType$zodSchema,
|
|
21
33
|
} from "./subscriptionmodifytype.js";
|
|
22
34
|
|
|
23
35
|
export type ExecuteSubscriptionModifyRequest = {
|
|
36
|
+
coupon_params?: SubModifyCouponParams | undefined;
|
|
24
37
|
grouped_invoicing_params?: SubModifyGroupedInvoicingParams | undefined;
|
|
25
38
|
inheritance_params?: SubModifyInheritanceRequest | undefined;
|
|
26
39
|
quantity_change_params?: SubModifyQuantityChangeRequest | undefined;
|
|
40
|
+
tax_params?: SubModifyTaxParams | undefined;
|
|
41
|
+
trial_end_params?: SubModifyTrialEndRequest | undefined;
|
|
27
42
|
type: SubscriptionModifyType;
|
|
28
43
|
};
|
|
29
44
|
|
|
30
45
|
export const ExecuteSubscriptionModifyRequest$zodSchema: z.ZodType<
|
|
31
46
|
ExecuteSubscriptionModifyRequest
|
|
32
47
|
> = z.object({
|
|
48
|
+
coupon_params: SubModifyCouponParams$zodSchema.optional(),
|
|
33
49
|
grouped_invoicing_params: SubModifyGroupedInvoicingParams$zodSchema
|
|
34
50
|
.optional(),
|
|
35
51
|
inheritance_params: SubModifyInheritanceRequest$zodSchema.optional(),
|
|
36
52
|
quantity_change_params: SubModifyQuantityChangeRequest$zodSchema.optional(),
|
|
53
|
+
tax_params: SubModifyTaxParams$zodSchema.optional(),
|
|
54
|
+
trial_end_params: SubModifyTrialEndRequest$zodSchema.optional(),
|
|
37
55
|
type: SubscriptionModifyType$zodSchema,
|
|
38
56
|
});
|
|
@@ -10,6 +10,7 @@ export const FailurePointType = {
|
|
|
10
10
|
MeterLookup: "meter_lookup",
|
|
11
11
|
PriceLookup: "price_lookup",
|
|
12
12
|
SubscriptionLineItemLookup: "subscription_line_item_lookup",
|
|
13
|
+
AttributedToCustomer: "attributed_to_customer",
|
|
13
14
|
} as const;
|
|
14
15
|
export type FailurePointType = ClosedEnum<typeof FailurePointType>;
|
|
15
16
|
|
|
@@ -18,4 +19,5 @@ export const FailurePointType$zodSchema = z.enum([
|
|
|
18
19
|
"meter_lookup",
|
|
19
20
|
"price_lookup",
|
|
20
21
|
"subscription_line_item_lookup",
|
|
22
|
+
"attributed_to_customer",
|
|
21
23
|
]);
|
|
@@ -6,6 +6,7 @@ import * as z from "zod";
|
|
|
6
6
|
import { WindowSize, WindowSize$zodSchema } from "./windowsize.js";
|
|
7
7
|
|
|
8
8
|
export type GetUsageAnalyticsRequest = {
|
|
9
|
+
breakdown_bucket?: boolean | undefined;
|
|
9
10
|
end_time?: string | undefined;
|
|
10
11
|
expand?: Array<string> | undefined;
|
|
11
12
|
external_customer_id?: string | undefined;
|
|
@@ -21,6 +22,9 @@ export type GetUsageAnalyticsRequest = {
|
|
|
21
22
|
export const GetUsageAnalyticsRequest$zodSchema: z.ZodType<
|
|
22
23
|
GetUsageAnalyticsRequest
|
|
23
24
|
> = z.object({
|
|
25
|
+
breakdown_bucket: z.boolean().optional().describe(
|
|
26
|
+
"BreakdownBucket when true augments each time-series point with BucketID/PriceID\nand appends a BucketSummaries rollup to each item. Requires WindowSize to be set\nand the item to be linked to a subscription line item that has CommitmentTimeBuckets.\nDefault: false (opt-in, backward compatible).",
|
|
27
|
+
),
|
|
24
28
|
end_time: z.iso.datetime({ offset: true }).optional(),
|
|
25
29
|
expand: z.array(z.string()).optional().describe(
|
|
26
30
|
"allowed values: \"price\", \"meter\", \"feature\", \"subscription_line_item\",\"plan\",\"addon\"",
|
|
@@ -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 InheritanceAction = {
|
|
9
|
+
Add: "add",
|
|
10
|
+
Remove: "remove",
|
|
11
|
+
} as const;
|
|
12
|
+
export type InheritanceAction = ClosedEnum<typeof InheritanceAction>;
|
|
13
|
+
|
|
14
|
+
export const InheritanceAction$zodSchema = z.enum([
|
|
15
|
+
"add",
|
|
16
|
+
"remove",
|
|
17
|
+
]);
|
|
@@ -14,6 +14,7 @@ export const InvoiceBillingReason = {
|
|
|
14
14
|
Proration: "PRORATION",
|
|
15
15
|
Manual: "MANUAL",
|
|
16
16
|
AutoInvoiceThreshold: "AUTO_INVOICE_THRESHOLD",
|
|
17
|
+
WalletAutoTopup: "WALLET_AUTO_TOPUP",
|
|
17
18
|
} as const;
|
|
18
19
|
export type InvoiceBillingReason = ClosedEnum<typeof InvoiceBillingReason>;
|
|
19
20
|
|
|
@@ -26,4 +27,5 @@ export const InvoiceBillingReason$zodSchema = z.enum([
|
|
|
26
27
|
"PRORATION",
|
|
27
28
|
"MANUAL",
|
|
28
29
|
"AUTO_INVOICE_THRESHOLD",
|
|
30
|
+
"WALLET_AUTO_TOPUP",
|
|
29
31
|
]);
|