@polar-sh/sdk 0.46.7 → 0.47.0
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 +29 -19
- package/dist/commonjs/funcs/metricsCreateDashboard.d.ts +21 -0
- package/dist/commonjs/funcs/metricsCreateDashboard.d.ts.map +1 -0
- package/dist/commonjs/funcs/metricsCreateDashboard.js +122 -0
- package/dist/commonjs/funcs/metricsCreateDashboard.js.map +1 -0
- package/dist/commonjs/funcs/metricsDeleteDashboard.d.ts +20 -0
- package/dist/commonjs/funcs/metricsDeleteDashboard.d.ts.map +1 -0
- package/dist/commonjs/funcs/metricsDeleteDashboard.js +126 -0
- package/dist/commonjs/funcs/metricsDeleteDashboard.js.map +1 -0
- package/dist/commonjs/funcs/metricsGetDashboard.d.ts +21 -0
- package/dist/commonjs/funcs/metricsGetDashboard.d.ts.map +1 -0
- package/dist/commonjs/funcs/metricsGetDashboard.js +127 -0
- package/dist/commonjs/funcs/metricsGetDashboard.js.map +1 -0
- package/dist/commonjs/funcs/metricsListDashboards.d.ts +21 -0
- package/dist/commonjs/funcs/metricsListDashboards.d.ts.map +1 -0
- package/dist/commonjs/funcs/metricsListDashboards.js +125 -0
- package/dist/commonjs/funcs/metricsListDashboards.js.map +1 -0
- package/dist/commonjs/funcs/metricsUpdateDashboard.d.ts +21 -0
- package/dist/commonjs/funcs/metricsUpdateDashboard.d.ts.map +1 -0
- package/dist/commonjs/funcs/metricsUpdateDashboard.js +130 -0
- package/dist/commonjs/funcs/metricsUpdateDashboard.js.map +1 -0
- package/dist/commonjs/funcs/subscriptionsList.js +3 -0
- package/dist/commonjs/funcs/subscriptionsList.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +19 -8
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/models/components/availablescope.d.ts +1 -0
- package/dist/commonjs/models/components/availablescope.d.ts.map +1 -1
- package/dist/commonjs/models/components/availablescope.js +1 -0
- package/dist/commonjs/models/components/availablescope.js.map +1 -1
- package/dist/commonjs/models/components/benefitgrant.d.ts +0 -3
- package/dist/commonjs/models/components/benefitgrant.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgrant.js.map +1 -1
- package/dist/commonjs/models/components/benefitgrantcustomwebhook.d.ts +0 -3
- package/dist/commonjs/models/components/benefitgrantcustomwebhook.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgrantcustomwebhook.js.map +1 -1
- package/dist/commonjs/models/components/benefitgrantdiscordwebhook.d.ts +0 -3
- package/dist/commonjs/models/components/benefitgrantdiscordwebhook.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgrantdiscordwebhook.js.map +1 -1
- package/dist/commonjs/models/components/benefitgrantdownloadableswebhook.d.ts +0 -3
- package/dist/commonjs/models/components/benefitgrantdownloadableswebhook.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgrantdownloadableswebhook.js.map +1 -1
- package/dist/commonjs/models/components/benefitgrantfeatureflagwebhook.d.ts +0 -3
- package/dist/commonjs/models/components/benefitgrantfeatureflagwebhook.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgrantfeatureflagwebhook.js.map +1 -1
- package/dist/commonjs/models/components/benefitgrantgithubrepositorywebhook.d.ts +0 -3
- package/dist/commonjs/models/components/benefitgrantgithubrepositorywebhook.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgrantgithubrepositorywebhook.js.map +1 -1
- package/dist/commonjs/models/components/benefitgrantlicensekeyswebhook.d.ts +0 -3
- package/dist/commonjs/models/components/benefitgrantlicensekeyswebhook.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgrantlicensekeyswebhook.js.map +1 -1
- package/dist/commonjs/models/components/benefitgrantmetercreditwebhook.d.ts +0 -3
- package/dist/commonjs/models/components/benefitgrantmetercreditwebhook.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitgrantmetercreditwebhook.js.map +1 -1
- package/dist/commonjs/models/components/customer.d.ts +4 -84
- package/dist/commonjs/models/components/customer.d.ts.map +1 -1
- package/dist/commonjs/models/components/customer.js +5 -77
- package/dist/commonjs/models/components/customer.js.map +1 -1
- package/dist/commonjs/models/components/customercreate.d.ts +4 -67
- package/dist/commonjs/models/components/customercreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customercreate.js +7 -64
- package/dist/commonjs/models/components/customercreate.js.map +1 -1
- package/dist/commonjs/models/components/customercreatedmetadata.d.ts +1 -1
- package/dist/commonjs/models/components/customercreatedmetadata.d.ts.map +1 -1
- package/dist/commonjs/models/components/customercreatedmetadata.js +1 -1
- package/dist/commonjs/models/components/customercreatedmetadata.js.map +1 -1
- package/dist/commonjs/models/components/customerdeletedmetadata.d.ts +1 -1
- package/dist/commonjs/models/components/customerdeletedmetadata.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerdeletedmetadata.js +1 -1
- package/dist/commonjs/models/components/customerdeletedmetadata.js.map +1 -1
- package/dist/commonjs/models/components/customerindividual.d.ts +94 -0
- package/dist/commonjs/models/components/customerindividual.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerindividual.js +127 -0
- package/dist/commonjs/models/components/customerindividual.js.map +1 -0
- package/dist/commonjs/models/components/customerindividualcreate.d.ts +69 -0
- package/dist/commonjs/models/components/customerindividualcreate.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerindividualcreate.js +75 -0
- package/dist/commonjs/models/components/customerindividualcreate.js.map +1 -0
- package/dist/commonjs/models/components/customermeter.d.ts +0 -3
- package/dist/commonjs/models/components/customermeter.d.ts.map +1 -1
- package/dist/commonjs/models/components/customermeter.js.map +1 -1
- package/dist/commonjs/models/components/customerportalcustomer.d.ts +1 -1
- package/dist/commonjs/models/components/customerportalcustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerportalcustomer.js +1 -1
- package/dist/commonjs/models/components/customerportalcustomer.js.map +1 -1
- package/dist/commonjs/models/components/customersession.d.ts +0 -3
- package/dist/commonjs/models/components/customersession.d.ts.map +1 -1
- package/dist/commonjs/models/components/customersession.js.map +1 -1
- package/dist/commonjs/models/components/customerstate.d.ts +4 -108
- package/dist/commonjs/models/components/customerstate.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerstate.js +11 -92
- package/dist/commonjs/models/components/customerstate.js.map +1 -1
- package/dist/commonjs/models/components/customerstateindividual.d.ts +118 -0
- package/dist/commonjs/models/components/customerstateindividual.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerstateindividual.js +142 -0
- package/dist/commonjs/models/components/customerstateindividual.js.map +1 -0
- package/dist/commonjs/models/components/customerstateteam.d.ts +118 -0
- package/dist/commonjs/models/components/customerstateteam.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerstateteam.js +142 -0
- package/dist/commonjs/models/components/customerstateteam.js.map +1 -0
- package/dist/commonjs/models/components/customerteam.d.ts +94 -0
- package/dist/commonjs/models/components/customerteam.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerteam.js +127 -0
- package/dist/commonjs/models/components/customerteam.js.map +1 -0
- package/dist/commonjs/models/components/customerteamcreate.d.ts +69 -0
- package/dist/commonjs/models/components/customerteamcreate.d.ts.map +1 -0
- package/dist/commonjs/models/components/customerteamcreate.js +75 -0
- package/dist/commonjs/models/components/customerteamcreate.js.map +1 -0
- package/dist/commonjs/models/components/customerupdatedmetadata.d.ts +1 -1
- package/dist/commonjs/models/components/customerupdatedmetadata.d.ts.map +1 -1
- package/dist/commonjs/models/components/customerupdatedmetadata.js +1 -1
- package/dist/commonjs/models/components/customerupdatedmetadata.js.map +1 -1
- package/dist/commonjs/models/components/licensekeycustomer.d.ts +2 -5
- package/dist/commonjs/models/components/licensekeycustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/licensekeycustomer.js +2 -2
- package/dist/commonjs/models/components/licensekeycustomer.js.map +1 -1
- package/dist/commonjs/models/components/{listresource.d.ts → listresourcepayment.d.ts} +4 -4
- package/dist/commonjs/models/components/listresourcepayment.d.ts.map +1 -0
- package/dist/commonjs/models/components/{listresource.js → listresourcepayment.js} +6 -6
- package/dist/commonjs/models/components/listresourcepayment.js.map +1 -0
- package/dist/{esm/models/components/ownercreate.d.ts → commonjs/models/components/memberownercreate.d.ts} +7 -7
- package/dist/commonjs/models/components/memberownercreate.d.ts.map +1 -0
- package/dist/commonjs/models/components/{ownercreate.js → memberownercreate.js} +7 -7
- package/dist/commonjs/models/components/memberownercreate.js.map +1 -0
- package/dist/commonjs/models/components/metricdashboardcreate.d.ts +28 -0
- package/dist/commonjs/models/components/metricdashboardcreate.d.ts.map +1 -0
- package/dist/commonjs/models/components/metricdashboardcreate.js +56 -0
- package/dist/commonjs/models/components/metricdashboardcreate.js.map +1 -0
- package/dist/commonjs/models/components/metricdashboardschema.d.ts +36 -0
- package/dist/commonjs/models/components/metricdashboardschema.d.ts.map +1 -0
- package/dist/commonjs/models/components/metricdashboardschema.js +62 -0
- package/dist/commonjs/models/components/metricdashboardschema.js.map +1 -0
- package/dist/commonjs/models/components/metricdashboardupdate.d.ts +23 -0
- package/dist/commonjs/models/components/metricdashboardupdate.d.ts.map +1 -0
- package/dist/commonjs/models/components/metricdashboardupdate.js +50 -0
- package/dist/commonjs/models/components/metricdashboardupdate.js.map +1 -0
- package/dist/commonjs/models/components/oauth2clientconfiguration.js +1 -1
- package/dist/commonjs/models/components/oauth2clientconfiguration.js.map +1 -1
- package/dist/commonjs/models/components/oauth2clientconfigurationupdate.js +1 -1
- package/dist/commonjs/models/components/oauth2clientconfigurationupdate.js.map +1 -1
- package/dist/commonjs/models/components/ordercustomer.d.ts +4 -7
- package/dist/commonjs/models/components/ordercustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/ordercustomer.js +4 -4
- package/dist/commonjs/models/components/ordercustomer.js.map +1 -1
- package/dist/commonjs/models/components/ordervoidedevent.d.ts +67 -0
- package/dist/commonjs/models/components/ordervoidedevent.d.ts.map +1 -0
- package/dist/commonjs/models/components/ordervoidedevent.js +76 -0
- package/dist/commonjs/models/components/ordervoidedevent.js.map +1 -0
- package/dist/commonjs/models/components/ordervoidedmetadata.d.ts +12 -0
- package/dist/commonjs/models/components/ordervoidedmetadata.d.ts.map +1 -0
- package/dist/commonjs/models/components/ordervoidedmetadata.js +57 -0
- package/dist/commonjs/models/components/ordervoidedmetadata.js.map +1 -0
- package/dist/commonjs/models/components/scope.d.ts +1 -0
- package/dist/commonjs/models/components/scope.d.ts.map +1 -1
- package/dist/commonjs/models/components/scope.js +1 -0
- package/dist/commonjs/models/components/scope.js.map +1 -1
- package/dist/commonjs/models/components/subscriptioncustomer.d.ts +4 -7
- package/dist/commonjs/models/components/subscriptioncustomer.d.ts.map +1 -1
- package/dist/commonjs/models/components/subscriptioncustomer.js +4 -4
- package/dist/commonjs/models/components/subscriptioncustomer.js.map +1 -1
- package/dist/commonjs/models/components/systemevent.d.ts +2 -1
- package/dist/commonjs/models/components/systemevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/systemevent.js +2 -0
- package/dist/commonjs/models/components/systemevent.js.map +1 -1
- package/dist/commonjs/models/components/webhookcustomercreatedpayload.d.ts +0 -3
- package/dist/commonjs/models/components/webhookcustomercreatedpayload.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhookcustomercreatedpayload.js.map +1 -1
- package/dist/commonjs/models/components/webhookcustomerdeletedpayload.d.ts +0 -3
- package/dist/commonjs/models/components/webhookcustomerdeletedpayload.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhookcustomerdeletedpayload.js.map +1 -1
- package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.d.ts +0 -9
- package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhookcustomerstatechangedpayload.js.map +1 -1
- package/dist/commonjs/models/components/webhookcustomerupdatedpayload.d.ts +0 -3
- package/dist/commonjs/models/components/webhookcustomerupdatedpayload.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhookcustomerupdatedpayload.js.map +1 -1
- package/dist/commonjs/models/operations/metricsdeletedashboard.d.ts +15 -0
- package/dist/commonjs/models/operations/metricsdeletedashboard.d.ts.map +1 -0
- package/dist/commonjs/models/operations/metricsdeletedashboard.js +49 -0
- package/dist/commonjs/models/operations/metricsdeletedashboard.js.map +1 -0
- package/dist/commonjs/models/operations/metricsgetdashboard.d.ts +15 -0
- package/dist/commonjs/models/operations/metricsgetdashboard.d.ts.map +1 -0
- package/dist/commonjs/models/operations/metricsgetdashboard.js +49 -0
- package/dist/commonjs/models/operations/metricsgetdashboard.js.map +1 -0
- package/dist/commonjs/models/operations/metricslistdashboards.d.ts +24 -0
- package/dist/commonjs/models/operations/metricslistdashboards.d.ts.map +1 -0
- package/dist/commonjs/models/operations/metricslistdashboards.js +61 -0
- package/dist/commonjs/models/operations/metricslistdashboards.js.map +1 -0
- package/dist/commonjs/models/operations/metricsupdatedashboard.d.ts +18 -0
- package/dist/commonjs/models/operations/metricsupdatedashboard.d.ts.map +1 -0
- package/dist/commonjs/models/operations/metricsupdatedashboard.js +56 -0
- package/dist/commonjs/models/operations/metricsupdatedashboard.js.map +1 -0
- package/dist/commonjs/models/operations/paymentslist.d.ts +2 -2
- package/dist/commonjs/models/operations/paymentslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/paymentslist.js +2 -2
- package/dist/commonjs/models/operations/paymentslist.js.map +1 -1
- package/dist/commonjs/models/operations/subscriptionslist.d.ts +25 -0
- package/dist/commonjs/models/operations/subscriptionslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/subscriptionslist.js +20 -1
- package/dist/commonjs/models/operations/subscriptionslist.js.map +1 -1
- package/dist/commonjs/sdk/metrics.d.ts +51 -0
- package/dist/commonjs/sdk/metrics.d.ts.map +1 -1
- package/dist/commonjs/sdk/metrics.js +60 -0
- package/dist/commonjs/sdk/metrics.js.map +1 -1
- package/dist/esm/funcs/metricsCreateDashboard.d.ts +21 -0
- package/dist/esm/funcs/metricsCreateDashboard.d.ts.map +1 -0
- package/dist/esm/funcs/metricsCreateDashboard.js +86 -0
- package/dist/esm/funcs/metricsCreateDashboard.js.map +1 -0
- package/dist/esm/funcs/metricsDeleteDashboard.d.ts +20 -0
- package/dist/esm/funcs/metricsDeleteDashboard.d.ts.map +1 -0
- package/dist/esm/funcs/metricsDeleteDashboard.js +90 -0
- package/dist/esm/funcs/metricsDeleteDashboard.js.map +1 -0
- package/dist/esm/funcs/metricsGetDashboard.d.ts +21 -0
- package/dist/esm/funcs/metricsGetDashboard.d.ts.map +1 -0
- package/dist/esm/funcs/metricsGetDashboard.js +91 -0
- package/dist/esm/funcs/metricsGetDashboard.js.map +1 -0
- package/dist/esm/funcs/metricsListDashboards.d.ts +21 -0
- package/dist/esm/funcs/metricsListDashboards.d.ts.map +1 -0
- package/dist/esm/funcs/metricsListDashboards.js +89 -0
- package/dist/esm/funcs/metricsListDashboards.js.map +1 -0
- package/dist/esm/funcs/metricsUpdateDashboard.d.ts +21 -0
- package/dist/esm/funcs/metricsUpdateDashboard.d.ts.map +1 -0
- package/dist/esm/funcs/metricsUpdateDashboard.js +94 -0
- package/dist/esm/funcs/metricsUpdateDashboard.js.map +1 -0
- package/dist/esm/funcs/subscriptionsList.js +3 -0
- package/dist/esm/funcs/subscriptionsList.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/security.d.ts +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +19 -8
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/models/components/availablescope.d.ts +1 -0
- package/dist/esm/models/components/availablescope.d.ts.map +1 -1
- package/dist/esm/models/components/availablescope.js +1 -0
- package/dist/esm/models/components/availablescope.js.map +1 -1
- package/dist/esm/models/components/benefitgrant.d.ts +0 -3
- package/dist/esm/models/components/benefitgrant.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgrant.js.map +1 -1
- package/dist/esm/models/components/benefitgrantcustomwebhook.d.ts +0 -3
- package/dist/esm/models/components/benefitgrantcustomwebhook.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgrantcustomwebhook.js.map +1 -1
- package/dist/esm/models/components/benefitgrantdiscordwebhook.d.ts +0 -3
- package/dist/esm/models/components/benefitgrantdiscordwebhook.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgrantdiscordwebhook.js.map +1 -1
- package/dist/esm/models/components/benefitgrantdownloadableswebhook.d.ts +0 -3
- package/dist/esm/models/components/benefitgrantdownloadableswebhook.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgrantdownloadableswebhook.js.map +1 -1
- package/dist/esm/models/components/benefitgrantfeatureflagwebhook.d.ts +0 -3
- package/dist/esm/models/components/benefitgrantfeatureflagwebhook.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgrantfeatureflagwebhook.js.map +1 -1
- package/dist/esm/models/components/benefitgrantgithubrepositorywebhook.d.ts +0 -3
- package/dist/esm/models/components/benefitgrantgithubrepositorywebhook.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgrantgithubrepositorywebhook.js.map +1 -1
- package/dist/esm/models/components/benefitgrantlicensekeyswebhook.d.ts +0 -3
- package/dist/esm/models/components/benefitgrantlicensekeyswebhook.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgrantlicensekeyswebhook.js.map +1 -1
- package/dist/esm/models/components/benefitgrantmetercreditwebhook.d.ts +0 -3
- package/dist/esm/models/components/benefitgrantmetercreditwebhook.d.ts.map +1 -1
- package/dist/esm/models/components/benefitgrantmetercreditwebhook.js.map +1 -1
- package/dist/esm/models/components/customer.d.ts +4 -84
- package/dist/esm/models/components/customer.d.ts.map +1 -1
- package/dist/esm/models/components/customer.js +4 -74
- package/dist/esm/models/components/customer.js.map +1 -1
- package/dist/esm/models/components/customercreate.d.ts +4 -67
- package/dist/esm/models/components/customercreate.d.ts.map +1 -1
- package/dist/esm/models/components/customercreate.js +6 -29
- package/dist/esm/models/components/customercreate.js.map +1 -1
- package/dist/esm/models/components/customercreatedmetadata.d.ts +1 -1
- package/dist/esm/models/components/customercreatedmetadata.d.ts.map +1 -1
- package/dist/esm/models/components/customercreatedmetadata.js +1 -1
- package/dist/esm/models/components/customercreatedmetadata.js.map +1 -1
- package/dist/esm/models/components/customerdeletedmetadata.d.ts +1 -1
- package/dist/esm/models/components/customerdeletedmetadata.d.ts.map +1 -1
- package/dist/esm/models/components/customerdeletedmetadata.js +1 -1
- package/dist/esm/models/components/customerdeletedmetadata.js.map +1 -1
- package/dist/esm/models/components/customerindividual.d.ts +94 -0
- package/dist/esm/models/components/customerindividual.d.ts.map +1 -0
- package/dist/esm/models/components/customerindividual.js +87 -0
- package/dist/esm/models/components/customerindividual.js.map +1 -0
- package/dist/esm/models/components/customerindividualcreate.d.ts +69 -0
- package/dist/esm/models/components/customerindividualcreate.d.ts.map +1 -0
- package/dist/esm/models/components/customerindividualcreate.js +37 -0
- package/dist/esm/models/components/customerindividualcreate.js.map +1 -0
- package/dist/esm/models/components/customermeter.d.ts +0 -3
- package/dist/esm/models/components/customermeter.d.ts.map +1 -1
- package/dist/esm/models/components/customermeter.js.map +1 -1
- package/dist/esm/models/components/customerportalcustomer.d.ts +1 -1
- package/dist/esm/models/components/customerportalcustomer.d.ts.map +1 -1
- package/dist/esm/models/components/customerportalcustomer.js +1 -1
- package/dist/esm/models/components/customerportalcustomer.js.map +1 -1
- package/dist/esm/models/components/customersession.d.ts +0 -3
- package/dist/esm/models/components/customersession.d.ts.map +1 -1
- package/dist/esm/models/components/customersession.js.map +1 -1
- package/dist/esm/models/components/customerstate.d.ts +4 -108
- package/dist/esm/models/components/customerstate.d.ts.map +1 -1
- package/dist/esm/models/components/customerstate.js +10 -89
- package/dist/esm/models/components/customerstate.js.map +1 -1
- package/dist/esm/models/components/customerstateindividual.d.ts +118 -0
- package/dist/esm/models/components/customerstateindividual.d.ts.map +1 -0
- package/dist/esm/models/components/customerstateindividual.js +102 -0
- package/dist/esm/models/components/customerstateindividual.js.map +1 -0
- package/dist/esm/models/components/customerstateteam.d.ts +118 -0
- package/dist/esm/models/components/customerstateteam.d.ts.map +1 -0
- package/dist/esm/models/components/customerstateteam.js +102 -0
- package/dist/esm/models/components/customerstateteam.js.map +1 -0
- package/dist/esm/models/components/customerteam.d.ts +94 -0
- package/dist/esm/models/components/customerteam.d.ts.map +1 -0
- package/dist/esm/models/components/customerteam.js +87 -0
- package/dist/esm/models/components/customerteam.js.map +1 -0
- package/dist/esm/models/components/customerteamcreate.d.ts +69 -0
- package/dist/esm/models/components/customerteamcreate.d.ts.map +1 -0
- package/dist/esm/models/components/customerteamcreate.js +37 -0
- package/dist/esm/models/components/customerteamcreate.js.map +1 -0
- package/dist/esm/models/components/customerupdatedmetadata.d.ts +1 -1
- package/dist/esm/models/components/customerupdatedmetadata.d.ts.map +1 -1
- package/dist/esm/models/components/customerupdatedmetadata.js +1 -1
- package/dist/esm/models/components/customerupdatedmetadata.js.map +1 -1
- package/dist/esm/models/components/licensekeycustomer.d.ts +2 -5
- package/dist/esm/models/components/licensekeycustomer.d.ts.map +1 -1
- package/dist/esm/models/components/licensekeycustomer.js +2 -2
- package/dist/esm/models/components/licensekeycustomer.js.map +1 -1
- package/dist/esm/models/components/{listresource.d.ts → listresourcepayment.d.ts} +4 -4
- package/dist/esm/models/components/listresourcepayment.d.ts.map +1 -0
- package/dist/esm/models/components/{listresource.js → listresourcepayment.js} +4 -4
- package/dist/esm/models/components/listresourcepayment.js.map +1 -0
- package/dist/{commonjs/models/components/ownercreate.d.ts → esm/models/components/memberownercreate.d.ts} +7 -7
- package/dist/esm/models/components/memberownercreate.d.ts.map +1 -0
- package/dist/esm/models/components/{ownercreate.js → memberownercreate.js} +5 -5
- package/dist/esm/models/components/memberownercreate.js.map +1 -0
- package/dist/esm/models/components/metricdashboardcreate.d.ts +28 -0
- package/dist/esm/models/components/metricdashboardcreate.d.ts.map +1 -0
- package/dist/esm/models/components/metricdashboardcreate.js +19 -0
- package/dist/esm/models/components/metricdashboardcreate.js.map +1 -0
- package/dist/esm/models/components/metricdashboardschema.d.ts +36 -0
- package/dist/esm/models/components/metricdashboardschema.d.ts.map +1 -0
- package/dist/esm/models/components/metricdashboardschema.js +25 -0
- package/dist/esm/models/components/metricdashboardschema.js.map +1 -0
- package/dist/esm/models/components/metricdashboardupdate.d.ts +23 -0
- package/dist/esm/models/components/metricdashboardupdate.d.ts.map +1 -0
- package/dist/esm/models/components/metricdashboardupdate.js +13 -0
- package/dist/esm/models/components/metricdashboardupdate.js.map +1 -0
- package/dist/esm/models/components/oauth2clientconfiguration.js +1 -1
- package/dist/esm/models/components/oauth2clientconfiguration.js.map +1 -1
- package/dist/esm/models/components/oauth2clientconfigurationupdate.js +1 -1
- package/dist/esm/models/components/oauth2clientconfigurationupdate.js.map +1 -1
- package/dist/esm/models/components/ordercustomer.d.ts +4 -7
- package/dist/esm/models/components/ordercustomer.d.ts.map +1 -1
- package/dist/esm/models/components/ordercustomer.js +4 -4
- package/dist/esm/models/components/ordercustomer.js.map +1 -1
- package/dist/esm/models/components/ordervoidedevent.d.ts +67 -0
- package/dist/esm/models/components/ordervoidedevent.d.ts.map +1 -0
- package/dist/esm/models/components/ordervoidedevent.js +39 -0
- package/dist/esm/models/components/ordervoidedevent.js.map +1 -0
- package/dist/esm/models/components/ordervoidedmetadata.d.ts +12 -0
- package/dist/esm/models/components/ordervoidedmetadata.d.ts.map +1 -0
- package/dist/esm/models/components/ordervoidedmetadata.js +20 -0
- package/dist/esm/models/components/ordervoidedmetadata.js.map +1 -0
- package/dist/esm/models/components/scope.d.ts +1 -0
- package/dist/esm/models/components/scope.d.ts.map +1 -1
- package/dist/esm/models/components/scope.js +1 -0
- package/dist/esm/models/components/scope.js.map +1 -1
- package/dist/esm/models/components/subscriptioncustomer.d.ts +4 -7
- package/dist/esm/models/components/subscriptioncustomer.d.ts.map +1 -1
- package/dist/esm/models/components/subscriptioncustomer.js +4 -4
- package/dist/esm/models/components/subscriptioncustomer.js.map +1 -1
- package/dist/esm/models/components/systemevent.d.ts +2 -1
- package/dist/esm/models/components/systemevent.d.ts.map +1 -1
- package/dist/esm/models/components/systemevent.js +2 -0
- package/dist/esm/models/components/systemevent.js.map +1 -1
- package/dist/esm/models/components/webhookcustomercreatedpayload.d.ts +0 -3
- package/dist/esm/models/components/webhookcustomercreatedpayload.d.ts.map +1 -1
- package/dist/esm/models/components/webhookcustomercreatedpayload.js.map +1 -1
- package/dist/esm/models/components/webhookcustomerdeletedpayload.d.ts +0 -3
- package/dist/esm/models/components/webhookcustomerdeletedpayload.d.ts.map +1 -1
- package/dist/esm/models/components/webhookcustomerdeletedpayload.js.map +1 -1
- package/dist/esm/models/components/webhookcustomerstatechangedpayload.d.ts +0 -9
- package/dist/esm/models/components/webhookcustomerstatechangedpayload.d.ts.map +1 -1
- package/dist/esm/models/components/webhookcustomerstatechangedpayload.js.map +1 -1
- package/dist/esm/models/components/webhookcustomerupdatedpayload.d.ts +0 -3
- package/dist/esm/models/components/webhookcustomerupdatedpayload.d.ts.map +1 -1
- package/dist/esm/models/components/webhookcustomerupdatedpayload.js.map +1 -1
- package/dist/esm/models/operations/metricsdeletedashboard.d.ts +15 -0
- package/dist/esm/models/operations/metricsdeletedashboard.d.ts.map +1 -0
- package/dist/esm/models/operations/metricsdeletedashboard.js +12 -0
- package/dist/esm/models/operations/metricsdeletedashboard.js.map +1 -0
- package/dist/esm/models/operations/metricsgetdashboard.d.ts +15 -0
- package/dist/esm/models/operations/metricsgetdashboard.d.ts.map +1 -0
- package/dist/esm/models/operations/metricsgetdashboard.js +12 -0
- package/dist/esm/models/operations/metricsgetdashboard.js.map +1 -0
- package/dist/esm/models/operations/metricslistdashboards.d.ts +24 -0
- package/dist/esm/models/operations/metricslistdashboards.d.ts.map +1 -0
- package/dist/esm/models/operations/metricslistdashboards.js +23 -0
- package/dist/esm/models/operations/metricslistdashboards.js.map +1 -0
- package/dist/esm/models/operations/metricsupdatedashboard.d.ts +18 -0
- package/dist/esm/models/operations/metricsupdatedashboard.d.ts.map +1 -0
- package/dist/esm/models/operations/metricsupdatedashboard.js +19 -0
- package/dist/esm/models/operations/metricsupdatedashboard.js.map +1 -0
- package/dist/esm/models/operations/paymentslist.d.ts +2 -2
- package/dist/esm/models/operations/paymentslist.d.ts.map +1 -1
- package/dist/esm/models/operations/paymentslist.js +2 -2
- package/dist/esm/models/operations/paymentslist.js.map +1 -1
- package/dist/esm/models/operations/subscriptionslist.d.ts +25 -0
- package/dist/esm/models/operations/subscriptionslist.d.ts.map +1 -1
- package/dist/esm/models/operations/subscriptionslist.js +18 -0
- package/dist/esm/models/operations/subscriptionslist.js.map +1 -1
- package/dist/esm/sdk/metrics.d.ts +51 -0
- package/dist/esm/sdk/metrics.d.ts.map +1 -1
- package/dist/esm/sdk/metrics.js +60 -0
- package/dist/esm/sdk/metrics.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/metricsCreateDashboard.ts +182 -0
- package/src/funcs/metricsDeleteDashboard.ts +183 -0
- package/src/funcs/metricsGetDashboard.ts +187 -0
- package/src/funcs/metricsListDashboards.ts +186 -0
- package/src/funcs/metricsUpdateDashboard.ts +190 -0
- package/src/funcs/subscriptionsList.ts +3 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +14 -2
- package/src/models/components/availablescope.ts +1 -0
- package/src/models/components/benefitgrant.ts +0 -3
- package/src/models/components/benefitgrantcustomwebhook.ts +0 -3
- package/src/models/components/benefitgrantdiscordwebhook.ts +0 -3
- package/src/models/components/benefitgrantdownloadableswebhook.ts +0 -3
- package/src/models/components/benefitgrantfeatureflagwebhook.ts +0 -3
- package/src/models/components/benefitgrantgithubrepositorywebhook.ts +0 -3
- package/src/models/components/benefitgrantlicensekeyswebhook.ts +0 -3
- package/src/models/components/benefitgrantmetercreditwebhook.ts +0 -3
- package/src/models/components/customer.ts +17 -192
- package/src/models/components/customercreate.ts +16 -114
- package/src/models/components/customercreatedmetadata.ts +2 -2
- package/src/models/components/customerdeletedmetadata.ts +2 -2
- package/src/models/components/customerindividual.ts +231 -0
- package/src/models/components/customerindividualcreate.ts +140 -0
- package/src/models/components/customermeter.ts +0 -3
- package/src/models/components/customerportalcustomer.ts +2 -2
- package/src/models/components/customersession.ts +0 -3
- package/src/models/components/customerstate.ts +22 -248
- package/src/models/components/customerstateindividual.ts +284 -0
- package/src/models/components/customerstateteam.ts +282 -0
- package/src/models/components/customerteam.ts +227 -0
- package/src/models/components/customerteamcreate.ts +134 -0
- package/src/models/components/customerupdatedmetadata.ts +2 -2
- package/src/models/components/licensekeycustomer.ts +4 -7
- package/src/models/components/{listresource.ts → listresourcepayment.ts} +12 -10
- package/src/models/components/{ownercreate.ts → memberownercreate.ts} +14 -10
- package/src/models/components/metricdashboardcreate.ts +56 -0
- package/src/models/components/metricdashboardschema.ts +76 -0
- package/src/models/components/metricdashboardupdate.ts +42 -0
- package/src/models/components/oauth2clientconfiguration.ts +1 -1
- package/src/models/components/oauth2clientconfigurationupdate.ts +1 -1
- package/src/models/components/ordercustomer.ts +8 -11
- package/src/models/components/ordervoidedevent.ts +120 -0
- package/src/models/components/ordervoidedmetadata.ts +42 -0
- package/src/models/components/scope.ts +1 -0
- package/src/models/components/subscriptioncustomer.ts +8 -11
- package/src/models/components/systemevent.ts +6 -0
- package/src/models/components/webhookcustomercreatedpayload.ts +0 -3
- package/src/models/components/webhookcustomerdeletedpayload.ts +0 -3
- package/src/models/components/webhookcustomerstatechangedpayload.ts +0 -9
- package/src/models/components/webhookcustomerupdatedpayload.ts +0 -3
- package/src/models/operations/metricsdeletedashboard.ts +35 -0
- package/src/models/operations/metricsgetdashboard.ts +33 -0
- package/src/models/operations/metricslistdashboards.ts +76 -0
- package/src/models/operations/metricsupdatedashboard.ts +51 -0
- package/src/models/operations/paymentslist.ts +5 -5
- package/src/models/operations/subscriptionslist.ts +69 -0
- package/src/sdk/metrics.ts +106 -0
- package/dist/commonjs/models/components/listresource.d.ts.map +0 -1
- package/dist/commonjs/models/components/listresource.js.map +0 -1
- package/dist/commonjs/models/components/ownercreate.d.ts.map +0 -1
- package/dist/commonjs/models/components/ownercreate.js.map +0 -1
- package/dist/esm/models/components/listresource.d.ts.map +0 -1
- package/dist/esm/models/components/listresource.js.map +0 -1
- package/dist/esm/models/components/ownercreate.d.ts.map +0 -1
- package/dist/esm/models/components/ownercreate.js.map +0 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { smartUnion } from "../../types/smartUnion.js";
|
|
8
|
+
import {
|
|
9
|
+
AddressInput,
|
|
10
|
+
AddressInput$Outbound,
|
|
11
|
+
AddressInput$outboundSchema,
|
|
12
|
+
} from "./addressinput.js";
|
|
13
|
+
import {
|
|
14
|
+
MemberOwnerCreate,
|
|
15
|
+
MemberOwnerCreate$Outbound,
|
|
16
|
+
MemberOwnerCreate$outboundSchema,
|
|
17
|
+
} from "./memberownercreate.js";
|
|
18
|
+
|
|
19
|
+
export type CustomerIndividualCreateMetadata =
|
|
20
|
+
| string
|
|
21
|
+
| number
|
|
22
|
+
| number
|
|
23
|
+
| boolean;
|
|
24
|
+
|
|
25
|
+
export type CustomerIndividualCreate = {
|
|
26
|
+
/**
|
|
27
|
+
* Key-value object allowing you to store additional information.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
*
|
|
31
|
+
* The key must be a string with a maximum length of **40 characters**.
|
|
32
|
+
* The value must be either:
|
|
33
|
+
*
|
|
34
|
+
* * A string with a maximum length of **500 characters**
|
|
35
|
+
* * An integer
|
|
36
|
+
* * A floating-point number
|
|
37
|
+
* * A boolean
|
|
38
|
+
*
|
|
39
|
+
* You can store up to **50 key-value pairs**.
|
|
40
|
+
*/
|
|
41
|
+
metadata?: { [k: string]: string | number | number | boolean } | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
|
|
44
|
+
*/
|
|
45
|
+
externalId?: string | null | undefined;
|
|
46
|
+
name?: string | null | undefined;
|
|
47
|
+
billingAddress?: AddressInput | null | undefined;
|
|
48
|
+
taxId?: string | null | undefined;
|
|
49
|
+
locale?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The ID of the organization owning the customer. **Required unless you use an organization token.**
|
|
52
|
+
*/
|
|
53
|
+
organizationId?: string | null | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Optional owner member to create with the customer. If not provided, an owner member will be automatically created using the customer's email and name.
|
|
56
|
+
*/
|
|
57
|
+
owner?: MemberOwnerCreate | null | undefined;
|
|
58
|
+
type?: "individual" | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* The email address of the customer. This must be unique within the organization.
|
|
61
|
+
*/
|
|
62
|
+
email: string;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** @internal */
|
|
66
|
+
export type CustomerIndividualCreateMetadata$Outbound =
|
|
67
|
+
| string
|
|
68
|
+
| number
|
|
69
|
+
| number
|
|
70
|
+
| boolean;
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const CustomerIndividualCreateMetadata$outboundSchema: z.ZodMiniType<
|
|
74
|
+
CustomerIndividualCreateMetadata$Outbound,
|
|
75
|
+
CustomerIndividualCreateMetadata
|
|
76
|
+
> = smartUnion([z.string(), z.int(), z.number(), z.boolean()]);
|
|
77
|
+
|
|
78
|
+
export function customerIndividualCreateMetadataToJSON(
|
|
79
|
+
customerIndividualCreateMetadata: CustomerIndividualCreateMetadata,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
CustomerIndividualCreateMetadata$outboundSchema.parse(
|
|
83
|
+
customerIndividualCreateMetadata,
|
|
84
|
+
),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export type CustomerIndividualCreate$Outbound = {
|
|
90
|
+
metadata?: { [k: string]: string | number | number | boolean } | undefined;
|
|
91
|
+
external_id?: string | null | undefined;
|
|
92
|
+
name?: string | null | undefined;
|
|
93
|
+
billing_address?: AddressInput$Outbound | null | undefined;
|
|
94
|
+
tax_id?: string | null | undefined;
|
|
95
|
+
locale?: string | null | undefined;
|
|
96
|
+
organization_id?: string | null | undefined;
|
|
97
|
+
owner?: MemberOwnerCreate$Outbound | null | undefined;
|
|
98
|
+
type: "individual";
|
|
99
|
+
email: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const CustomerIndividualCreate$outboundSchema: z.ZodMiniType<
|
|
104
|
+
CustomerIndividualCreate$Outbound,
|
|
105
|
+
CustomerIndividualCreate
|
|
106
|
+
> = z.pipe(
|
|
107
|
+
z.object({
|
|
108
|
+
metadata: z.optional(
|
|
109
|
+
z.record(
|
|
110
|
+
z.string(),
|
|
111
|
+
smartUnion([z.string(), z.int(), z.number(), z.boolean()]),
|
|
112
|
+
),
|
|
113
|
+
),
|
|
114
|
+
externalId: z.optional(z.nullable(z.string())),
|
|
115
|
+
name: z.optional(z.nullable(z.string())),
|
|
116
|
+
billingAddress: z.optional(z.nullable(AddressInput$outboundSchema)),
|
|
117
|
+
taxId: z.optional(z.nullable(z.string())),
|
|
118
|
+
locale: z.optional(z.nullable(z.string())),
|
|
119
|
+
organizationId: z.optional(z.nullable(z.string())),
|
|
120
|
+
owner: z.optional(z.nullable(MemberOwnerCreate$outboundSchema)),
|
|
121
|
+
type: z._default(z.literal("individual"), "individual" as const),
|
|
122
|
+
email: z.string(),
|
|
123
|
+
}),
|
|
124
|
+
z.transform((v) => {
|
|
125
|
+
return remap$(v, {
|
|
126
|
+
externalId: "external_id",
|
|
127
|
+
billingAddress: "billing_address",
|
|
128
|
+
taxId: "tax_id",
|
|
129
|
+
organizationId: "organization_id",
|
|
130
|
+
});
|
|
131
|
+
}),
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
export function customerIndividualCreateToJSON(
|
|
135
|
+
customerIndividualCreate: CustomerIndividualCreate,
|
|
136
|
+
): string {
|
|
137
|
+
return JSON.stringify(
|
|
138
|
+
CustomerIndividualCreate$outboundSchema.parse(customerIndividualCreate),
|
|
139
|
+
);
|
|
140
|
+
}
|
|
@@ -31,7 +31,7 @@ export type CustomerPortalCustomer = {
|
|
|
31
31
|
* The ID of the object.
|
|
32
32
|
*/
|
|
33
33
|
id: string;
|
|
34
|
-
email: string;
|
|
34
|
+
email: string | null;
|
|
35
35
|
emailVerified: boolean;
|
|
36
36
|
name: string | null;
|
|
37
37
|
billingName: string | null;
|
|
@@ -72,7 +72,7 @@ export const CustomerPortalCustomer$inboundSchema: z.ZodMiniType<
|
|
|
72
72
|
z.pipe(z.iso.datetime({ offset: true }), z.transform(v => new Date(v))),
|
|
73
73
|
),
|
|
74
74
|
id: z.string(),
|
|
75
|
-
email: z.string(),
|
|
75
|
+
email: z.nullable(z.string()),
|
|
76
76
|
email_verified: z.boolean(),
|
|
77
77
|
name: z.nullable(z.string()),
|
|
78
78
|
billing_name: z.nullable(z.string()),
|
|
@@ -3,271 +3,45 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
-
import { smartUnion } from "../../types/smartUnion.js";
|
|
10
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
9
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "./
|
|
10
|
+
CustomerStateIndividual,
|
|
11
|
+
CustomerStateIndividual$inboundSchema,
|
|
12
|
+
CustomerStateIndividual$Outbound,
|
|
13
|
+
CustomerStateIndividual$outboundSchema,
|
|
14
|
+
} from "./customerstateindividual.js";
|
|
17
15
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./
|
|
23
|
-
import {
|
|
24
|
-
CustomerStateMeter,
|
|
25
|
-
CustomerStateMeter$inboundSchema,
|
|
26
|
-
CustomerStateMeter$Outbound,
|
|
27
|
-
CustomerStateMeter$outboundSchema,
|
|
28
|
-
} from "./customerstatemeter.js";
|
|
29
|
-
import {
|
|
30
|
-
CustomerStateSubscription,
|
|
31
|
-
CustomerStateSubscription$inboundSchema,
|
|
32
|
-
CustomerStateSubscription$Outbound,
|
|
33
|
-
CustomerStateSubscription$outboundSchema,
|
|
34
|
-
} from "./customerstatesubscription.js";
|
|
35
|
-
import {
|
|
36
|
-
CustomerType,
|
|
37
|
-
CustomerType$inboundSchema,
|
|
38
|
-
CustomerType$outboundSchema,
|
|
39
|
-
} from "./customertype.js";
|
|
40
|
-
import {
|
|
41
|
-
MetadataOutputType,
|
|
42
|
-
MetadataOutputType$inboundSchema,
|
|
43
|
-
MetadataOutputType$Outbound,
|
|
44
|
-
MetadataOutputType$outboundSchema,
|
|
45
|
-
} from "./metadataoutputtype.js";
|
|
46
|
-
import {
|
|
47
|
-
TaxIDFormat,
|
|
48
|
-
TaxIDFormat$inboundSchema,
|
|
49
|
-
TaxIDFormat$outboundSchema,
|
|
50
|
-
} from "./taxidformat.js";
|
|
51
|
-
|
|
52
|
-
export type CustomerStateTaxId = string | TaxIDFormat;
|
|
16
|
+
CustomerStateTeam,
|
|
17
|
+
CustomerStateTeam$inboundSchema,
|
|
18
|
+
CustomerStateTeam$Outbound,
|
|
19
|
+
CustomerStateTeam$outboundSchema,
|
|
20
|
+
} from "./customerstateteam.js";
|
|
53
21
|
|
|
54
|
-
|
|
55
|
-
* A customer along with additional state information:
|
|
56
|
-
*
|
|
57
|
-
* @remarks
|
|
58
|
-
*
|
|
59
|
-
* * Active subscriptions
|
|
60
|
-
* * Granted benefits
|
|
61
|
-
* * Active meters
|
|
62
|
-
*/
|
|
63
|
-
export type CustomerState = {
|
|
64
|
-
/**
|
|
65
|
-
* The ID of the customer.
|
|
66
|
-
*/
|
|
67
|
-
id: string;
|
|
68
|
-
/**
|
|
69
|
-
* Creation timestamp of the object.
|
|
70
|
-
*/
|
|
71
|
-
createdAt: Date;
|
|
72
|
-
/**
|
|
73
|
-
* Last modification timestamp of the object.
|
|
74
|
-
*/
|
|
75
|
-
modifiedAt: Date | null;
|
|
76
|
-
metadata: { [k: string]: MetadataOutputType };
|
|
77
|
-
/**
|
|
78
|
-
* The ID of the customer in your system. This must be unique within the organization. Once set, it can't be updated.
|
|
79
|
-
*/
|
|
80
|
-
externalId?: string | null | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* The email address of the customer. This must be unique within the organization.
|
|
83
|
-
*/
|
|
84
|
-
email: string;
|
|
85
|
-
/**
|
|
86
|
-
* Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.
|
|
87
|
-
*/
|
|
88
|
-
emailVerified: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* The type of customer: 'individual' for single users, 'team' for customers with multiple members. Legacy customers may have NULL type which is treated as 'individual'.
|
|
91
|
-
*/
|
|
92
|
-
type?: CustomerType | null | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* The name of the customer.
|
|
95
|
-
*/
|
|
96
|
-
name: string | null;
|
|
97
|
-
billingAddress: Address | null;
|
|
98
|
-
taxId: Array<string | TaxIDFormat | null> | null;
|
|
99
|
-
locale?: string | null | undefined;
|
|
100
|
-
/**
|
|
101
|
-
* The ID of the organization owning the customer.
|
|
102
|
-
*/
|
|
103
|
-
organizationId: string;
|
|
104
|
-
/**
|
|
105
|
-
* Timestamp for when the customer was soft deleted.
|
|
106
|
-
*/
|
|
107
|
-
deletedAt: Date | null;
|
|
108
|
-
/**
|
|
109
|
-
* The customer's active subscriptions.
|
|
110
|
-
*/
|
|
111
|
-
activeSubscriptions: Array<CustomerStateSubscription>;
|
|
112
|
-
/**
|
|
113
|
-
* The customer's active benefit grants.
|
|
114
|
-
*/
|
|
115
|
-
grantedBenefits: Array<CustomerStateBenefitGrant>;
|
|
116
|
-
/**
|
|
117
|
-
* The customer's active meters.
|
|
118
|
-
*/
|
|
119
|
-
activeMeters: Array<CustomerStateMeter>;
|
|
120
|
-
avatarUrl: string;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
/** @internal */
|
|
124
|
-
export const CustomerStateTaxId$inboundSchema: z.ZodMiniType<
|
|
125
|
-
CustomerStateTaxId,
|
|
126
|
-
unknown
|
|
127
|
-
> = smartUnion([z.string(), TaxIDFormat$inboundSchema]);
|
|
128
|
-
/** @internal */
|
|
129
|
-
export type CustomerStateTaxId$Outbound = string | string;
|
|
130
|
-
|
|
131
|
-
/** @internal */
|
|
132
|
-
export const CustomerStateTaxId$outboundSchema: z.ZodMiniType<
|
|
133
|
-
CustomerStateTaxId$Outbound,
|
|
134
|
-
CustomerStateTaxId
|
|
135
|
-
> = smartUnion([z.string(), TaxIDFormat$outboundSchema]);
|
|
136
|
-
|
|
137
|
-
export function customerStateTaxIdToJSON(
|
|
138
|
-
customerStateTaxId: CustomerStateTaxId,
|
|
139
|
-
): string {
|
|
140
|
-
return JSON.stringify(
|
|
141
|
-
CustomerStateTaxId$outboundSchema.parse(customerStateTaxId),
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
export function customerStateTaxIdFromJSON(
|
|
145
|
-
jsonString: string,
|
|
146
|
-
): SafeParseResult<CustomerStateTaxId, SDKValidationError> {
|
|
147
|
-
return safeParse(
|
|
148
|
-
jsonString,
|
|
149
|
-
(x) => CustomerStateTaxId$inboundSchema.parse(JSON.parse(x)),
|
|
150
|
-
`Failed to parse 'CustomerStateTaxId' from JSON`,
|
|
151
|
-
);
|
|
152
|
-
}
|
|
22
|
+
export type CustomerState = CustomerStateIndividual | CustomerStateTeam;
|
|
153
23
|
|
|
154
24
|
/** @internal */
|
|
155
25
|
export const CustomerState$inboundSchema: z.ZodMiniType<
|
|
156
26
|
CustomerState,
|
|
157
27
|
unknown
|
|
158
|
-
> = z.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
z.iso.datetime({ offset: true }),
|
|
163
|
-
z.transform(v => new Date(v)),
|
|
164
|
-
),
|
|
165
|
-
modified_at: z.nullable(
|
|
166
|
-
z.pipe(z.iso.datetime({ offset: true }), z.transform(v => new Date(v))),
|
|
167
|
-
),
|
|
168
|
-
metadata: z.record(z.string(), MetadataOutputType$inboundSchema),
|
|
169
|
-
external_id: z.optional(z.nullable(z.string())),
|
|
170
|
-
email: z.string(),
|
|
171
|
-
email_verified: z.boolean(),
|
|
172
|
-
type: z.optional(z.nullable(CustomerType$inboundSchema)),
|
|
173
|
-
name: z.nullable(z.string()),
|
|
174
|
-
billing_address: z.nullable(Address$inboundSchema),
|
|
175
|
-
tax_id: z.nullable(
|
|
176
|
-
z.array(z.nullable(smartUnion([z.string(), TaxIDFormat$inboundSchema]))),
|
|
177
|
-
),
|
|
178
|
-
locale: z.optional(z.nullable(z.string())),
|
|
179
|
-
organization_id: z.string(),
|
|
180
|
-
deleted_at: z.nullable(
|
|
181
|
-
z.pipe(z.iso.datetime({ offset: true }), z.transform(v => new Date(v))),
|
|
182
|
-
),
|
|
183
|
-
active_subscriptions: z.array(CustomerStateSubscription$inboundSchema),
|
|
184
|
-
granted_benefits: z.array(CustomerStateBenefitGrant$inboundSchema),
|
|
185
|
-
active_meters: z.array(CustomerStateMeter$inboundSchema),
|
|
186
|
-
avatar_url: z.string(),
|
|
187
|
-
}),
|
|
188
|
-
z.transform((v) => {
|
|
189
|
-
return remap$(v, {
|
|
190
|
-
"created_at": "createdAt",
|
|
191
|
-
"modified_at": "modifiedAt",
|
|
192
|
-
"external_id": "externalId",
|
|
193
|
-
"email_verified": "emailVerified",
|
|
194
|
-
"billing_address": "billingAddress",
|
|
195
|
-
"tax_id": "taxId",
|
|
196
|
-
"organization_id": "organizationId",
|
|
197
|
-
"deleted_at": "deletedAt",
|
|
198
|
-
"active_subscriptions": "activeSubscriptions",
|
|
199
|
-
"granted_benefits": "grantedBenefits",
|
|
200
|
-
"active_meters": "activeMeters",
|
|
201
|
-
"avatar_url": "avatarUrl",
|
|
202
|
-
});
|
|
203
|
-
}),
|
|
204
|
-
);
|
|
28
|
+
> = z.union([
|
|
29
|
+
CustomerStateIndividual$inboundSchema,
|
|
30
|
+
CustomerStateTeam$inboundSchema,
|
|
31
|
+
]);
|
|
205
32
|
/** @internal */
|
|
206
|
-
export type CustomerState$Outbound =
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
modified_at: string | null;
|
|
210
|
-
metadata: { [k: string]: MetadataOutputType$Outbound };
|
|
211
|
-
external_id?: string | null | undefined;
|
|
212
|
-
email: string;
|
|
213
|
-
email_verified: boolean;
|
|
214
|
-
type?: string | null | undefined;
|
|
215
|
-
name: string | null;
|
|
216
|
-
billing_address: Address$Outbound | null;
|
|
217
|
-
tax_id: Array<string | string | null> | null;
|
|
218
|
-
locale?: string | null | undefined;
|
|
219
|
-
organization_id: string;
|
|
220
|
-
deleted_at: string | null;
|
|
221
|
-
active_subscriptions: Array<CustomerStateSubscription$Outbound>;
|
|
222
|
-
granted_benefits: Array<CustomerStateBenefitGrant$Outbound>;
|
|
223
|
-
active_meters: Array<CustomerStateMeter$Outbound>;
|
|
224
|
-
avatar_url: string;
|
|
225
|
-
};
|
|
33
|
+
export type CustomerState$Outbound =
|
|
34
|
+
| CustomerStateIndividual$Outbound
|
|
35
|
+
| CustomerStateTeam$Outbound;
|
|
226
36
|
|
|
227
37
|
/** @internal */
|
|
228
38
|
export const CustomerState$outboundSchema: z.ZodMiniType<
|
|
229
39
|
CustomerState$Outbound,
|
|
230
40
|
CustomerState
|
|
231
|
-
> = z.
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
modifiedAt: z.nullable(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
236
|
-
metadata: z.record(z.string(), MetadataOutputType$outboundSchema),
|
|
237
|
-
externalId: z.optional(z.nullable(z.string())),
|
|
238
|
-
email: z.string(),
|
|
239
|
-
emailVerified: z.boolean(),
|
|
240
|
-
type: z.optional(z.nullable(CustomerType$outboundSchema)),
|
|
241
|
-
name: z.nullable(z.string()),
|
|
242
|
-
billingAddress: z.nullable(Address$outboundSchema),
|
|
243
|
-
taxId: z.nullable(
|
|
244
|
-
z.array(z.nullable(smartUnion([z.string(), TaxIDFormat$outboundSchema]))),
|
|
245
|
-
),
|
|
246
|
-
locale: z.optional(z.nullable(z.string())),
|
|
247
|
-
organizationId: z.string(),
|
|
248
|
-
deletedAt: z.nullable(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
249
|
-
activeSubscriptions: z.array(CustomerStateSubscription$outboundSchema),
|
|
250
|
-
grantedBenefits: z.array(CustomerStateBenefitGrant$outboundSchema),
|
|
251
|
-
activeMeters: z.array(CustomerStateMeter$outboundSchema),
|
|
252
|
-
avatarUrl: z.string(),
|
|
253
|
-
}),
|
|
254
|
-
z.transform((v) => {
|
|
255
|
-
return remap$(v, {
|
|
256
|
-
createdAt: "created_at",
|
|
257
|
-
modifiedAt: "modified_at",
|
|
258
|
-
externalId: "external_id",
|
|
259
|
-
emailVerified: "email_verified",
|
|
260
|
-
billingAddress: "billing_address",
|
|
261
|
-
taxId: "tax_id",
|
|
262
|
-
organizationId: "organization_id",
|
|
263
|
-
deletedAt: "deleted_at",
|
|
264
|
-
activeSubscriptions: "active_subscriptions",
|
|
265
|
-
grantedBenefits: "granted_benefits",
|
|
266
|
-
activeMeters: "active_meters",
|
|
267
|
-
avatarUrl: "avatar_url",
|
|
268
|
-
});
|
|
269
|
-
}),
|
|
270
|
-
);
|
|
41
|
+
> = z.union([
|
|
42
|
+
CustomerStateIndividual$outboundSchema,
|
|
43
|
+
CustomerStateTeam$outboundSchema,
|
|
44
|
+
]);
|
|
271
45
|
|
|
272
46
|
export function customerStateToJSON(customerState: CustomerState): string {
|
|
273
47
|
return JSON.stringify(CustomerState$outboundSchema.parse(customerState));
|