@polar-sh/sdk 0.6.1 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -39
- package/docs/sdks/advertisements/README.md +7 -7
- package/docs/sdks/articles/README.md +12 -14
- package/docs/sdks/benefits/README.md +10 -12
- package/docs/sdks/checkouts/README.md +7 -7
- package/docs/sdks/clients/README.md +10 -10
- package/docs/sdks/downloadables/README.md +7 -7
- package/docs/sdks/externalorganizations/README.md +1 -1
- package/docs/sdks/files/README.md +4 -6
- package/docs/sdks/licensekeys/README.md +9 -9
- package/docs/sdks/metrics/README.md +13 -13
- package/docs/sdks/oauth2/README.md +4 -4
- package/docs/sdks/orders/README.md +8 -8
- package/docs/sdks/organizations/README.md +9 -9
- package/docs/sdks/polaradvertisements/README.md +10 -12
- package/docs/sdks/polarbenefits/README.md +7 -7
- package/docs/sdks/polarlicensekeys/README.md +9 -11
- package/docs/sdks/polarorders/README.md +8 -8
- package/docs/sdks/polarsubscriptions/README.md +10 -10
- package/docs/sdks/products/README.md +10 -10
- package/docs/sdks/repositories/README.md +8 -8
- package/docs/sdks/subscriptions/README.md +4 -4
- package/funcs/{organizationsRetrieve.d.ts → advertisementsGet.d.ts} +4 -4
- package/funcs/{checkoutsRetrieve.d.ts.map → advertisementsGet.d.ts.map} +1 -1
- package/funcs/{advertisementsRetrieve.js → advertisementsGet.js} +3 -3
- package/funcs/advertisementsGet.js.map +1 -0
- package/funcs/{articlesRetrieve.d.ts → articlesGet.d.ts} +2 -2
- package/funcs/articlesGet.d.ts.map +1 -0
- package/funcs/{articlesRetrieve.js → articlesGet.js} +3 -3
- package/funcs/articlesGet.js.map +1 -0
- package/funcs/{benefitsRetrieve.d.ts → benefitsGet.d.ts} +2 -2
- package/funcs/benefitsGet.d.ts.map +1 -0
- package/funcs/{benefitsRetrieve.js → benefitsGet.js} +3 -3
- package/funcs/benefitsGet.js.map +1 -0
- package/funcs/checkoutsGet.d.ts +17 -0
- package/funcs/checkoutsGet.d.ts.map +1 -0
- package/funcs/{checkoutsRetrieve.js → checkoutsGet.js} +3 -3
- package/funcs/checkoutsGet.js.map +1 -0
- package/funcs/{checkoutsRetrieve.d.ts → licenseKeysGet.d.ts} +4 -4
- package/funcs/licenseKeysGet.d.ts.map +1 -0
- package/funcs/{licenseKeysRetrieve.js → licenseKeysGet.js} +3 -3
- package/funcs/licenseKeysGet.js.map +1 -0
- package/funcs/{metricsRetrieve.d.ts → metricsGet.d.ts} +2 -2
- package/funcs/metricsGet.d.ts.map +1 -0
- package/funcs/{metricsRetrieve.js → metricsGet.js} +3 -3
- package/funcs/metricsGet.js.map +1 -0
- package/funcs/{usersAdvertisementsRetrieve.d.ts → oauth2ClientsGet.d.ts} +4 -5
- package/funcs/oauth2ClientsGet.d.ts.map +1 -0
- package/funcs/{oauth2ClientsRetrieve.js → oauth2ClientsGet.js} +3 -3
- package/funcs/oauth2ClientsGet.js.map +1 -0
- package/funcs/{ordersRetrieve.d.ts → ordersGet.d.ts} +2 -2
- package/funcs/ordersGet.d.ts.map +1 -0
- package/funcs/{ordersRetrieve.js → ordersGet.js} +3 -3
- package/funcs/ordersGet.js.map +1 -0
- package/funcs/organizationsGet.d.ts +17 -0
- package/funcs/{articlesRetrieve.d.ts.map → organizationsGet.d.ts.map} +1 -1
- package/funcs/{organizationsRetrieve.js → organizationsGet.js} +3 -3
- package/funcs/organizationsGet.js.map +1 -0
- package/funcs/{productsRetrieve.d.ts → productsGet.d.ts} +2 -2
- package/funcs/productsGet.d.ts.map +1 -0
- package/funcs/{productsRetrieve.js → productsGet.js} +3 -3
- package/funcs/productsGet.js.map +1 -0
- package/funcs/{repositoriesRetrieve.d.ts → repositoriesGet.d.ts} +2 -2
- package/funcs/{metricsRetrieve.d.ts.map → repositoriesGet.d.ts.map} +1 -1
- package/funcs/{repositoriesRetrieve.js → repositoriesGet.js} +3 -3
- package/funcs/repositoriesGet.js.map +1 -0
- package/funcs/subscriptionsImportSubscriptions.d.ts.map +1 -1
- package/funcs/subscriptionsImportSubscriptions.js +7 -0
- package/funcs/subscriptionsImportSubscriptions.js.map +1 -1
- package/funcs/{advertisementsRetrieve.d.ts → usersAdvertisementsGet.d.ts} +3 -3
- package/funcs/{advertisementsRetrieve.d.ts.map → usersAdvertisementsGet.d.ts.map} +1 -1
- package/funcs/{usersAdvertisementsRetrieve.js → usersAdvertisementsGet.js} +3 -3
- package/funcs/{advertisementsRetrieve.js.map → usersAdvertisementsGet.js.map} +1 -1
- package/funcs/{usersBenefitsRetrieve.d.ts → usersBenefitsGet.d.ts} +2 -2
- package/funcs/{benefitsRetrieve.d.ts.map → usersBenefitsGet.d.ts.map} +1 -1
- package/funcs/{usersBenefitsRetrieve.js → usersBenefitsGet.js} +3 -3
- package/funcs/usersBenefitsGet.js.map +1 -0
- package/funcs/{usersDownloadablesRetrieve.d.ts → usersDownloadablesGet.d.ts} +2 -2
- package/funcs/usersDownloadablesGet.d.ts.map +1 -0
- package/funcs/{usersDownloadablesRetrieve.js → usersDownloadablesGet.js} +3 -3
- package/funcs/usersDownloadablesGet.js.map +1 -0
- package/funcs/{licenseKeysRetrieve.d.ts → usersLicenseKeysGet.d.ts} +2 -2
- package/funcs/{licenseKeysRetrieve.d.ts.map → usersLicenseKeysGet.d.ts.map} +1 -1
- package/funcs/{usersLicenseKeysRetrieve.js → usersLicenseKeysGet.js} +3 -3
- package/funcs/{licenseKeysRetrieve.js.map → usersLicenseKeysGet.js.map} +1 -1
- package/funcs/{usersOrdersRetrieve.d.ts → usersOrdersGet.d.ts} +2 -2
- package/funcs/{ordersRetrieve.d.ts.map → usersOrdersGet.d.ts.map} +1 -1
- package/funcs/{usersOrdersRetrieve.js → usersOrdersGet.js} +3 -3
- package/funcs/usersOrdersGet.js.map +1 -0
- package/funcs/{usersSubscriptionsRetrieve.d.ts → usersSubscriptionsGet.d.ts} +2 -2
- package/funcs/{organizationsRetrieve.d.ts.map → usersSubscriptionsGet.d.ts.map} +1 -1
- package/funcs/{usersSubscriptionsRetrieve.js → usersSubscriptionsGet.js} +3 -3
- package/funcs/{organizationsRetrieve.js.map → usersSubscriptionsGet.js.map} +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +14 -0
- package/index.js.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/files.d.ts +8 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +36 -0
- package/lib/files.js.map +1 -0
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +12 -0
- package/lib/sdks.js.map +1 -1
- package/models/components/bodysubscriptionsimport.d.ts +2 -2
- package/models/components/bodysubscriptionsimport.d.ts.map +1 -1
- package/models/components/bodysubscriptionsimport.js +12 -3
- package/models/components/bodysubscriptionsimport.js.map +1 -1
- package/package.json +2 -1
- package/sdk/advertisements.d.ts +1 -1
- package/sdk/advertisements.d.ts.map +1 -1
- package/sdk/advertisements.js +3 -3
- package/sdk/advertisements.js.map +1 -1
- package/sdk/articles.d.ts +1 -1
- package/sdk/articles.d.ts.map +1 -1
- package/sdk/articles.js +3 -3
- package/sdk/articles.js.map +1 -1
- package/sdk/benefits.d.ts +1 -1
- package/sdk/benefits.d.ts.map +1 -1
- package/sdk/benefits.js +3 -3
- package/sdk/benefits.js.map +1 -1
- package/sdk/checkouts.d.ts +1 -1
- package/sdk/checkouts.d.ts.map +1 -1
- package/sdk/checkouts.js +3 -3
- package/sdk/checkouts.js.map +1 -1
- package/sdk/clients.d.ts +1 -1
- package/sdk/clients.d.ts.map +1 -1
- package/sdk/clients.js +3 -3
- package/sdk/clients.js.map +1 -1
- package/sdk/downloadables.d.ts +1 -1
- package/sdk/downloadables.d.ts.map +1 -1
- package/sdk/downloadables.js +3 -3
- package/sdk/downloadables.js.map +1 -1
- package/sdk/licensekeys.d.ts +1 -1
- package/sdk/licensekeys.d.ts.map +1 -1
- package/sdk/licensekeys.js +3 -3
- package/sdk/licensekeys.js.map +1 -1
- package/sdk/metrics.d.ts +1 -1
- package/sdk/metrics.d.ts.map +1 -1
- package/sdk/metrics.js +3 -3
- package/sdk/metrics.js.map +1 -1
- package/sdk/orders.d.ts +1 -1
- package/sdk/orders.d.ts.map +1 -1
- package/sdk/orders.js +3 -3
- package/sdk/orders.js.map +1 -1
- package/sdk/organizations.d.ts +1 -1
- package/sdk/organizations.d.ts.map +1 -1
- package/sdk/organizations.js +3 -3
- package/sdk/organizations.js.map +1 -1
- package/sdk/polaradvertisements.d.ts +1 -1
- package/sdk/polaradvertisements.d.ts.map +1 -1
- package/sdk/polaradvertisements.js +3 -3
- package/sdk/polaradvertisements.js.map +1 -1
- package/sdk/polarbenefits.d.ts +1 -1
- package/sdk/polarbenefits.d.ts.map +1 -1
- package/sdk/polarbenefits.js +3 -3
- package/sdk/polarbenefits.js.map +1 -1
- package/sdk/polarlicensekeys.d.ts +1 -1
- package/sdk/polarlicensekeys.d.ts.map +1 -1
- package/sdk/polarlicensekeys.js +3 -3
- package/sdk/polarlicensekeys.js.map +1 -1
- package/sdk/polarorders.d.ts +1 -1
- package/sdk/polarorders.d.ts.map +1 -1
- package/sdk/polarorders.js +3 -3
- package/sdk/polarorders.js.map +1 -1
- package/sdk/polarsubscriptions.d.ts +1 -1
- package/sdk/polarsubscriptions.d.ts.map +1 -1
- package/sdk/polarsubscriptions.js +3 -3
- package/sdk/polarsubscriptions.js.map +1 -1
- package/sdk/products.d.ts +1 -1
- package/sdk/products.d.ts.map +1 -1
- package/sdk/products.js +3 -3
- package/sdk/products.js.map +1 -1
- package/sdk/repositories.d.ts +1 -1
- package/sdk/repositories.d.ts.map +1 -1
- package/sdk/repositories.js +3 -3
- package/sdk/repositories.js.map +1 -1
- package/src/funcs/{advertisementsRetrieve.ts → advertisementsGet.ts} +1 -1
- package/src/funcs/{articlesRetrieve.ts → articlesGet.ts} +1 -1
- package/src/funcs/{benefitsRetrieve.ts → benefitsGet.ts} +1 -1
- package/src/funcs/{checkoutsRetrieve.ts → checkoutsGet.ts} +1 -1
- package/src/funcs/{licenseKeysRetrieve.ts → licenseKeysGet.ts} +1 -1
- package/src/funcs/{metricsRetrieve.ts → metricsGet.ts} +1 -1
- package/src/funcs/{oauth2ClientsRetrieve.ts → oauth2ClientsGet.ts} +1 -1
- package/src/funcs/{ordersRetrieve.ts → ordersGet.ts} +1 -1
- package/src/funcs/{organizationsRetrieve.ts → organizationsGet.ts} +1 -1
- package/src/funcs/{productsRetrieve.ts → productsGet.ts} +1 -1
- package/src/funcs/{repositoriesRetrieve.ts → repositoriesGet.ts} +1 -1
- package/src/funcs/subscriptionsImportSubscriptions.ts +6 -0
- package/src/funcs/{usersAdvertisementsRetrieve.ts → usersAdvertisementsGet.ts} +1 -1
- package/src/funcs/{usersBenefitsRetrieve.ts → usersBenefitsGet.ts} +1 -1
- package/src/funcs/{usersDownloadablesRetrieve.ts → usersDownloadablesGet.ts} +1 -1
- package/src/funcs/{usersLicenseKeysRetrieve.ts → usersLicenseKeysGet.ts} +1 -1
- package/src/funcs/{usersOrdersRetrieve.ts → usersOrdersGet.ts} +1 -1
- package/src/funcs/{usersSubscriptionsRetrieve.ts → usersSubscriptionsGet.ts} +1 -1
- package/src/index.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/files.ts +40 -0
- package/src/lib/sdks.ts +12 -0
- package/src/models/components/bodysubscriptionsimport.ts +14 -5
- package/src/sdk/advertisements.ts +3 -3
- package/src/sdk/articles.ts +3 -3
- package/src/sdk/benefits.ts +3 -3
- package/src/sdk/checkouts.ts +3 -3
- package/src/sdk/clients.ts +3 -3
- package/src/sdk/downloadables.ts +3 -3
- package/src/sdk/licensekeys.ts +3 -3
- package/src/sdk/metrics.ts +3 -3
- package/src/sdk/orders.ts +3 -3
- package/src/sdk/organizations.ts +3 -3
- package/src/sdk/polaradvertisements.ts +3 -3
- package/src/sdk/polarbenefits.ts +3 -3
- package/src/sdk/polarlicensekeys.ts +3 -3
- package/src/sdk/polarorders.ts +3 -3
- package/src/sdk/polarsubscriptions.ts +3 -3
- package/src/sdk/products.ts +3 -3
- package/src/sdk/repositories.ts +3 -3
- package/src/types/streams.ts +21 -0
- package/types/streams.d.ts +2 -0
- package/types/streams.d.ts.map +1 -0
- package/types/streams.js +18 -0
- package/types/streams.js.map +1 -0
- package/funcs/articlesRetrieve.js.map +0 -1
- package/funcs/benefitsRetrieve.js.map +0 -1
- package/funcs/checkoutsRetrieve.js.map +0 -1
- package/funcs/metricsRetrieve.js.map +0 -1
- package/funcs/oauth2ClientsRetrieve.d.ts +0 -16
- package/funcs/oauth2ClientsRetrieve.d.ts.map +0 -1
- package/funcs/oauth2ClientsRetrieve.js.map +0 -1
- package/funcs/ordersRetrieve.js.map +0 -1
- package/funcs/productsRetrieve.d.ts.map +0 -1
- package/funcs/productsRetrieve.js.map +0 -1
- package/funcs/repositoriesRetrieve.d.ts.map +0 -1
- package/funcs/repositoriesRetrieve.js.map +0 -1
- package/funcs/usersAdvertisementsRetrieve.d.ts.map +0 -1
- package/funcs/usersAdvertisementsRetrieve.js.map +0 -1
- package/funcs/usersBenefitsRetrieve.d.ts.map +0 -1
- package/funcs/usersBenefitsRetrieve.js.map +0 -1
- package/funcs/usersDownloadablesRetrieve.d.ts.map +0 -1
- package/funcs/usersDownloadablesRetrieve.js.map +0 -1
- package/funcs/usersLicenseKeysRetrieve.d.ts +0 -17
- package/funcs/usersLicenseKeysRetrieve.d.ts.map +0 -1
- package/funcs/usersLicenseKeysRetrieve.js.map +0 -1
- package/funcs/usersOrdersRetrieve.d.ts.map +0 -1
- package/funcs/usersOrdersRetrieve.js.map +0 -1
- package/funcs/usersSubscriptionsRetrieve.d.ts.map +0 -1
- package/funcs/usersSubscriptionsRetrieve.js.map +0 -1
|
@@ -28,7 +28,7 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
* @remarks
|
|
29
29
|
* Get a benefit by ID.
|
|
30
30
|
*/
|
|
31
|
-
export async function
|
|
31
|
+
export async function benefitsGet(
|
|
32
32
|
client$: PolarCore,
|
|
33
33
|
request: operations.BenefitsGetRequest,
|
|
34
34
|
options?: RequestOptions
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get an active checkout session by ID.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function checkoutsGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.CheckoutsGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get a license key.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function licenseKeysGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.LicenseKeysGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get metrics about your orders and subscriptions.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function metricsGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.MetricsGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
@@ -29,7 +29,7 @@ import * as z from "zod";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get an OAuth2 client by Client ID.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function oauth2ClientsGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.Oauth2ClientsOauth2GetClientRequest,
|
|
35
35
|
options?: RequestOptions
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get an organization by ID.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function organizationsGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.OrganizationsGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get a product by ID.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function productsGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.ProductsGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get a repository by ID.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function repositoriesGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.RepositoriesGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { PolarCore } from "../core.js";
|
|
6
|
+
import { readableStreamToArrayBuffer } from "../lib/files.js";
|
|
6
7
|
import * as m$ from "../lib/matchers.js";
|
|
7
8
|
import * as schemas$ from "../lib/schemas.js";
|
|
8
9
|
import { RequestOptions } from "../lib/sdks.js";
|
|
@@ -21,6 +22,7 @@ import { SDKError } from "../models/errors/sdkerror.js";
|
|
|
21
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
23
|
import { isBlobLike } from "../types/blobs.js";
|
|
23
24
|
import { Result } from "../types/fp.js";
|
|
25
|
+
import { isReadableStream } from "../types/streams.js";
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
28
|
* Import Subscriptions
|
|
@@ -60,6 +62,10 @@ export async function subscriptionsImportSubscriptions(
|
|
|
60
62
|
|
|
61
63
|
if (isBlobLike(payload$.file)) {
|
|
62
64
|
body$.append("file", payload$.file);
|
|
65
|
+
} else if (isReadableStream(payload$.file.content)) {
|
|
66
|
+
const buffer = await readableStreamToArrayBuffer(payload$.file.content);
|
|
67
|
+
const blob = new Blob([buffer], { type: "application/octet-stream" });
|
|
68
|
+
body$.append("file", blob);
|
|
63
69
|
} else {
|
|
64
70
|
body$.append(
|
|
65
71
|
"file",
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get an advertisement campaign by ID.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function usersAdvertisementsGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.UsersAdvertisementsGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
@@ -28,7 +28,7 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
* @remarks
|
|
29
29
|
* Get a granted benefit by ID.
|
|
30
30
|
*/
|
|
31
|
-
export async function
|
|
31
|
+
export async function usersBenefitsGet(
|
|
32
32
|
client$: PolarCore,
|
|
33
33
|
request: operations.UsersBenefitsGetRequest,
|
|
34
34
|
options?: RequestOptions
|
|
@@ -26,7 +26,7 @@ import * as z from "zod";
|
|
|
26
26
|
/**
|
|
27
27
|
* Get Downloadable
|
|
28
28
|
*/
|
|
29
|
-
export async function
|
|
29
|
+
export async function usersDownloadablesGet(
|
|
30
30
|
client$: PolarCore,
|
|
31
31
|
request: operations.UsersDownloadablesGetRequest,
|
|
32
32
|
options?: RequestOptions
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get a license key.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function usersLicenseKeysGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.UsersLicenseKeysGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get an order by ID.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function usersOrdersGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.UsersOrdersGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get a subscription by ID.
|
|
31
31
|
*/
|
|
32
|
-
export async function
|
|
32
|
+
export async function usersSubscriptionsGet(
|
|
33
33
|
client$: PolarCore,
|
|
34
34
|
request: operations.UsersSubscriptionsGetRequest,
|
|
35
35
|
options?: RequestOptions
|
package/src/index.ts
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -52,7 +52,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
52
52
|
export const SDK_METADATA = {
|
|
53
53
|
language: "typescript",
|
|
54
54
|
openapiDocVersion: "0.1.0",
|
|
55
|
-
sdkVersion: "0.
|
|
56
|
-
genVersion: "2.
|
|
57
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
55
|
+
sdkVersion: "0.7.1",
|
|
56
|
+
genVersion: "2.409.8",
|
|
57
|
+
userAgent: "speakeasy-sdk/typescript 0.7.1 2.409.8 0.1.0 @polar-sh/sdk",
|
|
58
58
|
} as const;
|
package/src/lib/files.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Consumes a stream and returns a concatenated array buffer. Useful in
|
|
7
|
+
* situations where we need to read the whole file because it forms part of a
|
|
8
|
+
* larger payload containing other fields, and we can't modify the underlying
|
|
9
|
+
* request structure.
|
|
10
|
+
*/
|
|
11
|
+
export async function readableStreamToArrayBuffer(
|
|
12
|
+
readable: ReadableStream<Uint8Array>,
|
|
13
|
+
): Promise<ArrayBuffer> {
|
|
14
|
+
const reader = readable.getReader();
|
|
15
|
+
const chunks: Uint8Array[] = [];
|
|
16
|
+
|
|
17
|
+
let totalLength = 0;
|
|
18
|
+
let done = false;
|
|
19
|
+
|
|
20
|
+
while (!done) {
|
|
21
|
+
const { value, done: doneReading } = await reader.read();
|
|
22
|
+
|
|
23
|
+
if (doneReading) {
|
|
24
|
+
done = true;
|
|
25
|
+
} else {
|
|
26
|
+
chunks.push(value);
|
|
27
|
+
totalLength += value.length;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const concatenatedChunks = new Uint8Array(totalLength);
|
|
32
|
+
let offset = 0;
|
|
33
|
+
|
|
34
|
+
for (const chunk of chunks) {
|
|
35
|
+
concatenatedChunks.set(chunk, offset);
|
|
36
|
+
offset += chunk.length;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return concatenatedChunks.buffer;
|
|
40
|
+
}
|
package/src/lib/sdks.ts
CHANGED
|
@@ -185,6 +185,18 @@ export class ClientSDK {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
if (conf.body instanceof ReadableStream) {
|
|
189
|
+
if (!fetchOptions) {
|
|
190
|
+
fetchOptions = {
|
|
191
|
+
// @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769
|
|
192
|
+
duplex: "half",
|
|
193
|
+
};
|
|
194
|
+
} else {
|
|
195
|
+
// @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769
|
|
196
|
+
fetchOptions.duplex = "half";
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
188
200
|
let input;
|
|
189
201
|
try {
|
|
190
202
|
input = this.hooks$.beforeCreateRequest(context, {
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as b64$ from "../../lib/base64.js";
|
|
6
5
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
6
|
import { blobLikeSchema } from "../../types/blobs.js";
|
|
8
7
|
import * as z from "zod";
|
|
9
8
|
|
|
10
9
|
export type FileT = {
|
|
11
10
|
fileName: string;
|
|
12
|
-
content: Uint8Array |
|
|
11
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Buffer;
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
export type BodySubscriptionsImport = {
|
|
@@ -26,19 +25,29 @@ export type BodySubscriptionsImport = {
|
|
|
26
25
|
/** @internal */
|
|
27
26
|
export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z.object({
|
|
28
27
|
fileName: z.string(),
|
|
29
|
-
content:
|
|
28
|
+
content: z.union([
|
|
29
|
+
z.instanceof(ReadableStream<Uint8Array>),
|
|
30
|
+
z.instanceof(Blob),
|
|
31
|
+
z.instanceof(ArrayBuffer),
|
|
32
|
+
z.instanceof(Buffer),
|
|
33
|
+
]),
|
|
30
34
|
});
|
|
31
35
|
|
|
32
36
|
/** @internal */
|
|
33
37
|
export type FileT$Outbound = {
|
|
34
38
|
fileName: string;
|
|
35
|
-
content: Uint8Array;
|
|
39
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Buffer;
|
|
36
40
|
};
|
|
37
41
|
|
|
38
42
|
/** @internal */
|
|
39
43
|
export const FileT$outboundSchema: z.ZodType<FileT$Outbound, z.ZodTypeDef, FileT> = z.object({
|
|
40
44
|
fileName: z.string(),
|
|
41
|
-
content:
|
|
45
|
+
content: z.union([
|
|
46
|
+
z.instanceof(ReadableStream<Uint8Array>),
|
|
47
|
+
z.instanceof(Blob),
|
|
48
|
+
z.instanceof(ArrayBuffer),
|
|
49
|
+
z.instanceof(Buffer),
|
|
50
|
+
]),
|
|
42
51
|
});
|
|
43
52
|
|
|
44
53
|
/**
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { advertisementsGet } from "../funcs/advertisementsGet.js";
|
|
5
6
|
import { advertisementsList } from "../funcs/advertisementsList.js";
|
|
6
|
-
import { advertisementsRetrieve } from "../funcs/advertisementsRetrieve.js";
|
|
7
7
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
8
|
import * as components from "../models/components/index.js";
|
|
9
9
|
import * as operations from "../models/operations/index.js";
|
|
@@ -30,10 +30,10 @@ export class Advertisements extends ClientSDK {
|
|
|
30
30
|
* @remarks
|
|
31
31
|
* Get an advertisement campaign by ID.
|
|
32
32
|
*/
|
|
33
|
-
async
|
|
33
|
+
async get(
|
|
34
34
|
request: operations.AdvertisementsGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
36
36
|
): Promise<components.AdvertisementCampaign> {
|
|
37
|
-
return unwrapAsync(
|
|
37
|
+
return unwrapAsync(advertisementsGet(this, request, options));
|
|
38
38
|
}
|
|
39
39
|
}
|
package/src/sdk/articles.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import { articlesCreate } from "../funcs/articlesCreate.js";
|
|
6
6
|
import { articlesDelete } from "../funcs/articlesDelete.js";
|
|
7
|
+
import { articlesGet } from "../funcs/articlesGet.js";
|
|
7
8
|
import { articlesList } from "../funcs/articlesList.js";
|
|
8
9
|
import { articlesPreview } from "../funcs/articlesPreview.js";
|
|
9
10
|
import { articlesReceivers } from "../funcs/articlesReceivers.js";
|
|
10
|
-
import { articlesRetrieve } from "../funcs/articlesRetrieve.js";
|
|
11
11
|
import { articlesSend } from "../funcs/articlesSend.js";
|
|
12
12
|
import { articlesUpdate } from "../funcs/articlesUpdate.js";
|
|
13
13
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -49,11 +49,11 @@ export class Articles extends ClientSDK {
|
|
|
49
49
|
* @remarks
|
|
50
50
|
* Get an article by ID.
|
|
51
51
|
*/
|
|
52
|
-
async
|
|
52
|
+
async get(
|
|
53
53
|
request: operations.ArticlesGetRequest,
|
|
54
54
|
options?: RequestOptions
|
|
55
55
|
): Promise<components.Article> {
|
|
56
|
-
return unwrapAsync(
|
|
56
|
+
return unwrapAsync(articlesGet(this, request, options));
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
package/src/sdk/benefits.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import { benefitsCreate } from "../funcs/benefitsCreate.js";
|
|
6
6
|
import { benefitsDelete } from "../funcs/benefitsDelete.js";
|
|
7
|
+
import { benefitsGet } from "../funcs/benefitsGet.js";
|
|
7
8
|
import { benefitsGrants } from "../funcs/benefitsGrants.js";
|
|
8
9
|
import { benefitsList } from "../funcs/benefitsList.js";
|
|
9
|
-
import { benefitsRetrieve } from "../funcs/benefitsRetrieve.js";
|
|
10
10
|
import { benefitsUpdate } from "../funcs/benefitsUpdate.js";
|
|
11
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
12
|
import * as operations from "../models/operations/index.js";
|
|
@@ -46,11 +46,11 @@ export class Benefits extends ClientSDK {
|
|
|
46
46
|
* @remarks
|
|
47
47
|
* Get a benefit by ID.
|
|
48
48
|
*/
|
|
49
|
-
async
|
|
49
|
+
async get(
|
|
50
50
|
request: operations.BenefitsGetRequest,
|
|
51
51
|
options?: RequestOptions
|
|
52
52
|
): Promise<operations.BenefitsGetResponseBenefitsGet> {
|
|
53
|
-
return unwrapAsync(
|
|
53
|
+
return unwrapAsync(benefitsGet(this, request, options));
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/**
|
package/src/sdk/checkouts.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { checkoutsCreate } from "../funcs/checkoutsCreate.js";
|
|
6
|
-
import {
|
|
6
|
+
import { checkoutsGet } from "../funcs/checkoutsGet.js";
|
|
7
7
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
8
|
import * as components from "../models/components/index.js";
|
|
9
9
|
import * as operations from "../models/operations/index.js";
|
|
@@ -29,10 +29,10 @@ export class Checkouts extends ClientSDK {
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get an active checkout session by ID.
|
|
31
31
|
*/
|
|
32
|
-
async
|
|
32
|
+
async get(
|
|
33
33
|
request: operations.CheckoutsGetRequest,
|
|
34
34
|
options?: RequestOptions
|
|
35
35
|
): Promise<components.Checkout> {
|
|
36
|
-
return unwrapAsync(
|
|
36
|
+
return unwrapAsync(checkoutsGet(this, request, options));
|
|
37
37
|
}
|
|
38
38
|
}
|
package/src/sdk/clients.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { oauth2ClientsCreate } from "../funcs/oauth2ClientsCreate.js";
|
|
6
6
|
import { oauth2ClientsDelete } from "../funcs/oauth2ClientsDelete.js";
|
|
7
|
+
import { oauth2ClientsGet } from "../funcs/oauth2ClientsGet.js";
|
|
7
8
|
import { oauth2ClientsList } from "../funcs/oauth2ClientsList.js";
|
|
8
|
-
import { oauth2ClientsRetrieve } from "../funcs/oauth2ClientsRetrieve.js";
|
|
9
9
|
import { oauth2ClientsUpdate } from "../funcs/oauth2ClientsUpdate.js";
|
|
10
10
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import * as components from "../models/components/index.js";
|
|
@@ -46,11 +46,11 @@ export class Clients extends ClientSDK {
|
|
|
46
46
|
* @remarks
|
|
47
47
|
* Get an OAuth2 client by Client ID.
|
|
48
48
|
*/
|
|
49
|
-
async
|
|
49
|
+
async get(
|
|
50
50
|
request: operations.Oauth2ClientsOauth2GetClientRequest,
|
|
51
51
|
options?: RequestOptions
|
|
52
52
|
): Promise<any> {
|
|
53
|
-
return unwrapAsync(
|
|
53
|
+
return unwrapAsync(oauth2ClientsGet(this, request, options));
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/**
|
package/src/sdk/downloadables.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { usersDownloadablesGet } from "../funcs/usersDownloadablesGet.js";
|
|
5
6
|
import { usersDownloadablesList } from "../funcs/usersDownloadablesList.js";
|
|
6
|
-
import { usersDownloadablesRetrieve } from "../funcs/usersDownloadablesRetrieve.js";
|
|
7
7
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
8
|
import * as operations from "../models/operations/index.js";
|
|
9
9
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -23,10 +23,10 @@ export class Downloadables extends ClientSDK {
|
|
|
23
23
|
/**
|
|
24
24
|
* Get Downloadable
|
|
25
25
|
*/
|
|
26
|
-
async
|
|
26
|
+
async get(
|
|
27
27
|
request: operations.UsersDownloadablesGetRequest,
|
|
28
28
|
options?: RequestOptions
|
|
29
29
|
): Promise<any | undefined> {
|
|
30
|
-
return unwrapAsync(
|
|
30
|
+
return unwrapAsync(usersDownloadablesGet(this, request, options));
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/sdk/licensekeys.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { licenseKeysGet } from "../funcs/licenseKeysGet.js";
|
|
5
6
|
import { licenseKeysGetActivation } from "../funcs/licenseKeysGetActivation.js";
|
|
6
7
|
import { licenseKeysList } from "../funcs/licenseKeysList.js";
|
|
7
|
-
import { licenseKeysRetrieve } from "../funcs/licenseKeysRetrieve.js";
|
|
8
8
|
import { licenseKeysUpdate } from "../funcs/licenseKeysUpdate.js";
|
|
9
9
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
10
|
import * as components from "../models/components/index.js";
|
|
@@ -32,11 +32,11 @@ export class LicenseKeys extends ClientSDK {
|
|
|
32
32
|
* @remarks
|
|
33
33
|
* Get a license key.
|
|
34
34
|
*/
|
|
35
|
-
async
|
|
35
|
+
async get(
|
|
36
36
|
request: operations.LicenseKeysGetRequest,
|
|
37
37
|
options?: RequestOptions
|
|
38
38
|
): Promise<components.LicenseKeyWithActivations> {
|
|
39
|
-
return unwrapAsync(
|
|
39
|
+
return unwrapAsync(licenseKeysGet(this, request, options));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
package/src/sdk/metrics.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { metricsGet } from "../funcs/metricsGet.js";
|
|
5
6
|
import { metricsLimits } from "../funcs/metricsLimits.js";
|
|
6
|
-
import { metricsRetrieve } from "../funcs/metricsRetrieve.js";
|
|
7
7
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
8
|
import * as components from "../models/components/index.js";
|
|
9
9
|
import * as operations from "../models/operations/index.js";
|
|
@@ -16,11 +16,11 @@ export class Metrics extends ClientSDK {
|
|
|
16
16
|
* @remarks
|
|
17
17
|
* Get metrics about your orders and subscriptions.
|
|
18
18
|
*/
|
|
19
|
-
async
|
|
19
|
+
async get(
|
|
20
20
|
request: operations.MetricsGetRequest,
|
|
21
21
|
options?: RequestOptions
|
|
22
22
|
): Promise<components.MetricsResponse> {
|
|
23
|
-
return unwrapAsync(
|
|
23
|
+
return unwrapAsync(metricsGet(this, request, options));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
package/src/sdk/orders.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { ordersGet } from "../funcs/ordersGet.js";
|
|
5
6
|
import { ordersInvoice } from "../funcs/ordersInvoice.js";
|
|
6
7
|
import { ordersList } from "../funcs/ordersList.js";
|
|
7
|
-
import { ordersRetrieve } from "../funcs/ordersRetrieve.js";
|
|
8
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
9
|
import * as components from "../models/components/index.js";
|
|
10
10
|
import * as operations from "../models/operations/index.js";
|
|
@@ -31,11 +31,11 @@ export class Orders extends ClientSDK {
|
|
|
31
31
|
* @remarks
|
|
32
32
|
* Get an order by ID.
|
|
33
33
|
*/
|
|
34
|
-
async
|
|
34
|
+
async get(
|
|
35
35
|
request: operations.OrdersGetRequest,
|
|
36
36
|
options?: RequestOptions
|
|
37
37
|
): Promise<components.OrderOutput> {
|
|
38
|
-
return unwrapAsync(
|
|
38
|
+
return unwrapAsync(ordersGet(this, request, options));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
package/src/sdk/organizations.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { organizationsCreate } from "../funcs/organizationsCreate.js";
|
|
6
|
+
import { organizationsGet } from "../funcs/organizationsGet.js";
|
|
6
7
|
import { organizationsList } from "../funcs/organizationsList.js";
|
|
7
|
-
import { organizationsRetrieve } from "../funcs/organizationsRetrieve.js";
|
|
8
8
|
import { organizationsUpdate } from "../funcs/organizationsUpdate.js";
|
|
9
9
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
10
|
import * as components from "../models/components/index.js";
|
|
@@ -45,11 +45,11 @@ export class Organizations extends ClientSDK {
|
|
|
45
45
|
* @remarks
|
|
46
46
|
* Get an organization by ID.
|
|
47
47
|
*/
|
|
48
|
-
async
|
|
48
|
+
async get(
|
|
49
49
|
request: operations.OrganizationsGetRequest,
|
|
50
50
|
options?: RequestOptions
|
|
51
51
|
): Promise<components.OrganizationOutput> {
|
|
52
|
-
return unwrapAsync(
|
|
52
|
+
return unwrapAsync(organizationsGet(this, request, options));
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { usersAdvertisementsCreate } from "../funcs/usersAdvertisementsCreate.js";
|
|
6
6
|
import { usersAdvertisementsDelete } from "../funcs/usersAdvertisementsDelete.js";
|
|
7
7
|
import { usersAdvertisementsEnable } from "../funcs/usersAdvertisementsEnable.js";
|
|
8
|
+
import { usersAdvertisementsGet } from "../funcs/usersAdvertisementsGet.js";
|
|
8
9
|
import { usersAdvertisementsList } from "../funcs/usersAdvertisementsList.js";
|
|
9
|
-
import { usersAdvertisementsRetrieve } from "../funcs/usersAdvertisementsRetrieve.js";
|
|
10
10
|
import { usersAdvertisementsUpdate } from "../funcs/usersAdvertisementsUpdate.js";
|
|
11
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
12
|
import * as components from "../models/components/index.js";
|
|
@@ -47,11 +47,11 @@ export class PolarAdvertisements extends ClientSDK {
|
|
|
47
47
|
* @remarks
|
|
48
48
|
* Get an advertisement campaign by ID.
|
|
49
49
|
*/
|
|
50
|
-
async
|
|
50
|
+
async get(
|
|
51
51
|
request: operations.UsersAdvertisementsGetRequest,
|
|
52
52
|
options?: RequestOptions
|
|
53
53
|
): Promise<components.UserAdvertisementCampaign> {
|
|
54
|
-
return unwrapAsync(
|
|
54
|
+
return unwrapAsync(usersAdvertisementsGet(this, request, options));
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
package/src/sdk/polarbenefits.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { usersBenefitsGet } from "../funcs/usersBenefitsGet.js";
|
|
5
6
|
import { usersBenefitsList } from "../funcs/usersBenefitsList.js";
|
|
6
|
-
import { usersBenefitsRetrieve } from "../funcs/usersBenefitsRetrieve.js";
|
|
7
7
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
8
|
import * as operations from "../models/operations/index.js";
|
|
9
9
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -29,10 +29,10 @@ export class PolarBenefits extends ClientSDK {
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* Get a granted benefit by ID.
|
|
31
31
|
*/
|
|
32
|
-
async
|
|
32
|
+
async get(
|
|
33
33
|
request: operations.UsersBenefitsGetRequest,
|
|
34
34
|
options?: RequestOptions
|
|
35
35
|
): Promise<operations.UsersBenefitsGetResponseUsersBenefitsGet> {
|
|
36
|
-
return unwrapAsync(
|
|
36
|
+
return unwrapAsync(usersBenefitsGet(this, request, options));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { usersLicenseKeysActivate } from "../funcs/usersLicenseKeysActivate.js";
|
|
6
6
|
import { usersLicenseKeysDeactivate } from "../funcs/usersLicenseKeysDeactivate.js";
|
|
7
|
+
import { usersLicenseKeysGet } from "../funcs/usersLicenseKeysGet.js";
|
|
7
8
|
import { usersLicenseKeysList } from "../funcs/usersLicenseKeysList.js";
|
|
8
|
-
import { usersLicenseKeysRetrieve } from "../funcs/usersLicenseKeysRetrieve.js";
|
|
9
9
|
import { usersLicenseKeysValidate } from "../funcs/usersLicenseKeysValidate.js";
|
|
10
10
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import * as components from "../models/components/index.js";
|
|
@@ -30,11 +30,11 @@ export class PolarLicenseKeys extends ClientSDK {
|
|
|
30
30
|
* @remarks
|
|
31
31
|
* Get a license key.
|
|
32
32
|
*/
|
|
33
|
-
async
|
|
33
|
+
async get(
|
|
34
34
|
request: operations.UsersLicenseKeysGetRequest,
|
|
35
35
|
options?: RequestOptions
|
|
36
36
|
): Promise<components.LicenseKeyWithActivations> {
|
|
37
|
-
return unwrapAsync(
|
|
37
|
+
return unwrapAsync(usersLicenseKeysGet(this, request, options));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/**
|
package/src/sdk/polarorders.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { usersOrdersGet } from "../funcs/usersOrdersGet.js";
|
|
5
6
|
import { usersOrdersInvoice } from "../funcs/usersOrdersInvoice.js";
|
|
6
7
|
import { usersOrdersList } from "../funcs/usersOrdersList.js";
|
|
7
|
-
import { usersOrdersRetrieve } from "../funcs/usersOrdersRetrieve.js";
|
|
8
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
9
|
import * as components from "../models/components/index.js";
|
|
10
10
|
import * as operations from "../models/operations/index.js";
|
|
@@ -31,11 +31,11 @@ export class PolarOrders extends ClientSDK {
|
|
|
31
31
|
* @remarks
|
|
32
32
|
* Get an order by ID.
|
|
33
33
|
*/
|
|
34
|
-
async
|
|
34
|
+
async get(
|
|
35
35
|
request: operations.UsersOrdersGetRequest,
|
|
36
36
|
options?: RequestOptions
|
|
37
37
|
): Promise<components.UserOrder> {
|
|
38
|
-
return unwrapAsync(
|
|
38
|
+
return unwrapAsync(usersOrdersGet(this, request, options));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|