@@ -86,7 +86,7 @@ actions:
8686 " x-codeSamples " :
8787 - " lang " : " typescript"
8888 " label " : " Typescript (SDK)"
89- " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.checkouts.create({\n customerName: \" John Doe\" ,\n customerBillingAddress: {\n country: \" US\" ,\n },\n products: [\n \" <value 1>\" ,\n \" <value 2>\" ,\n \" <value 3>\" ,\n ],\n });\n\n console.log(result);\n }\n\n run();"
89+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.checkouts.create({\n customerName: \" John Doe\" ,\n customerBillingAddress: {\n country: \" US\" ,\n },\n locale: \" en \" , \n products: [\n \" <value 1>\" ,\n \" <value 2>\" ,\n \" <value 3>\" ,\n ],\n });\n\n console.log(result);\n }\n\n run();"
9090 - target : $["paths"]["/v1/checkouts/client/{client_secret}"]["get"]
9191 update :
9292 " x-codeSamples " :
@@ -98,13 +98,13 @@ actions:
9898 " x-codeSamples " :
9999 - " lang " : " typescript"
100100 " label " : " Typescript (SDK)"
101- " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar();\n\n async function run() {\n const result = await polar.checkouts.clientUpdate({\n clientSecret: \" <value>\" ,\n checkoutUpdatePublic: {\n customerName: \" John Doe\" ,\n customerBillingAddress: null,\n },\n });\n\n console.log(result);\n }\n\n run();"
101+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar();\n\n async function run() {\n const result = await polar.checkouts.clientUpdate({\n clientSecret: \" <value>\" ,\n checkoutUpdatePublic: {\n customerName: \" John Doe\" ,\n customerBillingAddress: null,\n locale: \" en \" , \n },\n });\n\n console.log(result);\n }\n\n run();"
102102 - target : $["paths"]["/v1/checkouts/client/{client_secret}/confirm"]["post"]
103103 update :
104104 " x-codeSamples " :
105105 - " lang " : " typescript"
106106 " label " : " Typescript (SDK)"
107- " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.checkouts.clientConfirm({\n clientSecret: \" <value>\" ,\n checkoutConfirmStripe: {\n customerName: \" John Doe\" ,\n customerBillingAddress: {\n country: \" US\" ,\n },\n },\n });\n\n console.log(result);\n }\n\n run();"
107+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.checkouts.clientConfirm({\n clientSecret: \" <value>\" ,\n checkoutConfirmStripe: {\n customerName: \" John Doe\" ,\n customerBillingAddress: {\n country: \" US\" ,\n },\n locale: \" en \" , \n },\n });\n\n console.log(result);\n }\n\n run();"
108108 - target : $["paths"]["/v1/checkouts/{id}"]["get"]
109109 update :
110110 " x-codeSamples " :
@@ -116,7 +116,7 @@ actions:
116116 " x-codeSamples " :
117117 - " lang " : " typescript"
118118 " label " : " Typescript (SDK)"
119- " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.checkouts.update({\n id: \" <value>\" ,\n checkoutUpdate: {\n customerName: \" John Doe\" ,\n customerBillingAddress: {\n country: \" US\" ,\n },\n },\n });\n\n console.log(result);\n }\n\n run();"
119+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.checkouts.update({\n id: \" <value>\" ,\n checkoutUpdate: {\n customerName: \" John Doe\" ,\n customerBillingAddress: {\n country: \" US\" ,\n },\n locale: \" en \" , \n },\n });\n\n console.log(result);\n }\n\n run();"
120120 - target : $["paths"]["/v1/custom-fields/"]["get"]
121121 update :
122122 " x-codeSamples " :
@@ -261,6 +261,30 @@ actions:
261261 - " lang " : " typescript"
262262 " label " : " Typescript (SDK)"
263263 " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar();\n\n async function run() {\n const result = await polar.customerPortal.licenseKeys.get({\n customerSession: process.env[\" POLAR_CUSTOMER_SESSION\" ] ?? \"\" ,\n }, {\n id: \" <value>\" ,\n });\n\n console.log(result);\n }\n\n run();"
264+ - target : $["paths"]["/v1/customer-portal/members"]["get"]
265+ update :
266+ " x-codeSamples " :
267+ - " lang " : " typescript"
268+ " label " : " Typescript (SDK)"
269+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.customerPortal.members.listMembers();\n\n console.log(result);\n }\n\n run();"
270+ - target : $["paths"]["/v1/customer-portal/members"]["post"]
271+ update :
272+ " x-codeSamples " :
273+ - " lang " : " typescript"
274+ " label " : " Typescript (SDK)"
275+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.customerPortal.members.addMember({\n email: \" Domenica.Schamberger@yahoo.com\" ,\n });\n\n console.log(result);\n }\n\n run();"
276+ - target : $["paths"]["/v1/customer-portal/members/{id}"]["delete"]
277+ update :
278+ " x-codeSamples " :
279+ - " lang " : " typescript"
280+ " label " : " Typescript (SDK)"
281+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n await polar.customerPortal.members.removeMember({\n id: \" b61c5e87-cda5-4b14-93ee-71a695f42d9d\" ,\n });\n\n\n }\n\n run();"
282+ - target : $["paths"]["/v1/customer-portal/members/{id}"]["patch"]
283+ update :
284+ " x-codeSamples " :
285+ - " lang " : " typescript"
286+ " label " : " Typescript (SDK)"
287+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.customerPortal.members.updateMember({\n id: \" 8319ae11-ed5f-4642-81e4-4b40731df195\" ,\n customerPortalMemberUpdate: {},\n });\n\n console.log(result);\n }\n\n run();"
264288 - target : $["paths"]["/v1/customer-portal/meters/"]["get"]
265289 update :
266290 " x-codeSamples " :
@@ -440,7 +464,7 @@ actions:
440464 " x-codeSamples " :
441465 - " lang " : " typescript"
442466 " label " : " Typescript (SDK)"
443- " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.customers.create({\n externalId: \" usr_1337\" ,\n email: \" customer@example.com\" ,\n name: \" John Doe\" ,\n billingAddress: {\n country: \" US\" ,\n },\n taxId: [\n \" 911144442\" ,\n \" us_ein\" ,\n ],\n type: \" individual\" ,\n organizationId: \" 1dbfc517-0bbf-4301-9ba8-555ca42b9737\" ,\n owner: {\n email: \" member@example.com\" ,\n name: \" Jane Doe\" ,\n externalId: \" usr_1337\" ,\n },\n });\n\n console.log(result);\n }\n\n run();"
467+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.customers.create({\n externalId: \" usr_1337\" ,\n email: \" customer@example.com\" ,\n name: \" John Doe\" ,\n billingAddress: {\n country: \" US\" ,\n },\n taxId: [\n \" 911144442\" ,\n \" us_ein\" ,\n ],\n locale: \" en \" , \n type: \" individual\" ,\n organizationId: \" 1dbfc517-0bbf-4301-9ba8-555ca42b9737\" ,\n owner: {\n email: \" member@example.com\" ,\n name: \" Jane Doe\" ,\n externalId: \" usr_1337\" ,\n },\n });\n\n console.log(result);\n }\n\n run();"
444468 - target : $["paths"]["/v1/customers/export"]["get"]
445469 update :
446470 " x-codeSamples " :
@@ -464,7 +488,7 @@ actions:
464488 " x-codeSamples " :
465489 - " lang " : " typescript"
466490 " label " : " Typescript (SDK)"
467- " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.customers.updateExternal({\n externalId: \" <id>\" ,\n customerUpdateExternalID: {\n email: \" customer@example.com\" ,\n name: \" John Doe\" ,\n billingAddress: null,\n taxId: [\n \" 911144442\" ,\n \" us_ein\" ,\n ],\n },\n });\n\n console.log(result);\n }\n\n run();"
491+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.customers.updateExternal({\n externalId: \" <id>\" ,\n customerUpdateExternalID: {\n email: \" customer@example.com\" ,\n name: \" John Doe\" ,\n billingAddress: null,\n taxId: [\n \" 911144442\" ,\n \" us_ein\" ,\n ],\n locale: \" en \" , \n },\n });\n\n console.log(result);\n }\n\n run();"
468492 - target : $["paths"]["/v1/customers/external/{external_id}/state"]["get"]
469493 update :
470494 " x-codeSamples " :
@@ -488,7 +512,7 @@ actions:
488512 " x-codeSamples " :
489513 - " lang " : " typescript"
490514 " label " : " Typescript (SDK)"
491- " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.customers.update({\n id: \" <value>\" ,\n customerUpdate: {\n email: \" customer@example.com\" ,\n name: \" John Doe\" ,\n billingAddress: {\n country: \" US\" ,\n },\n taxId: [\n \" 911144442\" ,\n \" us_ein\" ,\n ],\n externalId: \" usr_1337\" ,\n type: \" individual\" ,\n },\n });\n\n console.log(result);\n }\n\n run();"
515+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.customers.update({\n id: \" <value>\" ,\n customerUpdate: {\n email: \" customer@example.com\" ,\n name: \" John Doe\" ,\n billingAddress: {\n country: \" US\" ,\n },\n taxId: [\n \" 911144442\" ,\n \" us_ein\" ,\n ],\n locale: \" en \" , \n externalId: \" usr_1337\" ,\n type: \" individual\" ,\n },\n });\n\n console.log(result);\n }\n\n run();"
492516 - target : $["paths"]["/v1/customers/{id}/state"]["get"]
493517 update :
494518 " x-codeSamples " :
@@ -884,7 +908,7 @@ actions:
884908 " x-codeSamples " :
885909 - " lang " : " typescript"
886910 " label " : " Typescript (SDK)"
887- " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.products.create({\n name: \" <value>\" ,\n prices: [\n {\n amountType: \" custom\" ,\n priceCurrency: \" usd \" , \n minimumAmount: 50,\n },\n ],\n organizationId: \" 1dbfc517-0bbf-4301-9ba8-555ca42b9737\" ,\n });\n\n console.log(result);\n }\n\n run();"
911+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.products.create({\n name: \" <value>\" ,\n prices: [\n {\n amountType: \" custom\" ,\n minimumAmount: 50,\n },\n ],\n organizationId: \" 1dbfc517-0bbf-4301-9ba8-555ca42b9737\" ,\n });\n\n console.log(result);\n }\n\n run();"
888912 - target : $["paths"]["/v1/products/{id}"]["get"]
889913 update :
890914 " x-codeSamples " :
@@ -968,7 +992,7 @@ actions:
968992 " x-codeSamples " :
969993 - " lang " : " typescript"
970994 " label " : " Typescript (SDK)"
971- " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.webhooks.createWebhookEndpoint({\n url: \" https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0\" ,\n format: \" slack\" ,\n events: [\n \" subscription.canceled \" ,\n ],\n organizationId: \" 1dbfc517-0bbf-4301-9ba8-555ca42b9737\" ,\n });\n\n console.log(result);\n }\n\n run();"
995+ " source " : " import { Polar } from \" @polar-sh/sdk\" ;\n\n const polar = new Polar({\n accessToken: process.env[\" POLAR_ACCESS_TOKEN\" ] ?? \"\" ,\n });\n\n async function run() {\n const result = await polar.webhooks.createWebhookEndpoint({\n url: \" https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0\" ,\n format: \" slack\" ,\n events: [\n \" subscription.active \" ,\n ],\n organizationId: \" 1dbfc517-0bbf-4301-9ba8-555ca42b9737\" ,\n });\n\n console.log(result);\n }\n\n run();"
972996 - target : $["paths"]["/v1/webhooks/endpoints/{id}"]["delete"]
973997 update :
974998 " x-codeSamples " :
0 commit comments