@paygentic/sdk 0.8.5 → 0.8.7
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/LICENSE +1 -1
- package/README.md +9 -3
- package/dist/commonjs/funcs/invoicesV2Get.d.ts +1 -1
- package/dist/commonjs/funcs/invoicesV2Get.d.ts.map +1 -1
- package/dist/commonjs/funcs/invoicesV2Get.js +3 -2
- package/dist/commonjs/funcs/invoicesV2Get.js.map +1 -1
- package/dist/commonjs/funcs/invoicesV2GetLineItems.d.ts +1 -1
- package/dist/commonjs/funcs/invoicesV2GetLineItems.d.ts.map +1 -1
- package/dist/commonjs/funcs/invoicesV2GetLineItems.js +4 -2
- package/dist/commonjs/funcs/invoicesV2GetLineItems.js.map +1 -1
- package/dist/commonjs/funcs/invoicesV2ListLineItems.js +2 -0
- package/dist/commonjs/funcs/invoicesV2ListLineItems.js.map +1 -1
- package/dist/commonjs/funcs/itemsCreateItem.js +2 -2
- package/dist/commonjs/funcs/itemsCreateItem.js.map +1 -1
- package/dist/commonjs/funcs/itemsDeleteItem.d.ts +1 -1
- package/dist/commonjs/funcs/itemsDeleteItem.d.ts.map +1 -1
- package/dist/commonjs/funcs/itemsDeleteItem.js +2 -2
- package/dist/commonjs/funcs/itemsDeleteItem.js.map +1 -1
- package/dist/commonjs/funcs/itemsListItems.js +2 -0
- package/dist/commonjs/funcs/itemsListItems.js.map +1 -1
- package/dist/commonjs/funcs/plansGetPlanVersion.d.ts +19 -0
- package/dist/commonjs/funcs/plansGetPlanVersion.d.ts.map +1 -0
- package/dist/commonjs/funcs/plansGetPlanVersion.js +128 -0
- package/dist/commonjs/funcs/plansGetPlanVersion.js.map +1 -0
- package/dist/commonjs/funcs/plansMintPlanVersion.d.ts +19 -0
- package/dist/commonjs/funcs/plansMintPlanVersion.d.ts.map +1 -0
- package/dist/commonjs/funcs/plansMintPlanVersion.js +127 -0
- package/dist/commonjs/funcs/plansMintPlanVersion.js.map +1 -0
- package/dist/commonjs/funcs/plansTransitionPlanVersion.d.ts +19 -0
- package/dist/commonjs/funcs/plansTransitionPlanVersion.d.ts.map +1 -0
- package/dist/commonjs/funcs/plansTransitionPlanVersion.js +131 -0
- package/dist/commonjs/funcs/plansTransitionPlanVersion.js.map +1 -0
- package/dist/commonjs/funcs/plansUpdate.js +2 -2
- package/dist/commonjs/funcs/plansUpdate.js.map +1 -1
- package/dist/commonjs/funcs/subscriptionsCreate.js +2 -2
- package/dist/commonjs/funcs/subscriptionsCreate.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/billablemetric.d.ts +4 -0
- package/dist/commonjs/models/billablemetric.d.ts.map +1 -1
- package/dist/commonjs/models/billablemetric.js +1 -0
- package/dist/commonjs/models/billablemetric.js.map +1 -1
- package/dist/commonjs/models/createmanuallineitemrequest.d.ts +5 -0
- package/dist/commonjs/models/createmanuallineitemrequest.d.ts.map +1 -1
- package/dist/commonjs/models/createmanuallineitemrequest.js +1 -0
- package/dist/commonjs/models/createmanuallineitemrequest.js.map +1 -1
- package/dist/commonjs/models/fee.d.ts +4 -0
- package/dist/commonjs/models/fee.d.ts.map +1 -1
- package/dist/commonjs/models/fee.js +1 -0
- package/dist/commonjs/models/fee.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +5 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +5 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoice.d.ts +7 -2
- package/dist/commonjs/models/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/invoice.js +2 -0
- package/dist/commonjs/models/invoice.js.map +1 -1
- package/dist/commonjs/models/invoicelineitem.d.ts +8 -0
- package/dist/commonjs/models/invoicelineitem.d.ts.map +1 -1
- package/dist/commonjs/models/invoicelineitem.js +2 -0
- package/dist/commonjs/models/invoicelineitem.js.map +1 -1
- package/dist/commonjs/models/invoicelineitemsresponse.d.ts +5 -0
- package/dist/commonjs/models/invoicelineitemsresponse.d.ts.map +1 -1
- package/dist/commonjs/models/invoicelineitemsresponse.js +2 -0
- package/dist/commonjs/models/invoicelineitemsresponse.js.map +1 -1
- package/dist/commonjs/models/item.d.ts +11 -0
- package/dist/commonjs/models/item.d.ts.map +1 -1
- package/dist/commonjs/models/item.js +2 -0
- package/dist/commonjs/models/item.js.map +1 -1
- package/dist/commonjs/models/lineitem.d.ts +8 -4
- package/dist/commonjs/models/lineitem.d.ts.map +1 -1
- package/dist/commonjs/models/lineitem.js +2 -1
- package/dist/commonjs/models/lineitem.js.map +1 -1
- package/dist/commonjs/models/lineitemsresponse.d.ts +5 -0
- package/dist/commonjs/models/lineitemsresponse.d.ts.map +1 -1
- package/dist/commonjs/models/lineitemsresponse.js +2 -0
- package/dist/commonjs/models/lineitemsresponse.js.map +1 -1
- package/dist/commonjs/models/mintplanversionrequest.d.ts +46 -0
- package/dist/commonjs/models/mintplanversionrequest.d.ts.map +1 -0
- package/dist/commonjs/models/mintplanversionrequest.js +60 -0
- package/dist/commonjs/models/mintplanversionrequest.js.map +1 -0
- package/dist/commonjs/models/operations/createbillablemetric.d.ts +7 -2
- package/dist/commonjs/models/operations/createbillablemetric.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createbillablemetric.js +2 -1
- package/dist/commonjs/models/operations/createbillablemetric.js.map +1 -1
- package/dist/commonjs/models/operations/createfee.d.ts +7 -2
- package/dist/commonjs/models/operations/createfee.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createfee.js +2 -1
- package/dist/commonjs/models/operations/createfee.js.map +1 -1
- package/dist/commonjs/models/operations/createitem.d.ts +5 -0
- package/dist/commonjs/models/operations/createitem.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createitem.js +1 -0
- package/dist/commonjs/models/operations/createitem.js.map +1 -1
- package/dist/commonjs/models/operations/createplan.d.ts +5 -0
- package/dist/commonjs/models/operations/createplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createplan.js +1 -0
- package/dist/commonjs/models/operations/createplan.js.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.d.ts +6 -2
- package/dist/commonjs/models/operations/createsubscription.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.js.map +1 -1
- package/dist/commonjs/models/operations/getinvoice.d.ts +7 -2
- package/dist/commonjs/models/operations/getinvoice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getinvoice.js +1 -0
- package/dist/commonjs/models/operations/getinvoice.js.map +1 -1
- package/dist/commonjs/models/operations/getinvoicelineitems.d.ts +11 -1
- package/dist/commonjs/models/operations/getinvoicelineitems.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getinvoicelineitems.js +2 -0
- package/dist/commonjs/models/operations/getinvoicelineitems.js.map +1 -1
- package/dist/commonjs/models/operations/getplanversion.d.ts +17 -0
- package/dist/commonjs/models/operations/getplanversion.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getplanversion.js +50 -0
- package/dist/commonjs/models/operations/getplanversion.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listitems.d.ts +10 -0
- package/dist/commonjs/models/operations/listitems.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listitems.js +2 -0
- package/dist/commonjs/models/operations/listitems.js.map +1 -1
- package/dist/commonjs/models/operations/listlineitems.d.ts +10 -0
- package/dist/commonjs/models/operations/listlineitems.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listlineitems.js +2 -0
- package/dist/commonjs/models/operations/listlineitems.js.map +1 -1
- package/dist/commonjs/models/operations/mintplanversion.d.ts +15 -0
- package/dist/commonjs/models/operations/mintplanversion.d.ts.map +1 -0
- package/dist/commonjs/models/operations/mintplanversion.js +56 -0
- package/dist/commonjs/models/operations/mintplanversion.js.map +1 -0
- package/dist/commonjs/models/operations/transitionplanversion.d.ts +20 -0
- package/dist/commonjs/models/operations/transitionplanversion.d.ts.map +1 -0
- package/dist/commonjs/models/operations/transitionplanversion.js +57 -0
- package/dist/commonjs/models/operations/transitionplanversion.js.map +1 -0
- package/dist/commonjs/models/operations/updatebillablemetric.d.ts +5 -0
- package/dist/commonjs/models/operations/updatebillablemetric.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatebillablemetric.js +1 -0
- package/dist/commonjs/models/operations/updatebillablemetric.js.map +1 -1
- package/dist/commonjs/models/operations/updatefee.d.ts +5 -0
- package/dist/commonjs/models/operations/updatefee.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatefee.js +1 -0
- package/dist/commonjs/models/operations/updatefee.js.map +1 -1
- package/dist/commonjs/models/operations/updateitem.d.ts +10 -0
- package/dist/commonjs/models/operations/updateitem.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateitem.js +2 -0
- package/dist/commonjs/models/operations/updateitem.js.map +1 -1
- package/dist/commonjs/models/operations/updateplan.d.ts +5 -0
- package/dist/commonjs/models/operations/updateplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateplan.js +1 -0
- package/dist/commonjs/models/operations/updateplan.js.map +1 -1
- package/dist/commonjs/models/operations/updatesubscription.d.ts +3 -1
- package/dist/commonjs/models/operations/updatesubscription.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatesubscription.js.map +1 -1
- package/dist/commonjs/models/plan.d.ts +4 -0
- package/dist/commonjs/models/plan.d.ts.map +1 -1
- package/dist/commonjs/models/plan.js +1 -0
- package/dist/commonjs/models/plan.js.map +1 -1
- package/dist/commonjs/models/planversion.d.ts +71 -0
- package/dist/commonjs/models/planversion.d.ts.map +1 -0
- package/dist/commonjs/models/planversion.js +76 -0
- package/dist/commonjs/models/planversion.js.map +1 -0
- package/dist/commonjs/models/planversionpriceslot.d.ts +81 -0
- package/dist/commonjs/models/planversionpriceslot.d.ts.map +1 -0
- package/dist/commonjs/models/planversionpriceslot.js +88 -0
- package/dist/commonjs/models/planversionpriceslot.js.map +1 -0
- package/dist/commonjs/models/price.d.ts +4 -4
- package/dist/commonjs/models/price.d.ts.map +1 -1
- package/dist/commonjs/models/price.js +5 -4
- package/dist/commonjs/models/price.js.map +1 -1
- package/dist/commonjs/models/pricepropertiesunion.d.ts +1 -1
- package/dist/commonjs/models/resolveditem.d.ts +33 -0
- package/dist/commonjs/models/resolveditem.d.ts.map +1 -0
- package/dist/commonjs/models/resolveditem.js +55 -0
- package/dist/commonjs/models/resolveditem.js.map +1 -0
- package/dist/commonjs/models/revenuesummaryresponse.d.ts +8 -0
- package/dist/commonjs/models/revenuesummaryresponse.d.ts.map +1 -1
- package/dist/commonjs/models/revenuesummaryresponse.js +2 -0
- package/dist/commonjs/models/revenuesummaryresponse.js.map +1 -1
- package/dist/commonjs/models/revenuetrendbucket.d.ts +4 -0
- package/dist/commonjs/models/revenuetrendbucket.d.ts.map +1 -1
- package/dist/commonjs/models/revenuetrendbucket.js +1 -0
- package/dist/commonjs/models/revenuetrendbucket.js.map +1 -1
- package/dist/commonjs/models/scheduleinterval.d.ts +4 -1
- package/dist/commonjs/models/scheduleinterval.d.ts.map +1 -1
- package/dist/commonjs/models/scheduleinterval.js +1 -1
- package/dist/commonjs/models/scheduleinterval.js.map +1 -1
- package/dist/commonjs/models/schemasbillingschedule.d.ts +4 -1
- package/dist/commonjs/models/schemasbillingschedule.d.ts.map +1 -1
- package/dist/commonjs/models/schemasbillingschedule.js +1 -1
- package/dist/commonjs/models/schemasbillingschedule.js.map +1 -1
- package/dist/commonjs/models/subscription.d.ts +9 -3
- package/dist/commonjs/models/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/subscription.js.map +1 -1
- package/dist/commonjs/models/transitionplanversionrequest.d.ts +18 -0
- package/dist/commonjs/models/transitionplanversionrequest.d.ts.map +1 -0
- package/dist/commonjs/models/transitionplanversionrequest.js +49 -0
- package/dist/commonjs/models/transitionplanversionrequest.js.map +1 -0
- package/dist/commonjs/sdk/plans.d.ts +21 -0
- package/dist/commonjs/sdk/plans.d.ts.map +1 -1
- package/dist/commonjs/sdk/plans.js +30 -0
- package/dist/commonjs/sdk/plans.js.map +1 -1
- package/dist/esm/funcs/invoicesV2Get.d.ts +1 -1
- package/dist/esm/funcs/invoicesV2Get.d.ts.map +1 -1
- package/dist/esm/funcs/invoicesV2Get.js +3 -2
- package/dist/esm/funcs/invoicesV2Get.js.map +1 -1
- package/dist/esm/funcs/invoicesV2GetLineItems.d.ts +1 -1
- package/dist/esm/funcs/invoicesV2GetLineItems.d.ts.map +1 -1
- package/dist/esm/funcs/invoicesV2GetLineItems.js +4 -2
- package/dist/esm/funcs/invoicesV2GetLineItems.js.map +1 -1
- package/dist/esm/funcs/invoicesV2ListLineItems.js +2 -0
- package/dist/esm/funcs/invoicesV2ListLineItems.js.map +1 -1
- package/dist/esm/funcs/itemsCreateItem.js +2 -2
- package/dist/esm/funcs/itemsCreateItem.js.map +1 -1
- package/dist/esm/funcs/itemsDeleteItem.d.ts +1 -1
- package/dist/esm/funcs/itemsDeleteItem.d.ts.map +1 -1
- package/dist/esm/funcs/itemsDeleteItem.js +2 -2
- package/dist/esm/funcs/itemsDeleteItem.js.map +1 -1
- package/dist/esm/funcs/itemsListItems.js +2 -0
- package/dist/esm/funcs/itemsListItems.js.map +1 -1
- package/dist/esm/funcs/plansGetPlanVersion.d.ts +19 -0
- package/dist/esm/funcs/plansGetPlanVersion.d.ts.map +1 -0
- package/dist/esm/funcs/plansGetPlanVersion.js +92 -0
- package/dist/esm/funcs/plansGetPlanVersion.js.map +1 -0
- package/dist/esm/funcs/plansMintPlanVersion.d.ts +19 -0
- package/dist/esm/funcs/plansMintPlanVersion.d.ts.map +1 -0
- package/dist/esm/funcs/plansMintPlanVersion.js +91 -0
- package/dist/esm/funcs/plansMintPlanVersion.js.map +1 -0
- package/dist/esm/funcs/plansTransitionPlanVersion.d.ts +19 -0
- package/dist/esm/funcs/plansTransitionPlanVersion.d.ts.map +1 -0
- package/dist/esm/funcs/plansTransitionPlanVersion.js +95 -0
- package/dist/esm/funcs/plansTransitionPlanVersion.js.map +1 -0
- package/dist/esm/funcs/plansUpdate.js +2 -2
- package/dist/esm/funcs/plansUpdate.js.map +1 -1
- package/dist/esm/funcs/subscriptionsCreate.js +2 -2
- package/dist/esm/funcs/subscriptionsCreate.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/billablemetric.d.ts +4 -0
- package/dist/esm/models/billablemetric.d.ts.map +1 -1
- package/dist/esm/models/billablemetric.js +1 -0
- package/dist/esm/models/billablemetric.js.map +1 -1
- package/dist/esm/models/createmanuallineitemrequest.d.ts +5 -0
- package/dist/esm/models/createmanuallineitemrequest.d.ts.map +1 -1
- package/dist/esm/models/createmanuallineitemrequest.js +1 -0
- package/dist/esm/models/createmanuallineitemrequest.js.map +1 -1
- package/dist/esm/models/fee.d.ts +4 -0
- package/dist/esm/models/fee.d.ts.map +1 -1
- package/dist/esm/models/fee.js +1 -0
- package/dist/esm/models/fee.js.map +1 -1
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +5 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoice.d.ts +7 -2
- package/dist/esm/models/invoice.d.ts.map +1 -1
- package/dist/esm/models/invoice.js +2 -0
- package/dist/esm/models/invoice.js.map +1 -1
- package/dist/esm/models/invoicelineitem.d.ts +8 -0
- package/dist/esm/models/invoicelineitem.d.ts.map +1 -1
- package/dist/esm/models/invoicelineitem.js +2 -0
- package/dist/esm/models/invoicelineitem.js.map +1 -1
- package/dist/esm/models/invoicelineitemsresponse.d.ts +5 -0
- package/dist/esm/models/invoicelineitemsresponse.d.ts.map +1 -1
- package/dist/esm/models/invoicelineitemsresponse.js +2 -0
- package/dist/esm/models/invoicelineitemsresponse.js.map +1 -1
- package/dist/esm/models/item.d.ts +11 -0
- package/dist/esm/models/item.d.ts.map +1 -1
- package/dist/esm/models/item.js +2 -0
- package/dist/esm/models/item.js.map +1 -1
- package/dist/esm/models/lineitem.d.ts +8 -4
- package/dist/esm/models/lineitem.d.ts.map +1 -1
- package/dist/esm/models/lineitem.js +2 -1
- package/dist/esm/models/lineitem.js.map +1 -1
- package/dist/esm/models/lineitemsresponse.d.ts +5 -0
- package/dist/esm/models/lineitemsresponse.d.ts.map +1 -1
- package/dist/esm/models/lineitemsresponse.js +2 -0
- package/dist/esm/models/lineitemsresponse.js.map +1 -1
- package/dist/esm/models/mintplanversionrequest.d.ts +46 -0
- package/dist/esm/models/mintplanversionrequest.d.ts.map +1 -0
- package/dist/esm/models/mintplanversionrequest.js +22 -0
- package/dist/esm/models/mintplanversionrequest.js.map +1 -0
- package/dist/esm/models/operations/createbillablemetric.d.ts +7 -2
- package/dist/esm/models/operations/createbillablemetric.d.ts.map +1 -1
- package/dist/esm/models/operations/createbillablemetric.js +2 -1
- package/dist/esm/models/operations/createbillablemetric.js.map +1 -1
- package/dist/esm/models/operations/createfee.d.ts +7 -2
- package/dist/esm/models/operations/createfee.d.ts.map +1 -1
- package/dist/esm/models/operations/createfee.js +2 -1
- package/dist/esm/models/operations/createfee.js.map +1 -1
- package/dist/esm/models/operations/createitem.d.ts +5 -0
- package/dist/esm/models/operations/createitem.d.ts.map +1 -1
- package/dist/esm/models/operations/createitem.js +1 -0
- package/dist/esm/models/operations/createitem.js.map +1 -1
- package/dist/esm/models/operations/createplan.d.ts +5 -0
- package/dist/esm/models/operations/createplan.d.ts.map +1 -1
- package/dist/esm/models/operations/createplan.js +1 -0
- package/dist/esm/models/operations/createplan.js.map +1 -1
- package/dist/esm/models/operations/createsubscription.d.ts +6 -2
- package/dist/esm/models/operations/createsubscription.d.ts.map +1 -1
- package/dist/esm/models/operations/createsubscription.js.map +1 -1
- package/dist/esm/models/operations/getinvoice.d.ts +7 -2
- package/dist/esm/models/operations/getinvoice.d.ts.map +1 -1
- package/dist/esm/models/operations/getinvoice.js +1 -0
- package/dist/esm/models/operations/getinvoice.js.map +1 -1
- package/dist/esm/models/operations/getinvoicelineitems.d.ts +11 -1
- package/dist/esm/models/operations/getinvoicelineitems.d.ts.map +1 -1
- package/dist/esm/models/operations/getinvoicelineitems.js +2 -0
- package/dist/esm/models/operations/getinvoicelineitems.js.map +1 -1
- package/dist/esm/models/operations/getplanversion.d.ts +17 -0
- package/dist/esm/models/operations/getplanversion.d.ts.map +1 -0
- package/dist/esm/models/operations/getplanversion.js +13 -0
- package/dist/esm/models/operations/getplanversion.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listitems.d.ts +10 -0
- package/dist/esm/models/operations/listitems.d.ts.map +1 -1
- package/dist/esm/models/operations/listitems.js +2 -0
- package/dist/esm/models/operations/listitems.js.map +1 -1
- package/dist/esm/models/operations/listlineitems.d.ts +10 -0
- package/dist/esm/models/operations/listlineitems.d.ts.map +1 -1
- package/dist/esm/models/operations/listlineitems.js +2 -0
- package/dist/esm/models/operations/listlineitems.js.map +1 -1
- package/dist/esm/models/operations/mintplanversion.d.ts +15 -0
- package/dist/esm/models/operations/mintplanversion.d.ts.map +1 -0
- package/dist/esm/models/operations/mintplanversion.js +19 -0
- package/dist/esm/models/operations/mintplanversion.js.map +1 -0
- package/dist/esm/models/operations/transitionplanversion.d.ts +20 -0
- package/dist/esm/models/operations/transitionplanversion.d.ts.map +1 -0
- package/dist/esm/models/operations/transitionplanversion.js +20 -0
- package/dist/esm/models/operations/transitionplanversion.js.map +1 -0
- package/dist/esm/models/operations/updatebillablemetric.d.ts +5 -0
- package/dist/esm/models/operations/updatebillablemetric.d.ts.map +1 -1
- package/dist/esm/models/operations/updatebillablemetric.js +1 -0
- package/dist/esm/models/operations/updatebillablemetric.js.map +1 -1
- package/dist/esm/models/operations/updatefee.d.ts +5 -0
- package/dist/esm/models/operations/updatefee.d.ts.map +1 -1
- package/dist/esm/models/operations/updatefee.js +1 -0
- package/dist/esm/models/operations/updatefee.js.map +1 -1
- package/dist/esm/models/operations/updateitem.d.ts +10 -0
- package/dist/esm/models/operations/updateitem.d.ts.map +1 -1
- package/dist/esm/models/operations/updateitem.js +2 -0
- package/dist/esm/models/operations/updateitem.js.map +1 -1
- package/dist/esm/models/operations/updateplan.d.ts +5 -0
- package/dist/esm/models/operations/updateplan.d.ts.map +1 -1
- package/dist/esm/models/operations/updateplan.js +1 -0
- package/dist/esm/models/operations/updateplan.js.map +1 -1
- package/dist/esm/models/operations/updatesubscription.d.ts +3 -1
- package/dist/esm/models/operations/updatesubscription.d.ts.map +1 -1
- package/dist/esm/models/operations/updatesubscription.js.map +1 -1
- package/dist/esm/models/plan.d.ts +4 -0
- package/dist/esm/models/plan.d.ts.map +1 -1
- package/dist/esm/models/plan.js +1 -0
- package/dist/esm/models/plan.js.map +1 -1
- package/dist/esm/models/planversion.d.ts +71 -0
- package/dist/esm/models/planversion.d.ts.map +1 -0
- package/dist/esm/models/planversion.js +39 -0
- package/dist/esm/models/planversion.js.map +1 -0
- package/dist/esm/models/planversionpriceslot.d.ts +81 -0
- package/dist/esm/models/planversionpriceslot.d.ts.map +1 -0
- package/dist/esm/models/planversionpriceslot.js +51 -0
- package/dist/esm/models/planversionpriceslot.js.map +1 -0
- package/dist/esm/models/price.d.ts +4 -4
- package/dist/esm/models/price.d.ts.map +1 -1
- package/dist/esm/models/price.js +4 -3
- package/dist/esm/models/price.js.map +1 -1
- package/dist/esm/models/pricepropertiesunion.d.ts +1 -1
- package/dist/esm/models/resolveditem.d.ts +33 -0
- package/dist/esm/models/resolveditem.d.ts.map +1 -0
- package/dist/esm/models/resolveditem.js +18 -0
- package/dist/esm/models/resolveditem.js.map +1 -0
- package/dist/esm/models/revenuesummaryresponse.d.ts +8 -0
- package/dist/esm/models/revenuesummaryresponse.d.ts.map +1 -1
- package/dist/esm/models/revenuesummaryresponse.js +2 -0
- package/dist/esm/models/revenuesummaryresponse.js.map +1 -1
- package/dist/esm/models/revenuetrendbucket.d.ts +4 -0
- package/dist/esm/models/revenuetrendbucket.d.ts.map +1 -1
- package/dist/esm/models/revenuetrendbucket.js +1 -0
- package/dist/esm/models/revenuetrendbucket.js.map +1 -1
- package/dist/esm/models/scheduleinterval.d.ts +4 -1
- package/dist/esm/models/scheduleinterval.d.ts.map +1 -1
- package/dist/esm/models/scheduleinterval.js +1 -1
- package/dist/esm/models/scheduleinterval.js.map +1 -1
- package/dist/esm/models/schemasbillingschedule.d.ts +4 -1
- package/dist/esm/models/schemasbillingschedule.d.ts.map +1 -1
- package/dist/esm/models/schemasbillingschedule.js +1 -1
- package/dist/esm/models/schemasbillingschedule.js.map +1 -1
- package/dist/esm/models/subscription.d.ts +9 -3
- package/dist/esm/models/subscription.d.ts.map +1 -1
- package/dist/esm/models/subscription.js.map +1 -1
- package/dist/esm/models/transitionplanversionrequest.d.ts +18 -0
- package/dist/esm/models/transitionplanversionrequest.d.ts.map +1 -0
- package/dist/esm/models/transitionplanversionrequest.js +12 -0
- package/dist/esm/models/transitionplanversionrequest.js.map +1 -0
- package/dist/esm/sdk/plans.d.ts +21 -0
- package/dist/esm/sdk/plans.d.ts.map +1 -1
- package/dist/esm/sdk/plans.js +30 -0
- package/dist/esm/sdk/plans.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +2 -1
- package/src/funcs/invoicesV2Get.ts +6 -1
- package/src/funcs/invoicesV2GetLineItems.ts +7 -1
- package/src/funcs/invoicesV2ListLineItems.ts +2 -0
- package/src/funcs/itemsCreateItem.ts +2 -2
- package/src/funcs/itemsDeleteItem.ts +5 -1
- package/src/funcs/itemsListItems.ts +2 -0
- package/src/funcs/plansGetPlanVersion.ts +186 -0
- package/src/funcs/plansMintPlanVersion.ts +183 -0
- package/src/funcs/plansTransitionPlanVersion.ts +190 -0
- package/src/funcs/plansUpdate.ts +2 -2
- package/src/funcs/subscriptionsCreate.ts +2 -2
- package/src/lib/config.ts +2 -2
- package/src/models/billablemetric.ts +5 -0
- package/src/models/createmanuallineitemrequest.ts +6 -0
- package/src/models/fee.ts +5 -0
- package/src/models/index.ts +5 -0
- package/src/models/invoice.ts +8 -2
- package/src/models/invoicelineitem.ts +10 -0
- package/src/models/invoicelineitemsresponse.ts +6 -0
- package/src/models/item.ts +15 -0
- package/src/models/lineitem.ts +9 -4
- package/src/models/lineitemsresponse.ts +6 -0
- package/src/models/mintplanversionrequest.ts +80 -0
- package/src/models/operations/createbillablemetric.ts +9 -3
- package/src/models/operations/createfee.ts +9 -3
- package/src/models/operations/createitem.ts +6 -0
- package/src/models/operations/createplan.ts +6 -0
- package/src/models/operations/createsubscription.ts +6 -2
- package/src/models/operations/getinvoice.ts +8 -2
- package/src/models/operations/getinvoicelineitems.ts +13 -1
- package/src/models/operations/getplanversion.ts +37 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/listitems.ts +12 -0
- package/src/models/operations/listlineitems.ts +12 -0
- package/src/models/operations/mintplanversion.ts +40 -0
- package/src/models/operations/transitionplanversion.ts +49 -0
- package/src/models/operations/updatebillablemetric.ts +6 -0
- package/src/models/operations/updatefee.ts +6 -0
- package/src/models/operations/updateitem.ts +12 -0
- package/src/models/operations/updateplan.ts +6 -0
- package/src/models/operations/updatesubscription.ts +3 -1
- package/src/models/plan.ts +5 -0
- package/src/models/planversion.ts +113 -0
- package/src/models/planversionpriceslot.ts +136 -0
- package/src/models/price.ts +6 -7
- package/src/models/pricepropertiesunion.ts +1 -1
- package/src/models/resolveditem.ts +63 -0
- package/src/models/revenuesummaryresponse.ts +10 -0
- package/src/models/revenuetrendbucket.ts +5 -0
- package/src/models/scheduleinterval.ts +7 -2
- package/src/models/schemasbillingschedule.ts +7 -2
- package/src/models/subscription.ts +9 -3
- package/src/models/transitionplanversionrequest.ts +39 -0
- package/src/sdk/plans.ts +54 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { PaygenticCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { PaygenticError } from "../models/errors/paygenticerror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as models from "../models/index.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Set the default version
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Point the plan's default at this version, so its floating subscriptions bill from it. Any version may become default, in either direction — this is how you roll a plan back to (or forward to) an earlier price set. Idempotent when the version is already the default.
|
|
34
|
+
*/
|
|
35
|
+
export function plansTransitionPlanVersion(
|
|
36
|
+
client: PaygenticCore,
|
|
37
|
+
request: operations.TransitionPlanVersionRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
models.PlanVersion,
|
|
42
|
+
| errors.BadRequest
|
|
43
|
+
| errors.ErrorT
|
|
44
|
+
| PaygenticError
|
|
45
|
+
| ResponseValidationError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
| RequestAbortedError
|
|
48
|
+
| RequestTimeoutError
|
|
49
|
+
| InvalidRequestError
|
|
50
|
+
| UnexpectedClientError
|
|
51
|
+
| SDKValidationError
|
|
52
|
+
>
|
|
53
|
+
> {
|
|
54
|
+
return new APIPromise($do(
|
|
55
|
+
client,
|
|
56
|
+
request,
|
|
57
|
+
options,
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function $do(
|
|
62
|
+
client: PaygenticCore,
|
|
63
|
+
request: operations.TransitionPlanVersionRequest,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<
|
|
66
|
+
[
|
|
67
|
+
Result<
|
|
68
|
+
models.PlanVersion,
|
|
69
|
+
| errors.BadRequest
|
|
70
|
+
| errors.ErrorT
|
|
71
|
+
| PaygenticError
|
|
72
|
+
| ResponseValidationError
|
|
73
|
+
| ConnectionError
|
|
74
|
+
| RequestAbortedError
|
|
75
|
+
| RequestTimeoutError
|
|
76
|
+
| InvalidRequestError
|
|
77
|
+
| UnexpectedClientError
|
|
78
|
+
| SDKValidationError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
82
|
+
> {
|
|
83
|
+
const parsed = safeParse(
|
|
84
|
+
request,
|
|
85
|
+
(value) =>
|
|
86
|
+
operations.TransitionPlanVersionRequest$outboundSchema.parse(value),
|
|
87
|
+
"Input validation failed",
|
|
88
|
+
);
|
|
89
|
+
if (!parsed.ok) {
|
|
90
|
+
return [parsed, { status: "invalid" }];
|
|
91
|
+
}
|
|
92
|
+
const payload = parsed.value;
|
|
93
|
+
const body = encodeJSON("body", payload.TransitionPlanVersionRequest, {
|
|
94
|
+
explode: true,
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const pathParams = {
|
|
98
|
+
id: encodeSimple("id", payload.id, {
|
|
99
|
+
explode: false,
|
|
100
|
+
charEncoding: "percent",
|
|
101
|
+
}),
|
|
102
|
+
versionNumber: encodeSimple("versionNumber", payload.versionNumber, {
|
|
103
|
+
explode: false,
|
|
104
|
+
charEncoding: "percent",
|
|
105
|
+
}),
|
|
106
|
+
};
|
|
107
|
+
const path = pathToFunc("/v0/plans/{id}/versions/{versionNumber}")(
|
|
108
|
+
pathParams,
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
const headers = new Headers(compactMap({
|
|
112
|
+
"Content-Type": "application/json",
|
|
113
|
+
Accept: "application/json",
|
|
114
|
+
}));
|
|
115
|
+
|
|
116
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
117
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
118
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
119
|
+
|
|
120
|
+
const context = {
|
|
121
|
+
options: client._options,
|
|
122
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
123
|
+
operationID: "transitionPlanVersion",
|
|
124
|
+
oAuth2Scopes: null,
|
|
125
|
+
|
|
126
|
+
resolvedSecurity: requestSecurity,
|
|
127
|
+
|
|
128
|
+
securitySource: client._options.bearerAuth,
|
|
129
|
+
retryConfig: options?.retries
|
|
130
|
+
|| client._options.retryConfig
|
|
131
|
+
|| { strategy: "none" },
|
|
132
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const requestRes = client._createRequest(context, {
|
|
136
|
+
security: requestSecurity,
|
|
137
|
+
method: "PATCH",
|
|
138
|
+
baseURL: options?.serverURL,
|
|
139
|
+
path: path,
|
|
140
|
+
headers: headers,
|
|
141
|
+
body: body,
|
|
142
|
+
userAgent: client._options.userAgent,
|
|
143
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
144
|
+
}, options);
|
|
145
|
+
if (!requestRes.ok) {
|
|
146
|
+
return [requestRes, { status: "invalid" }];
|
|
147
|
+
}
|
|
148
|
+
const req = requestRes.value;
|
|
149
|
+
|
|
150
|
+
const doResult = await client._do(req, {
|
|
151
|
+
context,
|
|
152
|
+
errorCodes: ["400", "401", "403", "404", "409", "4XX", "500", "5XX"],
|
|
153
|
+
retryConfig: context.retryConfig,
|
|
154
|
+
retryCodes: context.retryCodes,
|
|
155
|
+
});
|
|
156
|
+
if (!doResult.ok) {
|
|
157
|
+
return [doResult, { status: "request-error", request: req }];
|
|
158
|
+
}
|
|
159
|
+
const response = doResult.value;
|
|
160
|
+
|
|
161
|
+
const responseFields = {
|
|
162
|
+
HttpMeta: { Response: response, Request: req },
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const [result] = await M.match<
|
|
166
|
+
models.PlanVersion,
|
|
167
|
+
| errors.BadRequest
|
|
168
|
+
| errors.ErrorT
|
|
169
|
+
| PaygenticError
|
|
170
|
+
| ResponseValidationError
|
|
171
|
+
| ConnectionError
|
|
172
|
+
| RequestAbortedError
|
|
173
|
+
| RequestTimeoutError
|
|
174
|
+
| InvalidRequestError
|
|
175
|
+
| UnexpectedClientError
|
|
176
|
+
| SDKValidationError
|
|
177
|
+
>(
|
|
178
|
+
M.json(200, models.PlanVersion$inboundSchema),
|
|
179
|
+
M.jsonErr(400, errors.BadRequest$inboundSchema),
|
|
180
|
+
M.jsonErr([401, 403, 404, 409], errors.ErrorT$inboundSchema),
|
|
181
|
+
M.jsonErr(500, errors.ErrorT$inboundSchema),
|
|
182
|
+
M.fail("4XX"),
|
|
183
|
+
M.fail("5XX"),
|
|
184
|
+
)(response, req, { extraFields: responseFields });
|
|
185
|
+
if (!result.ok) {
|
|
186
|
+
return [result, { status: "complete", request: req, response }];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return [result, { status: "complete", request: req, response }];
|
|
190
|
+
}
|
package/src/funcs/plansUpdate.ts
CHANGED
|
@@ -137,7 +137,7 @@ async function $do(
|
|
|
137
137
|
|
|
138
138
|
const doResult = await client._do(req, {
|
|
139
139
|
context,
|
|
140
|
-
errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
|
|
140
|
+
errorCodes: ["400", "401", "403", "404", "409", "4XX", "500", "5XX"],
|
|
141
141
|
retryConfig: context.retryConfig,
|
|
142
142
|
retryCodes: context.retryCodes,
|
|
143
143
|
});
|
|
@@ -165,7 +165,7 @@ async function $do(
|
|
|
165
165
|
>(
|
|
166
166
|
M.json(200, models.Plan$inboundSchema),
|
|
167
167
|
M.jsonErr(400, errors.BadRequest$inboundSchema),
|
|
168
|
-
M.jsonErr([401, 403, 404], errors.ErrorT$inboundSchema),
|
|
168
|
+
M.jsonErr([401, 403, 404, 409], errors.ErrorT$inboundSchema),
|
|
169
169
|
M.jsonErr(500, errors.ErrorT$inboundSchema),
|
|
170
170
|
M.fail("4XX"),
|
|
171
171
|
M.fail("5XX"),
|
|
@@ -134,7 +134,7 @@ async function $do(
|
|
|
134
134
|
|
|
135
135
|
const doResult = await client._do(req, {
|
|
136
136
|
context,
|
|
137
|
-
errorCodes: ["400", "401", "403", "404", "4XX", "500", "5XX"],
|
|
137
|
+
errorCodes: ["400", "401", "403", "404", "409", "4XX", "500", "5XX"],
|
|
138
138
|
retryConfig: context.retryConfig,
|
|
139
139
|
retryCodes: context.retryCodes,
|
|
140
140
|
});
|
|
@@ -162,7 +162,7 @@ async function $do(
|
|
|
162
162
|
>(
|
|
163
163
|
M.json([200, 201], models.Subscription$inboundSchema),
|
|
164
164
|
M.jsonErr(400, errors.BadRequest$inboundSchema),
|
|
165
|
-
M.jsonErr([401, 403, 404], errors.ErrorT$inboundSchema),
|
|
165
|
+
M.jsonErr([401, 403, 404, 409], errors.ErrorT$inboundSchema),
|
|
166
166
|
M.jsonErr(500, errors.ErrorT$inboundSchema),
|
|
167
167
|
M.fail("4XX"),
|
|
168
168
|
M.fail("5XX"),
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "0.1.0",
|
|
68
|
-
sdkVersion: "0.8.
|
|
68
|
+
sdkVersion: "0.8.7",
|
|
69
69
|
genVersion: "2.879.13",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.8.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.8.7 2.879.13 0.1.0 @paygentic/sdk",
|
|
71
71
|
} as const;
|
|
@@ -44,6 +44,10 @@ export type BillableMetric = {
|
|
|
44
44
|
* Unique identifier for a product
|
|
45
45
|
*/
|
|
46
46
|
productId: string;
|
|
47
|
+
/**
|
|
48
|
+
* The item this metric is tagged with, or null when untagged. Used to map this metric's invoice lines to an external accounting/tax identity.
|
|
49
|
+
*/
|
|
50
|
+
itemId: string | null;
|
|
47
51
|
unit: string;
|
|
48
52
|
updatedAt: Date;
|
|
49
53
|
eventType?: string | null | undefined;
|
|
@@ -76,6 +80,7 @@ export const BillableMetric$inboundSchema: z.ZodType<
|
|
|
76
80
|
merchantId: z.string(),
|
|
77
81
|
name: z.string(),
|
|
78
82
|
productId: z.string(),
|
|
83
|
+
itemId: z.nullable(z.string()),
|
|
79
84
|
unit: z.string(),
|
|
80
85
|
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
81
86
|
eventType: z.nullable(z.string()).optional(),
|
|
@@ -49,6 +49,10 @@ export type CreateManualLineItemRequest = {
|
|
|
49
49
|
* Optional caller-provided idempotency key. Auto-generated if not provided.
|
|
50
50
|
*/
|
|
51
51
|
idempotencyKey?: string | null | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Optional item to tag this line with, for accounting/GL mapping. Must belong to the caller's merchant and must not be archived. A manual line has no price, so it is never reached by a later restamp — supplying it here is the only opportunity to tag it.
|
|
54
|
+
*/
|
|
55
|
+
itemId?: string | null | undefined;
|
|
52
56
|
};
|
|
53
57
|
|
|
54
58
|
/** @internal */
|
|
@@ -64,6 +68,7 @@ export type CreateManualLineItemRequest$Outbound = {
|
|
|
64
68
|
periodStart?: string | null | undefined;
|
|
65
69
|
periodEnd?: string | null | undefined;
|
|
66
70
|
idempotencyKey?: string | null | undefined;
|
|
71
|
+
itemId?: string | null | undefined;
|
|
67
72
|
};
|
|
68
73
|
|
|
69
74
|
/** @internal */
|
|
@@ -83,6 +88,7 @@ export const CreateManualLineItemRequest$outboundSchema: z.ZodType<
|
|
|
83
88
|
periodStart: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
84
89
|
periodEnd: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
85
90
|
idempotencyKey: z.nullable(z.string()).optional(),
|
|
91
|
+
itemId: z.nullable(z.string()).optional(),
|
|
86
92
|
});
|
|
87
93
|
|
|
88
94
|
export function createManualLineItemRequestToJSON(
|
package/src/models/fee.ts
CHANGED
|
@@ -26,6 +26,10 @@ export type Fee = {
|
|
|
26
26
|
* Unique identifier for a product
|
|
27
27
|
*/
|
|
28
28
|
productId: string;
|
|
29
|
+
/**
|
|
30
|
+
* The item this fee is tagged with, or null when untagged. Used to map this fee's invoice lines to an external accounting/tax identity.
|
|
31
|
+
*/
|
|
32
|
+
itemId: string | null;
|
|
29
33
|
createdAt: Date;
|
|
30
34
|
updatedAt: Date;
|
|
31
35
|
};
|
|
@@ -43,6 +47,7 @@ export const Fee$inboundSchema: z.ZodType<Fee, z.ZodTypeDef, unknown> = z
|
|
|
43
47
|
description: z.string(),
|
|
44
48
|
merchantId: z.string(),
|
|
45
49
|
productId: z.string(),
|
|
50
|
+
itemId: z.nullable(z.string()),
|
|
46
51
|
createdAt: z.string().datetime({ offset: true }).transform(v =>
|
|
47
52
|
new Date(v)
|
|
48
53
|
),
|
package/src/models/index.ts
CHANGED
|
@@ -55,6 +55,7 @@ export * from "./meteredentitlementdetail.js";
|
|
|
55
55
|
export * from "./meteredentitlementlistitem.js";
|
|
56
56
|
export * from "./meterevent.js";
|
|
57
57
|
export * from "./metereventlist.js";
|
|
58
|
+
export * from "./mintplanversionrequest.js";
|
|
58
59
|
export * from "./offsetpagination.js";
|
|
59
60
|
export * from "./order.js";
|
|
60
61
|
export * from "./orderlineitem.js";
|
|
@@ -65,6 +66,8 @@ export * from "./paymentsession.js";
|
|
|
65
66
|
export * from "./paymentsummary.js";
|
|
66
67
|
export * from "./plan.js";
|
|
67
68
|
export * from "./plancreditallocation.js";
|
|
69
|
+
export * from "./planversion.js";
|
|
70
|
+
export * from "./planversionpriceslot.js";
|
|
68
71
|
export * from "./planversionsummary.js";
|
|
69
72
|
export * from "./price.js";
|
|
70
73
|
export * from "./pricefeature.js";
|
|
@@ -83,6 +86,7 @@ export * from "./reconciledfeaturefailed.js";
|
|
|
83
86
|
export * from "./reconciledfeatureremoved.js";
|
|
84
87
|
export * from "./reconciledfeatureskipped.js";
|
|
85
88
|
export * from "./replacescheduleintervalsrequest.js";
|
|
89
|
+
export * from "./resolveditem.js";
|
|
86
90
|
export * from "./revenuesummaryresponse.js";
|
|
87
91
|
export * from "./revenuetrendbucket.js";
|
|
88
92
|
export * from "./rulecondition.js";
|
|
@@ -103,6 +107,7 @@ export * from "./subscriptionmetadata.js";
|
|
|
103
107
|
export * from "./subscriptionportal.js";
|
|
104
108
|
export * from "./subscriptionreconciliation.js";
|
|
105
109
|
export * from "./testclock.js";
|
|
110
|
+
export * from "./transitionplanversionrequest.js";
|
|
106
111
|
export * from "./updateapprovalrequest.js";
|
|
107
112
|
export * from "./updatebillingschedulerequest.js";
|
|
108
113
|
export * from "./updateorderlineitemrequest.js";
|
package/src/models/invoice.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
InvoiceLineItem,
|
|
12
12
|
InvoiceLineItem$inboundSchema,
|
|
13
13
|
} from "./invoicelineitem.js";
|
|
14
|
+
import { ResolvedItem, ResolvedItem$inboundSchema } from "./resolveditem.js";
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* The object type
|
|
@@ -24,7 +25,7 @@ export const InvoiceObject = {
|
|
|
24
25
|
export type InvoiceObject = ClosedEnum<typeof InvoiceObject>;
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
|
-
* Line items (only present if expand=lineItems query parameter is provided)
|
|
28
|
+
* Line items (only present if expand=lineItems query parameter is provided, or if expand=items is, which implies it)
|
|
28
29
|
*/
|
|
29
30
|
export type InvoiceLineItems = {
|
|
30
31
|
/**
|
|
@@ -35,6 +36,10 @@ export type InvoiceLineItems = {
|
|
|
35
36
|
* Array of line items for this page
|
|
36
37
|
*/
|
|
37
38
|
lineItems: Array<InvoiceLineItem>;
|
|
39
|
+
/**
|
|
40
|
+
* Items the returned lines were tagged with, each appearing once, ordered by id. Only present when expand=items is requested. Scoped to the lines in THIS response, not the whole invoice — combine the collections across pages for an invoice-wide set. Join a line to its entry via the line's itemId. A line whose itemId has no entry here is a data-integrity fault — the tag points at an item that no longer resolves for this merchant. It is not the same as an untagged line and must not be counted as unmapped; report it.
|
|
41
|
+
*/
|
|
42
|
+
items?: Array<ResolvedItem> | undefined;
|
|
38
43
|
/**
|
|
39
44
|
* Token for fetching the next page, null if no more pages
|
|
40
45
|
*/
|
|
@@ -154,7 +159,7 @@ export type Invoice = {
|
|
|
154
159
|
*/
|
|
155
160
|
itemCount: number;
|
|
156
161
|
/**
|
|
157
|
-
* Line items (only present if expand=lineItems query parameter is provided)
|
|
162
|
+
* Line items (only present if expand=lineItems query parameter is provided, or if expand=items is, which implies it)
|
|
158
163
|
*/
|
|
159
164
|
lineItems?: InvoiceLineItems | null | undefined;
|
|
160
165
|
/**
|
|
@@ -252,6 +257,7 @@ export const InvoiceLineItems$inboundSchema: z.ZodType<
|
|
|
252
257
|
> = z.object({
|
|
253
258
|
invoiceId: z.string(),
|
|
254
259
|
lineItems: z.array(InvoiceLineItem$inboundSchema),
|
|
260
|
+
items: z.array(ResolvedItem$inboundSchema).optional(),
|
|
255
261
|
nextPageToken: z.nullable(z.string()).optional(),
|
|
256
262
|
totalCount: z.number().int(),
|
|
257
263
|
});
|
|
@@ -52,6 +52,14 @@ export type InvoiceLineItem = {
|
|
|
52
52
|
* HOTFIX: Mirrors eventSourceId for backward compatibility
|
|
53
53
|
*/
|
|
54
54
|
billableMetricId: string;
|
|
55
|
+
/**
|
|
56
|
+
* Item the line's charge was tagged with, recorded when the line was generated and not re-resolved on read. A discount line carries the same item as the charge it offsets. `null` means the charge carried no tag at that moment, the line predates item stamping, or the line has no originating charge (a grant-credit purchase) — it is an expected value, not an error. Use `priceId` to tell those cases apart.
|
|
57
|
+
*/
|
|
58
|
+
itemId?: string | null | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* The price this line was generated from, or `null` when the line has no originating charge. With `itemId` it says whether a missing tag is fixable: `priceId` set and `itemId` null means the charge was simply untagged, which tagging it and restamping resolves; both null means the line records a grant-credit purchase, which is deferred revenue and is never tagged. Any measure of outstanding mapping work must exclude the latter or it can never reach zero.
|
|
61
|
+
*/
|
|
62
|
+
priceId?: string | null | undefined;
|
|
55
63
|
/**
|
|
56
64
|
* Display name for this line item on invoices
|
|
57
65
|
*/
|
|
@@ -121,6 +129,8 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
|
121
129
|
eventId: z.string(),
|
|
122
130
|
eventSourceId: z.string(),
|
|
123
131
|
billableMetricId: z.string(),
|
|
132
|
+
itemId: z.nullable(z.string()).optional(),
|
|
133
|
+
priceId: z.nullable(z.string()).optional(),
|
|
124
134
|
invoiceDisplayName: z.string(),
|
|
125
135
|
lineItemType: InvoiceLineItemLineItemType$inboundSchema,
|
|
126
136
|
meterEventId: z.string(),
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
InvoiceLineItem,
|
|
11
11
|
InvoiceLineItem$inboundSchema,
|
|
12
12
|
} from "./invoicelineitem.js";
|
|
13
|
+
import { ResolvedItem, ResolvedItem$inboundSchema } from "./resolveditem.js";
|
|
13
14
|
|
|
14
15
|
export type InvoiceLineItemsResponse = {
|
|
15
16
|
/**
|
|
@@ -20,6 +21,10 @@ export type InvoiceLineItemsResponse = {
|
|
|
20
21
|
* Array of line items for this page
|
|
21
22
|
*/
|
|
22
23
|
lineItems: Array<InvoiceLineItem>;
|
|
24
|
+
/**
|
|
25
|
+
* Items the returned lines were tagged with, each appearing once, ordered by id. Only present when expand=items is requested. Scoped to the lines in THIS response, not the whole invoice — combine the collections across pages for an invoice-wide set. Join a line to its entry via the line's itemId. A line whose itemId has no entry here is a data-integrity fault — the tag points at an item that no longer resolves for this merchant. It is not the same as an untagged line and must not be counted as unmapped; report it.
|
|
26
|
+
*/
|
|
27
|
+
items?: Array<ResolvedItem> | undefined;
|
|
23
28
|
/**
|
|
24
29
|
* Token for fetching the next page, null if no more pages
|
|
25
30
|
*/
|
|
@@ -38,6 +43,7 @@ export const InvoiceLineItemsResponse$inboundSchema: z.ZodType<
|
|
|
38
43
|
> = z.object({
|
|
39
44
|
invoiceId: z.string(),
|
|
40
45
|
lineItems: z.array(InvoiceLineItem$inboundSchema),
|
|
46
|
+
items: z.array(ResolvedItem$inboundSchema).optional(),
|
|
41
47
|
nextPageToken: z.nullable(z.string()).optional(),
|
|
42
48
|
totalCount: z.number().int(),
|
|
43
49
|
});
|
package/src/models/item.ts
CHANGED
|
@@ -18,12 +18,23 @@ export const ItemObject = {
|
|
|
18
18
|
export type ItemObject = ClosedEnum<typeof ItemObject>;
|
|
19
19
|
|
|
20
20
|
export type Item = {
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier for an item
|
|
23
|
+
*/
|
|
21
24
|
id: string;
|
|
22
25
|
object: ItemObject;
|
|
23
26
|
merchantId: string;
|
|
24
27
|
name: string;
|
|
25
28
|
metadata: { [k: string]: any };
|
|
26
29
|
externalReferences: Array<ExternalReference>;
|
|
30
|
+
/**
|
|
31
|
+
* The product this item belongs to.
|
|
32
|
+
*/
|
|
33
|
+
catalogId: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* When this item was retired from the catalog. Null while active.
|
|
36
|
+
*/
|
|
37
|
+
archivedAt: Date | null;
|
|
27
38
|
createdAt: Date;
|
|
28
39
|
updatedAt: Date;
|
|
29
40
|
};
|
|
@@ -41,6 +52,10 @@ export const Item$inboundSchema: z.ZodType<Item, z.ZodTypeDef, unknown> = z
|
|
|
41
52
|
name: z.string(),
|
|
42
53
|
metadata: z.record(z.any()),
|
|
43
54
|
externalReferences: z.array(ExternalReference$inboundSchema),
|
|
55
|
+
catalogId: z.nullable(z.string()),
|
|
56
|
+
archivedAt: z.nullable(
|
|
57
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
58
|
+
),
|
|
44
59
|
createdAt: z.string().datetime({ offset: true }).transform(v =>
|
|
45
60
|
new Date(v)
|
|
46
61
|
),
|
package/src/models/lineitem.ts
CHANGED
|
@@ -35,14 +35,14 @@ export const LineItemStatus = {
|
|
|
35
35
|
export type LineItemStatus = ClosedEnum<typeof LineItemStatus>;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* Payment term for fee items. Null for metered/manual lines
|
|
38
|
+
* Payment term for fee items. Null for metered/manual lines. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
39
39
|
*/
|
|
40
40
|
export const LineItemPaymentTerm = {
|
|
41
41
|
InAdvance: "in_advance",
|
|
42
42
|
InArrears: "in_arrears",
|
|
43
43
|
} as const;
|
|
44
44
|
/**
|
|
45
|
-
* Payment term for fee items. Null for metered/manual lines
|
|
45
|
+
* Payment term for fee items. Null for metered/manual lines. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
46
46
|
*/
|
|
47
47
|
export type LineItemPaymentTerm = ClosedEnum<typeof LineItemPaymentTerm>;
|
|
48
48
|
|
|
@@ -60,9 +60,13 @@ export type LineItem = {
|
|
|
60
60
|
*/
|
|
61
61
|
customerId: string;
|
|
62
62
|
/**
|
|
63
|
-
* The price
|
|
63
|
+
* The price this line was generated from, or `null` when the line has no originating charge. With `itemId` it says whether a missing tag is fixable: `priceId` set and `itemId` null means the charge was simply untagged, which tagging it and restamping resolves; both null means the line records a grant-credit purchase, which is deferred revenue and is never tagged. Any measure of outstanding mapping work must exclude the latter or it can never reach zero.
|
|
64
64
|
*/
|
|
65
65
|
priceId?: string | null | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Item the line's charge was tagged with, recorded when the line was generated and not re-resolved on read. `null` means the charge carried no tag at that moment, the line predates item stamping, or the line has no originating charge (a grant-credit purchase) — it is an expected value, not an error. Use `priceId` to tell those cases apart.
|
|
68
|
+
*/
|
|
69
|
+
itemId?: string | null | undefined;
|
|
66
70
|
/**
|
|
67
71
|
* The invoice ID if this item has been invoiced
|
|
68
72
|
*/
|
|
@@ -116,7 +120,7 @@ export type LineItem = {
|
|
|
116
120
|
*/
|
|
117
121
|
meteredQuantity?: string | null | undefined;
|
|
118
122
|
/**
|
|
119
|
-
* Payment term for fee items. Null for metered/manual lines
|
|
123
|
+
* Payment term for fee items. Null for metered/manual lines. `null` is listed in the enum as well as via `nullable` because OpenAPI 3.0 validators check the enum independently — `nullable: true` alone does not admit it, and createLineItem (which always returns null here) was emitting a schema-violating body.
|
|
120
124
|
*/
|
|
121
125
|
paymentTerm?: LineItemPaymentTerm | null | undefined;
|
|
122
126
|
/**
|
|
@@ -173,6 +177,7 @@ export const LineItem$inboundSchema: z.ZodType<
|
|
|
173
177
|
subscriptionId: z.string(),
|
|
174
178
|
customerId: z.string(),
|
|
175
179
|
priceId: z.nullable(z.string()).optional(),
|
|
180
|
+
itemId: z.nullable(z.string()).optional(),
|
|
176
181
|
invoiceId: z.nullable(z.string()).optional(),
|
|
177
182
|
type: LineItemType$inboundSchema,
|
|
178
183
|
status: LineItemStatus$inboundSchema,
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
LineItemsSummary,
|
|
13
13
|
LineItemsSummary$inboundSchema,
|
|
14
14
|
} from "./lineitemssummary.js";
|
|
15
|
+
import { ResolvedItem, ResolvedItem$inboundSchema } from "./resolveditem.js";
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* The object type
|
|
@@ -35,6 +36,10 @@ export type LineItemsResponse = {
|
|
|
35
36
|
* Array of line items
|
|
36
37
|
*/
|
|
37
38
|
data: Array<LineItem>;
|
|
39
|
+
/**
|
|
40
|
+
* Items the returned lines were tagged with, each appearing once, ordered by id. Only present when expand=items is requested. Scoped to the lines in THIS response, not to any invoice as a whole — combine the collections across pages for a complete set. Join a line to its entry via the line's itemId. A line whose itemId has no entry here is a data-integrity fault — the tag points at an item that no longer resolves for this merchant. It is not the same as an untagged line and must not be counted as unmapped; report it.
|
|
41
|
+
*/
|
|
42
|
+
items?: Array<ResolvedItem> | undefined;
|
|
38
43
|
/**
|
|
39
44
|
* Total number of matching line items
|
|
40
45
|
*/
|
|
@@ -55,6 +60,7 @@ export const LineItemsResponse$inboundSchema: z.ZodType<
|
|
|
55
60
|
> = z.object({
|
|
56
61
|
object: LineItemsResponseObject$inboundSchema,
|
|
57
62
|
data: z.array(LineItem$inboundSchema),
|
|
63
|
+
items: z.array(ResolvedItem$inboundSchema).optional(),
|
|
58
64
|
totalCount: z.number().int(),
|
|
59
65
|
summary: LineItemsSummary$inboundSchema,
|
|
60
66
|
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type ReplacePrice = {
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier for a price
|
|
10
|
+
*/
|
|
11
|
+
replacesPriceId: string;
|
|
12
|
+
/**
|
|
13
|
+
* Unique identifier for a price
|
|
14
|
+
*/
|
|
15
|
+
withPriceId: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A reference-by-id price diff applied to the prices of the plan's current version. Every id references an existing price created via POST /prices; inline price definitions are not accepted. A mint must carry at least one price change, so an empty body is rejected. A version must carry at least one price, so a diff that would leave none is rejected.
|
|
20
|
+
*/
|
|
21
|
+
export type MintPlanVersionRequest = {
|
|
22
|
+
/**
|
|
23
|
+
* Prices to add to the version. Each must not already be on the plan's current version.
|
|
24
|
+
*/
|
|
25
|
+
addPrices?: Array<string> | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Prices to remove. Each must be on the plan's current version.
|
|
28
|
+
*/
|
|
29
|
+
removePrices?: Array<string> | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Prices to swap in place, preserving the slot's lineage so the price keeps its identity where the plan is configured for stable price ids. replacesPriceId must be on the plan's current version; withPriceId is the new price.
|
|
32
|
+
*/
|
|
33
|
+
replacePrices?: Array<ReplacePrice> | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type ReplacePrice$Outbound = {
|
|
38
|
+
replacesPriceId: string;
|
|
39
|
+
withPriceId: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const ReplacePrice$outboundSchema: z.ZodType<
|
|
44
|
+
ReplacePrice$Outbound,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
ReplacePrice
|
|
47
|
+
> = z.object({
|
|
48
|
+
replacesPriceId: z.string(),
|
|
49
|
+
withPriceId: z.string(),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export function replacePriceToJSON(replacePrice: ReplacePrice): string {
|
|
53
|
+
return JSON.stringify(ReplacePrice$outboundSchema.parse(replacePrice));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export type MintPlanVersionRequest$Outbound = {
|
|
58
|
+
addPrices?: Array<string> | undefined;
|
|
59
|
+
removePrices?: Array<string> | undefined;
|
|
60
|
+
replacePrices?: Array<ReplacePrice$Outbound> | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const MintPlanVersionRequest$outboundSchema: z.ZodType<
|
|
65
|
+
MintPlanVersionRequest$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
MintPlanVersionRequest
|
|
68
|
+
> = z.object({
|
|
69
|
+
addPrices: z.array(z.string()).optional(),
|
|
70
|
+
removePrices: z.array(z.string()).optional(),
|
|
71
|
+
replacePrices: z.array(z.lazy(() => ReplacePrice$outboundSchema)).optional(),
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export function mintPlanVersionRequestToJSON(
|
|
75
|
+
mintPlanVersionRequest: MintPlanVersionRequest,
|
|
76
|
+
): string {
|
|
77
|
+
return JSON.stringify(
|
|
78
|
+
MintPlanVersionRequest$outboundSchema.parse(mintPlanVersionRequest),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -44,7 +44,11 @@ export type CreateBillableMetricRequest = {
|
|
|
44
44
|
/**
|
|
45
45
|
* Unique identifier for a product
|
|
46
46
|
*/
|
|
47
|
-
productId
|
|
47
|
+
productId?: string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Unique identifier for an item
|
|
50
|
+
*/
|
|
51
|
+
itemId?: string | undefined;
|
|
48
52
|
/**
|
|
49
53
|
* Measurement unit used when aggregating this metric's values. Common examples: 'tokens', 'GB', 'calls', 'images', 'hours', 'TB', 'queries', 'requests'
|
|
50
54
|
*/
|
|
@@ -78,7 +82,8 @@ export type CreateBillableMetricRequest$Outbound = {
|
|
|
78
82
|
description: string;
|
|
79
83
|
merchantId: string;
|
|
80
84
|
name: string;
|
|
81
|
-
productId
|
|
85
|
+
productId?: string | undefined;
|
|
86
|
+
itemId?: string | undefined;
|
|
82
87
|
unit: string;
|
|
83
88
|
eventType?: string | undefined;
|
|
84
89
|
valueProperty?: string | undefined;
|
|
@@ -96,7 +101,8 @@ export const CreateBillableMetricRequest$outboundSchema: z.ZodType<
|
|
|
96
101
|
description: z.string(),
|
|
97
102
|
merchantId: z.string(),
|
|
98
103
|
name: z.string(),
|
|
99
|
-
productId: z.string(),
|
|
104
|
+
productId: z.string().optional(),
|
|
105
|
+
itemId: z.string().optional(),
|
|
100
106
|
unit: z.string(),
|
|
101
107
|
eventType: z.string().optional(),
|
|
102
108
|
valueProperty: z.string().optional(),
|