@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
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Wallets
|
|
2
|
+
(*wallets*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [list](#list) - List Wallets
|
|
9
|
+
* [get](#get) - Get Wallet
|
|
10
|
+
* [topUp](#topup) - Top-Up Wallet
|
|
11
|
+
|
|
12
|
+
## list
|
|
13
|
+
|
|
14
|
+
List wallets.
|
|
15
|
+
|
|
16
|
+
**Scopes**: `wallets:read`
|
|
17
|
+
|
|
18
|
+
### Example Usage
|
|
19
|
+
|
|
20
|
+
<!-- UsageSnippet language="typescript" operationID="wallets:list" method="get" path="/v1/wallets/" -->
|
|
21
|
+
```typescript
|
|
22
|
+
import { Polar } from "@polar-sh/sdk";
|
|
23
|
+
|
|
24
|
+
const polar = new Polar({
|
|
25
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
async function run() {
|
|
29
|
+
const result = await polar.wallets.list({
|
|
30
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
for await (const page of result) {
|
|
34
|
+
console.log(page);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
run();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Standalone function
|
|
42
|
+
|
|
43
|
+
The standalone function version of this method:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
47
|
+
import { walletsList } from "@polar-sh/sdk/funcs/walletsList.js";
|
|
48
|
+
|
|
49
|
+
// Use `PolarCore` for best tree-shaking performance.
|
|
50
|
+
// You can create one instance of it to use across an application.
|
|
51
|
+
const polar = new PolarCore({
|
|
52
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
async function run() {
|
|
56
|
+
const res = await walletsList(polar, {
|
|
57
|
+
organizationId: "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
|
|
58
|
+
});
|
|
59
|
+
if (res.ok) {
|
|
60
|
+
const { value: result } = res;
|
|
61
|
+
for await (const page of result) {
|
|
62
|
+
console.log(page);
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
console.log("walletsList failed:", res.error);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
run();
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Parameters
|
|
73
|
+
|
|
74
|
+
| Parameter | Type | Required | Description |
|
|
75
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
76
|
+
| `request` | [operations.WalletsListRequest](../../models/operations/walletslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
77
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
78
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
79
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
80
|
+
|
|
81
|
+
### Response
|
|
82
|
+
|
|
83
|
+
**Promise\<[operations.WalletsListResponse](../../models/operations/walletslistresponse.md)\>**
|
|
84
|
+
|
|
85
|
+
### Errors
|
|
86
|
+
|
|
87
|
+
| Error Type | Status Code | Content Type |
|
|
88
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
89
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
90
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
91
|
+
|
|
92
|
+
## get
|
|
93
|
+
|
|
94
|
+
Get a wallet by ID.
|
|
95
|
+
|
|
96
|
+
**Scopes**: `wallets:read`
|
|
97
|
+
|
|
98
|
+
### Example Usage
|
|
99
|
+
|
|
100
|
+
<!-- UsageSnippet language="typescript" operationID="wallets:get" method="get" path="/v1/wallets/{id}" -->
|
|
101
|
+
```typescript
|
|
102
|
+
import { Polar } from "@polar-sh/sdk";
|
|
103
|
+
|
|
104
|
+
const polar = new Polar({
|
|
105
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
async function run() {
|
|
109
|
+
const result = await polar.wallets.get({
|
|
110
|
+
id: "<value>",
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
console.log(result);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
run();
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Standalone function
|
|
120
|
+
|
|
121
|
+
The standalone function version of this method:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
125
|
+
import { walletsGet } from "@polar-sh/sdk/funcs/walletsGet.js";
|
|
126
|
+
|
|
127
|
+
// Use `PolarCore` for best tree-shaking performance.
|
|
128
|
+
// You can create one instance of it to use across an application.
|
|
129
|
+
const polar = new PolarCore({
|
|
130
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
async function run() {
|
|
134
|
+
const res = await walletsGet(polar, {
|
|
135
|
+
id: "<value>",
|
|
136
|
+
});
|
|
137
|
+
if (res.ok) {
|
|
138
|
+
const { value: result } = res;
|
|
139
|
+
console.log(result);
|
|
140
|
+
} else {
|
|
141
|
+
console.log("walletsGet failed:", res.error);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
run();
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Parameters
|
|
149
|
+
|
|
150
|
+
| Parameter | Type | Required | Description |
|
|
151
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
152
|
+
| `request` | [operations.WalletsGetRequest](../../models/operations/walletsgetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
153
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
154
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
155
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
156
|
+
|
|
157
|
+
### Response
|
|
158
|
+
|
|
159
|
+
**Promise\<[components.Wallet](../../models/components/wallet.md)\>**
|
|
160
|
+
|
|
161
|
+
### Errors
|
|
162
|
+
|
|
163
|
+
| Error Type | Status Code | Content Type |
|
|
164
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
165
|
+
| errors.ResourceNotFound | 404 | application/json |
|
|
166
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
167
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
168
|
+
|
|
169
|
+
## topUp
|
|
170
|
+
|
|
171
|
+
Top-up a wallet by adding funds to its balance.
|
|
172
|
+
|
|
173
|
+
The customer should have a valid payment method on file.
|
|
174
|
+
|
|
175
|
+
**Scopes**: `wallets:write`
|
|
176
|
+
|
|
177
|
+
### Example Usage
|
|
178
|
+
|
|
179
|
+
<!-- UsageSnippet language="typescript" operationID="wallets:top_up" method="post" path="/v1/wallets/{id}/top-up" -->
|
|
180
|
+
```typescript
|
|
181
|
+
import { Polar } from "@polar-sh/sdk";
|
|
182
|
+
|
|
183
|
+
const polar = new Polar({
|
|
184
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
async function run() {
|
|
188
|
+
const result = await polar.wallets.topUp({
|
|
189
|
+
id: "<value>",
|
|
190
|
+
walletTopUpCreate: {
|
|
191
|
+
amount: 2000,
|
|
192
|
+
currency: "Venezuelan bolívar",
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
console.log(result);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
run();
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Standalone function
|
|
203
|
+
|
|
204
|
+
The standalone function version of this method:
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
208
|
+
import { walletsTopUp } from "@polar-sh/sdk/funcs/walletsTopUp.js";
|
|
209
|
+
|
|
210
|
+
// Use `PolarCore` for best tree-shaking performance.
|
|
211
|
+
// You can create one instance of it to use across an application.
|
|
212
|
+
const polar = new PolarCore({
|
|
213
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
async function run() {
|
|
217
|
+
const res = await walletsTopUp(polar, {
|
|
218
|
+
id: "<value>",
|
|
219
|
+
walletTopUpCreate: {
|
|
220
|
+
amount: 2000,
|
|
221
|
+
currency: "Venezuelan bolívar",
|
|
222
|
+
},
|
|
223
|
+
});
|
|
224
|
+
if (res.ok) {
|
|
225
|
+
const { value: result } = res;
|
|
226
|
+
console.log(result);
|
|
227
|
+
} else {
|
|
228
|
+
console.log("walletsTopUp failed:", res.error);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
run();
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Parameters
|
|
236
|
+
|
|
237
|
+
| Parameter | Type | Required | Description |
|
|
238
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
239
|
+
| `request` | [operations.WalletsTopUpRequest](../../models/operations/walletstopuprequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
240
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
241
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
242
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
243
|
+
|
|
244
|
+
### Response
|
|
245
|
+
|
|
246
|
+
**Promise\<[components.Wallet](../../models/components/wallet.md)\>**
|
|
247
|
+
|
|
248
|
+
### Errors
|
|
249
|
+
|
|
250
|
+
| Error Type | Status Code | Content Type |
|
|
251
|
+
| -------------------------------- | -------------------------------- | -------------------------------- |
|
|
252
|
+
| errors.PaymentIntentFailedError | 400 | application/json |
|
|
253
|
+
| errors.MissingPaymentMethodError | 402 | application/json |
|
|
254
|
+
| errors.ResourceNotFound | 404 | application/json |
|
|
255
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
256
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -123,7 +123,6 @@ async function $do(
|
|
|
123
123
|
"checkout_id": payload.checkout_id,
|
|
124
124
|
"limit": payload.limit,
|
|
125
125
|
"order_id": payload.order_id,
|
|
126
|
-
"organization_id": payload.organization_id,
|
|
127
126
|
"page": payload.page,
|
|
128
127
|
"sorting": payload.sorting,
|
|
129
128
|
"subscription_id": payload.subscription_id,
|
|
@@ -119,7 +119,6 @@ async function $do(
|
|
|
119
119
|
|
|
120
120
|
const query = encodeFormQuery({
|
|
121
121
|
"limit": payload.limit,
|
|
122
|
-
"organization_id": payload.organization_id,
|
|
123
122
|
"page": payload.page,
|
|
124
123
|
"product_billing_type": payload.product_billing_type,
|
|
125
124
|
"product_id": payload.product_id,
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { PolarCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { resolveSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
CustomerWallet,
|
|
15
|
+
CustomerWallet$inboundSchema,
|
|
16
|
+
} from "../models/components/customerwallet.js";
|
|
17
|
+
import {
|
|
18
|
+
ConnectionError,
|
|
19
|
+
InvalidRequestError,
|
|
20
|
+
RequestAbortedError,
|
|
21
|
+
RequestTimeoutError,
|
|
22
|
+
UnexpectedClientError,
|
|
23
|
+
} from "../models/errors/httpclienterrors.js";
|
|
24
|
+
import {
|
|
25
|
+
HTTPValidationError,
|
|
26
|
+
HTTPValidationError$inboundSchema,
|
|
27
|
+
} from "../models/errors/httpvalidationerror.js";
|
|
28
|
+
import { PolarError } from "../models/errors/polarerror.js";
|
|
29
|
+
import {
|
|
30
|
+
ResourceNotFound,
|
|
31
|
+
ResourceNotFound$inboundSchema,
|
|
32
|
+
} from "../models/errors/resourcenotfound.js";
|
|
33
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
34
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
35
|
+
import {
|
|
36
|
+
CustomerPortalWalletsGetRequest,
|
|
37
|
+
CustomerPortalWalletsGetRequest$outboundSchema,
|
|
38
|
+
CustomerPortalWalletsGetSecurity,
|
|
39
|
+
} from "../models/operations/customerportalwalletsget.js";
|
|
40
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
41
|
+
import { Result } from "../types/fp.js";
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get Wallet
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Get a wallet by ID for the authenticated customer.
|
|
48
|
+
*
|
|
49
|
+
* **Scopes**: `customer_portal:read` `customer_portal:write`
|
|
50
|
+
*/
|
|
51
|
+
export function customerPortalWalletsGet(
|
|
52
|
+
client: PolarCore,
|
|
53
|
+
security: CustomerPortalWalletsGetSecurity,
|
|
54
|
+
request: CustomerPortalWalletsGetRequest,
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): APIPromise<
|
|
57
|
+
Result<
|
|
58
|
+
CustomerWallet,
|
|
59
|
+
| ResourceNotFound
|
|
60
|
+
| HTTPValidationError
|
|
61
|
+
| PolarError
|
|
62
|
+
| ResponseValidationError
|
|
63
|
+
| ConnectionError
|
|
64
|
+
| RequestAbortedError
|
|
65
|
+
| RequestTimeoutError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| UnexpectedClientError
|
|
68
|
+
| SDKValidationError
|
|
69
|
+
>
|
|
70
|
+
> {
|
|
71
|
+
return new APIPromise($do(
|
|
72
|
+
client,
|
|
73
|
+
security,
|
|
74
|
+
request,
|
|
75
|
+
options,
|
|
76
|
+
));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async function $do(
|
|
80
|
+
client: PolarCore,
|
|
81
|
+
security: CustomerPortalWalletsGetSecurity,
|
|
82
|
+
request: CustomerPortalWalletsGetRequest,
|
|
83
|
+
options?: RequestOptions,
|
|
84
|
+
): Promise<
|
|
85
|
+
[
|
|
86
|
+
Result<
|
|
87
|
+
CustomerWallet,
|
|
88
|
+
| ResourceNotFound
|
|
89
|
+
| HTTPValidationError
|
|
90
|
+
| PolarError
|
|
91
|
+
| ResponseValidationError
|
|
92
|
+
| ConnectionError
|
|
93
|
+
| RequestAbortedError
|
|
94
|
+
| RequestTimeoutError
|
|
95
|
+
| InvalidRequestError
|
|
96
|
+
| UnexpectedClientError
|
|
97
|
+
| SDKValidationError
|
|
98
|
+
>,
|
|
99
|
+
APICall,
|
|
100
|
+
]
|
|
101
|
+
> {
|
|
102
|
+
const parsed = safeParse(
|
|
103
|
+
request,
|
|
104
|
+
(value) => CustomerPortalWalletsGetRequest$outboundSchema.parse(value),
|
|
105
|
+
"Input validation failed",
|
|
106
|
+
);
|
|
107
|
+
if (!parsed.ok) {
|
|
108
|
+
return [parsed, { status: "invalid" }];
|
|
109
|
+
}
|
|
110
|
+
const payload = parsed.value;
|
|
111
|
+
const body = null;
|
|
112
|
+
|
|
113
|
+
const pathParams = {
|
|
114
|
+
id: encodeSimple("id", payload.id, {
|
|
115
|
+
explode: false,
|
|
116
|
+
charEncoding: "percent",
|
|
117
|
+
}),
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const path = pathToFunc("/v1/customer-portal/wallets/{id}")(pathParams);
|
|
121
|
+
|
|
122
|
+
const headers = new Headers(compactMap({
|
|
123
|
+
Accept: "application/json",
|
|
124
|
+
}));
|
|
125
|
+
|
|
126
|
+
const requestSecurity = resolveSecurity(
|
|
127
|
+
[
|
|
128
|
+
{
|
|
129
|
+
fieldName: "Authorization",
|
|
130
|
+
type: "http:bearer",
|
|
131
|
+
value: security?.customerSession,
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
const context = {
|
|
137
|
+
options: client._options,
|
|
138
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
139
|
+
operationID: "customer_portal:wallets:get",
|
|
140
|
+
oAuth2Scopes: null,
|
|
141
|
+
|
|
142
|
+
resolvedSecurity: requestSecurity,
|
|
143
|
+
|
|
144
|
+
securitySource: security,
|
|
145
|
+
retryConfig: options?.retries
|
|
146
|
+
|| client._options.retryConfig
|
|
147
|
+
|| { strategy: "none" },
|
|
148
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const requestRes = client._createRequest(context, {
|
|
152
|
+
security: requestSecurity,
|
|
153
|
+
method: "GET",
|
|
154
|
+
baseURL: options?.serverURL,
|
|
155
|
+
path: path,
|
|
156
|
+
headers: headers,
|
|
157
|
+
body: body,
|
|
158
|
+
userAgent: client._options.userAgent,
|
|
159
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
160
|
+
}, options);
|
|
161
|
+
if (!requestRes.ok) {
|
|
162
|
+
return [requestRes, { status: "invalid" }];
|
|
163
|
+
}
|
|
164
|
+
const req = requestRes.value;
|
|
165
|
+
|
|
166
|
+
const doResult = await client._do(req, {
|
|
167
|
+
context,
|
|
168
|
+
errorCodes: ["404", "422", "4XX", "5XX"],
|
|
169
|
+
retryConfig: context.retryConfig,
|
|
170
|
+
retryCodes: context.retryCodes,
|
|
171
|
+
});
|
|
172
|
+
if (!doResult.ok) {
|
|
173
|
+
return [doResult, { status: "request-error", request: req }];
|
|
174
|
+
}
|
|
175
|
+
const response = doResult.value;
|
|
176
|
+
|
|
177
|
+
const responseFields = {
|
|
178
|
+
HttpMeta: { Response: response, Request: req },
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
const [result] = await M.match<
|
|
182
|
+
CustomerWallet,
|
|
183
|
+
| ResourceNotFound
|
|
184
|
+
| HTTPValidationError
|
|
185
|
+
| PolarError
|
|
186
|
+
| ResponseValidationError
|
|
187
|
+
| ConnectionError
|
|
188
|
+
| RequestAbortedError
|
|
189
|
+
| RequestTimeoutError
|
|
190
|
+
| InvalidRequestError
|
|
191
|
+
| UnexpectedClientError
|
|
192
|
+
| SDKValidationError
|
|
193
|
+
>(
|
|
194
|
+
M.json(200, CustomerWallet$inboundSchema),
|
|
195
|
+
M.jsonErr(404, ResourceNotFound$inboundSchema),
|
|
196
|
+
M.jsonErr(422, HTTPValidationError$inboundSchema),
|
|
197
|
+
M.fail("4XX"),
|
|
198
|
+
M.fail("5XX"),
|
|
199
|
+
)(response, req, { extraFields: responseFields });
|
|
200
|
+
if (!result.ok) {
|
|
201
|
+
return [result, { status: "complete", request: req, response }];
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return [result, { status: "complete", request: req, response }];
|
|
205
|
+
}
|