@crevio/sdk 0.4.11 → 0.4.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/README.md +9 -13
- package/dist/commonjs/funcs/{cartsUpdate.d.ts → customersDelete.d.ts} +4 -4
- package/dist/commonjs/funcs/customersDelete.d.ts.map +1 -0
- package/dist/commonjs/funcs/{cartsDelete.js → customersDelete.js} +10 -10
- package/dist/commonjs/funcs/customersDelete.js.map +1 -0
- package/dist/commonjs/funcs/filesCreate.d.ts +1 -2
- package/dist/commonjs/funcs/filesCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/filesCreate.js +1 -2
- package/dist/commonjs/funcs/filesCreate.js.map +1 -1
- package/dist/{esm/funcs/cartsDelete.d.ts → commonjs/funcs/legalPagesGet.d.ts} +4 -4
- package/dist/commonjs/funcs/legalPagesGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/{cartsGet.js → legalPagesGet.js} +10 -10
- package/dist/commonjs/funcs/legalPagesGet.js.map +1 -0
- package/dist/commonjs/funcs/{invoicesPay.d.ts → legalPagesList.d.ts} +4 -4
- package/dist/commonjs/funcs/legalPagesList.d.ts.map +1 -0
- package/dist/commonjs/funcs/{invoicesPay.js → legalPagesList.js} +18 -17
- package/dist/commonjs/funcs/legalPagesList.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/blogpost.d.ts +1 -0
- package/dist/commonjs/models/blogpost.d.ts.map +1 -1
- package/dist/commonjs/models/blogpost.js +2 -0
- package/dist/commonjs/models/blogpost.js.map +1 -1
- package/dist/commonjs/models/checkout.d.ts +12 -0
- package/dist/commonjs/models/checkout.d.ts.map +1 -1
- package/dist/commonjs/models/checkout.js +10 -1
- package/dist/commonjs/models/checkout.js.map +1 -1
- package/dist/commonjs/models/checkoutcreaterequest.d.ts +2 -12
- package/dist/commonjs/models/checkoutcreaterequest.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutcreaterequest.js +2 -10
- package/dist/commonjs/models/checkoutcreaterequest.js.map +1 -1
- package/dist/commonjs/models/checkoutlink.d.ts +5 -0
- package/dist/commonjs/models/checkoutlink.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutlink.js +8 -1
- package/dist/commonjs/models/checkoutlink.js.map +1 -1
- package/dist/commonjs/models/checkoutlinkrequest.d.ts +8 -18
- package/dist/commonjs/models/checkoutlinkrequest.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutlinkrequest.js +8 -19
- package/dist/commonjs/models/checkoutlinkrequest.js.map +1 -1
- package/dist/commonjs/models/checkoutupdaterequest.d.ts +2 -12
- package/dist/commonjs/models/checkoutupdaterequest.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutupdaterequest.js +2 -10
- package/dist/commonjs/models/checkoutupdaterequest.js.map +1 -1
- package/dist/commonjs/models/customer.d.ts +1 -0
- package/dist/commonjs/models/customer.d.ts.map +1 -1
- package/dist/commonjs/models/customer.js +1 -0
- package/dist/commonjs/models/customer.js.map +1 -1
- package/dist/commonjs/models/customerrequest.d.ts +4 -12
- package/dist/commonjs/models/customerrequest.d.ts.map +1 -1
- package/dist/commonjs/models/customerrequest.js +4 -10
- package/dist/commonjs/models/customerrequest.js.map +1 -1
- package/dist/commonjs/models/discountrequest.d.ts +2 -12
- package/dist/commonjs/models/discountrequest.d.ts.map +1 -1
- package/dist/commonjs/models/discountrequest.js +2 -10
- package/dist/commonjs/models/discountrequest.js.map +1 -1
- package/dist/commonjs/models/file.d.ts +25 -5
- package/dist/commonjs/models/file.d.ts.map +1 -1
- package/dist/commonjs/models/file.js +36 -6
- package/dist/commonjs/models/file.js.map +1 -1
- package/dist/commonjs/models/filecreateresponse.d.ts +25 -5
- package/dist/commonjs/models/filecreateresponse.d.ts.map +1 -1
- package/dist/commonjs/models/filecreateresponse.js +36 -6
- package/dist/commonjs/models/filecreateresponse.js.map +1 -1
- package/dist/commonjs/models/filerequest.d.ts +30 -0
- package/dist/commonjs/models/filerequest.d.ts.map +1 -0
- package/dist/commonjs/models/{cartitem.js → filerequest.js} +16 -12
- package/dist/commonjs/models/filerequest.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +3 -4
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +3 -4
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoicerequest.d.ts +2 -12
- package/dist/commonjs/models/invoicerequest.d.ts.map +1 -1
- package/dist/commonjs/models/invoicerequest.js +2 -10
- package/dist/commonjs/models/invoicerequest.js.map +1 -1
- package/dist/commonjs/models/legalpage.d.ts +26 -0
- package/dist/commonjs/models/legalpage.d.ts.map +1 -0
- package/dist/commonjs/models/legalpage.js +72 -0
- package/dist/commonjs/models/legalpage.js.map +1 -0
- package/dist/commonjs/models/listresponselegalpage.d.ts +21 -0
- package/dist/commonjs/models/listresponselegalpage.d.ts.map +1 -0
- package/dist/commonjs/models/{cart.js → listresponselegalpage.js} +17 -14
- package/dist/commonjs/models/listresponselegalpage.js.map +1 -0
- package/dist/commonjs/models/me.d.ts +10 -2
- package/dist/commonjs/models/me.d.ts.map +1 -1
- package/dist/commonjs/models/me.js +17 -3
- package/dist/commonjs/models/me.js.map +1 -1
- package/dist/commonjs/models/operations/deletecustomer.d.ts +15 -0
- package/dist/commonjs/models/operations/deletecustomer.d.ts.map +1 -0
- package/dist/commonjs/models/operations/{payinvoice.js → deletecustomer.js} +6 -6
- package/dist/commonjs/models/operations/deletecustomer.js.map +1 -0
- package/dist/commonjs/models/operations/getlegalpage.d.ts +15 -0
- package/dist/commonjs/models/operations/getlegalpage.d.ts.map +1 -0
- package/dist/commonjs/models/operations/{updatecart.js → getlegalpage.js} +8 -10
- package/dist/commonjs/models/operations/getlegalpage.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -5
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -5
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listfiles.d.ts +4 -4
- package/dist/commonjs/models/operations/listfiles.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listfiles.js +5 -4
- package/dist/commonjs/models/operations/listfiles.js.map +1 -1
- package/dist/commonjs/models/operations/listlegalpages.d.ts +45 -0
- package/dist/commonjs/models/operations/listlegalpages.d.ts.map +1 -0
- package/dist/commonjs/models/operations/{createfile.js → listlegalpages.js} +19 -23
- package/dist/commonjs/models/operations/listlegalpages.js.map +1 -0
- package/dist/commonjs/models/pricevariant.d.ts +3 -0
- package/dist/commonjs/models/pricevariant.d.ts.map +1 -1
- package/dist/commonjs/models/pricevariant.js +5 -0
- package/dist/commonjs/models/pricevariant.js.map +1 -1
- package/dist/commonjs/models/pricevariantrequest.d.ts +7 -12
- package/dist/commonjs/models/pricevariantrequest.d.ts.map +1 -1
- package/dist/commonjs/models/pricevariantrequest.js +7 -14
- package/dist/commonjs/models/pricevariantrequest.js.map +1 -1
- package/dist/commonjs/models/pricevariantupdaterequest.d.ts +7 -12
- package/dist/commonjs/models/pricevariantupdaterequest.d.ts.map +1 -1
- package/dist/commonjs/models/pricevariantupdaterequest.js +7 -14
- package/dist/commonjs/models/pricevariantupdaterequest.js.map +1 -1
- package/dist/commonjs/models/productrequest.d.ts +2 -12
- package/dist/commonjs/models/productrequest.d.ts.map +1 -1
- package/dist/commonjs/models/productrequest.js +2 -10
- package/dist/commonjs/models/productrequest.js.map +1 -1
- package/dist/commonjs/models/subscription.d.ts +40 -8
- package/dist/commonjs/models/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/subscription.js +58 -9
- package/dist/commonjs/models/subscription.js.map +1 -1
- package/dist/commonjs/models/webhookendpointrequest.d.ts +2 -12
- package/dist/commonjs/models/webhookendpointrequest.d.ts.map +1 -1
- package/dist/commonjs/models/webhookendpointrequest.js +2 -14
- package/dist/commonjs/models/webhookendpointrequest.js.map +1 -1
- package/dist/commonjs/models/x402configuration.d.ts +15 -3
- package/dist/commonjs/models/x402configuration.d.ts.map +1 -1
- package/dist/commonjs/models/x402configuration.js +22 -4
- package/dist/commonjs/models/x402configuration.js.map +1 -1
- package/dist/commonjs/models/x402configurationrequest.d.ts +2 -12
- package/dist/commonjs/models/x402configurationrequest.d.ts.map +1 -1
- package/dist/commonjs/models/x402configurationrequest.js +2 -14
- package/dist/commonjs/models/x402configurationrequest.js.map +1 -1
- package/dist/commonjs/sdk/customers.d.ts +7 -0
- package/dist/commonjs/sdk/customers.d.ts.map +1 -1
- package/dist/commonjs/sdk/customers.js +10 -0
- package/dist/commonjs/sdk/customers.js.map +1 -1
- package/dist/commonjs/sdk/files.d.ts +1 -1
- package/dist/commonjs/sdk/files.d.ts.map +1 -1
- package/dist/commonjs/sdk/files.js.map +1 -1
- package/dist/commonjs/sdk/invoices.d.ts +0 -7
- package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoices.js +0 -10
- package/dist/commonjs/sdk/invoices.js.map +1 -1
- package/dist/commonjs/sdk/legalpages.d.ts +20 -0
- package/dist/commonjs/sdk/legalpages.d.ts.map +1 -0
- package/dist/commonjs/sdk/legalpages.js +32 -0
- package/dist/commonjs/sdk/legalpages.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -3
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/customersDelete.d.ts +19 -0
- package/dist/esm/funcs/customersDelete.d.ts.map +1 -0
- package/dist/esm/funcs/{cartsDelete.js → customersDelete.js} +9 -9
- package/dist/esm/funcs/customersDelete.js.map +1 -0
- package/dist/esm/funcs/filesCreate.d.ts +1 -2
- package/dist/esm/funcs/filesCreate.d.ts.map +1 -1
- package/dist/esm/funcs/filesCreate.js +1 -2
- package/dist/esm/funcs/filesCreate.js.map +1 -1
- package/dist/{commonjs/funcs/cartsDelete.d.ts → esm/funcs/legalPagesGet.d.ts} +4 -4
- package/dist/esm/funcs/legalPagesGet.d.ts.map +1 -0
- package/dist/esm/funcs/{cartsGet.js → legalPagesGet.js} +9 -9
- package/dist/esm/funcs/legalPagesGet.js.map +1 -0
- package/dist/{commonjs/funcs/cartsGet.d.ts → esm/funcs/legalPagesList.d.ts} +4 -4
- package/dist/esm/funcs/legalPagesList.d.ts.map +1 -0
- package/dist/esm/funcs/{invoicesPay.js → legalPagesList.js} +18 -17
- package/dist/esm/funcs/legalPagesList.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/blogpost.d.ts +1 -0
- package/dist/esm/models/blogpost.d.ts.map +1 -1
- package/dist/esm/models/blogpost.js +2 -0
- package/dist/esm/models/blogpost.js.map +1 -1
- package/dist/esm/models/checkout.d.ts +12 -0
- package/dist/esm/models/checkout.d.ts.map +1 -1
- package/dist/esm/models/checkout.js +8 -0
- package/dist/esm/models/checkout.js.map +1 -1
- package/dist/esm/models/checkoutcreaterequest.d.ts +2 -12
- package/dist/esm/models/checkoutcreaterequest.d.ts.map +1 -1
- package/dist/esm/models/checkoutcreaterequest.js +1 -8
- package/dist/esm/models/checkoutcreaterequest.js.map +1 -1
- package/dist/esm/models/checkoutlink.d.ts +5 -0
- package/dist/esm/models/checkoutlink.d.ts.map +1 -1
- package/dist/esm/models/checkoutlink.js +6 -0
- package/dist/esm/models/checkoutlink.js.map +1 -1
- package/dist/esm/models/checkoutlinkrequest.d.ts +8 -18
- package/dist/esm/models/checkoutlinkrequest.d.ts.map +1 -1
- package/dist/esm/models/checkoutlinkrequest.js +6 -16
- package/dist/esm/models/checkoutlinkrequest.js.map +1 -1
- package/dist/esm/models/checkoutupdaterequest.d.ts +2 -12
- package/dist/esm/models/checkoutupdaterequest.d.ts.map +1 -1
- package/dist/esm/models/checkoutupdaterequest.js +1 -8
- package/dist/esm/models/checkoutupdaterequest.js.map +1 -1
- package/dist/esm/models/customer.d.ts +1 -0
- package/dist/esm/models/customer.d.ts.map +1 -1
- package/dist/esm/models/customer.js +1 -0
- package/dist/esm/models/customer.js.map +1 -1
- package/dist/esm/models/customerrequest.d.ts +4 -12
- package/dist/esm/models/customerrequest.d.ts.map +1 -1
- package/dist/esm/models/customerrequest.js +3 -8
- package/dist/esm/models/customerrequest.js.map +1 -1
- package/dist/esm/models/discountrequest.d.ts +2 -12
- package/dist/esm/models/discountrequest.d.ts.map +1 -1
- package/dist/esm/models/discountrequest.js +1 -8
- package/dist/esm/models/discountrequest.js.map +1 -1
- package/dist/esm/models/file.d.ts +25 -5
- package/dist/esm/models/file.d.ts.map +1 -1
- package/dist/esm/models/file.js +30 -5
- package/dist/esm/models/file.js.map +1 -1
- package/dist/esm/models/filecreateresponse.d.ts +25 -5
- package/dist/esm/models/filecreateresponse.d.ts.map +1 -1
- package/dist/esm/models/filecreateresponse.js +30 -5
- package/dist/esm/models/filecreateresponse.js.map +1 -1
- package/dist/esm/models/filerequest.d.ts +30 -0
- package/dist/esm/models/filerequest.d.ts.map +1 -0
- package/dist/esm/models/filerequest.js +25 -0
- package/dist/esm/models/filerequest.js.map +1 -0
- package/dist/esm/models/index.d.ts +3 -4
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +3 -4
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoicerequest.d.ts +2 -12
- package/dist/esm/models/invoicerequest.d.ts.map +1 -1
- package/dist/esm/models/invoicerequest.js +1 -8
- package/dist/esm/models/invoicerequest.js.map +1 -1
- package/dist/esm/models/legalpage.d.ts +26 -0
- package/dist/esm/models/legalpage.d.ts.map +1 -0
- package/dist/esm/models/legalpage.js +35 -0
- package/dist/esm/models/legalpage.js.map +1 -0
- package/dist/esm/models/listresponselegalpage.d.ts +21 -0
- package/dist/esm/models/listresponselegalpage.d.ts.map +1 -0
- package/dist/esm/models/listresponselegalpage.js +27 -0
- package/dist/esm/models/listresponselegalpage.js.map +1 -0
- package/dist/esm/models/me.d.ts +10 -2
- package/dist/esm/models/me.d.ts.map +1 -1
- package/dist/esm/models/me.js +14 -2
- package/dist/esm/models/me.js.map +1 -1
- package/dist/esm/models/operations/deletecustomer.d.ts +15 -0
- package/dist/esm/models/operations/deletecustomer.d.ts.map +1 -0
- package/dist/esm/models/operations/deletecustomer.js +12 -0
- package/dist/esm/models/operations/deletecustomer.js.map +1 -0
- package/dist/esm/models/operations/getlegalpage.d.ts +15 -0
- package/dist/esm/models/operations/getlegalpage.d.ts.map +1 -0
- package/dist/esm/models/operations/getlegalpage.js +17 -0
- package/dist/esm/models/operations/getlegalpage.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -5
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -5
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listfiles.d.ts +4 -4
- package/dist/esm/models/operations/listfiles.d.ts.map +1 -1
- package/dist/esm/models/operations/listfiles.js +4 -3
- package/dist/esm/models/operations/listfiles.js.map +1 -1
- package/dist/esm/models/operations/listlegalpages.d.ts +45 -0
- package/dist/esm/models/operations/listlegalpages.d.ts.map +1 -0
- package/dist/esm/models/operations/listlegalpages.js +32 -0
- package/dist/esm/models/operations/listlegalpages.js.map +1 -0
- package/dist/esm/models/pricevariant.d.ts +3 -0
- package/dist/esm/models/pricevariant.d.ts.map +1 -1
- package/dist/esm/models/pricevariant.js +5 -0
- package/dist/esm/models/pricevariant.js.map +1 -1
- package/dist/esm/models/pricevariantrequest.d.ts +7 -12
- package/dist/esm/models/pricevariantrequest.d.ts.map +1 -1
- package/dist/esm/models/pricevariantrequest.js +6 -12
- package/dist/esm/models/pricevariantrequest.js.map +1 -1
- package/dist/esm/models/pricevariantupdaterequest.d.ts +7 -12
- package/dist/esm/models/pricevariantupdaterequest.d.ts.map +1 -1
- package/dist/esm/models/pricevariantupdaterequest.js +6 -12
- package/dist/esm/models/pricevariantupdaterequest.js.map +1 -1
- package/dist/esm/models/productrequest.d.ts +2 -12
- package/dist/esm/models/productrequest.d.ts.map +1 -1
- package/dist/esm/models/productrequest.js +1 -8
- package/dist/esm/models/productrequest.js.map +1 -1
- package/dist/esm/models/subscription.d.ts +40 -8
- package/dist/esm/models/subscription.d.ts.map +1 -1
- package/dist/esm/models/subscription.js +49 -8
- package/dist/esm/models/subscription.js.map +1 -1
- package/dist/esm/models/webhookendpointrequest.d.ts +2 -12
- package/dist/esm/models/webhookendpointrequest.d.ts.map +1 -1
- package/dist/esm/models/webhookendpointrequest.js +1 -12
- package/dist/esm/models/webhookendpointrequest.js.map +1 -1
- package/dist/esm/models/x402configuration.d.ts +15 -3
- package/dist/esm/models/x402configuration.d.ts.map +1 -1
- package/dist/esm/models/x402configuration.js +18 -3
- package/dist/esm/models/x402configuration.js.map +1 -1
- package/dist/esm/models/x402configurationrequest.d.ts +2 -12
- package/dist/esm/models/x402configurationrequest.d.ts.map +1 -1
- package/dist/esm/models/x402configurationrequest.js +1 -12
- package/dist/esm/models/x402configurationrequest.js.map +1 -1
- package/dist/esm/sdk/customers.d.ts +7 -0
- package/dist/esm/sdk/customers.d.ts.map +1 -1
- package/dist/esm/sdk/customers.js +10 -0
- package/dist/esm/sdk/customers.js.map +1 -1
- package/dist/esm/sdk/files.d.ts +1 -1
- package/dist/esm/sdk/files.d.ts.map +1 -1
- package/dist/esm/sdk/files.js.map +1 -1
- package/dist/esm/sdk/invoices.d.ts +0 -7
- package/dist/esm/sdk/invoices.d.ts.map +1 -1
- package/dist/esm/sdk/invoices.js +0 -10
- package/dist/esm/sdk/invoices.js.map +1 -1
- package/dist/esm/sdk/legalpages.d.ts +20 -0
- package/dist/esm/sdk/legalpages.d.ts.map +1 -0
- package/dist/esm/sdk/legalpages.js +28 -0
- package/dist/esm/sdk/legalpages.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -3
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/{cartsDelete.ts → customersDelete.ts} +10 -10
- package/src/funcs/filesCreate.ts +3 -4
- package/src/funcs/{cartsGet.ts → legalPagesGet.ts} +13 -13
- package/src/funcs/{invoicesPay.ts → legalPagesList.ts} +25 -22
- package/src/lib/config.ts +2 -2
- package/src/models/blogpost.ts +5 -0
- package/src/models/checkout.ts +29 -0
- package/src/models/checkoutcreaterequest.ts +5 -33
- package/src/models/checkoutlink.ts +21 -0
- package/src/models/checkoutlinkrequest.ts +22 -47
- package/src/models/checkoutupdaterequest.ts +5 -33
- package/src/models/customer.ts +2 -0
- package/src/models/customerrequest.ts +9 -31
- package/src/models/discountrequest.ts +5 -31
- package/src/models/file.ts +102 -10
- package/src/models/filecreateresponse.ts +105 -10
- package/src/models/filerequest.ts +56 -0
- package/src/models/index.ts +3 -4
- package/src/models/invoicerequest.ts +5 -31
- package/src/models/legalpage.ts +64 -0
- package/src/models/listresponselegalpage.ts +56 -0
- package/src/models/me.ts +36 -4
- package/src/models/operations/deletecustomer.ts +34 -0
- package/src/models/operations/getlegalpage.ts +39 -0
- package/src/models/operations/index.ts +3 -5
- package/src/models/operations/listfiles.ts +6 -7
- package/src/models/operations/listlegalpages.ts +76 -0
- package/src/models/pricevariant.ts +7 -0
- package/src/models/pricevariantrequest.ts +14 -37
- package/src/models/pricevariantupdaterequest.ts +14 -39
- package/src/models/productrequest.ts +5 -31
- package/src/models/subscription.ts +165 -16
- package/src/models/webhookendpointrequest.ts +5 -39
- package/src/models/x402configuration.ts +63 -6
- package/src/models/x402configurationrequest.ts +8 -44
- package/src/sdk/customers.ts +18 -0
- package/src/sdk/files.ts +1 -1
- package/src/sdk/invoices.ts +0 -18
- package/src/sdk/legalpages.ts +46 -0
- package/src/sdk/sdk.ts +6 -6
- package/dist/commonjs/funcs/cartsCreate.d.ts +0 -18
- package/dist/commonjs/funcs/cartsCreate.d.ts.map +0 -1
- package/dist/commonjs/funcs/cartsCreate.js +0 -118
- package/dist/commonjs/funcs/cartsCreate.js.map +0 -1
- package/dist/commonjs/funcs/cartsDelete.d.ts.map +0 -1
- package/dist/commonjs/funcs/cartsDelete.js.map +0 -1
- package/dist/commonjs/funcs/cartsGet.d.ts.map +0 -1
- package/dist/commonjs/funcs/cartsGet.js.map +0 -1
- package/dist/commonjs/funcs/cartsUpdate.d.ts.map +0 -1
- package/dist/commonjs/funcs/cartsUpdate.js +0 -125
- package/dist/commonjs/funcs/cartsUpdate.js.map +0 -1
- package/dist/commonjs/funcs/invoicesPay.d.ts.map +0 -1
- package/dist/commonjs/funcs/invoicesPay.js.map +0 -1
- package/dist/commonjs/models/cart.d.ts +0 -15
- package/dist/commonjs/models/cart.d.ts.map +0 -1
- package/dist/commonjs/models/cart.js.map +0 -1
- package/dist/commonjs/models/cartcreaterequest.d.ts +0 -41
- package/dist/commonjs/models/cartcreaterequest.d.ts.map +0 -1
- package/dist/commonjs/models/cartcreaterequest.js +0 -78
- package/dist/commonjs/models/cartcreaterequest.js.map +0 -1
- package/dist/commonjs/models/cartitem.d.ts +0 -13
- package/dist/commonjs/models/cartitem.d.ts.map +0 -1
- package/dist/commonjs/models/cartitem.js.map +0 -1
- package/dist/commonjs/models/cartupdaterequest.d.ts +0 -38
- package/dist/commonjs/models/cartupdaterequest.d.ts.map +0 -1
- package/dist/commonjs/models/cartupdaterequest.js +0 -79
- package/dist/commonjs/models/cartupdaterequest.js.map +0 -1
- package/dist/commonjs/models/operations/createfile.d.ts +0 -49
- package/dist/commonjs/models/operations/createfile.d.ts.map +0 -1
- package/dist/commonjs/models/operations/createfile.js.map +0 -1
- package/dist/commonjs/models/operations/deletecart.d.ts +0 -15
- package/dist/commonjs/models/operations/deletecart.d.ts.map +0 -1
- package/dist/commonjs/models/operations/deletecart.js +0 -49
- package/dist/commonjs/models/operations/deletecart.js.map +0 -1
- package/dist/commonjs/models/operations/getcart.d.ts +0 -15
- package/dist/commonjs/models/operations/getcart.d.ts.map +0 -1
- package/dist/commonjs/models/operations/getcart.js +0 -49
- package/dist/commonjs/models/operations/getcart.js.map +0 -1
- package/dist/commonjs/models/operations/payinvoice.d.ts +0 -15
- package/dist/commonjs/models/operations/payinvoice.d.ts.map +0 -1
- package/dist/commonjs/models/operations/payinvoice.js.map +0 -1
- package/dist/commonjs/models/operations/updatecart.d.ts +0 -18
- package/dist/commonjs/models/operations/updatecart.d.ts.map +0 -1
- package/dist/commonjs/models/operations/updatecart.js.map +0 -1
- package/dist/commonjs/sdk/carts.d.ts +0 -34
- package/dist/commonjs/sdk/carts.d.ts.map +0 -1
- package/dist/commonjs/sdk/carts.js +0 -52
- package/dist/commonjs/sdk/carts.js.map +0 -1
- package/dist/esm/funcs/cartsCreate.d.ts +0 -18
- package/dist/esm/funcs/cartsCreate.d.ts.map +0 -1
- package/dist/esm/funcs/cartsCreate.js +0 -82
- package/dist/esm/funcs/cartsCreate.js.map +0 -1
- package/dist/esm/funcs/cartsDelete.d.ts.map +0 -1
- package/dist/esm/funcs/cartsDelete.js.map +0 -1
- package/dist/esm/funcs/cartsGet.d.ts +0 -19
- package/dist/esm/funcs/cartsGet.d.ts.map +0 -1
- package/dist/esm/funcs/cartsGet.js.map +0 -1
- package/dist/esm/funcs/cartsUpdate.d.ts +0 -19
- package/dist/esm/funcs/cartsUpdate.d.ts.map +0 -1
- package/dist/esm/funcs/cartsUpdate.js +0 -89
- package/dist/esm/funcs/cartsUpdate.js.map +0 -1
- package/dist/esm/funcs/invoicesPay.d.ts +0 -19
- package/dist/esm/funcs/invoicesPay.d.ts.map +0 -1
- package/dist/esm/funcs/invoicesPay.js.map +0 -1
- package/dist/esm/models/cart.d.ts +0 -15
- package/dist/esm/models/cart.d.ts.map +0 -1
- package/dist/esm/models/cart.js +0 -24
- package/dist/esm/models/cart.js.map +0 -1
- package/dist/esm/models/cartcreaterequest.d.ts +0 -41
- package/dist/esm/models/cartcreaterequest.d.ts.map +0 -1
- package/dist/esm/models/cartcreaterequest.js +0 -39
- package/dist/esm/models/cartcreaterequest.js.map +0 -1
- package/dist/esm/models/cartitem.d.ts +0 -13
- package/dist/esm/models/cartitem.d.ts.map +0 -1
- package/dist/esm/models/cartitem.js +0 -21
- package/dist/esm/models/cartitem.js.map +0 -1
- package/dist/esm/models/cartupdaterequest.d.ts +0 -38
- package/dist/esm/models/cartupdaterequest.d.ts.map +0 -1
- package/dist/esm/models/cartupdaterequest.js +0 -40
- package/dist/esm/models/cartupdaterequest.js.map +0 -1
- package/dist/esm/models/operations/createfile.d.ts +0 -49
- package/dist/esm/models/operations/createfile.d.ts.map +0 -1
- package/dist/esm/models/operations/createfile.js +0 -35
- package/dist/esm/models/operations/createfile.js.map +0 -1
- package/dist/esm/models/operations/deletecart.d.ts +0 -15
- package/dist/esm/models/operations/deletecart.d.ts.map +0 -1
- package/dist/esm/models/operations/deletecart.js +0 -12
- package/dist/esm/models/operations/deletecart.js.map +0 -1
- package/dist/esm/models/operations/getcart.d.ts +0 -15
- package/dist/esm/models/operations/getcart.d.ts.map +0 -1
- package/dist/esm/models/operations/getcart.js +0 -12
- package/dist/esm/models/operations/getcart.js.map +0 -1
- package/dist/esm/models/operations/payinvoice.d.ts +0 -15
- package/dist/esm/models/operations/payinvoice.d.ts.map +0 -1
- package/dist/esm/models/operations/payinvoice.js +0 -12
- package/dist/esm/models/operations/payinvoice.js.map +0 -1
- package/dist/esm/models/operations/updatecart.d.ts +0 -18
- package/dist/esm/models/operations/updatecart.d.ts.map +0 -1
- package/dist/esm/models/operations/updatecart.js +0 -19
- package/dist/esm/models/operations/updatecart.js.map +0 -1
- package/dist/esm/sdk/carts.d.ts +0 -34
- package/dist/esm/sdk/carts.d.ts.map +0 -1
- package/dist/esm/sdk/carts.js +0 -48
- package/dist/esm/sdk/carts.js.map +0 -1
- package/src/funcs/cartsCreate.ts +0 -170
- package/src/funcs/cartsUpdate.ts +0 -177
- package/src/models/cart.ts +0 -42
- package/src/models/cartcreaterequest.ts +0 -111
- package/src/models/cartitem.ts +0 -42
- package/src/models/cartupdaterequest.ts +0 -109
- package/src/models/operations/createfile.ts +0 -91
- package/src/models/operations/deletecart.ts +0 -34
- package/src/models/operations/getcart.ts +0 -30
- package/src/models/operations/payinvoice.ts +0 -34
- package/src/models/operations/updatecart.ts +0 -43
- package/src/sdk/carts.ts +0 -82
package/src/models/checkout.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
import { ClosedEnum } from "../types/enums.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
10
|
import { CheckoutItem, CheckoutItem$inboundSchema } from "./checkoutitem.js";
|
|
11
|
+
import { Customer, Customer$inboundSchema } from "./customer.js";
|
|
11
12
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
12
13
|
|
|
13
14
|
export const CheckoutStatus = {
|
|
@@ -18,6 +19,11 @@ export const CheckoutStatus = {
|
|
|
18
19
|
} as const;
|
|
19
20
|
export type CheckoutStatus = ClosedEnum<typeof CheckoutStatus>;
|
|
20
21
|
|
|
22
|
+
/**
|
|
23
|
+
* ID by default, full object when expanded
|
|
24
|
+
*/
|
|
25
|
+
export type CheckoutCustomer = Customer | string;
|
|
26
|
+
|
|
21
27
|
export type Checkout = {
|
|
22
28
|
id: string;
|
|
23
29
|
object: string;
|
|
@@ -28,6 +34,10 @@ export type Checkout = {
|
|
|
28
34
|
currency: string | null;
|
|
29
35
|
total: number;
|
|
30
36
|
clientSecret: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* ID by default, full object when expanded
|
|
39
|
+
*/
|
|
40
|
+
customer?: Customer | string | null | undefined;
|
|
31
41
|
checkoutItems: Array<CheckoutItem>;
|
|
32
42
|
};
|
|
33
43
|
|
|
@@ -36,6 +46,23 @@ export const CheckoutStatus$inboundSchema: z.ZodNativeEnum<
|
|
|
36
46
|
typeof CheckoutStatus
|
|
37
47
|
> = z.nativeEnum(CheckoutStatus);
|
|
38
48
|
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const CheckoutCustomer$inboundSchema: z.ZodType<
|
|
51
|
+
CheckoutCustomer,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.union([Customer$inboundSchema, z.string()]);
|
|
55
|
+
|
|
56
|
+
export function checkoutCustomerFromJSON(
|
|
57
|
+
jsonString: string,
|
|
58
|
+
): SafeParseResult<CheckoutCustomer, SDKValidationError> {
|
|
59
|
+
return safeParse(
|
|
60
|
+
jsonString,
|
|
61
|
+
(x) => CheckoutCustomer$inboundSchema.parse(JSON.parse(x)),
|
|
62
|
+
`Failed to parse 'CheckoutCustomer' from JSON`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
39
66
|
/** @internal */
|
|
40
67
|
export const Checkout$inboundSchema: z.ZodType<
|
|
41
68
|
Checkout,
|
|
@@ -51,6 +78,8 @@ export const Checkout$inboundSchema: z.ZodType<
|
|
|
51
78
|
currency: z.nullable(z.string()),
|
|
52
79
|
total: z.number(),
|
|
53
80
|
client_secret: z.nullable(z.string()),
|
|
81
|
+
customer: z.nullable(z.union([Customer$inboundSchema, z.string()]))
|
|
82
|
+
.optional(),
|
|
54
83
|
checkout_items: z.array(CheckoutItem$inboundSchema),
|
|
55
84
|
}).transform((v) => {
|
|
56
85
|
return remap$(v, {
|
|
@@ -10,7 +10,7 @@ export type LineItem = {
|
|
|
10
10
|
quantity?: number | undefined;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export type
|
|
13
|
+
export type CheckoutCreateRequest = {
|
|
14
14
|
email?: string | null | undefined;
|
|
15
15
|
/**
|
|
16
16
|
* Customer ID
|
|
@@ -20,10 +20,6 @@ export type CheckoutCreateRequestCheckout = {
|
|
|
20
20
|
lineItems?: Array<LineItem> | undefined;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
export type CheckoutCreateRequest = {
|
|
24
|
-
checkout: CheckoutCreateRequestCheckout;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
23
|
/** @internal */
|
|
28
24
|
export type LineItem$Outbound = {
|
|
29
25
|
price_variant: string;
|
|
@@ -49,7 +45,7 @@ export function lineItemToJSON(lineItem: LineItem): string {
|
|
|
49
45
|
}
|
|
50
46
|
|
|
51
47
|
/** @internal */
|
|
52
|
-
export type
|
|
48
|
+
export type CheckoutCreateRequest$Outbound = {
|
|
53
49
|
email?: string | null | undefined;
|
|
54
50
|
customer?: string | null | undefined;
|
|
55
51
|
discount_code?: string | null | undefined;
|
|
@@ -57,10 +53,10 @@ export type CheckoutCreateRequestCheckout$Outbound = {
|
|
|
57
53
|
};
|
|
58
54
|
|
|
59
55
|
/** @internal */
|
|
60
|
-
export const
|
|
61
|
-
|
|
56
|
+
export const CheckoutCreateRequest$outboundSchema: z.ZodType<
|
|
57
|
+
CheckoutCreateRequest$Outbound,
|
|
62
58
|
z.ZodTypeDef,
|
|
63
|
-
|
|
59
|
+
CheckoutCreateRequest
|
|
64
60
|
> = z.object({
|
|
65
61
|
email: z.nullable(z.string()).optional(),
|
|
66
62
|
customer: z.nullable(z.string()).optional(),
|
|
@@ -73,30 +69,6 @@ export const CheckoutCreateRequestCheckout$outboundSchema: z.ZodType<
|
|
|
73
69
|
});
|
|
74
70
|
});
|
|
75
71
|
|
|
76
|
-
export function checkoutCreateRequestCheckoutToJSON(
|
|
77
|
-
checkoutCreateRequestCheckout: CheckoutCreateRequestCheckout,
|
|
78
|
-
): string {
|
|
79
|
-
return JSON.stringify(
|
|
80
|
-
CheckoutCreateRequestCheckout$outboundSchema.parse(
|
|
81
|
-
checkoutCreateRequestCheckout,
|
|
82
|
-
),
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/** @internal */
|
|
87
|
-
export type CheckoutCreateRequest$Outbound = {
|
|
88
|
-
checkout: CheckoutCreateRequestCheckout$Outbound;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/** @internal */
|
|
92
|
-
export const CheckoutCreateRequest$outboundSchema: z.ZodType<
|
|
93
|
-
CheckoutCreateRequest$Outbound,
|
|
94
|
-
z.ZodTypeDef,
|
|
95
|
-
CheckoutCreateRequest
|
|
96
|
-
> = z.object({
|
|
97
|
-
checkout: z.lazy(() => CheckoutCreateRequestCheckout$outboundSchema),
|
|
98
|
-
});
|
|
99
|
-
|
|
100
72
|
export function checkoutCreateRequestToJSON(
|
|
101
73
|
checkoutCreateRequest: CheckoutCreateRequest,
|
|
102
74
|
): string {
|
|
@@ -10,6 +10,8 @@ import { Discount, Discount$inboundSchema } from "./discount.js";
|
|
|
10
10
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
11
|
import { PriceVariant, PriceVariant$inboundSchema } from "./pricevariant.js";
|
|
12
12
|
|
|
13
|
+
export type CheckoutLinkMetadata = {};
|
|
14
|
+
|
|
13
15
|
/**
|
|
14
16
|
* ID by default, full object when expanded
|
|
15
17
|
*/
|
|
@@ -21,6 +23,7 @@ export type CheckoutLink = {
|
|
|
21
23
|
name: string | null;
|
|
22
24
|
successUrl: string | null;
|
|
23
25
|
allowDiscountCodes: boolean;
|
|
26
|
+
metadata: CheckoutLinkMetadata | null;
|
|
24
27
|
createdAt: Date;
|
|
25
28
|
updatedAt: Date;
|
|
26
29
|
url: string;
|
|
@@ -31,6 +34,23 @@ export type CheckoutLink = {
|
|
|
31
34
|
priceVariants?: Array<PriceVariant> | undefined;
|
|
32
35
|
};
|
|
33
36
|
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const CheckoutLinkMetadata$inboundSchema: z.ZodType<
|
|
39
|
+
CheckoutLinkMetadata,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({});
|
|
43
|
+
|
|
44
|
+
export function checkoutLinkMetadataFromJSON(
|
|
45
|
+
jsonString: string,
|
|
46
|
+
): SafeParseResult<CheckoutLinkMetadata, SDKValidationError> {
|
|
47
|
+
return safeParse(
|
|
48
|
+
jsonString,
|
|
49
|
+
(x) => CheckoutLinkMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
50
|
+
`Failed to parse 'CheckoutLinkMetadata' from JSON`,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
34
54
|
/** @internal */
|
|
35
55
|
export const DiscountUnion$inboundSchema: z.ZodType<
|
|
36
56
|
DiscountUnion,
|
|
@@ -59,6 +79,7 @@ export const CheckoutLink$inboundSchema: z.ZodType<
|
|
|
59
79
|
name: z.nullable(z.string()),
|
|
60
80
|
success_url: z.nullable(z.string()),
|
|
61
81
|
allow_discount_codes: z.boolean(),
|
|
82
|
+
metadata: z.nullable(z.lazy(() => CheckoutLinkMetadata$inboundSchema)),
|
|
62
83
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
63
84
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
64
85
|
url: z.string(),
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type CheckoutLinkRequestMetadata = {};
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type CheckoutLinkRequest = {
|
|
11
11
|
name?: string | null | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* Discount ID
|
|
@@ -15,49 +15,52 @@ export type CheckoutLinkRequestCheckoutLink = {
|
|
|
15
15
|
discount?: string | null | undefined;
|
|
16
16
|
allowDiscountCodes?: boolean | undefined;
|
|
17
17
|
successUrl?: string | null | undefined;
|
|
18
|
-
metadata?:
|
|
18
|
+
metadata?: CheckoutLinkRequestMetadata | null | undefined;
|
|
19
19
|
priceVariants?: Array<string> | undefined;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
export type CheckoutLinkRequest = {
|
|
23
|
-
checkoutLink: CheckoutLinkRequestCheckoutLink;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
22
|
/** @internal */
|
|
27
|
-
export type
|
|
23
|
+
export type CheckoutLinkRequestMetadata$Outbound = {};
|
|
28
24
|
|
|
29
25
|
/** @internal */
|
|
30
|
-
export const
|
|
31
|
-
|
|
26
|
+
export const CheckoutLinkRequestMetadata$outboundSchema: z.ZodType<
|
|
27
|
+
CheckoutLinkRequestMetadata$Outbound,
|
|
32
28
|
z.ZodTypeDef,
|
|
33
|
-
|
|
29
|
+
CheckoutLinkRequestMetadata
|
|
34
30
|
> = z.object({});
|
|
35
31
|
|
|
36
|
-
export function
|
|
37
|
-
|
|
32
|
+
export function checkoutLinkRequestMetadataToJSON(
|
|
33
|
+
checkoutLinkRequestMetadata: CheckoutLinkRequestMetadata,
|
|
34
|
+
): string {
|
|
35
|
+
return JSON.stringify(
|
|
36
|
+
CheckoutLinkRequestMetadata$outboundSchema.parse(
|
|
37
|
+
checkoutLinkRequestMetadata,
|
|
38
|
+
),
|
|
39
|
+
);
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
/** @internal */
|
|
41
|
-
export type
|
|
43
|
+
export type CheckoutLinkRequest$Outbound = {
|
|
42
44
|
name?: string | null | undefined;
|
|
43
45
|
discount?: string | null | undefined;
|
|
44
46
|
allow_discount_codes?: boolean | undefined;
|
|
45
47
|
success_url?: string | null | undefined;
|
|
46
|
-
metadata?:
|
|
48
|
+
metadata?: CheckoutLinkRequestMetadata$Outbound | null | undefined;
|
|
47
49
|
price_variants?: Array<string> | undefined;
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
/** @internal */
|
|
51
|
-
export const
|
|
52
|
-
|
|
53
|
+
export const CheckoutLinkRequest$outboundSchema: z.ZodType<
|
|
54
|
+
CheckoutLinkRequest$Outbound,
|
|
53
55
|
z.ZodTypeDef,
|
|
54
|
-
|
|
56
|
+
CheckoutLinkRequest
|
|
55
57
|
> = z.object({
|
|
56
58
|
name: z.nullable(z.string()).optional(),
|
|
57
59
|
discount: z.nullable(z.string()).optional(),
|
|
58
60
|
allowDiscountCodes: z.boolean().optional(),
|
|
59
61
|
successUrl: z.nullable(z.string()).optional(),
|
|
60
|
-
metadata: z.nullable(z.lazy(() =>
|
|
62
|
+
metadata: z.nullable(z.lazy(() => CheckoutLinkRequestMetadata$outboundSchema))
|
|
63
|
+
.optional(),
|
|
61
64
|
priceVariants: z.array(z.string()).optional(),
|
|
62
65
|
}).transform((v) => {
|
|
63
66
|
return remap$(v, {
|
|
@@ -67,34 +70,6 @@ export const CheckoutLinkRequestCheckoutLink$outboundSchema: z.ZodType<
|
|
|
67
70
|
});
|
|
68
71
|
});
|
|
69
72
|
|
|
70
|
-
export function checkoutLinkRequestCheckoutLinkToJSON(
|
|
71
|
-
checkoutLinkRequestCheckoutLink: CheckoutLinkRequestCheckoutLink,
|
|
72
|
-
): string {
|
|
73
|
-
return JSON.stringify(
|
|
74
|
-
CheckoutLinkRequestCheckoutLink$outboundSchema.parse(
|
|
75
|
-
checkoutLinkRequestCheckoutLink,
|
|
76
|
-
),
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** @internal */
|
|
81
|
-
export type CheckoutLinkRequest$Outbound = {
|
|
82
|
-
checkout_link: CheckoutLinkRequestCheckoutLink$Outbound;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/** @internal */
|
|
86
|
-
export const CheckoutLinkRequest$outboundSchema: z.ZodType<
|
|
87
|
-
CheckoutLinkRequest$Outbound,
|
|
88
|
-
z.ZodTypeDef,
|
|
89
|
-
CheckoutLinkRequest
|
|
90
|
-
> = z.object({
|
|
91
|
-
checkoutLink: z.lazy(() => CheckoutLinkRequestCheckoutLink$outboundSchema),
|
|
92
|
-
}).transform((v) => {
|
|
93
|
-
return remap$(v, {
|
|
94
|
-
checkoutLink: "checkout_link",
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
|
|
98
73
|
export function checkoutLinkRequestToJSON(
|
|
99
74
|
checkoutLinkRequest: CheckoutLinkRequest,
|
|
100
75
|
): string {
|
|
@@ -5,26 +5,22 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type CheckoutUpdateRequest = {
|
|
9
9
|
email?: string | null | undefined;
|
|
10
10
|
discountCode?: string | null | undefined;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export type CheckoutUpdateRequest = {
|
|
14
|
-
checkout: CheckoutUpdateRequestCheckout;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
13
|
/** @internal */
|
|
18
|
-
export type
|
|
14
|
+
export type CheckoutUpdateRequest$Outbound = {
|
|
19
15
|
email?: string | null | undefined;
|
|
20
16
|
discount_code?: string | null | undefined;
|
|
21
17
|
};
|
|
22
18
|
|
|
23
19
|
/** @internal */
|
|
24
|
-
export const
|
|
25
|
-
|
|
20
|
+
export const CheckoutUpdateRequest$outboundSchema: z.ZodType<
|
|
21
|
+
CheckoutUpdateRequest$Outbound,
|
|
26
22
|
z.ZodTypeDef,
|
|
27
|
-
|
|
23
|
+
CheckoutUpdateRequest
|
|
28
24
|
> = z.object({
|
|
29
25
|
email: z.nullable(z.string()).optional(),
|
|
30
26
|
discountCode: z.nullable(z.string()).optional(),
|
|
@@ -34,30 +30,6 @@ export const CheckoutUpdateRequestCheckout$outboundSchema: z.ZodType<
|
|
|
34
30
|
});
|
|
35
31
|
});
|
|
36
32
|
|
|
37
|
-
export function checkoutUpdateRequestCheckoutToJSON(
|
|
38
|
-
checkoutUpdateRequestCheckout: CheckoutUpdateRequestCheckout,
|
|
39
|
-
): string {
|
|
40
|
-
return JSON.stringify(
|
|
41
|
-
CheckoutUpdateRequestCheckout$outboundSchema.parse(
|
|
42
|
-
checkoutUpdateRequestCheckout,
|
|
43
|
-
),
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/** @internal */
|
|
48
|
-
export type CheckoutUpdateRequest$Outbound = {
|
|
49
|
-
checkout: CheckoutUpdateRequestCheckout$Outbound;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/** @internal */
|
|
53
|
-
export const CheckoutUpdateRequest$outboundSchema: z.ZodType<
|
|
54
|
-
CheckoutUpdateRequest$Outbound,
|
|
55
|
-
z.ZodTypeDef,
|
|
56
|
-
CheckoutUpdateRequest
|
|
57
|
-
> = z.object({
|
|
58
|
-
checkout: z.lazy(() => CheckoutUpdateRequestCheckout$outboundSchema),
|
|
59
|
-
});
|
|
60
|
-
|
|
61
33
|
export function checkoutUpdateRequestToJSON(
|
|
62
34
|
checkoutUpdateRequest: CheckoutUpdateRequest,
|
|
63
35
|
): string {
|
package/src/models/customer.ts
CHANGED
|
@@ -28,6 +28,7 @@ export type Customer = {
|
|
|
28
28
|
updatedAt: Date;
|
|
29
29
|
ordersCount: number;
|
|
30
30
|
totalSpend: number;
|
|
31
|
+
tags: Array<any>;
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
/** @internal */
|
|
@@ -52,6 +53,7 @@ export const Customer$inboundSchema: z.ZodType<
|
|
|
52
53
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
53
54
|
orders_count: z.number().int(),
|
|
54
55
|
total_spend: z.number(),
|
|
56
|
+
tags: z.array(z.any()),
|
|
55
57
|
}).transform((v) => {
|
|
56
58
|
return remap$(v, {
|
|
57
59
|
"first_name": "firstName",
|
|
@@ -15,16 +15,13 @@ export type CustomerRequestCustomerType = ClosedEnum<
|
|
|
15
15
|
typeof CustomerRequestCustomerType
|
|
16
16
|
>;
|
|
17
17
|
|
|
18
|
-
export type
|
|
18
|
+
export type CustomerRequest = {
|
|
19
19
|
email?: string | undefined;
|
|
20
20
|
name?: string | null | undefined;
|
|
21
21
|
firstName?: string | null | undefined;
|
|
22
22
|
lastName?: string | null | undefined;
|
|
23
23
|
customerType?: CustomerRequestCustomerType | undefined;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export type CustomerRequest = {
|
|
27
|
-
customer: CustomerRequestCustomer;
|
|
24
|
+
tagIds?: Array<string> | undefined;
|
|
28
25
|
};
|
|
29
26
|
|
|
30
27
|
/** @internal */
|
|
@@ -33,55 +30,36 @@ export const CustomerRequestCustomerType$outboundSchema: z.ZodNativeEnum<
|
|
|
33
30
|
> = z.nativeEnum(CustomerRequestCustomerType);
|
|
34
31
|
|
|
35
32
|
/** @internal */
|
|
36
|
-
export type
|
|
33
|
+
export type CustomerRequest$Outbound = {
|
|
37
34
|
email?: string | undefined;
|
|
38
35
|
name?: string | null | undefined;
|
|
39
36
|
first_name?: string | null | undefined;
|
|
40
37
|
last_name?: string | null | undefined;
|
|
41
38
|
customer_type?: string | undefined;
|
|
39
|
+
tag_ids?: Array<string> | undefined;
|
|
42
40
|
};
|
|
43
41
|
|
|
44
42
|
/** @internal */
|
|
45
|
-
export const
|
|
46
|
-
|
|
43
|
+
export const CustomerRequest$outboundSchema: z.ZodType<
|
|
44
|
+
CustomerRequest$Outbound,
|
|
47
45
|
z.ZodTypeDef,
|
|
48
|
-
|
|
46
|
+
CustomerRequest
|
|
49
47
|
> = z.object({
|
|
50
48
|
email: z.string().optional(),
|
|
51
49
|
name: z.nullable(z.string()).optional(),
|
|
52
50
|
firstName: z.nullable(z.string()).optional(),
|
|
53
51
|
lastName: z.nullable(z.string()).optional(),
|
|
54
52
|
customerType: CustomerRequestCustomerType$outboundSchema.optional(),
|
|
53
|
+
tagIds: z.array(z.string()).optional(),
|
|
55
54
|
}).transform((v) => {
|
|
56
55
|
return remap$(v, {
|
|
57
56
|
firstName: "first_name",
|
|
58
57
|
lastName: "last_name",
|
|
59
58
|
customerType: "customer_type",
|
|
59
|
+
tagIds: "tag_ids",
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
export function customerRequestCustomerToJSON(
|
|
64
|
-
customerRequestCustomer: CustomerRequestCustomer,
|
|
65
|
-
): string {
|
|
66
|
-
return JSON.stringify(
|
|
67
|
-
CustomerRequestCustomer$outboundSchema.parse(customerRequestCustomer),
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/** @internal */
|
|
72
|
-
export type CustomerRequest$Outbound = {
|
|
73
|
-
customer: CustomerRequestCustomer$Outbound;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
/** @internal */
|
|
77
|
-
export const CustomerRequest$outboundSchema: z.ZodType<
|
|
78
|
-
CustomerRequest$Outbound,
|
|
79
|
-
z.ZodTypeDef,
|
|
80
|
-
CustomerRequest
|
|
81
|
-
> = z.object({
|
|
82
|
-
customer: z.lazy(() => CustomerRequestCustomer$outboundSchema),
|
|
83
|
-
});
|
|
84
|
-
|
|
85
63
|
export function customerRequestToJSON(
|
|
86
64
|
customerRequest: CustomerRequest,
|
|
87
65
|
): string {
|
|
@@ -23,7 +23,7 @@ export type DiscountRequestDuration = ClosedEnum<
|
|
|
23
23
|
typeof DiscountRequestDuration
|
|
24
24
|
>;
|
|
25
25
|
|
|
26
|
-
export type
|
|
26
|
+
export type DiscountRequest = {
|
|
27
27
|
code?: string | undefined;
|
|
28
28
|
discountType?: DiscountRequestDiscountType | undefined;
|
|
29
29
|
amountOff?: number | null | undefined;
|
|
@@ -36,10 +36,6 @@ export type DiscountRequestDiscount = {
|
|
|
36
36
|
priceVariants?: Array<string> | undefined;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
export type DiscountRequest = {
|
|
40
|
-
discount: DiscountRequestDiscount;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
39
|
/** @internal */
|
|
44
40
|
export const DiscountRequestDiscountType$outboundSchema: z.ZodNativeEnum<
|
|
45
41
|
typeof DiscountRequestDiscountType
|
|
@@ -51,7 +47,7 @@ export const DiscountRequestDuration$outboundSchema: z.ZodNativeEnum<
|
|
|
51
47
|
> = z.nativeEnum(DiscountRequestDuration);
|
|
52
48
|
|
|
53
49
|
/** @internal */
|
|
54
|
-
export type
|
|
50
|
+
export type DiscountRequest$Outbound = {
|
|
55
51
|
code?: string | undefined;
|
|
56
52
|
discount_type?: string | undefined;
|
|
57
53
|
amount_off?: number | null | undefined;
|
|
@@ -65,10 +61,10 @@ export type DiscountRequestDiscount$Outbound = {
|
|
|
65
61
|
};
|
|
66
62
|
|
|
67
63
|
/** @internal */
|
|
68
|
-
export const
|
|
69
|
-
|
|
64
|
+
export const DiscountRequest$outboundSchema: z.ZodType<
|
|
65
|
+
DiscountRequest$Outbound,
|
|
70
66
|
z.ZodTypeDef,
|
|
71
|
-
|
|
67
|
+
DiscountRequest
|
|
72
68
|
> = z.object({
|
|
73
69
|
code: z.string().optional(),
|
|
74
70
|
discountType: DiscountRequestDiscountType$outboundSchema.optional(),
|
|
@@ -92,28 +88,6 @@ export const DiscountRequestDiscount$outboundSchema: z.ZodType<
|
|
|
92
88
|
});
|
|
93
89
|
});
|
|
94
90
|
|
|
95
|
-
export function discountRequestDiscountToJSON(
|
|
96
|
-
discountRequestDiscount: DiscountRequestDiscount,
|
|
97
|
-
): string {
|
|
98
|
-
return JSON.stringify(
|
|
99
|
-
DiscountRequestDiscount$outboundSchema.parse(discountRequestDiscount),
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/** @internal */
|
|
104
|
-
export type DiscountRequest$Outbound = {
|
|
105
|
-
discount: DiscountRequestDiscount$Outbound;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
/** @internal */
|
|
109
|
-
export const DiscountRequest$outboundSchema: z.ZodType<
|
|
110
|
-
DiscountRequest$Outbound,
|
|
111
|
-
z.ZodTypeDef,
|
|
112
|
-
DiscountRequest
|
|
113
|
-
> = z.object({
|
|
114
|
-
discount: z.lazy(() => DiscountRequestDiscount$outboundSchema),
|
|
115
|
-
});
|
|
116
|
-
|
|
117
91
|
export function discountRequestToJSON(
|
|
118
92
|
discountRequest: DiscountRequest,
|
|
119
93
|
): string {
|
package/src/models/file.ts
CHANGED
|
@@ -8,14 +8,24 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
|
+
export type FileSourceType = {};
|
|
12
|
+
|
|
13
|
+
export type FileUploadStatus = {};
|
|
14
|
+
|
|
15
|
+
export type FileUrl = {};
|
|
16
|
+
|
|
17
|
+
export type FileCreatedAt = {};
|
|
18
|
+
|
|
19
|
+
export type FileUpdatedAt = {};
|
|
20
|
+
|
|
11
21
|
export type FileT = {
|
|
12
22
|
object: string;
|
|
13
23
|
id: string;
|
|
14
|
-
sourceType:
|
|
15
|
-
uploadStatus:
|
|
16
|
-
url:
|
|
17
|
-
createdAt:
|
|
18
|
-
updatedAt:
|
|
24
|
+
sourceType: FileSourceType;
|
|
25
|
+
uploadStatus: FileUploadStatus;
|
|
26
|
+
url: FileUrl;
|
|
27
|
+
createdAt: FileCreatedAt;
|
|
28
|
+
updatedAt: FileUpdatedAt;
|
|
19
29
|
filename: string;
|
|
20
30
|
contentType: string;
|
|
21
31
|
size: number;
|
|
@@ -23,16 +33,98 @@ export type FileT = {
|
|
|
23
33
|
fileUrl: string;
|
|
24
34
|
};
|
|
25
35
|
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const FileSourceType$inboundSchema: z.ZodType<
|
|
38
|
+
FileSourceType,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
unknown
|
|
41
|
+
> = z.object({});
|
|
42
|
+
|
|
43
|
+
export function fileSourceTypeFromJSON(
|
|
44
|
+
jsonString: string,
|
|
45
|
+
): SafeParseResult<FileSourceType, SDKValidationError> {
|
|
46
|
+
return safeParse(
|
|
47
|
+
jsonString,
|
|
48
|
+
(x) => FileSourceType$inboundSchema.parse(JSON.parse(x)),
|
|
49
|
+
`Failed to parse 'FileSourceType' from JSON`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const FileUploadStatus$inboundSchema: z.ZodType<
|
|
55
|
+
FileUploadStatus,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
unknown
|
|
58
|
+
> = z.object({});
|
|
59
|
+
|
|
60
|
+
export function fileUploadStatusFromJSON(
|
|
61
|
+
jsonString: string,
|
|
62
|
+
): SafeParseResult<FileUploadStatus, SDKValidationError> {
|
|
63
|
+
return safeParse(
|
|
64
|
+
jsonString,
|
|
65
|
+
(x) => FileUploadStatus$inboundSchema.parse(JSON.parse(x)),
|
|
66
|
+
`Failed to parse 'FileUploadStatus' from JSON`,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const FileUrl$inboundSchema: z.ZodType<FileUrl, z.ZodTypeDef, unknown> =
|
|
72
|
+
z.object({});
|
|
73
|
+
|
|
74
|
+
export function fileUrlFromJSON(
|
|
75
|
+
jsonString: string,
|
|
76
|
+
): SafeParseResult<FileUrl, SDKValidationError> {
|
|
77
|
+
return safeParse(
|
|
78
|
+
jsonString,
|
|
79
|
+
(x) => FileUrl$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
+
`Failed to parse 'FileUrl' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const FileCreatedAt$inboundSchema: z.ZodType<
|
|
86
|
+
FileCreatedAt,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
unknown
|
|
89
|
+
> = z.object({});
|
|
90
|
+
|
|
91
|
+
export function fileCreatedAtFromJSON(
|
|
92
|
+
jsonString: string,
|
|
93
|
+
): SafeParseResult<FileCreatedAt, SDKValidationError> {
|
|
94
|
+
return safeParse(
|
|
95
|
+
jsonString,
|
|
96
|
+
(x) => FileCreatedAt$inboundSchema.parse(JSON.parse(x)),
|
|
97
|
+
`Failed to parse 'FileCreatedAt' from JSON`,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const FileUpdatedAt$inboundSchema: z.ZodType<
|
|
103
|
+
FileUpdatedAt,
|
|
104
|
+
z.ZodTypeDef,
|
|
105
|
+
unknown
|
|
106
|
+
> = z.object({});
|
|
107
|
+
|
|
108
|
+
export function fileUpdatedAtFromJSON(
|
|
109
|
+
jsonString: string,
|
|
110
|
+
): SafeParseResult<FileUpdatedAt, SDKValidationError> {
|
|
111
|
+
return safeParse(
|
|
112
|
+
jsonString,
|
|
113
|
+
(x) => FileUpdatedAt$inboundSchema.parse(JSON.parse(x)),
|
|
114
|
+
`Failed to parse 'FileUpdatedAt' from JSON`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
26
118
|
/** @internal */
|
|
27
119
|
export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
|
|
28
120
|
.object({
|
|
29
121
|
object: z.string(),
|
|
30
122
|
id: z.string(),
|
|
31
|
-
source_type: z.
|
|
32
|
-
upload_status: z.
|
|
33
|
-
url: z.
|
|
34
|
-
created_at: z.
|
|
35
|
-
updated_at: z.
|
|
123
|
+
source_type: z.lazy(() => FileSourceType$inboundSchema),
|
|
124
|
+
upload_status: z.lazy(() => FileUploadStatus$inboundSchema),
|
|
125
|
+
url: z.lazy(() => FileUrl$inboundSchema),
|
|
126
|
+
created_at: z.lazy(() => FileCreatedAt$inboundSchema),
|
|
127
|
+
updated_at: z.lazy(() => FileUpdatedAt$inboundSchema),
|
|
36
128
|
filename: z.string(),
|
|
37
129
|
content_type: z.string(),
|
|
38
130
|
size: z.number().int(),
|