@polar-sh/sdk 0.13.0 → 0.13.2
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 +15 -0
- package/docs/sdks/articles/README.md +78 -0
- package/docs/sdks/benefits/README.md +3 -3
- package/docs/sdks/checkoutlinks/README.md +400 -0
- package/funcs/articlesExport.d.ts +16 -0
- package/funcs/articlesExport.d.ts.map +1 -0
- package/funcs/articlesExport.js +99 -0
- package/funcs/articlesExport.js.map +1 -0
- package/funcs/benefitsCreate.d.ts +2 -1
- package/funcs/benefitsCreate.d.ts.map +1 -1
- package/funcs/benefitsCreate.js +2 -1
- package/funcs/benefitsCreate.js.map +1 -1
- package/funcs/benefitsGet.d.ts +2 -1
- package/funcs/benefitsGet.d.ts.map +1 -1
- package/funcs/benefitsGet.js +2 -1
- package/funcs/benefitsGet.js.map +1 -1
- package/funcs/benefitsUpdate.d.ts +2 -1
- package/funcs/benefitsUpdate.d.ts.map +1 -1
- package/funcs/benefitsUpdate.js +2 -1
- package/funcs/benefitsUpdate.js.map +1 -1
- package/funcs/checkoutLinksCreate.d.ts +16 -0
- package/funcs/checkoutLinksCreate.d.ts.map +1 -0
- package/funcs/checkoutLinksCreate.js +95 -0
- package/funcs/checkoutLinksCreate.js.map +1 -0
- package/funcs/checkoutLinksDelete.d.ts +16 -0
- package/funcs/checkoutLinksDelete.d.ts.map +1 -0
- package/funcs/checkoutLinksDelete.js +101 -0
- package/funcs/checkoutLinksDelete.js.map +1 -0
- package/funcs/checkoutLinksGet.d.ts +17 -0
- package/funcs/checkoutLinksGet.d.ts.map +1 -0
- package/funcs/checkoutLinksGet.js +101 -0
- package/funcs/checkoutLinksGet.js.map +1 -0
- package/funcs/checkoutLinksList.d.ts +17 -0
- package/funcs/checkoutLinksList.d.ts.map +1 -0
- package/funcs/checkoutLinksList.js +130 -0
- package/funcs/checkoutLinksList.js.map +1 -0
- package/funcs/checkoutLinksUpdate.d.ts +17 -0
- package/funcs/checkoutLinksUpdate.d.ts.map +1 -0
- package/funcs/checkoutLinksUpdate.js +104 -0
- package/funcs/checkoutLinksUpdate.js.map +1 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/articlecreate.d.ts +6 -67
- package/models/components/articlecreate.d.ts.map +1 -1
- package/models/components/articlecreate.js +7 -47
- package/models/components/articlecreate.js.map +1 -1
- package/models/components/benefit.d.ts +28 -0
- package/models/components/benefit.d.ts.map +1 -0
- package/models/components/benefit.js +69 -0
- package/models/components/benefit.js.map +1 -0
- package/models/components/benefitbase.d.ts +0 -3
- package/models/components/benefitbase.d.ts.map +1 -1
- package/models/components/benefitbase.js.map +1 -1
- package/models/components/benefitgrantwebhook.d.ts +3 -28
- package/models/components/benefitgrantwebhook.d.ts.map +1 -1
- package/models/components/benefitgrantwebhook.js +4 -57
- package/models/components/benefitgrantwebhook.js.map +1 -1
- package/models/components/benefitinput.d.ts +28 -0
- package/models/components/benefitinput.d.ts.map +1 -0
- package/models/components/benefitinput.js +69 -0
- package/models/components/benefitinput.js.map +1 -0
- package/models/components/checkoutlink.d.ts +69 -0
- package/models/components/checkoutlink.d.ts.map +1 -0
- package/models/components/checkoutlink.js +90 -0
- package/models/components/checkoutlink.js.map +1 -0
- package/models/components/checkoutlinkcreate.d.ts +85 -0
- package/models/components/checkoutlinkcreate.d.ts.map +1 -0
- package/models/components/checkoutlinkcreate.js +90 -0
- package/models/components/checkoutlinkcreate.js.map +1 -0
- package/models/components/checkoutlinksortproperty.d.ts +28 -0
- package/models/components/checkoutlinksortproperty.d.ts.map +1 -0
- package/models/components/checkoutlinksortproperty.js +50 -0
- package/models/components/checkoutlinksortproperty.js.map +1 -0
- package/models/components/checkoutlinkupdate.d.ts +46 -0
- package/models/components/checkoutlinkupdate.d.ts.map +1 -0
- package/models/components/checkoutlinkupdate.js +61 -0
- package/models/components/checkoutlinkupdate.js.map +1 -0
- package/models/components/checkoutpublic.d.ts +5 -8
- package/models/components/checkoutpublic.d.ts.map +1 -1
- package/models/components/checkoutpublic.js +2 -2
- package/models/components/checkoutpublic.js.map +1 -1
- package/models/components/index.d.ts +13 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +13 -0
- package/models/components/index.js.map +1 -1
- package/models/components/interval.d.ts +37 -0
- package/models/components/interval.d.ts.map +1 -0
- package/models/components/interval.js +54 -0
- package/models/components/interval.js.map +1 -0
- package/models/components/issue.d.ts +0 -6
- package/models/components/issue.d.ts.map +1 -1
- package/models/components/issue.js.map +1 -1
- package/models/components/licensekeyread.d.ts +3 -0
- package/models/components/licensekeyread.d.ts.map +1 -1
- package/models/components/licensekeyread.js +3 -0
- package/models/components/licensekeyread.js.map +1 -1
- package/models/components/licensekeyuser.d.ts +31 -0
- package/models/components/licensekeyuser.d.ts.map +1 -0
- package/models/components/licensekeyuser.js +67 -0
- package/models/components/licensekeyuser.js.map +1 -0
- package/models/components/licensekeywithactivations.d.ts +3 -0
- package/models/components/licensekeywithactivations.d.ts.map +1 -1
- package/models/components/licensekeywithactivations.js +3 -0
- package/models/components/licensekeywithactivations.js.map +1 -1
- package/models/components/listresourcebenefit.d.ts +3 -28
- package/models/components/listresourcebenefit.d.ts.map +1 -1
- package/models/components/listresourcebenefit.js +4 -57
- package/models/components/listresourcebenefit.js.map +1 -1
- package/models/components/listresourcecheckoutlink.d.ts +29 -0
- package/models/components/listresourcecheckoutlink.d.ts.map +1 -0
- package/models/components/listresourcecheckoutlink.js +54 -0
- package/models/components/listresourcecheckoutlink.js.map +1 -0
- package/models/components/metric.d.ts +0 -3
- package/models/components/metric.d.ts.map +1 -1
- package/models/components/metric.js.map +1 -1
- package/models/components/metricsintervalslimits.d.ts +5 -5
- package/models/components/metricslimits.d.ts +1 -1
- package/models/components/metricsresponse.d.ts +0 -3
- package/models/components/metricsresponse.d.ts.map +1 -1
- package/models/components/metricsresponse.js.map +1 -1
- package/models/components/oauth2client.js +2 -2
- package/models/components/oauth2client.js.map +1 -1
- package/models/components/oauth2clientconfiguration.js +2 -2
- package/models/components/oauth2clientconfiguration.js.map +1 -1
- package/models/components/oauth2clientconfigurationupdate.js +2 -2
- package/models/components/oauth2clientconfigurationupdate.js.map +1 -1
- package/models/components/order.d.ts +3 -0
- package/models/components/order.d.ts.map +1 -1
- package/models/components/order.js +5 -0
- package/models/components/order.js.map +1 -1
- package/models/components/orderbillingreason.d.ts +34 -0
- package/models/components/orderbillingreason.d.ts.map +1 -0
- package/models/components/orderbillingreason.js +52 -0
- package/models/components/orderbillingreason.js.map +1 -0
- package/models/components/pledge.d.ts +0 -9
- package/models/components/pledge.d.ts.map +1 -1
- package/models/components/pledge.js.map +1 -1
- package/models/components/polarcheckoutschemascheckout.d.ts +2 -121
- package/models/components/polarcheckoutschemascheckout.d.ts.map +1 -1
- package/models/components/polarcheckoutschemascheckout.js +3 -108
- package/models/components/polarcheckoutschemascheckout.js.map +1 -1
- package/models/components/productpriceonetimecustom.d.ts +5 -0
- package/models/components/productpriceonetimecustom.d.ts.map +1 -1
- package/models/components/productpriceonetimecustom.js +4 -0
- package/models/components/productpriceonetimecustom.js.map +1 -1
- package/models/components/productpriceonetimefixed.d.ts +5 -0
- package/models/components/productpriceonetimefixed.d.ts.map +1 -1
- package/models/components/productpriceonetimefixed.js +4 -0
- package/models/components/productpriceonetimefixed.js.map +1 -1
- package/models/components/productpriceonetimefree.d.ts +5 -0
- package/models/components/productpriceonetimefree.d.ts.map +1 -1
- package/models/components/productpriceonetimefree.js +4 -0
- package/models/components/productpriceonetimefree.js.map +1 -1
- package/models/components/productpricerecurringcustom.d.ts +5 -3
- package/models/components/productpricerecurringcustom.d.ts.map +1 -1
- package/models/components/productpricerecurringcustom.js +4 -0
- package/models/components/productpricerecurringcustom.js.map +1 -1
- package/models/components/productpricerecurringfixed.d.ts +5 -3
- package/models/components/productpricerecurringfixed.d.ts.map +1 -1
- package/models/components/productpricerecurringfixed.js +4 -0
- package/models/components/productpricerecurringfixed.js.map +1 -1
- package/models/components/productpricerecurringfixedcreate.d.ts +0 -3
- package/models/components/productpricerecurringfixedcreate.d.ts.map +1 -1
- package/models/components/productpricerecurringfixedcreate.js.map +1 -1
- package/models/components/productpricerecurringfree.d.ts +5 -3
- package/models/components/productpricerecurringfree.d.ts.map +1 -1
- package/models/components/productpricerecurringfree.js +4 -0
- package/models/components/productpricerecurringfree.js.map +1 -1
- package/models/components/productpricerecurringfreecreate.d.ts +0 -3
- package/models/components/productpricerecurringfreecreate.d.ts.map +1 -1
- package/models/components/productpricerecurringfreecreate.js.map +1 -1
- package/models/components/validatedlicensekey.d.ts +3 -0
- package/models/components/validatedlicensekey.d.ts.map +1 -1
- package/models/components/validatedlicensekey.js +3 -0
- package/models/components/validatedlicensekey.js.map +1 -1
- package/models/components/webhookbenefitcreatedpayload.d.ts +3 -28
- package/models/components/webhookbenefitcreatedpayload.d.ts.map +1 -1
- package/models/components/webhookbenefitcreatedpayload.js +4 -57
- package/models/components/webhookbenefitcreatedpayload.js.map +1 -1
- package/models/components/webhookbenefitupdatedpayload.d.ts +3 -28
- package/models/components/webhookbenefitupdatedpayload.d.ts.map +1 -1
- package/models/components/webhookbenefitupdatedpayload.js +4 -57
- package/models/components/webhookbenefitupdatedpayload.js.map +1 -1
- package/models/components/webhookcheckoutcreatedpayload.d.ts +3 -3
- package/models/components/webhookcheckoutcreatedpayload.d.ts.map +1 -1
- package/models/components/webhookcheckoutcreatedpayload.js +2 -2
- package/models/components/webhookcheckoutcreatedpayload.js.map +1 -1
- package/models/components/webhookcheckoutupdatedpayload.d.ts +3 -3
- package/models/components/webhookcheckoutupdatedpayload.d.ts.map +1 -1
- package/models/components/webhookcheckoutupdatedpayload.js +2 -2
- package/models/components/webhookcheckoutupdatedpayload.js.map +1 -1
- package/models/components/webhooksubscriptionactivepayload.d.ts +59 -0
- package/models/components/webhooksubscriptionactivepayload.d.ts.map +1 -0
- package/models/components/webhooksubscriptionactivepayload.js +71 -0
- package/models/components/webhooksubscriptionactivepayload.js.map +1 -0
- package/models/components/webhooksubscriptioncanceledpayload.d.ts +59 -0
- package/models/components/webhooksubscriptioncanceledpayload.d.ts.map +1 -0
- package/models/components/webhooksubscriptioncanceledpayload.js +71 -0
- package/models/components/webhooksubscriptioncanceledpayload.js.map +1 -0
- package/models/components/webhooksubscriptionrevokedpayload.d.ts +59 -0
- package/models/components/webhooksubscriptionrevokedpayload.d.ts.map +1 -0
- package/models/components/webhooksubscriptionrevokedpayload.js +71 -0
- package/models/components/webhooksubscriptionrevokedpayload.js.map +1 -0
- package/models/components/webhooksubscriptionupdatedpayload.d.ts +6 -2
- package/models/components/webhooksubscriptionupdatedpayload.d.ts.map +1 -1
- package/models/components/webhooksubscriptionupdatedpayload.js.map +1 -1
- package/models/operations/articlesexport.d.ts +25 -0
- package/models/operations/articlesexport.d.ts.map +1 -0
- package/models/operations/articlesexport.js +59 -0
- package/models/operations/articlesexport.js.map +1 -0
- package/models/operations/benefitscreate.d.ts +0 -22
- package/models/operations/benefitscreate.d.ts.map +1 -1
- package/models/operations/benefitscreate.js +1 -32
- package/models/operations/benefitscreate.js.map +1 -1
- package/models/operations/benefitsget.d.ts +0 -23
- package/models/operations/benefitsget.d.ts.map +1 -1
- package/models/operations/benefitsget.js +1 -33
- package/models/operations/benefitsget.js.map +1 -1
- package/models/operations/benefitsupdate.d.ts +0 -22
- package/models/operations/benefitsupdate.d.ts.map +1 -1
- package/models/operations/benefitsupdate.js +1 -32
- package/models/operations/benefitsupdate.js.map +1 -1
- package/models/operations/checkoutlinksdelete.d.ts +28 -0
- package/models/operations/checkoutlinksdelete.d.ts.map +1 -0
- package/models/operations/checkoutlinksdelete.js +50 -0
- package/models/operations/checkoutlinksdelete.js.map +1 -0
- package/models/operations/checkoutlinksget.d.ts +28 -0
- package/models/operations/checkoutlinksget.d.ts.map +1 -0
- package/models/operations/checkoutlinksget.js +50 -0
- package/models/operations/checkoutlinksget.js.map +1 -0
- package/models/operations/checkoutlinkslist.d.ts +116 -0
- package/models/operations/checkoutlinkslist.d.ts.map +1 -0
- package/models/operations/checkoutlinkslist.js +129 -0
- package/models/operations/checkoutlinkslist.js.map +1 -0
- package/models/operations/checkoutlinksupdate.d.ts +31 -0
- package/models/operations/checkoutlinksupdate.d.ts.map +1 -0
- package/models/operations/checkoutlinksupdate.js +62 -0
- package/models/operations/checkoutlinksupdate.js.map +1 -0
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/metricsget.d.ts +1 -42
- package/models/operations/metricsget.d.ts.map +1 -1
- package/models/operations/metricsget.js +3 -29
- package/models/operations/metricsget.js.map +1 -1
- package/package.json +1 -1
- package/sdk/articles.d.ts +7 -0
- package/sdk/articles.d.ts.map +1 -1
- package/sdk/articles.js +10 -0
- package/sdk/articles.js.map +1 -1
- package/sdk/benefits.d.ts +4 -3
- package/sdk/benefits.d.ts.map +1 -1
- package/sdk/benefits.js.map +1 -1
- package/sdk/checkoutlinks.d.ts +42 -0
- package/sdk/checkoutlinks.d.ts.map +1 -0
- package/sdk/checkoutlinks.js +63 -0
- package/sdk/checkoutlinks.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +5 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/articlesExport.ts +129 -0
- package/src/funcs/benefitsCreate.ts +4 -3
- package/src/funcs/benefitsGet.ts +4 -3
- package/src/funcs/benefitsUpdate.ts +4 -3
- package/src/funcs/checkoutLinksCreate.ts +124 -0
- package/src/funcs/checkoutLinksDelete.ts +135 -0
- package/src/funcs/checkoutLinksGet.ts +134 -0
- package/src/funcs/checkoutLinksList.ts +189 -0
- package/src/funcs/checkoutLinksUpdate.ts +138 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/articlecreate.ts +18 -77
- package/src/models/components/benefit.ts +106 -0
- package/src/models/components/benefitbase.ts +0 -3
- package/src/models/components/benefitgrantwebhook.ts +9 -137
- package/src/models/components/benefitinput.ts +109 -0
- package/src/models/components/checkoutlink.ts +131 -0
- package/src/models/components/checkoutlinkcreate.ts +127 -0
- package/src/models/components/checkoutlinksortproperty.ts +35 -0
- package/src/models/components/checkoutlinkupdate.ts +73 -0
- package/src/models/components/checkoutpublic.ts +7 -10
- package/src/models/components/index.ts +13 -0
- package/src/models/components/interval.ts +34 -0
- package/src/models/components/issue.ts +0 -6
- package/src/models/components/licensekeyread.ts +10 -0
- package/src/models/components/licensekeyuser.ts +68 -0
- package/src/models/components/licensekeywithactivations.ts +10 -0
- package/src/models/components/listresourcebenefit.ts +9 -140
- package/src/models/components/listresourcecheckoutlink.ts +61 -0
- package/src/models/components/metric.ts +0 -3
- package/src/models/components/metricsintervalslimits.ts +5 -5
- package/src/models/components/metricslimits.ts +1 -1
- package/src/models/components/metricsresponse.ts +0 -3
- package/src/models/components/oauth2client.ts +2 -2
- package/src/models/components/oauth2clientconfiguration.ts +2 -2
- package/src/models/components/oauth2clientconfigurationupdate.ts +2 -2
- package/src/models/components/order.ts +11 -0
- package/src/models/components/orderbillingreason.ts +35 -0
- package/src/models/components/pledge.ts +0 -9
- package/src/models/components/polarcheckoutschemascheckout.ts +4 -229
- package/src/models/components/productpriceonetimecustom.ts +9 -0
- package/src/models/components/productpriceonetimefixed.ts +9 -0
- package/src/models/components/productpriceonetimefree.ts +9 -0
- package/src/models/components/productpricerecurringcustom.ts +9 -3
- package/src/models/components/productpricerecurringfixed.ts +9 -3
- package/src/models/components/productpricerecurringfixedcreate.ts +0 -3
- package/src/models/components/productpricerecurringfree.ts +9 -3
- package/src/models/components/productpricerecurringfreecreate.ts +0 -3
- package/src/models/components/validatedlicensekey.ts +10 -0
- package/src/models/components/webhookbenefitcreatedpayload.ts +9 -139
- package/src/models/components/webhookbenefitupdatedpayload.ts +9 -139
- package/src/models/components/webhookcheckoutcreatedpayload.ts +8 -8
- package/src/models/components/webhookcheckoutupdatedpayload.ts +8 -8
- package/src/models/components/webhooksubscriptionactivepayload.ts +95 -0
- package/src/models/components/webhooksubscriptioncanceledpayload.ts +96 -0
- package/src/models/components/webhooksubscriptionrevokedpayload.ts +96 -0
- package/src/models/components/webhooksubscriptionupdatedpayload.ts +6 -2
- package/src/models/operations/articlesexport.ts +54 -0
- package/src/models/operations/benefitscreate.ts +0 -67
- package/src/models/operations/benefitsget.ts +0 -66
- package/src/models/operations/benefitsupdate.ts +0 -67
- package/src/models/operations/checkoutlinksdelete.ts +48 -0
- package/src/models/operations/checkoutlinksget.ts +48 -0
- package/src/models/operations/checkoutlinkslist.ts +224 -0
- package/src/models/operations/checkoutlinksupdate.ts +62 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/metricsget.ts +3 -38
- package/src/sdk/articles.ts +18 -0
- package/src/sdk/benefits.ts +4 -3
- package/src/sdk/checkoutlinks.ts +101 -0
- package/src/sdk/sdk.ts +6 -0
package/README.md
CHANGED
|
@@ -117,6 +117,7 @@ run();
|
|
|
117
117
|
|
|
118
118
|
* [list](docs/sdks/articles/README.md#list) - List Articles
|
|
119
119
|
* [create](docs/sdks/articles/README.md#create) - Create Article
|
|
120
|
+
* [export](docs/sdks/articles/README.md#export) - Export Articles
|
|
120
121
|
* [get](docs/sdks/articles/README.md#get) - Get Article
|
|
121
122
|
* [update](docs/sdks/articles/README.md#update) - Update Article
|
|
122
123
|
* [delete](docs/sdks/articles/README.md#delete) - Delete Article
|
|
@@ -133,6 +134,14 @@ run();
|
|
|
133
134
|
* [delete](docs/sdks/benefits/README.md#delete) - Delete Benefit
|
|
134
135
|
* [grants](docs/sdks/benefits/README.md#grants) - List Benefit Grants
|
|
135
136
|
|
|
137
|
+
### [checkoutLinks](docs/sdks/checkoutlinks/README.md)
|
|
138
|
+
|
|
139
|
+
* [list](docs/sdks/checkoutlinks/README.md#list) - List Checkout Links
|
|
140
|
+
* [create](docs/sdks/checkoutlinks/README.md#create) - Create Checkout Link
|
|
141
|
+
* [get](docs/sdks/checkoutlinks/README.md#get) - Get Checkout Link
|
|
142
|
+
* [update](docs/sdks/checkoutlinks/README.md#update) - Update Checkout Link
|
|
143
|
+
* [delete](docs/sdks/checkoutlinks/README.md#delete) - Delete Checkout Link
|
|
144
|
+
|
|
136
145
|
### [checkouts](docs/sdks/checkouts/README.md)
|
|
137
146
|
|
|
138
147
|
* [~~create~~](docs/sdks/checkouts/README.md#create) - Create Checkout :warning: **Deprecated** Use `create` instead.
|
|
@@ -285,6 +294,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
285
294
|
- [`advertisementsList`](docs/sdks/advertisements/README.md#list) - List Campaigns
|
|
286
295
|
- [`articlesCreate`](docs/sdks/articles/README.md#create) - Create Article
|
|
287
296
|
- [`articlesDelete`](docs/sdks/articles/README.md#delete) - Delete Article
|
|
297
|
+
- [`articlesExport`](docs/sdks/articles/README.md#export) - Export Articles
|
|
288
298
|
- [`articlesGet`](docs/sdks/articles/README.md#get) - Get Article
|
|
289
299
|
- [`articlesList`](docs/sdks/articles/README.md#list) - List Articles
|
|
290
300
|
- [`articlesPreview`](docs/sdks/articles/README.md#preview) - Send Article Preview
|
|
@@ -297,6 +307,11 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
297
307
|
- [`benefitsGrants`](docs/sdks/benefits/README.md#grants) - List Benefit Grants
|
|
298
308
|
- [`benefitsList`](docs/sdks/benefits/README.md#list) - List Benefits
|
|
299
309
|
- [`benefitsUpdate`](docs/sdks/benefits/README.md#update) - Update Benefit
|
|
310
|
+
- [`checkoutLinksCreate`](docs/sdks/checkoutlinks/README.md#create) - Create Checkout Link
|
|
311
|
+
- [`checkoutLinksDelete`](docs/sdks/checkoutlinks/README.md#delete) - Delete Checkout Link
|
|
312
|
+
- [`checkoutLinksGet`](docs/sdks/checkoutlinks/README.md#get) - Get Checkout Link
|
|
313
|
+
- [`checkoutLinksList`](docs/sdks/checkoutlinks/README.md#list) - List Checkout Links
|
|
314
|
+
- [`checkoutLinksUpdate`](docs/sdks/checkoutlinks/README.md#update) - Update Checkout Link
|
|
300
315
|
- [`checkoutsCustomClientConfirm`](docs/sdks/custom/README.md#clientconfirm) - Confirm Checkout Session from Client
|
|
301
316
|
- [`checkoutsCustomClientGet`](docs/sdks/custom/README.md#clientget) - Get Checkout Session from Client
|
|
302
317
|
- [`checkoutsCustomClientUpdate`](docs/sdks/custom/README.md#clientupdate) - Update Checkout Session from Client
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
* [list](#list) - List Articles
|
|
9
9
|
* [create](#create) - Create Article
|
|
10
|
+
* [export](#export) - Export Articles
|
|
10
11
|
* [get](#get) - Get Article
|
|
11
12
|
* [update](#update) - Update Article
|
|
12
13
|
* [delete](#delete) - Delete Article
|
|
@@ -168,6 +169,83 @@ run();
|
|
|
168
169
|
| errors.HTTPValidationError | 422 | application/json |
|
|
169
170
|
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
170
171
|
|
|
172
|
+
## export
|
|
173
|
+
|
|
174
|
+
Export organization articles.
|
|
175
|
+
|
|
176
|
+
### Example Usage
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
import { Polar } from "@polar-sh/sdk";
|
|
180
|
+
|
|
181
|
+
const polar = new Polar({
|
|
182
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
async function run() {
|
|
186
|
+
const result = await polar.articles.export({
|
|
187
|
+
organizationId: "cf4e3d5e-2b50-4470-a85b-8d021391fabb",
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
// Handle the result
|
|
191
|
+
console.log(result);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
run();
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Standalone function
|
|
198
|
+
|
|
199
|
+
The standalone function version of this method:
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
203
|
+
import { articlesExport } from "@polar-sh/sdk/funcs/articlesExport.js";
|
|
204
|
+
|
|
205
|
+
// Use `PolarCore` for best tree-shaking performance.
|
|
206
|
+
// You can create one instance of it to use across an application.
|
|
207
|
+
const polar = new PolarCore({
|
|
208
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
async function run() {
|
|
212
|
+
const res = await articlesExport(polar, {
|
|
213
|
+
organizationId: "cf4e3d5e-2b50-4470-a85b-8d021391fabb",
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
if (!res.ok) {
|
|
217
|
+
throw res.error;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const { value: result } = res;
|
|
221
|
+
|
|
222
|
+
// Handle the result
|
|
223
|
+
console.log(result);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
run();
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Parameters
|
|
230
|
+
|
|
231
|
+
| Parameter | Type | Required | Description |
|
|
232
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
233
|
+
| `request` | [operations.ArticlesExportRequest](../../models/operations/articlesexportrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
234
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
235
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
236
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
237
|
+
|
|
238
|
+
### Response
|
|
239
|
+
|
|
240
|
+
**Promise\<[any](../../models/.md)\>**
|
|
241
|
+
|
|
242
|
+
### Errors
|
|
243
|
+
|
|
244
|
+
| Error Type | Status Code | Content Type |
|
|
245
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
246
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
247
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
248
|
+
|
|
171
249
|
## get
|
|
172
250
|
|
|
173
251
|
Get an article by ID.
|
|
@@ -163,7 +163,7 @@ run();
|
|
|
163
163
|
|
|
164
164
|
### Response
|
|
165
165
|
|
|
166
|
-
**Promise\<[
|
|
166
|
+
**Promise\<[components.Benefit](../../models/components/benefit.md)\>**
|
|
167
167
|
|
|
168
168
|
### Errors
|
|
169
169
|
|
|
@@ -240,7 +240,7 @@ run();
|
|
|
240
240
|
|
|
241
241
|
### Response
|
|
242
242
|
|
|
243
|
-
**Promise\<[
|
|
243
|
+
**Promise\<[components.Benefit](../../models/components/benefit.md)\>**
|
|
244
244
|
|
|
245
245
|
### Errors
|
|
246
246
|
|
|
@@ -320,7 +320,7 @@ run();
|
|
|
320
320
|
|
|
321
321
|
### Response
|
|
322
322
|
|
|
323
|
-
**Promise\<[
|
|
323
|
+
**Promise\<[components.Benefit](../../models/components/benefit.md)\>**
|
|
324
324
|
|
|
325
325
|
### Errors
|
|
326
326
|
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
# CheckoutLinks
|
|
2
|
+
(*checkoutLinks*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [list](#list) - List Checkout Links
|
|
9
|
+
* [create](#create) - Create Checkout Link
|
|
10
|
+
* [get](#get) - Get Checkout Link
|
|
11
|
+
* [update](#update) - Update Checkout Link
|
|
12
|
+
* [delete](#delete) - Delete Checkout Link
|
|
13
|
+
|
|
14
|
+
## list
|
|
15
|
+
|
|
16
|
+
List checkout links.
|
|
17
|
+
|
|
18
|
+
### Example Usage
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { Polar } from "@polar-sh/sdk";
|
|
22
|
+
|
|
23
|
+
const polar = new Polar({
|
|
24
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
async function run() {
|
|
28
|
+
const result = await polar.checkoutLinks.list({});
|
|
29
|
+
|
|
30
|
+
for await (const page of result) {
|
|
31
|
+
// Handle the page
|
|
32
|
+
console.log(page);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
run();
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Standalone function
|
|
40
|
+
|
|
41
|
+
The standalone function version of this method:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
45
|
+
import { checkoutLinksList } from "@polar-sh/sdk/funcs/checkoutLinksList.js";
|
|
46
|
+
|
|
47
|
+
// Use `PolarCore` for best tree-shaking performance.
|
|
48
|
+
// You can create one instance of it to use across an application.
|
|
49
|
+
const polar = new PolarCore({
|
|
50
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
async function run() {
|
|
54
|
+
const res = await checkoutLinksList(polar, {});
|
|
55
|
+
|
|
56
|
+
if (!res.ok) {
|
|
57
|
+
throw res.error;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const { value: result } = res;
|
|
61
|
+
|
|
62
|
+
for await (const page of result) {
|
|
63
|
+
// Handle the page
|
|
64
|
+
console.log(page);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
run();
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Parameters
|
|
72
|
+
|
|
73
|
+
| Parameter | Type | Required | Description |
|
|
74
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
75
|
+
| `request` | [operations.CheckoutLinksListRequest](../../models/operations/checkoutlinkslistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
76
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
77
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
78
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
79
|
+
|
|
80
|
+
### Response
|
|
81
|
+
|
|
82
|
+
**Promise\<[operations.CheckoutLinksListResponse](../../models/operations/checkoutlinkslistresponse.md)\>**
|
|
83
|
+
|
|
84
|
+
### Errors
|
|
85
|
+
|
|
86
|
+
| Error Type | Status Code | Content Type |
|
|
87
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
88
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
89
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
90
|
+
|
|
91
|
+
## create
|
|
92
|
+
|
|
93
|
+
Create a checkout link.
|
|
94
|
+
|
|
95
|
+
### Example Usage
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
import { Polar } from "@polar-sh/sdk";
|
|
99
|
+
|
|
100
|
+
const polar = new Polar({
|
|
101
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
async function run() {
|
|
105
|
+
const result = await polar.checkoutLinks.create({
|
|
106
|
+
productPriceId: "<value>",
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// Handle the result
|
|
110
|
+
console.log(result);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
run();
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Standalone function
|
|
117
|
+
|
|
118
|
+
The standalone function version of this method:
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
122
|
+
import { checkoutLinksCreate } from "@polar-sh/sdk/funcs/checkoutLinksCreate.js";
|
|
123
|
+
|
|
124
|
+
// Use `PolarCore` for best tree-shaking performance.
|
|
125
|
+
// You can create one instance of it to use across an application.
|
|
126
|
+
const polar = new PolarCore({
|
|
127
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
async function run() {
|
|
131
|
+
const res = await checkoutLinksCreate(polar, {
|
|
132
|
+
productPriceId: "<value>",
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
if (!res.ok) {
|
|
136
|
+
throw res.error;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const { value: result } = res;
|
|
140
|
+
|
|
141
|
+
// Handle the result
|
|
142
|
+
console.log(result);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
run();
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Parameters
|
|
149
|
+
|
|
150
|
+
| Parameter | Type | Required | Description |
|
|
151
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
152
|
+
| `request` | [components.CheckoutLinkCreate](../../models/components/checkoutlinkcreate.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
153
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
154
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
155
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
156
|
+
|
|
157
|
+
### Response
|
|
158
|
+
|
|
159
|
+
**Promise\<[components.CheckoutLink](../../models/components/checkoutlink.md)\>**
|
|
160
|
+
|
|
161
|
+
### Errors
|
|
162
|
+
|
|
163
|
+
| Error Type | Status Code | Content Type |
|
|
164
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
165
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
166
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
167
|
+
|
|
168
|
+
## get
|
|
169
|
+
|
|
170
|
+
Get a checkout link by ID.
|
|
171
|
+
|
|
172
|
+
### Example Usage
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
import { Polar } from "@polar-sh/sdk";
|
|
176
|
+
|
|
177
|
+
const polar = new Polar({
|
|
178
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
async function run() {
|
|
182
|
+
const result = await polar.checkoutLinks.get({
|
|
183
|
+
id: "<value>",
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
// Handle the result
|
|
187
|
+
console.log(result);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
run();
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Standalone function
|
|
194
|
+
|
|
195
|
+
The standalone function version of this method:
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
199
|
+
import { checkoutLinksGet } from "@polar-sh/sdk/funcs/checkoutLinksGet.js";
|
|
200
|
+
|
|
201
|
+
// Use `PolarCore` for best tree-shaking performance.
|
|
202
|
+
// You can create one instance of it to use across an application.
|
|
203
|
+
const polar = new PolarCore({
|
|
204
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
async function run() {
|
|
208
|
+
const res = await checkoutLinksGet(polar, {
|
|
209
|
+
id: "<value>",
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
if (!res.ok) {
|
|
213
|
+
throw res.error;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const { value: result } = res;
|
|
217
|
+
|
|
218
|
+
// Handle the result
|
|
219
|
+
console.log(result);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
run();
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Parameters
|
|
226
|
+
|
|
227
|
+
| Parameter | Type | Required | Description |
|
|
228
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
229
|
+
| `request` | [operations.CheckoutLinksGetRequest](../../models/operations/checkoutlinksgetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
230
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
231
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
232
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
233
|
+
|
|
234
|
+
### Response
|
|
235
|
+
|
|
236
|
+
**Promise\<[components.CheckoutLink](../../models/components/checkoutlink.md)\>**
|
|
237
|
+
|
|
238
|
+
### Errors
|
|
239
|
+
|
|
240
|
+
| Error Type | Status Code | Content Type |
|
|
241
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
242
|
+
| errors.ResourceNotFound | 404 | application/json |
|
|
243
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
244
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
245
|
+
|
|
246
|
+
## update
|
|
247
|
+
|
|
248
|
+
Update a checkout link.
|
|
249
|
+
|
|
250
|
+
### Example Usage
|
|
251
|
+
|
|
252
|
+
```typescript
|
|
253
|
+
import { Polar } from "@polar-sh/sdk";
|
|
254
|
+
|
|
255
|
+
const polar = new Polar({
|
|
256
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
async function run() {
|
|
260
|
+
const result = await polar.checkoutLinks.update({
|
|
261
|
+
id: "<value>",
|
|
262
|
+
checkoutLinkUpdate: {},
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
// Handle the result
|
|
266
|
+
console.log(result);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
run();
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Standalone function
|
|
273
|
+
|
|
274
|
+
The standalone function version of this method:
|
|
275
|
+
|
|
276
|
+
```typescript
|
|
277
|
+
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
278
|
+
import { checkoutLinksUpdate } from "@polar-sh/sdk/funcs/checkoutLinksUpdate.js";
|
|
279
|
+
|
|
280
|
+
// Use `PolarCore` for best tree-shaking performance.
|
|
281
|
+
// You can create one instance of it to use across an application.
|
|
282
|
+
const polar = new PolarCore({
|
|
283
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
async function run() {
|
|
287
|
+
const res = await checkoutLinksUpdate(polar, {
|
|
288
|
+
id: "<value>",
|
|
289
|
+
checkoutLinkUpdate: {},
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
if (!res.ok) {
|
|
293
|
+
throw res.error;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const { value: result } = res;
|
|
297
|
+
|
|
298
|
+
// Handle the result
|
|
299
|
+
console.log(result);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
run();
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Parameters
|
|
306
|
+
|
|
307
|
+
| Parameter | Type | Required | Description |
|
|
308
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
309
|
+
| `request` | [operations.CheckoutLinksUpdateRequest](../../models/operations/checkoutlinksupdaterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
310
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
311
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
312
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
313
|
+
|
|
314
|
+
### Response
|
|
315
|
+
|
|
316
|
+
**Promise\<[components.CheckoutLink](../../models/components/checkoutlink.md)\>**
|
|
317
|
+
|
|
318
|
+
### Errors
|
|
319
|
+
|
|
320
|
+
| Error Type | Status Code | Content Type |
|
|
321
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
322
|
+
| errors.ResourceNotFound | 404 | application/json |
|
|
323
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
324
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
325
|
+
|
|
326
|
+
## delete
|
|
327
|
+
|
|
328
|
+
Delete a checkout link.
|
|
329
|
+
|
|
330
|
+
### Example Usage
|
|
331
|
+
|
|
332
|
+
```typescript
|
|
333
|
+
import { Polar } from "@polar-sh/sdk";
|
|
334
|
+
|
|
335
|
+
const polar = new Polar({
|
|
336
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
async function run() {
|
|
340
|
+
await polar.checkoutLinks.delete({
|
|
341
|
+
id: "<value>",
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
run();
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Standalone function
|
|
351
|
+
|
|
352
|
+
The standalone function version of this method:
|
|
353
|
+
|
|
354
|
+
```typescript
|
|
355
|
+
import { PolarCore } from "@polar-sh/sdk/core.js";
|
|
356
|
+
import { checkoutLinksDelete } from "@polar-sh/sdk/funcs/checkoutLinksDelete.js";
|
|
357
|
+
|
|
358
|
+
// Use `PolarCore` for best tree-shaking performance.
|
|
359
|
+
// You can create one instance of it to use across an application.
|
|
360
|
+
const polar = new PolarCore({
|
|
361
|
+
accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
async function run() {
|
|
365
|
+
const res = await checkoutLinksDelete(polar, {
|
|
366
|
+
id: "<value>",
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
if (!res.ok) {
|
|
370
|
+
throw res.error;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const { value: result } = res;
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
run();
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Parameters
|
|
382
|
+
|
|
383
|
+
| Parameter | Type | Required | Description |
|
|
384
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
385
|
+
| `request` | [operations.CheckoutLinksDeleteRequest](../../models/operations/checkoutlinksdeleterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
386
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
387
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
388
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
389
|
+
|
|
390
|
+
### Response
|
|
391
|
+
|
|
392
|
+
**Promise\<void\>**
|
|
393
|
+
|
|
394
|
+
### Errors
|
|
395
|
+
|
|
396
|
+
| Error Type | Status Code | Content Type |
|
|
397
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
398
|
+
| errors.ResourceNotFound | 404 | application/json |
|
|
399
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
400
|
+
| errors.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PolarCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
6
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { Result } from "../types/fp.js";
|
|
9
|
+
/**
|
|
10
|
+
* Export Articles
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Export organization articles.
|
|
14
|
+
*/
|
|
15
|
+
export declare function articlesExport(client: PolarCore, request: operations.ArticlesExportRequest, options?: RequestOptions): Promise<Result<any, errors.HTTPValidationError | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
16
|
+
//# sourceMappingURL=articlesExport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"articlesExport.d.ts","sourceRoot":"","sources":["../src/funcs/articlesExport.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,GAAG,EACD,MAAM,CAAC,mBAAmB,GAC1B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAiFA"}
|