@polar-sh/sdk 0.40.1 → 0.40.3
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 +38 -22
- package/dist/commonjs/funcs/customerPortalBenefitGrantsList.js +0 -1
- package/dist/commonjs/funcs/customerPortalBenefitGrantsList.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalDownloadablesList.js +0 -1
- package/dist/commonjs/funcs/customerPortalDownloadablesList.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysList.js +0 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysList.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalOrdersList.js +0 -1
- package/dist/commonjs/funcs/customerPortalOrdersList.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsList.js +0 -1
- package/dist/commonjs/funcs/customerPortalSubscriptionsList.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalWalletsGet.d.ts +22 -0
- package/dist/commonjs/funcs/customerPortalWalletsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/customerPortalWalletsGet.js +131 -0
- package/dist/commonjs/funcs/customerPortalWalletsGet.js.map +1 -0
- package/dist/commonjs/funcs/customerPortalWalletsList.d.ts +23 -0
- package/dist/commonjs/funcs/customerPortalWalletsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/customerPortalWalletsList.js +166 -0
- package/dist/commonjs/funcs/customerPortalWalletsList.js.map +1 -0
- package/dist/commonjs/funcs/walletsGet.d.ts +22 -0
- package/dist/commonjs/funcs/walletsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/walletsGet.js +127 -0
- package/dist/commonjs/funcs/walletsGet.js.map +1 -0
- package/dist/commonjs/funcs/walletsList.d.ts +23 -0
- package/dist/commonjs/funcs/walletsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/walletsList.js +162 -0
- package/dist/commonjs/funcs/walletsList.js.map +1 -0
- package/dist/commonjs/funcs/walletsTopUp.d.ts +26 -0
- package/dist/commonjs/funcs/walletsTopUp.d.ts.map +1 -0
- package/dist/commonjs/funcs/walletsTopUp.js +132 -0
- package/dist/commonjs/funcs/walletsTopUp.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/addressdict.d.ts +39 -0
- package/dist/commonjs/models/components/addressdict.d.ts.map +1 -0
- package/dist/commonjs/models/components/addressdict.js +88 -0
- package/dist/commonjs/models/components/addressdict.js.map +1 -0
- package/dist/commonjs/models/components/checkout.d.ts +16 -14
- package/dist/commonjs/models/components/checkout.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkout.js +16 -12
- package/dist/commonjs/models/components/checkout.js.map +1 -1
- package/dist/commonjs/models/components/checkoutpublic.d.ts +16 -14
- package/dist/commonjs/models/components/checkoutpublic.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutpublic.js +16 -12
- package/dist/commonjs/models/components/checkoutpublic.js.map +1 -1
- package/dist/commonjs/models/components/checkoutpublicconfirmed.d.ts +16 -14
- package/dist/commonjs/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
- package/dist/commonjs/models/components/checkoutpublicconfirmed.js +16 -12
- package/dist/commonjs/models/components/checkoutpublicconfirmed.js.map +1 -1
- package/dist/commonjs/models/components/customercreatedevent.d.ts +74 -0
- package/dist/commonjs/models/components/customercreatedevent.d.ts.map +1 -0
- package/dist/commonjs/models/components/customercreatedevent.js +100 -0
- package/dist/commonjs/models/components/customercreatedevent.js.map +1 -0
- package/dist/commonjs/models/components/customercreatedmetadata.d.ts +35 -0
- package/dist/commonjs/models/components/customercreatedmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/customercreatedmetadata.js +90 -0
- package/dist/commonjs/models/components/customercreatedmetadata.js.map +1 -0
- package/dist/commonjs/models/components/customerdeletedevent.d.ts +74 -0
- package/dist/commonjs/models/components/customerdeletedevent.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerdeletedevent.js +100 -0
- package/dist/commonjs/models/components/customerdeletedevent.js.map +1 -0
- package/dist/commonjs/models/components/customerdeletedmetadata.d.ts +35 -0
- package/dist/commonjs/models/components/customerdeletedmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerdeletedmetadata.js +90 -0
- package/dist/commonjs/models/components/customerdeletedmetadata.js.map +1 -0
- package/dist/commonjs/models/components/customerstatesubscription.d.ts +8 -8
- package/dist/commonjs/models/components/customerstatesubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerstatesubscription.js +14 -13
- package/dist/commonjs/models/components/customerstatesubscription.js.map +1 -1
- package/dist/commonjs/models/components/customerupdatedevent.d.ts +74 -0
- package/dist/commonjs/models/components/customerupdatedevent.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerupdatedevent.js +100 -0
- package/dist/commonjs/models/components/customerupdatedevent.js.map +1 -0
- package/dist/commonjs/models/components/customerupdatedfields.d.ts +63 -0
- package/dist/commonjs/models/components/customerupdatedfields.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerupdatedfields.js +112 -0
- package/dist/commonjs/models/components/customerupdatedfields.js.map +1 -0
- package/dist/commonjs/models/components/customerupdatedmetadata.d.ts +38 -0
- package/dist/commonjs/models/components/customerupdatedmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerupdatedmetadata.js +95 -0
- package/dist/commonjs/models/components/customerupdatedmetadata.js.map +1 -0
- package/dist/commonjs/models/components/customerwallet.d.ts +64 -0
- package/dist/commonjs/models/components/customerwallet.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerwallet.js +92 -0
- package/dist/commonjs/models/components/customerwallet.js.map +1 -0
- package/dist/commonjs/models/components/customerwalletsortproperty.d.ts +34 -0
- package/dist/commonjs/models/components/customerwalletsortproperty.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerwalletsortproperty.js +62 -0
- package/dist/commonjs/models/components/customerwalletsortproperty.js.map +1 -0
- package/dist/commonjs/models/components/listresourcecustomerwallet.d.ts +33 -0
- package/dist/commonjs/models/components/listresourcecustomerwallet.d.ts.map +1 -0
- package/dist/commonjs/models/components/listresourcecustomerwallet.js +73 -0
- package/dist/commonjs/models/components/listresourcecustomerwallet.js.map +1 -0
- package/dist/commonjs/models/components/listresourcewallet.d.ts +33 -0
- package/dist/commonjs/models/components/listresourcewallet.d.ts.map +1 -0
- package/dist/commonjs/models/components/listresourcewallet.js +73 -0
- package/dist/commonjs/models/components/listresourcewallet.js.map +1 -0
- package/dist/commonjs/models/components/metricperiod.d.ts +161 -0
- package/dist/commonjs/models/components/metricperiod.d.ts.map +1 -1
- package/dist/commonjs/models/components/metricperiod.js +190 -3
- package/dist/commonjs/models/components/metricperiod.js.map +1 -1
- package/dist/commonjs/models/components/metrics.d.ts +35 -0
- package/dist/commonjs/models/components/metrics.d.ts.map +1 -1
- package/dist/commonjs/models/components/metrics.js +26 -0
- package/dist/commonjs/models/components/metrics.js.map +1 -1
- package/dist/commonjs/models/components/metricstotals.d.ts +161 -0
- package/dist/commonjs/models/components/metricstotals.d.ts.map +1 -1
- package/dist/commonjs/models/components/metricstotals.js +190 -3
- package/dist/commonjs/models/components/metricstotals.js.map +1 -1
- package/dist/commonjs/models/components/metrictype.d.ts +3 -0
- package/dist/commonjs/models/components/metrictype.d.ts.map +1 -1
- package/dist/commonjs/models/components/metrictype.js +1 -0
- package/dist/commonjs/models/components/metrictype.js.map +1 -1
- package/dist/commonjs/models/components/oauth2clientconfiguration.js +2 -2
- package/dist/commonjs/models/components/oauth2clientconfiguration.js.map +1 -1
- package/dist/commonjs/models/components/oauth2clientconfigurationupdate.js +2 -2
- package/dist/commonjs/models/components/oauth2clientconfigurationupdate.js.map +1 -1
- package/dist/commonjs/models/components/orderpaidevent.d.ts +74 -0
- package/dist/commonjs/models/components/orderpaidevent.d.ts.map +1 -0
- package/dist/commonjs/models/components/orderpaidevent.js +100 -0
- package/dist/commonjs/models/components/orderpaidevent.js.map +1 -0
- package/dist/commonjs/models/components/orderpaidmetadata.d.ts +35 -0
- package/dist/commonjs/models/components/orderpaidmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/orderpaidmetadata.js +84 -0
- package/dist/commonjs/models/components/orderpaidmetadata.js.map +1 -0
- package/dist/commonjs/models/components/orderrefundedevent.d.ts +74 -0
- package/dist/commonjs/models/components/orderrefundedevent.d.ts.map +1 -0
- package/dist/commonjs/models/components/orderrefundedevent.js +100 -0
- package/dist/commonjs/models/components/orderrefundedevent.js.map +1 -0
- package/dist/commonjs/models/components/orderrefundedmetadata.d.ts +35 -0
- package/dist/commonjs/models/components/orderrefundedmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/orderrefundedmetadata.js +86 -0
- package/dist/commonjs/models/components/orderrefundedmetadata.js.map +1 -0
- package/dist/commonjs/models/components/organization.d.ts +2 -2
- package/dist/commonjs/models/components/organization.d.ts.map +1 -1
- package/dist/commonjs/models/components/organization.js +3 -3
- package/dist/commonjs/models/components/organization.js.map +1 -1
- package/dist/commonjs/models/components/organizationfeaturesettings.d.ts +5 -0
- package/dist/commonjs/models/components/organizationfeaturesettings.d.ts.map +1 -1
- package/dist/commonjs/models/components/organizationfeaturesettings.js +4 -0
- package/dist/commonjs/models/components/organizationfeaturesettings.js.map +1 -1
- package/dist/commonjs/models/components/{status.d.ts → organizationstatus.d.ts} +8 -8
- package/dist/commonjs/models/components/organizationstatus.d.ts.map +1 -0
- package/dist/commonjs/models/components/{status.js → organizationstatus.js} +12 -13
- package/dist/commonjs/models/components/organizationstatus.js.map +1 -0
- package/dist/commonjs/models/components/organizationsubscriptionsettings.d.ts +2 -0
- package/dist/commonjs/models/components/organizationsubscriptionsettings.d.ts.map +1 -1
- package/dist/commonjs/models/components/organizationsubscriptionsettings.js +4 -0
- package/dist/commonjs/models/components/organizationsubscriptionsettings.js.map +1 -1
- package/dist/commonjs/models/components/scope.d.ts +6 -0
- package/dist/commonjs/models/components/scope.d.ts.map +1 -1
- package/dist/commonjs/models/components/scope.js +2 -0
- package/dist/commonjs/models/components/scope.js.map +1 -1
- package/dist/commonjs/models/components/seatassign.d.ts +5 -0
- package/dist/commonjs/models/components/seatassign.d.ts.map +1 -1
- package/dist/commonjs/models/components/seatassign.js +4 -0
- package/dist/commonjs/models/components/seatassign.js.map +1 -1
- package/dist/commonjs/models/components/systemevent.d.ts +25 -0
- package/dist/commonjs/models/components/systemevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/systemevent.js +35 -0
- package/dist/commonjs/models/components/systemevent.js.map +1 -1
- package/dist/commonjs/models/components/wallet.d.ts +64 -0
- package/dist/commonjs/models/components/wallet.d.ts.map +1 -0
- package/dist/commonjs/models/components/wallet.js +93 -0
- package/dist/commonjs/models/components/wallet.js.map +1 -0
- package/dist/commonjs/models/components/walletsortproperty.d.ts +34 -0
- package/dist/commonjs/models/components/walletsortproperty.d.ts.map +1 -0
- package/dist/commonjs/models/components/walletsortproperty.js +62 -0
- package/dist/commonjs/models/components/walletsortproperty.js.map +1 -0
- package/dist/commonjs/models/components/wallettopupcreate.d.ts +40 -0
- package/dist/commonjs/models/components/wallettopupcreate.d.ts.map +1 -0
- package/dist/commonjs/models/components/wallettopupcreate.js +71 -0
- package/dist/commonjs/models/components/wallettopupcreate.js.map +1 -0
- package/dist/commonjs/models/components/webhookendpoint.d.ts +5 -0
- package/dist/commonjs/models/components/webhookendpoint.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhookendpoint.js +2 -0
- package/dist/commonjs/models/components/webhookendpoint.js.map +1 -1
- package/dist/commonjs/models/components/webhookendpointupdate.d.ts +5 -0
- package/dist/commonjs/models/components/webhookendpointupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhookendpointupdate.js +2 -0
- package/dist/commonjs/models/components/webhookendpointupdate.js.map +1 -1
- package/dist/commonjs/models/errors/missingpaymentmethoderror.d.ts +39 -0
- package/dist/commonjs/models/errors/missingpaymentmethoderror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/missingpaymentmethoderror.js +88 -0
- package/dist/commonjs/models/errors/missingpaymentmethoderror.js.map +1 -0
- package/dist/commonjs/models/errors/paymentintentfailederror.d.ts +39 -0
- package/dist/commonjs/models/errors/paymentintentfailederror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/paymentintentfailederror.js +88 -0
- package/dist/commonjs/models/errors/paymentintentfailederror.js.map +1 -0
- package/dist/commonjs/models/operations/customerportalbenefitgrantslist.d.ts +0 -29
- package/dist/commonjs/models/operations/customerportalbenefitgrantslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/customerportalbenefitgrantslist.js +1 -32
- package/dist/commonjs/models/operations/customerportalbenefitgrantslist.js.map +1 -1
- package/dist/commonjs/models/operations/customerportaldownloadableslist.d.ts +0 -29
- package/dist/commonjs/models/operations/customerportaldownloadableslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/customerportaldownloadableslist.js +1 -32
- package/dist/commonjs/models/operations/customerportaldownloadableslist.js.map +1 -1
- package/dist/commonjs/models/operations/customerportallicensekeyslist.d.ts +0 -29
- package/dist/commonjs/models/operations/customerportallicensekeyslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/customerportallicensekeyslist.js +1 -32
- package/dist/commonjs/models/operations/customerportallicensekeyslist.js.map +1 -1
- package/dist/commonjs/models/operations/customerportalorderslist.d.ts +0 -29
- package/dist/commonjs/models/operations/customerportalorderslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/customerportalorderslist.js +1 -31
- package/dist/commonjs/models/operations/customerportalorderslist.js.map +1 -1
- package/dist/commonjs/models/operations/customerportalsubscriptionslist.d.ts +0 -29
- package/dist/commonjs/models/operations/customerportalsubscriptionslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/customerportalsubscriptionslist.js +1 -32
- package/dist/commonjs/models/operations/customerportalsubscriptionslist.js.map +1 -1
- package/dist/commonjs/models/operations/customerportalwalletsget.d.ts +57 -0
- package/dist/commonjs/models/operations/customerportalwalletsget.d.ts.map +1 -0
- package/dist/commonjs/models/operations/customerportalwalletsget.js +105 -0
- package/dist/commonjs/models/operations/customerportalwalletsget.js.map +1 -0
- package/dist/commonjs/models/operations/customerportalwalletslist.d.ts +94 -0
- package/dist/commonjs/models/operations/customerportalwalletslist.d.ts.map +1 -0
- package/dist/commonjs/models/operations/customerportalwalletslist.js +148 -0
- package/dist/commonjs/models/operations/customerportalwalletslist.js.map +1 -0
- package/dist/commonjs/models/operations/walletsget.d.ts +32 -0
- package/dist/commonjs/models/operations/walletsget.d.ts.map +1 -0
- package/dist/commonjs/models/operations/walletsget.js +69 -0
- package/dist/commonjs/models/operations/walletsget.js.map +1 -0
- package/dist/commonjs/models/operations/walletslist.d.ts +127 -0
- package/dist/commonjs/models/operations/walletslist.d.ts.map +1 -0
- package/dist/commonjs/models/operations/walletslist.js +174 -0
- package/dist/commonjs/models/operations/walletslist.js.map +1 -0
- package/dist/commonjs/models/operations/walletstopup.d.ts +35 -0
- package/dist/commonjs/models/operations/walletstopup.d.ts.map +1 -0
- package/dist/commonjs/models/operations/walletstopup.js +81 -0
- package/dist/commonjs/models/operations/walletstopup.js.map +1 -0
- package/dist/commonjs/sdk/customerportal.d.ts +3 -0
- package/dist/commonjs/sdk/customerportal.d.ts.map +1 -1
- package/dist/commonjs/sdk/customerportal.js +4 -0
- package/dist/commonjs/sdk/customerportal.js.map +1 -1
- package/dist/commonjs/sdk/polarwallets.d.ts +28 -0
- package/dist/commonjs/sdk/polarwallets.d.ts.map +1 -0
- package/dist/commonjs/sdk/polarwallets.js +37 -0
- package/dist/commonjs/sdk/polarwallets.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/wallets.d.ts +40 -0
- package/dist/commonjs/sdk/wallets.d.ts.map +1 -0
- package/dist/commonjs/sdk/wallets.js +51 -0
- package/dist/commonjs/sdk/wallets.js.map +1 -0
- package/dist/commonjs/webhooks.d.ts +1 -1
- package/dist/commonjs/webhooks.d.ts.map +1 -1
- package/dist/commonjs/webhooks.js +9 -0
- package/dist/commonjs/webhooks.js.map +1 -1
- package/dist/esm/funcs/customerPortalBenefitGrantsList.js +0 -1
- package/dist/esm/funcs/customerPortalBenefitGrantsList.js.map +1 -1
- package/dist/esm/funcs/customerPortalDownloadablesList.js +0 -1
- package/dist/esm/funcs/customerPortalDownloadablesList.js.map +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysList.js +0 -1
- package/dist/esm/funcs/customerPortalLicenseKeysList.js.map +1 -1
- package/dist/esm/funcs/customerPortalOrdersList.js +0 -1
- package/dist/esm/funcs/customerPortalOrdersList.js.map +1 -1
- package/dist/esm/funcs/customerPortalSubscriptionsList.js +0 -1
- package/dist/esm/funcs/customerPortalSubscriptionsList.js.map +1 -1
- package/dist/esm/funcs/customerPortalWalletsGet.d.ts +22 -0
- package/dist/esm/funcs/customerPortalWalletsGet.d.ts.map +1 -0
- package/dist/esm/funcs/customerPortalWalletsGet.js +95 -0
- package/dist/esm/funcs/customerPortalWalletsGet.js.map +1 -0
- package/dist/esm/funcs/customerPortalWalletsList.d.ts +23 -0
- package/dist/esm/funcs/customerPortalWalletsList.d.ts.map +1 -0
- package/dist/esm/funcs/customerPortalWalletsList.js +130 -0
- package/dist/esm/funcs/customerPortalWalletsList.js.map +1 -0
- package/dist/esm/funcs/walletsGet.d.ts +22 -0
- package/dist/esm/funcs/walletsGet.d.ts.map +1 -0
- package/dist/esm/funcs/walletsGet.js +91 -0
- package/dist/esm/funcs/walletsGet.js.map +1 -0
- package/dist/esm/funcs/walletsList.d.ts +23 -0
- package/dist/esm/funcs/walletsList.d.ts.map +1 -0
- package/dist/esm/funcs/walletsList.js +126 -0
- package/dist/esm/funcs/walletsList.js.map +1 -0
- package/dist/esm/funcs/walletsTopUp.d.ts +26 -0
- package/dist/esm/funcs/walletsTopUp.d.ts.map +1 -0
- package/dist/esm/funcs/walletsTopUp.js +96 -0
- package/dist/esm/funcs/walletsTopUp.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/addressdict.d.ts +39 -0
- package/dist/esm/models/components/addressdict.d.ts.map +1 -0
- package/dist/esm/models/components/addressdict.js +50 -0
- package/dist/esm/models/components/addressdict.js.map +1 -0
- package/dist/esm/models/components/checkout.d.ts +16 -14
- package/dist/esm/models/components/checkout.d.ts.map +1 -1
- package/dist/esm/models/components/checkout.js +16 -12
- package/dist/esm/models/components/checkout.js.map +1 -1
- package/dist/esm/models/components/checkoutpublic.d.ts +16 -14
- package/dist/esm/models/components/checkoutpublic.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutpublic.js +16 -12
- package/dist/esm/models/components/checkoutpublic.js.map +1 -1
- package/dist/esm/models/components/checkoutpublicconfirmed.d.ts +16 -14
- package/dist/esm/models/components/checkoutpublicconfirmed.d.ts.map +1 -1
- package/dist/esm/models/components/checkoutpublicconfirmed.js +16 -12
- package/dist/esm/models/components/checkoutpublicconfirmed.js.map +1 -1
- package/dist/esm/models/components/customercreatedevent.d.ts +74 -0
- package/dist/esm/models/components/customercreatedevent.d.ts.map +1 -0
- package/dist/esm/models/components/customercreatedevent.js +62 -0
- package/dist/esm/models/components/customercreatedevent.js.map +1 -0
- package/dist/esm/models/components/customercreatedmetadata.d.ts +35 -0
- package/dist/esm/models/components/customercreatedmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/customercreatedmetadata.js +52 -0
- package/dist/esm/models/components/customercreatedmetadata.js.map +1 -0
- package/dist/esm/models/components/customerdeletedevent.d.ts +74 -0
- package/dist/esm/models/components/customerdeletedevent.d.ts.map +1 -0
- package/dist/esm/models/components/customerdeletedevent.js +62 -0
- package/dist/esm/models/components/customerdeletedevent.js.map +1 -0
- package/dist/esm/models/components/customerdeletedmetadata.d.ts +35 -0
- package/dist/esm/models/components/customerdeletedmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/customerdeletedmetadata.js +52 -0
- package/dist/esm/models/components/customerdeletedmetadata.js.map +1 -0
- package/dist/esm/models/components/customerstatesubscription.d.ts +8 -8
- package/dist/esm/models/components/customerstatesubscription.d.ts.map +1 -1
- package/dist/esm/models/components/customerstatesubscription.js +13 -12
- package/dist/esm/models/components/customerstatesubscription.js.map +1 -1
- package/dist/esm/models/components/customerupdatedevent.d.ts +74 -0
- package/dist/esm/models/components/customerupdatedevent.d.ts.map +1 -0
- package/dist/esm/models/components/customerupdatedevent.js +62 -0
- package/dist/esm/models/components/customerupdatedevent.js.map +1 -0
- package/dist/esm/models/components/customerupdatedfields.d.ts +63 -0
- package/dist/esm/models/components/customerupdatedfields.d.ts.map +1 -0
- package/dist/esm/models/components/customerupdatedfields.js +72 -0
- package/dist/esm/models/components/customerupdatedfields.js.map +1 -0
- package/dist/esm/models/components/customerupdatedmetadata.d.ts +38 -0
- package/dist/esm/models/components/customerupdatedmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/customerupdatedmetadata.js +57 -0
- package/dist/esm/models/components/customerupdatedmetadata.js.map +1 -0
- package/dist/esm/models/components/customerwallet.d.ts +64 -0
- package/dist/esm/models/components/customerwallet.d.ts.map +1 -0
- package/dist/esm/models/components/customerwallet.js +54 -0
- package/dist/esm/models/components/customerwallet.js.map +1 -0
- package/dist/esm/models/components/customerwalletsortproperty.d.ts +34 -0
- package/dist/esm/models/components/customerwalletsortproperty.d.ts.map +1 -0
- package/dist/esm/models/components/customerwalletsortproperty.js +26 -0
- package/dist/esm/models/components/customerwalletsortproperty.js.map +1 -0
- package/dist/esm/models/components/listresourcecustomerwallet.d.ts +33 -0
- package/dist/esm/models/components/listresourcecustomerwallet.d.ts.map +1 -0
- package/dist/esm/models/components/listresourcecustomerwallet.js +35 -0
- package/dist/esm/models/components/listresourcecustomerwallet.js.map +1 -0
- package/dist/esm/models/components/listresourcewallet.d.ts +33 -0
- package/dist/esm/models/components/listresourcewallet.d.ts.map +1 -0
- package/dist/esm/models/components/listresourcewallet.js +35 -0
- package/dist/esm/models/components/listresourcewallet.js.map +1 -0
- package/dist/esm/models/components/metricperiod.d.ts +161 -0
- package/dist/esm/models/components/metricperiod.d.ts.map +1 -1
- package/dist/esm/models/components/metricperiod.js +173 -0
- package/dist/esm/models/components/metricperiod.js.map +1 -1
- package/dist/esm/models/components/metrics.d.ts +35 -0
- package/dist/esm/models/components/metrics.d.ts.map +1 -1
- package/dist/esm/models/components/metrics.js +26 -0
- package/dist/esm/models/components/metrics.js.map +1 -1
- package/dist/esm/models/components/metricstotals.d.ts +161 -0
- package/dist/esm/models/components/metricstotals.d.ts.map +1 -1
- package/dist/esm/models/components/metricstotals.js +173 -0
- package/dist/esm/models/components/metricstotals.js.map +1 -1
- package/dist/esm/models/components/metrictype.d.ts +3 -0
- package/dist/esm/models/components/metrictype.d.ts.map +1 -1
- package/dist/esm/models/components/metrictype.js +1 -0
- package/dist/esm/models/components/metrictype.js.map +1 -1
- package/dist/esm/models/components/oauth2clientconfiguration.js +2 -2
- package/dist/esm/models/components/oauth2clientconfiguration.js.map +1 -1
- package/dist/esm/models/components/oauth2clientconfigurationupdate.js +2 -2
- package/dist/esm/models/components/oauth2clientconfigurationupdate.js.map +1 -1
- package/dist/esm/models/components/orderpaidevent.d.ts +74 -0
- package/dist/esm/models/components/orderpaidevent.d.ts.map +1 -0
- package/dist/esm/models/components/orderpaidevent.js +62 -0
- package/dist/esm/models/components/orderpaidevent.js.map +1 -0
- package/dist/esm/models/components/orderpaidmetadata.d.ts +35 -0
- package/dist/esm/models/components/orderpaidmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/orderpaidmetadata.js +46 -0
- package/dist/esm/models/components/orderpaidmetadata.js.map +1 -0
- package/dist/esm/models/components/orderrefundedevent.d.ts +74 -0
- package/dist/esm/models/components/orderrefundedevent.d.ts.map +1 -0
- package/dist/esm/models/components/orderrefundedevent.js +62 -0
- package/dist/esm/models/components/orderrefundedevent.js.map +1 -0
- package/dist/esm/models/components/orderrefundedmetadata.d.ts +35 -0
- package/dist/esm/models/components/orderrefundedmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/orderrefundedmetadata.js +48 -0
- package/dist/esm/models/components/orderrefundedmetadata.js.map +1 -0
- package/dist/esm/models/components/organization.d.ts +2 -2
- package/dist/esm/models/components/organization.d.ts.map +1 -1
- package/dist/esm/models/components/organization.js +3 -3
- package/dist/esm/models/components/organization.js.map +1 -1
- package/dist/esm/models/components/organizationfeaturesettings.d.ts +5 -0
- package/dist/esm/models/components/organizationfeaturesettings.d.ts.map +1 -1
- package/dist/esm/models/components/organizationfeaturesettings.js +4 -0
- package/dist/esm/models/components/organizationfeaturesettings.js.map +1 -1
- package/dist/esm/models/components/{status.d.ts → organizationstatus.d.ts} +8 -8
- package/dist/esm/models/components/organizationstatus.d.ts.map +1 -0
- package/dist/esm/models/components/organizationstatus.js +27 -0
- package/dist/esm/models/components/organizationstatus.js.map +1 -0
- package/dist/esm/models/components/organizationsubscriptionsettings.d.ts +2 -0
- package/dist/esm/models/components/organizationsubscriptionsettings.d.ts.map +1 -1
- package/dist/esm/models/components/organizationsubscriptionsettings.js +4 -0
- package/dist/esm/models/components/organizationsubscriptionsettings.js.map +1 -1
- package/dist/esm/models/components/scope.d.ts +6 -0
- package/dist/esm/models/components/scope.d.ts.map +1 -1
- package/dist/esm/models/components/scope.js +2 -0
- package/dist/esm/models/components/scope.js.map +1 -1
- package/dist/esm/models/components/seatassign.d.ts +5 -0
- package/dist/esm/models/components/seatassign.d.ts.map +1 -1
- package/dist/esm/models/components/seatassign.js +4 -0
- package/dist/esm/models/components/seatassign.js.map +1 -1
- package/dist/esm/models/components/systemevent.d.ts +25 -0
- package/dist/esm/models/components/systemevent.d.ts.map +1 -1
- package/dist/esm/models/components/systemevent.js +35 -0
- package/dist/esm/models/components/systemevent.js.map +1 -1
- package/dist/esm/models/components/wallet.d.ts +64 -0
- package/dist/esm/models/components/wallet.d.ts.map +1 -0
- package/dist/esm/models/components/wallet.js +55 -0
- package/dist/esm/models/components/wallet.js.map +1 -0
- package/dist/esm/models/components/walletsortproperty.d.ts +34 -0
- package/dist/esm/models/components/walletsortproperty.d.ts.map +1 -0
- package/dist/esm/models/components/walletsortproperty.js +26 -0
- package/dist/esm/models/components/walletsortproperty.js.map +1 -0
- package/dist/esm/models/components/wallettopupcreate.d.ts +40 -0
- package/dist/esm/models/components/wallettopupcreate.d.ts.map +1 -0
- package/dist/esm/models/components/wallettopupcreate.js +33 -0
- package/dist/esm/models/components/wallettopupcreate.js.map +1 -0
- package/dist/esm/models/components/webhookendpoint.d.ts +5 -0
- package/dist/esm/models/components/webhookendpoint.d.ts.map +1 -1
- package/dist/esm/models/components/webhookendpoint.js +2 -0
- package/dist/esm/models/components/webhookendpoint.js.map +1 -1
- package/dist/esm/models/components/webhookendpointupdate.d.ts +5 -0
- package/dist/esm/models/components/webhookendpointupdate.d.ts.map +1 -1
- package/dist/esm/models/components/webhookendpointupdate.js +2 -0
- package/dist/esm/models/components/webhookendpointupdate.js.map +1 -1
- package/dist/esm/models/errors/missingpaymentmethoderror.d.ts +39 -0
- package/dist/esm/models/errors/missingpaymentmethoderror.d.ts.map +1 -0
- package/dist/esm/models/errors/missingpaymentmethoderror.js +51 -0
- package/dist/esm/models/errors/missingpaymentmethoderror.js.map +1 -0
- package/dist/esm/models/errors/paymentintentfailederror.d.ts +39 -0
- package/dist/esm/models/errors/paymentintentfailederror.d.ts.map +1 -0
- package/dist/esm/models/errors/paymentintentfailederror.js +51 -0
- package/dist/esm/models/errors/paymentintentfailederror.js.map +1 -0
- package/dist/esm/models/operations/customerportalbenefitgrantslist.d.ts +0 -29
- package/dist/esm/models/operations/customerportalbenefitgrantslist.d.ts.map +1 -1
- package/dist/esm/models/operations/customerportalbenefitgrantslist.js +0 -29
- package/dist/esm/models/operations/customerportalbenefitgrantslist.js.map +1 -1
- package/dist/esm/models/operations/customerportaldownloadableslist.d.ts +0 -29
- package/dist/esm/models/operations/customerportaldownloadableslist.d.ts.map +1 -1
- package/dist/esm/models/operations/customerportaldownloadableslist.js +0 -29
- package/dist/esm/models/operations/customerportaldownloadableslist.js.map +1 -1
- package/dist/esm/models/operations/customerportallicensekeyslist.d.ts +0 -29
- package/dist/esm/models/operations/customerportallicensekeyslist.d.ts.map +1 -1
- package/dist/esm/models/operations/customerportallicensekeyslist.js +0 -29
- package/dist/esm/models/operations/customerportallicensekeyslist.js.map +1 -1
- package/dist/esm/models/operations/customerportalorderslist.d.ts +0 -29
- package/dist/esm/models/operations/customerportalorderslist.d.ts.map +1 -1
- package/dist/esm/models/operations/customerportalorderslist.js +0 -28
- package/dist/esm/models/operations/customerportalorderslist.js.map +1 -1
- package/dist/esm/models/operations/customerportalsubscriptionslist.d.ts +0 -29
- package/dist/esm/models/operations/customerportalsubscriptionslist.d.ts.map +1 -1
- package/dist/esm/models/operations/customerportalsubscriptionslist.js +0 -29
- package/dist/esm/models/operations/customerportalsubscriptionslist.js.map +1 -1
- package/dist/esm/models/operations/customerportalwalletsget.d.ts +57 -0
- package/dist/esm/models/operations/customerportalwalletsget.d.ts.map +1 -0
- package/dist/esm/models/operations/customerportalwalletsget.js +65 -0
- package/dist/esm/models/operations/customerportalwalletsget.js.map +1 -0
- package/dist/esm/models/operations/customerportalwalletslist.d.ts +94 -0
- package/dist/esm/models/operations/customerportalwalletslist.d.ts.map +1 -0
- package/dist/esm/models/operations/customerportalwalletslist.js +106 -0
- package/dist/esm/models/operations/customerportalwalletslist.js.map +1 -0
- package/dist/esm/models/operations/walletsget.d.ts +32 -0
- package/dist/esm/models/operations/walletsget.d.ts.map +1 -0
- package/dist/esm/models/operations/walletsget.js +31 -0
- package/dist/esm/models/operations/walletsget.js.map +1 -0
- package/dist/esm/models/operations/walletslist.d.ts +127 -0
- package/dist/esm/models/operations/walletslist.d.ts.map +1 -0
- package/dist/esm/models/operations/walletslist.js +130 -0
- package/dist/esm/models/operations/walletslist.js.map +1 -0
- package/dist/esm/models/operations/walletstopup.d.ts +35 -0
- package/dist/esm/models/operations/walletstopup.d.ts.map +1 -0
- package/dist/esm/models/operations/walletstopup.js +43 -0
- package/dist/esm/models/operations/walletstopup.js.map +1 -0
- package/dist/esm/sdk/customerportal.d.ts +3 -0
- package/dist/esm/sdk/customerportal.d.ts.map +1 -1
- package/dist/esm/sdk/customerportal.js +4 -0
- package/dist/esm/sdk/customerportal.js.map +1 -1
- package/dist/esm/sdk/polarwallets.d.ts +28 -0
- package/dist/esm/sdk/polarwallets.d.ts.map +1 -0
- package/dist/esm/sdk/polarwallets.js +33 -0
- package/dist/esm/sdk/polarwallets.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/wallets.d.ts +40 -0
- package/dist/esm/sdk/wallets.d.ts.map +1 -0
- package/dist/esm/sdk/wallets.js +47 -0
- package/dist/esm/sdk/wallets.js.map +1 -0
- package/dist/esm/webhooks.d.ts +1 -1
- package/dist/esm/webhooks.d.ts.map +1 -1
- package/dist/esm/webhooks.js +9 -0
- package/dist/esm/webhooks.js.map +1 -1
- package/docs/sdks/downloadables/README.md +2 -6
- package/docs/sdks/polarbenefitgrants/README.md +2 -6
- package/docs/sdks/polarlicensekeys/README.md +2 -6
- package/docs/sdks/polarorders/README.md +2 -6
- package/docs/sdks/polarsubscriptions/README.md +2 -6
- package/docs/sdks/polarwallets/README.md +164 -0
- package/docs/sdks/wallets/README.md +256 -0
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/customerPortalBenefitGrantsList.ts +0 -1
- package/src/funcs/customerPortalDownloadablesList.ts +0 -1
- package/src/funcs/customerPortalLicenseKeysList.ts +0 -1
- package/src/funcs/customerPortalOrdersList.ts +0 -1
- package/src/funcs/customerPortalSubscriptionsList.ts +0 -1
- package/src/funcs/customerPortalWalletsGet.ts +205 -0
- package/src/funcs/customerPortalWalletsList.ts +271 -0
- package/src/funcs/walletsGet.ts +192 -0
- package/src/funcs/walletsList.ts +260 -0
- package/src/funcs/walletsTopUp.ts +212 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/addressdict.ts +91 -0
- package/src/models/components/checkout.ts +45 -30
- package/src/models/components/checkoutpublic.ts +45 -30
- package/src/models/components/checkoutpublicconfirmed.ts +45 -30
- package/src/models/components/customercreatedevent.ts +150 -0
- package/src/models/components/customercreatedmetadata.ts +93 -0
- package/src/models/components/customerdeletedevent.ts +150 -0
- package/src/models/components/customerdeletedmetadata.ts +93 -0
- package/src/models/components/customerstatesubscription.ts +14 -18
- package/src/models/components/customerupdatedevent.ts +150 -0
- package/src/models/components/customerupdatedfields.ts +155 -0
- package/src/models/components/customerupdatedmetadata.ts +105 -0
- package/src/models/components/customerwallet.ts +122 -0
- package/src/models/components/customerwalletsortproperty.ts +37 -0
- package/src/models/components/listresourcecustomerwallet.ts +82 -0
- package/src/models/components/listresourcewallet.ts +82 -0
- package/src/models/components/metricperiod.ts +374 -0
- package/src/models/components/metrics.ts +61 -0
- package/src/models/components/metricstotals.ts +400 -0
- package/src/models/components/metrictype.ts +1 -0
- package/src/models/components/oauth2clientconfiguration.ts +2 -2
- package/src/models/components/oauth2clientconfigurationupdate.ts +2 -2
- package/src/models/components/orderpaidevent.ts +146 -0
- package/src/models/components/orderpaidmetadata.ts +87 -0
- package/src/models/components/orderrefundedevent.ts +150 -0
- package/src/models/components/orderrefundedmetadata.ts +89 -0
- package/src/models/components/organization.ts +8 -8
- package/src/models/components/organizationfeaturesettings.ts +9 -0
- package/src/models/components/organizationstatus.ts +36 -0
- package/src/models/components/organizationsubscriptionsettings.ts +6 -0
- package/src/models/components/scope.ts +2 -0
- package/src/models/components/seatassign.ts +9 -0
- package/src/models/components/systemevent.ts +90 -0
- package/src/models/components/wallet.ts +121 -0
- package/src/models/components/walletsortproperty.ts +35 -0
- package/src/models/components/wallettopupcreate.ts +79 -0
- package/src/models/components/webhookendpoint.ts +7 -0
- package/src/models/components/webhookendpointupdate.ts +7 -0
- package/src/models/errors/missingpaymentmethoderror.ts +85 -0
- package/src/models/errors/paymentintentfailederror.ts +85 -0
- package/src/models/operations/customerportalbenefitgrantslist.ts +0 -80
- package/src/models/operations/customerportaldownloadableslist.ts +0 -80
- package/src/models/operations/customerportallicensekeyslist.ts +0 -80
- package/src/models/operations/customerportalorderslist.ts +0 -81
- package/src/models/operations/customerportalsubscriptionslist.ts +0 -80
- package/src/models/operations/customerportalwalletsget.ts +140 -0
- package/src/models/operations/customerportalwalletslist.ts +237 -0
- package/src/models/operations/walletsget.ts +69 -0
- package/src/models/operations/walletslist.ts +315 -0
- package/src/models/operations/walletstopup.ts +88 -0
- package/src/sdk/customerportal.ts +6 -0
- package/src/sdk/polarwallets.ts +65 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/wallets.ts +78 -0
- package/src/webhooks.ts +9 -0
- package/dist/commonjs/models/components/status.d.ts.map +0 -1
- package/dist/commonjs/models/components/status.js.map +0 -1
- package/dist/esm/models/components/status.d.ts.map +0 -1
- package/dist/esm/models/components/status.js +0 -28
- package/dist/esm/models/components/status.js.map +0 -1
- package/src/models/components/status.ts +0 -34
|
@@ -90,9 +90,6 @@ export type CheckoutPublicConfirmedCustomFieldData =
|
|
|
90
90
|
| boolean
|
|
91
91
|
| Date;
|
|
92
92
|
|
|
93
|
-
/**
|
|
94
|
-
* Price of the selected product.
|
|
95
|
-
*/
|
|
96
93
|
export type CheckoutPublicConfirmedProductPrice =
|
|
97
94
|
| LegacyRecurringProductPrice
|
|
98
95
|
| ProductPrice;
|
|
@@ -200,14 +197,18 @@ export type CheckoutPublicConfirmed = {
|
|
|
200
197
|
* End date and time of the trial period, if any.
|
|
201
198
|
*/
|
|
202
199
|
trialEnd: Date | null;
|
|
200
|
+
/**
|
|
201
|
+
* ID of the organization owning the checkout session.
|
|
202
|
+
*/
|
|
203
|
+
organizationId: string;
|
|
203
204
|
/**
|
|
204
205
|
* ID of the product to checkout.
|
|
205
206
|
*/
|
|
206
|
-
productId: string;
|
|
207
|
+
productId: string | null;
|
|
207
208
|
/**
|
|
208
209
|
* ID of the product price to checkout.
|
|
209
210
|
*/
|
|
210
|
-
productPriceId: string;
|
|
211
|
+
productPriceId: string | null;
|
|
211
212
|
/**
|
|
212
213
|
* ID of the discount applied to the checkout.
|
|
213
214
|
*/
|
|
@@ -264,13 +265,13 @@ export type CheckoutPublicConfirmed = {
|
|
|
264
265
|
*/
|
|
265
266
|
products: Array<CheckoutProduct>;
|
|
266
267
|
/**
|
|
267
|
-
* Product
|
|
268
|
+
* Product selected to checkout.
|
|
268
269
|
*/
|
|
269
|
-
product: CheckoutProduct;
|
|
270
|
+
product: CheckoutProduct | null;
|
|
270
271
|
/**
|
|
271
272
|
* Price of the selected product.
|
|
272
273
|
*/
|
|
273
|
-
productPrice: LegacyRecurringProductPrice | ProductPrice;
|
|
274
|
+
productPrice: LegacyRecurringProductPrice | ProductPrice | null;
|
|
274
275
|
discount:
|
|
275
276
|
| CheckoutDiscountFixedRepeatDuration
|
|
276
277
|
| CheckoutDiscountFixedOnceForeverDuration
|
|
@@ -278,7 +279,7 @@ export type CheckoutPublicConfirmed = {
|
|
|
278
279
|
| CheckoutDiscountPercentageOnceForeverDuration
|
|
279
280
|
| null;
|
|
280
281
|
organization: Organization;
|
|
281
|
-
attachedCustomFields: Array<AttachedCustomField
|
|
282
|
+
attachedCustomFields: Array<AttachedCustomField> | null;
|
|
282
283
|
customerSessionToken: string;
|
|
283
284
|
};
|
|
284
285
|
|
|
@@ -517,8 +518,9 @@ export const CheckoutPublicConfirmed$inboundSchema: z.ZodType<
|
|
|
517
518
|
trial_end: z.nullable(
|
|
518
519
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
519
520
|
),
|
|
520
|
-
|
|
521
|
-
|
|
521
|
+
organization_id: z.string(),
|
|
522
|
+
product_id: z.nullable(z.string()),
|
|
523
|
+
product_price_id: z.nullable(z.string()),
|
|
522
524
|
discount_id: z.nullable(z.string()),
|
|
523
525
|
allow_discount_codes: z.boolean(),
|
|
524
526
|
require_billing_address: z.boolean(),
|
|
@@ -538,11 +540,13 @@ export const CheckoutPublicConfirmed$inboundSchema: z.ZodType<
|
|
|
538
540
|
payment_processor_metadata: z.record(z.string()),
|
|
539
541
|
billing_address_fields: CheckoutBillingAddressFields$inboundSchema,
|
|
540
542
|
products: z.array(CheckoutProduct$inboundSchema),
|
|
541
|
-
product: CheckoutProduct$inboundSchema,
|
|
542
|
-
product_price: z.
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
543
|
+
product: z.nullable(CheckoutProduct$inboundSchema),
|
|
544
|
+
product_price: z.nullable(
|
|
545
|
+
z.union([
|
|
546
|
+
LegacyRecurringProductPrice$inboundSchema,
|
|
547
|
+
ProductPrice$inboundSchema,
|
|
548
|
+
]),
|
|
549
|
+
),
|
|
546
550
|
discount: z.nullable(
|
|
547
551
|
z.union([
|
|
548
552
|
CheckoutDiscountFixedRepeatDuration$inboundSchema,
|
|
@@ -552,7 +556,9 @@ export const CheckoutPublicConfirmed$inboundSchema: z.ZodType<
|
|
|
552
556
|
]),
|
|
553
557
|
),
|
|
554
558
|
organization: Organization$inboundSchema,
|
|
555
|
-
attached_custom_fields: z.
|
|
559
|
+
attached_custom_fields: z.nullable(
|
|
560
|
+
z.array(AttachedCustomField$inboundSchema),
|
|
561
|
+
),
|
|
556
562
|
customer_session_token: z.string(),
|
|
557
563
|
}).transform((v) => {
|
|
558
564
|
return remap$(v, {
|
|
@@ -573,6 +579,7 @@ export const CheckoutPublicConfirmed$inboundSchema: z.ZodType<
|
|
|
573
579
|
"active_trial_interval": "activeTrialInterval",
|
|
574
580
|
"active_trial_interval_count": "activeTrialIntervalCount",
|
|
575
581
|
"trial_end": "trialEnd",
|
|
582
|
+
"organization_id": "organizationId",
|
|
576
583
|
"product_id": "productId",
|
|
577
584
|
"product_price_id": "productPriceId",
|
|
578
585
|
"discount_id": "discountId",
|
|
@@ -626,8 +633,9 @@ export type CheckoutPublicConfirmed$Outbound = {
|
|
|
626
633
|
active_trial_interval: string | null;
|
|
627
634
|
active_trial_interval_count: number | null;
|
|
628
635
|
trial_end: string | null;
|
|
629
|
-
|
|
630
|
-
|
|
636
|
+
organization_id: string;
|
|
637
|
+
product_id: string | null;
|
|
638
|
+
product_price_id: string | null;
|
|
631
639
|
discount_id: string | null;
|
|
632
640
|
allow_discount_codes: boolean;
|
|
633
641
|
require_billing_address: boolean;
|
|
@@ -647,8 +655,11 @@ export type CheckoutPublicConfirmed$Outbound = {
|
|
|
647
655
|
payment_processor_metadata: { [k: string]: string };
|
|
648
656
|
billing_address_fields: CheckoutBillingAddressFields$Outbound;
|
|
649
657
|
products: Array<CheckoutProduct$Outbound>;
|
|
650
|
-
product: CheckoutProduct$Outbound;
|
|
651
|
-
product_price:
|
|
658
|
+
product: CheckoutProduct$Outbound | null;
|
|
659
|
+
product_price:
|
|
660
|
+
| LegacyRecurringProductPrice$Outbound
|
|
661
|
+
| ProductPrice$Outbound
|
|
662
|
+
| null;
|
|
652
663
|
discount:
|
|
653
664
|
| CheckoutDiscountFixedRepeatDuration$Outbound
|
|
654
665
|
| CheckoutDiscountFixedOnceForeverDuration$Outbound
|
|
@@ -656,7 +667,7 @@ export type CheckoutPublicConfirmed$Outbound = {
|
|
|
656
667
|
| CheckoutDiscountPercentageOnceForeverDuration$Outbound
|
|
657
668
|
| null;
|
|
658
669
|
organization: Organization$Outbound;
|
|
659
|
-
attached_custom_fields: Array<AttachedCustomField$Outbound
|
|
670
|
+
attached_custom_fields: Array<AttachedCustomField$Outbound> | null;
|
|
660
671
|
customer_session_token: string;
|
|
661
672
|
};
|
|
662
673
|
|
|
@@ -698,8 +709,9 @@ export const CheckoutPublicConfirmed$outboundSchema: z.ZodType<
|
|
|
698
709
|
activeTrialInterval: z.nullable(TrialInterval$outboundSchema),
|
|
699
710
|
activeTrialIntervalCount: z.nullable(z.number().int()),
|
|
700
711
|
trialEnd: z.nullable(z.date().transform(v => v.toISOString())),
|
|
701
|
-
|
|
702
|
-
|
|
712
|
+
organizationId: z.string(),
|
|
713
|
+
productId: z.nullable(z.string()),
|
|
714
|
+
productPriceId: z.nullable(z.string()),
|
|
703
715
|
discountId: z.nullable(z.string()),
|
|
704
716
|
allowDiscountCodes: z.boolean(),
|
|
705
717
|
requireBillingAddress: z.boolean(),
|
|
@@ -719,11 +731,13 @@ export const CheckoutPublicConfirmed$outboundSchema: z.ZodType<
|
|
|
719
731
|
paymentProcessorMetadata: z.record(z.string()),
|
|
720
732
|
billingAddressFields: CheckoutBillingAddressFields$outboundSchema,
|
|
721
733
|
products: z.array(CheckoutProduct$outboundSchema),
|
|
722
|
-
product: CheckoutProduct$outboundSchema,
|
|
723
|
-
productPrice: z.
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
734
|
+
product: z.nullable(CheckoutProduct$outboundSchema),
|
|
735
|
+
productPrice: z.nullable(
|
|
736
|
+
z.union([
|
|
737
|
+
LegacyRecurringProductPrice$outboundSchema,
|
|
738
|
+
ProductPrice$outboundSchema,
|
|
739
|
+
]),
|
|
740
|
+
),
|
|
727
741
|
discount: z.nullable(
|
|
728
742
|
z.union([
|
|
729
743
|
CheckoutDiscountFixedRepeatDuration$outboundSchema,
|
|
@@ -733,7 +747,7 @@ export const CheckoutPublicConfirmed$outboundSchema: z.ZodType<
|
|
|
733
747
|
]),
|
|
734
748
|
),
|
|
735
749
|
organization: Organization$outboundSchema,
|
|
736
|
-
attachedCustomFields: z.array(AttachedCustomField$outboundSchema),
|
|
750
|
+
attachedCustomFields: z.nullable(z.array(AttachedCustomField$outboundSchema)),
|
|
737
751
|
customerSessionToken: z.string(),
|
|
738
752
|
}).transform((v) => {
|
|
739
753
|
return remap$(v, {
|
|
@@ -754,6 +768,7 @@ export const CheckoutPublicConfirmed$outboundSchema: z.ZodType<
|
|
|
754
768
|
activeTrialInterval: "active_trial_interval",
|
|
755
769
|
activeTrialIntervalCount: "active_trial_interval_count",
|
|
756
770
|
trialEnd: "trial_end",
|
|
771
|
+
organizationId: "organization_id",
|
|
757
772
|
productId: "product_id",
|
|
758
773
|
productPriceId: "product_price_id",
|
|
759
774
|
discountId: "discount_id",
|
|
@@ -0,0 +1,150 @@
|
|
|
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
|
+
Customer,
|
|
12
|
+
Customer$inboundSchema,
|
|
13
|
+
Customer$Outbound,
|
|
14
|
+
Customer$outboundSchema,
|
|
15
|
+
} from "./customer.js";
|
|
16
|
+
import {
|
|
17
|
+
CustomerCreatedMetadata,
|
|
18
|
+
CustomerCreatedMetadata$inboundSchema,
|
|
19
|
+
CustomerCreatedMetadata$Outbound,
|
|
20
|
+
CustomerCreatedMetadata$outboundSchema,
|
|
21
|
+
} from "./customercreatedmetadata.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* An event created by Polar when a customer is created.
|
|
25
|
+
*/
|
|
26
|
+
export type CustomerCreatedEvent = {
|
|
27
|
+
/**
|
|
28
|
+
* The ID of the object.
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* The timestamp of the event.
|
|
33
|
+
*/
|
|
34
|
+
timestamp: Date;
|
|
35
|
+
/**
|
|
36
|
+
* The ID of the organization owning the event.
|
|
37
|
+
*/
|
|
38
|
+
organizationId: string;
|
|
39
|
+
/**
|
|
40
|
+
* ID of the customer in your Polar organization associated with the event.
|
|
41
|
+
*/
|
|
42
|
+
customerId: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* The customer associated with the event.
|
|
45
|
+
*/
|
|
46
|
+
customer: Customer | null;
|
|
47
|
+
/**
|
|
48
|
+
* ID of the customer in your system associated with the event.
|
|
49
|
+
*/
|
|
50
|
+
externalCustomerId: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
|
|
53
|
+
*/
|
|
54
|
+
source: "system";
|
|
55
|
+
/**
|
|
56
|
+
* The name of the event.
|
|
57
|
+
*/
|
|
58
|
+
name: "customer.created";
|
|
59
|
+
metadata: CustomerCreatedMetadata;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export const CustomerCreatedEvent$inboundSchema: z.ZodType<
|
|
64
|
+
CustomerCreatedEvent,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
unknown
|
|
67
|
+
> = z.object({
|
|
68
|
+
id: z.string(),
|
|
69
|
+
timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
70
|
+
organization_id: z.string(),
|
|
71
|
+
customer_id: z.nullable(z.string()),
|
|
72
|
+
customer: z.nullable(Customer$inboundSchema),
|
|
73
|
+
external_customer_id: z.nullable(z.string()),
|
|
74
|
+
source: z.literal("system"),
|
|
75
|
+
name: z.literal("customer.created"),
|
|
76
|
+
metadata: CustomerCreatedMetadata$inboundSchema,
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
"organization_id": "organizationId",
|
|
80
|
+
"customer_id": "customerId",
|
|
81
|
+
"external_customer_id": "externalCustomerId",
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export type CustomerCreatedEvent$Outbound = {
|
|
87
|
+
id: string;
|
|
88
|
+
timestamp: string;
|
|
89
|
+
organization_id: string;
|
|
90
|
+
customer_id: string | null;
|
|
91
|
+
customer: Customer$Outbound | null;
|
|
92
|
+
external_customer_id: string | null;
|
|
93
|
+
source: "system";
|
|
94
|
+
name: "customer.created";
|
|
95
|
+
metadata: CustomerCreatedMetadata$Outbound;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const CustomerCreatedEvent$outboundSchema: z.ZodType<
|
|
100
|
+
CustomerCreatedEvent$Outbound,
|
|
101
|
+
z.ZodTypeDef,
|
|
102
|
+
CustomerCreatedEvent
|
|
103
|
+
> = z.object({
|
|
104
|
+
id: z.string(),
|
|
105
|
+
timestamp: z.date().transform(v => v.toISOString()),
|
|
106
|
+
organizationId: z.string(),
|
|
107
|
+
customerId: z.nullable(z.string()),
|
|
108
|
+
customer: z.nullable(Customer$outboundSchema),
|
|
109
|
+
externalCustomerId: z.nullable(z.string()),
|
|
110
|
+
source: z.literal("system"),
|
|
111
|
+
name: z.literal("customer.created"),
|
|
112
|
+
metadata: CustomerCreatedMetadata$outboundSchema,
|
|
113
|
+
}).transform((v) => {
|
|
114
|
+
return remap$(v, {
|
|
115
|
+
organizationId: "organization_id",
|
|
116
|
+
customerId: "customer_id",
|
|
117
|
+
externalCustomerId: "external_customer_id",
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @internal
|
|
123
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
124
|
+
*/
|
|
125
|
+
export namespace CustomerCreatedEvent$ {
|
|
126
|
+
/** @deprecated use `CustomerCreatedEvent$inboundSchema` instead. */
|
|
127
|
+
export const inboundSchema = CustomerCreatedEvent$inboundSchema;
|
|
128
|
+
/** @deprecated use `CustomerCreatedEvent$outboundSchema` instead. */
|
|
129
|
+
export const outboundSchema = CustomerCreatedEvent$outboundSchema;
|
|
130
|
+
/** @deprecated use `CustomerCreatedEvent$Outbound` instead. */
|
|
131
|
+
export type Outbound = CustomerCreatedEvent$Outbound;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function customerCreatedEventToJSON(
|
|
135
|
+
customerCreatedEvent: CustomerCreatedEvent,
|
|
136
|
+
): string {
|
|
137
|
+
return JSON.stringify(
|
|
138
|
+
CustomerCreatedEvent$outboundSchema.parse(customerCreatedEvent),
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function customerCreatedEventFromJSON(
|
|
143
|
+
jsonString: string,
|
|
144
|
+
): SafeParseResult<CustomerCreatedEvent, SDKValidationError> {
|
|
145
|
+
return safeParse(
|
|
146
|
+
jsonString,
|
|
147
|
+
(x) => CustomerCreatedEvent$inboundSchema.parse(JSON.parse(x)),
|
|
148
|
+
`Failed to parse 'CustomerCreatedEvent' from JSON`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
|
|
11
|
+
export type CustomerCreatedMetadata = {
|
|
12
|
+
customerId: string;
|
|
13
|
+
customerEmail: string;
|
|
14
|
+
customerName: string | null;
|
|
15
|
+
customerExternalId: string | null;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const CustomerCreatedMetadata$inboundSchema: z.ZodType<
|
|
20
|
+
CustomerCreatedMetadata,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
customer_id: z.string(),
|
|
25
|
+
customer_email: z.string(),
|
|
26
|
+
customer_name: z.nullable(z.string()),
|
|
27
|
+
customer_external_id: z.nullable(z.string()),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"customer_id": "customerId",
|
|
31
|
+
"customer_email": "customerEmail",
|
|
32
|
+
"customer_name": "customerName",
|
|
33
|
+
"customer_external_id": "customerExternalId",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type CustomerCreatedMetadata$Outbound = {
|
|
39
|
+
customer_id: string;
|
|
40
|
+
customer_email: string;
|
|
41
|
+
customer_name: string | null;
|
|
42
|
+
customer_external_id: string | null;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const CustomerCreatedMetadata$outboundSchema: z.ZodType<
|
|
47
|
+
CustomerCreatedMetadata$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
CustomerCreatedMetadata
|
|
50
|
+
> = z.object({
|
|
51
|
+
customerId: z.string(),
|
|
52
|
+
customerEmail: z.string(),
|
|
53
|
+
customerName: z.nullable(z.string()),
|
|
54
|
+
customerExternalId: z.nullable(z.string()),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
customerId: "customer_id",
|
|
58
|
+
customerEmail: "customer_email",
|
|
59
|
+
customerName: "customer_name",
|
|
60
|
+
customerExternalId: "customer_external_id",
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
+
*/
|
|
68
|
+
export namespace CustomerCreatedMetadata$ {
|
|
69
|
+
/** @deprecated use `CustomerCreatedMetadata$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema = CustomerCreatedMetadata$inboundSchema;
|
|
71
|
+
/** @deprecated use `CustomerCreatedMetadata$outboundSchema` instead. */
|
|
72
|
+
export const outboundSchema = CustomerCreatedMetadata$outboundSchema;
|
|
73
|
+
/** @deprecated use `CustomerCreatedMetadata$Outbound` instead. */
|
|
74
|
+
export type Outbound = CustomerCreatedMetadata$Outbound;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function customerCreatedMetadataToJSON(
|
|
78
|
+
customerCreatedMetadata: CustomerCreatedMetadata,
|
|
79
|
+
): string {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
CustomerCreatedMetadata$outboundSchema.parse(customerCreatedMetadata),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function customerCreatedMetadataFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<CustomerCreatedMetadata, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) => CustomerCreatedMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
91
|
+
`Failed to parse 'CustomerCreatedMetadata' from JSON`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
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
|
+
Customer,
|
|
12
|
+
Customer$inboundSchema,
|
|
13
|
+
Customer$Outbound,
|
|
14
|
+
Customer$outboundSchema,
|
|
15
|
+
} from "./customer.js";
|
|
16
|
+
import {
|
|
17
|
+
CustomerDeletedMetadata,
|
|
18
|
+
CustomerDeletedMetadata$inboundSchema,
|
|
19
|
+
CustomerDeletedMetadata$Outbound,
|
|
20
|
+
CustomerDeletedMetadata$outboundSchema,
|
|
21
|
+
} from "./customerdeletedmetadata.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* An event created by Polar when a customer is deleted.
|
|
25
|
+
*/
|
|
26
|
+
export type CustomerDeletedEvent = {
|
|
27
|
+
/**
|
|
28
|
+
* The ID of the object.
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* The timestamp of the event.
|
|
33
|
+
*/
|
|
34
|
+
timestamp: Date;
|
|
35
|
+
/**
|
|
36
|
+
* The ID of the organization owning the event.
|
|
37
|
+
*/
|
|
38
|
+
organizationId: string;
|
|
39
|
+
/**
|
|
40
|
+
* ID of the customer in your Polar organization associated with the event.
|
|
41
|
+
*/
|
|
42
|
+
customerId: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* The customer associated with the event.
|
|
45
|
+
*/
|
|
46
|
+
customer: Customer | null;
|
|
47
|
+
/**
|
|
48
|
+
* ID of the customer in your system associated with the event.
|
|
49
|
+
*/
|
|
50
|
+
externalCustomerId: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
|
|
53
|
+
*/
|
|
54
|
+
source: "system";
|
|
55
|
+
/**
|
|
56
|
+
* The name of the event.
|
|
57
|
+
*/
|
|
58
|
+
name: "customer.deleted";
|
|
59
|
+
metadata: CustomerDeletedMetadata;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export const CustomerDeletedEvent$inboundSchema: z.ZodType<
|
|
64
|
+
CustomerDeletedEvent,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
unknown
|
|
67
|
+
> = z.object({
|
|
68
|
+
id: z.string(),
|
|
69
|
+
timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
70
|
+
organization_id: z.string(),
|
|
71
|
+
customer_id: z.nullable(z.string()),
|
|
72
|
+
customer: z.nullable(Customer$inboundSchema),
|
|
73
|
+
external_customer_id: z.nullable(z.string()),
|
|
74
|
+
source: z.literal("system"),
|
|
75
|
+
name: z.literal("customer.deleted"),
|
|
76
|
+
metadata: CustomerDeletedMetadata$inboundSchema,
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
"organization_id": "organizationId",
|
|
80
|
+
"customer_id": "customerId",
|
|
81
|
+
"external_customer_id": "externalCustomerId",
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export type CustomerDeletedEvent$Outbound = {
|
|
87
|
+
id: string;
|
|
88
|
+
timestamp: string;
|
|
89
|
+
organization_id: string;
|
|
90
|
+
customer_id: string | null;
|
|
91
|
+
customer: Customer$Outbound | null;
|
|
92
|
+
external_customer_id: string | null;
|
|
93
|
+
source: "system";
|
|
94
|
+
name: "customer.deleted";
|
|
95
|
+
metadata: CustomerDeletedMetadata$Outbound;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const CustomerDeletedEvent$outboundSchema: z.ZodType<
|
|
100
|
+
CustomerDeletedEvent$Outbound,
|
|
101
|
+
z.ZodTypeDef,
|
|
102
|
+
CustomerDeletedEvent
|
|
103
|
+
> = z.object({
|
|
104
|
+
id: z.string(),
|
|
105
|
+
timestamp: z.date().transform(v => v.toISOString()),
|
|
106
|
+
organizationId: z.string(),
|
|
107
|
+
customerId: z.nullable(z.string()),
|
|
108
|
+
customer: z.nullable(Customer$outboundSchema),
|
|
109
|
+
externalCustomerId: z.nullable(z.string()),
|
|
110
|
+
source: z.literal("system"),
|
|
111
|
+
name: z.literal("customer.deleted"),
|
|
112
|
+
metadata: CustomerDeletedMetadata$outboundSchema,
|
|
113
|
+
}).transform((v) => {
|
|
114
|
+
return remap$(v, {
|
|
115
|
+
organizationId: "organization_id",
|
|
116
|
+
customerId: "customer_id",
|
|
117
|
+
externalCustomerId: "external_customer_id",
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @internal
|
|
123
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
124
|
+
*/
|
|
125
|
+
export namespace CustomerDeletedEvent$ {
|
|
126
|
+
/** @deprecated use `CustomerDeletedEvent$inboundSchema` instead. */
|
|
127
|
+
export const inboundSchema = CustomerDeletedEvent$inboundSchema;
|
|
128
|
+
/** @deprecated use `CustomerDeletedEvent$outboundSchema` instead. */
|
|
129
|
+
export const outboundSchema = CustomerDeletedEvent$outboundSchema;
|
|
130
|
+
/** @deprecated use `CustomerDeletedEvent$Outbound` instead. */
|
|
131
|
+
export type Outbound = CustomerDeletedEvent$Outbound;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function customerDeletedEventToJSON(
|
|
135
|
+
customerDeletedEvent: CustomerDeletedEvent,
|
|
136
|
+
): string {
|
|
137
|
+
return JSON.stringify(
|
|
138
|
+
CustomerDeletedEvent$outboundSchema.parse(customerDeletedEvent),
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function customerDeletedEventFromJSON(
|
|
143
|
+
jsonString: string,
|
|
144
|
+
): SafeParseResult<CustomerDeletedEvent, SDKValidationError> {
|
|
145
|
+
return safeParse(
|
|
146
|
+
jsonString,
|
|
147
|
+
(x) => CustomerDeletedEvent$inboundSchema.parse(JSON.parse(x)),
|
|
148
|
+
`Failed to parse 'CustomerDeletedEvent' from JSON`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
|
|
11
|
+
export type CustomerDeletedMetadata = {
|
|
12
|
+
customerId: string;
|
|
13
|
+
customerEmail: string;
|
|
14
|
+
customerName: string | null;
|
|
15
|
+
customerExternalId: string | null;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const CustomerDeletedMetadata$inboundSchema: z.ZodType<
|
|
20
|
+
CustomerDeletedMetadata,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
customer_id: z.string(),
|
|
25
|
+
customer_email: z.string(),
|
|
26
|
+
customer_name: z.nullable(z.string()),
|
|
27
|
+
customer_external_id: z.nullable(z.string()),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"customer_id": "customerId",
|
|
31
|
+
"customer_email": "customerEmail",
|
|
32
|
+
"customer_name": "customerName",
|
|
33
|
+
"customer_external_id": "customerExternalId",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type CustomerDeletedMetadata$Outbound = {
|
|
39
|
+
customer_id: string;
|
|
40
|
+
customer_email: string;
|
|
41
|
+
customer_name: string | null;
|
|
42
|
+
customer_external_id: string | null;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const CustomerDeletedMetadata$outboundSchema: z.ZodType<
|
|
47
|
+
CustomerDeletedMetadata$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
CustomerDeletedMetadata
|
|
50
|
+
> = z.object({
|
|
51
|
+
customerId: z.string(),
|
|
52
|
+
customerEmail: z.string(),
|
|
53
|
+
customerName: z.nullable(z.string()),
|
|
54
|
+
customerExternalId: z.nullable(z.string()),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
customerId: "customer_id",
|
|
58
|
+
customerEmail: "customer_email",
|
|
59
|
+
customerName: "customer_name",
|
|
60
|
+
customerExternalId: "customer_external_id",
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
+
*/
|
|
68
|
+
export namespace CustomerDeletedMetadata$ {
|
|
69
|
+
/** @deprecated use `CustomerDeletedMetadata$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema = CustomerDeletedMetadata$inboundSchema;
|
|
71
|
+
/** @deprecated use `CustomerDeletedMetadata$outboundSchema` instead. */
|
|
72
|
+
export const outboundSchema = CustomerDeletedMetadata$outboundSchema;
|
|
73
|
+
/** @deprecated use `CustomerDeletedMetadata$Outbound` instead. */
|
|
74
|
+
export type Outbound = CustomerDeletedMetadata$Outbound;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function customerDeletedMetadataToJSON(
|
|
78
|
+
customerDeletedMetadata: CustomerDeletedMetadata,
|
|
79
|
+
): string {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
CustomerDeletedMetadata$outboundSchema.parse(customerDeletedMetadata),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function customerDeletedMetadataFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<CustomerDeletedMetadata, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) => CustomerDeletedMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
91
|
+
`Failed to parse 'CustomerDeletedMetadata' from JSON`,
|
|
92
|
+
);
|
|
93
|
+
}
|