@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
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { PolarCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as components from "../models/components/index.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Update Checkout Link
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Update a checkout link.
|
|
31
|
+
*/
|
|
32
|
+
export async function checkoutLinksUpdate(
|
|
33
|
+
client: PolarCore,
|
|
34
|
+
request: operations.CheckoutLinksUpdateRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): Promise<
|
|
37
|
+
Result<
|
|
38
|
+
components.CheckoutLink,
|
|
39
|
+
| errors.ResourceNotFound
|
|
40
|
+
| errors.HTTPValidationError
|
|
41
|
+
| SDKError
|
|
42
|
+
| SDKValidationError
|
|
43
|
+
| UnexpectedClientError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
const parsed = safeParse(
|
|
51
|
+
request,
|
|
52
|
+
(value) =>
|
|
53
|
+
operations.CheckoutLinksUpdateRequest$outboundSchema.parse(value),
|
|
54
|
+
"Input validation failed",
|
|
55
|
+
);
|
|
56
|
+
if (!parsed.ok) {
|
|
57
|
+
return parsed;
|
|
58
|
+
}
|
|
59
|
+
const payload = parsed.value;
|
|
60
|
+
const body = encodeJSON("body", payload.CheckoutLinkUpdate, {
|
|
61
|
+
explode: true,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const pathParams = {
|
|
65
|
+
id: encodeSimple("id", payload.id, {
|
|
66
|
+
explode: false,
|
|
67
|
+
charEncoding: "percent",
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const path = pathToFunc("/v1/checkout-links/{id}")(pathParams);
|
|
72
|
+
|
|
73
|
+
const headers = new Headers({
|
|
74
|
+
"Content-Type": "application/json",
|
|
75
|
+
Accept: "application/json",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const secConfig = await extractSecurity(client._options.accessToken);
|
|
79
|
+
const securityInput = secConfig == null ? {} : { accessToken: secConfig };
|
|
80
|
+
const context = {
|
|
81
|
+
operationID: "checkout-links:update",
|
|
82
|
+
oAuth2Scopes: [],
|
|
83
|
+
securitySource: client._options.accessToken,
|
|
84
|
+
};
|
|
85
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
86
|
+
|
|
87
|
+
const requestRes = client._createRequest(context, {
|
|
88
|
+
security: requestSecurity,
|
|
89
|
+
method: "PATCH",
|
|
90
|
+
path: path,
|
|
91
|
+
headers: headers,
|
|
92
|
+
body: body,
|
|
93
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
94
|
+
}, options);
|
|
95
|
+
if (!requestRes.ok) {
|
|
96
|
+
return requestRes;
|
|
97
|
+
}
|
|
98
|
+
const req = requestRes.value;
|
|
99
|
+
|
|
100
|
+
const doResult = await client._do(req, {
|
|
101
|
+
context,
|
|
102
|
+
errorCodes: ["404", "422", "4XX", "5XX"],
|
|
103
|
+
retryConfig: options?.retries
|
|
104
|
+
|| client._options.retryConfig,
|
|
105
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
106
|
+
});
|
|
107
|
+
if (!doResult.ok) {
|
|
108
|
+
return doResult;
|
|
109
|
+
}
|
|
110
|
+
const response = doResult.value;
|
|
111
|
+
|
|
112
|
+
const responseFields = {
|
|
113
|
+
HttpMeta: { Response: response, Request: req },
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const [result] = await M.match<
|
|
117
|
+
components.CheckoutLink,
|
|
118
|
+
| errors.ResourceNotFound
|
|
119
|
+
| errors.HTTPValidationError
|
|
120
|
+
| SDKError
|
|
121
|
+
| SDKValidationError
|
|
122
|
+
| UnexpectedClientError
|
|
123
|
+
| InvalidRequestError
|
|
124
|
+
| RequestAbortedError
|
|
125
|
+
| RequestTimeoutError
|
|
126
|
+
| ConnectionError
|
|
127
|
+
>(
|
|
128
|
+
M.json(200, components.CheckoutLink$inboundSchema),
|
|
129
|
+
M.jsonErr(404, errors.ResourceNotFound$inboundSchema),
|
|
130
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
131
|
+
M.fail(["4XX", "5XX"]),
|
|
132
|
+
)(response, { extraFields: responseFields });
|
|
133
|
+
if (!result.ok) {
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return result;
|
|
138
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -60,7 +60,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
60
60
|
export const SDK_METADATA = {
|
|
61
61
|
language: "typescript",
|
|
62
62
|
openapiDocVersion: "0.1.0",
|
|
63
|
-
sdkVersion: "0.13.
|
|
64
|
-
genVersion: "2.
|
|
65
|
-
userAgent: "speakeasy-sdk/typescript 0.13.
|
|
63
|
+
sdkVersion: "0.13.2",
|
|
64
|
+
genVersion: "2.438.3",
|
|
65
|
+
userAgent: "speakeasy-sdk/typescript 0.13.2 2.438.3 0.1.0 @polar-sh/sdk",
|
|
66
66
|
} as const;
|
|
@@ -4,30 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* If the user or organization should be credited in the byline.
|
|
18
|
-
*/
|
|
19
|
-
export type ArticleCreateArticleByline = ClosedEnum<
|
|
20
|
-
typeof ArticleCreateArticleByline
|
|
21
|
-
>;
|
|
22
|
-
|
|
23
|
-
export const ArticleCreateArticleVisibility = {
|
|
24
|
-
Public: "public",
|
|
25
|
-
Hidden: "hidden",
|
|
26
|
-
Private: "private",
|
|
27
|
-
} as const;
|
|
28
|
-
export type ArticleCreateArticleVisibility = ClosedEnum<
|
|
29
|
-
typeof ArticleCreateArticleVisibility
|
|
30
|
-
>;
|
|
7
|
+
import {
|
|
8
|
+
ArticleByline,
|
|
9
|
+
ArticleByline$inboundSchema,
|
|
10
|
+
ArticleByline$outboundSchema,
|
|
11
|
+
} from "./articlebyline.js";
|
|
12
|
+
import {
|
|
13
|
+
ArticleVisibility,
|
|
14
|
+
ArticleVisibility$inboundSchema,
|
|
15
|
+
ArticleVisibility$outboundSchema,
|
|
16
|
+
} from "./articlevisibility.js";
|
|
31
17
|
|
|
32
18
|
export type ArticleCreate = {
|
|
33
19
|
/**
|
|
@@ -50,11 +36,8 @@ export type ArticleCreate = {
|
|
|
50
36
|
* The ID of the organization owning the article. **Required unless you use an organization token.**
|
|
51
37
|
*/
|
|
52
38
|
organizationId?: string | null | undefined;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
*/
|
|
56
|
-
byline?: ArticleCreateArticleByline | undefined;
|
|
57
|
-
visibility?: ArticleCreateArticleVisibility | undefined;
|
|
39
|
+
byline?: ArticleByline | undefined;
|
|
40
|
+
visibility?: ArticleVisibility | undefined;
|
|
58
41
|
/**
|
|
59
42
|
* Set to true to only make this article available for subscribers to a paid subscription tier in the organization.
|
|
60
43
|
*/
|
|
@@ -85,48 +68,6 @@ export type ArticleCreate = {
|
|
|
85
68
|
ogDescription?: string | null | undefined;
|
|
86
69
|
};
|
|
87
70
|
|
|
88
|
-
/** @internal */
|
|
89
|
-
export const ArticleCreateArticleByline$inboundSchema: z.ZodNativeEnum<
|
|
90
|
-
typeof ArticleCreateArticleByline
|
|
91
|
-
> = z.nativeEnum(ArticleCreateArticleByline);
|
|
92
|
-
|
|
93
|
-
/** @internal */
|
|
94
|
-
export const ArticleCreateArticleByline$outboundSchema: z.ZodNativeEnum<
|
|
95
|
-
typeof ArticleCreateArticleByline
|
|
96
|
-
> = ArticleCreateArticleByline$inboundSchema;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @internal
|
|
100
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
-
*/
|
|
102
|
-
export namespace ArticleCreateArticleByline$ {
|
|
103
|
-
/** @deprecated use `ArticleCreateArticleByline$inboundSchema` instead. */
|
|
104
|
-
export const inboundSchema = ArticleCreateArticleByline$inboundSchema;
|
|
105
|
-
/** @deprecated use `ArticleCreateArticleByline$outboundSchema` instead. */
|
|
106
|
-
export const outboundSchema = ArticleCreateArticleByline$outboundSchema;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/** @internal */
|
|
110
|
-
export const ArticleCreateArticleVisibility$inboundSchema: z.ZodNativeEnum<
|
|
111
|
-
typeof ArticleCreateArticleVisibility
|
|
112
|
-
> = z.nativeEnum(ArticleCreateArticleVisibility);
|
|
113
|
-
|
|
114
|
-
/** @internal */
|
|
115
|
-
export const ArticleCreateArticleVisibility$outboundSchema: z.ZodNativeEnum<
|
|
116
|
-
typeof ArticleCreateArticleVisibility
|
|
117
|
-
> = ArticleCreateArticleVisibility$inboundSchema;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* @internal
|
|
121
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
122
|
-
*/
|
|
123
|
-
export namespace ArticleCreateArticleVisibility$ {
|
|
124
|
-
/** @deprecated use `ArticleCreateArticleVisibility$inboundSchema` instead. */
|
|
125
|
-
export const inboundSchema = ArticleCreateArticleVisibility$inboundSchema;
|
|
126
|
-
/** @deprecated use `ArticleCreateArticleVisibility$outboundSchema` instead. */
|
|
127
|
-
export const outboundSchema = ArticleCreateArticleVisibility$outboundSchema;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
71
|
/** @internal */
|
|
131
72
|
export const ArticleCreate$inboundSchema: z.ZodType<
|
|
132
73
|
ArticleCreate,
|
|
@@ -138,8 +79,8 @@ export const ArticleCreate$inboundSchema: z.ZodType<
|
|
|
138
79
|
body: z.nullable(z.string()).optional(),
|
|
139
80
|
body_base64: z.nullable(z.string()).optional(),
|
|
140
81
|
organization_id: z.nullable(z.string()).optional(),
|
|
141
|
-
byline:
|
|
142
|
-
visibility:
|
|
82
|
+
byline: ArticleByline$inboundSchema.optional(),
|
|
83
|
+
visibility: ArticleVisibility$inboundSchema.optional(),
|
|
143
84
|
paid_subscribers_only: z.boolean().default(false),
|
|
144
85
|
paid_subscribers_only_ends_at: z.nullable(
|
|
145
86
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
@@ -172,8 +113,8 @@ export type ArticleCreate$Outbound = {
|
|
|
172
113
|
body?: string | null | undefined;
|
|
173
114
|
body_base64?: string | null | undefined;
|
|
174
115
|
organization_id?: string | null | undefined;
|
|
175
|
-
byline
|
|
176
|
-
visibility
|
|
116
|
+
byline?: string | undefined;
|
|
117
|
+
visibility?: string | undefined;
|
|
177
118
|
paid_subscribers_only: boolean;
|
|
178
119
|
paid_subscribers_only_ends_at?: string | null | undefined;
|
|
179
120
|
published_at?: string | null | undefined;
|
|
@@ -194,8 +135,8 @@ export const ArticleCreate$outboundSchema: z.ZodType<
|
|
|
194
135
|
body: z.nullable(z.string()).optional(),
|
|
195
136
|
bodyBase64: z.nullable(z.string()).optional(),
|
|
196
137
|
organizationId: z.nullable(z.string()).optional(),
|
|
197
|
-
byline:
|
|
198
|
-
visibility:
|
|
138
|
+
byline: ArticleByline$outboundSchema.optional(),
|
|
139
|
+
visibility: ArticleVisibility$outboundSchema.optional(),
|
|
199
140
|
paidSubscribersOnly: z.boolean().default(false),
|
|
200
141
|
paidSubscribersOnlyEndsAt: z.nullable(
|
|
201
142
|
z.date().transform(v => v.toISOString()),
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
BenefitAds,
|
|
8
|
+
BenefitAds$inboundSchema,
|
|
9
|
+
BenefitAds$Outbound,
|
|
10
|
+
BenefitAds$outboundSchema,
|
|
11
|
+
} from "./benefitads.js";
|
|
12
|
+
import {
|
|
13
|
+
BenefitArticles,
|
|
14
|
+
BenefitArticles$inboundSchema,
|
|
15
|
+
BenefitArticles$Outbound,
|
|
16
|
+
BenefitArticles$outboundSchema,
|
|
17
|
+
} from "./benefitarticles.js";
|
|
18
|
+
import {
|
|
19
|
+
BenefitCustom,
|
|
20
|
+
BenefitCustom$inboundSchema,
|
|
21
|
+
BenefitCustom$Outbound,
|
|
22
|
+
BenefitCustom$outboundSchema,
|
|
23
|
+
} from "./benefitcustom.js";
|
|
24
|
+
import {
|
|
25
|
+
BenefitDiscord,
|
|
26
|
+
BenefitDiscord$inboundSchema,
|
|
27
|
+
BenefitDiscord$Outbound,
|
|
28
|
+
BenefitDiscord$outboundSchema,
|
|
29
|
+
} from "./benefitdiscord.js";
|
|
30
|
+
import {
|
|
31
|
+
BenefitDownloadables,
|
|
32
|
+
BenefitDownloadables$inboundSchema,
|
|
33
|
+
BenefitDownloadables$Outbound,
|
|
34
|
+
BenefitDownloadables$outboundSchema,
|
|
35
|
+
} from "./benefitdownloadables.js";
|
|
36
|
+
import {
|
|
37
|
+
BenefitGitHubRepository,
|
|
38
|
+
BenefitGitHubRepository$inboundSchema,
|
|
39
|
+
BenefitGitHubRepository$Outbound,
|
|
40
|
+
BenefitGitHubRepository$outboundSchema,
|
|
41
|
+
} from "./benefitgithubrepository.js";
|
|
42
|
+
import {
|
|
43
|
+
BenefitLicenseKeys,
|
|
44
|
+
BenefitLicenseKeys$inboundSchema,
|
|
45
|
+
BenefitLicenseKeys$Outbound,
|
|
46
|
+
BenefitLicenseKeys$outboundSchema,
|
|
47
|
+
} from "./benefitlicensekeys.js";
|
|
48
|
+
|
|
49
|
+
export type Benefit =
|
|
50
|
+
| BenefitArticles
|
|
51
|
+
| BenefitAds
|
|
52
|
+
| BenefitDiscord
|
|
53
|
+
| BenefitGitHubRepository
|
|
54
|
+
| BenefitDownloadables
|
|
55
|
+
| BenefitLicenseKeys
|
|
56
|
+
| BenefitCustom;
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const Benefit$inboundSchema: z.ZodType<Benefit, z.ZodTypeDef, unknown> =
|
|
60
|
+
z.union([
|
|
61
|
+
BenefitArticles$inboundSchema,
|
|
62
|
+
BenefitAds$inboundSchema,
|
|
63
|
+
BenefitDiscord$inboundSchema,
|
|
64
|
+
BenefitGitHubRepository$inboundSchema,
|
|
65
|
+
BenefitDownloadables$inboundSchema,
|
|
66
|
+
BenefitLicenseKeys$inboundSchema,
|
|
67
|
+
BenefitCustom$inboundSchema,
|
|
68
|
+
]);
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export type Benefit$Outbound =
|
|
72
|
+
| BenefitArticles$Outbound
|
|
73
|
+
| BenefitAds$Outbound
|
|
74
|
+
| BenefitDiscord$Outbound
|
|
75
|
+
| BenefitGitHubRepository$Outbound
|
|
76
|
+
| BenefitDownloadables$Outbound
|
|
77
|
+
| BenefitLicenseKeys$Outbound
|
|
78
|
+
| BenefitCustom$Outbound;
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const Benefit$outboundSchema: z.ZodType<
|
|
82
|
+
Benefit$Outbound,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
Benefit
|
|
85
|
+
> = z.union([
|
|
86
|
+
BenefitArticles$outboundSchema,
|
|
87
|
+
BenefitAds$outboundSchema,
|
|
88
|
+
BenefitDiscord$outboundSchema,
|
|
89
|
+
BenefitGitHubRepository$outboundSchema,
|
|
90
|
+
BenefitDownloadables$outboundSchema,
|
|
91
|
+
BenefitLicenseKeys$outboundSchema,
|
|
92
|
+
BenefitCustom$outboundSchema,
|
|
93
|
+
]);
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
98
|
+
*/
|
|
99
|
+
export namespace Benefit$ {
|
|
100
|
+
/** @deprecated use `Benefit$inboundSchema` instead. */
|
|
101
|
+
export const inboundSchema = Benefit$inboundSchema;
|
|
102
|
+
/** @deprecated use `Benefit$outboundSchema` instead. */
|
|
103
|
+
export const outboundSchema = Benefit$outboundSchema;
|
|
104
|
+
/** @deprecated use `Benefit$Outbound` instead. */
|
|
105
|
+
export type Outbound = Benefit$Outbound;
|
|
106
|
+
}
|
|
@@ -4,42 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import {
|
|
8
|
-
BenefitAds,
|
|
9
|
-
BenefitAds$inboundSchema,
|
|
10
|
-
BenefitAds$Outbound,
|
|
11
|
-
BenefitAds$outboundSchema,
|
|
12
|
-
} from "./benefitads.js";
|
|
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
7
|
import {
|
|
44
8
|
BenefitGrantAdsProperties,
|
|
45
9
|
BenefitGrantAdsProperties$inboundSchema,
|
|
@@ -83,11 +47,11 @@ import {
|
|
|
83
47
|
BenefitGrantLicenseKeysProperties$outboundSchema,
|
|
84
48
|
} from "./benefitgrantlicensekeysproperties.js";
|
|
85
49
|
import {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
} from "./
|
|
50
|
+
BenefitInput,
|
|
51
|
+
BenefitInput$inboundSchema,
|
|
52
|
+
BenefitInput$Outbound,
|
|
53
|
+
BenefitInput$outboundSchema,
|
|
54
|
+
} from "./benefitinput.js";
|
|
91
55
|
|
|
92
56
|
export type BenefitGrantWebhookProperties =
|
|
93
57
|
| BenefitGrantCustomProperties
|
|
@@ -98,15 +62,6 @@ export type BenefitGrantWebhookProperties =
|
|
|
98
62
|
| BenefitGrantDiscordProperties
|
|
99
63
|
| BenefitGrantGitHubRepositoryProperties;
|
|
100
64
|
|
|
101
|
-
export type BenefitGrantWebhookBenefit =
|
|
102
|
-
| BenefitArticles
|
|
103
|
-
| BenefitAds
|
|
104
|
-
| BenefitDiscordInput
|
|
105
|
-
| BenefitGitHubRepository
|
|
106
|
-
| BenefitDownloadables
|
|
107
|
-
| BenefitLicenseKeys
|
|
108
|
-
| BenefitCustom;
|
|
109
|
-
|
|
110
65
|
export type PreviousProperties =
|
|
111
66
|
| BenefitGrantCustomProperties
|
|
112
67
|
| BenefitGrantArticlesProperties
|
|
@@ -169,14 +124,7 @@ export type BenefitGrantWebhook = {
|
|
|
169
124
|
| BenefitGrantLicenseKeysProperties
|
|
170
125
|
| BenefitGrantDiscordProperties
|
|
171
126
|
| BenefitGrantGitHubRepositoryProperties;
|
|
172
|
-
benefit:
|
|
173
|
-
| BenefitArticles
|
|
174
|
-
| BenefitAds
|
|
175
|
-
| BenefitDiscordInput
|
|
176
|
-
| BenefitGitHubRepository
|
|
177
|
-
| BenefitDownloadables
|
|
178
|
-
| BenefitLicenseKeys
|
|
179
|
-
| BenefitCustom;
|
|
127
|
+
benefit: BenefitInput;
|
|
180
128
|
previousProperties?:
|
|
181
129
|
| BenefitGrantCustomProperties
|
|
182
130
|
| BenefitGrantArticlesProperties
|
|
@@ -242,59 +190,6 @@ export namespace BenefitGrantWebhookProperties$ {
|
|
|
242
190
|
export type Outbound = BenefitGrantWebhookProperties$Outbound;
|
|
243
191
|
}
|
|
244
192
|
|
|
245
|
-
/** @internal */
|
|
246
|
-
export const BenefitGrantWebhookBenefit$inboundSchema: z.ZodType<
|
|
247
|
-
BenefitGrantWebhookBenefit,
|
|
248
|
-
z.ZodTypeDef,
|
|
249
|
-
unknown
|
|
250
|
-
> = z.union([
|
|
251
|
-
BenefitArticles$inboundSchema,
|
|
252
|
-
BenefitAds$inboundSchema,
|
|
253
|
-
BenefitDiscordInput$inboundSchema,
|
|
254
|
-
BenefitGitHubRepository$inboundSchema,
|
|
255
|
-
BenefitDownloadables$inboundSchema,
|
|
256
|
-
BenefitLicenseKeys$inboundSchema,
|
|
257
|
-
BenefitCustom$inboundSchema,
|
|
258
|
-
]);
|
|
259
|
-
|
|
260
|
-
/** @internal */
|
|
261
|
-
export type BenefitGrantWebhookBenefit$Outbound =
|
|
262
|
-
| BenefitArticles$Outbound
|
|
263
|
-
| BenefitAds$Outbound
|
|
264
|
-
| BenefitDiscordInput$Outbound
|
|
265
|
-
| BenefitGitHubRepository$Outbound
|
|
266
|
-
| BenefitDownloadables$Outbound
|
|
267
|
-
| BenefitLicenseKeys$Outbound
|
|
268
|
-
| BenefitCustom$Outbound;
|
|
269
|
-
|
|
270
|
-
/** @internal */
|
|
271
|
-
export const BenefitGrantWebhookBenefit$outboundSchema: z.ZodType<
|
|
272
|
-
BenefitGrantWebhookBenefit$Outbound,
|
|
273
|
-
z.ZodTypeDef,
|
|
274
|
-
BenefitGrantWebhookBenefit
|
|
275
|
-
> = z.union([
|
|
276
|
-
BenefitArticles$outboundSchema,
|
|
277
|
-
BenefitAds$outboundSchema,
|
|
278
|
-
BenefitDiscordInput$outboundSchema,
|
|
279
|
-
BenefitGitHubRepository$outboundSchema,
|
|
280
|
-
BenefitDownloadables$outboundSchema,
|
|
281
|
-
BenefitLicenseKeys$outboundSchema,
|
|
282
|
-
BenefitCustom$outboundSchema,
|
|
283
|
-
]);
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* @internal
|
|
287
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
288
|
-
*/
|
|
289
|
-
export namespace BenefitGrantWebhookBenefit$ {
|
|
290
|
-
/** @deprecated use `BenefitGrantWebhookBenefit$inboundSchema` instead. */
|
|
291
|
-
export const inboundSchema = BenefitGrantWebhookBenefit$inboundSchema;
|
|
292
|
-
/** @deprecated use `BenefitGrantWebhookBenefit$outboundSchema` instead. */
|
|
293
|
-
export const outboundSchema = BenefitGrantWebhookBenefit$outboundSchema;
|
|
294
|
-
/** @deprecated use `BenefitGrantWebhookBenefit$Outbound` instead. */
|
|
295
|
-
export type Outbound = BenefitGrantWebhookBenefit$Outbound;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
193
|
/** @internal */
|
|
299
194
|
export const PreviousProperties$inboundSchema: z.ZodType<
|
|
300
195
|
PreviousProperties,
|
|
@@ -380,15 +275,7 @@ export const BenefitGrantWebhook$inboundSchema: z.ZodType<
|
|
|
380
275
|
BenefitGrantDiscordProperties$inboundSchema,
|
|
381
276
|
BenefitGrantGitHubRepositoryProperties$inboundSchema,
|
|
382
277
|
]),
|
|
383
|
-
benefit:
|
|
384
|
-
BenefitArticles$inboundSchema,
|
|
385
|
-
BenefitAds$inboundSchema,
|
|
386
|
-
BenefitDiscordInput$inboundSchema,
|
|
387
|
-
BenefitGitHubRepository$inboundSchema,
|
|
388
|
-
BenefitDownloadables$inboundSchema,
|
|
389
|
-
BenefitLicenseKeys$inboundSchema,
|
|
390
|
-
BenefitCustom$inboundSchema,
|
|
391
|
-
]),
|
|
278
|
+
benefit: BenefitInput$inboundSchema,
|
|
392
279
|
previous_properties: z.nullable(
|
|
393
280
|
z.union([
|
|
394
281
|
BenefitGrantCustomProperties$inboundSchema,
|
|
@@ -437,14 +324,7 @@ export type BenefitGrantWebhook$Outbound = {
|
|
|
437
324
|
| BenefitGrantLicenseKeysProperties$Outbound
|
|
438
325
|
| BenefitGrantDiscordProperties$Outbound
|
|
439
326
|
| BenefitGrantGitHubRepositoryProperties$Outbound;
|
|
440
|
-
benefit:
|
|
441
|
-
| BenefitArticles$Outbound
|
|
442
|
-
| BenefitAds$Outbound
|
|
443
|
-
| BenefitDiscordInput$Outbound
|
|
444
|
-
| BenefitGitHubRepository$Outbound
|
|
445
|
-
| BenefitDownloadables$Outbound
|
|
446
|
-
| BenefitLicenseKeys$Outbound
|
|
447
|
-
| BenefitCustom$Outbound;
|
|
327
|
+
benefit: BenefitInput$Outbound;
|
|
448
328
|
previous_properties?:
|
|
449
329
|
| BenefitGrantCustomProperties$Outbound
|
|
450
330
|
| BenefitGrantArticlesProperties$Outbound
|
|
@@ -483,15 +363,7 @@ export const BenefitGrantWebhook$outboundSchema: z.ZodType<
|
|
|
483
363
|
BenefitGrantDiscordProperties$outboundSchema,
|
|
484
364
|
BenefitGrantGitHubRepositoryProperties$outboundSchema,
|
|
485
365
|
]),
|
|
486
|
-
benefit:
|
|
487
|
-
BenefitArticles$outboundSchema,
|
|
488
|
-
BenefitAds$outboundSchema,
|
|
489
|
-
BenefitDiscordInput$outboundSchema,
|
|
490
|
-
BenefitGitHubRepository$outboundSchema,
|
|
491
|
-
BenefitDownloadables$outboundSchema,
|
|
492
|
-
BenefitLicenseKeys$outboundSchema,
|
|
493
|
-
BenefitCustom$outboundSchema,
|
|
494
|
-
]),
|
|
366
|
+
benefit: BenefitInput$outboundSchema,
|
|
495
367
|
previousProperties: z.nullable(
|
|
496
368
|
z.union([
|
|
497
369
|
BenefitGrantCustomProperties$outboundSchema,
|