@polar-sh/sdk 0.34.3 → 0.34.5
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 +20 -38
- package/bin/mcp-server.js +311 -364
- package/bin/mcp-server.js.map +10 -10
- package/dist/commonjs/funcs/checkoutsClientGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/checkoutsClientGet.js +7 -2
- package/dist/commonjs/funcs/checkoutsClientGet.js.map +1 -1
- package/dist/commonjs/funcs/checkoutsClientUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/checkoutsClientUpdate.js +7 -2
- package/dist/commonjs/funcs/checkoutsClientUpdate.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysActivate.d.ts.map +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysActivate.js +7 -2
- package/dist/commonjs/funcs/customerPortalLicenseKeysActivate.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysDeactivate.d.ts.map +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysDeactivate.js +7 -2
- package/dist/commonjs/funcs/customerPortalLicenseKeysDeactivate.js.map +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysValidate.d.ts.map +1 -1
- package/dist/commonjs/funcs/customerPortalLicenseKeysValidate.js +7 -2
- package/dist/commonjs/funcs/customerPortalLicenseKeysValidate.js.map +1 -1
- package/dist/commonjs/funcs/oauth2Introspect.d.ts.map +1 -1
- package/dist/commonjs/funcs/oauth2Introspect.js +7 -2
- package/dist/commonjs/funcs/oauth2Introspect.js.map +1 -1
- package/dist/commonjs/funcs/oauth2Revoke.d.ts.map +1 -1
- package/dist/commonjs/funcs/oauth2Revoke.js +7 -2
- package/dist/commonjs/funcs/oauth2Revoke.js.map +1 -1
- package/dist/commonjs/funcs/oauth2Token.d.ts.map +1 -1
- package/dist/commonjs/funcs/oauth2Token.js +7 -2
- package/dist/commonjs/funcs/oauth2Token.js.map +1 -1
- package/dist/commonjs/funcs/subscriptionsList.js +1 -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/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.js +7 -11
- package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/benefitdiscordcreateproperties.d.ts +5 -0
- package/dist/commonjs/models/components/benefitdiscordcreateproperties.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitdiscordcreateproperties.js +4 -0
- package/dist/commonjs/models/components/benefitdiscordcreateproperties.js.map +1 -1
- package/dist/commonjs/models/components/benefitdiscordproperties.d.ts +5 -0
- package/dist/commonjs/models/components/benefitdiscordproperties.d.ts.map +1 -1
- package/dist/commonjs/models/components/benefitdiscordproperties.js +4 -0
- package/dist/commonjs/models/components/benefitdiscordproperties.js.map +1 -1
- package/dist/commonjs/models/components/organization.d.ts +3 -0
- package/dist/commonjs/models/components/organization.d.ts.map +1 -1
- package/dist/commonjs/models/components/organization.js +5 -0
- package/dist/commonjs/models/components/organization.js.map +1 -1
- package/dist/commonjs/models/components/organizationcreate.d.ts +3 -0
- package/dist/commonjs/models/components/organizationcreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/organizationcreate.js +5 -0
- package/dist/commonjs/models/components/organizationcreate.js.map +1 -1
- package/dist/commonjs/models/components/organizationnotificationsettings.d.ts +31 -0
- package/dist/commonjs/models/components/organizationnotificationsettings.d.ts.map +1 -0
- package/dist/commonjs/models/components/organizationnotificationsettings.js +72 -0
- package/dist/commonjs/models/components/organizationnotificationsettings.js.map +1 -0
- package/dist/commonjs/models/components/organizationupdate.d.ts +3 -0
- package/dist/commonjs/models/components/organizationupdate.d.ts.map +1 -1
- package/dist/commonjs/models/components/organizationupdate.js +5 -0
- package/dist/commonjs/models/components/organizationupdate.js.map +1 -1
- package/dist/commonjs/models/errors/sdkerror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/sdkerror.js +8 -2
- package/dist/commonjs/models/errors/sdkerror.js.map +1 -1
- package/dist/commonjs/models/operations/eventslist.d.ts +13 -13
- package/dist/commonjs/models/operations/eventslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/eventslist.js +16 -16
- package/dist/commonjs/models/operations/eventslist.js.map +1 -1
- package/dist/commonjs/models/operations/eventslistnames.d.ts +13 -13
- package/dist/commonjs/models/operations/eventslistnames.d.ts.map +1 -1
- package/dist/commonjs/models/operations/eventslistnames.js +16 -16
- package/dist/commonjs/models/operations/eventslistnames.js.map +1 -1
- package/dist/commonjs/models/operations/subscriptionslist.d.ts +29 -0
- package/dist/commonjs/models/operations/subscriptionslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/subscriptionslist.js +30 -1
- package/dist/commonjs/models/operations/subscriptionslist.js.map +1 -1
- package/dist/commonjs/sdk/downloadables.d.ts +0 -5
- package/dist/commonjs/sdk/downloadables.d.ts.map +1 -1
- package/dist/commonjs/sdk/downloadables.js +0 -8
- package/dist/commonjs/sdk/downloadables.js.map +1 -1
- package/dist/commonjs/sdk/oauth2.d.ts +0 -3
- package/dist/commonjs/sdk/oauth2.d.ts.map +1 -1
- package/dist/commonjs/sdk/oauth2.js +0 -4
- package/dist/commonjs/sdk/oauth2.js.map +1 -1
- package/dist/esm/funcs/checkoutsClientGet.d.ts.map +1 -1
- package/dist/esm/funcs/checkoutsClientGet.js +7 -2
- package/dist/esm/funcs/checkoutsClientGet.js.map +1 -1
- package/dist/esm/funcs/checkoutsClientUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/checkoutsClientUpdate.js +7 -2
- package/dist/esm/funcs/checkoutsClientUpdate.js.map +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysActivate.d.ts.map +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysActivate.js +7 -2
- package/dist/esm/funcs/customerPortalLicenseKeysActivate.js.map +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysDeactivate.d.ts.map +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysDeactivate.js +7 -2
- package/dist/esm/funcs/customerPortalLicenseKeysDeactivate.js.map +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysValidate.d.ts.map +1 -1
- package/dist/esm/funcs/customerPortalLicenseKeysValidate.js +7 -2
- package/dist/esm/funcs/customerPortalLicenseKeysValidate.js.map +1 -1
- package/dist/esm/funcs/oauth2Introspect.d.ts.map +1 -1
- package/dist/esm/funcs/oauth2Introspect.js +7 -2
- package/dist/esm/funcs/oauth2Introspect.js.map +1 -1
- package/dist/esm/funcs/oauth2Revoke.d.ts.map +1 -1
- package/dist/esm/funcs/oauth2Revoke.js +7 -2
- package/dist/esm/funcs/oauth2Revoke.js.map +1 -1
- package/dist/esm/funcs/oauth2Token.d.ts.map +1 -1
- package/dist/esm/funcs/oauth2Token.js +7 -2
- package/dist/esm/funcs/oauth2Token.js.map +1 -1
- package/dist/esm/funcs/subscriptionsList.js +1 -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/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.js +7 -11
- package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/benefitdiscordcreateproperties.d.ts +5 -0
- package/dist/esm/models/components/benefitdiscordcreateproperties.d.ts.map +1 -1
- package/dist/esm/models/components/benefitdiscordcreateproperties.js +4 -0
- package/dist/esm/models/components/benefitdiscordcreateproperties.js.map +1 -1
- package/dist/esm/models/components/benefitdiscordproperties.d.ts +5 -0
- package/dist/esm/models/components/benefitdiscordproperties.d.ts.map +1 -1
- package/dist/esm/models/components/benefitdiscordproperties.js +4 -0
- package/dist/esm/models/components/benefitdiscordproperties.js.map +1 -1
- package/dist/esm/models/components/organization.d.ts +3 -0
- package/dist/esm/models/components/organization.d.ts.map +1 -1
- package/dist/esm/models/components/organization.js +5 -0
- package/dist/esm/models/components/organization.js.map +1 -1
- package/dist/esm/models/components/organizationcreate.d.ts +3 -0
- package/dist/esm/models/components/organizationcreate.d.ts.map +1 -1
- package/dist/esm/models/components/organizationcreate.js +5 -0
- package/dist/esm/models/components/organizationcreate.js.map +1 -1
- package/dist/esm/models/components/organizationnotificationsettings.d.ts +31 -0
- package/dist/esm/models/components/organizationnotificationsettings.d.ts.map +1 -0
- package/dist/esm/models/components/organizationnotificationsettings.js +44 -0
- package/dist/esm/models/components/organizationnotificationsettings.js.map +1 -0
- package/dist/esm/models/components/organizationupdate.d.ts +3 -0
- package/dist/esm/models/components/organizationupdate.d.ts.map +1 -1
- package/dist/esm/models/components/organizationupdate.js +5 -0
- package/dist/esm/models/components/organizationupdate.js.map +1 -1
- package/dist/esm/models/errors/sdkerror.d.ts.map +1 -1
- package/dist/esm/models/errors/sdkerror.js +8 -2
- package/dist/esm/models/errors/sdkerror.js.map +1 -1
- package/dist/esm/models/operations/eventslist.d.ts +13 -13
- package/dist/esm/models/operations/eventslist.d.ts.map +1 -1
- package/dist/esm/models/operations/eventslist.js +13 -13
- package/dist/esm/models/operations/eventslist.js.map +1 -1
- package/dist/esm/models/operations/eventslistnames.d.ts +13 -13
- package/dist/esm/models/operations/eventslistnames.d.ts.map +1 -1
- package/dist/esm/models/operations/eventslistnames.js +13 -13
- package/dist/esm/models/operations/eventslistnames.js.map +1 -1
- package/dist/esm/models/operations/subscriptionslist.d.ts +29 -0
- package/dist/esm/models/operations/subscriptionslist.d.ts.map +1 -1
- package/dist/esm/models/operations/subscriptionslist.js +27 -0
- package/dist/esm/models/operations/subscriptionslist.js.map +1 -1
- package/dist/esm/sdk/downloadables.d.ts +0 -5
- package/dist/esm/sdk/downloadables.d.ts.map +1 -1
- package/dist/esm/sdk/downloadables.js +0 -8
- package/dist/esm/sdk/downloadables.js.map +1 -1
- package/dist/esm/sdk/oauth2.d.ts +0 -3
- package/dist/esm/sdk/oauth2.d.ts.map +1 -1
- package/dist/esm/sdk/oauth2.js +0 -4
- package/dist/esm/sdk/oauth2.js.map +1 -1
- package/docs/sdks/checkouts/README.md +12 -4
- package/docs/sdks/downloadables/README.md +0 -70
- package/docs/sdks/oauth2/README.md +18 -6
- package/docs/sdks/polarlicensekeys/README.md +18 -6
- package/examples/README.md +26 -0
- package/examples/organizationsList.example.ts +26 -0
- package/examples/package-lock.json +634 -0
- package/examples/package.json +18 -0
- package/jsr.json +1 -1
- package/package.json +4 -4
- package/src/funcs/checkoutsClientGet.ts +8 -2
- package/src/funcs/checkoutsClientUpdate.ts +8 -2
- package/src/funcs/customerPortalLicenseKeysActivate.ts +8 -2
- package/src/funcs/customerPortalLicenseKeysDeactivate.ts +8 -2
- package/src/funcs/customerPortalLicenseKeysValidate.ts +8 -2
- package/src/funcs/oauth2Introspect.ts +8 -2
- package/src/funcs/oauth2Revoke.ts +8 -2
- package/src/funcs/oauth2Token.ts +8 -2
- package/src/funcs/subscriptionsList.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/cli/start/command.ts +7 -12
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/benefitdiscordcreateproperties.ts +9 -0
- package/src/models/components/benefitdiscordproperties.ts +9 -0
- package/src/models/components/organization.ts +12 -0
- package/src/models/components/organizationcreate.ts +19 -0
- package/src/models/components/organizationnotificationsettings.ts +83 -0
- package/src/models/components/organizationupdate.ts +19 -0
- package/src/models/errors/sdkerror.ts +8 -2
- package/src/models/operations/eventslist.ts +27 -21
- package/src/models/operations/eventslistnames.ts +39 -27
- package/src/models/operations/subscriptionslist.ts +64 -0
- package/src/sdk/downloadables.ts +0 -17
- package/src/sdk/oauth2.ts +0 -6
- package/dist/commonjs/funcs/customerPortalDownloadablesGet.d.ts +0 -15
- package/dist/commonjs/funcs/customerPortalDownloadablesGet.d.ts.map +0 -1
- package/dist/commonjs/funcs/customerPortalDownloadablesGet.js +0 -107
- package/dist/commonjs/funcs/customerPortalDownloadablesGet.js.map +0 -1
- package/dist/commonjs/funcs/oauth2ClientsCreate.d.ts +0 -18
- package/dist/commonjs/funcs/oauth2ClientsCreate.d.ts.map +0 -1
- package/dist/commonjs/funcs/oauth2ClientsCreate.js +0 -109
- package/dist/commonjs/funcs/oauth2ClientsCreate.js.map +0 -1
- package/dist/commonjs/funcs/oauth2ClientsDelete.d.ts +0 -18
- package/dist/commonjs/funcs/oauth2ClientsDelete.d.ts.map +0 -1
- package/dist/commonjs/funcs/oauth2ClientsDelete.js +0 -114
- package/dist/commonjs/funcs/oauth2ClientsDelete.js.map +0 -1
- package/dist/commonjs/funcs/oauth2ClientsGet.d.ts +0 -18
- package/dist/commonjs/funcs/oauth2ClientsGet.d.ts.map +0 -1
- package/dist/commonjs/funcs/oauth2ClientsGet.js +0 -114
- package/dist/commonjs/funcs/oauth2ClientsGet.js.map +0 -1
- package/dist/commonjs/funcs/oauth2ClientsList.d.ts +0 -21
- package/dist/commonjs/funcs/oauth2ClientsList.d.ts.map +0 -1
- package/dist/commonjs/funcs/oauth2ClientsList.js +0 -147
- package/dist/commonjs/funcs/oauth2ClientsList.js.map +0 -1
- package/dist/commonjs/funcs/oauth2ClientsUpdate.d.ts +0 -18
- package/dist/commonjs/funcs/oauth2ClientsUpdate.d.ts.map +0 -1
- package/dist/commonjs/funcs/oauth2ClientsUpdate.js +0 -117
- package/dist/commonjs/funcs/oauth2ClientsUpdate.js.map +0 -1
- package/dist/commonjs/models/components/listresourceoauth2client.d.ts +0 -33
- package/dist/commonjs/models/components/listresourceoauth2client.d.ts.map +0 -1
- package/dist/commonjs/models/components/listresourceoauth2client.js +0 -63
- package/dist/commonjs/models/components/listresourceoauth2client.js.map +0 -1
- package/dist/commonjs/models/components/oauth2client.d.ts +0 -119
- package/dist/commonjs/models/components/oauth2client.d.ts.map +0 -1
- package/dist/commonjs/models/components/oauth2client.js +0 -166
- package/dist/commonjs/models/components/oauth2client.js.map +0 -1
- package/dist/commonjs/models/components/oauth2clientconfiguration.d.ts +0 -101
- package/dist/commonjs/models/components/oauth2clientconfiguration.d.ts.map +0 -1
- package/dist/commonjs/models/components/oauth2clientconfiguration.js +0 -144
- package/dist/commonjs/models/components/oauth2clientconfiguration.js.map +0 -1
- package/dist/commonjs/models/components/oauth2clientconfigurationupdate.d.ts +0 -103
- package/dist/commonjs/models/components/oauth2clientconfigurationupdate.d.ts.map +0 -1
- package/dist/commonjs/models/components/oauth2clientconfigurationupdate.js +0 -150
- package/dist/commonjs/models/components/oauth2clientconfigurationupdate.js.map +0 -1
- package/dist/commonjs/models/operations/customerportaldownloadablescustomerportaldownloadablesget.d.ts +0 -29
- package/dist/commonjs/models/operations/customerportaldownloadablescustomerportaldownloadablesget.d.ts.map +0 -1
- package/dist/commonjs/models/operations/customerportaldownloadablescustomerportaldownloadablesget.js +0 -61
- package/dist/commonjs/models/operations/customerportaldownloadablescustomerportaldownloadablesget.js.map +0 -1
- package/dist/commonjs/models/operations/oauth2clientslist.d.ts +0 -63
- package/dist/commonjs/models/operations/oauth2clientslist.d.ts.map +0 -1
- package/dist/commonjs/models/operations/oauth2clientslist.js +0 -98
- package/dist/commonjs/models/operations/oauth2clientslist.js.map +0 -1
- package/dist/commonjs/models/operations/oauth2clientsoauth2deleteclient.d.ts +0 -29
- package/dist/commonjs/models/operations/oauth2clientsoauth2deleteclient.d.ts.map +0 -1
- package/dist/commonjs/models/operations/oauth2clientsoauth2deleteclient.js +0 -68
- package/dist/commonjs/models/operations/oauth2clientsoauth2deleteclient.js.map +0 -1
- package/dist/commonjs/models/operations/oauth2clientsoauth2getclient.d.ts +0 -29
- package/dist/commonjs/models/operations/oauth2clientsoauth2getclient.d.ts.map +0 -1
- package/dist/commonjs/models/operations/oauth2clientsoauth2getclient.js +0 -68
- package/dist/commonjs/models/operations/oauth2clientsoauth2getclient.js.map +0 -1
- package/dist/commonjs/models/operations/oauth2clientsoauth2updateclient.d.ts +0 -32
- package/dist/commonjs/models/operations/oauth2clientsoauth2updateclient.d.ts.map +0 -1
- package/dist/commonjs/models/operations/oauth2clientsoauth2updateclient.js +0 -73
- package/dist/commonjs/models/operations/oauth2clientsoauth2updateclient.js.map +0 -1
- package/dist/commonjs/sdk/clients.d.ts +0 -47
- package/dist/commonjs/sdk/clients.d.ts.map +0 -1
- package/dist/commonjs/sdk/clients.js +0 -63
- package/dist/commonjs/sdk/clients.js.map +0 -1
- package/dist/esm/funcs/customerPortalDownloadablesGet.d.ts +0 -15
- package/dist/esm/funcs/customerPortalDownloadablesGet.d.ts.map +0 -1
- package/dist/esm/funcs/customerPortalDownloadablesGet.js +0 -81
- package/dist/esm/funcs/customerPortalDownloadablesGet.js.map +0 -1
- package/dist/esm/funcs/oauth2ClientsCreate.d.ts +0 -18
- package/dist/esm/funcs/oauth2ClientsCreate.d.ts.map +0 -1
- package/dist/esm/funcs/oauth2ClientsCreate.js +0 -83
- package/dist/esm/funcs/oauth2ClientsCreate.js.map +0 -1
- package/dist/esm/funcs/oauth2ClientsDelete.d.ts +0 -18
- package/dist/esm/funcs/oauth2ClientsDelete.d.ts.map +0 -1
- package/dist/esm/funcs/oauth2ClientsDelete.js +0 -88
- package/dist/esm/funcs/oauth2ClientsDelete.js.map +0 -1
- package/dist/esm/funcs/oauth2ClientsGet.d.ts +0 -18
- package/dist/esm/funcs/oauth2ClientsGet.d.ts.map +0 -1
- package/dist/esm/funcs/oauth2ClientsGet.js +0 -88
- package/dist/esm/funcs/oauth2ClientsGet.js.map +0 -1
- package/dist/esm/funcs/oauth2ClientsList.d.ts +0 -21
- package/dist/esm/funcs/oauth2ClientsList.d.ts.map +0 -1
- package/dist/esm/funcs/oauth2ClientsList.js +0 -121
- package/dist/esm/funcs/oauth2ClientsList.js.map +0 -1
- package/dist/esm/funcs/oauth2ClientsUpdate.d.ts +0 -18
- package/dist/esm/funcs/oauth2ClientsUpdate.d.ts.map +0 -1
- package/dist/esm/funcs/oauth2ClientsUpdate.js +0 -91
- package/dist/esm/funcs/oauth2ClientsUpdate.js.map +0 -1
- package/dist/esm/models/components/listresourceoauth2client.d.ts +0 -33
- package/dist/esm/models/components/listresourceoauth2client.d.ts.map +0 -1
- package/dist/esm/models/components/listresourceoauth2client.js +0 -35
- package/dist/esm/models/components/listresourceoauth2client.js.map +0 -1
- package/dist/esm/models/components/oauth2client.d.ts +0 -119
- package/dist/esm/models/components/oauth2client.d.ts.map +0 -1
- package/dist/esm/models/components/oauth2client.js +0 -138
- package/dist/esm/models/components/oauth2client.js.map +0 -1
- package/dist/esm/models/components/oauth2clientconfiguration.d.ts +0 -101
- package/dist/esm/models/components/oauth2clientconfiguration.d.ts.map +0 -1
- package/dist/esm/models/components/oauth2clientconfiguration.js +0 -116
- package/dist/esm/models/components/oauth2clientconfiguration.js.map +0 -1
- package/dist/esm/models/components/oauth2clientconfigurationupdate.d.ts +0 -103
- package/dist/esm/models/components/oauth2clientconfigurationupdate.d.ts.map +0 -1
- package/dist/esm/models/components/oauth2clientconfigurationupdate.js +0 -122
- package/dist/esm/models/components/oauth2clientconfigurationupdate.js.map +0 -1
- package/dist/esm/models/operations/customerportaldownloadablescustomerportaldownloadablesget.d.ts +0 -29
- package/dist/esm/models/operations/customerportaldownloadablescustomerportaldownloadablesget.d.ts.map +0 -1
- package/dist/esm/models/operations/customerportaldownloadablescustomerportaldownloadablesget.js +0 -33
- package/dist/esm/models/operations/customerportaldownloadablescustomerportaldownloadablesget.js.map +0 -1
- package/dist/esm/models/operations/oauth2clientslist.d.ts +0 -63
- package/dist/esm/models/operations/oauth2clientslist.d.ts.map +0 -1
- package/dist/esm/models/operations/oauth2clientslist.js +0 -68
- package/dist/esm/models/operations/oauth2clientslist.js.map +0 -1
- package/dist/esm/models/operations/oauth2clientsoauth2deleteclient.d.ts +0 -29
- package/dist/esm/models/operations/oauth2clientsoauth2deleteclient.d.ts.map +0 -1
- package/dist/esm/models/operations/oauth2clientsoauth2deleteclient.js +0 -40
- package/dist/esm/models/operations/oauth2clientsoauth2deleteclient.js.map +0 -1
- package/dist/esm/models/operations/oauth2clientsoauth2getclient.d.ts +0 -29
- package/dist/esm/models/operations/oauth2clientsoauth2getclient.d.ts.map +0 -1
- package/dist/esm/models/operations/oauth2clientsoauth2getclient.js +0 -40
- package/dist/esm/models/operations/oauth2clientsoauth2getclient.js.map +0 -1
- package/dist/esm/models/operations/oauth2clientsoauth2updateclient.d.ts +0 -32
- package/dist/esm/models/operations/oauth2clientsoauth2updateclient.d.ts.map +0 -1
- package/dist/esm/models/operations/oauth2clientsoauth2updateclient.js +0 -45
- package/dist/esm/models/operations/oauth2clientsoauth2updateclient.js.map +0 -1
- package/dist/esm/sdk/clients.d.ts +0 -47
- package/dist/esm/sdk/clients.d.ts.map +0 -1
- package/dist/esm/sdk/clients.js +0 -59
- package/dist/esm/sdk/clients.js.map +0 -1
- package/docs/sdks/clients/README.md +0 -401
- package/src/funcs/customerPortalDownloadablesGet.ts +0 -179
- package/src/funcs/oauth2ClientsCreate.ts +0 -176
- package/src/funcs/oauth2ClientsDelete.ts +0 -183
- package/src/funcs/oauth2ClientsGet.ts +0 -182
- package/src/funcs/oauth2ClientsList.ts +0 -255
- package/src/funcs/oauth2ClientsUpdate.ts +0 -186
- package/src/models/components/listresourceoauth2client.ts +0 -82
- package/src/models/components/oauth2client.ts +0 -231
- package/src/models/components/oauth2clientconfiguration.ts +0 -205
- package/src/models/components/oauth2clientconfigurationupdate.ts +0 -213
- package/src/models/operations/customerportaldownloadablescustomerportaldownloadablesget.ts +0 -79
- package/src/models/operations/oauth2clientslist.ts +0 -149
- package/src/models/operations/oauth2clientsoauth2deleteclient.ts +0 -81
- package/src/models/operations/oauth2clientsoauth2getclient.ts +0 -80
- package/src/models/operations/oauth2clientsoauth2updateclient.ts +0 -95
- package/src/sdk/clients.ts +0 -107
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
# Clients
|
|
2
|
-
(*oauth2.clients*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [list](#list) - List Clients
|
|
9
|
-
* [create](#create) - Create Client
|
|
10
|
-
* [get](#get) - Get Client
|
|
11
|
-
* [update](#update) - Update Client
|
|
12
|
-
* [delete](#delete) - Delete Client
|
|
13
|
-
|
|
14
|
-
## list
|
|
15
|
-
|
|
16
|
-
List OAuth2 clients.
|
|
17
|
-
|
|
18
|
-
### Example Usage
|
|
19
|
-
|
|
20
|
-
```typescript
|
|
21
|
-
import { Polar } from "@polar-sh/sdk";
|
|
22
|
-
|
|
23
|
-
const polar = new Polar({
|
|
24
|
-
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
async function run() {
|
|
28
|
-
const result = await polar.oauth2.clients.list({});
|
|
29
|
-
|
|
30
|
-
for await (const page of result) {
|
|
31
|
-
console.log(page);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
run();
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Standalone function
|
|
39
|
-
|
|
40
|
-
The standalone function version of this method:
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
44
|
-
import { oauth2ClientsList } from "@polar-sh/sdk/funcs/oauth2ClientsList.js";
|
|
45
|
-
|
|
46
|
-
// Use `PolarCore` for best tree-shaking performance.
|
|
47
|
-
// You can create one instance of it to use across an application.
|
|
48
|
-
const polar = new PolarCore({
|
|
49
|
-
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
async function run() {
|
|
53
|
-
const res = await oauth2ClientsList(polar, {});
|
|
54
|
-
if (res.ok) {
|
|
55
|
-
const { value: result } = res;
|
|
56
|
-
for await (const page of result) {
|
|
57
|
-
console.log(page);
|
|
58
|
-
}
|
|
59
|
-
} else {
|
|
60
|
-
console.log("oauth2ClientsList failed:", res.error);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
run();
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Parameters
|
|
68
|
-
|
|
69
|
-
| Parameter | Type | Required | Description |
|
|
70
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
71
|
-
| `request` | [operations.Oauth2ClientsListRequest](../../models/operations/oauth2clientslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
72
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
73
|
-
| `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. |
|
|
74
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
75
|
-
|
|
76
|
-
### Response
|
|
77
|
-
|
|
78
|
-
**Promise\<[operations.Oauth2ClientsListResponse](../../models/operations/oauth2clientslistresponse.md)\>**
|
|
79
|
-
|
|
80
|
-
### Errors
|
|
81
|
-
|
|
82
|
-
| Error Type | Status Code | Content Type |
|
|
83
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
84
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
85
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
86
|
-
|
|
87
|
-
## create
|
|
88
|
-
|
|
89
|
-
Create an OAuth2 client.
|
|
90
|
-
|
|
91
|
-
### Example Usage
|
|
92
|
-
|
|
93
|
-
```typescript
|
|
94
|
-
import { Polar } from "@polar-sh/sdk";
|
|
95
|
-
|
|
96
|
-
const polar = new Polar({
|
|
97
|
-
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
async function run() {
|
|
101
|
-
const result = await polar.oauth2.clients.create({
|
|
102
|
-
redirectUris: [
|
|
103
|
-
"https://impolite-hippodrome.com/",
|
|
104
|
-
"https://acidic-tomography.net/",
|
|
105
|
-
],
|
|
106
|
-
clientName: "<value>",
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
console.log(result);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
run();
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Standalone function
|
|
116
|
-
|
|
117
|
-
The standalone function version of this method:
|
|
118
|
-
|
|
119
|
-
```typescript
|
|
120
|
-
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
121
|
-
import { oauth2ClientsCreate } from "@polar-sh/sdk/funcs/oauth2ClientsCreate.js";
|
|
122
|
-
|
|
123
|
-
// Use `PolarCore` for best tree-shaking performance.
|
|
124
|
-
// You can create one instance of it to use across an application.
|
|
125
|
-
const polar = new PolarCore({
|
|
126
|
-
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
async function run() {
|
|
130
|
-
const res = await oauth2ClientsCreate(polar, {
|
|
131
|
-
redirectUris: [
|
|
132
|
-
"https://impolite-hippodrome.com/",
|
|
133
|
-
"https://acidic-tomography.net/",
|
|
134
|
-
],
|
|
135
|
-
clientName: "<value>",
|
|
136
|
-
});
|
|
137
|
-
if (res.ok) {
|
|
138
|
-
const { value: result } = res;
|
|
139
|
-
console.log(result);
|
|
140
|
-
} else {
|
|
141
|
-
console.log("oauth2ClientsCreate failed:", res.error);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
run();
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### Parameters
|
|
149
|
-
|
|
150
|
-
| Parameter | Type | Required | Description |
|
|
151
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
152
|
-
| `request` | [components.OAuth2ClientConfiguration](../../models/components/oauth2clientconfiguration.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\<[any](../../models/.md)\>**
|
|
160
|
-
|
|
161
|
-
### Errors
|
|
162
|
-
|
|
163
|
-
| Error Type | Status Code | Content Type |
|
|
164
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
165
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
166
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
167
|
-
|
|
168
|
-
## get
|
|
169
|
-
|
|
170
|
-
Get an OAuth2 client by Client ID.
|
|
171
|
-
|
|
172
|
-
### Example Usage
|
|
173
|
-
|
|
174
|
-
```typescript
|
|
175
|
-
import { Polar } from "@polar-sh/sdk";
|
|
176
|
-
|
|
177
|
-
const polar = new Polar({
|
|
178
|
-
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
async function run() {
|
|
182
|
-
const result = await polar.oauth2.clients.get({
|
|
183
|
-
clientId: "<id>",
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
console.log(result);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
run();
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
### Standalone function
|
|
193
|
-
|
|
194
|
-
The standalone function version of this method:
|
|
195
|
-
|
|
196
|
-
```typescript
|
|
197
|
-
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
198
|
-
import { oauth2ClientsGet } from "@polar-sh/sdk/funcs/oauth2ClientsGet.js";
|
|
199
|
-
|
|
200
|
-
// Use `PolarCore` for best tree-shaking performance.
|
|
201
|
-
// You can create one instance of it to use across an application.
|
|
202
|
-
const polar = new PolarCore({
|
|
203
|
-
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
async function run() {
|
|
207
|
-
const res = await oauth2ClientsGet(polar, {
|
|
208
|
-
clientId: "<id>",
|
|
209
|
-
});
|
|
210
|
-
if (res.ok) {
|
|
211
|
-
const { value: result } = res;
|
|
212
|
-
console.log(result);
|
|
213
|
-
} else {
|
|
214
|
-
console.log("oauth2ClientsGet failed:", res.error);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
run();
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### Parameters
|
|
222
|
-
|
|
223
|
-
| Parameter | Type | Required | Description |
|
|
224
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
225
|
-
| `request` | [operations.Oauth2ClientsOauth2GetClientRequest](../../models/operations/oauth2clientsoauth2getclientrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
226
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
227
|
-
| `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. |
|
|
228
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
229
|
-
|
|
230
|
-
### Response
|
|
231
|
-
|
|
232
|
-
**Promise\<[any](../../models/.md)\>**
|
|
233
|
-
|
|
234
|
-
### Errors
|
|
235
|
-
|
|
236
|
-
| Error Type | Status Code | Content Type |
|
|
237
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
238
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
239
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
240
|
-
|
|
241
|
-
## update
|
|
242
|
-
|
|
243
|
-
Update an OAuth2 client.
|
|
244
|
-
|
|
245
|
-
### Example Usage
|
|
246
|
-
|
|
247
|
-
```typescript
|
|
248
|
-
import { Polar } from "@polar-sh/sdk";
|
|
249
|
-
|
|
250
|
-
const polar = new Polar({
|
|
251
|
-
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
async function run() {
|
|
255
|
-
const result = await polar.oauth2.clients.update({
|
|
256
|
-
clientId: "<id>",
|
|
257
|
-
oAuth2ClientConfigurationUpdate: {
|
|
258
|
-
redirectUris: [
|
|
259
|
-
"https://classic-cantaloupe.org",
|
|
260
|
-
"https://corrupt-status.biz/",
|
|
261
|
-
],
|
|
262
|
-
clientName: "<value>",
|
|
263
|
-
clientId: "<id>",
|
|
264
|
-
},
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
console.log(result);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
run();
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
### Standalone function
|
|
274
|
-
|
|
275
|
-
The standalone function version of this method:
|
|
276
|
-
|
|
277
|
-
```typescript
|
|
278
|
-
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
279
|
-
import { oauth2ClientsUpdate } from "@polar-sh/sdk/funcs/oauth2ClientsUpdate.js";
|
|
280
|
-
|
|
281
|
-
// Use `PolarCore` for best tree-shaking performance.
|
|
282
|
-
// You can create one instance of it to use across an application.
|
|
283
|
-
const polar = new PolarCore({
|
|
284
|
-
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
async function run() {
|
|
288
|
-
const res = await oauth2ClientsUpdate(polar, {
|
|
289
|
-
clientId: "<id>",
|
|
290
|
-
oAuth2ClientConfigurationUpdate: {
|
|
291
|
-
redirectUris: [
|
|
292
|
-
"https://classic-cantaloupe.org",
|
|
293
|
-
"https://corrupt-status.biz/",
|
|
294
|
-
],
|
|
295
|
-
clientName: "<value>",
|
|
296
|
-
clientId: "<id>",
|
|
297
|
-
},
|
|
298
|
-
});
|
|
299
|
-
if (res.ok) {
|
|
300
|
-
const { value: result } = res;
|
|
301
|
-
console.log(result);
|
|
302
|
-
} else {
|
|
303
|
-
console.log("oauth2ClientsUpdate failed:", res.error);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
run();
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
### Parameters
|
|
311
|
-
|
|
312
|
-
| Parameter | Type | Required | Description |
|
|
313
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
314
|
-
| `request` | [operations.Oauth2ClientsOauth2UpdateClientRequest](../../models/operations/oauth2clientsoauth2updateclientrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
315
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
316
|
-
| `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. |
|
|
317
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
318
|
-
|
|
319
|
-
### Response
|
|
320
|
-
|
|
321
|
-
**Promise\<[any](../../models/.md)\>**
|
|
322
|
-
|
|
323
|
-
### Errors
|
|
324
|
-
|
|
325
|
-
| Error Type | Status Code | Content Type |
|
|
326
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
327
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
328
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
329
|
-
|
|
330
|
-
## delete
|
|
331
|
-
|
|
332
|
-
Delete an OAuth2 client.
|
|
333
|
-
|
|
334
|
-
### Example Usage
|
|
335
|
-
|
|
336
|
-
```typescript
|
|
337
|
-
import { Polar } from "@polar-sh/sdk";
|
|
338
|
-
|
|
339
|
-
const polar = new Polar({
|
|
340
|
-
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
341
|
-
});
|
|
342
|
-
|
|
343
|
-
async function run() {
|
|
344
|
-
const result = await polar.oauth2.clients.delete({
|
|
345
|
-
clientId: "<id>",
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
console.log(result);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
run();
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
### Standalone function
|
|
355
|
-
|
|
356
|
-
The standalone function version of this method:
|
|
357
|
-
|
|
358
|
-
```typescript
|
|
359
|
-
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
360
|
-
import { oauth2ClientsDelete } from "@polar-sh/sdk/funcs/oauth2ClientsDelete.js";
|
|
361
|
-
|
|
362
|
-
// Use `PolarCore` for best tree-shaking performance.
|
|
363
|
-
// You can create one instance of it to use across an application.
|
|
364
|
-
const polar = new PolarCore({
|
|
365
|
-
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
366
|
-
});
|
|
367
|
-
|
|
368
|
-
async function run() {
|
|
369
|
-
const res = await oauth2ClientsDelete(polar, {
|
|
370
|
-
clientId: "<id>",
|
|
371
|
-
});
|
|
372
|
-
if (res.ok) {
|
|
373
|
-
const { value: result } = res;
|
|
374
|
-
console.log(result);
|
|
375
|
-
} else {
|
|
376
|
-
console.log("oauth2ClientsDelete failed:", res.error);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
run();
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
### Parameters
|
|
384
|
-
|
|
385
|
-
| Parameter | Type | Required | Description |
|
|
386
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
387
|
-
| `request` | [operations.Oauth2ClientsOauth2DeleteClientRequest](../../models/operations/oauth2clientsoauth2deleteclientrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
388
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
389
|
-
| `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. |
|
|
390
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
391
|
-
|
|
392
|
-
### Response
|
|
393
|
-
|
|
394
|
-
**Promise\<[any](../../models/.md)\>**
|
|
395
|
-
|
|
396
|
-
### Errors
|
|
397
|
-
|
|
398
|
-
| Error Type | Status Code | Content Type |
|
|
399
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
400
|
-
| errors.HTTPValidationError | 422 | application/json |
|
|
401
|
-
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { PolarCore } from "../core.js";
|
|
7
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
8
|
-
import * as M from "../lib/matchers.js";
|
|
9
|
-
import { compactMap } from "../lib/primitives.js";
|
|
10
|
-
import { safeParse } from "../lib/schemas.js";
|
|
11
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import {
|
|
21
|
-
HTTPValidationError,
|
|
22
|
-
HTTPValidationError$inboundSchema,
|
|
23
|
-
} from "../models/errors/httpvalidationerror.js";
|
|
24
|
-
import { PolarError } from "../models/errors/polarerror.js";
|
|
25
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
26
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
27
|
-
import {
|
|
28
|
-
CustomerPortalDownloadablesCustomerPortalDownloadablesGetRequest,
|
|
29
|
-
CustomerPortalDownloadablesCustomerPortalDownloadablesGetRequest$outboundSchema,
|
|
30
|
-
} from "../models/operations/customerportaldownloadablescustomerportaldownloadablesget.js";
|
|
31
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
32
|
-
import { Result } from "../types/fp.js";
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Get Downloadable
|
|
36
|
-
*/
|
|
37
|
-
export function customerPortalDownloadablesGet(
|
|
38
|
-
client: PolarCore,
|
|
39
|
-
request: CustomerPortalDownloadablesCustomerPortalDownloadablesGetRequest,
|
|
40
|
-
options?: RequestOptions,
|
|
41
|
-
): APIPromise<
|
|
42
|
-
Result<
|
|
43
|
-
any | undefined,
|
|
44
|
-
| HTTPValidationError
|
|
45
|
-
| PolarError
|
|
46
|
-
| ResponseValidationError
|
|
47
|
-
| ConnectionError
|
|
48
|
-
| RequestAbortedError
|
|
49
|
-
| RequestTimeoutError
|
|
50
|
-
| InvalidRequestError
|
|
51
|
-
| UnexpectedClientError
|
|
52
|
-
| SDKValidationError
|
|
53
|
-
>
|
|
54
|
-
> {
|
|
55
|
-
return new APIPromise($do(
|
|
56
|
-
client,
|
|
57
|
-
request,
|
|
58
|
-
options,
|
|
59
|
-
));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
async function $do(
|
|
63
|
-
client: PolarCore,
|
|
64
|
-
request: CustomerPortalDownloadablesCustomerPortalDownloadablesGetRequest,
|
|
65
|
-
options?: RequestOptions,
|
|
66
|
-
): Promise<
|
|
67
|
-
[
|
|
68
|
-
Result<
|
|
69
|
-
any | undefined,
|
|
70
|
-
| HTTPValidationError
|
|
71
|
-
| PolarError
|
|
72
|
-
| ResponseValidationError
|
|
73
|
-
| ConnectionError
|
|
74
|
-
| RequestAbortedError
|
|
75
|
-
| RequestTimeoutError
|
|
76
|
-
| InvalidRequestError
|
|
77
|
-
| UnexpectedClientError
|
|
78
|
-
| SDKValidationError
|
|
79
|
-
>,
|
|
80
|
-
APICall,
|
|
81
|
-
]
|
|
82
|
-
> {
|
|
83
|
-
const parsed = safeParse(
|
|
84
|
-
request,
|
|
85
|
-
(value) =>
|
|
86
|
-
CustomerPortalDownloadablesCustomerPortalDownloadablesGetRequest$outboundSchema
|
|
87
|
-
.parse(value),
|
|
88
|
-
"Input validation failed",
|
|
89
|
-
);
|
|
90
|
-
if (!parsed.ok) {
|
|
91
|
-
return [parsed, { status: "invalid" }];
|
|
92
|
-
}
|
|
93
|
-
const payload = parsed.value;
|
|
94
|
-
const body = null;
|
|
95
|
-
|
|
96
|
-
const pathParams = {
|
|
97
|
-
token: encodeSimple("token", payload.token, {
|
|
98
|
-
explode: false,
|
|
99
|
-
charEncoding: "percent",
|
|
100
|
-
}),
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
const path = pathToFunc("/v1/customer-portal/downloadables/{token}")(
|
|
104
|
-
pathParams,
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
const headers = new Headers(compactMap({
|
|
108
|
-
Accept: "application/json",
|
|
109
|
-
}));
|
|
110
|
-
|
|
111
|
-
const context = {
|
|
112
|
-
options: client._options,
|
|
113
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
114
|
-
operationID:
|
|
115
|
-
"customer_portal:downloadables:customer_portal.downloadables.get",
|
|
116
|
-
oAuth2Scopes: [],
|
|
117
|
-
|
|
118
|
-
resolvedSecurity: null,
|
|
119
|
-
|
|
120
|
-
securitySource: null,
|
|
121
|
-
retryConfig: options?.retries
|
|
122
|
-
|| client._options.retryConfig
|
|
123
|
-
|| { strategy: "none" },
|
|
124
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
const requestRes = client._createRequest(context, {
|
|
128
|
-
method: "GET",
|
|
129
|
-
baseURL: options?.serverURL,
|
|
130
|
-
path: path,
|
|
131
|
-
headers: headers,
|
|
132
|
-
body: body,
|
|
133
|
-
userAgent: client._options.userAgent,
|
|
134
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
135
|
-
}, options);
|
|
136
|
-
if (!requestRes.ok) {
|
|
137
|
-
return [requestRes, { status: "invalid" }];
|
|
138
|
-
}
|
|
139
|
-
const req = requestRes.value;
|
|
140
|
-
|
|
141
|
-
const doResult = await client._do(req, {
|
|
142
|
-
context,
|
|
143
|
-
errorCodes: ["400", "404", "410", "422", "4XX", "5XX"],
|
|
144
|
-
retryConfig: context.retryConfig,
|
|
145
|
-
retryCodes: context.retryCodes,
|
|
146
|
-
});
|
|
147
|
-
if (!doResult.ok) {
|
|
148
|
-
return [doResult, { status: "request-error", request: req }];
|
|
149
|
-
}
|
|
150
|
-
const response = doResult.value;
|
|
151
|
-
|
|
152
|
-
const responseFields = {
|
|
153
|
-
HttpMeta: { Response: response, Request: req },
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
const [result] = await M.match<
|
|
157
|
-
any | undefined,
|
|
158
|
-
| HTTPValidationError
|
|
159
|
-
| PolarError
|
|
160
|
-
| ResponseValidationError
|
|
161
|
-
| ConnectionError
|
|
162
|
-
| RequestAbortedError
|
|
163
|
-
| RequestTimeoutError
|
|
164
|
-
| InvalidRequestError
|
|
165
|
-
| UnexpectedClientError
|
|
166
|
-
| SDKValidationError
|
|
167
|
-
>(
|
|
168
|
-
M.json(200, z.any().optional()),
|
|
169
|
-
M.nil(302, z.any().optional()),
|
|
170
|
-
M.jsonErr(422, HTTPValidationError$inboundSchema),
|
|
171
|
-
M.fail([400, 404, 410, "4XX"]),
|
|
172
|
-
M.fail("5XX"),
|
|
173
|
-
)(response, req, { extraFields: responseFields });
|
|
174
|
-
if (!result.ok) {
|
|
175
|
-
return [result, { status: "complete", request: req, response }];
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
return [result, { status: "complete", request: req, response }];
|
|
179
|
-
}
|