@paygentic/sdk 0.8.6 → 0.9.0
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/README.md +5 -4
- package/dist/commonjs/funcs/billableMetricsList.js +1 -0
- package/dist/commonjs/funcs/billableMetricsList.js.map +1 -1
- package/dist/commonjs/funcs/billableMetricsUpdate.d.ts +1 -1
- package/dist/commonjs/funcs/billableMetricsUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/billableMetricsUpdate.js +2 -2
- package/dist/commonjs/funcs/billableMetricsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/feesList.js +1 -0
- package/dist/commonjs/funcs/feesList.js.map +1 -1
- package/dist/commonjs/funcs/feesUpdate.d.ts +1 -1
- package/dist/commonjs/funcs/feesUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/feesUpdate.js +2 -2
- package/dist/commonjs/funcs/feesUpdate.js.map +1 -1
- package/dist/commonjs/funcs/invoicesV2DownloadInvoicePdf.d.ts +18 -0
- package/dist/commonjs/funcs/invoicesV2DownloadInvoicePdf.d.ts.map +1 -0
- package/dist/commonjs/funcs/{itemsDeleteItem.js → invoicesV2DownloadInvoicePdf.js} +15 -10
- package/dist/commonjs/funcs/invoicesV2DownloadInvoicePdf.js.map +1 -0
- package/dist/commonjs/funcs/invoicesV2Get.js +1 -0
- package/dist/commonjs/funcs/invoicesV2Get.js.map +1 -1
- package/dist/commonjs/funcs/invoicesV2GetLineItems.js +2 -0
- 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/itemsListItems.js +2 -0
- package/dist/commonjs/funcs/itemsListItems.js.map +1 -1
- package/dist/commonjs/funcs/pricesDelete.d.ts +1 -1
- package/dist/commonjs/funcs/pricesDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/pricesDelete.js +2 -2
- package/dist/commonjs/funcs/pricesDelete.js.map +1 -1
- package/dist/commonjs/funcs/pricesList.js +3 -2
- package/dist/commonjs/funcs/pricesList.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/costusageresponse.d.ts +4 -0
- package/dist/commonjs/models/costusageresponse.d.ts.map +1 -1
- package/dist/commonjs/models/costusageresponse.js +1 -0
- package/dist/commonjs/models/costusageresponse.js.map +1 -1
- package/dist/commonjs/models/createbillingschedulerequest.d.ts +3 -0
- package/dist/commonjs/models/createbillingschedulerequest.d.ts.map +1 -1
- package/dist/commonjs/models/createbillingschedulerequest.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/errors/deleteprice.d.ts +28 -0
- package/dist/commonjs/models/errors/deleteprice.d.ts.map +1 -0
- package/dist/commonjs/models/errors/deleteprice.js +75 -0
- package/dist/commonjs/models/errors/deleteprice.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.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 +2 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +2 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoice.d.ts +25 -3
- package/dist/commonjs/models/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/invoice.js +14 -1
- 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/mappingcapabilities.d.ts +26 -0
- package/dist/commonjs/models/mappingcapabilities.d.ts.map +1 -0
- package/dist/commonjs/models/mappingcapabilities.js +51 -0
- package/dist/commonjs/models/mappingcapabilities.js.map +1 -0
- package/dist/commonjs/models/merchantintegration.d.ts +12 -1
- package/dist/commonjs/models/merchantintegration.d.ts.map +1 -1
- package/dist/commonjs/models/merchantintegration.js +2 -0
- package/dist/commonjs/models/merchantintegration.js.map +1 -1
- package/dist/commonjs/models/merchantintegrationprovider.d.ts +4 -2
- package/dist/commonjs/models/merchantintegrationprovider.d.ts.map +1 -1
- package/dist/commonjs/models/merchantintegrationprovider.js +3 -1
- package/dist/commonjs/models/merchantintegrationprovider.js.map +1 -1
- package/dist/commonjs/models/mintplanversionrequest.d.ts +1 -1
- 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/createexternalreference.d.ts +17 -4
- package/dist/commonjs/models/operations/createexternalreference.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createexternalreference.js +3 -2
- package/dist/commonjs/models/operations/createexternalreference.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/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/deletecustomer.d.ts +4 -4
- package/dist/commonjs/models/operations/deletecustomer.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deletecustomer.js +6 -7
- package/dist/commonjs/models/operations/deletecustomer.js.map +1 -1
- package/dist/commonjs/models/operations/deletefee.d.ts +8 -0
- package/dist/commonjs/models/operations/deletefee.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deletefee.js +11 -1
- package/dist/commonjs/models/operations/deletefee.js.map +1 -1
- package/dist/commonjs/models/operations/deleteprice.d.ts +25 -0
- package/dist/commonjs/models/operations/deleteprice.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deleteprice.js +31 -1
- package/dist/commonjs/models/operations/deleteprice.js.map +1 -1
- package/dist/commonjs/models/operations/downloadinvoicepdf.d.ts +15 -0
- package/dist/commonjs/models/operations/downloadinvoicepdf.d.ts.map +1 -0
- package/dist/commonjs/models/operations/{deleteitem.js → downloadinvoicepdf.js} +6 -6
- package/dist/commonjs/models/operations/downloadinvoicepdf.js.map +1 -0
- package/dist/commonjs/models/operations/getinvoice.d.ts +6 -1
- 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 +10 -0
- 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/index.d.ts +1 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -1
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listbillablemetrics.d.ts +5 -0
- package/dist/commonjs/models/operations/listbillablemetrics.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listbillablemetrics.js +1 -0
- package/dist/commonjs/models/operations/listbillablemetrics.js.map +1 -1
- package/dist/commonjs/models/operations/listfees.d.ts +5 -0
- package/dist/commonjs/models/operations/listfees.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listfees.js +1 -0
- package/dist/commonjs/models/operations/listfees.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/listprices.d.ts +5 -0
- package/dist/commonjs/models/operations/listprices.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listprices.js +1 -0
- package/dist/commonjs/models/operations/listprices.js.map +1 -1
- 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/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/operations/upsertmerchantintegration.d.ts +1 -1
- package/dist/commonjs/models/planversion.d.ts +3 -4
- package/dist/commonjs/models/planversion.d.ts.map +1 -1
- package/dist/commonjs/models/planversion.js +0 -1
- package/dist/commonjs/models/planversion.js.map +1 -1
- package/dist/commonjs/models/planversionpriceslot.d.ts +1 -1
- package/dist/commonjs/models/planversionsummary.d.ts +1 -2
- package/dist/commonjs/models/planversionsummary.d.ts.map +1 -1
- package/dist/commonjs/models/planversionsummary.js +0 -1
- package/dist/commonjs/models/planversionsummary.js.map +1 -1
- package/dist/commonjs/models/reconciledfeaturefailed.d.ts +4 -3
- package/dist/commonjs/models/reconciledfeaturefailed.d.ts.map +1 -1
- package/dist/commonjs/models/reconciledfeaturefailed.js +2 -1
- package/dist/commonjs/models/reconciledfeaturefailed.js.map +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/schemasbillingschedule.d.ts +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/sdk/invoicesv2.d.ts +7 -0
- package/dist/commonjs/sdk/invoicesv2.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoicesv2.js +10 -0
- package/dist/commonjs/sdk/invoicesv2.js.map +1 -1
- package/dist/commonjs/sdk/items.d.ts +0 -4
- package/dist/commonjs/sdk/items.d.ts.map +1 -1
- package/dist/commonjs/sdk/items.js +0 -7
- package/dist/commonjs/sdk/items.js.map +1 -1
- package/dist/esm/funcs/billableMetricsList.js +1 -0
- package/dist/esm/funcs/billableMetricsList.js.map +1 -1
- package/dist/esm/funcs/billableMetricsUpdate.d.ts +1 -1
- package/dist/esm/funcs/billableMetricsUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/billableMetricsUpdate.js +2 -2
- package/dist/esm/funcs/billableMetricsUpdate.js.map +1 -1
- package/dist/esm/funcs/feesList.js +1 -0
- package/dist/esm/funcs/feesList.js.map +1 -1
- package/dist/esm/funcs/feesUpdate.d.ts +1 -1
- package/dist/esm/funcs/feesUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/feesUpdate.js +2 -2
- package/dist/esm/funcs/feesUpdate.js.map +1 -1
- package/dist/esm/funcs/invoicesV2DownloadInvoicePdf.d.ts +18 -0
- package/dist/esm/funcs/invoicesV2DownloadInvoicePdf.d.ts.map +1 -0
- package/dist/esm/funcs/{itemsDeleteItem.js → invoicesV2DownloadInvoicePdf.js} +14 -9
- package/dist/esm/funcs/invoicesV2DownloadInvoicePdf.js.map +1 -0
- package/dist/esm/funcs/invoicesV2Get.js +1 -0
- package/dist/esm/funcs/invoicesV2Get.js.map +1 -1
- package/dist/esm/funcs/invoicesV2GetLineItems.js +2 -0
- 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/itemsListItems.js +2 -0
- package/dist/esm/funcs/itemsListItems.js.map +1 -1
- package/dist/esm/funcs/pricesDelete.d.ts +1 -1
- package/dist/esm/funcs/pricesDelete.d.ts.map +1 -1
- package/dist/esm/funcs/pricesDelete.js +2 -2
- package/dist/esm/funcs/pricesDelete.js.map +1 -1
- package/dist/esm/funcs/pricesList.js +3 -2
- package/dist/esm/funcs/pricesList.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/costusageresponse.d.ts +4 -0
- package/dist/esm/models/costusageresponse.d.ts.map +1 -1
- package/dist/esm/models/costusageresponse.js +1 -0
- package/dist/esm/models/costusageresponse.js.map +1 -1
- package/dist/esm/models/createbillingschedulerequest.d.ts +3 -0
- package/dist/esm/models/createbillingschedulerequest.d.ts.map +1 -1
- package/dist/esm/models/createbillingschedulerequest.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/errors/deleteprice.d.ts +28 -0
- package/dist/esm/models/errors/deleteprice.d.ts.map +1 -0
- package/dist/esm/models/errors/deleteprice.js +38 -0
- package/dist/esm/models/errors/deleteprice.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.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 +2 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoice.d.ts +25 -3
- package/dist/esm/models/invoice.d.ts.map +1 -1
- package/dist/esm/models/invoice.js +13 -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/mappingcapabilities.d.ts +26 -0
- package/dist/esm/models/mappingcapabilities.d.ts.map +1 -0
- package/dist/esm/models/mappingcapabilities.js +14 -0
- package/dist/esm/models/mappingcapabilities.js.map +1 -0
- package/dist/esm/models/merchantintegration.d.ts +12 -1
- package/dist/esm/models/merchantintegration.d.ts.map +1 -1
- package/dist/esm/models/merchantintegration.js +2 -0
- package/dist/esm/models/merchantintegration.js.map +1 -1
- package/dist/esm/models/merchantintegrationprovider.d.ts +4 -2
- package/dist/esm/models/merchantintegrationprovider.d.ts.map +1 -1
- package/dist/esm/models/merchantintegrationprovider.js +3 -1
- package/dist/esm/models/merchantintegrationprovider.js.map +1 -1
- package/dist/esm/models/mintplanversionrequest.d.ts +1 -1
- 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/createexternalreference.d.ts +17 -4
- package/dist/esm/models/operations/createexternalreference.d.ts.map +1 -1
- package/dist/esm/models/operations/createexternalreference.js +3 -2
- package/dist/esm/models/operations/createexternalreference.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/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/deletecustomer.d.ts +4 -4
- package/dist/esm/models/operations/deletecustomer.d.ts.map +1 -1
- package/dist/esm/models/operations/deletecustomer.js +4 -5
- package/dist/esm/models/operations/deletecustomer.js.map +1 -1
- package/dist/esm/models/operations/deletefee.d.ts +8 -0
- package/dist/esm/models/operations/deletefee.d.ts.map +1 -1
- package/dist/esm/models/operations/deletefee.js +9 -0
- package/dist/esm/models/operations/deletefee.js.map +1 -1
- package/dist/esm/models/operations/deleteprice.d.ts +25 -0
- package/dist/esm/models/operations/deleteprice.d.ts.map +1 -1
- package/dist/esm/models/operations/deleteprice.js +27 -0
- package/dist/esm/models/operations/deleteprice.js.map +1 -1
- package/dist/esm/models/operations/downloadinvoicepdf.d.ts +15 -0
- package/dist/esm/models/operations/downloadinvoicepdf.d.ts.map +1 -0
- package/dist/esm/models/operations/downloadinvoicepdf.js +12 -0
- package/dist/esm/models/operations/downloadinvoicepdf.js.map +1 -0
- package/dist/esm/models/operations/getinvoice.d.ts +6 -1
- 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 +10 -0
- 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/index.d.ts +1 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listbillablemetrics.d.ts +5 -0
- package/dist/esm/models/operations/listbillablemetrics.d.ts.map +1 -1
- package/dist/esm/models/operations/listbillablemetrics.js +1 -0
- package/dist/esm/models/operations/listbillablemetrics.js.map +1 -1
- package/dist/esm/models/operations/listfees.d.ts +5 -0
- package/dist/esm/models/operations/listfees.d.ts.map +1 -1
- package/dist/esm/models/operations/listfees.js +1 -0
- package/dist/esm/models/operations/listfees.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/listprices.d.ts +5 -0
- package/dist/esm/models/operations/listprices.d.ts.map +1 -1
- package/dist/esm/models/operations/listprices.js +1 -0
- package/dist/esm/models/operations/listprices.js.map +1 -1
- 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/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/operations/upsertmerchantintegration.d.ts +1 -1
- package/dist/esm/models/planversion.d.ts +3 -4
- package/dist/esm/models/planversion.d.ts.map +1 -1
- package/dist/esm/models/planversion.js +0 -1
- package/dist/esm/models/planversion.js.map +1 -1
- package/dist/esm/models/planversionpriceslot.d.ts +1 -1
- package/dist/esm/models/planversionsummary.d.ts +1 -2
- package/dist/esm/models/planversionsummary.d.ts.map +1 -1
- package/dist/esm/models/planversionsummary.js +0 -1
- package/dist/esm/models/planversionsummary.js.map +1 -1
- package/dist/esm/models/reconciledfeaturefailed.d.ts +4 -3
- package/dist/esm/models/reconciledfeaturefailed.d.ts.map +1 -1
- package/dist/esm/models/reconciledfeaturefailed.js +2 -1
- package/dist/esm/models/reconciledfeaturefailed.js.map +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/schemasbillingschedule.d.ts +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/sdk/invoicesv2.d.ts +7 -0
- package/dist/esm/sdk/invoicesv2.d.ts.map +1 -1
- package/dist/esm/sdk/invoicesv2.js +10 -0
- package/dist/esm/sdk/invoicesv2.js.map +1 -1
- package/dist/esm/sdk/items.d.ts +0 -4
- package/dist/esm/sdk/items.d.ts.map +1 -1
- package/dist/esm/sdk/items.js +0 -7
- package/dist/esm/sdk/items.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/billableMetricsList.ts +1 -0
- package/src/funcs/billableMetricsUpdate.ts +6 -2
- package/src/funcs/feesList.ts +1 -0
- package/src/funcs/feesUpdate.ts +6 -2
- package/src/funcs/{itemsDeleteItem.ts → invoicesV2DownloadInvoicePdf.ts} +18 -13
- package/src/funcs/invoicesV2Get.ts +1 -0
- package/src/funcs/invoicesV2GetLineItems.ts +2 -0
- package/src/funcs/invoicesV2ListLineItems.ts +2 -0
- package/src/funcs/itemsCreateItem.ts +2 -2
- package/src/funcs/itemsListItems.ts +2 -0
- package/src/funcs/pricesDelete.ts +5 -1
- package/src/funcs/pricesList.ts +3 -2
- package/src/lib/config.ts +2 -2
- package/src/models/billablemetric.ts +5 -0
- package/src/models/costusageresponse.ts +5 -0
- package/src/models/createbillingschedulerequest.ts +3 -0
- package/src/models/createmanuallineitemrequest.ts +6 -0
- package/src/models/errors/deleteprice.ts +61 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/fee.ts +5 -0
- package/src/models/index.ts +2 -0
- package/src/models/invoice.ts +30 -3
- 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/mappingcapabilities.ts +48 -0
- package/src/models/merchantintegration.ts +16 -1
- package/src/models/merchantintegrationprovider.ts +4 -2
- package/src/models/mintplanversionrequest.ts +1 -1
- package/src/models/operations/createbillablemetric.ts +9 -3
- package/src/models/operations/createexternalreference.ts +20 -6
- package/src/models/operations/createfee.ts +9 -3
- package/src/models/operations/createitem.ts +6 -0
- package/src/models/operations/createsubscription.ts +6 -2
- package/src/models/operations/deletecustomer.ts +15 -12
- package/src/models/operations/deletefee.ts +27 -0
- package/src/models/operations/deleteprice.ts +82 -0
- package/src/models/operations/downloadinvoicepdf.ts +34 -0
- package/src/models/operations/getinvoice.ts +7 -1
- package/src/models/operations/getinvoicelineitems.ts +12 -0
- package/src/models/operations/index.ts +1 -1
- package/src/models/operations/listbillablemetrics.ts +6 -0
- package/src/models/operations/listfees.ts +6 -0
- package/src/models/operations/listitems.ts +12 -0
- package/src/models/operations/listlineitems.ts +12 -0
- package/src/models/operations/listprices.ts +6 -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/updatesubscription.ts +3 -1
- package/src/models/operations/upsertmerchantintegration.ts +1 -1
- package/src/models/planversion.ts +3 -4
- package/src/models/planversionpriceslot.ts +1 -1
- package/src/models/planversionsummary.ts +1 -2
- package/src/models/reconciledfeaturefailed.ts +4 -3
- package/src/models/resolveditem.ts +63 -0
- package/src/models/schemasbillingschedule.ts +1 -1
- package/src/models/subscription.ts +9 -3
- package/src/sdk/invoicesv2.ts +18 -0
- package/src/sdk/items.ts +0 -15
- package/dist/commonjs/funcs/itemsDeleteItem.d.ts +0 -15
- package/dist/commonjs/funcs/itemsDeleteItem.d.ts.map +0 -1
- package/dist/commonjs/funcs/itemsDeleteItem.js.map +0 -1
- package/dist/commonjs/models/operations/deleteitem.d.ts +0 -15
- package/dist/commonjs/models/operations/deleteitem.d.ts.map +0 -1
- package/dist/commonjs/models/operations/deleteitem.js.map +0 -1
- package/dist/esm/funcs/itemsDeleteItem.d.ts +0 -15
- package/dist/esm/funcs/itemsDeleteItem.d.ts.map +0 -1
- package/dist/esm/funcs/itemsDeleteItem.js.map +0 -1
- package/dist/esm/models/operations/deleteitem.d.ts +0 -15
- package/dist/esm/models/operations/deleteitem.d.ts.map +0 -1
- package/dist/esm/models/operations/deleteitem.js +0 -12
- package/dist/esm/models/operations/deleteitem.js.map +0 -1
- package/src/models/operations/deleteitem.ts +0 -34
|
@@ -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(),
|
|
@@ -46,6 +46,10 @@ export type CostUsageResponse = {
|
|
|
46
46
|
* CloudEvents type for metered costs.
|
|
47
47
|
*/
|
|
48
48
|
eventType?: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Unit label for metered costs (e.g. 'token', 'request'). Absent when the cost defines no unit.
|
|
51
|
+
*/
|
|
52
|
+
unit?: string | undefined;
|
|
49
53
|
/**
|
|
50
54
|
* Total cost for the query window. Null if usage data could not be computed.
|
|
51
55
|
*/
|
|
@@ -128,6 +132,7 @@ export const CostUsageResponse$inboundSchema: z.ZodType<
|
|
|
128
132
|
type: CostUsageResponseType$inboundSchema,
|
|
129
133
|
currency: z.string(),
|
|
130
134
|
eventType: z.string().optional(),
|
|
135
|
+
unit: z.string().optional(),
|
|
131
136
|
totalCost: z.nullable(z.number()),
|
|
132
137
|
totalQuantity: z.nullable(z.number()).optional(),
|
|
133
138
|
groups: z.array(z.lazy(() => Group$inboundSchema)).optional(),
|
|
@@ -36,6 +36,9 @@ export type CreateBillingScheduleRequestPeriodPreset = ClosedEnum<
|
|
|
36
36
|
|
|
37
37
|
export type CreateBillingScheduleRequest = {
|
|
38
38
|
orderId?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Not supported for creating a billing schedule. Use orderId — every billing schedule belongs to an order.
|
|
41
|
+
*/
|
|
39
42
|
subscriptionId?: string | undefined;
|
|
40
43
|
startDate: Date;
|
|
41
44
|
endDate: Date;
|
|
@@ -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(
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import * as operations from "../operations/index.js";
|
|
7
|
+
import { PaygenticError } from "./paygenticerror.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Price cannot be deleted because a live plan still references it
|
|
11
|
+
*/
|
|
12
|
+
export type DeletePriceConflictErrorData = {
|
|
13
|
+
error?: string | undefined;
|
|
14
|
+
message?: string | undefined;
|
|
15
|
+
details?: operations.DeletePriceDetails | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Price cannot be deleted because a live plan still references it
|
|
20
|
+
*/
|
|
21
|
+
export class DeletePriceConflictError extends PaygenticError {
|
|
22
|
+
error?: string | undefined;
|
|
23
|
+
details?: operations.DeletePriceDetails | undefined;
|
|
24
|
+
|
|
25
|
+
/** The original data that was passed to this error instance. */
|
|
26
|
+
data$: DeletePriceConflictErrorData;
|
|
27
|
+
|
|
28
|
+
constructor(
|
|
29
|
+
err: DeletePriceConflictErrorData,
|
|
30
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
31
|
+
) {
|
|
32
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
33
|
+
super(message, httpMeta);
|
|
34
|
+
this.data$ = err;
|
|
35
|
+
if (err.error != null) this.error = err.error;
|
|
36
|
+
if (err.details != null) this.details = err.details;
|
|
37
|
+
|
|
38
|
+
this.name = "DeletePriceConflictError";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const DeletePriceConflictError$inboundSchema: z.ZodType<
|
|
44
|
+
DeletePriceConflictError,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
unknown
|
|
47
|
+
> = z.object({
|
|
48
|
+
error: z.string().optional(),
|
|
49
|
+
message: z.string().optional(),
|
|
50
|
+
details: z.lazy(() => operations.DeletePriceDetails$inboundSchema).optional(),
|
|
51
|
+
request$: z.instanceof(Request),
|
|
52
|
+
response$: z.instanceof(Response),
|
|
53
|
+
body$: z.string(),
|
|
54
|
+
})
|
|
55
|
+
.transform((v) => {
|
|
56
|
+
return new DeletePriceConflictError(v, {
|
|
57
|
+
request: v.request$,
|
|
58
|
+
response: v.response$,
|
|
59
|
+
body: v.body$,
|
|
60
|
+
});
|
|
61
|
+
});
|
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
|
@@ -48,6 +48,7 @@ export * from "./item.js";
|
|
|
48
48
|
export * from "./lineitem.js";
|
|
49
49
|
export * from "./lineitemsresponse.js";
|
|
50
50
|
export * from "./lineitemssummary.js";
|
|
51
|
+
export * from "./mappingcapabilities.js";
|
|
51
52
|
export * from "./merchantintegration.js";
|
|
52
53
|
export * from "./merchantintegrationprovider.js";
|
|
53
54
|
export * from "./merchantintegrationstatus.js";
|
|
@@ -86,6 +87,7 @@ export * from "./reconciledfeaturefailed.js";
|
|
|
86
87
|
export * from "./reconciledfeatureremoved.js";
|
|
87
88
|
export * from "./reconciledfeatureskipped.js";
|
|
88
89
|
export * from "./replacescheduleintervalsrequest.js";
|
|
90
|
+
export * from "./resolveditem.js";
|
|
89
91
|
export * from "./revenuesummaryresponse.js";
|
|
90
92
|
export * from "./revenuetrendbucket.js";
|
|
91
93
|
export * from "./rulecondition.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
|
*/
|
|
@@ -45,6 +50,18 @@ export type InvoiceLineItems = {
|
|
|
45
50
|
totalCount: number;
|
|
46
51
|
};
|
|
47
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
55
|
+
*/
|
|
56
|
+
export const PdfSource = {
|
|
57
|
+
Paygentic: "paygentic",
|
|
58
|
+
TaxProvider: "tax_provider",
|
|
59
|
+
} as const;
|
|
60
|
+
/**
|
|
61
|
+
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
62
|
+
*/
|
|
63
|
+
export type PdfSource = ClosedEnum<typeof PdfSource>;
|
|
64
|
+
|
|
48
65
|
/**
|
|
49
66
|
* The current status of the invoice
|
|
50
67
|
*/
|
|
@@ -154,7 +171,7 @@ export type Invoice = {
|
|
|
154
171
|
*/
|
|
155
172
|
itemCount: number;
|
|
156
173
|
/**
|
|
157
|
-
* Line items (only present if expand=lineItems query parameter is provided)
|
|
174
|
+
* Line items (only present if expand=lineItems query parameter is provided, or if expand=items is, which implies it)
|
|
158
175
|
*/
|
|
159
176
|
lineItems?: InvoiceLineItems | null | undefined;
|
|
160
177
|
/**
|
|
@@ -186,9 +203,13 @@ export type Invoice = {
|
|
|
186
203
|
*/
|
|
187
204
|
paymentUrl?: string | null | undefined;
|
|
188
205
|
/**
|
|
189
|
-
*
|
|
206
|
+
* Link to the invoice document, or null when there is none. For Paygentic-rendered documents this is GET /v2/invoices/{id}/pdf, which requires authentication; for documents supplied by the tax provider it is the provider's own direct link. The URL is stable and does not expire. Branch on pdfSource rather than on the shape of this URL.
|
|
190
207
|
*/
|
|
191
208
|
pdfUrl?: string | null | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Who produced the document at pdfUrl, or null when there is none. `paygentic` means pdfUrl is this API's download endpoint and the request must carry your API key; `tax_provider` means it is the provider's own link, which opens directly in a browser.
|
|
211
|
+
*/
|
|
212
|
+
pdfSource?: PdfSource | null | undefined;
|
|
192
213
|
/**
|
|
193
214
|
* The end of the billing period
|
|
194
215
|
*/
|
|
@@ -252,6 +273,7 @@ export const InvoiceLineItems$inboundSchema: z.ZodType<
|
|
|
252
273
|
> = z.object({
|
|
253
274
|
invoiceId: z.string(),
|
|
254
275
|
lineItems: z.array(InvoiceLineItem$inboundSchema),
|
|
276
|
+
items: z.array(ResolvedItem$inboundSchema).optional(),
|
|
255
277
|
nextPageToken: z.nullable(z.string()).optional(),
|
|
256
278
|
totalCount: z.number().int(),
|
|
257
279
|
});
|
|
@@ -266,6 +288,10 @@ export function invoiceLineItemsFromJSON(
|
|
|
266
288
|
);
|
|
267
289
|
}
|
|
268
290
|
|
|
291
|
+
/** @internal */
|
|
292
|
+
export const PdfSource$inboundSchema: z.ZodNativeEnum<typeof PdfSource> = z
|
|
293
|
+
.nativeEnum(PdfSource);
|
|
294
|
+
|
|
269
295
|
/** @internal */
|
|
270
296
|
export const InvoiceStatus$inboundSchema: z.ZodNativeEnum<
|
|
271
297
|
typeof InvoiceStatus
|
|
@@ -333,6 +359,7 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
333
359
|
).optional(),
|
|
334
360
|
paymentUrl: z.nullable(z.string()).optional(),
|
|
335
361
|
pdfUrl: z.nullable(z.string()).optional(),
|
|
362
|
+
pdfSource: z.nullable(PdfSource$inboundSchema).optional(),
|
|
336
363
|
periodEnd: z.string().datetime({ offset: true }).transform(v =>
|
|
337
364
|
new Date(v)
|
|
338
365
|
),
|
|
@@ -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,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* What this provider does with an item's external codes.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*
|
|
15
|
+
* Two independent capabilities, not one direction: the behaviours are not alternatives. An integration can resolve an incoming item code *and* be sent a selected one on a different path, so a single `inbound`/`outbound` value would have to misdescribe it or forbid one of its operations.
|
|
16
|
+
*
|
|
17
|
+
* A capability that is not declared is unavailable rather than inferred. Declaring one does not make a provider connectable — that still requires its credentials and connection lifecycle.
|
|
18
|
+
*/
|
|
19
|
+
export type MappingCapabilities = {
|
|
20
|
+
/**
|
|
21
|
+
* A code arriving from this provider must name exactly one of the merchant's items. The lookup key is the code, so several codes may point at one item while each code resolves to one — which is why a code recorded for this purpose is claimed, and a second item claiming it is a conflict.
|
|
22
|
+
*/
|
|
23
|
+
resolvesItemCodes: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* A consumer needs one of an item's codes to send to this provider, and takes the item's designated one (`isDefault`). Because the lookup key is the item, several items may share one code — a chart of accounts exists so that many things sold roll into one account.
|
|
26
|
+
*/
|
|
27
|
+
sendsItemCodes: boolean;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const MappingCapabilities$inboundSchema: z.ZodType<
|
|
32
|
+
MappingCapabilities,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
resolvesItemCodes: z.boolean(),
|
|
37
|
+
sendsItemCodes: z.boolean(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function mappingCapabilitiesFromJSON(
|
|
41
|
+
jsonString: string,
|
|
42
|
+
): SafeParseResult<MappingCapabilities, SDKValidationError> {
|
|
43
|
+
return safeParse(
|
|
44
|
+
jsonString,
|
|
45
|
+
(x) => MappingCapabilities$inboundSchema.parse(JSON.parse(x)),
|
|
46
|
+
`Failed to parse 'MappingCapabilities' from JSON`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -7,6 +7,10 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
7
7
|
import { ClosedEnum } from "../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
MappingCapabilities,
|
|
12
|
+
MappingCapabilities$inboundSchema,
|
|
13
|
+
} from "./mappingcapabilities.js";
|
|
10
14
|
import {
|
|
11
15
|
MerchantIntegrationProvider,
|
|
12
16
|
MerchantIntegrationProvider$inboundSchema,
|
|
@@ -37,9 +41,19 @@ export type MerchantIntegration = {
|
|
|
37
41
|
*/
|
|
38
42
|
merchantId: string;
|
|
39
43
|
/**
|
|
40
|
-
* External provider a merchant can connect at the tenant level
|
|
44
|
+
* External provider a merchant can connect at the tenant level. `netsuite` and `accountsiq` are returned on reads wherever a connection exists, but connecting them is accepted only in local and development environments; elsewhere the connect request is refused with 404.
|
|
41
45
|
*/
|
|
42
46
|
provider: MerchantIntegrationProvider;
|
|
47
|
+
/**
|
|
48
|
+
* What this provider does with an item's external codes.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
*
|
|
52
|
+
* Two independent capabilities, not one direction: the behaviours are not alternatives. An integration can resolve an incoming item code *and* be sent a selected one on a different path, so a single `inbound`/`outbound` value would have to misdescribe it or forbid one of its operations.
|
|
53
|
+
*
|
|
54
|
+
* A capability that is not declared is unavailable rather than inferred. Declaring one does not make a provider connectable — that still requires its credentials and connection lifecycle.
|
|
55
|
+
*/
|
|
56
|
+
capabilities: MappingCapabilities;
|
|
43
57
|
/**
|
|
44
58
|
* Ampersand installation id.
|
|
45
59
|
*/
|
|
@@ -73,6 +87,7 @@ export const MerchantIntegration$inboundSchema: z.ZodType<
|
|
|
73
87
|
),
|
|
74
88
|
merchantId: z.string(),
|
|
75
89
|
provider: MerchantIntegrationProvider$inboundSchema,
|
|
90
|
+
capabilities: MappingCapabilities$inboundSchema,
|
|
76
91
|
externalId: z.nullable(z.string()),
|
|
77
92
|
status: MerchantIntegrationStatus$inboundSchema,
|
|
78
93
|
config: z.record(z.any()),
|
|
@@ -6,13 +6,15 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { ClosedEnum } from "../types/enums.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* External provider a merchant can connect at the tenant level
|
|
9
|
+
* External provider a merchant can connect at the tenant level. `netsuite` and `accountsiq` are returned on reads wherever a connection exists, but connecting them is accepted only in local and development environments; elsewhere the connect request is refused with 404.
|
|
10
10
|
*/
|
|
11
11
|
export const MerchantIntegrationProvider = {
|
|
12
12
|
Salesforce: "salesforce",
|
|
13
|
+
Netsuite: "netsuite",
|
|
14
|
+
Accountsiq: "accountsiq",
|
|
13
15
|
} as const;
|
|
14
16
|
/**
|
|
15
|
-
* External provider a merchant can connect at the tenant level
|
|
17
|
+
* External provider a merchant can connect at the tenant level. `netsuite` and `accountsiq` are returned on reads wherever a connection exists, but connecting them is accepted only in local and development environments; elsewhere the connect request is refused with 404.
|
|
16
18
|
*/
|
|
17
19
|
export type MerchantIntegrationProvider = ClosedEnum<
|
|
18
20
|
typeof MerchantIntegrationProvider
|
|
@@ -16,7 +16,7 @@ export type ReplacePrice = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
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.
|
|
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
20
|
*/
|
|
21
21
|
export type MintPlanVersionRequest = {
|
|
22
22
|
/**
|
|
@@ -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(),
|
|
@@ -32,13 +32,25 @@ export type CreateExternalReferenceRequest = {
|
|
|
32
32
|
*/
|
|
33
33
|
metadata?: { [k: string]: any } | undefined;
|
|
34
34
|
/**
|
|
35
|
-
* Whether this
|
|
35
|
+
* Whether this reference claims `(provider, externalId)` — the code resolves back to this one entity. Unique per merchant; unclaimed references are aliases. **Omitting it claims the code.** Send `false` for a code that is only ever sent outward, such as a ledger account several items post to — claiming that refuses the second item to use it. The default is not derived from the provider: what a code is for is a property of the operation recording it, and one provider can both resolve an arriving code and be sent a selected one. Declaring a schema default here would defeat the distinction, because a generated client materialises the default into the request body and the caller can no longer express "I did not say".
|
|
36
36
|
*/
|
|
37
37
|
isPrimary?: boolean | undefined;
|
|
38
38
|
/**
|
|
39
|
-
* Whether this is the
|
|
39
|
+
* Whether this is the code sent *to* the provider for this entity. At most one per `(entityType, entityId, provider)`. **Omit** to have the entity's first code for the provider designated automatically — see the note on `isPrimary` for why this carries no schema default.
|
|
40
40
|
*/
|
|
41
41
|
isDefault?: boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Take this code's claim from whichever entity currently holds it, in the same transaction.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
*
|
|
47
|
+
* Without it, claiming a code another entity claims is a `409` identifying the holder — the right answer to an accident, and the common case. With it, the reassignment is the point.
|
|
48
|
+
*
|
|
49
|
+
* It exists because the alternative route — remove the old claim, then create the new one — leaves a window in which the code resolves to nothing. An arrival in that window is still recorded, untagged rather than rejected, so nothing is lost; but it is silent while it lasts and leaves work to repair.
|
|
50
|
+
*
|
|
51
|
+
* Deliberately opt-in, unlike moving a designation. A designation moves within one entity; a claim moves *between* entities and changes what future arrivals resolve to, which should never be a side effect of recording a code. Ignored when the write is not claiming the code.
|
|
52
|
+
*/
|
|
53
|
+
moveClaim?: boolean | undefined;
|
|
42
54
|
};
|
|
43
55
|
|
|
44
56
|
/** @internal */
|
|
@@ -50,8 +62,9 @@ export type CreateExternalReferenceRequest$Outbound = {
|
|
|
50
62
|
externalId: string;
|
|
51
63
|
externalLabel?: string | undefined;
|
|
52
64
|
metadata?: { [k: string]: any } | undefined;
|
|
53
|
-
isPrimary
|
|
54
|
-
isDefault
|
|
65
|
+
isPrimary?: boolean | undefined;
|
|
66
|
+
isDefault?: boolean | undefined;
|
|
67
|
+
moveClaim?: boolean | undefined;
|
|
55
68
|
};
|
|
56
69
|
|
|
57
70
|
/** @internal */
|
|
@@ -67,8 +80,9 @@ export const CreateExternalReferenceRequest$outboundSchema: z.ZodType<
|
|
|
67
80
|
externalId: z.string(),
|
|
68
81
|
externalLabel: z.string().optional(),
|
|
69
82
|
metadata: z.record(z.any()).optional(),
|
|
70
|
-
isPrimary: z.boolean().
|
|
71
|
-
isDefault: z.boolean().
|
|
83
|
+
isPrimary: z.boolean().optional(),
|
|
84
|
+
isDefault: z.boolean().optional(),
|
|
85
|
+
moveClaim: z.boolean().optional(),
|
|
72
86
|
});
|
|
73
87
|
|
|
74
88
|
export function createExternalReferenceRequestToJSON(
|