diff --git a/.devcontainer/README.md b/.devcontainer/README.md
index e915e531..e60bf1fe 100644
--- a/.devcontainer/README.md
+++ b/.devcontainer/README.md
@@ -1,4 +1,9 @@
+
+
+
+
+
> **Remember to shutdown a GitHub Codespace when it is not in use!**
# Dev Containers Quick Start
diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index a2614eb5..9c0da0a7 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -5,8 +5,10 @@ management:
docVersion: 0.1.0
speakeasyVersion: 1.385.0
generationVersion: 2.407.2
- releaseVersion: 0.6.0
- configChecksum: 9879b08fda412e406269edc7e8d11e0c
+ releaseVersion: 0.6.1
+ configChecksum: 7323b6f75c1f55cf6e131f0df753481c
+ repoURL: https://github.com/polarsource/polar-js.git
+ installationURL: https://github.com/polarsource/polar-js
published: true
features:
typescript:
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index ef6fe02c..6589c5e5 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -15,7 +15,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
typescript:
- version: 0.6.0
+ version: 0.6.1
additionalDependencies:
dependencies: {}
devDependencies: {}
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index af957927..f93310f0 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,17 +2,18 @@ speakeasyVersion: 1.385.0
sources:
Polar-OAS:
sourceNamespace: polar-oas
- sourceRevisionDigest: sha256:bb5c966d17bedcc9e4c0ca8adc5a3445b40e0f4044ff60490cb3e67b0e0b39fd
- sourceBlobDigest: sha256:eee2ff28dd9671dccd1e58ceab42ab4e9468a91baba3cae7a2b1790b75a3292c
+ sourceRevisionDigest: sha256:823650b7bbc048b9feae6a5cb62601dc978e79a25fae66d61152a49b59a4bacf
+ sourceBlobDigest: sha256:839047495a6cbe8a089b36a53f0c00857d55e79c000b662b5f6e4b39ff927a8c
tags:
- latest
+ - main
targets:
polar:
source: Polar-OAS
sourceNamespace: polar-oas
- sourceRevisionDigest: sha256:bb5c966d17bedcc9e4c0ca8adc5a3445b40e0f4044ff60490cb3e67b0e0b39fd
- sourceBlobDigest: sha256:eee2ff28dd9671dccd1e58ceab42ab4e9468a91baba3cae7a2b1790b75a3292c
- outLocation: /Users/fvoron/Development/polar-js
+ sourceRevisionDigest: sha256:823650b7bbc048b9feae6a5cb62601dc978e79a25fae66d61152a49b59a4bacf
+ sourceBlobDigest: sha256:839047495a6cbe8a089b36a53f0c00857d55e79c000b662b5f6e4b39ff927a8c
+ outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
diff --git a/RELEASES.md b/RELEASES.md
new file mode 100644
index 00000000..f7b63445
--- /dev/null
+++ b/RELEASES.md
@@ -0,0 +1,11 @@
+
+
+## 2024-09-02 09:49:03
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.385.0 (2.407.2) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [typescript v0.6.1] .
+### Releases
+- [NPM v0.6.1] https://www.npmjs.com/package/@polar-sh/sdk/v/0.6.1 - .
\ No newline at end of file
diff --git a/codeSamples.yaml b/codeSamples.yaml
index 818ddd15..5dd1dbf6 100644
--- a/codeSamples.yaml
+++ b/codeSamples.yaml
@@ -3,7 +3,7 @@ info:
title: CodeSamples overlay for typescript target
version: 0.0.0
actions:
- - target: $["paths"]["/v1/users/downloadables/"]["get"]
+ - target: $["paths"]["/v1/users/benefits/"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -16,7 +16,7 @@ actions:
});
async function run() {
- const result = await polar.users.downloadables.list({});
+ const result = await polar.users.benefits.list({});
for await (const page of result) {
// Handle the page
@@ -25,11 +25,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/license-keys/validate"]["post"]
+ - target: $["paths"]["/v1/users/subscriptions/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: validate
+ label: get
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -38,9 +38,8 @@ actions:
});
async function run() {
- const result = await polar.users.licenseKeys.validate({
- key: "",
- organizationId: "",
+ const result = await polar.users.subscriptions.retrieve({
+ id: "",
});
// Handle the result
@@ -48,7 +47,7 @@ actions:
}
run();
- - target: $["paths"]["/v1/benefits/{id}"]["get"]
+ - target: $["paths"]["/v1/users/license-keys/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -61,7 +60,7 @@ actions:
});
async function run() {
- const result = await polar.benefits.retrieve({
+ const result = await polar.users.licenseKeys.retrieve({
id: "",
});
@@ -70,7 +69,7 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/benefits/"]["get"]
+ - target: $["paths"]["/v1/repositories/"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -83,7 +82,7 @@ actions:
});
async function run() {
- const result = await polar.users.benefits.list({});
+ const result = await polar.repositories.list({});
for await (const page of result) {
// Handle the page
@@ -92,11 +91,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/orders/{id}/invoice"]["get"]
+ - target: $["paths"]["/v1/subscriptions/export"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: invoice
+ label: export
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -105,20 +104,18 @@ actions:
});
async function run() {
- const result = await polar.users.orders.invoice({
- id: "",
- });
+ const result = await polar.subscriptions.export({});
// Handle the result
console.log(result)
}
run();
- - target: $["paths"]["/v1/users/subscriptions/{id}"]["patch"]
+ - target: $["paths"]["/v1/users/subscriptions/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: update
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -127,23 +124,20 @@ actions:
});
async function run() {
- const result = await polar.users.subscriptions.update({
- id: "",
- userSubscriptionUpdate: {
- productPriceId: "",
- },
- });
+ const result = await polar.users.subscriptions.list({});
- // Handle the result
- console.log(result)
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
}
run();
- - target: $["paths"]["/v1/users/subscriptions/{id}"]["delete"]
+ - target: $["paths"]["/v1/users/subscriptions/{id}"]["patch"]
update:
x-codeSamples:
- lang: typescript
- label: cancel
+ label: update
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -152,8 +146,11 @@ actions:
});
async function run() {
- const result = await polar.users.subscriptions.cancel({
+ const result = await polar.users.subscriptions.update({
id: "",
+ userSubscriptionUpdate: {
+ productPriceId: "",
+ },
});
// Handle the result
@@ -161,11 +158,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/advertisements/{id}"]["delete"]
+ - target: $["paths"]["/v1/repositories/{id}"]["patch"]
update:
x-codeSamples:
- lang: typescript
- label: delete
+ label: update
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -174,8 +171,9 @@ actions:
});
async function run() {
- const result = await polar.users.advertisements.delete({
+ const result = await polar.repositories.update({
id: "",
+ repositoryUpdate: {},
});
// Handle the result
@@ -183,23 +181,21 @@ actions:
}
run();
- - target: $["paths"]["/v1/subscriptions/import"]["post"]
+ - target: $["paths"]["/v1/articles/{id}/send"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: import
+ label: send
source: |-
import { Polar } from "@polar-sh/sdk";
- import { openAsBlob } from "node:fs";
const polar = new Polar({
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
- const result = await polar.subscriptions.importSubscriptions({
- file: await openAsBlob("./sample-file"),
- organizationId: "",
+ const result = await polar.articles.send({
+ id: "",
});
// Handle the result
@@ -207,11 +203,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/articles/{id}/preview"]["post"]
+ - target: $["paths"]["/v1/oauth2/introspect"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: preview
+ label: introspect_token
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -220,11 +216,10 @@ actions:
});
async function run() {
- const result = await polar.articles.preview({
- id: "",
- articlePreview: {
- email: "Eileen56@yahoo.com",
- },
+ const result = await polar.oauth2.introspect({
+ token: "",
+ clientId: "",
+ clientSecret: "",
});
// Handle the result
@@ -232,11 +227,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/articles/{id}"]["get"]
+ - target: $["paths"]["/v1/oauth2/register/{client_id}"]["put"]
update:
x-codeSamples:
- lang: typescript
- label: get
+ label: update_client
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -245,8 +240,15 @@ actions:
});
async function run() {
- const result = await polar.articles.retrieve({
- id: "",
+ const result = await polar.oauth2.clients.update({
+ clientId: "",
+ oAuth2ClientConfigurationUpdate: {
+ redirectUris: [
+ "https://alarming-nondisclosure.com",
+ ],
+ clientName: "",
+ clientId: "",
+ },
});
// Handle the result
@@ -276,11 +278,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/subscriptions/"]["post"]
+ - target: $["paths"]["/v1/metrics/limits"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: create
+ label: limits
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -289,17 +291,14 @@ actions:
});
async function run() {
- const result = await polar.subscriptions.create({
- email: "Jena.Nienow28@yahoo.com",
- productId: "",
- });
+ const result = await polar.metrics.limits();
// Handle the result
console.log(result)
}
run();
- - target: $["paths"]["/v1/checkouts/"]["post"]
+ - target: $["paths"]["/v1/users/subscriptions/"]["post"]
update:
x-codeSamples:
- lang: typescript
@@ -312,9 +311,8 @@ actions:
});
async function run() {
- const result = await polar.checkouts.create({
- productPriceId: "",
- successUrl: "http://limp-pastry.org",
+ const result = await polar.users.subscriptions.create({
+ productId: "",
});
// Handle the result
@@ -322,7 +320,7 @@ actions:
}
run();
- - target: $["paths"]["/v1/files/"]["get"]
+ - target: $["paths"]["/v1/users/advertisements/"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -335,7 +333,7 @@ actions:
});
async function run() {
- const result = await polar.files.list({});
+ const result = await polar.users.advertisements.list({});
for await (const page of result) {
// Handle the page
@@ -344,11 +342,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/benefits/"]["post"]
+ - target: $["paths"]["/v1/external_organizations/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: create
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -357,24 +355,20 @@ actions:
});
async function run() {
- const result = await polar.benefits.create({
- description: "Multi-tiered motivating standardization",
- properties: {
- guildToken: "",
- roleId: "",
- },
- });
+ const result = await polar.externalOrganizations.list({});
- // Handle the result
- console.log(result)
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
}
run();
- - target: $["paths"]["/v1/users/subscriptions/"]["post"]
+ - target: $["paths"]["/v1/organizations/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: create
+ label: get
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -383,8 +377,8 @@ actions:
});
async function run() {
- const result = await polar.users.subscriptions.create({
- productId: "",
+ const result = await polar.organizations.retrieve({
+ id: "",
});
// Handle the result
@@ -392,11 +386,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/advertisements/"]["get"]
+ - target: $["paths"]["/v1/articles/{id}"]["patch"]
update:
x-codeSamples:
- lang: typescript
- label: list
+ label: update
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -405,20 +399,21 @@ actions:
});
async function run() {
- const result = await polar.users.advertisements.list({});
+ const result = await polar.articles.update({
+ id: "",
+ articleUpdate: {},
+ });
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
+ // Handle the result
+ console.log(result)
}
run();
- - target: $["paths"]["/v1/users/advertisements/"]["post"]
+ - target: $["paths"]["/v1/advertisements/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: create
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -427,22 +422,22 @@ actions:
});
async function run() {
- const result = await polar.users.advertisements.create({
- imageUrl: "http://limp-pastry.org",
- text: "",
- linkUrl: "http://flashy-cartload.net",
+ const result = await polar.advertisements.list({
+ benefitId: "",
});
- // Handle the result
- console.log(result)
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
}
run();
- - target: $["paths"]["/v1/users/advertisements/{id}"]["patch"]
+ - target: $["paths"]["/v1/users/orders/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: update
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -451,21 +446,20 @@ actions:
});
async function run() {
- const result = await polar.users.advertisements.update({
- id: "",
- userAdvertisementCampaignUpdate: {},
- });
+ const result = await polar.users.orders.list({});
- // Handle the result
- console.log(result)
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
}
run();
- - target: $["paths"]["/v1/users/license-keys/activate"]["post"]
+ - target: $["paths"]["/v1/articles/{id}/receivers"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: activate
+ label: receivers
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -474,10 +468,8 @@ actions:
});
async function run() {
- const result = await polar.users.licenseKeys.activate({
- key: "",
- organizationId: "",
- label: "",
+ const result = await polar.articles.receivers({
+ id: "",
});
// Handle the result
@@ -485,11 +477,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/subscriptions/export"]["get"]
+ - target: $["paths"]["/v1/oauth2/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: export
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -498,18 +490,20 @@ actions:
});
async function run() {
- const result = await polar.subscriptions.export({});
+ const result = await polar.oauth2.clients.list({});
- // Handle the result
- console.log(result)
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
}
run();
- - target: $["paths"]["/v1/oauth2/revoke"]["post"]
+ - target: $["paths"]["/v1/products/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: revoke_token
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -518,14 +512,12 @@ actions:
});
async function run() {
- const result = await polar.oauth2.revoke({
- token: "",
- clientId: "",
- clientSecret: "",
- });
+ const result = await polar.products.list({});
- // Handle the result
- console.log(result)
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
}
run();
@@ -556,21 +548,24 @@ actions:
}
run();
- - target: $["paths"]["/v1/orders/{id}"]["get"]
+ - target: $["paths"]["/v1/metrics/"]["get"]
update:
x-codeSamples:
- lang: typescript
label: get
source: |-
import { Polar } from "@polar-sh/sdk";
+ import { RFCDate } from "@polar-sh/sdk/types";
const polar = new Polar({
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
- const result = await polar.orders.retrieve({
- id: "",
+ const result = await polar.metrics.retrieve({
+ startDate: new RFCDate("2023-02-11"),
+ endDate: new RFCDate("2024-11-01"),
+ interval: "hour",
});
// Handle the result
@@ -578,7 +573,7 @@ actions:
}
run();
- - target: $["paths"]["/v1/organizations/{id}"]["get"]
+ - target: $["paths"]["/v1/users/orders/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -591,7 +586,7 @@ actions:
});
async function run() {
- const result = await polar.organizations.retrieve({
+ const result = await polar.users.orders.retrieve({
id: "",
});
@@ -600,11 +595,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/articles/{id}/send"]["post"]
+ - target: $["paths"]["/v1/benefits/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: send
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -613,29 +608,7 @@ actions:
});
async function run() {
- const result = await polar.articles.send({
- id: "",
- });
-
- // Handle the result
- console.log(result)
- }
-
- run();
- - target: $["paths"]["/v1/users/orders/"]["get"]
- update:
- x-codeSamples:
- - lang: typescript
- label: list
- source: |-
- import { Polar } from "@polar-sh/sdk";
-
- const polar = new Polar({
- accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
- });
-
- async function run() {
- const result = await polar.users.orders.list({});
+ const result = await polar.benefits.list({});
for await (const page of result) {
// Handle the page
@@ -644,11 +617,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/advertisements/{id}"]["get"]
+ - target: $["paths"]["/v1/benefits/{id}"]["patch"]
update:
x-codeSamples:
- lang: typescript
- label: get
+ label: update
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -657,8 +630,9 @@ actions:
});
async function run() {
- const result = await polar.advertisements.retrieve({
+ const result = await polar.benefits.update({
id: "",
+ requestBody: {},
});
// Handle the result
@@ -666,11 +640,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/oauth2/introspect"]["post"]
+ - target: $["paths"]["/v1/orders/{id}/invoice"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: introspect_token
+ label: invoice
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -679,10 +653,8 @@ actions:
});
async function run() {
- const result = await polar.oauth2.introspect({
- token: "",
- clientId: "",
- clientSecret: "",
+ const result = await polar.orders.invoice({
+ id: "",
});
// Handle the result
@@ -723,11 +695,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/files/{id}"]["patch"]
+ - target: $["paths"]["/v1/users/orders/{id}/invoice"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: update
+ label: invoice
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -736,9 +708,8 @@ actions:
});
async function run() {
- const result = await polar.files.update({
+ const result = await polar.users.orders.invoice({
id: "",
- filePatch: {},
});
// Handle the result
@@ -746,24 +717,27 @@ actions:
}
run();
- - target: $["paths"]["/v1/metrics/"]["get"]
+ - target: $["paths"]["/v1/users/advertisements/{id}/enable"]["post"]
+ update:
+ x-codeSamples:
+ - lang: typescript
+ label: enable
+ source: "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n await polar.users.advertisements.enable({\n id: \"\",\n userAdvertisementCampaignEnable: {\n benefitId: \"\",\n },\n });\n\n \n}\n\nrun();"
+ - target: $["paths"]["/v1/orders/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
label: get
source: |-
import { Polar } from "@polar-sh/sdk";
- import { RFCDate } from "@polar-sh/sdk/types";
const polar = new Polar({
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
- const result = await polar.metrics.retrieve({
- startDate: new RFCDate("2023-02-11"),
- endDate: new RFCDate("2024-11-01"),
- interval: "hour",
+ const result = await polar.orders.retrieve({
+ id: "",
});
// Handle the result
@@ -771,11 +745,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/metrics/limits"]["get"]
+ - target: $["paths"]["/v1/license-keys/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: limits
+ label: get
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -784,18 +758,20 @@ actions:
});
async function run() {
- const result = await polar.metrics.limits();
+ const result = await polar.licenseKeys.retrieve({
+ id: "",
+ });
// Handle the result
console.log(result)
}
run();
- - target: $["paths"]["/v1/users/subscriptions/"]["get"]
+ - target: $["paths"]["/v1/checkouts/"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: list
+ label: create
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -804,16 +780,17 @@ actions:
});
async function run() {
- const result = await polar.users.subscriptions.list({});
+ const result = await polar.checkouts.create({
+ productPriceId: "",
+ successUrl: "http://limp-pastry.org",
+ });
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
+ // Handle the result
+ console.log(result)
}
run();
- - target: $["paths"]["/v1/users/subscriptions/{id}"]["get"]
+ - target: $["paths"]["/v1/users/benefits/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -826,7 +803,7 @@ actions:
});
async function run() {
- const result = await polar.users.subscriptions.retrieve({
+ const result = await polar.users.benefits.retrieve({
id: "",
});
@@ -835,7 +812,7 @@ actions:
}
run();
- - target: $["paths"]["/v1/repositories/{id}"]["get"]
+ - target: $["paths"]["/v1/users/downloadables/{token}"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -848,8 +825,8 @@ actions:
});
async function run() {
- const result = await polar.repositories.retrieve({
- id: "",
+ const result = await polar.users.downloadables.retrieve({
+ token: "",
});
// Handle the result
@@ -857,7 +834,7 @@ actions:
}
run();
- - target: $["paths"]["/v1/advertisements/"]["get"]
+ - target: $["paths"]["/v1/users/license-keys/"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -870,9 +847,7 @@ actions:
});
async function run() {
- const result = await polar.advertisements.list({
- benefitId: "",
- });
+ const result = await polar.users.licenseKeys.list({});
for await (const page of result) {
// Handle the page
@@ -881,11 +856,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/oauth2/register"]["post"]
+ - target: $["paths"]["/v1/subscriptions/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: create_client
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -894,23 +869,20 @@ actions:
});
async function run() {
- const result = await polar.oauth2.clients.create({
- redirectUris: [
- "http://limp-pastry.org",
- ],
- clientName: "",
- });
+ const result = await polar.subscriptions.list({});
- // Handle the result
- console.log(result)
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
}
run();
- - target: $["paths"]["/v1/benefits/{id}"]["patch"]
+ - target: $["paths"]["/v1/benefits/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: update
+ label: get
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -919,9 +891,8 @@ actions:
});
async function run() {
- const result = await polar.benefits.update({
+ const result = await polar.benefits.retrieve({
id: "",
- requestBody: {},
});
// Handle the result
@@ -929,17 +900,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/benefits/{id}"]["delete"]
- update:
- x-codeSamples:
- - lang: typescript
- label: delete
- source: "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n await polar.benefits.delete({\n id: \"\",\n });\n\n \n}\n\nrun();"
- - target: $["paths"]["/v1/license-keys/{id}"]["get"]
+ - target: $["paths"]["/v1/products/{id}"]["patch"]
update:
x-codeSamples:
- lang: typescript
- label: get
+ label: update
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -948,8 +913,9 @@ actions:
});
async function run() {
- const result = await polar.licenseKeys.retrieve({
+ const result = await polar.products.update({
id: "",
+ productUpdate: {},
});
// Handle the result
@@ -957,33 +923,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/subscriptions/"]["get"]
- update:
- x-codeSamples:
- - lang: typescript
- label: list
- source: |-
- import { Polar } from "@polar-sh/sdk";
-
- const polar = new Polar({
- accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
- });
-
- async function run() {
- const result = await polar.subscriptions.list({});
-
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
- }
-
- run();
- - target: $["paths"]["/v1/users/benefits/{id}"]["get"]
+ - target: $["paths"]["/v1/organizations/"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: get
+ label: create
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -992,8 +936,9 @@ actions:
});
async function run() {
- const result = await polar.users.benefits.retrieve({
- id: "",
+ const result = await polar.organizations.create({
+ name: "",
+ slug: "",
});
// Handle the result
@@ -1001,11 +946,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/advertisements/{id}"]["get"]
+ - target: $["paths"]["/v1/oauth2/token"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: get
+ label: request_token
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1014,8 +959,11 @@ actions:
});
async function run() {
- const result = await polar.users.advertisements.retrieve({
- id: "",
+ const result = await polar.oauth2.token({
+ clientId: "",
+ clientSecret: "",
+ code: "",
+ redirectUri: "http://multicolored-chivalry.name",
});
// Handle the result
@@ -1023,17 +971,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/advertisements/{id}/enable"]["post"]
- update:
- x-codeSamples:
- - lang: typescript
- label: enable
- source: "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n await polar.users.advertisements.enable({\n id: \"\",\n userAdvertisementCampaignEnable: {\n benefitId: \"\",\n },\n });\n\n \n}\n\nrun();"
- - target: $["paths"]["/v1/oauth2/userinfo"]["get"]
+ - target: $["paths"]["/v1/files/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: userinfo
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1042,18 +984,20 @@ actions:
});
async function run() {
- const result = await polar.oauth2.userinfo();
+ const result = await polar.files.list({});
- // Handle the result
- console.log(result)
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
}
run();
- - target: $["paths"]["/v1/oauth2/register/{client_id}"]["put"]
+ - target: $["paths"]["/v1/files/{id}/uploaded"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: update_client
+ label: uploaded
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1062,14 +1006,18 @@ actions:
});
async function run() {
- const result = await polar.oauth2.clients.update({
- clientId: "",
- oAuth2ClientConfigurationUpdate: {
- redirectUris: [
- "https://alarming-nondisclosure.com",
+ const result = await polar.files.uploaded({
+ id: "",
+ fileUploadCompleted: {
+ id: "",
+ path: "/sys",
+ parts: [
+ {
+ number: 241210,
+ checksumEtag: "",
+ checksumSha256Base64: "",
+ },
],
- clientName: "",
- clientId: "",
},
});
@@ -1084,11 +1032,11 @@ actions:
- lang: typescript
label: delete
source: "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n await polar.files.delete({\n id: \"\",\n });\n\n \n}\n\nrun();"
- - target: $["paths"]["/v1/license-keys"]["get"]
+ - target: $["paths"]["/v1/license-keys/{id}/activations/{activation_id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: list
+ label: get_activation
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1097,20 +1045,21 @@ actions:
});
async function run() {
- const result = await polar.licenseKeys.list({});
+ const result = await polar.licenseKeys.getActivation({
+ id: "",
+ activationId: "",
+ });
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
+ // Handle the result
+ console.log(result)
}
run();
- - target: $["paths"]["/v1/orders/{id}/invoice"]["get"]
+ - target: $["paths"]["/v1/organizations/{id}"]["patch"]
update:
x-codeSamples:
- lang: typescript
- label: invoice
+ label: update
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1119,8 +1068,9 @@ actions:
});
async function run() {
- const result = await polar.orders.invoice({
+ const result = await polar.organizations.update({
id: "",
+ organizationUpdate: {},
});
// Handle the result
@@ -1128,11 +1078,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/external_organizations/"]["get"]
+ - target: $["paths"]["/v1/articles/{id}/preview"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: list
+ label: preview
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1141,20 +1091,23 @@ actions:
});
async function run() {
- const result = await polar.externalOrganizations.list({});
+ const result = await polar.articles.preview({
+ id: "",
+ articlePreview: {
+ email: "Eileen56@yahoo.com",
+ },
+ });
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
+ // Handle the result
+ console.log(result)
}
run();
- - target: $["paths"]["/v1/organizations/"]["get"]
+ - target: $["paths"]["/v1/advertisements/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: list
+ label: get
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1163,16 +1116,16 @@ actions:
});
async function run() {
- const result = await polar.organizations.list({});
+ const result = await polar.advertisements.retrieve({
+ id: "",
+ });
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
+ // Handle the result
+ console.log(result)
}
run();
- - target: $["paths"]["/v1/articles/"]["get"]
+ - target: $["paths"]["/v1/license-keys"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -1185,7 +1138,7 @@ actions:
});
async function run() {
- const result = await polar.articles.list({});
+ const result = await polar.licenseKeys.list({});
for await (const page of result) {
// Handle the page
@@ -1194,11 +1147,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/articles/{id}/receivers"]["get"]
+ - target: $["paths"]["/v1/users/advertisements/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: receivers
+ label: get
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1207,7 +1160,7 @@ actions:
});
async function run() {
- const result = await polar.articles.receivers({
+ const result = await polar.users.advertisements.retrieve({
id: "",
});
@@ -1216,11 +1169,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/oauth2/register/{client_id}"]["get"]
+ - target: $["paths"]["/v1/users/license-keys/activate"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: get_client
+ label: activate
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1229,8 +1182,10 @@ actions:
});
async function run() {
- const result = await polar.oauth2.clients.retrieve({
- clientId: "",
+ const result = await polar.users.licenseKeys.activate({
+ key: "",
+ organizationId: "",
+ label: "",
});
// Handle the result
@@ -1238,11 +1193,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/benefits/{id}/grants"]["get"]
+ - target: $["paths"]["/v1/subscriptions/"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: grants
+ label: create
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1251,18 +1206,43 @@ actions:
});
async function run() {
- const result = await polar.benefits.grants({
- id: "",
+ const result = await polar.subscriptions.create({
+ email: "Jena.Nienow28@yahoo.com",
+ productId: "",
});
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
+ // Handle the result
+ console.log(result)
}
run();
- - target: $["paths"]["/v1/products/"]["get"]
+ - target: $["paths"]["/v1/benefits/"]["post"]
+ update:
+ x-codeSamples:
+ - lang: typescript
+ label: create
+ source: |-
+ import { Polar } from "@polar-sh/sdk";
+
+ const polar = new Polar({
+ accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
+ });
+
+ async function run() {
+ const result = await polar.benefits.create({
+ description: "Multi-tiered motivating standardization",
+ properties: {
+ guildToken: "",
+ roleId: "",
+ },
+ });
+
+ // Handle the result
+ console.log(result)
+ }
+
+ run();
+ - target: $["paths"]["/v1/orders/"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -1275,7 +1255,7 @@ actions:
});
async function run() {
- const result = await polar.products.list({});
+ const result = await polar.orders.list({});
for await (const page of result) {
// Handle the page
@@ -1284,11 +1264,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/license-keys/{id}"]["get"]
+ - target: $["paths"]["/v1/users/advertisements/"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: get
+ label: create
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1297,8 +1277,10 @@ actions:
});
async function run() {
- const result = await polar.users.licenseKeys.retrieve({
- id: "",
+ const result = await polar.users.advertisements.create({
+ imageUrl: "http://limp-pastry.org",
+ text: "",
+ linkUrl: "http://flashy-cartload.net",
});
// Handle the result
@@ -1306,17 +1288,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/license-keys/deactivate"]["post"]
- update:
- x-codeSamples:
- - lang: typescript
- label: deactivate
- source: "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n await polar.users.licenseKeys.deactivate({\n key: \"\",\n organizationId: \"\",\n activationId: \"\",\n });\n\n \n}\n\nrun();"
- - target: $["paths"]["/v1/articles/"]["post"]
+ - target: $["paths"]["/v1/repositories/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: create
+ label: get
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1325,8 +1301,8 @@ actions:
});
async function run() {
- const result = await polar.articles.create({
- title: "",
+ const result = await polar.repositories.retrieve({
+ id: "",
});
// Handle the result
@@ -1334,11 +1310,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/license-keys/"]["get"]
+ - target: $["paths"]["/v1/license-keys/{id}"]["patch"]
update:
x-codeSamples:
- lang: typescript
- label: list
+ label: update
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1347,20 +1323,21 @@ actions:
});
async function run() {
- const result = await polar.users.licenseKeys.list({});
+ const result = await polar.licenseKeys.update({
+ id: "",
+ licenseKeyUpdate: {},
+ });
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
+ // Handle the result
+ console.log(result)
}
run();
- - target: $["paths"]["/v1/organizations/{id}"]["patch"]
+ - target: $["paths"]["/v1/users/subscriptions/{id}"]["delete"]
update:
x-codeSamples:
- lang: typescript
- label: update
+ label: cancel
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1369,9 +1346,8 @@ actions:
});
async function run() {
- const result = await polar.organizations.update({
+ const result = await polar.users.subscriptions.cancel({
id: "",
- organizationUpdate: {},
});
// Handle the result
@@ -1379,34 +1355,42 @@ actions:
}
run();
- - target: $["paths"]["/v1/articles/{id}"]["delete"]
+ - target: $["paths"]["/v1/users/license-keys/deactivate"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: delete
- source: "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n await polar.articles.delete({\n id: \"\",\n });\n\n \n}\n\nrun();"
- - target: $["paths"]["/v1/benefits/"]["get"]
+ label: deactivate
+ source: "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n await polar.users.licenseKeys.deactivate({\n key: \"\",\n organizationId: \"\",\n activationId: \"\",\n });\n\n \n}\n\nrun();"
+ - target: $["paths"]["/v1/subscriptions/import"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: list
+ label: import
source: |-
import { Polar } from "@polar-sh/sdk";
+ import { openAsBlob } from "node:fs";
const polar = new Polar({
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});
async function run() {
- const result = await polar.benefits.list({});
+ const result = await polar.subscriptions.importSubscriptions({
+ file: await openAsBlob("./sample-file"),
+ organizationId: "",
+ });
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
+ // Handle the result
+ console.log(result)
}
run();
+ - target: $["paths"]["/v1/articles/{id}"]["delete"]
+ update:
+ x-codeSamples:
+ - lang: typescript
+ label: delete
+ source: "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n await polar.articles.delete({\n id: \"\",\n });\n\n \n}\n\nrun();"
- target: $["paths"]["/v1/products/"]["post"]
update:
x-codeSamples:
@@ -1435,11 +1419,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/checkouts/{id}"]["get"]
+ - target: $["paths"]["/v1/files/{id}"]["patch"]
update:
x-codeSamples:
- lang: typescript
- label: get
+ label: update
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1448,8 +1432,9 @@ actions:
});
async function run() {
- const result = await polar.checkouts.retrieve({
- id: "",
+ const result = await polar.files.update({
+ id: "",
+ filePatch: {},
});
// Handle the result
@@ -1457,11 +1442,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/license-keys/{id}"]["patch"]
+ - target: $["paths"]["/v1/users/license-keys/validate"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: update
+ label: validate
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1470,9 +1455,9 @@ actions:
});
async function run() {
- const result = await polar.licenseKeys.update({
- id: "",
- licenseKeyUpdate: {},
+ const result = await polar.users.licenseKeys.validate({
+ key: "",
+ organizationId: "",
});
// Handle the result
@@ -1480,7 +1465,7 @@ actions:
}
run();
- - target: $["paths"]["/v1/orders/"]["get"]
+ - target: $["paths"]["/v1/organizations/"]["get"]
update:
x-codeSamples:
- lang: typescript
@@ -1493,7 +1478,7 @@ actions:
});
async function run() {
- const result = await polar.orders.list({});
+ const result = await polar.organizations.list({});
for await (const page of result) {
// Handle the page
@@ -1502,11 +1487,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/orders/{id}"]["get"]
+ - target: $["paths"]["/v1/oauth2/register"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: get
+ label: create_client
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1515,8 +1500,11 @@ actions:
});
async function run() {
- const result = await polar.users.orders.retrieve({
- id: "",
+ const result = await polar.oauth2.clients.create({
+ redirectUris: [
+ "http://limp-pastry.org",
+ ],
+ clientName: "",
});
// Handle the result
@@ -1524,11 +1512,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/users/downloadables/{token}"]["get"]
+ - target: $["paths"]["/v1/oauth2/register/{client_id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: get
+ label: get_client
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1537,8 +1525,8 @@ actions:
});
async function run() {
- const result = await polar.users.downloadables.retrieve({
- token: "",
+ const result = await polar.oauth2.clients.retrieve({
+ clientId: "",
});
// Handle the result
@@ -1546,11 +1534,17 @@ actions:
}
run();
- - target: $["paths"]["/v1/repositories/{id}"]["patch"]
+ - target: $["paths"]["/v1/benefits/{id}"]["delete"]
update:
x-codeSamples:
- lang: typescript
- label: update
+ label: delete
+ source: "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n await polar.benefits.delete({\n id: \"\",\n });\n\n \n}\n\nrun();"
+ - target: $["paths"]["/v1/benefits/{id}/grants"]["get"]
+ update:
+ x-codeSamples:
+ - lang: typescript
+ label: grants
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1559,21 +1553,22 @@ actions:
});
async function run() {
- const result = await polar.repositories.update({
+ const result = await polar.benefits.grants({
id: "",
- repositoryUpdate: {},
});
- // Handle the result
- console.log(result)
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
}
run();
- - target: $["paths"]["/v1/organizations/"]["post"]
+ - target: $["paths"]["/v1/articles/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: create
+ label: get
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1582,9 +1577,8 @@ actions:
});
async function run() {
- const result = await polar.organizations.create({
- name: "",
- slug: "",
+ const result = await polar.articles.retrieve({
+ id: "",
});
// Handle the result
@@ -1592,11 +1586,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/articles/{id}"]["patch"]
+ - target: $["paths"]["/v1/checkouts/{id}"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: update
+ label: get
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1605,9 +1599,8 @@ actions:
});
async function run() {
- const result = await polar.articles.update({
- id: "",
- articleUpdate: {},
+ const result = await polar.checkouts.retrieve({
+ id: "",
});
// Handle the result
@@ -1615,11 +1608,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/oauth2/"]["get"]
+ - target: $["paths"]["/v1/articles/"]["post"]
update:
x-codeSamples:
- lang: typescript
- label: list
+ label: create
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1628,20 +1621,20 @@ actions:
});
async function run() {
- const result = await polar.oauth2.clients.list({});
+ const result = await polar.articles.create({
+ title: "",
+ });
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
+ // Handle the result
+ console.log(result)
}
run();
- - target: $["paths"]["/v1/products/{id}"]["patch"]
+ - target: $["paths"]["/v1/oauth2/register/{client_id}"]["delete"]
update:
x-codeSamples:
- lang: typescript
- label: update
+ label: delete_client
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1650,9 +1643,8 @@ actions:
});
async function run() {
- const result = await polar.products.update({
- id: "",
- productUpdate: {},
+ const result = await polar.oauth2.clients.delete({
+ clientId: "",
});
// Handle the result
@@ -1660,11 +1652,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/repositories/"]["get"]
+ - target: $["paths"]["/v1/users/advertisements/{id}"]["patch"]
update:
x-codeSamples:
- lang: typescript
- label: list
+ label: update
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1673,20 +1665,21 @@ actions:
});
async function run() {
- const result = await polar.repositories.list({});
+ const result = await polar.users.advertisements.update({
+ id: "",
+ userAdvertisementCampaignUpdate: {},
+ });
- for await (const page of result) {
- // Handle the page
- console.log(page);
- }
+ // Handle the result
+ console.log(result)
}
run();
- - target: $["paths"]["/v1/files/{id}/uploaded"]["post"]
+ - target: $["paths"]["/v1/users/advertisements/{id}"]["delete"]
update:
x-codeSamples:
- lang: typescript
- label: uploaded
+ label: delete
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1695,19 +1688,8 @@ actions:
});
async function run() {
- const result = await polar.files.uploaded({
+ const result = await polar.users.advertisements.delete({
id: "",
- fileUploadCompleted: {
- id: "",
- path: "/sys",
- parts: [
- {
- number: 241210,
- checksumEtag: "",
- checksumSha256Base64: "",
- },
- ],
- },
});
// Handle the result
@@ -1715,11 +1697,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/license-keys/{id}/activations/{activation_id}"]["get"]
+ - target: $["paths"]["/v1/users/downloadables/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: get_activation
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1728,21 +1710,20 @@ actions:
});
async function run() {
- const result = await polar.licenseKeys.getActivation({
- id: "",
- activationId: "",
- });
+ const result = await polar.users.downloadables.list({});
- // Handle the result
- console.log(result)
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
}
run();
- - target: $["paths"]["/v1/oauth2/token"]["post"]
+ - target: $["paths"]["/v1/articles/"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: request_token
+ label: list
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1751,11 +1732,32 @@ actions:
});
async function run() {
- const result = await polar.oauth2.token({
+ const result = await polar.articles.list({});
+
+ for await (const page of result) {
+ // Handle the page
+ console.log(page);
+ }
+ }
+
+ run();
+ - target: $["paths"]["/v1/oauth2/revoke"]["post"]
+ update:
+ x-codeSamples:
+ - lang: typescript
+ label: revoke_token
+ source: |-
+ import { Polar } from "@polar-sh/sdk";
+
+ const polar = new Polar({
+ accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
+ });
+
+ async function run() {
+ const result = await polar.oauth2.revoke({
+ token: "",
clientId: "",
clientSecret: "",
- code: "",
- redirectUri: "http://multicolored-chivalry.name",
});
// Handle the result
@@ -1763,11 +1765,11 @@ actions:
}
run();
- - target: $["paths"]["/v1/oauth2/register/{client_id}"]["delete"]
+ - target: $["paths"]["/v1/oauth2/userinfo"]["get"]
update:
x-codeSamples:
- lang: typescript
- label: delete_client
+ label: userinfo
source: |-
import { Polar } from "@polar-sh/sdk";
@@ -1776,9 +1778,7 @@ actions:
});
async function run() {
- const result = await polar.oauth2.clients.delete({
- clientId: "",
- });
+ const result = await polar.oauth2.userinfo();
// Handle the result
console.log(result)
diff --git a/jsr.json b/jsr.json
index 21447f03..7a5b5797 100644
--- a/jsr.json
+++ b/jsr.json
@@ -2,7 +2,7 @@
{
"name": "@polar-sh/sdk",
- "version": "0.6.0",
+ "version": "0.6.1",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
diff --git a/package-lock.json b/package-lock.json
index fed20e2a..3d06afbb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@polar-sh/sdk",
- "version": "0.6.0",
+ "version": "0.6.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@polar-sh/sdk",
- "version": "0.6.0",
+ "version": "0.6.1",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
diff --git a/package.json b/package.json
index f333ec44..b9181cab 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,13 @@
{
"name": "@polar-sh/sdk",
- "version": "0.6.0",
+ "version": "0.6.1",
"author": "Speakeasy",
"main": "./index.js",
"sideEffects": false,
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/polarsource/polar-js.git"
+ },
"scripts": {
"lint": "eslint --max-warnings=0 src",
"build": "tsc",
diff --git a/src/lib/config.ts b/src/lib/config.ts
index 0bc154d4..dc1be180 100644
--- a/src/lib/config.ts
+++ b/src/lib/config.ts
@@ -52,7 +52,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.1.0",
- sdkVersion: "0.6.0",
+ sdkVersion: "0.6.1",
genVersion: "2.407.2",
- userAgent: "speakeasy-sdk/typescript 0.6.0 2.407.2 0.1.0 @polar-sh/sdk",
+ userAgent: "speakeasy-sdk/typescript 0.6.1 2.407.2 0.1.0 @polar-sh/sdk",
} as const;