@paygentic/sdk 0.9.12 → 0.9.13
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/dist/commonjs/funcs/approvalsCreateApproval.d.ts +1 -1
- package/dist/commonjs/funcs/approvalsCreateApproval.d.ts.map +1 -1
- package/dist/commonjs/funcs/approvalsCreateApproval.js +1 -1
- package/dist/commonjs/funcs/approvalsCreateApproval.js.map +1 -1
- package/dist/commonjs/funcs/approvalsGetApproval.d.ts +1 -1
- package/dist/commonjs/funcs/approvalsGetApproval.d.ts.map +1 -1
- package/dist/commonjs/funcs/approvalsGetApproval.js +1 -1
- package/dist/commonjs/funcs/approvalsGetApproval.js.map +1 -1
- package/dist/commonjs/funcs/approvalsUpdateApproval.d.ts +1 -1
- package/dist/commonjs/funcs/approvalsUpdateApproval.d.ts.map +1 -1
- package/dist/commonjs/funcs/approvalsUpdateApproval.js +1 -1
- package/dist/commonjs/funcs/approvalsUpdateApproval.js.map +1 -1
- package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.d.ts +1 -1
- package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.d.ts.map +1 -1
- package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.js +1 -1
- package/dist/commonjs/funcs/billingSchedulesCreateBillingSchedule.js.map +1 -1
- package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.d.ts +1 -1
- package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.d.ts.map +1 -1
- package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.js +1 -1
- package/dist/commonjs/funcs/billingSchedulesGetBillingSchedule.js.map +1 -1
- package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.d.ts +1 -1
- package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.d.ts.map +1 -1
- package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.js +1 -1
- package/dist/commonjs/funcs/billingSchedulesUpdateBillingSchedule.js.map +1 -1
- package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.d.ts +1 -1
- package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.d.ts.map +1 -1
- package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.js +1 -1
- package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.js.map +1 -1
- package/dist/commonjs/funcs/ordersCreateOrderApproval.d.ts +1 -1
- package/dist/commonjs/funcs/ordersCreateOrderApproval.d.ts.map +1 -1
- package/dist/commonjs/funcs/ordersCreateOrderApproval.js +1 -1
- package/dist/commonjs/funcs/ordersCreateOrderApproval.js.map +1 -1
- package/dist/commonjs/funcs/plansMintPlanVersion.d.ts +1 -1
- package/dist/commonjs/funcs/plansMintPlanVersion.js +1 -1
- package/dist/commonjs/funcs/pricesCreate.d.ts +1 -1
- package/dist/commonjs/funcs/pricesCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/pricesCreate.js +1 -1
- package/dist/commonjs/funcs/pricesCreate.js.map +1 -1
- package/dist/commonjs/funcs/pricesGet.d.ts +1 -1
- package/dist/commonjs/funcs/pricesGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/pricesGet.js +1 -1
- package/dist/commonjs/funcs/pricesGet.js.map +1 -1
- package/dist/commonjs/funcs/pricesUpdate.d.ts +1 -1
- package/dist/commonjs/funcs/pricesUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/pricesUpdate.js +1 -1
- package/dist/commonjs/funcs/pricesUpdate.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/approval.d.ts +17 -2
- package/dist/commonjs/models/approval.d.ts.map +1 -1
- package/dist/commonjs/models/approval.js +16 -3
- package/dist/commonjs/models/approval.js.map +1 -1
- package/dist/commonjs/models/approvallist.d.ts +2 -2
- package/dist/commonjs/models/approvallist.d.ts.map +1 -1
- package/dist/commonjs/models/approvallist.js +2 -2
- package/dist/commonjs/models/approvallist.js.map +1 -1
- package/dist/commonjs/models/billingschedule.d.ts +6 -4
- package/dist/commonjs/models/billingschedule.d.ts.map +1 -1
- package/dist/commonjs/models/billingschedule.js +3 -1
- package/dist/commonjs/models/billingschedule.js.map +1 -1
- package/dist/commonjs/models/customerpaymentsession.d.ts +53 -0
- package/dist/commonjs/models/customerpaymentsession.d.ts.map +1 -0
- package/dist/commonjs/models/{schemaspaymentsession.js → customerpaymentsession.js} +25 -24
- package/dist/commonjs/models/customerpaymentsession.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +8 -4
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +8 -4
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/item.d.ts +3 -0
- package/dist/commonjs/models/item.d.ts.map +1 -1
- package/dist/commonjs/models/item.js.map +1 -1
- package/dist/commonjs/models/mintplanlineinput.d.ts +23 -0
- package/dist/commonjs/models/mintplanlineinput.d.ts.map +1 -0
- package/dist/commonjs/models/mintplanlineinput.js +50 -0
- package/dist/commonjs/models/mintplanlineinput.js.map +1 -0
- package/dist/commonjs/models/mintplanlineref.d.ts +12 -0
- package/dist/commonjs/models/mintplanlineref.d.ts.map +1 -0
- package/dist/commonjs/models/mintplanlineref.js +48 -0
- package/dist/commonjs/models/mintplanlineref.js.map +1 -0
- package/dist/commonjs/models/mintplanversionrequest.d.ts +8 -30
- package/dist/commonjs/models/mintplanversionrequest.d.ts.map +1 -1
- package/dist/commonjs/models/mintplanversionrequest.js +4 -13
- package/dist/commonjs/models/mintplanversionrequest.js.map +1 -1
- package/dist/commonjs/models/operations/createexternalreference.d.ts +3 -0
- package/dist/commonjs/models/operations/createexternalreference.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createexternalreference.js.map +1 -1
- package/dist/commonjs/models/operations/createitem.d.ts +3 -0
- package/dist/commonjs/models/operations/createitem.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createitem.js.map +1 -1
- package/dist/commonjs/models/operations/createplan.d.ts +3 -3
- package/dist/commonjs/models/operations/createplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createplan.js +1 -1
- package/dist/commonjs/models/operations/createplan.js.map +1 -1
- package/dist/commonjs/models/operations/listbillingschedules.d.ts +1 -1
- package/dist/commonjs/models/operations/listbillingschedules.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listbillingschedules.js +1 -1
- package/dist/commonjs/models/operations/listbillingschedules.js.map +1 -1
- package/dist/commonjs/models/operations/listpaymentsessions.d.ts +1 -1
- package/dist/commonjs/models/operations/listpaymentsessions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listpaymentsessions.js +1 -1
- package/dist/commonjs/models/operations/listpaymentsessions.js.map +1 -1
- package/dist/commonjs/models/operations/listprices.d.ts +1 -1
- package/dist/commonjs/models/operations/listprices.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listprices.js +1 -1
- package/dist/commonjs/models/operations/listprices.js.map +1 -1
- package/dist/commonjs/models/order.d.ts +2 -2
- package/dist/commonjs/models/order.d.ts.map +1 -1
- package/dist/commonjs/models/order.js +2 -2
- package/dist/commonjs/models/order.js.map +1 -1
- package/dist/commonjs/models/orderapproval.d.ts +38 -0
- package/dist/commonjs/models/orderapproval.d.ts.map +1 -0
- package/dist/commonjs/models/{schemasapproval.js → orderapproval.js} +14 -27
- package/dist/commonjs/models/orderapproval.js.map +1 -0
- package/dist/commonjs/models/orderbillingschedule.d.ts +72 -0
- package/dist/commonjs/models/orderbillingschedule.d.ts.map +1 -0
- package/dist/commonjs/models/{schemasbillingschedule.js → orderbillingschedule.js} +22 -24
- package/dist/commonjs/models/orderbillingschedule.js.map +1 -0
- package/dist/commonjs/models/paymentsession.d.ts +41 -18
- package/dist/commonjs/models/paymentsession.d.ts.map +1 -1
- package/dist/commonjs/models/paymentsession.js +13 -14
- package/dist/commonjs/models/paymentsession.js.map +1 -1
- package/dist/commonjs/models/plan.d.ts +2 -2
- package/dist/commonjs/models/plan.d.ts.map +1 -1
- package/dist/commonjs/models/plan.js +2 -2
- package/dist/commonjs/models/plan.js.map +1 -1
- package/dist/commonjs/models/planlineinput.d.ts +23 -0
- package/dist/commonjs/models/planlineinput.d.ts.map +1 -0
- package/dist/commonjs/models/planlineinput.js +50 -0
- package/dist/commonjs/models/planlineinput.js.map +1 -0
- package/dist/commonjs/models/planlineref.d.ts +12 -0
- package/dist/commonjs/models/planlineref.d.ts.map +1 -0
- package/dist/commonjs/models/planlineref.js +48 -0
- package/dist/commonjs/models/planlineref.js.map +1 -0
- package/dist/{esm/models/schemasprice.d.ts → commonjs/models/planprice.d.ts} +55 -37
- package/dist/commonjs/models/planprice.d.ts.map +1 -0
- package/dist/commonjs/models/{schemasprice.js → planprice.js} +39 -22
- package/dist/commonjs/models/planprice.js.map +1 -0
- package/dist/commonjs/models/planversionpriceslot.d.ts +5 -1
- package/dist/commonjs/models/planversionpriceslot.d.ts.map +1 -1
- package/dist/commonjs/models/planversionpriceslot.js +1 -0
- package/dist/commonjs/models/planversionpriceslot.js.map +1 -1
- package/dist/commonjs/models/price.d.ts +25 -43
- package/dist/commonjs/models/price.d.ts.map +1 -1
- package/dist/commonjs/models/price.js +11 -29
- package/dist/commonjs/models/price.js.map +1 -1
- package/dist/commonjs/sdk/approvals.d.ts +3 -3
- package/dist/commonjs/sdk/approvals.d.ts.map +1 -1
- package/dist/commonjs/sdk/billingschedules.d.ts +3 -3
- package/dist/commonjs/sdk/billingschedules.d.ts.map +1 -1
- package/dist/commonjs/sdk/customers.d.ts +1 -1
- package/dist/commonjs/sdk/customers.d.ts.map +1 -1
- package/dist/commonjs/sdk/orders.d.ts +1 -1
- package/dist/commonjs/sdk/orders.d.ts.map +1 -1
- package/dist/commonjs/sdk/plans.d.ts +1 -1
- package/dist/commonjs/sdk/plans.js +1 -1
- package/dist/commonjs/sdk/prices.d.ts +3 -3
- package/dist/commonjs/sdk/prices.d.ts.map +1 -1
- package/dist/esm/funcs/approvalsCreateApproval.d.ts +1 -1
- package/dist/esm/funcs/approvalsCreateApproval.d.ts.map +1 -1
- package/dist/esm/funcs/approvalsCreateApproval.js +1 -1
- package/dist/esm/funcs/approvalsCreateApproval.js.map +1 -1
- package/dist/esm/funcs/approvalsGetApproval.d.ts +1 -1
- package/dist/esm/funcs/approvalsGetApproval.d.ts.map +1 -1
- package/dist/esm/funcs/approvalsGetApproval.js +1 -1
- package/dist/esm/funcs/approvalsGetApproval.js.map +1 -1
- package/dist/esm/funcs/approvalsUpdateApproval.d.ts +1 -1
- package/dist/esm/funcs/approvalsUpdateApproval.d.ts.map +1 -1
- package/dist/esm/funcs/approvalsUpdateApproval.js +1 -1
- package/dist/esm/funcs/approvalsUpdateApproval.js.map +1 -1
- package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.d.ts +1 -1
- package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.d.ts.map +1 -1
- package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.js +1 -1
- package/dist/esm/funcs/billingSchedulesCreateBillingSchedule.js.map +1 -1
- package/dist/esm/funcs/billingSchedulesGetBillingSchedule.d.ts +1 -1
- package/dist/esm/funcs/billingSchedulesGetBillingSchedule.d.ts.map +1 -1
- package/dist/esm/funcs/billingSchedulesGetBillingSchedule.js +1 -1
- package/dist/esm/funcs/billingSchedulesGetBillingSchedule.js.map +1 -1
- package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.d.ts +1 -1
- package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.d.ts.map +1 -1
- package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.js +1 -1
- package/dist/esm/funcs/billingSchedulesUpdateBillingSchedule.js.map +1 -1
- package/dist/esm/funcs/customersCreateCustomerPaymentMethod.d.ts +1 -1
- package/dist/esm/funcs/customersCreateCustomerPaymentMethod.d.ts.map +1 -1
- package/dist/esm/funcs/customersCreateCustomerPaymentMethod.js +1 -1
- package/dist/esm/funcs/customersCreateCustomerPaymentMethod.js.map +1 -1
- package/dist/esm/funcs/ordersCreateOrderApproval.d.ts +1 -1
- package/dist/esm/funcs/ordersCreateOrderApproval.d.ts.map +1 -1
- package/dist/esm/funcs/ordersCreateOrderApproval.js +1 -1
- package/dist/esm/funcs/ordersCreateOrderApproval.js.map +1 -1
- package/dist/esm/funcs/plansMintPlanVersion.d.ts +1 -1
- package/dist/esm/funcs/plansMintPlanVersion.js +1 -1
- package/dist/esm/funcs/pricesCreate.d.ts +1 -1
- package/dist/esm/funcs/pricesCreate.d.ts.map +1 -1
- package/dist/esm/funcs/pricesCreate.js +1 -1
- package/dist/esm/funcs/pricesCreate.js.map +1 -1
- package/dist/esm/funcs/pricesGet.d.ts +1 -1
- package/dist/esm/funcs/pricesGet.d.ts.map +1 -1
- package/dist/esm/funcs/pricesGet.js +1 -1
- package/dist/esm/funcs/pricesGet.js.map +1 -1
- package/dist/esm/funcs/pricesUpdate.d.ts +1 -1
- package/dist/esm/funcs/pricesUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/pricesUpdate.js +1 -1
- package/dist/esm/funcs/pricesUpdate.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/approval.d.ts +17 -2
- package/dist/esm/models/approval.d.ts.map +1 -1
- package/dist/esm/models/approval.js +15 -2
- package/dist/esm/models/approval.js.map +1 -1
- package/dist/esm/models/approvallist.d.ts +2 -2
- package/dist/esm/models/approvallist.d.ts.map +1 -1
- package/dist/esm/models/approvallist.js +2 -2
- package/dist/esm/models/approvallist.js.map +1 -1
- package/dist/esm/models/billingschedule.d.ts +6 -4
- package/dist/esm/models/billingschedule.d.ts.map +1 -1
- package/dist/esm/models/billingschedule.js +3 -1
- package/dist/esm/models/billingschedule.js.map +1 -1
- package/dist/esm/models/customerpaymentsession.d.ts +53 -0
- package/dist/esm/models/customerpaymentsession.d.ts.map +1 -0
- package/dist/esm/models/customerpaymentsession.js +44 -0
- package/dist/esm/models/customerpaymentsession.js.map +1 -0
- package/dist/esm/models/index.d.ts +8 -4
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +8 -4
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/item.d.ts +3 -0
- package/dist/esm/models/item.d.ts.map +1 -1
- package/dist/esm/models/item.js.map +1 -1
- package/dist/esm/models/mintplanlineinput.d.ts +23 -0
- package/dist/esm/models/mintplanlineinput.d.ts.map +1 -0
- package/dist/esm/models/mintplanlineinput.js +13 -0
- package/dist/esm/models/mintplanlineinput.js.map +1 -0
- package/dist/esm/models/mintplanlineref.d.ts +12 -0
- package/dist/esm/models/mintplanlineref.d.ts.map +1 -0
- package/dist/esm/models/mintplanlineref.js +11 -0
- package/dist/esm/models/mintplanlineref.js.map +1 -0
- package/dist/esm/models/mintplanversionrequest.d.ts +8 -30
- package/dist/esm/models/mintplanversionrequest.d.ts.map +1 -1
- package/dist/esm/models/mintplanversionrequest.js +3 -11
- package/dist/esm/models/mintplanversionrequest.js.map +1 -1
- package/dist/esm/models/operations/createexternalreference.d.ts +3 -0
- package/dist/esm/models/operations/createexternalreference.d.ts.map +1 -1
- package/dist/esm/models/operations/createexternalreference.js.map +1 -1
- package/dist/esm/models/operations/createitem.d.ts +3 -0
- package/dist/esm/models/operations/createitem.d.ts.map +1 -1
- package/dist/esm/models/operations/createitem.js.map +1 -1
- package/dist/esm/models/operations/createplan.d.ts +3 -3
- package/dist/esm/models/operations/createplan.d.ts.map +1 -1
- package/dist/esm/models/operations/createplan.js +1 -1
- package/dist/esm/models/operations/createplan.js.map +1 -1
- package/dist/esm/models/operations/listbillingschedules.d.ts +1 -1
- package/dist/esm/models/operations/listbillingschedules.d.ts.map +1 -1
- package/dist/esm/models/operations/listbillingschedules.js +1 -1
- package/dist/esm/models/operations/listbillingschedules.js.map +1 -1
- package/dist/esm/models/operations/listpaymentsessions.d.ts +1 -1
- package/dist/esm/models/operations/listpaymentsessions.d.ts.map +1 -1
- package/dist/esm/models/operations/listpaymentsessions.js +1 -1
- package/dist/esm/models/operations/listpaymentsessions.js.map +1 -1
- package/dist/esm/models/operations/listprices.d.ts +1 -1
- package/dist/esm/models/operations/listprices.d.ts.map +1 -1
- package/dist/esm/models/operations/listprices.js +1 -1
- package/dist/esm/models/operations/listprices.js.map +1 -1
- package/dist/esm/models/order.d.ts +2 -2
- package/dist/esm/models/order.d.ts.map +1 -1
- package/dist/esm/models/order.js +2 -2
- package/dist/esm/models/order.js.map +1 -1
- package/dist/esm/models/orderapproval.d.ts +38 -0
- package/dist/esm/models/orderapproval.d.ts.map +1 -0
- package/dist/esm/models/orderapproval.js +38 -0
- package/dist/esm/models/orderapproval.js.map +1 -0
- package/dist/esm/models/orderbillingschedule.d.ts +72 -0
- package/dist/esm/models/orderbillingschedule.d.ts.map +1 -0
- package/dist/esm/models/orderbillingschedule.js +64 -0
- package/dist/esm/models/orderbillingschedule.js.map +1 -0
- package/dist/esm/models/paymentsession.d.ts +41 -18
- package/dist/esm/models/paymentsession.d.ts.map +1 -1
- package/dist/esm/models/paymentsession.js +12 -13
- package/dist/esm/models/paymentsession.js.map +1 -1
- package/dist/esm/models/plan.d.ts +2 -2
- package/dist/esm/models/plan.d.ts.map +1 -1
- package/dist/esm/models/plan.js +2 -2
- package/dist/esm/models/plan.js.map +1 -1
- package/dist/esm/models/planlineinput.d.ts +23 -0
- package/dist/esm/models/planlineinput.d.ts.map +1 -0
- package/dist/esm/models/planlineinput.js +13 -0
- package/dist/esm/models/planlineinput.js.map +1 -0
- package/dist/esm/models/planlineref.d.ts +12 -0
- package/dist/esm/models/planlineref.d.ts.map +1 -0
- package/dist/esm/models/planlineref.js +11 -0
- package/dist/esm/models/planlineref.js.map +1 -0
- package/dist/{commonjs/models/schemasprice.d.ts → esm/models/planprice.d.ts} +55 -37
- package/dist/esm/models/planprice.d.ts.map +1 -0
- package/dist/esm/models/planprice.js +65 -0
- package/dist/esm/models/planprice.js.map +1 -0
- package/dist/esm/models/planversionpriceslot.d.ts +5 -1
- package/dist/esm/models/planversionpriceslot.d.ts.map +1 -1
- package/dist/esm/models/planversionpriceslot.js +1 -0
- package/dist/esm/models/planversionpriceslot.js.map +1 -1
- package/dist/esm/models/price.d.ts +25 -43
- package/dist/esm/models/price.d.ts.map +1 -1
- package/dist/esm/models/price.js +10 -28
- package/dist/esm/models/price.js.map +1 -1
- package/dist/esm/sdk/approvals.d.ts +3 -3
- package/dist/esm/sdk/approvals.d.ts.map +1 -1
- package/dist/esm/sdk/billingschedules.d.ts +3 -3
- package/dist/esm/sdk/billingschedules.d.ts.map +1 -1
- package/dist/esm/sdk/customers.d.ts +1 -1
- package/dist/esm/sdk/customers.d.ts.map +1 -1
- package/dist/esm/sdk/orders.d.ts +1 -1
- package/dist/esm/sdk/orders.d.ts.map +1 -1
- package/dist/esm/sdk/plans.d.ts +1 -1
- package/dist/esm/sdk/plans.js +1 -1
- package/dist/esm/sdk/prices.d.ts +3 -3
- package/dist/esm/sdk/prices.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/approvalsCreateApproval.ts +4 -4
- package/src/funcs/approvalsGetApproval.ts +4 -4
- package/src/funcs/approvalsUpdateApproval.ts +4 -4
- package/src/funcs/billingSchedulesCreateBillingSchedule.ts +4 -4
- package/src/funcs/billingSchedulesGetBillingSchedule.ts +4 -4
- package/src/funcs/billingSchedulesUpdateBillingSchedule.ts +4 -4
- package/src/funcs/customersCreateCustomerPaymentMethod.ts +4 -4
- package/src/funcs/ordersCreateOrderApproval.ts +4 -4
- package/src/funcs/plansMintPlanVersion.ts +1 -1
- package/src/funcs/pricesCreate.ts +4 -4
- package/src/funcs/pricesGet.ts +4 -4
- package/src/funcs/pricesUpdate.ts +4 -4
- package/src/lib/config.ts +2 -2
- package/src/models/approval.ts +26 -4
- package/src/models/approvallist.ts +3 -6
- package/src/models/billingschedule.ts +13 -5
- package/src/models/customerpaymentsession.ts +100 -0
- package/src/models/index.ts +8 -4
- package/src/models/item.ts +3 -0
- package/src/models/mintplanlineinput.ts +43 -0
- package/src/models/mintplanlineref.ts +31 -0
- package/src/models/mintplanversionrequest.ts +14 -46
- package/src/models/operations/createexternalreference.ts +3 -0
- package/src/models/operations/createitem.ts +3 -0
- package/src/models/operations/createplan.ts +4 -4
- package/src/models/operations/listbillingschedules.ts +2 -2
- package/src/models/operations/listpaymentsessions.ts +2 -2
- package/src/models/operations/listprices.ts +2 -2
- package/src/models/order.ts +6 -6
- package/src/models/orderapproval.ts +81 -0
- package/src/models/orderbillingschedule.ts +138 -0
- package/src/models/paymentsession.ts +49 -26
- package/src/models/plan.ts +3 -3
- package/src/models/planlineinput.ts +39 -0
- package/src/models/planlineref.ts +29 -0
- package/src/models/{schemasprice.ts → planprice.ts} +80 -58
- package/src/models/planversionpriceslot.ts +6 -1
- package/src/models/price.ts +35 -58
- package/src/sdk/approvals.ts +3 -3
- package/src/sdk/billingschedules.ts +3 -3
- package/src/sdk/customers.ts +1 -1
- package/src/sdk/orders.ts +1 -1
- package/src/sdk/plans.ts +1 -1
- package/src/sdk/prices.ts +3 -3
- package/dist/commonjs/models/schemasapproval.d.ts +0 -53
- package/dist/commonjs/models/schemasapproval.d.ts.map +0 -1
- package/dist/commonjs/models/schemasapproval.js.map +0 -1
- package/dist/commonjs/models/schemasbillingschedule.d.ts +0 -74
- package/dist/commonjs/models/schemasbillingschedule.d.ts.map +0 -1
- package/dist/commonjs/models/schemasbillingschedule.js.map +0 -1
- package/dist/commonjs/models/schemaspaymentsession.d.ts +0 -76
- package/dist/commonjs/models/schemaspaymentsession.d.ts.map +0 -1
- package/dist/commonjs/models/schemaspaymentsession.js.map +0 -1
- package/dist/commonjs/models/schemasprice.d.ts.map +0 -1
- package/dist/commonjs/models/schemasprice.js.map +0 -1
- package/dist/esm/models/schemasapproval.d.ts +0 -53
- package/dist/esm/models/schemasapproval.d.ts.map +0 -1
- package/dist/esm/models/schemasapproval.js +0 -51
- package/dist/esm/models/schemasapproval.js.map +0 -1
- package/dist/esm/models/schemasbillingschedule.d.ts +0 -74
- package/dist/esm/models/schemasbillingschedule.d.ts.map +0 -1
- package/dist/esm/models/schemasbillingschedule.js +0 -66
- package/dist/esm/models/schemasbillingschedule.js.map +0 -1
- package/dist/esm/models/schemaspaymentsession.d.ts +0 -76
- package/dist/esm/models/schemaspaymentsession.d.ts.map +0 -1
- package/dist/esm/models/schemaspaymentsession.js +0 -43
- package/dist/esm/models/schemaspaymentsession.js.map +0 -1
- package/dist/esm/models/schemasprice.d.ts.map +0 -1
- package/dist/esm/models/schemasprice.js +0 -48
- package/dist/esm/models/schemasprice.js.map +0 -1
- package/src/models/schemasapproval.ts +0 -108
- package/src/models/schemasbillingschedule.ts +0 -148
- package/src/models/schemaspaymentsession.ts +0 -123
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* One line of the new version: the price it bills, and the key that names it.
|
|
9
|
+
*/
|
|
10
|
+
export type MintPlanLineInput = {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for a price
|
|
13
|
+
*/
|
|
14
|
+
priceId: string;
|
|
15
|
+
/**
|
|
16
|
+
* The key of the line. A key this plan already holds keeps that line, whatever its shape, because a line created before keys could be supplied carries a generated key. A key the plan does not hold names a new line and must match the format in `PlanLineKey`. Omit this to receive a generated key.
|
|
17
|
+
*/
|
|
18
|
+
key?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type MintPlanLineInput$Outbound = {
|
|
23
|
+
priceId: string;
|
|
24
|
+
key?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const MintPlanLineInput$outboundSchema: z.ZodType<
|
|
29
|
+
MintPlanLineInput$Outbound,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
MintPlanLineInput
|
|
32
|
+
> = z.object({
|
|
33
|
+
priceId: z.string(),
|
|
34
|
+
key: z.string().optional(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function mintPlanLineInputToJSON(
|
|
38
|
+
mintPlanLineInput: MintPlanLineInput,
|
|
39
|
+
): string {
|
|
40
|
+
return JSON.stringify(
|
|
41
|
+
MintPlanLineInput$outboundSchema.parse(mintPlanLineInput),
|
|
42
|
+
);
|
|
43
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import {
|
|
7
|
+
MintPlanLineInput,
|
|
8
|
+
MintPlanLineInput$Outbound,
|
|
9
|
+
MintPlanLineInput$outboundSchema,
|
|
10
|
+
} from "./mintplanlineinput.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Either a price ID on its own, or a price ID with the key that names its line.
|
|
14
|
+
*/
|
|
15
|
+
export type MintPlanLineRef = MintPlanLineInput | string;
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type MintPlanLineRef$Outbound = MintPlanLineInput$Outbound | string;
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const MintPlanLineRef$outboundSchema: z.ZodType<
|
|
22
|
+
MintPlanLineRef$Outbound,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
MintPlanLineRef
|
|
25
|
+
> = z.union([MintPlanLineInput$outboundSchema, z.string()]);
|
|
26
|
+
|
|
27
|
+
export function mintPlanLineRefToJSON(
|
|
28
|
+
mintPlanLineRef: MintPlanLineRef,
|
|
29
|
+
): string {
|
|
30
|
+
return JSON.stringify(MintPlanLineRef$outboundSchema.parse(mintPlanLineRef));
|
|
31
|
+
}
|
|
@@ -3,61 +3,30 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
replacesPriceId: string;
|
|
12
|
-
/**
|
|
13
|
-
* Unique identifier for a price
|
|
14
|
-
*/
|
|
15
|
-
withPriceId: string;
|
|
16
|
-
};
|
|
6
|
+
import {
|
|
7
|
+
MintPlanLineRef,
|
|
8
|
+
MintPlanLineRef$Outbound,
|
|
9
|
+
MintPlanLineRef$outboundSchema,
|
|
10
|
+
} from "./mintplanlineref.js";
|
|
17
11
|
|
|
18
12
|
/**
|
|
19
|
-
*
|
|
13
|
+
* The price set the new version is to hold. Every price ID references an existing price created via POST /prices; inline price definitions are not accepted. The change against the plan's current version follows from the keys: a key on both sides with a different price ID replaces that line and keeps its identity, a key only in this request adds a line, and a key the current version holds and this request omits removes that line. An entry with no key adds a line under a generated key; it is never matched to an existing line by price ID. A version must carry at least one price, so an empty set is rejected.
|
|
20
14
|
*/
|
|
21
15
|
export type MintPlanVersionRequest = {
|
|
22
16
|
/**
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
addPrices?: Array<string> | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Prices to remove. Each must be on the plan's current version.
|
|
17
|
+
* The full price set the new version holds. To move off the previous addPrices, removePrices and replacePrices fields: a replacePrices entry becomes the same key with the new price ID, a removePrices entry becomes an omitted key, and an addPrices entry becomes a new entry.
|
|
28
18
|
*/
|
|
29
|
-
|
|
19
|
+
prices: Array<MintPlanLineRef>;
|
|
30
20
|
/**
|
|
31
|
-
*
|
|
21
|
+
* The ID of the plan version you read the current price set from. Supply it to be told when the plan has moved on: the request is rejected with 409 if the plan's current version is no longer this one, so a set built from a stale read cannot drop a line another caller has just added. Omit it to write the set unconditionally.
|
|
32
22
|
*/
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/** @internal */
|
|
37
|
-
export type ReplacePrice$Outbound = {
|
|
38
|
-
replacesPriceId: string;
|
|
39
|
-
withPriceId: string;
|
|
23
|
+
basedOnVersionId?: string | undefined;
|
|
40
24
|
};
|
|
41
25
|
|
|
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
26
|
/** @internal */
|
|
57
27
|
export type MintPlanVersionRequest$Outbound = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
replacePrices?: Array<ReplacePrice$Outbound> | undefined;
|
|
28
|
+
prices: Array<MintPlanLineRef$Outbound>;
|
|
29
|
+
basedOnVersionId?: string | undefined;
|
|
61
30
|
};
|
|
62
31
|
|
|
63
32
|
/** @internal */
|
|
@@ -66,9 +35,8 @@ export const MintPlanVersionRequest$outboundSchema: z.ZodType<
|
|
|
66
35
|
z.ZodTypeDef,
|
|
67
36
|
MintPlanVersionRequest
|
|
68
37
|
> = z.object({
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
replacePrices: z.array(z.lazy(() => ReplacePrice$outboundSchema)).optional(),
|
|
38
|
+
prices: z.array(MintPlanLineRef$outboundSchema),
|
|
39
|
+
basedOnVersionId: z.string().optional(),
|
|
72
40
|
});
|
|
73
41
|
|
|
74
42
|
export function mintPlanVersionRequestToJSON(
|
|
@@ -6,6 +6,9 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import * as models from "../index.js";
|
|
7
7
|
|
|
8
8
|
export type CreateExternalReferenceRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier for an organization
|
|
11
|
+
*/
|
|
9
12
|
merchantId: string;
|
|
10
13
|
/**
|
|
11
14
|
* The type of Paygentic entity this external reference points at
|
|
@@ -99,9 +99,9 @@ export type CreatePlanRequest = {
|
|
|
99
99
|
*/
|
|
100
100
|
name: string;
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* The prices this plan starts with. An entry is either a price ID on its own, or an object that names a price ID and the key by which you address that line. A price ID on its own receives a generated key.
|
|
103
103
|
*/
|
|
104
|
-
prices?: Array<
|
|
104
|
+
prices?: Array<models.PlanLineRef> | undefined;
|
|
105
105
|
/**
|
|
106
106
|
* Unique identifier for a product
|
|
107
107
|
*/
|
|
@@ -167,7 +167,7 @@ export type CreatePlanRequest$Outbound = {
|
|
|
167
167
|
invoiceDisplayName?: string | undefined;
|
|
168
168
|
merchantId: string;
|
|
169
169
|
name: string;
|
|
170
|
-
prices?: Array<
|
|
170
|
+
prices?: Array<models.PlanLineRef$Outbound> | undefined;
|
|
171
171
|
productId: string;
|
|
172
172
|
taxBehavior: string;
|
|
173
173
|
renewalReminderEnabled: boolean;
|
|
@@ -193,7 +193,7 @@ export const CreatePlanRequest$outboundSchema: z.ZodType<
|
|
|
193
193
|
invoiceDisplayName: z.string().optional(),
|
|
194
194
|
merchantId: z.string(),
|
|
195
195
|
name: z.string(),
|
|
196
|
-
prices: z.array(
|
|
196
|
+
prices: z.array(models.PlanLineRef$outboundSchema).optional(),
|
|
197
197
|
productId: z.string(),
|
|
198
198
|
taxBehavior: CreatePlanTaxBehavior$outboundSchema.default("exclusive"),
|
|
199
199
|
renewalReminderEnabled: z.boolean().default(true),
|
|
@@ -32,7 +32,7 @@ export type ListBillingSchedulesObject = ClosedEnum<
|
|
|
32
32
|
*/
|
|
33
33
|
export type ListBillingSchedulesResponse = {
|
|
34
34
|
object: ListBillingSchedulesObject;
|
|
35
|
-
data: Array<models.
|
|
35
|
+
data: Array<models.BillingSchedule>;
|
|
36
36
|
/**
|
|
37
37
|
* Offset-based pagination response.
|
|
38
38
|
*/
|
|
@@ -77,7 +77,7 @@ export const ListBillingSchedulesResponse$inboundSchema: z.ZodType<
|
|
|
77
77
|
unknown
|
|
78
78
|
> = z.object({
|
|
79
79
|
object: ListBillingSchedulesObject$inboundSchema,
|
|
80
|
-
data: z.array(models.
|
|
80
|
+
data: z.array(models.BillingSchedule$inboundSchema),
|
|
81
81
|
pagination: models.OffsetPagination$inboundSchema,
|
|
82
82
|
});
|
|
83
83
|
|
|
@@ -84,7 +84,7 @@ export type ListPaymentSessionsObject = ClosedEnum<
|
|
|
84
84
|
*/
|
|
85
85
|
export type ListPaymentSessionsResponse = {
|
|
86
86
|
object: ListPaymentSessionsObject;
|
|
87
|
-
data: Array<models.
|
|
87
|
+
data: Array<models.PaymentSession>;
|
|
88
88
|
/**
|
|
89
89
|
* Offset-based pagination response.
|
|
90
90
|
*/
|
|
@@ -146,7 +146,7 @@ export const ListPaymentSessionsResponse$inboundSchema: z.ZodType<
|
|
|
146
146
|
unknown
|
|
147
147
|
> = z.object({
|
|
148
148
|
object: ListPaymentSessionsObject$inboundSchema,
|
|
149
|
-
data: z.array(models.
|
|
149
|
+
data: z.array(models.PaymentSession$inboundSchema),
|
|
150
150
|
pagination: models.OffsetPagination$inboundSchema,
|
|
151
151
|
});
|
|
152
152
|
|
|
@@ -37,7 +37,7 @@ export type ListPricesPagination = {
|
|
|
37
37
|
* List of prices
|
|
38
38
|
*/
|
|
39
39
|
export type ListPricesResponse = {
|
|
40
|
-
data?: Array<models.
|
|
40
|
+
data?: Array<models.Price> | undefined;
|
|
41
41
|
pagination?: ListPricesPagination | undefined;
|
|
42
42
|
};
|
|
43
43
|
|
|
@@ -96,7 +96,7 @@ export const ListPricesResponse$inboundSchema: z.ZodType<
|
|
|
96
96
|
z.ZodTypeDef,
|
|
97
97
|
unknown
|
|
98
98
|
> = z.object({
|
|
99
|
-
data: z.array(models.
|
|
99
|
+
data: z.array(models.Price$inboundSchema).optional(),
|
|
100
100
|
pagination: z.lazy(() => ListPricesPagination$inboundSchema).optional(),
|
|
101
101
|
});
|
|
102
102
|
|
package/src/models/order.ts
CHANGED
|
@@ -6,11 +6,11 @@ import * as z from "zod/v3";
|
|
|
6
6
|
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
|
-
import {
|
|
10
|
-
BillingSchedule,
|
|
11
|
-
BillingSchedule$inboundSchema,
|
|
12
|
-
} from "./billingschedule.js";
|
|
13
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
OrderBillingSchedule,
|
|
12
|
+
OrderBillingSchedule$inboundSchema,
|
|
13
|
+
} from "./orderbillingschedule.js";
|
|
14
14
|
import { OrderLineItem, OrderLineItem$inboundSchema } from "./orderlineitem.js";
|
|
15
15
|
|
|
16
16
|
export const OrderObject = {
|
|
@@ -55,7 +55,7 @@ export type Order = {
|
|
|
55
55
|
defaultPaymentTermDays: number;
|
|
56
56
|
metadata: { [k: string]: any };
|
|
57
57
|
lineItems: Array<OrderLineItem>;
|
|
58
|
-
billingSchedules: Array<
|
|
58
|
+
billingSchedules: Array<OrderBillingSchedule>;
|
|
59
59
|
createdAt: Date;
|
|
60
60
|
updatedAt: Date;
|
|
61
61
|
};
|
|
@@ -102,7 +102,7 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
102
102
|
defaultPaymentTermDays: z.number().int(),
|
|
103
103
|
metadata: z.record(z.any()),
|
|
104
104
|
lineItems: z.array(OrderLineItem$inboundSchema),
|
|
105
|
-
billingSchedules: z.array(
|
|
105
|
+
billingSchedules: z.array(OrderBillingSchedule$inboundSchema),
|
|
106
106
|
createdAt: z.string().datetime({ offset: true }).transform(v =>
|
|
107
107
|
new Date(v)
|
|
108
108
|
),
|
|
@@ -0,0 +1,81 @@
|
|
|
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 { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const OrderApprovalObject = {
|
|
12
|
+
Approval: "approval",
|
|
13
|
+
} as const;
|
|
14
|
+
export type OrderApprovalObject = ClosedEnum<typeof OrderApprovalObject>;
|
|
15
|
+
|
|
16
|
+
export const OrderApprovalDecision = {
|
|
17
|
+
Pending: "pending",
|
|
18
|
+
Approved: "approved",
|
|
19
|
+
Rejected: "rejected",
|
|
20
|
+
Cancelled: "cancelled",
|
|
21
|
+
} as const;
|
|
22
|
+
export type OrderApprovalDecision = ClosedEnum<typeof OrderApprovalDecision>;
|
|
23
|
+
|
|
24
|
+
export type OrderApproval = {
|
|
25
|
+
id: string;
|
|
26
|
+
object: OrderApprovalObject;
|
|
27
|
+
merchantId: string;
|
|
28
|
+
resourceType: string;
|
|
29
|
+
resourceId: string;
|
|
30
|
+
kind: string;
|
|
31
|
+
decision: OrderApprovalDecision;
|
|
32
|
+
requester: string;
|
|
33
|
+
reviewer?: string | null | undefined;
|
|
34
|
+
note?: string | null | undefined;
|
|
35
|
+
dataSnapshotHash: string;
|
|
36
|
+
decidedAt?: Date | null | undefined;
|
|
37
|
+
createdAt: Date;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const OrderApprovalObject$inboundSchema: z.ZodNativeEnum<
|
|
42
|
+
typeof OrderApprovalObject
|
|
43
|
+
> = z.nativeEnum(OrderApprovalObject);
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const OrderApprovalDecision$inboundSchema: z.ZodNativeEnum<
|
|
47
|
+
typeof OrderApprovalDecision
|
|
48
|
+
> = z.nativeEnum(OrderApprovalDecision);
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const OrderApproval$inboundSchema: z.ZodType<
|
|
52
|
+
OrderApproval,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
unknown
|
|
55
|
+
> = z.object({
|
|
56
|
+
id: z.string(),
|
|
57
|
+
object: OrderApprovalObject$inboundSchema,
|
|
58
|
+
merchantId: z.string(),
|
|
59
|
+
resourceType: z.string(),
|
|
60
|
+
resourceId: z.string(),
|
|
61
|
+
kind: z.string(),
|
|
62
|
+
decision: OrderApprovalDecision$inboundSchema,
|
|
63
|
+
requester: z.string(),
|
|
64
|
+
reviewer: z.nullable(z.string()).optional(),
|
|
65
|
+
note: z.nullable(z.string()).optional(),
|
|
66
|
+
dataSnapshotHash: z.string(),
|
|
67
|
+
decidedAt: z.nullable(
|
|
68
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
69
|
+
).optional(),
|
|
70
|
+
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export function orderApprovalFromJSON(
|
|
74
|
+
jsonString: string,
|
|
75
|
+
): SafeParseResult<OrderApproval, SDKValidationError> {
|
|
76
|
+
return safeParse(
|
|
77
|
+
jsonString,
|
|
78
|
+
(x) => OrderApproval$inboundSchema.parse(JSON.parse(x)),
|
|
79
|
+
`Failed to parse 'OrderApproval' from JSON`,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
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 { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const OrderBillingScheduleObject = {
|
|
12
|
+
BillingSchedule: "billing_schedule",
|
|
13
|
+
} as const;
|
|
14
|
+
export type OrderBillingScheduleObject = ClosedEnum<
|
|
15
|
+
typeof OrderBillingScheduleObject
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export const OrderBillingScheduleStatus = {
|
|
19
|
+
Draft: "draft",
|
|
20
|
+
Active: "active",
|
|
21
|
+
Completed: "completed",
|
|
22
|
+
Cancelled: "cancelled",
|
|
23
|
+
} as const;
|
|
24
|
+
export type OrderBillingScheduleStatus = ClosedEnum<
|
|
25
|
+
typeof OrderBillingScheduleStatus
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
export const OrderBillingScheduleAlignmentPolicy = {
|
|
29
|
+
Anchor: "anchor",
|
|
30
|
+
Calendar: "calendar",
|
|
31
|
+
Coterm: "coterm",
|
|
32
|
+
} as const;
|
|
33
|
+
export type OrderBillingScheduleAlignmentPolicy = ClosedEnum<
|
|
34
|
+
typeof OrderBillingScheduleAlignmentPolicy
|
|
35
|
+
>;
|
|
36
|
+
|
|
37
|
+
export const OrderBillingScheduleProrationPolicy = {
|
|
38
|
+
None: "none",
|
|
39
|
+
Daily: "daily",
|
|
40
|
+
} as const;
|
|
41
|
+
export type OrderBillingScheduleProrationPolicy = ClosedEnum<
|
|
42
|
+
typeof OrderBillingScheduleProrationPolicy
|
|
43
|
+
>;
|
|
44
|
+
|
|
45
|
+
export const OrderBillingSchedulePeriodPreset = {
|
|
46
|
+
Single: "single",
|
|
47
|
+
P1M: "P1M",
|
|
48
|
+
P3M: "P3M",
|
|
49
|
+
P6M: "P6M",
|
|
50
|
+
P1Y: "P1Y",
|
|
51
|
+
Custom: "custom",
|
|
52
|
+
} as const;
|
|
53
|
+
export type OrderBillingSchedulePeriodPreset = ClosedEnum<
|
|
54
|
+
typeof OrderBillingSchedulePeriodPreset
|
|
55
|
+
>;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Summary of a billing schedule owned by this order. The full schedule (with intervals + staged invoices) is served under /billingSchedules. Owner-polymorphic: a schedule belongs to exactly one Order or one Subscription (XOR); cadence lives on ScheduleIntervals, not the header.
|
|
59
|
+
*/
|
|
60
|
+
export type OrderBillingSchedule = {
|
|
61
|
+
id: string;
|
|
62
|
+
object: OrderBillingScheduleObject;
|
|
63
|
+
orderId?: string | null | undefined;
|
|
64
|
+
subscriptionId?: string | null | undefined;
|
|
65
|
+
merchantId: string;
|
|
66
|
+
status: OrderBillingScheduleStatus;
|
|
67
|
+
startDate: Date;
|
|
68
|
+
endDate: Date;
|
|
69
|
+
billingAnchor: Date;
|
|
70
|
+
alignmentPolicy: OrderBillingScheduleAlignmentPolicy;
|
|
71
|
+
prorationPolicy: OrderBillingScheduleProrationPolicy;
|
|
72
|
+
paymentTermDays?: number | null | undefined;
|
|
73
|
+
periodPreset: OrderBillingSchedulePeriodPreset;
|
|
74
|
+
metadata: { [k: string]: any };
|
|
75
|
+
createdAt: Date;
|
|
76
|
+
updatedAt: Date;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const OrderBillingScheduleObject$inboundSchema: z.ZodNativeEnum<
|
|
81
|
+
typeof OrderBillingScheduleObject
|
|
82
|
+
> = z.nativeEnum(OrderBillingScheduleObject);
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const OrderBillingScheduleStatus$inboundSchema: z.ZodNativeEnum<
|
|
86
|
+
typeof OrderBillingScheduleStatus
|
|
87
|
+
> = z.nativeEnum(OrderBillingScheduleStatus);
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const OrderBillingScheduleAlignmentPolicy$inboundSchema: z.ZodNativeEnum<
|
|
91
|
+
typeof OrderBillingScheduleAlignmentPolicy
|
|
92
|
+
> = z.nativeEnum(OrderBillingScheduleAlignmentPolicy);
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const OrderBillingScheduleProrationPolicy$inboundSchema: z.ZodNativeEnum<
|
|
96
|
+
typeof OrderBillingScheduleProrationPolicy
|
|
97
|
+
> = z.nativeEnum(OrderBillingScheduleProrationPolicy);
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const OrderBillingSchedulePeriodPreset$inboundSchema: z.ZodNativeEnum<
|
|
101
|
+
typeof OrderBillingSchedulePeriodPreset
|
|
102
|
+
> = z.nativeEnum(OrderBillingSchedulePeriodPreset);
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const OrderBillingSchedule$inboundSchema: z.ZodType<
|
|
106
|
+
OrderBillingSchedule,
|
|
107
|
+
z.ZodTypeDef,
|
|
108
|
+
unknown
|
|
109
|
+
> = z.object({
|
|
110
|
+
id: z.string(),
|
|
111
|
+
object: OrderBillingScheduleObject$inboundSchema,
|
|
112
|
+
orderId: z.nullable(z.string()).optional(),
|
|
113
|
+
subscriptionId: z.nullable(z.string()).optional(),
|
|
114
|
+
merchantId: z.string(),
|
|
115
|
+
status: OrderBillingScheduleStatus$inboundSchema,
|
|
116
|
+
startDate: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
117
|
+
endDate: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
118
|
+
billingAnchor: z.string().datetime({ offset: true }).transform(v =>
|
|
119
|
+
new Date(v)
|
|
120
|
+
),
|
|
121
|
+
alignmentPolicy: OrderBillingScheduleAlignmentPolicy$inboundSchema,
|
|
122
|
+
prorationPolicy: OrderBillingScheduleProrationPolicy$inboundSchema,
|
|
123
|
+
paymentTermDays: z.nullable(z.number().int()).optional(),
|
|
124
|
+
periodPreset: OrderBillingSchedulePeriodPreset$inboundSchema,
|
|
125
|
+
metadata: z.record(z.any()),
|
|
126
|
+
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
127
|
+
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
export function orderBillingScheduleFromJSON(
|
|
131
|
+
jsonString: string,
|
|
132
|
+
): SafeParseResult<OrderBillingSchedule, SDKValidationError> {
|
|
133
|
+
return safeParse(
|
|
134
|
+
jsonString,
|
|
135
|
+
(x) => OrderBillingSchedule$inboundSchema.parse(JSON.parse(x)),
|
|
136
|
+
`Failed to parse 'OrderBillingSchedule' from JSON`,
|
|
137
|
+
);
|
|
138
|
+
}
|
|
@@ -9,16 +9,13 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
export const PaymentSessionObject = {
|
|
12
|
-
PaymentSession: "
|
|
12
|
+
PaymentSession: "payment_session",
|
|
13
13
|
} as const;
|
|
14
14
|
export type PaymentSessionObject = ClosedEnum<typeof PaymentSessionObject>;
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} as const;
|
|
20
|
-
export type Mode = ClosedEnum<typeof Mode>;
|
|
21
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Lifecycle status of the session.
|
|
18
|
+
*/
|
|
22
19
|
export const PaymentSessionStatus = {
|
|
23
20
|
Pending: "pending",
|
|
24
21
|
Processing: "processing",
|
|
@@ -27,26 +24,55 @@ export const PaymentSessionStatus = {
|
|
|
27
24
|
Expired: "expired",
|
|
28
25
|
Cancelled: "cancelled",
|
|
29
26
|
} as const;
|
|
27
|
+
/**
|
|
28
|
+
* Lifecycle status of the session.
|
|
29
|
+
*/
|
|
30
30
|
export type PaymentSessionStatus = ClosedEnum<typeof PaymentSessionStatus>;
|
|
31
31
|
|
|
32
32
|
export type PaymentSession = {
|
|
33
33
|
object: PaymentSessionObject;
|
|
34
34
|
/**
|
|
35
|
-
* Payment session
|
|
35
|
+
* Payment session ID (ps_*).
|
|
36
36
|
*/
|
|
37
37
|
id: string;
|
|
38
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Type of entity the session pays for (invoice, subscription, payment, topup).
|
|
40
|
+
*/
|
|
41
|
+
entityType: string;
|
|
42
|
+
/**
|
|
43
|
+
* ID of the entity the session pays for.
|
|
44
|
+
*/
|
|
45
|
+
entityId: string;
|
|
46
|
+
/**
|
|
47
|
+
* Display label for the entity — invoice number, payment-link reference, or subscription name. Null when no label is available.
|
|
48
|
+
*/
|
|
49
|
+
entityLabel?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Amount in decimal dollars.
|
|
52
|
+
*/
|
|
53
|
+
amount: string;
|
|
54
|
+
/**
|
|
55
|
+
* ISO 4217 currency code.
|
|
56
|
+
*/
|
|
57
|
+
currency: string;
|
|
58
|
+
/**
|
|
59
|
+
* Lifecycle status of the session.
|
|
60
|
+
*/
|
|
39
61
|
status: PaymentSessionStatus;
|
|
40
62
|
/**
|
|
41
|
-
*
|
|
63
|
+
* Stripe Connect account ID (acct_*) when the session is routed to a connected account.
|
|
64
|
+
*/
|
|
65
|
+
merchantPaymentAccountId?: string | null | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Provider payment intent reference — Stripe PaymentIntent ID (pi_*) or Airwallex intent ID (int_*). Null until the intent is created on first checkout load.
|
|
68
|
+
*/
|
|
69
|
+
providerPaymentRef?: string | null | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Timestamp the session reached terminal completion. Null until the session completes.
|
|
42
72
|
*/
|
|
43
|
-
url: string;
|
|
44
|
-
successRedirectUrl?: string | null | undefined;
|
|
45
|
-
failureRedirectUrl?: string | null | undefined;
|
|
46
|
-
metadata?: { [k: string]: any } | undefined;
|
|
47
|
-
expiresAt: Date;
|
|
48
73
|
completedAt?: Date | null | undefined;
|
|
49
74
|
createdAt: Date;
|
|
75
|
+
updatedAt: Date;
|
|
50
76
|
};
|
|
51
77
|
|
|
52
78
|
/** @internal */
|
|
@@ -54,11 +80,6 @@ export const PaymentSessionObject$inboundSchema: z.ZodNativeEnum<
|
|
|
54
80
|
typeof PaymentSessionObject
|
|
55
81
|
> = z.nativeEnum(PaymentSessionObject);
|
|
56
82
|
|
|
57
|
-
/** @internal */
|
|
58
|
-
export const Mode$inboundSchema: z.ZodNativeEnum<typeof Mode> = z.nativeEnum(
|
|
59
|
-
Mode,
|
|
60
|
-
);
|
|
61
|
-
|
|
62
83
|
/** @internal */
|
|
63
84
|
export const PaymentSessionStatus$inboundSchema: z.ZodNativeEnum<
|
|
64
85
|
typeof PaymentSessionStatus
|
|
@@ -72,17 +93,19 @@ export const PaymentSession$inboundSchema: z.ZodType<
|
|
|
72
93
|
> = z.object({
|
|
73
94
|
object: PaymentSessionObject$inboundSchema,
|
|
74
95
|
id: z.string(),
|
|
75
|
-
|
|
96
|
+
entityType: z.string(),
|
|
97
|
+
entityId: z.string(),
|
|
98
|
+
entityLabel: z.nullable(z.string()).optional(),
|
|
99
|
+
amount: z.string(),
|
|
100
|
+
currency: z.string(),
|
|
76
101
|
status: PaymentSessionStatus$inboundSchema,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
failureRedirectUrl: z.nullable(z.string()).optional(),
|
|
80
|
-
metadata: z.record(z.any()).optional(),
|
|
81
|
-
expiresAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
102
|
+
merchantPaymentAccountId: z.nullable(z.string()).optional(),
|
|
103
|
+
providerPaymentRef: z.nullable(z.string()).optional(),
|
|
82
104
|
completedAt: z.nullable(
|
|
83
105
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
84
106
|
).optional(),
|
|
85
107
|
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
108
|
+
updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
86
109
|
});
|
|
87
110
|
|
|
88
111
|
export function paymentSessionFromJSON(
|
package/src/models/plan.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
PlanCreditAllocation,
|
|
13
13
|
PlanCreditAllocation$inboundSchema,
|
|
14
14
|
} from "./plancreditallocation.js";
|
|
15
|
-
import {
|
|
15
|
+
import { PlanPrice, PlanPrice$inboundSchema } from "./planprice.js";
|
|
16
16
|
|
|
17
17
|
export const PlanObject = {
|
|
18
18
|
Plan: "plan",
|
|
@@ -84,7 +84,7 @@ export type Plan = {
|
|
|
84
84
|
merchantId: string;
|
|
85
85
|
name: string;
|
|
86
86
|
paymentTerm?: PlanPaymentTerm | undefined;
|
|
87
|
-
prices?: Array<
|
|
87
|
+
prices?: Array<PlanPrice> | undefined;
|
|
88
88
|
/**
|
|
89
89
|
* Unique identifier for a product
|
|
90
90
|
*/
|
|
@@ -186,7 +186,7 @@ export const Plan$inboundSchema: z.ZodType<Plan, z.ZodTypeDef, unknown> = z
|
|
|
186
186
|
merchantId: z.string(),
|
|
187
187
|
name: z.string(),
|
|
188
188
|
paymentTerm: z.lazy(() => PlanPaymentTerm$inboundSchema).optional(),
|
|
189
|
-
prices: z.array(
|
|
189
|
+
prices: z.array(PlanPrice$inboundSchema).optional(),
|
|
190
190
|
productId: z.string(),
|
|
191
191
|
taxBehavior: TaxBehavior$inboundSchema.optional(),
|
|
192
192
|
updatedAt: z.string().datetime({ offset: true }).transform(v =>
|