@polar-sh/sdk 0.40.3 → 0.41.1
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 +1 -1
- package/dist/commonjs/funcs/customerPortalOrganizationsGet.d.ts +2 -2
- package/dist/commonjs/funcs/customerPortalOrganizationsGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/customerPortalOrganizationsGet.js +2 -2
- package/dist/commonjs/funcs/customerPortalOrganizationsGet.js.map +1 -1
- package/dist/commonjs/funcs/eventsList.js +2 -0
- package/dist/commonjs/funcs/eventsList.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/benefitcustomsubscriber.d.ts +3 -3
- package/dist/commonjs/models/components/benefitcustomsubscriber.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitcustomsubscriber.js +3 -3
- package/dist/commonjs/models/components/benefitcustomsubscriber.js.map +1 -1
- package/dist/commonjs/models/components/benefitcycledevent.d.ts +10 -0
- package/dist/commonjs/models/components/benefitcycledevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitcycledevent.js +8 -0
- package/dist/commonjs/models/components/benefitcycledevent.js.map +1 -1
- package/dist/commonjs/models/components/benefitdiscordsubscriber.d.ts +3 -3
- package/dist/commonjs/models/components/benefitdiscordsubscriber.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitdiscordsubscriber.js +3 -3
- package/dist/commonjs/models/components/benefitdiscordsubscriber.js.map +1 -1
- package/dist/commonjs/models/components/benefitdownloadablessubscriber.d.ts +3 -3
- package/dist/commonjs/models/components/benefitdownloadablessubscriber.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitdownloadablessubscriber.js +3 -3
- package/dist/commonjs/models/components/benefitdownloadablessubscriber.js.map +1 -1
- package/dist/commonjs/models/components/benefitgithubrepositorysubscriber.d.ts +3 -3
- package/dist/commonjs/models/components/benefitgithubrepositorysubscriber.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgithubrepositorysubscriber.js +3 -3
- package/dist/commonjs/models/components/benefitgithubrepositorysubscriber.js.map +1 -1
- package/dist/commonjs/models/components/benefitgrantedevent.d.ts +10 -0
- package/dist/commonjs/models/components/benefitgrantedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgrantedevent.js +8 -0
- package/dist/commonjs/models/components/benefitgrantedevent.js.map +1 -1
- package/dist/commonjs/models/components/benefitlicensekeyssubscriber.d.ts +3 -3
- package/dist/commonjs/models/components/benefitlicensekeyssubscriber.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitlicensekeyssubscriber.js +3 -3
- package/dist/commonjs/models/components/benefitlicensekeyssubscriber.js.map +1 -1
- package/dist/commonjs/models/components/benefitmetercreditsubscriber.d.ts +3 -3
- package/dist/commonjs/models/components/benefitmetercreditsubscriber.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitmetercreditsubscriber.js +3 -3
- package/dist/commonjs/models/components/benefitmetercreditsubscriber.js.map +1 -1
- package/dist/commonjs/models/components/benefitrevokedevent.d.ts +10 -0
- package/dist/commonjs/models/components/benefitrevokedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitrevokedevent.js +8 -0
- package/dist/commonjs/models/components/benefitrevokedevent.js.map +1 -1
- package/dist/commonjs/models/components/benefitsubscriberorganization.d.ts +65 -0
- package/dist/commonjs/models/components/benefitsubscriberorganization.d.ts.map +1 -0
- package/dist/commonjs/models/components/benefitsubscriberorganization.js +101 -0
- package/dist/commonjs/models/components/benefitsubscriberorganization.js.map +1 -0
- package/dist/commonjs/models/components/benefitupdatedevent.d.ts +10 -0
- package/dist/commonjs/models/components/benefitupdatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitupdatedevent.js +8 -0
- package/dist/commonjs/models/components/benefitupdatedevent.js.map +1 -1
- package/dist/commonjs/models/components/checkoutorganization.d.ts +65 -0
- package/dist/commonjs/models/components/checkoutorganization.d.ts.map +1 -0
- package/dist/commonjs/models/components/checkoutorganization.js +101 -0
- package/dist/commonjs/models/components/checkoutorganization.js.map +1 -0
- package/dist/commonjs/models/components/checkoutpublic.d.ts +3 -3
- package/dist/commonjs/models/components/checkoutpublic.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutpublic.js +3 -3
- package/dist/commonjs/models/components/checkoutpublic.js.map +1 -1
- package/dist/commonjs/models/components/checkoutpublicconfirmed.d.ts +3 -3
- package/dist/commonjs/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutpublicconfirmed.js +3 -3
- package/dist/commonjs/models/components/checkoutpublicconfirmed.js.map +1 -1
- package/dist/commonjs/models/components/customercreate.d.ts +0 -3
- package/dist/commonjs/models/components/customercreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customercreate.js.map +1 -1
- package/dist/commonjs/models/components/customercreatedevent.d.ts +10 -0
- package/dist/commonjs/models/components/customercreatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/customercreatedevent.js +8 -0
- package/dist/commonjs/models/components/customercreatedevent.js.map +1 -1
- package/dist/commonjs/models/components/customerdeletedevent.d.ts +10 -0
- package/dist/commonjs/models/components/customerdeletedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerdeletedevent.js +8 -0
- package/dist/commonjs/models/components/customerdeletedevent.js.map +1 -1
- package/dist/commonjs/models/components/customerorderproduct.d.ts +3 -3
- package/dist/commonjs/models/components/customerorderproduct.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerorderproduct.js +3 -3
- package/dist/commonjs/models/components/customerorderproduct.js.map +1 -1
- package/dist/commonjs/models/components/customerorganization.d.ts +38 -9
- package/dist/commonjs/models/components/customerorganization.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerorganization.js +34 -6
- package/dist/commonjs/models/components/customerorganization.js.map +1 -1
- package/dist/commonjs/models/components/customerorganizationdata.d.ts +36 -0
- package/dist/commonjs/models/components/customerorganizationdata.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerorganizationdata.js +73 -0
- package/dist/commonjs/models/components/customerorganizationdata.js.map +1 -0
- package/dist/commonjs/models/components/customersubscriptionproduct.d.ts +3 -3
- package/dist/commonjs/models/components/customersubscriptionproduct.d.ts.map +1 -1
- package/dist/commonjs/models/components/customersubscriptionproduct.js +3 -3
- package/dist/commonjs/models/components/customersubscriptionproduct.js.map +1 -1
- package/dist/commonjs/models/components/customerupdate.d.ts +0 -3
- package/dist/commonjs/models/components/customerupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerupdate.js.map +1 -1
- package/dist/commonjs/models/components/customerupdatedevent.d.ts +10 -0
- package/dist/commonjs/models/components/customerupdatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerupdatedevent.js +8 -0
- package/dist/commonjs/models/components/customerupdatedevent.js.map +1 -1
- package/dist/commonjs/models/components/customerupdateexternalid.d.ts +0 -3
- package/dist/commonjs/models/components/customerupdateexternalid.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerupdateexternalid.js.map +1 -1
- package/dist/commonjs/models/components/eventcreatecustomer.d.ts +10 -0
- package/dist/commonjs/models/components/eventcreatecustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/eventcreatecustomer.js +8 -0
- package/dist/commonjs/models/components/eventcreatecustomer.js.map +1 -1
- package/dist/commonjs/models/components/eventcreateexternalcustomer.d.ts +10 -0
- package/dist/commonjs/models/components/eventcreateexternalcustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/eventcreateexternalcustomer.js +8 -0
- package/dist/commonjs/models/components/eventcreateexternalcustomer.js.map +1 -1
- package/dist/commonjs/models/components/eventsingestresponse.d.ts +5 -0
- package/dist/commonjs/models/components/eventsingestresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/eventsingestresponse.js +2 -0
- package/dist/commonjs/models/components/eventsingestresponse.js.map +1 -1
- package/dist/commonjs/models/components/metercreditevent.d.ts +10 -0
- package/dist/commonjs/models/components/metercreditevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/metercreditevent.js +8 -0
- package/dist/commonjs/models/components/metercreditevent.js.map +1 -1
- package/dist/commonjs/models/components/meterresetevent.d.ts +10 -0
- package/dist/commonjs/models/components/meterresetevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/meterresetevent.js +8 -0
- package/dist/commonjs/models/components/meterresetevent.js.map +1 -1
- package/dist/commonjs/models/components/orderpaidevent.d.ts +10 -0
- package/dist/commonjs/models/components/orderpaidevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/orderpaidevent.js +8 -0
- package/dist/commonjs/models/components/orderpaidevent.js.map +1 -1
- package/dist/commonjs/models/components/orderrefundedevent.d.ts +10 -0
- package/dist/commonjs/models/components/orderrefundedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/orderrefundedevent.js +8 -0
- package/dist/commonjs/models/components/orderrefundedevent.js.map +1 -1
- package/dist/commonjs/models/components/organization.d.ts +9 -1
- package/dist/commonjs/models/components/organization.d.ts.map +1 -1
- package/dist/commonjs/models/components/organization.js +9 -0
- package/dist/commonjs/models/components/organization.js.map +1 -1
- package/dist/commonjs/models/components/organizationstatus.d.ts +6 -3
- package/dist/commonjs/models/components/organizationstatus.d.ts.map +1 -1
- package/dist/commonjs/models/components/organizationstatus.js +2 -1
- package/dist/commonjs/models/components/organizationstatus.js.map +1 -1
- package/dist/commonjs/models/components/subscriptioncycledevent.d.ts +10 -0
- package/dist/commonjs/models/components/subscriptioncycledevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscriptioncycledevent.js +8 -0
- package/dist/commonjs/models/components/subscriptioncycledevent.js.map +1 -1
- package/dist/commonjs/models/components/subscriptionproductupdatedevent.d.ts +10 -0
- package/dist/commonjs/models/components/subscriptionproductupdatedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscriptionproductupdatedevent.js +8 -0
- package/dist/commonjs/models/components/subscriptionproductupdatedevent.js.map +1 -1
- package/dist/commonjs/models/components/subscriptionrevokedevent.d.ts +10 -0
- package/dist/commonjs/models/components/subscriptionrevokedevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscriptionrevokedevent.js +8 -0
- package/dist/commonjs/models/components/subscriptionrevokedevent.js.map +1 -1
- package/dist/commonjs/models/components/userevent.d.ts +10 -0
- package/dist/commonjs/models/components/userevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/userevent.js +8 -0
- package/dist/commonjs/models/components/userevent.js.map +1 -1
- package/dist/commonjs/models/operations/eventslist.d.ts +10 -0
- package/dist/commonjs/models/operations/eventslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/eventslist.js +6 -0
- package/dist/commonjs/models/operations/eventslist.js.map +1 -1
- package/dist/commonjs/sdk/polarorganizations.d.ts +2 -2
- package/dist/commonjs/sdk/polarorganizations.d.ts.map +1 -1
- package/dist/esm/funcs/customerPortalOrganizationsGet.d.ts +2 -2
- package/dist/esm/funcs/customerPortalOrganizationsGet.d.ts.map +1 -1
- package/dist/esm/funcs/customerPortalOrganizationsGet.js +2 -2
- package/dist/esm/funcs/customerPortalOrganizationsGet.js.map +1 -1
- package/dist/esm/funcs/eventsList.js +2 -0
- package/dist/esm/funcs/eventsList.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/benefitcustomsubscriber.d.ts +3 -3
- package/dist/esm/models/components/benefitcustomsubscriber.d.ts.map +1 -1
- package/dist/esm/models/components/benefitcustomsubscriber.js +3 -3
- package/dist/esm/models/components/benefitcustomsubscriber.js.map +1 -1
- package/dist/esm/models/components/benefitcycledevent.d.ts +10 -0
- package/dist/esm/models/components/benefitcycledevent.d.ts.map +1 -1
- package/dist/esm/models/components/benefitcycledevent.js +8 -0
- package/dist/esm/models/components/benefitcycledevent.js.map +1 -1
- package/dist/esm/models/components/benefitdiscordsubscriber.d.ts +3 -3
- package/dist/esm/models/components/benefitdiscordsubscriber.d.ts.map +1 -1
- package/dist/esm/models/components/benefitdiscordsubscriber.js +3 -3
- package/dist/esm/models/components/benefitdiscordsubscriber.js.map +1 -1
- package/dist/esm/models/components/benefitdownloadablessubscriber.d.ts +3 -3
- package/dist/esm/models/components/benefitdownloadablessubscriber.d.ts.map +1 -1
- package/dist/esm/models/components/benefitdownloadablessubscriber.js +3 -3
- package/dist/esm/models/components/benefitdownloadablessubscriber.js.map +1 -1
- package/dist/esm/models/components/benefitgithubrepositorysubscriber.d.ts +3 -3
- package/dist/esm/models/components/benefitgithubrepositorysubscriber.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgithubrepositorysubscriber.js +3 -3
- package/dist/esm/models/components/benefitgithubrepositorysubscriber.js.map +1 -1
- package/dist/esm/models/components/benefitgrantedevent.d.ts +10 -0
- package/dist/esm/models/components/benefitgrantedevent.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgrantedevent.js +8 -0
- package/dist/esm/models/components/benefitgrantedevent.js.map +1 -1
- package/dist/esm/models/components/benefitlicensekeyssubscriber.d.ts +3 -3
- package/dist/esm/models/components/benefitlicensekeyssubscriber.d.ts.map +1 -1
- package/dist/esm/models/components/benefitlicensekeyssubscriber.js +3 -3
- package/dist/esm/models/components/benefitlicensekeyssubscriber.js.map +1 -1
- package/dist/esm/models/components/benefitmetercreditsubscriber.d.ts +3 -3
- package/dist/esm/models/components/benefitmetercreditsubscriber.d.ts.map +1 -1
- package/dist/esm/models/components/benefitmetercreditsubscriber.js +3 -3
- package/dist/esm/models/components/benefitmetercreditsubscriber.js.map +1 -1
- package/dist/esm/models/components/benefitrevokedevent.d.ts +10 -0
- package/dist/esm/models/components/benefitrevokedevent.d.ts.map +1 -1
- package/dist/esm/models/components/benefitrevokedevent.js +8 -0
- package/dist/esm/models/components/benefitrevokedevent.js.map +1 -1
- package/dist/esm/models/components/benefitsubscriberorganization.d.ts +65 -0
- package/dist/esm/models/components/benefitsubscriberorganization.d.ts.map +1 -0
- package/dist/esm/models/components/benefitsubscriberorganization.js +63 -0
- package/dist/esm/models/components/benefitsubscriberorganization.js.map +1 -0
- package/dist/esm/models/components/benefitupdatedevent.d.ts +10 -0
- package/dist/esm/models/components/benefitupdatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/benefitupdatedevent.js +8 -0
- package/dist/esm/models/components/benefitupdatedevent.js.map +1 -1
- package/dist/esm/models/components/checkoutorganization.d.ts +65 -0
- package/dist/esm/models/components/checkoutorganization.d.ts.map +1 -0
- package/dist/esm/models/components/checkoutorganization.js +63 -0
- package/dist/esm/models/components/checkoutorganization.js.map +1 -0
- package/dist/esm/models/components/checkoutpublic.d.ts +3 -3
- package/dist/esm/models/components/checkoutpublic.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutpublic.js +3 -3
- package/dist/esm/models/components/checkoutpublic.js.map +1 -1
- package/dist/esm/models/components/checkoutpublicconfirmed.d.ts +3 -3
- package/dist/esm/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutpublicconfirmed.js +3 -3
- package/dist/esm/models/components/checkoutpublicconfirmed.js.map +1 -1
- package/dist/esm/models/components/customercreate.d.ts +0 -3
- package/dist/esm/models/components/customercreate.d.ts.map +1 -1
- package/dist/esm/models/components/customercreate.js.map +1 -1
- package/dist/esm/models/components/customercreatedevent.d.ts +10 -0
- package/dist/esm/models/components/customercreatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/customercreatedevent.js +8 -0
- package/dist/esm/models/components/customercreatedevent.js.map +1 -1
- package/dist/esm/models/components/customerdeletedevent.d.ts +10 -0
- package/dist/esm/models/components/customerdeletedevent.d.ts.map +1 -1
- package/dist/esm/models/components/customerdeletedevent.js +8 -0
- package/dist/esm/models/components/customerdeletedevent.js.map +1 -1
- package/dist/esm/models/components/customerorderproduct.d.ts +3 -3
- package/dist/esm/models/components/customerorderproduct.d.ts.map +1 -1
- package/dist/esm/models/components/customerorderproduct.js +3 -3
- package/dist/esm/models/components/customerorderproduct.js.map +1 -1
- package/dist/esm/models/components/customerorganization.d.ts +38 -9
- package/dist/esm/models/components/customerorganization.d.ts.map +1 -1
- package/dist/esm/models/components/customerorganization.js +34 -6
- package/dist/esm/models/components/customerorganization.js.map +1 -1
- package/dist/esm/models/components/customerorganizationdata.d.ts +36 -0
- package/dist/esm/models/components/customerorganizationdata.d.ts.map +1 -0
- package/dist/esm/models/components/customerorganizationdata.js +35 -0
- package/dist/esm/models/components/customerorganizationdata.js.map +1 -0
- package/dist/esm/models/components/customersubscriptionproduct.d.ts +3 -3
- package/dist/esm/models/components/customersubscriptionproduct.d.ts.map +1 -1
- package/dist/esm/models/components/customersubscriptionproduct.js +3 -3
- package/dist/esm/models/components/customersubscriptionproduct.js.map +1 -1
- package/dist/esm/models/components/customerupdate.d.ts +0 -3
- package/dist/esm/models/components/customerupdate.d.ts.map +1 -1
- package/dist/esm/models/components/customerupdate.js.map +1 -1
- package/dist/esm/models/components/customerupdatedevent.d.ts +10 -0
- package/dist/esm/models/components/customerupdatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/customerupdatedevent.js +8 -0
- package/dist/esm/models/components/customerupdatedevent.js.map +1 -1
- package/dist/esm/models/components/customerupdateexternalid.d.ts +0 -3
- package/dist/esm/models/components/customerupdateexternalid.d.ts.map +1 -1
- package/dist/esm/models/components/customerupdateexternalid.js.map +1 -1
- package/dist/esm/models/components/eventcreatecustomer.d.ts +10 -0
- package/dist/esm/models/components/eventcreatecustomer.d.ts.map +1 -1
- package/dist/esm/models/components/eventcreatecustomer.js +8 -0
- package/dist/esm/models/components/eventcreatecustomer.js.map +1 -1
- package/dist/esm/models/components/eventcreateexternalcustomer.d.ts +10 -0
- package/dist/esm/models/components/eventcreateexternalcustomer.d.ts.map +1 -1
- package/dist/esm/models/components/eventcreateexternalcustomer.js +8 -0
- package/dist/esm/models/components/eventcreateexternalcustomer.js.map +1 -1
- package/dist/esm/models/components/eventsingestresponse.d.ts +5 -0
- package/dist/esm/models/components/eventsingestresponse.d.ts.map +1 -1
- package/dist/esm/models/components/eventsingestresponse.js +2 -0
- package/dist/esm/models/components/eventsingestresponse.js.map +1 -1
- package/dist/esm/models/components/metercreditevent.d.ts +10 -0
- package/dist/esm/models/components/metercreditevent.d.ts.map +1 -1
- package/dist/esm/models/components/metercreditevent.js +8 -0
- package/dist/esm/models/components/metercreditevent.js.map +1 -1
- package/dist/esm/models/components/meterresetevent.d.ts +10 -0
- package/dist/esm/models/components/meterresetevent.d.ts.map +1 -1
- package/dist/esm/models/components/meterresetevent.js +8 -0
- package/dist/esm/models/components/meterresetevent.js.map +1 -1
- package/dist/esm/models/components/orderpaidevent.d.ts +10 -0
- package/dist/esm/models/components/orderpaidevent.d.ts.map +1 -1
- package/dist/esm/models/components/orderpaidevent.js +8 -0
- package/dist/esm/models/components/orderpaidevent.js.map +1 -1
- package/dist/esm/models/components/orderrefundedevent.d.ts +10 -0
- package/dist/esm/models/components/orderrefundedevent.d.ts.map +1 -1
- package/dist/esm/models/components/orderrefundedevent.js +8 -0
- package/dist/esm/models/components/orderrefundedevent.js.map +1 -1
- package/dist/esm/models/components/organization.d.ts +9 -1
- package/dist/esm/models/components/organization.d.ts.map +1 -1
- package/dist/esm/models/components/organization.js +9 -0
- package/dist/esm/models/components/organization.js.map +1 -1
- package/dist/esm/models/components/organizationstatus.d.ts +6 -3
- package/dist/esm/models/components/organizationstatus.d.ts.map +1 -1
- package/dist/esm/models/components/organizationstatus.js +2 -1
- package/dist/esm/models/components/organizationstatus.js.map +1 -1
- package/dist/esm/models/components/subscriptioncycledevent.d.ts +10 -0
- package/dist/esm/models/components/subscriptioncycledevent.d.ts.map +1 -1
- package/dist/esm/models/components/subscriptioncycledevent.js +8 -0
- package/dist/esm/models/components/subscriptioncycledevent.js.map +1 -1
- package/dist/esm/models/components/subscriptionproductupdatedevent.d.ts +10 -0
- package/dist/esm/models/components/subscriptionproductupdatedevent.d.ts.map +1 -1
- package/dist/esm/models/components/subscriptionproductupdatedevent.js +8 -0
- package/dist/esm/models/components/subscriptionproductupdatedevent.js.map +1 -1
- package/dist/esm/models/components/subscriptionrevokedevent.d.ts +10 -0
- package/dist/esm/models/components/subscriptionrevokedevent.d.ts.map +1 -1
- package/dist/esm/models/components/subscriptionrevokedevent.js +8 -0
- package/dist/esm/models/components/subscriptionrevokedevent.js.map +1 -1
- package/dist/esm/models/components/userevent.d.ts +10 -0
- package/dist/esm/models/components/userevent.d.ts.map +1 -1
- package/dist/esm/models/components/userevent.js +8 -0
- package/dist/esm/models/components/userevent.js.map +1 -1
- package/dist/esm/models/operations/eventslist.d.ts +10 -0
- package/dist/esm/models/operations/eventslist.d.ts.map +1 -1
- package/dist/esm/models/operations/eventslist.js +6 -0
- package/dist/esm/models/operations/eventslist.js.map +1 -1
- package/dist/esm/sdk/polarorganizations.d.ts +2 -2
- package/dist/esm/sdk/polarorganizations.d.ts.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/customerPortalOrganizationsGet.ts +7 -7
- package/src/funcs/eventsList.ts +2 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/benefitcustomsubscriber.ts +9 -9
- package/src/models/components/benefitcycledevent.ts +18 -0
- package/src/models/components/benefitdiscordsubscriber.ts +9 -9
- package/src/models/components/benefitdownloadablessubscriber.ts +9 -9
- package/src/models/components/benefitgithubrepositorysubscriber.ts +9 -9
- package/src/models/components/benefitgrantedevent.ts +18 -0
- package/src/models/components/benefitlicensekeyssubscriber.ts +9 -9
- package/src/models/components/benefitmetercreditsubscriber.ts +9 -9
- package/src/models/components/benefitrevokedevent.ts +18 -0
- package/src/models/components/benefitsubscriberorganization.ts +141 -0
- package/src/models/components/benefitupdatedevent.ts +18 -0
- package/src/models/components/checkoutorganization.ts +139 -0
- package/src/models/components/checkoutpublic.ts +10 -10
- package/src/models/components/checkoutpublicconfirmed.ts +10 -10
- package/src/models/components/customercreate.ts +0 -3
- package/src/models/components/customercreatedevent.ts +18 -0
- package/src/models/components/customerdeletedevent.ts +18 -0
- package/src/models/components/customerorderproduct.ts +10 -10
- package/src/models/components/customerorganization.ts +76 -22
- package/src/models/components/customerorganizationdata.ts +85 -0
- package/src/models/components/customersubscriptionproduct.ts +10 -10
- package/src/models/components/customerupdate.ts +0 -3
- package/src/models/components/customerupdatedevent.ts +18 -0
- package/src/models/components/customerupdateexternalid.ts +0 -3
- package/src/models/components/eventcreatecustomer.ts +18 -0
- package/src/models/components/eventcreateexternalcustomer.ts +18 -0
- package/src/models/components/eventsingestresponse.ts +7 -0
- package/src/models/components/metercreditevent.ts +18 -0
- package/src/models/components/meterresetevent.ts +18 -0
- package/src/models/components/orderpaidevent.ts +18 -0
- package/src/models/components/orderrefundedevent.ts +18 -0
- package/src/models/components/organization.ts +21 -1
- package/src/models/components/organizationstatus.ts +2 -1
- package/src/models/components/subscriptioncycledevent.ts +18 -0
- package/src/models/components/subscriptionproductupdatedevent.ts +18 -0
- package/src/models/components/subscriptionrevokedevent.ts +18 -0
- package/src/models/components/userevent.ts +18 -0
- package/src/models/operations/eventslist.ts +16 -0
- package/src/sdk/polarorganizations.ts +2 -2
- package/.devcontainer/README.md +0 -35
- package/docs/sdks/benefitgrants/README.md +0 -88
- package/docs/sdks/benefits/README.md +0 -500
- package/docs/sdks/checkoutlinks/README.md +0 -407
- package/docs/sdks/checkouts/README.md +0 -600
- package/docs/sdks/clients/README.md +0 -331
- package/docs/sdks/customermeters/README.md +0 -166
- package/docs/sdks/customers/README.md +0 -1036
- package/docs/sdks/customerseats/README.md +0 -441
- package/docs/sdks/customersession/README.md +0 -79
- package/docs/sdks/customersessions/README.md +0 -84
- package/docs/sdks/customfields/README.md +0 -417
- package/docs/sdks/discounts/README.md +0 -409
- package/docs/sdks/downloadables/README.md +0 -83
- package/docs/sdks/events/README.md +0 -324
- package/docs/sdks/files/README.md +0 -460
- package/docs/sdks/licensekeys/README.md +0 -576
- package/docs/sdks/meters/README.md +0 -437
- package/docs/sdks/metrics/README.md +0 -165
- package/docs/sdks/oauth2/README.md +0 -371
- package/docs/sdks/orders/README.md +0 -489
- package/docs/sdks/organizations/README.md +0 -322
- package/docs/sdks/payments/README.md +0 -166
- package/docs/sdks/polarbenefitgrants/README.md +0 -250
- package/docs/sdks/polarcustomermeters/README.md +0 -164
- package/docs/sdks/polarcustomers/README.md +0 -482
- package/docs/sdks/polarlicensekeys/README.md +0 -406
- package/docs/sdks/polarorders/README.md +0 -574
- package/docs/sdks/polarorganizations/README.md +0 -79
- package/docs/sdks/polarsubscriptions/README.md +0 -326
- package/docs/sdks/polarwallets/README.md +0 -164
- package/docs/sdks/products/README.md +0 -441
- package/docs/sdks/refunds/README.md +0 -171
- package/docs/sdks/seats/README.md +0 -379
- package/docs/sdks/subscriptions/README.md +0 -493
- package/docs/sdks/wallets/README.md +0 -256
- package/docs/sdks/webhooks/README.md +0 -650
- package/examples/README.md +0 -31
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
SubscriptionProrationBehavior,
|
|
12
|
+
SubscriptionProrationBehavior$inboundSchema,
|
|
13
|
+
SubscriptionProrationBehavior$outboundSchema,
|
|
14
|
+
} from "./subscriptionprorationbehavior.js";
|
|
15
|
+
|
|
16
|
+
export type CheckoutOrganization = {
|
|
17
|
+
/**
|
|
18
|
+
* Creation timestamp of the object.
|
|
19
|
+
*/
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
/**
|
|
22
|
+
* Last modification timestamp of the object.
|
|
23
|
+
*/
|
|
24
|
+
modifiedAt: Date | null;
|
|
25
|
+
/**
|
|
26
|
+
* The ID of the object.
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* Organization name shown in checkout, customer portal, emails etc.
|
|
31
|
+
*/
|
|
32
|
+
name: string;
|
|
33
|
+
/**
|
|
34
|
+
* Unique organization slug in checkout, customer portal and credit card statements.
|
|
35
|
+
*/
|
|
36
|
+
slug: string;
|
|
37
|
+
/**
|
|
38
|
+
* Avatar URL shown in checkout, customer portal, emails etc.
|
|
39
|
+
*/
|
|
40
|
+
avatarUrl: string | null;
|
|
41
|
+
prorationBehavior: SubscriptionProrationBehavior;
|
|
42
|
+
/**
|
|
43
|
+
* Whether customers can update their subscriptions from the customer portal.
|
|
44
|
+
*/
|
|
45
|
+
allowCustomerUpdates: boolean;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const CheckoutOrganization$inboundSchema: z.ZodType<
|
|
50
|
+
CheckoutOrganization,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
unknown
|
|
53
|
+
> = z.object({
|
|
54
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
55
|
+
modified_at: z.nullable(
|
|
56
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
57
|
+
),
|
|
58
|
+
id: z.string(),
|
|
59
|
+
name: z.string(),
|
|
60
|
+
slug: z.string(),
|
|
61
|
+
avatar_url: z.nullable(z.string()),
|
|
62
|
+
proration_behavior: SubscriptionProrationBehavior$inboundSchema,
|
|
63
|
+
allow_customer_updates: z.boolean(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
"created_at": "createdAt",
|
|
67
|
+
"modified_at": "modifiedAt",
|
|
68
|
+
"avatar_url": "avatarUrl",
|
|
69
|
+
"proration_behavior": "prorationBehavior",
|
|
70
|
+
"allow_customer_updates": "allowCustomerUpdates",
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export type CheckoutOrganization$Outbound = {
|
|
76
|
+
created_at: string;
|
|
77
|
+
modified_at: string | null;
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
slug: string;
|
|
81
|
+
avatar_url: string | null;
|
|
82
|
+
proration_behavior: string;
|
|
83
|
+
allow_customer_updates: boolean;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const CheckoutOrganization$outboundSchema: z.ZodType<
|
|
88
|
+
CheckoutOrganization$Outbound,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
CheckoutOrganization
|
|
91
|
+
> = z.object({
|
|
92
|
+
createdAt: z.date().transform(v => v.toISOString()),
|
|
93
|
+
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
94
|
+
id: z.string(),
|
|
95
|
+
name: z.string(),
|
|
96
|
+
slug: z.string(),
|
|
97
|
+
avatarUrl: z.nullable(z.string()),
|
|
98
|
+
prorationBehavior: SubscriptionProrationBehavior$outboundSchema,
|
|
99
|
+
allowCustomerUpdates: z.boolean(),
|
|
100
|
+
}).transform((v) => {
|
|
101
|
+
return remap$(v, {
|
|
102
|
+
createdAt: "created_at",
|
|
103
|
+
modifiedAt: "modified_at",
|
|
104
|
+
avatarUrl: "avatar_url",
|
|
105
|
+
prorationBehavior: "proration_behavior",
|
|
106
|
+
allowCustomerUpdates: "allow_customer_updates",
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
113
|
+
*/
|
|
114
|
+
export namespace CheckoutOrganization$ {
|
|
115
|
+
/** @deprecated use `CheckoutOrganization$inboundSchema` instead. */
|
|
116
|
+
export const inboundSchema = CheckoutOrganization$inboundSchema;
|
|
117
|
+
/** @deprecated use `CheckoutOrganization$outboundSchema` instead. */
|
|
118
|
+
export const outboundSchema = CheckoutOrganization$outboundSchema;
|
|
119
|
+
/** @deprecated use `CheckoutOrganization$Outbound` instead. */
|
|
120
|
+
export type Outbound = CheckoutOrganization$Outbound;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function checkoutOrganizationToJSON(
|
|
124
|
+
checkoutOrganization: CheckoutOrganization,
|
|
125
|
+
): string {
|
|
126
|
+
return JSON.stringify(
|
|
127
|
+
CheckoutOrganization$outboundSchema.parse(checkoutOrganization),
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function checkoutOrganizationFromJSON(
|
|
132
|
+
jsonString: string,
|
|
133
|
+
): SafeParseResult<CheckoutOrganization, SDKValidationError> {
|
|
134
|
+
return safeParse(
|
|
135
|
+
jsonString,
|
|
136
|
+
(x) => CheckoutOrganization$inboundSchema.parse(JSON.parse(x)),
|
|
137
|
+
`Failed to parse 'CheckoutOrganization' from JSON`,
|
|
138
|
+
);
|
|
139
|
+
}
|
|
@@ -49,6 +49,12 @@ import {
|
|
|
49
49
|
CheckoutDiscountPercentageRepeatDuration$Outbound,
|
|
50
50
|
CheckoutDiscountPercentageRepeatDuration$outboundSchema,
|
|
51
51
|
} from "./checkoutdiscountpercentagerepeatduration.js";
|
|
52
|
+
import {
|
|
53
|
+
CheckoutOrganization,
|
|
54
|
+
CheckoutOrganization$inboundSchema,
|
|
55
|
+
CheckoutOrganization$Outbound,
|
|
56
|
+
CheckoutOrganization$outboundSchema,
|
|
57
|
+
} from "./checkoutorganization.js";
|
|
52
58
|
import {
|
|
53
59
|
CheckoutProduct,
|
|
54
60
|
CheckoutProduct$inboundSchema,
|
|
@@ -66,12 +72,6 @@ import {
|
|
|
66
72
|
LegacyRecurringProductPrice$Outbound,
|
|
67
73
|
LegacyRecurringProductPrice$outboundSchema,
|
|
68
74
|
} from "./legacyrecurringproductprice.js";
|
|
69
|
-
import {
|
|
70
|
-
Organization,
|
|
71
|
-
Organization$inboundSchema,
|
|
72
|
-
Organization$Outbound,
|
|
73
|
-
Organization$outboundSchema,
|
|
74
|
-
} from "./organization.js";
|
|
75
75
|
import {
|
|
76
76
|
PaymentProcessor,
|
|
77
77
|
PaymentProcessor$inboundSchema,
|
|
@@ -274,7 +274,7 @@ export type CheckoutPublic = {
|
|
|
274
274
|
| CheckoutDiscountPercentageRepeatDuration
|
|
275
275
|
| CheckoutDiscountPercentageOnceForeverDuration
|
|
276
276
|
| null;
|
|
277
|
-
organization:
|
|
277
|
+
organization: CheckoutOrganization;
|
|
278
278
|
attachedCustomFields: Array<AttachedCustomField> | null;
|
|
279
279
|
};
|
|
280
280
|
|
|
@@ -539,7 +539,7 @@ export const CheckoutPublic$inboundSchema: z.ZodType<
|
|
|
539
539
|
CheckoutDiscountPercentageOnceForeverDuration$inboundSchema,
|
|
540
540
|
]),
|
|
541
541
|
),
|
|
542
|
-
organization:
|
|
542
|
+
organization: CheckoutOrganization$inboundSchema,
|
|
543
543
|
attached_custom_fields: z.nullable(
|
|
544
544
|
z.array(AttachedCustomField$inboundSchema),
|
|
545
545
|
),
|
|
@@ -648,7 +648,7 @@ export type CheckoutPublic$Outbound = {
|
|
|
648
648
|
| CheckoutDiscountPercentageRepeatDuration$Outbound
|
|
649
649
|
| CheckoutDiscountPercentageOnceForeverDuration$Outbound
|
|
650
650
|
| null;
|
|
651
|
-
organization:
|
|
651
|
+
organization: CheckoutOrganization$Outbound;
|
|
652
652
|
attached_custom_fields: Array<AttachedCustomField$Outbound> | null;
|
|
653
653
|
};
|
|
654
654
|
|
|
@@ -727,7 +727,7 @@ export const CheckoutPublic$outboundSchema: z.ZodType<
|
|
|
727
727
|
CheckoutDiscountPercentageOnceForeverDuration$outboundSchema,
|
|
728
728
|
]),
|
|
729
729
|
),
|
|
730
|
-
organization:
|
|
730
|
+
organization: CheckoutOrganization$outboundSchema,
|
|
731
731
|
attachedCustomFields: z.nullable(z.array(AttachedCustomField$outboundSchema)),
|
|
732
732
|
}).transform((v) => {
|
|
733
733
|
return remap$(v, {
|
|
@@ -49,6 +49,12 @@ import {
|
|
|
49
49
|
CheckoutDiscountPercentageRepeatDuration$Outbound,
|
|
50
50
|
CheckoutDiscountPercentageRepeatDuration$outboundSchema,
|
|
51
51
|
} from "./checkoutdiscountpercentagerepeatduration.js";
|
|
52
|
+
import {
|
|
53
|
+
CheckoutOrganization,
|
|
54
|
+
CheckoutOrganization$inboundSchema,
|
|
55
|
+
CheckoutOrganization$Outbound,
|
|
56
|
+
CheckoutOrganization$outboundSchema,
|
|
57
|
+
} from "./checkoutorganization.js";
|
|
52
58
|
import {
|
|
53
59
|
CheckoutProduct,
|
|
54
60
|
CheckoutProduct$inboundSchema,
|
|
@@ -61,12 +67,6 @@ import {
|
|
|
61
67
|
LegacyRecurringProductPrice$Outbound,
|
|
62
68
|
LegacyRecurringProductPrice$outboundSchema,
|
|
63
69
|
} from "./legacyrecurringproductprice.js";
|
|
64
|
-
import {
|
|
65
|
-
Organization,
|
|
66
|
-
Organization$inboundSchema,
|
|
67
|
-
Organization$Outbound,
|
|
68
|
-
Organization$outboundSchema,
|
|
69
|
-
} from "./organization.js";
|
|
70
70
|
import {
|
|
71
71
|
PaymentProcessor,
|
|
72
72
|
PaymentProcessor$inboundSchema,
|
|
@@ -278,7 +278,7 @@ export type CheckoutPublicConfirmed = {
|
|
|
278
278
|
| CheckoutDiscountPercentageRepeatDuration
|
|
279
279
|
| CheckoutDiscountPercentageOnceForeverDuration
|
|
280
280
|
| null;
|
|
281
|
-
organization:
|
|
281
|
+
organization: CheckoutOrganization;
|
|
282
282
|
attachedCustomFields: Array<AttachedCustomField> | null;
|
|
283
283
|
customerSessionToken: string;
|
|
284
284
|
};
|
|
@@ -555,7 +555,7 @@ export const CheckoutPublicConfirmed$inboundSchema: z.ZodType<
|
|
|
555
555
|
CheckoutDiscountPercentageOnceForeverDuration$inboundSchema,
|
|
556
556
|
]),
|
|
557
557
|
),
|
|
558
|
-
organization:
|
|
558
|
+
organization: CheckoutOrganization$inboundSchema,
|
|
559
559
|
attached_custom_fields: z.nullable(
|
|
560
560
|
z.array(AttachedCustomField$inboundSchema),
|
|
561
561
|
),
|
|
@@ -666,7 +666,7 @@ export type CheckoutPublicConfirmed$Outbound = {
|
|
|
666
666
|
| CheckoutDiscountPercentageRepeatDuration$Outbound
|
|
667
667
|
| CheckoutDiscountPercentageOnceForeverDuration$Outbound
|
|
668
668
|
| null;
|
|
669
|
-
organization:
|
|
669
|
+
organization: CheckoutOrganization$Outbound;
|
|
670
670
|
attached_custom_fields: Array<AttachedCustomField$Outbound> | null;
|
|
671
671
|
customer_session_token: string;
|
|
672
672
|
};
|
|
@@ -746,7 +746,7 @@ export const CheckoutPublicConfirmed$outboundSchema: z.ZodType<
|
|
|
746
746
|
CheckoutDiscountPercentageOnceForeverDuration$outboundSchema,
|
|
747
747
|
]),
|
|
748
748
|
),
|
|
749
|
-
organization:
|
|
749
|
+
organization: CheckoutOrganization$outboundSchema,
|
|
750
750
|
attachedCustomFields: z.nullable(z.array(AttachedCustomField$outboundSchema)),
|
|
751
751
|
customerSessionToken: z.string(),
|
|
752
752
|
}).transform((v) => {
|
|
@@ -48,9 +48,6 @@ export type CustomerCreate = {
|
|
|
48
48
|
* The email address of the customer. This must be unique within the organization.
|
|
49
49
|
*/
|
|
50
50
|
email: string;
|
|
51
|
-
/**
|
|
52
|
-
* The name of the customer.
|
|
53
|
-
*/
|
|
54
51
|
name?: string | null | undefined;
|
|
55
52
|
billingAddress?: AddressInput | null | undefined;
|
|
56
53
|
taxId?: Array<string | TaxIDFormat | null> | null | undefined;
|
|
@@ -48,6 +48,14 @@ export type CustomerCreatedEvent = {
|
|
|
48
48
|
* ID of the customer in your system associated with the event.
|
|
49
49
|
*/
|
|
50
50
|
externalCustomerId: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Number of direct child events linked to this event.
|
|
53
|
+
*/
|
|
54
|
+
childCount?: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The ID of the parent event.
|
|
57
|
+
*/
|
|
58
|
+
parentId?: string | null | undefined;
|
|
51
59
|
/**
|
|
52
60
|
* The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
|
|
53
61
|
*/
|
|
@@ -71,6 +79,8 @@ export const CustomerCreatedEvent$inboundSchema: z.ZodType<
|
|
|
71
79
|
customer_id: z.nullable(z.string()),
|
|
72
80
|
customer: z.nullable(Customer$inboundSchema),
|
|
73
81
|
external_customer_id: z.nullable(z.string()),
|
|
82
|
+
child_count: z.number().int().default(0),
|
|
83
|
+
parent_id: z.nullable(z.string()).optional(),
|
|
74
84
|
source: z.literal("system"),
|
|
75
85
|
name: z.literal("customer.created"),
|
|
76
86
|
metadata: CustomerCreatedMetadata$inboundSchema,
|
|
@@ -79,6 +89,8 @@ export const CustomerCreatedEvent$inboundSchema: z.ZodType<
|
|
|
79
89
|
"organization_id": "organizationId",
|
|
80
90
|
"customer_id": "customerId",
|
|
81
91
|
"external_customer_id": "externalCustomerId",
|
|
92
|
+
"child_count": "childCount",
|
|
93
|
+
"parent_id": "parentId",
|
|
82
94
|
});
|
|
83
95
|
});
|
|
84
96
|
|
|
@@ -90,6 +102,8 @@ export type CustomerCreatedEvent$Outbound = {
|
|
|
90
102
|
customer_id: string | null;
|
|
91
103
|
customer: Customer$Outbound | null;
|
|
92
104
|
external_customer_id: string | null;
|
|
105
|
+
child_count: number;
|
|
106
|
+
parent_id?: string | null | undefined;
|
|
93
107
|
source: "system";
|
|
94
108
|
name: "customer.created";
|
|
95
109
|
metadata: CustomerCreatedMetadata$Outbound;
|
|
@@ -107,6 +121,8 @@ export const CustomerCreatedEvent$outboundSchema: z.ZodType<
|
|
|
107
121
|
customerId: z.nullable(z.string()),
|
|
108
122
|
customer: z.nullable(Customer$outboundSchema),
|
|
109
123
|
externalCustomerId: z.nullable(z.string()),
|
|
124
|
+
childCount: z.number().int().default(0),
|
|
125
|
+
parentId: z.nullable(z.string()).optional(),
|
|
110
126
|
source: z.literal("system"),
|
|
111
127
|
name: z.literal("customer.created"),
|
|
112
128
|
metadata: CustomerCreatedMetadata$outboundSchema,
|
|
@@ -115,6 +131,8 @@ export const CustomerCreatedEvent$outboundSchema: z.ZodType<
|
|
|
115
131
|
organizationId: "organization_id",
|
|
116
132
|
customerId: "customer_id",
|
|
117
133
|
externalCustomerId: "external_customer_id",
|
|
134
|
+
childCount: "child_count",
|
|
135
|
+
parentId: "parent_id",
|
|
118
136
|
});
|
|
119
137
|
});
|
|
120
138
|
|
|
@@ -48,6 +48,14 @@ export type CustomerDeletedEvent = {
|
|
|
48
48
|
* ID of the customer in your system associated with the event.
|
|
49
49
|
*/
|
|
50
50
|
externalCustomerId: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Number of direct child events linked to this event.
|
|
53
|
+
*/
|
|
54
|
+
childCount?: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The ID of the parent event.
|
|
57
|
+
*/
|
|
58
|
+
parentId?: string | null | undefined;
|
|
51
59
|
/**
|
|
52
60
|
* The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
|
|
53
61
|
*/
|
|
@@ -71,6 +79,8 @@ export const CustomerDeletedEvent$inboundSchema: z.ZodType<
|
|
|
71
79
|
customer_id: z.nullable(z.string()),
|
|
72
80
|
customer: z.nullable(Customer$inboundSchema),
|
|
73
81
|
external_customer_id: z.nullable(z.string()),
|
|
82
|
+
child_count: z.number().int().default(0),
|
|
83
|
+
parent_id: z.nullable(z.string()).optional(),
|
|
74
84
|
source: z.literal("system"),
|
|
75
85
|
name: z.literal("customer.deleted"),
|
|
76
86
|
metadata: CustomerDeletedMetadata$inboundSchema,
|
|
@@ -79,6 +89,8 @@ export const CustomerDeletedEvent$inboundSchema: z.ZodType<
|
|
|
79
89
|
"organization_id": "organizationId",
|
|
80
90
|
"customer_id": "customerId",
|
|
81
91
|
"external_customer_id": "externalCustomerId",
|
|
92
|
+
"child_count": "childCount",
|
|
93
|
+
"parent_id": "parentId",
|
|
82
94
|
});
|
|
83
95
|
});
|
|
84
96
|
|
|
@@ -90,6 +102,8 @@ export type CustomerDeletedEvent$Outbound = {
|
|
|
90
102
|
customer_id: string | null;
|
|
91
103
|
customer: Customer$Outbound | null;
|
|
92
104
|
external_customer_id: string | null;
|
|
105
|
+
child_count: number;
|
|
106
|
+
parent_id?: string | null | undefined;
|
|
93
107
|
source: "system";
|
|
94
108
|
name: "customer.deleted";
|
|
95
109
|
metadata: CustomerDeletedMetadata$Outbound;
|
|
@@ -107,6 +121,8 @@ export const CustomerDeletedEvent$outboundSchema: z.ZodType<
|
|
|
107
121
|
customerId: z.nullable(z.string()),
|
|
108
122
|
customer: z.nullable(Customer$outboundSchema),
|
|
109
123
|
externalCustomerId: z.nullable(z.string()),
|
|
124
|
+
childCount: z.number().int().default(0),
|
|
125
|
+
parentId: z.nullable(z.string()).optional(),
|
|
110
126
|
source: z.literal("system"),
|
|
111
127
|
name: z.literal("customer.deleted"),
|
|
112
128
|
metadata: CustomerDeletedMetadata$outboundSchema,
|
|
@@ -115,6 +131,8 @@ export const CustomerDeletedEvent$outboundSchema: z.ZodType<
|
|
|
115
131
|
organizationId: "organization_id",
|
|
116
132
|
customerId: "customer_id",
|
|
117
133
|
externalCustomerId: "external_customer_id",
|
|
134
|
+
childCount: "child_count",
|
|
135
|
+
parentId: "parent_id",
|
|
118
136
|
});
|
|
119
137
|
});
|
|
120
138
|
|
|
@@ -13,18 +13,18 @@ import {
|
|
|
13
13
|
BenefitPublic$Outbound,
|
|
14
14
|
BenefitPublic$outboundSchema,
|
|
15
15
|
} from "./benefitpublic.js";
|
|
16
|
+
import {
|
|
17
|
+
CustomerOrganization,
|
|
18
|
+
CustomerOrganization$inboundSchema,
|
|
19
|
+
CustomerOrganization$Outbound,
|
|
20
|
+
CustomerOrganization$outboundSchema,
|
|
21
|
+
} from "./customerorganization.js";
|
|
16
22
|
import {
|
|
17
23
|
LegacyRecurringProductPrice,
|
|
18
24
|
LegacyRecurringProductPrice$inboundSchema,
|
|
19
25
|
LegacyRecurringProductPrice$Outbound,
|
|
20
26
|
LegacyRecurringProductPrice$outboundSchema,
|
|
21
27
|
} from "./legacyrecurringproductprice.js";
|
|
22
|
-
import {
|
|
23
|
-
Organization,
|
|
24
|
-
Organization$inboundSchema,
|
|
25
|
-
Organization$Outbound,
|
|
26
|
-
Organization$outboundSchema,
|
|
27
|
-
} from "./organization.js";
|
|
28
28
|
import {
|
|
29
29
|
ProductMediaFileRead,
|
|
30
30
|
ProductMediaFileRead$inboundSchema,
|
|
@@ -113,7 +113,7 @@ export type CustomerOrderProduct = {
|
|
|
113
113
|
* List of medias associated to the product.
|
|
114
114
|
*/
|
|
115
115
|
medias: Array<ProductMediaFileRead>;
|
|
116
|
-
organization:
|
|
116
|
+
organization: CustomerOrganization;
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
/** @internal */
|
|
@@ -200,7 +200,7 @@ export const CustomerOrderProduct$inboundSchema: z.ZodType<
|
|
|
200
200
|
),
|
|
201
201
|
benefits: z.array(BenefitPublic$inboundSchema),
|
|
202
202
|
medias: z.array(ProductMediaFileRead$inboundSchema),
|
|
203
|
-
organization:
|
|
203
|
+
organization: CustomerOrganization$inboundSchema,
|
|
204
204
|
}).transform((v) => {
|
|
205
205
|
return remap$(v, {
|
|
206
206
|
"created_at": "createdAt",
|
|
@@ -232,7 +232,7 @@ export type CustomerOrderProduct$Outbound = {
|
|
|
232
232
|
prices: Array<LegacyRecurringProductPrice$Outbound | ProductPrice$Outbound>;
|
|
233
233
|
benefits: Array<BenefitPublic$Outbound>;
|
|
234
234
|
medias: Array<ProductMediaFileRead$Outbound>;
|
|
235
|
-
organization:
|
|
235
|
+
organization: CustomerOrganization$Outbound;
|
|
236
236
|
};
|
|
237
237
|
|
|
238
238
|
/** @internal */
|
|
@@ -261,7 +261,7 @@ export const CustomerOrderProduct$outboundSchema: z.ZodType<
|
|
|
261
261
|
),
|
|
262
262
|
benefits: z.array(BenefitPublic$outboundSchema),
|
|
263
263
|
medias: z.array(ProductMediaFileRead$outboundSchema),
|
|
264
|
-
organization:
|
|
264
|
+
organization: CustomerOrganization$outboundSchema,
|
|
265
265
|
}).transform((v) => {
|
|
266
266
|
return remap$(v, {
|
|
267
267
|
createdAt: "created_at",
|
|
@@ -3,28 +3,46 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
10
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "./customerproduct.js";
|
|
15
|
-
import {
|
|
16
|
-
Organization,
|
|
17
|
-
Organization$inboundSchema,
|
|
18
|
-
Organization$Outbound,
|
|
19
|
-
Organization$outboundSchema,
|
|
20
|
-
} from "./organization.js";
|
|
11
|
+
SubscriptionProrationBehavior,
|
|
12
|
+
SubscriptionProrationBehavior$inboundSchema,
|
|
13
|
+
SubscriptionProrationBehavior$outboundSchema,
|
|
14
|
+
} from "./subscriptionprorationbehavior.js";
|
|
21
15
|
|
|
22
|
-
/**
|
|
23
|
-
* Schema of an organization and related data for customer portal.
|
|
24
|
-
*/
|
|
25
16
|
export type CustomerOrganization = {
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Creation timestamp of the object.
|
|
19
|
+
*/
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
/**
|
|
22
|
+
* Last modification timestamp of the object.
|
|
23
|
+
*/
|
|
24
|
+
modifiedAt: Date | null;
|
|
25
|
+
/**
|
|
26
|
+
* The ID of the object.
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* Organization name shown in checkout, customer portal, emails etc.
|
|
31
|
+
*/
|
|
32
|
+
name: string;
|
|
33
|
+
/**
|
|
34
|
+
* Unique organization slug in checkout, customer portal and credit card statements.
|
|
35
|
+
*/
|
|
36
|
+
slug: string;
|
|
37
|
+
/**
|
|
38
|
+
* Avatar URL shown in checkout, customer portal, emails etc.
|
|
39
|
+
*/
|
|
40
|
+
avatarUrl: string | null;
|
|
41
|
+
prorationBehavior: SubscriptionProrationBehavior;
|
|
42
|
+
/**
|
|
43
|
+
* Whether customers can update their subscriptions from the customer portal.
|
|
44
|
+
*/
|
|
45
|
+
allowCustomerUpdates: boolean;
|
|
28
46
|
};
|
|
29
47
|
|
|
30
48
|
/** @internal */
|
|
@@ -33,14 +51,36 @@ export const CustomerOrganization$inboundSchema: z.ZodType<
|
|
|
33
51
|
z.ZodTypeDef,
|
|
34
52
|
unknown
|
|
35
53
|
> = z.object({
|
|
36
|
-
|
|
37
|
-
|
|
54
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
55
|
+
modified_at: z.nullable(
|
|
56
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
57
|
+
),
|
|
58
|
+
id: z.string(),
|
|
59
|
+
name: z.string(),
|
|
60
|
+
slug: z.string(),
|
|
61
|
+
avatar_url: z.nullable(z.string()),
|
|
62
|
+
proration_behavior: SubscriptionProrationBehavior$inboundSchema,
|
|
63
|
+
allow_customer_updates: z.boolean(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
"created_at": "createdAt",
|
|
67
|
+
"modified_at": "modifiedAt",
|
|
68
|
+
"avatar_url": "avatarUrl",
|
|
69
|
+
"proration_behavior": "prorationBehavior",
|
|
70
|
+
"allow_customer_updates": "allowCustomerUpdates",
|
|
71
|
+
});
|
|
38
72
|
});
|
|
39
73
|
|
|
40
74
|
/** @internal */
|
|
41
75
|
export type CustomerOrganization$Outbound = {
|
|
42
|
-
|
|
43
|
-
|
|
76
|
+
created_at: string;
|
|
77
|
+
modified_at: string | null;
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
slug: string;
|
|
81
|
+
avatar_url: string | null;
|
|
82
|
+
proration_behavior: string;
|
|
83
|
+
allow_customer_updates: boolean;
|
|
44
84
|
};
|
|
45
85
|
|
|
46
86
|
/** @internal */
|
|
@@ -49,8 +89,22 @@ export const CustomerOrganization$outboundSchema: z.ZodType<
|
|
|
49
89
|
z.ZodTypeDef,
|
|
50
90
|
CustomerOrganization
|
|
51
91
|
> = z.object({
|
|
52
|
-
|
|
53
|
-
|
|
92
|
+
createdAt: z.date().transform(v => v.toISOString()),
|
|
93
|
+
modifiedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
94
|
+
id: z.string(),
|
|
95
|
+
name: z.string(),
|
|
96
|
+
slug: z.string(),
|
|
97
|
+
avatarUrl: z.nullable(z.string()),
|
|
98
|
+
prorationBehavior: SubscriptionProrationBehavior$outboundSchema,
|
|
99
|
+
allowCustomerUpdates: z.boolean(),
|
|
100
|
+
}).transform((v) => {
|
|
101
|
+
return remap$(v, {
|
|
102
|
+
createdAt: "created_at",
|
|
103
|
+
modifiedAt: "modified_at",
|
|
104
|
+
avatarUrl: "avatar_url",
|
|
105
|
+
prorationBehavior: "proration_behavior",
|
|
106
|
+
allowCustomerUpdates: "allow_customer_updates",
|
|
107
|
+
});
|
|
54
108
|
});
|
|
55
109
|
|
|
56
110
|
/**
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
CustomerOrganization,
|
|
11
|
+
CustomerOrganization$inboundSchema,
|
|
12
|
+
CustomerOrganization$Outbound,
|
|
13
|
+
CustomerOrganization$outboundSchema,
|
|
14
|
+
} from "./customerorganization.js";
|
|
15
|
+
import {
|
|
16
|
+
CustomerProduct,
|
|
17
|
+
CustomerProduct$inboundSchema,
|
|
18
|
+
CustomerProduct$Outbound,
|
|
19
|
+
CustomerProduct$outboundSchema,
|
|
20
|
+
} from "./customerproduct.js";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Schema of an organization and related data for customer portal.
|
|
24
|
+
*/
|
|
25
|
+
export type CustomerOrganizationData = {
|
|
26
|
+
organization: CustomerOrganization;
|
|
27
|
+
products: Array<CustomerProduct>;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const CustomerOrganizationData$inboundSchema: z.ZodType<
|
|
32
|
+
CustomerOrganizationData,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
organization: CustomerOrganization$inboundSchema,
|
|
37
|
+
products: z.array(CustomerProduct$inboundSchema),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type CustomerOrganizationData$Outbound = {
|
|
42
|
+
organization: CustomerOrganization$Outbound;
|
|
43
|
+
products: Array<CustomerProduct$Outbound>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const CustomerOrganizationData$outboundSchema: z.ZodType<
|
|
48
|
+
CustomerOrganizationData$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
CustomerOrganizationData
|
|
51
|
+
> = z.object({
|
|
52
|
+
organization: CustomerOrganization$outboundSchema,
|
|
53
|
+
products: z.array(CustomerProduct$outboundSchema),
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
|
+
*/
|
|
60
|
+
export namespace CustomerOrganizationData$ {
|
|
61
|
+
/** @deprecated use `CustomerOrganizationData$inboundSchema` instead. */
|
|
62
|
+
export const inboundSchema = CustomerOrganizationData$inboundSchema;
|
|
63
|
+
/** @deprecated use `CustomerOrganizationData$outboundSchema` instead. */
|
|
64
|
+
export const outboundSchema = CustomerOrganizationData$outboundSchema;
|
|
65
|
+
/** @deprecated use `CustomerOrganizationData$Outbound` instead. */
|
|
66
|
+
export type Outbound = CustomerOrganizationData$Outbound;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function customerOrganizationDataToJSON(
|
|
70
|
+
customerOrganizationData: CustomerOrganizationData,
|
|
71
|
+
): string {
|
|
72
|
+
return JSON.stringify(
|
|
73
|
+
CustomerOrganizationData$outboundSchema.parse(customerOrganizationData),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function customerOrganizationDataFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<CustomerOrganizationData, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => CustomerOrganizationData$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'CustomerOrganizationData' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|