@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
|
@@ -5,47 +5,11 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from "./
|
|
13
|
-
import {
|
|
14
|
-
BenefitArticles,
|
|
15
|
-
BenefitArticles$inboundSchema,
|
|
16
|
-
BenefitArticles$Outbound,
|
|
17
|
-
BenefitArticles$outboundSchema,
|
|
18
|
-
} from "./benefitarticles.js";
|
|
19
|
-
import {
|
|
20
|
-
BenefitCustom,
|
|
21
|
-
BenefitCustom$inboundSchema,
|
|
22
|
-
BenefitCustom$Outbound,
|
|
23
|
-
BenefitCustom$outboundSchema,
|
|
24
|
-
} from "./benefitcustom.js";
|
|
25
|
-
import {
|
|
26
|
-
BenefitDiscordInput,
|
|
27
|
-
BenefitDiscordInput$inboundSchema,
|
|
28
|
-
BenefitDiscordInput$Outbound,
|
|
29
|
-
BenefitDiscordInput$outboundSchema,
|
|
30
|
-
} from "./benefitdiscord.js";
|
|
31
|
-
import {
|
|
32
|
-
BenefitDownloadables,
|
|
33
|
-
BenefitDownloadables$inboundSchema,
|
|
34
|
-
BenefitDownloadables$Outbound,
|
|
35
|
-
BenefitDownloadables$outboundSchema,
|
|
36
|
-
} from "./benefitdownloadables.js";
|
|
37
|
-
import {
|
|
38
|
-
BenefitGitHubRepository,
|
|
39
|
-
BenefitGitHubRepository$inboundSchema,
|
|
40
|
-
BenefitGitHubRepository$Outbound,
|
|
41
|
-
BenefitGitHubRepository$outboundSchema,
|
|
42
|
-
} from "./benefitgithubrepository.js";
|
|
43
|
-
import {
|
|
44
|
-
BenefitLicenseKeys,
|
|
45
|
-
BenefitLicenseKeys$inboundSchema,
|
|
46
|
-
BenefitLicenseKeys$Outbound,
|
|
47
|
-
BenefitLicenseKeys$outboundSchema,
|
|
48
|
-
} from "./benefitlicensekeys.js";
|
|
8
|
+
BenefitInput,
|
|
9
|
+
BenefitInput$inboundSchema,
|
|
10
|
+
BenefitInput$Outbound,
|
|
11
|
+
BenefitInput$outboundSchema,
|
|
12
|
+
} from "./benefitinput.js";
|
|
49
13
|
|
|
50
14
|
export const WebhookBenefitCreatedPayloadType = {
|
|
51
15
|
BenefitCreated: "benefit.created",
|
|
@@ -54,15 +18,6 @@ export type WebhookBenefitCreatedPayloadType = ClosedEnum<
|
|
|
54
18
|
typeof WebhookBenefitCreatedPayloadType
|
|
55
19
|
>;
|
|
56
20
|
|
|
57
|
-
export type WebhookBenefitCreatedPayloadBenefit =
|
|
58
|
-
| BenefitArticles
|
|
59
|
-
| BenefitAds
|
|
60
|
-
| BenefitDiscordInput
|
|
61
|
-
| BenefitGitHubRepository
|
|
62
|
-
| BenefitDownloadables
|
|
63
|
-
| BenefitLicenseKeys
|
|
64
|
-
| BenefitCustom;
|
|
65
|
-
|
|
66
21
|
/**
|
|
67
22
|
* Sent when a new benefit is created.
|
|
68
23
|
*
|
|
@@ -72,14 +27,7 @@ export type WebhookBenefitCreatedPayloadBenefit =
|
|
|
72
27
|
*/
|
|
73
28
|
export type WebhookBenefitCreatedPayload = {
|
|
74
29
|
type?: "benefit.created" | undefined;
|
|
75
|
-
data:
|
|
76
|
-
| BenefitArticles
|
|
77
|
-
| BenefitAds
|
|
78
|
-
| BenefitDiscordInput
|
|
79
|
-
| BenefitGitHubRepository
|
|
80
|
-
| BenefitDownloadables
|
|
81
|
-
| BenefitLicenseKeys
|
|
82
|
-
| BenefitCustom;
|
|
30
|
+
data: BenefitInput;
|
|
83
31
|
};
|
|
84
32
|
|
|
85
33
|
/** @internal */
|
|
@@ -103,61 +51,6 @@ export namespace WebhookBenefitCreatedPayloadType$ {
|
|
|
103
51
|
export const outboundSchema = WebhookBenefitCreatedPayloadType$outboundSchema;
|
|
104
52
|
}
|
|
105
53
|
|
|
106
|
-
/** @internal */
|
|
107
|
-
export const WebhookBenefitCreatedPayloadBenefit$inboundSchema: z.ZodType<
|
|
108
|
-
WebhookBenefitCreatedPayloadBenefit,
|
|
109
|
-
z.ZodTypeDef,
|
|
110
|
-
unknown
|
|
111
|
-
> = z.union([
|
|
112
|
-
BenefitArticles$inboundSchema,
|
|
113
|
-
BenefitAds$inboundSchema,
|
|
114
|
-
BenefitDiscordInput$inboundSchema,
|
|
115
|
-
BenefitGitHubRepository$inboundSchema,
|
|
116
|
-
BenefitDownloadables$inboundSchema,
|
|
117
|
-
BenefitLicenseKeys$inboundSchema,
|
|
118
|
-
BenefitCustom$inboundSchema,
|
|
119
|
-
]);
|
|
120
|
-
|
|
121
|
-
/** @internal */
|
|
122
|
-
export type WebhookBenefitCreatedPayloadBenefit$Outbound =
|
|
123
|
-
| BenefitArticles$Outbound
|
|
124
|
-
| BenefitAds$Outbound
|
|
125
|
-
| BenefitDiscordInput$Outbound
|
|
126
|
-
| BenefitGitHubRepository$Outbound
|
|
127
|
-
| BenefitDownloadables$Outbound
|
|
128
|
-
| BenefitLicenseKeys$Outbound
|
|
129
|
-
| BenefitCustom$Outbound;
|
|
130
|
-
|
|
131
|
-
/** @internal */
|
|
132
|
-
export const WebhookBenefitCreatedPayloadBenefit$outboundSchema: z.ZodType<
|
|
133
|
-
WebhookBenefitCreatedPayloadBenefit$Outbound,
|
|
134
|
-
z.ZodTypeDef,
|
|
135
|
-
WebhookBenefitCreatedPayloadBenefit
|
|
136
|
-
> = z.union([
|
|
137
|
-
BenefitArticles$outboundSchema,
|
|
138
|
-
BenefitAds$outboundSchema,
|
|
139
|
-
BenefitDiscordInput$outboundSchema,
|
|
140
|
-
BenefitGitHubRepository$outboundSchema,
|
|
141
|
-
BenefitDownloadables$outboundSchema,
|
|
142
|
-
BenefitLicenseKeys$outboundSchema,
|
|
143
|
-
BenefitCustom$outboundSchema,
|
|
144
|
-
]);
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* @internal
|
|
148
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
149
|
-
*/
|
|
150
|
-
export namespace WebhookBenefitCreatedPayloadBenefit$ {
|
|
151
|
-
/** @deprecated use `WebhookBenefitCreatedPayloadBenefit$inboundSchema` instead. */
|
|
152
|
-
export const inboundSchema =
|
|
153
|
-
WebhookBenefitCreatedPayloadBenefit$inboundSchema;
|
|
154
|
-
/** @deprecated use `WebhookBenefitCreatedPayloadBenefit$outboundSchema` instead. */
|
|
155
|
-
export const outboundSchema =
|
|
156
|
-
WebhookBenefitCreatedPayloadBenefit$outboundSchema;
|
|
157
|
-
/** @deprecated use `WebhookBenefitCreatedPayloadBenefit$Outbound` instead. */
|
|
158
|
-
export type Outbound = WebhookBenefitCreatedPayloadBenefit$Outbound;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
54
|
/** @internal */
|
|
162
55
|
export const WebhookBenefitCreatedPayload$inboundSchema: z.ZodType<
|
|
163
56
|
WebhookBenefitCreatedPayload,
|
|
@@ -165,28 +58,13 @@ export const WebhookBenefitCreatedPayload$inboundSchema: z.ZodType<
|
|
|
165
58
|
unknown
|
|
166
59
|
> = z.object({
|
|
167
60
|
type: z.literal("benefit.created").optional(),
|
|
168
|
-
data:
|
|
169
|
-
BenefitArticles$inboundSchema,
|
|
170
|
-
BenefitAds$inboundSchema,
|
|
171
|
-
BenefitDiscordInput$inboundSchema,
|
|
172
|
-
BenefitGitHubRepository$inboundSchema,
|
|
173
|
-
BenefitDownloadables$inboundSchema,
|
|
174
|
-
BenefitLicenseKeys$inboundSchema,
|
|
175
|
-
BenefitCustom$inboundSchema,
|
|
176
|
-
]),
|
|
61
|
+
data: BenefitInput$inboundSchema,
|
|
177
62
|
});
|
|
178
63
|
|
|
179
64
|
/** @internal */
|
|
180
65
|
export type WebhookBenefitCreatedPayload$Outbound = {
|
|
181
66
|
type: "benefit.created";
|
|
182
|
-
data:
|
|
183
|
-
| BenefitArticles$Outbound
|
|
184
|
-
| BenefitAds$Outbound
|
|
185
|
-
| BenefitDiscordInput$Outbound
|
|
186
|
-
| BenefitGitHubRepository$Outbound
|
|
187
|
-
| BenefitDownloadables$Outbound
|
|
188
|
-
| BenefitLicenseKeys$Outbound
|
|
189
|
-
| BenefitCustom$Outbound;
|
|
67
|
+
data: BenefitInput$Outbound;
|
|
190
68
|
};
|
|
191
69
|
|
|
192
70
|
/** @internal */
|
|
@@ -196,15 +74,7 @@ export const WebhookBenefitCreatedPayload$outboundSchema: z.ZodType<
|
|
|
196
74
|
WebhookBenefitCreatedPayload
|
|
197
75
|
> = z.object({
|
|
198
76
|
type: z.literal("benefit.created").default("benefit.created"),
|
|
199
|
-
data:
|
|
200
|
-
BenefitArticles$outboundSchema,
|
|
201
|
-
BenefitAds$outboundSchema,
|
|
202
|
-
BenefitDiscordInput$outboundSchema,
|
|
203
|
-
BenefitGitHubRepository$outboundSchema,
|
|
204
|
-
BenefitDownloadables$outboundSchema,
|
|
205
|
-
BenefitLicenseKeys$outboundSchema,
|
|
206
|
-
BenefitCustom$outboundSchema,
|
|
207
|
-
]),
|
|
77
|
+
data: BenefitInput$outboundSchema,
|
|
208
78
|
});
|
|
209
79
|
|
|
210
80
|
/**
|
|
@@ -5,47 +5,11 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from "./
|
|
13
|
-
import {
|
|
14
|
-
BenefitArticles,
|
|
15
|
-
BenefitArticles$inboundSchema,
|
|
16
|
-
BenefitArticles$Outbound,
|
|
17
|
-
BenefitArticles$outboundSchema,
|
|
18
|
-
} from "./benefitarticles.js";
|
|
19
|
-
import {
|
|
20
|
-
BenefitCustom,
|
|
21
|
-
BenefitCustom$inboundSchema,
|
|
22
|
-
BenefitCustom$Outbound,
|
|
23
|
-
BenefitCustom$outboundSchema,
|
|
24
|
-
} from "./benefitcustom.js";
|
|
25
|
-
import {
|
|
26
|
-
BenefitDiscordInput,
|
|
27
|
-
BenefitDiscordInput$inboundSchema,
|
|
28
|
-
BenefitDiscordInput$Outbound,
|
|
29
|
-
BenefitDiscordInput$outboundSchema,
|
|
30
|
-
} from "./benefitdiscord.js";
|
|
31
|
-
import {
|
|
32
|
-
BenefitDownloadables,
|
|
33
|
-
BenefitDownloadables$inboundSchema,
|
|
34
|
-
BenefitDownloadables$Outbound,
|
|
35
|
-
BenefitDownloadables$outboundSchema,
|
|
36
|
-
} from "./benefitdownloadables.js";
|
|
37
|
-
import {
|
|
38
|
-
BenefitGitHubRepository,
|
|
39
|
-
BenefitGitHubRepository$inboundSchema,
|
|
40
|
-
BenefitGitHubRepository$Outbound,
|
|
41
|
-
BenefitGitHubRepository$outboundSchema,
|
|
42
|
-
} from "./benefitgithubrepository.js";
|
|
43
|
-
import {
|
|
44
|
-
BenefitLicenseKeys,
|
|
45
|
-
BenefitLicenseKeys$inboundSchema,
|
|
46
|
-
BenefitLicenseKeys$Outbound,
|
|
47
|
-
BenefitLicenseKeys$outboundSchema,
|
|
48
|
-
} from "./benefitlicensekeys.js";
|
|
8
|
+
BenefitInput,
|
|
9
|
+
BenefitInput$inboundSchema,
|
|
10
|
+
BenefitInput$Outbound,
|
|
11
|
+
BenefitInput$outboundSchema,
|
|
12
|
+
} from "./benefitinput.js";
|
|
49
13
|
|
|
50
14
|
export const WebhookBenefitUpdatedPayloadType = {
|
|
51
15
|
BenefitUpdated: "benefit.updated",
|
|
@@ -54,15 +18,6 @@ export type WebhookBenefitUpdatedPayloadType = ClosedEnum<
|
|
|
54
18
|
typeof WebhookBenefitUpdatedPayloadType
|
|
55
19
|
>;
|
|
56
20
|
|
|
57
|
-
export type WebhookBenefitUpdatedPayloadBenefit =
|
|
58
|
-
| BenefitArticles
|
|
59
|
-
| BenefitAds
|
|
60
|
-
| BenefitDiscordInput
|
|
61
|
-
| BenefitGitHubRepository
|
|
62
|
-
| BenefitDownloadables
|
|
63
|
-
| BenefitLicenseKeys
|
|
64
|
-
| BenefitCustom;
|
|
65
|
-
|
|
66
21
|
/**
|
|
67
22
|
* Sent when a benefit is updated.
|
|
68
23
|
*
|
|
@@ -72,14 +27,7 @@ export type WebhookBenefitUpdatedPayloadBenefit =
|
|
|
72
27
|
*/
|
|
73
28
|
export type WebhookBenefitUpdatedPayload = {
|
|
74
29
|
type?: "benefit.updated" | undefined;
|
|
75
|
-
data:
|
|
76
|
-
| BenefitArticles
|
|
77
|
-
| BenefitAds
|
|
78
|
-
| BenefitDiscordInput
|
|
79
|
-
| BenefitGitHubRepository
|
|
80
|
-
| BenefitDownloadables
|
|
81
|
-
| BenefitLicenseKeys
|
|
82
|
-
| BenefitCustom;
|
|
30
|
+
data: BenefitInput;
|
|
83
31
|
};
|
|
84
32
|
|
|
85
33
|
/** @internal */
|
|
@@ -103,61 +51,6 @@ export namespace WebhookBenefitUpdatedPayloadType$ {
|
|
|
103
51
|
export const outboundSchema = WebhookBenefitUpdatedPayloadType$outboundSchema;
|
|
104
52
|
}
|
|
105
53
|
|
|
106
|
-
/** @internal */
|
|
107
|
-
export const WebhookBenefitUpdatedPayloadBenefit$inboundSchema: z.ZodType<
|
|
108
|
-
WebhookBenefitUpdatedPayloadBenefit,
|
|
109
|
-
z.ZodTypeDef,
|
|
110
|
-
unknown
|
|
111
|
-
> = z.union([
|
|
112
|
-
BenefitArticles$inboundSchema,
|
|
113
|
-
BenefitAds$inboundSchema,
|
|
114
|
-
BenefitDiscordInput$inboundSchema,
|
|
115
|
-
BenefitGitHubRepository$inboundSchema,
|
|
116
|
-
BenefitDownloadables$inboundSchema,
|
|
117
|
-
BenefitLicenseKeys$inboundSchema,
|
|
118
|
-
BenefitCustom$inboundSchema,
|
|
119
|
-
]);
|
|
120
|
-
|
|
121
|
-
/** @internal */
|
|
122
|
-
export type WebhookBenefitUpdatedPayloadBenefit$Outbound =
|
|
123
|
-
| BenefitArticles$Outbound
|
|
124
|
-
| BenefitAds$Outbound
|
|
125
|
-
| BenefitDiscordInput$Outbound
|
|
126
|
-
| BenefitGitHubRepository$Outbound
|
|
127
|
-
| BenefitDownloadables$Outbound
|
|
128
|
-
| BenefitLicenseKeys$Outbound
|
|
129
|
-
| BenefitCustom$Outbound;
|
|
130
|
-
|
|
131
|
-
/** @internal */
|
|
132
|
-
export const WebhookBenefitUpdatedPayloadBenefit$outboundSchema: z.ZodType<
|
|
133
|
-
WebhookBenefitUpdatedPayloadBenefit$Outbound,
|
|
134
|
-
z.ZodTypeDef,
|
|
135
|
-
WebhookBenefitUpdatedPayloadBenefit
|
|
136
|
-
> = z.union([
|
|
137
|
-
BenefitArticles$outboundSchema,
|
|
138
|
-
BenefitAds$outboundSchema,
|
|
139
|
-
BenefitDiscordInput$outboundSchema,
|
|
140
|
-
BenefitGitHubRepository$outboundSchema,
|
|
141
|
-
BenefitDownloadables$outboundSchema,
|
|
142
|
-
BenefitLicenseKeys$outboundSchema,
|
|
143
|
-
BenefitCustom$outboundSchema,
|
|
144
|
-
]);
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* @internal
|
|
148
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
149
|
-
*/
|
|
150
|
-
export namespace WebhookBenefitUpdatedPayloadBenefit$ {
|
|
151
|
-
/** @deprecated use `WebhookBenefitUpdatedPayloadBenefit$inboundSchema` instead. */
|
|
152
|
-
export const inboundSchema =
|
|
153
|
-
WebhookBenefitUpdatedPayloadBenefit$inboundSchema;
|
|
154
|
-
/** @deprecated use `WebhookBenefitUpdatedPayloadBenefit$outboundSchema` instead. */
|
|
155
|
-
export const outboundSchema =
|
|
156
|
-
WebhookBenefitUpdatedPayloadBenefit$outboundSchema;
|
|
157
|
-
/** @deprecated use `WebhookBenefitUpdatedPayloadBenefit$Outbound` instead. */
|
|
158
|
-
export type Outbound = WebhookBenefitUpdatedPayloadBenefit$Outbound;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
54
|
/** @internal */
|
|
162
55
|
export const WebhookBenefitUpdatedPayload$inboundSchema: z.ZodType<
|
|
163
56
|
WebhookBenefitUpdatedPayload,
|
|
@@ -165,28 +58,13 @@ export const WebhookBenefitUpdatedPayload$inboundSchema: z.ZodType<
|
|
|
165
58
|
unknown
|
|
166
59
|
> = z.object({
|
|
167
60
|
type: z.literal("benefit.updated").optional(),
|
|
168
|
-
data:
|
|
169
|
-
BenefitArticles$inboundSchema,
|
|
170
|
-
BenefitAds$inboundSchema,
|
|
171
|
-
BenefitDiscordInput$inboundSchema,
|
|
172
|
-
BenefitGitHubRepository$inboundSchema,
|
|
173
|
-
BenefitDownloadables$inboundSchema,
|
|
174
|
-
BenefitLicenseKeys$inboundSchema,
|
|
175
|
-
BenefitCustom$inboundSchema,
|
|
176
|
-
]),
|
|
61
|
+
data: BenefitInput$inboundSchema,
|
|
177
62
|
});
|
|
178
63
|
|
|
179
64
|
/** @internal */
|
|
180
65
|
export type WebhookBenefitUpdatedPayload$Outbound = {
|
|
181
66
|
type: "benefit.updated";
|
|
182
|
-
data:
|
|
183
|
-
| BenefitArticles$Outbound
|
|
184
|
-
| BenefitAds$Outbound
|
|
185
|
-
| BenefitDiscordInput$Outbound
|
|
186
|
-
| BenefitGitHubRepository$Outbound
|
|
187
|
-
| BenefitDownloadables$Outbound
|
|
188
|
-
| BenefitLicenseKeys$Outbound
|
|
189
|
-
| BenefitCustom$Outbound;
|
|
67
|
+
data: BenefitInput$Outbound;
|
|
190
68
|
};
|
|
191
69
|
|
|
192
70
|
/** @internal */
|
|
@@ -196,15 +74,7 @@ export const WebhookBenefitUpdatedPayload$outboundSchema: z.ZodType<
|
|
|
196
74
|
WebhookBenefitUpdatedPayload
|
|
197
75
|
> = z.object({
|
|
198
76
|
type: z.literal("benefit.updated").default("benefit.updated"),
|
|
199
|
-
data:
|
|
200
|
-
BenefitArticles$outboundSchema,
|
|
201
|
-
BenefitAds$outboundSchema,
|
|
202
|
-
BenefitDiscordInput$outboundSchema,
|
|
203
|
-
BenefitGitHubRepository$outboundSchema,
|
|
204
|
-
BenefitDownloadables$outboundSchema,
|
|
205
|
-
BenefitLicenseKeys$outboundSchema,
|
|
206
|
-
BenefitCustom$outboundSchema,
|
|
207
|
-
]),
|
|
77
|
+
data: BenefitInput$outboundSchema,
|
|
208
78
|
});
|
|
209
79
|
|
|
210
80
|
/**
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
PolarCheckoutSchemasCheckout,
|
|
9
|
+
PolarCheckoutSchemasCheckout$inboundSchema,
|
|
10
|
+
PolarCheckoutSchemasCheckout$Outbound,
|
|
11
|
+
PolarCheckoutSchemasCheckout$outboundSchema,
|
|
12
12
|
} from "./polarcheckoutschemascheckout.js";
|
|
13
13
|
|
|
14
14
|
export const WebhookCheckoutCreatedPayloadType = {
|
|
@@ -30,7 +30,7 @@ export type WebhookCheckoutCreatedPayload = {
|
|
|
30
30
|
/**
|
|
31
31
|
* Checkout session data retrieved using an access token.
|
|
32
32
|
*/
|
|
33
|
-
data:
|
|
33
|
+
data: PolarCheckoutSchemasCheckout;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
/** @internal */
|
|
@@ -62,13 +62,13 @@ export const WebhookCheckoutCreatedPayload$inboundSchema: z.ZodType<
|
|
|
62
62
|
unknown
|
|
63
63
|
> = z.object({
|
|
64
64
|
type: z.literal("checkout.created").optional(),
|
|
65
|
-
data:
|
|
65
|
+
data: PolarCheckoutSchemasCheckout$inboundSchema,
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
/** @internal */
|
|
69
69
|
export type WebhookCheckoutCreatedPayload$Outbound = {
|
|
70
70
|
type: "checkout.created";
|
|
71
|
-
data:
|
|
71
|
+
data: PolarCheckoutSchemasCheckout$Outbound;
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
/** @internal */
|
|
@@ -78,7 +78,7 @@ export const WebhookCheckoutCreatedPayload$outboundSchema: z.ZodType<
|
|
|
78
78
|
WebhookCheckoutCreatedPayload
|
|
79
79
|
> = z.object({
|
|
80
80
|
type: z.literal("checkout.created").default("checkout.created"),
|
|
81
|
-
data:
|
|
81
|
+
data: PolarCheckoutSchemasCheckout$outboundSchema,
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
PolarCheckoutSchemasCheckout,
|
|
9
|
+
PolarCheckoutSchemasCheckout$inboundSchema,
|
|
10
|
+
PolarCheckoutSchemasCheckout$Outbound,
|
|
11
|
+
PolarCheckoutSchemasCheckout$outboundSchema,
|
|
12
12
|
} from "./polarcheckoutschemascheckout.js";
|
|
13
13
|
|
|
14
14
|
export const WebhookCheckoutUpdatedPayloadType = {
|
|
@@ -30,7 +30,7 @@ export type WebhookCheckoutUpdatedPayload = {
|
|
|
30
30
|
/**
|
|
31
31
|
* Checkout session data retrieved using an access token.
|
|
32
32
|
*/
|
|
33
|
-
data:
|
|
33
|
+
data: PolarCheckoutSchemasCheckout;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
/** @internal */
|
|
@@ -62,13 +62,13 @@ export const WebhookCheckoutUpdatedPayload$inboundSchema: z.ZodType<
|
|
|
62
62
|
unknown
|
|
63
63
|
> = z.object({
|
|
64
64
|
type: z.literal("checkout.updated").optional(),
|
|
65
|
-
data:
|
|
65
|
+
data: PolarCheckoutSchemasCheckout$inboundSchema,
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
/** @internal */
|
|
69
69
|
export type WebhookCheckoutUpdatedPayload$Outbound = {
|
|
70
70
|
type: "checkout.updated";
|
|
71
|
-
data:
|
|
71
|
+
data: PolarCheckoutSchemasCheckout$Outbound;
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
/** @internal */
|
|
@@ -78,7 +78,7 @@ export const WebhookCheckoutUpdatedPayload$outboundSchema: z.ZodType<
|
|
|
78
78
|
WebhookCheckoutUpdatedPayload
|
|
79
79
|
> = z.object({
|
|
80
80
|
type: z.literal("checkout.updated").default("checkout.updated"),
|
|
81
|
-
data:
|
|
81
|
+
data: PolarCheckoutSchemasCheckout$outboundSchema,
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
import {
|
|
8
|
+
SubscriptionInput,
|
|
9
|
+
SubscriptionInput$inboundSchema,
|
|
10
|
+
SubscriptionInput$Outbound,
|
|
11
|
+
SubscriptionInput$outboundSchema,
|
|
12
|
+
} from "./subscriptioninput.js";
|
|
13
|
+
|
|
14
|
+
export const WebhookSubscriptionActivePayloadType = {
|
|
15
|
+
SubscriptionActive: "subscription.active",
|
|
16
|
+
} as const;
|
|
17
|
+
export type WebhookSubscriptionActivePayloadType = ClosedEnum<
|
|
18
|
+
typeof WebhookSubscriptionActivePayloadType
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Sent when a subscription becomes active,
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* whether because it's a new paid subscription or because payment was recovered.
|
|
26
|
+
*
|
|
27
|
+
* **Discord & Slack support:** Full
|
|
28
|
+
*/
|
|
29
|
+
export type WebhookSubscriptionActivePayload = {
|
|
30
|
+
type?: "subscription.active" | undefined;
|
|
31
|
+
data: SubscriptionInput;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const WebhookSubscriptionActivePayloadType$inboundSchema:
|
|
36
|
+
z.ZodNativeEnum<typeof WebhookSubscriptionActivePayloadType> = z.nativeEnum(
|
|
37
|
+
WebhookSubscriptionActivePayloadType,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const WebhookSubscriptionActivePayloadType$outboundSchema:
|
|
42
|
+
z.ZodNativeEnum<typeof WebhookSubscriptionActivePayloadType> =
|
|
43
|
+
WebhookSubscriptionActivePayloadType$inboundSchema;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
48
|
+
*/
|
|
49
|
+
export namespace WebhookSubscriptionActivePayloadType$ {
|
|
50
|
+
/** @deprecated use `WebhookSubscriptionActivePayloadType$inboundSchema` instead. */
|
|
51
|
+
export const inboundSchema =
|
|
52
|
+
WebhookSubscriptionActivePayloadType$inboundSchema;
|
|
53
|
+
/** @deprecated use `WebhookSubscriptionActivePayloadType$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema =
|
|
55
|
+
WebhookSubscriptionActivePayloadType$outboundSchema;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const WebhookSubscriptionActivePayload$inboundSchema: z.ZodType<
|
|
60
|
+
WebhookSubscriptionActivePayload,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
unknown
|
|
63
|
+
> = z.object({
|
|
64
|
+
type: z.literal("subscription.active").optional(),
|
|
65
|
+
data: SubscriptionInput$inboundSchema,
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type WebhookSubscriptionActivePayload$Outbound = {
|
|
70
|
+
type: "subscription.active";
|
|
71
|
+
data: SubscriptionInput$Outbound;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const WebhookSubscriptionActivePayload$outboundSchema: z.ZodType<
|
|
76
|
+
WebhookSubscriptionActivePayload$Outbound,
|
|
77
|
+
z.ZodTypeDef,
|
|
78
|
+
WebhookSubscriptionActivePayload
|
|
79
|
+
> = z.object({
|
|
80
|
+
type: z.literal("subscription.active").default("subscription.active"),
|
|
81
|
+
data: SubscriptionInput$outboundSchema,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
87
|
+
*/
|
|
88
|
+
export namespace WebhookSubscriptionActivePayload$ {
|
|
89
|
+
/** @deprecated use `WebhookSubscriptionActivePayload$inboundSchema` instead. */
|
|
90
|
+
export const inboundSchema = WebhookSubscriptionActivePayload$inboundSchema;
|
|
91
|
+
/** @deprecated use `WebhookSubscriptionActivePayload$outboundSchema` instead. */
|
|
92
|
+
export const outboundSchema = WebhookSubscriptionActivePayload$outboundSchema;
|
|
93
|
+
/** @deprecated use `WebhookSubscriptionActivePayload$Outbound` instead. */
|
|
94
|
+
export type Outbound = WebhookSubscriptionActivePayload$Outbound;
|
|
95
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
import {
|
|
8
|
+
SubscriptionInput,
|
|
9
|
+
SubscriptionInput$inboundSchema,
|
|
10
|
+
SubscriptionInput$Outbound,
|
|
11
|
+
SubscriptionInput$outboundSchema,
|
|
12
|
+
} from "./subscriptioninput.js";
|
|
13
|
+
|
|
14
|
+
export const WebhookSubscriptionCanceledPayloadType = {
|
|
15
|
+
SubscriptionCanceled: "subscription.canceled",
|
|
16
|
+
} as const;
|
|
17
|
+
export type WebhookSubscriptionCanceledPayloadType = ClosedEnum<
|
|
18
|
+
typeof WebhookSubscriptionCanceledPayloadType
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Sent when a subscription is canceled by the user.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* They might still have access until the end of the current period.
|
|
26
|
+
*
|
|
27
|
+
* **Discord & Slack support:** Full
|
|
28
|
+
*/
|
|
29
|
+
export type WebhookSubscriptionCanceledPayload = {
|
|
30
|
+
type?: "subscription.canceled" | undefined;
|
|
31
|
+
data: SubscriptionInput;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const WebhookSubscriptionCanceledPayloadType$inboundSchema:
|
|
36
|
+
z.ZodNativeEnum<typeof WebhookSubscriptionCanceledPayloadType> = z.nativeEnum(
|
|
37
|
+
WebhookSubscriptionCanceledPayloadType,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const WebhookSubscriptionCanceledPayloadType$outboundSchema:
|
|
42
|
+
z.ZodNativeEnum<typeof WebhookSubscriptionCanceledPayloadType> =
|
|
43
|
+
WebhookSubscriptionCanceledPayloadType$inboundSchema;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
48
|
+
*/
|
|
49
|
+
export namespace WebhookSubscriptionCanceledPayloadType$ {
|
|
50
|
+
/** @deprecated use `WebhookSubscriptionCanceledPayloadType$inboundSchema` instead. */
|
|
51
|
+
export const inboundSchema =
|
|
52
|
+
WebhookSubscriptionCanceledPayloadType$inboundSchema;
|
|
53
|
+
/** @deprecated use `WebhookSubscriptionCanceledPayloadType$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema =
|
|
55
|
+
WebhookSubscriptionCanceledPayloadType$outboundSchema;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const WebhookSubscriptionCanceledPayload$inboundSchema: z.ZodType<
|
|
60
|
+
WebhookSubscriptionCanceledPayload,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
unknown
|
|
63
|
+
> = z.object({
|
|
64
|
+
type: z.literal("subscription.canceled").optional(),
|
|
65
|
+
data: SubscriptionInput$inboundSchema,
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type WebhookSubscriptionCanceledPayload$Outbound = {
|
|
70
|
+
type: "subscription.canceled";
|
|
71
|
+
data: SubscriptionInput$Outbound;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const WebhookSubscriptionCanceledPayload$outboundSchema: z.ZodType<
|
|
76
|
+
WebhookSubscriptionCanceledPayload$Outbound,
|
|
77
|
+
z.ZodTypeDef,
|
|
78
|
+
WebhookSubscriptionCanceledPayload
|
|
79
|
+
> = z.object({
|
|
80
|
+
type: z.literal("subscription.canceled").default("subscription.canceled"),
|
|
81
|
+
data: SubscriptionInput$outboundSchema,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
87
|
+
*/
|
|
88
|
+
export namespace WebhookSubscriptionCanceledPayload$ {
|
|
89
|
+
/** @deprecated use `WebhookSubscriptionCanceledPayload$inboundSchema` instead. */
|
|
90
|
+
export const inboundSchema = WebhookSubscriptionCanceledPayload$inboundSchema;
|
|
91
|
+
/** @deprecated use `WebhookSubscriptionCanceledPayload$outboundSchema` instead. */
|
|
92
|
+
export const outboundSchema =
|
|
93
|
+
WebhookSubscriptionCanceledPayload$outboundSchema;
|
|
94
|
+
/** @deprecated use `WebhookSubscriptionCanceledPayload$Outbound` instead. */
|
|
95
|
+
export type Outbound = WebhookSubscriptionCanceledPayload$Outbound;
|
|
96
|
+
}
|